material-inspired-component-library 8.1.0 → 9.0.0

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.
Files changed (284) hide show
  1. package/README.md +106 -18
  2. package/components/README.md +1 -1
  3. package/components/accordion/README.md +6 -6
  4. package/components/alert/README.md +10 -10
  5. package/components/alert/index.scss +27 -52
  6. package/components/appbar/README.md +19 -6
  7. package/components/appbar/index.scss +40 -44
  8. package/components/badge/README.md +12 -10
  9. package/components/badge/index.scss +21 -25
  10. package/components/bottomsheet/README.md +26 -1
  11. package/components/bottomsheet/index.scss +58 -44
  12. package/components/button/README.md +70 -10
  13. package/components/button/_shared.scss +210 -0
  14. package/components/button/index.scss +75 -389
  15. package/components/card/README.md +97 -85
  16. package/components/card/index.scss +46 -65
  17. package/components/checkbox/README.md +25 -14
  18. package/{tools/shapes/check.mjs → components/checkbox/_label.scss} +37 -42
  19. package/components/checkbox/index.scss +66 -66
  20. package/components/chip/README.md +186 -0
  21. package/components/chip/index.scss +285 -0
  22. package/components/datepicker/README.md +79 -0
  23. package/components/datepicker/index.scss +346 -315
  24. package/components/dialog/README.md +20 -10
  25. package/components/dialog/index.scss +55 -66
  26. package/components/divider/README.md +16 -15
  27. package/components/divider/index.scss +9 -25
  28. package/components/iconbutton/README.md +63 -12
  29. package/components/iconbutton/index.scss +142 -303
  30. package/components/list/README.md +89 -156
  31. package/components/list/index.scss +34 -36
  32. package/components/menu/README.md +81 -155
  33. package/components/menu/index.scss +52 -58
  34. package/components/navigationbar/README.md +108 -0
  35. package/components/navigationbar/index.scss +185 -0
  36. package/components/navigationrail/README.md +62 -37
  37. package/components/navigationrail/_navitem.scss +96 -0
  38. package/components/navigationrail/index.scss +78 -132
  39. package/components/progressindicator/README.md +83 -47
  40. package/components/progressindicator/index.scss +622 -172
  41. package/components/radio/README.md +11 -9
  42. package/components/radio/index.scss +36 -33
  43. package/components/select/README.md +12 -7
  44. package/components/select/index.scss +26 -34
  45. package/components/shapes/README.md +3 -3
  46. package/components/shapes/index.scss +0 -1
  47. package/components/sidesheet/README.md +21 -9
  48. package/components/sidesheet/index.scss +38 -46
  49. package/components/slider/README.md +21 -0
  50. package/components/slider/index.scss +108 -139
  51. package/components/snackbar/README.md +32 -35
  52. package/components/snackbar/index.scss +10 -22
  53. package/components/stepper/README.md +14 -7
  54. package/components/stepper/index.scss +58 -39
  55. package/components/switch/README.md +22 -15
  56. package/components/switch/index.scss +68 -60
  57. package/components/textfield/README.md +48 -5
  58. package/components/textfield/index.scss +192 -248
  59. package/components/timepicker/README.md +53 -23
  60. package/components/timepicker/index.scss +110 -128
  61. package/dist/alert.css +1 -1
  62. package/dist/alert.js +1 -1
  63. package/dist/appbar.css +1 -1
  64. package/dist/appbar.js +1 -1
  65. package/dist/badge.css +1 -1
  66. package/dist/badge.js +1 -1
  67. package/dist/base.css +1 -0
  68. package/dist/base.js +1 -0
  69. package/dist/bottomsheet.css +1 -1
  70. package/dist/bottomsheet.js +1 -1
  71. package/dist/button.css +1 -1
  72. package/dist/button.js +1 -1
  73. package/dist/card.css +1 -1
  74. package/dist/card.js +1 -1
  75. package/dist/checkbox.css +1 -1
  76. package/dist/checkbox.js +1 -1
  77. package/dist/chip.css +1 -0
  78. package/dist/chip.js +1 -0
  79. package/dist/components/button/index.d.ts +1 -1
  80. package/dist/components/iconbutton/index.d.ts +2 -7
  81. package/dist/components/slider/index.d.ts +1 -1
  82. package/dist/components/textfield/index.d.ts +2 -2
  83. package/dist/datepicker.css +1 -1
  84. package/dist/datepicker.js +1 -1
  85. package/dist/dialog.css +1 -1
  86. package/dist/dialog.js +1 -1
  87. package/dist/divider.css +1 -1
  88. package/dist/divider.js +1 -1
  89. package/dist/field.css +1 -0
  90. package/dist/field.js +1 -0
  91. package/dist/foundations/form/index.js +1 -1
  92. package/dist/foundations/runtime.d.ts +15 -0
  93. package/dist/foundations/runtime.js +1 -0
  94. package/dist/iconbutton.css +1 -1
  95. package/dist/iconbutton.js +1 -1
  96. package/dist/layout.css +1 -1
  97. package/dist/layout.js +1 -1
  98. package/dist/list.css +1 -1
  99. package/dist/list.js +1 -1
  100. package/dist/menu.css +1 -1
  101. package/dist/menu.js +1 -1
  102. package/dist/micl.css +1 -1
  103. package/dist/micl.d.ts +14 -5
  104. package/dist/micl.js +1 -1
  105. package/dist/navigationbar.css +1 -0
  106. package/dist/navigationbar.js +1 -0
  107. package/dist/navigationrail.css +1 -1
  108. package/dist/navigationrail.js +1 -1
  109. package/dist/progressindicator.css +1 -1
  110. package/dist/progressindicator.js +1 -1
  111. package/dist/radio.css +1 -1
  112. package/dist/radio.js +1 -1
  113. package/dist/scrollbar.js +1 -1
  114. package/dist/select.css +1 -1
  115. package/dist/select.js +1 -1
  116. package/dist/shapes.css +1 -1
  117. package/dist/shapes.js +1 -1
  118. package/dist/sidesheet.css +1 -1
  119. package/dist/sidesheet.js +1 -1
  120. package/dist/slider.css +1 -1
  121. package/dist/slider.js +1 -1
  122. package/dist/snackbar.css +1 -1
  123. package/dist/snackbar.js +1 -1
  124. package/dist/stepper.css +1 -1
  125. package/dist/stepper.js +1 -1
  126. package/dist/switch.css +1 -1
  127. package/dist/switch.js +1 -1
  128. package/dist/textfield.css +1 -1
  129. package/dist/textfield.js +1 -1
  130. package/dist/timepicker.css +1 -1
  131. package/dist/timepicker.js +1 -1
  132. package/foundations/_index.scss +35 -0
  133. package/foundations/{index.scss → base/index.scss} +21 -56
  134. package/foundations/field/index.scss +37 -0
  135. package/foundations/layout/index.scss +64 -65
  136. package/package.json +23 -9
  137. package/styles/statelayer.scss +20 -5
  138. package/styles.scss +5 -2
  139. package/.claude/settings.local.json +0 -14
  140. package/.editorconfig +0 -12
  141. package/.gitattributes +0 -9
  142. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -35
  143. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  144. package/CLAUDE.md +0 -53
  145. package/CODE_OF_CONDUCT.md +0 -128
  146. package/components/bottomsheet/index.ts +0 -153
  147. package/components/button/index.ts +0 -79
  148. package/components/checkbox/index.ts +0 -148
  149. package/components/datepicker/index.ts +0 -693
  150. package/components/iconbutton/index.ts +0 -77
  151. package/components/list/index.ts +0 -138
  152. package/components/menu/index.ts +0 -145
  153. package/components/navigationrail/index.ts +0 -87
  154. package/components/progressindicator/index.ts +0 -77
  155. package/components/slider/index.ts +0 -149
  156. package/components/snackbar/index.ts +0 -118
  157. package/components/stepper/index.ts +0 -248
  158. package/components/textfield/index.ts +0 -188
  159. package/components/timepicker/index.ts +0 -413
  160. package/dist/components/progressindicator/index.d.ts +0 -6
  161. package/dist/foundations.css +0 -1
  162. package/dist/foundations.js +0 -1
  163. package/docs/accordion.html +0 -344
  164. package/docs/alert.html +0 -177
  165. package/docs/bottomsheet.html +0 -240
  166. package/docs/button.html +0 -290
  167. package/docs/card-awards.webp +0 -0
  168. package/docs/card-cabinet.webp +0 -0
  169. package/docs/card-city.webp +0 -0
  170. package/docs/card-fingerprint.webp +0 -0
  171. package/docs/card-holiday.webp +0 -0
  172. package/docs/card-names.webp +0 -0
  173. package/docs/card.html +0 -159
  174. package/docs/checkbox.html +0 -147
  175. package/docs/datepicker.html +0 -274
  176. package/docs/dialog.html +0 -195
  177. package/docs/divider.html +0 -139
  178. package/docs/docs.css +0 -26
  179. package/docs/docs.js +0 -139
  180. package/docs/iconbutton.html +0 -329
  181. package/docs/index.html +0 -431
  182. package/docs/list.html +0 -310
  183. package/docs/menu.html +0 -574
  184. package/docs/micl.css +0 -1
  185. package/docs/micl.js +0 -1
  186. package/docs/navigationrail.html +0 -138
  187. package/docs/progressindicator.html +0 -288
  188. package/docs/radio.html +0 -123
  189. package/docs/select.html +0 -337
  190. package/docs/shapes.css +0 -1
  191. package/docs/shapes.html +0 -159
  192. package/docs/shapes.js +0 -1
  193. package/docs/sidesheet.html +0 -149
  194. package/docs/slider.html +0 -141
  195. package/docs/snackbar.html +0 -102
  196. package/docs/stepper.html +0 -319
  197. package/docs/switch.html +0 -196
  198. package/docs/textfield.html +0 -208
  199. package/docs/themes/airblue/dark-hc.css +0 -51
  200. package/docs/themes/airblue/dark-mc.css +0 -51
  201. package/docs/themes/airblue/dark.css +0 -51
  202. package/docs/themes/airblue/light-hc.css +0 -51
  203. package/docs/themes/airblue/light-mc.css +0 -51
  204. package/docs/themes/airblue/light.css +0 -51
  205. package/docs/themes/airblue/theme.css +0 -306
  206. package/docs/themes/barnred/dark-hc.css +0 -51
  207. package/docs/themes/barnred/dark-mc.css +0 -51
  208. package/docs/themes/barnred/dark.css +0 -51
  209. package/docs/themes/barnred/light-hc.css +0 -51
  210. package/docs/themes/barnred/light-mc.css +0 -51
  211. package/docs/themes/barnred/light.css +0 -51
  212. package/docs/themes/barnred/theme.css +0 -306
  213. package/docs/themes/citrine/dark-hc.css +0 -51
  214. package/docs/themes/citrine/dark-mc.css +0 -51
  215. package/docs/themes/citrine/dark.css +0 -51
  216. package/docs/themes/citrine/light-hc.css +0 -51
  217. package/docs/themes/citrine/light-mc.css +0 -51
  218. package/docs/themes/citrine/light.css +0 -51
  219. package/docs/themes/citrine/theme.css +0 -306
  220. package/docs/themes/gray/dark-hc.css +0 -51
  221. package/docs/themes/gray/dark-mc.css +0 -51
  222. package/docs/themes/gray/dark.css +0 -51
  223. package/docs/themes/gray/light-hc.css +0 -51
  224. package/docs/themes/gray/light-mc.css +0 -51
  225. package/docs/themes/gray/light.css +0 -51
  226. package/docs/themes/gray/theme.css +0 -306
  227. package/docs/themes/greenery/dark-hc.css +0 -51
  228. package/docs/themes/greenery/dark-mc.css +0 -51
  229. package/docs/themes/greenery/dark.css +0 -51
  230. package/docs/themes/greenery/light-hc.css +0 -51
  231. package/docs/themes/greenery/light-mc.css +0 -51
  232. package/docs/themes/greenery/light.css +0 -51
  233. package/docs/themes/greenery/theme.css +0 -306
  234. package/docs/themes/hermana/dark-hc.css +0 -51
  235. package/docs/themes/hermana/dark-mc.css +0 -51
  236. package/docs/themes/hermana/dark.css +0 -51
  237. package/docs/themes/hermana/light-hc.css +0 -51
  238. package/docs/themes/hermana/light-mc.css +0 -51
  239. package/docs/themes/hermana/light.css +0 -51
  240. package/docs/themes/hermana/theme.css +0 -306
  241. package/docs/themes/illuminating/dark-hc.css +0 -51
  242. package/docs/themes/illuminating/dark-mc.css +0 -51
  243. package/docs/themes/illuminating/dark.css +0 -51
  244. package/docs/themes/illuminating/light-hc.css +0 -51
  245. package/docs/themes/illuminating/light-mc.css +0 -51
  246. package/docs/themes/illuminating/light.css +0 -51
  247. package/docs/themes/illuminating/theme.css +0 -306
  248. package/docs/themes/magenta/dark-hc.css +0 -51
  249. package/docs/themes/magenta/dark-mc.css +0 -51
  250. package/docs/themes/magenta/dark.css +0 -51
  251. package/docs/themes/magenta/light-hc.css +0 -51
  252. package/docs/themes/magenta/light-mc.css +0 -51
  253. package/docs/themes/magenta/light.css +0 -51
  254. package/docs/themes/magenta/theme.css +0 -306
  255. package/docs/themes/mocha/dark-hc.css +0 -51
  256. package/docs/themes/mocha/dark-mc.css +0 -51
  257. package/docs/themes/mocha/dark.css +0 -51
  258. package/docs/themes/mocha/light-hc.css +0 -51
  259. package/docs/themes/mocha/light-mc.css +0 -51
  260. package/docs/themes/mocha/light.css +0 -51
  261. package/docs/themes/mocha/theme.css +0 -306
  262. package/docs/themes/olivegreen/dark-hc.css +0 -51
  263. package/docs/themes/olivegreen/dark-mc.css +0 -51
  264. package/docs/themes/olivegreen/dark.css +0 -51
  265. package/docs/themes/olivegreen/light-hc.css +0 -51
  266. package/docs/themes/olivegreen/light-mc.css +0 -51
  267. package/docs/themes/olivegreen/light.css +0 -51
  268. package/docs/themes/olivegreen/theme.css +0 -306
  269. package/docs/themes/peri/dark-hc.css +0 -51
  270. package/docs/themes/peri/dark-mc.css +0 -51
  271. package/docs/themes/peri/dark.css +0 -51
  272. package/docs/themes/peri/light-hc.css +0 -51
  273. package/docs/themes/peri/light-mc.css +0 -51
  274. package/docs/themes/peri/light.css +0 -51
  275. package/docs/themes/peri/theme.css +0 -306
  276. package/docs/timepicker.html +0 -160
  277. package/foundations/form/index.ts +0 -174
  278. package/foundations/layout/README.md +0 -127
  279. package/intl.d.ts +0 -9
  280. package/micl.ts +0 -221
  281. package/styles/README.md +0 -196
  282. package/tools/shapes/generate.mjs +0 -828
  283. package/tsconfig.json +0 -116
  284. package/webpack.config.js +0 -104
