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.
- package/dist/components/badge/api.d.ts +5 -5
- package/dist/components/badge/config.d.ts +18 -8
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +1 -1
- package/dist/components/bottom-app-bar/config.d.ts +1 -1
- package/dist/components/button/api.d.ts +19 -3
- package/dist/components/button/button.d.ts +41 -1
- package/dist/components/button/config.d.ts +18 -7
- package/dist/components/button/constants.d.ts +36 -0
- package/dist/components/button/features/progress.d.ts +26 -0
- package/dist/components/button/types.d.ts +108 -1
- package/dist/components/card/config.d.ts +2 -2
- package/dist/components/card/features.d.ts +14 -1
- package/dist/components/card/index.d.ts +6 -6
- package/dist/components/carousel/api.d.ts +15 -11
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel/config.d.ts +2 -2
- package/dist/components/carousel/features/drag.d.ts +1 -1
- package/dist/components/carousel/features/slides.d.ts +1 -1
- package/dist/components/checkbox/config.d.ts +2 -2
- package/dist/components/checkbox/types.d.ts +2 -2
- package/dist/components/chips/chip/chip.d.ts +1 -1
- package/dist/components/chips/chip/config.d.ts +2 -2
- package/dist/components/chips/chips.d.ts +1 -1
- package/dist/components/chips/config.d.ts +1 -1
- package/dist/components/chips/features/chip-items.d.ts +1 -1
- package/dist/components/chips/schema.d.ts +1 -2
- package/dist/components/datepicker/api.d.ts +1 -1
- package/dist/components/datepicker/config.d.ts +4 -4
- package/dist/components/datepicker/datepicker.d.ts +1 -1
- package/dist/components/datepicker/render.d.ts +5 -5
- package/dist/components/dialog/config.d.ts +2 -2
- package/dist/components/dialog/features.d.ts +1 -1
- package/dist/components/dialog/types.d.ts +1 -1
- package/dist/components/divider/divider.d.ts +2 -2
- package/dist/components/extended-fab/config.d.ts +2 -2
- package/dist/components/fab/config.d.ts +2 -2
- package/dist/components/index.d.ts +2 -1
- package/dist/components/list/config.d.ts +1 -1
- package/dist/components/menu/api.d.ts +14 -14
- package/dist/components/menu/config.d.ts +2 -2
- package/dist/components/menu/features/controller.d.ts +1 -1
- package/dist/components/menu/features/keyboard.d.ts +2 -2
- package/dist/components/menu/features/submenu.d.ts +1 -1
- package/dist/components/menu/menu.d.ts +1 -1
- package/dist/components/navigation/config.d.ts +2 -2
- package/dist/components/navigation/features/controller.d.ts +1 -1
- package/dist/components/navigation/features/items.d.ts +2 -1
- package/dist/components/navigation/navigation.d.ts +1 -1
- package/dist/components/navigation/system/core.d.ts +1 -1
- package/dist/components/navigation/system/events.d.ts +1 -1
- package/dist/components/navigation/system/index.d.ts +2 -2
- package/dist/components/progress/api.d.ts +49 -18
- package/dist/components/progress/config.d.ts +20 -11
- package/dist/components/progress/constants.d.ts +86 -1
- package/dist/components/progress/features/canvas.d.ts +61 -0
- package/dist/components/progress/features/circular.d.ts +9 -0
- package/dist/components/progress/features/index.d.ts +8 -0
- package/dist/components/progress/features/linear.d.ts +9 -0
- package/dist/components/progress/features/resize-observer.d.ts +5 -0
- package/dist/components/progress/features/state.d.ts +46 -0
- package/dist/components/progress/index.d.ts +2 -2
- package/dist/components/progress/progress.d.ts +2 -2
- package/dist/components/progress/types.d.ts +102 -17
- package/dist/components/radios/api.d.ts +11 -11
- package/dist/components/radios/config.d.ts +2 -2
- package/dist/components/radios/radios.d.ts +1 -1
- package/dist/components/search/api.d.ts +15 -11
- package/dist/components/search/config.d.ts +1 -1
- package/dist/components/search/features/search.d.ts +1 -1
- package/dist/components/segmented-button/config.d.ts +8 -8
- package/dist/components/select/api.d.ts +1 -1
- package/dist/components/select/config.d.ts +1 -1
- package/dist/components/select/features.d.ts +1 -1
- package/dist/components/select/types.d.ts +20 -5
- package/dist/components/sheet/config.d.ts +2 -2
- package/dist/components/sheet/sheet.d.ts +1 -1
- package/dist/components/slider/api.d.ts +3 -2
- package/dist/components/slider/config.d.ts +2 -2
- package/dist/components/slider/constants.d.ts +50 -21
- package/dist/components/slider/features/canvas.d.ts +47 -0
- package/dist/components/slider/features/controller.d.ts +1 -1
- package/dist/components/slider/features/handlers.d.ts +1 -1
- package/dist/components/slider/features/index.d.ts +1 -0
- package/dist/components/slider/features/states.d.ts +1 -1
- package/dist/components/slider/schema.d.ts +7 -50
- package/dist/components/slider/slider.d.ts +5 -4
- package/dist/components/slider/types.d.ts +10 -37
- package/dist/components/snackbar/api.d.ts +1 -1
- package/dist/components/snackbar/config.d.ts +3 -3
- package/dist/components/switch/api.d.ts +1 -1
- package/dist/components/switch/config.d.ts +2 -2
- package/dist/components/switch/features.d.ts +4 -4
- package/dist/components/switch/switch.d.ts +1 -1
- package/dist/components/switch/types.d.ts +22 -17
- package/dist/components/tabs/config.d.ts +2 -3
- package/dist/components/tabs/features.d.ts +5 -5
- package/dist/components/tabs/index.d.ts +10 -10
- package/dist/components/tabs/tab.d.ts +1 -1
- package/dist/components/tabs/utils.d.ts +1 -1
- package/dist/components/textfield/api.d.ts +13 -3
- package/dist/components/textfield/config.d.ts +2 -2
- package/dist/components/textfield/constants.d.ts +12 -20
- package/dist/components/textfield/features/density.d.ts +28 -0
- package/dist/components/textfield/features/index.d.ts +13 -12
- package/dist/components/textfield/index.d.ts +3 -3
- package/dist/components/textfield/textfield.d.ts +1 -1
- package/dist/components/textfield/types.d.ts +42 -35
- package/dist/components/timepicker/clockdial.d.ts +2 -2
- package/dist/components/timepicker/config.d.ts +4 -4
- package/dist/components/timepicker/render.d.ts +1 -1
- package/dist/components/timepicker/timepicker.d.ts +1 -1
- package/dist/components/timepicker/utils.d.ts +2 -2
- package/dist/components/tooltip/api.d.ts +1 -1
- package/dist/components/tooltip/config.d.ts +2 -2
- package/dist/components/top-app-bar/top-app-bar.d.ts +2 -2
- package/dist/constants.d.ts +30 -30
- package/dist/core/canvas/animation.d.ts +27 -0
- package/dist/core/canvas/drawing.d.ts +57 -0
- package/dist/core/canvas/index.d.ts +8 -0
- package/dist/core/canvas/resize.d.ts +14 -0
- package/dist/core/canvas/utils.d.ts +84 -0
- package/dist/core/collection/collection.d.ts +7 -7
- package/dist/core/collection/list-manager/index.d.ts +2 -2
- package/dist/core/collection/list-manager/renderer.d.ts +3 -3
- package/dist/core/collection/list-manager/scroll-tracker.d.ts +1 -1
- package/dist/core/compose/component.d.ts +2 -1
- package/dist/core/compose/features/checkable.d.ts +2 -2
- package/dist/core/compose/features/gestures/longpress.d.ts +2 -2
- package/dist/core/compose/features/gestures/pan.d.ts +2 -2
- package/dist/core/compose/features/gestures/pinch.d.ts +2 -2
- package/dist/core/compose/features/gestures/rotate.d.ts +2 -2
- package/dist/core/compose/features/gestures/swipe.d.ts +2 -2
- package/dist/core/compose/features/gestures/tap.d.ts +2 -2
- package/dist/core/compose/features/gestures.d.ts +2 -2
- package/dist/core/compose/features/input.d.ts +1 -1
- package/dist/core/compose/features/ripple.d.ts +2 -2
- package/dist/core/compose/features/size.d.ts +1 -1
- package/dist/core/compose/features/textinput.d.ts +1 -1
- package/dist/core/compose/features/throttle.d.ts +1 -1
- package/dist/core/compose/features/variant.d.ts +1 -1
- package/dist/core/compose/features/withEvents.d.ts +1 -1
- package/dist/core/composition/features/label.d.ts +1 -1
- package/dist/core/config/component.d.ts +4 -2
- package/dist/core/config/global.d.ts +65 -0
- package/dist/core/dom/attributes.d.ts +13 -15
- package/dist/core/dom/classes.d.ts +10 -0
- package/dist/core/dom/create.d.ts +36 -6
- package/dist/core/dom/index.d.ts +2 -2
- package/dist/core/gestures/pan.d.ts +1 -1
- package/dist/core/gestures/pinch.d.ts +1 -1
- package/dist/core/gestures/rotate.d.ts +1 -1
- package/dist/core/index.d.ts +3 -1
- package/dist/core/layout/array.d.ts +7 -2
- package/dist/core/layout/object.d.ts +2 -2
- package/dist/core/layout/processor.d.ts +2 -2
- package/dist/core/layout/utils.d.ts +1 -1
- package/dist/core/utils/color.d.ts +14 -0
- package/dist/core/utils/index.d.ts +2 -6
- package/dist/core/utils/theme.d.ts +38 -0
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +158 -143
- package/dist/index.d.ts +7 -7
- package/dist/index.js +15 -15
- package/dist/index.js.map +158 -143
- package/dist/package.json +1 -1
- package/dist/styles.css +2 -2
- 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
|
-
|
|
20
|
+
attributes: Record<string, any>;
|
|
21
21
|
className: string[];
|
|
22
22
|
rawClass: string | string[];
|
|
23
23
|
html: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatePickerConfig } from
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
+
attributes: Record<string, any>;
|
|
53
53
|
className: string[];
|
|
54
54
|
rawClass: string | string[];
|
|
55
55
|
html: string;
|
|
@@ -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: ({
|
|
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: ({
|
|
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
|
-
|
|
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
|
-
|
|
35
|
+
attributes: {
|
|
36
36
|
'aria-modal': boolean;
|
|
37
37
|
role: string;
|
|
38
38
|
tabindex: number;
|
|
@@ -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
|
-
|
|
226
|
+
attributes?: Record<string, any>;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* Dialog event object
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtendedFabConfig } from
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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?:
|
|
10
|
-
close: (event?: Event, restoreFocus?: boolean, skipAnimation?: boolean) =>
|
|
11
|
-
toggle: (event?: Event, interactionType?:
|
|
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[]) =>
|
|
13
|
+
setItems: (items: MenuContent[]) => void;
|
|
14
14
|
getItems: () => MenuContent[];
|
|
15
|
-
setPosition: (position: MenuPosition) =>
|
|
15
|
+
setPosition: (position: MenuPosition) => void;
|
|
16
16
|
getPosition: () => MenuPosition;
|
|
17
|
-
setSelected: (itemId: string) =>
|
|
17
|
+
setSelected: (itemId: string) => void;
|
|
18
18
|
getSelected: () => string | null;
|
|
19
19
|
};
|
|
20
20
|
opener: {
|
|
21
|
-
setOpener: (opener: HTMLElement | string) =>
|
|
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
|
|
30
|
-
off: <T extends
|
|
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
|
|
44
|
-
off?: <T extends
|
|
45
|
-
emit?: (event: string, data:
|
|
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
|
|
57
|
+
declare const withAPI: ({ menu, opener, events, lifecycle }: ApiOptions) => (component: ComponentWithElements) => MenuComponent;
|
|
58
58
|
export { withAPI };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MenuConfig } from
|
|
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
|
-
|
|
32
|
+
attributes: Record<string, any>;
|
|
33
33
|
className: string[];
|
|
34
34
|
rawClass: string | string[];
|
|
35
35
|
html: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MenuItem } from
|
|
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: (
|
|
25
|
+
declare const withKeyboard: () => (component: any) => any;
|
|
26
26
|
export default withKeyboard;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NavigationConfig, BaseComponent, ApiOptions } from
|
|
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
|
-
|
|
20
|
+
attributes: Record<string, any>;
|
|
21
21
|
className: string[];
|
|
22
22
|
rawClass: string | string[];
|
|
23
23
|
html: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NavigationSystemConfig, NavigationSystem } from
|
|
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
|
|
10
|
+
export * from "./types";
|
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
import { ProgressComponent } from
|
|
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
|
|
19
|
-
hide
|
|
20
|
-
format
|
|
21
|
-
|
|
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
|
|
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) => (
|
|
76
|
+
export declare const withAPI: (options: ApiOptions) => (comp: CanvasComponent) => ProgressComponent;
|
|
46
77
|
export {};
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import { ProgressConfig } from
|
|
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
|
-
*
|
|
9
|
-
*
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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 (
|
|
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
|
};
|