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,516 +19,202 @@
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
- @use '../../styles/elevation';
24
- @use '../../styles/motion';
25
22
  @use '../../styles/shape';
26
- @use '../../styles/statelayer';
27
23
  @use '../../styles/typography';
24
+ @use './shared' as *;
28
25
 
29
- @include elevation.level(0);
30
- @include elevation.level(1);
26
+ $buttons: ':is([class*="micl-button-text-"], [class*="micl-button-elevated-"], [class*="micl-button-filled-"], [class*="micl-button-tonal-"], [class*="micl-button-outlined-"])';
31
27
 
32
28
  @include shape.corner('small');
33
29
  @include shape.corner('medium');
34
30
  @include shape.corner('large');
35
31
  @include shape.corner('extra-large');
36
32
 
37
- @include statelayer.token('hover-state-layer-opacity');
38
- @include statelayer.token('focus-state-layer-opacity');
39
- @include statelayer.token('pressed-state-layer-opacity');
40
- @include statelayer.token('disabled-state-layer-opacity');
41
- @include statelayer.token('focus-indicator-thickness');
42
- @include statelayer.token('ripple-opacity-factor');
43
- @include statelayer.token('ripple-duration');
44
- @include statelayer.property;
45
- @include statelayer.keyframes;
46
-
47
33
  @include typography.scale('headline-large');
48
34
  @include typography.scale('headline-small');
49
35
  @include typography.scale('title-medium');
