@nadicodeai/ui 10.1.0 → 12.1.0
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 +39 -24
- package/README.md +58 -124
- package/dist/agent-orb.d.ts +1 -1
- package/dist/agent-orb.d.ts.map +1 -1
- package/dist/assets/brand/index.json +1 -1
- package/dist/components/action-menu.js +1 -1
- package/dist/components/agent-card.d.ts.map +1 -1
- package/dist/components/agent-card.js +2 -4
- package/dist/components/agent-orb.d.ts +11 -5
- package/dist/components/agent-orb.d.ts.map +1 -1
- package/dist/components/agent-orb.js +8 -6
- package/dist/components/alert.js +3 -3
- package/dist/components/badge.js +6 -6
- package/dist/components/brand-field.d.ts +2 -0
- package/dist/components/brand-field.d.ts.map +1 -1
- package/dist/components/brand-field.js +3 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +4 -5
- package/dist/components/carousel.js +2 -2
- package/dist/components/chart-bar-horizontal.js +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/context-menu.js +1 -1
- package/dist/components/diff-count.js +1 -1
- package/dist/components/dropdown-menu.js +3 -3
- package/dist/components/footer.d.ts +4 -7
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +1 -4
- package/dist/components/item.js +1 -1
- package/dist/components/kpi-card.js +2 -2
- package/dist/components/label-system.d.ts +1 -5
- package/dist/components/label-system.d.ts.map +1 -1
- package/dist/components/label-system.js +2 -6
- package/dist/components/menu-choice-row.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/object-workspace.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/scope-switcher.d.ts +24 -0
- package/dist/components/scope-switcher.d.ts.map +1 -0
- package/dist/components/scope-switcher.js +34 -0
- package/dist/components/settings-section.d.ts +2 -1
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +2 -2
- package/dist/components/status-dot.js +1 -1
- package/dist/components/status-row.js +1 -1
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.d.ts +11 -5
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +37 -5
- package/dist/components/tooltip.js +1 -1
- package/dist/components/trend-badge.d.ts.map +1 -1
- package/dist/components/trend-badge.js +1 -2
- package/dist/eslint/index.js +4 -0
- package/dist/eslint/rules/jsx-class-utility.js +1 -1
- package/dist/eslint/rules/no-shadcn-appearance-override.js +3 -3
- package/dist/eslint/rules/one-control-height.js +94 -0
- package/dist/eslint/rules/settings-section-description.js +45 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/agent-orb-motion.d.ts +1 -0
- package/dist/internal/agent-orb-motion.d.ts.map +1 -1
- package/dist/internal/agent-orb-motion.js +6 -3
- package/dist/internal/agent-orb.d.ts +10 -2
- package/dist/internal/agent-orb.d.ts.map +1 -1
- package/dist/internal/agent-orb.js +19 -9
- package/dist/internal/assistant-ui/attachment.js +4 -4
- package/dist/internal/assistant-ui/follow-up-suggestions.js +1 -1
- package/dist/internal/assistant-ui/markdown-text.js +4 -4
- package/dist/internal/assistant-ui/reasoning.js +2 -2
- package/dist/internal/assistant-ui/thread.d.ts.map +1 -1
- package/dist/internal/assistant-ui/thread.js +11 -9
- package/dist/internal/assistant-ui/tool-group.js +2 -2
- package/dist/styles/components.css +9 -5
- package/dist/styles/globals.css +43 -0
- package/package.json +3 -4
- package/dist/components/handoff-banner.d.ts +0 -9
- package/dist/components/handoff-banner.d.ts.map +0 -1
- package/dist/components/handoff-banner.js +0 -6
- package/docs/activity.md +0 -113
- package/docs/agent-orb.md +0 -168
- package/docs/component-classification.md +0 -45
- package/docs/consuming-cross-repo.md +0 -116
- package/docs/contract.md +0 -388
- package/docs/icon-assets.md +0 -106
- package/docs/migration/1.0.0.md +0 -75
- package/docs/migration/10.0.0.md +0 -144
- package/docs/migration/2.0.0.md +0 -69
- package/docs/migration/6.0.0.md +0 -30
- package/docs/migration/9.0.0.md +0 -35
- package/docs/migration/base-ui-migration.md +0 -62
- package/docs/model-identity.md +0 -18
- package/docs/product-compositions.md +0 -96
- package/docs/product-sections.md +0 -200
|
@@ -23,7 +23,7 @@ function ContextMenuLabel({ className, inset, ...props }) {
|
|
|
23
23
|
return (_jsx(ContextMenuPrimitive.GroupLabel, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", className), ...props }));
|
|
24
24
|
}
|
|
25
25
|
function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
26
|
-
return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("group/context-menu-item relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-
|
|
26
|
+
return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("group/context-menu-item relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive-soft-foreground data-[variant=destructive]:focus:bg-destructive-soft data-[variant=destructive]:focus:text-destructive-soft-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive-soft-foreground", className), ...props }));
|
|
27
27
|
}
|
|
28
28
|
function ContextMenuSub({ ...props }) {
|
|
29
29
|
return _jsx(ContextMenuPrimitive.SubmenuRoot, { "data-slot": "context-menu-sub", ...props });
|
|
@@ -21,6 +21,6 @@ function AnimatedInt({ value }) {
|
|
|
21
21
|
function DiffCount({ added, removed, className, ...props }) {
|
|
22
22
|
if (!added && !removed)
|
|
23
23
|
return null;
|
|
24
|
-
return (_jsxs("span", { className: cn("flex shrink-0 items-center gap-1 tabular-nums", className), "data-slot": "diff-count", ...props, children: [added > 0 ? (_jsxs("span", { className: "text-
|
|
24
|
+
return (_jsxs("span", { className: cn("flex shrink-0 items-center gap-1 tabular-nums", className), "data-slot": "diff-count", ...props, children: [added > 0 ? (_jsxs("span", { className: "text-success-soft-foreground", children: ["+", _jsx(AnimatedInt, { value: added })] })) : null, removed > 0 ? (_jsxs("span", { className: "text-destructive-soft-foreground", children: ["\u2212", _jsx(AnimatedInt, { value: removed })] })) : null] }));
|
|
25
25
|
}
|
|
26
26
|
export { DiffCount };
|
|
@@ -22,8 +22,8 @@ function DropdownMenuLabel({ className, inset, ...props }) {
|
|
|
22
22
|
return (_jsx(MenuPrimitive.GroupLabel, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", className), ...props }));
|
|
23
23
|
}
|
|
24
24
|
function DropdownMenuItem({ className, iconOnly = false, inset, variant = "default", ...props }) {
|
|
25
|
-
return (_jsx(MenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-icon-only": iconOnly || undefined, "data-inset": inset, "data-variant": variant, className: cn("group/dropdown-menu-item relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 group-data-[density=comfortable]/menu:px-3 group-data-[density=comfortable]/menu:py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-
|
|
26
|
-
"size-8 min-w-touch-target shrink-0 justify-center rounded-
|
|
25
|
+
return (_jsx(MenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-icon-only": iconOnly || undefined, "data-inset": inset, "data-variant": variant, className: cn("group/dropdown-menu-item relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 group-data-[density=comfortable]/menu:px-3 group-data-[density=comfortable]/menu:py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive-soft-foreground data-[variant=destructive]:focus:bg-destructive-soft data-[variant=destructive]:focus:text-destructive-soft-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive-soft-foreground", iconOnly &&
|
|
26
|
+
"size-8 min-w-touch-target shrink-0 justify-center rounded-md p-0 group-data-[density=comfortable]/menu:p-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0", className), ...props }));
|
|
27
27
|
}
|
|
28
28
|
function DropdownMenuCommand({ icon, children, className, ...props }) {
|
|
29
29
|
return (_jsxs(DropdownMenuItem, { ...props, className: cn(className, "h-auto w-full min-w-0 justify-start gap-3 text-left font-normal whitespace-normal"), children: [_jsx("span", { className: "min-w-0 flex-1 [overflow-wrap:anywhere]", children: children }), _jsx("span", { "aria-hidden": "true", className: "flex shrink-0 items-center justify-center", children: icon })] }));
|
|
@@ -45,7 +45,7 @@ function DropdownMenuRadioGroup({ ...props }) {
|
|
|
45
45
|
}
|
|
46
46
|
function DropdownMenuRadioItem({ className, iconOnly = false, children, inset, ...props }) {
|
|
47
47
|
return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", "data-icon-only": iconOnly || undefined, "data-inset": inset, className: cn("relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", iconOnly &&
|
|
48
|
-
"size-8 min-w-touch-target justify-center rounded-
|
|
48
|
+
"size-8 min-w-touch-target justify-center rounded-md p-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0 data-checked:bg-muted data-checked:text-foreground", className), ...props, children: [!iconOnly ? (_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center", "data-slot": "dropdown-menu-radio-item-indicator", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) })) : null, children] }));
|
|
49
49
|
}
|
|
50
50
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
51
51
|
return (_jsx(MenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
|
|
@@ -3,8 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
* footer — the always-dark site footer (V5 · B20).
|
|
4
4
|
*
|
|
5
5
|
* A brandline + identity paragraph beside two link columns, a meta row
|
|
6
|
-
* (copyright · clock slot · locations),
|
|
7
|
-
* all. The footer is ALWAYS dark, so the root carries its own `dark` ancestor class
|
|
6
|
+
* (copyright · clock slot · locations). The footer is ALWAYS dark, so the root carries its own `dark` ancestor class
|
|
8
7
|
* and resolves every colour from semantic roles (`bg-card`, `text-foreground`,
|
|
9
8
|
* `text-muted-foreground`, `border-border`, `text-primary`).
|
|
10
9
|
*
|
|
@@ -12,9 +11,8 @@ import * as React from "react";
|
|
|
12
11
|
* `mega` variant adds exactly ONE inner seam, the hairline above the meta strip
|
|
13
12
|
* (`FooterMegaMeta`). Link columns separate by whitespace, never rails.
|
|
14
13
|
*
|
|
15
|
-
* The
|
|
16
|
-
*
|
|
17
|
-
* live timer — no client JS in this pass). Token-only; the root sets its own `dark`
|
|
14
|
+
* The clock is a CONTENT slot: `FooterClock` takes a pre-formatted time string
|
|
15
|
+
* (a value, not a live timer — no client JS in this pass). Token-only; the root sets its own `dark`
|
|
18
16
|
* class (an accepted ancestor-class remap), never `dark:` utilities.
|
|
19
17
|
*/
|
|
20
18
|
/**
|
|
@@ -37,11 +35,10 @@ declare function FooterIdentity({ className, ...props }: React.ComponentProps<"p
|
|
|
37
35
|
declare function FooterNav({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
38
36
|
declare function FooterMeta({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
39
37
|
declare function FooterClock({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
40
|
-
declare function FooterGhost({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
41
38
|
declare function FooterMegaTop({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
42
39
|
declare function FooterMegaCols({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
43
40
|
declare function FooterMegaCol({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
44
41
|
declare function FooterMegaColTitle({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
45
42
|
declare function FooterMegaMeta({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
46
|
-
export { Footer, FooterInner, FooterBrand, FooterIdentity, FooterNav, FooterMeta, FooterClock,
|
|
43
|
+
export { Footer, FooterInner, FooterBrand, FooterIdentity, FooterNav, FooterMeta, FooterClock, FooterMegaTop, FooterMegaCols, FooterMegaCol, FooterMegaColTitle, FooterMegaMeta, };
|
|
47
44
|
//# sourceMappingURL=footer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../src/components/footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../src/components/footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;GAeG;AAEH;;;;;GAKG;AACH,KAAK,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtC,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAgB,EAChB,KAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,qBAcrF;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAgB,EAChB,KAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,qBAalF;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAWtE;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQzE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWtE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQrE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAQzE;AAID,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW3E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQ7E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAY3E;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,GACf,CAAC"}
|
|
@@ -21,9 +21,6 @@ function FooterMeta({ className, ...props }) {
|
|
|
21
21
|
function FooterClock({ className, ...props }) {
|
|
22
22
|
return (_jsx("span", { "data-slot": "footer-clock", className: cn("nc-type-label-mono text-primary", className), ...props }));
|
|
23
23
|
}
|
|
24
|
-
function FooterGhost({ className, ...props }) {
|
|
25
|
-
return (_jsx("span", { "data-slot": "footer-ghost", "aria-hidden": "true", className: cn("pointer-events-none absolute inset-x-0 bottom-0 z-0 select-none overflow-hidden whitespace-nowrap text-[clamp(90px,14vw,210px)] font-semibold leading-[0.8] tracking-tight text-foreground/5", className), ...props }));
|
|
26
|
-
}
|
|
27
24
|
/* ── mega variant slots ────────────────────────────────────────────────── */
|
|
28
25
|
function FooterMegaTop({ className, ...props }) {
|
|
29
26
|
return (_jsx("div", { "data-slot": "footer-mega-top", className: cn("grid grid-cols-1 items-start gap-8 sm:grid-cols-[minmax(0,7fr)_minmax(0,5fr)] sm:gap-x-12", className), ...props }));
|
|
@@ -42,4 +39,4 @@ function FooterMegaMeta({ className, ...props }) {
|
|
|
42
39
|
// the single inner seam the mega variant adds: a top hairline, owned once.
|
|
43
40
|
"flex flex-wrap items-center justify-between gap-x-6 gap-y-3 border-t border-border pt-6 text-muted-foreground", className), ...props }));
|
|
44
41
|
}
|
|
45
|
-
export { Footer, FooterInner, FooterBrand, FooterIdentity, FooterNav, FooterMeta, FooterClock,
|
|
42
|
+
export { Footer, FooterInner, FooterBrand, FooterIdentity, FooterNav, FooterMeta, FooterClock, FooterMegaTop, FooterMegaCols, FooterMegaCol, FooterMegaColTitle, FooterMegaMeta, };
|
package/dist/components/item.js
CHANGED
|
@@ -10,7 +10,7 @@ function ItemGroup({ className, ...props }) {
|
|
|
10
10
|
function ItemSeparator({ className, ...props }) {
|
|
11
11
|
return (_jsx(Separator, { "data-slot": "item-separator", orientation: "horizontal", className: cn("my-2", className), ...props, "aria-hidden": "true", role: "presentation" }));
|
|
12
12
|
}
|
|
13
|
-
const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap items-center rounded-md border text-sm [a]:transition-colors [a]:hover:bg-
|
|
13
|
+
const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap items-center rounded-md border text-sm [a]:transition-colors [a]:hover:bg-accent", {
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
16
|
default: "border-transparent",
|
|
@@ -7,8 +7,8 @@ import { Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle, }
|
|
|
7
7
|
import { TrendBadge, trendTone } from "./trend-badge.js";
|
|
8
8
|
const VALUE_TONE_CLASS = {
|
|
9
9
|
default: "text-foreground",
|
|
10
|
-
warning: "text-
|
|
11
|
-
critical: "text-
|
|
10
|
+
warning: "text-warning-soft-foreground",
|
|
11
|
+
critical: "text-destructive-soft-foreground",
|
|
12
12
|
};
|
|
13
13
|
function KpiCard({ label, value, delta, note, tone = "default", render, className, }) {
|
|
14
14
|
return (_jsxs(Card, { size: "sm", "data-slot": "kpi-card", "data-tone": tone, className: className, ...(render ? { render } : {}), children: [_jsxs(CardHeader, { children: [_jsx(CardDescription, { className: "line-clamp-2 min-h-10", children: label }), _jsx(CardTitle, { className: cn(
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare function MetaLabel({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
3
3
|
declare function CommandSuffix({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
4
|
-
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
removeLabel: string;
|
|
7
|
-
}): React.JSX.Element;
|
|
8
|
-
export { CommandSuffix, FilterChip, MetaLabel };
|
|
4
|
+
export { CommandSuffix, MetaLabel };
|
|
9
5
|
//# sourceMappingURL=label-system.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-system.d.ts","sourceRoot":"","sources":["../../src/components/label-system.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"label-system.d.ts","sourceRoot":"","sources":["../../src/components/label-system.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAWvE;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW3E;AAED,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { XIcon } from "lucide-react";
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
import { cn } from "../lib/utils.js";
|
|
4
3
|
function MetaLabel({ className, ...props }) {
|
|
5
4
|
return (_jsx("span", { "data-slot": "meta-label", className: cn("inline-flex h-5 w-fit shrink-0 items-center justify-center rounded-md border border-border bg-muted/40 px-2 text-xs font-medium text-muted-foreground whitespace-nowrap", className), ...props }));
|
|
@@ -7,7 +6,4 @@ function MetaLabel({ className, ...props }) {
|
|
|
7
6
|
function CommandSuffix({ className, ...props }) {
|
|
8
7
|
return (_jsx("span", { "data-slot": "command-suffix", className: cn("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md border border-border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground tabular-nums whitespace-nowrap", className), ...props }));
|
|
9
8
|
}
|
|
10
|
-
|
|
11
|
-
return (_jsxs("button", { type: type, "data-slot": "filter-chip", "aria-label": removeLabel, className: cn("nc-filter-chip max-w-full shrink-0 border-border bg-muted/40 text-xs font-medium text-foreground transition-colors hover:bg-muted disabled:pointer-events-none disabled:opacity-50 whitespace-nowrap [&>svg]:size-3", className), ...props, children: [_jsx("span", { className: "min-w-0 truncate", children: children }), _jsx(XIcon, { "aria-hidden": "true", className: "shrink-0", "data-icon": "inline-end" })] }));
|
|
12
|
-
}
|
|
13
|
-
export { CommandSuffix, FilterChip, MetaLabel };
|
|
9
|
+
export { CommandSuffix, MetaLabel };
|
|
@@ -8,7 +8,7 @@ import { cn } from "../lib/utils.js";
|
|
|
8
8
|
* without reopening it.
|
|
9
9
|
*/
|
|
10
10
|
function MenuChoiceRow({ className, disabled, label, onValueChange, options, value, ...props }) {
|
|
11
|
-
return (_jsxs("div", { "data-slot": "menu-choice-row", className: cn("flex min-h-touch-target items-center justify-between gap-4 px-3 py-1 text-sm", className), ...props, children: [_jsx("span", { children: label }), _jsx(DropdownMenuRadioGroup, { "aria-label": label, className: "flex shrink-0 items-center gap-0.5 rounded-
|
|
11
|
+
return (_jsxs("div", { "data-slot": "menu-choice-row", className: cn("flex min-h-touch-target items-center justify-between gap-4 px-3 py-1 text-sm", className), ...props, children: [_jsx("span", { children: label }), _jsx(DropdownMenuRadioGroup, { "aria-label": label, className: "flex shrink-0 items-center gap-0.5 rounded-md border border-border p-0.5", value: value, onValueChange: (next) => {
|
|
12
12
|
const selected = options.find((option) => option.value === next);
|
|
13
13
|
if (selected)
|
|
14
14
|
onValueChange(selected.value);
|
|
@@ -24,7 +24,7 @@ function MenubarContent({ className, align = "start", alignOffset = -4, sideOffs
|
|
|
24
24
|
return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("min-w-36 rounded-md border-0 nc-glass p-nadicode-xxs text-popover-foreground nc-elevation-floating", className), ...props }));
|
|
25
25
|
}
|
|
26
26
|
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
27
|
-
return (_jsx(DropdownMenuItem, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("group/menubar-item min-h-touch-target gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-
|
|
27
|
+
return (_jsx(DropdownMenuItem, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("group/menubar-item min-h-touch-target gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive-soft-foreground data-[variant=destructive]:focus:bg-destructive-soft data-[variant=destructive]:focus:text-destructive-soft-foreground data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive-soft-foreground!", className), ...props }));
|
|
28
28
|
}
|
|
29
29
|
function MenubarCheckboxItem({ className, children, checked, inset, ...props }) {
|
|
30
30
|
return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", "data-inset": inset, className: cn("relative flex min-h-touch-target cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "./card.js";
|
|
3
3
|
import { ObjectIdentitySupport } from "../internal/object-identity-support.js";
|
|
4
4
|
export function ObjectIdentity({ visual, title, description, metadata, action, editAction, layout = "inline", support, }) {
|
|
5
|
-
return (_jsxs(Card, { className: layout === "inline"
|
|
5
|
+
return (_jsxs(Card, { className: layout === "inline" && support
|
|
6
6
|
? "min-w-0 lg:grid lg:grid-cols-[minmax(0,1fr)_minmax(0,1.25fr)] lg:items-center"
|
|
7
7
|
: "min-w-0", render: _jsx("header", { "data-slot": "object-identity" }), size: "sm", children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex min-w-0 items-center gap-4", children: [_jsx("div", { className: "shrink-0", children: visual }), _jsxs("div", { className: "grid min-w-0 gap-1.5", children: [_jsx(CardTitle, { children: _jsx("h2", { className: "wrap-anywhere", children: title }) }), description ? _jsx(CardDescription, { children: description }) : null, metadata ? (_jsx("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground", children: metadata })) : null] })] }), editAction ? _jsx(CardAction, { children: editAction }) : null] }), support || action ? (_jsxs(CardContent, { className: "flex min-w-0 flex-wrap items-start gap-4", children: [support ? (_jsx(ObjectIdentitySupport, { label: support.label, children: _jsx(ObjectFacts, { density: "compact", facts: support.facts }) })) : null, action ? _jsx("div", { className: "min-w-0 flex-1 basis-full", children: action }) : null] })) : null] }));
|
|
8
8
|
}
|
|
@@ -24,7 +24,7 @@ const progressIndicatorVariants = cva("h-full origin-left scale-x-[var(--progres
|
|
|
24
24
|
tone: "default",
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
|
-
const OVER_CAP_CLASS = "bg-(--nc-
|
|
27
|
+
const OVER_CAP_CLASS = "bg-(--nc-state-blocked)";
|
|
28
28
|
const ProgressStateContext = createContext({
|
|
29
29
|
scale: 0,
|
|
30
30
|
tone: "default",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ScopeOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
group?: string;
|
|
6
|
+
keywords?: readonly string[];
|
|
7
|
+
};
|
|
8
|
+
export type ScopeSwitcherCopy = {
|
|
9
|
+
label: string;
|
|
10
|
+
search: string;
|
|
11
|
+
empty: string;
|
|
12
|
+
};
|
|
13
|
+
export type ScopeSwitcherProps = {
|
|
14
|
+
value: string;
|
|
15
|
+
options: readonly ScopeOption[];
|
|
16
|
+
onValueChange: (value: string) => void;
|
|
17
|
+
copy: ScopeSwitcherCopy;
|
|
18
|
+
create?: {
|
|
19
|
+
label: string;
|
|
20
|
+
onSelect: () => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare function ScopeSwitcher({ value, options, onValueChange, copy, create }: ScopeSwitcherProps): React.JSX.Element;
|
|
24
|
+
//# sourceMappingURL=scope-switcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-switcher.d.ts","sourceRoot":"","sources":["../../src/components/scope-switcher.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IAChC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;CAClD,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,kBAAkB,qBAgFhG"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ChevronsUpDown, Plus } from "lucide-react";
|
|
5
|
+
import { Button } from "./button.js";
|
|
6
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, } from "./command.js";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTitle, PopoverTrigger } from "./popover.js";
|
|
8
|
+
export function ScopeSwitcher({ value, options, onValueChange, copy, create }) {
|
|
9
|
+
const [open, setOpen] = React.useState(false);
|
|
10
|
+
const search = React.useRef(null);
|
|
11
|
+
const current = options.find((option) => option.value === value);
|
|
12
|
+
const groups = React.useMemo(() => {
|
|
13
|
+
const byGroup = new Map();
|
|
14
|
+
for (const option of options) {
|
|
15
|
+
const items = byGroup.get(option.group) ?? [];
|
|
16
|
+
items.push(option);
|
|
17
|
+
byGroup.set(option.group, items);
|
|
18
|
+
}
|
|
19
|
+
return [...byGroup];
|
|
20
|
+
}, [options]);
|
|
21
|
+
const choose = (next) => {
|
|
22
|
+
setOpen(false);
|
|
23
|
+
if (next !== value)
|
|
24
|
+
onValueChange(next);
|
|
25
|
+
};
|
|
26
|
+
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsxs(PopoverTrigger, { render: _jsx(Button, { variant: "ghost", "aria-label": `${copy.label}: ${current?.label ?? value}`, className: "min-w-0 max-w-64" }), children: [_jsx("span", { className: "truncate", children: current?.label ?? value }), _jsx(ChevronsUpDown, { "data-icon": "inline-end", "aria-hidden": "true" })] }), _jsxs(PopoverContent, { align: "start", className: "w-72 p-0", initialFocus: search, children: [_jsx(PopoverTitle, { className: "sr-only", children: copy.label }), _jsxs(Command, { label: copy.search, children: [_jsx(CommandInput, { ref: search, "aria-label": copy.search, placeholder: copy.search }), _jsxs(CommandList, { label: copy.label, children: [_jsx(CommandEmpty, { children: copy.empty }), groups.map(([group, items]) => (_jsx(CommandGroup, { heading: group, children: items.map((option) => (_jsx(CommandItem, { value: option.value, keywords: [
|
|
27
|
+
option.label,
|
|
28
|
+
...(option.group ? [option.group] : []),
|
|
29
|
+
...(option.keywords ?? []),
|
|
30
|
+
], "data-checked": option.value === value, onSelect: () => choose(option.value), children: _jsx("span", { className: "truncate", children: option.label }) }, option.value))) }, group ?? ""))), create ? (_jsxs(_Fragment, { children: [_jsx(CommandSeparator, { alwaysRender: true }), _jsx(CommandGroup, { forceMount: true, children: _jsxs(CommandItem, { value: `create ${create.label}`, forceMount: true, onSelect: () => {
|
|
31
|
+
setOpen(false);
|
|
32
|
+
create.onSelect();
|
|
33
|
+
}, children: [_jsx(Plus, { "aria-hidden": "true" }), create.label] }) })] })) : null] })] })] })] }));
|
|
34
|
+
}
|
|
@@ -8,11 +8,12 @@ export type SettingsFieldControlProps = {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
required?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare function SettingsSection({ title, description, actions, footer, children, className, surface, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
|
|
11
|
+
declare function SettingsSection({ title, description, actions, footer, footerHint, children, className, surface, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
|
|
12
12
|
title?: React.ReactNode;
|
|
13
13
|
description?: React.ReactNode;
|
|
14
14
|
actions?: React.ReactNode;
|
|
15
15
|
footer?: React.ReactNode;
|
|
16
|
+
footerHint?: React.ReactNode;
|
|
16
17
|
surface?: CardSurface;
|
|
17
18
|
}): React.JSX.Element;
|
|
18
19
|
declare function SettingsField({ id, label, description, error, invalid, disabled, required, children, className, contentClassName, controlClassName, ...props }: Omit<React.ComponentProps<typeof Field>, "children"> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAQL,KAAK,WAAW,EACjB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,KAAK,EAMN,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,
|
|
1
|
+
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAQL,KAAK,WAAW,EACjB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,KAAK,EAMN,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,qBAoCA;AAED,iBAAS,aAAa,CAAC,EACrB,EAAE,EACF,KAAK,EACL,WAAW,EACX,KAAK,EACL,OAAwB,EACxB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,YAAY,EAAE,yBAAyB,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAClF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,qBAsCA;AAED,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -3,8 +3,8 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card.js";
|
|
4
4
|
import { Separator } from "./separator.js";
|
|
5
5
|
import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, } from "./field.js";
|
|
6
|
-
function SettingsSection({ title, description, actions, footer, children, className, surface = "resting", ...props }) {
|
|
7
|
-
return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "settings-section" }), surface: surface, className: cn("min-w-0", className), children: [(title || description || actions) && (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions && _jsx(CardAction, { children: actions })] }), _jsx(Separator, {})] })), _jsx(CardContent, { children: _jsx(FieldGroup, { "data-slot": "settings-section-fields", children: children }) }), footer && (
|
|
6
|
+
function SettingsSection({ title, description, actions, footer, footerHint, children, className, surface = "resting", ...props }) {
|
|
7
|
+
return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "settings-section" }), surface: surface, className: cn("min-w-0", className), children: [(title || description || actions) && (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions && _jsx(CardAction, { children: actions })] }), _jsx(Separator, {})] })), _jsx(CardContent, { children: _jsx(FieldGroup, { "data-slot": "settings-section-fields", children: children }) }), (footer || footerHint) && (_jsxs(CardFooter, { className: "flex-wrap gap-3 border-t border-border bg-recessed py-3", children: [footerHint && (_jsx("div", { "data-slot": "settings-section-hint", className: "min-w-0 flex-1 text-muted-foreground", children: footerHint })), footer && _jsx("div", { className: "ml-auto flex flex-wrap items-center gap-3", children: footer })] }))] }));
|
|
8
8
|
}
|
|
9
9
|
function SettingsField({ id, label, description, error, invalid = Boolean(error), disabled, required, children, className, contentClassName, controlClassName, ...props }) {
|
|
10
10
|
const descriptionId = description ? `${id}-description` : undefined;
|
|
@@ -4,7 +4,7 @@ import { useState } from "react";
|
|
|
4
4
|
import { ChevronRightIcon } from "lucide-react";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
6
|
function StatusRow({ children, className, leading, onActivate, trailing, trailingVisible = false, ...props }) {
|
|
7
|
-
return (_jsxs("div", { className: cn("group/status-row flex min-h-6 items-center gap-2 rounded-md px-1.5 py-1", onActivate && "cursor-pointer hover:bg-
|
|
7
|
+
return (_jsxs("div", { className: cn("group/status-row flex min-h-6 items-center gap-2 rounded-md px-1.5 py-1", onActivate && "cursor-pointer hover:bg-accent", className), "data-slot": "status-row", onClick: onActivate, onKeyDown: onActivate
|
|
8
8
|
? (event) => {
|
|
9
9
|
if (event.key === "Enter" || event.key === " ") {
|
|
10
10
|
event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/components/table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE1F,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,cAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG;IAAE,cAAc,CAAC,EAAE,kBAAkB,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/components/table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE1F,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,cAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG;IAAE,cAAc,CAAC,EAAE,kBAAkB,CAAA;CAAE,qBAiBzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAQ1E;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAQxE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAW/E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAW1E;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAWpE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAWrE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAQrE;AAED,iBAAS,cAAc,CAAC,EACtB,OAAO,EACP,KAAK,EACL,MAAmB,GACpB,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,KAAK,EAAE,SAAS;QACd,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,EAAE,CAAC;CACL,qBAiCA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,qBAQ7E;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,KAAK,kBAAkB,GACxB,CAAC"}
|
package/dist/components/table.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
import { tableCompactLayouts } from "./table-layouts.js";
|
|
5
5
|
function Table({ className, compactDetails, ...props }) {
|
|
6
|
-
return (_jsx("div", { "data-slot": "table-container", className: cn("relative w-full overflow-x-auto
|
|
6
|
+
return (_jsx("div", { "data-slot": "table-container", className: cn("relative w-full overflow-x-auto", compactDetails && "@container/table"), children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className, compactDetails && tableCompactLayouts[compactDetails].table), ...props }) }));
|
|
7
7
|
}
|
|
8
8
|
function TableHeader({ className, ...props }) {
|
|
9
9
|
return (_jsx("thead", { "data-slot": "table-header", className: cn("[&_tr]:h-9 [&_tr]:border-b", className), ...props }));
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
4
|
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props):
|
|
5
|
+
declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props): React.JSX.Element;
|
|
4
6
|
declare const tabsListVariants: (props?: ({
|
|
5
7
|
variant?: "line" | "default" | null | undefined;
|
|
6
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
declare function TabsList({ className, variant, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>):
|
|
8
|
-
declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props):
|
|
9
|
-
declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props):
|
|
10
|
-
|
|
9
|
+
declare function TabsList({ className, variant, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>): React.JSX.Element;
|
|
10
|
+
declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): React.JSX.Element;
|
|
11
|
+
declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props): React.JSX.Element;
|
|
12
|
+
declare function TabsNav({ className, children, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
13
|
+
declare function TabsLink({ current, className, render, ...props }: useRender.ComponentProps<"a"> & {
|
|
14
|
+
current?: boolean;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, TabsNav, TabsLink, tabsListVariants };
|
|
11
17
|
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,WAA0B,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,qBAU1F;AAED,QAAA,MAAM,gBAAgB;;8EAarB,CAAC;AAEF,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,qBASlE;AAKD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,qBAepE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,qBAQtE;AAED,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAsB9E;AAED,iBAAS,QAAQ,CAAC,EAChB,OAAe,EACf,SAAS,EACT,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,qBAkBvD;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC"}
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
2
4
|
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
5
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
7
|
import { cva } from "class-variance-authority";
|
|
4
8
|
import { cn } from "../lib/utils.js";
|
|
5
9
|
function Tabs({ className, orientation = "horizontal", ...props }) {
|
|
6
10
|
return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", "data-orientation": orientation, orientation: orientation, className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className), ...props }));
|
|
7
11
|
}
|
|
8
|
-
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center
|
|
12
|
+
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center gap-1 text-placeholder group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col", {
|
|
9
13
|
variants: {
|
|
10
14
|
variant: {
|
|
11
|
-
default: "
|
|
12
|
-
line: "
|
|
15
|
+
default: "",
|
|
16
|
+
line: "rounded-none bg-transparent",
|
|
13
17
|
},
|
|
14
18
|
},
|
|
15
19
|
defaultVariants: {
|
|
@@ -19,10 +23,38 @@ const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center jus
|
|
|
19
23
|
function TabsList({ className, variant = "default", ...props }) {
|
|
20
24
|
return (_jsx(TabsPrimitive.List, { "data-slot": "tabs-list", "data-variant": variant, className: cn(tabsListVariants({ variant }), className), ...props }));
|
|
21
25
|
}
|
|
26
|
+
const tabShape = "nc-transition-paint relative inline-flex h-control-height min-h-touch-target min-w-touch-target items-center justify-center gap-1.5 rounded-md px-3 text-sm font-medium whitespace-nowrap text-placeholder hover:text-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
22
27
|
function TabsTrigger({ className, ...props }) {
|
|
23
|
-
return (_jsx(TabsPrimitive.Tab, { "data-slot": "tabs-trigger", className: cn("
|
|
28
|
+
return (_jsx(TabsPrimitive.Tab, { "data-slot": "tabs-trigger", className: cn(tabShape, "group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start", "group-data-[variant=default]/tabs-list:data-active:bg-selection group-data-[variant=default]/tabs-list:data-active:text-selection-foreground", "group-data-[variant=line]/tabs-list:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity after:duration-[var(--nc-duration-confirm)] after:ease-[var(--nc-ease-out-strong)] group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:-bottom-1 group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className), ...props }));
|
|
24
29
|
}
|
|
25
30
|
function TabsContent({ className, ...props }) {
|
|
26
31
|
return (_jsx(TabsPrimitive.Panel, { "data-slot": "tabs-content", className: cn("flex-1 text-sm outline-none", className), ...props }));
|
|
27
32
|
}
|
|
28
|
-
|
|
33
|
+
function TabsNav({ className, children, ...props }) {
|
|
34
|
+
const navigation = React.useRef(null);
|
|
35
|
+
const current = React.useRef(null);
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
const element = navigation.current;
|
|
38
|
+
const link = element?.querySelector('[aria-current="page"]') ?? null;
|
|
39
|
+
if (!element || link === current.current)
|
|
40
|
+
return;
|
|
41
|
+
current.current = link;
|
|
42
|
+
if (link && element.scrollWidth > element.clientWidth) {
|
|
43
|
+
link.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return (_jsx("nav", { ref: navigation, "data-slot": "tabs-nav", className: cn("min-w-0 overflow-x-auto", className), ...props, children: _jsx("ul", { className: "flex w-max min-w-full items-center gap-1", children: children }) }));
|
|
47
|
+
}
|
|
48
|
+
function TabsLink({ current = false, className, render, ...props }) {
|
|
49
|
+
const link = useRender({
|
|
50
|
+
defaultTagName: "a",
|
|
51
|
+
render,
|
|
52
|
+
props: mergeProps({
|
|
53
|
+
"aria-current": current ? "page" : undefined,
|
|
54
|
+
className: cn(tabShape, "aria-[current=page]:bg-selection aria-[current=page]:text-selection-foreground", className),
|
|
55
|
+
}, props),
|
|
56
|
+
state: { slot: "tabs-link", current },
|
|
57
|
+
});
|
|
58
|
+
return _jsx("li", { className: "flex", children: link });
|
|
59
|
+
}
|
|
60
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, TabsNav, TabsLink, tabsListVariants };
|
|
@@ -12,6 +12,6 @@ function TooltipTrigger({ ...props }) {
|
|
|
12
12
|
return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
13
13
|
}
|
|
14
14
|
function TooltipContent({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }) {
|
|
15
|
-
return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsxs(TooltipPrimitive.Popup, { "data-slot": "tooltip-content", className: cn("z-50 inline-flex w-fit max-w-xs items-center gap-1.5 rounded-md border-0 bg-popover px-nadicode-sm py-
|
|
15
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsxs(TooltipPrimitive.Popup, { "data-slot": "tooltip-content", className: cn("z-50 inline-flex w-fit max-w-xs items-center gap-1.5 rounded-md border-0 bg-popover px-nadicode-sm py-1.5 text-xs text-popover-foreground nc-elevation-floating has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md", anchoredOverlayMotion, className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-var(--nc-rounded-xs))] rotate-45 rounded-xs border border-border bg-popover fill-popover data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })] }) }) }));
|
|
16
16
|
}
|
|
17
17
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trend-badge.d.ts","sourceRoot":"","sources":["../../src/components/trend-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"trend-badge.d.ts","sourceRoot":"","sources":["../../src/components/trend-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC;;;;;GAKG;AAEH,KAAK,cAAc,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAC7C,KAAK,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAqBrD,8FAA8F;AAC9F,iBAAS,SAAS,CAAC,SAAS,EAAE,cAAc,EAAE,QAAQ,UAAO,EAAE,OAAO,UAAQ,GAAG,SAAS,CAGzF;AAED,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,SAAS,EACT,IAAI,EACJ,cAAc,GACf,EAAE;IACD,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,cAAc,CAAC;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,uFAAuF;IACvF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,qBAeA;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AACjC,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { MinusIcon, TrendingDownIcon, TrendingUpIcon } from "lucide-react";
|
|
3
|
-
import { cn } from "../lib/utils.js";
|
|
4
3
|
import { Badge } from "./badge.js";
|
|
5
4
|
const TREND_ICONS = {
|
|
6
5
|
up: TrendingUpIcon,
|
|
@@ -26,6 +25,6 @@ function trendTone(direction, upIsGood = true, neutral = false) {
|
|
|
26
25
|
}
|
|
27
26
|
function TrendBadge({ value, direction, tone, directionLabel, }) {
|
|
28
27
|
const Icon = TREND_ICONS[direction];
|
|
29
|
-
return (_jsxs(Badge, { "data-slot": "trend-badge", "data-direction": direction, "data-tone": tone, variant: "outline", className:
|
|
28
|
+
return (_jsxs(Badge, { "data-slot": "trend-badge", "data-direction": direction, "data-tone": tone, variant: "outline", className: "tabular-nums", children: [_jsx(Icon, { "aria-hidden": "true", className: TREND_TONE_CLASS[tone] }), _jsx("span", { className: "sr-only", children: directionLabel ?? TREND_DIRECTION_TEXT[direction] }), value] }));
|
|
30
29
|
}
|
|
31
30
|
export { TrendBadge, trendTone };
|
package/dist/eslint/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { noMonoTitleRegister } from "./rules/no-mono-title-register.js";
|
|
|
17
17
|
import { noPackageComponentRedefinition } from "./rules/no-package-component-redefinition.js";
|
|
18
18
|
import { noPairedSizeUtility } from "./rules/no-paired-size-utility.js";
|
|
19
19
|
import { noRestingSettingsControl } from "./rules/no-resting-settings-control.js";
|
|
20
|
+
import { oneControlHeight } from "./rules/one-control-height.js";
|
|
20
21
|
import { noShadcnAppearanceOverride } from "./rules/no-shadcn-appearance-override.js";
|
|
21
22
|
import { noSubjectDerivedExpectation } from "./rules/no-subject-derived-expectation.js";
|
|
22
23
|
import { noUnpinnedVercelFunctionsImport } from "./rules/no-unpinned-vercel-functions-import.js";
|
|
@@ -25,6 +26,7 @@ import { noRepaintedFocus } from "./rules/no-repainted-focus.js";
|
|
|
25
26
|
import { noInvalidTokenUtility } from "./rules/no-invalid-token-utility.js";
|
|
26
27
|
import { noTokenCategoryBypass } from "./rules/no-token-category-bypass.js";
|
|
27
28
|
import { serverActionDiscipline } from "./rules/server-action-discipline.js";
|
|
29
|
+
import { settingsSectionDescription } from "./rules/settings-section-description.js";
|
|
28
30
|
import { shadcnComposition } from "./rules/shadcn-composition.js";
|
|
29
31
|
|
|
30
32
|
/**
|
|
@@ -104,7 +106,9 @@ const plugin = {
|
|
|
104
106
|
"no-unpinned-vercel-functions-import": noUnpinnedVercelFunctionsImport,
|
|
105
107
|
"no-invalid-token-utility": noInvalidTokenUtility,
|
|
106
108
|
"no-token-category-bypass": noTokenCategoryBypass,
|
|
109
|
+
"one-control-height": oneControlHeight,
|
|
107
110
|
"server-action-discipline": serverActionDiscipline,
|
|
111
|
+
"settings-section-description": settingsSectionDescription,
|
|
108
112
|
"shadcn-composition": shadcnComposition,
|
|
109
113
|
},
|
|
110
114
|
};
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* One hop, and no further: nothing chains through a second binding, nothing
|
|
13
13
|
* crosses a file, nothing evaluates a condition or a template, and no value the
|
|
14
14
|
* hop cannot see is guessed at. That is the minimum that holds the package
|
|
15
|
-
*
|
|
15
|
+
* repaint ban (`packages/design-system/DESIGN.md`, "Components") against the way
|
|
16
16
|
* this repository actually authors classes — a tone table beside its component
|
|
17
17
|
* and a lookup at the call site, as in
|
|
18
18
|
* `apps/portal/src/components/portal-overview/overview-usage-tone.ts`. Without the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The design system (`packages/design-system/DESIGN.md`, "Components"): "A page
|
|
3
|
+
* arranges and sizes a component and never restyles it: a new appearance is a
|
|
4
|
+
* typed variant or slot added to the component." A caller that
|
|
5
5
|
* repaints an imported primitive forks its appearance into the call site, where
|
|
6
6
|
* the next token change does not reach it.
|
|
7
7
|
*
|