asheeui 0.6.14 → 0.7.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 (184) hide show
  1. package/README.md +1 -14
  2. package/dist/AsheeUIProvider.js +22 -24
  3. package/dist/components/accordion/Accordion.js +79 -173
  4. package/dist/components/accordion/accordion-config.js +12 -13
  5. package/dist/components/accordion/accordion-styles.js +21 -24
  6. package/dist/components/autocomplete/Autocomplete.js +78 -136
  7. package/dist/components/autocomplete/autocomplete-config.js +7 -12
  8. package/dist/components/button/Button.d.ts +29 -1
  9. package/dist/components/button/Button.d.ts.map +1 -1
  10. package/dist/components/button/Button.js +47 -108
  11. package/dist/components/button/button-config.js +16 -17
  12. package/dist/components/button/button-styles.js +10 -11
  13. package/dist/components/card/Card.d.ts +36 -16
  14. package/dist/components/card/Card.d.ts.map +1 -1
  15. package/dist/components/card/Card.js +115 -205
  16. package/dist/components/card/card-config.js +24 -21
  17. package/dist/components/card/card-styles.js +19 -22
  18. package/dist/components/carousel/Carousel.js +123 -248
  19. package/dist/components/carousel/carousel-config.js +24 -25
  20. package/dist/components/carousel/carousel-styles.js +14 -16
  21. package/dist/components/chip/Chip.js +84 -191
  22. package/dist/components/chip/chip-config.js +13 -14
  23. package/dist/components/chip/chip-styles.js +22 -26
  24. package/dist/components/date-picker/Calendar.d.ts +3 -3
  25. package/dist/components/date-picker/Calendar.d.ts.map +1 -1
  26. package/dist/components/date-picker/Calendar.js +141 -222
  27. package/dist/components/date-picker/DatePicker.d.ts +5 -5
  28. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  29. package/dist/components/date-picker/DatePicker.js +122 -220
  30. package/dist/components/date-picker/TimeSpinner.js +58 -82
  31. package/dist/components/date-picker/date-picker-config.d.ts +4 -4
  32. package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
  33. package/dist/components/date-picker/date-picker-config.js +10 -11
  34. package/dist/components/date-picker/date-picker-styles.js +44 -45
  35. package/dist/components/date-picker/date-picker.helpers.d.ts +4 -4
  36. package/dist/components/date-picker/date-picker.helpers.d.ts.map +1 -1
  37. package/dist/components/date-picker/date-picker.helpers.js +74 -102
  38. package/dist/components/drawer/Drawer.d.ts +26 -8
  39. package/dist/components/drawer/Drawer.d.ts.map +1 -1
  40. package/dist/components/drawer/Drawer.js +54 -131
  41. package/dist/components/drawer/drawer-config.js +14 -15
  42. package/dist/components/drawer/drawer-styles.js +38 -42
  43. package/dist/components/field/FieldShell.js +49 -56
  44. package/dist/components/field/field-config.js +17 -18
  45. package/dist/components/field/field-styles.js +8 -8
  46. package/dist/components/image/Image.d.ts +7 -7
  47. package/dist/components/image/Image.d.ts.map +1 -1
  48. package/dist/components/image/Image.js +65 -132
  49. package/dist/components/image/image-config.js +17 -18
  50. package/dist/components/image/image-styles.js +14 -15
  51. package/dist/components/input/Input.js +65 -150
  52. package/dist/components/input/PasswordInput.js +30 -49
  53. package/dist/components/input/input-config.js +7 -7
  54. package/dist/components/input/input-styles.js +9 -10
  55. package/dist/components/keyboard/KeyboardContext.js +10 -11
  56. package/dist/components/keyboard/KeyboardProvider.js +100 -181
  57. package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
  58. package/dist/components/keyboard/OnScreenKeyboard.js +159 -166
  59. package/dist/components/keyboard/keyboard-config.js +59 -57
  60. package/dist/components/keyboard/keyboard-styles.js +10 -11
  61. package/dist/components/keyboard/use-keyboard-field.js +29 -21
  62. package/dist/components/link/Link.js +47 -137
  63. package/dist/components/link/link-config.js +14 -15
  64. package/dist/components/link/link-styles.js +25 -29
  65. package/dist/components/marquee/Marquee.js +55 -144
  66. package/dist/components/marquee/marquee-config.js +18 -19
  67. package/dist/components/marquee/marquee-styles.js +13 -15
  68. package/dist/components/modal/Modal.d.ts +26 -10
  69. package/dist/components/modal/Modal.d.ts.map +1 -1
  70. package/dist/components/modal/Modal.js +56 -136
  71. package/dist/components/modal/modal-config.js +15 -16
  72. package/dist/components/modal/modal-styles.js +13 -14
  73. package/dist/components/multi-select/MultiSelect.d.ts +18 -2
  74. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
  75. package/dist/components/multi-select/MultiSelect.js +149 -283
  76. package/dist/components/multi-select/multi-select-config.d.ts +23 -18
  77. package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
  78. package/dist/components/multi-select/multi-select-config.js +18 -21
  79. package/dist/components/multi-select/multi-select-styles.js +17 -20
  80. package/dist/components/radio/Radio.js +43 -80
  81. package/dist/components/radio/RadioGroup.js +57 -155
  82. package/dist/components/radio/radio-config.js +15 -16
  83. package/dist/components/radio/radio-context.js +6 -6
  84. package/dist/components/radio/radio-styles.js +55 -60
  85. package/dist/components/resizable-screen/ResizableScreen.js +87 -177
  86. package/dist/components/resizable-screen/resizable-screen-config.js +16 -17
  87. package/dist/components/select/Select.d.ts +3 -2
  88. package/dist/components/select/Select.d.ts.map +1 -1
  89. package/dist/components/select/Select.js +97 -195
  90. package/dist/components/select/select-config.js +8 -9
  91. package/dist/components/select/select-styles.js +5 -5
  92. package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
  93. package/dist/components/select-menu/SelectMenu.js +102 -196
  94. package/dist/components/select-menu/select-menu-config.js +12 -12
  95. package/dist/components/select-menu/use-select-floating.d.ts +11 -1
  96. package/dist/components/select-menu/use-select-floating.d.ts.map +1 -1
  97. package/dist/components/select-menu/use-select-floating.js +41 -48
  98. package/dist/components/sidebar/Sidebar.d.ts +43 -22
  99. package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
  100. package/dist/components/sidebar/Sidebar.js +146 -331
  101. package/dist/components/sidebar/sidebar-config.d.ts +98 -31
  102. package/dist/components/sidebar/sidebar-config.d.ts.map +1 -1
  103. package/dist/components/sidebar/sidebar-config.js +47 -33
  104. package/dist/components/sidebar/sidebar-styles.js +27 -32
  105. package/dist/components/spinner/spinner-config.js +12 -13
  106. package/dist/components/spinner/spinner-styles.js +13 -14
  107. package/dist/components/spinner/spinner.js +39 -82
  108. package/dist/components/switch/Switch.js +62 -154
  109. package/dist/components/switch/switch-config.js +11 -12
  110. package/dist/components/switch/switch-styles.js +14 -16
  111. package/dist/components/table/Table.js +64 -186
  112. package/dist/components/table/table-config.js +17 -18
  113. package/dist/components/table/table-styles.js +48 -52
  114. package/dist/components/tabs/Tabs.d.ts +16 -8
  115. package/dist/components/tabs/Tabs.d.ts.map +1 -1
  116. package/dist/components/tabs/Tabs.js +93 -208
  117. package/dist/components/tabs/tabs-config.d.ts +42 -20
  118. package/dist/components/tabs/tabs-config.d.ts.map +1 -1
  119. package/dist/components/tabs/tabs-config.js +26 -18
  120. package/dist/components/tabs/tabs-styles.js +15 -17
  121. package/dist/components/textarea/Textarea.js +52 -138
  122. package/dist/components/textarea/textarea-config.js +10 -11
  123. package/dist/components/textarea/textarea-styles.js +9 -10
  124. package/dist/components/toast/ToastContext.js +22 -26
  125. package/dist/components/toast/ToastItem.js +82 -144
  126. package/dist/components/toast/ToastProvider.d.ts.map +1 -1
  127. package/dist/components/toast/ToastProvider.js +128 -190
  128. package/dist/components/toast/toast-config.js +23 -24
  129. package/dist/components/toast/toast-styles.js +50 -55
  130. package/dist/components/toast/use-pausable-timeout.js +17 -13
  131. package/dist/components/tooltip/Tooltip.d.ts +5 -0
  132. package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
  133. package/dist/components/tooltip/Tooltip.js +68 -158
  134. package/dist/components/tooltip/tooltip-config.d.ts +25 -0
  135. package/dist/components/tooltip/tooltip-config.d.ts.map +1 -1
  136. package/dist/components/tooltip/tooltip-config.js +26 -22
  137. package/dist/components/tooltip/tooltip-styles.js +15 -17
  138. package/dist/config/default-config.js +11 -34
  139. package/dist/config/resolve-color.js +23 -23
  140. package/dist/config/resolve-config.d.ts.map +1 -1
  141. package/dist/config/resolve-config.js +14 -12
  142. package/dist/icons/ArrowLeftIcon.js +16 -19
  143. package/dist/icons/CalendarIcon.js +43 -24
  144. package/dist/icons/CheckIcon.js +16 -19
  145. package/dist/icons/ChevronDownIcon.js +15 -21
  146. package/dist/icons/ChevronLeftIcon.js +16 -19
  147. package/dist/icons/ChevronRightIcon.js +16 -19
  148. package/dist/icons/ChevronUpIcon.js +16 -19
  149. package/dist/icons/ClearIcon.js +26 -22
  150. package/dist/icons/ClockIcon.js +20 -22
  151. package/dist/icons/CloseIcon.js +26 -22
  152. package/dist/icons/ErrorIcon.js +16 -19
  153. package/dist/icons/ExternalLinkIcon.js +25 -23
  154. package/dist/icons/EyeIcon.js +20 -22
  155. package/dist/icons/EyeOffIcon.js +21 -22
  156. package/dist/icons/InfoIcon.js +16 -19
  157. package/dist/icons/SearchIcon.js +25 -22
  158. package/dist/icons/WarningIcon.js +16 -19
  159. package/dist/index.js +65 -163
  160. package/dist/libs/context.js +10 -13
  161. package/dist/libs/index.js +1 -0
  162. package/dist/libs/registry.js +10 -12
  163. package/dist/libs/use-floating-z-index.d.ts +32 -0
  164. package/dist/libs/use-floating-z-index.d.ts.map +1 -0
  165. package/dist/libs/use-floating-z-index.js +16 -0
  166. package/dist/libs/use-isomorphic-layout-effect.js +5 -5
  167. package/dist/scripts/AsheeThemeScript.js +35 -44
  168. package/dist/shared/radius.d.ts.map +1 -1
  169. package/dist/shared/radius.js +12 -13
  170. package/dist/shared/variant.js +46 -134
  171. package/dist/theme/color.js +28 -28
  172. package/dist/theme/controller.d.ts.map +1 -1
  173. package/dist/theme/controller.js +65 -178
  174. package/dist/theme/useTheme.js +13 -44
  175. package/dist/utils/cn.js +7 -7
  176. package/dist/utils/index.d.ts +1 -0
  177. package/dist/utils/index.d.ts.map +1 -1
  178. package/dist/utils/index.js +1 -0
  179. package/dist/utils/merge-object.js +13 -14
  180. package/dist/utils/resolve-token.js +11 -14
  181. package/dist/utils/stacking.d.ts +76 -0
  182. package/dist/utils/stacking.d.ts.map +1 -0
  183. package/dist/utils/stacking.js +34 -0
  184. package/package.json +12 -11
