@trading-game/design-intelligence-layer 0.8.5 → 0.8.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/AGENTS.md +11 -11
- package/README.md +64 -14
- package/dist/index.cjs +40 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +40 -25
- package/dist/index.js.map +1 -1
- package/{docs → guides}/design-principles/trading-game-design-principles.md +6 -5
- package/guides/design-system-guide/trading-game-ds-guide.md +602 -0
- package/{docs → guides}/rules/design-system-consuming-project.mdc +1 -1
- package/package.json +2 -2
- package/src/styles.css +58 -41
- package/docs/design-system-guide/trading-game-ds-guide.md +0 -2193
- /package/{docs → guides}/accessibility-standards/trading-game-accessibility-standards.md +0 -0
- /package/{docs → guides}/personas/trading-game-player-field-guide.md +0 -0
- /package/{docs → guides}/tone-of-voice/trading-game-tone-of-voice-and-campaign-brief.md +0 -0
package/AGENTS.md
CHANGED
|
@@ -10,22 +10,22 @@ Before building any landing page, product screen, game view, or feature UI, you
|
|
|
10
10
|
|
|
11
11
|
**Design principles** — the decision framework for every layout, hierarchy, motion, copy, and component choice:
|
|
12
12
|
```
|
|
13
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
13
|
+
node_modules/@trading-game/design-intelligence-layer/guides/design-principles/trading-game-design-principles.md
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
**Accessibility standards** — the inclusion standard every screen must meet (WCAG 2.1 AA):
|
|
17
17
|
```
|
|
18
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
18
|
+
node_modules/@trading-game/design-intelligence-layer/guides/accessibility-standards/trading-game-accessibility-standards.md
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
**Personas** — the three player modes (Edge Seeker, System Runner, Public Predictor) that shape all copy and UX decisions:
|
|
22
22
|
```
|
|
23
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
23
|
+
node_modules/@trading-game/design-intelligence-layer/guides/personas/trading-game-player-field-guide.md
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
**Tone of voice** — the creative foundation, campaign territories, and the mirror test for all player-facing copy:
|
|
27
27
|
```
|
|
28
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
28
|
+
node_modules/@trading-game/design-intelligence-layer/guides/tone-of-voice/trading-game-tone-of-voice-and-campaign-brief.md
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
All four files apply to all projects built with this package — landing pages, product screens, and games.
|
|
@@ -39,13 +39,13 @@ Run the checklists at the end of the design principles and accessibility standar
|
|
|
39
39
|
You MUST also follow the full agent rules file:
|
|
40
40
|
|
|
41
41
|
```
|
|
42
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
42
|
+
node_modules/@trading-game/design-intelligence-layer/guides/rules/design-system-consuming-project.mdc
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
**Cursor users:** Copy this file into `.cursor/rules/` after every package upgrade:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
cp node_modules/@trading-game/design-intelligence-layer/
|
|
48
|
+
cp node_modules/@trading-game/design-intelligence-layer/guides/rules/design-system-consuming-project.mdc .cursor/rules/
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
---
|
|
@@ -63,8 +63,8 @@ cp node_modules/@trading-game/design-intelligence-layer/docs/rules/design-system
|
|
|
63
63
|
## Reference
|
|
64
64
|
|
|
65
65
|
- Full token + component reference: `node_modules/@trading-game/design-intelligence-layer/README.md`
|
|
66
|
-
- Design principles: `node_modules/@trading-game/design-intelligence-layer/
|
|
67
|
-
- Accessibility standards: `node_modules/@trading-game/design-intelligence-layer/
|
|
68
|
-
- Personas: `node_modules/@trading-game/design-intelligence-layer/
|
|
69
|
-
- Tone of voice: `node_modules/@trading-game/design-intelligence-layer/
|
|
70
|
-
- Full agent rules: `node_modules/@trading-game/design-intelligence-layer/
|
|
66
|
+
- Design principles: `node_modules/@trading-game/design-intelligence-layer/guides/design-principles/trading-game-design-principles.md`
|
|
67
|
+
- Accessibility standards: `node_modules/@trading-game/design-intelligence-layer/guides/accessibility-standards/trading-game-accessibility-standards.md`
|
|
68
|
+
- Personas: `node_modules/@trading-game/design-intelligence-layer/guides/personas/trading-game-player-field-guide.md`
|
|
69
|
+
- Tone of voice: `node_modules/@trading-game/design-intelligence-layer/guides/tone-of-voice/trading-game-tone-of-voice-and-campaign-brief.md`
|
|
70
|
+
- Full agent rules: `node_modules/@trading-game/design-intelligence-layer/guides/rules/design-system-consuming-project.mdc`
|
package/README.md
CHANGED
|
@@ -84,7 +84,9 @@ npm install react react-dom tailwindcss
|
|
|
84
84
|
## What's inside
|
|
85
85
|
|
|
86
86
|
- **54 UI components** — buttons, forms, dialogs, charts, sidebars, and more
|
|
87
|
-
- **Design tokens** — CSS custom properties for color, radius, and
|
|
87
|
+
- **Design tokens** — CSS custom properties for color, radius, typography, and transitions synced from Figma
|
|
88
|
+
- **Transition tokens** — semantic duration and easing tokens (`duration-base`, `ease-standard`, etc.) — no hardcoded `duration-200` anywhere
|
|
89
|
+
- **Light-only theme** — white backgrounds, black text, primary blue accents — no dark mode
|
|
88
90
|
- **Typography classes** — heading scale (h1–xs) and body scale (lg–xs) ready to use
|
|
89
91
|
- **TypeScript** — full type definitions included
|
|
90
92
|
- **ESM + CJS** — works with any bundler
|
|
@@ -205,6 +207,31 @@ npm install react react-dom tailwindcss
|
|
|
205
207
|
<Alert variant="error" /> // red — error state
|
|
206
208
|
```
|
|
207
209
|
|
|
210
|
+
## Component behaviour notes
|
|
211
|
+
|
|
212
|
+
### AlertDialog — button fill
|
|
213
|
+
`AlertDialogAction` and `AlertDialogCancel` fill the full container width **only** when `size="sm"`. On `size="default"` (the default), buttons are natural width and right-aligned.
|
|
214
|
+
|
|
215
|
+
```tsx
|
|
216
|
+
<AlertDialogContent size="sm"> // buttons fill width (50/50 grid)
|
|
217
|
+
<AlertDialogContent size="default"> // buttons natural width, right-aligned
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Drawer — footer buttons
|
|
221
|
+
`DrawerFooter` makes all direct child buttons fill the full width automatically via `[&>*]:w-full`. Stack your buttons inside `DrawerFooter` and they will always be full-width.
|
|
222
|
+
|
|
223
|
+
### Link — size lg
|
|
224
|
+
The `lg` variant of `Link` uses `text-base` (16px). The `md` and `sm` variants use `text-sm` (14px) and `text-xs` (12px) respectively.
|
|
225
|
+
|
|
226
|
+
```tsx
|
|
227
|
+
<Link size="lg" /> // 16px — font-base
|
|
228
|
+
<Link size="md" /> // 14px — font-sm
|
|
229
|
+
<Link size="sm" /> // 12px — font-xs
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Tabs — line variant hover
|
|
233
|
+
On the `line` variant, hover state shows `text-primary` (blue) with no background fill. On the `default` (pill) variant, hover shows a grey background with `text-on-prominent`.
|
|
234
|
+
|
|
208
235
|
---
|
|
209
236
|
|
|
210
237
|
## Design tokens
|
|
@@ -250,6 +277,29 @@ All tokens are CSS custom properties, loaded automatically via `@trading-game/de
|
|
|
250
277
|
|
|
251
278
|
> ⚠️ **`border-border` vs `border-border-subtle`:** Both resolve to the same light grey `#EEEEEE`. `border-border` is kept for backward compatibility. **Prefer `border-border-subtle` in all new code.**
|
|
252
279
|
|
|
280
|
+
### Transition tokens
|
|
281
|
+
|
|
282
|
+
Duration — primitive scale:
|
|
283
|
+
|
|
284
|
+
| Tailwind class | CSS variable | Value | Used for |
|
|
285
|
+
|---|---|---|---|
|
|
286
|
+
| `duration-instant` | `--primitive-duration-instant` | `50ms` | Focus rings, hover tints |
|
|
287
|
+
| `duration-fast` | `--primitive-duration-fast` | `100ms` | Buttons, inputs, badges |
|
|
288
|
+
| `duration-base` | `--primitive-duration-base` | `200ms` | Dropdowns, popovers, accordions |
|
|
289
|
+
| `duration-slow` | `--primitive-duration-slow` | `300ms` | Dialogs, sheets, drawers closing |
|
|
290
|
+
| `duration-open` | `--primitive-duration-open` | `500ms` | Sheets, drawers entering |
|
|
291
|
+
|
|
292
|
+
Easing — primitive scale:
|
|
293
|
+
|
|
294
|
+
| Tailwind class | CSS variable | Value | Used for |
|
|
295
|
+
|---|---|---|---|
|
|
296
|
+
| `ease-standard` | `--primitive-ease-standard` | `cubic-bezier(0.2, 0, 0, 1)` | General UI — bidirectional state changes |
|
|
297
|
+
| `ease-enter` | `--primitive-ease-enter` | `cubic-bezier(0, 0, 0.2, 1)` | Overlays / surfaces entering |
|
|
298
|
+
| `ease-exit` | `--primitive-ease-exit` | `cubic-bezier(0.4, 0, 1, 1)` | Overlays / surfaces leaving |
|
|
299
|
+
| `ease-linear` | `--primitive-ease-linear` | `linear` | Sidebar width, progress bar |
|
|
300
|
+
|
|
301
|
+
> Always use token utilities — never raw `duration-200` or `ease-in-out` directly.
|
|
302
|
+
|
|
253
303
|
### Other tokens
|
|
254
304
|
|
|
255
305
|
| Tailwind class | Value | Usage |
|
|
@@ -315,7 +365,7 @@ When you bump `@trading-game/design-intelligence-layer` and run `npm install` (o
|
|
|
315
365
|
|
|
316
366
|
**Overrides:** Passing large `className` strings onto DS components can mask new defaults (e.g. old radius after a “pill button” update). After upgrading, review those callsites.
|
|
317
367
|
|
|
318
|
-
**Cursor / AI agents:** The package ships agent rules at `node_modules/@trading-game/design-intelligence-layer/
|
|
368
|
+
**Cursor / AI agents:** The package ships agent rules at `node_modules/@trading-game/design-intelligence-layer/guides/rules/design-system-consuming-project.mdc`. Cursor does **not** load rules from `node_modules` by default — **re-copy** that file into `.cursor/rules/` after each upgrade so instructions match the release (same command as in **AI Agent Setup** below). The rules include **Rule 7 — Package version upgrades**: agents should search for duplicated components, align with the package, and **tell you explicitly** if local component code was replaced.
|
|
319
369
|
|
|
320
370
|
---
|
|
321
371
|
|
|
@@ -336,22 +386,22 @@ This tells any AI agent to:
|
|
|
336
386
|
|
|
337
387
|
**Design principles file** (bundled in the package):
|
|
338
388
|
```
|
|
339
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
389
|
+
node_modules/@trading-game/design-intelligence-layer/guides/design-principles/trading-game-design-principles.md
|
|
340
390
|
```
|
|
341
391
|
|
|
342
392
|
**Accessibility standards file** (bundled in the package):
|
|
343
393
|
```
|
|
344
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
394
|
+
node_modules/@trading-game/design-intelligence-layer/guides/accessibility-standards/trading-game-accessibility-standards.md
|
|
345
395
|
```
|
|
346
396
|
|
|
347
397
|
**Personas file** (bundled in the package):
|
|
348
398
|
```
|
|
349
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
399
|
+
node_modules/@trading-game/design-intelligence-layer/guides/personas/trading-game-player-field-guide.md
|
|
350
400
|
```
|
|
351
401
|
|
|
352
402
|
**Tone of voice file** (bundled in the package):
|
|
353
403
|
```
|
|
354
|
-
node_modules/@trading-game/design-intelligence-layer/
|
|
404
|
+
node_modules/@trading-game/design-intelligence-layer/guides/tone-of-voice/trading-game-tone-of-voice-and-campaign-brief.md
|
|
355
405
|
```
|
|
356
406
|
|
|
357
407
|
All four files apply to all projects built with this package — landing pages, product screens, and games. Every AI agent must read all of them before starting any build. Run the design principles and accessibility checklists before completing any screen. Use the personas and tone of voice to guide all player-facing copy.
|
|
@@ -362,7 +412,7 @@ Copy the included rule file into your project:
|
|
|
362
412
|
|
|
363
413
|
```bash
|
|
364
414
|
mkdir -p .cursor/rules
|
|
365
|
-
cp node_modules/@trading-game/design-intelligence-layer/
|
|
415
|
+
cp node_modules/@trading-game/design-intelligence-layer/guides/rules/design-system-consuming-project.mdc .cursor/rules/
|
|
366
416
|
```
|
|
367
417
|
|
|
368
418
|
Re-run this **`cp` after every design-system version bump** so your workspace rules stay in sync with the installed package.
|
|
@@ -375,17 +425,17 @@ Add the following to your project's `CLAUDE.md`:
|
|
|
375
425
|
## Design System
|
|
376
426
|
|
|
377
427
|
This project uses @trading-game/design-intelligence-layer. Before writing any UI:
|
|
378
|
-
1. Read node_modules/@trading-game/design-intelligence-layer/
|
|
379
|
-
2. Read node_modules/@trading-game/design-intelligence-layer/
|
|
380
|
-
3. Read node_modules/@trading-game/design-intelligence-layer/
|
|
381
|
-
4. Read node_modules/@trading-game/design-intelligence-layer/
|
|
428
|
+
1. Read node_modules/@trading-game/design-intelligence-layer/guides/design-principles/trading-game-design-principles.md — apply the 8 principles and run the 7-point checklist on every screen
|
|
429
|
+
2. Read node_modules/@trading-game/design-intelligence-layer/guides/accessibility-standards/trading-game-accessibility-standards.md — apply WCAG 2.1 AA standards and run the 9-point accessibility checklist on every screen
|
|
430
|
+
3. Read node_modules/@trading-game/design-intelligence-layer/guides/personas/trading-game-player-field-guide.md — understand the 3 player modes (Edge Seeker, System Runner, Public Predictor) that shape all copy and UX
|
|
431
|
+
4. Read node_modules/@trading-game/design-intelligence-layer/guides/tone-of-voice/trading-game-tone-of-voice-and-campaign-brief.md — apply the voice, campaign territories, and mirror test for all player-facing copy
|
|
382
432
|
5. Check if the component exists in the package — import it, don't re-implement
|
|
383
433
|
6. Use only design token classes (bg-background, text-on-prominent, border-border-subtle, etc.) — no hardcoded hex or raw Tailwind palette colors
|
|
384
434
|
7. Do not install lucide-react, tailwindcss, or other bundled dependencies separately
|
|
385
435
|
8. If no token exists for a value, ask before using a hardcoded value
|
|
386
|
-
9. After upgrading the package: prefer package imports over local copies of components; if replacing local UI code with the package version, tell the user what was overwritten; re-copy
|
|
436
|
+
9. After upgrading the package: prefer package imports over local copies of components; if replacing local UI code with the package version, tell the user what was overwritten; re-copy guides/rules/design-system-consuming-project.mdc into .cursor/rules if using Cursor
|
|
387
437
|
|
|
388
|
-
See node_modules/@trading-game/design-intelligence-layer/
|
|
438
|
+
See node_modules/@trading-game/design-intelligence-layer/guides/rules/design-system-consuming-project.mdc for full rules.
|
|
389
439
|
See node_modules/@trading-game/design-intelligence-layer/README.md for complete token and component reference.
|
|
390
440
|
```
|
|
391
441
|
|
|
@@ -450,7 +500,7 @@ npm run build:next
|
|
|
450
500
|
Design tokens are managed in Figma and exported as CSS variables. To update:
|
|
451
501
|
|
|
452
502
|
1. Update the CSS custom properties in `app/globals.css` (playground) and `src/styles.css` (published package)
|
|
453
|
-
2. Update `
|
|
503
|
+
2. Update `guides/rules/design-system-consuming-project.mdc` to reflect any token renames
|
|
454
504
|
3. Update this README's token tables
|
|
455
505
|
|
|
456
506
|
---
|
package/dist/index.cjs
CHANGED
|
@@ -626,7 +626,7 @@ function AlertDialogContent(_a) {
|
|
|
626
626
|
"data-slot": "alert-dialog-content",
|
|
627
627
|
"data-size": size,
|
|
628
628
|
className: cn(
|
|
629
|
-
"group/alert-dialog-content fixed top-[50%] left-[50%] z-50 flex h-auto w-full max-w-[calc(100%-2rem)] flex-col translate-x-[-50%] translate-y-[-50%] gap-6 rounded-sm border border-border-subtle bg-background p-6 shadow-lg duration-
|
|
629
|
+
"group/alert-dialog-content fixed top-[50%] left-[50%] z-50 flex h-auto w-full max-w-[calc(100%-2rem)] flex-col translate-x-[-50%] translate-y-[-50%] gap-6 rounded-sm border border-border-subtle bg-background p-6 shadow-lg duration-base data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",
|
|
630
630
|
className
|
|
631
631
|
)
|
|
632
632
|
}, props)
|
|
@@ -725,11 +725,10 @@ function AlertDialogAction(_a) {
|
|
|
725
725
|
"variant",
|
|
726
726
|
"size"
|
|
727
727
|
]);
|
|
728
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Button, { variant, size, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Button, { variant, size, asChild: true, className: cn("group-data-[size=sm]/alert-dialog-content:w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
729
729
|
import_radix_ui3.AlertDialog.Action,
|
|
730
730
|
__spreadValues({
|
|
731
|
-
"data-slot": "alert-dialog-action"
|
|
732
|
-
className: cn(className)
|
|
731
|
+
"data-slot": "alert-dialog-action"
|
|
733
732
|
}, props)
|
|
734
733
|
) });
|
|
735
734
|
}
|
|
@@ -743,11 +742,10 @@ function AlertDialogCancel(_a) {
|
|
|
743
742
|
"variant",
|
|
744
743
|
"size"
|
|
745
744
|
]);
|
|
746
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Button, { variant, size, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Button, { variant, size, asChild: true, className: cn("group-data-[size=sm]/alert-dialog-content:w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
747
746
|
import_radix_ui3.AlertDialog.Cancel,
|
|
748
747
|
__spreadValues({
|
|
749
|
-
"data-slot": "alert-dialog-cancel"
|
|
750
|
-
className: cn(className)
|
|
748
|
+
"data-slot": "alert-dialog-cancel"
|
|
751
749
|
}, props)
|
|
752
750
|
) });
|
|
753
751
|
}
|
|
@@ -2354,7 +2352,7 @@ function DialogContent(_a) {
|
|
|
2354
2352
|
__spreadProps(__spreadValues({
|
|
2355
2353
|
"data-slot": "dialog-content",
|
|
2356
2354
|
className: cn(
|
|
2357
|
-
"fixed top-[50%] left-[50%] z-50 flex h-auto w-full max-w-[calc(100%-2rem)] flex-col translate-x-[-50%] translate-y-[-50%] gap-6 rounded-sm border border-border-subtle bg-background p-6 shadow-lg duration-
|
|
2355
|
+
"fixed top-[50%] left-[50%] z-50 flex h-auto w-full max-w-[calc(100%-2rem)] flex-col translate-x-[-50%] translate-y-[-50%] gap-6 rounded-sm border border-border-subtle bg-background p-6 shadow-lg duration-base outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
|
|
2358
2356
|
className
|
|
2359
2357
|
)
|
|
2360
2358
|
}, props), {
|
|
@@ -2927,7 +2925,7 @@ function DrawerFooter(_a) {
|
|
|
2927
2925
|
"div",
|
|
2928
2926
|
__spreadValues({
|
|
2929
2927
|
"data-slot": "drawer-footer",
|
|
2930
|
-
className: cn("mt-auto flex flex-col gap-2 p-4", className)
|
|
2928
|
+
className: cn("mt-auto flex flex-col gap-2 p-4 [&>*]:w-full", className)
|
|
2931
2929
|
}, props)
|
|
2932
2930
|
);
|
|
2933
2931
|
}
|
|
@@ -3805,7 +3803,7 @@ function ItemSeparator(_a) {
|
|
|
3805
3803
|
);
|
|
3806
3804
|
}
|
|
3807
3805
|
var itemVariants = (0, import_class_variance_authority7.cva)(
|
|
3808
|
-
"group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-
|
|
3806
|
+
"group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-instant outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-secondary-hover",
|
|
3809
3807
|
{
|
|
3810
3808
|
variants: {
|
|
3811
3809
|
variant: {
|
|
@@ -3993,7 +3991,7 @@ var linkVariants = (0, import_class_variance_authority8.cva)(
|
|
|
3993
3991
|
{
|
|
3994
3992
|
variants: {
|
|
3995
3993
|
size: {
|
|
3996
|
-
lg: "text-
|
|
3994
|
+
lg: "text-base [&_svg:not([class*='size-'])]:size-4",
|
|
3997
3995
|
md: "text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
3998
3996
|
sm: "text-xs [&_svg:not([class*='size-'])]:size-[14px]"
|
|
3999
3997
|
}
|
|
@@ -4424,7 +4422,7 @@ function NavigationMenuTrigger(_a) {
|
|
|
4424
4422
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4425
4423
|
import_lucide_react14.ChevronDownIcon,
|
|
4426
4424
|
{
|
|
4427
|
-
className: "relative top-[1px] ml-1 size-3 transition duration-
|
|
4425
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-slow group-data-[state=open]:rotate-180",
|
|
4428
4426
|
"aria-hidden": "true"
|
|
4429
4427
|
}
|
|
4430
4428
|
)
|
|
@@ -4444,7 +4442,7 @@ function NavigationMenuContent(_a) {
|
|
|
4444
4442
|
"data-slot": "navigation-menu-content",
|
|
4445
4443
|
className: cn(
|
|
4446
4444
|
"top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto",
|
|
4447
|
-
"group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-border-subtle group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-
|
|
4445
|
+
"group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-border-subtle group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-base **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95",
|
|
4448
4446
|
className
|
|
4449
4447
|
)
|
|
4450
4448
|
}, props)
|
|
@@ -5104,7 +5102,7 @@ function SheetContent(_a) {
|
|
|
5104
5102
|
__spreadProps(__spreadValues({
|
|
5105
5103
|
"data-slot": "sheet-content",
|
|
5106
5104
|
className: cn(
|
|
5107
|
-
"fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-
|
|
5105
|
+
"fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-standard data-[state=closed]:animate-out data-[state=closed]:duration-slow data-[state=open]:animate-in data-[state=open]:duration-open",
|
|
5108
5106
|
side === "right" && "inset-y-0 right-0 h-full w-3/4 border-l border-border-subtle data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
5109
5107
|
side === "left" && "inset-y-0 left-0 h-full w-3/4 border-r border-border-subtle data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
5110
5108
|
side === "top" && "inset-x-0 top-0 h-auto border-b border-border-subtle data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
@@ -5418,7 +5416,7 @@ function Sidebar(_a) {
|
|
|
5418
5416
|
{
|
|
5419
5417
|
"data-slot": "sidebar-gap",
|
|
5420
5418
|
className: cn(
|
|
5421
|
-
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-
|
|
5419
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-base ease-linear",
|
|
5422
5420
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
5423
5421
|
"group-data-[side=right]:rotate-180",
|
|
5424
5422
|
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
@@ -5430,7 +5428,7 @@ function Sidebar(_a) {
|
|
|
5430
5428
|
__spreadProps(__spreadValues({
|
|
5431
5429
|
"data-slot": "sidebar-container",
|
|
5432
5430
|
className: cn(
|
|
5433
|
-
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-
|
|
5431
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-base ease-linear md:flex",
|
|
5434
5432
|
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
5435
5433
|
// Adjust the padding for floating and inset variants.
|
|
5436
5434
|
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
@@ -6205,51 +6203,68 @@ function Tabs(_a) {
|
|
|
6205
6203
|
);
|
|
6206
6204
|
}
|
|
6207
6205
|
var tabsListVariants = (0, import_class_variance_authority11.cva)(
|
|
6208
|
-
"group/tabs-list inline-flex w-fit items-center justify-center
|
|
6206
|
+
"group/tabs-list inline-flex w-fit items-center justify-center text-on-subtle group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none has-[[data-icon-position=top]]:h-auto",
|
|
6209
6207
|
{
|
|
6210
6208
|
variants: {
|
|
6211
6209
|
variant: {
|
|
6212
6210
|
default: "bg-subtle",
|
|
6213
6211
|
line: "gap-1 bg-transparent"
|
|
6212
|
+
},
|
|
6213
|
+
size: {
|
|
6214
|
+
sm: "h-8 rounded-md p-[2px]",
|
|
6215
|
+
md: "h-10 rounded-lg p-1",
|
|
6216
|
+
lg: "h-12 rounded-xl p-1.5"
|
|
6214
6217
|
}
|
|
6215
6218
|
},
|
|
6216
6219
|
defaultVariants: {
|
|
6217
|
-
variant: "default"
|
|
6220
|
+
variant: "default",
|
|
6221
|
+
size: "md"
|
|
6218
6222
|
}
|
|
6219
6223
|
}
|
|
6220
6224
|
);
|
|
6221
6225
|
function TabsList(_a) {
|
|
6222
6226
|
var _b = _a, {
|
|
6223
6227
|
className,
|
|
6224
|
-
variant = "default"
|
|
6228
|
+
variant = "default",
|
|
6229
|
+
size = "md"
|
|
6225
6230
|
} = _b, props = __objRest(_b, [
|
|
6226
6231
|
"className",
|
|
6227
|
-
"variant"
|
|
6232
|
+
"variant",
|
|
6233
|
+
"size"
|
|
6228
6234
|
]);
|
|
6229
6235
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6230
6236
|
import_radix_ui32.Tabs.List,
|
|
6231
6237
|
__spreadValues({
|
|
6232
6238
|
"data-slot": "tabs-list",
|
|
6233
6239
|
"data-variant": variant,
|
|
6234
|
-
|
|
6240
|
+
"data-size": size,
|
|
6241
|
+
className: cn(tabsListVariants({ variant, size }), className)
|
|
6235
6242
|
}, props)
|
|
6236
6243
|
);
|
|
6237
6244
|
}
|
|
6238
6245
|
function TabsTrigger(_a) {
|
|
6239
6246
|
var _b = _a, {
|
|
6240
|
-
className
|
|
6247
|
+
className,
|
|
6248
|
+
iconPosition = "inline"
|
|
6241
6249
|
} = _b, props = __objRest(_b, [
|
|
6242
|
-
"className"
|
|
6250
|
+
"className",
|
|
6251
|
+
"iconPosition"
|
|
6243
6252
|
]);
|
|
6244
6253
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6245
6254
|
import_radix_ui32.Tabs.Trigger,
|
|
6246
6255
|
__spreadValues({
|
|
6247
6256
|
"data-slot": "tabs-trigger",
|
|
6257
|
+
"data-icon-position": iconPosition,
|
|
6248
6258
|
className: cn(
|
|
6249
|
-
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-
|
|
6250
|
-
"group-data-[
|
|
6259
|
+
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-3 py-1 text-sm font-normal whitespace-nowrap text-on-prominent/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:bg-secondary-hover hover:text-on-prominent focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-none group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
6260
|
+
"group-data-[size=sm]/tabs-list:gap-1 group-data-[size=sm]/tabs-list:rounded-sm group-data-[size=sm]/tabs-list:px-2 group-data-[size=sm]/tabs-list:text-xs",
|
|
6261
|
+
"group-data-[size=lg]/tabs-list:gap-2 group-data-[size=lg]/tabs-list:rounded-lg group-data-[size=lg]/tabs-list:px-4 group-data-[size=lg]/tabs-list:text-base",
|
|
6262
|
+
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:hover:bg-transparent group-data-[variant=line]/tabs-list:hover:text-primary group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent",
|
|
6251
6263
|
"data-[state=active]:bg-background data-[state=active]:border-transparent data-[state=active]:text-primary data-[state=active]:font-semibold",
|
|
6252
6264
|
"after:absolute after:bg-primary after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",
|
|
6265
|
+
iconPosition === "top" && "h-auto flex-col gap-1 py-2",
|
|
6266
|
+
iconPosition === "top" && "group-data-[size=sm]/tabs-list:gap-0.5 group-data-[size=sm]/tabs-list:py-1.5",
|
|
6267
|
+
iconPosition === "top" && "group-data-[size=lg]/tabs-list:gap-1.5 group-data-[size=lg]/tabs-list:py-2.5",
|
|
6253
6268
|
className
|
|
6254
6269
|
)
|
|
6255
6270
|
}, props)
|