@konstructio/ui 0.1.2-alpha.119 → 0.1.2-alpha.120
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-DDRmDlWK.js +93 -0
- package/dist/{Checkbox-DRdyrKjk.js → Checkbox-DrounE52.js} +2 -2
- package/dist/{CollapsedSteps-CR7oCTRC.js → CollapsedSteps-DvBeYShi.js} +3 -3
- package/dist/{CommandInput-Du2o616y.js → CommandInput-_vujzQ6B.js} +2 -2
- package/dist/{Counter-DMkXIsOO.js → Counter-LQ5_uh06.js} +2 -2
- package/dist/{DayPicker-BtpJg2q3.js → DayPicker-D7KFB2bI.js} +383 -383
- package/dist/DropdownButton-BWfWN4fg.js +121 -0
- package/dist/{HamburgerTrigger-BgeS_nBA.js → HamburgerTrigger-CfrAnhmG.js} +10 -10
- package/dist/{Input-2M2I_H60.js → Input-O2bqyJKW.js} +2 -2
- package/dist/Modal-B-l4ii6w.js +84 -0
- package/dist/{Wrapper-JmStmade.js → Wrapper-B5PmrW4J.js} +3 -3
- package/dist/{Wrapper-ThpRi_Gg.js → Wrapper-CZCSSCLm.js} +2 -2
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +1 -1
- package/dist/components/Breadcrumb/components/index.js +1 -1
- package/dist/components/Button/Button.variants.js +1 -0
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxCard/CheckboxCard.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.js +7 -5
- package/dist/components/CopyButton/CopyButton.variants.js +3 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.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/Datepicker/components/DatePickerContent/DatePickerContent.js +1 -1
- package/dist/components/Drawer/Drawer.js +78 -58
- package/dist/components/Drawer/Drawer.variants.js +40 -22
- package/dist/components/Drawer/components/Footer/Footer.js +5 -5
- package/dist/components/Drawer/constants/index.js +5 -4
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/DropdownButton/components/ActionSheet/ActionSheet.js +34 -0
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
- package/dist/components/Filter/utils/index.js +2 -2
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.js +1 -0
- package/dist/components/LineChart/components/LineChartContent/LineChartContent.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +12 -6
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/PhoneNumberInputContent.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/components/PieChartContent/PieChartContent.js +1 -1
- package/dist/components/Select/Select.variants.js +2 -0
- package/dist/components/Select/components/List/List.js +2 -2
- package/dist/components/Sheet/Sheet.js +130 -0
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +103 -86
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +13 -13
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TextArea/TextArea.variants.js +1 -0
- package/dist/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.js +7 -7
- package/dist/components/VirtualizedTable/components/Body/Body.js +47 -44
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +68 -68
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +38 -31
- package/dist/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.js +75 -0
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +42 -35
- package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +72 -72
- package/dist/components/VirtualizedTable/components/index.js +14 -12
- package/dist/components/VirtualizedTable/constants/index.js +5 -3
- package/dist/components/VirtualizedTable/constants/responsive.js +10 -0
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.context.js +4 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/utils/index.js +8 -4
- package/dist/components/VirtualizedTable/utils/pinned-columns/index.js +6 -0
- package/dist/components/VirtualizedTable/utils/pinned-columns/pinned-columns.js +32 -0
- package/dist/components/index.js +147 -145
- package/dist/{components-B_SWqhCL.js → components-Bq71eyUH.js} +1 -1
- package/dist/{country-locale-map-DbrJ3bEE.js → country-locale-map-BQYYErun.js} +1407 -1407
- package/dist/{debounce-dMRJxNsT.js → debounce-DhCY9mXz.js} +2 -2
- package/dist/{dist-Dg3vyTx9.js → dist-BCqfbYE9.js} +1356 -1317
- package/dist/dist-CMqY_9n-.js +445 -0
- package/dist/{es2015-B_07N-UL.js → es2015-BvX7Yq5Q.js} +2 -2
- package/dist/index.js +158 -156
- package/dist/{isSymbol-BG9higgO.js → isSymbol-CcfkyZfq.js} +1 -1
- package/dist/lib/components/Drawer/Drawer.types.d.ts +10 -0
- package/dist/lib/components/Drawer/Drawer.variants.d.ts +1 -0
- package/dist/lib/components/Drawer/constants/index.d.ts +1 -0
- package/dist/lib/components/DropdownButton/DropdownButton.d.ts +2 -1
- package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +25 -0
- package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.d.ts +7 -0
- package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.types.d.ts +12 -0
- package/dist/lib/components/Modal/Modal.types.d.ts +2 -0
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -0
- package/dist/lib/components/Sheet/Sheet.d.ts +21 -0
- package/dist/lib/components/Sheet/Sheet.types.d.ts +39 -0
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +9 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +11 -2
- package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.d.ts +10 -0
- package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.types.d.ts +6 -0
- package/dist/lib/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/constants/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/constants/responsive.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +4 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +2 -1
- package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/pinned-columns/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/pinned-columns/pinned-columns.d.ts +23 -0
- package/dist/lib/components/index.d.ts +3 -1
- package/dist/{libphonenumber-DtibHRPP.js → libphonenumber-BIeQOhzl.js} +196 -164
- package/dist/package.json +18 -18
- package/dist/{phone-number.provider-DnuL-yYF.js → phone-number.provider-CJeivoDY.js} +2 -2
- package/dist/{prop-types-BCUW56rg.js → prop-types-qsAjMBb1.js} +1 -1
- package/dist/{rolldown-runtime-Dw9YIBcH.js → rolldown-runtime-B28h4lGi.js} +6 -6
- package/dist/styles.css +1 -1
- package/dist/{table.provider-CzfMGbe4.js → table.provider-QUo2buYX.js} +561 -523
- package/dist/{x-Vur_9PXW.js → x-BmNOD9Gr.js} +2 -2
- package/package.json +18 -18
- package/dist/Breadcrumb-CpXRb08J.js +0 -93
- package/dist/DropdownButton-JilCRLJY.js +0 -92
- package/dist/Modal-0Wp5szX4.js +0 -84
- package/dist/dist-BCoDIdCt.js +0 -429
|
@@ -1,127 +1,144 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Drawer as
|
|
4
|
-
import { SidebarContext as
|
|
5
|
-
import { useSidebarMode as
|
|
6
|
-
import { dragVariants as
|
|
7
|
-
import { useCallback as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
var
|
|
10
|
-
const e =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, [
|
|
14
|
-
|
|
15
|
-
}, [e]),
|
|
1
|
+
import { t as se } from "../../../../HamburgerTrigger-CfrAnhmG.js";
|
|
2
|
+
import { t as a } from "../../../../utils-DnIJruo0.js";
|
|
3
|
+
import { Drawer as ae } from "../../../Drawer/Drawer.js";
|
|
4
|
+
import { SidebarContext as P } from "../../contexts/SidebarContext.js";
|
|
5
|
+
import { useSidebarMode as de } from "../../hooks/useSidebarMode.js";
|
|
6
|
+
import { dragVariants as le, wrapperSiderbarVariants as _ } from "../../Sidebar.variants.js";
|
|
7
|
+
import { useCallback as m, useEffect as s, useRef as d, useState as E } from "react";
|
|
8
|
+
import { Fragment as ce, jsx as l, jsxs as O } from "react/jsx-runtime";
|
|
9
|
+
var ie = 280, ue = ({ animateOnHover: $ = !0, canResize: j = !0, children: R, dividerClassName: U, drawerBreakpoint: X, drawerClassNames: v, drawerMaxWidth: k = ie, expandedBreakpoint: K, expandOnHover: W = !0, expandAsOverlay: q = !1, initialMode: B, initialWidth: S = 256, maxWith: c = 300, minWith: i = 240, mode: G = "auto", separatorClassName: z, style: T, theme: H, triggerClassName: J, openNavigationLabel: Q, overlayClassName: Y, wrapperClassName: V, onModeChange: b }) => {
|
|
10
|
+
const e = de(G, K, X, B), [A, h] = E(!1), [F, Z] = E(null), [u, x] = E(null), w = e === "drawer" ? "drawer" : u ?? e, n = d(null), t = d(null), M = d(!1), N = d(!1), y = d(b), C = d(e);
|
|
11
|
+
s(() => {
|
|
12
|
+
y.current = b;
|
|
13
|
+
}, [b]), s(() => {
|
|
14
|
+
C.current !== e && (C.current = e, y.current?.(e, "viewport"));
|
|
15
|
+
}, [e]), s(() => {
|
|
16
16
|
if (e !== "drawer") return;
|
|
17
17
|
const r = () => {
|
|
18
|
-
|
|
18
|
+
Z(window.innerWidth);
|
|
19
19
|
};
|
|
20
20
|
return r(), window.addEventListener("resize", r), () => {
|
|
21
21
|
window.removeEventListener("resize", r);
|
|
22
22
|
};
|
|
23
23
|
}, [e]);
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
24
|
+
const D = m((r) => {
|
|
25
|
+
if (!M.current) {
|
|
26
26
|
n.current && (n.current.style.opacity = "0");
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
}, [
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
r.preventDefault(), r.stopPropagation(),
|
|
29
|
+
let o = r.clientX;
|
|
30
|
+
o < i && (o = i), o > c && (o = c), t.current && n.current && (t.current.style.width = `${o}px`, n.current.classList.add("opacity-100"));
|
|
31
|
+
}, [c, i]), I = m(() => {
|
|
32
|
+
M.current = !1, n.current && n.current.classList.remove("opacity-100"), t.current && t.current.classList.remove("transition-none"), document.body.style.userSelect = "", document.body.style.cursor = "", document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", I);
|
|
33
|
+
}, [D]), ee = (r) => {
|
|
34
|
+
r.preventDefault(), r.stopPropagation(), M.current = !0, t.current && t.current.classList.add("transition-none"), document.body.style.userSelect = "none", document.body.style.cursor = "col-resize", document.addEventListener("mousemove", D), document.addEventListener("mouseup", I);
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, [
|
|
39
|
-
e !== "drawer" &&
|
|
40
|
-
}, [e]),
|
|
41
|
-
if (
|
|
42
|
-
const r = Math.min(Math.max(
|
|
43
|
-
t.current.style.width = `${r}px`,
|
|
36
|
+
s(() => {
|
|
37
|
+
w !== "expanded" && t.current && (t.current.style.width = "");
|
|
38
|
+
}, [w]), s(() => {
|
|
39
|
+
e !== "drawer" && h(!1), x(null);
|
|
40
|
+
}, [e]), s(() => {
|
|
41
|
+
if (N.current || w !== "expanded" || !t.current) return;
|
|
42
|
+
const r = Math.min(Math.max(S, i), c);
|
|
43
|
+
t.current.style.width = `${r}px`, N.current = !0;
|
|
44
44
|
}, [
|
|
45
|
-
|
|
46
|
-
a,
|
|
45
|
+
S,
|
|
47
46
|
c,
|
|
48
|
-
|
|
47
|
+
i,
|
|
48
|
+
w
|
|
49
49
|
]);
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
}, []),
|
|
55
|
-
const r = (
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
const re = () => {
|
|
51
|
+
h(!0);
|
|
52
|
+
}, L = m(() => {
|
|
53
|
+
h(!1);
|
|
54
|
+
}, []), te = m(() => {
|
|
55
|
+
const r = (u ?? e) === "collapsed" ? "expanded" : "collapsed";
|
|
56
|
+
x(r), y.current?.(r, "user");
|
|
57
|
+
}, [u, e]), p = q && e === "collapsed" && u === "expanded", g = m(() => {
|
|
58
|
+
x(null), y.current?.("collapsed", "user");
|
|
59
|
+
}, []);
|
|
60
|
+
if (s(() => {
|
|
61
|
+
if (!p) return;
|
|
62
|
+
const r = (o) => {
|
|
63
|
+
o.key === "Escape" && g();
|
|
64
|
+
};
|
|
65
|
+
return document.addEventListener("keydown", r), () => {
|
|
66
|
+
document.removeEventListener("keydown", r);
|
|
67
|
+
};
|
|
68
|
+
}, [p, g]), e === "drawer") return /* @__PURE__ */ O(ce, { children: [/* @__PURE__ */ l(se, {
|
|
69
|
+
isOpen: A,
|
|
70
|
+
onClick: re,
|
|
71
|
+
className: J,
|
|
72
|
+
openNavigationLabel: Q
|
|
73
|
+
}), /* @__PURE__ */ l(ae, {
|
|
74
|
+
isOpen: A,
|
|
75
|
+
onClose: L,
|
|
66
76
|
position: "left",
|
|
67
|
-
defaultWidth:
|
|
68
|
-
|
|
77
|
+
defaultWidth: F !== null ? Math.min(F, k) : k,
|
|
78
|
+
fullScreenOnMobile: !1,
|
|
79
|
+
initialFocus: "panel",
|
|
80
|
+
theme: H,
|
|
69
81
|
classNames: {
|
|
70
|
-
...
|
|
71
|
-
root:
|
|
72
|
-
panel:
|
|
73
|
-
content:
|
|
82
|
+
...v,
|
|
83
|
+
root: a("z-60", v?.root),
|
|
84
|
+
panel: a(_({ mode: "expanded" }), "h-full border-r-0", V, v?.panel),
|
|
85
|
+
content: a("gap-0", v?.content)
|
|
74
86
|
},
|
|
75
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ l(P.Provider, {
|
|
76
88
|
value: {
|
|
77
89
|
mode: "expanded",
|
|
78
90
|
isCollapsed: !1,
|
|
79
91
|
expandOnHover: !1,
|
|
80
92
|
animateOnHover: !1,
|
|
81
|
-
separatorClassName:
|
|
82
|
-
closeDrawer:
|
|
93
|
+
separatorClassName: z,
|
|
94
|
+
closeDrawer: L,
|
|
83
95
|
canToggle: !1,
|
|
84
96
|
toggleMode: () => {
|
|
85
97
|
}
|
|
86
98
|
},
|
|
87
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ l("div", {
|
|
88
100
|
className: "konstruct-sidebar group/sidebar flex flex-col flex-1 min-h-0",
|
|
89
101
|
"data-mode": "expanded",
|
|
90
|
-
style:
|
|
91
|
-
children:
|
|
102
|
+
style: T,
|
|
103
|
+
children: R
|
|
92
104
|
})
|
|
93
105
|
})
|
|
94
106
|
})] });
|
|
95
|
-
const
|
|
96
|
-
mode:
|
|
97
|
-
isCollapsed:
|
|
98
|
-
expandOnHover:
|
|
99
|
-
animateOnHover:
|
|
100
|
-
separatorClassName:
|
|
101
|
-
closeDrawer:
|
|
107
|
+
const f = u ?? e, ne = j && f === "expanded", oe = {
|
|
108
|
+
mode: f,
|
|
109
|
+
isCollapsed: f === "collapsed",
|
|
110
|
+
expandOnHover: W,
|
|
111
|
+
animateOnHover: $,
|
|
112
|
+
separatorClassName: z,
|
|
113
|
+
closeDrawer: p ? g : L,
|
|
102
114
|
canToggle: !0,
|
|
103
|
-
toggleMode:
|
|
115
|
+
toggleMode: te
|
|
104
116
|
};
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
-
value:
|
|
107
|
-
children: /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ O(P.Provider, {
|
|
118
|
+
value: oe,
|
|
119
|
+
children: [p && /* @__PURE__ */ l("div", {
|
|
120
|
+
className: a("konstruct-sidebar-overlay fixed inset-0 z-50 bg-black/55", Y),
|
|
121
|
+
role: "presentation",
|
|
122
|
+
onClick: g
|
|
123
|
+
}), /* @__PURE__ */ O("aside", {
|
|
108
124
|
ref: t,
|
|
109
|
-
className:
|
|
110
|
-
mode:
|
|
111
|
-
className:
|
|
125
|
+
className: a("konstruct-sidebar", _({
|
|
126
|
+
mode: f,
|
|
127
|
+
className: V
|
|
112
128
|
})),
|
|
113
|
-
"data-theme":
|
|
114
|
-
"data-mode":
|
|
115
|
-
|
|
116
|
-
|
|
129
|
+
"data-theme": H,
|
|
130
|
+
"data-mode": f,
|
|
131
|
+
"data-overlay": p ? "" : void 0,
|
|
132
|
+
style: T,
|
|
133
|
+
children: [R, ne && /* @__PURE__ */ l("div", {
|
|
117
134
|
ref: n,
|
|
118
|
-
className:
|
|
119
|
-
onMouseDown:
|
|
135
|
+
className: a(le({ className: U })),
|
|
136
|
+
onMouseDown: ee
|
|
120
137
|
})]
|
|
121
|
-
})
|
|
138
|
+
})]
|
|
122
139
|
});
|
|
123
140
|
};
|
|
124
|
-
|
|
141
|
+
ue.displayName = "Sidebar.Wrapper";
|
|
125
142
|
export {
|
|
126
|
-
|
|
143
|
+
ue as Wrapper
|
|
127
144
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as r } from "../../../HamburgerTrigger-
|
|
1
|
+
import { t as r } from "../../../HamburgerTrigger-CfrAnhmG.js";
|
|
2
2
|
import { CollapseTrigger as m } from "./CollapseTrigger/CollapseTrigger.js";
|
|
3
3
|
import { Footer as p } from "./Footer/Footer.js";
|
|
4
4
|
import { Label as f } from "./Label/Label.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { t
|
|
2
|
-
import { Typography as
|
|
1
|
+
import { t } from "../../../utils-DnIJruo0.js";
|
|
2
|
+
import { Typography as s } from "../../Typography/Typography.js";
|
|
3
3
|
import { i as n } from "../../../dist-C1a-68Kb.js";
|
|
4
|
-
import { triggerVariants as
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
4
|
+
import { triggerVariants as u } from "../Tabs.variants.js";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
var l = (r) => r === void 0 ? "auto" : r ? "active" : "inactive", m = ({ tab: r, label: o, isActive: a, className: e }) => /* @__PURE__ */ i(n, {
|
|
7
7
|
value: r,
|
|
8
|
-
className: "group/tab",
|
|
9
|
-
children: /* @__PURE__ */
|
|
8
|
+
className: "group/tab rounded-xs outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-aurora-500 kubefirst:focus-visible:outline-kubefirst-primary",
|
|
9
|
+
children: /* @__PURE__ */ i(s, {
|
|
10
10
|
variant: "body2",
|
|
11
11
|
component: "span",
|
|
12
|
-
className:
|
|
13
|
-
variant:
|
|
14
|
-
className:
|
|
12
|
+
className: t(u({
|
|
13
|
+
variant: l(a),
|
|
14
|
+
className: e
|
|
15
15
|
})),
|
|
16
|
-
children:
|
|
16
|
+
children: o
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
m.displayName = "KonstructTabsTrigger";
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
m as Trigger
|
|
22
22
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as m } from "../../Wrapper-
|
|
2
|
+
import { t as m } from "../../Wrapper-B5PmrW4J.js";
|
|
3
3
|
import { TagSelectProvider as p } from "./contexts/TagSelect.provider.js";
|
|
4
4
|
import { forwardRef as a } from "react";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as r } from "../../../../../../utils-DnIJruo0.js";
|
|
2
|
-
import { Button as
|
|
2
|
+
import { Button as n } from "../../../../../Button/Button.js";
|
|
3
3
|
import { t as m } from "../../../../../../ellipsis-vertical-C_yX7aQe.js";
|
|
4
|
-
import { actionsTriggerVariants as
|
|
5
|
-
import { forwardRef as
|
|
4
|
+
import { actionsTriggerVariants as c } from "../../Actions.variants.js";
|
|
5
|
+
import { forwardRef as l } from "react";
|
|
6
6
|
import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
var f =
|
|
7
|
+
var f = l(({ className: a, iconClassName: o, isOpen: s = !1, ...t }, e) => /* @__PURE__ */ p(n, {
|
|
8
8
|
ref: e,
|
|
9
9
|
type: "button",
|
|
10
10
|
variant: "link",
|
|
11
11
|
shape: "circle",
|
|
12
12
|
size: "large",
|
|
13
|
-
className: r(
|
|
14
|
-
...
|
|
13
|
+
className: r(c({ isOpen: s }), "pointer-coarse:min-h-11 pointer-coarse:min-w-11", a),
|
|
14
|
+
...t,
|
|
15
15
|
children: [/* @__PURE__ */ i(m, {
|
|
16
16
|
"aria-hidden": "true",
|
|
17
|
-
className: r("w-7 h-7",
|
|
17
|
+
className: r("w-7 h-7", o)
|
|
18
18
|
}), /* @__PURE__ */ i("span", {
|
|
19
19
|
className: "sr-only",
|
|
20
20
|
children: "Show Actions"
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import { t } from "../../../../utils-DnIJruo0.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { t as r } from "../../../../utils-DnIJruo0.js";
|
|
2
|
+
import { HIDE_BELOW_CLASS as T } from "../../constants/responsive.js";
|
|
3
|
+
import { useTableContext as q } from "../../contexts/table.hook.js";
|
|
4
|
+
import { isPaginationBarVisible as G } from "../../utils/pagination.js";
|
|
5
|
+
import { getPinnedCellProps as J } from "../../utils/pinned-columns/pinned-columns.js";
|
|
6
|
+
import { n as K } from "../../../../table.provider-QUo2buYX.js";
|
|
7
|
+
import { Skeleton as Q } from "../Skeleton/Skeleton.js";
|
|
8
|
+
import { ExpandableRow as U } from "../ExpandableRow/ExpandableRow.js";
|
|
9
|
+
import { Fragment as X } from "react";
|
|
10
|
+
import { jsx as e, jsxs as Y } from "react/jsx-runtime";
|
|
11
|
+
var se = ({ isLoading: y, showPagination: E, emptyState: C, errorState: n }) => {
|
|
12
|
+
const { table: d, pageSize: R, totalItems: D = -1 / 0, tableLoading: _, tableError: c, enableExpandedRow: B, classNameExpandedRow: L, classNameExpandedCell: j, classNameExpandedContent: z, enableHoverRow: f, classNameHoverRow: P, classNameActiveExpandedRow: V, renderExpandedRow: u, isBorderOnAdjacentCell: A, isExpandColumnVisible: H, pinnedWidths: O } = q();
|
|
13
|
+
if (y || _) return /* @__PURE__ */ e(Q, {
|
|
14
|
+
numberOfRows: R,
|
|
15
|
+
table: d
|
|
14
16
|
});
|
|
15
|
-
const
|
|
17
|
+
const a = d.getRowModel().rows ?? [], l = E && G(D), x = a.length === 0 && !!c && !!n, h = a.length > 0 ? null : c && n ? typeof n == "function" ? n(c) : n : C ?? null;
|
|
16
18
|
if (h) {
|
|
17
|
-
const
|
|
19
|
+
const s = d.getVisibleLeafColumns().length;
|
|
18
20
|
return /* @__PURE__ */ e("tbody", {
|
|
19
|
-
className:
|
|
21
|
+
className: r("kvt-body", "text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
|
|
20
22
|
children: /* @__PURE__ */ e("tr", {
|
|
21
|
-
className:
|
|
23
|
+
className: r(x ? "kvt-error-row" : "kvt-empty-row", "border-b", "border-b-gray-200", "dark:border-b-metal-700", "bg-transparent"),
|
|
22
24
|
"data-empty-row": !0,
|
|
23
25
|
"data-error-row": x ? !0 : void 0,
|
|
24
26
|
children: /* @__PURE__ */ e("td", {
|
|
25
|
-
colSpan:
|
|
26
|
-
className:
|
|
27
|
+
colSpan: s,
|
|
28
|
+
className: r("p-0", "bg-white", "dark:bg-metal-900", "dark:border", "dark:border-metal-700", "rounded-b-lg"),
|
|
27
29
|
children: /* @__PURE__ */ e("div", {
|
|
28
30
|
className: "flex items-center justify-center",
|
|
29
31
|
children: h
|
|
@@ -33,42 +35,43 @@ var te = ({ isLoading: v, showPagination: N, emptyState: y, errorState: a }) =>
|
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
37
|
return /* @__PURE__ */ e("tbody", {
|
|
36
|
-
className:
|
|
37
|
-
children:
|
|
38
|
-
const { id: p, original: g, getVisibleCells: F } =
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
className:
|
|
38
|
+
className: r("kvt-body", "text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
|
|
39
|
+
children: a.map((s, b) => {
|
|
40
|
+
const { id: p, original: g, getVisibleCells: F } = s, { meta: i = {} } = g, m = F(), o = B && s.getIsExpanded(), I = !!i.expandedRow || !!u, k = m[0]?.column.id !== "__expand" || H ? 0 : A ? 1 : null;
|
|
41
|
+
return /* @__PURE__ */ Y(X, { children: [/* @__PURE__ */ e("tr", {
|
|
42
|
+
className: r("kvt-row", { "group/row": f }, "border-b", "border-b-gray-200", "dark:text-metal-50", "dark:border-b-metal-700", "bg-transparent", i.className),
|
|
41
43
|
"data-row-id": p,
|
|
42
|
-
...
|
|
43
|
-
children:
|
|
44
|
-
const
|
|
44
|
+
...i.attributes ?? {},
|
|
45
|
+
children: m.map(({ id: M, column: t, getContext: S }, w) => {
|
|
46
|
+
const W = typeof t.columnDef.meta?.className == "function" ? t.columnDef.meta?.className(g) : t.columnDef.meta?.className, { hideBelow: N } = t.columnDef.meta ?? {}, v = J(d, t, O);
|
|
45
47
|
return /* @__PURE__ */ e("td", {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"rounded-
|
|
52
|
-
"
|
|
48
|
+
style: v.style,
|
|
49
|
+
className: r("kvt-cell", "px-4", "py-1", "text-sm", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", "[tr[data-actions-open]_&]:bg-zinc-100", "dark:[tr[data-actions-open]_&]:bg-metal-800", {
|
|
50
|
+
"group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": f,
|
|
51
|
+
[r("bg-zinc-100 dark:bg-metal-800", V)]: !!o
|
|
52
|
+
}, P, v.className, N && T[N], W, {
|
|
53
|
+
"rounded-bl-lg": b === a.length - 1 && k !== null && w === k && !l && !o,
|
|
54
|
+
"rounded-br-lg": b === a.length - 1 && w === m.length - 1 && !l && !o,
|
|
55
|
+
"dark:[tr:last-child_&]:border-b": !l
|
|
53
56
|
}),
|
|
54
|
-
"data-expanded":
|
|
55
|
-
...
|
|
56
|
-
children:
|
|
57
|
+
"data-expanded": o ? !0 : void 0,
|
|
58
|
+
...t.columnDef.meta?.attributes ?? {},
|
|
59
|
+
children: K(t.columnDef.cell, S())
|
|
57
60
|
}, M);
|
|
58
61
|
})
|
|
59
|
-
}),
|
|
62
|
+
}), I && /* @__PURE__ */ e(U, {
|
|
60
63
|
classNameExpandedCell: j,
|
|
61
64
|
classNameExpandedContent: z,
|
|
62
|
-
classNameExpandedRow:
|
|
63
|
-
colSpan:
|
|
65
|
+
classNameExpandedRow: L,
|
|
66
|
+
colSpan: m.length,
|
|
64
67
|
id: p,
|
|
65
|
-
isExpanded: !!
|
|
66
|
-
isLastRow: b ===
|
|
67
|
-
children:
|
|
68
|
+
isExpanded: !!o,
|
|
69
|
+
isLastRow: b === a.length - 1 && !l,
|
|
70
|
+
children: i.expandedRow ?? u?.(g)
|
|
68
71
|
})] }, p);
|
|
69
72
|
})
|
|
70
73
|
});
|
|
71
74
|
};
|
|
72
75
|
export {
|
|
73
|
-
|
|
76
|
+
se as Body
|
|
74
77
|
};
|