@nadicodeai/ui 12.1.28 → 12.1.30

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.
@@ -20,7 +20,7 @@ function CardHeader({ className, ...props }) {
20
20
  // `minmax(0,1fr)`, not `1fr`, because a `1fr` track never shrinks below
21
21
  // its content and a long title or an unbreakable figure would push the
22
22
  // action past the card's edge, where the card's clipping cuts it.
23
- "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-md px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className), ...props }));
23
+ "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-md px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] *:data-[slot=card-description]:col-start-1 *:data-[slot=card-title]:col-start-1 [.border-b]:pb-(--card-spacing)", className), ...props }));
24
24
  }
25
25
  function CardTitle({ className, focusTarget = false, ...props }) {
26
26
  return (_jsx("div", { "data-slot": "card-title", "data-focus-target": focusTarget || undefined, className: cn("text-base font-medium group-data-[size=sm]/card:text-sm", focusTarget && "rounded-sm", className), ...props }));
@@ -5,6 +5,7 @@ interface ConfirmDialogProps {
5
5
  onCancel: () => void;
6
6
  title: React.ReactNode;
7
7
  description?: React.ReactNode;
8
+ error?: React.ReactNode;
8
9
  confirmLabel?: React.ReactNode;
9
10
  /** The confirm button's own word while the action runs. */
10
11
  confirmPendingLabel?: React.ReactNode;
@@ -12,7 +13,7 @@ interface ConfirmDialogProps {
12
13
  destructive?: boolean;
13
14
  loading?: boolean;
14
15
  }
15
- declare function ConfirmDialog({ open, onConfirm, onCancel, title, description, confirmLabel, confirmPendingLabel, cancelLabel, destructive, loading, }: ConfirmDialogProps): React.JSX.Element;
16
+ declare function ConfirmDialog({ open, onConfirm, onCancel, title, description, error, confirmLabel, confirmPendingLabel, cancelLabel, destructive, loading, }: ConfirmDialogProps): React.JSX.Element;
16
17
  export { ConfirmDialog };
17
18
  export type { ConfirmDialogProps };
18
19
  //# sourceMappingURL=confirm-dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAapC,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAOD,iBAAS,aAAa,CAAC,EACrB,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,WAAW,EACX,YAAwB,EACxB,mBAAmB,EACnB,WAAsB,EACtB,WAAmB,EACnB,OAAe,GAChB,EAAE,kBAAkB,qBAiCpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAcpC,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAOD,iBAAS,aAAa,CAAC,EACrB,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,KAAK,EACL,WAAW,EACX,KAAK,EACL,YAAwB,EACxB,mBAAmB,EACnB,WAAsB,EACtB,WAAmB,EACnB,OAAe,GAChB,EAAE,kBAAkB,qBAkCpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
@@ -2,17 +2,18 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { AlertDialog, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "./alert-dialog.js";
4
4
  import { Button } from "./button.js";
5
+ import { FieldError } from "./field.js";
5
6
  import { PendingLabel } from "./pending-label.js";
6
7
  // Fully controlled confirm dialog over the registry AlertDialog parts. The
7
8
  // confirm action is a plain Button (not AlertDialogAction) so a failed confirm
8
9
  // can keep the dialog open; the only closing gesture is Escape (alert dialogs
9
10
  // take no backdrop dismissal), which routes through onCancel, and loading
10
11
  // disables both buttons while the action runs.
11
- function ConfirmDialog({ open, onConfirm, onCancel, title, description, confirmLabel = "Confirm", confirmPendingLabel, cancelLabel = "Cancel", destructive = false, loading = false, }) {
12
+ function ConfirmDialog({ open, onConfirm, onCancel, title, description, error, confirmLabel = "Confirm", confirmPendingLabel, cancelLabel = "Cancel", destructive = false, loading = false, }) {
12
13
  return (_jsx(AlertDialog, { open: open, onOpenChange: (nextOpen) => {
13
14
  if (!nextOpen) {
14
15
  onCancel();
15
16
  }
16
- }, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), description ? _jsx(AlertDialogDescription, { children: description }) : null] }), _jsxs(AlertDialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: onCancel, disabled: loading, children: cancelLabel }), _jsx(Button, { "aria-busy": loading || undefined, variant: destructive ? "destructive" : "default", onClick: onConfirm, disabled: loading, children: _jsx(PendingLabel, { pending: loading, pendingLabel: confirmPendingLabel ?? confirmLabel, children: confirmLabel }) })] })] }) }));
17
+ }, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), description ? _jsx(AlertDialogDescription, { children: description }) : null, error ? _jsx(FieldError, { children: error }) : null] }), _jsxs(AlertDialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: onCancel, disabled: loading, children: cancelLabel }), _jsx(Button, { "aria-busy": loading || undefined, variant: destructive ? "destructive" : "default", onClick: onConfirm, disabled: loading, children: _jsx(PendingLabel, { pending: loading, pendingLabel: confirmPendingLabel ?? confirmLabel, children: confirmLabel }) })] })] }) }));
17
18
  }
