impact-nova 0.1.13 → 1.1.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/date-display-renderer.js +32 -21
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.d.ts +3 -5
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +57 -55
- 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 +93 -93
- package/dist/components/ui/date-picker/date-range-picker.js +142 -133
- package/dist/components/ui/date-picker/month-picker.js +96 -93
- package/dist/components/ui/date-picker/month-range-picker.js +144 -134
- package/dist/components/ui/date-picker/multi-date-picker.js +43 -45
- package/dist/components/ui/date-picker/multi-month-picker.js +37 -39
- package/dist/components/ui/date-picker/multi-week-picker.js +56 -46
- package/dist/components/ui/date-picker/week-picker.js +119 -109
- package/dist/components/ui/date-picker/week-range-picker.js +170 -147
- 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/dist/lib/utils.d.ts +2 -1
- package/dist/lib/utils.js +29 -13
- 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,235 @@
|
|
|
1
|
-
import { jsxs 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 b, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { X as pe } from "lucide-react";
|
|
4
|
+
import { CalendarMonth as me, Info as ue } from "../../../icons/index.js";
|
|
5
|
+
import { format as x, isValid as S, parse as R } from "date-fns";
|
|
6
|
+
import { cn as N, padValidDateString as X, maskDate as q } from "../../../lib/utils.js";
|
|
7
|
+
import { Popover as ge, PopoverTrigger as xe, PopoverContent as he } from "../popover.js";
|
|
8
|
+
import { Calendar as be } from "../calendar.js";
|
|
9
|
+
import { resolveWeekSelection as we } from "../../../lib/fiscal-calendar.js";
|
|
10
|
+
const g = (e, r = "MM/dd/yyyy") => {
|
|
11
|
+
const t = x(e.startDate, r), W = x(e.endDate, r);
|
|
12
|
+
return `${t} - ${W}`;
|
|
13
|
+
}, ke = o.forwardRef(
|
|
10
14
|
({
|
|
11
|
-
value:
|
|
12
|
-
onChange:
|
|
13
|
-
format:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
i(l), m || p?.(l);
|
|
15
|
+
value: e,
|
|
16
|
+
onChange: r,
|
|
17
|
+
format: t = "MM/dd/yyyy",
|
|
18
|
+
placeholder: W = "Select Week Range",
|
|
19
|
+
minDate: G,
|
|
20
|
+
maxDate: J,
|
|
21
|
+
fromYear: K,
|
|
22
|
+
toYear: Q,
|
|
23
|
+
showFooter: p = !0,
|
|
24
|
+
calendarType: E = "calendar",
|
|
25
|
+
fiscalMode: v = "basic",
|
|
26
|
+
selectionMode: A = "week",
|
|
27
|
+
fiscalMonthPattern: M,
|
|
28
|
+
fiscalYearStartMonth: T = 1,
|
|
29
|
+
weekStartsOn: j = 1,
|
|
30
|
+
disabled: w,
|
|
31
|
+
className: U,
|
|
32
|
+
isError: C,
|
|
33
|
+
size: B,
|
|
34
|
+
label: L,
|
|
35
|
+
helperText: O,
|
|
36
|
+
required: Z,
|
|
37
|
+
prefix: ye,
|
|
38
|
+
prefixClick: De,
|
|
39
|
+
...Y
|
|
40
|
+
}, _) => {
|
|
41
|
+
const $ = o.useRef(null), F = o.useRef(null);
|
|
42
|
+
o.useRef(null), o.useRef(null), o.useImperativeHandle(_, () => $.current);
|
|
43
|
+
const [i, I] = o.useState(!1), [k, c] = o.useState(e), [y, m] = o.useState(e?.from ? x(e.from.startDate, t) : ""), [D, u] = o.useState(e?.to ? x(e.to.endDate, t) : ""), [ee, P] = o.useState(e?.from?.startDate || /* @__PURE__ */ new Date());
|
|
44
|
+
o.useEffect(() => {
|
|
45
|
+
!i && e && (m(e?.from ? x(e.from.startDate, t) : ""), u(e?.to ? x(e.to.endDate, t) : ""), c(e));
|
|
46
|
+
}, [e, t, i]), o.useEffect(() => {
|
|
47
|
+
i && (c(e), m(e?.from ? x(e.from.startDate, t) : ""), u(e?.to ? x(e.to.endDate, t) : ""), P(e?.from?.startDate || /* @__PURE__ */ new Date()));
|
|
48
|
+
}, [i, e, t]);
|
|
49
|
+
const te = (n) => {
|
|
50
|
+
c(n), n?.from && m(g(n.from, t)), n?.to && u(g(n.to, t)), !p && n?.from && n?.to && n.from.startDate.getTime() !== n.to.startDate.getTime() && (r?.(n), I(!1));
|
|
51
|
+
}, ne = (n) => {
|
|
52
|
+
r?.(n !== void 0 ? n : k), I(!1);
|
|
53
|
+
}, oe = () => {
|
|
54
|
+
c(e), m(e?.from ? g(e.from, t) : ""), u(e?.to ? g(e.to, t) : ""), I(!1);
|
|
55
|
+
}, z = () => {
|
|
56
|
+
c(void 0), m(""), u(""), r?.(void 0), p || I(!1);
|
|
57
|
+
}, V = (n) => we(n, {
|
|
58
|
+
calendarType: E,
|
|
59
|
+
fiscalMode: v,
|
|
60
|
+
selectionMode: A,
|
|
61
|
+
fiscalMonthPattern: M,
|
|
62
|
+
fiscalYearStartMonth: T,
|
|
63
|
+
weekStartsOn: j
|
|
64
|
+
}), se = (n) => {
|
|
65
|
+
const a = n.target.value, s = q(a, t, y);
|
|
66
|
+
if (m(s), s === "") {
|
|
67
|
+
const l = { from: void 0, to: k?.to };
|
|
68
|
+
c(l), p || r?.(l);
|
|
66
69
|
return;
|
|
67
70
|
}
|
|
68
|
-
const
|
|
69
|
-
if (S(
|
|
70
|
-
const
|
|
71
|
-
|
|
71
|
+
const d = R(s, t, /* @__PURE__ */ new Date());
|
|
72
|
+
if (S(d) && s.length === t.length) {
|
|
73
|
+
const h = { from: V(d), to: k?.to };
|
|
74
|
+
c(h), p || r?.(h);
|
|
72
75
|
}
|
|
73
|
-
},
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const l = { from:
|
|
77
|
-
|
|
76
|
+
}, re = (n) => {
|
|
77
|
+
const a = n.target.value, s = q(a, t, D);
|
|
78
|
+
if (u(s), s === "") {
|
|
79
|
+
const l = { from: k?.from, to: void 0 };
|
|
80
|
+
c(l), p || r?.(l);
|
|
78
81
|
return;
|
|
79
82
|
}
|
|
80
|
-
const
|
|
81
|
-
if (S(
|
|
82
|
-
const l =
|
|
83
|
-
|
|
83
|
+
const d = R(s, t, /* @__PURE__ */ new Date());
|
|
84
|
+
if (S(d) && s.length === t.length) {
|
|
85
|
+
const l = V(d), h = { from: k?.from, to: l };
|
|
86
|
+
c(h), d && P(d), p || r?.(h);
|
|
84
87
|
}
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
}, H = () => {
|
|
89
|
+
if (i) return;
|
|
90
|
+
const n = X(y, t), a = X(D, t), s = R(n, t, /* @__PURE__ */ new Date()), d = R(a, t, /* @__PURE__ */ new Date()), l = S(s) && n.length === t.length, h = S(d) && a.length === t.length;
|
|
91
|
+
if (!l || !h)
|
|
92
|
+
m(e?.from ? g(e.from, t) : ""), u(e?.to ? g(e.to, t) : ""), c(e);
|
|
93
|
+
else if (m(n), u(a), !p) {
|
|
94
|
+
const fe = V(s), ae = V(d);
|
|
95
|
+
r?.({ from: fe, to: ae });
|
|
96
|
+
}
|
|
97
|
+
}, ie = (e?.from ? g(e.from, t) : "") !== y, ce = (e?.to ? g(e.to, t) : "") !== D, de = y.length === t.length && !S(R(y, t, /* @__PURE__ */ new Date())), le = D.length === t.length && !S(R(D, t, /* @__PURE__ */ new Date()));
|
|
98
|
+
return /* @__PURE__ */ b("div", { className: "w-full space-y-1.5 min-w-[240px]", "data-component": "week-range-picker", "data-disabled": w || void 0, children: [
|
|
99
|
+
L && /* @__PURE__ */ b(
|
|
90
100
|
"label",
|
|
91
101
|
{
|
|
92
|
-
className:
|
|
102
|
+
className: N(
|
|
93
103
|
"text-xs font-medium leading-[18px] text-[#60697d]",
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
w && "opacity-70",
|
|
105
|
+
C && "text-destructive"
|
|
96
106
|
),
|
|
97
107
|
children: [
|
|
98
|
-
|
|
108
|
+
L,
|
|
99
109
|
" ",
|
|
100
|
-
|
|
110
|
+
Z && /* @__PURE__ */ f("span", { className: "text-destructive", children: "*" })
|
|
101
111
|
]
|
|
102
112
|
}
|
|
103
113
|
),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ b(ge, { open: i, onOpenChange: I, children: [
|
|
115
|
+
/* @__PURE__ */ f(xe, { asChild: !0, children: /* @__PURE__ */ b(
|
|
106
116
|
"div",
|
|
107
117
|
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
118
|
+
"data-state": i ? "open" : "closed",
|
|
119
|
+
className: N(
|
|
120
|
+
"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",
|
|
121
|
+
C ? "border-destructive hover:border-destructive" : "border-input",
|
|
122
|
+
B === "sm" ? "h-6" : B === "md" ? "h-[28px]" : "h-8",
|
|
123
|
+
w && "pointer-events-none opacity-100 bg-disabled-secondary-bg border-border text-disabled-text hover:border-border",
|
|
113
124
|
"cursor-pointer",
|
|
114
|
-
|
|
125
|
+
U
|
|
115
126
|
),
|
|
116
127
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ b("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
|
|
129
|
+
/* @__PURE__ */ f(
|
|
119
130
|
"input",
|
|
120
131
|
{
|
|
121
|
-
ref:
|
|
132
|
+
ref: $,
|
|
122
133
|
type: "text",
|
|
123
|
-
value:
|
|
124
|
-
onChange:
|
|
125
|
-
onBlur:
|
|
126
|
-
onClick: (
|
|
127
|
-
placeholder:
|
|
128
|
-
disabled: !!
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
value: y,
|
|
135
|
+
onChange: se,
|
|
136
|
+
onBlur: H,
|
|
137
|
+
onClick: (n) => i && n.stopPropagation(),
|
|
138
|
+
placeholder: i ? t : W,
|
|
139
|
+
disabled: !!w,
|
|
140
|
+
"data-field": "start",
|
|
141
|
+
className: N(
|
|
142
|
+
"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",
|
|
143
|
+
de ? "text-destructive" : ie ? "text-muted-foreground" : ""
|
|
144
|
+
),
|
|
145
|
+
...Y
|
|
131
146
|
}
|
|
132
147
|
),
|
|
133
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ f(
|
|
134
149
|
"input",
|
|
135
150
|
{
|
|
151
|
+
ref: F,
|
|
136
152
|
type: "text",
|
|
137
|
-
value:
|
|
138
|
-
onChange:
|
|
139
|
-
onBlur:
|
|
140
|
-
onClick: (
|
|
141
|
-
placeholder:
|
|
142
|
-
disabled: !!
|
|
143
|
-
|
|
153
|
+
value: D,
|
|
154
|
+
onChange: re,
|
|
155
|
+
onBlur: H,
|
|
156
|
+
onClick: (n) => i && n.stopPropagation(),
|
|
157
|
+
placeholder: i ? t : W,
|
|
158
|
+
disabled: !!w,
|
|
159
|
+
"data-field": "end",
|
|
160
|
+
className: N(
|
|
161
|
+
"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",
|
|
162
|
+
le ? "text-destructive" : ce ? "text-muted-foreground" : ""
|
|
163
|
+
)
|
|
144
164
|
}
|
|
145
165
|
)
|
|
146
166
|
] }),
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
|
|
149
|
-
|
|
167
|
+
/* @__PURE__ */ b("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
168
|
+
e?.from && !w && /* @__PURE__ */ f(
|
|
169
|
+
pe,
|
|
150
170
|
{
|
|
151
171
|
className: "h-4 w-4 cursor-pointer hover:text-foreground text-muted-foreground",
|
|
152
|
-
onClick: (
|
|
153
|
-
|
|
172
|
+
onClick: (n) => {
|
|
173
|
+
n.stopPropagation(), z();
|
|
154
174
|
}
|
|
155
175
|
}
|
|
156
176
|
),
|
|
157
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ f(me, { className: "h-4 w-4 text-secondary-foreground" })
|
|
158
178
|
] })
|
|
159
179
|
]
|
|
160
180
|
}
|
|
161
181
|
) }),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
182
|
+
/* @__PURE__ */ f(
|
|
183
|
+
he,
|
|
164
184
|
{
|
|
165
185
|
className: "w-auto p-0",
|
|
166
186
|
align: "start",
|
|
167
|
-
onOpenAutoFocus: (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
oe,
|
|
187
|
+
onOpenAutoFocus: (n) => n.preventDefault(),
|
|
188
|
+
children: /* @__PURE__ */ f(
|
|
189
|
+
be,
|
|
171
190
|
{
|
|
172
191
|
pickerType: "week",
|
|
173
192
|
weekMode: "range",
|
|
174
|
-
selectedWeeks:
|
|
175
|
-
onWeekSelect:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
193
|
+
selectedWeeks: k,
|
|
194
|
+
onWeekSelect: te,
|
|
195
|
+
month: ee,
|
|
196
|
+
onMonthChange: P,
|
|
197
|
+
disabled: { before: G, after: J },
|
|
198
|
+
fromYear: K,
|
|
199
|
+
toYear: Q,
|
|
200
|
+
showFooter: p,
|
|
201
|
+
calendarType: E,
|
|
202
|
+
fiscalMode: v,
|
|
203
|
+
selectionMode: A,
|
|
204
|
+
fiscalMonthPattern: M,
|
|
205
|
+
fiscalYearStartMonth: T,
|
|
206
|
+
weekStartsOn: j,
|
|
207
|
+
onApply: ne,
|
|
208
|
+
onCancel: oe,
|
|
209
|
+
onClear: z,
|
|
187
210
|
captionLayout: "dropdown"
|
|
188
211
|
}
|
|
189
212
|
)
|
|
190
213
|
}
|
|
191
214
|
)
|
|
192
215
|
] }),
|
|
193
|
-
|
|
194
|
-
!
|
|
195
|
-
/* @__PURE__ */
|
|
216
|
+
O && /* @__PURE__ */ b("div", { className: N("flex items-center gap-1", C && "text-destructive"), children: [
|
|
217
|
+
!C && /* @__PURE__ */ f(ue, { size: 10, className: "shrink-0 text-muted-foreground" }),
|
|
218
|
+
/* @__PURE__ */ f(
|
|
196
219
|
"p",
|
|
197
220
|
{
|
|
198
|
-
className:
|
|
221
|
+
className: N(
|
|
199
222
|
"text-[10px] text-[#7a8294]",
|
|
200
|
-
|
|
223
|
+
C && "text-destructive"
|
|
201
224
|
),
|
|
202
|
-
children:
|
|
225
|
+
children: O
|
|
203
226
|
}
|
|
204
227
|
)
|
|
205
228
|
] })
|
|
206
229
|
] });
|
|
207
230
|
}
|
|
208
231
|
);
|
|
209
|
-
|
|
232
|
+
ke.displayName = "WeekRangePicker";
|
|
210
233
|
export {
|
|
211
|
-
|
|
234
|
+
ke as WeekRangePicker
|
|
212
235
|
};
|
|
@@ -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?: 1 | 12 | 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
|
};
|