mtrl 0.4.0 → 0.4.4

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 (155) hide show
  1. package/dist/components/badge/api.d.ts +5 -5
  2. package/dist/components/badge/config.d.ts +17 -7
  3. package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +1 -1
  4. package/dist/components/bottom-app-bar/config.d.ts +1 -1
  5. package/dist/components/button/api.d.ts +19 -3
  6. package/dist/components/button/button.d.ts +41 -1
  7. package/dist/components/button/config.d.ts +17 -6
  8. package/dist/components/button/constants.d.ts +36 -0
  9. package/dist/components/button/features/progress.d.ts +26 -0
  10. package/dist/components/button/types.d.ts +108 -1
  11. package/dist/components/card/config.d.ts +1 -1
  12. package/dist/components/card/features.d.ts +14 -1
  13. package/dist/components/card/index.d.ts +6 -6
  14. package/dist/components/carousel/api.d.ts +15 -11
  15. package/dist/components/carousel/carousel.d.ts +1 -1
  16. package/dist/components/carousel/config.d.ts +1 -1
  17. package/dist/components/carousel/features/drag.d.ts +1 -1
  18. package/dist/components/carousel/features/slides.d.ts +1 -1
  19. package/dist/components/checkbox/config.d.ts +1 -1
  20. package/dist/components/checkbox/types.d.ts +2 -2
  21. package/dist/components/chips/chip/chip.d.ts +1 -1
  22. package/dist/components/chips/chip/config.d.ts +1 -1
  23. package/dist/components/chips/chips.d.ts +1 -1
  24. package/dist/components/chips/features/chip-items.d.ts +1 -1
  25. package/dist/components/chips/schema.d.ts +0 -1
  26. package/dist/components/datepicker/api.d.ts +1 -1
  27. package/dist/components/datepicker/config.d.ts +1 -1
  28. package/dist/components/datepicker/datepicker.d.ts +1 -1
  29. package/dist/components/datepicker/render.d.ts +5 -5
  30. package/dist/components/dialog/features.d.ts +1 -1
  31. package/dist/components/divider/divider.d.ts +2 -2
  32. package/dist/components/extended-fab/config.d.ts +1 -1
  33. package/dist/components/fab/config.d.ts +1 -1
  34. package/dist/components/index.d.ts +2 -1
  35. package/dist/components/menu/api.d.ts +14 -14
  36. package/dist/components/menu/config.d.ts +1 -1
  37. package/dist/components/menu/features/controller.d.ts +1 -1
  38. package/dist/components/menu/features/keyboard.d.ts +2 -2
  39. package/dist/components/menu/features/submenu.d.ts +1 -1
  40. package/dist/components/menu/menu.d.ts +1 -1
  41. package/dist/components/navigation/config.d.ts +1 -1
  42. package/dist/components/navigation/features/controller.d.ts +1 -1
  43. package/dist/components/navigation/features/items.d.ts +2 -1
  44. package/dist/components/navigation/navigation.d.ts +1 -1
  45. package/dist/components/navigation/system/core.d.ts +1 -1
  46. package/dist/components/navigation/system/events.d.ts +1 -1
  47. package/dist/components/navigation/system/index.d.ts +2 -2
  48. package/dist/components/progress/api.d.ts +33 -2
  49. package/dist/components/progress/config.d.ts +2 -2
  50. package/dist/components/progress/constants.d.ts +25 -21
  51. package/dist/components/progress/features/canvas.d.ts +34 -5
  52. package/dist/components/progress/features/circular.d.ts +2 -2
  53. package/dist/components/progress/features/linear.d.ts +2 -2
  54. package/dist/components/progress/features/state.d.ts +9 -1
  55. package/dist/components/progress/progress.d.ts +1 -1
  56. package/dist/components/progress/types.d.ts +18 -6
  57. package/dist/components/radios/api.d.ts +11 -11
  58. package/dist/components/radios/config.d.ts +1 -1
  59. package/dist/components/radios/radios.d.ts +1 -1
  60. package/dist/components/search/api.d.ts +15 -11
  61. package/dist/components/search/features/search.d.ts +1 -1
  62. package/dist/components/segmented-button/config.d.ts +6 -6
  63. package/dist/components/select/api.d.ts +1 -1
  64. package/dist/components/select/config.d.ts +1 -1
  65. package/dist/components/select/features.d.ts +1 -1
  66. package/dist/components/select/types.d.ts +20 -5
  67. package/dist/components/sheet/config.d.ts +1 -1
  68. package/dist/components/sheet/sheet.d.ts +1 -1
  69. package/dist/components/slider/api.d.ts +3 -2
  70. package/dist/components/slider/config.d.ts +1 -1
  71. package/dist/components/slider/constants.d.ts +50 -21
  72. package/dist/components/slider/features/canvas.d.ts +47 -0
  73. package/dist/components/slider/features/controller.d.ts +1 -1
  74. package/dist/components/slider/features/handlers.d.ts +1 -1
  75. package/dist/components/slider/features/index.d.ts +1 -0
  76. package/dist/components/slider/features/states.d.ts +1 -1
  77. package/dist/components/slider/schema.d.ts +4 -47
  78. package/dist/components/slider/slider.d.ts +5 -4
  79. package/dist/components/slider/types.d.ts +10 -37
  80. package/dist/components/snackbar/api.d.ts +1 -1
  81. package/dist/components/snackbar/config.d.ts +2 -2
  82. package/dist/components/switch/api.d.ts +1 -1
  83. package/dist/components/switch/config.d.ts +1 -1
  84. package/dist/components/switch/features.d.ts +4 -4
  85. package/dist/components/switch/switch.d.ts +1 -1
  86. package/dist/components/switch/types.d.ts +22 -17
  87. package/dist/components/tabs/config.d.ts +2 -3
  88. package/dist/components/tabs/features.d.ts +5 -5
  89. package/dist/components/tabs/index.d.ts +10 -10
  90. package/dist/components/tabs/tab.d.ts +1 -1
  91. package/dist/components/tabs/utils.d.ts +1 -1
  92. package/dist/components/textfield/api.d.ts +13 -3
  93. package/dist/components/textfield/config.d.ts +1 -1
  94. package/dist/components/textfield/constants.d.ts +12 -20
  95. package/dist/components/textfield/features/density.d.ts +28 -0
  96. package/dist/components/textfield/features/index.d.ts +13 -12
  97. package/dist/components/textfield/index.d.ts +3 -3
  98. package/dist/components/textfield/textfield.d.ts +1 -1
  99. package/dist/components/textfield/types.d.ts +42 -35
  100. package/dist/components/timepicker/clockdial.d.ts +2 -2
  101. package/dist/components/timepicker/config.d.ts +1 -1
  102. package/dist/components/timepicker/render.d.ts +1 -1
  103. package/dist/components/timepicker/timepicker.d.ts +1 -1
  104. package/dist/components/timepicker/utils.d.ts +2 -2
  105. package/dist/components/tooltip/api.d.ts +1 -1
  106. package/dist/components/tooltip/config.d.ts +1 -1
  107. package/dist/components/top-app-bar/top-app-bar.d.ts +2 -2
  108. package/dist/constants.d.ts +30 -30
  109. package/dist/core/canvas/animation.d.ts +27 -0
  110. package/dist/core/canvas/drawing.d.ts +57 -0
  111. package/dist/core/canvas/index.d.ts +6 -3
  112. package/dist/core/canvas/utils.d.ts +84 -0
  113. package/dist/core/collection/collection.d.ts +7 -7
  114. package/dist/core/collection/list-manager/index.d.ts +2 -2
  115. package/dist/core/collection/list-manager/renderer.d.ts +3 -3
  116. package/dist/core/collection/list-manager/scroll-tracker.d.ts +1 -1
  117. package/dist/core/compose/component.d.ts +1 -0
  118. package/dist/core/compose/features/checkable.d.ts +2 -2
  119. package/dist/core/compose/features/gestures/longpress.d.ts +2 -2
  120. package/dist/core/compose/features/gestures/pan.d.ts +2 -2
  121. package/dist/core/compose/features/gestures/pinch.d.ts +2 -2
  122. package/dist/core/compose/features/gestures/rotate.d.ts +2 -2
  123. package/dist/core/compose/features/gestures/swipe.d.ts +2 -2
  124. package/dist/core/compose/features/gestures/tap.d.ts +2 -2
  125. package/dist/core/compose/features/gestures.d.ts +2 -2
  126. package/dist/core/compose/features/input.d.ts +1 -1
  127. package/dist/core/compose/features/ripple.d.ts +2 -2
  128. package/dist/core/compose/features/size.d.ts +1 -1
  129. package/dist/core/compose/features/textinput.d.ts +1 -1
  130. package/dist/core/compose/features/throttle.d.ts +1 -1
  131. package/dist/core/compose/features/variant.d.ts +1 -1
  132. package/dist/core/compose/features/withEvents.d.ts +1 -1
  133. package/dist/core/composition/features/label.d.ts +1 -1
  134. package/dist/core/config/component.d.ts +2 -0
  135. package/dist/core/config/global.d.ts +65 -0
  136. package/dist/core/dom/create.d.ts +1 -1
  137. package/dist/core/gestures/pan.d.ts +1 -1
  138. package/dist/core/gestures/pinch.d.ts +1 -1
  139. package/dist/core/gestures/rotate.d.ts +1 -1
  140. package/dist/core/index.d.ts +2 -0
  141. package/dist/core/layout/array.d.ts +7 -2
  142. package/dist/core/layout/object.d.ts +1 -1
  143. package/dist/core/layout/processor.d.ts +2 -2
  144. package/dist/core/layout/utils.d.ts +1 -1
  145. package/dist/core/utils/color.d.ts +14 -0
  146. package/dist/core/utils/index.d.ts +1 -0
  147. package/dist/index.cjs +15 -15
  148. package/dist/index.cjs.map +149 -140
  149. package/dist/index.d.ts +7 -7
  150. package/dist/index.js +15 -15
  151. package/dist/index.js.map +149 -140
  152. package/dist/package.json +1 -1
  153. package/dist/styles.css +2 -2
  154. package/package.json +8 -2
  155. package/dist/components/progress/features.d.ts +0 -40
