sv5ui 1.6.0 → 1.8.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.
Files changed (71) hide show
  1. package/dist/Banner/Banner.svelte +162 -0
  2. package/dist/Banner/Banner.svelte.d.ts +5 -0
  3. package/dist/Banner/banner.types.d.ts +148 -0
  4. package/dist/Banner/banner.types.js +1 -0
  5. package/dist/Banner/banner.variants.d.ts +293 -0
  6. package/dist/Banner/banner.variants.js +86 -0
  7. package/dist/Banner/index.d.ts +2 -0
  8. package/dist/Banner/index.js +1 -0
  9. package/dist/Calendar/Calendar.svelte +48 -6
  10. package/dist/Calendar/calendar.types.d.ts +19 -0
  11. package/dist/Calendar/calendar.variants.js +2 -1
  12. package/dist/Carousel/Carousel.svelte +279 -0
  13. package/dist/Carousel/Carousel.svelte.d.ts +26 -0
  14. package/dist/Carousel/carousel.types.d.ts +242 -0
  15. package/dist/Carousel/carousel.types.js +1 -0
  16. package/dist/Carousel/carousel.variants.d.ts +408 -0
  17. package/dist/Carousel/carousel.variants.js +88 -0
  18. package/dist/Carousel/index.d.ts +2 -0
  19. package/dist/Carousel/index.js +1 -0
  20. package/dist/Editor/Editor.svelte +738 -0
  21. package/dist/Editor/Editor.svelte.d.ts +6 -0
  22. package/dist/Editor/EditorUrlPrompt.svelte +111 -0
  23. package/dist/Editor/EditorUrlPrompt.svelte.d.ts +15 -0
  24. package/dist/Editor/SlashPopup.svelte +67 -0
  25. package/dist/Editor/SlashPopup.svelte.d.ts +9 -0
  26. package/dist/Editor/editor.extensions.d.ts +23 -0
  27. package/dist/Editor/editor.extensions.js +123 -0
  28. package/dist/Editor/editor.schemas.d.ts +4 -0
  29. package/dist/Editor/editor.schemas.js +3 -0
  30. package/dist/Editor/editor.slash.svelte.d.ts +34 -0
  31. package/dist/Editor/editor.slash.svelte.js +273 -0
  32. package/dist/Editor/editor.suggestion.d.ts +7 -0
  33. package/dist/Editor/editor.suggestion.js +142 -0
  34. package/dist/Editor/editor.toolbar.d.ts +11 -0
  35. package/dist/Editor/editor.toolbar.js +212 -0
  36. package/dist/Editor/editor.types.d.ts +347 -0
  37. package/dist/Editor/editor.types.js +1 -0
  38. package/dist/Editor/editor.variants.d.ts +308 -0
  39. package/dist/Editor/editor.variants.js +150 -0
  40. package/dist/Editor/index.d.ts +53 -0
  41. package/dist/Editor/index.js +52 -0
  42. package/dist/FileUpload/FileUpload.svelte +81 -10
  43. package/dist/FileUpload/file-upload.types.d.ts +39 -0
  44. package/dist/FileUpload/index.d.ts +1 -1
  45. package/dist/Modal/Modal.svelte +14 -3
  46. package/dist/Modal/modal.types.d.ts +15 -4
  47. package/dist/Modal/modal.variants.d.ts +110 -20
  48. package/dist/Modal/modal.variants.js +27 -9
  49. package/dist/PinInput/PinInput.svelte +18 -4
  50. package/dist/PinInput/pin-input.types.d.ts +11 -0
  51. package/dist/Select/Select.svelte +98 -28
  52. package/dist/Select/select.types.d.ts +44 -2
  53. package/dist/SelectMenu/SelectMenu.svelte +210 -25
  54. package/dist/SelectMenu/select-menu.types.d.ts +62 -1
  55. package/dist/SelectMenu/select-menu.variants.d.ts +26 -0
  56. package/dist/SelectMenu/select-menu.variants.js +34 -6
  57. package/dist/Slideover/Slideover.svelte +13 -2
  58. package/dist/Slideover/slideover.types.d.ts +14 -3
  59. package/dist/Slideover/slideover.variants.d.ts +85 -5
  60. package/dist/Slideover/slideover.variants.js +42 -12
  61. package/dist/Stepper/Stepper.svelte +292 -0
  62. package/dist/Stepper/Stepper.svelte.d.ts +5 -0
  63. package/dist/Stepper/index.d.ts +2 -0
  64. package/dist/Stepper/index.js +1 -0
  65. package/dist/Stepper/stepper.types.d.ts +223 -0
  66. package/dist/Stepper/stepper.types.js +1 -0
  67. package/dist/Stepper/stepper.variants.d.ts +428 -0
  68. package/dist/Stepper/stepper.variants.js +204 -0
  69. package/dist/index.d.ts +3 -0
  70. package/dist/index.js +3 -0
  71. package/package.json +102 -1
