@yselimcan/ui 0.0.5 → 0.0.6
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/index100.js +32 -5
- package/dist/index101.js +19 -8
- package/dist/index102.js +4 -86
- package/dist/index103.js +4 -13
- package/dist/index104.js +5 -63
- package/dist/index105.js +12 -38
- package/dist/index106.js +19 -14
- package/dist/index107.js +13 -33
- package/dist/index108.js +297 -19
- package/dist/index109.js +4 -5
- package/dist/index110.js +39 -4
- package/dist/index111.js +126 -5
- package/dist/index112.js +4 -11
- package/dist/index113.js +21 -19
- package/dist/index114.js +77 -13
- package/dist/index115.js +59 -291
- package/dist/index116.js +45 -4
- package/dist/index117.js +65 -37
- package/dist/index118.js +8 -125
- package/dist/index119.js +13 -20
- package/dist/index120.js +3 -76
- package/dist/index121.js +3 -64
- package/dist/index122.js +5 -45
- package/dist/index123.js +134 -14
- package/dist/index124.js +27 -5
- package/dist/index125.js +6 -27
- package/dist/index127.js +11 -26
- package/dist/index128.js +20 -15
- package/dist/index129.js +14 -22
- package/dist/index130.js +5 -58
- package/dist/index131.js +28 -16
- package/dist/index132.js +15 -25
- package/dist/index133.js +21 -40
- package/dist/index134.js +59 -43
- package/dist/index135.js +15 -19
- package/dist/index136.js +26 -47
- package/dist/index137.js +38 -49
- package/dist/index138.js +43 -18
- package/dist/index139.js +21 -11
- package/dist/index140.js +48 -22
- package/dist/index141.js +50 -34
- package/dist/index142.js +16 -229
- package/dist/index143.js +11 -283
- package/dist/index144.js +21 -52
- package/dist/index145.js +35 -15
- package/dist/index146.js +225 -74
- package/dist/index147.js +283 -3
- package/dist/index148.js +53 -30
- package/dist/index149.js +16 -24
- package/dist/index150.js +79 -15
- package/dist/index151.js +3 -69
- package/dist/index152.js +31 -4
- package/dist/index153.js +22 -103
- package/dist/index154.js +15 -79
- package/dist/index155.js +65 -259
- package/dist/index156.js +4 -12
- package/dist/index157.js +105 -11
- package/dist/index158.js +76 -37
- package/dist/index159.js +263 -4
- package/dist/index160.js +11 -66
- package/dist/index161.js +10 -9
- package/dist/index162.js +40 -8
- package/dist/index163.js +4 -5
- package/dist/index164.js +62 -129
- package/dist/index165.js +10 -54
- package/dist/index166.js +8 -11
- package/dist/index167.js +6 -118
- package/dist/index168.js +53 -11
- package/dist/index169.js +11 -8
- package/dist/index17.js +4 -4
- package/dist/index170.js +117 -12
- package/dist/index171.js +11 -22
- package/dist/index172.js +1 -1
- package/dist/index173.js +2 -2
- package/dist/index174.js +1 -1
- package/dist/index175.js +2 -2
- package/dist/index176.js +1 -1
- package/dist/index177.js +1 -1
- package/dist/index178.js +6 -6
- package/dist/index179.js +1 -1
- package/dist/index18.js +3 -3
- package/dist/index180.js +1 -1
- package/dist/index181.js +1 -1
- package/dist/index182.js +1 -1
- package/dist/index183.js +1 -1
- package/dist/index184.js +1 -1
- package/dist/index187.js +6 -6
- package/dist/index189.js +2 -2
- package/dist/index19.js +9 -9
- package/dist/index190.js +2 -2
- package/dist/index191.js +1 -1
- package/dist/index192.js +2 -2
- package/dist/index193.js +1 -1
- package/dist/index194.js +2 -2
- package/dist/index195.js +2 -2
- package/dist/index196.js +7 -7
- package/dist/index197.js +3 -3
- package/dist/index198.js +6 -6
- package/dist/index199.js +1 -1
- package/dist/index20.js +2 -2
- package/dist/index200.js +47 -5
- package/dist/index201.js +193 -41
- package/dist/index202.js +30 -182
- package/dist/index203.js +20 -48
- package/dist/index204.js +27 -20
- package/dist/index205.js +5 -26
- package/dist/index206.js +9 -11
- package/dist/index207.js +11 -6
- package/dist/index208.js +17 -4
- package/dist/index209.js +6 -9
- package/dist/index21.js +3 -3
- package/dist/index210.js +4 -17
- package/dist/index217.js +2 -2
- package/dist/index218.js +1 -1
- package/dist/index219.js +4 -39
- package/dist/index22.js +5 -5
- package/dist/index220.js +4 -56
- package/dist/index221.js +14 -27
- package/dist/index222.js +32 -7
- package/dist/index223.js +37 -11
- package/dist/index224.js +57 -12
- package/dist/index225.js +27 -11
- package/dist/index226.js +6 -20
- package/dist/index227.js +11 -10
- package/dist/index228.js +11 -7
- package/dist/index229.js +11 -42
- package/dist/index23.js +2 -2
- package/dist/index230.js +22 -4
- package/dist/index231.js +11 -4
- package/dist/index232.js +6 -595
- package/dist/index233.js +42 -11
- package/dist/index234.js +594 -12
- package/dist/index235.js +11 -32
- package/dist/index239.js +2 -2
- package/dist/index24.js +8 -8
- package/dist/index242.js +4 -4
- package/dist/index243.js +1 -1
- package/dist/index244.js +1 -1
- package/dist/index246.js +2 -2
- package/dist/index247.js +1 -1
- package/dist/index251.js +1 -1
- package/dist/index32.js +1 -1
- package/dist/index33.js +15 -15
- package/dist/index34.js +5 -5
- package/dist/index35.js +12 -12
- package/dist/index36.js +10 -10
- package/dist/index37.js +7 -7
- package/dist/index38.js +7 -7
- package/dist/index39.js +4 -4
- package/dist/index40.js +2 -2
- package/dist/index41.js +2 -2
- package/dist/index42.js +2 -2
- package/dist/index43.js +1 -1
- package/dist/index45.js +5 -5
- package/dist/index46.js +9 -9
- package/dist/index47.js +8 -8
- package/dist/index48.js +17 -17
- package/dist/index49.js +4 -4
- package/dist/index50.js +10 -10
- package/dist/index52.js +14 -14
- package/dist/index53.js +1 -1
- package/dist/index54.js +16 -16
- package/dist/index55.js +8 -8
- package/dist/index56.js +9 -9
- package/dist/index58.js +1 -1
- package/dist/index59.js +2 -2
- package/dist/index60.js +6 -6
- package/dist/index61.js +2 -2
- package/dist/index62.js +2 -2
- package/dist/index63.js +5 -5
- package/dist/index64.js +2 -2
- package/dist/index66.js +7 -7
- package/dist/index69.js +31 -31
- package/dist/index70.js +5 -5
- package/dist/index71.js +16 -16
- package/dist/index72.js +22 -22
- package/dist/index73.js +7 -7
- package/dist/index74.js +1 -1
- package/dist/index75.js +11 -11
- package/dist/index76.js +2 -2
- package/dist/index77.js +4 -4
- package/dist/index78.js +2 -2
- package/dist/index79.js +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.js +16 -16
- package/dist/index82.js +4 -4
- package/dist/index83.js +4 -4
- package/dist/index87.js +7 -7
- package/dist/index88.js +9 -9
- package/dist/index89.js +5 -5
- package/dist/index94.js +7 -4
- package/dist/index95.js +86 -65
- package/dist/index96.js +12 -8
- package/dist/index97.js +61 -12
- package/dist/index98.js +38 -4
- package/dist/index99.js +14 -4
- package/dist/styles.css +1 -1
- package/package.json +4 -3
package/dist/index202.js
CHANGED
|
@@ -1,202 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { useIsoLayoutEffect as i } from "./index126.js";
|
|
6
|
-
import { NOOP as d } from "./index100.js";
|
|
7
|
-
class O extends l {
|
|
8
|
-
/**
|
|
9
|
-
* Creates a new ReactStore instance.
|
|
10
|
-
*
|
|
11
|
-
* @param state Initial state of the store.
|
|
12
|
-
* @param context Non-reactive context values.
|
|
13
|
-
* @param selectors Optional selectors for use with `useState`.
|
|
14
|
-
*/
|
|
15
|
-
constructor(e, t = {}, s) {
|
|
16
|
-
super(e), this.context = t, this.selectors = s;
|
|
1
|
+
import i from "./index112.js";
|
|
2
|
+
class a {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.elements = /* @__PURE__ */ new Set(), this.idMap = /* @__PURE__ */ new Map();
|
|
17
5
|
}
|
|
18
6
|
/**
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Keeps track of which properties are controlled.
|
|
23
|
-
*/
|
|
24
|
-
controlledValues = /* @__PURE__ */ new Map();
|
|
25
|
-
/**
|
|
26
|
-
* Synchronizes a single external value into the store.
|
|
7
|
+
* Adds a trigger element with the given ID.
|
|
27
8
|
*
|
|
28
|
-
* Note
|
|
29
|
-
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
9
|
+
* Note: The provided element is assumed to not be registered under multiple IDs.
|
|
30
10
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
11
|
+
add(e, t) {
|
|
12
|
+
const s = this.idMap.get(e);
|
|
13
|
+
if (s !== t && (s !== void 0 && this.elements.delete(s), this.elements.add(t), this.idMap.set(e, t), process.env.NODE_ENV !== "production" && this.elements.size !== this.idMap.size))
|
|
14
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap." : i(87));
|
|
35
15
|
}
|
|
36
16
|
/**
|
|
37
|
-
*
|
|
38
|
-
* cleans it up (sets to `undefined`) on unmount.
|
|
39
|
-
*
|
|
40
|
-
* Note that the while the value in `state` is updated immediately, the value returned
|
|
41
|
-
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
17
|
+
* Removes the trigger element with the given ID.
|
|
42
18
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}), [e, t]);
|
|
19
|
+
delete(e) {
|
|
20
|
+
const t = this.idMap.get(e);
|
|
21
|
+
t && (this.elements.delete(t), this.idMap.delete(e));
|
|
47
22
|
}
|
|
48
23
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* Note that the while the values in `state` are updated immediately, the values returned
|
|
52
|
-
* by `useState` are updated before the next render (similarly to React's `useState`).
|
|
24
|
+
* Whether the given element is registered as a trigger.
|
|
53
25
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
r.useDebugValue(e, (n) => Object.keys(n));
|
|
57
|
-
const s = r.useRef(Object.keys(e)).current, o = Object.keys(e);
|
|
58
|
-
(s.length !== o.length || s.some((n, u) => n !== o[u])) && console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
59
|
-
}
|
|
60
|
-
const t = Object.values(e);
|
|
61
|
-
i(() => {
|
|
62
|
-
this.update(e);
|
|
63
|
-
}, t);
|
|
26
|
+
hasElement(e) {
|
|
27
|
+
return this.elements.has(e);
|
|
64
28
|
}
|
|
65
29
|
/**
|
|
66
|
-
*
|
|
67
|
-
* - If `controlled` is non-undefined, the key is marked as controlled and the store's
|
|
68
|
-
* state at `key` is updated to match `controlled`. Local writes to that key are ignored.
|
|
69
|
-
* - If `controlled` is undefined, the key is marked as uncontrolled. The store's state
|
|
70
|
-
* is initialized to `defaultValue` on first render and can be updated with local writes.
|
|
30
|
+
* Whether there is a registered trigger element matching the given predicate.
|
|
71
31
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
n !== void 0 && n !== o && console.error(`A component is changing the ${o ? "" : "un"}controlled state of ${e.toString()} to be ${o ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
78
|
-
}
|
|
79
|
-
this.controlledValues.has(e) || (this.controlledValues.set(e, o), !o && !Object.is(this.state[e], s) && super.setState({
|
|
80
|
-
...this.state,
|
|
81
|
-
[e]: s
|
|
82
|
-
})), i(() => {
|
|
83
|
-
o && !Object.is(this.state[e], t) && super.setState({
|
|
84
|
-
...this.state,
|
|
85
|
-
[e]: t
|
|
86
|
-
});
|
|
87
|
-
}, [e, t, s, o]);
|
|
32
|
+
hasMatchingElement(e) {
|
|
33
|
+
for (const t of this.elements)
|
|
34
|
+
if (e(t))
|
|
35
|
+
return !0;
|
|
36
|
+
return !1;
|
|
88
37
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* If the key is controlled (registered via {@link useControlledProp} with a non-undefined value),
|
|
92
|
-
* the update is ignored and no listeners are notified.
|
|
93
|
-
*
|
|
94
|
-
* @param key The state key to update.
|
|
95
|
-
* @param value The new value to set for the specified key.
|
|
96
|
-
*/
|
|
97
|
-
set(e, t) {
|
|
98
|
-
this.controlledValues.get(e) !== !0 && super.set(e, t);
|
|
38
|
+
getById(e) {
|
|
39
|
+
return this.idMap.get(e);
|
|
99
40
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
* Controlled keys are filtered out and not updated.
|
|
103
|
-
*
|
|
104
|
-
* @param values An object containing the changes to apply to the current state.
|
|
105
|
-
*/
|
|
106
|
-
update(e) {
|
|
107
|
-
const t = {
|
|
108
|
-
...e
|
|
109
|
-
};
|
|
110
|
-
for (const s in t)
|
|
111
|
-
if (Object.hasOwn(t, s) && this.controlledValues.get(s) === !0) {
|
|
112
|
-
delete t[s];
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
super.update(t);
|
|
41
|
+
entries() {
|
|
42
|
+
return this.idMap.entries();
|
|
116
43
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
* Controlled keys are left unchanged; only uncontrolled keys from `newState` are applied.
|
|
120
|
-
*
|
|
121
|
-
* @param newState The new state to set for the store.
|
|
122
|
-
*/
|
|
123
|
-
setState(e) {
|
|
124
|
-
const t = {
|
|
125
|
-
...e
|
|
126
|
-
};
|
|
127
|
-
for (const s in t)
|
|
128
|
-
if (Object.hasOwn(t, s) && this.controlledValues.get(s) === !0) {
|
|
129
|
-
delete t[s];
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
super.setState({
|
|
133
|
-
...this.state,
|
|
134
|
-
...t
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
/** Gets the current value from the store using a selector with the provided key.
|
|
138
|
-
*
|
|
139
|
-
* @param key Key of the selector to use.
|
|
140
|
-
*/
|
|
141
|
-
select = (e, t, s, o) => {
|
|
142
|
-
const n = this.selectors[e];
|
|
143
|
-
return n(this.state, t, s, o);
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* Returns a value from the store's state using a selector function.
|
|
147
|
-
* Used to subscribe to specific parts of the state.
|
|
148
|
-
* This methods causes a rerender whenever the selected state changes.
|
|
149
|
-
*
|
|
150
|
-
* @param key Key of the selector to use.
|
|
151
|
-
*/
|
|
152
|
-
useState = (e, t, s, o) => {
|
|
153
|
-
r.useDebugValue(e);
|
|
154
|
-
const n = this.selectors[e];
|
|
155
|
-
return a(this, n, t, s, o);
|
|
156
|
-
};
|
|
157
|
-
/**
|
|
158
|
-
* Wraps a function with `useStableCallback` to ensure it has a stable reference
|
|
159
|
-
* and assigns it to the context.
|
|
160
|
-
*
|
|
161
|
-
* @param key Key of the event callback. Must be a function in the context.
|
|
162
|
-
* @param fn Function to assign.
|
|
163
|
-
*/
|
|
164
|
-
useContextCallback(e, t) {
|
|
165
|
-
r.useDebugValue(e);
|
|
166
|
-
const s = h(t ?? d);
|
|
167
|
-
this.context[e] = s;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Returns a stable setter function for a specific key in the store's state.
|
|
171
|
-
* It's commonly used to pass as a ref callback to React elements.
|
|
172
|
-
*
|
|
173
|
-
* @param key Key of the state to set.
|
|
174
|
-
*/
|
|
175
|
-
useStateSetter(e) {
|
|
176
|
-
const t = r.useRef(void 0);
|
|
177
|
-
return t.current === void 0 && (t.current = (s) => {
|
|
178
|
-
this.set(e, s);
|
|
179
|
-
}), t.current;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Observes changes derived from the store's selectors and calls the listener when the selected value changes.
|
|
183
|
-
*
|
|
184
|
-
* @param key Key of the selector to observe.
|
|
185
|
-
* @param listener Listener function called when the selector result changes.
|
|
186
|
-
*/
|
|
187
|
-
observe(e, t) {
|
|
188
|
-
let s;
|
|
189
|
-
typeof e == "function" ? s = e : s = this.selectors[e];
|
|
190
|
-
let o = s(this.state);
|
|
191
|
-
return t(o, o, this), this.subscribe((n) => {
|
|
192
|
-
const u = s(n);
|
|
193
|
-
if (!Object.is(o, u)) {
|
|
194
|
-
const c = o;
|
|
195
|
-
o = u, t(u, c, this);
|
|
196
|
-
}
|
|
197
|
-
});
|
|
44
|
+
get size() {
|
|
45
|
+
return this.idMap.size;
|
|
198
46
|
}
|
|
199
47
|
}
|
|
200
48
|
export {
|
|
201
|
-
|
|
49
|
+
a as PopupTriggerMap
|
|
202
50
|
};
|
package/dist/index203.js
CHANGED
|
@@ -1,50 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const t = this.idMap.get(e);
|
|
21
|
-
t && (this.elements.delete(t), this.idMap.delete(e));
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Whether the given element is registered as a trigger.
|
|
25
|
-
*/
|
|
26
|
-
hasElement(e) {
|
|
27
|
-
return this.elements.has(e);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Whether there is a registered trigger element matching the given predicate.
|
|
31
|
-
*/
|
|
32
|
-
hasMatchingElement(e) {
|
|
33
|
-
for (const t of this.elements)
|
|
34
|
-
if (e(t))
|
|
35
|
-
return !0;
|
|
36
|
-
return !1;
|
|
37
|
-
}
|
|
38
|
-
getById(e) {
|
|
39
|
-
return this.idMap.get(e);
|
|
40
|
-
}
|
|
41
|
-
entries() {
|
|
42
|
-
return this.idMap.entries();
|
|
43
|
-
}
|
|
44
|
-
get size() {
|
|
45
|
-
return this.idMap.size;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
import t from "./index112.js";
|
|
2
|
+
import { createSelectorCreator as s, lruMemoize as i } from "./index248.js";
|
|
3
|
+
s({
|
|
4
|
+
memoize: i,
|
|
5
|
+
memoizeOptions: {
|
|
6
|
+
maxSize: 1,
|
|
7
|
+
equalityCheck: Object.is
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
const u = (e, m, c, n, l, p, ...o) => {
|
|
11
|
+
if (o.length > 0)
|
|
12
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Unsupported number of selectors" : t(1));
|
|
13
|
+
let r;
|
|
14
|
+
if (e)
|
|
15
|
+
r = e;
|
|
16
|
+
else
|
|
17
|
+
throw new Error("Missing arguments");
|
|
18
|
+
return r;
|
|
19
|
+
};
|
|
48
20
|
export {
|
|
49
|
-
|
|
21
|
+
u as createSelector
|
|
50
22
|
};
|
package/dist/index204.js
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import * as l from "react-dom";
|
|
3
|
+
import { useAnimationFrame as m } from "./index164.js";
|
|
4
|
+
import { useStableCallback as u } from "./index124.js";
|
|
5
|
+
import { resolveRef as c } from "./index240.js";
|
|
6
|
+
function S(s, f = !1, a = !0) {
|
|
7
|
+
const i = m();
|
|
8
|
+
return u((r, t = null) => {
|
|
9
|
+
i.cancel();
|
|
10
|
+
const e = c(s);
|
|
11
|
+
e != null && (typeof e.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED ? r() : i.request(() => {
|
|
12
|
+
function o() {
|
|
13
|
+
e && Promise.all(e.getAnimations().map((n) => n.finished)).then(() => {
|
|
14
|
+
t != null && t.aborted || l.flushSync(r);
|
|
15
|
+
}).catch(() => {
|
|
16
|
+
if (a) {
|
|
17
|
+
if (t != null && t.aborted)
|
|
18
|
+
return;
|
|
19
|
+
l.flushSync(r);
|
|
20
|
+
} else e.getAnimations().length > 0 && e.getAnimations().some((n) => n.pending || n.playState !== "finished") && o();
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
f ? i.request(o) : o();
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
20
27
|
export {
|
|
21
|
-
|
|
28
|
+
S as useAnimationsFinished
|
|
22
29
|
};
|
package/dist/index205.js
CHANGED
|
@@ -1,29 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { resolveRef as c } from "./index240.js";
|
|
6
|
-
function S(s, f = !1, a = !0) {
|
|
7
|
-
const i = m();
|
|
8
|
-
return u((r, t = null) => {
|
|
9
|
-
i.cancel();
|
|
10
|
-
const e = c(s);
|
|
11
|
-
e != null && (typeof e.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED ? r() : i.request(() => {
|
|
12
|
-
function o() {
|
|
13
|
-
e && Promise.all(e.getAnimations().map((n) => n.finished)).then(() => {
|
|
14
|
-
t != null && t.aborted || l.flushSync(r);
|
|
15
|
-
}).catch(() => {
|
|
16
|
-
if (a) {
|
|
17
|
-
if (t != null && t.aborted)
|
|
18
|
-
return;
|
|
19
|
-
l.flushSync(r);
|
|
20
|
-
} else e.getAnimations().length > 0 && e.getAnimations().some((n) => n.pending || n.playState !== "finished") && o();
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
f ? i.request(o) : o();
|
|
24
|
-
}));
|
|
25
|
-
});
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
const e = parseInt(t.version, 10);
|
|
3
|
+
function o(r) {
|
|
4
|
+
return e >= r;
|
|
26
5
|
}
|
|
27
6
|
export {
|
|
28
|
-
|
|
7
|
+
o as isReactVersionAtLeast
|
|
29
8
|
};
|
package/dist/index206.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
function t
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
return String(r);
|
|
10
|
-
}
|
|
1
|
+
function n(e, t) {
|
|
2
|
+
return {
|
|
3
|
+
...e,
|
|
4
|
+
state: {
|
|
5
|
+
...e.state,
|
|
6
|
+
valid: !t && e.state.valid
|
|
7
|
+
}
|
|
8
|
+
};
|
|
11
9
|
}
|
|
12
10
|
export {
|
|
13
|
-
|
|
11
|
+
n as getCombinedFieldValidityData
|
|
14
12
|
};
|
package/dist/index207.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
function t(r) {
|
|
2
|
+
if (r == null)
|
|
3
|
+
return "";
|
|
4
|
+
if (typeof r == "string")
|
|
5
|
+
return r;
|
|
6
|
+
try {
|
|
7
|
+
return JSON.stringify(r);
|
|
8
|
+
} catch {
|
|
9
|
+
return String(r);
|
|
10
|
+
}
|
|
6
11
|
}
|
|
7
12
|
export {
|
|
8
|
-
|
|
13
|
+
t as serializeValue
|
|
9
14
|
};
|
package/dist/index208.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
function e(i) {
|
|
3
|
+
const o = n.useRef(""), c = n.useCallback((r) => {
|
|
4
|
+
r.defaultPrevented || (o.current = r.pointerType, i(r, r.pointerType));
|
|
5
|
+
}, [i]);
|
|
6
|
+
return {
|
|
7
|
+
onClick: n.useCallback((r) => {
|
|
8
|
+
if (r.detail === 0) {
|
|
9
|
+
i(r, "keyboard");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
"pointerType" in r && i(r, r.pointerType), i(r, o.current), o.current = "";
|
|
13
|
+
}, [i]),
|
|
14
|
+
onPointerDown: c
|
|
15
|
+
};
|
|
16
|
+
}
|
|
4
17
|
export {
|
|
5
|
-
|
|
18
|
+
e as useEnhancedClickHandler
|
|
6
19
|
};
|
package/dist/index209.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
valid: !t && e.state.valid
|
|
7
|
-
}
|
|
8
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const n = [];
|
|
4
|
+
function o(t) {
|
|
5
|
+
e.useEffect(t, n);
|
|
9
6
|
}
|
|
10
7
|
export {
|
|
11
|
-
|
|
8
|
+
o as useOnMount
|
|
12
9
|
};
|
package/dist/index21.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { useDialogRootContext as d } from "./
|
|
3
|
+
import { useDialogRootContext as d } from "./index96.js";
|
|
4
4
|
import { useRenderElement as m } from "./index87.js";
|
|
5
|
-
import { popupStateMapping as l } from "./
|
|
6
|
-
import { transitionStatusMapping as f } from "./
|
|
5
|
+
import { popupStateMapping as l } from "./index98.js";
|
|
6
|
+
import { transitionStatusMapping as f } from "./index99.js";
|
|
7
7
|
const S = {
|
|
8
8
|
...l,
|
|
9
9
|
...f
|
package/dist/index210.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
r.defaultPrevented || (o.current = r.pointerType, i(r, r.pointerType));
|
|
5
|
-
}, [i]);
|
|
6
|
-
return {
|
|
7
|
-
onClick: n.useCallback((r) => {
|
|
8
|
-
if (r.detail === 0) {
|
|
9
|
-
i(r, "keyboard");
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
"pointerType" in r && i(r, r.pointerType), i(r, o.current), o.current = "";
|
|
13
|
-
}, [i]),
|
|
14
|
-
onPointerDown: c
|
|
15
|
-
};
|
|
16
|
-
}
|
|
1
|
+
let a = /* @__PURE__ */ (function(d) {
|
|
2
|
+
return d.disabled = "data-disabled", d.valid = "data-valid", d.invalid = "data-invalid", d.touched = "data-touched", d.dirty = "data-dirty", d.filled = "data-filled", d.focused = "data-focused", d;
|
|
3
|
+
})({});
|
|
17
4
|
export {
|
|
18
|
-
|
|
5
|
+
a as FieldControlDataAttributes
|
|
19
6
|
};
|
package/dist/index217.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
2
|
import { useFloating as P } from "./index216.js";
|
|
3
|
-
import { isElement as s } from "./
|
|
3
|
+
import { isElement as s } from "./index123.js";
|
|
4
4
|
import { useIsoLayoutEffect as F } from "./index126.js";
|
|
5
5
|
import { useFloatingTree as V } from "./index181.js";
|
|
6
|
-
import { useFloatingRootContext as v } from "./
|
|
6
|
+
import { useFloatingRootContext as v } from "./index145.js";
|
|
7
7
|
function w(c = {}) {
|
|
8
8
|
const {
|
|
9
9
|
nodeId: m,
|
package/dist/index218.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { flip as st, offset as rt, size as ct, hide as lt, computePosition as ft, shift as ut, limitShift as ht } from "./index253.js";
|
|
2
2
|
import { createCoords as w, rectToClientRect as J, floor as A, max as E, round as D, min as N } from "./index212.js";
|
|
3
|
-
import { getOverflowAncestors as V, isElement as v, getDocumentElement as R, getWindow as L, getFrameElement as U, getComputedStyle as b, isHTMLElement as C, isWebKit as Q, isTopLayer as $, getParentNode as S, isLastTraversableNode as z, isTableElement as at, isContainingBlock as Y, getContainingBlock as dt, getNodeName as _, isOverflowElement as q, getNodeScroll as H } from "./
|
|
3
|
+
import { getOverflowAncestors as V, isElement as v, getDocumentElement as R, getWindow as L, getFrameElement as U, getComputedStyle as b, isHTMLElement as C, isWebKit as Q, isTopLayer as $, getParentNode as S, isLastTraversableNode as z, isTableElement as at, isContainingBlock as Y, getContainingBlock as dt, getNodeName as _, isOverflowElement as q, getNodeScroll as H } from "./index123.js";
|
|
4
4
|
function Z(t) {
|
|
5
5
|
const e = b(t);
|
|
6
6
|
let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
package/dist/index219.js
CHANGED
|
@@ -1,41 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
process.env.NODE_ENV !== "production" && (n.displayName = "ComboboxRootContext");
|
|
5
|
-
const s = /* @__PURE__ */ t.createContext(void 0);
|
|
6
|
-
process.env.NODE_ENV !== "production" && (s.displayName = "ComboboxFloatingContext");
|
|
7
|
-
const r = /* @__PURE__ */ t.createContext(void 0);
|
|
8
|
-
process.env.NODE_ENV !== "production" && (r.displayName = "ComboboxDerivedItemsContext");
|
|
9
|
-
const i = /* @__PURE__ */ t.createContext("");
|
|
10
|
-
process.env.NODE_ENV !== "production" && (i.displayName = "ComboboxInputValueContext");
|
|
11
|
-
function b() {
|
|
12
|
-
const o = t.useContext(n);
|
|
13
|
-
if (!o)
|
|
14
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>." : e(22));
|
|
15
|
-
return o;
|
|
16
|
-
}
|
|
17
|
-
function C() {
|
|
18
|
-
const o = t.useContext(s);
|
|
19
|
-
if (!o)
|
|
20
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>." : e(23));
|
|
21
|
-
return o;
|
|
22
|
-
}
|
|
23
|
-
function m() {
|
|
24
|
-
const o = t.useContext(r);
|
|
25
|
-
if (!o)
|
|
26
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>." : e(24));
|
|
27
|
-
return o;
|
|
28
|
-
}
|
|
29
|
-
function c() {
|
|
30
|
-
return t.useContext(i);
|
|
31
|
-
}
|
|
1
|
+
let h = /* @__PURE__ */ (function(d) {
|
|
2
|
+
return d.checked = "data-checked", d.unchecked = "data-unchecked", d.disabled = "data-disabled", d.highlighted = "data-highlighted", d;
|
|
3
|
+
})({});
|
|
32
4
|
export {
|
|
33
|
-
|
|
34
|
-
s as ComboboxFloatingContext,
|
|
35
|
-
i as ComboboxInputValueContext,
|
|
36
|
-
n as ComboboxRootContext,
|
|
37
|
-
m as useComboboxDerivedItemsContext,
|
|
38
|
-
C as useComboboxFloatingContext,
|
|
39
|
-
c as useComboboxInputValueContext,
|
|
40
|
-
b as useComboboxRootContext
|
|
5
|
+
h as MenuCheckboxItemDataAttributes
|
|
41
6
|
};
|
package/dist/index22.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { inertValue as m } from "./
|
|
4
|
-
import { useDialogRootContext as d } from "./
|
|
5
|
-
import { DialogPortalContext as c } from "./
|
|
6
|
-
import { InternalBackdrop as u } from "./
|
|
3
|
+
import { inertValue as m } from "./index109.js";
|
|
4
|
+
import { useDialogRootContext as d } from "./index96.js";
|
|
5
|
+
import { DialogPortalContext as c } from "./index105.js";
|
|
6
|
+
import { InternalBackdrop as u } from "./index110.js";
|
|
7
7
|
import { jsx as n, jsxs as f } from "react/jsx-runtime";
|
|
8
|
-
import { FloatingPortal as p } from "./
|
|
8
|
+
import { FloatingPortal as p } from "./index111.js";
|
|
9
9
|
const P = /* @__PURE__ */ s.forwardRef(function(t, a) {
|
|
10
10
|
const {
|
|
11
11
|
keepMounted: r = !1,
|