tembro 3.1.14 → 3.1.16
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/CHANGELOG.md +15 -0
- package/dist/components/modern/resizable-panel.d.ts +1 -1
- package/dist/components/patterns/form-builder.d.ts +9 -4
- package/dist/showcase/package-meta.d.ts +2 -2
- package/dist/src/components/display/status-legend.cjs +1 -1
- package/dist/src/components/display/status-legend.js +4 -4
- package/dist/src/components/modern/resizable-panel.cjs +1 -1
- package/dist/src/components/modern/resizable-panel.js +4 -4
- package/dist/src/components/notifications/notification-center.cjs +1 -1
- package/dist/src/components/notifications/notification-center.js +10 -10
- package/dist/src/components/patterns/detail-layout.cjs +1 -1
- package/dist/src/components/patterns/detail-layout.js +1 -1
- package/dist/src/components/patterns/form-builder.cjs +1 -1
- package/dist/src/components/patterns/form-builder.js +6 -6
- package/dist/src/components/patterns/resource-detail-page.cjs +1 -1
- package/dist/src/components/patterns/resource-detail-page.js +1 -1
- package/dist/src/components/patterns/resource-page.cjs +1 -1
- package/dist/src/components/patterns/resource-page.js +1 -1
- package/dist/src/components/ui/card/index.cjs +1 -1
- package/dist/src/components/ui/card/index.js +1 -0
- package/dist/src/showcase/package-meta.cjs +1 -1
- package/dist/src/showcase/package-meta.js +1 -1
- package/dist/src/showcase/registry-specific.cjs +1 -1
- package/dist/src/showcase/registry-specific.js +281 -233
- package/dist/src/showcase/site-data.cjs +1 -1
- package/dist/src/showcase/site-data.js +1 -1
- package/dist/src/showcase/tembro-registry.json.cjs +1 -1
- package/dist/src/showcase/tembro-registry.json.js +1 -1
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +1 -1
- package/packages/cli/vendor/src/components/display/status-legend.tsx +4 -4
- package/packages/cli/vendor/src/components/modern/resizable-panel.tsx +1 -1
- package/packages/cli/vendor/src/components/notifications/notification-center.tsx +11 -11
- package/packages/cli/vendor/src/components/patterns/detail-layout.tsx +1 -1
- package/packages/cli/vendor/src/components/patterns/form-builder.tsx +30 -30
- package/packages/cli/vendor/src/components/patterns/resource-detail-page.tsx +1 -1
- package/packages/cli/vendor/src/components/patterns/resource-page.tsx +1 -1
- package/packages/cli/vendor/src/components/ui/card/index.tsx +1 -0
- package/packages/cli/vendor/src/showcase/package-meta.ts +1 -1
- package/packages/cli/vendor/src/showcase/registry-specific.tsx +11 -1
- package/packages/cli/vendor/src/showcase/tembro-registry.json +1 -1
- package/packages/cli/vendor/templates/showcase/src/showcase/layout/HeroSection.tsx +2 -2
- package/packages/cli/vendor/templates/showcase/src/showcase/layout/WorkbenchSidebar.tsx +1 -1
- package/packages/cli/vendor/templates/styles/globals.css +60 -40
- package/registry.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 3.1.16 - 2026-07-16
|
|
6
|
+
|
|
7
|
+
- Fixed composed Card surfaces so `StatisticCard`, `InfoCard`, `ActivityFeed`, and other Card-based components retain base border, background, radius, and variant styling.
|
|
8
|
+
- Added compatibility aliases for legacy theme tokens used by installed components.
|
|
9
|
+
- Fixed `StatusLegend` surfaces and item borders in light and dark themes.
|
|
10
|
+
- Reduced default Card elevation and strengthened the light-theme border for dense application layouts.
|
|
11
|
+
- Fixed `FormBuilder` field preset typing so discriminated input and select props remain usable in strongly typed React Hook Form schemas.
|
|
12
|
+
- Prevented `ResizablePanel` sizing props from leaking to DOM elements.
|
|
13
|
+
- Made `ResourcePage`, `ResourceDetailPage`, and `DetailLayout` reserve an aside column only when aside content exists.
|
|
14
|
+
|
|
15
|
+
## 3.1.15 - 2026-07-16
|
|
16
|
+
|
|
17
|
+
- Fixed `NotificationCenter` to use solid, fallback-safe popover surfaces when host apps do not define optional `--aui-*` theme tokens.
|
|
18
|
+
- Synced the notification fix into the vendored CLI source used by generated projects.
|
|
19
|
+
|
|
5
20
|
## 3.1.14 - 2026-07-16
|
|
6
21
|
|
|
7
22
|
- Fixed Kanban drag-and-drop by adding a native drag/drop fallback while preserving the existing `@dnd-kit` integration.
|
|
@@ -13,6 +13,6 @@ type ResizableHandleProps = React.ComponentProps<"button"> & {
|
|
|
13
13
|
"data-handle-index"?: number;
|
|
14
14
|
};
|
|
15
15
|
declare function ResizablePanelGroup({ direction, className, children, ...props }: ResizablePanelGroupProps): React.JSX.Element;
|
|
16
|
-
declare function ResizablePanel({ className, style, defaultSize, ...props }: ResizablePanelInternalProps): React.JSX.Element;
|
|
16
|
+
declare function ResizablePanel({ className, style, defaultSize, minSize: _minSize, ...props }: ResizablePanelInternalProps): React.JSX.Element;
|
|
17
17
|
declare function ResizableHandle({ className, ...props }: ResizableHandleProps): React.JSX.Element;
|
|
18
18
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -7,6 +7,7 @@ import { type FormSwitchProps } from "@/components/form/form-switch";
|
|
|
7
7
|
import { type FormDateRangeInputProps } from "@/components/form/form-date-range-input";
|
|
8
8
|
export type FormBuilderLayout = "grid" | "stack";
|
|
9
9
|
export type FormBuilderDensity = "compact" | "default" | "comfortable";
|
|
10
|
+
type DistributiveOmit<T, TKey extends PropertyKey> = T extends unknown ? Omit<T, TKey> : never;
|
|
10
11
|
export type FormBuilderFieldRenderContext<TFieldValues extends FieldValues> = {
|
|
11
12
|
control: Control<TFieldValues>;
|
|
12
13
|
disabled?: boolean;
|
|
@@ -24,7 +25,7 @@ export type FormBuilderCustomField<TFieldValues extends FieldValues> = BaseFormB
|
|
|
24
25
|
};
|
|
25
26
|
export type FormBuilderInputField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = BaseFormBuilderField & {
|
|
26
27
|
type: "input";
|
|
27
|
-
props:
|
|
28
|
+
props: DistributiveOmit<FormInputProps<TFieldValues, TName>, "control">;
|
|
28
29
|
};
|
|
29
30
|
export type FormBuilderTextareaField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = BaseFormBuilderField & {
|
|
30
31
|
type: "textarea";
|
|
@@ -32,7 +33,7 @@ export type FormBuilderTextareaField<TFieldValues extends FieldValues, TName ext
|
|
|
32
33
|
};
|
|
33
34
|
export type FormBuilderSelectField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = BaseFormBuilderField & {
|
|
34
35
|
type: "select";
|
|
35
|
-
props:
|
|
36
|
+
props: DistributiveOmit<FormSelectProps<TFieldValues, TName>, "control">;
|
|
36
37
|
};
|
|
37
38
|
export type FormBuilderAsyncSelectField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = BaseFormBuilderField & {
|
|
38
39
|
type: "async-select";
|
|
@@ -58,7 +59,11 @@ export type FormBuilderDateRangeField<TFieldValues extends FieldValues, TFromNam
|
|
|
58
59
|
type: "date-range";
|
|
59
60
|
props: Omit<FormDateRangeInputProps<TFieldValues, TFromName, TToName>, "control">;
|
|
60
61
|
};
|
|
61
|
-
|
|
62
|
+
type FormBuilderStoredField = BaseFormBuilderField & {
|
|
63
|
+
type: "input" | "textarea" | "select" | "async-select" | "switch" | "number" | "phone" | "date" | "date-range";
|
|
64
|
+
props: object;
|
|
65
|
+
};
|
|
66
|
+
export type FormBuilderField<TFieldValues extends FieldValues> = FormBuilderCustomField<TFieldValues> | FormBuilderStoredField;
|
|
62
67
|
export type FormBuilderSection<TFieldValues extends FieldValues> = {
|
|
63
68
|
id: string;
|
|
64
69
|
title?: React.ReactNode;
|
|
@@ -100,6 +105,6 @@ declare function dateField<TFieldValues extends FieldValues, TName extends Field
|
|
|
100
105
|
declare function dateRangeField<TFieldValues extends FieldValues, TFromName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TToName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(options: FieldPresetOptions<FormBuilderDateRangeField<TFieldValues, TFromName, TToName>["props"]>): FormBuilderDateRangeField<TFieldValues, TFromName, TToName>;
|
|
101
106
|
declare function customField<TFieldValues extends FieldValues>(options: BaseFormBuilderField & Pick<FormBuilderCustomField<TFieldValues>, "render">): FormBuilderCustomField<TFieldValues>;
|
|
102
107
|
declare function formSection<TFieldValues extends FieldValues>(section: FormBuilderSection<TFieldValues>): FormBuilderSection<TFieldValues>;
|
|
103
|
-
declare function renderFormBuilderField<TFieldValues extends FieldValues>(field: FormBuilderField<TFieldValues>, context: FormBuilderFieldRenderContext<TFieldValues>):
|
|
108
|
+
declare function renderFormBuilderField<TFieldValues extends FieldValues>(field: FormBuilderField<TFieldValues>, context: FormBuilderFieldRenderContext<TFieldValues>): React.ReactNode;
|
|
104
109
|
declare function FormBuilder<TFieldValues extends FieldValues>({ className, control, fields, sections, layout, density, columns, disabled, readOnly, footer, submitLabel, resetLabel, onResetClick, isSubmitting, sectionClassName, fieldClassName, footerClassName, ...props }: FormBuilderProps<TFieldValues>): React.JSX.Element;
|
|
105
110
|
export { FormBuilder, asyncSelectField, customField, dateField, dateRangeField, formSection, inputField, numberField, phoneField, renderFormBuilderField, selectField, switchField, textareaField, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const PACKAGE_LATEST_VERSION = "3.1.
|
|
1
|
+
export declare const PACKAGE_LATEST_VERSION = "3.1.16";
|
|
2
2
|
export declare const PACKAGE_LATEST_RELEASE_DATE = "July 15, 2026";
|
|
3
|
-
export declare const PACKAGE_DEPENDENCY_RANGE = "3.1.
|
|
3
|
+
export declare const PACKAGE_DEPENDENCY_RANGE = "3.1.16";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/card/index.cjs"),r=require("../ui/badge/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o={default:`bg-primary`,success:`bg-emerald-500`,warning:`bg-amber-500`,danger:`bg-destructive`,info:`bg-blue-500`,muted:`bg-muted-foreground`};function s({title:e,description:i,actions:s,items:c,orientation:l=`vertical`,compact:u=!1,showCounts:d=!0,contentClassName:f,itemClassName:p,className:m,...h}){let g=c.filter(e=>!e.hidden),_=!!(e||i||s),v={vertical:`grid`,horizontal:`flex flex-wrap`,grid:`grid sm:grid-cols-2`};return(0,a.jsxs)(n.Card,{"data-slot":`status-legend`,className:t.cn(`min-w-0 border-[color:var(--aui-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/card/index.cjs"),r=require("../ui/badge/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o={default:`bg-primary`,success:`bg-emerald-500`,warning:`bg-amber-500`,danger:`bg-destructive`,info:`bg-blue-500`,muted:`bg-muted-foreground`};function s({title:e,description:i,actions:s,items:c,orientation:l=`vertical`,compact:u=!1,showCounts:d=!0,contentClassName:f,itemClassName:p,className:m,...h}){let g=c.filter(e=>!e.hidden),_=!!(e||i||s),v={vertical:`grid`,horizontal:`flex flex-wrap`,grid:`grid sm:grid-cols-2`};return(0,a.jsxs)(n.Card,{"data-slot":`status-legend`,className:t.cn(`min-w-0 border-[color:var(--aui-card-border,var(--border))] bg-card shadow-[var(--aui-card-shadow,var(--aui-shadow-xs))]`,m),...h,children:[_&&(0,a.jsx)(n.CardHeader,{className:t.cn(`pb-3`,u&&`p-4 pb-2`),children:(0,a.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,a.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[e&&(0,a.jsx)(n.CardTitle,{className:`text-base tracking-tight`,children:e}),i&&(0,a.jsx)(n.CardDescription,{className:`leading-6`,children:i})]}),s&&(0,a.jsx)(`div`,{className:`shrink-0`,children:s})]})}),(0,a.jsx)(n.CardContent,{className:t.cn(`gap-3`,v[l],u?`p-4 pt-2`:`pt-0`,f),children:g.map(e=>(0,a.jsxs)(`div`,{"data-slot":`status-legend-item`,"data-tone":e.tone??`default`,className:t.cn(`flex min-w-0 items-start justify-between gap-3 rounded-lg border border-[color:var(--aui-card-border,var(--border))] bg-[color:var(--aui-control-surface,var(--background))] p-3 transition hover:border-[color:var(--aui-control-hover-border,var(--ring))]`,u&&`p-2.5`,p,e.className),children:[(0,a.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2`,children:[e.icon?(0,a.jsx)(`span`,{className:`mt-0.5 inline-flex size-8 shrink-0 items-center justify-center rounded-xl bg-[color:var(--aui-page-bg)] text-muted-foreground [&_svg]:size-4`,children:e.icon}):(0,a.jsx)(`span`,{className:t.cn(`mt-1.5 size-2.5 shrink-0 rounded-full ring-4 ring-background`,o[e.tone??`default`])}),(0,a.jsxs)(`div`,{className:`min-w-0 space-y-0.5`,children:[(0,a.jsx)(`div`,{className:`truncate text-sm font-medium text-foreground`,children:e.label}),e.description&&(0,a.jsx)(`div`,{className:`text-xs leading-5 text-muted-foreground`,children:e.description})]})]}),d&&e.count!==void 0&&(0,a.jsx)(r.Badge,{variant:`secondary`,className:`shrink-0 rounded-full border border-[color:var(--aui-card-border,var(--border))] bg-background px-2.5 py-1 shadow-sm`,children:e.count})]},e.key))})]})}exports.StatusLegend=s;
|
|
@@ -20,7 +20,7 @@ function u({ title: u, description: d, actions: f, items: p, orientation: m = "v
|
|
|
20
20
|
};
|
|
21
21
|
return /* @__PURE__ */ c(t, {
|
|
22
22
|
"data-slot": "status-legend",
|
|
23
|
-
className: e("min-w-0 border-[color:var(--aui-
|
|
23
|
+
className: e("min-w-0 border-[color:var(--aui-card-border,var(--border))] bg-card shadow-[var(--aui-card-shadow,var(--aui-shadow-xs))]", y),
|
|
24
24
|
...b,
|
|
25
25
|
children: [S && /* @__PURE__ */ s(i, {
|
|
26
26
|
className: e("pb-3", h && "p-4 pb-2"),
|
|
@@ -45,13 +45,13 @@ function u({ title: u, description: d, actions: f, items: p, orientation: m = "v
|
|
|
45
45
|
children: x.map((t) => /* @__PURE__ */ c("div", {
|
|
46
46
|
"data-slot": "status-legend-item",
|
|
47
47
|
"data-tone": t.tone ?? "default",
|
|
48
|
-
className: e("flex min-w-0 items-start justify-between gap-3 rounded-
|
|
48
|
+
className: e("flex min-w-0 items-start justify-between gap-3 rounded-lg border border-[color:var(--aui-card-border,var(--border))] bg-[color:var(--aui-control-surface,var(--background))] p-3 transition hover:border-[color:var(--aui-control-hover-border,var(--ring))]", h && "p-2.5", v, t.className),
|
|
49
49
|
children: [/* @__PURE__ */ c("div", {
|
|
50
50
|
className: "flex min-w-0 items-start gap-2",
|
|
51
51
|
children: [t.icon ? /* @__PURE__ */ s("span", {
|
|
52
52
|
className: "mt-0.5 inline-flex size-8 shrink-0 items-center justify-center rounded-xl bg-[color:var(--aui-page-bg)] text-muted-foreground [&_svg]:size-4",
|
|
53
53
|
children: t.icon
|
|
54
|
-
}) : /* @__PURE__ */ s("span", { className: e("mt-1.5 size-2.5 shrink-0 rounded-full
|
|
54
|
+
}) : /* @__PURE__ */ s("span", { className: e("mt-1.5 size-2.5 shrink-0 rounded-full ring-4 ring-background", l[t.tone ?? "default"]) }), /* @__PURE__ */ c("div", {
|
|
55
55
|
className: "min-w-0 space-y-0.5",
|
|
56
56
|
children: [/* @__PURE__ */ s("div", {
|
|
57
57
|
className: "truncate text-sm font-medium text-foreground",
|
|
@@ -63,7 +63,7 @@ function u({ title: u, description: d, actions: f, items: p, orientation: m = "v
|
|
|
63
63
|
})]
|
|
64
64
|
}), g && t.count !== void 0 && /* @__PURE__ */ s(o, {
|
|
65
65
|
variant: "secondary",
|
|
66
|
-
className: "shrink-0 rounded-full border border-[color:var(--aui-
|
|
66
|
+
className: "shrink-0 rounded-full border border-[color:var(--aui-card-border,var(--border))] bg-background px-2.5 py-1 shadow-sm",
|
|
67
67
|
children: t.count
|
|
68
68
|
})]
|
|
69
69
|
}, t.key))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");var a=n.createContext(null);function o(e){if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e.replace(`%`,``));return Number.isFinite(t)?t:void 0}}function s({direction:e=`horizontal`,className:r,children:s,...u}){let d=n.useRef(null),f=n.Children.toArray(s).filter(e=>n.isValidElement(e)&&e.type===c),p=f.length,m=n.useMemo(()=>{let e=f.map(e=>o(e.props.defaultSize)),t=e.reduce((e,t)=>e+(t??0),0),n=e.filter(e=>e===void 0).length,r=Math.max(100-t,0),i=n>0?r/n:p>0?100/p:100;return e.map(e=>e??i)},[p,f]),h=n.useMemo(()=>f.map(e=>e.props.minSize??15),[f]),[g,_]=n.useState(m);n.useEffect(()=>{_(m)},[m]);let v=n.useCallback((t,n)=>{let r=d.current;if(!r||t<0||t>=p-1)return;let i=e===`horizontal`?r.getBoundingClientRect().width:r.getBoundingClientRect().height;if(!i)return;let a=n/i*100;_(e=>{let n=[...e],r=n[t]??0,i=n[t+1]??0,o=h[t]??15,s=h[t+1]??15,c=r+a,l=Math.min(Math.max(c,o),r+i-s),u=l-r;return n[t]=l,n[t+1]=i-u,n})},[e,h,p]),y=n.Children.map(s,e=>{if(!n.isValidElement(e))return e;if(e.type===c){let t=f.findIndex(t=>t===e);return n.cloneElement(e,{"data-panel-index":t})}if(e.type===l){let t=n.Children.toArray(s).slice(0,n.Children.toArray(s).indexOf(e)).filter(e=>n.isValidElement(e)&&e.type===c).length-1;return n.cloneElement(e,{"data-handle-index":t})}return e});return(0,i.jsx)(a.Provider,{value:{direction:e,getSize:e=>g[e]??100/Math.max(p,1),resizePanels:v},children:(0,i.jsx)(`div`,{ref:d,"data-slot":`resizable-panel-group`,"data-direction":e,className:t.cn(`flex gap-2`,e===`horizontal`?`flex-row items-stretch`:`flex-col`,r),...u,children:y})})}function c({className:e,style:r,defaultSize:s,...
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");var a=n.createContext(null);function o(e){if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e.replace(`%`,``));return Number.isFinite(t)?t:void 0}}function s({direction:e=`horizontal`,className:r,children:s,...u}){let d=n.useRef(null),f=n.Children.toArray(s).filter(e=>n.isValidElement(e)&&e.type===c),p=f.length,m=n.useMemo(()=>{let e=f.map(e=>o(e.props.defaultSize)),t=e.reduce((e,t)=>e+(t??0),0),n=e.filter(e=>e===void 0).length,r=Math.max(100-t,0),i=n>0?r/n:p>0?100/p:100;return e.map(e=>e??i)},[p,f]),h=n.useMemo(()=>f.map(e=>e.props.minSize??15),[f]),[g,_]=n.useState(m);n.useEffect(()=>{_(m)},[m]);let v=n.useCallback((t,n)=>{let r=d.current;if(!r||t<0||t>=p-1)return;let i=e===`horizontal`?r.getBoundingClientRect().width:r.getBoundingClientRect().height;if(!i)return;let a=n/i*100;_(e=>{let n=[...e],r=n[t]??0,i=n[t+1]??0,o=h[t]??15,s=h[t+1]??15,c=r+a,l=Math.min(Math.max(c,o),r+i-s),u=l-r;return n[t]=l,n[t+1]=i-u,n})},[e,h,p]),y=n.Children.map(s,e=>{if(!n.isValidElement(e))return e;if(e.type===c){let t=f.findIndex(t=>t===e);return n.cloneElement(e,{"data-panel-index":t})}if(e.type===l){let t=n.Children.toArray(s).slice(0,n.Children.toArray(s).indexOf(e)).filter(e=>n.isValidElement(e)&&e.type===c).length-1;return n.cloneElement(e,{"data-handle-index":t})}return e});return(0,i.jsx)(a.Provider,{value:{direction:e,getSize:e=>g[e]??100/Math.max(p,1),resizePanels:v},children:(0,i.jsx)(`div`,{ref:d,"data-slot":`resizable-panel-group`,"data-direction":e,className:t.cn(`flex gap-2`,e===`horizontal`?`flex-row items-stretch`:`flex-col`,r),...u,children:y})})}function c({className:e,style:r,defaultSize:s,minSize:c,...l}){let u=n.useContext(a),d=Number(l[`data-panel-index`]??0),f=u?u.getSize(d):o(s)??100;return(0,i.jsx)(`div`,{"data-slot":`resizable-panel`,className:t.cn(`min-h-24 overflow-auto rounded-lg border bg-card p-3`,e),style:{flexBasis:`${f}%`,flexGrow:0,flexShrink:0,...r},...l})}function l({className:e,...o}){let s=n.useContext(a),c=Number(o[`data-handle-index`]??0),l=n.useRef(null);return(0,i.jsx)(`button`,{type:`button`,"data-slot":`resizable-handle`,"aria-label":`Resize panels`,className:t.cn(`relative flex shrink-0 items-center justify-center rounded-full border border-border/70 bg-background/85 text-muted-foreground shadow-sm transition-colors hover:border-ring/45 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,s?.direction===`horizontal`?`w-3 cursor-col-resize`:`h-3 cursor-row-resize`,e),onPointerDown:e=>{s&&(l.current={pointerId:e.pointerId,axis:s.direction===`horizontal`?e.clientX:e.clientY},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{if(!s||!l.current||l.current.pointerId!==e.pointerId)return;let t=s.direction===`horizontal`?e.clientX:e.clientY,n=t-l.current.axis;n!==0&&(l.current.axis=t,s.resizePanels(c,n))},onPointerUp:e=>{l.current?.pointerId===e.pointerId&&(l.current=null)},onPointerCancel:()=>{l.current=null},onKeyDown:e=>{if(!s)return;let t=e.shiftKey?24:12;s.direction===`horizontal`&&e.key===`ArrowLeft`&&(e.preventDefault(),s.resizePanels(c,-t)),s.direction===`horizontal`&&e.key===`ArrowRight`&&(e.preventDefault(),s.resizePanels(c,t)),s.direction===`vertical`&&e.key===`ArrowUp`&&(e.preventDefault(),s.resizePanels(c,-t)),s.direction===`vertical`&&e.key===`ArrowDown`&&(e.preventDefault(),s.resizePanels(c,t))},...o,children:(0,i.jsx)(r.GripVerticalIcon,{className:t.cn(`size-3`,s?.direction===`vertical`&&`rotate-90`)})})}exports.ResizableHandle=l,exports.ResizablePanel=c,exports.ResizablePanelGroup=s;
|
|
@@ -62,18 +62,18 @@ function o({ direction: n = "horizontal", className: o, children: l, ...u }) {
|
|
|
62
62
|
})
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function s({ className: n, style: o, defaultSize: s,
|
|
66
|
-
let
|
|
65
|
+
function s({ className: n, style: o, defaultSize: s, minSize: c, ...l }) {
|
|
66
|
+
let u = t.useContext(i), d = Number(l["data-panel-index"] ?? 0), f = u ? u.getSize(d) : a(s) ?? 100;
|
|
67
67
|
return /* @__PURE__ */ r("div", {
|
|
68
68
|
"data-slot": "resizable-panel",
|
|
69
69
|
className: e("min-h-24 overflow-auto rounded-lg border bg-card p-3", n),
|
|
70
70
|
style: {
|
|
71
|
-
flexBasis: `${
|
|
71
|
+
flexBasis: `${f}%`,
|
|
72
72
|
flexGrow: 0,
|
|
73
73
|
flexShrink: 0,
|
|
74
74
|
...o
|
|
75
75
|
},
|
|
76
|
-
...
|
|
76
|
+
...l
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
function c({ className: a, ...o }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../ui/popover/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");function s({notifications:e,onMarkAllRead:i,onClearAll:s,onNotificationClick:c,emptyLabel:l=`No new notifications`,title:u=`Notifications`,className:d,...f}){let p=e.filter(e=>!e.read).length,m=e.reduce((e,t)=>{let n=String(t.group??`Recent`);return e[n]=[...e[n]??[],t],e},{});return(0,o.jsx)(`div`,{"data-slot":`notification-center`,className:d,...f,children:(0,o.jsxs)(r.Popover,{children:[(0,o.jsxs)(n.Button,{render:(0,o.jsx)(r.PopoverTrigger,{}),variant:`ghost`,size:`icon`,className:`relative rounded-full border
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../ui/popover/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");function s({notifications:e,onMarkAllRead:i,onClearAll:s,onNotificationClick:c,emptyLabel:l=`No new notifications`,title:u=`Notifications`,className:d,...f}){let p=e.filter(e=>!e.read).length,m=e.reduce((e,t)=>{let n=String(t.group??`Recent`);return e[n]=[...e[n]??[],t],e},{});return(0,o.jsx)(`div`,{"data-slot":`notification-center`,className:d,...f,children:(0,o.jsxs)(r.Popover,{children:[(0,o.jsxs)(n.Button,{render:(0,o.jsx)(r.PopoverTrigger,{}),variant:`ghost`,size:`icon`,className:`relative rounded-full border bg-white text-foreground shadow-sm hover:bg-muted dark:bg-neutral-950`,children:[(0,o.jsx)(a.BellIcon,{className:`size-5`}),p>0&&(0,o.jsxs)(`span`,{className:`absolute -right-1 -top-1 inline-flex min-w-5 items-center justify-center rounded-full bg-primary px-1.5 py-0.5 text-[10px] font-bold leading-none text-primary-foreground shadow-[0_8px_20px_rgba(16,185,129,0.24)]`,children:[p,(0,o.jsxs)(`span`,{className:`sr-only`,children:[p,` unread notifications`]})]})]}),(0,o.jsxs)(r.PopoverContent,{className:`isolate w-[24rem] overflow-hidden rounded-3xl border bg-white p-0 text-popover-foreground opacity-100 shadow-[0_24px_60px_rgba(15,23,42,0.18)] dark:bg-neutral-950`,align:`end`,children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between border-b bg-white px-5 py-4 dark:bg-neutral-950`,children:[(0,o.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,o.jsx)(`h4`,{className:`font-semibold tracking-tight text-foreground`,children:u}),(0,o.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:p>0?`${p} unread update${p>1?`s`:``}`:`You're all caught up`})]}),(0,o.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p>0&&i?(0,o.jsx)(n.Button,{variant:`ghost`,size:`sm`,className:`h-8 rounded-full border px-3 text-xs font-semibold text-muted-foreground hover:bg-background hover:text-foreground`,onClick:i,children:`Mark all read`}):null,e.length>0&&s?(0,o.jsx)(n.Button,{variant:`ghost`,size:`sm`,className:`h-8 rounded-full border px-3 text-xs font-semibold text-muted-foreground hover:bg-background hover:text-foreground`,onClick:s,children:`Clear all`}):null]})]}),(0,o.jsx)(`div`,{className:`max-h-[400px] overflow-y-auto bg-white p-2 dark:bg-neutral-950`,children:e.length===0?(0,o.jsx)(`div`,{className:`rounded-2xl border border-dashed px-6 py-10 text-center text-sm text-muted-foreground`,children:l}):(0,o.jsx)(`div`,{className:`flex flex-col gap-3`,children:Object.entries(m).map(([e,n])=>(0,o.jsxs)(`div`,{className:`grid gap-2`,children:[(0,o.jsx)(`div`,{className:`px-2 pt-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:e}),n.map(e=>(0,o.jsxs)(`button`,{className:t.cn(`flex flex-col gap-1 rounded-2xl border border-transparent bg-white px-4 py-3 text-left transition hover:border-border hover:bg-muted dark:bg-neutral-950 dark:hover:bg-neutral-900`,!e.read&&`border-primary/20 bg-slate-50 dark:bg-neutral-900`),onClick:()=>c?.(e),children:[(0,o.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-2`,children:[(0,o.jsx)(`span`,{className:`text-sm font-semibold leading-tight text-foreground`,children:e.title}),!e.read&&(0,o.jsx)(`span`,{className:`mt-1 flex size-2 shrink-0 rounded-full bg-primary shadow-[0_0_0_4px_color-mix(in_srgb,var(--primary)_14%,transparent)]`})]}),e.description&&(0,o.jsx)(`span`,{className:`line-clamp-2 text-xs leading-5 text-muted-foreground`,children:e.description}),e.time&&(0,o.jsx)(`span`,{className:`mt-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/80`,children:e.time})]},e.id))]},e))})})]})]})})}exports.NotificationCenter=s;
|
|
@@ -18,19 +18,19 @@ function c({ notifications: c, onMarkAllRead: l, onClearAll: u, onNotificationCl
|
|
|
18
18
|
render: /* @__PURE__ */ o(i, {}),
|
|
19
19
|
variant: "ghost",
|
|
20
20
|
size: "icon",
|
|
21
|
-
className: "relative rounded-full border
|
|
21
|
+
className: "relative rounded-full border bg-white text-foreground shadow-sm hover:bg-muted dark:bg-neutral-950",
|
|
22
22
|
children: [/* @__PURE__ */ o(a, { className: "size-5" }), g > 0 && /* @__PURE__ */ s("span", {
|
|
23
|
-
className: "absolute -right-1 -top-1 inline-flex min-w-5 items-center justify-center rounded-full bg-
|
|
23
|
+
className: "absolute -right-1 -top-1 inline-flex min-w-5 items-center justify-center rounded-full bg-primary px-1.5 py-0.5 text-[10px] font-bold leading-none text-primary-foreground shadow-[0_8px_20px_rgba(16,185,129,0.24)]",
|
|
24
24
|
children: [g, /* @__PURE__ */ s("span", {
|
|
25
25
|
className: "sr-only",
|
|
26
26
|
children: [g, " unread notifications"]
|
|
27
27
|
})]
|
|
28
28
|
})]
|
|
29
29
|
}), /* @__PURE__ */ s(r, {
|
|
30
|
-
className: "w-[24rem] overflow-hidden rounded-3xl border
|
|
30
|
+
className: "isolate w-[24rem] overflow-hidden rounded-3xl border bg-white p-0 text-popover-foreground opacity-100 shadow-[0_24px_60px_rgba(15,23,42,0.18)] dark:bg-neutral-950",
|
|
31
31
|
align: "end",
|
|
32
32
|
children: [/* @__PURE__ */ s("div", {
|
|
33
|
-
className: "flex items-center justify-between border-b
|
|
33
|
+
className: "flex items-center justify-between border-b bg-white px-5 py-4 dark:bg-neutral-950",
|
|
34
34
|
children: [/* @__PURE__ */ s("div", {
|
|
35
35
|
className: "grid gap-0.5",
|
|
36
36
|
children: [/* @__PURE__ */ o("h4", {
|
|
@@ -45,21 +45,21 @@ function c({ notifications: c, onMarkAllRead: l, onClearAll: u, onNotificationCl
|
|
|
45
45
|
children: [g > 0 && l ? /* @__PURE__ */ o(t, {
|
|
46
46
|
variant: "ghost",
|
|
47
47
|
size: "sm",
|
|
48
|
-
className: "h-8 rounded-full border
|
|
48
|
+
className: "h-8 rounded-full border px-3 text-xs font-semibold text-muted-foreground hover:bg-background hover:text-foreground",
|
|
49
49
|
onClick: l,
|
|
50
50
|
children: "Mark all read"
|
|
51
51
|
}) : null, c.length > 0 && u ? /* @__PURE__ */ o(t, {
|
|
52
52
|
variant: "ghost",
|
|
53
53
|
size: "sm",
|
|
54
|
-
className: "h-8 rounded-full border
|
|
54
|
+
className: "h-8 rounded-full border px-3 text-xs font-semibold text-muted-foreground hover:bg-background hover:text-foreground",
|
|
55
55
|
onClick: u,
|
|
56
56
|
children: "Clear all"
|
|
57
57
|
}) : null]
|
|
58
58
|
})]
|
|
59
59
|
}), /* @__PURE__ */ o("div", {
|
|
60
|
-
className: "max-h-[400px] overflow-y-auto bg-
|
|
60
|
+
className: "max-h-[400px] overflow-y-auto bg-white p-2 dark:bg-neutral-950",
|
|
61
61
|
children: c.length === 0 ? /* @__PURE__ */ o("div", {
|
|
62
|
-
className: "rounded-2xl border border-dashed
|
|
62
|
+
className: "rounded-2xl border border-dashed px-6 py-10 text-center text-sm text-muted-foreground",
|
|
63
63
|
children: f
|
|
64
64
|
}) : /* @__PURE__ */ o("div", {
|
|
65
65
|
className: "flex flex-col gap-3",
|
|
@@ -69,7 +69,7 @@ function c({ notifications: c, onMarkAllRead: l, onClearAll: u, onNotificationCl
|
|
|
69
69
|
className: "px-2 pt-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground",
|
|
70
70
|
children: t
|
|
71
71
|
}), n.map((t) => /* @__PURE__ */ s("button", {
|
|
72
|
-
className: e("flex flex-col gap-1 rounded-2xl border border-transparent px-4 py-3 text-left transition hover:border-
|
|
72
|
+
className: e("flex flex-col gap-1 rounded-2xl border border-transparent bg-white px-4 py-3 text-left transition hover:border-border hover:bg-muted dark:bg-neutral-950 dark:hover:bg-neutral-900", !t.read && "border-primary/20 bg-slate-50 dark:bg-neutral-900"),
|
|
73
73
|
onClick: () => d?.(t),
|
|
74
74
|
children: [
|
|
75
75
|
/* @__PURE__ */ s("div", {
|
|
@@ -77,7 +77,7 @@ function c({ notifications: c, onMarkAllRead: l, onClearAll: u, onNotificationCl
|
|
|
77
77
|
children: [/* @__PURE__ */ o("span", {
|
|
78
78
|
className: "text-sm font-semibold leading-tight text-foreground",
|
|
79
79
|
children: t.title
|
|
80
|
-
}), !t.read && /* @__PURE__ */ o("span", { className: "mt-1 flex size-2 shrink-0 rounded-full bg-
|
|
80
|
+
}), !t.read && /* @__PURE__ */ o("span", { className: "mt-1 flex size-2 shrink-0 rounded-full bg-primary shadow-[0_0_0_4px_color-mix(in_srgb,var(--primary)_14%,transparent)]" })]
|
|
81
81
|
}),
|
|
82
82
|
t.description && /* @__PURE__ */ o("span", {
|
|
83
83
|
className: "line-clamp-2 text-xs leading-5 text-muted-foreground",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");function i({className:e,title:n,description:i,eyebrow:a,actions:o,breadcrumbs:s,summary:c,aside:l,footer:u,headerClassName:d,contentClassName:f,asideClassName:p,children:m,...h}){let g=!!(n||i||a||o),_=!!(m||l);return(0,r.jsxs)(`div`,{"data-slot":`detail-layout`,className:t.cn(`grid min-w-0 gap-4`,e),...h,children:[s&&(0,r.jsx)(`div`,{"data-slot":`detail-layout-breadcrumbs`,children:s}),g&&(0,r.jsxs)(`div`,{"data-slot":`detail-layout-header`,className:t.cn(`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,d),children:[(0,r.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[a&&(0,r.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-wide text-muted-foreground`,children:a}),n&&(0,r.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:n}),i&&(0,r.jsx)(`p`,{className:`max-w-3xl text-sm leading-6 text-muted-foreground`,children:i})]}),o&&(0,r.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:o})]}),c&&(0,r.jsx)(`div`,{"data-slot":`detail-layout-summary`,children:c}),_&&(0,r.jsxs)(`div`,{"data-slot":`detail-layout-content`,className:t.cn(`grid min-w-0 gap-4
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");function i({className:e,title:n,description:i,eyebrow:a,actions:o,breadcrumbs:s,summary:c,aside:l,footer:u,headerClassName:d,contentClassName:f,asideClassName:p,children:m,...h}){let g=!!(n||i||a||o),_=!!(m||l);return(0,r.jsxs)(`div`,{"data-slot":`detail-layout`,className:t.cn(`grid min-w-0 gap-4`,e),...h,children:[s&&(0,r.jsx)(`div`,{"data-slot":`detail-layout-breadcrumbs`,children:s}),g&&(0,r.jsxs)(`div`,{"data-slot":`detail-layout-header`,className:t.cn(`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,d),children:[(0,r.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[a&&(0,r.jsx)(`div`,{className:`text-xs font-medium uppercase tracking-wide text-muted-foreground`,children:a}),n&&(0,r.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:n}),i&&(0,r.jsx)(`p`,{className:`max-w-3xl text-sm leading-6 text-muted-foreground`,children:i})]}),o&&(0,r.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:o})]}),c&&(0,r.jsx)(`div`,{"data-slot":`detail-layout-summary`,children:c}),_&&(0,r.jsxs)(`div`,{"data-slot":`detail-layout-content`,className:t.cn(`grid min-w-0 gap-4`,l&&`xl:grid-cols-[minmax(0,1fr)_20rem]`,f),children:[(0,r.jsx)(`main`,{"data-slot":`detail-layout-main`,className:`min-w-0`,children:m}),l&&(0,r.jsx)(`aside`,{"data-slot":`detail-layout-aside`,className:t.cn(`min-w-0`,p),children:l})]}),u&&(0,r.jsx)(`div`,{"data-slot":`detail-layout-footer`,children:u})]})}exports.DetailLayout=i;
|
|
@@ -43,7 +43,7 @@ function r({ className: r, title: i, description: a, eyebrow: o, actions: s, bre
|
|
|
43
43
|
}),
|
|
44
44
|
v && /* @__PURE__ */ n("div", {
|
|
45
45
|
"data-slot": "detail-layout-content",
|
|
46
|
-
className: e("grid min-w-0 gap-4 xl:grid-cols-[minmax(0,1fr)_20rem]", p),
|
|
46
|
+
className: e("grid min-w-0 gap-4", u && "xl:grid-cols-[minmax(0,1fr)_20rem]", p),
|
|
47
47
|
children: [/* @__PURE__ */ t("main", {
|
|
48
48
|
"data-slot": "detail-layout-main",
|
|
49
49
|
className: "min-w-0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../form/form-input.cjs"),i=require("../form/form-select.cjs"),a=require("../form/form-switch.cjs"),o=require("../form/form-textarea.cjs"),s=require("../form/form-date-range-input.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u={compact:`gap-3`,default:`gap-4`,comfortable:`gap-6`},d={1:`grid-cols-1`,2:`grid-cols-1 md:grid-cols-2`,3:`grid-cols-1 md:grid-cols-2 xl:grid-cols-3`,4:`grid-cols-1 md:grid-cols-2 xl:grid-cols-4`},f={1:`col-span-1`,2:`md:col-span-2`,3:`xl:col-span-3`,4:`xl:col-span-4`,full:`col-span-full`};function p(e){let{id:t,hidden:n,className:r,colSpan:i,props:a}=e;return{base:{id:t,hidden:n,className:r,colSpan:i},props:a}}function m(e){let{base:t,props:n}=p(e);return{...t,type:`input`,props:n}}function h(e){let{base:t,props:n}=p(e);return{...t,type:`textarea`,props:n}}function g(e){let{base:t,props:n}=p(e);return{...t,type:`select`,props:n}}function _(e){let{base:t,props:n}=p(e);return{...t,type:`async-select`,props:n}}function v(e){let{base:t,props:n}=p(e);return{...t,type:`switch`,props:n}}function y(e){let{base:t,props:n}=p(e);return{...t,type:`number`,props:n}}function b(e){let{base:t,props:n}=p(e);return{...t,type:`phone`,props:n}}function x(e){let{base:t,props:n}=p(e);return{...t,type:`date`,props:n}}function S(e){let{base:t,props:n}=p(e);return{...t,type:`date-range`,props:n}}function C(e){let{id:t,hidden:n,className:r,colSpan:i,render:a}=e;return{id:t,hidden:n,className:r,colSpan:i,type:`custom`,render:a}}function w(e){return e}function T(e,t){let n=r.FormInput,
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../form/form-input.cjs"),i=require("../form/form-select.cjs"),a=require("../form/form-switch.cjs"),o=require("../form/form-textarea.cjs"),s=require("../form/form-date-range-input.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u={compact:`gap-3`,default:`gap-4`,comfortable:`gap-6`},d={1:`grid-cols-1`,2:`grid-cols-1 md:grid-cols-2`,3:`grid-cols-1 md:grid-cols-2 xl:grid-cols-3`,4:`grid-cols-1 md:grid-cols-2 xl:grid-cols-4`},f={1:`col-span-1`,2:`md:col-span-2`,3:`xl:col-span-3`,4:`xl:col-span-4`,full:`col-span-full`};function p(e){let{id:t,hidden:n,className:r,colSpan:i,props:a}=e;return{base:{id:t,hidden:n,className:r,colSpan:i},props:a}}function m(e){let{base:t,props:n}=p(e);return{...t,type:`input`,props:n}}function h(e){let{base:t,props:n}=p(e);return{...t,type:`textarea`,props:n}}function g(e){let{base:t,props:n}=p(e);return{...t,type:`select`,props:n}}function _(e){let{base:t,props:n}=p(e);return{...t,type:`async-select`,props:n}}function v(e){let{base:t,props:n}=p(e);return{...t,type:`switch`,props:n}}function y(e){let{base:t,props:n}=p(e);return{...t,type:`number`,props:n}}function b(e){let{base:t,props:n}=p(e);return{...t,type:`phone`,props:n}}function x(e){let{base:t,props:n}=p(e);return{...t,type:`date`,props:n}}function S(e){let{base:t,props:n}=p(e);return{...t,type:`date-range`,props:n}}function C(e){let{id:t,hidden:n,className:r,colSpan:i,render:a}=e;return{id:t,hidden:n,className:r,colSpan:i,type:`custom`,render:a}}function w(e){return e}function T(e,t){let n=r.FormInput,l=i.FormSelect,u=o.FormTextarea,d=a.FormSwitch,f=s.FormDateRangeInput;switch(e.type){case`custom`:return e.render(t);case`input`:return c.createElement(n,{control:t.control,disabled:t.disabled,readOnly:t.readOnly,...e.props});case`textarea`:return c.createElement(u,{control:t.control,disabled:t.disabled,readOnly:t.readOnly,...e.props});case`select`:return c.createElement(l,{control:t.control,disabled:t.disabled,...e.props});case`async-select`:return c.createElement(l,{control:t.control,disabled:t.disabled,kind:`async`,...e.props});case`switch`:return c.createElement(d,{control:t.control,disabled:t.disabled,...e.props});case`number`:return c.createElement(n,{control:t.control,disabled:t.disabled,readOnly:t.readOnly,kind:`number`,...e.props});case`phone`:return c.createElement(n,{control:t.control,disabled:t.disabled,readOnly:t.readOnly,kind:`phone`,...e.props});case`date`:return c.createElement(n,{control:t.control,disabled:t.disabled,readOnly:t.readOnly,kind:`date`,...e.props});case`date-range`:return c.createElement(f,{control:t.control,fromInputProps:{disabled:t.disabled,readOnly:t.readOnly},toInputProps:{disabled:t.disabled,readOnly:t.readOnly},...e.props});default:return null}}function E({fields:e,sections:t}){return t?.length?t:[{id:`default`,fields:e??[]}]}function D({className:e,control:r,fields:i,sections:a,layout:o=`grid`,density:s=`default`,columns:p=2,disabled:m,readOnly:h,footer:g,submitLabel:_,resetLabel:v,onResetClick:y,isSubmitting:b,sectionClassName:x,fieldClassName:S,footerClassName:C,...w}){let D=E({fields:i,sections:a}),O=c.useMemo(()=>({control:r,disabled:m,readOnly:h}),[r,m,h]);return(0,l.jsxs)(`form`,{"data-slot":`form-builder`,className:t.cn(`grid`,u[s],e),...w,children:[D.filter(e=>!e.hidden).map(e=>(0,l.jsxs)(`section`,{"data-slot":`form-builder-section`,className:t.cn(`grid gap-4`,e.className,x),children:[(e.title||e.description||e.actions)&&(0,l.jsxs)(`div`,{"data-slot":`form-builder-section-header`,className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,l.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[e.title&&(0,l.jsx)(`h2`,{className:`text-base font-semibold leading-none tracking-tight`,children:e.title}),e.description&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description})]}),e.actions&&(0,l.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:e.actions})]}),(0,l.jsx)(`div`,{"data-slot":`form-builder-fields`,"data-layout":o,className:t.cn(`grid`,u[s],o===`grid`?d[p]:`grid-cols-1`),children:e.fields.filter(e=>!e.hidden).map(e=>(0,l.jsx)(`div`,{"data-slot":`form-builder-field`,className:t.cn(e.colSpan&&f[e.colSpan],e.className,S),children:T(e,O)},e.id))})]},e.id)),(g||_||v)&&(0,l.jsx)(`div`,{"data-slot":`form-builder-footer`,className:t.cn(`flex flex-wrap items-center justify-end gap-2`,C),children:g??(0,l.jsxs)(l.Fragment,{children:[v&&(0,l.jsx)(n.Button,{type:`button`,variant:`outline`,disabled:m||b,onClick:y,children:v}),_&&(0,l.jsx)(n.Button,{type:`submit`,disabled:m||b,children:_})]})})]})}exports.FormBuilder=D,exports.asyncSelectField=_,exports.customField=C,exports.dateField=x,exports.dateRangeField=S,exports.formSection=w,exports.inputField=m,exports.numberField=y,exports.phoneField=b,exports.renderFormBuilderField=T,exports.selectField=g,exports.switchField=v,exports.textareaField=h;
|
|
@@ -123,7 +123,7 @@ function T(e) {
|
|
|
123
123
|
return e;
|
|
124
124
|
}
|
|
125
125
|
function E(e, t) {
|
|
126
|
-
let c = n, u =
|
|
126
|
+
let c = n, l = r, u = a, d = i, f = o;
|
|
127
127
|
switch (e.type) {
|
|
128
128
|
case "custom": return e.render(t);
|
|
129
129
|
case "input": return s.createElement(c, {
|
|
@@ -132,24 +132,24 @@ function E(e, t) {
|
|
|
132
132
|
readOnly: t.readOnly,
|
|
133
133
|
...e.props
|
|
134
134
|
});
|
|
135
|
-
case "textarea": return
|
|
135
|
+
case "textarea": return s.createElement(u, {
|
|
136
136
|
control: t.control,
|
|
137
137
|
disabled: t.disabled,
|
|
138
138
|
readOnly: t.readOnly,
|
|
139
139
|
...e.props
|
|
140
140
|
});
|
|
141
|
-
case "select": return s.createElement(
|
|
141
|
+
case "select": return s.createElement(l, {
|
|
142
142
|
control: t.control,
|
|
143
143
|
disabled: t.disabled,
|
|
144
144
|
...e.props
|
|
145
145
|
});
|
|
146
|
-
case "async-select": return s.createElement(
|
|
146
|
+
case "async-select": return s.createElement(l, {
|
|
147
147
|
control: t.control,
|
|
148
148
|
disabled: t.disabled,
|
|
149
149
|
kind: "async",
|
|
150
150
|
...e.props
|
|
151
151
|
});
|
|
152
|
-
case "switch": return
|
|
152
|
+
case "switch": return s.createElement(d, {
|
|
153
153
|
control: t.control,
|
|
154
154
|
disabled: t.disabled,
|
|
155
155
|
...e.props
|
|
@@ -175,7 +175,7 @@ function E(e, t) {
|
|
|
175
175
|
kind: "date",
|
|
176
176
|
...e.props
|
|
177
177
|
});
|
|
178
|
-
case "date-range": return
|
|
178
|
+
case "date-range": return s.createElement(f, {
|
|
179
179
|
control: t.control,
|
|
180
180
|
fromInputProps: {
|
|
181
181
|
disabled: t.disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../display/description-list.cjs"),i=require("../layout/page-header.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s={compact:`gap-3`,default:`gap-4`,comfortable:`gap-6`};function c({className:e,title:a,description:c,eyebrow:l,actions:u,breadcrumbs:d,status:f,summary:p,meta:m,sections:h,children:g,aside:_,footer:v,backLabel:y=`Back`,onBack:b,headerProps:x,density:S=`default`,pageHeaderClassName:C,contentClassName:w,asideClassName:T,sectionClassName:E,...D}){let O=h?.filter(e=>!e.hidden)??[],k=!!(a||c||l||u||b),A=b||u?(0,o.jsxs)(o.Fragment,{children:[b&&(0,o.jsx)(n.Button,{type:`button`,variant:`outline`,onClick:b,children:y}),u]}):void 0,j=!!(g||O.length>0);return(0,o.jsxs)(`div`,{"data-slot":`resource-detail-page`,"data-density":S,className:t.cn(`grid min-w-0`,s[S],e),...D,children:[d&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-breadcrumbs`,children:d}),k&&(0,o.jsx)(i.PageHeader,{"data-slot":`resource-detail-page-header`,eyebrow:l,title:a,description:c,actions:A,className:C,...x}),(f||p||m)&&(0,o.jsxs)(`div`,{"data-slot":`resource-detail-page-summary`,className:`grid gap-3 lg:grid-cols-[minmax(0,1fr)_auto]`,children:[(0,o.jsxs)(`div`,{className:`grid min-w-0 gap-3`,children:[f&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-status`,children:f}),p&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-summary-content`,children:p})]}),m&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-meta`,className:`min-w-0 lg:w-80`,children:m})]}),(j||_)&&(0,o.jsxs)(`div`,{"data-slot":`resource-detail-page-content`,className:t.cn(`grid min-w-0 gap-4
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../display/description-list.cjs"),i=require("../layout/page-header.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s={compact:`gap-3`,default:`gap-4`,comfortable:`gap-6`};function c({className:e,title:a,description:c,eyebrow:l,actions:u,breadcrumbs:d,status:f,summary:p,meta:m,sections:h,children:g,aside:_,footer:v,backLabel:y=`Back`,onBack:b,headerProps:x,density:S=`default`,pageHeaderClassName:C,contentClassName:w,asideClassName:T,sectionClassName:E,...D}){let O=h?.filter(e=>!e.hidden)??[],k=!!(a||c||l||u||b),A=b||u?(0,o.jsxs)(o.Fragment,{children:[b&&(0,o.jsx)(n.Button,{type:`button`,variant:`outline`,onClick:b,children:y}),u]}):void 0,j=!!(g||O.length>0);return(0,o.jsxs)(`div`,{"data-slot":`resource-detail-page`,"data-density":S,className:t.cn(`grid min-w-0`,s[S],e),...D,children:[d&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-breadcrumbs`,children:d}),k&&(0,o.jsx)(i.PageHeader,{"data-slot":`resource-detail-page-header`,eyebrow:l,title:a,description:c,actions:A,className:C,...x}),(f||p||m)&&(0,o.jsxs)(`div`,{"data-slot":`resource-detail-page-summary`,className:`grid gap-3 lg:grid-cols-[minmax(0,1fr)_auto]`,children:[(0,o.jsxs)(`div`,{className:`grid min-w-0 gap-3`,children:[f&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-status`,children:f}),p&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-summary-content`,children:p})]}),m&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-meta`,className:`min-w-0 lg:w-80`,children:m})]}),(j||_)&&(0,o.jsxs)(`div`,{"data-slot":`resource-detail-page-content`,className:t.cn(`grid min-w-0 gap-4`,_&&`xl:grid-cols-[minmax(0,1fr)_20rem]`,w),children:[(0,o.jsxs)(`div`,{"data-slot":`resource-detail-page-main`,className:`grid min-w-0 gap-4`,children:[g,O.map(e=>(0,o.jsxs)(`section`,{"data-slot":`resource-detail-page-section`,className:t.cn(`rounded-xl border bg-card text-card-foreground shadow-sm`,e.className,E),children:[(e.title||e.description||e.actions)&&(0,o.jsxs)(`div`,{className:`flex flex-col gap-3 border-b p-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,o.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[e.title&&(0,o.jsx)(`h2`,{className:`text-base font-semibold leading-none tracking-tight`,children:e.title}),e.description&&(0,o.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description})]}),e.actions&&(0,o.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:e.actions})]}),(0,o.jsx)(`div`,{className:t.cn(`p-4`,e.bodyClassName),children:e.children??(e.items?(0,o.jsx)(r.DescriptionList,{items:e.items}):null)})]},e.id))]}),_&&(0,o.jsx)(`aside`,{"data-slot":`resource-detail-page-aside`,className:t.cn(`min-w-0`,T),children:_})]}),v&&(0,o.jsx)(`div`,{"data-slot":`resource-detail-page-footer`,children:v})]})}exports.ResourceDetailPage=c;
|
|
@@ -56,7 +56,7 @@ function c({ className: c, title: l, description: u, eyebrow: d, actions: f, bre
|
|
|
56
56
|
}),
|
|
57
57
|
(N || y) && /* @__PURE__ */ o("div", {
|
|
58
58
|
"data-slot": "resource-detail-page-content",
|
|
59
|
-
className: e("grid min-w-0 gap-4 xl:grid-cols-[minmax(0,1fr)_20rem]", E),
|
|
59
|
+
className: e("grid min-w-0 gap-4", y && "xl:grid-cols-[minmax(0,1fr)_20rem]", E),
|
|
60
60
|
children: [/* @__PURE__ */ o("div", {
|
|
61
61
|
"data-slot": "resource-detail-page-main",
|
|
62
62
|
className: "grid min-w-0 gap-4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../data-table/data-table.cjs"),r=require("../layout/page-header.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");function o({className:e,title:n,description:r,actions:i,headerClassName:o,bodyClassName:s,children:c,...l}){return(0,a.jsxs)(`section`,{"data-slot":`resource-page-section`,className:t.cn(`rounded-xl border bg-card text-card-foreground shadow-sm`,e),...l,children:[(n||r||i)&&(0,a.jsxs)(`div`,{"data-slot":`resource-page-section-header`,className:t.cn(`flex flex-col gap-3 border-b p-4 sm:flex-row sm:items-start sm:justify-between`,o),children:[(0,a.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[n&&(0,a.jsx)(`h2`,{className:`text-base font-semibold leading-none tracking-tight`,children:n}),r&&(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r})]}),i&&(0,a.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:i})]}),(0,a.jsx)(`div`,{"data-slot":`resource-page-section-body`,className:t.cn(`p-4`,s),children:c})]})}var s={compact:`gap-3`,default:`gap-4`,comfortable:`gap-6`};function c({className:e,title:i,description:o,eyebrow:c,actions:l,breadcrumbs:u,stats:d,filters:f,tabs:p,table:m,children:h,aside:g,footer:_,headerProps:v,density:y=`default`,pageHeaderClassName:b,toolbarClassName:x,contentClassName:S,asideClassName:C,...w}){let T=!!(i||o||c||l),E=!!(f||p),D=!!(h||m);return(0,a.jsxs)(`div`,{"data-slot":`resource-page`,"data-density":y,className:t.cn(`grid min-w-0`,s[y],e),...w,children:[u&&(0,a.jsx)(`div`,{"data-slot":`resource-page-breadcrumbs`,children:u}),T&&(0,a.jsx)(r.PageHeader,{"data-slot":`resource-page-header`,eyebrow:c,title:i,description:o,actions:l,className:b,...v}),d&&(0,a.jsx)(`div`,{"data-slot":`resource-page-stats`,children:d}),E&&(0,a.jsxs)(`div`,{"data-slot":`resource-page-toolbar`,className:t.cn(`grid gap-3`,x),children:[p&&(0,a.jsx)(`div`,{"data-slot":`resource-page-tabs`,children:p}),f&&(0,a.jsx)(`div`,{"data-slot":`resource-page-filters`,children:f})]}),(D||g)&&(0,a.jsxs)(`div`,{"data-slot":`resource-page-content`,className:t.cn(`grid min-w-0 gap-4
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../data-table/data-table.cjs"),r=require("../layout/page-header.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");function o({className:e,title:n,description:r,actions:i,headerClassName:o,bodyClassName:s,children:c,...l}){return(0,a.jsxs)(`section`,{"data-slot":`resource-page-section`,className:t.cn(`rounded-xl border bg-card text-card-foreground shadow-sm`,e),...l,children:[(n||r||i)&&(0,a.jsxs)(`div`,{"data-slot":`resource-page-section-header`,className:t.cn(`flex flex-col gap-3 border-b p-4 sm:flex-row sm:items-start sm:justify-between`,o),children:[(0,a.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[n&&(0,a.jsx)(`h2`,{className:`text-base font-semibold leading-none tracking-tight`,children:n}),r&&(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r})]}),i&&(0,a.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:i})]}),(0,a.jsx)(`div`,{"data-slot":`resource-page-section-body`,className:t.cn(`p-4`,s),children:c})]})}var s={compact:`gap-3`,default:`gap-4`,comfortable:`gap-6`};function c({className:e,title:i,description:o,eyebrow:c,actions:l,breadcrumbs:u,stats:d,filters:f,tabs:p,table:m,children:h,aside:g,footer:_,headerProps:v,density:y=`default`,pageHeaderClassName:b,toolbarClassName:x,contentClassName:S,asideClassName:C,...w}){let T=!!(i||o||c||l),E=!!(f||p),D=!!(h||m);return(0,a.jsxs)(`div`,{"data-slot":`resource-page`,"data-density":y,className:t.cn(`grid min-w-0`,s[y],e),...w,children:[u&&(0,a.jsx)(`div`,{"data-slot":`resource-page-breadcrumbs`,children:u}),T&&(0,a.jsx)(r.PageHeader,{"data-slot":`resource-page-header`,eyebrow:c,title:i,description:o,actions:l,className:b,...v}),d&&(0,a.jsx)(`div`,{"data-slot":`resource-page-stats`,children:d}),E&&(0,a.jsxs)(`div`,{"data-slot":`resource-page-toolbar`,className:t.cn(`grid gap-3`,x),children:[p&&(0,a.jsx)(`div`,{"data-slot":`resource-page-tabs`,children:p}),f&&(0,a.jsx)(`div`,{"data-slot":`resource-page-filters`,children:f})]}),(D||g)&&(0,a.jsxs)(`div`,{"data-slot":`resource-page-content`,className:t.cn(`grid min-w-0 gap-4`,g&&`xl:grid-cols-[minmax(0,1fr)_20rem]`,S),children:[(0,a.jsxs)(`div`,{"data-slot":`resource-page-main`,className:`grid min-w-0 gap-4`,children:[h,m&&(0,a.jsx)(n.DataTable,{...m})]}),g&&(0,a.jsx)(`aside`,{"data-slot":`resource-page-aside`,className:t.cn(`min-w-0`,C),children:g})]}),_&&(0,a.jsx)(`div`,{"data-slot":`resource-page-footer`,children:_})]})}exports.ResourcePage=c,exports.ResourcePageSection=o;
|
|
@@ -75,7 +75,7 @@ function s({ className: a, title: s, description: c, eyebrow: l, actions: u, bre
|
|
|
75
75
|
}),
|
|
76
76
|
(O || _) && /* @__PURE__ */ i("div", {
|
|
77
77
|
"data-slot": "resource-page-content",
|
|
78
|
-
className: e("grid min-w-0 gap-4 xl:grid-cols-[minmax(0,1fr)_20rem]", C),
|
|
78
|
+
className: e("grid min-w-0 gap-4", _ && "xl:grid-cols-[minmax(0,1fr)_20rem]", C),
|
|
79
79
|
children: [/* @__PURE__ */ i("div", {
|
|
80
80
|
"data-slot": "resource-page-main",
|
|
81
81
|
className: "grid min-w-0 gap-4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("class-variance-authority"),i=require("react/jsx-runtime");var a=(0,r.cva)(`group/card flex min-w-0 flex-col gap-(--card-spacing) overflow-hidden py-(--card-spacing) [--card-spacing:--spacing(5)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0`,{variants:{variant:{default:``,elevated:``,outline:``,soft:``,ghost:``},size:{sm:``,default:``,lg:``},density:{compact:``,default:``,comfortable:``},tone:{neutral:``,info:``,success:``,warning:``,danger:``},interactive:{true:`cursor-pointer focus-visible:outline-none focus-visible:ring-0`,false:``},selected:{true:``,false:``},disabled:{true:`pointer-events-none`,false:``}},defaultVariants:{variant:`default`,size:`default`,density:`default`,tone:`neutral`,interactive:!1,selected:!1,disabled:!1}});function o(e){return e.eyebrow!=null||e.title!=null||e.description!=null||e.badge!=null||e.action!=null||e.media!=null||e.content!=null||e.footer!=null}function s({className:e,variant:n,size:r,density:s,tone:m,interactive:h,selected:g,disabled:_,orientation:v=`vertical`,mediaPosition:y=`start`,mediaAspect:b=`auto`,padding:x=`default`,tabIndex:S,eyebrow:C,title:w,description:T,badge:E,action:D,media:O,content:k,footer:A,mediaClassName:j,bodyClassName:M,headerClassName:N,eyebrowClassName:P,titleClassName:F,descriptionClassName:I,contentClassName:L,footerClassName:R,children:z,...B}){let V=o({eyebrow:C,title:w,description:T,badge:E,action:D,media:O,content:k,footer:A}),H=k??z,U=C!=null||w!=null||T!=null||E!=null||D!=null,W=A!=null,G=O?(0,i.jsx)(`div`,{"data-slot":`card-media`,"data-media-position":y,"data-media-aspect":b,className:t.cn(`overflow-hidden`,v===`horizontal`?`shrink-0 self-stretch`:``,b===`square`&&(v===`horizontal`?`w-40`:`aspect-square`),b===`video`&&(v===`horizontal`?`w-56`:`aspect-video`),b===`poster`&&(v===`horizontal`?`w-36`:`aspect-[3/4]`),b===`wide`&&(v===`horizontal`?`w-72`:`aspect-[16/7]`),j),children:O}):null,K={none:``,sm:`px-4`,default:`px-(--card-spacing)`,lg:`px-6`},q={none:``,sm:`pb-4`,default:``,lg:`pb-6`};return(0,i.jsx)(`div`,{"data-slot":`card`,"data-surface":V||void 0,"data-size":r??`default`,"data-variant":n??`default`,"data-tone":m??`neutral`,"data-density":s??`default`,"data-interactive":h||void 0,"data-selected":g||void 0,"data-disabled":_||void 0,"data-has-footer":W||void 0,"data-orientation":v,"data-padding":x,"aria-disabled":_||void 0,tabIndex:h&&!_?S??0:S,className:t.cn(a({variant:n,size:r,density:s,tone:m,interactive:h,selected:g,disabled:_}),v===`horizontal`&&`flex-row py-0`,e),...B,children:V?(0,i.jsxs)(i.Fragment,{children:[y===`start`?G:null,(0,i.jsxs)(`div`,{"data-slot":`card-body`,className:t.cn(`flex min-w-0 flex-1 flex-col`,v===`horizontal`?`py-(--card-spacing)`:``,q[x],M),children:[U?(0,i.jsxs)(c,{className:t.cn(K[x],N),children:[(0,i.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[C==null?null:(0,i.jsx)(`div`,{"data-slot":`card-eyebrow`,className:P,children:C}),w==null?null:(0,i.jsx)(l,{className:F,children:w}),T==null?null:(0,i.jsx)(u,{className:I,children:T})]}),E!=null||D!=null?(0,i.jsxs)(d,{className:`flex items-center gap-2`,children:[E,D]}):null]}):null,H==null?null:(0,i.jsx)(f,{className:t.cn(K[x],L),children:H}),W?(0,i.jsx)(p,{className:t.cn(K[x],R),children:A}):null]}),y===`end`?G:null]}):z})}function c({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-header`,className:t.cn(`group/card-header @container/card-header grid min-w-0 auto-rows-min items-start gap-1.5 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)`,e),...n})}function l({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-title`,className:t.cn(`min-w-0 max-w-full break-words leading-snug`,e),...n})}function u({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-description`,className:t.cn(`min-w-0 max-w-full break-words leading-snug text-muted-foreground`,e),...n})}function d({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-action`,className:t.cn(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...n})}function f({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-content`,className:t.cn(`px-(--card-spacing)`,e),...n})}function p({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-footer`,className:t.cn(`flex items-center p-(--card-spacing)`,e),...n})}exports.Card=s,exports.CardAction=d,exports.CardContent=f,exports.CardDescription=u,exports.CardFooter=p,exports.CardHeader=c,exports.CardTitle=l,exports.cardVariants=a;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("class-variance-authority"),i=require("react/jsx-runtime");var a=(0,r.cva)(`group/card flex min-w-0 flex-col gap-(--card-spacing) overflow-hidden py-(--card-spacing) [--card-spacing:--spacing(5)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0`,{variants:{variant:{default:``,elevated:``,outline:``,soft:``,ghost:``},size:{sm:``,default:``,lg:``},density:{compact:``,default:``,comfortable:``},tone:{neutral:``,info:``,success:``,warning:``,danger:``},interactive:{true:`cursor-pointer focus-visible:outline-none focus-visible:ring-0`,false:``},selected:{true:``,false:``},disabled:{true:`pointer-events-none`,false:``}},defaultVariants:{variant:`default`,size:`default`,density:`default`,tone:`neutral`,interactive:!1,selected:!1,disabled:!1}});function o(e){return e.eyebrow!=null||e.title!=null||e.description!=null||e.badge!=null||e.action!=null||e.media!=null||e.content!=null||e.footer!=null}function s({className:e,variant:n,size:r,density:s,tone:m,interactive:h,selected:g,disabled:_,orientation:v=`vertical`,mediaPosition:y=`start`,mediaAspect:b=`auto`,padding:x=`default`,tabIndex:S,eyebrow:C,title:w,description:T,badge:E,action:D,media:O,content:k,footer:A,mediaClassName:j,bodyClassName:M,headerClassName:N,eyebrowClassName:P,titleClassName:F,descriptionClassName:I,contentClassName:L,footerClassName:R,children:z,...B}){let V=o({eyebrow:C,title:w,description:T,badge:E,action:D,media:O,content:k,footer:A}),H=k??z,U=C!=null||w!=null||T!=null||E!=null||D!=null,W=A!=null,G=O?(0,i.jsx)(`div`,{"data-slot":`card-media`,"data-media-position":y,"data-media-aspect":b,className:t.cn(`overflow-hidden`,v===`horizontal`?`shrink-0 self-stretch`:``,b===`square`&&(v===`horizontal`?`w-40`:`aspect-square`),b===`video`&&(v===`horizontal`?`w-56`:`aspect-video`),b===`poster`&&(v===`horizontal`?`w-36`:`aspect-[3/4]`),b===`wide`&&(v===`horizontal`?`w-72`:`aspect-[16/7]`),j),children:O}):null,K={none:``,sm:`px-4`,default:`px-(--card-spacing)`,lg:`px-6`},q={none:``,sm:`pb-4`,default:``,lg:`pb-6`};return(0,i.jsx)(`div`,{"data-slot":`card`,"data-card":``,"data-surface":V||void 0,"data-size":r??`default`,"data-variant":n??`default`,"data-tone":m??`neutral`,"data-density":s??`default`,"data-interactive":h||void 0,"data-selected":g||void 0,"data-disabled":_||void 0,"data-has-footer":W||void 0,"data-orientation":v,"data-padding":x,"aria-disabled":_||void 0,tabIndex:h&&!_?S??0:S,className:t.cn(a({variant:n,size:r,density:s,tone:m,interactive:h,selected:g,disabled:_}),v===`horizontal`&&`flex-row py-0`,e),...B,children:V?(0,i.jsxs)(i.Fragment,{children:[y===`start`?G:null,(0,i.jsxs)(`div`,{"data-slot":`card-body`,className:t.cn(`flex min-w-0 flex-1 flex-col`,v===`horizontal`?`py-(--card-spacing)`:``,q[x],M),children:[U?(0,i.jsxs)(c,{className:t.cn(K[x],N),children:[(0,i.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[C==null?null:(0,i.jsx)(`div`,{"data-slot":`card-eyebrow`,className:P,children:C}),w==null?null:(0,i.jsx)(l,{className:F,children:w}),T==null?null:(0,i.jsx)(u,{className:I,children:T})]}),E!=null||D!=null?(0,i.jsxs)(d,{className:`flex items-center gap-2`,children:[E,D]}):null]}):null,H==null?null:(0,i.jsx)(f,{className:t.cn(K[x],L),children:H}),W?(0,i.jsx)(p,{className:t.cn(K[x],R),children:A}):null]}),y===`end`?G:null]}):z})}function c({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-header`,className:t.cn(`group/card-header @container/card-header grid min-w-0 auto-rows-min items-start gap-1.5 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)`,e),...n})}function l({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-title`,className:t.cn(`min-w-0 max-w-full break-words leading-snug`,e),...n})}function u({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-description`,className:t.cn(`min-w-0 max-w-full break-words leading-snug text-muted-foreground`,e),...n})}function d({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-action`,className:t.cn(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...n})}function f({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-content`,className:t.cn(`px-(--card-spacing)`,e),...n})}function p({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`card-footer`,className:t.cn(`flex items-center p-(--card-spacing)`,e),...n})}exports.Card=s,exports.CardAction=d,exports.CardContent=f,exports.CardDescription=u,exports.CardFooter=p,exports.CardHeader=c,exports.CardTitle=l,exports.cardVariants=a;
|
|
@@ -84,6 +84,7 @@ function s({ className: t, variant: s, size: m, density: h, tone: g, interactive
|
|
|
84
84
|
};
|
|
85
85
|
return /* @__PURE__ */ r("div", {
|
|
86
86
|
"data-slot": "card",
|
|
87
|
+
"data-card": "",
|
|
87
88
|
"data-surface": U || void 0,
|
|
88
89
|
"data-size": m ?? "default",
|
|
89
90
|
"data-variant": s ?? "default",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`3.1.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`3.1.16`,t=`July 15, 2026`,n=e;exports.PACKAGE_DEPENDENCY_RANGE=n,exports.PACKAGE_LATEST_RELEASE_DATE=t,exports.PACKAGE_LATEST_VERSION=e;
|