impact-nova 0.1.13 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layout/dashboard-layout.d.ts +21 -6
- package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +32 -33
- package/dist/components/ui/accordion.js +25 -23
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +5 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
- package/dist/components/ui/alert-dialog.js +45 -40
- package/dist/components/ui/alert.d.ts +21 -4
- package/dist/components/ui/alert.js +45 -25
- package/dist/components/ui/avatar.js +19 -16
- package/dist/components/ui/badge.js +8 -1
- package/dist/components/ui/breadcrumb.js +1 -0
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.js +27 -32
- package/dist/components/ui/button-variants.d.ts +1 -1
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.js +11 -9
- package/dist/components/ui/calendar.d.ts +14 -2
- package/dist/components/ui/calendar.js +443 -376
- package/dist/components/ui/card.js +7 -6
- package/dist/components/ui/checkbox.js +64 -48
- package/dist/components/ui/chips.d.ts +1 -0
- package/dist/components/ui/chips.js +27 -19
- package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
- package/dist/components/ui/data-table/data-table-column-list.js +58 -54
- package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
- package/dist/components/ui/data-table/data-table-sheet.js +43 -40
- package/dist/components/ui/data-table/data-table-view-options.js +17 -17
- package/dist/components/ui/data-table/data-table.js +21 -20
- package/dist/components/ui/date-picker/date-picker.js +83 -87
- package/dist/components/ui/date-picker/date-range-picker.js +129 -125
- package/dist/components/ui/date-picker/month-picker.js +90 -93
- package/dist/components/ui/date-picker/month-range-picker.js +132 -129
- package/dist/components/ui/date-picker/multi-date-picker.js +37 -38
- package/dist/components/ui/date-picker/multi-month-picker.js +29 -30
- package/dist/components/ui/date-picker/multi-week-picker.js +49 -38
- package/dist/components/ui/date-picker/week-picker.js +116 -112
- package/dist/components/ui/date-picker/week-range-picker.js +153 -142
- package/dist/components/ui/dialog.js +15 -6
- package/dist/components/ui/drawer.js +16 -13
- package/dist/components/ui/dropdown-menu.js +4 -2
- package/dist/components/ui/dynamic-layout.d.ts +2 -2
- package/dist/components/ui/dynamic-layout.js +18 -15
- package/dist/components/ui/empty-container.js +69 -64
- package/dist/components/ui/file-upload.js +113 -106
- package/dist/components/ui/filter-panel/filter-panel.js +49 -46
- package/dist/components/ui/filter-strip/filter-strip.js +41 -37
- package/dist/components/ui/header.js +26 -25
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
- package/dist/components/ui/hover-card.js +6 -5
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.js +79 -68
- package/dist/components/ui/loader.d.ts +1 -0
- package/dist/components/ui/loader.js +23 -13
- package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
- package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
- package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
- package/dist/components/ui/nested-list/nested-list.js +182 -189
- package/dist/components/ui/notification-panel/notification-item.js +19 -17
- package/dist/components/ui/notification-panel/notification-list.js +21 -21
- package/dist/components/ui/notification-panel/notification-panel.js +25 -25
- package/dist/components/ui/popover.js +37 -34
- package/dist/components/ui/progress.js +12 -10
- package/dist/components/ui/prompt.js +29 -27
- package/dist/components/ui/radio-group.js +55 -46
- package/dist/components/ui/select/components/Submenu.d.ts +1 -2
- package/dist/components/ui/select/components/Submenu.js +52 -48
- package/dist/components/ui/select/select.js +321 -324
- package/dist/components/ui/sheet.js +18 -15
- package/dist/components/ui/sidebar.d.ts +2 -2
- package/dist/components/ui/sidebar.js +3 -3
- package/dist/components/ui/skeleton.d.ts +2 -1
- package/dist/components/ui/skeleton.js +12 -11
- package/dist/components/ui/slider.js +39 -12
- package/dist/components/ui/smart-input.js +44 -39
- package/dist/components/ui/stepper.js +33 -29
- package/dist/components/ui/switch.js +6 -4
- package/dist/components/ui/tabs.js +50 -45
- package/dist/components/ui/tag-group.d.ts +2 -1
- package/dist/components/ui/tag-group.js +29 -25
- package/dist/components/ui/tag.d.ts +1 -0
- package/dist/components/ui/tag.js +26 -20
- package/dist/components/ui/textarea.js +18 -17
- package/dist/components/ui/toast.d.ts +1 -1
- package/dist/components/ui/toast.js +47 -41
- package/dist/components/ui/toaster.js +42 -42
- package/dist/components/ui/tooltip.js +18 -16
- package/dist/components/ui/types/date-picker.types.d.ts +33 -0
- package/dist/components/ui/types/empty-container.types.d.ts +5 -0
- package/dist/components/ui/types/nested-list.types.d.ts +1 -0
- package/dist/components/ui/types/select.types.d.ts +0 -1
- package/dist/icons/assets/bookmark.svg.js +4 -0
- package/dist/icons/assets/bookmark.svg2.js +5 -0
- package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
- package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
- package/dist/icons/assets/download.svg.js +4 -0
- package/dist/icons/assets/download.svg2.js +5 -0
- package/dist/icons/index.d.ts +20 -6
- package/dist/icons/index.js +398 -370
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +318 -314
- package/dist/lib/fiscal-calendar.d.ts +62 -0
- package/dist/lib/fiscal-calendar.js +99 -0
- package/package.json +5 -5
- package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
- package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
- package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
- package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
|
@@ -1,212 +1,223 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { X as
|
|
4
|
-
import { CalendarMonth as
|
|
5
|
-
import { format as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Popover as
|
|
8
|
-
import { Calendar as
|
|
9
|
-
|
|
1
|
+
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { X as ae } from "lucide-react";
|
|
4
|
+
import { CalendarMonth as de, Info as ie } from "../../../icons/index.js";
|
|
5
|
+
import { format as d, parse as L, isValid as O } from "date-fns";
|
|
6
|
+
import { cn as g, maskDate as z } from "../../../lib/utils.js";
|
|
7
|
+
import { Popover as ce, PopoverTrigger as le, PopoverContent as fe } from "../popover.js";
|
|
8
|
+
import { Calendar as pe } from "../calendar.js";
|
|
9
|
+
import { resolveWeekSelection as me } from "../../../lib/fiscal-calendar.js";
|
|
10
|
+
const ue = f.forwardRef(
|
|
10
11
|
({
|
|
11
|
-
value:
|
|
12
|
+
value: t,
|
|
12
13
|
onChange: p,
|
|
13
|
-
format:
|
|
14
|
-
minDate:
|
|
15
|
-
maxDate:
|
|
16
|
-
fromYear:
|
|
17
|
-
toYear:
|
|
18
|
-
showFooter:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (D(t), t === "") {
|
|
64
|
-
const l = { from: void 0, to: a?.to };
|
|
65
|
-
i(l), m || p?.(l);
|
|
14
|
+
format: n = "MM/dd/yyyy",
|
|
15
|
+
minDate: T,
|
|
16
|
+
maxDate: X,
|
|
17
|
+
fromYear: q,
|
|
18
|
+
toYear: G,
|
|
19
|
+
showFooter: a = !0,
|
|
20
|
+
calendarType: v = "calendar",
|
|
21
|
+
fiscalMode: N = "basic",
|
|
22
|
+
selectionMode: C = "week",
|
|
23
|
+
fiscalMonthPattern: S,
|
|
24
|
+
fiscalYearStartMonth: W = 1,
|
|
25
|
+
weekStartsOn: P = 1,
|
|
26
|
+
disabled: x,
|
|
27
|
+
className: H,
|
|
28
|
+
isError: b,
|
|
29
|
+
size: R,
|
|
30
|
+
label: I,
|
|
31
|
+
helperText: V,
|
|
32
|
+
required: J,
|
|
33
|
+
prefix: xe,
|
|
34
|
+
prefixClick: ge,
|
|
35
|
+
...K
|
|
36
|
+
}, Q) => {
|
|
37
|
+
const [s, h] = f.useState(!1), [o, c] = f.useState(t), [U, w] = f.useState(t?.from ? d(t.from.startDate, n) : ""), [Z, y] = f.useState(t?.to ? d(t.to.endDate, n) : ""), [$, D] = f.useState(t?.from?.startDate || /* @__PURE__ */ new Date());
|
|
38
|
+
f.useEffect(() => {
|
|
39
|
+
w(t?.from ? d(t.from.startDate, n) : ""), y(t?.to ? d(t.to.endDate, n) : "");
|
|
40
|
+
}, [t, n]), f.useEffect(() => {
|
|
41
|
+
s && (c(t), D(t?.from?.startDate || /* @__PURE__ */ new Date()));
|
|
42
|
+
}, [s]);
|
|
43
|
+
const Y = (e) => {
|
|
44
|
+
c(e), !a && e?.from && e?.to && (p?.(e), h(!1));
|
|
45
|
+
}, _ = (e) => {
|
|
46
|
+
let r = e !== void 0 ? e : o;
|
|
47
|
+
r?.from && !r.to && (r = { ...r, to: r.from }), p?.(r), h(!1);
|
|
48
|
+
}, F = () => {
|
|
49
|
+
c(t), h(!1);
|
|
50
|
+
}, A = () => {
|
|
51
|
+
c(void 0), w(""), y(""), p?.(void 0), a || h(!1);
|
|
52
|
+
}, E = (e) => me(e, {
|
|
53
|
+
calendarType: v,
|
|
54
|
+
fiscalMode: N,
|
|
55
|
+
selectionMode: C,
|
|
56
|
+
fiscalMonthPattern: S,
|
|
57
|
+
fiscalYearStartMonth: W,
|
|
58
|
+
weekStartsOn: P
|
|
59
|
+
}), ee = (e) => {
|
|
60
|
+
const r = z(e.target.value, n);
|
|
61
|
+
if (w(r), r === "") {
|
|
62
|
+
const l = { from: void 0, to: o?.to };
|
|
63
|
+
c(l), a || p?.(l);
|
|
66
64
|
return;
|
|
67
65
|
}
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
const
|
|
71
|
-
|
|
66
|
+
const m = L(r, n, /* @__PURE__ */ new Date());
|
|
67
|
+
if (O(m)) {
|
|
68
|
+
const k = { from: E(m), to: o?.to };
|
|
69
|
+
c(k), D(m), a || p?.(k);
|
|
72
70
|
}
|
|
73
|
-
},
|
|
74
|
-
const
|
|
75
|
-
if (y(
|
|
76
|
-
const l = { from:
|
|
77
|
-
|
|
71
|
+
}, te = (e) => {
|
|
72
|
+
const r = z(e.target.value, n);
|
|
73
|
+
if (y(r), r === "") {
|
|
74
|
+
const l = { from: o?.from, to: void 0 };
|
|
75
|
+
c(l), a || p?.(l);
|
|
78
76
|
return;
|
|
79
77
|
}
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
82
|
-
const l =
|
|
83
|
-
|
|
78
|
+
const m = L(r, n, /* @__PURE__ */ new Date());
|
|
79
|
+
if (O(m)) {
|
|
80
|
+
const l = E(m), k = { from: o?.from, to: l };
|
|
81
|
+
c(k), D(m), a || p?.(k);
|
|
84
82
|
}
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
return /* @__PURE__ */ u("div", { className: "w-full space-y-1.5 min-w-[240px]", children: [
|
|
89
|
-
|
|
83
|
+
}, j = () => {
|
|
84
|
+
s || (w(o?.from ? d(o.from.startDate, n) : ""), y(o?.to ? d(o.to.endDate, n) : ""));
|
|
85
|
+
}, ne = t?.from ? d(t.from.startDate, n) : "", oe = t?.to ? d(t.to.endDate, n) : "", B = a && s ? o?.from ? d(o.from.startDate, n) : "" : U, M = a && s ? o?.to ? d(o.to.endDate, n) : o?.from ? d(o.from.endDate, n) : "" : Z, re = a && s && B !== ne, se = a && s && M !== oe;
|
|
86
|
+
return /* @__PURE__ */ u("div", { className: "w-full space-y-1.5 min-w-[240px]", "data-component": "week-range-picker", "data-disabled": x || void 0, children: [
|
|
87
|
+
I && /* @__PURE__ */ u(
|
|
90
88
|
"label",
|
|
91
89
|
{
|
|
92
|
-
className:
|
|
90
|
+
className: g(
|
|
93
91
|
"text-xs font-medium leading-[18px] text-[#60697d]",
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
x && "opacity-70",
|
|
93
|
+
b && "text-destructive"
|
|
96
94
|
),
|
|
97
95
|
children: [
|
|
98
|
-
|
|
96
|
+
I,
|
|
99
97
|
" ",
|
|
100
|
-
|
|
98
|
+
J && /* @__PURE__ */ i("span", { className: "text-destructive", children: "*" })
|
|
101
99
|
]
|
|
102
100
|
}
|
|
103
101
|
),
|
|
104
|
-
/* @__PURE__ */ u(
|
|
105
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ u(ce, { open: s, onOpenChange: h, children: [
|
|
103
|
+
/* @__PURE__ */ i(le, { asChild: !0, children: /* @__PURE__ */ u(
|
|
106
104
|
"div",
|
|
107
105
|
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
"data-state": s ? "open" : "closed",
|
|
107
|
+
className: g(
|
|
108
|
+
"flex w-full items-center justify-between gap-2 rounded-md border bg-white px-3 text-sm shadow-sm transition-colors hover:border-primary disabled:cursor-not-allowed disabled:bg-disabled-secondary-bg disabled:text-disabled-text disabled:border-border",
|
|
109
|
+
b ? "border-destructive hover:border-destructive" : "border-input",
|
|
110
|
+
R === "sm" ? "h-6" : R === "md" ? "h-[28px]" : "h-8",
|
|
111
|
+
x && "pointer-events-none opacity-100 bg-disabled-secondary-bg border-border text-disabled-text hover:border-border",
|
|
113
112
|
"cursor-pointer",
|
|
114
|
-
|
|
113
|
+
H
|
|
115
114
|
),
|
|
116
115
|
children: [
|
|
117
116
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
|
|
118
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ i(
|
|
119
118
|
"input",
|
|
120
119
|
{
|
|
121
|
-
ref:
|
|
120
|
+
ref: Q,
|
|
122
121
|
type: "text",
|
|
123
|
-
value:
|
|
124
|
-
onChange:
|
|
125
|
-
onBlur:
|
|
126
|
-
onClick: (e) =>
|
|
127
|
-
placeholder:
|
|
128
|
-
disabled: !!
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
value: B,
|
|
123
|
+
onChange: ee,
|
|
124
|
+
onBlur: j,
|
|
125
|
+
onClick: (e) => s && e.stopPropagation(),
|
|
126
|
+
placeholder: s ? n : "Start Week",
|
|
127
|
+
disabled: !!x,
|
|
128
|
+
"data-field": "start",
|
|
129
|
+
className: g(
|
|
130
|
+
"flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-[#dfe2e7] disabled:cursor-not-allowed disabled:opacity-50",
|
|
131
|
+
re && "text-muted-foreground"
|
|
132
|
+
),
|
|
133
|
+
...K
|
|
131
134
|
}
|
|
132
135
|
),
|
|
133
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ i(
|
|
134
137
|
"input",
|
|
135
138
|
{
|
|
136
139
|
type: "text",
|
|
137
|
-
value:
|
|
138
|
-
onChange:
|
|
139
|
-
onBlur:
|
|
140
|
-
onClick: (e) =>
|
|
141
|
-
placeholder:
|
|
142
|
-
disabled: !!
|
|
143
|
-
|
|
140
|
+
value: M,
|
|
141
|
+
onChange: te,
|
|
142
|
+
onBlur: j,
|
|
143
|
+
onClick: (e) => s && e.stopPropagation(),
|
|
144
|
+
placeholder: s ? n : "End Week",
|
|
145
|
+
disabled: !!x,
|
|
146
|
+
"data-field": "end",
|
|
147
|
+
className: g(
|
|
148
|
+
"flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-[#dfe2e7] disabled:cursor-not-allowed disabled:opacity-50",
|
|
149
|
+
se && "text-muted-foreground"
|
|
150
|
+
)
|
|
144
151
|
}
|
|
145
152
|
)
|
|
146
153
|
] }),
|
|
147
154
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
148
|
-
|
|
149
|
-
|
|
155
|
+
t?.from && !x && /* @__PURE__ */ i(
|
|
156
|
+
ae,
|
|
150
157
|
{
|
|
151
158
|
className: "h-4 w-4 cursor-pointer hover:text-foreground text-muted-foreground",
|
|
152
159
|
onClick: (e) => {
|
|
153
|
-
e.stopPropagation(),
|
|
160
|
+
e.stopPropagation(), A();
|
|
154
161
|
}
|
|
155
162
|
}
|
|
156
163
|
),
|
|
157
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ i(de, { className: "h-4 w-4 text-secondary-foreground" })
|
|
158
165
|
] })
|
|
159
166
|
]
|
|
160
167
|
}
|
|
161
168
|
) }),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
169
|
+
/* @__PURE__ */ i(
|
|
170
|
+
fe,
|
|
164
171
|
{
|
|
165
172
|
className: "w-auto p-0",
|
|
166
173
|
align: "start",
|
|
167
174
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
oe,
|
|
175
|
+
children: /* @__PURE__ */ i(
|
|
176
|
+
pe,
|
|
171
177
|
{
|
|
172
178
|
pickerType: "week",
|
|
173
179
|
weekMode: "range",
|
|
174
|
-
selectedWeeks:
|
|
175
|
-
onWeekSelect:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
180
|
+
selectedWeeks: o,
|
|
181
|
+
onWeekSelect: Y,
|
|
182
|
+
month: $,
|
|
183
|
+
onMonthChange: D,
|
|
184
|
+
fromDate: T,
|
|
185
|
+
toDate: X,
|
|
186
|
+
fromYear: q,
|
|
187
|
+
toYear: G,
|
|
188
|
+
showFooter: a,
|
|
189
|
+
calendarType: v,
|
|
190
|
+
fiscalMode: N,
|
|
191
|
+
selectionMode: C,
|
|
192
|
+
fiscalMonthPattern: S,
|
|
193
|
+
fiscalYearStartMonth: W,
|
|
194
|
+
weekStartsOn: P,
|
|
195
|
+
onApply: _,
|
|
196
|
+
onCancel: F,
|
|
197
|
+
onClear: A,
|
|
187
198
|
captionLayout: "dropdown"
|
|
188
199
|
}
|
|
189
200
|
)
|
|
190
201
|
}
|
|
191
202
|
)
|
|
192
203
|
] }),
|
|
193
|
-
|
|
194
|
-
!
|
|
195
|
-
/* @__PURE__ */
|
|
204
|
+
V && /* @__PURE__ */ u("div", { className: g("flex items-center gap-1", b && "text-destructive"), children: [
|
|
205
|
+
!b && /* @__PURE__ */ i(ie, { size: 10, className: "shrink-0 text-muted-foreground" }),
|
|
206
|
+
/* @__PURE__ */ i(
|
|
196
207
|
"p",
|
|
197
208
|
{
|
|
198
|
-
className:
|
|
209
|
+
className: g(
|
|
199
210
|
"text-[10px] text-[#7a8294]",
|
|
200
|
-
|
|
211
|
+
b && "text-destructive"
|
|
201
212
|
),
|
|
202
|
-
children:
|
|
213
|
+
children: V
|
|
203
214
|
}
|
|
204
215
|
)
|
|
205
216
|
] })
|
|
206
217
|
] });
|
|
207
218
|
}
|
|
208
219
|
);
|
|
209
|
-
|
|
220
|
+
ue.displayName = "WeekRangePicker";
|
|
210
221
|
export {
|
|
211
|
-
|
|
222
|
+
ue as WeekRangePicker
|
|
212
223
|
};
|
|
@@ -8,7 +8,7 @@ const v = t.Root, w = t.Trigger, f = t.Portal, C = t.Close, n = i.forwardRef(({
|
|
|
8
8
|
{
|
|
9
9
|
ref: s,
|
|
10
10
|
className: l(
|
|
11
|
-
"fixed inset-0 z-
|
|
11
|
+
"fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
12
12
|
e
|
|
13
13
|
),
|
|
14
14
|
...a
|
|
@@ -22,17 +22,25 @@ const p = i.forwardRef(({ className: e, children: a, hideClose: s, ...r }, c) =>
|
|
|
22
22
|
{
|
|
23
23
|
ref: c,
|
|
24
24
|
"aria-describedby": void 0,
|
|
25
|
+
"data-component": "dialog-content",
|
|
25
26
|
className: l(
|
|
26
|
-
"fixed left-[50%] top-[50%] z-
|
|
27
|
+
"fixed left-[50%] top-[50%] z-50 flex flex-col w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg overflow-hidden",
|
|
27
28
|
e
|
|
28
29
|
),
|
|
29
30
|
...r,
|
|
30
31
|
children: [
|
|
31
32
|
a,
|
|
32
|
-
!s && /* @__PURE__ */ d(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
!s && /* @__PURE__ */ d(
|
|
34
|
+
t.Close,
|
|
35
|
+
{
|
|
36
|
+
"data-component": "dialog-close",
|
|
37
|
+
className: "absolute right-4 top-4 rounded-sm opacity-50 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ o(m, { className: "h-4 w-4" }),
|
|
40
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
)
|
|
36
44
|
]
|
|
37
45
|
}
|
|
38
46
|
)
|
|
@@ -84,6 +92,7 @@ const u = i.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o(
|
|
|
84
92
|
t.Title,
|
|
85
93
|
{
|
|
86
94
|
ref: s,
|
|
95
|
+
"data-component": "dialog-title",
|
|
87
96
|
className: l(
|
|
88
97
|
"text-md font-bold leading-none tracking-tight text-slate-900",
|
|
89
98
|
e
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import { Drawer as a } from "vaul";
|
|
4
4
|
import { cn as s } from "../../lib/utils.js";
|
|
5
|
-
const
|
|
5
|
+
const m = ({
|
|
6
6
|
shouldScaleBackground: e = !0,
|
|
7
7
|
...r
|
|
8
8
|
}) => /* @__PURE__ */ t(
|
|
@@ -12,7 +12,7 @@ const n = ({
|
|
|
12
12
|
...r
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
|
-
|
|
15
|
+
m.displayName = "Drawer";
|
|
16
16
|
const u = a.Trigger, c = a.Portal, b = a.Close, d = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
|
|
17
17
|
a.Overlay,
|
|
18
18
|
{
|
|
@@ -22,12 +22,13 @@ const u = a.Trigger, c = a.Portal, b = a.Close, d = l.forwardRef(({ className: e
|
|
|
22
22
|
}
|
|
23
23
|
));
|
|
24
24
|
d.displayName = a.Overlay.displayName;
|
|
25
|
-
const p = l.forwardRef(({ className: e, children: r, ...o },
|
|
25
|
+
const p = l.forwardRef(({ className: e, children: r, ...o }, i) => /* @__PURE__ */ n(c, { children: [
|
|
26
26
|
/* @__PURE__ */ t(d, {}),
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ n(
|
|
28
28
|
a.Content,
|
|
29
29
|
{
|
|
30
|
-
ref:
|
|
30
|
+
ref: i,
|
|
31
|
+
"data-component": "drawer-content",
|
|
31
32
|
className: s(
|
|
32
33
|
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
33
34
|
e
|
|
@@ -41,7 +42,7 @@ const p = l.forwardRef(({ className: e, children: r, ...o }, m) => /* @__PURE__
|
|
|
41
42
|
)
|
|
42
43
|
] }));
|
|
43
44
|
p.displayName = "DrawerContent";
|
|
44
|
-
const
|
|
45
|
+
const w = ({
|
|
45
46
|
className: e,
|
|
46
47
|
...r
|
|
47
48
|
}) => /* @__PURE__ */ t(
|
|
@@ -51,8 +52,8 @@ const f = ({
|
|
|
51
52
|
...r
|
|
52
53
|
}
|
|
53
54
|
);
|
|
54
|
-
|
|
55
|
-
const
|
|
55
|
+
w.displayName = "DrawerHeader";
|
|
56
|
+
const f = ({
|
|
56
57
|
className: e,
|
|
57
58
|
...r
|
|
58
59
|
}) => /* @__PURE__ */ t(
|
|
@@ -62,11 +63,12 @@ const w = ({
|
|
|
62
63
|
...r
|
|
63
64
|
}
|
|
64
65
|
);
|
|
65
|
-
|
|
66
|
+
f.displayName = "DrawerFooter";
|
|
66
67
|
const D = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
|
|
67
68
|
a.Title,
|
|
68
69
|
{
|
|
69
70
|
ref: o,
|
|
71
|
+
"data-component": "drawer-title",
|
|
70
72
|
className: s(
|
|
71
73
|
"text-lg font-semibold leading-none tracking-tight",
|
|
72
74
|
e
|
|
@@ -79,18 +81,19 @@ const x = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
|
|
|
79
81
|
a.Description,
|
|
80
82
|
{
|
|
81
83
|
ref: o,
|
|
84
|
+
"data-component": "drawer-description",
|
|
82
85
|
className: s("text-sm text-muted-foreground", e),
|
|
83
86
|
...r
|
|
84
87
|
}
|
|
85
88
|
));
|
|
86
89
|
x.displayName = a.Description.displayName;
|
|
87
90
|
export {
|
|
88
|
-
|
|
91
|
+
m as Drawer,
|
|
89
92
|
b as DrawerClose,
|
|
90
93
|
p as DrawerContent,
|
|
91
94
|
x as DrawerDescription,
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
f as DrawerFooter,
|
|
96
|
+
w as DrawerHeader,
|
|
94
97
|
d as DrawerOverlay,
|
|
95
98
|
c as DrawerPortal,
|
|
96
99
|
D as DrawerTitle,
|
|
@@ -35,7 +35,7 @@ const h = l.forwardRef(({ className: a, ...o }, n) => /* @__PURE__ */ t(e.Portal
|
|
|
35
35
|
{
|
|
36
36
|
ref: n,
|
|
37
37
|
className: s(
|
|
38
|
-
"z-
|
|
38
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-lg bg-popover p-2 text-popover-foreground shadow-[0px_0px_4px_0px_rgba(0,0,0,0.12)] text-[13px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
39
39
|
a
|
|
40
40
|
),
|
|
41
41
|
...o
|
|
@@ -48,8 +48,9 @@ const N = l.forwardRef(({ className: a, sideOffset: o = 4, portalled: n = !0, ..
|
|
|
48
48
|
{
|
|
49
49
|
ref: d,
|
|
50
50
|
sideOffset: o,
|
|
51
|
+
"data-component": "dropdown-menu-content",
|
|
51
52
|
className: s(
|
|
52
|
-
"z-
|
|
53
|
+
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[12rem] overflow-y-auto overflow-x-hidden rounded-lg bg-popover p-2 text-popover-foreground shadow-[0px_0px_4px_0px_rgba(0,0,0,0.12)] flex flex-col gap-0.5",
|
|
53
54
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
54
55
|
a
|
|
55
56
|
),
|
|
@@ -63,6 +64,7 @@ const b = l.forwardRef(({ className: a, inset: o, description: n, icon: r, child
|
|
|
63
64
|
e.Item,
|
|
64
65
|
{
|
|
65
66
|
ref: p,
|
|
67
|
+
"data-component": "dropdown-menu-item",
|
|
66
68
|
className: s(
|
|
67
69
|
"relative flex cursor-default select-none items-center gap-2 rounded-md px-3 h-[35px] text-[13px] outline-none transition-colors focus:bg-accent focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
68
70
|
o && "pl-4",
|
|
@@ -2,8 +2,8 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const dynamicLayoutVariants: (props?: {
|
|
4
4
|
layout?: "grid" | "flex" | "stack";
|
|
5
|
-
columns?: 1 | 4 | 3 | 2 |
|
|
6
|
-
gap?: "
|
|
5
|
+
columns?: 12 | 1 | 4 | 3 | 2 | 6;
|
|
6
|
+
gap?: "sm" | "md" | "lg" | "xl" | "none";
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) => string;
|
|
8
8
|
export interface DynamicLayoutProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dynamicLayoutVariants> {
|
|
9
9
|
children: React.ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { cn as
|
|
5
|
-
const e =
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import { cva as m } from "class-variance-authority";
|
|
4
|
+
import { cn as g } from "../../lib/utils.js";
|
|
5
|
+
const e = m("", {
|
|
6
6
|
variants: {
|
|
7
7
|
layout: {
|
|
8
8
|
grid: "grid",
|
|
@@ -29,22 +29,25 @@ const e = g("", {
|
|
|
29
29
|
layout: "flex",
|
|
30
30
|
gap: "md"
|
|
31
31
|
}
|
|
32
|
-
}),
|
|
33
|
-
({ className:
|
|
32
|
+
}), f = c.forwardRef(
|
|
33
|
+
({ className: t, layout: a, columns: o, gap: r, children: i, ...l }, d) => /* @__PURE__ */ s(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
|
-
ref:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
ref: d,
|
|
37
|
+
"data-layout": a ?? "flex",
|
|
38
|
+
"data-columns": o ?? void 0,
|
|
39
|
+
"data-gap": r ?? "md",
|
|
40
|
+
className: g(
|
|
41
|
+
e({ layout: a, columns: o, gap: r }),
|
|
42
|
+
t
|
|
40
43
|
),
|
|
41
|
-
...
|
|
42
|
-
children:
|
|
44
|
+
...l,
|
|
45
|
+
children: i
|
|
43
46
|
}
|
|
44
47
|
)
|
|
45
48
|
);
|
|
46
|
-
|
|
49
|
+
f.displayName = "DynamicLayout";
|
|
47
50
|
export {
|
|
48
|
-
|
|
51
|
+
f as DynamicLayout,
|
|
49
52
|
e as dynamicLayoutVariants
|
|
50
53
|
};
|