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