@vvedantb/ui 0.2.0 → 0.2.2
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 +89 -3
- package/app/README.md +100 -0
- package/app/src/confirm/ConfirmSkipHint.tsx +1 -1
- package/app/src/settings/SettingsEmptyState.tsx +2 -2
- package/app/src/settings/SettingsField.tsx +1 -1
- package/app/src/settings/SettingsSection.tsx +1 -1
- package/app/src/settings/SettingsToggleRow.tsx +1 -1
- package/package.json +16 -10
- package/shell/src/PillTabs.tsx +1 -1
- package/shell/src/SessionsHoverCard.tsx +148 -0
- package/shell/src/index.ts +5 -0
- package/src/ai-elements/artifact.tsx +1 -1
- package/src/ai-elements/attachments.tsx +3 -3
- package/src/ai-elements/chain-of-thought.tsx +5 -5
- package/src/ai-elements/code-block.tsx +2 -2
- package/src/ai-elements/conversation.tsx +2 -2
- package/src/ai-elements/inline-citation.tsx +6 -6
- package/src/ai-elements/message.tsx +2 -2
- package/src/ai-elements/prompt-input.tsx +3 -3
- package/src/ai-elements/queue.tsx +2 -2
- package/src/ai-elements/reasoning.tsx +1 -1
- package/src/ai-elements/shimmer.tsx +5 -5
- package/src/ai-elements/sources.tsx +2 -2
- package/src/ai-elements/speech-input.tsx +1 -1
- package/src/ai-elements/suggestion.tsx +1 -1
- package/src/audio/index.ts +3 -0
- package/src/audio/playChime.ts +76 -0
- package/src/audio/useReplyChime.ts +62 -0
- package/src/index.ts +2 -0
- package/src/ui/_menu-classes.alt.ts +2 -2
- package/src/ui/_menu-classes.ts +2 -2
- package/src/ui/accordion.alt.tsx +2 -2
- package/src/ui/badge.tsx +1 -1
- package/src/ui/breadcrumb.tsx +2 -2
- package/src/ui/button.tsx +3 -3
- package/src/ui/checkbox.tsx +1 -1
- package/src/ui/clear-input.alt.tsx +1 -1
- package/src/ui/clear-input.tsx +1 -1
- package/src/ui/command.tsx +5 -5
- package/src/ui/dialog.tsx +1 -1
- package/src/ui/input-group.alt.tsx +1 -1
- package/src/ui/input-group.tsx +2 -2
- package/src/ui/kbd.tsx +1 -1
- package/src/ui/labeled-switch-row.tsx +2 -2
- package/src/ui/progress.tsx +1 -1
- package/src/ui/radix-select.tsx +3 -3
- package/src/ui/search-input.tsx +1 -1
- package/src/ui/select.tsx +4 -4
- package/src/ui/sonner-icons.tsx +94 -0
- package/src/ui/sonner.tsx +167 -34
- package/src/ui/spinner.tsx +1 -1
- package/src/ui/switch.tsx +2 -2
- package/src/ui/table.tsx +2 -2
- package/src/ui/time-picker.tsx +3 -3
- package/tokens/README.md +98 -0
- package/tokens/examples/compat-shadcn-rgb/Fixture.tsx +45 -0
- package/tokens/examples/compat-shadcn-rgb/README.md +11 -0
- package/tokens/examples/compat-shadcn-rgb/index.html +12 -0
- package/tokens/examples/compat-shadcn-rgb/main.tsx +5 -0
- package/tokens/examples/compat-shadcn-rgb/package.json +14 -0
- package/tokens/examples/compat-shadcn-rgb/styles.css +67 -0
- package/tokens/examples/compat-shadcn-rgb/tsconfig.json +14 -0
- package/tokens/examples/compat-shadcn-rgb/vite.config.ts +11 -0
- package/tokens/examples/toaster/Fixture.tsx +53 -0
- package/tokens/examples/toaster/README.md +18 -0
- package/tokens/examples/toaster/compat.html +12 -0
- package/tokens/examples/toaster/main-compat.tsx +5 -0
- package/tokens/examples/toaster/main-tokens.tsx +5 -0
- package/tokens/examples/toaster/package.json +14 -0
- package/tokens/examples/toaster/styles-compat.css +82 -0
- package/tokens/examples/toaster/styles-tokens.css +16 -0
- package/tokens/examples/toaster/tokens.html +12 -0
- package/tokens/examples/toaster/tsconfig.json +14 -0
- package/tokens/examples/toaster/vite.config.ts +12 -0
- package/tokens/src/css/compat-shadcn-rgb.css +82 -0
- package/tokens/src/css/utilities.css +5 -0
- package/tokens/src/tailwind-preset.mjs +6 -0
- package/tokens/src/tokens.css +15 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"isolatedModules": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["*.ts", "*.tsx"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
2
|
+
import { defineConfig } from "vite";
|
|
3
|
+
|
|
4
|
+
// React, react-dom and the @vvedantb/ui peers resolve from packages/ui/node_modules
|
|
5
|
+
// (this folder sits inside that package), so the fixture installs only the build tools.
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [tailwindcss()],
|
|
8
|
+
esbuild: { jsx: "automatic" },
|
|
9
|
+
resolve: { dedupe: ["react", "react-dom"] },
|
|
10
|
+
server: { fs: { allow: ["../../.."] } },
|
|
11
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { toast } from "sonner";
|
|
3
|
+
import { Button } from "../../../src/ui/button";
|
|
4
|
+
import { SonnerToaster } from "../../../src/ui/sonner";
|
|
5
|
+
|
|
6
|
+
function initialDark(): boolean {
|
|
7
|
+
return new URLSearchParams(window.location.search).get("theme") === "dark";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function fire() {
|
|
11
|
+
toast.success("Changes saved", {
|
|
12
|
+
description: "Your settings were updated and will apply to new sessions.",
|
|
13
|
+
duration: Infinity,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function Fixture() {
|
|
18
|
+
const [dark, setDark] = useState(initialDark);
|
|
19
|
+
|
|
20
|
+
// Sonner portals toasts onto `document.body`, so `.dark` must live on `<html>`
|
|
21
|
+
// (not an inner wrapper) for token / Tailwind dark styles to reach them.
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
document.documentElement.classList.toggle("dark", dark);
|
|
24
|
+
return () => {
|
|
25
|
+
document.documentElement.classList.remove("dark");
|
|
26
|
+
};
|
|
27
|
+
}, [dark]);
|
|
28
|
+
|
|
29
|
+
// Fire one sample toast on load so a screenshot captures it.
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const id = window.setTimeout(fire, 150);
|
|
32
|
+
return () => window.clearTimeout(id);
|
|
33
|
+
}, []);
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<>
|
|
37
|
+
<main className="min-h-screen bg-background p-8 text-foreground">
|
|
38
|
+
<div className="flex gap-3">
|
|
39
|
+
<Button onClick={() => setDark((d) => !d)}>Toggle theme</Button>
|
|
40
|
+
<Button onClick={fire}>Show toast</Button>
|
|
41
|
+
</div>
|
|
42
|
+
</main>
|
|
43
|
+
<SonnerToaster
|
|
44
|
+
theme={dark ? "dark" : "light"}
|
|
45
|
+
toastRadius="surface"
|
|
46
|
+
toastIcons="filled24"
|
|
47
|
+
closeButtonStyle="hoverChip"
|
|
48
|
+
sonnerVars
|
|
49
|
+
descriptionMuted
|
|
50
|
+
/>
|
|
51
|
+
</>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# toaster fixture
|
|
2
|
+
|
|
3
|
+
Renders `SonnerToaster` with every opt-in prop on (`toastRadius="surface"`, `toastIcons="filled24"`, `closeButtonStyle="hoverChip"`, `sonnerVars`, `descriptionMuted`). It fires one sample toast with a title and a description on load. The toast stays open. Use "Show toast" to fire another.
|
|
4
|
+
|
|
5
|
+
| Page | Stylesheet |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| `/tokens.html` | `tokens.css` plus `utilities.css` (`styles-tokens.css`) |
|
|
8
|
+
| `/compat.html` | `compat-shadcn-rgb.css` plus `utilities.css`, with sample `R G B` variables (`styles-compat.css`) |
|
|
9
|
+
|
|
10
|
+
Each stylesheet declares `glass-panel-strong` (tokens page only) and `smooth-shadow-ring-md`. The app owns those toast classes. The compat page also defines `--success` and `--warning` and maps them to `--color-success` and `--color-warning`.
|
|
11
|
+
|
|
12
|
+
Run it from this folder (it is not a workspace member, and React resolves from the parent `packages/ui` install):
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
pnpm install --ignore-workspace && pnpm dev
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Open the printed URL plus `/tokens.html` or `/compat.html`. Add `?theme=dark` for dark mode, or use "Toggle theme". Hover the toast to see the close chip. `Fixture.tsx` is not part of the package typecheck.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>toaster: compat-shadcn-rgb.css</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="./main-compat.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "../../src/css/compat-shadcn-rgb.css";
|
|
3
|
+
@import "../../src/css/utilities.css";
|
|
4
|
+
@source "../../../src/**/*.{ts,tsx}";
|
|
5
|
+
@source "./*.tsx";
|
|
6
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
7
|
+
|
|
8
|
+
/* Sample shadcn-style RGB channel variables owned by the app. */
|
|
9
|
+
:root {
|
|
10
|
+
--background: 244 245 246;
|
|
11
|
+
--foreground: 24 24 27;
|
|
12
|
+
--card: 255 255 255;
|
|
13
|
+
--card-foreground: 24 24 27;
|
|
14
|
+
--popover: 255 255 255;
|
|
15
|
+
--popover-foreground: 24 24 27;
|
|
16
|
+
--primary: 37 99 235;
|
|
17
|
+
--primary-foreground: 255 255 255;
|
|
18
|
+
--secondary: 235 236 238;
|
|
19
|
+
--secondary-foreground: 24 24 27;
|
|
20
|
+
--muted: 235 236 238;
|
|
21
|
+
--muted-foreground: 100 100 110;
|
|
22
|
+
--accent: 235 236 238;
|
|
23
|
+
--accent-foreground: 24 24 27;
|
|
24
|
+
--destructive: 220 38 38;
|
|
25
|
+
--destructive-foreground: 255 255 255;
|
|
26
|
+
--border: 224 225 228;
|
|
27
|
+
--input: 224 225 228;
|
|
28
|
+
--ring: 37 99 235;
|
|
29
|
+
--success: 22 163 74;
|
|
30
|
+
--warning: 217 119 6;
|
|
31
|
+
--radius: 0.75rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dark {
|
|
35
|
+
--background: 15 15 17;
|
|
36
|
+
--foreground: 244 244 245;
|
|
37
|
+
--card: 28 28 31;
|
|
38
|
+
--card-foreground: 244 244 245;
|
|
39
|
+
--popover: 28 28 31;
|
|
40
|
+
--popover-foreground: 244 244 245;
|
|
41
|
+
--primary: 96 165 250;
|
|
42
|
+
--primary-foreground: 15 15 17;
|
|
43
|
+
--secondary: 39 39 43;
|
|
44
|
+
--secondary-foreground: 244 244 245;
|
|
45
|
+
--muted: 39 39 43;
|
|
46
|
+
--muted-foreground: 161 161 170;
|
|
47
|
+
--accent: 39 39 43;
|
|
48
|
+
--accent-foreground: 244 244 245;
|
|
49
|
+
--destructive: 248 113 113;
|
|
50
|
+
--destructive-foreground: 15 15 17;
|
|
51
|
+
--border: 46 46 51;
|
|
52
|
+
--input: 46 46 51;
|
|
53
|
+
--ring: 96 165 250;
|
|
54
|
+
--success: 74 222 128;
|
|
55
|
+
--warning: 251 191 36;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@theme inline {
|
|
59
|
+
--color-background: rgb(var(--background));
|
|
60
|
+
--color-foreground: rgb(var(--foreground));
|
|
61
|
+
--color-border: rgb(var(--border));
|
|
62
|
+
--color-primary: rgb(var(--primary));
|
|
63
|
+
--color-primary-foreground: rgb(var(--primary-foreground));
|
|
64
|
+
--color-muted-foreground: rgb(var(--muted-foreground));
|
|
65
|
+
--color-destructive: rgb(var(--destructive));
|
|
66
|
+
--color-ring: rgb(var(--ring));
|
|
67
|
+
--color-success: rgb(var(--success));
|
|
68
|
+
--color-warning: rgb(var(--warning));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Toast class the app owns (not part of the compat file). */
|
|
72
|
+
@utility smooth-shadow-ring-md {
|
|
73
|
+
box-shadow:
|
|
74
|
+
0 0 0 1px rgb(var(--border) / 0.6),
|
|
75
|
+
0 4px 12px rgb(0 0 0 / 0.08);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
body {
|
|
79
|
+
background: rgb(var(--background));
|
|
80
|
+
color: rgb(var(--foreground));
|
|
81
|
+
font-family: system-ui, sans-serif;
|
|
82
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "../../src/tokens.css";
|
|
3
|
+
@import "../../src/css/utilities.css";
|
|
4
|
+
@source "../../../src/**/*.{ts,tsx}";
|
|
5
|
+
@source "./*.tsx";
|
|
6
|
+
|
|
7
|
+
/* Toast classes the app owns (not part of tokens.css). */
|
|
8
|
+
@utility glass-panel-strong {
|
|
9
|
+
background-color: color-mix(in oklch, var(--color-card) 95%, transparent);
|
|
10
|
+
backdrop-filter: blur(12px);
|
|
11
|
+
}
|
|
12
|
+
@utility smooth-shadow-ring-md {
|
|
13
|
+
box-shadow:
|
|
14
|
+
0 0 0 1px color-mix(in srgb, var(--color-border) 60%, transparent),
|
|
15
|
+
0 4px 12px rgb(0 0 0 / 0.08);
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>toaster: tokens.css</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="./main-tokens.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"isolatedModules": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["*.ts", "*.tsx"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
2
|
+
import { defineConfig } from "vite";
|
|
3
|
+
|
|
4
|
+
// React, react-dom and the @vvedantb/ui peers resolve from packages/ui/node_modules
|
|
5
|
+
// (this folder sits inside that package), so the fixture installs only the build tools.
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [tailwindcss()],
|
|
8
|
+
esbuild: { jsx: "automatic" },
|
|
9
|
+
resolve: { dedupe: ["react", "react-dom"] },
|
|
10
|
+
build: { rollupOptions: { input: ["tokens.html", "compat.html"] } },
|
|
11
|
+
server: { fs: { allow: ["../../.."] } },
|
|
12
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @vvedantb/ui/tokens/css/compat-shadcn-rgb.css
|
|
3
|
+
*
|
|
4
|
+
* For apps that already define shadcn-style variables as space-separated RGB
|
|
5
|
+
* channels (for example `--background: 244 245 246`) and read them with
|
|
6
|
+
* `rgb(var(--x) / alpha)`.
|
|
7
|
+
*
|
|
8
|
+
* Import this file INSTEAD OF tokens.css. Never import both: they define the
|
|
9
|
+
* same `--color-*` names in different forms.
|
|
10
|
+
*
|
|
11
|
+
* @import "tailwindcss";
|
|
12
|
+
* @import "@vvedantb/ui/tokens/css/compat-shadcn-rgb.css";
|
|
13
|
+
*
|
|
14
|
+
* It defines only the names that @vvedantb/ui components use and that a
|
|
15
|
+
* shadcn theme lacks. Every value is a reference to an app variable; no
|
|
16
|
+
* colour is copied. It never defines --background, --foreground, --muted,
|
|
17
|
+
* --accent, --primary, --card, --popover, --border or --radius. The app owns
|
|
18
|
+
* those and may change them at runtime.
|
|
19
|
+
*
|
|
20
|
+
* The app must define: --background, --foreground, --card, --card-foreground,
|
|
21
|
+
* --popover, --popover-foreground, --primary, --primary-foreground,
|
|
22
|
+
* --secondary, --secondary-foreground, --muted, --muted-foreground,
|
|
23
|
+
* --accent, --accent-foreground, --destructive, --destructive-foreground,
|
|
24
|
+
* --border, --input, --ring and --radius (all colours as "R G B").
|
|
25
|
+
*
|
|
26
|
+
* `--color-card` and `--color-muted` are references to `--card` and `--muted`.
|
|
27
|
+
* `SonnerToaster sonnerVars` reads them, along with `--color-border` and
|
|
28
|
+
* `--color-foreground`. An app that already maps those names keeps its own
|
|
29
|
+
* mapping if it declares them after this import.
|
|
30
|
+
*
|
|
31
|
+
* Alpha values follow common shadcn-RGB classes (ring/35, ring/50,
|
|
32
|
+
* destructive/20, placeholder /90, scrollbar /35).
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
@theme inline {
|
|
36
|
+
--color-card: rgb(var(--card));
|
|
37
|
+
--color-muted: rgb(var(--muted));
|
|
38
|
+
--color-default: rgb(var(--secondary));
|
|
39
|
+
--color-default-foreground: rgb(var(--secondary-foreground));
|
|
40
|
+
--color-surface: rgb(var(--card));
|
|
41
|
+
--color-surface-foreground: rgb(var(--card-foreground));
|
|
42
|
+
--color-surface-card: rgb(var(--card));
|
|
43
|
+
--color-surface-secondary: rgb(var(--muted));
|
|
44
|
+
--color-surface-secondary-foreground: rgb(var(--foreground));
|
|
45
|
+
--color-surface-tertiary: rgb(var(--secondary));
|
|
46
|
+
--color-surface-tertiary-foreground: rgb(var(--secondary-foreground));
|
|
47
|
+
--color-overlay: rgb(var(--popover));
|
|
48
|
+
--color-overlay-foreground: rgb(var(--popover-foreground));
|
|
49
|
+
--color-field-background: rgb(var(--card));
|
|
50
|
+
--color-field-foreground: rgb(var(--foreground));
|
|
51
|
+
--color-field-border: rgb(var(--input));
|
|
52
|
+
--color-field-placeholder: rgb(var(--muted-foreground) / 0.9);
|
|
53
|
+
--color-focus: rgb(var(--ring));
|
|
54
|
+
--color-focus-ring: rgb(var(--ring) / 0.35);
|
|
55
|
+
--color-focus-border: rgb(var(--ring) / 0.5);
|
|
56
|
+
--color-danger: rgb(var(--destructive));
|
|
57
|
+
--color-danger-foreground: rgb(var(--destructive-foreground));
|
|
58
|
+
--color-danger-ring: rgb(var(--destructive) / 0.2);
|
|
59
|
+
--color-danger-border: rgb(var(--destructive) / 0.55);
|
|
60
|
+
--color-separator: rgb(var(--border));
|
|
61
|
+
--color-segment: rgb(var(--card));
|
|
62
|
+
--color-segment-foreground: rgb(var(--foreground));
|
|
63
|
+
--color-backdrop: rgb(0 0 0 / 0.5);
|
|
64
|
+
--color-scrollbar: rgb(var(--muted-foreground) / 0.35);
|
|
65
|
+
--radius-field: min(calc(var(--radius) + 0.25rem), 1.25rem);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:root {
|
|
69
|
+
--scrollbar: rgb(var(--muted-foreground) / 0.35);
|
|
70
|
+
--field-radius: min(calc(var(--radius) + 0.25rem), 1.25rem);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/*
|
|
74
|
+
* Fallback fill for toasts, dialogs and hover cards (`glass-panel-strong`).
|
|
75
|
+
* Equivalent to `bg-card/95 backdrop-blur-md`. An app may override it by
|
|
76
|
+
* declaring its own `@utility glass-panel-strong` after this import.
|
|
77
|
+
*/
|
|
78
|
+
@utility glass-panel-strong {
|
|
79
|
+
background-color: rgb(var(--card) / 0.95);
|
|
80
|
+
-webkit-backdrop-filter: blur(12px);
|
|
81
|
+
backdrop-filter: blur(12px);
|
|
82
|
+
}
|
|
@@ -88,6 +88,12 @@ export function tokensPreset({ color = cssVar } = {}) {
|
|
|
88
88
|
DEFAULT: v("default"),
|
|
89
89
|
foreground: v("default-foreground"),
|
|
90
90
|
},
|
|
91
|
+
muted: { DEFAULT: v("muted"), foreground: v("muted") },
|
|
92
|
+
accent: {
|
|
93
|
+
DEFAULT: v("accent"),
|
|
94
|
+
foreground: v("accent-foreground"),
|
|
95
|
+
},
|
|
96
|
+
ring: v("focus"),
|
|
91
97
|
input: v("border"),
|
|
92
98
|
popover: {
|
|
93
99
|
DEFAULT: v("overlay"),
|
package/tokens/src/tokens.css
CHANGED
|
@@ -59,6 +59,21 @@
|
|
|
59
59
|
--color-warning: var(--warning);
|
|
60
60
|
--color-warning-foreground: var(--warning-foreground);
|
|
61
61
|
|
|
62
|
+
/* shadcn-style aliases onto the same tokens. */
|
|
63
|
+
--color-primary: var(--accent);
|
|
64
|
+
--color-primary-foreground: var(--accent-foreground);
|
|
65
|
+
--color-muted-foreground: var(--muted);
|
|
66
|
+
--color-secondary: var(--default);
|
|
67
|
+
--color-secondary-foreground: var(--default-foreground);
|
|
68
|
+
--color-destructive: var(--danger);
|
|
69
|
+
--color-destructive-foreground: var(--danger-foreground);
|
|
70
|
+
--color-card: var(--surface-card);
|
|
71
|
+
--color-card-foreground: var(--surface-foreground);
|
|
72
|
+
--color-popover: var(--overlay);
|
|
73
|
+
--color-popover-foreground: var(--overlay-foreground);
|
|
74
|
+
--color-input: var(--border);
|
|
75
|
+
--color-ring: var(--focus);
|
|
76
|
+
|
|
62
77
|
--radius-lg: var(--radius);
|
|
63
78
|
--radius-field: var(--field-radius);
|
|
64
79
|
--radius-md: calc(var(--radius) - 2px);
|