sv5ui 0.0.1

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.
Files changed (144) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +124 -0
  3. package/dist/Alert/Alert.svelte +120 -0
  4. package/dist/Alert/Alert.svelte.d.ts +5 -0
  5. package/dist/Alert/alert.types.d.ts +99 -0
  6. package/dist/Alert/alert.types.js +1 -0
  7. package/dist/Alert/alert.variants.d.ts +213 -0
  8. package/dist/Alert/alert.variants.js +293 -0
  9. package/dist/Alert/index.d.ts +2 -0
  10. package/dist/Alert/index.js +1 -0
  11. package/dist/Avatar/Avatar.svelte +70 -0
  12. package/dist/Avatar/Avatar.svelte.d.ts +6 -0
  13. package/dist/Avatar/avatar.types.d.ts +40 -0
  14. package/dist/Avatar/avatar.types.js +1 -0
  15. package/dist/Avatar/avatar.variants.d.ts +178 -0
  16. package/dist/Avatar/avatar.variants.js +28 -0
  17. package/dist/Avatar/index.d.ts +2 -0
  18. package/dist/Avatar/index.js +1 -0
  19. package/dist/AvatarGroup/AvatarGroup.svelte +66 -0
  20. package/dist/AvatarGroup/AvatarGroup.svelte.d.ts +5 -0
  21. package/dist/AvatarGroup/avatar-group.types.d.ts +34 -0
  22. package/dist/AvatarGroup/avatar-group.types.js +1 -0
  23. package/dist/AvatarGroup/avatar-group.variants.d.ts +173 -0
  24. package/dist/AvatarGroup/avatar-group.variants.js +45 -0
  25. package/dist/AvatarGroup/index.d.ts +2 -0
  26. package/dist/AvatarGroup/index.js +1 -0
  27. package/dist/Badge/Badge.svelte +74 -0
  28. package/dist/Badge/Badge.svelte.d.ts +5 -0
  29. package/dist/Badge/badge.types.d.ts +74 -0
  30. package/dist/Badge/badge.types.js +1 -0
  31. package/dist/Badge/badge.variants.d.ts +303 -0
  32. package/dist/Badge/badge.variants.js +245 -0
  33. package/dist/Badge/index.d.ts +2 -0
  34. package/dist/Badge/index.js +1 -0
  35. package/dist/Button/Button.svelte +103 -0
  36. package/dist/Button/Button.svelte.d.ts +6 -0
  37. package/dist/Button/button.types.d.ts +97 -0
  38. package/dist/Button/button.types.js +1 -0
  39. package/dist/Button/button.variants.d.ts +388 -0
  40. package/dist/Button/button.variants.js +461 -0
  41. package/dist/Button/index.d.ts +2 -0
  42. package/dist/Button/index.js +1 -0
  43. package/dist/Card/Card.svelte +53 -0
  44. package/dist/Card/Card.svelte.d.ts +5 -0
  45. package/dist/Card/card.types.d.ts +32 -0
  46. package/dist/Card/card.types.js +1 -0
  47. package/dist/Card/card.variants.d.ts +108 -0
  48. package/dist/Card/card.variants.js +32 -0
  49. package/dist/Card/index.d.ts +2 -0
  50. package/dist/Card/index.js +1 -0
  51. package/dist/Chip/Chip.svelte +50 -0
  52. package/dist/Chip/Chip.svelte.d.ts +5 -0
  53. package/dist/Chip/chip.types.d.ts +62 -0
  54. package/dist/Chip/chip.types.js +1 -0
  55. package/dist/Chip/chip.variants.d.ts +328 -0
  56. package/dist/Chip/chip.variants.js +58 -0
  57. package/dist/Chip/index.d.ts +2 -0
  58. package/dist/Chip/index.js +1 -0
  59. package/dist/Container/Container.svelte +27 -0
  60. package/dist/Container/Container.svelte.d.ts +5 -0
  61. package/dist/Container/container.types.d.ts +19 -0
  62. package/dist/Container/container.types.js +1 -0
  63. package/dist/Container/container.variants.d.ts +29 -0
  64. package/dist/Container/container.variants.js +9 -0
  65. package/dist/Container/index.d.ts +2 -0
  66. package/dist/Container/index.js +1 -0
  67. package/dist/Empty/Empty.svelte +83 -0
  68. package/dist/Empty/Empty.svelte.d.ts +5 -0
  69. package/dist/Empty/empty.types.d.ts +74 -0
  70. package/dist/Empty/empty.types.js +1 -0
  71. package/dist/Empty/empty.variants.d.ts +288 -0
  72. package/dist/Empty/empty.variants.js +364 -0
  73. package/dist/Empty/index.d.ts +2 -0
  74. package/dist/Empty/index.js +1 -0
  75. package/dist/Icon/Icon.svelte +40 -0
  76. package/dist/Icon/Icon.svelte.d.ts +6 -0
  77. package/dist/Icon/icon.types.d.ts +37 -0
  78. package/dist/Icon/icon.types.js +1 -0
  79. package/dist/Icon/index.d.ts +2 -0
  80. package/dist/Icon/index.js +1 -0
  81. package/dist/Kbd/Kbd.svelte +35 -0
  82. package/dist/Kbd/Kbd.svelte.d.ts +5 -0
  83. package/dist/Kbd/index.d.ts +3 -0
  84. package/dist/Kbd/index.js +2 -0
  85. package/dist/Kbd/kbd.types.d.ts +77 -0
  86. package/dist/Kbd/kbd.types.js +1 -0
  87. package/dist/Kbd/kbd.variants.d.ts +118 -0
  88. package/dist/Kbd/kbd.variants.js +96 -0
  89. package/dist/Kbd/useKbd.svelte.d.ts +29 -0
  90. package/dist/Kbd/useKbd.svelte.js +245 -0
  91. package/dist/Link/Link.svelte +117 -0
  92. package/dist/Link/Link.svelte.d.ts +5 -0
  93. package/dist/Link/index.d.ts +2 -0
  94. package/dist/Link/index.js +1 -0
  95. package/dist/Link/link.types.d.ts +68 -0
  96. package/dist/Link/link.types.js +1 -0
  97. package/dist/Link/link.variants.d.ts +138 -0
  98. package/dist/Link/link.variants.js +145 -0
  99. package/dist/Progress/Progress.svelte +89 -0
  100. package/dist/Progress/Progress.svelte.d.ts +6 -0
  101. package/dist/Progress/index.d.ts +2 -0
  102. package/dist/Progress/index.js +1 -0
  103. package/dist/Progress/progress.types.d.ts +63 -0
  104. package/dist/Progress/progress.types.js +1 -0
  105. package/dist/Progress/progress.variants.d.ts +483 -0
  106. package/dist/Progress/progress.variants.js +190 -0
  107. package/dist/Separator/Separator.svelte +67 -0
  108. package/dist/Separator/Separator.svelte.d.ts +6 -0
  109. package/dist/Separator/index.d.ts +2 -0
  110. package/dist/Separator/index.js +1 -0
  111. package/dist/Separator/separator.types.d.ts +48 -0
  112. package/dist/Separator/separator.types.js +1 -0
  113. package/dist/Separator/separator.variants.d.ts +488 -0
  114. package/dist/Separator/separator.variants.js +104 -0
  115. package/dist/Skeleton/Skeleton.svelte +31 -0
  116. package/dist/Skeleton/Skeleton.svelte.d.ts +5 -0
  117. package/dist/Skeleton/index.d.ts +2 -0
  118. package/dist/Skeleton/index.js +1 -0
  119. package/dist/Skeleton/skeleton.types.d.ts +18 -0
  120. package/dist/Skeleton/skeleton.types.js +1 -0
  121. package/dist/Skeleton/skeleton.variants.d.ts +18 -0
  122. package/dist/Skeleton/skeleton.variants.js +12 -0
  123. package/dist/Timeline/Timeline.svelte +106 -0
  124. package/dist/Timeline/Timeline.svelte.d.ts +5 -0
  125. package/dist/Timeline/index.d.ts +2 -0
  126. package/dist/Timeline/index.js +1 -0
  127. package/dist/Timeline/timeline.types.d.ts +130 -0
  128. package/dist/Timeline/timeline.types.js +1 -0
  129. package/dist/Timeline/timeline.variants.d.ts +413 -0
  130. package/dist/Timeline/timeline.variants.js +121 -0
  131. package/dist/User/User.svelte +94 -0
  132. package/dist/User/User.svelte.d.ts +5 -0
  133. package/dist/User/index.d.ts +2 -0
  134. package/dist/User/index.js +1 -0
  135. package/dist/User/user.types.d.ts +74 -0
  136. package/dist/User/user.types.js +1 -0
  137. package/dist/User/user.variants.d.ts +308 -0
  138. package/dist/User/user.variants.js +73 -0
  139. package/dist/config.d.ts +59 -0
  140. package/dist/config.js +94 -0
  141. package/dist/index.d.ts +19 -0
  142. package/dist/index.js +20 -0
  143. package/dist/theme.css +410 -0
  144. package/package.json +104 -0