18
19
  export { ConfirmDialog };
@@ -9,6 +9,11 @@ declare function DrawerClose({ ...props }: DrawerPrimitive.Close.Props): React.J
9
9
  declare function DrawerOverlay({ className, ...props }: DrawerPrimitive.Backdrop.Props): React.JSX.Element;
10
10
  declare function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
11
  declare function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.Props): React.JSX.Element;
12
+ /**
13
+ * The header and the footer stay in place while the body scrolls between them,
14
+ * so each draws the one hairline that separates it from the body; a caller
15
+ * adds no edge of its own.
16
+ */
12
17
  declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
18
  /**
14
19
  * The part of a drawer that scrolls, between its header and footer, which stay
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAuBlE,iBAAS,MAAM,CAAC,EACd,KAAY,EACZ,eAAuB,EACvB,UAAU,EACV,cAAuB,EACvB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,GAAG;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,qBAkBA;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,qBAEjE;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,qBAE/D;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAE7D;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,qBAW7E;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAY9E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBA0DpF;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWzE;AAED;;;GAGG;AACH,iBAA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qBAE7D;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,qBAW7E;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAY9E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBA0DpF;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWzE;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWzE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAQxE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,qBAQpF;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
@@ -60,8 +60,13 @@ function DrawerContent({ className, children, ...props }) {
60
60
  // Direction: right.
61
61
  "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", className), ...props, children: [showSwipeHandle && _jsx(DrawerSwipeHandle, {}), _jsx(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-[var(--nc-duration-open)] ease-[var(--nc-ease-out-strong)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"), children: children })] }) })] }));
62
62
  }
63
+ /**
64
+ * The header and the footer stay in place while the body scrolls between them,
65
+ * so each draws the one hairline that separates it from the body; a caller
66
+ * adds no edge of its own.
67
+ */
63
68
  function DrawerHeader({ className, ...props }) {
64
- return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex shrink-0 flex-col gap-0.5 p-nadicode-lg pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left", className), ...props }));
69
+ return (_jsx("div", { "data-slot": "drawer-header", className: cn("flex shrink-0 flex-col gap-0.5 border-b border-border p-nadicode-lg pb-nadicode-md group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left", className), ...props }));
65
70
  }
66
71
  /**
67
72
  * The part of a drawer that scrolls, between its header and footer, which stay
@@ -71,7 +76,7 @@ function DrawerBody({ className, ...props }) {
71
76
  return (_jsx("div", { "data-slot": "drawer-body", className: cn("flex min-h-0 flex-1 flex-col gap-nadicode-md overflow-y-auto p-nadicode-lg", className), ...props }));
72
77
  }
73
78
  function DrawerFooter({ className, ...props }) {
74
- return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex shrink-0 flex-col gap-2 p-nadicode-lg pt-0", className), ...props }));
79
+ return (_jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex shrink-0 flex-col gap-2 border-t border-border p-nadicode-md", className), ...props }));
75
80
  }
76
81
  function DrawerTitle({ className, ...props }) {
77
82
  return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn("text-base font-medium text-foreground", className), ...props }));
@@ -11,7 +11,7 @@ const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [
11
11
  variants: {
12
12
  variant: {
13
13
  default: "bg-transparent",
14
- icon: "flex size-control-height shrink-0 items-center justify-center rounded-md bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
14
+ icon: "flex size-control-height shrink-0 items-center justify-center rounded-md border border-border bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
15
15
  },
16
16
  },
17
17
  defaultVariants: {
@@ -1,5 +1,5 @@
1
1
  import type { ComponentProps, ReactElement, ReactNode } from "react";
2
- export type NoticeBannerTone = "neutral" | "info" | "warning";
2
+ export type NoticeBannerTone = "neutral" | "info" | "warning" | "destructive";
3
3
  export type NoticeBannerLiveRegion = "off" | "polite";
4
4
  export type NoticeBannerProps = {
5
5
  action?: ReactElement;
@@ -10,6 +10,9 @@ export type NoticeBannerProps = {
10
10
  title: ReactNode;
11
11
  tone: NoticeBannerTone;
12
12
  } & Omit<ComponentProps<"div">, "children" | "title">;
13
- /** Non-blocking operational, stale-data, replacement, and read-only guidance. */
13
+ /**
14
+ * Non-blocking operational, stale-data, replacement, and read-only guidance, and
15
+ * a section that cannot be shown.
16
+ */
14
17
  export declare function NoticeBanner({ action, className, description, detail, liveRegion, title, tone, ...props }: NoticeBannerProps): import("react").JSX.Element;
