mtrl 0.10.6 → 0.10.8

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 (147) hide show
  1. package/README.md +7 -3
  2. package/dist/README.md +7 -3
  3. package/dist/components/bottom-app-bar/index.d.ts +1 -1
  4. package/dist/components/bottom-sheet/types.d.ts +2 -0
  5. package/dist/components/button/constants.d.ts +2 -2
  6. package/dist/components/button-group/constants.d.ts +2 -2
  7. package/dist/components/button-group/types.d.ts +1 -1
  8. package/dist/components/card/features.d.ts +1 -1
  9. package/dist/components/card/index.d.ts +9 -9
  10. package/dist/components/card/types.d.ts +4 -4
  11. package/dist/components/carousel/types.d.ts +1 -1
  12. package/dist/components/checkbox/types.d.ts +1 -1
  13. package/dist/components/chips/features/controller.js +0 -2
  14. package/dist/components/chips/types.d.ts +14 -6
  15. package/dist/components/datepicker/index.d.ts +1 -1
  16. package/dist/components/datepicker/types.d.ts +3 -0
  17. package/dist/components/dialog/types.d.ts +14 -1
  18. package/dist/components/drawer/types.d.ts +2 -0
  19. package/dist/components/fab/constants.d.ts +2 -2
  20. package/dist/components/fab-menu/types.d.ts +12 -2
  21. package/dist/components/icon-button/constants.d.ts +2 -2
  22. package/dist/components/icon-button/types.d.ts +1 -1
  23. package/dist/components/index.d.ts +6 -6
  24. package/dist/components/list/types.d.ts +1 -1
  25. package/dist/components/menu/types.d.ts +11 -2
  26. package/dist/components/navigation-rail/types.d.ts +2 -2
  27. package/dist/components/progress/types.d.ts +27 -5
  28. package/dist/components/radios/constants.d.ts +3 -3
  29. package/dist/components/radios/types.d.ts +3 -3
  30. package/dist/components/search/features/suggestions.js +1 -4
  31. package/dist/components/search/types.d.ts +13 -7
  32. package/dist/components/select/constants.d.ts +1 -1
  33. package/dist/components/select/types.d.ts +4 -2
  34. package/dist/components/side-sheet/types.d.ts +2 -0
  35. package/dist/components/slider/types.d.ts +7 -0
  36. package/dist/components/snackbar/types.d.ts +18 -3
  37. package/dist/components/split-button/types.d.ts +3 -2
  38. package/dist/components/switch/index.d.ts +2 -2
  39. package/dist/components/tabs/index.d.ts +16 -16
  40. package/dist/components/tabs/scroll-indicators.js +2 -8
  41. package/dist/components/tabs/types.d.ts +6 -2
  42. package/dist/components/textfield/constants.d.ts +10 -7
  43. package/dist/components/textfield/index.d.ts +7 -7
  44. package/dist/components/textfield/types.d.ts +1 -0
  45. package/dist/components/timepicker/constants.d.ts +1 -1
  46. package/dist/components/timepicker/types.d.ts +4 -2
  47. package/dist/components/tooltip/constants.d.ts +1 -1
  48. package/dist/components/tooltip/types.d.ts +1 -1
  49. package/dist/components/top-app-bar/index.d.ts +1 -1
  50. package/dist/core/compose/features/index.d.ts +11 -0
  51. package/dist/core/compose/features/input.d.ts +3 -3
  52. package/dist/core/config/component.d.ts +1 -1
  53. package/dist/core/dom/create.d.ts +1 -1
  54. package/dist/core/utils/theme.d.ts +1 -1
  55. package/dist/elements/css/search.js +1 -1
  56. package/dist/elements/css/tabs.js +1 -1
  57. package/dist/elements/css/textfield.js +1 -1
  58. package/dist/elements/icon-button.d.ts +2 -2
  59. package/dist/elements/index.d.ts +6 -5
  60. package/dist/elements/preupgrade.css +2 -2
  61. package/dist/elements/preupgrade.js +1 -1
  62. package/dist/elements/search.d.ts +4 -1
  63. package/dist/elements/textfield.d.ts +5 -1
  64. package/dist/elements/timepicker.d.ts +1 -0
  65. package/dist/index.cjs +0 -0
  66. package/dist/index.d.ts +139 -139
  67. package/dist/package.json +17 -1
  68. package/dist/react/index.d.ts +1 -1
  69. package/dist/solid/index.d.ts +1 -1
  70. package/dist/styles/badge.css +1 -1
  71. package/dist/styles/base.css +1 -1
  72. package/dist/styles/bottom-app-bar.css +1 -1
  73. package/dist/styles/bottom-sheet.css +1 -1
  74. package/dist/styles/button-group.css +1 -1
  75. package/dist/styles/button.css +1 -1
  76. package/dist/styles/card.css +1 -1
  77. package/dist/styles/carousel.css +1 -1
  78. package/dist/styles/checkbox.css +1 -1
  79. package/dist/styles/chips.css +1 -1
  80. package/dist/styles/datepicker.css +1 -1
  81. package/dist/styles/dialog.css +1 -1
  82. package/dist/styles/divider.css +1 -1
  83. package/dist/styles/drawer.css +1 -1
  84. package/dist/styles/extended-fab.css +1 -1
  85. package/dist/styles/fab-menu.css +1 -1
  86. package/dist/styles/fab.css +1 -1
  87. package/dist/styles/icon-button.css +1 -1
  88. package/dist/styles/list.css +1 -1
  89. package/dist/styles/loading-indicator.css +1 -1
  90. package/dist/styles/menu.css +1 -1
  91. package/dist/styles/navigation-rail.css +1 -1
  92. package/dist/styles/progress.css +1 -1
  93. package/dist/styles/radios.css +1 -1
  94. package/dist/styles/search.css +2 -2
  95. package/dist/styles/segmented-button.css +1 -1
  96. package/dist/styles/select.css +1 -1
  97. package/dist/styles/side-sheet.css +1 -1
  98. package/dist/styles/slider.css +1 -1
  99. package/dist/styles/snackbar.css +1 -1
  100. package/dist/styles/split-button.css +1 -1
  101. package/dist/styles/switch.css +1 -1
  102. package/dist/styles/tabs.css +2 -2
  103. package/dist/styles/textfield.css +1 -1
  104. package/dist/styles/timepicker.css +1 -1
  105. package/dist/styles/toolbar.css +1 -1
  106. package/dist/styles/tooltip.css +1 -1
  107. package/dist/styles/top-app-bar.css +1 -1
  108. package/dist/styles/utilities.css +1 -1
  109. package/dist/styles.css +2 -2
  110. package/dist/svelte/index.d.ts +1 -1
  111. package/dist/svelte/index.js +1 -1
  112. package/dist/themes/autumn.css +1 -1
  113. package/dist/themes/baseline.css +1 -1
  114. package/dist/themes/brownbeige.css +1 -1
  115. package/dist/themes/browngreen.css +1 -1
  116. package/dist/themes/content.css +1 -1
  117. package/dist/themes/desert.css +1 -1
  118. package/dist/themes/expressive.css +1 -1
  119. package/dist/themes/fidelity.css +1 -1
  120. package/dist/themes/forest.css +1 -1
  121. package/dist/themes/fruit-salad.css +1 -1
  122. package/dist/themes/highcontrast.css +1 -1
  123. package/dist/themes/legacy.css +1 -1
  124. package/dist/themes/material.css +1 -1
  125. package/dist/themes/monochrome.css +1 -1
  126. package/dist/themes/neutral.css +1 -1
  127. package/dist/themes/ocean.css +1 -1
  128. package/dist/themes/rainbow.css +1 -1
  129. package/dist/themes/sageivory.css +1 -1
  130. package/dist/themes/spring.css +1 -1
  131. package/dist/themes/summer.css +1 -1
  132. package/dist/themes/sunset.css +1 -1
  133. package/dist/themes/tealcaramel.css +1 -1
  134. package/dist/themes/vibrant.css +1 -1
  135. package/dist/themes/winter.css +1 -1
  136. package/dist/vue/index.d.ts +1 -1
  137. package/package.json +17 -1
  138. package/src/styles/abstract/_theme.scss +1 -1
  139. package/src/styles/abstract/_variables.scss +4 -4
  140. package/src/styles/components/_search.scss +2 -0
  141. package/src/styles/components/_tabs.scss +2 -0
  142. package/src/styles/components/_text-field.scss +6 -0
  143. package/src/styles/elements/_textfield.scss +14 -0
  144. package/src/styles/themes/_browngreen.scss +1 -1
  145. package/src/styles/themes/_legacy.scss +1 -1
  146. package/src/styles/themes/_material.scss +1 -1
  147. package/src/styles/themes/_winter.scss +1 -1
