-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created components: InputMultiLines, InputSingleLine
- Loading branch information
Showing
28 changed files
with
291 additions
and
143 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/Inc.TeamAssistant.Stories/Components/Forms/InputMultiLines.stories.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@attribute [Stories("Components/Forms/InputMultiLines")] | ||
|
||
<Stories TComponent="InputMultiLines" Layout="typeof(DarkLayout)"> | ||
<Story Name="Default"> | ||
<Template> | ||
<InputMultiLines FieldId="@_fieldId" @bind-Value="Text" @attributes="context.Args" /> | ||
</Template> | ||
</Story> | ||
<Story Name="Disabled"> | ||
<Arguments> | ||
<Arg For="c => c.IsDisabled" Value="true" /> | ||
</Arguments> | ||
<Template> | ||
<InputMultiLines FieldId="@_fieldId" @bind-Value="Text" @attributes="context.Args"/> | ||
</Template> | ||
</Story> | ||
</Stories> | ||
|
||
@code { | ||
private readonly string _fieldId = "input-multilines"; | ||
|
||
public string Text { get; set; } = "Text"; | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Inc.TeamAssistant.Stories/Components/Forms/InputSingleLine.stories.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@attribute [Stories("Components/Forms/InputSingleLine")] | ||
|
||
<Stories TComponent="InputSingleLine" Layout="typeof(DarkLayout)"> | ||
<Story Name="Default"> | ||
<Template> | ||
<InputSingleLine FieldId="@_fieldId" @bind-Value="Text" @attributes="context.Args" /> | ||
</Template> | ||
</Story> | ||
<Story Name="Disabled"> | ||
<Arguments> | ||
<Arg For="c => c.IsDisabled" Value="true" /> | ||
</Arguments> | ||
<Template> | ||
<InputSingleLine FieldId="@_fieldId" @bind-Value="Text" @attributes="context.Args"/> | ||
</Template> | ||
</Story> | ||
</Stories> | ||
|
||
@code { | ||
private readonly string _fieldId = "input-multilines"; | ||
|
||
public string Text { get; set; } = "Text"; | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Inc.TeamAssistant.WebUI/Components/InputMultiLines.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@inherits InputBase<string> | ||
|
||
<div> | ||
@if (IsDisabled) | ||
{ | ||
<InputTextArea | ||
@bind-Value="Value" | ||
class="form-control form-control_multilines form-control_disabled" | ||
id="@FieldId" | ||
disabled="disabled" /> | ||
} | ||
else | ||
{ | ||
<InputTextArea | ||
@bind-Value="Value" | ||
class="form-control form-control_multilines form-control_enabled" | ||
id="@FieldId" /> | ||
} | ||
</div> | ||
|
||
@code { | ||
[Parameter, EditorRequired] | ||
public string FieldId { get; set; } = string.Empty; | ||
|
||
[Parameter] | ||
public bool IsDisabled { get; set; } | ||
|
||
protected override bool TryParseValueFromString(string? value, out string result, out string validationErrorMessage) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Inc.TeamAssistant.WebUI/Components/InputMultiLines.razor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
::deep .form-control { | ||
width: 100%; | ||
padding: .625rem .3125rem; | ||
border: 3px solid #555; | ||
border-radius: 0; | ||
color: #000; | ||
background-color: #dfdfdf; | ||
transition: border 0.3s; | ||
} | ||
::deep .form-control_multilines { | ||
resize: none; | ||
height: 102px; | ||
} | ||
::deep .form-control:focus, .form-control_enabled:hover { | ||
border: 3px solid #000; | ||
} | ||
::deep .form-control_disabled { | ||
background-color: #aaa; | ||
cursor: default; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Inc.TeamAssistant.WebUI/Components/InputMultiSelectList.razor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/Inc.TeamAssistant.WebUI/Components/InputSelectList.razor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
::deep .form-control { | ||
width: 100%; | ||
padding: .625rem .3125rem; | ||
border: 3px solid #555; | ||
border-radius: 0; | ||
color: #000; | ||
background-color: #dfdfdf; | ||
transition: border 0.3s; | ||
} | ||
::deep .form-control:focus, .form-control_enabled:hover { | ||
border: 3px solid #000; | ||
} | ||
::deep .form-control_disabled { | ||
background-color: #aaa; | ||
cursor: default; | ||
} | ||
::deep .form-control_select-list { | ||
-webkit-appearance: none; | ||
-moz-appearance: none; | ||
appearance: none; | ||
background: #dfdfdf url('imgs/arrow-down.png') calc(100% - 5px) center no-repeat; | ||
padding-right: 20px; | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Inc.TeamAssistant.WebUI/Components/InputSingleLine.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@inherits InputBase<string> | ||
|
||
<div> | ||
@if (IsDisabled) | ||
{ | ||
<InputText | ||
@bind-Value="Value" | ||
class="form-control form-control_disabled" | ||
id="@FieldId" | ||
disabled="disabled" /> | ||
} | ||
else | ||
{ | ||
<InputText | ||
@bind-Value="Value" | ||
class="form-control form-control_enabled" | ||
id="@FieldId" /> | ||
} | ||
</div> | ||
|
||
@code { | ||
[Parameter, EditorRequired] | ||
public string FieldId { get; set; } = string.Empty; | ||
|
||
[Parameter] | ||
public bool IsDisabled { get; set; } | ||
|
||
protected override bool TryParseValueFromString(string? value, out string result, out string validationErrorMessage) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Inc.TeamAssistant.WebUI/Components/InputSingleLine.razor.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
::deep .form-control { | ||
width: 100%; | ||
padding: .625rem .3125rem; | ||
border: 3px solid #555; | ||
border-radius: 0; | ||
color: #000; | ||
background-color: #dfdfdf; | ||
transition: border 0.3s; | ||
} | ||
::deep .form-control:focus, .form-control_enabled:hover { | ||
border: 3px solid #000; | ||
} | ||
::deep .form-control_disabled { | ||
background-color: #aaa; | ||
cursor: default; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,8 @@ | |
} | ||
.constructor__text { | ||
margin: 40px 0; | ||
} | ||
.constructor__title { | ||
font-size: 2.4rem; | ||
line-height: 3.4rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.