@myghf/ui 0.2.0 → 0.3.0
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 +121 -4
- package/dist/components/alert/Alert.vue.d.ts +46 -0
- package/dist/components/alert/Alert.vue.d.ts.map +1 -0
- package/dist/components/button/Button.vue.d.ts +4 -4
- package/dist/components/button/Button.vue.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +24 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.vue.d.ts +54 -0
- package/dist/components/drawer/Drawer.vue.d.ts.map +1 -0
- package/dist/components/input-number/InputNumber.vue.d.ts +31 -0
- package/dist/components/input-number/InputNumber.vue.d.ts.map +1 -0
- package/dist/components/tag/Tag.vue.d.ts +4 -28
- package/dist/components/tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/theme-toggle/ThemeToggle.vue.d.ts +10 -0
- package/dist/components/theme-toggle/ThemeToggle.vue.d.ts.map +1 -0
- package/dist/components/toast/Toast.vue.d.ts +12 -0
- package/dist/components/toast/Toast.vue.d.ts.map +1 -0
- package/dist/components/toast/Toaster.vue.d.ts +33 -0
- package/dist/components/toast/Toaster.vue.d.ts.map +1 -0
- package/dist/components/toast/useToast.d.ts +44 -0
- package/dist/components/toast/useToast.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1285 -418
- package/dist/index.js.map +1 -1
- package/dist/lib/date.d.ts +7 -0
- package/dist/lib/date.d.ts.map +1 -1
- package/dist/lib/locale.d.ts +6 -0
- package/dist/lib/locale.d.ts.map +1 -0
- package/dist/lib/number.d.ts +16 -0
- package/dist/lib/number.d.ts.map +1 -0
- package/dist/lib/theme.d.ts +36 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/lib/tones.d.ts +9 -0
- package/dist/lib/tones.d.ts.map +1 -0
- package/dist/tailwindPreset.js +1 -0
- package/dist/tokens.css +13 -0
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -71,11 +71,86 @@ import { Button, Input, DataTable } from '@myghf/ui'
|
|
|
71
71
|
|
|
72
72
|
| Area | Exports |
|
|
73
73
|
| --- | --- |
|
|
74
|
-
| Actions & display | `Button`, `Tag`, `Icon` |
|
|
75
|
-
|
|
|
76
|
-
|
|
|
74
|
+
| Actions & display | `Button`, `Tag`, `Icon`, `ThemeToggle`, `Alert`, `Message` |
|
|
75
|
+
| Feedback | `Toaster`, `useToast`, `createToastStore` |
|
|
76
|
+
| Form controls | `Input`, `InputNumber`, `Textarea`, `Password`, `Checkbox`, `Select`, `SelectButton`, `DatePicker`, `TreeSelect` |
|
|
77
|
+
| Navigation & overlays | `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent`, `Dialog`, `Drawer`, `DropdownMenu`, `DropdownMenuTrigger`, `DropdownMenuContent`, `DropdownMenuItem` |
|
|
77
78
|
| Data | `Table`, `TableHeader`, `TableBody`, `TableRow`, `TableHead`, `TableCell`, `TableEmpty`, `TablePagination`, `DataTable`, `TreeTable`, `TransferList` |
|
|
78
|
-
| Utilities & types | `cn`, date helpers, `toPascalCase`, `resolveIconName`, `TagTone`, `DataTableFeatures`, `TreeTableColumn`, `TreeNode`, `FlatTreeRow`, `CheckedState` |
|
|
79
|
+
| Utilities & types | `cn`, date and locale helpers, `toNumberOrNull`, `mergeFormatOptions`, `toPascalCase`, `resolveIconName`, `toneClasses`, `useTheme`, `createTheme`, `toastKey`, `TagTone`, `Tone`, `AlertVariant`, `DatePickerLabels`, `DrawerPosition`, `DrawerSize`, `ThemeMode`, `ToastSeverity`, `ToastPosition`, `DataTableFeatures`, `TreeTableColumn`, `TreeNode`, `FlatTreeRow`, `CheckedState` |
|
|
80
|
+
|
|
81
|
+
### Component examples
|
|
82
|
+
|
|
83
|
+
**Toasts** — mount one `<Toaster>` near the root and call `useToast()` from a descendant setup:
|
|
84
|
+
|
|
85
|
+
```vue
|
|
86
|
+
<!-- App.vue -->
|
|
87
|
+
<template>
|
|
88
|
+
<Toaster position="top-end" :max="4" />
|
|
89
|
+
<SaveButton />
|
|
90
|
+
</template>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```vue
|
|
94
|
+
<!-- SaveButton.vue -->
|
|
95
|
+
<script setup lang="ts">
|
|
96
|
+
import { useToast } from '@myghf/ui'
|
|
97
|
+
|
|
98
|
+
const toast = useToast() // setup-only; requires an ancestor <Toaster />
|
|
99
|
+
toast.success('Saved', 'Your changes were saved.')
|
|
100
|
+
toast.add({ title: 'Uploading…', severity: 'info', duration: 0 }) // 0 = persistent
|
|
101
|
+
</script>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`useToast()` throws unless a `<Toaster>` is mounted above the calling component. Positions are
|
|
105
|
+
logical (`top-start`…`bottom-end`, default `top-end`); severities are `info`, `success`, `warning`,
|
|
106
|
+
`danger`, `secondary`. For tests or a pre-seeded queue, build a store with `createToastStore()` and
|
|
107
|
+
pass it via `<Toaster :store="store">`.
|
|
108
|
+
|
|
109
|
+
**Alert / Message** — the same component under two names, sharing Tag's tones:
|
|
110
|
+
|
|
111
|
+
```vue
|
|
112
|
+
<Alert tone="success" title="Payment received" description="Receipt sent by email." show-icon />
|
|
113
|
+
<Message tone="danger" variant="outline" closable @close="dismissed = true">Something failed.</Message>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Tones: `info` (default), `success`, `warning`, `danger`, `secondary`; `variant` is `soft` (default)
|
|
117
|
+
or `outline`. Pass `duration` (ms) to auto-dismiss, pausable on hover/focus; `0`/omitted is
|
|
118
|
+
persistent.
|
|
119
|
+
|
|
120
|
+
**InputNumber** — numeric `v-model` that emits `number | null`:
|
|
121
|
+
|
|
122
|
+
```vue
|
|
123
|
+
<InputNumber v-model="amount" :min="0" :max="100" :step="5" integer show-buttons />
|
|
124
|
+
<InputNumber v-model="price" currency="USD" locale="en-US" prefix="$" />
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Empty input emits `null`. Supports `min`/`max`/`step`/`stepSnapping`/`integer`, `locale`,
|
|
128
|
+
`formatOptions`/`currency`, `prefix`/`suffix`, `showButtons`, and `size`; reka's input renders
|
|
129
|
+
`role="spinbutton"` with `aria-roledescription`, `aria-valuenow`, `aria-valuemin`, and `aria-valuemax`
|
|
130
|
+
(via the underlying `NumberFieldInput`).
|
|
131
|
+
|
|
132
|
+
**Drawer** — controlled via `v-model:open`:
|
|
133
|
+
|
|
134
|
+
```vue
|
|
135
|
+
<Drawer v-model:open="open" position="end" size="md" title="Filters">
|
|
136
|
+
<p>Drawer body</p>
|
|
137
|
+
<template #footer><Button @click="open = false">Done</Button></template>
|
|
138
|
+
</Drawer>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Positions: `left`, `right` (default), `top`, `bottom`, plus logical `start`/`end` that mirror them
|
|
142
|
+
and flip in RTL. Sizes: `sm`, `md`, `lg`, `full`. Also supports `backdrop`, `closeOnEscape`,
|
|
143
|
+
`closeOnOutside`, `showClose`, and `preventScroll`.
|
|
144
|
+
|
|
145
|
+
> **Drawer caveat:** `preventScroll: false` only takes effect with `backdrop: false`; when a
|
|
146
|
+
> backdrop is shown, reka's overlay owns the body scroll lock.
|
|
147
|
+
|
|
148
|
+
**DatePicker i18n/time** — `DatePicker` accepts `hourFormat` (`'12' | '24'`, default `'24'`),
|
|
149
|
+
`minuteStep` (default `1`), `locale` (BCP-47, default runtime locale), `labels` (partial overrides
|
|
150
|
+
for `placeholder`, `previousMonth`, `nextMonth`, `clear`, `apply`, `today`, `time`, `hour`,
|
|
151
|
+
`minute`, `am`, `pm`), `weekStartsOn`, and `defaultOpen`. Month and weekday headers and the display
|
|
152
|
+
text are locale-formatted, and the nav chevrons flip in RTL. Override individual labels with
|
|
153
|
+
`label-<key>` slots.
|
|
79
154
|
|
|
80
155
|
### Entry points
|
|
81
156
|
|
|
@@ -100,6 +175,48 @@ Override any `--myghf-*` variable after importing `tokens.css`:
|
|
|
100
175
|
Do not hard-code hex values in component code — use the tokens or the Tailwind classes. See
|
|
101
176
|
[DESIGN.md](./DESIGN.md) for the full palette and rules.
|
|
102
177
|
|
|
178
|
+
### Dark mode
|
|
179
|
+
|
|
180
|
+
The preset sets `darkMode: ['class', '.dark']`, and importing `@myghf/ui/tokens.css` ships a dark
|
|
181
|
+
token block under both `[data-theme='dark']` and `.dark`. It overrides **only** the six semantic
|
|
182
|
+
variables; the brand colour scales are unchanged, so your own `--myghf-*` overrides still apply in
|
|
183
|
+
dark mode:
|
|
184
|
+
|
|
185
|
+
```css
|
|
186
|
+
/* shipped by tokens.css */
|
|
187
|
+
[data-theme='dark'],
|
|
188
|
+
.dark {
|
|
189
|
+
color-scheme: dark;
|
|
190
|
+
--myghf-background: 15 18 23;
|
|
191
|
+
--myghf-foreground: 243 244 246;
|
|
192
|
+
--myghf-surface: 26 30 37;
|
|
193
|
+
--myghf-surface-muted: 39 44 53;
|
|
194
|
+
--myghf-border: 55 61 71;
|
|
195
|
+
--myghf-muted: 156 163 175;
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Use `useTheme()` — a shared singleton — or `createTheme()` for an independent controller:
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
import { useTheme } from '@myghf/ui'
|
|
203
|
+
|
|
204
|
+
const { mode, resolved, isDark, setMode, toggle, enable, disable, reset } = useTheme()
|
|
205
|
+
// defaults: storageKey 'myghf-theme', attribute 'both', defaultMode 'system'
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
```vue
|
|
209
|
+
<ThemeToggle />
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
`useTheme` follows the OS preference when `mode` is `'system'`, persists explicit choices to
|
|
213
|
+
`localStorage`, and writes **both** `.dark` and `data-theme="dark"` on `<html>` (`attribute: 'both'`).
|
|
214
|
+
`createTheme()` accepts the same options and returns an isolated instance.
|
|
215
|
+
|
|
216
|
+
> **Caveat:** Tailwind `dark:` utilities only activate under the `.dark` class. Setting
|
|
217
|
+
> `data-theme="dark"` by hand drives the token block but **not** `dark:` utilities. `useTheme` sets
|
|
218
|
+
> both so they always agree — if you apply the theme yourself, add `class="dark"` as well.
|
|
219
|
+
|
|
103
220
|
## Bilingual & RTL
|
|
104
221
|
|
|
105
222
|
Wrap RTL content with `dir="rtl"` and the Arabic font:
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Tone } from '../../lib/tones';
|
|
2
|
+
export type AlertVariant = 'soft' | 'outline';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
tone?: Tone;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
showIcon?: boolean;
|
|
9
|
+
closable?: boolean;
|
|
10
|
+
duration?: number;
|
|
11
|
+
closeLabel?: string;
|
|
12
|
+
variant?: AlertVariant;
|
|
13
|
+
};
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
slots: {
|
|
17
|
+
icon?(_: {}): any;
|
|
18
|
+
title?(_: {}): any;
|
|
19
|
+
description?(_: {}): any;
|
|
20
|
+
default?(_: {}): any;
|
|
21
|
+
actions?(_: {}): any;
|
|
22
|
+
close?(_: {}): any;
|
|
23
|
+
};
|
|
24
|
+
refs: {};
|
|
25
|
+
rootEl: any;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
28
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
close: () => any;
|
|
30
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
onClose?: (() => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
variant: AlertVariant;
|
|
34
|
+
tone: Tone;
|
|
35
|
+
showIcon: boolean;
|
|
36
|
+
closable: boolean;
|
|
37
|
+
closeLabel: string;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=Alert.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.vue.d.ts","sourceRoot":"","sources":["../../../src/components/alert/Alert.vue"],"names":[],"mappings":"AA0KA,OAAO,EAAe,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAGxD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,CAAA;AAE7C,KAAK,WAAW,GAAG;IACf,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB,CAAC;AA+GJ,iBAAS,cAAc;WA8FT,OAAO,IAA6B;;sBAfxB,GAAG;uBACF,GAAG;6BACG,GAAG;yBACP,GAAG;yBACH,GAAG;uBACJ,GAAG;;;;EAe9B;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;aAxOP,YAAY;UARf,IAAI;cAIA,OAAO;cACP,OAAO;gBAEL,MAAM;6EAiPrB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -14,7 +14,7 @@ declare const buttonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
14
14
|
icon: string;
|
|
15
15
|
'icon-sm': string;
|
|
16
16
|
};
|
|
17
|
-
}, undefined, "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 data-[loading=true]:cursor-not-allowed", {
|
|
17
|
+
}, undefined, "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 data-[loading=true]:cursor-not-allowed", {
|
|
18
18
|
variant: {
|
|
19
19
|
default: string;
|
|
20
20
|
secondary: string;
|
|
@@ -44,7 +44,7 @@ declare const buttonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
44
44
|
icon: string;
|
|
45
45
|
'icon-sm': string;
|
|
46
46
|
};
|
|
47
|
-
}, undefined, "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 data-[loading=true]:cursor-not-allowed", unknown, unknown, undefined>>;
|
|
47
|
+
}, undefined, "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 data-[loading=true]:cursor-not-allowed", unknown, unknown, undefined>>;
|
|
48
48
|
type __VLS_Props = {
|
|
49
49
|
variant?: VariantProps<typeof buttonVariants>['variant'];
|
|
50
50
|
size?: VariantProps<typeof buttonVariants>['size'];
|
|
@@ -64,9 +64,9 @@ declare function __VLS_template(): {
|
|
|
64
64
|
};
|
|
65
65
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
66
66
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
67
|
-
size: "
|
|
67
|
+
size: "sm" | "default" | "lg" | "icon" | "icon-sm";
|
|
68
68
|
type: "button" | "submit" | "reset";
|
|
69
|
-
variant: "
|
|
69
|
+
variant: "secondary" | "default" | "destructive" | "outline" | "ghost";
|
|
70
70
|
disabled: boolean;
|
|
71
71
|
loading: boolean;
|
|
72
72
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.vue.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.vue"],"names":[],"mappings":"AAyDA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEzD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Button.vue.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.vue"],"names":[],"mappings":"AAyDA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEzD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2ZAmBlB,CAAA;AAEF,KAAK,WAAW,GAAG;IACf,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,SAAS,CAAC,CAAA;IACxD,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;IAClD,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAYJ,iBAAS,cAAc;WAqCT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;UAxEV,QAAQ,GAAG,QAAQ,GAAG,OAAO;;cACzB,OAAO;aACR,OAAO;2FA8EnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +1,32 @@
|
|
|
1
|
+
export interface DatePickerLabels {
|
|
2
|
+
placeholder: string;
|
|
3
|
+
previousMonth: string;
|
|
4
|
+
nextMonth: string;
|
|
5
|
+
clear: string;
|
|
6
|
+
apply: string;
|
|
7
|
+
today: string;
|
|
8
|
+
time: string;
|
|
9
|
+
hour: string;
|
|
10
|
+
minute: string;
|
|
11
|
+
am: string;
|
|
12
|
+
pm: string;
|
|
13
|
+
}
|
|
1
14
|
type __VLS_Props = {
|
|
2
15
|
mode?: 'date' | 'range' | 'datetime';
|
|
3
16
|
modelValue?: Date | [Date, Date] | null;
|
|
17
|
+
/** @deprecated Prefer `labels.placeholder`; kept for the existing trigger API. */
|
|
4
18
|
placeholder?: string;
|
|
5
19
|
disabled?: boolean;
|
|
6
20
|
invalid?: boolean;
|
|
7
21
|
size?: 'sm' | 'default';
|
|
8
22
|
/** Applied to the trigger button so an external <label for> still matches. */
|
|
9
23
|
inputId?: string;
|
|
24
|
+
hourFormat?: '12' | '24';
|
|
25
|
+
minuteStep?: number;
|
|
26
|
+
locale?: string;
|
|
27
|
+
labels?: Partial<DatePickerLabels>;
|
|
28
|
+
weekStartsOn?: number;
|
|
29
|
+
defaultOpen?: boolean;
|
|
10
30
|
};
|
|
11
31
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
32
|
"update:modelValue": (value: Date | [Date, Date] | null) => any;
|
|
@@ -15,7 +35,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
15
35
|
}>, {
|
|
16
36
|
size: "sm" | "default";
|
|
17
37
|
mode: "date" | "range" | "datetime";
|
|
18
|
-
|
|
38
|
+
locale: string;
|
|
39
|
+
defaultOpen: boolean;
|
|
40
|
+
hourFormat: "12" | "24";
|
|
41
|
+
minuteStep: number;
|
|
19
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
43
|
export default _default;
|
|
21
44
|
//# sourceMappingURL=DatePicker.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.vue"],"names":[],"mappings":"AAwdA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;CACX;AA2ED,KAAK,WAAW,GAAG;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;IACpC,UAAU,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAA;IACvC,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACvB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;;;;;UATO,IAAI,GAAG,SAAS;UANhB,MAAM,GAAG,OAAO,GAAG,UAAU;YAW3B,MAAM;iBAGD,OAAO;gBALR,IAAI,GAAG,IAAI;gBACX,MAAM;;AAmgBvB,wBASG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type DrawerPosition = 'left' | 'right' | 'top' | 'bottom' | 'start' | 'end';
|
|
2
|
+
export type DrawerSize = 'sm' | 'md' | 'lg' | 'full';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
position?: DrawerPosition;
|
|
6
|
+
size?: DrawerSize;
|
|
7
|
+
backdrop?: boolean;
|
|
8
|
+
closeOnEscape?: boolean;
|
|
9
|
+
closeOnOutside?: boolean;
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
showClose?: boolean;
|
|
13
|
+
preventScroll?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
trigger?(_: {}): any;
|
|
19
|
+
header?(_: {}): any;
|
|
20
|
+
description?(_: {}): any;
|
|
21
|
+
close?(_: {}): any;
|
|
22
|
+
default?(_: {}): any;
|
|
23
|
+
footer?(_: {}): any;
|
|
24
|
+
};
|
|
25
|
+
refs: {};
|
|
26
|
+
rootEl: any;
|
|
27
|
+
};
|
|
28
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
+
close: () => any;
|
|
31
|
+
open: () => any;
|
|
32
|
+
"update:open": (value: boolean) => any;
|
|
33
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
onClose?: (() => any) | undefined;
|
|
35
|
+
onOpen?: (() => any) | undefined;
|
|
36
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
size: DrawerSize;
|
|
39
|
+
position: DrawerPosition;
|
|
40
|
+
open: boolean;
|
|
41
|
+
backdrop: boolean;
|
|
42
|
+
closeOnEscape: boolean;
|
|
43
|
+
closeOnOutside: boolean;
|
|
44
|
+
showClose: boolean;
|
|
45
|
+
preventScroll: boolean;
|
|
46
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
47
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
48
|
+
export default _default;
|
|
49
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=Drawer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/Drawer.vue"],"names":[],"mappings":"AAmLA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;AAClF,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;AAEpD,KAAK,WAAW,GAAG;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAC;AAiFJ,iBAAS,cAAc;WAmNT,OAAO,IAA6B;;yBAfpB,GAAG;wBACJ,GAAG;6BACE,GAAG;uBACT,GAAG;yBACD,GAAG;wBACJ,GAAG;;;;EAe/B;AA0BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;UA5UV,UAAU;cADN,cAAc;UADlB,OAAO;cAGH,OAAO;mBACF,OAAO;oBACN,OAAO;eAGZ,OAAO;mBACH,OAAO;6EA8UzB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: number | null;
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
step?: number;
|
|
6
|
+
stepSnapping?: boolean;
|
|
7
|
+
integer?: boolean;
|
|
8
|
+
locale?: string;
|
|
9
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
10
|
+
currency?: string;
|
|
11
|
+
prefix?: string;
|
|
12
|
+
suffix?: string;
|
|
13
|
+
showButtons?: boolean;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
readonly?: boolean;
|
|
17
|
+
invalid?: boolean;
|
|
18
|
+
size?: 'sm' | 'default' | 'lg';
|
|
19
|
+
id?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
"update:modelValue": (value: number | null) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
"onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
size: "sm" | "default" | "lg";
|
|
28
|
+
step: number;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
export default _default;
|
|
31
|
+
//# sourceMappingURL=InputNumber.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputNumber.vue.d.ts","sourceRoot":"","sources":["../../../src/components/input-number/InputNumber.vue"],"names":[],"mappings":"AAgIA,KAAK,WAAW,GAAG;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAA;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC;;;;;;UAHO,IAAI,GAAG,SAAS,GAAG,IAAI;UAbvB,MAAM;;AA+NjB,wBAQG"}
|
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const tagVariants: import('tailwind-variants').TVReturnType<{
|
|
3
|
-
tone: {
|
|
4
|
-
info: string;
|
|
5
|
-
success: string;
|
|
6
|
-
warning: string;
|
|
7
|
-
danger: string;
|
|
8
|
-
secondary: string;
|
|
9
|
-
};
|
|
10
|
-
}, undefined, "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", {
|
|
11
|
-
tone: {
|
|
12
|
-
info: string;
|
|
13
|
-
success: string;
|
|
14
|
-
warning: string;
|
|
15
|
-
danger: string;
|
|
16
|
-
secondary: string;
|
|
17
|
-
};
|
|
18
|
-
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
19
|
-
tone: {
|
|
20
|
-
info: string;
|
|
21
|
-
success: string;
|
|
22
|
-
warning: string;
|
|
23
|
-
danger: string;
|
|
24
|
-
secondary: string;
|
|
25
|
-
};
|
|
26
|
-
}, undefined, "inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", unknown, unknown, undefined>>;
|
|
1
|
+
import { Tone } from '../../lib/tones';
|
|
27
2
|
type __VLS_Props = {
|
|
28
|
-
tone?:
|
|
3
|
+
tone?: Tone;
|
|
29
4
|
icon?: string;
|
|
30
5
|
removable?: boolean;
|
|
31
6
|
removeLabel?: string;
|
|
32
7
|
};
|
|
33
|
-
export type TagTone =
|
|
8
|
+
export type TagTone = Tone;
|
|
34
9
|
declare function __VLS_template(): {
|
|
35
10
|
attrs: Partial<{}>;
|
|
36
11
|
slots: {
|
|
@@ -45,6 +20,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
45
20
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
46
21
|
onRemove?: (() => any) | undefined;
|
|
47
22
|
}>, {
|
|
23
|
+
tone: Tone;
|
|
48
24
|
removeLabel: string;
|
|
49
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
50
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/tag/Tag.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/tag/Tag.vue"],"names":[],"mappings":"AA2CA,OAAO,EAAe,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAGxD,KAAK,WAAW,GAAG;IACf,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;AASJ,MAAM,MAAM,OAAO,GAAG,IAAI,CACzB;AAID,iBAAS,cAAc;WA4DT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;UAlGV,IAAI;iBAGG,MAAM;yFAwGtB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
size?: 'sm' | 'default' | 'lg';
|
|
3
|
+
label?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
size: "sm" | "default" | "lg";
|
|
7
|
+
label: string;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=ThemeToggle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/theme-toggle/ThemeToggle.vue"],"names":[],"mappings":"AAiDA,KAAK,WAAW,GAAG;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;UAFO,IAAI,GAAG,SAAS,GAAG,IAAI;WACtB,MAAM;;AA2FlB,wBAQG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToastItem } from './useToast';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
item: ToastItem;
|
|
4
|
+
duration: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
close: () => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onClose?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=Toast.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.vue.d.ts","sourceRoot":"","sources":["../../../src/components/toast/Toast.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,YAAY,CAAA;AAE1D,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAC;;;;;;AAuMF,wBAQG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ToastPosition, ToastStore } from './useToast';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
position?: ToastPosition;
|
|
4
|
+
max?: number;
|
|
5
|
+
duration?: number;
|
|
6
|
+
gap?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
store?: ToastStore;
|
|
9
|
+
};
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
+
label: string;
|
|
21
|
+
max: number;
|
|
22
|
+
duration: number;
|
|
23
|
+
position: ToastPosition;
|
|
24
|
+
gap: string;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=Toaster.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toaster.vue.d.ts","sourceRoot":"","sources":["../../../src/components/toast/Toaster.vue"],"names":[],"mappings":"AA+EA,OAAO,EAA8B,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAA;AAG5F,KAAK,WAAW,GAAG;IACf,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAC;AA+CJ,iBAAS,cAAc;WAsFT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WA7JT,MAAM;SAHR,MAAM;cACD,MAAM;cAFN,aAAa;SAGlB,MAAM;6EAsKd,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
|
+
export type ToastSeverity = 'info' | 'success' | 'warning' | 'danger' | 'secondary';
|
|
3
|
+
export type ToastPosition = 'top-start' | 'top-center' | 'top-end' | 'bottom-start' | 'bottom-center' | 'bottom-end';
|
|
4
|
+
export interface ToastAction {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface ToastOptions {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
severity?: ToastSeverity;
|
|
12
|
+
duration?: number;
|
|
13
|
+
position?: ToastPosition;
|
|
14
|
+
closable?: boolean;
|
|
15
|
+
icon?: string;
|
|
16
|
+
action?: ToastAction;
|
|
17
|
+
}
|
|
18
|
+
export interface ToastItem extends ToastOptions {
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ToastStoreOptions {
|
|
22
|
+
max?: number;
|
|
23
|
+
duration?: number;
|
|
24
|
+
position?: ToastPosition;
|
|
25
|
+
}
|
|
26
|
+
export interface ToastStore {
|
|
27
|
+
/** All toasts, including those queued past `max`. */
|
|
28
|
+
items: Ref<ToastItem[]>;
|
|
29
|
+
/** The `max` most recent toasts, oldest first. */
|
|
30
|
+
visible: ComputedRef<ToastItem[]>;
|
|
31
|
+
add: (options: ToastOptions) => string;
|
|
32
|
+
remove: (id: string) => void;
|
|
33
|
+
clear: () => void;
|
|
34
|
+
info: (title: string, description?: string) => string;
|
|
35
|
+
success: (title: string, description?: string) => string;
|
|
36
|
+
warning: (title: string, description?: string) => string;
|
|
37
|
+
danger: (title: string, description?: string) => string;
|
|
38
|
+
secondary: (title: string, description?: string) => string;
|
|
39
|
+
}
|
|
40
|
+
/** Injection key for the toast store provided by `<Toaster />`. */
|
|
41
|
+
export declare const toastKey: InjectionKey<ToastStore>;
|
|
42
|
+
export declare function createToastStore(options?: ToastStoreOptions): ToastStore;
|
|
43
|
+
export declare function useToast(): ToastStore;
|
|
44
|
+
//# sourceMappingURL=useToast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../../src/components/toast/useToast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAE1F,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAA;AAEnF,MAAM,MAAM,aAAa,GACrB,WAAW,GAAG,YAAY,GAAG,SAAS,GACtC,cAAc,GAAG,eAAe,GAAG,YAAY,CAAA;AAEnD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,C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,CAMrC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
export { cn } from './lib/cn';
|
|
2
2
|
export * from './lib/date';
|
|
3
|
+
export * from './lib/locale';
|
|
4
|
+
export { toNumberOrNull, mergeFormatOptions } from './lib/number';
|
|
3
5
|
export { toPascalCase, resolveIconName } from './lib/icons';
|
|
6
|
+
export { toneClasses } from './lib/tones';
|
|
7
|
+
export type { Tone, ToneClasses } from './lib/tones';
|
|
8
|
+
export { useTheme, createTheme } from './lib/theme';
|
|
9
|
+
export type { ThemeMode, UseThemeOptions, UseThemeReturn, ThemeAttribute } from './lib/theme';
|
|
10
|
+
export { default as ThemeToggle } from './components/theme-toggle/ThemeToggle.vue';
|
|
4
11
|
export { default as Icon } from './components/icon/Icon.vue';
|
|
5
12
|
export { default as Button } from './components/button/Button.vue';
|
|
6
13
|
export { default as Input } from './components/input/Input.vue';
|
|
14
|
+
export { default as InputNumber } from './components/input-number/InputNumber.vue';
|
|
7
15
|
export { default as Textarea } from './components/textarea/Textarea.vue';
|
|
8
16
|
export { default as Password } from './components/password/Password.vue';
|
|
9
17
|
export { default as Checkbox } from './components/checkbox/Checkbox.vue';
|
|
10
18
|
export { default as Tag } from './components/tag/Tag.vue';
|
|
11
19
|
export type { TagTone } from './components/tag/Tag.vue';
|
|
20
|
+
export { default as Alert } from './components/alert/Alert.vue';
|
|
21
|
+
export { default as Message } from './components/alert/Alert.vue';
|
|
22
|
+
export type { AlertVariant } from './components/alert/Alert.vue';
|
|
12
23
|
export { default as Tabs } from './components/tabs/Tabs.vue';
|
|
13
24
|
export { default as TabsList } from './components/tabs/TabsList.vue';
|
|
14
25
|
export { default as TabsTrigger } from './components/tabs/TabsTrigger.vue';
|
|
@@ -16,7 +27,10 @@ export { default as TabsContent } from './components/tabs/TabsContent.vue';
|
|
|
16
27
|
export { default as Select } from './components/select/Select.vue';
|
|
17
28
|
export { default as SelectButton } from './components/select-button/SelectButton.vue';
|
|
18
29
|
export { default as DatePicker } from './components/date-picker/DatePicker.vue';
|
|
30
|
+
export type { DatePickerLabels } from './components/date-picker/DatePicker.vue';
|
|
19
31
|
export { default as Dialog } from './components/dialog/Dialog.vue';
|
|
32
|
+
export { default as Drawer } from './components/drawer/Drawer.vue';
|
|
33
|
+
export type { DrawerPosition, DrawerSize } from './components/drawer/Drawer.vue';
|
|
20
34
|
export { default as DropdownMenu } from './components/dropdown-menu/DropdownMenu.vue';
|
|
21
35
|
export { default as DropdownMenuTrigger } from './components/dropdown-menu/DropdownMenuTrigger.vue';
|
|
22
36
|
export { default as DropdownMenuContent } from './components/dropdown-menu/DropdownMenuContent.vue';
|
|
@@ -36,4 +50,7 @@ export { default as TreeTable } from './components/tree-table/TreeTable.vue';
|
|
|
36
50
|
export type { TreeTableColumn } from './components/tree-table/TreeTable.vue';
|
|
37
51
|
export type { TreeNode, FlatTreeRow, CheckedState } from './lib/tree';
|
|
38
52
|
export { default as TreeSelect } from './components/tree-select/TreeSelect.vue';
|
|
53
|
+
export { default as Toaster } from './components/toast/Toaster.vue';
|
|
54
|
+
export { createToastStore, useToast, toastKey } from './components/toast/useToast';
|
|
55
|
+
export type { ToastSeverity, ToastPosition, ToastAction, ToastOptions, ToastItem, ToastStore, ToastStoreOptions, } from './components/toast/useToast';
|
|
39
56
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,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