mtrl 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/build.ts +349 -0
- package/demo/index.html +110 -0
- package/demo/main.js +448 -0
- package/demo/styles.css +239 -0
- package/index.ts +18 -0
- package/package.json +14 -3
- package/server.ts +86 -0
- package/src/components/badge/api.ts +70 -63
- package/src/components/badge/badge.ts +16 -2
- package/src/components/badge/config.ts +66 -13
- package/src/components/badge/features.ts +51 -42
- package/src/components/badge/index.ts +27 -2
- package/src/components/badge/types.ts +62 -30
- package/src/components/bottom-app-bar/bottom-app-bar.ts +154 -0
- package/src/components/bottom-app-bar/config.ts +29 -0
- package/src/components/bottom-app-bar/index.ts +17 -0
- package/src/components/bottom-app-bar/types.ts +114 -0
- package/src/components/button/api.ts +5 -0
- package/src/components/button/button.ts +0 -1
- package/src/components/button/config.ts +6 -2
- package/src/components/button/index.ts +10 -2
- package/src/components/button/types.ts +20 -2
- package/src/components/card/card.ts +13 -25
- package/src/components/card/config.ts +83 -30
- package/src/components/card/content.ts +8 -10
- package/src/components/card/features.ts +4 -3
- package/src/components/card/index.ts +29 -2
- package/src/components/card/types.ts +33 -22
- package/src/components/checkbox/config.ts +3 -4
- package/src/components/checkbox/index.ts +1 -2
- package/src/components/checkbox/types.ts +12 -3
- package/src/components/chip/api.ts +170 -221
- package/src/components/chip/chip.ts +34 -302
- package/src/components/chip/config.ts +1 -2
- package/src/components/chip/index.ts +10 -2
- package/src/components/chip/types.ts +224 -35
- package/src/components/datepicker/api.ts +265 -0
- package/src/components/datepicker/config.ts +141 -0
- package/src/components/datepicker/datepicker.ts +341 -0
- package/src/components/datepicker/index.ts +12 -0
- package/src/components/datepicker/render.ts +450 -0
- package/src/components/datepicker/types.ts +397 -0
- package/src/components/datepicker/utils.ts +289 -0
- package/src/components/dialog/api.ts +55 -21
- package/src/components/dialog/config.ts +12 -9
- package/src/components/dialog/dialog.ts +6 -3
- package/src/components/dialog/features.ts +345 -151
- package/src/components/dialog/index.ts +38 -8
- package/src/components/dialog/types.ts +40 -14
- package/src/components/divider/config.ts +81 -0
- package/src/components/divider/divider.ts +37 -0
- package/src/components/divider/features.ts +207 -0
- package/src/components/divider/index.ts +9 -0
- package/src/components/divider/types.ts +55 -0
- package/src/components/extended-fab/api.ts +141 -0
- package/src/components/extended-fab/config.ts +112 -0
- package/src/components/extended-fab/extended-fab.ts +125 -0
- package/src/components/extended-fab/index.ts +9 -0
- package/src/components/extended-fab/types.ts +304 -0
- package/src/components/fab/api.ts +97 -0
- package/src/components/fab/config.ts +93 -0
- package/src/components/fab/fab.ts +67 -0
- package/src/components/fab/index.ts +9 -0
- package/src/components/fab/types.ts +251 -0
- package/src/components/list/config.ts +4 -5
- package/src/components/list/features.ts +6 -7
- package/src/components/list/index.ts +7 -9
- package/src/components/list/list-item.ts +12 -13
- package/src/components/list/types.ts +50 -5
- package/src/components/list/utils.ts +30 -3
- package/src/components/menu/features/items-manager.ts +9 -9
- package/src/components/menu/features/positioning.ts +7 -7
- package/src/components/menu/features/visibility.ts +7 -7
- package/src/components/menu/index.ts +7 -9
- package/src/components/menu/menu-item.ts +6 -6
- package/src/components/menu/menu.ts +22 -0
- package/src/components/menu/types.ts +29 -10
- package/src/components/menu/utils.ts +67 -0
- package/src/components/navigation/api.ts +78 -50
- package/src/components/navigation/config.ts +22 -10
- package/src/components/navigation/features/items.ts +284 -0
- package/src/components/navigation/index.ts +0 -6
- package/src/components/navigation/nav-item.ts +70 -33
- package/src/components/navigation/navigation.ts +53 -3
- package/src/components/navigation/types.ts +117 -70
- package/src/components/progress/api.ts +2 -3
- package/src/components/progress/config.ts +2 -3
- package/src/components/progress/index.ts +0 -1
- package/src/components/progress/progress.ts +1 -2
- package/src/components/progress/types.ts +186 -33
- package/src/components/radios/config.ts +1 -1
- package/src/components/radios/index.ts +0 -1
- package/src/components/radios/types.ts +0 -7
- package/src/components/search/api.ts +203 -0
- package/src/components/search/config.ts +86 -0
- package/src/components/search/features/index.ts +4 -0
- package/src/components/search/features/search.ts +717 -0
- package/src/components/search/features/states.ts +169 -0
- package/src/components/search/features/structure.ts +197 -0
- package/src/components/search/index.ts +7 -0
- package/src/components/search/search.ts +52 -0
- package/src/components/search/types.ts +175 -0
- package/src/components/segmented-button/config.ts +80 -0
- package/src/components/segmented-button/index.ts +4 -0
- package/src/components/segmented-button/segment.ts +154 -0
- package/src/components/segmented-button/segmented-button.ts +249 -0
- package/src/components/segmented-button/types.ts +254 -0
- package/src/components/slider/accessibility.md +5 -5
- package/src/components/slider/api.ts +41 -120
- package/src/components/slider/config.ts +51 -47
- package/src/components/slider/features/handlers.ts +495 -0
- package/src/components/slider/features/index.ts +1 -2
- package/src/components/slider/features/slider.ts +66 -84
- package/src/components/slider/features/states.ts +195 -0
- package/src/components/slider/features/structure.ts +136 -206
- package/src/components/slider/features/ui.ts +145 -206
- package/src/components/slider/index.ts +2 -11
- package/src/components/slider/slider.ts +9 -12
- package/src/components/slider/types.ts +67 -26
- package/src/components/snackbar/config.ts +2 -3
- package/src/components/snackbar/constants.ts +0 -32
- package/src/components/snackbar/index.ts +0 -1
- package/src/components/snackbar/position.ts +9 -1
- package/src/components/snackbar/types.ts +122 -46
- package/src/components/switch/config.ts +2 -3
- package/src/components/switch/index.ts +0 -1
- package/src/components/switch/types.ts +3 -2
- package/src/components/tabs/config.ts +3 -4
- package/src/components/tabs/features.ts +4 -2
- package/src/components/tabs/index.ts +0 -15
- package/src/components/tabs/indicator.ts +73 -13
- package/src/components/tabs/tab-api.ts +12 -4
- package/src/components/tabs/tab.ts +18 -6
- package/src/components/tabs/types.ts +23 -5
- package/src/components/textfield/config.ts +2 -3
- package/src/components/textfield/index.ts +0 -1
- package/src/components/textfield/types.ts +17 -3
- package/src/components/timepicker/README.md +277 -0
- package/src/components/timepicker/api.ts +632 -0
- package/src/components/timepicker/clockdial.ts +482 -0
- package/src/components/timepicker/config.ts +228 -0
- package/src/components/timepicker/index.ts +3 -0
- package/src/components/timepicker/render.ts +613 -0
- package/src/components/timepicker/timepicker.ts +117 -0
- package/src/components/timepicker/types.ts +336 -0
- package/src/components/timepicker/utils.ts +241 -0
- package/src/components/tooltip/api.ts +1 -1
- package/src/components/tooltip/config.ts +27 -6
- package/src/components/tooltip/index.ts +0 -1
- package/src/components/tooltip/types.ts +13 -3
- package/src/components/top-app-bar/config.ts +83 -0
- package/src/components/top-app-bar/index.ts +11 -0
- package/src/components/top-app-bar/top-app-bar.ts +316 -0
- package/src/components/top-app-bar/types.ts +140 -0
- package/src/core/build/_ripple.scss +6 -6
- package/src/core/build/ripple.ts +72 -95
- package/src/core/compose/features/icon.ts +3 -1
- package/src/core/compose/features/ripple.ts +4 -1
- package/src/core/compose/features/textlabel.ts +23 -2
- package/src/core/dom/create.ts +5 -0
- package/src/index.ts +9 -0
- package/src/styles/abstract/_theme.scss +9 -1
- package/src/styles/components/_badge.scss +182 -0
- package/src/styles/components/_bottom-app-bar.scss +103 -0
- package/src/{components/button/_styles.scss → styles/components/_button.scss} +0 -10
- package/src/{components/checkbox/_styles.scss → styles/components/_checkbox.scss} +0 -2
- package/src/styles/components/_datepicker.scss +358 -0
- package/src/styles/components/_dialog.scss +259 -0
- package/src/styles/components/_divider.scss +57 -0
- package/src/styles/components/_extended-fab.scss +267 -0
- package/src/styles/components/_fab.scss +225 -0
- package/src/{components/navigation/_styles.scss → styles/components/_navigation.scss} +1 -0
- package/src/styles/components/_search.scss +306 -0
- package/src/styles/components/_segmented-button.scss +117 -0
- package/src/{components/slider/_styles.scss → styles/components/_slider.scss} +83 -24
- package/src/{components/switch/_styles.scss → styles/components/_switch.scss} +0 -2
- package/src/{components/tabs/_styles.scss → styles/components/_tabs.scss} +95 -33
- package/src/{components/textfield/_styles.scss → styles/components/_textfield.scss} +70 -67
- package/src/styles/components/_timepicker.scss +451 -0
- package/src/styles/components/_top-app-bar.scss +225 -0
- package/src/styles/main.scss +98 -49
- package/src/styles/themes/_autumn.scss +21 -0
- package/src/styles/themes/_base-theme.scss +61 -0
- package/src/styles/themes/_baseline.scss +58 -0
- package/src/styles/themes/_bluekhaki.scss +125 -0
- package/src/styles/themes/_brownbeige.scss +125 -0
- package/src/styles/themes/_browngreen.scss +125 -0
- package/src/styles/themes/_forest.scss +6 -0
- package/src/styles/themes/_greenbeige.scss +125 -0
- package/src/styles/themes/_material.scss +125 -0
- package/src/styles/themes/_ocean.scss +6 -0
- package/src/styles/themes/_sageivory.scss +125 -0
- package/src/styles/themes/_spring.scss +6 -0
- package/src/styles/themes/_summer.scss +5 -0
- package/src/styles/themes/_sunset.scss +5 -0
- package/src/styles/themes/_tealcaramel.scss +125 -0
- package/src/styles/themes/_winter.scss +6 -0
- package/src/components/badge/_styles.scss +0 -174
- package/src/components/badge/constants.ts +0 -30
- package/src/components/button/constants.ts +0 -11
- package/src/components/card/constants.ts +0 -84
- package/src/components/dialog/_styles.scss +0 -213
- package/src/components/dialog/constants.ts +0 -32
- package/src/components/menu/constants.ts +0 -154
- package/src/components/navigation/constants.ts +0 -200
- package/src/components/navigation/features/items.js +0 -192
- package/src/components/progress/constants.ts +0 -29
- package/src/components/slider/features/appearance.ts +0 -94
- package/src/components/slider/features/disabled.ts +0 -68
- package/src/components/slider/features/events.ts +0 -164
- package/src/components/slider/features/interactions.ts +0 -396
- package/src/components/slider/features/keyboard.ts +0 -233
- package/src/components/switch/constants.ts +0 -80
- package/src/components/tabs/constants.ts +0 -89
- package/src/core/collection/adapters/mongodb.js +0 -232
- /package/src/{components/card/_styles.scss → styles/components/_card.scss} +0 -0
- /package/src/{components/carousel/_styles.scss → styles/components/_carousel.scss} +0 -0
- /package/src/{components/chip/_styles.scss → styles/components/_chip.scss} +0 -0
- /package/src/{components/list/_styles.scss → styles/components/_list.scss} +0 -0
- /package/src/{components/menu/_styles.scss → styles/components/_menu.scss} +0 -0
- /package/src/{components/progress/_styles.scss → styles/components/_progress.scss} +0 -0
- /package/src/{components/radios/_styles.scss → styles/components/_radios.scss} +0 -0
- /package/src/{components/sheet/_styles.scss → styles/components/_sheet.scss} +0 -0
- /package/src/{components/snackbar/_styles.scss → styles/components/_snackbar.scss} +0 -0
- /package/src/{components/tooltip/_styles.scss → styles/components/_tooltip.scss} +0 -0
- /package/src/styles/utilities/{_color.scss → _colors.scss} +0 -0
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
--#{$prefix}-sys-color-outline: #727970;
|
|
36
36
|
--#{$prefix}-sys-color-outline-variant: #C1C9BE;
|
|
37
37
|
|
|
38
|
+
// Include status colors for light theme
|
|
39
|
+
@include status-colors-light();
|
|
40
|
+
|
|
38
41
|
&[data-theme-mode="dark"] {
|
|
39
42
|
// Key colors
|
|
40
43
|
--#{$prefix}-sys-color-primary: #79DC80;
|
|
@@ -67,5 +70,8 @@
|
|
|
67
70
|
|
|
68
71
|
--#{$prefix}-sys-color-outline: #8B9388;
|
|
69
72
|
--#{$prefix}-sys-color-outline-variant: #424940;
|
|
73
|
+
|
|
74
|
+
// Include status colors for dark theme
|
|
75
|
+
@include status-colors-dark();
|
|
70
76
|
}
|
|
71
77
|
}
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
--#{$prefix}-sys-color-outline: #827568;
|
|
42
42
|
--#{$prefix}-sys-color-outline-variant: #D5C8B9;
|
|
43
43
|
|
|
44
|
+
// Include status colors for light theme
|
|
45
|
+
@include status-colors-light();
|
|
46
|
+
|
|
44
47
|
&[data-theme-mode="dark"] {
|
|
45
48
|
// Key colors - darker but still vibrant
|
|
46
49
|
--#{$prefix}-sys-color-primary: #9ECAFF;
|
|
@@ -78,5 +81,7 @@
|
|
|
78
81
|
|
|
79
82
|
--#{$prefix}-sys-color-outline: #9E8F80;
|
|
80
83
|
--#{$prefix}-sys-color-outline-variant: #50453B;
|
|
84
|
+
// Include status colors for dark theme
|
|
85
|
+
@include status-colors-dark();
|
|
81
86
|
}
|
|
82
87
|
}
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
--#{$prefix}-sys-color-outline: #85736D;
|
|
36
36
|
--#{$prefix}-sys-color-outline-variant: #D8C2BB;
|
|
37
37
|
|
|
38
|
+
// Include status colors for light theme
|
|
39
|
+
@include status-colors-light();
|
|
40
|
+
|
|
38
41
|
&[data-theme-mode="dark"] {
|
|
39
42
|
--#{$prefix}-sys-color-primary: #FFB686;
|
|
40
43
|
--#{$prefix}-sys-color-on-primary: #5C2800;
|
|
@@ -51,5 +54,7 @@
|
|
|
51
54
|
--#{$prefix}-sys-color-surface-container: #2B1714;
|
|
52
55
|
|
|
53
56
|
--#{$prefix}-sys-color-outline: #B89784;
|
|
57
|
+
// Include status colors for dark theme
|
|
58
|
+
@include status-colors-dark();
|
|
54
59
|
}
|
|
55
60
|
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// src/styles/themes/_tealcaramel.scss
|
|
2
|
+
@use '../abstract/base' as *;
|
|
3
|
+
@use 'base-theme' as *;
|
|
4
|
+
|
|
5
|
+
@include create-theme('tealcaramel') {
|
|
6
|
+
// Key colors based on teal and caramel combination
|
|
7
|
+
--#{$prefix}-sys-color-primary: #2B4D56; // Teal as primary
|
|
8
|
+
--#{$prefix}-sys-color-primary-rgb: 0, 105, 92;
|
|
9
|
+
--#{$prefix}-sys-color-on-primary: #FFFFFF;
|
|
10
|
+
--#{$prefix}-sys-color-on-primary-rgb: 255, 255, 255;
|
|
11
|
+
--#{$prefix}-sys-color-primary-container: #B2DFDB;
|
|
12
|
+
--#{$prefix}-sys-color-primary-container-rgb: 178, 223, 219;
|
|
13
|
+
--#{$prefix}-sys-color-on-primary-container: #002A25;
|
|
14
|
+
--#{$prefix}-sys-color-on-primary-container-rgb: 0, 42, 37;
|
|
15
|
+
|
|
16
|
+
--#{$prefix}-sys-color-secondary: #9A6433; // Caramel as secondary
|
|
17
|
+
--#{$prefix}-sys-color-secondary-rgb: 198, 124, 78;
|
|
18
|
+
--#{$prefix}-sys-color-on-secondary: #FFFFFF;
|
|
19
|
+
--#{$prefix}-sys-color-on-secondary-rgb: 255, 255, 255;
|
|
20
|
+
--#{$prefix}-sys-color-secondary-container: #FFD8C2;
|
|
21
|
+
--#{$prefix}-sys-color-secondary-container-rgb: 255, 216, 194;
|
|
22
|
+
--#{$prefix}-sys-color-on-secondary-container: #3E2715;
|
|
23
|
+
--#{$prefix}-sys-color-on-secondary-container-rgb: 62, 39, 21;
|
|
24
|
+
|
|
25
|
+
--#{$prefix}-sys-color-tertiary: #4A7C6E; // Muted teal as tertiary
|
|
26
|
+
--#{$prefix}-sys-color-tertiary-rgb: 74, 124, 110;
|
|
27
|
+
--#{$prefix}-sys-color-on-tertiary: #FFFFFF;
|
|
28
|
+
--#{$prefix}-sys-color-on-tertiary-rgb: 255, 255, 255;
|
|
29
|
+
--#{$prefix}-sys-color-tertiary-container: #CCE6DF;
|
|
30
|
+
--#{$prefix}-sys-color-tertiary-container-rgb: 204, 230, 223;
|
|
31
|
+
--#{$prefix}-sys-color-on-tertiary-container: #0E3029;
|
|
32
|
+
--#{$prefix}-sys-color-on-tertiary-container-rgb: 14, 48, 41;
|
|
33
|
+
|
|
34
|
+
// Neutral colors with subtle teal undertones
|
|
35
|
+
--#{$prefix}-sys-color-surface: #F9FCFC;
|
|
36
|
+
--#{$prefix}-sys-color-surface-rgb: 249, 252, 252;
|
|
37
|
+
--#{$prefix}-sys-color-surface-dim: #E5ECEB;
|
|
38
|
+
--#{$prefix}-sys-color-surface-dim-rgb: 229, 236, 235;
|
|
39
|
+
--#{$prefix}-sys-color-surface-bright: #F9FCFC;
|
|
40
|
+
--#{$prefix}-sys-color-surface-bright-rgb: 249, 252, 252;
|
|
41
|
+
--#{$prefix}-sys-color-surface-container-lowest: #FFFFFF;
|
|
42
|
+
--#{$prefix}-sys-color-surface-container-lowest-rgb: 255, 255, 255;
|
|
43
|
+
--#{$prefix}-sys-color-surface-container-low: #F3F7F6;
|
|
44
|
+
--#{$prefix}-sys-color-surface-container-low-rgb: 243, 247, 246;
|
|
45
|
+
--#{$prefix}-sys-color-surface-container: #EDF2F1;
|
|
46
|
+
--#{$prefix}-sys-color-surface-container-rgb: 237, 242, 241;
|
|
47
|
+
--#{$prefix}-sys-color-surface-container-high: #E7ECEB;
|
|
48
|
+
--#{$prefix}-sys-color-surface-container-high-rgb: 231, 236, 235;
|
|
49
|
+
--#{$prefix}-sys-color-surface-container-highest: #E1E6E5;
|
|
50
|
+
--#{$prefix}-sys-color-surface-container-highest-rgb: 225, 230, 229;
|
|
51
|
+
|
|
52
|
+
--#{$prefix}-sys-color-on-surface: #191D1C;
|
|
53
|
+
--#{$prefix}-sys-color-on-surface-rgb: 25, 29, 28;
|
|
54
|
+
--#{$prefix}-sys-color-on-surface-variant: #404847;
|
|
55
|
+
--#{$prefix}-sys-color-on-surface-variant-rgb: 64, 72, 71;
|
|
56
|
+
|
|
57
|
+
--#{$prefix}-sys-color-outline: #6E7978;
|
|
58
|
+
--#{$prefix}-sys-color-outline-rgb: 110, 121, 120;
|
|
59
|
+
--#{$prefix}-sys-color-outline-variant: #C1CCCB;
|
|
60
|
+
--#{$prefix}-sys-color-outline-variant-rgb: 193, 204, 203;
|
|
61
|
+
|
|
62
|
+
// Include status colors for light theme
|
|
63
|
+
@include status-colors-light();
|
|
64
|
+
|
|
65
|
+
&[data-theme-mode="dark"] {
|
|
66
|
+
// Key colors for dark mode
|
|
67
|
+
--#{$prefix}-sys-color-primary: #85CFC6; // Lighter teal
|
|
68
|
+
--#{$prefix}-sys-color-primary-rgb: 133, 207, 198;
|
|
69
|
+
--#{$prefix}-sys-color-on-primary: #003E36;
|
|
70
|
+
--#{$prefix}-sys-color-on-primary-rgb: 0, 62, 54;
|
|
71
|
+
--#{$prefix}-sys-color-primary-container: #005349;
|
|
72
|
+
--#{$prefix}-sys-color-primary-container-rgb: 0, 83, 73;
|
|
73
|
+
--#{$prefix}-sys-color-on-primary-container: #B2DFDB;
|
|
74
|
+
--#{$prefix}-sys-color-on-primary-container-rgb: 178, 223, 219;
|
|
75
|
+
|
|
76
|
+
--#{$prefix}-sys-color-secondary: #FFB68D; // Lighter caramel
|
|
77
|
+
--#{$prefix}-sys-color-secondary-rgb: 255, 182, 141;
|
|
78
|
+
--#{$prefix}-sys-color-on-secondary: #5D3726;
|
|
79
|
+
--#{$prefix}-sys-color-on-secondary-rgb: 93, 55, 38;
|
|
80
|
+
--#{$prefix}-sys-color-secondary-container: #7D4F3A;
|
|
81
|
+
--#{$prefix}-sys-color-secondary-container-rgb: 125, 79, 58;
|
|
82
|
+
--#{$prefix}-sys-color-on-secondary-container: #FFD8C2;
|
|
83
|
+
--#{$prefix}-sys-color-on-secondary-container-rgb: 255, 216, 194;
|
|
84
|
+
|
|
85
|
+
--#{$prefix}-sys-color-tertiary: #A0CCC2; // Lighter muted teal
|
|
86
|
+
--#{$prefix}-sys-color-tertiary-rgb: 160, 204, 194;
|
|
87
|
+
--#{$prefix}-sys-color-on-tertiary: #1A463E;
|
|
88
|
+
--#{$prefix}-sys-color-on-tertiary-rgb: 26, 70, 62;
|
|
89
|
+
--#{$prefix}-sys-color-tertiary-container: #315C53;
|
|
90
|
+
--#{$prefix}-sys-color-tertiary-container-rgb: 49, 92, 83;
|
|
91
|
+
--#{$prefix}-sys-color-on-tertiary-container: #CCE6DF;
|
|
92
|
+
--#{$prefix}-sys-color-on-tertiary-container-rgb: 204, 230, 223;
|
|
93
|
+
|
|
94
|
+
// Neutral colors for dark mode
|
|
95
|
+
--#{$prefix}-sys-color-surface: #191D1C;
|
|
96
|
+
--#{$prefix}-sys-color-surface-rgb: 25, 29, 28;
|
|
97
|
+
--#{$prefix}-sys-color-surface-dim: #121615;
|
|
98
|
+
--#{$prefix}-sys-color-surface-dim-rgb: 18, 22, 21;
|
|
99
|
+
--#{$prefix}-sys-color-surface-bright: #363B3A;
|
|
100
|
+
--#{$prefix}-sys-color-surface-bright-rgb: 54, 59, 58;
|
|
101
|
+
--#{$prefix}-sys-color-surface-container-lowest: #0E1211;
|
|
102
|
+
--#{$prefix}-sys-color-surface-container-lowest-rgb: 14, 18, 17;
|
|
103
|
+
--#{$prefix}-sys-color-surface-container-low: #191D1C;
|
|
104
|
+
--#{$prefix}-sys-color-surface-container-low-rgb: 25, 29, 28;
|
|
105
|
+
--#{$prefix}-sys-color-surface-container: #1E2221;
|
|
106
|
+
--#{$prefix}-sys-color-surface-container-rgb: 30, 34, 33;
|
|
107
|
+
--#{$prefix}-sys-color-surface-container-high: #282C2B;
|
|
108
|
+
--#{$prefix}-sys-color-surface-container-high-rgb: 40, 44, 43;
|
|
109
|
+
--#{$prefix}-sys-color-surface-container-highest: #333736;
|
|
110
|
+
--#{$prefix}-sys-color-surface-container-highest-rgb: 51, 55, 54;
|
|
111
|
+
|
|
112
|
+
--#{$prefix}-sys-color-on-surface: #E1E3E3;
|
|
113
|
+
--#{$prefix}-sys-color-on-surface-rgb: 225, 227, 227;
|
|
114
|
+
--#{$prefix}-sys-color-on-surface-variant: #C1CCCB;
|
|
115
|
+
--#{$prefix}-sys-color-on-surface-variant-rgb: 193, 204, 203;
|
|
116
|
+
|
|
117
|
+
--#{$prefix}-sys-color-outline: #8B9695;
|
|
118
|
+
--#{$prefix}-sys-color-outline-rgb: 139, 150, 149;
|
|
119
|
+
--#{$prefix}-sys-color-outline-variant: #404847;
|
|
120
|
+
--#{$prefix}-sys-color-outline-variant-rgb: 64, 72, 71;
|
|
121
|
+
|
|
122
|
+
// Include status colors for dark theme
|
|
123
|
+
@include status-colors-dark();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
--#{$prefix}-sys-color-outline: #70787D;
|
|
36
36
|
--#{$prefix}-sys-color-outline-variant: #C0C8CC;
|
|
37
37
|
|
|
38
|
+
// Include status colors for light theme
|
|
39
|
+
@include status-colors-light();
|
|
40
|
+
|
|
38
41
|
&[data-theme-mode="dark"] {
|
|
39
42
|
// Key colors
|
|
40
43
|
--#{$prefix}-sys-color-primary: #73D0EE;
|
|
@@ -67,5 +70,8 @@
|
|
|
67
70
|
|
|
68
71
|
--#{$prefix}-sys-color-outline: #8A9297;
|
|
69
72
|
--#{$prefix}-sys-color-outline-variant: #40484C;
|
|
73
|
+
|
|
74
|
+
// Include status colors for dark theme
|
|
75
|
+
@include status-colors-dark();
|
|
70
76
|
}
|
|
71
77
|
}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
// src/components/badge/_styles.scss
|
|
2
|
-
@use '../../styles/abstract/base' as base;
|
|
3
|
-
@use '../../styles/abstract/variables' as v;
|
|
4
|
-
@use '../../styles/abstract/functions' as f;
|
|
5
|
-
@use '../../styles/abstract/mixins' as m;
|
|
6
|
-
@use '../../styles/abstract/theme' as t;
|
|
7
|
-
|
|
8
|
-
$component: '#{base.$prefix}-badge';
|
|
9
|
-
|
|
10
|
-
.#{$component} {
|
|
11
|
-
// Base styles
|
|
12
|
-
position: relative;
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
min-width: 20px;
|
|
18
|
-
height: 20px;
|
|
19
|
-
padding: 0 6px;
|
|
20
|
-
border-radius: 10px;
|
|
21
|
-
background-color: t.color('error');
|
|
22
|
-
color: t.color('on-error');
|
|
23
|
-
font-size: 11px;
|
|
24
|
-
font-weight: 500;
|
|
25
|
-
line-height: 1;
|
|
26
|
-
letter-spacing: 0.5px;
|
|
27
|
-
white-space: nowrap;
|
|
28
|
-
text-align: center;
|
|
29
|
-
|
|
30
|
-
// Badge parent wrapper
|
|
31
|
-
&-wrapper {
|
|
32
|
-
position: relative;
|
|
33
|
-
display: inline-flex;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Default positioning (top-right)
|
|
37
|
-
&--positioned {
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: -8px;
|
|
40
|
-
right: -8px;
|
|
41
|
-
transform: translate(50%, -50%);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Dot variant
|
|
45
|
-
&--dot {
|
|
46
|
-
min-width: 8px;
|
|
47
|
-
height: 8px;
|
|
48
|
-
padding: 0;
|
|
49
|
-
border-radius: 50%;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Small size
|
|
53
|
-
&--small {
|
|
54
|
-
min-width: 16px;
|
|
55
|
-
height: 16px;
|
|
56
|
-
font-size: 10px;
|
|
57
|
-
padding: 0 4px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Large size
|
|
61
|
-
&--large {
|
|
62
|
-
min-width: 24px;
|
|
63
|
-
height: 24px;
|
|
64
|
-
font-size: 12px;
|
|
65
|
-
padding: 0 8px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Position variants
|
|
69
|
-
&--top-left {
|
|
70
|
-
top: 0;
|
|
71
|
-
left: 0;
|
|
72
|
-
transform: translate(-50%, -50%);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&--top-right {
|
|
76
|
-
top: 0;
|
|
77
|
-
right: 0;
|
|
78
|
-
transform: translate(50%, -50%);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&--bottom-left {
|
|
82
|
-
bottom: 0;
|
|
83
|
-
left: 0;
|
|
84
|
-
transform: translate(-50%, 50%);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&--bottom-right {
|
|
88
|
-
bottom: 0;
|
|
89
|
-
right: 0;
|
|
90
|
-
transform: translate(50%, 50%);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Color variants
|
|
94
|
-
&--primary {
|
|
95
|
-
background-color: t.color('primary');
|
|
96
|
-
color: t.color('on-primary');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&--secondary {
|
|
100
|
-
background-color: t.color('secondary');
|
|
101
|
-
color: t.color('on-secondary');
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&--tertiary {
|
|
105
|
-
background-color: t.color('tertiary');
|
|
106
|
-
color: t.color('on-tertiary');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&--error {
|
|
110
|
-
background-color: t.color('error');
|
|
111
|
-
color: t.color('on-error');
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&--success {
|
|
115
|
-
background-color: t.color('success');
|
|
116
|
-
color: t.color('on-success');
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&--warning {
|
|
120
|
-
background-color: t.color('warning');
|
|
121
|
-
color: t.color('on-warning');
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&--info {
|
|
125
|
-
background-color: t.color('info');
|
|
126
|
-
color: t.color('on-info');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Outline variant
|
|
130
|
-
&--outlined {
|
|
131
|
-
background-color: transparent;
|
|
132
|
-
border: 1px solid currentColor;
|
|
133
|
-
|
|
134
|
-
&.#{$component}--primary {
|
|
135
|
-
color: t.color('primary');
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&.#{$component}--secondary {
|
|
139
|
-
color: t.color('secondary');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&.#{$component}--tertiary {
|
|
143
|
-
color: t.color('tertiary');
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&.#{$component}--error {
|
|
147
|
-
color: t.color('error');
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
&.#{$component}--success {
|
|
151
|
-
color: t.color('success');
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&.#{$component}--warning {
|
|
155
|
-
color: t.color('warning');
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&.#{$component}--info {
|
|
159
|
-
color: t.color('info');
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Max value handling
|
|
164
|
-
&--max {
|
|
165
|
-
&::after {
|
|
166
|
-
content: '+';
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// Invisible
|
|
171
|
-
&--invisible {
|
|
172
|
-
display: none;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// src/components/badge/constants.ts
|
|
2
|
-
|
|
3
|
-
export const BADGE_VARIANTS = {
|
|
4
|
-
STANDARD: 'standard',
|
|
5
|
-
DOT: 'dot',
|
|
6
|
-
OUTLINED: 'outlined'
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const BADGE_SIZES = {
|
|
10
|
-
SMALL: 'small',
|
|
11
|
-
MEDIUM: 'medium',
|
|
12
|
-
LARGE: 'large'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const BADGE_COLORS = {
|
|
16
|
-
PRIMARY: 'primary',
|
|
17
|
-
SECONDARY: 'secondary',
|
|
18
|
-
TERTIARY: 'tertiary',
|
|
19
|
-
ERROR: 'error',
|
|
20
|
-
SUCCESS: 'success',
|
|
21
|
-
WARNING: 'warning',
|
|
22
|
-
INFO: 'info'
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const BADGE_POSITIONS = {
|
|
26
|
-
TOP_RIGHT: 'top-right',
|
|
27
|
-
TOP_LEFT: 'top-left',
|
|
28
|
-
BOTTOM_RIGHT: 'bottom-right',
|
|
29
|
-
BOTTOM_LEFT: 'bottom-left'
|
|
30
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// src/components/card/constants.ts
|
|
2
|
-
|
|
3
|
-
import { CardVariant, CardElevation } from './types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Card variant types following Material Design 3
|
|
7
|
-
* @enum {string}
|
|
8
|
-
*/
|
|
9
|
-
export const CARD_VARIANTS = {
|
|
10
|
-
/** Elevated card with shadow */
|
|
11
|
-
ELEVATED: CardVariant.ELEVATED,
|
|
12
|
-
/** Filled card with higher surface container color */
|
|
13
|
-
FILLED: CardVariant.FILLED,
|
|
14
|
-
/** Outlined card with border */
|
|
15
|
-
OUTLINED: CardVariant.OUTLINED
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Card elevation levels based on MD3 guidelines
|
|
20
|
-
* Uses the MTRL elevation system values
|
|
21
|
-
* @enum {number}
|
|
22
|
-
*/
|
|
23
|
-
export const CARD_ELEVATIONS = {
|
|
24
|
-
/** No elevation (for filled and outlined variants) */
|
|
25
|
-
LEVEL0: CardElevation.LEVEL0,
|
|
26
|
-
/** Default elevation for elevated cards */
|
|
27
|
-
LEVEL1: CardElevation.LEVEL1,
|
|
28
|
-
/** Elevation for hovered state */
|
|
29
|
-
LEVEL2: CardElevation.LEVEL2,
|
|
30
|
-
/** Elevation for dragged state */
|
|
31
|
-
LEVEL4: CardElevation.LEVEL4
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Card validation schema
|
|
36
|
-
* @const {Object}
|
|
37
|
-
*/
|
|
38
|
-
export const CARD_SCHEMA = {
|
|
39
|
-
variant: {
|
|
40
|
-
type: 'string',
|
|
41
|
-
enum: Object.values(CARD_VARIANTS),
|
|
42
|
-
default: CARD_VARIANTS.ELEVATED
|
|
43
|
-
},
|
|
44
|
-
interactive: {
|
|
45
|
-
type: 'boolean',
|
|
46
|
-
default: false
|
|
47
|
-
},
|
|
48
|
-
fullWidth: {
|
|
49
|
-
type: 'boolean',
|
|
50
|
-
default: false
|
|
51
|
-
},
|
|
52
|
-
clickable: {
|
|
53
|
-
type: 'boolean',
|
|
54
|
-
default: false
|
|
55
|
-
},
|
|
56
|
-
draggable: {
|
|
57
|
-
type: 'boolean',
|
|
58
|
-
default: false
|
|
59
|
-
},
|
|
60
|
-
class: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
required: false
|
|
63
|
-
},
|
|
64
|
-
headerConfig: {
|
|
65
|
-
type: 'object',
|
|
66
|
-
required: false
|
|
67
|
-
},
|
|
68
|
-
contentConfig: {
|
|
69
|
-
type: 'object',
|
|
70
|
-
required: false
|
|
71
|
-
},
|
|
72
|
-
actionsConfig: {
|
|
73
|
-
type: 'object',
|
|
74
|
-
required: false
|
|
75
|
-
},
|
|
76
|
-
mediaConfig: {
|
|
77
|
-
type: 'object',
|
|
78
|
-
required: false
|
|
79
|
-
},
|
|
80
|
-
aria: {
|
|
81
|
-
type: 'object',
|
|
82
|
-
required: false
|
|
83
|
-
}
|
|
84
|
-
};
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
// src/components/dialog/_styles.scss
|
|
2
|
-
@use '../../styles/abstract/base' as base;
|
|
3
|
-
@use '../../styles/abstract/variables' as v;
|
|
4
|
-
@use '../../styles/abstract/functions' as f;
|
|
5
|
-
@use '../../styles/abstract/mixins' as m;
|
|
6
|
-
@use '../../styles/abstract/theme' as t;
|
|
7
|
-
|
|
8
|
-
$component: '#{base.$prefix}-dialog';
|
|
9
|
-
|
|
10
|
-
// Dialog overlay - covers the entire screen
|
|
11
|
-
.#{$component}-overlay {
|
|
12
|
-
position: fixed;
|
|
13
|
-
top: 0;
|
|
14
|
-
left: 0;
|
|
15
|
-
right: 0;
|
|
16
|
-
bottom: 0;
|
|
17
|
-
background-color: t.alpha('scrim', 0.32);
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
z-index: 1000;
|
|
22
|
-
padding: 24px;
|
|
23
|
-
opacity: 0;
|
|
24
|
-
visibility: hidden;
|
|
25
|
-
transition: opacity 0.15s ease, visibility 0s linear 0.15s;
|
|
26
|
-
overflow-y: auto;
|
|
27
|
-
|
|
28
|
-
&--visible {
|
|
29
|
-
opacity: 1;
|
|
30
|
-
visibility: visible;
|
|
31
|
-
transition: opacity 0.15s ease, visibility 0s linear;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Dialog container
|
|
36
|
-
.#{$component} {
|
|
37
|
-
position: relative;
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
min-width: 280px;
|
|
41
|
-
max-width: 90vw;
|
|
42
|
-
width: fit-content;
|
|
43
|
-
max-height: calc(100vh - 48px);
|
|
44
|
-
border-radius: 28px;
|
|
45
|
-
background-color: t.color('surface-container-high');
|
|
46
|
-
color: t.color('on-surface');
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
box-sizing: border-box;
|
|
49
|
-
@include m.elevation(3);
|
|
50
|
-
transform: scale(0.8);
|
|
51
|
-
opacity: 0;
|
|
52
|
-
transition: transform 0.15s ease, opacity 0.15s ease;
|
|
53
|
-
|
|
54
|
-
&--visible {
|
|
55
|
-
transform: scale(1);
|
|
56
|
-
opacity: 1;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Fullscreen variant
|
|
60
|
-
&--fullscreen {
|
|
61
|
-
width: 100vw;
|
|
62
|
-
height: 100vh;
|
|
63
|
-
max-width: 100vw;
|
|
64
|
-
max-height: 100vh;
|
|
65
|
-
border-radius: 0;
|
|
66
|
-
margin: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Fullwidth variant
|
|
70
|
-
&--fullwidth {
|
|
71
|
-
width: 100%;
|
|
72
|
-
max-width: 560px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Dialog header
|
|
76
|
-
&-header {
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: flex-start;
|
|
79
|
-
padding: 24px 24px 16px;
|
|
80
|
-
|
|
81
|
-
&-content {
|
|
82
|
-
flex: 1;
|
|
83
|
-
min-width: 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&-title {
|
|
87
|
-
@include m.typography('headline-small');
|
|
88
|
-
color: t.color('on-surface');
|
|
89
|
-
margin: 0;
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
text-overflow: ellipsis;
|
|
92
|
-
white-space: nowrap;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&-subtitle {
|
|
96
|
-
@include m.typography('body-medium');
|
|
97
|
-
color: t.color('on-surface-variant');
|
|
98
|
-
margin: 4px 0 0;
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
text-overflow: ellipsis;
|
|
101
|
-
white-space: nowrap;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&-close {
|
|
105
|
-
margin: -8px -8px -8px 8px;
|
|
106
|
-
padding: 8px;
|
|
107
|
-
border: none;
|
|
108
|
-
background: transparent;
|
|
109
|
-
cursor: pointer;
|
|
110
|
-
display: flex;
|
|
111
|
-
align-items: center;
|
|
112
|
-
justify-content: center;
|
|
113
|
-
border-radius: 50%;
|
|
114
|
-
color: t.color('on-surface-variant');
|
|
115
|
-
|
|
116
|
-
&:hover {
|
|
117
|
-
background-color: t.alpha('on-surface', 0.08);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&:active {
|
|
121
|
-
background-color: t.alpha('on-surface', 0.12);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
svg {
|
|
125
|
-
width: 24px;
|
|
126
|
-
height: 24px;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Dialog content
|
|
132
|
-
&-content {
|
|
133
|
-
flex: 1 1 auto;
|
|
134
|
-
padding: 0 24px;
|
|
135
|
-
overflow-y: auto;
|
|
136
|
-
-webkit-overflow-scrolling: touch;
|
|
137
|
-
@include m.typography('body-medium');
|
|
138
|
-
color: t.color('on-surface-variant');
|
|
139
|
-
|
|
140
|
-
&:first-child {
|
|
141
|
-
padding-top: 24px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&:last-child {
|
|
145
|
-
padding-bottom: 24px;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Dialog footer
|
|
150
|
-
&-footer {
|
|
151
|
-
display: flex;
|
|
152
|
-
flex-wrap: wrap;
|
|
153
|
-
align-items: center;
|
|
154
|
-
justify-content: flex-end;
|
|
155
|
-
padding: 16px 24px 24px;
|
|
156
|
-
gap: 8px;
|
|
157
|
-
|
|
158
|
-
&--left {
|
|
159
|
-
justify-content: flex-start;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
&--center {
|
|
163
|
-
justify-content: center;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
&--space-between {
|
|
167
|
-
justify-content: space-between;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
button {
|
|
171
|
-
margin: 0;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Size variants
|
|
176
|
-
&--small {
|
|
177
|
-
max-width: 400px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
&--medium {
|
|
181
|
-
max-width: 560px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
&--large {
|
|
185
|
-
max-width: 90vw;
|
|
186
|
-
width: 800px;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// Animation variants
|
|
190
|
-
&--slide-up {
|
|
191
|
-
transform: translateY(20px) scale(1);
|
|
192
|
-
|
|
193
|
-
&.#{$component}--visible {
|
|
194
|
-
transform: translateY(0) scale(1);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&--slide-down {
|
|
199
|
-
transform: translateY(-20px) scale(1);
|
|
200
|
-
|
|
201
|
-
&.#{$component}--visible {
|
|
202
|
-
transform: translateY(0) scale(1);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&--fade {
|
|
207
|
-
transform: scale(1);
|
|
208
|
-
|
|
209
|
-
&.#{$component}--visible {
|
|
210
|
-
transform: scale(1);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|