@expressivecss/expressive 0.14.1 → 0.15.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 (242) hide show
  1. package/CHANGELOG.md +88 -1
  2. package/README.md +1 -1
  3. package/dist/css/expressive.css +200 -241
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/js/chunks/{chunk-4KMNFIFZ.mjs → chunk-33QVDDGR.mjs} +3 -3
  8. package/dist/js/chunks/{chunk-SPETGK25.mjs → chunk-45FER6RI.mjs} +5 -5
  9. package/dist/js/chunks/chunk-45FER6RI.mjs.map +7 -0
  10. package/dist/js/chunks/{chunk-GIW4K4SE.mjs → chunk-5CEAOLUA.mjs} +11 -10
  11. package/dist/js/chunks/{chunk-GIW4K4SE.mjs.map → chunk-5CEAOLUA.mjs.map} +2 -2
  12. package/dist/js/chunks/{chunk-LRZMJZ3T.mjs → chunk-6VATUZC6.mjs} +10 -6
  13. package/dist/js/chunks/chunk-6VATUZC6.mjs.map +7 -0
  14. package/dist/js/chunks/{chunk-QDAL4IYN.mjs → chunk-74MXKKLN.mjs} +2 -2
  15. package/dist/js/chunks/{chunk-QDAL4IYN.mjs.map → chunk-74MXKKLN.mjs.map} +2 -2
  16. package/dist/js/chunks/{chunk-CUQPB25U.mjs → chunk-AIURVCG6.mjs} +3 -3
  17. package/dist/js/chunks/{chunk-KHV6DZXX.mjs → chunk-BGZLF6JZ.mjs} +16 -16
  18. package/dist/js/chunks/chunk-BGZLF6JZ.mjs.map +7 -0
  19. package/dist/js/chunks/{chunk-BG6ZRB5H.mjs → chunk-C6CHEWYP.mjs} +2 -2
  20. package/dist/js/chunks/{chunk-GVGT6MIU.mjs → chunk-CK2XCICY.mjs} +2 -2
  21. package/dist/js/chunks/{chunk-KY6U46SM.mjs → chunk-CXXM2L4F.mjs} +8 -9
  22. package/dist/js/chunks/chunk-CXXM2L4F.mjs.map +7 -0
  23. package/dist/js/chunks/{chunk-Z2NRKI7R.mjs → chunk-DXGRXYYL.mjs} +25 -37
  24. package/dist/js/chunks/chunk-DXGRXYYL.mjs.map +7 -0
  25. package/dist/js/chunks/{chunk-MZ6Z24BX.mjs → chunk-FM5CZOUB.mjs} +3 -7
  26. package/dist/js/chunks/{chunk-MZ6Z24BX.mjs.map → chunk-FM5CZOUB.mjs.map} +2 -2
  27. package/dist/js/chunks/{chunk-5HQSGDZ5.mjs → chunk-GJL6GCIU.mjs} +34 -55
  28. package/dist/js/chunks/chunk-GJL6GCIU.mjs.map +7 -0
  29. package/dist/js/chunks/chunk-K3HZMFMD.mjs +135 -0
  30. package/dist/js/chunks/chunk-K3HZMFMD.mjs.map +7 -0
  31. package/dist/js/chunks/{chunk-TBM3FT7G.mjs → chunk-KHXZ2A4K.mjs} +12 -15
  32. package/dist/js/chunks/{chunk-TBM3FT7G.mjs.map → chunk-KHXZ2A4K.mjs.map} +2 -2
  33. package/dist/js/chunks/chunk-KQACNQ22.mjs +7 -0
  34. package/dist/js/chunks/{chunk-KBNN3QDH.mjs.map → chunk-KQACNQ22.mjs.map} +1 -1
  35. package/dist/js/chunks/{chunk-UEXCIMJZ.mjs → chunk-KUFHW3DS.mjs} +2 -2
  36. package/dist/js/chunks/{chunk-A7ALMYUR.mjs → chunk-KVJAVDBC.mjs} +7 -15
  37. package/dist/js/chunks/chunk-KVJAVDBC.mjs.map +7 -0
  38. package/dist/js/chunks/{chunk-YDCS5S3J.mjs → chunk-L27Q6ZMI.mjs} +2 -2
  39. package/dist/js/chunks/{chunk-NS2UMNZV.mjs → chunk-LQWUDNHZ.mjs} +3 -3
  40. package/dist/js/chunks/{chunk-MNPROCZF.mjs → chunk-M372EDXD.mjs} +4 -10
  41. package/dist/js/chunks/chunk-M372EDXD.mjs.map +7 -0
  42. package/dist/js/chunks/{chunk-YMSXJON6.mjs → chunk-M3MURWMB.mjs} +15 -12
  43. package/dist/js/chunks/{chunk-YMSXJON6.mjs.map → chunk-M3MURWMB.mjs.map} +2 -2
  44. package/dist/js/chunks/{chunk-JIDMQGK6.mjs → chunk-NUHMOAOY.mjs} +18 -33
  45. package/dist/js/chunks/chunk-NUHMOAOY.mjs.map +7 -0
  46. package/dist/js/chunks/{chunk-VGZSAFTX.mjs → chunk-OWG3LMUL.mjs} +7 -11
  47. package/dist/js/chunks/chunk-OWG3LMUL.mjs.map +7 -0
  48. package/dist/js/chunks/{chunk-LTWPGFBR.mjs → chunk-PD6HYHAE.mjs} +4 -15
  49. package/dist/js/chunks/chunk-PD6HYHAE.mjs.map +7 -0
  50. package/dist/js/chunks/{chunk-ZAS25YFD.mjs → chunk-PDG64UHF.mjs} +3 -3
  51. package/dist/js/chunks/{chunk-QERLECVU.mjs → chunk-PO3AXVR3.mjs} +38 -64
  52. package/dist/js/chunks/chunk-PO3AXVR3.mjs.map +7 -0
  53. package/dist/js/chunks/{chunk-ILP3PDTL.mjs → chunk-QYGK36OG.mjs} +7 -13
  54. package/dist/js/chunks/chunk-QYGK36OG.mjs.map +7 -0
  55. package/dist/js/chunks/{chunk-S3XDFGSZ.mjs → chunk-SFI2U4YW.mjs} +28 -44
  56. package/dist/js/chunks/chunk-SFI2U4YW.mjs.map +7 -0
  57. package/dist/js/chunks/{chunk-FS7XY3HT.mjs → chunk-SMY7GJSS.mjs} +3 -3
  58. package/dist/js/chunks/{chunk-O5XPWXIQ.mjs → chunk-TCCA2HDG.mjs} +39 -31
  59. package/dist/js/chunks/chunk-TCCA2HDG.mjs.map +7 -0
  60. package/dist/js/chunks/{chunk-PM655FXL.mjs → chunk-TSZYSW7F.mjs} +4 -4
  61. package/dist/js/chunks/{chunk-PM655FXL.mjs.map → chunk-TSZYSW7F.mjs.map} +2 -2
  62. package/dist/js/chunks/{chunk-UEZUJQ66.mjs → chunk-UAZSDUVP.mjs} +3 -4
  63. package/dist/js/chunks/{chunk-UEZUJQ66.mjs.map → chunk-UAZSDUVP.mjs.map} +2 -2
  64. package/dist/js/chunks/{chunk-6N2XAEFK.mjs → chunk-UBRZZWRA.mjs} +10 -8
  65. package/dist/js/chunks/chunk-UBRZZWRA.mjs.map +7 -0
  66. package/dist/js/chunks/{chunk-5BKHWHYY.mjs → chunk-UCOE7ZDL.mjs} +41 -46
  67. package/dist/js/chunks/chunk-UCOE7ZDL.mjs.map +7 -0
  68. package/dist/js/chunks/{chunk-4TKTLGEM.mjs → chunk-UETTGDLI.mjs} +3 -3
  69. package/dist/js/chunks/{chunk-RHRQKTTX.mjs → chunk-UNCRDLP6.mjs} +6 -9
  70. package/dist/js/chunks/chunk-UNCRDLP6.mjs.map +7 -0
  71. package/dist/js/chunks/{chunk-GUB3TNO2.mjs → chunk-VGNYF6FB.mjs} +3 -6
  72. package/dist/js/chunks/{chunk-GUB3TNO2.mjs.map → chunk-VGNYF6FB.mjs.map} +2 -2
  73. package/dist/js/chunks/{chunk-X7OCHZVF.mjs → chunk-VGPGBNGL.mjs} +4 -12
  74. package/dist/js/chunks/chunk-VGPGBNGL.mjs.map +7 -0
  75. package/dist/js/chunks/chunk-VKAUVTQY.mjs +1 -0
  76. package/dist/js/chunks/{chunk-HKT2S7VM.mjs → chunk-VM4FTS7L.mjs} +3 -3
  77. package/dist/js/chunks/{chunk-3GVFZ4XO.mjs → chunk-WDK4T63U.mjs} +8 -11
  78. package/dist/js/chunks/chunk-WDK4T63U.mjs.map +7 -0
  79. package/dist/js/chunks/{chunk-GZKEFWPM.mjs → chunk-WOCCTVUF.mjs} +38 -34
  80. package/dist/js/chunks/chunk-WOCCTVUF.mjs.map +7 -0
  81. package/dist/js/chunks/{chunk-QJABDLSD.mjs → chunk-WQYN5L4E.mjs} +11 -16
  82. package/dist/js/chunks/chunk-WQYN5L4E.mjs.map +7 -0
  83. package/dist/js/chunks/{chunk-DAIU5SLG.mjs → chunk-X4ISMKE2.mjs} +2 -2
  84. package/dist/js/chunks/{chunk-3DHK5CZU.mjs → chunk-XAEAEHIX.mjs} +6 -8
  85. package/dist/js/chunks/chunk-XAEAEHIX.mjs.map +7 -0
  86. package/dist/js/chunks/{chunk-4HZMB7LI.mjs → chunk-ZX6M7SWO.mjs} +24 -24
  87. package/dist/js/chunks/chunk-ZX6M7SWO.mjs.map +7 -0
  88. package/dist/js/expressive.cjs +484 -507
  89. package/dist/js/expressive.cjs.map +4 -4
  90. package/dist/js/expressive.js +484 -507
  91. package/dist/js/expressive.js.map +4 -4
  92. package/dist/js/expressive.min.js +10 -13
  93. package/dist/js/expressive.min.js.map +4 -4
  94. package/dist/js/expressive.mjs +54 -50
  95. package/dist/js/expressive.mjs.map +1 -1
  96. package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
  97. package/dist/js/internal/behaviors/dialogs.mjs +2 -2
  98. package/dist/js/internal/behaviors/forms.mjs +2 -2
  99. package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
  100. package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
  101. package/dist/js/internal/components/appBar.mjs +2 -2
  102. package/dist/js/internal/components/autocomplete.mjs +4 -4
  103. package/dist/js/internal/components/barChart.mjs +4 -4
  104. package/dist/js/internal/components/buttonGroup.mjs +2 -2
  105. package/dist/js/internal/components/buttons.mjs +3 -3
  106. package/dist/js/internal/components/cards.mjs +3 -3
  107. package/dist/js/internal/components/carousel.mjs +3 -3
  108. package/dist/js/internal/components/characterCounter.mjs +2 -2
  109. package/dist/js/internal/components/chips.mjs +5 -5
  110. package/dist/js/internal/components/columnChart.mjs +3 -3
  111. package/dist/js/internal/components/commandPalette.mjs +3 -3
  112. package/dist/js/internal/components/confetti.mjs +2 -2
  113. package/dist/js/internal/components/datepicker.mjs +6 -6
  114. package/dist/js/internal/components/expandingCard.mjs +3 -3
  115. package/dist/js/internal/components/heatmapChart.mjs +3 -3
  116. package/dist/js/internal/components/index.mjs +47 -43
  117. package/dist/js/internal/components/keypad.mjs +9 -0
  118. package/dist/js/internal/components/keypad.mjs.map +7 -0
  119. package/dist/js/internal/components/lightbox.mjs +3 -3
  120. package/dist/js/internal/components/lineChart.mjs +6 -2
  121. package/dist/js/internal/components/mapView.mjs +3 -3
  122. package/dist/js/internal/components/menu.mjs +3 -3
  123. package/dist/js/internal/components/messageScroller.mjs +3 -3
  124. package/dist/js/internal/components/mixedChart.mjs +4 -4
  125. package/dist/js/internal/components/navigationRail.mjs +2 -2
  126. package/dist/js/internal/components/particles.mjs +2 -2
  127. package/dist/js/internal/components/pieChart.mjs +3 -3
  128. package/dist/js/internal/components/questionnaire.mjs +3 -3
  129. package/dist/js/internal/components/radarChart.mjs +3 -3
  130. package/dist/js/internal/components/radialChart.mjs +3 -3
  131. package/dist/js/internal/components/registry.mjs +41 -40
  132. package/dist/js/internal/components/richTextEditor.mjs +3 -3
  133. package/dist/js/internal/components/scrollspy.mjs +2 -2
  134. package/dist/js/internal/components/select.mjs +4 -4
  135. package/dist/js/internal/components/slider.mjs +3 -3
  136. package/dist/js/internal/components/snackbar.mjs +2 -2
  137. package/dist/js/internal/components/tabs.mjs +4 -4
  138. package/dist/js/internal/components/timepicker.mjs +4 -4
  139. package/dist/js/internal/components/tooltip.mjs +3 -3
  140. package/dist/js/internal/core/component.mjs +1 -1
  141. package/dist/js/internal/core/utils.mjs +1 -1
  142. package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
  143. package/dist/js/modular.mjs +54 -50
  144. package/dist/types/components/autocomplete.d.ts +1 -0
  145. package/dist/types/components/datepicker.d.ts +3 -4
  146. package/dist/types/components/expandingCard.d.ts +2 -0
  147. package/dist/types/components/index.d.ts +1 -0
  148. package/dist/types/components/keypad.d.ts +34 -0
  149. package/dist/types/components/lightbox.d.ts +3 -5
  150. package/dist/types/components/lineChart.d.ts +4 -0
  151. package/dist/types/components/menu.d.ts +1 -0
  152. package/dist/types/components/radialChart.d.ts +0 -1
  153. package/dist/types/components/registry.d.ts +4 -0
  154. package/dist/types/components/slider.d.ts +2 -0
  155. package/dist/types/components/snackbar.d.ts +1 -0
  156. package/dist/types/components/tabs.d.ts +4 -0
  157. package/dist/types/components/timepicker.d.ts +2 -0
  158. package/dist/types/modular.d.ts +1 -1
  159. package/dist/types/plugins/dockedDisplayPlugin.d.ts +1 -0
  160. package/package.json +1 -1
  161. package/src/sass/abstracts/_breakpoints.scss +0 -1
  162. package/src/sass/abstracts/_elevation.scss +1 -1
  163. package/src/sass/abstracts/_mixins.scss +20 -60
  164. package/src/sass/abstracts/_variables.scss +10 -0
  165. package/src/sass/base/_global.scss +3 -12
  166. package/src/sass/base/_index.scss +1 -1
  167. package/src/sass/components/_badges.scss +1 -8
  168. package/src/sass/components/_bar-chart.scss +1 -1
  169. package/src/sass/components/_button-groups.scss +31 -66
  170. package/src/sass/components/_cards.scss +6 -25
  171. package/src/sass/components/_carousel.scss +16 -55
  172. package/src/sass/components/_chips.scss +0 -6
  173. package/src/sass/components/_column-chart.scss +1 -1
  174. package/src/sass/components/_data-table.scss +1 -3
  175. package/src/sass/components/_datepicker.scss +3 -22
  176. package/src/sass/components/_dialog.scss +1 -4
  177. package/src/sass/components/_heatmap-chart.scss +2 -2
  178. package/src/sass/components/_icon-buttons.scss +0 -1
  179. package/src/sass/components/_index.scss +1 -0
  180. package/src/sass/components/_keypad.scss +162 -0
  181. package/src/sass/components/_lightbox.scss +3 -8
  182. package/src/sass/components/_map.scss +2 -2
  183. package/src/sass/components/_menu.scss +31 -74
  184. package/src/sass/components/_mixed-chart.scss +1 -1
  185. package/src/sass/components/_navbar.scss +9 -45
  186. package/src/sass/components/_navigation-rail.scss +23 -32
  187. package/src/sass/components/_page-footer.scss +15 -12
  188. package/src/sass/components/_panes.scss +2 -6
  189. package/src/sass/components/_progress.scss +6 -4
  190. package/src/sass/components/_side-sheet.scss +1 -4
  191. package/src/sass/components/_stepper.scss +0 -4
  192. package/src/sass/components/_timepicker.scss +4 -36
  193. package/src/sass/components/_toolbar.scss +0 -4
  194. package/src/sass/components/forms/_checkboxes.scss +37 -65
  195. package/src/sass/components/forms/_fieldset.scss +3 -3
  196. package/src/sass/components/forms/_file-input.scss +0 -1
  197. package/src/sass/components/forms/_radio-buttons.scss +10 -36
  198. package/src/sass/components/forms/_select.scss +0 -3
  199. package/src/sass/components/forms/_slider.scss +72 -259
  200. package/src/sass/tokens/_state.scss +2 -2
  201. package/src/sass/tokens/_theme.scss +1 -1
  202. package/src/sass/utilities/_colors.scss +6 -1
  203. package/src/sass/utilities/_index.scss +1 -1
  204. package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +0 -7
  205. package/dist/js/chunks/chunk-3GVFZ4XO.mjs.map +0 -7
  206. package/dist/js/chunks/chunk-4HZMB7LI.mjs.map +0 -7
  207. package/dist/js/chunks/chunk-5BKHWHYY.mjs.map +0 -7
  208. package/dist/js/chunks/chunk-5HQSGDZ5.mjs.map +0 -7
  209. package/dist/js/chunks/chunk-6N2XAEFK.mjs.map +0 -7
  210. package/dist/js/chunks/chunk-A7ALMYUR.mjs.map +0 -7
  211. package/dist/js/chunks/chunk-GZKEFWPM.mjs.map +0 -7
  212. package/dist/js/chunks/chunk-ILP3PDTL.mjs.map +0 -7
  213. package/dist/js/chunks/chunk-JIDMQGK6.mjs.map +0 -7
  214. package/dist/js/chunks/chunk-KBNN3QDH.mjs +0 -7
  215. package/dist/js/chunks/chunk-KHV6DZXX.mjs.map +0 -7
  216. package/dist/js/chunks/chunk-KY6U46SM.mjs.map +0 -7
  217. package/dist/js/chunks/chunk-LRZMJZ3T.mjs.map +0 -7
  218. package/dist/js/chunks/chunk-LTWPGFBR.mjs.map +0 -7
  219. package/dist/js/chunks/chunk-MNPROCZF.mjs.map +0 -7
  220. package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +0 -7
  221. package/dist/js/chunks/chunk-QERLECVU.mjs.map +0 -7
  222. package/dist/js/chunks/chunk-QJABDLSD.mjs.map +0 -7
  223. package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +0 -7
  224. package/dist/js/chunks/chunk-S3XDFGSZ.mjs.map +0 -7
  225. package/dist/js/chunks/chunk-SPETGK25.mjs.map +0 -7
  226. package/dist/js/chunks/chunk-VGZSAFTX.mjs.map +0 -7
  227. package/dist/js/chunks/chunk-X7OCHZVF.mjs.map +0 -7
  228. package/dist/js/chunks/chunk-Z2NRKI7R.mjs.map +0 -7
  229. package/dist/js/chunks/chunk-ZKZKNSLC.mjs +0 -1
  230. /package/dist/js/chunks/{chunk-4KMNFIFZ.mjs.map → chunk-33QVDDGR.mjs.map} +0 -0
  231. /package/dist/js/chunks/{chunk-CUQPB25U.mjs.map → chunk-AIURVCG6.mjs.map} +0 -0
  232. /package/dist/js/chunks/{chunk-BG6ZRB5H.mjs.map → chunk-C6CHEWYP.mjs.map} +0 -0
  233. /package/dist/js/chunks/{chunk-GVGT6MIU.mjs.map → chunk-CK2XCICY.mjs.map} +0 -0
  234. /package/dist/js/chunks/{chunk-UEXCIMJZ.mjs.map → chunk-KUFHW3DS.mjs.map} +0 -0
  235. /package/dist/js/chunks/{chunk-YDCS5S3J.mjs.map → chunk-L27Q6ZMI.mjs.map} +0 -0
  236. /package/dist/js/chunks/{chunk-NS2UMNZV.mjs.map → chunk-LQWUDNHZ.mjs.map} +0 -0
  237. /package/dist/js/chunks/{chunk-ZAS25YFD.mjs.map → chunk-PDG64UHF.mjs.map} +0 -0
  238. /package/dist/js/chunks/{chunk-FS7XY3HT.mjs.map → chunk-SMY7GJSS.mjs.map} +0 -0
  239. /package/dist/js/chunks/{chunk-4TKTLGEM.mjs.map → chunk-UETTGDLI.mjs.map} +0 -0
  240. /package/dist/js/chunks/{chunk-ZKZKNSLC.mjs.map → chunk-VKAUVTQY.mjs.map} +0 -0
  241. /package/dist/js/chunks/{chunk-HKT2S7VM.mjs.map → chunk-VM4FTS7L.mjs.map} +0 -0
  242. /package/dist/js/chunks/{chunk-DAIU5SLG.mjs.map → chunk-X4ISMKE2.mjs.map} +0 -0
