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
|
@@ -8,18 +8,6 @@ export declare const TEXTFIELD_VARIANTS: {
|
|
|
8
8
|
/** Outlined variant with border and animated label */
|
|
9
9
|
readonly OUTLINED: "outlined";
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
* Textfield size constants
|
|
13
|
-
* @category Components
|
|
14
|
-
*/
|
|
15
|
-
export declare const TEXTFIELD_SIZES: {
|
|
16
|
-
/** Small textfield */
|
|
17
|
-
readonly SMALL: "small";
|
|
18
|
-
/** Medium textfield (default) */
|
|
19
|
-
readonly MEDIUM: "medium";
|
|
20
|
-
/** Large textfield */
|
|
21
|
-
readonly LARGE: "large";
|
|
22
|
-
};
|
|
23
11
|
/**
|
|
24
12
|
* Textfield state constants
|
|
25
13
|
* @category Components
|
|
@@ -74,6 +62,16 @@ export declare const TEXTFIELD_EVENTS: {
|
|
|
74
62
|
/** Fired when a key is released */
|
|
75
63
|
readonly KEYUP: "keyup";
|
|
76
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Textfield density constants
|
|
67
|
+
* @category Components
|
|
68
|
+
*/
|
|
69
|
+
export declare const TEXTFIELD_DENSITY: {
|
|
70
|
+
/** Default density (56px height) */
|
|
71
|
+
readonly DEFAULT: "default";
|
|
72
|
+
/** Compact density (40px height) */
|
|
73
|
+
readonly COMPACT: "compact";
|
|
74
|
+
};
|
|
77
75
|
/**
|
|
78
76
|
* Default textfield configuration values
|
|
79
77
|
* @category Components
|
|
@@ -83,8 +81,8 @@ export declare const TEXTFIELD_DEFAULTS: {
|
|
|
83
81
|
readonly TYPE: "text";
|
|
84
82
|
/** Default visual variant */
|
|
85
83
|
readonly VARIANT: "filled";
|
|
86
|
-
/** Default
|
|
87
|
-
readonly
|
|
84
|
+
/** Default density level */
|
|
85
|
+
readonly DENSITY: "default";
|
|
88
86
|
/** Default disabled state */
|
|
89
87
|
readonly DISABLED: false;
|
|
90
88
|
/** Default required state */
|
|
@@ -113,12 +111,6 @@ export declare const TEXTFIELD_CLASSES: {
|
|
|
113
111
|
readonly FILLED: "textfield--filled";
|
|
114
112
|
/** Outlined variant class */
|
|
115
113
|
readonly OUTLINED: "textfield--outlined";
|
|
116
|
-
/** Small size class */
|
|
117
|
-
readonly SMALL: "textfield--small";
|
|
118
|
-
/** Medium size class */
|
|
119
|
-
readonly MEDIUM: "textfield--medium";
|
|
120
|
-
/** Large size class */
|
|
121
|
-
readonly LARGE: "textfield--large";
|
|
122
114
|
/** Focused state class */
|
|
123
115
|
readonly FOCUSED: "textfield--focused";
|
|
124
116
|
/** Disabled state class */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TextfieldConfig, TextfieldDensity } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for density feature
|
|
4
|
+
*/
|
|
5
|
+
interface DensityConfig extends TextfieldConfig {
|
|
6
|
+
density?: TextfieldDensity | string;
|
|
7
|
+
prefix?: string;
|
|
8
|
+
componentName?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Component with density feature
|
|
12
|
+
*/
|
|
13
|
+
interface DensityComponent {
|
|
14
|
+
element: HTMLElement;
|
|
15
|
+
input?: HTMLInputElement | HTMLTextAreaElement;
|
|
16
|
+
density?: {
|
|
17
|
+
current: string;
|
|
18
|
+
set: (density: string) => void;
|
|
19
|
+
};
|
|
20
|
+
updateElementPositions?: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Adds density support to textfield component
|
|
24
|
+
* @param {DensityConfig} config - Configuration with density option
|
|
25
|
+
* @returns {Function} Higher-order function that adds density capabilities
|
|
26
|
+
*/
|
|
27
|
+
export declare const withDensity: (config: DensityConfig) => (component: DensityComponent) => DensityComponent;
|
|
28
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { withLeadingIcon } from
|
|
2
|
-
export { withTrailingIcon } from
|
|
3
|
-
export { withPrefixText } from
|
|
4
|
-
export { withSuffixText } from
|
|
5
|
-
export { withSupportingText } from
|
|
6
|
-
export { withPlacement } from
|
|
7
|
-
export
|
|
8
|
-
export type {
|
|
9
|
-
export type {
|
|
10
|
-
export type {
|
|
11
|
-
export type {
|
|
12
|
-
export type {
|
|
1
|
+
export { withLeadingIcon } from "./leading-icon";
|
|
2
|
+
export { withTrailingIcon } from "./trailing-icon";
|
|
3
|
+
export { withPrefixText } from "./prefix-text";
|
|
4
|
+
export { withSuffixText } from "./suffix-text";
|
|
5
|
+
export { withSupportingText } from "./supporting-text";
|
|
6
|
+
export { withPlacement } from "./placement";
|
|
7
|
+
export { withDensity } from "./density";
|
|
8
|
+
export type { LeadingIconComponent, LeadingIconConfig } from "./leading-icon";
|
|
9
|
+
export type { TrailingIconComponent, TrailingIconConfig, } from "./trailing-icon";
|
|
10
|
+
export type { PrefixTextComponent, PrefixTextConfig } from "./prefix-text";
|
|
11
|
+
export type { SuffixTextComponent, SuffixTextConfig } from "./suffix-text";
|
|
12
|
+
export type { SupportingTextComponent, SupportingTextConfig, } from "./supporting-text";
|
|
13
|
+
export type { PlacementComponent } from "./placement";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default } from
|
|
2
|
-
export { TEXTFIELD_VARIANTS,
|
|
3
|
-
export { TextfieldConfig, TextfieldComponent } from
|
|
1
|
+
export { default } from "./textfield";
|
|
2
|
+
export { TEXTFIELD_VARIANTS, TEXTFIELD_STATES, TEXTFIELD_TYPES, TEXTFIELD_EVENTS, TEXTFIELD_DEFAULTS, TEXTFIELD_CLASSES, TEXTFIELD_DENSITY, } from "./constants";
|
|
3
|
+
export { TextfieldConfig, TextfieldComponent, TextfieldDensity } from "./types";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Available Textfield variants
|
|
3
3
|
*/
|
|
4
|
-
export type TextfieldVariant =
|
|
4
|
+
export type TextfieldVariant = "filled" | "outlined";
|
|
5
5
|
/**
|
|
6
6
|
* Textfield variant constants
|
|
7
7
|
*/
|
|
@@ -10,25 +10,24 @@ export declare const TEXTFIELD_VARIANTS: {
|
|
|
10
10
|
readonly OUTLINED: "outlined";
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* Available Textfield
|
|
13
|
+
* Available Textfield states
|
|
14
14
|
*/
|
|
15
|
-
export type
|
|
15
|
+
export type TextfieldStates = "active" | "inactive" | "disabled";
|
|
16
16
|
/**
|
|
17
|
-
* Textfield
|
|
17
|
+
* Available Textfield density levels
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
20
|
-
readonly SMALL: "small";
|
|
21
|
-
readonly MEDIUM: "medium";
|
|
22
|
-
readonly LARGE: "large";
|
|
23
|
-
};
|
|
19
|
+
export type TextfieldDensity = "default" | "compact";
|
|
24
20
|
/**
|
|
25
|
-
*
|
|
21
|
+
* Textfield density constants
|
|
26
22
|
*/
|
|
27
|
-
export
|
|
23
|
+
export declare const TEXTFIELD_DENSITY: {
|
|
24
|
+
readonly DEFAULT: "default";
|
|
25
|
+
readonly COMPACT: "compact";
|
|
26
|
+
};
|
|
28
27
|
/**
|
|
29
28
|
* Available Textfield types
|
|
30
29
|
*/
|
|
31
|
-
export type TextfieldTypes =
|
|
30
|
+
export type TextfieldTypes = "text" | "password" | "email" | "number" | "tel" | "url" | "search" | "multiline";
|
|
32
31
|
/**
|
|
33
32
|
* Textfield type constants
|
|
34
33
|
*/
|
|
@@ -50,12 +49,16 @@ export interface TextfieldConfig {
|
|
|
50
49
|
type?: TextfieldTypes | string;
|
|
51
50
|
/** Visual variant (filled, outlined) */
|
|
52
51
|
variant?: TextfieldVariant | string;
|
|
52
|
+
/** Density level (default, compact) */
|
|
53
|
+
density?: TextfieldDensity | string;
|
|
53
54
|
/** Input name attribute */
|
|
54
55
|
name?: string;
|
|
55
56
|
/** Label text */
|
|
56
57
|
label?: string;
|
|
57
58
|
/** Initial value */
|
|
58
59
|
value?: string;
|
|
60
|
+
/** Placeholder text */
|
|
61
|
+
placeholder?: string;
|
|
59
62
|
/** Whether input is required */
|
|
60
63
|
required?: boolean;
|
|
61
64
|
/** Whether textfield is disabled */
|
|
@@ -145,6 +148,10 @@ export interface TextfieldComponent {
|
|
|
145
148
|
removeSuffixText: () => TextfieldComponent;
|
|
146
149
|
/** Manually update element positions (useful after DOM changes) */
|
|
147
150
|
updatePositions: () => TextfieldComponent;
|
|
151
|
+
/** Sets the density of the textfield */
|
|
152
|
+
setDensity: (density: TextfieldDensity | string) => TextfieldComponent;
|
|
153
|
+
/** Gets the current density setting */
|
|
154
|
+
getDensity: () => string;
|
|
148
155
|
/** Adds event listener */
|
|
149
156
|
on: (event: string, handler: Function) => TextfieldComponent;
|
|
150
157
|
/** Removes event listener */
|
|
@@ -161,8 +168,8 @@ export interface TextfieldComponent {
|
|
|
161
168
|
*/
|
|
162
169
|
export interface ApiOptions {
|
|
163
170
|
disabled: {
|
|
164
|
-
enable: () =>
|
|
165
|
-
disable: () =>
|
|
171
|
+
enable: () => void;
|
|
172
|
+
disable: () => void;
|
|
166
173
|
};
|
|
167
174
|
lifecycle: {
|
|
168
175
|
destroy: () => void;
|
|
@@ -177,41 +184,41 @@ export interface BaseComponent {
|
|
|
177
184
|
config?: {
|
|
178
185
|
prefix?: string;
|
|
179
186
|
componentName?: string;
|
|
180
|
-
[key: string]:
|
|
187
|
+
[key: string]: string | number | boolean | undefined;
|
|
181
188
|
};
|
|
182
189
|
getValue?: () => string;
|
|
183
|
-
setValue?: (value: string) =>
|
|
184
|
-
setAttribute?: (name: string, value: string) =>
|
|
190
|
+
setValue?: (value: string) => void;
|
|
191
|
+
setAttribute?: (name: string, value: string) => void;
|
|
185
192
|
getAttribute?: (name: string) => string | null;
|
|
186
|
-
removeAttribute?: (name: string) =>
|
|
193
|
+
removeAttribute?: (name: string) => void;
|
|
187
194
|
label?: {
|
|
188
|
-
setText: (content: string) =>
|
|
195
|
+
setText: (content: string) => void;
|
|
189
196
|
getText: () => string;
|
|
190
197
|
};
|
|
191
198
|
leadingIcon?: HTMLElement | null;
|
|
192
|
-
setLeadingIcon?: (html: string) =>
|
|
193
|
-
removeLeadingIcon?: () =>
|
|
199
|
+
setLeadingIcon?: (html: string) => void;
|
|
200
|
+
removeLeadingIcon?: () => void;
|
|
194
201
|
trailingIcon?: HTMLElement | null;
|
|
195
|
-
setTrailingIcon?: (html: string) =>
|
|
196
|
-
removeTrailingIcon?: () =>
|
|
202
|
+
setTrailingIcon?: (html: string) => void;
|
|
203
|
+
removeTrailingIcon?: () => void;
|
|
197
204
|
supportingTextElement?: HTMLElement | null;
|
|
198
|
-
setSupportingText?: (text: string, isError?: boolean) =>
|
|
199
|
-
removeSupportingText?: () =>
|
|
205
|
+
setSupportingText?: (text: string, isError?: boolean) => void;
|
|
206
|
+
removeSupportingText?: () => void;
|
|
200
207
|
prefixTextElement?: HTMLElement | null;
|
|
201
|
-
setPrefixText?: (text: string) =>
|
|
202
|
-
removePrefixText?: () =>
|
|
208
|
+
setPrefixText?: (text: string) => void;
|
|
209
|
+
removePrefixText?: () => void;
|
|
203
210
|
suffixTextElement?: HTMLElement | null;
|
|
204
|
-
setSuffixText?: (text: string) =>
|
|
205
|
-
removeSuffixText?: () =>
|
|
206
|
-
updateElementPositions?: () =>
|
|
207
|
-
on?: (event: string, handler: Function) =>
|
|
208
|
-
off?: (event: string, handler: Function) =>
|
|
211
|
+
setSuffixText?: (text: string) => void;
|
|
212
|
+
removeSuffixText?: () => void;
|
|
213
|
+
updateElementPositions?: () => void;
|
|
214
|
+
on?: (event: string, handler: Function) => void;
|
|
215
|
+
off?: (event: string, handler: Function) => void;
|
|
209
216
|
disabled?: {
|
|
210
|
-
enable: () =>
|
|
211
|
-
disable: () =>
|
|
217
|
+
enable: () => void;
|
|
218
|
+
disable: () => void;
|
|
212
219
|
};
|
|
213
220
|
lifecycle?: {
|
|
214
221
|
destroy: () => void;
|
|
215
222
|
};
|
|
216
|
-
[key: string]:
|
|
223
|
+
[key: string]: unknown;
|
|
217
224
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TimeValue, TIME_FORMAT, TIME_PICKER_TYPE } from
|
|
1
|
+
import { TimeValue, TIME_FORMAT, TIME_PICKER_TYPE } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Interface for Clock Dial rendering options
|
|
4
4
|
*/
|
|
@@ -7,7 +7,7 @@ export interface ClockDialOptions {
|
|
|
7
7
|
format: TIME_FORMAT;
|
|
8
8
|
showSeconds: boolean;
|
|
9
9
|
prefix: string;
|
|
10
|
-
activeSelector:
|
|
10
|
+
activeSelector: "hour" | "minute" | "second";
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Renders a clock dial on canvas with improved visual design
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TimePickerConfig } from
|
|
1
|
+
import { TimePickerConfig } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Default configuration for the TimePicker component
|
|
4
4
|
*/
|
|
@@ -17,7 +17,7 @@ export declare const createBaseConfig: (config?: TimePickerConfig) => TimePicker
|
|
|
17
17
|
export declare const getContainerConfig: (config: TimePickerConfig) => {
|
|
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: TimePickerConfig) => {
|
|
|
33
33
|
export declare const getModalConfig: (config: TimePickerConfig) => {
|
|
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 getModalConfig: (config: TimePickerConfig) => {
|
|
|
49
49
|
export declare const getDialogConfig: (config: TimePickerConfig) => {
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TimeValue, TIME_PERIOD, TIME_FORMAT } from
|
|
1
|
+
import { TimeValue, TIME_PERIOD, TIME_FORMAT } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Pads a number with leading zeros to ensure two-digit format
|
|
4
4
|
* @param {number} num - Number to pad
|
|
@@ -11,7 +11,7 @@ export declare const padZero: (num: number) => string;
|
|
|
11
11
|
* @param {TIME_FORMAT} format - Time format (12h or 24h)
|
|
12
12
|
* @returns {TimeValue} Parsed time value
|
|
13
13
|
*/
|
|
14
|
-
export declare const parseTime: (timeString: string,
|
|
14
|
+
export declare const parseTime: (timeString: string, _format: TIME_FORMAT) => TimeValue;
|
|
15
15
|
/**
|
|
16
16
|
* Formats a TimeValue object as a time string
|
|
17
17
|
* @param {TimeValue} timeValue - Time value to format
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TooltipConfig } from
|
|
1
|
+
import { TooltipConfig } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Default configuration for the Tooltip component
|
|
4
4
|
*/
|
|
@@ -17,7 +17,7 @@ export declare const createBaseConfig: (config?: TooltipConfig) => TooltipConfig
|
|
|
17
17
|
export declare const getElementConfig: (config: TooltipConfig) => {
|
|
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;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @module components/top-app-bar
|
|
3
3
|
* @description Top app bar implementation
|
|
4
4
|
*/
|
|
5
|
-
import { ElementComponent } from
|
|
6
|
-
import { TopAppBarConfig, TopAppBarType } from
|
|
5
|
+
import { ElementComponent } from "../../core/compose";
|
|
6
|
+
import { TopAppBarConfig, TopAppBarType } from "./types";
|
|
7
7
|
/**
|
|
8
8
|
* Top app bar component interface
|
|
9
9
|
*/
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { BADGE_VARIANTS, BADGE_COLORS, BADGE_POSITIONS, BADGE_MAX_CHARACTERS } from
|
|
2
|
-
import { FAB_POSITIONS as BOTTOM_APP_BAR_FAB_POSITIONS, BOTTOM_APP_BAR_CLASSES, DEFAULT_TRANSITION_DURATION } from
|
|
3
|
-
import { BUTTON_VARIANTS, BUTTON_TYPES, BUTTON_CLASSES, DEFAULT_RIPPLE_CONFIG } from
|
|
4
|
-
import { CARD_VARIANTS, CARD_ELEVATIONS, CARD_WIDTHS, CARD_CORNER_RADIUS, CARD_ASPECT_RATIOS, CARD_ACTION_ALIGNMENT, CARD_MEDIA_POSITION, CARD_CLASSES } from
|
|
5
|
-
import { CHECKBOX_VARIANTS, CHECKBOX_LABEL_POSITION, CHECKBOX_STATES, CHECKBOX_CLASSES } from
|
|
6
|
-
import { CHIP_VARIANTS, CHIP_EVENTS, CHIPS_EVENTS } from
|
|
7
|
-
import { CHIP_CLASSES, CHIP_STATES } from
|
|
8
|
-
import { DATEPICKER_VARIANTS, DATEPICKER_VIEWS, DATEPICKER_SELECTION_MODES, DAY_NAMES, MONTH_NAMES, MONTH_NAMES_SHORT, DEFAULT_DATE_FORMAT, DATEPICKER_CLASSES, DATEPICKER_EVENTS } from
|
|
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
|
|
10
|
-
import { DIVIDER_ORIENTATIONS, DIVIDER_VARIANTS, DEFAULT_DIVIDER_THICKNESS, DEFAULT_INSET_VALUE, DIVIDER_CLASSES } from
|
|
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
|
|
12
|
-
import { FAB_VARIANTS, FAB_SIZES, FAB_POSITIONS, FAB_CLASSES, FAB_TYPES, FAB_ICON_SIZES, FAB_ANIMATIONS } from
|
|
13
|
-
import { LIST_DEFAULTS, LIST_TYPES, LIST_SELECTION_MODES, LIST_EVENTS, LIST_SCROLL_POSITIONS, LIST_CLASSES } from
|
|
14
|
-
import { MENU_POSITION, MENU_DEFAULTS, MENU_INTERACTION_TYPES, MENU_ITEM_TYPES, MENU_EVENTS, MENU_CLASSES } from
|
|
15
|
-
import { NAV_VARIANTS, NAV_POSITIONS, NAV_BEHAVIORS, NAV_ITEM_STATES, NAV_EVENTS, NAV_DEFAULTS, NAV_CLASSES } from
|
|
16
|
-
import { PROGRESS_VARIANTS, PROGRESS_EVENTS, PROGRESS_DEFAULTS, PROGRESS_CLASSES } from
|
|
17
|
-
import { RADIO_STATES, RADIO_DIRECTIONS, RADIO_VARIANTS, RADIO_LABEL_POSITIONS, RADIO_SIZES, RADIO_EVENTS, RADIO_DEFAULTS, RADIO_CLASSES } from
|
|
18
|
-
import { SEARCH_VARIANTS, SEARCH_STATES, SEARCH_EVENTS, SEARCH_ICONS, SEARCH_DEFAULTS, SEARCH_CLASSES } from
|
|
19
|
-
import { SEGMENTED_BUTTON_MODES, SEGMENTED_BUTTON_DENSITY, SEGMENTED_BUTTON_EVENTS, SEGMENTED_BUTTON_DEFAULTS, SEGMENTED_BUTTON_ICONS, SEGMENTED_BUTTON_CLASSES } from
|
|
20
|
-
import { SELECT_VARIANTS, SELECT_PLACEMENT, SELECT_INTERACTION, SELECT_EVENTS, SELECT_ICONS, SELECT_DEFAULTS, SELECT_CLASSES } from
|
|
21
|
-
import { SHEET_VARIANTS, SHEET_POSITIONS, SHEET_EVENTS, SHEET_ELEVATION, SHEET_DEFAULTS, SHEET_ANIMATION, SHEET_GESTURE, SHEET_CLASSES } from
|
|
22
|
-
import { SLIDER_COLORS, SLIDER_SIZES, SLIDER_EVENTS, SLIDER_POSITIONS, SLIDER_DEFAULTS, SLIDER_CLASSES } from
|
|
23
|
-
import { SNACKBAR_VARIANTS, SNACKBAR_POSITIONS, SNACKBAR_STATES, SNACKBAR_EVENTS, SNACKBAR_DEFAULTS, SNACKBAR_CLASSES } from
|
|
24
|
-
import { SWITCH_LABEL_POSITIONS, SWITCH_STATES, SWITCH_EVENTS, SWITCH_DEFAULTS, SWITCH_CLASSES } from
|
|
25
|
-
import { TAB_VARIANTS, TAB_STATES, TAB_INDICATOR_WIDTH_STRATEGIES, TAB_EVENTS, TABS_EVENTS, TABS_DEFAULTS, TABS_CLASSES, TAB_CLASSES } from
|
|
26
|
-
import { TEXTFIELD_VARIANTS,
|
|
27
|
-
import { TIMEPICKER_TYPES, TIMEPICKER_ORIENTATIONS, TIMEPICKER_FORMATS, TIMEPICKER_PERIODS, TIMEPICKER_EVENTS, TIMEPICKER_DIAL, TIMEPICKER_VALUES, TIMEPICKER_Z_INDEX, TIMEPICKER_DEFAULTS, TIMEPICKER_CLASSES } from
|
|
28
|
-
import { TOOLTIP_POSITIONS, TOOLTIP_VARIANTS, TOOLTIP_EVENTS, TOOLTIP_DEFAULTS, TOOLTIP_CLASSES } from
|
|
29
|
-
import { TOP_APP_BAR_TYPES, TOP_APP_BAR_STATES, TOP_APP_BAR_DEFAULTS, TOP_APP_BAR_CLASSES } from
|
|
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,
|
|
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;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas resize utilities
|
|
3
|
+
* Provides utilities for observing and handling canvas resize events
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Observes resize events on an element and triggers a callback
|
|
7
|
+
* Watches the specified element and debounces resize events
|
|
8
|
+
*
|
|
9
|
+
* @param element - The element to observe for size changes
|
|
10
|
+
* @param canvas - The canvas element (for context)
|
|
11
|
+
* @param onResize - Callback to execute when the element resizes
|
|
12
|
+
* @returns Cleanup function to stop observing
|
|
13
|
+
*/
|
|
14
|
+
export declare const observeCanvasResize: (element: HTMLElement, canvas: HTMLCanvasElement, onResize: () => void) => (() => void);
|