15
18
  //# sourceMappingURL=notice-banner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice-banner.d.ts","sourceRoot":"","sources":["../../src/components/notice-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKrE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,M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EtD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,UAAU,EACV,KAAK,EACL,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAyBnB"}
@@ -1,9 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Info, TriangleAlert } from "lucide-react";
3
3
  import { Alert, AlertAction, AlertDescription, AlertTitle } from "./alert.js";
4
- /** Non-blocking operational, stale-data, replacement, and read-only guidance. */
4
+ /**
5
+ * Non-blocking operational, stale-data, replacement, and read-only guidance, and
6
+ * a section that cannot be shown.
7
+ */
5
8
  export function NoticeBanner({ action, className, description, detail, liveRegion, title, tone, ...props }) {
6
- const Icon = tone === "warning" ? TriangleAlert : Info;
9
+ const Icon = tone === "warning" || tone === "destructive" ? TriangleAlert : Info;
7
10
  const isLive = liveRegion === "polite";
8
11
  return (_jsxs(Alert, { "aria-atomic": isLive ? "true" : undefined, "aria-live": isLive ? "polite" : undefined, className: className, "data-live-region": liveRegion, "data-notice-banner": true, "data-tone": tone, role: isLive ? "status" : "note", variant: tone === "neutral" ? "default" : tone, ...props, children: [_jsx(Icon, { "aria-hidden": "true" }), _jsx(AlertTitle, { children: title }), _jsxs(AlertDescription, { className: "min-w-0 flex flex-col gap-2", children: [description ? _jsx("div", { "data-notice-description": true, children: description }) : null, detail ? _jsx("div", { "data-notice-detail": true, children: detail }) : null] }), action ? _jsx(AlertAction, { "data-notice-action": true, children: action }) : null] }));
9
12
  }
@@ -4,6 +4,7 @@ import { readdirSync, readFileSync } from "node:fs";
4
4
  import { menuCommandOwner } from "./rules/menu-command-owner.js";
5
5
  import { cardRowOwner } from "./rules/card-row-owner.js";
6
6
  import { confirmDestructiveAction } from "./rules/confirm-destructive-action.js";
7
+ import { drawerOwnsItsEdges } from "./rules/drawer-owns-its-edges.js";
7
8
  import { iconControlAccessibleName } from "./rules/icon-control-accessible-name.js";
8
9
  import { noAppFeatureComponent } from "./rules/no-app-feature-component.js";
9
10
  import { noElevatedEdge } from "./rules/no-elevated-edge.js";