@@ -19,7 +19,6 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
- @use '../../foundations';
23
22
  @use '../../styles/motion';
24
23
  @use '../../styles/shape';
25
24
  @use '../../styles/statelayer';
@@ -33,32 +32,28 @@
33
32
  @include statelayer.token('disabled-state-layer-opacity');
34
33
  @include statelayer.token('focus-indicator-thickness');
35
34
 
36
- @include typography.scale('label-medium');
35
+ @include typography.scale('label-large');
37
36
 
38
37
  @include motion.duration('medium2');
39
38
  @include motion.duration('long2');
40
39
 
41
40
  @mixin slider-track() {
42
- block-size: var(--md-sys-slider-track-height);
43
- border-radius: var(--md-sys-slider-track-radius);
41
+ block-size: var(--_track-height);
42
+ border-radius: var(--_track-shape);
44
43
  background-color: inherit;
45
44
  background-image: linear-gradient(
46
- var(--md-sys-slider-track-direction),
47
- var(--md-sys-color-primary) calc(100% * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min))),
48
- transparent calc(100% * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min))),
49
- var(--md-sys-color-secondary-container) calc(100% * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min))),
50
- var(--md-sys-color-secondary-container) 100%,
51
- transparent
45
+ var(--_direction),
46
+ var(--_active-track-color) var(--_thumb-position),
47
+ transparent var(--_thumb-position) calc(var(--_thumb-position) + 16px),
48
+ var(--_inactive-track-color) calc(var(--_thumb-position) + 16px)
52
49
  );
