@konstructio/ui 0.1.2-alpha.3 → 0.1.2-alpha.5
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-D-NOEWMX.js} +3 -3
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{chevron-down-BLZPftpV.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/Badge/Badge.js +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +16 -15
- package/dist/components/Checkbox/Checkbox.js +5 -4
- 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 +545 -543
- package/dist/components/Dropdown/Dropdown.js +36 -24
- package/dist/components/Dropdown/Dropdown.variants.js +25 -7
- 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/Input/Input.js +1 -1
- package/dist/components/Loading/Loading.js +2 -2
- 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/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 +6 -5
- 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 +8 -7
- package/dist/components/VirtualizedTable/VirtualizedTable.js +99 -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 +73 -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 +1870 -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 +778 -0
- package/dist/components/index.js +44 -40
- package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D2CN7Ma9.js} +4 -4
- package/dist/debounce-BFejQm9P.js +200 -0
- package/dist/{index-D3xzCzcO.js → index-B7t8D14s.js} +2 -2
- package/dist/index-BAEWsOG1.js +27 -0
- package/dist/{index-C9T9HQaa.js → index-BITvcJAz.js} +1 -1
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/{index-BAraV3ai.js → index-Bnb0ezr3.js} +1 -1
- package/dist/{index-DB2XhXHn.js → index-C84F4YyO.js} +11 -10
- package/dist/index-Cd2vhaop.js +137 -0
- package/dist/{index-iXyXtdgP.js → index-DBbEcSUG.js} +1 -1
- package/dist/index-Dx2grAuN.js +1742 -0
- package/dist/{index-BXuxPoz7.js → index-DzIBBMjs.js} +18 -17
- package/dist/{index-h-Ul0anl.js → index-N2OStZoU.js} +1 -1
- package/dist/{index-Oq5GlCHP.js → index-os7vysFS.js} +1 -1
- package/dist/index-ti1b9kqV.js +14 -0
- package/dist/index.d.ts +94 -5
- package/dist/index.js +41 -37
- package/dist/package.json +26 -22
- package/dist/styles.css +1 -1
- package/dist/{x-BPcqkRZd.js → x-4F_5p77m.js} +1 -1
- package/package.json +26 -22
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/chevron-up-RLP4nX7V.js +0 -54
- package/dist/index-CZnD2QxM.js +0 -32
- package/dist/index-CrBonFvu.js +0 -144
package/dist/index-CrBonFvu.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
import { b as p, u as U } from "./index-BfXxHr_2.js";
|
|
3
|
-
import { P as m, d as z, R as H } from "./index-C9T9HQaa.js";
|
|
4
|
-
import { u as T } from "./index-DQH6odE9.js";
|
|
5
|
-
import { u as b } from "./index-0ioNhtNM.js";
|
|
6
|
-
import { jsx as P } from "react/jsx-runtime";
|
|
7
|
-
function K(n, e = globalThis?.document) {
|
|
8
|
-
const t = b(n);
|
|
9
|
-
r.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 j = "DismissableLayer", h = "dismissableLayer.update", X = "dismissableLayer.pointerDownOutside", Y = "dismissableLayer.focusOutside", w, B = r.createContext({
|
|
17
|
-
layers: /* @__PURE__ */ new Set(),
|
|
18
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
19
|
-
branches: /* @__PURE__ */ new Set()
|
|
20
|
-
}), x = r.forwardRef(
|
|
21
|
-
(n, e) => {
|
|
22
|
-
const {
|
|
23
|
-
disableOutsidePointerEvents: t = !1,
|
|
24
|
-
onEscapeKeyDown: o,
|
|
25
|
-
onPointerDownOutside: s,
|
|
26
|
-
onFocusOutside: a,
|
|
27
|
-
onInteractOutside: d,
|
|
28
|
-
onDismiss: l,
|
|
29
|
-
...E
|
|
30
|
-
} = n, c = r.useContext(B), [u, S] = r.useState(null), f = u?.ownerDocument ?? globalThis?.document, [, A] = r.useState({}), N = T(e, (i) => S(i)), D = Array.from(c.layers), [W] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), k = D.indexOf(W), O = u ? D.indexOf(u) : -1, _ = c.layersWithOutsidePointerEventsDisabled.size > 0, L = O >= k, M = G((i) => {
|
|
31
|
-
const v = i.target, R = [...c.branches].some((y) => y.contains(v));
|
|
32
|
-
!L || R || (s?.(i), d?.(i), i.defaultPrevented || l?.());
|
|
33
|
-
}, f), C = J((i) => {
|
|
34
|
-
const v = i.target;
|
|
35
|
-
[...c.branches].some((y) => y.contains(v)) || (a?.(i), d?.(i), i.defaultPrevented || l?.());
|
|
36
|
-
}, f);
|
|
37
|
-
return K((i) => {
|
|
38
|
-
O === c.layers.size - 1 && (o?.(i), !i.defaultPrevented && l && (i.preventDefault(), l()));
|
|
39
|
-
}, f), r.useEffect(() => {
|
|
40
|
-
if (u)
|
|
41
|
-
return t && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (w = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), g(), () => {
|
|
42
|
-
t && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = w);
|
|
43
|
-
};
|
|
44
|
-
}, [u, f, t, c]), r.useEffect(() => () => {
|
|
45
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), g());
|
|
46
|
-
}, [u, c]), r.useEffect(() => {
|
|
47
|
-
const i = () => A({});
|
|
48
|
-
return document.addEventListener(h, i), () => document.removeEventListener(h, i);
|
|
49
|
-
}, []), /* @__PURE__ */ P(
|
|
50
|
-
m.div,
|
|
51
|
-
{
|
|
52
|
-
...E,
|
|
53
|
-
ref: N,
|
|
54
|
-
style: {
|
|
55
|
-
pointerEvents: _ ? L ? "auto" : "none" : void 0,
|
|
56
|
-
...n.style
|
|
57
|
-
},
|
|
58
|
-
onFocusCapture: p(n.onFocusCapture, C.onFocusCapture),
|
|
59
|
-
onBlurCapture: p(n.onBlurCapture, C.onBlurCapture),
|
|
60
|
-
onPointerDownCapture: p(
|
|
61
|
-
n.onPointerDownCapture,
|
|
62
|
-
M.onPointerDownCapture
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
x.displayName = j;
|
|
69
|
-
var q = "DismissableLayerBranch", F = r.forwardRef((n, e) => {
|
|
70
|
-
const t = r.useContext(B), o = r.useRef(null), s = T(e, o);
|
|
71
|
-
return r.useEffect(() => {
|
|
72
|
-
const a = o.current;
|
|
73
|
-
if (a)
|
|
74
|
-
return t.branches.add(a), () => {
|
|
75
|
-
t.branches.delete(a);
|
|
76
|
-
};
|
|
77
|
-
}, [t.branches]), /* @__PURE__ */ P(m.div, { ...n, ref: s });
|
|
78
|
-
});
|
|
79
|
-
F.displayName = q;
|
|
80
|
-
function G(n, e = globalThis?.document) {
|
|
81
|
-
const t = b(n), o = r.useRef(!1), s = r.useRef(() => {
|
|
82
|
-
});
|
|
83
|
-
return r.useEffect(() => {
|
|
84
|
-
const a = (l) => {
|
|
85
|
-
if (l.target && !o.current) {
|
|
86
|
-
let E = function() {
|
|
87
|
-
I(
|
|
88
|
-
X,
|
|
89
|
-
t,
|
|
90
|
-
c,
|
|
91
|
-
{ discrete: !0 }
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
const c = { originalEvent: l };
|
|
95
|
-
l.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
|
-
}, d = window.setTimeout(() => {
|
|
100
|
-
e.addEventListener("pointerdown", a);
|
|
101
|
-
}, 0);
|
|
102
|
-
return () => {
|
|
103
|
-
window.clearTimeout(d), e.removeEventListener("pointerdown", a), 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 J(n, e = globalThis?.document) {
|
|
111
|
-
const t = b(n), o = r.useRef(!1);
|
|
112
|
-
return r.useEffect(() => {
|
|
113
|
-
const s = (a) => {
|
|
114
|
-
a.target && !o.current && I(Y, t, { originalEvent: a }, {
|
|
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 g() {
|
|
125
|
-
const n = new CustomEvent(h);
|
|
126
|
-
document.dispatchEvent(n);
|
|
127
|
-
}
|
|
128
|
-
function I(n, e, t, { discrete: o }) {
|
|
129
|
-
const s = t.originalEvent.target, a = new CustomEvent(n, { bubbles: !1, cancelable: !0, detail: t });
|
|
130
|
-
e && s.addEventListener(n, e, { once: !0 }), o ? z(s, a) : s.dispatchEvent(a);
|
|
131
|
-
}
|
|
132
|
-
var ne = x, re = F, Q = "Portal", V = r.forwardRef((n, e) => {
|
|
133
|
-
const { container: t, ...o } = n, [s, a] = r.useState(!1);
|
|
134
|
-
U(() => a(!0), []);
|
|
135
|
-
const d = t || s && globalThis?.document?.body;
|
|
136
|
-
return d ? H.createPortal(/* @__PURE__ */ P(m.div, { ...o, ref: e }), d) : null;
|
|
137
|
-
});
|
|
138
|
-
V.displayName = Q;
|
|
139
|
-
export {
|
|
140
|
-
re as B,
|
|
141
|
-
x as D,
|
|
142
|
-
V as P,
|
|
143
|
-
ne as R
|
|
144
|
-
};
|