package/README.md CHANGED
@@ -115,7 +115,7 @@ Or import the base once, followed by the components you use:
115
115
  ```typescript
116
116
  import 'mtrl/styles/base';
117
117
  import 'mtrl/styles/button';
118
- import 'mtrl/styles/textfield';
118
+ import 'mtrl/styles/text-field';
119
119
 
120
120
  // Optional: an alternate theme and the utility classes
121
121
  import 'mtrl/themes/ocean';
@@ -153,7 +153,7 @@ The default baseline also supports this setting without `data-theme`. On that un
153
153
 
154
154
  M3's scheme variants, generated from the baseline seed, ship as their own entries only (not in the full stylesheet): `neutral`, `vibrant`, `expressive`, `fidelity`, `content`, `monochrome`, `rainbow` and `fruit-salad`, for example `mtrl/themes/vibrant`. `schemeToTokens` (`mtrl/core/theme`) turns any M3 scheme's role colours into these tokens.
155
155
 
156
- Deprecated, removed in 1.0: `material` (use `baseline`), `winter` (use `ocean`), `browngreen` (use `brownbeige`) and `legacy`.
156
+ Deprecated themes, removed in the package `material` 3.0.0: the theme `material` (use `baseline`), `winter` (use `ocean`), `browngreen` (use `brownbeige`) and `legacy`.
157
157
 
158
158
  ### Custom properties
159
159
 
@@ -267,7 +267,7 @@ note.setText('Saved');
267
267
  document.body.append(note.element);
268
268
  ```
269
269
 
270
- The element gets the `mtrl-note` class, `withEvents` adds `on`, `off` and `emit`, and `destroy()` removes the element. Add `withLifecycle()` from `mtrl/core/compose/features` when features need to register cleanup.
270
+ The element gets the `mtrl-note` class, `withEvents` adds `on`, `off` and `emit`, and `destroy()` removes the element. Add `withLifecycle()` from `mtrl/core/compose` when features need to register cleanup.
271
271
 
272
272
  ## Markup and sanitizing
273
273
 
@@ -289,6 +289,10 @@ configureHTML({ sanitize: (html) => policy.createHTML(html) });
289
289
 
290
290
  The policy sees every string, the library's own icons included; a `TrustedHTML` value passed as an icon or content skips it. With no policy set, markup is written as it is. Text options (`text`, a card's `text`) never go through `innerHTML`.
291
291
 
292
+ ## Moving to `material`
293
+
294
+ This library continues as the npm package `material`, from version 3.0.0. Stay on the latest `mtrl` 0.10.x until you are ready; then change the package name to `material` (version 3) and follow its migration guide. The `@deprecated` notes and the [changelog](CHANGELOG.md) say what `material` 3.0.0 changes.
295
+
292
296
  ## Upgrading from 0.9
293
297
 