53
50
  }
54
51
  @mixin slider-track-disabled() {
55
52
  background-image: linear-gradient(
56
- var(--md-sys-slider-track-direction),
57
- color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-sys-state-disabled-state-layer-opacity, 38%), transparent) calc(100% * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min))),
58
- transparent calc(100% * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min))),
59
- color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent) calc(100% * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min))),
60
- color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent) 100%,
61
- transparent
53
+ var(--_direction),
54
+ color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-sys-state-disabled-state-layer-opacity), transparent) var(--_thumb-position),
55
+ transparent var(--_thumb-position) calc(var(--_thumb-position) + 16px),
56
+ color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent) calc(var(--_thumb-position) + 16px)
62
57
  );
63
58
  }
64
59
  @mixin slider-thumb() {
@@ -66,19 +61,18 @@
66
61
  box-sizing: content-box;
67
62
  position: relative;
68
63
  inline-size: 16px;
69
- block-size: var(--md-sys-slider-handle-height);
64
+ block-size: var(--_handle-height);
70
65
  inset: 0;
71
- inset-block-start: calc(-1 * (var(--md-sys-slider-handle-height) - var(--md-sys-slider-track-height) + 8px) / 2);
66
+ inset-block-start: calc(-1 * (var(--_handle-height) - var(--_track-height) + 8px) / 2);
72
67
  padding-block: 4px;
73
68
  border: none;
74
69
  border-radius: 8px;
75
- background-color: inherit;
76
70
  background-image: linear-gradient(
77
- var(--md-sys-slider-track-direction),
71
+ var(--_direction),
78
72
  transparent 0px,
79
- transparent var(--md-sys-slider-thumb-space),
80
- var(--md-sys-color-primary) var(--md-sys-slider-thumb-space),
81
- var(--md-sys-color-primary) 10px,
73
+ transparent var(--_thumb-space),
74
+ var(--_handle-color) var(--_thumb-space),
75
+ var(--_handle-color) 10px,
82
76
  transparent 10px,
83
77
  transparent 16px
84
78
  );
@@ -87,59 +81,96 @@
87
81
  z-index: 2;
88
82
  }
