@kapiuara/ui 0.13.0 → 0.15.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 +239 -1
- package/dist/components/chat/KapiChatDivider.d.ts +7 -3
- package/dist/components/chat/KapiChatDivider.js +6 -6
- package/dist/components/chat/KapiChatList.js +19 -19
- package/dist/components/chat/KapiChatThread.js +23 -23
- package/dist/components/chat/KapiComposer.js +19 -19
- package/dist/components/chat/KapiMessageBubble.js +4 -4
- package/dist/components/chat/KapiTypingIndicator.js +4 -4
- package/dist/components/chat/index.d.ts +1 -1
- package/dist/components/closeReason.d.ts +34 -0
- package/dist/components/data/KapiBarChart.js +1 -1
- package/dist/components/data/KapiDataTable.js +31 -31
- package/dist/components/data/KapiEventCalendar.js +78 -78
- package/dist/components/data/KapiHeatmap.js +23 -23
- package/dist/components/data/KapiLineChart.js +1 -1
- package/dist/components/data/KapiPagination.js +4 -4
- package/dist/components/data/KapiSparkline.js +1 -1
- package/dist/components/data/KapiTable.js +122 -122
- package/dist/components/data/KapiTableFilter.js +18 -18
- package/dist/components/data/KapiTableRow.js +24 -24
- package/dist/components/data/KapiTableToolbar.js +49 -49
- package/dist/components/data/chartFrame.js +21 -21
- package/dist/components/data/useColumnResize.js +8 -8
- package/dist/components/data/useTableSelection.js +8 -8
- package/dist/components/display/KapiAnnotation.js +55 -55
- package/dist/components/display/KapiComment.js +4 -4
- package/dist/components/display/KapiCommentComposer.js +16 -16
- package/dist/components/display/KapiFileItem.js +6 -6
- package/dist/components/display/KapiFileViewer.js +9 -9
- package/dist/components/display/KapiTruncate.js +7 -7
- package/dist/components/feedback/KapiAlert.d.ts +2 -1
- package/dist/components/feedback/KapiAlert.js +8 -8
- package/dist/components/feedback/KapiCountdown.js +8 -8
- package/dist/components/feedback/KapiFab.js +30 -30
- package/dist/components/feedback/KapiOfflineBanner.js +8 -8
- package/dist/components/feedback/KapiToastContainer.js +25 -25
- package/dist/components/feedback/KapiTour.d.ts +2 -1
- package/dist/components/feedback/KapiTour.js +35 -35
- package/dist/components/inputs/KapiAutocomplete.js +14 -14
- package/dist/components/inputs/KapiButton.d.ts +17 -1
- package/dist/components/inputs/KapiButton.js +41 -25
- package/dist/components/inputs/KapiCalendar.js +5 -5
- package/dist/components/inputs/KapiCalendarGrid.js +10 -10
- package/dist/components/inputs/KapiChecklist.js +71 -71
- package/dist/components/inputs/KapiDatePicker.js +124 -122
- package/dist/components/inputs/KapiDateRangePicker.js +138 -136
- package/dist/components/inputs/KapiFacetedSearch.js +29 -29
- package/dist/components/inputs/KapiField.js +14 -14
- package/dist/components/inputs/KapiFileUpload.js +27 -27
- package/dist/components/inputs/KapiIconButton.d.ts +9 -1
- package/dist/components/inputs/KapiIconButton.js +27 -10
- package/dist/components/inputs/KapiInput.js +21 -21
- package/dist/components/inputs/KapiInputGroup.js +8 -8
- package/dist/components/inputs/KapiMaskedInput.d.ts +8 -3
- package/dist/components/inputs/KapiMaskedInput.js +64 -51
- package/dist/components/inputs/KapiNumberStepper.js +29 -29
- package/dist/components/inputs/KapiRating.js +61 -59
- package/dist/components/inputs/KapiSearchChip.js +8 -8
- package/dist/components/inputs/KapiSegmented.js +74 -64
- package/dist/components/inputs/KapiSelect.js +232 -222
- package/dist/components/inputs/KapiSelectMenu.js +60 -60
- package/dist/components/inputs/KapiSlider.js +1 -1
- package/dist/components/inputs/KapiSwitch.js +6 -6
- package/dist/components/inputs/KapiTagInput.js +83 -81
- package/dist/components/inputs/KapiTextarea.js +8 -8
- package/dist/components/inputs/misuseWarnings.d.ts +37 -0
- package/dist/components/inputs/misuseWarnings.js +36 -0
- package/dist/components/inputs/numberStepLogic.d.ts +10 -0
- package/dist/components/inputs/numberStepLogic.js +16 -7
- package/dist/components/inputs/ownField.js +4 -4
- package/dist/components/layout/KapiAccountMenu.d.ts +2 -1
- package/dist/components/layout/KapiAccountMenu.js +53 -53
- package/dist/components/layout/KapiContextSlot.js +35 -35
- package/dist/components/layout/KapiMasonry.js +6 -6
- package/dist/components/layout/KapiNotificationBell.js +60 -60
- package/dist/components/layout/KapiPageHeader.js +19 -19
- package/dist/components/layout/KapiRail.js +60 -60
- package/dist/components/layout/KapiRailAccount.js +9 -9
- package/dist/components/layout/KapiRoot.js +21 -21
- package/dist/components/layout/KapiScrollArea.js +11 -11
- package/dist/components/layout/KapiShell.js +12 -12
- package/dist/components/locale/KapiLocaleProvider.js +13 -13
- package/dist/components/navigation/CtxSlidingList.js +4 -4
- package/dist/components/navigation/KapiAccordion.js +12 -12
- package/dist/components/navigation/KapiBreadcrumb.js +11 -11
- package/dist/components/navigation/KapiCollapsiblePanel.js +23 -23
- package/dist/components/navigation/KapiContextPanel.js +76 -76
- package/dist/components/navigation/KapiFilterChips.js +9 -9
- package/dist/components/navigation/KapiNavBadge.d.ts +4 -2
- package/dist/components/navigation/KapiNavBadge.js +11 -10
- package/dist/components/navigation/KapiPanelGroup.js +25 -25
- package/dist/components/navigation/KapiSteps.js +4 -4
- package/dist/components/navigation/KapiTabs.d.ts +4 -1
- package/dist/components/navigation/KapiTabs.js +63 -55
- package/dist/components/navigation/KapiTree.js +75 -75
- package/dist/components/navigation/KapiWizard.d.ts +2 -1
- package/dist/components/navigation/KapiWizard.js +30 -30
- package/dist/components/overlays/KapiCanvasForm.d.ts +6 -2
- package/dist/components/overlays/KapiCanvasForm.js +12 -12
- package/dist/components/overlays/KapiCommandPalette.d.ts +2 -1
- package/dist/components/overlays/KapiCommandPalette.js +23 -23
- package/dist/components/overlays/KapiConfirm.d.ts +2 -1
- package/dist/components/overlays/KapiConfirm.js +12 -12
- package/dist/components/overlays/KapiContextMenu.d.ts +2 -1
- package/dist/components/overlays/KapiContextMenu.js +18 -18
- package/dist/components/overlays/KapiDialogHost.js +22 -22
- package/dist/components/overlays/KapiLoading.js +16 -16
- package/dist/components/overlays/KapiMenuButton.js +15 -15
- package/dist/components/overlays/KapiModal.d.ts +2 -1
- package/dist/components/overlays/KapiModal.js +28 -28
- package/dist/components/overlays/KapiOffcanvas.d.ts +3 -2
- package/dist/components/overlays/KapiOffcanvas.js +63 -63
- package/dist/components/overlays/KapiOffcanvasStack.js +38 -38
- package/dist/components/overlays/KapiPhotoView.js +15 -15
- package/dist/components/overlays/KapiPopover.d.ts +2 -1
- package/dist/components/overlays/KapiPopover.js +10 -10
- package/dist/components/overlays/KapiShapeSheet.js +20 -20
- package/dist/components/overlays/KapiSplitModal.js +29 -29
- package/dist/components/overlays/KapiTooltip.js +21 -21
- package/dist/components/overlays/menuList.js +60 -60
- package/dist/components/renderSlot.d.ts +27 -0
- package/dist/components/renderSlot.js +23 -0
- package/dist/css/components/chat/chat.css +1 -1
- package/dist/hooks/portalRoot.js +6 -6
- package/dist/hooks/useControllableState.d.ts +6 -2
- package/dist/hooks/useControllableState.js +14 -11
- package/dist/hooks/useFormReset.d.ts +22 -0
- package/dist/hooks/useFormReset.js +17 -0
- package/dist/index.d.ts +2 -0
- package/dist/kapi.css +1 -1
- package/dist/kapi.layered.css +1 -1
- package/package.json +5 -2
|
@@ -1,161 +1,163 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/inputs/KapiDatePicker.css";
|
|
3
|
-
import { assignRef as e, fieldControlProps as t, focusLeaves as n, resolveReadOnly as
|
|
4
|
-
import { useOwnField as
|
|
5
|
-
import { useKapiLocale as
|
|
6
|
-
import { resolveChipLabel as
|
|
7
|
-
import { useControllableState as
|
|
8
|
-
import { activeHTMLElementOf as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { assignRef as e, fieldControlProps as t, focusLeaves as n, resolveReadOnly as r } from "./fieldLogic.js";
|
|
4
|
+
import { useOwnField as ee } from "./ownField.js";
|
|
5
|
+
import { useKapiLocale as te, useLabels as ne } from "../locale/KapiLocaleProvider.js";
|
|
6
|
+
import { resolveChipLabel as re } from "./selectLogic.js";
|
|
7
|
+
import { useControllableState as ie } from "../../hooks/useControllableState.js";
|
|
8
|
+
import { activeHTMLElementOf as ae } from "../../hooks/ownerDocument.js";
|
|
9
|
+
import { useFormReset as oe } from "../../hooks/useFormReset.js";
|
|
10
|
+
import { useMergedRefs as se } from "../../hooks/mergeRefs.js";
|
|
11
|
+
import { useOutsidePress as ce } from "../../hooks/useOutsidePress.js";
|
|
12
|
+
import { chipFieldSize as le, datePatternFor as ue, formDateValue as de, formatValue as i, hasCalendar as fe, hasTime as pe, localizedCalendarLabels as me, maskInput as he, minuteOptions as ge, monthTitle as _e, pad as a, parseText as ve, pickerIsChip as ye, sameDay as o, validDateOrNull as s } from "./datePickerLogic.js";
|
|
11
13
|
/* empty css */
|
|
12
|
-
import { KapiCalendarGrid as
|
|
13
|
-
import { useCalendarFocus as
|
|
14
|
-
import { useDatePopSide as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { Calendar as
|
|
14
|
+
import { KapiCalendarGrid as be } from "./KapiCalendarGrid.js";
|
|
15
|
+
import { useCalendarFocus as xe } from "./useCalendarFocus.js";
|
|
16
|
+
import { useDatePopSide as Se } from "./useDatePopSide.js";
|
|
17
|
+
import { useId as Ce, useMemo as we, useRef as c, useState as l } from "react";
|
|
18
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
19
|
+
import { Calendar as Te, ChevronLeft as Ee, ChevronRight as De, Clock as Oe } from "lucide-react";
|
|
18
20
|
//#region src/components/inputs/KapiDatePicker.tsx
|
|
19
|
-
var
|
|
20
|
-
let
|
|
21
|
-
variant:
|
|
22
|
-
icon:
|
|
23
|
-
chipLabel:
|
|
24
|
-
label:
|
|
25
|
-
}), { chipLabel:
|
|
26
|
-
chip:
|
|
27
|
-
chipLabel:
|
|
28
|
-
label:
|
|
29
|
-
}),
|
|
21
|
+
var ke = (e, t) => e === "time" ? "hh:mm" : e === "datetime" ? `${t} hh:mm` : t, Ae = Array.from({ length: 24 }, (e, t) => t), f = ({ mode: f = "date", value: p, defaultValue: je, onChange: Me, placeholder: Ne, variant: Pe, icon: m, chipLabel: h, label: g, help: Fe, fieldClassName: _, readOnly: v, disabled: y = !1, id: b, name: x, className: Ie, style: Le, "aria-label": Re, labels: ze, minuteStep: Be = 1, invalid: S, required: C, ref: Ve, onBlur: He, weekStartsOn: Ue }) => {
|
|
22
|
+
let w = te(), T = ne("calendar", me(w), ze), E = we(() => ue(w), [w]), D = fe(f), O = pe(f), k = ye({
|
|
23
|
+
variant: Pe,
|
|
24
|
+
icon: m,
|
|
25
|
+
chipLabel: h,
|
|
26
|
+
label: g
|
|
27
|
+
}), { chipLabel: A, fieldLabel: We } = re({
|
|
28
|
+
chip: k,
|
|
29
|
+
chipLabel: h,
|
|
30
|
+
label: g
|
|
31
|
+
}), j = ee({
|
|
30
32
|
id: b,
|
|
31
|
-
label:
|
|
32
|
-
help:
|
|
33
|
-
required:
|
|
34
|
-
invalid:
|
|
33
|
+
label: We,
|
|
34
|
+
help: Fe,
|
|
35
|
+
required: C,
|
|
36
|
+
invalid: S,
|
|
35
37
|
readOnly: v,
|
|
36
|
-
fieldClassName:
|
|
37
|
-
}),
|
|
38
|
-
(
|
|
39
|
-
let e =
|
|
40
|
-
e &&
|
|
38
|
+
fieldClassName: _
|
|
39
|
+
}), M = j.field, N = r(v, M), P = Ne ?? ke(f, E.placeholder), Ge = Ce(), F = b ?? M?.controlId ?? (k ? Ge : void 0), [I, L] = l(!1), Ke = p !== void 0, [R, qe, , Je] = ie(p === void 0 ? void 0 : s(p), s(je ?? null), Me), [z, B] = l(() => i(R, f, E)), [V, H] = l(() => R ?? /* @__PURE__ */ new Date()), U = c(null), Ye = se(U, oe(Je)), W = c(null), G = c(null), { inputRef: Xe, focusRequest: Ze, openFromKeyboard: K, openFromFocus: Qe, returnFocus: q } = xe(L), J = R ? R.getTime() : null, [$e, et] = l(J), [tt, Y] = l(f), [nt, rt] = l(E);
|
|
40
|
+
($e !== J || tt !== f || nt !== E) && (et(J), Y(f), rt(E), B(i(R, f, E)), R && H(R)), ce(I, [U], () => {
|
|
41
|
+
let e = ae(U.current);
|
|
42
|
+
e && G.current?.contains(e) && e.blur(), L(!1);
|
|
41
43
|
});
|
|
42
44
|
let X = (e) => {
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
if (!
|
|
46
|
-
|
|
45
|
+
qe(e), B(i(Ke ? R : e, f, E));
|
|
46
|
+
}, it = () => {
|
|
47
|
+
if (!z.trim()) {
|
|
48
|
+
R && X(null);
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
49
|
-
let e =
|
|
50
|
-
e === void 0 ?
|
|
51
|
+
let e = ve(z, f, R, /* @__PURE__ */ new Date(), E);
|
|
52
|
+
e === void 0 ? B(i(R, f, E)) : (e && R && e.getTime() === R.getTime() ? B(i(e, f, E)) : X(e), e && H(e));
|
|
51
53
|
}, Z = (e) => {
|
|
52
|
-
let t =
|
|
53
|
-
|
|
54
|
+
let t = R ?? /* @__PURE__ */ new Date(), n = new Date(e);
|
|
55
|
+
O && n.setHours(t.getHours(), t.getMinutes()), X(n), O || q();
|
|
54
56
|
}, Q = (e, t) => {
|
|
55
|
-
let n = new Date(
|
|
57
|
+
let n = new Date(R ?? /* @__PURE__ */ new Date());
|
|
56
58
|
e != null && n.setHours(e), t != null && n.setMinutes(t), X(n);
|
|
57
|
-
}, $ = (e) =>
|
|
58
|
-
return
|
|
59
|
+
}, $ = (e) => H(new Date(V.getFullYear(), V.getMonth() + e, 1)), at = Se(I && !y && !N, W, G);
|
|
60
|
+
return j.wrap(/* @__PURE__ */ d("div", {
|
|
59
61
|
className: [
|
|
60
62
|
"kapi-dp",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
k && "kapi-dp--chip",
|
|
64
|
+
N && "kapi-dp--readonly",
|
|
65
|
+
Ie
|
|
64
66
|
].filter(Boolean).join(" "),
|
|
65
|
-
style:
|
|
66
|
-
ref:
|
|
67
|
+
style: Le,
|
|
68
|
+
ref: Ye,
|
|
67
69
|
onBlur: (e) => {
|
|
68
|
-
n(e.relatedTarget, e.currentTarget) &&
|
|
70
|
+
n(e.relatedTarget, e.currentTarget) && He?.(e);
|
|
69
71
|
},
|
|
70
72
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
className: ["kapi-dp__field",
|
|
73
|
-
ref:
|
|
73
|
+
/* @__PURE__ */ d("div", {
|
|
74
|
+
className: ["kapi-dp__field", k && "kapi-filterchip"].filter(Boolean).join(" "),
|
|
75
|
+
ref: W,
|
|
74
76
|
children: [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
k && m,
|
|
78
|
+
A && /* @__PURE__ */ d("label", {
|
|
77
79
|
className: "kapi-dp__label",
|
|
78
|
-
htmlFor:
|
|
79
|
-
children: [
|
|
80
|
+
htmlFor: F,
|
|
81
|
+
children: [A, ":"]
|
|
80
82
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ u("input", {
|
|
82
84
|
ref: (t) => {
|
|
83
|
-
|
|
85
|
+
Xe.current = t, e(Ve, t);
|
|
84
86
|
},
|
|
85
|
-
...t(
|
|
86
|
-
id:
|
|
87
|
-
invalid:
|
|
88
|
-
required:
|
|
87
|
+
...t(M, {
|
|
88
|
+
id: F,
|
|
89
|
+
invalid: S,
|
|
90
|
+
required: C
|
|
89
91
|
}),
|
|
90
|
-
...
|
|
92
|
+
...k ? { size: le(P) } : {},
|
|
91
93
|
className: "kapi-input kapi-dp__input",
|
|
92
|
-
value:
|
|
93
|
-
placeholder:
|
|
94
|
+
value: z,
|
|
95
|
+
placeholder: P,
|
|
94
96
|
disabled: y,
|
|
95
|
-
readOnly:
|
|
96
|
-
"aria-label":
|
|
97
|
+
readOnly: N || void 0,
|
|
98
|
+
"aria-label": Re,
|
|
97
99
|
autoComplete: "off",
|
|
98
100
|
inputMode: "numeric",
|
|
99
|
-
onChange: (e) =>
|
|
100
|
-
onFocus:
|
|
101
|
-
onBlur:
|
|
101
|
+
onChange: (e) => B(he(e.target.value, f, E)),
|
|
102
|
+
onFocus: N ? void 0 : Qe,
|
|
103
|
+
onBlur: it,
|
|
102
104
|
onKeyDown: (e) => {
|
|
103
|
-
e.key === "Escape" &&
|
|
105
|
+
e.key === "Escape" && I && (e.preventDefault(), e.stopPropagation(), L(!1)), e.key === "ArrowDown" && D && !N && (e.preventDefault(), K());
|
|
104
106
|
}
|
|
105
107
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ u("button", {
|
|
107
109
|
type: "button",
|
|
108
110
|
className: "kapi-dp__toggle",
|
|
109
|
-
disabled: y ||
|
|
110
|
-
"aria-label":
|
|
111
|
-
"aria-expanded":
|
|
112
|
-
onClick: () =>
|
|
113
|
-
children:
|
|
111
|
+
disabled: y || N,
|
|
112
|
+
"aria-label": T.openPicker,
|
|
113
|
+
"aria-expanded": I,
|
|
114
|
+
onClick: () => I ? L(!1) : K(),
|
|
115
|
+
children: u(D ? Te : Oe, {
|
|
114
116
|
size: 16,
|
|
115
117
|
strokeWidth: 1.9
|
|
116
118
|
})
|
|
117
119
|
})
|
|
118
120
|
]
|
|
119
121
|
}),
|
|
120
|
-
x && /* @__PURE__ */
|
|
122
|
+
x && /* @__PURE__ */ u("input", {
|
|
121
123
|
type: "hidden",
|
|
122
124
|
name: x,
|
|
123
|
-
value:
|
|
125
|
+
value: de(R, f),
|
|
124
126
|
disabled: y
|
|
125
127
|
}),
|
|
126
|
-
|
|
127
|
-
ref:
|
|
128
|
-
className: `kapi-dp__pop${
|
|
128
|
+
I && !y && !N && /* @__PURE__ */ d("div", {
|
|
129
|
+
ref: G,
|
|
130
|
+
className: `kapi-dp__pop${at === "top" ? " kapi-dp__pop--up" : ""}`,
|
|
129
131
|
onKeyDown: (e) => {
|
|
130
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
132
|
+
e.key === "Escape" && (e.preventDefault(), q());
|
|
131
133
|
},
|
|
132
|
-
children: [
|
|
134
|
+
children: [D && /* @__PURE__ */ d("div", {
|
|
133
135
|
className: "kapi-dp__cal",
|
|
134
136
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ d("div", {
|
|
136
138
|
className: "kapi-dp__head",
|
|
137
139
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ u("button", {
|
|
139
141
|
type: "button",
|
|
140
142
|
className: "kapi-dp__nav",
|
|
141
|
-
"aria-label":
|
|
143
|
+
"aria-label": T.prevMonth,
|
|
142
144
|
onClick: () => $(-1),
|
|
143
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ u(Ee, {
|
|
144
146
|
className: "kapi-flip-rtl",
|
|
145
147
|
size: 15,
|
|
146
148
|
strokeWidth: 2.2
|
|
147
149
|
})
|
|
148
150
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ u("span", {
|
|
150
152
|
className: "kapi-dp__title",
|
|
151
|
-
children:
|
|
153
|
+
children: _e(V, T.months)
|
|
152
154
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ u("button", {
|
|
154
156
|
type: "button",
|
|
155
157
|
className: "kapi-dp__nav",
|
|
156
|
-
"aria-label":
|
|
158
|
+
"aria-label": T.nextMonth,
|
|
157
159
|
onClick: () => $(1),
|
|
158
|
-
children: /* @__PURE__ */
|
|
160
|
+
children: /* @__PURE__ */ u(De, {
|
|
159
161
|
className: "kapi-flip-rtl",
|
|
160
162
|
size: 15,
|
|
161
163
|
strokeWidth: 2.2
|
|
@@ -163,56 +165,56 @@ var Ee = (e, t) => e === "time" ? "hh:mm" : e === "datetime" ? `${t} hh:mm` : t,
|
|
|
163
165
|
})
|
|
164
166
|
]
|
|
165
167
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
weekStartsOn:
|
|
168
|
-
view:
|
|
169
|
-
onViewChange:
|
|
170
|
-
labels:
|
|
171
|
-
focusTarget:
|
|
172
|
-
focusRequest:
|
|
173
|
-
isSelected: (e) =>
|
|
174
|
-
dayClassName: (e) =>
|
|
168
|
+
/* @__PURE__ */ u(be, {
|
|
169
|
+
weekStartsOn: Ue,
|
|
170
|
+
view: V,
|
|
171
|
+
onViewChange: H,
|
|
172
|
+
labels: T,
|
|
173
|
+
focusTarget: R,
|
|
174
|
+
focusRequest: Ze,
|
|
175
|
+
isSelected: (e) => o(e, R),
|
|
176
|
+
dayClassName: (e) => o(e, R) && "kapi-dp__day--sel",
|
|
175
177
|
onPick: Z
|
|
176
178
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ d("div", {
|
|
178
180
|
className: "kapi-dp__foot",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ u("button", {
|
|
180
182
|
type: "button",
|
|
181
183
|
className: "kapi-dp__link",
|
|
182
184
|
onClick: () => {
|
|
183
|
-
X(null),
|
|
185
|
+
X(null), L(!1);
|
|
184
186
|
},
|
|
185
|
-
children:
|
|
186
|
-
}), /* @__PURE__ */
|
|
187
|
+
children: T.clear
|
|
188
|
+
}), /* @__PURE__ */ u("button", {
|
|
187
189
|
type: "button",
|
|
188
190
|
className: "kapi-dp__link",
|
|
189
191
|
onClick: () => {
|
|
190
192
|
let e = /* @__PURE__ */ new Date();
|
|
191
|
-
e.setHours(0, 0, 0, 0),
|
|
193
|
+
e.setHours(0, 0, 0, 0), H(e), Z(e);
|
|
192
194
|
},
|
|
193
|
-
children:
|
|
195
|
+
children: T.today
|
|
194
196
|
})]
|
|
195
197
|
})
|
|
196
198
|
]
|
|
197
|
-
}),
|
|
199
|
+
}), O && /* @__PURE__ */ u("div", {
|
|
198
200
|
className: "kapi-dp__time",
|
|
199
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ d("div", {
|
|
200
202
|
className: "kapi-dp__time-cols",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ u("div", {
|
|
202
204
|
className: "kapi-dp__time-col",
|
|
203
|
-
children:
|
|
205
|
+
children: Ae.map((e) => /* @__PURE__ */ u("button", {
|
|
204
206
|
type: "button",
|
|
205
|
-
className: `kapi-dp__time-opt${
|
|
207
|
+
className: `kapi-dp__time-opt${R?.getHours() === e ? " kapi-dp__time-opt--sel" : ""}`,
|
|
206
208
|
onClick: () => Q(e, null),
|
|
207
|
-
children:
|
|
209
|
+
children: a(e)
|
|
208
210
|
}, e))
|
|
209
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ u("div", {
|
|
210
212
|
className: "kapi-dp__time-col",
|
|
211
|
-
children:
|
|
213
|
+
children: ge(Be, R?.getMinutes()).map((e) => /* @__PURE__ */ u("button", {
|
|
212
214
|
type: "button",
|
|
213
|
-
className: `kapi-dp__time-opt${
|
|
215
|
+
className: `kapi-dp__time-opt${R?.getMinutes() === e ? " kapi-dp__time-opt--sel" : ""}`,
|
|
214
216
|
onClick: () => Q(null, e),
|
|
215
|
-
children:
|
|
217
|
+
children: a(e)
|
|
216
218
|
}, e))
|
|
217
219
|
})]
|
|
218
220
|
})
|
|
@@ -222,4 +224,4 @@ var Ee = (e, t) => e === "time" ? "hh:mm" : e === "datetime" ? `${t} hh:mm` : t,
|
|
|
222
224
|
}));
|
|
223
225
|
};
|
|
224
226
|
//#endregion
|
|
225
|
-
export {
|
|
227
|
+
export { f as KapiDatePicker };
|