qstd 0.3.44 → 0.3.45
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/block/drawer.d.ts +2 -6
- package/dist/block/drawer.d.ts.map +1 -1
- package/dist/block/fns.d.ts +1 -0
- package/dist/block/fns.d.ts.map +1 -1
- package/dist/block/index.d.ts +0 -7
- package/dist/block/index.d.ts.map +1 -1
- package/dist/block/tooltip.d.ts +2 -3
- package/dist/block/tooltip.d.ts.map +1 -1
- package/dist/block/types.d.ts +4 -0
- package/dist/block/types.d.ts.map +1 -1
- package/dist/preset/index.cjs +2 -1
- package/dist/preset/index.d.ts.map +1 -1
- package/dist/preset/index.js +2 -1
- package/dist/react/index.cjs +455 -462
- package/dist/react/index.css +3 -3
- package/dist/react/index.js +451 -458
- package/dist/shared/api/types.d.ts +1 -1
- package/dist/shared/api/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/styled-system/css/conditions.mjs +1 -1
- package/styled-system/jsx/is-valid-prop.mjs +1 -1
- package/styled-system/styles.css +4 -4
- package/styled-system/types/conditions.d.ts +2 -0
package/dist/react/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ require("./index.css");
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var React14 = require('react');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
8
8
|
var framerMotion = require('framer-motion');
|
|
9
9
|
var react = require('@floating-ui/react');
|
|
@@ -36,7 +36,7 @@ function _interopNamespace(e) {
|
|
|
36
36
|
return Object.freeze(n);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var React14__namespace = /*#__PURE__*/_interopNamespace(React14);
|
|
40
40
|
|
|
41
41
|
// src/react/index.ts
|
|
42
42
|
|
|
@@ -256,7 +256,7 @@ function normalizeHTMLProps(props) {
|
|
|
256
256
|
normalizeHTMLProps.keys = htmlProps;
|
|
257
257
|
|
|
258
258
|
// styled-system/css/conditions.mjs
|
|
259
|
-
var conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_activeMouse,_activeKeyboard,_checkbox,_radioLabel,_radioDisabled,_radioSelected,_radioCircleOuter,_radioCircleInner,_radioFocusRing,_path,_svg,_labelLifted,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,base";
|
|
259
|
+
var conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_activeMouse,_activeKeyboard,_checkbox,_radioLabel,_radioDisabled,_radioSelected,_radioCircleOuter,_radioCircleInner,_radioFocusRing,_path,_svg,_tooltip,_labelLifted,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,base";
|
|
260
260
|
var conditions = new Set(conditionsStr.split(","));
|
|
261
261
|
var conditionRegex = /^@|&|&$/;
|
|
262
262
|
function isCondition(value) {
|
|
@@ -403,7 +403,7 @@ function getCompoundVariantCss(compoundVariants, variantMap) {
|
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
// styled-system/jsx/is-valid-prop.mjs
|
|
406
|
-
var userGeneratedStr = "css,ar,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,colStart,colEnd,autoCols,rowG,colG,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,br,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,rowStart,rowEnd,rounded,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,grid,center,relative,absolute,fixed,sticky,size,pointer,strokeColor,cols,rows,placeI,placeC,placeS,alignI,alignC,alignS,justifyI,justifyC,justifyS,colN,spaceBetween,rowN,gridRowStart,gridRowEnd,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_activeMouse,_activeKeyboard,_checkbox,_radioLabel,_radioDisabled,_radioSelected,_radioCircleOuter,_radioCircleInner,_radioFocusRing,_path,_svg,_labelLifted,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,textStyle";
|
|
406
|
+
var userGeneratedStr = "css,ar,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,colStart,colEnd,autoCols,rowG,colG,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,br,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,rowStart,rowEnd,rounded,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,grid,center,relative,absolute,fixed,sticky,size,pointer,strokeColor,cols,rows,placeI,placeC,placeS,alignI,alignC,alignS,justifyI,justifyC,justifyS,colN,spaceBetween,rowN,gridRowStart,gridRowEnd,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_activeMouse,_activeKeyboard,_checkbox,_radioLabel,_radioDisabled,_radioSelected,_radioCircleOuter,_radioCircleInner,_radioFocusRing,_path,_svg,_tooltip,_labelLifted,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,textStyle";
|
|
407
407
|
var userGenerated = userGeneratedStr.split(",");
|
|
408
408
|
var cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical";
|
|
409
409
|
var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
|
|
@@ -444,10 +444,10 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
|
444
444
|
const __cvaFn__ = composeCvaFn(Dynamic.__cva__, cvaFn);
|
|
445
445
|
const __shouldForwardProps__ = composeShouldForwardProps(Dynamic, shouldForwardProp);
|
|
446
446
|
const __base__ = Dynamic.__base__ || Dynamic;
|
|
447
|
-
const StyledComponent = /* @__PURE__ */
|
|
447
|
+
const StyledComponent = /* @__PURE__ */ React14.forwardRef(function StyledComponent2(props, ref) {
|
|
448
448
|
const { as: Element2 = __base__, unstyled, children, ...restProps } = props;
|
|
449
|
-
const combinedProps =
|
|
450
|
-
const [htmlProps2, forwardedProps, variantProps, styleProps, elementProps] =
|
|
449
|
+
const combinedProps = React14.useMemo(() => Object.assign({}, defaultProps, restProps), [restProps]);
|
|
450
|
+
const [htmlProps2, forwardedProps, variantProps, styleProps, elementProps] = React14.useMemo(() => {
|
|
451
451
|
return splitProps(combinedProps, normalizeHTMLProps.keys, __shouldForwardProps__, __cvaFn__.variantKeys, isCssProperty);
|
|
452
452
|
}, [combinedProps]);
|
|
453
453
|
function recipeClass() {
|
|
@@ -467,7 +467,7 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
|
467
467
|
}
|
|
468
468
|
return configOrCva.__recipe__ ? recipeClass() : cvaClass();
|
|
469
469
|
};
|
|
470
|
-
return
|
|
470
|
+
return React14.createElement(Element2, {
|
|
471
471
|
ref,
|
|
472
472
|
...forwardedProps,
|
|
473
473
|
...elementProps,
|
|
@@ -631,14 +631,14 @@ function Menu(props) {
|
|
|
631
631
|
trigger,
|
|
632
632
|
...rest
|
|
633
633
|
} = props;
|
|
634
|
-
const hoverTimeoutRef =
|
|
635
|
-
const [isOpen, setOpen] =
|
|
634
|
+
const hoverTimeoutRef = React14__namespace.default.useRef(null);
|
|
635
|
+
const [isOpen, setOpen] = React14__namespace.default.useState(isOpenControlled ?? false);
|
|
636
636
|
const onOpenChange = (open) => {
|
|
637
637
|
const newOpenState = typeof open === "function" ? open(isOpen) : open;
|
|
638
638
|
props.onOpenOrClose?.(newOpenState);
|
|
639
639
|
setOpen(newOpenState);
|
|
640
640
|
};
|
|
641
|
-
|
|
641
|
+
React14__namespace.default.useEffect(() => {
|
|
642
642
|
if (typeof isOpenControlled !== "boolean") return;
|
|
643
643
|
setOpen(isOpenControlled);
|
|
644
644
|
}, [isOpenControlled]);
|
|
@@ -713,11 +713,11 @@ function Menu(props) {
|
|
|
713
713
|
},
|
|
714
714
|
isOpen
|
|
715
715
|
);
|
|
716
|
-
|
|
716
|
+
React14__namespace.default.useEffect(() => {
|
|
717
717
|
if (!hideData?.referenceHidden) return;
|
|
718
718
|
closeMenuImmediate();
|
|
719
719
|
}, [hideData, closeMenuImmediate]);
|
|
720
|
-
|
|
720
|
+
React14__namespace.default.useEffect(() => {
|
|
721
721
|
return () => {
|
|
722
722
|
if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
|
|
723
723
|
};
|
|
@@ -743,10 +743,10 @@ function Menu(props) {
|
|
|
743
743
|
onMouseLeave: handleMenuMouseLeave
|
|
744
744
|
} : {};
|
|
745
745
|
const transformOrigin = floatingContext.placement.startsWith("top") ? "bottom left" : "top left";
|
|
746
|
-
const childArray =
|
|
746
|
+
const childArray = React14__namespace.default.Children.toArray(children);
|
|
747
747
|
let customContainerEl = null;
|
|
748
748
|
for (const c of childArray) {
|
|
749
|
-
if (
|
|
749
|
+
if (React14__namespace.default.isValidElement(c)) {
|
|
750
750
|
const anyType = c.type;
|
|
751
751
|
if (c.props?.["data-menu-container"] || anyType?.isBlockMenuContainer) {
|
|
752
752
|
customContainerEl = c;
|
|
@@ -775,7 +775,7 @@ function Menu(props) {
|
|
|
775
775
|
...restStyle || {}
|
|
776
776
|
};
|
|
777
777
|
const mergedClassName = [defaultsClassName, childProps.className].filter(Boolean).join(" ");
|
|
778
|
-
const contentNode =
|
|
778
|
+
const contentNode = React14__namespace.default.cloneElement(
|
|
779
779
|
customContainerEl,
|
|
780
780
|
{
|
|
781
781
|
// Defaults are now in mergedClassName via css()
|
|
@@ -861,7 +861,7 @@ function Menu(props) {
|
|
|
861
861
|
);
|
|
862
862
|
}
|
|
863
863
|
function useOutsideClick(ref, handler, enabled = true) {
|
|
864
|
-
|
|
864
|
+
React14__namespace.default.useEffect(() => {
|
|
865
865
|
if (!enabled) return;
|
|
866
866
|
const listener = (event) => {
|
|
867
867
|
if (!ref.current || ref.current.contains(event.target)) {
|
|
@@ -971,9 +971,9 @@ var prepareFiles = async (acceptedFiles) => {
|
|
|
971
971
|
);
|
|
972
972
|
};
|
|
973
973
|
var findChildrenByDisplayName = (children, displayName2) => {
|
|
974
|
-
return
|
|
974
|
+
return React14__namespace.default.Children.toArray(children).find(
|
|
975
975
|
(child) => {
|
|
976
|
-
if (
|
|
976
|
+
if (React14__namespace.default.isValidElement(child)) {
|
|
977
977
|
const childType = child.type;
|
|
978
978
|
return childType.displayName === displayName2;
|
|
979
979
|
} else {
|
|
@@ -1153,7 +1153,7 @@ function getIcon(position, Icon2, props) {
|
|
|
1153
1153
|
if (loadingIcons.includes(chosen)) {
|
|
1154
1154
|
const Cmp = loadingIconsMap[chosen];
|
|
1155
1155
|
const sizePx = typeof loadingIconSize === "number" ? `${loadingIconSize}px` : "12px";
|
|
1156
|
-
return
|
|
1156
|
+
return React14__namespace.default.createElement(Cmp, {
|
|
1157
1157
|
width: sizePx,
|
|
1158
1158
|
height: sizePx
|
|
1159
1159
|
});
|
|
@@ -1168,11 +1168,11 @@ function getIcon(position, Icon2, props) {
|
|
|
1168
1168
|
spin: props.spin
|
|
1169
1169
|
}
|
|
1170
1170
|
);
|
|
1171
|
-
} else if (
|
|
1171
|
+
} else if (React14__namespace.default.isValidElement(chosen)) {
|
|
1172
1172
|
return chosen;
|
|
1173
1173
|
} else if (typeof chosen === "function") {
|
|
1174
1174
|
const iconProps = typeof loadingIconSize === "number" || typeof loadingIconSize === "string" ? { size: loadingIconSize } : void 0;
|
|
1175
|
-
return
|
|
1175
|
+
return React14__namespace.default.createElement(chosen, iconProps);
|
|
1176
1176
|
} else if (typeof chosen === "object" && chosen !== null && "iconName" in chosen) {
|
|
1177
1177
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1178
1178
|
reactFontawesome.FontAwesomeIcon,
|
|
@@ -1222,8 +1222,8 @@ function getIcon(position, Icon2, props) {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
);
|
|
1224
1224
|
} else if (typeof Icon2 === "function") {
|
|
1225
|
-
return
|
|
1226
|
-
} else if (
|
|
1225
|
+
return React14__namespace.default.createElement(Icon2);
|
|
1226
|
+
} else if (React14__namespace.default.isValidElement(Icon2)) {
|
|
1227
1227
|
return Icon2;
|
|
1228
1228
|
} else return null;
|
|
1229
1229
|
}
|
|
@@ -1268,9 +1268,9 @@ var TrackNameKey = "Track";
|
|
|
1268
1268
|
var ThumbNameKey = "Thumb";
|
|
1269
1269
|
var Button = motionTags.button;
|
|
1270
1270
|
var Base = motionTags.div;
|
|
1271
|
-
var SwitchContext =
|
|
1271
|
+
var SwitchContext = React14__namespace.default.createContext(null);
|
|
1272
1272
|
var useSwitchContext = () => {
|
|
1273
|
-
const context2 =
|
|
1273
|
+
const context2 = React14__namespace.default.useContext(SwitchContext);
|
|
1274
1274
|
if (!context2) {
|
|
1275
1275
|
throw new Error("Switch compound components must be used within Switch");
|
|
1276
1276
|
}
|
|
@@ -1289,9 +1289,9 @@ function Switch(props) {
|
|
|
1289
1289
|
_motion,
|
|
1290
1290
|
...rest
|
|
1291
1291
|
} = props;
|
|
1292
|
-
const [x, setX] =
|
|
1293
|
-
const [pressed, setPressed] =
|
|
1294
|
-
const [growThumb, setGrowThumb] =
|
|
1292
|
+
const [x, setX] = React14__namespace.default.useState(0);
|
|
1293
|
+
const [pressed, setPressed] = React14__namespace.default.useState(false);
|
|
1294
|
+
const [growThumb, setGrowThumb] = React14__namespace.default.useState(false);
|
|
1295
1295
|
const borderWidth = 4;
|
|
1296
1296
|
const trackWidth = thumbSize * 1.5;
|
|
1297
1297
|
const borderRadius = thumbSize * 2.5;
|
|
@@ -1302,7 +1302,7 @@ function Switch(props) {
|
|
|
1302
1302
|
start: stopwatchStart,
|
|
1303
1303
|
clear: stopwatchClear
|
|
1304
1304
|
} = useStopwatch();
|
|
1305
|
-
|
|
1305
|
+
React14__namespace.default.useEffect(() => {
|
|
1306
1306
|
if (pressed && !disabled) {
|
|
1307
1307
|
stopwatchStart();
|
|
1308
1308
|
} else {
|
|
@@ -1310,12 +1310,12 @@ function Switch(props) {
|
|
|
1310
1310
|
stopwatchClear();
|
|
1311
1311
|
}
|
|
1312
1312
|
}, [pressed, disabled, stopwatchStart, stopwatchClear]);
|
|
1313
|
-
|
|
1313
|
+
React14__namespace.default.useEffect(() => {
|
|
1314
1314
|
if (stopwatchTime > 200) {
|
|
1315
1315
|
setGrowThumb(true);
|
|
1316
1316
|
}
|
|
1317
1317
|
}, [stopwatchTime]);
|
|
1318
|
-
|
|
1318
|
+
React14__namespace.default.useEffect(() => {
|
|
1319
1319
|
setX(checked ? checkedPosition : 0);
|
|
1320
1320
|
}, [checked, checkedPosition]);
|
|
1321
1321
|
const toggle = () => {
|
|
@@ -1380,10 +1380,10 @@ function Switch(props) {
|
|
|
1380
1380
|
children,
|
|
1381
1381
|
ThumbNameKey
|
|
1382
1382
|
);
|
|
1383
|
-
const trackElement = track ?
|
|
1383
|
+
const trackElement = track ? React14__namespace.default.cloneElement(track, {
|
|
1384
1384
|
_motion,
|
|
1385
|
-
children: thumb ?
|
|
1386
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx(Track, { _motion, children: thumb ?
|
|
1385
|
+
children: thumb ? React14__namespace.default.cloneElement(thumb, { _motion }) : /* @__PURE__ */ jsxRuntime.jsx(Thumb, { _motion })
|
|
1386
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(Track, { _motion, children: thumb ? React14__namespace.default.cloneElement(thumb, { _motion }) : /* @__PURE__ */ jsxRuntime.jsx(Thumb, { _motion }) });
|
|
1387
1387
|
return /* @__PURE__ */ jsxRuntime.jsx(SwitchContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.MotionConfig, { transition: _motion, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1388
1388
|
Button,
|
|
1389
1389
|
{
|
|
@@ -1509,10 +1509,10 @@ function Thumb(props) {
|
|
|
1509
1509
|
Track.displayName = TrackNameKey;
|
|
1510
1510
|
Thumb.displayName = ThumbNameKey;
|
|
1511
1511
|
function useStopwatch(props = {}) {
|
|
1512
|
-
const [active, setActive] =
|
|
1513
|
-
const [time, setTime] =
|
|
1512
|
+
const [active, setActive] = React14__namespace.default.useState(false);
|
|
1513
|
+
const [time, setTime] = React14__namespace.default.useState(0);
|
|
1514
1514
|
const timeInterval = props?.interval ?? 10;
|
|
1515
|
-
|
|
1515
|
+
React14__namespace.default.useEffect(() => {
|
|
1516
1516
|
let interval = null;
|
|
1517
1517
|
if (active) {
|
|
1518
1518
|
interval = setInterval(() => {
|
|
@@ -1523,19 +1523,19 @@ function useStopwatch(props = {}) {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
return () => clearInterval(interval);
|
|
1525
1525
|
}, [active, timeInterval]);
|
|
1526
|
-
const start =
|
|
1527
|
-
const stop =
|
|
1528
|
-
const clear =
|
|
1526
|
+
const start = React14__namespace.default.useCallback(() => setActive(true), []);
|
|
1527
|
+
const stop = React14__namespace.default.useCallback(() => setActive(false), []);
|
|
1528
|
+
const clear = React14__namespace.default.useCallback(() => {
|
|
1529
1529
|
setActive(false);
|
|
1530
1530
|
setTime(0);
|
|
1531
1531
|
}, []);
|
|
1532
|
-
return
|
|
1532
|
+
return React14__namespace.default.useMemo(
|
|
1533
1533
|
() => ({ time, start, stop, clear }),
|
|
1534
1534
|
[time, start, stop, clear]
|
|
1535
1535
|
);
|
|
1536
1536
|
}
|
|
1537
1537
|
var switch_default = Switch;
|
|
1538
|
-
var RadioContext =
|
|
1538
|
+
var RadioContext = React14__namespace.default.createContext(null);
|
|
1539
1539
|
var Base2 = base;
|
|
1540
1540
|
var MotionDiv2 = motionTags.div;
|
|
1541
1541
|
function Radio(props) {
|
|
@@ -1552,14 +1552,14 @@ function Radio(props) {
|
|
|
1552
1552
|
onAnimationComplete: _onAnimationComplete,
|
|
1553
1553
|
...rest
|
|
1554
1554
|
} = props;
|
|
1555
|
-
const groupId =
|
|
1555
|
+
const groupId = React14__namespace.default.useId();
|
|
1556
1556
|
const isControlled = controlledValue !== void 0;
|
|
1557
|
-
const [uncontrolled, setUncontrolled] =
|
|
1557
|
+
const [uncontrolled, setUncontrolled] = React14__namespace.default.useState(
|
|
1558
1558
|
defaultValue
|
|
1559
1559
|
);
|
|
1560
1560
|
const selectedValue = isControlled ? controlledValue ?? null : uncontrolled;
|
|
1561
|
-
const itemsRef =
|
|
1562
|
-
const [activeId, setActiveId] =
|
|
1561
|
+
const itemsRef = React14__namespace.default.useRef([]);
|
|
1562
|
+
const [activeId, setActiveId] = React14__namespace.default.useState("");
|
|
1563
1563
|
const setSelectedValue = (val) => {
|
|
1564
1564
|
if (!isControlled) setUncontrolled(val);
|
|
1565
1565
|
onChange?.(val);
|
|
@@ -1612,7 +1612,7 @@ function Radio(props) {
|
|
|
1612
1612
|
setActiveId(found.id);
|
|
1613
1613
|
}
|
|
1614
1614
|
};
|
|
1615
|
-
|
|
1615
|
+
React14__namespace.default.useEffect(() => {
|
|
1616
1616
|
if (!selectedValue) return;
|
|
1617
1617
|
const selected = itemsRef.current.find((x) => x.value === selectedValue);
|
|
1618
1618
|
if (selected && !selected.disabled) setActiveId(selected.id);
|
|
@@ -1653,7 +1653,7 @@ function Radio(props) {
|
|
|
1653
1653
|
},
|
|
1654
1654
|
children: [
|
|
1655
1655
|
(options ?? []).map(
|
|
1656
|
-
(opt) => renderOption ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1656
|
+
(opt) => renderOption ? /* @__PURE__ */ jsxRuntime.jsx(React14__namespace.default.Fragment, { children: renderOption(opt) }, opt.value) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1657
1657
|
Item,
|
|
1658
1658
|
{
|
|
1659
1659
|
value: opt.value,
|
|
@@ -1685,16 +1685,16 @@ function Item(props) {
|
|
|
1685
1685
|
onAnimationComplete: _onAnimationComplete,
|
|
1686
1686
|
...rest
|
|
1687
1687
|
} = props;
|
|
1688
|
-
const ctx =
|
|
1689
|
-
const ref =
|
|
1690
|
-
const [isFocused, setIsFocused] =
|
|
1688
|
+
const ctx = React14__namespace.default.useContext(RadioContext);
|
|
1689
|
+
const ref = React14__namespace.default.useRef(null);
|
|
1690
|
+
const [isFocused, setIsFocused] = React14__namespace.default.useState(false);
|
|
1691
1691
|
const groupDisabled = ctx?.disabled;
|
|
1692
1692
|
const disabled = !!(groupDisabled || itemDisabled);
|
|
1693
1693
|
const groupId = ctx?.groupId ?? "";
|
|
1694
1694
|
const id = `radio-item-${groupId}-${value}`;
|
|
1695
1695
|
const registerItem = ctx?.registerItem;
|
|
1696
1696
|
const unregisterItem = ctx?.unregisterItem;
|
|
1697
|
-
|
|
1697
|
+
React14__namespace.default.useEffect(() => {
|
|
1698
1698
|
if (!registerItem || !unregisterItem) return;
|
|
1699
1699
|
registerItem({ id, value, disabled, ref });
|
|
1700
1700
|
return () => unregisterItem(id);
|
|
@@ -1710,12 +1710,12 @@ function Item(props) {
|
|
|
1710
1710
|
const isActive = isActiveId(id);
|
|
1711
1711
|
const shouldUseGrid = gridProp || !!colsProp;
|
|
1712
1712
|
const renderLabel = () => {
|
|
1713
|
-
const onlyChild =
|
|
1713
|
+
const onlyChild = React14__namespace.default.Children.count(children) === 1 ? React14__namespace.default.Children.toArray(children)[0] : null;
|
|
1714
1714
|
if (typeof onlyChild === "string") {
|
|
1715
1715
|
return /* @__PURE__ */ jsxRuntime.jsx(Base2, { "data-radio-label": true, children: onlyChild });
|
|
1716
1716
|
}
|
|
1717
|
-
if (
|
|
1718
|
-
return
|
|
1717
|
+
if (React14__namespace.default.isValidElement(onlyChild)) {
|
|
1718
|
+
return React14__namespace.default.cloneElement(
|
|
1719
1719
|
onlyChild,
|
|
1720
1720
|
{ "data-radio-label": true }
|
|
1721
1721
|
);
|
|
@@ -1832,7 +1832,7 @@ function Item(props) {
|
|
|
1832
1832
|
var LabelNameKey = "Label";
|
|
1833
1833
|
var Base3 = base;
|
|
1834
1834
|
var isBrowser = typeof window !== "undefined";
|
|
1835
|
-
var useIsomorphicLayoutEffect = isBrowser ?
|
|
1835
|
+
var useIsomorphicLayoutEffect = isBrowser ? React14__namespace.default.useLayoutEffect : React14__namespace.default.useEffect;
|
|
1836
1836
|
function pick(props, obj) {
|
|
1837
1837
|
return props.reduce((acc, prop) => {
|
|
1838
1838
|
acc[prop] = obj[prop];
|
|
@@ -1963,21 +1963,21 @@ function Textarea(props) {
|
|
|
1963
1963
|
...rest
|
|
1964
1964
|
} = props;
|
|
1965
1965
|
const isControlled = props.value !== void 0;
|
|
1966
|
-
const libRef =
|
|
1966
|
+
const libRef = React14__namespace.default.useRef(null);
|
|
1967
1967
|
const ref = assignRefs(libRef, userRef);
|
|
1968
|
-
const heightRef =
|
|
1969
|
-
const [_value, _setValue] =
|
|
1968
|
+
const heightRef = React14__namespace.default.useRef(0);
|
|
1969
|
+
const [_value, _setValue] = React14__namespace.default.useState("");
|
|
1970
1970
|
const value = props.value ?? _value;
|
|
1971
1971
|
const label = findChildrenByDisplayName(
|
|
1972
1972
|
children,
|
|
1973
1973
|
LabelNameKey
|
|
1974
1974
|
);
|
|
1975
|
-
const labelWithProps = label ?
|
|
1975
|
+
const labelWithProps = label ? React14__namespace.default.cloneElement(label, {
|
|
1976
1976
|
required: props.required,
|
|
1977
1977
|
value: props.value,
|
|
1978
1978
|
error
|
|
1979
1979
|
}) : null;
|
|
1980
|
-
const resizeTextarea =
|
|
1980
|
+
const resizeTextarea = React14__namespace.default.useCallback(() => {
|
|
1981
1981
|
const node = libRef.current;
|
|
1982
1982
|
if (!node) return;
|
|
1983
1983
|
const nodeSizingData = getSizingData(node);
|
|
@@ -2003,20 +2003,20 @@ function Textarea(props) {
|
|
|
2003
2003
|
useIsomorphicLayoutEffect(() => {
|
|
2004
2004
|
resizeTextarea();
|
|
2005
2005
|
}, [rest.value, rest.placeholder, resizeTextarea]);
|
|
2006
|
-
|
|
2006
|
+
React14__namespace.default.useEffect(() => {
|
|
2007
2007
|
if (!isBrowser) return;
|
|
2008
2008
|
const onResize = () => resizeTextarea();
|
|
2009
2009
|
window.addEventListener("resize", onResize);
|
|
2010
2010
|
return () => window.removeEventListener("resize", onResize);
|
|
2011
2011
|
}, [rest.placeholder, rest.value, resizeTextarea]);
|
|
2012
|
-
|
|
2012
|
+
React14__namespace.default.useEffect(() => {
|
|
2013
2013
|
const fonts = isBrowser ? document.fonts : void 0;
|
|
2014
2014
|
if (!fonts || typeof fonts.addEventListener !== "function") return;
|
|
2015
2015
|
const onFontsLoaded = () => resizeTextarea();
|
|
2016
2016
|
fonts.addEventListener("loadingdone", onFontsLoaded);
|
|
2017
2017
|
return () => fonts.removeEventListener("loadingdone", onFontsLoaded);
|
|
2018
2018
|
}, [rest.placeholder, rest.value, resizeTextarea]);
|
|
2019
|
-
|
|
2019
|
+
React14__namespace.default.useEffect(() => {
|
|
2020
2020
|
const node = libRef.current;
|
|
2021
2021
|
const form = node?.form;
|
|
2022
2022
|
if (!node || !form || isControlled) return;
|
|
@@ -2158,8 +2158,8 @@ function Icon(props) {
|
|
|
2158
2158
|
}
|
|
2159
2159
|
);
|
|
2160
2160
|
} else if (typeof IconComp === "function") {
|
|
2161
|
-
return
|
|
2162
|
-
} else if (
|
|
2161
|
+
return React14__namespace.default.createElement(IconComp);
|
|
2162
|
+
} else if (React14__namespace.default.isValidElement(IconComp)) {
|
|
2163
2163
|
return IconComp;
|
|
2164
2164
|
}
|
|
2165
2165
|
return null;
|
|
@@ -2188,13 +2188,13 @@ function Input(props) {
|
|
|
2188
2188
|
children,
|
|
2189
2189
|
RightSideNameKey
|
|
2190
2190
|
);
|
|
2191
|
-
const labelWithProps = label ?
|
|
2191
|
+
const labelWithProps = label ? React14__namespace.default.cloneElement(label, {
|
|
2192
2192
|
hasLeftIcon: !!leftIcon,
|
|
2193
2193
|
required: props.required,
|
|
2194
2194
|
value: props.value,
|
|
2195
2195
|
error
|
|
2196
2196
|
}) : null;
|
|
2197
|
-
const rightSideWithProps = rightSide ?
|
|
2197
|
+
const rightSideWithProps = rightSide ? React14__namespace.default.cloneElement(rightSide, {
|
|
2198
2198
|
onChange: props.onChange,
|
|
2199
2199
|
value: props.value
|
|
2200
2200
|
}) : null;
|
|
@@ -2339,29 +2339,29 @@ function Label2(props) {
|
|
|
2339
2339
|
Label2.displayName = LabelNameKey2;
|
|
2340
2340
|
function useResizeObserver(opts = {}) {
|
|
2341
2341
|
const onResize = opts.onResize;
|
|
2342
|
-
const onResizeRef =
|
|
2343
|
-
|
|
2342
|
+
const onResizeRef = React14__namespace.default.useRef(void 0);
|
|
2343
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
2344
2344
|
onResizeRef.current = onResize;
|
|
2345
2345
|
}, [onResize]);
|
|
2346
2346
|
const round = opts.round || Math.round;
|
|
2347
|
-
const resizeObserverRef =
|
|
2348
|
-
const [size, setSize] =
|
|
2347
|
+
const resizeObserverRef = React14__namespace.default.useRef(null);
|
|
2348
|
+
const [size, setSize] = React14__namespace.default.useState({
|
|
2349
2349
|
width: void 0,
|
|
2350
2350
|
height: void 0
|
|
2351
2351
|
});
|
|
2352
|
-
const didUnmount =
|
|
2353
|
-
|
|
2352
|
+
const didUnmount = React14__namespace.default.useRef(false);
|
|
2353
|
+
React14__namespace.default.useEffect(() => {
|
|
2354
2354
|
didUnmount.current = false;
|
|
2355
2355
|
return () => {
|
|
2356
2356
|
didUnmount.current = true;
|
|
2357
2357
|
};
|
|
2358
2358
|
}, []);
|
|
2359
|
-
const previous =
|
|
2359
|
+
const previous = React14__namespace.default.useRef({
|
|
2360
2360
|
width: void 0,
|
|
2361
2361
|
height: void 0
|
|
2362
2362
|
});
|
|
2363
2363
|
const refCallback = useResolvedElement(
|
|
2364
|
-
|
|
2364
|
+
React14__namespace.default.useCallback(
|
|
2365
2365
|
(element) => {
|
|
2366
2366
|
if (!resizeObserverRef.current || resizeObserverRef.current.box !== opts.box || resizeObserverRef.current.round !== round) {
|
|
2367
2367
|
resizeObserverRef.current = {
|
|
@@ -2401,7 +2401,7 @@ function useResizeObserver(opts = {}) {
|
|
|
2401
2401
|
),
|
|
2402
2402
|
opts.ref
|
|
2403
2403
|
);
|
|
2404
|
-
return
|
|
2404
|
+
return React14__namespace.default.useMemo(
|
|
2405
2405
|
() => ({
|
|
2406
2406
|
ref: refCallback,
|
|
2407
2407
|
width: size.width,
|
|
@@ -2413,12 +2413,12 @@ function useResizeObserver(opts = {}) {
|
|
|
2413
2413
|
);
|
|
2414
2414
|
}
|
|
2415
2415
|
function useResolvedElement(subscriber, refOrElement) {
|
|
2416
|
-
const lastReportRef =
|
|
2417
|
-
const refOrElementRef =
|
|
2418
|
-
|
|
2416
|
+
const lastReportRef = React14__namespace.default.useRef(null);
|
|
2417
|
+
const refOrElementRef = React14__namespace.default.useRef(null);
|
|
2418
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
2419
2419
|
refOrElementRef.current = refOrElement;
|
|
2420
2420
|
}, [refOrElement]);
|
|
2421
|
-
const cbElementRef =
|
|
2421
|
+
const cbElementRef = React14__namespace.default.useRef(null);
|
|
2422
2422
|
const evaluateSubscription = () => {
|
|
2423
2423
|
const cbElement = cbElementRef.current;
|
|
2424
2424
|
const refOrElement2 = refOrElementRef.current;
|
|
@@ -2437,10 +2437,10 @@ function useResolvedElement(subscriber, refOrElement) {
|
|
|
2437
2437
|
cleanup: element ? subscriber(element) : void 0
|
|
2438
2438
|
};
|
|
2439
2439
|
};
|
|
2440
|
-
|
|
2440
|
+
React14__namespace.default.useEffect(() => {
|
|
2441
2441
|
evaluateSubscription();
|
|
2442
2442
|
});
|
|
2443
|
-
|
|
2443
|
+
React14__namespace.default.useEffect(() => {
|
|
2444
2444
|
return () => {
|
|
2445
2445
|
if (lastReportRef.current && lastReportRef.current.cleanup) {
|
|
2446
2446
|
lastReportRef.current.cleanup();
|
|
@@ -2466,7 +2466,7 @@ var use_resize_observer_default = useResizeObserver;
|
|
|
2466
2466
|
var MotionDiv3 = motionTags.div;
|
|
2467
2467
|
var MotionBtn = motionTags.button;
|
|
2468
2468
|
var displayName = "AccordionItem";
|
|
2469
|
-
var AccordionContext =
|
|
2469
|
+
var AccordionContext = React14__namespace.default.createContext({});
|
|
2470
2470
|
function AccordionProvider(props) {
|
|
2471
2471
|
const [state, setState] = useImmer.useImmer({
|
|
2472
2472
|
allowMultiple: false,
|
|
@@ -2476,7 +2476,7 @@ function AccordionProvider(props) {
|
|
|
2476
2476
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionContext.Provider, { value: { setState, state }, children: props.children });
|
|
2477
2477
|
}
|
|
2478
2478
|
function useAccordion() {
|
|
2479
|
-
const context2 =
|
|
2479
|
+
const context2 = React14__namespace.default.useContext(AccordionContext);
|
|
2480
2480
|
if (context2 === void 0) {
|
|
2481
2481
|
throw new Error("useAccordion must be used within a AccordionProvider");
|
|
2482
2482
|
}
|
|
@@ -2485,23 +2485,23 @@ function useAccordion() {
|
|
|
2485
2485
|
function AccordionComponent(props) {
|
|
2486
2486
|
const accordion = useAccordion();
|
|
2487
2487
|
const accordionState = accordion.state;
|
|
2488
|
-
|
|
2488
|
+
React14__namespace.default.useEffect(() => {
|
|
2489
2489
|
accordion.setState((draft) => {
|
|
2490
2490
|
draft.allowMultiple = !!props.allowMultiple;
|
|
2491
2491
|
draft.allowToggle = !!props.allowToggle;
|
|
2492
2492
|
});
|
|
2493
2493
|
}, [props.allowMultiple, props.allowToggle]);
|
|
2494
|
-
|
|
2494
|
+
React14__namespace.default.Children.forEach(props.children, (x) => {
|
|
2495
2495
|
if (typeof x.type === "function" && "displayName" in x.type && x.type.displayName !== displayName) {
|
|
2496
2496
|
throw new Error("Accordion can only have AccordionItems as children");
|
|
2497
2497
|
}
|
|
2498
2498
|
});
|
|
2499
|
-
const children =
|
|
2500
|
-
if (!
|
|
2501
|
-
return
|
|
2499
|
+
const children = React14__namespace.default.Children.map(props.children, (child, i) => {
|
|
2500
|
+
if (!React14__namespace.default.isValidElement(child)) return child;
|
|
2501
|
+
return React14__namespace.default.cloneElement(child, { idx: i });
|
|
2502
2502
|
});
|
|
2503
2503
|
const defaultOpenIdxList = JSON.stringify(props.defaultOpenIdx ?? []);
|
|
2504
|
-
|
|
2504
|
+
React14__namespace.default.useEffect(
|
|
2505
2505
|
() => {
|
|
2506
2506
|
if (accordionState.open.length === children.length) return;
|
|
2507
2507
|
const defaultOpenIdx = props.defaultOpenIdx;
|
|
@@ -2608,16 +2608,16 @@ var MotionDiv4 = motionTags.div;
|
|
|
2608
2608
|
var MotionBtn2 = motionTags.button;
|
|
2609
2609
|
var breakpoint = ["(min-width: 600px)"];
|
|
2610
2610
|
function DrawerComponent(props) {
|
|
2611
|
-
const ref =
|
|
2612
|
-
const dragHandleRef =
|
|
2611
|
+
const ref = React14__namespace.default.useRef(null);
|
|
2612
|
+
const dragHandleRef = React14__namespace.default.useRef(null);
|
|
2613
2613
|
const [isDesktop] = useMatchMedia(breakpoint);
|
|
2614
|
-
const closeFnRef =
|
|
2615
|
-
const prevOpenRef =
|
|
2614
|
+
const closeFnRef = React14__namespace.default.useRef(null);
|
|
2615
|
+
const prevOpenRef = React14__namespace.default.useRef(null);
|
|
2616
2616
|
const dragControls = framerMotion.useDragControls();
|
|
2617
2617
|
const { open, setOpen } = useDrawer();
|
|
2618
2618
|
const { onClose, onExitComplete, ...rest } = props;
|
|
2619
|
-
const [mounted, setMounted] =
|
|
2620
|
-
|
|
2619
|
+
const [mounted, setMounted] = React14__namespace.default.useState(false);
|
|
2620
|
+
React14__namespace.default.useEffect(() => {
|
|
2621
2621
|
setMounted(true);
|
|
2622
2622
|
}, []);
|
|
2623
2623
|
const y = framerMotion.useMotionValue(0);
|
|
@@ -2630,7 +2630,7 @@ function DrawerComponent(props) {
|
|
|
2630
2630
|
y.stop();
|
|
2631
2631
|
setOpen(false);
|
|
2632
2632
|
};
|
|
2633
|
-
|
|
2633
|
+
React14__namespace.default.useEffect(() => {
|
|
2634
2634
|
closeFnRef.current = () => {
|
|
2635
2635
|
closeDrawer();
|
|
2636
2636
|
onClose?.();
|
|
@@ -2650,7 +2650,7 @@ function DrawerComponent(props) {
|
|
|
2650
2650
|
);
|
|
2651
2651
|
}
|
|
2652
2652
|
};
|
|
2653
|
-
|
|
2653
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
2654
2654
|
const wasOpen = prevOpenRef.current;
|
|
2655
2655
|
const isOpen = props.open;
|
|
2656
2656
|
if (isOpen) {
|
|
@@ -2660,7 +2660,7 @@ function DrawerComponent(props) {
|
|
|
2660
2660
|
}
|
|
2661
2661
|
prevOpenRef.current = isOpen;
|
|
2662
2662
|
}, [props.open]);
|
|
2663
|
-
|
|
2663
|
+
React14__namespace.default.useEffect(() => {
|
|
2664
2664
|
const container = ref.current;
|
|
2665
2665
|
if (!open || !container) return;
|
|
2666
2666
|
container.setAttribute("tabindex", "0");
|
|
@@ -2682,7 +2682,7 @@ function DrawerComponent(props) {
|
|
|
2682
2682
|
document.body.style.overflow = "auto";
|
|
2683
2683
|
};
|
|
2684
2684
|
}, [open, props.closeOnEsc]);
|
|
2685
|
-
|
|
2685
|
+
React14__namespace.default.useEffect(() => {
|
|
2686
2686
|
if (!props.open) return;
|
|
2687
2687
|
const unsubscribeY = y.on("change", (latestY) => {
|
|
2688
2688
|
if (latestY > 150) {
|
|
@@ -2703,159 +2703,167 @@ function DrawerComponent(props) {
|
|
|
2703
2703
|
};
|
|
2704
2704
|
if (!mounted) return null;
|
|
2705
2705
|
return reactDom.createPortal(
|
|
2706
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2707
|
-
|
|
2706
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2707
|
+
framerMotion.AnimatePresence,
|
|
2708
2708
|
{
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2709
|
+
initial: false,
|
|
2710
|
+
mode: "wait",
|
|
2711
|
+
onExitComplete,
|
|
2712
|
+
children: open && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2713
|
+
Backdrop,
|
|
2712
2714
|
{
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2715
|
+
onClick: () => onBackdropClick(),
|
|
2716
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2717
|
+
MotionDiv4,
|
|
2718
|
+
{
|
|
2719
|
+
grid: true,
|
|
2720
|
+
onClick: (e) => e.stopPropagation(),
|
|
2721
|
+
position: "fixed",
|
|
2722
|
+
initial: "initial",
|
|
2723
|
+
animate: "animate",
|
|
2724
|
+
exit: "exit",
|
|
2725
|
+
...isDesktop ? {
|
|
2726
|
+
drag: false,
|
|
2727
|
+
style: void 0,
|
|
2728
|
+
dragControls: null,
|
|
2729
|
+
dragConstraints: void 0,
|
|
2730
|
+
// style: null,
|
|
2731
|
+
// dragConstraints: null,
|
|
2732
|
+
height: props.height ?? "max-content!",
|
|
2733
|
+
// "min(50%, 300px)",
|
|
2734
|
+
width: props.width ?? "clamp(50%, 700px, 90%)",
|
|
2735
|
+
pt: 6,
|
|
2736
|
+
// px: 4,
|
|
2737
|
+
margin: "auto",
|
|
2738
|
+
borderRadius: 12,
|
|
2739
|
+
zIndex: 1,
|
|
2740
|
+
variants: {
|
|
2741
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
2742
|
+
animate: {
|
|
2743
|
+
opacity: 1,
|
|
2744
|
+
scale: 1,
|
|
2745
|
+
transition: {
|
|
2746
|
+
type: "spring",
|
|
2747
|
+
damping: 20,
|
|
2748
|
+
stiffness: 300
|
|
2749
|
+
}
|
|
2750
|
+
},
|
|
2751
|
+
exit: {
|
|
2752
|
+
opacity: 0,
|
|
2753
|
+
scale: 0.3,
|
|
2754
|
+
transition: { type: "spring", duration: 0.45 }
|
|
2755
|
+
}
|
|
2743
2756
|
}
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2757
|
+
} : {
|
|
2758
|
+
w: "100vw",
|
|
2759
|
+
left: 0,
|
|
2760
|
+
right: 0,
|
|
2761
|
+
bottom: 0,
|
|
2762
|
+
borderTopLeftRadius: 12,
|
|
2763
|
+
borderTopRightRadius: 12,
|
|
2764
|
+
overflow: "hidden",
|
|
2765
|
+
// Note: Can't use framer-motion's `y` prop because it conflicts
|
|
2766
|
+
// with the drag motion value. Use CSS transform instead.
|
|
2767
|
+
variants: {
|
|
2768
|
+
initial: {
|
|
2769
|
+
transform: "translateY(100%)",
|
|
2770
|
+
opacity: 0.5
|
|
2771
|
+
},
|
|
2772
|
+
animate: {
|
|
2773
|
+
transform: "translateY(0%)",
|
|
2774
|
+
opacity: 1,
|
|
2775
|
+
transition: {
|
|
2776
|
+
type: "spring",
|
|
2777
|
+
damping: 22,
|
|
2778
|
+
stiffness: 400,
|
|
2779
|
+
mass: 0.7
|
|
2780
|
+
}
|
|
2781
|
+
},
|
|
2782
|
+
exit: {
|
|
2783
|
+
transform: "translateY(100%)",
|
|
2784
|
+
opacity: 0,
|
|
2785
|
+
transition: {
|
|
2786
|
+
type: "tween",
|
|
2787
|
+
duration: 0.2,
|
|
2788
|
+
ease: [0.4, 0, 1, 1]
|
|
2789
|
+
// ease-in for quick exit
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
},
|
|
2793
|
+
drag: "y",
|
|
2794
|
+
style: { y },
|
|
2795
|
+
dragControls,
|
|
2796
|
+
onPointerDown: (e) => onDragStart(e),
|
|
2797
|
+
// drag={hasBackdrop ? "y" : false}
|
|
2798
|
+
dragElastic: 0,
|
|
2799
|
+
// prevent drawer from being dragged higher than what its opened to
|
|
2800
|
+
dragConstraints: { top: 0 },
|
|
2801
|
+
onDragEnd: (_, drag) => {
|
|
2802
|
+
if (props.drag === false) return;
|
|
2803
|
+
const pageHeight = document.documentElement.scrollHeight;
|
|
2804
|
+
const yCoord = drag.point.y;
|
|
2805
|
+
const velocity = drag.velocity.y;
|
|
2806
|
+
const releaseThreshold = 0.8;
|
|
2807
|
+
const releasePct = yCoord / pageHeight;
|
|
2808
|
+
if (velocity > 25 && releasePct >= releaseThreshold || velocity > 750) {
|
|
2809
|
+
props.onClose?.();
|
|
2810
|
+
}
|
|
2774
2811
|
}
|
|
2775
2812
|
},
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2813
|
+
boxSizing: "border-box",
|
|
2814
|
+
boxShadow: "hsl(0deg 0% 0% / 60%) 0px -4px 20px",
|
|
2815
|
+
bg: { base: "neutral.100", _dark: "neutral.900" },
|
|
2816
|
+
color: "text-primary",
|
|
2817
|
+
ref,
|
|
2818
|
+
...rest,
|
|
2819
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2820
|
+
MotionDiv4,
|
|
2821
|
+
{
|
|
2822
|
+
grid: true,
|
|
2823
|
+
...isDesktop ? { position: "relative" } : { rows: "max-content 1fr" },
|
|
2824
|
+
children: [
|
|
2825
|
+
!isDesktop && props.hideHandle !== false && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2826
|
+
MotionDiv4,
|
|
2827
|
+
{
|
|
2828
|
+
grid: true,
|
|
2829
|
+
justifySelf: "center",
|
|
2830
|
+
h: 6,
|
|
2831
|
+
w: 34,
|
|
2832
|
+
mt: "16px",
|
|
2833
|
+
mb: 4,
|
|
2834
|
+
br: 20,
|
|
2835
|
+
bg: { base: "neutral.400", _dark: "neutral.600" },
|
|
2836
|
+
cursor: props.drag ? "row-resize" : "default",
|
|
2837
|
+
ref: dragHandleRef
|
|
2838
|
+
}
|
|
2839
|
+
),
|
|
2840
|
+
props.children
|
|
2841
|
+
]
|
|
2784
2842
|
}
|
|
2785
|
-
|
|
2843
|
+
)
|
|
2786
2844
|
},
|
|
2787
|
-
|
|
2788
|
-
style: { y },
|
|
2789
|
-
dragControls,
|
|
2790
|
-
onPointerDown: (e) => onDragStart(e),
|
|
2791
|
-
// drag={hasBackdrop ? "y" : false}
|
|
2792
|
-
dragElastic: 0,
|
|
2793
|
-
// prevent drawer from being dragged higher than what its opened to
|
|
2794
|
-
dragConstraints: { top: 0 },
|
|
2795
|
-
onDragEnd: (_, drag) => {
|
|
2796
|
-
if (props.drag === false) return;
|
|
2797
|
-
const pageHeight = document.documentElement.scrollHeight;
|
|
2798
|
-
const yCoord = drag.point.y;
|
|
2799
|
-
const velocity = drag.velocity.y;
|
|
2800
|
-
const releaseThreshold = 0.8;
|
|
2801
|
-
const releasePct = yCoord / pageHeight;
|
|
2802
|
-
if (velocity > 25 && releasePct >= releaseThreshold || velocity > 750) {
|
|
2803
|
-
props.onClose?.();
|
|
2804
|
-
}
|
|
2805
|
-
}
|
|
2806
|
-
},
|
|
2807
|
-
boxSizing: "border-box",
|
|
2808
|
-
boxShadow: "hsl(0deg 0% 0% / 60%) 0px -4px 20px",
|
|
2809
|
-
bg: { base: "neutral.100", _dark: "neutral.900" },
|
|
2810
|
-
color: "text-primary",
|
|
2811
|
-
ref,
|
|
2812
|
-
...rest,
|
|
2813
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2814
|
-
MotionDiv4,
|
|
2815
|
-
{
|
|
2816
|
-
grid: true,
|
|
2817
|
-
...isDesktop ? { position: "relative" } : { rows: "max-content 1fr" },
|
|
2818
|
-
children: [
|
|
2819
|
-
!isDesktop && props.hideHandle !== false && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2820
|
-
MotionDiv4,
|
|
2821
|
-
{
|
|
2822
|
-
grid: true,
|
|
2823
|
-
justifySelf: "center",
|
|
2824
|
-
h: 6,
|
|
2825
|
-
w: 34,
|
|
2826
|
-
mt: "16px",
|
|
2827
|
-
mb: 4,
|
|
2828
|
-
br: 20,
|
|
2829
|
-
bg: { base: "neutral.400", _dark: "neutral.600" },
|
|
2830
|
-
cursor: props.drag ? "row-resize" : "default",
|
|
2831
|
-
ref: dragHandleRef
|
|
2832
|
-
}
|
|
2833
|
-
),
|
|
2834
|
-
props.children
|
|
2835
|
-
]
|
|
2836
|
-
}
|
|
2845
|
+
"drawer"
|
|
2837
2846
|
)
|
|
2838
|
-
}
|
|
2839
|
-
"drawer"
|
|
2847
|
+
}
|
|
2840
2848
|
)
|
|
2841
2849
|
}
|
|
2842
|
-
)
|
|
2850
|
+
),
|
|
2843
2851
|
document.getElementById("portal")
|
|
2844
2852
|
);
|
|
2845
2853
|
}
|
|
2846
|
-
var DrawerContext =
|
|
2854
|
+
var DrawerContext = React14__namespace.default.createContext({
|
|
2847
2855
|
open: false,
|
|
2848
2856
|
setOpen: () => {
|
|
2849
2857
|
return;
|
|
2850
2858
|
}
|
|
2851
2859
|
});
|
|
2852
2860
|
function DrawerProvider(props) {
|
|
2853
|
-
const [open, setOpen] =
|
|
2861
|
+
const [open, setOpen] = React14__namespace.default.useState(false);
|
|
2854
2862
|
const value = { open, setOpen };
|
|
2855
2863
|
return /* @__PURE__ */ jsxRuntime.jsx(DrawerContext.Provider, { value, children: props.children });
|
|
2856
2864
|
}
|
|
2857
2865
|
function useDrawer() {
|
|
2858
|
-
const context2 =
|
|
2866
|
+
const context2 = React14__namespace.default.useContext(DrawerContext);
|
|
2859
2867
|
if (context2 === void 0) {
|
|
2860
2868
|
throw new Error("useDrawer must be used within a DrawerProvider");
|
|
2861
2869
|
}
|
|
@@ -2868,7 +2876,7 @@ function BtnGroup(props) {
|
|
|
2868
2876
|
const [isDesktop] = useMatchMedia(breakpoint);
|
|
2869
2877
|
const { children, ...rest } = props;
|
|
2870
2878
|
if (isDesktop) {
|
|
2871
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MotionDiv4, { flex: true, alignI: true, gap: 4, ...rest, children:
|
|
2879
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MotionDiv4, { flex: true, alignI: true, gap: 4, ...rest, children: React14__namespace.default.Children.toArray(children).toReversed() });
|
|
2872
2880
|
} else {
|
|
2873
2881
|
return /* @__PURE__ */ jsxRuntime.jsx(MotionDiv4, { grid: true, rowG: 14, ...props });
|
|
2874
2882
|
}
|
|
@@ -2921,7 +2929,7 @@ function CloseBtn(props) {
|
|
|
2921
2929
|
}
|
|
2922
2930
|
}
|
|
2923
2931
|
function Backdrop(props) {
|
|
2924
|
-
const allowOutsideClickRef =
|
|
2932
|
+
const allowOutsideClickRef = React14__namespace.default.useRef(true);
|
|
2925
2933
|
const [isDesktop] = useMatchMedia(breakpoint);
|
|
2926
2934
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2927
2935
|
MotionDiv4,
|
|
@@ -2952,11 +2960,11 @@ function Backdrop(props) {
|
|
|
2952
2960
|
}
|
|
2953
2961
|
function useMatchMedia(queries) {
|
|
2954
2962
|
const isClient = typeof window !== "undefined";
|
|
2955
|
-
const [value, setValue] =
|
|
2963
|
+
const [value, setValue] = React14__namespace.default.useState(() => {
|
|
2956
2964
|
if (!isClient) return queries.map(() => false);
|
|
2957
2965
|
return queries.map((q) => window.matchMedia(q).matches);
|
|
2958
2966
|
});
|
|
2959
|
-
|
|
2967
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
2960
2968
|
if (!isClient) return;
|
|
2961
2969
|
const mediaQueryLists = queries.map((q) => window.matchMedia(q));
|
|
2962
2970
|
const handler = () => {
|
|
@@ -2975,9 +2983,9 @@ var TrackBgNameKey = "TrackBg";
|
|
|
2975
2983
|
var TrackFillNameKey = "TrackFill";
|
|
2976
2984
|
function Progress(props) {
|
|
2977
2985
|
const { children, steps, value, max: maxProp, ...rest } = props;
|
|
2978
|
-
const [progress, setProgress] =
|
|
2986
|
+
const [progress, setProgress] = React14__namespace.default.useState(0);
|
|
2979
2987
|
const max = maxProp ?? 100;
|
|
2980
|
-
|
|
2988
|
+
React14__namespace.default.useEffect(() => {
|
|
2981
2989
|
setProgress(Math.min((value ?? 0) / max, 1) * 100);
|
|
2982
2990
|
}, [value, max]);
|
|
2983
2991
|
const width = `${progress}%`;
|
|
@@ -3017,7 +3025,7 @@ function Progress(props) {
|
|
|
3017
3025
|
TrackFillNameKey
|
|
3018
3026
|
);
|
|
3019
3027
|
const barHeight = rest.h ?? 8;
|
|
3020
|
-
const bgEl = trackBgChild ?
|
|
3028
|
+
const bgEl = trackBgChild ? React14__namespace.default.cloneElement(trackBgChild, {
|
|
3021
3029
|
gridArea: "1 / 1",
|
|
3022
3030
|
h: barHeight,
|
|
3023
3031
|
w: trackBgChild.props.w ?? true
|
|
@@ -3032,7 +3040,7 @@ function Progress(props) {
|
|
|
3032
3040
|
bg: { base: "neutral.200", _dark: "neutral.700" }
|
|
3033
3041
|
}
|
|
3034
3042
|
);
|
|
3035
|
-
const fillEl = trackFillChild ?
|
|
3043
|
+
const fillEl = trackFillChild ? React14__namespace.default.cloneElement(trackFillChild, {
|
|
3036
3044
|
gridArea: "1 / 1",
|
|
3037
3045
|
h: barHeight,
|
|
3038
3046
|
roundedLeft: 9999,
|
|
@@ -3106,9 +3114,9 @@ var MotionDiv6 = motionTags.div;
|
|
|
3106
3114
|
var TrackNameKey2 = "SliderTrack";
|
|
3107
3115
|
var FillNameKey = "SliderFill";
|
|
3108
3116
|
var ThumbNameKey2 = "SliderThumb";
|
|
3109
|
-
var SliderContext =
|
|
3117
|
+
var SliderContext = React14__namespace.default.createContext(null);
|
|
3110
3118
|
var useSliderContext = () => {
|
|
3111
|
-
const context2 =
|
|
3119
|
+
const context2 = React14__namespace.default.useContext(SliderContext);
|
|
3112
3120
|
if (!context2) {
|
|
3113
3121
|
throw new Error("Slider compound components must be used within Slider");
|
|
3114
3122
|
}
|
|
@@ -3128,15 +3136,15 @@ function Slider(props) {
|
|
|
3128
3136
|
...rest
|
|
3129
3137
|
} = props;
|
|
3130
3138
|
const isControlled = controlledValue !== void 0;
|
|
3131
|
-
const [internalValue, setInternalValue] =
|
|
3139
|
+
const [internalValue, setInternalValue] = React14__namespace.default.useState(defaultValue);
|
|
3132
3140
|
const value = isControlled ? controlledValue : internalValue;
|
|
3133
|
-
const [isDragging, setIsDragging] =
|
|
3134
|
-
const trackRef =
|
|
3141
|
+
const [isDragging, setIsDragging] = React14__namespace.default.useState(false);
|
|
3142
|
+
const trackRef = React14__namespace.default.useRef(null);
|
|
3135
3143
|
const percent = Math.min(
|
|
3136
3144
|
100,
|
|
3137
3145
|
Math.max(0, (value - min) / (max - min) * 100)
|
|
3138
3146
|
);
|
|
3139
|
-
const clampValue =
|
|
3147
|
+
const clampValue = React14__namespace.default.useCallback(
|
|
3140
3148
|
(rawValue) => {
|
|
3141
3149
|
let clamped = Math.max(min, Math.min(max, rawValue));
|
|
3142
3150
|
if (step !== void 0 && step > 0) {
|
|
@@ -3147,7 +3155,7 @@ function Slider(props) {
|
|
|
3147
3155
|
},
|
|
3148
3156
|
[min, max, step]
|
|
3149
3157
|
);
|
|
3150
|
-
const getValueFromClientX =
|
|
3158
|
+
const getValueFromClientX = React14__namespace.default.useCallback(
|
|
3151
3159
|
(clientX) => {
|
|
3152
3160
|
const track = trackRef.current;
|
|
3153
3161
|
if (!track) return value;
|
|
@@ -3159,7 +3167,7 @@ function Slider(props) {
|
|
|
3159
3167
|
},
|
|
3160
3168
|
[min, max, value, clampValue]
|
|
3161
3169
|
);
|
|
3162
|
-
const updateValue =
|
|
3170
|
+
const updateValue = React14__namespace.default.useCallback(
|
|
3163
3171
|
(newValue) => {
|
|
3164
3172
|
if (disabled) return;
|
|
3165
3173
|
if (!isControlled) {
|
|
@@ -3176,7 +3184,7 @@ function Slider(props) {
|
|
|
3176
3184
|
const newValue = getValueFromClientX(e.clientX);
|
|
3177
3185
|
updateValue(newValue);
|
|
3178
3186
|
};
|
|
3179
|
-
|
|
3187
|
+
React14__namespace.default.useEffect(() => {
|
|
3180
3188
|
if (!isDragging) return;
|
|
3181
3189
|
const controller = new AbortController();
|
|
3182
3190
|
const handleMove = (e) => {
|
|
@@ -3246,19 +3254,19 @@ function Slider(props) {
|
|
|
3246
3254
|
trackRef
|
|
3247
3255
|
};
|
|
3248
3256
|
const height = rest.h ?? 8;
|
|
3249
|
-
const trackEl = trackChild ?
|
|
3257
|
+
const trackEl = trackChild ? React14__namespace.default.cloneElement(trackChild, {
|
|
3250
3258
|
sliderPercent: percent,
|
|
3251
3259
|
sliderValue: value,
|
|
3252
3260
|
sliderMin: min,
|
|
3253
3261
|
sliderMax: max
|
|
3254
3262
|
}) : /* @__PURE__ */ jsxRuntime.jsx(SliderTrack, {});
|
|
3255
|
-
const fillEl = fillChild ?
|
|
3263
|
+
const fillEl = fillChild ? React14__namespace.default.cloneElement(fillChild, {
|
|
3256
3264
|
sliderPercent: percent,
|
|
3257
3265
|
sliderValue: value,
|
|
3258
3266
|
sliderMin: min,
|
|
3259
3267
|
sliderMax: max
|
|
3260
3268
|
}) : /* @__PURE__ */ jsxRuntime.jsx(SliderFill, {});
|
|
3261
|
-
const thumbEl = thumbChild ?
|
|
3269
|
+
const thumbEl = thumbChild ? React14__namespace.default.cloneElement(thumbChild, {
|
|
3262
3270
|
sliderPercent: percent,
|
|
3263
3271
|
sliderValue: value,
|
|
3264
3272
|
sliderMin: min,
|
|
@@ -3384,27 +3392,113 @@ function SliderThumb(props) {
|
|
|
3384
3392
|
}
|
|
3385
3393
|
SliderThumb.displayName = ThumbNameKey2;
|
|
3386
3394
|
var Base5 = base;
|
|
3387
|
-
var
|
|
3395
|
+
var Svg = motionTags.svg;
|
|
3396
|
+
var CheckboxBtn = motionTags.button;
|
|
3397
|
+
function Checkbox(props) {
|
|
3388
3398
|
const {
|
|
3389
3399
|
children,
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
onAnimationComplete,
|
|
3400
|
+
onClick: _onClick,
|
|
3401
|
+
onAnimationStart: _onAnimationStart,
|
|
3402
|
+
onAnimationComplete: _onAnimationComplete,
|
|
3394
3403
|
...rest
|
|
3395
3404
|
} = props;
|
|
3396
|
-
|
|
3405
|
+
const [checked, setChecked] = React14__namespace.default.useState(false);
|
|
3406
|
+
const [indeterminate, setIndeterminate] = React14__namespace.default.useState(false);
|
|
3407
|
+
React14__namespace.default.useEffect(() => {
|
|
3408
|
+
setChecked(!!rest.checked);
|
|
3409
|
+
}, [rest.checked]);
|
|
3410
|
+
React14__namespace.default.useEffect(() => {
|
|
3411
|
+
setIndeterminate(!!rest.indeterminate);
|
|
3412
|
+
}, [rest.indeterminate]);
|
|
3413
|
+
const isIndeterminate = typeof rest.indeterminate === "boolean";
|
|
3414
|
+
const checkboxSelector = rest._checkbox;
|
|
3415
|
+
const hasCheckboxBg = checkboxSelector && hasAnyProp(checkboxSelector, ["bg", "background", "backgroundColor"]);
|
|
3416
|
+
const checkedSelector = rest._checked;
|
|
3417
|
+
const hasCheckedBg = checkedSelector && hasAnyProp(checkedSelector, ["bg", "background", "backgroundColor"]);
|
|
3418
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3397
3419
|
Base5,
|
|
3398
3420
|
{
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3421
|
+
...!hasAnyProp(rest, ["grid", "flex", "display"]) && {
|
|
3422
|
+
alignI: true,
|
|
3423
|
+
flex: true
|
|
3424
|
+
},
|
|
3425
|
+
gap: 2,
|
|
3426
|
+
cursor: "pointer",
|
|
3427
|
+
userSelect: "none",
|
|
3403
3428
|
...rest,
|
|
3404
|
-
|
|
3429
|
+
onClick: () => rest.onChecked?.(!rest.checked),
|
|
3430
|
+
children: [
|
|
3431
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3432
|
+
CheckboxBtn,
|
|
3433
|
+
{
|
|
3434
|
+
"data-checkbox": true,
|
|
3435
|
+
...checked && { "data-checked": checked },
|
|
3436
|
+
w: "24px",
|
|
3437
|
+
p: 1,
|
|
3438
|
+
br: 6,
|
|
3439
|
+
cursor: "pointer",
|
|
3440
|
+
boxSizing: "border-box",
|
|
3441
|
+
outline: "none !important",
|
|
3442
|
+
...!hasCheckboxBg && {
|
|
3443
|
+
bg: { base: "neutral.200", _dark: "neutral.700" }
|
|
3444
|
+
},
|
|
3445
|
+
...!hasCheckedBg && {
|
|
3446
|
+
_checked: { bg: "blue.500", transition: ".14s background ease-out" }
|
|
3447
|
+
},
|
|
3448
|
+
_active: { scale: 0.9 },
|
|
3449
|
+
color: "neutral.100",
|
|
3450
|
+
transition: ".14s background ease-out .1s",
|
|
3451
|
+
_focus: { boxShadow: "0 0 0 6px hsl(0 0% 100% / 0.05)" },
|
|
3452
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3453
|
+
Svg,
|
|
3454
|
+
{
|
|
3455
|
+
fill: "none",
|
|
3456
|
+
width: "100%",
|
|
3457
|
+
viewBox: "0 0 24 24",
|
|
3458
|
+
stroke: "currentColor",
|
|
3459
|
+
strokeWidth: 4,
|
|
3460
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(framerMotion.AnimatePresence, { mode: "wait", children: [
|
|
3461
|
+
isIndeterminate && indeterminate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3462
|
+
framerMotion.motion.path,
|
|
3463
|
+
{
|
|
3464
|
+
initial: { scaleX: 0 },
|
|
3465
|
+
animate: { scaleX: 1 },
|
|
3466
|
+
exit: { scaleX: 0 },
|
|
3467
|
+
transition: {
|
|
3468
|
+
type: "tween",
|
|
3469
|
+
ease: "easeOut",
|
|
3470
|
+
duration: 0.3,
|
|
3471
|
+
delay: 0.2
|
|
3472
|
+
},
|
|
3473
|
+
strokeLinecap: "round",
|
|
3474
|
+
d: "M6 12 L18 12"
|
|
3475
|
+
},
|
|
3476
|
+
"indeterminate"
|
|
3477
|
+
),
|
|
3478
|
+
!indeterminate && checked && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3479
|
+
framerMotion.motion.path,
|
|
3480
|
+
{
|
|
3481
|
+
initial: { pathLength: 0 },
|
|
3482
|
+
animate: { pathLength: 1 },
|
|
3483
|
+
exit: { pathLength: 0 },
|
|
3484
|
+
transition: { type: "tween", ease: "easeOut", duration: 0.2 },
|
|
3485
|
+
strokeLinecap: "round",
|
|
3486
|
+
strokeLinejoin: "round",
|
|
3487
|
+
d: "M5 13l4 4L19 7"
|
|
3488
|
+
},
|
|
3489
|
+
"check"
|
|
3490
|
+
)
|
|
3491
|
+
] })
|
|
3492
|
+
}
|
|
3493
|
+
)
|
|
3494
|
+
}
|
|
3495
|
+
),
|
|
3496
|
+
children
|
|
3497
|
+
]
|
|
3405
3498
|
}
|
|
3406
3499
|
);
|
|
3407
|
-
}
|
|
3500
|
+
}
|
|
3501
|
+
var Base6 = base;
|
|
3408
3502
|
function Tooltip(props) {
|
|
3409
3503
|
const {
|
|
3410
3504
|
children,
|
|
@@ -3418,9 +3512,15 @@ function Tooltip(props) {
|
|
|
3418
3512
|
delay = 80,
|
|
3419
3513
|
className
|
|
3420
3514
|
} = props;
|
|
3421
|
-
const referenceRef =
|
|
3422
|
-
const arrowRef =
|
|
3423
|
-
const
|
|
3515
|
+
const referenceRef = React14__namespace.default.useRef(null);
|
|
3516
|
+
const arrowRef = React14__namespace.default.useRef(null);
|
|
3517
|
+
const closeTimerRef = React14__namespace.default.useRef(
|
|
3518
|
+
null
|
|
3519
|
+
);
|
|
3520
|
+
const containerRef = React14__namespace.default.useRef(null);
|
|
3521
|
+
const [open, setOpen] = React14__namespace.default.useState(false);
|
|
3522
|
+
const [isMounted, setIsMounted] = React14__namespace.default.useState(false);
|
|
3523
|
+
const [containerBg, setContainerBg] = React14__namespace.default.useState();
|
|
3424
3524
|
const { x, y, refs, strategy, middlewareData, context: context2 } = react.useFloating({
|
|
3425
3525
|
open,
|
|
3426
3526
|
onOpenChange: setOpen,
|
|
@@ -3429,6 +3529,7 @@ function Tooltip(props) {
|
|
|
3429
3529
|
react.offset(offsetVal),
|
|
3430
3530
|
react.flip(),
|
|
3431
3531
|
react.shift({ padding: 6 }),
|
|
3532
|
+
// eslint-disable-next-line react-hooks/refs -- arrowRef is passed as object, not read during render
|
|
3432
3533
|
react.arrow({ element: arrowRef })
|
|
3433
3534
|
],
|
|
3434
3535
|
whileElementsMounted: react.autoUpdate,
|
|
@@ -3449,7 +3550,27 @@ function Tooltip(props) {
|
|
|
3449
3550
|
role
|
|
3450
3551
|
]);
|
|
3451
3552
|
const referenceProps = getReferenceProps({});
|
|
3452
|
-
|
|
3553
|
+
React14__namespace.default.useEffect(() => {
|
|
3554
|
+
if (closeTimerRef.current) {
|
|
3555
|
+
clearTimeout(closeTimerRef.current);
|
|
3556
|
+
closeTimerRef.current = null;
|
|
3557
|
+
}
|
|
3558
|
+
if (open) {
|
|
3559
|
+
setIsMounted(true);
|
|
3560
|
+
} else {
|
|
3561
|
+
closeTimerRef.current = setTimeout(() => {
|
|
3562
|
+
setIsMounted(false);
|
|
3563
|
+
closeTimerRef.current = null;
|
|
3564
|
+
}, 160);
|
|
3565
|
+
}
|
|
3566
|
+
return () => {
|
|
3567
|
+
if (closeTimerRef.current) {
|
|
3568
|
+
clearTimeout(closeTimerRef.current);
|
|
3569
|
+
closeTimerRef.current = null;
|
|
3570
|
+
}
|
|
3571
|
+
};
|
|
3572
|
+
}, [open]);
|
|
3573
|
+
React14__namespace.default.useEffect(() => {
|
|
3453
3574
|
if (!follow || !referenceRef.current) return;
|
|
3454
3575
|
const el = referenceRef.current;
|
|
3455
3576
|
const onMove = (e) => {
|
|
@@ -3464,6 +3585,21 @@ function Tooltip(props) {
|
|
|
3464
3585
|
el.removeEventListener("pointermove", onMove);
|
|
3465
3586
|
};
|
|
3466
3587
|
}, [follow, refs]);
|
|
3588
|
+
React14__namespace.default.useEffect(() => {
|
|
3589
|
+
if (!(open || isMounted)) return;
|
|
3590
|
+
const el = containerRef.current;
|
|
3591
|
+
if (!el) return;
|
|
3592
|
+
try {
|
|
3593
|
+
const cs = getComputedStyle(el);
|
|
3594
|
+
const bg = cs.backgroundColor;
|
|
3595
|
+
if (bg && bg !== "transparent" && bg !== "rgba(0, 0, 0, 0)") {
|
|
3596
|
+
setContainerBg(bg);
|
|
3597
|
+
} else {
|
|
3598
|
+
setContainerBg("rgba(20,20,20,0.95)");
|
|
3599
|
+
}
|
|
3600
|
+
} catch {
|
|
3601
|
+
}
|
|
3602
|
+
}, [open, isMounted]);
|
|
3467
3603
|
const arrowX = middlewareData?.arrow?.x ?? 0;
|
|
3468
3604
|
const arrowY = middlewareData?.arrow?.y ?? 0;
|
|
3469
3605
|
const side = context2.placement || "top";
|
|
@@ -3472,14 +3608,14 @@ function Tooltip(props) {
|
|
|
3472
3608
|
const arrowAnchorStyle = side.startsWith("top") ? { bottom: -anchorOffset } : side.startsWith("bottom") ? { top: -anchorOffset } : side.startsWith("left") ? { right: -anchorOffset } : { left: -anchorOffset };
|
|
3473
3609
|
const arrowStyle = side.startsWith("top") || side.startsWith("bottom") ? { left: arrowX || void 0, ...arrowAnchorStyle } : { top: arrowY || void 0, ...arrowAnchorStyle };
|
|
3474
3610
|
const transformOrigin = side.startsWith("top") ? "center bottom" : side.startsWith("bottom") ? "center top" : side.startsWith("left") ? "right center" : side.startsWith("right") ? "left center" : "center";
|
|
3475
|
-
const childrenArray =
|
|
3611
|
+
const childrenArray = React14__namespace.default.Children.toArray(children);
|
|
3476
3612
|
const hasMultipleChildren = childrenArray.length > 1;
|
|
3477
3613
|
let child;
|
|
3478
3614
|
if (hasMultipleChildren) {
|
|
3479
3615
|
child = /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "inline-block" }, children });
|
|
3480
3616
|
} else {
|
|
3481
|
-
const only =
|
|
3482
|
-
const isDomElement =
|
|
3617
|
+
const only = React14__namespace.default.Children.only(children);
|
|
3618
|
+
const isDomElement = React14__namespace.default.isValidElement(only) && typeof only.type === "string";
|
|
3483
3619
|
child = isDomElement ? only : (
|
|
3484
3620
|
// Ensure the wrapper reliably captures mouseenter/pointerenter and can contain block elements
|
|
3485
3621
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "inline-block" }, children: only })
|
|
@@ -3492,79 +3628,43 @@ function Tooltip(props) {
|
|
|
3492
3628
|
}
|
|
3493
3629
|
const childWithRef = child;
|
|
3494
3630
|
const originalRef = childWithRef?.ref;
|
|
3495
|
-
if (typeof originalRef === "function")
|
|
3496
|
-
|
|
3631
|
+
if (typeof originalRef === "function") {
|
|
3632
|
+
originalRef(node);
|
|
3633
|
+
} else if (originalRef && "current" in originalRef) {
|
|
3497
3634
|
originalRef.current = node;
|
|
3635
|
+
}
|
|
3498
3636
|
};
|
|
3499
|
-
const
|
|
3500
|
-
const cloned = React13__namespace.default.cloneElement(
|
|
3637
|
+
const cloned = React14__namespace.default.cloneElement(
|
|
3501
3638
|
child,
|
|
3639
|
+
// eslint-disable-next-line react-hooks/refs -- ref callback is invoked after render, not during
|
|
3502
3640
|
{
|
|
3503
|
-
...
|
|
3641
|
+
...referenceProps,
|
|
3504
3642
|
ref: mergedRef,
|
|
3505
3643
|
"data-tooltip-ref": true
|
|
3506
3644
|
}
|
|
3507
3645
|
);
|
|
3508
3646
|
if (disabled) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: cloned });
|
|
3509
|
-
const [isMounted, setIsMounted] = React13__namespace.default.useState(false);
|
|
3510
|
-
const closeTimerRef = React13__namespace.default.useRef(
|
|
3511
|
-
null
|
|
3512
|
-
);
|
|
3513
|
-
React13__namespace.default.useEffect(() => {
|
|
3514
|
-
if (closeTimerRef.current) {
|
|
3515
|
-
clearTimeout(closeTimerRef.current);
|
|
3516
|
-
closeTimerRef.current = null;
|
|
3517
|
-
}
|
|
3518
|
-
if (open) {
|
|
3519
|
-
setIsMounted(true);
|
|
3520
|
-
} else {
|
|
3521
|
-
closeTimerRef.current = setTimeout(() => {
|
|
3522
|
-
setIsMounted(false);
|
|
3523
|
-
closeTimerRef.current = null;
|
|
3524
|
-
}, 160);
|
|
3525
|
-
}
|
|
3526
|
-
return () => {
|
|
3527
|
-
if (closeTimerRef.current) {
|
|
3528
|
-
clearTimeout(closeTimerRef.current);
|
|
3529
|
-
closeTimerRef.current = null;
|
|
3530
|
-
}
|
|
3531
|
-
};
|
|
3532
|
-
}, [open]);
|
|
3533
3647
|
let arrowEl = null;
|
|
3534
3648
|
let floatingNode = null;
|
|
3535
3649
|
const findRoleTooltipElement = (node) => {
|
|
3536
|
-
if (!
|
|
3650
|
+
if (!React14__namespace.default.isValidElement(node)) return null;
|
|
3537
3651
|
const el = node;
|
|
3538
3652
|
if (el.props?.role === "tooltip") return el;
|
|
3539
3653
|
const kids = el.props?.children;
|
|
3540
3654
|
if (!kids) return null;
|
|
3541
|
-
const arr =
|
|
3655
|
+
const arr = React14__namespace.default.Children.toArray(kids);
|
|
3542
3656
|
for (const c of arr) {
|
|
3543
|
-
if (
|
|
3544
|
-
|
|
3657
|
+
if (React14__namespace.default.isValidElement(c)) {
|
|
3658
|
+
const childEl = c;
|
|
3659
|
+
if (childEl.props?.role === "tooltip") {
|
|
3660
|
+
return childEl;
|
|
3661
|
+
}
|
|
3545
3662
|
}
|
|
3546
3663
|
}
|
|
3547
3664
|
return null;
|
|
3548
3665
|
};
|
|
3549
|
-
const isCustomTooltip =
|
|
3666
|
+
const isCustomTooltip = React14__namespace.default.isValidElement(content) && !!(content.type && content.type.isBlockTooltipContainer);
|
|
3550
3667
|
const customEl = isCustomTooltip ? content : findRoleTooltipElement(content);
|
|
3551
|
-
const containerRef = React13__namespace.default.useRef(null);
|
|
3552
|
-
const [containerBg, setContainerBg] = React13__namespace.default.useState();
|
|
3553
|
-
React13__namespace.default.useEffect(() => {
|
|
3554
|
-
if (!(open || isMounted)) return;
|
|
3555
|
-
const el = containerRef.current;
|
|
3556
|
-
if (!el) return;
|
|
3557
|
-
try {
|
|
3558
|
-
const cs = getComputedStyle(el);
|
|
3559
|
-
const bg = cs.backgroundColor;
|
|
3560
|
-
if (bg && bg !== "transparent" && bg !== "rgba(0, 0, 0, 0)") {
|
|
3561
|
-
setContainerBg(bg);
|
|
3562
|
-
} else {
|
|
3563
|
-
setContainerBg("rgba(20,20,20,0.95)");
|
|
3564
|
-
}
|
|
3565
|
-
} catch {
|
|
3566
|
-
}
|
|
3567
|
-
}, [open, isMounted, isCustomTooltip]);
|
|
3568
3668
|
if (isCustomTooltip) {
|
|
3569
3669
|
const el = customEl;
|
|
3570
3670
|
const childProps = el.props || {};
|
|
@@ -3598,17 +3698,19 @@ function Tooltip(props) {
|
|
|
3598
3698
|
...childProps,
|
|
3599
3699
|
...floatingProps});
|
|
3600
3700
|
Object.keys(floatingProps).forEach((key) => {
|
|
3601
|
-
|
|
3602
|
-
|
|
3701
|
+
const floatingValue = floatingProps[key];
|
|
3702
|
+
if (key.startsWith("on") && typeof floatingValue === "function") {
|
|
3603
3703
|
childProps[key];
|
|
3604
3704
|
}
|
|
3605
3705
|
});
|
|
3606
3706
|
const originalRef = el.ref;
|
|
3607
3707
|
const mergedFloatingRef = (node) => {
|
|
3608
3708
|
refs.setFloating(node);
|
|
3609
|
-
if (typeof originalRef === "function")
|
|
3610
|
-
|
|
3709
|
+
if (typeof originalRef === "function") {
|
|
3710
|
+
originalRef(node);
|
|
3711
|
+
} else if (originalRef && "current" in originalRef) {
|
|
3611
3712
|
originalRef.current = node;
|
|
3713
|
+
}
|
|
3612
3714
|
};
|
|
3613
3715
|
arrowEl = showArrow ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3614
3716
|
"div",
|
|
@@ -3654,12 +3756,15 @@ function Tooltip(props) {
|
|
|
3654
3756
|
const originalChildRef = el.ref;
|
|
3655
3757
|
const mergedChildRef = (node) => {
|
|
3656
3758
|
containerRef.current = node;
|
|
3657
|
-
if (typeof originalChildRef === "function")
|
|
3658
|
-
|
|
3759
|
+
if (typeof originalChildRef === "function") {
|
|
3760
|
+
originalChildRef(node);
|
|
3761
|
+
} else if (originalChildRef && "current" in originalChildRef) {
|
|
3659
3762
|
originalChildRef.current = node;
|
|
3763
|
+
}
|
|
3660
3764
|
};
|
|
3661
|
-
return
|
|
3765
|
+
return React14__namespace.default.cloneElement(
|
|
3662
3766
|
el,
|
|
3767
|
+
// eslint-disable-next-line react-hooks/refs -- ref callback is invoked after render, not during
|
|
3663
3768
|
{
|
|
3664
3769
|
// Spread childProps first
|
|
3665
3770
|
...childProps,
|
|
@@ -3722,7 +3827,7 @@ function Tooltip(props) {
|
|
|
3722
3827
|
transition: { type: "spring", stiffness: 520, damping: 34 },
|
|
3723
3828
|
children: [
|
|
3724
3829
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3725
|
-
|
|
3830
|
+
Base6,
|
|
3726
3831
|
{
|
|
3727
3832
|
role: "tooltip",
|
|
3728
3833
|
style: { position: "relative" },
|
|
@@ -3730,9 +3835,9 @@ function Tooltip(props) {
|
|
|
3730
3835
|
color: "white",
|
|
3731
3836
|
px: "10px",
|
|
3732
3837
|
py: "8px",
|
|
3838
|
+
fontSize: 13,
|
|
3733
3839
|
borderRadius: 6,
|
|
3734
3840
|
boxShadow: "0 6px 18px rgba(0,0,0,0.18)",
|
|
3735
|
-
fontSize: 13,
|
|
3736
3841
|
ref: containerRef,
|
|
3737
3842
|
children: content
|
|
3738
3843
|
}
|
|
@@ -3750,113 +3855,6 @@ function Tooltip(props) {
|
|
|
3750
3855
|
)
|
|
3751
3856
|
] });
|
|
3752
3857
|
}
|
|
3753
|
-
var Base6 = base;
|
|
3754
|
-
var Svg = motionTags.svg;
|
|
3755
|
-
var CheckboxBtn = motionTags.button;
|
|
3756
|
-
function Checkbox(props) {
|
|
3757
|
-
const {
|
|
3758
|
-
children,
|
|
3759
|
-
onClick: _onClick,
|
|
3760
|
-
onAnimationStart: _onAnimationStart,
|
|
3761
|
-
onAnimationComplete: _onAnimationComplete,
|
|
3762
|
-
...rest
|
|
3763
|
-
} = props;
|
|
3764
|
-
const [checked, setChecked] = React13__namespace.default.useState(false);
|
|
3765
|
-
const [indeterminate, setIndeterminate] = React13__namespace.default.useState(false);
|
|
3766
|
-
React13__namespace.default.useEffect(() => {
|
|
3767
|
-
setChecked(!!rest.checked);
|
|
3768
|
-
}, [rest.checked]);
|
|
3769
|
-
React13__namespace.default.useEffect(() => {
|
|
3770
|
-
setIndeterminate(!!rest.indeterminate);
|
|
3771
|
-
}, [rest.indeterminate]);
|
|
3772
|
-
const isIndeterminate = typeof rest.indeterminate === "boolean";
|
|
3773
|
-
const checkboxSelector = rest._checkbox;
|
|
3774
|
-
const hasCheckboxBg = checkboxSelector && hasAnyProp(checkboxSelector, ["bg", "background", "backgroundColor"]);
|
|
3775
|
-
const checkedSelector = rest._checked;
|
|
3776
|
-
const hasCheckedBg = checkedSelector && hasAnyProp(checkedSelector, ["bg", "background", "backgroundColor"]);
|
|
3777
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3778
|
-
Base6,
|
|
3779
|
-
{
|
|
3780
|
-
...!hasAnyProp(rest, ["grid", "flex", "display"]) && {
|
|
3781
|
-
alignI: true,
|
|
3782
|
-
flex: true
|
|
3783
|
-
},
|
|
3784
|
-
gap: 2,
|
|
3785
|
-
cursor: "pointer",
|
|
3786
|
-
userSelect: "none",
|
|
3787
|
-
...rest,
|
|
3788
|
-
onClick: () => rest.onChecked?.(!rest.checked),
|
|
3789
|
-
children: [
|
|
3790
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3791
|
-
CheckboxBtn,
|
|
3792
|
-
{
|
|
3793
|
-
"data-checkbox": true,
|
|
3794
|
-
...checked && { "data-checked": checked },
|
|
3795
|
-
w: "24px",
|
|
3796
|
-
p: 1,
|
|
3797
|
-
br: 6,
|
|
3798
|
-
cursor: "pointer",
|
|
3799
|
-
boxSizing: "border-box",
|
|
3800
|
-
outline: "none !important",
|
|
3801
|
-
...!hasCheckboxBg && {
|
|
3802
|
-
bg: { base: "neutral.200", _dark: "neutral.700" }
|
|
3803
|
-
},
|
|
3804
|
-
...!hasCheckedBg && {
|
|
3805
|
-
_checked: { bg: "blue.500", transition: ".14s background ease-out" }
|
|
3806
|
-
},
|
|
3807
|
-
_active: { scale: 0.9 },
|
|
3808
|
-
color: "neutral.100",
|
|
3809
|
-
transition: ".14s background ease-out .1s",
|
|
3810
|
-
_focus: { boxShadow: "0 0 0 6px hsl(0 0% 100% / 0.05)" },
|
|
3811
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3812
|
-
Svg,
|
|
3813
|
-
{
|
|
3814
|
-
fill: "none",
|
|
3815
|
-
width: "100%",
|
|
3816
|
-
viewBox: "0 0 24 24",
|
|
3817
|
-
stroke: "currentColor",
|
|
3818
|
-
strokeWidth: 4,
|
|
3819
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(framerMotion.AnimatePresence, { mode: "wait", children: [
|
|
3820
|
-
isIndeterminate && indeterminate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3821
|
-
framerMotion.motion.path,
|
|
3822
|
-
{
|
|
3823
|
-
initial: { scaleX: 0 },
|
|
3824
|
-
animate: { scaleX: 1 },
|
|
3825
|
-
exit: { scaleX: 0 },
|
|
3826
|
-
transition: {
|
|
3827
|
-
type: "tween",
|
|
3828
|
-
ease: "easeOut",
|
|
3829
|
-
duration: 0.3,
|
|
3830
|
-
delay: 0.2
|
|
3831
|
-
},
|
|
3832
|
-
strokeLinecap: "round",
|
|
3833
|
-
d: "M6 12 L18 12"
|
|
3834
|
-
},
|
|
3835
|
-
"indeterminate"
|
|
3836
|
-
),
|
|
3837
|
-
!indeterminate && checked && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3838
|
-
framerMotion.motion.path,
|
|
3839
|
-
{
|
|
3840
|
-
initial: { pathLength: 0 },
|
|
3841
|
-
animate: { pathLength: 1 },
|
|
3842
|
-
exit: { pathLength: 0 },
|
|
3843
|
-
transition: { type: "tween", ease: "easeOut", duration: 0.2 },
|
|
3844
|
-
strokeLinecap: "round",
|
|
3845
|
-
strokeLinejoin: "round",
|
|
3846
|
-
d: "M5 13l4 4L19 7"
|
|
3847
|
-
},
|
|
3848
|
-
"check"
|
|
3849
|
-
)
|
|
3850
|
-
] })
|
|
3851
|
-
}
|
|
3852
|
-
)
|
|
3853
|
-
}
|
|
3854
|
-
),
|
|
3855
|
-
children
|
|
3856
|
-
]
|
|
3857
|
-
}
|
|
3858
|
-
);
|
|
3859
|
-
}
|
|
3860
3858
|
var Hr = motionTags.hr;
|
|
3861
3859
|
var Skeleton = motionTags.div;
|
|
3862
3860
|
function Block(props) {
|
|
@@ -3868,7 +3866,7 @@ function Block(props) {
|
|
|
3868
3866
|
tooltip,
|
|
3869
3867
|
...rest
|
|
3870
3868
|
} = anyProps;
|
|
3871
|
-
const fileInputRef =
|
|
3869
|
+
const fileInputRef = React14__namespace.useRef(null);
|
|
3872
3870
|
const isLoading = anyProps.isLoading;
|
|
3873
3871
|
const multiple = anyProps.multiple;
|
|
3874
3872
|
const is = anyProps.is;
|
|
@@ -3905,7 +3903,7 @@ function Block(props) {
|
|
|
3905
3903
|
...anyProps
|
|
3906
3904
|
}
|
|
3907
3905
|
) : extract.filepickerAllowed ? /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick: () => fileInputRef.current?.click(), children: [
|
|
3908
|
-
|
|
3906
|
+
React14__namespace.createElement(
|
|
3909
3907
|
Comp,
|
|
3910
3908
|
{
|
|
3911
3909
|
cursor: "pointer",
|
|
@@ -3940,11 +3938,11 @@ function Block(props) {
|
|
|
3940
3938
|
value: ""
|
|
3941
3939
|
}
|
|
3942
3940
|
)
|
|
3943
|
-
] }) : extract.isVoidElement ?
|
|
3941
|
+
] }) : extract.isVoidElement ? React14__namespace.createElement(Comp, {
|
|
3944
3942
|
...isLoading && { "data-loading": isLoading },
|
|
3945
3943
|
onContextMenu: (e) => e.preventDefault(),
|
|
3946
3944
|
...initialStyles
|
|
3947
|
-
}) :
|
|
3945
|
+
}) : React14__namespace.createElement(
|
|
3948
3946
|
Comp,
|
|
3949
3947
|
{
|
|
3950
3948
|
...isLoading && { "data-loading": isLoading },
|
|
@@ -3969,13 +3967,9 @@ function Block(props) {
|
|
|
3969
3967
|
return component;
|
|
3970
3968
|
}
|
|
3971
3969
|
}
|
|
3972
|
-
var TaggedTooltipContainer = Object.assign(TooltipContainer, {
|
|
3973
|
-
isBlockTooltipContainer: true
|
|
3974
|
-
});
|
|
3975
3970
|
var TaggedMenuContainer = Object.assign(MenuContainer, {
|
|
3976
3971
|
isBlockMenuContainer: true
|
|
3977
3972
|
});
|
|
3978
|
-
var TooltipNamespace = { Container: TaggedTooltipContainer };
|
|
3979
3973
|
var MenuNamespace = { Container: TaggedMenuContainer };
|
|
3980
3974
|
var InputNamespace = {
|
|
3981
3975
|
Label: Label2,
|
|
@@ -4010,7 +4004,6 @@ var CompoundBlock = Object.assign(Block, {
|
|
|
4010
4004
|
Progress: ProgressNamespace,
|
|
4011
4005
|
Slider: SliderNamespace,
|
|
4012
4006
|
Textarea: TextareaNamespace,
|
|
4013
|
-
Tooltip: TooltipNamespace,
|
|
4014
4007
|
Switch: SwitchNamespace,
|
|
4015
4008
|
Drawer: DrawerNamespace,
|
|
4016
4009
|
Menu: MenuNamespace,
|
|
@@ -4049,22 +4042,22 @@ var saveTheme = (theme) => {
|
|
|
4049
4042
|
}
|
|
4050
4043
|
};
|
|
4051
4044
|
function useTheme() {
|
|
4052
|
-
const [value, setValue] =
|
|
4045
|
+
const [value, setValue] = React14__namespace.default.useState(() => {
|
|
4053
4046
|
return getDomTheme() ?? getStoredTheme() ?? "light";
|
|
4054
4047
|
});
|
|
4055
|
-
const valueRef =
|
|
4056
|
-
const isInternalRef =
|
|
4057
|
-
|
|
4048
|
+
const valueRef = React14__namespace.default.useRef(value);
|
|
4049
|
+
const isInternalRef = React14__namespace.default.useRef(false);
|
|
4050
|
+
React14__namespace.default.useEffect(() => {
|
|
4058
4051
|
valueRef.current = value;
|
|
4059
4052
|
}, [value]);
|
|
4060
|
-
|
|
4053
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
4061
4054
|
const domTheme = getDomTheme();
|
|
4062
4055
|
if (domTheme && domTheme !== valueRef.current) {
|
|
4063
4056
|
valueRef.current = domTheme;
|
|
4064
4057
|
setValue(domTheme);
|
|
4065
4058
|
}
|
|
4066
4059
|
}, []);
|
|
4067
|
-
|
|
4060
|
+
React14__namespace.default.useEffect(() => {
|
|
4068
4061
|
const ac = new AbortController();
|
|
4069
4062
|
window.addEventListener(
|
|
4070
4063
|
"storage",
|
|
@@ -4096,7 +4089,7 @@ function useTheme() {
|
|
|
4096
4089
|
);
|
|
4097
4090
|
return () => ac.abort();
|
|
4098
4091
|
}, []);
|
|
4099
|
-
const toggle =
|
|
4092
|
+
const toggle = React14__namespace.default.useCallback((theme) => {
|
|
4100
4093
|
const next = theme ?? (valueRef.current === "light" ? "dark" : "light");
|
|
4101
4094
|
valueRef.current = next;
|
|
4102
4095
|
setValue(next);
|
|
@@ -4109,8 +4102,8 @@ function useTheme() {
|
|
|
4109
4102
|
|
|
4110
4103
|
// src/react/index.ts
|
|
4111
4104
|
function useDebounce(value, delay = 500) {
|
|
4112
|
-
const [debouncedValue, setDebouncedValue] =
|
|
4113
|
-
|
|
4105
|
+
const [debouncedValue, setDebouncedValue] = React14__namespace.default.useState(value);
|
|
4106
|
+
React14__namespace.default.useEffect(() => {
|
|
4114
4107
|
const handler = setTimeout(() => {
|
|
4115
4108
|
setDebouncedValue(value);
|
|
4116
4109
|
}, delay);
|
|
@@ -4121,10 +4114,10 @@ function useDebounce(value, delay = 500) {
|
|
|
4121
4114
|
return debouncedValue;
|
|
4122
4115
|
}
|
|
4123
4116
|
function useThrottle(value, interval = 500) {
|
|
4124
|
-
const [throttledValue, setThrottledValue] =
|
|
4125
|
-
const lastUpdate =
|
|
4126
|
-
const timeoutRef =
|
|
4127
|
-
|
|
4117
|
+
const [throttledValue, setThrottledValue] = React14__namespace.default.useState(value);
|
|
4118
|
+
const lastUpdate = React14__namespace.default.useRef(0);
|
|
4119
|
+
const timeoutRef = React14__namespace.default.useRef(null);
|
|
4120
|
+
React14__namespace.default.useEffect(() => {
|
|
4128
4121
|
const now = Date.now();
|
|
4129
4122
|
const timeSinceLastUpdate = now - lastUpdate.current;
|
|
4130
4123
|
if (timeSinceLastUpdate >= interval) {
|
|
@@ -4150,11 +4143,11 @@ function useThrottle(value, interval = 500) {
|
|
|
4150
4143
|
function useMatchMedia2(queries, defaultValues = []) {
|
|
4151
4144
|
const initialValues = defaultValues.length ? defaultValues : Array(queries.length).fill(false);
|
|
4152
4145
|
const isClient = typeof window !== "undefined";
|
|
4153
|
-
const [value, setValue] =
|
|
4146
|
+
const [value, setValue] = React14__namespace.default.useState(() => {
|
|
4154
4147
|
if (!isClient) return initialValues;
|
|
4155
4148
|
return queries.map((q) => window.matchMedia(q).matches);
|
|
4156
4149
|
});
|
|
4157
|
-
|
|
4150
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
4158
4151
|
if (!isClient) return;
|
|
4159
4152
|
const mediaQueryLists = queries.map((q) => window.matchMedia(q));
|
|
4160
4153
|
const handler = () => {
|