@companix/uikit 0.0.3 → 0.0.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.
Files changed (165) hide show
  1. package/dist/Button/Button.scss +128 -0
  2. package/dist/ButtonGroup/ButtonGroup.scss +18 -0
  3. package/dist/Checkbox/Checkbox.scss +115 -0
  4. package/dist/DateInput/DateInput.scss +11 -0
  5. package/dist/DatePicker/Calendar.scss +125 -0
  6. package/dist/DatePicker/DatePicker.scss +0 -0
  7. package/dist/Dialog/Dialog.scss +25 -0
  8. package/dist/Dialog/Popup.scss +55 -0
  9. package/dist/DialogAlert/Alert.scss +52 -0
  10. package/dist/Drawer/Drawer.scss +112 -0
  11. package/dist/Form/Form.scss +70 -0
  12. package/dist/Form/Input.scss +24 -0
  13. package/dist/Icon/icon.scss +18 -0
  14. package/dist/OptionItem/Option.scss +89 -0
  15. package/dist/Popover/Popover.scss +80 -0
  16. package/dist/Radio/Radio.scss +148 -0
  17. package/dist/Scrollable/Scrollable.scss +50 -0
  18. package/dist/Select/Select.scss +80 -0
  19. package/dist/SelectTags/SelectTags.scss +66 -0
  20. package/dist/Spinner/Spinner.scss +14 -0
  21. package/dist/Stepper/StepperInput.scss +35 -0
  22. package/dist/Switch/Switch.scss +102 -0
  23. package/dist/Tabs/Tabs.scss +58 -0
  24. package/dist/TextArea/TextArea.scss +34 -0
  25. package/dist/Toaster/Toaster.scss +151 -0
  26. package/dist/Tooltip/Tooltip.scss +28 -0
  27. package/dist/bundle.es.js +56 -59
  28. package/dist/bundle.es10.js +35 -84
  29. package/dist/bundle.es11.js +30 -72
  30. package/dist/bundle.es12.js +14 -34
  31. package/dist/bundle.es13.js +7 -30
  32. package/dist/bundle.es14.js +33 -16
  33. package/dist/bundle.es15.js +24 -8
  34. package/dist/bundle.es16.js +15 -27
  35. package/dist/bundle.es17.js +22 -25
  36. package/dist/bundle.es18.js +13 -21
  37. package/dist/bundle.es19.js +38 -22
  38. package/dist/bundle.es2.js +45 -0
  39. package/dist/bundle.es20.js +16 -13
  40. package/dist/bundle.es21.js +34 -39
  41. package/dist/bundle.es22.js +20 -15
  42. package/dist/bundle.es23.js +38 -32
  43. package/dist/bundle.es24.js +110 -20
  44. package/dist/bundle.es25.js +106 -34
  45. package/dist/bundle.es26.js +34 -110
  46. package/dist/bundle.es27.js +11 -113
  47. package/dist/bundle.es28.js +23 -34
  48. package/dist/bundle.es29.js +35 -10
  49. package/dist/bundle.es3.js +10 -42
  50. package/dist/bundle.es30.js +20 -21
  51. package/dist/bundle.es31.js +81 -36
  52. package/dist/bundle.es32.js +20 -0
  53. package/dist/bundle.es33.js +16 -0
  54. package/dist/bundle.es34.js +24 -0
  55. package/dist/bundle.es35.js +5 -41
  56. package/dist/bundle.es36.js +18 -437
  57. package/dist/bundle.es37.js +14 -22
  58. package/dist/bundle.es38.js +68 -22
  59. package/dist/bundle.es39.js +68 -81
  60. package/dist/bundle.es4.js +85 -12
  61. package/dist/bundle.es40.js +31 -17
  62. package/dist/bundle.es41.js +67 -13
  63. package/dist/{bundle.es53.js → bundle.es42.js} +1 -1
  64. package/dist/bundle.es43.js +31 -5
  65. package/dist/bundle.es44.js +74 -20
  66. package/dist/bundle.es45.js +47 -12
  67. package/dist/bundle.es5.js +82 -83
  68. package/dist/bundle.es6.js +74 -81
  69. package/dist/bundle.es7.js +26 -78
  70. package/dist/bundle.es8.js +80 -22
  71. package/dist/bundle.es9.js +71 -43
  72. package/dist/css-properties.scss +120 -0
  73. package/dist/{types/index.d.ts → index.d.ts} +0 -1
  74. package/dist/index.scss +25 -0
  75. package/dist/mixins.scss +100 -0
  76. package/dist/theme.scss +101 -0
  77. package/package.json +3 -3
  78. package/dist/bundle.es46.js +0 -72
  79. package/dist/bundle.es47.js +0 -70
  80. package/dist/bundle.es48.js +0 -34
  81. package/dist/bundle.es49.js +0 -70
  82. package/dist/bundle.es50.js +0 -33
  83. package/dist/bundle.es51.js +0 -78
  84. package/dist/bundle.es52.js +0 -51
  85. package/dist/bundle.es54.js +0 -40
  86. package/dist/bundle.es55.js +0 -36
  87. package/dist/bundle.es56.js +0 -9
  88. package/dist/bundle.es57.js +0 -9
  89. package/dist/bundle.es58.js +0 -7
  90. package/dist/bundle.es59.js +0 -9
  91. package/dist/bundle.es60.js +0 -8
  92. package/dist/bundle.es61.js +0 -19
  93. package/dist/bundle.es62.js +0 -15
  94. package/dist/bundle.es63.js +0 -22
  95. package/dist/bundle.es64.js +0 -45
  96. package/dist/bundle.es65.js +0 -28
  97. package/dist/bundle.es66.js +0 -34
  98. package/dist/bundle.es67.js +0 -6
  99. package/dist/bundle.es68.js +0 -12
  100. package/dist/bundle.es69.js +0 -47
  101. package/dist/bundle.es70.js +0 -11
  102. package/dist/bundle.es71.js +0 -18
  103. package/dist/bundle.es72.js +0 -32
  104. package/dist/bundle.es73.js +0 -35
  105. package/dist/bundle.es74.js +0 -6
  106. package/dist/bundle.es75.js +0 -7
  107. package/dist/bundle.es76.js +0 -7
  108. package/dist/bundle.es77.js +0 -11
  109. package/dist/bundle.es78.js +0 -17
  110. package/dist/bundle.es79.js +0 -7
  111. package/dist/bundle.es80.js +0 -17
  112. package/dist/bundle.es81.js +0 -25
  113. package/dist/uikit.css +0 -1
  114. /package/dist/{types/Button → Button}/index.d.ts +0 -0
  115. /package/dist/{types/ButtonGroup → ButtonGroup}/index.d.ts +0 -0
  116. /package/dist/{types/Checkbox → Checkbox}/index.d.ts +0 -0
  117. /package/dist/{types/Countdown → Countdown}/index.d.ts +0 -0
  118. /package/dist/{types/DateInput → DateInput}/index.d.ts +0 -0
  119. /package/dist/{types/DatePicker → DatePicker}/Calendar.d.ts +0 -0
  120. /package/dist/{types/DatePicker → DatePicker}/CalendarHeader.d.ts +0 -0
  121. /package/dist/{types/DatePicker → DatePicker}/index.d.ts +0 -0
  122. /package/dist/{types/Dialog → Dialog}/index.d.ts +0 -0
  123. /package/dist/{types/DialogAlert → DialogAlert}/Alert.d.ts +0 -0
  124. /package/dist/{types/DialogAlert → DialogAlert}/Viewport.d.ts +0 -0
  125. /package/dist/{types/DialogAlert → DialogAlert}/index.d.ts +0 -0
  126. /package/dist/{types/Drawer → Drawer}/index.d.ts +0 -0
  127. /package/dist/{types/File → File}/index.d.ts +0 -0
  128. /package/dist/{types/Form → Form}/index.d.ts +0 -0
  129. /package/dist/{types/Icon → Icon}/index.d.ts +0 -0
  130. /package/dist/{types/LoadButton → LoadButton}/index.d.ts +0 -0
  131. /package/dist/{types/NumberInput → NumberInput}/index.d.ts +0 -0
  132. /package/dist/{types/OptionItem → OptionItem}/OptionItem.d.ts +0 -0
  133. /package/dist/{types/OptionItem → OptionItem}/OptionsList.d.ts +0 -0
  134. /package/dist/{types/Popover → Popover}/index.d.ts +0 -0
  135. /package/dist/{types/Radio → Radio}/index.d.ts +0 -0
  136. /package/dist/{types/Scrollable → Scrollable}/ImitateScroll.d.ts +0 -0
  137. /package/dist/{types/Scrollable → Scrollable}/index.d.ts +0 -0
  138. /package/dist/{types/Select → Select}/SelectInput.d.ts +0 -0
  139. /package/dist/{types/Select → Select}/index.d.ts +0 -0
  140. /package/dist/{types/SelectTags → SelectTags}/index.d.ts +0 -0
  141. /package/dist/{types/Spinner → Spinner}/index.d.ts +0 -0
  142. /package/dist/{types/Stepper → Stepper}/index.d.ts +0 -0
  143. /package/dist/{types/Switch → Switch}/index.d.ts +0 -0
  144. /package/dist/{types/Tabs → Tabs}/index.d.ts +0 -0
  145. /package/dist/{types/TextArea → TextArea}/index.d.ts +0 -0
  146. /package/dist/{types/Toaster → Toaster}/RemoveListener.d.ts +0 -0
  147. /package/dist/{types/Toaster → Toaster}/Toast.d.ts +0 -0
  148. /package/dist/{types/Toaster → Toaster}/Viewport.d.ts +0 -0
  149. /package/dist/{types/Toaster → Toaster}/index.d.ts +0 -0
  150. /package/dist/{types/Tooltip → Tooltip}/index.d.ts +0 -0
  151. /package/dist/{types/__hooks → __hooks}/use-frooze-closing.d.ts +0 -0
  152. /package/dist/{types/__hooks → __hooks}/use-loading.d.ts +0 -0
  153. /package/dist/{types/__hooks → __hooks}/use-local-storage.d.ts +0 -0
  154. /package/dist/{types/__hooks → __hooks}/use-popover-position.d.ts +0 -0
  155. /package/dist/{types/__hooks → __hooks}/use-previos.d.ts +0 -0
  156. /package/dist/{types/__hooks → __hooks}/use-resize.d.ts +0 -0
  157. /package/dist/{types/__hooks → __hooks}/use-scrollbox.d.ts +0 -0
  158. /package/dist/{types/__hooks → __hooks}/use-stepper-input.d.ts +0 -0
  159. /package/dist/{types/__hooks → __hooks}/use-update.d.ts +0 -0
  160. /package/dist/{types/__hooks → __hooks}/useCalendar.d.ts +0 -0
  161. /package/dist/{types/__hooks → __hooks}/useCalendarOptions-copy.d.ts +0 -0
  162. /package/dist/{types/__hooks → __hooks}/useCalendarOptions.d.ts +0 -0
  163. /package/dist/{types/__libs → __libs}/calendar.d.ts +0 -0
  164. /package/dist/{types/__utils → __utils}/utils.d.ts +0 -0
  165. /package/dist/{types/types.d.ts → types.d.ts} +0 -0