@@ -0,0 +1,34 @@
1
+ import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
2
+ export interface KeypadOptions extends BaseOptions {
3
+ /**
4
+ * Called after every key press with the text typed ('7', 'A', ' ') or the
5
+ * function key's name ('Backspace', 'Enter', 'Shift').
6
+ * @default null
7
+ */
8
+ onKey: ((key: string) => void) | null;
9
+ }
10
+ type Field = HTMLInputElement | HTMLTextAreaElement;
11
+ type Root = Document | ShadowRoot;
12
+ /**
13
+ * Keypad and keyboard. A `.keypad` or `.keyboard` whose `aria-controls`
14
+ * names a text field types into it: a key's `value` is inserted at the caret,
15
+ * and `data-key="Backspace"`, `"Enter"` and `"Shift"` edit, submit and
16
+ * capitalize. The field receives the same `input` event typing would fire.
17
+ */
18
+ export declare class Keypad extends Component<KeypadOptions> {
19
+ /** @internal */
20
+ _root: Root | null;
21
+ constructor(el: HTMLElement, options: Partial<KeypadOptions>);
22
+ static get defaults(): KeypadOptions;
23
+ static init(el: HTMLElement, options?: Partial<KeypadOptions>): Keypad;
24
+ static init(els: InitElements<InitElement>, options?: Partial<KeypadOptions>): Keypad[];
25
+ static getInstance(el: HTMLElement): Keypad;
26
+ destroy(): void;
27
+ /** The text field named by `aria-controls`, if there is one. */
28
+ get target(): Field | null;
29
+ private _shared;
30
+ /** @internal */
31
+ _press(key: HTMLButtonElement): void;
32
+ private _edit;
33
+ }
34
+ export {};
@@ -84,11 +84,9 @@ export declare class Lightbox extends Component<LightboxOptions> {
84
84
  private _handleMotionChange;
85
85
  private _setupEventHandlers;
86
86
  private _removeEventHandlers;
87
- private _handleLightboxClick;
88
87
  private _handleLightboxKeypress;
89
88
  private _handleLightboxToggle;
90
- private _handleWindowScroll;
91
- private _handleWindowResize;
89
+ private _handleWindowChange;
92
90
  private _handleWindowEscape;
93
91
  private _makeAncestorsOverflowVisible;
94
92
  private _offset;
@@ -96,9 +94,9 @@ export declare class Lightbox extends Component<LightboxOptions> {
96
94
  private _animateImageIn;
97
95
  private _animateImageOut;
98
96
  private _addCaption;
99
- private _removeCaption;
100
97
  private _addOverlay;
101
- private _removeOverlay;
98
+ private _fadeIn;
99
+ private _fadeOut;
102
100
  /**
103
101
  * Open lightbox.
104
102
  */
@@ -15,6 +15,10 @@ export interface LineChartOptions extends BaseOptions {
15
15
  export declare const COLORS = 4;
16
16
  /** An SVG element with its attributes. */
17
17
  export declare function svgNode(name: string, attributes?: Record<string, string>): SVGElement;
18
+ /** A point at a turn clockwise from the top and a distance from the middle, as "x,y". */
19
+ export declare function polarPoint(turn: number, r: number): string;
20
+ /** A series' color number, for its `data-series`. */
21
+ export declare const seriesColor: (i: number) => string;
18
22
  export interface Series {
19
23
  name: string;
20
24
  /** Header cell classes, such as `dashed`. */
@@ -146,6 +146,7 @@ export declare class Menu extends Component<MenuOptions> implements Openable {
146
146
  private _syncSubmenuAria;
147
147
  private _handleSubmenuAlign;
148
148
  private _alignSubmenu;
149
+ private _closeSubmenu;
149
150
  private _closeSubmenus;
150
151
  private _containingSubmenu;
151
152
  private _focusedRow;
@@ -29,7 +29,6 @@ export declare class RadialChart extends LineChart {
29
29
  show(index: number): void;
30
30
  /** The tooltip sits where the ring's fill ends. */
31
31
  protected _place(index: number): void;
32
- private _color;
33
32
  /** A fraction of the ring as a turn clockwise from the top. */
34
33
  private _turn;
35
34
  /** For more than one row, a legend of every row with its color and cell. */
@@ -51,6 +51,10 @@ export declare const AUTO_INIT_COMPONENTS: {
51
51
  component: typeof Components.Particles;
52
52
  selector: string;
53
53
  };
54
+ Keypad: {
55
+ component: typeof Components.Keypad;
56
+ selector: string;
57
+ };
54
58
  ColumnChart: {
55
59
  component: typeof Components.ColumnChart;
56
60
  selector: string;
@@ -36,6 +36,8 @@ export declare class Slider extends Component<SliderOptions> {
36
36
  _isVertical(): boolean;
37
37
  _host(): HTMLElement | null;
38
38
  _clampDual(): void;
39
+ /** The input's range, defaulting like the browser does: 0 to 100. */
40
+ private _bounds;
39
41
  _fraction(el: HTMLInputElement): number;
40
42
  _sync(): void;
41
43
  /**
@@ -118,6 +118,7 @@ export declare class Snackbar {
118
118
  * over, so the movement so far says nothing about what the user wanted.
119
119
  */
120
120
  static _onDragCancel(e: PointerEvent): void;
121
+ private _snapBack;
121
122
  /**
122
123
  * dismiss all snackbars.
123
124
  */
@@ -61,6 +61,10 @@ export declare class Tabs extends Component<TabsOptions> {
61
61
  _queryTabLinks(): NodeListOf<HTMLAnchorElement>;
62
62
  _handleTabClick: (e: MouseEvent) => void;
63
63
  _createIndicator(): void;
64
+ /** Reads both positions before writing either. */
65
+ private _positionIndicator;
66
+ /** The panel a link shows, or null for a `target` link or one without a hash. */
67
+ private _panelFor;
64
68
  /**
65
69
  * Which tab is current, for the eye and for assistive technology.
66
70
  *
@@ -168,6 +168,7 @@ export declare class Timepicker extends Component<TimepickerOptions> {
168
168
  destroy(): void;
169
169
  _setupEventHandlers(): void;
170
170
  _removeEventHandlers(): void;
171
+ private _removeDragListeners;
171
172
  _handleInputClick: () => void;
172
173
  _handleInputKeydown: (e: KeyboardEvent) => void;
173
174
  _handleClockClickStart: (e: PointerEvent) => void;
@@ -194,6 +195,7 @@ export declare class Timepicker extends Component<TimepickerOptions> {
194
195
  _buildHoursView(): void;
195
196
  _buildHoursTick(i: number, radian: number, radius: number): void;
196
197
  _buildMinutesView(): void;
198
+ private _placeTick;
197
199
  _handleAmPmClick: (e: MouseEvent) => void;
198
200
  _handleAmPmInteraction: (e: HTMLElement) => void;
199
201
  _updateAmPmView(): void;
@@ -5,7 +5,7 @@ export { SideSheets } from './behaviors/sideSheets';
5
5
  export { Forms } from './behaviors/forms';
6
6
  export { AutoInit } from './components/registry';
7
7
  export type { AutoInitOptions } from './components/registry';
8
- export declare const version = "0.14.1";
8
+ export declare const version = "0.15.0";
9
9
  export type * from './components/autocomplete';
10
10
  export type * from './components/appBar';
11
11
  export type * from './components/buttons';
@@ -23,6 +23,7 @@ export declare class DockedDisplayPlugin {
23
23
  private visible;
24
24
  constructor(el: HTMLElement, container: HTMLElement, options: Partial<DockedDisplayPluginOptions>);
25
25
  private _handleDocumentClick;
26
+ private get _transition();
26
27
  /**
27
28
  * Tears the plugin down. While shown, the document listener holds a
28
29
  * reference to this instance - and through it the whole picker subtree - so
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressivecss/expressive",
3
- "version": "0.14.1",
3
+ "version": "0.15.0",
4
4
  "description": "ExpressiveCSS - a Material Design 3 front-end framework.",
5
5
  "license": "MIT",
6
6
  "author": "BaezFJ <baezdevs@gmail.com>",
@@ -1,5 +1,4 @@
1
1
  @use "sass:map";
2
- @use "sass:list";
3
2
 
4
3
  // Material 3 window size classes, expressed as media-query boundaries.
5
4
  //
@@ -6,7 +6,7 @@
6
6
  // only resolves if the extending partial loads the module that defines the
7
7
  // class, which forced every component to `@use` a CSS-emitting file and let
8
8
  // the dependency graph - not expressive.scss - decide the output order.
9
- // The `.z-depth-N` classes in base/_global.scss are generated from this map,
9
+ // The `.z-depth-N` classes in utilities/_z-depth.scss are generated from this map,
10
10
  // so the class list and the mixin can never drift apart.
11
11
 
12
12
  $elevations: (
@@ -62,52 +62,32 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
62
62
  // State layers mix the on-color into the container in oklab; the opacities come
63
63
  // from md.sys.state via `state-opacity()`. Filled and tonal have no elevation.
64
64
 
65
- @mixin btn-filled {
66
- color: var(--md-comp-filled-button-label-text-color, var(--md-sys-color-on-primary));
67
- background-color: var(--md-comp-filled-button-container-color, var(--md-sys-color-primary));
68
-
65
+ // Shared by filled, tonal, outlined and flat. Elevated also moves z-depth.
66
+ @mixin _btn-states($on, $base) {
69
67
  &:hover {
70
- background-color: color-mix(
71
- in oklab,
72
- var(--md-sys-color-on-primary) state-opacity("hover"),
73
- var(--md-sys-color-primary)
74
- );
68
+ background-color: color-mix(in oklab, #{$on} state-opacity("hover"), #{$base});
75
69
  }
76
70
 
77
71
  &:active,
78
72
  &:focus {
79
- background-color: color-mix(
80
- in oklab,
81
- var(--md-sys-color-on-primary) state-opacity("focus"),
82
- var(--md-sys-color-primary)
83
- );
73
+ background-color: color-mix(in oklab, #{$on} state-opacity("focus"), #{$base});
84
74
  }
85
75
 
86
76
  @include focus-visible();
87
77
  }
88
78
 
79
+ @mixin btn-filled {
80
+ color: var(--md-comp-filled-button-label-text-color, var(--md-sys-color-on-primary));
81
+ background-color: var(--md-comp-filled-button-container-color, var(--md-sys-color-primary));
82
+
83
+ @include _btn-states(var(--md-sys-color-on-primary), var(--md-sys-color-primary));
84
+ }
85
+
89
86
  @mixin btn-tonal {
90
87
  color: var(--md-sys-color-on-secondary-container);
91
88
  background-color: var(--md-sys-color-secondary-container);
92
89
 
93
- &:hover {
94
- background-color: color-mix(
95
- in oklab,
96
- var(--md-sys-color-on-secondary-container) state-opacity("hover"),
97
- var(--md-sys-color-secondary-container)
98
- );
99
- }
100
-
101
- &:active,
102
- &:focus {
103
- background-color: color-mix(
104
- in oklab,
105
- var(--md-sys-color-on-secondary-container) state-opacity("focus"),
106
- var(--md-sys-color-secondary-container)
107
- );
108
- }
109
-
110
- @include focus-visible();
90
+ @include _btn-states(var(--md-sys-color-on-secondary-container), var(--md-sys-color-secondary-container));
111
91
  }
112
92
 
113
93
  @mixin btn-elevated {
@@ -138,16 +118,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
138
118
  // height right.
139
119
  border: var(--md-comp-filled-button-outline-width, 1px) solid var(--md-sys-color-outline);
140
120
 
141
- &:hover {
142
- background-color: color-mix(in oklab, var(--md-sys-color-primary) state-opacity("hover"), transparent);
143
- }
144
-
145
- &:active,
146
- &:focus {
147
- background-color: color-mix(in oklab, var(--md-sys-color-primary) state-opacity("focus"), transparent);
148
- }
149
-
150
- @include focus-visible();
121
+ @include _btn-states(var(--md-sys-color-primary), transparent);
151
122
  }
152
123
 
153
124
  @mixin btn-flat {
@@ -156,16 +127,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
156
127
  background-color: transparent;
157
128
  border-color: transparent;
158
129
 
159
- &:hover {
160
- background-color: color-mix(in oklab, var(--md-sys-color-primary) state-opacity("hover"), transparent);
161
- }
162
-
163
- &:active,
164
- &:focus {
165
- background-color: color-mix(in oklab, var(--md-sys-color-primary) state-opacity("focus"), transparent);
166
- }
167
-
168
- @include focus-visible();
130
+ @include _btn-states(var(--md-sys-color-primary), transparent);
169
131
  }
170
132
 
171
133
  @mixin btn-disabled {
@@ -174,7 +136,6 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
174
136
  background-color: color-mix(in oklab, var(--md-sys-color-on-surface) 12%, transparent);
175
137
  border-color: transparent;
176
138
  pointer-events: none;
177
- box-shadow: none;
178
139
  cursor: default;
179
140
  }
180
141
 
@@ -234,8 +195,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
234
195
  ///
235
196
  /// Checkboxes and radio buttons have no room for an overlay pseudo-element, so
236
197
  /// they grow a `box-shadow` from the control's edge out to the state layer
237
- /// size. `color-mix()` wants a percentage where the token is a number, hence
238
- /// the `* 100%`.
198
+ /// size.
239
199
  @mixin state-layer-ring($outer, $inner, $color, $state) {
240
200
  box-shadow: 0 0 0 calc((#{$outer} - #{$inner}) / 2)
241
201
  color-mix(
@@ -367,17 +327,17 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
367
327
  margin: $element-top-margin 0 $element-bottom-margin;
368
328
  color: var(--md-sys-color-on-surface);
369
329
 
370
- > figcaption {
371
- color: var(--md-sys-color-on-surface-variant);
372
- @include typescale("title-small");
373
- }
374
-
375
330
  // A table keeps its content size under visually-hidden, so anchor it
376
331
  // here rather than at some distant positioned ancestor. A fixed layout
377
332
  // holds it to the 1px wide it is given. Its rows still set its height, so
378
333
  // it hangs up from the bottom edge, where the overflow cannot scroll.
379
334
  position: relative;
380
335
 
336
+ > figcaption {
337
+ color: var(--md-sys-color-on-surface-variant);
338
+ @include typescale("title-small");
339
+ }
340
+
381
341
  &:has(> .#{$name}-plot) > table {
382
342
  @include visually-hidden;
383
343
  inset: auto auto 0 0;
@@ -137,3 +137,13 @@ $icon-button-sizes: (
137
137
  "large": (height: 96px, icon: 32px, space: 32px, narrow: 16px, wide: 48px, square: 28px, pressed: 16px, outline: 2px),
138
138
  "xlarge": (height: 136px, icon: 40px, space: 48px, narrow: 32px, wide: 72px, square: 28px, pressed: 16px, outline: 3px),
139
139
  );
140
+
141
+ // Material's fast-spatial spring (damping .9, stiffness 1400), sampled into a
142
+ // CSS linear easing. Button groups and keypads both press with it, so the
143
+ // curve lives here once.
144
+ $motion-fast-spatial: linear(
145
+ 0, .056 5%, .1796 10%, .3252 15%, .4675 20%, .5936 25%,
146
+ .6988 30%, .7828 35%, .8475 40%, .8959 45%, .931 50%,
147
+ .9559 55%, .973 60%, .9845 65%, .9919 70%, .9965 75%,
148
+ .9992 80%, 1.0006 85%, 1.0013 90%, 1.0015 95%, 1.0015
149
+ );
@@ -99,9 +99,6 @@ td, th {
99
99
  @include bp-down("expanded") {
100
100
 
101
101
  table.responsive-table {
102
- width: 100%;
103
- border-collapse: collapse;
104
- border-spacing: 0;
105
102
  display: block;
106
103
  position: relative;
107
104
 
@@ -113,12 +110,12 @@ td, th {
113
110
  margin: 0;
114
111
  vertical-align: top;
115
112
  }
116
- th {
117
- text-align: left;
118
- }
119
113
  thead {
120
114
  display: block;
121
115
  float: left;
116
+ /* sort out borders */
117
+ border: 0;
118
+ border-right: 1px solid var(--md-sys-color-outline-variant);
122
119
 
123
120
  tr {
124
121
  display: block;
@@ -148,16 +145,10 @@ td, th {
148
145
  td {
149
146
  display: block;
150
147
  min-height: 1.25em;
151
- text-align: left;
152
148
  }
153
149
  tr {
154
150
  border-bottom: none;
155
151
  padding: 0 10px;
156
152
  }
157
- /* sort out borders */
158
- thead {
159
- border: 0;
160
- border-right: 1px solid var(--md-sys-color-outline-variant);
161
- }
162
153
  }
163
154
  }
@@ -1,6 +1,6 @@
1
1
  // Element-level styling: no component classes live here.
2
2
 
3
3
  @forward "normalize";
4
- @forward "global"; // z-depth, spacing helpers, positioning, element defaults
4
+ @forward "global"; // element defaults: links, blockquotes, tables
5
5
  @forward "typography";
6
6
  @forward "grid"; // .container, .row, .s1–.s12 … .xxl1–.xxl12
@@ -55,14 +55,7 @@
55
55
 
56
56
  // Child of an icon: sit on the upper trailing corner of the 24dp
57
57
  // glyph, even when the <i> is a larger indicator pill.
58
- :is(
59
- i,
60
- .material-symbols,
61
- .material-symbols-outlined,
62
- .material-symbols-rounded,
63
- .material-symbols-sharp,
64
- .material-icons
65
- ) {
58
+ #{$icon} {
66
59
  position: relative;
67
60
  overflow: visible;
68
61
 
@@ -250,7 +250,7 @@
250
250
  inset-inline: 0;
251
251
  height: calc(100% / var(--rows, 1));
252
252
  border-radius: var(--md-comp-bar-chart-shape);
253
- background-color: color-mix(in srgb, var(--md-sys-color-on-surface) state-opacity("hover"), transparent);
253
+ background-color: color-mix(in oklab, var(--md-sys-color-on-surface) state-opacity("hover"), transparent);
254
254
  translate: 0 -50%;
255
255
  }
256
256
 
@@ -39,17 +39,6 @@ $_standard-space: (
39
39
  "xlarge": 8px,
40
40
  );
41
41
 
42
- // md.comp.button.<size>.{container-shape-square, pressed-container-shape}.
43
- // Common buttons and icon buttons share these numbers, so the group can morph
44
- // either kind of child through one pair of properties.
45
- $_item-shapes: (
46
- "xsmall": (square: 12px, pressed: 8px),
47
- "small": (square: 12px, pressed: 8px),
48
- "medium": (square: 16px, pressed: 12px),
49
- "large": (square: 28px, pressed: 16px),
50
- "xlarge": (square: 28px, pressed: 16px),
51
- );
52
-
53
42
  // md.comp.button-group.connected.<size>.{inner-corner, pressed.inner-corner}.
54
43
  // The live M3 measurement is authoritative for XS (4px). Material Web 34.0.21
55
44
  // still emits 8px there; S and M agree at 8px.
@@ -65,10 +54,17 @@ $_connected-corners: (
65
54
  @include z-depth("0");
66
55
  color: color-mix(in oklab, var(--md-sys-color-on-surface) 38%, transparent);
67
56
  pointer-events: none;
68
- box-shadow: none;
69
57
  cursor: default;
70
58
  }
71
59
 
60
+ // Toggle colors. The label and icon take the state-layer color.
61
+ @mixin _toggle-colors($container, $state) {
62
+ --_toggle-container-color: #{$container};
63
+ --_toggle-state-color: #{$state};
64
+ color: $state;
65
+ background-color: var(--_toggle-container-color);
66
+ }
67
+
72
68
  .button-group {
73
69
  --md-comp-button-group-between-space: 12px;
74
70
  --md-comp-button-group-item-shape-round: 9999px;
@@ -77,14 +73,9 @@ $_connected-corners: (
77
73
  // M3 states this as a percentage of the item's own width. CSS cannot
78
74
  // multiply a length by one, so it is the same figure as a ratio.
79
75
  --md-comp-button-group-pressed-item-width-multiplier: .15;
80
- // Material's fast-spatial spring (damping .9, stiffness 1400), sampled into
81
- // a CSS linear easing so width and corner motion use the published dynamics.
82
- --md-comp-button-group-motion: linear(
83
- 0, .056 5%, .1796 10%, .3252 15%, .4675 20%, .5936 25%,
84
- .6988 30%, .7828 35%, .8475 40%, .8959 45%, .931 50%,
85
- .9559 55%, .973 60%, .9845 65%, .9919 70%, .9965 75%,
86
- .9992 80%, 1.0006 85%, 1.0013 90%, 1.0015 95%, 1.0015
87
- );
76
+ // Material's fast-spatial spring, so width and corner motion use the
77
+ // published dynamics.
78
+ --md-comp-button-group-motion: #{$motion-fast-spatial};
88
79
 
89
80
  display: flex;
90
81
  align-items: center;
@@ -100,8 +91,9 @@ $_connected-corners: (
100
91
  @include button-size($name);
101
92
 
102
93
  --md-comp-button-group-between-space: #{map.get($_standard-space, $name)};
103
- --md-comp-button-group-item-shape-square: #{map.get(map.get($_item-shapes, $name), square)};
104
- --md-comp-button-group-pressed-item-shape: #{map.get(map.get($_item-shapes, $name), pressed)};
94
+ // Common and icon buttons share these two shapes.
95
+ --md-comp-button-group-item-shape-square: #{map.get($icon-button-sizes, $name, square)};
96
+ --md-comp-button-group-pressed-item-shape: #{map.get($icon-button-sizes, $name, pressed)};
105
97
 
106
98
  > #{$_label-item}:not(#{$_sized}) {
107
99
  @include typescale(map.get($s, label));
@@ -112,23 +104,23 @@ $_connected-corners: (
112
104
  }
113
105
 
114
106
  > .icon-button.narrow:not(#{$_sized}) {
115
- --md-comp-icon-button-leading-space: #{map.get(map.get($icon-button-sizes, $name), narrow)};
116
- --md-comp-icon-button-trailing-space: #{map.get(map.get($icon-button-sizes, $name), narrow)};
107
+ --md-comp-icon-button-leading-space: #{map.get($icon-button-sizes, $name, narrow)};
108
+ --md-comp-icon-button-trailing-space: #{map.get($icon-button-sizes, $name, narrow)};
117
109
  }
118
110
 
119
111
  > .icon-button.wide:not(#{$_sized}) {
120
- --md-comp-icon-button-leading-space: #{map.get(map.get($icon-button-sizes, $name), wide)};
121
- --md-comp-icon-button-trailing-space: #{map.get(map.get($icon-button-sizes, $name), wide)};
112
+ --md-comp-icon-button-leading-space: #{map.get($icon-button-sizes, $name, wide)};
113
+ --md-comp-icon-button-trailing-space: #{map.get($icon-button-sizes, $name, wide)};
122
114
  }
123
115
  }
124
116
 
125
117
  // Group shape tokens inherit, so an explicitly sized item must rewrite
126
118
  // them on itself just as its button geometry tokens do.
127
119
  > #{$_item}.#{$name} {
128
- --md-comp-button-group-item-shape-square: #{map.get(map.get($_item-shapes, $name), square)};
129
- --md-comp-button-group-pressed-item-shape: #{map.get(map.get($_item-shapes, $name), pressed)};
130
- --md-comp-button-group-inner-corner-corner-size: #{map.get(map.get($_connected-corners, $name), inner)};
131
- --md-comp-button-group-pressed-inner-corner-corner-size: #{map.get(map.get($_connected-corners, $name), pressed)};
120
+ --md-comp-button-group-item-shape-square: #{map.get($icon-button-sizes, $name, square)};
121
+ --md-comp-button-group-pressed-item-shape: #{map.get($icon-button-sizes, $name, pressed)};
122
+ --md-comp-button-group-inner-corner-corner-size: #{map.get($_connected-corners, $name, inner)};
123
+ --md-comp-button-group-pressed-inner-corner-corner-size: #{map.get($_connected-corners, $name, pressed)};
132
124
  }
133
125
  }
134
126
 
@@ -176,64 +168,40 @@ $_connected-corners: (
176
168
  // Shape and the filled icon below provide two non-color selection cues.
177
169
  > #{$_label-item}#{$_filled-item}[aria-pressed=false],
178
170
  > .icon-button.filled[aria-pressed=false] {
179
- --_toggle-container-color: var(--md-sys-color-surface-container);
180
- --_toggle-state-color: var(--md-sys-color-on-surface-variant);
181
- color: var(--md-sys-color-on-surface-variant);
182
- background-color: var(--_toggle-container-color);
171
+ @include _toggle-colors(var(--md-sys-color-surface-container), var(--md-sys-color-on-surface-variant));
183
172
  }
184
173
 
185
174
  > #{$_label-item}#{$_filled-item}[aria-pressed=true],
186
175
  > .icon-button.filled[aria-pressed=true] {
187
- --_toggle-container-color: var(--md-sys-color-primary);
188
- --_toggle-state-color: var(--md-sys-color-on-primary);
189
- color: var(--md-sys-color-on-primary);
190
- background-color: var(--_toggle-container-color);
176
+ @include _toggle-colors(var(--md-sys-color-primary), var(--md-sys-color-on-primary));
191
177
  }
192
178
 
193
179
  > #{$_label-item}.tonal[aria-pressed=false],
194
180
  > .icon-button.tonal[aria-pressed=false] {
195
- --_toggle-container-color: var(--md-sys-color-secondary-container);
196
- --_toggle-state-color: var(--md-sys-color-on-secondary-container);
197
- color: var(--md-sys-color-on-secondary-container);
198
- background-color: var(--_toggle-container-color);
181
+ @include _toggle-colors(var(--md-sys-color-secondary-container), var(--md-sys-color-on-secondary-container));
199
182
  }
200
183
 
201
184
  > #{$_label-item}.tonal[aria-pressed=true],
202
185
  > .icon-button.tonal[aria-pressed=true] {
203
- --_toggle-container-color: var(--md-sys-color-secondary);
204
- --_toggle-state-color: var(--md-sys-color-on-secondary);
205
- color: var(--md-sys-color-on-secondary);
206
- background-color: var(--_toggle-container-color);
186
+ @include _toggle-colors(var(--md-sys-color-secondary), var(--md-sys-color-on-secondary));
207
187
  }
208
188
 
209
189
  > #{$_label-item}.outlined[aria-pressed=false],
210
190
  > .icon-button.outlined[aria-pressed=false] {
211
- --_toggle-container-color: transparent;
212
- --_toggle-state-color: var(--md-sys-color-on-surface-variant);
213
- color: var(--md-sys-color-on-surface-variant);
214
- background-color: var(--_toggle-container-color);
191
+ @include _toggle-colors(transparent, var(--md-sys-color-on-surface-variant));
215
192
  }
216
193
 
217
194
  > #{$_label-item}.outlined[aria-pressed=true],
218
195
  > .icon-button.outlined[aria-pressed=true] {
219
- --_toggle-container-color: var(--md-sys-color-inverse-surface);
220
- --_toggle-state-color: var(--md-sys-color-inverse-on-surface);
221
- color: var(--md-sys-color-inverse-on-surface);
222
- background-color: var(--_toggle-container-color);
196
+ @include _toggle-colors(var(--md-sys-color-inverse-surface), var(--md-sys-color-inverse-on-surface));
223
197
  }
224
198
 
225
199
  > #{$_label-item}.elevated[aria-pressed=false] {
226
- --_toggle-container-color: var(--md-sys-color-surface-container-low);
227
- --_toggle-state-color: var(--md-sys-color-primary);
228
- color: var(--md-sys-color-primary);
229
- background-color: var(--_toggle-container-color);
200
+ @include _toggle-colors(var(--md-sys-color-surface-container-low), var(--md-sys-color-primary));
230
201
  }
231
202
 
232
203
  > #{$_label-item}.elevated[aria-pressed=true] {
233
- --_toggle-container-color: var(--md-sys-color-primary);
234
- --_toggle-state-color: var(--md-sys-color-on-primary);
235
- color: var(--md-sys-color-on-primary);
236
- background-color: var(--_toggle-container-color);
204
+ @include _toggle-colors(var(--md-sys-color-primary), var(--md-sys-color-on-primary));
237
205
  }
238
206
 
239
207
  > #{$_toggle-item}[aria-pressed]:hover {
@@ -315,10 +283,6 @@ $_connected-corners: (
315
283
  --md-comp-button-group-container-shape: var(--md-comp-button-group-inner-corner-corner-size);
316
284
  }
317
285
 
318
- > #{$_item} {
319
- min-width: 48px;
320
- }
321
-
322
286
  // The corner goes through a variable so that pressing an item changes one
323
287
  // value rather than restating `border-radius`. A shorthand for the pressed
324
288
  // state would take the end items' round outer corners with it.
@@ -334,6 +298,7 @@ $_connected-corners: (
334
298
  --_round: calc(var(--md-comp-filled-button-container-height, 40px) / 2);
335
299
 
336
300
  flex: 1 1 0;
301
+ min-width: 48px;
337
302
  border-radius: var(--_corner);
338
303
 
339
304
  &.icon-button {