@dust-tt/sparkle 0.2.266 → 0.2.267
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +585 -192
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Checkbox.d.ts +20 -9
- package/dist/esm/components/Checkbox.d.ts.map +1 -1
- package/dist/esm/components/Checkbox.js +43 -56
- package/dist/esm/components/Checkbox.js.map +1 -1
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/stories/Checkbox.stories.d.ts +4 -10
- package/dist/esm/stories/Checkbox.stories.d.ts.map +1 -1
- package/dist/esm/stories/Checkbox.stories.js +26 -51
- package/dist/esm/stories/Checkbox.stories.js.map +1 -1
- package/dist/esm/stories/Tree.stories.d.ts.map +1 -1
- package/dist/esm/stories/Tree.stories.js +37 -76
- package/dist/esm/stories/Tree.stories.js.map +1 -1
- package/dist/sparkle.css +37 -61
- package/package.json +3 -1
- package/src/components/Checkbox.tsx +87 -103
- package/src/components/index.ts +6 -1
- package/src/stories/Checkbox.stories.tsx +44 -87
- package/src/stories/Tree.stories.tsx +37 -76
package/dist/cjs/index.js
CHANGED
|
@@ -40323,7 +40323,7 @@ var utils = /*#__PURE__*/Object.freeze({
|
|
|
40323
40323
|
getEmojiAndBackgroundFromUrl: getEmojiAndBackgroundFromUrl
|
|
40324
40324
|
});
|
|
40325
40325
|
|
|
40326
|
-
function r$
|
|
40326
|
+
function r$5(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$5(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx$1(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$5(e))&&(n&&(n+=" "),n+=t);return n}
|
|
40327
40327
|
|
|
40328
40328
|
const CLASS_PART_SEPARATOR = '-';
|
|
40329
40329
|
const createClassGroupUtils = config => {
|
|
@@ -42862,7 +42862,7 @@ function cn() {
|
|
|
42862
42862
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
42863
42863
|
inputs[_i] = arguments[_i];
|
|
42864
42864
|
}
|
|
42865
|
-
return twMerge(clsx(inputs));
|
|
42865
|
+
return twMerge(clsx$1(inputs));
|
|
42866
42866
|
}
|
|
42867
42867
|
|
|
42868
42868
|
var colors$1 = [
|
|
@@ -43030,7 +43030,7 @@ Avatar.Stack = function (_a) {
|
|
|
43030
43030
|
};
|
|
43031
43031
|
|
|
43032
43032
|
// packages/core/primitive/src/primitive.tsx
|
|
43033
|
-
function composeEventHandlers$
|
|
43033
|
+
function composeEventHandlers$4(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
43034
43034
|
return function handleEvent(event) {
|
|
43035
43035
|
originalEventHandler?.(event);
|
|
43036
43036
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -43040,22 +43040,22 @@ function composeEventHandlers$3(originalEventHandler, ourEventHandler, { checkFo
|
|
|
43040
43040
|
}
|
|
43041
43041
|
|
|
43042
43042
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
43043
|
-
function setRef$
|
|
43043
|
+
function setRef$6(ref, value) {
|
|
43044
43044
|
if (typeof ref === "function") {
|
|
43045
43045
|
ref(value);
|
|
43046
43046
|
} else if (ref !== null && ref !== void 0) {
|
|
43047
43047
|
ref.current = value;
|
|
43048
43048
|
}
|
|
43049
43049
|
}
|
|
43050
|
-
function composeRefs$
|
|
43051
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
43050
|
+
function composeRefs$6(...refs) {
|
|
43051
|
+
return (node) => refs.forEach((ref) => setRef$6(ref, node));
|
|
43052
43052
|
}
|
|
43053
|
-
function useComposedRefs$
|
|
43054
|
-
return React__namespace.useCallback(composeRefs$
|
|
43053
|
+
function useComposedRefs$4(...refs) {
|
|
43054
|
+
return React__namespace.useCallback(composeRefs$6(...refs), refs);
|
|
43055
43055
|
}
|
|
43056
43056
|
|
|
43057
43057
|
// packages/react/context/src/createContext.tsx
|
|
43058
|
-
function createContextScope$
|
|
43058
|
+
function createContextScope$9(scopeName, createContextScopeDeps = []) {
|
|
43059
43059
|
let defaultContexts = [];
|
|
43060
43060
|
function createContext3(rootComponentName, defaultContext) {
|
|
43061
43061
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -43090,9 +43090,9 @@ function createContextScope$8(scopeName, createContextScopeDeps = []) {
|
|
|
43090
43090
|
};
|
|
43091
43091
|
};
|
|
43092
43092
|
createScope.scopeName = scopeName;
|
|
43093
|
-
return [createContext3, composeContextScopes$
|
|
43093
|
+
return [createContext3, composeContextScopes$9(createScope, ...createContextScopeDeps)];
|
|
43094
43094
|
}
|
|
43095
|
-
function composeContextScopes$
|
|
43095
|
+
function composeContextScopes$9(...scopes) {
|
|
43096
43096
|
const baseScope = scopes[0];
|
|
43097
43097
|
if (scopes.length === 1) return baseScope;
|
|
43098
43098
|
const createScope = () => {
|
|
@@ -74022,15 +74022,15 @@ var reactDomExports = reactDom.exports;
|
|
|
74022
74022
|
var ReactDOM = /*@__PURE__*/getDefaultExportFromCjs(reactDomExports);
|
|
74023
74023
|
|
|
74024
74024
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
74025
|
-
function setRef$
|
|
74025
|
+
function setRef$5(ref, value) {
|
|
74026
74026
|
if (typeof ref === "function") {
|
|
74027
74027
|
ref(value);
|
|
74028
74028
|
} else if (ref !== null && ref !== void 0) {
|
|
74029
74029
|
ref.current = value;
|
|
74030
74030
|
}
|
|
74031
74031
|
}
|
|
74032
|
-
function composeRefs$
|
|
74033
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
74032
|
+
function composeRefs$5(...refs) {
|
|
74033
|
+
return (node) => refs.forEach((ref) => setRef$5(ref, node));
|
|
74034
74034
|
}
|
|
74035
74035
|
|
|
74036
74036
|
// packages/react/slot/src/Slot.tsx
|
|
@@ -74060,7 +74060,7 @@ var SlotClone = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
74060
74060
|
return React__namespace.cloneElement(children, {
|
|
74061
74061
|
...mergeProps(slotProps, children.props),
|
|
74062
74062
|
// @ts-ignore
|
|
74063
|
-
ref: forwardedRef ? composeRefs$
|
|
74063
|
+
ref: forwardedRef ? composeRefs$5(forwardedRef, childrenRef) : childrenRef
|
|
74064
74064
|
});
|
|
74065
74065
|
}
|
|
74066
74066
|
return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
|
|
@@ -74110,7 +74110,7 @@ function getElementRef$1(element) {
|
|
|
74110
74110
|
}
|
|
74111
74111
|
|
|
74112
74112
|
// packages/react/primitive/src/Primitive.tsx
|
|
74113
|
-
var NODES$
|
|
74113
|
+
var NODES$6 = [
|
|
74114
74114
|
"a",
|
|
74115
74115
|
"button",
|
|
74116
74116
|
"div",
|
|
@@ -74128,7 +74128,7 @@ var NODES$5 = [
|
|
|
74128
74128
|
"svg",
|
|
74129
74129
|
"ul"
|
|
74130
74130
|
];
|
|
74131
|
-
var Primitive$
|
|
74131
|
+
var Primitive$6 = NODES$6.reduce((primitive, node) => {
|
|
74132
74132
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
74133
74133
|
const { asChild, ...primitiveProps } = props;
|
|
74134
74134
|
const Comp = asChild ? Slot : node;
|
|
@@ -74145,7 +74145,7 @@ function dispatchDiscreteCustomEvent$2(target, event) {
|
|
|
74145
74145
|
}
|
|
74146
74146
|
|
|
74147
74147
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
74148
|
-
function useCallbackRef$
|
|
74148
|
+
function useCallbackRef$5(callback) {
|
|
74149
74149
|
const callbackRef = React__namespace.useRef(callback);
|
|
74150
74150
|
React__namespace.useEffect(() => {
|
|
74151
74151
|
callbackRef.current = callback;
|
|
@@ -74155,7 +74155,7 @@ function useCallbackRef$4(callback) {
|
|
|
74155
74155
|
|
|
74156
74156
|
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
74157
74157
|
function useEscapeKeydown$2(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
74158
|
-
const onEscapeKeyDown = useCallbackRef$
|
|
74158
|
+
const onEscapeKeyDown = useCallbackRef$5(onEscapeKeyDownProp);
|
|
74159
74159
|
React__namespace.useEffect(() => {
|
|
74160
74160
|
const handleKeyDown = (event) => {
|
|
74161
74161
|
if (event.key === "Escape") {
|
|
@@ -74192,7 +74192,7 @@ var DismissableLayer$2 = React__namespace.forwardRef(
|
|
|
74192
74192
|
const [node, setNode] = React__namespace.useState(null);
|
|
74193
74193
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
74194
74194
|
const [, force] = React__namespace.useState({});
|
|
74195
|
-
const composedRefs = useComposedRefs$
|
|
74195
|
+
const composedRefs = useComposedRefs$4(forwardedRef, (node2) => setNode(node2));
|
|
74196
74196
|
const layers = Array.from(context.layers);
|
|
74197
74197
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
74198
74198
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -74255,7 +74255,7 @@ var DismissableLayer$2 = React__namespace.forwardRef(
|
|
|
74255
74255
|
return () => document.removeEventListener(CONTEXT_UPDATE$2, handleUpdate);
|
|
74256
74256
|
}, []);
|
|
74257
74257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74258
|
-
Primitive$
|
|
74258
|
+
Primitive$6.div,
|
|
74259
74259
|
{
|
|
74260
74260
|
...layerProps,
|
|
74261
74261
|
ref: composedRefs,
|
|
@@ -74263,9 +74263,9 @@ var DismissableLayer$2 = React__namespace.forwardRef(
|
|
|
74263
74263
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
74264
74264
|
...props.style
|
|
74265
74265
|
},
|
|
74266
|
-
onFocusCapture: composeEventHandlers$
|
|
74267
|
-
onBlurCapture: composeEventHandlers$
|
|
74268
|
-
onPointerDownCapture: composeEventHandlers$
|
|
74266
|
+
onFocusCapture: composeEventHandlers$4(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
74267
|
+
onBlurCapture: composeEventHandlers$4(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
74268
|
+
onPointerDownCapture: composeEventHandlers$4(
|
|
74269
74269
|
props.onPointerDownCapture,
|
|
74270
74270
|
pointerDownOutside.onPointerDownCapture
|
|
74271
74271
|
)
|
|
@@ -74278,7 +74278,7 @@ var BRANCH_NAME$2 = "DismissableLayerBranch";
|
|
|
74278
74278
|
var DismissableLayerBranch$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
74279
74279
|
const context = React__namespace.useContext(DismissableLayerContext$2);
|
|
74280
74280
|
const ref = React__namespace.useRef(null);
|
|
74281
|
-
const composedRefs = useComposedRefs$
|
|
74281
|
+
const composedRefs = useComposedRefs$4(forwardedRef, ref);
|
|
74282
74282
|
React__namespace.useEffect(() => {
|
|
74283
74283
|
const node = ref.current;
|
|
74284
74284
|
if (node) {
|
|
@@ -74288,11 +74288,11 @@ var DismissableLayerBranch$2 = React__namespace.forwardRef((props, forwardedRef)
|
|
|
74288
74288
|
};
|
|
74289
74289
|
}
|
|
74290
74290
|
}, [context.branches]);
|
|
74291
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
74291
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$6.div, { ...props, ref: composedRefs });
|
|
74292
74292
|
});
|
|
74293
74293
|
DismissableLayerBranch$2.displayName = BRANCH_NAME$2;
|
|
74294
74294
|
function usePointerDownOutside$2(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
74295
|
-
const handlePointerDownOutside = useCallbackRef$
|
|
74295
|
+
const handlePointerDownOutside = useCallbackRef$5(onPointerDownOutside);
|
|
74296
74296
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
74297
74297
|
const handleClickRef = React__namespace.useRef(() => {
|
|
74298
74298
|
});
|
|
@@ -74335,7 +74335,7 @@ function usePointerDownOutside$2(onPointerDownOutside, ownerDocument = globalThi
|
|
|
74335
74335
|
};
|
|
74336
74336
|
}
|
|
74337
74337
|
function useFocusOutside$2(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
74338
|
-
const handleFocusOutside = useCallbackRef$
|
|
74338
|
+
const handleFocusOutside = useCallbackRef$5(onFocusOutside);
|
|
74339
74339
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
74340
74340
|
React__namespace.useEffect(() => {
|
|
74341
74341
|
const handleFocus = (event) => {
|
|
@@ -74370,7 +74370,7 @@ function handleAndDispatchCustomEvent$2(name, handler, detail, { discrete }) {
|
|
|
74370
74370
|
}
|
|
74371
74371
|
|
|
74372
74372
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
74373
|
-
var useLayoutEffect2$
|
|
74373
|
+
var useLayoutEffect2$5 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
74374
74374
|
};
|
|
74375
74375
|
|
|
74376
74376
|
// packages/react/id/src/id.tsx
|
|
@@ -74378,7 +74378,7 @@ var useReactId$3 = React__namespace["useId".toString()] || (() => void 0);
|
|
|
74378
74378
|
var count$6 = 0;
|
|
74379
74379
|
function useId$3(deterministicId) {
|
|
74380
74380
|
const [id, setId] = React__namespace.useState(useReactId$3());
|
|
74381
|
-
useLayoutEffect2$
|
|
74381
|
+
useLayoutEffect2$5(() => {
|
|
74382
74382
|
if (!deterministicId) setId((reactId) => reactId ?? String(count$6++));
|
|
74383
74383
|
}, [deterministicId]);
|
|
74384
74384
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
@@ -76338,7 +76338,7 @@ var NAME$5 = "Arrow";
|
|
|
76338
76338
|
var Arrow$5 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
76339
76339
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
76340
76340
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
76341
|
-
Primitive$
|
|
76341
|
+
Primitive$6.svg,
|
|
76342
76342
|
{
|
|
76343
76343
|
...arrowProps,
|
|
76344
76344
|
ref: forwardedRef,
|
|
@@ -76351,10 +76351,10 @@ var Arrow$5 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
76351
76351
|
);
|
|
76352
76352
|
});
|
|
76353
76353
|
Arrow$5.displayName = NAME$5;
|
|
76354
|
-
var Root$
|
|
76354
|
+
var Root$7 = Arrow$5;
|
|
76355
76355
|
|
|
76356
76356
|
// packages/react/context/src/createContext.tsx
|
|
76357
|
-
function createContextScope$
|
|
76357
|
+
function createContextScope$8(scopeName, createContextScopeDeps = []) {
|
|
76358
76358
|
let defaultContexts = [];
|
|
76359
76359
|
function createContext3(rootComponentName, defaultContext) {
|
|
76360
76360
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -76389,9 +76389,9 @@ function createContextScope$7(scopeName, createContextScopeDeps = []) {
|
|
|
76389
76389
|
};
|
|
76390
76390
|
};
|
|
76391
76391
|
createScope.scopeName = scopeName;
|
|
76392
|
-
return [createContext3, composeContextScopes$
|
|
76392
|
+
return [createContext3, composeContextScopes$8(createScope, ...createContextScopeDeps)];
|
|
76393
76393
|
}
|
|
76394
|
-
function composeContextScopes$
|
|
76394
|
+
function composeContextScopes$8(...scopes) {
|
|
76395
76395
|
const baseScope = scopes[0];
|
|
76396
76396
|
if (scopes.length === 1) return baseScope;
|
|
76397
76397
|
const createScope = () => {
|
|
@@ -76413,9 +76413,9 @@ function composeContextScopes$7(...scopes) {
|
|
|
76413
76413
|
}
|
|
76414
76414
|
|
|
76415
76415
|
// packages/react/use-size/src/useSize.tsx
|
|
76416
|
-
function useSize$
|
|
76416
|
+
function useSize$3(element) {
|
|
76417
76417
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
76418
|
-
useLayoutEffect2$
|
|
76418
|
+
useLayoutEffect2$5(() => {
|
|
76419
76419
|
if (element) {
|
|
76420
76420
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
76421
76421
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -76449,7 +76449,7 @@ function useSize$2(element) {
|
|
|
76449
76449
|
}
|
|
76450
76450
|
|
|
76451
76451
|
var POPPER_NAME$2 = "Popper";
|
|
76452
|
-
var [createPopperContext$2, createPopperScope$2] = createContextScope$
|
|
76452
|
+
var [createPopperContext$2, createPopperScope$2] = createContextScope$8(POPPER_NAME$2);
|
|
76453
76453
|
var [PopperProvider$2, usePopperContext$2] = createPopperContext$2(POPPER_NAME$2);
|
|
76454
76454
|
var Popper$2 = (props) => {
|
|
76455
76455
|
const { __scopePopper, children } = props;
|
|
@@ -76463,11 +76463,11 @@ var PopperAnchor$2 = React__namespace.forwardRef(
|
|
|
76463
76463
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
76464
76464
|
const context = usePopperContext$2(ANCHOR_NAME$4, __scopePopper);
|
|
76465
76465
|
const ref = React__namespace.useRef(null);
|
|
76466
|
-
const composedRefs = useComposedRefs$
|
|
76466
|
+
const composedRefs = useComposedRefs$4(forwardedRef, ref);
|
|
76467
76467
|
React__namespace.useEffect(() => {
|
|
76468
76468
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
76469
76469
|
});
|
|
76470
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
76470
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$6.div, { ...anchorProps, ref: composedRefs });
|
|
76471
76471
|
}
|
|
76472
76472
|
);
|
|
76473
76473
|
PopperAnchor$2.displayName = ANCHOR_NAME$4;
|
|
@@ -76493,9 +76493,9 @@ var PopperContent$2 = React__namespace.forwardRef(
|
|
|
76493
76493
|
} = props;
|
|
76494
76494
|
const context = usePopperContext$2(CONTENT_NAME$6, __scopePopper);
|
|
76495
76495
|
const [content, setContent] = React__namespace.useState(null);
|
|
76496
|
-
const composedRefs = useComposedRefs$
|
|
76496
|
+
const composedRefs = useComposedRefs$4(forwardedRef, (node) => setContent(node));
|
|
76497
76497
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
76498
|
-
const arrowSize = useSize$
|
|
76498
|
+
const arrowSize = useSize$3(arrow$1);
|
|
76499
76499
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
76500
76500
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
76501
76501
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
@@ -76547,8 +76547,8 @@ var PopperContent$2 = React__namespace.forwardRef(
|
|
|
76547
76547
|
]
|
|
76548
76548
|
});
|
|
76549
76549
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement$2(placement);
|
|
76550
|
-
const handlePlaced = useCallbackRef$
|
|
76551
|
-
useLayoutEffect2$
|
|
76550
|
+
const handlePlaced = useCallbackRef$5(onPlaced);
|
|
76551
|
+
useLayoutEffect2$5(() => {
|
|
76552
76552
|
if (isPositioned) {
|
|
76553
76553
|
handlePlaced?.();
|
|
76554
76554
|
}
|
|
@@ -76557,7 +76557,7 @@ var PopperContent$2 = React__namespace.forwardRef(
|
|
|
76557
76557
|
const arrowY = middlewareData.arrow?.y;
|
|
76558
76558
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
76559
76559
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
76560
|
-
useLayoutEffect2$
|
|
76560
|
+
useLayoutEffect2$5(() => {
|
|
76561
76561
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
76562
76562
|
}, [content]);
|
|
76563
76563
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -76594,7 +76594,7 @@ var PopperContent$2 = React__namespace.forwardRef(
|
|
|
76594
76594
|
arrowY,
|
|
76595
76595
|
shouldHideArrow: cannotCenterArrow,
|
|
76596
76596
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
76597
|
-
Primitive$
|
|
76597
|
+
Primitive$6.div,
|
|
76598
76598
|
{
|
|
76599
76599
|
"data-side": placedSide,
|
|
76600
76600
|
"data-align": placedAlign,
|
|
@@ -76654,7 +76654,7 @@ var PopperArrow$2 = React__namespace.forwardRef(function PopperArrow2(props, for
|
|
|
76654
76654
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
76655
76655
|
},
|
|
76656
76656
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
76657
|
-
Root$
|
|
76657
|
+
Root$7,
|
|
76658
76658
|
{
|
|
76659
76659
|
...arrowProps,
|
|
76660
76660
|
ref: forwardedRef,
|
|
@@ -76714,22 +76714,22 @@ var Content$2 = PopperContent$2;
|
|
|
76714
76714
|
var Arrow$4 = PopperArrow$2;
|
|
76715
76715
|
|
|
76716
76716
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
76717
|
-
function setRef$
|
|
76717
|
+
function setRef$4(ref, value) {
|
|
76718
76718
|
if (typeof ref === "function") {
|
|
76719
76719
|
ref(value);
|
|
76720
76720
|
} else if (ref !== null && ref !== void 0) {
|
|
76721
76721
|
ref.current = value;
|
|
76722
76722
|
}
|
|
76723
76723
|
}
|
|
76724
|
-
function composeRefs$
|
|
76725
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
76724
|
+
function composeRefs$4(...refs) {
|
|
76725
|
+
return (node) => refs.forEach((ref) => setRef$4(ref, node));
|
|
76726
76726
|
}
|
|
76727
|
-
function useComposedRefs$
|
|
76728
|
-
return React__namespace.useCallback(composeRefs$
|
|
76727
|
+
function useComposedRefs$3(...refs) {
|
|
76728
|
+
return React__namespace.useCallback(composeRefs$4(...refs), refs);
|
|
76729
76729
|
}
|
|
76730
76730
|
|
|
76731
76731
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
76732
|
-
var useLayoutEffect2$
|
|
76732
|
+
var useLayoutEffect2$4 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
76733
76733
|
};
|
|
76734
76734
|
|
|
76735
76735
|
function useStateMachine(initialState, machine) {
|
|
@@ -76744,7 +76744,7 @@ var Presence = (props) => {
|
|
|
76744
76744
|
const { present, children } = props;
|
|
76745
76745
|
const presence = usePresence(present);
|
|
76746
76746
|
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React__namespace.Children.only(children);
|
|
76747
|
-
const ref = useComposedRefs$
|
|
76747
|
+
const ref = useComposedRefs$3(presence.ref, getElementRef(child));
|
|
76748
76748
|
const forceMount = typeof children === "function";
|
|
76749
76749
|
return forceMount || presence.isPresent ? React__namespace.cloneElement(child, { ref }) : null;
|
|
76750
76750
|
};
|
|
@@ -76772,7 +76772,7 @@ function usePresence(present) {
|
|
|
76772
76772
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
76773
76773
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
76774
76774
|
}, [state]);
|
|
76775
|
-
useLayoutEffect2$
|
|
76775
|
+
useLayoutEffect2$4(() => {
|
|
76776
76776
|
const styles = stylesRef.current;
|
|
76777
76777
|
const wasPresent = prevPresentRef.current;
|
|
76778
76778
|
const hasPresentChanged = wasPresent !== present;
|
|
@@ -76794,7 +76794,7 @@ function usePresence(present) {
|
|
|
76794
76794
|
prevPresentRef.current = present;
|
|
76795
76795
|
}
|
|
76796
76796
|
}, [present, send]);
|
|
76797
|
-
useLayoutEffect2$
|
|
76797
|
+
useLayoutEffect2$4(() => {
|
|
76798
76798
|
if (node) {
|
|
76799
76799
|
let timeoutId;
|
|
76800
76800
|
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
@@ -76858,16 +76858,16 @@ function getElementRef(element) {
|
|
|
76858
76858
|
}
|
|
76859
76859
|
|
|
76860
76860
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
76861
|
-
function useControllableState$
|
|
76861
|
+
function useControllableState$4({
|
|
76862
76862
|
prop,
|
|
76863
76863
|
defaultProp,
|
|
76864
76864
|
onChange = () => {
|
|
76865
76865
|
}
|
|
76866
76866
|
}) {
|
|
76867
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$
|
|
76867
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$4({ defaultProp, onChange });
|
|
76868
76868
|
const isControlled = prop !== void 0;
|
|
76869
76869
|
const value = isControlled ? prop : uncontrolledProp;
|
|
76870
|
-
const handleChange = useCallbackRef$
|
|
76870
|
+
const handleChange = useCallbackRef$5(onChange);
|
|
76871
76871
|
const setValue = React__namespace.useCallback(
|
|
76872
76872
|
(nextValue) => {
|
|
76873
76873
|
if (isControlled) {
|
|
@@ -76882,14 +76882,14 @@ function useControllableState$3({
|
|
|
76882
76882
|
);
|
|
76883
76883
|
return [value, setValue];
|
|
76884
76884
|
}
|
|
76885
|
-
function useUncontrolledState$
|
|
76885
|
+
function useUncontrolledState$4({
|
|
76886
76886
|
defaultProp,
|
|
76887
76887
|
onChange
|
|
76888
76888
|
}) {
|
|
76889
76889
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
76890
76890
|
const [value] = uncontrolledState;
|
|
76891
76891
|
const prevValueRef = React__namespace.useRef(value);
|
|
76892
|
-
const handleChange = useCallbackRef$
|
|
76892
|
+
const handleChange = useCallbackRef$5(onChange);
|
|
76893
76893
|
React__namespace.useEffect(() => {
|
|
76894
76894
|
if (prevValueRef.current !== value) {
|
|
76895
76895
|
handleChange(value);
|
|
@@ -76904,7 +76904,7 @@ var NAME$4 = "VisuallyHidden";
|
|
|
76904
76904
|
var VisuallyHidden = React__namespace.forwardRef(
|
|
76905
76905
|
(props, forwardedRef) => {
|
|
76906
76906
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
76907
|
-
Primitive$
|
|
76907
|
+
Primitive$6.span,
|
|
76908
76908
|
{
|
|
76909
76909
|
...props,
|
|
76910
76910
|
ref: forwardedRef,
|
|
@@ -76927,9 +76927,9 @@ var VisuallyHidden = React__namespace.forwardRef(
|
|
|
76927
76927
|
}
|
|
76928
76928
|
);
|
|
76929
76929
|
VisuallyHidden.displayName = NAME$4;
|
|
76930
|
-
var Root$
|
|
76930
|
+
var Root$6 = VisuallyHidden;
|
|
76931
76931
|
|
|
76932
|
-
var [createTooltipContext, createTooltipScope] = createContextScope$
|
|
76932
|
+
var [createTooltipContext, createTooltipScope] = createContextScope$9("Tooltip", [
|
|
76933
76933
|
createPopperScope$2
|
|
76934
76934
|
]);
|
|
76935
76935
|
var usePopperScope$2 = createPopperScope$2();
|
|
@@ -76999,7 +76999,7 @@ var Tooltip$1 = (props) => {
|
|
|
76999
76999
|
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
|
77000
77000
|
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
|
77001
77001
|
const wasOpenDelayedRef = React__namespace.useRef(false);
|
|
77002
|
-
const [open = false, setOpen] = useControllableState$
|
|
77002
|
+
const [open = false, setOpen] = useControllableState$4({
|
|
77003
77003
|
prop: openProp,
|
|
77004
77004
|
defaultProp: defaultOpen,
|
|
77005
77005
|
onChange: (open2) => {
|
|
@@ -77070,7 +77070,7 @@ var TooltipTrigger$1 = React__namespace.forwardRef(
|
|
|
77070
77070
|
const providerContext = useTooltipProviderContext(TRIGGER_NAME$2, __scopeTooltip);
|
|
77071
77071
|
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
77072
77072
|
const ref = React__namespace.useRef(null);
|
|
77073
|
-
const composedRefs = useComposedRefs$
|
|
77073
|
+
const composedRefs = useComposedRefs$4(forwardedRef, ref, context.onTriggerChange);
|
|
77074
77074
|
const isPointerDownRef = React__namespace.useRef(false);
|
|
77075
77075
|
const hasPointerMoveOpenedRef = React__namespace.useRef(false);
|
|
77076
77076
|
const handlePointerUp = React__namespace.useCallback(() => isPointerDownRef.current = false, []);
|
|
@@ -77078,32 +77078,32 @@ var TooltipTrigger$1 = React__namespace.forwardRef(
|
|
|
77078
77078
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
77079
77079
|
}, [handlePointerUp]);
|
|
77080
77080
|
return /* @__PURE__ */ jsxRuntime.jsx(Anchor$2, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
77081
|
-
Primitive$
|
|
77081
|
+
Primitive$6.button,
|
|
77082
77082
|
{
|
|
77083
77083
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
77084
77084
|
"data-state": context.stateAttribute,
|
|
77085
77085
|
...triggerProps,
|
|
77086
77086
|
ref: composedRefs,
|
|
77087
|
-
onPointerMove: composeEventHandlers$
|
|
77087
|
+
onPointerMove: composeEventHandlers$4(props.onPointerMove, (event) => {
|
|
77088
77088
|
if (event.pointerType === "touch") return;
|
|
77089
77089
|
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
|
|
77090
77090
|
context.onTriggerEnter();
|
|
77091
77091
|
hasPointerMoveOpenedRef.current = true;
|
|
77092
77092
|
}
|
|
77093
77093
|
}),
|
|
77094
|
-
onPointerLeave: composeEventHandlers$
|
|
77094
|
+
onPointerLeave: composeEventHandlers$4(props.onPointerLeave, () => {
|
|
77095
77095
|
context.onTriggerLeave();
|
|
77096
77096
|
hasPointerMoveOpenedRef.current = false;
|
|
77097
77097
|
}),
|
|
77098
|
-
onPointerDown: composeEventHandlers$
|
|
77098
|
+
onPointerDown: composeEventHandlers$4(props.onPointerDown, () => {
|
|
77099
77099
|
isPointerDownRef.current = true;
|
|
77100
77100
|
document.addEventListener("pointerup", handlePointerUp, { once: true });
|
|
77101
77101
|
}),
|
|
77102
|
-
onFocus: composeEventHandlers$
|
|
77102
|
+
onFocus: composeEventHandlers$4(props.onFocus, () => {
|
|
77103
77103
|
if (!isPointerDownRef.current) context.onOpen();
|
|
77104
77104
|
}),
|
|
77105
|
-
onBlur: composeEventHandlers$
|
|
77106
|
-
onClick: composeEventHandlers$
|
|
77105
|
+
onBlur: composeEventHandlers$4(props.onBlur, context.onClose),
|
|
77106
|
+
onClick: composeEventHandlers$4(props.onClick, context.onClose)
|
|
77107
77107
|
}
|
|
77108
77108
|
) });
|
|
77109
77109
|
}
|
|
@@ -77126,7 +77126,7 @@ var TooltipContentHoverable = React__namespace.forwardRef((props, forwardedRef)
|
|
|
77126
77126
|
const context = useTooltipContext(CONTENT_NAME$5, props.__scopeTooltip);
|
|
77127
77127
|
const providerContext = useTooltipProviderContext(CONTENT_NAME$5, props.__scopeTooltip);
|
|
77128
77128
|
const ref = React__namespace.useRef(null);
|
|
77129
|
-
const composedRefs = useComposedRefs$
|
|
77129
|
+
const composedRefs = useComposedRefs$4(forwardedRef, ref);
|
|
77130
77130
|
const [pointerGraceArea, setPointerGraceArea] = React__namespace.useState(null);
|
|
77131
77131
|
const { trigger, onClose } = context;
|
|
77132
77132
|
const content = ref.current;
|
|
@@ -77240,7 +77240,7 @@ var TooltipContentImpl = React__namespace.forwardRef(
|
|
|
77240
77240
|
},
|
|
77241
77241
|
children: [
|
|
77242
77242
|
/* @__PURE__ */ jsxRuntime.jsx(Slottable, { children }),
|
|
77243
|
-
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root$
|
|
77243
|
+
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root$6, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
77244
77244
|
]
|
|
77245
77245
|
}
|
|
77246
77246
|
)
|
|
@@ -77779,7 +77779,7 @@ BarHeader.ButtonBar = function (props) {
|
|
|
77779
77779
|
}
|
|
77780
77780
|
};
|
|
77781
77781
|
|
|
77782
|
-
var i$4=Object.defineProperty;var d$5=(t,e,n)=>e in t?i$4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var r$
|
|
77782
|
+
var i$4=Object.defineProperty;var d$5=(t,e,n)=>e in t?i$4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var r$4=(t,e,n)=>(d$5(t,typeof e!="symbol"?e+"":e,n),n);let o$6 = class o{constructor(){r$4(this,"current",this.detect());r$4(this,"handoffState","pending");r$4(this,"currentId",0);}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e);}reset(){this.set(this.detect());}nextId(){return ++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window=="undefined"||typeof document=="undefined"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete");}get isHandoffComplete(){return this.handoffState==="complete"}};let s$9=new o$6;
|
|
77783
77783
|
|
|
77784
77784
|
let l$5=(e,f)=>{s$9.isServer?React.useEffect(e,f):React.useLayoutEffect(e,f);};
|
|
77785
77785
|
|
|
@@ -77838,7 +77838,7 @@ function t$4(n){function e(){document.readyState!=="loading"&&(n(),document.remo
|
|
|
77838
77838
|
|
|
77839
77839
|
let t$3=[];t$4(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&t$3[0]!==n.target&&(t$3.unshift(n.target),t$3=t$3.filter(r=>r!=null&&r.isConnected),t$3.splice(10));}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0});});
|
|
77840
77840
|
|
|
77841
|
-
function r$
|
|
77841
|
+
function r$3(n){let e=n.parentElement,l=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(l=e),e=e.parentElement;let t=(e==null?void 0:e.getAttribute("disabled"))==="";return t&&i$1(l)?!1:t}function i$1(n){if(!n)return !1;let e=n.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return !1;e=e.previousElementSibling;}return !0}
|
|
77842
77842
|
|
|
77843
77843
|
function u$2(l){throw new Error("Unexpected object: "+l)}var c$4=(i=>(i[i.First=0]="First",i[i.Previous=1]="Previous",i[i.Next=2]="Next",i[i.Last=3]="Last",i[i.Specific=4]="Specific",i[i.Nothing=5]="Nothing",i))(c$4||{});function f$4(l,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),s=r!=null?r:-1;switch(l.focus){case 0:{for(let e=0;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 1:{for(let e=s-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 2:{for(let e=s+1;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 3:{for(let e=t.length-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 4:{for(let e=0;e<t.length;++e)if(n.resolveId(t[e],e,t)===l.id)return e;return r}case 5:return null;default:u$2(l);}}
|
|
77844
77844
|
|
|
@@ -77858,11 +77858,11 @@ let e=React.createContext(!1);function a$6(){return React.useContext(e)}function
|
|
|
77858
77858
|
|
|
77859
77859
|
function F$1(p){let n=a$6(),l=React.useContext(_$1),e=n$2(p),[a,o]=React.useState(()=>{if(!n&&l!==null||s$9.isServer)return null;let t=e==null?void 0:e.getElementById("headlessui-portal-root");if(t)return t;if(e===null)return null;let r=e.createElement("div");return r.setAttribute("id","headlessui-portal-root"),e.body.appendChild(r)});return React.useEffect(()=>{a!==null&&(e!=null&&e.body.contains(a)||e==null||e.body.appendChild(a));},[a,e]),React.useEffect(()=>{n||l!==null&&o(l.current);},[l,o,n]),a}let U$2=React.Fragment;function N$1(p,n){let l=p,e=React.useRef(null),a=y$1(T(u=>{e.current=u;}),n),o=n$2(e),t=F$1(e),[r]=React.useState(()=>{var u;return s$9.isServer?null:(u=o==null?void 0:o.createElement("div"))!=null?u:null}),i=React.useContext(f$2),v=l$4();return l$5(()=>{!t||!r||t.contains(r)||(r.setAttribute("data-headlessui-portal",""),t.appendChild(r));},[t,r]),l$5(()=>{if(r&&i)return i.register(r)},[i,r]),c$3(()=>{var u;!t||!r||(r instanceof Node&&t.contains(r)&&t.removeChild(r),t.childNodes.length<=0&&((u=t.parentElement)==null||u.removeChild(t)));}),v?!t||!r?null:reactDomExports.createPortal(C$1({ourProps:{ref:a},theirProps:l,defaultTag:U$2,name:"Portal"}),r):null}let S$3=React.Fragment,_$1=React.createContext(null);function j(p,n){let{target:l,...e}=p,o={ref:y$1(n)};return React.createElement(_$1.Provider,{value:l},C$1({ourProps:o,theirProps:e,defaultTag:S$3,name:"Popover.Group"}))}let f$2=React.createContext(null);function ee$1(){let p=React.useContext(f$2),n=React.useRef([]),l=o$5(o=>(n.current.push(o),p&&p.register(o),()=>e(o))),e=o$5(o=>{let t=n.current.indexOf(o);t!==-1&&n.current.splice(t,1),p&&p.unregister(o);}),a=React.useMemo(()=>({register:l,unregister:e,portals:n}),[l,e,n]);return [n,React.useMemo(()=>function({children:t}){return React.createElement(f$2.Provider,{value:a},t)},[a])]}let D$1=U$3(N$1),I$3=U$3(j),te$1=Object.assign(D$1,{Group:I$3});
|
|
77860
77860
|
|
|
77861
|
-
function i(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const d$2=typeof Object.is=="function"?Object.is:i,{useState:u$1,useEffect:h$1,useLayoutEffect:f$1,useDebugValue:p$1}=React__namespace;function y(e,t,c){const a=t(),[{inst:n},o]=u$1({inst:{value:a,getSnapshot:t}});return f$1(()=>{n.value=a,n.getSnapshot=t,r$
|
|
77861
|
+
function i(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const d$2=typeof Object.is=="function"?Object.is:i,{useState:u$1,useEffect:h$1,useLayoutEffect:f$1,useDebugValue:p$1}=React__namespace;function y(e,t,c){const a=t(),[{inst:n},o]=u$1({inst:{value:a,getSnapshot:t}});return f$1(()=>{n.value=a,n.getSnapshot=t,r$2(n)&&o({inst:n});},[e,a,t]),h$1(()=>(r$2(n)&&o({inst:n}),e(()=>{r$2(n)&&o({inst:n});})),[e]),p$1(a),a}function r$2(e){const t=e.getSnapshot,c=e.value;try{const a=t();return !d$2(c,a)}catch{return !0}}
|
|
77862
77862
|
|
|
77863
77863
|
function t$2(r,e,n){return e()}
|
|
77864
77864
|
|
|
77865
|
-
const r=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",s$2=!r,c$2=s$2?t$2:y,a$5="useSyncExternalStore"in React__namespace?(n=>n.useSyncExternalStore)(React__namespace):c$2;
|
|
77865
|
+
const r$1=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",s$2=!r$1,c$2=s$2?t$2:y,a$5="useSyncExternalStore"in React__namespace?(n=>n.useSyncExternalStore)(React__namespace):c$2;
|
|
77866
77866
|
|
|
77867
77867
|
function S$2(t){return a$5(t.subscribe,t.getSnapshot,t.getSnapshot)}
|
|
77868
77868
|
|
|
@@ -77886,17 +77886,17 @@ let a$2=React.createContext(()=>{});a$2.displayName="StackContext";var s$1=(e=>(
|
|
|
77886
77886
|
|
|
77887
77887
|
let d=React.createContext(null);function f(){let r=React.useContext(d);if(r===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,f),t}return r}function w$1(){let[r,t]=React.useState([]);return [r.length>0?r.join(" "):void 0,React.useMemo(()=>function(e){let i=o$5(s=>(t(o=>[...o,s]),()=>t(o=>{let p=o.slice(),c=p.indexOf(s);return c!==-1&&p.splice(c,1),p}))),n=React.useMemo(()=>({register:i,slot:e.slot,name:e.name,props:e.props}),[i,e.slot,e.name,e.props]);return React.createElement(d.Provider,{value:n},e.children)},[t])]}let I$2="p";function S$1(r,t){let a=I$6(),{id:e=`headlessui-description-${a}`,...i}=r,n=f(),s=y$1(t);l$5(()=>n.register(e),[e,n.register]);let o={ref:s,...n.props,id:e};return C$1({ourProps:o,theirProps:i,slot:n.slot||{},defaultTag:I$2,name:n.name||"Description"})}let h=U$3(S$1),G=Object.assign(h,{});
|
|
77888
77888
|
|
|
77889
|
-
var Me$1=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(Me$1||{}),we=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(we||{});let He$1={[0](o,e){return o.titleId===e.id?o:{...o,titleId:e.id}}},I$1=React.createContext(null);I$1.displayName="DialogContext";function b$1(o){let e=React.useContext(I$1);if(e===null){let r=new Error(`<${o} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,b$1),r}return e}function Be(o,e,r=()=>[document.body]){p(o,e,i=>{var n;return {containers:[...(n=i.containers)!=null?n:[],r]}});}function Ge(o,e){return u$7(e.type,He$1,o,e)}let Ne$1="div",Ue=O.RenderStrategy|O.Static;function We(o,e){let r=I$6(),{id:i=`headlessui-dialog-${r}`,open:n,onClose:l,initialFocus:s,role:a="dialog",__demoMode:T=!1,...m}=o,[M,f]=React.useState(0),U=React.useRef(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(U.current||(U.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E$1=u$3();n===void 0&&E$1!==null&&(n=(E$1&d$3.Open)===d$3.Open);let D=React.useRef(null),ee=y$1(D,e),g=n$2(D),W=o.hasOwnProperty("open")||E$1!==null,$=o.hasOwnProperty("onClose");if(!W&&!$)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!W)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!$)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof n!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let p=n?0:1,[h,te]=React.useReducer(Ge,{titleId:null,descriptionId:null,panelRef:React.createRef()}),P=o$5(()=>l(!1)),Y=o$5(t=>te({type:0,id:t})),S=l$4()?T?!1:p===0:!1,x=M>1,j=React.useContext(I$1)!==null,[oe,re]=ee$1(),ne={get current(){var t;return (t=h.panelRef.current)!=null?t:D.current}},{resolveContainers:w,mainTreeNodeRef:L,MainTreeNode:le}=N({portals:oe,defaultContainers:[ne]}),ae=x?"parent":"leaf",J=E$1!==null?(E$1&d$3.Closing)===d$3.Closing:!1,ie=(()=>j||J?!1:S)(),se=React.useCallback(()=>{var t,c;return (c=Array.from((t=g==null?void 0:g.querySelectorAll("body > *"))!=null?t:[]).find(d=>d.id==="headlessui-portal-root"?!1:d.contains(L.current)&&d instanceof HTMLElement))!=null?c:null},[L]);b$3(se,ie);let pe=(()=>x?!0:S)(),de=React.useCallback(()=>{var t,c;return (c=Array.from((t=g==null?void 0:g.querySelectorAll("[data-headlessui-portal]"))!=null?t:[]).find(d=>d.contains(L.current)&&d instanceof HTMLElement))!=null?c:null},[L]);b$3(de,pe);let ue=(()=>!(!S||x))();y$2(w,t=>{t.preventDefault(),P();},ue);let fe=(()=>!(x||p!==0))();E(g==null?void 0:g.defaultView,"keydown",t=>{fe&&(t.defaultPrevented||t.key===o$1.Escape&&(t.preventDefault(),t.stopPropagation(),P()));});let ge=(()=>!(J||p!==0||j))();Be(g,ge,w),React.useEffect(()=>{if(p!==0||!D.current)return;let t=new ResizeObserver(c=>{for(let d of c){let F=d.target.getBoundingClientRect();F.x===0&&F.y===0&&F.width===0&&F.height===0&&P();}});return t.observe(D.current),()=>t.disconnect()},[p,D,P]);let[Te,ce]=w$1(),De=React.useMemo(()=>[{dialogState:p,close:P,setTitleId:Y},h],[p,h,P,Y]),X=React.useMemo(()=>({open:p===0}),[p]),me={ref:ee,id:i,role:a,"aria-modal":p===0?!0:void 0,"aria-labelledby":h.titleId,"aria-describedby":Te};return React.createElement(b$2,{type:"Dialog",enabled:p===0,element:D,onUpdate:o$5((t,c)=>{c==="Dialog"&&u$7(t,{[s$1.Add]:()=>f(d=>d+1),[s$1.Remove]:()=>f(d=>d-1)});})},React.createElement(l$2,{force:!0},React.createElement(te$1,null,React.createElement(I$1.Provider,{value:De},React.createElement(te$1.Group,{target:D},React.createElement(l$2,{force:!1},React.createElement(ce,{slot:X,name:"Dialog.Description"},React.createElement(de$1,{initialFocus:s,containers:w,features:S?u$7(ae,{parent:de$1.features.RestoreFocus,leaf:de$1.features.All&~de$1.features.FocusLock}):de$1.features.None},React.createElement(re,null,C$1({ourProps:me,theirProps:m,slot:X,defaultTag:Ne$1,features:Ue,visible:p===0,name:"Dialog"}))))))))),React.createElement(le,null))}let $e="div";function Ye(o,e){let r=I$6(),{id:i=`headlessui-dialog-overlay-${r}`,...n}=o,[{dialogState:l,close:s}]=b$1("Dialog.Overlay"),a=y$1(e),T=o$5(f=>{if(f.target===f.currentTarget){if(r$
|
|
77889
|
+
var Me$1=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(Me$1||{}),we=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(we||{});let He$1={[0](o,e){return o.titleId===e.id?o:{...o,titleId:e.id}}},I$1=React.createContext(null);I$1.displayName="DialogContext";function b$1(o){let e=React.useContext(I$1);if(e===null){let r=new Error(`<${o} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,b$1),r}return e}function Be(o,e,r=()=>[document.body]){p(o,e,i=>{var n;return {containers:[...(n=i.containers)!=null?n:[],r]}});}function Ge(o,e){return u$7(e.type,He$1,o,e)}let Ne$1="div",Ue=O.RenderStrategy|O.Static;function We(o,e){let r=I$6(),{id:i=`headlessui-dialog-${r}`,open:n,onClose:l,initialFocus:s,role:a="dialog",__demoMode:T=!1,...m}=o,[M,f]=React.useState(0),U=React.useRef(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(U.current||(U.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E$1=u$3();n===void 0&&E$1!==null&&(n=(E$1&d$3.Open)===d$3.Open);let D=React.useRef(null),ee=y$1(D,e),g=n$2(D),W=o.hasOwnProperty("open")||E$1!==null,$=o.hasOwnProperty("onClose");if(!W&&!$)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!W)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!$)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof n!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let p=n?0:1,[h,te]=React.useReducer(Ge,{titleId:null,descriptionId:null,panelRef:React.createRef()}),P=o$5(()=>l(!1)),Y=o$5(t=>te({type:0,id:t})),S=l$4()?T?!1:p===0:!1,x=M>1,j=React.useContext(I$1)!==null,[oe,re]=ee$1(),ne={get current(){var t;return (t=h.panelRef.current)!=null?t:D.current}},{resolveContainers:w,mainTreeNodeRef:L,MainTreeNode:le}=N({portals:oe,defaultContainers:[ne]}),ae=x?"parent":"leaf",J=E$1!==null?(E$1&d$3.Closing)===d$3.Closing:!1,ie=(()=>j||J?!1:S)(),se=React.useCallback(()=>{var t,c;return (c=Array.from((t=g==null?void 0:g.querySelectorAll("body > *"))!=null?t:[]).find(d=>d.id==="headlessui-portal-root"?!1:d.contains(L.current)&&d instanceof HTMLElement))!=null?c:null},[L]);b$3(se,ie);let pe=(()=>x?!0:S)(),de=React.useCallback(()=>{var t,c;return (c=Array.from((t=g==null?void 0:g.querySelectorAll("[data-headlessui-portal]"))!=null?t:[]).find(d=>d.contains(L.current)&&d instanceof HTMLElement))!=null?c:null},[L]);b$3(de,pe);let ue=(()=>!(!S||x))();y$2(w,t=>{t.preventDefault(),P();},ue);let fe=(()=>!(x||p!==0))();E(g==null?void 0:g.defaultView,"keydown",t=>{fe&&(t.defaultPrevented||t.key===o$1.Escape&&(t.preventDefault(),t.stopPropagation(),P()));});let ge=(()=>!(J||p!==0||j))();Be(g,ge,w),React.useEffect(()=>{if(p!==0||!D.current)return;let t=new ResizeObserver(c=>{for(let d of c){let F=d.target.getBoundingClientRect();F.x===0&&F.y===0&&F.width===0&&F.height===0&&P();}});return t.observe(D.current),()=>t.disconnect()},[p,D,P]);let[Te,ce]=w$1(),De=React.useMemo(()=>[{dialogState:p,close:P,setTitleId:Y},h],[p,h,P,Y]),X=React.useMemo(()=>({open:p===0}),[p]),me={ref:ee,id:i,role:a,"aria-modal":p===0?!0:void 0,"aria-labelledby":h.titleId,"aria-describedby":Te};return React.createElement(b$2,{type:"Dialog",enabled:p===0,element:D,onUpdate:o$5((t,c)=>{c==="Dialog"&&u$7(t,{[s$1.Add]:()=>f(d=>d+1),[s$1.Remove]:()=>f(d=>d-1)});})},React.createElement(l$2,{force:!0},React.createElement(te$1,null,React.createElement(I$1.Provider,{value:De},React.createElement(te$1.Group,{target:D},React.createElement(l$2,{force:!1},React.createElement(ce,{slot:X,name:"Dialog.Description"},React.createElement(de$1,{initialFocus:s,containers:w,features:S?u$7(ae,{parent:de$1.features.RestoreFocus,leaf:de$1.features.All&~de$1.features.FocusLock}):de$1.features.None},React.createElement(re,null,C$1({ourProps:me,theirProps:m,slot:X,defaultTag:Ne$1,features:Ue,visible:p===0,name:"Dialog"}))))))))),React.createElement(le,null))}let $e="div";function Ye(o,e){let r=I$6(),{id:i=`headlessui-dialog-overlay-${r}`,...n}=o,[{dialogState:l,close:s}]=b$1("Dialog.Overlay"),a=y$1(e),T=o$5(f=>{if(f.target===f.currentTarget){if(r$3(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),s();}}),m=React.useMemo(()=>({open:l===0}),[l]);return C$1({ourProps:{ref:a,id:i,"aria-hidden":!0,onClick:T},theirProps:n,slot:m,defaultTag:$e,name:"Dialog.Overlay"})}let je="div";function Je(o,e){let r=I$6(),{id:i=`headlessui-dialog-backdrop-${r}`,...n}=o,[{dialogState:l},s]=b$1("Dialog.Backdrop"),a=y$1(e);React.useEffect(()=>{if(s.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[s.panelRef]);let T=React.useMemo(()=>({open:l===0}),[l]);return React.createElement(l$2,{force:!0},React.createElement(te$1,null,C$1({ourProps:{ref:a,id:i,"aria-hidden":!0},theirProps:n,slot:T,defaultTag:je,name:"Dialog.Backdrop"})))}let Xe="div";function Ke(o,e){let r=I$6(),{id:i=`headlessui-dialog-panel-${r}`,...n}=o,[{dialogState:l},s]=b$1("Dialog.Panel"),a=y$1(e,s.panelRef),T=React.useMemo(()=>({open:l===0}),[l]),m=o$5(f=>{f.stopPropagation();});return C$1({ourProps:{ref:a,id:i,onClick:m},theirProps:n,slot:T,defaultTag:Xe,name:"Dialog.Panel"})}let Ve="h2";function qe$2(o,e){let r=I$6(),{id:i=`headlessui-dialog-title-${r}`,...n}=o,[{dialogState:l,setTitleId:s}]=b$1("Dialog.Title"),a=y$1(e);React.useEffect(()=>(s(i),()=>s(null)),[i,s]);let T=React.useMemo(()=>({open:l===0}),[l]);return C$1({ourProps:{ref:a,id:i},theirProps:n,slot:T,defaultTag:Ve,name:"Dialog.Title"})}let ze=U$3(We),Qe=U$3(Je),Ze=U$3(Ke),et=U$3(Ye),tt=U$3(qe$2),_t=Object.assign(ze,{Backdrop:Qe,Panel:Ze,Overlay:et,Title:tt,Description:G});
|
|
77890
77890
|
|
|
77891
77891
|
var t;let a$1=(t=React.startTransition)!=null?t:function(i){i();};
|
|
77892
77892
|
|
|
77893
|
-
var Q=(o=>(o[o.Open=0]="Open",o[o.Closed=1]="Closed",o))(Q||{}),V=(t=>(t[t.ToggleDisclosure=0]="ToggleDisclosure",t[t.CloseDisclosure=1]="CloseDisclosure",t[t.SetButtonId=2]="SetButtonId",t[t.SetPanelId=3]="SetPanelId",t[t.LinkPanel=4]="LinkPanel",t[t.UnlinkPanel=5]="UnlinkPanel",t))(V||{});let Y={[0]:e=>({...e,disclosureState:u$7(e.disclosureState,{[0]:1,[1]:0})}),[1]:e=>e.disclosureState===1?e:{...e,disclosureState:1},[4](e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},[5](e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},[2](e,n){return e.buttonId===n.buttonId?e:{...e,buttonId:n.buttonId}},[3](e,n){return e.panelId===n.panelId?e:{...e,panelId:n.panelId}}},M$2=React.createContext(null);M$2.displayName="DisclosureContext";function _(e){let n=React.useContext(M$2);if(n===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,_),o}return n}let v$1=React.createContext(null);v$1.displayName="DisclosureAPIContext";function K(e){let n=React.useContext(v$1);if(n===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,K),o}return n}let F=React.createContext(null);F.displayName="DisclosurePanelContext";function Z(){return React.useContext(F)}function ee(e,n){return u$7(n.type,Y,e,n)}let te=React.Fragment;function ne(e,n){let{defaultOpen:o=!1,...i}=e,f=React.useRef(null),l=y$1(n,T(u=>{f.current=u;},e.as===void 0||e.as===React.Fragment)),t=React.useRef(null),d=React.useRef(null),s=React.useReducer(ee,{disclosureState:o?0:1,linkedPanel:!1,buttonRef:d,panelRef:t,buttonId:null,panelId:null}),[{disclosureState:c,buttonId:a},D]=s,p=o$5(u=>{D({type:1});let y=o$2(f);if(!y||!a)return;let r=(()=>u?u instanceof HTMLElement?u:u.current instanceof HTMLElement?u.current:y.getElementById(a):y.getElementById(a))();r==null||r.focus();}),P=React.useMemo(()=>({close:p}),[p]),T$1=React.useMemo(()=>({open:c===0,close:p}),[c,p]),C={ref:l};return React.createElement(M$2.Provider,{value:s},React.createElement(v$1.Provider,{value:P},React.createElement(s$4,{value:u$7(c,{[0]:d$3.Open,[1]:d$3.Closed})},C$1({ourProps:C,theirProps:i,slot:T$1,defaultTag:te,name:"Disclosure"}))))}let le$1="button";function oe(e,n){let o=I$6(),{id:i=`headlessui-disclosure-button-${o}`,...f}=e,[l,t]=_("Disclosure.Button"),d=Z(),s=d===null?!1:d===l.panelId,c=React.useRef(null),a=y$1(c,n,s?null:l.buttonRef),D=I$4();React.useEffect(()=>{if(!s)return t({type:2,buttonId:i}),()=>{t({type:2,buttonId:null});}},[i,t,s]);let p=o$5(r=>{var m;if(s){if(l.disclosureState===1)return;switch(r.key){case o$1.Space:case o$1.Enter:r.preventDefault(),r.stopPropagation(),t({type:0}),(m=l.buttonRef.current)==null||m.focus();break}}else switch(r.key){case o$1.Space:case o$1.Enter:r.preventDefault(),r.stopPropagation(),t({type:0});break}}),P=o$5(r=>{switch(r.key){case o$1.Space:r.preventDefault();break}}),T=o$5(r=>{var m;r$
|
|
77893
|
+
var Q=(o=>(o[o.Open=0]="Open",o[o.Closed=1]="Closed",o))(Q||{}),V=(t=>(t[t.ToggleDisclosure=0]="ToggleDisclosure",t[t.CloseDisclosure=1]="CloseDisclosure",t[t.SetButtonId=2]="SetButtonId",t[t.SetPanelId=3]="SetPanelId",t[t.LinkPanel=4]="LinkPanel",t[t.UnlinkPanel=5]="UnlinkPanel",t))(V||{});let Y={[0]:e=>({...e,disclosureState:u$7(e.disclosureState,{[0]:1,[1]:0})}),[1]:e=>e.disclosureState===1?e:{...e,disclosureState:1},[4](e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},[5](e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},[2](e,n){return e.buttonId===n.buttonId?e:{...e,buttonId:n.buttonId}},[3](e,n){return e.panelId===n.panelId?e:{...e,panelId:n.panelId}}},M$2=React.createContext(null);M$2.displayName="DisclosureContext";function _(e){let n=React.useContext(M$2);if(n===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,_),o}return n}let v$1=React.createContext(null);v$1.displayName="DisclosureAPIContext";function K(e){let n=React.useContext(v$1);if(n===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,K),o}return n}let F=React.createContext(null);F.displayName="DisclosurePanelContext";function Z(){return React.useContext(F)}function ee(e,n){return u$7(n.type,Y,e,n)}let te=React.Fragment;function ne(e,n){let{defaultOpen:o=!1,...i}=e,f=React.useRef(null),l=y$1(n,T(u=>{f.current=u;},e.as===void 0||e.as===React.Fragment)),t=React.useRef(null),d=React.useRef(null),s=React.useReducer(ee,{disclosureState:o?0:1,linkedPanel:!1,buttonRef:d,panelRef:t,buttonId:null,panelId:null}),[{disclosureState:c,buttonId:a},D]=s,p=o$5(u=>{D({type:1});let y=o$2(f);if(!y||!a)return;let r=(()=>u?u instanceof HTMLElement?u:u.current instanceof HTMLElement?u.current:y.getElementById(a):y.getElementById(a))();r==null||r.focus();}),P=React.useMemo(()=>({close:p}),[p]),T$1=React.useMemo(()=>({open:c===0,close:p}),[c,p]),C={ref:l};return React.createElement(M$2.Provider,{value:s},React.createElement(v$1.Provider,{value:P},React.createElement(s$4,{value:u$7(c,{[0]:d$3.Open,[1]:d$3.Closed})},C$1({ourProps:C,theirProps:i,slot:T$1,defaultTag:te,name:"Disclosure"}))))}let le$1="button";function oe(e,n){let o=I$6(),{id:i=`headlessui-disclosure-button-${o}`,...f}=e,[l,t]=_("Disclosure.Button"),d=Z(),s=d===null?!1:d===l.panelId,c=React.useRef(null),a=y$1(c,n,s?null:l.buttonRef),D=I$4();React.useEffect(()=>{if(!s)return t({type:2,buttonId:i}),()=>{t({type:2,buttonId:null});}},[i,t,s]);let p=o$5(r=>{var m;if(s){if(l.disclosureState===1)return;switch(r.key){case o$1.Space:case o$1.Enter:r.preventDefault(),r.stopPropagation(),t({type:0}),(m=l.buttonRef.current)==null||m.focus();break}}else switch(r.key){case o$1.Space:case o$1.Enter:r.preventDefault(),r.stopPropagation(),t({type:0});break}}),P=o$5(r=>{switch(r.key){case o$1.Space:r.preventDefault();break}}),T=o$5(r=>{var m;r$3(r.currentTarget)||e.disabled||(s?(t({type:0}),(m=l.buttonRef.current)==null||m.focus()):t({type:0}));}),C=React.useMemo(()=>({open:l.disclosureState===0}),[l]),u=T$1(e,c),y=s?{ref:a,type:u,onKeyDown:p,onClick:T}:{ref:a,id:i,type:u,"aria-expanded":l.disclosureState===0,"aria-controls":l.linkedPanel?l.panelId:void 0,onKeyDown:p,onKeyUp:P,onClick:T};return C$1({mergeRefs:D,ourProps:y,theirProps:f,slot:C,defaultTag:le$1,name:"Disclosure.Button"})}let re$1="div",se$1=O.RenderStrategy|O.Static;function ue$1(e,n){let o=I$6(),{id:i=`headlessui-disclosure-panel-${o}`,...f}=e,[l,t]=_("Disclosure.Panel"),{close:d}=K("Disclosure.Panel"),s=I$4(),c=y$1(n,l.panelRef,T=>{a$1(()=>t({type:T?4:5}));});React.useEffect(()=>(t({type:3,panelId:i}),()=>{t({type:3,panelId:null});}),[i,t]);let a=u$3(),D=(()=>a!==null?(a&d$3.Open)===d$3.Open:l.disclosureState===0)(),p=React.useMemo(()=>({open:l.disclosureState===0,close:d}),[l,d]),P={ref:c,id:i};return React.createElement(F.Provider,{value:l.panelId},C$1({mergeRefs:s,ourProps:P,theirProps:f,slot:p,defaultTag:re$1,features:se$1,visible:D,name:"Disclosure.Panel"}))}let ie=U$3(ne),ae$1=U$3(oe),pe=U$3(ue$1),Ae$1=Object.assign(ie,{Button:ae$1,Panel:pe});
|
|
77894
77894
|
|
|
77895
77895
|
let a=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function o(e){var r,i;let n=(r=e.innerText)!=null?r:"",t=e.cloneNode(!0);if(!(t instanceof HTMLElement))return n;let u=!1;for(let f of t.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))f.remove(),u=!0;let l=u?(i=t.innerText)!=null?i:"":n;return a.test(l)&&(l=l.replace(a,"")),l}function g$1(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let u=t.split(" ").map(l=>{let r=document.getElementById(l);if(r){let i=r.getAttribute("aria-label");return typeof i=="string"?i.trim():o(r).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(", ")}return o(e).trim()}
|
|
77896
77896
|
|
|
77897
77897
|
function s(c){let t=React.useRef(""),r=React.useRef("");return o$5(()=>{let e=c.current;if(!e)return "";let u=e.innerText;if(t.current===u)return r.current;let n=g$1(e).trim().toLowerCase();return t.current=u,r.current=n,n})}
|
|
77898
77898
|
|
|
77899
|
-
var me=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(me||{}),de=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(de||{}),fe=(a=>(a[a.OpenMenu=0]="OpenMenu",a[a.CloseMenu=1]="CloseMenu",a[a.GoToItem=2]="GoToItem",a[a.Search=3]="Search",a[a.ClearSearch=4]="ClearSearch",a[a.RegisterItem=5]="RegisterItem",a[a.UnregisterItem=6]="UnregisterItem",a))(fe||{});function w(e,u=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,s=I$5(u(e.items.slice()),t=>t.dataRef.current.domRef.current),i=r?s.indexOf(r):null;return i===-1&&(i=null),{items:s,activeItemIndex:i}}let Te={[1](e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},[0](e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},[2]:(e,u)=>{var i;let r=w(e),s=f$4(u,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return {...e,...r,searchQuery:"",activeItemIndex:s,activationTrigger:(i=u.trigger)!=null?i:1}},[3]:(e,u)=>{let s=e.searchQuery!==""?0:1,i=e.searchQuery+u.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+s).concat(e.items.slice(0,e.activeItemIndex+s)):e.items).find(l=>{var m;return ((m=l.dataRef.current.textValue)==null?void 0:m.startsWith(i))&&!l.dataRef.current.disabled}),a=o?e.items.indexOf(o):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:i}:{...e,searchQuery:i,activeItemIndex:a,activationTrigger:1}},[4](e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},[5]:(e,u)=>{let r=w(e,s=>[...s,{id:u.id,dataRef:u.dataRef}]);return {...e,...r}},[6]:(e,u)=>{let r=w(e,s=>{let i=s.findIndex(t=>t.id===u.id);return i!==-1&&s.splice(i,1),s});return {...e,...r,activationTrigger:1}}},U$1=React.createContext(null);U$1.displayName="MenuContext";function C(e){let u=React.useContext(U$1);if(u===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,C),r}return u}function ye$1(e,u){return u$7(u.type,Te,e,u)}let Ie=React.Fragment;function Me(e,u){let{__demoMode:r=!1,...s}=e,i=React.useReducer(ye$1,{__demoMode:r,menuState:r?0:1,buttonRef:React.createRef(),itemsRef:React.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:t,itemsRef:o,buttonRef:a},l]=i,m=y$1(u);y$2([a,o],(g,R)=>{var p;l({type:1}),h$2(R,T$2.Loose)||(g.preventDefault(),(p=a.current)==null||p.focus());},t===0);let I=o$5(()=>{l({type:1});}),A=React.useMemo(()=>({open:t===0,close:I}),[t,I]),f={ref:m};return React.createElement(U$1.Provider,{value:i},React.createElement(s$4,{value:u$7(t,{[0]:d$3.Open,[1]:d$3.Closed})},C$1({ourProps:f,theirProps:s,slot:A,defaultTag:Ie,name:"Menu"})))}let ge="button";function Re$1(e,u){var R;let r=I$6(),{id:s=`headlessui-menu-button-${r}`,...i}=e,[t,o]=C("Menu.Button"),a=y$1(t.buttonRef,u),l=p$3(),m=o$5(p=>{switch(p.key){case o$1.Space:case o$1.Enter:case o$1.ArrowDown:p.preventDefault(),p.stopPropagation(),o({type:0}),l.nextFrame(()=>o({type:2,focus:c$4.First}));break;case o$1.ArrowUp:p.preventDefault(),p.stopPropagation(),o({type:0}),l.nextFrame(()=>o({type:2,focus:c$4.Last}));break}}),I=o$5(p=>{switch(p.key){case o$1.Space:p.preventDefault();break}}),A=o$5(p=>{if(r$
|
|
77899
|
+
var me=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(me||{}),de=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(de||{}),fe=(a=>(a[a.OpenMenu=0]="OpenMenu",a[a.CloseMenu=1]="CloseMenu",a[a.GoToItem=2]="GoToItem",a[a.Search=3]="Search",a[a.ClearSearch=4]="ClearSearch",a[a.RegisterItem=5]="RegisterItem",a[a.UnregisterItem=6]="UnregisterItem",a))(fe||{});function w(e,u=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,s=I$5(u(e.items.slice()),t=>t.dataRef.current.domRef.current),i=r?s.indexOf(r):null;return i===-1&&(i=null),{items:s,activeItemIndex:i}}let Te={[1](e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},[0](e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},[2]:(e,u)=>{var i;let r=w(e),s=f$4(u,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return {...e,...r,searchQuery:"",activeItemIndex:s,activationTrigger:(i=u.trigger)!=null?i:1}},[3]:(e,u)=>{let s=e.searchQuery!==""?0:1,i=e.searchQuery+u.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+s).concat(e.items.slice(0,e.activeItemIndex+s)):e.items).find(l=>{var m;return ((m=l.dataRef.current.textValue)==null?void 0:m.startsWith(i))&&!l.dataRef.current.disabled}),a=o?e.items.indexOf(o):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:i}:{...e,searchQuery:i,activeItemIndex:a,activationTrigger:1}},[4](e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},[5]:(e,u)=>{let r=w(e,s=>[...s,{id:u.id,dataRef:u.dataRef}]);return {...e,...r}},[6]:(e,u)=>{let r=w(e,s=>{let i=s.findIndex(t=>t.id===u.id);return i!==-1&&s.splice(i,1),s});return {...e,...r,activationTrigger:1}}},U$1=React.createContext(null);U$1.displayName="MenuContext";function C(e){let u=React.useContext(U$1);if(u===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,C),r}return u}function ye$1(e,u){return u$7(u.type,Te,e,u)}let Ie=React.Fragment;function Me(e,u){let{__demoMode:r=!1,...s}=e,i=React.useReducer(ye$1,{__demoMode:r,menuState:r?0:1,buttonRef:React.createRef(),itemsRef:React.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:t,itemsRef:o,buttonRef:a},l]=i,m=y$1(u);y$2([a,o],(g,R)=>{var p;l({type:1}),h$2(R,T$2.Loose)||(g.preventDefault(),(p=a.current)==null||p.focus());},t===0);let I=o$5(()=>{l({type:1});}),A=React.useMemo(()=>({open:t===0,close:I}),[t,I]),f={ref:m};return React.createElement(U$1.Provider,{value:i},React.createElement(s$4,{value:u$7(t,{[0]:d$3.Open,[1]:d$3.Closed})},C$1({ourProps:f,theirProps:s,slot:A,defaultTag:Ie,name:"Menu"})))}let ge="button";function Re$1(e,u){var R;let r=I$6(),{id:s=`headlessui-menu-button-${r}`,...i}=e,[t,o]=C("Menu.Button"),a=y$1(t.buttonRef,u),l=p$3(),m=o$5(p=>{switch(p.key){case o$1.Space:case o$1.Enter:case o$1.ArrowDown:p.preventDefault(),p.stopPropagation(),o({type:0}),l.nextFrame(()=>o({type:2,focus:c$4.First}));break;case o$1.ArrowUp:p.preventDefault(),p.stopPropagation(),o({type:0}),l.nextFrame(()=>o({type:2,focus:c$4.Last}));break}}),I=o$5(p=>{switch(p.key){case o$1.Space:p.preventDefault();break}}),A=o$5(p=>{if(r$3(p.currentTarget))return p.preventDefault();e.disabled||(t.menuState===0?(o({type:1}),l.nextFrame(()=>{var M;return (M=t.buttonRef.current)==null?void 0:M.focus({preventScroll:!0})})):(p.preventDefault(),o({type:0})));}),f=React.useMemo(()=>({open:t.menuState===0}),[t]),g={ref:a,id:s,type:T$1(e,t.buttonRef),"aria-haspopup":"menu","aria-controls":(R=t.itemsRef.current)==null?void 0:R.id,"aria-expanded":t.menuState===0,onKeyDown:m,onKeyUp:I,onClick:A};return C$1({ourProps:g,theirProps:i,slot:f,defaultTag:ge,name:"Menu.Button"})}let Ae="div",be=O.RenderStrategy|O.Static;function Ee(e,u){var M,b;let r=I$6(),{id:s=`headlessui-menu-items-${r}`,...i}=e,[t,o]=C("Menu.Items"),a=y$1(t.itemsRef,u),l=n$2(t.itemsRef),m=p$3(),I=u$3(),A=(()=>I!==null?(I&d$3.Open)===d$3.Open:t.menuState===0)();React.useEffect(()=>{let n=t.itemsRef.current;n&&t.menuState===0&&n!==(l==null?void 0:l.activeElement)&&n.focus({preventScroll:!0});},[t.menuState,t.itemsRef,l]),F$3({container:t.itemsRef.current,enabled:t.menuState===0,accept(n){return n.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:n.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(n){n.setAttribute("role","none");}});let f=o$5(n=>{var E,x;switch(m.dispose(),n.key){case o$1.Space:if(t.searchQuery!=="")return n.preventDefault(),n.stopPropagation(),o({type:3,value:n.key});case o$1.Enter:if(n.preventDefault(),n.stopPropagation(),o({type:1}),t.activeItemIndex!==null){let{dataRef:S}=t.items[t.activeItemIndex];(x=(E=S.current)==null?void 0:E.domRef.current)==null||x.click();}D$3(t.buttonRef.current);break;case o$1.ArrowDown:return n.preventDefault(),n.stopPropagation(),o({type:2,focus:c$4.Next});case o$1.ArrowUp:return n.preventDefault(),n.stopPropagation(),o({type:2,focus:c$4.Previous});case o$1.Home:case o$1.PageUp:return n.preventDefault(),n.stopPropagation(),o({type:2,focus:c$4.First});case o$1.End:case o$1.PageDown:return n.preventDefault(),n.stopPropagation(),o({type:2,focus:c$4.Last});case o$1.Escape:n.preventDefault(),n.stopPropagation(),o({type:1}),o$4().nextFrame(()=>{var S;return (S=t.buttonRef.current)==null?void 0:S.focus({preventScroll:!0})});break;case o$1.Tab:n.preventDefault(),n.stopPropagation(),o({type:1}),o$4().nextFrame(()=>{_$3(t.buttonRef.current,n.shiftKey?M$3.Previous:M$3.Next);});break;default:n.key.length===1&&(o({type:3,value:n.key}),m.setTimeout(()=>o({type:4}),350));break}}),g=o$5(n=>{switch(n.key){case o$1.Space:n.preventDefault();break}}),R=React.useMemo(()=>({open:t.menuState===0}),[t]),p={"aria-activedescendant":t.activeItemIndex===null||(M=t.items[t.activeItemIndex])==null?void 0:M.id,"aria-labelledby":(b=t.buttonRef.current)==null?void 0:b.id,id:s,onKeyDown:f,onKeyUp:g,role:"menu",tabIndex:0,ref:a};return C$1({ourProps:p,theirProps:i,slot:R,defaultTag:Ae,features:be,visible:A,name:"Menu.Items"})}let Se$1=React.Fragment;function xe$1(e,u){let r=I$6(),{id:s$1=`headlessui-menu-item-${r}`,disabled:i=!1,...t}=e,[o,a]=C("Menu.Item"),l=o.activeItemIndex!==null?o.items[o.activeItemIndex].id===s$1:!1,m=React.useRef(null),I=y$1(u,m);l$5(()=>{if(o.__demoMode||o.menuState!==0||!l||o.activationTrigger===0)return;let T=o$4();return T.requestAnimationFrame(()=>{var P,B;(B=(P=m.current)==null?void 0:P.scrollIntoView)==null||B.call(P,{block:"nearest"});}),T.dispose},[o.__demoMode,m,l,o.menuState,o.activationTrigger,o.activeItemIndex]);let A=s(m),f=React.useRef({disabled:i,domRef:m,get textValue(){return A()}});l$5(()=>{f.current.disabled=i;},[f,i]),l$5(()=>(a({type:5,id:s$1,dataRef:f}),()=>a({type:6,id:s$1})),[f,s$1]);let g=o$5(()=>{a({type:1});}),R=o$5(T=>{if(i)return T.preventDefault();a({type:1}),D$3(o.buttonRef.current);}),p=o$5(()=>{if(i)return a({type:2,focus:c$4.Nothing});a({type:2,focus:c$4.Specific,id:s$1});}),M=u$5(),b=o$5(T=>M.update(T)),n=o$5(T=>{M.wasMoved(T)&&(i||l||a({type:2,focus:c$4.Specific,id:s$1,trigger:0}));}),E=o$5(T=>{M.wasMoved(T)&&(i||l&&a({type:2,focus:c$4.Nothing}));}),x=React.useMemo(()=>({active:l,disabled:i,close:g}),[l,i,g]);return C$1({ourProps:{id:s$1,ref:I,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,disabled:void 0,onClick:R,onFocus:p,onPointerEnter:b,onMouseEnter:b,onPointerMove:n,onMouseMove:n,onPointerLeave:E,onMouseLeave:E},theirProps:t,slot:x,defaultTag:Se$1,name:"Menu.Item"})}let Pe$1=U$3(Me),ve=U$3(Re$1),he=U$3(Ee),De$1=U$3(xe$1),qe$1=Object.assign(Pe$1,{Button:ve,Items:he,Item:De$1});
|
|
77900
77900
|
|
|
77901
77901
|
function c(a=0){let[l,r]=React.useState(a),t=f$3(),o=React.useCallback(e=>{t.current&&r(u=>u|e);},[l,t]),m=React.useCallback(e=>Boolean(l&e),[l]),s=React.useCallback(e=>{t.current&&r(u=>u&~e);},[r,t]),g=React.useCallback(e=>{t.current&&r(u=>u^e);},[r]);return {flags:l,addFlag:o,hasFlag:m,removeFlag:s,toggleFlag:g}}
|
|
77902
77902
|
|
|
@@ -78814,62 +78814,511 @@ function truncateWithTooltip(text, length) {
|
|
|
78814
78814
|
return text.length > length ? (React.createElement(Tooltip, { trigger: "".concat(text.substring(0, length - 1)).concat(ELLIPSIS_STRING), label: text })) : (text);
|
|
78815
78815
|
}
|
|
78816
78816
|
|
|
78817
|
-
|
|
78818
|
-
|
|
78819
|
-
|
|
78820
|
-
|
|
78821
|
-
|
|
78822
|
-
|
|
78823
|
-
|
|
78824
|
-
|
|
78825
|
-
|
|
78826
|
-
|
|
78827
|
-
|
|
78828
|
-
|
|
78829
|
-
|
|
78830
|
-
|
|
78831
|
-
|
|
78832
|
-
|
|
78833
|
-
|
|
78834
|
-
|
|
78835
|
-
|
|
78836
|
-
|
|
78837
|
-
|
|
78838
|
-
|
|
78839
|
-
|
|
78840
|
-
|
|
78841
|
-
|
|
78842
|
-
|
|
78843
|
-
|
|
78844
|
-
hover: "dark:hover:s-border-action-500-dark dark:hover:s-bg-action-200-dark",
|
|
78845
|
-
disabled: "dark:s-bg-structure-0-dark dark:s-border-structure-300-dark s-cursor-default",
|
|
78846
|
-
},
|
|
78817
|
+
// packages/react/compose-refs/src/composeRefs.tsx
|
|
78818
|
+
function setRef$3(ref, value) {
|
|
78819
|
+
if (typeof ref === "function") {
|
|
78820
|
+
ref(value);
|
|
78821
|
+
} else if (ref !== null && ref !== void 0) {
|
|
78822
|
+
ref.current = value;
|
|
78823
|
+
}
|
|
78824
|
+
}
|
|
78825
|
+
function composeRefs$3(...refs) {
|
|
78826
|
+
return (node) => refs.forEach((ref) => setRef$3(ref, node));
|
|
78827
|
+
}
|
|
78828
|
+
function useComposedRefs$2(...refs) {
|
|
78829
|
+
return React__namespace.useCallback(composeRefs$3(...refs), refs);
|
|
78830
|
+
}
|
|
78831
|
+
|
|
78832
|
+
// packages/react/context/src/createContext.tsx
|
|
78833
|
+
function createContextScope$7(scopeName, createContextScopeDeps = []) {
|
|
78834
|
+
let defaultContexts = [];
|
|
78835
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
78836
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
78837
|
+
const index = defaultContexts.length;
|
|
78838
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
78839
|
+
const Provider = (props) => {
|
|
78840
|
+
const { scope, children, ...context } = props;
|
|
78841
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
78842
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
78843
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
78847
78844
|
};
|
|
78848
|
-
|
|
78849
|
-
|
|
78850
|
-
|
|
78845
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
78846
|
+
function useContext2(consumerName, scope) {
|
|
78847
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
78848
|
+
const context = React__namespace.useContext(Context);
|
|
78849
|
+
if (context) return context;
|
|
78850
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
78851
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
78852
|
+
}
|
|
78853
|
+
return [Provider, useContext2];
|
|
78854
|
+
}
|
|
78855
|
+
const createScope = () => {
|
|
78856
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
78857
|
+
return React__namespace.createContext(defaultContext);
|
|
78858
|
+
});
|
|
78859
|
+
return function useScope(scope) {
|
|
78860
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
78861
|
+
return React__namespace.useMemo(
|
|
78862
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
78863
|
+
[scope, contexts]
|
|
78864
|
+
);
|
|
78851
78865
|
};
|
|
78852
|
-
|
|
78853
|
-
|
|
78854
|
-
|
|
78855
|
-
|
|
78856
|
-
|
|
78857
|
-
|
|
78866
|
+
};
|
|
78867
|
+
createScope.scopeName = scopeName;
|
|
78868
|
+
return [createContext3, composeContextScopes$7(createScope, ...createContextScopeDeps)];
|
|
78869
|
+
}
|
|
78870
|
+
function composeContextScopes$7(...scopes) {
|
|
78871
|
+
const baseScope = scopes[0];
|
|
78872
|
+
if (scopes.length === 1) return baseScope;
|
|
78873
|
+
const createScope = () => {
|
|
78874
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
78875
|
+
useScope: createScope2(),
|
|
78876
|
+
scopeName: createScope2.scopeName
|
|
78877
|
+
}));
|
|
78878
|
+
return function useComposedScopes(overrideScopes) {
|
|
78879
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
78880
|
+
const scopeProps = useScope(overrideScopes);
|
|
78881
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
78882
|
+
return { ...nextScopes2, ...currentScope };
|
|
78883
|
+
}, {});
|
|
78884
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
78858
78885
|
};
|
|
78859
|
-
|
|
78860
|
-
|
|
78861
|
-
|
|
78886
|
+
};
|
|
78887
|
+
createScope.scopeName = baseScope.scopeName;
|
|
78888
|
+
return createScope;
|
|
78889
|
+
}
|
|
78890
|
+
|
|
78891
|
+
// packages/core/primitive/src/primitive.tsx
|
|
78892
|
+
function composeEventHandlers$3(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
78893
|
+
return function handleEvent(event) {
|
|
78894
|
+
originalEventHandler?.(event);
|
|
78895
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
78896
|
+
return ourEventHandler?.(event);
|
|
78897
|
+
}
|
|
78898
|
+
};
|
|
78899
|
+
}
|
|
78900
|
+
|
|
78901
|
+
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
78902
|
+
function useCallbackRef$4(callback) {
|
|
78903
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
78904
|
+
React__namespace.useEffect(() => {
|
|
78905
|
+
callbackRef.current = callback;
|
|
78906
|
+
});
|
|
78907
|
+
return React__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
78908
|
+
}
|
|
78909
|
+
|
|
78910
|
+
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
78911
|
+
function useControllableState$3({
|
|
78912
|
+
prop,
|
|
78913
|
+
defaultProp,
|
|
78914
|
+
onChange = () => {
|
|
78915
|
+
}
|
|
78916
|
+
}) {
|
|
78917
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$3({ defaultProp, onChange });
|
|
78918
|
+
const isControlled = prop !== void 0;
|
|
78919
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
78920
|
+
const handleChange = useCallbackRef$4(onChange);
|
|
78921
|
+
const setValue = React__namespace.useCallback(
|
|
78922
|
+
(nextValue) => {
|
|
78923
|
+
if (isControlled) {
|
|
78924
|
+
const setter = nextValue;
|
|
78925
|
+
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
78926
|
+
if (value2 !== prop) handleChange(value2);
|
|
78927
|
+
} else {
|
|
78928
|
+
setUncontrolledProp(nextValue);
|
|
78929
|
+
}
|
|
78930
|
+
},
|
|
78931
|
+
[isControlled, prop, setUncontrolledProp, handleChange]
|
|
78932
|
+
);
|
|
78933
|
+
return [value, setValue];
|
|
78934
|
+
}
|
|
78935
|
+
function useUncontrolledState$3({
|
|
78936
|
+
defaultProp,
|
|
78937
|
+
onChange
|
|
78938
|
+
}) {
|
|
78939
|
+
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
78940
|
+
const [value] = uncontrolledState;
|
|
78941
|
+
const prevValueRef = React__namespace.useRef(value);
|
|
78942
|
+
const handleChange = useCallbackRef$4(onChange);
|
|
78943
|
+
React__namespace.useEffect(() => {
|
|
78944
|
+
if (prevValueRef.current !== value) {
|
|
78945
|
+
handleChange(value);
|
|
78946
|
+
prevValueRef.current = value;
|
|
78947
|
+
}
|
|
78948
|
+
}, [value, prevValueRef, handleChange]);
|
|
78949
|
+
return uncontrolledState;
|
|
78950
|
+
}
|
|
78951
|
+
|
|
78952
|
+
// packages/react/use-previous/src/usePrevious.tsx
|
|
78953
|
+
function usePrevious(value) {
|
|
78954
|
+
const ref = React__namespace.useRef({ value, previous: value });
|
|
78955
|
+
return React__namespace.useMemo(() => {
|
|
78956
|
+
if (ref.current.value !== value) {
|
|
78957
|
+
ref.current.previous = ref.current.value;
|
|
78958
|
+
ref.current.value = value;
|
|
78959
|
+
}
|
|
78960
|
+
return ref.current.previous;
|
|
78961
|
+
}, [value]);
|
|
78962
|
+
}
|
|
78963
|
+
|
|
78964
|
+
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
78965
|
+
var useLayoutEffect2$3 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
78966
|
+
};
|
|
78967
|
+
|
|
78968
|
+
// packages/react/use-size/src/useSize.tsx
|
|
78969
|
+
function useSize$2(element) {
|
|
78970
|
+
const [size, setSize] = React__namespace.useState(void 0);
|
|
78971
|
+
useLayoutEffect2$3(() => {
|
|
78972
|
+
if (element) {
|
|
78973
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
78974
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
78975
|
+
if (!Array.isArray(entries)) {
|
|
78976
|
+
return;
|
|
78977
|
+
}
|
|
78978
|
+
if (!entries.length) {
|
|
78979
|
+
return;
|
|
78980
|
+
}
|
|
78981
|
+
const entry = entries[0];
|
|
78982
|
+
let width;
|
|
78983
|
+
let height;
|
|
78984
|
+
if ("borderBoxSize" in entry) {
|
|
78985
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
78986
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
78987
|
+
width = borderSize["inlineSize"];
|
|
78988
|
+
height = borderSize["blockSize"];
|
|
78989
|
+
} else {
|
|
78990
|
+
width = element.offsetWidth;
|
|
78991
|
+
height = element.offsetHeight;
|
|
78992
|
+
}
|
|
78993
|
+
setSize({ width, height });
|
|
78994
|
+
});
|
|
78995
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
78996
|
+
return () => resizeObserver.unobserve(element);
|
|
78997
|
+
} else {
|
|
78998
|
+
setSize(void 0);
|
|
78999
|
+
}
|
|
79000
|
+
}, [element]);
|
|
79001
|
+
return size;
|
|
79002
|
+
}
|
|
79003
|
+
|
|
79004
|
+
// packages/react/primitive/src/Primitive.tsx
|
|
79005
|
+
var NODES$5 = [
|
|
79006
|
+
"a",
|
|
79007
|
+
"button",
|
|
79008
|
+
"div",
|
|
79009
|
+
"form",
|
|
79010
|
+
"h2",
|
|
79011
|
+
"h3",
|
|
79012
|
+
"img",
|
|
79013
|
+
"input",
|
|
79014
|
+
"label",
|
|
79015
|
+
"li",
|
|
79016
|
+
"nav",
|
|
79017
|
+
"ol",
|
|
79018
|
+
"p",
|
|
79019
|
+
"span",
|
|
79020
|
+
"svg",
|
|
79021
|
+
"ul"
|
|
79022
|
+
];
|
|
79023
|
+
var Primitive$5 = NODES$5.reduce((primitive, node) => {
|
|
79024
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79025
|
+
const { asChild, ...primitiveProps } = props;
|
|
79026
|
+
const Comp = asChild ? Slot : node;
|
|
79027
|
+
if (typeof window !== "undefined") {
|
|
79028
|
+
window[Symbol.for("radix-ui")] = true;
|
|
79029
|
+
}
|
|
79030
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
79031
|
+
});
|
|
79032
|
+
Node.displayName = `Primitive.${node}`;
|
|
79033
|
+
return { ...primitive, [node]: Node };
|
|
79034
|
+
}, {});
|
|
79035
|
+
|
|
79036
|
+
var CHECKBOX_NAME = "Checkbox";
|
|
79037
|
+
var [createCheckboxContext, createCheckboxScope] = createContextScope$7(CHECKBOX_NAME);
|
|
79038
|
+
var [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
|
79039
|
+
var Checkbox$1 = React__namespace.forwardRef(
|
|
79040
|
+
(props, forwardedRef) => {
|
|
79041
|
+
const {
|
|
79042
|
+
__scopeCheckbox,
|
|
79043
|
+
name,
|
|
79044
|
+
checked: checkedProp,
|
|
79045
|
+
defaultChecked,
|
|
79046
|
+
required,
|
|
79047
|
+
disabled,
|
|
79048
|
+
value = "on",
|
|
79049
|
+
onCheckedChange,
|
|
79050
|
+
form,
|
|
79051
|
+
...checkboxProps
|
|
79052
|
+
} = props;
|
|
79053
|
+
const [button, setButton] = React__namespace.useState(null);
|
|
79054
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node) => setButton(node));
|
|
79055
|
+
const hasConsumerStoppedPropagationRef = React__namespace.useRef(false);
|
|
79056
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
79057
|
+
const [checked = false, setChecked] = useControllableState$3({
|
|
79058
|
+
prop: checkedProp,
|
|
79059
|
+
defaultProp: defaultChecked,
|
|
79060
|
+
onChange: onCheckedChange
|
|
79061
|
+
});
|
|
79062
|
+
const initialCheckedStateRef = React__namespace.useRef(checked);
|
|
79063
|
+
React__namespace.useEffect(() => {
|
|
79064
|
+
const form2 = button?.form;
|
|
79065
|
+
if (form2) {
|
|
79066
|
+
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
79067
|
+
form2.addEventListener("reset", reset);
|
|
79068
|
+
return () => form2.removeEventListener("reset", reset);
|
|
79069
|
+
}
|
|
79070
|
+
}, [button, setChecked]);
|
|
79071
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: [
|
|
79072
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
79073
|
+
Primitive$5.button,
|
|
79074
|
+
{
|
|
79075
|
+
type: "button",
|
|
79076
|
+
role: "checkbox",
|
|
79077
|
+
"aria-checked": isIndeterminate$1(checked) ? "mixed" : checked,
|
|
79078
|
+
"aria-required": required,
|
|
79079
|
+
"data-state": getState$1(checked),
|
|
79080
|
+
"data-disabled": disabled ? "" : void 0,
|
|
79081
|
+
disabled,
|
|
79082
|
+
value,
|
|
79083
|
+
...checkboxProps,
|
|
79084
|
+
ref: composedRefs,
|
|
79085
|
+
onKeyDown: composeEventHandlers$3(props.onKeyDown, (event) => {
|
|
79086
|
+
if (event.key === "Enter") event.preventDefault();
|
|
79087
|
+
}),
|
|
79088
|
+
onClick: composeEventHandlers$3(props.onClick, (event) => {
|
|
79089
|
+
setChecked((prevChecked) => isIndeterminate$1(prevChecked) ? true : !prevChecked);
|
|
79090
|
+
if (isFormControl) {
|
|
79091
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
79092
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
79093
|
+
}
|
|
79094
|
+
})
|
|
79095
|
+
}
|
|
79096
|
+
),
|
|
79097
|
+
isFormControl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
79098
|
+
BubbleInput,
|
|
79099
|
+
{
|
|
79100
|
+
control: button,
|
|
79101
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
79102
|
+
name,
|
|
79103
|
+
value,
|
|
79104
|
+
checked,
|
|
79105
|
+
required,
|
|
79106
|
+
disabled,
|
|
79107
|
+
form,
|
|
79108
|
+
style: { transform: "translateX(-100%)" },
|
|
79109
|
+
defaultChecked: isIndeterminate$1(defaultChecked) ? false : defaultChecked
|
|
79110
|
+
}
|
|
79111
|
+
)
|
|
79112
|
+
] });
|
|
79113
|
+
}
|
|
79114
|
+
);
|
|
79115
|
+
Checkbox$1.displayName = CHECKBOX_NAME;
|
|
79116
|
+
var INDICATOR_NAME$1 = "CheckboxIndicator";
|
|
79117
|
+
var CheckboxIndicator = React__namespace.forwardRef(
|
|
79118
|
+
(props, forwardedRef) => {
|
|
79119
|
+
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
79120
|
+
const context = useCheckboxContext(INDICATOR_NAME$1, __scopeCheckbox);
|
|
79121
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || isIndeterminate$1(context.state) || context.state === true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
79122
|
+
Primitive$5.span,
|
|
79123
|
+
{
|
|
79124
|
+
"data-state": getState$1(context.state),
|
|
79125
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
79126
|
+
...indicatorProps,
|
|
79127
|
+
ref: forwardedRef,
|
|
79128
|
+
style: { pointerEvents: "none", ...props.style }
|
|
79129
|
+
}
|
|
79130
|
+
) });
|
|
79131
|
+
}
|
|
79132
|
+
);
|
|
79133
|
+
CheckboxIndicator.displayName = INDICATOR_NAME$1;
|
|
79134
|
+
var BubbleInput = (props) => {
|
|
79135
|
+
const { control, checked, bubbles = true, defaultChecked, ...inputProps } = props;
|
|
79136
|
+
const ref = React__namespace.useRef(null);
|
|
79137
|
+
const prevChecked = usePrevious(checked);
|
|
79138
|
+
const controlSize = useSize$2(control);
|
|
79139
|
+
React__namespace.useEffect(() => {
|
|
79140
|
+
const input = ref.current;
|
|
79141
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
79142
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
79143
|
+
const setChecked = descriptor.set;
|
|
79144
|
+
if (prevChecked !== checked && setChecked) {
|
|
79145
|
+
const event = new Event("click", { bubbles });
|
|
79146
|
+
input.indeterminate = isIndeterminate$1(checked);
|
|
79147
|
+
setChecked.call(input, isIndeterminate$1(checked) ? false : checked);
|
|
79148
|
+
input.dispatchEvent(event);
|
|
79149
|
+
}
|
|
79150
|
+
}, [prevChecked, checked, bubbles]);
|
|
79151
|
+
const defaultCheckedRef = React__namespace.useRef(isIndeterminate$1(checked) ? false : checked);
|
|
79152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
79153
|
+
"input",
|
|
79154
|
+
{
|
|
79155
|
+
type: "checkbox",
|
|
79156
|
+
"aria-hidden": true,
|
|
79157
|
+
defaultChecked: defaultChecked ?? defaultCheckedRef.current,
|
|
79158
|
+
...inputProps,
|
|
79159
|
+
tabIndex: -1,
|
|
79160
|
+
ref,
|
|
79161
|
+
style: {
|
|
79162
|
+
...props.style,
|
|
79163
|
+
...controlSize,
|
|
79164
|
+
position: "absolute",
|
|
79165
|
+
pointerEvents: "none",
|
|
79166
|
+
opacity: 0,
|
|
79167
|
+
margin: 0
|
|
79168
|
+
}
|
|
79169
|
+
}
|
|
79170
|
+
);
|
|
79171
|
+
};
|
|
79172
|
+
function isIndeterminate$1(checked) {
|
|
79173
|
+
return checked === "indeterminate";
|
|
79174
|
+
}
|
|
79175
|
+
function getState$1(checked) {
|
|
79176
|
+
return isIndeterminate$1(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
79177
|
+
}
|
|
79178
|
+
var Root$5 = Checkbox$1;
|
|
79179
|
+
var Indicator = CheckboxIndicator;
|
|
79180
|
+
|
|
79181
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
79182
|
+
|
|
79183
|
+
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
79184
|
+
const cx = clsx;
|
|
79185
|
+
const cva = (base, config)=>{
|
|
79186
|
+
return (props)=>{
|
|
79187
|
+
var ref;
|
|
79188
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
79189
|
+
const { variants , defaultVariants } = config;
|
|
79190
|
+
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
79191
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
79192
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
79193
|
+
if (variantProp === null) return null;
|
|
79194
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
79195
|
+
return variants[variant][variantKey];
|
|
79196
|
+
});
|
|
79197
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
79198
|
+
let [key, value] = param;
|
|
79199
|
+
if (value === undefined) {
|
|
79200
|
+
return acc;
|
|
79201
|
+
}
|
|
79202
|
+
acc[key] = value;
|
|
79203
|
+
return acc;
|
|
79204
|
+
}, {});
|
|
79205
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
79206
|
+
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
79207
|
+
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
79208
|
+
let [key, value] = param;
|
|
79209
|
+
return Array.isArray(value) ? value.includes({
|
|
79210
|
+
...defaultVariants,
|
|
79211
|
+
...propsWithoutUndefined
|
|
79212
|
+
}[key]) : ({
|
|
79213
|
+
...defaultVariants,
|
|
79214
|
+
...propsWithoutUndefined
|
|
79215
|
+
})[key] === value;
|
|
79216
|
+
}) ? [
|
|
79217
|
+
...acc,
|
|
79218
|
+
cvClass,
|
|
79219
|
+
cvClassName
|
|
79220
|
+
] : acc;
|
|
79221
|
+
}, []);
|
|
79222
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
78862
79223
|
};
|
|
78863
|
-
|
|
78864
|
-
|
|
78865
|
-
|
|
78866
|
-
|
|
78867
|
-
|
|
78868
|
-
|
|
78869
|
-
|
|
78870
|
-
|
|
78871
|
-
|
|
78872
|
-
|
|
79224
|
+
};
|
|
79225
|
+
|
|
79226
|
+
// packages/react/primitive/src/Primitive.tsx
|
|
79227
|
+
var NODES$4 = [
|
|
79228
|
+
"a",
|
|
79229
|
+
"button",
|
|
79230
|
+
"div",
|
|
79231
|
+
"form",
|
|
79232
|
+
"h2",
|
|
79233
|
+
"h3",
|
|
79234
|
+
"img",
|
|
79235
|
+
"input",
|
|
79236
|
+
"label",
|
|
79237
|
+
"li",
|
|
79238
|
+
"nav",
|
|
79239
|
+
"ol",
|
|
79240
|
+
"p",
|
|
79241
|
+
"span",
|
|
79242
|
+
"svg",
|
|
79243
|
+
"ul"
|
|
79244
|
+
];
|
|
79245
|
+
var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
79246
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79247
|
+
const { asChild, ...primitiveProps } = props;
|
|
79248
|
+
const Comp = asChild ? Slot : node;
|
|
79249
|
+
if (typeof window !== "undefined") {
|
|
79250
|
+
window[Symbol.for("radix-ui")] = true;
|
|
79251
|
+
}
|
|
79252
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
79253
|
+
});
|
|
79254
|
+
Node.displayName = `Primitive.${node}`;
|
|
79255
|
+
return { ...primitive, [node]: Node };
|
|
79256
|
+
}, {});
|
|
79257
|
+
|
|
79258
|
+
var NAME$3 = "Label";
|
|
79259
|
+
var Label$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79260
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
79261
|
+
Primitive$4.label,
|
|
79262
|
+
{
|
|
79263
|
+
...props,
|
|
79264
|
+
ref: forwardedRef,
|
|
79265
|
+
onMouseDown: (event) => {
|
|
79266
|
+
const target = event.target;
|
|
79267
|
+
if (target.closest("button, input, select, textarea")) return;
|
|
79268
|
+
props.onMouseDown?.(event);
|
|
79269
|
+
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
|
79270
|
+
}
|
|
79271
|
+
}
|
|
79272
|
+
);
|
|
79273
|
+
});
|
|
79274
|
+
Label$2.displayName = NAME$3;
|
|
79275
|
+
var Root$4 = Label$2;
|
|
79276
|
+
|
|
79277
|
+
var labelVariants = cn("s-text-sm s-text-foreground s-leading-none", "peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70");
|
|
79278
|
+
var Label$1 = React__namespace.forwardRef(function (_a, ref) {
|
|
79279
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
79280
|
+
return (React__namespace.createElement(Root$4, __assign({ ref: ref, className: cn(labelVariants, className) }, props)));
|
|
79281
|
+
});
|
|
79282
|
+
Label$1.displayName = Root$4.displayName;
|
|
79283
|
+
|
|
79284
|
+
var checkboxStyles = cva(cn("s-shrink-0 s-peer s-border s-border-primary-500 s-text-foreground", "data-[state=checked]:s-text-white data-[state=checked]:s-text-foreground", "focus-visible:s-ring-ring s-ring-offset-background focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2", "disabled:s-cursor-not-allowed disabled:s-opacity-50"), {
|
|
79285
|
+
variants: {
|
|
79286
|
+
checked: {
|
|
79287
|
+
true: "data-[state=checked]:s-bg-action-500",
|
|
79288
|
+
partial: "data-[state=checked]:s-bg-muted-foreground",
|
|
79289
|
+
false: "",
|
|
79290
|
+
},
|
|
79291
|
+
size: {
|
|
79292
|
+
xs: "s-h-4 s-w-4 s-rounded",
|
|
79293
|
+
sm: "s-h-5 s-w-5 s-rounded-md",
|
|
79294
|
+
},
|
|
79295
|
+
},
|
|
79296
|
+
defaultVariants: {
|
|
79297
|
+
size: "sm",
|
|
79298
|
+
checked: false,
|
|
79299
|
+
},
|
|
79300
|
+
});
|
|
79301
|
+
var Checkbox = React.forwardRef(function (_a, ref) {
|
|
79302
|
+
var className = _a.className, size = _a.size, checked = _a.checked, props = __rest(_a, ["className", "size", "checked"]);
|
|
79303
|
+
return (React.createElement(Root$5, __assign({ ref: ref, className: cn(checkboxStyles({ checked: checked, size: size }), className), checked: checked === "partial" ? "indeterminate" : checked }, props),
|
|
79304
|
+
React.createElement(Indicator, { className: "s-flex s-items-center s-justify-center s-text-current" },
|
|
79305
|
+
React.createElement("span", { className: cn(size === "xs" ? "-s-mt-px" : "") },
|
|
79306
|
+
React.createElement(Icon, { size: "xs", visual: checked === "partial" ? DashIcon : CheckIcon })))));
|
|
79307
|
+
});
|
|
79308
|
+
Checkbox.displayName = Root$5.displayName;
|
|
79309
|
+
function CheckboxWithText(_a) {
|
|
79310
|
+
var text = _a.text, props = __rest(_a, ["text"]);
|
|
79311
|
+
return (React.createElement("div", { className: "s-items-top s-flex s-items-center s-space-x-2" },
|
|
79312
|
+
React.createElement(Checkbox, __assign({}, props)),
|
|
79313
|
+
React.createElement(Label$1, { className: "s-text-sm s-leading-none peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70" }, text)));
|
|
79314
|
+
}
|
|
79315
|
+
function CheckBoxWithTextAndDescription(_a) {
|
|
79316
|
+
var text = _a.text, description = _a.description, props = __rest(_a, ["text", "description"]);
|
|
79317
|
+
return (React.createElement("div", { className: "s-items-top s-flex s-space-x-2" },
|
|
79318
|
+
React.createElement(Checkbox, __assign({}, props)),
|
|
79319
|
+
React.createElement("div", { className: "s-grid s-gap-1.5 s-leading-none" },
|
|
79320
|
+
React.createElement(Label$1, { className: "s-text-sm s-leading-none peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70" }, text),
|
|
79321
|
+
React.createElement("p", { className: "s-text-xs s-text-muted-foreground" }, description))));
|
|
78873
79322
|
}
|
|
78874
79323
|
|
|
78875
79324
|
var sizeClasses$2 = {
|
|
@@ -113441,64 +113890,6 @@ function IconToggleButton(_a) {
|
|
|
113441
113890
|
return tooltip ? (React.createElement(Tooltip, { trigger: IconButtonToggleContent, label: tooltip, side: tooltipPosition })) : (IconButtonToggleContent);
|
|
113442
113891
|
}
|
|
113443
113892
|
|
|
113444
|
-
// packages/react/primitive/src/Primitive.tsx
|
|
113445
|
-
var NODES$4 = [
|
|
113446
|
-
"a",
|
|
113447
|
-
"button",
|
|
113448
|
-
"div",
|
|
113449
|
-
"form",
|
|
113450
|
-
"h2",
|
|
113451
|
-
"h3",
|
|
113452
|
-
"img",
|
|
113453
|
-
"input",
|
|
113454
|
-
"label",
|
|
113455
|
-
"li",
|
|
113456
|
-
"nav",
|
|
113457
|
-
"ol",
|
|
113458
|
-
"p",
|
|
113459
|
-
"span",
|
|
113460
|
-
"svg",
|
|
113461
|
-
"ul"
|
|
113462
|
-
];
|
|
113463
|
-
var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
113464
|
-
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
113465
|
-
const { asChild, ...primitiveProps } = props;
|
|
113466
|
-
const Comp = asChild ? Slot : node;
|
|
113467
|
-
if (typeof window !== "undefined") {
|
|
113468
|
-
window[Symbol.for("radix-ui")] = true;
|
|
113469
|
-
}
|
|
113470
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
113471
|
-
});
|
|
113472
|
-
Node.displayName = `Primitive.${node}`;
|
|
113473
|
-
return { ...primitive, [node]: Node };
|
|
113474
|
-
}, {});
|
|
113475
|
-
|
|
113476
|
-
var NAME$3 = "Label";
|
|
113477
|
-
var Label$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
113478
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
113479
|
-
Primitive$4.label,
|
|
113480
|
-
{
|
|
113481
|
-
...props,
|
|
113482
|
-
ref: forwardedRef,
|
|
113483
|
-
onMouseDown: (event) => {
|
|
113484
|
-
const target = event.target;
|
|
113485
|
-
if (target.closest("button, input, select, textarea")) return;
|
|
113486
|
-
props.onMouseDown?.(event);
|
|
113487
|
-
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
|
113488
|
-
}
|
|
113489
|
-
}
|
|
113490
|
-
);
|
|
113491
|
-
});
|
|
113492
|
-
Label$2.displayName = NAME$3;
|
|
113493
|
-
var Root$4 = Label$2;
|
|
113494
|
-
|
|
113495
|
-
var labelVariants = cn("s-text-sm s-text-foreground s-leading-none", "peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70");
|
|
113496
|
-
var Label$1 = React__namespace.forwardRef(function (_a, ref) {
|
|
113497
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
113498
|
-
return (React__namespace.createElement(Root$4, __assign({ ref: ref, className: cn(labelVariants, className) }, props)));
|
|
113499
|
-
});
|
|
113500
|
-
Label$1.displayName = Root$4.displayName;
|
|
113501
|
-
|
|
113502
113893
|
var inputStyleClasses = cn("s-text-sm s-bg-background s-rounded-xl s-border s-border-border-dark s-flex s-h-9 s-w-full s-px-3 s-py-1.5 ", "file:s-border-0 file:s-bg-transparent file:s-text-sm file:s-font-medium file:s-text-foreground", "placeholder:s-text-muted-foreground", "focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2 focus-visible:s-ring-ring focus-visible:s-border-primary-400", "disabled:s-cursor-not-allowed disabled:s-opacity-50 disabled:s-text-muted-foreground");
|
|
113503
113894
|
var Input = React.forwardRef(function (_a, ref) {
|
|
113504
113895
|
var className = _a.className, error = _a.error, value = _a.value, label = _a.label, _b = _a.showErrorLabel, showErrorLabel = _b === void 0 ? false : _b, props = __rest(_a, ["className", "error", "value", "label", "showErrorLabel"]);
|
|
@@ -141085,11 +141476,13 @@ exports.ChatBubbleLeftRightIcon = SvgChatBubbleLeftRight$3;
|
|
|
141085
141476
|
exports.ChatBubbleLeftRightStrokeIcon = SvgChatBubbleLeftRight$1;
|
|
141086
141477
|
exports.ChatBubbleThoughtIcon = SvgChatBubbleThought$3;
|
|
141087
141478
|
exports.ChatBubbleThoughtStrokeIcon = SvgChatBubbleThought$1;
|
|
141479
|
+
exports.CheckBoxWithTextAndDescription = CheckBoxWithTextAndDescription;
|
|
141088
141480
|
exports.CheckCircleIcon = CheckCircleIcon;
|
|
141089
141481
|
exports.CheckCircleStrokeIcon = SvgCheckCircle$1;
|
|
141090
141482
|
exports.CheckIcon = CheckIcon;
|
|
141091
141483
|
exports.CheckStrokeIcon = SvgCheck$1;
|
|
141092
141484
|
exports.Checkbox = Checkbox;
|
|
141485
|
+
exports.CheckboxWithText = CheckboxWithText;
|
|
141093
141486
|
exports.ChevronDoubleLeftIcon = SvgChevronDoubleLeft$3;
|
|
141094
141487
|
exports.ChevronDoubleLeftStrokeIcon = SvgChevronDoubleLeft$1;
|
|
141095
141488
|
exports.ChevronDoubleRightIcon = SvgChevronDoubleRight$3;
|