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.
Files changed (115) 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/editors/split-cell-editor.d.ts +5 -0
  5. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
  6. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  7. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
  8. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
  9. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
  10. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
  11. package/dist/components/ui/alert-dialog.js +45 -40
  12. package/dist/components/ui/alert.d.ts +21 -4
  13. package/dist/components/ui/alert.js +45 -25
  14. package/dist/components/ui/avatar.js +19 -16
  15. package/dist/components/ui/badge.js +8 -1
  16. package/dist/components/ui/breadcrumb.js +1 -0
  17. package/dist/components/ui/button-group.d.ts +1 -1
  18. package/dist/components/ui/button-group.js +27 -32
  19. package/dist/components/ui/button-variants.d.ts +1 -1
  20. package/dist/components/ui/button.d.ts +11 -0
  21. package/dist/components/ui/button.js +11 -9
  22. package/dist/components/ui/calendar.d.ts +14 -2
  23. package/dist/components/ui/calendar.js +443 -376
  24. package/dist/components/ui/card.js +7 -6
  25. package/dist/components/ui/checkbox.js +64 -48
  26. package/dist/components/ui/chips.d.ts +1 -0
  27. package/dist/components/ui/chips.js +27 -19
  28. package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
  29. package/dist/components/ui/data-table/data-table-column-list.js +58 -54
  30. package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
  31. package/dist/components/ui/data-table/data-table-sheet.js +43 -40
  32. package/dist/components/ui/data-table/data-table-view-options.js +17 -17
  33. package/dist/components/ui/data-table/data-table.js +21 -20
  34. package/dist/components/ui/date-picker/date-picker.js +83 -87
  35. package/dist/components/ui/date-picker/date-range-picker.js +129 -125
  36. package/dist/components/ui/date-picker/month-picker.js +90 -93
  37. package/dist/components/ui/date-picker/month-range-picker.js +132 -129
  38. package/dist/components/ui/date-picker/multi-date-picker.js +37 -38
  39. package/dist/components/ui/date-picker/multi-month-picker.js +29 -30
  40. package/dist/components/ui/date-picker/multi-week-picker.js +49 -38
  41. package/dist/components/ui/date-picker/week-picker.js +116 -112
  42. package/dist/components/ui/date-picker/week-range-picker.js +153 -142
  43. package/dist/components/ui/dialog.js +15 -6
  44. package/dist/components/ui/drawer.js +16 -13
  45. package/dist/components/ui/dropdown-menu.js +4 -2
  46. package/dist/components/ui/dynamic-layout.d.ts +2 -2
  47. package/dist/components/ui/dynamic-layout.js +18 -15
  48. package/dist/components/ui/empty-container.js +69 -64
  49. package/dist/components/ui/file-upload.js +113 -106
  50. package/dist/components/ui/filter-panel/filter-panel.js +49 -46
  51. package/dist/components/ui/filter-strip/filter-strip.js +41 -37
  52. package/dist/components/ui/header.js +26 -25
  53. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
  54. package/dist/components/ui/hover-card.js +6 -5
  55. package/dist/components/ui/input.d.ts +1 -1
  56. package/dist/components/ui/input.js +79 -68
  57. package/dist/components/ui/loader.d.ts +1 -0
  58. package/dist/components/ui/loader.js +23 -13
  59. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
  60. package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
  61. package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
  62. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
  63. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
  64. package/dist/components/ui/nested-list/nested-list.js +182 -189
  65. package/dist/components/ui/notification-panel/notification-item.js +19 -17
  66. package/dist/components/ui/notification-panel/notification-list.js +21 -21
  67. package/dist/components/ui/notification-panel/notification-panel.js +25 -25
  68. package/dist/components/ui/popover.js +37 -34
  69. package/dist/components/ui/progress.js +12 -10
  70. package/dist/components/ui/prompt.js +29 -27
  71. package/dist/components/ui/radio-group.js +55 -46
  72. package/dist/components/ui/select/components/Submenu.d.ts +1 -2
  73. package/dist/components/ui/select/components/Submenu.js +52 -48
  74. package/dist/components/ui/select/select.js +321 -324
  75. package/dist/components/ui/sheet.js +18 -15
  76. package/dist/components/ui/sidebar.d.ts +2 -2
  77. package/dist/components/ui/sidebar.js +3 -3
  78. package/dist/components/ui/skeleton.d.ts +2 -1
  79. package/dist/components/ui/skeleton.js +12 -11
  80. package/dist/components/ui/slider.js +39 -12
  81. package/dist/components/ui/smart-input.js +44 -39
  82. package/dist/components/ui/stepper.js +33 -29
  83. package/dist/components/ui/switch.js +6 -4
  84. package/dist/components/ui/tabs.js +50 -45
  85. package/dist/components/ui/tag-group.d.ts +2 -1
  86. package/dist/components/ui/tag-group.js +29 -25
  87. package/dist/components/ui/tag.d.ts +1 -0
  88. package/dist/components/ui/tag.js +26 -20
  89. package/dist/components/ui/textarea.js +18 -17
  90. package/dist/components/ui/toast.d.ts +1 -1
  91. package/dist/components/ui/toast.js +47 -41
  92. package/dist/components/ui/toaster.js +42 -42
  93. package/dist/components/ui/tooltip.js +18 -16
  94. package/dist/components/ui/types/date-picker.types.d.ts +33 -0
  95. package/dist/components/ui/types/empty-container.types.d.ts +5 -0
  96. package/dist/components/ui/types/nested-list.types.d.ts +1 -0
  97. package/dist/components/ui/types/select.types.d.ts +0 -1
  98. package/dist/icons/assets/bookmark.svg.js +4 -0
  99. package/dist/icons/assets/bookmark.svg2.js +5 -0
  100. package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
  101. package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
  102. package/dist/icons/assets/download.svg.js +4 -0
  103. package/dist/icons/assets/download.svg2.js +5 -0
  104. package/dist/icons/index.d.ts +20 -6
  105. package/dist/icons/index.js +398 -370
  106. package/dist/impact-nova.css +1 -1
  107. package/dist/index.d.ts +1 -0
  108. package/dist/index.js +318 -314
  109. package/dist/lib/fiscal-calendar.d.ts +62 -0
  110. package/dist/lib/fiscal-calendar.js +99 -0
  111. package/package.json +5 -5
  112. package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
  113. package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
  114. package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
  115. package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
