sv5ui 1.7.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.
- package/dist/Banner/Banner.svelte +162 -0
- package/dist/Banner/Banner.svelte.d.ts +5 -0
- package/dist/Banner/banner.types.d.ts +148 -0
- package/dist/Banner/banner.types.js +1 -0
- package/dist/Banner/banner.variants.d.ts +293 -0
- package/dist/Banner/banner.variants.js +86 -0
- package/dist/Banner/index.d.ts +2 -0
- package/dist/Banner/index.js +1 -0
- package/dist/Editor/Editor.svelte +738 -0
- package/dist/Editor/Editor.svelte.d.ts +6 -0
- package/dist/Editor/EditorUrlPrompt.svelte +111 -0
- package/dist/Editor/EditorUrlPrompt.svelte.d.ts +15 -0
- package/dist/Editor/SlashPopup.svelte +67 -0
- package/dist/Editor/SlashPopup.svelte.d.ts +9 -0
- package/dist/Editor/editor.extensions.d.ts +23 -0
- package/dist/Editor/editor.extensions.js +123 -0
- package/dist/Editor/editor.schemas.d.ts +4 -0
- package/dist/Editor/editor.schemas.js +3 -0
- package/dist/Editor/editor.slash.svelte.d.ts +34 -0
- package/dist/Editor/editor.slash.svelte.js +273 -0
- package/dist/Editor/editor.suggestion.d.ts +7 -0
- package/dist/Editor/editor.suggestion.js +142 -0
- package/dist/Editor/editor.toolbar.d.ts +11 -0
- package/dist/Editor/editor.toolbar.js +212 -0
- package/dist/Editor/editor.types.d.ts +347 -0
- package/dist/Editor/editor.types.js +1 -0
- package/dist/Editor/editor.variants.d.ts +308 -0
- package/dist/Editor/editor.variants.js +150 -0
- package/dist/Editor/index.d.ts +53 -0
- package/dist/Editor/index.js +52 -0
- package/dist/Stepper/Stepper.svelte +292 -0
- package/dist/Stepper/Stepper.svelte.d.ts +5 -0
- package/dist/Stepper/index.d.ts +2 -0
- package/dist/Stepper/index.js +1 -0
- package/dist/Stepper/stepper.types.d.ts +223 -0
- package/dist/Stepper/stepper.types.js +1 -0
- package/dist/Stepper/stepper.variants.d.ts +428 -0
- package/dist/Stepper/stepper.variants.js +204 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +97 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
export const stepperVariants = tv({
|
|
3
|
+
slots: {
|
|
4
|
+
root: 'flex flex-col gap-4 w-full',
|
|
5
|
+
list: 'flex list-none p-0 m-0',
|
|
6
|
+
item: 'group relative flex flex-1',
|
|
7
|
+
trigger: [
|
|
8
|
+
'group/trigger relative z-10 flex w-full gap-3 text-start rounded-md',
|
|
9
|
+
'enabled:cursor-pointer select-none',
|
|
10
|
+
'focus-visible:outline-none',
|
|
11
|
+
'disabled:cursor-not-allowed disabled:opacity-60'
|
|
12
|
+
],
|
|
13
|
+
container: 'flex shrink-0 items-center justify-center',
|
|
14
|
+
indicator: [
|
|
15
|
+
'relative z-10 inline-flex items-center justify-center shrink-0 rounded-full font-medium',
|
|
16
|
+
'bg-surface-container-highest text-on-surface-variant',
|
|
17
|
+
'transition-colors',
|
|
18
|
+
'group-focus-visible/trigger:ring-2 group-focus-visible/trigger:ring-offset-2 group-focus-visible/trigger:ring-offset-surface'
|
|
19
|
+
],
|
|
20
|
+
separator: 'shrink-0 z-0 rounded-full bg-surface-container-highest transition-colors',
|
|
21
|
+
wrapper: 'flex flex-col min-w-0',
|
|
22
|
+
title: 'font-medium text-on-surface transition-colors',
|
|
23
|
+
description: 'text-on-surface-variant',
|
|
24
|
+
content: 'focus:outline-none'
|
|
25
|
+
},
|
|
26
|
+
variants: {
|
|
27
|
+
orientation: {
|
|
28
|
+
horizontal: {
|
|
29
|
+
list: 'flex-row w-full',
|
|
30
|
+
item: 'flex-col items-center',
|
|
31
|
+
trigger: 'flex-col items-center',
|
|
32
|
+
container: 'w-full',
|
|
33
|
+
wrapper: 'items-center text-center pt-2',
|
|
34
|
+
separator: 'absolute h-0.5 left-1/2 right-[-50%] -translate-y-1/2'
|
|
35
|
+
},
|
|
36
|
+
vertical: {
|
|
37
|
+
list: 'flex-col',
|
|
38
|
+
item: 'flex-row',
|
|
39
|
+
trigger: 'flex-row items-stretch',
|
|
40
|
+
container: 'self-stretch flex-col',
|
|
41
|
+
wrapper: 'items-start',
|
|
42
|
+
separator: 'w-0.5 flex-1 my-1'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
size: {
|
|
46
|
+
xs: {
|
|
47
|
+
indicator: 'size-6 text-[10px] *:size-3.5',
|
|
48
|
+
title: 'text-xs',
|
|
49
|
+
description: 'text-[11px]'
|
|
50
|
+
},
|
|
51
|
+
sm: {
|
|
52
|
+
indicator: 'size-7 text-xs *:size-4',
|
|
53
|
+
title: 'text-sm',
|
|
54
|
+
description: 'text-xs'
|
|
55
|
+
},
|
|
56
|
+
md: {
|
|
57
|
+
indicator: 'size-8 text-sm *:size-5',
|
|
58
|
+
title: 'text-sm',
|
|
59
|
+
description: 'text-sm'
|
|
60
|
+
},
|
|
61
|
+
lg: {
|
|
62
|
+
indicator: 'size-10 text-base *:size-5',
|
|
63
|
+
title: 'text-base',
|
|
64
|
+
description: 'text-sm'
|
|
65
|
+
},
|
|
66
|
+
xl: {
|
|
67
|
+
indicator: 'size-12 text-lg *:size-6',
|
|
68
|
+
title: 'text-base',
|
|
69
|
+
description: 'text-sm'
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
color: {
|
|
73
|
+
primary: { indicator: 'group-focus-visible/trigger:ring-primary' },
|
|
74
|
+
secondary: { indicator: 'group-focus-visible/trigger:ring-secondary' },
|
|
75
|
+
tertiary: { indicator: 'group-focus-visible/trigger:ring-tertiary' },
|
|
76
|
+
success: { indicator: 'group-focus-visible/trigger:ring-success' },
|
|
77
|
+
warning: { indicator: 'group-focus-visible/trigger:ring-warning' },
|
|
78
|
+
error: { indicator: 'group-focus-visible/trigger:ring-error' },
|
|
79
|
+
info: { indicator: 'group-focus-visible/trigger:ring-info' },
|
|
80
|
+
surface: { indicator: 'group-focus-visible/trigger:ring-outline' }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
compoundVariants: [
|
|
84
|
+
// -------------------------------------------------------------------
|
|
85
|
+
// Color × state — indicator background, separator fill, active title
|
|
86
|
+
// -------------------------------------------------------------------
|
|
87
|
+
{
|
|
88
|
+
color: 'primary',
|
|
89
|
+
class: {
|
|
90
|
+
indicator: [
|
|
91
|
+
'group-data-[state=completed]:bg-primary group-data-[state=completed]:text-on-primary',
|
|
92
|
+
'group-data-[state=active]:bg-primary group-data-[state=active]:text-on-primary'
|
|
93
|
+
],
|
|
94
|
+
separator: 'group-data-[state=completed]:bg-primary',
|
|
95
|
+
title: 'group-data-[state=active]:text-primary'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
color: 'secondary',
|
|
100
|
+
class: {
|
|
101
|
+
indicator: [
|
|
102
|
+
'group-data-[state=completed]:bg-secondary group-data-[state=completed]:text-on-secondary',
|
|
103
|
+
'group-data-[state=active]:bg-secondary group-data-[state=active]:text-on-secondary'
|
|
104
|
+
],
|
|
105
|
+
separator: 'group-data-[state=completed]:bg-secondary',
|
|
106
|
+
title: 'group-data-[state=active]:text-secondary'
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
color: 'tertiary',
|
|
111
|
+
class: {
|
|
112
|
+
indicator: [
|
|
113
|
+
'group-data-[state=completed]:bg-tertiary group-data-[state=completed]:text-on-tertiary',
|
|
114
|
+
'group-data-[state=active]:bg-tertiary group-data-[state=active]:text-on-tertiary'
|
|
115
|
+
],
|
|
116
|
+
separator: 'group-data-[state=completed]:bg-tertiary',
|
|
117
|
+
title: 'group-data-[state=active]:text-tertiary'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
color: 'success',
|
|
122
|
+
class: {
|
|
123
|
+
indicator: [
|
|
124
|
+
'group-data-[state=completed]:bg-success group-data-[state=completed]:text-on-success',
|
|
125
|
+
'group-data-[state=active]:bg-success group-data-[state=active]:text-on-success'
|
|
126
|
+
],
|
|
127
|
+
separator: 'group-data-[state=completed]:bg-success',
|
|
128
|
+
title: 'group-data-[state=active]:text-success'
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
color: 'warning',
|
|
133
|
+
class: {
|
|
134
|
+
indicator: [
|
|
135
|
+
'group-data-[state=completed]:bg-warning group-data-[state=completed]:text-on-warning',
|
|
136
|
+
'group-data-[state=active]:bg-warning group-data-[state=active]:text-on-warning'
|
|
137
|
+
],
|
|
138
|
+
separator: 'group-data-[state=completed]:bg-warning',
|
|
139
|
+
title: 'group-data-[state=active]:text-warning'
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
color: 'error',
|
|
144
|
+
class: {
|
|
145
|
+
indicator: [
|
|
146
|
+
'group-data-[state=completed]:bg-error group-data-[state=completed]:text-on-error',
|
|
147
|
+
'group-data-[state=active]:bg-error group-data-[state=active]:text-on-error'
|
|
148
|
+
],
|
|
149
|
+
separator: 'group-data-[state=completed]:bg-error',
|
|
150
|
+
title: 'group-data-[state=active]:text-error'
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
color: 'info',
|
|
155
|
+
class: {
|
|
156
|
+
indicator: [
|
|
157
|
+
'group-data-[state=completed]:bg-info group-data-[state=completed]:text-on-info',
|
|
158
|
+
'group-data-[state=active]:bg-info group-data-[state=active]:text-on-info'
|
|
159
|
+
],
|
|
160
|
+
separator: 'group-data-[state=completed]:bg-info',
|
|
161
|
+
title: 'group-data-[state=active]:text-info'
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
color: 'surface',
|
|
166
|
+
class: {
|
|
167
|
+
indicator: [
|
|
168
|
+
'group-data-[state=completed]:bg-inverse-surface group-data-[state=completed]:text-inverse-on-surface',
|
|
169
|
+
'group-data-[state=active]:bg-inverse-surface group-data-[state=active]:text-inverse-on-surface'
|
|
170
|
+
],
|
|
171
|
+
separator: 'group-data-[state=completed]:bg-inverse-surface',
|
|
172
|
+
title: 'group-data-[state=active]:text-on-surface'
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
// -------------------------------------------------------------------
|
|
176
|
+
// Horizontal × size — separator vertically centered on indicator,
|
|
177
|
+
// horizontal margins equal indicator radius so the line stops at each
|
|
178
|
+
// indicator's edge (never enters the indicator — important so faded
|
|
179
|
+
// disabled indicators don't reveal the line behind them).
|
|
180
|
+
// -------------------------------------------------------------------
|
|
181
|
+
{ orientation: 'horizontal', size: 'xs', class: { separator: 'top-3 mx-3' } },
|
|
182
|
+
{ orientation: 'horizontal', size: 'sm', class: { separator: 'top-3.5 mx-3.5' } },
|
|
183
|
+
{ orientation: 'horizontal', size: 'md', class: { separator: 'top-4 mx-4' } },
|
|
184
|
+
{ orientation: 'horizontal', size: 'lg', class: { separator: 'top-5 mx-5' } },
|
|
185
|
+
{ orientation: 'horizontal', size: 'xl', class: { separator: 'top-6 mx-6' } },
|
|
186
|
+
// -------------------------------------------------------------------
|
|
187
|
+
// Vertical × size — wrapper bottom padding creates visible line height
|
|
188
|
+
// -------------------------------------------------------------------
|
|
189
|
+
{ orientation: 'vertical', size: 'xs', class: { wrapper: 'pb-6' } },
|
|
190
|
+
{ orientation: 'vertical', size: 'sm', class: { wrapper: 'pb-7' } },
|
|
191
|
+
{ orientation: 'vertical', size: 'md', class: { wrapper: 'pb-8' } },
|
|
192
|
+
{ orientation: 'vertical', size: 'lg', class: { wrapper: 'pb-10' } },
|
|
193
|
+
{ orientation: 'vertical', size: 'xl', class: { wrapper: 'pb-12' } }
|
|
194
|
+
],
|
|
195
|
+
defaultVariants: {
|
|
196
|
+
orientation: 'horizontal',
|
|
197
|
+
size: 'md',
|
|
198
|
+
color: 'primary'
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
export const stepperDefaults = {
|
|
202
|
+
defaultVariants: stepperVariants.defaultVariants,
|
|
203
|
+
slots: {}
|
|
204
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export * from './ThemeModeButton/index.js';
|
|
|
47
47
|
export * from './Table/index.js';
|
|
48
48
|
export * from './Toast/index.js';
|
|
49
49
|
export * from './Carousel/index.js';
|
|
50
|
+
export * from './Banner/index.js';
|
|
51
|
+
export * from './Stepper/index.js';
|
|
50
52
|
export * from './hooks/index.js';
|
|
51
53
|
export { defineConfig } from './config.js';
|
|
52
54
|
export type { UIConfig } from './config.js';
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,8 @@ export * from './ThemeModeButton/index.js';
|
|
|
48
48
|
export * from './Table/index.js';
|
|
49
49
|
export * from './Toast/index.js';
|
|
50
50
|
export * from './Carousel/index.js';
|
|
51
|
+
export * from './Banner/index.js';
|
|
52
|
+
export * from './Stepper/index.js';
|
|
51
53
|
// Composables
|
|
52
54
|
export * from './hooks/index.js';
|
|
53
55
|
// Configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sv5ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "A modern Svelte 5 UI component library with Tailwind CSS",
|
|
5
5
|
"author": "ndlabdev",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,24 +42,101 @@
|
|
|
42
42
|
"svelte": "./dist/index.js",
|
|
43
43
|
"default": "./dist/index.js"
|
|
44
44
|
},
|
|
45
|
+
"./editor": {
|
|
46
|
+
"types": "./dist/Editor/index.d.ts",
|
|
47
|
+
"svelte": "./dist/Editor/index.js",
|
|
48
|
+
"default": "./dist/Editor/index.js"
|
|
49
|
+
},
|
|
45
50
|
"./theme.css": {
|
|
46
51
|
"import": "./dist/theme.css",
|
|
47
52
|
"default": "./dist/theme.css"
|
|
48
53
|
}
|
|
49
54
|
},
|
|
50
55
|
"peerDependencies": {
|
|
56
|
+
"@tiptap/core": "^3.0.0",
|
|
57
|
+
"@tiptap/extension-bubble-menu": "^3.0.0",
|
|
58
|
+
"@tiptap/extension-character-count": "^3.0.0",
|
|
59
|
+
"@tiptap/extension-drag-handle": "^3.0.0",
|
|
60
|
+
"@tiptap/extension-image": "^3.0.0",
|
|
61
|
+
"@tiptap/extension-mention": "^3.0.0",
|
|
62
|
+
"@tiptap/extension-placeholder": "^3.0.0",
|
|
63
|
+
"@tiptap/extension-table": "^3.0.0",
|
|
64
|
+
"@tiptap/extension-table-cell": "^3.0.0",
|
|
65
|
+
"@tiptap/extension-table-header": "^3.0.0",
|
|
66
|
+
"@tiptap/extension-table-row": "^3.0.0",
|
|
67
|
+
"@tiptap/extension-text-align": "^3.0.0",
|
|
68
|
+
"@tiptap/extension-typography": "^3.0.0",
|
|
69
|
+
"@tiptap/extension-youtube": "^3.0.0",
|
|
70
|
+
"@tiptap/pm": "^3.0.0",
|
|
71
|
+
"@tiptap/starter-kit": "^3.0.0",
|
|
72
|
+
"@tiptap/suggestion": "^3.0.0",
|
|
51
73
|
"joi": "^17.0.0 || ^18.0.0",
|
|
52
74
|
"mode-watcher": "^1.0.0",
|
|
53
75
|
"svelte": "^5.0.0",
|
|
54
76
|
"tailwindcss": "^4.0.0",
|
|
77
|
+
"tiptap-markdown": "^0.9.0",
|
|
55
78
|
"valibot": "^1.0.0",
|
|
56
79
|
"yup": "^1.7.0",
|
|
57
80
|
"zod": "^3.24.0 || ^4.0.0"
|
|
58
81
|
},
|
|
59
82
|
"peerDependenciesMeta": {
|
|
83
|
+
"@tiptap/core": {
|
|
84
|
+
"optional": true
|
|
85
|
+
},
|
|
86
|
+
"@tiptap/extension-bubble-menu": {
|
|
87
|
+
"optional": true
|
|
88
|
+
},
|
|
89
|
+
"@tiptap/extension-character-count": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
92
|
+
"@tiptap/extension-drag-handle": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"@tiptap/extension-image": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"@tiptap/extension-mention": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"@tiptap/extension-placeholder": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"@tiptap/extension-table": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"@tiptap/extension-table-cell": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"@tiptap/extension-table-header": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
113
|
+
"@tiptap/extension-table-row": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"@tiptap/extension-text-align": {
|
|
117
|
+
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"@tiptap/extension-typography": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
122
|
+
"@tiptap/extension-youtube": {
|
|
123
|
+
"optional": true
|
|
124
|
+
},
|
|
125
|
+
"@tiptap/pm": {
|
|
126
|
+
"optional": true
|
|
127
|
+
},
|
|
128
|
+
"@tiptap/starter-kit": {
|
|
129
|
+
"optional": true
|
|
130
|
+
},
|
|
131
|
+
"@tiptap/suggestion": {
|
|
132
|
+
"optional": true
|
|
133
|
+
},
|
|
60
134
|
"joi": {
|
|
61
135
|
"optional": true
|
|
62
136
|
},
|
|
137
|
+
"tiptap-markdown": {
|
|
138
|
+
"optional": true
|
|
139
|
+
},
|
|
63
140
|
"valibot": {
|
|
64
141
|
"optional": true
|
|
65
142
|
},
|
|
@@ -78,6 +155,23 @@
|
|
|
78
155
|
"@sveltejs/package": "^2.5.7",
|
|
79
156
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
80
157
|
"@tailwindcss/vite": "^4.1.17",
|
|
158
|
+
"@tiptap/core": "^3.23.6",
|
|
159
|
+
"@tiptap/extension-bubble-menu": "^3.23.6",
|
|
160
|
+
"@tiptap/extension-character-count": "^3.23.6",
|
|
161
|
+
"@tiptap/extension-drag-handle": "^3.23.6",
|
|
162
|
+
"@tiptap/extension-image": "^3.23.6",
|
|
163
|
+
"@tiptap/extension-mention": "^3.23.6",
|
|
164
|
+
"@tiptap/extension-placeholder": "^3.23.6",
|
|
165
|
+
"@tiptap/extension-table": "^3.23.6",
|
|
166
|
+
"@tiptap/extension-table-cell": "^3.23.6",
|
|
167
|
+
"@tiptap/extension-table-header": "^3.23.6",
|
|
168
|
+
"@tiptap/extension-table-row": "^3.23.6",
|
|
169
|
+
"@tiptap/extension-text-align": "^3.23.6",
|
|
170
|
+
"@tiptap/extension-typography": "^3.23.6",
|
|
171
|
+
"@tiptap/extension-youtube": "^3.23.6",
|
|
172
|
+
"@tiptap/pm": "^3.23.6",
|
|
173
|
+
"@tiptap/starter-kit": "^3.23.6",
|
|
174
|
+
"@tiptap/suggestion": "^3.23.6",
|
|
81
175
|
"@types/node": "^22",
|
|
82
176
|
"@vitest/browser-playwright": "^4.0.15",
|
|
83
177
|
"eslint": "^9.39.1",
|
|
@@ -93,6 +187,7 @@
|
|
|
93
187
|
"svelte": "^5.45.6",
|
|
94
188
|
"svelte-check": "^4.3.4",
|
|
95
189
|
"tailwindcss": "^4.1.17",
|
|
190
|
+
"tiptap-markdown": "^0.9.0",
|
|
96
191
|
"typescript": "^5.9.3",
|
|
97
192
|
"typescript-eslint": "^8.48.1",
|
|
98
193
|
"valibot": "^1.3.1",
|
|
@@ -118,6 +213,7 @@
|
|
|
118
213
|
"accessible"
|
|
119
214
|
],
|
|
120
215
|
"dependencies": {
|
|
216
|
+
"@floating-ui/dom": "^1.7.4",
|
|
121
217
|
"@iconify/svelte": "^5.2.1",
|
|
122
218
|
"@internationalized/date": "^3.11.0",
|
|
123
219
|
"@standard-schema/spec": "^1.1.0",
|