@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,29 +1,53 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { useFilterContext as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { a as b, i as v, r as x, t as F } from "../../../../dist-DPLBSjtu.js";
|
|
2
|
+
import { useFilterContext as P } from "../../contexts/filter.hook.js";
|
|
3
|
+
import { useFilterSheet as k } from "../../hooks/useFilterSheet.js";
|
|
4
|
+
import { Sheet as C } from "../../../Sheet/Sheet.js";
|
|
5
|
+
import { t as w } from "../../../../utils-DnIJruo0.js";
|
|
6
|
+
import { Fragment as y, jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
var z = ({ isOpen: t, trigger: o, triggerClassName: n, position: m = "left", contentClassName: p, sheetTitle: u, sheetStep: c, sheetPreviousContent: f, onSheetBack: h, children: s, onOpenChange: r }) => {
|
|
8
|
+
const { theme: i } = P();
|
|
9
|
+
return k() ? /* @__PURE__ */ l(y, { children: [/* @__PURE__ */ e("button", {
|
|
10
|
+
type: "button",
|
|
11
|
+
"aria-haspopup": "dialog",
|
|
12
|
+
"aria-expanded": t,
|
|
13
|
+
className: n,
|
|
14
|
+
onClick: () => r(!0),
|
|
15
|
+
children: o
|
|
16
|
+
}), /* @__PURE__ */ e(C, {
|
|
17
|
+
isOpen: t,
|
|
18
|
+
expandable: !0,
|
|
19
|
+
theme: i,
|
|
20
|
+
title: u ?? o,
|
|
21
|
+
step: c,
|
|
22
|
+
previousContent: f,
|
|
23
|
+
bodyClassName: "px-0",
|
|
24
|
+
onBack: h,
|
|
25
|
+
onClose: () => r(!1),
|
|
26
|
+
children: s
|
|
27
|
+
})] }) : /* @__PURE__ */ l(F, {
|
|
28
|
+
open: t,
|
|
29
|
+
onOpenChange: r,
|
|
30
|
+
children: [/* @__PURE__ */ e(b, {
|
|
31
|
+
className: n,
|
|
32
|
+
children: o
|
|
33
|
+
}), /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(x, {
|
|
34
|
+
"data-theme": i,
|
|
15
35
|
side: "bottom",
|
|
16
36
|
sideOffset: 4,
|
|
17
37
|
collisionPadding: 16,
|
|
18
|
-
align:
|
|
19
|
-
onOpenAutoFocus: (
|
|
20
|
-
|
|
38
|
+
align: m === "right" ? "end" : "start",
|
|
39
|
+
onOpenAutoFocus: (a) => {
|
|
40
|
+
a.preventDefault();
|
|
21
41
|
},
|
|
22
|
-
|
|
23
|
-
|
|
42
|
+
onCloseAutoFocus: (a) => {
|
|
43
|
+
const d = document.activeElement;
|
|
44
|
+
d && d !== document.body && a.preventDefault();
|
|
45
|
+
},
|
|
46
|
+
className: w("bg-white", "rounded-md", "shadow-md", "animate-in", "fade-in-0", "z-50", "dark:bg-metal-800", "dark:border-metal-700", p),
|
|
47
|
+
children: s
|
|
24
48
|
}) })]
|
|
25
49
|
});
|
|
26
50
|
};
|
|
27
51
|
export {
|
|
28
|
-
|
|
52
|
+
z as FilterDropdown
|
|
29
53
|
};
|
|
@@ -1,73 +1,81 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { Badge as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { t as
|
|
5
|
-
import { filterButtonIconVariants as
|
|
6
|
-
import { t as
|
|
7
|
-
import { useBadgeMultiSelect as
|
|
1
|
+
import { t as S } from "../../../../chevron-down-BODx0Q7h.js";
|
|
2
|
+
import { Badge as w } from "../../../Badge/Badge.js";
|
|
3
|
+
import { Button as x } from "../../../Button/Button.js";
|
|
4
|
+
import { t as p } from "../../../../Checkbox-DtgzySMh.js";
|
|
5
|
+
import { filterButtonIconVariants as B, filterButtonVariants as F } from "../../Filter.variants.js";
|
|
6
|
+
import { t as n } from "../../../../utils-DnIJruo0.js";
|
|
7
|
+
import { useBadgeMultiSelect as $ } from "../BadgeDropdown/hooks/useBadgeMultiSelect/useBadgeMultiSelect.js";
|
|
8
8
|
import { FilterDropdown as A } from "../FilterDropdown/FilterDropdown.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { useId as j } from "react";
|
|
10
|
+
import { Fragment as I, jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
11
|
+
var H = ({ options: r, label: s, position: h = "left", onApply: f, showSelectAll: g = !0, selectAllLabel: i = "All" }) => {
|
|
12
|
+
const { isOpen: m, isAllSelected: u, selectedOptions: b, selectedCount: c, handleOpenChange: N, handleResetOptions: C, handleApplyOptions: k, handleSelectAll: v, handleSelectOption: y } = $({
|
|
13
|
+
onApply: f,
|
|
13
14
|
options: r
|
|
14
|
-
});
|
|
15
|
+
}), d = j();
|
|
15
16
|
return r.length === 0 ? null : /* @__PURE__ */ t(A, {
|
|
16
|
-
isOpen:
|
|
17
|
-
position:
|
|
17
|
+
isOpen: m,
|
|
18
|
+
position: h,
|
|
18
19
|
contentClassName: "border border-gray-200",
|
|
19
|
-
triggerClassName:
|
|
20
|
-
trigger: /* @__PURE__ */ t(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */
|
|
20
|
+
triggerClassName: n(F(), { "text-slate-700 dark:text-metal-50": m }),
|
|
21
|
+
trigger: /* @__PURE__ */ t(I, { children: [
|
|
22
|
+
s,
|
|
23
|
+
c.length > 0 && /* @__PURE__ */ a(w, { label: c.length.toString() }),
|
|
24
|
+
/* @__PURE__ */ a(S, { className: n(B(), { "rotate-180 text-blue-600 dark:text-aurora-500": m }) })
|
|
24
25
|
] }),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
sheetTitle: s,
|
|
27
|
+
onOpenChange: N,
|
|
28
|
+
children: [/* @__PURE__ */ a("div", {
|
|
29
|
+
className: "px-6 py-4 max-md:px-4 max-md:py-0",
|
|
28
30
|
children: /* @__PURE__ */ t("div", {
|
|
29
|
-
className: "flex flex-col gap-2",
|
|
30
|
-
children: [
|
|
31
|
-
className: "flex gap-4",
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
className: "flex flex-col gap-2 max-md:gap-0",
|
|
32
|
+
children: [g && /* @__PURE__ */ t("div", {
|
|
33
|
+
className: "flex items-center gap-4 max-md:min-h-12",
|
|
34
|
+
children: [/* @__PURE__ */ a(p, {
|
|
35
|
+
id: `${d}-all`,
|
|
36
|
+
checked: u,
|
|
37
|
+
"aria-label": i,
|
|
38
|
+
onChange: (e) => v(r, e)
|
|
39
|
+
}), /* @__PURE__ */ a("label", {
|
|
40
|
+
htmlFor: `${d}-all`,
|
|
41
|
+
className: "flex-1 cursor-pointer text-sm text-slate-700 dark:text-metal-200 whitespace-nowrap max-md:text-base",
|
|
42
|
+
children: i
|
|
39
43
|
})]
|
|
40
|
-
}), r.map((
|
|
41
|
-
const
|
|
44
|
+
}), r.map((e) => {
|
|
45
|
+
const O = b.some((l) => l.id === e.id && !l.isRemoved), o = `${d}-${e.id}`;
|
|
42
46
|
return /* @__PURE__ */ t("div", {
|
|
43
|
-
className: "flex gap-4",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
className: "flex items-center gap-4 max-md:min-h-12",
|
|
48
|
+
children: [/* @__PURE__ */ a(p, {
|
|
49
|
+
id: o,
|
|
50
|
+
checked: O,
|
|
51
|
+
"aria-label": e.label,
|
|
52
|
+
"data-label": e.id,
|
|
53
|
+
onChange: (l) => y(e, l)
|
|
54
|
+
}), /* @__PURE__ */ a("label", {
|
|
55
|
+
htmlFor: o,
|
|
56
|
+
className: "flex-1 cursor-pointer text-sm text-slate-700 dark:text-metal-200 whitespace-nowrap max-md:text-base",
|
|
57
|
+
children: e.label
|
|
52
58
|
})]
|
|
53
|
-
},
|
|
59
|
+
}, e.id);
|
|
54
60
|
})]
|
|
55
61
|
})
|
|
56
62
|
}), /* @__PURE__ */ t("div", {
|
|
57
|
-
className:
|
|
58
|
-
children: [/* @__PURE__ */
|
|
63
|
+
className: n("flex", "justify-center", "items-center", "gap-4", "px-6", "py-4", "border-t", "border-gray-200", "dark:border-metal-700", "max-md:gap-2 max-md:border-t-0 max-md:px-4 max-md:pt-4 max-md:pb-0"),
|
|
64
|
+
children: [/* @__PURE__ */ a(x, {
|
|
59
65
|
variant: "secondary",
|
|
60
66
|
appearance: "compact",
|
|
61
|
-
|
|
67
|
+
className: "max-md:h-11! max-md:flex-1",
|
|
68
|
+
onClick: C,
|
|
62
69
|
children: "Reset"
|
|
63
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ a(x, {
|
|
64
71
|
appearance: "compact",
|
|
65
|
-
|
|
72
|
+
className: "max-md:h-11! max-md:flex-1",
|
|
73
|
+
onClick: k,
|
|
66
74
|
children: "Apply"
|
|
67
75
|
})]
|
|
68
76
|
})]
|
|
69
77
|
});
|
|
70
78
|
};
|
|
71
79
|
export {
|
|
72
|
-
|
|
80
|
+
H as TextMultiSelect
|
|
73
81
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { useFilterDropdownSync as r } from "./useFilterDropdownSync.js";
|
|
2
|
-
import { useLocale as
|
|
2
|
+
import { useLocale as t } from "./useLocale.js";
|
|
3
|
+
import { FILTER_SHEET_QUERY as i, useFilterSheet as p } from "./useFilterSheet.js";
|
|
3
4
|
export {
|
|
5
|
+
i as FILTER_SHEET_QUERY,
|
|
4
6
|
r as useFilterDropdownSync,
|
|
5
|
-
|
|
7
|
+
p as useFilterSheet,
|
|
8
|
+
t as useLocale
|
|
6
9
|
};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { o as f } from "../../../../rolldown-runtime-B28h4lGi.js";
|
|
2
|
-
import { a as u, o as
|
|
2
|
+
import { a as u, o as m, r as p, t as b } from "../../../../dist-DsOk4psA.js";
|
|
3
3
|
import { t as h } from "../../../../debounce-DhCY9mXz.js";
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { jsx as
|
|
6
|
-
var v = /* @__PURE__ */ f(h(), 1), R = ({ text: r, prefix:
|
|
7
|
-
const n =
|
|
4
|
+
import { useCallback as g, useEffect as i, useRef as T, useState as w } from "react";
|
|
5
|
+
import { jsx as l, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
var v = /* @__PURE__ */ f(h(), 1), R = ({ text: r, prefix: a }) => {
|
|
7
|
+
const n = T(null), [c, d] = w(!1), t = g(() => {
|
|
8
8
|
const e = n.current;
|
|
9
9
|
e && d(e.scrollWidth > e.clientWidth);
|
|
10
10
|
}, []);
|
|
11
11
|
return i(() => {
|
|
12
|
-
const e = new AbortController(),
|
|
13
|
-
return window.addEventListener("resize",
|
|
14
|
-
e.abort(),
|
|
12
|
+
const e = new AbortController(), s = (0, v.default)(t, 300);
|
|
13
|
+
return window.addEventListener("resize", s, { signal: e.signal }), () => {
|
|
14
|
+
e.abort(), s.cancel();
|
|
15
15
|
};
|
|
16
16
|
}, [t]), i(() => {
|
|
17
17
|
t();
|
|
18
|
-
}, [r, t]), c ? /* @__PURE__ */
|
|
18
|
+
}, [r, t]), c ? /* @__PURE__ */ l(u, {
|
|
19
19
|
delayDuration: 0,
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ o(b, { children: [/* @__PURE__ */ l(m, {
|
|
21
21
|
asChild: !0,
|
|
22
|
-
children: /* @__PURE__ */
|
|
22
|
+
children: /* @__PURE__ */ o("span", {
|
|
23
23
|
ref: n,
|
|
24
24
|
className: "w-full truncate cursor-pointer",
|
|
25
25
|
children: [
|
|
26
26
|
r,
|
|
27
27
|
" ",
|
|
28
|
-
|
|
28
|
+
a
|
|
29
29
|
]
|
|
30
30
|
})
|
|
31
|
-
}), /* @__PURE__ */
|
|
31
|
+
}), /* @__PURE__ */ o(p, {
|
|
32
32
|
side: "top",
|
|
33
33
|
align: "center",
|
|
34
|
-
className: "animate-
|
|
34
|
+
className: "animate-tooltip-pop origin-(--radix-tooltip-content-transform-origin) motion-reduce:animate-none relative mb-1.5 overflow-visible bg-kubefirst-dark-blue-900 text-white px-3 py-2 rounded-lg shadow-sm after:content-[''] after:absolute after:left-1/2 after:-translate-x-1/2 after:bottom-0 after:translate-y-full after:border-l-8 after:border-l-transparent after:border-r-8 after:border-r-transparent after:border-t-8 after:border-kubefirst-dark-blue-900 z-999",
|
|
35
35
|
children: [
|
|
36
36
|
r,
|
|
37
37
|
" ",
|
|
38
|
-
|
|
38
|
+
a
|
|
39
39
|
]
|
|
40
40
|
})] })
|
|
41
|
-
}) : /* @__PURE__ */
|
|
41
|
+
}) : /* @__PURE__ */ o("span", {
|
|
42
42
|
ref: n,
|
|
43
43
|
className: "w-full truncate",
|
|
44
|
-
children: [r, /* @__PURE__ */
|
|
44
|
+
children: [r, /* @__PURE__ */ l("span", {
|
|
45
45
|
className: "text-slate-500",
|
|
46
|
-
children:
|
|
46
|
+
children: a
|
|
47
47
|
})]
|
|
48
48
|
});
|
|
49
49
|
};
|