mtrl 0.3.9 → 0.4.3

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 (167) hide show
  1. package/dist/components/badge/api.d.ts +5 -5
  2. package/dist/components/badge/config.d.ts +18 -8
  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 +18 -7
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +2 -2
  23. package/dist/components/chips/chips.d.ts +1 -1
  24. package/dist/components/chips/config.d.ts +1 -1
  25. package/dist/components/chips/features/chip-items.d.ts +1 -1
  26. package/dist/components/chips/schema.d.ts +1 -2
  27. package/dist/components/datepicker/api.d.ts +1 -1
  28. package/dist/components/datepicker/config.d.ts +4 -4
  29. package/dist/components/datepicker/datepicker.d.ts +1 -1
  30. package/dist/components/datepicker/render.d.ts +5 -5
  31. package/dist/components/dialog/config.d.ts +2 -2
  32. package/dist/components/dialog/features.d.ts +1 -1
  33. package/dist/components/dialog/types.d.ts +1 -1
  34. package/dist/components/divider/divider.d.ts +2 -2
  35. package/dist/components/extended-fab/config.d.ts +2 -2
  36. package/dist/components/fab/config.d.ts +2 -2
  37. package/dist/components/index.d.ts +2 -1
  38. package/dist/components/list/config.d.ts +1 -1
  39. package/dist/components/menu/api.d.ts +14 -14
  40. package/dist/components/menu/config.d.ts +2 -2
  41. package/dist/components/menu/features/controller.d.ts +1 -1
  42. package/dist/components/menu/features/keyboard.d.ts +2 -2
  43. package/dist/components/menu/features/submenu.d.ts +1 -1
  44. package/dist/components/menu/menu.d.ts +1 -1
  45. package/dist/components/navigation/config.d.ts +2 -2
  46. package/dist/components/navigation/features/controller.d.ts +1 -1
  47. package/dist/components/navigation/features/items.d.ts +2 -1
  48. package/dist/components/navigation/navigation.d.ts +1 -1
  49. package/dist/components/navigation/system/core.d.ts +1 -1
  50. package/dist/components/navigation/system/events.d.ts +1 -1
  51. package/dist/components/navigation/system/index.d.ts +2 -2
  52. package/dist/components/progress/api.d.ts +49 -18
  53. package/dist/components/progress/config.d.ts +20 -11
  54. package/dist/components/progress/constants.d.ts +86 -1
  55. package/dist/components/progress/features/canvas.d.ts +61 -0
  56. package/dist/components/progress/features/circular.d.ts +9 -0
  57. package/dist/components/progress/features/index.d.ts +8 -0
  58. package/dist/components/progress/features/linear.d.ts +9 -0
  59. package/dist/components/progress/features/resize-observer.d.ts +5 -0
  60. package/dist/components/progress/features/state.d.ts +46 -0
  61. package/dist/components/progress/index.d.ts +2 -2
  62. package/dist/components/progress/progress.d.ts +2 -2
  63. package/dist/components/progress/types.d.ts +102 -17
  64. package/dist/components/radios/api.d.ts +11 -11
  65. package/dist/components/radios/config.d.ts +2 -2
  66. package/dist/components/radios/radios.d.ts +1 -1
  67. package/dist/components/search/api.d.ts +15 -11
  68. package/dist/components/search/config.d.ts +1 -1
  69. package/dist/components/search/features/search.d.ts +1 -1
  70. package/dist/components/segmented-button/config.d.ts +8 -8
  71. package/dist/components/select/api.d.ts +1 -1
  72. package/dist/components/select/config.d.ts +1 -1
  73. package/dist/components/select/features.d.ts +1 -1
  74. package/dist/components/select/types.d.ts +20 -5
  75. package/dist/components/sheet/config.d.ts +2 -2
  76. package/dist/components/sheet/sheet.d.ts +1 -1
  77. package/dist/components/slider/api.d.ts +3 -2
  78. package/dist/components/slider/config.d.ts +2 -2
  79. package/dist/components/slider/constants.d.ts +50 -21
  80. package/dist/components/slider/features/canvas.d.ts +47 -0
  81. package/dist/components/slider/features/controller.d.ts +1 -1
  82. package/dist/components/slider/features/handlers.d.ts +1 -1
  83. package/dist/components/slider/features/index.d.ts +1 -0
  84. package/dist/components/slider/features/states.d.ts +1 -1
  85. package/dist/components/slider/schema.d.ts +7 -50
  86. package/dist/components/slider/slider.d.ts +5 -4
  87. package/dist/components/slider/types.d.ts +10 -37
  88. package/dist/components/snackbar/api.d.ts +1 -1
  89. package/dist/components/snackbar/config.d.ts +3 -3
  90. package/dist/components/switch/api.d.ts +1 -1
  91. package/dist/components/switch/config.d.ts +2 -2
  92. package/dist/components/switch/features.d.ts +4 -4
  93. package/dist/components/switch/switch.d.ts +1 -1
  94. package/dist/components/switch/types.d.ts +22 -17
  95. package/dist/components/tabs/config.d.ts +2 -3
  96. package/dist/components/tabs/features.d.ts +5 -5
  97. package/dist/components/tabs/index.d.ts +10 -10
  98. package/dist/components/tabs/tab.d.ts +1 -1
  99. package/dist/components/tabs/utils.d.ts +1 -1
  100. package/dist/components/textfield/api.d.ts +13 -3
  101. package/dist/components/textfield/config.d.ts +2 -2
  102. package/dist/components/textfield/constants.d.ts +12 -20
  103. package/dist/components/textfield/features/density.d.ts +28 -0
  104. package/dist/components/textfield/features/index.d.ts +13 -12
  105. package/dist/components/textfield/index.d.ts +3 -3
  106. package/dist/components/textfield/textfield.d.ts +1 -1
  107. package/dist/components/textfield/types.d.ts +42 -35
  108. package/dist/components/timepicker/clockdial.d.ts +2 -2
  109. package/dist/components/timepicker/config.d.ts +4 -4
  110. package/dist/components/timepicker/render.d.ts +1 -1
  111. package/dist/components/timepicker/timepicker.d.ts +1 -1
  112. package/dist/components/timepicker/utils.d.ts +2 -2
  113. package/dist/components/tooltip/api.d.ts +1 -1
  114. package/dist/components/tooltip/config.d.ts +2 -2
  115. package/dist/components/top-app-bar/top-app-bar.d.ts +2 -2
  116. package/dist/constants.d.ts +30 -30
  117. package/dist/core/canvas/animation.d.ts +27 -0
  118. package/dist/core/canvas/drawing.d.ts +57 -0
  119. package/dist/core/canvas/index.d.ts +8 -0
  120. package/dist/core/canvas/resize.d.ts +14 -0
  121. package/dist/core/canvas/utils.d.ts +84 -0
  122. package/dist/core/collection/collection.d.ts +7 -7
  123. package/dist/core/collection/list-manager/index.d.ts +2 -2
  124. package/dist/core/collection/list-manager/renderer.d.ts +3 -3
  125. package/dist/core/collection/list-manager/scroll-tracker.d.ts +1 -1
  126. package/dist/core/compose/component.d.ts +2 -1
  127. package/dist/core/compose/features/checkable.d.ts +2 -2
  128. package/dist/core/compose/features/gestures/longpress.d.ts +2 -2
  129. package/dist/core/compose/features/gestures/pan.d.ts +2 -2
  130. package/dist/core/compose/features/gestures/pinch.d.ts +2 -2
  131. package/dist/core/compose/features/gestures/rotate.d.ts +2 -2
  132. package/dist/core/compose/features/gestures/swipe.d.ts +2 -2
  133. package/dist/core/compose/features/gestures/tap.d.ts +2 -2
  134. package/dist/core/compose/features/gestures.d.ts +2 -2
  135. package/dist/core/compose/features/input.d.ts +1 -1
  136. package/dist/core/compose/features/ripple.d.ts +2 -2
  137. package/dist/core/compose/features/size.d.ts +1 -1
  138. package/dist/core/compose/features/textinput.d.ts +1 -1
  139. package/dist/core/compose/features/throttle.d.ts +1 -1
  140. package/dist/core/compose/features/variant.d.ts +1 -1
  141. package/dist/core/compose/features/withEvents.d.ts +1 -1
  142. package/dist/core/composition/features/label.d.ts +1 -1
  143. package/dist/core/config/component.d.ts +4 -2
  144. package/dist/core/config/global.d.ts +65 -0
  145. package/dist/core/dom/attributes.d.ts +13 -15
  146. package/dist/core/dom/classes.d.ts +10 -0
  147. package/dist/core/dom/create.d.ts +36 -6
  148. package/dist/core/dom/index.d.ts +2 -2
  149. package/dist/core/gestures/pan.d.ts +1 -1
  150. package/dist/core/gestures/pinch.d.ts +1 -1
  151. package/dist/core/gestures/rotate.d.ts +1 -1
  152. package/dist/core/index.d.ts +3 -1
  153. package/dist/core/layout/array.d.ts +7 -2
  154. package/dist/core/layout/object.d.ts +2 -2
  155. package/dist/core/layout/processor.d.ts +2 -2
  156. package/dist/core/layout/utils.d.ts +1 -1
  157. package/dist/core/utils/color.d.ts +14 -0
  158. package/dist/core/utils/index.d.ts +2 -6
  159. package/dist/core/utils/theme.d.ts +38 -0
  160. package/dist/index.cjs +15 -15
  161. package/dist/index.cjs.map +158 -143
  162. package/dist/index.d.ts +7 -7
  163. package/dist/index.js +15 -15
  164. package/dist/index.js.map +158 -143
  165. package/dist/package.json +1 -1
  166. package/dist/styles.css +2 -2
  167. package/package.json +9 -13