50
- @include typography.scale('label-large');
51
-
52
- .micl-button-text-xs,
53
- .micl-button-text-s,
54
- .micl-button-text-m,
55
- .micl-button-text-l,
56
- .micl-button-text-l,
57
- .micl-button-text-xl,
58
- .micl-button-elevated-xs,
59
- .micl-button-elevated-s,
60
- .micl-button-elevated-m,
61
- .micl-button-elevated-l,
62
- .micl-button-elevated-xl,
63
- .micl-button-filled-xs,
64
- .micl-button-filled-s,
65
- .micl-button-filled-m,
66
- .micl-button-filled-l,
67
- .micl-button-filled-xl,
68
- .micl-button-tonal-xs,
69
- .micl-button-tonal-s,
70
- .micl-button-tonal-m,
71
- .micl-button-tonal-l,
72
- .micl-button-tonal-xl,
73
- .micl-button-outlined-xs,
74
- .micl-button-outlined-s,
75
- .micl-button-outlined-m,
76
- .micl-button-outlined-l,
77
- .micl-button-outlined-xl {
78
- --md-sys-button-motion-effects: #{motion.$md-sys-motion-expressive-fast-spatial};
79
- --md-sys-button-motion-duration: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
80
- --md-sys-button-motion-duration-reverse: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
81
- --micl-ripple: 1;
82
-
83
- position: relative;
84
- display: inline-flex;
85
- flex-shrink: 0;
86
- align-items: center;
87
- justify-content: center;
88
- padding: 0;
89
- border: none;
90
- border-radius: calc(var(--micl-height) / 2);
91
- background-image:
92
- radial-gradient(
93
- circle at var(--micl-x, center) var(--micl-y, center),
94
- transparent 0%,
95
- rgb(from var(--statelayer-color) r g b / calc(var(--statelayer-opacity) * var(--md-sys-state-ripple-opacity-factor))) 10%,
96
- transparent 10%
97
- ),
98
- linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
99
- background-repeat: no-repeat;
100
- background-size: 0%, 100%;
101
- -webkit-tap-highlight-color: transparent;
102
- cursor: pointer;
103
- transition:
104
- border-radius var(--md-sys-button-motion-duration) var(--md-sys-button-motion-effects),
105
- background-size 0ms,
106
- --statelayer-opacity var(--md-sys-button-motion-duration) linear;
107
-
108
- &:disabled {
109
- background-color: rgb(from var(--md-sys-color-on-surface) r g b / 10%);
110
- color: rgb(from var(--md-sys-color-on-surface) r g b / var(--md-sys-state-disabled-state-layer-opacity, 38%));
111
- box-shadow: var(--md-sys-elevation-level0);
112
- cursor: default;
113
- }
114
- &:not(:disabled) {
115
- &:focus-visible {
116
- outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
117
- outline-offset: 3px;
118
- }
119
- &.micl-rippling {
120
- animation: micl-ripple var(--md-sys-state-ripple-duration) motion.$md-sys-motion-easing-standard;
121
- }
122
- }
123
- .micl-button__icon {
124
- font-variation-settings: 'FILL' 0;
125
- transition: font-variation-settings var(--md-sys-button-motion-duration) linear;
126
- }
127
- &.micl-button--toggle:not(.micl-button--selected) .micl-button__icon::before {
128
- content: attr(data-miclicon);
129
- }
130
- &.micl-button--toggle.micl-button--selected .micl-button__icon::before {
131
- content: attr(data-micliconselected);
132
- }
133
- }
134
-
135
- .micl-button-text-xs,
136
- .micl-button-elevated-xs,
137
- .micl-button-filled-xs,
138
- .micl-button-tonal-xs,
139
- .micl-button-outlined-xs {
140
- @include typography.label-large;
141
36
 
142
- --micl-width: 32px;
143
- --micl-height: 32px;
37
+ #{$buttons} {
38
+ @extend %micl-button-base;
144
39
 
145
- position: relative;
146
40
  min-inline-size: var(--micl-width);
147
41
  block-size: var(--micl-height);
148
42
  min-block-size: var(--micl-height);
149
- column-gap: 4px;
150
- padding-inline: 12px;
151
-
152
- &::before {
153
- content: "";
154
- position: absolute;
155
- block-size: var(--md-sys-target-size, 48px);
156
- inline-size: 100%;
157
- min-inline-size: var(--md-sys-target-size, 48px);
158
- inset: calc((var(--micl-height) - var(--md-sys-target-size, 48px)) / 2) 0 0 calc((min(100%, var(--md-sys-target-size, 48px)) - var(--md-sys-target-size, 48px)) / 2);
159
- background-color: transparent;
160
- }
161
- &.micl-button--toggle.micl-button--selected {
162
- border-radius: var(--md-sys-shape-corner-medium);
43
+
44
+ // The corner rounding of the size modifiers resolves through the two --_shape-*
45
+ // custom properties that each size declares below.
46
+ &.micl-button--toggle[aria-pressed="true"] {
47
+ border-radius: var(--_shape-toggle);
163
48
  }
164
49
  &.micl-button--square {
165
- border-radius: var(--md-sys-shape-corner-medium);
50
+ border-radius: var(--_shape-toggle);
166
51
 
167
- &.micl-button--toggle.micl-button--selected {
52
+ &.micl-button--toggle[aria-pressed="true"] {
168
53
  border-radius: calc(var(--micl-height) / 2);
169
54
  }
170
55
  }
171
- &:not(:disabled) {
172
- &:active {
173
- border-radius: var(--md-sys-shape-corner-small);
56
+ &#{$enabled}:active {
57
+ &,
58
+ &.micl-button--square {
59
+ border-radius: var(--_shape-pressed);
174
60
  }
175
61
  }
176
- .micl-button__icon {
177
- font-size: 20px;
178
- inline-size: 20px;
179
- }
180
62
  }
181
63
 
182
- .micl-button-text-s,
183
- .micl-button-elevated-s,
184
- .micl-button-filled-s,
185
- .micl-button-tonal-s,
186
- .micl-button-outlined-s {
64
+ :is(.micl-button-text-xs, .micl-button-elevated-xs, .micl-button-filled-xs, .micl-button-tonal-xs, .micl-button-outlined-xs) {
65
+ @extend %micl-button-xs;
66
+
67
+ --_shape-toggle: var(--md-sys-shape-corner-medium);
68
+ --_shape-pressed: var(--md-sys-shape-corner-small);
69
+ }
70
+
71
+ :is(.micl-button-text-s, .micl-button-elevated-s, .micl-button-filled-s, .micl-button-tonal-s, .micl-button-outlined-s) {
187
72
  @include typography.label-large;
73
+ @extend %micl-button-target;
188
74
 
189
75
  --micl-width: 40px;
190
76
  --micl-height: 40px;
77
+ --_shape-toggle: var(--md-sys-shape-corner-medium);
78
+ --_shape-pressed: var(--md-sys-shape-corner-small);
191
79
 
192
- min-inline-size: var(--micl-width);
193
- block-size: var(--micl-height);
194
- min-block-size: var(--micl-height);
195
80
  column-gap: 8px;
196
81
  padding-inline: 16px;
197
82
 
198
- &::before {
199
- content: "";
200
- position: absolute;
201
- block-size: var(--md-sys-target-size, 48px);
202
- inline-size: 100%;
203
- min-inline-size: var(--md-sys-target-size, 48px);
204
- inset: calc((var(--micl-height) - var(--md-sys-target-size, 48px)) / 2) 0 0 calc((min(100%, var(--md-sys-target-size, 48px)) - var(--md-sys-target-size, 48px)) / 2);
205
- background-color: transparent;
206
- }
207
- &.micl-button--toggle.micl-button--selected {
208
- border-radius: var(--md-sys-shape-corner-medium);
209
- }
210
- &.micl-button--square {
211
- border-radius: var(--md-sys-shape-corner-medium);
212
-
213
- &.micl-button--toggle.micl-button--selected {
214
- border-radius: calc(var(--micl-height) / 2);
215
- }
216
- }
217
- &:not(:disabled) {
218
- &:active {
219
- border-radius: var(--md-sys-shape-corner-small);
220
- }
221
- }
222
83
  .micl-button__icon {
223
84
  font-size: 20px;
224
85
  inline-size: 20px;
225
86
  }
226
87
  }
227
88
 
228
- .micl-button-text-m,
229
- .micl-button-elevated-m,
230
- .micl-button-filled-m,
231
- .micl-button-tonal-m,
232
- .micl-button-outlined-m {
89
+ :is(.micl-button-text-m, .micl-button-elevated-m, .micl-button-filled-m, .micl-button-tonal-m, .micl-button-outlined-m) {
233
90
  @include typography.title-medium;
234
91
 
235
92
  --micl-width: 56px;
236
93
  --micl-height: 56px;
94
+ --_shape-toggle: var(--md-sys-shape-corner-large);
95
+ --_shape-pressed: var(--md-sys-shape-corner-medium);
237
96
 
238
- min-inline-size: var(--micl-width);
239
- block-size: var(--micl-height);
240
- min-block-size: var(--micl-height);
241
97
  column-gap: 8px;
242
98
  padding-inline: 24px;
243
99
 
244
- &.micl-button--toggle.micl-button--selected {
245
- border-radius: var(--md-sys-shape-corner-large);
246
- }
247
- &.micl-button--square {
248
- border-radius: var(--md-sys-shape-corner-large);
249
-
250
- &.micl-button--toggle.micl-button--selected {
251
- border-radius: calc(var(--micl-height) / 2);
252
- }
253
- }
254
- &:not(:disabled) {
255
- &:active {
256
- border-radius: var(--md-sys-shape-corner-medium);
257
- }
258
- }
259
100
  .micl-button__icon {
260
101
  font-size: var(--md-sys-icon-size, 24px);
261
102
  inline-size: var(--md-sys-icon-size, 24px);
262
103
  }
263
104
  }
264
105
 
265
- .micl-button-text-l,
266
- .micl-button-elevated-l,
267
- .micl-button-filled-l,
268
- .micl-button-tonal-l,
269
- .micl-button-outlined-l {
106
+ :is(.micl-button-text-l, .micl-button-elevated-l, .micl-button-filled-l, .micl-button-tonal-l, .micl-button-outlined-l) {
270
107
  @include typography.headline-small;
271
108
 
272
109
  --micl-width: 96px;
273
110
  --micl-height: 96px;
111
+ --_shape-toggle: var(--md-sys-shape-corner-extra-large);
112
+ --_shape-pressed: var(--md-sys-shape-corner-large);
274
113
 
275
- min-inline-size: var(--micl-width);
276
- block-size: var(--micl-height);
277
- min-block-size: var(--micl-height);
278
114
  column-gap: 12px;
279
115
  padding-inline: 48px;
280
116
 
281
- &.micl-button--toggle.micl-button--selected {
282
- border-radius: var(--md-sys-shape-corner-extra-large);
283
- }
284
- &.micl-button--square {
285
- border-radius: var(--md-sys-shape-corner-extra-large);
286
-
287
- &.micl-button--toggle.micl-button--selected {
288
- border-radius: calc(var(--micl-height) / 2);
289
- }
290
- }
291
- &:not(:disabled) {
292
- &:active {
293
- border-radius: var(--md-sys-shape-corner-large);
294
- }
295
- }
296
117
  .micl-button__icon {
297
118
  font-size: 32px;
298
119
  inline-size: 32px;
299
120
  }
300
121
  }
301
122
 
302
- .micl-button-text-xl,
303
- .micl-button-elevated-xl,
304
- .micl-button-filled-xl,
305
- .micl-button-tonal-xl,
306
- .micl-button-outlined-xl {
123
+ :is(.micl-button-text-xl, .micl-button-elevated-xl, .micl-button-filled-xl, .micl-button-tonal-xl, .micl-button-outlined-xl) {
307
124
  @include typography.headline-large;
308
125
 
309
126
  --micl-width: 136px;
310
127
  --micl-height: 136px;
128
+ --_shape-toggle: var(--md-sys-shape-corner-extra-large);
129
+ --_shape-pressed: var(--md-sys-shape-corner-large);
311
130
 
312
- min-inline-size: var(--micl-width);
313
- block-size: var(--micl-height);
314
- min-block-size: var(--micl-height);
315
131
  column-gap: 16px;
316
132
  padding-inline: 64px;
317
133
 
318
- &.micl-button--toggle.micl-button--selected {
319
- border-radius: var(--md-sys-shape-corner-extra-large);
320
- }
321
- &.micl-button--square {
322
- border-radius: var(--md-sys-shape-corner-extra-large);
323
-
324
- &.micl-button--toggle.micl-button--selected {
325
- border-radius: calc(var(--micl-height) / 2);
326
- }
327
- }
328
- &:not(:disabled) {
329
- &:active {
330
- border-radius: var(--md-sys-shape-corner-large);
331
- }
332
- }
333
134
  .micl-button__icon {
334
135
  font-size: 40px;
335
136
  inline-size: 40px;
336
137
  }
337
138
  }
338
139
 
339
- .micl-button-text-xs,
340
- .micl-button-text-s,
341
- .micl-button-text-m,
342
- .micl-button-text-l,
343
- .micl-button-text-xl {
140
+ [class*="micl-button-text-"] {
344
141
  --statelayer-color: var(--md-sys-color-primary);
345
142
 
346
143
  background-color: transparent;
347
- color: var(--md-sys-color-primary);
144
+ color: var(--md-comp-text-button-label-text-color, var(--md-sys-color-primary));
348
145
  text-decoration: none;
349
146
 
350
- &:not(:disabled) {
351
- &:hover {
352
- --statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
353
-
354
- .micl-button__icon {
355
- font-variation-settings: 'FILL' 1;
356
- }
357
- }
358
- &:focus-visible {
359
- --statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
360
- }
361
- &:active {
362
- --statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
363
- }
147
+ &#{$disabled} {
148
+ background-color: transparent;
149
+ color: var(--md-comp-text-button-disabled-label-text-color, rgb(from var(--md-sys-color-on-surface-variant) r g b / var(--md-comp-text-button-disabled-label-text-opacity, 38%)));
364
150
  }
365
151
  }
366
152
 
367
- .micl-button-elevated-xs,
368
- .micl-button-elevated-s,
369
- .micl-button-elevated-m,
370
- .micl-button-elevated-l,
371
- .micl-button-elevated-xl {
372
- --statelayer-color: var(--md-sys-color-primary);
373
-
374
- background-color: var(--md-sys-color-surface-container-low);
375
- color: var(--md-sys-color-primary);
376
- box-shadow: var(--md-sys-elevation-level1);
377
-
378
- &:not(:disabled) {
379
- &.micl-button--toggle.micl-button--selected {
380
- --statelayer-color: var(--md-sys-color-on-primary);
381
-
382
- background-color: var(--md-sys-color-primary);
383
- color: var(--md-sys-color-on-primary);
384
-
385
- .micl-button__icon {
386
- font-variation-settings: 'FILL' 1;
387
- }
388
- }
389
- &:hover {
390
- --statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
391
-
392
- .micl-button__icon {
393
- font-variation-settings: 'FILL' 1;
394
- }
395
- }
396
- &:focus-visible {
397
- --statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
398
- }
399
- &:active {
400
- --statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
401
- }
402
- }
403
- }
404
- .micl-button-elevated-xs {
405
- block-size: 32px;
406
- border: none;
407
- }
408
- .micl-button-elevated-s {
409
- block-size: 40px;
410
- border: none;
153
+ [class*="micl-button-elevated-"] {
154
+ @extend %micl-button-elevated;
411
155
  }
412
156
 
413
- .micl-button-filled-xs,
414
- .micl-button-filled-s,
415
- .micl-button-filled-m,
416
- .micl-button-filled-l,
417
- .micl-button-filled-xl {
157
+ [class*="micl-button-filled-"] {
418
158
  --statelayer-color: var(--md-sys-color-on-primary);
419
159
 
420
- background-color: var(--md-sys-color-primary);
421
- color: var(--md-sys-color-on-primary);
160
+ background-color: var(--md-comp-filled-button-container-color, var(--md-sys-color-primary));
161
+ color: var(--md-comp-filled-button-label-text-color, var(--md-sys-color-on-primary));
422
162
 
423
- &:not(:disabled) {
424
- &.micl-button--toggle.micl-button--selected {
163
+ &#{$disabled} {
164
+ background-color: var(--md-comp-filled-button-disabled-container-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-filled-button-disabled-container-opacity, 10%)));
165
+ color: var(--md-comp-filled-button-disabled-label-text-color, rgb(from var(--md-sys-color-on-surface-variant) r g b / var(--md-comp-filled-button-disabled-label-text-opacity, 38%)));
166
+ }
167
+ &#{$enabled} {
168
+ &:hover:not(:active) {
169
+ box-shadow: var(--md-sys-elevation-level1);
170
+ }
171
+ &.micl-button--toggle[aria-pressed="true"] {
425
172
  .micl-button__icon {
426
173
  font-variation-settings: 'FILL' 1;
427
174
  }
428
175
  }
429
- &.micl-button--toggle:not(.micl-button--selected) {
176
+ &.micl-button--toggle:not([aria-pressed="true"]) {
430
177
  --statelayer-color: var(--md-sys-color-on-surface-variant);
431
178
 
432
- background-color: var(--md-sys-color-surface-container);
433
- color: var(--md-sys-color-on-surface-variant);
434
- }
435
- &:hover {
436
- --statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
437
-
438
- .micl-button__icon {
439
- font-variation-settings: 'FILL' 1;
440
- }
441
- }
442
- &:focus-visible {
443
- --statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
444
- }
445
- &:active {
446
- --statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
179
+ background-color: var(--md-comp-filled-button-unselected-container-color, var(--md-sys-color-surface-container));
180
+ color: var(--md-comp-filled-button-unselected-label-text-color, var(--md-sys-color-on-surface-variant));
447
181
  }
448
182
  }
449
183
  }
450
184
 
451
- .micl-button-tonal-xs,
452
- .micl-button-tonal-s,
453
- .micl-button-tonal-m,
454
- .micl-button-tonal-l,
455
- .micl-button-tonal-xl {
185
+ [class*="micl-button-tonal-"] {
456
186
  --statelayer-color: var(--md-sys-color-on-secondary-container);
457
187
 
458
- background-color: var(--md-sys-color-secondary-container);
459
- color: var(--md-sys-color-on-secondary-container);
188
+ background-color: var(--md-comp-filled-tonal-button-container-color, var(--md-sys-color-secondary-container));
189
+ color: var(--md-comp-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container));
460
190
 
461
- &:not(:disabled) {
462
- &.micl-button--toggle.micl-button--selected {
191
+ &#{$disabled} {
192
+ background-color: var(--md-comp-filled-tonal-button-disabled-container-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-filled-tonal-button-disabled-container-opacity, 10%)));
193
+ color: var(--md-comp-filled-tonal-button-disabled-label-text-color, rgb(from var(--md-sys-color-on-surface-variant) r g b / var(--md-comp-filled-tonal-button-disabled-label-text-opacity, 38%)));
194
+ }
195
+ &#{$enabled} {
196
+ &:hover:not(:active) {
197
+ box-shadow: var(--md-sys-elevation-level1);
198
+ }
199
+ &.micl-button--toggle[aria-pressed="true"] {
463
200
  --statelayer-color: var(--md-sys-color-on-secondary);
464
201
 
465
- background-color: var(--md-sys-color-secondary);
466
- color: var(--md-sys-color-on-secondary);
202
+ background-color: var(--md-comp-filled-tonal-button-selected-container-color, var(--md-sys-color-secondary));
203
+ color: var(--md-comp-filled-tonal-button-selected-label-text-color, var(--md-sys-color-on-secondary));
467
204
 
468
205
  .micl-button__icon {
469
206
  font-variation-settings: 'FILL' 1;
470
207
  }
471
208
  }
472
- &:hover {
473
- --statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
474
-
475
- .micl-button__icon {
476
- font-variation-settings: 'FILL' 1;
477
- }
478
- }
479
- &:focus-visible {
480
- --statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
481
- }
482
- &:active {
483
- --statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
484
- }
485
209
  }
486
210
  }
487
211
 
488
- .micl-button-outlined-xs,
489
- .micl-button-outlined-s,
490
- .micl-button-outlined-m,
491
- .micl-button-outlined-l,
492
- .micl-button-outlined-xl {
493
- --statelayer-color: var(--md-sys-color-on-surface-variant);
494
-
495
- background-color: transparent;
496
- color: var(--md-sys-color-on-surface-variant);
497
-
498
- &:not(:disabled) {
499
- &.micl-button--toggle.micl-button--selected {
500
- --statelayer-color: var(--md-sys-color-inverse-on-surface);
501
-
502
- background-color: var(--md-sys-color-inverse-surface);
503
- color: var(--md-sys-color-inverse-on-surface);
504
-
505
- .micl-button__icon {
506
- font-variation-settings: 'FILL' 1;
507
- }
508
- }
509
- &:hover {
510
- --statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
511
-
512
- .micl-button__icon {
513
- font-variation-settings: 'FILL' 1;
514
- }
515
- }
516
- &:focus-visible {
517
- --statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
518
- }
519
- &:active {
520
- --statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
521
- }
522
- }
523
- }
524
- .micl-button-outlined-xs,
525
- .micl-button-outlined-s,
526
- .micl-button-outlined-m {
527
- border: 1px solid var(--md-sys-color-outline-variant);
212
+ [class*="micl-button-outlined-"] {
213
+ @extend %micl-button-outlined;
528
214
  }
529
215
  .micl-button-outlined-l {
530
- border: 2px solid var(--md-sys-color-outline-variant);
216
+ border-width: 2px;
531
217
  }
532
218
  .micl-button-outlined-xl {
533
- border: 3px solid var(--md-sys-color-outline-variant);
219
+ border-width: 3px;
534
220
  }