Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<AspNetCoreVersion>3.0.0</AspNetCoreVersion>
<BlazorVersion>3.0.0-preview9.19465.2</BlazorVersion>
<AspNetCoreVersion>3.1.0</AspNetCoreVersion>
<BlazorVersion>3.1.0-preview4.19579.2</BlazorVersion>
</PropertyGroup>
</Project>
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# RazorComponents.MaterialDesign

## Buttons & Indicators
- [x] Button
- [ ] Chip
- [ ] FAB
- [ ] Icon
- [ ] IconButton
- [x] ProgressBar
- [ ] Ripple

## Form Controls
- [ ] Autocomplete
- [x] Checkbox
- [ ] DatePicker
- [ ] NumericUpDownField
- [ ] RadioButton
- [x] Select
- [ ] Slider
- [ ] SlideToggle
- [x] Switch
- [x] TextArea (new! alpha2)
- [x] TextField

## Navigation
- [ ] AppBar (* TopAppBar)
- [x] Drawer
- [x] Nav Menu (* NavLink)

## Layout
- [ ] Card
- [ ] Divider
- [ ] Elevation
- [ ] Expansion Panel
- [ ] Hidden
- [ ] Layout Grid
- [x] List
- [ ] Menu
- [ ] Tab
- [ ] Table
- [ ] Themes
- [x] Typography

## Popups & Modals
- [x] Dialog
- [ ] Snackbar
- [ ] Toast
- [ ] Tooltip
4 changes: 2 additions & 2 deletions samples/BlazorApp/BlazorApp.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>7.3</LangVersion>
<LangVersion>8.0</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
</PropertyGroup>

Expand Down
34 changes: 28 additions & 6 deletions samples/BlazorApp/Pages/TextFieldSample.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,35 @@

<p>See <code>TextField.cshtml</code> for sources.</p>

<MdcTextField Label="Type in some text" @bind-Value="@currentValue" />
<p>
<MdcTextField Label="Type in some text" @bind-Value="@currentText" />

@if (currentValue != null)
{
<p>You typed: <strong>@currentValue</strong></p>
}
@if (currentText != null)
{
<p>You typed: <strong>@currentText</strong></p>
}
</p>

<p>
<MdcTextField Type="password" Label="Type in a password" @bind-Value="@currentPassword" />

@if (currentPassword != null)
{
<p>You typed: <strong>@currentPassword</strong></p>
}
</p>

<p>
<MdcTextArea Label="Type in some lines of text" @bind-Value="@currentMultiLine" />

@if (currentMultiLine != null)
{
<p>You typed: <strong>@currentMultiLine</strong></p>
}
</p>

@functions {
string currentValue;
string currentText;
string currentPassword;
string currentMultiLine;
}
4 changes: 2 additions & 2 deletions samples/RazorComponentsApp/RazorComponentsApp.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>7.3</LangVersion>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
23 changes: 23 additions & 0 deletions src/RazorComponents.MaterialDesign/MdcTextArea.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@inherits MdcInputComponentBase<string>
@inject IJSRuntime jsRuntime

<div @ref="textFieldElem" class="mdc-text-field mdc-text-field--textarea">
<textarea id="@id" class="mdc-text-field__input @FieldClass"
@bind="@CurrentValue" rows="@Rows" cols="@Cols" />

<label class="mdc-floating-label" for=@id>@Label</label>
<div class="mdc-line-ripple"></div>
</div>

@functions {
string id = Guid.NewGuid().ToString();
ElementReference textFieldElem;

[Parameter] public string Label { get; set; }
[Parameter] public int Rows { get; set; } = 4;
[Parameter] public int Cols { get; set; } = 40;

protected async override Task OnAfterFirstRenderAsync()
=> await jsRuntime.InvokeAsync<object>(
"BlazorMaterial.textField.init", textFieldElem);
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>7.3</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>8.0</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
</PropertyGroup>

Expand All @@ -13,7 +13,7 @@
<!-- Pack settings -->
<Target Name="PublishAll" BeforeTargets="_IntermediatePack">
<PropertyGroup>
<PackageVersion>0.1.0-alpha-$([System.DateTime]::Now.ToString(yyyyMMddhhmmss))</PackageVersion>
<PackageVersion>0.1.0-alpha2.$([System.DateTime]::Now.ToString(yy))$([System.DateTime]::Now.DayOfYear).0</PackageVersion>
</PropertyGroup>
</Target>

Expand Down