89
83
  @mixin slider-thumb-disabled() {
90
- background-color: inherit;
91
84
  background-image: linear-gradient(
92
- var(--md-sys-slider-track-direction),
85
+ var(--_direction),
93
86
  transparent 0px,
94
- transparent var(--md-sys-slider-thumb-space),
95
- color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-sys-state-disabled-state-layer-opacity, 38%), var(--md-sys-color-surface)) var(--md-sys-slider-thumb-space),
96
- color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-sys-state-disabled-state-layer-opacity, 38%), var(--md-sys-color-surface)) 10px,
87
+ transparent var(--_thumb-space),
88
+ color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-sys-state-disabled-state-layer-opacity), var(--md-sys-color-surface)) var(--_thumb-space),
89
+ color-mix(in srgb, var(--md-sys-color-on-surface) var(--md-sys-state-disabled-state-layer-opacity), var(--md-sys-color-surface)) 10px,
97
90
  transparent 10px,
98
91
  transparent 16px
99
92
  );
100
93
  cursor: default;
101
94
  }
95
+ // The 4px wide handle narrows to 2px while pressed.
96
+ @mixin slider-thumb-active() {
97
+ background-image: linear-gradient(
98
+ var(--_direction),
99
+ transparent 0px,
100
+ transparent calc(var(--_thumb-space) + 1px),
101
+ var(--_handle-color) calc(var(--_thumb-space) + 1px),
102
+ var(--_handle-color) calc(var(--_thumb-space) + 3px),
103
+ transparent calc(var(--_thumb-space) + 3px),
104
+ transparent calc(2 * var(--_thumb-space) + 4px)
105
+ );
106
+ outline: none;
107
+ cursor: grabbing;
108
+ }
109
+ @mixin slider-tip() {
110
+ @include typography.label-large;
111
+ --_tip-space: 4px;
112
+
113
+ content: var(--micl-slider-tip);
114
+ box-sizing: border-box;
115
+ position: absolute;
116
+ inline-size: fit-content;
117
+ min-inline-size: 48px;
118
+ block-size: 40px;
119
+ inset: 0;
120
+ inset-block-start: calc(-1 * ((var(--_handle-height) - var(--_track-height)) / 2) - 40px - var(--_tip-space));
121
+ inset-inline-start: calc(-16px + (100% - 16px) * var(--_fraction));
122
+ padding-block: 12px;
123
+ padding-inline: 16px;
124
+ border-radius: 20px;
125
+ background-color: var(--md-comp-slider-value-indicator-container-color, var(--md-sys-color-inverse-surface));
126
+ color: var(--md-comp-slider-value-indicator-label-text-color, var(--md-sys-color-inverse-on-surface));
127
+ text-align: center;
128
+ opacity: 0;
129
+ z-index: 3;
130
+ transition: opacity var(--md-sys-motion-duration-long2) motion.$md-sys-motion-easing-emphasized-decelerate;
131
+ }
102
132
  @mixin slider-progress() {
103
- block-size: var(--md-sys-slider-track-height);
133
+ block-size: var(--_track-height);
104
134
  }
105
135
 
106
136
  input[type=range].micl-slider-xs {
107
- --md-sys-slider-handle-height: 44px;
108
- --md-sys-slider-track-height: 16px;
109
- --md-sys-slider-track-radius: var(--md-sys-shape-corner-small);
137
+ --_handle-height: var(--md-comp-slider-handle-height, 44px);
138
+ --_track-height: var(--md-comp-slider-track-height, 16px);
139
+ --_track-shape: var(--md-comp-slider-track-shape, var(--md-sys-shape-corner-small));
110
140
  }
111
141
  input[type=range].micl-slider-s {
112
- --md-sys-slider-handle-height: 44px;
113
- --md-sys-slider-track-height: 24px;
114
- --md-sys-slider-track-radius: var(--md-sys-shape-corner-small);
142
+ --_handle-height: var(--md-comp-slider-handle-height, 44px);
143
+ --_track-height: var(--md-comp-slider-track-height, 24px);
144
+ --_track-shape: var(--md-comp-slider-track-shape, var(--md-sys-shape-corner-small));
115
145
  }
116
146
  input[type=range].micl-slider-m {
117
- --md-sys-slider-handle-height: 52px;
118
- --md-sys-slider-track-height: 40px;
119
- --md-sys-slider-track-radius: var(--md-sys-shape-corner-medium);
147
+ --_handle-height: var(--md-comp-slider-handle-height, 52px);
148
+ --_track-height: var(--md-comp-slider-track-height, 40px);
149
+ --_track-shape: var(--md-comp-slider-track-shape, var(--md-sys-shape-corner-medium));
120
150
  }