@@ -0,0 +1,32 @@
1
+ import { tv } from 'tailwind-variants';
2
+ export const cardVariants = tv({
3
+ slots: {
4
+ root: 'rounded-lg overflow-hidden',
5
+ header: 'p-4 sm:px-6',
6
+ body: 'p-4 sm:p-6',
7
+ footer: 'p-4 sm:px-6'
8
+ },
9
+ variants: {
10
+ variant: {
11
+ solid: {
12
+ root: 'bg-inverse-surface text-inverse-on-surface'
13
+ },
14
+ outline: {
15
+ root: 'bg-surface ring ring-outline-variant divide-y divide-outline-variant'
16
+ },
17
+ soft: {
18
+ root: 'bg-surface-container divide-y divide-outline-variant'
19
+ },
20
+ subtle: {
21
+ root: 'bg-surface-container ring ring-outline-variant divide-y divide-outline-variant'
22
+ }
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ variant: 'outline'
27
+ }
28
+ });
29
+ export const cardDefaults = {
30
+ defaultVariants: cardVariants.defaultVariants,
31
+ slots: {}
32
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Card } from './Card.svelte';
2
+ export type { CardProps } from './card.types.js';
@@ -0,0 +1 @@
1
+ export { default as Card } from './Card.svelte';
@@ -0,0 +1,50 @@
1
+ <script lang="ts" module>
2
+ import type { ChipProps } from './chip.types.js'
3
+
4
+ export type Props = ChipProps
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import { chipVariants, chipDefaults } from './chip.variants.js'
9
+ import { getComponentConfig } from '../config.js'
10
+
11
+ const config = getComponentConfig('chip', chipDefaults)
12
+
13
+ let {
14
+ as = 'div',
15
+ ui,
16
+ text,
17
+ color = config.defaultVariants.color,
18
+ size = config.defaultVariants.size,
19
+ position = config.defaultVariants.position,
20
+ inset = false,
21
+ standalone = false,
22
+ show = true,
23
+ class: className,
24
+ children,
25
+ content,
26
+ ...restProps
27
+ }: Props = $props()
28
+
29
+ const classes = $derived.by(() => {
30
+ const slots = chipVariants({ color, size, position, inset, standalone })
31
+ return {
32
+ root: slots.root({ class: [config.slots.root, className, ui?.root] }),
33
+ base: slots.base({ class: [config.slots.base, ui?.base] })
34
+ }
35
+ })
36
+ </script>
37
+
38
+ <svelte:element this={as} class={classes.root} {...restProps}>
39
+ {@render children?.()}
40
+
41
+ {#if show}
42
+ <span class={classes.base}>
43
+ {#if content}
44
+ {@render content()}
45
+ {:else if text !== undefined}
46
+ {text}
47
+ {/if}
48
+ </span>
49
+ {/if}
50
+ </svelte:element>
@@ -0,0 +1,5 @@
1
+ import type { ChipProps } from './chip.types.js';
2
+ export type Props = ChipProps;
3
+ declare const Chip: import("svelte").Component<ChipProps, {}, "">;
4
+ type Chip = ReturnType<typeof Chip>;
5
+ export default Chip;
@@ -0,0 +1,62 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { ClassNameValue } from 'tailwind-merge';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { ChipVariantProps, ChipSlots } from './chip.variants.js';
5
+ export type ChipProps = Omit<HTMLAttributes<HTMLElement>, 'class'> & {
6
+ /**
7
+ * The HTML element to render as.
8
+ * @default 'div'
9
+ */
10
+ as?: keyof HTMLElementTagNameMap;
11
+ /**
12
+ * Override styles for specific chip slots.
13
+ */
14
+ ui?: Partial<Record<ChipSlots, ClassNameValue>>;
15
+ /**
16
+ * Text or number displayed inside the chip.
17
+ */
18
+ text?: string | number;
19
+ /**
20
+ * Sets the color scheme applied to the chip.
21
+ * @default 'primary'
22
+ */
23
+ color?: NonNullable<ChipVariantProps['color']>;
24
+ /**
25
+ * Controls the dimensions of the chip.
26
+ * @default 'md'
27
+ */
28
+ size?: NonNullable<ChipVariantProps['size']>;
29
+ /**
30
+ * Controls the position relative to wrapped content.
31
+ * @default 'top-right'
32
+ */
33
+ position?: NonNullable<ChipVariantProps['position']>;
34
+ /**
35
+ * Keeps the chip inside the component bounds.
36
+ * @default false
37
+ */
38
+ inset?: boolean;
39
+ /**
40
+ * Renders the chip without absolute positioning.
41
+ * @default false
42
+ */
43
+ standalone?: boolean;
44
+ /**
45
+ * Controls the visibility of the chip.
46
+ * @default true
47
+ */
48
+ show?: boolean;
49
+ /**
50
+ * Additional CSS classes for the root element.
51
+ */
52
+ class?: ClassNameValue;
53
+ /**
54
+ * Content to wrap with the chip indicator.
55
+ */
56
+ children?: Snippet;
57
+ /**
58
+ * Custom content rendered inside the chip.
59
+ * Takes precedence over text.
60
+ */
61
+ content?: Snippet;
62
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,328 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ export declare const chipVariants: import("tailwind-variants").TVReturnType<{
3
+ color: {
4
+ primary: {
5
+ base: string;
6
+ };
7
+ secondary: {
8
+ base: string;
9
+ };
10
+ tertiary: {
11
+ base: string;
12
+ };
13
+ success: {
14
+ base: string;
15
+ };
16
+ warning: {
17
+ base: string;
18
+ };
19
+ error: {
20
+ base: string;
21
+ };
22
+ info: {
23
+ base: string;
24
+ };
25
+ surface: {
26
+ base: string;
27
+ };
28
+ };
29
+ size: {
30
+ '3xs': string;
31
+ '2xs': string;
32
+ xs: string;
33
+ sm: string;
34
+ md: string;
35
+ lg: string;
36
+ xl: string;
37
+ '2xl': string;
38
+ '3xl': string;
39
+ };
40
+ position: {
41
+ 'top-right': {
42
+ base: string;
43
+ };
44
+ 'bottom-right': {
45
+ base: string;
46
+ };
47
+ 'top-left': {
48
+ base: string;
49
+ };
50
+ 'bottom-left': {
51
+ base: string;
52
+ };
53
+ };
54
+ inset: {
55
+ false: {};
56
+ };
57
+ standalone: {
58
+ true: {};
59
+ false: {
60
+ base: string;
61
+ };
62
+ };
63
+ }, {
64
+ root: string;
65
+ base: string;
66
+ }, undefined, {
67
+ color: {
68
+ primary: {
69
+ base: string;
70
+ };
71
+ secondary: {
72
+ base: string;
73
+ };
74
+ tertiary: {
75
+ base: string;
76
+ };
77
+ success: {
78
+ base: string;
79
+ };
80
+ warning: {
81
+ base: string;
82
+ };
83
+ error: {
84
+ base: string;
85
+ };
86
+ info: {
87
+ base: string;
88
+ };
89
+ surface: {
90
+ base: string;
91
+ };
92
+ };
93
+ size: {
94
+ '3xs': string;
95
+ '2xs': string;
96
+ xs: string;
97
+ sm: string;
98
+ md: string;
99
+ lg: string;
100
+ xl: string;
101
+ '2xl': string;
102
+ '3xl': string;
103
+ };
104
+ position: {
105
+ 'top-right': {
106
+ base: string;
107
+ };
108
+ 'bottom-right': {
109
+ base: string;
110
+ };
111
+ 'top-left': {
112
+ base: string;
113
+ };
114
+ 'bottom-left': {
115
+ base: string;
116
+ };
117
+ };
118
+ inset: {
119
+ false: {};
120
+ };
121
+ standalone: {
122
+ true: {};
123
+ false: {
124
+ base: string;
125
+ };
126
+ };
127
+ }, {
128
+ root: string;
129
+ base: string;
130
+ }, import("tailwind-variants").TVReturnType<{
131
+ color: {
132
+ primary: {
133
+ base: string;
134
+ };
135
+ secondary: {
136
+ base: string;
137
+ };
138
+ tertiary: {
139
+ base: string;
140
+ };
141
+ success: {
142
+ base: string;
143
+ };
144
+ warning: {
145
+ base: string;
146
+ };
147
+ error: {
148
+ base: string;
149
+ };
150
+ info: {
151
+ base: string;
152
+ };
153
+ surface: {
154
+ base: string;
155
+ };
156
+ };
157
+ size: {
158
+ '3xs': string;
159
+ '2xs': string;
160
+ xs: string;
161
+ sm: string;
162
+ md: string;
163
+ lg: string;
164
+ xl: string;
165
+ '2xl': string;
166
+ '3xl': string;
167
+ };
168
+ position: {
169
+ 'top-right': {
170
+ base: string;
171
+ };
172
+ 'bottom-right': {
173
+ base: string;
174
+ };
175
+ 'top-left': {
176
+ base: string;
177
+ };
178
+ 'bottom-left': {
179
+ base: string;
180
+ };
181
+ };
182
+ inset: {
183
+ false: {};
184
+ };
185
+ standalone: {
186
+ true: {};
187
+ false: {
188
+ base: string;
189
+ };
190
+ };
191
+ }, {
192
+ root: string;
193
+ base: string;
194
+ }, undefined, unknown, unknown, undefined>>;
195
+ export type ChipVariantProps = VariantProps<typeof chipVariants>;
196
+ export type ChipSlots = keyof ReturnType<typeof chipVariants>;
197
+ export declare const chipDefaults: {
198
+ defaultVariants: import("tailwind-variants").TVDefaultVariants<{
199
+ color: {
200
+ primary: {
201
+ base: string;
202
+ };
203
+ secondary: {
204
+ base: string;
205
+ };
206
+ tertiary: {
207
+ base: string;
208
+ };
209
+ success: {
210
+ base: string;
211
+ };
212
+ warning: {
213
+ base: string;
214
+ };
215
+ error: {
216
+ base: string;
217
+ };
218
+ info: {
219
+ base: string;
220
+ };
221
+ surface: {
222
+ base: string;
223
+ };
224
+ };
225
+ size: {
226
+ '3xs': string;
227
+ '2xs': string;
228
+ xs: string;
229
+ sm: string;
230
+ md: string;
231
+ lg: string;
232
+ xl: string;
233
+ '2xl': string;
234
+ '3xl': string;
235
+ };
236
+ position: {
237
+ 'top-right': {
238
+ base: string;
239
+ };
240
+ 'bottom-right': {
241
+ base: string;
242
+ };
243
+ 'top-left': {
244
+ base: string;
245
+ };
246
+ 'bottom-left': {
247
+ base: string;
248
+ };
249
+ };
250
+ inset: {
251
+ false: {};
252
+ };
253
+ standalone: {
254
+ true: {};
255
+ false: {
256
+ base: string;
257
+ };
258
+ };
259
+ }, {
260
+ root: string;
261
+ base: string;
262
+ }, {
263
+ color: {
264
+ primary: {
265
+ base: string;
266
+ };
267
+ secondary: {
268
+ base: string;
269
+ };
270
+ tertiary: {
271
+ base: string;
272
+ };
273
+ success: {
274
+ base: string;
275
+ };
276
+ warning: {
277
+ base: string;
278
+ };
279
+ error: {
280
+ base: string;
281
+ };
282
+ info: {
283
+ base: string;
284
+ };
285
+ surface: {
286
+ base: string;
287
+ };
288
+ };
289
+ size: {
290
+ '3xs': string;
291
+ '2xs': string;
292
+ xs: string;
293
+ sm: string;
294
+ md: string;
295
+ lg: string;
296
+ xl: string;
297
+ '2xl': string;
298
+ '3xl': string;
299
+ };
300
+ position: {
301
+ 'top-right': {
302
+ base: string;
303
+ };
304
+ 'bottom-right': {
305
+ base: string;
306
+ };
307
+ 'top-left': {
308
+ base: string;
309
+ };
310
+ 'bottom-left': {
311
+ base: string;
312
+ };
313
+ };
314
+ inset: {
315
+ false: {};
316
+ };
317
+ standalone: {
318
+ true: {};
319
+ false: {
320
+ base: string;
321
+ };
322
+ };
323
+ }, {
324
+ root: string;
325
+ base: string;
326
+ }>;
327
+ slots: Partial<Record<ChipSlots, string>>;
328
+ };
@@ -0,0 +1,58 @@
1
+ import { tv } from 'tailwind-variants';
2
+ export const chipVariants = tv({
3
+ slots: {
4
+ root: 'relative inline-flex items-center justify-center shrink-0',
5
+ base: 'rounded-full ring ring-surface flex items-center justify-center font-medium whitespace-nowrap'
6
+ },
7
+ variants: {
8
+ color: {
9
+ primary: { base: 'bg-primary text-on-primary' },
10
+ secondary: { base: 'bg-secondary text-on-secondary' },
11
+ tertiary: { base: 'bg-tertiary text-on-tertiary' },
12
+ success: { base: 'bg-success text-on-success' },
13
+ warning: { base: 'bg-warning text-on-warning' },
14
+ error: { base: 'bg-error text-on-error' },
15
+ info: { base: 'bg-info text-on-info' },
16
+ surface: { base: 'bg-inverse-surface text-inverse-on-surface' }
17
+ },
18
+ size: {
19
+ '3xs': 'h-[4px] min-w-[4px] text-[4px]',
20
+ '2xs': 'h-[5px] min-w-[5px] text-[5px]',
21
+ xs: 'h-[6px] min-w-[6px] text-[6px]',
22
+ sm: 'h-[7px] min-w-[7px] text-[7px]',
23
+ md: 'h-[8px] min-w-[8px] text-[8px]',
24
+ lg: 'h-[9px] min-w-[9px] text-[9px]',
25
+ xl: 'h-[10px] min-w-[10px] text-[10px]',
26
+ '2xl': 'h-[11px] min-w-[11px] text-[11px]',
27
+ '3xl': 'h-[12px] min-w-[12px] text-[12px]'
28
+ },
29
+ position: {
30
+ 'top-right': { base: 'top-0 right-0' },
31
+ 'bottom-right': { base: 'bottom-0 right-0' },
32
+ 'top-left': { base: 'top-0 left-0' },
33
+ 'bottom-left': { base: 'bottom-0 left-0' }
34
+ },
35
+ inset: {
36
+ false: {}
37
+ },
38
+ standalone: {
39
+ true: {},
40
+ false: { base: 'absolute' }
41
+ }
42
+ },
43
+ compoundVariants: [
44
+ { position: 'top-right', inset: false, class: { base: '-translate-y-1/2 translate-x-1/2' } },
45
+ { position: 'bottom-right', inset: false, class: { base: 'translate-y-1/2 translate-x-1/2' } },
46
+ { position: 'top-left', inset: false, class: { base: '-translate-y-1/2 -translate-x-1/2' } },
47
+ { position: 'bottom-left', inset: false, class: { base: 'translate-y-1/2 -translate-x-1/2' } }
48
+ ],
49
+ defaultVariants: {
50
+ size: 'md',
51
+ color: 'primary',
52
+ position: 'top-right'
53
+ }
54
+ });
55
+ export const chipDefaults = {
56
+ defaultVariants: chipVariants.defaultVariants,
57
+ slots: {}
58
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Chip } from './Chip.svelte';
2
+ export type { ChipProps } from './chip.types.js';
@@ -0,0 +1 @@
1
+ export { default as Chip } from './Chip.svelte';
@@ -0,0 +1,27 @@
1
+ <script lang="ts" module>
2
+ import type { ContainerProps } from './container.types.js'
3
+
4
+ export type Props = ContainerProps
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import { containerVariants, containerDefaults } from './container.variants.js'
9
+ import { getComponentConfig } from '../config.js'
10
+
11
+ const config = getComponentConfig('container', containerDefaults)
12
+ const slots = containerVariants()
13
+
14
+ let {
15
+ as = 'div',
16
+ ui,
17
+ class: className,
18
+ children,
19
+ ...restProps
20
+ }: Props = $props()
21
+
22
+ const rootClass = $derived(slots.root({ class: [config.slots.root, className, ui?.root] }))
23
+ </script>
24
+
25
+ <svelte:element this={as} class={rootClass} {...restProps}>
26
+ {@render children?.()}
27
+ </svelte:element>
@@ -0,0 +1,5 @@
1
+ import type { ContainerProps } from './container.types.js';
2
+ export type Props = ContainerProps;
3
+ declare const Container: import("svelte").Component<ContainerProps, {}, "">;
4
+ type Container = ReturnType<typeof Container>;
5
+ export default Container;
@@ -0,0 +1,19 @@
1
+ import type { HTMLAttributes } from 'svelte/elements';
2
+ import type { ClassNameValue } from 'tailwind-merge';
3
+ import type { ContainerSlots } from './container.variants.js';
4
+ export type ContainerProps = Omit<HTMLAttributes<HTMLElement>, 'class'> & {
5
+ /**
6
+ * Sets the HTML element type to render.
7
+ * @default 'div'
8
+ */
9
+ as?: keyof HTMLElementTagNameMap;
10
+ /**
11
+ * Additional CSS classes for the root element.
12
+ */
13
+ class?: ClassNameValue;
14
+ /**
15
+ * Override styles for specific container slots.
16
+ * Available slots: root.
17
+ */
18
+ ui?: Partial<Record<ContainerSlots, ClassNameValue>>;
19
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ export declare const containerVariants: import("tailwind-variants").TVReturnType<{
2
+ [key: string]: {
3
+ [key: string]: import("tailwind-merge").ClassNameValue | {
4
+ root?: import("tailwind-merge").ClassNameValue;
5
+ };
6
+ };
7
+ } | {
8
+ [x: string]: {
9
+ [x: string]: import("tailwind-merge").ClassNameValue | {
10
+ root?: import("tailwind-merge").ClassNameValue;
11
+ };
12
+ };
13
+ } | {}, {
14
+ root: string;
15
+ }, undefined, {
16
+ [key: string]: {
17
+ [key: string]: import("tailwind-merge").ClassNameValue | {
18
+ root?: import("tailwind-merge").ClassNameValue;
19
+ };
20
+ };
21
+ } | {}, {
22
+ root: string;
23
+ }, import("tailwind-variants").TVReturnType<unknown, {
24
+ root: string;
25
+ }, undefined, unknown, unknown, undefined>>;
26
+ export type ContainerSlots = keyof ReturnType<typeof containerVariants>;
27
+ export declare const containerDefaults: {
28
+ slots: Partial<Record<ContainerSlots, string>>;
29
+ };
@@ -0,0 +1,9 @@
1
+ import { tv } from 'tailwind-variants';
2
+ export const containerVariants = tv({
3
+ slots: {
4
+ root: 'w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8'
5
+ }
6
+ });
7
+ export const containerDefaults = {
8
+ slots: {}
9
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Container } from './Container.svelte';
2
+ export type { ContainerProps } from './container.types.js';
@@ -0,0 +1 @@
1
+ export { default as Container } from './Container.svelte';