@konstructio/ui 0.1.3 → 0.1.4
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/{Breadcrumb-DzavonoC.js → Breadcrumb-BiiOnn0p.js} +1 -1
- package/dist/{CollapsedSteps-CkMuzOHx.js → CollapsedSteps-Dy2I7XDd.js} +35 -35
- package/dist/{Input-C1Js3pbF.js → Input-CE6J6HIW.js} +6 -6
- package/dist/components/Alert/Alert.js +19 -18
- package/dist/components/Alert/Alert.variants.js +11 -4
- package/dist/components/Autocomplete/Autocomplete.variants.js +6 -5
- package/dist/components/Badge/Badge.js +20 -20
- package/dist/components/Badge/Badge.variants.js +5 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.variants.js +1 -1
- package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +2 -2
- package/dist/components/Breadcrumb/components/index.js +1 -1
- package/dist/components/Button/Button.variants.js +2 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +67 -63
- package/dist/components/ButtonGroup/ButtonGroup.variants.js +18 -5
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +51 -32
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +56 -8
- package/dist/components/Checkbox/Checkbox.variants.js +8 -4
- package/dist/components/Command/components/DialogContent.js +5 -5
- package/dist/components/ConfirmDialog/ConfirmDialog.js +1 -1
- package/dist/components/CopyButton/CopyButton.variants.js +4 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- 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 +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +15 -14
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +22 -22
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +6 -2
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +5 -5
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +1 -1
- package/dist/components/Range/Range.variants.js +9 -4
- package/dist/components/Select/Select.js +21 -20
- package/dist/components/Select/components/ListItem/ListItem.js +47 -37
- package/dist/components/Select/contexts/select.context.js +1 -0
- package/dist/components/Select/contexts/select.provider.js +28 -27
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.js +3 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.variants.js +6 -3
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +1 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +4 -2
- package/dist/components/Slider/Slider.variants.js +9 -4
- package/dist/components/Switch/Switch.variants.js +8 -4
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Toast/Toast.variants.js +7 -3
- package/dist/components/VirtualizedTable/assets/chevron-down.js +6 -6
- package/dist/components/VirtualizedTable/assets/chevron-up.js +4 -4
- package/dist/components/VirtualizedTable/components/Body/Body.js +59 -56
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +42 -40
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +85 -68
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +51 -49
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +34 -33
- package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +11 -11
- package/dist/components/VirtualizedTable/constants/index.js +10 -5
- package/dist/components/VirtualizedTable/constants/responsive.js +70 -1
- package/dist/components/VirtualizedTable/hooks/index.js +6 -2
- package/dist/components/VirtualizedTable/hooks/useDisplayedColumnCount/index.js +4 -0
- package/dist/components/VirtualizedTable/hooks/useDisplayedColumnCount/useDisplayedColumnCount.js +20 -0
- package/dist/components/VirtualizedTable/hooks/useIsFlexWrapped/index.js +4 -0
- package/dist/components/VirtualizedTable/hooks/useIsFlexWrapped/useIsFlexWrapped.js +18 -0
- package/dist/components/VirtualizedTable/utils/index.js +10 -8
- package/dist/components/VirtualizedTable/utils/responsive-edges/responsive-edges.js +8 -0
- package/dist/components/index.js +77 -73
- package/dist/{constants-q2QnJrOb.js → constants-YCGllWdf.js} +1 -1
- package/dist/index.js +77 -73
- package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +2 -0
- package/dist/lib/components/ButtonGroup/ButtonGroup.variants.d.ts +1 -0
- package/dist/lib/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +2 -1
- package/dist/lib/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +9 -0
- package/dist/lib/components/Select/Select.types.d.ts +2 -0
- package/dist/lib/components/Select/contexts/select.context.d.ts +1 -0
- package/dist/lib/components/Select/contexts/select.provider.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +5 -0
- package/dist/lib/components/VirtualizedTable/assets/chevron-down.d.ts +1 -2
- package/dist/lib/components/VirtualizedTable/assets/chevron-up.d.ts +1 -2
- package/dist/lib/components/VirtualizedTable/constants/responsive.d.ts +10 -0
- package/dist/lib/components/VirtualizedTable/hooks/index.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/hooks/useDisplayedColumnCount/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/hooks/useDisplayedColumnCount/useDisplayedColumnCount.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/hooks/useIsFlexWrapped/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/hooks/useIsFlexWrapped/useIsFlexWrapped.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/responsive-edges/responsive-edges.d.ts +6 -0
- package/dist/package.json +8 -8
- package/dist/styles.css +1 -1
- package/package.json +8 -8
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as k } from "../../../../chevron-down-BODx0Q7h.js";
|
|
2
2
|
import { Badge as N } from "../../../Badge/Badge.js";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as m } from "../../../Button/Button.js";
|
|
4
4
|
import { filterButtonIconVariants as C, filterButtonVariants as w } from "../../Filter.variants.js";
|
|
5
5
|
import { TimePicker as B } from "../../../TimePicker/TimePicker.js";
|
|
6
6
|
import { t as a } from "../../../../utils-DnIJruo0.js";
|
|
7
7
|
import { FilterDropdown as D } from "../FilterDropdown/FilterDropdown.js";
|
|
8
8
|
import { useTimeFilterDropdown as F } from "./hooks/useTimeFilterDropdown/useTimeFilterDropdown.js";
|
|
9
9
|
import { Fragment as j, jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
10
|
-
var q = ({ label: p, position: g = "left", format:
|
|
11
|
-
const { appliedLabel:
|
|
10
|
+
var q = ({ label: p, position: g = "left", format: t = "24", presets: n, showTimePicker: i = !0, onApply: x }) => {
|
|
11
|
+
const { appliedLabel: s, isOpen: o, selectedTime: b, selectedPresetLabel: c, handleApply: h, handleOpenChange: u, handleSelectPreset: f, handleSelectCustom: y, handleReset: v } = F({
|
|
12
12
|
onApply: x,
|
|
13
|
-
format:
|
|
14
|
-
}),
|
|
13
|
+
format: t
|
|
14
|
+
}), d = n && n.length > 0;
|
|
15
15
|
return /* @__PURE__ */ l(D, {
|
|
16
16
|
isOpen: o,
|
|
17
17
|
position: g,
|
|
@@ -19,7 +19,7 @@ var q = ({ label: p, position: g = "left", format: r = "24", presets: n, showTim
|
|
|
19
19
|
triggerClassName: a(w(), { "text-slate-700 dark:text-metal-100": o }),
|
|
20
20
|
trigger: /* @__PURE__ */ l(j, { children: [
|
|
21
21
|
p,
|
|
22
|
-
|
|
22
|
+
s && /* @__PURE__ */ e(N, { label: s }),
|
|
23
23
|
/* @__PURE__ */ e(k, { className: a(C(), { "rotate-180 text-blue-600 dark:text-aurora-500": o }) })
|
|
24
24
|
] }),
|
|
25
25
|
onOpenChange: u,
|
|
@@ -27,29 +27,29 @@ var q = ({ label: p, position: g = "left", format: r = "24", presets: n, showTim
|
|
|
27
27
|
/* @__PURE__ */ l("div", {
|
|
28
28
|
className: "flex",
|
|
29
29
|
children: [
|
|
30
|
-
|
|
30
|
+
d && /* @__PURE__ */ e("div", {
|
|
31
31
|
className: "flex flex-col gap-1 py-4 px-4 min-w-40",
|
|
32
|
-
children: n.map((
|
|
32
|
+
children: n.map((r) => /* @__PURE__ */ e("button", {
|
|
33
33
|
type: "button",
|
|
34
|
-
className: a("text-left", "px-3", "py-1.5", "rounded", "cursor-pointer", "text-sm", "whitespace-nowrap", "transition-colors", "hover:bg-gray-100", "dark:hover:bg-metal-700", {
|
|
35
|
-
"bg-blue-50 text-blue-600 dark:bg-metal-700 dark:text-aurora-500":
|
|
36
|
-
"text-gray-700 dark:text-gray-300":
|
|
34
|
+
className: a("text-left", "px-3", "py-1.5", "rounded", "outline-none", "focus-visible:ring-1", "focus-visible:ring-aurora-500", "cursor-pointer", "text-sm", "whitespace-nowrap", "transition-colors", "hover:bg-gray-100", "dark:hover:bg-metal-700", {
|
|
35
|
+
"bg-blue-50 text-blue-600 dark:bg-metal-700 dark:text-aurora-500": c === r.label,
|
|
36
|
+
"text-gray-700 dark:text-gray-300": c !== r.label
|
|
37
37
|
}),
|
|
38
|
-
onClick: () => f(
|
|
39
|
-
children:
|
|
40
|
-
},
|
|
38
|
+
onClick: () => f(r),
|
|
39
|
+
children: r.label
|
|
40
|
+
}, r.label))
|
|
41
41
|
}),
|
|
42
|
-
|
|
42
|
+
d && i && /* @__PURE__ */ e("div", { className: "w-px bg-gray-200 dark:bg-metal-700" }),
|
|
43
43
|
i && /* @__PURE__ */ e("div", {
|
|
44
44
|
className: "py-4 px-6",
|
|
45
45
|
children: /* @__PURE__ */ e("div", {
|
|
46
46
|
className: a({
|
|
47
|
-
"w-35.5":
|
|
48
|
-
"w-52":
|
|
47
|
+
"w-35.5": t === "24",
|
|
48
|
+
"w-52": t === "12"
|
|
49
49
|
}),
|
|
50
50
|
children: /* @__PURE__ */ e(B, {
|
|
51
|
-
format:
|
|
52
|
-
time:
|
|
51
|
+
format: t,
|
|
52
|
+
time: b,
|
|
53
53
|
onChange: y,
|
|
54
54
|
mode: "input"
|
|
55
55
|
})
|
|
@@ -60,14 +60,14 @@ var q = ({ label: p, position: g = "left", format: r = "24", presets: n, showTim
|
|
|
60
60
|
/* @__PURE__ */ e("div", { className: "h-px bg-gray-200 dark:bg-metal-700" }),
|
|
61
61
|
/* @__PURE__ */ l("div", {
|
|
62
62
|
className: a("flex", "justify-end", "items-center", "gap-4", "px-6", "py-3"),
|
|
63
|
-
children: [/* @__PURE__ */ e(
|
|
63
|
+
children: [/* @__PURE__ */ e(m, {
|
|
64
64
|
variant: "secondary",
|
|
65
65
|
appearance: "compact",
|
|
66
66
|
onClick: v,
|
|
67
67
|
children: "Reset"
|
|
68
|
-
}), /* @__PURE__ */ e(
|
|
68
|
+
}), /* @__PURE__ */ e(m, {
|
|
69
69
|
appearance: "compact",
|
|
70
|
-
onClick:
|
|
70
|
+
onClick: h,
|
|
71
71
|
children: "Apply"
|
|
72
72
|
})]
|
|
73
73
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../../../dist-B9GE4SXf.js";
|
|
2
|
-
var
|
|
2
|
+
var t = e([
|
|
3
3
|
"bg-white",
|
|
4
4
|
"border",
|
|
5
5
|
"border-transparent",
|
|
@@ -28,6 +28,10 @@ var r = e([
|
|
|
28
28
|
"right-1.5",
|
|
29
29
|
"top-1.5",
|
|
30
30
|
"cursor-pointer",
|
|
31
|
+
"rounded",
|
|
32
|
+
"outline-none",
|
|
33
|
+
"focus-visible:ring-1",
|
|
34
|
+
"focus-visible:ring-aurora-500",
|
|
31
35
|
"text-slate-500",
|
|
32
36
|
"dark:text-slate-300",
|
|
33
37
|
"hover:text-slate-700",
|
|
@@ -35,5 +39,5 @@ var r = e([
|
|
|
35
39
|
]);
|
|
36
40
|
export {
|
|
37
41
|
a as buttonCloseVariants,
|
|
38
|
-
|
|
42
|
+
t as modalVariants
|
|
39
43
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as n } from "../../../../chevron-up-B8hiVgxZ.js";
|
|
2
2
|
import { t as s } from "../../../../utils-DnIJruo0.js";
|
|
3
3
|
import { usePhoneNumberContext as l } from "../../contexts/phone-number.hook.js";
|
|
4
|
-
import { jsx as a, jsxs as
|
|
5
|
-
var
|
|
4
|
+
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
var m = () => {
|
|
6
6
|
const { selectedCountry: e, isOpenSelector: t, handleOpenSelector: o } = l(), { flag: r } = e;
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ i("button", {
|
|
8
8
|
type: "button",
|
|
9
9
|
"aria-label": `Select country, ${e.name}`,
|
|
10
10
|
"aria-expanded": t,
|
|
11
|
-
className: "flex items-center gap-2 cursor-pointer",
|
|
11
|
+
className: "relative flex items-center gap-2 cursor-pointer tap-target touch-hit-area rounded outline-none focus-visible:ring-1 focus-visible:ring-aurora-500",
|
|
12
12
|
onClick: () => o(!t),
|
|
13
13
|
children: [/* @__PURE__ */ a(r, {}), /* @__PURE__ */ a(n, {
|
|
14
14
|
className: s("transition-all", "duration-100", "data-[state=open]:rotate-0", "data-[state=closed]:rotate-180", "w-5", "h-5", "text-slate-400"),
|
|
@@ -17,5 +17,5 @@ var u = () => {
|
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
m as FlagContent
|
|
21
21
|
};
|
package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as i } from "../../../../Input-
|
|
1
|
+
import { t as i } from "../../../../Input-CE6J6HIW.js";
|
|
2
2
|
import { usePhoneNumberContext as c } from "../../contexts/phone-number.hook.js";
|
|
3
3
|
import { t as d } from "../../../../FlagSelectorList-PTBEUWVJ.js";
|
|
4
4
|
import { t as p } from "../../../../utils-DnIJruo0.js";
|
|
@@ -8,7 +8,7 @@ var e = r([
|
|
|
8
8
|
"border-gray-200",
|
|
9
9
|
"rounded-full",
|
|
10
10
|
"shadow-sm"
|
|
11
|
-
]),
|
|
11
|
+
]), i = r([
|
|
12
12
|
"absolute",
|
|
13
13
|
"h-full",
|
|
14
14
|
"bg-kubefirst-secondary"
|
|
@@ -24,13 +24,18 @@ var e = r([
|
|
|
24
24
|
lg: ["h-3"]
|
|
25
25
|
} },
|
|
26
26
|
defaultVariants: { size: "md" }
|
|
27
|
-
}),
|
|
27
|
+
}), s = r([
|
|
28
28
|
"block",
|
|
29
29
|
"w-5",
|
|
30
30
|
"h-5",
|
|
31
31
|
"rounded-full",
|
|
32
32
|
"cursor-pointer",
|
|
33
|
+
"relative",
|
|
34
|
+
"tap-target",
|
|
35
|
+
"touch-hit-area",
|
|
33
36
|
"focus-visible:outline-none",
|
|
37
|
+
"focus-visible:ring-2",
|
|
38
|
+
"focus-visible:ring-aurora-500",
|
|
34
39
|
"shadow-md",
|
|
35
40
|
"bg-white",
|
|
36
41
|
"border",
|
|
@@ -44,8 +49,8 @@ var e = r([
|
|
|
44
49
|
defaultVariants: { size: "md" }
|
|
45
50
|
});
|
|
46
51
|
export {
|
|
47
|
-
|
|
52
|
+
i as rangeOutsideVariants,
|
|
48
53
|
e as rangeVariants,
|
|
49
|
-
|
|
54
|
+
s as thumbVariants,
|
|
50
55
|
t as trackVariants
|
|
51
56
|
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { t as
|
|
3
|
-
import { SelectProvider as
|
|
4
|
-
import { n as
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { jsx as s, jsxs as
|
|
7
|
-
var
|
|
8
|
-
const c =
|
|
9
|
-
return /* @__PURE__ */ s(
|
|
1
|
+
import { n as M, t as d } from "../../utils-DnIJruo0.js";
|
|
2
|
+
import { t as S } from "../../Wrapper-CyjvfERI.js";
|
|
3
|
+
import { SelectProvider as b } from "./contexts/select.provider.js";
|
|
4
|
+
import { n as E } from "../../AdditionalOptions-ClcR_Kf7.js";
|
|
5
|
+
import { forwardRef as G, useId as H, useMemo as P } from "react";
|
|
6
|
+
import { jsx as s, jsxs as R } from "react/jsx-runtime";
|
|
7
|
+
var C = G(({ error: e, errorClassName: m, helperText: l, helperTextClassName: x, highlightSearch: h, showSelectedCheck: u, id: I, mainWrapperClassName: g, name: r, value: v, options: t, onChange: $, onBlur: n, onValueChange: N, ...O }, j) => {
|
|
8
|
+
const c = H(), o = I ?? (r ? `${c}-${r}` : c), i = `${o}-error`, p = `${o}-helper-text`, a = typeof e == "string" && e.length > 0, f = !a && !!l, k = M(a && i, f && p), w = P(() => t.length ? E(t.at(0)) ? t.flatMap((y) => y.options) : t : [], [t]);
|
|
9
|
+
return /* @__PURE__ */ s(b, {
|
|
10
10
|
highlightSearch: h,
|
|
11
11
|
name: r,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
showSelectedCheck: u,
|
|
13
|
+
value: v,
|
|
14
|
+
options: w,
|
|
14
15
|
onBlur: n,
|
|
15
|
-
onChange:
|
|
16
|
-
onValueChange:
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
-
className: d("relative w-full",
|
|
16
|
+
onChange: $,
|
|
17
|
+
onValueChange: N,
|
|
18
|
+
children: /* @__PURE__ */ R("div", {
|
|
19
|
+
className: d("relative w-full", g),
|
|
19
20
|
children: [
|
|
20
|
-
/* @__PURE__ */ s(
|
|
21
|
-
describedBy:
|
|
21
|
+
/* @__PURE__ */ s(S, {
|
|
22
|
+
describedBy: k,
|
|
22
23
|
error: e,
|
|
23
24
|
fieldId: o,
|
|
24
25
|
name: r,
|
|
25
|
-
ref:
|
|
26
|
+
ref: j,
|
|
26
27
|
onBlur: n,
|
|
27
28
|
groupedOptions: t,
|
|
28
|
-
...
|
|
29
|
+
...O
|
|
29
30
|
}),
|
|
30
31
|
a ? /* @__PURE__ */ s("span", {
|
|
31
32
|
id: i,
|
|
@@ -42,5 +43,5 @@ var B = E(({ error: e, errorClassName: m, helperText: l, helperTextClassName: x,
|
|
|
42
43
|
});
|
|
43
44
|
});
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
C as Select
|
|
46
47
|
};
|
|
@@ -1,64 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { CheckIcon as L } from "../../../../assets/icons/components/Check.js";
|
|
2
|
+
import { t as c } from "../../../../utils-DnIJruo0.js";
|
|
3
|
+
import { Typography as p } from "../../../Typography/Typography.js";
|
|
4
|
+
import { useSelectContext as S } from "../../contexts/select.hook.js";
|
|
5
|
+
import { listItemVariants as V } from "./ListItem.variants.js";
|
|
6
|
+
import { useRef as j } from "react";
|
|
7
|
+
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
8
|
+
function z(l, n) {
|
|
9
|
+
const i = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), o = new RegExp(`(${i})`, "gi");
|
|
10
|
+
return l.split(o).map((r, t) => r.toLowerCase() === n.toLowerCase() ? /* @__PURE__ */ a("mark", {
|
|
10
11
|
className: "bg-transparent font-semibold text-metal-800 dark:text-metal-50",
|
|
11
|
-
children:
|
|
12
|
-
}, t) : /* @__PURE__ */
|
|
12
|
+
children: r
|
|
13
|
+
}, t) : /* @__PURE__ */ a("span", { children: r }, t));
|
|
13
14
|
}
|
|
14
|
-
var
|
|
15
|
-
const { searchTerm: f, highlightSearchEnabled:
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
e.key === "Enter" && (e.stopPropagation(),
|
|
19
|
-
},
|
|
20
|
-
if (
|
|
15
|
+
var O = ({ isEmpty: l, isClickable: n, className: i, inputRef: o, listItemSecondRowClassName: r, ...t }) => {
|
|
16
|
+
const { searchTerm: f, highlightSearchEnabled: k, showSelectedCheck: y, value: d, setValue: N, toggleOpen: w } = S(), b = j(null), u = !l && d !== void 0 && d === t.value, h = (e) => {
|
|
17
|
+
N(e.value, o), w(!1);
|
|
18
|
+
}, C = (e, s) => {
|
|
19
|
+
e.key === "Enter" && (e.stopPropagation(), h(s));
|
|
20
|
+
}, I = ({ label: e, rightComponent: s, subLabel: x, rightComponentClassName: v }) => {
|
|
21
|
+
if (l) return /* @__PURE__ */ a(p, {
|
|
21
22
|
variant: "body2",
|
|
22
23
|
className: "text-zinc-800 dark:text-metal-50 italic",
|
|
23
24
|
children: e
|
|
24
25
|
});
|
|
25
26
|
if (typeof e != "string") return e;
|
|
26
|
-
const
|
|
27
|
-
return /* @__PURE__ */ m(
|
|
27
|
+
const g = k && f.length > 0 ? z(e, f) : [e];
|
|
28
|
+
return /* @__PURE__ */ m(p, {
|
|
28
29
|
variant: "body2",
|
|
29
30
|
className: "text-zinc-700 dark:text-metal-50 font-medium",
|
|
30
31
|
children: [s ? /* @__PURE__ */ m("span", {
|
|
31
|
-
className:
|
|
32
|
+
className: c("flex gap-2 items-center", v),
|
|
32
33
|
children: [
|
|
33
|
-
|
|
34
|
+
g,
|
|
34
35
|
" ",
|
|
35
36
|
s
|
|
36
37
|
]
|
|
37
|
-
}) :
|
|
38
|
-
className:
|
|
39
|
-
children:
|
|
38
|
+
}) : g, x ? /* @__PURE__ */ a("span", {
|
|
39
|
+
className: c("block font-normal text-sm text-metal-800 dark:text-metal-50", r),
|
|
40
|
+
children: x
|
|
40
41
|
}) : null]
|
|
41
42
|
});
|
|
42
43
|
};
|
|
43
44
|
return /* @__PURE__ */ m("li", {
|
|
44
|
-
ref:
|
|
45
|
+
ref: b,
|
|
45
46
|
role: "option",
|
|
47
|
+
"aria-selected": u,
|
|
46
48
|
"data-action": "false",
|
|
47
|
-
className:
|
|
49
|
+
className: c(V({ className: i })),
|
|
48
50
|
tabIndex: 0,
|
|
49
51
|
onClick: (e) => {
|
|
50
|
-
|
|
52
|
+
n && (h(t), e.stopPropagation());
|
|
51
53
|
},
|
|
52
|
-
onKeyDown: (e) =>
|
|
53
|
-
children: [
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
onKeyDown: (e) => C(e, t),
|
|
55
|
+
children: [
|
|
56
|
+
t.leftIcon ? /* @__PURE__ */ a("span", {
|
|
57
|
+
className: c("w-4 h-4 flex justify-center", {
|
|
58
|
+
"items-center": !t.subLabel,
|
|
59
|
+
"items-baseline -tranmetal-y-2": !!t.subLabel
|
|
60
|
+
}, t.leftIconClassName),
|
|
61
|
+
children: t.leftIcon
|
|
62
|
+
}) : null,
|
|
63
|
+
I(t),
|
|
64
|
+
y && u ? /* @__PURE__ */ a(L, {
|
|
65
|
+
size: 16,
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
className: "ml-auto shrink-0 text-aurora-500"
|
|
68
|
+
}) : null
|
|
69
|
+
]
|
|
60
70
|
});
|
|
61
71
|
};
|
|
62
72
|
export {
|
|
63
|
-
|
|
73
|
+
O as ListItem
|
|
64
74
|
};
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import { useToggle as
|
|
2
|
-
import { SelectContext as
|
|
1
|
+
import { useToggle as O } from "../../../hooks/useToggle.js";
|
|
2
|
+
import { SelectContext as R } from "./select.context.js";
|
|
3
3
|
import { useCallback as T, useEffect as p, useRef as v, useState as e } from "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
var c = 1,
|
|
6
|
-
const [
|
|
7
|
-
|
|
4
|
+
import { jsx as Y } from "react/jsx-runtime";
|
|
5
|
+
var c = 1, j = 300, z = ({ children: E, value: S, name: i, highlightSearch: d = !1, showSelectedCheck: C = !1, options: n, onChange: a, onBlur: u, onValueChange: l }) => {
|
|
6
|
+
const [F, g] = e(n), P = v(d), [I, f] = O(!1), [b, x] = e(""), [A, _] = e(!0), [y, s] = e(!0), [D, o] = e(c), [G, h] = e(!1), t = v(void 0), L = T((r, m) => {
|
|
7
|
+
m?.current && (m.current.value = r), t.current && clearTimeout(t.current), h(!0), s(!0), o(c), a?.({ target: {
|
|
8
8
|
value: r,
|
|
9
9
|
name: i ?? ""
|
|
10
10
|
} }), l?.(r), u?.(), t.current = setTimeout(() => {
|
|
11
|
-
|
|
12
|
-
},
|
|
11
|
+
h(!1);
|
|
12
|
+
}, j);
|
|
13
13
|
}, [
|
|
14
14
|
a,
|
|
15
15
|
l,
|
|
16
16
|
i,
|
|
17
17
|
u
|
|
18
|
-
]),
|
|
19
|
-
|
|
20
|
-
}, [
|
|
18
|
+
]), N = T((r) => {
|
|
19
|
+
f(r), s(!0), o(c);
|
|
20
|
+
}, [f]);
|
|
21
21
|
return p(() => {
|
|
22
22
|
g(n);
|
|
23
23
|
}, [n.length]), p(() => () => {
|
|
24
24
|
t.current && clearTimeout(t.current);
|
|
25
|
-
}, []), /* @__PURE__ */ R
|
|
25
|
+
}, []), /* @__PURE__ */ Y(R.Provider, {
|
|
26
26
|
value: {
|
|
27
|
-
highlightSearchEnabled:
|
|
28
|
-
isOpen:
|
|
29
|
-
searchTerm:
|
|
27
|
+
highlightSearchEnabled: P.current,
|
|
28
|
+
isOpen: I,
|
|
29
|
+
searchTerm: b,
|
|
30
30
|
value: S,
|
|
31
|
-
canFilter:
|
|
32
|
-
canContinueFetching:
|
|
33
|
-
page:
|
|
34
|
-
options:
|
|
35
|
-
isTyping:
|
|
31
|
+
canFilter: A,
|
|
32
|
+
canContinueFetching: y,
|
|
33
|
+
page: D,
|
|
34
|
+
options: F,
|
|
35
|
+
isTyping: G,
|
|
36
|
+
showSelectedCheck: C,
|
|
36
37
|
setOptions: g,
|
|
37
|
-
setPage:
|
|
38
|
-
setCanContinueFetching:
|
|
39
|
-
setCanFilter:
|
|
40
|
-
setSearchTerm:
|
|
41
|
-
setValue:
|
|
42
|
-
toggleOpen:
|
|
38
|
+
setPage: o,
|
|
39
|
+
setCanContinueFetching: s,
|
|
40
|
+
setCanFilter: _,
|
|
41
|
+
setSearchTerm: x,
|
|
42
|
+
setValue: L,
|
|
43
|
+
toggleOpen: N
|
|
43
44
|
},
|
|
44
45
|
children: E
|
|
45
46
|
});
|
|
46
47
|
};
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
z as SelectProvider
|
|
49
50
|
};
|
|
@@ -10,12 +10,14 @@ var t = e([
|
|
|
10
10
|
"border-metal-700",
|
|
11
11
|
"text-metal-50",
|
|
12
12
|
"cursor-pointer",
|
|
13
|
+
"relative",
|
|
13
14
|
"tap-target",
|
|
15
|
+
"touch-hit-area",
|
|
14
16
|
"hover:bg-metal-800",
|
|
15
17
|
"active:bg-metal-800",
|
|
16
18
|
"focus:outline-none",
|
|
17
19
|
"focus-visible:ring-2",
|
|
18
|
-
"focus-visible:ring-
|
|
20
|
+
"focus-visible:ring-aurora-500"
|
|
19
21
|
]);
|
|
20
22
|
export {
|
|
21
23
|
t as collapseTriggerVariants
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../../../dist-B9GE4SXf.js";
|
|
2
|
-
var
|
|
2
|
+
var t = e([
|
|
3
3
|
"fixed",
|
|
4
4
|
"top-4",
|
|
5
5
|
"left-4",
|
|
@@ -13,10 +13,13 @@ var r = e([
|
|
|
13
13
|
"bg-kubefirst-dark-blue-900",
|
|
14
14
|
"text-white",
|
|
15
15
|
"cursor-pointer",
|
|
16
|
+
"tap-target",
|
|
17
|
+
"touch-hit-area",
|
|
18
|
+
"active:bg-kubefirst-dark-blue-800",
|
|
16
19
|
"focus:outline-none",
|
|
17
20
|
"focus-visible:ring-2",
|
|
18
|
-
"focus-visible:ring-
|
|
21
|
+
"focus-visible:ring-aurora-500"
|
|
19
22
|
]);
|
|
20
23
|
export {
|
|
21
|
-
|
|
24
|
+
t as hamburgerTriggerVariants
|
|
22
25
|
};
|
|
@@ -8,10 +8,12 @@ var i = t([
|
|
|
8
8
|
"text-white",
|
|
9
9
|
"selection:bg-powder-500",
|
|
10
10
|
"selection:text-white"
|
|
11
|
-
]),
|
|
11
|
+
]), r = t([
|
|
12
12
|
"flex",
|
|
13
13
|
"w-full",
|
|
14
14
|
"cursor-pointer",
|
|
15
|
+
"tap-target",
|
|
16
|
+
"active:bg-kubefirst-dark-blue-800",
|
|
15
17
|
"items-center",
|
|
16
18
|
"justify-between",
|
|
17
19
|
"gap-2",
|
|
@@ -24,6 +26,6 @@ var i = t([
|
|
|
24
26
|
"focus-visible:ring-aurora-500"
|
|
25
27
|
]);
|
|
26
28
|
export {
|
|
27
|
-
|
|
29
|
+
r as navigationTitleButtonVariants,
|
|
28
30
|
i as navigationTitleVariants
|
|
29
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as r } from "../../dist-B9GE4SXf.js";
|
|
2
|
-
var
|
|
2
|
+
var e = r([
|
|
3
3
|
"relative",
|
|
4
4
|
"flex",
|
|
5
5
|
"items-center",
|
|
@@ -16,13 +16,18 @@ var a = r([
|
|
|
16
16
|
lg: ["h-3"]
|
|
17
17
|
} },
|
|
18
18
|
defaultVariants: { size: "md" }
|
|
19
|
-
}),
|
|
19
|
+
}), t = r([
|
|
20
20
|
"block",
|
|
21
21
|
"w-5",
|
|
22
22
|
"h-5",
|
|
23
23
|
"rounded-full",
|
|
24
24
|
"cursor-pointer",
|
|
25
|
+
"relative",
|
|
26
|
+
"tap-target",
|
|
27
|
+
"touch-hit-area",
|
|
25
28
|
"focus-visible:outline-none",
|
|
29
|
+
"focus-visible:ring-2",
|
|
30
|
+
"focus-visible:ring-aurora-500",
|
|
26
31
|
"shadow-md",
|
|
27
32
|
"bg-white",
|
|
28
33
|
"border",
|
|
@@ -36,7 +41,7 @@ var a = r([
|
|
|
36
41
|
defaultVariants: { size: "md" }
|
|
37
42
|
});
|
|
38
43
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
e as sliderVariants,
|
|
45
|
+
t as thumbVariants,
|
|
41
46
|
i as trackVariants
|
|
42
47
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as a } from "../../dist-B9GE4SXf.js";
|
|
2
|
-
var
|
|
2
|
+
var t = a([
|
|
3
3
|
"relative",
|
|
4
4
|
"shrink-0",
|
|
5
5
|
"tap-target",
|
|
@@ -11,6 +11,10 @@ var e = a([
|
|
|
11
11
|
"rounded-full",
|
|
12
12
|
"shadow",
|
|
13
13
|
"focus:shadow-md",
|
|
14
|
+
"outline-none",
|
|
15
|
+
"focus-visible:outline-2",
|
|
16
|
+
"focus-visible:outline-offset-2",
|
|
17
|
+
"focus-visible:outline-aurora-500",
|
|
14
18
|
"data-[state=unchecked]:bg-gray-300",
|
|
15
19
|
"dark:data-[state=unchecked]:bg-metal-600",
|
|
16
20
|
"transition-all",
|
|
@@ -36,7 +40,7 @@ var e = a([
|
|
|
36
40
|
]
|
|
37
41
|
} },
|
|
38
42
|
defaultVariants: { variant: "default" }
|
|
39
|
-
}),
|
|
43
|
+
}), r = a([
|
|
40
44
|
"block",
|
|
41
45
|
"w-4",
|
|
42
46
|
"h-4",
|
|
@@ -52,6 +56,6 @@ var e = a([
|
|
|
52
56
|
"duration-300"
|
|
53
57
|
]);
|
|
54
58
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
t as switchVariants,
|
|
60
|
+
r as thumbVariants
|
|
57
61
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as r } from "../../dist-B9GE4SXf.js";
|
|
2
|
-
var
|
|
2
|
+
var t = r([
|
|
3
3
|
"overflow-hidden",
|
|
4
4
|
"rounded-lg",
|
|
5
5
|
"inset-ring",
|
|
@@ -77,7 +77,11 @@ var e = r([
|
|
|
77
77
|
"cursor-pointer",
|
|
78
78
|
"text-white",
|
|
79
79
|
"tap-target",
|
|
80
|
-
"touch-hit-area"
|
|
80
|
+
"touch-hit-area",
|
|
81
|
+
"rounded",
|
|
82
|
+
"outline-none",
|
|
83
|
+
"focus-visible:ring-1",
|
|
84
|
+
"focus-visible:ring-aurora-500"
|
|
81
85
|
], {
|
|
82
86
|
variants: { type: {
|
|
83
87
|
success: ["dark:text-green-300"],
|
|
@@ -90,7 +94,7 @@ var e = r([
|
|
|
90
94
|
export {
|
|
91
95
|
s as toastCloseButtonVariants,
|
|
92
96
|
i as toastDescriptionVariants,
|
|
93
|
-
|
|
97
|
+
t as toastFrameVariants,
|
|
94
98
|
o as toastIconVariants,
|
|
95
99
|
n as toastTitleVariants,
|
|
96
100
|
a as toastVariants
|