121
151
  input[type=range].micl-slider-l {
122
- --md-sys-slider-handle-height: 68px;
123
- --md-sys-slider-track-height: 56px;
124
- --md-sys-slider-track-radius: var(--md-sys-shape-corner-large);
152
+ --_handle-height: var(--md-comp-slider-handle-height, 68px);
153
+ --_track-height: var(--md-comp-slider-track-height, 56px);
154
+ --_track-shape: var(--md-comp-slider-track-shape, var(--md-sys-shape-corner-large));
125
155
  }
126
156
  input[type=range].micl-slider-xl {
127
- --md-sys-slider-handle-height: 108px;
128
- --md-sys-slider-track-height: 96px;
129
- --md-sys-slider-track-radius: var(--md-sys-shape-corner-extra-large);
157
+ --_handle-height: var(--md-comp-slider-handle-height, 108px);
158
+ --_track-height: var(--md-comp-slider-track-height, 96px);
159
+ --_track-shape: var(--md-comp-slider-track-shape, var(--md-sys-shape-corner-extra-large));
130
160
  }
131
161
 
132
- input[type=range].micl-slider-xs,
133
- input[type=range].micl-slider-s,
134
- input[type=range].micl-slider-m,
135
- input[type=range].micl-slider-l,
136
- input[type=range].micl-slider-xl {
137
- --md-sys-slider-thumb-space: 6px;
138
- --md-sys-slider-track-direction: to right;
162
+ input[type=range][class*=micl-slider-] {
163
+ --_thumb-space: 6px;
164
+ --_direction: to right;
165
+ --_fraction: calc((var(--micl-slider-value) - var(--micl-slider-min)) / (var(--micl-slider-max) - var(--micl-slider-min)));
166
+ --_thumb-position: calc(var(--_fraction) * (100% - 16px));
167
+ --_active-track-color: var(--md-comp-slider-active-track-color, var(--md-sys-color-primary));
168
+ --_inactive-track-color: var(--md-comp-slider-inactive-track-color, var(--md-sys-color-secondary-container));
169
+ --_handle-color: var(--md-comp-slider-handle-color, var(--md-sys-color-primary));
139
170
 
140
171
  appearance: none;
141
172
  position: relative;
142
- block-size: var(--md-sys-slider-track-height);
173
+ block-size: var(--_track-height);
143
174
  margin: 0;
144
175
  outline: none;
145
176
  color: var(--md-sys-color-surface-container-low);
@@ -152,37 +183,17 @@ input[type=range].micl-slider-xl {
152
183
  position: absolute;
153
184
  inline-size: 100%;
154
185
  max-inline-size: 100%;
155
- block-size: var(--md-sys-slider-track-height);
156
- line-height: var(--md-sys-slider-track-height);
186
+ block-size: var(--_track-height);
187
+ line-height: var(--_track-height);
157
188
  padding: 0 4px;
158
189
  inset: 0;
159
- color: var(--md-sys-color-on-primary);
190
+ color: var(--md-comp-slider-stop-indicator-color, var(--md-sys-color-on-primary));
160
191
  mix-blend-mode: difference;
161
192
  text-align: end;
162
193
  text-wrap-mode: nowrap;
163
194
  }
164
195
  &::after {
165
- @include typography.label-medium;
166
- --md-sys-slider-tip-space: 4px;
167
-
168
- content: var(--md-sys-slider-tip);
169
- box-sizing: border-box;
170
- position: absolute;
171
- inline-size: fit-content;
172
- min-inline-size: 48px;
173
- block-size: 40px;
174
- inset: 0;
175
- inset-block-start: calc(-1 * ((var(--md-sys-slider-handle-height) - var(--md-sys-slider-track-height)) / 2) - 40px - var(--md-sys-slider-tip-space));
176
- inset-inline-start: calc(-16px + (100% - 16px) * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min)));
177
- padding-block: 12px;
178
- padding-inline: 16px;
179
- border-radius: 20px;
180
- background-color: var(--md-sys-color-inverse-surface);
181
- color: var(--md-sys-color-inverse-on-surface);
182
- text-align: center;
183
- opacity: 0;
184
- z-index: 3;
185
- transition: opacity var(--md-sys-motion-duration-long2) motion.$md-sys-motion-easing-emphasized-decelerate;
196
+ @include slider-tip;
186
197
  }
187
198
  &::-webkit-slider-container {
188
199
  background-color: inherit;
@@ -217,12 +228,12 @@ input[type=range].micl-slider-xl {
217
228
  }
218
229
  }
219
230
  &.micl-slider--vertical {
220
- --md-sys-slider-track-direction: to top;
231
+ --_direction: to top;
221
232
 
222
233
  writing-mode: sideways-lr;
223
234
 
224
235
  &::after {
225
- --md-sys-slider-tip-space: 8px;
236
+ --_tip-space: 8px;
226
237
 
227
238
  transform: rotate(90deg);
228
239
  }
@@ -236,38 +247,18 @@ input[type=range].micl-slider-xl {
236
247
  }
237
248
  &:focus-visible {
238
249
  &::-webkit-slider-thumb {
239
- outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
250
+ outline: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-color-secondary);
240
251
  }
241
252
  &::-moz-range-thumb {
242
- outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
253
+ outline: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-color-secondary);
243
254
  }
244
255
  }
