material 3.10.0 → 3.10.1

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 (206) hide show
  1. package/NOTICE +3 -1
  2. package/README.md +2 -2
  3. package/dist/components/badge/index.d.ts +6 -6
  4. package/dist/components/card/index.d.ts +13 -13
  5. package/dist/components/checkbox/index.d.ts +3 -3
  6. package/dist/components/chips/index.d.ts +10 -10
  7. package/dist/components/datepicker/index.d.ts +12 -12
  8. package/dist/components/datepicker/render.js +3 -3
  9. package/dist/components/datepicker/utils.js +1 -1
  10. package/dist/components/dialog/index.d.ts +9 -9
  11. package/dist/components/divider/index.d.ts +2 -5
  12. package/dist/components/list/index.d.ts +4 -4
  13. package/dist/components/loading-indicator/index.d.ts +11 -14
  14. package/dist/components/menu/inner.d.ts +2 -2
  15. package/dist/components/menu/on-demand.d.ts +5 -9
  16. package/dist/components/menu/types.d.ts +7 -7
  17. package/dist/components/progress/types.d.ts +5 -5
  18. package/dist/components/search/features/states.js +17 -36
  19. package/dist/components/search/index.d.ts +22 -22
  20. package/dist/components/select/index.d.ts +4 -4
  21. package/dist/components/slider/index.d.ts +10 -10
  22. package/dist/components/snackbar/index.d.ts +10 -10
  23. package/dist/components/split-button/types.d.ts +3 -3
  24. package/dist/components/switch/index.d.ts +3 -3
  25. package/dist/components/tabs/index.d.ts +32 -54
  26. package/dist/components/text-field/index.d.ts +22 -29
  27. package/dist/components/timepicker/dial.js +30 -3
  28. package/dist/components/timepicker/index.d.ts +2 -2
  29. package/dist/components/timepicker/render.js +11 -8
  30. package/dist/components/tooltip/index.d.ts +2 -2
  31. package/dist/core/canvas/utils.js +3 -13
  32. package/dist/core/compose/cleanup.d.ts +1 -1
  33. package/dist/core/compose/index.d.ts +10 -13
  34. package/dist/core/config/component.d.ts +1 -4
  35. package/dist/core/dom/create.d.ts +1 -4
  36. package/dist/core/dom/index.d.ts +10 -22
  37. package/dist/core/navigation/destinations.d.ts +6 -6
  38. package/dist/core/shapes/index.d.ts +3 -3
  39. package/dist/core/utils/index.d.ts +1 -4
  40. package/dist/core/utils/mobile.d.ts +2 -2
  41. package/dist/elements/adapter.d.ts +3 -3
  42. package/dist/elements/css/datepicker.css +1 -1
  43. package/dist/elements/css/timepicker.css +1 -1
  44. package/dist/elements/define.d.ts +3 -3
  45. package/dist/elements/index.d.ts +3 -3
  46. package/dist/elements/preupgrade/badge.css +1 -1
  47. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  48. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  49. package/dist/elements/preupgrade/button-group.css +1 -1
  50. package/dist/elements/preupgrade/button.css +1 -1
  51. package/dist/elements/preupgrade/card.css +1 -1
  52. package/dist/elements/preupgrade/carousel.css +1 -1
  53. package/dist/elements/preupgrade/checkbox.css +1 -1
  54. package/dist/elements/preupgrade/chips.css +1 -1
  55. package/dist/elements/preupgrade/datepicker.css +1 -1
  56. package/dist/elements/preupgrade/dialog.css +1 -1
  57. package/dist/elements/preupgrade/divider.css +1 -1
  58. package/dist/elements/preupgrade/drawer.css +1 -1
  59. package/dist/elements/preupgrade/extended-fab.css +1 -1
  60. package/dist/elements/preupgrade/fab-menu.css +1 -1
  61. package/dist/elements/preupgrade/fab.css +1 -1
  62. package/dist/elements/preupgrade/icon-button.css +1 -1
  63. package/dist/elements/preupgrade/list.css +1 -1
  64. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  65. package/dist/elements/preupgrade/menu.css +1 -1
  66. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  67. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  68. package/dist/elements/preupgrade/progress.css +1 -1
  69. package/dist/elements/preupgrade/radios.css +1 -1
  70. package/dist/elements/preupgrade/search.css +1 -1
  71. package/dist/elements/preupgrade/select.css +1 -1
  72. package/dist/elements/preupgrade/side-sheet.css +1 -1
  73. package/dist/elements/preupgrade/slider.css +1 -1
  74. package/dist/elements/preupgrade/snackbar.css +1 -1
  75. package/dist/elements/preupgrade/split-button.css +1 -1
  76. package/dist/elements/preupgrade/switch.css +1 -1
  77. package/dist/elements/preupgrade/tabs.css +1 -1
  78. package/dist/elements/preupgrade/text-field.css +1 -1
  79. package/dist/elements/preupgrade/timepicker.css +1 -1
  80. package/dist/elements/preupgrade/toolbar.css +1 -1
  81. package/dist/elements/preupgrade/tooltip.css +1 -1
  82. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  83. package/dist/elements/preupgrade.css +1 -1
  84. package/dist/elements/styles.d.ts +7 -7
  85. package/dist/elements/styles.js +2 -2
  86. package/dist/react/create.d.ts +2 -6
  87. package/dist/solid/create.d.ts +2 -7
  88. package/dist/styles/badge.css +1 -1
  89. package/dist/styles/base-lite.css +1 -1
  90. package/dist/styles/base.css +1 -1
  91. package/dist/styles/bottom-app-bar.css +1 -1
  92. package/dist/styles/bottom-sheet.css +1 -1
  93. package/dist/styles/button-group.css +1 -1
  94. package/dist/styles/button.css +1 -1
  95. package/dist/styles/card.css +1 -1
  96. package/dist/styles/carousel.css +1 -1
  97. package/dist/styles/checkbox.css +1 -1
  98. package/dist/styles/chips.css +1 -1
  99. package/dist/styles/contrast.css +1 -1
  100. package/dist/styles/datepicker.css +2 -2
  101. package/dist/styles/dialog.css +1 -1
  102. package/dist/styles/divider.css +1 -1
  103. package/dist/styles/drawer.css +1 -1
  104. package/dist/styles/extended-fab.css +1 -1
  105. package/dist/styles/fab-menu.css +1 -1
  106. package/dist/styles/fab.css +1 -1
  107. package/dist/styles/icon-button.css +1 -1
  108. package/dist/styles/list.css +1 -1
  109. package/dist/styles/loading-indicator.css +1 -1
  110. package/dist/styles/menu.css +1 -1
  111. package/dist/styles/navigation-bar.css +1 -1
  112. package/dist/styles/navigation-rail.css +1 -1
  113. package/dist/styles/progress.css +1 -1
  114. package/dist/styles/radios.css +1 -1
  115. package/dist/styles/search.css +1 -1
  116. package/dist/styles/select.css +1 -1
  117. package/dist/styles/side-sheet.css +1 -1
  118. package/dist/styles/slider.css +1 -1
  119. package/dist/styles/snackbar.css +1 -1
  120. package/dist/styles/split-button.css +1 -1
  121. package/dist/styles/switch.css +1 -1
  122. package/dist/styles/tabs.css +1 -1
  123. package/dist/styles/text-field.css +1 -1
  124. package/dist/styles/timepicker.css +2 -2
  125. package/dist/styles/toolbar.css +1 -1
  126. package/dist/styles/tooltip.css +1 -1
  127. package/dist/styles/top-app-bar.css +1 -1
  128. package/dist/styles/typography.css +1 -1
  129. package/dist/styles/utilities.css +1 -1
  130. package/dist/styles.css +2 -2
  131. package/dist/svelte/runtime.d.ts +6 -10
  132. package/dist/theme/vendor/contrast/contrast.js +1 -16
  133. package/dist/theme/vendor/dislike/dislike_analyzer.js +1 -16
  134. package/dist/theme/vendor/dynamiccolor/color_spec_2021.js +1 -16
  135. package/dist/theme/vendor/dynamiccolor/color_spec_2025.js +1 -16
  136. package/dist/theme/vendor/dynamiccolor/contrast_curve.js +1 -16
  137. package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +2 -2
  138. package/dist/theme/vendor/dynamiccolor/dynamic_color.js +1 -16
  139. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +2 -2
  140. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.js +1 -16
  141. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.js +1 -16
  142. package/dist/theme/vendor/dynamiccolor/spec_2025.js +1 -16
  143. package/dist/theme/vendor/dynamiccolor/spec_extensions.js +1 -16
  144. package/dist/theme/vendor/dynamiccolor/tone_delta_pair.js +1 -16
  145. package/dist/theme/vendor/dynamiccolor/variant.js +1 -16
  146. package/dist/theme/vendor/hct/cam16.js +1 -16
  147. package/dist/theme/vendor/hct/hct.js +1 -16
  148. package/dist/theme/vendor/hct/hct_solver.js +1 -16
  149. package/dist/theme/vendor/hct/viewing_conditions.js +1 -16
  150. package/dist/theme/vendor/palettes/tonal_palette.d.ts +6 -9
  151. package/dist/theme/vendor/palettes/tonal_palette.js +1 -16
  152. package/dist/theme/vendor/quantize/lab_point_provider.js +1 -16
  153. package/dist/theme/vendor/quantize/quantizer_celebi.js +1 -16
  154. package/dist/theme/vendor/quantize/quantizer_map.js +1 -16
  155. package/dist/theme/vendor/quantize/quantizer_wsmeans.js +1 -16
  156. package/dist/theme/vendor/quantize/quantizer_wu.js +1 -16
  157. package/dist/theme/vendor/score/score.js +1 -16
  158. package/dist/theme/vendor/temperature/temperature_cache.js +1 -16
  159. package/dist/theme/vendor/utils/color_utils.js +1 -16
  160. package/dist/theme/vendor/utils/image_utils.js +1 -16
  161. package/dist/theme/vendor/utils/math_utils.js +1 -16
  162. package/dist/theme/vendor/utils/string_utils.js +1 -16
  163. package/dist/themes/autumn-contrast.css +1 -1
  164. package/dist/themes/autumn.css +1 -1
  165. package/dist/themes/baseline-contrast.css +1 -1
  166. package/dist/themes/baseline.css +1 -1
  167. package/dist/themes/brownbeige-contrast.css +1 -1
  168. package/dist/themes/brownbeige.css +1 -1
  169. package/dist/themes/content-contrast.css +1 -1
  170. package/dist/themes/content.css +1 -1
  171. package/dist/themes/desert-contrast.css +1 -1
  172. package/dist/themes/desert.css +1 -1
  173. package/dist/themes/expressive-contrast.css +1 -1
  174. package/dist/themes/expressive.css +1 -1
  175. package/dist/themes/fidelity-contrast.css +1 -1
  176. package/dist/themes/fidelity.css +1 -1
  177. package/dist/themes/forest-contrast.css +1 -1
  178. package/dist/themes/forest.css +1 -1
  179. package/dist/themes/fruit-salad-contrast.css +1 -1
  180. package/dist/themes/fruit-salad.css +1 -1
  181. package/dist/themes/highcontrast-contrast.css +1 -1
  182. package/dist/themes/highcontrast.css +1 -1
  183. package/dist/themes/monochrome-contrast.css +1 -1
  184. package/dist/themes/monochrome.css +1 -1
  185. package/dist/themes/neutral-contrast.css +1 -1
  186. package/dist/themes/neutral.css +1 -1
  187. package/dist/themes/ocean-contrast.css +1 -1
  188. package/dist/themes/ocean.css +1 -1
  189. package/dist/themes/rainbow-contrast.css +1 -1
  190. package/dist/themes/rainbow.css +1 -1
  191. package/dist/themes/sageivory-contrast.css +1 -1
  192. package/dist/themes/sageivory.css +1 -1
  193. package/dist/themes/spring-contrast.css +1 -1
  194. package/dist/themes/spring.css +1 -1
  195. package/dist/themes/summer-contrast.css +1 -1
  196. package/dist/themes/summer.css +1 -1
  197. package/dist/themes/sunset-contrast.css +1 -1
  198. package/dist/themes/sunset.css +1 -1
  199. package/dist/themes/tealcaramel-contrast.css +1 -1
  200. package/dist/themes/tealcaramel.css +1 -1
  201. package/dist/themes/vibrant-contrast.css +1 -1
  202. package/dist/themes/vibrant.css +1 -1
  203. package/dist/vue/index.d.ts +2 -6
  204. package/package.json +1 -1
  205. package/src/styles/components/_datepicker.scss +1 -1
  206. package/src/styles/components/_timepicker.scss +17 -4
