@konstructio/ui 0.1.2-alpha.108 → 0.1.2-alpha.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Wrapper-Bbaaa7YA.js +218 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +33 -32
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +49 -47
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +27 -26
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +27 -26
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +3 -3
- package/dist/components/Select/Select.js +17 -16
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +1 -1
- package/dist/components/Select/contexts/select.provider.js +34 -33
- package/dist/components/Select/hooks/useSelect.js +35 -34
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.js +9 -9
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +16 -16
- package/dist/dist-ByCJijZd.js +174 -0
- package/dist/hooks/useClickOutside.js +8 -8
- package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +7 -1
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.types.d.ts +3 -0
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +3 -1
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +3 -1
- package/dist/lib/components/Select/Select.types.d.ts +3 -0
- package/dist/lib/components/Select/contexts/select.provider.d.ts +1 -0
- package/dist/lib/components/Select/hooks/useSelect.d.ts +3 -1
- package/dist/lib/hooks/useClickOutside.d.ts +3 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/Wrapper-2AUlYAHQ.js +0 -195
- package/dist/dist-BnCbAI-c.js +0 -166
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { t as r } from "./utils-B-6R7kNE.js";
|
|
2
|
+
import { LoaderIcon as xe } from "./assets/icons/components/Loader.js";
|
|
3
|
+
import { t as he } from "./createLucideIcon-MbzNWCaI.js";
|
|
4
|
+
import { t as ve } from "./chevron-up-Bjpvg6ui.js";
|
|
5
|
+
import { Typography as ge } from "./components/Typography/Typography.js";
|
|
6
|
+
import { i as we, n as ye, r as Ne, t as Ce } from "./dist-ByCJijZd.js";
|
|
7
|
+
import { useSelectContext as ke } from "./components/Select/contexts/select.hook.js";
|
|
8
|
+
import { List as be } from "./components/Select/components/List/List.js";
|
|
9
|
+
import { inputVariants as Ie, labelVariants as Oe, selectVariants as je } from "./components/Select/Select.variants.js";
|
|
10
|
+
import { useSelect as ze } from "./components/Select/hooks/useSelect.js";
|
|
11
|
+
import { forwardRef as De, useEffect as Le, useImperativeHandle as Re, useMemo as Ve, useRef as w } from "react";
|
|
12
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
13
|
+
var Te = [["path", {
|
|
14
|
+
d: "m21 21-4.34-4.34",
|
|
15
|
+
key: "14j7rj"
|
|
16
|
+
}], ["circle", {
|
|
17
|
+
cx: "11",
|
|
18
|
+
cy: "11",
|
|
19
|
+
r: "8",
|
|
20
|
+
key: "4ej97u"
|
|
21
|
+
}]], Fe = he("search", Te), Ge = De(({ additionalOptions: E, className: $, defaultValue: y, describedBy: b, fieldId: N, disabled: n = !1, error: c, groupedOptions: B, iconClassName: K, inputClassName: M, isInfiniteScrollEnabled: W = !1, isLoading: I, isPortal: f = !1, isRequired: x, loadingText: _, label: l, labelAction: q, labelClassName: H, labelWrapperClassName: U, listClassName: G, listItemClassName: J, listItemSecondRowClassName: P, name: O, noOptionsText: Q, placeholder: h, portalClassName: X, searchable: j = !1, showSearchIcon: C, theme: Y, visibleItems: Z, wrapperClassName: ee, onFetchMoreOptions: te, onBlur: ae, onSearchChange: re, ...z }, ne) => {
|
|
22
|
+
const v = `${N}-label`, D = `${N}-control`, L = `${N}-listbox`, d = w(null), R = w(null), k = w(null), oe = w(0), { isOpen: o, options: i, searchTerm: le, value: u, setCanFilter: ie, setSearchTerm: se, setValue: m, toggleOpen: V } = ke(), t = Ve(() => i.find(({ value: e }) => e === u), [i, u]), { isInside: ce, wrapperRef: ue, wrapperInputRef: T, handleOpen: g } = ze({
|
|
23
|
+
inputRef: d,
|
|
24
|
+
searchInputRef: R,
|
|
25
|
+
internalValue: t,
|
|
26
|
+
listRef: k,
|
|
27
|
+
onBlur: ae
|
|
28
|
+
}), de = (e) => {
|
|
29
|
+
ce(e.relatedTarget) || V(!1);
|
|
30
|
+
}, F = () => {
|
|
31
|
+
if (!n) {
|
|
32
|
+
if (o) {
|
|
33
|
+
V(!1);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
g();
|
|
37
|
+
}
|
|
38
|
+
}, me = (e) => {
|
|
39
|
+
if (!n) {
|
|
40
|
+
if (e.key === "ArrowDown") {
|
|
41
|
+
if (e.preventDefault(), !o) {
|
|
42
|
+
g();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
k.current?.querySelector('li:not([data-action="true"])')?.focus();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), F());
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
Re(ne, () => d.current, [d]), Le(() => {
|
|
52
|
+
if (y && !u) {
|
|
53
|
+
const e = i && i.find((p) => p.value === y);
|
|
54
|
+
e && m(e.value);
|
|
55
|
+
}
|
|
56
|
+
}, [
|
|
57
|
+
y,
|
|
58
|
+
i,
|
|
59
|
+
m,
|
|
60
|
+
u
|
|
61
|
+
]);
|
|
62
|
+
const pe = (e) => {
|
|
63
|
+
const p = e.target.value;
|
|
64
|
+
ie(!0), m(""), se(p ?? ""), re?.(p);
|
|
65
|
+
const S = i.find((fe) => fe.value.toLocaleLowerCase() === p.toLocaleLowerCase());
|
|
66
|
+
m(S ? S.value : t?.value ?? "");
|
|
67
|
+
}, A = /* @__PURE__ */ a(be, {
|
|
68
|
+
ref: k,
|
|
69
|
+
id: L,
|
|
70
|
+
labelledBy: l ? v : void 0,
|
|
71
|
+
additionalOptions: E,
|
|
72
|
+
className: r(f && "static top-auto mt-0", G),
|
|
73
|
+
groupedOptions: B,
|
|
74
|
+
itemClassName: J,
|
|
75
|
+
name: O,
|
|
76
|
+
wrapperInputRef: T,
|
|
77
|
+
inputRef: d,
|
|
78
|
+
options: i,
|
|
79
|
+
isLoading: !!I,
|
|
80
|
+
searchable: j,
|
|
81
|
+
listItemSecondRowClassName: P,
|
|
82
|
+
isInfiniteScrollEnabled: W,
|
|
83
|
+
onFetchMoreOptions: te,
|
|
84
|
+
noOptionsText: Q,
|
|
85
|
+
loadingText: _,
|
|
86
|
+
visibleItems: Z
|
|
87
|
+
});
|
|
88
|
+
return /* @__PURE__ */ s("div", {
|
|
89
|
+
ref: ue,
|
|
90
|
+
className: r("flex flex-col gap-2 w-full relative", ee),
|
|
91
|
+
"data-theme": Y,
|
|
92
|
+
children: [l ? /* @__PURE__ */ s("div", {
|
|
93
|
+
className: r("flex items-center justify-between", U),
|
|
94
|
+
children: [/* @__PURE__ */ s("label", {
|
|
95
|
+
id: v,
|
|
96
|
+
className: r(Oe({ className: H })),
|
|
97
|
+
htmlFor: D,
|
|
98
|
+
onClick: () => !n && g(),
|
|
99
|
+
children: [l, x && /* @__PURE__ */ a("span", {
|
|
100
|
+
"aria-hidden": "true",
|
|
101
|
+
className: "text-red-600 dark:text-red-500 ml-1",
|
|
102
|
+
children: "*"
|
|
103
|
+
})]
|
|
104
|
+
}), q]
|
|
105
|
+
}) : null, /* @__PURE__ */ s(we, {
|
|
106
|
+
open: f && o,
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ a(Ce, {
|
|
109
|
+
asChild: !0,
|
|
110
|
+
children: /* @__PURE__ */ s("div", {
|
|
111
|
+
ref: T,
|
|
112
|
+
id: D,
|
|
113
|
+
className: r(je({
|
|
114
|
+
className: $,
|
|
115
|
+
hasError: !!c,
|
|
116
|
+
disabled: n
|
|
117
|
+
})),
|
|
118
|
+
role: "combobox",
|
|
119
|
+
onClick: F,
|
|
120
|
+
onKeyDown: me,
|
|
121
|
+
"aria-expanded": o,
|
|
122
|
+
tabIndex: oe.current,
|
|
123
|
+
"aria-labelledby": l ? v : void 0,
|
|
124
|
+
"aria-label": l ? void 0 : h,
|
|
125
|
+
"aria-haspopup": "listbox",
|
|
126
|
+
"aria-controls": o ? L : void 0,
|
|
127
|
+
"aria-invalid": !!c || void 0,
|
|
128
|
+
"aria-describedby": b,
|
|
129
|
+
"aria-required": x || void 0,
|
|
130
|
+
"aria-disabled": n || void 0,
|
|
131
|
+
children: [/* @__PURE__ */ s("div", {
|
|
132
|
+
className: "flex gap-2.5 items-center flex-1",
|
|
133
|
+
children: [
|
|
134
|
+
t?.leftIcon && !C && /* @__PURE__ */ a("span", {
|
|
135
|
+
className: "w-4 h-4 flex justify-center items-center dark:text-metal-50",
|
|
136
|
+
children: t.leftIcon
|
|
137
|
+
}),
|
|
138
|
+
C && /* @__PURE__ */ a(Fe, { className: r("w-4", "h-4", "text-zinc-500", "select-none", "transition-colors", "duration-300", "dark:text-metal-300", "dark:group-focus-within:text-metal-50") }),
|
|
139
|
+
j ? /* @__PURE__ */ a("input", {
|
|
140
|
+
ref: R,
|
|
141
|
+
type: "text",
|
|
142
|
+
value: o ? le : t?.label ?? u ?? "",
|
|
143
|
+
onChange: pe,
|
|
144
|
+
placeholder: h,
|
|
145
|
+
className: r(Ie({ className: M }), { "text-red-700 placeholder:text-red-700": !!c }),
|
|
146
|
+
onClick: (e) => {
|
|
147
|
+
e.stopPropagation(), n || g();
|
|
148
|
+
},
|
|
149
|
+
"aria-labelledby": l ? v : void 0,
|
|
150
|
+
"aria-label": l ? void 0 : h,
|
|
151
|
+
"aria-invalid": !!c || void 0,
|
|
152
|
+
"aria-describedby": b,
|
|
153
|
+
required: x,
|
|
154
|
+
autoComplete: "off",
|
|
155
|
+
autoCapitalize: "words",
|
|
156
|
+
disabled: n,
|
|
157
|
+
tabIndex: -1,
|
|
158
|
+
...z
|
|
159
|
+
}) : /* @__PURE__ */ s(ge, {
|
|
160
|
+
variant: "body2",
|
|
161
|
+
className: r("flex-1 text-zinc-400 text-sm dark:text-metal-400 flex gap-2 items-center", {
|
|
162
|
+
"text-red-700": !!c,
|
|
163
|
+
"select-none": !t,
|
|
164
|
+
"text-metal-800 dark:text-metal-50": t,
|
|
165
|
+
"text-metal-400/50 dark:text-metal-50/50": n
|
|
166
|
+
}, t?.wrapperClassNameOnSelectedValue),
|
|
167
|
+
children: [
|
|
168
|
+
t?.label || h,
|
|
169
|
+
" ",
|
|
170
|
+
t?.showRightComponentOnselectedValue ? t?.rightComponent : null
|
|
171
|
+
]
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
}), I ? /* @__PURE__ */ a(xe, {
|
|
175
|
+
size: 16,
|
|
176
|
+
className: "text-metal-400 animate-spin select-none"
|
|
177
|
+
}) : !C && /* @__PURE__ */ a(ve, {
|
|
178
|
+
"data-state": o ? "open" : "closed",
|
|
179
|
+
className: r("w-4 h-4 text-zinc-500 transition-all duration-100 data-[state=open]:rotate-0 data-[state=closed]:rotate-180 select-none dark:group-focus-within:text-metal-50", K, {
|
|
180
|
+
"text-red-700": !!c,
|
|
181
|
+
"text-metal-400/50 dark:group-focus-within:text-zinc-500": n
|
|
182
|
+
})
|
|
183
|
+
})]
|
|
184
|
+
})
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ a("input", {
|
|
187
|
+
ref: d,
|
|
188
|
+
type: "text",
|
|
189
|
+
name: O,
|
|
190
|
+
className: "hidden",
|
|
191
|
+
"aria-hidden": "true",
|
|
192
|
+
required: x,
|
|
193
|
+
inert: !0,
|
|
194
|
+
defaultValue: t?.value ?? u ?? void 0,
|
|
195
|
+
...z
|
|
196
|
+
}),
|
|
197
|
+
o && !f && A,
|
|
198
|
+
f && /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a(ye, {
|
|
199
|
+
role: "presentation",
|
|
200
|
+
align: "start",
|
|
201
|
+
sideOffset: 4,
|
|
202
|
+
className: r("z-50 w-(--radix-popover-trigger-width)", X),
|
|
203
|
+
onOpenAutoFocus: (e) => {
|
|
204
|
+
e.preventDefault();
|
|
205
|
+
},
|
|
206
|
+
onCloseAutoFocus: (e) => {
|
|
207
|
+
e.preventDefault();
|
|
208
|
+
},
|
|
209
|
+
onBlur: de,
|
|
210
|
+
children: A
|
|
211
|
+
}) })
|
|
212
|
+
]
|
|
213
|
+
})]
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
export {
|
|
217
|
+
Ge as t
|
|
218
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as a } from "../../utils-B-6R7kNE.js";
|
|
2
2
|
import { Typography as i } from "../Typography/Typography.js";
|
|
3
|
-
import { DateRangePickerProvider as
|
|
4
|
-
import { PresetPanel as
|
|
5
|
-
import { DateTimeInputs as
|
|
6
|
-
import { CalendarPanel as
|
|
7
|
-
import { RightPanel as
|
|
8
|
-
import { dateRangePickerVariants as
|
|
3
|
+
import { DateRangePickerProvider as $ } from "./contexts/date-range-picker/date-range-picker.provider.js";
|
|
4
|
+
import { PresetPanel as ee } from "./components/PresetPanel/PresetPanel.js";
|
|
5
|
+
import { DateTimeInputs as re } from "./components/DateTimeInputs/DateTimeInputs.js";
|
|
6
|
+
import { CalendarPanel as ae } from "./components/CalendarPanel/CalendarPanel.js";
|
|
7
|
+
import { RightPanel as te } from "./components/RightPanel/RightPanel.js";
|
|
8
|
+
import { dateRangePickerVariants as ne, rightPanelVariants as ie } from "./DateRangePicker.variants.js";
|
|
9
9
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
10
|
-
var
|
|
10
|
+
var oe = ({ animationDuration: o = 500, className: l, defaultPreset: m = "custom", defaultRange: s, defaultTime: c, disabled: p = !1, isRequired: d, label: n, labelWrapperClassName: f, name: g, showTime: P = !0, theme: h, timeFormat: x = "24", blockedDays: u, blockedMonths: k, minDate: v, maxDate: N, hideDisabledNavigation: D, showOutsideDays: R, navigationMode: y = "independent", numberOfMonths: T = 2, dateDisplayFormat: j = "long", ariaLabelCalendar: I, ariaLabelPrevMonth: V, ariaLabelNextMonth: b, ariaLabelPrevMonthStart: C, ariaLabelNextMonthStart: K, ariaLabelPrevMonthEnd: L, ariaLabelNextMonthEnd: q, autoComplete: w, labelStartDate: z, labelEndDate: A, labelTime: B, requiredDates: E, ariaLabelStartDate: F, ariaLabelEndDate: G, errorInvalidDate: H, errorDateNotAvailable: J, showPresets: M = !0, presets: O, footer: Q, revealCalendarOnCustom: S = !1, labelTimePeriod: U, ariaLabelTimePeriod: W, presetLabels: X, classNames: r, onRangeChange: Y, onDateChange: Z, onPresetChange: _ }) => /* @__PURE__ */ e($, {
|
|
11
11
|
defaultRange: s,
|
|
12
12
|
defaultTime: c,
|
|
13
13
|
defaultPreset: m,
|
|
14
|
-
presets:
|
|
14
|
+
presets: O,
|
|
15
15
|
timeFormat: x,
|
|
16
16
|
showTime: P,
|
|
17
17
|
name: g,
|
|
@@ -26,10 +26,10 @@ var ie = ({ animationDuration: o = 500, className: l, defaultPreset: m = "custom
|
|
|
26
26
|
navigationMode: y,
|
|
27
27
|
numberOfMonths: T,
|
|
28
28
|
dateDisplayFormat: j,
|
|
29
|
-
revealCalendarOnCustom:
|
|
30
|
-
onRangeChange:
|
|
31
|
-
onDateChange:
|
|
32
|
-
onPresetChange:
|
|
29
|
+
revealCalendarOnCustom: S,
|
|
30
|
+
onRangeChange: Y,
|
|
31
|
+
onDateChange: Z,
|
|
32
|
+
onPresetChange: _,
|
|
33
33
|
children: /* @__PURE__ */ t("div", {
|
|
34
34
|
className: "flex flex-col gap-2",
|
|
35
35
|
"data-theme": h,
|
|
@@ -46,29 +46,30 @@ var ie = ({ animationDuration: o = 500, className: l, defaultPreset: m = "custom
|
|
|
46
46
|
})]
|
|
47
47
|
})
|
|
48
48
|
}) : null, /* @__PURE__ */ t("div", {
|
|
49
|
-
className: a(
|
|
49
|
+
className: a(ne({ className: l }), r?.container),
|
|
50
50
|
role: "group",
|
|
51
51
|
"aria-label": n || "Date range picker",
|
|
52
|
-
children: [
|
|
53
|
-
labelTimePeriod:
|
|
54
|
-
ariaLabelTimePeriod:
|
|
55
|
-
presetLabels:
|
|
52
|
+
children: [M && /* @__PURE__ */ e(ee, {
|
|
53
|
+
labelTimePeriod: U,
|
|
54
|
+
ariaLabelTimePeriod: W,
|
|
55
|
+
presetLabels: X,
|
|
56
56
|
classNames: r?.presetPanel
|
|
57
|
-
}), /* @__PURE__ */ t(
|
|
58
|
-
className: a(
|
|
57
|
+
}), /* @__PURE__ */ t(te, {
|
|
58
|
+
className: a(ie(), r?.rightPanel),
|
|
59
59
|
children: [
|
|
60
|
-
/* @__PURE__ */ e(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
/* @__PURE__ */ e(re, {
|
|
61
|
+
autoComplete: w,
|
|
62
|
+
labelStartDate: z,
|
|
63
|
+
labelEndDate: A,
|
|
64
|
+
labelTime: B,
|
|
65
|
+
requiredDates: E,
|
|
66
|
+
ariaLabelStartDate: F,
|
|
67
|
+
ariaLabelEndDate: G,
|
|
68
|
+
errorInvalidDate: H,
|
|
69
|
+
errorDateNotAvailable: J,
|
|
69
70
|
classNames: r?.dateTimeInputs
|
|
70
71
|
}),
|
|
71
|
-
/* @__PURE__ */ e(
|
|
72
|
+
/* @__PURE__ */ e(ae, {
|
|
72
73
|
ariaLabelCalendar: I,
|
|
73
74
|
ariaLabelPrevMonth: V,
|
|
74
75
|
ariaLabelNextMonth: b,
|
|
@@ -78,13 +79,13 @@ var ie = ({ animationDuration: o = 500, className: l, defaultPreset: m = "custom
|
|
|
78
79
|
ariaLabelNextMonthEnd: q,
|
|
79
80
|
classNames: r?.calendarPanel
|
|
80
81
|
}),
|
|
81
|
-
|
|
82
|
+
Q
|
|
82
83
|
]
|
|
83
84
|
})]
|
|
84
85
|
})]
|
|
85
86
|
})
|
|
86
87
|
});
|
|
87
|
-
|
|
88
|
+
oe.displayName = "KonstructDateRangePicker";
|
|
88
89
|
export {
|
|
89
|
-
|
|
90
|
+
oe as DateRangePicker
|
|
90
91
|
};
|
|
@@ -1,68 +1,70 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { useDateRangePicker as
|
|
3
|
-
import { dateTimeInputsVariants as
|
|
4
|
-
import { EndInputFields as
|
|
5
|
-
import { StartInputFields as
|
|
6
|
-
import { useDateTimeInputs as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
var
|
|
9
|
-
const { numberOfMonths:
|
|
10
|
-
errorInvalidDate:
|
|
11
|
-
errorDateNotAvailable:
|
|
1
|
+
import { t as w } from "../../../../utils-B-6R7kNE.js";
|
|
2
|
+
import { useDateRangePicker as H } from "../../contexts/date-range-picker/date-range-picker.hook.js";
|
|
3
|
+
import { dateTimeInputsVariants as P } from "./DateTimeInputs.variants.js";
|
|
4
|
+
import { EndInputFields as R } from "./components/EndInputFields/EndInputFields.js";
|
|
5
|
+
import { StartInputFields as $ } from "./components/StartInputFields/StartInputFields.js";
|
|
6
|
+
import { useDateTimeInputs as q } from "./hooks/useDateTimeInputs.js";
|
|
7
|
+
import { Fragment as M, jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
var O = ({ autoComplete: r, className: s, labelStartDate: D = "Start date", labelEndDate: h = "End date", labelTime: d = "Time", requiredDates: i = !1, ariaLabelStartDate: p = "Start date", ariaLabelEndDate: c = "End date", errorInvalidDate: g = "Invalid date", errorDateNotAvailable: T = "Date is not available", classNames: a }) => {
|
|
9
|
+
const { numberOfMonths: f } = H(), { timeFormat: o, showTime: t, name: n, disabled: l, time: m, startDateValue: E, startDateError: V, handleStartDateFocus: F, handleStartDateChange: C, handleStartDateBlur: I, handleStartTimeChange: S, endDateValue: b, endDateError: v, handleEndDateFocus: y, handleEndDateChange: B, handleEndDateBlur: L, handleEndTimeChange: k, startHiddenValue: x, endHiddenValue: j } = q({
|
|
10
|
+
errorInvalidDate: g,
|
|
11
|
+
errorDateNotAvailable: T
|
|
12
12
|
});
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
className:
|
|
15
|
-
layout:
|
|
16
|
-
className:
|
|
13
|
+
return /* @__PURE__ */ u("div", {
|
|
14
|
+
className: w(P({
|
|
15
|
+
layout: f === 2 ? "row" : t ? "stacked" : "compact",
|
|
16
|
+
className: s
|
|
17
17
|
}), a?.root),
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */ e(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
/* @__PURE__ */ e($, {
|
|
20
|
+
autoComplete: r,
|
|
21
|
+
dateValue: E,
|
|
22
|
+
timeValue: m.startTime,
|
|
23
|
+
error: V,
|
|
24
|
+
disabled: l,
|
|
24
25
|
showTime: t,
|
|
25
|
-
timeFormat:
|
|
26
|
-
labelDate:
|
|
27
|
-
labelTime:
|
|
28
|
-
required:
|
|
29
|
-
ariaLabelDate:
|
|
26
|
+
timeFormat: o,
|
|
27
|
+
labelDate: D,
|
|
28
|
+
labelTime: d,
|
|
29
|
+
required: i,
|
|
30
|
+
ariaLabelDate: p,
|
|
30
31
|
onDateChange: C,
|
|
31
|
-
onDateFocus:
|
|
32
|
-
onDateBlur:
|
|
33
|
-
onTimeChange:
|
|
32
|
+
onDateFocus: F,
|
|
33
|
+
onDateBlur: I,
|
|
34
|
+
onTimeChange: S,
|
|
34
35
|
classNames: a
|
|
35
36
|
}),
|
|
36
|
-
/* @__PURE__ */ e(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
/* @__PURE__ */ e(R, {
|
|
38
|
+
autoComplete: r,
|
|
39
|
+
dateValue: b,
|
|
40
|
+
timeValue: m.endTime,
|
|
41
|
+
error: v,
|
|
42
|
+
disabled: l,
|
|
41
43
|
showTime: t,
|
|
42
|
-
timeFormat:
|
|
43
|
-
labelDate:
|
|
44
|
-
labelTime:
|
|
45
|
-
required:
|
|
46
|
-
ariaLabelDate:
|
|
47
|
-
onDateChange:
|
|
48
|
-
onDateFocus:
|
|
49
|
-
onDateBlur:
|
|
50
|
-
onTimeChange:
|
|
44
|
+
timeFormat: o,
|
|
45
|
+
labelDate: h,
|
|
46
|
+
labelTime: d,
|
|
47
|
+
required: i,
|
|
48
|
+
ariaLabelDate: c,
|
|
49
|
+
onDateChange: B,
|
|
50
|
+
onDateFocus: y,
|
|
51
|
+
onDateBlur: L,
|
|
52
|
+
onTimeChange: k,
|
|
51
53
|
classNames: a
|
|
52
54
|
}),
|
|
53
|
-
n && /* @__PURE__ */
|
|
55
|
+
n && /* @__PURE__ */ u(M, { children: [/* @__PURE__ */ e("input", {
|
|
54
56
|
type: "hidden",
|
|
55
57
|
name: `${n}-start`,
|
|
56
|
-
value:
|
|
58
|
+
value: x
|
|
57
59
|
}), /* @__PURE__ */ e("input", {
|
|
58
60
|
type: "hidden",
|
|
59
61
|
name: `${n}-end`,
|
|
60
|
-
value:
|
|
62
|
+
value: j
|
|
61
63
|
})] })
|
|
62
64
|
]
|
|
63
65
|
});
|
|
64
66
|
};
|
|
65
|
-
|
|
67
|
+
O.displayName = "DateRangePickerDateTimeInputs";
|
|
66
68
|
export {
|
|
67
|
-
|
|
69
|
+
O as DateTimeInputs
|
|
68
70
|
};
|
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as F } from "../../../../../../Input-is8n7emP.js";
|
|
2
2
|
import { t as e } from "../../../../../../utils-B-6R7kNE.js";
|
|
3
3
|
import { Typography as p } from "../../../../../Typography/Typography.js";
|
|
4
|
-
import { TimePicker as
|
|
5
|
-
import { dateInputWrapperVariants as
|
|
6
|
-
import { useId as
|
|
4
|
+
import { TimePicker as W } from "../../../../../TimePicker/TimePicker.js";
|
|
5
|
+
import { dateInputWrapperVariants as y, dateTimeGroupVariants as C, inputLabelVariants as l, inputRequiredMarkVariants as L, timeInputWrapperVariants as N } from "../../DateTimeInputs.variants.js";
|
|
6
|
+
import { useId as j } from "react";
|
|
7
7
|
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
9
|
-
const o = `${
|
|
8
|
+
var k = ({ autoComplete: m = "off", dateValue: d, timeValue: u, error: s, disabled: n, showTime: i, timeFormat: c = "24", labelDate: f = "End date", labelTime: h = "Time", required: I = !1, ariaLabelDate: b = "End date", ariaLabelTime: v = "End time", onDateChange: x, onDateFocus: E, onDateBlur: V, onTimeChange: g, classNames: r }) => {
|
|
9
|
+
const o = `${j()}-time`;
|
|
10
10
|
return /* @__PURE__ */ t("div", {
|
|
11
|
-
className: e(
|
|
11
|
+
className: e(C(), !i && "w-auto flex-1", r?.group),
|
|
12
12
|
children: [/* @__PURE__ */ t("div", {
|
|
13
|
-
className: e(
|
|
13
|
+
className: e(y(), !i && "w-full flex-1", r?.dateWrapper),
|
|
14
14
|
children: [/* @__PURE__ */ t(p, {
|
|
15
15
|
component: "label",
|
|
16
16
|
className: e(l(), r?.label),
|
|
17
|
-
children: [
|
|
17
|
+
children: [f, I && /* @__PURE__ */ a("span", {
|
|
18
18
|
"aria-hidden": !0,
|
|
19
|
-
className: e(
|
|
19
|
+
className: e(L()),
|
|
20
20
|
children: "*"
|
|
21
21
|
})]
|
|
22
|
-
}), /* @__PURE__ */ a(
|
|
23
|
-
value:
|
|
24
|
-
onChange:
|
|
25
|
-
onFocus:
|
|
26
|
-
onBlur:
|
|
27
|
-
error:
|
|
22
|
+
}), /* @__PURE__ */ a(F, {
|
|
23
|
+
value: d,
|
|
24
|
+
onChange: x,
|
|
25
|
+
onFocus: E,
|
|
26
|
+
onBlur: V,
|
|
27
|
+
error: s,
|
|
28
28
|
disabled: n,
|
|
29
29
|
className: e(r?.input),
|
|
30
|
-
"aria-label":
|
|
30
|
+
"aria-label": b,
|
|
31
|
+
autoComplete: m
|
|
31
32
|
})]
|
|
32
33
|
}), i && /* @__PURE__ */ t("div", {
|
|
33
|
-
className: e(
|
|
34
|
+
className: e(N(), r?.timeWrapper),
|
|
34
35
|
children: [/* @__PURE__ */ a(p, {
|
|
35
36
|
component: "label",
|
|
36
37
|
htmlFor: o,
|
|
37
38
|
className: e(l(), r?.label),
|
|
38
|
-
children:
|
|
39
|
-
}), /* @__PURE__ */ a(
|
|
39
|
+
children: h
|
|
40
|
+
}), /* @__PURE__ */ a(W, {
|
|
40
41
|
mode: "input",
|
|
41
42
|
showList: !0,
|
|
42
|
-
format:
|
|
43
|
-
time:
|
|
44
|
-
onChange:
|
|
43
|
+
format: c,
|
|
44
|
+
time: u,
|
|
45
|
+
onChange: g,
|
|
45
46
|
disabled: n,
|
|
46
|
-
ariaLabel:
|
|
47
|
+
ariaLabel: v,
|
|
47
48
|
id: o,
|
|
48
49
|
name: "end time"
|
|
49
50
|
})]
|
|
50
51
|
})]
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
+
k.displayName = "EndInputFields";
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
+
k as EndInputFields
|
|
56
57
|
};
|
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as F } from "../../../../../../Input-is8n7emP.js";
|
|
2
2
|
import { t } from "../../../../../../utils-B-6R7kNE.js";
|
|
3
3
|
import { Typography as p } from "../../../../../Typography/Typography.js";
|
|
4
|
-
import { TimePicker as
|
|
5
|
-
import { dateInputWrapperVariants as
|
|
6
|
-
import { useId as
|
|
4
|
+
import { TimePicker as W } from "../../../../../TimePicker/TimePicker.js";
|
|
5
|
+
import { dateInputWrapperVariants as y, dateTimeGroupVariants as C, inputLabelVariants as l, inputRequiredMarkVariants as L, timeInputWrapperVariants as N } from "../../DateTimeInputs.variants.js";
|
|
6
|
+
import { useId as j } from "react";
|
|
7
7
|
import { jsx as a, jsxs as e } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
9
|
-
const o = `${
|
|
8
|
+
var k = ({ autoComplete: m = "off", dateValue: d, timeValue: u, error: s, disabled: n, showTime: i, timeFormat: c = "24", labelDate: f = "Start date", labelTime: h = "Time", required: I = !1, ariaLabelDate: b = "Start date", ariaLabelTime: v = "Start time", onDateChange: x, onDateFocus: S, onDateBlur: V, onTimeChange: g, classNames: r }) => {
|
|
9
|
+
const o = `${j()}-time`;
|
|
10
10
|
return /* @__PURE__ */ e("div", {
|
|
11
|
-
className: t(
|
|
11
|
+
className: t(C(), !i && "w-auto flex-1", r?.group),
|
|
12
12
|
children: [/* @__PURE__ */ e("div", {
|
|
13
|
-
className: t(
|
|
13
|
+
className: t(y(), !i && "w-full flex-1", r?.dateWrapper),
|
|
14
14
|
children: [/* @__PURE__ */ e(p, {
|
|
15
15
|
component: "label",
|
|
16
16
|
className: t(l(), r?.label),
|
|
17
|
-
children: [
|
|
17
|
+
children: [f, I && /* @__PURE__ */ a("span", {
|
|
18
18
|
"aria-hidden": !0,
|
|
19
|
-
className: t(
|
|
19
|
+
className: t(L()),
|
|
20
20
|
children: "*"
|
|
21
21
|
})]
|
|
22
|
-
}), /* @__PURE__ */ a(
|
|
23
|
-
value:
|
|
24
|
-
onChange:
|
|
25
|
-
onFocus:
|
|
26
|
-
onBlur:
|
|
27
|
-
error:
|
|
22
|
+
}), /* @__PURE__ */ a(F, {
|
|
23
|
+
value: d,
|
|
24
|
+
onChange: x,
|
|
25
|
+
onFocus: S,
|
|
26
|
+
onBlur: V,
|
|
27
|
+
error: s,
|
|
28
28
|
disabled: n,
|
|
29
29
|
className: t(r?.input),
|
|
30
|
-
"aria-label":
|
|
30
|
+
"aria-label": b,
|
|
31
|
+
autoComplete: m
|
|
31
32
|
})]
|
|
32
33
|
}), i && /* @__PURE__ */ e("div", {
|
|
33
|
-
className: t(
|
|
34
|
+
className: t(N(), r?.timeWrapper),
|
|
34
35
|
children: [/* @__PURE__ */ a(p, {
|
|
35
36
|
component: "label",
|
|
36
37
|
htmlFor: o,
|
|
37
38
|
className: t(l(), r?.label),
|
|
38
|
-
children:
|
|
39
|
-
}), /* @__PURE__ */ a(
|
|
39
|
+
children: h
|
|
40
|
+
}), /* @__PURE__ */ a(W, {
|
|
40
41
|
mode: "input",
|
|
41
42
|
showList: !0,
|
|
42
|
-
format:
|
|
43
|
-
time:
|
|
44
|
-
onChange:
|
|
43
|
+
format: c,
|
|
44
|
+
time: u,
|
|
45
|
+
onChange: g,
|
|
45
46
|
disabled: n,
|
|
46
|
-
ariaLabel:
|
|
47
|
+
ariaLabel: v,
|
|
47
48
|
id: o,
|
|
48
49
|
name: "start time"
|
|
49
50
|
})]
|
|
50
51
|
})]
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
+
k.displayName = "StartInputFields";
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
+
k as StartInputFields
|
|
56
57
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as l } from "../../../../utils-B-6R7kNE.js";
|
|
2
2
|
import { useFilterContext as f } from "../../contexts/filter.hook.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as p, i as c, n as h, r as g } from "../../../../dist-ByCJijZd.js";
|
|
4
4
|
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
5
5
|
var j = ({ isOpen: t, trigger: r, triggerClassName: o, position: a = "left", contentClassName: n, children: s, onOpenChange: i }) => {
|
|
6
6
|
const { theme: m } = f();
|
|
7
|
-
return /* @__PURE__ */ u(
|
|
7
|
+
return /* @__PURE__ */ u(c, {
|
|
8
8
|
open: t,
|
|
9
9
|
onOpenChange: i,
|
|
10
10
|
children: [/* @__PURE__ */ e(p, {
|
|
11
11
|
className: o,
|
|
12
12
|
children: r
|
|
13
|
-
}), /* @__PURE__ */ e(
|
|
13
|
+
}), /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(h, {
|
|
14
14
|
"data-theme": m,
|
|
15
15
|
side: "bottom",
|
|
16
16
|
sideOffset: 4,
|