@@ -89,6 +90,7 @@ function digestOf(paths) {
89
90
 
90
91
  export const strictDesignSystemRules = {
91
92
  "nadicodeai/card-row-owner": "error",
93
+ "nadicodeai/drawer-owns-its-edges": "error",
92
94
  "nadicodeai/icon-control-accessible-name": "error",
93
95
  "nadicodeai/no-invalid-token-utility": "error",
94
96
  "nadicodeai/no-native-visible-control": "error",
@@ -114,6 +116,7 @@ const plugin = {
114
116
  "card-row-owner": cardRowOwner,
115
117
  "menu-command-owner": menuCommandOwner,
116
118
  "confirm-destructive-action": confirmDestructiveAction,
119
+ "drawer-owns-its-edges": drawerOwnsItsEdges,
117
120
  "icon-control-accessible-name": iconControlAccessibleName,
118
121
  "no-app-feature-component": noAppFeatureComponent,
119
122
  "no-elevated-edge": noElevatedEdge,
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Standard tool checked first: `better-tailwindcss/no-restricted-classes` bans a
3
+ * class everywhere and cannot ask which element it sits on or what that element
4
+ * wraps, so the relationship is read here on the shared readers.
5
+ */
6
+ import { jsxComponentName, openingElementClassUtilities } from "./jsx-class-utility.js";
7
+
8
+ const SLOTS = new Set(["DrawerHeader", "DrawerBody", "DrawerFooter"]);
9
+
10
+ const EDGE = /^border(?:-[tby])?(?:-\d+)?$/;
11
+
12
+ function edgeUtility(node, context) {
13
+ return openingElementClassUtilities(node, context).find((utility) =>
14
+ EDGE.test(utility.split(":").at(-1).replace(/^!/, "")),
15
+ );
16
+ }
17
+
18
+ function wrappedSlot(element, context) {
19
+ for (const child of element.children) {
20
+ if (child.type !== "JSXElement") continue;
21
+ const name = jsxComponentName(child.openingElement, context);
22
+ if (name && SLOTS.has(name)) return name;
23
+ }
24
+ return undefined;
25
+ }
26
+
27
+ export const drawerOwnsItsEdges = {
28
+ meta: {
29
+ type: "problem",
30
+ docs: {
31
+ description: "Keep the edges between a drawer's header, body and footer with the drawer",
32
+ },
33
+ schema: [],
34
+ messages: {
35
+ slotEdge:
36
+ '"{{utility}}" gives <{{slot}}> a second edge. The drawer draws the hairline between its header, its body and its footer; drop the border class (rule/drawer-owns-its-edges).',
37
+ wrapperEdge:
38
+ '"{{utility}}" draws an edge around <{{slot}}>. The drawer draws the hairline between its header, its body and its footer; render the slot without this wrapper (rule/drawer-owns-its-edges).',
39
+ },
40
+ },
41
+ create(context) {
42
+ return {
43
+ JSXElement(element) {
44
+ const utility = edgeUtility(element.openingElement, context);
45
+ if (!utility) return;
46
+ const own = jsxComponentName(element.openingElement, context);
47
+ if (own && SLOTS.has(own)) {
48
+ context.report({
49
+ node: element.openingElement,
50
+ messageId: "slotEdge",
51
+ data: { utility, slot: own },
52
+ });
53
+ return;
54
+ }
55
+ const slot = wrappedSlot(element, context);
56
+ if (slot) {
57
+ context.report({
58
+ node: element.openingElement,
59
+ messageId: "wrapperEdge",
60
+ data: { utility, slot },
61
+ });
62
+ }
63
+ },
64
+ };
65
+ },
66
+ };
package/dist/index.d.ts CHANGED
@@ -52,7 +52,6 @@ export * from "./components/drawer.js";
52
52
  export * from "./components/dropdown-menu.js";
53
53
  export * from "./components/empty.js";
54
54
  export * from "./components/expandable-block.js";
55
- export * from "./components/fact-cell.js";
56
55
  export * from "./components/feedback-state.js";
57
56
  export * from "./components/field.js";
58
57
  export * from "./components/file-diff.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AAC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Ac,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -52,7 +52,6 @@ export * from "./components/drawer.js";
52
52
  export * from "./components/dropdown-menu.js";
53
53
  export * from "./components/empty.js";
54
54
  export * from "./components/expandable-block.js";
55
- export * from "./components/fact-cell.js";
56
55
  export * from "./components/feedback-state.js";
57
56
  export * from "./components/field.js";
58
57
  export * from "./components/file-diff.js";
@@ -128,3 +128,26 @@
128
128
  @source "../components";
129
129
  @source "../internal";
130
130
  @source "../lib";
131
+
132
+ @container card-header (width < 28rem) {
133
+ [data-slot="card-action"]:not(:empty):not(
134
+ :has(
135
+ > :only-child:is(
136
+ [data-slot="badge"],
137
+ [data-slot="trend-badge"],
138
+ [data-slot="button"][aria-label],
139
+ [data-slot="dropdown-menu-trigger"][aria-label]
140
+ )
141
+ )
142
+ ) {
143
+ grid-column: 1;
144
+ grid-row: auto;
145
+ justify-self: start;
146
+ justify-content: flex-start;
147
+ margin-top: var(--spacing-nadicode-xs);
148
+
149
+ & > div {
150
+ justify-content: flex-start;
151
+ }
152
+ }
153
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "12.1.28",
3
+ "version": "12.1.30",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -76,7 +76,7 @@
76
76
  "@assistant-ui/react": "0.15.21",
77
77
  "@assistant-ui/react-markdown": "0.14.16",
78
78
  "@base-ui/react": "^1.8.0",
79
- "@nadicodeai/design-system": "12.1.28",
79
+ "@nadicodeai/design-system": "12.1.30",
80
80
  "class-variance-authority": "^0.7.1",
81
81
  "clsx": "^2.1.1",
82
82
  "cmdk": "^1.1.1",
@@ -1,21 +0,0 @@
1
- import * as React from "react";
2
- /**
3
- * fact-cell — mono-kicker + claim content fill (replaces the retired `.nc-fact-cell`).
4
- *
5
- * A seam-free fill: it drops into a seam-owning grid (which paints the hairline gaps
6
- * between cells), so it draws NO border and is square-cornered. It carries the canvas
7
- * surface, a mono label, and a claim. `surface="ink"` inverts onto the ink role;
8
- * `size="sm"` is the compact 86px action-card rhythm.
9
- *
10
- * Server-renderable: the ink inversion + sm claim sizing are applied by the parent
11
- * to its descendants via `data-slot` descendant selectors (the retired CSS-cascade
12
- * model), so sub-components stay style-light. Token-only; no `dark:` styling.
13
- */
14
- declare function FactCell({ className, surface, size, ...props }: React.ComponentProps<"div"> & {
15
- surface?: "canvas" | "ink";
16
- size?: "default" | "sm";
17
- }): React.JSX.Element;
18
- declare function FactCellLabel({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
19
- declare function FactCellClaim({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
20
- export { FactCell, FactCellLabel, FactCellClaim };
21
- //# sourceMappingURL=fact-cell.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fact-cell.d.ts","sourceRoot":"","sources":["../../src/components/fact-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;GAWG;AAEH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,OAAkB,EAClB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,qBAsBA;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ1E;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ1E;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "../lib/utils.js";
3
- /**
4
- * fact-cell — mono-kicker + claim content fill (replaces the retired `.nc-fact-cell`).
5
- *
6
- * A seam-free fill: it drops into a seam-owning grid (which paints the hairline gaps
7
- * between cells), so it draws NO border and is square-cornered. It carries the canvas
8
- * surface, a mono label, and a claim. `surface="ink"` inverts onto the ink role;
9
- * `size="sm"` is the compact 86px action-card rhythm.
10
- *
11
- * Server-renderable: the ink inversion + sm claim sizing are applied by the parent
12
- * to its descendants via `data-slot` descendant selectors (the retired CSS-cascade
13
- * model), so sub-components stay style-light. Token-only; no `dark:` styling.
14
- */
15
- function FactCell({ className, surface = "canvas", size = "default", ...props }) {
16
- return (_jsx("div", { "data-slot": "fact-cell", "data-surface": surface, "data-size": size, className: cn("grid content-center gap-1.5", size === "default" ? "min-h-24 p-6" : "min-h-[86px] p-4", surface === "canvas" && "bg-card", surface === "ink" && [
17
- "bg-primary",
18
- "[&_[data-slot=fact-cell-label]]:text-primary-foreground",
19
- "[&_[data-slot=fact-cell-claim]]:text-primary-foreground",
20
- ], size === "sm" &&
21
- "[&_[data-slot=fact-cell-claim]]:text-[15px] [&_[data-slot=fact-cell-claim]]:leading-5", className), ...props }));
22
- }
23
- function FactCellLabel({ className, ...props }) {
24
- return (_jsx("div", { "data-slot": "fact-cell-label", className: cn("font-mono text-xs uppercase text-muted-foreground", className), ...props }));
25
- }
26
- function FactCellClaim({ className, ...props }) {
27
- return (_jsx("div", { "data-slot": "fact-cell-claim", className: cn("text-lg leading-[1.2] text-foreground", className), ...props }));
28
- }
29
- export { FactCell, FactCellLabel, FactCellClaim };