@widgetic/design-system 0.5.25 → 0.5.27
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/CopyableHeader.svelte +41 -8
- package/dist/components/PasswordInput.svelte +2 -2
- package/dist/components/chat/ActivityRow.svelte +6 -6
- package/dist/components/chat/ChatHeader.svelte +5 -5
- package/dist/components/chat/Composer.svelte +2 -2
- package/dist/components/chat/Message.svelte +4 -4
- package/dist/components/chat/OptionRow.svelte +1 -1
- package/dist/components/chat/PlanCard.svelte +57 -4
- package/dist/components/chat/PlanCard.svelte.d.ts +15 -0
- package/dist/components/chat/ScrollToBottom.svelte +1 -1
- package/dist/components/chat/SuggestionCard.svelte +2 -2
- package/dist/components/chat/TaskRow.svelte +3 -3
- package/dist/components/modals/BaseModal.svelte +1 -1
- package/dist/components/search-input/SearchInput.svelte +2 -2
- package/dist/components/shell/Banner.svelte +4 -4
- package/dist/components/shell/Link.svelte +1 -1
- package/dist/components/shell/Link.svelte.d.ts +2 -2
- package/dist/components/shell/NavRow.svelte +1 -1
- package/dist/components/shell/NavRow.svelte.d.ts +2 -2
- package/dist/components/shell/SettingsDialog.svelte +1 -1
- package/dist/components/shell/WidgetRow.svelte.d.ts +1 -1
- package/dist/components/toast/ToasterModal.svelte +2 -2
- package/dist/components/ui/accordion/accordion-content.svelte +1 -1
- package/dist/components/ui/accordion/accordion-trigger.svelte +1 -1
- package/dist/components/ui/alert/index.d.ts +2 -2
- package/dist/components/ui/alert/index.js +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +1 -1
- package/dist/components/ui/button/button.svelte +1 -1
- package/dist/components/ui/button/button.svelte.d.ts +2 -2
- package/dist/components/ui/calendar/calendar-next-button.svelte +1 -1
- package/dist/components/ui/calendar/calendar-prev-button.svelte +1 -1
- package/dist/components/ui/calendar/calendar.svelte.d.ts +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +3 -3
- package/dist/components/ui/chip/chip.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/dialog/dialog-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +2 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +2 -2
- package/dist/components/ui/icon-button/icon-button.svelte +1 -1
- package/dist/components/ui/icon-button/icon-button.svelte.d.ts +2 -2
- package/dist/components/ui/input-otp/input-otp-separator.svelte +1 -1
- package/dist/components/ui/radio-group/radio-group-item.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-next-button.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar.svelte.d.ts +1 -1
- package/dist/components/ui/select/select-content.svelte +131 -6
- package/dist/components/ui/select/select-item.svelte +1 -1
- package/dist/components/ui/select/select-scroll-down-button.svelte +1 -1
- package/dist/components/ui/select/select-scroll-up-button.svelte +1 -1
- package/dist/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/stepper-button/stepper-button.svelte +9 -4
- package/dist/components/ui/stepper-button/stepper-button.svelte.d.ts +1 -0
- package/dist/components/ui/switch/switch.svelte +1 -1
- package/dist/components/ui/tag/tag.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/tokens.css +64 -3
- package/package.json +1 -1
package/dist/styles/tokens.css
CHANGED
|
@@ -21,10 +21,21 @@
|
|
|
21
21
|
--color-alpha-dark-08: color-mix(in oklab, var(--color-dark) 8%, transparent);
|
|
22
22
|
--color-alpha-dark-30: color-mix(in oklab, var(--color-dark) 30%, transparent);
|
|
23
23
|
--color-alpha-light-10: color-mix(in oklab, var(--color-white) 10%, transparent);
|
|
24
|
+
|
|
25
|
+
/* The primitives that only the Dark mode uses (Figma Primitives collection, added together with the Dark mode of Color). */
|
|
26
|
+
--color-alpha-light-30: color-mix(in oklab, var(--color-white) 30%, transparent);
|
|
27
|
+
--color-alpha-light-70: color-mix(in oklab, var(--color-white) 70%, transparent);
|
|
28
|
+
--color-alpha-forest-40: color-mix(in oklab, var(--color-deep-forest-green) 40%, transparent);
|
|
29
|
+
--color-alpha-sage-15: color-mix(in oklab, var(--color-sage-green) 15%, transparent);
|
|
30
|
+
--color-alpha-sage-25: color-mix(in oklab, var(--color-sage-green) 25%, transparent);
|
|
31
|
+
/* status/error-light: the error red for the dark surface, 5.3:1 on it (the red of the light mode is 3.3:1). */
|
|
32
|
+
--color-error-light: #f55a5a;
|
|
33
|
+
/* status/warning-light: the warning amber for the dark surface, 10.2:1 on it (the amber of the light mode is 3.4:1). */
|
|
34
|
+
--color-amber-light: #fbbf24;
|
|
24
35
|
}
|
|
25
36
|
|
|
26
37
|
:root {
|
|
27
|
-
/* Semantic colors (light mode).
|
|
38
|
+
/* Semantic colors (light mode). The Dark mode is the `.dark` block that follows this one. */
|
|
28
39
|
--background: var(--color-white);
|
|
29
40
|
--foreground: var(--color-dark);
|
|
30
41
|
--card: var(--color-white);
|
|
@@ -119,6 +130,54 @@
|
|
|
119
130
|
--shadow-floating: 0 4px 12px 0 var(--shadow-soft);
|
|
120
131
|
}
|
|
121
132
|
|
|
133
|
+
/*
|
|
134
|
+
* The Dark mode of the Color collection (Figma file GCC2aXrh3PEHlMWFaAOisR, mode "Dark" of the collection "Color").
|
|
135
|
+
* Put `class="dark"` on the root element, or on any element that should be dark (the tokens inherit): the semantic
|
|
136
|
+
* colours below replace the ones of `:root` for it and everything inside it, and `dark:` utilities follow
|
|
137
|
+
* (tailwind.config.ts: darkMode "class"). Nothing in the package sets the class, so nothing changes until an app does.
|
|
138
|
+
*
|
|
139
|
+
* One token to one token with the Figma variables: the same semantic names, pointing at the same primitives.
|
|
140
|
+
* Figma gives brand/default, brand/foreground, shadow/soft and inverse/* the same primitive in both modes, so they are
|
|
141
|
+
* not repeated here: they keep the value of `:root`.
|
|
142
|
+
*/
|
|
143
|
+
.dark {
|
|
144
|
+
color-scheme: dark;
|
|
145
|
+
|
|
146
|
+
--background: var(--color-dark);
|
|
147
|
+
--foreground: var(--color-white);
|
|
148
|
+
--card: var(--color-alpha-forest-40);
|
|
149
|
+
--card-foreground: var(--color-white);
|
|
150
|
+
--popover: var(--color-deep-forest-green);
|
|
151
|
+
--popover-foreground: var(--color-white);
|
|
152
|
+
--primary: var(--color-sage-green);
|
|
153
|
+
--primary-foreground: var(--color-dark);
|
|
154
|
+
--secondary: var(--color-alpha-light-10);
|
|
155
|
+
--secondary-foreground: var(--color-white);
|
|
156
|
+
--muted: var(--color-alpha-light-10);
|
|
157
|
+
--muted-foreground: var(--color-alpha-light-70);
|
|
158
|
+
--accent: var(--color-alpha-light-10);
|
|
159
|
+
--accent-foreground: var(--color-white);
|
|
160
|
+
/* Not a Figma variable, like --accent-hover of `:root`: the hover of a surface that is already accent, i.e. the accent
|
|
161
|
+
stacked on itself (white at 10% over white at 10% is about 20%). */
|
|
162
|
+
--accent-hover: color-mix(in oklab, var(--color-white) 20%, transparent);
|
|
163
|
+
--destructive: var(--color-error-light);
|
|
164
|
+
--destructive-foreground: var(--color-dark);
|
|
165
|
+
--warning: var(--color-amber-light);
|
|
166
|
+
--brand-subtle: var(--color-alpha-sage-15);
|
|
167
|
+
--border: var(--color-alpha-sage-25);
|
|
168
|
+
--border-strong: var(--color-alpha-light-30);
|
|
169
|
+
--input: var(--color-alpha-sage-25);
|
|
170
|
+
--ring: var(--color-sage-green);
|
|
171
|
+
--sidebar: var(--color-dark);
|
|
172
|
+
--sidebar-foreground: var(--color-white);
|
|
173
|
+
--sidebar-primary: var(--color-sage-green);
|
|
174
|
+
--sidebar-primary-foreground: var(--color-dark);
|
|
175
|
+
--sidebar-accent: var(--color-alpha-light-10);
|
|
176
|
+
--sidebar-accent-foreground: var(--color-white);
|
|
177
|
+
--sidebar-border: var(--color-alpha-sage-25);
|
|
178
|
+
--sidebar-ring: var(--color-sage-green);
|
|
179
|
+
}
|
|
180
|
+
|
|
122
181
|
@theme inline {
|
|
123
182
|
--color-background: var(--background);
|
|
124
183
|
--color-foreground: var(--foreground);
|
|
@@ -261,12 +320,14 @@
|
|
|
261
320
|
transform var(--duration-base) var(--ease-out);
|
|
262
321
|
}
|
|
263
322
|
|
|
264
|
-
&:active:not(:disabled):not([aria-disabled='true'])
|
|
323
|
+
&:active:not(:disabled):not([aria-disabled='true']),
|
|
324
|
+
&[data-pressed='true']:not(:disabled):not([aria-disabled='true']) {
|
|
265
325
|
transform: scale(var(--scale-press));
|
|
266
326
|
}
|
|
267
327
|
|
|
268
328
|
@media (prefers-reduced-motion: reduce) {
|
|
269
|
-
&:active:not(:disabled):not([aria-disabled='true'])
|
|
329
|
+
&:active:not(:disabled):not([aria-disabled='true']),
|
|
330
|
+
&[data-pressed='true']:not(:disabled):not([aria-disabled='true']) {
|
|
270
331
|
transform: none;
|
|
271
332
|
}
|
|
272
333
|
}
|