@@ -204,51 +204,51 @@ interface SearchComponent {
204
204
  destroy: () => void;
205
205
  }
206
206
 
207
- /** Internal component structure references */
207
+
208
208
  interface SearchStructure {
209
- /** The bar and, when expanded, its results: what shows in the top layer while */
209
+
210
210
  surface: HTMLElement;
211
- /** Main container element */
211
+
212
212
  container: HTMLElement;
213
- /** Input element */
213
+
214
214
  input: HTMLInputElement;
215
- /** Input wrapper element */
215
+
216
216
  inputWrapper: HTMLElement;
217
- /** Leading icon container */
217
+
218
218
  leadingIcon: HTMLElement;
219
- /** Clear button element */
219
+
220
220
  clearButton: HTMLElement | null;
221
- /** Trailing items container */
221
+
222
222
  trailingContainer: HTMLElement | null;
223
- /** Header divider (view mode) */
223
+
224
224
  divider: HTMLElement | null;
225
- /** Suggestions container (view mode) */
225
+
226
226
  suggestionsContainer: HTMLElement | null;
227
- /** Suggestions list element */
227
+
228
228
  suggestionsList: HTMLElement | null;
229
- /** The live region that announces the suggestion count */
229
+
230
230
  status: HTMLElement;
231
231
  }
