@widgetic/design-system 0.5.29 → 0.5.31
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/components/chat/OptionRow.svelte +1 -1
- package/dist/components/chat/SuggestionCard.svelte +13 -1
- package/dist/components/chat/SuggestionCard.svelte.d.ts +5 -0
- package/dist/components/color-picker/ColorPicker.svelte +324 -0
- package/dist/components/color-picker/ColorPicker.svelte.d.ts +34 -0
- package/dist/components/color-picker/colorPickerLogic.d.ts +77 -0
- package/dist/components/color-picker/colorPickerLogic.js +184 -0
- package/dist/components/color-picker/index.d.ts +2 -0
- package/dist/components/color-picker/index.js +3 -0
- package/dist/components/font-picker/FontPicker.svelte +169 -0
- package/dist/components/font-picker/FontPicker.svelte.d.ts +41 -0
- package/dist/components/font-picker/fontPickerLogic.d.ts +21 -0
- package/dist/components/font-picker/fontPickerLogic.js +29 -0
- package/dist/components/font-picker/index.d.ts +2 -0
- package/dist/components/font-picker/index.js +3 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +3 -1
- package/dist/components/modals/BaseModal.svelte +6 -6
- package/dist/components/shell/NotificationDetail.svelte +96 -0
- package/dist/components/shell/NotificationDetail.svelte.d.ts +28 -0
- package/dist/components/shell/NotificationRow.svelte +6 -4
- package/dist/components/shell/SettingsDialog.svelte +22 -8
- package/dist/components/shell/SettingsDialog.svelte.d.ts +5 -0
- package/dist/components/shell/SettingsNav.svelte +72 -23
- package/dist/components/shell/SettingsNav.svelte.d.ts +7 -0
- package/dist/components/shell/index.d.ts +1 -0
- package/dist/components/shell/index.js +1 -0
- package/dist/components/toast/ToasterModal.svelte +19 -29
- package/dist/components/ui/button/button.svelte +11 -9
- package/dist/components/ui/button/button.svelte.d.ts +2 -2
- 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/dropdown-menu/dropdown-menu-checkbox-item.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/icon-button/icon-button.svelte +7 -6
- package/dist/components/ui/icon-button/icon-button.svelte.d.ts +2 -2
- package/dist/components/ui/select/select-item.svelte +18 -7
- package/dist/components/ui/select/select-item.svelte.d.ts +8 -2
- package/dist/components/ui/slider/slider.svelte +31 -5
- package/dist/components/ui/tabs/tabs-trigger.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/styles/fonts.css +4 -33
- package/dist/styles/global.css +114 -20
- package/dist/styles/tokens.css +6 -10
- package/dist/utils/overlayMotion.d.ts +11 -1
- package/dist/utils/overlayMotion.js +16 -8
- package/dist/utils/toastMotion.d.ts +12 -0
- package/dist/utils/toastMotion.js +12 -0
- package/package.json +2 -2
- package/tailwind.config.ts +4 -11
- package/dist/fonts/Cousine/Cousine-Bold.woff2 +0 -0
- package/dist/fonts/Cousine/Cousine-Regular.woff2 +0 -0
package/dist/styles/fonts.css
CHANGED
|
@@ -124,24 +124,10 @@
|
|
|
124
124
|
font-display: swap;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
/*
|
|
128
|
-
|
|
129
|
-
font-family: 'Cousine';
|
|
130
|
-
src: url('../fonts/Cousine/Cousine-Regular.woff2') format('woff2');
|
|
131
|
-
font-weight: 400;
|
|
132
|
-
font-style: normal;
|
|
133
|
-
font-display: swap;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@font-face {
|
|
137
|
-
font-family: 'Cousine';
|
|
138
|
-
src: url('../fonts/Cousine/Cousine-Bold.woff2') format('woff2');
|
|
139
|
-
font-weight: 700;
|
|
140
|
-
font-style: normal;
|
|
141
|
-
font-display: swap;
|
|
142
|
-
}
|
|
127
|
+
/* Cousine (Code & Embed Snippets) was removed in round 31: no Figma style, no utility in use and no consumer set a font in it.
|
|
128
|
+
Code is JetBrains Mono, everywhere. */
|
|
143
129
|
|
|
144
|
-
/* Typography Utilities updated to Inter, JetBrains Mono
|
|
130
|
+
/* Typography Utilities updated to Inter, JetBrains Mono and Figma Foundations (node 41:90) */
|
|
145
131
|
@utility h1 {
|
|
146
132
|
font-family: 'Inter', system-ui, sans-serif;
|
|
147
133
|
font-weight: 800;
|
|
@@ -436,22 +422,7 @@
|
|
|
436
422
|
letter-spacing: -3.24px;
|
|
437
423
|
}
|
|
438
424
|
|
|
439
|
-
/* 14.
|
|
440
|
-
@utility mono-code {
|
|
441
|
-
font-family: 'Cousine', monospace;
|
|
442
|
-
font-size: 12px;
|
|
443
|
-
line-height: 19.8px;
|
|
444
|
-
font-weight: 400;
|
|
445
|
-
letter-spacing: -0.24px;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
@utility code-snippet {
|
|
449
|
-
font-family: 'Cousine', monospace;
|
|
450
|
-
font-size: 12px;
|
|
451
|
-
line-height: 19.8px;
|
|
452
|
-
font-weight: 400;
|
|
453
|
-
letter-spacing: -0.24px;
|
|
454
|
-
}
|
|
425
|
+
/* 14. (mono-code and code-snippet, set in Cousine, were removed in round 31: nothing used them. Use text-code, or font-mono.) */
|
|
455
426
|
|
|
456
427
|
@utility label-cta {
|
|
457
428
|
font-family: 'Inter', system-ui, sans-serif;
|
package/dist/styles/global.css
CHANGED
|
@@ -28,18 +28,10 @@ go 3 levels up in development mode, 2 levels up in production mode*/
|
|
|
28
28
|
--color-grey6: hsl(var(--grey6));
|
|
29
29
|
--color-grey7: hsl(var(--grey7));
|
|
30
30
|
|
|
31
|
-
/* Figma Foundations Tokens (01 — Foundations 38:142) */
|
|
31
|
+
/* Figma Foundations Tokens (01 — Foundations 38:142). Round 31 removed the eight that no code read (ink-secondary, ink-muted, surface-canvas, surface-dark, surface-ink-on-dark, accent-orange, accent-green, primary-green-muted): see __docs/migrating-to-the-new-tokens.md. */
|
|
32
32
|
--color-ink-primary: hsl(var(--ink-primary));
|
|
33
33
|
--color-primary-green: hsl(var(--primary-green));
|
|
34
|
-
--color-ink-secondary: hsl(var(--ink-secondary));
|
|
35
|
-
--color-ink-muted: hsl(var(--ink-muted));
|
|
36
34
|
--color-ink-subtle: hsl(var(--ink-subtle));
|
|
37
|
-
--color-surface-canvas: hsl(var(--surface-canvas));
|
|
38
|
-
--color-surface-dark: hsl(var(--surface-dark));
|
|
39
|
-
--color-surface-ink-on-dark: hsl(var(--surface-ink-on-dark));
|
|
40
|
-
--color-accent-orange: hsl(var(--accent-orange));
|
|
41
|
-
--color-accent-green: hsl(var(--accent-green));
|
|
42
|
-
--color-primary-green-muted: hsl(var(--primary-green-muted));
|
|
43
35
|
|
|
44
36
|
--radius-pill: 100px;
|
|
45
37
|
--radius-large: 15px;
|
|
@@ -135,8 +127,7 @@ go 3 levels up in development mode, 2 levels up in production mode*/
|
|
|
135
127
|
--scrollbar-thumb-hover-color: hsl(var(--grey3));
|
|
136
128
|
--scrollbar-track-color: hsl(var(--grey1));
|
|
137
129
|
|
|
138
|
-
/* Icon Colors */
|
|
139
|
-
--icon-success: 142 71% 45%;
|
|
130
|
+
/* Icon Colors (--icon-success was removed in round 31: nothing read it) */
|
|
140
131
|
--icon-error: 0 84% 60%;
|
|
141
132
|
|
|
142
133
|
|
|
@@ -161,18 +152,10 @@ go 3 levels up in development mode, 2 levels up in production mode*/
|
|
|
161
152
|
--grey6: 0 0% 26.7%; /* #444444 */
|
|
162
153
|
--grey7: 124 36.2% 9.2%; /* #0F2010 */
|
|
163
154
|
|
|
164
|
-
/* Figma Foundations Tokens (01 — Foundations 38:142) */
|
|
155
|
+
/* Figma Foundations Tokens (01 — Foundations 38:142). The other eight of this block were removed in round 31 (nothing read them). */
|
|
165
156
|
--ink-primary: 124 36.2% 9.2%; /* #0F2010 */
|
|
166
157
|
--primary-green: 116.3 25.4% 24.7%; /* #314F2F */
|
|
167
|
-
--ink-secondary: 0 0% 26.7%; /* #444444 */
|
|
168
|
-
--ink-muted: 0 0% 45.9%; /* #757575 */
|
|
169
158
|
--ink-subtle: 0 0% 40%; /* #666666 */
|
|
170
|
-
--surface-canvas: 0 0% 100%; /* #FFFFFF */
|
|
171
|
-
--surface-dark: 124 36.2% 9.2%; /* #0F2010 */
|
|
172
|
-
--surface-ink-on-dark: 0 0% 100%; /* #FFFFFF */
|
|
173
|
-
--accent-orange: 0 88.6% 65.7%; /* #F55A5A */
|
|
174
|
-
--accent-green: 101.6 25.8% 52.9%; /* #7BA668 */
|
|
175
|
-
--primary-green-muted: 88.2 20% 83.3%; /* #D5DDCC */
|
|
176
159
|
|
|
177
160
|
|
|
178
161
|
|
|
@@ -953,6 +936,117 @@ go 3 levels up in development mode, 2 levels up in production mode*/
|
|
|
953
936
|
}
|
|
954
937
|
} /* End of Base Layer Styles */
|
|
955
938
|
|
|
939
|
+
/* Centred bits-ui dialog panels: fade + 20px slide (no zoom); composes with -translate-x/y-1/2 centering. */
|
|
940
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
941
|
+
[data-widgetic-overlay='dialog-panel'][data-state='open'] {
|
|
942
|
+
animation: widgetic-dialog-enter 200ms cubic-bezier(0.33, 1, 0.68, 1) both;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
[data-widgetic-overlay='dialog-panel'][data-state='closed'] {
|
|
946
|
+
animation: widgetic-dialog-exit 200ms cubic-bezier(0.33, 1, 0.68, 1) both;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
@media (prefers-reduced-motion: reduce) {
|
|
951
|
+
[data-widgetic-overlay='dialog-panel'][data-state='open'] {
|
|
952
|
+
animation: widgetic-dialog-fade-in 200ms cubic-bezier(0.33, 1, 0.68, 1) both;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
[data-widgetic-overlay='dialog-panel'][data-state='closed'] {
|
|
956
|
+
animation: widgetic-dialog-fade-out 200ms cubic-bezier(0.33, 1, 0.68, 1) both;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
@keyframes widgetic-dialog-enter {
|
|
961
|
+
from {
|
|
962
|
+
opacity: 0;
|
|
963
|
+
transform: translate(-50%, calc(-50% + 20px));
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
to {
|
|
967
|
+
opacity: 1;
|
|
968
|
+
transform: translate(-50%, -50%);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
@keyframes widgetic-dialog-exit {
|
|
973
|
+
from {
|
|
974
|
+
opacity: 1;
|
|
975
|
+
transform: translate(-50%, -50%);
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
to {
|
|
979
|
+
opacity: 0;
|
|
980
|
+
transform: translate(-50%, calc(-50% + 20px));
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
@keyframes widgetic-dialog-fade-in {
|
|
985
|
+
from {
|
|
986
|
+
opacity: 0;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
to {
|
|
990
|
+
opacity: 1;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
@keyframes widgetic-dialog-fade-out {
|
|
995
|
+
from {
|
|
996
|
+
opacity: 1;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
to {
|
|
1000
|
+
opacity: 0;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/* Toast (ToasterModal): top-centre pill, slide in, fade out in place. */
|
|
1005
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1006
|
+
[data-sonner-toaster][data-y-position='top'] {
|
|
1007
|
+
top: 1rem !important;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
[data-sonner-toaster][data-y-position='top'] [data-sonner-toast][data-mounted] {
|
|
1011
|
+
animation: widgetic-toast-enter var(--toast-enter-ms, 200ms) cubic-bezier(0.33, 1, 0.68, 1);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
[data-sonner-toaster][data-y-position='top'] [data-sonner-toast][data-removed='true'] {
|
|
1015
|
+
animation: widgetic-toast-exit var(--toast-exit-ms, 150ms) ease-out forwards;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
@keyframes widgetic-toast-enter {
|
|
1020
|
+
from {
|
|
1021
|
+
opacity: 0;
|
|
1022
|
+
transform: translate(-50%, -16px);
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
to {
|
|
1026
|
+
opacity: 1;
|
|
1027
|
+
transform: translate(-50%, 0);
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
@keyframes widgetic-toast-exit {
|
|
1032
|
+
from {
|
|
1033
|
+
opacity: 1;
|
|
1034
|
+
transform: translate(-50%, 0);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
to {
|
|
1038
|
+
opacity: 0;
|
|
1039
|
+
transform: translate(-50%, 0);
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1044
|
+
[data-sonner-toaster][data-y-position='top'] [data-sonner-toast][data-mounted],
|
|
1045
|
+
[data-sonner-toaster][data-y-position='top'] [data-sonner-toast][data-removed='true'] {
|
|
1046
|
+
animation: none !important;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
956
1050
|
/* Debug styles */
|
|
957
1051
|
[data-debug="true"] [data-debug-footer] {
|
|
958
1052
|
@apply bg-blue-100/30;
|
package/dist/styles/tokens.css
CHANGED
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
--color-amber: #b45309;
|
|
17
17
|
--color-sage-green: #7ba668;
|
|
18
18
|
--color-light-green: #e3f0db;
|
|
19
|
+
/*
|
|
20
|
+
* Success toast pill (round 5): the green of the reference toast, one step darker so that white 14px/500 text keeps 4.5:1 (4.54:1).
|
|
21
|
+
* Used by the toast only, and not a Figma variable yet (add it to the Color collection before it is used anywhere else).
|
|
22
|
+
*/
|
|
23
|
+
--color-toast-green: #008932;
|
|
19
24
|
|
|
20
25
|
--color-alpha-dark-04: color-mix(in oklab, var(--color-dark) 4%, transparent);
|
|
21
26
|
--color-alpha-dark-08: color-mix(in oklab, var(--color-dark) 8%, transparent);
|
|
@@ -56,7 +61,7 @@
|
|
|
56
61
|
--accent-hover: var(--color-alpha-dark-08);
|
|
57
62
|
--destructive: var(--color-error);
|
|
58
63
|
--destructive-foreground: var(--color-white);
|
|
59
|
-
/* Warning icon and text, 5.0:1 on white
|
|
64
|
+
/* Warning icon and text, 5.0:1 on white, and the surface of the Warning toast (white text on it is 5.0:1 too). Never a button. */
|
|
60
65
|
--warning: var(--color-amber);
|
|
61
66
|
--brand: var(--color-sage-green);
|
|
62
67
|
--brand-foreground: var(--color-dark);
|
|
@@ -67,11 +72,8 @@
|
|
|
67
72
|
--ring: var(--color-deep-forest-green);
|
|
68
73
|
--sidebar: var(--color-neutral-100);
|
|
69
74
|
--sidebar-foreground: var(--color-dark);
|
|
70
|
-
--sidebar-primary: var(--color-deep-forest-green);
|
|
71
|
-
--sidebar-primary-foreground: var(--color-white);
|
|
72
75
|
--sidebar-accent: var(--color-alpha-dark-04);
|
|
73
76
|
--sidebar-accent-foreground: var(--color-dark);
|
|
74
|
-
--sidebar-border: var(--color-neutral-200);
|
|
75
77
|
--sidebar-ring: var(--color-deep-forest-green);
|
|
76
78
|
--shadow-soft: var(--color-alpha-dark-08);
|
|
77
79
|
--inverse: var(--color-dark);
|
|
@@ -170,11 +172,8 @@
|
|
|
170
172
|
--ring: var(--color-sage-green);
|
|
171
173
|
--sidebar: var(--color-dark);
|
|
172
174
|
--sidebar-foreground: var(--color-white);
|
|
173
|
-
--sidebar-primary: var(--color-sage-green);
|
|
174
|
-
--sidebar-primary-foreground: var(--color-dark);
|
|
175
175
|
--sidebar-accent: var(--color-alpha-light-10);
|
|
176
176
|
--sidebar-accent-foreground: var(--color-white);
|
|
177
|
-
--sidebar-border: var(--color-alpha-sage-25);
|
|
178
177
|
--sidebar-ring: var(--color-sage-green);
|
|
179
178
|
}
|
|
180
179
|
|
|
@@ -206,11 +205,8 @@
|
|
|
206
205
|
--color-ring: var(--ring);
|
|
207
206
|
--color-sidebar: var(--sidebar);
|
|
208
207
|
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
209
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
210
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
211
208
|
--color-sidebar-accent: var(--sidebar-accent);
|
|
212
209
|
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
213
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
214
210
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
215
211
|
--color-inverse: var(--inverse);
|
|
216
212
|
--color-inverse-foreground: var(--inverse-foreground);
|
|
@@ -15,6 +15,15 @@ export declare const overlayTransitionEasing: typeof cubicOut;
|
|
|
15
15
|
export declare const overlayBackdropBlurPx = 3;
|
|
16
16
|
/** Content scale at the start of the open transition / end of the close transition. */
|
|
17
17
|
export declare const overlayContentScaleStart = 0.95;
|
|
18
|
+
/**
|
|
19
|
+
* Centred dialogs slide this many pixels up on open and down on close, with the same duration as the fade.
|
|
20
|
+
* Tailwind spacing step (5 → 20px with the design-system scale).
|
|
21
|
+
*/
|
|
22
|
+
export declare const overlayContentSlideDistance = 5;
|
|
23
|
+
/** Pixel slide distance for Svelte `fly` on centred modals (Tailwind spacing step 5 → 20px). */
|
|
24
|
+
export declare const overlayContentSlidePx: number;
|
|
25
|
+
/** Tailwind slide utilities for centred dialog panels (not drawers/sheets that enter from the side). */
|
|
26
|
+
export declare const overlayDialogContentSlideClasses: readonly ["data-[state=closed]:slide-out-to-bottom-5", "data-[state=open]:slide-in-from-bottom-5"];
|
|
18
27
|
/**
|
|
19
28
|
* Tailwind duration class — must be a source literal so Tailwind's scanner emits `duration-[200ms]`.
|
|
20
29
|
* Kept in sync with `overlayTransitionDurationMs` (see tests/overlayMotionDuration.test.ts).
|
|
@@ -48,8 +57,9 @@ export declare const overlayEasingClass = "ease-[cubic-bezier(0.33,1,0.68,1)]";
|
|
|
48
57
|
* blur off. Literal so Tailwind's scanner emits it.
|
|
49
58
|
*/
|
|
50
59
|
export declare const overlayStackedScrimClass = "data-[stacked]:backdrop-blur-none";
|
|
51
|
-
/** Overlay + panel classes for bits-ui Dialog (
|
|
60
|
+
/** Overlay + panel classes for bits-ui Dialog (fade + slide, 200ms, cubic-out-like; no zoom). */
|
|
52
61
|
export declare const overlayDialogOverlayClasses: string;
|
|
62
|
+
/** Centred dialog panel motion is keyed in global.css (`widgetic-dialog-enter/exit`) so slide composes with -translate-x/y-1/2. */
|
|
53
63
|
export declare const overlayDialogContentClasses: string;
|
|
54
64
|
/** Applied with overlay dialog classes so users who prefer reduced motion get instant open/close. */
|
|
55
65
|
export declare const overlayReducedMotionClasses = "motion-reduce:!duration-0 motion-reduce:data-[state=open]:animate-none motion-reduce:data-[state=closed]:animate-none";
|
|
@@ -15,6 +15,18 @@ export const overlayTransitionEasing = cubicOut;
|
|
|
15
15
|
export const overlayBackdropBlurPx = 3;
|
|
16
16
|
/** Content scale at the start of the open transition / end of the close transition. */
|
|
17
17
|
export const overlayContentScaleStart = 0.95;
|
|
18
|
+
/**
|
|
19
|
+
* Centred dialogs slide this many pixels up on open and down on close, with the same duration as the fade.
|
|
20
|
+
* Tailwind spacing step (5 → 20px with the design-system scale).
|
|
21
|
+
*/
|
|
22
|
+
export const overlayContentSlideDistance = 5;
|
|
23
|
+
/** Pixel slide distance for Svelte `fly` on centred modals (Tailwind spacing step 5 → 20px). */
|
|
24
|
+
export const overlayContentSlidePx = overlayContentSlideDistance * 4;
|
|
25
|
+
/** Tailwind slide utilities for centred dialog panels (not drawers/sheets that enter from the side). */
|
|
26
|
+
export const overlayDialogContentSlideClasses = [
|
|
27
|
+
`data-[state=closed]:slide-out-to-bottom-${overlayContentSlideDistance}`,
|
|
28
|
+
`data-[state=open]:slide-in-from-bottom-${overlayContentSlideDistance}`
|
|
29
|
+
];
|
|
18
30
|
/**
|
|
19
31
|
* Tailwind duration class — must be a source literal so Tailwind's scanner emits `duration-[200ms]`.
|
|
20
32
|
* Kept in sync with `overlayTransitionDurationMs` (see tests/overlayMotionDuration.test.ts).
|
|
@@ -51,7 +63,7 @@ export const overlayEasingClass = 'ease-[cubic-bezier(0.33,1,0.68,1)]';
|
|
|
51
63
|
* blur off. Literal so Tailwind's scanner emits it.
|
|
52
64
|
*/
|
|
53
65
|
export const overlayStackedScrimClass = 'data-[stacked]:backdrop-blur-none';
|
|
54
|
-
/** Overlay + panel classes for bits-ui Dialog (
|
|
66
|
+
/** Overlay + panel classes for bits-ui Dialog (fade + slide, 200ms, cubic-out-like; no zoom). */
|
|
55
67
|
export const overlayDialogOverlayClasses = [
|
|
56
68
|
overlayScrimClasses,
|
|
57
69
|
overlayStackedScrimClass,
|
|
@@ -63,16 +75,12 @@ export const overlayDialogOverlayClasses = [
|
|
|
63
75
|
`data-[state=closed]:fade-out-0`,
|
|
64
76
|
`data-[state=open]:fade-in-0`
|
|
65
77
|
].join(' ');
|
|
78
|
+
/** Centred dialog panel motion is keyed in global.css (`widgetic-dialog-enter/exit`) so slide composes with -translate-x/y-1/2. */
|
|
66
79
|
export const overlayDialogContentClasses = [
|
|
67
80
|
overlayDurationClass,
|
|
68
81
|
overlayEasingClass,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
`data-[state=closed]:animate-out`,
|
|
72
|
-
`data-[state=closed]:fade-out-0`,
|
|
73
|
-
`data-[state=open]:fade-in-0`,
|
|
74
|
-
`data-[state=closed]:zoom-out-95`,
|
|
75
|
-
`data-[state=open]:zoom-in-95`
|
|
82
|
+
'widgetic-dialog-panel-motion',
|
|
83
|
+
...overlayDialogOpenClosedAnimationDurationClasses
|
|
76
84
|
].join(' ');
|
|
77
85
|
/** Applied with overlay dialog classes so users who prefer reduced motion get instant open/close. */
|
|
78
86
|
export const overlayReducedMotionClasses = 'motion-reduce:!duration-0 motion-reduce:data-[state=open]:animate-none motion-reduce:data-[state=closed]:animate-none';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast enter/exit motion aligned with round-5 site spec (OpenAI-style top pill).
|
|
3
|
+
* Change here when Figma Toast (135:87) motion updates.
|
|
4
|
+
*/
|
|
5
|
+
/** Slide-in from the top uses the same base duration as overlay fades. */
|
|
6
|
+
export declare const toastEnterDurationMs = 200;
|
|
7
|
+
/** Dismiss fades in place (no slide), slightly quicker than enter. */
|
|
8
|
+
export declare const toastExitDurationMs = 150;
|
|
9
|
+
/** Long titles wrap inside this width (px). */
|
|
10
|
+
export declare const toastMaxWidthPx = 420;
|
|
11
|
+
/** Literal for Tailwind scanner — keep in sync with `toastMaxWidthPx`. */
|
|
12
|
+
export declare const toastMaxWidthClass = "!max-w-[420px]";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast enter/exit motion aligned with round-5 site spec (OpenAI-style top pill).
|
|
3
|
+
* Change here when Figma Toast (135:87) motion updates.
|
|
4
|
+
*/
|
|
5
|
+
/** Slide-in from the top uses the same base duration as overlay fades. */
|
|
6
|
+
export const toastEnterDurationMs = 200;
|
|
7
|
+
/** Dismiss fades in place (no slide), slightly quicker than enter. */
|
|
8
|
+
export const toastExitDurationMs = 150;
|
|
9
|
+
/** Long titles wrap inside this width (px). */
|
|
10
|
+
export const toastMaxWidthPx = 420;
|
|
11
|
+
/** Literal for Tailwind scanner — keep in sync with `toastMaxWidthPx`. */
|
|
12
|
+
export const toastMaxWidthClass = '!max-w-[420px]';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widgetic/design-system",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.31",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"llinks": "ls -la node_modules/@widgetic",
|
|
21
21
|
"glinks": "npm ls --global | grep widgetic",
|
|
22
22
|
"set-git": "git config core.ignorecase false",
|
|
23
|
-
"ensure-fonts": "mkdir -p static/fonts && ln -sfn ../../src/lib/fonts/Inter static/fonts/Inter && ln -sfn ../../src/lib/fonts/JetBrainsMono static/fonts/JetBrainsMono
|
|
23
|
+
"ensure-fonts": "mkdir -p static/fonts && ln -sfn ../../src/lib/fonts/Inter static/fonts/Inter && ln -sfn ../../src/lib/fonts/JetBrainsMono static/fonts/JetBrainsMono",
|
|
24
24
|
"predev": "npm run ensure-fonts && npx svelte-kit sync",
|
|
25
25
|
"predev-sv": "npm run ensure-fonts && npx svelte-kit sync",
|
|
26
26
|
"dev": "npm run dev-sv",
|
package/tailwind.config.ts
CHANGED
|
@@ -30,25 +30,18 @@ const config: Config = {
|
|
|
30
30
|
grey5: "hsl(var(--grey5) / <alpha-value>)",
|
|
31
31
|
grey7: "hsl(var(--grey7) / <alpha-value>)",
|
|
32
32
|
|
|
33
|
-
// Figma Foundations Tokens (01 — Foundations 38:142)
|
|
33
|
+
// Figma Foundations Tokens (01 — Foundations 38:142). Round 31 removed the eight that no code read
|
|
34
|
+
// (ink-secondary, ink-muted, surface-canvas, surface-dark, surface-ink-on-dark, accent-orange, accent-green, primary-green-muted).
|
|
34
35
|
"ink-primary": "hsl(var(--ink-primary) / <alpha-value>)",
|
|
35
36
|
"primary-green": "hsl(var(--primary-green) / <alpha-value>)",
|
|
36
|
-
"ink-secondary": "hsl(var(--ink-secondary) / <alpha-value>)",
|
|
37
|
-
"ink-muted": "hsl(var(--ink-muted) / <alpha-value>)",
|
|
38
37
|
"ink-subtle": "hsl(var(--ink-subtle) / <alpha-value>)",
|
|
39
|
-
"surface-canvas": "hsl(var(--surface-canvas) / <alpha-value>)",
|
|
40
|
-
"surface-dark": "hsl(var(--surface-dark) / <alpha-value>)",
|
|
41
|
-
"surface-ink-on-dark": "hsl(var(--surface-ink-on-dark) / <alpha-value>)",
|
|
42
|
-
"accent-orange": "hsl(var(--accent-orange) / <alpha-value>)",
|
|
43
|
-
"accent-green": "hsl(var(--accent-green) / <alpha-value>)",
|
|
44
|
-
"primary-green-muted": "hsl(var(--primary-green-muted) / <alpha-value>)",
|
|
45
38
|
},
|
|
39
|
+
// Inter for the interface, JetBrains Mono for code. (Cousine was removed in round 31: nothing set a font in it.)
|
|
46
40
|
fontFamily: {
|
|
47
41
|
sans: ["Inter", "ui-sans-serif", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "sans-serif"],
|
|
48
42
|
inter: ["Inter", "sans-serif"],
|
|
49
|
-
mono: ["JetBrains Mono", "
|
|
43
|
+
mono: ["JetBrains Mono", "ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", "monospace"],
|
|
50
44
|
"jetbrains-mono": ["JetBrains Mono", "monospace"],
|
|
51
|
-
cousine: ["Cousine", "monospace"],
|
|
52
45
|
},
|
|
53
46
|
borderRadius: {
|
|
54
47
|
sm: "var(--radius-sm)",
|
|
Binary file
|
|
Binary file
|