| | | 1 | | namespace Allyaria.Theming.BrandTypes; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents a collection of brand color palettes corresponding to different UI interaction states. Each state derives |
| | | 5 | | /// its palette from a base color with adjusted tonal variations for accessibility and visual feedback. |
| | | 6 | | /// </summary> |
| | | 7 | | public sealed record BrandState |
| | | 8 | | { |
| | | 9 | | /// <summary>Initializes a new instance of the <see cref="BrandState" /> struct using the specified base color.</sum |
| | | 10 | | /// <param name="color">The base <see cref="HexColor" /> used to generate state-specific palettes.</param> |
| | 8059 | 11 | | public BrandState(HexColor color) |
| | | 12 | | { |
| | 8059 | 13 | | Default = new BrandPalette(color: color); |
| | 8059 | 14 | | Disabled = new BrandPalette(color: color.ToDisabled()); |
| | 8059 | 15 | | Dragged = new BrandPalette(color: color.ToDragged()); |
| | 8059 | 16 | | Focused = new BrandPalette(color: color.ToFocused()); |
| | 8059 | 17 | | Hovered = new BrandPalette(color: color.ToHovered()); |
| | 8059 | 18 | | Pressed = new BrandPalette(color: color.ToPressed()); |
| | 8059 | 19 | | Visited = new BrandPalette(color: color.ToVisited()); |
| | 8059 | 20 | | } |
| | | 21 | | |
| | | 22 | | /// <summary>Gets the palette for the default (idle) visual state.</summary> |
| | 3245 | 23 | | public BrandPalette Default { get; } |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// Gets the palette for the disabled (inactive) state, ensuring reduced contrast and visual de-emphasis. |
| | | 27 | | /// </summary> |
| | 785 | 28 | | public BrandPalette Disabled { get; } |
| | | 29 | | |
| | | 30 | | /// <summary>Gets the palette for the dragged state, used when an element is being moved or repositioned.</summary> |
| | 785 | 31 | | public BrandPalette Dragged { get; } |
| | | 32 | | |
| | | 33 | | /// <summary>Gets the palette for the focused state, emphasizing keyboard or programmatic focus visibility.</summary |
| | 785 | 34 | | public BrandPalette Focused { get; } |
| | | 35 | | |
| | | 36 | | /// <summary>Gets the palette for the hovered state, providing feedback when the pointer is over an element.</summar |
| | 785 | 37 | | public BrandPalette Hovered { get; } |
| | | 38 | | |
| | | 39 | | /// <summary>Gets the palette for the pressed (active) state, applied during interaction activation.</summary> |
| | 785 | 40 | | public BrandPalette Pressed { get; } |
| | | 41 | | |
| | | 42 | | /// <summary> |
| | | 43 | | /// Gets the palette for the visited state, commonly used to indicate previously interacted links or items. |
| | | 44 | | /// </summary> |
| | 785 | 45 | | public BrandPalette Visited { get; } |
| | | 46 | | } |