@expressivecss/expressive 0.10.1 → 0.12.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 (157) hide show
  1. package/CHANGELOG.md +238 -7
  2. package/README.md +22 -1
  3. package/dist/css/expressive.css +272 -107
  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/fonts/material-symbols-outlined.woff2 +0 -0
  8. package/dist/fonts/material-symbols-rounded.woff2 +0 -0
  9. package/dist/fonts/material-symbols-sharp.woff2 +0 -0
  10. package/dist/js/chunks/{chunk-YFXEJ7GR.mjs → chunk-3VOK6J7U.mjs} +7 -8
  11. package/dist/js/chunks/chunk-3VOK6J7U.mjs.map +7 -0
  12. package/dist/js/chunks/{chunk-XDB3G6RL.mjs → chunk-6N2XAEFK.mjs} +15 -4
  13. package/dist/js/chunks/{chunk-XDB3G6RL.mjs.map → chunk-6N2XAEFK.mjs.map} +2 -2
  14. package/dist/js/chunks/{chunk-MISGHDUU.mjs → chunk-6OMRGML6.mjs} +9 -7
  15. package/dist/js/chunks/{chunk-MISGHDUU.mjs.map → chunk-6OMRGML6.mjs.map} +2 -2
  16. package/dist/js/chunks/{chunk-A3BJA7V4.mjs → chunk-6WLSDZ4O.mjs} +2 -2
  17. package/dist/js/chunks/{chunk-JODJAGFS.mjs → chunk-CKQP6P76.mjs} +31 -8
  18. package/dist/js/chunks/chunk-CKQP6P76.mjs.map +7 -0
  19. package/dist/js/chunks/{chunk-KR44BSYQ.mjs → chunk-DLWYKFEI.mjs} +3 -3
  20. package/dist/js/chunks/{chunk-SLFNPY5M.mjs → chunk-EC63CHXU.mjs} +2 -2
  21. package/dist/js/chunks/chunk-G3I5H2U3.mjs +7 -0
  22. package/dist/js/chunks/{chunk-ZAOYQ6SY.mjs.map → chunk-G3I5H2U3.mjs.map} +1 -1
  23. package/dist/js/chunks/{chunk-LZVBJ33S.mjs → chunk-GZWPXXY6.mjs} +15 -8
  24. package/dist/js/chunks/chunk-GZWPXXY6.mjs.map +7 -0
  25. package/dist/js/chunks/{chunk-QYCYP443.mjs → chunk-H2WA4XHH.mjs} +43 -36
  26. package/dist/js/chunks/chunk-H2WA4XHH.mjs.map +7 -0
  27. package/dist/js/chunks/{chunk-G576EP5O.mjs → chunk-HB6IW7QQ.mjs} +78 -16
  28. package/dist/js/chunks/chunk-HB6IW7QQ.mjs.map +7 -0
  29. package/dist/js/chunks/{chunk-7MM4VJJO.mjs → chunk-HLDXZ7XB.mjs} +23 -15
  30. package/dist/js/chunks/chunk-HLDXZ7XB.mjs.map +7 -0
  31. package/dist/js/chunks/{chunk-ZIZVUWRL.mjs → chunk-HNFSMIBY.mjs} +18 -18
  32. package/dist/js/chunks/{chunk-D4UZ4HFN.mjs → chunk-IFXVDDDH.mjs} +23 -11
  33. package/dist/js/chunks/chunk-IFXVDDDH.mjs.map +7 -0
  34. package/dist/js/chunks/{chunk-QSQ24FYT.mjs → chunk-LTWPGFBR.mjs} +2 -2
  35. package/dist/js/chunks/{chunk-QSQ24FYT.mjs.map → chunk-LTWPGFBR.mjs.map} +2 -2
  36. package/dist/js/chunks/{chunk-AOGFNMXS.mjs → chunk-LWBQIX5J.mjs} +16 -16
  37. package/dist/js/chunks/chunk-LWBQIX5J.mjs.map +7 -0
  38. package/dist/js/chunks/{chunk-GY2Z5CJ2.mjs → chunk-NNYP33NB.mjs} +67 -32
  39. package/dist/js/chunks/chunk-NNYP33NB.mjs.map +7 -0
  40. package/dist/js/chunks/{chunk-VAS6JQ6P.mjs → chunk-PIJ2TAR3.mjs} +3 -3
  41. package/dist/js/chunks/{chunk-JR24UB4X.mjs → chunk-PSSHQWCX.mjs} +2 -2
  42. package/dist/js/chunks/{chunk-PIIAEYAJ.mjs → chunk-QDAL4IYN.mjs} +2 -2
  43. package/dist/js/chunks/chunk-QV2JAWIZ.mjs +135 -0
  44. package/dist/js/chunks/chunk-QV2JAWIZ.mjs.map +7 -0
  45. package/dist/js/chunks/{chunk-N3UHGN3N.mjs → chunk-QVVEWBOF.mjs} +3 -3
  46. package/dist/js/chunks/{chunk-ZZBZI2XN.mjs → chunk-RFZZCYVU.mjs} +18 -11
  47. package/dist/js/chunks/chunk-RFZZCYVU.mjs.map +7 -0
  48. package/dist/js/chunks/{chunk-TYM6U5DY.mjs → chunk-UAEAQBRC.mjs} +2 -2
  49. package/dist/js/chunks/{chunk-7UXHSYIA.mjs → chunk-UBLRRJ7N.mjs} +3 -3
  50. package/dist/js/chunks/{chunk-EP3CVKB5.mjs → chunk-UEZUJQ66.mjs} +8 -5
  51. package/dist/js/chunks/chunk-UEZUJQ66.mjs.map +7 -0
  52. package/dist/js/chunks/{chunk-JNPIWFJT.mjs → chunk-UNEMYWEW.mjs} +3 -3
  53. package/dist/js/chunks/{chunk-JKNPQQWY.mjs → chunk-WJXDBPXQ.mjs} +28 -12
  54. package/dist/js/chunks/chunk-WJXDBPXQ.mjs.map +7 -0
  55. package/dist/js/chunks/{chunk-XO5WX3TK.mjs → chunk-YDCS5S3J.mjs} +2 -2
  56. package/dist/js/chunks/{chunk-TK6PX2GC.mjs → chunk-YSBCHYXP.mjs} +16 -8
  57. package/dist/js/chunks/chunk-YSBCHYXP.mjs.map +7 -0
  58. package/dist/js/expressive.cjs +398 -217
  59. package/dist/js/expressive.cjs.map +2 -2
  60. package/dist/js/expressive.js +398 -217
  61. package/dist/js/expressive.js.map +2 -2
  62. package/dist/js/expressive.min.js +10 -10
  63. package/dist/js/expressive.min.js.map +3 -3
  64. package/dist/js/expressive.mjs +30 -30
  65. package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
  66. package/dist/js/internal/behaviors/dialogs.mjs +2 -2
  67. package/dist/js/internal/behaviors/forms.mjs +2 -2
  68. package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
  69. package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
  70. package/dist/js/internal/components/appBar.mjs +2 -2
  71. package/dist/js/internal/components/autocomplete.mjs +4 -4
  72. package/dist/js/internal/components/buttonGroup.mjs +2 -2
  73. package/dist/js/internal/components/buttons.mjs +3 -3
  74. package/dist/js/internal/components/cards.mjs +3 -3
  75. package/dist/js/internal/components/carousel.mjs +3 -3
  76. package/dist/js/internal/components/characterCounter.mjs +2 -2
  77. package/dist/js/internal/components/chips.mjs +5 -5
  78. package/dist/js/internal/components/datepicker.mjs +6 -6
  79. package/dist/js/internal/components/expandingCard.mjs +3 -3
  80. package/dist/js/internal/components/index.mjs +23 -23
  81. package/dist/js/internal/components/lightbox.mjs +3 -3
  82. package/dist/js/internal/components/menu.mjs +3 -3
  83. package/dist/js/internal/components/navigationRail.mjs +2 -2
  84. package/dist/js/internal/components/registry.mjs +24 -24
  85. package/dist/js/internal/components/scrollspy.mjs +2 -2
  86. package/dist/js/internal/components/select.mjs +4 -4
  87. package/dist/js/internal/components/slider.mjs +3 -3
  88. package/dist/js/internal/components/snackbar.mjs +2 -2
  89. package/dist/js/internal/components/tabs.mjs +4 -4
  90. package/dist/js/internal/components/timepicker.mjs +4 -4
  91. package/dist/js/internal/components/tooltip.mjs +3 -3
  92. package/dist/js/internal/core/component.mjs +1 -1
  93. package/dist/js/internal/core/utils.mjs +1 -1
  94. package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
  95. package/dist/js/modular.mjs +30 -30
  96. package/dist/types/components/appBar.d.ts +1 -1
  97. package/dist/types/components/autocomplete.d.ts +2 -1
  98. package/dist/types/components/datepicker.d.ts +6 -2
  99. package/dist/types/components/menu.d.ts +1 -0
  100. package/dist/types/components/scrollspy.d.ts +5 -4
  101. package/dist/types/components/select.d.ts +7 -1
  102. package/dist/types/components/slider.d.ts +1 -0
  103. package/dist/types/components/snackbar.d.ts +6 -0
  104. package/dist/types/components/timepicker.d.ts +4 -1
  105. package/dist/types/components/tooltip.d.ts +2 -1
  106. package/dist/types/modular.d.ts +1 -1
  107. package/package.json +1 -1
  108. package/src/sass/abstracts/_mixins.scss +19 -11
  109. package/src/sass/components/_buttons.scss +45 -0
  110. package/src/sass/components/_carousel.scss +9 -7
  111. package/src/sass/components/_chips.scss +5 -9
  112. package/src/sass/components/_dialog.scss +0 -7
  113. package/src/sass/components/_navbar.scss +13 -8
  114. package/src/sass/components/_page-footer.scss +0 -11
  115. package/src/sass/components/_progress.scss +25 -6
  116. package/src/sass/components/_snackbar.scss +1 -1
  117. package/src/sass/components/_timepicker.scss +2 -2
  118. package/src/sass/components/_toolbar.scss +1 -1
  119. package/src/sass/components/forms/_checkboxes.scss +2 -2
  120. package/src/sass/components/forms/_fieldset.scss +20 -1
  121. package/src/sass/components/forms/_file-input.scss +11 -3
  122. package/src/sass/components/forms/_input-fields.scss +35 -15
  123. package/src/sass/components/forms/_radio-buttons.scss +2 -2
  124. package/src/sass/components/forms/_select.scss +3 -2
  125. package/src/sass/components/forms/_slider.scss +51 -29
  126. package/src/sass/components/forms/_switches.scss +3 -3
  127. package/src/sass/utilities/_helpers.scss +14 -0
  128. package/src/sass/utilities/_spacing.scss +29 -23
  129. package/src/sass/utilities/_visibility.scss +7 -1
  130. package/dist/js/chunks/chunk-7MM4VJJO.mjs.map +0 -7
  131. package/dist/js/chunks/chunk-AOGFNMXS.mjs.map +0 -7
  132. package/dist/js/chunks/chunk-D4UZ4HFN.mjs.map +0 -7
  133. package/dist/js/chunks/chunk-EP3CVKB5.mjs.map +0 -7
  134. package/dist/js/chunks/chunk-G576EP5O.mjs.map +0 -7
  135. package/dist/js/chunks/chunk-GY2Z5CJ2.mjs.map +0 -7
  136. package/dist/js/chunks/chunk-JKNPQQWY.mjs.map +0 -7
  137. package/dist/js/chunks/chunk-JODJAGFS.mjs.map +0 -7
  138. package/dist/js/chunks/chunk-LZVBJ33S.mjs.map +0 -7
  139. package/dist/js/chunks/chunk-QYCYP443.mjs.map +0 -7
  140. package/dist/js/chunks/chunk-TK6PX2GC.mjs.map +0 -7
  141. package/dist/js/chunks/chunk-TZZ24ZQS.mjs +0 -154
  142. package/dist/js/chunks/chunk-TZZ24ZQS.mjs.map +0 -7
  143. package/dist/js/chunks/chunk-YFXEJ7GR.mjs.map +0 -7
  144. package/dist/js/chunks/chunk-ZAOYQ6SY.mjs +0 -7
  145. package/dist/js/chunks/chunk-ZZBZI2XN.mjs.map +0 -7
  146. /package/dist/js/chunks/{chunk-A3BJA7V4.mjs.map → chunk-6WLSDZ4O.mjs.map} +0 -0
  147. /package/dist/js/chunks/{chunk-KR44BSYQ.mjs.map → chunk-DLWYKFEI.mjs.map} +0 -0
  148. /package/dist/js/chunks/{chunk-SLFNPY5M.mjs.map → chunk-EC63CHXU.mjs.map} +0 -0
  149. /package/dist/js/chunks/{chunk-ZIZVUWRL.mjs.map → chunk-HNFSMIBY.mjs.map} +0 -0
  150. /package/dist/js/chunks/{chunk-VAS6JQ6P.mjs.map → chunk-PIJ2TAR3.mjs.map} +0 -0
  151. /package/dist/js/chunks/{chunk-JR24UB4X.mjs.map → chunk-PSSHQWCX.mjs.map} +0 -0
  152. /package/dist/js/chunks/{chunk-PIIAEYAJ.mjs.map → chunk-QDAL4IYN.mjs.map} +0 -0
  153. /package/dist/js/chunks/{chunk-N3UHGN3N.mjs.map → chunk-QVVEWBOF.mjs.map} +0 -0
  154. /package/dist/js/chunks/{chunk-TYM6U5DY.mjs.map → chunk-UAEAQBRC.mjs.map} +0 -0
  155. /package/dist/js/chunks/{chunk-7UXHSYIA.mjs.map → chunk-UBLRRJ7N.mjs.map} +0 -0
  156. /package/dist/js/chunks/{chunk-JNPIWFJT.mjs.map → chunk-UNEMYWEW.mjs.map} +0 -0
  157. /package/dist/js/chunks/{chunk-XO5WX3TK.mjs.map → chunk-YDCS5S3J.mjs.map} +0 -0
