@rpcbase/ui 0.261.0 → 0.263.0
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/assets/sha256.worker-BEf4_Y9w.js.map +1 -0
- package/dist/components/FilesUploadField/index.d.ts +19 -6
- package/dist/components/FilesUploadField/index.d.ts.map +1 -1
- package/dist/components/FilesUploadField/sha256.d.ts +5 -0
- package/dist/components/FilesUploadField/sha256.d.ts.map +1 -0
- package/dist/components/FilesUploadField/sha256.worker.d.ts +4 -0
- package/dist/components/FilesUploadField/sha256.worker.d.ts.map +1 -0
- package/dist/components/ImagesField/index.d.ts +4 -2
- package/dist/components/ImagesField/index.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index298.js +11 -803
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +865 -28
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +26 -510
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +481 -755
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +786 -7428
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +7429 -7
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +6 -12
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +12 -5
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +3 -3
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +5 -469
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +464 -32
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +36 -18
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +17 -28
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +30 -4
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +4 -59
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +59 -9
- package/dist/index313.js.map +1 -1
- package/dist/index314.js +9 -5
- package/dist/index314.js.map +1 -1
- package/dist/index315.js +5 -9
- package/dist/index315.js.map +1 -1
- package/dist/index316.js +9 -12
- package/dist/index316.js.map +1 -1
- package/dist/index317.js +13 -3
- package/dist/index317.js.map +1 -1
- package/dist/index318.js +3 -17
- package/dist/index318.js.map +1 -1
- package/dist/index319.js +14 -23
- package/dist/index319.js.map +1 -1
- package/dist/index320.js +23 -39
- package/dist/index320.js.map +1 -1
- package/dist/index321.js +41 -5
- package/dist/index321.js.map +1 -1
- package/dist/index322.js +5 -25
- package/dist/index322.js.map +1 -1
- package/dist/index323.js +24 -18
- package/dist/index323.js.map +1 -1
- package/dist/index324.js +17 -32
- package/dist/index324.js.map +1 -1
- package/dist/index325.js +34 -5
- package/dist/index325.js.map +1 -1
- package/dist/index326.js +5 -9
- package/dist/index326.js.map +1 -1
- package/dist/index327.js +8 -7
- package/dist/index327.js.map +1 -1
- package/dist/index328.js +8 -9
- package/dist/index328.js.map +1 -1
- package/dist/index329.js +9 -10
- package/dist/index329.js.map +1 -1
- package/dist/index330.js +10 -7
- package/dist/index330.js.map +1 -1
- package/dist/index331.js +7 -75
- package/dist/index331.js.map +1 -1
- package/dist/index332.js +66 -153
- package/dist/index332.js.map +1 -1
- package/dist/index333.js +147 -99
- package/dist/index333.js.map +1 -1
- package/dist/index334.js +113 -13
- package/dist/index334.js.map +1 -1
- package/dist/index335.js +12 -78
- package/dist/index335.js.map +1 -1
- package/dist/index336.js +57 -23
- package/dist/index336.js.map +1 -1
- package/dist/index337.js +45 -12
- package/dist/index337.js.map +1 -1
- package/dist/index338.js +13 -16
- package/dist/index338.js.map +1 -1
- package/dist/index339.js +15 -100
- package/dist/index339.js.map +1 -1
- package/dist/index340.js +95 -50
- package/dist/index340.js.map +1 -1
- package/dist/index341.js +5 -57
- package/dist/index341.js.map +1 -1
- package/dist/index342.js +78 -41
- package/dist/index342.js.map +1 -1
- package/dist/index343.js +58 -100
- package/dist/index343.js.map +1 -1
- package/dist/index344.js +104 -46
- package/dist/index344.js.map +1 -1
- package/dist/index345.js +51 -39
- package/dist/index345.js.map +1 -1
- package/dist/index346.js +42 -142
- package/dist/index346.js.map +1 -1
- package/dist/index347.js +123 -120
- package/dist/index347.js.map +1 -1
- package/dist/index348.js +108 -224
- package/dist/index348.js.map +1 -1
- package/dist/index349.js +174 -158
- package/dist/index349.js.map +1 -1
- package/dist/index350.js +144 -213
- package/dist/index350.js.map +1 -1
- package/dist/index351.js +309 -5
- package/dist/index351.js.map +1 -1
- package/dist/index352.js +5 -6
- package/dist/index352.js.map +1 -1
- package/dist/index353.js +6 -7
- package/dist/index353.js.map +1 -1
- package/dist/index354.js +5 -4
- package/dist/index354.js.map +1 -1
- package/dist/index355.js +4 -4
- package/dist/index355.js.map +1 -1
- package/dist/index356.js +6 -21
- package/dist/index356.js.map +1 -1
- package/dist/index357.js +21 -10
- package/dist/index357.js.map +1 -1
- package/dist/index358.js +10 -128
- package/dist/index358.js.map +1 -1
- package/dist/index359.js +122 -36
- package/dist/index359.js.map +1 -1
- package/dist/index360.js +38 -64
- package/dist/index360.js.map +1 -1
- package/dist/index361.js +66 -115
- package/dist/index361.js.map +1 -1
- package/dist/index362.js +112 -485
- package/dist/index362.js.map +1 -1
- package/dist/index363.js +490 -13
- package/dist/index363.js.map +1 -1
- package/dist/index364.js +13 -4
- package/dist/index364.js.map +1 -1
- package/dist/index365.js +4 -47
- package/dist/index365.js.map +1 -1
- package/dist/index366.js +44 -15
- package/dist/index366.js.map +1 -1
- package/dist/index367.js +19 -5
- package/dist/index367.js.map +1 -1
- package/dist/index368.js +5 -27
- package/dist/index368.js.map +1 -1
- package/dist/index369.js +27 -48
- package/dist/index369.js.map +1 -1
- package/dist/index370.js +46 -27
- package/dist/index370.js.map +1 -1
- package/dist/index371.js +27 -16
- package/dist/index371.js.map +1 -1
- package/dist/index372.js +16 -41
- package/dist/index372.js.map +1 -1
- package/dist/index373.js +42 -14
- package/dist/index373.js.map +1 -1
- package/dist/index374.js +14 -10
- package/dist/index374.js.map +1 -1
- package/dist/index375.js +9 -51
- package/dist/index375.js.map +1 -1
- package/dist/index376.js +53 -43
- package/dist/index376.js.map +1 -1
- package/dist/index377.js +43 -16
- package/dist/index377.js.map +1 -1
- package/dist/index378.js +15 -4
- package/dist/index378.js.map +1 -1
- package/dist/index379.js +4 -4
- package/dist/index379.js.map +1 -1
- package/dist/index380.js +4 -9
- package/dist/index380.js.map +1 -1
- package/dist/index381.js +9 -340
- package/dist/index381.js.map +1 -1
- package/dist/index382.js +339 -4
- package/dist/index382.js.map +1 -1
- package/dist/index383.js +5 -16
- package/dist/index383.js.map +1 -1
- package/dist/index384.js +16 -111
- package/dist/index384.js.map +1 -1
- package/dist/index385.js +109 -19
- package/dist/index385.js.map +1 -1
- package/dist/index386.js +18 -18
- package/dist/index386.js.map +1 -1
- package/dist/index387.js +21 -5
- package/dist/index387.js.map +1 -1
- package/dist/index388.js +5 -20
- package/dist/index388.js.map +1 -1
- package/dist/index389.js +19 -13
- package/dist/index389.js.map +1 -1
- package/dist/index390.js +13 -84
- package/dist/index390.js.map +1 -1
- package/dist/index391.js +84 -7
- package/dist/index391.js.map +1 -1
- package/dist/index392.js +9 -29
- package/dist/index392.js.map +1 -1
- package/dist/index393.js +28 -9
- package/dist/index393.js.map +1 -1
- package/dist/index394.js +9 -5
- package/dist/index394.js.map +1 -1
- package/dist/index395.js +6 -252
- package/dist/index395.js.map +1 -1
- package/dist/index396.js +250 -10
- package/dist/index396.js.map +1 -1
- package/dist/index397.js +11 -10
- package/dist/index397.js.map +1 -1
- package/dist/index398.js +10 -6
- package/dist/index398.js.map +1 -1
- package/dist/index399.js +6 -22
- package/dist/index399.js.map +1 -1
- package/dist/index400.js +21 -21
- package/dist/index400.js.map +1 -1
- package/dist/index401.js +21 -107
- package/dist/index401.js.map +1 -1
- package/dist/index402.js +109 -15
- package/dist/index402.js.map +1 -1
- package/dist/index403.js +15 -12
- package/dist/index403.js.map +1 -1
- package/dist/index404.js +10 -8
- package/dist/index404.js.map +1 -1
- package/dist/index405.js +8 -242
- package/dist/index405.js.map +1 -1
- package/dist/index406.js +238 -25
- package/dist/index406.js.map +1 -1
- package/dist/index407.js +29 -51
- package/dist/index407.js.map +1 -1
- package/dist/index408.js +51 -10
- package/dist/index408.js.map +1 -1
- package/dist/index409.js +11 -128
- package/dist/index409.js.map +1 -1
- package/dist/index410.js +124 -35
- package/dist/index410.js.map +1 -1
- package/dist/index411.js +36 -23
- package/dist/index411.js.map +1 -1
- package/dist/index412.js +26 -11
- package/dist/index412.js.map +1 -1
- package/dist/index413.js +11 -23
- package/dist/index413.js.map +1 -1
- package/dist/index414.js +19 -13
- package/dist/index414.js.map +1 -1
- package/dist/index415.js +14 -13
- package/dist/index415.js.map +1 -1
- package/dist/index416.js +14 -322
- package/dist/index416.js.map +1 -1
- package/dist/index417.js +323 -61
- package/dist/index417.js.map +1 -1
- package/dist/index418.js +63 -4
- package/dist/index418.js.map +1 -1
- package/dist/index419.js +4 -28
- package/dist/index419.js.map +1 -1
- package/dist/index420.js +25 -468
- package/dist/index420.js.map +1 -1
- package/dist/index421.js +452 -250
- package/dist/index421.js.map +1 -1
- package/dist/index422.js +272 -0
- package/dist/index422.js.map +1 -0
- package/package.json +2 -1
package/dist/index385.js
CHANGED
|
@@ -1,25 +1,115 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import { mergeProps as e } from "./index195.js";
|
|
3
|
+
import { useRenderElement as t } from "./index196.js";
|
|
4
|
+
import { pressableTriggerOpenStateMapping as n } from "./index198.js";
|
|
5
|
+
import { useStableCallback as r } from "./index202.js";
|
|
6
|
+
import { useButton as i } from "./index207.js";
|
|
7
|
+
import { cancelOpen as ee, none as a } from "./index208.js";
|
|
8
|
+
import { createChangeEventDetails as o } from "./index209.js";
|
|
9
|
+
import { useTimeout as s } from "./index215.js";
|
|
10
|
+
import { contains as c } from "./index223.js";
|
|
11
|
+
import { getFloatingFocusElement as l } from "./index224.js";
|
|
12
|
+
import { useValueAsRef as u } from "./index227.js";
|
|
13
|
+
import { ownerDocument as d } from "./index229.js";
|
|
14
|
+
import { useStore as f } from "./index260.js";
|
|
15
|
+
import { useSelectRootContext as p } from "./index367.js";
|
|
16
|
+
import { fieldValidityMapping as m } from "./index369.js";
|
|
17
|
+
import { useFieldRootContext as te } from "./index370.js";
|
|
18
|
+
import { useLabelableContext as ne } from "./index372.js";
|
|
19
|
+
import { useLabelableId as re } from "./index373.js";
|
|
20
|
+
import { selectors as h } from "./index377.js";
|
|
21
|
+
import { resolveAriaLabelledBy as g } from "./index383.js";
|
|
22
|
+
import { getPseudoElementBounds as ie } from "./index384.js";
|
|
23
|
+
import * as _ from "react";
|
|
24
|
+
//#region ../../node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs
|
|
25
|
+
var v = 2, y = 400, b = {
|
|
26
|
+
...n,
|
|
27
|
+
...m,
|
|
28
|
+
popupSide: (e) => e ? { "data-popup-side": e } : null,
|
|
29
|
+
value: () => null
|
|
30
|
+
}, x = /*#__PURE__*/ _.forwardRef(function(n, m) {
|
|
31
|
+
let { render: x, className: ae, id: oe, disabled: S = !1, nativeButton: C = !0, style: se, ...w } = n, { setTouched: T, setFocused: E, validationMode: D, state: O, disabled: k } = te(), { labelId: A } = ne(), { store: j, setOpen: M, selectionRef: N, validation: P, readOnly: F, required: I, alignItemWithTriggerActiveRef: L, disabled: R } = p(), z = k || R || S, B = f(j, h.open), V = f(j, h.mounted), H = f(j, h.value), U = f(j, h.triggerProps), W = f(j, h.positionerElement), G = f(j, h.listElement), K = f(j, h.popupSide), q = f(j, h.id), ce = f(j, h.labelId), le = f(j, h.hasSelectedValue), ue = V && W ? K : null, J = oe ?? q, Y = g(A, ce);
|
|
32
|
+
re({ id: J });
|
|
33
|
+
let de = u(W), X = _.useRef(null), { getButtonProps: fe, buttonRef: pe } = i({
|
|
34
|
+
disabled: z,
|
|
35
|
+
native: C
|
|
36
|
+
}), me = r((e) => {
|
|
37
|
+
j.set("triggerElement", e);
|
|
38
|
+
}), he = s(), Z = s(), Q = s();
|
|
39
|
+
_.useEffect(() => {
|
|
40
|
+
if (B) return Q.start(y, () => {
|
|
41
|
+
N.current.allowUnselectedMouseUp = !0, N.current.allowSelectedMouseUp = !0;
|
|
42
|
+
}), () => {
|
|
43
|
+
Q.clear();
|
|
44
|
+
};
|
|
45
|
+
N.current = {
|
|
46
|
+
allowSelectedMouseUp: !1,
|
|
47
|
+
allowUnselectedMouseUp: !1,
|
|
48
|
+
dragY: 0
|
|
49
|
+
}, Z.clear();
|
|
50
|
+
}, [
|
|
51
|
+
B,
|
|
52
|
+
N,
|
|
53
|
+
Z,
|
|
54
|
+
Q
|
|
55
|
+
]);
|
|
56
|
+
let ge = e(U, {
|
|
57
|
+
id: J,
|
|
58
|
+
role: "combobox",
|
|
59
|
+
"aria-expanded": B ? "true" : "false",
|
|
60
|
+
"aria-haspopup": "listbox",
|
|
61
|
+
"aria-controls": B ? G?.id ?? l(W)?.id : void 0,
|
|
62
|
+
"aria-labelledby": Y,
|
|
63
|
+
"aria-readonly": F || void 0,
|
|
64
|
+
"aria-required": I || void 0,
|
|
65
|
+
tabIndex: z ? -1 : 0,
|
|
66
|
+
onFocus(e) {
|
|
67
|
+
E(!0), B && L.current && M(!1, o(a, e.nativeEvent)), he.start(0, () => {
|
|
68
|
+
j.set("forceMount", !0);
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
onBlur(e) {
|
|
72
|
+
c(W, e.relatedTarget) || (T(!0), E(!1), D === "onBlur" && P.commit(H));
|
|
73
|
+
},
|
|
74
|
+
onMouseDown(e) {
|
|
75
|
+
if (B) return;
|
|
76
|
+
let t = d(e.currentTarget);
|
|
77
|
+
function n(e) {
|
|
78
|
+
if (!X.current) return;
|
|
79
|
+
let t = e.target;
|
|
80
|
+
if (c(X.current, t) || c(de.current, t)) return;
|
|
81
|
+
let n = ie(X.current);
|
|
82
|
+
e.clientX >= n.left - v && e.clientX <= n.right + v && e.clientY >= n.top - v && e.clientY <= n.bottom + v || M(!1, o(ee, e));
|
|
83
|
+
}
|
|
84
|
+
Z.start(0, () => {
|
|
85
|
+
t.addEventListener("mouseup", n, { once: !0 });
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}, w, fe), $ = P.getValidationProps(z, ge);
|
|
89
|
+
$.role = "combobox";
|
|
90
|
+
let _e = {
|
|
91
|
+
...O,
|
|
92
|
+
open: B,
|
|
93
|
+
disabled: z,
|
|
94
|
+
value: H,
|
|
95
|
+
readOnly: F,
|
|
96
|
+
popupSide: ue,
|
|
97
|
+
placeholder: !le
|
|
98
|
+
};
|
|
99
|
+
return t("button", n, {
|
|
100
|
+
ref: [
|
|
101
|
+
m,
|
|
102
|
+
X,
|
|
103
|
+
pe,
|
|
104
|
+
me
|
|
105
|
+
],
|
|
106
|
+
state: _e,
|
|
107
|
+
stateAttributesMapping: b,
|
|
108
|
+
props: $
|
|
19
109
|
});
|
|
20
110
|
});
|
|
21
|
-
process.env.NODE_ENV !== "production" && (
|
|
111
|
+
process.env.NODE_ENV !== "production" && (x.displayName = "SelectTrigger");
|
|
22
112
|
//#endregion
|
|
23
|
-
export {
|
|
113
|
+
export { x as SelectTrigger };
|
|
24
114
|
|
|
25
115
|
//# sourceMappingURL=index385.js.map
|
package/dist/index385.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index385.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/value/SelectValue.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { resolveMultipleLabels, resolveSelectedLabel } from \"../../internals/resolveValueLabel.mjs\";\nimport { selectors } from \"../store.mjs\";\nconst stateAttributesMapping = {\n value: () => null\n};\n\n/**\n * A text label of the currently selected item.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectValue = /*#__PURE__*/React.forwardRef(function SelectValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children: childrenProp,\n placeholder,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n valueRef\n } = useSelectRootContext();\n const value = useStore(store, selectors.value);\n const items = useStore(store, selectors.items);\n const itemToStringLabel = useStore(store, selectors.itemToStringLabel);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null;\n const hasNullLabel = useStore(store, selectors.hasNullItemLabel, shouldCheckNullItemLabel);\n const state = {\n value,\n placeholder: !hasSelectedValue\n };\n let children = null;\n if (typeof childrenProp === 'function') {\n children = childrenProp(value);\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (!hasSelectedValue && placeholder != null && !hasNullLabel) {\n children = placeholder;\n } else if (Array.isArray(value)) {\n children = resolveMultipleLabels(value, items, itemToStringLabel);\n } else {\n children = resolveSelectedLabel(value, items, itemToStringLabel);\n }\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, valueRef],\n props: [{\n children\n }, elementProps],\n stateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectValue.displayName = \"SelectValue\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAQA,IAAM,IAAyB,EAC7B,aAAa,KACf,GAQa,IAA2B,gBAAM,WAAW,SAAqB,GAAgB,GAAc;CAC1G,IAAM,EACJ,cACA,WACA,UAAU,GACV,gBACA,UACA,GAAG,MACD,GACE,EACJ,UACA,gBACE,EAAqB,GACnB,IAAQ,EAAS,GAAO,EAAU,KAAK,GACvC,IAAQ,EAAS,GAAO,EAAU,KAAK,GACvC,IAAoB,EAAS,GAAO,EAAU,iBAAiB,GAC/D,IAAmB,EAAS,GAAO,EAAU,gBAAgB,GAC7D,IAA2B,CAAC,KAAoB,KAAe,QAAQ,KAAgB,MACvF,IAAe,EAAS,GAAO,EAAU,kBAAkB,CAAwB,GACnF,IAAQ;EACZ;EACA,aAAa,CAAC;CAChB,GACI,IAAW;CAoBf,OAnBA,AAGE,IAHE,OAAO,KAAiB,aACf,EAAa,CAAK,IACpB,MAEA,CAAC,KAAoB,KAAe,QAAQ,CAAC,IAC3C,IACF,MAAM,QAAQ,CAAK,IACjB,EAAsB,GAAO,GAAO,CAAiB,IAErD,EAAqB,GAAO,GAAO,CAAiB,IAEjD,EAAiB,QAAQ,GAAgB;EACvD;EACA,KAAK,CAAC,GAAc,CAAQ;EAC5B,OAAO,CAAC,EACN,YACF,GAAG,CAAY;EACf;CACF,CACa;AACf,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAY,cAAc"}
|
|
1
|
+
{"version":3,"file":"index385.js","names":["React","REASONS.none","REASONS.cancelOpen"],"sources":["../../../node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { getPseudoElementBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { contains, getFloatingFocusElement } from \"../../floating-ui-react/utils.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { resolveAriaLabelledBy } from \"../../utils/resolveAriaLabelledBy.mjs\";\nconst BOUNDARY_OFFSET = 2;\nconst SELECTED_DELAY = 400;\nconst stateAttributesMapping = {\n ...pressableTriggerOpenStateMapping,\n ...fieldValidityMapping,\n popupSide: side => side ? {\n 'data-popup-side': side\n } : null,\n value: () => null\n};\n\n/**\n * A button that opens the select popup.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectTrigger = /*#__PURE__*/React.forwardRef(function SelectTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n disabled: disabledProp = false,\n nativeButton = true,\n style,\n ...elementProps\n } = componentProps;\n const {\n setTouched,\n setFocused,\n validationMode,\n state: fieldState,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const {\n labelId: fieldLabelId\n } = useLabelableContext();\n const {\n store,\n setOpen,\n selectionRef,\n validation,\n readOnly,\n required,\n alignItemWithTriggerActiveRef,\n disabled: selectDisabled\n } = useSelectRootContext();\n const disabled = fieldDisabled || selectDisabled || disabledProp;\n const open = useStore(store, selectors.open);\n const mounted = useStore(store, selectors.mounted);\n const value = useStore(store, selectors.value);\n const triggerProps = useStore(store, selectors.triggerProps);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const popupSideValue = useStore(store, selectors.popupSide);\n const rootId = useStore(store, selectors.id);\n const selectLabelId = useStore(store, selectors.labelId);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const popupSide = mounted && positionerElement ? popupSideValue : null;\n const id = idProp ?? rootId;\n const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, selectLabelId);\n useLabelableId({\n id\n });\n const positionerRef = useValueAsRef(positionerElement);\n const triggerRef = React.useRef(null);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const setTriggerElement = useStableCallback(element => {\n store.set('triggerElement', element);\n });\n const timeoutFocus = useTimeout();\n const timeoutMouseDown = useTimeout();\n const selectedDelayTimeout = useTimeout();\n React.useEffect(() => {\n if (open) {\n // A mousedown on the trigger can open the popup under the cursor. Keep mouseup selection\n // disabled briefly so releasing over either the selected item or a neighboring item doesn't\n // commit an accidental selection. SelectItem can still opt into unselected mouseup sooner\n // after a real drag over the item.\n selectedDelayTimeout.start(SELECTED_DELAY, () => {\n selectionRef.current.allowUnselectedMouseUp = true;\n selectionRef.current.allowSelectedMouseUp = true;\n });\n return () => {\n selectedDelayTimeout.clear();\n };\n }\n selectionRef.current = {\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n };\n timeoutMouseDown.clear();\n return undefined;\n }, [open, selectionRef, timeoutMouseDown, selectedDelayTimeout]);\n const mergedProps = mergeProps(triggerProps, {\n id,\n role: 'combobox',\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-haspopup': 'listbox',\n 'aria-controls': open ? listElement?.id ?? getFloatingFocusElement(positionerElement)?.id : undefined,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n tabIndex: disabled ? -1 : 0,\n onFocus(event) {\n setFocused(true);\n\n // The popup element shouldn't obscure the focused trigger.\n if (open && alignItemWithTriggerActiveRef.current) {\n setOpen(false, createChangeEventDetails(REASONS.none, event.nativeEvent));\n }\n\n // Saves a re-render on initial click: `forceMount === true` mounts\n // the items before `open === true`. We could sync those cycles better\n // without a timeout, but this is enough for now.\n timeoutFocus.start(0, () => {\n store.set('forceMount', true);\n });\n },\n onBlur(event) {\n // If focus is moving into the popup, don't count it as a blur.\n if (contains(positionerElement, event.relatedTarget)) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n },\n onMouseDown(event) {\n if (open) {\n return;\n }\n const doc = ownerDocument(event.currentTarget);\n function handleMouseUp(mouseEvent) {\n if (!triggerRef.current) {\n return;\n }\n const mouseUpTarget = mouseEvent.target;\n\n // Don't treat the release as an outside press when it lands on the trigger or inside\n // the popup positioner (or their children).\n if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget)) {\n return;\n }\n const bounds = getPseudoElementBounds(triggerRef.current);\n if (mouseEvent.clientX >= bounds.left - BOUNDARY_OFFSET && mouseEvent.clientX <= bounds.right + BOUNDARY_OFFSET && mouseEvent.clientY >= bounds.top - BOUNDARY_OFFSET && mouseEvent.clientY <= bounds.bottom + BOUNDARY_OFFSET) {\n return;\n }\n setOpen(false, createChangeEventDetails(REASONS.cancelOpen, mouseEvent));\n }\n\n // Firefox can fire this upon mousedown\n timeoutMouseDown.start(0, () => {\n doc.addEventListener('mouseup', handleMouseUp, {\n once: true\n });\n });\n }\n }, elementProps, getButtonProps);\n const props = validation.getValidationProps(disabled, mergedProps);\n\n // ensure nested useButton does not overwrite the combobox role:\n // <Toolbar.Button render={<Select.Trigger />} />\n props.role = 'combobox';\n const state = {\n ...fieldState,\n open,\n disabled,\n value,\n readOnly,\n popupSide,\n placeholder: !hasSelectedValue\n };\n return useRenderElement('button', componentProps, {\n ref: [forwardedRef, triggerRef, buttonRef, setTriggerElement],\n state,\n stateAttributesMapping,\n props\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectTrigger.displayName = \"SelectTrigger\";"],"x_google_ignoreList":[0],"mappings":"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"}
|
package/dist/index386.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useRenderElement as e } from "./index196.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { selectors as
|
|
7
|
-
import * as
|
|
8
|
-
//#region ../../node_modules/@base-ui/react/select/
|
|
9
|
-
var
|
|
10
|
-
let { render:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
stateAttributesMapping:
|
|
3
|
+
import { useStore as t } from "./index260.js";
|
|
4
|
+
import { useSelectRootContext as n } from "./index367.js";
|
|
5
|
+
import { resolveMultipleLabels as r, resolveSelectedLabel as i } from "./index376.js";
|
|
6
|
+
import { selectors as a } from "./index377.js";
|
|
7
|
+
import * as o from "react";
|
|
8
|
+
//#region ../../node_modules/@base-ui/react/select/value/SelectValue.mjs
|
|
9
|
+
var s = { value: () => null }, c = /*#__PURE__*/ o.forwardRef(function(o, c) {
|
|
10
|
+
let { className: l, render: u, children: d, placeholder: f, style: p, ...m } = o, { store: h, valueRef: g } = n(), _ = t(h, a.value), v = t(h, a.items), y = t(h, a.itemToStringLabel), b = t(h, a.hasSelectedValue), x = !b && f != null && d == null, S = t(h, a.hasNullItemLabel, x), C = {
|
|
11
|
+
value: _,
|
|
12
|
+
placeholder: !b
|
|
13
|
+
}, w = null;
|
|
14
|
+
return w = typeof d == "function" ? d(_) : d ?? (!b && f != null && !S ? f : Array.isArray(_) ? r(_, v, y) : i(_, v, y)), e("span", o, {
|
|
15
|
+
state: C,
|
|
16
|
+
ref: [c, g],
|
|
17
|
+
props: [{ children: w }, m],
|
|
18
|
+
stateAttributesMapping: s
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
-
process.env.NODE_ENV !== "production" && (
|
|
21
|
+
process.env.NODE_ENV !== "production" && (c.displayName = "SelectValue");
|
|
22
22
|
//#endregion
|
|
23
|
-
export {
|
|
23
|
+
export { c as SelectValue };
|
|
24
24
|
|
|
25
25
|
//# sourceMappingURL=index386.js.map
|
package/dist/index386.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index386.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/
|
|
1
|
+
{"version":3,"file":"index386.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/value/SelectValue.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { resolveMultipleLabels, resolveSelectedLabel } from \"../../internals/resolveValueLabel.mjs\";\nimport { selectors } from \"../store.mjs\";\nconst stateAttributesMapping = {\n value: () => null\n};\n\n/**\n * A text label of the currently selected item.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectValue = /*#__PURE__*/React.forwardRef(function SelectValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children: childrenProp,\n placeholder,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n valueRef\n } = useSelectRootContext();\n const value = useStore(store, selectors.value);\n const items = useStore(store, selectors.items);\n const itemToStringLabel = useStore(store, selectors.itemToStringLabel);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null;\n const hasNullLabel = useStore(store, selectors.hasNullItemLabel, shouldCheckNullItemLabel);\n const state = {\n value,\n placeholder: !hasSelectedValue\n };\n let children = null;\n if (typeof childrenProp === 'function') {\n children = childrenProp(value);\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (!hasSelectedValue && placeholder != null && !hasNullLabel) {\n children = placeholder;\n } else if (Array.isArray(value)) {\n children = resolveMultipleLabels(value, items, itemToStringLabel);\n } else {\n children = resolveSelectedLabel(value, items, itemToStringLabel);\n }\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, valueRef],\n props: [{\n children\n }, elementProps],\n stateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectValue.displayName = \"SelectValue\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAQA,IAAM,IAAyB,EAC7B,aAAa,KACf,GAQa,IAA2B,gBAAM,WAAW,SAAqB,GAAgB,GAAc;CAC1G,IAAM,EACJ,cACA,WACA,UAAU,GACV,gBACA,UACA,GAAG,MACD,GACE,EACJ,UACA,gBACE,EAAqB,GACnB,IAAQ,EAAS,GAAO,EAAU,KAAK,GACvC,IAAQ,EAAS,GAAO,EAAU,KAAK,GACvC,IAAoB,EAAS,GAAO,EAAU,iBAAiB,GAC/D,IAAmB,EAAS,GAAO,EAAU,gBAAgB,GAC7D,IAA2B,CAAC,KAAoB,KAAe,QAAQ,KAAgB,MACvF,IAAe,EAAS,GAAO,EAAU,kBAAkB,CAAwB,GACnF,IAAQ;EACZ;EACA,aAAa,CAAC;CAChB,GACI,IAAW;CAoBf,OAnBA,AAGE,IAHE,OAAO,KAAiB,aACf,EAAa,CAAK,IACpB,MAEA,CAAC,KAAoB,KAAe,QAAQ,CAAC,IAC3C,IACF,MAAM,QAAQ,CAAK,IACjB,EAAsB,GAAO,GAAO,CAAiB,IAErD,EAAqB,GAAO,GAAO,CAAiB,IAEjD,EAAiB,QAAQ,GAAgB;EACvD;EACA,KAAK,CAAC,GAAc,CAAQ;EAC5B,OAAO,CAAC,EACN,YACF,GAAG,CAAY;EACf;CACF,CACa;AACf,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAY,cAAc"}
|
package/dist/index387.js
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { useRenderElement as e } from "./index196.js";
|
|
3
|
+
import { triggerOpenStateMapping as t } from "./index198.js";
|
|
4
|
+
import { useStore as n } from "./index260.js";
|
|
5
|
+
import { useSelectRootContext as r } from "./index367.js";
|
|
6
|
+
import { selectors as i } from "./index377.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
//#region ../../node_modules/@base-ui/react/select/icon/SelectIcon.mjs
|
|
9
|
+
var o = /*#__PURE__*/ a.forwardRef(function(a, o) {
|
|
10
|
+
let { render: s, className: c, style: l, ...u } = a, { store: d } = r();
|
|
11
|
+
return e("span", a, {
|
|
12
|
+
state: { open: n(d, i.open) },
|
|
13
|
+
ref: o,
|
|
14
|
+
props: [{
|
|
15
|
+
"aria-hidden": !0,
|
|
16
|
+
children: "▼"
|
|
17
|
+
}, u],
|
|
18
|
+
stateAttributesMapping: t
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
process.env.NODE_ENV !== "production" && (o.displayName = "SelectIcon");
|
|
6
22
|
//#endregion
|
|
7
|
-
export {
|
|
23
|
+
export { o as SelectIcon };
|
|
8
24
|
|
|
9
25
|
//# sourceMappingURL=index387.js.map
|
package/dist/index387.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index387.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/
|
|
1
|
+
{"version":3,"file":"index387.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/icon/SelectIcon.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * An icon that indicates that the trigger button opens a select popup.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectIcon = /*#__PURE__*/React.forwardRef(function SelectIcon(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useSelectRootContext();\n const open = useStore(store, selectors.open);\n const state = {\n open\n };\n const element = useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n 'aria-hidden': true,\n children: '▼'\n }, elementProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectIcon.displayName = \"SelectIcon\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAeA,IAAa,IAA0B,gBAAM,WAAW,SAAoB,GAAgB,GAAc;CACxG,IAAM,EACJ,WACA,cACA,UACA,GAAG,MACD,GACE,EACJ,aACE,EAAqB;CAczB,OATgB,EAAiB,QAAQ,GAAgB;EACvD,OAAA,EAHA,MAFW,EAAS,GAAO,EAAU,IAElC,EAGC;EACJ,KAAK;EACL,OAAO,CAAC;GACN,eAAe;GACf,UAAU;EACZ,GAAG,CAAY;EACf,wBAAwB;CAC1B,CACa;AACf,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAW,cAAc"}
|
package/dist/index388.js
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { SelectPortalContext as i } from "./index387.js";
|
|
7
|
-
import * as a from "react";
|
|
8
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
9
|
-
//#region ../../node_modules/@base-ui/react/select/portal/SelectPortal.mjs
|
|
10
|
-
var s = /*#__PURE__*/ a.forwardRef(function(a, s) {
|
|
11
|
-
let { store: c } = n(), l = t(c, r.mounted), u = t(c, r.forceMount);
|
|
12
|
-
return l || u ? /*#__PURE__*/ o(i.Provider, {
|
|
13
|
-
value: !0,
|
|
14
|
-
children: /*#__PURE__*/ o(e, {
|
|
15
|
-
ref: s,
|
|
16
|
-
...a
|
|
17
|
-
})
|
|
18
|
-
}) : null;
|
|
19
|
-
});
|
|
20
|
-
process.env.NODE_ENV !== "production" && (s.displayName = "SelectPortal");
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
//#region ../../node_modules/@base-ui/react/select/portal/SelectPortalContext.mjs
|
|
4
|
+
var t = /*#__PURE__*/ e.createContext(void 0);
|
|
5
|
+
process.env.NODE_ENV !== "production" && (t.displayName = "SelectPortalContext");
|
|
21
6
|
//#endregion
|
|
22
|
-
export {
|
|
7
|
+
export { t as SelectPortalContext };
|
|
23
8
|
|
|
24
9
|
//# sourceMappingURL=index388.js.map
|
package/dist/index388.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index388.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/portal/
|
|
1
|
+
{"version":3,"file":"index388.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/portal/SelectPortalContext.mjs"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectPortalContext.displayName = \"SelectPortalContext\";\nexport function useSelectPortalContext() {\n const value = React.useContext(SelectPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Select.Portal> is missing.' : _formatErrorMessage(58));\n }\n return value;\n}"],"x_google_ignoreList":[0],"mappings":";;;AAIA,IAAa,IAAmC,gBAAM,cAAc,KAAA,CAAS;AAC7E,QAAA,IAAA,aAA6B,iBAAc,EAAoB,cAAc"}
|
package/dist/index389.js
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { FloatingPortal as e } from "./index240.js";
|
|
3
|
+
import { useStore as t } from "./index260.js";
|
|
4
|
+
import { useSelectRootContext as n } from "./index367.js";
|
|
5
|
+
import { selectors as r } from "./index377.js";
|
|
6
|
+
import { SelectPortalContext as i } from "./index388.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
9
|
+
//#region ../../node_modules/@base-ui/react/select/portal/SelectPortal.mjs
|
|
10
|
+
var s = /*#__PURE__*/ a.forwardRef(function(a, s) {
|
|
11
|
+
let { store: c } = n(), l = t(c, r.mounted), u = t(c, r.forceMount);
|
|
12
|
+
return l || u ? /*#__PURE__*/ o(i.Provider, {
|
|
13
|
+
value: !0,
|
|
14
|
+
children: /*#__PURE__*/ o(e, {
|
|
15
|
+
ref: s,
|
|
16
|
+
...a
|
|
17
|
+
})
|
|
18
|
+
}) : null;
|
|
10
19
|
});
|
|
11
|
-
process.env.NODE_ENV !== "production" && (
|
|
12
|
-
function n() {
|
|
13
|
-
return e.useContext(t);
|
|
14
|
-
}
|
|
20
|
+
process.env.NODE_ENV !== "production" && (s.displayName = "SelectPortal");
|
|
15
21
|
//#endregion
|
|
16
|
-
export {
|
|
22
|
+
export { s as SelectPortal };
|
|
17
23
|
|
|
18
24
|
//# sourceMappingURL=index389.js.map
|
package/dist/index389.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index389.js","names":[
|
|
1
|
+
{"version":3,"file":"index389.js","names":[],"sources":["../../../node_modules/@base-ui/react/select/portal/SelectPortal.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { SelectPortalContext } from \"./SelectPortalContext.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectPortal = /*#__PURE__*/React.forwardRef(function SelectPortal(portalProps, forwardedRef) {\n const {\n store\n } = useSelectRootContext();\n const mounted = useStore(store, selectors.mounted);\n const forceMount = useStore(store, selectors.forceMount);\n const shouldRender = mounted || forceMount;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(SelectPortalContext.Provider, {\n value: true,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPortal.displayName = \"SelectPortal\";"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AAiBA,IAAa,IAA4B,gBAAM,WAAW,SAAsB,GAAa,GAAc;CACzG,IAAM,EACJ,aACE,EAAqB,GACnB,IAAU,EAAS,GAAO,EAAU,OAAO,GAC3C,IAAa,EAAS,GAAO,EAAU,UAAU;CAKvD,OAJqB,KAAW,IAIZ,gBAAK,EAAoB,UAAU;EACrD,OAAO;EACP,UAAuB,gBAAK,GAAgB;GAC1C,KAAK;GACL,GAAG;EACL,CAAC;CACH,CAAC,IARQ;AASX,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAa,cAAc"}
|
package/dist/index390.js
CHANGED
|
@@ -1,89 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}), C = i.useMemo(() => {
|
|
15
|
-
let e = /* @__PURE__ */ new Map();
|
|
16
|
-
return Array.from(_.keys()).filter((e) => e.isConnected).sort(l).forEach((t, n) => {
|
|
17
|
-
let r = _.get(t) ?? {};
|
|
18
|
-
e.set(t, {
|
|
19
|
-
...r,
|
|
20
|
-
index: n
|
|
21
|
-
});
|
|
22
|
-
}), e;
|
|
23
|
-
}, [_, v]);
|
|
24
|
-
n(() => {
|
|
25
|
-
if (typeof MutationObserver != "function" || C.size === 0) return;
|
|
26
|
-
let e = new MutationObserver((e) => {
|
|
27
|
-
let t = /* @__PURE__ */ new Set(), n = (e) => t.has(e) ? t.delete(e) : t.add(e);
|
|
28
|
-
e.forEach((e) => {
|
|
29
|
-
e.removedNodes.forEach(n), e.addedNodes.forEach(n);
|
|
30
|
-
}), t.size === 0 && (b.current += 1, y(b.current));
|
|
31
|
-
});
|
|
32
|
-
return C.forEach((t, n) => {
|
|
33
|
-
n.parentElement && e.observe(n.parentElement, { childList: !0 });
|
|
34
|
-
}), () => {
|
|
35
|
-
e.disconnect();
|
|
36
|
-
};
|
|
37
|
-
}, [C]), n(() => {
|
|
38
|
-
b.current === v && (d.current.length !== C.size && (d.current.length = C.size), f && f.current.length !== C.size && (f.current.length = C.size), h.current = C.size), m(C);
|
|
39
|
-
}, [
|
|
40
|
-
m,
|
|
41
|
-
C,
|
|
42
|
-
d,
|
|
43
|
-
f,
|
|
44
|
-
v
|
|
45
|
-
]), n(() => () => {
|
|
46
|
-
d.current = [];
|
|
47
|
-
}, [d]), n(() => () => {
|
|
48
|
-
f && (f.current = []);
|
|
49
|
-
}, [f]);
|
|
50
|
-
let w = t((e) => (g.add(e), () => {
|
|
51
|
-
g.delete(e);
|
|
52
|
-
}));
|
|
53
|
-
n(() => {
|
|
54
|
-
g.forEach((e) => e(C));
|
|
55
|
-
}, [g, C]);
|
|
56
|
-
let T = i.useMemo(() => ({
|
|
57
|
-
register: x,
|
|
58
|
-
unregister: S,
|
|
59
|
-
subscribeMapChange: w,
|
|
60
|
-
elementsRef: d,
|
|
61
|
-
labelsRef: f,
|
|
62
|
-
nextIndexRef: h
|
|
63
|
-
}), [
|
|
64
|
-
x,
|
|
65
|
-
S,
|
|
66
|
-
w,
|
|
67
|
-
d,
|
|
68
|
-
f,
|
|
69
|
-
h
|
|
70
|
-
]);
|
|
71
|
-
return /*#__PURE__*/ a(r.Provider, {
|
|
72
|
-
value: T,
|
|
73
|
-
children: u
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function s() {
|
|
77
|
-
return /* @__PURE__ */ new Map();
|
|
78
|
-
}
|
|
79
|
-
function c() {
|
|
80
|
-
return /* @__PURE__ */ new Set();
|
|
81
|
-
}
|
|
82
|
-
function l(e, t) {
|
|
83
|
-
let n = e.compareDocumentPosition(t);
|
|
84
|
-
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
//#region ../../node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs
|
|
4
|
+
var t = /*#__PURE__*/ e.createContext({
|
|
5
|
+
register: () => {},
|
|
6
|
+
unregister: () => {},
|
|
7
|
+
subscribeMapChange: () => () => {},
|
|
8
|
+
elementsRef: { current: [] },
|
|
9
|
+
nextIndexRef: { current: 0 }
|
|
10
|
+
});
|
|
11
|
+
process.env.NODE_ENV !== "production" && (t.displayName = "CompositeListContext");
|
|
12
|
+
function n() {
|
|
13
|
+
return e.useContext(t);
|
|
85
14
|
}
|
|
86
15
|
//#endregion
|
|
87
|
-
export {
|
|
16
|
+
export { t as CompositeListContext, n as useCompositeListContext };
|
|
88
17
|
|
|
89
18
|
//# sourceMappingURL=index390.js.map
|
package/dist/index390.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index390.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/composite/list/
|
|
1
|
+
{"version":3,"file":"index390.js","names":["React"],"sources":["../../../node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport const CompositeListContext = /*#__PURE__*/React.createContext({\n register: () => {},\n unregister: () => {},\n subscribeMapChange: () => {\n return () => {};\n },\n elementsRef: {\n current: []\n },\n nextIndexRef: {\n current: 0\n }\n});\nif (process.env.NODE_ENV !== \"production\") CompositeListContext.displayName = \"CompositeListContext\";\nexport function useCompositeListContext() {\n return React.useContext(CompositeListContext);\n}"],"x_google_ignoreList":[0],"mappings":";;;AAGA,IAAa,IAAoC,gBAAM,cAAc;CACnE,gBAAgB,CAAC;CACjB,kBAAkB,CAAC;CACnB,gCACe,CAAC;CAEhB,aAAa,EACX,SAAS,CAAC,EACZ;CACA,cAAc,EACZ,SAAS,EACX;AACF,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAqB,cAAc;AAC9E,SAAgB,IAA0B;CACxC,OAAOA,EAAM,WAAW,CAAoB;AAC9C"}
|
package/dist/index391.js
CHANGED
|
@@ -1,12 +1,89 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { useRefWithInit as e } from "./index185.js";
|
|
3
|
+
import { useStableCallback as t } from "./index202.js";
|
|
4
|
+
import { useIsoLayoutEffect as n } from "./index204.js";
|
|
5
|
+
import { CompositeListContext as r } from "./index390.js";
|
|
6
|
+
import * as i from "react";
|
|
7
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
8
|
+
//#region ../../node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
|
|
9
|
+
function o(o) {
|
|
10
|
+
let { children: u, elementsRef: d, labelsRef: f, onMapChange: p } = o, m = t(p), h = i.useRef(0), g = e(c).current, _ = e(s).current, [v, y] = i.useState(0), b = i.useRef(v), x = t((e, t) => {
|
|
11
|
+
_.set(e, t ?? null), b.current += 1, y(b.current);
|
|
12
|
+
}), S = t((e) => {
|
|
13
|
+
_.delete(e), b.current += 1, y(b.current);
|
|
14
|
+
}), C = i.useMemo(() => {
|
|
15
|
+
let e = /* @__PURE__ */ new Map();
|
|
16
|
+
return Array.from(_.keys()).filter((e) => e.isConnected).sort(l).forEach((t, n) => {
|
|
17
|
+
let r = _.get(t) ?? {};
|
|
18
|
+
e.set(t, {
|
|
19
|
+
...r,
|
|
20
|
+
index: n
|
|
21
|
+
});
|
|
22
|
+
}), e;
|
|
23
|
+
}, [_, v]);
|
|
24
|
+
n(() => {
|
|
25
|
+
if (typeof MutationObserver != "function" || C.size === 0) return;
|
|
26
|
+
let e = new MutationObserver((e) => {
|
|
27
|
+
let t = /* @__PURE__ */ new Set(), n = (e) => t.has(e) ? t.delete(e) : t.add(e);
|
|
28
|
+
e.forEach((e) => {
|
|
29
|
+
e.removedNodes.forEach(n), e.addedNodes.forEach(n);
|
|
30
|
+
}), t.size === 0 && (b.current += 1, y(b.current));
|
|
31
|
+
});
|
|
32
|
+
return C.forEach((t, n) => {
|
|
33
|
+
n.parentElement && e.observe(n.parentElement, { childList: !0 });
|
|
34
|
+
}), () => {
|
|
35
|
+
e.disconnect();
|
|
36
|
+
};
|
|
37
|
+
}, [C]), n(() => {
|
|
38
|
+
b.current === v && (d.current.length !== C.size && (d.current.length = C.size), f && f.current.length !== C.size && (f.current.length = C.size), h.current = C.size), m(C);
|
|
39
|
+
}, [
|
|
40
|
+
m,
|
|
41
|
+
C,
|
|
42
|
+
d,
|
|
43
|
+
f,
|
|
44
|
+
v
|
|
45
|
+
]), n(() => () => {
|
|
46
|
+
d.current = [];
|
|
47
|
+
}, [d]), n(() => () => {
|
|
48
|
+
f && (f.current = []);
|
|
49
|
+
}, [f]);
|
|
50
|
+
let w = t((e) => (g.add(e), () => {
|
|
51
|
+
g.delete(e);
|
|
52
|
+
}));
|
|
53
|
+
n(() => {
|
|
54
|
+
g.forEach((e) => e(C));
|
|
55
|
+
}, [g, C]);
|
|
56
|
+
let T = i.useMemo(() => ({
|
|
57
|
+
register: x,
|
|
58
|
+
unregister: S,
|
|
59
|
+
subscribeMapChange: w,
|
|
60
|
+
elementsRef: d,
|
|
61
|
+
labelsRef: f,
|
|
62
|
+
nextIndexRef: h
|
|
63
|
+
}), [
|
|
64
|
+
x,
|
|
65
|
+
S,
|
|
66
|
+
w,
|
|
67
|
+
d,
|
|
68
|
+
f,
|
|
69
|
+
h
|
|
70
|
+
]);
|
|
71
|
+
return /*#__PURE__*/ a(r.Provider, {
|
|
72
|
+
value: T,
|
|
73
|
+
children: u
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function s() {
|
|
77
|
+
return /* @__PURE__ */ new Map();
|
|
78
|
+
}
|
|
79
|
+
function c() {
|
|
80
|
+
return /* @__PURE__ */ new Set();
|
|
81
|
+
}
|
|
82
|
+
function l(e, t) {
|
|
83
|
+
let n = e.compareDocumentPosition(t);
|
|
84
|
+
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
8
85
|
}
|
|
9
86
|
//#endregion
|
|
10
|
-
export {
|
|
87
|
+
export { o as CompositeList };
|
|
11
88
|
|
|
12
89
|
//# sourceMappingURL=index391.js.map
|