@@ -0,0 +1,242 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { ClassNameValue } from 'tailwind-merge';
3
+ import type { EmblaCarouselType, EmblaOptionsType, EmblaPluginType } from 'embla-carousel';
4
+ import type { CarouselSlots, CarouselVariantProps } from './carousel.variants.js';
5
+ /**
6
+ * Re-export the Embla API type so consumers can type their `bind:api` value
7
+ * without importing `embla-carousel` directly.
8
+ */
9
+ export type CarouselApi = EmblaCarouselType;
10
+ /**
11
+ * Configuration for the autoplay plugin. When `true` the defaults are used;
12
+ * pass an object to override individual settings.
13
+ */
14
+ export interface CarouselAutoplayOptions {
15
+ /** Delay between slides in milliseconds. @default 4000 */
16
+ delay?: number;
17
+ /** Stop the autoplay timer permanently on user interaction. @default true */
18
+ stopOnInteraction?: boolean;
19
+ /** Pause while the pointer is over the carousel. @default false */
20
+ stopOnMouseEnter?: boolean;
21
+ /** Pause while keyboard focus is inside the carousel. @default true */
22
+ stopOnFocusIn?: boolean;
23
+ /** Stop temporarily when the document tab is hidden. @default true */
24
+ stopOnLastSnap?: boolean;
25
+ /** Whether the autoplay should start playing on init. @default true */
26
+ playOnInit?: boolean;
27
+ }
28
+ /**
29
+ * Props passed to the `slide` snippet.
30
+ */
31
+ export interface CarouselSlideSlotProps<T = unknown> {
32
+ /** The current slide item from the `items` array. */
33
+ item: T;
34
+ /** Zero-based slide index. */
35
+ index: number;
36
+ /** Whether this slide is the currently selected one. */
37
+ selected: boolean;
38
+ }
39
+ /**
40
+ * Props passed to the `dot` snippet for custom indicator rendering.
41
+ */
42
+ export interface CarouselDotSlotProps {
43
+ /** Zero-based dot index. */
44
+ index: number;
45
+ /** Whether this dot represents the currently selected slide. */
46
+ selected: boolean;
47
+ /** Imperative helper to jump to this slide. */
48
+ select: () => void;
49
+ }
50
+ /**
51
+ * Props passed to the `prev` / `next` snippets for custom arrow rendering.
52
+ */
53
+ export interface CarouselArrowSlotProps {
54
+ /** Whether the corresponding direction can scroll (false at boundaries when `loop=false`). */
55
+ canScroll: boolean;
56
+ /** Imperative helper to trigger the scroll. */
57
+ scroll: () => void;
58
+ }
59
+ /**
60
+ * Props for the Carousel component.
61
+ *
62
+ * @example
63
+ * ```svelte
64
+ * <Carousel items={images} loop autoplay>
65
+ * {#snippet slide({ item })}
66
+ * <img src={item.url} alt={item.alt} />
67
+ * {/snippet}
68
+ * </Carousel>
69
+ * ```
70
+ *
71
+ * @see https://www.embla-carousel.com/
72
+ */
73
+ export interface CarouselProps<T = unknown> {
74
+ /**
75
+ * Bindable reference to the root DOM element.
76
+ */
77
+ ref?: HTMLElement | null;
78
+ /**
79
+ * Bindable Embla API. Use it to control the carousel imperatively, e.g.
80
+ * `api.scrollTo(3)` or `api.plugins().autoplay.stop()`.
81
+ */
82
+ api?: EmblaCarouselType;
83
+ /**
84
+ * Array of items to render as slides. If omitted, pass slide elements as
85
+ * `children` instead.
86
+ */
87
+ items?: T[];
88
+ /**
89
+ * Currently selected slide index (zero-based). Supports two-way binding.
90
+ * @default 0
91
+ */
92
+ index?: number;
93
+ /**
94
+ * Callback fired when the selected slide changes.
95
+ */
96
+ onIndexChange?: (index: number) => void;
97
+ /**
98
+ * Callback fired when the carousel settles after a scroll.
99
+ */
100
+ onSettle?: (api: EmblaCarouselType) => void;
101
+ /**
102
+ * Number of slides visible at once. Acts as a default that can be
103
+ * overridden via `ui.slide` or responsive `breakpoints`.
104
+ * @default 1
105
+ */
106
+ slidesToShow?: number;
107
+ /**
108
+ * Wrap around to the first slide after the last (and vice versa).
109
+ * @default false
110
+ */
111
+ loop?: boolean;
112
+ /**
113
+ * Alignment of slides within the viewport.
114
+ * @default 'start'
115
+ */
116
+ align?: 'start' | 'center' | 'end';
117
+ /**
118
+ * Layout axis.
119
+ * @default 'horizontal'
120
+ */
121
+ orientation?: 'horizontal' | 'vertical';
122
+ /**
123
+ * Allow pointer/touch dragging to scroll between slides.
124
+ * @default true
125
+ */
126
+ draggable?: boolean;
127
+ /**
128
+ * Allow free-form dragging without snapping to slides.
129
+ * @default false
130
+ */
131
+ dragFree?: boolean;
132
+ /**
133
+ * Number of slides to advance per scroll action ('auto' lets Embla decide
134
+ * based on viewport size).
135
+ * @default 1
136
+ */
137
+ slidesToScroll?: number | 'auto';
138
+ /**
139
+ * Enable autoplay. Pass `true` for defaults or an object to customize.
140
+ * @default false
141
+ */
142
+ autoplay?: boolean | CarouselAutoplayOptions;
143
+ /**
144
+ * Use a fade transition between slides instead of sliding.
145
+ * @default false
146
+ */
147
+ fade?: boolean;
148
+ /**
149
+ * Apply Embla's helper class names (`is-snapped`, `is-in-view`,
150
+ * `is-prev`, `is-next`, `is-selected`, `is-draggable`, `is-dragging`).
151
+ * Useful for advanced styling.
152
+ * @default false
153
+ */
154
+ classNames?: boolean;
155
+ /**
156
+ * Responsive overrides keyed by media query. Each value is a partial Embla
157
+ * options object that applies when the media query matches.
158
+ *
159
+ * @example
160
+ * ```ts
161
+ * { '(min-width: 768px)': { slidesToScroll: 2 } }
162
+ * ```
163
+ */
164
+ breakpoints?: Record<string, Omit<EmblaOptionsType, 'breakpoints'>>;
165
+ /**
166
+ * Additional Embla plugins. Use this to plug in `auto-scroll`, `wheel-gestures`,
167
+ * or any third-party Embla plugin not covered by built-in props.
168
+ */
169
+ plugins?: EmblaPluginType[];
170
+ /**
171
+ * Escape hatch for setting any Embla option directly. Merged on top of
172
+ * options derived from typed props above.
173
+ */
174
+ options?: Partial<EmblaOptionsType>;
175
+ /**
176
+ * Show prev/next arrow buttons.
177
+ * @default true
178
+ */
179
+ arrows?: boolean;
180
+ /**
181
+ * Show pagination dots below the carousel.
182
+ * @default true
183
+ */
184
+ dots?: boolean;
185
+ /**
186
+ * Icon for the "previous slide" arrow.
187
+ * @default 'lucide:chevron-left' (or 'lucide:chevron-up' when vertical)
188
+ */
189
+ prevIcon?: string;
190
+ /**
191
+ * Icon for the "next slide" arrow.
192
+ * @default 'lucide:chevron-right' (or 'lucide:chevron-down' when vertical)
193
+ */
194
+ nextIcon?: string;
195
+ /**
196
+ * Color scheme used for the active dot and the arrow buttons.
197
+ * @default 'primary'
198
+ */
199
+ color?: NonNullable<CarouselVariantProps['color']>;
200
+ /**
201
+ * Controls arrow and dot sizes.
202
+ * @default 'md'
203
+ */
204
+ size?: NonNullable<CarouselVariantProps['size']>;
205
+ /**
206
+ * Visual style of arrow buttons.
207
+ * @default 'soft'
208
+ */
209
+ variant?: NonNullable<CarouselVariantProps['variant']>;
210
+ /**
211
+ * Additional CSS classes for the root element.
212
+ */
213
+ class?: ClassNameValue;
214
+ /**
215
+ * Override classes for specific carousel slots.
216
+ */
217
+ ui?: Partial<Record<CarouselSlots, ClassNameValue>>;
218
+ /**
219
+ * Per-slide renderer. Called for each item in `items`. Receives the item,
220
+ * its index, and whether it is the currently selected slide.
221
+ */
222
+ slide?: Snippet<[CarouselSlideSlotProps<T>]>;
223
+ /**
224
+ * Custom dot renderer. When omitted a default dot button is rendered.
225
+ */
226
+ dot?: Snippet<[CarouselDotSlotProps]>;
227
+ /**
228
+ * Custom prev arrow renderer. When omitted a default `Button` with
229
+ * `prevIcon` is rendered.
230
+ */
231
+ prevSlot?: Snippet<[CarouselArrowSlotProps]>;
232
+ /**
233
+ * Custom next arrow renderer. When omitted a default `Button` with
234
+ * `nextIcon` is rendered.
235
+ */
236
+ nextSlot?: Snippet<[CarouselArrowSlotProps]>;
237
+ /**
238
+ * Fallback content for the slide container. Used when `items` is not
239
+ * provided — pass `.embla__slide` elements directly.
240
+ */
241
+ children?: Snippet;
242
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,408 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ export declare const carouselVariants: import("tailwind-variants").TVReturnType<{
3
+ orientation: {
4
+ horizontal: {
5
+ viewport: string;
6
+ container: string;
7
+ slide: string;
8
+ dots: string;
9
+ arrowPrev: string;
10
+ arrowNext: string;
11
+ };
12
+ vertical: {
13
+ root: string;
14
+ viewport: string;
15
+ container: string;
16
+ slide: string;
17
+ dots: string;
18
+ arrowPrev: string;
19
+ arrowNext: string;
20
+ };
21
+ };
22
+ size: {
23
+ xs: {
24
+ dot: string;
25
+ };
26
+ sm: {
27
+ dot: string;
28
+ };
29
+ md: {
30
+ dot: string;
31
+ };
32
+ lg: {
33
+ dot: string;
34
+ };
35
+ xl: {
36
+ dot: string;
37
+ };
38
+ };
39
+ color: {
40
+ primary: {
41
+ dot: string;
42
+ };
43
+ secondary: {
44
+ dot: string;
45
+ };
46
+ tertiary: {
47
+ dot: string;
48
+ };
49
+ success: {
50
+ dot: string;
51
+ };
52
+ warning: {
53
+ dot: string;
54
+ };
55
+ error: {
56
+ dot: string;
57
+ };
58
+ info: {
59
+ dot: string;
60
+ };
61
+ surface: {
62
+ dot: string;
63
+ };
64
+ };
65
+ variant: {
66
+ solid: string;
67
+ outline: string;
68
+ soft: string;
69
+ subtle: string;
70
+ ghost: string;
71
+ };
72
+ }, {
73
+ root: string;
74
+ viewport: string;
75
+ container: string;
76
+ slide: string;
77
+ arrow: string;
78
+ arrowPrev: string;
79
+ arrowNext: string;
80
+ dots: string;
81
+ dot: string[];
82
+ }, undefined, {
83
+ orientation: {
84
+ horizontal: {
85
+ viewport: string;
86
+ container: string;
87
+ slide: string;
88
+ dots: string;
89
+ arrowPrev: string;
90
+ arrowNext: string;
91
+ };
92
+ vertical: {
93
+ root: string;
94
+ viewport: string;
95
+ container: string;
96
+ slide: string;
97
+ dots: string;
98
+ arrowPrev: string;
99
+ arrowNext: string;
100
+ };
101
+ };
102
+ size: {
103
+ xs: {
104
+ dot: string;
105
+ };
106
+ sm: {
107
+ dot: string;
108
+ };
109
+ md: {
110
+ dot: string;
111
+ };
112
+ lg: {
113
+ dot: string;
114
+ };
115
+ xl: {
116
+ dot: string;
117
+ };
118
+ };
119
+ color: {
120
+ primary: {
121
+ dot: string;
122
+ };
123
+ secondary: {
124
+ dot: string;
125
+ };
126
+ tertiary: {
127
+ dot: string;
128
+ };
129
+ success: {
130
+ dot: string;
131
+ };
132
+ warning: {
133
+ dot: string;
134
+ };
135
+ error: {
136
+ dot: string;
137
+ };
138
+ info: {
139
+ dot: string;
140
+ };
141
+ surface: {
142
+ dot: string;
143
+ };
144
+ };
145
+ variant: {
146
+ solid: string;
147
+ outline: string;
148
+ soft: string;
149
+ subtle: string;
150
+ ghost: string;
151
+ };
152
+ }, {
153
+ root: string;
154
+ viewport: string;
155
+ container: string;
156
+ slide: string;
157
+ arrow: string;
158
+ arrowPrev: string;
159
+ arrowNext: string;
160
+ dots: string;
161
+ dot: string[];
162
+ }, import("tailwind-variants").TVReturnType<{
163
+ orientation: {
164
+ horizontal: {
165
+ viewport: string;
166
+ container: string;
167
+ slide: string;
168
+ dots: string;
169
+ arrowPrev: string;
170
+ arrowNext: string;
171
+ };
172
+ vertical: {
173
+ root: string;
174
+ viewport: string;
175
+ container: string;
176
+ slide: string;
177
+ dots: string;
178
+ arrowPrev: string;
179
+ arrowNext: string;
180
+ };
181
+ };
182
+ size: {
183
+ xs: {
184
+ dot: string;
185
+ };
186
+ sm: {
187
+ dot: string;
188
+ };
189
+ md: {
190
+ dot: string;
191
+ };
192
+ lg: {
193
+ dot: string;
194
+ };
195
+ xl: {
196
+ dot: string;
197
+ };
198
+ };
199
+ color: {
200
+ primary: {
201
+ dot: string;
202
+ };
203
+ secondary: {
204
+ dot: string;
205
+ };
206
+ tertiary: {
207
+ dot: string;
208
+ };
209
+ success: {
210
+ dot: string;
211
+ };
212
+ warning: {
213
+ dot: string;
214
+ };
215
+ error: {
216
+ dot: string;
217
+ };
218
+ info: {
219
+ dot: string;
220
+ };
221
+ surface: {
222
+ dot: string;
223
+ };
224
+ };
225
+ variant: {
226
+ solid: string;
227
+ outline: string;
228
+ soft: string;
229
+ subtle: string;
230
+ ghost: string;
231
+ };
232
+ }, {
233
+ root: string;
234
+ viewport: string;
235
+ container: string;
236
+ slide: string;
237
+ arrow: string;
238
+ arrowPrev: string;
239
+ arrowNext: string;
240
+ dots: string;
241
+ dot: string[];
242
+ }, undefined, unknown, unknown, undefined>>;
243
+ export type CarouselVariantProps = VariantProps<typeof carouselVariants>;
244
+ export type CarouselSlots = keyof ReturnType<typeof carouselVariants>;
245
+ export declare const carouselDefaults: {
246
+ defaultVariants: import("tailwind-variants").TVDefaultVariants<{
247
+ orientation: {
248
+ horizontal: {
249
+ viewport: string;
250
+ container: string;
251
+ slide: string;
252
+ dots: string;
253
+ arrowPrev: string;
254
+ arrowNext: string;
255
+ };
256
+ vertical: {
257
+ root: string;
258
+ viewport: string;
259
+ container: string;
260
+ slide: string;
261
+ dots: string;
262
+ arrowPrev: string;
263
+ arrowNext: string;
264
+ };
265
+ };
266
+ size: {
267
+ xs: {
268
+ dot: string;
269
+ };
270
+ sm: {
271
+ dot: string;
272
+ };
273
+ md: {
274
+ dot: string;
275
+ };
276
+ lg: {
277
+ dot: string;
278
+ };
279
+ xl: {
280
+ dot: string;
281
+ };
282
+ };
283
+ color: {
284
+ primary: {
285
+ dot: string;
286
+ };
287
+ secondary: {
288
+ dot: string;
289
+ };
290
+ tertiary: {
291
+ dot: string;
292
+ };
293
+ success: {
294
+ dot: string;
295
+ };
296
+ warning: {
297
+ dot: string;
298
+ };
299
+ error: {
300
+ dot: string;
301
+ };
302
+ info: {
303
+ dot: string;
304
+ };
305
+ surface: {
306
+ dot: string;
307
+ };
308
+ };
309
+ variant: {
310
+ solid: string;
311
+ outline: string;
312
+ soft: string;
313
+ subtle: string;
314
+ ghost: string;
315
+ };
316
+ }, {
317
+ root: string;
318
+ viewport: string;
319
+ container: string;
320
+ slide: string;
321
+ arrow: string;
322
+ arrowPrev: string;
323
+ arrowNext: string;
324
+ dots: string;
325
+ dot: string[];
326
+ }, {
327
+ orientation: {
328
+ horizontal: {
329
+ viewport: string;
330
+ container: string;
331
+ slide: string;
332
+ dots: string;
333
+ arrowPrev: string;
334
+ arrowNext: string;
335
+ };
336
+ vertical: {
337
+ root: string;
338
+ viewport: string;
339
+ container: string;
340
+ slide: string;
341
+ dots: string;
342
+ arrowPrev: string;
343
+ arrowNext: string;
344
+ };
345
+ };
346
+ size: {
347
+ xs: {
348
+ dot: string;
349
+ };
350
+ sm: {
351
+ dot: string;
352
+ };
353
+ md: {
354
+ dot: string;
355
+ };
356
+ lg: {
357
+ dot: string;
358
+ };
359
+ xl: {
360
+ dot: string;
361
+ };
362
+ };
363
+ color: {
364
+ primary: {
365
+ dot: string;
366
+ };
367
+ secondary: {
368
+ dot: string;
369
+ };
370
+ tertiary: {
371
+ dot: string;
372
+ };
373
+ success: {
374
+ dot: string;
375
+ };
376
+ warning: {
377
+ dot: string;
378
+ };
379
+ error: {
380
+ dot: string;
381
+ };
382
+ info: {
383
+ dot: string;
384
+ };
385
+ surface: {
386
+ dot: string;
387
+ };
388
+ };
389
+ variant: {
390
+ solid: string;
391
+ outline: string;
392
+ soft: string;
393
+ subtle: string;
394
+ ghost: string;
395
+ };
396
+ }, {
397
+ root: string;
398
+ viewport: string;
399
+ container: string;
400
+ slide: string;
401
+ arrow: string;
402
+ arrowPrev: string;
403
+ arrowNext: string;
404
+ dots: string;
405
+ dot: string[];
406
+ }>;
407
+ slots: Partial<Record<CarouselSlots, string>>;
408
+ };