@sabrenski/spire-ui-vue 0.3.2 → 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/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 +20127 -19581
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { nextTick, Component } from 'vue';
|
|
2
2
|
import { SelectProps, SelectOptionData } from './types';
|
|
3
|
+
declare function focus(): void;
|
|
3
4
|
declare function __VLS_template(): {
|
|
4
5
|
attrs: Partial<{}>;
|
|
5
6
|
slots: {
|
|
@@ -8,8 +9,15 @@ declare function __VLS_template(): {
|
|
|
8
9
|
active: boolean;
|
|
9
10
|
option: SelectOptionData;
|
|
10
11
|
}): any;
|
|
12
|
+
option?(_: {
|
|
13
|
+
selected: boolean;
|
|
14
|
+
active: boolean;
|
|
15
|
+
option: SelectOptionData;
|
|
16
|
+
}): any;
|
|
17
|
+
default?(_: {}): any;
|
|
11
18
|
default?(_: {}): any;
|
|
12
19
|
empty?(_: {}): any;
|
|
20
|
+
empty?(_: {}): any;
|
|
13
21
|
};
|
|
14
22
|
refs: {
|
|
15
23
|
searchInputRef: ({
|
|
@@ -25,6 +33,7 @@ declare function __VLS_template(): {
|
|
|
25
33
|
readonly readonly?: boolean | undefined;
|
|
26
34
|
readonly invalid?: boolean | undefined;
|
|
27
35
|
readonly clearable?: boolean | undefined;
|
|
36
|
+
readonly loading?: boolean | undefined;
|
|
28
37
|
readonly icon?: Component | undefined;
|
|
29
38
|
readonly iconEnd?: Component | undefined;
|
|
30
39
|
readonly onClear?: (() => any) | undefined;
|
|
@@ -58,9 +67,10 @@ declare function __VLS_template(): {
|
|
|
58
67
|
}, string, {
|
|
59
68
|
type: import('..').InputType;
|
|
60
69
|
disabled: boolean;
|
|
70
|
+
loading: boolean;
|
|
61
71
|
invalid: boolean;
|
|
62
|
-
clearable: boolean;
|
|
63
72
|
readonly: boolean;
|
|
73
|
+
clearable: boolean;
|
|
64
74
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
65
75
|
beforeCreate?: (() => void) | (() => void)[];
|
|
66
76
|
created?: (() => void) | (() => void)[];
|
|
@@ -84,13 +94,105 @@ declare function __VLS_template(): {
|
|
|
84
94
|
} & Readonly<{
|
|
85
95
|
type: import('..').InputType;
|
|
86
96
|
disabled: boolean;
|
|
97
|
+
loading: boolean;
|
|
87
98
|
invalid: boolean;
|
|
99
|
+
readonly: boolean;
|
|
88
100
|
clearable: boolean;
|
|
101
|
+
}> & Omit<Readonly<import('..').InputProps> & Readonly<{
|
|
102
|
+
onClear?: (() => any) | undefined;
|
|
103
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
104
|
+
}>, "focus" | "inputRef" | ("type" | "disabled" | "loading" | "invalid" | "readonly" | "clearable")> & import('vue').ShallowUnwrapRef<{
|
|
105
|
+
focus: () => void;
|
|
106
|
+
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
107
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
108
|
+
$slots: {
|
|
109
|
+
start?(_: {}): any;
|
|
110
|
+
end?(_: {}): any;
|
|
111
|
+
};
|
|
112
|
+
}) | null;
|
|
113
|
+
dialogRef: HTMLDialogElement;
|
|
114
|
+
mobileSearchInputRef: ({
|
|
115
|
+
$: import('vue').ComponentInternalInstance;
|
|
116
|
+
$data: {};
|
|
117
|
+
$props: {
|
|
118
|
+
readonly modelValue?: string | number | undefined;
|
|
119
|
+
readonly type?: import('..').InputType | undefined;
|
|
120
|
+
readonly placeholder?: string | undefined;
|
|
121
|
+
readonly size?: import('..').InputSize | undefined;
|
|
122
|
+
readonly variant?: import('..').InputVariant | undefined;
|
|
123
|
+
readonly disabled?: boolean | undefined;
|
|
124
|
+
readonly readonly?: boolean | undefined;
|
|
125
|
+
readonly invalid?: boolean | undefined;
|
|
126
|
+
readonly clearable?: boolean | undefined;
|
|
127
|
+
readonly loading?: boolean | undefined;
|
|
128
|
+
readonly icon?: Component | undefined;
|
|
129
|
+
readonly iconEnd?: Component | undefined;
|
|
130
|
+
readonly onClear?: (() => any) | undefined;
|
|
131
|
+
readonly "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
132
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
133
|
+
$attrs: {
|
|
134
|
+
[x: string]: unknown;
|
|
135
|
+
};
|
|
136
|
+
$refs: {
|
|
137
|
+
[x: string]: unknown;
|
|
138
|
+
} & {
|
|
139
|
+
inputRef: HTMLInputElement;
|
|
140
|
+
};
|
|
141
|
+
$slots: Readonly<{
|
|
142
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
143
|
+
}>;
|
|
144
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
145
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
146
|
+
$host: Element | null;
|
|
147
|
+
$emit: ((event: "clear") => void) & ((event: "update:modelValue", value: string | number) => void);
|
|
148
|
+
$el: HTMLDivElement;
|
|
149
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('..').InputProps> & Readonly<{
|
|
150
|
+
onClear?: (() => any) | undefined;
|
|
151
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
152
|
+
}>, {
|
|
153
|
+
focus: () => void;
|
|
154
|
+
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
155
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
156
|
+
clear: () => any;
|
|
157
|
+
"update:modelValue": (value: string | number) => any;
|
|
158
|
+
}, string, {
|
|
159
|
+
type: import('..').InputType;
|
|
160
|
+
disabled: boolean;
|
|
161
|
+
loading: boolean;
|
|
162
|
+
invalid: boolean;
|
|
163
|
+
readonly: boolean;
|
|
164
|
+
clearable: boolean;
|
|
165
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
166
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
167
|
+
created?: (() => void) | (() => void)[];
|
|
168
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
169
|
+
mounted?: (() => void) | (() => void)[];
|
|
170
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
171
|
+
updated?: (() => void) | (() => void)[];
|
|
172
|
+
activated?: (() => void) | (() => void)[];
|
|
173
|
+
deactivated?: (() => void) | (() => void)[];
|
|
174
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
175
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
176
|
+
destroyed?: (() => void) | (() => void)[];
|
|
177
|
+
unmounted?: (() => void) | (() => void)[];
|
|
178
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
179
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
180
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
181
|
+
};
|
|
182
|
+
$forceUpdate: () => void;
|
|
183
|
+
$nextTick: typeof nextTick;
|
|
184
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
185
|
+
} & Readonly<{
|
|
186
|
+
type: import('..').InputType;
|
|
187
|
+
disabled: boolean;
|
|
188
|
+
loading: boolean;
|
|
189
|
+
invalid: boolean;
|
|
89
190
|
readonly: boolean;
|
|
191
|
+
clearable: boolean;
|
|
90
192
|
}> & Omit<Readonly<import('..').InputProps> & Readonly<{
|
|
91
193
|
onClear?: (() => any) | undefined;
|
|
92
194
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
93
|
-
}>, "focus" | "inputRef" | ("type" | "disabled" | "
|
|
195
|
+
}>, "focus" | "inputRef" | ("type" | "disabled" | "loading" | "invalid" | "readonly" | "clearable")> & import('vue').ShallowUnwrapRef<{
|
|
94
196
|
focus: () => void;
|
|
95
197
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
96
198
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
@@ -100,10 +202,13 @@ declare function __VLS_template(): {
|
|
|
100
202
|
};
|
|
101
203
|
}) | null;
|
|
102
204
|
};
|
|
103
|
-
rootEl:
|
|
205
|
+
rootEl: any;
|
|
104
206
|
};
|
|
105
207
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
106
|
-
declare const __VLS_component: import('vue').DefineComponent<SelectProps, {
|
|
208
|
+
declare const __VLS_component: import('vue').DefineComponent<SelectProps, {
|
|
209
|
+
focus: typeof focus;
|
|
210
|
+
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
211
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
107
212
|
search: (query: string) => any;
|
|
108
213
|
"update:modelValue": (value: string | string[] | undefined) => any;
|
|
109
214
|
change: (value: string | string[] | undefined) => any;
|
|
@@ -118,10 +223,12 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {}, {}
|
|
|
118
223
|
loading: boolean;
|
|
119
224
|
placeholder: string;
|
|
120
225
|
invalid: boolean;
|
|
226
|
+
readonly: boolean;
|
|
121
227
|
clearable: boolean;
|
|
122
228
|
chips: boolean;
|
|
123
229
|
maxChips: number;
|
|
124
230
|
emptyMessage: string;
|
|
231
|
+
loadingMessage: string;
|
|
125
232
|
strategy: "absolute" | "fixed";
|
|
126
233
|
searchable: boolean;
|
|
127
234
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -138,6 +245,7 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {}, {}
|
|
|
138
245
|
readonly readonly?: boolean | undefined;
|
|
139
246
|
readonly invalid?: boolean | undefined;
|
|
140
247
|
readonly clearable?: boolean | undefined;
|
|
248
|
+
readonly loading?: boolean | undefined;
|
|
141
249
|
readonly icon?: Component | undefined;
|
|
142
250
|
readonly iconEnd?: Component | undefined;
|
|
143
251
|
readonly onClear?: (() => any) | undefined;
|
|
@@ -171,9 +279,10 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {}, {}
|
|
|
171
279
|
}, string, {
|
|
172
280
|
type: import('..').InputType;
|
|
173
281
|
disabled: boolean;
|
|
282
|
+
loading: boolean;
|
|
174
283
|
invalid: boolean;
|
|
175
|
-
clearable: boolean;
|
|
176
284
|
readonly: boolean;
|
|
285
|
+
clearable: boolean;
|
|
177
286
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
178
287
|
beforeCreate?: (() => void) | (() => void)[];
|
|
179
288
|
created?: (() => void) | (() => void)[];
|
|
@@ -197,13 +306,105 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {}, {}
|
|
|
197
306
|
} & Readonly<{
|
|
198
307
|
type: import('..').InputType;
|
|
199
308
|
disabled: boolean;
|
|
309
|
+
loading: boolean;
|
|
200
310
|
invalid: boolean;
|
|
311
|
+
readonly: boolean;
|
|
201
312
|
clearable: boolean;
|
|
313
|
+
}> & Omit<Readonly<import('..').InputProps> & Readonly<{
|
|
314
|
+
onClear?: (() => any) | undefined;
|
|
315
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
316
|
+
}>, "focus" | "inputRef" | ("type" | "disabled" | "loading" | "invalid" | "readonly" | "clearable")> & import('vue').ShallowUnwrapRef<{
|
|
317
|
+
focus: () => void;
|
|
318
|
+
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
319
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
320
|
+
$slots: {
|
|
321
|
+
start?(_: {}): any;
|
|
322
|
+
end?(_: {}): any;
|
|
323
|
+
};
|
|
324
|
+
}) | null;
|
|
325
|
+
dialogRef: HTMLDialogElement;
|
|
326
|
+
mobileSearchInputRef: ({
|
|
327
|
+
$: import('vue').ComponentInternalInstance;
|
|
328
|
+
$data: {};
|
|
329
|
+
$props: {
|
|
330
|
+
readonly modelValue?: string | number | undefined;
|
|
331
|
+
readonly type?: import('..').InputType | undefined;
|
|
332
|
+
readonly placeholder?: string | undefined;
|
|
333
|
+
readonly size?: import('..').InputSize | undefined;
|
|
334
|
+
readonly variant?: import('..').InputVariant | undefined;
|
|
335
|
+
readonly disabled?: boolean | undefined;
|
|
336
|
+
readonly readonly?: boolean | undefined;
|
|
337
|
+
readonly invalid?: boolean | undefined;
|
|
338
|
+
readonly clearable?: boolean | undefined;
|
|
339
|
+
readonly loading?: boolean | undefined;
|
|
340
|
+
readonly icon?: Component | undefined;
|
|
341
|
+
readonly iconEnd?: Component | undefined;
|
|
342
|
+
readonly onClear?: (() => any) | undefined;
|
|
343
|
+
readonly "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
344
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
345
|
+
$attrs: {
|
|
346
|
+
[x: string]: unknown;
|
|
347
|
+
};
|
|
348
|
+
$refs: {
|
|
349
|
+
[x: string]: unknown;
|
|
350
|
+
} & {
|
|
351
|
+
inputRef: HTMLInputElement;
|
|
352
|
+
};
|
|
353
|
+
$slots: Readonly<{
|
|
354
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
355
|
+
}>;
|
|
356
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
357
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
358
|
+
$host: Element | null;
|
|
359
|
+
$emit: ((event: "clear") => void) & ((event: "update:modelValue", value: string | number) => void);
|
|
360
|
+
$el: HTMLDivElement;
|
|
361
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('..').InputProps> & Readonly<{
|
|
362
|
+
onClear?: (() => any) | undefined;
|
|
363
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
364
|
+
}>, {
|
|
365
|
+
focus: () => void;
|
|
366
|
+
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
367
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
368
|
+
clear: () => any;
|
|
369
|
+
"update:modelValue": (value: string | number) => any;
|
|
370
|
+
}, string, {
|
|
371
|
+
type: import('..').InputType;
|
|
372
|
+
disabled: boolean;
|
|
373
|
+
loading: boolean;
|
|
374
|
+
invalid: boolean;
|
|
375
|
+
readonly: boolean;
|
|
376
|
+
clearable: boolean;
|
|
377
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
378
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
379
|
+
created?: (() => void) | (() => void)[];
|
|
380
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
381
|
+
mounted?: (() => void) | (() => void)[];
|
|
382
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
383
|
+
updated?: (() => void) | (() => void)[];
|
|
384
|
+
activated?: (() => void) | (() => void)[];
|
|
385
|
+
deactivated?: (() => void) | (() => void)[];
|
|
386
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
387
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
388
|
+
destroyed?: (() => void) | (() => void)[];
|
|
389
|
+
unmounted?: (() => void) | (() => void)[];
|
|
390
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
391
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
392
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
393
|
+
};
|
|
394
|
+
$forceUpdate: () => void;
|
|
395
|
+
$nextTick: typeof nextTick;
|
|
396
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
397
|
+
} & Readonly<{
|
|
398
|
+
type: import('..').InputType;
|
|
399
|
+
disabled: boolean;
|
|
400
|
+
loading: boolean;
|
|
401
|
+
invalid: boolean;
|
|
202
402
|
readonly: boolean;
|
|
403
|
+
clearable: boolean;
|
|
203
404
|
}> & Omit<Readonly<import('..').InputProps> & Readonly<{
|
|
204
405
|
onClear?: (() => any) | undefined;
|
|
205
406
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
206
|
-
}>, "focus" | "inputRef" | ("type" | "disabled" | "
|
|
407
|
+
}>, "focus" | "inputRef" | ("type" | "disabled" | "loading" | "invalid" | "readonly" | "clearable")> & import('vue').ShallowUnwrapRef<{
|
|
207
408
|
focus: () => void;
|
|
208
409
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
209
410
|
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
@@ -212,7 +413,7 @@ declare const __VLS_component: import('vue').DefineComponent<SelectProps, {}, {}
|
|
|
212
413
|
end?(_: {}): any;
|
|
213
414
|
};
|
|
214
415
|
}) | null;
|
|
215
|
-
},
|
|
416
|
+
}, any>;
|
|
216
417
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
217
418
|
export default _default;
|
|
218
419
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionKey, Ref, Component } from 'vue';
|
|
2
2
|
import { Placement } from '../../composables';
|
|
3
|
-
export type SelectSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
3
|
+
export type SelectSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
export type SelectVariant = 'outline' | 'filled' | 'underline';
|
|
5
5
|
export interface SelectOptionData {
|
|
6
6
|
value: string;
|
|
@@ -17,6 +17,8 @@ export interface SelectProps {
|
|
|
17
17
|
searchable?: boolean;
|
|
18
18
|
clearable?: boolean;
|
|
19
19
|
disabled?: boolean;
|
|
20
|
+
/** Whether the select is read-only (can't be changed but still focusable) */
|
|
21
|
+
readonly?: boolean;
|
|
20
22
|
invalid?: boolean;
|
|
21
23
|
size?: SelectSize;
|
|
22
24
|
variant?: SelectVariant;
|
|
@@ -25,6 +27,8 @@ export interface SelectProps {
|
|
|
25
27
|
filterFn?: (query: string, option: SelectOptionData) => boolean;
|
|
26
28
|
loading?: boolean;
|
|
27
29
|
emptyMessage?: string;
|
|
30
|
+
/** Text shown while loading */
|
|
31
|
+
loadingMessage?: string;
|
|
28
32
|
/** Placement of the dropdown relative to the trigger */
|
|
29
33
|
placement?: Placement;
|
|
30
34
|
/** Positioning strategy for the dropdown */
|
|
@@ -43,6 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<SidebarProps, {}, {
|
|
|
43
43
|
onMobileClose?: (() => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
variant: SidebarVariant;
|
|
46
|
+
storageKey: string;
|
|
46
47
|
expandedWidth: number;
|
|
47
48
|
collapsedWidth: number;
|
|
48
49
|
mobileBreakpoint: number;
|
|
@@ -50,7 +51,6 @@ declare const __VLS_component: import('vue').DefineComponent<SidebarProps, {}, {
|
|
|
50
51
|
hoverExpandDelay: number;
|
|
51
52
|
hoverCollapseDelay: number;
|
|
52
53
|
persistState: boolean;
|
|
53
|
-
storageKey: string;
|
|
54
54
|
showTrigger: boolean;
|
|
55
55
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
56
56
|
desktopNavRef: HTMLElement;
|
|
@@ -25,7 +25,6 @@ declare const __VLS_component: import('vue').DefineComponent<TabsProps, {}, {},
|
|
|
25
25
|
hashNavigation: boolean;
|
|
26
26
|
hashPrefix: string;
|
|
27
27
|
showScrollArrows: boolean;
|
|
28
|
-
disableContainerQuery: boolean;
|
|
29
28
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
30
29
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
30
|
export default _default;
|
|
@@ -4,7 +4,7 @@ import { IconKey } from '../../icons/registry';
|
|
|
4
4
|
export type IconProp = IconKey | Component;
|
|
5
5
|
export type TabsVariant = 'solid' | 'underlined' | 'bordered' | 'light';
|
|
6
6
|
export type TabsColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
7
|
-
export type TabsSize = 'sm' | 'md' | 'lg';
|
|
7
|
+
export type TabsSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
8
|
export type TabsRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
9
9
|
export type TabsPlacement = 'top' | 'bottom' | 'start' | 'end';
|
|
10
10
|
export interface TabData {
|
|
@@ -43,8 +43,6 @@ export interface TabsProps {
|
|
|
43
43
|
hashPrefix?: string;
|
|
44
44
|
/** Show scroll navigation arrows when tabs overflow */
|
|
45
45
|
showScrollArrows?: boolean;
|
|
46
|
-
/** Disable container query on TabList for intrinsic sizing support */
|
|
47
|
-
disableContainerQuery?: boolean;
|
|
48
46
|
}
|
|
49
47
|
export interface TabListProps {
|
|
50
48
|
/** Accessible label for the tab list */
|
|
@@ -91,8 +89,6 @@ export interface TabsContext {
|
|
|
91
89
|
fullWidth: Ref<boolean>;
|
|
92
90
|
/** Show scroll navigation arrows when tabs overflow */
|
|
93
91
|
showScrollArrows: Ref<boolean>;
|
|
94
|
-
/** Disable container query on TabList */
|
|
95
|
-
disableContainerQuery: Ref<boolean>;
|
|
96
92
|
/** Registered tabs data for cursor positioning */
|
|
97
93
|
registeredTabs: Ref<Map<string, TabData>>;
|
|
98
94
|
/** Tab keys in registration order */
|
|
@@ -14,8 +14,8 @@ declare const _default: import('vue').DefineComponent<TimeInputProps, {}, {}, {}
|
|
|
14
14
|
placement: import('../..').Placement;
|
|
15
15
|
placeholder: string;
|
|
16
16
|
invalid: boolean;
|
|
17
|
-
clearable: boolean;
|
|
18
17
|
readonly: boolean;
|
|
18
|
+
clearable: boolean;
|
|
19
19
|
strategy: "absolute" | "fixed";
|
|
20
20
|
mode: import('./types').TimeInputMode;
|
|
21
21
|
format: import('./types').TimeInputFormat;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Placement } from '../../composables';
|
|
2
|
-
export type TimeInputSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export type TimeInputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
3
|
export type TimeInputVariant = 'outline' | 'filled' | 'underline';
|
|
4
4
|
export type TimeInputFormat = '12' | '24';
|
|
5
5
|
export type TimeInputMode = 'columns' | 'presets';
|
|
@@ -15,3 +15,6 @@ export * from './useListbox';
|
|
|
15
15
|
export * from './useComponentDefaults';
|
|
16
16
|
export { useComponentAs, INERTIA_LINK_KEY, ROUTER_LINK_KEY } from './useComponentAs';
|
|
17
17
|
export * from './useOverlayRegistry';
|
|
18
|
+
export * from './useMobilePopover';
|
|
19
|
+
export * from './useDarkMode';
|
|
20
|
+
export * from './useTheme';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useDarkMode, type UseDarkModeOptions, type UseDarkModeReturn } from './useDarkMode';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export interface UseDarkModeOptions {
|
|
3
|
+
/** Storage key for persisting preference */
|
|
4
|
+
storageKey?: string;
|
|
5
|
+
/** Initial value (defaults to system preference) */
|
|
6
|
+
initialValue?: boolean;
|
|
7
|
+
/** Selector for the element to apply dark class */
|
|
8
|
+
selector?: string;
|
|
9
|
+
/** CSS class to apply for dark mode */
|
|
10
|
+
darkClass?: string;
|
|
11
|
+
/** Whether to listen for system preference changes */
|
|
12
|
+
listenToSystemChanges?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface UseDarkModeReturn {
|
|
15
|
+
/** Reactive dark mode state */
|
|
16
|
+
isDark: Ref<boolean>;
|
|
17
|
+
/** Toggle dark mode on/off */
|
|
18
|
+
toggle: () => void;
|
|
19
|
+
/** Set dark mode explicitly */
|
|
20
|
+
set: (value: boolean) => void;
|
|
21
|
+
/** Clear stored preference and follow system */
|
|
22
|
+
clearPreference: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Composable for managing dark mode with system preference detection and localStorage persistence.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```vue
|
|
29
|
+
* <script setup>
|
|
30
|
+
* import { useDarkMode } from '@sabrenski/spire-ui-vue'
|
|
31
|
+
*
|
|
32
|
+
* const { isDark, toggle } = useDarkMode()
|
|
33
|
+
* </script>
|
|
34
|
+
*
|
|
35
|
+
* <template>
|
|
36
|
+
* <button @click="toggle">
|
|
37
|
+
* {{ isDark ? 'Light Mode' : 'Dark Mode' }}
|
|
38
|
+
* </button>
|
|
39
|
+
* </template>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function useDarkMode(options?: UseDarkModeOptions): UseDarkModeReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useMobilePopover, MOBILE_BREAKPOINT } from './useMobilePopover';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const MOBILE_BREAKPOINT = 640;
|
|
2
|
+
/**
|
|
3
|
+
* Composable for detecting mobile viewport for popover positioning.
|
|
4
|
+
* Uses matchMedia for efficient viewport detection with proper cleanup.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useMobilePopover(): {
|
|
7
|
+
isMobile: Readonly<import('vue').Ref<boolean, boolean>>;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useTheme, type UseThemeOptions, type UseThemeReturn, type ThemeScheme } from './useTheme';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
export type ThemeScheme = 'default' | 'ocean' | 'forest' | 'sunset' | 'rose' | 'midnight';
|
|
3
|
+
export interface UseThemeOptions {
|
|
4
|
+
/** Storage key for persisting preference */
|
|
5
|
+
storageKey?: string;
|
|
6
|
+
/** Initial color scheme */
|
|
7
|
+
initialScheme?: ThemeScheme;
|
|
8
|
+
/** Selector for the element to apply theme class */
|
|
9
|
+
selector?: string;
|
|
10
|
+
/** Custom schemes to include (in addition to built-in ones) */
|
|
11
|
+
customSchemes?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface UseThemeReturn {
|
|
14
|
+
/** All available scheme names */
|
|
15
|
+
schemes: ComputedRef<ThemeScheme[]>;
|
|
16
|
+
/** Current active scheme */
|
|
17
|
+
currentScheme: Ref<ThemeScheme>;
|
|
18
|
+
/** Set the color scheme */
|
|
19
|
+
setScheme: (scheme: ThemeScheme) => void;
|
|
20
|
+
/** Clear stored preference and reset to default */
|
|
21
|
+
clearPreference: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Composable for managing color scheme themes with localStorage persistence.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```vue
|
|
28
|
+
* <script setup>
|
|
29
|
+
* import { useTheme } from '@sabrenski/spire-ui-vue'
|
|
30
|
+
*
|
|
31
|
+
* const { schemes, currentScheme, setScheme } = useTheme()
|
|
32
|
+
* </script>
|
|
33
|
+
*
|
|
34
|
+
* <template>
|
|
35
|
+
* <select v-model="currentScheme">
|
|
36
|
+
* <option v-for="scheme in schemes" :key="scheme" :value="scheme">
|
|
37
|
+
* {{ scheme }}
|
|
38
|
+
* </option>
|
|
39
|
+
* </select>
|
|
40
|
+
* </template>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function useTheme(options?: UseThemeOptions): UseThemeReturn;
|