@konstructio/ui 0.1.1-alpha.6 → 0.1.2-alpha.10
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/{Modal-V67Uz78z.js → Modal-B8jrP02v.js} +20 -20
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{chevron-down-CVce9Mvh.js → chevron-down-MZvQoT2F.js} +2 -2
- package/dist/chevron-right-VYBOBhRt.js +19 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +46 -54
- package/dist/components/Autocomplete/Autocomplete.variants.js +29 -48
- package/dist/components/Autocomplete/components/List/List.js +37 -47
- package/dist/components/Autocomplete/components/List/List.variants.js +34 -69
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
- package/dist/components/Button/Button.variants.js +110 -134
- package/dist/components/Checkbox/Checkbox.js +5 -4
- package/dist/components/Checkbox/Checkbox.variants.js +9 -8
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +949 -898
- package/dist/components/Dropdown/Dropdown.js +36 -24
- package/dist/components/Dropdown/Dropdown.variants.js +32 -14
- package/dist/components/Dropdown/components/List/List.js +59 -44
- package/dist/components/Dropdown/components/List/List.variants.js +9 -7
- package/dist/components/Dropdown/components/ListItem/ListItem.js +48 -24
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +9 -7
- package/dist/components/Dropdown/components/Wrapper.js +141 -106
- package/dist/components/Dropdown/contexts/dropdown.context.js +9 -8
- package/dist/components/Dropdown/contexts/dropdown.provider.js +20 -19
- package/dist/components/Dropdown/hooks/useDropdown.js +26 -27
- package/dist/components/Dropdown/hooks/useNavigationList.js +32 -28
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Filter/components/ResetButton/ResetButton.js +16 -11
- package/dist/components/Input/Input.js +48 -48
- package/dist/components/Input/Input.variants.js +10 -10
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Loading/Loading.variants.js +4 -4
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PieChart/PieChart.js +217 -215
- package/dist/components/Radio/Radio.variants.js +4 -4
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +94 -89
- package/dist/components/Switch/Switch.variants.js +16 -12
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +45 -24
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +9 -8
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +98 -49
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Toast/Toast.js +57 -55
- package/dist/components/VirtualizedTable/VirtualizedTable.js +117 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
- package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
- package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
- package/dist/components/VirtualizedTable/assets/index.js +6 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +46 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +25 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +86 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
- package/dist/components/VirtualizedTable/components/Header/Header.js +82 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +45 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1871 -0
- package/dist/components/VirtualizedTable/components/index.js +14 -0
- package/dist/components/VirtualizedTable/constants/index.js +5 -0
- package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
- package/dist/components/VirtualizedTable/contexts/index.js +8 -0
- package/dist/components/VirtualizedTable/contexts/table.context.js +31 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +82 -0
- package/dist/components/index.js +44 -40
- package/dist/{createLucideIcon-BpsAkT97.js → createLucideIcon-D2CN7Ma9.js} +4 -4
- package/dist/debounce-BFejQm9P.js +200 -0
- package/dist/{index-D3xzCzcO.js → index-0XtjXVpJ.js} +2 -2
- package/dist/index-BAEWsOG1.js +27 -0
- package/dist/index-BVRIAMfe.js +36 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/{index-Oq5GlCHP.js → index-Bn4c-gww.js} +1 -1
- package/dist/index-CffpTFMi.js +137 -0
- package/dist/{index-BAraV3ai.js → index-DQJhMz8c.js} +1 -1
- package/dist/index-DdXGVVBv.js +15 -0
- package/dist/index-Dx2grAuN.js +1742 -0
- package/dist/{index-h-Ul0anl.js → index-N2OStZoU.js} +1 -1
- package/dist/{index-BXuxPoz7.js → index-amYX3uxF.js} +18 -17
- package/dist/{index-DB2XhXHn.js → index-l3NwplN0.js} +11 -10
- package/dist/{index-iXyXtdgP.js → index-sp5ZfG6g.js} +1 -1
- package/dist/index.d.ts +112 -10
- package/dist/index.js +41 -37
- package/dist/package.json +31 -23
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +204 -189
- package/dist/ui/kubefirst-theme.css +3 -1
- package/dist/ui/theme.css +2 -2
- package/dist/{x-BPcqkRZd.js → x-4F_5p77m.js} +1 -1
- package/package.json +31 -23
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/chevron-up-RLP4nX7V.js +0 -54
- package/dist/index-C9T9HQaa.js +0 -423
- package/dist/index-CZnD2QxM.js +0 -32
- package/dist/index-CrBonFvu.js +0 -144
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { b as h } from "./index-BfXxHr_2.js";
|
|
3
|
+
import { P as R, d as z } from "./index-BVRIAMfe.js";
|
|
4
|
+
import { u as g } from "./index-DQH6odE9.js";
|
|
5
|
+
import { u as m } from "./index-0ioNhtNM.js";
|
|
6
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
7
|
+
function H(n, e = globalThis?.document) {
|
|
8
|
+
const t = m(n);
|
|
9
|
+
i.useEffect(() => {
|
|
10
|
+
const o = (s) => {
|
|
11
|
+
s.key === "Escape" && t(s);
|
|
12
|
+
};
|
|
13
|
+
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
|
14
|
+
}, [t, e]);
|
|
15
|
+
}
|
|
16
|
+
var K = "DismissableLayer", p = "dismissableLayer.update", M = "dismissableLayer.pointerDownOutside", j = "dismissableLayer.focusOutside", C, T = i.createContext({
|
|
17
|
+
layers: /* @__PURE__ */ new Set(),
|
|
18
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
19
|
+
branches: /* @__PURE__ */ new Set()
|
|
20
|
+
}), x = i.forwardRef(
|
|
21
|
+
(n, e) => {
|
|
22
|
+
const {
|
|
23
|
+
disableOutsidePointerEvents: t = !1,
|
|
24
|
+
onEscapeKeyDown: o,
|
|
25
|
+
onPointerDownOutside: s,
|
|
26
|
+
onFocusOutside: c,
|
|
27
|
+
onInteractOutside: f,
|
|
28
|
+
onDismiss: d,
|
|
29
|
+
...E
|
|
30
|
+
} = n, a = i.useContext(T), [u, S] = i.useState(null), l = u?.ownerDocument ?? globalThis?.document, [, W] = i.useState({}), k = g(e, (r) => S(r)), b = Array.from(a.layers), [A] = [...a.layersWithOutsidePointerEventsDisabled].slice(-1), N = b.indexOf(A), D = u ? b.indexOf(u) : -1, _ = a.layersWithOutsidePointerEventsDisabled.size > 0, P = D >= N, U = Y((r) => {
|
|
31
|
+
const v = r.target, L = [...a.branches].some((y) => y.contains(v));
|
|
32
|
+
!P || L || (s?.(r), f?.(r), r.defaultPrevented || d?.());
|
|
33
|
+
}, l), O = q((r) => {
|
|
34
|
+
const v = r.target;
|
|
35
|
+
[...a.branches].some((y) => y.contains(v)) || (c?.(r), f?.(r), r.defaultPrevented || d?.());
|
|
36
|
+
}, l);
|
|
37
|
+
return H((r) => {
|
|
38
|
+
D === a.layers.size - 1 && (o?.(r), !r.defaultPrevented && d && (r.preventDefault(), d()));
|
|
39
|
+
}, l), i.useEffect(() => {
|
|
40
|
+
if (u)
|
|
41
|
+
return t && (a.layersWithOutsidePointerEventsDisabled.size === 0 && (C = l.body.style.pointerEvents, l.body.style.pointerEvents = "none"), a.layersWithOutsidePointerEventsDisabled.add(u)), a.layers.add(u), w(), () => {
|
|
42
|
+
t && a.layersWithOutsidePointerEventsDisabled.size === 1 && (l.body.style.pointerEvents = C);
|
|
43
|
+
};
|
|
44
|
+
}, [u, l, t, a]), i.useEffect(() => () => {
|
|
45
|
+
u && (a.layers.delete(u), a.layersWithOutsidePointerEventsDisabled.delete(u), w());
|
|
46
|
+
}, [u, a]), i.useEffect(() => {
|
|
47
|
+
const r = () => W({});
|
|
48
|
+
return document.addEventListener(p, r), () => document.removeEventListener(p, r);
|
|
49
|
+
}, []), /* @__PURE__ */ B(
|
|
50
|
+
R.div,
|
|
51
|
+
{
|
|
52
|
+
...E,
|
|
53
|
+
ref: k,
|
|
54
|
+
style: {
|
|
55
|
+
pointerEvents: _ ? P ? "auto" : "none" : void 0,
|
|
56
|
+
...n.style
|
|
57
|
+
},
|
|
58
|
+
onFocusCapture: h(n.onFocusCapture, O.onFocusCapture),
|
|
59
|
+
onBlurCapture: h(n.onBlurCapture, O.onBlurCapture),
|
|
60
|
+
onPointerDownCapture: h(
|
|
61
|
+
n.onPointerDownCapture,
|
|
62
|
+
U.onPointerDownCapture
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
x.displayName = K;
|
|
69
|
+
var X = "DismissableLayerBranch", F = i.forwardRef((n, e) => {
|
|
70
|
+
const t = i.useContext(T), o = i.useRef(null), s = g(e, o);
|
|
71
|
+
return i.useEffect(() => {
|
|
72
|
+
const c = o.current;
|
|
73
|
+
if (c)
|
|
74
|
+
return t.branches.add(c), () => {
|
|
75
|
+
t.branches.delete(c);
|
|
76
|
+
};
|
|
77
|
+
}, [t.branches]), /* @__PURE__ */ B(R.div, { ...n, ref: s });
|
|
78
|
+
});
|
|
79
|
+
F.displayName = X;
|
|
80
|
+
function Y(n, e = globalThis?.document) {
|
|
81
|
+
const t = m(n), o = i.useRef(!1), s = i.useRef(() => {
|
|
82
|
+
});
|
|
83
|
+
return i.useEffect(() => {
|
|
84
|
+
const c = (d) => {
|
|
85
|
+
if (d.target && !o.current) {
|
|
86
|
+
let E = function() {
|
|
87
|
+
I(
|
|
88
|
+
M,
|
|
89
|
+
t,
|
|
90
|
+
a,
|
|
91
|
+
{ discrete: !0 }
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
const a = { originalEvent: d };
|
|
95
|
+
d.pointerType === "touch" ? (e.removeEventListener("click", s.current), s.current = E, e.addEventListener("click", s.current, { once: !0 })) : E();
|
|
96
|
+
} else
|
|
97
|
+
e.removeEventListener("click", s.current);
|
|
98
|
+
o.current = !1;
|
|
99
|
+
}, f = window.setTimeout(() => {
|
|
100
|
+
e.addEventListener("pointerdown", c);
|
|
101
|
+
}, 0);
|
|
102
|
+
return () => {
|
|
103
|
+
window.clearTimeout(f), e.removeEventListener("pointerdown", c), e.removeEventListener("click", s.current);
|
|
104
|
+
};
|
|
105
|
+
}, [e, t]), {
|
|
106
|
+
// ensures we check React component tree (not just DOM tree)
|
|
107
|
+
onPointerDownCapture: () => o.current = !0
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function q(n, e = globalThis?.document) {
|
|
111
|
+
const t = m(n), o = i.useRef(!1);
|
|
112
|
+
return i.useEffect(() => {
|
|
113
|
+
const s = (c) => {
|
|
114
|
+
c.target && !o.current && I(j, t, { originalEvent: c }, {
|
|
115
|
+
discrete: !1
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
return e.addEventListener("focusin", s), () => e.removeEventListener("focusin", s);
|
|
119
|
+
}, [e, t]), {
|
|
120
|
+
onFocusCapture: () => o.current = !0,
|
|
121
|
+
onBlurCapture: () => o.current = !1
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function w() {
|
|
125
|
+
const n = new CustomEvent(p);
|
|
126
|
+
document.dispatchEvent(n);
|
|
127
|
+
}
|
|
128
|
+
function I(n, e, t, { discrete: o }) {
|
|
129
|
+
const s = t.originalEvent.target, c = new CustomEvent(n, { bubbles: !1, cancelable: !0, detail: t });
|
|
130
|
+
e && s.addEventListener(n, e, { once: !0 }), o ? z(s, c) : s.dispatchEvent(c);
|
|
131
|
+
}
|
|
132
|
+
var $ = x, ee = F;
|
|
133
|
+
export {
|
|
134
|
+
ee as B,
|
|
135
|
+
x as D,
|
|
136
|
+
$ as R
|
|
137
|
+
};
|
|
@@ -3,7 +3,7 @@ import { c as K, b as I, a as L } from "./index-BfXxHr_2.js";
|
|
|
3
3
|
import { c as ce } from "./index-Cvx4lqTq.js";
|
|
4
4
|
import { u as ie } from "./index-DQH6odE9.js";
|
|
5
5
|
import { u as O } from "./index-bwWKd82e.js";
|
|
6
|
-
import { P as C } from "./index-
|
|
6
|
+
import { P as C } from "./index-BVRIAMfe.js";
|
|
7
7
|
import { u as ue } from "./index-0ioNhtNM.js";
|
|
8
8
|
import { u as k } from "./index-BdMNhZnh.js";
|
|
9
9
|
import { jsx as l } from "react/jsx-runtime";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import n from "react-dom";
|
|
3
|
+
import { P as f } from "./index-BVRIAMfe.js";
|
|
4
|
+
import { u as c } from "./index-BfXxHr_2.js";
|
|
5
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
+
var u = "Portal", p = o.forwardRef((r, a) => {
|
|
7
|
+
const { container: e, ...s } = r, [i, m] = o.useState(!1);
|
|
8
|
+
c(() => m(!0), []);
|
|
9
|
+
const t = e || i && globalThis?.document?.body;
|
|
10
|
+
return t ? n.createPortal(/* @__PURE__ */ l(f.div, { ...s, ref: a }), t) : null;
|
|
11
|
+
});
|
|
12
|
+
p.displayName = u;
|
|
13
|
+
export {
|
|
14
|
+
p as P
|
|
15
|
+
};
|