@@ -17,7 +17,7 @@ export declare const createBaseConfig: (config?: ChipsConfig) => ChipsConfig;
17
17
  export declare const getElementConfig: (config: ChipsConfig) => {
18
18
  tag: string;
19
19
  componentName: string;
20
- attrs: Record<string, any>;
20
+ attributes: Record<string, any>;
21
21
  className: string[];
22
22
  rawClass: string | string[];
23
23
  html: string;
@@ -1,4 +1,4 @@
1
- import { ChipsConfig } from '../types';
1
+ import { ChipsConfig } from "../types";
2
2
  /**
3
3
  * Adds chip item management to chips component
4
4
  *
@@ -10,8 +10,7 @@ export declare function createChipsSchema(component: any, config: ChipsConfig):
10
10
  element: {
11
11
  options: {
12
12
  className: any[];
13
- attrs: {
14
- tabindex: string;
13
+ attributes: {
15
14
  role: string;
16
15
  'aria-multiselectable': string;
17
16
  };
@@ -1,4 +1,4 @@
1
- import { DatePickerComponent, ApiOptions } from './types';
1
+ import { DatePickerComponent, ApiOptions } from "./types";
2
2
  /**
3
3
  * Enhances a datepicker component with API methods
4
4
  * @param {object} state - Current state of the datepicker
@@ -1,4 +1,4 @@
1
- import { DatePickerConfig } from './types';
1
+ import { DatePickerConfig } from "./types";
2
2
  /**
3
3
  * Default configuration for the DatePicker component
4
4
  */
@@ -17,7 +17,7 @@ export declare const createBaseConfig: (config?: DatePickerConfig) => DatePicker
17
17
  export declare const getContainerConfig: (config: DatePickerConfig) => {
18
18
  tag: string;
19
19
  componentName: string;
20
- attrs: Record<string, any>;
20
+ attributes: Record<string, any>;
21
21
  className: string[];
22
22
  rawClass: string | string[];
23
23
  html: string;
@@ -33,7 +33,7 @@ export declare const getContainerConfig: (config: DatePickerConfig) => {
33
33
  export declare const getInputConfig: (config: DatePickerConfig) => {
34
34
  tag: string;
35
35
  componentName: string;
36
- attrs: Record<string, any>;
36
+ attributes: Record<string, any>;
37
37
  className: string[];
38
38
  rawClass: string | string[];
39
39
  html: string;
@@ -49,7 +49,7 @@ export declare const getInputConfig: (config: DatePickerConfig) => {
49
49
  export declare const getCalendarConfig: (config: DatePickerConfig) => {
50
50
  tag: string;
51
51
  componentName: string;
52
- attrs: Record<string, any>;
52
+ attributes: Record<string, any>;
53
53
  className: string[];
54
54
  rawClass: string | string[];
55
55
  html: string;
@@ -1,4 +1,4 @@
1
- import { DatePickerConfig, DatePickerComponent } from './types';
1
+ import { DatePickerConfig, DatePickerComponent } from "./types";
2
2
  /**
3
3
  * Creates a new DatePicker component
4
4
  * @param {DatePickerConfig} config - DatePicker configuration object
@@ -3,7 +3,7 @@
3
3
  * @param {Object} params - Rendering parameters
4
4
  * @returns {HTMLElement} Calendar header element
5
5
  */
6
- export declare const renderHeader: ({ currentMonth, currentYear, currentView, prefix, emit }: any) => HTMLElement;
6
+ export declare const renderHeader: ({ currentMonth, currentYear, currentView, prefix, emit, }: any) => HTMLElement;
7
7
  /**
8
8
  * Renders the days of the week (S, M, T, etc.)
9
9
  * @param {string} prefix - CSS class prefix
@@ -15,25 +15,25 @@ export declare const renderWeekdays: (prefix: string) => HTMLElement;
15
15
  * @param {Object} params - Rendering parameters
16
16
  * @returns {HTMLElement} Calendar days element
17
17
  */
18
- export declare const renderDays: ({ currentYear, currentMonth, selectedDate, rangeEndDate, minDate, maxDate, prefix, emit }: any) => HTMLElement;
18
+ export declare const renderDays: ({ currentYear, currentMonth, selectedDate, rangeEndDate, minDate, maxDate, prefix, emit, }: any) => HTMLElement;
19
19
  /**
20
20
  * Renders the month selection view
21
21
  * @param {Object} params - Rendering parameters
22
22
  * @returns {HTMLElement} Month selection element
23
23
  */
24
- export declare const renderMonthSelection: ({ currentYear, currentMonth, prefix, emit }: any) => HTMLElement;
24
+ export declare const renderMonthSelection: ({ currentMonth, prefix, emit, }: any) => HTMLElement;
25
25
  /**
26
26
  * Renders the year selection view
27
27
  * @param {Object} params - Rendering parameters
28
28
  * @returns {HTMLElement} Year selection element
29
29
  */
30
- export declare const renderYearSelection: ({ currentYear, prefix, emit }: any) => HTMLElement;
30
+ export declare const renderYearSelection: ({ currentYear, prefix, emit, }: any) => HTMLElement;
31
31
  /**
32
32
  * Renders the footer with action buttons
33
33
  * @param {Object} params - Rendering parameters
34
34
  * @returns {HTMLElement} Footer element
35
35
  */
36
- export declare const renderFooter: ({ variant, prefix, emit }: any) => HTMLElement;
36
+ export declare const renderFooter: ({ prefix, emit }: any) => HTMLElement;
37
37
  /**
38
38
  * Renders a complete calendar view
39
39
  * @param {Object} state - Current datepicker state
@@ -17,7 +17,7 @@ export declare const createBaseConfig: (config?: DialogConfig) => DialogConfig;
17
17
  export declare const getElementConfig: (config: DialogConfig) => {
18
18
  tag: string;
19
19
  componentName: string;
20
- attrs: Record<string, any>;
20
+ attributes: Record<string, any>;
21
21
  className: string[];
22
22
  rawClass: string | string[];
23
23
  html: string;
@@ -32,7 +32,7 @@ export declare const getElementConfig: (config: DialogConfig) => {
32
32
  */
33
33
  export declare const getOverlayConfig: (config: DialogConfig) => {
34
34
  tag: string;
35
- attrs: {
35
+ attributes: {
36
36
  'aria-modal': boolean;
37
37
  role: string;
38
38
  tabindex: number;
@@ -1,4 +1,4 @@
1
- import { DialogConfig } from './types';
1
+ import { DialogConfig } from "./types";
2
2
  /**
3
3
  * Creates the dialog DOM structure with proper divider handling
4
4
  * @param config Dialog configuration
@@ -223,7 +223,7 @@ export interface DialogButton {
223
223
  * Additional button attributes to pass to the button element
224
224
  * @example { 'data-id': 'save-button', 'form': 'profile-form' }
225
225
  */
226
- attrs?: Record<string, any>;
226
+ attributes?: Record<string, any>;
227
227
  }
228
228
  /**
229
229
  * Dialog event object
@@ -1,5 +1,5 @@
1
- import { DividerConfig } from './config';
2
- import { DividerComponent } from './types';
1
+ import { DividerConfig } from "./config";
2
+ import { DividerComponent } from "./types";
3
3
  /**
4
4
  * Creates a new Divider component with the specified configuration.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { ExtendedFabConfig } from './types';
1
+ import { ExtendedFabConfig } from "./types";
2
2
  /**
3
3
  * Default configuration for the Extended FAB component
4
4
  *
@@ -38,7 +38,7 @@ export declare const createBaseConfig: (config?: ExtendedFabConfig) => ExtendedF
38
38
  export declare const getElementConfig: (config: ExtendedFabConfig) => {
39
39
  tag: string;
40
40
  componentName: string;
41
- attrs: Record<string, any>;
41
+ attributes: Record<string, any>;
42
42
  className: string[];
43
43
  rawClass: string | string[];
44
44
  html: string;
@@ -1,4 +1,4 @@
1
- import { FabConfig } from './types';
1
+ import { FabConfig } from "./types";
2
2
  /**
3
3
  * Default configuration for the FAB component
4
4
  *
@@ -38,7 +38,7 @@ export declare const createBaseConfig: (config?: FabConfig) => FabConfig;
38
38
  export declare const getElementConfig: (config: FabConfig) => {
39
39
  tag: string;
40
40
  componentName: string;
41
- attrs: Record<string, any>;
41
+ attributes: Record<string, any>;
42
42
  className: string[];
43
43
  rawClass: string | string[];
44
44
  html: string;
@@ -27,7 +27,8 @@ export * from './fab';
27
27
  export * from './extended-fab';
28
28
  export * from './menu';
29
29
  export * from './navigation';
30
- export * from './progress';
30
+ export { PROGRESS_VARIANTS, PROGRESS_SHAPES, PROGRESS_EVENTS, PROGRESS_DEFAULTS, PROGRESS_CLASSES, PROGRESS_MEASUREMENTS, PROGRESS_THICKNESS } from './progress/constants';
31
+ export type { ProgressConfig, ProgressComponent, ProgressShape } from './progress/types';
31
32
  export * from './radios';
32
33
  export * from './search';
33
34
  export * from './segmented-button';
@@ -27,7 +27,7 @@ export declare const createBaseConfig: (config?: Partial<ListConfig>) => import(
27
27
  export declare const getElementConfig: (config: any) => {
28
28
  tag: string;
29
29
  componentName: string;
30
- attrs: Record<string, any>;
30
+ attributes: Record<string, any>;
31
31
  className: string[];
32
32
  rawClass: string | string[];
33
33
  html: string;
@@ -1,4 +1,4 @@
1
- import { MenuComponent, MenuContent, MenuPosition } from './types';
1
+ import { MenuComponent, MenuContent, MenuPosition, MenuEvents } from "./types";
2
2
  /**
3
3
  * API configuration options for menu component
4
4
  * @category Components
@@ -6,19 +6,19 @@ import { MenuComponent, MenuContent, MenuPosition } from './types';
6
6
  */
7
7
  interface ApiOptions {
8
8
  menu: {
9
- open: (event?: Event, interactionType?: 'mouse' | 'keyboard') => any;
10
- close: (event?: Event, restoreFocus?: boolean, skipAnimation?: boolean) => any;
11
- toggle: (event?: Event, interactionType?: 'mouse' | 'keyboard') => any;
9
+ open: (event?: Event, interactionType?: "mouse" | "keyboard") => void;
10
+ close: (event?: Event, restoreFocus?: boolean, skipAnimation?: boolean) => void;
11
+ toggle: (event?: Event, interactionType?: "mouse" | "keyboard") => void;
12
12
  isOpen: () => boolean;
13
- setItems: (items: MenuContent[]) => any;
13
+ setItems: (items: MenuContent[]) => void;
14
14
  getItems: () => MenuContent[];
15
- setPosition: (position: MenuPosition) => any;
15
+ setPosition: (position: MenuPosition) => void;
16
16
  getPosition: () => MenuPosition;
17
- setSelected: (itemId: string) => any;
17
+ setSelected: (itemId: string) => void;
18
18
  getSelected: () => string | null;
19
19
  };
20
20
  opener: {
21
- setOpener: (opener: HTMLElement | string) => any;
21
+ setOpener: (opener: HTMLElement | string) => void;
22
22
  getOpener: () => HTMLElement;
23
23
  };
24
24
  submenu?: {
@@ -26,8 +26,8 @@ interface ApiOptions {
26
26
  closeAllSubmenus: () => void;
27
27
  };
28
28
  events?: {
29
- on: <T extends string>(event: T, handler: (event: any) => void) => any;
30
- off: <T extends string>(event: T, handler: (event: any) => void) => any;
29
+ on: <T extends keyof MenuEvents>(event: T, handler: MenuEvents[T]) => void;
30
+ off: <T extends keyof MenuEvents>(event: T, handler: MenuEvents[T]) => void;
31
31
  };
32
32
  lifecycle: {
33
33
  destroy: () => void;
@@ -40,9 +40,9 @@ interface ApiOptions {
40
40
  */
41
41
  interface ComponentWithElements {
42
42
  element: HTMLElement;
43
- on?: <T extends string>(event: T, handler: (event: any) => void) => any;
44
- off?: <T extends string>(event: T, handler: (event: any) => void) => any;
45
- emit?: (event: string, data: any) => void;
43
+ on?: <T extends keyof MenuEvents>(event: T, handler: MenuEvents[T]) => void;
44
+ off?: <T extends keyof MenuEvents>(event: T, handler: MenuEvents[T]) => void;
45
+ emit?: (event: string, data: unknown) => void;
46
46
  }
47
47
  /**
48
48
  * Enhances a menu component with API methods.
@@ -54,5 +54,5 @@ interface ComponentWithElements {
54
54
  * @category Components
55
55
  * @internal This is an internal utility for the Menu component
56
56
  */
57
- declare const withAPI: ({ menu, opener, events, lifecycle, submenu }: ApiOptions) => (component: ComponentWithElements) => MenuComponent;
57
+ declare const withAPI: ({ menu, opener, events, lifecycle }: ApiOptions) => (component: ComponentWithElements) => MenuComponent;
58
58
  export { withAPI };
@@ -1,4 +1,4 @@
1
- import { MenuConfig } from './types';
1
+ import { MenuConfig } from "./types";
2
2
  /**
3
3
  * Default configuration for the Menu component
4
4
  * These values will be used when not explicitly specified by the user.
@@ -29,7 +29,7 @@ export declare const createBaseConfig: (config: MenuConfig) => MenuConfig;
29
29
  export declare const getElementConfig: (config: MenuConfig) => {
30
30
  tag: string;
31
31
  componentName: string;
32
- attrs: Record<string, any>;
32
+ attributes: Record<string, any>;
33
33
  className: string[];
34
34
  rawClass: string | string[];
35
35
  html: string;
@@ -1,4 +1,4 @@
1
- import { MenuConfig } from '../types';
1
+ import { MenuConfig } from "../types";
2
2
  /**
3
3
  * Adds controller functionality to the menu component
4
4
  * Manages state, rendering, positioning, and event handling
@@ -1,4 +1,4 @@
1
- import { MenuItem } from '../types';
1
+ import { MenuItem } from "../types";
2
2
  /**
3
3
  * Keyboard navigation handler for menus
4
4
  * Manages focus management and keyboard interactions for accessibility
@@ -22,5 +22,5 @@ export declare const createKeyboardNavigation: (component: any) => {
22
22
  * @param config - Menu configuration
23
23
  * @returns Component enhancer with keyboard navigation functionality
24
24
  */
25
- declare const withKeyboard: (config: any) => (component: any) => any;
25
+ declare const withKeyboard: () => (component: any) => any;
26
26
  export default withKeyboard;
@@ -1,4 +1,4 @@
1
- import { MenuConfig } from '../types';
1
+ import { MenuConfig } from "../types";
2
2
  /**
3
3
  * Adds submenu functionality to the menu component
4
4
  * Manages creation, positioning, and interaction with nested submenus
@@ -1,4 +1,4 @@
1
- import { MenuConfig, MenuComponent } from './types';
1
+ import { MenuConfig, MenuComponent } from "./types";
2
2
  /**
3
3
  * Creates a new Menu component with the specified configuration.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { NavigationConfig, BaseComponent, ApiOptions } from './types';
1
+ import { NavigationConfig, BaseComponent, ApiOptions } from "./types";
2
2
  /**
3
3
  * Default configuration for the Navigation component
4
4
  */
@@ -17,7 +17,7 @@ export declare const createBaseConfig: (config?: NavigationConfig) => Navigation
17
17
  export declare const getElementConfig: (config: NavigationConfig) => {
18
18
  tag: string;
19
19
  componentName: string;
20
- attrs: Record<string, any>;
20
+ attributes: Record<string, any>;
21
21
  className: string[];
22
22
  rawClass: string | string[];
23
23
  html: string;
@@ -1,4 +1,4 @@
1
- import { BaseComponent } from '../types';
1
+ import { BaseComponent } from "../types";
2
2
  /**
3
3
  * Configuration interface for controller feature
4
4
  */
@@ -1,4 +1,5 @@
1
- import { NavItemConfig, NavItemData, BaseComponent } from '../types';
1
+ import { NavItemConfig, BaseComponent } from "../types";
2
+ import type { NavItemData } from "../types";
2
3
  /**
3
4
  * Interface for a component with items management capabilities
4
5
  * @internal
@@ -1,4 +1,4 @@
1
- import { NavigationConfig, NavigationComponent } from './types';
1
+ import { NavigationConfig, NavigationComponent } from "./types";
2
2
  /**
3
3
  * Creates a new Navigation component
4
4
  * @param {NavigationConfig} config - Navigation configuration
@@ -1,4 +1,4 @@
1
- import { NavigationSystemState } from './types';
1
+ import { NavigationSystemState } from "./types";
2
2
  /**
3
3
  * Update drawer content for a specific section WITHOUT changing visibility
4
4
  *
@@ -1,4 +1,4 @@
1
- import { NavigationSystemState } from './types';
1
+ import { NavigationSystemState } from "./types";
2
2
  /**
3
3
  * Registers rail navigation event handlers
4
4
  *
@@ -1,4 +1,4 @@
1
- import { NavigationSystemConfig, NavigationSystem } from './types';
1
+ import { NavigationSystemConfig, NavigationSystem } from "./types";
2
2
  /**
3
3
  * Creates a complete navigation system with synchronized rail and drawer components
4
4
  *
@@ -7,4 +7,4 @@ import { NavigationSystemConfig, NavigationSystem } from './types';
7
7
  */
8
8
  export declare const createNavigationSystem: (options?: NavigationSystemConfig) => NavigationSystem;
9
9
  export default createNavigationSystem;
10
- export * from './types';
10
+ export * from "./types";
@@ -1,4 +1,38 @@
1
- import { ProgressComponent } from './types';
1
+ import { ProgressComponent, ProgressThickness, ProgressShape } from "./types";
2
+ /**
3
+ * Canvas component interface for API
4
+ */
5
+ interface CanvasComponent {
6
+ element: HTMLElement;
7
+ canvas: HTMLCanvasElement;
8
+ getClass: (name: string) => string;
9
+ label?: HTMLElement;
10
+ state?: {
11
+ label?: HTMLElement;
12
+ showLabel?: boolean;
13
+ value?: number;
14
+ max?: number;
15
+ buffer?: number;
16
+ indeterminate?: boolean;
17
+ thickness?: number | string;
18
+ shape?: ProgressShape;
19
+ labelFormatter?: (value: number, max: number) => string;
20
+ };
21
+ draw?: () => void;
22
+ setThickness?: (thickness: ProgressThickness) => void;
23
+ setShape?: (shape: ProgressShape) => void;
24
+ setValue?: (value: number, animate: boolean) => void;
25
+ setSize?: (size: number) => void;
26
+ getSize?: () => number | undefined;
27
+ hide?: () => void;
28
+ show?: () => void;
29
+ isVisible?: () => boolean;
30
+ startIndeterminateAnimation?: () => void;
31
+ stopIndeterminateAnimation?: () => void;
32
+ }
33
+ /**
34
+ * API configuration options for canvas-based progress component
35
+ */
2
36
  interface ApiOptions {
3
37
  value: {
4
38
  getValue: () => number;
@@ -15,10 +49,18 @@ interface ApiOptions {
15
49
  isDisabled: () => boolean;
16
50
  };
17
51
  label: {
18
- show: () => void;
19
- hide: () => void;
20
- format: (formatter: (value: number, max: number) => string) => void;
21
- setContent: (content: string) => void;
52
+ show?: () => void;
53
+ hide?: () => void;
54
+ format?: (formatter: (value: number, max: number) => string) => void;
55
+ formatter?: (value: number, max: number) => string;
56
+ };
57
+ thickness?: {
58
+ getThickness: () => number;
59
+ setThickness: (thickness: ProgressThickness) => void;
60
+ };
61
+ shape?: {
62
+ getShape: () => ProgressShape;
63
+ setShape: (shape: ProgressShape) => void;
22
64
  };
23
65
  state: {
24
66
  setIndeterminate: (indeterminate: boolean) => void;
@@ -28,19 +70,8 @@ interface ApiOptions {
28
70
  destroy: () => void;
29
71
  };
30
72
  }
31
- interface ComponentWithElements {
32
- element: HTMLElement;
33
- trackElement: HTMLElement;
34
- indicatorElement: HTMLElement;
35
- labelElement?: HTMLElement;
36
- getClass: (name: string) => string;
37
- emit: (event: string, data?: any) => void;
38
- }
39
73
  /**
40
- * Enhances a progress component with API methods
41
- * @param {ApiOptions} options - API configuration options
42
- * @returns {Function} Higher-order function that adds API methods to component
43
- * @internal This is an internal utility for the Progress component
74
+ * Enhances a canvas-based progress component with a streamlined API
44
75
  */
45
- export declare const withAPI: (options: ApiOptions) => (component: ComponentWithElements) => ProgressComponent;
76
+ export declare const withAPI: (options: ApiOptions) => (comp: CanvasComponent) => ProgressComponent;
46
77
  export {};
@@ -1,23 +1,27 @@
1
- import { ProgressConfig } from './types';
1
+ import { ProgressConfig, ProgressThickness, ProgressShape } from "./types";
2
2
  /**
3
3
  * Default configuration for the Progress component
4
4
  */
5
5
  export declare const defaultConfig: ProgressConfig;
6
6
  /**
7
- * Creates the base configuration for Progress component
8
- * @param {ProgressConfig} config - User provided configuration
9
- * @returns {ProgressConfig} Complete configuration with defaults applied
7
+ * Creates the base configuration for the Progress component
8
+ * with all defaults applied (no complex schema needed for canvas)
9
+ *
10
+ * @param config User-provided configuration
11
+ * @returns Complete configuration with defaults
10
12
  */
11
13
  export declare const createBaseConfig: (config?: ProgressConfig) => ProgressConfig;
12
14
  /**
13
- * Generates element configuration for the Progress component
15
+ * Generates element configuration for the Progress container
16
+ * Canvas will be added by withCanvas feature
17
+ *
14
18
  * @param {ProgressConfig} config - Progress configuration
15
19
  * @returns {Object} Element configuration object for withElement
16
20
  */
17
21
  export declare const getElementConfig: (config: ProgressConfig) => {
18
22
  tag: string;
19
23
  componentName: string;
20
- attrs: Record<string, any>;
24
+ attributes: Record<string, any>;
21
25
  className: string[];
22
26
  rawClass: string | string[];
23
27
  html: string;
@@ -27,11 +31,8 @@ export declare const getElementConfig: (config: ProgressConfig) => {
27
31
  };
28
32
  /**
29
33
  * Creates API configuration for the Progress component
30
- * @param {Object} comp - Component with state management features
31
- * @param {Object} state - State object containing component state
32
- * @returns {Object} API configuration object
33
34
  */
34
- export declare const getApiConfig: (comp: any, state: any) => {
35
+ export declare const getApiConfig: (comp: any) => {
35
36
  value: {
36
37
  getValue: () => any;
37
38
  setValue: (value: number) => void;
@@ -50,7 +51,15 @@ export declare const getApiConfig: (comp: any, state: any) => {
50
51
  show: () => void;
51
52
  hide: () => void;
52
53
  format: (formatter: any) => void;
53
- setContent: (content: any) => void;
54
+ formatter: any;
55
+ };
56
+ thickness: {
57
+ getThickness: () => number;
58
+ setThickness: (thickness: ProgressThickness) => void;
59
+ };
60
+ shape: {
61
+ getShape: () => any;
62
+ setShape: (shape: ProgressShape) => void;
54
63
  };
55
64
  state: {
56
65
  setIndeterminate: (indeterminate: boolean) => void;
@@ -7,6 +7,15 @@ export declare const PROGRESS_VARIANTS: {
7
7
  /** Circular spinner progress indicator */
8
8
  readonly CIRCULAR: "circular";
9
9
  };
10
+ /**
11
+ * Progress component shapes (linear only)
12
+ */
13
+ export declare const PROGRESS_SHAPES: {
14
+ /** Standard flat progress */
15
+ readonly FLAT: "flat";
16
+ /** Wavy animated progress */
17
+ readonly WAVY: "wavy";
18
+ };
10
19
  /**
11
20
  * Progress component events
12
21
  */
@@ -28,6 +37,8 @@ export declare const PROGRESS_DEFAULTS: {
28
37
  readonly MAX: 100;
29
38
  /** Buffer value for linear progress with buffer */
30
39
  readonly BUFFER: 0;
40
+ /** Default shape for linear indeterminate progress */
41
+ readonly SHAPE: "flat";
31
42
  /** Whether to show percentage label */
32
43
  readonly SHOW_LABEL: false;
33
44
  /** Whether progress is indeterminate */
@@ -43,7 +54,7 @@ export declare const PROGRESS_CLASSES: {
43
54
  readonly LINEAR: "progress--linear";
44
55
  /** Circular variant class */
45
56
  readonly CIRCULAR: "progress--circular";
46
- /** Track element (background) class */
57
+ /** Track element (unfilled part) class */
47
58
  readonly TRACK: "progress__track";
48
59
  /** Indicator element (filled part) class */
49
60
  readonly INDICATOR: "progress__indicator";
@@ -55,4 +66,78 @@ export declare const PROGRESS_CLASSES: {
55
66
  readonly INDETERMINATE: "progress--indeterminate";
56
67
  /** Disabled state class */
57
68
  readonly DISABLED: "progress--disabled";
69
+ /** Test state class */
70
+ readonly TEST: "progress--test";
71
+ readonly TRANSITION: "progress--transition";
72
+ };
73
+ /**
74
+ * Progress component measurements
75
+ */
76
+ export declare const PROGRESS_MEASUREMENTS: {
77
+ readonly LINEAR: {
78
+ readonly MIN_HEIGHT: 4;
79
+ readonly GAP: 4;
80
+ readonly STOP_INDICATOR: 4;
81
+ readonly HEIGHT: 4;
82
+ };
83
+ readonly CIRCULAR: {
84
+ readonly SIZE: 48;
85
+ readonly GAP: 8;
86
+ };
87
+ readonly COMMON: {
88
+ readonly STROKE_WIDTH: 4;
89
+ };
90
+ };
91
+ /**
92
+ * Thickness presets for progress component
93
+ * These are the standard thickness options following Material Design 3
94
+ */
95
+ export declare const PROGRESS_THICKNESS: {
96
+ /** Thin stroke width (4px) - default */
97
+ readonly THIN: 4;
98
+ /** Thick stroke width (8px) */
99
+ readonly THICK: 8;
100
+ };
101
+ /**
102
+ * Wave animation parameters for progress components
103
+ */
104
+ export declare const PROGRESS_WAVE: {
105
+ /** Linear progress wave parameters */
106
+ readonly LINEAR: {
107
+ /** Base amplitude of the wave in pixels */
108
+ readonly AMPLITUDE: 3;
109
+ /** Speed of wave animation in waves per second (Hz) */
110
+ readonly SPEED: 0.88;
111
+ /** Number of complete waves per 100 pixels */
112
+ readonly FREQUENCY: 2;
113
+ /** Number of complete waves per 100 pixels for indeterminate */
114
+ readonly INDETERMINATE_FREQUENCY: 4;
115
+ /** Amplitude for indeterminate animation */
116
+ readonly INDETERMINATE_AMPLITUDE: 2;
117
+ /** Wave shape power (lower = rounder peaks, higher = sharper) */
118
+ readonly POWER: 0.8;
119
+ /** Percentage at which wave amplitude reaches full strength from start */
120
+ readonly START_TRANSITION_END: 0;
121
+ /** Percentage at which wave amplitude begins to decrease near end */
122
+ readonly END_TRANSITION_START: 0.92;
123
+ };
124
+ /** Circular progress wave parameters */
125
+ readonly CIRCULAR: {
126
+ /** Amplitude as percentage of radius (7 = 7%) */
127
+ readonly AMPLITUDE: 6;
128
+ /** Amplitude as percentage of radius for indeterminate (4 = 4%) */
129
+ readonly INDETERMINATE_AMPLITUDE: 4;
130
+ /** Speed of wave rotation in rotations per second (Hz), negative value means clockwise */
131
+ readonly SPEED: 1.1;
132
+ /** Number of complete waves around the circle */
133
+ readonly FREQUENCY: 10;
134
+ /** Number of complete waves for indeterminate animation */
135
+ readonly INDETERMINATE_FREQUENCY: 16;
136
+ /** Wave shape power (lower = rounder peaks, higher = sharper) */
137
+ readonly POWER: 0.8;
138
+ /** Percentage at which wave amplitude reaches full strength from start */
139
+ readonly START_TRANSITION_END: 0;
140
+ /** Percentage at which wave amplitude begins to decrease near end */
141
+ readonly END_TRANSITION_START: 0.92;
142
+ };
58
143
  };