232
232
 
233
- /** Internal search state */
233
+
234
234
  interface SearchInternalState {
235
- /** Current component state */
235
+
236
236
  state: SearchState;
237
- /** Current view mode */
237
+
238
238
  viewMode: SearchViewMode;
239
- /** Current input value */
239
+
240
240
  value: string;
241
- /** Current placeholder */
241
+
242
242
  placeholder: string;
243
- /** Whether input is focused */
243
+
244
244
  isFocused: boolean;
245
- /** Whether component is disabled */
245
+
246
246
  isDisabled: boolean;
247
- /** Current suggestions */
247
+
248
248
  suggestions: SearchSuggestion[];
249
- /** Currently highlighted suggestion index (-1 = none) */
249
+
250
250
  highlightedIndex: number;
251
- /** Trailing items */
251
+
252
252
  trailingItems: SearchTrailingItem[];
253
253
  }
254
254
  export type { SearchComponent, SearchConfig, SearchEvent, SearchEventType, SearchEvents, SearchState, SearchStateEvent, SearchSuggestion, SearchTrailingItem, SearchVariant, SearchViewMode };
@@ -11,7 +11,7 @@ declare const createSelect: (config: SelectConfig) => SelectComponent;
11
11
  /** Available Select variants */
12
12
  type SelectVariant = "filled" | "outlined";