294
298
  0.10.0 adds the elements and framework components; for factory users, most apps need nothing. The changes to check are listed in the [0.10.0 changelog's migration section](CHANGELOG.md#migrating-from-09x): setters no longer emit `change`, the time picker's events pass `{ value }`, the `--mtrl-sys-color-*-rgb` properties are gone, disabled non-form roots use `aria-disabled`, cards are `article`s, and the text field's DOM gained a `__field` wrapper.
package/dist/README.md CHANGED
@@ -115,7 +115,7 @@ Or import the base once, followed by the components you use:
115
115
  ```typescript
116
116
  import 'mtrl/styles/base';
117
117
  import 'mtrl/styles/button';
118
- import 'mtrl/styles/textfield';
118
+ import 'mtrl/styles/text-field';
119
119
 
120
120
  // Optional: an alternate theme and the utility classes
121
121
  import 'mtrl/themes/ocean';
@@ -153,7 +153,7 @@ The default baseline also supports this setting without `data-theme`. On that un
153
153
 
154
154
  M3's scheme variants, generated from the baseline seed, ship as their own entries only (not in the full stylesheet): `neutral`, `vibrant`, `expressive`, `fidelity`, `content`, `monochrome`, `rainbow` and `fruit-salad`, for example `mtrl/themes/vibrant`. `schemeToTokens` (`mtrl/core/theme`) turns any M3 scheme's role colours into these tokens.
155
155
 
156
- Deprecated, removed in 1.0: `material` (use `baseline`), `winter` (use `ocean`), `browngreen` (use `brownbeige`) and `legacy`.
156
+ Deprecated themes, removed in the package `material` 3.0.0: the theme `material` (use `baseline`), `winter` (use `ocean`), `browngreen` (use `brownbeige`) and `legacy`.
157
157
 
158
158
  ### Custom properties
159
159
 
@@ -267,7 +267,7 @@ note.setText('Saved');
267
267
  document.body.append(note.element);
268
268
  ```
269
269
 
270
- The element gets the `mtrl-note` class, `withEvents` adds `on`, `off` and `emit`, and `destroy()` removes the element. Add `withLifecycle()` from `mtrl/core/compose/features` when features need to register cleanup.
270
+ The element gets the `mtrl-note` class, `withEvents` adds `on`, `off` and `emit`, and `destroy()` removes the element. Add `withLifecycle()` from `mtrl/core/compose` when features need to register cleanup.
271
271
 
272
272
  ## Markup and sanitizing
273
273
 
@@ -289,6 +289,10 @@ configureHTML({ sanitize: (html) => policy.createHTML(html) });
289
289
 
290
290
  The policy sees every string, the library's own icons included; a `TrustedHTML` value passed as an icon or content skips it. With no policy set, markup is written as it is. Text options (`text`, a card's `text`) never go through `innerHTML`.
291
291
 
292
+ ## Moving to `material`
293
+
294
+ This library continues as the npm package `material`, from version 3.0.0. Stay on the latest `mtrl` 0.10.x until you are ready; then change the package name to `material` (version 3) and follow its migration guide. The `@deprecated` notes and the [changelog](CHANGELOG.md) say what `material` 3.0.0 changes.
295
+
292
296
  ## Upgrading from 0.9
293
297
 
