@companix/uikit 0.0.2 → 0.0.3

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 (254) hide show
  1. package/dist/bundle.es.js +61 -0
  2. package/dist/bundle.es10.js +87 -0
  3. package/dist/bundle.es11.js +75 -0
  4. package/dist/bundle.es12.js +38 -0
  5. package/dist/bundle.es13.js +33 -0
  6. package/dist/bundle.es14.js +18 -0
  7. package/dist/bundle.es15.js +11 -0
  8. package/dist/bundle.es16.js +35 -0
  9. package/dist/bundle.es17.js +27 -0
  10. package/dist/bundle.es18.js +23 -0
  11. package/dist/bundle.es19.js +24 -0
  12. package/dist/bundle.es20.js +15 -0
  13. package/dist/bundle.es21.js +41 -0
  14. package/dist/bundle.es22.js +18 -0
  15. package/dist/bundle.es23.js +36 -0
  16. package/dist/bundle.es24.js +23 -0
  17. package/dist/bundle.es25.js +42 -0
  18. package/dist/bundle.es26.js +114 -0
  19. package/dist/bundle.es27.js +115 -0
  20. package/dist/bundle.es28.js +38 -0
  21. package/dist/bundle.es29.js +13 -0
  22. package/dist/bundle.es3.js +45 -0
  23. package/dist/bundle.es30.js +27 -0
  24. package/dist/bundle.es31.js +38 -0
  25. package/dist/bundle.es35.js +43 -0
  26. package/dist/bundle.es36.js +442 -0
  27. package/dist/bundle.es37.js +24 -0
  28. package/dist/bundle.es38.js +26 -0
  29. package/dist/bundle.es39.js +83 -0
  30. package/dist/bundle.es4.js +14 -0
  31. package/dist/bundle.es40.js +20 -0
  32. package/dist/bundle.es41.js +16 -0
  33. package/dist/bundle.es43.js +7 -0
  34. package/dist/bundle.es44.js +23 -0
  35. package/dist/bundle.es45.js +16 -0
  36. package/dist/bundle.es46.js +72 -0
  37. package/dist/bundle.es47.js +70 -0
  38. package/dist/bundle.es48.js +34 -0
  39. package/dist/bundle.es49.js +70 -0
  40. package/dist/bundle.es5.js +88 -0
  41. package/dist/bundle.es50.js +33 -0
  42. package/dist/bundle.es51.js +78 -0
  43. package/dist/bundle.es52.js +51 -0
  44. package/dist/bundle.es53.js +45 -0
  45. package/dist/bundle.es54.js +40 -0
  46. package/dist/bundle.es55.js +36 -0
  47. package/dist/bundle.es56.js +9 -0
  48. package/dist/bundle.es57.js +9 -0
  49. package/dist/bundle.es58.js +7 -0
  50. package/dist/bundle.es59.js +9 -0
  51. package/dist/bundle.es6.js +87 -0
  52. package/dist/bundle.es60.js +8 -0
  53. package/dist/bundle.es61.js +19 -0
  54. package/dist/bundle.es62.js +15 -0
  55. package/dist/bundle.es63.js +22 -0
  56. package/dist/bundle.es64.js +45 -0
  57. package/dist/bundle.es65.js +28 -0
  58. package/dist/bundle.es66.js +34 -0
  59. package/dist/bundle.es67.js +6 -0
  60. package/dist/bundle.es68.js +12 -0
  61. package/dist/bundle.es69.js +47 -0
  62. package/dist/bundle.es7.js +80 -0
  63. package/dist/bundle.es70.js +11 -0
  64. package/dist/bundle.es71.js +18 -0
  65. package/dist/bundle.es72.js +32 -0
  66. package/dist/bundle.es73.js +35 -0
  67. package/dist/bundle.es74.js +6 -0
  68. package/dist/bundle.es75.js +7 -0
  69. package/dist/bundle.es76.js +7 -0
  70. package/dist/bundle.es77.js +11 -0
  71. package/dist/bundle.es78.js +17 -0
  72. package/dist/bundle.es79.js +7 -0
  73. package/dist/bundle.es8.js +29 -0
  74. package/dist/bundle.es80.js +17 -0
  75. package/dist/bundle.es81.js +25 -0
  76. package/dist/bundle.es9.js +47 -0
  77. package/dist/types/Button/index.d.ts +20 -0
  78. package/dist/types/ButtonGroup/index.d.ts +7 -0
  79. package/dist/types/Checkbox/index.d.ts +10 -0
  80. package/dist/types/Countdown/index.d.ts +7 -0
  81. package/dist/types/DateInput/index.d.ts +13 -0
  82. package/dist/types/DatePicker/Calendar.d.ts +14 -0
  83. package/dist/types/DatePicker/CalendarHeader.d.ts +10 -0
  84. package/dist/types/DatePicker/index.d.ts +12 -0
  85. package/dist/types/Dialog/index.d.ts +12 -0
  86. package/dist/types/DialogAlert/Alert.d.ts +19 -0
  87. package/dist/types/DialogAlert/Viewport.d.ts +8 -0
  88. package/dist/types/DialogAlert/index.d.ts +11 -0
  89. package/dist/types/Drawer/index.d.ts +13 -0
  90. package/dist/types/File/index.d.ts +10 -0
  91. package/dist/types/Form/index.d.ts +17 -0
  92. package/dist/types/Icon/index.d.ts +7 -0
  93. package/dist/types/LoadButton/index.d.ts +5 -0
  94. package/dist/types/NumberInput/index.d.ts +6 -0
  95. package/dist/types/OptionItem/OptionItem.d.ts +7 -0
  96. package/dist/types/OptionItem/OptionsList.d.ts +8 -0
  97. package/dist/types/Popover/index.d.ts +26 -0
  98. package/dist/types/Radio/index.d.ts +20 -0
  99. package/dist/types/Scrollable/ImitateScroll.d.ts +10 -0
  100. package/dist/types/Scrollable/index.d.ts +33 -0
  101. package/dist/types/Select/SelectInput.d.ts +14 -0
  102. package/dist/types/Select/index.d.ts +15 -0
  103. package/dist/types/SelectTags/index.d.ts +15 -0
  104. package/dist/types/Spinner/index.d.ts +8 -0
  105. package/dist/types/Stepper/index.d.ts +8 -0
  106. package/dist/types/Switch/index.d.ts +10 -0
  107. package/dist/types/Tabs/index.d.ts +13 -0
  108. package/dist/types/TextArea/index.d.ts +7 -0
  109. package/dist/types/Toaster/RemoveListener.d.ts +3 -0
  110. package/dist/types/Toaster/Toast.d.ts +9 -0
  111. package/dist/types/Toaster/Viewport.d.ts +13 -0
  112. package/dist/types/Toaster/index.d.ts +15 -0
  113. package/dist/types/Tooltip/index.d.ts +8 -0
  114. package/dist/types/__hooks/use-frooze-closing.d.ts +5 -0
  115. package/dist/types/__hooks/use-loading.d.ts +8 -0
  116. package/dist/types/__hooks/use-local-storage.d.ts +1 -0
  117. package/dist/types/__hooks/use-popover-position.d.ts +8 -0
  118. package/dist/types/__hooks/use-previos.d.ts +2 -0
  119. package/dist/types/__hooks/use-resize.d.ts +3 -0
  120. package/dist/types/__hooks/use-scrollbox.d.ts +7 -0
  121. package/dist/types/__hooks/use-stepper-input.d.ts +13 -0
  122. package/dist/types/__hooks/use-update.d.ts +1 -0
  123. package/dist/types/__hooks/useCalendar.d.ts +17 -0
  124. package/dist/types/__hooks/useCalendarOptions-copy.d.ts +22 -0
  125. package/dist/types/__hooks/useCalendarOptions.d.ts +31 -0
  126. package/dist/types/__libs/calendar.d.ts +25 -0
  127. package/dist/types/__utils/utils.d.ts +25 -0
  128. package/dist/types/index.d.ts +31 -0
  129. package/dist/types/types.d.ts +13 -0
  130. package/dist/uikit.css +1 -0
  131. package/package.json +10 -6
  132. package/.eslintrc +0 -54
  133. package/declaration.d.ts +0 -4
  134. package/index.html +0 -12
  135. package/playground/App.tsx +0 -166
  136. package/playground/Example.tsx +0 -14
  137. package/playground/Test.tsx +0 -44
  138. package/playground/animation-test-1/index.scss +0 -20
  139. package/playground/animation-test-1/index.tsx +0 -17
  140. package/playground/animation-test-2/index.scss +0 -62
  141. package/playground/animation-test-2/index.tsx +0 -32
  142. package/playground/bootstrap.tsx +0 -19
  143. package/playground/buttons/index.tsx +0 -132
  144. package/playground/checkbox/index.tsx +0 -64
  145. package/playground/date-input/index.tsx +0 -45
  146. package/playground/date-picker/index.tsx +0 -41
  147. package/playground/dialog/index.tsx +0 -92
  148. package/playground/dialog-alert/index.tsx +0 -47
  149. package/playground/drawer/index.tsx +0 -55
  150. package/playground/index.css +0 -33
  151. package/playground/index.scss +0 -270
  152. package/playground/input/index.tsx +0 -112
  153. package/playground/number-inputs/index.tsx +0 -50
  154. package/playground/popovers/index.tsx +0 -70
  155. package/playground/radio-group/index.tsx +0 -69
  156. package/playground/select/index.tsx +0 -72
  157. package/playground/select-tags/index.tsx +0 -36
  158. package/playground/styles.scss +0 -2
  159. package/playground/switch/index.tsx +0 -44
  160. package/playground/tabs/index.tsx +0 -16
  161. package/playground/test.scss +0 -0
  162. package/playground/text-area/index.tsx +0 -17
  163. package/playground/text-input/index.tsx +0 -12
  164. package/playground/toaster/index.tsx +0 -156
  165. package/playground/tooltip/index.tsx +0 -26
  166. package/src/Button/Button.scss +0 -128
  167. package/src/Button/index.tsx +0 -72
  168. package/src/ButtonGroup/ButtonGroup.scss +0 -18
  169. package/src/ButtonGroup/index.tsx +0 -20
  170. package/src/Checkbox/Checkbox.scss +0 -115
  171. package/src/Checkbox/index.tsx +0 -46
  172. package/src/Countdown/index.tsx +0 -54
  173. package/src/DateInput/DateInput.scss +0 -11
  174. package/src/DateInput/index.tsx +0 -96
  175. package/src/DatePicker/Calendar.scss +0 -125
  176. package/src/DatePicker/Calendar.tsx +0 -157
  177. package/src/DatePicker/CalendarHeader.tsx +0 -139
  178. package/src/DatePicker/DatePicker.scss +0 -0
  179. package/src/DatePicker/index.tsx +0 -177
  180. package/src/Dialog/Dialog.scss +0 -25
  181. package/src/Dialog/Popup.scss +0 -55
  182. package/src/Dialog/index.tsx +0 -31
  183. package/src/DialogAlert/Alert.scss +0 -52
  184. package/src/DialogAlert/Alert.tsx +0 -78
  185. package/src/DialogAlert/Viewport.tsx +0 -52
  186. package/src/DialogAlert/index.tsx +0 -37
  187. package/src/Drawer/Drawer.scss +0 -112
  188. package/src/Drawer/index.tsx +0 -46
  189. package/src/File/index.tsx +0 -60
  190. package/src/Form/Form.scss +0 -70
  191. package/src/Form/Input.scss +0 -24
  192. package/src/Form/index.tsx +0 -131
  193. package/src/Icon/icon.scss +0 -18
  194. package/src/Icon/index.tsx +0 -43
  195. package/src/LoadButton/index.tsx +0 -17
  196. package/src/NumberInput/index.tsx +0 -74
  197. package/src/OptionItem/Option.scss +0 -89
  198. package/src/OptionItem/OptionItem.tsx +0 -49
  199. package/src/OptionItem/OptionsList.tsx +0 -26
  200. package/src/Popover/Popover.scss +0 -80
  201. package/src/Popover/index.tsx +0 -117
  202. package/src/Radio/Radio.scss +0 -148
  203. package/src/Radio/index.tsx +0 -68
  204. package/src/Scrollable/ImitateScroll.tsx +0 -141
  205. package/src/Scrollable/Scrollable.scss +0 -50
  206. package/src/Scrollable/index.tsx +0 -141
  207. package/src/Select/Select.scss +0 -80
  208. package/src/Select/SelectInput.tsx +0 -131
  209. package/src/Select/index.tsx +0 -134
  210. package/src/SelectTags/SelectTags.scss +0 -66
  211. package/src/SelectTags/index.tsx +0 -192
  212. package/src/Spinner/Spinner.scss +0 -14
  213. package/src/Spinner/index.tsx +0 -19
  214. package/src/Stepper/StepperInput.scss +0 -35
  215. package/src/Stepper/index.tsx +0 -76
  216. package/src/Switch/Switch.scss +0 -102
  217. package/src/Switch/index.tsx +0 -49
  218. package/src/Tabs/Tabs.scss +0 -58
  219. package/src/Tabs/index.tsx +0 -89
  220. package/src/TextArea/TextArea.scss +0 -34
  221. package/src/TextArea/index.tsx +0 -51
  222. package/src/Toaster/RemoveListener.tsx +0 -11
  223. package/src/Toaster/Toast.tsx +0 -69
  224. package/src/Toaster/Toaster.scss +0 -151
  225. package/src/Toaster/Viewport.tsx +0 -117
  226. package/src/Toaster/index.tsx +0 -52
  227. package/src/Tooltip/Tooltip.scss +0 -28
  228. package/src/Tooltip/index.tsx +0 -33
  229. package/src/__hooks/use-frooze-closing.ts +0 -51
  230. package/src/__hooks/use-loading.ts +0 -34
  231. package/src/__hooks/use-local-storage.ts +0 -19
  232. package/src/__hooks/use-popover-position.ts +0 -24
  233. package/src/__hooks/use-previos.ts +0 -25
  234. package/src/__hooks/use-resize.ts +0 -41
  235. package/src/__hooks/use-scrollbox.ts +0 -45
  236. package/src/__hooks/use-stepper-input.ts +0 -82
  237. package/src/__hooks/use-update.ts +0 -19
  238. package/src/__hooks/useCalendar.ts +0 -104
  239. package/src/__hooks/useCalendarOptions-copy.ts +0 -87
  240. package/src/__hooks/useCalendarOptions.ts +0 -68
  241. package/src/__libs/calendar.ts +0 -175
  242. package/src/__utils/utils.ts +0 -137
  243. package/src/css.scss +0 -120
  244. package/src/index.scss +0 -22
  245. package/src/index.ts +0 -36
  246. package/src/mixins.scss +0 -99
  247. package/src/theme.scss +0 -103
  248. package/src/types.ts +0 -14
  249. package/tailwind.config.js +0 -91
  250. package/themes/classic/animations.scss +0 -179
  251. package/themes/classic/classic.scss +0 -493
  252. package/tsconfig.json +0 -27
  253. package/vite.build.ts +0 -35
  254. package/vite.config.ts +0 -33
