-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
519 changed files
with
14,667 additions
and
7,716 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,66 +1,61 @@ | ||
@namespace Skclusive.Material.AppBar | ||
@inherits StyleComponentBase | ||
|
||
<Styled | ||
Name="AppBar"> | ||
|
||
.AppBar-Root { | ||
width: 100%; | ||
display: flex; | ||
z-index: var(--theme-zindex-appbar, 1100); | ||
box-sizing: border-box; | ||
flex-shrink: 0; | ||
flex-direction: column; | ||
} | ||
|
||
.AppBar-Position-Fixed { | ||
top: 0; | ||
left: auto; | ||
right: 0; | ||
position: fixed; | ||
} | ||
|
||
.AppBar-Position-Absolute { | ||
top: 0; | ||
left: auto; | ||
right: 0; | ||
position: absolute; | ||
} | ||
|
||
.AppBar-Position-Sticky { | ||
top: 0; | ||
left: auto; | ||
right: 0; | ||
position: sticky; | ||
} | ||
|
||
.AppBar-Position-Static { | ||
position: static; | ||
transform: translateZ(0); | ||
} | ||
|
||
.AppBar-Position-Relative { | ||
position: relative; | ||
} | ||
|
||
.AppBar-Color-Default { | ||
color: var(--theme-palette-grey300-contrast-text, rgba(0, 0, 0, 0.87)); | ||
background-color: var(--theme-palette-grey-background-default, #f5f5f5); | ||
} | ||
|
||
.AppBar-Color-Primary { | ||
color: var(--theme-palette-primary-contrast-text, #fff); | ||
background-color: var(--theme-palette-primary-main, #1976d2); | ||
} | ||
|
||
.AppBar-Color-Secondary { | ||
color: var(--theme-palette-secondary-contrast-text, #fff); | ||
background-color: var(--theme-palette-secondary-main, rgb(220, 0, 78)); | ||
} | ||
|
||
.AppBar-Color-Custom { | ||
color: var(--theme-custom-palette-primary-contrast-text, #fff); | ||
background-color: var(--theme-custom-palette-primary-main, #1976d2); | ||
} | ||
|
||
</Styled> | ||
.AppBar-Root { | ||
width: 100%; | ||
display: flex; | ||
z-index: var(--theme-zindex-appbar); | ||
box-sizing: border-box; | ||
flex-shrink: 0; | ||
flex-direction: column; | ||
} | ||
|
||
.AppBar-Position-Fixed { | ||
top: 0; | ||
left: auto; | ||
right: 0; | ||
position: fixed; | ||
} | ||
|
||
.AppBar-Position-Absolute { | ||
top: 0; | ||
left: auto; | ||
right: 0; | ||
position: absolute; | ||
} | ||
|
||
.AppBar-Position-Sticky { | ||
top: 0; | ||
left: auto; | ||
right: 0; | ||
position: sticky; | ||
} | ||
|
||
.AppBar-Position-Static { | ||
position: static; | ||
transform: translateZ(0); | ||
} | ||
|
||
.AppBar-Position-Relative { | ||
position: relative; | ||
} | ||
|
||
.AppBar-Color-Default { | ||
color: var(--theme-palette-grey-contrast-text-default); | ||
background-color: var(--theme-palette-grey-background-default); | ||
} | ||
|
||
.AppBar-Color-Primary { | ||
color: var(--theme-palette-primary-contrast-text); | ||
background-color: var(--theme-palette-primary-main); | ||
} | ||
|
||
.AppBar-Color-Secondary { | ||
color: var(--theme-palette-secondary-contrast-text); | ||
background-color: var(--theme-palette-secondary-main); | ||
} | ||
|
||
.AppBar-Color-Custom { | ||
color: var(--theme-custom-palette-primary-contrast-text); | ||
background-color: var(--theme-custom-palette-primary-main); | ||
} |
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,18 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Skclusive.Core.Component; | ||
using Skclusive.Material.Core; | ||
using Skclusive.Material.Paper; | ||
|
||
namespace Skclusive.Material.AppBar | ||
{ | ||
public static class AppBarExtension | ||
{ | ||
public static void TryAddAppBarServices(this IServiceCollection services, IMaterialConfig config) | ||
{ | ||
// Theme service would be added by Paper | ||
services.TryAddPaperServices(config); | ||
|
||
services.TryAddStyleTypeProvider<AppBarStyleProvider>(); | ||
} | ||
} | ||
} |
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,11 @@ | ||
using Skclusive.Core.Component; | ||
|
||
namespace Skclusive.Material.AppBar | ||
{ | ||
public class AppBarStyleProvider : StyleTypeProvider | ||
{ | ||
public AppBarStyleProvider() : base(typeof(AppBarStyle)) | ||
{ | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,35 +1,30 @@ | ||
@namespace Skclusive.Material.Avatar | ||
@inherits StyleComponentBase | ||
|
||
<Styled | ||
Name="Avatar"> | ||
.Avatar-Root { | ||
font-family: var(--theme-typography-font-family); | ||
font-size: var(--theme-typography-font-size-medium); | ||
width: 40px; | ||
height: 40px; | ||
display: flex; | ||
position: relative; | ||
overflow: hidden; | ||
flex-shrink: 0; | ||
align-items: center; | ||
user-select: none; | ||
border-radius: 50%; | ||
line-height: 1; | ||
justify-content: center; | ||
} | ||
|
||
.Avatar-Root { | ||
font-family: var(--theme-typography-font-family, "Roboto", "Helvetica", "Arial", sans-serif); | ||
font-size: var(--theme-typography-font-size-medium, 1.25rem); | ||
width: 40px; | ||
height: 40px; | ||
display: flex; | ||
position: relative; | ||
overflow: hidden; | ||
flex-shrink: 0; | ||
align-items: center; | ||
user-select: none; | ||
border-radius: 50%; | ||
line-height: 1; | ||
justify-content: center; | ||
} | ||
.Avatar-Color-Default { | ||
color: var(--theme-palette-background-default); | ||
background-color: var(--theme-component-avatar-background); | ||
} | ||
|
||
.Avatar-Color-Default { | ||
color: var(--theme-palette-background-default, #fff); | ||
background-color: var(--theme-palette-grey, #bdbdbd); | ||
} | ||
|
||
.Avatar-Image { | ||
width: 100%; | ||
height: 100%; | ||
text-align: center; | ||
object-fit: cover; | ||
} | ||
|
||
</Styled> | ||
.Avatar-Image { | ||
width: 100%; | ||
height: 100%; | ||
text-align: center; | ||
object-fit: cover; | ||
} |
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,24 @@ | ||
using Skclusive.Core.Component; | ||
|
||
namespace Skclusive.Material.Avatar | ||
{ | ||
public interface IAvatarContext : IComponentContext | ||
{ | ||
} | ||
|
||
public class AvatarContextBuilder : ComponentContextBuilder<AvatarContextBuilder, IAvatarContext> | ||
{ | ||
protected class AvatarContext : ComponentContext, IAvatarContext | ||
{ | ||
} | ||
|
||
public AvatarContextBuilder() : base(new AvatarContext()) | ||
{ | ||
} | ||
|
||
protected override AvatarContextBuilder This() | ||
{ | ||
return this; | ||
} | ||
} | ||
} |
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,19 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Skclusive.Core.Component; | ||
using Skclusive.Material.Core; | ||
using Skclusive.Material.Theme; | ||
|
||
namespace Skclusive.Material.Avatar | ||
{ | ||
public static class AvatarExtension | ||
{ | ||
public static void TryAddAvatarServices(this IServiceCollection services, IMaterialConfig config) | ||
{ | ||
services.TryAddThemeServices(config); | ||
|
||
services.TryAddStyleTypeProvider<AvatarStyleProvider>(); | ||
|
||
services.TryAddStyleProducer<AvatarStyleProducer>(); | ||
} | ||
} | ||
} |
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,22 @@ | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using Skclusive.Core.Component; | ||
using Skclusive.Material.Theme; | ||
|
||
namespace Skclusive.Material.Avatar | ||
{ | ||
public class AvatarStyleProducer : IStyleProducer | ||
{ | ||
public IDictionary<string, string> Variables(ThemeValue theme) | ||
{ | ||
var isDark = theme.IsDark(); | ||
|
||
var palette = theme.Palette; | ||
|
||
return new Dictionary<string, string> | ||
{ | ||
{ "--theme-component-avatar-background", (isDark ? palette.Grey.X600 : palette.Grey.X400).ToString(CultureInfo.InvariantCulture) } | ||
}; | ||
} | ||
} | ||
} |
Oops, something went wrong.