mimir-ui-kit 1.14.0 → 1.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. package/README.md +62 -62
  2. package/dist/DatePickerModal-BM0BgzTb.js +204 -0
  3. package/dist/{NavigationButtons-B8tMfqrg.js → NavigationButtons-DuOoqaPo.js} +20 -20
  4. package/dist/assets/Accordion.css +1 -0
  5. package/dist/assets/AccordionItem.css +1 -0
  6. package/dist/assets/Button.css +1 -1
  7. package/dist/assets/DatePickerModal.css +1 -0
  8. package/dist/assets/Drawer.css +1 -0
  9. package/dist/assets/Input.css +1 -1
  10. package/dist/assets/ListPhotos.css +1 -0
  11. package/dist/assets/MergedButton.css +1 -1
  12. package/dist/assets/OtpInput.css +1 -1
  13. package/dist/assets/Pagination.css +1 -0
  14. package/dist/assets/RadioGroup.css +1 -1
  15. package/dist/assets/SelectSearch.css +1 -0
  16. package/dist/assets/Slider.css +1 -1
  17. package/dist/assets/Switch.css +1 -0
  18. package/dist/assets/TabTrail.css +1 -0
  19. package/dist/assets/Tag.css +1 -0
  20. package/dist/assets/Timer.css +1 -0
  21. package/dist/assets/Uploader.css +1 -0
  22. package/dist/assets/UploaderPhotos.css +1 -0
  23. package/dist/assets/index.css +1 -1
  24. package/dist/bugs-CSBdWk0R.js +18 -0
  25. package/dist/components/Accordion/Accordion.d.ts +10 -0
  26. package/dist/components/Accordion/Accordion.js +176 -0
  27. package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +8 -0
  28. package/dist/components/Accordion/AccordionItem/AccordionItem.js +16 -0
  29. package/dist/components/Accordion/AccordionItem/index.d.ts +1 -0
  30. package/dist/components/Accordion/AccordionItem/index.js +4 -0
  31. package/dist/components/Accordion/constants.d.ts +8 -0
  32. package/dist/components/Accordion/constants.js +14 -0
  33. package/dist/components/Accordion/index.d.ts +3 -0
  34. package/dist/components/Accordion/index.js +8 -0
  35. package/dist/components/Button/Button.d.ts +0 -1
  36. package/dist/components/Button/Button.js +26 -25
  37. package/dist/components/Button/constants.d.ts +2 -1
  38. package/dist/components/Button/constants.js +1 -0
  39. package/dist/components/DatePicker/DatePicker.d.ts +44 -0
  40. package/dist/components/DatePicker/DatePicker.js +69 -0
  41. package/dist/components/DatePicker/DatePickerModal.d.ts +8 -0
  42. package/dist/components/DatePicker/DatePickerModal.js +9 -0
  43. package/dist/components/DatePicker/constants.d.ts +6 -0
  44. package/dist/components/DatePicker/constants.js +11 -0
  45. package/dist/components/DatePicker/index.d.ts +2 -0
  46. package/dist/components/DatePicker/index.js +4 -0
  47. package/dist/components/Drawer/Drawer.d.ts +42 -0
  48. package/dist/components/Drawer/Drawer.js +145 -0
  49. package/dist/components/Drawer/constants.d.ts +5 -0
  50. package/dist/components/Drawer/constants.js +9 -0
  51. package/dist/components/Drawer/index.d.ts +2 -0
  52. package/dist/components/Drawer/index.js +6 -0
  53. package/dist/components/Input/Input.d.ts +2 -2
  54. package/dist/components/Input/Input.js +17 -16
  55. package/dist/components/InputPassword/InputPassword.js +2 -2
  56. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  57. package/dist/components/ListPhotos/ListPhotos.d.ts +23 -0
  58. package/dist/components/ListPhotos/ListPhotos.js +33 -0
  59. package/dist/components/ListPhotos/constants.d.ts +3 -0
  60. package/dist/components/ListPhotos/constants.js +21 -0
  61. package/dist/components/ListPhotos/index.d.ts +2 -0
  62. package/dist/components/ListPhotos/index.js +4 -0
  63. package/dist/components/MergedButton/MergedButton.d.ts +1 -1
  64. package/dist/components/MergedButton/MergedButton.js +17 -19
  65. package/dist/components/OtpInput/OtpInput.js +6 -6
  66. package/dist/components/Pagination/Pagination.d.ts +42 -0
  67. package/dist/components/Pagination/Pagination.js +220 -0
  68. package/dist/components/Pagination/constants.d.ts +2 -0
  69. package/dist/components/Pagination/constants.js +6 -0
  70. package/dist/components/Pagination/index.d.ts +1 -0
  71. package/dist/components/Pagination/index.js +4 -0
  72. package/dist/components/Pagination/types.d.ts +0 -0
  73. package/dist/components/Pagination/types.js +1 -0
  74. package/dist/components/Portal/Portal.d.ts +7 -0
  75. package/dist/components/Portal/Portal.js +10 -0
  76. package/dist/components/Portal/index.d.ts +1 -0
  77. package/dist/components/Portal/index.js +4 -0
  78. package/dist/components/RadioGroup/RadioGroup.d.ts +18 -2
  79. package/dist/components/RadioGroup/RadioGroup.js +130 -1061
  80. package/dist/components/RadioGroup/index.d.ts +1 -1
  81. package/dist/components/SelectSearch/SelectSearch.d.ts +15 -0
  82. package/dist/components/SelectSearch/SelectSearch.js +3876 -0
  83. package/dist/components/SelectSearch/constants.d.ts +4 -0
  84. package/dist/components/SelectSearch/constants.js +8 -0
  85. package/dist/components/SelectSearch/index.d.ts +2 -0
  86. package/dist/components/SelectSearch/index.js +6 -0
  87. package/dist/components/Slider/NavigationButtons/NavigationButtons.js +1 -1
  88. package/dist/components/Slider/NavigationButtons/index.js +1 -1
  89. package/dist/components/Slider/Slider.js +10 -10
  90. package/dist/components/Switch/Switch.d.ts +294 -0
  91. package/dist/components/Switch/Switch.js +59 -0
  92. package/dist/components/Switch/index.d.ts +2 -0
  93. package/dist/components/Switch/index.js +4 -0
  94. package/dist/components/TabTrail/TabButtons/TabButtons.d.ts +8 -0
  95. package/dist/components/TabTrail/TabButtons/TabButtons.js +29 -0
  96. package/dist/components/TabTrail/TabButtons/constants.d.ts +8 -0
  97. package/dist/components/TabTrail/TabButtons/constants.js +14 -0
  98. package/dist/components/TabTrail/TabButtons/index.d.ts +1 -0
  99. package/dist/components/TabTrail/TabButtons/index.js +4 -0
  100. package/dist/components/TabTrail/TabTrail.d.ts +11 -0
  101. package/dist/components/TabTrail/TabTrail.js +282 -0
  102. package/dist/components/TabTrail/constants.d.ts +4 -0
  103. package/dist/components/TabTrail/constants.js +8 -0
  104. package/dist/components/TabTrail/index.d.ts +2 -0
  105. package/dist/components/TabTrail/index.js +6 -0
  106. package/dist/components/Tag/Tag.d.ts +20 -57
  107. package/dist/components/Tag/Tag.js +39 -84
  108. package/dist/components/Tag/constants.d.ts +5 -37
  109. package/dist/components/Tag/constants.js +13 -53
  110. package/dist/components/Tag/index.d.ts +2 -3
  111. package/dist/components/Tag/index.js +5 -6
  112. package/dist/components/Tag/types.d.ts +0 -6
  113. package/dist/components/Timer/Timer.d.ts +24 -0
  114. package/dist/components/Timer/Timer.js +29 -0
  115. package/dist/components/Timer/index.d.ts +1 -0
  116. package/dist/components/Timer/index.js +4 -0
  117. package/dist/components/Uploader/Uploader.d.ts +30 -0
  118. package/dist/components/Uploader/Uploader.js +90 -0
  119. package/dist/components/Uploader/constants.d.ts +5 -0
  120. package/dist/components/Uploader/constants.js +16 -0
  121. package/dist/components/Uploader/index.d.ts +2 -0
  122. package/dist/components/Uploader/index.js +4 -0
  123. package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +29 -0
  124. package/dist/components/UploaderPhotos/UploaderPhotos.js +46 -0
  125. package/dist/components/UploaderPhotos/index.d.ts +2 -0
  126. package/dist/components/UploaderPhotos/index.js +4 -0
  127. package/dist/components/index.d.ts +16 -1
  128. package/dist/components/index.js +31 -0
  129. package/dist/focus-management-1rQPII7Z.js +77 -0
  130. package/dist/hidden-BuVoeHNy.js +13 -0
  131. package/dist/hooks/index.d.ts +3 -0
  132. package/dist/hooks/index.js +7 -1
  133. package/dist/hooks/useClickOutside/index.d.ts +1 -0
  134. package/dist/hooks/useClickOutside/index.js +4 -0
  135. package/dist/hooks/useClickOutside/useClickOutside.d.ts +7 -0
  136. package/dist/hooks/useClickOutside/useClickOutside.js +25 -0
  137. package/dist/hooks/useInterval/index.d.ts +1 -0
  138. package/dist/hooks/useInterval/index.js +4 -0
  139. package/dist/hooks/useInterval/useInterval.d.ts +1 -0
  140. package/dist/hooks/useInterval/useInterval.js +17 -0
  141. package/dist/hooks/useLockBodyScroll/index.d.ts +1 -0
  142. package/dist/hooks/useLockBodyScroll/index.js +4 -0
  143. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.d.ts +6 -0
  144. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.js +20 -0
  145. package/dist/hooks/useTimer/index.d.ts +18 -0
  146. package/dist/hooks/useTimer/index.js +83 -0
  147. package/dist/hooks/useTimer/useTimer.d.ts +18 -0
  148. package/dist/hooks/useTimer/useTimer.js +87 -0
  149. package/dist/hooks/useTimer/utils.d.ts +24 -0
  150. package/dist/hooks/useTimer/utils.js +88 -0
  151. package/dist/hooks/useWindowSize/index.d.ts +4 -0
  152. package/dist/hooks/useWindowSize/index.js +26 -0
  153. package/dist/icons/Icon.js +1 -1
  154. package/dist/icons/components/12px/Close12px.d.ts +4 -0
  155. package/dist/icons/components/12px/Close12px.js +18 -0
  156. package/dist/icons/components/index.d.ts +1 -0
  157. package/dist/icons/components/index.js +560 -559
  158. package/dist/{index-_ACzPKPw.js → index-Cxiikb7g.js} +561 -558
  159. package/dist/index.d.ts +1 -0
  160. package/dist/index.js +40 -1
  161. package/dist/keyboard-B256ZoM-.js +745 -0
  162. package/dist/label-C_5Syaoj.js +159 -0
  163. package/dist/open-closed-CbXq00et.js +93 -0
  164. package/dist/use-active-press-B6yeSopF.js +31 -0
  165. package/dist/use-by-comparator-BUO78DGe.js +16 -0
  166. package/dist/use-resolve-button-type-B6LE6gU3.js +19 -0
  167. package/dist/utils/UUID4.d.ts +1 -0
  168. package/dist/utils/UUID4.js +9 -0
  169. package/dist/utils/formating/Date.d.ts +1 -0
  170. package/dist/utils/formating/Date.js +26 -0
  171. package/dist/utils/formating/Month.d.ts +8 -0
  172. package/dist/utils/formating/Month.js +80 -0
  173. package/dist/utils/formating/Numbers.d.ts +6 -0
  174. package/dist/utils/formating/Numbers.js +8 -0
  175. package/dist/utils/index.d.ts +11 -0
  176. package/dist/utils/index.js +13 -0
  177. package/package.json +128 -128