@@ -1,30 +1,30 @@
1
- import { BADGE_VARIANTS, BADGE_COLORS, BADGE_POSITIONS, BADGE_MAX_CHARACTERS } from './components/badge/constants';
2
- import { FAB_POSITIONS as BOTTOM_APP_BAR_FAB_POSITIONS, BOTTOM_APP_BAR_CLASSES, DEFAULT_TRANSITION_DURATION } from './components/bottom-app-bar/constants';
3
- import { BUTTON_VARIANTS, BUTTON_TYPES, BUTTON_CLASSES, DEFAULT_RIPPLE_CONFIG } from './components/button/constants';
4
- import { CARD_VARIANTS, CARD_ELEVATIONS, CARD_WIDTHS, CARD_CORNER_RADIUS, CARD_ASPECT_RATIOS, CARD_ACTION_ALIGNMENT, CARD_MEDIA_POSITION, CARD_CLASSES } from './components/card/constants';
5
- import { CHECKBOX_VARIANTS, CHECKBOX_LABEL_POSITION, CHECKBOX_STATES, CHECKBOX_CLASSES } from './components/checkbox/constants';
6
- import { CHIP_VARIANTS, CHIP_EVENTS, CHIPS_EVENTS } from './components/chips/constants';
7
- import { CHIP_CLASSES, CHIP_STATES } from './components/chips/chip/constants';
8
- import { DATEPICKER_VARIANTS, DATEPICKER_VIEWS, DATEPICKER_SELECTION_MODES, DAY_NAMES, MONTH_NAMES, MONTH_NAMES_SHORT, DEFAULT_DATE_FORMAT, DATEPICKER_CLASSES, DATEPICKER_EVENTS } from './components/datepicker/constants';
9
- import { DIALOG_SIZES, DIALOG_ANIMATIONS, DIALOG_FOOTER_ALIGNMENTS, DIALOG_EVENTS, DIALOG_CLASSES, DEFAULT_ANIMATION_DURATION, DEFAULT_Z_INDEX, DIALOG_BUTTON_VARIANTS, DEFAULT_CONFIRM_BUTTON_TEXT, DEFAULT_CANCEL_BUTTON_TEXT } from './components/dialog/constants';
10
- import { DIVIDER_ORIENTATIONS, DIVIDER_VARIANTS, DEFAULT_DIVIDER_THICKNESS, DEFAULT_INSET_VALUE, DIVIDER_CLASSES } from './components/divider/constants';
11
- import { EXTENDED_FAB_VARIANTS, EXTENDED_FAB_WIDTH, EXTENDED_FAB_POSITIONS, EXTENDED_FAB_ICON_POSITIONS, EXTENDED_FAB_CLASSES, EXTENDED_FAB_TYPES, EXTENDED_FAB_ANIMATIONS } from './components/extended-fab/constants';
12
- import { FAB_VARIANTS, FAB_SIZES, FAB_POSITIONS, FAB_CLASSES, FAB_TYPES, FAB_ICON_SIZES, FAB_ANIMATIONS } from './components/fab/constants';
13
- import { LIST_DEFAULTS, LIST_TYPES, LIST_SELECTION_MODES, LIST_EVENTS, LIST_SCROLL_POSITIONS, LIST_CLASSES } from './components/list/constants';
14
- import { MENU_POSITION, MENU_DEFAULTS, MENU_INTERACTION_TYPES, MENU_ITEM_TYPES, MENU_EVENTS, MENU_CLASSES } from './components/menu/constants';
15
- import { NAV_VARIANTS, NAV_POSITIONS, NAV_BEHAVIORS, NAV_ITEM_STATES, NAV_EVENTS, NAV_DEFAULTS, NAV_CLASSES } from './components/navigation/constants';
16
- import { PROGRESS_VARIANTS, PROGRESS_EVENTS, PROGRESS_DEFAULTS, PROGRESS_CLASSES } from './components/progress/constants';
17
- import { RADIO_STATES, RADIO_DIRECTIONS, RADIO_VARIANTS, RADIO_LABEL_POSITIONS, RADIO_SIZES, RADIO_EVENTS, RADIO_DEFAULTS, RADIO_CLASSES } from './components/radios/constants';
18
- import { SEARCH_VARIANTS, SEARCH_STATES, SEARCH_EVENTS, SEARCH_ICONS, SEARCH_DEFAULTS, SEARCH_CLASSES } from './components/search/constants';
19
- import { SEGMENTED_BUTTON_MODES, SEGMENTED_BUTTON_DENSITY, SEGMENTED_BUTTON_EVENTS, SEGMENTED_BUTTON_DEFAULTS, SEGMENTED_BUTTON_ICONS, SEGMENTED_BUTTON_CLASSES } from './components/segmented-button/constants';
20
- import { SELECT_VARIANTS, SELECT_PLACEMENT, SELECT_INTERACTION, SELECT_EVENTS, SELECT_ICONS, SELECT_DEFAULTS, SELECT_CLASSES } from './components/select/constants';
21
- import { SHEET_VARIANTS, SHEET_POSITIONS, SHEET_EVENTS, SHEET_ELEVATION, SHEET_DEFAULTS, SHEET_ANIMATION, SHEET_GESTURE, SHEET_CLASSES } from './components/sheet/constants';
22
- import { SLIDER_COLORS, SLIDER_SIZES, SLIDER_EVENTS, SLIDER_POSITIONS, SLIDER_DEFAULTS, SLIDER_CLASSES } from './components/slider/constants';
23
- import { SNACKBAR_VARIANTS, SNACKBAR_POSITIONS, SNACKBAR_STATES, SNACKBAR_EVENTS, SNACKBAR_DEFAULTS, SNACKBAR_CLASSES } from './components/snackbar/constants';
24
- import { SWITCH_LABEL_POSITIONS, SWITCH_STATES, SWITCH_EVENTS, SWITCH_DEFAULTS, SWITCH_CLASSES } from './components/switch/constants';
25
- import { TAB_VARIANTS, TAB_STATES, TAB_INDICATOR_WIDTH_STRATEGIES, TAB_EVENTS, TABS_EVENTS, TABS_DEFAULTS, TABS_CLASSES, TAB_CLASSES } from './components/tabs/constants';
26
- import { TEXTFIELD_VARIANTS, TEXTFIELD_SIZES, TEXTFIELD_STATES, TEXTFIELD_TYPES, TEXTFIELD_EVENTS, TEXTFIELD_DEFAULTS, TEXTFIELD_CLASSES } from './components/textfield/constants';
27
- import { TIMEPICKER_TYPES, TIMEPICKER_ORIENTATIONS, TIMEPICKER_FORMATS, TIMEPICKER_PERIODS, TIMEPICKER_EVENTS, TIMEPICKER_DIAL, TIMEPICKER_VALUES, TIMEPICKER_Z_INDEX, TIMEPICKER_DEFAULTS, TIMEPICKER_CLASSES } from './components/timepicker/constants';
28
- import { TOOLTIP_POSITIONS, TOOLTIP_VARIANTS, TOOLTIP_EVENTS, TOOLTIP_DEFAULTS, TOOLTIP_CLASSES } from './components/tooltip/constants';
29
- import { TOP_APP_BAR_TYPES, TOP_APP_BAR_STATES, TOP_APP_BAR_DEFAULTS, TOP_APP_BAR_CLASSES } from './components/top-app-bar/constants';
30
- export { BADGE_VARIANTS, BADGE_COLORS, BADGE_POSITIONS, BADGE_MAX_CHARACTERS, BOTTOM_APP_BAR_FAB_POSITIONS, BOTTOM_APP_BAR_CLASSES, DEFAULT_TRANSITION_DURATION, BUTTON_VARIANTS, BUTTON_TYPES, BUTTON_CLASSES, DEFAULT_RIPPLE_CONFIG, CARD_VARIANTS, CARD_ELEVATIONS, CARD_WIDTHS, CARD_CORNER_RADIUS, CARD_ASPECT_RATIOS, CARD_ACTION_ALIGNMENT, CARD_MEDIA_POSITION, CARD_CLASSES, CHECKBOX_VARIANTS, CHECKBOX_LABEL_POSITION, CHECKBOX_STATES, CHECKBOX_CLASSES, CHIP_VARIANTS, CHIP_EVENTS, CHIPS_EVENTS, CHIP_CLASSES, CHIP_STATES, DATEPICKER_VARIANTS, DATEPICKER_VIEWS, DATEPICKER_SELECTION_MODES, DAY_NAMES, MONTH_NAMES, MONTH_NAMES_SHORT, DEFAULT_DATE_FORMAT, DATEPICKER_CLASSES, DATEPICKER_EVENTS, DIALOG_SIZES, DIALOG_ANIMATIONS, DIALOG_FOOTER_ALIGNMENTS, DIALOG_EVENTS, DIALOG_CLASSES, DEFAULT_ANIMATION_DURATION, DEFAULT_Z_INDEX, DIALOG_BUTTON_VARIANTS, DEFAULT_CONFIRM_BUTTON_TEXT, DEFAULT_CANCEL_BUTTON_TEXT, DIVIDER_ORIENTATIONS, DIVIDER_VARIANTS, DEFAULT_DIVIDER_THICKNESS, DEFAULT_INSET_VALUE, DIVIDER_CLASSES, EXTENDED_FAB_VARIANTS, EXTENDED_FAB_WIDTH, EXTENDED_FAB_POSITIONS, EXTENDED_FAB_ICON_POSITIONS, EXTENDED_FAB_CLASSES, EXTENDED_FAB_TYPES, EXTENDED_FAB_ANIMATIONS, FAB_VARIANTS, FAB_SIZES, FAB_POSITIONS, FAB_CLASSES, FAB_TYPES, FAB_ICON_SIZES, FAB_ANIMATIONS, LIST_DEFAULTS, LIST_TYPES, LIST_SELECTION_MODES, LIST_EVENTS, LIST_SCROLL_POSITIONS, LIST_CLASSES, MENU_POSITION, MENU_DEFAULTS, MENU_INTERACTION_TYPES, MENU_ITEM_TYPES, MENU_EVENTS, MENU_CLASSES, NAV_VARIANTS, NAV_POSITIONS, NAV_BEHAVIORS, NAV_ITEM_STATES, NAV_EVENTS, NAV_DEFAULTS, NAV_CLASSES, PROGRESS_VARIANTS, PROGRESS_EVENTS, PROGRESS_DEFAULTS, PROGRESS_CLASSES, RADIO_STATES, RADIO_DIRECTIONS, RADIO_VARIANTS, RADIO_LABEL_POSITIONS, RADIO_SIZES, RADIO_EVENTS, RADIO_DEFAULTS, RADIO_CLASSES, SEARCH_VARIANTS, SEARCH_STATES, SEARCH_EVENTS, SEARCH_ICONS, SEARCH_DEFAULTS, SEARCH_CLASSES, SEGMENTED_BUTTON_MODES, SEGMENTED_BUTTON_DENSITY, SEGMENTED_BUTTON_EVENTS, SEGMENTED_BUTTON_DEFAULTS, SEGMENTED_BUTTON_ICONS, SEGMENTED_BUTTON_CLASSES, SELECT_VARIANTS, SELECT_PLACEMENT, SELECT_INTERACTION, SELECT_EVENTS, SELECT_ICONS, SELECT_DEFAULTS, SELECT_CLASSES, SHEET_VARIANTS, SHEET_POSITIONS, SHEET_EVENTS, SHEET_ELEVATION, SHEET_DEFAULTS, SHEET_ANIMATION, SHEET_GESTURE, SHEET_CLASSES, SLIDER_COLORS, SLIDER_SIZES, SLIDER_EVENTS, SLIDER_POSITIONS, SLIDER_DEFAULTS, SLIDER_CLASSES, SNACKBAR_VARIANTS, SNACKBAR_POSITIONS, SNACKBAR_STATES, SNACKBAR_EVENTS, SNACKBAR_DEFAULTS, SNACKBAR_CLASSES, SWITCH_LABEL_POSITIONS, SWITCH_STATES, SWITCH_EVENTS, SWITCH_DEFAULTS, SWITCH_CLASSES, TAB_VARIANTS, TAB_STATES, TAB_INDICATOR_WIDTH_STRATEGIES, TAB_EVENTS, TABS_EVENTS, TABS_DEFAULTS, TABS_CLASSES, TAB_CLASSES, TEXTFIELD_VARIANTS, TEXTFIELD_SIZES, TEXTFIELD_STATES, TEXTFIELD_TYPES, TEXTFIELD_EVENTS, TEXTFIELD_DEFAULTS, TEXTFIELD_CLASSES, TIMEPICKER_TYPES, TIMEPICKER_ORIENTATIONS, TIMEPICKER_FORMATS, TIMEPICKER_PERIODS, TIMEPICKER_EVENTS, TIMEPICKER_DIAL, TIMEPICKER_VALUES, TIMEPICKER_Z_INDEX, TIMEPICKER_DEFAULTS, TIMEPICKER_CLASSES, TOOLTIP_POSITIONS, TOOLTIP_VARIANTS, TOOLTIP_EVENTS, TOOLTIP_DEFAULTS, TOOLTIP_CLASSES, TOP_APP_BAR_TYPES, TOP_APP_BAR_STATES, TOP_APP_BAR_DEFAULTS, TOP_APP_BAR_CLASSES };
1
+ import { BADGE_VARIANTS, BADGE_COLORS, BADGE_POSITIONS, BADGE_MAX_CHARACTERS } from "./components/badge/constants";
2
+ import { FAB_POSITIONS as BOTTOM_APP_BAR_FAB_POSITIONS, BOTTOM_APP_BAR_CLASSES, DEFAULT_TRANSITION_DURATION } from "./components/bottom-app-bar/constants";
3
+ import { BUTTON_VARIANTS, BUTTON_TYPES, BUTTON_CLASSES, BUTTON_SIZES, BUTTON_SHAPES, DEFAULT_RIPPLE_CONFIG } from "./components/button/constants";
4
+ import { CARD_VARIANTS, CARD_ELEVATIONS, CARD_WIDTHS, CARD_CORNER_RADIUS, CARD_ASPECT_RATIOS, CARD_ACTION_ALIGNMENT, CARD_MEDIA_POSITION, CARD_CLASSES } from "./components/card/constants";
5
+ import { CHECKBOX_VARIANTS, CHECKBOX_LABEL_POSITION, CHECKBOX_STATES, CHECKBOX_CLASSES } from "./components/checkbox/constants";
6
+ import { CHIP_VARIANTS, CHIP_EVENTS, CHIPS_EVENTS } from "./components/chips/constants";
7
+ import { CHIP_CLASSES, CHIP_STATES } from "./components/chips/chip/constants";
8
+ import { DATEPICKER_VARIANTS, DATEPICKER_VIEWS, DATEPICKER_SELECTION_MODES, DAY_NAMES, MONTH_NAMES, MONTH_NAMES_SHORT, DEFAULT_DATE_FORMAT, DATEPICKER_CLASSES, DATEPICKER_EVENTS } from "./components/datepicker/constants";
9
+ import { DIALOG_SIZES, DIALOG_ANIMATIONS, DIALOG_FOOTER_ALIGNMENTS, DIALOG_EVENTS, DIALOG_CLASSES, DEFAULT_ANIMATION_DURATION, DEFAULT_Z_INDEX, DIALOG_BUTTON_VARIANTS, DEFAULT_CONFIRM_BUTTON_TEXT, DEFAULT_CANCEL_BUTTON_TEXT } from "./components/dialog/constants";
10
+ import { DIVIDER_ORIENTATIONS, DIVIDER_VARIANTS, DEFAULT_DIVIDER_THICKNESS, DEFAULT_INSET_VALUE, DIVIDER_CLASSES } from "./components/divider/constants";
11
+ import { EXTENDED_FAB_VARIANTS, EXTENDED_FAB_WIDTH, EXTENDED_FAB_POSITIONS, EXTENDED_FAB_ICON_POSITIONS, EXTENDED_FAB_CLASSES, EXTENDED_FAB_TYPES, EXTENDED_FAB_ANIMATIONS } from "./components/extended-fab/constants";
12
+ import { FAB_VARIANTS, FAB_SIZES, FAB_POSITIONS, FAB_CLASSES, FAB_TYPES, FAB_ICON_SIZES, FAB_ANIMATIONS } from "./components/fab/constants";
13
+ import { LIST_DEFAULTS, LIST_TYPES, LIST_SELECTION_MODES, LIST_EVENTS, LIST_SCROLL_POSITIONS, LIST_CLASSES } from "./components/list/constants";
14
+ import { MENU_POSITION, MENU_DEFAULTS, MENU_INTERACTION_TYPES, MENU_ITEM_TYPES, MENU_EVENTS, MENU_CLASSES } from "./components/menu/constants";
15
+ import { NAV_VARIANTS, NAV_POSITIONS, NAV_BEHAVIORS, NAV_ITEM_STATES, NAV_EVENTS, NAV_DEFAULTS, NAV_CLASSES } from "./components/navigation/constants";
16
+ import { PROGRESS_VARIANTS, PROGRESS_EVENTS, PROGRESS_DEFAULTS, PROGRESS_CLASSES } from "./components/progress/constants";
17
+ import { RADIO_STATES, RADIO_DIRECTIONS, RADIO_VARIANTS, RADIO_LABEL_POSITIONS, RADIO_SIZES, RADIO_EVENTS, RADIO_DEFAULTS, RADIO_CLASSES } from "./components/radios/constants";
18
+ import { SEARCH_VARIANTS, SEARCH_STATES, SEARCH_EVENTS, SEARCH_ICONS, SEARCH_DEFAULTS, SEARCH_CLASSES } from "./components/search/constants";
19
+ import { SEGMENTED_BUTTON_MODES, SEGMENTED_BUTTON_DENSITY, SEGMENTED_BUTTON_EVENTS, SEGMENTED_BUTTON_DEFAULTS, SEGMENTED_BUTTON_ICONS, SEGMENTED_BUTTON_CLASSES } from "./components/segmented-button/constants";
20
+ import { SELECT_VARIANTS, SELECT_PLACEMENT, SELECT_INTERACTION, SELECT_EVENTS, SELECT_ICONS, SELECT_DEFAULTS, SELECT_CLASSES } from "./components/select/constants";
21
+ import { SHEET_VARIANTS, SHEET_POSITIONS, SHEET_EVENTS, SHEET_ELEVATION, SHEET_DEFAULTS, SHEET_ANIMATION, SHEET_GESTURE, SHEET_CLASSES } from "./components/sheet/constants";
22
+ import { SLIDER_COLORS, SLIDER_SIZES, SLIDER_EVENTS, SLIDER_POSITIONS, SLIDER_DEFAULTS, SLIDER_CLASSES } from "./components/slider/constants";
23
+ import { SNACKBAR_VARIANTS, SNACKBAR_POSITIONS, SNACKBAR_STATES, SNACKBAR_EVENTS, SNACKBAR_DEFAULTS, SNACKBAR_CLASSES } from "./components/snackbar/constants";
24
+ import { SWITCH_LABEL_POSITIONS, SWITCH_STATES, SWITCH_EVENTS, SWITCH_DEFAULTS, SWITCH_CLASSES } from "./components/switch/constants";
25
+ import { TAB_VARIANTS, TAB_STATES, TAB_INDICATOR_WIDTH_STRATEGIES, TAB_EVENTS, TABS_EVENTS, TABS_DEFAULTS, TABS_CLASSES, TAB_CLASSES } from "./components/tabs/constants";
26
+ import { TEXTFIELD_VARIANTS, TEXTFIELD_STATES, TEXTFIELD_TYPES, TEXTFIELD_EVENTS, TEXTFIELD_DEFAULTS, TEXTFIELD_CLASSES } from "./components/textfield/constants";
27
+ import { TIMEPICKER_TYPES, TIMEPICKER_ORIENTATIONS, TIMEPICKER_FORMATS, TIMEPICKER_PERIODS, TIMEPICKER_EVENTS, TIMEPICKER_DIAL, TIMEPICKER_VALUES, TIMEPICKER_Z_INDEX, TIMEPICKER_DEFAULTS, TIMEPICKER_CLASSES } from "./components/timepicker/constants";
28
+ import { TOOLTIP_POSITIONS, TOOLTIP_VARIANTS, TOOLTIP_EVENTS, TOOLTIP_DEFAULTS, TOOLTIP_CLASSES } from "./components/tooltip/constants";
29
+ import { TOP_APP_BAR_TYPES, TOP_APP_BAR_STATES, TOP_APP_BAR_DEFAULTS, TOP_APP_BAR_CLASSES } from "./components/top-app-bar/constants";
30
+ export { BADGE_VARIANTS, BADGE_COLORS, BADGE_POSITIONS, BADGE_MAX_CHARACTERS, BOTTOM_APP_BAR_FAB_POSITIONS, BOTTOM_APP_BAR_CLASSES, DEFAULT_TRANSITION_DURATION, BUTTON_VARIANTS, BUTTON_TYPES, BUTTON_CLASSES, BUTTON_SIZES, BUTTON_SHAPES, DEFAULT_RIPPLE_CONFIG, CARD_VARIANTS, CARD_ELEVATIONS, CARD_WIDTHS, CARD_CORNER_RADIUS, CARD_ASPECT_RATIOS, CARD_ACTION_ALIGNMENT, CARD_MEDIA_POSITION, CARD_CLASSES, CHECKBOX_VARIANTS, CHECKBOX_LABEL_POSITION, CHECKBOX_STATES, CHECKBOX_CLASSES, CHIP_VARIANTS, CHIP_EVENTS, CHIPS_EVENTS, CHIP_CLASSES, CHIP_STATES, DATEPICKER_VARIANTS, DATEPICKER_VIEWS, DATEPICKER_SELECTION_MODES, DAY_NAMES, MONTH_NAMES, MONTH_NAMES_SHORT, DEFAULT_DATE_FORMAT, DATEPICKER_CLASSES, DATEPICKER_EVENTS, DIALOG_SIZES, DIALOG_ANIMATIONS, DIALOG_FOOTER_ALIGNMENTS, DIALOG_EVENTS, DIALOG_CLASSES, DEFAULT_ANIMATION_DURATION, DEFAULT_Z_INDEX, DIALOG_BUTTON_VARIANTS, DEFAULT_CONFIRM_BUTTON_TEXT, DEFAULT_CANCEL_BUTTON_TEXT, DIVIDER_ORIENTATIONS, DIVIDER_VARIANTS, DEFAULT_DIVIDER_THICKNESS, DEFAULT_INSET_VALUE, DIVIDER_CLASSES, EXTENDED_FAB_VARIANTS, EXTENDED_FAB_WIDTH, EXTENDED_FAB_POSITIONS, EXTENDED_FAB_ICON_POSITIONS, EXTENDED_FAB_CLASSES, EXTENDED_FAB_TYPES, EXTENDED_FAB_ANIMATIONS, FAB_VARIANTS, FAB_SIZES, FAB_POSITIONS, FAB_CLASSES, FAB_TYPES, FAB_ICON_SIZES, FAB_ANIMATIONS, LIST_DEFAULTS, LIST_TYPES, LIST_SELECTION_MODES, LIST_EVENTS, LIST_SCROLL_POSITIONS, LIST_CLASSES, MENU_POSITION, MENU_DEFAULTS, MENU_INTERACTION_TYPES, MENU_ITEM_TYPES, MENU_EVENTS, MENU_CLASSES, NAV_VARIANTS, NAV_POSITIONS, NAV_BEHAVIORS, NAV_ITEM_STATES, NAV_EVENTS, NAV_DEFAULTS, NAV_CLASSES, PROGRESS_VARIANTS, PROGRESS_EVENTS, PROGRESS_DEFAULTS, PROGRESS_CLASSES, RADIO_STATES, RADIO_DIRECTIONS, RADIO_VARIANTS, RADIO_LABEL_POSITIONS, RADIO_SIZES, RADIO_EVENTS, RADIO_DEFAULTS, RADIO_CLASSES, SEARCH_VARIANTS, SEARCH_STATES, SEARCH_EVENTS, SEARCH_ICONS, SEARCH_DEFAULTS, SEARCH_CLASSES, SEGMENTED_BUTTON_MODES, SEGMENTED_BUTTON_DENSITY, SEGMENTED_BUTTON_EVENTS, SEGMENTED_BUTTON_DEFAULTS, SEGMENTED_BUTTON_ICONS, SEGMENTED_BUTTON_CLASSES, SELECT_VARIANTS, SELECT_PLACEMENT, SELECT_INTERACTION, SELECT_EVENTS, SELECT_ICONS, SELECT_DEFAULTS, SELECT_CLASSES, SHEET_VARIANTS, SHEET_POSITIONS, SHEET_EVENTS, SHEET_ELEVATION, SHEET_DEFAULTS, SHEET_ANIMATION, SHEET_GESTURE, SHEET_CLASSES, SLIDER_COLORS, SLIDER_SIZES, SLIDER_EVENTS, SLIDER_POSITIONS, SLIDER_DEFAULTS, SLIDER_CLASSES, SNACKBAR_VARIANTS, SNACKBAR_POSITIONS, SNACKBAR_STATES, SNACKBAR_EVENTS, SNACKBAR_DEFAULTS, SNACKBAR_CLASSES, SWITCH_LABEL_POSITIONS, SWITCH_STATES, SWITCH_EVENTS, SWITCH_DEFAULTS, SWITCH_CLASSES, TAB_VARIANTS, TAB_STATES, TAB_INDICATOR_WIDTH_STRATEGIES, TAB_EVENTS, TABS_EVENTS, TABS_DEFAULTS, TABS_CLASSES, TAB_CLASSES, TEXTFIELD_VARIANTS, TEXTFIELD_STATES, TEXTFIELD_TYPES, TEXTFIELD_EVENTS, TEXTFIELD_DEFAULTS, TEXTFIELD_CLASSES, TIMEPICKER_TYPES, TIMEPICKER_ORIENTATIONS, TIMEPICKER_FORMATS, TIMEPICKER_PERIODS, TIMEPICKER_EVENTS, TIMEPICKER_DIAL, TIMEPICKER_VALUES, TIMEPICKER_Z_INDEX, TIMEPICKER_DEFAULTS, TIMEPICKER_CLASSES, TOOLTIP_POSITIONS, TOOLTIP_VARIANTS, TOOLTIP_EVENTS, TOOLTIP_DEFAULTS, TOOLTIP_CLASSES, TOP_APP_BAR_TYPES, TOP_APP_BAR_STATES, TOP_APP_BAR_DEFAULTS, TOP_APP_BAR_CLASSES, };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Easing function for smooth animations (Material Design standard)
3
+ * Implements cubic-bezier(0.4, 0, 0.2, 1)
4
+ *
5
+ * @param t Progress value between 0 and 1
6
+ * @returns Eased progress value between 0 and 1
7
+ */
8
+ export declare const easeOutCubic: (t: number) => number;
9
+ /**
10
+ * Standard Material Design animation durations
11
+ */
12
+ export declare const ANIMATION_DURATIONS: {
13
+ SHORT: number;
14
+ MEDIUM: number;
15
+ LONG: number;
16
+ EXTRA_LONG: number;
17
+ };
18
+ /**
19
+ * Common easing functions
20
+ */
21
+ export declare const EASING_FUNCTIONS: {
22
+ linear: (t: number) => number;
23
+ easeIn: (t: number) => number;
24
+ easeOut: (t: number) => number;
25
+ easeInOut: (t: number) => number;
26
+ materialStandard: (t: number) => number;
27
+ };
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Canvas drawing utilities
3
+ * Provides common drawing functions for canvas operations
4
+ */
5
+ /**
6
+ * Creates a rounded rectangle path
7
+ * @param ctx - Canvas 2D rendering context
8
+ * @param x - X coordinate
9
+ * @param y - Y coordinate
10
+ * @param width - Rectangle width
11
+ * @param height - Rectangle height
12
+ * @param radius - Corner radius (can be a number or array of radii)
13
+ */
14
+ export declare const createRoundedRectPath: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [number, number, number, number]) => void;
15
+ /**
16
+ * Draws a filled rounded rectangle
17
+ * @param ctx - Canvas 2D rendering context
18
+ * @param x - X coordinate
19
+ * @param y - Y coordinate
20
+ * @param width - Rectangle width
21
+ * @param height - Rectangle height
22
+ * @param radius - Corner radius
23
+ * @param fillStyle - Fill color/style
24
+ */
25
+ export declare const fillRoundedRect: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [number, number, number, number], fillStyle?: string | CanvasGradient | CanvasPattern) => void;
26
+ /**
27
+ * Creates a clipping region with rounded corners
28
+ * @param ctx - Canvas 2D rendering context
29
+ * @param x - X coordinate
30
+ * @param y - Y coordinate
31
+ * @param width - Rectangle width
32
+ * @param height - Rectangle height
33
+ * @param radius - Corner radius
34
+ * @returns Function to restore the canvas state
35
+ */
36
+ export declare const clipRoundedRect: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [number, number, number, number]) => (() => void);
37
+ /**
38
+ * Draws a rounded rectangle with different left and right radii
39
+ * Useful for track segments that connect to other elements
40
+ * @param ctx - Canvas 2D rendering context
41
+ * @param x - X coordinate
42
+ * @param y - Y coordinate
43
+ * @param width - Rectangle width
44
+ * @param height - Rectangle height
45
+ * @param leftRadius - Left side radius
46
+ * @param rightRadius - Right side radius
47
+ * @param fillStyle - Fill color/style
48
+ */
49
+ export declare const fillRoundedRectLR: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, leftRadius: number, rightRadius: number, fillStyle?: string | CanvasGradient | CanvasPattern) => void;
50
+ /**
51
+ * Clears a canvas with optional background color
52
+ * @param ctx - Canvas 2D rendering context
53
+ * @param width - Canvas width
54
+ * @param height - Canvas height
55
+ * @param backgroundColor - Optional background color
56
+ */
57
+ export declare const clearCanvas: (ctx: CanvasRenderingContext2D, width: number, height: number, backgroundColor?: string) => void;
@@ -1,5 +1,8 @@
1
1
  /**
2
- * Canvas utilities module
3
- * Provides common utilities for working with HTML Canvas elements
2
+ * Canvas utilities for high-performance rendering
3
+ * Provides tools for drawing, animation, and resize handling
4
4
  */
