@okam/stack-ui 1.35.0 → 1.35.1
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/components/fields/Select/Select.d.ts +1 -1
- package/index105.js +1 -1
- package/index105.mjs +1 -1
- package/index106.js +1 -1
- package/index106.mjs +3 -3
- package/index107.js +1 -1
- package/index107.mjs +1 -1
- package/index112.js +1 -1
- package/index112.mjs +1 -1
- package/index114.js +1 -1
- package/index114.mjs +3 -3
- package/index115.js +1 -1
- package/index115.mjs +3 -3
- package/index116.js +1 -1
- package/index116.mjs +1 -1
- package/index117.js +1 -1
- package/index117.mjs +1 -1
- package/index118.js +1 -1
- package/index118.mjs +1 -1
- package/index122.js +1 -1
- package/index122.mjs +2 -2
- package/index123.js +1 -1
- package/index123.mjs +5 -5
- package/index124.js +1 -1
- package/index124.mjs +3 -3
- package/index125.js +1 -1
- package/index125.mjs +9 -9
- package/index131.js +1 -1
- package/index131.mjs +1 -1
- package/index140.js +1 -1
- package/index140.mjs +10 -55
- package/index141.js +1 -1
- package/index141.mjs +57 -46
- package/index142.js +1 -1
- package/index142.mjs +46 -241
- package/index143.js +1 -2
- package/index143.mjs +241 -13
- package/index144.js +2 -1
- package/index144.mjs +12 -29
- package/index145.js +1 -1
- package/index145.mjs +30 -12
- package/index147.js +1 -1
- package/index147.mjs +1 -1
- package/index148.js +1 -1
- package/index148.mjs +1 -1
- package/index150.js +1 -1
- package/index150.mjs +68 -22
- package/index151.js +1 -1
- package/index151.mjs +370 -62
- package/index152.js +1 -1
- package/index152.mjs +44 -379
- package/index153.js +1 -1
- package/index153.mjs +4 -47
- package/index154.js +1 -1
- package/index154.mjs +25 -4
- package/index155.js +1 -1
- package/index155.mjs +46 -23
- package/index156.js +1 -1
- package/index156.mjs +4 -46
- package/index157.js +1 -1
- package/index157.mjs +24 -5
- package/index158.js +1 -1
- package/index158.mjs +11 -23
- package/index159.js +1 -1
- package/index159.mjs +4 -12
- package/index16.js +1 -1
- package/index16.mjs +133 -131
- package/index160.js +1 -1
- package/index160.mjs +14 -4
- package/index161.js +1 -1
- package/index161.mjs +21 -14
- package/index162.js +1 -1
- package/index162.mjs +42 -21
- package/index163.js +1 -1
- package/index163.mjs +23 -41
- package/index164.js +1 -1
- package/index164.mjs +42 -24
- package/index165.js +1 -1
- package/index165.mjs +27 -41
- package/index166.js +1 -1
- package/index166.mjs +30 -27
- package/index167.js +1 -1
- package/index167.mjs +13 -30
- package/index168.js +1 -1
- package/index168.mjs +28 -14
- package/index169.js +1 -1
- package/index169.mjs +9 -28
- package/index170.js +1 -1
- package/index170.mjs +6 -9
- package/index171.js +1 -1
- package/index171.mjs +5 -6
- package/index172.js +1 -1
- package/index172.mjs +13 -5
- package/index173.js +1 -1
- package/index173.mjs +8 -13
- package/index174.js +1 -1
- package/index174.mjs +17 -8
- package/index175.js +1 -1
- package/index175.mjs +19 -17
- package/index176.js +1 -1
- package/index176.mjs +54 -19
- package/index177.js +1 -1
- package/index177.mjs +23 -50
- package/index178.js +1 -1
- package/index178.mjs +122 -201
- package/index179.js +1 -1
- package/index179.mjs +130 -60
- package/index180.js +1 -1
- package/index180.mjs +44 -143
- package/index181.js +1 -1
- package/index181.mjs +14 -124
- package/index182.js +1 -1
- package/index182.mjs +87 -216
- package/index183.js +1 -1
- package/index183.mjs +102 -186
- package/index184.js +1 -1
- package/index184.mjs +4 -69
- package/index185.js +1 -1
- package/index185.mjs +3 -279
- package/index186.js +1 -1
- package/index186.mjs +119 -92
- package/index187.js +1 -1
- package/index187.mjs +23 -182
- package/index188.js +1 -1
- package/index188.mjs +51 -84
- package/index189.js +1 -1
- package/index189.mjs +44 -58
- package/index190.js +1 -1
- package/index190.mjs +35 -124
- package/index191.js +1 -1
- package/index191.mjs +110 -113
- package/index192.js +1 -1
- package/index192.mjs +74 -119
- package/index193.js +1 -1
- package/index193.mjs +101 -72
- package/index194.js +1 -1
- package/index194.mjs +98 -111
- package/index195.js +1 -1
- package/index195.mjs +136 -48
- package/index196.js +1 -1
- package/index196.mjs +196 -92
- package/index197.js +1 -1
- package/index197.mjs +22 -70
- package/index198.js +1 -1
- package/index198.mjs +47 -54
- package/index199.js +1 -1
- package/index199.mjs +47 -98
- package/index200.js +1 -5
- package/index200.mjs +96 -79
- package/index201.js +1 -1
- package/index201.mjs +71 -2025
- package/index202.js +1 -1
- package/index202.mjs +66 -57
- package/index203.js +1 -1
- package/index203.mjs +7 -188
- package/index204.js +1 -1
- package/index204.mjs +10 -123
- package/index205.js +1 -1
- package/index205.mjs +198 -129
- package/index206.js +1 -1
- package/index206.mjs +63 -43
- package/index207.js +1 -1
- package/index207.mjs +143 -14
- package/index208.js +1 -1
- package/index208.mjs +117 -88
- package/index209.js +1 -1
- package/index209.mjs +220 -102
- package/index210.js +1 -1
- package/index210.mjs +190 -4
- package/index211.js +1 -1
- package/index211.mjs +69 -3
- package/index212.js +1 -1
- package/index212.mjs +269 -115
- package/index213.js +1 -1
- package/index213.mjs +93 -24
- package/index214.js +1 -1
- package/index214.mjs +180 -43
- package/index215.js +1 -1
- package/index215.mjs +84 -44
- package/index216.js +1 -1
- package/index216.mjs +57 -36
- package/index217.js +1 -1
- package/index217.mjs +122 -109
- package/index218.js +1 -1
- package/index218.mjs +113 -74
- package/index219.js +1 -1
- package/index219.mjs +122 -101
- package/index220.js +1 -1
- package/index220.mjs +73 -98
- package/index221.js +1 -1
- package/index221.mjs +107 -137
- package/index222.js +1 -1
- package/index222.mjs +52 -197
- package/index223.js +1 -1
- package/index223.mjs +93 -22
- package/index224.js +1 -1
- package/index224.mjs +67 -46
- package/index225.js +1 -1
- package/index225.mjs +55 -47
- package/index226.js +1 -1
- package/index226.mjs +98 -96
- package/index227.js +5 -1
- package/index227.mjs +81 -72
- package/index228.js +1 -1
- package/index228.mjs +2015 -58
- package/index229.js +1 -1
- package/index229.mjs +59 -7
- package/index230.js +1 -1
- package/index230.mjs +187 -10
- package/index232.js +1 -1
- package/index232.mjs +4 -130
- package/index233.js +1 -1
- package/index233.mjs +5 -191
- package/index234.js +1 -1
- package/index234.mjs +5 -10
- package/index235.js +1 -1
- package/index235.mjs +5 -4
- package/index236.js +1 -1
- package/index236.mjs +5 -37
- package/index237.js +1 -1
- package/index237.mjs +5 -6
- package/index238.js +1 -1
- package/index238.mjs +5 -30
- package/index239.js +1 -1
- package/index239.mjs +5 -7
- package/index240.js +1 -1
- package/index240.mjs +5 -5
- package/index241.js +1 -1
- package/index241.mjs +4 -4
- package/index242.js +1 -1
- package/index242.mjs +4 -4
- package/index243.js +1 -1
- package/index243.mjs +1 -1
- package/index244.js +1 -1
- package/index244.mjs +4 -4
- package/index245.js +1 -1
- package/index245.mjs +4 -4
- package/index246.js +1 -1
- package/index246.mjs +4 -4
- package/index247.js +1 -1
- package/index247.mjs +1 -1
- package/index248.js +1 -1
- package/index248.mjs +4 -4
- package/index249.js +1 -1
- package/index249.mjs +4 -4
- package/index250.js +1 -1
- package/index250.mjs +4 -4
- package/index251.js +1 -1
- package/index251.mjs +1 -1
- package/index252.js +1 -1
- package/index252.mjs +4 -4
- package/index253.js +1 -1
- package/index253.mjs +4 -4
- package/index254.js +1 -1
- package/index254.mjs +4 -4
- package/index255.js +1 -1
- package/index255.mjs +4 -4
- package/index256.js +1 -1
- package/index256.mjs +4 -4
- package/index257.js +1 -1
- package/index257.mjs +4 -4
- package/index258.js +1 -1
- package/index258.mjs +4 -4
- package/index259.js +1 -1
- package/index259.mjs +4 -4
- package/index260.js +1 -1
- package/index260.mjs +1 -1
- package/index261.js +1 -1
- package/index261.mjs +4 -4
- package/index262.js +1 -1
- package/index262.mjs +4 -4
- package/index263.js +1 -1
- package/index263.mjs +1 -1
- package/index264.js +1 -1
- package/index264.mjs +4 -4
- package/index265.js +1 -1
- package/index265.mjs +4 -4
- package/index266.js +1 -1
- package/index266.mjs +4 -4
- package/index267.js +1 -1
- package/index267.mjs +130 -4
- package/index268.js +1 -1
- package/index268.mjs +191 -5
- package/index269.js +1 -1
- package/index269.mjs +10 -5
- package/index270.js +1 -1
- package/index270.mjs +4 -5
- package/index271.js +1 -1
- package/index271.mjs +37 -5
- package/index272.js +1 -1
- package/index272.mjs +6 -5
- package/index273.js +1 -1
- package/index273.mjs +30 -5
- package/index274.js +1 -1
- package/index274.mjs +7 -5
- package/index275.js +1 -1
- package/index275.mjs +3 -3
- package/index277.js +1 -1
- package/index277.mjs +2 -2
- package/index278.js +1 -1
- package/index278.mjs +5 -5
- package/index281.js +1 -1
- package/index281.mjs +3 -3
- package/index284.js +1 -1
- package/index284.mjs +1 -1
- package/index285.js +1 -1
- package/index285.mjs +4 -4
- package/package.json +1 -1
package/index156.mjs
CHANGED
|
@@ -1,50 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
current: 0
|
|
5
|
-
}, $ = /* @__PURE__ */ a.createContext(c), p = /* @__PURE__ */ a.createContext(!1);
|
|
6
|
-
let v = !!(typeof window < "u" && window.document && window.document.createElement), s = /* @__PURE__ */ new WeakMap();
|
|
7
|
-
function S(t = !1) {
|
|
8
|
-
let e = d($), r = l(null);
|
|
9
|
-
if (r.current === null && !t) {
|
|
10
|
-
var n, u;
|
|
11
|
-
let o = (u = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || u === void 0 || (n = u.ReactCurrentOwner) === null || n === void 0 ? void 0 : n.current;
|
|
12
|
-
if (o) {
|
|
13
|
-
let i = s.get(o);
|
|
14
|
-
i == null ? s.set(o, {
|
|
15
|
-
id: e.current,
|
|
16
|
-
state: o.memoizedState
|
|
17
|
-
}) : o.memoizedState !== i.state && (e.current = i.id, s.delete(o));
|
|
18
|
-
}
|
|
19
|
-
r.current = ++e.current;
|
|
20
|
-
}
|
|
21
|
-
return r.current;
|
|
22
|
-
}
|
|
23
|
-
function b(t) {
|
|
24
|
-
let e = d($);
|
|
25
|
-
e === c && !v && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
26
|
-
let r = S(!!t), n = e === c && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
|
27
|
-
return t || `${n}-${r}`;
|
|
28
|
-
}
|
|
29
|
-
function x(t) {
|
|
30
|
-
let e = a.useId(), [r] = f(y()), n = r || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${c.prefix}`;
|
|
31
|
-
return t || `${n}-${e}`;
|
|
32
|
-
}
|
|
33
|
-
const C = typeof a.useId == "function" ? x : b;
|
|
34
|
-
function m() {
|
|
35
|
-
return !1;
|
|
36
|
-
}
|
|
37
|
-
function w() {
|
|
38
|
-
return !0;
|
|
39
|
-
}
|
|
40
|
-
function g(t) {
|
|
41
|
-
return () => {
|
|
1
|
+
function o(...f) {
|
|
2
|
+
return (...c) => {
|
|
3
|
+
for (let e of f) typeof e == "function" && e(...c);
|
|
42
4
|
};
|
|
43
5
|
}
|
|
44
|
-
function y() {
|
|
45
|
-
return typeof a.useSyncExternalStore == "function" ? a.useSyncExternalStore(g, m, w) : d(p);
|
|
46
|
-
}
|
|
47
6
|
export {
|
|
48
|
-
|
|
49
|
-
C as useSSRSafeId
|
|
7
|
+
o as chain
|
|
50
8
|
};
|
package/index157.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index158.js"),r=require("./index159.js");function i(t,o){if(!r.shadowDOM())return o&&t?t.contains(o):!1;if(!t||!o)return!1;let e=o;for(;e!==null;){if(e===t)return!0;e.tagName==="SLOT"&&e.assignedSlot?e=e.assignedSlot.parentNode:a.isShadowRoot(e)?e=e.host:e=e.parentNode}return!1}const n=(t=document)=>{var o;if(!r.shadowDOM())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&(!((o=e.shadowRoot)===null||o===void 0)&&o.activeElement);)e=e.shadowRoot.activeElement;return e};function s(t){return r.shadowDOM()&&t.target.shadowRoot&&t.composedPath?t.composedPath()[0]:t.target}exports.getActiveElement=n;exports.getEventTarget=s;exports.nodeContains=i;
|
package/index157.mjs
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { isShadowRoot as f } from "./index158.mjs";
|
|
2
|
+
import { shadowDOM as o } from "./index159.mjs";
|
|
3
|
+
function n(t, a) {
|
|
4
|
+
if (!o()) return a && t ? t.contains(a) : !1;
|
|
5
|
+
if (!t || !a) return !1;
|
|
6
|
+
let e = a;
|
|
7
|
+
for (; e !== null; ) {
|
|
8
|
+
if (e === t) return !0;
|
|
9
|
+
e.tagName === "SLOT" && e.assignedSlot ? e = e.assignedSlot.parentNode : f(e) ? e = e.host : e = e.parentNode;
|
|
10
|
+
}
|
|
11
|
+
return !1;
|
|
12
|
+
}
|
|
13
|
+
const s = (t = document) => {
|
|
14
|
+
var a;
|
|
15
|
+
if (!o()) return t.activeElement;
|
|
16
|
+
let e = t.activeElement;
|
|
17
|
+
for (; e && "shadowRoot" in e && (!((a = e.shadowRoot) === null || a === void 0) && a.activeElement); ) e = e.shadowRoot.activeElement;
|
|
18
|
+
return e;
|
|
19
|
+
};
|
|
20
|
+
function d(t) {
|
|
21
|
+
return o() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
|
|
5
22
|
}
|
|
6
23
|
export {
|
|
7
|
-
|
|
24
|
+
s as getActiveElement,
|
|
25
|
+
d as getEventTarget,
|
|
26
|
+
n as nodeContains
|
|
8
27
|
};
|
package/index158.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=o=>{var n;return(n=o==null?void 0:o.ownerDocument)!==null&&n!==void 0?n:document},e=o=>o&&"window"in o&&o.window===o?o:t(o).defaultView||window;function d(o){return o!==null&&typeof o=="object"&&"nodeType"in o&&typeof o.nodeType=="number"}function c(o){return d(o)&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in o}exports.getOwnerDocument=t;exports.getOwnerWindow=e;exports.isShadowRoot=c;
|
package/index158.mjs
CHANGED
|
@@ -1,27 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (; e !== null; ) {
|
|
8
|
-
if (e === t) return !0;
|
|
9
|
-
e.tagName === "SLOT" && e.assignedSlot ? e = e.assignedSlot.parentNode : f(e) ? e = e.host : e = e.parentNode;
|
|
10
|
-
}
|
|
11
|
-
return !1;
|
|
1
|
+
const t = (o) => {
|
|
2
|
+
var n;
|
|
3
|
+
return (n = o == null ? void 0 : 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";
|
|
12
7
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (!o()) return t.activeElement;
|
|
16
|
-
let e = t.activeElement;
|
|
17
|
-
for (; e && "shadowRoot" in e && (!((a = e.shadowRoot) === null || a === void 0) && a.activeElement); ) e = e.shadowRoot.activeElement;
|
|
18
|
-
return e;
|
|
19
|
-
};
|
|
20
|
-
function d(t) {
|
|
21
|
-
return o() && t.target.shadowRoot && t.composedPath ? t.composedPath()[0] : t.target;
|
|
8
|
+
function c(o) {
|
|
9
|
+
return d(o) && o.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in o;
|
|
22
10
|
}
|
|
23
11
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
t as getOwnerDocument,
|
|
13
|
+
e as getOwnerWindow,
|
|
14
|
+
c as isShadowRoot
|
|
27
15
|
};
|
package/index159.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=!1;function t(){return e}exports.shadowDOM=t;
|
package/index159.mjs
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return
|
|
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;
|
|
1
|
+
let e = !1;
|
|
2
|
+
function f() {
|
|
3
|
+
return e;
|
|
10
4
|
}
|
|
11
5
|
export {
|
|
12
|
-
|
|
13
|
-
e as getOwnerWindow,
|
|
14
|
-
c as isShadowRoot
|
|
6
|
+
f as shadowDOM
|
|
15
7
|
};
|
package/index16.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),B=require("radashi"),D=require("react"),w=require("react-aria"),H=require("react-hook-form"),K=require("react-stately"),V=require("./index75.js"),T=require("./index27.js"),C=require("./index6.js"),Q=require("./index14.js"),W=require("./index3.js"),U=require("./index40.js"),z=require("./index112.js"),G=require("./index113.js"),A=R=>{var O;const{name:h,placeholderLabel:g,disabled:e,required:b,isInvalid:f,hookFormRef:d,isError:l=!1,errorMessage:u,themeName:r="select",tokens:m,customTheme:I,label:q,onSelectionChange:j,defaultValue:v,value:$,icon:S,popoverMatchesWidth:N,options:c,...i}=R,o=D.useRef(),n=D.useRef(null),F=a=>{a&&(d==null||d(a),o.current=a)},k=c==null?void 0:c.filter(a=>{var P;return!((P=a.key)!=null&&P.includes("header-"))}),s=K.useSelectState({...i,children:U,selectedKey:$,defaultSelectedKey:v,items:k,onSelectionChange:j,isDisabled:e,isRequired:b,isInvalid:f}),{triggerProps:M,menuProps:p,labelProps:x,valueProps:L}=w.useSelect({...i,label:q,isDisabled:e,isRequired:b,isInvalid:f},s,F),{onPress:y,onPressStart:E,..._}=M;return t.jsxs(T.default,{themeName:`${r}.wrapper`,children:[q&&t.jsx(W.default,{...x,as:"label",themeName:`${r}.label`,children:q}),t.jsx(w.HiddenSelect,{state:s,triggerRef:n,name:h,isDisabled:!0}),t.jsxs(T.default,{themeName:`${r}.container`,children:[t.jsxs(C.ButtonWithForwardRef,{..._,handlePress:a=>{y==null||y(a),E==null||E(a)},ref:n,disabled:e,themeName:`${r}.button`,tokens:{...m,intent:l?"error":"default"},children:[t.jsx("span",{...L,children:s.selectedItem?s.selectedItem.rendered:g}),t.jsx(Q,{icon:S??"ArrowDown"})]}),s.isOpen&&n.current&&t.jsx(G,{tokens:m,state:s,triggerRef:n,placement:"bottom",themeName:`${r}.popover`,style:{[`--${r}-container-width`]:`${(O=n.current)==null?void 0:O.offsetWidth}px`},children:t.jsx(z.ListBox,{...p,themeName:r,state:s,optionsWithHeaders:c??[]})}),l&&t.jsx(W.default,{tokens:{...m,isError:l},themeName:`${r}.errorMessage`,children:u})]})]})},J=({id:R,name:h,label:g,rules:e,tokens:b,defaultValue:f,themeName:d="select",required:l,onChange:u,options:r,placeholderLabel:m,icon:I,popoverMatchesWidth:q,value:j,...v})=>{const{control:$}=H.useFormContext(),{t:S}=V.useTranslation(),N=()=>{const i=Object.entries(v).filter(([o,n])=>o.startsWith("aria-"));return Object.fromEntries(i)},c={required:l?S("FORM.ERROR.REQUIRED")??"required":!1,...e};return t.jsx(H.Controller,{name:h,control:$,rules:c,disabled:e==null?void 0:e.disabled,defaultValue:f??j,render:({field:i,fieldState:o})=>{var p;const{ref:n,...F}=i,k=!B.isEmpty(o.error),s={isDisabled:i.disabled??!1,isRequired:(e==null?void 0:e.required)===!0||(e==null?void 0:e.required)==="required",isInvalid:o.invalid,isError:k},M={...b,...s};return t.jsx(A,{...F,...s,...N(),id:R,hookFormRef:n,name:h,themeName:d,label:g,tokens:M,disabled:i.disabled,required:(e==null?void 0:e.required)===!0||(e==null?void 0:e.required)==="required",isInvalid:o.invalid,errorMessage:(p=o.error)==null?void 0:p.message,value:i.value,options:r,placeholderLabel:m,icon:I,popoverMatchesWidth:q,onSelectionChange:x=>{i.onChange(x),u==null||u(x)}})}})};exports.ReactHookFormSelect=J;exports.default=A;
|
package/index16.mjs
CHANGED
|
@@ -1,160 +1,162 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { isEmpty as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { useSelect as
|
|
6
|
-
import { useFormContext as
|
|
7
|
-
import { useSelectState as
|
|
8
|
-
import { useTranslation as
|
|
9
|
-
import
|
|
10
|
-
import { ButtonWithForwardRef as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { ListBox as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
var
|
|
2
|
+
import { jsxs as M, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { isEmpty as A } from "radashi";
|
|
4
|
+
import { useRef as T } from "react";
|
|
5
|
+
import { useSelect as K, HiddenSelect as L } from "react-aria";
|
|
6
|
+
import { useFormContext as V, Controller as C } from "react-hook-form";
|
|
7
|
+
import { useSelectState as Q } from "react-stately";
|
|
8
|
+
import { useTranslation as U } from "./index75.mjs";
|
|
9
|
+
import W from "./index27.mjs";
|
|
10
|
+
import { ButtonWithForwardRef as _ } from "./index6.mjs";
|
|
11
|
+
import z from "./index14.mjs";
|
|
12
|
+
import j from "./index3.mjs";
|
|
13
|
+
import G from "./index40.mjs";
|
|
14
|
+
import { ListBox as J } from "./index112.mjs";
|
|
15
|
+
import X from "./index113.mjs";
|
|
16
|
+
const Y = (q) => {
|
|
17
|
+
var S;
|
|
18
18
|
const {
|
|
19
|
-
name:
|
|
20
|
-
placeholderLabel:
|
|
19
|
+
name: h,
|
|
20
|
+
placeholderLabel: v,
|
|
21
21
|
disabled: e,
|
|
22
|
-
required:
|
|
23
|
-
isInvalid:
|
|
24
|
-
hookFormRef:
|
|
22
|
+
required: u,
|
|
23
|
+
isInvalid: b,
|
|
24
|
+
hookFormRef: c,
|
|
25
25
|
isError: m = !1,
|
|
26
|
-
errorMessage:
|
|
27
|
-
themeName:
|
|
28
|
-
tokens:
|
|
29
|
-
customTheme:
|
|
30
|
-
label:
|
|
31
|
-
onSelectionChange:
|
|
32
|
-
defaultValue:
|
|
33
|
-
value:
|
|
34
|
-
icon:
|
|
35
|
-
popoverMatchesWidth:
|
|
36
|
-
options:
|
|
37
|
-
...
|
|
38
|
-
} =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
26
|
+
errorMessage: l,
|
|
27
|
+
themeName: r = "select",
|
|
28
|
+
tokens: p,
|
|
29
|
+
customTheme: O,
|
|
30
|
+
label: f,
|
|
31
|
+
onSelectionChange: I,
|
|
32
|
+
defaultValue: $,
|
|
33
|
+
value: x,
|
|
34
|
+
icon: y,
|
|
35
|
+
popoverMatchesWidth: P,
|
|
36
|
+
options: d,
|
|
37
|
+
...t
|
|
38
|
+
} = q, s = T(), n = T(null), D = (a) => {
|
|
39
|
+
a && (c == null || c(a), s.current = a);
|
|
40
|
+
}, E = d == null ? void 0 : d.filter((a) => {
|
|
41
|
+
var w;
|
|
42
|
+
return !((w = a.key) != null && w.includes("header-"));
|
|
43
|
+
}), o = Q({
|
|
44
|
+
...t,
|
|
45
|
+
children: G,
|
|
46
|
+
selectedKey: x,
|
|
47
|
+
defaultSelectedKey: $,
|
|
48
|
+
items: E,
|
|
49
|
+
onSelectionChange: I,
|
|
48
50
|
isDisabled: e,
|
|
49
|
-
isRequired:
|
|
50
|
-
isInvalid:
|
|
51
|
-
}), { triggerProps:
|
|
52
|
-
{ ...
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
), { onPress:
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
51
|
+
isRequired: u,
|
|
52
|
+
isInvalid: b
|
|
53
|
+
}), { triggerProps: F, menuProps: R, labelProps: g, valueProps: B } = K(
|
|
54
|
+
{ ...t, label: f, isDisabled: e, isRequired: u, isInvalid: b },
|
|
55
|
+
o,
|
|
56
|
+
D
|
|
57
|
+
), { onPress: N, onPressStart: k, ...H } = F;
|
|
58
|
+
return /* @__PURE__ */ M(W, { themeName: `${r}.wrapper`, children: [
|
|
59
|
+
f && /* @__PURE__ */ i(j, { ...g, as: "label", themeName: `${r}.label`, children: f }),
|
|
60
|
+
/* @__PURE__ */ i(L, { state: o, triggerRef: n, name: h, isDisabled: !0 }),
|
|
61
|
+
/* @__PURE__ */ M(W, { themeName: `${r}.container`, children: [
|
|
62
|
+
/* @__PURE__ */ M(
|
|
63
|
+
_,
|
|
62
64
|
{
|
|
63
|
-
...
|
|
64
|
-
handlePress: (
|
|
65
|
-
|
|
65
|
+
...H,
|
|
66
|
+
handlePress: (a) => {
|
|
67
|
+
N == null || N(a), k == null || k(a);
|
|
66
68
|
},
|
|
67
|
-
ref:
|
|
69
|
+
ref: n,
|
|
68
70
|
disabled: e,
|
|
69
|
-
themeName: `${
|
|
70
|
-
tokens: { ...
|
|
71
|
+
themeName: `${r}.button`,
|
|
72
|
+
tokens: { ...p, intent: m ? "error" : "default" },
|
|
71
73
|
children: [
|
|
72
|
-
i.selectedItem ?
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ i("span", { ...B, children: o.selectedItem ? o.selectedItem.rendered : v }),
|
|
75
|
+
/* @__PURE__ */ i(z, { icon: y ?? "ArrowDown" })
|
|
74
76
|
]
|
|
75
77
|
}
|
|
76
78
|
),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
o.isOpen && n.current && /* @__PURE__ */ i(
|
|
80
|
+
X,
|
|
79
81
|
{
|
|
80
|
-
tokens:
|
|
81
|
-
state:
|
|
82
|
-
triggerRef:
|
|
82
|
+
tokens: p,
|
|
83
|
+
state: o,
|
|
84
|
+
triggerRef: n,
|
|
83
85
|
placement: "bottom",
|
|
84
|
-
themeName: `${
|
|
85
|
-
style: { [`--${
|
|
86
|
-
children: /* @__PURE__ */
|
|
86
|
+
themeName: `${r}.popover`,
|
|
87
|
+
style: { [`--${r}-container-width`]: `${(S = n.current) == null ? void 0 : S.offsetWidth}px` },
|
|
88
|
+
children: /* @__PURE__ */ i(J, { ...R, themeName: r, state: o, optionsWithHeaders: d ?? [] })
|
|
87
89
|
}
|
|
88
90
|
),
|
|
89
|
-
m && /* @__PURE__ */
|
|
91
|
+
m && /* @__PURE__ */ i(j, { tokens: { ...p, isError: m }, themeName: `${r}.errorMessage`, children: l })
|
|
90
92
|
] })
|
|
91
93
|
] });
|
|
92
|
-
},
|
|
93
|
-
id:
|
|
94
|
-
name:
|
|
95
|
-
label:
|
|
94
|
+
}, fe = ({
|
|
95
|
+
id: q,
|
|
96
|
+
name: h,
|
|
97
|
+
label: v,
|
|
96
98
|
rules: e,
|
|
97
|
-
tokens:
|
|
98
|
-
defaultValue:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
tokens: u,
|
|
100
|
+
defaultValue: b,
|
|
101
|
+
themeName: c = "select",
|
|
102
|
+
required: m,
|
|
103
|
+
onChange: l,
|
|
104
|
+
options: r,
|
|
105
|
+
placeholderLabel: p,
|
|
106
|
+
icon: O,
|
|
107
|
+
popoverMatchesWidth: f,
|
|
108
|
+
value: I,
|
|
109
|
+
...$
|
|
108
110
|
}) => {
|
|
109
|
-
const { control:
|
|
110
|
-
const
|
|
111
|
-
return Object.fromEntries(
|
|
112
|
-
},
|
|
113
|
-
required:
|
|
111
|
+
const { control: x } = V(), { t: y } = U(), P = () => {
|
|
112
|
+
const t = Object.entries($).filter(([s, n]) => s.startsWith("aria-"));
|
|
113
|
+
return Object.fromEntries(t);
|
|
114
|
+
}, d = {
|
|
115
|
+
required: m ? y("FORM.ERROR.REQUIRED") ?? "required" : !1,
|
|
114
116
|
...e
|
|
115
117
|
};
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
-
|
|
118
|
+
return /* @__PURE__ */ i(
|
|
119
|
+
C,
|
|
118
120
|
{
|
|
119
|
-
name:
|
|
120
|
-
control:
|
|
121
|
-
rules:
|
|
121
|
+
name: h,
|
|
122
|
+
control: x,
|
|
123
|
+
rules: d,
|
|
122
124
|
disabled: e == null ? void 0 : e.disabled,
|
|
123
|
-
defaultValue:
|
|
124
|
-
render: ({ field:
|
|
125
|
-
var
|
|
126
|
-
const { ref:
|
|
127
|
-
isDisabled:
|
|
125
|
+
defaultValue: b ?? I,
|
|
126
|
+
render: ({ field: t, fieldState: s }) => {
|
|
127
|
+
var R;
|
|
128
|
+
const { ref: n, ...D } = t, E = !A(s.error), o = {
|
|
129
|
+
isDisabled: t.disabled ?? !1,
|
|
128
130
|
isRequired: (e == null ? void 0 : e.required) === !0 || (e == null ? void 0 : e.required) === "required",
|
|
129
|
-
isInvalid:
|
|
130
|
-
isError:
|
|
131
|
-
},
|
|
132
|
-
...
|
|
133
|
-
...
|
|
131
|
+
isInvalid: s.invalid,
|
|
132
|
+
isError: E
|
|
133
|
+
}, F = {
|
|
134
|
+
...u,
|
|
135
|
+
...o
|
|
134
136
|
};
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
|
|
137
|
+
return /* @__PURE__ */ i(
|
|
138
|
+
Y,
|
|
137
139
|
{
|
|
138
|
-
...
|
|
139
|
-
...
|
|
140
|
-
...
|
|
141
|
-
id:
|
|
142
|
-
hookFormRef:
|
|
143
|
-
name:
|
|
144
|
-
themeName:
|
|
145
|
-
label:
|
|
146
|
-
tokens:
|
|
147
|
-
disabled:
|
|
140
|
+
...D,
|
|
141
|
+
...o,
|
|
142
|
+
...P(),
|
|
143
|
+
id: q,
|
|
144
|
+
hookFormRef: n,
|
|
145
|
+
name: h,
|
|
146
|
+
themeName: c,
|
|
147
|
+
label: v,
|
|
148
|
+
tokens: F,
|
|
149
|
+
disabled: t.disabled,
|
|
148
150
|
required: (e == null ? void 0 : e.required) === !0 || (e == null ? void 0 : e.required) === "required",
|
|
149
|
-
isInvalid:
|
|
150
|
-
errorMessage: (
|
|
151
|
-
value:
|
|
152
|
-
options:
|
|
153
|
-
placeholderLabel:
|
|
154
|
-
icon:
|
|
155
|
-
popoverMatchesWidth:
|
|
156
|
-
onSelectionChange: (
|
|
157
|
-
|
|
151
|
+
isInvalid: s.invalid,
|
|
152
|
+
errorMessage: (R = s.error) == null ? void 0 : R.message,
|
|
153
|
+
value: t.value,
|
|
154
|
+
options: r,
|
|
155
|
+
placeholderLabel: p,
|
|
156
|
+
icon: O,
|
|
157
|
+
popoverMatchesWidth: f,
|
|
158
|
+
onSelectionChange: (g) => {
|
|
159
|
+
t.onChange(g), l == null || l(g);
|
|
158
160
|
}
|
|
159
161
|
}
|
|
160
162
|
);
|
|
@@ -163,6 +165,6 @@ const G = (g) => {
|
|
|
163
165
|
);
|
|
164
166
|
};
|
|
165
167
|
export {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
fe as ReactHookFormSelect,
|
|
169
|
+
Y as default
|
|
168
170
|
};
|
package/index160.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function n(r){var o,e,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var u=r.length;for(o=0;o<u;o++)r[o]&&(e=n(r[o]))&&(t&&(t+=" "),t+=e)}else for(e in r)r[e]&&(t&&(t+=" "),t+=e);return t}function f(){for(var r,o,e=0,t="",u=arguments.length;e<u;e++)(r=arguments[e])&&(o=n(r))&&(t&&(t+=" "),t+=o);return t}exports.clsx=f;exports.default=f;
|
package/index160.mjs
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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;
|
|
4
13
|
}
|
|
5
14
|
export {
|
|
6
|
-
|
|
15
|
+
i as clsx,
|
|
16
|
+
i as default
|
|
7
17
|
};
|
package/index161.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=new Set(["id"]),i=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),n=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),s=/^(data-.*)$/;function c(a,l={}){let{labelable:o,isLink:d,propNames:r}=l,t={};for(const e in a)Object.prototype.hasOwnProperty.call(a,e)&&(b.has(e)||o&&i.has(e)||d&&n.has(e)||r!=null&&r.has(e)||s.test(e))&&(t[e]=a[e]);return t}exports.filterDOMProps=c;
|
package/index161.mjs
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
const b = /* @__PURE__ */ new Set([
|
|
2
|
+
"id"
|
|
3
|
+
]), i = /* @__PURE__ */ new Set([
|
|
4
|
+
"aria-label",
|
|
5
|
+
"aria-labelledby",
|
|
6
|
+
"aria-describedby",
|
|
7
|
+
"aria-details"
|
|
8
|
+
]), s = /* @__PURE__ */ new Set([
|
|
9
|
+
"href",
|
|
10
|
+
"hrefLang",
|
|
11
|
+
"target",
|
|
12
|
+
"rel",
|
|
13
|
+
"download",
|
|
14
|
+
"ping",
|
|
15
|
+
"referrerPolicy"
|
|
16
|
+
]), n = /^(data-.*)$/;
|
|
17
|
+
function c(a, t = {}) {
|
|
18
|
+
let { labelable: d, isLink: o, propNames: r } = t, l = {};
|
|
19
|
+
for (const e in a) Object.prototype.hasOwnProperty.call(a, e) && (b.has(e) || d && i.has(e) || o && s.has(e) || r != null && r.has(e) || n.test(e)) && (l[e] = a[e]);
|
|
20
|
+
return l;
|
|
13
21
|
}
|
|
14
22
|
export {
|
|
15
|
-
|
|
16
|
-
i as default
|
|
23
|
+
c as filterDOMProps
|
|
17
24
|
};
|
package/index162.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(l){if(n())l.focus({preventScroll:!0});else{let e=s(l);l.focus(),f(e)}}let r=null;function n(){if(r==null){r=!1;try{document.createElement("div").focus({get preventScroll(){return r=!0,!0}})}catch{}}return r}function s(l){let e=l.parentNode,o=[],t=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==t;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&o.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return t instanceof HTMLElement&&o.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),o}function f(l){for(let{element:e,scrollTop:o,scrollLeft:t}of l)e.scrollTop=o,e.scrollLeft=t}exports.focusWithoutScrolling=c;
|