@@ -1,212 +1,223 @@
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 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: n,
12
+ value: t,
12
13
  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);
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 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);
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
- }, 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);
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 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);
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
- }, 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(
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: w(
90
+ className: g(
93
91
  "text-xs font-medium leading-[18px] text-[#60697d]",
94
- h && "opacity-70",
95
- x && "text-destructive"
92
+ x && "opacity-70",
93
+ b && "text-destructive"
96
94
  ),
97
95
  children: [
98
- W,
96
+ I,
99
97
  " ",
100
- E && /* @__PURE__ */ s("span", { className: "text-destructive", children: "*" })
98
+ J && /* @__PURE__ */ i("span", { className: "text-destructive", children: "*" })
101
99
  ]
102
100
  }
103
101
  ),
104
- /* @__PURE__ */ u(ee, { open: c, onOpenChange: k, children: [
105
- /* @__PURE__ */ s(te, { asChild: !0, children: /* @__PURE__ */ u(
102
+ /* @__PURE__ */ u(ce, { open: s, onOpenChange: h, children: [
103
+ /* @__PURE__ */ i(le, { asChild: !0, children: /* @__PURE__ */ u(
106
104
  "div",
107
105
  {
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",
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
- B
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__ */ s(
117
+ /* @__PURE__ */ i(
119
118
  "input",
120
119
  {
121
- ref: T,
120
+ ref: Q,
122
121
  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
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__ */ s(
136
+ /* @__PURE__ */ i(
134
137
  "input",
135
138
  {
136
139
  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"
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
- n?.from && !h && /* @__PURE__ */ s(
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(), R();
160
+ e.stopPropagation(), A();
154
161
  }
155
162
  }
156
163
  ),
157
- /* @__PURE__ */ s(_, { className: "h-4 w-4 text-secondary-foreground" })
164
+ /* @__PURE__ */ i(de, { className: "h-4 w-4 text-secondary-foreground" })
158
165
  ] })
159
166
  ]
160
167
  }
161
168
  ) }),
162
- /* @__PURE__ */ s(
163
- ne,
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
- onInteractOutside: (e) => e.preventDefault(),
169
- children: /* @__PURE__ */ s(
170
- oe,
175
+ children: /* @__PURE__ */ i(
176
+ pe,
171
177
  {
172
178
  pickerType: "week",
173
179
  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,
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
- 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(
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: w(
209
+ className: g(
199
210
  "text-[10px] text-[#7a8294]",
200
- x && "text-destructive"
211
+ b && "text-destructive"
201
212
  ),
202
- children: P
213
+ children: V
203
214
  }
204
215
  )
205
216
  ] })
206
217
  ] });
207
218
  }
208
219
  );
209
- ae.displayName = "WeekRangePicker";
220
+ ue.displayName = "WeekRangePicker";
210
221
  export {
211
- ae as WeekRangePicker
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-[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?: 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 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
  };