294
298
  0.10.0 adds the elements and framework components; for factory users, most apps need nothing. The changes to check are listed in the [0.10.0 changelog's migration section](CHANGELOG.md#migrating-from-09x): setters no longer emit `change`, the time picker's events pass `{ value }`, the `--mtrl-sys-color-*-rgb` properties are gone, disabled non-form roots use `aria-disabled`, cards are `article`s, and the text field's DOM gained a `__field` wrapper.
@@ -6,5 +6,5 @@ import { createBottomAppBar } from "./bottom-app-bar.js";
6
6
  export default createBottomAppBar;
7
7
  export { createBottomAppBar };
8
8
  export type { BottomAppBarConfig, BottomAppBar as BottomAppBarComponent,
9
- /** @deprecated Use BottomAppBarComponent, the name every component type has. Removed in 1.0 (FLO-383). */
9
+ /** @deprecated Use BottomAppBarComponent, the name every component type has. Removed in `material` 3.0.0 (FLO-383). */
10
10
  BottomAppBar, } from "./types.js";
@@ -68,6 +68,8 @@ export interface BottomSheetConfig {
68
68
  closeOnScrimClick?: boolean;
69
69
  /**
70
70
  * Whether Escape closes a modal sheet.
71
+ * A limit on 0.10.x, fixed in `material` 3.0.0: with `layer: "top"` and this option
72
+ * `false`, the third Escape still closes it.
71
73
  * @default true
72
74
  */
73
75
  closeOnEscape?: boolean;
@@ -73,8 +73,8 @@ export declare const BUTTON_CLASSES: {
73
73
  */
74
74
  export declare const DEFAULT_RIPPLE_CONFIG: {
75
75
  readonly DURATION: 450;
76
- /** @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in 1.0. */
76
+ /** @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in `material` 3.0.0. */
77
77
  readonly TIMING: "cubic-bezier(0.4, 0.0, 0.2, 1)";
78
- /** @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in 1.0. */
78
+ /** @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in `material` 3.0.0. */
79
79
  readonly OPACITY: readonly ["0.7", "0"];
80
80
  };
@@ -162,12 +162,12 @@ export declare const BUTTON_GROUP_DEFAULTS: {
162
162
  readonly RIPPLE_DURATION: 300;
163
163
  /**
164
164
  * Default ripple animation timing function
165
- * @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in 1.0.
165
+ * @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in `material` 3.0.0.
166
166
  */
167
167
  readonly RIPPLE_TIMING: "cubic-bezier(0.4, 0, 0.2, 1)";
168
168
  /**
169
169
  * Default ripple opacity values [start, end]
170
- * @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in 1.0.
170
+ * @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in `material` 3.0.0.
171
171
  */
172
172
  readonly RIPPLE_OPACITY: [string, string];
173
173
  };
@@ -218,7 +218,7 @@ export interface ButtonGroupConfig {
218
218
  ariaLabel?: string;
219
219
  /**
220
220
  * Event handlers for button group events. On 0.10.x this map is accepted
221
- * and never called: subscribe with `on(event, handler)` on the group. In 1.0
221
+ * and never called: subscribe with `on(event, handler)` on the group. In `material` 3.0.0
222
222
  * the handlers run, with the listener's argument.
223
223
  */
224
224
  on?: {
@@ -56,7 +56,7 @@ export declare const withLoading: (config?: LoadingConfig) => (component: BaseCo
56
56
  * that no stylesheet reads. A card's elevation comes from its variant and
57
57
  * state classes in the stylesheet.
58
58
  *
59
- * @deprecated Since 0.10 (FLO-323): a no-op, removed in 1.0. Drop it from
59
+ * @deprecated Since 0.10 (FLO-323): a no-op, removed in `material` 3.0.0. Drop it from
60
60
  * the composition.
61
61
  * @category Components
62
62
  */
@@ -66,24 +66,24 @@ export { default } from "./card.js";
66
66
  * These types define the structure and behavior of the Card component.
67
67
  */
68
68
  export type { CardVariant, CardElevationLevel, CardSchema as CardConfig,
69
- /** @deprecated Use CardConfig. Removed in 1.0 (FLO-383). */
69
+ /** @deprecated Use CardConfig. Removed in `material` 3.0.0 (FLO-383). */
70
70
  CardSchema, CardHeaderConfig, CardContentConfig, CardActionsConfig, CardMediaConfig, CardAriaAttributes, CardComponent, CardEvents,
71
- /** @deprecated Internal, no replacement: removed from mtrl/components/card in 1.0.0 (FLO-381). */
71
+ /** @deprecated Internal, no replacement: removed from mtrl/components/card in `material` 3.0.0 (FLO-381). */
72
72
  LoadingFeature,
73
- /** @deprecated Internal, no replacement: removed from mtrl/components/card in 1.0.0 (FLO-381). */
73
+ /** @deprecated Internal, no replacement: removed from mtrl/components/card in `material` 3.0.0 (FLO-381). */
74
74
  ExpandableFeature,
75
- /** @deprecated Internal, no replacement: removed from mtrl/components/card in 1.0.0 (FLO-381). */
75
+ /** @deprecated Internal, no replacement: removed from mtrl/components/card in `material` 3.0.0 (FLO-381). */
76
76
  SwipeableFeature, } from "./types.js";
77
77
  export { createCardContent, createCardHeader, createCardActions, createCardMedia, } from "./content.js";
78
78
  export {
79
- /** @deprecated Internal, no replacement: removed from mtrl/components/card in 1.0.0 (FLO-381). */
79
+ /** @deprecated Internal, no replacement: removed from mtrl/components/card in `material` 3.0.0 (FLO-381). */
80
80
  withAPI, } from "./api.js";
81
81
  export {
82
- /** @deprecated Internal, no replacement: removed from mtrl/components/card in 1.0.0 (FLO-381). */
82
+ /** @deprecated Internal, no replacement: removed from mtrl/components/card in `material` 3.0.0 (FLO-381). */
83
83
  withLoading,
84
- /** @deprecated Internal, no replacement: removed from mtrl/components/card in 1.0.0 (FLO-381). */
84
+ /** @deprecated Internal, no replacement: removed from mtrl/components/card in `material` 3.0.0 (FLO-381). */
85
85
  withExpandable,
86
- /** @deprecated Internal, no replacement: removed from mtrl/components/card in 1.0.0 (FLO-381). */
86
+ /** @deprecated Internal, no replacement: removed from mtrl/components/card in `material` 3.0.0 (FLO-381). */
87
87
  withSwipeable,
88
- /** @deprecated Internal, no replacement: removed from mtrl/components/card in 1.0.0 (FLO-381). */
88
+ /** @deprecated Internal, no replacement: removed from mtrl/components/card in `material` 3.0.0 (FLO-381). */
89
89
  withElevation, } from "./features.js";
@@ -224,7 +224,7 @@ export interface BaseComponent {
224
224
  getElementClass: (base: string, element: string) => string;
225
225
  /** Add CSS class(es) */
226
226
  addClass: (...classes: string[]) => BaseComponent;
227
- /** Emit an event. In 1.0, `emit` accepts only the card's own events ({@link CardEvents}). */
227
+ /** Emit an event. In `material` 3.0.0, `emit` accepts only the card's own events ({@link CardEvents}). */
228
228
  emit?: (event: string, data?: unknown) => void;
229
229
  /** Component configuration */
230
230
  config: CardComponentConfig;
@@ -446,19 +446,19 @@ export interface CardComponent extends BaseComponent {
446
446
  /**
447
447
  * Optional loading feature
448
448
  * @deprecated Never set by `createCard`: only the deprecated `withLoading` feature adds it.
449
- * Removed in 1.0 with that feature (FLO-381).
449
+ * Removed in `material` 3.0.0 with that feature (FLO-381).
450
450
  */
451
451
  loading?: LoadingFeature;
452
452
  /**
453
453
  * Optional expandable feature
454
454
  * @deprecated Never set by `createCard`: only the deprecated `withExpandable` feature adds it.
455
- * Removed in 1.0 with that feature (FLO-381).
455
+ * Removed in `material` 3.0.0 with that feature (FLO-381).
456
456
  */
457
457
  expandable?: ExpandableFeature;
458
458
  /**
459
459
  * Optional swipeable feature
460
460
  * @deprecated Never set by `createCard`: only the deprecated `withSwipeable` feature adds it.
461
- * Removed in 1.0 with that feature (FLO-381).
461
+ * Removed in `material` 3.0.0 with that feature (FLO-381).
462
462
  */
463
463
  swipeable?: SwipeableFeature;
464
464
  }
@@ -1,7 +1,7 @@
1
1
  import type { ForwardedEventPayload } from "../../core/dom/index.js";
2
2
  /** Current item reported by programmatic navigation or native scrolling. */
3
3
  export interface CarouselChangePayload {
4
- /** The current item's index. In 1.0 the payload carries it as `value`, and `index` is gone. */
4
+ /** The current item's index. In `material` 3.0.0 the payload carries it as `value`, and `index` is gone. */
5
5
  index: number;
6
6
  }
7
7
  /** Events emitted by the scroll feature and forwarded from the root. */
@@ -7,7 +7,7 @@ import type { EventCallback } from "../../core/state/emitter.js";
7
7
  * - filled: Checkbox with filled background when checked (default)
8
8
  * - outlined: Checkbox with outline only, for less visual emphasis
9
9
  * @deprecated The type of the deprecated `variant` option, which has no effect: M3 has one
10
- * checkbox style (FLO-94, FLO-265). Removed in 1.0.
10
+ * checkbox style (FLO-94, FLO-265). Removed in `material` 3.0.0.
11
11
  */
12
12
  export type CheckboxVariant = "filled" | "outlined";
13
13
  /**
@@ -114,7 +114,6 @@ export const withController = (config) => (component) => {
114
114
  chipRect.height / 2;
115
115
  container.scrollTo({
116
116
  top: Math.max(0, scrollTop),
117
- behavior: "smooth",
118
117
  });
119
118
  }
120
119
  else {
@@ -124,7 +123,6 @@ export const withController = (config) => (component) => {
124
123
  chipRect.width / 2;
125
124
  container.scrollTo({
126
125
  left: Math.max(0, scrollLeft),
127
- behavior: "smooth",
128
126
  });
129
127
  }
130
128
  }
@@ -36,9 +36,13 @@ export interface ChipConfig {
36
36
  trailingLabel?: string;
37
37
  /** The trailing button opens a menu: aria-haspopup="menu", and a drop-down arrow unless trailingIcon is set. */
38
38
  trailingMenu?: boolean;
39
- /** In 1.0 a chip's `onClick` receives the `click` payload, `{ event, originalEvent, element }`, not the chip. */
39
+ /**
40
+ * In `material` 3.0.0 a chip's `onClick` receives the `click` payload, `{ event, originalEvent, element }`, not the chip.
41
+ * It then runs before the chip toggles, alone or in a set: `isSelected()` inside it is
42
+ * the state before the click (today it runs after the toggle). Read the new state in `onChange`.
43
+ */
40
44
  onClick?: (chip: ChipComponent) => void;
41
- /** In 1.0 a chip's `onChange` receives one object, `{ selected, chip, value }`, the `change` payload. */
45
+ /** In `material` 3.0.0 a chip's `onChange` receives one object, `{ selected, chip, value }`, the `change` payload. */
42
46
  onChange?: (selected: boolean, chip: ChipComponent) => void;
43
47
  onSelect?: (chip: ChipComponent) => void;
44
48
  class?: string;
@@ -47,13 +51,13 @@ export interface ChipConfig {
47
51
  ripple?: boolean;
48
52
  /**
49
53
  * @internal Selection belongs to the chips container.
50
- * @deprecated Not for apps: moves out of ChipConfig in 1.0.0 (FLO-381).
54
+ * @deprecated Not for apps: moves out of ChipConfig in `material` 3.0.0 (FLO-381).
51
55
  */
52
56
  managedSelection?: boolean;
53
57
  /**
54
58
  * @internal The chip is a cell of a chip set's grid (FLO-261): the root is a
55
59
  * `gridcell`, and a one-action chip's cell is its focus target.
56
- * @deprecated Not for apps: moves out of ChipConfig in 1.0.0 (FLO-381).
60
+ * @deprecated Not for apps: moves out of ChipConfig in `material` 3.0.0 (FLO-381).
57
61
  */
58
62
  cell?: boolean;
59
63
  }
@@ -150,12 +154,15 @@ export interface ChipsConfig {
150
154
  * Whether the set keeps at least one chip selected: deselecting the last selected
151
155
  * chip is refused. Off by default, as in Material; single-select sets used to
152
156
  * enforce it without a way to opt out. FLO-257.
157
+ * In `material` 3.0.0 a refused click emits no `change` and calls no `onChange` and no
158
+ * `onSelect` (today the set emits `change` and both callbacks run, with the
159
+ * chip still selected).
153
160
  * @default false
154
161
  */
155
162
  selectionRequired?: boolean;
156
163
  /**
157
164
  * Callback function when chip selection changes.
158
- * In 1.0 it receives one object, `{ value, selected, changed }` (no array, no
165
+ * In `material` 3.0.0 it receives one object, `{ value, selected, changed }` (no array, no
159
166
  * second argument), and also hears `selectByValue(values, true)`.
160
167
  */
161
168
  onChange?: (event: ChipsChangeEvent, changedValue: string | null) => void;
@@ -343,7 +350,8 @@ export interface ChipsComponent {
343
350
  */
344
351
  getLabelPosition: () => string;
345
352
  /**
346
- * Scrolls to a specific chip
353
+ * Scrolls to a specific chip. A scrollable set scrolls smoothly, from its
354
+ * stylesheet, and at once under reduced motion.
347
355
  * @param chipOrIndex - Chip instance or index to scroll to
348
356
  * @returns The chips instance for chaining
349
357
  */
@@ -1,5 +1,5 @@
1
1
  export { default } from "./datepicker.js";
2
2
  export type { DatePickerConfig, DatePickerComponent, DatePickerEvents, DatePickerValue, DatePickerValueOf, DatePickerInput, DatePickerChangePayload, DatePickerVisibilityPayload, DatePickerTapPayload, DatePickerSwipePayload, DatePickerVariant, DatePickerView, DatePickerSelectionMode, } from "./types.js";
3
3
  export {
4
- /** @deprecated Internal, no replacement: removed from mtrl/components/datepicker in 1.0.0 (FLO-381). */
4
+ /** @deprecated Internal, no replacement: removed from mtrl/components/datepicker in `material` 3.0.0 (FLO-381). */
5
5
  DEFAULT_DATE_FORMAT, } from "./types.js";
@@ -290,6 +290,9 @@ export interface DatePickerComponent<V = DatePickerValue> {
290
290
  getClass: (name: string) => string;
291
291
  /**
292
292
  * Opens the datepicker dropdown/modal
293
+ * A limit on 0.10.x, fixed in `material` 3.0.0: a docked picker opened with `open()` from
294
+ * a click outside it is closed again by that same click. Call `open()` once
295
+ * the click has finished (for example from a `setTimeout`).
293
296
  * @returns The datepicker component for chaining
294
297
  */
295
298
  open: () => DatePickerComponent<V>;
@@ -125,6 +125,12 @@ export interface DialogConfig {
125
125
  closeOnOverlayClick?: boolean;
126
126
  /**
127
127
  * Whether to close when Escape key is pressed
128
+ * A limit on 0.10.x, fixed in `material` 3.0.0: a `layer: "top"` dialog that refuses
129
+ * Escape (this option `false`, or a `beforeclose` listener that prevents it)
130
+ * is still closed by the third press.
131
+ * In `material` 3.0.0 Escape is handled as a key press in both layers: only the topmost
132
+ * open modal answers, after what is open inside it (a menu, a select) has
133
+ * used the key, and never for the key press that opened it.
128
134
  * @default true
129
135
  */
130
136
  closeOnEscape?: boolean;
@@ -217,7 +223,7 @@ export interface DialogButton {
217
223
  /**
218
224
  * Has no effect: the button has no colour option, and M3's dialog actions
219
225
  * are text buttons in the dialog's own colours.
220
- * @deprecated Since 0.10 (FLO-324); removed in 1.0.
226
+ * @deprecated Since 0.10 (FLO-324); removed in `material` 3.0.0.
221
227
  */
222
228
  color?: string;
223
229
  /**
@@ -365,12 +371,19 @@ export interface DialogComponent {
365
371
  /**
366
372
  * Opens the dialog
367
373
  * Displays the dialog with animation
374
+ * In `material` 3.0.0 `open` is emitted inside `open()`, and `isOpen()` is true when it
375
+ * returns (without `layer: "top"` both come about 10 ms later today). A
376
+ * listener added after calling `open()` then no longer hears `open`: add it
377
+ * before the call, or listen to `afteropen`. A second `open()` emits nothing.
368
378
  * @returns Dialog component for method chaining
369
379
  */
370
380
  open: () => DialogComponent;
371
381
  /**
372
382
  * Closes the dialog
373
383
  * Hides the dialog with animation
384
+ * In `material` 3.0.0 `close()` on a closed dialog does nothing and emits nothing (today
385
+ * it emits `beforeclose`, `close` and `afterclose` again), and `close()` then
386
+ * `open()` at once ends open.
374
387
  * @returns Dialog component for method chaining
375
388
  */
376
389
  close: () => DialogComponent;
@@ -82,6 +82,8 @@ export interface DrawerConfig extends BaseComponentConfig {
82
82
  open?: boolean;
83
83
  /**
84
84
  * Whether the modal drawer can be dismissed by clicking the scrim
85
+ * A limit on 0.10.x, fixed in `material` 3.0.0: with `layer: "top"` and this option
86
+ * `false`, the third Escape still closes the drawer.
85
87
  * @default true
86
88
  */
87
89
  dismissible?: boolean;
@@ -53,7 +53,7 @@ export declare const FAB_CLASSES: {
53
53
  readonly ICON: "fab__icon";
54
54
  /** Applied when FAB is lowered (pressed state) */
55
55
  readonly LOWERED: "fab--lowered";
56
- /** @deprecated Applied to small FABs; the small size is deprecated (FAB_SIZES.SMALL). Removed in 1.0. */
56
+ /** @deprecated Applied to small FABs; the small size is deprecated (FAB_SIZES.SMALL). Removed in `material` 3.0.0. */
57
57
  readonly SMALL: "fab--small";
58
58
  /** Applied to medium FABs */
59
59
  readonly MEDIUM: "fab--medium";
@@ -72,7 +72,7 @@ export declare const FAB_TYPES: {
72
72
  * Default icon sizes based on FAB size
73
73
  */
74
74
  export declare const FAB_ICON_SIZES: {
75
- /** @deprecated The small FAB's icon size; the small size is deprecated (FAB_SIZES.SMALL). Removed in 1.0. */
75
+ /** @deprecated The small FAB's icon size; the small size is deprecated (FAB_SIZES.SMALL). Removed in `material` 3.0.0. */
76
76
  readonly SMALL: "24px";
77
77
  readonly DEFAULT: "24px";
78
78
  readonly MEDIUM: "28px";
@@ -97,9 +97,19 @@ export interface FabMenuComponent extends ElementComponent {
97
97
  fab: HTMLElement;
98
98
  /** The list of the list presentation: `role="menu"` */
99
99
  list: HTMLElement;
100
- /** Opens the menu */
100
+ /**
101
+ * Opens the menu
102
+ * In `material` 3.0.0, in the `menu` presentation, `isOpen()` is true and `open` has been
103
+ * emitted when `open()` returns (today both wait for the menu's module to
104
+ * load); the surface is shown when the module has arrived.
105
+ */
101
106
  open(event?: Event): this;
102
- /** Closes the menu */
107
+ /**
108
+ * Closes the menu
109
+ * In `material` 3.0.0, in the `menu` presentation, `close` is emitted inside `close()`
110
+ * (about 50 ms later today), and a `close()` before the surface has arrived
111
+ * ends closed (today it is ignored, and the menu then opens).
112
+ */
103
113
  close(): this;
104
114
  /** Opens or closes the menu */
105
115
  toggle(event?: Event): this;
@@ -115,9 +115,9 @@ export declare const ICON_BUTTON_CLASSES: {
115
115
  */
116
116
  export declare const DEFAULT_RIPPLE_CONFIG: {
117
117
  readonly DURATION: 450;
118
- /** @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in 1.0. */
118
+ /** @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in `material` 3.0.0. */
119
119
  readonly TIMING: "cubic-bezier(0.4, 0.0, 0.2, 1)";
120
- /** @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in 1.0. */
120
+ /** @deprecated Has no effect: the option it is the default of is never applied (FLO-268). Removed in `material` 3.0.0. */
121
121
  readonly OPACITY: [string, string];
122
122
  };
123
123
  /**
@@ -75,7 +75,7 @@ export interface IconButtonConfig extends BaseComponentConfig {
75
75
  * When true, the button can be selected/unselected
76
76
  *
77
77
  * A click emits `change`. The DOM `toggle` event the button also dispatches
78
- * is deprecated and removed in 1.0: listen to `change`.
78
+ * is deprecated and removed in `material` 3.0.0: listen to `change`.
79
79
  *
80
80
  * @default false
81
81
  */
@@ -51,7 +51,7 @@ export { default as createTabs } from "./tabs/index.js";
51
51
  export { createTab } from "./tabs/tab.js";
52
52
  export { default as createTextField } from "./textfield/index.js";
53
53
  export {
54
- /** @deprecated Use createTextField: M3 writes "text field" as two words. Removed in 1.0 (FLO-383). */
54
+ /** @deprecated Use createTextField: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
55
55
  default as createTextfield, } from "./textfield/index.js";
56
56
  export { default as createTimePicker } from "./timepicker/index.js";
57
57
  export { default as createToolbar } from "./toolbar/index.js";
@@ -60,14 +60,14 @@ export { default as createTooltip } from "./tooltip/index.js";
60
60
  export { createCardContent, createCardHeader, createCardActions, createCardMedia, } from "./card/content.js";
61
61
  export type { BadgeConfig, BadgeComponent } from "./badge/types.js";
62
62
  export type { BottomAppBarConfig, BottomAppBar as BottomAppBarComponent,
63
- /** @deprecated Use BottomAppBarComponent, the name every component type has. Removed in 1.0 (FLO-383). */
63
+ /** @deprecated Use BottomAppBarComponent, the name every component type has. Removed in `material` 3.0.0 (FLO-383). */
64
64
  BottomAppBar, } from "./bottom-app-bar/types.js";
65
65
  export type { BottomSheetConfig, BottomSheetComponent, BottomSheetVariant, BottomSheetState, BottomSheetStateEvent, BottomSheetEventHandlers, } from "./bottom-sheet/types.js";
66
66
  export type { SideSheetConfig, SideSheetComponent, SideSheetVariant, SideSheetPosition, SideSheetEventHandlers, } from "./side-sheet/types.js";
67
67
  export type { ButtonConfig, ButtonComponent, ButtonVariant, } from "./button/types.js";
68
68
  export type { ButtonGroupConfig, ButtonGroupComponent, ButtonGroupItemConfig, ButtonGroupEvent, ButtonGroupEventType, ButtonGroupVariant, ButtonGroupOrientation, ButtonGroupDensity, } from "./button-group/types.js";
69
69
  export type { CardSchema as CardConfig,
70
- /** @deprecated Use CardConfig. Removed in 1.0 (FLO-383). */
70
+ /** @deprecated Use CardConfig. Removed in `material` 3.0.0 (FLO-383). */
71
71
  CardSchema, } from "./card/types.js";
72
72
  export type { CarouselConfig, CarouselComponent } from "./carousel/types.js";
73
73
  export type { CheckboxConfig, CheckboxComponent } from "./checkbox/types.js";
@@ -94,14 +94,14 @@ export type { SnackbarConfig, SnackbarComponent } from "./snackbar/types.js";
94
94
  export type { SwitchConfig, SwitchComponent } from "./switch/types.js";
95
95
  export type { TabsConfig, TabsComponent, TabConfig, TabComponent, } from "./tabs/types.js";
96
96
  export type { TextfieldConfig as TextFieldConfig, TextfieldComponent as TextFieldComponent,
97
- /** @deprecated Use TextFieldConfig: M3 writes "text field" as two words. Removed in 1.0 (FLO-383). */
97
+ /** @deprecated Use TextFieldConfig: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
98
98
  TextfieldConfig,
99
- /** @deprecated Use TextFieldComponent: M3 writes "text field" as two words. Removed in 1.0 (FLO-383). */
99
+ /** @deprecated Use TextFieldComponent: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
100
100
  TextfieldComponent, } from "./textfield/types.js";
101
101
  export type { TimePickerConfig, TimePickerComponent } from "./timepicker/types.js";
102
102
  export type { FabMenuConfig, FabMenuComponent, FabMenuEvents, FabMenuItem } from "./fab-menu/types.js";
103
103
  export type { ToolbarConfig, ToolbarComponent, ToolbarEvents, ToolbarItem, } from "./toolbar/types.js";
104
104
  export type { TopAppBarConfig, TopAppBar as TopAppBarComponent,
105
- /** @deprecated Use TopAppBarComponent, the name every component type has. Removed in 1.0 (FLO-383). */
105
+ /** @deprecated Use TopAppBarComponent, the name every component type has. Removed in `material` 3.0.0 (FLO-383). */
106
106
  TopAppBar, } from "./top-app-bar/types.js";
107
107
  export type { TooltipConfig, TooltipComponent } from "./tooltip/types.js";
@@ -377,7 +377,7 @@ export interface ListEvents<T = unknown> {
377
377
  select: (event: SelectEvent<T>) => void;
378
378
  load: (event: LoadEvent<T>) => void;
379
379
  scroll: (event: ForwardedEventPayload<Event, HTMLElement> & {
380
- /** @deprecated Never sent: the root's scroll is forwarded without it. Removed in 1.0 (FLO-380, FLO-384). */
380
+ /** @deprecated Never sent: the root's scroll is forwarded without it. Removed in `material` 3.0.0 (FLO-380, FLO-384). */
381
381
  component?: ListComponent<T>;
382
382
  }) => void;
383
383
  keydown: (event: ForwardedEventPayload<KeyboardEvent, HTMLElement>) => void;
@@ -308,9 +308,14 @@ export interface MenuEvent {
308
308
  menu: MenuComponent;
309
309
  /** Original DOM event if available */
310
310
  originalEvent?: Event;
311
- /** Function to prevent default behavior */
311
+ /**
312
+ * Function to prevent default behavior
313
+ * In `material` 3.0.0 the `open` and `close` payloads have no `preventDefault` and no
314
+ * `defaultPrevented`: these two events cannot be cancelled. The `select`
315
+ * payload keeps both.
316
+ */
312
317
  preventDefault: () => void;
313
- /** Whether default behavior was prevented */
318
+ /** Whether default behavior was prevented. In `material` 3.0.0 on the `select` payload only. */
314
319
  defaultPrevented: boolean;
315
320
  }
316
321
  /**
@@ -345,6 +350,10 @@ export interface MenuComponent {
345
350
  open: (event?: Event, interactionType?: "mouse" | "keyboard") => MenuComponent;
346
351
  /**
347
352
  * Closes the menu
353
+ * In `material` 3.0.0 `close` is emitted inside `close()` and `isOpen()` is false when it
354
+ * returns (both come about 50 ms later today), while the menu is still in
355
+ * the document; and `close()` then `open()` at once reopens it (today the
356
+ * `open()` is ignored).
348
357
  * @param event - Optional event that triggered the close
349
358
  * @param restoreFocus - Whether focus returns to the opener (default true)
350
359
  * @param skipAnimation - Whether to close without the exit animation
@@ -50,9 +50,9 @@ export interface NavigationRailConfig extends BaseComponentConfig {
50
50
  header?: HTMLElement;
51
51
  ripple?: boolean;
52
52
  onSelect?: (event: NavigationRailSelectEvent) => void;
53
- /** In 1.0 it receives `{ expanded: true }`, the object an `expand` listener receives. */
53
+ /** In `material` 3.0.0 it receives `{ expanded: true }`, the object an `expand` listener receives. */
54
54
  onExpand?: () => void;
55
- /** In 1.0 it receives `{ expanded: false }`, the object a `collapse` listener receives. */
55
+ /** In `material` 3.0.0 it receives `{ expanded: false }`, the object a `collapse` listener receives. */
56
56
  onCollapse?: () => void;
57
57
  }
58
58
  export interface NavigationRailComponent {
@@ -135,15 +135,37 @@ export interface ProgressEvents {
135
135
  export interface ProgressComponent {
136
136
  /** The component's root DOM element */
137
137
  element: HTMLElement;
138
- /** The track element (unfilled part) - always an SVG element */
138
+ /**
139
+ * The track element (unfilled part) - always an SVG element
140
+ * @deprecated Internal in `material` 3.0.0 and off the public type; no replacement: it
141
+ * was never meant to be driven from outside. It named a part of the SVG the canvas
142
+ * replaced.
143
+ */
139
144
  track: SVGElement;
140
- /** The indicator element (filled part) - always an SVG element */
145
+ /**
146
+ * The indicator element (filled part) - always an SVG element
147
+ * @deprecated Internal in `material` 3.0.0 and off the public type; no replacement: it
148
+ * was never meant to be driven from outside. It named a part of the SVG the canvas
149
+ * replaced.
150
+ */
141
151
  indicator: SVGElement;
142
- /** The canvas the indicator is drawn on */
152
+ /**
153
+ * The canvas the indicator is drawn on
154
+ * @deprecated Internal in `material` 3.0.0 and off the public type; the canvas is the
155
+ * element's own: `progress.element.querySelector('canvas')`.
156
+ */
143
157
  canvas?: HTMLCanvasElement;
144
- /** Re-measures the canvas and redraws; the component does this on resize */
158
+ /**
159
+ * Re-measures the canvas and redraws; the component does this on resize
160
+ * @deprecated Internal in `material` 3.0.0 and off the public type; no replacement: the
161
+ * component observes its own size and redraws itself.
162
+ */
145
163
  resize?: () => void;
146
- /** The buffer element for linear variant (pre-loaded state) - always an SVG element */
164
+ /**
165
+ * The buffer element for linear variant (pre-loaded state) - always an SVG element
166
+ * @deprecated Internal in `material` 3.0.0 and off the public type; the buffer's value
167
+ * is set with `setBuffer()` and read with `getBuffer()`.
168
+ */
147
169
  buffer?: SVGElement;
148
170
  /**
149
171
  * Gets a class name with the component's prefix
@@ -69,13 +69,13 @@ export declare const RADIO_EVENTS: {
69
69
  * Default configuration values
70
70
  */
71
71
  export declare const RADIO_DEFAULTS: {
72
- /** @deprecated The radios have no variant option; nothing reads this. Removed in 1.0. */
72
+ /** @deprecated The radios have no variant option; nothing reads this. Removed in `material` 3.0.0. */
73
73
  readonly VARIANT: "standard";
74
74
  /** Default radio direction */
75
75
  readonly DIRECTION: "vertical";
76
- /** @deprecated The radios have no label position option; nothing reads this. Removed in 1.0. */
76
+ /** @deprecated The radios have no label position option; nothing reads this. Removed in `material` 3.0.0. */
77
77
  readonly LABEL_POSITION: "right";
78
- /** @deprecated The radios have no size option; nothing reads this. Removed in 1.0. */
78
+ /** @deprecated The radios have no size option; nothing reads this. Removed in `material` 3.0.0. */
79
79
  readonly SIZE: "medium";
80
80
  };
81
81
  /**