@vvedantb/ui 0.1.5 → 0.2.1

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.
Files changed (87) hide show
  1. package/README.md +49 -0
  2. package/app/README.md +100 -0
  3. package/app/src/auth/useStableAuth.ts +69 -0
  4. package/app/src/cn.ts +6 -0
  5. package/app/src/confirm/ConfirmSkipHint.tsx +35 -0
  6. package/app/src/confirm/confirmSkip.ts +26 -0
  7. package/app/src/confirm/useAltHeld.ts +128 -0
  8. package/app/src/confirm/useRequestConfirm.ts +25 -0
  9. package/app/src/index.ts +43 -0
  10. package/app/src/settings/SettingsEmptyState.tsx +38 -0
  11. package/app/src/settings/SettingsField.tsx +42 -0
  12. package/app/src/settings/SettingsPage.tsx +88 -0
  13. package/app/src/settings/SettingsSection.tsx +92 -0
  14. package/app/src/settings/SettingsStack.tsx +17 -0
  15. package/app/src/settings/SettingsToggleRow.tsx +51 -0
  16. package/app/src/update/deployFingerprint.ts +27 -0
  17. package/app/src/update/updateWatcher.ts +100 -0
  18. package/package.json +71 -11
  19. package/shell/src/PillTabs.tsx +86 -0
  20. package/shell/src/SidebarHeader.tsx +21 -0
  21. package/shell/src/cn.ts +5 -0
  22. package/shell/src/index.ts +6 -0
  23. package/src/ai-elements/artifact.tsx +1 -1
  24. package/src/ai-elements/attachments.tsx +3 -3
  25. package/src/ai-elements/chain-of-thought.tsx +5 -5
  26. package/src/ai-elements/code-block.tsx +2 -2
  27. package/src/ai-elements/conversation.tsx +3 -3
  28. package/src/ai-elements/inline-citation.tsx +6 -6
  29. package/src/ai-elements/message.tsx +2 -2
  30. package/src/ai-elements/prompt-input.tsx +3 -3
  31. package/src/ai-elements/queue.tsx +2 -2
  32. package/src/ai-elements/reasoning.tsx +1 -1
  33. package/src/ai-elements/shimmer.tsx +5 -5
  34. package/src/ai-elements/sources.tsx +2 -2
  35. package/src/ai-elements/speech-input.tsx +1 -1
  36. package/src/ai-elements/suggestion.tsx +2 -2
  37. package/src/index.ts +18 -18
  38. package/src/ui/{_menu-classes.vibot.ts → _menu-classes.alt.ts} +4 -4
  39. package/src/ui/_menu-classes.ts +4 -4
  40. package/src/ui/{accordion.verve.tsx → accordion.alt.tsx} +2 -2
  41. package/src/ui/badge.tsx +1 -1
  42. package/src/ui/breadcrumb.tsx +2 -2
  43. package/src/ui/button.tsx +3 -3
  44. package/src/ui/checkbox.tsx +1 -1
  45. package/src/ui/{clear-input.vibot.tsx → clear-input.alt.tsx} +1 -1
  46. package/src/ui/clear-input.tsx +1 -1
  47. package/src/ui/command.tsx +5 -5
  48. package/src/ui/dialog.tsx +1 -1
  49. package/src/ui/{input-group.verve.tsx → input-group.alt.tsx} +1 -1
  50. package/src/ui/input-group.tsx +2 -2
  51. package/src/ui/kbd.tsx +1 -1
  52. package/src/ui/labeled-switch-row.tsx +2 -2
  53. package/src/ui/progress.tsx +1 -1
  54. package/src/ui/radix-select.tsx +3 -3
  55. package/src/ui/search-input.tsx +1 -1
  56. package/src/ui/select.tsx +4 -4
  57. package/src/ui/sonner.tsx +5 -5
  58. package/src/ui/spinner.tsx +1 -1
  59. package/src/ui/switch.tsx +2 -2
  60. package/src/ui/table.tsx +2 -2
  61. package/src/ui/time-picker.tsx +3 -3
  62. package/tokens/README.md +98 -0
  63. package/tokens/examples/compat-shadcn-rgb/Fixture.tsx +45 -0
  64. package/tokens/examples/compat-shadcn-rgb/README.md +11 -0
  65. package/tokens/examples/compat-shadcn-rgb/index.html +12 -0
  66. package/tokens/examples/compat-shadcn-rgb/main.tsx +5 -0
  67. package/tokens/examples/compat-shadcn-rgb/package.json +14 -0
  68. package/tokens/examples/compat-shadcn-rgb/styles.css +67 -0
  69. package/tokens/examples/compat-shadcn-rgb/tsconfig.json +14 -0
  70. package/tokens/examples/compat-shadcn-rgb/vite.config.ts +11 -0
  71. package/tokens/examples/migration.md +303 -0
  72. package/tokens/src/css/animations.css +55 -0
  73. package/tokens/src/css/base.css +51 -0
  74. package/tokens/src/css/compat-shadcn-rgb.css +75 -0
  75. package/tokens/src/css/dialog.css +13 -0
  76. package/tokens/src/css/index.css +19 -0
  77. package/tokens/src/css/modal.css +44 -0
  78. package/tokens/src/css/scrollbar-thin.css +40 -0
  79. package/tokens/src/css/tabs-pills.css +58 -0
  80. package/tokens/src/css/tabs.css +57 -0
  81. package/tokens/src/css/utilities.css +34 -0
  82. package/tokens/src/native.ts +39 -0
  83. package/tokens/src/tailwind-preset.d.mts +25 -0
  84. package/tokens/src/tailwind-preset.mjs +183 -0
  85. package/tokens/src/tokens.css +207 -0
  86. /package/src/motion/{presets.vibot.ts → presets.alt.ts} +0 -0
  87. /package/src/ui/{scroll-area.verve.tsx → scroll-area.alt.tsx} +0 -0
