@sabrenski/spire-ui-vue 0.3.1 → 0.3.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/README.md +72 -1
- package/dist/components/Autocomplete/Autocomplete.vue.d.ts +12 -1
- package/dist/components/Badge/types.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.vue.d.ts +6 -2
- package/dist/components/DatePicker/types.d.ts +5 -1
- package/dist/components/Dropdown/DropdownMenu.vue.d.ts +15 -2
- package/dist/components/IconPicker/IconPicker.vue.d.ts +15 -4
- package/dist/components/Input/Input.vue.d.ts +2 -1
- package/dist/components/Input/types.d.ts +3 -1
- package/dist/components/LineChart/LineChart.vue.d.ts +0 -1
- package/dist/components/LineChart/constants.d.ts +1 -8
- package/dist/components/LineChart/types.d.ts +0 -2
- package/dist/components/LineChart/utils.d.ts +0 -8
- package/dist/components/PhoneInput/PhoneInput.vue.d.ts +6 -3
- package/dist/components/Popover/Popover.vue.d.ts +11 -2
- package/dist/components/Select/Select.vue.d.ts +208 -7
- package/dist/components/Select/types.d.ts +5 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/components/Sparkline/Sparkline.vue.d.ts +1 -0
- package/dist/components/Tabs/Tabs.vue.d.ts +0 -1
- package/dist/components/Tabs/types.d.ts +1 -5
- package/dist/components/TimeInput/TimeInput.vue.d.ts +1 -1
- package/dist/components/TimeInput/types.d.ts +1 -1
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/useDarkMode/index.d.ts +1 -0
- package/dist/composables/useDarkMode/useDarkMode.d.ts +42 -0
- package/dist/composables/useMobilePopover/index.d.ts +1 -0
- package/dist/composables/useMobilePopover/useMobilePopover.d.ts +8 -0
- package/dist/composables/useTheme/index.d.ts +1 -0
- package/dist/composables/useTheme/useTheme.d.ts +43 -0
- package/dist/spire-ui.cjs +39 -39
- package/dist/spire-ui.css +1 -1
- package/dist/spire-ui.js +20208 -19652
- package/dist/theme/anchor-positioning.css +35 -0
- package/dist/theme/base.css +54 -54
- package/dist/theme/components.css +48 -0
- package/dist/theme/semantic.css +407 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -264,10 +264,12 @@ resetDefaults()
|
|
|
264
264
|
## Composables
|
|
265
265
|
|
|
266
266
|
```ts
|
|
267
|
-
import { useToast, useRovingFocus, useVirtualScroll, useComponentDefault } from '@sabrenski/spire-ui-vue'
|
|
267
|
+
import { useToast, useDarkMode, useTheme, useRovingFocus, useVirtualScroll, useComponentDefault } from '@sabrenski/spire-ui-vue'
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
- **useToast** - Toast notification management
|
|
271
|
+
- **useDarkMode** - Dark mode management with system preference detection
|
|
272
|
+
- **useTheme** - Color scheme theme management
|
|
271
273
|
- **useRovingFocus** - Keyboard navigation for lists
|
|
272
274
|
- **useVirtualScroll** - Virtualized scrolling for large lists
|
|
273
275
|
- **useAnchor** - CSS anchor positioning
|
|
@@ -276,6 +278,75 @@ import { useToast, useRovingFocus, useVirtualScroll, useComponentDefault } from
|
|
|
276
278
|
- **useChart** - Chart utilities
|
|
277
279
|
- **useComponentDefault** - Resolve component defaults from global config
|
|
278
280
|
|
|
281
|
+
### useDarkMode
|
|
282
|
+
|
|
283
|
+
Manage dark mode with system preference detection and localStorage persistence.
|
|
284
|
+
|
|
285
|
+
```vue
|
|
286
|
+
<script setup>
|
|
287
|
+
import { useDarkMode } from '@sabrenski/spire-ui-vue'
|
|
288
|
+
|
|
289
|
+
const { isDark, toggle, set, clearPreference } = useDarkMode()
|
|
290
|
+
</script>
|
|
291
|
+
|
|
292
|
+
<template>
|
|
293
|
+
<button @click="toggle">
|
|
294
|
+
{{ isDark ? 'Light Mode' : 'Dark Mode' }}
|
|
295
|
+
</button>
|
|
296
|
+
</template>
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
| Option | Type | Default | Description |
|
|
300
|
+
|--------|------|---------|-------------|
|
|
301
|
+
| `storageKey` | `string` | `'spire-dark-mode'` | localStorage key for persistence |
|
|
302
|
+
| `initialValue` | `boolean` | System preference | Initial dark mode state |
|
|
303
|
+
| `selector` | `string` | `'html'` | Element to apply dark class |
|
|
304
|
+
| `darkClass` | `string` | `'dark'` | CSS class for dark mode |
|
|
305
|
+
| `listenToSystemChanges` | `boolean` | `true` | React to system preference changes |
|
|
306
|
+
|
|
307
|
+
| Return | Type | Description |
|
|
308
|
+
|--------|------|-------------|
|
|
309
|
+
| `isDark` | `Ref<boolean>` | Reactive dark mode state |
|
|
310
|
+
| `toggle` | `() => void` | Toggle dark mode on/off |
|
|
311
|
+
| `set` | `(value: boolean) => void` | Set dark mode explicitly |
|
|
312
|
+
| `clearPreference` | `() => void` | Clear stored preference and follow system |
|
|
313
|
+
|
|
314
|
+
### useTheme
|
|
315
|
+
|
|
316
|
+
Manage color scheme themes with localStorage persistence.
|
|
317
|
+
|
|
318
|
+
```vue
|
|
319
|
+
<script setup>
|
|
320
|
+
import { useTheme } from '@sabrenski/spire-ui-vue'
|
|
321
|
+
|
|
322
|
+
const { schemes, currentScheme, setScheme } = useTheme()
|
|
323
|
+
</script>
|
|
324
|
+
|
|
325
|
+
<template>
|
|
326
|
+
<select v-model="currentScheme">
|
|
327
|
+
<option v-for="scheme in schemes" :key="scheme" :value="scheme">
|
|
328
|
+
{{ scheme }}
|
|
329
|
+
</option>
|
|
330
|
+
</select>
|
|
331
|
+
</template>
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
| Option | Type | Default | Description |
|
|
335
|
+
|--------|------|---------|-------------|
|
|
336
|
+
| `storageKey` | `string` | `'spire-theme-scheme'` | localStorage key for persistence |
|
|
337
|
+
| `initialScheme` | `ThemeScheme` | `'default'` | Initial color scheme |
|
|
338
|
+
| `selector` | `string` | `'html'` | Element to apply theme class |
|
|
339
|
+
| `customSchemes` | `string[]` | `[]` | Additional custom schemes |
|
|
340
|
+
|
|
341
|
+
| Return | Type | Description |
|
|
342
|
+
|--------|------|-------------|
|
|
343
|
+
| `schemes` | `ComputedRef<ThemeScheme[]>` | All available scheme names |
|
|
344
|
+
| `currentScheme` | `Ref<ThemeScheme>` | Current active scheme |
|
|
345
|
+
| `setScheme` | `(scheme: ThemeScheme) => void` | Set the color scheme |
|
|
346
|
+
| `clearPreference` | `() => void` | Clear stored preference and reset to default |
|
|
347
|
+
|
|
348
|
+
Available schemes: `'default'`, `'ocean'`, `'forest'`, `'sunset'`, `'rose'`, `'midnight'`
|
|
349
|
+
|
|
279
350
|
## Component Examples
|
|
280
351
|
|
|
281
352
|
### Button
|
|
@@ -3,16 +3,25 @@ declare function focus(): void;
|
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
attrs: Partial<{}>;
|
|
5
5
|
slots: {
|
|
6
|
+
option?(_: {
|
|
7
|
+
selected: boolean;
|
|
8
|
+
active: boolean;
|
|
9
|
+
option: AutocompleteOptionData;
|
|
10
|
+
}): any;
|
|
6
11
|
option?(_: {
|
|
7
12
|
selected: boolean;
|
|
8
13
|
active: boolean;
|
|
9
14
|
option: AutocompleteOptionData;
|
|
10
15
|
}): any;
|
|
11
16
|
default?(_: {}): any;
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
empty?(_: {}): any;
|
|
12
19
|
empty?(_: {}): any;
|
|
13
20
|
};
|
|
14
21
|
refs: {
|
|
15
22
|
inputRef: HTMLInputElement;
|
|
23
|
+
dialogRef: HTMLDialogElement;
|
|
24
|
+
mobileSearchRef: HTMLInputElement;
|
|
16
25
|
};
|
|
17
26
|
rootEl: any;
|
|
18
27
|
};
|
|
@@ -37,8 +46,8 @@ declare const __VLS_component: import('vue').DefineComponent<AutocompleteProps,
|
|
|
37
46
|
loading: boolean;
|
|
38
47
|
placeholder: string;
|
|
39
48
|
invalid: boolean;
|
|
40
|
-
clearable: boolean;
|
|
41
49
|
readonly: boolean;
|
|
50
|
+
clearable: boolean;
|
|
42
51
|
minQueryLength: number;
|
|
43
52
|
debounceMs: number;
|
|
44
53
|
allowCustomValue: boolean;
|
|
@@ -49,6 +58,8 @@ declare const __VLS_component: import('vue').DefineComponent<AutocompleteProps,
|
|
|
49
58
|
strategy: "absolute" | "fixed";
|
|
50
59
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
51
60
|
inputRef: HTMLInputElement;
|
|
61
|
+
dialogRef: HTMLDialogElement;
|
|
62
|
+
mobileSearchRef: HTMLInputElement;
|
|
52
63
|
}, any>;
|
|
53
64
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
54
65
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
export type BadgeVariant = 'solid' | 'flat' | 'outline';
|
|
3
3
|
export type BadgeColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
|
|
4
|
-
export type BadgeSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type BadgeSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
5
|
export type BadgeShape = 'circle' | 'rectangle';
|
|
6
6
|
export type BadgePlacement = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
7
7
|
export interface BadgeProps {
|
|
@@ -11,13 +11,17 @@ declare const _default: import('vue').DefineComponent<DatePickerProps, {}, {}, {
|
|
|
11
11
|
variant: DatePickerVariant;
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
placement: import('../..').Placement;
|
|
14
|
+
loading: boolean;
|
|
14
15
|
placeholder: string;
|
|
15
|
-
clearable: boolean;
|
|
16
16
|
readonly: boolean;
|
|
17
|
+
clearable: boolean;
|
|
17
18
|
strategy: "absolute" | "fixed";
|
|
18
19
|
locale: string;
|
|
19
20
|
mode: import('..').CalendarMode;
|
|
20
21
|
firstDayOfWeek: 0 | 1;
|
|
21
22
|
numberOfMonths: number;
|
|
22
|
-
|
|
23
|
+
useNativeDialog: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
25
|
+
dialogRef: HTMLDialogElement;
|
|
26
|
+
}, HTMLDivElement>;
|
|
23
27
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CalendarMode, DateRange, DateRangePreset } from '../Calendar/types';
|
|
2
2
|
import { Placement } from '../../composables';
|
|
3
|
-
export type DatePickerSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type DatePickerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
export type DatePickerVariant = 'outline' | 'filled' | 'underline';
|
|
5
5
|
export interface DatePickerProps {
|
|
6
6
|
/** Selected date value */
|
|
@@ -15,6 +15,8 @@ export interface DatePickerProps {
|
|
|
15
15
|
readonly?: boolean;
|
|
16
16
|
/** Show clear button when value exists */
|
|
17
17
|
clearable?: boolean;
|
|
18
|
+
/** Show loading spinner */
|
|
19
|
+
loading?: boolean;
|
|
18
20
|
/** Component size */
|
|
19
21
|
size?: DatePickerSize;
|
|
20
22
|
/** Visual variant */
|
|
@@ -43,4 +45,6 @@ export interface DatePickerProps {
|
|
|
43
45
|
placement?: Placement;
|
|
44
46
|
/** Positioning strategy for the dropdown */
|
|
45
47
|
strategy?: 'absolute' | 'fixed';
|
|
48
|
+
/** Use native dialog on mobile instead of popover (default: true) */
|
|
49
|
+
useNativeDialog?: boolean;
|
|
46
50
|
}
|
|
@@ -3,16 +3,27 @@ declare function __VLS_template(): {
|
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
4
|
slots: {
|
|
5
5
|
topContent?(_: {}): any;
|
|
6
|
+
topContent?(_: {}): any;
|
|
7
|
+
item?(_: {
|
|
8
|
+
item: import('./types').DropdownItemData;
|
|
9
|
+
isSelected: boolean;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
}): any;
|
|
6
12
|
item?(_: {
|
|
7
13
|
item: import('./types').DropdownItemData;
|
|
8
14
|
isSelected: boolean;
|
|
9
15
|
isActive: boolean;
|
|
10
16
|
}): any;
|
|
11
17
|
default?(_: {}): any;
|
|
18
|
+
default?(_: {}): any;
|
|
19
|
+
emptyContent?(_: {}): any;
|
|
12
20
|
emptyContent?(_: {}): any;
|
|
13
21
|
bottomContent?(_: {}): any;
|
|
22
|
+
bottomContent?(_: {}): any;
|
|
23
|
+
};
|
|
24
|
+
refs: {
|
|
25
|
+
dialogRef: HTMLDialogElement;
|
|
14
26
|
};
|
|
15
|
-
refs: {};
|
|
16
27
|
rootEl: any;
|
|
17
28
|
};
|
|
18
29
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -29,7 +40,9 @@ declare const __VLS_component: import('vue').DefineComponent<DropdownMenuProps,
|
|
|
29
40
|
color: DropdownMenuColor;
|
|
30
41
|
selectionMode: import('./types').DropdownSelectionMode;
|
|
31
42
|
hideSelectedIcon: boolean;
|
|
32
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
43
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
|
+
dialogRef: HTMLDialogElement;
|
|
45
|
+
}, any>;
|
|
33
46
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
34
47
|
export default _default;
|
|
35
48
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -39,6 +39,8 @@ declare const _default: import('vue').DefineComponent<IconPickerProps, {}, {}, {
|
|
|
39
39
|
};
|
|
40
40
|
$refs: {
|
|
41
41
|
[x: string]: unknown;
|
|
42
|
+
} & {
|
|
43
|
+
dialogRef: HTMLDialogElement;
|
|
42
44
|
};
|
|
43
45
|
$slots: Readonly<{
|
|
44
46
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
@@ -59,6 +61,7 @@ declare const _default: import('vue').DefineComponent<IconPickerProps, {}, {}, {
|
|
|
59
61
|
isOpen: import('vue').Ref<boolean, boolean>;
|
|
60
62
|
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
61
63
|
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
64
|
+
dialogRef: import('vue').Ref<HTMLDialogElement | null, HTMLDialogElement | null>;
|
|
62
65
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
63
66
|
close: () => any;
|
|
64
67
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -105,13 +108,14 @@ declare const _default: import('vue').DefineComponent<IconPickerProps, {}, {}, {
|
|
|
105
108
|
onClose?: (() => any) | undefined;
|
|
106
109
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
107
110
|
onOpen?: (() => any) | undefined;
|
|
108
|
-
}>, "close" | "isOpen" | "open" | "toggle" | "triggerRef" | "contentRef" | ("disabled" | "placement" | "trigger" | "showDelay" | "hideDelay" | "strategy" | "closeOnClickOutside" | "closeOnEscape")> & import('vue').ShallowUnwrapRef<{
|
|
111
|
+
}>, "close" | "isOpen" | "open" | "toggle" | "triggerRef" | "dialogRef" | "contentRef" | ("disabled" | "placement" | "trigger" | "showDelay" | "hideDelay" | "strategy" | "closeOnClickOutside" | "closeOnEscape")> & import('vue').ShallowUnwrapRef<{
|
|
109
112
|
open: () => void;
|
|
110
113
|
close: () => void;
|
|
111
114
|
toggle: () => void;
|
|
112
115
|
isOpen: import('vue').Ref<boolean, boolean>;
|
|
113
116
|
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
114
117
|
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
118
|
+
dialogRef: import('vue').Ref<HTMLDialogElement | null, HTMLDialogElement | null>;
|
|
115
119
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
116
120
|
$slots: {
|
|
117
121
|
default?(_: {}): any;
|
|
@@ -119,6 +123,10 @@ declare const _default: import('vue').DefineComponent<IconPickerProps, {}, {}, {
|
|
|
119
123
|
close: () => void;
|
|
120
124
|
isOpen: boolean;
|
|
121
125
|
}): any;
|
|
126
|
+
content?(_: {
|
|
127
|
+
close: () => void;
|
|
128
|
+
isOpen: boolean;
|
|
129
|
+
}): any;
|
|
122
130
|
};
|
|
123
131
|
}) | null;
|
|
124
132
|
searchInputRef: ({
|
|
@@ -134,6 +142,7 @@ declare const _default: import('vue').DefineComponent<IconPickerProps, {}, {}, {
|
|
|
134
142
|
readonly readonly?: boolean | undefined;
|
|
135
143
|
readonly invalid?: boolean | undefined;
|
|
136
144
|
readonly clearable?: boolean | undefined;
|
|
145
|
+
readonly loading?: boolean | undefined;
|
|
137
146
|
readonly icon?: import('vue').Component | undefined;
|
|
138
147
|
readonly iconEnd?: import('vue').Component | undefined;
|
|
139
148
|
readonly onClear?: (() => any) | undefined;
|
|
@@ -167,9 +176,10 @@ declare const _default: import('vue').DefineComponent<IconPickerProps, {}, {}, {
|
|
|
167
176
|
}, string, {
|
|
168
177
|
type: import('..').InputType;
|
|
169
178
|
disabled: boolean;
|
|
179
|
+
loading: boolean;
|
|
170
180
|
invalid: boolean;
|
|
171
|
-
clearable: boolean;
|
|
172
181
|
readonly: boolean;
|
|
182
|
+
clearable: boolean;
|
|
173
183
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
174
184
|
beforeCreate?: (() => void) | (() => void)[];
|
|
175
185
|
created?: (() => void) | (() => void)[];
|
|
@@ -193,13 +203,14 @@ declare const _default: import('vue').DefineComponent<IconPickerProps, {}, {}, {
|
|
|
193
203
|
} & Readonly<{
|
|
194
204
|
type: import('..').InputType;
|
|
195
205
|
disabled: boolean;
|
|
206
|
+
loading: boolean;
|
|
196
207
|
invalid: boolean;
|
|
197
|
-
clearable: boolean;
|
|
198
208
|
readonly: boolean;
|
|
209
|
+
clearable: boolean;
|
|
199
210
|
}> & Omit<Readonly<import('..').InputProps> & Readonly<{
|
|
200
211
|
onClear?: (() => any) | undefined;
|
|
201
212
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
202
|
-
}>, "focus" | "inputRef" | ("type" | "disabled" | "
|
|
213
|
+
}>, "focus" | "inputRef" | ("type" | "disabled" | "loading" | "invalid" | "readonly" | "clearable")> & import('vue').ShallowUnwrapRef<{
|
|
203
214
|
focus: () => void;
|
|
204
215
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
205
216
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
@@ -24,9 +24,10 @@ declare const __VLS_component: import('vue').DefineComponent<InputProps, {
|
|
|
24
24
|
}>, {
|
|
25
25
|
type: import('./types').InputType;
|
|
26
26
|
disabled: boolean;
|
|
27
|
+
loading: boolean;
|
|
27
28
|
invalid: boolean;
|
|
28
|
-
clearable: boolean;
|
|
29
29
|
readonly: boolean;
|
|
30
|
+
clearable: boolean;
|
|
30
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
32
|
inputRef: HTMLInputElement;
|
|
32
33
|
}, HTMLDivElement>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search';
|
|
3
|
-
export type InputSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type InputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
export type InputVariant = 'outline' | 'filled' | 'underline';
|
|
5
5
|
export interface InputProps {
|
|
6
6
|
/** Current input value */
|
|
@@ -25,6 +25,8 @@ export interface InputProps {
|
|
|
25
25
|
invalid?: boolean;
|
|
26
26
|
/** Show clear button when input has value */
|
|
27
27
|
clearable?: boolean;
|
|
28
|
+
/** Show loading spinner */
|
|
29
|
+
loading?: boolean;
|
|
28
30
|
/** Icon component to display at start (renders before #start slot) */
|
|
29
31
|
icon?: Component;
|
|
30
32
|
/** Icon component to display at end (renders after #end slot) */
|
|
@@ -54,7 +54,6 @@ declare const __VLS_component: import('vue').DefineComponent<LineChartProps, {},
|
|
|
54
54
|
areaOpacity: number;
|
|
55
55
|
showPoints: boolean;
|
|
56
56
|
pointRadius: number;
|
|
57
|
-
showToolbar: boolean;
|
|
58
57
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
59
58
|
containerRef: HTMLDivElement;
|
|
60
59
|
svgWrapperRef: HTMLDivElement;
|
|
@@ -6,7 +6,7 @@ export declare const COLOR_TO_CSS_VAR: Record<string, string>;
|
|
|
6
6
|
/** Map chart colors to subtle/fill variants for area fills (same color, use opacity in component) */
|
|
7
7
|
export declare const COLOR_TO_SUBTLE_VAR: Record<string, string>;
|
|
8
8
|
/** Default prop values for LineChart */
|
|
9
|
-
export declare const DEFAULT_PROPS: Required<Pick<LineChartProps, 'curve' | 'area' | 'areaOpacity' | 'showPoints' | 'pointRadius' | 'strokeWidth' | 'showLegend' | 'legendPosition' | 'legendToggle' | 'showTooltip' | '
|
|
9
|
+
export declare const DEFAULT_PROPS: Required<Pick<LineChartProps, 'curve' | 'area' | 'areaOpacity' | 'showPoints' | 'pointRadius' | 'strokeWidth' | 'showLegend' | 'legendPosition' | 'legendToggle' | 'showTooltip' | 'animated' | 'animationDuration' | 'height' | 'loading' | 'disabled'>>;
|
|
10
10
|
/** Default axis configuration */
|
|
11
11
|
export declare const DEFAULT_X_AXIS: {
|
|
12
12
|
gridlines: boolean;
|
|
@@ -23,13 +23,6 @@ export declare const DEFAULT_CHART_MARGINS: {
|
|
|
23
23
|
bottom: number;
|
|
24
24
|
left: number;
|
|
25
25
|
};
|
|
26
|
-
/** Animation easing CSS values */
|
|
27
|
-
export declare const ANIMATION_EASING: {
|
|
28
|
-
smooth: string;
|
|
29
|
-
spring: string;
|
|
30
|
-
};
|
|
31
|
-
/** Threshold for showing performance warning in console */
|
|
32
|
-
export declare const PERFORMANCE_WARNING_THRESHOLD = 1000;
|
|
33
26
|
/**
|
|
34
27
|
* Get CSS color value from ChartColor or custom color string
|
|
35
28
|
*/
|
|
@@ -137,8 +137,6 @@ export interface LineChartProps {
|
|
|
137
137
|
legendToggle?: boolean;
|
|
138
138
|
/** Show tooltip on hover */
|
|
139
139
|
showTooltip?: boolean;
|
|
140
|
-
/** Show zoom/pan toolbar */
|
|
141
|
-
showToolbar?: boolean;
|
|
142
140
|
/** Enable animations */
|
|
143
141
|
animated?: boolean;
|
|
144
142
|
/** Animation duration in milliseconds */
|
|
@@ -28,14 +28,6 @@ export declare function generateChartId(): string;
|
|
|
28
28
|
* Format a number for display (removes trailing zeros)
|
|
29
29
|
*/
|
|
30
30
|
export declare function formatNumber(value: number, precision?: number): string;
|
|
31
|
-
/**
|
|
32
|
-
* Clamp a value between min and max
|
|
33
|
-
*/
|
|
34
|
-
export declare function clamp(value: number, min: number, max: number): number;
|
|
35
|
-
/**
|
|
36
|
-
* Linear interpolation between two values
|
|
37
|
-
*/
|
|
38
|
-
export declare function lerp(start: number, end: number, t: number): number;
|
|
39
31
|
/**
|
|
40
32
|
* Check if a value is a valid number (not NaN, not Infinity)
|
|
41
33
|
*/
|
|
@@ -41,6 +41,7 @@ declare const _default: import('vue').DefineComponent<PhoneInputProps, {
|
|
|
41
41
|
readonly readonly?: boolean | undefined;
|
|
42
42
|
readonly invalid?: boolean | undefined;
|
|
43
43
|
readonly clearable?: boolean | undefined;
|
|
44
|
+
readonly loading?: boolean | undefined;
|
|
44
45
|
readonly icon?: import('vue').Component | undefined;
|
|
45
46
|
readonly iconEnd?: import('vue').Component | undefined;
|
|
46
47
|
readonly onClear?: (() => any) | undefined;
|
|
@@ -74,9 +75,10 @@ declare const _default: import('vue').DefineComponent<PhoneInputProps, {
|
|
|
74
75
|
}, string, {
|
|
75
76
|
type: import('..').InputType;
|
|
76
77
|
disabled: boolean;
|
|
78
|
+
loading: boolean;
|
|
77
79
|
invalid: boolean;
|
|
78
|
-
clearable: boolean;
|
|
79
80
|
readonly: boolean;
|
|
81
|
+
clearable: boolean;
|
|
80
82
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
81
83
|
beforeCreate?: (() => void) | (() => void)[];
|
|
82
84
|
created?: (() => void) | (() => void)[];
|
|
@@ -100,13 +102,14 @@ declare const _default: import('vue').DefineComponent<PhoneInputProps, {
|
|
|
100
102
|
} & Readonly<{
|
|
101
103
|
type: import('..').InputType;
|
|
102
104
|
disabled: boolean;
|
|
105
|
+
loading: boolean;
|
|
103
106
|
invalid: boolean;
|
|
104
|
-
clearable: boolean;
|
|
105
107
|
readonly: boolean;
|
|
108
|
+
clearable: boolean;
|
|
106
109
|
}> & Omit<Readonly<import('..').InputProps> & Readonly<{
|
|
107
110
|
onClear?: (() => any) | undefined;
|
|
108
111
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
109
|
-
}>, "focus" | "inputRef" | ("type" | "disabled" | "
|
|
112
|
+
}>, "focus" | "inputRef" | ("type" | "disabled" | "loading" | "invalid" | "readonly" | "clearable")> & import('vue').ShallowUnwrapRef<{
|
|
110
113
|
focus: () => void;
|
|
111
114
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
112
115
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
@@ -9,8 +9,14 @@ declare function __VLS_template(): {
|
|
|
9
9
|
close: typeof close;
|
|
10
10
|
isOpen: boolean;
|
|
11
11
|
}): any;
|
|
12
|
+
content?(_: {
|
|
13
|
+
close: typeof close;
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
}): any;
|
|
16
|
+
};
|
|
17
|
+
refs: {
|
|
18
|
+
dialogRef: HTMLDialogElement;
|
|
12
19
|
};
|
|
13
|
-
refs: {};
|
|
14
20
|
rootEl: any;
|
|
15
21
|
};
|
|
16
22
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -21,6 +27,7 @@ declare const __VLS_component: import('vue').DefineComponent<PopoverProps, {
|
|
|
21
27
|
isOpen: import('vue').Ref<boolean, boolean>;
|
|
22
28
|
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
23
29
|
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
30
|
+
dialogRef: import('vue').Ref<HTMLDialogElement | null, HTMLDialogElement | null>;
|
|
24
31
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
32
|
close: () => any;
|
|
26
33
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -38,7 +45,9 @@ declare const __VLS_component: import('vue').DefineComponent<PopoverProps, {
|
|
|
38
45
|
strategy: import('./types').PopoverStrategy;
|
|
39
46
|
closeOnClickOutside: boolean;
|
|
40
47
|
closeOnEscape: boolean;
|
|
41
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
48
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
49
|
+
dialogRef: HTMLDialogElement;
|
|
50
|
+
}, any>;
|
|
42
51
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
52
|
export default _default;
|
|
44
53
|
type __VLS_WithTemplateSlots<T, S> = T & {
|