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.
Files changed (120) hide show
  1. package/dist/components/layout/dashboard-layout.d.ts +21 -6
  2. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +32 -33
  3. package/dist/components/ui/accordion.js +25 -23
  4. package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +32 -21
  5. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.d.ts +3 -5
  6. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +57 -55
  7. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +5 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
  9. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  10. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
  11. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
  12. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
  13. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
  14. package/dist/components/ui/alert-dialog.js +45 -40
  15. package/dist/components/ui/alert.d.ts +21 -4
  16. package/dist/components/ui/alert.js +45 -25
  17. package/dist/components/ui/avatar.js +19 -16
  18. package/dist/components/ui/badge.js +8 -1
  19. package/dist/components/ui/breadcrumb.js +1 -0
  20. package/dist/components/ui/button-group.d.ts +1 -1
  21. package/dist/components/ui/button-group.js +27 -32
  22. package/dist/components/ui/button-variants.d.ts +1 -1
  23. package/dist/components/ui/button.d.ts +11 -0
  24. package/dist/components/ui/button.js +11 -9
  25. package/dist/components/ui/calendar.d.ts +14 -2
  26. package/dist/components/ui/calendar.js +443 -376
  27. package/dist/components/ui/card.js +7 -6
  28. package/dist/components/ui/checkbox.js +64 -48
  29. package/dist/components/ui/chips.d.ts +1 -0
  30. package/dist/components/ui/chips.js +27 -19
  31. package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
  32. package/dist/components/ui/data-table/data-table-column-list.js +58 -54
  33. package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
  34. package/dist/components/ui/data-table/data-table-sheet.js +43 -40
  35. package/dist/components/ui/data-table/data-table-view-options.js +17 -17
  36. package/dist/components/ui/data-table/data-table.js +21 -20
  37. package/dist/components/ui/date-picker/date-picker.js +93 -93
  38. package/dist/components/ui/date-picker/date-range-picker.js +142 -133
  39. package/dist/components/ui/date-picker/month-picker.js +96 -93
  40. package/dist/components/ui/date-picker/month-range-picker.js +144 -134
  41. package/dist/components/ui/date-picker/multi-date-picker.js +43 -45
  42. package/dist/components/ui/date-picker/multi-month-picker.js +37 -39
  43. package/dist/components/ui/date-picker/multi-week-picker.js +56 -46
  44. package/dist/components/ui/date-picker/week-picker.js +119 -109
  45. package/dist/components/ui/date-picker/week-range-picker.js +170 -147
  46. package/dist/components/ui/dialog.js +15 -6
  47. package/dist/components/ui/drawer.js +16 -13
  48. package/dist/components/ui/dropdown-menu.js +4 -2
  49. package/dist/components/ui/dynamic-layout.d.ts +2 -2
  50. package/dist/components/ui/dynamic-layout.js +18 -15
  51. package/dist/components/ui/empty-container.js +69 -64
  52. package/dist/components/ui/file-upload.js +113 -106
  53. package/dist/components/ui/filter-panel/filter-panel.js +49 -46
  54. package/dist/components/ui/filter-strip/filter-strip.js +41 -37
  55. package/dist/components/ui/header.js +26 -25
  56. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
  57. package/dist/components/ui/hover-card.js +6 -5
  58. package/dist/components/ui/input.d.ts +1 -1
  59. package/dist/components/ui/input.js +79 -68
  60. package/dist/components/ui/loader.d.ts +1 -0
  61. package/dist/components/ui/loader.js +23 -13
  62. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
  63. package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
  64. package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
  65. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
  66. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
  67. package/dist/components/ui/nested-list/nested-list.js +182 -189
  68. package/dist/components/ui/notification-panel/notification-item.js +19 -17
  69. package/dist/components/ui/notification-panel/notification-list.js +21 -21
  70. package/dist/components/ui/notification-panel/notification-panel.js +25 -25
  71. package/dist/components/ui/popover.js +37 -34
  72. package/dist/components/ui/progress.js +12 -10
  73. package/dist/components/ui/prompt.js +29 -27
  74. package/dist/components/ui/radio-group.js +55 -46
  75. package/dist/components/ui/select/components/Submenu.d.ts +1 -2
  76. package/dist/components/ui/select/components/Submenu.js +52 -48
  77. package/dist/components/ui/select/select.js +321 -324
  78. package/dist/components/ui/sheet.js +18 -15
  79. package/dist/components/ui/sidebar.d.ts +2 -2
  80. package/dist/components/ui/sidebar.js +3 -3
  81. package/dist/components/ui/skeleton.d.ts +2 -1
  82. package/dist/components/ui/skeleton.js +12 -11
  83. package/dist/components/ui/slider.js +39 -12
  84. package/dist/components/ui/smart-input.js +44 -39
  85. package/dist/components/ui/stepper.js +33 -29
  86. package/dist/components/ui/switch.js +6 -4
  87. package/dist/components/ui/tabs.js +50 -45
  88. package/dist/components/ui/tag-group.d.ts +2 -1
  89. package/dist/components/ui/tag-group.js +29 -25
  90. package/dist/components/ui/tag.d.ts +1 -0
  91. package/dist/components/ui/tag.js +26 -20
  92. package/dist/components/ui/textarea.js +18 -17
  93. package/dist/components/ui/toast.d.ts +1 -1
  94. package/dist/components/ui/toast.js +47 -41
  95. package/dist/components/ui/toaster.js +42 -42
  96. package/dist/components/ui/tooltip.js +18 -16
  97. package/dist/components/ui/types/date-picker.types.d.ts +33 -0
  98. package/dist/components/ui/types/empty-container.types.d.ts +5 -0
  99. package/dist/components/ui/types/nested-list.types.d.ts +1 -0
  100. package/dist/components/ui/types/select.types.d.ts +0 -1
  101. package/dist/icons/assets/bookmark.svg.js +4 -0
  102. package/dist/icons/assets/bookmark.svg2.js +5 -0
  103. package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
  104. package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
  105. package/dist/icons/assets/download.svg.js +4 -0
  106. package/dist/icons/assets/download.svg2.js +5 -0
  107. package/dist/icons/index.d.ts +20 -6
  108. package/dist/icons/index.js +398 -370
  109. package/dist/impact-nova.css +1 -1
  110. package/dist/index.d.ts +1 -0
  111. package/dist/index.js +318 -314
  112. package/dist/lib/fiscal-calendar.d.ts +62 -0
  113. package/dist/lib/fiscal-calendar.js +99 -0
  114. package/dist/lib/utils.d.ts +2 -1
  115. package/dist/lib/utils.js +29 -13
  116. package/package.json +5 -5
  117. package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
  118. package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
  119. package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
  120. package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
