sv5ui 1.3.0 → 1.4.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 +16 -11
- package/dist/Collapsible/Collapsible.svelte +69 -0
- package/dist/Collapsible/Collapsible.svelte.d.ts +6 -0
- package/dist/Collapsible/CollapsibleTestWrapper.svelte +17 -0
- package/dist/Collapsible/CollapsibleTestWrapper.svelte.d.ts +4 -0
- package/dist/Collapsible/collapsible.types.d.ts +75 -0
- package/dist/Collapsible/collapsible.types.js +1 -0
- package/dist/Collapsible/collapsible.variants.d.ts +53 -0
- package/dist/Collapsible/collapsible.variants.js +21 -0
- package/dist/Collapsible/index.d.ts +2 -0
- package/dist/Collapsible/index.js +1 -0
- package/dist/Command/Command.svelte +183 -0
- package/dist/Command/Command.svelte.d.ts +6 -0
- package/dist/Command/CommandTestWrapper.svelte +13 -0
- package/dist/Command/CommandTestWrapper.svelte.d.ts +4 -0
- package/dist/Command/command.types.d.ts +98 -0
- package/dist/Command/command.types.js +1 -0
- package/dist/Command/command.variants.d.ts +226 -0
- package/dist/Command/command.variants.js +86 -0
- package/dist/Command/index.d.ts +2 -0
- package/dist/Command/index.js +1 -0
- package/dist/Select/select.variants.js +1 -1
- package/dist/SelectMenu/select-menu.variants.js +1 -1
- package/dist/Toast/Toaster.svelte +618 -0
- package/dist/Toast/Toaster.svelte.d.ts +5 -0
- package/dist/Toast/index.d.ts +4 -0
- package/dist/Toast/index.js +2 -0
- package/dist/Toast/toast.d.ts +38 -0
- package/dist/Toast/toast.js +73 -0
- package/dist/Toast/toast.types.d.ts +19 -0
- package/dist/Toast/toast.types.js +1 -0
- package/dist/Toast/toast.variants.d.ts +7 -0
- package/dist/Toast/toast.variants.js +5 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/theme.css +36 -0
- package/package.json +2 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
export declare const commandVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
xs: {
|
|
5
|
+
inputIcon: string;
|
|
6
|
+
input: string;
|
|
7
|
+
inputWrapper: string;
|
|
8
|
+
item: string;
|
|
9
|
+
itemIcon: string;
|
|
10
|
+
groupHeading: string;
|
|
11
|
+
empty: string;
|
|
12
|
+
loading: string;
|
|
13
|
+
};
|
|
14
|
+
sm: {
|
|
15
|
+
inputIcon: string;
|
|
16
|
+
input: string;
|
|
17
|
+
inputWrapper: string;
|
|
18
|
+
item: string;
|
|
19
|
+
itemIcon: string;
|
|
20
|
+
groupHeading: string;
|
|
21
|
+
empty: string;
|
|
22
|
+
loading: string;
|
|
23
|
+
};
|
|
24
|
+
md: {
|
|
25
|
+
inputIcon: string;
|
|
26
|
+
input: string;
|
|
27
|
+
inputWrapper: string;
|
|
28
|
+
item: string;
|
|
29
|
+
itemIcon: string;
|
|
30
|
+
groupHeading: string;
|
|
31
|
+
empty: string;
|
|
32
|
+
loading: string;
|
|
33
|
+
};
|
|
34
|
+
lg: {
|
|
35
|
+
inputIcon: string;
|
|
36
|
+
input: string;
|
|
37
|
+
inputWrapper: string;
|
|
38
|
+
item: string;
|
|
39
|
+
itemIcon: string;
|
|
40
|
+
groupHeading: string;
|
|
41
|
+
empty: string;
|
|
42
|
+
loading: string;
|
|
43
|
+
};
|
|
44
|
+
xl: {
|
|
45
|
+
inputIcon: string;
|
|
46
|
+
input: string;
|
|
47
|
+
inputWrapper: string;
|
|
48
|
+
item: string;
|
|
49
|
+
itemIcon: string;
|
|
50
|
+
groupHeading: string;
|
|
51
|
+
empty: string;
|
|
52
|
+
loading: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}, {
|
|
56
|
+
root: string;
|
|
57
|
+
inputWrapper: string;
|
|
58
|
+
inputIcon: string;
|
|
59
|
+
input: string;
|
|
60
|
+
list: string;
|
|
61
|
+
empty: string;
|
|
62
|
+
loading: string;
|
|
63
|
+
group: string;
|
|
64
|
+
groupHeading: string;
|
|
65
|
+
groupItems: string;
|
|
66
|
+
separator: string;
|
|
67
|
+
item: string;
|
|
68
|
+
itemIcon: string;
|
|
69
|
+
itemWrapper: string;
|
|
70
|
+
itemLabel: string;
|
|
71
|
+
itemDescription: string;
|
|
72
|
+
itemTrailing: string;
|
|
73
|
+
footer: string;
|
|
74
|
+
}, undefined, {
|
|
75
|
+
size: {
|
|
76
|
+
xs: {
|
|
77
|
+
inputIcon: string;
|
|
78
|
+
input: string;
|
|
79
|
+
inputWrapper: string;
|
|
80
|
+
item: string;
|
|
81
|
+
itemIcon: string;
|
|
82
|
+
groupHeading: string;
|
|
83
|
+
empty: string;
|
|
84
|
+
loading: string;
|
|
85
|
+
};
|
|
86
|
+
sm: {
|
|
87
|
+
inputIcon: string;
|
|
88
|
+
input: string;
|
|
89
|
+
inputWrapper: string;
|
|
90
|
+
item: string;
|
|
91
|
+
itemIcon: string;
|
|
92
|
+
groupHeading: string;
|
|
93
|
+
empty: string;
|
|
94
|
+
loading: string;
|
|
95
|
+
};
|
|
96
|
+
md: {
|
|
97
|
+
inputIcon: string;
|
|
98
|
+
input: string;
|
|
99
|
+
inputWrapper: string;
|
|
100
|
+
item: string;
|
|
101
|
+
itemIcon: string;
|
|
102
|
+
groupHeading: string;
|
|
103
|
+
empty: string;
|
|
104
|
+
loading: string;
|
|
105
|
+
};
|
|
106
|
+
lg: {
|
|
107
|
+
inputIcon: string;
|
|
108
|
+
input: string;
|
|
109
|
+
inputWrapper: string;
|
|
110
|
+
item: string;
|
|
111
|
+
itemIcon: string;
|
|
112
|
+
groupHeading: string;
|
|
113
|
+
empty: string;
|
|
114
|
+
loading: string;
|
|
115
|
+
};
|
|
116
|
+
xl: {
|
|
117
|
+
inputIcon: string;
|
|
118
|
+
input: string;
|
|
119
|
+
inputWrapper: string;
|
|
120
|
+
item: string;
|
|
121
|
+
itemIcon: string;
|
|
122
|
+
groupHeading: string;
|
|
123
|
+
empty: string;
|
|
124
|
+
loading: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
}, {
|
|
128
|
+
root: string;
|
|
129
|
+
inputWrapper: string;
|
|
130
|
+
inputIcon: string;
|
|
131
|
+
input: string;
|
|
132
|
+
list: string;
|
|
133
|
+
empty: string;
|
|
134
|
+
loading: string;
|
|
135
|
+
group: string;
|
|
136
|
+
groupHeading: string;
|
|
137
|
+
groupItems: string;
|
|
138
|
+
separator: string;
|
|
139
|
+
item: string;
|
|
140
|
+
itemIcon: string;
|
|
141
|
+
itemWrapper: string;
|
|
142
|
+
itemLabel: string;
|
|
143
|
+
itemDescription: string;
|
|
144
|
+
itemTrailing: string;
|
|
145
|
+
footer: string;
|
|
146
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
147
|
+
size: {
|
|
148
|
+
xs: {
|
|
149
|
+
inputIcon: string;
|
|
150
|
+
input: string;
|
|
151
|
+
inputWrapper: string;
|
|
152
|
+
item: string;
|
|
153
|
+
itemIcon: string;
|
|
154
|
+
groupHeading: string;
|
|
155
|
+
empty: string;
|
|
156
|
+
loading: string;
|
|
157
|
+
};
|
|
158
|
+
sm: {
|
|
159
|
+
inputIcon: string;
|
|
160
|
+
input: string;
|
|
161
|
+
inputWrapper: string;
|
|
162
|
+
item: string;
|
|
163
|
+
itemIcon: string;
|
|
164
|
+
groupHeading: string;
|
|
165
|
+
empty: string;
|
|
166
|
+
loading: string;
|
|
167
|
+
};
|
|
168
|
+
md: {
|
|
169
|
+
inputIcon: string;
|
|
170
|
+
input: string;
|
|
171
|
+
inputWrapper: string;
|
|
172
|
+
item: string;
|
|
173
|
+
itemIcon: string;
|
|
174
|
+
groupHeading: string;
|
|
175
|
+
empty: string;
|
|
176
|
+
loading: string;
|
|
177
|
+
};
|
|
178
|
+
lg: {
|
|
179
|
+
inputIcon: string;
|
|
180
|
+
input: string;
|
|
181
|
+
inputWrapper: string;
|
|
182
|
+
item: string;
|
|
183
|
+
itemIcon: string;
|
|
184
|
+
groupHeading: string;
|
|
185
|
+
empty: string;
|
|
186
|
+
loading: string;
|
|
187
|
+
};
|
|
188
|
+
xl: {
|
|
189
|
+
inputIcon: string;
|
|
190
|
+
input: string;
|
|
191
|
+
inputWrapper: string;
|
|
192
|
+
item: string;
|
|
193
|
+
itemIcon: string;
|
|
194
|
+
groupHeading: string;
|
|
195
|
+
empty: string;
|
|
196
|
+
loading: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
}, {
|
|
200
|
+
root: string;
|
|
201
|
+
inputWrapper: string;
|
|
202
|
+
inputIcon: string;
|
|
203
|
+
input: string;
|
|
204
|
+
list: string;
|
|
205
|
+
empty: string;
|
|
206
|
+
loading: string;
|
|
207
|
+
group: string;
|
|
208
|
+
groupHeading: string;
|
|
209
|
+
groupItems: string;
|
|
210
|
+
separator: string;
|
|
211
|
+
item: string;
|
|
212
|
+
itemIcon: string;
|
|
213
|
+
itemWrapper: string;
|
|
214
|
+
itemLabel: string;
|
|
215
|
+
itemDescription: string;
|
|
216
|
+
itemTrailing: string;
|
|
217
|
+
footer: string;
|
|
218
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
219
|
+
export type CommandVariantProps = VariantProps<typeof commandVariants>;
|
|
220
|
+
export type CommandSlots = keyof ReturnType<typeof commandVariants>;
|
|
221
|
+
export declare const commandDefaults: {
|
|
222
|
+
defaultVariants: {
|
|
223
|
+
size: NonNullable<CommandVariantProps["size"]>;
|
|
224
|
+
};
|
|
225
|
+
slots: Partial<Record<CommandSlots, string>>;
|
|
226
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
export const commandVariants = tv({
|
|
3
|
+
slots: {
|
|
4
|
+
root: 'flex flex-col overflow-hidden',
|
|
5
|
+
inputWrapper: 'flex items-center border-b border-outline-variant px-3',
|
|
6
|
+
inputIcon: 'mr-2 shrink-0 opacity-50',
|
|
7
|
+
input: 'flex h-12 w-full bg-transparent text-sm outline-none placeholder:text-on-surface-variant/50 disabled:cursor-not-allowed disabled:opacity-50',
|
|
8
|
+
list: 'scroll-py-1 overflow-y-auto overflow-x-hidden scrollbar-thin',
|
|
9
|
+
empty: 'py-6 text-center text-sm text-on-surface-variant',
|
|
10
|
+
loading: 'py-6 text-center text-sm text-on-surface-variant',
|
|
11
|
+
group: 'overflow-hidden p-1',
|
|
12
|
+
groupHeading: 'px-2 py-1.5 text-xs font-semibold text-on-surface-variant',
|
|
13
|
+
groupItems: '',
|
|
14
|
+
separator: '-mx-1 h-px bg-outline-variant',
|
|
15
|
+
item: 'relative flex w-full cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[selected]:bg-surface-container-highest',
|
|
16
|
+
itemIcon: 'size-4 shrink-0',
|
|
17
|
+
itemWrapper: 'flex min-w-0 flex-1 flex-col',
|
|
18
|
+
itemLabel: 'truncate',
|
|
19
|
+
itemDescription: 'truncate text-xs text-on-surface-variant',
|
|
20
|
+
itemTrailing: 'ms-auto flex items-center gap-1',
|
|
21
|
+
footer: 'border-t border-outline-variant p-1'
|
|
22
|
+
},
|
|
23
|
+
variants: {
|
|
24
|
+
size: {
|
|
25
|
+
xs: {
|
|
26
|
+
inputIcon: 'size-3.5',
|
|
27
|
+
input: 'h-9 text-xs',
|
|
28
|
+
inputWrapper: 'px-2',
|
|
29
|
+
item: 'px-1.5 py-1 text-xs gap-1.5',
|
|
30
|
+
itemIcon: 'size-3.5',
|
|
31
|
+
groupHeading: 'px-1.5 py-1 text-[10px]',
|
|
32
|
+
empty: 'py-4 text-xs',
|
|
33
|
+
loading: 'py-4 text-xs'
|
|
34
|
+
},
|
|
35
|
+
sm: {
|
|
36
|
+
inputIcon: 'size-3.5',
|
|
37
|
+
input: 'h-10 text-xs',
|
|
38
|
+
inputWrapper: 'px-2.5',
|
|
39
|
+
item: 'px-1.5 py-1 text-xs gap-1.5',
|
|
40
|
+
itemIcon: 'size-4',
|
|
41
|
+
groupHeading: 'px-1.5 py-1 text-[10px]',
|
|
42
|
+
empty: 'py-5 text-xs',
|
|
43
|
+
loading: 'py-5 text-xs'
|
|
44
|
+
},
|
|
45
|
+
md: {
|
|
46
|
+
inputIcon: 'size-4',
|
|
47
|
+
input: 'h-12 text-sm',
|
|
48
|
+
inputWrapper: 'px-3',
|
|
49
|
+
item: 'px-2 py-1.5 text-sm gap-2',
|
|
50
|
+
itemIcon: 'size-4',
|
|
51
|
+
groupHeading: 'px-2 py-1.5 text-xs',
|
|
52
|
+
empty: 'py-6 text-sm',
|
|
53
|
+
loading: 'py-6 text-sm'
|
|
54
|
+
},
|
|
55
|
+
lg: {
|
|
56
|
+
inputIcon: 'size-5',
|
|
57
|
+
input: 'h-13 text-sm',
|
|
58
|
+
inputWrapper: 'px-3.5',
|
|
59
|
+
item: 'px-2.5 py-2 text-sm gap-2',
|
|
60
|
+
itemIcon: 'size-5',
|
|
61
|
+
groupHeading: 'px-2.5 py-2 text-xs',
|
|
62
|
+
empty: 'py-7 text-sm',
|
|
63
|
+
loading: 'py-7 text-sm'
|
|
64
|
+
},
|
|
65
|
+
xl: {
|
|
66
|
+
inputIcon: 'size-5',
|
|
67
|
+
input: 'h-14 text-base',
|
|
68
|
+
inputWrapper: 'px-4',
|
|
69
|
+
item: 'px-3 py-2 text-base gap-2.5',
|
|
70
|
+
itemIcon: 'size-5',
|
|
71
|
+
groupHeading: 'px-3 py-2 text-sm',
|
|
72
|
+
empty: 'py-8 text-base',
|
|
73
|
+
loading: 'py-8 text-base'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
defaultVariants: {
|
|
78
|
+
size: 'md'
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export const commandDefaults = {
|
|
82
|
+
defaultVariants: {
|
|
83
|
+
size: 'md'
|
|
84
|
+
},
|
|
85
|
+
slots: {}
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Command } from './Command.svelte';
|
|
@@ -26,7 +26,7 @@ export const selectVariants = tv({
|
|
|
26
26
|
'focus:outline-none',
|
|
27
27
|
'overflow-hidden'
|
|
28
28
|
],
|
|
29
|
-
viewport: 'p-1',
|
|
29
|
+
viewport: 'p-1 max-h-60 overflow-y-auto scrollbar-thin',
|
|
30
30
|
group: '',
|
|
31
31
|
groupLabel: 'px-2 py-1.5 text-xs font-semibold text-on-surface-variant',
|
|
32
32
|
item: [
|
|
@@ -14,7 +14,7 @@ export const selectMenuVariants = tv({
|
|
|
14
14
|
'flex flex-col'
|
|
15
15
|
],
|
|
16
16
|
input: 'border-b border-outline-variant',
|
|
17
|
-
viewport: 'p-1 flex-1 overflow-y-auto',
|
|
17
|
+
viewport: 'p-1 flex-1 overflow-y-auto scrollbar-thin',
|
|
18
18
|
empty: 'text-center text-on-surface-variant'
|
|
19
19
|
},
|
|
20
20
|
variants: {
|