@konstructio/ui 0.1.7 → 0.1.8
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/check-Bekes_eB.js +14 -0
- package/dist/components/CopyButton/CopyButton.js +12 -12
- package/dist/components/DateRangePicker/DateRangePicker.js +58 -57
- package/dist/components/DateRangePicker/DateRangePicker.variants.js +1 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +55 -54
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +17 -17
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.js +15 -14
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +74 -55
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +38 -38
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +60 -56
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +21 -14
- package/dist/components/DateRangePicker/components/RightPanel/RightPanel.js +41 -25
- package/dist/components/DateRangePicker/contexts/date-range-picker/date-range-picker.provider.js +15 -14
- package/dist/components/Filter/Filter.variants.js +12 -7
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/MobilePresets/MobilePresets.js +39 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/PanelActions/PanelActions.js +17 -14
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Picker/Picker.js +48 -27
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Trigger/Trigger.js +13 -12
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Wrapper/Wrapper.js +53 -17
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.provider.js +87 -78
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +44 -20
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +58 -50
- package/dist/components/Filter/hooks/index.js +5 -2
- package/dist/components/Filter/hooks/useFilterSheet.js +6 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +18 -18
- package/dist/components/Sheet/Sheet.js +143 -139
- package/dist/components/Sheet/components/SheetStep/SheetStep.js +57 -55
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +42 -42
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +25 -2
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +17 -17
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +40 -39
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/constants/index.js +6 -5
- package/dist/components/VirtualizedTable/constants/responsive.js +2 -1
- package/dist/{constants-YCGllWdf.js → constants-Cw00eFTQ.js} +13 -13
- package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +6 -0
- package/dist/lib/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.types.d.ts +2 -0
- package/dist/lib/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.types.d.ts +2 -0
- package/dist/lib/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.d.ts +1 -1
- package/dist/lib/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.d.ts +3 -1
- package/dist/lib/components/DateRangePicker/contexts/date-range-picker/date-range-picker.context.d.ts +2 -0
- package/dist/lib/components/DateRangePicker/contexts/date-range-picker/date-range-picker.types.d.ts +1 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/MobilePresets/MobilePresets.d.ts +3 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/MobilePresets/MobilePresets.types.d.ts +3 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/PanelActions/PanelActions.d.ts +2 -1
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/PanelActions/PanelActions.types.d.ts +4 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Picker/Picker.d.ts +2 -1
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Picker/Picker.types.d.ts +4 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.types.d.ts +2 -0
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +8 -0
- package/dist/lib/components/Filter/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/hooks/useFilterSheet.d.ts +2 -0
- package/dist/lib/components/Sheet/Sheet.types.d.ts +12 -0
- package/dist/lib/components/Sheet/components/SheetStep/SheetStep.d.ts +21 -3
- package/dist/lib/components/VirtualizedTable/constants/responsive.d.ts +1 -0
- package/dist/package.json +18 -18
- package/dist/styles.css +1 -1
- package/dist/ui/utilities.css +23 -0
- package/package.json +18 -18
- package/dist/StepIndicatorContent-C6MILk4c.js +0 -36
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { animate as
|
|
6
|
-
var
|
|
2
|
+
import { t as L } from "../../../../utils-DnIJruo0.js";
|
|
3
|
+
import { forwardRef as j, useCallback as G, useEffect as M, useLayoutEffect as V, useRef as u } from "react";
|
|
4
|
+
import { jsx as W } from "react/jsx-runtime";
|
|
5
|
+
import { animate as h, motion as D, useMotionValue as K } from "motion/react";
|
|
6
|
+
var E = "100%", l = {
|
|
7
7
|
type: "spring",
|
|
8
8
|
stiffness: 380,
|
|
9
9
|
damping: 38
|
|
10
|
-
},
|
|
11
|
-
enter: (t) =>
|
|
12
|
-
x:
|
|
10
|
+
}, R = { duration: 0 }, X = 0.05, d = (t) => typeof t == "number" ? t : t.direction, P = "-30%", q = {
|
|
11
|
+
enter: (t) => d(t) > 0 ? {
|
|
12
|
+
x: E,
|
|
13
13
|
opacity: 1,
|
|
14
14
|
zIndex: 1
|
|
15
15
|
} : {
|
|
@@ -20,75 +20,77 @@ var h = "100%", u = {
|
|
|
20
20
|
center: (t) => ({
|
|
21
21
|
x: 0,
|
|
22
22
|
opacity: 1,
|
|
23
|
-
zIndex:
|
|
23
|
+
zIndex: d(t) > 0 ? 1 : 0
|
|
24
24
|
}),
|
|
25
25
|
exit: (t) => typeof t == "object" && t.instant ? {
|
|
26
26
|
opacity: 0,
|
|
27
|
-
transition:
|
|
28
|
-
} :
|
|
27
|
+
transition: R
|
|
28
|
+
} : d(t) > 0 ? {
|
|
29
29
|
x: P,
|
|
30
30
|
opacity: 1,
|
|
31
31
|
zIndex: 0
|
|
32
32
|
} : {
|
|
33
|
-
x:
|
|
33
|
+
x: E,
|
|
34
34
|
opacity: 1,
|
|
35
35
|
zIndex: 1
|
|
36
36
|
}
|
|
37
|
-
},
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
}, w = j(({ step: t, direction: m, animated: a, canSwipeBack: o, onMount: I, commitSignal: f, isArmed: S, onBackStart: A, onBackMove: T, onBackEnd: g, onBackCommit: N, onBackCancel: _, children: b }, s) => {
|
|
38
|
+
const r = K(0), c = u(null), i = u(!1), p = u(f), z = G((e) => {
|
|
39
|
+
c.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
40
|
+
}, [s]);
|
|
41
|
+
V(() => {
|
|
42
|
+
I(c.current?.getBoundingClientRect().height ?? 0);
|
|
41
43
|
}, []);
|
|
42
44
|
const x = () => {
|
|
43
|
-
const
|
|
44
|
-
if (typeof
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
const e = r.get();
|
|
46
|
+
if (typeof e == "string") {
|
|
47
|
+
const n = c.current?.offsetWidth ?? 0;
|
|
48
|
+
r.set(parseFloat(e) / 100 * n || 0);
|
|
47
49
|
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
...
|
|
51
|
-
onComplete:
|
|
50
|
+
}, v = () => {
|
|
51
|
+
r.stop(), x(), h(r, c.current?.offsetWidth ?? 0, {
|
|
52
|
+
...l,
|
|
53
|
+
onComplete: N
|
|
52
54
|
});
|
|
53
55
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
M(() => {
|
|
57
|
+
p.current !== f && (p.current = f, v());
|
|
56
58
|
}, [f]);
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
if (!
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
if (
|
|
65
|
-
if (
|
|
66
|
-
|
|
59
|
+
const C = (e, n) => {
|
|
60
|
+
i.current = o && S(n), i.current && (r.stop(), x(), A());
|
|
61
|
+
}, F = (e, n) => {
|
|
62
|
+
if (!i.current) return;
|
|
63
|
+
const y = n.offset.x >= 0 ? n.offset.x : n.offset.x * X;
|
|
64
|
+
r.set(y), T(Math.max(y, 0));
|
|
65
|
+
}, O = (e, n) => {
|
|
66
|
+
if (i.current) {
|
|
67
|
+
if (i.current = !1, g(n) === "back") {
|
|
68
|
+
v();
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
|
-
|
|
70
|
-
...
|
|
71
|
-
onComplete:
|
|
71
|
+
h(r, 0, {
|
|
72
|
+
...l,
|
|
73
|
+
onComplete: _
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
};
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
ref:
|
|
77
|
-
custom:
|
|
78
|
-
className:
|
|
79
|
-
style: { x:
|
|
80
|
-
variants:
|
|
81
|
-
initial:
|
|
77
|
+
return /* @__PURE__ */ W(D.div, {
|
|
78
|
+
ref: z,
|
|
79
|
+
custom: m,
|
|
80
|
+
className: L("relative flex w-full flex-col bg-white dark:bg-metal-800", o && "touch-pan-y"),
|
|
81
|
+
style: { x: r },
|
|
82
|
+
variants: a ? q : void 0,
|
|
83
|
+
initial: a ? "enter" : !1,
|
|
82
84
|
animate: "center",
|
|
83
|
-
exit:
|
|
84
|
-
transition:
|
|
85
|
-
onPanStart:
|
|
86
|
-
onPan:
|
|
87
|
-
onPanEnd:
|
|
88
|
-
children:
|
|
85
|
+
exit: a ? "exit" : void 0,
|
|
86
|
+
transition: a ? l : R,
|
|
87
|
+
onPanStart: o ? C : void 0,
|
|
88
|
+
onPan: o ? F : void 0,
|
|
89
|
+
onPanEnd: o ? O : void 0,
|
|
90
|
+
children: b
|
|
89
91
|
}, t);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
+
});
|
|
93
|
+
w.displayName = "KonstructSheetStep";
|
|
92
94
|
export {
|
|
93
|
-
|
|
95
|
+
w as SheetStep
|
|
94
96
|
};
|
|
@@ -51,7 +51,7 @@ var et = (o) => {
|
|
|
51
51
|
}), /* @__PURE__ */ t(M, { children: /* @__PURE__ */ s(U, {
|
|
52
52
|
side: "right",
|
|
53
53
|
sideOffset: 12,
|
|
54
|
-
className: T("z-60 flex w-fit items-center gap-2 rounded px-3 py-2 text-sm shadow-lg whitespace-nowrap", "animate-
|
|
54
|
+
className: T("z-60 flex w-fit items-center gap-2 rounded px-3 py-2 text-sm shadow-lg whitespace-nowrap", "animate-tooltip-pop origin-(--radix-tooltip-content-transform-origin) motion-reduce:animate-none", w, y, E),
|
|
55
55
|
children: [g, /* @__PURE__ */ t(z, { className: O })]
|
|
56
56
|
}) })] })
|
|
57
57
|
}) : n;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { t } from "../../../../utils-DnIJruo0.js";
|
|
1
|
+
import { t as i } from "../../../../utils-DnIJruo0.js";
|
|
2
2
|
import { useStepItemLogic as w } from "../../hooks/useStepItemLogic.js";
|
|
3
3
|
import { stepContentVariants as v, stepDescriptionVariants as C, stepIndicatorVariants as k, stepLabelVariants as g, stepVariants as I } from "../../Stepper.variants.js";
|
|
4
4
|
import { getStepAriaLabel as x } from "../../utils/index.js";
|
|
5
5
|
import { StepConnector as y } from "../StepConnector/StepConnector.js";
|
|
6
|
-
import {
|
|
6
|
+
import { StepIndicatorContent as S } from "../StepIndicatorContent/StepIndicatorContent.js";
|
|
7
7
|
import { memo as K } from "react";
|
|
8
|
-
import { jsx as
|
|
9
|
-
var L = ({ classNames: r, clickable: D, icons: m, index: c, isLast: p, showConnector: b, size:
|
|
8
|
+
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
var L = ({ classNames: r, clickable: D, icons: m, index: c, isLast: p, showConnector: b, size: a, step: t, variant: o, onClick: V }) => {
|
|
10
10
|
const { isClickable: l, isDisabled: h, LabelComponent: s, status: e, handleClick: u, handleKeyDown: f } = w({
|
|
11
11
|
clickable: D,
|
|
12
|
-
step:
|
|
12
|
+
step: t,
|
|
13
13
|
onClick: V
|
|
14
14
|
});
|
|
15
15
|
return o === "horizontal" ? /* @__PURE__ */ d("div", {
|
|
16
16
|
className: "flex items-center",
|
|
17
17
|
children: [/* @__PURE__ */ d("div", {
|
|
18
|
-
className:
|
|
18
|
+
className: i(I({
|
|
19
19
|
orientation: "horizontal",
|
|
20
20
|
variant: o,
|
|
21
21
|
clickable: l
|
|
@@ -26,47 +26,47 @@ var L = ({ classNames: r, clickable: D, icons: m, index: c, isLast: p, showConne
|
|
|
26
26
|
onKeyDown: f,
|
|
27
27
|
"aria-current": e === "active" ? "step" : void 0,
|
|
28
28
|
...h && { "aria-disabled": !0 },
|
|
29
|
-
"aria-label": x(c,
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
-
className:
|
|
29
|
+
"aria-label": x(c, t.label, e),
|
|
30
|
+
children: [/* @__PURE__ */ n("div", {
|
|
31
|
+
className: i(k({
|
|
32
32
|
status: e,
|
|
33
|
-
size:
|
|
33
|
+
size: a
|
|
34
34
|
}), r?.indicator),
|
|
35
35
|
"aria-hidden": "true",
|
|
36
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ n(S, {
|
|
37
37
|
status: e,
|
|
38
38
|
index: c,
|
|
39
|
-
size:
|
|
39
|
+
size: a,
|
|
40
40
|
icons: m,
|
|
41
41
|
className: r?.indicatorContent
|
|
42
42
|
})
|
|
43
43
|
}), /* @__PURE__ */ d("div", {
|
|
44
|
-
className:
|
|
45
|
-
children: [
|
|
46
|
-
className:
|
|
44
|
+
className: i(v({ variant: o }), r?.content),
|
|
45
|
+
children: [t.label && /* @__PURE__ */ n(s, {
|
|
46
|
+
className: i(g({
|
|
47
47
|
status: e,
|
|
48
|
-
size:
|
|
48
|
+
size: a,
|
|
49
49
|
variant: o
|
|
50
50
|
}), r?.label),
|
|
51
|
-
children:
|
|
52
|
-
}),
|
|
53
|
-
className:
|
|
51
|
+
children: t.label
|
|
52
|
+
}), t.description && /* @__PURE__ */ n("span", {
|
|
53
|
+
className: i(C({
|
|
54
54
|
status: e,
|
|
55
|
-
size:
|
|
55
|
+
size: a,
|
|
56
56
|
variant: o
|
|
57
57
|
}), r?.description),
|
|
58
|
-
children:
|
|
58
|
+
children: t.description
|
|
59
59
|
})]
|
|
60
60
|
})]
|
|
61
|
-
}), !p && b && /* @__PURE__ */
|
|
62
|
-
className:
|
|
61
|
+
}), !p && b && /* @__PURE__ */ n("div", {
|
|
62
|
+
className: i("h-0.5 w-7.5 mx-2 transition-colors duration-200", e === "completed" || e === "active" ? "bg-aurora-500" : e === "error" ? "bg-red-700 dark:bg-red-600" : "bg-slate-300 dark:bg-metal-400", r?.connector),
|
|
63
63
|
role: "presentation",
|
|
64
64
|
"aria-hidden": "true"
|
|
65
65
|
})]
|
|
66
66
|
}) : /* @__PURE__ */ d("div", {
|
|
67
67
|
className: "flex flex-1 items-start",
|
|
68
68
|
children: [/* @__PURE__ */ d("div", {
|
|
69
|
-
className:
|
|
69
|
+
className: i(I({
|
|
70
70
|
orientation: "horizontal",
|
|
71
71
|
variant: o,
|
|
72
72
|
clickable: l
|
|
@@ -77,44 +77,44 @@ var L = ({ classNames: r, clickable: D, icons: m, index: c, isLast: p, showConne
|
|
|
77
77
|
onKeyDown: f,
|
|
78
78
|
"aria-current": e === "active" ? "step" : void 0,
|
|
79
79
|
...h && { "aria-disabled": !0 },
|
|
80
|
-
"aria-label": x(c,
|
|
81
|
-
children: [/* @__PURE__ */
|
|
82
|
-
className:
|
|
80
|
+
"aria-label": x(c, t.label, e),
|
|
81
|
+
children: [/* @__PURE__ */ n("div", {
|
|
82
|
+
className: i(k({
|
|
83
83
|
status: e,
|
|
84
|
-
size:
|
|
84
|
+
size: a
|
|
85
85
|
}), r?.indicator),
|
|
86
86
|
"aria-hidden": "true",
|
|
87
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ n(S, {
|
|
88
88
|
status: e,
|
|
89
89
|
index: c,
|
|
90
|
-
size:
|
|
90
|
+
size: a,
|
|
91
91
|
icons: m,
|
|
92
92
|
className: r?.indicatorContent
|
|
93
93
|
})
|
|
94
94
|
}), /* @__PURE__ */ d("div", {
|
|
95
|
-
className:
|
|
96
|
-
children: [
|
|
97
|
-
className:
|
|
95
|
+
className: i(v({ variant: o }), r?.content),
|
|
96
|
+
children: [t.label && /* @__PURE__ */ n(s, {
|
|
97
|
+
className: i(g({
|
|
98
98
|
status: e,
|
|
99
|
-
size:
|
|
99
|
+
size: a,
|
|
100
100
|
variant: o
|
|
101
101
|
}), r?.label),
|
|
102
|
-
children:
|
|
103
|
-
}),
|
|
104
|
-
className:
|
|
102
|
+
children: t.label
|
|
103
|
+
}), t.description && /* @__PURE__ */ n("span", {
|
|
104
|
+
className: i(C({
|
|
105
105
|
status: e,
|
|
106
|
-
size:
|
|
106
|
+
size: a,
|
|
107
107
|
variant: o
|
|
108
108
|
}), r?.description),
|
|
109
|
-
children:
|
|
109
|
+
children: t.description
|
|
110
110
|
})]
|
|
111
111
|
})]
|
|
112
|
-
}), !p && b && /* @__PURE__ */
|
|
112
|
+
}), !p && b && /* @__PURE__ */ n(y, {
|
|
113
113
|
orientation: "horizontal",
|
|
114
114
|
status: e,
|
|
115
|
-
size:
|
|
115
|
+
size: a,
|
|
116
116
|
variant: o,
|
|
117
|
-
className:
|
|
117
|
+
className: i("mt-6.5", r?.connector)
|
|
118
118
|
})]
|
|
119
119
|
});
|
|
120
120
|
}, F = K(L);
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as m } from "../../../../check-Bekes_eB.js";
|
|
2
|
+
import { ExclamationIcon as p } from "../../../../assets/icons/components/Exclamation.js";
|
|
3
|
+
import { t as d } from "../../../../utils-DnIJruo0.js";
|
|
4
|
+
import { CHECK_ICON_SIZE_MAP as f, ICON_SIZE_MAP as a } from "../../constants/index.js";
|
|
5
|
+
import { memo as h } from "react";
|
|
6
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
7
|
+
var C = ({ className: r, icons: e, index: i, size: o, status: n }) => n === "completed" ? e?.completed ? /* @__PURE__ */ t("span", {
|
|
8
|
+
className: r,
|
|
9
|
+
children: e.completed
|
|
10
|
+
}) : /* @__PURE__ */ t(m, {
|
|
11
|
+
className: d(f[o], r),
|
|
12
|
+
strokeWidth: 2.5,
|
|
13
|
+
"aria-hidden": "true"
|
|
14
|
+
}) : n === "error" ? e?.error ? /* @__PURE__ */ t("span", {
|
|
15
|
+
className: r,
|
|
16
|
+
children: e.error
|
|
17
|
+
}) : /* @__PURE__ */ t(p, {
|
|
18
|
+
size: a[o],
|
|
19
|
+
className: r
|
|
20
|
+
}) : /* @__PURE__ */ t("span", {
|
|
21
|
+
className: r,
|
|
22
|
+
"aria-hidden": "true",
|
|
23
|
+
children: i + 1
|
|
24
|
+
}), S = h(C);
|
|
2
25
|
export {
|
|
3
|
-
|
|
26
|
+
S as StepIndicatorContent
|
|
4
27
|
};
|
|
@@ -3,7 +3,7 @@ import { useStepItemLogic as x } from "../../hooks/useStepItemLogic.js";
|
|
|
3
3
|
import { stepContentVariants as V, stepDescriptionVariants as I, stepIndicatorVariants as S, stepLabelVariants as k, stepVariants as D } from "../../Stepper.variants.js";
|
|
4
4
|
import { getStepAriaLabel as L } from "../../utils/index.js";
|
|
5
5
|
import { StepConnector as g } from "../StepConnector/StepConnector.js";
|
|
6
|
-
import {
|
|
6
|
+
import { StepIndicatorContent as j } from "../StepIndicatorContent/StepIndicatorContent.js";
|
|
7
7
|
import { memo as w } from "react";
|
|
8
8
|
import { jsx as n, jsxs as c } from "react/jsx-runtime";
|
|
9
9
|
var y = ({ classNames: e, clickable: m, icons: p, index: d, isLast: s, showConnector: b, size: o, step: r, variant: i, onClick: f }) => {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { a as w, i as C, n as b, o as j, r as O, t as P } from "../../dist-DsOk4psA.js";
|
|
2
|
-
import { t } from "../../utils-DnIJruo0.js";
|
|
2
|
+
import { t as e } from "../../utils-DnIJruo0.js";
|
|
3
3
|
import { useState as y } from "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
var k = ({ content:
|
|
6
|
-
const [
|
|
4
|
+
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
var k = ({ content: t, children: r, asOverlay: s = !1, disabled: a = !1, overlayClassName: n, overlayLabel: p, wrapperClassName: m, side: d = "top", sideOffset: c = 4, bgClassName: f = "bg-slate-700", arrowClassName: h = "fill-slate-700", textClassName: g = "text-white", className: u, delayDuration: x = 0 }) => {
|
|
6
|
+
const [T, v] = y(!1), N = s ? /* @__PURE__ */ o("span", {
|
|
7
7
|
role: "img",
|
|
8
|
-
"aria-label": p ?? (typeof
|
|
8
|
+
"aria-label": p ?? (typeof t == "string" ? t : void 0),
|
|
9
9
|
hidden: a,
|
|
10
|
-
className:
|
|
11
|
-
}) : /* @__PURE__ */
|
|
12
|
-
delayDuration:
|
|
13
|
-
children: /* @__PURE__ */
|
|
14
|
-
open: !a &&
|
|
10
|
+
className: e("absolute cursor-help", n ?? "inset-0")
|
|
11
|
+
}) : /* @__PURE__ */ o("span", { children: r }), l = /* @__PURE__ */ o(w, {
|
|
12
|
+
delayDuration: x,
|
|
13
|
+
children: /* @__PURE__ */ i(P, {
|
|
14
|
+
open: !a && T,
|
|
15
15
|
onOpenChange: v,
|
|
16
|
-
children: [/* @__PURE__ */
|
|
16
|
+
children: [/* @__PURE__ */ o(j, {
|
|
17
17
|
asChild: !0,
|
|
18
18
|
children: N
|
|
19
|
-
}), /* @__PURE__ */
|
|
19
|
+
}), /* @__PURE__ */ o(C, { children: /* @__PURE__ */ i(O, {
|
|
20
20
|
side: d,
|
|
21
21
|
sideOffset: c,
|
|
22
|
-
className:
|
|
23
|
-
children: [
|
|
22
|
+
className: e("rounded px-2 py-1 text-xs shadow-md", "animate-tooltip-pop origin-(--radix-tooltip-content-transform-origin) motion-reduce:animate-none", f, g, u),
|
|
23
|
+
children: [t, /* @__PURE__ */ o(b, { className: h })]
|
|
24
24
|
}) })]
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
|
-
return
|
|
28
|
-
className:
|
|
29
|
-
children: [
|
|
27
|
+
return s ? /* @__PURE__ */ i("div", {
|
|
28
|
+
className: e("relative", m),
|
|
29
|
+
children: [r, l]
|
|
30
30
|
}) : l;
|
|
31
31
|
};
|
|
32
32
|
export {
|
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
import { o as
|
|
1
|
+
import { o as K } from "../../../../rolldown-runtime-B28h4lGi.js";
|
|
2
2
|
import { t as X } from "../../../../debounce-DhCY9mXz.js";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as R } from "../../../Button/Button.js";
|
|
4
4
|
import { Filter as n } from "../../../Filter/Filter.js";
|
|
5
|
-
import { resetEvent as
|
|
6
|
-
import { t as
|
|
5
|
+
import { resetEvent as Z } from "../../../Filter/events/index.js";
|
|
6
|
+
import { t as C } from "../../../../Input-CE6J6HIW.js";
|
|
7
|
+
import { useMediaQuery as ee } from "../../../../hooks/useMediaQuery.js";
|
|
7
8
|
import { t as d } from "../../../../utils-DnIJruo0.js";
|
|
8
|
-
import { HIDE_BELOW_CLASS as
|
|
9
|
-
import { useTableContext as
|
|
10
|
-
import { useIsFlexWrapped as
|
|
11
|
-
import { t as
|
|
12
|
-
import { getTableId as
|
|
13
|
-
import { useEffect as
|
|
9
|
+
import { HIDE_BELOW_CLASS as te, SHOW_BELOW_CLASS as ae } from "../../constants/responsive.js";
|
|
10
|
+
import { useTableContext as re } from "../../contexts/table.hook.js";
|
|
11
|
+
import { useIsFlexWrapped as oe } from "../../hooks/useIsFlexWrapped/useIsFlexWrapped.js";
|
|
12
|
+
import { t as se } from "../../../../events.types-BG1Uh8i6.js";
|
|
13
|
+
import { getTableId as ne } from "../../utils/get-table-id.js";
|
|
14
|
+
import { useEffect as le, useMemo as ce, useRef as D } from "react";
|
|
14
15
|
import { jsx as o, jsxs as y } from "react/jsx-runtime";
|
|
15
|
-
var
|
|
16
|
-
const l = D(null), v = D(null),
|
|
16
|
+
var me = /* @__PURE__ */ K(X(), 1), Oe = ({ id: _, actions: T, filters: E, multiSelectFilter: O, placeholder: k, showFilterInput: b = !0, showResetButton: A = !0, resetButtonClassName: I, closeOnApply: M = !0 }) => {
|
|
17
|
+
const l = D(null), v = D(null), B = oe(v), f = ee("(max-width: 767.98px)") && B ? "left" : "right", m = ne(_), { termOfSearch: j, multiselectSelected: L, dateFilters: N, dateRangeFilters: P, timeFilters: g, onChangeTermOfSearch: c, onSelectMultiselect: W, onSelectDateFilter: z, onSelectDateRangeFilter: w, onSelectTimeFilter: H } = re(), S = [...E ?? O?.map((e) => ({
|
|
17
18
|
...e,
|
|
18
19
|
type: "badgeMultiSelect"
|
|
19
|
-
})) ?? [], ...
|
|
20
|
-
|
|
20
|
+
})) ?? [], ...T ?? []], Q = S.filter((e) => e.type === "action" && !!e.iconOnlyBelow), F = (e, t) => {
|
|
21
|
+
W(e, t.map((r) => r.id));
|
|
21
22
|
}, q = () => {
|
|
22
23
|
c(""), l.current && (l.current.value = "");
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
le(() => {
|
|
25
26
|
const e = new AbortController();
|
|
26
|
-
return document.addEventListener(
|
|
27
|
+
return document.addEventListener(se.RESET_FILTERS, (t) => {
|
|
27
28
|
const { detail: r } = t;
|
|
28
|
-
r.tableId === m && (c(""), l.current && (l.current.value = ""),
|
|
29
|
+
r.tableId === m && (c(""), l.current && (l.current.value = ""), Z(m));
|
|
29
30
|
}, { signal: e.signal }), () => e.abort();
|
|
30
31
|
}, [m, c]);
|
|
31
|
-
const
|
|
32
|
+
const U = ce(() => (0, me.default)((e) => {
|
|
32
33
|
c(e.target.value);
|
|
33
|
-
}, 500), [c]),
|
|
34
|
+
}, 500), [c]), V = !!j || Object.values(L ?? {}).flat().length > 0 || Object.values(N ?? {}).some(Boolean) || Object.values(P ?? {}).some(Boolean) || Object.values(g ?? {}).some(Boolean), Y = (e) => {
|
|
34
35
|
if (e.type === "action") {
|
|
35
|
-
const { label: a, appearance: p = "compact", variant: i = "secondary", leftIcon: u, rightIcon: h, iconOnlyBelow:
|
|
36
|
-
return /* @__PURE__ */ y(
|
|
36
|
+
const { label: a, appearance: p = "compact", variant: i = "secondary", leftIcon: u, rightIcon: h, iconOnlyBelow: x, className: G, type: pe, ...J } = e;
|
|
37
|
+
return /* @__PURE__ */ y(R, {
|
|
37
38
|
appearance: p,
|
|
38
39
|
variant: i,
|
|
39
|
-
className: d(
|
|
40
|
-
...
|
|
40
|
+
className: d(x && te[x], G),
|
|
41
|
+
...J,
|
|
41
42
|
children: [
|
|
42
43
|
u,
|
|
43
44
|
a,
|
|
@@ -45,7 +46,7 @@ var le = /* @__PURE__ */ U(X(), 1), De = ({ id: T, actions: _, filters: O, multi
|
|
|
45
46
|
]
|
|
46
47
|
}, a);
|
|
47
48
|
}
|
|
48
|
-
const { key: t, label: r, position: s =
|
|
49
|
+
const { key: t, label: r, position: s = f } = e;
|
|
49
50
|
if (e.type === "textMultiSelect") return /* @__PURE__ */ o(n.TextMultiSelect, {
|
|
50
51
|
label: r,
|
|
51
52
|
position: s,
|
|
@@ -59,7 +60,7 @@ var le = /* @__PURE__ */ U(X(), 1), De = ({ id: T, actions: _, filters: O, multi
|
|
|
59
60
|
position: s,
|
|
60
61
|
countryCode: e.countryCode,
|
|
61
62
|
onApply: (a) => {
|
|
62
|
-
|
|
63
|
+
z(t, a);
|
|
63
64
|
}
|
|
64
65
|
}, t);
|
|
65
66
|
if (e.type === "dateRange") return /* @__PURE__ */ o(n.DateRangeFilterDropdown, {
|
|
@@ -73,7 +74,7 @@ var le = /* @__PURE__ */ U(X(), 1), De = ({ id: T, actions: _, filters: O, multi
|
|
|
73
74
|
maxDate: e.maxDate,
|
|
74
75
|
countryCode: e.countryCode,
|
|
75
76
|
onApply: (a) => {
|
|
76
|
-
|
|
77
|
+
w(t, a);
|
|
77
78
|
},
|
|
78
79
|
onRangeChange: e.onRangeChange
|
|
79
80
|
}, t);
|
|
@@ -83,7 +84,7 @@ var le = /* @__PURE__ */ U(X(), 1), De = ({ id: T, actions: _, filters: O, multi
|
|
|
83
84
|
...i,
|
|
84
85
|
position: s,
|
|
85
86
|
onApply: (u) => {
|
|
86
|
-
|
|
87
|
+
w(t, u);
|
|
87
88
|
}
|
|
88
89
|
}, t);
|
|
89
90
|
}
|
|
@@ -94,7 +95,7 @@ var le = /* @__PURE__ */ U(X(), 1), De = ({ id: T, actions: _, filters: O, multi
|
|
|
94
95
|
presets: e.presets,
|
|
95
96
|
showTimePicker: e.showTimePicker,
|
|
96
97
|
onApply: (a) => {
|
|
97
|
-
|
|
98
|
+
H(t, a);
|
|
98
99
|
}
|
|
99
100
|
}, t) : /* @__PURE__ */ o(n.BadgeMultiSelect, {
|
|
100
101
|
label: r,
|
|
@@ -104,10 +105,10 @@ var le = /* @__PURE__ */ U(X(), 1), De = ({ id: T, actions: _, filters: O, multi
|
|
|
104
105
|
F(t, a);
|
|
105
106
|
}
|
|
106
107
|
}, t);
|
|
107
|
-
},
|
|
108
|
+
}, $ = ({ label: e, variant: t = "secondary", leftIcon: r, rightIcon: s, iconOnlyBelow: a, className: p, appearance: i, type: u, ...h }) => /* @__PURE__ */ o(R, {
|
|
108
109
|
variant: t,
|
|
109
110
|
"aria-label": e,
|
|
110
|
-
className: d("relative size-10 shrink-0 p-0 pointer-coarse:min-h-10 touch-hit-area [&>svg]:size-5", a &&
|
|
111
|
+
className: d("relative size-10 shrink-0 p-0 pointer-coarse:min-h-10 touch-hit-area [&>svg]:size-5", a && ae[a], p),
|
|
111
112
|
...h,
|
|
112
113
|
children: r ?? s
|
|
113
114
|
}, e);
|
|
@@ -117,24 +118,24 @@ var le = /* @__PURE__ */ U(X(), 1), De = ({ id: T, actions: _, filters: O, multi
|
|
|
117
118
|
children: [
|
|
118
119
|
b && /* @__PURE__ */ o("div", {
|
|
119
120
|
className: "kvt-search-wrapper w-60 min-w-0 max-sm:grow max-sm:basis-0",
|
|
120
|
-
children: /* @__PURE__ */ o(
|
|
121
|
+
children: /* @__PURE__ */ o(C, {
|
|
121
122
|
ref: l,
|
|
122
|
-
placeholder:
|
|
123
|
+
placeholder: k,
|
|
123
124
|
isSearch: !0,
|
|
124
125
|
autoComplete: "false",
|
|
125
126
|
className: "kvt-search w-full",
|
|
126
127
|
inputMode: "search",
|
|
127
|
-
onChange:
|
|
128
|
+
onChange: U
|
|
128
129
|
})
|
|
129
130
|
}),
|
|
130
|
-
|
|
131
|
+
Q.map($),
|
|
131
132
|
/* @__PURE__ */ y(n, {
|
|
132
133
|
className: "kvt-filter-actions flex-wrap gap-4 max-sm:basis-full",
|
|
133
|
-
closeOnApply:
|
|
134
|
+
closeOnApply: M,
|
|
134
135
|
resetScope: m,
|
|
135
|
-
children: [
|
|
136
|
-
className: d("select-none max-md:
|
|
137
|
-
disabled:
|
|
136
|
+
children: [S.map(Y), A && /* @__PURE__ */ o(n.ResetButton, {
|
|
137
|
+
className: d("select-none max-md:h-auto max-md:min-h-0! max-md:py-0", I),
|
|
138
|
+
disabled: !V,
|
|
138
139
|
onClick: q
|
|
139
140
|
})]
|
|
140
141
|
})
|
|
@@ -142,5 +143,5 @@ var le = /* @__PURE__ */ U(X(), 1), De = ({ id: T, actions: _, filters: O, multi
|
|
|
142
143
|
});
|
|
143
144
|
};
|
|
144
145
|
export {
|
|
145
|
-
|
|
146
|
+
Oe as Filter
|
|
146
147
|
};
|
|
@@ -41,7 +41,7 @@ var j = {
|
|
|
41
41
|
"aria-sort": x ? j[i || "none"] : void 0,
|
|
42
42
|
children: x ? /* @__PURE__ */ c("button", {
|
|
43
43
|
type: "button",
|
|
44
|
-
className: t("relative flex w-full items-center gap-2 text-left", "cursor-pointer rounded-xs outline-none [text-transform:inherit]", "tap-target touch-hit-area", "focus-visible:ring-1 focus-visible:ring-aurora-500"),
|
|
44
|
+
className: t("relative inline-flex max-w-full items-center gap-2 text-left align-middle", "cursor-pointer rounded-xs outline-none [text-transform:inherit]", "tap-target touch-hit-area", "focus-visible:ring-1 focus-visible:ring-aurora-500"),
|
|
45
45
|
onClick: () => w(e),
|
|
46
46
|
children: [u, /* @__PURE__ */ c("span", {
|
|
47
47
|
className: t("flex flex-col text-slate-400 justify-center items-center gap-1", v),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { DEFAULT_PAGE_SIZE as S, DEFAULT_PAGE_SIZES as _ } from "./pagination.js";
|
|
2
|
-
import { BORDER_EDGE_CLASSES as
|
|
2
|
+
import { BORDER_EDGE_CLASSES as L, HIDE_BELOW_CLASS as O, MOBILE_FILTER_QUERY as A, RESPONSIVE_TIERS as R, ROUNDED_BOTTOM_EDGE_CLASSES as I, ROUNDED_TOP_EDGE_CLASSES as T, SHOW_BELOW_CLASS as o } from "./responsive.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
L as BORDER_EDGE_CLASSES,
|
|
5
5
|
S as DEFAULT_PAGE_SIZE,
|
|
6
6
|
_ as DEFAULT_PAGE_SIZES,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
R as
|
|
7
|
+
O as HIDE_BELOW_CLASS,
|
|
8
|
+
A as MOBILE_FILTER_QUERY,
|
|
9
|
+
R as RESPONSIVE_TIERS,
|
|
10
|
+
I as ROUNDED_BOTTOM_EDGE_CLASSES,
|
|
10
11
|
T as ROUNDED_TOP_EDGE_CLASSES,
|
|
11
12
|
o as SHOW_BELOW_CLASS
|
|
12
13
|
};
|
|
@@ -68,10 +68,11 @@ var d = {
|
|
|
68
68
|
xl: "xl:max-2xl:rounded-br-lg",
|
|
69
69
|
"2xl": "2xl:rounded-br-lg"
|
|
70
70
|
}
|
|
71
|
-
};
|
|
71
|
+
}, e = "(max-width: 767.98px)";
|
|
72
72
|
export {
|
|
73
73
|
x as BORDER_EDGE_CLASSES,
|
|
74
74
|
d as HIDE_BELOW_CLASS,
|
|
75
|
+
e as MOBILE_FILTER_QUERY,
|
|
75
76
|
r as RESPONSIVE_TIERS,
|
|
76
77
|
a as ROUNDED_BOTTOM_EDGE_CLASSES,
|
|
77
78
|
m as ROUNDED_TOP_EDGE_CLASSES,
|