Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Extra PhoneInput component (#8343) #8354

Closed
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@namespace Bit.BlazorUI

<div class="bit-pin">
<select>
@foreach (var country in Countries.All)
{
<option value="@country.Iso2">
<div class="bit-pin-opt">
<span>@country.Code</span>
<img src="@($"_content/Bit.BlazorUI.Extras/images/countries/{country.Iso2}-flat-16.webp")" />
</div>
</option>
}
</select>
<input />
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Bit.BlazorUI;

public partial class BitPhoneInput
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.bit-pin {
gap: 1rem;
display: flex;
}
1,018 changes: 1,018 additions & 0 deletions src/BlazorUI/Bit.BlazorUI.Extras/Components/PhoneInput/Countries.cs

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/BlazorUI/Bit.BlazorUI.Extras/Components/PhoneInput/Country.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Bit.BlazorUI;

public class Country(string name, string code, string iso2, string iso3)
{
public string Name { get; set; } = name;

public string Code { get; set; } = code;

public string Iso2 { get; set; } = iso2;

public string Iso3 { get; set; } = iso3;
}
2 changes: 2 additions & 0 deletions src/BlazorUI/Bit.BlazorUI.Extras/Styles/components.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
@import "../Components/DataGrid/BitDataGrid.scss";
@import "../Components/DataGrid/Pagination/BitDataGridPaginator.scss";

@import "../Components/PhoneInput/BitPhoneInput.scss";
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@page "/components/phoneinput"

<PageOutlet Url="components/phoneinput"
Title="PhoneInput"
Description="PhoneInput component of the bit BlazorUI components" />

<ComponentDemo ComponentName="PhoneInput"
ComponentDescription="PhoneInput is a special type of input to accept phone number."
ComponentParameters="componentParameters"
ComponentSubClasses="componentSubClasses"
ComponentSubEnums="componentSubEnums">
<ComponentExampleBox Title="Basic" RazorCode="@example1RazorCode" Id="example1">
<ExamplePreview>
<BitPhoneInput></BitPhoneInput>
</ExamplePreview>
</ComponentExampleBox>
</ComponentDemo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Bit.BlazorUI.Demo.Client.Core.Pages.Components.Extras.PhoneInput;

public partial class BitPhoneInputDemo
{
private readonly List<ComponentParameter> componentParameters =
[
];

private readonly List<ComponentSubClass> componentSubClasses =
[
];

private readonly List<ComponentSubEnum> componentSubEnums =
[
];



private readonly string example1RazorCode = @"
";

}
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,14 @@
</div>
<div class="list">
<BitText Typography="BitTypography.H6">Extras</BitText>
<BitLink Href="/components/chart" title="Chart" Style="display: flex">
<BitText Typography="BitTypography.Subtitle1">Chart</BitText>
</BitLink>
<BitLink Href="/components/datagrid" title="DataGrid" Style="display: flex">
<BitText Typography="BitTypography.Subtitle1">DataGrid</BitText>
</BitLink>
<BitLink Href="/components/chart" title="Chart" Style="display: flex">
<BitText Typography="BitTypography.Subtitle1">Chart</BitText>
<BitLink Href="/components/phoneinput" title="PhoneInput" Style="display: flex">
<BitText Typography="BitTypography.Subtitle1">PhoneInput</BitText>
</BitLink>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ public partial class NavMenu : IDisposable
Text = "Extras",
ChildItems =
[
new() { Text = "Chart", Url = "/components/chart" },
new() { Text = "DataGrid", Url = "/components/datagrid", AdditionalUrls = ["/components/data-grid"] },
new() { Text = "Chart", Url = "/components/chart" }
new() { Text = "PhoneInput", Url = "/components/phoneinput" },
]
},
new() { Text = "Iconography", Url = "/iconography" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
"minify": { "enabled": false },
"options": { "sourceMap": false }
},
{
"outputFile": "Pages/Components/Extras/PhoneInput/BitPhoneInputDemo.razor.css",
"inputFile": "Pages/Components/Extras/PhoneInput/BitPhoneInputDemo.razor.scss",
"minify": { "enabled": false },
"options": { "sourceMap": false }
},
{
"outputFile": "Pages/Components/Inputs/Calendar/BitCalendarDemo.razor.css",
"inputFile": "Pages/Components/Inputs/Calendar/BitCalendarDemo.razor.scss",
Expand Down
Loading