tembro 3.1.16 → 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 +8 -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/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/modern/calendar-scheduler.cjs +1 -1
- package/dist/src/components/modern/calendar-scheduler.js +125 -59
- package/dist/src/components/ui/button/index.cjs +1 -1
- package/dist/src/components/ui/button/index.js +10 -9
- 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/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/modern/calendar-scheduler.tsx +108 -48
- package/packages/cli/vendor/src/components/ui/button/index.tsx +3 -1
- 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/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/registry.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 3.1.17 - 2026-07-16
|
|
6
|
+
|
|
7
|
+
- Added production-ready `agenda` and `board` variants, density controls, rich event metadata, selection state, hidden/disabled events, custom rendering, and formatted day labels to `CalendarScheduler`.
|
|
8
|
+
- Added a compact trigger variant to `DatePicker` for dense filters, headers, and scheduling toolbars.
|
|
9
|
+
- Added compact density to `StatisticCard` and configurable gaps to `StatisticGrid`.
|
|
10
|
+
- Added `labelClassName` and a stable inline-flex label layout to `Button`, fixing complex icon/value/action labels that previously stacked vertically.
|
|
11
|
+
- Updated the CalendarScheduler showcase and regression coverage for the expanded API.
|
|
12
|
+
|
|
5
13
|
## 3.1.16 - 2026-07-16
|
|
6
14
|
|
|
7
15
|
- Fixed composed Card surfaces so `StatisticCard`, `InfoCard`, `ActivityFeed`, and other Card-based components retain base border, background, radius, and variant styling.
|
|
@@ -9,9 +9,10 @@ export type DatePickerProps = Omit<CalendarProps, "mode" | "range" | "onRangeCha
|
|
|
9
9
|
labels?: DatePickerLabels;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
clearable?: boolean;
|
|
12
|
+
triggerVariant?: "default" | "compact";
|
|
12
13
|
formatValue?: (value: string) => React.ReactNode;
|
|
13
14
|
triggerClassName?: string;
|
|
14
15
|
contentClassName?: string;
|
|
15
16
|
};
|
|
16
|
-
declare function DatePicker({ value, onValueChange, placeholder, labels, disabled, clearable, formatValue, triggerClassName, contentClassName, className, ...calendarProps }: DatePickerProps): React.JSX.Element;
|
|
17
|
+
declare function DatePicker({ value, onValueChange, placeholder, labels, disabled, clearable, triggerVariant, formatValue, triggerClassName, contentClassName, className, ...calendarProps }: DatePickerProps): React.JSX.Element;
|
|
17
18
|
export { DatePicker };
|
|
@@ -14,10 +14,12 @@ export type StatisticProps = React.ComponentProps<"div"> & {
|
|
|
14
14
|
declare function Statistic({ label, value, prefix, suffix, description, trend, change, loading, className, ...props }: StatisticProps): React.JSX.Element;
|
|
15
15
|
export type StatisticCardProps = React.ComponentProps<typeof Card> & StatisticProps & {
|
|
16
16
|
action?: React.ReactNode;
|
|
17
|
+
density?: "compact" | "default";
|
|
17
18
|
};
|
|
18
|
-
declare function StatisticCard({ action, label, value, prefix, suffix, description, trend, change, loading, className, ...props }: StatisticCardProps): React.JSX.Element;
|
|
19
|
+
declare function StatisticCard({ action, density, label, value, prefix, suffix, description, trend, change, loading, className, ...props }: StatisticCardProps): React.JSX.Element;
|
|
19
20
|
export type StatisticGridProps = React.ComponentProps<"div"> & {
|
|
20
21
|
columns?: 1 | 2 | 3 | 4;
|
|
22
|
+
gap?: "sm" | "default" | "lg";
|
|
21
23
|
};
|
|
22
|
-
declare function StatisticGrid({ columns, className, ...props }: StatisticGridProps): React.JSX.Element;
|
|
24
|
+
declare function StatisticGrid({ columns, gap, className, ...props }: StatisticGridProps): React.JSX.Element;
|
|
23
25
|
export { Statistic, StatisticCard, StatisticGrid };
|
|
@@ -6,14 +6,37 @@ export type CalendarSchedulerEvent = {
|
|
|
6
6
|
time?: string;
|
|
7
7
|
tone?: "default" | "success" | "warning" | "danger";
|
|
8
8
|
durationMinutes?: number;
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
meta?: React.ReactNode;
|
|
11
|
+
badge?: React.ReactNode;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
hidden?: boolean;
|
|
15
|
+
className?: string;
|
|
9
16
|
};
|
|
10
17
|
export type CalendarSchedulerProps = React.ComponentProps<"div"> & {
|
|
11
18
|
events: CalendarSchedulerEvent[];
|
|
12
19
|
days?: string[];
|
|
13
20
|
view?: "day" | "week" | "month";
|
|
21
|
+
variant?: "board" | "agenda";
|
|
22
|
+
density?: "compact" | "default" | "comfortable";
|
|
23
|
+
title?: React.ReactNode;
|
|
24
|
+
description?: React.ReactNode;
|
|
25
|
+
actions?: React.ReactNode;
|
|
14
26
|
empty?: React.ReactNode;
|
|
27
|
+
selectedEventId?: string;
|
|
28
|
+
defaultSelectedEventId?: string;
|
|
29
|
+
onSelectedEventChange?: (eventId: string, event: CalendarSchedulerEvent) => void;
|
|
15
30
|
onCreateEvent?: (date: string) => void;
|
|
16
31
|
onEventClick?: (event: CalendarSchedulerEvent) => void;
|
|
32
|
+
renderEvent?: (event: CalendarSchedulerEvent, state: {
|
|
33
|
+
selected: boolean;
|
|
34
|
+
}) => React.ReactNode;
|
|
35
|
+
createLabel?: React.ReactNode;
|
|
36
|
+
showCount?: boolean;
|
|
37
|
+
dayClassName?: string;
|
|
38
|
+
eventClassName?: string;
|
|
39
|
+
formatDay?: (day: string) => React.ReactNode;
|
|
17
40
|
};
|
|
18
|
-
declare function CalendarScheduler({ events, days, view, empty, onCreateEvent, onEventClick, className, ...props }: CalendarSchedulerProps): React.JSX.Element;
|
|
41
|
+
declare function CalendarScheduler({ events, days, view, variant, density, title, description, actions, empty, selectedEventId, defaultSelectedEventId, onSelectedEventChange, onCreateEvent, onEventClick, renderEvent, createLabel, showCount, dayClassName, eventClassName, formatDay, className, ...props }: CalendarSchedulerProps): React.JSX.Element;
|
|
19
42
|
export { CalendarScheduler };
|
|
@@ -13,6 +13,7 @@ export type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVari
|
|
|
13
13
|
iconOnly?: boolean;
|
|
14
14
|
fullWidth?: boolean;
|
|
15
15
|
pressed?: boolean;
|
|
16
|
+
labelClassName?: string;
|
|
16
17
|
};
|
|
17
|
-
declare function Button({ className, variant, size, disabled, loading, loadingLabel, leftIcon, rightIcon, iconOnly, fullWidth, pressed, children, "aria-label": ariaLabel, ...props }: ButtonProps): React.JSX.Element;
|
|
18
|
+
declare function Button({ className, variant, size, disabled, loading, loadingLabel, leftIcon, rightIcon, iconOnly, fullWidth, pressed, labelClassName, children, "aria-label": ariaLabel, ...props }: ButtonProps): React.JSX.Element;
|
|
18
19
|
export { Button, buttonVariants };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const PACKAGE_LATEST_VERSION = "3.1.
|
|
1
|
+
export declare const PACKAGE_LATEST_VERSION = "3.1.17";
|
|
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.17";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";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"),i=require("./date-utils.cjs"),a=require("./calendar.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("lucide-react"),c=require("react/jsx-runtime");function l(e){let t=i.parseDateKey(e);return t?new Intl.DateTimeFormat(`en-US`,{dateStyle:`medium`}).format(t):e}function u({value:e,onValueChange:i,placeholder:u,labels:d,disabled:f=!1,clearable:p=!0,formatValue:
|
|
1
|
+
"use client";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"),i=require("./date-utils.cjs"),a=require("./calendar.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("lucide-react"),c=require("react/jsx-runtime");function l(e){let t=i.parseDateKey(e);return t?new Intl.DateTimeFormat(`en-US`,{dateStyle:`medium`}).format(t):e}function u({value:e,onValueChange:i,placeholder:u,labels:d,disabled:f=!1,clearable:p=!0,triggerVariant:m=`default`,formatValue:h=l,triggerClassName:g,contentClassName:_,className:v,...y}){let[b,x]=o.useState(!1),S=!!e,C=e=>{i?.(e),x(!1)},w=()=>{i?.(``),x(!1)};return(0,c.jsx)(`div`,{"data-slot":`date-picker`,"data-trigger-variant":m,className:t.cn(`w-full`,v),children:(0,c.jsxs)(r.Popover,{open:b,onOpenChange:x,children:[(0,c.jsxs)(r.PopoverTrigger,{render:(0,c.jsx)(n.Button,{type:`button`,variant:`outline`,disabled:f,labelClassName:`flex-1`,className:t.cn(`group w-full justify-start rounded-[var(--aui-control-radius,var(--radius-md))] border-border/80 bg-background/96 text-left font-normal shadow-[var(--aui-control-shadow,0_1px_2px_rgba(15,23,42,0.04))]`,m==="default"?`min-h-11 gap-3 px-3`:`min-h-9 gap-2 px-2.5`,!S&&`text-muted-foreground`,g)}),children:[(0,c.jsx)(s.CalendarIcon,{"data-icon":`inline-start`,className:t.cn(S&&`text-primary`)}),(0,c.jsxs)(`span`,{className:t.cn(`grid min-w-0 flex-1`,m==="default"&&`gap-0.5`),children:[m==="default"?(0,c.jsx)(`span`,{className:`text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground`,children:d?.selected??`Date`}):null,(0,c.jsx)(`span`,{className:t.cn(`truncate text-sm`,S&&`font-semibold text-foreground`),children:S?h(String(e)):u??d?.placeholder??`Select date`})]}),p&&S?(0,c.jsx)(`span`,{role:`button`,tabIndex:0,"aria-label":d?.clear??`Clear date`,className:t.cn(`ml-auto inline-flex shrink-0 items-center justify-center rounded-[var(--radius-sm)] text-muted-foreground opacity-80 transition hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring`,m==="default"?`size-7`:`size-6`),onClick:e=>{e.preventDefault(),e.stopPropagation(),w()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),w())},children:(0,c.jsx)(s.XIcon,{className:`size-3.5`})}):null]}),(0,c.jsx)(r.PopoverContent,{align:`start`,className:t.cn(`w-auto overflow-hidden rounded-[var(--aui-card-radius,var(--radius-lg))] border-border/70 bg-popover p-0 shadow-[var(--aui-control-panel-shadow,0_18px_40px_rgba(15,23,42,0.14))] backdrop-blur`,_),children:(0,c.jsx)(a.Calendar,{value:e,onValueChange:C,labels:d,showTodayShortcut:!0,showClearShortcut:p,showSelectionSummary:!0,...y})})]})})}exports.DatePicker=u;
|
|
@@ -12,65 +12,67 @@ function f(e) {
|
|
|
12
12
|
let t = a(e);
|
|
13
13
|
return t ? new Intl.DateTimeFormat("en-US", { dateStyle: "medium" }).format(t) : e;
|
|
14
14
|
}
|
|
15
|
-
function p({ value: a, onValueChange: p, placeholder: m, labels: h, disabled: g = !1, clearable: _ = !0,
|
|
16
|
-
let [
|
|
17
|
-
p?.(e),
|
|
18
|
-
},
|
|
19
|
-
p?.(""),
|
|
15
|
+
function p({ value: a, onValueChange: p, placeholder: m, labels: h, disabled: g = !1, clearable: _ = !0, triggerVariant: v = "default", formatValue: y = f, triggerClassName: b, contentClassName: x, className: S, ...C }) {
|
|
16
|
+
let [w, T] = s.useState(!1), E = !!a, D = (e) => {
|
|
17
|
+
p?.(e), T(!1);
|
|
18
|
+
}, O = () => {
|
|
19
|
+
p?.(""), T(!1);
|
|
20
20
|
};
|
|
21
21
|
return /* @__PURE__ */ u("div", {
|
|
22
22
|
"data-slot": "date-picker",
|
|
23
|
-
|
|
23
|
+
"data-trigger-variant": v,
|
|
24
|
+
className: e("w-full", S),
|
|
24
25
|
children: /* @__PURE__ */ d(n, {
|
|
25
|
-
open:
|
|
26
|
-
onOpenChange:
|
|
26
|
+
open: w,
|
|
27
|
+
onOpenChange: T,
|
|
27
28
|
children: [/* @__PURE__ */ d(i, {
|
|
28
29
|
render: /* @__PURE__ */ u(t, {
|
|
29
30
|
type: "button",
|
|
30
31
|
variant: "outline",
|
|
31
32
|
disabled: g,
|
|
32
|
-
|
|
33
|
+
labelClassName: "flex-1",
|
|
34
|
+
className: e("group w-full justify-start rounded-[var(--aui-control-radius,var(--radius-md))] border-border/80 bg-background/96 text-left font-normal shadow-[var(--aui-control-shadow,0_1px_2px_rgba(15,23,42,0.04))]", v === "default" ? "min-h-11 gap-3 px-3" : "min-h-9 gap-2 px-2.5", !E && "text-muted-foreground", b)
|
|
33
35
|
}),
|
|
34
36
|
children: [
|
|
35
37
|
/* @__PURE__ */ u(c, {
|
|
36
38
|
"data-icon": "inline-start",
|
|
37
|
-
className: e(
|
|
39
|
+
className: e(E && "text-primary")
|
|
38
40
|
}),
|
|
39
41
|
/* @__PURE__ */ d("span", {
|
|
40
|
-
className: "grid min-w-0 flex-1 gap-0.5",
|
|
41
|
-
children: [/* @__PURE__ */ u("span", {
|
|
42
|
+
className: e("grid min-w-0 flex-1", v === "default" && "gap-0.5"),
|
|
43
|
+
children: [v === "default" ? /* @__PURE__ */ u("span", {
|
|
42
44
|
className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",
|
|
43
45
|
children: h?.selected ?? "Date"
|
|
44
|
-
}), /* @__PURE__ */ u("span", {
|
|
45
|
-
className: e("truncate text-sm",
|
|
46
|
-
children:
|
|
46
|
+
}) : null, /* @__PURE__ */ u("span", {
|
|
47
|
+
className: e("truncate text-sm", E && "font-semibold text-foreground"),
|
|
48
|
+
children: E ? y(String(a)) : m ?? h?.placeholder ?? "Select date"
|
|
47
49
|
})]
|
|
48
50
|
}),
|
|
49
|
-
_ &&
|
|
51
|
+
_ && E ? /* @__PURE__ */ u("span", {
|
|
50
52
|
role: "button",
|
|
51
53
|
tabIndex: 0,
|
|
52
54
|
"aria-label": h?.clear ?? "Clear date",
|
|
53
|
-
className: "ml-auto inline-flex
|
|
55
|
+
className: e("ml-auto inline-flex shrink-0 items-center justify-center rounded-[var(--radius-sm)] text-muted-foreground opacity-80 transition hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring", v === "default" ? "size-7" : "size-6"),
|
|
54
56
|
onClick: (e) => {
|
|
55
|
-
e.preventDefault(), e.stopPropagation(),
|
|
57
|
+
e.preventDefault(), e.stopPropagation(), O();
|
|
56
58
|
},
|
|
57
59
|
onKeyDown: (e) => {
|
|
58
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
60
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), O());
|
|
59
61
|
},
|
|
60
62
|
children: /* @__PURE__ */ u(l, { className: "size-3.5" })
|
|
61
63
|
}) : null
|
|
62
64
|
]
|
|
63
65
|
}), /* @__PURE__ */ u(r, {
|
|
64
66
|
align: "start",
|
|
65
|
-
className: e("w-auto overflow-hidden rounded-[var(--aui-card-radius,var(--radius-lg))] border-border/70 bg-popover p-0 shadow-[var(--aui-control-panel-shadow,0_18px_40px_rgba(15,23,42,0.14))] backdrop-blur",
|
|
67
|
+
className: e("w-auto overflow-hidden rounded-[var(--aui-card-radius,var(--radius-lg))] border-border/70 bg-popover p-0 shadow-[var(--aui-control-panel-shadow,0_18px_40px_rgba(15,23,42,0.14))] backdrop-blur", x),
|
|
66
68
|
children: /* @__PURE__ */ u(o, {
|
|
67
69
|
value: a,
|
|
68
|
-
onValueChange:
|
|
70
|
+
onValueChange: D,
|
|
69
71
|
labels: h,
|
|
70
72
|
showTodayShortcut: !0,
|
|
71
73
|
showClearShortcut: _,
|
|
72
74
|
showSelectionSummary: !0,
|
|
73
|
-
...
|
|
75
|
+
...C
|
|
74
76
|
})
|
|
75
77
|
})]
|
|
76
78
|
})
|
|
@@ -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");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");function o({label:e,value:n,prefix:r,suffix:o,description:s,trend:c=`neutral`,change:l,loading:u=!1,className:d,...f}){let p=c===`up`?(0,a.jsx)(i.ArrowUpIcon,{className:`size-3`}):c===`down`?(0,a.jsx)(i.ArrowDownIcon,{className:`size-3`}):null;return(0,a.jsxs)(`div`,{"data-slot":`statistic`,"data-loading":u||void 0,"data-trend":c,"aria-busy":u||void 0,className:t.cn(`grid gap-1`,d),...f,children:[(0,a.jsx)(`div`,{"data-slot":`statistic-label`,className:`text-sm text-muted-foreground`,children:e}),(0,a.jsx)(`div`,{"data-slot":`statistic-value-row`,className:`flex flex-wrap items-baseline gap-1.5`,children:u?(0,a.jsx)(`div`,{"data-slot":`statistic-skeleton`,className:`h-8 w-28 animate-pulse rounded-md bg-muted`}):(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(`span`,{"data-slot":`statistic-prefix`,className:`text-base text-muted-foreground`,children:r}),(0,a.jsx)(`span`,{"data-slot":`statistic-value`,className:`text-2xl font-semibold tracking-tight`,children:n}),o&&(0,a.jsx)(`span`,{"data-slot":`statistic-suffix`,className:`text-sm text-muted-foreground`,children:o})]})}),(s||l)&&(0,a.jsxs)(`div`,{"data-slot":`statistic-meta`,className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[l&&(0,a.jsxs)(`span`,{"data-slot":`statistic-change`,"data-trend":c,className:t.cn(`inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 font-medium`,c===`up`&&`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`,c===`down`&&`bg-destructive/10 text-destructive`,c===`neutral`&&`bg-muted text-muted-foreground`),children:[p,l]}),s&&(0,a.jsx)(`span`,{"data-slot":`statistic-description`,children:s})]})]})}function s({action:e,label:
|
|
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");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");function o({label:e,value:n,prefix:r,suffix:o,description:s,trend:c=`neutral`,change:l,loading:u=!1,className:d,...f}){let p=c===`up`?(0,a.jsx)(i.ArrowUpIcon,{className:`size-3`}):c===`down`?(0,a.jsx)(i.ArrowDownIcon,{className:`size-3`}):null;return(0,a.jsxs)(`div`,{"data-slot":`statistic`,"data-loading":u||void 0,"data-trend":c,"aria-busy":u||void 0,className:t.cn(`grid gap-1`,d),...f,children:[(0,a.jsx)(`div`,{"data-slot":`statistic-label`,className:`text-sm text-muted-foreground`,children:e}),(0,a.jsx)(`div`,{"data-slot":`statistic-value-row`,className:`flex flex-wrap items-baseline gap-1.5`,children:u?(0,a.jsx)(`div`,{"data-slot":`statistic-skeleton`,className:`h-8 w-28 animate-pulse rounded-md bg-muted`}):(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(`span`,{"data-slot":`statistic-prefix`,className:`text-base text-muted-foreground`,children:r}),(0,a.jsx)(`span`,{"data-slot":`statistic-value`,className:`text-2xl font-semibold tracking-tight`,children:n}),o&&(0,a.jsx)(`span`,{"data-slot":`statistic-suffix`,className:`text-sm text-muted-foreground`,children:o})]})}),(s||l)&&(0,a.jsxs)(`div`,{"data-slot":`statistic-meta`,className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[l&&(0,a.jsxs)(`span`,{"data-slot":`statistic-change`,"data-trend":c,className:t.cn(`inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 font-medium`,c===`up`&&`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`,c===`down`&&`bg-destructive/10 text-destructive`,c===`neutral`&&`bg-muted text-muted-foreground`),children:[p,l]}),s&&(0,a.jsx)(`span`,{"data-slot":`statistic-description`,children:s})]})]})}function s({action:e,density:r=`default`,label:i,value:s,prefix:c,suffix:l,description:u,trend:d,change:f,loading:p,className:m,...h}){return(0,a.jsxs)(n.Card,{"data-slot":`statistic-card`,"data-density":r,className:m,...h,children:[(0,a.jsxs)(n.CardHeader,{"data-slot":`statistic-card-header`,className:t.cn(`flex flex-row items-center justify-between gap-3 pb-2`,r===`compact`&&`px-4 pt-4 pb-1`),children:[(0,a.jsx)(n.CardTitle,{className:`text-sm font-medium text-muted-foreground`,children:i}),e?(0,a.jsx)(`div`,{"data-slot":`statistic-card-action`,children:e}):null]}),(0,a.jsx)(n.CardContent,{className:t.cn(r===`compact`&&`px-4 pb-4`),children:(0,a.jsx)(o,{label:(0,a.jsx)(`span`,{className:`sr-only`,children:i}),value:s,prefix:c,suffix:l,description:u,trend:d,change:f,loading:p})})]})}function c({columns:e=4,gap:n=`default`,className:r,...i}){return(0,a.jsx)(`div`,{"data-slot":`statistic-grid`,className:t.cn(`grid`,n===`sm`&&`gap-3`,n==="default"&&`gap-4`,n===`lg`&&`gap-6`,e===1&&`grid-cols-1`,e===2&&`grid-cols-1 sm:grid-cols-2`,e===3&&`grid-cols-1 sm:grid-cols-2 xl:grid-cols-3`,e===4&&`grid-cols-1 sm:grid-cols-2 xl:grid-cols-4`,r),...i})}exports.Statistic=o,exports.StatisticCard=s,exports.StatisticGrid=c;
|
|
@@ -59,41 +59,45 @@ function u({ label: t, value: n, prefix: r, suffix: i, description: u, trend: d
|
|
|
59
59
|
]
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function d({ action:
|
|
62
|
+
function d({ action: a, density: o = "default", label: s, value: d, prefix: f, suffix: p, description: m, trend: h, change: g, loading: _, className: v, ...y }) {
|
|
63
63
|
return /* @__PURE__ */ l(t, {
|
|
64
64
|
"data-slot": "statistic-card",
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
"data-density": o,
|
|
66
|
+
className: v,
|
|
67
|
+
...y,
|
|
67
68
|
children: [/* @__PURE__ */ l(r, {
|
|
68
69
|
"data-slot": "statistic-card-header",
|
|
69
|
-
className: "flex flex-row items-center justify-between gap-3 pb-2",
|
|
70
|
+
className: e("flex flex-row items-center justify-between gap-3 pb-2", o === "compact" && "px-4 pt-4 pb-1"),
|
|
70
71
|
children: [/* @__PURE__ */ c(i, {
|
|
71
72
|
className: "text-sm font-medium text-muted-foreground",
|
|
72
|
-
children:
|
|
73
|
-
}),
|
|
73
|
+
children: s
|
|
74
|
+
}), a ? /* @__PURE__ */ c("div", {
|
|
74
75
|
"data-slot": "statistic-card-action",
|
|
75
|
-
children: e
|
|
76
|
-
}) : null]
|
|
77
|
-
}), /* @__PURE__ */ c(n, { children: /* @__PURE__ */ c(u, {
|
|
78
|
-
label: /* @__PURE__ */ c("span", {
|
|
79
|
-
className: "sr-only",
|
|
80
76
|
children: a
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
77
|
+
}) : null]
|
|
78
|
+
}), /* @__PURE__ */ c(n, {
|
|
79
|
+
className: e(o === "compact" && "px-4 pb-4"),
|
|
80
|
+
children: /* @__PURE__ */ c(u, {
|
|
81
|
+
label: /* @__PURE__ */ c("span", {
|
|
82
|
+
className: "sr-only",
|
|
83
|
+
children: s
|
|
84
|
+
}),
|
|
85
|
+
value: d,
|
|
86
|
+
prefix: f,
|
|
87
|
+
suffix: p,
|
|
88
|
+
description: m,
|
|
89
|
+
trend: h,
|
|
90
|
+
change: g,
|
|
91
|
+
loading: _
|
|
92
|
+
})
|
|
93
|
+
})]
|
|
90
94
|
});
|
|
91
95
|
}
|
|
92
|
-
function f({ columns: t = 4,
|
|
96
|
+
function f({ columns: t = 4, gap: n = "default", className: r, ...i }) {
|
|
93
97
|
return /* @__PURE__ */ c("div", {
|
|
94
98
|
"data-slot": "statistic-grid",
|
|
95
|
-
className: e("grid gap-4", t === 1 && "grid-cols-1", t === 2 && "grid-cols-1 sm:grid-cols-2", t === 3 && "grid-cols-1 sm:grid-cols-2 xl:grid-cols-3", t === 4 && "grid-cols-1 sm:grid-cols-2 xl:grid-cols-4",
|
|
96
|
-
...
|
|
99
|
+
className: e("grid", n === "sm" && "gap-3", n === "default" && "gap-4", n === "lg" && "gap-6", t === 1 && "grid-cols-1", t === 2 && "grid-cols-1 sm:grid-cols-2", t === 3 && "grid-cols-1 sm:grid-cols-2 xl:grid-cols-3", t === 4 && "grid-cols-1 sm:grid-cols-2 xl:grid-cols-4", r),
|
|
100
|
+
...i
|
|
97
101
|
});
|
|
98
102
|
}
|
|
99
103
|
//#endregion
|
|
@@ -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");var i={default:`border-border bg-muted`,success:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950 dark:text-emerald-300`,warning:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-300`,danger:`border-red-200 bg-red-50 text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-300`};function a({events:e,days:
|
|
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");var i={default:`border-border bg-muted`,success:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950 dark:text-emerald-300`,warning:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-300`,danger:`border-red-200 bg-red-50 text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-300`};function a({events:e,days:a,view:o=`week`,variant:s=`board`,density:c=`default`,title:l,description:u,actions:d,empty:f=`No events scheduled.`,selectedEventId:p,defaultSelectedEventId:m,onSelectedEventChange:h,onCreateEvent:g,onEventClick:_,renderEvent:v,createLabel:y=`Create event`,showCount:b=!0,dayClassName:x,eventClassName:S,formatDay:C,className:w,...T}){let[E,D]=n.useState(m),O=p??E,k=e.filter(e=>!e.hidden),A=a??Array.from(new Set(k.map(e=>e.date))),j=e=>{e.disabled||(p===void 0&&D(e.id),h?.(e.id,e),_?.(e))};return A.length===0?(0,r.jsx)(`div`,{"data-slot":`calendar-scheduler`,"data-view":o,"data-variant":s,"data-density":c,className:t.cn(`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))]`,w),...T,children:(0,r.jsx)(`div`,{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`,children:(0,r.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,r.jsx)(`p`,{"data-empty":`true`,className:`text-sm font-medium text-foreground`,children:f}),g?(0,r.jsx)(`button`,{type:`button`,className:`rounded-md border border-dashed px-3 py-2 text-sm text-muted-foreground hover:bg-muted/50`,onClick:()=>g(`today`),children:y}):null]})})}):(0,r.jsxs)(`div`,{"data-slot":`calendar-scheduler`,"data-view":o,"data-variant":s,"data-density":c,className:t.cn(`grid`,c===`compact`?`gap-2`:c===`comfortable`?`gap-5`:`gap-3`,o===`month`&&s===`board`&&`md:grid-cols-2 xl:grid-cols-3`,s===`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))]`,w),...T,children:[l||u||d?(0,r.jsxs)(`div`,{"data-slot":`calendar-scheduler-header`,className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,r.jsxs)(`div`,{className:`min-w-[min(100%,16rem)] flex-1 space-y-1`,children:[l?(0,r.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:l}):null,u?(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:u}):null]}),d?(0,r.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:d}):null]}):null,A.map(e=>{let n=k.filter(t=>t.date===e);return(0,r.jsxs)(`section`,{"data-slot":`calendar-scheduler-day`,className:t.cn(s===`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))]`,x),children:[(0,r.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,r.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:C?.(e)??e}),b?(0,r.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[n.length,` items`]}):null]}),(0,r.jsx)(`div`,{className:t.cn(`grid`,c===`compact`?`gap-1.5`:`gap-2`),children:n.length===0?(0,r.jsx)(`div`,{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`,children:f}):n.map(e=>{let n=O===e.id;return(0,r.jsx)(`button`,{type:`button`,disabled:e.disabled,"data-slot":`calendar-scheduler-event`,"data-selected":n||void 0,className:t.cn(`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`,s===`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`,s===`board`&&i[e.tone??`default`],S,e.className),onClick:()=>j(e),children:v?v(e,{selected:n}):s===`agenda`?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`span`,{className:`inline-flex min-w-14 items-center gap-1.5 font-medium`,children:[e.icon,e.time??`—`]}),(0,r.jsxs)(`span`,{className:`min-w-0`,children:[(0,r.jsx)(`span`,{className:`block truncate font-medium text-foreground`,children:e.title}),e.description?(0,r.jsx)(`span`,{className:`mt-0.5 block text-xs text-muted-foreground`,children:e.description}):null,e.meta?(0,r.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:e.meta}):null]}),e.badge?(0,r.jsx)(`span`,{className:`shrink-0`,children:e.badge}):e.durationMinutes?(0,r.jsxs)(`span`,{className:`shrink-0 text-xs opacity-70`,children:[e.durationMinutes,` min`]}):null]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`div`,{className:`font-medium`,children:e.title}),e.description?(0,r.jsx)(`div`,{className:`mt-1 text-xs opacity-80`,children:e.description}):null,e.time?(0,r.jsx)(`div`,{className:`mt-1 text-xs opacity-70`,children:e.time}):null,e.durationMinutes?(0,r.jsxs)(`div`,{className:`mt-1 text-xs opacity-70`,children:[e.durationMinutes,` min`]}):null,e.meta?(0,r.jsx)(`div`,{className:`mt-1 text-xs opacity-70`,children:e.meta}):null]})},e.id)})}),g?(0,r.jsx)(`button`,{type:`button`,className:`mt-3 w-full rounded-md border border-dashed px-3 py-2 text-sm text-muted-foreground hover:bg-muted/50`,onClick:()=>g(e),children:y}):null]},e)})]})}exports.CalendarScheduler=a;
|
|
@@ -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
|
-
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`});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;
|