anysystem-design 0.0.44 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{bugs-CHTtT8VX.js → bugs-mljuODtW.js} +59 -56
- package/dist/{bundle-mjs-SHnj3fHy.js → bundle-mjs-D8_OHItV.js} +316 -393
- package/dist/{calculate-active-index-xXUBsarF.js → calculate-active-index-BLZgzU1e.js} +348 -346
- package/dist/{close-provider-Cs3ZWgEC.js → close-provider-CEutdhG8.js} +1 -1
- package/dist/combobox-n82D2K1B.js +869 -0
- package/dist/components/AutoComplete/AutoCompleteBase.js +11 -11
- package/dist/components/AutoComplete/AutoCompleteMultiple.js +10 -10
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/CheckboxBase.js +1 -1
- package/dist/components/Column/Column.js +1 -1
- package/dist/components/Container/Container.js +1 -1
- package/dist/components/DataTable/components/FieldSelectbox.js +19 -19
- package/dist/components/DatePicker/DatePicker.js +2 -2
- package/dist/components/FormControl/FormComponent.js +1 -1
- package/dist/components/FormControl/FormContent.js +3 -2
- package/dist/components/Input/InputBase.js +1 -1
- package/dist/components/Input/InputTel.js +1 -1
- package/dist/components/Input/Textarea.d.ts +23 -0
- package/dist/components/Input/Textarea.js +62 -0
- package/dist/components/Input/index.d.ts +2 -1
- package/dist/components/Input/index.js +5 -4
- package/dist/components/Label/Label.js +1 -1
- package/dist/components/Modal/Modal.js +30 -30
- package/dist/components/NavList/NavList.js +94 -94
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Selectbox/SelectboxBase.js +20 -20
- package/dist/components/Selectbox/SelectboxMultiple.js +24 -24
- package/dist/components/Switch/Switch.js +31 -31
- package/dist/components/TelephoneInput/TelephoneInput.js +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +51 -49
- package/dist/{floating-ui.react-dom-YTFlGVA5.js → floating-ui.react-dom-D1BzEDF6.js} +186 -179
- package/dist/{headless-datepicker-BV7tOa5a.js → headless-datepicker-CJgYtyPm.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +56 -54
- package/dist/layouts/SideMenu/SideMenu.js +2 -2
- package/dist/listbox-CEBFFwl1.js +312 -0
- package/dist/open-closed-Btlb-eA5.js +96 -0
- package/dist/portal-VJzbRmUd.js +344 -0
- package/dist/transition-BWQrWLaC.js +143 -0
- package/dist/use-resolve-button-type-DbQUT_r1.js +41 -0
- package/package.json +31 -31
- package/dist/combobox-DcjIgW1K.js +0 -865
- package/dist/listbox-T8TrOULl.js +0 -317
- package/dist/open-closed-CowzTowH.js +0 -93
- package/dist/portal-B7hH6hDh.js +0 -326
- package/dist/transition-6o20faRl.js +0 -165
- package/dist/use-resolve-button-type-DkEA2l9L.js +0 -47
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
const I = typeof document < "u" ?
|
|
1
|
+
import G, { useRef as h, useCallback as v, useEffect as P, useState as M, useMemo as U } from "react";
|
|
2
|
+
const I = typeof document < "u" ? G.useLayoutEffect : () => {
|
|
3
3
|
};
|
|
4
|
-
function
|
|
4
|
+
function R(t) {
|
|
5
5
|
const n = h(null);
|
|
6
6
|
return I(() => {
|
|
7
7
|
n.current = t;
|
|
@@ -16,24 +16,27 @@ const w = (t) => {
|
|
|
16
16
|
var n;
|
|
17
17
|
return (n = t == null ? void 0 : t.ownerDocument) !== null && n !== void 0 ? n : document;
|
|
18
18
|
}, b = (t) => t && "window" in t && t.window === t ? t : w(t).defaultView || window;
|
|
19
|
-
function
|
|
19
|
+
function z(t) {
|
|
20
20
|
var n;
|
|
21
21
|
return typeof window > "u" || window.navigator == null ? !1 : ((n = window.navigator.userAgentData) === null || n === void 0 ? void 0 : n.brands.some((e) => t.test(e.brand))) || t.test(window.navigator.userAgent);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function N(t) {
|
|
24
24
|
var n;
|
|
25
25
|
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;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function Y() {
|
|
31
|
-
return R(/Android/i);
|
|
27
|
+
function B(t) {
|
|
28
|
+
let n = null;
|
|
29
|
+
return () => (n == null && (n = t()), n);
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
return
|
|
31
|
+
const Y = B(function() {
|
|
32
|
+
return N(/^Mac/i);
|
|
33
|
+
}), q = B(function() {
|
|
34
|
+
return z(/Android/i);
|
|
35
|
+
});
|
|
36
|
+
function J(t) {
|
|
37
|
+
return t.mozInputSource === 0 && t.isTrusted ? !0 : q() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
|
35
38
|
}
|
|
36
|
-
class
|
|
39
|
+
class Q {
|
|
37
40
|
isDefaultPrevented() {
|
|
38
41
|
return this.nativeEvent.defaultPrevented;
|
|
39
42
|
}
|
|
@@ -52,7 +55,7 @@ class J {
|
|
|
52
55
|
this.nativeEvent = e, this.target = e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget, this.bubbles = e.bubbles, this.cancelable = e.cancelable, this.defaultPrevented = e.defaultPrevented, this.eventPhase = e.eventPhase, this.isTrusted = e.isTrusted, this.timeStamp = e.timeStamp, this.type = n;
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
|
-
function
|
|
58
|
+
function A(t) {
|
|
56
59
|
let n = h({
|
|
57
60
|
isFocused: !1,
|
|
58
61
|
observer: null
|
|
@@ -63,14 +66,14 @@ function B(t) {
|
|
|
63
66
|
r.observer && (r.observer.disconnect(), r.observer = null);
|
|
64
67
|
};
|
|
65
68
|
}, []);
|
|
66
|
-
let e =
|
|
69
|
+
let e = R((r) => {
|
|
67
70
|
t == null || t(r);
|
|
68
71
|
});
|
|
69
72
|
return v((r) => {
|
|
70
73
|
if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
|
|
71
74
|
n.current.isFocused = !0;
|
|
72
75
|
let o = r.target, a = (s) => {
|
|
73
|
-
n.current.isFocused = !1, o.disabled && e(new
|
|
76
|
+
n.current.isFocused = !1, o.disabled && e(new Q("blur", s)), n.current.observer && (n.current.observer.disconnect(), n.current.observer = null);
|
|
74
77
|
};
|
|
75
78
|
o.addEventListener("focusout", a, {
|
|
76
79
|
once: !0
|
|
@@ -97,7 +100,7 @@ function B(t) {
|
|
|
97
100
|
e
|
|
98
101
|
]);
|
|
99
102
|
}
|
|
100
|
-
function
|
|
103
|
+
function X(t) {
|
|
101
104
|
let { isDisabled: n, onFocus: e, onBlur: r, onFocusChange: o } = t;
|
|
102
105
|
const a = v((d) => {
|
|
103
106
|
if (d.target === d.currentTarget)
|
|
@@ -105,7 +108,7 @@ function Q(t) {
|
|
|
105
108
|
}, [
|
|
106
109
|
r,
|
|
107
110
|
o
|
|
108
|
-
]), s =
|
|
111
|
+
]), s = A(a), i = v((d) => {
|
|
109
112
|
const c = w(d.target);
|
|
110
113
|
d.target === d.currentTarget && c.activeElement === d.target && (e && e(d), o && o(!0), s(d));
|
|
111
114
|
}, [
|
|
@@ -121,29 +124,29 @@ function Q(t) {
|
|
|
121
124
|
};
|
|
122
125
|
}
|
|
123
126
|
let y = null, x = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Map(), p = !1, S = !1;
|
|
124
|
-
const
|
|
127
|
+
const Z = {
|
|
125
128
|
Tab: !0,
|
|
126
129
|
Escape: !0
|
|
127
130
|
};
|
|
128
131
|
function k(t, n) {
|
|
129
132
|
for (let e of x) e(t, n);
|
|
130
133
|
}
|
|
131
|
-
function
|
|
132
|
-
return !(t.metaKey || !
|
|
134
|
+
function ee(t) {
|
|
135
|
+
return !(t.metaKey || !Y() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
|
133
136
|
}
|
|
134
137
|
function L(t) {
|
|
135
|
-
p = !0,
|
|
138
|
+
p = !0, ee(t) && (y = "keyboard", k("keyboard", t));
|
|
136
139
|
}
|
|
137
140
|
function l(t) {
|
|
138
141
|
y = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (p = !0, k("pointer", t));
|
|
139
142
|
}
|
|
140
|
-
function A(t) {
|
|
141
|
-
q(t) && (p = !0, y = "virtual");
|
|
142
|
-
}
|
|
143
143
|
function K(t) {
|
|
144
|
+
J(t) && (p = !0, y = "virtual");
|
|
145
|
+
}
|
|
146
|
+
function V(t) {
|
|
144
147
|
t.target === window || t.target === document || (!p && !S && (y = "virtual", k("virtual", t)), p = !1, S = !1);
|
|
145
148
|
}
|
|
146
|
-
function
|
|
149
|
+
function O() {
|
|
147
150
|
p = !1, S = !0;
|
|
148
151
|
}
|
|
149
152
|
function D(t) {
|
|
@@ -152,30 +155,30 @@ function D(t) {
|
|
|
152
155
|
let r = n.HTMLElement.prototype.focus;
|
|
153
156
|
n.HTMLElement.prototype.focus = function() {
|
|
154
157
|
p = !0, r.apply(this, arguments);
|
|
155
|
-
}, e.addEventListener("keydown", L, !0), e.addEventListener("keyup", L, !0), e.addEventListener("click",
|
|
156
|
-
|
|
158
|
+
}, e.addEventListener("keydown", L, !0), e.addEventListener("keyup", L, !0), e.addEventListener("click", K, !0), n.addEventListener("focus", V, !0), n.addEventListener("blur", O, !1), typeof PointerEvent < "u" ? (e.addEventListener("pointerdown", l, !0), e.addEventListener("pointermove", l, !0), e.addEventListener("pointerup", l, !0)) : (e.addEventListener("mousedown", l, !0), e.addEventListener("mousemove", l, !0), e.addEventListener("mouseup", l, !0)), n.addEventListener("beforeunload", () => {
|
|
159
|
+
_(t);
|
|
157
160
|
}, {
|
|
158
161
|
once: !0
|
|
159
162
|
}), m.set(n, {
|
|
160
163
|
focus: r
|
|
161
164
|
});
|
|
162
165
|
}
|
|
163
|
-
const
|
|
166
|
+
const _ = (t, n) => {
|
|
164
167
|
const e = b(t), r = w(t);
|
|
165
|
-
n && r.removeEventListener("DOMContentLoaded", n), m.has(e) && (e.HTMLElement.prototype.focus = m.get(e).focus, r.removeEventListener("keydown", L, !0), r.removeEventListener("keyup", L, !0), r.removeEventListener("click",
|
|
168
|
+
n && r.removeEventListener("DOMContentLoaded", n), m.has(e) && (e.HTMLElement.prototype.focus = m.get(e).focus, r.removeEventListener("keydown", L, !0), r.removeEventListener("keyup", L, !0), r.removeEventListener("click", K, !0), e.removeEventListener("focus", V, !0), e.removeEventListener("blur", O, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", l, !0), r.removeEventListener("pointermove", l, !0), r.removeEventListener("pointerup", l, !0)) : (r.removeEventListener("mousedown", l, !0), r.removeEventListener("mousemove", l, !0), r.removeEventListener("mouseup", l, !0)), m.delete(e));
|
|
166
169
|
};
|
|
167
|
-
function
|
|
170
|
+
function te(t) {
|
|
168
171
|
const n = w(t);
|
|
169
172
|
let e;
|
|
170
173
|
return n.readyState !== "loading" ? D(t) : (e = () => {
|
|
171
174
|
D(t);
|
|
172
|
-
}, n.addEventListener("DOMContentLoaded", e)), () =>
|
|
175
|
+
}, n.addEventListener("DOMContentLoaded", e)), () => _(t, e);
|
|
173
176
|
}
|
|
174
|
-
typeof document < "u" &&
|
|
175
|
-
function
|
|
177
|
+
typeof document < "u" && te();
|
|
178
|
+
function j() {
|
|
176
179
|
return y !== "pointer";
|
|
177
180
|
}
|
|
178
|
-
const
|
|
181
|
+
const ne = /* @__PURE__ */ new Set([
|
|
179
182
|
"checkbox",
|
|
180
183
|
"radio",
|
|
181
184
|
"range",
|
|
@@ -186,22 +189,22 @@ const te = /* @__PURE__ */ new Set([
|
|
|
186
189
|
"submit",
|
|
187
190
|
"reset"
|
|
188
191
|
]);
|
|
189
|
-
function
|
|
192
|
+
function re(t, n, e) {
|
|
190
193
|
var r;
|
|
191
194
|
const o = typeof window < "u" ? b(e == null ? void 0 : e.target).HTMLInputElement : HTMLInputElement, a = typeof window < "u" ? b(e == null ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement, s = typeof window < "u" ? b(e == null ? void 0 : e.target).HTMLElement : HTMLElement, i = typeof window < "u" ? b(e == null ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
|
|
192
|
-
return t = t || (e == null ? void 0 : e.target) instanceof o && !
|
|
195
|
+
return t = t || (e == null ? void 0 : e.target) instanceof o && !ne.has(e == null || (r = e.target) === null || r === void 0 ? void 0 : r.type) || (e == null ? void 0 : e.target) instanceof a || (e == null ? void 0 : e.target) instanceof s && (e == null ? void 0 : e.target.isContentEditable), !(t && n === "keyboard" && e instanceof i && !Z[e.key]);
|
|
193
196
|
}
|
|
194
|
-
function
|
|
197
|
+
function oe(t, n, e) {
|
|
195
198
|
D(), P(() => {
|
|
196
199
|
let r = (o, a) => {
|
|
197
|
-
|
|
200
|
+
re(!!(e != null && e.isTextInput), o, a) && t(j());
|
|
198
201
|
};
|
|
199
202
|
return x.add(r), () => {
|
|
200
203
|
x.delete(r);
|
|
201
204
|
};
|
|
202
205
|
}, n);
|
|
203
206
|
}
|
|
204
|
-
function
|
|
207
|
+
function ie(t) {
|
|
205
208
|
let { isDisabled: n, onBlurWithin: e, onFocusWithin: r, onFocusWithinChange: o } = t, a = h({
|
|
206
209
|
isFocusWithin: !1
|
|
207
210
|
}), s = v((c) => {
|
|
@@ -210,7 +213,7 @@ function oe(t) {
|
|
|
210
213
|
e,
|
|
211
214
|
o,
|
|
212
215
|
a
|
|
213
|
-
]), i =
|
|
216
|
+
]), i = A(s), d = v((c) => {
|
|
214
217
|
!a.current.isFocusWithin && document.activeElement === c.target && (r && r(c), o && o(!0), a.current.isFocusWithin = !0, i(c));
|
|
215
218
|
}, [
|
|
216
219
|
r,
|
|
@@ -239,21 +242,21 @@ function W() {
|
|
|
239
242
|
function C(t) {
|
|
240
243
|
t.pointerType === "touch" && W();
|
|
241
244
|
}
|
|
242
|
-
function
|
|
245
|
+
function ue() {
|
|
243
246
|
if (!(typeof document > "u"))
|
|
244
247
|
return typeof PointerEvent < "u" ? document.addEventListener("pointerup", C) : document.addEventListener("touchend", W), H++, () => {
|
|
245
248
|
H--, !(H > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", C) : document.removeEventListener("touchend", W));
|
|
246
249
|
};
|
|
247
250
|
}
|
|
248
|
-
function
|
|
251
|
+
function de(t) {
|
|
249
252
|
let { onHoverStart: n, onHoverChange: e, onHoverEnd: r, isDisabled: o } = t, [a, s] = M(!1), i = h({
|
|
250
253
|
isHovered: !1,
|
|
251
254
|
ignoreEmulatedMouseEvents: !1,
|
|
252
255
|
pointerType: "",
|
|
253
256
|
target: null
|
|
254
257
|
}).current;
|
|
255
|
-
P(
|
|
256
|
-
let { hoverProps: d, triggerHoverEnd: c } =
|
|
258
|
+
P(ue, []);
|
|
259
|
+
let { hoverProps: d, triggerHoverEnd: c } = U(() => {
|
|
257
260
|
let g = (u, $) => {
|
|
258
261
|
if (i.pointerType = $, o || $ === "touch" || i.isHovered || !u.currentTarget.contains(u.target)) return;
|
|
259
262
|
i.isHovered = !0;
|
|
@@ -305,24 +308,24 @@ function se(t) {
|
|
|
305
308
|
isHovered: a
|
|
306
309
|
};
|
|
307
310
|
}
|
|
308
|
-
function
|
|
311
|
+
function ce(t = {}) {
|
|
309
312
|
let { autoFocus: n = !1, isTextInput: e, within: r } = t, o = h({
|
|
310
313
|
isFocused: !1,
|
|
311
|
-
isFocusVisible: n ||
|
|
314
|
+
isFocusVisible: n || j()
|
|
312
315
|
}), [a, s] = M(!1), [i, d] = M(() => o.current.isFocused && o.current.isFocusVisible), c = v(() => d(o.current.isFocused && o.current.isFocusVisible), []), g = v((u) => {
|
|
313
316
|
o.current.isFocused = u, s(u), c();
|
|
314
317
|
}, [
|
|
315
318
|
c
|
|
316
319
|
]);
|
|
317
|
-
|
|
320
|
+
oe((u) => {
|
|
318
321
|
o.current.isFocusVisible = u, c();
|
|
319
322
|
}, [], {
|
|
320
323
|
isTextInput: e
|
|
321
324
|
});
|
|
322
|
-
let { focusProps: E } =
|
|
325
|
+
let { focusProps: E } = X({
|
|
323
326
|
isDisabled: r,
|
|
324
327
|
onFocusChange: g
|
|
325
|
-
}), { focusWithinProps: f } =
|
|
328
|
+
}), { focusWithinProps: f } = ie({
|
|
326
329
|
isDisabled: !r,
|
|
327
330
|
onFocusWithinChange: g
|
|
328
331
|
});
|
|
@@ -332,13 +335,13 @@ function de(t = {}) {
|
|
|
332
335
|
focusProps: r ? f : E
|
|
333
336
|
};
|
|
334
337
|
}
|
|
335
|
-
function
|
|
338
|
+
function le(t) {
|
|
336
339
|
let n = t.parentElement, e = null;
|
|
337
340
|
for (; n && !(n instanceof HTMLFieldSetElement); ) n instanceof HTMLLegendElement && (e = n), n = n.parentElement;
|
|
338
341
|
let r = (n == null ? void 0 : n.getAttribute("disabled")) === "";
|
|
339
|
-
return r &&
|
|
342
|
+
return r && ae(e) ? !1 : r;
|
|
340
343
|
}
|
|
341
|
-
function
|
|
344
|
+
function ae(t) {
|
|
342
345
|
if (!t) return !1;
|
|
343
346
|
let n = t.previousElementSibling;
|
|
344
347
|
for (; n !== null; ) {
|
|
@@ -348,7 +351,7 @@ function ue(t) {
|
|
|
348
351
|
return !0;
|
|
349
352
|
}
|
|
350
353
|
export {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
+
ce as $,
|
|
355
|
+
de as a,
|
|
356
|
+
le as r
|
|
354
357
|
};
|