245
256
  &:active {
246
257
  &::-webkit-slider-thumb {
247
- background-image: linear-gradient(
248
- var(--md-sys-slider-track-direction),
249
- transparent 0px,
250
- transparent calc(var(--md-sys-slider-thumb-space) + 1px),
251
- var(--md-sys-color-primary) calc(var(--md-sys-slider-thumb-space) + 1px),
252
- var(--md-sys-color-primary) calc(var(--md-sys-slider-thumb-space) + 3px),
253
- transparent calc(var(--md-sys-slider-thumb-space) + 3px),
254
- transparent calc(2 * var(--md-sys-slider-thumb-space) + 4px)
255
- );
256
- outline: none;
257
- cursor: grabbing;
258
+ @include slider-thumb-active;
258
259
  }
259
260
  &::-moz-range-thumb {
260
- background-image: linear-gradient(
261
- var(--md-sys-slider-track-direction),
262
- transparent 0px,
263
- transparent calc(var(--md-sys-slider-thumb-space) + 1px),
264
- var(--md-sys-color-primary) calc(var(--md-sys-slider-thumb-space) + 1px),
265
- var(--md-sys-color-primary) calc(var(--md-sys-slider-thumb-space) + 3px),
266
- transparent calc(var(--md-sys-slider-thumb-space) + 3px),
267
- transparent calc(2 * var(--md-sys-slider-thumb-space) + 4px)
268
- );
269
- outline: none;
270
- cursor: grabbing;
261
+ @include slider-thumb-active;
271
262
  }
272
263
  }
273
264
  }
@@ -301,33 +292,17 @@ input[type=range].micl-slider-xl {
301
292
  }
302
293
  }
303
294
 
295
+ // Gecko does not render generated content on <input>: the value indicator is
296
+ // repeated on the container, which mirrors the slider variables (see index.ts).
304
297
  @supports (-moz-appearance:none) {
305
298
  .micl-slider__container {
306
299
  &:has(> input[type=range]) {
300
+ --_fraction: calc((var(--micl-slider-value) - var(--micl-slider-min)) / (var(--micl-slider-max) - var(--micl-slider-min)));
301
+
307
302
  position: relative;
308
303
 
309
304
  &::after {
310
- @include typography.label-medium;
311
- --md-sys-slider-tip-space: 4px;
312
-
313
- content: var(--md-sys-slider-tip);
314
- box-sizing: border-box;
315
- position: absolute;
316
- inline-size: fit-content;
317
- min-inline-size: 48px;
318
- block-size: 40px;
319
- inset: 0;
320
- inset-block-start: calc(-1 * ((var(--md-sys-slider-handle-height) - var(--md-sys-slider-track-height)) / 2) - 40px - var(--md-sys-slider-tip-space));
321
- inset-inline-start: calc(-16px + (100% - 16px) * (var(--md-sys-slider-value) - var(--md-sys-slider-min)) / (var(--md-sys-slider-max) - var(--md-sys-slider-min)));
322
- padding-block: 12px;
323
- padding-inline: 16px;
324
- border-radius: 20px;
325
- background-color: var(--md-sys-color-inverse-surface);
326
- color: var(--md-sys-color-inverse-on-surface);
327
- text-align: center;
328
- opacity: 0;
329
- z-index: 3;
330
- transition: opacity var(--md-sys-motion-duration-long2) motion.$md-sys-motion-easing-emphasized-decelerate;
305
+ @include slider-tip;
331
306
  }
332
307
  }
333
308
  &:has(> input[type=range]:not(:disabled):active)::after,
@@ -336,31 +311,25 @@ input[type=range].micl-slider-xl {
336
311
  opacity: 1;
337
312
  }
338
313
  &:has(> input[type=range].micl-slider--vertical) {
339
- --md-sys-slider-track-direction: to top;
314
+ --_direction: to top;
340
315
  writing-mode: sideways-lr;
341
316
 
342
317
  &::after {
343
- --md-sys-slider-tip-space: 8px;
318
+ --_tip-space: 8px;
344
319
  transform: rotate(90deg);
345
320
  }
346
321
  }
347
322
  }
348
323
  }
349
324
 