@@ -1,86 +1,86 @@
1
1
  import {
2
2
  version
3
- } from "./chunks/chunk-ZAOYQ6SY.mjs";
3
+ } from "./chunks/chunk-G3I5H2U3.mjs";
4
4
  import {
5
5
  AutoInit
6
- } from "./chunks/chunk-ZIZVUWRL.mjs";
6
+ } from "./chunks/chunk-HNFSMIBY.mjs";
7
7
  import "./chunks/chunk-WWPAPHMA.mjs";
8
8
  import {
9
9
  Slider
10
- } from "./chunks/chunk-JKNPQQWY.mjs";
10
+ } from "./chunks/chunk-WJXDBPXQ.mjs";
11
11
  import {
12
12
  Snackbar
13
- } from "./chunks/chunk-GY2Z5CJ2.mjs";
13
+ } from "./chunks/chunk-NNYP33NB.mjs";
14
14
  import {
15
15
  Tabs
16
- } from "./chunks/chunk-YFXEJ7GR.mjs";
16
+ } from "./chunks/chunk-3VOK6J7U.mjs";
17
17
  import {
18
18
  Timepicker
19
- } from "./chunks/chunk-D4UZ4HFN.mjs";
19
+ } from "./chunks/chunk-IFXVDDDH.mjs";
20
20
  import {
21
21
  Tooltip
22
- } from "./chunks/chunk-JODJAGFS.mjs";
22
+ } from "./chunks/chunk-CKQP6P76.mjs";
23
23
  import {
24
24
  ExpandingCard
25
- } from "./chunks/chunk-N3UHGN3N.mjs";
25
+ } from "./chunks/chunk-QVVEWBOF.mjs";
26
26
  import {
27
27
  Lightbox
28
- } from "./chunks/chunk-JNPIWFJT.mjs";
28
+ } from "./chunks/chunk-UNEMYWEW.mjs";
29
29
  import {
30
30
  NavigationRail
31
- } from "./chunks/chunk-XDB3G6RL.mjs";
31
+ } from "./chunks/chunk-6N2XAEFK.mjs";
32
32
  import {
33
33
  ScrollSpy
34
- } from "./chunks/chunk-TZZ24ZQS.mjs";
34
+ } from "./chunks/chunk-QV2JAWIZ.mjs";
35
35
  import {
36
36
  ButtonGroup
37
- } from "./chunks/chunk-XO5WX3TK.mjs";
37
+ } from "./chunks/chunk-YDCS5S3J.mjs";
38
38
  import {
39
39
  FloatingActionButton
40
- } from "./chunks/chunk-VAS6JQ6P.mjs";
40
+ } from "./chunks/chunk-PIJ2TAR3.mjs";
41
41
  import {
42
42
  Cards
43
- } from "./chunks/chunk-7UXHSYIA.mjs";
43
+ } from "./chunks/chunk-UBLRRJ7N.mjs";
44
44
  import {
45
45
  Carousel
46
- } from "./chunks/chunk-AOGFNMXS.mjs";
46
+ } from "./chunks/chunk-LWBQIX5J.mjs";
47
47
  import {
48
48
  CharacterCounter
49
- } from "./chunks/chunk-PIIAEYAJ.mjs";
49
+ } from "./chunks/chunk-QDAL4IYN.mjs";
50
50
  import {
51
51
  Chips
52
- } from "./chunks/chunk-ZZBZI2XN.mjs";
52
+ } from "./chunks/chunk-RFZZCYVU.mjs";
53
53
  import {
54
54
  Autocomplete
55
- } from "./chunks/chunk-7MM4VJJO.mjs";
55
+ } from "./chunks/chunk-HLDXZ7XB.mjs";
56
56
  import {
57
57
  Datepicker
58
- } from "./chunks/chunk-QYCYP443.mjs";
59
- import "./chunks/chunk-SLFNPY5M.mjs";
58
+ } from "./chunks/chunk-H2WA4XHH.mjs";
59
+ import "./chunks/chunk-EC63CHXU.mjs";
60
60
  import {
61
61
  FormSelect
62
- } from "./chunks/chunk-G576EP5O.mjs";
62
+ } from "./chunks/chunk-HB6IW7QQ.mjs";
63
63
  import {
64
64
  Menu
65
- } from "./chunks/chunk-TK6PX2GC.mjs";
65
+ } from "./chunks/chunk-YSBCHYXP.mjs";
66
66
  import {
67
67
  BottomSheets
68
- } from "./chunks/chunk-KR44BSYQ.mjs";
68
+ } from "./chunks/chunk-DLWYKFEI.mjs";
69
69
  import {
70
70
  Dialogs
71
- } from "./chunks/chunk-TYM6U5DY.mjs";
71
+ } from "./chunks/chunk-UAEAQBRC.mjs";
72
72
  import {
73
73
  Forms
74
- } from "./chunks/chunk-JR24UB4X.mjs";
74
+ } from "./chunks/chunk-PSSHQWCX.mjs";
75
75
  import {
76
76
  SideSheets
77
- } from "./chunks/chunk-A3BJA7V4.mjs";
78
- import "./chunks/chunk-LZVBJ33S.mjs";
79
- import "./chunks/chunk-MISGHDUU.mjs";
77
+ } from "./chunks/chunk-6WLSDZ4O.mjs";
78
+ import "./chunks/chunk-GZWPXXY6.mjs";
79
+ import "./chunks/chunk-6OMRGML6.mjs";
80
80
  import {
81
81
  AppBar
82
- } from "./chunks/chunk-EP3CVKB5.mjs";
83
- import "./chunks/chunk-QSQ24FYT.mjs";
82
+ } from "./chunks/chunk-UEZUJQ66.mjs";
83
+ import "./chunks/chunk-LTWPGFBR.mjs";
84
84
  export {
85
85
  AppBar,
86
86
  AutoInit,
@@ -3,7 +3,7 @@ import { Component, BaseOptions, InitElements, InitElement } from '../core/compo
3
3
  * Collapse medium/large flexible app bars on scroll, and open the related
4
4
  * search view when the search field in a search app bar is selected.
5
5
  *
6
- * Observation is IntersectionObserver on a 1px sentinel ahead of the header.
6
+ * Observation is IntersectionObserver on a sentinel after the header.
7
7
  * A scroll listener would re-enter layout on every tick; this does not.
8
8
  */
9
9
  export declare class AppBar extends Component<BaseOptions> {
@@ -135,7 +135,8 @@ export declare class Autocomplete extends Component<AutocompleteOptions> {
135
135
  _setupMenu(): void;
136
136
  _removeMenu(): void;
137
137
  _handleInputBlur: () => void;
138
- _handleInputKeyup: (e: KeyboardEvent) => void;
138
+ _handleInputKeyup: () => void;
139
+ _handleInput: () => void;
139
140
  _handleInputFocus: () => void;
140
141
  _inputChangeDetection: (value: string) => void;
141
142
  _handleInputKeydown: (e: KeyboardEvent) => void;
@@ -18,6 +18,8 @@ export interface DatepickerOptions extends BaseOptions {
18
18
  format: string | ((d: Date) => string);
19
19
  /**
20
20
  * Used to create date object from current input string.
21
+ * Receives the format string, or an empty string when format is a function.
22
+ * Not called for blank input.
21
23
  * @default null
22
24
  */
23
25
  parse: ((value: string, format: string) => Date) | null;
@@ -123,9 +125,9 @@ export interface DatepickerOptions extends BaseOptions {
123
125
  showClearBtn: boolean;
124
126
  /**
125
127
  * Autosubmit calendar day select to input field
126
- * @default false
128
+ * @default true
127
129
  */
128
- autoSubmit: true;
130
+ autoSubmit: boolean;
129
131
  /**
130
132
  * Internationalization options.
131
133
  */
@@ -243,6 +245,8 @@ export declare class Datepicker extends Component<DatepickerOptions> {
243
245
  */
244
246
  static _escape(value: unknown): string;
245
247
  static _isDate(obj: any): boolean;
248
+ private static _parseDate;
249
+ private _parseInput;
246
250
  static _isWeekend(date: any): boolean;
247
251
  /**
248
252
  * @deprecated as this function has no effect without any return statement or global parameter setter.
@@ -94,6 +94,7 @@ export declare class Menu extends Component<MenuOptions> implements Openable {
94
94
  private _pendingTimers;
95
95
  private _transition;
96
96
  private _originalInert;
97
+ private _menuClickTargets;
97
98
  constructor(el: HTMLElement, options: Partial<MenuOptions>);
98
99
  static get defaults(): MenuOptions;
99
100
  /**
@@ -31,17 +31,18 @@ export interface ScrollSpyOptions extends BaseOptions {
31
31
  */
32
32
  export declare class ScrollSpy extends Component<ScrollSpyOptions> {
33
33
  static _elements: ScrollSpy[];
34
- private static _observer;
35
- private static _ratios;
36
34
  private static _active;
35
+ private _observer;
36
+ private _ratio;
37
+ private _link;
38
+ private _offset;
39
+ private _offsetPriority;
37
40
  constructor(el: HTMLElement, options: Partial<ScrollSpyOptions>);
38
41
  static get defaults(): ScrollSpyOptions;
39
42
  static init(el: HTMLElement, options?: Partial<ScrollSpyOptions>): ScrollSpy;
40
43
  static init(els: InitElements<InitElement>, options?: Partial<ScrollSpyOptions>): ScrollSpy[];
41
44
  static getInstance(el: HTMLElement): ScrollSpy;
42
45
  destroy(): void;
43
- private static _ensureObserver;
44
- private static _onIntersect;
45
46
  private static _syncActive;
46
47
  private static _nearestAbove;
47
48
  private static _clearActive;
@@ -36,9 +36,11 @@ export declare class FormSelect extends Component<FormSelectOptions> {
36
36
  selectOptions: (HTMLOptionElement | HTMLOptGroupElement)[];
37
37
  private _values;
38
38
  private _createdWrapper;
39
- private _originalLabelFor;
39
+ private _originalLabels;
40
+ private _labelPlaceholder;
40
41
  private _form;
41
42
  private _resetTimer;
43
+ private _validationMessage;
42
44
  nativeTabIndex: number;
43
45
  constructor(el: HTMLSelectElement, options: FormSelectOptions);
44
46
  static get defaults(): FormSelectOptions;
@@ -71,6 +73,10 @@ export declare class FormSelect extends Component<FormSelectOptions> {
71
73
  private _setupOptionHandlers;
72
74
  private _removeOptionHandlers;
73
75
  _handleSelectChange: () => void;
76
+ private _handleInvalid;
77
+ private _handleNativeFocus;
78
+ private _syncValidationError;
79
+ private _clearValidationError;
74
80
  private _handleReset;
75
81
  _handleOptionKeydown: (e: KeyboardEvent) => void;
76
82
  _handleOptionClick: (e: MouseEvent | KeyboardEvent) => void;
@@ -23,6 +23,7 @@ export declare class Slider extends Component<SliderOptions> {
23
23
  static init(els: InitElements<HTMLInputElement | InitElement>, options?: Partial<SliderOptions>): Slider[];
24
24
  static getInstance(el: HTMLInputElement): Slider;
25
25
  destroy(): void;
26
+ _set(el: HTMLElement, name: string, value: string): void;
26
27
  _setupEventHandlers(): void;
27
28
  _removeEventHandlers(): void;
28
29
  _handleRangeChange: () => void;
@@ -92,6 +92,11 @@ export declare class Snackbar {
92
92
  velocityX: number;
93
93
  private _dismissed;
94
94
  private _returnFocus;
95
+ private _events;
96
+ private _restoreElement;
97
+ private _transitionTimer;
98
+ private _dismissTimer;
99
+ private _focusTimer;
95
100
  static _snackbars: Snackbar[];
96
101
  static _container: HTMLElement;
97
102
  static _draggedSnackbar: Snackbar;
@@ -116,6 +121,7 @@ export declare class Snackbar {
116
121
  */
117
122
  static dismissAll(): void;
118
123
  _createSnackbar(): HTMLElement;
124
+ private _remove;
119
125
  _animateIn(): void;
120
126
  /**
121
127
  * Arm the dismissal timer.
@@ -41,7 +41,7 @@ export interface TimepickerOptions extends BaseOptions {
41
41
  * Autosubmit timepicker selection to input field
42
42
  * @default true
43
43
  */
44
- autoSubmit: true;
44
+ autoSubmit: boolean;
45
45
  /**
46
46
  * Default time to set on the timepicker 'now' or '13:14'.
47
47
  * @default 'now';
@@ -143,6 +143,8 @@ export declare class Timepicker extends Component<TimepickerOptions> {
143
143
  g: Element;
144
144
  toggleViewTimer: ReturnType<typeof setTimeout>;
145
145
  vibrateTimer: ReturnType<typeof setTimeout>;
146
+ private _autoSubmitTimer;
147
+ private _clockResetTimer;
146
148
  private displayPlugin;
147
149
  /** Whether the dial (ticks + SVG + AM/PM buttons) has been built yet. */
148
150
  private _clockBuilt;
@@ -202,6 +204,7 @@ export declare class Timepicker extends Component<TimepickerOptions> {
202
204
  * @param delay
203
205
  */
204
206
  showView: (view: Views, delay?: number) => void;
207
+ private _cancelClockReset;
205
208
  resetClock(delay: any): void;
206
209
  _inputFromTextField: (event: Event) => void;
207
210
  drawClockFromTimeInput(value: any, isHours: any): void;
@@ -70,6 +70,7 @@ export declare class Tooltip extends Component<TooltipOptions> {
70
70
  private _exitDelayTimeout;
71
71
  private _enterDelayTimeout;
72
72
  private _animationTimeout;
73
+ private _originalContent;
73
74
  xMovement: number;
74
75
  yMovement: number;
75
76
  constructor(el: HTMLElement, options: Partial<TooltipOptions>);
@@ -96,7 +97,7 @@ export declare class Tooltip extends Component<TooltipOptions> {
96
97
  /**
97
98
  * Show tooltip.
98
99
  */
99
- open: (isManual: boolean) => void;
100
+ open: (isManual?: boolean) => void;
100
101
  /**
101
102
  * Hide tooltip.
102
103
  */
@@ -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.10.1";
8
+ export declare const version = "0.12.0";
9
9
  export type * from './components/autocomplete';
10
10
  export type * from './components/appBar';
11
11
  export type * from './components/buttons';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressivecss/expressive",
3
- "version": "0.10.1",
3
+ "version": "0.12.0",
4
4
  "description": "ExpressiveCSS - a Material Design 3 front-end framework.",
5
5
  "license": "MIT",
6
6
  "author": "BaezFJ <baezdevs@gmail.com>",
@@ -183,17 +183,25 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
183
183
  // label is drawn elsewhere - a hidden radio that cannot be focused has no
184
184
  // arrow-key model left.
185
185
  //
186
- // _chips.scss and _navigation-rail.scss each carry their own copy of this and
187
- // predate the mixin; fold them in when either is next touched.
188
- @mixin visually-hidden {
189
- position: absolute;
190
- width: 1px;
191
- height: 1px;
192
- margin: -1px;
193
- padding: 0;
194
- overflow: hidden;
195
- clip-path: inset(50%);
196
- white-space: nowrap;
186
+ // `$important` is for the `.visually-hidden` utility, which has to beat a
187
+ // consumer's own `position` or `padding` the way `.hide` beats their
188
+ // `display`. Component rules leave it off.
189
+ //
190
+ // _navigation-rail.scss carries its own copy, which predates the mixin and
191
+ // omits the margin and white-space; fold it in when it is next touched.
192
+ @mixin visually-hidden($important: false) {
193
+ $flag: null;
194
+ @if $important { $flag: !important; }
195
+
196
+ position: absolute $flag;
197
+ width: 1px $flag;
198
+ height: 1px $flag;
199
+ margin: -1px $flag;
200
+ padding: 0 $flag;
201
+ border: 0 $flag;
202
+ overflow: hidden $flag;
203
+ clip-path: inset(50%) $flag;
204
+ white-space: nowrap $flag;
197
205
  }
198
206
 
199
207
  // Focus with Keyboard
@@ -346,3 +346,48 @@ $_extend-sizes: (
346
346
  :where(#{$_btn}).disabled {
347
347
  @include btn-disabled;
348
348
  }
349
+
350
+ // Reflow. A label that does not fit (enlarged text, 200% zoom, a narrow
351
+ // column) wraps between words and the container grows, instead of running
352
+ // out of the button or out of its parent. The size's container height becomes
353
+ // a minimum, so a label that fits renders exactly as before. The 4dp block
354
+ // padding only shows once the label wraps: it keeps the lines off the edges
355
+ // and fits inside every size's height with an outline and a line to spare.
356
+ //
357
+ // A minimum rather than a padding-derived height, because hosts restate
358
+ // `padding` far more often than `height`: a clear action or a list's trailing
359
+ // button that sets `padding: 0 12px` would otherwise collapse to one line of
360
+ // text. The cost is the other way round - a rule that sets a smaller `height`
361
+ // has to set `min-height` too, or name the size with the container-height
362
+ // token instead.
363
+ //
364
+ // `break-word`, not `anywhere`: `anywhere` also lowers the min-content width
365
+ // to a single character, so two buttons in a row a few pixels too narrow both
366
+ // shrink and split mid-word ("Cance|l") where they used to sit at full width.
367
+ // With `min-width: 0` on the label <span>, `break-word` still splits a single
368
+ // word longer than the parent. A bare text label has no element to take that
369
+ // minimum, so such a word overflows as it always did.
370
+ //
371
+ // Fixed geometry keeps `nowrap` and the fixed height: `.circle` and the FABs,
372
+ // the extended FAB, the chip's delete button, the carousel's dots, Timepicker's
373
+ // AM/PM controls, and hosts whose layout assumes one line. Button groups set item widths in
374
+ // script and would rewrap mid-press; a split button's two halves share one
375
+ // height; toolbars, the top app bar, dialog and sheet headers, navigation
376
+ // bars and rails, tabs, pagination and snackbar actions are fixed-height
377
+ // slots. `:where()` keeps the whole rule at zero specificity; it only has to
378
+ // come after the base rule above, whose `height` and `nowrap` it replaces.
379
+ $_fixed: ".circle, .extend, .indicator-item, .chip .close, :is(.timepicker-container, .time-picker-container) :is(.am-btn, .pm-btn), :is(.button-group, .split-button, .toolbar, .navigation-bar, .navigation-rail, .snackbar) > *, header > :is(nav, .bar) > *, :is(.pagination, .tabs, .snackbar > nav, dialog > header) *";
380
+
381
+ :where(#{$_btn}):where(:not(#{$_fixed})) {
382
+ height: auto;
383
+ min-height: var(--md-comp-filled-button-container-height);
384
+ max-width: 100%;
385
+ padding-block: 4px;
386
+ white-space: normal;
387
+ overflow-wrap: break-word;
388
+ text-align: center;
389
+
390
+ > * {
391
+ min-width: 0;
392
+ }
393
+ }
@@ -76,7 +76,6 @@
76
76
  scroll-snap-type: x mandatory;
77
77
  scroll-behavior: smooth;
78
78
  overscroll-behavior-inline: contain;
79
- touch-action: pan-x;
80
79
  scrollbar-width: none;
81
80
 
82
81
  &::-webkit-scrollbar {
@@ -485,7 +484,6 @@
485
484
  scroll-snap-type: y mandatory;
486
485
  overscroll-behavior-inline: auto;
487
486
  overscroll-behavior-block: contain;
488
- touch-action: pan-y;
489
487
  }
490
488
 
491
489
  .carousel-track > .carousel-item {
@@ -527,7 +525,6 @@
527
525
  scroll-snap-type: x mandatory;
528
526
  overscroll-behavior-inline: contain;
529
527
  overscroll-behavior-block: auto;
530
- touch-action: pan-x;
531
528
  }
532
529
 
533
530
  .carousel-track > .carousel-item {
@@ -565,17 +562,22 @@
565
562
  cursor: grab;
566
563
  }
567
564
 
568
- .carousel.dragging {
565
+ // A drag writes the scroll position directly, and snapping would pull each
566
+ // write back to a snap point. Each layout that sets scroll-snap-type with
567
+ // more classes than `.carousel.dragging` needs its own arm here.
568
+ .carousel.dragging,
569
+ .carousel.uncontained.snap.dragging,
570
+ .carousel.full-screen.full-screen-horizontal.dragging {
569
571
  > .carousel-track {
570
572
  cursor: grabbing;
571
573
  scroll-behavior: auto;
572
574
  scroll-snap-type: none;
573
575
  user-select: none;
574
576
  }
577
+ }
575
578
 
576
- .carousel-item {
577
- pointer-events: none;
578
- }
579
+ .carousel.dragging .carousel-item {
580
+ pointer-events: none;
579
581
  }
580
582
  }
581
583
 
@@ -21,6 +21,10 @@
21
21
  margin: 0;
22
22
  min-height: 32px;
23
23
  height: auto;
24
+ // 4dp keeps wrapped lines off the edges. It is also exactly what a 24dp
25
+ // avatar or delete target leaves in the 32dp container, so a chip that fits
26
+ // on one line keeps its height.
27
+ padding-block: 4px;
24
28
  padding-left: var(--padding);
25
29
  padding-right: var(--padding);
26
30
  font-size: var(--font-size);
@@ -65,15 +69,7 @@
65
69
  // Filter chip. The checkbox carries the state and the form value; the label is
66
70
  // the chip. Kept focusable rather than `display: none` so it stays reachable.
67
71
  .chip-input {
68
- position: absolute;
69
- width: 1px;
70
- height: 1px;
71
- margin: -1px;
72
- padding: 0;
73
- border: 0;
74
- overflow: hidden;
75
- clip-path: inset(50%);
76
- white-space: nowrap;
72
+ @include visually-hidden;
77
73
  }
78
74
 
79
75
  .chip-input:checked + .chip {
@@ -141,13 +141,6 @@ dialog > :is(form, nav):last-child {
141
141
  padding: 0 24px 24px;
142
142
  border: 0;
143
143
  background: none;
144
-
145
- > :is(button, a.button):not(.icon-button, .circle, .extend) {
146
- max-width: 100%;
147
- height: auto;
148
- min-height: var(--md-comp-filled-button-container-height, 40px);
149
- white-space: normal;
150
- }
151
144
  }
152
145
 
153
146
  dialog:not(
@@ -5,7 +5,7 @@
5
5
  // Anatomy is the HTML. A header whose child is a nav is a top app bar.
6
6
  // Headings are the headline, icon-only links/buttons are the leading and
7
7
  // trailing actions, <menu> / <ul> hold text destinations. Helpers are only
8
- // for variants the markup cannot express: .center, .medium, .large, .fixed.
8
+ // for variants the markup cannot express: .center, .medium, .large.
9
9
  // `.medium` and `.large` are the Expressive flexible bars.
10
10
  // Destinations at the bottom of the screen are nav.navigation-bar, not this.
11
11
  //
@@ -53,7 +53,7 @@ $_heading: ":is(h1, h2, h3, h4, h5, h6)";
53
53
  $_title: ":is(#{$_heading}, hgroup)";
54
54
  $_search: ":is(.search-bar, .searchbar)";
55
55
 
56
- header:has(> :is(nav:not(.navigation-bar, .navigation-rail), .bar)) {
56
+ header:has(> #{$_bar}) {
57
57
  --md-comp-top-app-bar-container-color: var(--md-sys-color-surface);
58
58
  --md-comp-top-app-bar-scrolled-container-color: var(--md-sys-color-surface-container);
59
59
  --md-comp-top-app-bar-headline-color: var(--md-sys-color-on-surface);
@@ -490,18 +490,23 @@ header.large.collapsed:has(> #{$_bar}) > #{$_bar} {
490
490
  }
491
491
  }
492
492
 
493
- // Pin the bar. On scroll, fill with surface-container so it separates
493
+ // Pin every top app bar. On scroll, fill with surface-container so it separates
494
494
  // from the body (M3 Expressive). The animation only drives the mix
495
495
  // progress; a utility class on the header sets background-color itself
496
496
  // and is not overwritten. Without animation-timeline the bar stays at
497
- // rest (surface), the spec default.
498
- header.fixed:has(> :is(nav:not(.navigation-bar, .navigation-rail), .bar)) {
497
+ // rest (surface), the spec default. The @supports guard is load-bearing: an
498
+ // engine that drops animation-timeline runs a 0s animation instead, and
499
+ // fill-mode both holds the scrolled keyframe from the first frame.
500
+ header:has(> #{$_bar}) {
499
501
  position: sticky;
500
502
  top: 0;
501
503
  z-index: 997;
502
- animation: top-app-bar-scroll linear both;
503
- animation-timeline: scroll(root);
504
- animation-range: 0 8px;
504
+
505
+ @supports (animation-timeline: scroll()) {
506
+ animation: top-app-bar-scroll linear both;
507
+ animation-timeline: scroll(root);
508
+ animation-range: 0 8px;
509
+ }
505
510
  }
506
511
 
507
512
  @keyframes top-app-bar-scroll {
@@ -140,14 +140,3 @@ footer:not(:has(> nav:only-child)) > .container > small:last-child {
140
140
  }
141
141
  }
142
142
 
143
- // Sticky: pin the footer to the bottom of a short page. Only when the
144
- // landmark is a direct child of body — not a footer nested in a demo.
145
- body:has(> footer:not(:has(> nav:only-child))) {
146
- min-height: 100dvh;
147
- display: flex;
148
- flex-direction: column;
149
- }
150
-
151
- body:has(> footer:not(:has(> nav:only-child))) > main {
152
- flex: 1 0 auto;
153
- }
@@ -18,7 +18,7 @@
18
18
  // --md-comp-progress-circular-thickness 4px
19
19
 
20
20
  // M3 names this component "Progress indicators", linear and circular. The
21
- // class is `.progress`; `.preloader` is the Materialize name for the circular
21
+ // class is `.progress`; `.preloader` is the older name for the circular
22
22
  // one and stays as an alias, as does `.progress.circular`.
23
23
  .progress,
24
24
  .preloader {
@@ -71,12 +71,24 @@ progress.progress {
71
71
  border-radius: var(--md-comp-progress-shape);
72
72
  }
73
73
 
74
- &:indeterminate::-webkit-progress-value,
74
+ // Firefox draws no ::before/::after on <progress> and paints the track as the
75
+ // element's own background, so its indeterminate bar is the native one. It
76
+ // places that bar from the physical left and reads only margin-left, which is
77
+ // margin-inline-end in RTL, so both inline margins move. Keep this out of any
78
+ // -webkit- selector list: Chromium drops a list naming a pseudo-element it
79
+ // does not know.
75
80
  &:indeterminate::-moz-progress-bar {
76
- background-color: transparent;
81
+ width: 40%;
82
+ margin-inline-end: 60%;
83
+ animation: progress-indeterminate-moz 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
77
84
  }
78
85
  }
79
86
 
87
+ @keyframes progress-indeterminate-moz {
88
+ from { margin-inline-start: -40%; margin-inline-end: 100%; }
89
+ to { margin-inline-start: 100%; margin-inline-end: -40%; }
90
+ }
91
+
80
92
  .progress > .determinate {
81
93
  position: absolute;
82
94
  inset-block: 0;
@@ -107,10 +119,12 @@ progress.progress {
107
119
  }
108
120
  }
109
121
 
110
- .progress > .indeterminate,
111
- progress.progress:indeterminate {
122
+ .progress > .indeterminate {
112
123
  background-color: transparent;
124
+ }
113
125
 
126
+ .progress > .indeterminate,
127
+ progress.progress:indeterminate {
114
128
  &::before,
115
129
  &::after {
116
130
  content: "";
@@ -147,7 +161,7 @@ progress.progress:indeterminate {
147
161
  // ---------------------------------------------------------------------------
148
162
 
149
163
  // The circular indicator. `.progress.circular` is the M3-aligned name;
150
- // `.preloader` is the Materialize one and still works.
164
+ // `.preloader` remains a compatibility alias.
151
165
  :is(.preloader, .progress.circular) {
152
166
  box-sizing: border-box;
153
167
  display: inline-block;
@@ -218,6 +232,7 @@ progress.progress:indeterminate {
218
232
  progress.progress:indeterminate::-moz-progress-bar {
219
233
  background-color: CanvasText;
220
234
  width: 40%;
235
+ animation: none;
221
236
  }
222
237
 
223
238
  :is(.preloader, .progress.circular) {
@@ -254,4 +269,8 @@ progress.progress:indeterminate {
254
269
  .preloader {
255
270
  transform: none;
256
271
  }
272
+
273
+ progress.progress:indeterminate::-moz-progress-bar {
274
+ animation: none;
275
+ }
257
276
  }
@@ -120,7 +120,7 @@ $_bar: ".snackbar";
120
120
  overflow: hidden;
121
121
  }
122
122
 
123
- // Optional leading icon (BeerCSS). M3 snackbars have no leading icon.
123
+ // Optional leading icon. M3 snackbars have no leading icon.
124
124
  > #{$icon}:first-child {
125
125
  flex: 0 0 auto;
126
126
  font-size: 24px;