dash-ui-kit 1.0.5 → 1.0.8
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/react/components/badge/index.d.ts +33 -0
- package/dist/react/components/icons/index.d.ts +7 -0
- package/dist/react/components/index.d.ts +2 -1
- package/dist/react/components/input/index.d.ts +4 -3
- package/dist/react/components/overlayMenu/index.d.ts +2 -2
- package/dist/react/components/overlaySelect/index.d.ts +2 -2
- package/dist/react/components/select/index.d.ts +1 -1
- package/dist/react/components/switch/index.d.ts +1 -1
- package/dist/react/components/text/index.d.ts +2 -2
- package/dist/react/components/textarea/index.d.ts +1 -1
- package/dist/react/components/valueCard/index.d.ts +1 -1
- package/dist/react/index.cjs.js +1583 -304
- package/dist/react/index.cjs.js.map +1 -1
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.esm.js +1576 -305
- package/dist/react/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +2 -1
package/dist/react/index.esm.js
CHANGED
|
@@ -149,7 +149,7 @@ function createSlotClone(ownerName) {
|
|
|
149
149
|
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
150
150
|
const { children, ...slotProps } = props;
|
|
151
151
|
if (React.isValidElement(children)) {
|
|
152
|
-
const childrenRef = getElementRef$
|
|
152
|
+
const childrenRef = getElementRef$3(children);
|
|
153
153
|
const props2 = mergeProps(slotProps, children.props);
|
|
154
154
|
if (children.type !== React.Fragment) {
|
|
155
155
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
@@ -189,7 +189,7 @@ function mergeProps(slotProps, childProps) {
|
|
|
189
189
|
}
|
|
190
190
|
return { ...slotProps, ...overrideProps };
|
|
191
191
|
}
|
|
192
|
-
function getElementRef$
|
|
192
|
+
function getElementRef$3(element) {
|
|
193
193
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
194
194
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
195
195
|
if (mayWarn) {
|
|
@@ -267,7 +267,7 @@ function createCollection(name) {
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
// src/primitive.tsx
|
|
270
|
-
function composeEventHandlers$
|
|
270
|
+
function composeEventHandlers$2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
271
271
|
return function handleEvent(event) {
|
|
272
272
|
originalEventHandler?.(event);
|
|
273
273
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -383,7 +383,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
383
383
|
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
function useStateMachine$
|
|
386
|
+
function useStateMachine$2(initialState, machine) {
|
|
387
387
|
return React.useReducer((state, event) => {
|
|
388
388
|
const nextState = machine[state][event];
|
|
389
389
|
return nextState ?? state;
|
|
@@ -391,22 +391,22 @@ function useStateMachine$1(initialState, machine) {
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
// src/presence.tsx
|
|
394
|
-
var Presence$
|
|
394
|
+
var Presence$2 = (props) => {
|
|
395
395
|
const { present, children } = props;
|
|
396
|
-
const presence = usePresence$
|
|
396
|
+
const presence = usePresence$2(present);
|
|
397
397
|
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
|
|
398
|
-
const ref = useComposedRefs(presence.ref, getElementRef$
|
|
398
|
+
const ref = useComposedRefs(presence.ref, getElementRef$2(child));
|
|
399
399
|
const forceMount = typeof children === "function";
|
|
400
400
|
return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
|
|
401
401
|
};
|
|
402
|
-
Presence$
|
|
403
|
-
function usePresence$
|
|
402
|
+
Presence$2.displayName = "Presence";
|
|
403
|
+
function usePresence$2(present) {
|
|
404
404
|
const [node, setNode] = React.useState();
|
|
405
405
|
const stylesRef = React.useRef(null);
|
|
406
406
|
const prevPresentRef = React.useRef(present);
|
|
407
407
|
const prevAnimationNameRef = React.useRef("none");
|
|
408
408
|
const initialState = present ? "mounted" : "unmounted";
|
|
409
|
-
const [state, send] = useStateMachine$
|
|
409
|
+
const [state, send] = useStateMachine$2(initialState, {
|
|
410
410
|
mounted: {
|
|
411
411
|
UNMOUNT: "unmounted",
|
|
412
412
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -420,7 +420,7 @@ function usePresence$1(present) {
|
|
|
420
420
|
}
|
|
421
421
|
});
|
|
422
422
|
React.useEffect(() => {
|
|
423
|
-
const currentAnimationName = getAnimationName$
|
|
423
|
+
const currentAnimationName = getAnimationName$2(stylesRef.current);
|
|
424
424
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
425
425
|
}, [state]);
|
|
426
426
|
useLayoutEffect2(() => {
|
|
@@ -429,7 +429,7 @@ function usePresence$1(present) {
|
|
|
429
429
|
const hasPresentChanged = wasPresent !== present;
|
|
430
430
|
if (hasPresentChanged) {
|
|
431
431
|
const prevAnimationName = prevAnimationNameRef.current;
|
|
432
|
-
const currentAnimationName = getAnimationName$
|
|
432
|
+
const currentAnimationName = getAnimationName$2(styles);
|
|
433
433
|
if (present) {
|
|
434
434
|
send("MOUNT");
|
|
435
435
|
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
@@ -450,7 +450,7 @@ function usePresence$1(present) {
|
|
|
450
450
|
let timeoutId;
|
|
451
451
|
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
452
452
|
const handleAnimationEnd = (event) => {
|
|
453
|
-
const currentAnimationName = getAnimationName$
|
|
453
|
+
const currentAnimationName = getAnimationName$2(stylesRef.current);
|
|
454
454
|
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
|
455
455
|
if (event.target === node && isCurrentAnimation) {
|
|
456
456
|
send("ANIMATION_END");
|
|
@@ -467,7 +467,7 @@ function usePresence$1(present) {
|
|
|
467
467
|
};
|
|
468
468
|
const handleAnimationStart = (event) => {
|
|
469
469
|
if (event.target === node) {
|
|
470
|
-
prevAnimationNameRef.current = getAnimationName$
|
|
470
|
+
prevAnimationNameRef.current = getAnimationName$2(stylesRef.current);
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
473
|
node.addEventListener("animationstart", handleAnimationStart);
|
|
@@ -491,10 +491,10 @@ function usePresence$1(present) {
|
|
|
491
491
|
}, [])
|
|
492
492
|
};
|
|
493
493
|
}
|
|
494
|
-
function getAnimationName$
|
|
494
|
+
function getAnimationName$2(styles) {
|
|
495
495
|
return styles?.animationName || "none";
|
|
496
496
|
}
|
|
497
|
-
function getElementRef$
|
|
497
|
+
function getElementRef$2(element) {
|
|
498
498
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
499
499
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
500
500
|
if (mayWarn) {
|
|
@@ -510,11 +510,11 @@ function getElementRef$1(element) {
|
|
|
510
510
|
|
|
511
511
|
// packages/react/id/src/id.tsx
|
|
512
512
|
var useReactId = React[" useId ".trim().toString()] || (() => void 0);
|
|
513
|
-
var count$
|
|
513
|
+
var count$2 = 0;
|
|
514
514
|
function useId(deterministicId) {
|
|
515
515
|
const [id, setId] = React.useState(useReactId());
|
|
516
516
|
useLayoutEffect2(() => {
|
|
517
|
-
setId((reactId) => reactId ?? String(count$
|
|
517
|
+
setId((reactId) => reactId ?? String(count$2++));
|
|
518
518
|
}, [deterministicId]);
|
|
519
519
|
return (id ? `radix-${id}` : "");
|
|
520
520
|
}
|
|
@@ -549,7 +549,7 @@ var Collapsible = React.forwardRef(
|
|
|
549
549
|
children: /* @__PURE__ */ jsx(
|
|
550
550
|
Primitive.div,
|
|
551
551
|
{
|
|
552
|
-
"data-state": getState$
|
|
552
|
+
"data-state": getState$3(open),
|
|
553
553
|
"data-disabled": disabled ? "" : void 0,
|
|
554
554
|
...collapsibleProps,
|
|
555
555
|
ref: forwardedRef
|
|
@@ -560,40 +560,40 @@ var Collapsible = React.forwardRef(
|
|
|
560
560
|
}
|
|
561
561
|
);
|
|
562
562
|
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
563
|
-
var TRIGGER_NAME$
|
|
563
|
+
var TRIGGER_NAME$5 = "CollapsibleTrigger";
|
|
564
564
|
var CollapsibleTrigger = React.forwardRef(
|
|
565
565
|
(props, forwardedRef) => {
|
|
566
566
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
567
|
-
const context = useCollapsibleContext(TRIGGER_NAME$
|
|
567
|
+
const context = useCollapsibleContext(TRIGGER_NAME$5, __scopeCollapsible);
|
|
568
568
|
return /* @__PURE__ */ jsx(
|
|
569
569
|
Primitive.button,
|
|
570
570
|
{
|
|
571
571
|
type: "button",
|
|
572
572
|
"aria-controls": context.contentId,
|
|
573
573
|
"aria-expanded": context.open || false,
|
|
574
|
-
"data-state": getState$
|
|
574
|
+
"data-state": getState$3(context.open),
|
|
575
575
|
"data-disabled": context.disabled ? "" : void 0,
|
|
576
576
|
disabled: context.disabled,
|
|
577
577
|
...triggerProps,
|
|
578
578
|
ref: forwardedRef,
|
|
579
|
-
onClick: composeEventHandlers$
|
|
579
|
+
onClick: composeEventHandlers$2(props.onClick, context.onOpenToggle)
|
|
580
580
|
}
|
|
581
581
|
);
|
|
582
582
|
}
|
|
583
583
|
);
|
|
584
|
-
CollapsibleTrigger.displayName = TRIGGER_NAME$
|
|
585
|
-
var CONTENT_NAME$
|
|
584
|
+
CollapsibleTrigger.displayName = TRIGGER_NAME$5;
|
|
585
|
+
var CONTENT_NAME$7 = "CollapsibleContent";
|
|
586
586
|
var CollapsibleContent = React.forwardRef(
|
|
587
587
|
(props, forwardedRef) => {
|
|
588
588
|
const { forceMount, ...contentProps } = props;
|
|
589
|
-
const context = useCollapsibleContext(CONTENT_NAME$
|
|
590
|
-
return /* @__PURE__ */ jsx(Presence$
|
|
589
|
+
const context = useCollapsibleContext(CONTENT_NAME$7, props.__scopeCollapsible);
|
|
590
|
+
return /* @__PURE__ */ jsx(Presence$2, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
591
591
|
}
|
|
592
592
|
);
|
|
593
|
-
CollapsibleContent.displayName = CONTENT_NAME$
|
|
593
|
+
CollapsibleContent.displayName = CONTENT_NAME$7;
|
|
594
594
|
var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
595
595
|
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
596
|
-
const context = useCollapsibleContext(CONTENT_NAME$
|
|
596
|
+
const context = useCollapsibleContext(CONTENT_NAME$7, __scopeCollapsible);
|
|
597
597
|
const [isPresent, setIsPresent] = React.useState(present);
|
|
598
598
|
const ref = React.useRef(null);
|
|
599
599
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
@@ -630,7 +630,7 @@ var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
630
630
|
return /* @__PURE__ */ jsx(
|
|
631
631
|
Primitive.div,
|
|
632
632
|
{
|
|
633
|
-
"data-state": getState$
|
|
633
|
+
"data-state": getState$3(context.open),
|
|
634
634
|
"data-disabled": context.disabled ? "" : void 0,
|
|
635
635
|
id: context.contentId,
|
|
636
636
|
hidden: !isOpen,
|
|
@@ -645,12 +645,12 @@ var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
645
645
|
}
|
|
646
646
|
);
|
|
647
647
|
});
|
|
648
|
-
function getState$
|
|
648
|
+
function getState$3(open) {
|
|
649
649
|
return open ? "open" : "closed";
|
|
650
650
|
}
|
|
651
651
|
var Root$3 = Collapsible;
|
|
652
|
-
var Trigger$
|
|
653
|
-
var Content$
|
|
652
|
+
var Trigger$4 = CollapsibleTrigger;
|
|
653
|
+
var Content$4 = CollapsibleContent;
|
|
654
654
|
|
|
655
655
|
// packages/react/direction/src/direction.tsx
|
|
656
656
|
var DirectionContext = React.createContext(void 0);
|
|
@@ -751,7 +751,7 @@ var AccordionImpl = React__default.forwardRef(
|
|
|
751
751
|
const getItems = useCollection$2(__scopeAccordion);
|
|
752
752
|
const direction = useDirection(dir);
|
|
753
753
|
const isDirectionLTR = direction === "ltr";
|
|
754
|
-
const handleKeyDown = composeEventHandlers$
|
|
754
|
+
const handleKeyDown = composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
755
755
|
if (!ACCORDION_KEYS.includes(event.key)) return;
|
|
756
756
|
const target = event.target;
|
|
757
757
|
const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);
|
|
@@ -855,7 +855,7 @@ var AccordionItem = React__default.forwardRef(
|
|
|
855
855
|
Root$3,
|
|
856
856
|
{
|
|
857
857
|
"data-orientation": accordionContext.orientation,
|
|
858
|
-
"data-state": getState$
|
|
858
|
+
"data-state": getState$2(open),
|
|
859
859
|
...collapsibleScope,
|
|
860
860
|
...accordionItemProps,
|
|
861
861
|
ref: forwardedRef,
|
|
@@ -885,7 +885,7 @@ var AccordionHeader = React__default.forwardRef(
|
|
|
885
885
|
Primitive.h3,
|
|
886
886
|
{
|
|
887
887
|
"data-orientation": accordionContext.orientation,
|
|
888
|
-
"data-state": getState$
|
|
888
|
+
"data-state": getState$2(itemContext.open),
|
|
889
889
|
"data-disabled": itemContext.disabled ? "" : void 0,
|
|
890
890
|
...headerProps,
|
|
891
891
|
ref: forwardedRef
|
|
@@ -894,16 +894,16 @@ var AccordionHeader = React__default.forwardRef(
|
|
|
894
894
|
}
|
|
895
895
|
);
|
|
896
896
|
AccordionHeader.displayName = HEADER_NAME;
|
|
897
|
-
var TRIGGER_NAME$
|
|
897
|
+
var TRIGGER_NAME$4 = "AccordionTrigger";
|
|
898
898
|
var AccordionTrigger = React__default.forwardRef(
|
|
899
899
|
(props, forwardedRef) => {
|
|
900
900
|
const { __scopeAccordion, ...triggerProps } = props;
|
|
901
901
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
902
|
-
const itemContext = useAccordionItemContext(TRIGGER_NAME$
|
|
903
|
-
const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME$
|
|
902
|
+
const itemContext = useAccordionItemContext(TRIGGER_NAME$4, __scopeAccordion);
|
|
903
|
+
const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME$4, __scopeAccordion);
|
|
904
904
|
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
905
905
|
return /* @__PURE__ */ jsx(Collection$2.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
|
|
906
|
-
Trigger$
|
|
906
|
+
Trigger$4,
|
|
907
907
|
{
|
|
908
908
|
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
|
|
909
909
|
"data-orientation": accordionContext.orientation,
|
|
@@ -915,16 +915,16 @@ var AccordionTrigger = React__default.forwardRef(
|
|
|
915
915
|
) });
|
|
916
916
|
}
|
|
917
917
|
);
|
|
918
|
-
AccordionTrigger.displayName = TRIGGER_NAME$
|
|
919
|
-
var CONTENT_NAME$
|
|
918
|
+
AccordionTrigger.displayName = TRIGGER_NAME$4;
|
|
919
|
+
var CONTENT_NAME$6 = "AccordionContent";
|
|
920
920
|
var AccordionContent = React__default.forwardRef(
|
|
921
921
|
(props, forwardedRef) => {
|
|
922
922
|
const { __scopeAccordion, ...contentProps } = props;
|
|
923
923
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
924
|
-
const itemContext = useAccordionItemContext(CONTENT_NAME$
|
|
924
|
+
const itemContext = useAccordionItemContext(CONTENT_NAME$6, __scopeAccordion);
|
|
925
925
|
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
926
926
|
return /* @__PURE__ */ jsx(
|
|
927
|
-
Content$
|
|
927
|
+
Content$4,
|
|
928
928
|
{
|
|
929
929
|
role: "region",
|
|
930
930
|
"aria-labelledby": itemContext.triggerId,
|
|
@@ -941,14 +941,14 @@ var AccordionContent = React__default.forwardRef(
|
|
|
941
941
|
);
|
|
942
942
|
}
|
|
943
943
|
);
|
|
944
|
-
AccordionContent.displayName = CONTENT_NAME$
|
|
945
|
-
function getState$
|
|
944
|
+
AccordionContent.displayName = CONTENT_NAME$6;
|
|
945
|
+
function getState$2(open) {
|
|
946
946
|
return open ? "open" : "closed";
|
|
947
947
|
}
|
|
948
|
-
var Root2$
|
|
948
|
+
var Root2$5 = Accordion$1;
|
|
949
949
|
var Item$2 = AccordionItem;
|
|
950
950
|
var Trigger2 = AccordionTrigger;
|
|
951
|
-
var Content2$
|
|
951
|
+
var Content2$2 = AccordionContent;
|
|
952
952
|
|
|
953
953
|
const ThemeContext = /*#__PURE__*/createContext(undefined);
|
|
954
954
|
/**
|
|
@@ -1780,6 +1780,217 @@ const CheckmarkIcon = ({
|
|
|
1780
1780
|
fill: 'currentColor'
|
|
1781
1781
|
})
|
|
1782
1782
|
});
|
|
1783
|
+
const FingerprintIcon = ({
|
|
1784
|
+
color = '#4C7EFF',
|
|
1785
|
+
size = 16,
|
|
1786
|
+
className = '',
|
|
1787
|
+
onClick
|
|
1788
|
+
}) => jsxs("svg", {
|
|
1789
|
+
width: size,
|
|
1790
|
+
height: size * 18 / 16,
|
|
1791
|
+
viewBox: '0 0 16 18',
|
|
1792
|
+
fill: 'none',
|
|
1793
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
1794
|
+
className: className,
|
|
1795
|
+
onClick: onClick,
|
|
1796
|
+
color: color,
|
|
1797
|
+
children: [jsx("g", {
|
|
1798
|
+
clipPath: 'url(#clip0_344_10)',
|
|
1799
|
+
children: jsx("path", {
|
|
1800
|
+
d: 'M7.49902 10.7754C7.49902 10.4994 7.72307 10.2756 7.99902 10.2754C8.27517 10.2754 8.49902 10.4992 8.49902 10.7754C8.49919 13.2206 10.3867 15.1621 12.666 15.1621C12.7316 15.1621 12.7771 15.1568 12.8877 15.1504C13.1632 15.1344 13.3998 15.3446 13.416 15.6201C13.432 15.8957 13.2219 16.1323 12.9463 16.1484C12.8892 16.1518 12.7698 16.1621 12.666 16.1621C9.7913 16.1621 7.49919 13.7288 7.49902 10.7754ZM9.83301 10.7754C9.83301 9.67981 8.99005 8.83105 7.99902 8.83105C7.00815 8.83115 6.16602 9.67988 6.16602 10.7754C6.16615 13.2329 7.40072 15.3789 9.24219 16.5811C9.47341 16.732 9.53863 17.0422 9.3877 17.2734C9.23675 17.5047 8.92654 17.5699 8.69531 17.4189C6.57168 16.0326 5.16615 13.5716 5.16602 10.7754C5.16602 9.17145 6.41301 7.83115 7.99902 7.83105C9.58521 7.83105 10.833 9.1714 10.833 10.7754C10.8332 11.8706 11.6753 12.7185 12.666 12.7188C13.6569 12.7188 14.4998 11.8708 14.5 10.7754C14.5 6.98027 11.5681 3.94339 8 3.94336C4.43197 3.94336 1.5 6.98025 1.5 10.7754C1.50003 11.642 1.59311 12.4863 1.76367 13.3008C1.82027 13.5711 1.64626 13.836 1.37598 13.8926C1.1058 13.949 0.840761 13.776 0.78418 13.5059C0.60006 12.6266 0.500029 11.7135 0.5 10.7754C0.5 6.47198 3.83668 2.94336 8 2.94336C12.1634 2.94339 15.5 6.47199 15.5 10.7754C15.4998 12.3792 14.252 13.7188 12.666 13.7188C11.0801 13.7185 9.83322 12.3791 9.83301 10.7754ZM12.1641 10.7754C12.1641 8.33008 10.2774 6.38782 7.99805 6.3877C5.71856 6.3877 3.83105 8.33001 3.83105 10.7754C3.83114 12.7587 4.42559 14.5927 5.43359 16.0986C5.5871 16.328 5.52599 16.6383 5.29688 16.792C5.06741 16.9456 4.75615 16.8847 4.60254 16.6553C3.48649 14.988 2.83114 12.9608 2.83105 10.7754C2.83105 7.82181 5.1232 5.3877 7.99805 5.3877C10.8728 5.38782 13.1641 7.82189 13.1641 10.7754C13.1638 11.0513 12.9401 11.2754 12.6641 11.2754C12.3881 11.2753 12.1643 11.0513 12.1641 10.7754ZM7.99902 0.5C10.7552 0.500054 13.2178 1.77254 14.8965 3.76855C15.0742 3.9799 15.0473 4.2959 14.8359 4.47363C14.6246 4.65118 14.3095 4.62331 14.1318 4.41211C12.6279 2.62378 10.4372 1.50005 7.99902 1.5C5.5607 1.5 3.37008 2.62381 1.86621 4.41211C1.6886 4.62332 1.37345 4.65099 1.16211 4.47363C0.950784 4.29592 0.922919 3.9799 1.10059 3.76855C2.77924 1.77236 5.24256 0.5 7.99902 0.5Z',
|
|
1801
|
+
fill: 'currentColor'
|
|
1802
|
+
})
|
|
1803
|
+
}), jsx("defs", {
|
|
1804
|
+
children: jsx("clipPath", {
|
|
1805
|
+
id: 'clip0_344_10',
|
|
1806
|
+
children: jsx("rect", {
|
|
1807
|
+
width: '15',
|
|
1808
|
+
height: '17.0003',
|
|
1809
|
+
fill: 'white',
|
|
1810
|
+
transform: 'translate(0.5 0.5)'
|
|
1811
|
+
})
|
|
1812
|
+
})
|
|
1813
|
+
})]
|
|
1814
|
+
});
|
|
1815
|
+
const FaceIcon = ({
|
|
1816
|
+
color = '#4C7EFF',
|
|
1817
|
+
size = 16,
|
|
1818
|
+
className = '',
|
|
1819
|
+
onClick
|
|
1820
|
+
}) => jsxs("svg", {
|
|
1821
|
+
width: size,
|
|
1822
|
+
height: size,
|
|
1823
|
+
viewBox: '0 0 16 16',
|
|
1824
|
+
fill: 'none',
|
|
1825
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
1826
|
+
className: className,
|
|
1827
|
+
onClick: onClick,
|
|
1828
|
+
color: color,
|
|
1829
|
+
children: [jsx("g", {
|
|
1830
|
+
clipPath: 'url(#clip0_344_11)',
|
|
1831
|
+
children: jsx("path", {
|
|
1832
|
+
d: 'M0.5 13.4443V11.8887C0.500117 11.6126 0.72393 11.3887 1 11.3887C1.27607 11.3887 1.49988 11.6126 1.5 11.8887V13.4443C1.5 14.0273 1.97269 14.5 2.55566 14.5H4.11133C4.38737 14.5001 4.61133 14.7239 4.61133 15C4.61133 15.2761 4.38737 15.4999 4.11133 15.5H2.55566C1.42042 15.5 0.5 14.5796 0.5 13.4443ZM14.5 13.4443V11.8887C14.5001 11.6126 14.7239 11.3887 15 11.3887C15.2761 11.3887 15.4999 11.6126 15.5 11.8887V13.4443C15.5 14.5796 14.5796 15.5 13.4443 15.5H11.8887C11.6126 15.4999 11.3887 15.2761 11.3887 15C11.3887 14.7239 11.6126 14.5001 11.8887 14.5H13.4443C14.0273 14.5 14.5 14.0273 14.5 13.4443ZM12.167 8C12.167 5.69881 10.3012 3.83301 8 3.83301C5.69881 3.83301 3.83301 5.69881 3.83301 8C3.83301 10.3012 5.69881 12.167 8 12.167C10.3012 12.167 12.167 10.3012 12.167 8ZM9.53516 8.55859C9.70911 8.40443 9.97277 8.3884 10.166 8.5332C10.3869 8.69889 10.4323 9.01248 10.2666 9.2334L9.86621 8.93262C10.2294 9.205 10.2636 9.23094 10.2666 9.2334L10.2637 9.23633C10.2627 9.23759 10.262 9.23953 10.2607 9.24121C10.2581 9.24469 10.2541 9.24874 10.25 9.25391C10.2418 9.2643 10.2307 9.2784 10.2168 9.29492C10.189 9.32801 10.1497 9.37253 10.0996 9.4248C9.99965 9.52911 9.85378 9.66639 9.66504 9.80371C9.28904 10.0772 8.72095 10.3661 8 10.3662C7.2789 10.3662 6.71101 10.0772 6.33496 9.80371C6.14601 9.66628 5.99945 9.52919 5.89941 9.4248C5.8493 9.3725 5.80999 9.328 5.78223 9.29492C5.76831 9.27835 5.75726 9.26431 5.74902 9.25391C5.74508 9.24892 5.74189 9.24462 5.73926 9.24121C5.73791 9.23947 5.73634 9.23762 5.73535 9.23633L5.73438 9.23438L5.7334 9.2334C5.56773 9.01251 5.61215 8.6989 5.83301 8.5332C6.05389 8.36754 6.3675 8.41199 6.5332 8.63281C6.53579 8.63608 6.54133 8.64243 6.54883 8.65137C6.56387 8.66929 6.58845 8.69831 6.62207 8.7334C6.6897 8.80392 6.79138 8.89948 6.92285 8.99512C7.18846 9.18829 7.55443 9.36621 8 9.36621C8.44541 9.36613 8.81062 9.18823 9.07617 8.99512C9.20793 8.89929 9.31027 8.80399 9.37793 8.7334C9.41155 8.69831 9.43613 8.66929 9.45117 8.65137C9.45853 8.64259 9.46326 8.63604 9.46582 8.63281L9.4668 8.63184L9.53516 8.55859ZM6.6748 5.87012C7.04474 5.90742 7.33383 6.21987 7.33398 6.59961C7.33398 7.00454 7.00548 7.33286 6.60059 7.33301C6.22088 7.33301 5.90862 7.04465 5.87109 6.6748L5.86719 6.59961L5.87109 6.52539C5.90846 6.15538 6.22076 5.86621 6.60059 5.86621L6.6748 5.87012ZM9.47461 5.87012C9.84447 5.90747 10.1336 6.21994 10.1338 6.59961C10.1338 7.0045 9.80523 7.3328 9.40039 7.33301C9.02064 7.33301 8.70839 7.04466 8.6709 6.6748L8.66699 6.59961L8.6709 6.52539C8.7083 6.15544 9.02057 5.86621 9.40039 5.86621L9.47461 5.87012ZM0.5 4.11133V2.55566C0.5 1.42041 1.42041 0.5 2.55566 0.5H4.11133C4.38737 0.500117 4.61133 0.72393 4.61133 1C4.61133 1.27607 4.38737 1.49988 4.11133 1.5H2.55566C1.9727 1.5 1.5 1.9727 1.5 2.55566V4.11133C1.49988 4.38737 1.27607 4.61133 1 4.61133C0.72393 4.61133 0.500117 4.38737 0.5 4.11133ZM14.5 4.11133V2.55566C14.5 1.97269 14.0273 1.5 13.4443 1.5H11.8887C11.6126 1.49988 11.3887 1.27607 11.3887 1C11.3887 0.72393 11.6126 0.500117 11.8887 0.5H13.4443C14.5796 0.5 15.5 1.42042 15.5 2.55566V4.11133C15.4999 4.38737 15.2761 4.61133 15 4.61133C14.7239 4.61133 14.5001 4.38737 14.5 4.11133ZM13.167 8C13.167 10.8535 10.8535 13.167 8 13.167C5.14653 13.167 2.83301 10.8535 2.83301 8C2.83301 5.14653 5.14653 2.83301 8 2.83301C10.8535 2.83301 13.167 5.14653 13.167 8Z',
|
|
1833
|
+
fill: 'currentColor'
|
|
1834
|
+
})
|
|
1835
|
+
}), jsx("defs", {
|
|
1836
|
+
children: jsx("clipPath", {
|
|
1837
|
+
id: 'clip0_344_11',
|
|
1838
|
+
children: jsx("rect", {
|
|
1839
|
+
width: '15',
|
|
1840
|
+
height: '15',
|
|
1841
|
+
fill: 'white',
|
|
1842
|
+
transform: 'translate(0.5 0.5)'
|
|
1843
|
+
})
|
|
1844
|
+
})
|
|
1845
|
+
})]
|
|
1846
|
+
});
|
|
1847
|
+
const SignIcon = ({
|
|
1848
|
+
color = '#4C7EFF',
|
|
1849
|
+
size = 18,
|
|
1850
|
+
className = '',
|
|
1851
|
+
onClick
|
|
1852
|
+
}) => jsxs("svg", {
|
|
1853
|
+
width: size,
|
|
1854
|
+
height: size * 13 / 18,
|
|
1855
|
+
viewBox: '0 0 18 13',
|
|
1856
|
+
fill: 'none',
|
|
1857
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
1858
|
+
className: className,
|
|
1859
|
+
onClick: onClick,
|
|
1860
|
+
color: color,
|
|
1861
|
+
children: [jsx("g", {
|
|
1862
|
+
clipPath: 'url(#clip0_404_64)',
|
|
1863
|
+
children: jsx("path", {
|
|
1864
|
+
d: 'M6.53027 0.0273435C7.08771 -0.064076 7.65575 0.0700326 8.16992 0.458984C8.67255 0.839261 9.10671 1.44872 9.46094 2.28906C9.70475 2.86745 9.86928 3.44788 9.96484 4.02344L12.3721 3.07227C12.5375 3.00706 12.7255 3.03455 12.8652 3.14453C13.005 3.25462 13.0755 3.43124 13.0508 3.60742L12.6865 6.20117H14.333C14.6092 6.20117 14.833 6.42503 14.833 6.70117C14.8328 6.97717 14.609 7.20117 14.333 7.20117H12.1113C11.9666 7.20117 11.8284 7.13851 11.7334 7.0293C11.6384 6.92006 11.5961 6.7742 11.6162 6.63086L11.9404 4.31836L10.0635 5.06055C10.1447 8.55694 7.72656 11.6369 4.75879 12.957C4.60413 13.0258 4.42514 13.0112 4.2832 12.9189C4.14133 12.8267 4.05566 12.6692 4.05566 12.5V8.7373C4.05566 8.04264 4.04844 7.56746 4.20117 7.14844C4.32988 6.79566 4.53978 6.47777 4.81445 6.22461C5.14264 5.92224 5.58129 5.75801 6.2041 5.51172L9.00977 4.40137C8.93516 3.83402 8.78323 3.25698 8.53906 2.67773C8.22671 1.93672 7.88311 1.49648 7.56641 1.25684C7.26128 1.02602 6.96815 0.96947 6.69238 1.01465C6.09985 1.11187 5.42697 1.72075 5.01465 2.68066C4.9056 2.93422 4.61204 3.05129 4.3584 2.94238C4.1048 2.83345 3.98699 2.53977 4.0957 2.28613C4.57227 1.17664 5.45614 0.203579 6.53027 0.0273435ZM1.88867 9.69238C2.16481 9.69238 2.38867 9.91624 2.38867 10.1924C2.38863 10.4685 2.16479 10.6924 1.88867 10.6924H1C0.723883 10.6924 0.500041 10.4685 0.5 10.1924C0.5 9.91624 0.723858 9.69238 1 9.69238H1.88867ZM17 9.69238C17.2761 9.69238 17.5 9.91624 17.5 10.1924C17.5 10.4685 17.2761 10.6924 17 10.6924H11.667C11.3909 10.6924 11.167 10.4685 11.167 10.1924C11.167 9.91624 11.3908 9.69238 11.667 9.69238H17ZM5.05566 11.6855C7.28061 10.4175 8.96508 8.05948 9.05957 5.45703L6.57129 6.44141C5.8732 6.71747 5.65071 6.81396 5.49219 6.95996C5.33693 7.10307 5.21561 7.28491 5.14062 7.49023C5.06293 7.70324 5.05566 7.96355 5.05566 8.7373V11.6855Z',
|
|
1865
|
+
fill: 'currentColor'
|
|
1866
|
+
})
|
|
1867
|
+
}), jsx("defs", {
|
|
1868
|
+
children: jsx("clipPath", {
|
|
1869
|
+
id: 'clip0_404_64',
|
|
1870
|
+
children: jsx("rect", {
|
|
1871
|
+
width: '17',
|
|
1872
|
+
height: '13.0002',
|
|
1873
|
+
fill: 'white',
|
|
1874
|
+
transform: 'translate(0.5 -0.000210285)'
|
|
1875
|
+
})
|
|
1876
|
+
})
|
|
1877
|
+
})]
|
|
1878
|
+
});
|
|
1879
|
+
const SignLockIcon = ({
|
|
1880
|
+
color = '#E93636',
|
|
1881
|
+
size = 18,
|
|
1882
|
+
className = '',
|
|
1883
|
+
onClick
|
|
1884
|
+
}) => jsxs("svg", {
|
|
1885
|
+
width: size,
|
|
1886
|
+
height: size * 14 / 18,
|
|
1887
|
+
viewBox: '0 0 18 14',
|
|
1888
|
+
fill: 'none',
|
|
1889
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
1890
|
+
className: className,
|
|
1891
|
+
onClick: onClick,
|
|
1892
|
+
color: color,
|
|
1893
|
+
children: [jsx("g", {
|
|
1894
|
+
clipPath: 'url(#clip0_404_76)',
|
|
1895
|
+
children: jsx("path", {
|
|
1896
|
+
d: 'M16.4932 11.5049C16.4897 11.4621 16.4855 11.4414 16.4834 11.4336C16.4586 11.3831 16.3971 11.3181 16.2861 11.2793C16.2232 11.2574 16.1232 11.25 15.667 11.25H13C12.5431 11.25 12.4428 11.2573 12.3799 11.2793C12.2693 11.3181 12.2084 11.3832 12.1836 11.4336C12.1815 11.4413 12.1773 11.462 12.1738 11.5049C12.1674 11.5847 12.167 11.6922 12.167 11.875C12.167 12.0578 12.1674 12.1653 12.1738 12.2451C12.1773 12.288 12.1815 12.3087 12.1836 12.3164C12.2084 12.3668 12.2693 12.4319 12.3799 12.4707C12.4428 12.4927 12.5431 12.5 13 12.5H15.667C16.1232 12.5 16.2232 12.4926 16.2861 12.4707C16.3971 12.4319 16.4586 12.3669 16.4834 12.3164C16.4855 12.3086 16.4897 12.2879 16.4932 12.2451C16.4996 12.1653 16.5 12.0578 16.5 11.875C16.5 11.6922 16.4996 11.5847 16.4932 11.5049ZM2.98437 0.523437C4.10616 0.362393 5.1695 1.01348 5.89453 2.51855C6.1364 3.02066 6.30201 3.52585 6.40039 4.02832L8.83691 3.18555C9.00301 3.1282 9.18671 3.16239 9.32129 3.27539C9.45592 3.38847 9.52202 3.56371 9.49414 3.7373L9.1416 5.92578H10.7773C11.0535 5.92578 11.2773 6.14964 11.2773 6.42578C11.2773 6.7019 11.0535 6.92578 10.7773 6.92578H8.55566C8.40921 6.92578 8.2698 6.86147 8.1748 6.75C8.07994 6.63862 8.03841 6.49114 8.06152 6.34668L8.37305 4.40332L6.50781 5.04883C6.55819 8.15173 4.10509 10.8278 1.18164 11.9658C1.02786 12.0257 0.854016 12.0062 0.717773 11.9131C0.581503 11.8199 0.5 11.6651 0.5 11.5V8.03516C0.499995 7.49897 0.489733 7.08066 0.652343 6.70996C0.786092 6.40516 0.999951 6.1403 1.26758 5.93262C1.58317 5.68773 2.00072 5.55065 2.60156 5.34277L5.44434 4.3584C5.36773 3.89678 5.22244 3.42607 4.99414 2.95215C4.38598 1.68972 3.6718 1.43557 3.12695 1.51367C2.50982 1.60227 1.84792 2.14387 1.44922 2.95605C1.32748 3.20381 1.02712 3.30623 0.779297 3.18457C0.531506 3.06284 0.429116 2.76249 0.550781 2.51465C1.04096 1.51619 1.93493 0.67416 2.98437 0.523437ZM9.44434 8.75C9.72048 8.75 9.94434 8.97386 9.94434 9.25C9.94434 9.52614 9.72048 9.75 9.44434 9.75H7.66699C7.39085 9.75 7.16699 9.52614 7.16699 9.25C7.16699 8.97386 7.39085 8.75 7.66699 8.75H9.44434ZM15.6113 10C15.6113 9.52394 15.1217 9 14.333 9C13.5445 9.00014 13.0557 9.524 13.0557 10V10.25H15.6113V10ZM16.6113 10.333C16.613 10.3336 16.6146 10.3344 16.6162 10.335L16.7363 10.3828C17.0101 10.5066 17.2447 10.7151 17.3809 10.9922C17.4533 11.14 17.4793 11.289 17.4902 11.4248C17.5007 11.5541 17.5 11.7086 17.5 11.875C17.5 12.0414 17.5007 12.1959 17.4902 12.3252C17.4793 12.461 17.4533 12.609 17.3809 12.7568C17.2447 13.0339 17.0101 13.2434 16.7363 13.3672L16.6162 13.415C16.4183 13.4842 16.192 13.4977 15.9346 13.5H12.7324C12.475 13.4977 12.2487 13.4841 12.0508 13.415C11.7262 13.3016 11.4408 13.0747 11.2852 12.7578C11.2128 12.6101 11.1877 12.461 11.1768 12.3252C11.1663 12.1959 11.167 12.0414 11.167 11.875C11.167 11.7086 11.1663 11.5541 11.1768 11.4248C11.1877 11.289 11.2128 11.1409 11.2852 10.9932C11.4408 10.6763 11.7262 10.4484 12.0508 10.335C12.0524 10.3344 12.054 10.3336 12.0557 10.333V10C12.0557 8.81927 13.1581 8.00015 14.333 8C15.508 8 16.6113 8.81916 16.6113 10V10.333ZM1.5 10.7324C3.72796 9.63149 5.37826 7.6016 5.50098 5.39648L2.92871 6.28711C2.25442 6.5204 2.03397 6.60389 1.88086 6.72266C1.73431 6.83638 1.62998 6.97184 1.56836 7.1123C1.51002 7.24545 1.5 7.40909 1.5 8.03516V10.7324Z',
|
|
1897
|
+
fill: 'currentColor'
|
|
1898
|
+
})
|
|
1899
|
+
}), jsx("defs", {
|
|
1900
|
+
children: jsx("clipPath", {
|
|
1901
|
+
id: 'clip0_404_76',
|
|
1902
|
+
children: jsx("rect", {
|
|
1903
|
+
width: '17.0005',
|
|
1904
|
+
height: '13.0005',
|
|
1905
|
+
fill: 'white',
|
|
1906
|
+
transform: 'translate(0.499533 0.499527)'
|
|
1907
|
+
})
|
|
1908
|
+
})
|
|
1909
|
+
})]
|
|
1910
|
+
});
|
|
1911
|
+
const LockIcon = ({
|
|
1912
|
+
color = '#E93636',
|
|
1913
|
+
size = 8,
|
|
1914
|
+
className = '',
|
|
1915
|
+
onClick
|
|
1916
|
+
}) => jsxs("svg", {
|
|
1917
|
+
width: size,
|
|
1918
|
+
height: size * 10 / 8,
|
|
1919
|
+
viewBox: '0 0 8 10',
|
|
1920
|
+
fill: 'none',
|
|
1921
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
1922
|
+
className: className,
|
|
1923
|
+
onClick: onClick,
|
|
1924
|
+
color: color,
|
|
1925
|
+
children: [jsx("g", {
|
|
1926
|
+
clipPath: 'url(#clip0_404_71)',
|
|
1927
|
+
children: jsx("path", {
|
|
1928
|
+
d: 'M6.5 6.24414C6.5 5.86411 6.50017 5.60437 6.48633 5.40332C6.47272 5.20598 6.44735 5.10448 6.41797 5.03613C6.34685 4.8709 6.23984 4.75273 6.12695 4.68457C6.09177 4.66338 6.02689 4.63665 5.83887 4.62305C5.68428 4.61185 5.48725 4.61133 5.2002 4.61133H2.7998C2.51275 4.61133 2.31573 4.61185 2.16113 4.62305C1.97305 4.63665 1.9082 4.66339 1.87305 4.68457C1.76015 4.75274 1.65315 4.87091 1.58203 5.03613C1.55265 5.10448 1.52728 5.20597 1.51367 5.40332C1.49983 5.60437 1.5 5.86412 1.5 6.24414V6.86621C1.5 7.24654 1.49981 7.50688 1.51367 7.70801C1.52726 7.90512 1.5527 8.00587 1.58203 8.07422C1.65315 8.23965 1.76006 8.35853 1.87305 8.42676C1.90443 8.44566 1.96075 8.46998 2.10938 8.48438C2.26726 8.49966 2.4752 8.5 2.7998 8.5H5.2002C5.52481 8.5 5.73274 8.49966 5.89062 8.48438C6.03919 8.46999 6.09553 8.44567 6.12695 8.42676C6.23993 8.35854 6.34685 8.23966 6.41797 8.07422C6.44731 8.00587 6.47274 7.90512 6.48633 7.70801C6.50019 7.50688 6.5 7.24654 6.5 6.86621V6.24414ZM3.5 7V6.11133C3.5 5.83519 3.72386 5.61133 4 5.61133C4.27614 5.61133 4.5 5.83519 4.5 6.11133V7C4.5 7.27614 4.27614 7.5 4 7.5C3.72386 7.5 3.5 7.27614 3.5 7ZM5.375 3.22266C5.375 2.18852 4.68314 1.5 4 1.5C3.31686 1.5 2.625 2.18852 2.625 3.22266V3.61133H5.375V3.22266ZM6.375 3.70996C6.46629 3.73936 6.5572 3.7754 6.64453 3.82812C6.95488 4.01555 7.19235 4.3053 7.33691 4.6416C7.4301 4.85839 7.46634 5.08681 7.4834 5.33398C7.50018 5.57745 7.5 5.87787 7.5 6.24414V6.86621C7.5 7.23241 7.50016 7.53291 7.4834 7.77637C7.46635 8.02369 7.43016 8.25283 7.33691 8.46973C7.19239 8.80584 6.95466 9.09482 6.64453 9.28223C6.43528 9.40858 6.21339 9.45758 5.9873 9.47949C5.77009 9.50053 5.50539 9.5 5.2002 9.5H2.7998C2.49462 9.5 2.22991 9.50053 2.0127 9.47949C1.78662 9.45758 1.56472 9.4086 1.35547 9.28223C1.04535 9.09483 0.807617 8.80585 0.663086 8.46973C0.569851 8.25283 0.533651 8.02369 0.516602 7.77637C0.499842 7.53291 0.5 7.23241 0.5 6.86621V6.24414C0.5 5.87787 0.499818 5.57745 0.516602 5.33398C0.533661 5.08681 0.569902 4.85839 0.663086 4.6416C0.807663 4.3053 1.04514 4.01555 1.35547 3.82812C1.4428 3.77539 1.53371 3.73936 1.625 3.70996V3.22266C1.625 1.8022 2.61208 0.5 4 0.5C5.38791 0.5 6.375 1.8022 6.375 3.22266V3.70996Z',
|
|
1929
|
+
fill: 'currentColor'
|
|
1930
|
+
})
|
|
1931
|
+
}), jsx("defs", {
|
|
1932
|
+
children: jsx("clipPath", {
|
|
1933
|
+
id: 'clip0_404_71',
|
|
1934
|
+
children: jsx("rect", {
|
|
1935
|
+
width: '7',
|
|
1936
|
+
height: '9',
|
|
1937
|
+
fill: 'white',
|
|
1938
|
+
transform: 'translate(0.5 0.5)'
|
|
1939
|
+
})
|
|
1940
|
+
})
|
|
1941
|
+
})]
|
|
1942
|
+
});
|
|
1943
|
+
const PendingIcon = ({
|
|
1944
|
+
color = '#F49A58',
|
|
1945
|
+
size = 11,
|
|
1946
|
+
className = '',
|
|
1947
|
+
onClick
|
|
1948
|
+
}) => jsxs("svg", {
|
|
1949
|
+
width: size,
|
|
1950
|
+
height: size,
|
|
1951
|
+
viewBox: '0 0 11 11',
|
|
1952
|
+
fill: 'none',
|
|
1953
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
1954
|
+
className: className,
|
|
1955
|
+
onClick: onClick,
|
|
1956
|
+
color: color,
|
|
1957
|
+
children: [jsx("g", {
|
|
1958
|
+
clipPath: 'url(#clip0_405_81)',
|
|
1959
|
+
children: jsx("path", {
|
|
1960
|
+
d: 'M7.74672 8.71921C7.90214 8.93112 8.20171 8.97852 8.3979 8.80367C9.20215 8.08688 9.7568 7.12601 9.97194 6.06176C10.2186 4.84138 10.0011 3.57287 9.362 2.50438C8.72286 1.43588 7.70807 0.644286 6.51614 0.284445C5.32422 -0.0753959 4.04092 0.0224086 2.91729 0.558725C1.79366 1.09504 0.910553 2.03128 0.440724 3.18429C-0.0291052 4.33731 -0.051851 5.62413 0.376936 6.79302C0.805723 7.96192 1.65519 8.92878 2.75916 9.50447C3.72191 10.0065 4.81779 10.1796 5.88088 10.0051C6.1402 9.96249 6.29175 9.69977 6.22474 9.44566C6.15772 9.19155 5.89743 9.04286 5.63721 9.07962C4.80466 9.19721 3.9517 9.05305 3.1992 8.66064C2.30536 8.19452 1.61757 7.41168 1.2704 6.46527C0.923226 5.51886 0.941642 4.47697 1.32205 3.54342C1.70245 2.60986 2.41747 1.85182 3.32723 1.41759C4.23699 0.983351 5.27603 0.904162 6.24109 1.19551C7.20615 1.48686 8.02779 2.12779 8.54528 2.99291C9.06277 3.85803 9.23887 4.8851 9.03913 5.87319C8.87097 6.70504 8.44663 7.45887 7.83162 8.03221C7.63939 8.21141 7.59129 8.50729 7.74672 8.71921Z',
|
|
1961
|
+
fill: 'currentColor'
|
|
1962
|
+
})
|
|
1963
|
+
}), jsx("defs", {
|
|
1964
|
+
children: jsx("clipPath", {
|
|
1965
|
+
id: 'clip0_405_81',
|
|
1966
|
+
children: jsx("rect", {
|
|
1967
|
+
width: '10',
|
|
1968
|
+
height: '10',
|
|
1969
|
+
fill: 'white',
|
|
1970
|
+
transform: 'translate(0.0710678 0.071064)'
|
|
1971
|
+
})
|
|
1972
|
+
})
|
|
1973
|
+
})]
|
|
1974
|
+
});
|
|
1975
|
+
const SearchIcon = ({
|
|
1976
|
+
color = '#0C1C33',
|
|
1977
|
+
size = 16,
|
|
1978
|
+
className = '',
|
|
1979
|
+
onClick
|
|
1980
|
+
}) => jsx("svg", {
|
|
1981
|
+
width: size,
|
|
1982
|
+
height: size,
|
|
1983
|
+
viewBox: '0 0 16 16',
|
|
1984
|
+
fill: 'none',
|
|
1985
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
1986
|
+
className: className,
|
|
1987
|
+
onClick: onClick,
|
|
1988
|
+
color: color,
|
|
1989
|
+
children: jsx("path", {
|
|
1990
|
+
d: 'M14.569 14.0977L10.6623 10.191C11.5815 9.14938 12.0591 7.79092 11.9941 6.40327C11.9292 5.01564 11.3267 3.70776 10.3143 2.75659C9.30178 1.80542 7.95892 1.28563 6.56994 1.30729C5.18095 1.32895 3.85492 1.89036 2.87264 2.87264C1.89036 3.85492 1.32895 5.18095 1.30729 6.56994C1.28563 7.95892 1.80542 9.30178 2.75659 10.3143C3.70776 11.3267 5.01564 11.9292 6.40327 11.9941C7.79092 12.0591 9.14938 11.5815 10.191 10.6623L14.0977 14.569L14.569 14.0977ZM6.66665 11.3333C5.74364 11.3333 4.84138 11.0596 4.07396 10.5468C3.30653 10.0341 2.70839 9.30518 2.35518 8.45245C2.00197 7.59978 1.90956 6.66145 2.08962 5.7562C2.26968 4.85095 2.71414 4.01943 3.36678 3.36678C4.01943 2.71414 4.85095 2.26968 5.7562 2.08962C6.66145 1.90956 7.59978 2.00197 8.45245 2.35518C9.30518 2.70839 10.0341 3.30653 10.5468 4.07396C11.0596 4.84138 11.3333 5.74364 11.3333 6.66665C11.3319 7.90385 10.8398 9.09005 9.96492 9.96492C9.09005 10.8398 7.90385 11.3319 6.66665 11.3333Z',
|
|
1991
|
+
fill: 'currentColor'
|
|
1992
|
+
})
|
|
1993
|
+
});
|
|
1783
1994
|
|
|
1784
1995
|
const accordionRootStyles = cva(`
|
|
1785
1996
|
w-full
|
|
@@ -1895,7 +2106,7 @@ const Accordion = ({
|
|
|
1895
2106
|
theme,
|
|
1896
2107
|
border
|
|
1897
2108
|
}) + (className ? ` ${className}` : '');
|
|
1898
|
-
return jsx(Root2$
|
|
2109
|
+
return jsx(Root2$5, {
|
|
1899
2110
|
type: 'single',
|
|
1900
2111
|
collapsible: true,
|
|
1901
2112
|
className: rootClasses,
|
|
@@ -1928,7 +2139,7 @@ const Accordion = ({
|
|
|
1928
2139
|
className: `${separatorStyles({
|
|
1929
2140
|
theme
|
|
1930
2141
|
})} group-data-[state=closed]:opacity-0 group-data-[state=open]:opacity-100`
|
|
1931
|
-
}), jsx(Content2$
|
|
2142
|
+
}), jsx(Content2$2, {
|
|
1932
2143
|
forceMount: true,
|
|
1933
2144
|
className: accordionContentStyles(),
|
|
1934
2145
|
children: jsx("div", {
|
|
@@ -1940,6 +2151,86 @@ const Accordion = ({
|
|
|
1940
2151
|
});
|
|
1941
2152
|
};
|
|
1942
2153
|
|
|
2154
|
+
const Badge = _a => {
|
|
2155
|
+
var {
|
|
2156
|
+
children,
|
|
2157
|
+
variant = 'default',
|
|
2158
|
+
color = 'blue',
|
|
2159
|
+
size = 'sm',
|
|
2160
|
+
borderRadius,
|
|
2161
|
+
className = '',
|
|
2162
|
+
onClick
|
|
2163
|
+
} = _a,
|
|
2164
|
+
props = __rest(_a, ["children", "variant", "color", "size", "borderRadius", "className", "onClick"]);
|
|
2165
|
+
const baseClasses = 'inline-flex items-center justify-center font-medium transition-colors';
|
|
2166
|
+
// Size classes with default border radius
|
|
2167
|
+
const sizeClasses = {
|
|
2168
|
+
xxs: 'px-1 py-1 text-xs gap-2 rounded-full',
|
|
2169
|
+
xs: 'px-[0.5rem] py-[0.25rem] text-xs rounded-full',
|
|
2170
|
+
sm: 'px-[2.125rem] py-[0.625rem] text-xs rounded-full',
|
|
2171
|
+
xl: 'px-[2.25rem] py-4 text-lg rounded-full'
|
|
2172
|
+
};
|
|
2173
|
+
// Border radius classes (overrides size border radius)
|
|
2174
|
+
const borderRadiusClasses = {
|
|
2175
|
+
xs: 'rounded-[0.25rem]'
|
|
2176
|
+
};
|
|
2177
|
+
// Color and variant combination classes
|
|
2178
|
+
const getVariantClasses = () => {
|
|
2179
|
+
const colorMap = {
|
|
2180
|
+
blue: {
|
|
2181
|
+
default: 'text-[#4C7EFF]',
|
|
2182
|
+
flat: 'bg-[rgba(76,126,255,0.15)] text-[#4C7EFF]',
|
|
2183
|
+
solid: 'bg-[#4C7EFF] text-white',
|
|
2184
|
+
bordered: 'outline outline-1 outline-[#4C7EFF] text-[#4C7EFF]'
|
|
2185
|
+
},
|
|
2186
|
+
white: {
|
|
2187
|
+
default: 'text-white',
|
|
2188
|
+
flat: 'bg-[rgba(255,255,255,0.15)] text-white',
|
|
2189
|
+
solid: 'bg-white text-[#0C1C33]',
|
|
2190
|
+
bordered: 'outline outline-1 outline-white text-white'
|
|
2191
|
+
},
|
|
2192
|
+
gray: {
|
|
2193
|
+
default: 'text-[#0C1C33]',
|
|
2194
|
+
flat: 'bg-[rgba(12,28,51,0.15)] text-[#0C1C33]',
|
|
2195
|
+
solid: 'bg-[#0C1C33] text-white',
|
|
2196
|
+
bordered: 'outline outline-1 outline-[#0C1C33] text-[#0C1C33]'
|
|
2197
|
+
},
|
|
2198
|
+
'light-gray': {
|
|
2199
|
+
default: 'text-[#6B7280]',
|
|
2200
|
+
flat: 'bg-[#0C1C33]/5 text-[#0C1C33]',
|
|
2201
|
+
solid: 'bg-[#0C1C33]/15 text-[#0C1C33]',
|
|
2202
|
+
bordered: 'outline outline-1 outline-[#6B7280] text-[#6B7280]'
|
|
2203
|
+
},
|
|
2204
|
+
turquoise: {
|
|
2205
|
+
default: 'text-[#60F6D2]',
|
|
2206
|
+
flat: 'bg-[rgba(96,246,210,0.15)] text-[#60F6D2]',
|
|
2207
|
+
solid: 'bg-[#60F6D2] text-[#0C1C33]',
|
|
2208
|
+
bordered: 'outline outline-1 outline-[#60F6D2] text-[#60F6D2]'
|
|
2209
|
+
},
|
|
2210
|
+
red: {
|
|
2211
|
+
default: 'text-[#CD2E00]',
|
|
2212
|
+
flat: 'bg-[rgba(205,46,0,0.15)] text-[#CD2E00]',
|
|
2213
|
+
solid: 'bg-[#CD2E00] text-white',
|
|
2214
|
+
bordered: 'outline outline-1 outline-[#CD2E00] text-[#CD2E00]'
|
|
2215
|
+
},
|
|
2216
|
+
orange: {
|
|
2217
|
+
default: 'text-[#F98F12]',
|
|
2218
|
+
flat: 'bg-[rgba(249,143,18,0.15)] text-[#F98F12]',
|
|
2219
|
+
solid: 'bg-[#F98F12] text-white',
|
|
2220
|
+
bordered: 'outline outline-1 outline-[#F98F12] text-[#F98F12]'
|
|
2221
|
+
}
|
|
2222
|
+
};
|
|
2223
|
+
return colorMap[color][variant];
|
|
2224
|
+
};
|
|
2225
|
+
const classes = [baseClasses, sizeClasses[size], getVariantClasses(), borderRadius && borderRadiusClasses[borderRadius], className].filter(Boolean).join(' ');
|
|
2226
|
+
return jsx("span", Object.assign({
|
|
2227
|
+
className: classes,
|
|
2228
|
+
onClick: onClick
|
|
2229
|
+
}, props, {
|
|
2230
|
+
children: children
|
|
2231
|
+
}));
|
|
2232
|
+
};
|
|
2233
|
+
|
|
1943
2234
|
const styles = cva(`
|
|
1944
2235
|
dash-btn-base
|
|
1945
2236
|
select-none
|
|
@@ -2222,14 +2513,15 @@ const Button = _a => {
|
|
|
2222
2513
|
const input = cva('w-full transition-all font-inter placeholder:text-opacity-60 text-[0.875rem] leading-[1.0625rem]', {
|
|
2223
2514
|
variants: {
|
|
2224
2515
|
theme: {
|
|
2225
|
-
light: 'text-[#111111] placeholder:text-[rgba(17,17,17,0.6)]
|
|
2226
|
-
dark: 'text-white placeholder:text-gray-400
|
|
2516
|
+
light: 'text-[#111111] placeholder:text-[rgba(17,17,17,0.6)]',
|
|
2517
|
+
dark: 'text-white placeholder:text-gray-400'
|
|
2227
2518
|
},
|
|
2228
2519
|
colorScheme: {
|
|
2229
2520
|
default: 'focus:ring-blue-500/20',
|
|
2230
2521
|
brand: 'focus:ring-dash-brand/20',
|
|
2231
2522
|
error: 'focus:ring-red-500/20',
|
|
2232
|
-
success: 'focus:ring-green-500/20'
|
|
2523
|
+
success: 'focus:ring-green-500/20',
|
|
2524
|
+
'light-gray': 'focus:ring-[#6B7280]/20'
|
|
2233
2525
|
},
|
|
2234
2526
|
size: {
|
|
2235
2527
|
sm: 'dash-block-sm font-light',
|
|
@@ -2237,7 +2529,8 @@ const input = cva('w-full transition-all font-inter placeholder:text-opacity-60
|
|
|
2237
2529
|
xl: 'dash-block-xl font-light'
|
|
2238
2530
|
},
|
|
2239
2531
|
variant: {
|
|
2240
|
-
outlined: 'outline outline-1 outline-offset-[-1px]'
|
|
2532
|
+
outlined: 'outline outline-1 outline-offset-[-1px]',
|
|
2533
|
+
filled: 'border-none'
|
|
2241
2534
|
},
|
|
2242
2535
|
disabled: {
|
|
2243
2536
|
false: '',
|
|
@@ -2262,11 +2555,52 @@ const input = cva('w-full transition-all font-inter placeholder:text-opacity-60
|
|
|
2262
2555
|
variant: 'outlined',
|
|
2263
2556
|
colorScheme: 'success',
|
|
2264
2557
|
class: 'outline-green-500 focus:outline-green-500'
|
|
2558
|
+
}, {
|
|
2559
|
+
variant: 'outlined',
|
|
2560
|
+
colorScheme: 'light-gray',
|
|
2561
|
+
class: 'outline-[#6B7280]/50 focus:outline-[#6B7280]'
|
|
2265
2562
|
},
|
|
2266
2563
|
// Outlined variant with focus ring
|
|
2267
2564
|
{
|
|
2268
2565
|
variant: 'outlined',
|
|
2269
2566
|
class: 'focus:ring-2'
|
|
2567
|
+
},
|
|
2568
|
+
// Outlined variant background
|
|
2569
|
+
{
|
|
2570
|
+
variant: 'outlined',
|
|
2571
|
+
theme: 'light',
|
|
2572
|
+
class: 'bg-white'
|
|
2573
|
+
}, {
|
|
2574
|
+
variant: 'outlined',
|
|
2575
|
+
theme: 'dark',
|
|
2576
|
+
class: 'bg-gray-800'
|
|
2577
|
+
},
|
|
2578
|
+
// Filled variant colors
|
|
2579
|
+
{
|
|
2580
|
+
variant: 'filled',
|
|
2581
|
+
colorScheme: 'default',
|
|
2582
|
+
class: 'bg-[rgba(76,126,255,0.15)] focus:bg-[rgba(76,126,255,0.2)]'
|
|
2583
|
+
}, {
|
|
2584
|
+
variant: 'filled',
|
|
2585
|
+
colorScheme: 'brand',
|
|
2586
|
+
class: 'bg-dash-brand/15 focus:bg-dash-brand/20'
|
|
2587
|
+
}, {
|
|
2588
|
+
variant: 'filled',
|
|
2589
|
+
colorScheme: 'error',
|
|
2590
|
+
class: 'bg-red-500/15 focus:bg-red-500/20'
|
|
2591
|
+
}, {
|
|
2592
|
+
variant: 'filled',
|
|
2593
|
+
colorScheme: 'success',
|
|
2594
|
+
class: 'bg-green-500/15 focus:bg-green-500/20'
|
|
2595
|
+
}, {
|
|
2596
|
+
variant: 'filled',
|
|
2597
|
+
colorScheme: 'light-gray',
|
|
2598
|
+
class: 'bg-[#0C1C33]/5 focus:bg-[#0C1C33]/10'
|
|
2599
|
+
},
|
|
2600
|
+
// Filled variant with focus ring
|
|
2601
|
+
{
|
|
2602
|
+
variant: 'filled',
|
|
2603
|
+
class: 'focus:ring-2'
|
|
2270
2604
|
}],
|
|
2271
2605
|
defaultVariants: {
|
|
2272
2606
|
theme: 'light',
|
|
@@ -2302,13 +2636,16 @@ const Input = _a => {
|
|
|
2302
2636
|
disabled = false,
|
|
2303
2637
|
type,
|
|
2304
2638
|
prefix,
|
|
2639
|
+
prefixClassName = '',
|
|
2305
2640
|
showPasswordToggle = true
|
|
2306
2641
|
} = _a,
|
|
2307
|
-
props = __rest(_a, ["className", "colorScheme", "size", "variant", "error", "success", "disabled", "type", "prefix", "showPasswordToggle"]);
|
|
2642
|
+
props = __rest(_a, ["className", "colorScheme", "size", "variant", "error", "success", "disabled", "type", "prefix", "prefixClassName", "showPasswordToggle"]);
|
|
2308
2643
|
const {
|
|
2309
2644
|
theme
|
|
2310
2645
|
} = useTheme();
|
|
2311
2646
|
const [showPassword, setShowPassword] = useState(false);
|
|
2647
|
+
const [prefixWidth, setPrefixWidth] = useState(0);
|
|
2648
|
+
const prefixRef = useRef(null);
|
|
2312
2649
|
// Determine color scheme based on state
|
|
2313
2650
|
let finalColorScheme = colorScheme;
|
|
2314
2651
|
if (error) finalColorScheme = 'error';else if (success) finalColorScheme = 'success';
|
|
@@ -2325,25 +2662,26 @@ const Input = _a => {
|
|
|
2325
2662
|
const togglePasswordVisibility = () => {
|
|
2326
2663
|
setShowPassword(!showPassword);
|
|
2327
2664
|
};
|
|
2328
|
-
//
|
|
2329
|
-
|
|
2330
|
-
if (
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2665
|
+
// Measure actual prefix width
|
|
2666
|
+
useEffect(() => {
|
|
2667
|
+
if (prefixRef.current) {
|
|
2668
|
+
const width = prefixRef.current.offsetWidth;
|
|
2669
|
+
// Convert px to rem (assuming 16px base) and add base padding (1rem) + extra space (0.5rem)
|
|
2670
|
+
setPrefixWidth(width / 16 + 1.5);
|
|
2671
|
+
}
|
|
2672
|
+
}, [prefix]);
|
|
2335
2673
|
// Render with prefix
|
|
2336
2674
|
if (hasPrefix) {
|
|
2337
|
-
const leftPadding = getPrefixPadding();
|
|
2338
2675
|
return jsxs("div", {
|
|
2339
2676
|
className: 'relative',
|
|
2340
2677
|
children: [jsx("div", {
|
|
2341
|
-
|
|
2678
|
+
ref: prefixRef,
|
|
2679
|
+
className: `absolute left-4 top-1/2 -translate-y-1/2 z-10 text-[0.875rem] opacity-60 pointer-events-none select-none ${prefixClassName}`,
|
|
2342
2680
|
children: prefix
|
|
2343
2681
|
}), jsx("input", Object.assign({
|
|
2344
2682
|
className: `${classes}${isPassword && showPasswordToggle ? ' pr-12' : ''}`,
|
|
2345
2683
|
style: {
|
|
2346
|
-
paddingLeft: `${
|
|
2684
|
+
paddingLeft: prefixWidth ? `${prefixWidth}rem` : '1rem'
|
|
2347
2685
|
},
|
|
2348
2686
|
disabled: disabled,
|
|
2349
2687
|
type: inputType
|
|
@@ -2755,6 +3093,7 @@ const valueCard = cva('flex items-center transition-all outline outline-1 outlin
|
|
|
2755
3093
|
yellow: 'bg-dash-yellow-light !outline-dash-yellow'
|
|
2756
3094
|
},
|
|
2757
3095
|
size: {
|
|
3096
|
+
xs: 'px-[0.5rem] py-[0.25rem] rounded-[0.25rem]',
|
|
2758
3097
|
sm: 'dash-block-sm',
|
|
2759
3098
|
md: 'dash-block-md',
|
|
2760
3099
|
xl: 'dash-block-xl'
|
|
@@ -2906,7 +3245,7 @@ function clamp$1(value, [min, max]) {
|
|
|
2906
3245
|
}
|
|
2907
3246
|
|
|
2908
3247
|
// packages/core/primitive/src/primitive.tsx
|
|
2909
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
3248
|
+
function composeEventHandlers$1(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
2910
3249
|
return function handleEvent(event) {
|
|
2911
3250
|
originalEventHandler?.(event);
|
|
2912
3251
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -2938,17 +3277,17 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
2938
3277
|
}, [onEscapeKeyDown, ownerDocument]);
|
|
2939
3278
|
}
|
|
2940
3279
|
|
|
2941
|
-
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
2942
|
-
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
2943
|
-
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
2944
|
-
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
2945
|
-
var originalBodyPointerEvents;
|
|
2946
|
-
var DismissableLayerContext = React.createContext({
|
|
3280
|
+
var DISMISSABLE_LAYER_NAME$1 = "DismissableLayer";
|
|
3281
|
+
var CONTEXT_UPDATE$1 = "dismissableLayer.update";
|
|
3282
|
+
var POINTER_DOWN_OUTSIDE$1 = "dismissableLayer.pointerDownOutside";
|
|
3283
|
+
var FOCUS_OUTSIDE$1 = "dismissableLayer.focusOutside";
|
|
3284
|
+
var originalBodyPointerEvents$1;
|
|
3285
|
+
var DismissableLayerContext$1 = React.createContext({
|
|
2947
3286
|
layers: /* @__PURE__ */ new Set(),
|
|
2948
3287
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
2949
3288
|
branches: /* @__PURE__ */ new Set()
|
|
2950
3289
|
});
|
|
2951
|
-
var DismissableLayer = React.forwardRef(
|
|
3290
|
+
var DismissableLayer$1 = React.forwardRef(
|
|
2952
3291
|
(props, forwardedRef) => {
|
|
2953
3292
|
const {
|
|
2954
3293
|
disableOutsidePointerEvents = false,
|
|
@@ -2959,7 +3298,7 @@ var DismissableLayer = React.forwardRef(
|
|
|
2959
3298
|
onDismiss,
|
|
2960
3299
|
...layerProps
|
|
2961
3300
|
} = props;
|
|
2962
|
-
const context = React.useContext(DismissableLayerContext);
|
|
3301
|
+
const context = React.useContext(DismissableLayerContext$1);
|
|
2963
3302
|
const [node, setNode] = React.useState(null);
|
|
2964
3303
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
2965
3304
|
const [, force] = React.useState({});
|
|
@@ -2970,7 +3309,7 @@ var DismissableLayer = React.forwardRef(
|
|
|
2970
3309
|
const index = node ? layers.indexOf(node) : -1;
|
|
2971
3310
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
2972
3311
|
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
2973
|
-
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
3312
|
+
const pointerDownOutside = usePointerDownOutside$1((event) => {
|
|
2974
3313
|
const target = event.target;
|
|
2975
3314
|
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
2976
3315
|
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
@@ -2978,7 +3317,7 @@ var DismissableLayer = React.forwardRef(
|
|
|
2978
3317
|
onInteractOutside?.(event);
|
|
2979
3318
|
if (!event.defaultPrevented) onDismiss?.();
|
|
2980
3319
|
}, ownerDocument);
|
|
2981
|
-
const focusOutside = useFocusOutside((event) => {
|
|
3320
|
+
const focusOutside = useFocusOutside$1((event) => {
|
|
2982
3321
|
const target = event.target;
|
|
2983
3322
|
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
2984
3323
|
if (isFocusInBranch) return;
|
|
@@ -2999,16 +3338,16 @@ var DismissableLayer = React.forwardRef(
|
|
|
2999
3338
|
if (!node) return;
|
|
3000
3339
|
if (disableOutsidePointerEvents) {
|
|
3001
3340
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
3002
|
-
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
3341
|
+
originalBodyPointerEvents$1 = ownerDocument.body.style.pointerEvents;
|
|
3003
3342
|
ownerDocument.body.style.pointerEvents = "none";
|
|
3004
3343
|
}
|
|
3005
3344
|
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
3006
3345
|
}
|
|
3007
3346
|
context.layers.add(node);
|
|
3008
|
-
dispatchUpdate();
|
|
3347
|
+
dispatchUpdate$1();
|
|
3009
3348
|
return () => {
|
|
3010
3349
|
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
3011
|
-
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
3350
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents$1;
|
|
3012
3351
|
}
|
|
3013
3352
|
};
|
|
3014
3353
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
@@ -3017,13 +3356,13 @@ var DismissableLayer = React.forwardRef(
|
|
|
3017
3356
|
if (!node) return;
|
|
3018
3357
|
context.layers.delete(node);
|
|
3019
3358
|
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
3020
|
-
dispatchUpdate();
|
|
3359
|
+
dispatchUpdate$1();
|
|
3021
3360
|
};
|
|
3022
3361
|
}, [node, context]);
|
|
3023
3362
|
React.useEffect(() => {
|
|
3024
3363
|
const handleUpdate = () => force({});
|
|
3025
|
-
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
3026
|
-
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
3364
|
+
document.addEventListener(CONTEXT_UPDATE$1, handleUpdate);
|
|
3365
|
+
return () => document.removeEventListener(CONTEXT_UPDATE$1, handleUpdate);
|
|
3027
3366
|
}, []);
|
|
3028
3367
|
return /* @__PURE__ */ jsx(
|
|
3029
3368
|
Primitive.div,
|
|
@@ -3034,9 +3373,9 @@ var DismissableLayer = React.forwardRef(
|
|
|
3034
3373
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
3035
3374
|
...props.style
|
|
3036
3375
|
},
|
|
3037
|
-
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
3038
|
-
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
3039
|
-
onPointerDownCapture: composeEventHandlers(
|
|
3376
|
+
onFocusCapture: composeEventHandlers$1(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
3377
|
+
onBlurCapture: composeEventHandlers$1(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
3378
|
+
onPointerDownCapture: composeEventHandlers$1(
|
|
3040
3379
|
props.onPointerDownCapture,
|
|
3041
3380
|
pointerDownOutside.onPointerDownCapture
|
|
3042
3381
|
)
|
|
@@ -3044,10 +3383,10 @@ var DismissableLayer = React.forwardRef(
|
|
|
3044
3383
|
);
|
|
3045
3384
|
}
|
|
3046
3385
|
);
|
|
3047
|
-
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
3048
|
-
var BRANCH_NAME = "DismissableLayerBranch";
|
|
3049
|
-
var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|
3050
|
-
const context = React.useContext(DismissableLayerContext);
|
|
3386
|
+
DismissableLayer$1.displayName = DISMISSABLE_LAYER_NAME$1;
|
|
3387
|
+
var BRANCH_NAME$1 = "DismissableLayerBranch";
|
|
3388
|
+
var DismissableLayerBranch$1 = React.forwardRef((props, forwardedRef) => {
|
|
3389
|
+
const context = React.useContext(DismissableLayerContext$1);
|
|
3051
3390
|
const ref = React.useRef(null);
|
|
3052
3391
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
3053
3392
|
React.useEffect(() => {
|
|
@@ -3061,8 +3400,8 @@ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|
|
3061
3400
|
}, [context.branches]);
|
|
3062
3401
|
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
3063
3402
|
});
|
|
3064
|
-
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
3065
|
-
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
3403
|
+
DismissableLayerBranch$1.displayName = BRANCH_NAME$1;
|
|
3404
|
+
function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
3066
3405
|
const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
|
|
3067
3406
|
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
3068
3407
|
const handleClickRef = React.useRef(() => {
|
|
@@ -3071,8 +3410,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
3071
3410
|
const handlePointerDown = (event) => {
|
|
3072
3411
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
3073
3412
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
3074
|
-
handleAndDispatchCustomEvent(
|
|
3075
|
-
POINTER_DOWN_OUTSIDE,
|
|
3413
|
+
handleAndDispatchCustomEvent$1(
|
|
3414
|
+
POINTER_DOWN_OUTSIDE$1,
|
|
3076
3415
|
handlePointerDownOutside,
|
|
3077
3416
|
eventDetail,
|
|
3078
3417
|
{ discrete: true }
|
|
@@ -3105,14 +3444,14 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
3105
3444
|
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
3106
3445
|
};
|
|
3107
3446
|
}
|
|
3108
|
-
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
3447
|
+
function useFocusOutside$1(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
3109
3448
|
const handleFocusOutside = useCallbackRef$1(onFocusOutside);
|
|
3110
3449
|
const isFocusInsideReactTreeRef = React.useRef(false);
|
|
3111
3450
|
React.useEffect(() => {
|
|
3112
3451
|
const handleFocus = (event) => {
|
|
3113
3452
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
3114
3453
|
const eventDetail = { originalEvent: event };
|
|
3115
|
-
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
3454
|
+
handleAndDispatchCustomEvent$1(FOCUS_OUTSIDE$1, handleFocusOutside, eventDetail, {
|
|
3116
3455
|
discrete: false
|
|
3117
3456
|
});
|
|
3118
3457
|
}
|
|
@@ -3125,11 +3464,11 @@ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
|
3125
3464
|
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
3126
3465
|
};
|
|
3127
3466
|
}
|
|
3128
|
-
function dispatchUpdate() {
|
|
3129
|
-
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
3467
|
+
function dispatchUpdate$1() {
|
|
3468
|
+
const event = new CustomEvent(CONTEXT_UPDATE$1);
|
|
3130
3469
|
document.dispatchEvent(event);
|
|
3131
3470
|
}
|
|
3132
|
-
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
3471
|
+
function handleAndDispatchCustomEvent$1(name, handler, detail, { discrete }) {
|
|
3133
3472
|
const target = detail.originalEvent.target;
|
|
3134
3473
|
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
3135
3474
|
if (handler) target.addEventListener(name, handler, { once: true });
|
|
@@ -3140,22 +3479,22 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
3140
3479
|
}
|
|
3141
3480
|
}
|
|
3142
3481
|
|
|
3143
|
-
var count = 0;
|
|
3144
|
-
function useFocusGuards() {
|
|
3482
|
+
var count$1 = 0;
|
|
3483
|
+
function useFocusGuards$1() {
|
|
3145
3484
|
React.useEffect(() => {
|
|
3146
3485
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
3147
|
-
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
3148
|
-
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
3149
|
-
count++;
|
|
3486
|
+
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard$1());
|
|
3487
|
+
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard$1());
|
|
3488
|
+
count$1++;
|
|
3150
3489
|
return () => {
|
|
3151
|
-
if (count === 1) {
|
|
3490
|
+
if (count$1 === 1) {
|
|
3152
3491
|
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
3153
3492
|
}
|
|
3154
|
-
count--;
|
|
3493
|
+
count$1--;
|
|
3155
3494
|
};
|
|
3156
3495
|
}, []);
|
|
3157
3496
|
}
|
|
3158
|
-
function createFocusGuard() {
|
|
3497
|
+
function createFocusGuard$1() {
|
|
3159
3498
|
const element = document.createElement("span");
|
|
3160
3499
|
element.setAttribute("data-radix-focus-guard", "");
|
|
3161
3500
|
element.tabIndex = 0;
|
|
@@ -5547,7 +5886,7 @@ const arrow = (options, deps) => ({
|
|
|
5547
5886
|
|
|
5548
5887
|
// src/arrow.tsx
|
|
5549
5888
|
var NAME$1 = "Arrow";
|
|
5550
|
-
var Arrow$
|
|
5889
|
+
var Arrow$2 = React.forwardRef((props, forwardedRef) => {
|
|
5551
5890
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
5552
5891
|
return /* @__PURE__ */ jsx(
|
|
5553
5892
|
Primitive.svg,
|
|
@@ -5562,8 +5901,8 @@ var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
5562
5901
|
}
|
|
5563
5902
|
);
|
|
5564
5903
|
});
|
|
5565
|
-
Arrow$
|
|
5566
|
-
var Root$2 = Arrow$
|
|
5904
|
+
Arrow$2.displayName = NAME$1;
|
|
5905
|
+
var Root$2 = Arrow$2;
|
|
5567
5906
|
|
|
5568
5907
|
// packages/react/use-size/src/use-size.tsx
|
|
5569
5908
|
function useSize(element) {
|
|
@@ -5601,20 +5940,20 @@ function useSize(element) {
|
|
|
5601
5940
|
return size;
|
|
5602
5941
|
}
|
|
5603
5942
|
|
|
5604
|
-
var POPPER_NAME = "Popper";
|
|
5605
|
-
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
5606
|
-
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
5607
|
-
var Popper = (props) => {
|
|
5943
|
+
var POPPER_NAME$1 = "Popper";
|
|
5944
|
+
var [createPopperContext$1, createPopperScope$1] = createContextScope(POPPER_NAME$1);
|
|
5945
|
+
var [PopperProvider$1, usePopperContext$1] = createPopperContext$1(POPPER_NAME$1);
|
|
5946
|
+
var Popper$1 = (props) => {
|
|
5608
5947
|
const { __scopePopper, children } = props;
|
|
5609
5948
|
const [anchor, setAnchor] = React.useState(null);
|
|
5610
|
-
return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
5949
|
+
return /* @__PURE__ */ jsx(PopperProvider$1, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
5611
5950
|
};
|
|
5612
|
-
Popper.displayName = POPPER_NAME;
|
|
5613
|
-
var ANCHOR_NAME = "PopperAnchor";
|
|
5614
|
-
var PopperAnchor = React.forwardRef(
|
|
5951
|
+
Popper$1.displayName = POPPER_NAME$1;
|
|
5952
|
+
var ANCHOR_NAME$2 = "PopperAnchor";
|
|
5953
|
+
var PopperAnchor$1 = React.forwardRef(
|
|
5615
5954
|
(props, forwardedRef) => {
|
|
5616
5955
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
5617
|
-
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
5956
|
+
const context = usePopperContext$1(ANCHOR_NAME$2, __scopePopper);
|
|
5618
5957
|
const ref = React.useRef(null);
|
|
5619
5958
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
5620
5959
|
React.useEffect(() => {
|
|
@@ -5623,10 +5962,10 @@ var PopperAnchor = React.forwardRef(
|
|
|
5623
5962
|
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
5624
5963
|
}
|
|
5625
5964
|
);
|
|
5626
|
-
PopperAnchor.displayName = ANCHOR_NAME;
|
|
5627
|
-
var CONTENT_NAME$
|
|
5628
|
-
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$
|
|
5629
|
-
var PopperContent = React.forwardRef(
|
|
5965
|
+
PopperAnchor$1.displayName = ANCHOR_NAME$2;
|
|
5966
|
+
var CONTENT_NAME$5 = "PopperContent";
|
|
5967
|
+
var [PopperContentProvider$1, useContentContext$1] = createPopperContext$1(CONTENT_NAME$5);
|
|
5968
|
+
var PopperContent$1 = React.forwardRef(
|
|
5630
5969
|
(props, forwardedRef) => {
|
|
5631
5970
|
const {
|
|
5632
5971
|
__scopePopper,
|
|
@@ -5644,7 +5983,7 @@ var PopperContent = React.forwardRef(
|
|
|
5644
5983
|
onPlaced,
|
|
5645
5984
|
...contentProps
|
|
5646
5985
|
} = props;
|
|
5647
|
-
const context = usePopperContext(CONTENT_NAME$
|
|
5986
|
+
const context = usePopperContext$1(CONTENT_NAME$5, __scopePopper);
|
|
5648
5987
|
const [content, setContent] = React.useState(null);
|
|
5649
5988
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
5650
5989
|
const [arrow$1, setArrow] = React.useState(null);
|
|
@@ -5657,7 +5996,7 @@ var PopperContent = React.forwardRef(
|
|
|
5657
5996
|
const hasExplicitBoundaries = boundary.length > 0;
|
|
5658
5997
|
const detectOverflowOptions = {
|
|
5659
5998
|
padding: collisionPadding,
|
|
5660
|
-
boundary: boundary.filter(isNotNull),
|
|
5999
|
+
boundary: boundary.filter(isNotNull$1),
|
|
5661
6000
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
5662
6001
|
altBoundary: hasExplicitBoundaries
|
|
5663
6002
|
};
|
|
@@ -5695,11 +6034,11 @@ var PopperContent = React.forwardRef(
|
|
|
5695
6034
|
}
|
|
5696
6035
|
}),
|
|
5697
6036
|
arrow$1 && arrow({ element: arrow$1, padding: arrowPadding }),
|
|
5698
|
-
transformOrigin({ arrowWidth, arrowHeight }),
|
|
6037
|
+
transformOrigin$1({ arrowWidth, arrowHeight }),
|
|
5699
6038
|
hideWhenDetached && hide({ strategy: "referenceHidden", ...detectOverflowOptions })
|
|
5700
6039
|
]
|
|
5701
6040
|
});
|
|
5702
|
-
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
6041
|
+
const [placedSide, placedAlign] = getSideAndAlignFromPlacement$1(placement);
|
|
5703
6042
|
const handlePlaced = useCallbackRef$1(onPlaced);
|
|
5704
6043
|
useLayoutEffect2(() => {
|
|
5705
6044
|
if (isPositioned) {
|
|
@@ -5738,7 +6077,7 @@ var PopperContent = React.forwardRef(
|
|
|
5738
6077
|
},
|
|
5739
6078
|
dir: props.dir,
|
|
5740
6079
|
children: /* @__PURE__ */ jsx(
|
|
5741
|
-
PopperContentProvider,
|
|
6080
|
+
PopperContentProvider$1,
|
|
5742
6081
|
{
|
|
5743
6082
|
scope: __scopePopper,
|
|
5744
6083
|
placedSide,
|
|
@@ -5767,18 +6106,18 @@ var PopperContent = React.forwardRef(
|
|
|
5767
6106
|
);
|
|
5768
6107
|
}
|
|
5769
6108
|
);
|
|
5770
|
-
PopperContent.displayName = CONTENT_NAME$
|
|
5771
|
-
var ARROW_NAME$
|
|
5772
|
-
var OPPOSITE_SIDE = {
|
|
6109
|
+
PopperContent$1.displayName = CONTENT_NAME$5;
|
|
6110
|
+
var ARROW_NAME$3 = "PopperArrow";
|
|
6111
|
+
var OPPOSITE_SIDE$1 = {
|
|
5773
6112
|
top: "bottom",
|
|
5774
6113
|
right: "left",
|
|
5775
6114
|
bottom: "top",
|
|
5776
6115
|
left: "right"
|
|
5777
6116
|
};
|
|
5778
|
-
var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
6117
|
+
var PopperArrow$1 = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
5779
6118
|
const { __scopePopper, ...arrowProps } = props;
|
|
5780
|
-
const contentContext = useContentContext(ARROW_NAME$
|
|
5781
|
-
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
6119
|
+
const contentContext = useContentContext$1(ARROW_NAME$3, __scopePopper);
|
|
6120
|
+
const baseSide = OPPOSITE_SIDE$1[contentContext.placedSide];
|
|
5782
6121
|
return (
|
|
5783
6122
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
5784
6123
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -5822,11 +6161,11 @@ var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
|
5822
6161
|
)
|
|
5823
6162
|
);
|
|
5824
6163
|
});
|
|
5825
|
-
PopperArrow.displayName = ARROW_NAME$
|
|
5826
|
-
function isNotNull(value) {
|
|
6164
|
+
PopperArrow$1.displayName = ARROW_NAME$3;
|
|
6165
|
+
function isNotNull$1(value) {
|
|
5827
6166
|
return value !== null;
|
|
5828
6167
|
}
|
|
5829
|
-
var transformOrigin = (options) => ({
|
|
6168
|
+
var transformOrigin$1 = (options) => ({
|
|
5830
6169
|
name: "transformOrigin",
|
|
5831
6170
|
options,
|
|
5832
6171
|
fn(data) {
|
|
@@ -5835,7 +6174,7 @@ var transformOrigin = (options) => ({
|
|
|
5835
6174
|
const isArrowHidden = cannotCenterArrow;
|
|
5836
6175
|
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
5837
6176
|
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
5838
|
-
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
6177
|
+
const [placedSide, placedAlign] = getSideAndAlignFromPlacement$1(placement);
|
|
5839
6178
|
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
|
|
5840
6179
|
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
|
5841
6180
|
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
|
@@ -5857,24 +6196,24 @@ var transformOrigin = (options) => ({
|
|
|
5857
6196
|
return { data: { x, y } };
|
|
5858
6197
|
}
|
|
5859
6198
|
});
|
|
5860
|
-
function getSideAndAlignFromPlacement(placement) {
|
|
6199
|
+
function getSideAndAlignFromPlacement$1(placement) {
|
|
5861
6200
|
const [side, align = "center"] = placement.split("-");
|
|
5862
6201
|
return [side, align];
|
|
5863
6202
|
}
|
|
5864
|
-
var Root2$
|
|
5865
|
-
var Anchor = PopperAnchor;
|
|
5866
|
-
var Content$
|
|
5867
|
-
var Arrow = PopperArrow;
|
|
6203
|
+
var Root2$4 = Popper$1;
|
|
6204
|
+
var Anchor$1 = PopperAnchor$1;
|
|
6205
|
+
var Content$3 = PopperContent$1;
|
|
6206
|
+
var Arrow$1 = PopperArrow$1;
|
|
5868
6207
|
|
|
5869
|
-
var PORTAL_NAME$
|
|
5870
|
-
var Portal$
|
|
6208
|
+
var PORTAL_NAME$3 = "Portal";
|
|
6209
|
+
var Portal$3 = React.forwardRef((props, forwardedRef) => {
|
|
5871
6210
|
const { container: containerProp, ...portalProps } = props;
|
|
5872
6211
|
const [mounted, setMounted] = React.useState(false);
|
|
5873
6212
|
useLayoutEffect2(() => setMounted(true), []);
|
|
5874
6213
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
5875
6214
|
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
5876
6215
|
});
|
|
5877
|
-
Portal$
|
|
6216
|
+
Portal$3.displayName = PORTAL_NAME$3;
|
|
5878
6217
|
|
|
5879
6218
|
// packages/react/use-previous/src/use-previous.tsx
|
|
5880
6219
|
function usePrevious(value) {
|
|
@@ -6755,9 +7094,9 @@ var SELECT_NAME = "Select";
|
|
|
6755
7094
|
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(SELECT_NAME);
|
|
6756
7095
|
var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
|
|
6757
7096
|
createCollectionScope$1,
|
|
6758
|
-
createPopperScope
|
|
7097
|
+
createPopperScope$1
|
|
6759
7098
|
]);
|
|
6760
|
-
var usePopperScope = createPopperScope();
|
|
7099
|
+
var usePopperScope$1 = createPopperScope$1();
|
|
6761
7100
|
var [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME);
|
|
6762
7101
|
var [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME);
|
|
6763
7102
|
var Select$1 = (props) => {
|
|
@@ -6777,7 +7116,7 @@ var Select$1 = (props) => {
|
|
|
6777
7116
|
required,
|
|
6778
7117
|
form
|
|
6779
7118
|
} = props;
|
|
6780
|
-
const popperScope = usePopperScope(__scopeSelect);
|
|
7119
|
+
const popperScope = usePopperScope$1(__scopeSelect);
|
|
6781
7120
|
const [trigger, setTrigger] = React.useState(null);
|
|
6782
7121
|
const [valueNode, setValueNode] = React.useState(null);
|
|
6783
7122
|
const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false);
|
|
@@ -6798,7 +7137,7 @@ var Select$1 = (props) => {
|
|
|
6798
7137
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
|
6799
7138
|
const [nativeOptionsSet, setNativeOptionsSet] = React.useState(/* @__PURE__ */ new Set());
|
|
6800
7139
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
6801
|
-
return /* @__PURE__ */ jsx(Root2$
|
|
7140
|
+
return /* @__PURE__ */ jsx(Root2$4, { ...popperScope, children: /* @__PURE__ */ jsxs(
|
|
6802
7141
|
SelectProvider,
|
|
6803
7142
|
{
|
|
6804
7143
|
required,
|
|
@@ -6859,12 +7198,12 @@ var Select$1 = (props) => {
|
|
|
6859
7198
|
) });
|
|
6860
7199
|
};
|
|
6861
7200
|
Select$1.displayName = SELECT_NAME;
|
|
6862
|
-
var TRIGGER_NAME$
|
|
7201
|
+
var TRIGGER_NAME$3 = "SelectTrigger";
|
|
6863
7202
|
var SelectTrigger = React.forwardRef(
|
|
6864
7203
|
(props, forwardedRef) => {
|
|
6865
7204
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
6866
|
-
const popperScope = usePopperScope(__scopeSelect);
|
|
6867
|
-
const context = useSelectContext(TRIGGER_NAME$
|
|
7205
|
+
const popperScope = usePopperScope$1(__scopeSelect);
|
|
7206
|
+
const context = useSelectContext(TRIGGER_NAME$3, __scopeSelect);
|
|
6868
7207
|
const isDisabled = context.disabled || disabled;
|
|
6869
7208
|
const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
|
|
6870
7209
|
const getItems = useCollection$1(__scopeSelect);
|
|
@@ -6889,7 +7228,7 @@ var SelectTrigger = React.forwardRef(
|
|
|
6889
7228
|
};
|
|
6890
7229
|
}
|
|
6891
7230
|
};
|
|
6892
|
-
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
7231
|
+
return /* @__PURE__ */ jsx(Anchor$1, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
6893
7232
|
Primitive.button,
|
|
6894
7233
|
{
|
|
6895
7234
|
type: "button",
|
|
@@ -6905,13 +7244,13 @@ var SelectTrigger = React.forwardRef(
|
|
|
6905
7244
|
"data-placeholder": shouldShowPlaceholder(context.value) ? "" : void 0,
|
|
6906
7245
|
...triggerProps,
|
|
6907
7246
|
ref: composedRefs,
|
|
6908
|
-
onClick: composeEventHandlers(triggerProps.onClick, (event) => {
|
|
7247
|
+
onClick: composeEventHandlers$1(triggerProps.onClick, (event) => {
|
|
6909
7248
|
event.currentTarget.focus();
|
|
6910
7249
|
if (pointerTypeRef.current !== "mouse") {
|
|
6911
7250
|
handleOpen(event);
|
|
6912
7251
|
}
|
|
6913
7252
|
}),
|
|
6914
|
-
onPointerDown: composeEventHandlers(triggerProps.onPointerDown, (event) => {
|
|
7253
|
+
onPointerDown: composeEventHandlers$1(triggerProps.onPointerDown, (event) => {
|
|
6915
7254
|
pointerTypeRef.current = event.pointerType;
|
|
6916
7255
|
const target = event.target;
|
|
6917
7256
|
if (target.hasPointerCapture(event.pointerId)) {
|
|
@@ -6922,7 +7261,7 @@ var SelectTrigger = React.forwardRef(
|
|
|
6922
7261
|
event.preventDefault();
|
|
6923
7262
|
}
|
|
6924
7263
|
}),
|
|
6925
|
-
onKeyDown: composeEventHandlers(triggerProps.onKeyDown, (event) => {
|
|
7264
|
+
onKeyDown: composeEventHandlers$1(triggerProps.onKeyDown, (event) => {
|
|
6926
7265
|
const isTypingAhead = searchRef.current !== "";
|
|
6927
7266
|
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
6928
7267
|
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);
|
|
@@ -6936,7 +7275,7 @@ var SelectTrigger = React.forwardRef(
|
|
|
6936
7275
|
) });
|
|
6937
7276
|
}
|
|
6938
7277
|
);
|
|
6939
|
-
SelectTrigger.displayName = TRIGGER_NAME$
|
|
7278
|
+
SelectTrigger.displayName = TRIGGER_NAME$3;
|
|
6940
7279
|
var VALUE_NAME = "SelectValue";
|
|
6941
7280
|
var SelectValue = React.forwardRef(
|
|
6942
7281
|
(props, forwardedRef) => {
|
|
@@ -6968,15 +7307,15 @@ var SelectIcon = React.forwardRef(
|
|
|
6968
7307
|
}
|
|
6969
7308
|
);
|
|
6970
7309
|
SelectIcon.displayName = ICON_NAME;
|
|
6971
|
-
var PORTAL_NAME$
|
|
7310
|
+
var PORTAL_NAME$2 = "SelectPortal";
|
|
6972
7311
|
var SelectPortal = (props) => {
|
|
6973
|
-
return /* @__PURE__ */ jsx(Portal$
|
|
7312
|
+
return /* @__PURE__ */ jsx(Portal$3, { asChild: true, ...props });
|
|
6974
7313
|
};
|
|
6975
|
-
SelectPortal.displayName = PORTAL_NAME$
|
|
6976
|
-
var CONTENT_NAME$
|
|
7314
|
+
SelectPortal.displayName = PORTAL_NAME$2;
|
|
7315
|
+
var CONTENT_NAME$4 = "SelectContent";
|
|
6977
7316
|
var SelectContent = React.forwardRef(
|
|
6978
7317
|
(props, forwardedRef) => {
|
|
6979
|
-
const context = useSelectContext(CONTENT_NAME$
|
|
7318
|
+
const context = useSelectContext(CONTENT_NAME$4, props.__scopeSelect);
|
|
6980
7319
|
const [fragment, setFragment] = React.useState();
|
|
6981
7320
|
useLayoutEffect2(() => {
|
|
6982
7321
|
setFragment(new DocumentFragment());
|
|
@@ -6991,11 +7330,11 @@ var SelectContent = React.forwardRef(
|
|
|
6991
7330
|
return /* @__PURE__ */ jsx(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
6992
7331
|
}
|
|
6993
7332
|
);
|
|
6994
|
-
SelectContent.displayName = CONTENT_NAME$
|
|
7333
|
+
SelectContent.displayName = CONTENT_NAME$4;
|
|
6995
7334
|
var CONTENT_MARGIN = 10;
|
|
6996
|
-
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$
|
|
7335
|
+
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$4);
|
|
6997
7336
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
6998
|
-
var Slot$
|
|
7337
|
+
var Slot$2 = createSlot("SelectContent.RemoveScroll");
|
|
6999
7338
|
var SelectContentImpl = React.forwardRef(
|
|
7000
7339
|
(props, forwardedRef) => {
|
|
7001
7340
|
const {
|
|
@@ -7019,7 +7358,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7019
7358
|
//
|
|
7020
7359
|
...contentProps
|
|
7021
7360
|
} = props;
|
|
7022
|
-
const context = useSelectContext(CONTENT_NAME$
|
|
7361
|
+
const context = useSelectContext(CONTENT_NAME$4, __scopeSelect);
|
|
7023
7362
|
const [content, setContent] = React.useState(null);
|
|
7024
7363
|
const [viewport, setViewport] = React.useState(null);
|
|
7025
7364
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
@@ -7033,7 +7372,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7033
7372
|
React.useEffect(() => {
|
|
7034
7373
|
if (content) return hideOthers(content);
|
|
7035
7374
|
}, [content]);
|
|
7036
|
-
useFocusGuards();
|
|
7375
|
+
useFocusGuards$1();
|
|
7037
7376
|
const focusFirst = React.useCallback(
|
|
7038
7377
|
(candidates) => {
|
|
7039
7378
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
@@ -7158,7 +7497,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7158
7497
|
position,
|
|
7159
7498
|
isPositioned,
|
|
7160
7499
|
searchRef,
|
|
7161
|
-
children: /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot$
|
|
7500
|
+
children: /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot$2, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
|
|
7162
7501
|
FocusScope,
|
|
7163
7502
|
{
|
|
7164
7503
|
asChild: true,
|
|
@@ -7166,12 +7505,12 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7166
7505
|
onMountAutoFocus: (event) => {
|
|
7167
7506
|
event.preventDefault();
|
|
7168
7507
|
},
|
|
7169
|
-
onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (event) => {
|
|
7508
|
+
onUnmountAutoFocus: composeEventHandlers$1(onCloseAutoFocus, (event) => {
|
|
7170
7509
|
context.trigger?.focus({ preventScroll: true });
|
|
7171
7510
|
event.preventDefault();
|
|
7172
7511
|
}),
|
|
7173
7512
|
children: /* @__PURE__ */ jsx(
|
|
7174
|
-
DismissableLayer,
|
|
7513
|
+
DismissableLayer$1,
|
|
7175
7514
|
{
|
|
7176
7515
|
asChild: true,
|
|
7177
7516
|
disableOutsidePointerEvents: true,
|
|
@@ -7199,7 +7538,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7199
7538
|
outline: "none",
|
|
7200
7539
|
...contentProps.style
|
|
7201
7540
|
},
|
|
7202
|
-
onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {
|
|
7541
|
+
onKeyDown: composeEventHandlers$1(contentProps.onKeyDown, (event) => {
|
|
7203
7542
|
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
7204
7543
|
if (event.key === "Tab") event.preventDefault();
|
|
7205
7544
|
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);
|
|
@@ -7232,8 +7571,8 @@ SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
|
7232
7571
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
7233
7572
|
var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
7234
7573
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
7235
|
-
const context = useSelectContext(CONTENT_NAME$
|
|
7236
|
-
const contentContext = useSelectContentContext(CONTENT_NAME$
|
|
7574
|
+
const context = useSelectContext(CONTENT_NAME$4, __scopeSelect);
|
|
7575
|
+
const contentContext = useSelectContentContext(CONTENT_NAME$4, __scopeSelect);
|
|
7237
7576
|
const [contentWrapper, setContentWrapper] = React.useState(null);
|
|
7238
7577
|
const [content, setContent] = React.useState(null);
|
|
7239
7578
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
@@ -7401,9 +7740,9 @@ var SelectPopperPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
7401
7740
|
collisionPadding = CONTENT_MARGIN,
|
|
7402
7741
|
...popperProps
|
|
7403
7742
|
} = props;
|
|
7404
|
-
const popperScope = usePopperScope(__scopeSelect);
|
|
7743
|
+
const popperScope = usePopperScope$1(__scopeSelect);
|
|
7405
7744
|
return /* @__PURE__ */ jsx(
|
|
7406
|
-
Content$
|
|
7745
|
+
Content$3,
|
|
7407
7746
|
{
|
|
7408
7747
|
...popperScope,
|
|
7409
7748
|
...popperProps,
|
|
@@ -7427,7 +7766,7 @@ var SelectPopperPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
7427
7766
|
);
|
|
7428
7767
|
});
|
|
7429
7768
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
7430
|
-
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME$
|
|
7769
|
+
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME$4, {});
|
|
7431
7770
|
var VIEWPORT_NAME = "SelectViewport";
|
|
7432
7771
|
var SelectViewport = React.forwardRef(
|
|
7433
7772
|
(props, forwardedRef) => {
|
|
@@ -7466,7 +7805,7 @@ var SelectViewport = React.forwardRef(
|
|
|
7466
7805
|
overflow: "hidden auto",
|
|
7467
7806
|
...viewportProps.style
|
|
7468
7807
|
},
|
|
7469
|
-
onScroll: composeEventHandlers(viewportProps.onScroll, (event) => {
|
|
7808
|
+
onScroll: composeEventHandlers$1(viewportProps.onScroll, (event) => {
|
|
7470
7809
|
const viewport = event.currentTarget;
|
|
7471
7810
|
const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;
|
|
7472
7811
|
if (shouldExpandOnScrollRef?.current && contentWrapper) {
|
|
@@ -7579,18 +7918,18 @@ var SelectItem = React.forwardRef(
|
|
|
7579
7918
|
tabIndex: disabled ? void 0 : -1,
|
|
7580
7919
|
...itemProps,
|
|
7581
7920
|
ref: composedRefs,
|
|
7582
|
-
onFocus: composeEventHandlers(itemProps.onFocus, () => setIsFocused(true)),
|
|
7583
|
-
onBlur: composeEventHandlers(itemProps.onBlur, () => setIsFocused(false)),
|
|
7584
|
-
onClick: composeEventHandlers(itemProps.onClick, () => {
|
|
7921
|
+
onFocus: composeEventHandlers$1(itemProps.onFocus, () => setIsFocused(true)),
|
|
7922
|
+
onBlur: composeEventHandlers$1(itemProps.onBlur, () => setIsFocused(false)),
|
|
7923
|
+
onClick: composeEventHandlers$1(itemProps.onClick, () => {
|
|
7585
7924
|
if (pointerTypeRef.current !== "mouse") handleSelect();
|
|
7586
7925
|
}),
|
|
7587
|
-
onPointerUp: composeEventHandlers(itemProps.onPointerUp, () => {
|
|
7926
|
+
onPointerUp: composeEventHandlers$1(itemProps.onPointerUp, () => {
|
|
7588
7927
|
if (pointerTypeRef.current === "mouse") handleSelect();
|
|
7589
7928
|
}),
|
|
7590
|
-
onPointerDown: composeEventHandlers(itemProps.onPointerDown, (event) => {
|
|
7929
|
+
onPointerDown: composeEventHandlers$1(itemProps.onPointerDown, (event) => {
|
|
7591
7930
|
pointerTypeRef.current = event.pointerType;
|
|
7592
7931
|
}),
|
|
7593
|
-
onPointerMove: composeEventHandlers(itemProps.onPointerMove, (event) => {
|
|
7932
|
+
onPointerMove: composeEventHandlers$1(itemProps.onPointerMove, (event) => {
|
|
7594
7933
|
pointerTypeRef.current = event.pointerType;
|
|
7595
7934
|
if (disabled) {
|
|
7596
7935
|
contentContext.onItemLeave?.();
|
|
@@ -7598,12 +7937,12 @@ var SelectItem = React.forwardRef(
|
|
|
7598
7937
|
event.currentTarget.focus({ preventScroll: true });
|
|
7599
7938
|
}
|
|
7600
7939
|
}),
|
|
7601
|
-
onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (event) => {
|
|
7940
|
+
onPointerLeave: composeEventHandlers$1(itemProps.onPointerLeave, (event) => {
|
|
7602
7941
|
if (event.currentTarget === document.activeElement) {
|
|
7603
7942
|
contentContext.onItemLeave?.();
|
|
7604
7943
|
}
|
|
7605
7944
|
}),
|
|
7606
|
-
onKeyDown: composeEventHandlers(itemProps.onKeyDown, (event) => {
|
|
7945
|
+
onKeyDown: composeEventHandlers$1(itemProps.onKeyDown, (event) => {
|
|
7607
7946
|
const isTypingAhead = contentContext.searchRef?.current !== "";
|
|
7608
7947
|
if (isTypingAhead && event.key === " ") return;
|
|
7609
7948
|
if (SELECTION_KEYS.includes(event.key)) handleSelect();
|
|
@@ -7751,18 +8090,18 @@ var SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
7751
8090
|
...scrollIndicatorProps,
|
|
7752
8091
|
ref: forwardedRef,
|
|
7753
8092
|
style: { flexShrink: 0, ...scrollIndicatorProps.style },
|
|
7754
|
-
onPointerDown: composeEventHandlers(scrollIndicatorProps.onPointerDown, () => {
|
|
8093
|
+
onPointerDown: composeEventHandlers$1(scrollIndicatorProps.onPointerDown, () => {
|
|
7755
8094
|
if (autoScrollTimerRef.current === null) {
|
|
7756
8095
|
autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
|
7757
8096
|
}
|
|
7758
8097
|
}),
|
|
7759
|
-
onPointerMove: composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {
|
|
8098
|
+
onPointerMove: composeEventHandlers$1(scrollIndicatorProps.onPointerMove, () => {
|
|
7760
8099
|
contentContext.onItemLeave?.();
|
|
7761
8100
|
if (autoScrollTimerRef.current === null) {
|
|
7762
8101
|
autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
|
7763
8102
|
}
|
|
7764
8103
|
}),
|
|
7765
|
-
onPointerLeave: composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {
|
|
8104
|
+
onPointerLeave: composeEventHandlers$1(scrollIndicatorProps.onPointerLeave, () => {
|
|
7766
8105
|
clearAutoScrollTimer();
|
|
7767
8106
|
})
|
|
7768
8107
|
}
|
|
@@ -7776,17 +8115,17 @@ var SelectSeparator = React.forwardRef(
|
|
|
7776
8115
|
}
|
|
7777
8116
|
);
|
|
7778
8117
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
7779
|
-
var ARROW_NAME = "SelectArrow";
|
|
8118
|
+
var ARROW_NAME$2 = "SelectArrow";
|
|
7780
8119
|
var SelectArrow = React.forwardRef(
|
|
7781
8120
|
(props, forwardedRef) => {
|
|
7782
8121
|
const { __scopeSelect, ...arrowProps } = props;
|
|
7783
|
-
const popperScope = usePopperScope(__scopeSelect);
|
|
7784
|
-
const context = useSelectContext(ARROW_NAME, __scopeSelect);
|
|
7785
|
-
const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);
|
|
7786
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
8122
|
+
const popperScope = usePopperScope$1(__scopeSelect);
|
|
8123
|
+
const context = useSelectContext(ARROW_NAME$2, __scopeSelect);
|
|
8124
|
+
const contentContext = useSelectContentContext(ARROW_NAME$2, __scopeSelect);
|
|
8125
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx(Arrow$1, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
7787
8126
|
}
|
|
7788
8127
|
);
|
|
7789
|
-
SelectArrow.displayName = ARROW_NAME;
|
|
8128
|
+
SelectArrow.displayName = ARROW_NAME$2;
|
|
7790
8129
|
var BUBBLE_INPUT_NAME = "SelectBubbleInput";
|
|
7791
8130
|
var SelectBubbleInput = React.forwardRef(
|
|
7792
8131
|
({ __scopeSelect, value, ...props }, forwardedRef) => {
|
|
@@ -7863,12 +8202,12 @@ function findNextItem(items, search, currentItem) {
|
|
|
7863
8202
|
function wrapArray$1(array, startIndex) {
|
|
7864
8203
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
7865
8204
|
}
|
|
7866
|
-
var Root2$
|
|
7867
|
-
var Trigger$
|
|
8205
|
+
var Root2$3 = Select$1;
|
|
8206
|
+
var Trigger$3 = SelectTrigger;
|
|
7868
8207
|
var Value = SelectValue;
|
|
7869
8208
|
var Icon = SelectIcon;
|
|
7870
|
-
var Portal$
|
|
7871
|
-
var Content2 = SelectContent;
|
|
8209
|
+
var Portal$2 = SelectPortal;
|
|
8210
|
+
var Content2$1 = SelectContent;
|
|
7872
8211
|
var Viewport = SelectViewport;
|
|
7873
8212
|
var Item$1 = SelectItem;
|
|
7874
8213
|
var ItemText = SelectItemText;
|
|
@@ -8029,13 +8368,13 @@ const Select = _a => {
|
|
|
8029
8368
|
const iconClasses = selectIcon({
|
|
8030
8369
|
size
|
|
8031
8370
|
});
|
|
8032
|
-
return jsxs(Root2$
|
|
8371
|
+
return jsxs(Root2$3, {
|
|
8033
8372
|
value: value,
|
|
8034
8373
|
defaultValue: defaultValue,
|
|
8035
8374
|
onValueChange: onChange,
|
|
8036
8375
|
disabled: disabled,
|
|
8037
8376
|
name: name,
|
|
8038
|
-
children: [jsxs(Trigger$
|
|
8377
|
+
children: [jsxs(Trigger$3, {
|
|
8039
8378
|
className: triggerClasses,
|
|
8040
8379
|
children: [jsx("div", {
|
|
8041
8380
|
className: 'w-full flex-1 text-left',
|
|
@@ -8048,8 +8387,8 @@ const Select = _a => {
|
|
|
8048
8387
|
className: iconClasses
|
|
8049
8388
|
})
|
|
8050
8389
|
})]
|
|
8051
|
-
}), jsx(Portal$
|
|
8052
|
-
children: jsx(Content2, {
|
|
8390
|
+
}), jsx(Portal$2, {
|
|
8391
|
+
children: jsx(Content2$1, {
|
|
8053
8392
|
className: contentClasses,
|
|
8054
8393
|
position: 'popper',
|
|
8055
8394
|
sideOffset: 5,
|
|
@@ -9287,96 +9626,1028 @@ function NotActive(_a) {
|
|
|
9287
9626
|
}));
|
|
9288
9627
|
}
|
|
9289
9628
|
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
navigator.clipboard.writeText(copyText).then(() => {
|
|
9299
|
-
const result = {
|
|
9300
|
-
status: true
|
|
9301
|
-
};
|
|
9302
|
-
callback === null || callback === void 0 ? void 0 : callback(result);
|
|
9303
|
-
}).catch(err => {
|
|
9304
|
-
const result = {
|
|
9305
|
-
status: false,
|
|
9306
|
-
message: err
|
|
9307
|
-
};
|
|
9308
|
-
callback === null || callback === void 0 ? void 0 : callback(result);
|
|
9309
|
-
});
|
|
9629
|
+
// src/primitive.tsx
|
|
9630
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9631
|
+
return function handleEvent(event) {
|
|
9632
|
+
originalEventHandler?.(event);
|
|
9633
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
9634
|
+
return ourEventHandler?.(event);
|
|
9635
|
+
}
|
|
9636
|
+
};
|
|
9310
9637
|
}
|
|
9311
9638
|
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
}
|
|
9639
|
+
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
9640
|
+
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
9641
|
+
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
9642
|
+
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
9643
|
+
var originalBodyPointerEvents;
|
|
9644
|
+
var DismissableLayerContext = React.createContext({
|
|
9645
|
+
layers: /* @__PURE__ */ new Set(),
|
|
9646
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
9647
|
+
branches: /* @__PURE__ */ new Set()
|
|
9322
9648
|
});
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
}
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9649
|
+
var DismissableLayer = React.forwardRef(
|
|
9650
|
+
(props, forwardedRef) => {
|
|
9651
|
+
const {
|
|
9652
|
+
disableOutsidePointerEvents = false,
|
|
9653
|
+
onEscapeKeyDown,
|
|
9654
|
+
onPointerDownOutside,
|
|
9655
|
+
onFocusOutside,
|
|
9656
|
+
onInteractOutside,
|
|
9657
|
+
onDismiss,
|
|
9658
|
+
...layerProps
|
|
9659
|
+
} = props;
|
|
9660
|
+
const context = React.useContext(DismissableLayerContext);
|
|
9661
|
+
const [node, setNode] = React.useState(null);
|
|
9662
|
+
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
9663
|
+
const [, force] = React.useState({});
|
|
9664
|
+
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
9665
|
+
const layers = Array.from(context.layers);
|
|
9666
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
9667
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
9668
|
+
const index = node ? layers.indexOf(node) : -1;
|
|
9669
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
9670
|
+
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
9671
|
+
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
9672
|
+
const target = event.target;
|
|
9673
|
+
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
9674
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
9675
|
+
onPointerDownOutside?.(event);
|
|
9676
|
+
onInteractOutside?.(event);
|
|
9677
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
9678
|
+
}, ownerDocument);
|
|
9679
|
+
const focusOutside = useFocusOutside((event) => {
|
|
9680
|
+
const target = event.target;
|
|
9681
|
+
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
9682
|
+
if (isFocusInBranch) return;
|
|
9683
|
+
onFocusOutside?.(event);
|
|
9684
|
+
onInteractOutside?.(event);
|
|
9685
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
9686
|
+
}, ownerDocument);
|
|
9687
|
+
useEscapeKeydown((event) => {
|
|
9688
|
+
const isHighestLayer = index === context.layers.size - 1;
|
|
9689
|
+
if (!isHighestLayer) return;
|
|
9690
|
+
onEscapeKeyDown?.(event);
|
|
9691
|
+
if (!event.defaultPrevented && onDismiss) {
|
|
9692
|
+
event.preventDefault();
|
|
9693
|
+
onDismiss();
|
|
9694
|
+
}
|
|
9695
|
+
}, ownerDocument);
|
|
9696
|
+
React.useEffect(() => {
|
|
9697
|
+
if (!node) return;
|
|
9698
|
+
if (disableOutsidePointerEvents) {
|
|
9699
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
9700
|
+
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
9701
|
+
ownerDocument.body.style.pointerEvents = "none";
|
|
9702
|
+
}
|
|
9703
|
+
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
9704
|
+
}
|
|
9705
|
+
context.layers.add(node);
|
|
9706
|
+
dispatchUpdate();
|
|
9707
|
+
return () => {
|
|
9708
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
9709
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
9710
|
+
}
|
|
9711
|
+
};
|
|
9712
|
+
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
9713
|
+
React.useEffect(() => {
|
|
9714
|
+
return () => {
|
|
9715
|
+
if (!node) return;
|
|
9716
|
+
context.layers.delete(node);
|
|
9717
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
9718
|
+
dispatchUpdate();
|
|
9719
|
+
};
|
|
9720
|
+
}, [node, context]);
|
|
9721
|
+
React.useEffect(() => {
|
|
9722
|
+
const handleUpdate = () => force({});
|
|
9723
|
+
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
9724
|
+
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
9725
|
+
}, []);
|
|
9726
|
+
return /* @__PURE__ */ jsx(
|
|
9727
|
+
Primitive.div,
|
|
9728
|
+
{
|
|
9729
|
+
...layerProps,
|
|
9730
|
+
ref: composedRefs,
|
|
9731
|
+
style: {
|
|
9732
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
9733
|
+
...props.style
|
|
9734
|
+
},
|
|
9735
|
+
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
9736
|
+
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
9737
|
+
onPointerDownCapture: composeEventHandlers(
|
|
9738
|
+
props.onPointerDownCapture,
|
|
9739
|
+
pointerDownOutside.onPointerDownCapture
|
|
9740
|
+
)
|
|
9741
|
+
}
|
|
9742
|
+
);
|
|
9375
9743
|
}
|
|
9744
|
+
);
|
|
9745
|
+
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
9746
|
+
var BRANCH_NAME = "DismissableLayerBranch";
|
|
9747
|
+
var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|
9748
|
+
const context = React.useContext(DismissableLayerContext);
|
|
9749
|
+
const ref = React.useRef(null);
|
|
9750
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
9751
|
+
React.useEffect(() => {
|
|
9752
|
+
const node = ref.current;
|
|
9753
|
+
if (node) {
|
|
9754
|
+
context.branches.add(node);
|
|
9755
|
+
return () => {
|
|
9756
|
+
context.branches.delete(node);
|
|
9757
|
+
};
|
|
9758
|
+
}
|
|
9759
|
+
}, [context.branches]);
|
|
9760
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
9376
9761
|
});
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9762
|
+
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
9763
|
+
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
9764
|
+
const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
|
|
9765
|
+
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
9766
|
+
const handleClickRef = React.useRef(() => {
|
|
9767
|
+
});
|
|
9768
|
+
React.useEffect(() => {
|
|
9769
|
+
const handlePointerDown = (event) => {
|
|
9770
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
9771
|
+
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
9772
|
+
handleAndDispatchCustomEvent(
|
|
9773
|
+
POINTER_DOWN_OUTSIDE,
|
|
9774
|
+
handlePointerDownOutside,
|
|
9775
|
+
eventDetail,
|
|
9776
|
+
{ discrete: true }
|
|
9777
|
+
);
|
|
9778
|
+
};
|
|
9779
|
+
const eventDetail = { originalEvent: event };
|
|
9780
|
+
if (event.pointerType === "touch") {
|
|
9781
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9782
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
9783
|
+
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
9784
|
+
} else {
|
|
9785
|
+
handleAndDispatchPointerDownOutsideEvent2();
|
|
9786
|
+
}
|
|
9787
|
+
} else {
|
|
9788
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9789
|
+
}
|
|
9790
|
+
isPointerInsideReactTreeRef.current = false;
|
|
9791
|
+
};
|
|
9792
|
+
const timerId = window.setTimeout(() => {
|
|
9793
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
9794
|
+
}, 0);
|
|
9795
|
+
return () => {
|
|
9796
|
+
window.clearTimeout(timerId);
|
|
9797
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
9798
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9799
|
+
};
|
|
9800
|
+
}, [ownerDocument, handlePointerDownOutside]);
|
|
9801
|
+
return {
|
|
9802
|
+
// ensures we check React component tree (not just DOM tree)
|
|
9803
|
+
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
9804
|
+
};
|
|
9805
|
+
}
|
|
9806
|
+
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
9807
|
+
const handleFocusOutside = useCallbackRef$1(onFocusOutside);
|
|
9808
|
+
const isFocusInsideReactTreeRef = React.useRef(false);
|
|
9809
|
+
React.useEffect(() => {
|
|
9810
|
+
const handleFocus = (event) => {
|
|
9811
|
+
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
9812
|
+
const eventDetail = { originalEvent: event };
|
|
9813
|
+
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
9814
|
+
discrete: false
|
|
9815
|
+
});
|
|
9816
|
+
}
|
|
9817
|
+
};
|
|
9818
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
|
9819
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
9820
|
+
}, [ownerDocument, handleFocusOutside]);
|
|
9821
|
+
return {
|
|
9822
|
+
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
9823
|
+
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
9824
|
+
};
|
|
9825
|
+
}
|
|
9826
|
+
function dispatchUpdate() {
|
|
9827
|
+
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
9828
|
+
document.dispatchEvent(event);
|
|
9829
|
+
}
|
|
9830
|
+
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
9831
|
+
const target = detail.originalEvent.target;
|
|
9832
|
+
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
9833
|
+
if (handler) target.addEventListener(name, handler, { once: true });
|
|
9834
|
+
if (discrete) {
|
|
9835
|
+
dispatchDiscreteCustomEvent(target, event);
|
|
9836
|
+
} else {
|
|
9837
|
+
target.dispatchEvent(event);
|
|
9838
|
+
}
|
|
9839
|
+
}
|
|
9840
|
+
|
|
9841
|
+
var count = 0;
|
|
9842
|
+
function useFocusGuards() {
|
|
9843
|
+
React.useEffect(() => {
|
|
9844
|
+
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
9845
|
+
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
9846
|
+
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
9847
|
+
count++;
|
|
9848
|
+
return () => {
|
|
9849
|
+
if (count === 1) {
|
|
9850
|
+
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
9851
|
+
}
|
|
9852
|
+
count--;
|
|
9853
|
+
};
|
|
9854
|
+
}, []);
|
|
9855
|
+
}
|
|
9856
|
+
function createFocusGuard() {
|
|
9857
|
+
const element = document.createElement("span");
|
|
9858
|
+
element.setAttribute("data-radix-focus-guard", "");
|
|
9859
|
+
element.tabIndex = 0;
|
|
9860
|
+
element.style.outline = "none";
|
|
9861
|
+
element.style.opacity = "0";
|
|
9862
|
+
element.style.position = "fixed";
|
|
9863
|
+
element.style.pointerEvents = "none";
|
|
9864
|
+
return element;
|
|
9865
|
+
}
|
|
9866
|
+
|
|
9867
|
+
var POPPER_NAME = "Popper";
|
|
9868
|
+
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
9869
|
+
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
9870
|
+
var Popper = (props) => {
|
|
9871
|
+
const { __scopePopper, children } = props;
|
|
9872
|
+
const [anchor, setAnchor] = React.useState(null);
|
|
9873
|
+
return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
9874
|
+
};
|
|
9875
|
+
Popper.displayName = POPPER_NAME;
|
|
9876
|
+
var ANCHOR_NAME$1 = "PopperAnchor";
|
|
9877
|
+
var PopperAnchor = React.forwardRef(
|
|
9878
|
+
(props, forwardedRef) => {
|
|
9879
|
+
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
9880
|
+
const context = usePopperContext(ANCHOR_NAME$1, __scopePopper);
|
|
9881
|
+
const ref = React.useRef(null);
|
|
9882
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
9883
|
+
const anchorRef = React.useRef(null);
|
|
9884
|
+
React.useEffect(() => {
|
|
9885
|
+
const previousAnchor = anchorRef.current;
|
|
9886
|
+
anchorRef.current = virtualRef?.current || ref.current;
|
|
9887
|
+
if (previousAnchor !== anchorRef.current) {
|
|
9888
|
+
context.onAnchorChange(anchorRef.current);
|
|
9889
|
+
}
|
|
9890
|
+
});
|
|
9891
|
+
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
9892
|
+
}
|
|
9893
|
+
);
|
|
9894
|
+
PopperAnchor.displayName = ANCHOR_NAME$1;
|
|
9895
|
+
var CONTENT_NAME$3 = "PopperContent";
|
|
9896
|
+
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$3);
|
|
9897
|
+
var PopperContent = React.forwardRef(
|
|
9898
|
+
(props, forwardedRef) => {
|
|
9899
|
+
const {
|
|
9900
|
+
__scopePopper,
|
|
9901
|
+
side = "bottom",
|
|
9902
|
+
sideOffset = 0,
|
|
9903
|
+
align = "center",
|
|
9904
|
+
alignOffset = 0,
|
|
9905
|
+
arrowPadding = 0,
|
|
9906
|
+
avoidCollisions = true,
|
|
9907
|
+
collisionBoundary = [],
|
|
9908
|
+
collisionPadding: collisionPaddingProp = 0,
|
|
9909
|
+
sticky = "partial",
|
|
9910
|
+
hideWhenDetached = false,
|
|
9911
|
+
updatePositionStrategy = "optimized",
|
|
9912
|
+
onPlaced,
|
|
9913
|
+
...contentProps
|
|
9914
|
+
} = props;
|
|
9915
|
+
const context = usePopperContext(CONTENT_NAME$3, __scopePopper);
|
|
9916
|
+
const [content, setContent] = React.useState(null);
|
|
9917
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
9918
|
+
const [arrow$1, setArrow] = React.useState(null);
|
|
9919
|
+
const arrowSize = useSize(arrow$1);
|
|
9920
|
+
const arrowWidth = arrowSize?.width ?? 0;
|
|
9921
|
+
const arrowHeight = arrowSize?.height ?? 0;
|
|
9922
|
+
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
9923
|
+
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };
|
|
9924
|
+
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
|
|
9925
|
+
const hasExplicitBoundaries = boundary.length > 0;
|
|
9926
|
+
const detectOverflowOptions = {
|
|
9927
|
+
padding: collisionPadding,
|
|
9928
|
+
boundary: boundary.filter(isNotNull),
|
|
9929
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
9930
|
+
altBoundary: hasExplicitBoundaries
|
|
9931
|
+
};
|
|
9932
|
+
const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({
|
|
9933
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
9934
|
+
strategy: "fixed",
|
|
9935
|
+
placement: desiredPlacement,
|
|
9936
|
+
whileElementsMounted: (...args) => {
|
|
9937
|
+
const cleanup = autoUpdate(...args, {
|
|
9938
|
+
animationFrame: updatePositionStrategy === "always"
|
|
9939
|
+
});
|
|
9940
|
+
return cleanup;
|
|
9941
|
+
},
|
|
9942
|
+
elements: {
|
|
9943
|
+
reference: context.anchor
|
|
9944
|
+
},
|
|
9945
|
+
middleware: [
|
|
9946
|
+
offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),
|
|
9947
|
+
avoidCollisions && shift({
|
|
9948
|
+
mainAxis: true,
|
|
9949
|
+
crossAxis: false,
|
|
9950
|
+
limiter: sticky === "partial" ? limitShift() : void 0,
|
|
9951
|
+
...detectOverflowOptions
|
|
9952
|
+
}),
|
|
9953
|
+
avoidCollisions && flip({ ...detectOverflowOptions }),
|
|
9954
|
+
size({
|
|
9955
|
+
...detectOverflowOptions,
|
|
9956
|
+
apply: ({ elements, rects, availableWidth, availableHeight }) => {
|
|
9957
|
+
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
|
9958
|
+
const contentStyle = elements.floating.style;
|
|
9959
|
+
contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`);
|
|
9960
|
+
contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`);
|
|
9961
|
+
contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`);
|
|
9962
|
+
contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`);
|
|
9963
|
+
}
|
|
9964
|
+
}),
|
|
9965
|
+
arrow$1 && arrow({ element: arrow$1, padding: arrowPadding }),
|
|
9966
|
+
transformOrigin({ arrowWidth, arrowHeight }),
|
|
9967
|
+
hideWhenDetached && hide({ strategy: "referenceHidden", ...detectOverflowOptions })
|
|
9968
|
+
]
|
|
9969
|
+
});
|
|
9970
|
+
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
9971
|
+
const handlePlaced = useCallbackRef$1(onPlaced);
|
|
9972
|
+
useLayoutEffect2(() => {
|
|
9973
|
+
if (isPositioned) {
|
|
9974
|
+
handlePlaced?.();
|
|
9975
|
+
}
|
|
9976
|
+
}, [isPositioned, handlePlaced]);
|
|
9977
|
+
const arrowX = middlewareData.arrow?.x;
|
|
9978
|
+
const arrowY = middlewareData.arrow?.y;
|
|
9979
|
+
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
9980
|
+
const [contentZIndex, setContentZIndex] = React.useState();
|
|
9981
|
+
useLayoutEffect2(() => {
|
|
9982
|
+
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
9983
|
+
}, [content]);
|
|
9984
|
+
return /* @__PURE__ */ jsx(
|
|
9985
|
+
"div",
|
|
9986
|
+
{
|
|
9987
|
+
ref: refs.setFloating,
|
|
9988
|
+
"data-radix-popper-content-wrapper": "",
|
|
9989
|
+
style: {
|
|
9990
|
+
...floatingStyles,
|
|
9991
|
+
transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
|
|
9992
|
+
// keep off the page when measuring
|
|
9993
|
+
minWidth: "max-content",
|
|
9994
|
+
zIndex: contentZIndex,
|
|
9995
|
+
["--radix-popper-transform-origin"]: [
|
|
9996
|
+
middlewareData.transformOrigin?.x,
|
|
9997
|
+
middlewareData.transformOrigin?.y
|
|
9998
|
+
].join(" "),
|
|
9999
|
+
// hide the content if using the hide middleware and should be hidden
|
|
10000
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
10001
|
+
// as if the PopperContent isn't there at all
|
|
10002
|
+
...middlewareData.hide?.referenceHidden && {
|
|
10003
|
+
visibility: "hidden",
|
|
10004
|
+
pointerEvents: "none"
|
|
10005
|
+
}
|
|
10006
|
+
},
|
|
10007
|
+
dir: props.dir,
|
|
10008
|
+
children: /* @__PURE__ */ jsx(
|
|
10009
|
+
PopperContentProvider,
|
|
10010
|
+
{
|
|
10011
|
+
scope: __scopePopper,
|
|
10012
|
+
placedSide,
|
|
10013
|
+
onArrowChange: setArrow,
|
|
10014
|
+
arrowX,
|
|
10015
|
+
arrowY,
|
|
10016
|
+
shouldHideArrow: cannotCenterArrow,
|
|
10017
|
+
children: /* @__PURE__ */ jsx(
|
|
10018
|
+
Primitive.div,
|
|
10019
|
+
{
|
|
10020
|
+
"data-side": placedSide,
|
|
10021
|
+
"data-align": placedAlign,
|
|
10022
|
+
...contentProps,
|
|
10023
|
+
ref: composedRefs,
|
|
10024
|
+
style: {
|
|
10025
|
+
...contentProps.style,
|
|
10026
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
10027
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
10028
|
+
animation: !isPositioned ? "none" : void 0
|
|
10029
|
+
}
|
|
10030
|
+
}
|
|
10031
|
+
)
|
|
10032
|
+
}
|
|
10033
|
+
)
|
|
10034
|
+
}
|
|
10035
|
+
);
|
|
10036
|
+
}
|
|
10037
|
+
);
|
|
10038
|
+
PopperContent.displayName = CONTENT_NAME$3;
|
|
10039
|
+
var ARROW_NAME$1 = "PopperArrow";
|
|
10040
|
+
var OPPOSITE_SIDE = {
|
|
10041
|
+
top: "bottom",
|
|
10042
|
+
right: "left",
|
|
10043
|
+
bottom: "top",
|
|
10044
|
+
left: "right"
|
|
10045
|
+
};
|
|
10046
|
+
var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
10047
|
+
const { __scopePopper, ...arrowProps } = props;
|
|
10048
|
+
const contentContext = useContentContext(ARROW_NAME$1, __scopePopper);
|
|
10049
|
+
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
10050
|
+
return (
|
|
10051
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
10052
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
10053
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
10054
|
+
/* @__PURE__ */ jsx(
|
|
10055
|
+
"span",
|
|
10056
|
+
{
|
|
10057
|
+
ref: contentContext.onArrowChange,
|
|
10058
|
+
style: {
|
|
10059
|
+
position: "absolute",
|
|
10060
|
+
left: contentContext.arrowX,
|
|
10061
|
+
top: contentContext.arrowY,
|
|
10062
|
+
[baseSide]: 0,
|
|
10063
|
+
transformOrigin: {
|
|
10064
|
+
top: "",
|
|
10065
|
+
right: "0 0",
|
|
10066
|
+
bottom: "center 0",
|
|
10067
|
+
left: "100% 0"
|
|
10068
|
+
}[contentContext.placedSide],
|
|
10069
|
+
transform: {
|
|
10070
|
+
top: "translateY(100%)",
|
|
10071
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
10072
|
+
bottom: `rotate(180deg)`,
|
|
10073
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
10074
|
+
}[contentContext.placedSide],
|
|
10075
|
+
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
10076
|
+
},
|
|
10077
|
+
children: /* @__PURE__ */ jsx(
|
|
10078
|
+
Root$2,
|
|
10079
|
+
{
|
|
10080
|
+
...arrowProps,
|
|
10081
|
+
ref: forwardedRef,
|
|
10082
|
+
style: {
|
|
10083
|
+
...arrowProps.style,
|
|
10084
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
10085
|
+
display: "block"
|
|
10086
|
+
}
|
|
10087
|
+
}
|
|
10088
|
+
)
|
|
10089
|
+
}
|
|
10090
|
+
)
|
|
10091
|
+
);
|
|
10092
|
+
});
|
|
10093
|
+
PopperArrow.displayName = ARROW_NAME$1;
|
|
10094
|
+
function isNotNull(value) {
|
|
10095
|
+
return value !== null;
|
|
10096
|
+
}
|
|
10097
|
+
var transformOrigin = (options) => ({
|
|
10098
|
+
name: "transformOrigin",
|
|
10099
|
+
options,
|
|
10100
|
+
fn(data) {
|
|
10101
|
+
const { placement, rects, middlewareData } = data;
|
|
10102
|
+
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
10103
|
+
const isArrowHidden = cannotCenterArrow;
|
|
10104
|
+
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
10105
|
+
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
10106
|
+
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
10107
|
+
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
|
|
10108
|
+
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
|
10109
|
+
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
|
10110
|
+
let x = "";
|
|
10111
|
+
let y = "";
|
|
10112
|
+
if (placedSide === "bottom") {
|
|
10113
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
10114
|
+
y = `${-arrowHeight}px`;
|
|
10115
|
+
} else if (placedSide === "top") {
|
|
10116
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
10117
|
+
y = `${rects.floating.height + arrowHeight}px`;
|
|
10118
|
+
} else if (placedSide === "right") {
|
|
10119
|
+
x = `${-arrowHeight}px`;
|
|
10120
|
+
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
10121
|
+
} else if (placedSide === "left") {
|
|
10122
|
+
x = `${rects.floating.width + arrowHeight}px`;
|
|
10123
|
+
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
10124
|
+
}
|
|
10125
|
+
return { data: { x, y } };
|
|
10126
|
+
}
|
|
10127
|
+
});
|
|
10128
|
+
function getSideAndAlignFromPlacement(placement) {
|
|
10129
|
+
const [side, align = "center"] = placement.split("-");
|
|
10130
|
+
return [side, align];
|
|
10131
|
+
}
|
|
10132
|
+
var Root2$2 = Popper;
|
|
10133
|
+
var Anchor = PopperAnchor;
|
|
10134
|
+
var Content$2 = PopperContent;
|
|
10135
|
+
var Arrow = PopperArrow;
|
|
10136
|
+
|
|
10137
|
+
function useStateMachine$1(initialState, machine) {
|
|
10138
|
+
return React.useReducer((state, event) => {
|
|
10139
|
+
const nextState = machine[state][event];
|
|
10140
|
+
return nextState ?? state;
|
|
10141
|
+
}, initialState);
|
|
10142
|
+
}
|
|
10143
|
+
|
|
10144
|
+
// src/presence.tsx
|
|
10145
|
+
var Presence$1 = (props) => {
|
|
10146
|
+
const { present, children } = props;
|
|
10147
|
+
const presence = usePresence$1(present);
|
|
10148
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
|
|
10149
|
+
const ref = useComposedRefs(presence.ref, getElementRef$1(child));
|
|
10150
|
+
const forceMount = typeof children === "function";
|
|
10151
|
+
return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
|
|
10152
|
+
};
|
|
10153
|
+
Presence$1.displayName = "Presence";
|
|
10154
|
+
function usePresence$1(present) {
|
|
10155
|
+
const [node, setNode] = React.useState();
|
|
10156
|
+
const stylesRef = React.useRef(null);
|
|
10157
|
+
const prevPresentRef = React.useRef(present);
|
|
10158
|
+
const prevAnimationNameRef = React.useRef("none");
|
|
10159
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
10160
|
+
const [state, send] = useStateMachine$1(initialState, {
|
|
10161
|
+
mounted: {
|
|
10162
|
+
UNMOUNT: "unmounted",
|
|
10163
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
10164
|
+
},
|
|
10165
|
+
unmountSuspended: {
|
|
10166
|
+
MOUNT: "mounted",
|
|
10167
|
+
ANIMATION_END: "unmounted"
|
|
10168
|
+
},
|
|
10169
|
+
unmounted: {
|
|
10170
|
+
MOUNT: "mounted"
|
|
10171
|
+
}
|
|
10172
|
+
});
|
|
10173
|
+
React.useEffect(() => {
|
|
10174
|
+
const currentAnimationName = getAnimationName$1(stylesRef.current);
|
|
10175
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
10176
|
+
}, [state]);
|
|
10177
|
+
useLayoutEffect2(() => {
|
|
10178
|
+
const styles = stylesRef.current;
|
|
10179
|
+
const wasPresent = prevPresentRef.current;
|
|
10180
|
+
const hasPresentChanged = wasPresent !== present;
|
|
10181
|
+
if (hasPresentChanged) {
|
|
10182
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
10183
|
+
const currentAnimationName = getAnimationName$1(styles);
|
|
10184
|
+
if (present) {
|
|
10185
|
+
send("MOUNT");
|
|
10186
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
10187
|
+
send("UNMOUNT");
|
|
10188
|
+
} else {
|
|
10189
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
10190
|
+
if (wasPresent && isAnimating) {
|
|
10191
|
+
send("ANIMATION_OUT");
|
|
10192
|
+
} else {
|
|
10193
|
+
send("UNMOUNT");
|
|
10194
|
+
}
|
|
10195
|
+
}
|
|
10196
|
+
prevPresentRef.current = present;
|
|
10197
|
+
}
|
|
10198
|
+
}, [present, send]);
|
|
10199
|
+
useLayoutEffect2(() => {
|
|
10200
|
+
if (node) {
|
|
10201
|
+
let timeoutId;
|
|
10202
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
10203
|
+
const handleAnimationEnd = (event) => {
|
|
10204
|
+
const currentAnimationName = getAnimationName$1(stylesRef.current);
|
|
10205
|
+
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
|
10206
|
+
if (event.target === node && isCurrentAnimation) {
|
|
10207
|
+
send("ANIMATION_END");
|
|
10208
|
+
if (!prevPresentRef.current) {
|
|
10209
|
+
const currentFillMode = node.style.animationFillMode;
|
|
10210
|
+
node.style.animationFillMode = "forwards";
|
|
10211
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
10212
|
+
if (node.style.animationFillMode === "forwards") {
|
|
10213
|
+
node.style.animationFillMode = currentFillMode;
|
|
10214
|
+
}
|
|
10215
|
+
});
|
|
10216
|
+
}
|
|
10217
|
+
}
|
|
10218
|
+
};
|
|
10219
|
+
const handleAnimationStart = (event) => {
|
|
10220
|
+
if (event.target === node) {
|
|
10221
|
+
prevAnimationNameRef.current = getAnimationName$1(stylesRef.current);
|
|
10222
|
+
}
|
|
10223
|
+
};
|
|
10224
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
10225
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
10226
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
10227
|
+
return () => {
|
|
10228
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
10229
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
10230
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
10231
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
10232
|
+
};
|
|
10233
|
+
} else {
|
|
10234
|
+
send("ANIMATION_END");
|
|
10235
|
+
}
|
|
10236
|
+
}, [node, send]);
|
|
10237
|
+
return {
|
|
10238
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
10239
|
+
ref: React.useCallback((node2) => {
|
|
10240
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
10241
|
+
setNode(node2);
|
|
10242
|
+
}, [])
|
|
10243
|
+
};
|
|
10244
|
+
}
|
|
10245
|
+
function getAnimationName$1(styles) {
|
|
10246
|
+
return styles?.animationName || "none";
|
|
10247
|
+
}
|
|
10248
|
+
function getElementRef$1(element) {
|
|
10249
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
10250
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
10251
|
+
if (mayWarn) {
|
|
10252
|
+
return element.ref;
|
|
10253
|
+
}
|
|
10254
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
10255
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
10256
|
+
if (mayWarn) {
|
|
10257
|
+
return element.props.ref;
|
|
10258
|
+
}
|
|
10259
|
+
return element.props.ref || element.ref;
|
|
10260
|
+
}
|
|
10261
|
+
|
|
10262
|
+
var POPOVER_NAME = "Popover";
|
|
10263
|
+
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
10264
|
+
createPopperScope
|
|
10265
|
+
]);
|
|
10266
|
+
var usePopperScope = createPopperScope();
|
|
10267
|
+
var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
|
|
10268
|
+
var Popover = (props) => {
|
|
10269
|
+
const {
|
|
10270
|
+
__scopePopover,
|
|
10271
|
+
children,
|
|
10272
|
+
open: openProp,
|
|
10273
|
+
defaultOpen,
|
|
10274
|
+
onOpenChange,
|
|
10275
|
+
modal = false
|
|
10276
|
+
} = props;
|
|
10277
|
+
const popperScope = usePopperScope(__scopePopover);
|
|
10278
|
+
const triggerRef = React.useRef(null);
|
|
10279
|
+
const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
|
|
10280
|
+
const [open, setOpen] = useControllableState({
|
|
10281
|
+
prop: openProp,
|
|
10282
|
+
defaultProp: defaultOpen ?? false,
|
|
10283
|
+
onChange: onOpenChange,
|
|
10284
|
+
caller: POPOVER_NAME
|
|
10285
|
+
});
|
|
10286
|
+
return /* @__PURE__ */ jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsx(
|
|
10287
|
+
PopoverProvider,
|
|
10288
|
+
{
|
|
10289
|
+
scope: __scopePopover,
|
|
10290
|
+
contentId: useId(),
|
|
10291
|
+
triggerRef,
|
|
10292
|
+
open,
|
|
10293
|
+
onOpenChange: setOpen,
|
|
10294
|
+
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
10295
|
+
hasCustomAnchor,
|
|
10296
|
+
onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),
|
|
10297
|
+
onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),
|
|
10298
|
+
modal,
|
|
10299
|
+
children
|
|
10300
|
+
}
|
|
10301
|
+
) });
|
|
10302
|
+
};
|
|
10303
|
+
Popover.displayName = POPOVER_NAME;
|
|
10304
|
+
var ANCHOR_NAME = "PopoverAnchor";
|
|
10305
|
+
var PopoverAnchor = React.forwardRef(
|
|
10306
|
+
(props, forwardedRef) => {
|
|
10307
|
+
const { __scopePopover, ...anchorProps } = props;
|
|
10308
|
+
const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
|
|
10309
|
+
const popperScope = usePopperScope(__scopePopover);
|
|
10310
|
+
const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
|
10311
|
+
React.useEffect(() => {
|
|
10312
|
+
onCustomAnchorAdd();
|
|
10313
|
+
return () => onCustomAnchorRemove();
|
|
10314
|
+
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
10315
|
+
return /* @__PURE__ */ jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
10316
|
+
}
|
|
10317
|
+
);
|
|
10318
|
+
PopoverAnchor.displayName = ANCHOR_NAME;
|
|
10319
|
+
var TRIGGER_NAME$2 = "PopoverTrigger";
|
|
10320
|
+
var PopoverTrigger = React.forwardRef(
|
|
10321
|
+
(props, forwardedRef) => {
|
|
10322
|
+
const { __scopePopover, ...triggerProps } = props;
|
|
10323
|
+
const context = usePopoverContext(TRIGGER_NAME$2, __scopePopover);
|
|
10324
|
+
const popperScope = usePopperScope(__scopePopover);
|
|
10325
|
+
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
10326
|
+
const trigger = /* @__PURE__ */ jsx(
|
|
10327
|
+
Primitive.button,
|
|
10328
|
+
{
|
|
10329
|
+
type: "button",
|
|
10330
|
+
"aria-haspopup": "dialog",
|
|
10331
|
+
"aria-expanded": context.open,
|
|
10332
|
+
"aria-controls": context.contentId,
|
|
10333
|
+
"data-state": getState$1(context.open),
|
|
10334
|
+
...triggerProps,
|
|
10335
|
+
ref: composedTriggerRef,
|
|
10336
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
10337
|
+
}
|
|
10338
|
+
);
|
|
10339
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
10340
|
+
}
|
|
10341
|
+
);
|
|
10342
|
+
PopoverTrigger.displayName = TRIGGER_NAME$2;
|
|
10343
|
+
var PORTAL_NAME$1 = "PopoverPortal";
|
|
10344
|
+
var [PortalProvider$1, usePortalContext$1] = createPopoverContext(PORTAL_NAME$1, {
|
|
10345
|
+
forceMount: void 0
|
|
10346
|
+
});
|
|
10347
|
+
var PopoverPortal = (props) => {
|
|
10348
|
+
const { __scopePopover, forceMount, children, container } = props;
|
|
10349
|
+
const context = usePopoverContext(PORTAL_NAME$1, __scopePopover);
|
|
10350
|
+
return /* @__PURE__ */ jsx(PortalProvider$1, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence$1, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$3, { asChild: true, container, children }) }) });
|
|
10351
|
+
};
|
|
10352
|
+
PopoverPortal.displayName = PORTAL_NAME$1;
|
|
10353
|
+
var CONTENT_NAME$2 = "PopoverContent";
|
|
10354
|
+
var PopoverContent = React.forwardRef(
|
|
10355
|
+
(props, forwardedRef) => {
|
|
10356
|
+
const portalContext = usePortalContext$1(CONTENT_NAME$2, props.__scopePopover);
|
|
10357
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
10358
|
+
const context = usePopoverContext(CONTENT_NAME$2, props.__scopePopover);
|
|
10359
|
+
return /* @__PURE__ */ jsx(Presence$1, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
10360
|
+
}
|
|
10361
|
+
);
|
|
10362
|
+
PopoverContent.displayName = CONTENT_NAME$2;
|
|
10363
|
+
var Slot$1 = createSlot("PopoverContent.RemoveScroll");
|
|
10364
|
+
var PopoverContentModal = React.forwardRef(
|
|
10365
|
+
(props, forwardedRef) => {
|
|
10366
|
+
const context = usePopoverContext(CONTENT_NAME$2, props.__scopePopover);
|
|
10367
|
+
const contentRef = React.useRef(null);
|
|
10368
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
10369
|
+
const isRightClickOutsideRef = React.useRef(false);
|
|
10370
|
+
React.useEffect(() => {
|
|
10371
|
+
const content = contentRef.current;
|
|
10372
|
+
if (content) return hideOthers(content);
|
|
10373
|
+
}, []);
|
|
10374
|
+
return /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot$1, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
|
|
10375
|
+
PopoverContentImpl,
|
|
10376
|
+
{
|
|
10377
|
+
...props,
|
|
10378
|
+
ref: composedRefs,
|
|
10379
|
+
trapFocus: context.open,
|
|
10380
|
+
disableOutsidePointerEvents: true,
|
|
10381
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
10382
|
+
event.preventDefault();
|
|
10383
|
+
if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
|
|
10384
|
+
}),
|
|
10385
|
+
onPointerDownOutside: composeEventHandlers(
|
|
10386
|
+
props.onPointerDownOutside,
|
|
10387
|
+
(event) => {
|
|
10388
|
+
const originalEvent = event.detail.originalEvent;
|
|
10389
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
10390
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
10391
|
+
isRightClickOutsideRef.current = isRightClick;
|
|
10392
|
+
},
|
|
10393
|
+
{ checkForDefaultPrevented: false }
|
|
10394
|
+
),
|
|
10395
|
+
onFocusOutside: composeEventHandlers(
|
|
10396
|
+
props.onFocusOutside,
|
|
10397
|
+
(event) => event.preventDefault(),
|
|
10398
|
+
{ checkForDefaultPrevented: false }
|
|
10399
|
+
)
|
|
10400
|
+
}
|
|
10401
|
+
) });
|
|
10402
|
+
}
|
|
10403
|
+
);
|
|
10404
|
+
var PopoverContentNonModal = React.forwardRef(
|
|
10405
|
+
(props, forwardedRef) => {
|
|
10406
|
+
const context = usePopoverContext(CONTENT_NAME$2, props.__scopePopover);
|
|
10407
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
10408
|
+
const hasPointerDownOutsideRef = React.useRef(false);
|
|
10409
|
+
return /* @__PURE__ */ jsx(
|
|
10410
|
+
PopoverContentImpl,
|
|
10411
|
+
{
|
|
10412
|
+
...props,
|
|
10413
|
+
ref: forwardedRef,
|
|
10414
|
+
trapFocus: false,
|
|
10415
|
+
disableOutsidePointerEvents: false,
|
|
10416
|
+
onCloseAutoFocus: (event) => {
|
|
10417
|
+
props.onCloseAutoFocus?.(event);
|
|
10418
|
+
if (!event.defaultPrevented) {
|
|
10419
|
+
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
10420
|
+
event.preventDefault();
|
|
10421
|
+
}
|
|
10422
|
+
hasInteractedOutsideRef.current = false;
|
|
10423
|
+
hasPointerDownOutsideRef.current = false;
|
|
10424
|
+
},
|
|
10425
|
+
onInteractOutside: (event) => {
|
|
10426
|
+
props.onInteractOutside?.(event);
|
|
10427
|
+
if (!event.defaultPrevented) {
|
|
10428
|
+
hasInteractedOutsideRef.current = true;
|
|
10429
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
|
10430
|
+
hasPointerDownOutsideRef.current = true;
|
|
10431
|
+
}
|
|
10432
|
+
}
|
|
10433
|
+
const target = event.target;
|
|
10434
|
+
const targetIsTrigger = context.triggerRef.current?.contains(target);
|
|
10435
|
+
if (targetIsTrigger) event.preventDefault();
|
|
10436
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
10437
|
+
event.preventDefault();
|
|
10438
|
+
}
|
|
10439
|
+
}
|
|
10440
|
+
}
|
|
10441
|
+
);
|
|
10442
|
+
}
|
|
10443
|
+
);
|
|
10444
|
+
var PopoverContentImpl = React.forwardRef(
|
|
10445
|
+
(props, forwardedRef) => {
|
|
10446
|
+
const {
|
|
10447
|
+
__scopePopover,
|
|
10448
|
+
trapFocus,
|
|
10449
|
+
onOpenAutoFocus,
|
|
10450
|
+
onCloseAutoFocus,
|
|
10451
|
+
disableOutsidePointerEvents,
|
|
10452
|
+
onEscapeKeyDown,
|
|
10453
|
+
onPointerDownOutside,
|
|
10454
|
+
onFocusOutside,
|
|
10455
|
+
onInteractOutside,
|
|
10456
|
+
...contentProps
|
|
10457
|
+
} = props;
|
|
10458
|
+
const context = usePopoverContext(CONTENT_NAME$2, __scopePopover);
|
|
10459
|
+
const popperScope = usePopperScope(__scopePopover);
|
|
10460
|
+
useFocusGuards();
|
|
10461
|
+
return /* @__PURE__ */ jsx(
|
|
10462
|
+
FocusScope,
|
|
10463
|
+
{
|
|
10464
|
+
asChild: true,
|
|
10465
|
+
loop: true,
|
|
10466
|
+
trapped: trapFocus,
|
|
10467
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
10468
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
10469
|
+
children: /* @__PURE__ */ jsx(
|
|
10470
|
+
DismissableLayer,
|
|
10471
|
+
{
|
|
10472
|
+
asChild: true,
|
|
10473
|
+
disableOutsidePointerEvents,
|
|
10474
|
+
onInteractOutside,
|
|
10475
|
+
onEscapeKeyDown,
|
|
10476
|
+
onPointerDownOutside,
|
|
10477
|
+
onFocusOutside,
|
|
10478
|
+
onDismiss: () => context.onOpenChange(false),
|
|
10479
|
+
children: /* @__PURE__ */ jsx(
|
|
10480
|
+
Content$2,
|
|
10481
|
+
{
|
|
10482
|
+
"data-state": getState$1(context.open),
|
|
10483
|
+
role: "dialog",
|
|
10484
|
+
id: context.contentId,
|
|
10485
|
+
...popperScope,
|
|
10486
|
+
...contentProps,
|
|
10487
|
+
ref: forwardedRef,
|
|
10488
|
+
style: {
|
|
10489
|
+
...contentProps.style,
|
|
10490
|
+
// re-namespace exposed content custom properties
|
|
10491
|
+
...{
|
|
10492
|
+
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
10493
|
+
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
10494
|
+
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
10495
|
+
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
10496
|
+
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
10497
|
+
}
|
|
10498
|
+
}
|
|
10499
|
+
}
|
|
10500
|
+
)
|
|
10501
|
+
}
|
|
10502
|
+
)
|
|
10503
|
+
}
|
|
10504
|
+
);
|
|
10505
|
+
}
|
|
10506
|
+
);
|
|
10507
|
+
var CLOSE_NAME$1 = "PopoverClose";
|
|
10508
|
+
var PopoverClose = React.forwardRef(
|
|
10509
|
+
(props, forwardedRef) => {
|
|
10510
|
+
const { __scopePopover, ...closeProps } = props;
|
|
10511
|
+
const context = usePopoverContext(CLOSE_NAME$1, __scopePopover);
|
|
10512
|
+
return /* @__PURE__ */ jsx(
|
|
10513
|
+
Primitive.button,
|
|
10514
|
+
{
|
|
10515
|
+
type: "button",
|
|
10516
|
+
...closeProps,
|
|
10517
|
+
ref: forwardedRef,
|
|
10518
|
+
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
10519
|
+
}
|
|
10520
|
+
);
|
|
10521
|
+
}
|
|
10522
|
+
);
|
|
10523
|
+
PopoverClose.displayName = CLOSE_NAME$1;
|
|
10524
|
+
var ARROW_NAME = "PopoverArrow";
|
|
10525
|
+
var PopoverArrow = React.forwardRef(
|
|
10526
|
+
(props, forwardedRef) => {
|
|
10527
|
+
const { __scopePopover, ...arrowProps } = props;
|
|
10528
|
+
const popperScope = usePopperScope(__scopePopover);
|
|
10529
|
+
return /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
10530
|
+
}
|
|
10531
|
+
);
|
|
10532
|
+
PopoverArrow.displayName = ARROW_NAME;
|
|
10533
|
+
function getState$1(open) {
|
|
10534
|
+
return open ? "open" : "closed";
|
|
10535
|
+
}
|
|
10536
|
+
var Root2$1 = Popover;
|
|
10537
|
+
var Trigger$2 = PopoverTrigger;
|
|
10538
|
+
var Portal$1 = PopoverPortal;
|
|
10539
|
+
var Content2 = PopoverContent;
|
|
10540
|
+
var Arrow2 = PopoverArrow;
|
|
10541
|
+
|
|
10542
|
+
/**
|
|
10543
|
+
* Copy a string to the clipboard and invoke a callback with the result.
|
|
10544
|
+
*
|
|
10545
|
+
* @param copyText The text to copy. Defaults to empty string.
|
|
10546
|
+
* @param callback Optional callback that will be called with { status: true } on success,
|
|
10547
|
+
* or { status: false, message: error } on failure.
|
|
10548
|
+
*/
|
|
10549
|
+
function copyToClipboard(copyText = '', callback) {
|
|
10550
|
+
navigator.clipboard.writeText(copyText).then(() => {
|
|
10551
|
+
const result = {
|
|
10552
|
+
status: true
|
|
10553
|
+
};
|
|
10554
|
+
callback === null || callback === void 0 ? void 0 : callback(result);
|
|
10555
|
+
}).catch(err => {
|
|
10556
|
+
const result = {
|
|
10557
|
+
status: false,
|
|
10558
|
+
message: err
|
|
10559
|
+
};
|
|
10560
|
+
callback === null || callback === void 0 ? void 0 : callback(result);
|
|
10561
|
+
});
|
|
10562
|
+
}
|
|
10563
|
+
|
|
10564
|
+
const copyBtn = cva('p-0 flex-shrink-0 h-[max-content] min-w-0 bg-transparent transition-colors', {
|
|
10565
|
+
variants: {
|
|
10566
|
+
theme: {
|
|
10567
|
+
light: 'hover:text-gray-600 active:text-gray-800',
|
|
10568
|
+
dark: 'hover:text-gray-300 active:text-gray-100'
|
|
10569
|
+
}
|
|
10570
|
+
},
|
|
10571
|
+
defaultVariants: {
|
|
10572
|
+
theme: 'light'
|
|
10573
|
+
}
|
|
10574
|
+
});
|
|
10575
|
+
const CopyButton = _a => {
|
|
10576
|
+
var {
|
|
10577
|
+
text,
|
|
10578
|
+
className,
|
|
10579
|
+
onCopy
|
|
10580
|
+
} = _a,
|
|
10581
|
+
props = __rest(_a, ["text", "className", "onCopy"]);
|
|
10582
|
+
const {
|
|
10583
|
+
theme
|
|
10584
|
+
} = useTheme();
|
|
10585
|
+
const [open, setOpen] = useState(false);
|
|
10586
|
+
const handleCopy = e => {
|
|
10587
|
+
e.stopPropagation();
|
|
10588
|
+
e.preventDefault();
|
|
10589
|
+
copyToClipboard(text, onCopy);
|
|
10590
|
+
setOpen(true);
|
|
10591
|
+
setTimeout(() => setOpen(false), 1000);
|
|
10592
|
+
};
|
|
10593
|
+
return jsxs(Root2$1, {
|
|
10594
|
+
open: open,
|
|
10595
|
+
children: [jsx(Trigger$2, {
|
|
10596
|
+
asChild: true,
|
|
10597
|
+
children: jsx("button", Object.assign({
|
|
10598
|
+
type: 'button',
|
|
10599
|
+
className: `${copyBtn({
|
|
10600
|
+
theme
|
|
10601
|
+
})} ${className !== null && className !== void 0 ? className : ''} hover:cursor-pointer`,
|
|
10602
|
+
onClick: handleCopy
|
|
10603
|
+
}, props, {
|
|
10604
|
+
children: jsx(CopyIcon, {
|
|
10605
|
+
className: 'w-4 h-4 transition',
|
|
10606
|
+
color: theme === 'light' ? '#000000' : '#ffffff'
|
|
10607
|
+
})
|
|
10608
|
+
}))
|
|
10609
|
+
}), jsx(Portal$1, {
|
|
10610
|
+
children: jsxs(Content2, {
|
|
10611
|
+
className: 'bg-white text-gray-900 text-sm px-2 py-1 rounded shadow-lg',
|
|
10612
|
+
side: 'top',
|
|
10613
|
+
sideOffset: 5,
|
|
10614
|
+
children: ["Copied", jsx(Arrow2, {
|
|
10615
|
+
className: 'fill-white'
|
|
10616
|
+
})]
|
|
10617
|
+
})
|
|
10618
|
+
})]
|
|
10619
|
+
});
|
|
10620
|
+
};
|
|
10621
|
+
|
|
10622
|
+
/** CVA for the root container, now with light/dark theme */
|
|
10623
|
+
const identifier = cva('flex items-center font-dash-grotesque text-sm font-normal break-all', {
|
|
10624
|
+
variants: {
|
|
10625
|
+
theme: {
|
|
10626
|
+
light: 'text-gray-900',
|
|
10627
|
+
dark: 'text-white'
|
|
10628
|
+
},
|
|
10629
|
+
ellipsis: {
|
|
10630
|
+
false: '',
|
|
10631
|
+
true: 'overflow-hidden'
|
|
10632
|
+
},
|
|
10633
|
+
highlight: {
|
|
10634
|
+
default: '',
|
|
10635
|
+
dim: '',
|
|
10636
|
+
highlight: '',
|
|
10637
|
+
first: '',
|
|
10638
|
+
last: '',
|
|
10639
|
+
both: ''
|
|
10640
|
+
}
|
|
10641
|
+
},
|
|
10642
|
+
defaultVariants: {
|
|
10643
|
+
theme: 'light',
|
|
10644
|
+
ellipsis: false,
|
|
10645
|
+
highlight: 'default'
|
|
10646
|
+
}
|
|
10647
|
+
});
|
|
10648
|
+
/** CVA for each symbol span: inherits root color or dims */
|
|
10649
|
+
const symbol = cva('flex-1', {
|
|
10650
|
+
variants: {
|
|
9380
10651
|
dim: {
|
|
9381
10652
|
false: 'text-inherit',
|
|
9382
10653
|
true: 'text-gray-500'
|
|
@@ -10207,7 +11478,7 @@ var DialogTrigger = React.forwardRef(
|
|
|
10207
11478
|
"data-state": getState(context.open),
|
|
10208
11479
|
...triggerProps,
|
|
10209
11480
|
ref: composedTriggerRef,
|
|
10210
|
-
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
11481
|
+
onClick: composeEventHandlers$1(props.onClick, context.onOpenToggle)
|
|
10211
11482
|
}
|
|
10212
11483
|
);
|
|
10213
11484
|
}
|
|
@@ -10220,7 +11491,7 @@ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
|
10220
11491
|
var DialogPortal = (props) => {
|
|
10221
11492
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
10222
11493
|
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
10223
|
-
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$
|
|
11494
|
+
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$3, { asChild: true, container, children: child }) })) });
|
|
10224
11495
|
};
|
|
10225
11496
|
DialogPortal.displayName = PORTAL_NAME;
|
|
10226
11497
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -10279,17 +11550,17 @@ var DialogContentModal = React.forwardRef(
|
|
|
10279
11550
|
ref: composedRefs,
|
|
10280
11551
|
trapFocus: context.open,
|
|
10281
11552
|
disableOutsidePointerEvents: true,
|
|
10282
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
11553
|
+
onCloseAutoFocus: composeEventHandlers$1(props.onCloseAutoFocus, (event) => {
|
|
10283
11554
|
event.preventDefault();
|
|
10284
11555
|
context.triggerRef.current?.focus();
|
|
10285
11556
|
}),
|
|
10286
|
-
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
11557
|
+
onPointerDownOutside: composeEventHandlers$1(props.onPointerDownOutside, (event) => {
|
|
10287
11558
|
const originalEvent = event.detail.originalEvent;
|
|
10288
11559
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
10289
11560
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
10290
11561
|
if (isRightClick) event.preventDefault();
|
|
10291
11562
|
}),
|
|
10292
|
-
onFocusOutside: composeEventHandlers(
|
|
11563
|
+
onFocusOutside: composeEventHandlers$1(
|
|
10293
11564
|
props.onFocusOutside,
|
|
10294
11565
|
(event) => event.preventDefault()
|
|
10295
11566
|
)
|
|
@@ -10343,7 +11614,7 @@ var DialogContentImpl = React.forwardRef(
|
|
|
10343
11614
|
const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
|
|
10344
11615
|
const contentRef = React.useRef(null);
|
|
10345
11616
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
10346
|
-
useFocusGuards();
|
|
11617
|
+
useFocusGuards$1();
|
|
10347
11618
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10348
11619
|
/* @__PURE__ */ jsx(
|
|
10349
11620
|
FocusScope,
|
|
@@ -10354,7 +11625,7 @@ var DialogContentImpl = React.forwardRef(
|
|
|
10354
11625
|
onMountAutoFocus: onOpenAutoFocus,
|
|
10355
11626
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
10356
11627
|
children: /* @__PURE__ */ jsx(
|
|
10357
|
-
DismissableLayer,
|
|
11628
|
+
DismissableLayer$1,
|
|
10358
11629
|
{
|
|
10359
11630
|
role: "dialog",
|
|
10360
11631
|
id: context.contentId,
|
|
@@ -10404,7 +11675,7 @@ var DialogClose = React.forwardRef(
|
|
|
10404
11675
|
type: "button",
|
|
10405
11676
|
...closeProps,
|
|
10406
11677
|
ref: forwardedRef,
|
|
10407
|
-
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
11678
|
+
onClick: composeEventHandlers$1(props.onClick, () => context.onOpenChange(false))
|
|
10408
11679
|
}
|
|
10409
11680
|
);
|
|
10410
11681
|
}
|
|
@@ -10698,10 +11969,10 @@ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
10698
11969
|
...groupProps,
|
|
10699
11970
|
ref: composedRefs,
|
|
10700
11971
|
style: { outline: "none", ...props.style },
|
|
10701
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
11972
|
+
onMouseDown: composeEventHandlers$1(props.onMouseDown, () => {
|
|
10702
11973
|
isClickFocusRef.current = true;
|
|
10703
11974
|
}),
|
|
10704
|
-
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
11975
|
+
onFocus: composeEventHandlers$1(props.onFocus, (event) => {
|
|
10705
11976
|
const isKeyboardFocus = !isClickFocusRef.current;
|
|
10706
11977
|
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
10707
11978
|
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
@@ -10719,7 +11990,7 @@ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
10719
11990
|
}
|
|
10720
11991
|
isClickFocusRef.current = false;
|
|
10721
11992
|
}),
|
|
10722
|
-
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
11993
|
+
onBlur: composeEventHandlers$1(props.onBlur, () => setIsTabbingBackOut(false))
|
|
10723
11994
|
}
|
|
10724
11995
|
)
|
|
10725
11996
|
}
|
|
@@ -10762,12 +12033,12 @@ var RovingFocusGroupItem = React.forwardRef(
|
|
|
10762
12033
|
"data-orientation": context.orientation,
|
|
10763
12034
|
...itemProps,
|
|
10764
12035
|
ref: forwardedRef,
|
|
10765
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
12036
|
+
onMouseDown: composeEventHandlers$1(props.onMouseDown, (event) => {
|
|
10766
12037
|
if (!focusable) event.preventDefault();
|
|
10767
12038
|
else context.onItemFocus(id);
|
|
10768
12039
|
}),
|
|
10769
|
-
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
10770
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
12040
|
+
onFocus: composeEventHandlers$1(props.onFocus, () => context.onItemFocus(id)),
|
|
12041
|
+
onKeyDown: composeEventHandlers$1(props.onKeyDown, (event) => {
|
|
10771
12042
|
if (event.key === "Tab" && event.shiftKey) {
|
|
10772
12043
|
context.onItemShiftTab();
|
|
10773
12044
|
return;
|
|
@@ -10936,17 +12207,17 @@ var TabsTrigger = React.forwardRef(
|
|
|
10936
12207
|
id: triggerId,
|
|
10937
12208
|
...triggerProps,
|
|
10938
12209
|
ref: forwardedRef,
|
|
10939
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
12210
|
+
onMouseDown: composeEventHandlers$1(props.onMouseDown, (event) => {
|
|
10940
12211
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
10941
12212
|
context.onValueChange(value);
|
|
10942
12213
|
} else {
|
|
10943
12214
|
event.preventDefault();
|
|
10944
12215
|
}
|
|
10945
12216
|
}),
|
|
10946
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
12217
|
+
onKeyDown: composeEventHandlers$1(props.onKeyDown, (event) => {
|
|
10947
12218
|
if ([" ", "Enter"].includes(event.key)) context.onValueChange(value);
|
|
10948
12219
|
}),
|
|
10949
|
-
onFocus: composeEventHandlers(props.onFocus, () => {
|
|
12220
|
+
onFocus: composeEventHandlers$1(props.onFocus, () => {
|
|
10950
12221
|
const isAutomaticActivation = context.activationMode !== "manual";
|
|
10951
12222
|
if (!isSelected && !disabled && isAutomaticActivation) {
|
|
10952
12223
|
context.onValueChange(value);
|
|
@@ -11149,5 +12420,5 @@ const Tabs = ({
|
|
|
11149
12420
|
});
|
|
11150
12421
|
};
|
|
11151
12422
|
|
|
11152
|
-
export { Accordion, ArrowIcon, Avatar, BigNumber, BroadcastedIcon, BurgerMenuIcon, Button, CalendarIcon, ChainSmallIcon, CheckIcon, CheckmarkIcon, ChevronIcon, CircleProcessIcon, CopyButton, CopyIcon, CreditsIcon, CrossIcon, DashLogo, DateBlock, DeleteIcon, DashDialog as Dialog, EditIcon, ErrorIcon, EyeClosedIcon, EyeOpenIcon, FilterIcon, Heading, Identifier, Input, KebabMenuIcon, KeyIcon, List$1 as List, NotActive, OverlayMenu, OverlaySelect, PlusIcon, PooledIcon, ProgressStepBar, ProtectedMessageIcon, QuestionMessageIcon, QueuedIcon, Select, SettingsIcon, ShieldSmallIcon, SmartphoneIcon, SuccessIcon, Switch, Tabs, Text, Textarea, ThemeProvider, TimeDelta, TransactionStatusIcon, ValueCard, WalletIcon, WebIcon, useTheme };
|
|
12423
|
+
export { Accordion, ArrowIcon, Avatar, Badge, BigNumber, BroadcastedIcon, BurgerMenuIcon, Button, CalendarIcon, ChainSmallIcon, CheckIcon, CheckmarkIcon, ChevronIcon, CircleProcessIcon, CopyButton, CopyIcon, CreditsIcon, CrossIcon, DashLogo, DateBlock, DeleteIcon, DashDialog as Dialog, EditIcon, ErrorIcon, EyeClosedIcon, EyeOpenIcon, FaceIcon, FilterIcon, FingerprintIcon, Heading, Identifier, Input, KebabMenuIcon, KeyIcon, List$1 as List, LockIcon, NotActive, OverlayMenu, OverlaySelect, PendingIcon, PlusIcon, PooledIcon, ProgressStepBar, ProtectedMessageIcon, QuestionMessageIcon, QueuedIcon, SearchIcon, Select, SettingsIcon, ShieldSmallIcon, SignIcon, SignLockIcon, SmartphoneIcon, SuccessIcon, Switch, Tabs, Text, Textarea, ThemeProvider, TimeDelta, TransactionStatusIcon, ValueCard, WalletIcon, WebIcon, useTheme };
|
|
11153
12424
|
//# sourceMappingURL=index.esm.js.map
|