tembro 3.1.15 → 3.1.17
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 +18 -0
- package/dist/components/calendar/date-picker.d.ts +2 -1
- package/dist/components/display/statistic.d.ts +4 -2
- package/dist/components/modern/calendar-scheduler.d.ts +24 -1
- package/dist/components/modern/resizable-panel.d.ts +1 -1
- package/dist/components/patterns/form-builder.d.ts +9 -4
- package/dist/components/ui/button/index.d.ts +2 -1
- package/dist/showcase/package-meta.d.ts +2 -2
- package/dist/src/components/calendar/date-picker.cjs +1 -1
- package/dist/src/components/calendar/date-picker.js +24 -22
- package/dist/src/components/display/statistic.cjs +1 -1
- package/dist/src/components/display/statistic.js +27 -23
- 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/calendar-scheduler.cjs +1 -1
- package/dist/src/components/modern/calendar-scheduler.js +125 -59
- package/dist/src/components/modern/resizable-panel.cjs +1 -1
- package/dist/src/components/modern/resizable-panel.js +4 -4
- 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/button/index.cjs +1 -1
- package/dist/src/components/ui/button/index.js +10 -9
- 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/premium/calendar-scheduler/mock.cjs +8 -4
- package/dist/src/showcase/premium/calendar-scheduler/mock.js +4 -4
- package/dist/src/showcase/premium/calendar-scheduler/showcase.cjs +1 -1
- package/dist/src/showcase/premium/calendar-scheduler/showcase.js +29 -5
- 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/calendar/date-picker.tsx +11 -7
- package/packages/cli/vendor/src/components/display/statistic.tsx +20 -15
- package/packages/cli/vendor/src/components/display/status-legend.tsx +4 -4
- package/packages/cli/vendor/src/components/modern/calendar-scheduler.tsx +108 -48
- package/packages/cli/vendor/src/components/modern/resizable-panel.tsx +1 -1
- 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/button/index.tsx +3 -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/premium/calendar-scheduler/mock.ts +10 -7
- package/packages/cli/vendor/src/showcase/premium/calendar-scheduler/showcase.tsx +7 -5
- 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
|
@@ -1,91 +1,157 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx as
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/modern/calendar-scheduler.tsx
|
|
5
|
-
var
|
|
5
|
+
var a = {
|
|
6
6
|
default: "border-border bg-muted",
|
|
7
7
|
success: "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950 dark:text-emerald-300",
|
|
8
8
|
warning: "border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-300",
|
|
9
9
|
danger: "border-red-200 bg-red-50 text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-300"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
|
|
11
|
+
function o({ events: o, days: s, view: c = "week", variant: l = "board", density: u = "default", title: d, description: f, actions: p, empty: m = "No events scheduled.", selectedEventId: h, defaultSelectedEventId: g, onSelectedEventChange: _, onCreateEvent: v, onEventClick: y, renderEvent: b, createLabel: x = "Create event", showCount: S = !0, dayClassName: C, eventClassName: w, formatDay: T, className: E, ...D }) {
|
|
12
|
+
let [O, k] = t.useState(g), A = h ?? O, j = o.filter((e) => !e.hidden), M = s ?? Array.from(new Set(j.map((e) => e.date))), N = (e) => {
|
|
13
|
+
e.disabled || (h === void 0 && k(e.id), _?.(e.id, e), y?.(e));
|
|
14
|
+
};
|
|
15
|
+
return M.length === 0 ? /* @__PURE__ */ r("div", {
|
|
14
16
|
"data-slot": "calendar-scheduler",
|
|
15
|
-
"data-view":
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
"data-view": c,
|
|
18
|
+
"data-variant": l,
|
|
19
|
+
"data-density": u,
|
|
20
|
+
className: e("rounded-[var(--aui-card-radius,var(--radius-xl))] border border-[color:var(--aui-card-border,var(--border))] bg-card p-5 text-sm text-muted-foreground shadow-[var(--aui-card-shadow,var(--aui-control-shadow,none))]", E),
|
|
21
|
+
...D,
|
|
22
|
+
children: /* @__PURE__ */ r("div", {
|
|
19
23
|
className: "flex min-h-32 items-center justify-center rounded-[var(--radius-lg)] border border-dashed border-[color:var(--aui-card-border,var(--border))] bg-muted/20 px-4 py-6 text-center",
|
|
20
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ i("div", {
|
|
21
25
|
className: "space-y-1.5",
|
|
22
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ r("p", {
|
|
23
27
|
"data-empty": "true",
|
|
24
28
|
className: "text-sm font-medium text-foreground",
|
|
25
|
-
children:
|
|
26
|
-
}),
|
|
29
|
+
children: m
|
|
30
|
+
}), v ? /* @__PURE__ */ r("button", {
|
|
27
31
|
type: "button",
|
|
28
32
|
className: "rounded-md border border-dashed px-3 py-2 text-sm text-muted-foreground hover:bg-muted/50",
|
|
29
|
-
onClick: () =>
|
|
30
|
-
children:
|
|
33
|
+
onClick: () => v("today"),
|
|
34
|
+
children: x
|
|
31
35
|
}) : null]
|
|
32
36
|
})
|
|
33
37
|
})
|
|
34
|
-
}) : /* @__PURE__ */
|
|
38
|
+
}) : /* @__PURE__ */ i("div", {
|
|
35
39
|
"data-slot": "calendar-scheduler",
|
|
36
|
-
"data-view":
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
"data-view": c,
|
|
41
|
+
"data-variant": l,
|
|
42
|
+
"data-density": u,
|
|
43
|
+
className: e("grid", u === "compact" ? "gap-2" : u === "comfortable" ? "gap-5" : "gap-3", c === "month" && l === "board" && "md:grid-cols-2 xl:grid-cols-3", l === "agenda" && "rounded-[var(--aui-card-radius,var(--radius-xl))] border border-[color:var(--aui-card-border,var(--border))] bg-card p-4 shadow-[var(--aui-card-shadow,var(--aui-control-shadow,none))]", E),
|
|
44
|
+
...D,
|
|
45
|
+
children: [d || f || p ? /* @__PURE__ */ i("div", {
|
|
46
|
+
"data-slot": "calendar-scheduler-header",
|
|
47
|
+
className: "flex flex-wrap items-start justify-between gap-3",
|
|
48
|
+
children: [/* @__PURE__ */ i("div", {
|
|
49
|
+
className: "min-w-[min(100%,16rem)] flex-1 space-y-1",
|
|
50
|
+
children: [d ? /* @__PURE__ */ r("h2", {
|
|
51
|
+
className: "text-base font-semibold text-foreground",
|
|
52
|
+
children: d
|
|
53
|
+
}) : null, f ? /* @__PURE__ */ r("p", {
|
|
54
|
+
className: "text-sm text-muted-foreground",
|
|
55
|
+
children: f
|
|
56
|
+
}) : null]
|
|
57
|
+
}), p ? /* @__PURE__ */ r("div", {
|
|
58
|
+
className: "flex shrink-0 flex-wrap items-center gap-2",
|
|
59
|
+
children: p
|
|
60
|
+
}) : null]
|
|
61
|
+
}) : null, M.map((t) => {
|
|
62
|
+
let o = j.filter((e) => e.date === t);
|
|
63
|
+
return /* @__PURE__ */ i("section", {
|
|
64
|
+
"data-slot": "calendar-scheduler-day",
|
|
65
|
+
className: e(l === "board" && "rounded-[var(--aui-card-radius,var(--radius-xl))] border border-[color:var(--aui-card-border,var(--border))] bg-card p-4 shadow-[var(--aui-card-shadow,var(--aui-control-shadow,none))]", C),
|
|
43
66
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ i("div", {
|
|
45
68
|
className: "mb-3 flex items-center justify-between gap-3",
|
|
46
|
-
children: [/* @__PURE__ */
|
|
69
|
+
children: [/* @__PURE__ */ r("div", {
|
|
47
70
|
className: "text-sm font-semibold text-foreground",
|
|
48
|
-
children:
|
|
49
|
-
}), /* @__PURE__ */
|
|
71
|
+
children: T?.(t) ?? t
|
|
72
|
+
}), S ? /* @__PURE__ */ i("div", {
|
|
50
73
|
className: "text-xs text-muted-foreground",
|
|
51
74
|
children: [o.length, " items"]
|
|
52
|
-
})]
|
|
75
|
+
}) : null]
|
|
53
76
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
className: "grid gap-2",
|
|
56
|
-
children: o.length === 0 ? /* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ r("div", {
|
|
78
|
+
className: e("grid", u === "compact" ? "gap-1.5" : "gap-2"),
|
|
79
|
+
children: o.length === 0 ? /* @__PURE__ */ r("div", {
|
|
57
80
|
className: "rounded-[var(--radius-md)] border border-dashed border-[color:var(--aui-card-border,var(--border))] px-3 py-4 text-sm text-muted-foreground",
|
|
58
|
-
children:
|
|
59
|
-
}) : o.map((
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
children: m
|
|
82
|
+
}) : o.map((t) => {
|
|
83
|
+
let o = A === t.id;
|
|
84
|
+
return /* @__PURE__ */ r("button", {
|
|
85
|
+
type: "button",
|
|
86
|
+
disabled: t.disabled,
|
|
87
|
+
"data-slot": "calendar-scheduler-event",
|
|
88
|
+
"data-selected": o || void 0,
|
|
89
|
+
className: e("border text-left text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50", l === "board" ? "rounded-[var(--radius-md)] px-3 py-2.5 shadow-sm" : "grid w-full grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-3 rounded-[var(--radius-md)] bg-background px-3 py-3 hover:bg-muted/35 data-[selected=true]:border-primary/40 data-[selected=true]:bg-primary/5", l === "board" && a[t.tone ?? "default"], w, t.className),
|
|
90
|
+
onClick: () => N(t),
|
|
91
|
+
children: b ? b(t, { selected: o }) : l === "agenda" ? /* @__PURE__ */ i(n, { children: [
|
|
92
|
+
/* @__PURE__ */ i("span", {
|
|
93
|
+
className: "inline-flex min-w-14 items-center gap-1.5 font-medium",
|
|
94
|
+
children: [t.icon, t.time ?? "—"]
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ i("span", {
|
|
97
|
+
className: "min-w-0",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ r("span", {
|
|
100
|
+
className: "block truncate font-medium text-foreground",
|
|
101
|
+
children: t.title
|
|
102
|
+
}),
|
|
103
|
+
t.description ? /* @__PURE__ */ r("span", {
|
|
104
|
+
className: "mt-0.5 block text-xs text-muted-foreground",
|
|
105
|
+
children: t.description
|
|
106
|
+
}) : null,
|
|
107
|
+
t.meta ? /* @__PURE__ */ r("span", {
|
|
108
|
+
className: "mt-1 block text-xs text-muted-foreground",
|
|
109
|
+
children: t.meta
|
|
110
|
+
}) : null
|
|
111
|
+
]
|
|
112
|
+
}),
|
|
113
|
+
t.badge ? /* @__PURE__ */ r("span", {
|
|
114
|
+
className: "shrink-0",
|
|
115
|
+
children: t.badge
|
|
116
|
+
}) : t.durationMinutes ? /* @__PURE__ */ i("span", {
|
|
117
|
+
className: "shrink-0 text-xs opacity-70",
|
|
118
|
+
children: [t.durationMinutes, " min"]
|
|
119
|
+
}) : null
|
|
120
|
+
] }) : /* @__PURE__ */ i(n, { children: [
|
|
121
|
+
/* @__PURE__ */ r("div", {
|
|
122
|
+
className: "font-medium",
|
|
123
|
+
children: t.title
|
|
124
|
+
}),
|
|
125
|
+
t.description ? /* @__PURE__ */ r("div", {
|
|
126
|
+
className: "mt-1 text-xs opacity-80",
|
|
127
|
+
children: t.description
|
|
128
|
+
}) : null,
|
|
129
|
+
t.time ? /* @__PURE__ */ r("div", {
|
|
130
|
+
className: "mt-1 text-xs opacity-70",
|
|
131
|
+
children: t.time
|
|
132
|
+
}) : null,
|
|
133
|
+
t.durationMinutes ? /* @__PURE__ */ i("div", {
|
|
134
|
+
className: "mt-1 text-xs opacity-70",
|
|
135
|
+
children: [t.durationMinutes, " min"]
|
|
136
|
+
}) : null,
|
|
137
|
+
t.meta ? /* @__PURE__ */ r("div", {
|
|
138
|
+
className: "mt-1 text-xs opacity-70",
|
|
139
|
+
children: t.meta
|
|
140
|
+
}) : null
|
|
141
|
+
] })
|
|
142
|
+
}, t.id);
|
|
143
|
+
})
|
|
78
144
|
}),
|
|
79
|
-
|
|
145
|
+
v ? /* @__PURE__ */ r("button", {
|
|
80
146
|
type: "button",
|
|
81
147
|
className: "mt-3 w-full rounded-md border border-dashed px-3 py-2 text-sm text-muted-foreground hover:bg-muted/50",
|
|
82
|
-
onClick: () =>
|
|
83
|
-
children:
|
|
84
|
-
})
|
|
148
|
+
onClick: () => v(t),
|
|
149
|
+
children: x
|
|
150
|
+
}) : null
|
|
85
151
|
]
|
|
86
|
-
},
|
|
87
|
-
})
|
|
152
|
+
}, t);
|
|
153
|
+
})]
|
|
88
154
|
});
|
|
89
155
|
}
|
|
90
156
|
//#endregion
|
|
91
|
-
export {
|
|
157
|
+
export { o as CalendarScheduler };
|
|
@@ -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");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("@base-ui/react/button"),i=require("class-variance-authority"),a=require("react/jsx-runtime");var o=(0,i.cva)(`group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap outline-none select-none disabled:pointer-events-none disabled:cursor-not-allowed aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:``,outline:``,secondary:``,ghost:``,destructive:``,warning:``,link:``},size:{default:``,xs:``,sm:``,md:``,lg:``,xl:``,icon:``,"icon-xs":``,"icon-sm":``,"icon-lg":``}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:n=`default`,size:i=`default`,disabled:s,loading:c=!1,loadingLabel:l=`Loading`,leftIcon:u,rightIcon:d,iconOnly:f=!1,fullWidth:p=!1,pressed:m=!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("@base-ui/react/button"),i=require("class-variance-authority"),a=require("react/jsx-runtime");var o=(0,i.cva)(`group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap outline-none select-none disabled:pointer-events-none disabled:cursor-not-allowed aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:``,outline:``,secondary:``,ghost:``,destructive:``,warning:``,link:``},size:{default:``,xs:``,sm:``,md:``,lg:``,xl:``,icon:``,"icon-xs":``,"icon-sm":``,"icon-lg":``}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:n=`default`,size:i=`default`,disabled:s,loading:c=!1,loadingLabel:l=`Loading`,leftIcon:u,rightIcon:d,iconOnly:f=!1,fullWidth:p=!1,pressed:m=!1,labelClassName:h,children:g,"aria-label":_,...v}){let y=s||c,b=f&&(i==="default"||i===`md`)?`icon`:i;return(0,a.jsxs)(r.Button,{"data-slot":`button`,"data-variant":n??`default`,"data-size":b??`default`,"data-icon-only":f||void 0,"data-loading":c||void 0,"data-pressed":m||void 0,disabled:y,"aria-busy":c||void 0,"aria-pressed":m||void 0,"aria-label":_,className:t.cn(o({variant:n,size:b,className:e}),p&&`w-full`,m&&``),...v,children:[c?(0,a.jsx)(`span`,{"data-slot":`button-spinner`,"aria-hidden":`true`}):u?(0,a.jsx)(`span`,{"data-icon":`inline-start`,"data-slot":`button-icon`,className:`inline-flex shrink-0 items-center justify-center`,children:u}):null,g?(0,a.jsx)(`span`,{"data-slot":`button-label`,className:t.cn(`inline-flex min-w-0 items-center gap-[inherit]`,h),children:c?l:g}):null,!c&&d?(0,a.jsx)(`span`,{"data-icon":`inline-end`,"data-slot":`button-icon`,className:`inline-flex shrink-0 items-center justify-center`,children:d}):null]})}exports.Button=s,exports.buttonVariants=o;
|
|
@@ -33,25 +33,25 @@ var a = n("group/button inline-flex shrink-0 items-center justify-center whitesp
|
|
|
33
33
|
size: "default"
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
function o({ className: n, variant: o = "default", size: s = "default", disabled: c, loading: l = !1, loadingLabel: u = "Loading", leftIcon: d, rightIcon: f, iconOnly: p = !1, fullWidth: m = !1, pressed: h = !1,
|
|
37
|
-
let
|
|
36
|
+
function o({ className: n, variant: o = "default", size: s = "default", disabled: c, loading: l = !1, loadingLabel: u = "Loading", leftIcon: d, rightIcon: f, iconOnly: p = !1, fullWidth: m = !1, pressed: h = !1, labelClassName: g, children: _, "aria-label": v, ...y }) {
|
|
37
|
+
let b = c || l, x = p && (s === "default" || s === "md") ? "icon" : s;
|
|
38
38
|
return /* @__PURE__ */ i(t, {
|
|
39
39
|
"data-slot": "button",
|
|
40
40
|
"data-variant": o ?? "default",
|
|
41
|
-
"data-size":
|
|
41
|
+
"data-size": x ?? "default",
|
|
42
42
|
"data-icon-only": p || void 0,
|
|
43
43
|
"data-loading": l || void 0,
|
|
44
44
|
"data-pressed": h || void 0,
|
|
45
|
-
disabled:
|
|
45
|
+
disabled: b,
|
|
46
46
|
"aria-busy": l || void 0,
|
|
47
47
|
"aria-pressed": h || void 0,
|
|
48
|
-
"aria-label":
|
|
48
|
+
"aria-label": v,
|
|
49
49
|
className: e(a({
|
|
50
50
|
variant: o,
|
|
51
|
-
size:
|
|
51
|
+
size: x,
|
|
52
52
|
className: n
|
|
53
53
|
}), m && "w-full", h && ""),
|
|
54
|
-
...
|
|
54
|
+
...y,
|
|
55
55
|
children: [
|
|
56
56
|
l ? /* @__PURE__ */ r("span", {
|
|
57
57
|
"data-slot": "button-spinner",
|
|
@@ -62,9 +62,10 @@ function o({ className: n, variant: o = "default", size: s = "default", disabled
|
|
|
62
62
|
className: "inline-flex shrink-0 items-center justify-center",
|
|
63
63
|
children: d
|
|
64
64
|
}) : null,
|
|
65
|
-
|
|
65
|
+
_ ? /* @__PURE__ */ r("span", {
|
|
66
66
|
"data-slot": "button-label",
|
|
67
|
-
|
|
67
|
+
className: e("inline-flex min-w-0 items-center gap-[inherit]", g),
|
|
68
|
+
children: l ? u : _
|
|
68
69
|
}) : null,
|
|
69
70
|
!l && f ? /* @__PURE__ */ r("span", {
|
|
70
71
|
"data-icon": "inline-end",
|
|
@@ -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.17`,t=`July 15, 2026`,n=e;exports.PACKAGE_DEPENDENCY_RANGE=n,exports.PACKAGE_LATEST_RELEASE_DATE=t,exports.PACKAGE_LATEST_VERSION=e;
|
|
@@ -3,11 +3,15 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={code:`
|
|
|
3
3
|
export function Example() {
|
|
4
4
|
return (
|
|
5
5
|
<CalendarScheduler
|
|
6
|
-
|
|
6
|
+
variant="agenda"
|
|
7
|
+
density="compact"
|
|
8
|
+
title="Delivery schedule"
|
|
9
|
+
defaultSelectedEventId="1"
|
|
10
|
+
days={["Mon, Jul 6"]}
|
|
7
11
|
events={[
|
|
8
|
-
{ id: "1", title: "Design review", date: "Mon, Jul 6", time: "10:00"
|
|
9
|
-
{ id: "2", title: "Release freeze", date: "
|
|
12
|
+
{ id: "1", title: "Design review", description: "API review", date: "Mon, Jul 6", time: "10:00" },
|
|
13
|
+
{ id: "2", title: "Release freeze", description: "Production gate", date: "Mon, Jul 6", time: "14:00" },
|
|
10
14
|
]}
|
|
11
15
|
/>
|
|
12
16
|
)
|
|
13
|
-
}`,cliCommand:`npx tembro add calendar-scheduler`,highlights:[`
|
|
17
|
+
}`,cliCommand:`npx tembro add calendar-scheduler`,highlights:[`Board and agenda variants with compact or comfortable density`,`Rich metadata, badges, hidden and disabled event states`,`Controlled or uncontrolled selection and custom event rendering`],scenarios:[{title:`Ops dashboard`,description:`Show day tasks by lane without heavy calendar widgets.`},{title:`Sprint board`,description:`Keep event density low and readable.`}]};exports.calendarSchedulerMock=e;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region src/showcase/premium/calendar-scheduler/mock.ts
|
|
2
2
|
var e = {
|
|
3
|
-
code: "import { CalendarScheduler } from \"tembro\"\n\nexport function Example() {\n return (\n <CalendarScheduler\n days={[\"Mon, Jul 6\"
|
|
3
|
+
code: "import { CalendarScheduler } from \"tembro\"\n\nexport function Example() {\n return (\n <CalendarScheduler\n variant=\"agenda\"\n density=\"compact\"\n title=\"Delivery schedule\"\n defaultSelectedEventId=\"1\"\n days={[\"Mon, Jul 6\"]}\n events={[\n { id: \"1\", title: \"Design review\", description: \"API review\", date: \"Mon, Jul 6\", time: \"10:00\" },\n { id: \"2\", title: \"Release freeze\", description: \"Production gate\", date: \"Mon, Jul 6\", time: \"14:00\" },\n ]}\n />\n )\n}",
|
|
4
4
|
cliCommand: "npx tembro add calendar-scheduler",
|
|
5
5
|
highlights: [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"Board and agenda variants with compact or comfortable density",
|
|
7
|
+
"Rich metadata, badges, hidden and disabled event states",
|
|
8
|
+
"Controlled or uncontrolled selection and custom event rendering"
|
|
9
9
|
],
|
|
10
10
|
scenarios: [{
|
|
11
11
|
title: "Ops dashboard",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/modern/calendar-scheduler.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i=[`Mon, Jul 6`,`Tue, Jul 7`,`Wed, Jul 8`];function a(){let[e,a]=n.useState(!0),o=n.useMemo(()=>[{id:`1`,title:`Design review`,date:`Mon, Jul 6`,time:`10:00`,tone:`warning`},{id:`2`,title:`Release freeze`,date:`Tue, Jul 7`,time:`14:00`,tone:`danger`},{id:`3`,title:`Daily standup`,date:`Wed, Jul 8`,time:`09:30`,tone:`default`},...e?[{id:`4`,title:`Priority follow-up`,date:`Mon, Jul 6`,time:`16:00`,tone:`warning`}]:[]],[e]);return(0,r.jsxs)(`div`,{className:`space-y-3`,children:[(0,r.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/modern/calendar-scheduler.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i=[`Mon, Jul 6`,`Tue, Jul 7`,`Wed, Jul 8`];function a(){let[e,a]=n.useState(!0),[o,s]=n.useState(`agenda`),c=n.useMemo(()=>[{id:`1`,title:`Design review`,description:`Component API and release readiness`,meta:`Product room`,badge:(0,r.jsx)(`span`,{className:`rounded bg-amber-100 px-2 py-0.5 text-xs text-amber-800`,children:`Review`}),date:`Mon, Jul 6`,time:`10:00`,tone:`warning`},{id:`2`,title:`Release freeze`,description:`Production deployment checkpoint`,meta:`Platform team`,badge:(0,r.jsx)(`span`,{className:`rounded bg-red-100 px-2 py-0.5 text-xs text-red-800`,children:`Required`}),date:`Tue, Jul 7`,time:`14:00`,tone:`danger`},{id:`3`,title:`Daily standup`,description:`Owners, blockers and delivery status`,date:`Wed, Jul 8`,time:`09:30`,tone:`default`},...e?[{id:`4`,title:`Priority follow-up`,description:`Customer escalation review`,date:`Mon, Jul 6`,time:`16:00`,tone:`warning`}]:[]],[e]);return(0,r.jsxs)(`div`,{className:`space-y-3`,children:[(0,r.jsxs)(`div`,{className:`flex gap-2`,children:[(0,r.jsxs)(`button`,{type:`button`,className:`inline-flex items-center rounded-md border px-3 py-1.5 text-sm`,onClick:()=>s(e=>e===`agenda`?`board`:`agenda`),children:[`Use `,o===`agenda`?`board`:`agenda`]}),(0,r.jsx)(`button`,{type:`button`,className:`inline-flex items-center rounded-md border px-3 py-1.5 text-sm`,onClick:()=>a(e=>!e),children:e?`Hide warning`:`Show warning`})]}),(0,r.jsx)(t.CalendarScheduler,{title:`Delivery schedule`,description:`Production agenda with rich event metadata and selection.`,variant:o,density:`compact`,days:i,events:c,defaultSelectedEventId:`1`})]})}exports.CalendarSchedulerShowcase=a;
|