@@ -1,224 +1,143 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
3
- import { memo as q, useState as f, useMemo as B } from "react";
4
- import { ChevronLeftIcon as J } from "../../icons/ChevronLeftIcon.js";
5
- import { ChevronRightIcon as Q } from "../../icons/ChevronRightIcon.js";
6
- import { buildDayCells as U, MONTHS as X, DAYS_OF_WEEK as tt } from "./date-picker.helpers.js";
7
- import { CALENDAR_COLOR_CLASSES as L, DATE_PICKER_CELL_SIZE_CLASS as nt } from "./date-picker-styles.js";
8
- import { TimeSpinner as y } from "./TimeSpinner.js";
9
- import { cn as u } from "../../utils/cn.js";
10
- const mt = q(function({
11
- selected: n,
12
- mode: s,
13
- isClearable: C,
14
- resolvedSizeKey: j,
15
- resolvedColor: h,
16
- radiusClass: i,
17
- onSelect: v,
18
- onClose: w,
19
- disableFuture: Y = !1
20
- }) {
21
- const r = /* @__PURE__ */ new Date(), [l, k] = f(
22
- (n == null ? void 0 : n.getFullYear()) ?? r.getFullYear()
23
- ), [a, g] = f(
24
- (n == null ? void 0 : n.getMonth()) ?? r.getMonth()
25
- ), [b, A] = f((n == null ? void 0 : n.getHours()) ?? 0), [p, H] = f((n == null ? void 0 : n.getMinutes()) ?? 0), [x, T] = f((n == null ? void 0 : n.getSeconds()) ?? 0), m = L[h] ?? L.primary;
26
- function M(t, e, Z) {
27
- const S = n ?? /* @__PURE__ */ new Date();
28
- v(
29
- new Date(S.getFullYear(), S.getMonth(), S.getDate(), t, e, Z, 0)
30
- );
31
- }
32
- function I(t) {
33
- A(t), M(t, p, x);
34
- }
35
- function O(t) {
36
- H(t), M(b, t, x);
37
- }
38
- function R(t) {
39
- T(t), M(b, p, t);
40
- }
41
- function K(t) {
42
- v(new Date(l, a, t, b, p, x, 0)), s === "date" && w();
43
- }
44
- function P() {
45
- a === 0 ? (g(11), k((t) => t - 1)) : g((t) => t - 1);
46
- }
47
- function V() {
48
- a === 11 ? (g(0), k((t) => t + 1)) : g((t) => t + 1);
49
- }
50
- function d(t) {
51
- return !!n && n.getFullYear() === l && n.getMonth() === a && n.getDate() === t;
52
- }
53
- function N(t) {
54
- return r.getFullYear() === l && r.getMonth() === a && r.getDate() === t;
55
- }
56
- const $ = new Date(
57
- r.getFullYear(),
58
- r.getMonth(),
59
- r.getDate()
60
- );
61
- function D(t) {
62
- return Y ? new Date(l, a, t) > $ : !1;
63
- }
64
- const F = !Y || l < r.getFullYear() || l === r.getFullYear() && a < r.getMonth(), E = s === "date" || s === "datetime", z = s === "time" || s === "datetime", G = s !== "date" || C && !!n, _ = U(l, a), W = B(() => _.map((t, e) => ({
65
- key: t !== null ? `day-${t}` : `empty-slot-${e}`,
66
- day: t
67
- })), [_]);
68
- return /* @__PURE__ */ c(
69
- "div",
70
- {
71
- className: u(
72
- "bg-background border border-border/70 shadow-xl select-none p-4 w-max",
73
- i
74
- ),
75
- children: [
76
- /* @__PURE__ */ c("div", { className: "flex flex-row", children: [
77
- E && /* @__PURE__ */ c("div", { className: "flex flex-col w-[264px]", children: [
78
- /* @__PURE__ */ c("div", { className: "flex items-center justify-between pb-3 mb-2 border-b border-border/60", children: [
79
- /* @__PURE__ */ o(
80
- "button",
81
- {
82
- type: "button",
83
- onClick: P,
84
- "aria-label": "Previous month",
85
- className: u(
86
- "p-1.5 text-foreground/70 transition-all active:scale-95",
87
- "hover:text-foreground hover:bg-secondary",
88
- i
89
- ),
90
- children: /* @__PURE__ */ o(J, {})
91
- }
92
- ),
93
- /* @__PURE__ */ c("span", { className: "font-semibold text-sm text-foreground tracking-wide", children: [
94
- X[a],
95
- " ",
96
- l
97
- ] }),
98
- /* @__PURE__ */ o(
99
- "button",
100
- {
101
- type: "button",
102
- onClick: V,
103
- disabled: !F,
104
- "aria-label": "Next month",
105
- className: u(
106
- "p-1.5 text-foreground/70 transition-all",
107
- F ? "hover:text-foreground hover:bg-secondary active:scale-95" : "opacity-30 cursor-not-allowed",
108
- i
109
- ),
110
- children: /* @__PURE__ */ o(Q, {})
111
- }
112
- )
113
- ] }),
114
- /* @__PURE__ */ c("div", { className: "grid grid-cols-7 gap-1 text-center", children: [
115
- tt.map((t) => /* @__PURE__ */ o(
116
- "div",
117
- {
118
- className: "text-[11px] font-bold tracking-wider text-foreground/50 uppercase py-1 mb-1",
119
- children: t
120
- },
121
- t
122
- )),
123
- W.map(
124
- ({ key: t, day: e }) => e === null ? /* @__PURE__ */ o("div", {}, t) : /* @__PURE__ */ o(
125
- "button",
126
- {
127
- type: "button",
128
- onClick: () => K(e),
129
- disabled: D(e),
130
- className: u(
131
- "w-full flex items-center justify-center font-medium transition-all duration-200",
132
- nt[j],
133
- i,
134
- D(e) ? "opacity-30 cursor-not-allowed text-foreground/50" : "active:scale-90",
135
- !D(e) && !d(e) && !N(e) && m.hover,
136
- d(e) && u(m.bg, "font-semibold shadow-sm"),
137
- N(e) && !d(e) && u("border", m.border, m.text),
138
- !d(e) && !N(e) && "text-foreground"
139
- ),
140
- children: e
141
- },
142
- e
143
- )
144
- )
145
- ] })
146
- ] }),
147
- z && /* @__PURE__ */ c(
148
- "div",
149
- {
150
- className: u(
151
- "flex items-center justify-center gap-4",
152
- E && "pl-5 ml-4 border-l border-border/60"
153
- ),
154
- children: [
155
- /* @__PURE__ */ o(
156
- y,
157
- {
158
- value: b,
159
- max: 23,
160
- label: "HH",
161
- onChange: I,
162
- resolvedColor: h,
163
- radiusClass: i
164
- }
165
- ),
166
- /* @__PURE__ */ o(
167
- y,
168
- {
169
- value: p,
170
- max: 59,
171
- label: "MM",
172
- onChange: O,
173
- resolvedColor: h,
174
- radiusClass: i
175
- }
176
- ),
177
- /* @__PURE__ */ o(
178
- y,
179
- {
180
- value: x,
181
- max: 59,
182
- label: "SS",
183
- onChange: R,
184
- resolvedColor: h,
185
- radiusClass: i
186
- }
187
- )
188
- ]
189
- }
190
- )
191
- ] }),
192
- G && /* @__PURE__ */ c("div", { className: "flex items-center justify-between border-t border-border/60 pt-3 mt-3", children: [
193
- C && n ? /* @__PURE__ */ o(
194
- "button",
195
- {
196
- type: "button",
197
- onClick: () => {
198
- v(null), w();
199
- },
200
- className: "text-xs font-medium text-foreground/50 hover:text-danger transition-colors active:scale-95 px-2 py-1",
201
- children: "Clear"
202
- }
203
- ) : /* @__PURE__ */ o("div", {}),
204
- s !== "date" && /* @__PURE__ */ o(
205
- "button",
206
- {
207
- type: "button",
208
- onClick: w,
209
- className: u(
210
- "ml-auto text-xs font-semibold px-4 py-2 transition-all hover:opacity-90 active:scale-95 shadow-sm",
211
- i,
212
- m.bg
213
- ),
214
- children: "Done"
215
- }
216
- )
217
- ] })
218
- ]
219
- }
220
- );
2
+ import { cn as e } from "../../utils/cn.js";
3
+ import { ChevronLeftIcon as t } from "../../icons/ChevronLeftIcon.js";
4
+ import { ChevronRightIcon as n } from "../../icons/ChevronRightIcon.js";
5
+ import { DAYS_OF_WEEK as r, MONTHS as i, buildDayCells as a } from "./date-picker.helpers.js";
6
+ import { CALENDAR_COLOR_CLASSES as o, DATE_PICKER_CELL_SIZE_CLASS as s } from "./date-picker-styles.js";
7
+ import { TimeSpinner as c } from "./TimeSpinner.js";
8
+ import { memo as l, useMemo as u, useState as d } from "react";
9
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
10
+ //#region src/components/date-picker/Calendar.tsx
11
+ var m = l(function({ selected: l, mode: m, isClearable: h, resolvedSizeKey: g, resolvedColor: _, radiusClass: v, onSelect: y, onClose: b, disableFuture: x = !1 }) {
12
+ let S = /* @__PURE__ */ new Date(), [C, w] = d(l?.getFullYear() ?? S.getFullYear()), [T, E] = d(l?.getMonth() ?? S.getMonth()), [D, O] = d(l?.getHours() ?? 0), [k, A] = d(l?.getMinutes() ?? 0), [j, M] = d(l?.getSeconds() ?? 0), N = o[_] ?? o.primary;
13
+ function P(e, t, n) {
14
+ let r = l ?? /* @__PURE__ */ new Date();
15
+ y(new Date(r.getFullYear(), r.getMonth(), r.getDate(), e, t, n, 0));
16
+ }
17
+ function F(e) {
18
+ O(e), P(e, k, j);
19
+ }
20
+ function I(e) {
21
+ A(e), P(D, e, j);
22
+ }
23
+ function L(e) {
24
+ M(e), P(D, k, e);
25
+ }
26
+ function R(e) {
27
+ y(new Date(C, T, e, D, k, j, 0)), m === "date" && b();
28
+ }
29
+ function z() {
30
+ T === 0 ? (E(11), w((e) => e - 1)) : E((e) => e - 1);
31
+ }
32
+ function B() {
33
+ T === 11 ? (E(0), w((e) => e + 1)) : E((e) => e + 1);
34
+ }
35
+ function V(e) {
36
+ return !!l && l.getFullYear() === C && l.getMonth() === T && l.getDate() === e;
37
+ }
38
+ function H(e) {
39
+ return S.getFullYear() === C && S.getMonth() === T && S.getDate() === e;
40
+ }
41
+ let U = new Date(S.getFullYear(), S.getMonth(), S.getDate());
42
+ function W(e) {
43
+ return x ? new Date(C, T, e) > U : !1;
44
+ }
45
+ let G = !x || C < S.getFullYear() || C === S.getFullYear() && T < S.getMonth(), K = m === "date" || m === "datetime", q = m === "time" || m === "datetime", J = m !== "date" || h && !!l, Y = a(C, T), X = u(() => Y.map((e, t) => ({
46
+ key: e === null ? `empty-slot-${t}` : `day-${e}`,
47
+ day: e
48
+ })), [Y]);
49
+ return /* @__PURE__ */ p("div", {
50
+ className: e("bg-background border border-border/70 shadow-xl select-none p-4 w-max", v),
51
+ children: [/* @__PURE__ */ p("div", {
52
+ className: "flex flex-row",
53
+ children: [K && /* @__PURE__ */ p("div", {
54
+ className: "flex flex-col w-[264px]",
55
+ children: [/* @__PURE__ */ p("div", {
56
+ className: "flex items-center justify-between pb-3 mb-2 border-b border-border/60",
57
+ children: [
58
+ /* @__PURE__ */ f("button", {
59
+ type: "button",
60
+ onClick: z,
61
+ "aria-label": "Previous month",
62
+ className: e("p-1.5 text-foreground/70 transition-all active:scale-95", "hover:text-foreground hover:bg-secondary", v),
63
+ children: /* @__PURE__ */ f(t, {})
64
+ }),
65
+ /* @__PURE__ */ p("span", {
66
+ className: "font-semibold text-sm text-foreground tracking-wide",
67
+ children: [
68
+ i[T],
69
+ " ",
70
+ C
71
+ ]
72
+ }),
73
+ /* @__PURE__ */ f("button", {
74
+ type: "button",
75
+ onClick: B,
76
+ disabled: !G,
77
+ "aria-label": "Next month",
78
+ className: e("p-1.5 text-foreground/70 transition-all", G ? "hover:text-foreground hover:bg-secondary active:scale-95" : "opacity-30 cursor-not-allowed", v),
79
+ children: /* @__PURE__ */ f(n, {})
80
+ })
81
+ ]
82
+ }), /* @__PURE__ */ p("div", {
83
+ className: "grid grid-cols-7 gap-1 text-center",
84
+ children: [r.map((e) => /* @__PURE__ */ f("div", {
85
+ className: "text-[11px] font-bold tracking-wider text-foreground/50 uppercase py-1 mb-1",
86
+ children: e
87
+ }, e)), X.map(({ key: t, day: n }) => n === null ? /* @__PURE__ */ f("div", {}, t) : /* @__PURE__ */ f("button", {
88
+ type: "button",
89
+ onClick: () => R(n),
90
+ disabled: W(n),
91
+ className: e("w-full flex items-center justify-center font-medium transition-all duration-200", s[g], v, W(n) ? "opacity-30 cursor-not-allowed text-foreground/50" : "active:scale-90", !W(n) && !V(n) && !H(n) && N.hover, V(n) && e(N.bg, "font-semibold shadow-sm"), H(n) && !V(n) && e("border", N.border, N.text), !V(n) && !H(n) && "text-foreground"),
92
+ children: n
93
+ }, n))]
94
+ })]
95
+ }), q && /* @__PURE__ */ p("div", {
96
+ className: e("flex items-center justify-center gap-4", K && "pl-5 ml-4 border-l border-border/60"),
97
+ children: [
98
+ /* @__PURE__ */ f(c, {
99
+ value: D,
100
+ max: 23,
101
+ label: "HH",
102
+ onChange: F,
103
+ resolvedColor: _,
104
+ radiusClass: v
105
+ }),
106
+ /* @__PURE__ */ f(c, {
107
+ value: k,
108
+ max: 59,
109
+ label: "MM",
110
+ onChange: I,
111
+ resolvedColor: _,
112
+ radiusClass: v
113
+ }),
114
+ /* @__PURE__ */ f(c, {
115
+ value: j,
116
+ max: 59,
117
+ label: "SS",
118
+ onChange: L,
119
+ resolvedColor: _,
120
+ radiusClass: v
121
+ })
122
+ ]
123
+ })]
124
+ }), J && /* @__PURE__ */ p("div", {
125
+ className: "flex items-center justify-between border-t border-border/60 pt-3 mt-3",
126
+ children: [h && l ? /* @__PURE__ */ f("button", {
127
+ type: "button",
128
+ onClick: () => {
129
+ y(null), b();
130
+ },
131
+ className: "text-xs font-medium text-foreground/50 hover:text-danger transition-colors active:scale-95 px-2 py-1",
132
+ children: "Clear"
133
+ }) : /* @__PURE__ */ f("div", {}), m !== "date" && /* @__PURE__ */ f("button", {
134
+ type: "button",
135
+ onClick: b,
136
+ className: e("ml-auto text-xs font-semibold px-4 py-2 transition-all hover:opacity-90 active:scale-95 shadow-sm", v, N.bg),
137
+ children: "Done"
138
+ })]
139
+ })]
140
+ });
221
141
  });
222
- export {
223
- mt as Calendar
224
- };
142
+ //#endregion
143
+ export { m as Calendar };
@@ -1,10 +1,10 @@
1
1
  import { InputProps } from '../input/Input';
2
- import { DatePickerConfig, PickerConfig } from './date-picker-config';
2
+ import { DatePickerConfig, DatePickerPickerConfig } from './date-picker-config';
3
3
  /**
4
- * Picker menu configuration that extends PickerConfig with className.
5
- * Used for styling the calendar popover.
4
+ * Props for the picker (calendar popover).
5
+ * Extends DatePickerPickerConfig with instance-only props.
6
6
  */
7
- export interface PickerMenu extends PickerConfig {
7
+ export interface DatePickerPickerProps extends DatePickerPickerConfig {
8
8
  /**
9
9
  * Extra CSS classes for the calendar popover.
10
10
  */
@@ -35,7 +35,7 @@ export interface DatePickerProps extends BaseDatePickerProps {
35
35
  * Picker configuration overrides including portal, portalTarget, and className.
36
36
  * All picker-related props should be passed through this object.
37
37
  */
38
- picker?: PickerMenu;
38
+ picker?: DatePickerPickerProps;
39
39
  /**
40
40
  * Whether a clear button is shown in the input.
41
41
  * When true, a clear button appears when a date is selected.
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AASxD,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AAC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