@@ -0,0 +1,87 @@
1
+ import { jsxs as x, jsx as c } from "react/jsx-runtime";
2
+ import L from "classnames";
3
+ import { useRef as d, useMemo as f, useCallback as n, useEffect as T, useLayoutEffect as H } from "react";
4
+ import { getContainers as p, pc as h, px as v } from "@companix/utils-browser";
5
+ const C = ({
6
+ children: b,
7
+ thumbClassName: y,
8
+ scrollableClassName: g,
9
+ thumbMargin: R = 0,
10
+ trackWidth: w = 20
11
+ }) => {
12
+ const l = d(null), t = d(null), r = f(() => ({ positons: { top: 0, y: 0 }, scrollRatio: 0 }), []), i = f(() => ({
13
+ start() {
14
+ document.addEventListener("mousemove", a), document.addEventListener("mouseup", m);
15
+ },
16
+ clear() {
17
+ document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", m);
18
+ }
19
+ }), []);
20
+ T(() => {
21
+ const o = new ResizeObserver(u);
22
+ return t.current && p(t.current, (e) => {
23
+ o.observe(e);
24
+ }), () => {
25
+ t.current && p(t.current, (e) => {
26
+ o.unobserve(e);
27
+ });
28
+ };
29
+ }, []), H(() => {
30
+ u();
31
+ }, []);
32
+ const u = n(() => {
33
+ const { current: o } = t, { current: e } = l;
34
+ if (e && o) {
35
+ const s = o.clientHeight / o.scrollHeight;
36
+ e.style.height = h(s * 100), e.style.display = s === 1 ? "none" : "block", r.scrollRatio = s;
37
+ }
38
+ }, []), a = n(({ clientY: o }) => {
39
+ const { current: e } = t;
40
+ if (e) {
41
+ const s = o - r.positons.y;
42
+ e.scrollTop = r.positons.top + s / r.scrollRatio;
43
+ }
44
+ }, []), m = n(() => {
45
+ i.clear();
46
+ }, []), E = n(({ clientY: o }) => {
47
+ const { current: e } = t;
48
+ e && (r.positons = {
49
+ top: e.scrollTop,
50
+ y: o
51
+ }), i.start();
52
+ }, []), M = () => {
53
+ requestAnimationFrame(() => {
54
+ const { current: o } = t, { current: e } = l;
55
+ e && o && (e.style.top = h(o.scrollTop * 100 / o.scrollHeight));
56
+ });
57
+ };
58
+ return /* @__PURE__ */ x("div", { className: "relative h-full overflow-hidden", children: [
59
+ /* @__PURE__ */ c(
60
+ "div",
61
+ {
62
+ className: L("hidden-scroll h-full overflow-y-scroll", g),
63
+ onScroll: M,
64
+ ref: t,
65
+ children: b
66
+ }
67
+ ),
68
+ /* @__PURE__ */ c(
69
+ "div",
70
+ {
71
+ className: "absolute right-0 top-0 box-border h-full",
72
+ style: { width: v(w), padding: v(R) },
73
+ children: /* @__PURE__ */ c(
74
+ "div",
75
+ {
76
+ onMouseDown: E,
77
+ className: `${y} relative w-full rounded-full`,
78
+ ref: l
79
+ }
80
+ )
81
+ }
82
+ )
83
+ ] });
84
+ };
85
+ export {
86
+ C as ImitateScroll
87
+ };
@@ -0,0 +1,8 @@
1
+ function o(...f) {
2
+ return (...c) => {
3
+ for (let e of f) typeof e == "function" && e(...c);
4
+ };
5
+ }
6
+ export {
7
+ o as chain
8
+ };
@@ -0,0 +1,19 @@
1
+ import { isShadowRoot as r } from "./bundle.es62.js";
2
+ import { shadowDOM as a } from "./bundle.es79.js";
3
+ function i(t, f) {
4
+ if (!a()) return f && t ? t.contains(f) : !1;
5
+ if (!t || !f) return !1;
6
+ let e = f;
7
+ for (; e !== null; ) {
8
+ if (e === t) return !0;
9
+ e.tagName === "SLOT" && e.assignedSlot ? e = e.assignedSlot.parentNode : r(e) ? e = e.host : e = e.parentNode;
10
+ }
11
+ return !1;
12
+ }
13
+ function n(t) {
14
+ return a() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
15
+ }
16
+ export {
17
+ n as getEventTarget,
18
+ i as nodeContains
19
+ };
@@ -0,0 +1,15 @@
1
+ const t = (o) => {
2
+ var n;
3
+ return (n = o?.ownerDocument) !== null && n !== void 0 ? n : document;
4
+ }, e = (o) => o && "window" in o && o.window === o ? o : t(o).defaultView || window;
5
+ function d(o) {
6
+ return o !== null && typeof o == "object" && "nodeType" in o && typeof o.nodeType == "number";
7
+ }
8
+ function c(o) {
9
+ return d(o) && o.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in o;
10
+ }
11
+ export {
12
+ t as getOwnerDocument,
13
+ e as getOwnerWindow,
14
+ c as isShadowRoot
15
+ };
@@ -0,0 +1,22 @@
1
+ import { chain as n } from "./bundle.es60.js";
2
+ import { mergeIds as s } from "./bundle.es78.js";
3
+ import { clsx as l } from "./bundle.es80.js";
4
+ function a(...r) {
5
+ let o = {
6
+ ...r[0]
7
+ };
8
+ for (let c = 1; c < r.length; c++) {
9
+ let i = r[c];
10
+ for (let e in i) {
11
+ let f = o[e], t = i[e];
12
+ typeof f == "function" && typeof t == "function" && // This is a lot faster than a regex.
13
+ e[0] === "o" && e[1] === "n" && e.charCodeAt(2) >= /* 'A' */
14
+ 65 && e.charCodeAt(2) <= /* 'Z' */
15
+ 90 ? o[e] = n(f, t) : (e === "className" || e === "UNSAFE_className") && typeof f == "string" && typeof t == "string" ? o[e] = l(f, t) : e === "id" && f && t ? o.id = s(f, t) : o[e] = t !== void 0 ? t : f;
16
+ }
17
+ }
18
+ return o;
19
+ }
20
+ export {
21
+ a as mergeProps
22
+ };
@@ -0,0 +1,45 @@
1
+ function f(l) {
2
+ if (c()) l.focus({
3
+ preventScroll: !0
4
+ });
5
+ else {
6
+ let e = n(l);
7
+ l.focus(), s(e);
8
+ }
9
+ }
10
+ let r = null;
11
+ function c() {
12
+ if (r == null) {
13
+ r = !1;
14
+ try {
15
+ document.createElement("div").focus({
16
+ get preventScroll() {
17
+ return r = !0, !0;
18
+ }
19
+ });
20
+ } catch {
21
+ }
22
+ }
23
+ return r;
24
+ }
25
+ function n(l) {
26
+ let e = l.parentNode, o = [], t = document.scrollingElement || document.documentElement;
27
+ for (; e instanceof HTMLElement && e !== t; )
28
+ (e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && o.push({
29
+ element: e,
30
+ scrollTop: e.scrollTop,
31
+ scrollLeft: e.scrollLeft
32
+ }), e = e.parentNode;
33
+ return t instanceof HTMLElement && o.push({
34
+ element: t,
35
+ scrollTop: t.scrollTop,
36
+ scrollLeft: t.scrollLeft
37
+ }), o;
38
+ }
39
+ function s(l) {
40
+ for (let { element: e, scrollTop: o, scrollLeft: t } of l)
41
+ e.scrollTop = o, e.scrollLeft = t;
42
+ }
43
+ export {
44
+ f as focusWithoutScrolling
45
+ };
@@ -0,0 +1,28 @@
1
+ import { focusWithoutScrolling as f } from "./bundle.es64.js";
2
+ import { isFirefox as p, isWebKit as K, isMac as l, isIPad as $ } from "./bundle.es69.js";
3
+ import "react";
4
+ function o(e, c, d = !0) {
5
+ var t, a;
6
+ let { metaKey: i, ctrlKey: n, altKey: s, shiftKey: r } = c;
7
+ p() && (!((a = window.event) === null || a === void 0 || (t = a.type) === null || t === void 0) && t.startsWith("key")) && e.target === "_blank" && (l() ? i = !0 : n = !0);
8
+ let y = K() && l() && !$() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
9
+ keyIdentifier: "Enter",
10
+ metaKey: i,
11
+ ctrlKey: n,
12
+ altKey: s,
13
+ shiftKey: r
14
+ }) : new MouseEvent("click", {
15
+ metaKey: i,
16
+ ctrlKey: n,
17
+ altKey: s,
18
+ shiftKey: r,
19
+ detail: 1,
20
+ bubbles: !0,
21
+ cancelable: !0
22
+ });
23
+ o.isOpening = d, f(e), e.dispatchEvent(y), o.isOpening = !1;
24
+ }
25
+ o.isOpening = !1;
26
+ export {
27
+ o as openLink
28
+ };
@@ -0,0 +1,34 @@
1
+ import { useRef as c, useCallback as f, useEffect as b } from "react";
2
+ function L() {
3
+ let o = c(/* @__PURE__ */ new Map()), u = f((e, l, r, t) => {
4
+ let n = t?.once ? (...d) => {
5
+ o.current.delete(r), r(...d);
6
+ } : r;
7
+ o.current.set(r, {
8
+ type: l,
9
+ eventTarget: e,
10
+ fn: n,
11
+ options: t
12
+ }), e.addEventListener(l, n, t);
13
+ }, []), a = f((e, l, r, t) => {
14
+ var n;
15
+ let d = ((n = o.current.get(r)) === null || n === void 0 ? void 0 : n.fn) || r;
16
+ e.removeEventListener(l, d, t), o.current.delete(r);
17
+ }, []), s = f(() => {
18
+ o.current.forEach((e, l) => {
19
+ a(e.eventTarget, e.type, l, e.options);
20
+ });
21
+ }, [
22
+ a
23
+ ]);
24
+ return b(() => s, [
25
+ s
26
+ ]), {
27
+ addGlobalListener: u,
28
+ removeGlobalListener: a,
29
+ removeAllGlobalListeners: s
30
+ };
31
+ }
32
+ export {
33
+ L as useGlobalListeners
34
+ };
@@ -0,0 +1,6 @@
1
+ import e from "react";
2
+ const c = typeof document < "u" ? e.useLayoutEffect : () => {
3
+ };
4
+ export {
5
+ c as useLayoutEffect
6
+ };
@@ -0,0 +1,12 @@
1
+ import { useLayoutEffect as f } from "./bundle.es67.js";
2
+ function u(r, e) {
3
+ f(() => {
4
+ if (r && r.ref && e)
5
+ return r.ref.current = e.current, () => {
6
+ r.ref && (r.ref.current = null);
7
+ };
8
+ });
9
+ }
10
+ export {
11
+ u as useSyncRef
12
+ };
@@ -0,0 +1,47 @@
1
+ function a(t) {
2
+ var n;
3
+ if (typeof window > "u" || window.navigator == null) return !1;
4
+ let o = (n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.brands;
5
+ return Array.isArray(o) && o.some((s) => t.test(s.brand)) || t.test(window.navigator.userAgent);
6
+ }
7
+ function r(t) {
8
+ var n;
9
+ return typeof window < "u" && window.navigator != null ? t.test(((n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.platform) || window.navigator.platform) : !1;
10
+ }
11
+ function e(t) {
12
+ if (process.env.NODE_ENV === "test") return t;
13
+ let n = null;
14
+ return () => (n == null && (n = t()), n);
15
+ }
16
+ const i = e(function() {
17
+ return r(/^Mac/i);
18
+ }), c = e(function() {
19
+ return r(/^iPhone/i);
20
+ }), u = e(function() {
21
+ return r(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
22
+ i() && navigator.maxTouchPoints > 1;
23
+ }), d = e(function() {
24
+ return c() || u();
25
+ });
26
+ e(function() {
27
+ return i() || d();
28
+ });
29
+ const f = e(function() {
30
+ return a(/AppleWebKit/i) && !$();
31
+ }), $ = e(function() {
32
+ return a(/Chrome/i);
33
+ }), l = e(function() {
34
+ return a(/Android/i);
35
+ }), w = e(function() {
36
+ return a(/Firefox/i);
37
+ });
38
+ export {
39
+ l as isAndroid,
40
+ $ as isChrome,
41
+ w as isFirefox,
42
+ d as isIOS,
43
+ u as isIPad,
44
+ c as isIPhone,
45
+ i as isMac,
46
+ f as isWebKit
47
+ };
@@ -0,0 +1,80 @@
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import * as o from "@radix-ui/react-popover";
3
+ import { attr as y } from "@companix/utils-browser";
4
+ import B from "classnames";
5
+ import { forwardRef as M, useRef as j } from "react";
6
+ const D = M((a, i) => {
7
+ const {
8
+ children: n,
9
+ sideOffset: s,
10
+ matchTarget: l,
11
+ onAnimationEnd: c,
12
+ onAnimationStart: m,
13
+ onOpenAutoFocus: d,
14
+ onCloseAutoFocus: f,
15
+ triggerRef: p,
16
+ triggerProps: h,
17
+ open: g,
18
+ content: u,
19
+ onOpenChange: v,
20
+ align: C,
21
+ disabled: w,
22
+ minimal: x,
23
+ className: L,
24
+ fitMaxHeight: N = !0,
25
+ side: O,
26
+ showArrows: A
27
+ } = a, e = j(null), P = () => {
28
+ e.current && e.current.click();
29
+ }, b = (R) => {
30
+ w && R.preventDefault();
31
+ };
32
+ return /* @__PURE__ */ t(o.Root, { open: g, onOpenChange: v, children: [
33
+ /* @__PURE__ */ r(o.Trigger, { ref: p, ...h, onClick: b, asChild: !0, children: n }),
34
+ /* @__PURE__ */ r(o.Portal, { children: /* @__PURE__ */ t(
35
+ o.Content,
36
+ {
37
+ ref: i,
38
+ className: B("popover", L),
39
+ side: O,
40
+ align: C,
41
+ "data-appearance": x ? "minimal" : "default",
42
+ "data-match-target": l,
43
+ sideOffset: s ?? 6,
44
+ avoidCollisions: !0,
45
+ arrowPadding: 10,
46
+ onAnimationStart: m,
47
+ onAnimationEnd: c,
48
+ onOpenAutoFocus: d,
49
+ onCloseAutoFocus: f,
50
+ children: [
51
+ /* @__PURE__ */ r(o.Close, { ref: e, style: { display: "none" } }),
52
+ A && /* @__PURE__ */ r(o.Arrow, { width: 30, height: 11, asChild: !0, children: /* @__PURE__ */ r("div", { className: "popover-arrow", children: /* @__PURE__ */ t("svg", { className: "popover-arrow-icon", viewBox: "0 0 30 11", width: 30, height: 11, children: [
53
+ /* @__PURE__ */ r(
54
+ "path",
55
+ {
56
+ className: "popover-arrow-border",
57
+ d: "M 18.112 -2.704 C 19.127 -3.64 19.999 -5.626 19.999 -7.001 L 19.999 18.999 C 19.999 17.621 19.131 15.642 18.111 14.702 L 10.927 8.084 C 9.69 6.944 9.694 5.05 10.927 3.914 L 18.112 -2.704 Z",
58
+ style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
59
+ transform: "matrix(0, -1, 1, 0, 0.000001, 0)"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ r(
63
+ "path",
64
+ {
65
+ className: "popover-arrow-fill",
66
+ d: "M 17.789 -2.965 C 19.009 -4.09 19.999 -6.341 19.999 -7.995 L 19.999 -10.001 L 19.999 19.999 L 19.999 17.994 C 19.999 16.34 19.016 14.094 17.789 12.964 L 10.606 6.348 C 9.796 5.602 9.804 4.388 10.606 3.648 L 17.789 -2.966 L 17.789 -2.965 Z",
67
+ style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
68
+ transform: "matrix(0, -1, 1, 0, 0, 0)"
69
+ }
70
+ )
71
+ ] }) }) }),
72
+ /* @__PURE__ */ r("div", { className: "popover-content", "data-fit-max-height": y(N), children: u({ close: P }) })
73
+ ]
74
+ }
75
+ ) })
76
+ ] });
77
+ });
78
+ export {
79
+ D as Popover
80
+ };
@@ -0,0 +1,11 @@
1
+ import { isAndroid as i } from "./bundle.es69.js";
2
+ function o(r) {
3
+ return r.pointerType === "" && r.isTrusted ? !0 : i() && r.pointerType ? r.type === "click" && r.buttons === 1 : r.detail === 0 && !r.pointerType;
4
+ }
5
+ function p(r) {
6
+ return !i() && r.width === 0 && r.height === 0 || r.width === 1 && r.height === 1 && r.pressure === 0 && r.detail === 0 && r.pointerType === "mouse";
7
+ }
8
+ export {
9
+ o as isVirtualClick,
10
+ p as isVirtualPointerEvent
11
+ };
@@ -0,0 +1,18 @@
1
+ import { useLayoutEffect as f } from "./bundle.es67.js";
2
+ import o, { useRef as n, useCallback as u } from "react";
3
+ var c;
4
+ const s = (c = o.useInsertionEffect) !== null && c !== void 0 ? c : f;
5
+ function i(a) {
6
+ const t = n(null);
7
+ return s(() => {
8
+ t.current = a;
9
+ }, [
10
+ a
11
+ ]), u((...r) => {
12
+ const e = t.current;
13
+ return e?.(...r);
14
+ }, []);
15
+ }
16
+ export {
17
+ i as useEffectEvent
18
+ };
@@ -0,0 +1,32 @@
1
+ import { isElementVisible as b } from "./bundle.es81.js";
2
+ const n = [
3
+ "input:not([disabled]):not([type=hidden])",
4
+ "select:not([disabled])",
5
+ "textarea:not([disabled])",
6
+ "button:not([disabled])",
7
+ "a[href]",
8
+ "area[href]",
9
+ "summary",
10
+ "iframe",
11
+ "object",
12
+ "embed",
13
+ "audio[controls]",
14
+ "video[controls]",
15
+ '[contenteditable]:not([contenteditable^="false"])',
16
+ "permission"
17
+ ], a = n.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
18
+ n.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
19
+ function d(t) {
20
+ return t.matches(a) && b(t) && !o(t);
21
+ }
22
+ function o(t) {
23
+ let e = t;
24
+ for (; e != null; ) {
25
+ if (e instanceof e.ownerDocument.defaultView.HTMLElement && e.inert) return !0;
26
+ e = e.parentElement;
27
+ }
28
+ return !1;
29
+ }
30
+ export {
31
+ d as isFocusable
32
+ };
@@ -0,0 +1,35 @@
1
+ let r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
2
+ function o() {
3
+ if (typeof window > "u") return;
4
+ function t(e) {
5
+ return "propertyName" in e;
6
+ }
7
+ let d = (e) => {
8
+ if (!t(e) || !e.target) return;
9
+ let n = r.get(e.target);
10
+ n || (n = /* @__PURE__ */ new Set(), r.set(e.target, n), e.target.addEventListener("transitioncancel", i, {
11
+ once: !0
12
+ })), n.add(e.propertyName);
13
+ }, i = (e) => {
14
+ if (!t(e) || !e.target) return;
15
+ let n = r.get(e.target);
16
+ if (n && (n.delete(e.propertyName), n.size === 0 && (e.target.removeEventListener("transitioncancel", i), r.delete(e.target)), r.size === 0)) {
17
+ for (let s of a) s();
18
+ a.clear();
19
+ }
20
+ };
21
+ document.body.addEventListener("transitionrun", d), document.body.addEventListener("transitionend", i);
22
+ }
23
+ typeof document < "u" && (document.readyState !== "loading" ? o() : document.addEventListener("DOMContentLoaded", o));
24
+ function c() {
25
+ for (const [t] of r)
26
+ "isConnected" in t && !t.isConnected && r.delete(t);
27
+ }
28
+ function f(t) {
29
+ requestAnimationFrame(() => {
30
+ c(), r.size === 0 ? t() : a.add(t);
31
+ });
32
+ }
33
+ export {
34
+ f as runAfterTransition
35
+ };
@@ -0,0 +1,6 @@
1
+ function a(t, e) {
2
+ return e.get ? e.get.call(t) : e.value;
3
+ }
4
+ export {
5
+ a as _
6
+ };
@@ -0,0 +1,7 @@
1
+ function o(t, e, n) {
2
+ if (!e.has(t)) throw new TypeError("attempted to " + n + " private field on non-instance");
3
+ return e.get(t);
4
+ }
5
+ export {
6
+ o as _
7
+ };
@@ -0,0 +1,7 @@
1
+ function a(e, t) {
2
+ if (t.has(e))
3
+ throw new TypeError("Cannot initialize the same private elements twice on an object");
4
+ }
5
+ export {
6
+ a as _
7
+ };
@@ -0,0 +1,11 @@
1
+ function l(a, e, t) {
2
+ if (e.set) e.set.call(a, t);
3
+ else {
4
+ if (!e.writable)
5
+ throw new TypeError("attempted to set read only private field");
6
+ e.value = t;
7
+ }
8
+ }
9
+ export {
10
+ l as _
11
+ };
@@ -0,0 +1,17 @@
1
+ import "react";
2
+ let n = /* @__PURE__ */ new Map();
3
+ typeof FinalizationRegistry < "u" && new FinalizationRegistry((e) => {
4
+ n.delete(e);
5
+ });
6
+ function o(e, t) {
7
+ if (e === t) return e;
8
+ let f = n.get(e);
9
+ if (f)
10
+ return f.forEach((r) => r.current = t), t;
11
+ let a = n.get(t);
12
+ return a ? (a.forEach((r) => r.current = e), e) : t;
13
+ }
14
+ export {
15
+ n as idsUpdaterMap,
16
+ o as mergeIds
17
+ };
@@ -0,0 +1,7 @@
1
+ let e = !1;
2
+ function f() {
3
+ return e;
4
+ }
5
+ export {
6
+ f as shadowDOM
7
+ };
@@ -0,0 +1,29 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { useState as n } from "react";
3
+ /* empty css */
4
+ import { Popover as m } from "./bundle.es7.js";
5
+ const l = ({ children: e, content: t, side: r }) => {
6
+ const [s, o] = n(!1);
7
+ return /* @__PURE__ */ p(
8
+ m,
9
+ {
10
+ showArrows: !0,
11
+ className: "tooltip",
12
+ open: s,
13
+ side: r,
14
+ content: () => t,
15
+ triggerProps: {
16
+ onMouseEnter: () => {
17
+ o(!0);
18
+ },
19
+ onMouseLeave: () => {
20
+ o(!1);
21
+ }
22
+ },
23
+ children: e
24
+ }
25
+ );
26
+ };
27
+ export {
28
+ l as Tooltip
29
+ };
@@ -0,0 +1,17 @@
1
+ function a(r) {
2
+ var n, f, t = "";
3
+ if (typeof r == "string" || typeof r == "number") t += r;
4
+ else if (typeof r == "object") if (Array.isArray(r)) {
5
+ var o = r.length;
6
+ for (n = 0; n < o; n++) r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
7
+ } else for (f in r) r[f] && (t && (t += " "), t += f);
8
+ return t;
9
+ }
10
+ function i() {
11
+ for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++) (r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
12
+ return t;
13
+ }
14
+ export {
15
+ i as clsx,
16
+ i as default
17
+ };
@@ -0,0 +1,25 @@
1
+ import { getOwnerWindow as d } from "./bundle.es62.js";
2
+ const c = typeof Element < "u" && "checkVisibility" in Element.prototype;
3
+ function p(i) {
4
+ const t = d(i);
5
+ if (!(i instanceof t.HTMLElement) && !(i instanceof t.SVGElement)) return !1;
6
+ let { display: o, visibility: e } = i.style, a = o !== "none" && e !== "hidden" && e !== "collapse";
7
+ if (a) {
8
+ const { getComputedStyle: r } = i.ownerDocument.defaultView;
9
+ let { display: n, visibility: s } = r(i);
10
+ a = n !== "none" && s !== "hidden" && s !== "collapse";
11
+ }
12
+ return a;
13
+ }
14
+ function u(i, t) {
15
+ return !i.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
16
+ !i.hasAttribute("data-react-aria-prevent-focus") && (i.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? i.hasAttribute("open") : !0);
17
+ }
18
+ function f(i, t) {
19
+ return c ? i.checkVisibility({
20
+ visibilityProperty: !0
21
+ }) && !i.closest("[data-react-aria-prevent-focus]") : i.nodeName !== "#comment" && p(i) && u(i, t) && (!i.parentElement || f(i.parentElement, i));
22
+ }
23
+ export {
24
+ f as isElementVisible
25
+ };