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.
- package/README.md +1 -14
- package/dist/AsheeUIProvider.js +22 -24
- package/dist/components/accordion/Accordion.js +79 -173
- package/dist/components/accordion/accordion-config.js +12 -13
- package/dist/components/accordion/accordion-styles.js +21 -24
- package/dist/components/autocomplete/Autocomplete.js +78 -136
- package/dist/components/autocomplete/autocomplete-config.js +7 -12
- package/dist/components/button/Button.d.ts +29 -1
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +47 -108
- package/dist/components/button/button-config.js +16 -17
- package/dist/components/button/button-styles.js +10 -11
- package/dist/components/card/Card.d.ts +36 -16
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +115 -205
- package/dist/components/card/card-config.js +24 -21
- package/dist/components/card/card-styles.js +19 -22
- package/dist/components/carousel/Carousel.js +123 -248
- package/dist/components/carousel/carousel-config.js +24 -25
- package/dist/components/carousel/carousel-styles.js +14 -16
- package/dist/components/chip/Chip.js +84 -191
- package/dist/components/chip/chip-config.js +13 -14
- package/dist/components/chip/chip-styles.js +22 -26
- package/dist/components/date-picker/Calendar.d.ts +3 -3
- package/dist/components/date-picker/Calendar.d.ts.map +1 -1
- package/dist/components/date-picker/Calendar.js +141 -222
- package/dist/components/date-picker/DatePicker.d.ts +5 -5
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +122 -220
- package/dist/components/date-picker/TimeSpinner.js +58 -82
- package/dist/components/date-picker/date-picker-config.d.ts +4 -4
- package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-config.js +10 -11
- package/dist/components/date-picker/date-picker-styles.js +44 -45
- package/dist/components/date-picker/date-picker.helpers.d.ts +4 -4
- package/dist/components/date-picker/date-picker.helpers.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.helpers.js +74 -102
- package/dist/components/drawer/Drawer.d.ts +26 -8
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +54 -131
- package/dist/components/drawer/drawer-config.js +14 -15
- package/dist/components/drawer/drawer-styles.js +38 -42
- package/dist/components/field/FieldShell.js +49 -56
- package/dist/components/field/field-config.js +17 -18
- package/dist/components/field/field-styles.js +8 -8
- package/dist/components/image/Image.d.ts +7 -7
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +65 -132
- package/dist/components/image/image-config.js +17 -18
- package/dist/components/image/image-styles.js +14 -15
- package/dist/components/input/Input.js +65 -150
- package/dist/components/input/PasswordInput.js +30 -49
- package/dist/components/input/input-config.js +7 -7
- package/dist/components/input/input-styles.js +9 -10
- package/dist/components/keyboard/KeyboardContext.js +10 -11
- package/dist/components/keyboard/KeyboardProvider.js +100 -181
- package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
- package/dist/components/keyboard/OnScreenKeyboard.js +159 -166
- package/dist/components/keyboard/keyboard-config.js +59 -57
- package/dist/components/keyboard/keyboard-styles.js +10 -11
- package/dist/components/keyboard/use-keyboard-field.js +29 -21
- package/dist/components/link/Link.js +47 -137
- package/dist/components/link/link-config.js +14 -15
- package/dist/components/link/link-styles.js +25 -29
- package/dist/components/marquee/Marquee.js +55 -144
- package/dist/components/marquee/marquee-config.js +18 -19
- package/dist/components/marquee/marquee-styles.js +13 -15
- package/dist/components/modal/Modal.d.ts +26 -10
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +56 -136
- package/dist/components/modal/modal-config.js +15 -16
- package/dist/components/modal/modal-styles.js +13 -14
- package/dist/components/multi-select/MultiSelect.d.ts +18 -2
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +149 -283
- package/dist/components/multi-select/multi-select-config.d.ts +23 -18
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
- package/dist/components/multi-select/multi-select-config.js +18 -21
- package/dist/components/multi-select/multi-select-styles.js +17 -20
- package/dist/components/radio/Radio.js +43 -80
- package/dist/components/radio/RadioGroup.js +57 -155
- package/dist/components/radio/radio-config.js +15 -16
- package/dist/components/radio/radio-context.js +6 -6
- package/dist/components/radio/radio-styles.js +55 -60
- package/dist/components/resizable-screen/ResizableScreen.js +87 -177
- package/dist/components/resizable-screen/resizable-screen-config.js +16 -17
- package/dist/components/select/Select.d.ts +3 -2
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +97 -195
- package/dist/components/select/select-config.js +8 -9
- package/dist/components/select/select-styles.js +5 -5
- package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
- package/dist/components/select-menu/SelectMenu.js +102 -196
- package/dist/components/select-menu/select-menu-config.js +12 -12
- package/dist/components/select-menu/use-select-floating.d.ts +11 -1
- package/dist/components/select-menu/use-select-floating.d.ts.map +1 -1
- package/dist/components/select-menu/use-select-floating.js +41 -48
- package/dist/components/sidebar/Sidebar.d.ts +43 -22
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +146 -331
- package/dist/components/sidebar/sidebar-config.d.ts +98 -31
- package/dist/components/sidebar/sidebar-config.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar-config.js +47 -33
- package/dist/components/sidebar/sidebar-styles.js +27 -32
- package/dist/components/spinner/spinner-config.js +12 -13
- package/dist/components/spinner/spinner-styles.js +13 -14
- package/dist/components/spinner/spinner.js +39 -82
- package/dist/components/switch/Switch.js +62 -154
- package/dist/components/switch/switch-config.js +11 -12
- package/dist/components/switch/switch-styles.js +14 -16
- package/dist/components/table/Table.js +64 -186
- package/dist/components/table/table-config.js +17 -18
- package/dist/components/table/table-styles.js +48 -52
- package/dist/components/tabs/Tabs.d.ts +16 -8
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +93 -208
- package/dist/components/tabs/tabs-config.d.ts +42 -20
- package/dist/components/tabs/tabs-config.d.ts.map +1 -1
- package/dist/components/tabs/tabs-config.js +26 -18
- package/dist/components/tabs/tabs-styles.js +15 -17
- package/dist/components/textarea/Textarea.js +52 -138
- package/dist/components/textarea/textarea-config.js +10 -11
- package/dist/components/textarea/textarea-styles.js +9 -10
- package/dist/components/toast/ToastContext.js +22 -26
- package/dist/components/toast/ToastItem.js +82 -144
- package/dist/components/toast/ToastProvider.d.ts.map +1 -1
- package/dist/components/toast/ToastProvider.js +128 -190
- package/dist/components/toast/toast-config.js +23 -24
- package/dist/components/toast/toast-styles.js +50 -55
- package/dist/components/toast/use-pausable-timeout.js +17 -13
- package/dist/components/tooltip/Tooltip.d.ts +5 -0
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.js +68 -158
- package/dist/components/tooltip/tooltip-config.d.ts +25 -0
- package/dist/components/tooltip/tooltip-config.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-config.js +26 -22
- package/dist/components/tooltip/tooltip-styles.js +15 -17
- package/dist/config/default-config.js +11 -34
- package/dist/config/resolve-color.js +23 -23
- package/dist/config/resolve-config.d.ts.map +1 -1
- package/dist/config/resolve-config.js +14 -12
- package/dist/icons/ArrowLeftIcon.js +16 -19
- package/dist/icons/CalendarIcon.js +43 -24
- package/dist/icons/CheckIcon.js +16 -19
- package/dist/icons/ChevronDownIcon.js +15 -21
- package/dist/icons/ChevronLeftIcon.js +16 -19
- package/dist/icons/ChevronRightIcon.js +16 -19
- package/dist/icons/ChevronUpIcon.js +16 -19
- package/dist/icons/ClearIcon.js +26 -22
- package/dist/icons/ClockIcon.js +20 -22
- package/dist/icons/CloseIcon.js +26 -22
- package/dist/icons/ErrorIcon.js +16 -19
- package/dist/icons/ExternalLinkIcon.js +25 -23
- package/dist/icons/EyeIcon.js +20 -22
- package/dist/icons/EyeOffIcon.js +21 -22
- package/dist/icons/InfoIcon.js +16 -19
- package/dist/icons/SearchIcon.js +25 -22
- package/dist/icons/WarningIcon.js +16 -19
- package/dist/index.js +65 -163
- package/dist/libs/context.js +10 -13
- package/dist/libs/index.js +1 -0
- package/dist/libs/registry.js +10 -12
- package/dist/libs/use-floating-z-index.d.ts +32 -0
- package/dist/libs/use-floating-z-index.d.ts.map +1 -0
- package/dist/libs/use-floating-z-index.js +16 -0
- package/dist/libs/use-isomorphic-layout-effect.js +5 -5
- package/dist/scripts/AsheeThemeScript.js +35 -44
- package/dist/shared/radius.d.ts.map +1 -1
- package/dist/shared/radius.js +12 -13
- package/dist/shared/variant.js +46 -134
- package/dist/theme/color.js +28 -28
- package/dist/theme/controller.d.ts.map +1 -1
- package/dist/theme/controller.js +65 -178
- package/dist/theme/useTheme.js +13 -44
- package/dist/utils/cn.js +7 -7
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/merge-object.js +13 -14
- package/dist/utils/resolve-token.js +11 -14
- package/dist/utils/stacking.d.ts +76 -0
- package/dist/utils/stacking.d.ts.map +1 -0
- package/dist/utils/stacking.js +34 -0
- package/package.json +12 -11
|
@@ -1,224 +1,143 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
223
|
-
|
|
224
|
-
};
|
|
142
|
+
//#endregion
|
|
143
|
+
export { m as Calendar };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { InputProps } from '../input/Input';
|
|
2
|
-
import { DatePickerConfig,
|
|
2
|
+
import { DatePickerConfig, DatePickerPickerConfig } from './date-picker-config';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Props for the picker (calendar popover).
|
|
5
|
+
* Extends DatePickerPickerConfig with instance-only props.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
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?:
|
|
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":"
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AASxD,OAAO,EACL,KAAK,gBAAgB,EAErB,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IACnE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAChE,IAAI,CACF,UAAU,EACV,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,YAAY,GAAG,cAAc,CACtE,CAAC;AAEJ;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;;OAGG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAE/B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,eAAO,MAAM,UAAU,8GA+VtB,CAAC"}
|