13
13
 
14
- /** Select variant constants */
14
+
15
15
  declare const SELECT_VARIANTS: {
16
16
  readonly FILLED: "filled";
17
17
  readonly OUTLINED: "outlined";
@@ -190,7 +190,7 @@ interface SelectEvents {
190
190
  close: (event: SelectEvent) => void;
191
191
  }
192
192
 
193
- /** API options interface */
193
+
194
194
  interface ApiOptions {
195
195
  select: {
196
196
  getValue: () => string | null;
@@ -217,7 +217,7 @@ interface ApiOptions {
217
217
  };
218
218
  }
219
219
 
220
- /** Select controller added by the menu feature */
220
+
221
221
  interface SelectController {
222
222
  getValue: () => string | null;
223
223
  setValue: (value: string | null | undefined) => BaseComponent;
@@ -231,7 +231,7 @@ interface SelectController {
231
231
  isOpen: () => boolean;
232
232
  }
233
233
 
234
- /** Base component interface */
234
+
235
235
  interface BaseComponent extends MenuOwner {
236
236
  element: HTMLElement;
237
237
  textField?: TextFieldComponent;
@@ -98,11 +98,11 @@ interface SliderEvent {
98
98
  defaultPrevented: boolean;
99
99
  }
100
100
 
101
- /** Slider component public API interface */
102
- /** Which handle an interaction is acting on. */
101
+
102
+
103
103
  type SliderActiveHandle = "first" | "second" | null;
104
104
 
105
- /** The controller's state, shared with the handlers it builds. */
105
+
106
106
  interface SliderState {
107
107
  value: number;
108
108
  secondValue: number | null;
@@ -110,14 +110,14 @@ interface SliderState {
110
110
  max: number;
111
111
  step: number;
112
112
  dragging: boolean;
113
- /** Whether a handle is held down */
113
+
114
114
  pressed: boolean;
115
115
  activeHandle: SliderActiveHandle;
116
116
  activeBubble: HTMLElement | null;
117
117
  valueHideTimer: ReturnType<typeof setTimeout> | null;
118
118
  }
119
119
 
120
- /** The DOM the controller reaches for on the component it is handed. */
120
+
121
121
  interface SliderStateComponent {
122
122
  element: HTMLElement;
123
123
  container?: HTMLElement | null;
@@ -127,15 +127,15 @@ interface SliderStateComponent {
127
127
  secondValueBubble?: HTMLElement | null;
128
128
  getClass: (name: string) => string;
129
129
  emit: (event: string, data: unknown) => unknown;
130
- /** withStates installs this whole, so the member is not optional inside it */
130
+
131
131
  disabled?: {
132
132
  isDisabled: () => boolean;
133
133
  };
134
- /** The hidden inputs withDom builds when the slider has a name. */
134
+
135
135
  formFields?: (HTMLInputElement | null)[] | null;
136
- /** withTracks installs this; the controller reads it for the discrete inset */
136
+
137
137
  getSize?: () => SliderSize;
138
- /** withTracks installs this; the controller calls it with the state after every change */
138
+
139
139
  renderTracks?: (state?: unknown) => void;
140
140
  lifecycle?: {
141
141
  destroy?: () => void;
@@ -143,7 +143,7 @@ interface SliderStateComponent {
143
143
  };
144
144
  }
145
145
 
146
- /** What drives a drag: the same handlers are registered for mouse and for touch, so each one takes either. */
146
+
147
147
  type SliderPointerEvent = MouseEvent | TouchEvent;
148
148
 
149
149
  /** Public model, native forwarding and gesture notifications. */
@@ -129,7 +129,7 @@ interface SnackbarComponent {
129
129
  destroy: () => void;
130
130
  }
131
131
 
132
- /** The component as it passes through the enhancers */
132
+
133
133
  interface BaseComponent {
134
134
  element: HTMLElement;
135
135
  emit?: (event: string, data?: unknown) => void;
@@ -166,39 +166,39 @@ interface SnackbarTimer {
166
166
  getDuration: () => number;
167
167
  }
168
168
 
169
- /** Interface for snackbars managed by the queue */
169
+
170
170
  interface QueuedSnackbar {
171
171
  _show: () => void;
172
- /** Visually dismisses the snackbar without advancing the queue */
172
+
173
173
  _hide?: () => void;
174
- /** The snackbar's own element, so the queue can tell whether it is still on screen */
174
+
175
175
  element?: HTMLElement;
176
176
  on: (event: string, handler: () => void) => void;
177
177
  off: (event: string, handler: () => void) => void;
178
178
  }
179
179
 
180
- /** Options controlling how a snackbar is added to the queue */
180
+
181
181
  interface SnackbarQueueAddOptions {
182
- /** Behavior to apply when adding this snackbar (defaults to `'queue'`) */
182
+
183
183
  behavior?: SnackbarQueueBehavior;
184
184
  }
185
185
 
186
- /** Interface for the snackbar queue manager */
186
+
187
187
  interface SnackbarQueue {
188
188
  add: (snackbar: QueuedSnackbar, options?: SnackbarQueueAddOptions) => void;
189
189
  clear: () => void;
190
- /** Takes a snackbar out of the queue: a waiting one, or the one on screen when it is destroyed */
190
+
191
191
  remove: (snackbar: QueuedSnackbar) => void;
192
192
  getLength: () => number;
193
193
  }
194
194
 
195
- /** API options for enhancing a snackbar with API methods */
195
+
196
196
  interface ApiOptions {
197
197
  lifecycle: {
198
198
  destroy: () => void;
199
199
  };
200
200
  queue: SnackbarQueue;
201
- /** The resolved configuration */
201
+
202
202
  config: SnackbarConfig;
203
203
  }
204
204
 
@@ -97,16 +97,16 @@ export interface SplitButtonComponent {
97
97
  /** Takes the component off the page and releases what it holds */
98
98
  destroy: () => void;
99
99
  }
100
- /** What withButtons adds */
100
+
101
101
  export interface ButtonsFeature {
102
102
  leading: ButtonComponent;
103
103
  trailing: ButtonComponent;
104
104
  leadingElement: HTMLElement;
105
105
  trailingElement: HTMLElement;
106
106
  }
107
- /** What withMenu adds: the menu, when the component was given items */
107
+
108
108
  export type MenuFeature = MenuOwner;
109
- /** The component as it passes through the enhancers */
109
+
110
110
  export interface BaseComponent extends ButtonsFeature, MenuFeature {
111
111
  element: HTMLElement;
112
112
  emit?: (event: string, data?: unknown) => void;
@@ -119,7 +119,7 @@ interface SwitchComponent {
119
119
  destroy: () => void;
120
120
  }
121
121
 
122
- /** API options interface */
122
+
123
123
  interface ApiOptions {
124
124
  disabled: {
125
125
  enable: () => void;
@@ -137,7 +137,7 @@ interface ApiOptions {
137
137
  };
138
138
  }
139
139
 
140
- /** Base component interface */
140
+
141
141
  interface BaseComponent {
142
142
  element: HTMLElement;
143
143
  input?: HTMLInputElement;
@@ -170,7 +170,7 @@ interface BaseComponent {
170
170
  isError?: () => boolean;
171
171
  }
172
172
 
173
- /** Component as it reaches the API step of the pipeline. */
173
+
174
174
  type ApiComponent = BaseComponent & Required<Pick<BaseComponent, "checkable" | "disabled" | "lifecycle">>;
175
175
 
176
176
  /** Registers SwitchConfig with the global defaults map, so `setComponentDefaults("switch", ...)` is typed without core importing anything from this component. */
@@ -2,7 +2,7 @@ import type { ForwardedEventPayload } from "../../core/dom/index.js";
2
2
  import type { BadgeComponent } from "../badge/index.js";
3
3
  import type { ButtonComponent } from "../button/types.js";
4
4
 
5
- /** Tabs members read by these helpers; each one is checked before use */
5
+
6
6
  interface TabsHost {
7
7
  element?: HTMLElement;
8
8
  tabs?: TabComponent[];
@@ -12,13 +12,10 @@ interface TabsHost {
12
12
  handleTabClick?: (event: Event | null, tab: TabComponent) => void;
13
13
  }
14
14
 
15
- /**
16
- * Gets the active tab from a component
17
- * @param component
18
- */
15
+
19
16
  declare function getActiveTab(component: TabsHost): TabComponent | null;
20
17
 
21
- /** A fresh id for a tab group, so two tablists can share tab values. */
18
+
22
19
  declare function allocateTabsGroupId(): string;
23
20
 
24
21
  /** A tab's element id within its group: `tab-<groupId>-<value>` for a value of `[A-Za-z0-9_-]`, and `tabx-<groupId>-<encoded value>` otherwise. */
@@ -27,32 +24,22 @@ declare const tabIdFor: (groupId: string, value: string) => string;
27
24
  /** The panel id a group looks for when a page does not label its panels: `tabpanel-<groupId>-<value>`, or `tabpanelx-<groupId>-<encoded value>` for a value with other characters, as {@link tabIdFor} derives the tab's. */
28
25
  declare const tabPanelIdFor: (groupId: string, value: string) => string;
29
26
 
30
- /** Records a tab's value and group on its element: the value as `data-value`, which the panel lookup reads instead of parsing the id. */
27
+
31
28
  declare function registerTab(element: HTMLElement, groupId: string, value: string): void;
32
29
 
33
- /** The panel registered to a tab, or null. */
30
+
34
31
  declare function findRegisteredPanel(tab: HTMLElement): HTMLElement | null;
35
32
 
36
- /** Points a tab's `aria-controls` at its panel, and only at one that exists. */
33
+
37
34
  declare function syncTabControls(element: HTMLElement): void;
38
35
 
39
- /**
40
- * Updates tab panels based on active tab
41
- * @param component
42
- */
36
+
43
37
  declare function updateTabPanels(component: TabsHost): void;
44
38
 
45
- /**
46
- * Gives the tablist a single tab stop: the active tab, or the first enabled one when none is active.
47
- * @param component
48
- */
39
+
49
40
  declare function syncTabStops(component: TabsHost): void;
50
41
 
51
- /**
52
- * Sets up keyboard navigation for tabs.
53
- * @param component
54
- * @param options
55
- */
42
+
56
43
  declare function setupKeyboardNavigation(component: TabsHost, options?: {
57
44
  autoActivate?: boolean;
58
45
  }): void;
@@ -209,29 +196,23 @@ interface TabsConfig {
209
196
  indicator?: IndicatorConfig;
210
197
  }
211
198
 
212
- /** Icon API interface for managing tab icons */
199
+
213
200
  interface IconAPI {
214
- /**
215
- * Sets the icon HTML content
216
- * @param html
217
- */
201
+
218
202
  setIcon: (html: string) => IconAPI;
219
- /** Gets the current icon HTML content */
203
+
220
204
  getIcon: () => string;
221
- /** Gets the icon DOM element */
205
+
222
206
  getElement: () => HTMLElement | null;
223
207
  }
224
208
 
225
- /** Text API interface for managing tab text */
209
+
226
210
  interface TextAPI {
227
- /**
228
- * Sets the text content
229
- * @param content
230
- */
211
+
231
212
  setText: (content: string) => TextAPI;
232
- /** Gets the current text content */
213
+
233
214
  getText: () => string;
234
- /** Gets the text DOM element */
215
+
235
216
  getElement: () => HTMLElement | null;
236
217
  }
237
218
 
@@ -385,25 +366,25 @@ declare const createTab: (config?: TabConfig) => TabComponent;
385
366
  */
386
367
  declare const createTabs: (config?: TabsConfig) => TabsComponent;
387
368
 
388
- /** Configuration for tab indicator */
369
+
389
370
  interface TabIndicatorConfig {
390
- /** Height of the indicator in pixels */
371
+
391
372
  height?: number;
392
- /** Width strategy - fixed size or dynamic based on tab width */
373
+
393
374
  widthStrategy?: 'fixed' | 'dynamic' | 'content' | 'auto';
394
- /** Fixed width in pixels when using fixed strategy */
375
+
395
376
  fixedWidth?: number;
396
- /** Animation duration in milliseconds */
377
+
397
378
  animationDuration?: number;
398
- /** Animation timing function */
379
+
399
380
  animationTiming?: string;
400
- /** Whether to show the indicator */
381
+
401
382
  visible?: boolean;
402
- /** CSS class prefix */
383
+
403
384
  prefix?: string;
404
- /** Custom color for the indicator */
385
+
405
386
  color?: string;
406
- /** Tabs variant (primary or secondary) */
387
+
407
388
  variant?: string;
408
389
  }
409
390
 
@@ -425,19 +406,16 @@ interface TabIndicator {
425
406
  destroy: () => void;
426
407
  }
427
408
 
428
- /**
429
- * Creates a tab indicator component
430
- * @param config
431
- */
409
+
432
410
  declare const createTabIndicator: (config?: TabIndicatorConfig) => TabIndicator;
433
411
 
434
- /** Breakpoints for responsive behavior */
412
+
435
413
  declare const RESPONSIVE_BREAKPOINTS: {
436
- /** Small screens (mobile) */
414
+
437
415
  SMALL: number;
438
- /** Medium screens (tablet) */
416
+
439
417
  MEDIUM: number;
440
- /** Large screens (desktop) */
418
+
441
419
  LARGE: number;
442
420
  };
443
421
 
@@ -10,19 +10,19 @@ declare const createTextField: (config?: TextFieldConfig) => TextFieldComponent;
10
10
  /** Available TextField variants */
11
11
  type TextFieldVariant = "filled" | "outlined";
12
12
 
13
- /** TextField variant constants */
13
+
14
14
  declare const TEXT_FIELD_VARIANTS: {
15
15
  readonly FILLED: "filled";
16
16
  readonly OUTLINED: "outlined";
17
17
  };
18
18
 
19
- /** Available TextField states */
19
+
20
20
  type TextFieldStates = "active" | "inactive" | "disabled";
21
21
 
22
22
  /** Available TextField density levels */
23
23
  type TextFieldDensity = "default" | "compact";
24
24
 
25
- /** TextField density constants */
25
+
26
26
  declare const TEXT_FIELD_DENSITY: {
27
27
  readonly DEFAULT: "default";
28
28
  readonly COMPACT: "compact";
@@ -31,7 +31,7 @@ declare const TEXT_FIELD_DENSITY: {
31
31
  /** Available TextField types */
32
32
  type TextFieldTypes = "text" | "password" | "email" | "number" | "tel" | "url" | "search" | "multiline";
33
33
 
34
- /** TextField type constants */
34
+
35
35
  declare const TEXT_FIELD_TYPES: {
36
36
  readonly TEXT: "text";
37
37
  readonly PASSWORD: "password";
@@ -215,7 +215,7 @@ interface TextFieldComponent {
215
215
  destroy: () => void;
216
216
  }
217
217
 
218
- /** API options interface */
218
+
219
219
  interface ApiOptions {
220
220
  disabled: {
221
221
  enable: () => void;
@@ -227,10 +227,10 @@ interface ApiOptions {
227
227
  };
228
228
  }
229
229
 
230
- /** Base component interface */
230
+
231
231
  interface BaseComponent {
232
232
  element: HTMLElement;
233
- /** The prefixed class name, from createBase */
233
+
234
234
  getClass: (name: string) => string;
235
235
  input?: HTMLInputElement | HTMLTextAreaElement;
236
236
  config?: {
@@ -284,7 +284,7 @@ declare module "../../core/config/global" {
284
284
  }
285
285
  }
286
286
 
287
- /** Extended element component with input field */
287
+
288
288
  interface InputElementComponent extends ElementComponent {
289
289
  input?: HTMLInputElement | HTMLTextAreaElement;
290
290
  emit?: (event: string, data?: unknown) => void;
@@ -301,45 +301,38 @@ interface TextFieldTrailingPayload {
301
301
  event: MouseEvent;
302
302
  }
303
303
 
304
- /** Configuration for trailing icon feature */
304
+
305
305
  interface TrailingIconConfig {
306
- /** Trailing icon HTML content */
306
+
307
307
  trailingIcon?: string;
308
- /** Makes the trailing icon a button with this accessible name: clear, show password, open a menu. */
308
+
309
309
  trailingIconLabel?: string;
310
- /** `trailing` listener. */
310
+
311
311
  onTrailingClick?: (event: TextFieldTrailingPayload) => void;
312
- /** Whether the field starts disabled; the trailing button is disabled with it */
312
+
313
313
  disabled?: boolean;
314
- /** CSS class prefix */
314
+
315
315
  prefix?: string;
316
- /** Component name */
316
+
317
317
  componentName?: string;
318
318
  }
319
319
 
320
- /** Component with trailing icon capabilities */
321
- /** What this feature installs. */
320
+
321
+
322
322
  interface TrailingIconFeature {
323
- /** Trailing icon element */
323
+
324
324
  trailingIcon: HTMLElement | null;
325
- /**
326
- * Sets trailing icon content
327
- * @param html
328
- * @param label
329
- */
325
+
330
326
  setTrailingIcon: (html: string, label?: string) => TrailingIconComponent;
331
- /** Removes trailing icon */
327
+
332
328
  removeTrailingIcon: () => TrailingIconComponent;
333
329
  }
334
330
 
335
- /** Component with trailingicon capabilities */
331
+
336
332
  interface TrailingIconComponent extends BaseComponent_1, TrailingIconFeature {
337
333
  }
338
334
 
339
- /**
340
- * Adds trailing icon to a text field component
341
- * @param config
342
- */
335
+
343
336
  declare const withTrailingIcon: <T extends TrailingIconConfig & object>(config: T) => <C extends InputElementComponent>(component: C) => C & TrailingIconFeature;
344
337
  export type { TextFieldComponent, TextFieldConfig, TextFieldDensity, TextFieldEvents, TextFieldFocusPayload, TextFieldTrailingPayload, TextFieldValuePayload, TextFieldVariant };
345
338
  export { createTextField, createTextField as default };
@@ -48,6 +48,20 @@ el.style.setProperty(`--${prefix}-time-picker-x`, `${Math.round(Math.sin(radians
48
48
  el.style.setProperty(`--${prefix}-time-picker-y`, `${Math.round(-Math.cos(radians) * item.radius * 100) / 100}px`);
49
49
  };
50
50
  const build = (next) => {
51
+ element.querySelectorAll(`.${cls("dial-numbers--leaving")}`).forEach(el => el.remove());
52
+ if (selector && element.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: no-preference)").matches) {
53
+ const leaving = selected.cloneNode(true);
54
+ leaving.className = `${cls("dial-numbers")} ${cls("dial-numbers--leaving")}`;
55
+ leaving.removeAttribute("aria-hidden");
56
+ leaving.inert = true;
57
+ Array.from(numbers.children).forEach((number, i) => {
58
+ if (number.getAttribute("aria-disabled") === "true")
59
+ leaving.children[i].style.opacity = "0.38";
60
+ });
61
+ leaving.addEventListener("animationend", () => leaving.remove(), { once: true });
62
+ leaving.addEventListener("animationcancel", () => leaving.remove(), { once: true });
63
+ element.append(leaving);
64
+ }
51
65
  selector = next;
52
66
  items = itemsFor(next, format);
53
67
  element.setAttribute("aria-label", next === "hour" ? "Hour" : next === "minute" ? "Minute" : "Second");
@@ -83,7 +97,9 @@ if (exact >= 0)
83
97
  return exact;
84
98
  return Math.round(value / 5) % items.length;
85
99
  };
86
- const update = (time, next) => {
100
+ const update = (time, next, animate = false) => {
101
+ if (!animate)
102
+ element.style.transition = "none";
87
103
  const focused = activeElementOf(element);
88
104
  const refocus = next !== selector && numbers.contains(focused);
89
105
  if (next !== selector)
@@ -91,6 +107,8 @@ build(next);
91
107
  current = dialValue(time, next, format);
92
108
  const index = items.findIndex(item => item.value === current);
93
109
  const target = next === "hour" ? items[nearest(current)] : { angle: current * 6, radius: OUTER };
110
+ if (animate)
111
+ angle = parseFloat(getComputedStyle(element).getPropertyValue(`--${prefix}-time-picker-angle`)) || 0;
94
112
  const delta = ((target.angle - (angle % 360)) % 360 + 540) % 360 - 180;
95
113
  angle += delta;
96
114
  element.style.setProperty(`--${prefix}-time-picker-angle`, `${angle}deg`);
@@ -108,6 +126,10 @@ option.tabIndex = i === stop ? 0 : -1;
108
126
  });
109
127
  if (refocus)
110
128
  numbers.querySelector('[tabindex="0"]')?.focus({ preventScroll: true });
129
+ if (!animate) {
130
+ void element.offsetWidth;
131
+ element.style.transition = "";
132
+ }
111
133
  };
112
134
  const valueAt = (event) => {
113
135
  const box = element.getBoundingClientRect();
@@ -122,17 +144,22 @@ return Math.hypot(dx, dy) < (OUTER + INNER) / 2 ? step + 12 : step;
122
144
  return step || 12;
123
145
  };
124
146
  let dragging = false;
147
+ let pointerX = 0;
148
+ let pointerY = 0;
125
149
  element.addEventListener("pointerdown", event => {
126
150
  if (event.button !== 0)
127
151
  return;
128
152
  dragging = true;
153
+ pointerX = event.clientX;
154
+ pointerY = event.clientY;
129
155
  element.setPointerCapture?.(event.pointerId);
130
- element.classList.add(cls("dial-face--dragging"));
131
156
  options.onSelect(valueAt(event), false, true);
132
157
  });
133
158
  element.addEventListener("pointermove", event => {
134
- if (dragging)
159
+ if (dragging && (element.classList.contains(cls("dial-face--dragging")) || Math.hypot(event.clientX - pointerX, event.clientY - pointerY) > 4)) {
160
+ element.classList.add(cls("dial-face--dragging"));
135
161
  options.onSelect(valueAt(event), false, true);
162
+ }
136
163
  });
137
164
  const release = (event) => {
138
165
  if (!dragging)
@@ -180,9 +180,9 @@ interface TimePickerConfig {
180
180
  onCancel?: TimePickerEvents["cancel"];
181
181
  }
182
182
 
183
- /** Configuration as it leaves `createBaseConfig`. */
183
+
184
184
  type ResolvedTimePickerConfig = TimePickerConfig & Required<Pick<TimePickerConfig, "type" | "format" | "orientation" | "showSeconds" | "minuteStep" | "secondStep" | "cancelText" | "confirmText" | "open" | "clockIcon" | "keyboardIcon" | "prefix">> & {
185
- /** The dialog title's id, unique per picker. */
185
+
186
186
  titleId?: string;
187
187
  };
188
188