@@ -1,212 +1,235 @@
1
- import { jsxs as u, jsx as s } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { X as $ } from "lucide-react";
4
- import { CalendarMonth as _, Info as F } from "../../../icons/index.js";
5
- import { format as f, parse as M, isValid as S } from "date-fns";
6
- import { cn as w, maskDate as O } from "../../../lib/utils.js";
7
- import { Popover as ee, PopoverTrigger as te, PopoverContent as ne } from "../popover.js";
8
- import { Calendar as oe } from "../calendar.js";
9
- const ae = d.forwardRef(
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: n,
12
- onChange: p,
13
- format: o = "MM/dd/yyyy",
14
- minDate: I,
15
- maxDate: V,
16
- fromYear: A,
17
- toYear: j,
18
- showFooter: m = !0,
19
- disabled: h,
20
- className: B,
21
- isError: x,
22
- size: v,
23
- label: W,
24
- helperText: P,
25
- required: E,
26
- prefix: re,
27
- prefixClick: se,
28
- ...L
29
- }, T) => {
30
- const [c, k] = d.useState(!1), [a, i] = d.useState(n), [Y, D] = d.useState(n?.from ? f(n.from.startDate, o) : ""), [z, y] = d.useState(n?.to ? f(n.to.endDate, o) : ""), [X, b] = d.useState(n?.from?.startDate || /* @__PURE__ */ new Date());
31
- d.useEffect(() => {
32
- D(n?.from ? f(n.from.startDate, o) : ""), y(n?.to ? f(n.to.endDate, o) : "");
33
- }, [n, o]), d.useEffect(() => {
34
- console.log("[WeekRangePicker] useEffect - open:", c, "value:", n, "pendingRange:", a), c && (i(n), b(n?.from?.startDate || /* @__PURE__ */ new Date()));
35
- }, [c]);
36
- const q = (e) => {
37
- console.log("[WeekRangePicker] handleSelect called:", e), i(e), !m && e?.from && e?.to && (console.log("[WeekRangePicker] No footer - applying immediately"), p?.(e), k(!1));
38
- }, G = (e) => {
39
- const t = e;
40
- D(t?.from ? f(t.from.startDate, o) : ""), y(t?.to ? f(t.to.endDate, o) : "");
41
- }, H = (e) => {
42
- const t = e !== void 0 ? e : a;
43
- console.log("[WeekRangePicker] handleApply called, appliedRange:", e, "pendingRange:", a, "using:", t), p?.(t), k(!1);
44
- }, J = () => {
45
- console.log("[WeekRangePicker] handleCancel called"), i(n), k(!1);
46
- }, R = () => {
47
- console.log("[WeekRangePicker] handleClear called"), i(void 0), D(""), y(""), p?.(void 0), m || k(!1);
48
- }, C = (e) => {
49
- const t = new Date(e);
50
- t.setDate(e.getDate() - e.getDay());
51
- const r = new Date(t);
52
- r.setDate(t.getDate() + 6);
53
- const g = new Date(t.getFullYear(), t.getMonth(), 1).getDay(), U = t.getDate(), Z = Math.ceil((U + g) / 7);
54
- return {
55
- year: t.getFullYear(),
56
- month: t.getMonth(),
57
- weekOfMonth: Z,
58
- startDate: t,
59
- endDate: r
60
- };
61
- }, K = (e) => {
62
- const t = O(e.target.value, o);
63
- if (D(t), t === "") {
64
- const l = { from: void 0, to: a?.to };
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 r = M(t, o, /* @__PURE__ */ new Date());
69
- if (S(r)) {
70
- const g = { from: C(r), to: a?.to };
71
- i(g), b(r), m || p?.(g);
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
- }, Q = (e) => {
74
- const t = O(e.target.value, o);
75
- if (y(t), t === "") {
76
- const l = { from: a?.from, to: void 0 };
77
- i(l), m || p?.(l);
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 r = M(t, o, /* @__PURE__ */ new Date());
81
- if (S(r)) {
82
- const l = C(r), g = { from: a?.from, to: l };
83
- i(g), b(r), m || p?.(g);
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
- }, N = () => {
86
- D(a?.from ? f(a.from.startDate, o) : ""), y(a?.to ? f(a.to.endDate, o) : "");
87
- };
88
- return /* @__PURE__ */ u("div", { className: "w-full space-y-1.5 min-w-[240px]", children: [
89
- W && /* @__PURE__ */ u(
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: w(
102
+ className: N(
93
103
  "text-xs font-medium leading-[18px] text-[#60697d]",
94
- h && "opacity-70",
95
- x && "text-destructive"
104
+ w && "opacity-70",
105
+ C && "text-destructive"
96
106
  ),
97
107
  children: [
98
- W,
108
+ L,
99
109
  " ",
100
- E && /* @__PURE__ */ s("span", { className: "text-destructive", children: "*" })
110
+ Z && /* @__PURE__ */ f("span", { className: "text-destructive", children: "*" })
101
111
  ]
102
112
  }
103
113
  ),
104
- /* @__PURE__ */ u(ee, { open: c, onOpenChange: k, children: [
105
- /* @__PURE__ */ s(te, { asChild: !0, children: /* @__PURE__ */ u(
114
+ /* @__PURE__ */ b(ge, { open: i, onOpenChange: I, children: [
115
+ /* @__PURE__ */ f(xe, { asChild: !0, children: /* @__PURE__ */ b(
106
116
  "div",
107
117
  {
108
- className: w(
109
- "flex w-full items-center justify-between gap-2 rounded-md border bg-transparent 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",
110
- x ? "border-destructive hover:border-destructive" : "border-input",
111
- v === "sm" ? "h-6" : v === "md" ? "h-[28px]" : "h-8",
112
- h && "pointer-events-none opacity-100 bg-disabled-secondary-bg border-border text-disabled-text hover:border-border",
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
- B
125
+ U
115
126
  ),
116
127
  children: [
117
- /* @__PURE__ */ u("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
118
- /* @__PURE__ */ s(
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: T,
132
+ ref: $,
122
133
  type: "text",
123
- value: Y,
124
- onChange: K,
125
- onBlur: N,
126
- onClick: (e) => c && e.stopPropagation(),
127
- placeholder: c ? o : "Start Week",
128
- disabled: !!h,
129
- className: "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",
130
- ...L
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__ */ s(
148
+ /* @__PURE__ */ f(
134
149
  "input",
135
150
  {
151
+ ref: F,
136
152
  type: "text",
137
- value: z,
138
- onChange: Q,
139
- onBlur: N,
140
- onClick: (e) => c && e.stopPropagation(),
141
- placeholder: c ? o : "End Week",
142
- disabled: !!h,
143
- className: "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"
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__ */ u("div", { className: "flex items-center gap-1 shrink-0", children: [
148
- n?.from && !h && /* @__PURE__ */ s(
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: (e) => {
153
- e.stopPropagation(), R();
172
+ onClick: (n) => {
173
+ n.stopPropagation(), z();
154
174
  }
155
175
  }
156
176
  ),
157
- /* @__PURE__ */ s(_, { className: "h-4 w-4 text-secondary-foreground" })
177
+ /* @__PURE__ */ f(me, { className: "h-4 w-4 text-secondary-foreground" })
158
178
  ] })
159
179
  ]
160
180
  }
161
181
  ) }),
162
- /* @__PURE__ */ s(
163
- ne,
182
+ /* @__PURE__ */ f(
183
+ he,
164
184
  {
165
185
  className: "w-auto p-0",
166
186
  align: "start",
167
- onOpenAutoFocus: (e) => e.preventDefault(),
168
- onInteractOutside: (e) => e.preventDefault(),
169
- children: /* @__PURE__ */ s(
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: a,
175
- onWeekSelect: q,
176
- onPendingChange: G,
177
- month: X,
178
- onMonthChange: b,
179
- fromDate: I,
180
- toDate: V,
181
- fromYear: A,
182
- toYear: j,
183
- showFooter: m,
184
- onApply: H,
185
- onCancel: J,
186
- onClear: R,
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
- P && /* @__PURE__ */ u("div", { className: w("flex items-center gap-1", x && "text-destructive"), children: [
194
- !x && /* @__PURE__ */ s(F, { size: 10, className: "shrink-0 text-muted-foreground" }),
195
- /* @__PURE__ */ s(
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: w(
221
+ className: N(
199
222
  "text-[10px] text-[#7a8294]",
200
- x && "text-destructive"
223
+ C && "text-destructive"
201
224
  ),
202
- children: P
225
+ children: O
203
226
  }
204
227
  )
205
228
  ] })
206
229
  ] });
207
230
  }
208
231
  );
209
- ae.displayName = "WeekRangePicker";
232
+ ke.displayName = "WeekRangePicker";
210
233
  export {
211
- ae as WeekRangePicker
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-[300] 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",
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-[300] 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
+ "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(t.Close, { 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 z-[60]", children: [
33
- /* @__PURE__ */ o(m, { className: "h-4 w-4" }),
34
- /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
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 i } from "react/jsx-runtime";
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 n = ({
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
- n.displayName = "Drawer";
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 }, m) => /* @__PURE__ */ i(c, { children: [
25
+ const p = l.forwardRef(({ className: e, children: r, ...o }, i) => /* @__PURE__ */ n(c, { children: [
26
26
  /* @__PURE__ */ t(d, {}),
27
- /* @__PURE__ */ i(
27
+ /* @__PURE__ */ n(
28
28
  a.Content,
29
29
  {
30
- ref: m,
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 f = ({
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
- f.displayName = "DrawerHeader";
55
- const w = ({
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
- w.displayName = "DrawerFooter";
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
- n as Drawer,
91
+ m as Drawer,
89
92
  b as DrawerClose,
90
93
  p as DrawerContent,
91
94
  x as DrawerDescription,
92
- w as DrawerFooter,
93
- f as DrawerHeader,
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-[200] 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]",
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-[200] 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
+ "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 | 12 | 6;
6
- gap?: "none" | "sm" | "md" | "lg" | "xl";
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 c } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import { cva as g } from "class-variance-authority";
4
- import { cn as d } from "../../lib/utils.js";
5
- const e = g("", {
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
- }), n = m.forwardRef(
33
- ({ className: a, layout: o, columns: r, gap: i, children: l, ...s }, t) => /* @__PURE__ */ c(
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: t,
37
- className: d(
38
- e({ layout: o, columns: r, gap: i }),
39
- a
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
- ...s,
42
- children: l
44
+ ...l,
45
+ children: i
43
46
  }
44
47
  )
45
48
  );
46
- n.displayName = "DynamicLayout";
49
+ f.displayName = "DynamicLayout";
47
50
  export {
48
- n as DynamicLayout,
51
+ f as DynamicLayout,
49
52
  e as dynamicLayoutVariants
50
53
  };