@@ -18,7 +18,7 @@ function Spinner({
18
18
  <IconLoader2
19
19
  role="status"
20
20
  aria-label="Loading"
21
- className={cn("animate-spin text-muted", sizeClasses[size], className)}
21
+ className={cn("animate-spin text-muted-foreground", sizeClasses[size], className)}
22
22
  {...props}
23
23
  />
24
24
  );
package/src/ui/switch.tsx CHANGED
@@ -8,7 +8,7 @@ const Switch = React.forwardRef<
8
8
  >(({ className, ...props }, ref) => (
9
9
  <SwitchPrimitive.Root
10
10
  className={cn(
11
- "peer relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-border bg-default transition-[background-color,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent data-[state=checked]:bg-accent data-[state=unchecked]:bg-default before:absolute before:inset-[-8px] before:content-['']",
11
+ "peer relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-border bg-default transition-[background-color,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=unchecked]:bg-default before:absolute before:inset-[-8px] before:content-['']",
12
12
  className,
13
13
  )}
14
14
  {...props}
@@ -16,7 +16,7 @@ const Switch = React.forwardRef<
16
16
  >
17
17
  <SwitchPrimitive.Thumb
18
18
  className={cn(
19
- "pointer-events-none block size-4 rounded-full bg-background ring-0 transition-[transform,background-color] duration-200 ease-smooth data-[state=checked]:translate-x-4 data-[state=checked]:bg-accent-foreground data-[state=unchecked]:translate-x-0",
19
+ "pointer-events-none block size-4 rounded-full bg-background ring-0 transition-[transform,background-color] duration-200 ease-smooth data-[state=checked]:translate-x-4 data-[state=checked]:bg-primary-foreground data-[state=unchecked]:translate-x-0",
20
20
  )}
21
21
  />
22
22
  </SwitchPrimitive.Root>
package/src/ui/table.tsx CHANGED
@@ -76,7 +76,7 @@ const TableHead = React.forwardRef<
76
76
  <th
77
77
  ref={ref}
78
78
  className={cn(
79
- "h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-widest text-muted [&:has([role=checkbox])]:pr-0",
79
+ "h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-widest text-muted-foreground [&:has([role=checkbox])]:pr-0",
80
80
  className,
81
81
  )}
82
82
  {...props}
@@ -105,7 +105,7 @@ const TableCaption = React.forwardRef<
105
105
  >(({ className, ...props }, ref) => (
106
106
  <caption
107
107
  ref={ref}
108
- className={cn("mt-4 text-sm text-muted", className)}
108
+ className={cn("mt-4 text-sm text-muted-foreground", className)}
109
109
  {...props}
110
110
  />
111
111
  ));
@@ -94,7 +94,7 @@ const TimePicker = React.forwardRef<HTMLButtonElement, TimePickerProps>(
94
94
  )}
95
95
  >
96
96
  <span>{`${hour}:${minute}`}</span>
97
- <IconClock className="h-3.5 w-3.5 text-muted" />
97
+ <IconClock className="h-3.5 w-3.5 text-muted-foreground" />
98
98
  </button>
99
99
  </PopoverTrigger>
100
100
  <PopoverContent
@@ -134,7 +134,7 @@ const TimeColumn = React.forwardRef<HTMLDivElement, TimeColumnProps>(
134
134
  ({ label, values, selected, onSelect }, ref) => {
135
135
  return (
136
136
  <div className="flex w-14 flex-col">
137
- <div className="px-2 pb-1 text-[10px] uppercase tracking-wider text-muted">
137
+ <div className="px-2 pb-1 text-[10px] uppercase tracking-wider text-muted-foreground">
138
138
  {label}
139
139
  </div>
140
140
  <div
@@ -152,7 +152,7 @@ const TimeColumn = React.forwardRef<HTMLDivElement, TimeColumnProps>(
152
152
  className={cn(
153
153
  "flex h-7 w-full items-center justify-center text-xs tabular-nums transition-colors",
154
154
  isSelected
155
- ? "bg-accent text-accent-foreground"
155
+ ? "bg-primary text-primary-foreground"
156
156
  : "text-foreground/80 hover:bg-surface-tertiary/50",
157
157
  )}
158
158
  >
@@ -0,0 +1,98 @@
1
+ # `@vvedantb/ui/tokens`
2
+
3
+ Design tokens and shared Tailwind v4 CSS for the vvedantb web apps, plus JS tokens for React Native. These are subpaths of `@vvedantb/ui`, source-exported: no build step. Paths in the `File` column are relative to `packages/ui/tokens/`.
4
+
5
+ ## Exports
6
+
7
+ | Export | File | What it is |
8
+ | --- | --- | --- |
9
+ | `@vvedantb/ui/tokens`, `@vvedantb/ui/tokens/tokens.css` | `src/tokens.css` | Colour, radius, shadow, ease and font tokens (`@theme`), light/dark variables, `dark` variant, `*` border and `body` defaults. In 0.2.1 it also defines shadcn-style aliases (`primary`, `muted-foreground`, `secondary`, `destructive`, `card`, `popover`, `input`, `ring`) that point at the same tokens. |
10
+ | `@vvedantb/ui/tokens/native` | `src/native.ts` | JS colours, radii and spacing for React Native. `@vvedantb/native-ui` keeps its own copy in `src/tokens.ts`; a test keeps the two equal. |
11
+ | `@vvedantb/ui/tokens/css/base.css` | `src/css/base.css` | `html` touch/accent, `::selection`, control transitions, pointer cursor, range accent (`@layer base`). |
12
+ | `@vvedantb/ui/tokens/css/dialog.css` | `src/css/dialog.css` | Unlayered `max-width: none` for `@vvedantb/ui` compact (bottom-sheet) dialogs. |
13
+ | `@vvedantb/ui/tokens/css/modal.css` | `src/css/modal.css` | `.t-modal`, `.is-open`, `.is-closing` and `t-modal-presence-wait` (`@layer components`). |
14
+ | `@vvedantb/ui/tokens/css/tabs.css` | `src/css/tabs.css` | `.t-tab`, active colour, `.t-tabs-pill`, small-screen `.t-tabs` scrolling. |
15
+ | `@vvedantb/ui/tokens/css/tabs-pills.css` | `src/css/tabs-pills.css` | `--tabs-*` colour variables, `.t-tabs--segmented`, `.t-tabs--pills` and pill hover / active fills. |
16
+ | `@vvedantb/ui/tokens/css/utilities.css` | `src/css/utilities.css` | `@utility hit-target` and `@utility reveal-on-hover`. |
17
+ | `@vvedantb/ui/tokens/css/scrollbar-thin.css` | `src/css/scrollbar-thin.css` | `.scrollbar-thin` (`@layer utilities`, always emitted). |
18
+ | `@vvedantb/ui/tokens/css/animations.css` | `src/css/animations.css` | `animate-aurora`, `animate-fade-in-up`, `animate-indeterminate` as `@theme` (CSS-first apps). |
19
+ | `@vvedantb/ui/tokens/css/compat-shadcn-rgb.css`, `@vvedantb/ui/tokens/compat/shadcn-rgb.css` | `src/css/compat-shadcn-rgb.css` | Replaces `tokens.css` for apps with shadcn-style `R G B` channel variables. Defines only the UI-only `--color-*` names as `rgb(var(--x) / alpha)` references, `--radius-field`, `--scrollbar`, `--field-radius` and a `glass-panel-strong` fallback. Import it **or** `tokens.css`, never both. |
20
+ | `@vvedantb/ui/tokens/css/index.css` | `src/css/index.css` | base + dialog + utilities + scrollbar-thin + animations, for new CSS-first apps. |
21
+ | `@vvedantb/ui/tokens/tailwind-preset` | `src/tailwind-preset.mjs` (+ `.d.mts`) | Tailwind preset for apps that load a JS config with `@config`. |
22
+
23
+ Every file was extracted because the same rule (same at-rule context, selector and body) sits in 3 or more of the five apps. The measured duplication is in `verify/ANALYSIS.md`, and the proof that each app compiles to the same CSS after migrating is in `verify/RESULTS.md`. Blocks that only 2 apps share, or that drift in a way that would change an app's CSS, stay in the apps; `verify/ANALYSIS.md` lists them.
24
+
25
+ ## Use
26
+
27
+ CSS-first app (no `tailwind.config`):
28
+
29
+ ```css
30
+ @import "tailwindcss";
31
+ @import "@vvedantb/ui/tokens";
32
+ @import "@vvedantb/ui/tokens/css/animations.css";
33
+ @import "@vvedantb/ui/tokens/css/base.css";
34
+ /* ...app @layer base rules... */
35
+ @import "@vvedantb/ui/tokens/css/modal.css";
36
+ @import "@vvedantb/ui/tokens/css/tabs.css";
37
+ /* ...app @layer components rules... */
38
+ ```
39
+
40
+ App with a JS config (`@config "../tailwind.config.ts"`):
41
+
42
+ ```ts
43
+ import { tokensPreset } from "@vvedantb/ui/tokens/tailwind-preset";
44
+
45
+ export default {
46
+ presets: [tokensPreset()],
47
+ // or tokensPreset({ color: (name) => `color-mix(in oklch, var(--${name}) calc(<alpha-value> * 100%), transparent)` })
48
+ content: ["./src/**/*.{ts,tsx}"],
49
+ theme: { extend: { /* app-only colours, fonts, animations */ } },
50
+ plugins: [tailwindcssAnimate],
51
+ };
52
+ ```
53
+
54
+ The preset holds `darkMode: "class"`, the shared colour map (`border`, `surface.*`, `danger.*`, `field.*`, shadcn aliases `primary`/`secondary`/`destructive`/`card`/`popover`/`input` ...), `borderRadius` lg/md/sm/field, `boxShadow` soft/panel/insetSoft, `ease-smooth`, `screens` xs to 2xl in px, and the aurora / fade-in-up / indeterminate / accordion keyframes. It does not hold plugins, `content`, fonts, `accent`/`muted`/`ring`/`sidebar` (they differ per app) or accordion timings.
55
+
56
+ Do not import `css/animations.css` in an app that uses the preset: the preset already defines the same keyframes and animations.
57
+
58
+ ### Where to put the imports
59
+
60
+ Tailwind inlines an `@import` where it sits, even in the middle of a file (it must be at top level, not inside an `@layer` block). Put each import where the app's own copy of the rules was. Within one layer, later rules win at equal specificity, so moving shared rules above or below app rules can flip the result for elements matched by both. `examples/migration.md` gives the exact position for each app, and `pnpm --filter @vvedantb/ui verify` checks it.
61
+
62
+ ### Variables each file needs
63
+
64
+ | File | Needs | Provided by |
65
+ | --- | --- | --- |
66
+ | `base.css` | `--accent`, `--foreground` | tokens.css or the app theme |
67
+ | `dialog.css` | none | |
68
+ | `modal.css` | `--modal-open-dur`, `--modal-close-dur`, `--modal-scale`, `--modal-scale-close`, `--modal-ease` | app `:root` |
69
+ | `tabs.css` | `--tabs-dur`, `--tabs-ease` (app `:root`); `--tabs-text-muted`, `--tabs-text-active`, `--tabs-pill-bg` | colours: tabs-pills.css or the app theme |
70
+ | `tabs-pills.css` | `--muted`, `--segment`, `--segment-foreground`, `--default` | tokens.css or the app theme |
71
+ | `utilities.css` | `--breakpoint-sm` (Tailwind default or app theme) | Tailwind |
72
+ | `scrollbar-thin.css` | `--scrollbar` | tokens.css or the app theme |
73
+ | `animations.css` | none | |
74
+ | `tailwind-preset` | the CSS variables named in its colour map, `--radius`, `--field-radius` | tokens.css or the app theme |
75
+
76
+ ### Using an existing shadcn RGB theme
77
+
78
+ See the package `README.md`. With the compat file, `base.css`, `scrollbar-thin.css`, `utilities.css`, `dialog.css`, `modal.css` and `tabs.css` need no `tokens.css`. `base.css` reads `--accent` and `--foreground` and `tabs-pills.css` reads `--muted`, `--segment` and `--default`. Those are not channel-compatible, so skip `tabs-pills.css` and `index.css` (which includes `base.css`) unless the app defines those variables as full colours.
79
+
80
+ ### Parameters
81
+
82
+ Where apps share a rule but drifted in one value, the value is a custom property whose fallback is the most common value. Set it on `:root` to keep a different value.
83
+
84
+ | File | Property | Default | Set by |
85
+ | --- | --- | --- | --- |
86
+ | `base.css` | `--tokens-control-transition-property` | `background-color, border-color, color, box-shadow, transform, opacity` | app-c: `background-color, color, transform, opacity` |
87
+ | `base.css` | `--tokens-control-transition-duration` | `240ms` | app-c: `100ms` |
88
+
89
+ ## Develop
90
+
91
+ ```sh
92
+ pnpm --filter @vvedantb/ui build # export targets exist + tsc (primitives, shell, app)
93
+ pnpm --filter @vvedantb/ui test # vitest (app helpers) + offline node --test: exports, CSS structure, Tailwind compile, preset
94
+ pnpm --filter @vvedantb/ui analyze # rule-level duplication across the app clones -> verify/ANALYSIS.tables.md
95
+ pnpm --filter @vvedantb/ui verify # before/after compile of every app -> verify/RESULTS.md, examples/migration.md
96
+ ```
97
+
98
+ `analyze` and `verify` need the app clones (`APPS_DIR`, default `/workspace/cvx`; name or symlink the clones `app-a` to `app-e` inside it) and network access the first time: they install Tailwind 4.3.3, the plugins, postcss and jiti into a scratch directory (`VERIFY_DIR`, default `/workspace/pk-tokens-verify`, outside the repo). The migration for each app is data in `verify/migrations/<app>.json`. Each removed block must equal the shared file's block with the same context and selector, or the run fails.
@@ -0,0 +1,45 @@
1
+ import { useState } from "react";
2
+ import { toast } from "sonner";
3
+ import {
4
+ Button,
5
+ Dialog,
6
+ DialogContent,
7
+ DialogDescription,
8
+ DialogTitle,
9
+ DialogTrigger,
10
+ Input,
11
+ SonnerToaster,
12
+ Switch,
13
+ Textarea,
14
+ } from "../../../src";
15
+
16
+ export function Fixture() {
17
+ const [dark, setDark] = useState(false);
18
+ return (
19
+ <div className={dark ? "dark" : ""}>
20
+ <main className="min-h-screen space-y-6 bg-background p-8 text-foreground">
21
+ <section className="flex flex-wrap items-center gap-3">
22
+ <Button onClick={() => setDark((d) => !d)}>Toggle theme</Button>
23
+ <Button onClick={() => toast("Saved", { description: "Fixture toast" })}>
24
+ Show toast
25
+ </Button>
26
+ <Dialog>
27
+ <DialogTrigger asChild>
28
+ <Button>Open dialog</Button>
29
+ </DialogTrigger>
30
+ <DialogContent>
31
+ <DialogTitle>Dialog</DialogTitle>
32
+ <DialogDescription>Body text on the popover colour.</DialogDescription>
33
+ </DialogContent>
34
+ </Dialog>
35
+ </section>
36
+ <section className="grid max-w-md gap-3">
37
+ <Input placeholder="Input placeholder" />
38
+ <Textarea placeholder="Textarea placeholder" />
39
+ <Switch defaultChecked aria-label="Sample switch" />
40
+ </section>
41
+ <SonnerToaster />
42
+ </main>
43
+ </div>
44
+ );
45
+ }
@@ -0,0 +1,11 @@
1
+ # compat-shadcn-rgb fixture
2
+
3
+ Renders Button, toast, Dialog, Input, Textarea and Switch against sample shadcn-style `R G B` variables for light and dark. `styles.css` imports `compat-shadcn-rgb.css` and not `tokens.css`.
4
+
5
+ Run it from this folder (it is not a workspace member, and React resolves from the parent `packages/ui` install):
6
+
7
+ ```sh
8
+ pnpm install --ignore-workspace && pnpm dev
9
+ ```
10
+
11
+ Open the printed URL and use "Toggle theme" to switch between light and dark. `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>compat-shadcn-rgb fixture</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="./main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,5 @@
1
+ import { createRoot } from "react-dom/client";
2
+ import { Fixture } from "./Fixture";
3
+ import "./styles.css";
4
+
5
+ createRoot(document.getElementById("root")!).render(<Fixture />);
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "compat-shadcn-rgb-fixture",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "vite build"
8
+ },
9
+ "devDependencies": {
10
+ "@tailwindcss/vite": "4.3.3",
11
+ "tailwindcss": "4.3.3",
12
+ "vite": "^7.0.0"
13
+ }
14
+ }
@@ -0,0 +1,67 @@
1
+ @import "tailwindcss";
2
+ @import "../../src/css/compat-shadcn-rgb.css";
3
+ @source "../../../src/**/*.{ts,tsx}";
4
+ @source "./*.tsx";
5
+
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
+ --radius: 0.75rem;
30
+ }
31
+
32
+ .dark {
33
+ --background: 15 15 17;
34
+ --foreground: 244 244 245;
35
+ --card: 28 28 31;
36
+ --card-foreground: 244 244 245;
37
+ --popover: 28 28 31;
38
+ --popover-foreground: 244 244 245;
39
+ --primary: 96 165 250;
40
+ --primary-foreground: 15 15 17;
41
+ --secondary: 39 39 43;
42
+ --secondary-foreground: 244 244 245;
43
+ --muted: 39 39 43;
44
+ --muted-foreground: 161 161 170;
45
+ --accent: 39 39 43;
46
+ --accent-foreground: 244 244 245;
47
+ --destructive: 248 113 113;
48
+ --destructive-foreground: 15 15 17;
49
+ --border: 46 46 51;
50
+ --input: 46 46 51;
51
+ --ring: 96 165 250;
52
+ }
53
+
54
+ @theme inline {
55
+ --color-background: rgb(var(--background));
56
+ --color-foreground: rgb(var(--foreground));
57
+ --color-border: rgb(var(--border));
58
+ --color-primary: rgb(var(--primary));
59
+ --color-primary-foreground: rgb(var(--primary-foreground));
60
+ --color-muted-foreground: rgb(var(--muted-foreground));
61
+ }
62
+
63
+ body {
64
+ background: rgb(var(--background));
65
+ color: rgb(var(--foreground));
66
+ font-family: system-ui, sans-serif;
67
+ }
@@ -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
+ });