@konstructio/ui 0.1.2-alpha.2 → 0.1.2-alpha.21

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.
Files changed (110) hide show
  1. package/dist/{Modal-V67Uz78z.js → Modal-B8jrP02v.js} +20 -20
  2. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  3. package/dist/{chevron-down-BLZPftpV.js → chevron-down-J5nS1Tu0.js} +2 -2
  4. package/dist/chevron-right-DeMVrnIg.js +19 -0
  5. package/dist/components/Alert/Alert.js +2 -2
  6. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  7. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  8. package/dist/components/AlertDialog/components/index.js +1 -1
  9. package/dist/components/Badge/Badge.js +31 -28
  10. package/dist/components/Badge/Badge.variants.js +7 -5
  11. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  12. package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
  13. package/dist/components/Button/Button.variants.js +1 -1
  14. package/dist/components/Checkbox/Checkbox.js +5 -4
  15. package/dist/components/Checkbox/Checkbox.variants.js +5 -4
  16. package/dist/components/Command/Command.js +2 -2
  17. package/dist/components/Command/components/Command.js +1 -1
  18. package/dist/components/Command/components/CommandEmpty.js +1 -1
  19. package/dist/components/Command/components/CommandGroup.js +1 -1
  20. package/dist/components/Command/components/CommandInput.js +2 -2
  21. package/dist/components/Command/components/CommandItem.js +1 -1
  22. package/dist/components/Command/components/CommandList.js +1 -1
  23. package/dist/components/Command/components/CommandSeparator.js +1 -1
  24. package/dist/components/Command/components/DialogContent.js +2 -2
  25. package/dist/components/Command/components/DialogOverlay.js +1 -1
  26. package/dist/components/Datepicker/DatePicker.js +545 -543
  27. package/dist/components/Dropdown/Dropdown.js +36 -24
  28. package/dist/components/Dropdown/Dropdown.variants.js +32 -9
  29. package/dist/components/Dropdown/components/List/List.js +64 -45
  30. package/dist/components/Dropdown/components/List/List.variants.js +9 -7
  31. package/dist/components/Dropdown/components/ListItem/ListItem.js +70 -24
  32. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +9 -7
  33. package/dist/components/Dropdown/components/Wrapper.js +157 -111
  34. package/dist/components/Dropdown/contexts/dropdown.context.js +9 -8
  35. package/dist/components/Dropdown/contexts/dropdown.provider.js +20 -19
  36. package/dist/components/Dropdown/hooks/useDropdown.js +30 -27
  37. package/dist/components/Dropdown/hooks/useNavigationList.js +32 -28
  38. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  39. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  40. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  41. package/dist/components/Input/Input.js +1 -1
  42. package/dist/components/Loading/Loading.js +2 -2
  43. package/dist/components/Modal/Modal.js +2 -2
  44. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
  45. package/dist/components/Modal/components/index.js +1 -1
  46. package/dist/components/NumberInput/NumberInput.js +2 -2
  47. package/dist/components/PieChart/PieChart.js +649 -648
  48. package/dist/components/Range/Range.js +1 -1
  49. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
  50. package/dist/components/Skeleton/Skeleton.js +42 -0
  51. package/dist/components/Slider/Slider.js +1 -1
  52. package/dist/components/Switch/Switch.js +6 -5
  53. package/dist/components/Tabs/Tabs.js +1 -1
  54. package/dist/components/Tabs/Tabs.variants.js +45 -24
  55. package/dist/components/Tabs/components/Content.js +1 -1
  56. package/dist/components/Tabs/components/List.js +1 -1
  57. package/dist/components/Tabs/components/Trigger.js +9 -8
  58. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +98 -49
  59. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
  60. package/dist/components/Toast/Toast.js +57 -55
  61. package/dist/components/VirtualizedTable/VirtualizedTable.js +121 -0
  62. package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
  63. package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
  64. package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
  65. package/dist/components/VirtualizedTable/assets/index.js +6 -0
  66. package/dist/components/VirtualizedTable/components/Actions/Actions.js +40 -0
  67. package/dist/components/VirtualizedTable/components/Body/Body.js +26 -0
  68. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
  69. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
  70. package/dist/components/VirtualizedTable/components/Filter/Filter.js +88 -0
  71. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
  72. package/dist/components/VirtualizedTable/components/Header/Header.js +82 -0
  73. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +45 -0
  74. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1871 -0
  75. package/dist/components/VirtualizedTable/components/index.js +14 -0
  76. package/dist/components/VirtualizedTable/constants/index.js +5 -0
  77. package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
  78. package/dist/components/VirtualizedTable/contexts/index.js +8 -0
  79. package/dist/components/VirtualizedTable/contexts/table.context.js +31 -0
  80. package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
  81. package/dist/components/VirtualizedTable/contexts/table.provider.js +84 -0
  82. package/dist/components/index.js +44 -40
  83. package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-DGhJ8Z4k.js} +4 -4
  84. package/dist/debounce-BFejQm9P.js +200 -0
  85. package/dist/ellipsis-vertical-DpnVYRxI.js +15 -0
  86. package/dist/{index-D3xzCzcO.js → index-0XtjXVpJ.js} +2 -2
  87. package/dist/index-BAEWsOG1.js +27 -0
  88. package/dist/index-BVRIAMfe.js +36 -0
  89. package/dist/index-BZPx6jYI.js +8 -0
  90. package/dist/{index-Oq5GlCHP.js → index-Bn4c-gww.js} +1 -1
  91. package/dist/index-CffpTFMi.js +137 -0
  92. package/dist/{index-BAraV3ai.js → index-DQJhMz8c.js} +1 -1
  93. package/dist/index-DdXGVVBv.js +15 -0
  94. package/dist/index-Dx2grAuN.js +1742 -0
  95. package/dist/{index-h-Ul0anl.js → index-N2OStZoU.js} +1 -1
  96. package/dist/{index-BXuxPoz7.js → index-amYX3uxF.js} +18 -17
  97. package/dist/{index-DB2XhXHn.js → index-l3NwplN0.js} +11 -10
  98. package/dist/{index-iXyXtdgP.js → index-sp5ZfG6g.js} +1 -1
  99. package/dist/index.d.ts +121 -10
  100. package/dist/index.js +41 -37
  101. package/dist/package.json +33 -25
  102. package/dist/styles.css +1 -1
  103. package/dist/ui/civo-theme.css +191 -167
  104. package/dist/{x-BPcqkRZd.js → x-4F_5p77m.js} +1 -1
  105. package/package.json +33 -25
  106. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  107. package/dist/chevron-up-RLP4nX7V.js +0 -54
  108. package/dist/index-C9T9HQaa.js +0 -423
  109. package/dist/index-CZnD2QxM.js +0 -32
  110. 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-C9T9HQaa.js";
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
+ };