@process.co/ui 0.0.15 → 0.0.17
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/css/ui.css +77 -0
- package/dist/components/fields/index.cjs +119 -5
- package/dist/components/fields/index.cjs.map +1 -1
- package/dist/components/fields/index.d.cts +1 -1
- package/dist/components/fields/index.d.ts +1 -1
- package/dist/components/fields/index.js +119 -7
- package/dist/components/fields/index.js.map +1 -1
- package/dist/{index-19C2gVyr.d.cts → index-D9NS5Zgl.d.cts} +13 -2
- package/dist/{index-19C2gVyr.d.ts → index-D9NS5Zgl.d.ts} +13 -2
- package/dist/index.cjs +553 -425
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +513 -387
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React44 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var ReactDOM4 = require('react-dom');
|
|
6
|
-
var lucideReact = require('lucide-react');
|
|
7
6
|
|
|
8
7
|
function _interopNamespace(e) {
|
|
9
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,7 +22,7 @@ function _interopNamespace(e) {
|
|
|
23
22
|
return Object.freeze(n);
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
var
|
|
25
|
+
var React44__namespace = /*#__PURE__*/_interopNamespace(React44);
|
|
27
26
|
var ReactDOM4__namespace = /*#__PURE__*/_interopNamespace(ReactDOM4);
|
|
28
27
|
|
|
29
28
|
var __defProp = Object.defineProperty;
|
|
@@ -63,10 +62,10 @@ function composeRefs(...refs) {
|
|
|
63
62
|
};
|
|
64
63
|
}
|
|
65
64
|
function useComposedRefs(...refs) {
|
|
66
|
-
return
|
|
65
|
+
return React44__namespace.useCallback(composeRefs(...refs), refs);
|
|
67
66
|
}
|
|
68
67
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
69
|
-
var use =
|
|
68
|
+
var use = React44__namespace[" use ".trim().toString()];
|
|
70
69
|
function isPromiseLike(value) {
|
|
71
70
|
return typeof value === "object" && value !== null && "then" in value;
|
|
72
71
|
}
|
|
@@ -76,24 +75,24 @@ function isLazyComponent(element) {
|
|
|
76
75
|
// @__NO_SIDE_EFFECTS__
|
|
77
76
|
function createSlot(ownerName) {
|
|
78
77
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
79
|
-
const Slot22 =
|
|
78
|
+
const Slot22 = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
80
79
|
let { children, ...slotProps } = props;
|
|
81
80
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
82
81
|
children = use(children._payload);
|
|
83
82
|
}
|
|
84
|
-
const childrenArray =
|
|
83
|
+
const childrenArray = React44__namespace.Children.toArray(children);
|
|
85
84
|
const slottable = childrenArray.find(isSlottable);
|
|
86
85
|
if (slottable) {
|
|
87
86
|
const newElement = slottable.props.children;
|
|
88
87
|
const newChildren = childrenArray.map((child) => {
|
|
89
88
|
if (child === slottable) {
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
89
|
+
if (React44__namespace.Children.count(newElement) > 1) return React44__namespace.Children.only(null);
|
|
90
|
+
return React44__namespace.isValidElement(newElement) ? newElement.props.children : null;
|
|
92
91
|
} else {
|
|
93
92
|
return child;
|
|
94
93
|
}
|
|
95
94
|
});
|
|
96
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
95
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React44__namespace.isValidElement(newElement) ? React44__namespace.cloneElement(newElement, void 0, newChildren) : null });
|
|
97
96
|
}
|
|
98
97
|
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
99
98
|
});
|
|
@@ -103,27 +102,27 @@ function createSlot(ownerName) {
|
|
|
103
102
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
104
103
|
// @__NO_SIDE_EFFECTS__
|
|
105
104
|
function createSlotClone(ownerName) {
|
|
106
|
-
const SlotClone =
|
|
105
|
+
const SlotClone = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
107
106
|
let { children, ...slotProps } = props;
|
|
108
107
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
109
108
|
children = use(children._payload);
|
|
110
109
|
}
|
|
111
|
-
if (
|
|
110
|
+
if (React44__namespace.isValidElement(children)) {
|
|
112
111
|
const childrenRef = getElementRef(children);
|
|
113
112
|
const props2 = mergeProps(slotProps, children.props);
|
|
114
|
-
if (children.type !==
|
|
113
|
+
if (children.type !== React44__namespace.Fragment) {
|
|
115
114
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
116
115
|
}
|
|
117
|
-
return
|
|
116
|
+
return React44__namespace.cloneElement(children, props2);
|
|
118
117
|
}
|
|
119
|
-
return
|
|
118
|
+
return React44__namespace.Children.count(children) > 1 ? React44__namespace.Children.only(null) : null;
|
|
120
119
|
});
|
|
121
120
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
122
121
|
return SlotClone;
|
|
123
122
|
}
|
|
124
123
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
125
124
|
function isSlottable(child) {
|
|
126
|
-
return
|
|
125
|
+
return React44__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
127
126
|
}
|
|
128
127
|
function mergeProps(slotProps, childProps) {
|
|
129
128
|
const overrideProps = { ...childProps };
|
|
@@ -3270,7 +3269,7 @@ function Button({
|
|
|
3270
3269
|
...props
|
|
3271
3270
|
}) {
|
|
3272
3271
|
const Comp = asChild ? Slot : "button";
|
|
3273
|
-
return /* @__PURE__ */
|
|
3272
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
3274
3273
|
Comp,
|
|
3275
3274
|
{
|
|
3276
3275
|
"data-slot": "button",
|
|
@@ -3287,9 +3286,9 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
3287
3286
|
}
|
|
3288
3287
|
};
|
|
3289
3288
|
}
|
|
3290
|
-
var useLayoutEffect2 = globalThis?.document ?
|
|
3289
|
+
var useLayoutEffect2 = globalThis?.document ? React44__namespace.useLayoutEffect : () => {
|
|
3291
3290
|
};
|
|
3292
|
-
var useInsertionEffect =
|
|
3291
|
+
var useInsertionEffect = React44__namespace[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3293
3292
|
function useControllableState({
|
|
3294
3293
|
prop,
|
|
3295
3294
|
defaultProp,
|
|
@@ -3304,8 +3303,8 @@ function useControllableState({
|
|
|
3304
3303
|
const isControlled = prop !== void 0;
|
|
3305
3304
|
const value = isControlled ? prop : uncontrolledProp;
|
|
3306
3305
|
{
|
|
3307
|
-
const isControlledRef =
|
|
3308
|
-
|
|
3306
|
+
const isControlledRef = React44__namespace.useRef(prop !== void 0);
|
|
3307
|
+
React44__namespace.useEffect(() => {
|
|
3309
3308
|
const wasControlled = isControlledRef.current;
|
|
3310
3309
|
if (wasControlled !== isControlled) {
|
|
3311
3310
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -3317,7 +3316,7 @@ function useControllableState({
|
|
|
3317
3316
|
isControlledRef.current = isControlled;
|
|
3318
3317
|
}, [isControlled, caller]);
|
|
3319
3318
|
}
|
|
3320
|
-
const setValue =
|
|
3319
|
+
const setValue = React44__namespace.useCallback(
|
|
3321
3320
|
(nextValue) => {
|
|
3322
3321
|
if (isControlled) {
|
|
3323
3322
|
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -3336,13 +3335,13 @@ function useUncontrolledState({
|
|
|
3336
3335
|
defaultProp,
|
|
3337
3336
|
onChange
|
|
3338
3337
|
}) {
|
|
3339
|
-
const [value, setValue] =
|
|
3340
|
-
const prevValueRef =
|
|
3341
|
-
const onChangeRef =
|
|
3338
|
+
const [value, setValue] = React44__namespace.useState(defaultProp);
|
|
3339
|
+
const prevValueRef = React44__namespace.useRef(value);
|
|
3340
|
+
const onChangeRef = React44__namespace.useRef(onChange);
|
|
3342
3341
|
useInsertionEffect(() => {
|
|
3343
3342
|
onChangeRef.current = onChange;
|
|
3344
3343
|
}, [onChange]);
|
|
3345
|
-
|
|
3344
|
+
React44__namespace.useEffect(() => {
|
|
3346
3345
|
if (prevValueRef.current !== value) {
|
|
3347
3346
|
onChangeRef.current?.(value);
|
|
3348
3347
|
prevValueRef.current = value;
|
|
@@ -3356,21 +3355,21 @@ function isFunction(value) {
|
|
|
3356
3355
|
// @__NO_SIDE_EFFECTS__
|
|
3357
3356
|
function createSlot2(ownerName) {
|
|
3358
3357
|
const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
3359
|
-
const Slot22 =
|
|
3358
|
+
const Slot22 = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
3360
3359
|
const { children, ...slotProps } = props;
|
|
3361
|
-
const childrenArray =
|
|
3360
|
+
const childrenArray = React44__namespace.Children.toArray(children);
|
|
3362
3361
|
const slottable = childrenArray.find(isSlottable2);
|
|
3363
3362
|
if (slottable) {
|
|
3364
3363
|
const newElement = slottable.props.children;
|
|
3365
3364
|
const newChildren = childrenArray.map((child) => {
|
|
3366
3365
|
if (child === slottable) {
|
|
3367
|
-
if (
|
|
3368
|
-
return
|
|
3366
|
+
if (React44__namespace.Children.count(newElement) > 1) return React44__namespace.Children.only(null);
|
|
3367
|
+
return React44__namespace.isValidElement(newElement) ? newElement.props.children : null;
|
|
3369
3368
|
} else {
|
|
3370
3369
|
return child;
|
|
3371
3370
|
}
|
|
3372
3371
|
});
|
|
3373
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
3372
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React44__namespace.isValidElement(newElement) ? React44__namespace.cloneElement(newElement, void 0, newChildren) : null });
|
|
3374
3373
|
}
|
|
3375
3374
|
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
3376
3375
|
});
|
|
@@ -3379,24 +3378,24 @@ function createSlot2(ownerName) {
|
|
|
3379
3378
|
}
|
|
3380
3379
|
// @__NO_SIDE_EFFECTS__
|
|
3381
3380
|
function createSlotClone2(ownerName) {
|
|
3382
|
-
const SlotClone =
|
|
3381
|
+
const SlotClone = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
3383
3382
|
const { children, ...slotProps } = props;
|
|
3384
|
-
if (
|
|
3383
|
+
if (React44__namespace.isValidElement(children)) {
|
|
3385
3384
|
const childrenRef = getElementRef2(children);
|
|
3386
3385
|
const props2 = mergeProps2(slotProps, children.props);
|
|
3387
|
-
if (children.type !==
|
|
3386
|
+
if (children.type !== React44__namespace.Fragment) {
|
|
3388
3387
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3389
3388
|
}
|
|
3390
|
-
return
|
|
3389
|
+
return React44__namespace.cloneElement(children, props2);
|
|
3391
3390
|
}
|
|
3392
|
-
return
|
|
3391
|
+
return React44__namespace.Children.count(children) > 1 ? React44__namespace.Children.only(null) : null;
|
|
3393
3392
|
});
|
|
3394
3393
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3395
3394
|
return SlotClone;
|
|
3396
3395
|
}
|
|
3397
3396
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
3398
3397
|
function isSlottable2(child) {
|
|
3399
|
-
return
|
|
3398
|
+
return React44__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
3400
3399
|
}
|
|
3401
3400
|
function mergeProps2(slotProps, childProps) {
|
|
3402
3401
|
const overrideProps = { ...childProps };
|
|
@@ -3456,7 +3455,7 @@ var NODES = [
|
|
|
3456
3455
|
];
|
|
3457
3456
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
3458
3457
|
const Slot4 = createSlot2(`Primitive.${node}`);
|
|
3459
|
-
const Node2 =
|
|
3458
|
+
const Node2 = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
3460
3459
|
const { asChild, ...primitiveProps } = props;
|
|
3461
3460
|
const Comp = asChild ? Slot4 : node;
|
|
3462
3461
|
if (typeof window !== "undefined") {
|
|
@@ -3471,7 +3470,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
3471
3470
|
if (target) ReactDOM4__namespace.flushSync(() => target.dispatchEvent(event));
|
|
3472
3471
|
}
|
|
3473
3472
|
var NAME = "Toggle";
|
|
3474
|
-
var Toggle =
|
|
3473
|
+
var Toggle = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
3475
3474
|
const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;
|
|
3476
3475
|
const [pressed, setPressed] = useControllableState({
|
|
3477
3476
|
prop: pressedProp,
|
|
@@ -3525,7 +3524,7 @@ var toggleButtonVariants = cva(
|
|
|
3525
3524
|
}
|
|
3526
3525
|
);
|
|
3527
3526
|
function ToggleButton({ className, variant, size: size4, ...props }) {
|
|
3528
|
-
return /* @__PURE__ */
|
|
3527
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
3529
3528
|
Root,
|
|
3530
3529
|
{
|
|
3531
3530
|
"data-slot": "toggle-button",
|
|
@@ -3534,22 +3533,39 @@ function ToggleButton({ className, variant, size: size4, ...props }) {
|
|
|
3534
3533
|
}
|
|
3535
3534
|
);
|
|
3536
3535
|
}
|
|
3536
|
+
var logicToggleButtonStyles = [
|
|
3537
|
+
"uii:inline-flex uii:items-center uii:justify-center uii:rounded-md uii:border uii:border-[#e5e7eb] uii:min-w-[28px] uii:w-[28px] uii:min-h-[56px] uii:h-[56px] uii:text-xs uii:font-bold uii:outline-none uii:focus-visible:ring-2 uii:focus-visible:ring-[#3b82f6]/40 uii:focus-visible:ring-offset-1 uii:disabled:pointer-events-none uii:disabled:opacity-50 uii:cursor-pointer uii:transition-colors uii:select-none",
|
|
3538
|
+
"uii:data-[state=on]:bg-[#3b82f6] uii:data-[state=on]:text-white uii:data-[state=on]:border-[#3b82f6]",
|
|
3539
|
+
"uii:data-[state=off]:bg-[#f3f4f6] uii:data-[state=off]:text-[#374151] uii:data-[state=off]:hover:bg-[#e5e7eb]"
|
|
3540
|
+
].join(" ");
|
|
3541
|
+
var logicToggleButtonLabelStyles = "uii:inline-block uii:whitespace-nowrap uii:[transform:rotate(-90deg)]";
|
|
3542
|
+
function LogicToggleButton({ className, children, ...props }) {
|
|
3543
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
3544
|
+
Root,
|
|
3545
|
+
{
|
|
3546
|
+
"data-slot": "logic-toggle-button",
|
|
3547
|
+
className: cn(logicToggleButtonStyles, className),
|
|
3548
|
+
...props
|
|
3549
|
+
},
|
|
3550
|
+
children != null ? /* @__PURE__ */ React44__namespace.createElement("span", { className: logicToggleButtonLabelStyles }, children) : null
|
|
3551
|
+
);
|
|
3552
|
+
}
|
|
3537
3553
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
3538
3554
|
let defaultContexts = [];
|
|
3539
3555
|
function createContext32(rootComponentName, defaultContext) {
|
|
3540
|
-
const BaseContext =
|
|
3556
|
+
const BaseContext = React44__namespace.createContext(defaultContext);
|
|
3541
3557
|
const index2 = defaultContexts.length;
|
|
3542
3558
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
3543
3559
|
const Provider = (props) => {
|
|
3544
3560
|
const { scope, children, ...context } = props;
|
|
3545
3561
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
3546
|
-
const value =
|
|
3562
|
+
const value = React44__namespace.useMemo(() => context, Object.values(context));
|
|
3547
3563
|
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
3548
3564
|
};
|
|
3549
3565
|
Provider.displayName = rootComponentName + "Provider";
|
|
3550
3566
|
function useContext22(consumerName, scope) {
|
|
3551
3567
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
3552
|
-
const context =
|
|
3568
|
+
const context = React44__namespace.useContext(Context);
|
|
3553
3569
|
if (context) return context;
|
|
3554
3570
|
if (defaultContext !== void 0) return defaultContext;
|
|
3555
3571
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -3558,11 +3574,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
3558
3574
|
}
|
|
3559
3575
|
const createScope = () => {
|
|
3560
3576
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
3561
|
-
return
|
|
3577
|
+
return React44__namespace.createContext(defaultContext);
|
|
3562
3578
|
});
|
|
3563
3579
|
return function useScope(scope) {
|
|
3564
3580
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
3565
|
-
return
|
|
3581
|
+
return React44__namespace.useMemo(
|
|
3566
3582
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
3567
3583
|
[scope, contexts]
|
|
3568
3584
|
);
|
|
@@ -3585,7 +3601,7 @@ function composeContextScopes(...scopes) {
|
|
|
3585
3601
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
3586
3602
|
return { ...nextScopes2, ...currentScope };
|
|
3587
3603
|
}, {});
|
|
3588
|
-
return
|
|
3604
|
+
return React44__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
3589
3605
|
};
|
|
3590
3606
|
};
|
|
3591
3607
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -3600,14 +3616,14 @@ function createCollection(name) {
|
|
|
3600
3616
|
);
|
|
3601
3617
|
const CollectionProvider = (props) => {
|
|
3602
3618
|
const { scope, children } = props;
|
|
3603
|
-
const ref =
|
|
3604
|
-
const itemMap =
|
|
3619
|
+
const ref = React44__namespace.default.useRef(null);
|
|
3620
|
+
const itemMap = React44__namespace.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
3605
3621
|
return /* @__PURE__ */ jsxRuntime.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
3606
3622
|
};
|
|
3607
3623
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
3608
3624
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
3609
3625
|
const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);
|
|
3610
|
-
const CollectionSlot =
|
|
3626
|
+
const CollectionSlot = React44__namespace.default.forwardRef(
|
|
3611
3627
|
(props, forwardedRef) => {
|
|
3612
3628
|
const { scope, children } = props;
|
|
3613
3629
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
@@ -3619,13 +3635,13 @@ function createCollection(name) {
|
|
|
3619
3635
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
3620
3636
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
3621
3637
|
const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);
|
|
3622
|
-
const CollectionItemSlot =
|
|
3638
|
+
const CollectionItemSlot = React44__namespace.default.forwardRef(
|
|
3623
3639
|
(props, forwardedRef) => {
|
|
3624
3640
|
const { scope, children, ...itemData } = props;
|
|
3625
|
-
const ref =
|
|
3641
|
+
const ref = React44__namespace.default.useRef(null);
|
|
3626
3642
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
3627
3643
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
3628
|
-
|
|
3644
|
+
React44__namespace.default.useEffect(() => {
|
|
3629
3645
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
3630
3646
|
return () => void context.itemMap.delete(ref);
|
|
3631
3647
|
});
|
|
@@ -3635,7 +3651,7 @@ function createCollection(name) {
|
|
|
3635
3651
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
3636
3652
|
function useCollection4(scope) {
|
|
3637
3653
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
3638
|
-
const getItems =
|
|
3654
|
+
const getItems = React44__namespace.default.useCallback(() => {
|
|
3639
3655
|
const collectionNode = context.collectionRef.current;
|
|
3640
3656
|
if (!collectionNode) return [];
|
|
3641
3657
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -3653,21 +3669,21 @@ function createCollection(name) {
|
|
|
3653
3669
|
createCollectionScope4
|
|
3654
3670
|
];
|
|
3655
3671
|
}
|
|
3656
|
-
var DirectionContext =
|
|
3672
|
+
var DirectionContext = React44__namespace.createContext(void 0);
|
|
3657
3673
|
function useDirection(localDir) {
|
|
3658
|
-
const globalDir =
|
|
3674
|
+
const globalDir = React44__namespace.useContext(DirectionContext);
|
|
3659
3675
|
return localDir || globalDir || "ltr";
|
|
3660
3676
|
}
|
|
3661
3677
|
function useCallbackRef(callback) {
|
|
3662
|
-
const callbackRef =
|
|
3663
|
-
|
|
3678
|
+
const callbackRef = React44__namespace.useRef(callback);
|
|
3679
|
+
React44__namespace.useEffect(() => {
|
|
3664
3680
|
callbackRef.current = callback;
|
|
3665
3681
|
});
|
|
3666
|
-
return
|
|
3682
|
+
return React44__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
3667
3683
|
}
|
|
3668
3684
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
3669
3685
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
3670
|
-
|
|
3686
|
+
React44__namespace.useEffect(() => {
|
|
3671
3687
|
const handleKeyDown = (event) => {
|
|
3672
3688
|
if (event.key === "Escape") {
|
|
3673
3689
|
onEscapeKeyDown(event);
|
|
@@ -3682,12 +3698,12 @@ var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
|
3682
3698
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
3683
3699
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
3684
3700
|
var originalBodyPointerEvents;
|
|
3685
|
-
var DismissableLayerContext =
|
|
3701
|
+
var DismissableLayerContext = React44__namespace.createContext({
|
|
3686
3702
|
layers: /* @__PURE__ */ new Set(),
|
|
3687
3703
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
3688
3704
|
branches: /* @__PURE__ */ new Set()
|
|
3689
3705
|
});
|
|
3690
|
-
var DismissableLayer =
|
|
3706
|
+
var DismissableLayer = React44__namespace.forwardRef(
|
|
3691
3707
|
(props, forwardedRef) => {
|
|
3692
3708
|
const {
|
|
3693
3709
|
disableOutsidePointerEvents = false,
|
|
@@ -3698,10 +3714,10 @@ var DismissableLayer = React43__namespace.forwardRef(
|
|
|
3698
3714
|
onDismiss,
|
|
3699
3715
|
...layerProps
|
|
3700
3716
|
} = props;
|
|
3701
|
-
const context =
|
|
3702
|
-
const [node, setNode] =
|
|
3717
|
+
const context = React44__namespace.useContext(DismissableLayerContext);
|
|
3718
|
+
const [node, setNode] = React44__namespace.useState(null);
|
|
3703
3719
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
3704
|
-
const [, force] =
|
|
3720
|
+
const [, force] = React44__namespace.useState({});
|
|
3705
3721
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
3706
3722
|
const layers = Array.from(context.layers);
|
|
3707
3723
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -3734,7 +3750,7 @@ var DismissableLayer = React43__namespace.forwardRef(
|
|
|
3734
3750
|
onDismiss();
|
|
3735
3751
|
}
|
|
3736
3752
|
}, ownerDocument);
|
|
3737
|
-
|
|
3753
|
+
React44__namespace.useEffect(() => {
|
|
3738
3754
|
if (!node) return;
|
|
3739
3755
|
if (disableOutsidePointerEvents) {
|
|
3740
3756
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -3751,7 +3767,7 @@ var DismissableLayer = React43__namespace.forwardRef(
|
|
|
3751
3767
|
}
|
|
3752
3768
|
};
|
|
3753
3769
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
3754
|
-
|
|
3770
|
+
React44__namespace.useEffect(() => {
|
|
3755
3771
|
return () => {
|
|
3756
3772
|
if (!node) return;
|
|
3757
3773
|
context.layers.delete(node);
|
|
@@ -3759,7 +3775,7 @@ var DismissableLayer = React43__namespace.forwardRef(
|
|
|
3759
3775
|
dispatchUpdate();
|
|
3760
3776
|
};
|
|
3761
3777
|
}, [node, context]);
|
|
3762
|
-
|
|
3778
|
+
React44__namespace.useEffect(() => {
|
|
3763
3779
|
const handleUpdate = () => force({});
|
|
3764
3780
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
3765
3781
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
@@ -3785,11 +3801,11 @@ var DismissableLayer = React43__namespace.forwardRef(
|
|
|
3785
3801
|
);
|
|
3786
3802
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
3787
3803
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
3788
|
-
var DismissableLayerBranch =
|
|
3789
|
-
const context =
|
|
3790
|
-
const ref =
|
|
3804
|
+
var DismissableLayerBranch = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
3805
|
+
const context = React44__namespace.useContext(DismissableLayerContext);
|
|
3806
|
+
const ref = React44__namespace.useRef(null);
|
|
3791
3807
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
3792
|
-
|
|
3808
|
+
React44__namespace.useEffect(() => {
|
|
3793
3809
|
const node = ref.current;
|
|
3794
3810
|
if (node) {
|
|
3795
3811
|
context.branches.add(node);
|
|
@@ -3803,10 +3819,10 @@ var DismissableLayerBranch = React43__namespace.forwardRef((props, forwardedRef)
|
|
|
3803
3819
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
3804
3820
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
3805
3821
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
3806
|
-
const isPointerInsideReactTreeRef =
|
|
3807
|
-
const handleClickRef =
|
|
3822
|
+
const isPointerInsideReactTreeRef = React44__namespace.useRef(false);
|
|
3823
|
+
const handleClickRef = React44__namespace.useRef(() => {
|
|
3808
3824
|
});
|
|
3809
|
-
|
|
3825
|
+
React44__namespace.useEffect(() => {
|
|
3810
3826
|
const handlePointerDown = (event) => {
|
|
3811
3827
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
3812
3828
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -3846,8 +3862,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
3846
3862
|
}
|
|
3847
3863
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
3848
3864
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
3849
|
-
const isFocusInsideReactTreeRef =
|
|
3850
|
-
|
|
3865
|
+
const isFocusInsideReactTreeRef = React44__namespace.useRef(false);
|
|
3866
|
+
React44__namespace.useEffect(() => {
|
|
3851
3867
|
const handleFocus = (event) => {
|
|
3852
3868
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
3853
3869
|
const eventDetail = { originalEvent: event };
|
|
@@ -3880,7 +3896,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
3880
3896
|
}
|
|
3881
3897
|
var count = 0;
|
|
3882
3898
|
function useFocusGuards() {
|
|
3883
|
-
|
|
3899
|
+
React44__namespace.useEffect(() => {
|
|
3884
3900
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
3885
3901
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
3886
3902
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -3907,7 +3923,7 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
|
3907
3923
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
3908
3924
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
3909
3925
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
3910
|
-
var FocusScope =
|
|
3926
|
+
var FocusScope = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
3911
3927
|
const {
|
|
3912
3928
|
loop = false,
|
|
3913
3929
|
trapped = false,
|
|
@@ -3915,12 +3931,12 @@ var FocusScope = React43__namespace.forwardRef((props, forwardedRef) => {
|
|
|
3915
3931
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
3916
3932
|
...scopeProps
|
|
3917
3933
|
} = props;
|
|
3918
|
-
const [container, setContainer] =
|
|
3934
|
+
const [container, setContainer] = React44__namespace.useState(null);
|
|
3919
3935
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
3920
3936
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
3921
|
-
const lastFocusedElementRef =
|
|
3937
|
+
const lastFocusedElementRef = React44__namespace.useRef(null);
|
|
3922
3938
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
3923
|
-
const focusScope =
|
|
3939
|
+
const focusScope = React44__namespace.useRef({
|
|
3924
3940
|
paused: false,
|
|
3925
3941
|
pause() {
|
|
3926
3942
|
this.paused = true;
|
|
@@ -3929,7 +3945,7 @@ var FocusScope = React43__namespace.forwardRef((props, forwardedRef) => {
|
|
|
3929
3945
|
this.paused = false;
|
|
3930
3946
|
}
|
|
3931
3947
|
}).current;
|
|
3932
|
-
|
|
3948
|
+
React44__namespace.useEffect(() => {
|
|
3933
3949
|
if (trapped) {
|
|
3934
3950
|
let handleFocusIn2 = function(event) {
|
|
3935
3951
|
if (focusScope.paused || !container) return;
|
|
@@ -3964,7 +3980,7 @@ var FocusScope = React43__namespace.forwardRef((props, forwardedRef) => {
|
|
|
3964
3980
|
};
|
|
3965
3981
|
}
|
|
3966
3982
|
}, [trapped, container, focusScope.paused]);
|
|
3967
|
-
|
|
3983
|
+
React44__namespace.useEffect(() => {
|
|
3968
3984
|
if (container) {
|
|
3969
3985
|
focusScopesStack.add(focusScope);
|
|
3970
3986
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -3995,7 +4011,7 @@ var FocusScope = React43__namespace.forwardRef((props, forwardedRef) => {
|
|
|
3995
4011
|
};
|
|
3996
4012
|
}
|
|
3997
4013
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
3998
|
-
const handleKeyDown =
|
|
4014
|
+
const handleKeyDown = React44__namespace.useCallback(
|
|
3999
4015
|
(event) => {
|
|
4000
4016
|
if (!loop && !trapped) return;
|
|
4001
4017
|
if (focusScope.paused) return;
|
|
@@ -4102,10 +4118,10 @@ function arrayRemove(array, item) {
|
|
|
4102
4118
|
function removeLinks(items) {
|
|
4103
4119
|
return items.filter((item) => item.tagName !== "A");
|
|
4104
4120
|
}
|
|
4105
|
-
var useReactId =
|
|
4121
|
+
var useReactId = React44__namespace[" useId ".trim().toString()] || (() => void 0);
|
|
4106
4122
|
var count2 = 0;
|
|
4107
4123
|
function useId(deterministicId) {
|
|
4108
|
-
const [id, setId] =
|
|
4124
|
+
const [id, setId] = React44__namespace.useState(useReactId());
|
|
4109
4125
|
useLayoutEffect2(() => {
|
|
4110
4126
|
setId((reactId) => reactId ?? String(count2++));
|
|
4111
4127
|
}, [deterministicId]);
|
|
@@ -5720,7 +5736,7 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
5720
5736
|
var isClient = typeof document !== "undefined";
|
|
5721
5737
|
var noop = function noop2() {
|
|
5722
5738
|
};
|
|
5723
|
-
var index = isClient ?
|
|
5739
|
+
var index = isClient ? React44.useLayoutEffect : noop;
|
|
5724
5740
|
function deepEqual(a, b) {
|
|
5725
5741
|
if (a === b) {
|
|
5726
5742
|
return true;
|
|
@@ -5780,7 +5796,7 @@ function roundByDPR(element, value) {
|
|
|
5780
5796
|
return Math.round(value * dpr) / dpr;
|
|
5781
5797
|
}
|
|
5782
5798
|
function useLatestRef(value) {
|
|
5783
|
-
const ref =
|
|
5799
|
+
const ref = React44__namespace.useRef(value);
|
|
5784
5800
|
index(() => {
|
|
5785
5801
|
ref.current = value;
|
|
5786
5802
|
});
|
|
@@ -5803,7 +5819,7 @@ function useFloating(options) {
|
|
|
5803
5819
|
whileElementsMounted,
|
|
5804
5820
|
open
|
|
5805
5821
|
} = options;
|
|
5806
|
-
const [data, setData] =
|
|
5822
|
+
const [data, setData] = React44__namespace.useState({
|
|
5807
5823
|
x: 0,
|
|
5808
5824
|
y: 0,
|
|
5809
5825
|
strategy,
|
|
@@ -5811,19 +5827,19 @@ function useFloating(options) {
|
|
|
5811
5827
|
middlewareData: {},
|
|
5812
5828
|
isPositioned: false
|
|
5813
5829
|
});
|
|
5814
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
5830
|
+
const [latestMiddleware, setLatestMiddleware] = React44__namespace.useState(middleware);
|
|
5815
5831
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
5816
5832
|
setLatestMiddleware(middleware);
|
|
5817
5833
|
}
|
|
5818
|
-
const [_reference, _setReference] =
|
|
5819
|
-
const [_floating, _setFloating] =
|
|
5820
|
-
const setReference =
|
|
5834
|
+
const [_reference, _setReference] = React44__namespace.useState(null);
|
|
5835
|
+
const [_floating, _setFloating] = React44__namespace.useState(null);
|
|
5836
|
+
const setReference = React44__namespace.useCallback((node) => {
|
|
5821
5837
|
if (node !== referenceRef.current) {
|
|
5822
5838
|
referenceRef.current = node;
|
|
5823
5839
|
_setReference(node);
|
|
5824
5840
|
}
|
|
5825
5841
|
}, []);
|
|
5826
|
-
const setFloating =
|
|
5842
|
+
const setFloating = React44__namespace.useCallback((node) => {
|
|
5827
5843
|
if (node !== floatingRef.current) {
|
|
5828
5844
|
floatingRef.current = node;
|
|
5829
5845
|
_setFloating(node);
|
|
@@ -5831,14 +5847,14 @@ function useFloating(options) {
|
|
|
5831
5847
|
}, []);
|
|
5832
5848
|
const referenceEl = externalReference || _reference;
|
|
5833
5849
|
const floatingEl = externalFloating || _floating;
|
|
5834
|
-
const referenceRef =
|
|
5835
|
-
const floatingRef =
|
|
5836
|
-
const dataRef =
|
|
5850
|
+
const referenceRef = React44__namespace.useRef(null);
|
|
5851
|
+
const floatingRef = React44__namespace.useRef(null);
|
|
5852
|
+
const dataRef = React44__namespace.useRef(data);
|
|
5837
5853
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
5838
5854
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
5839
5855
|
const platformRef = useLatestRef(platform2);
|
|
5840
5856
|
const openRef = useLatestRef(open);
|
|
5841
|
-
const update =
|
|
5857
|
+
const update = React44__namespace.useCallback(() => {
|
|
5842
5858
|
if (!referenceRef.current || !floatingRef.current) {
|
|
5843
5859
|
return;
|
|
5844
5860
|
}
|
|
@@ -5876,7 +5892,7 @@ function useFloating(options) {
|
|
|
5876
5892
|
}));
|
|
5877
5893
|
}
|
|
5878
5894
|
}, [open]);
|
|
5879
|
-
const isMountedRef =
|
|
5895
|
+
const isMountedRef = React44__namespace.useRef(false);
|
|
5880
5896
|
index(() => {
|
|
5881
5897
|
isMountedRef.current = true;
|
|
5882
5898
|
return () => {
|
|
@@ -5893,17 +5909,17 @@ function useFloating(options) {
|
|
|
5893
5909
|
update();
|
|
5894
5910
|
}
|
|
5895
5911
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
5896
|
-
const refs =
|
|
5912
|
+
const refs = React44__namespace.useMemo(() => ({
|
|
5897
5913
|
reference: referenceRef,
|
|
5898
5914
|
floating: floatingRef,
|
|
5899
5915
|
setReference,
|
|
5900
5916
|
setFloating
|
|
5901
5917
|
}), [setReference, setFloating]);
|
|
5902
|
-
const elements =
|
|
5918
|
+
const elements = React44__namespace.useMemo(() => ({
|
|
5903
5919
|
reference: referenceEl,
|
|
5904
5920
|
floating: floatingEl
|
|
5905
5921
|
}), [referenceEl, floatingEl]);
|
|
5906
|
-
const floatingStyles =
|
|
5922
|
+
const floatingStyles = React44__namespace.useMemo(() => {
|
|
5907
5923
|
const initialStyles = {
|
|
5908
5924
|
position: strategy,
|
|
5909
5925
|
left: 0,
|
|
@@ -5929,7 +5945,7 @@ function useFloating(options) {
|
|
|
5929
5945
|
top: y
|
|
5930
5946
|
};
|
|
5931
5947
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
5932
|
-
return
|
|
5948
|
+
return React44__namespace.useMemo(() => ({
|
|
5933
5949
|
...data,
|
|
5934
5950
|
update,
|
|
5935
5951
|
refs,
|
|
@@ -5997,7 +6013,7 @@ var arrow3 = (options, deps) => ({
|
|
|
5997
6013
|
options: [options, deps]
|
|
5998
6014
|
});
|
|
5999
6015
|
var NAME2 = "Arrow";
|
|
6000
|
-
var Arrow =
|
|
6016
|
+
var Arrow = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
6001
6017
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
6002
6018
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6003
6019
|
Primitive.svg,
|
|
@@ -6015,7 +6031,7 @@ var Arrow = React43__namespace.forwardRef((props, forwardedRef) => {
|
|
|
6015
6031
|
Arrow.displayName = NAME2;
|
|
6016
6032
|
var Root2 = Arrow;
|
|
6017
6033
|
function useSize(element) {
|
|
6018
|
-
const [size4, setSize] =
|
|
6034
|
+
const [size4, setSize] = React44__namespace.useState(void 0);
|
|
6019
6035
|
useLayoutEffect2(() => {
|
|
6020
6036
|
if (element) {
|
|
6021
6037
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -6053,19 +6069,19 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
6053
6069
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
6054
6070
|
var Popper = (props) => {
|
|
6055
6071
|
const { __scopePopper, children } = props;
|
|
6056
|
-
const [anchor, setAnchor] =
|
|
6072
|
+
const [anchor, setAnchor] = React44__namespace.useState(null);
|
|
6057
6073
|
return /* @__PURE__ */ jsxRuntime.jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
6058
6074
|
};
|
|
6059
6075
|
Popper.displayName = POPPER_NAME;
|
|
6060
6076
|
var ANCHOR_NAME = "PopperAnchor";
|
|
6061
|
-
var PopperAnchor =
|
|
6077
|
+
var PopperAnchor = React44__namespace.forwardRef(
|
|
6062
6078
|
(props, forwardedRef) => {
|
|
6063
6079
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
6064
6080
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
6065
|
-
const ref =
|
|
6081
|
+
const ref = React44__namespace.useRef(null);
|
|
6066
6082
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
6067
|
-
const anchorRef =
|
|
6068
|
-
|
|
6083
|
+
const anchorRef = React44__namespace.useRef(null);
|
|
6084
|
+
React44__namespace.useEffect(() => {
|
|
6069
6085
|
const previousAnchor = anchorRef.current;
|
|
6070
6086
|
anchorRef.current = virtualRef?.current || ref.current;
|
|
6071
6087
|
if (previousAnchor !== anchorRef.current) {
|
|
@@ -6078,7 +6094,7 @@ var PopperAnchor = React43__namespace.forwardRef(
|
|
|
6078
6094
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
6079
6095
|
var CONTENT_NAME = "PopperContent";
|
|
6080
6096
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
6081
|
-
var PopperContent =
|
|
6097
|
+
var PopperContent = React44__namespace.forwardRef(
|
|
6082
6098
|
(props, forwardedRef) => {
|
|
6083
6099
|
const {
|
|
6084
6100
|
__scopePopper,
|
|
@@ -6097,9 +6113,9 @@ var PopperContent = React43__namespace.forwardRef(
|
|
|
6097
6113
|
...contentProps
|
|
6098
6114
|
} = props;
|
|
6099
6115
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
6100
|
-
const [content, setContent] =
|
|
6116
|
+
const [content, setContent] = React44__namespace.useState(null);
|
|
6101
6117
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
6102
|
-
const [arrow4, setArrow] =
|
|
6118
|
+
const [arrow4, setArrow] = React44__namespace.useState(null);
|
|
6103
6119
|
const arrowSize = useSize(arrow4);
|
|
6104
6120
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
6105
6121
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -6161,7 +6177,7 @@ var PopperContent = React43__namespace.forwardRef(
|
|
|
6161
6177
|
const arrowX = middlewareData.arrow?.x;
|
|
6162
6178
|
const arrowY = middlewareData.arrow?.y;
|
|
6163
6179
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
6164
|
-
const [contentZIndex, setContentZIndex] =
|
|
6180
|
+
const [contentZIndex, setContentZIndex] = React44__namespace.useState();
|
|
6165
6181
|
useLayoutEffect2(() => {
|
|
6166
6182
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
6167
6183
|
}, [content]);
|
|
@@ -6227,7 +6243,7 @@ var OPPOSITE_SIDE = {
|
|
|
6227
6243
|
bottom: "top",
|
|
6228
6244
|
left: "right"
|
|
6229
6245
|
};
|
|
6230
|
-
var PopperArrow =
|
|
6246
|
+
var PopperArrow = React44__namespace.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
6231
6247
|
const { __scopePopper, ...arrowProps } = props;
|
|
6232
6248
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
6233
6249
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -6318,16 +6334,16 @@ var Anchor = PopperAnchor;
|
|
|
6318
6334
|
var Content = PopperContent;
|
|
6319
6335
|
var Arrow2 = PopperArrow;
|
|
6320
6336
|
var PORTAL_NAME = "Portal";
|
|
6321
|
-
var Portal =
|
|
6337
|
+
var Portal = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
6322
6338
|
const { container: containerProp, ...portalProps } = props;
|
|
6323
|
-
const [mounted, setMounted] =
|
|
6339
|
+
const [mounted, setMounted] = React44__namespace.useState(false);
|
|
6324
6340
|
useLayoutEffect2(() => setMounted(true), []);
|
|
6325
6341
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
6326
6342
|
return container ? ReactDOM4__namespace.default.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
6327
6343
|
});
|
|
6328
6344
|
Portal.displayName = PORTAL_NAME;
|
|
6329
6345
|
function useStateMachine(initialState, machine) {
|
|
6330
|
-
return
|
|
6346
|
+
return React44__namespace.useReducer((state, event) => {
|
|
6331
6347
|
const nextState = machine[state][event];
|
|
6332
6348
|
return nextState ?? state;
|
|
6333
6349
|
}, initialState);
|
|
@@ -6335,17 +6351,17 @@ function useStateMachine(initialState, machine) {
|
|
|
6335
6351
|
var Presence = (props) => {
|
|
6336
6352
|
const { present, children } = props;
|
|
6337
6353
|
const presence = usePresence(present);
|
|
6338
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) :
|
|
6354
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React44__namespace.Children.only(children);
|
|
6339
6355
|
const ref = useComposedRefs(presence.ref, getElementRef3(child));
|
|
6340
6356
|
const forceMount = typeof children === "function";
|
|
6341
|
-
return forceMount || presence.isPresent ?
|
|
6357
|
+
return forceMount || presence.isPresent ? React44__namespace.cloneElement(child, { ref }) : null;
|
|
6342
6358
|
};
|
|
6343
6359
|
Presence.displayName = "Presence";
|
|
6344
6360
|
function usePresence(present) {
|
|
6345
|
-
const [node, setNode] =
|
|
6346
|
-
const stylesRef =
|
|
6347
|
-
const prevPresentRef =
|
|
6348
|
-
const prevAnimationNameRef =
|
|
6361
|
+
const [node, setNode] = React44__namespace.useState();
|
|
6362
|
+
const stylesRef = React44__namespace.useRef(null);
|
|
6363
|
+
const prevPresentRef = React44__namespace.useRef(present);
|
|
6364
|
+
const prevAnimationNameRef = React44__namespace.useRef("none");
|
|
6349
6365
|
const initialState = present ? "mounted" : "unmounted";
|
|
6350
6366
|
const [state, send] = useStateMachine(initialState, {
|
|
6351
6367
|
mounted: {
|
|
@@ -6360,7 +6376,7 @@ function usePresence(present) {
|
|
|
6360
6376
|
MOUNT: "mounted"
|
|
6361
6377
|
}
|
|
6362
6378
|
});
|
|
6363
|
-
|
|
6379
|
+
React44__namespace.useEffect(() => {
|
|
6364
6380
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
6365
6381
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
6366
6382
|
}, [state]);
|
|
@@ -6426,7 +6442,7 @@ function usePresence(present) {
|
|
|
6426
6442
|
}, [node, send]);
|
|
6427
6443
|
return {
|
|
6428
6444
|
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
6429
|
-
ref:
|
|
6445
|
+
ref: React44__namespace.useCallback((node2) => {
|
|
6430
6446
|
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
6431
6447
|
setNode(node2);
|
|
6432
6448
|
}, [])
|
|
@@ -6457,13 +6473,13 @@ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContext
|
|
|
6457
6473
|
[createCollectionScope]
|
|
6458
6474
|
);
|
|
6459
6475
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
6460
|
-
var RovingFocusGroup =
|
|
6476
|
+
var RovingFocusGroup = React44__namespace.forwardRef(
|
|
6461
6477
|
(props, forwardedRef) => {
|
|
6462
6478
|
return /* @__PURE__ */ jsxRuntime.jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntime.jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntime.jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
6463
6479
|
}
|
|
6464
6480
|
);
|
|
6465
6481
|
RovingFocusGroup.displayName = GROUP_NAME;
|
|
6466
|
-
var RovingFocusGroupImpl =
|
|
6482
|
+
var RovingFocusGroupImpl = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
6467
6483
|
const {
|
|
6468
6484
|
__scopeRovingFocusGroup,
|
|
6469
6485
|
orientation,
|
|
@@ -6476,7 +6492,7 @@ var RovingFocusGroupImpl = React43__namespace.forwardRef((props, forwardedRef) =
|
|
|
6476
6492
|
preventScrollOnEntryFocus = false,
|
|
6477
6493
|
...groupProps
|
|
6478
6494
|
} = props;
|
|
6479
|
-
const ref =
|
|
6495
|
+
const ref = React44__namespace.useRef(null);
|
|
6480
6496
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
6481
6497
|
const direction = useDirection(dir);
|
|
6482
6498
|
const [currentTabStopId, setCurrentTabStopId] = useControllableState({
|
|
@@ -6485,12 +6501,12 @@ var RovingFocusGroupImpl = React43__namespace.forwardRef((props, forwardedRef) =
|
|
|
6485
6501
|
onChange: onCurrentTabStopIdChange,
|
|
6486
6502
|
caller: GROUP_NAME
|
|
6487
6503
|
});
|
|
6488
|
-
const [isTabbingBackOut, setIsTabbingBackOut] =
|
|
6504
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React44__namespace.useState(false);
|
|
6489
6505
|
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
6490
6506
|
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
6491
|
-
const isClickFocusRef =
|
|
6492
|
-
const [focusableItemsCount, setFocusableItemsCount] =
|
|
6493
|
-
|
|
6507
|
+
const isClickFocusRef = React44__namespace.useRef(false);
|
|
6508
|
+
const [focusableItemsCount, setFocusableItemsCount] = React44__namespace.useState(0);
|
|
6509
|
+
React44__namespace.useEffect(() => {
|
|
6494
6510
|
const node = ref.current;
|
|
6495
6511
|
if (node) {
|
|
6496
6512
|
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
@@ -6505,16 +6521,16 @@ var RovingFocusGroupImpl = React43__namespace.forwardRef((props, forwardedRef) =
|
|
|
6505
6521
|
dir: direction,
|
|
6506
6522
|
loop,
|
|
6507
6523
|
currentTabStopId,
|
|
6508
|
-
onItemFocus:
|
|
6524
|
+
onItemFocus: React44__namespace.useCallback(
|
|
6509
6525
|
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
6510
6526
|
[setCurrentTabStopId]
|
|
6511
6527
|
),
|
|
6512
|
-
onItemShiftTab:
|
|
6513
|
-
onFocusableItemAdd:
|
|
6528
|
+
onItemShiftTab: React44__namespace.useCallback(() => setIsTabbingBackOut(true), []),
|
|
6529
|
+
onFocusableItemAdd: React44__namespace.useCallback(
|
|
6514
6530
|
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
6515
6531
|
[]
|
|
6516
6532
|
),
|
|
6517
|
-
onFocusableItemRemove:
|
|
6533
|
+
onFocusableItemRemove: React44__namespace.useCallback(
|
|
6518
6534
|
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
6519
6535
|
[]
|
|
6520
6536
|
),
|
|
@@ -6554,7 +6570,7 @@ var RovingFocusGroupImpl = React43__namespace.forwardRef((props, forwardedRef) =
|
|
|
6554
6570
|
);
|
|
6555
6571
|
});
|
|
6556
6572
|
var ITEM_NAME = "RovingFocusGroupItem";
|
|
6557
|
-
var RovingFocusGroupItem =
|
|
6573
|
+
var RovingFocusGroupItem = React44__namespace.forwardRef(
|
|
6558
6574
|
(props, forwardedRef) => {
|
|
6559
6575
|
const {
|
|
6560
6576
|
__scopeRovingFocusGroup,
|
|
@@ -6570,7 +6586,7 @@ var RovingFocusGroupItem = React43__namespace.forwardRef(
|
|
|
6570
6586
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
6571
6587
|
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
6572
6588
|
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
6573
|
-
|
|
6589
|
+
React44__namespace.useEffect(() => {
|
|
6574
6590
|
if (focusable) {
|
|
6575
6591
|
onFocusableItemAdd();
|
|
6576
6592
|
return () => onFocusableItemRemove();
|
|
@@ -6827,7 +6843,7 @@ function assignRef(ref, value) {
|
|
|
6827
6843
|
return ref;
|
|
6828
6844
|
}
|
|
6829
6845
|
function useCallbackRef2(initialValue, callback) {
|
|
6830
|
-
var ref =
|
|
6846
|
+
var ref = React44.useState(function() {
|
|
6831
6847
|
return {
|
|
6832
6848
|
// value
|
|
6833
6849
|
value: initialValue,
|
|
@@ -6851,7 +6867,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
6851
6867
|
ref.callback = callback;
|
|
6852
6868
|
return ref.facade;
|
|
6853
6869
|
}
|
|
6854
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
6870
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React44__namespace.useLayoutEffect : React44__namespace.useEffect;
|
|
6855
6871
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
6856
6872
|
function useMergeRefs(refs, defaultValue) {
|
|
6857
6873
|
var callbackRef = useCallbackRef2(null, function(newValue) {
|
|
@@ -6975,7 +6991,7 @@ var SideCar = function(_a) {
|
|
|
6975
6991
|
if (!Target) {
|
|
6976
6992
|
throw new Error("Sidecar medium not found");
|
|
6977
6993
|
}
|
|
6978
|
-
return
|
|
6994
|
+
return React44__namespace.createElement(Target, __assign({}, rest));
|
|
6979
6995
|
};
|
|
6980
6996
|
SideCar.isSideCarExport = true;
|
|
6981
6997
|
function exportSidecar(medium, exported) {
|
|
@@ -6990,9 +7006,9 @@ var effectCar = createSidecarMedium();
|
|
|
6990
7006
|
var nothing = function() {
|
|
6991
7007
|
return;
|
|
6992
7008
|
};
|
|
6993
|
-
var RemoveScroll =
|
|
6994
|
-
var ref =
|
|
6995
|
-
var _a =
|
|
7009
|
+
var RemoveScroll = React44__namespace.forwardRef(function(props, parentRef) {
|
|
7010
|
+
var ref = React44__namespace.useRef(null);
|
|
7011
|
+
var _a = React44__namespace.useState({
|
|
6996
7012
|
onScrollCapture: nothing,
|
|
6997
7013
|
onWheelCapture: nothing,
|
|
6998
7014
|
onTouchMoveCapture: nothing
|
|
@@ -7001,11 +7017,11 @@ var RemoveScroll = React43__namespace.forwardRef(function(props, parentRef) {
|
|
|
7001
7017
|
var SideCar2 = sideCar;
|
|
7002
7018
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
7003
7019
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
7004
|
-
return
|
|
7005
|
-
|
|
7020
|
+
return React44__namespace.createElement(
|
|
7021
|
+
React44__namespace.Fragment,
|
|
7006
7022
|
null,
|
|
7007
|
-
enabled &&
|
|
7008
|
-
forwardProps ?
|
|
7023
|
+
enabled && React44__namespace.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
7024
|
+
forwardProps ? React44__namespace.cloneElement(React44__namespace.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React44__namespace.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
7009
7025
|
);
|
|
7010
7026
|
});
|
|
7011
7027
|
RemoveScroll.defaultProps = {
|
|
@@ -7074,7 +7090,7 @@ var stylesheetSingleton = function() {
|
|
|
7074
7090
|
var styleHookSingleton = function() {
|
|
7075
7091
|
var sheet = stylesheetSingleton();
|
|
7076
7092
|
return function(styles, isDynamic) {
|
|
7077
|
-
|
|
7093
|
+
React44__namespace.useEffect(function() {
|
|
7078
7094
|
sheet.add(styles);
|
|
7079
7095
|
return function() {
|
|
7080
7096
|
sheet.remove();
|
|
@@ -7148,7 +7164,7 @@ var getCurrentUseCounter = function() {
|
|
|
7148
7164
|
return isFinite(counter) ? counter : 0;
|
|
7149
7165
|
};
|
|
7150
7166
|
var useLockAttribute = function() {
|
|
7151
|
-
|
|
7167
|
+
React44__namespace.useEffect(function() {
|
|
7152
7168
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
7153
7169
|
return function() {
|
|
7154
7170
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -7163,10 +7179,10 @@ var useLockAttribute = function() {
|
|
|
7163
7179
|
var RemoveScrollBar = function(_a) {
|
|
7164
7180
|
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
7165
7181
|
useLockAttribute();
|
|
7166
|
-
var gap =
|
|
7182
|
+
var gap = React44__namespace.useMemo(function() {
|
|
7167
7183
|
return getGapWidth(gapMode);
|
|
7168
7184
|
}, [gapMode]);
|
|
7169
|
-
return
|
|
7185
|
+
return React44__namespace.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
7170
7186
|
};
|
|
7171
7187
|
|
|
7172
7188
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.2_react@19.2.2/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -7307,16 +7323,16 @@ var generateStyle = function(id) {
|
|
|
7307
7323
|
var idCounter = 0;
|
|
7308
7324
|
var lockStack = [];
|
|
7309
7325
|
function RemoveScrollSideCar(props) {
|
|
7310
|
-
var shouldPreventQueue =
|
|
7311
|
-
var touchStartRef =
|
|
7312
|
-
var activeAxis =
|
|
7313
|
-
var id =
|
|
7314
|
-
var Style2 =
|
|
7315
|
-
var lastProps =
|
|
7316
|
-
|
|
7326
|
+
var shouldPreventQueue = React44__namespace.useRef([]);
|
|
7327
|
+
var touchStartRef = React44__namespace.useRef([0, 0]);
|
|
7328
|
+
var activeAxis = React44__namespace.useRef();
|
|
7329
|
+
var id = React44__namespace.useState(idCounter++)[0];
|
|
7330
|
+
var Style2 = React44__namespace.useState(styleSingleton)[0];
|
|
7331
|
+
var lastProps = React44__namespace.useRef(props);
|
|
7332
|
+
React44__namespace.useEffect(function() {
|
|
7317
7333
|
lastProps.current = props;
|
|
7318
7334
|
}, [props]);
|
|
7319
|
-
|
|
7335
|
+
React44__namespace.useEffect(function() {
|
|
7320
7336
|
if (props.inert) {
|
|
7321
7337
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
7322
7338
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef)).filter(Boolean);
|
|
@@ -7332,7 +7348,7 @@ function RemoveScrollSideCar(props) {
|
|
|
7332
7348
|
}
|
|
7333
7349
|
return;
|
|
7334
7350
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
7335
|
-
var shouldCancelEvent =
|
|
7351
|
+
var shouldCancelEvent = React44__namespace.useCallback(function(event, parent) {
|
|
7336
7352
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
7337
7353
|
return !lastProps.current.allowPinchZoom;
|
|
7338
7354
|
}
|
|
@@ -7368,7 +7384,7 @@ function RemoveScrollSideCar(props) {
|
|
|
7368
7384
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
7369
7385
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY);
|
|
7370
7386
|
}, []);
|
|
7371
|
-
var shouldPrevent =
|
|
7387
|
+
var shouldPrevent = React44__namespace.useCallback(function(_event) {
|
|
7372
7388
|
var event = _event;
|
|
7373
7389
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
7374
7390
|
return;
|
|
@@ -7395,7 +7411,7 @@ function RemoveScrollSideCar(props) {
|
|
|
7395
7411
|
}
|
|
7396
7412
|
}
|
|
7397
7413
|
}, []);
|
|
7398
|
-
var shouldCancel =
|
|
7414
|
+
var shouldCancel = React44__namespace.useCallback(function(name, delta, target, should) {
|
|
7399
7415
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
7400
7416
|
shouldPreventQueue.current.push(event);
|
|
7401
7417
|
setTimeout(function() {
|
|
@@ -7404,17 +7420,17 @@ function RemoveScrollSideCar(props) {
|
|
|
7404
7420
|
});
|
|
7405
7421
|
}, 1);
|
|
7406
7422
|
}, []);
|
|
7407
|
-
var scrollTouchStart =
|
|
7423
|
+
var scrollTouchStart = React44__namespace.useCallback(function(event) {
|
|
7408
7424
|
touchStartRef.current = getTouchXY(event);
|
|
7409
7425
|
activeAxis.current = void 0;
|
|
7410
7426
|
}, []);
|
|
7411
|
-
var scrollWheel =
|
|
7427
|
+
var scrollWheel = React44__namespace.useCallback(function(event) {
|
|
7412
7428
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
7413
7429
|
}, []);
|
|
7414
|
-
var scrollTouchMove =
|
|
7430
|
+
var scrollTouchMove = React44__namespace.useCallback(function(event) {
|
|
7415
7431
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
7416
7432
|
}, []);
|
|
7417
|
-
|
|
7433
|
+
React44__namespace.useEffect(function() {
|
|
7418
7434
|
lockStack.push(Style2);
|
|
7419
7435
|
props.setCallbacks({
|
|
7420
7436
|
onScrollCapture: scrollWheel,
|
|
@@ -7434,11 +7450,11 @@ function RemoveScrollSideCar(props) {
|
|
|
7434
7450
|
};
|
|
7435
7451
|
}, []);
|
|
7436
7452
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
7437
|
-
return
|
|
7438
|
-
|
|
7453
|
+
return React44__namespace.createElement(
|
|
7454
|
+
React44__namespace.Fragment,
|
|
7439
7455
|
null,
|
|
7440
|
-
inert ?
|
|
7441
|
-
removeScrollBar ?
|
|
7456
|
+
inert ? React44__namespace.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
7457
|
+
removeScrollBar ? React44__namespace.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
7442
7458
|
);
|
|
7443
7459
|
}
|
|
7444
7460
|
function getOutermostShadowParent(node) {
|
|
@@ -7457,8 +7473,8 @@ function getOutermostShadowParent(node) {
|
|
|
7457
7473
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
7458
7474
|
|
|
7459
7475
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.2_react@19.2.2/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
7460
|
-
var ReactRemoveScroll =
|
|
7461
|
-
return
|
|
7476
|
+
var ReactRemoveScroll = React44__namespace.forwardRef(function(props, ref) {
|
|
7477
|
+
return React44__namespace.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
7462
7478
|
});
|
|
7463
7479
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
7464
7480
|
var Combination_default = ReactRemoveScroll;
|
|
@@ -7488,11 +7504,11 @@ var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
|
7488
7504
|
var Menu = (props) => {
|
|
7489
7505
|
const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;
|
|
7490
7506
|
const popperScope = usePopperScope(__scopeMenu);
|
|
7491
|
-
const [content, setContent] =
|
|
7492
|
-
const isUsingKeyboardRef =
|
|
7507
|
+
const [content, setContent] = React44__namespace.useState(null);
|
|
7508
|
+
const isUsingKeyboardRef = React44__namespace.useRef(false);
|
|
7493
7509
|
const handleOpenChange = useCallbackRef(onOpenChange);
|
|
7494
7510
|
const direction = useDirection(dir);
|
|
7495
|
-
|
|
7511
|
+
React44__namespace.useEffect(() => {
|
|
7496
7512
|
const handleKeyDown = () => {
|
|
7497
7513
|
isUsingKeyboardRef.current = true;
|
|
7498
7514
|
document.addEventListener("pointerdown", handlePointer, { capture: true, once: true });
|
|
@@ -7518,7 +7534,7 @@ var Menu = (props) => {
|
|
|
7518
7534
|
MenuRootProvider,
|
|
7519
7535
|
{
|
|
7520
7536
|
scope: __scopeMenu,
|
|
7521
|
-
onClose:
|
|
7537
|
+
onClose: React44__namespace.useCallback(() => handleOpenChange(false), [handleOpenChange]),
|
|
7522
7538
|
isUsingKeyboardRef,
|
|
7523
7539
|
dir: direction,
|
|
7524
7540
|
modal,
|
|
@@ -7530,7 +7546,7 @@ var Menu = (props) => {
|
|
|
7530
7546
|
};
|
|
7531
7547
|
Menu.displayName = MENU_NAME;
|
|
7532
7548
|
var ANCHOR_NAME2 = "MenuAnchor";
|
|
7533
|
-
var MenuAnchor =
|
|
7549
|
+
var MenuAnchor = React44__namespace.forwardRef(
|
|
7534
7550
|
(props, forwardedRef) => {
|
|
7535
7551
|
const { __scopeMenu, ...anchorProps } = props;
|
|
7536
7552
|
const popperScope = usePopperScope(__scopeMenu);
|
|
@@ -7550,7 +7566,7 @@ var MenuPortal = (props) => {
|
|
|
7550
7566
|
MenuPortal.displayName = PORTAL_NAME2;
|
|
7551
7567
|
var CONTENT_NAME2 = "MenuContent";
|
|
7552
7568
|
var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME2);
|
|
7553
|
-
var MenuContent =
|
|
7569
|
+
var MenuContent = React44__namespace.forwardRef(
|
|
7554
7570
|
(props, forwardedRef) => {
|
|
7555
7571
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopeMenu);
|
|
7556
7572
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
@@ -7559,12 +7575,12 @@ var MenuContent = React43__namespace.forwardRef(
|
|
|
7559
7575
|
return /* @__PURE__ */ jsxRuntime.jsx(Collection2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Collection2.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsxRuntime.jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntime.jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
|
|
7560
7576
|
}
|
|
7561
7577
|
);
|
|
7562
|
-
var MenuRootContentModal =
|
|
7578
|
+
var MenuRootContentModal = React44__namespace.forwardRef(
|
|
7563
7579
|
(props, forwardedRef) => {
|
|
7564
7580
|
const context = useMenuContext(CONTENT_NAME2, props.__scopeMenu);
|
|
7565
|
-
const ref =
|
|
7581
|
+
const ref = React44__namespace.useRef(null);
|
|
7566
7582
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
7567
|
-
|
|
7583
|
+
React44__namespace.useEffect(() => {
|
|
7568
7584
|
const content = ref.current;
|
|
7569
7585
|
if (content) return hideOthers(content);
|
|
7570
7586
|
}, []);
|
|
@@ -7586,7 +7602,7 @@ var MenuRootContentModal = React43__namespace.forwardRef(
|
|
|
7586
7602
|
);
|
|
7587
7603
|
}
|
|
7588
7604
|
);
|
|
7589
|
-
var MenuRootContentNonModal =
|
|
7605
|
+
var MenuRootContentNonModal = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
7590
7606
|
const context = useMenuContext(CONTENT_NAME2, props.__scopeMenu);
|
|
7591
7607
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7592
7608
|
MenuContentImpl,
|
|
@@ -7601,7 +7617,7 @@ var MenuRootContentNonModal = React43__namespace.forwardRef((props, forwardedRef
|
|
|
7601
7617
|
);
|
|
7602
7618
|
});
|
|
7603
7619
|
var Slot2 = createSlot2("MenuContent.ScrollLock");
|
|
7604
|
-
var MenuContentImpl =
|
|
7620
|
+
var MenuContentImpl = React44__namespace.forwardRef(
|
|
7605
7621
|
(props, forwardedRef) => {
|
|
7606
7622
|
const {
|
|
7607
7623
|
__scopeMenu,
|
|
@@ -7624,16 +7640,16 @@ var MenuContentImpl = React43__namespace.forwardRef(
|
|
|
7624
7640
|
const popperScope = usePopperScope(__scopeMenu);
|
|
7625
7641
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
7626
7642
|
const getItems = useCollection2(__scopeMenu);
|
|
7627
|
-
const [currentItemId, setCurrentItemId] =
|
|
7628
|
-
const contentRef =
|
|
7643
|
+
const [currentItemId, setCurrentItemId] = React44__namespace.useState(null);
|
|
7644
|
+
const contentRef = React44__namespace.useRef(null);
|
|
7629
7645
|
const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);
|
|
7630
|
-
const timerRef =
|
|
7631
|
-
const searchRef =
|
|
7632
|
-
const pointerGraceTimerRef =
|
|
7633
|
-
const pointerGraceIntentRef =
|
|
7634
|
-
const pointerDirRef =
|
|
7635
|
-
const lastPointerXRef =
|
|
7636
|
-
const ScrollLockWrapper = disableOutsideScroll ? Combination_default :
|
|
7646
|
+
const timerRef = React44__namespace.useRef(0);
|
|
7647
|
+
const searchRef = React44__namespace.useRef("");
|
|
7648
|
+
const pointerGraceTimerRef = React44__namespace.useRef(0);
|
|
7649
|
+
const pointerGraceIntentRef = React44__namespace.useRef(null);
|
|
7650
|
+
const pointerDirRef = React44__namespace.useRef("right");
|
|
7651
|
+
const lastPointerXRef = React44__namespace.useRef(0);
|
|
7652
|
+
const ScrollLockWrapper = disableOutsideScroll ? Combination_default : React44__namespace.Fragment;
|
|
7637
7653
|
const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot2, allowPinchZoom: true } : void 0;
|
|
7638
7654
|
const handleTypeaheadSearch = (key) => {
|
|
7639
7655
|
const search = searchRef.current + key;
|
|
@@ -7652,11 +7668,11 @@ var MenuContentImpl = React43__namespace.forwardRef(
|
|
|
7652
7668
|
setTimeout(() => newItem.focus());
|
|
7653
7669
|
}
|
|
7654
7670
|
};
|
|
7655
|
-
|
|
7671
|
+
React44__namespace.useEffect(() => {
|
|
7656
7672
|
return () => window.clearTimeout(timerRef.current);
|
|
7657
7673
|
}, []);
|
|
7658
7674
|
useFocusGuards();
|
|
7659
|
-
const isPointerMovingToSubmenu =
|
|
7675
|
+
const isPointerMovingToSubmenu = React44__namespace.useCallback((event) => {
|
|
7660
7676
|
const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;
|
|
7661
7677
|
return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
|
|
7662
7678
|
}, []);
|
|
@@ -7665,13 +7681,13 @@ var MenuContentImpl = React43__namespace.forwardRef(
|
|
|
7665
7681
|
{
|
|
7666
7682
|
scope: __scopeMenu,
|
|
7667
7683
|
searchRef,
|
|
7668
|
-
onItemEnter:
|
|
7684
|
+
onItemEnter: React44__namespace.useCallback(
|
|
7669
7685
|
(event) => {
|
|
7670
7686
|
if (isPointerMovingToSubmenu(event)) event.preventDefault();
|
|
7671
7687
|
},
|
|
7672
7688
|
[isPointerMovingToSubmenu]
|
|
7673
7689
|
),
|
|
7674
|
-
onItemLeave:
|
|
7690
|
+
onItemLeave: React44__namespace.useCallback(
|
|
7675
7691
|
(event) => {
|
|
7676
7692
|
if (isPointerMovingToSubmenu(event)) return;
|
|
7677
7693
|
contentRef.current?.focus();
|
|
@@ -7679,14 +7695,14 @@ var MenuContentImpl = React43__namespace.forwardRef(
|
|
|
7679
7695
|
},
|
|
7680
7696
|
[isPointerMovingToSubmenu]
|
|
7681
7697
|
),
|
|
7682
|
-
onTriggerLeave:
|
|
7698
|
+
onTriggerLeave: React44__namespace.useCallback(
|
|
7683
7699
|
(event) => {
|
|
7684
7700
|
if (isPointerMovingToSubmenu(event)) event.preventDefault();
|
|
7685
7701
|
},
|
|
7686
7702
|
[isPointerMovingToSubmenu]
|
|
7687
7703
|
),
|
|
7688
7704
|
pointerGraceTimerRef,
|
|
7689
|
-
onPointerGraceIntentChange:
|
|
7705
|
+
onPointerGraceIntentChange: React44__namespace.useCallback((intent) => {
|
|
7690
7706
|
pointerGraceIntentRef.current = intent;
|
|
7691
7707
|
}, []),
|
|
7692
7708
|
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7785,7 +7801,7 @@ var MenuContentImpl = React43__namespace.forwardRef(
|
|
|
7785
7801
|
);
|
|
7786
7802
|
MenuContent.displayName = CONTENT_NAME2;
|
|
7787
7803
|
var GROUP_NAME2 = "MenuGroup";
|
|
7788
|
-
var MenuGroup =
|
|
7804
|
+
var MenuGroup = React44__namespace.forwardRef(
|
|
7789
7805
|
(props, forwardedRef) => {
|
|
7790
7806
|
const { __scopeMenu, ...groupProps } = props;
|
|
7791
7807
|
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
@@ -7793,7 +7809,7 @@ var MenuGroup = React43__namespace.forwardRef(
|
|
|
7793
7809
|
);
|
|
7794
7810
|
MenuGroup.displayName = GROUP_NAME2;
|
|
7795
7811
|
var LABEL_NAME = "MenuLabel";
|
|
7796
|
-
var MenuLabel =
|
|
7812
|
+
var MenuLabel = React44__namespace.forwardRef(
|
|
7797
7813
|
(props, forwardedRef) => {
|
|
7798
7814
|
const { __scopeMenu, ...labelProps } = props;
|
|
7799
7815
|
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
@@ -7802,14 +7818,14 @@ var MenuLabel = React43__namespace.forwardRef(
|
|
|
7802
7818
|
MenuLabel.displayName = LABEL_NAME;
|
|
7803
7819
|
var ITEM_NAME2 = "MenuItem";
|
|
7804
7820
|
var ITEM_SELECT = "menu.itemSelect";
|
|
7805
|
-
var MenuItem =
|
|
7821
|
+
var MenuItem = React44__namespace.forwardRef(
|
|
7806
7822
|
(props, forwardedRef) => {
|
|
7807
7823
|
const { disabled = false, onSelect, ...itemProps } = props;
|
|
7808
|
-
const ref =
|
|
7824
|
+
const ref = React44__namespace.useRef(null);
|
|
7809
7825
|
const rootContext = useMenuRootContext(ITEM_NAME2, props.__scopeMenu);
|
|
7810
7826
|
const contentContext = useMenuContentContext(ITEM_NAME2, props.__scopeMenu);
|
|
7811
7827
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
7812
|
-
const isPointerDownRef =
|
|
7828
|
+
const isPointerDownRef = React44__namespace.useRef(false);
|
|
7813
7829
|
const handleSelect = () => {
|
|
7814
7830
|
const menuItem = ref.current;
|
|
7815
7831
|
if (!disabled && menuItem) {
|
|
@@ -7850,16 +7866,16 @@ var MenuItem = React43__namespace.forwardRef(
|
|
|
7850
7866
|
}
|
|
7851
7867
|
);
|
|
7852
7868
|
MenuItem.displayName = ITEM_NAME2;
|
|
7853
|
-
var MenuItemImpl =
|
|
7869
|
+
var MenuItemImpl = React44__namespace.forwardRef(
|
|
7854
7870
|
(props, forwardedRef) => {
|
|
7855
7871
|
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
|
|
7856
7872
|
const contentContext = useMenuContentContext(ITEM_NAME2, __scopeMenu);
|
|
7857
7873
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
7858
|
-
const ref =
|
|
7874
|
+
const ref = React44__namespace.useRef(null);
|
|
7859
7875
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
7860
|
-
const [isFocused, setIsFocused] =
|
|
7861
|
-
const [textContent, setTextContent] =
|
|
7862
|
-
|
|
7876
|
+
const [isFocused, setIsFocused] = React44__namespace.useState(false);
|
|
7877
|
+
const [textContent, setTextContent] = React44__namespace.useState("");
|
|
7878
|
+
React44__namespace.useEffect(() => {
|
|
7863
7879
|
const menuItem = ref.current;
|
|
7864
7880
|
if (menuItem) {
|
|
7865
7881
|
setTextContent((menuItem.textContent ?? "").trim());
|
|
@@ -7907,7 +7923,7 @@ var MenuItemImpl = React43__namespace.forwardRef(
|
|
|
7907
7923
|
}
|
|
7908
7924
|
);
|
|
7909
7925
|
var CHECKBOX_ITEM_NAME = "MenuCheckboxItem";
|
|
7910
|
-
var MenuCheckboxItem =
|
|
7926
|
+
var MenuCheckboxItem = React44__namespace.forwardRef(
|
|
7911
7927
|
(props, forwardedRef) => {
|
|
7912
7928
|
const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
|
|
7913
7929
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7934,7 +7950,7 @@ var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(
|
|
|
7934
7950
|
{ value: void 0, onValueChange: () => {
|
|
7935
7951
|
} }
|
|
7936
7952
|
);
|
|
7937
|
-
var MenuRadioGroup =
|
|
7953
|
+
var MenuRadioGroup = React44__namespace.forwardRef(
|
|
7938
7954
|
(props, forwardedRef) => {
|
|
7939
7955
|
const { value, onValueChange, ...groupProps } = props;
|
|
7940
7956
|
const handleValueChange = useCallbackRef(onValueChange);
|
|
@@ -7943,7 +7959,7 @@ var MenuRadioGroup = React43__namespace.forwardRef(
|
|
|
7943
7959
|
);
|
|
7944
7960
|
MenuRadioGroup.displayName = RADIO_GROUP_NAME;
|
|
7945
7961
|
var RADIO_ITEM_NAME = "MenuRadioItem";
|
|
7946
|
-
var MenuRadioItem =
|
|
7962
|
+
var MenuRadioItem = React44__namespace.forwardRef(
|
|
7947
7963
|
(props, forwardedRef) => {
|
|
7948
7964
|
const { value, ...radioItemProps } = props;
|
|
7949
7965
|
const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);
|
|
@@ -7971,7 +7987,7 @@ var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(
|
|
|
7971
7987
|
ITEM_INDICATOR_NAME,
|
|
7972
7988
|
{ checked: false }
|
|
7973
7989
|
);
|
|
7974
|
-
var MenuItemIndicator =
|
|
7990
|
+
var MenuItemIndicator = React44__namespace.forwardRef(
|
|
7975
7991
|
(props, forwardedRef) => {
|
|
7976
7992
|
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
|
|
7977
7993
|
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
|
|
@@ -7993,7 +8009,7 @@ var MenuItemIndicator = React43__namespace.forwardRef(
|
|
|
7993
8009
|
);
|
|
7994
8010
|
MenuItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
7995
8011
|
var SEPARATOR_NAME = "MenuSeparator";
|
|
7996
|
-
var MenuSeparator =
|
|
8012
|
+
var MenuSeparator = React44__namespace.forwardRef(
|
|
7997
8013
|
(props, forwardedRef) => {
|
|
7998
8014
|
const { __scopeMenu, ...separatorProps } = props;
|
|
7999
8015
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8009,7 +8025,7 @@ var MenuSeparator = React43__namespace.forwardRef(
|
|
|
8009
8025
|
);
|
|
8010
8026
|
MenuSeparator.displayName = SEPARATOR_NAME;
|
|
8011
8027
|
var ARROW_NAME2 = "MenuArrow";
|
|
8012
|
-
var MenuArrow =
|
|
8028
|
+
var MenuArrow = React44__namespace.forwardRef(
|
|
8013
8029
|
(props, forwardedRef) => {
|
|
8014
8030
|
const { __scopeMenu, ...arrowProps } = props;
|
|
8015
8031
|
const popperScope = usePopperScope(__scopeMenu);
|
|
@@ -8023,10 +8039,10 @@ var MenuSub = (props) => {
|
|
|
8023
8039
|
const { __scopeMenu, children, open = false, onOpenChange } = props;
|
|
8024
8040
|
const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);
|
|
8025
8041
|
const popperScope = usePopperScope(__scopeMenu);
|
|
8026
|
-
const [trigger, setTrigger] =
|
|
8027
|
-
const [content, setContent] =
|
|
8042
|
+
const [trigger, setTrigger] = React44__namespace.useState(null);
|
|
8043
|
+
const [content, setContent] = React44__namespace.useState(null);
|
|
8028
8044
|
const handleOpenChange = useCallbackRef(onOpenChange);
|
|
8029
|
-
|
|
8045
|
+
React44__namespace.useEffect(() => {
|
|
8030
8046
|
if (parentMenuContext.open === false) handleOpenChange(false);
|
|
8031
8047
|
return () => handleOpenChange(false);
|
|
8032
8048
|
}, [parentMenuContext.open, handleOpenChange]);
|
|
@@ -8054,21 +8070,21 @@ var MenuSub = (props) => {
|
|
|
8054
8070
|
};
|
|
8055
8071
|
MenuSub.displayName = SUB_NAME;
|
|
8056
8072
|
var SUB_TRIGGER_NAME = "MenuSubTrigger";
|
|
8057
|
-
var MenuSubTrigger =
|
|
8073
|
+
var MenuSubTrigger = React44__namespace.forwardRef(
|
|
8058
8074
|
(props, forwardedRef) => {
|
|
8059
8075
|
const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
8060
8076
|
const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
8061
8077
|
const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
8062
8078
|
const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
8063
|
-
const openTimerRef =
|
|
8079
|
+
const openTimerRef = React44__namespace.useRef(null);
|
|
8064
8080
|
const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;
|
|
8065
8081
|
const scope = { __scopeMenu: props.__scopeMenu };
|
|
8066
|
-
const clearOpenTimer =
|
|
8082
|
+
const clearOpenTimer = React44__namespace.useCallback(() => {
|
|
8067
8083
|
if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
|
|
8068
8084
|
openTimerRef.current = null;
|
|
8069
8085
|
}, []);
|
|
8070
|
-
|
|
8071
|
-
|
|
8086
|
+
React44__namespace.useEffect(() => clearOpenTimer, [clearOpenTimer]);
|
|
8087
|
+
React44__namespace.useEffect(() => {
|
|
8072
8088
|
const pointerGraceTimer = pointerGraceTimerRef.current;
|
|
8073
8089
|
return () => {
|
|
8074
8090
|
window.clearTimeout(pointerGraceTimer);
|
|
@@ -8155,14 +8171,14 @@ var MenuSubTrigger = React43__namespace.forwardRef(
|
|
|
8155
8171
|
);
|
|
8156
8172
|
MenuSubTrigger.displayName = SUB_TRIGGER_NAME;
|
|
8157
8173
|
var SUB_CONTENT_NAME = "MenuSubContent";
|
|
8158
|
-
var MenuSubContent =
|
|
8174
|
+
var MenuSubContent = React44__namespace.forwardRef(
|
|
8159
8175
|
(props, forwardedRef) => {
|
|
8160
8176
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopeMenu);
|
|
8161
8177
|
const { forceMount = portalContext.forceMount, ...subContentProps } = props;
|
|
8162
8178
|
const context = useMenuContext(CONTENT_NAME2, props.__scopeMenu);
|
|
8163
8179
|
const rootContext = useMenuRootContext(CONTENT_NAME2, props.__scopeMenu);
|
|
8164
8180
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);
|
|
8165
|
-
const ref =
|
|
8181
|
+
const ref = React44__namespace.useRef(null);
|
|
8166
8182
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
8167
8183
|
return /* @__PURE__ */ jsxRuntime.jsx(Collection2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Collection2.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8168
8184
|
MenuContentImpl,
|
|
@@ -8291,7 +8307,7 @@ var DropdownMenu = (props) => {
|
|
|
8291
8307
|
modal = true
|
|
8292
8308
|
} = props;
|
|
8293
8309
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8294
|
-
const triggerRef =
|
|
8310
|
+
const triggerRef = React44__namespace.useRef(null);
|
|
8295
8311
|
const [open, setOpen] = useControllableState({
|
|
8296
8312
|
prop: openProp,
|
|
8297
8313
|
defaultProp: defaultOpen ?? false,
|
|
@@ -8307,7 +8323,7 @@ var DropdownMenu = (props) => {
|
|
|
8307
8323
|
contentId: useId(),
|
|
8308
8324
|
open,
|
|
8309
8325
|
onOpenChange: setOpen,
|
|
8310
|
-
onOpenToggle:
|
|
8326
|
+
onOpenToggle: React44__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
8311
8327
|
modal,
|
|
8312
8328
|
children: /* @__PURE__ */ jsxRuntime.jsx(Root32, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
|
|
8313
8329
|
}
|
|
@@ -8315,7 +8331,7 @@ var DropdownMenu = (props) => {
|
|
|
8315
8331
|
};
|
|
8316
8332
|
DropdownMenu.displayName = DROPDOWN_MENU_NAME;
|
|
8317
8333
|
var TRIGGER_NAME = "DropdownMenuTrigger";
|
|
8318
|
-
var DropdownMenuTrigger =
|
|
8334
|
+
var DropdownMenuTrigger = React44__namespace.forwardRef(
|
|
8319
8335
|
(props, forwardedRef) => {
|
|
8320
8336
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
8321
8337
|
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
@@ -8358,12 +8374,12 @@ var DropdownMenuPortal = (props) => {
|
|
|
8358
8374
|
};
|
|
8359
8375
|
DropdownMenuPortal.displayName = PORTAL_NAME3;
|
|
8360
8376
|
var CONTENT_NAME3 = "DropdownMenuContent";
|
|
8361
|
-
var DropdownMenuContent =
|
|
8377
|
+
var DropdownMenuContent = React44__namespace.forwardRef(
|
|
8362
8378
|
(props, forwardedRef) => {
|
|
8363
8379
|
const { __scopeDropdownMenu, ...contentProps } = props;
|
|
8364
8380
|
const context = useDropdownMenuContext(CONTENT_NAME3, __scopeDropdownMenu);
|
|
8365
8381
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8366
|
-
const hasInteractedOutsideRef =
|
|
8382
|
+
const hasInteractedOutsideRef = React44__namespace.useRef(false);
|
|
8367
8383
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8368
8384
|
Content2,
|
|
8369
8385
|
{
|
|
@@ -8400,7 +8416,7 @@ var DropdownMenuContent = React43__namespace.forwardRef(
|
|
|
8400
8416
|
);
|
|
8401
8417
|
DropdownMenuContent.displayName = CONTENT_NAME3;
|
|
8402
8418
|
var GROUP_NAME3 = "DropdownMenuGroup";
|
|
8403
|
-
var DropdownMenuGroup =
|
|
8419
|
+
var DropdownMenuGroup = React44__namespace.forwardRef(
|
|
8404
8420
|
(props, forwardedRef) => {
|
|
8405
8421
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
8406
8422
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -8409,7 +8425,7 @@ var DropdownMenuGroup = React43__namespace.forwardRef(
|
|
|
8409
8425
|
);
|
|
8410
8426
|
DropdownMenuGroup.displayName = GROUP_NAME3;
|
|
8411
8427
|
var LABEL_NAME2 = "DropdownMenuLabel";
|
|
8412
|
-
var DropdownMenuLabel =
|
|
8428
|
+
var DropdownMenuLabel = React44__namespace.forwardRef(
|
|
8413
8429
|
(props, forwardedRef) => {
|
|
8414
8430
|
const { __scopeDropdownMenu, ...labelProps } = props;
|
|
8415
8431
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -8418,7 +8434,7 @@ var DropdownMenuLabel = React43__namespace.forwardRef(
|
|
|
8418
8434
|
);
|
|
8419
8435
|
DropdownMenuLabel.displayName = LABEL_NAME2;
|
|
8420
8436
|
var ITEM_NAME3 = "DropdownMenuItem";
|
|
8421
|
-
var DropdownMenuItem =
|
|
8437
|
+
var DropdownMenuItem = React44__namespace.forwardRef(
|
|
8422
8438
|
(props, forwardedRef) => {
|
|
8423
8439
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
8424
8440
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -8427,42 +8443,42 @@ var DropdownMenuItem = React43__namespace.forwardRef(
|
|
|
8427
8443
|
);
|
|
8428
8444
|
DropdownMenuItem.displayName = ITEM_NAME3;
|
|
8429
8445
|
var CHECKBOX_ITEM_NAME2 = "DropdownMenuCheckboxItem";
|
|
8430
|
-
var DropdownMenuCheckboxItem =
|
|
8446
|
+
var DropdownMenuCheckboxItem = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
8431
8447
|
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
8432
8448
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8433
8449
|
return /* @__PURE__ */ jsxRuntime.jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
8434
8450
|
});
|
|
8435
8451
|
DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME2;
|
|
8436
8452
|
var RADIO_GROUP_NAME2 = "DropdownMenuRadioGroup";
|
|
8437
|
-
var DropdownMenuRadioGroup =
|
|
8453
|
+
var DropdownMenuRadioGroup = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
8438
8454
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
8439
8455
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8440
8456
|
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
8441
8457
|
});
|
|
8442
8458
|
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME2;
|
|
8443
8459
|
var RADIO_ITEM_NAME2 = "DropdownMenuRadioItem";
|
|
8444
|
-
var DropdownMenuRadioItem =
|
|
8460
|
+
var DropdownMenuRadioItem = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
8445
8461
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
8446
8462
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8447
8463
|
return /* @__PURE__ */ jsxRuntime.jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
8448
8464
|
});
|
|
8449
8465
|
DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME2;
|
|
8450
8466
|
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
8451
|
-
var DropdownMenuItemIndicator =
|
|
8467
|
+
var DropdownMenuItemIndicator = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
8452
8468
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
8453
8469
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8454
8470
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
8455
8471
|
});
|
|
8456
8472
|
DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
|
|
8457
8473
|
var SEPARATOR_NAME2 = "DropdownMenuSeparator";
|
|
8458
|
-
var DropdownMenuSeparator =
|
|
8474
|
+
var DropdownMenuSeparator = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
8459
8475
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
8460
8476
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8461
8477
|
return /* @__PURE__ */ jsxRuntime.jsx(Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });
|
|
8462
8478
|
});
|
|
8463
8479
|
DropdownMenuSeparator.displayName = SEPARATOR_NAME2;
|
|
8464
8480
|
var ARROW_NAME3 = "DropdownMenuArrow";
|
|
8465
|
-
var DropdownMenuArrow =
|
|
8481
|
+
var DropdownMenuArrow = React44__namespace.forwardRef(
|
|
8466
8482
|
(props, forwardedRef) => {
|
|
8467
8483
|
const { __scopeDropdownMenu, ...arrowProps } = props;
|
|
8468
8484
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -8482,14 +8498,14 @@ var DropdownMenuSub = (props) => {
|
|
|
8482
8498
|
return /* @__PURE__ */ jsxRuntime.jsx(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
|
|
8483
8499
|
};
|
|
8484
8500
|
var SUB_TRIGGER_NAME2 = "DropdownMenuSubTrigger";
|
|
8485
|
-
var DropdownMenuSubTrigger =
|
|
8501
|
+
var DropdownMenuSubTrigger = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
8486
8502
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
8487
8503
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8488
8504
|
return /* @__PURE__ */ jsxRuntime.jsx(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
|
|
8489
8505
|
});
|
|
8490
8506
|
DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME2;
|
|
8491
8507
|
var SUB_CONTENT_NAME2 = "DropdownMenuSubContent";
|
|
8492
|
-
var DropdownMenuSubContent =
|
|
8508
|
+
var DropdownMenuSubContent = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
8493
8509
|
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
8494
8510
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
8495
8511
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8528,20 +8544,107 @@ var Separator2 = DropdownMenuSeparator;
|
|
|
8528
8544
|
var Sub2 = DropdownMenuSub;
|
|
8529
8545
|
var SubTrigger2 = DropdownMenuSubTrigger;
|
|
8530
8546
|
var SubContent2 = DropdownMenuSubContent;
|
|
8547
|
+
|
|
8548
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
8549
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
8550
|
+
var mergeClasses = (...classes) => classes.filter((className, index2, array) => {
|
|
8551
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
|
|
8552
|
+
}).join(" ").trim();
|
|
8553
|
+
|
|
8554
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
8555
|
+
var defaultAttributes = {
|
|
8556
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8557
|
+
width: 24,
|
|
8558
|
+
height: 24,
|
|
8559
|
+
viewBox: "0 0 24 24",
|
|
8560
|
+
fill: "none",
|
|
8561
|
+
stroke: "currentColor",
|
|
8562
|
+
strokeWidth: 2,
|
|
8563
|
+
strokeLinecap: "round",
|
|
8564
|
+
strokeLinejoin: "round"
|
|
8565
|
+
};
|
|
8566
|
+
|
|
8567
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/Icon.js
|
|
8568
|
+
var Icon = React44.forwardRef(
|
|
8569
|
+
({
|
|
8570
|
+
color = "currentColor",
|
|
8571
|
+
size: size4 = 24,
|
|
8572
|
+
strokeWidth = 2,
|
|
8573
|
+
absoluteStrokeWidth,
|
|
8574
|
+
className = "",
|
|
8575
|
+
children,
|
|
8576
|
+
iconNode,
|
|
8577
|
+
...rest
|
|
8578
|
+
}, ref) => {
|
|
8579
|
+
return React44.createElement(
|
|
8580
|
+
"svg",
|
|
8581
|
+
{
|
|
8582
|
+
ref,
|
|
8583
|
+
...defaultAttributes,
|
|
8584
|
+
width: size4,
|
|
8585
|
+
height: size4,
|
|
8586
|
+
stroke: color,
|
|
8587
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
|
|
8588
|
+
className: mergeClasses("lucide", className),
|
|
8589
|
+
...rest
|
|
8590
|
+
},
|
|
8591
|
+
[
|
|
8592
|
+
...iconNode.map(([tag, attrs]) => React44.createElement(tag, attrs)),
|
|
8593
|
+
...Array.isArray(children) ? children : [children]
|
|
8594
|
+
]
|
|
8595
|
+
);
|
|
8596
|
+
}
|
|
8597
|
+
);
|
|
8598
|
+
|
|
8599
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
8600
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
8601
|
+
const Component = React44.forwardRef(
|
|
8602
|
+
({ className, ...props }, ref) => React44.createElement(Icon, {
|
|
8603
|
+
ref,
|
|
8604
|
+
iconNode,
|
|
8605
|
+
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
|
8606
|
+
...props
|
|
8607
|
+
})
|
|
8608
|
+
);
|
|
8609
|
+
Component.displayName = `${iconName}`;
|
|
8610
|
+
return Component;
|
|
8611
|
+
};
|
|
8612
|
+
|
|
8613
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/icons/check.js
|
|
8614
|
+
var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
8615
|
+
var Check = createLucideIcon("Check", __iconNode);
|
|
8616
|
+
|
|
8617
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
8618
|
+
var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
8619
|
+
var ChevronDown = createLucideIcon("ChevronDown", __iconNode2);
|
|
8620
|
+
|
|
8621
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
8622
|
+
var __iconNode3 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
8623
|
+
var ChevronRight = createLucideIcon("ChevronRight", __iconNode3);
|
|
8624
|
+
|
|
8625
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
8626
|
+
var __iconNode4 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
8627
|
+
var ChevronUp = createLucideIcon("ChevronUp", __iconNode4);
|
|
8628
|
+
|
|
8629
|
+
// ../../node_modules/.pnpm/lucide-react@0.476.0_react@19.2.2/node_modules/lucide-react/dist/esm/icons/circle.js
|
|
8630
|
+
var __iconNode5 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
8631
|
+
var Circle = createLucideIcon("Circle", __iconNode5);
|
|
8632
|
+
|
|
8633
|
+
// src/components/ui/dropdown-menu.tsx
|
|
8531
8634
|
function DropdownMenu2({
|
|
8532
8635
|
...props
|
|
8533
8636
|
}) {
|
|
8534
|
-
return /* @__PURE__ */
|
|
8637
|
+
return /* @__PURE__ */ React44__namespace.createElement(Root23, { "data-slot": "dropdown-menu", ...props });
|
|
8535
8638
|
}
|
|
8536
8639
|
function DropdownMenuPortal2({
|
|
8537
8640
|
...props
|
|
8538
8641
|
}) {
|
|
8539
|
-
return /* @__PURE__ */
|
|
8642
|
+
return /* @__PURE__ */ React44__namespace.createElement(Portal22, { "data-slot": "dropdown-menu-portal", ...props });
|
|
8540
8643
|
}
|
|
8541
8644
|
function DropdownMenuTrigger2({
|
|
8542
8645
|
...props
|
|
8543
8646
|
}) {
|
|
8544
|
-
return /* @__PURE__ */
|
|
8647
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8545
8648
|
Trigger,
|
|
8546
8649
|
{
|
|
8547
8650
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -8554,7 +8657,7 @@ function DropdownMenuContent2({
|
|
|
8554
8657
|
sideOffset = 4,
|
|
8555
8658
|
...props
|
|
8556
8659
|
}) {
|
|
8557
|
-
return /* @__PURE__ */
|
|
8660
|
+
return /* @__PURE__ */ React44__namespace.createElement(Portal22, null, /* @__PURE__ */ React44__namespace.createElement(
|
|
8558
8661
|
Content22,
|
|
8559
8662
|
{
|
|
8560
8663
|
"data-slot": "dropdown-menu-content",
|
|
@@ -8571,30 +8674,30 @@ function DropdownMenuClose({
|
|
|
8571
8674
|
className,
|
|
8572
8675
|
...props
|
|
8573
8676
|
}) {
|
|
8574
|
-
return /* @__PURE__ */
|
|
8677
|
+
return /* @__PURE__ */ React44__namespace.createElement(Item22, { "data-slot": "dropdown-menu-close", className: "hidden", ...props });
|
|
8575
8678
|
}
|
|
8576
8679
|
function DropdownMenuGroup2({
|
|
8577
8680
|
...props
|
|
8578
8681
|
}) {
|
|
8579
|
-
return /* @__PURE__ */
|
|
8682
|
+
return /* @__PURE__ */ React44__namespace.createElement(Group2, { "data-slot": "dropdown-menu-group", ...props });
|
|
8580
8683
|
}
|
|
8581
8684
|
function ConfirmationDropdownMenuItem({
|
|
8582
8685
|
...props
|
|
8583
8686
|
}) {
|
|
8584
8687
|
const { onClick: originalOnClick, ...rest } = props;
|
|
8585
|
-
const [isConfirming, setIsConfirming] =
|
|
8586
|
-
return !isConfirming ? /* @__PURE__ */
|
|
8688
|
+
const [isConfirming, setIsConfirming] = React44__namespace.useState(false);
|
|
8689
|
+
return !isConfirming ? /* @__PURE__ */ React44__namespace.createElement(DropdownMenuItem2, { ...rest, onClick: (e) => {
|
|
8587
8690
|
setIsConfirming(true);
|
|
8588
8691
|
e.preventDefault();
|
|
8589
8692
|
e.stopPropagation();
|
|
8590
|
-
} }) : /* @__PURE__ */
|
|
8693
|
+
} }) : /* @__PURE__ */ React44__namespace.createElement(DropdownMenuItem2, { ...rest, onClick: (e) => {
|
|
8591
8694
|
if (originalOnClick) {
|
|
8592
8695
|
setIsConfirming(false);
|
|
8593
8696
|
originalOnClick(e);
|
|
8594
8697
|
e.preventDefault();
|
|
8595
8698
|
e.stopPropagation();
|
|
8596
8699
|
}
|
|
8597
|
-
} }, /* @__PURE__ */
|
|
8700
|
+
} }, /* @__PURE__ */ React44__namespace.createElement("div", { className: "flex flex-row gap-2 items-center" }, /* @__PURE__ */ React44__namespace.createElement("div", { className: "text-destructive" }, "Are you sure ?")));
|
|
8598
8701
|
}
|
|
8599
8702
|
function DropdownMenuItem2({
|
|
8600
8703
|
className,
|
|
@@ -8602,7 +8705,7 @@ function DropdownMenuItem2({
|
|
|
8602
8705
|
variant = "default",
|
|
8603
8706
|
...props
|
|
8604
8707
|
}) {
|
|
8605
|
-
return /* @__PURE__ */
|
|
8708
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8606
8709
|
Item22,
|
|
8607
8710
|
{
|
|
8608
8711
|
"data-slot": "dropdown-menu-item",
|
|
@@ -8622,7 +8725,7 @@ function DropdownMenuCheckboxItem2({
|
|
|
8622
8725
|
checked,
|
|
8623
8726
|
...props
|
|
8624
8727
|
}) {
|
|
8625
|
-
return /* @__PURE__ */
|
|
8728
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8626
8729
|
CheckboxItem2,
|
|
8627
8730
|
{
|
|
8628
8731
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
@@ -8633,14 +8736,14 @@ function DropdownMenuCheckboxItem2({
|
|
|
8633
8736
|
checked,
|
|
8634
8737
|
...props
|
|
8635
8738
|
},
|
|
8636
|
-
/* @__PURE__ */
|
|
8739
|
+
/* @__PURE__ */ React44__namespace.createElement("span", { className: "uii:pointer-events-none uii:absolute uii:left-2 uii:flex uii:size-3.5 uii:items-center uii:justify-center" }, /* @__PURE__ */ React44__namespace.createElement(ItemIndicator2, null, /* @__PURE__ */ React44__namespace.createElement(Check, { className: "uii:size-4" }))),
|
|
8637
8740
|
children
|
|
8638
8741
|
);
|
|
8639
8742
|
}
|
|
8640
8743
|
function DropdownMenuRadioGroup2({
|
|
8641
8744
|
...props
|
|
8642
8745
|
}) {
|
|
8643
|
-
return /* @__PURE__ */
|
|
8746
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8644
8747
|
RadioGroup2,
|
|
8645
8748
|
{
|
|
8646
8749
|
"data-slot": "dropdown-menu-radio-group",
|
|
@@ -8653,7 +8756,7 @@ function DropdownMenuRadioItem2({
|
|
|
8653
8756
|
children,
|
|
8654
8757
|
...props
|
|
8655
8758
|
}) {
|
|
8656
|
-
return /* @__PURE__ */
|
|
8759
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8657
8760
|
RadioItem2,
|
|
8658
8761
|
{
|
|
8659
8762
|
"data-slot": "dropdown-menu-radio-item",
|
|
@@ -8663,7 +8766,7 @@ function DropdownMenuRadioItem2({
|
|
|
8663
8766
|
),
|
|
8664
8767
|
...props
|
|
8665
8768
|
},
|
|
8666
|
-
/* @__PURE__ */
|
|
8769
|
+
/* @__PURE__ */ React44__namespace.createElement("span", { className: "uii:pointer-events-none uii:absolute uii:left-2 uii:flex uii:size-3.5 uii:items-center uii:justify-center" }, /* @__PURE__ */ React44__namespace.createElement(ItemIndicator2, null, /* @__PURE__ */ React44__namespace.createElement(Circle, { className: "uii:size-2 uii:fill-current" }))),
|
|
8667
8770
|
children
|
|
8668
8771
|
);
|
|
8669
8772
|
}
|
|
@@ -8672,7 +8775,7 @@ function DropdownMenuLabel2({
|
|
|
8672
8775
|
inset,
|
|
8673
8776
|
...props
|
|
8674
8777
|
}) {
|
|
8675
|
-
return /* @__PURE__ */
|
|
8778
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8676
8779
|
Label2,
|
|
8677
8780
|
{
|
|
8678
8781
|
"data-slot": "dropdown-menu-label",
|
|
@@ -8689,7 +8792,7 @@ function DropdownMenuSeparator2({
|
|
|
8689
8792
|
className,
|
|
8690
8793
|
...props
|
|
8691
8794
|
}) {
|
|
8692
|
-
return /* @__PURE__ */
|
|
8795
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8693
8796
|
Separator2,
|
|
8694
8797
|
{
|
|
8695
8798
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -8702,7 +8805,7 @@ function DropdownMenuShortcut({
|
|
|
8702
8805
|
className,
|
|
8703
8806
|
...props
|
|
8704
8807
|
}) {
|
|
8705
|
-
return /* @__PURE__ */
|
|
8808
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8706
8809
|
"span",
|
|
8707
8810
|
{
|
|
8708
8811
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -8717,7 +8820,7 @@ function DropdownMenuShortcut({
|
|
|
8717
8820
|
function DropdownMenuSub2({
|
|
8718
8821
|
...props
|
|
8719
8822
|
}) {
|
|
8720
|
-
return /* @__PURE__ */
|
|
8823
|
+
return /* @__PURE__ */ React44__namespace.createElement(Sub2, { "data-slot": "dropdown-menu-sub", ...props });
|
|
8721
8824
|
}
|
|
8722
8825
|
function DropdownMenuSubTrigger2({
|
|
8723
8826
|
className,
|
|
@@ -8725,7 +8828,7 @@ function DropdownMenuSubTrigger2({
|
|
|
8725
8828
|
children,
|
|
8726
8829
|
...props
|
|
8727
8830
|
}) {
|
|
8728
|
-
return /* @__PURE__ */
|
|
8831
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8729
8832
|
SubTrigger2,
|
|
8730
8833
|
{
|
|
8731
8834
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -8737,14 +8840,14 @@ function DropdownMenuSubTrigger2({
|
|
|
8737
8840
|
...props
|
|
8738
8841
|
},
|
|
8739
8842
|
children,
|
|
8740
|
-
/* @__PURE__ */
|
|
8843
|
+
/* @__PURE__ */ React44__namespace.createElement(ChevronRight, { className: "uii:ml-auto uii:size-4" })
|
|
8741
8844
|
);
|
|
8742
8845
|
}
|
|
8743
8846
|
function DropdownMenuSubContent2({
|
|
8744
8847
|
className,
|
|
8745
8848
|
...props
|
|
8746
8849
|
}) {
|
|
8747
|
-
return /* @__PURE__ */
|
|
8850
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
8748
8851
|
SubContent2,
|
|
8749
8852
|
{
|
|
8750
8853
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -8764,6 +8867,7 @@ __export(fields_exports, {
|
|
|
8764
8867
|
InferredTypesContext: () => InferredTypesContext,
|
|
8765
8868
|
InferredTypesProvider: () => InferredTypesProvider,
|
|
8766
8869
|
Input: () => Input,
|
|
8870
|
+
LogicToggleButton: () => LogicToggleButton,
|
|
8767
8871
|
NestedFieldProvider: () => NestedFieldProvider,
|
|
8768
8872
|
NodePropertyProvider: () => NodePropertyProvider,
|
|
8769
8873
|
OPERATORS_BY_TYPE: () => OPERATORS_BY_TYPE,
|
|
@@ -8777,6 +8881,7 @@ __export(fields_exports, {
|
|
|
8777
8881
|
getOperatorsForType: () => getOperatorsForType,
|
|
8778
8882
|
getStringConstants: () => getStringConstants,
|
|
8779
8883
|
intersectTypes: () => intersectTypes,
|
|
8884
|
+
logicToggleButtonStyles: () => logicToggleButtonStyles,
|
|
8780
8885
|
normalizeFieldValue: () => normalizeFieldValue,
|
|
8781
8886
|
parseInferSyntax: () => parseInferSyntax,
|
|
8782
8887
|
parseInferredTypes: () => parseInferredTypes,
|
|
@@ -8800,10 +8905,10 @@ __export(fields_exports, {
|
|
|
8800
8905
|
useTemplateFieldContext: () => useTemplateFieldContext,
|
|
8801
8906
|
useTriggerLayoutUpdate: () => useTriggerLayoutUpdate
|
|
8802
8907
|
});
|
|
8803
|
-
var DevContext =
|
|
8908
|
+
var DevContext = React44.createContext(null);
|
|
8804
8909
|
function useResolvedExpectedType(expectedType, devCtx) {
|
|
8805
8910
|
const inferredTypes = devCtx?.inferredTypes;
|
|
8806
|
-
return
|
|
8911
|
+
return React44__namespace.useMemo(() => {
|
|
8807
8912
|
if (!expectedType) return "any";
|
|
8808
8913
|
if (!expectedType.startsWith("$infer<")) {
|
|
8809
8914
|
return expectedType;
|
|
@@ -8846,18 +8951,18 @@ function Input({
|
|
|
8846
8951
|
className,
|
|
8847
8952
|
editorClassName
|
|
8848
8953
|
}) {
|
|
8849
|
-
const devCtx =
|
|
8954
|
+
const devCtx = React44.useContext(DevContext);
|
|
8850
8955
|
const resolvedExpectedType = useResolvedExpectedType(expectedType, devCtx);
|
|
8851
|
-
const displayValue =
|
|
8956
|
+
const displayValue = React44__namespace.useMemo(() => {
|
|
8852
8957
|
if (value != null && typeof value === "object" && "expression" in value) {
|
|
8853
8958
|
return String(value.expression ?? "");
|
|
8854
8959
|
}
|
|
8855
8960
|
return String(value ?? "");
|
|
8856
8961
|
}, [value]);
|
|
8857
|
-
const isExpression =
|
|
8962
|
+
const isExpression = React44__namespace.useMemo(() => {
|
|
8858
8963
|
return value != null && typeof value === "object" && "expression" in value;
|
|
8859
8964
|
}, [value]);
|
|
8860
|
-
const handleChange =
|
|
8965
|
+
const handleChange = React44__namespace.useCallback((e) => {
|
|
8861
8966
|
const newValue = e.target.value;
|
|
8862
8967
|
if (newValue.includes("{{")) {
|
|
8863
8968
|
onChange({
|
|
@@ -8870,7 +8975,7 @@ function Input({
|
|
|
8870
8975
|
}, [onChange]);
|
|
8871
8976
|
const showError = hasRequiredError || required && !displayValue;
|
|
8872
8977
|
const isWaiting = resolvedExpectedType.startsWith("Waiting for:") || resolvedExpectedType.startsWith("Subscribing to:");
|
|
8873
|
-
return /* @__PURE__ */
|
|
8978
|
+
return /* @__PURE__ */ React44__namespace.createElement("div", { className: cn("uii:mb-2", className) }, /* @__PURE__ */ React44__namespace.createElement("div", { className: "uii:flex uii:items-center uii:gap-2 uii:mt-2" }, /* @__PURE__ */ React44__namespace.createElement(
|
|
8874
8979
|
"label",
|
|
8875
8980
|
{
|
|
8876
8981
|
htmlFor: fieldName,
|
|
@@ -8878,7 +8983,7 @@ function Input({
|
|
|
8878
8983
|
},
|
|
8879
8984
|
label,
|
|
8880
8985
|
":"
|
|
8881
|
-
), resolvedExpectedType !== "$.interface.timer" && /* @__PURE__ */
|
|
8986
|
+
), resolvedExpectedType !== "$.interface.timer" && /* @__PURE__ */ React44__namespace.createElement(
|
|
8882
8987
|
"span",
|
|
8883
8988
|
{
|
|
8884
8989
|
className: cn(
|
|
@@ -8888,7 +8993,7 @@ function Input({
|
|
|
8888
8993
|
title: resolvedExpectedType
|
|
8889
8994
|
},
|
|
8890
8995
|
resolvedExpectedType
|
|
8891
|
-
), showError && /* @__PURE__ */
|
|
8996
|
+
), showError && /* @__PURE__ */ React44__namespace.createElement("span", { className: "uii:-mt-2 uii:inline-flex uii:px-1 uii:py-0.5 uii:bg-red-100 uii:text-red-600 uii:rounded-sm uii:text-[10px] uii:font-medium" }, "Required")), /* @__PURE__ */ React44__namespace.createElement("div", { className: "uii:mt-0.5" }, /* @__PURE__ */ React44__namespace.createElement(
|
|
8892
8997
|
"input",
|
|
8893
8998
|
{
|
|
8894
8999
|
id: fieldName,
|
|
@@ -8916,8 +9021,8 @@ function clamp2(value, [min2, max2]) {
|
|
|
8916
9021
|
return Math.min(max2, Math.max(min2, value));
|
|
8917
9022
|
}
|
|
8918
9023
|
function usePrevious(value) {
|
|
8919
|
-
const ref =
|
|
8920
|
-
return
|
|
9024
|
+
const ref = React44__namespace.useRef({ value, previous: value });
|
|
9025
|
+
return React44__namespace.useMemo(() => {
|
|
8921
9026
|
if (ref.current.value !== value) {
|
|
8922
9027
|
ref.current.previous = ref.current.value;
|
|
8923
9028
|
ref.current.value = value;
|
|
@@ -8939,7 +9044,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
8939
9044
|
wordWrap: "normal"
|
|
8940
9045
|
});
|
|
8941
9046
|
var NAME3 = "VisuallyHidden";
|
|
8942
|
-
var VisuallyHidden =
|
|
9047
|
+
var VisuallyHidden = React44__namespace.forwardRef(
|
|
8943
9048
|
(props, forwardedRef) => {
|
|
8944
9049
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8945
9050
|
Primitive.span,
|
|
@@ -8981,9 +9086,9 @@ var Select = (props) => {
|
|
|
8981
9086
|
form
|
|
8982
9087
|
} = props;
|
|
8983
9088
|
const popperScope = usePopperScope2(__scopeSelect);
|
|
8984
|
-
const [trigger, setTrigger] =
|
|
8985
|
-
const [valueNode, setValueNode] =
|
|
8986
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
9089
|
+
const [trigger, setTrigger] = React44__namespace.useState(null);
|
|
9090
|
+
const [valueNode, setValueNode] = React44__namespace.useState(null);
|
|
9091
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React44__namespace.useState(false);
|
|
8987
9092
|
const direction = useDirection(dir);
|
|
8988
9093
|
const [open, setOpen] = useControllableState({
|
|
8989
9094
|
prop: openProp,
|
|
@@ -8997,9 +9102,9 @@ var Select = (props) => {
|
|
|
8997
9102
|
onChange: onValueChange,
|
|
8998
9103
|
caller: SELECT_NAME
|
|
8999
9104
|
});
|
|
9000
|
-
const triggerPointerDownPosRef =
|
|
9105
|
+
const triggerPointerDownPosRef = React44__namespace.useRef(null);
|
|
9001
9106
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
|
9002
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
9107
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React44__namespace.useState(/* @__PURE__ */ new Set());
|
|
9003
9108
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
9004
9109
|
return /* @__PURE__ */ jsxRuntime.jsx(Root22, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9005
9110
|
SelectProvider,
|
|
@@ -9025,10 +9130,10 @@ var Select = (props) => {
|
|
|
9025
9130
|
SelectNativeOptionsProvider,
|
|
9026
9131
|
{
|
|
9027
9132
|
scope: props.__scopeSelect,
|
|
9028
|
-
onNativeOptionAdd:
|
|
9133
|
+
onNativeOptionAdd: React44__namespace.useCallback((option) => {
|
|
9029
9134
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
9030
9135
|
}, []),
|
|
9031
|
-
onNativeOptionRemove:
|
|
9136
|
+
onNativeOptionRemove: React44__namespace.useCallback((option) => {
|
|
9032
9137
|
setNativeOptionsSet((prev) => {
|
|
9033
9138
|
const optionsSet = new Set(prev);
|
|
9034
9139
|
optionsSet.delete(option);
|
|
@@ -9063,7 +9168,7 @@ var Select = (props) => {
|
|
|
9063
9168
|
};
|
|
9064
9169
|
Select.displayName = SELECT_NAME;
|
|
9065
9170
|
var TRIGGER_NAME2 = "SelectTrigger";
|
|
9066
|
-
var SelectTrigger =
|
|
9171
|
+
var SelectTrigger = React44__namespace.forwardRef(
|
|
9067
9172
|
(props, forwardedRef) => {
|
|
9068
9173
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
9069
9174
|
const popperScope = usePopperScope2(__scopeSelect);
|
|
@@ -9071,7 +9176,7 @@ var SelectTrigger = React43__namespace.forwardRef(
|
|
|
9071
9176
|
const isDisabled = context.disabled || disabled;
|
|
9072
9177
|
const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
|
|
9073
9178
|
const getItems = useCollection3(__scopeSelect);
|
|
9074
|
-
const pointerTypeRef =
|
|
9179
|
+
const pointerTypeRef = React44__namespace.useRef("touch");
|
|
9075
9180
|
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
|
|
9076
9181
|
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
9077
9182
|
const currentItem = enabledItems.find((item) => item.value === context.value);
|
|
@@ -9141,7 +9246,7 @@ var SelectTrigger = React43__namespace.forwardRef(
|
|
|
9141
9246
|
);
|
|
9142
9247
|
SelectTrigger.displayName = TRIGGER_NAME2;
|
|
9143
9248
|
var VALUE_NAME = "SelectValue";
|
|
9144
|
-
var SelectValue =
|
|
9249
|
+
var SelectValue = React44__namespace.forwardRef(
|
|
9145
9250
|
(props, forwardedRef) => {
|
|
9146
9251
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
9147
9252
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
@@ -9164,7 +9269,7 @@ var SelectValue = React43__namespace.forwardRef(
|
|
|
9164
9269
|
);
|
|
9165
9270
|
SelectValue.displayName = VALUE_NAME;
|
|
9166
9271
|
var ICON_NAME = "SelectIcon";
|
|
9167
|
-
var SelectIcon =
|
|
9272
|
+
var SelectIcon = React44__namespace.forwardRef(
|
|
9168
9273
|
(props, forwardedRef) => {
|
|
9169
9274
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
9170
9275
|
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" });
|
|
@@ -9177,10 +9282,10 @@ var SelectPortal = (props) => {
|
|
|
9177
9282
|
};
|
|
9178
9283
|
SelectPortal.displayName = PORTAL_NAME4;
|
|
9179
9284
|
var CONTENT_NAME4 = "SelectContent";
|
|
9180
|
-
var SelectContent =
|
|
9285
|
+
var SelectContent = React44__namespace.forwardRef(
|
|
9181
9286
|
(props, forwardedRef) => {
|
|
9182
9287
|
const context = useSelectContext(CONTENT_NAME4, props.__scopeSelect);
|
|
9183
|
-
const [fragment, setFragment] =
|
|
9288
|
+
const [fragment, setFragment] = React44__namespace.useState();
|
|
9184
9289
|
useLayoutEffect2(() => {
|
|
9185
9290
|
setFragment(new DocumentFragment());
|
|
9186
9291
|
}, []);
|
|
@@ -9199,7 +9304,7 @@ var CONTENT_MARGIN = 10;
|
|
|
9199
9304
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME4);
|
|
9200
9305
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
9201
9306
|
var Slot3 = createSlot2("SelectContent.RemoveScroll");
|
|
9202
|
-
var SelectContentImpl =
|
|
9307
|
+
var SelectContentImpl = React44__namespace.forwardRef(
|
|
9203
9308
|
(props, forwardedRef) => {
|
|
9204
9309
|
const {
|
|
9205
9310
|
__scopeSelect,
|
|
@@ -9223,21 +9328,21 @@ var SelectContentImpl = React43__namespace.forwardRef(
|
|
|
9223
9328
|
...contentProps
|
|
9224
9329
|
} = props;
|
|
9225
9330
|
const context = useSelectContext(CONTENT_NAME4, __scopeSelect);
|
|
9226
|
-
const [content, setContent] =
|
|
9227
|
-
const [viewport, setViewport] =
|
|
9331
|
+
const [content, setContent] = React44__namespace.useState(null);
|
|
9332
|
+
const [viewport, setViewport] = React44__namespace.useState(null);
|
|
9228
9333
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
9229
|
-
const [selectedItem, setSelectedItem] =
|
|
9230
|
-
const [selectedItemText, setSelectedItemText] =
|
|
9334
|
+
const [selectedItem, setSelectedItem] = React44__namespace.useState(null);
|
|
9335
|
+
const [selectedItemText, setSelectedItemText] = React44__namespace.useState(
|
|
9231
9336
|
null
|
|
9232
9337
|
);
|
|
9233
9338
|
const getItems = useCollection3(__scopeSelect);
|
|
9234
|
-
const [isPositioned, setIsPositioned] =
|
|
9235
|
-
const firstValidItemFoundRef =
|
|
9236
|
-
|
|
9339
|
+
const [isPositioned, setIsPositioned] = React44__namespace.useState(false);
|
|
9340
|
+
const firstValidItemFoundRef = React44__namespace.useRef(false);
|
|
9341
|
+
React44__namespace.useEffect(() => {
|
|
9237
9342
|
if (content) return hideOthers(content);
|
|
9238
9343
|
}, [content]);
|
|
9239
9344
|
useFocusGuards();
|
|
9240
|
-
const focusFirst4 =
|
|
9345
|
+
const focusFirst4 = React44__namespace.useCallback(
|
|
9241
9346
|
(candidates) => {
|
|
9242
9347
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
9243
9348
|
const [lastItem] = restItems.slice(-1);
|
|
@@ -9253,17 +9358,17 @@ var SelectContentImpl = React43__namespace.forwardRef(
|
|
|
9253
9358
|
},
|
|
9254
9359
|
[getItems, viewport]
|
|
9255
9360
|
);
|
|
9256
|
-
const focusSelectedItem =
|
|
9361
|
+
const focusSelectedItem = React44__namespace.useCallback(
|
|
9257
9362
|
() => focusFirst4([selectedItem, content]),
|
|
9258
9363
|
[focusFirst4, selectedItem, content]
|
|
9259
9364
|
);
|
|
9260
|
-
|
|
9365
|
+
React44__namespace.useEffect(() => {
|
|
9261
9366
|
if (isPositioned) {
|
|
9262
9367
|
focusSelectedItem();
|
|
9263
9368
|
}
|
|
9264
9369
|
}, [isPositioned, focusSelectedItem]);
|
|
9265
9370
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
9266
|
-
|
|
9371
|
+
React44__namespace.useEffect(() => {
|
|
9267
9372
|
if (content) {
|
|
9268
9373
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
9269
9374
|
const handlePointerMove = (event) => {
|
|
@@ -9293,7 +9398,7 @@ var SelectContentImpl = React43__namespace.forwardRef(
|
|
|
9293
9398
|
};
|
|
9294
9399
|
}
|
|
9295
9400
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
9296
|
-
|
|
9401
|
+
React44__namespace.useEffect(() => {
|
|
9297
9402
|
const close = () => onOpenChange(false);
|
|
9298
9403
|
window.addEventListener("blur", close);
|
|
9299
9404
|
window.addEventListener("resize", close);
|
|
@@ -9310,7 +9415,7 @@ var SelectContentImpl = React43__namespace.forwardRef(
|
|
|
9310
9415
|
setTimeout(() => nextItem.ref.current.focus());
|
|
9311
9416
|
}
|
|
9312
9417
|
});
|
|
9313
|
-
const itemRefCallback =
|
|
9418
|
+
const itemRefCallback = React44__namespace.useCallback(
|
|
9314
9419
|
(node, value, disabled) => {
|
|
9315
9420
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
9316
9421
|
const isSelectedItem = context.value !== void 0 && context.value === value;
|
|
@@ -9321,8 +9426,8 @@ var SelectContentImpl = React43__namespace.forwardRef(
|
|
|
9321
9426
|
},
|
|
9322
9427
|
[context.value]
|
|
9323
9428
|
);
|
|
9324
|
-
const handleItemLeave =
|
|
9325
|
-
const itemTextRefCallback =
|
|
9429
|
+
const handleItemLeave = React44__namespace.useCallback(() => content?.focus(), [content]);
|
|
9430
|
+
const itemTextRefCallback = React44__namespace.useCallback(
|
|
9326
9431
|
(node, value, disabled) => {
|
|
9327
9432
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
9328
9433
|
const isSelectedItem = context.value !== void 0 && context.value === value;
|
|
@@ -9433,18 +9538,18 @@ var SelectContentImpl = React43__namespace.forwardRef(
|
|
|
9433
9538
|
);
|
|
9434
9539
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
9435
9540
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
9436
|
-
var SelectItemAlignedPosition =
|
|
9541
|
+
var SelectItemAlignedPosition = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
9437
9542
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
9438
9543
|
const context = useSelectContext(CONTENT_NAME4, __scopeSelect);
|
|
9439
9544
|
const contentContext = useSelectContentContext(CONTENT_NAME4, __scopeSelect);
|
|
9440
|
-
const [contentWrapper, setContentWrapper] =
|
|
9441
|
-
const [content, setContent] =
|
|
9545
|
+
const [contentWrapper, setContentWrapper] = React44__namespace.useState(null);
|
|
9546
|
+
const [content, setContent] = React44__namespace.useState(null);
|
|
9442
9547
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
9443
9548
|
const getItems = useCollection3(__scopeSelect);
|
|
9444
|
-
const shouldExpandOnScrollRef =
|
|
9445
|
-
const shouldRepositionRef =
|
|
9549
|
+
const shouldExpandOnScrollRef = React44__namespace.useRef(false);
|
|
9550
|
+
const shouldRepositionRef = React44__namespace.useRef(true);
|
|
9446
9551
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
9447
|
-
const position =
|
|
9552
|
+
const position = React44__namespace.useCallback(() => {
|
|
9448
9553
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
9449
9554
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
9450
9555
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -9544,11 +9649,11 @@ var SelectItemAlignedPosition = React43__namespace.forwardRef((props, forwardedR
|
|
|
9544
9649
|
onPlaced
|
|
9545
9650
|
]);
|
|
9546
9651
|
useLayoutEffect2(() => position(), [position]);
|
|
9547
|
-
const [contentZIndex, setContentZIndex] =
|
|
9652
|
+
const [contentZIndex, setContentZIndex] = React44__namespace.useState();
|
|
9548
9653
|
useLayoutEffect2(() => {
|
|
9549
9654
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
9550
9655
|
}, [content]);
|
|
9551
|
-
const handleScrollButtonChange =
|
|
9656
|
+
const handleScrollButtonChange = React44__namespace.useCallback(
|
|
9552
9657
|
(node) => {
|
|
9553
9658
|
if (node && shouldRepositionRef.current === true) {
|
|
9554
9659
|
position();
|
|
@@ -9597,7 +9702,7 @@ var SelectItemAlignedPosition = React43__namespace.forwardRef((props, forwardedR
|
|
|
9597
9702
|
});
|
|
9598
9703
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
9599
9704
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
9600
|
-
var SelectPopperPosition =
|
|
9705
|
+
var SelectPopperPosition = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
9601
9706
|
const {
|
|
9602
9707
|
__scopeSelect,
|
|
9603
9708
|
align = "start",
|
|
@@ -9632,13 +9737,13 @@ var SelectPopperPosition = React43__namespace.forwardRef((props, forwardedRef) =
|
|
|
9632
9737
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
9633
9738
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME4, {});
|
|
9634
9739
|
var VIEWPORT_NAME = "SelectViewport";
|
|
9635
|
-
var SelectViewport =
|
|
9740
|
+
var SelectViewport = React44__namespace.forwardRef(
|
|
9636
9741
|
(props, forwardedRef) => {
|
|
9637
9742
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
9638
9743
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
9639
9744
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
9640
9745
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
9641
|
-
const prevScrollTopRef =
|
|
9746
|
+
const prevScrollTopRef = React44__namespace.useRef(0);
|
|
9642
9747
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9643
9748
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9644
9749
|
"style",
|
|
@@ -9701,7 +9806,7 @@ var SelectViewport = React43__namespace.forwardRef(
|
|
|
9701
9806
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
9702
9807
|
var GROUP_NAME4 = "SelectGroup";
|
|
9703
9808
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME4);
|
|
9704
|
-
var SelectGroup =
|
|
9809
|
+
var SelectGroup = React44__namespace.forwardRef(
|
|
9705
9810
|
(props, forwardedRef) => {
|
|
9706
9811
|
const { __scopeSelect, ...groupProps } = props;
|
|
9707
9812
|
const groupId = useId();
|
|
@@ -9710,7 +9815,7 @@ var SelectGroup = React43__namespace.forwardRef(
|
|
|
9710
9815
|
);
|
|
9711
9816
|
SelectGroup.displayName = GROUP_NAME4;
|
|
9712
9817
|
var LABEL_NAME3 = "SelectLabel";
|
|
9713
|
-
var SelectLabel =
|
|
9818
|
+
var SelectLabel = React44__namespace.forwardRef(
|
|
9714
9819
|
(props, forwardedRef) => {
|
|
9715
9820
|
const { __scopeSelect, ...labelProps } = props;
|
|
9716
9821
|
const groupContext = useSelectGroupContext(LABEL_NAME3, __scopeSelect);
|
|
@@ -9720,7 +9825,7 @@ var SelectLabel = React43__namespace.forwardRef(
|
|
|
9720
9825
|
SelectLabel.displayName = LABEL_NAME3;
|
|
9721
9826
|
var ITEM_NAME4 = "SelectItem";
|
|
9722
9827
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME4);
|
|
9723
|
-
var SelectItem =
|
|
9828
|
+
var SelectItem = React44__namespace.forwardRef(
|
|
9724
9829
|
(props, forwardedRef) => {
|
|
9725
9830
|
const {
|
|
9726
9831
|
__scopeSelect,
|
|
@@ -9732,14 +9837,14 @@ var SelectItem = React43__namespace.forwardRef(
|
|
|
9732
9837
|
const context = useSelectContext(ITEM_NAME4, __scopeSelect);
|
|
9733
9838
|
const contentContext = useSelectContentContext(ITEM_NAME4, __scopeSelect);
|
|
9734
9839
|
const isSelected = context.value === value;
|
|
9735
|
-
const [textValue, setTextValue] =
|
|
9736
|
-
const [isFocused, setIsFocused] =
|
|
9840
|
+
const [textValue, setTextValue] = React44__namespace.useState(textValueProp ?? "");
|
|
9841
|
+
const [isFocused, setIsFocused] = React44__namespace.useState(false);
|
|
9737
9842
|
const composedRefs = useComposedRefs(
|
|
9738
9843
|
forwardedRef,
|
|
9739
9844
|
(node) => contentContext.itemRefCallback?.(node, value, disabled)
|
|
9740
9845
|
);
|
|
9741
9846
|
const textId = useId();
|
|
9742
|
-
const pointerTypeRef =
|
|
9847
|
+
const pointerTypeRef = React44__namespace.useRef("touch");
|
|
9743
9848
|
const handleSelect = () => {
|
|
9744
9849
|
if (!disabled) {
|
|
9745
9850
|
context.onValueChange(value);
|
|
@@ -9759,7 +9864,7 @@ var SelectItem = React43__namespace.forwardRef(
|
|
|
9759
9864
|
disabled,
|
|
9760
9865
|
textId,
|
|
9761
9866
|
isSelected,
|
|
9762
|
-
onItemTextChange:
|
|
9867
|
+
onItemTextChange: React44__namespace.useCallback((node) => {
|
|
9763
9868
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
9764
9869
|
}, []),
|
|
9765
9870
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9822,14 +9927,14 @@ var SelectItem = React43__namespace.forwardRef(
|
|
|
9822
9927
|
);
|
|
9823
9928
|
SelectItem.displayName = ITEM_NAME4;
|
|
9824
9929
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
9825
|
-
var SelectItemText =
|
|
9930
|
+
var SelectItemText = React44__namespace.forwardRef(
|
|
9826
9931
|
(props, forwardedRef) => {
|
|
9827
9932
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
9828
9933
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
9829
9934
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
9830
9935
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
9831
9936
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
9832
|
-
const [itemTextNode, setItemTextNode] =
|
|
9937
|
+
const [itemTextNode, setItemTextNode] = React44__namespace.useState(null);
|
|
9833
9938
|
const composedRefs = useComposedRefs(
|
|
9834
9939
|
forwardedRef,
|
|
9835
9940
|
(node) => setItemTextNode(node),
|
|
@@ -9837,7 +9942,7 @@ var SelectItemText = React43__namespace.forwardRef(
|
|
|
9837
9942
|
(node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)
|
|
9838
9943
|
);
|
|
9839
9944
|
const textContent = itemTextNode?.textContent;
|
|
9840
|
-
const nativeOption =
|
|
9945
|
+
const nativeOption = React44__namespace.useMemo(
|
|
9841
9946
|
() => /* @__PURE__ */ jsxRuntime.jsx("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
|
9842
9947
|
[itemContext.disabled, itemContext.value, textContent]
|
|
9843
9948
|
);
|
|
@@ -9854,7 +9959,7 @@ var SelectItemText = React43__namespace.forwardRef(
|
|
|
9854
9959
|
);
|
|
9855
9960
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
9856
9961
|
var ITEM_INDICATOR_NAME2 = "SelectItemIndicator";
|
|
9857
|
-
var SelectItemIndicator =
|
|
9962
|
+
var SelectItemIndicator = React44__namespace.forwardRef(
|
|
9858
9963
|
(props, forwardedRef) => {
|
|
9859
9964
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
9860
9965
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME2, __scopeSelect);
|
|
@@ -9863,10 +9968,10 @@ var SelectItemIndicator = React43__namespace.forwardRef(
|
|
|
9863
9968
|
);
|
|
9864
9969
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME2;
|
|
9865
9970
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
9866
|
-
var SelectScrollUpButton =
|
|
9971
|
+
var SelectScrollUpButton = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
9867
9972
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
9868
9973
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
9869
|
-
const [canScrollUp, setCanScrollUp] =
|
|
9974
|
+
const [canScrollUp, setCanScrollUp] = React44__namespace.useState(false);
|
|
9870
9975
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
9871
9976
|
useLayoutEffect2(() => {
|
|
9872
9977
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -9896,10 +10001,10 @@ var SelectScrollUpButton = React43__namespace.forwardRef((props, forwardedRef) =
|
|
|
9896
10001
|
});
|
|
9897
10002
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
9898
10003
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
9899
|
-
var SelectScrollDownButton =
|
|
10004
|
+
var SelectScrollDownButton = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
9900
10005
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
9901
10006
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
9902
|
-
const [canScrollDown, setCanScrollDown] =
|
|
10007
|
+
const [canScrollDown, setCanScrollDown] = React44__namespace.useState(false);
|
|
9903
10008
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
9904
10009
|
useLayoutEffect2(() => {
|
|
9905
10010
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -9929,18 +10034,18 @@ var SelectScrollDownButton = React43__namespace.forwardRef((props, forwardedRef)
|
|
|
9929
10034
|
) : null;
|
|
9930
10035
|
});
|
|
9931
10036
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
9932
|
-
var SelectScrollButtonImpl =
|
|
10037
|
+
var SelectScrollButtonImpl = React44__namespace.forwardRef((props, forwardedRef) => {
|
|
9933
10038
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
9934
10039
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
9935
|
-
const autoScrollTimerRef =
|
|
10040
|
+
const autoScrollTimerRef = React44__namespace.useRef(null);
|
|
9936
10041
|
const getItems = useCollection3(__scopeSelect);
|
|
9937
|
-
const clearAutoScrollTimer =
|
|
10042
|
+
const clearAutoScrollTimer = React44__namespace.useCallback(() => {
|
|
9938
10043
|
if (autoScrollTimerRef.current !== null) {
|
|
9939
10044
|
window.clearInterval(autoScrollTimerRef.current);
|
|
9940
10045
|
autoScrollTimerRef.current = null;
|
|
9941
10046
|
}
|
|
9942
10047
|
}, []);
|
|
9943
|
-
|
|
10048
|
+
React44__namespace.useEffect(() => {
|
|
9944
10049
|
return () => clearAutoScrollTimer();
|
|
9945
10050
|
}, [clearAutoScrollTimer]);
|
|
9946
10051
|
useLayoutEffect2(() => {
|
|
@@ -9972,7 +10077,7 @@ var SelectScrollButtonImpl = React43__namespace.forwardRef((props, forwardedRef)
|
|
|
9972
10077
|
);
|
|
9973
10078
|
});
|
|
9974
10079
|
var SEPARATOR_NAME3 = "SelectSeparator";
|
|
9975
|
-
var SelectSeparator =
|
|
10080
|
+
var SelectSeparator = React44__namespace.forwardRef(
|
|
9976
10081
|
(props, forwardedRef) => {
|
|
9977
10082
|
const { __scopeSelect, ...separatorProps } = props;
|
|
9978
10083
|
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
@@ -9980,7 +10085,7 @@ var SelectSeparator = React43__namespace.forwardRef(
|
|
|
9980
10085
|
);
|
|
9981
10086
|
SelectSeparator.displayName = SEPARATOR_NAME3;
|
|
9982
10087
|
var ARROW_NAME4 = "SelectArrow";
|
|
9983
|
-
var SelectArrow =
|
|
10088
|
+
var SelectArrow = React44__namespace.forwardRef(
|
|
9984
10089
|
(props, forwardedRef) => {
|
|
9985
10090
|
const { __scopeSelect, ...arrowProps } = props;
|
|
9986
10091
|
const popperScope = usePopperScope2(__scopeSelect);
|
|
@@ -9991,12 +10096,12 @@ var SelectArrow = React43__namespace.forwardRef(
|
|
|
9991
10096
|
);
|
|
9992
10097
|
SelectArrow.displayName = ARROW_NAME4;
|
|
9993
10098
|
var BUBBLE_INPUT_NAME = "SelectBubbleInput";
|
|
9994
|
-
var SelectBubbleInput =
|
|
10099
|
+
var SelectBubbleInput = React44__namespace.forwardRef(
|
|
9995
10100
|
({ __scopeSelect, value, ...props }, forwardedRef) => {
|
|
9996
|
-
const ref =
|
|
10101
|
+
const ref = React44__namespace.useRef(null);
|
|
9997
10102
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
9998
10103
|
const prevValue = usePrevious(value);
|
|
9999
|
-
|
|
10104
|
+
React44__namespace.useEffect(() => {
|
|
10000
10105
|
const select = ref.current;
|
|
10001
10106
|
if (!select) return;
|
|
10002
10107
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
@@ -10028,9 +10133,9 @@ function shouldShowPlaceholder(value) {
|
|
|
10028
10133
|
}
|
|
10029
10134
|
function useTypeaheadSearch(onSearchChange) {
|
|
10030
10135
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
10031
|
-
const searchRef =
|
|
10032
|
-
const timerRef =
|
|
10033
|
-
const handleTypeaheadSearch =
|
|
10136
|
+
const searchRef = React44__namespace.useRef("");
|
|
10137
|
+
const timerRef = React44__namespace.useRef(0);
|
|
10138
|
+
const handleTypeaheadSearch = React44__namespace.useCallback(
|
|
10034
10139
|
(key) => {
|
|
10035
10140
|
const search = searchRef.current + key;
|
|
10036
10141
|
handleSearchChange(search);
|
|
@@ -10042,11 +10147,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
10042
10147
|
},
|
|
10043
10148
|
[handleSearchChange]
|
|
10044
10149
|
);
|
|
10045
|
-
const resetTypeahead =
|
|
10150
|
+
const resetTypeahead = React44__namespace.useCallback(() => {
|
|
10046
10151
|
searchRef.current = "";
|
|
10047
10152
|
window.clearTimeout(timerRef.current);
|
|
10048
10153
|
}, []);
|
|
10049
|
-
|
|
10154
|
+
React44__namespace.useEffect(() => {
|
|
10050
10155
|
return () => window.clearTimeout(timerRef.current);
|
|
10051
10156
|
}, []);
|
|
10052
10157
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -10069,7 +10174,7 @@ function wrapArray3(array, startIndex) {
|
|
|
10069
10174
|
var Root24 = Select;
|
|
10070
10175
|
var Trigger2 = SelectTrigger;
|
|
10071
10176
|
var Value = SelectValue;
|
|
10072
|
-
var
|
|
10177
|
+
var Icon2 = SelectIcon;
|
|
10073
10178
|
var Portal3 = SelectPortal;
|
|
10074
10179
|
var Content23 = SelectContent;
|
|
10075
10180
|
var Viewport = SelectViewport;
|
|
@@ -10078,22 +10183,24 @@ var ItemText = SelectItemText;
|
|
|
10078
10183
|
var ItemIndicator3 = SelectItemIndicator;
|
|
10079
10184
|
var ScrollUpButton = SelectScrollUpButton;
|
|
10080
10185
|
var ScrollDownButton = SelectScrollDownButton;
|
|
10186
|
+
|
|
10187
|
+
// src/components/ui/select.tsx
|
|
10081
10188
|
function Select2({
|
|
10082
10189
|
...props
|
|
10083
10190
|
}) {
|
|
10084
|
-
return /* @__PURE__ */
|
|
10191
|
+
return /* @__PURE__ */ React44__namespace.createElement(Root24, { "data-slot": "select", ...props });
|
|
10085
10192
|
}
|
|
10086
10193
|
function SelectValue2({
|
|
10087
10194
|
...props
|
|
10088
10195
|
}) {
|
|
10089
|
-
return /* @__PURE__ */
|
|
10196
|
+
return /* @__PURE__ */ React44__namespace.createElement(Value, { "data-slot": "select-value", ...props });
|
|
10090
10197
|
}
|
|
10091
10198
|
function SelectTrigger2({
|
|
10092
10199
|
className,
|
|
10093
10200
|
children,
|
|
10094
10201
|
...props
|
|
10095
10202
|
}) {
|
|
10096
|
-
return /* @__PURE__ */
|
|
10203
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
10097
10204
|
Trigger2,
|
|
10098
10205
|
{
|
|
10099
10206
|
"data-slot": "select-trigger",
|
|
@@ -10104,7 +10211,7 @@ function SelectTrigger2({
|
|
|
10104
10211
|
...props
|
|
10105
10212
|
},
|
|
10106
10213
|
children,
|
|
10107
|
-
/* @__PURE__ */
|
|
10214
|
+
/* @__PURE__ */ React44__namespace.createElement(Icon2, { asChild: true }, /* @__PURE__ */ React44__namespace.createElement(ChevronDown, { className: "uii:size-4 uii:opacity-50" }))
|
|
10108
10215
|
);
|
|
10109
10216
|
}
|
|
10110
10217
|
function SelectContent2({
|
|
@@ -10116,7 +10223,7 @@ function SelectContent2({
|
|
|
10116
10223
|
hideScrollDownButton = false,
|
|
10117
10224
|
...props
|
|
10118
10225
|
}) {
|
|
10119
|
-
return /* @__PURE__ */
|
|
10226
|
+
return /* @__PURE__ */ React44__namespace.createElement(Portal3, null, /* @__PURE__ */ React44__namespace.createElement(
|
|
10120
10227
|
Content23,
|
|
10121
10228
|
{
|
|
10122
10229
|
"data-slot": "select-content",
|
|
@@ -10129,8 +10236,8 @@ function SelectContent2({
|
|
|
10129
10236
|
position,
|
|
10130
10237
|
...props
|
|
10131
10238
|
},
|
|
10132
|
-
!hideScrollUpButton && /* @__PURE__ */
|
|
10133
|
-
/* @__PURE__ */
|
|
10239
|
+
!hideScrollUpButton && /* @__PURE__ */ React44__namespace.createElement(SelectScrollUpButton2, null),
|
|
10240
|
+
/* @__PURE__ */ React44__namespace.createElement(
|
|
10134
10241
|
Viewport,
|
|
10135
10242
|
{
|
|
10136
10243
|
className: cn(
|
|
@@ -10140,8 +10247,8 @@ function SelectContent2({
|
|
|
10140
10247
|
},
|
|
10141
10248
|
children
|
|
10142
10249
|
),
|
|
10143
|
-
footer ? /* @__PURE__ */
|
|
10144
|
-
!hideScrollDownButton && /* @__PURE__ */
|
|
10250
|
+
footer ? /* @__PURE__ */ React44__namespace.createElement("div", { className: "uii:border-t uii:p-2 uii:bg-popover" }, footer) : null,
|
|
10251
|
+
!hideScrollDownButton && /* @__PURE__ */ React44__namespace.createElement(SelectScrollDownButton2, null)
|
|
10145
10252
|
));
|
|
10146
10253
|
}
|
|
10147
10254
|
function SelectItem2({
|
|
@@ -10149,7 +10256,7 @@ function SelectItem2({
|
|
|
10149
10256
|
children,
|
|
10150
10257
|
...props
|
|
10151
10258
|
}) {
|
|
10152
|
-
return /* @__PURE__ */
|
|
10259
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
10153
10260
|
Item3,
|
|
10154
10261
|
{
|
|
10155
10262
|
"data-slot": "select-item",
|
|
@@ -10159,15 +10266,15 @@ function SelectItem2({
|
|
|
10159
10266
|
),
|
|
10160
10267
|
...props
|
|
10161
10268
|
},
|
|
10162
|
-
/* @__PURE__ */
|
|
10163
|
-
/* @__PURE__ */
|
|
10269
|
+
/* @__PURE__ */ React44__namespace.createElement("span", { className: "uii:absolute uii:right-2 uii:flex uii:size-3.5 uii:items-center uii:justify-center" }, /* @__PURE__ */ React44__namespace.createElement(ItemIndicator3, null, /* @__PURE__ */ React44__namespace.createElement(Check, { className: "uii:size-4" }))),
|
|
10270
|
+
/* @__PURE__ */ React44__namespace.createElement(ItemText, null, children)
|
|
10164
10271
|
);
|
|
10165
10272
|
}
|
|
10166
10273
|
function SelectScrollUpButton2({
|
|
10167
10274
|
className,
|
|
10168
10275
|
...props
|
|
10169
10276
|
}) {
|
|
10170
|
-
return /* @__PURE__ */
|
|
10277
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
10171
10278
|
ScrollUpButton,
|
|
10172
10279
|
{
|
|
10173
10280
|
"data-slot": "select-scroll-up-button",
|
|
@@ -10177,14 +10284,14 @@ function SelectScrollUpButton2({
|
|
|
10177
10284
|
),
|
|
10178
10285
|
...props
|
|
10179
10286
|
},
|
|
10180
|
-
/* @__PURE__ */
|
|
10287
|
+
/* @__PURE__ */ React44__namespace.createElement(ChevronUp, { className: "uii:size-4" })
|
|
10181
10288
|
);
|
|
10182
10289
|
}
|
|
10183
10290
|
function SelectScrollDownButton2({
|
|
10184
10291
|
className,
|
|
10185
10292
|
...props
|
|
10186
10293
|
}) {
|
|
10187
|
-
return /* @__PURE__ */
|
|
10294
|
+
return /* @__PURE__ */ React44__namespace.createElement(
|
|
10188
10295
|
ScrollDownButton,
|
|
10189
10296
|
{
|
|
10190
10297
|
"data-slot": "select-scroll-down-button",
|
|
@@ -10194,14 +10301,14 @@ function SelectScrollDownButton2({
|
|
|
10194
10301
|
),
|
|
10195
10302
|
...props
|
|
10196
10303
|
},
|
|
10197
|
-
/* @__PURE__ */
|
|
10304
|
+
/* @__PURE__ */ React44__namespace.createElement(ChevronDown, { className: "uii:size-4" })
|
|
10198
10305
|
);
|
|
10199
10306
|
}
|
|
10200
10307
|
|
|
10201
10308
|
// src/components/fields/Select.tsx
|
|
10202
10309
|
function useResolvedExpectedType2(expectedType, devCtx) {
|
|
10203
10310
|
const inferredTypes = devCtx?.inferredTypes;
|
|
10204
|
-
return
|
|
10311
|
+
return React44__namespace.useMemo(() => {
|
|
10205
10312
|
if (!expectedType) return "any";
|
|
10206
10313
|
if (!expectedType.startsWith("$infer<")) {
|
|
10207
10314
|
return expectedType;
|
|
@@ -10246,38 +10353,38 @@ function Select3({
|
|
|
10246
10353
|
className,
|
|
10247
10354
|
children
|
|
10248
10355
|
}) {
|
|
10249
|
-
const devCtx =
|
|
10356
|
+
const devCtx = React44.useContext(DevContext);
|
|
10250
10357
|
const resolvedExpectedType = useResolvedExpectedType2(expectedType, devCtx);
|
|
10251
|
-
const [isExpressionMode, setIsExpressionMode] =
|
|
10252
|
-
const [expressionValue, setExpressionValue] =
|
|
10253
|
-
const options =
|
|
10358
|
+
const [isExpressionMode, setIsExpressionMode] = React44__namespace.useState(false);
|
|
10359
|
+
const [expressionValue, setExpressionValue] = React44__namespace.useState("");
|
|
10360
|
+
const options = React44__namespace.useMemo(() => {
|
|
10254
10361
|
return rawOptions.map(
|
|
10255
10362
|
(opt) => typeof opt === "string" ? { value: opt, label: opt } : opt
|
|
10256
10363
|
);
|
|
10257
10364
|
}, [rawOptions]);
|
|
10258
|
-
const displayValue =
|
|
10365
|
+
const displayValue = React44__namespace.useMemo(() => {
|
|
10259
10366
|
if (value != null && typeof value === "object" && "expression" in value) {
|
|
10260
10367
|
return String(value.expression ?? "");
|
|
10261
10368
|
}
|
|
10262
10369
|
return String(value ?? "");
|
|
10263
10370
|
}, [value]);
|
|
10264
|
-
const isExpression =
|
|
10371
|
+
const isExpression = React44__namespace.useMemo(() => {
|
|
10265
10372
|
return value && typeof value === "object" && "expression" in value;
|
|
10266
10373
|
}, [value]);
|
|
10267
|
-
|
|
10374
|
+
React44__namespace.useEffect(() => {
|
|
10268
10375
|
if (isExpression) {
|
|
10269
10376
|
setIsExpressionMode(true);
|
|
10270
10377
|
setExpressionValue(displayValue);
|
|
10271
10378
|
}
|
|
10272
10379
|
}, [isExpression, displayValue]);
|
|
10273
|
-
const handleSelectChange =
|
|
10380
|
+
const handleSelectChange = React44__namespace.useCallback((newValue) => {
|
|
10274
10381
|
if (newValue === "__expression__") {
|
|
10275
10382
|
setIsExpressionMode(true);
|
|
10276
10383
|
return;
|
|
10277
10384
|
}
|
|
10278
10385
|
onChange(newValue);
|
|
10279
10386
|
}, [onChange]);
|
|
10280
|
-
const handleExpressionChange =
|
|
10387
|
+
const handleExpressionChange = React44__namespace.useCallback((e) => {
|
|
10281
10388
|
const newValue = e.target.value;
|
|
10282
10389
|
setExpressionValue(newValue);
|
|
10283
10390
|
onChange({
|
|
@@ -10285,7 +10392,7 @@ function Select3({
|
|
|
10285
10392
|
type: "expression"
|
|
10286
10393
|
});
|
|
10287
10394
|
}, [onChange]);
|
|
10288
|
-
const handleSwitchToValue =
|
|
10395
|
+
const handleSwitchToValue = React44__namespace.useCallback(() => {
|
|
10289
10396
|
setIsExpressionMode(false);
|
|
10290
10397
|
setExpressionValue("");
|
|
10291
10398
|
onChange("");
|
|
@@ -10314,7 +10421,7 @@ function Select3({
|
|
|
10314
10421
|
hasError: showError
|
|
10315
10422
|
};
|
|
10316
10423
|
const isWaiting = resolvedExpectedType.startsWith("Waiting for:") || resolvedExpectedType.startsWith("Subscribing to:");
|
|
10317
|
-
return /* @__PURE__ */
|
|
10424
|
+
return /* @__PURE__ */ React44__namespace.createElement("div", { className: cn("uii:mb-2", className) }, /* @__PURE__ */ React44__namespace.createElement("div", { className: "uii:flex uii:items-center uii:gap-2 uii:mt-2" }, /* @__PURE__ */ React44__namespace.createElement(
|
|
10318
10425
|
"label",
|
|
10319
10426
|
{
|
|
10320
10427
|
htmlFor: fieldName,
|
|
@@ -10322,7 +10429,7 @@ function Select3({
|
|
|
10322
10429
|
},
|
|
10323
10430
|
label,
|
|
10324
10431
|
":"
|
|
10325
|
-
), resolvedExpectedType !== "$.interface.timer" && /* @__PURE__ */
|
|
10432
|
+
), resolvedExpectedType !== "$.interface.timer" && /* @__PURE__ */ React44__namespace.createElement(
|
|
10326
10433
|
"span",
|
|
10327
10434
|
{
|
|
10328
10435
|
className: cn(
|
|
@@ -10332,12 +10439,12 @@ function Select3({
|
|
|
10332
10439
|
title: resolvedExpectedType
|
|
10333
10440
|
},
|
|
10334
10441
|
resolvedExpectedType
|
|
10335
|
-
), showError && /* @__PURE__ */
|
|
10442
|
+
), showError && /* @__PURE__ */ React44__namespace.createElement("span", { className: "uii:-mt-2 uii:inline-flex uii:px-1 uii:py-0.5 uii:bg-red-100 uii:text-red-600 uii:rounded-sm uii:text-[10px] uii:font-medium" }, "Required")), /* @__PURE__ */ React44__namespace.createElement("div", { className: "uii:mt-0.5" }, children ? (
|
|
10336
10443
|
// Use custom render function
|
|
10337
10444
|
children(renderProps)
|
|
10338
10445
|
) : isExpressionMode ? (
|
|
10339
10446
|
// Expression mode - show input with clear button
|
|
10340
|
-
/* @__PURE__ */
|
|
10447
|
+
/* @__PURE__ */ React44__namespace.createElement("div", { className: "uii:flex uii:items-center uii:h-9 uii:rounded-sm uii:border uii:border-amber-500/50 uii:bg-amber-500/5" }, /* @__PURE__ */ React44__namespace.createElement(
|
|
10341
10448
|
"input",
|
|
10342
10449
|
{
|
|
10343
10450
|
id: fieldName,
|
|
@@ -10353,7 +10460,7 @@ function Select3({
|
|
|
10353
10460
|
disabled && "uii:opacity-50 uii:cursor-not-allowed"
|
|
10354
10461
|
)
|
|
10355
10462
|
}
|
|
10356
|
-
), /* @__PURE__ */
|
|
10463
|
+
), /* @__PURE__ */ React44__namespace.createElement(
|
|
10357
10464
|
"button",
|
|
10358
10465
|
{
|
|
10359
10466
|
type: "button",
|
|
@@ -10395,21 +10502,21 @@ function Select3({
|
|
|
10395
10502
|
// 📝 Custom Expression
|
|
10396
10503
|
// </option>
|
|
10397
10504
|
// </select>
|
|
10398
|
-
/* @__PURE__ */
|
|
10505
|
+
/* @__PURE__ */ React44__namespace.createElement(
|
|
10399
10506
|
Select2,
|
|
10400
10507
|
{
|
|
10401
10508
|
value: displayValue,
|
|
10402
10509
|
onValueChange: (e) => handleSelectChange(e),
|
|
10403
10510
|
disabled: disabled ?? disabled
|
|
10404
10511
|
},
|
|
10405
|
-
/* @__PURE__ */
|
|
10512
|
+
/* @__PURE__ */ React44__namespace.createElement(
|
|
10406
10513
|
SelectTrigger2,
|
|
10407
10514
|
{
|
|
10408
10515
|
className: "ui:w-full ui:h-9 ui:px-3 ui:border ui:border-input ui:rounded-sm ui:bg-background"
|
|
10409
10516
|
},
|
|
10410
|
-
/* @__PURE__ */
|
|
10517
|
+
/* @__PURE__ */ React44__namespace.createElement(SelectValue2, { placeholder })
|
|
10411
10518
|
),
|
|
10412
|
-
/* @__PURE__ */
|
|
10519
|
+
/* @__PURE__ */ React44__namespace.createElement(SelectContent2, null, options.map((opt) => /* @__PURE__ */ React44__namespace.createElement(SelectItem2, { key: opt.value, value: opt.value }, opt.node ? opt.node : /* @__PURE__ */ React44__namespace.createElement(React44__namespace.Fragment, null, opt.label))))
|
|
10413
10520
|
)
|
|
10414
10521
|
)));
|
|
10415
10522
|
}
|
|
@@ -10540,17 +10647,17 @@ function useFieldPath(fieldName) {
|
|
|
10540
10647
|
return fieldName;
|
|
10541
10648
|
}
|
|
10542
10649
|
function TemplateFieldProvider({ children }) {
|
|
10543
|
-
return /* @__PURE__ */
|
|
10650
|
+
return /* @__PURE__ */ React44__namespace.default.createElement(React44__namespace.default.Fragment, null, children);
|
|
10544
10651
|
}
|
|
10545
10652
|
function NestedFieldProvider({
|
|
10546
10653
|
children
|
|
10547
10654
|
}) {
|
|
10548
|
-
return /* @__PURE__ */
|
|
10655
|
+
return /* @__PURE__ */ React44__namespace.default.createElement(React44__namespace.default.Fragment, null, children);
|
|
10549
10656
|
}
|
|
10550
|
-
var InferredTypesContext =
|
|
10657
|
+
var InferredTypesContext = React44.createContext(null);
|
|
10551
10658
|
function useInferredTypes() {
|
|
10552
|
-
const devContext =
|
|
10553
|
-
const realContext =
|
|
10659
|
+
const devContext = React44.useContext(DevContext);
|
|
10660
|
+
const realContext = React44.useContext(InferredTypesContext);
|
|
10554
10661
|
if (devContext) {
|
|
10555
10662
|
return {
|
|
10556
10663
|
inferredTypes: devContext.inferredTypes,
|
|
@@ -10563,7 +10670,7 @@ function useInferredTypes() {
|
|
|
10563
10670
|
return realContext;
|
|
10564
10671
|
}
|
|
10565
10672
|
function InferredTypesProvider({ children }) {
|
|
10566
|
-
return /* @__PURE__ */
|
|
10673
|
+
return /* @__PURE__ */ React44__namespace.default.createElement(React44__namespace.default.Fragment, null, children);
|
|
10567
10674
|
}
|
|
10568
10675
|
function intersectTypes(types) {
|
|
10569
10676
|
const validTypes = types.filter((t) => !!t && t.length > 0);
|
|
@@ -10624,33 +10731,33 @@ function getOperatorsForType(type) {
|
|
|
10624
10731
|
];
|
|
10625
10732
|
}
|
|
10626
10733
|
function NodePropertyProvider({ children }) {
|
|
10627
|
-
return /* @__PURE__ */
|
|
10734
|
+
return /* @__PURE__ */ React44__namespace.default.createElement(React44__namespace.default.Fragment, null, children);
|
|
10628
10735
|
}
|
|
10629
10736
|
function useSetFieldMetadataOnly() {
|
|
10630
|
-
return
|
|
10737
|
+
return React44.useCallback((_fieldKey, _metadata) => {
|
|
10631
10738
|
}, []);
|
|
10632
10739
|
}
|
|
10633
10740
|
function useIsInNodePropertyProvider() {
|
|
10634
|
-
const devContext =
|
|
10741
|
+
const devContext = React44.useContext(DevContext);
|
|
10635
10742
|
return devContext !== null;
|
|
10636
10743
|
}
|
|
10637
10744
|
function useNodeProperty(key) {
|
|
10638
|
-
const devContext =
|
|
10639
|
-
const [devValue, setDevValue] =
|
|
10745
|
+
const devContext = React44.useContext(DevContext);
|
|
10746
|
+
const [devValue, setDevValue] = React44.useState(
|
|
10640
10747
|
() => devContext?.data?.[key]
|
|
10641
10748
|
);
|
|
10642
|
-
|
|
10749
|
+
React44__namespace.default.useEffect(() => {
|
|
10643
10750
|
if (devContext) {
|
|
10644
10751
|
setDevValue(devContext.data[key]);
|
|
10645
10752
|
}
|
|
10646
10753
|
}, [devContext, key]);
|
|
10647
|
-
const devSetter =
|
|
10754
|
+
const devSetter = React44.useCallback((value, _metadata) => {
|
|
10648
10755
|
if (devContext) {
|
|
10649
10756
|
devContext.setProperty(key, value);
|
|
10650
10757
|
setDevValue(value);
|
|
10651
10758
|
}
|
|
10652
10759
|
}, [devContext, key]);
|
|
10653
|
-
const noopSetter =
|
|
10760
|
+
const noopSetter = React44.useCallback(() => {
|
|
10654
10761
|
console.warn(`[useNodeProperty] No provider - cannot set "${key}"`);
|
|
10655
10762
|
}, [key]);
|
|
10656
10763
|
if (devContext) {
|
|
@@ -10659,16 +10766,16 @@ function useNodeProperty(key) {
|
|
|
10659
10766
|
return [void 0, noopSetter];
|
|
10660
10767
|
}
|
|
10661
10768
|
function useNodeProperties() {
|
|
10662
|
-
const devContext =
|
|
10663
|
-
const [devData, setDevData] =
|
|
10769
|
+
const devContext = React44.useContext(DevContext);
|
|
10770
|
+
const [devData, setDevData] = React44.useState(
|
|
10664
10771
|
() => devContext?.data ?? {}
|
|
10665
10772
|
);
|
|
10666
|
-
|
|
10773
|
+
React44__namespace.default.useEffect(() => {
|
|
10667
10774
|
if (devContext) {
|
|
10668
10775
|
setDevData({ ...devContext.data });
|
|
10669
10776
|
}
|
|
10670
10777
|
}, [devContext, devContext?.data]);
|
|
10671
|
-
const devSetter =
|
|
10778
|
+
const devSetter = React44.useCallback((updates) => {
|
|
10672
10779
|
if (devContext) {
|
|
10673
10780
|
Object.entries(updates).forEach(([key, value]) => {
|
|
10674
10781
|
devContext.setProperty(key, value);
|
|
@@ -10676,7 +10783,7 @@ function useNodeProperties() {
|
|
|
10676
10783
|
setDevData((prev) => ({ ...prev, ...updates }));
|
|
10677
10784
|
}
|
|
10678
10785
|
}, [devContext]);
|
|
10679
|
-
const noopSetter =
|
|
10786
|
+
const noopSetter = React44.useCallback(() => {
|
|
10680
10787
|
console.warn("[useNodeProperties] No provider - cannot set properties");
|
|
10681
10788
|
}, []);
|
|
10682
10789
|
if (devContext) {
|
|
@@ -10685,11 +10792,11 @@ function useNodeProperties() {
|
|
|
10685
10792
|
return [{}, noopSetter];
|
|
10686
10793
|
}
|
|
10687
10794
|
function useInferredType(fieldName) {
|
|
10688
|
-
const devContext =
|
|
10689
|
-
const [devInferredType, setDevInferredType] =
|
|
10795
|
+
const devContext = React44.useContext(DevContext);
|
|
10796
|
+
const [devInferredType, setDevInferredType] = React44.useState(
|
|
10690
10797
|
() => devContext?.inferredTypes?.[fieldName]
|
|
10691
10798
|
);
|
|
10692
|
-
|
|
10799
|
+
React44__namespace.default.useEffect(() => {
|
|
10693
10800
|
if (devContext) {
|
|
10694
10801
|
setDevInferredType(devContext.inferredTypes[fieldName]);
|
|
10695
10802
|
}
|
|
@@ -10700,8 +10807,8 @@ function useInferredType(fieldName) {
|
|
|
10700
10807
|
return void 0;
|
|
10701
10808
|
}
|
|
10702
10809
|
function useSetInferredType() {
|
|
10703
|
-
const devContext =
|
|
10704
|
-
return
|
|
10810
|
+
const devContext = React44.useContext(DevContext);
|
|
10811
|
+
return React44.useCallback((fieldName, type) => {
|
|
10705
10812
|
if (devContext) {
|
|
10706
10813
|
devContext.setInferredType(fieldName, type);
|
|
10707
10814
|
} else {
|
|
@@ -10710,8 +10817,8 @@ function useSetInferredType() {
|
|
|
10710
10817
|
}, [devContext]);
|
|
10711
10818
|
}
|
|
10712
10819
|
function useClearInferredType() {
|
|
10713
|
-
const devContext =
|
|
10714
|
-
return
|
|
10820
|
+
const devContext = React44.useContext(DevContext);
|
|
10821
|
+
return React44.useCallback((fieldName) => {
|
|
10715
10822
|
if (devContext) {
|
|
10716
10823
|
devContext.clearInferredType(fieldName);
|
|
10717
10824
|
} else {
|
|
@@ -10720,8 +10827,8 @@ function useClearInferredType() {
|
|
|
10720
10827
|
}, [devContext]);
|
|
10721
10828
|
}
|
|
10722
10829
|
function useClearAllInferredTypes() {
|
|
10723
|
-
const devContext =
|
|
10724
|
-
return
|
|
10830
|
+
const devContext = React44.useContext(DevContext);
|
|
10831
|
+
return React44.useCallback(() => {
|
|
10725
10832
|
if (devContext) {
|
|
10726
10833
|
devContext.clearAllInferredTypes();
|
|
10727
10834
|
} else {
|
|
@@ -10730,7 +10837,7 @@ function useClearAllInferredTypes() {
|
|
|
10730
10837
|
}, [devContext]);
|
|
10731
10838
|
}
|
|
10732
10839
|
function useClearValidationErrorsByPrefix() {
|
|
10733
|
-
return
|
|
10840
|
+
return React44.useCallback((fieldPrefix) => {
|
|
10734
10841
|
console.log(`[useClearValidationErrorsByPrefix] Dev mode - clearing errors with prefix "${fieldPrefix}" is a no-op`);
|
|
10735
10842
|
}, []);
|
|
10736
10843
|
}
|
|
@@ -10747,11 +10854,11 @@ function useFlowEditorActions() {
|
|
|
10747
10854
|
};
|
|
10748
10855
|
}
|
|
10749
10856
|
function useAllInferredTypes() {
|
|
10750
|
-
const devContext =
|
|
10751
|
-
const [devTypes, setDevTypes] =
|
|
10857
|
+
const devContext = React44.useContext(DevContext);
|
|
10858
|
+
const [devTypes, setDevTypes] = React44.useState(
|
|
10752
10859
|
() => devContext?.inferredTypes ?? {}
|
|
10753
10860
|
);
|
|
10754
|
-
|
|
10861
|
+
React44__namespace.default.useEffect(() => {
|
|
10755
10862
|
if (devContext) {
|
|
10756
10863
|
setDevTypes({ ...devContext.inferredTypes });
|
|
10757
10864
|
}
|
|
@@ -10762,8 +10869,8 @@ function useAllInferredTypes() {
|
|
|
10762
10869
|
return {};
|
|
10763
10870
|
}
|
|
10764
10871
|
function useSetProperty() {
|
|
10765
|
-
const devContext =
|
|
10766
|
-
return
|
|
10872
|
+
const devContext = React44.useContext(DevContext);
|
|
10873
|
+
return React44.useCallback((key, value, _metadata) => {
|
|
10767
10874
|
if (devContext) {
|
|
10768
10875
|
devContext.setProperty(key, value);
|
|
10769
10876
|
} else {
|
|
@@ -10772,8 +10879,8 @@ function useSetProperty() {
|
|
|
10772
10879
|
}, [devContext]);
|
|
10773
10880
|
}
|
|
10774
10881
|
function useTriggerLayoutUpdate() {
|
|
10775
|
-
const devContext =
|
|
10776
|
-
return
|
|
10882
|
+
const devContext = React44.useContext(DevContext);
|
|
10883
|
+
return React44.useCallback(() => {
|
|
10777
10884
|
if (devContext) {
|
|
10778
10885
|
console.log("[useTriggerLayoutUpdate] Dev mode - layout update is a no-op");
|
|
10779
10886
|
} else {
|
|
@@ -10782,28 +10889,28 @@ function useTriggerLayoutUpdate() {
|
|
|
10782
10889
|
}, [devContext]);
|
|
10783
10890
|
}
|
|
10784
10891
|
function useFieldValidation() {
|
|
10785
|
-
const setFieldRequired =
|
|
10892
|
+
const setFieldRequired = React44.useCallback((fieldName, required) => {
|
|
10786
10893
|
console.warn(`[useFieldValidation] Mock mode - cannot set required for "${fieldName}"`);
|
|
10787
10894
|
}, []);
|
|
10788
|
-
const setFieldRequiredIf =
|
|
10895
|
+
const setFieldRequiredIf = React44.useCallback(
|
|
10789
10896
|
(fieldName, requiredIf) => {
|
|
10790
10897
|
console.warn(`[useFieldValidation] Mock mode - cannot set requiredIf for "${fieldName}"`);
|
|
10791
10898
|
},
|
|
10792
10899
|
[]
|
|
10793
10900
|
);
|
|
10794
|
-
const setFieldValidation =
|
|
10901
|
+
const setFieldValidation = React44.useCallback(
|
|
10795
10902
|
(fieldName, customValidation) => {
|
|
10796
10903
|
console.warn(`[useFieldValidation] Mock mode - cannot set validation for "${fieldName}"`);
|
|
10797
10904
|
},
|
|
10798
10905
|
[]
|
|
10799
10906
|
);
|
|
10800
|
-
const clearFieldValidation =
|
|
10907
|
+
const clearFieldValidation = React44.useCallback((fieldName) => {
|
|
10801
10908
|
console.warn(`[useFieldValidation] Mock mode - cannot clear validation for "${fieldName}"`);
|
|
10802
10909
|
}, []);
|
|
10803
|
-
const isFieldRequired =
|
|
10910
|
+
const isFieldRequired = React44.useCallback((fieldName) => {
|
|
10804
10911
|
return false;
|
|
10805
10912
|
}, []);
|
|
10806
|
-
const validateField =
|
|
10913
|
+
const validateField = React44.useCallback((fieldName) => {
|
|
10807
10914
|
return null;
|
|
10808
10915
|
}, []);
|
|
10809
10916
|
return {
|
|
@@ -10815,6 +10922,25 @@ function useFieldValidation() {
|
|
|
10815
10922
|
validateField
|
|
10816
10923
|
};
|
|
10817
10924
|
}
|
|
10925
|
+
/*! Bundled license information:
|
|
10926
|
+
|
|
10927
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
10928
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
10929
|
+
lucide-react/dist/esm/Icon.js:
|
|
10930
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
10931
|
+
lucide-react/dist/esm/icons/check.js:
|
|
10932
|
+
lucide-react/dist/esm/icons/chevron-down.js:
|
|
10933
|
+
lucide-react/dist/esm/icons/chevron-right.js:
|
|
10934
|
+
lucide-react/dist/esm/icons/chevron-up.js:
|
|
10935
|
+
lucide-react/dist/esm/icons/circle.js:
|
|
10936
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
10937
|
+
(**
|
|
10938
|
+
* @license lucide-react v0.476.0 - ISC
|
|
10939
|
+
*
|
|
10940
|
+
* This source code is licensed under the ISC license.
|
|
10941
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
10942
|
+
*)
|
|
10943
|
+
*/
|
|
10818
10944
|
|
|
10819
10945
|
exports.Button = Button;
|
|
10820
10946
|
exports.ConfirmationDropdownMenuItem = ConfirmationDropdownMenuItem;
|
|
@@ -10834,9 +10960,11 @@ exports.DropdownMenuSub = DropdownMenuSub2;
|
|
|
10834
10960
|
exports.DropdownMenuSubContent = DropdownMenuSubContent2;
|
|
10835
10961
|
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger2;
|
|
10836
10962
|
exports.DropdownMenuTrigger = DropdownMenuTrigger2;
|
|
10963
|
+
exports.LogicToggleButton = LogicToggleButton;
|
|
10837
10964
|
exports.ToggleButton = ToggleButton;
|
|
10838
10965
|
exports.buttonVariants = buttonVariants;
|
|
10839
10966
|
exports.fields = fields_exports;
|
|
10967
|
+
exports.logicToggleButtonStyles = logicToggleButtonStyles;
|
|
10840
10968
|
exports.toggleButtonVariants = toggleButtonVariants;
|
|
10841
10969
|
//# sourceMappingURL=index.cjs.map
|
|
10842
10970
|
//# sourceMappingURL=index.cjs.map
|