350
- [dir=rtl] {
351
- input[type=range].micl-slider--vertical,
352
- .micl-slider__container:has(> input[type=range].micl-slider--vertical) {
353
- writing-mode: sideways-rl;
325
+ input[type=range].micl-slider--vertical:dir(rtl),
326
+ .micl-slider__container:dir(rtl):has(> input[type=range].micl-slider--vertical) {
327
+ writing-mode: sideways-rl;
354
328
 
355
- &::after {
356
- transform: rotate(-90deg);
357
- }
358
- }
359
- input[type=range].micl-slider-xs:not(.micl-slider--vertical),
360
- input[type=range].micl-slider-s:not(.micl-slider--vertical),
361
- input[type=range].micl-slider-m:not(.micl-slider--vertical),
362
- input[type=range].micl-slider-l:not(.micl-slider--vertical),
363
- input[type=range].micl-slider-xl:not(.micl-slider--vertical) {
364
- --md-sys-slider-track-direction: to left;
329
+ &::after {
330
+ transform: rotate(-90deg);
365
331
  }
366
332
  }
333
+ input[type=range][class*=micl-slider-]:dir(rtl):not(.micl-slider--vertical) {
334
+ --_direction: to left;
335
+ }
@@ -18,6 +18,8 @@ The `data-micldelay` attribute contains the number of milliseconds the snackbar
18
18
  Import the snackbar styles into your project:
19
19
 
20
20
  ```CSS
21
+ @use "material-inspired-component-library/dist/button";
22
+ @use "material-inspired-component-library/dist/iconbutton";
21
23
  @use "material-inspired-component-library/dist/snackbar";
22
24
  ```
23
25
 
@@ -68,41 +70,36 @@ Add the `micl-snackbar--two` class to the snackbar to increase its height so tha
68
70
  </div>
69
71
  ```
70
72
 
71
- The Snackbar component respects the `dir` global attribute, automatically adjusting its layout for right-to-left (RTL) languages when `dir="rtl"` is applied to an ancestor element.
72
-
73
- ## Customizations
74
- You can customize the appearance of the Snackbar component by overriding its global CSS variables. These variables are declared on the `:root` pseudo-class and can be changed on any appropriate parent element to affect its child snackbars.
75
-
76
- | Variable name | Default Value | Description |
77
- | ------------- | ------------- | ----------- |
78
- | --md-comp-snackbar-margin | 24px | The distance between the snackbar and the bottom of the device |
79
- | --md-comp-snackbar-padding | 16px | The inner padding of the snackbar |
80
-
81
- The Snackbar component supports the following CSS variables, as defined in the [Material Design 3 Expressive Snackbar Specification](https://m3.material.io/components/snackbar/specs):
82
-
83
- ```CSS
84
- --md-comp-snackbar-container-color
85
- --md-comp-snackbar-container-elevation
86
- --md-comp-snackbar-container-shape
87
- --md-comp-snackbar-with-single-line-container-height
88
- --md-comp-snackbar-with-two-lines-container-height
89
- --md-comp-snackbar-action-label-text-color
90
- --md-comp-snackbar-icon-size
91
- --md-comp-snackbar-icon-color
92
- --md-comp-snackbar-supporting-text-color
93
- --md-comp-snackbar-action-hover-label-text-color
94
- --md-comp-snackbar-action-focus-label-text-color
95
- --md-comp-snackbar-action-pressed-label-text-color
96
- --md-comp-snackbar-icon-hover-icon-color
97
- --md-comp-snackbar-icon-focus-icon-color
98
- --md-comp-snackbar-icon-pressed-icon-color
99
- --md-comp-snackbar-action-hover-state-layer-color
100
- --md-comp-snackbar-action-hover-state-layer-opacity
101
- --md-comp-snackbar-action-focus-state-layer-color
102
- --md-comp-snackbar-action-focus-state-layer-opacity
103
- --md-comp-snackbar-action-pressed-state-layer-color
104
- --md-comp-snackbar-action-pressed-state-layer-opacity
105
- ```
73
+ The Snackbar component respects the element's computed direction, automatically adjusting its layout for right-to-left (RTL) languages whether the `dir` attribute (including `dir="auto"`) is set on the element itself or inherited from an ancestor.
74
+
75
+ ## Theming
76
+ Each snackbar can be themed with CSS custom properties that follow the Material Design 3 component-token naming convention.
77
+
78
+ | Custom property | Meaning | Default |
79
+ |---|---|---|
80
+ | `--md-comp-snackbar-margin` | The distance between the snackbar and the bottom of the device | `24px` |
81
+ | `--md-comp-snackbar-padding` | The inner padding of the snackbar | `16px` |
82
+ | `--md-comp-snackbar-container-color` | The background color of the snackbar | `--md-sys-color-inverse-surface` |
83
+ | `--md-comp-snackbar-container-elevation` | The shadow (elevation) of the snackbar | `--md-sys-elevation-level3` |
84
+ | `--md-comp-snackbar-container-shape` | The corner rounding of the snackbar | `--md-sys-shape-corner-extra-small` |
85
+ | `--md-comp-snackbar-with-single-line-container-height` | The height of a single-line snackbar | `48px` |
86
+ | `--md-comp-snackbar-with-two-lines-container-height` | The height of a two-line snackbar | `68px` |
87
+ | `--md-comp-snackbar-supporting-text-color` | The text color of the notification | `--md-sys-color-inverse-on-surface` |
88
+ | `--md-comp-snackbar-action-label-text-color` | The label color of the action button | `--md-sys-color-inverse-primary` |
89
+ | `--md-comp-snackbar-action-hover-label-text-color` | The label color of the hovered action button | `--md-sys-color-inverse-primary` |
90
+ | `--md-comp-snackbar-action-focus-label-text-color` | The label color of the focused action button | `--md-sys-color-inverse-primary` |
91
+ | `--md-comp-snackbar-action-pressed-label-text-color` | The label color of the pressed action button | `--md-sys-color-inverse-primary` |
92
+ | `--md-comp-snackbar-icon-size` | The size of the close icon | `24px` |
93
+ | `--md-comp-snackbar-icon-color` | The color of the close icon | `--md-sys-color-inverse-on-surface` |
94
+ | `--md-comp-snackbar-icon-hover-icon-color` | The color of the hovered close icon | `--md-sys-color-inverse-on-surface` |
95
+ | `--md-comp-snackbar-icon-focus-icon-color` | The color of the focused close icon | `--md-sys-color-inverse-on-surface` |
96
+ | `--md-comp-snackbar-icon-pressed-icon-color` | The color of the pressed close icon | `--md-sys-color-inverse-on-surface` |
97
+ | `--md-comp-snackbar-action-hover-state-layer-color` | The state layer tinting the snackbar while hovered (the auto-dismiss timer pauses) | `--md-sys-color-inverse-primary` |
98
+ | `--md-comp-snackbar-action-hover-state-layer-opacity` | The opacity of the hover state layer | `8%` |
99
+ | `--md-comp-snackbar-action-focus-state-layer-color` | The state layer tinting the snackbar while focused | `--md-sys-color-inverse-primary` |
100
+ | `--md-comp-snackbar-action-focus-state-layer-opacity` | The opacity of the focus state layer | `10%` |
101
+ | `--md-comp-snackbar-action-pressed-state-layer-color` | The state layer tinting the snackbar while pressed | `--md-sys-color-inverse-primary` |
102
+ | `--md-comp-snackbar-action-pressed-state-layer-opacity` | The opacity of the pressed state layer | `10%` |
106
103
 
107
104
  **Example: Changing the padding of the snackbar**
108
105
 
@@ -19,7 +19,6 @@
19
19
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
20
  // SOFTWARE.
21
21
 
22
- @use '../../foundations';
23
22
  @use '../../foundations/layout';
24
23
  @use '../../styles/elevation';
25
24
  @use '../../styles/motion';
@@ -38,22 +37,13 @@
38
37
 
39
38
  @include typography.scale('body-medium');
40
39
 
41
- :root {
42
- --md-comp-snackbar-margin: 24px;
43
- --md-comp-snackbar-padding: 16px;
44
- --md-comp-snackbar-dir-factor: 1;
45
- }
46
-
47
- [dir=rtl] {
48
- --md-comp-snackbar-dir-factor: -1;
49
- }
50
-
51
40
  .micl-snackbar {
52
41
  --md-comp-snackbar-motion-spatial: #{motion.$md-sys-motion-expressive-default-spatial};
53
42
  --md-comp-snackbar-motion-duration: #{motion.$md-sys-motion-expressive-default-spatial-duration};
54
43
  --md-comp-snackbar-motion-duration-reverse: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
44
+ --micl-duration: var(--md-comp-snackbar-motion-duration-reverse);
55
45
  --statelayer-color: var(--md-sys-color-inverse-primary);
56
- --statelayer-opacity: 0;
46
+ --statelayer-opacity: 0%;
57
47
 
58
48
  box-sizing: border-box;
59
49
  position: fixed;
@@ -64,13 +54,14 @@
64
54
 
65
55
  block-size: 0;
66
56
  inline-size: max-content;
67
- max-inline-size: min(layout.$md-sys-window-expanded-max, calc(100vw - (2 * var(--md-sys-layout-window-margin))));
57
+ max-inline-size: min(layout.$md-sys-breakpoint-expanded-max, calc(100vw - (2 * var(--md-sys-layout-window-margin))));
68
58
  min-inline-size: 300px;
69
59
 
70
60
  inset: auto;
71
61
  inset-block-end: calc(var(--md-comp-snackbar-margin, 24px) + env(safe-area-inset-bottom));
72
- inset-inline-start: 50%;
73
- margin: 0;
62
+ inset-inline: 0;
63
+ margin-block: 0;
64
+ margin-inline: auto;
74
65
  padding-block: 0;
75
66
  padding-inline: var(--md-comp-snackbar-padding, 16px);
76
67
 
@@ -86,10 +77,9 @@
86
77
 
87
78
  opacity: 0;
88
79
  overflow-y: hidden;
89
- translate: calc(var(--md-comp-snackbar-dir-factor, 1) * -50%);
90
80
 
91
81
  transition:
92
- block-size var(--md-comp-snackbar-motion-duration-reverse) var(--md-comp-snackbar-motion-spatial),
82
+ block-size var(--micl-duration) var(--md-comp-snackbar-motion-spatial),
93
83
  opacity var(--md-comp-snackbar-motion-duration-reverse) linear,
94
84
  display var(--md-comp-snackbar-motion-duration-reverse) linear allow-discrete,
95
85
  overlay var(--md-comp-snackbar-motion-duration-reverse) linear allow-discrete,
@@ -109,12 +99,10 @@
109
99
  }
110
100
 
111
101
  &:popover-open {
102
+ --micl-duration: var(--md-comp-snackbar-motion-duration);
103
+
112
104
  block-size: var(--md-comp-snackbar-with-single-line-container-height, 48px);
113
105
  opacity: 1;
114
- transition:
115
- block-size var(--md-comp-snackbar-motion-duration) var(--md-comp-snackbar-motion-spatial),
116
- opacity var(--md-comp-snackbar-motion-duration-reverse) linear,
117
- --statelayer-opacity var(--md-comp-snackbar-motion-duration) linear;
118
106
 
119
107
  @starting-style {
120
108
  block-size: 0;
@@ -167,7 +155,7 @@
167
155
  }
168
156
  }
169
157
 
170
- @media (max-width: layout.$md-sys-window-compact-max) {
158
+ @media (max-width: layout.$md-sys-breakpoint-compact-max) {
171
159
  .micl-snackbar {
172
160
  inline-size: calc(100vw - (2 * var(--md-sys-layout-window-margin)));
173
161
  min-inline-size: auto;
@@ -32,6 +32,7 @@ To create a basic stepper, use a `<div>` container with the `micl-stepper` class
32
32
  Import the stepper styles into your project:
33
33
 
34
34
  ```CSS
35
+ @use "material-inspired-component-library/dist/button";
35
36
  @use "material-inspired-component-library/dist/stepper";
36
37
  ```
37
38
 
@@ -173,18 +174,24 @@ In this example for a three-step stepper, the **Next** button is hidden on step
173
174
  </div>
174
175
  ```
175
176
 
176
- ## Customizations
177
- You can customize the appearance of the Stepper component by overriding its global CSS variables. These variables are declared on the `:root` pseudo-class and can be changed on any appropriate parent element to affect its child steppers.
177
+ ## Theming
178
+ Each stepper can be themed with CSS custom properties. Set them on any appropriate parent element to affect its child steppers.
178
179
 
179
- | Variable name | Default Value | Description |
180
- | ------------- | ----- | ----------- |
181
- | --md-sys-stepper-counter-style | decimal | The list-style used for the counter number inside the dots in the stepper header |
182
- | --md-sys-stepper-dot-size | 12px | Controls the size of each progress dot |
180
+ | Custom property | Meaning | Default |
181
+ |---|---|---|
182
+ | `--md-comp-stepper-counter-style` | The list-style used for the counter number inside the dots of the stepper header | `decimal` |
183
+ | `--md-comp-stepper-dot-size` | The size of each progress dot | `12px` |
184
+ | `--md-comp-stepper-header-dot-size` | The size of the dots in the stepper header | `24px` |
185
+ | `--md-comp-stepper-dot-color` | The color of a pending progress dot | `--md-sys-color-on-surface` |
186
+ | `--md-comp-stepper-dot-label-color` | The counter color of a pending progress dot | `--md-sys-color-surface` |
187
+ | `--md-comp-stepper-dot-done-color` | The color of a completed progress dot | `--md-sys-color-tertiary-container` |
188
+ | `--md-comp-stepper-dot-done-label-color` | The counter color of a completed progress dot | `--md-sys-color-on-tertiary-container` |
189
+ | `--md-comp-divider-color` | The color of the connector line between the steps in the stepper header (shared with the Divider component) | `--md-sys-color-outline-variant` |
183
190
 
184
191
  **Example: Changing the style of the counter inside header dots**
185
192
 
186
193
  ```HTML
187
- <div class="micl-stepper" style="--md-sys-stepper-counter-style:upper-alpha">
194
+ <div class="micl-stepper" style="--md-comp-stepper-counter-style:upper-alpha">
188
195
  ...
189
196
  </div>
190
197
  ```