@@ -1,70 +0,0 @@
1
- import { jsxs as T, jsx as $ } from "react/jsx-runtime";
2
- import { forwardRef as b, useState as I, useMemo as P, useImperativeHandle as R, useCallback as j, createElement as k } from "react";
3
- import * as c from "@radix-ui/react-toast";
4
- import { varToStyle as w } from "@companix/utils-browser";
5
- import { Toast as C } from "./bundle.es53.js";
6
- var g = /* @__PURE__ */ ((e) => (e["top-center"] = "up", e["top-left"] = "left", e["top-right"] = "right", e["bottom-center"] = "down", e["bottom-left"] = "left", e["bottom-right"] = "right", e))(g || {});
7
- const M = b((e, h) => {
8
- const { side: f = "top", align: i = "center", gap: m = 14, duration: u, swipeThreshold: v, closeIcon: x } = e, [l, p] = I([]), o = P(() => ({}), []);
9
- R(
10
- h,
11
- () => ({
12
- addToast: (t) => {
13
- p((r) => [...r, t]);
14
- }
15
- }),
16
- []
17
- );
18
- const d = j((t) => {
19
- t.forEach(({ id: r }, a) => {
20
- let s = 0;
21
- for (let n = a + 1; n < t.length; n++)
22
- o[t[n].id] && (s += o[t[n].id].clientHeight + m);
23
- o[r] && o[r].style.setProperty("--offset", `${s}px`);
24
- });
25
- }, []), y = (t) => {
26
- p((r) => {
27
- const a = [...r], s = a.findIndex((n) => n.id === t);
28
- return s !== -1 && a.splice(s, 1), a;
29
- });
30
- };
31
- return /* @__PURE__ */ T(
32
- c.Provider,
33
- {
34
- duration: u,
35
- swipeThreshold: v,
36
- swipeDirection: g[`${f}-${i}`],
37
- children: [
38
- l.map(({ id: t, ...r }) => /* @__PURE__ */ k(
39
- C,
40
- {
41
- ...r,
42
- key: `toaster-${t}`,
43
- closeIcon: x,
44
- onInitialized: (a) => {
45
- o[t] = a, d(l);
46
- },
47
- onRemoving: () => {
48
- delete o[t], d(l);
49
- },
50
- onRemoved: () => {
51
- o[t] && delete o[t], y(t);
52
- }
53
- }
54
- )),
55
- /* @__PURE__ */ $(
56
- c.Viewport,
57
- {
58
- "data-side": f,
59
- "data-align": i,
60
- className: "toaster-viewport",
61
- style: w({ "--toasters-gap": `${m}px` })
62
- }
63
- )
64
- ]
65
- }
66
- );
67
- });
68
- export {
69
- M as Viewport
70
- };
@@ -1,33 +0,0 @@
1
- import { clamp as a } from "@companix/utils-browser";
2
- const D = (t, e) => new Date(e, t, 0).getDate(), g = (t, e) => new Date(e, t - 1, 1).getDay(), i = (t) => t === 0 ? 6 : t - 1, u = (t) => new Array(t).fill(0), h = (t) => ({
3
- day: t.getDate(),
4
- month: t.getMonth() + 1,
5
- year: t.getFullYear()
6
- }), y = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], s = 9999, c = 100, f = (t, e) => {
7
- const o = [], n = a(t - e, c, s), l = a(t + e, c, s);
8
- for (let r = n; r <= l; r++)
9
- o.push({ title: String(r).padStart(4, "0"), value: r });
10
- return o;
11
- }, p = (t) => {
12
- const e = [], o = new Intl.DateTimeFormat(t, {
13
- month: "long"
14
- });
15
- for (let n = 0; n < 12; n++)
16
- e.push({
17
- title: o.format(new Date(2023, n, 15)),
18
- value: n
19
- });
20
- return e;
21
- };
22
- export {
23
- s as DEFAULT_MAX_YEAR,
24
- c as DEFAULT_MIN_YEAR,
25
- u as createVoids,
26
- h as dateToFormat,
27
- i as getDayIndex,
28
- g as getFirstDay,
29
- D as getMonthMaxDay,
30
- p as getMonths,
31
- f as getYears,
32
- y as weeks
33
- };
@@ -1,78 +0,0 @@
1
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
- import { useCallback as u, useMemo as h } from "react";
3
- /* empty css */
4
- import { Select as p } from "./bundle.es10.js";
5
- import { getMonths as k, getYears as z, DEFAULT_MAX_YEAR as f, DEFAULT_MIN_YEAR as g } from "./bundle.es50.js";
6
- import { Icon as C } from "./bundle.es37.js";
7
- import { faChevronLeft as E, faChevronRight as T } from "@fortawesome/free-solid-svg-icons";
8
- import { setMonth as _, setYear as F } from "./bundle.es47.js";
9
- const S = ({
10
- viewDate: n,
11
- onChange: c,
12
- isMonthDisabled: a,
13
- isYearDisabled: m,
14
- onNextMonth: N,
15
- onPrevMonth: v
16
- }) => {
17
- const e = n.getFullYear(), r = n.getMonth(), s = "ru", M = u(
18
- (t) => {
19
- c(_(n, t));
20
- },
21
- [c, n]
22
- ), x = u(
23
- (t) => {
24
- c(F(n, t));
25
- },
26
- [c, n]
27
- ), A = h(() => k(s).map((t) => ({
28
- ...t,
29
- className: "capitalize",
30
- disabled: a && a(t.value)
31
- })), [s, a]), Y = h(() => z(e, 100).map((t) => ({
32
- ...t,
33
- disabled: m && m(t.value)
34
- })), [e, m]);
35
- let l = r === 11 && e === f;
36
- a && !l && (l = a(
37
- r === 11 ? 0 : r + 1,
38
- r === 11 ? Math.min(e + 1, f) : e
39
- ));
40
- let i = r === 0 && e === g;
41
- return a && !i && (i = a(
42
- r === 0 ? 11 : r - 1,
43
- r === 0 ? Math.max(e - 1, g) : e
44
- )), /* @__PURE__ */ d("div", { className: "calendar-header", children: [
45
- !i && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "left", onClick: v, children: /* @__PURE__ */ o(C, { icon: E }) }),
46
- /* @__PURE__ */ d("div", { className: "calendar-pickers", children: [
47
- /* @__PURE__ */ o(
48
- p,
49
- {
50
- fill: !0,
51
- options: Y,
52
- size: "sm",
53
- value: e,
54
- minimalOptions: !0,
55
- matchTarget: "min-width",
56
- onChange: (t) => x(t || 0)
57
- }
58
- ),
59
- /* @__PURE__ */ o(
60
- p,
61
- {
62
- fill: !0,
63
- options: A,
64
- size: "sm",
65
- className: "capitalize",
66
- value: r,
67
- minimalOptions: !0,
68
- matchTarget: "min-width",
69
- onChange: (t) => M(t || 0)
70
- }
71
- )
72
- ] }),
73
- !l && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "right", onClick: N, children: /* @__PURE__ */ o(C, { icon: T }) })
74
- ] });
75
- };
76
- export {
77
- S as CalendarHeader
78
- };
@@ -1,51 +0,0 @@
1
- import { subMonths as L, addMonths as N, useDayDisableCheker as R } from "./bundle.es47.js";
2
- import { DEFAULT_MIN_YEAR as w, DEFAULT_MAX_YEAR as A } from "./bundle.es50.js";
3
- import { useState as U, useCallback as M } from "react";
4
- const X = ({
5
- value: p,
6
- disablePast: r,
7
- disableFuture: c,
8
- shouldDisableDate: E,
9
- minDateTime: l,
10
- maxDateTime: s
11
- }) => {
12
- const [e, u] = U(p || /* @__PURE__ */ new Date()), _ = M(() => {
13
- u(L(e));
14
- }, [e]), C = M(() => {
15
- u(N(e, 1));
16
- }, [e]), D = R({
17
- disableFuture: c,
18
- disablePast: r,
19
- shouldDisableDate: E,
20
- minDateTime: l,
21
- maxDateTime: s
22
- }), k = M(
23
- (o, t) => {
24
- const n = /* @__PURE__ */ new Date();
25
- t = t || e.getFullYear();
26
- const h = l ? l.getMonth() : 0, Y = s ? s.getMonth() : 11, F = l?.getFullYear() || w, f = s?.getFullYear() || A;
27
- let g = t >= F && t <= f ? t === F && h > o || t === f && o > Y : !0;
28
- return c && (g = g || (t === n.getFullYear() ? o > n.getMonth() : t > n.getFullYear())), r && (g = g || (t === n.getFullYear() ? o < n.getMonth() : t < n.getFullYear())), g;
29
- },
30
- [c, r, e, l, s]
31
- ), v = M(
32
- (o) => {
33
- const t = /* @__PURE__ */ new Date(), n = l?.getFullYear() || w, h = s?.getFullYear() || A;
34
- let Y = n > o || o > h;
35
- return c && (Y = Y || o > t.getFullYear()), r && (Y = Y || o < t.getFullYear()), Y;
36
- },
37
- [c, r, l, s]
38
- );
39
- return {
40
- viewDate: e,
41
- setViewDate: u,
42
- setPrevMonth: _,
43
- setNextMonth: C,
44
- isDayDisabled: D,
45
- isMonthDisabled: k,
46
- isYearDisabled: v
47
- };
48
- };
49
- export {
50
- X as useCalendar
51
- };
@@ -1,40 +0,0 @@
1
- import { getOwnerWindow as l } from "./bundle.es62.js";
2
- import { focusWithoutScrolling as f } from "./bundle.es64.js";
3
- import { isFocusable as p } from "./bundle.es72.js";
4
- import "react";
5
- function E(t) {
6
- let e = t;
7
- return e.nativeEvent = t, e.isDefaultPrevented = () => e.defaultPrevented, e.isPropagationStopped = () => e.cancelBubble, e.persist = () => {
8
- }, e;
9
- }
10
- function P(t, e) {
11
- Object.defineProperty(t, "target", {
12
- value: e
13
- }), Object.defineProperty(t, "currentTarget", {
14
- value: e
15
- });
16
- }
17
- function L(t) {
18
- for (; t && !p(t); ) t = t.parentElement;
19
- let e = l(t), n = e.document.activeElement;
20
- if (!n || n === t) return;
21
- let o = !1, i = (r) => {
22
- (r.target === n || o) && r.stopImmediatePropagation();
23
- }, c = (r) => {
24
- (r.target === n || o) && (r.stopImmediatePropagation(), !t && !o && (o = !0, f(n), a()));
25
- }, u = (r) => {
26
- (r.target === t || o) && r.stopImmediatePropagation();
27
- }, s = (r) => {
28
- (r.target === t || o) && (r.stopImmediatePropagation(), o || (o = !0, f(n), a()));
29
- };
30
- e.addEventListener("blur", i, !0), e.addEventListener("focusout", c, !0), e.addEventListener("focusin", s, !0), e.addEventListener("focus", u, !0);
31
- let a = () => {
32
- cancelAnimationFrame(d), e.removeEventListener("blur", i, !0), e.removeEventListener("focusout", c, !0), e.removeEventListener("focusin", s, !0), e.removeEventListener("focus", u, !0), o = !1;
33
- }, d = requestAnimationFrame(a);
34
- return a;
35
- }
36
- export {
37
- E as createSyntheticEvent,
38
- L as preventFocus,
39
- P as setEventTarget
40
- };
@@ -1,36 +0,0 @@
1
- import { getOwnerDocument as i } from "./bundle.es62.js";
2
- import { runAfterTransition as f } from "./bundle.es73.js";
3
- import { isIOS as o } from "./bundle.es69.js";
4
- let l = "default", s = "", n = /* @__PURE__ */ new WeakMap();
5
- function m(e) {
6
- if (o()) {
7
- if (l === "default") {
8
- const t = i(e);
9
- s = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
10
- }
11
- l = "disabled";
12
- } else if (e instanceof HTMLElement || e instanceof SVGElement) {
13
- let t = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
14
- n.set(e, e.style[t]), e.style[t] = "none";
15
- }
16
- }
17
- function $(e) {
18
- if (o()) {
19
- if (l !== "disabled") return;
20
- l = "restoring", setTimeout(() => {
21
- f(() => {
22
- if (l === "restoring") {
23
- const t = i(e);
24
- t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = s || ""), s = "", l = "default";
25
- }
26
- });
27
- }, 300);
28
- } else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && n.has(e)) {
29
- let t = n.get(e), c = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
30
- e.style[c] === "none" && (e.style[c] = t), e.getAttribute("style") === "" && e.removeAttribute("style"), n.delete(e);
31
- }
32
- }
33
- export {
34
- m as disableTextSelection,
35
- $ as restoreTextSelection
36
- };
@@ -1,9 +0,0 @@
1
- import e from "react";
2
- const t = e.createContext({
3
- register: () => {
4
- }
5
- });
6
- t.displayName = "PressResponderContext";
7
- export {
8
- t as PressResponderContext
9
- };
@@ -1,9 +0,0 @@
1
- import { _ as s } from "./bundle.es74.js";
2
- import { _ as a } from "./bundle.es75.js";
3
- function p(_, r) {
4
- var t = a(_, r, "get");
5
- return s(_, t);
6
- }
7
- export {
8
- p as _
9
- };
@@ -1,7 +0,0 @@
1
- import { _ as t } from "./bundle.es76.js";
2
- function a(_, e, i) {
3
- t(_, e), e.set(_, i);
4
- }
5
- export {
6
- a as _
7
- };
@@ -1,9 +0,0 @@
1
- import { _ as a } from "./bundle.es77.js";
2
- import { _ as o } from "./bundle.es75.js";
3
- function i(s, r, _) {
4
- var t = o(s, r, "set");
5
- return a(s, t, _), _;
6
- }
7
- export {
8
- i as _
9
- };
@@ -1,8 +0,0 @@
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
- };
@@ -1,19 +0,0 @@
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
- };
@@ -1,15 +0,0 @@
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
- };
@@ -1,22 +0,0 @@
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
- };
@@ -1,45 +0,0 @@
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
- };
@@ -1,28 +0,0 @@
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
- };
@@ -1,34 +0,0 @@
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
- };
@@ -1,6 +0,0 @@
1
- import e from "react";
2
- const c = typeof document < "u" ? e.useLayoutEffect : () => {
3
- };
4
- export {
5
- c as useLayoutEffect
6
- };
@@ -1,12 +0,0 @@
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
- };
@@ -1,47 +0,0 @@
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
- };
@@ -1,11 +0,0 @@
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
- };
@@ -1,18 +0,0 @@
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
- };
@@ -1,32 +0,0 @@
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
- };