@@ -0,0 +1,159 @@
1
+ import React__default, { createContext, useContext, useState, useRef, useEffect, useMemo, useId } from "react";
2
+ import { o as o$1, p as p$1, m, W, y, n, H } from "./keyboard-B256ZoM-.js";
3
+ import { createPortal } from "react-dom";
4
+ import { T as T$1, s } from "./hidden-BuVoeHNy.js";
5
+ let e$2 = createContext(void 0);
6
+ function a$1() {
7
+ return useContext(e$2);
8
+ }
9
+ function T(l2, r, c2) {
10
+ let [i, s2] = useState(c2), e2 = l2 !== void 0, t = useRef(e2), u2 = useRef(false), d = useRef(false);
11
+ return e2 && !t.current && !u2.current ? (u2.current = true, t.current = e2, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !e2 && t.current && !d.current && (d.current = true, t.current = e2, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [e2 ? l2 : i, o$1((n2) => (e2 || s2(n2), r == null ? void 0 : r(n2)))];
12
+ }
13
+ function l(e2) {
14
+ let [t] = useState(e2);
15
+ return t;
16
+ }
17
+ function e$1(i = {}, s2 = null, t = []) {
18
+ for (let [r, n2] of Object.entries(i)) o(t, f$2(s2, r), n2);
19
+ return t;
20
+ }
21
+ function f$2(i, s2) {
22
+ return i ? i + "[" + s2 + "]" : s2;
23
+ }
24
+ function o(i, s2, t) {
25
+ if (Array.isArray(t)) for (let [r, n2] of t.entries()) o(i, f$2(s2, r.toString()), n2);
26
+ else t instanceof Date ? i.push([s2, t.toISOString()]) : typeof t == "boolean" ? i.push([s2, t ? "1" : "0"]) : typeof t == "string" ? i.push([s2, t]) : typeof t == "number" ? i.push([s2, `${t}`]) : t == null ? i.push([s2, ""]) : e$1(t, s2, i);
27
+ }
28
+ function p(i) {
29
+ var t, r;
30
+ let s2 = (t = i == null ? void 0 : i.form) != null ? t : i.closest("form");
31
+ if (s2) {
32
+ for (let n2 of s2.elements) if (n2 !== i && (n2.tagName === "INPUT" && n2.type === "submit" || n2.tagName === "BUTTON" && n2.type === "submit" || n2.nodeName === "INPUT" && n2.type === "image")) {
33
+ n2.click();
34
+ return;
35
+ }
36
+ (r = s2.requestSubmit) == null || r.call(s2);
37
+ }
38
+ }
39
+ let f$1 = createContext(null);
40
+ function c$1({ children: t }) {
41
+ let e2 = useContext(f$1);
42
+ if (!e2) return React__default.createElement(React__default.Fragment, null, t);
43
+ let { target: r } = e2;
44
+ return r ? createPortal(React__default.createElement(React__default.Fragment, null, t), r) : null;
45
+ }
46
+ function j({ data: t, form: e2, disabled: r, onReset: n2, overrides: F }) {
47
+ let [i, a2] = useState(null), p2 = p$1();
48
+ return useEffect(() => {
49
+ if (n2 && i) return p2.addEventListener(i, "reset", n2);
50
+ }, [i, e2, n2]), React__default.createElement(c$1, null, React__default.createElement(C$1, { setForm: a2, formId: e2 }), e$1(t).map(([s$1, v]) => React__default.createElement(T$1, { features: s.Hidden, ...m({ key: s$1, as: "input", type: "hidden", hidden: true, readOnly: true, form: e2, disabled: r, name: s$1, value: v, ...F }) })));
51
+ }
52
+ function C$1({ setForm: t, formId: e2 }) {
53
+ return useEffect(() => {
54
+ if (e2) {
55
+ let r = document.getElementById(e2);
56
+ r && t(r);
57
+ }
58
+ }, [t, e2]), e2 ? null : React__default.createElement(T$1, { features: s.Hidden, as: "input", type: "hidden", hidden: true, readOnly: true, ref: (r) => {
59
+ if (!r) return;
60
+ let n2 = r.closest("form");
61
+ n2 && t(n2);
62
+ } });
63
+ }
64
+ let e = createContext(void 0);
65
+ function u() {
66
+ return useContext(e);
67
+ }
68
+ let a = createContext(null);
69
+ a.displayName = "DescriptionContext";
70
+ function f() {
71
+ let r = useContext(a);
72
+ if (r === null) {
73
+ let e2 = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
74
+ throw Error.captureStackTrace && Error.captureStackTrace(e2, f), e2;
75
+ }
76
+ return r;
77
+ }
78
+ function G$1() {
79
+ var r, e2;
80
+ return (e2 = (r = useContext(a)) == null ? void 0 : r.value) != null ? e2 : void 0;
81
+ }
82
+ function U$1() {
83
+ let [r, e2] = useState([]);
84
+ return [r.length > 0 ? r.join(" ") : void 0, useMemo(() => function(t) {
85
+ let i = o$1((n2) => (e2((s2) => [...s2, n2]), () => e2((s2) => {
86
+ let o2 = s2.slice(), p2 = o2.indexOf(n2);
87
+ return p2 !== -1 && o2.splice(p2, 1), o2;
88
+ }))), l2 = useMemo(() => ({ register: i, slot: t.slot, name: t.name, props: t.props, value: t.value }), [i, t.slot, t.name, t.props, t.value]);
89
+ return React__default.createElement(a.Provider, { value: l2 }, t.children);
90
+ }, [e2])];
91
+ }
92
+ let S = "p";
93
+ function C(r, e2) {
94
+ let d = useId(), t = a$1(), { id: i = `headlessui-description-${d}`, ...l2 } = r, n$1 = f(), s2 = y(e2);
95
+ n(() => n$1.register(i), [i, n$1.register]);
96
+ let o2 = t || false, p2 = useMemo(() => ({ ...n$1.slot, disabled: o2 }), [n$1.slot, o2]), D = { ref: s2, ...n$1.props, id: i };
97
+ return H({ ourProps: D, theirProps: l2, slot: p2, defaultTag: S, name: n$1.name || "Description" });
98
+ }
99
+ let _ = W(C), w = Object.assign(_, {});
100
+ let c = createContext(null);
101
+ c.displayName = "LabelContext";
102
+ function P() {
103
+ let r = useContext(c);
104
+ if (r === null) {
105
+ let l2 = new Error("You used a <Label /> component, but it is not inside a relevant parent.");
106
+ throw Error.captureStackTrace && Error.captureStackTrace(l2, P), l2;
107
+ }
108
+ return r;
109
+ }
110
+ function I(r) {
111
+ var a2, e2, o2;
112
+ let l2 = (e2 = (a2 = useContext(c)) == null ? void 0 : a2.value) != null ? e2 : void 0;
113
+ return ((o2 = r == null ? void 0 : r.length) != null ? o2 : 0) > 0 ? [l2, ...r].filter(Boolean).join(" ") : l2;
114
+ }
115
+ function z({ inherit: r = false } = {}) {
116
+ let l2 = I(), [a2, e2] = useState([]), o2 = r ? [l2, ...a2].filter(Boolean) : a2;
117
+ return [o2.length > 0 ? o2.join(" ") : void 0, useMemo(() => function(t) {
118
+ let s2 = o$1((i) => (e2((p2) => [...p2, i]), () => e2((p2) => {
119
+ let u2 = p2.slice(), d = u2.indexOf(i);
120
+ return d !== -1 && u2.splice(d, 1), u2;
121
+ }))), m2 = useMemo(() => ({ register: s2, slot: t.slot, name: t.name, props: t.props, value: t.value }), [s2, t.slot, t.name, t.props, t.value]);
122
+ return React__default.createElement(c.Provider, { value: m2 }, t.children);
123
+ }, [e2])];
124
+ }
125
+ let N = "label";
126
+ function G(r, l2) {
127
+ var y$1;
128
+ let a2 = useId(), e2 = P(), o2 = u(), g = a$1(), { id: t = `headlessui-label-${a2}`, htmlFor: s2 = o2 != null ? o2 : (y$1 = e2.props) == null ? void 0 : y$1.htmlFor, passive: m2 = false, ...i } = r, p2 = y(l2);
129
+ n(() => e2.register(t), [t, e2.register]);
130
+ let u$1 = o$1((L) => {
131
+ let b = L.currentTarget;
132
+ if (b instanceof HTMLLabelElement && L.preventDefault(), e2.props && "onClick" in e2.props && typeof e2.props.onClick == "function" && e2.props.onClick(L), b instanceof HTMLLabelElement) {
133
+ let n2 = document.getElementById(b.htmlFor);
134
+ if (n2) {
135
+ let E = n2.getAttribute("disabled");
136
+ if (E === "true" || E === "") return;
137
+ let x = n2.getAttribute("aria-disabled");
138
+ if (x === "true" || x === "") return;
139
+ (n2 instanceof HTMLInputElement && (n2.type === "radio" || n2.type === "checkbox") || n2.role === "radio" || n2.role === "checkbox" || n2.role === "switch") && n2.click(), n2.focus({ preventScroll: true });
140
+ }
141
+ }
142
+ }), d = g || false, C2 = useMemo(() => ({ ...e2.slot, disabled: d }), [e2.slot, d]), f2 = { ref: p2, ...e2.props, id: t, htmlFor: s2, onClick: u$1 };
143
+ return m2 && ("onClick" in f2 && (delete f2.htmlFor, delete f2.onClick), "onClick" in i && delete i.onClick), H({ ourProps: f2, theirProps: i, slot: C2, defaultTag: s2 ? N : "div", name: e2.name || "Label" });
144
+ }
145
+ let U = W(G), K = Object.assign(U, {});
146
+ export {
147
+ G$1 as G,
148
+ I,
149
+ K,
150
+ T,
151
+ U$1 as U,
152
+ a$1 as a,
153
+ j,
154
+ l,
155
+ p,
156
+ u,
157
+ w,
158
+ z
159
+ };
@@ -0,0 +1,93 @@
1
+ import React__default, { useState, useCallback, useRef, createContext, useContext } from "react";
2
+ import { p, n as n$1, d as o } from "./keyboard-B256ZoM-.js";
3
+ function l(r) {
4
+ let e = { called: false };
5
+ return (...t) => {
6
+ if (!e.called) return e.called = true, r(...t);
7
+ };
8
+ }
9
+ function c$1(u2 = 0) {
10
+ let [t, l2] = useState(u2), g = useCallback((e) => l2(e), [t]), s2 = useCallback((e) => l2((a) => a | e), [t]), m = useCallback((e) => (t & e) === e, [t]), n2 = useCallback((e) => l2((a) => a & ~e), [l2]), F2 = useCallback((e) => l2((a) => a ^ e), [l2]);
11
+ return { flags: t, setFlag: g, addFlag: s2, hasFlag: m, removeFlag: n2, toggleFlag: F2 };
12
+ }
13
+ var D = ((i2) => (i2[i2.None = 0] = "None", i2[i2.Closed = 1] = "Closed", i2[i2.Enter = 2] = "Enter", i2[i2.Leave = 4] = "Leave", i2))(D || {});
14
+ function A(e) {
15
+ let a = {};
16
+ for (let t in e) e[t] === true && (a[`data-${t}`] = "");
17
+ return a;
18
+ }
19
+ function V(e, a, t, r) {
20
+ let [i2, u2] = useState(t), { hasFlag: d, addFlag: f, removeFlag: s2 } = c$1(e && i2 ? 3 : 0), l2 = useRef(false), n2 = useRef(false), o2 = p();
21
+ return n$1(function p2() {
22
+ var T;
23
+ if (!e) return;
24
+ t && u2(true);
25
+ let c2 = a.current;
26
+ return c2 ? ((T = void 0) == null || T.call(r, t), M(c2, { inFlight: l2, prepare() {
27
+ n2.current ? n2.current = false : n2.current = l2.current, l2.current = true, !n2.current && (t ? (f(3), s2(4)) : (f(4), s2(2)));
28
+ }, run() {
29
+ n2.current ? t ? (s2(3), f(4)) : (s2(4), f(3)) : t ? s2(1) : f(1);
30
+ }, done() {
31
+ var m;
32
+ n2.current && typeof c2.getAnimations == "function" && c2.getAnimations().length > 0 || (l2.current = false, s2(7), t || u2(false), (m = void 0) == null || m.call(r, t));
33
+ } })) : t ? (f(3), o2.nextFrame(() => p2())) : void 0;
34
+ }, [e, t, a, o2]), e ? [i2, { closed: d(1), enter: d(2), leave: d(4), transition: d(2) || d(4) }] : [t, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
35
+ }
36
+ function M(e, { prepare: a, run: t, done: r, inFlight: i2 }) {
37
+ let u2 = o();
38
+ return R(e, { prepare: a, inFlight: i2 }), u2.nextFrame(() => {
39
+ u2.add(F(e, r)), t();
40
+ }), u2.dispose;
41
+ }
42
+ function F(e, a) {
43
+ let t = l(a), r = o();
44
+ if (!e) return r.dispose;
45
+ let { transitionDuration: i2, transitionDelay: u2 } = getComputedStyle(e), [d, f] = [i2, u2].map((l2) => {
46
+ let [n2 = 0] = l2.split(",").filter(Boolean).map((o2) => o2.includes("ms") ? parseFloat(o2) : parseFloat(o2) * 1e3).sort((o2, p2) => p2 - o2);
47
+ return n2;
48
+ }), s2 = d + f;
49
+ if (s2 !== 0) {
50
+ let l2 = r.group((n2) => {
51
+ let o2 = n2.setTimeout(() => {
52
+ t(), n2.dispose();
53
+ }, s2);
54
+ n2.addEventListener(e, "transitionrun", (p2) => {
55
+ p2.target === p2.currentTarget && (o2(), n2.addEventListener(e, "transitioncancel", (c2) => {
56
+ c2.target === c2.currentTarget && (t(), l2());
57
+ }));
58
+ });
59
+ });
60
+ r.addEventListener(e, "transitionend", (n2) => {
61
+ n2.target === n2.currentTarget && (t(), r.dispose());
62
+ });
63
+ } else t();
64
+ return r.dispose;
65
+ }
66
+ function R(e, { inFlight: a, prepare: t }) {
67
+ if (a != null && a.current) {
68
+ t();
69
+ return;
70
+ }
71
+ let r = e.style.transition;
72
+ e.style.transition = "none", t(), e.offsetHeight, e.style.transition = r;
73
+ }
74
+ let n = createContext(null);
75
+ n.displayName = "OpenClosedContext";
76
+ var i = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(i || {});
77
+ function u() {
78
+ return useContext(n);
79
+ }
80
+ function c({ value: o2, children: t }) {
81
+ return React__default.createElement(n.Provider, { value: o2 }, t);
82
+ }
83
+ function s({ children: o2 }) {
84
+ return React__default.createElement(n.Provider, { value: null }, o2);
85
+ }
86
+ export {
87
+ A,
88
+ V,
89
+ c,
90
+ i,
91
+ s,
92
+ u
93
+ };
@@ -0,0 +1,31 @@
1
+ import { useRef, useState } from "react";
2
+ import { p, o, u } from "./keyboard-B256ZoM-.js";
3
+ function E(e) {
4
+ let t = e.width / 2, n = e.height / 2;
5
+ return { top: e.clientY - n, right: e.clientX + t, bottom: e.clientY + n, left: e.clientX - t };
6
+ }
7
+ function P(e, t) {
8
+ return !(!e || !t || e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom);
9
+ }
10
+ function w({ disabled: e = false } = {}) {
11
+ let t = useRef(null), [n, l] = useState(false), r = p(), o$1 = o(() => {
12
+ t.current = null, l(false), r.dispose();
13
+ }), f = o((s) => {
14
+ if (r.dispose(), t.current === null) {
15
+ t.current = s.currentTarget, l(true);
16
+ {
17
+ let i = u(s.currentTarget);
18
+ r.addEventListener(i, "pointerup", o$1, false), r.addEventListener(i, "pointermove", (c) => {
19
+ if (t.current) {
20
+ let p2 = E(c);
21
+ l(P(p2, t.current.getBoundingClientRect()));
22
+ }
23
+ }, false), r.addEventListener(i, "pointercancel", o$1, false);
24
+ }
25
+ }
26
+ });
27
+ return { pressed: n, pressProps: e ? {} : { onPointerDown: f, onPointerUp: o$1, onClick: o$1 } };
28
+ }
29
+ export {
30
+ w
31
+ };
@@ -0,0 +1,16 @@
1
+ import { useCallback } from "react";
2
+ function l(e, r) {
3
+ return e !== null && r !== null && typeof e == "object" && typeof r == "object" && "id" in e && "id" in r ? e.id === r.id : e === r;
4
+ }
5
+ function u(e = l) {
6
+ return useCallback((r, t) => {
7
+ if (typeof e == "string") {
8
+ let o = e;
9
+ return (r == null ? void 0 : r[o]) === (t == null ? void 0 : t[o]);
10
+ }
11
+ return e(r, t);
12
+ }, [e]);
13
+ }
14
+ export {
15
+ u
16
+ };
@@ -0,0 +1,19 @@
1
+ import { useState } from "react";
2
+ import { n } from "./keyboard-B256ZoM-.js";
3
+ function i(t) {
4
+ var n2;
5
+ if (t.type) return t.type;
6
+ let e = (n2 = t.as) != null ? n2 : "button";
7
+ if (typeof e == "string" && e.toLowerCase() === "button") return "button";
8
+ }
9
+ function T(t, e) {
10
+ let [n$1, u] = useState(() => i(t));
11
+ return n(() => {
12
+ u(i(t));
13
+ }, [t.type, t.as]), n(() => {
14
+ n$1 || e.current && e.current instanceof HTMLButtonElement && !e.current.hasAttribute("type") && u("button");
15
+ }, [n$1, e]), n$1;
16
+ }
17
+ export {
18
+ T
19
+ };
@@ -0,0 +1 @@
1
+ export default function UUIDv4(): string;
@@ -0,0 +1,9 @@
1
+ function UUIDv4() {
2
+ return (1e7 + -1e3 + -4e3 + -8e3 + -1e11).toString().replace(
3
+ /[018]/g,
4
+ (c) => (Number(c) ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> Number(c) / 4).toString(16)
5
+ );
6
+ }
7
+ export {
8
+ UUIDv4 as default
9
+ };
@@ -0,0 +1 @@
1
+ export default function _Date(x: Date | string, y?: string | Date | undefined): string;
@@ -0,0 +1,26 @@
1
+ function _Date(x, y) {
2
+ if (y === void 0) {
3
+ y = x;
4
+ x = /* @__PURE__ */ new Date();
5
+ } else {
6
+ x = new Date(x);
7
+ }
8
+ const replaces = {
9
+ yyyy: x.getFullYear() + "",
10
+ yy: `${x.getFullYear()}`.slice(-2),
11
+ mm: `0${x.getMonth() + 1}`.slice(-2),
12
+ dd: `0${x.getDate()}`.slice(-2),
13
+ HH: `0${x.getHours()}`.slice(-2),
14
+ MM: `0${x.getMinutes()}`.slice(-2),
15
+ SS: `0${x.getSeconds()}`.slice(-2)
16
+ };
17
+ Object.keys(replaces).forEach((replace) => {
18
+ if (typeof y === "string") {
19
+ y = y.replace(replace, replaces[replace]);
20
+ }
21
+ });
22
+ return y;
23
+ }
24
+ export {
25
+ _Date as default
26
+ };
@@ -0,0 +1,8 @@
1
+ type MonthObj = {
2
+ val: string;
3
+ name: string;
4
+ names: string;
5
+ abc: string;
6
+ };
7
+ export default function Month(n: number): MonthObj;
8
+ export {};
@@ -0,0 +1,80 @@
1
+ function Month(n) {
2
+ const obj = {
3
+ 1: {
4
+ val: "01",
5
+ name: "Январь",
6
+ names: "Января",
7
+ abc: "Янв"
8
+ },
9
+ 2: {
10
+ val: "02",
11
+ name: "Февраль",
12
+ names: "Февраля",
13
+ abc: "Февр"
14
+ },
15
+ 3: {
16
+ val: "03",
17
+ name: "Март",
18
+ names: "Марта",
19
+ abc: "Март"
20
+ },
21
+ 4: {
22
+ val: "04",
23
+ name: "Апрель",
24
+ names: "Апреля",
25
+ abc: "Апр"
26
+ },
27
+ 5: {
28
+ val: "05",
29
+ name: "Май",
30
+ names: "Мая",
31
+ abc: "Май"
32
+ },
33
+ 6: {
34
+ val: "06",
35
+ name: "Июнь",
36
+ names: "Июня",
37
+ abc: "Июнь"
38
+ },
39
+ 7: {
40
+ val: "07",
41
+ name: "Июль",
42
+ names: "Июля",
43
+ abc: "Июль"
44
+ },
45
+ 8: {
46
+ val: "08",
47
+ name: "Август",
48
+ names: "Августа",
49
+ abc: "Авг"
50
+ },
51
+ 9: {
52
+ val: "09",
53
+ name: "Сентябрь",
54
+ names: "Сентебря",
55
+ abc: "Сент"
56
+ },
57
+ 10: {
58
+ val: "10",
59
+ name: "Октябрь",
60
+ names: "Октября",
61
+ abc: "Окт"
62
+ },
63
+ 11: {
64
+ val: "11",
65
+ name: "Ноябрь",
66
+ names: "Ноября",
67
+ abc: "Нояб"
68
+ },
69
+ 12: {
70
+ val: "12",
71
+ name: "Декабрь",
72
+ names: "Декабря",
73
+ abc: "Дек"
74
+ }
75
+ };
76
+ return obj[n];
77
+ }
78
+ export {
79
+ Month as default
80
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ *l - length
3
+ *n - numder
4
+ *fn(10,123) => 0000000123
5
+ */
6
+ export default function Numbers(l: number, n: number): string;
@@ -0,0 +1,8 @@
1
+ function Numbers(l, n) {
2
+ let result = n + "";
3
+ while (result.length < l) result = "0" + result;
4
+ return result;
5
+ }
6
+ export {
7
+ Numbers as default
8
+ };
@@ -0,0 +1,11 @@
1
+ import { default as Date } from './formating/Date';
2
+ import { default as Month } from './formating/Month';
3
+ import { default as Number } from './formating/Numbers';
4
+ import { default as UUIDv4 } from './UUID4';
5
+
6
+ export declare const formating: {
7
+ Number: typeof Number;
8
+ Month: typeof Month;
9
+ Date: typeof Date;
10
+ UUIDv4: typeof UUIDv4;
11
+ };
@@ -0,0 +1,13 @@
1
+ import _Date from "./formating/Date.js";
2
+ import Month from "./formating/Month.js";
3
+ import Numbers from "./formating/Numbers.js";
4
+ import UUIDv4 from "./UUID4.js";
5
+ const formating = {
6
+ Number: Numbers,
7
+ Month,
8
+ Date: _Date,
9
+ UUIDv4
10
+ };
11
+ export {
12
+ formating
13
+ };