@trading-game/design-intelligence-layer 0.16.9 → 0.17.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.
- package/README.md +34 -6
- package/dist/index.cjs +40 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +40 -21
- package/dist/index.js.map +1 -1
- package/guides/design-system-guide/trading-game-ds-guide.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -103,7 +103,7 @@ npm install react react-dom tailwindcss
|
|
|
103
103
|
| Aspect Ratio | `AspectRatio` |
|
|
104
104
|
| Avatar | `Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup` |
|
|
105
105
|
| Badge | `Badge, badgeVariants` |
|
|
106
|
-
| Banner | `Banner` — dismissible promotional surface on a tinted primary surface. Brand-blue
|
|
106
|
+
| Banner | `Banner` — dismissible promotional surface on a tinted primary surface. Brand-blue square `IconBadge` (40 px, `rounded-xs`) with a swappable `glyph` (or pass `icon` to override the badge entirely). Layouts: `inline`, `card`. Slots: `title`, `description`, `icon`/`glyph`, `action`, `actions`, `onDismiss`, `onClick` (whole-banner clickable). |
|
|
107
107
|
| Breadcrumb | `Breadcrumb, BreadcrumbList, BreadcrumbItem, ...` |
|
|
108
108
|
| Button | `Button, buttonVariants` |
|
|
109
109
|
| Calendar | `Calendar, CalendarDayButton` |
|
|
@@ -337,11 +337,12 @@ Dismissible **promotional / marketing** surface — for feature launches, offers
|
|
|
337
337
|
```
|
|
338
338
|
|
|
339
339
|
**Visual:**
|
|
340
|
-
- Surface: tinted primary surface — `bg-primary/[0.08]` with `border-primary/[0.16]` edge, `rounded-
|
|
341
|
-
- Default icon: 40 px brand-blue **
|
|
340
|
+
- Surface: tinted primary surface — `bg-primary/[0.08]` with `border-primary/[0.16]` edge, `rounded-sm` (6 px — matches Card and Alert).
|
|
341
|
+
- Default icon: 40 px brand-blue **square** (`rounded-xs bg-primary`, 4 px corners) with a white `Gift` glyph inside. Swap just the glyph via the `glyph` prop (e.g. `<Sparkles className="size-5" />`); replace the entire badge via the `icon` prop; or `icon={null}` to omit the column entirely.
|
|
342
|
+
- **Multi-line layout** (description set, or `layout="card"`): the leading icon top-aligns with the title (grid uses `items-start`) so it sits beside the headline rather than floating mid-body. Single-line banners stay vertically centred (`items-center`).
|
|
342
343
|
- Default action button: `Button variant="secondary"` size `sm` for every slot (inline `action` and both `actions[]` in card). Pass `<Button>` elements explicitly to override variant/size.
|
|
343
344
|
- Title supports `<b>` children styled with `text-primary` for in-line brand-blue accent.
|
|
344
|
-
- Close X (
|
|
345
|
+
- Close X (32 px): vertically-centred in the grid for single-line banners; pinned to the **top-right corner** (`absolute top-3 right-3`) when the banner is multi-line (`description` set) or `layout="card"` — so it reads as a true corner dismiss instead of floating mid-body. Hovers to `bg-secondary-hover`.
|
|
345
346
|
|
|
346
347
|
## Component behaviour notes
|
|
347
348
|
|
|
@@ -377,6 +378,21 @@ The `lg` variant of `Link` uses `text-base` (16px). The `md` and `sm` variants u
|
|
|
377
378
|
### Tabs — line variant hover
|
|
378
379
|
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`.
|
|
379
380
|
|
|
381
|
+
### Link — underline
|
|
382
|
+
Underline is **always visible** (not hover-only). Class chain: `underline decoration-2 underline-offset-4 text-primary`.
|
|
383
|
+
|
|
384
|
+
### Switch — pill + circle
|
|
385
|
+
Track is a pill (`rounded-full`); thumb is always a white circle (`rounded-full bg-prominent`). Checked track: `bg-primary`. Unchecked track: `bg-input`.
|
|
386
|
+
|
|
387
|
+
### Tooltip — default surface
|
|
388
|
+
Default variant uses a **black** surface (`bg-prominent-inverse text-on-prominent-inverse`) with a matching arrow. Use `variant="inverse"` for a white tooltip when the trigger sits on a saturated coloured surface. The primitive bakes in `max-w-xs` + `whitespace-normal`, so consumers no longer need to pass them. When a `Kbd` is detected inside via `:has([data-slot=kbd])`, padding bumps to `px-3.5 py-2` and siblings receive `space-y-1.5` for breathing room.
|
|
389
|
+
|
|
390
|
+
### Sidebar — selection + padding
|
|
391
|
+
`SidebarHeader` / `SidebarFooter` / `SidebarGroup` use `px-layout-margin-inline py-2` (16 px horizontal via `--semantic-layout-margin-inline`), with `group-data-[collapsible=icon]:px-2` so the collapsed icon rail tightens to 8 px. Active selection: `bg-primary/10` + `text-primary` + `font-semibold`. For `size="lg"` menu buttons (typical brand-block + label or profile pattern), the collapsed state uses `p-0! justify-center` so a 32 px brand block fills the rail while a 16 px lucide icon still centres on the same vertical line.
|
|
392
|
+
|
|
393
|
+
### Button — bg transition
|
|
394
|
+
The button base sets `transition-[color,border-color,opacity,box-shadow,transform]` (not `transition-all`), so `background-color` flips instantly on hover instead of fading in over 150 ms. This prevents the brief partially-transparent phase where surrounding surface tints (e.g. an Alert) could bleed through a hovered secondary button.
|
|
395
|
+
|
|
380
396
|
---
|
|
381
397
|
|
|
382
398
|
## Design tokens
|
|
@@ -695,10 +711,22 @@ Design tokens are managed in Figma and exported as CSS variables. To update:
|
|
|
695
711
|
|
|
696
712
|
## Changelog
|
|
697
713
|
|
|
698
|
-
###
|
|
714
|
+
### Unreleased
|
|
715
|
+
- **Tooltip — black surface by default:** `variant="default"` switched from brand-blue to black (`bg-prominent-inverse` + `text-on-prominent-inverse`). The arrow follows. `variant="inverse"` (white) is unchanged. Default primitive now bakes in `max-w-xs whitespace-normal`, so consumers no longer pass these classes.
|
|
716
|
+
- **Tooltip — keyboard-shortcut breathing room:** when the tooltip contains a `Kbd` (detected via `:has([data-slot=kbd])`), padding bumps to `px-3.5 py-2` and child elements get `space-y-1.5` so the title / kbd-row pair doesn't crowd.
|
|
717
|
+
- **Switch — pill + white circle knob:** track switched from `rounded-[6px]` to `rounded-full`, thumb from `rounded-[3px]` to `rounded-full`. Thumb is always `bg-prominent` (white) in both states. Checked track: `bg-primary`. Unchecked track: `bg-input`. No API change.
|
|
718
|
+
- **Link — underline always visible:** swapped `hover:underline` → `underline` so the underline reads at rest, not only on hover.
|
|
719
|
+
- **Sidebar — primary-tinted selection + 16 px padding rails:** active menu items now use `bg-primary/10` (brand-blue tint) instead of `bg-secondary-hover` (grey). `SidebarHeader` / `SidebarFooter` / `SidebarGroup` use `px-layout-margin-inline py-2` (16 px horizontal) when expanded; the icon-collapsed rail falls back to `px-2` so the icons still centre. The `lg`-size menu button gets `p-0! justify-center` when collapsed so a 32 px brand block fills the rail while a 16 px lucide icon still centres in the same column.
|
|
720
|
+
- **Banner — close X corner anchor:** the close `X` stays grid-centred on single-line banners but pins to `absolute top-3 right-3` whenever `description` is set or `layout="card"` — so it reads as a true corner dismiss instead of floating mid-body.
|
|
721
|
+
- **Button — instant bg-color hover:** the button base now uses `transition-[color,border-color,opacity,box-shadow,transform]` instead of `transition-all`. `background-color` flips instantly on hover so the brief partially-transparent fade phase (which let surrounding surface tints bleed through a hovered secondary button) is gone.
|
|
722
|
+
|
|
723
|
+
### v0.16.7
|
|
699
724
|
- **Credit badge readability pass:** `<Badge variant="fill-credit">` and the credit pill inside `CreditTicketCard` now sit on a deeper peach surface and use a bold deep-amber text for crisper read on the grey `bg-subtle` ticket card and on white / brand-blue surfaces alike. Token chain: `--primitive-amber-100` (#FEEBD9) → `--primitive-amber-300` (#FDCA8A) and `--primitive-amber-800` (#713813) → `--primitive-amber-900` (#521900). `--semantic-boost-surface` and `--on-semantic-boost` are repointed automatically. Variant class also bumps to `!font-bold`.
|
|
700
725
|
- **CreditTicketCard — responsive compact layout:** Compact variant now keeps the credit badge inline next to the value when there's room and only wraps to a second line when balance + badge would overflow into the deposit stub (`flex-wrap` on the value/badge row, with `whitespace-nowrap` on the value so the number itself never splits). Non-compact keeps the existing inline behavior.
|
|
701
|
-
- **Banner —
|
|
726
|
+
- **Banner — outer corner radius unified with Card / Alert:** outer surface `rounded-md` (8 px) → `rounded-sm` (6 px). Brand `IconBadge` reverted to `rounded-xs` (4 px square) after a brief detour through `rounded-full` — the square reads better against the surface.
|
|
727
|
+
- **Banner — multi-line icon top-alignment:** when a description is present (or `layout="card"`), the grid switches from `items-center` to `items-start` so the leading icon aligns with the title's top instead of sliding to the middle of the body block as it wraps.
|
|
728
|
+
- **Banner — class-order fix for `pr-12`:** in the card branch, `pr-12` was being merged before `SURFACE_CLASSES`'s `px-4`, so tailwind-merge kept the smaller right padding and long descriptions wrapped under the absolute-positioned close X. Re-ordering the `cn()` arguments puts `pr-12` after `SURFACE_CLASSES` so it wins (48 px right padding).
|
|
729
|
+
- **Alert — card layout body/close cell overlap fixed:** card body changed from `col-span-2 col-start-2` to `col-start-2 min-w-0`. Previously the body spanned cols 2-3 (same cell as the close X), so long descriptions slid under the close. Now the body lives in col 2 only and the close owns col 3.
|
|
702
730
|
- **Tooltip — `max-w-xs` + `whitespace-normal` built into the primitive:** Desktop tooltips now cap at 320 px by default with natural-word wrapping; consumers no longer need to pass these classes. Mobile drawers (the responsive Tooltip mode) keep the full sheet width — the consumer `className` is no longer applied to the drawer's inner content wrapper, so passing `max-w-xs` on `TooltipContent` for desktop tuning no longer leaks into and shrinks the mobile drawer text.
|
|
703
731
|
- **Naming note:** the v0.14.0 entry below claimed a `fill-credit` → `fill-boost` and `CreditTicketCard` → `BoostTicketCard` rename. **Those renames were not landed** — the current shipped names are still `fill-credit`, `CreditTicketCard`, and `--semantic-boost-surface` / `--on-semantic-boost` (the boost tokens stayed, the variant/component names didn't get renamed alongside them).
|
|
704
732
|
|
package/dist/index.cjs
CHANGED
|
@@ -522,7 +522,7 @@ function Spinner(_a) {
|
|
|
522
522
|
// components/ui/button.tsx
|
|
523
523
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
524
524
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
525
|
-
"inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-
|
|
525
|
+
"inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-[color,border-color,opacity,box-shadow,transform] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 active:opacity-60 disabled:pointer-events-none disabled:opacity-24 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 font-display font-bold",
|
|
526
526
|
{
|
|
527
527
|
variants: {
|
|
528
528
|
variant: {
|
|
@@ -813,7 +813,7 @@ function Alert(_a) {
|
|
|
813
813
|
}, props), {
|
|
814
814
|
children: [
|
|
815
815
|
iconColumn,
|
|
816
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "col-
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "col-start-2 row-start-1 min-w-0", children: body }),
|
|
817
817
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "col-start-3 row-start-1", children: closeButton }),
|
|
818
818
|
actions && actions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "col-span-3 col-start-2 row-start-2 mt-2 flex flex-wrap items-center justify-start gap-2", children: actions.slice(0, 2).map((node, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(React.Fragment, { children: wrapAction(node, buttonVariant) }, i)) }) : null
|
|
819
819
|
]
|
|
@@ -1178,9 +1178,9 @@ function Badge(_a) {
|
|
|
1178
1178
|
var React2 = __toESM(require("react"), 1);
|
|
1179
1179
|
var import_lucide_react3 = require("lucide-react");
|
|
1180
1180
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1181
|
-
var SURFACE_CLASSES = "w-full rounded-
|
|
1181
|
+
var SURFACE_CLASSES = "w-full rounded-sm border border-primary/[0.16] bg-primary/[0.08] px-4 py-3.5";
|
|
1182
1182
|
function IconBadge({ glyph }) {
|
|
1183
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "inline-flex size-10 shrink-0 items-center justify-center rounded-
|
|
1183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "inline-flex size-10 shrink-0 items-center justify-center rounded-xs bg-primary text-on-primary", children: glyph });
|
|
1184
1184
|
}
|
|
1185
1185
|
function Banner(_a) {
|
|
1186
1186
|
var _b = _a, {
|
|
@@ -1280,7 +1280,9 @@ function Banner(_a) {
|
|
|
1280
1280
|
const iconColumn = showIcon ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { "aria-hidden": true, className: "inline-flex shrink-0 translate-y-px", children: resolvedIcon }) : null;
|
|
1281
1281
|
if (isInline) {
|
|
1282
1282
|
const hasAction = Boolean(effectiveAction);
|
|
1283
|
+
const hasDescription = Boolean(description);
|
|
1283
1284
|
const rowTemplate = hasAction ? "grid-rows-[auto_auto] gap-y-3 sm:grid-rows-1 sm:gap-y-0" : "grid-rows-1 gap-y-0";
|
|
1285
|
+
const gridCols = hasDescription ? "grid-cols-[auto_1fr] sm:grid-cols-[auto_1fr_auto]" : "grid-cols-[auto_1fr_auto] sm:grid-cols-[auto_1fr_auto_auto]";
|
|
1284
1286
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1285
1287
|
"div",
|
|
1286
1288
|
__spreadProps(__spreadValues(__spreadValues({
|
|
@@ -1288,9 +1290,15 @@ function Banner(_a) {
|
|
|
1288
1290
|
"data-layout": "inline",
|
|
1289
1291
|
"data-clickable": isClickable ? "true" : void 0,
|
|
1290
1292
|
className: cn(
|
|
1291
|
-
"grid
|
|
1293
|
+
"grid gap-x-4",
|
|
1294
|
+
// Single-line banners vertically-centre the row (icon + title);
|
|
1295
|
+
// multi-line banners top-align so the leading icon sits next to
|
|
1296
|
+
// the title instead of floating mid-body.
|
|
1297
|
+
hasDescription ? "items-start" : "items-center",
|
|
1298
|
+
gridCols,
|
|
1292
1299
|
rowTemplate,
|
|
1293
1300
|
SURFACE_CLASSES,
|
|
1301
|
+
hasDescription && "relative pr-12",
|
|
1294
1302
|
clickableClasses,
|
|
1295
1303
|
className
|
|
1296
1304
|
)
|
|
@@ -1298,7 +1306,7 @@ function Banner(_a) {
|
|
|
1298
1306
|
children: [
|
|
1299
1307
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-1 row-start-1", children: iconColumn }),
|
|
1300
1308
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-2 row-start-1 min-w-0", children: body }),
|
|
1301
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-3 row-start-1 sm:col-start-4", children: closeButton }),
|
|
1309
|
+
hasDescription ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "absolute top-3 right-3", children: closeButton }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-3 row-start-1 self-center sm:col-start-4", children: closeButton }),
|
|
1302
1310
|
hasAction ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-2 row-start-2 justify-self-start sm:col-start-3 sm:row-start-1 sm:self-center sm:justify-self-end", children: wrapAction2(effectiveAction) }) : null
|
|
1303
1311
|
]
|
|
1304
1312
|
})
|
|
@@ -1311,8 +1319,10 @@ function Banner(_a) {
|
|
|
1311
1319
|
"data-layout": "card",
|
|
1312
1320
|
"data-clickable": isClickable ? "true" : void 0,
|
|
1313
1321
|
className: cn(
|
|
1314
|
-
|
|
1322
|
+
// Card layout is always multi-row — top-align the icon with the title.
|
|
1323
|
+
"relative grid grid-cols-[auto_1fr] grid-rows-[auto_auto] items-start gap-x-4 gap-y-3",
|
|
1315
1324
|
SURFACE_CLASSES,
|
|
1325
|
+
"pr-12",
|
|
1316
1326
|
clickableClasses,
|
|
1317
1327
|
className
|
|
1318
1328
|
)
|
|
@@ -1320,8 +1330,8 @@ function Banner(_a) {
|
|
|
1320
1330
|
children: [
|
|
1321
1331
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-1 row-start-1", children: iconColumn }),
|
|
1322
1332
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-2 row-start-1 min-w-0", children: body }),
|
|
1323
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "
|
|
1324
|
-
effectiveActions && effectiveActions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "absolute top-3 right-3", children: closeButton }),
|
|
1334
|
+
effectiveActions && effectiveActions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "col-start-2 row-start-2 flex flex-wrap items-center justify-start gap-2", children: effectiveActions.slice(0, 2).map((node, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(React2.Fragment, { children: wrapAction2(node) }, i)) }) : null
|
|
1325
1335
|
]
|
|
1326
1336
|
})
|
|
1327
1337
|
);
|
|
@@ -4511,7 +4521,7 @@ var import_class_variance_authority10 = require("class-variance-authority");
|
|
|
4511
4521
|
var import_radix_ui19 = require("radix-ui");
|
|
4512
4522
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4513
4523
|
var linkVariants = (0, import_class_variance_authority10.cva)(
|
|
4514
|
-
"inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 active:opacity-60 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:inline font-display font-bold normal-case text-primary
|
|
4524
|
+
"inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 active:opacity-60 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:inline font-display font-bold normal-case text-primary underline decoration-2 underline-offset-4",
|
|
4515
4525
|
{
|
|
4516
4526
|
variants: {
|
|
4517
4527
|
size: {
|
|
@@ -5847,8 +5857,8 @@ function TooltipContent(_a) {
|
|
|
5847
5857
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DrawerFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { variant: "primary", size: "md", children: closeLabel }) }) })
|
|
5848
5858
|
] });
|
|
5849
5859
|
}
|
|
5850
|
-
const surfaceClasses = variant === "inverse" ? "bg-prominent text-on-prominent shadow-sm" : "bg-
|
|
5851
|
-
const arrowClasses = variant === "inverse" ? "fill-prominent" : "fill-
|
|
5860
|
+
const surfaceClasses = variant === "inverse" ? "bg-prominent text-on-prominent shadow-sm" : "bg-prominent-inverse text-on-prominent-inverse";
|
|
5861
|
+
const arrowClasses = variant === "inverse" ? "fill-prominent" : "fill-prominent-inverse";
|
|
5852
5862
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_radix_ui29.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
5853
5863
|
import_radix_ui29.Tooltip.Content,
|
|
5854
5864
|
__spreadProps(__spreadValues({
|
|
@@ -5856,7 +5866,7 @@ function TooltipContent(_a) {
|
|
|
5856
5866
|
"data-variant": variant,
|
|
5857
5867
|
sideOffset,
|
|
5858
5868
|
className: cn(
|
|
5859
|
-
"z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md border-0 px-3 py-1.5 text-sm font-medium text-balance whitespace-normal fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
5869
|
+
"z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md border-0 px-3 py-1.5 has-[[data-slot=kbd]]:px-3.5 has-[[data-slot=kbd]]:py-2 has-[[data-slot=kbd]]:space-y-1.5 text-sm font-medium text-balance whitespace-normal fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
5860
5870
|
surfaceClasses,
|
|
5861
5871
|
className
|
|
5862
5872
|
)
|
|
@@ -6149,7 +6159,10 @@ function SidebarHeader(_a) {
|
|
|
6149
6159
|
__spreadValues({
|
|
6150
6160
|
"data-slot": "sidebar-header",
|
|
6151
6161
|
"data-sidebar": "header",
|
|
6152
|
-
className: cn(
|
|
6162
|
+
className: cn(
|
|
6163
|
+
"flex flex-col gap-2 px-layout-margin-inline py-2 group-data-[collapsible=icon]:px-2",
|
|
6164
|
+
className
|
|
6165
|
+
)
|
|
6153
6166
|
}, props)
|
|
6154
6167
|
);
|
|
6155
6168
|
}
|
|
@@ -6160,7 +6173,10 @@ function SidebarFooter(_a) {
|
|
|
6160
6173
|
__spreadValues({
|
|
6161
6174
|
"data-slot": "sidebar-footer",
|
|
6162
6175
|
"data-sidebar": "footer",
|
|
6163
|
-
className: cn(
|
|
6176
|
+
className: cn(
|
|
6177
|
+
"flex flex-col gap-2 px-layout-margin-inline py-2 group-data-[collapsible=icon]:px-2",
|
|
6178
|
+
className
|
|
6179
|
+
)
|
|
6164
6180
|
}, props)
|
|
6165
6181
|
);
|
|
6166
6182
|
}
|
|
@@ -6200,7 +6216,10 @@ function SidebarGroup(_a) {
|
|
|
6200
6216
|
__spreadValues({
|
|
6201
6217
|
"data-slot": "sidebar-group",
|
|
6202
6218
|
"data-sidebar": "group",
|
|
6203
|
-
className: cn(
|
|
6219
|
+
className: cn(
|
|
6220
|
+
"relative flex w-full min-w-0 flex-col px-layout-margin-inline py-2 group-data-[collapsible=icon]:px-2",
|
|
6221
|
+
className
|
|
6222
|
+
)
|
|
6204
6223
|
}, props)
|
|
6205
6224
|
);
|
|
6206
6225
|
}
|
|
@@ -6288,7 +6307,7 @@ function SidebarMenuItem(_a) {
|
|
|
6288
6307
|
);
|
|
6289
6308
|
}
|
|
6290
6309
|
var sidebarMenuButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
6291
|
-
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-sm p-2 text-left text-sidebar-foreground text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-secondary-hover hover:text-primary focus-visible:ring-2 active:bg-secondary-hover active:text-primary disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-
|
|
6310
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-sm p-2 text-left text-sidebar-foreground text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-secondary-hover hover:text-primary focus-visible:ring-2 active:bg-secondary-hover active:text-primary disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-primary/10 data-[active=true]:font-semibold data-[active=true]:text-primary data-[active=true]:hover:bg-primary/10 data-[active=true]:hover:text-primary data-[state=open]:hover:bg-secondary-hover data-[state=open]:hover:text-primary [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 data-[active=true]:[&>svg]:text-primary",
|
|
6292
6311
|
{
|
|
6293
6312
|
variants: {
|
|
6294
6313
|
variant: {
|
|
@@ -6298,7 +6317,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
|
6298
6317
|
size: {
|
|
6299
6318
|
default: "h-8 text-sm",
|
|
6300
6319
|
sm: "h-7 text-xs",
|
|
6301
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
6320
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0! group-data-[collapsible=icon]:justify-center"
|
|
6302
6321
|
}
|
|
6303
6322
|
},
|
|
6304
6323
|
defaultVariants: {
|
|
@@ -6498,7 +6517,7 @@ function SidebarMenuSubButton(_a) {
|
|
|
6498
6517
|
"data-active": isActive,
|
|
6499
6518
|
className: cn(
|
|
6500
6519
|
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-sm px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-secondary-hover hover:text-primary focus-visible:ring-2 active:bg-secondary-hover active:text-primary disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 data-[active=true]:[&>svg]:text-primary",
|
|
6501
|
-
"data-[active=true]:bg-
|
|
6520
|
+
"data-[active=true]:bg-primary/10 data-[active=true]:text-primary",
|
|
6502
6521
|
size === "sm" && "text-xs",
|
|
6503
6522
|
size === "md" && "text-sm",
|
|
6504
6523
|
"group-data-[collapsible=icon]:hidden",
|
|
@@ -6789,7 +6808,7 @@ function Switch(_a) {
|
|
|
6789
6808
|
"data-slot": "switch",
|
|
6790
6809
|
"data-size": size,
|
|
6791
6810
|
className: cn(
|
|
6792
|
-
"peer group/switch inline-flex shrink-0 items-center rounded-
|
|
6811
|
+
"peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent p-[3px] shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-6 data-[size=default]:w-11 data-[size=sm]:h-5 data-[size=sm]:w-9 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
6793
6812
|
className
|
|
6794
6813
|
)
|
|
6795
6814
|
}, props), {
|
|
@@ -6798,7 +6817,7 @@ function Switch(_a) {
|
|
|
6798
6817
|
{
|
|
6799
6818
|
"data-slot": "switch-thumb",
|
|
6800
6819
|
className: cn(
|
|
6801
|
-
"pointer-events-none block rounded-
|
|
6820
|
+
"pointer-events-none block rounded-full bg-prominent ring-0 transition-transform group-data-[size=default]/switch:size-[18px] group-data-[size=sm]/switch:size-[14px] data-[state=checked]:translate-x-[calc(100%+1px)] data-[state=unchecked]:translate-x-0"
|
|
6802
6821
|
)
|
|
6803
6822
|
}
|
|
6804
6823
|
)
|