@widgetic/design-system 0.3.88 → 0.5.7
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 +122 -690
- package/dist/components/CopyableHeader.svelte +11 -13
- package/dist/components/EmptyState.svelte +4 -2
- package/dist/components/EmptyState.svelte.d.ts +2 -1
- package/dist/components/GenerateLoader.svelte +50 -0
- package/dist/components/GenerateLoader.svelte.d.ts +21 -0
- package/dist/components/PasswordInput.svelte +5 -1
- package/dist/components/WScrollArea.svelte +3 -3
- package/dist/components/debug-grid/DebugGrid.svelte +1 -1
- package/dist/components/ic/browser/BrowserInputController.svelte +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/modals/BaseModal.svelte +1 -1
- package/dist/components/modals/BaseModal.svelte.d.ts +1 -1
- package/dist/components/modals/NewItemDialog.svelte +1 -1
- package/dist/components/modals/Portal.svelte +14 -15
- package/dist/components/modals/RenameDialog.svelte +7 -6
- package/dist/components/navigation/Breadcrumbs.svelte +65 -39
- package/dist/components/pdf/PDFViewer.svelte +10 -19
- package/dist/components/pdf/PDFViewer.svelte.d.ts +4 -4
- package/dist/components/search-input/SearchInput.svelte +3 -8
- package/dist/components/search-input/index.d.ts +3 -14
- package/dist/components/search-input/index.js +1 -2
- package/dist/components/search-input/index2.d.ts +14 -0
- package/dist/components/shad-editor/README.md +18 -0
- package/dist/components/shad-editor/custom/image-extended-component.svelte +1 -1
- package/dist/components/shad-editor/editor.css +8 -4
- package/dist/components/shad-editor/icons/table.svelte +3 -3
- package/dist/components/shad-editor/icons/text.svelte +1 -1
- package/dist/components/shad-editor/onedark.css +3 -0
- package/dist/components/shad-editor/shad-editor.svelte +1 -1
- package/dist/components/toast/ToasterModal.svelte +15 -9
- package/dist/components/ui/alert/index.d.ts +2 -2
- package/dist/components/ui/badge/badge.svelte +1 -1
- package/dist/components/ui/badge/badge.svelte.d.ts +2 -2
- package/dist/components/ui/button/button.svelte +1 -1
- package/dist/components/ui/calendar/calendar-day.svelte +4 -4
- package/dist/components/ui/card/card.svelte +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +1 -1
- package/dist/components/ui/collapsible/index.d.ts +1 -12
- package/dist/components/ui/command/command-dialog.svelte +1 -1
- package/dist/components/ui/command/command-input.svelte +1 -1
- package/dist/components/ui/command/command-item.svelte +1 -1
- package/dist/components/ui/command/command-link-item.svelte +1 -1
- package/dist/components/ui/dialog/dialog-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +6 -14
- package/dist/components/ui/hover-card/hover-card-content.svelte +1 -1
- package/dist/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/input-otp/input-otp.svelte +1 -1
- package/dist/components/ui/popover/popover-content.svelte +1 -1
- package/dist/components/ui/radio-group/radio-group-item.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +6 -6
- package/dist/components/ui/select/index.d.ts +1 -1
- package/dist/components/ui/select/select-item.svelte +1 -1
- package/dist/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +1 -1
- package/dist/components/ui/sonner/sonner.svelte +12 -2
- package/dist/components/ui/switch/switch.svelte +1 -1
- package/dist/components/ui/tabs/tabs-content.svelte +1 -1
- package/dist/components/ui/tabs/tabs-trigger.svelte +1 -1
- package/dist/components/ui/textarea/textarea.svelte +1 -1
- package/dist/components/ui/toggle/toggle.svelte +1 -1
- package/dist/components/ui/toggle/toggle.svelte.d.ts +2 -2
- package/dist/components/ui/tooltip/index.d.ts +4 -4
- package/dist/components/widget-system/Moveable.svelte +100 -23
- package/dist/components/widget-system/Moveable.svelte.d.ts +3 -1
- package/dist/icons/eye-off.svg +1 -0
- package/dist/icons/eye.svg +1 -0
- package/dist/shad-editor/index.d.ts +1 -0
- package/dist/shad-editor/index.js +1 -0
- package/dist/styles/fonts.css +59 -47
- package/dist/styles/global.css +119 -52
- package/package.json +158 -34
- package/tailwind.config.ts +13 -6
package/dist/styles/global.css
CHANGED
|
@@ -1,16 +1,77 @@
|
|
|
1
|
-
/* Tailwind
|
|
2
|
-
@import
|
|
3
|
-
|
|
4
|
-
/* Taildind 3 imports */
|
|
5
|
-
@import 'tailwindcss/base';
|
|
6
|
-
@import 'tailwindcss/components';
|
|
7
|
-
@import 'tailwindcss/utilities';
|
|
1
|
+
/* Tailwind import(v4) */
|
|
2
|
+
@import 'tailwindcss';
|
|
8
3
|
|
|
9
4
|
/* Import fonts css */
|
|
5
|
+
/* @import './fonts.css' layer(utilities); */
|
|
10
6
|
@import './fonts.css';
|
|
11
7
|
|
|
8
|
+
/* Tailwind config load *after* main imports - needed for tailwind 4
|
|
9
|
+
go 3 levels up in development mode, 2 levels up in production mode*/
|
|
10
|
+
@config "../../tailwind.config.ts";
|
|
11
|
+
|
|
12
|
+
/* Widgetic DS palette as TW4 theme tokens (enables bg-grey2, text-forest-green, etc.) */
|
|
13
|
+
@theme {
|
|
14
|
+
--color-dark: hsl(var(--dark));
|
|
15
|
+
--color-deep-forest-green: hsl(var(--deep-forest-green));
|
|
16
|
+
--color-sage-green: hsl(var(--sage-green));
|
|
17
|
+
--color-sunny-yellow: hsl(var(--sunny-yellow));
|
|
18
|
+
--color-light-green: hsl(var(--light-green));
|
|
19
|
+
--color-forest-green: hsl(var(--forest-green));
|
|
20
|
+
--color-error: hsl(var(--error));
|
|
21
|
+
--color-light-error: hsl(var(--light-error));
|
|
22
|
+
--color-grey1: hsl(var(--grey1));
|
|
23
|
+
--color-grey2: hsl(var(--grey2));
|
|
24
|
+
--color-grey3: hsl(var(--grey3));
|
|
25
|
+
--color-grey4: hsl(var(--grey4));
|
|
26
|
+
--color-grey5: hsl(var(--grey5));
|
|
27
|
+
--color-grey6: hsl(var(--grey6));
|
|
28
|
+
--color-grey7: hsl(var(--grey7));
|
|
29
|
+
|
|
30
|
+
--radius-pill: 100px;
|
|
31
|
+
--radius-large: 15px;
|
|
32
|
+
--radius-medium: 12px;
|
|
33
|
+
--radius-small: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Utility classes for border radius - Moved to top level */
|
|
37
|
+
/* NOTE: We define these custom utilities BEFORE the base layer
|
|
38
|
+
so they are available for @apply within the base layer if needed,
|
|
39
|
+
and Tailwind processes them correctly. */
|
|
40
|
+
@utility rounded-pill {
|
|
41
|
+
border-radius: var(--radius-pill);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@utility rounded-large {
|
|
45
|
+
border-radius: var(--radius-large);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@utility rounded-medium {
|
|
49
|
+
border-radius: var(--radius-medium);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@utility rounded-small {
|
|
53
|
+
border-radius: var(--radius-small);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
The default border color has changed to `currentcolor` in Tailwind CSS v4,
|
|
58
|
+
so we've added these compatibility styles to make sure everything still
|
|
59
|
+
looks the same as it did with Tailwind CSS v3.
|
|
60
|
+
|
|
61
|
+
If we ever want to remove these styles, we need to add an explicit border
|
|
62
|
+
color utility to any element that depends on these defaults.
|
|
63
|
+
*/
|
|
12
64
|
@layer base {
|
|
13
|
-
/*
|
|
65
|
+
/* Rule for Default border color fix from first @layer block */
|
|
66
|
+
*,
|
|
67
|
+
::after,
|
|
68
|
+
::before,
|
|
69
|
+
::backdrop,
|
|
70
|
+
::file-selector-button {
|
|
71
|
+
border-color: var(--color-gray-200, currentcolor);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* CSS Variables now defined globally on :root */
|
|
14
75
|
:root {
|
|
15
76
|
/* Site Grid Variables */
|
|
16
77
|
--site-column-width: 74px;
|
|
@@ -56,11 +117,10 @@
|
|
|
56
117
|
/* Icon Colors */
|
|
57
118
|
--icon-success: 142 71% 45%;
|
|
58
119
|
--icon-error: 0 84% 60%;
|
|
59
|
-
}
|
|
60
120
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
121
|
+
|
|
122
|
+
/* Widgetic Color Variables (Moved from .widgetic-colors) */
|
|
123
|
+
/* convert colors from hex to HSL (Hue, Saturation, Lightness) format */
|
|
64
124
|
--dark: 120 35.7% 9.4%;
|
|
65
125
|
--deep-forest-green: 115 24.1% 24.7%;
|
|
66
126
|
--sage-green: 108 25.4% 52.9%;
|
|
@@ -69,7 +129,6 @@
|
|
|
69
129
|
--forest-green: 90 16.7% 83.3%;
|
|
70
130
|
--error: 0 89% 65.7%;
|
|
71
131
|
--light-error: 0 45.5% 93.7%;
|
|
72
|
-
|
|
73
132
|
/* Greys */
|
|
74
133
|
--grey1: 0 0% 96.1%;
|
|
75
134
|
--grey2: 0 0% 94.1%;
|
|
@@ -78,11 +137,11 @@
|
|
|
78
137
|
--grey5: 0 0% 40%;
|
|
79
138
|
--grey6: 0 0% 26.7%;
|
|
80
139
|
--grey7: 0 0% 12.9%;
|
|
81
|
-
}
|
|
82
140
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/*
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
/* Border radius values */
|
|
144
|
+
--radius: 0.5rem; /* Base radius used by shadcn borderRadius utilities (rounded-sm/md/lg/xl) */
|
|
86
145
|
--radius-pill: 100px; /* Pill/Extra large corner radius */
|
|
87
146
|
--radius-large: 15px; /* Large corner radius */
|
|
88
147
|
--radius-medium: 12px; /* Medium corner radius */
|
|
@@ -94,30 +153,21 @@
|
|
|
94
153
|
--breakpoint-tablet: 744px;
|
|
95
154
|
--breakpoint-desktop: 1156px;
|
|
96
155
|
}
|
|
97
|
-
/* Utility classes for border radius */
|
|
98
|
-
.rounded-pill {
|
|
99
|
-
border-radius: var(--radius-pill);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.rounded-large {
|
|
103
|
-
border-radius: var(--radius-large);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.rounded-medium {
|
|
107
|
-
border-radius: var(--radius-medium);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.rounded-small {
|
|
111
|
-
border-radius: var(--radius-small);
|
|
112
|
-
}
|
|
113
156
|
|
|
114
157
|
/*** GLOBAL STYLE CLASSES ***/
|
|
115
158
|
* {
|
|
116
159
|
border-color: hsl(var(--border));
|
|
117
160
|
}
|
|
118
161
|
|
|
162
|
+
button,
|
|
163
|
+
[role="button"] {
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
}
|
|
166
|
+
|
|
119
167
|
html,
|
|
120
168
|
body {
|
|
169
|
+
width: 100%;
|
|
170
|
+
height: 100vh;
|
|
121
171
|
overflow: hidden; /* prevent scroll */
|
|
122
172
|
margin: 0;
|
|
123
173
|
background-color: hsl(var(--background));
|
|
@@ -126,18 +176,18 @@
|
|
|
126
176
|
|
|
127
177
|
/* This is the root container of the website(app.html) */
|
|
128
178
|
.root-ct {
|
|
129
|
-
@apply
|
|
179
|
+
@apply w-full h-full;
|
|
130
180
|
display: block !important;
|
|
131
181
|
}
|
|
132
182
|
|
|
133
183
|
/* This is the root layout container of the website pages */
|
|
134
184
|
.layout-ct {
|
|
135
|
-
@apply
|
|
185
|
+
@apply w-full h-full;
|
|
136
186
|
}
|
|
137
187
|
|
|
138
188
|
.page-ct {
|
|
139
189
|
width: 100%;
|
|
140
|
-
height:
|
|
190
|
+
height: 100%;
|
|
141
191
|
/* background-color: green; */
|
|
142
192
|
}
|
|
143
193
|
|
|
@@ -164,6 +214,7 @@
|
|
|
164
214
|
}
|
|
165
215
|
|
|
166
216
|
.native-scrollbar::-webkit-scrollbar-thumb {
|
|
217
|
+
@apply bg-muted;
|
|
167
218
|
cursor: pointer;
|
|
168
219
|
|
|
169
220
|
border: calc(var(--scrollbar-width) / 3) solid transparent;
|
|
@@ -185,11 +236,18 @@
|
|
|
185
236
|
.site-grid {
|
|
186
237
|
/* background-color: green; */
|
|
187
238
|
display: grid;
|
|
188
|
-
|
|
239
|
+
/* Prefer fluid columns so the page never forces horizontal scroll above tablet. */
|
|
240
|
+
grid-template-columns: repeat(var(--site-columns-desktop), minmax(0, 1fr));
|
|
189
241
|
column-gap: var(--site-column-gap);
|
|
242
|
+
max-width: calc(
|
|
243
|
+
(var(--site-columns-desktop) * var(--site-column-width)) +
|
|
244
|
+
((var(--site-columns-desktop) - 1) * var(--site-column-gap))
|
|
245
|
+
);
|
|
246
|
+
width: 100%;
|
|
190
247
|
margin: 0 auto;
|
|
191
248
|
justify-content: center;
|
|
192
249
|
position: relative;
|
|
250
|
+
box-sizing: border-box;
|
|
193
251
|
}
|
|
194
252
|
|
|
195
253
|
/* Debug class */
|
|
@@ -272,8 +330,8 @@
|
|
|
272
330
|
@apply bg-transparent;
|
|
273
331
|
}
|
|
274
332
|
|
|
275
|
-
/* Desktop Layout - Stretching (
|
|
276
|
-
@media (max-width:
|
|
333
|
+
/* Desktop Layout - Stretching (≤1156px). Use literal px — var() in @media is invalid CSS. */
|
|
334
|
+
@media (max-width: 1156px) {
|
|
277
335
|
:root {
|
|
278
336
|
--site-column-width: 64px;
|
|
279
337
|
--site-column-gap: 20px;
|
|
@@ -281,11 +339,14 @@
|
|
|
281
339
|
.site-grid {
|
|
282
340
|
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
283
341
|
max-width: none;
|
|
342
|
+
width: 100%;
|
|
343
|
+
padding-inline: 24px;
|
|
344
|
+
box-sizing: border-box;
|
|
284
345
|
}
|
|
285
346
|
}
|
|
286
347
|
|
|
287
|
-
/* Tablet (744px
|
|
288
|
-
@media (max-width:
|
|
348
|
+
/* Tablet (≤744px) */
|
|
349
|
+
@media (max-width: 744px) {
|
|
289
350
|
:root {
|
|
290
351
|
--site-columns-tablet: 8;
|
|
291
352
|
--site-column-gap: 16px;
|
|
@@ -297,11 +358,12 @@
|
|
|
297
358
|
.site-grid {
|
|
298
359
|
grid-template-columns: repeat(var(--site-columns-tablet), minmax(0, 1fr));
|
|
299
360
|
gap: 16px;
|
|
361
|
+
padding-inline: 16px;
|
|
300
362
|
}
|
|
301
363
|
}
|
|
302
364
|
|
|
303
|
-
/* Mobile (393px
|
|
304
|
-
@media (max-width:
|
|
365
|
+
/* Mobile (≤393px) */
|
|
366
|
+
@media (max-width: 393px) {
|
|
305
367
|
:root {
|
|
306
368
|
--site-columns-mobile: 4;
|
|
307
369
|
--dashboard-sidebar-width: auto;
|
|
@@ -309,6 +371,7 @@
|
|
|
309
371
|
.site-grid {
|
|
310
372
|
grid-template-columns: repeat(var(--site-columns-mobile), minmax(0, 1fr));
|
|
311
373
|
gap: 16px;
|
|
374
|
+
padding-inline: 16px;
|
|
312
375
|
}
|
|
313
376
|
}
|
|
314
377
|
|
|
@@ -551,7 +614,8 @@
|
|
|
551
614
|
|
|
552
615
|
/* Modal Button Styles */
|
|
553
616
|
.modal-btn-primary {
|
|
554
|
-
@apply h6 inline-flex items-center justify-center
|
|
617
|
+
@apply !h6 !inline-flex !items-center !justify-center;
|
|
618
|
+
cursor: pointer;
|
|
555
619
|
padding: 0 16px !important;
|
|
556
620
|
min-height: 34px !important;
|
|
557
621
|
border-radius: var(--radius-pill) !important;
|
|
@@ -567,7 +631,8 @@
|
|
|
567
631
|
}
|
|
568
632
|
|
|
569
633
|
.modal-btn-secondary {
|
|
570
|
-
@apply h6 inline-flex items-center justify-center
|
|
634
|
+
@apply !h6 !inline-flex !items-center !justify-center;
|
|
635
|
+
cursor: pointer;
|
|
571
636
|
padding: 0 16px !important;
|
|
572
637
|
min-height: 34px !important;
|
|
573
638
|
border-radius: var(--radius-pill) !important;
|
|
@@ -585,9 +650,9 @@
|
|
|
585
650
|
}
|
|
586
651
|
|
|
587
652
|
.modal-btn-attention {
|
|
588
|
-
@apply h6 inline-flex items-center justify-center
|
|
653
|
+
@apply !h6 !inline-flex !items-center !justify-center;
|
|
589
654
|
padding: 0 16px !important;
|
|
590
|
-
height: 34px;
|
|
655
|
+
height: 34px !important;
|
|
591
656
|
border-radius: var(--radius-pill) !important;
|
|
592
657
|
background-color: hsl(var(--error)) !important;
|
|
593
658
|
color: white !important;
|
|
@@ -604,7 +669,8 @@
|
|
|
604
669
|
|
|
605
670
|
/* Primary Button - Base styfles */
|
|
606
671
|
.btn-primary {
|
|
607
|
-
@apply inline-flex items-center justify-center gap-2
|
|
672
|
+
@apply !inline-flex !items-center !justify-center !gap-2;
|
|
673
|
+
cursor: pointer;
|
|
608
674
|
padding: 8px 16px !important;
|
|
609
675
|
height: 34px !important;
|
|
610
676
|
border-radius: var(--radius-small) !important;
|
|
@@ -624,7 +690,7 @@
|
|
|
624
690
|
|
|
625
691
|
/* Primary Button sizes */
|
|
626
692
|
.btn-primary-small {
|
|
627
|
-
@apply body-medium inline-flex items-center justify-center gap-1
|
|
693
|
+
@apply !body-medium !inline-flex !items-center !justify-center !gap-1;
|
|
628
694
|
padding: 4px 12px 6px 12px !important;
|
|
629
695
|
border-radius: var(--radius-medium) !important;
|
|
630
696
|
background-color: hsl(var(--deep-forest-green)) !important;
|
|
@@ -632,7 +698,7 @@
|
|
|
632
698
|
}
|
|
633
699
|
|
|
634
700
|
.btn-primary-large {
|
|
635
|
-
@apply body-medium inline-flex items-center justify-center gap-3
|
|
701
|
+
@apply !body-medium !inline-flex !items-center !justify-center !gap-3;
|
|
636
702
|
padding: 16px 32px !important;
|
|
637
703
|
min-height: 56px !important;
|
|
638
704
|
border-radius: var(--radius-medium) !important;
|
|
@@ -652,7 +718,8 @@
|
|
|
652
718
|
|
|
653
719
|
/* Secondary Button */
|
|
654
720
|
.btn-secondary {
|
|
655
|
-
@apply h6 inline-flex items-center justify-center gap-2
|
|
721
|
+
@apply !h6 !inline-flex !items-center !justify-center !gap-2;
|
|
722
|
+
cursor: pointer;
|
|
656
723
|
padding: 0 16px !important;
|
|
657
724
|
height: 34px !important;
|
|
658
725
|
border-radius: var(--radius-small) !important;
|
|
@@ -691,7 +758,7 @@
|
|
|
691
758
|
}
|
|
692
759
|
|
|
693
760
|
.dropdown-menu-item {
|
|
694
|
-
@apply flex items-center gap-2 w-full text-left h6 text-[hsl(var(--grey7))] whitespace-nowrap;
|
|
761
|
+
@apply !flex !items-center !gap-2 !w-full !text-left !h6 !text-[hsl(var(--grey7))] !whitespace-nowrap;
|
|
695
762
|
padding: 8px 16px;
|
|
696
763
|
}
|
|
697
764
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widgetic/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"svelte": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -15,22 +15,25 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"i": "rm -rf node_modules && rm -rf package-lock.json && npm i && npm link && npm run set-git",
|
|
18
|
-
"set-git": "git config core.ignorecase false",
|
|
19
18
|
"unlink": "rm -rf \"$(npm root -g)/@widgetic/design-system\" 2>/dev/null || true",
|
|
20
19
|
"clean-modules": "rm -rf node_modules",
|
|
21
20
|
"clean-svelte-cache": "rm -rf .svelte-kit && npx svelte-kit sync",
|
|
22
21
|
"clean-npm-cache": "npm cache clean --force",
|
|
23
22
|
"llinks": "ls -la node_modules/@widgetic",
|
|
24
23
|
"glinks": "npm ls --global | grep widgetic",
|
|
24
|
+
"set-git": "git config core.ignorecase false",
|
|
25
25
|
"dev": "concurrently \"npm run dev-sv\" \"npm run package:watch\"",
|
|
26
26
|
"dev-with-check": "NODE_ENV=development concurrently \"npm run check:watch\" \"npm run dev-sv\" \"npm run package:watch\"",
|
|
27
27
|
"dev-open": "npm run dev-sv -- --open",
|
|
28
28
|
"dev-sv": "NODE_ENV=development vite dev",
|
|
29
29
|
"watch": "concurrently \"npm run check:watch\" \"npm run lint -- --watch\" \"npm run package:watch\"",
|
|
30
30
|
"build": "rm -rf dist && NODE_ENV=production vite build && npm run package",
|
|
31
|
-
"package:watch": "NODE_ENV=development svelte-package --watch | grep -v '$app/environment'",
|
|
32
31
|
"build-sv": "vite build",
|
|
33
|
-
"package": "svelte-package | grep -v '$app/environment'",
|
|
32
|
+
"package:watch:svelte": "NODE_ENV=development svelte-package --watch | grep -v '$app/environment'",
|
|
33
|
+
"package:watch:css": "chokidar 'dist/styles/global.css' --debounce 500 -c \"npm run update-config-path\" --initial",
|
|
34
|
+
"package:watch": "concurrently \"npm run package:watch:svelte\" \"npm run package:watch:css\"",
|
|
35
|
+
"package": "NODE_ENV=production svelte-package | grep -v '$app/environment' && npm run update-config-path",
|
|
36
|
+
"update-config-path": "if [ -f dist/styles/global.css ] && grep -q '@config \"../../../tailwind.config.ts\";' dist/styles/global.css; then echo 'Updating @config path in dist/styles/global.css...'; sed -i.bak 's|@config \"../../../tailwind.config.ts\";|@config \"../../tailwind.config.ts\";|g' dist/styles/global.css && rm -f dist/styles/global.css.bak; else :; fi",
|
|
34
37
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
35
38
|
"check:watch": "NODE_OPTIONS='--max-old-space-size=8192' svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
36
39
|
"check:strict": "tsc --noEmit && npm run check",
|
|
@@ -39,9 +42,12 @@
|
|
|
39
42
|
"i-shadcn": "npm run clean-shadcn && npm run i-shadcn-init && npm run i-shadcn-comps",
|
|
40
43
|
"clean-shadcn": "rm -rf ./src/lib/components/ui",
|
|
41
44
|
"i-shadcn-init": "npx shadcn-svelte@next init",
|
|
42
|
-
"i-shadcn-comps": "npx shadcn-svelte@next add accordion badge button calendar
|
|
43
|
-
"format": "prettier --write
|
|
44
|
-
"
|
|
45
|
+
"i-shadcn-comps": "npx shadcn-svelte@next add accordion badge breadcrumb button calendar card checkbox collapsible command dialog drawer dropdown-menu hover-card input input-otp label popover progress radio-group range-calendar scroll-area select separator slider sonner switch table tabs textarea toogle toggle-group tooltip",
|
|
46
|
+
"format": "prettier --write \"src/**/*.{js,ts,svelte}\" \"*.{js,ts,json}\"",
|
|
47
|
+
"format:all": "prettier --write .",
|
|
48
|
+
"lint": "prettier --check \"src/**/*.{js,ts,svelte}\" \"*.{js,ts,json}\" && eslint .",
|
|
49
|
+
"lint:all": "prettier --check . && eslint .",
|
|
50
|
+
"clvtch": "rm -rf node_modules/.vite",
|
|
45
51
|
"prepublishOnly": "npm run package",
|
|
46
52
|
"publish-package": "npm run package && npm publish"
|
|
47
53
|
},
|
|
@@ -56,6 +62,11 @@
|
|
|
56
62
|
"svelte": "./dist/components/index.js",
|
|
57
63
|
"default": "./dist/components/index.js"
|
|
58
64
|
},
|
|
65
|
+
"./shad-editor": {
|
|
66
|
+
"types": "./dist/shad-editor/index.d.ts",
|
|
67
|
+
"svelte": "./dist/shad-editor/index.js",
|
|
68
|
+
"default": "./dist/shad-editor/index.js"
|
|
69
|
+
},
|
|
59
70
|
"./components/*": {
|
|
60
71
|
"types": "./dist/components/*.d.ts",
|
|
61
72
|
"svelte": "./dist/components/*.js",
|
|
@@ -107,14 +118,37 @@
|
|
|
107
118
|
"tailwind.config.ts"
|
|
108
119
|
],
|
|
109
120
|
"devDependencies": {
|
|
110
|
-
"@internationalized/date": "^3.6.0",
|
|
111
121
|
"@sveltejs/adapter-node": "^5.2.9",
|
|
112
|
-
"@sveltejs/kit": "^2.20.
|
|
122
|
+
"@sveltejs/kit": "^2.20.7",
|
|
113
123
|
"@sveltejs/package": "^2.3.7",
|
|
114
124
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
125
|
+
"@tailwindcss/postcss": "^4.1.4",
|
|
126
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
127
|
+
"@tiptap/core": "^2.9.1",
|
|
128
|
+
"@tiptap/extension-bubble-menu": "^2.9.1",
|
|
129
|
+
"@tiptap/extension-code-block-lowlight": "^2.9.1",
|
|
130
|
+
"@tiptap/extension-color": "^2.9.1",
|
|
131
|
+
"@tiptap/extension-floating-menu": "^2.27.2",
|
|
132
|
+
"@tiptap/extension-highlight": "^2.9.1",
|
|
133
|
+
"@tiptap/extension-image": "^2.9.1",
|
|
134
|
+
"@tiptap/extension-link": "^2.9.1",
|
|
135
|
+
"@tiptap/extension-subscript": "^2.9.1",
|
|
136
|
+
"@tiptap/extension-superscript": "^2.9.1",
|
|
137
|
+
"@tiptap/extension-table": "^2.9.1",
|
|
138
|
+
"@tiptap/extension-table-cell": "^2.9.1",
|
|
139
|
+
"@tiptap/extension-table-header": "^2.9.1",
|
|
140
|
+
"@tiptap/extension-table-row": "^2.9.1",
|
|
141
|
+
"@tiptap/extension-task-item": "^2.9.1",
|
|
142
|
+
"@tiptap/extension-task-list": "^2.9.1",
|
|
143
|
+
"@tiptap/extension-text": "^2.9.1",
|
|
144
|
+
"@tiptap/extension-text-align": "^2.9.1",
|
|
145
|
+
"@tiptap/extension-text-style": "^2.9.1",
|
|
146
|
+
"@tiptap/extension-typography": "^2.9.1",
|
|
147
|
+
"@tiptap/extension-underline": "^2.9.1",
|
|
148
|
+
"@tiptap/pm": "^2.9.1",
|
|
149
|
+
"@tiptap/starter-kit": "^2.9.1",
|
|
115
150
|
"@types/node": "^22.10.1",
|
|
116
|
-
"
|
|
117
|
-
"clsx": "^2.1.1",
|
|
151
|
+
"chokidar-cli": "^3.0.0",
|
|
118
152
|
"concurrently": "^9.1.0",
|
|
119
153
|
"eslint": "^9.7.0",
|
|
120
154
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -122,29 +156,47 @@
|
|
|
122
156
|
"eslint-plugin-svelte": "^2.36.0",
|
|
123
157
|
"globals": "^15.0.0",
|
|
124
158
|
"lowlight": "^3.2.0",
|
|
125
|
-
"
|
|
159
|
+
"postcss": "^8.5.3",
|
|
126
160
|
"prettier": "^3.3.2",
|
|
127
161
|
"prettier-plugin-svelte": "^3.2.6",
|
|
128
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
162
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
129
163
|
"svelte": "^5.46.3",
|
|
130
|
-
"svelte-check": "^4.1.
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
"
|
|
164
|
+
"svelte-check": "^4.1.6",
|
|
165
|
+
"svelte-tiptap": "^2.0.3",
|
|
166
|
+
"tailwind-merge": "^2.5.5",
|
|
167
|
+
"tailwind-variants": "^0.3.0",
|
|
168
|
+
"tailwindcss": "^4.1.4",
|
|
169
|
+
"tailwindcss-animate": "^1.0.7",
|
|
170
|
+
"typescript": "^5.8.3",
|
|
171
|
+
"typescript-eslint": "^8.32.1",
|
|
172
|
+
"vite": "^6.2.6"
|
|
139
173
|
},
|
|
140
174
|
"dependencies": {
|
|
141
175
|
"@hirasso/thumbhash-custom-element": "^0.5.5",
|
|
142
|
-
"@
|
|
143
|
-
"@
|
|
176
|
+
"@internationalized/date": "^3.6.0",
|
|
177
|
+
"@tabler/icons-svelte": "^3.33.0",
|
|
178
|
+
"bits-ui": "^2.16.3",
|
|
179
|
+
"clsx": "^2.1.1",
|
|
180
|
+
"concurrently": "^9.1.0",
|
|
181
|
+
"eslint": "^9.7.0",
|
|
182
|
+
"eslint-config-prettier": "^9.1.0",
|
|
183
|
+
"eslint-plugin-import": "^2.29.1",
|
|
184
|
+
"eslint-plugin-svelte": "^2.36.0",
|
|
185
|
+
"globals": "^15.0.0",
|
|
186
|
+
"lucide-svelte": "^0.546.0",
|
|
187
|
+
"mode-watcher": "^0.5.0",
|
|
188
|
+
"pdfjs-dist": "^4.10.38",
|
|
189
|
+
"shadcn-svelte": "1.0.0-next.9",
|
|
190
|
+
"svelte-awesome-color-picker": "^3.1.4",
|
|
191
|
+
"svelte-sonner": "^1.0.3",
|
|
192
|
+
"vaul-svelte": "^1.0.0-next.3"
|
|
193
|
+
},
|
|
194
|
+
"peerDependencies": {
|
|
144
195
|
"@tiptap/core": "^2.9.1",
|
|
145
196
|
"@tiptap/extension-bubble-menu": "^2.9.1",
|
|
146
197
|
"@tiptap/extension-code-block-lowlight": "^2.9.1",
|
|
147
198
|
"@tiptap/extension-color": "^2.9.1",
|
|
199
|
+
"@tiptap/extension-floating-menu": "^2.27.2",
|
|
148
200
|
"@tiptap/extension-highlight": "^2.9.1",
|
|
149
201
|
"@tiptap/extension-image": "^2.9.1",
|
|
150
202
|
"@tiptap/extension-link": "^2.9.1",
|
|
@@ -163,16 +215,88 @@
|
|
|
163
215
|
"@tiptap/extension-underline": "^2.9.1",
|
|
164
216
|
"@tiptap/pm": "^2.9.1",
|
|
165
217
|
"@tiptap/starter-kit": "^2.9.1",
|
|
166
|
-
"bits-ui": "^1.3.0",
|
|
167
218
|
"lowlight": "^3.2.0",
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
"
|
|
175
|
-
|
|
176
|
-
|
|
219
|
+
"svelte-tiptap": "^2.0.3"
|
|
220
|
+
},
|
|
221
|
+
"peerDependenciesMeta": {
|
|
222
|
+
"@tiptap/core": {
|
|
223
|
+
"optional": true
|
|
224
|
+
},
|
|
225
|
+
"@tiptap/extension-bubble-menu": {
|
|
226
|
+
"optional": true
|
|
227
|
+
},
|
|
228
|
+
"@tiptap/extension-code-block-lowlight": {
|
|
229
|
+
"optional": true
|
|
230
|
+
},
|
|
231
|
+
"@tiptap/extension-color": {
|
|
232
|
+
"optional": true
|
|
233
|
+
},
|
|
234
|
+
"@tiptap/extension-floating-menu": {
|
|
235
|
+
"optional": true
|
|
236
|
+
},
|
|
237
|
+
"@tiptap/extension-highlight": {
|
|
238
|
+
"optional": true
|
|
239
|
+
},
|
|
240
|
+
"@tiptap/extension-image": {
|
|
241
|
+
"optional": true
|
|
242
|
+
},
|
|
243
|
+
"@tiptap/extension-link": {
|
|
244
|
+
"optional": true
|
|
245
|
+
},
|
|
246
|
+
"@tiptap/extension-subscript": {
|
|
247
|
+
"optional": true
|
|
248
|
+
},
|
|
249
|
+
"@tiptap/extension-superscript": {
|
|
250
|
+
"optional": true
|
|
251
|
+
},
|
|
252
|
+
"@tiptap/extension-table": {
|
|
253
|
+
"optional": true
|
|
254
|
+
},
|
|
255
|
+
"@tiptap/extension-table-cell": {
|
|
256
|
+
"optional": true
|
|
257
|
+
},
|
|
258
|
+
"@tiptap/extension-table-header": {
|
|
259
|
+
"optional": true
|
|
260
|
+
},
|
|
261
|
+
"@tiptap/extension-table-row": {
|
|
262
|
+
"optional": true
|
|
263
|
+
},
|
|
264
|
+
"@tiptap/extension-task-item": {
|
|
265
|
+
"optional": true
|
|
266
|
+
},
|
|
267
|
+
"@tiptap/extension-task-list": {
|
|
268
|
+
"optional": true
|
|
269
|
+
},
|
|
270
|
+
"@tiptap/extension-text": {
|
|
271
|
+
"optional": true
|
|
272
|
+
},
|
|
273
|
+
"@tiptap/extension-text-align": {
|
|
274
|
+
"optional": true
|
|
275
|
+
},
|
|
276
|
+
"@tiptap/extension-text-style": {
|
|
277
|
+
"optional": true
|
|
278
|
+
},
|
|
279
|
+
"@tiptap/extension-typography": {
|
|
280
|
+
"optional": true
|
|
281
|
+
},
|
|
282
|
+
"@tiptap/extension-underline": {
|
|
283
|
+
"optional": true
|
|
284
|
+
},
|
|
285
|
+
"@tiptap/pm": {
|
|
286
|
+
"optional": true
|
|
287
|
+
},
|
|
288
|
+
"@tiptap/starter-kit": {
|
|
289
|
+
"optional": true
|
|
290
|
+
},
|
|
291
|
+
"lowlight": {
|
|
292
|
+
"optional": true
|
|
293
|
+
},
|
|
294
|
+
"svelte-tiptap": {
|
|
295
|
+
"optional": true
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"volta": {
|
|
299
|
+
"node": "22.14.0",
|
|
300
|
+
"npm": "11.1.0"
|
|
177
301
|
}
|
|
178
302
|
}
|
package/tailwind.config.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { fontFamily } from "tailwindcss/defaultTheme";
|
|
2
1
|
import type { Config } from "tailwindcss";
|
|
3
2
|
import tailwindcssAnimate from "tailwindcss-animate";
|
|
4
3
|
import tailwindcssTypography from '@tailwindcss/typography';
|
|
5
4
|
|
|
6
5
|
const config: Config = {
|
|
7
|
-
darkMode:
|
|
6
|
+
darkMode: "class",
|
|
8
7
|
content: ["./src/**/*.{html,js,svelte,ts}"],
|
|
9
|
-
safelist: ["dark"],
|
|
10
8
|
theme: {
|
|
11
9
|
container: {
|
|
12
10
|
center: true,
|
|
@@ -60,6 +58,18 @@ const config: Config = {
|
|
|
60
58
|
border: "hsl(var(--sidebar-border))",
|
|
61
59
|
ring: "hsl(var(--sidebar-ring))",
|
|
62
60
|
},
|
|
61
|
+
// Widgetic DS palette (CSS vars defined in global.css)
|
|
62
|
+
dark: "hsl(var(--dark) / <alpha-value>)",
|
|
63
|
+
"deep-forest-green": "hsl(var(--deep-forest-green) / <alpha-value>)",
|
|
64
|
+
"sage-green": "hsl(var(--sage-green) / <alpha-value>)",
|
|
65
|
+
"light-green": "hsl(var(--light-green) / <alpha-value>)",
|
|
66
|
+
"forest-green": "hsl(var(--forest-green) / <alpha-value>)",
|
|
67
|
+
error: "hsl(var(--error) / <alpha-value>)",
|
|
68
|
+
grey1: "hsl(var(--grey1) / <alpha-value>)",
|
|
69
|
+
grey2: "hsl(var(--grey2) / <alpha-value>)",
|
|
70
|
+
grey3: "hsl(var(--grey3) / <alpha-value>)",
|
|
71
|
+
grey5: "hsl(var(--grey5) / <alpha-value>)",
|
|
72
|
+
grey7: "hsl(var(--grey7) / <alpha-value>)",
|
|
63
73
|
},
|
|
64
74
|
borderRadius: {
|
|
65
75
|
xl: "calc(var(--radius) + 4px)",
|
|
@@ -67,9 +77,6 @@ const config: Config = {
|
|
|
67
77
|
md: "calc(var(--radius) - 2px)",
|
|
68
78
|
sm: "calc(var(--radius) - 4px)"
|
|
69
79
|
},
|
|
70
|
-
fontFamily: {
|
|
71
|
-
sans: [...fontFamily.sans]
|
|
72
|
-
},
|
|
73
80
|
keyframes: {
|
|
74
81
|
"accordion-down": {
|
|
75
82
|
from: { height: "0" },
|