5
- export { observeCanvasResize } from './resize';
5
+ export * from './drawing';
6
+ export * from './resize';
7
+ export * from './animation';
8
+ export * from './utils';
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Common canvas context interface used by components
3
+ */
4
+ export interface CanvasContext {
5
+ canvas: HTMLCanvasElement;
6
+ ctx: CanvasRenderingContext2D;
7
+ width: number;
8
+ height: number;
9
+ pixelRatio: number;
10
+ }
11
+ /**
12
+ * Creates and initializes a canvas context with proper pixel ratio handling
13
+ *
14
+ * @param canvas - The canvas element
15
+ * @param width - Canvas width
16
+ * @param height - Canvas height
17
+ * @returns Initialized canvas context
18
+ */
19
+ export declare const createCanvasContext: (canvas: HTMLCanvasElement, width: number, height: number) => CanvasContext;
20
+ /**
21
+ * Updates canvas dimensions while preserving pixel ratio
22
+ *
23
+ * @param context - The canvas context to update
24
+ * @param width - New width
25
+ * @param height - New height
26
+ */
27
+ export declare const updateCanvasDimensions: (context: CanvasContext, width: number, height: number) => void;
28
+ /**
29
+ * Tries to initialize a canvas with retry mechanism
30
+ *
31
+ * @param initFn - Function that performs initialization
32
+ * @param onSuccess - Optional callback on successful initialization
33
+ * @returns Whether initialization was immediately successful
34
+ */
35
+ export declare const initializeCanvasWithRetry: (initFn: () => boolean, onSuccess?: () => void) => boolean;
36
+ /**
37
+ * Creates a theme observer that triggers a callback on theme changes
38
+ *
39
+ * @param color - The theme color to observe (e.g., 'primary', 'secondary')
40
+ * @param callback - Function to call when theme changes
41
+ * @returns Cleanup function or null
42
+ */
43
+ export declare const createCanvasThemeObserver: (color: string, callback: () => void) => (() => void) | null;
44
+ /**
45
+ * Standard animation frame manager for components
46
+ */
47
+ export declare class AnimationFrameManager {
48
+ private animationId;
49
+ /**
50
+ * Starts an animation loop
51
+ * @param callback - Animation callback receiving timestamp
52
+ */
53
+ start(callback: (timestamp: number) => void): void;
54
+ /**
55
+ * Stops the animation loop
56
+ */
57
+ stop(): void;
58
+ /**
59
+ * Whether animation is currently running
60
+ */
61
+ get isRunning(): boolean;
62
+ }
63
+ /**
64
+ * Manages multiple cleanup functions for components
65
+ */
66
+ export declare class CleanupManager {
67
+ private cleanupFunctions;
68
+ /**
69
+ * Adds a cleanup function
70
+ */
71
+ add(cleanup: (() => void) | null | undefined): void;
72
+ /**
73
+ * Runs all cleanup functions and clears the list
74
+ */
75
+ cleanup(): void;
76
+ }
77
+ /**
78
+ * Creates a standard canvas element with common styles
79
+ *
80
+ * @param className - CSS class name for the canvas
81
+ * @param additionalStyles - Additional styles to apply
82
+ * @returns Canvas element
83
+ */
84
+ export declare const createStyledCanvas: (className: string, additionalStyles?: Partial<CSSStyleDeclaration>) => HTMLCanvasElement;
@@ -12,13 +12,13 @@ export declare const COLLECTION_EVENTS: {
12
12
  /**
13
13
  * Collection event type
14
14
  */
15
- export type CollectionEvent = typeof COLLECTION_EVENTS[keyof typeof COLLECTION_EVENTS];
15
+ export type CollectionEvent = (typeof COLLECTION_EVENTS)[keyof typeof COLLECTION_EVENTS];
16
16
  /**
17
17
  * Observer callback type for collection events
18
18
  */
19
- export type CollectionObserver<T> = (payload: {
19
+ export type CollectionObserver<T = unknown> = (payload: {
20
20
  event: CollectionEvent;
21
- data: any;
21
+ data: T | readonly T[] | readonly string[] | boolean | Error | null;
22
22
  }) => void;
23
23
  /**
24
24
  * Query operators for filtering
@@ -41,7 +41,7 @@ export declare const OPERATORS: {
41
41
  */
42
42
  export interface CollectionItem {
43
43
  id: string;
44
- [key: string]: any;
44
+ [key: string]: unknown;
45
45
  }
46
46
  /**
47
47
  * Collection configuration
@@ -50,11 +50,11 @@ export interface CollectionConfig<T extends CollectionItem> {
50
50
  /**
51
51
  * Transform function for items
52
52
  */
53
- transform?: (item: any) => T;
53
+ transform?: (item: unknown) => T;
54
54
  /**
55
55
  * Validation function for items
56
56
  */
57
- validate?: (item: any) => boolean;
57
+ validate?: (item: unknown) => boolean;
58
58
  /**
59
59
  * Initial capacity for collection
60
60
  */
@@ -69,7 +69,7 @@ export interface Collection<T extends CollectionItem> {
69
69
  * @param observer - Observer callback
70
70
  * @returns Unsubscribe function
71
71
  */
72
- subscribe: (observer: CollectionObserver<T>) => () => void;
72
+ subscribe: (observer: CollectionObserver) => () => void;
73
73
  /**
74
74
  * Get collection items based on current query and sort
75
75
  * @returns Collection items
@@ -1,4 +1,4 @@
1
- import { ListManagerConfig, ListManager, LoadStatus } from './types';
1
+ import { ListManagerConfig, ListManager, LoadStatus } from "./types";
2
2
  /**
3
3
  * Creates a list manager for a specific collection
4
4
  * @param {string} collection - Collection name
@@ -58,4 +58,4 @@ export declare const transforms: {
58
58
  meta: any;
59
59
  };
60
60
  };
61
- export * from './types';
61
+ export * from "./types";
@@ -1,6 +1,6 @@
1
- import { ListManagerConfig, ListManagerElements, VisibleRange } from './types';
2
- import { RecyclingPool } from './utils/recycling';
3
- import { ItemMeasurement } from './item-measurement';
1
+ import { ListManagerConfig, ListManagerElements, VisibleRange } from "./types";
2
+ import { RecyclingPool } from "./utils/recycling";
3
+ import { ItemMeasurement } from "./item-measurement";
4
4
  /**
5
5
  * Creates a renderer for list items
6
6
  * @param config List manager configuration
@@ -1,4 +1,4 @@
1
- import { ListManagerElements, ListManagerConfig } from './types';
1
+ import { ListManagerElements, ListManagerConfig } from "./types";
2
2
  /**
3
3
  * Common interface for scroll tracking strategies
4
4
  */
@@ -44,6 +44,7 @@ export interface WithElementOptions {
44
44
  className?: string | string[];
45
45
  forwardEvents?: Record<string, boolean | ((component: any, event: Event) => boolean)>;
46
46
  interactive?: boolean;
47
+ parent?: HTMLElement | string;
47
48
  }
48
49
  /**
49
50
  * Creates a base component with configuration and prefix utilities.
@@ -1,4 +1,4 @@
1
- import { BaseComponent } from '../component';
1
+ import { BaseComponent } from "../component";
2
2
  /**
3
3
  * Configuration for checkable feature
4
4
  */
@@ -12,7 +12,7 @@ export interface CheckableConfig {
12
12
  export interface InputComponent extends BaseComponent {
13
13
  element: HTMLElement;
14
14
  input: HTMLInputElement;
15
- emit?: (event: string, data: any) => InputComponent;
15
+ emit?: (event: string, data: unknown) => InputComponent;
16
16
  on?: (event: string, handler: Function) => InputComponent;
17
17
  }
18
18
  /**
@@ -2,8 +2,8 @@
2
2
  * @module core/compose/features/gestures
3
3
  * @description Adds long press gesture recognition to components
4
4
  */
5
- import { BaseComponent, ElementComponent } from '../../component';
6
- import { LongPressEvent, GestureHandler } from '../../../gestures';
5
+ import { BaseComponent, ElementComponent } from "../../component";
6
+ import { LongPressEvent, GestureHandler } from "../../../gestures";
7
7
  /**
8
8
  * Configuration for long press gesture feature
9
9
  */
@@ -2,8 +2,8 @@
2
2
  * @module core/compose/features/gestures
3
3
  * @description Adds pan gesture recognition to components
4
4
  */
5
- import { BaseComponent, ElementComponent } from '../../component';
6
- import { PanEvent, GestureHandler } from '../../../gestures';
5
+ import { BaseComponent, ElementComponent } from "../../component";
6
+ import { PanEvent, GestureHandler } from "../../../gestures";
7
7
  /**
8
8
  * Configuration for pan gesture feature
9
9
  */
@@ -2,8 +2,8 @@
2
2
  * @module core/compose/features/gestures
3
3
  * @description Adds pinch gesture recognition to components
4
4
  */
5
- import { BaseComponent, ElementComponent } from '../../component';
6
- import { PinchEvent, GestureHandler } from '../../../gestures';
5
+ import { BaseComponent, ElementComponent } from "../../component";
6
+ import { PinchEvent, GestureHandler } from "../../../gestures";
7
7
  /**
8
8
  * Configuration for pinch gesture feature
9
9
  */
@@ -2,8 +2,8 @@
2
2
  * @module core/compose/features/gestures
3
3
  * @description Adds rotate gesture recognition to components
4
4
  */
5
- import { BaseComponent, ElementComponent } from '../../component';
6
- import { RotateEvent, GestureHandler } from '../../../gestures';
5
+ import { BaseComponent, ElementComponent } from "../../component";
6
+ import { RotateEvent, GestureHandler } from "../../../gestures";
7
7
  /**
8
8
  * Configuration for rotate gesture feature
9
9
  */
@@ -2,8 +2,8 @@
2
2
  * @module core/compose/features/gestures
3
3
  * @description Adds swipe gesture recognition to components
4
4
  */
5
- import { BaseComponent, ElementComponent } from '../../component';
6
- import { SwipeEvent, GestureHandler } from '../../../gestures';
5
+ import { BaseComponent, ElementComponent } from "../../component";
6
+ import { SwipeEvent, GestureHandler } from "../../../gestures";
7
7
  /**
8
8
  * Configuration for swipe gesture feature
9
9
  */
@@ -2,8 +2,8 @@
2
2
  * @module core/compose/features/gestures
3
3
  * @description Adds tap gesture recognition to components
4
4
  */
5
- import { BaseComponent, ElementComponent } from '../../component';
6
- import { TapEvent, GestureHandler } from '../../../gestures';
5
+ import { BaseComponent, ElementComponent } from "../../component";
6
+ import { TapEvent, GestureHandler } from "../../../gestures";
7
7
  /**
8
8
  * Configuration for tap gesture feature
9
9
  */
@@ -2,8 +2,8 @@
2
2
  * @module core/compose/features
3
3
  * @description Adds gesture recognition capabilities to components
4
4
  */
5
- import { BaseComponent, ElementComponent } from '../component';
6
- import { GestureManager, GestureConfig, GestureHandler } from '../../gestures';
5
+ import { BaseComponent, ElementComponent } from "../component";
6
+ import { GestureManager, GestureConfig, GestureHandler } from "../../gestures";
7
7
  /**
8
8
  * Configuration for gestures feature
9
9
  */
@@ -1,4 +1,4 @@
1
- import { ElementComponent } from '../component';
1
+ import { ElementComponent } from "../component";
2
2
  /**
3
3
  * Input configuration options
4
4
  */
@@ -1,5 +1,5 @@
1
- import { BaseComponent, ElementComponent } from '../component';
2
- import { LifecycleComponent } from './lifecycle';
1
+ import { BaseComponent, ElementComponent } from "../component";
2
+ import { LifecycleComponent } from "./lifecycle";
3
3
  /**
4
4
  * Ripple configuration interface
5
5
  */
@@ -1,4 +1,4 @@
1
- import { ElementComponent } from '../component';
1
+ import { ElementComponent } from "../component";
2
2
  /**
3
3
  * Configuration for size feature
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ElementComponent } from '../component';
1
+ import { ElementComponent } from "../component";
2
2
  /**
3
3
  * Configuration for text input feature
4
4
  */
@@ -2,7 +2,7 @@
2
2
  * @module core/compose/features
3
3
  * @description Adds throttled event handling capabilities to components
4
4
  */
5
- import { BaseComponent, ElementComponent } from '../component';
5
+ import { BaseComponent, ElementComponent } from "../component";
6
6
  /**
7
7
  * Configuration for throttled event handlers
8
8
  */
@@ -1,4 +1,4 @@
1
- import { ElementComponent } from '../component';
1
+ import { ElementComponent } from "../component";
2
2
  /**
3
3
  * Configuration for variant feature
4
4
  */
@@ -1,4 +1,4 @@
1
- import { BaseComponent, ElementComponent } from '../component';
1
+ import { BaseComponent, ElementComponent } from "../component";
2
2
  /**
3
3
  * Event manager interface
4
4
  */
@@ -9,7 +9,7 @@ export interface LabelConfig {
9
9
  /**
10
10
  * Position of the label ('start', 'end', 'top', or 'bottom')
11
11
  */
12
- labelPosition?: 'start' | 'end' | 'top' | 'bottom';
12
+ labelPosition?: "start" | "end" | "top" | "bottom";
13
13
  /**
14
14
  * CSS class prefix
15
15
  */
@@ -8,10 +8,12 @@ export interface BaseComponentConfig {
8
8
  class?: string | string[];
9
9
  className?: string | string[];
10
10
  rawClass?: string | string[];
11
+ parent?: HTMLElement | string | null;
11
12
  [key: string]: any;
12
13
  }
13
14
  /**
14
15
  * Creates a base configuration for any component
16
+ * Automatically merges global defaults if available
15
17
  *
16
18
  * @param {BaseComponentConfig} defaults - Default configuration for the component
17
19
  * @param {BaseComponentConfig} userConfig - User provided configuration
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Lightweight Global Configuration System for mtrl
3
+ *
4
+ * This system allows setting default configurations for all components
5
+ * without adding complexity or performance overhead.
6
+ */
7
+ import { ButtonConfig } from '../../components/button/types';
8
+ import { TextfieldConfig } from '../../components/textfield/types';
9
+ /**
10
+ * Component configuration map
11
+ * Add new components here as they support global config
12
+ *
13
+ * For components not yet integrated, use Partial<any> as a placeholder
14
+ */
15
+ export interface ComponentConfigMap {
16
+ button?: Partial<ButtonConfig>;
17
+ textfield?: Partial<TextfieldConfig>;
18
+ checkbox?: Partial<any>;
19
+ switch?: Partial<any>;
20
+ slider?: Partial<any>;
21
+ card?: Partial<any>;
22
+ chip?: Partial<any>;
23
+ dialog?: Partial<any>;
24
+ }
25
+ /**
26
+ * Sets global defaults for a specific component
27
+ *
28
+ * @param component - Component name
29
+ * @param config - Default configuration to apply
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * // Set all buttons to be square by default
34
+ * setComponentDefaults('button', {
35
+ * shape: 'square',
36
+ * size: 'm'
37
+ * });
38
+ * ```
39
+ */
40
+ export declare function setComponentDefaults<K extends keyof ComponentConfigMap>(component: K, config: ComponentConfigMap[K]): void;
41
+ /**
42
+ * Gets global defaults for a component
43
+ *
44
+ * @param component - Component name
45
+ * @returns Component defaults or empty object
46
+ */
47
+ export declare function getComponentDefaults<K extends keyof ComponentConfigMap>(component: K): ComponentConfigMap[K];
48
+ /**
49
+ * Sets global defaults for multiple components at once
50
+ *
51
+ * @param configs - Map of component names to their default configs
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * setGlobalDefaults({
56
+ * button: { shape: 'square', size: 'm' },
57
+ * textfield: { variant: 'outlined' }
58
+ * });
59
+ * ```
60
+ */
61
+ export declare function setGlobalDefaults(configs: Partial<ComponentConfigMap>): void;
62
+ /**
63
+ * Clears all global defaults
64
+ */
65
+ export declare function clearGlobalDefaults(): void;
@@ -85,7 +85,7 @@ export interface CreateElementOptions {
85
85
  /**
86
86
  * Options for SVG element creation, extends regular element options
87
87
  */
88
- export interface CreateSVGElementOptions extends Omit<CreateElementOptions, 'container' | 'onCreate'> {
88
+ export interface CreateSVGElementOptions extends Omit<CreateElementOptions, "container" | "onCreate"> {
89
89
  /**
90
90
  * Container to append element to
91
91
  */
@@ -2,7 +2,7 @@
2
2
  * @module core/gestures
3
3
  * @description Pan gesture detection
4
4
  */
5
- import { PanEvent, GestureDetectionContext } from './types';
5
+ import { PanEvent, GestureDetectionContext } from "./types";
6
6
  /**
7
7
  * Detect pan gesture
8
8
  *
@@ -2,7 +2,7 @@
2
2
  * @module core/gestures
3
3
  * @description Pinch gesture detection
4
4
  */
5
- import { PinchEvent, GestureDetectionContext } from './types';
5
+ import { PinchEvent, GestureDetectionContext } from "./types";
6
6
  /**
7
7
  * Detect pinch gesture
8
8
  *