@stackframe/dashboard-ui-components 2.8.91 → 2.8.92
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/dist/components/button.d.ts +4 -4
- package/dist/components/chart-legend.d.ts +1 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +7 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/dashboard-ui-components.global.js +11 -2
- package/dist/dashboard-ui-components.global.js.map +3 -3
- package/dist/esm/components/button.d.ts +4 -4
- package/dist/esm/components/chart-legend.d.ts +1 -1
- package/dist/esm/components/dialog.d.ts.map +1 -1
- package/dist/esm/components/dialog.js +7 -1
- package/dist/esm/components/dialog.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,8 +4,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/button.d.ts
|
|
6
6
|
declare const designButtonVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
size?: "
|
|
7
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "plain" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
type DesignOriginalButtonProps = {
|
|
11
11
|
asChild?: boolean;
|
|
@@ -36,8 +36,8 @@ declare const DesignButton: React.FC<{
|
|
|
36
36
|
} & {
|
|
37
37
|
asChild?: boolean;
|
|
38
38
|
} & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
|
|
39
|
-
variant?: "
|
|
40
|
-
size?: "
|
|
39
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "plain" | null | undefined;
|
|
40
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
41
41
|
} & class_variance_authority_types0.ClassProp) | undefined) => string> & {
|
|
42
42
|
ref?: React.Ref<HTMLButtonElement> | undefined;
|
|
43
43
|
}>;
|
|
@@ -2,7 +2,7 @@ import * as React$1 from "react";
|
|
|
2
2
|
import * as RechartsPrimitive from "recharts";
|
|
3
3
|
|
|
4
4
|
//#region src/components/chart-legend.d.ts
|
|
5
|
-
declare const DesignChartLegendContent: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "
|
|
5
|
+
declare const DesignChartLegendContent: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
|
|
6
6
|
hideIcon?: boolean;
|
|
7
7
|
nameKey?: string;
|
|
8
8
|
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","names":[],"sources":["../../src/components/dialog.tsx"],"mappings":";;;;;;KAgBY,gBAAA;AAAA,KAaA,mBAAA;AAAA,KA0BP,gBAAA,GAAmB,KAAA,CAAM,WAAA;EAAc,SAAA;AAAA;AAAA,KAEvC,qBAAA,GAAwB,IAAA,CAAK,KAAA,CAAM,cAAA,QAAsB,MAAA;AAAA,KAElD,iBAAA;EACV,OAAA,GAAU,KAAA,CAAM,YAAA;EAChB,IAAA,GAAO,gBAAA;EACP,OAAA,GAAU,mBAAA;EACV,IAAA,GAAO,gBAAA;EACP,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,WAAA,GAAc,KAAA,CAAM,SAAA;EACpB,aAAA,GAAgB,KAAA,CAAM,SAAA;EACtB,YAAA,GAAe,KAAA,CAAM,SAAA;EACrB,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,aAAA;EACA,kBAAA;EACA,SAAA;EACA,gBAAA;EACA,eAAA;EACA,aAAA;EACA,eAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;AAAA,IACf,qBAAA;;;;;iBAMY,YAAA,CAAA;EACd,OAAA;EACA,IAAA;EACA,OAAA;EACA,IAAA,EAAM,IAAA;EACN,KAAA;EACA,WAAA;EACA,aAAA;EACA,YAAA;EACA,MAAA;EACA,aAAA;EACA,kBAAA;EACA,SAAA;EACA,gBAAA;EACA,eAAA;EACA,aAAA;EACA,eAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,iBAAA,GAAiB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","names":[],"sources":["../../src/components/dialog.tsx"],"mappings":";;;;;;KAgBY,gBAAA;AAAA,KAaA,mBAAA;AAAA,KA0BP,gBAAA,GAAmB,KAAA,CAAM,WAAA;EAAc,SAAA;AAAA;AAAA,KAEvC,qBAAA,GAAwB,IAAA,CAAK,KAAA,CAAM,cAAA,QAAsB,MAAA;AAAA,KAElD,iBAAA;EACV,OAAA,GAAU,KAAA,CAAM,YAAA;EAChB,IAAA,GAAO,gBAAA;EACP,OAAA,GAAU,mBAAA;EACV,IAAA,GAAO,gBAAA;EACP,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,WAAA,GAAc,KAAA,CAAM,SAAA;EACpB,aAAA,GAAgB,KAAA,CAAM,SAAA;EACtB,YAAA,GAAe,KAAA,CAAM,SAAA;EACrB,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,aAAA;EACA,kBAAA;EACA,SAAA;EACA,gBAAA;EACA,eAAA;EACA,aAAA;EACA,eAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;AAAA,IACf,qBAAA;;;;;iBAMY,YAAA,CAAA;EACd,OAAA;EACA,IAAA;EACA,OAAA;EACA,IAAA,EAAM,IAAA;EACN,KAAA;EACA,WAAA;EACA,aAAA;EACA,YAAA;EACA,MAAA;EACA,aAAA;EACA,kBAAA;EACA,SAAA;EACA,gBAAA;EACA,eAAA;EACA,aAAA;EACA,eAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,iBAAA,GAAiB,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,cAoGP,gBAAA,EAAgB,KAAA,CAAA,EAAA,CAAS,uBAAA,CAAT,WAAA;AAAA,cAChB,mBAAA,EAAmB,KAAA,CAAA,yBAAA,CAAgB,uBAAA,CAAhB,kBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA;AAAA,cACnB,iBAAA,EAAiB,KAAA,CAAA,yBAAA,CAAc,uBAAA,CAAd,gBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,iBAAA;AAAA,cACjB,iBAAA,EAAiB,KAAA,CAAA,EAAA,CAAA,IAAA,CAAc,uBAAA,CAAd,gBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,kBAAA;;;cACjB,uBAAA,EAAuB,KAAA,CAAA,EAAA,CAAA,IAAA,CAAoB,uBAAA,CAApB,sBAAA,GAAA,KAAA,CAAA,aAAA,CAAA,oBAAA"}
|
|
@@ -33,7 +33,9 @@ function DesignDialog({ trigger, size = "lg", variant = "glassmorphic", icon: Ic
|
|
|
33
33
|
const resolvedOverlayClass = (0, _stackframe_stack_ui.cn)(dialogOverlayClasses.get(variant), overlayClassName);
|
|
34
34
|
const shouldRenderTopHeaderRow = Icon != null || title != null || description != null;
|
|
35
35
|
const shouldRenderHeader = customHeader != null || shouldRenderTopHeaderRow || headerContent != null;
|
|
36
|
-
const shouldRenderBody = react.default.Children.
|
|
36
|
+
const shouldRenderBody = react.default.Children.toArray(children).filter(Boolean).length > 0;
|
|
37
|
+
const needsAccessibleTitleFallback = !(title != null) && customHeader == null;
|
|
38
|
+
if (process.env.NODE_ENV !== "production" && needsAccessibleTitleFallback) console.warn("[DesignDialog] Rendered without a `title` or `customHeader`. Every dialog needs an accessible name — pass `title`, or render a `DialogTitle` inside `customHeader`.");
|
|
37
39
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_stackframe_stack_ui.Dialog, {
|
|
38
40
|
...dialogRootProps,
|
|
39
41
|
children: [trigger != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_stackframe_stack_ui.DialogTrigger, {
|
|
@@ -44,6 +46,10 @@ function DesignDialog({ trigger, size = "lg", variant = "glassmorphic", icon: Ic
|
|
|
44
46
|
overlayProps: resolvedOverlayClass ? { className: resolvedOverlayClass } : void 0,
|
|
45
47
|
noCloseButton: hideTopCloseButton,
|
|
46
48
|
children: [
|
|
49
|
+
needsAccessibleTitleFallback && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_stackframe_stack_ui.DialogTitle, {
|
|
50
|
+
className: "sr-only",
|
|
51
|
+
children: "Dialog"
|
|
52
|
+
}),
|
|
47
53
|
shouldRenderHeader && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_stackframe_stack_ui.DialogHeader, {
|
|
48
54
|
className: (0, _stackframe_stack_ui.cn)("px-6 pt-6 pb-4 border-b border-foreground/[0.06]", headerClassName),
|
|
49
55
|
children: customHeader ?? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [shouldRenderTopHeaderRow && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","names":["React","Dialog","DialogTrigger","DialogContent","
|
|
1
|
+
{"version":3,"file":"dialog.js","names":["React","Dialog","DialogTrigger","DialogContent","DialogTitle","DialogHeader","DialogDescription","DialogBody","DialogFooter","DialogClose"],"sources":["../../src/components/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n cn,\n} from \"@stackframe/stack-ui\";\nimport React from \"react\";\n\nexport type DesignDialogSize =\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"4xl\"\n | \"5xl\"\n | \"6xl\"\n | \"7xl\"\n | \"full\";\n\nexport type DesignDialogVariant = \"glassmorphic\" | \"plain\";\n\nconst dialogSizeClasses = new Map<DesignDialogSize, string>([\n [\"sm\", \"max-w-sm\"],\n [\"md\", \"max-w-md\"],\n [\"lg\", \"max-w-lg\"],\n [\"xl\", \"max-w-xl\"],\n [\"2xl\", \"max-w-2xl\"],\n [\"3xl\", \"max-w-3xl\"],\n [\"4xl\", \"max-w-4xl\"],\n [\"5xl\", \"max-w-5xl\"],\n [\"6xl\", \"max-w-6xl\"],\n [\"7xl\", \"max-w-7xl\"],\n [\"full\", \"max-w-[calc(100vw-2rem)]\"],\n]);\n\nconst dialogSurfaceClasses = new Map<DesignDialogVariant, string>([\n [\"glassmorphic\", \"border-0 sm:rounded-2xl bg-background/85 backdrop-blur-2xl ring-1 ring-foreground/[0.06] shadow-[0_24px_48px_-12px_rgba(0,0,0,0.25),0_4px_24px_-8px_rgba(0,0,0,0.12)] dark:bg-background/80 dark:ring-white/[0.06]\"],\n [\"plain\", \"border bg-background shadow-lg sm:rounded-lg\"],\n]);\n\nconst dialogOverlayClasses = new Map<DesignDialogVariant, string | undefined>([\n [\"glassmorphic\", \"bg-black/50 backdrop-blur-sm\"],\n [\"plain\", undefined],\n]);\n\ntype DesignDialogIcon = React.ElementType<{ className?: string }>;\n\ntype DesignDialogRootProps = Omit<React.ComponentProps<typeof Dialog>, \"children\">;\n\nexport type DesignDialogProps = {\n trigger?: React.ReactElement,\n size?: DesignDialogSize,\n variant?: DesignDialogVariant,\n icon?: DesignDialogIcon | null,\n title?: React.ReactNode,\n description?: React.ReactNode,\n headerContent?: React.ReactNode,\n customHeader?: React.ReactNode,\n footer?: React.ReactNode,\n noBodyPadding?: boolean,\n hideTopCloseButton?: boolean,\n className?: string,\n overlayClassName?: string,\n headerClassName?: string,\n bodyClassName?: string,\n footerClassName?: string,\n children?: React.ReactNode,\n} & DesignDialogRootProps;\n\n/**\n * Canonical dashboard modal surface. This wraps the base dialog primitives with\n * a reusable glassmorphic shell and consistent header/body/footer regions.\n */\nexport function DesignDialog({\n trigger,\n size = \"lg\",\n variant = \"glassmorphic\",\n icon: Icon = null,\n title,\n description,\n headerContent,\n customHeader,\n footer,\n noBodyPadding = false,\n hideTopCloseButton = false,\n className,\n overlayClassName,\n headerClassName,\n bodyClassName,\n footerClassName,\n children,\n ...dialogRootProps\n}: DesignDialogProps) {\n const resolvedSizeClass = dialogSizeClasses.get(size) ?? \"max-w-lg\";\n const resolvedSurfaceClass = dialogSurfaceClasses.get(variant) ?? dialogSurfaceClasses.get(\"glassmorphic\");\n const resolvedOverlayClass = cn(dialogOverlayClasses.get(variant), overlayClassName);\n const shouldRenderTopHeaderRow = Icon != null || title != null || description != null;\n const shouldRenderHeader = customHeader != null || shouldRenderTopHeaderRow || headerContent != null;\n // Use toArray + filter(Boolean) instead of Children.count so that\n // expressions like `{condition && <Foo/>}` resolving to `false` don't\n // produce an empty DialogBody (which would still render padding/borders).\n const shouldRenderBody = React.Children.toArray(children).filter(Boolean).length > 0;\n const hasStandardTitle = title != null;\n const needsAccessibleTitleFallback = !hasStandardTitle && customHeader == null;\n\n if (process.env.NODE_ENV !== \"production\" && needsAccessibleTitleFallback) {\n console.warn(\n \"[DesignDialog] Rendered without a `title` or `customHeader`. Every dialog needs an accessible name — pass `title`, or render a `DialogTitle` inside `customHeader`.\",\n );\n }\n\n return (\n <Dialog {...dialogRootProps}>\n {trigger != null && (\n <DialogTrigger asChild>\n {trigger}\n </DialogTrigger>\n )}\n\n <DialogContent\n className={cn(\n \"gap-0 p-0 overflow-hidden\",\n resolvedSizeClass,\n resolvedSurfaceClass,\n className\n )}\n overlayProps={resolvedOverlayClass ? { className: resolvedOverlayClass } : undefined}\n noCloseButton={hideTopCloseButton}\n >\n {needsAccessibleTitleFallback && (\n <DialogTitle className=\"sr-only\">Dialog</DialogTitle>\n )}\n {shouldRenderHeader && (\n <DialogHeader className={cn(\"px-6 pt-6 pb-4 border-b border-foreground/[0.06]\", headerClassName)}>\n {customHeader ?? (\n <>\n {shouldRenderTopHeaderRow && (\n <div className={cn(\"flex items-start gap-3\", Icon == null && \"gap-0\")}>\n {Icon != null && (\n <div className=\"h-9 w-9 rounded-xl bg-primary/10 ring-1 ring-primary/15 flex items-center justify-center shrink-0\">\n <Icon className=\"h-4 w-4 text-primary\" />\n </div>\n )}\n {(title != null || description != null) && (\n <div className=\"flex-1 min-w-0 space-y-1\">\n {title != null ? (\n <DialogTitle className=\"text-base\">\n {title}\n </DialogTitle>\n ) : null}\n {description != null ? (\n <DialogDescription className=\"text-xs\">\n {description}\n </DialogDescription>\n ) : null}\n </div>\n )}\n </div>\n )}\n\n {headerContent != null ? (\n <div className={cn(shouldRenderTopHeaderRow && \"mt-4\")}>\n {headerContent}\n </div>\n ) : null}\n </>\n )}\n </DialogHeader>\n )}\n\n {shouldRenderBody && (\n <DialogBody\n className={cn(\n \"mx-0 my-0 w-auto\",\n noBodyPadding ? \"px-0 py-0\" : \"px-6 py-4\",\n bodyClassName\n )}\n >\n {children}\n </DialogBody>\n )}\n\n {footer != null ? (\n <DialogFooter className={cn(\"px-6 py-3 border-t border-foreground/[0.06] bg-foreground/[0.02]\", footerClassName)}>\n {footer}\n </DialogFooter>\n ) : null}\n </DialogContent>\n </Dialog>\n );\n}\n\nexport const DesignDialogRoot = Dialog;\nexport const DesignDialogTrigger = DialogTrigger;\nexport const DesignDialogClose = DialogClose;\nexport const DesignDialogTitle = DialogTitle;\nexport const DesignDialogDescription = DialogDescription;\n"],"mappings":";;;;;;;;;;AA+BA,MAAM,oBAAoB,IAAI,IAA8B;CAC1D,CAAC,MAAM,WAAW;CAClB,CAAC,MAAM,WAAW;CAClB,CAAC,MAAM,WAAW;CAClB,CAAC,MAAM,WAAW;CAClB,CAAC,OAAO,YAAY;CACpB,CAAC,OAAO,YAAY;CACpB,CAAC,OAAO,YAAY;CACpB,CAAC,OAAO,YAAY;CACpB,CAAC,OAAO,YAAY;CACpB,CAAC,OAAO,YAAY;CACpB,CAAC,QAAQ,2BAA2B;CACrC,CAAC;AAEF,MAAM,uBAAuB,IAAI,IAAiC,CAChE,CAAC,gBAAgB,qNAAqN,EACtO,CAAC,SAAS,+CAA+C,CAC1D,CAAC;AAEF,MAAM,uBAAuB,IAAI,IAA6C,CAC5E,CAAC,gBAAgB,+BAA+B,EAChD,CAAC,SAAS,OAAU,CACrB,CAAC;;;;;AA8BF,SAAgB,aAAa,EAC3B,SACA,OAAO,MACP,UAAU,gBACV,MAAM,OAAO,MACb,OACA,aACA,eACA,cACA,QACA,gBAAgB,OAChB,qBAAqB,OACrB,WACA,kBACA,iBACA,eACA,iBACA,UACA,GAAG,mBACiB;CACpB,MAAM,oBAAoB,kBAAkB,IAAI,KAAK,IAAI;CACzD,MAAM,uBAAuB,qBAAqB,IAAI,QAAQ,IAAI,qBAAqB,IAAI,eAAe;CAC1G,MAAM,oDAA0B,qBAAqB,IAAI,QAAQ,EAAE,iBAAiB;CACpF,MAAM,2BAA2B,QAAQ,QAAQ,SAAS,QAAQ,eAAe;CACjF,MAAM,qBAAqB,gBAAgB,QAAQ,4BAA4B,iBAAiB;CAIhG,MAAM,mBAAmBA,cAAM,SAAS,QAAQ,SAAS,CAAC,OAAO,QAAQ,CAAC,SAAS;CAEnF,MAAM,+BAA+B,EADZ,SAAS,SACwB,gBAAgB;AAE1E,KAAI,QAAQ,IAAI,aAAa,gBAAgB,6BAC3C,SAAQ,KACN,sKACD;AAGH,QACE,4CAACC;EAAO,GAAI;aACT,WAAW,QACV,2CAACC;GAAc;aACZ;IACa,EAGlB,4CAACC;GACC,wCACE,6BACA,mBACA,sBACA,UACD;GACD,cAAc,uBAAuB,EAAE,WAAW,sBAAsB,GAAG;GAC3E,eAAe;;IAEd,gCACC,2CAACC;KAAY,WAAU;eAAU;MAAoB;IAEtD,sBACC,2CAACC;KAAa,wCAAc,oDAAoD,gBAAgB;eAC7F,gBACC,qFACG,4BACC,4CAAC;MAAI,wCAAc,0BAA0B,QAAQ,QAAQ,QAAQ;iBAClE,QAAQ,QACP,2CAAC;OAAI,WAAU;iBACb,2CAAC,QAAK,WAAU,yBAAyB;QACrC,GAEN,SAAS,QAAQ,eAAe,SAChC,4CAAC;OAAI,WAAU;kBACZ,SAAS,OACR,2CAACD;QAAY,WAAU;kBACpB;SACW,GACZ,MACH,eAAe,OACd,2CAACE;QAAkB,WAAU;kBAC1B;SACiB,GAClB;QACA;OAEJ,EAGP,iBAAiB,OAChB,2CAAC;MAAI,wCAAc,4BAA4B,OAAO;gBACnD;OACG,GACJ,QACH;MAEQ;IAGhB,oBACC,2CAACC;KACC,wCACE,oBACA,gBAAgB,cAAc,aAC9B,cACD;KAEA;MACU;IAGd,UAAU,OACT,2CAACC;KAAa,wCAAc,oEAAoE,gBAAgB;eAC7G;MACY,GACb;;IACU;GACT;;AAIb,MAAa,mBAAmBP;AAChC,MAAa,sBAAsBC;AACnC,MAAa,oBAAoBO;AACjC,MAAa,oBAAoBL;AACjC,MAAa,0BAA0BE"}
|
|
@@ -8493,7 +8493,8 @@ attempted value: ${formattedValue}
|
|
|
8493
8493
|
repo: yupString().defined(),
|
|
8494
8494
|
branch: yupString().defined(),
|
|
8495
8495
|
commit_hash: yupString().defined(),
|
|
8496
|
-
config_file_path: yupString().defined()
|
|
8496
|
+
config_file_path: yupString().defined(),
|
|
8497
|
+
workflow_path: yupString().optional()
|
|
8497
8498
|
}), yupObject({ type: yupString().oneOf(["pushed-from-unknown"]).defined() }), yupObject({ type: yupString().oneOf(["unlinked"]).defined() }));
|
|
8498
8499
|
|
|
8499
8500
|
// ../../node_modules/.pnpm/async-mutex@0.5.0/node_modules/async-mutex/index.mjs
|
|
@@ -15599,7 +15600,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
15599
15600
|
const resolvedOverlayClass = cn(dialogOverlayClasses.get(variant), overlayClassName);
|
|
15600
15601
|
const shouldRenderTopHeaderRow = Icon != null || title != null || description != null;
|
|
15601
15602
|
const shouldRenderHeader = customHeader != null || shouldRenderTopHeaderRow || headerContent != null;
|
|
15602
|
-
const shouldRenderBody = import_react19.default.Children.
|
|
15603
|
+
const shouldRenderBody = import_react19.default.Children.toArray(children).filter(Boolean).length > 0;
|
|
15604
|
+
const hasStandardTitle = title != null;
|
|
15605
|
+
const needsAccessibleTitleFallback = !hasStandardTitle && customHeader == null;
|
|
15606
|
+
if (false) {
|
|
15607
|
+
console.warn(
|
|
15608
|
+
"[DesignDialog] Rendered without a `title` or `customHeader`. Every dialog needs an accessible name \u2014 pass `title`, or render a `DialogTitle` inside `customHeader`."
|
|
15609
|
+
);
|
|
15610
|
+
}
|
|
15603
15611
|
return /* @__PURE__ */ jsxs(Dialog2, { ...dialogRootProps, children: [
|
|
15604
15612
|
trigger != null && /* @__PURE__ */ jsx(DialogTrigger2, { asChild: true, children: trigger }),
|
|
15605
15613
|
/* @__PURE__ */ jsxs(
|
|
@@ -15614,6 +15622,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
15614
15622
|
overlayProps: resolvedOverlayClass ? { className: resolvedOverlayClass } : void 0,
|
|
15615
15623
|
noCloseButton: hideTopCloseButton,
|
|
15616
15624
|
children: [
|
|
15625
|
+
needsAccessibleTitleFallback && /* @__PURE__ */ jsx(DialogTitle2, { className: "sr-only", children: "Dialog" }),
|
|
15617
15626
|
shouldRenderHeader && /* @__PURE__ */ jsx(DialogHeader, { className: cn("px-6 pt-6 pb-4 border-b border-foreground/[0.06]", headerClassName), children: customHeader ?? /* @__PURE__ */ jsxs(Fragment24, { children: [
|
|
15618
15627
|
shouldRenderTopHeaderRow && /* @__PURE__ */ jsxs("div", { className: cn("flex items-start gap-3", Icon == null && "gap-0"), children: [
|
|
15619
15628
|
Icon != null && /* @__PURE__ */ jsx("div", { className: "h-9 w-9 rounded-xl bg-primary/10 ring-1 ring-primary/15 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 text-primary" }) }),
|