qstd 0.3.43 → 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/client/index.cjs +1 -5
- package/dist/client/index.js +1 -5
- 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 +458 -460
- package/dist/react/index.css +3 -3
- package/dist/react/index.js +454 -456
- package/dist/server/index.cjs +1 -5
- package/dist/server/index.js +1 -5
- package/dist/shared/api/domain.d.ts +19 -1
- package/dist/shared/api/domain.d.ts.map +1 -1
- 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,14 +2608,18 @@ 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] = React14__namespace.default.useState(false);
|
|
2620
|
+
React14__namespace.default.useEffect(() => {
|
|
2621
|
+
setMounted(true);
|
|
2622
|
+
}, []);
|
|
2619
2623
|
const y = framerMotion.useMotionValue(0);
|
|
2620
2624
|
const openDrawer = () => {
|
|
2621
2625
|
y.stop();
|
|
@@ -2626,7 +2630,7 @@ function DrawerComponent(props) {
|
|
|
2626
2630
|
y.stop();
|
|
2627
2631
|
setOpen(false);
|
|
2628
2632
|
};
|
|
2629
|
-
|
|
2633
|
+
React14__namespace.default.useEffect(() => {
|
|
2630
2634
|
closeFnRef.current = () => {
|
|
2631
2635
|
closeDrawer();
|
|
2632
2636
|
onClose?.();
|
|
@@ -2646,7 +2650,7 @@ function DrawerComponent(props) {
|
|
|
2646
2650
|
);
|
|
2647
2651
|
}
|
|
2648
2652
|
};
|
|
2649
|
-
|
|
2653
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
2650
2654
|
const wasOpen = prevOpenRef.current;
|
|
2651
2655
|
const isOpen = props.open;
|
|
2652
2656
|
if (isOpen) {
|
|
@@ -2656,7 +2660,7 @@ function DrawerComponent(props) {
|
|
|
2656
2660
|
}
|
|
2657
2661
|
prevOpenRef.current = isOpen;
|
|
2658
2662
|
}, [props.open]);
|
|
2659
|
-
|
|
2663
|
+
React14__namespace.default.useEffect(() => {
|
|
2660
2664
|
const container = ref.current;
|
|
2661
2665
|
if (!open || !container) return;
|
|
2662
2666
|
container.setAttribute("tabindex", "0");
|
|
@@ -2678,7 +2682,7 @@ function DrawerComponent(props) {
|
|
|
2678
2682
|
document.body.style.overflow = "auto";
|
|
2679
2683
|
};
|
|
2680
2684
|
}, [open, props.closeOnEsc]);
|
|
2681
|
-
|
|
2685
|
+
React14__namespace.default.useEffect(() => {
|
|
2682
2686
|
if (!props.open) return;
|
|
2683
2687
|
const unsubscribeY = y.on("change", (latestY) => {
|
|
2684
2688
|
if (latestY > 150) {
|
|
@@ -2697,160 +2701,169 @@ function DrawerComponent(props) {
|
|
|
2697
2701
|
console.log("[close] clicked backdrop");
|
|
2698
2702
|
closeFnRef.current?.();
|
|
2699
2703
|
};
|
|
2704
|
+
if (!mounted) return null;
|
|
2700
2705
|
return reactDom.createPortal(
|
|
2701
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2702
|
-
|
|
2706
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2707
|
+
framerMotion.AnimatePresence,
|
|
2703
2708
|
{
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2709
|
+
initial: false,
|
|
2710
|
+
mode: "wait",
|
|
2711
|
+
onExitComplete,
|
|
2712
|
+
children: open && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2713
|
+
Backdrop,
|
|
2707
2714
|
{
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
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
|
-
|
|
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
|
+
}
|
|
2738
2756
|
}
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
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
|
-
|
|
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
|
+
}
|
|
2769
2811
|
}
|
|
2770
2812
|
},
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
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
|
+
]
|
|
2779
2842
|
}
|
|
2780
|
-
|
|
2843
|
+
)
|
|
2781
2844
|
},
|
|
2782
|
-
|
|
2783
|
-
style: { y },
|
|
2784
|
-
dragControls,
|
|
2785
|
-
onPointerDown: (e) => onDragStart(e),
|
|
2786
|
-
// drag={hasBackdrop ? "y" : false}
|
|
2787
|
-
dragElastic: 0,
|
|
2788
|
-
// prevent drawer from being dragged higher than what its opened to
|
|
2789
|
-
dragConstraints: { top: 0 },
|
|
2790
|
-
onDragEnd: (_, drag) => {
|
|
2791
|
-
if (props.drag === false) return;
|
|
2792
|
-
const pageHeight = document.documentElement.scrollHeight;
|
|
2793
|
-
const yCoord = drag.point.y;
|
|
2794
|
-
const velocity = drag.velocity.y;
|
|
2795
|
-
const releaseThreshold = 0.8;
|
|
2796
|
-
const releasePct = yCoord / pageHeight;
|
|
2797
|
-
if (velocity > 25 && releasePct >= releaseThreshold || velocity > 750) {
|
|
2798
|
-
props.onClose?.();
|
|
2799
|
-
}
|
|
2800
|
-
}
|
|
2801
|
-
},
|
|
2802
|
-
boxSizing: "border-box",
|
|
2803
|
-
boxShadow: "hsl(0deg 0% 0% / 60%) 0px -4px 20px",
|
|
2804
|
-
bg: { base: "neutral.100", _dark: "neutral.900" },
|
|
2805
|
-
color: "text-primary",
|
|
2806
|
-
ref,
|
|
2807
|
-
...rest,
|
|
2808
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2809
|
-
MotionDiv4,
|
|
2810
|
-
{
|
|
2811
|
-
grid: true,
|
|
2812
|
-
...isDesktop ? { position: "relative" } : { rows: "max-content 1fr" },
|
|
2813
|
-
children: [
|
|
2814
|
-
!isDesktop && props.hideHandle !== false && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2815
|
-
MotionDiv4,
|
|
2816
|
-
{
|
|
2817
|
-
grid: true,
|
|
2818
|
-
justifySelf: "center",
|
|
2819
|
-
h: 6,
|
|
2820
|
-
w: 34,
|
|
2821
|
-
mt: "16px",
|
|
2822
|
-
mb: 4,
|
|
2823
|
-
br: 20,
|
|
2824
|
-
bg: { base: "neutral.400", _dark: "neutral.600" },
|
|
2825
|
-
cursor: props.drag ? "row-resize" : "default",
|
|
2826
|
-
ref: dragHandleRef
|
|
2827
|
-
}
|
|
2828
|
-
),
|
|
2829
|
-
props.children
|
|
2830
|
-
]
|
|
2831
|
-
}
|
|
2845
|
+
"drawer"
|
|
2832
2846
|
)
|
|
2833
|
-
}
|
|
2834
|
-
"drawer"
|
|
2847
|
+
}
|
|
2835
2848
|
)
|
|
2836
2849
|
}
|
|
2837
|
-
)
|
|
2850
|
+
),
|
|
2838
2851
|
document.getElementById("portal")
|
|
2839
2852
|
);
|
|
2840
2853
|
}
|
|
2841
|
-
var DrawerContext =
|
|
2854
|
+
var DrawerContext = React14__namespace.default.createContext({
|
|
2842
2855
|
open: false,
|
|
2843
2856
|
setOpen: () => {
|
|
2844
2857
|
return;
|
|
2845
2858
|
}
|
|
2846
2859
|
});
|
|
2847
2860
|
function DrawerProvider(props) {
|
|
2848
|
-
const [open, setOpen] =
|
|
2861
|
+
const [open, setOpen] = React14__namespace.default.useState(false);
|
|
2849
2862
|
const value = { open, setOpen };
|
|
2850
2863
|
return /* @__PURE__ */ jsxRuntime.jsx(DrawerContext.Provider, { value, children: props.children });
|
|
2851
2864
|
}
|
|
2852
2865
|
function useDrawer() {
|
|
2853
|
-
const context2 =
|
|
2866
|
+
const context2 = React14__namespace.default.useContext(DrawerContext);
|
|
2854
2867
|
if (context2 === void 0) {
|
|
2855
2868
|
throw new Error("useDrawer must be used within a DrawerProvider");
|
|
2856
2869
|
}
|
|
@@ -2863,7 +2876,7 @@ function BtnGroup(props) {
|
|
|
2863
2876
|
const [isDesktop] = useMatchMedia(breakpoint);
|
|
2864
2877
|
const { children, ...rest } = props;
|
|
2865
2878
|
if (isDesktop) {
|
|
2866
|
-
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() });
|
|
2867
2880
|
} else {
|
|
2868
2881
|
return /* @__PURE__ */ jsxRuntime.jsx(MotionDiv4, { grid: true, rowG: 14, ...props });
|
|
2869
2882
|
}
|
|
@@ -2916,7 +2929,7 @@ function CloseBtn(props) {
|
|
|
2916
2929
|
}
|
|
2917
2930
|
}
|
|
2918
2931
|
function Backdrop(props) {
|
|
2919
|
-
const allowOutsideClickRef =
|
|
2932
|
+
const allowOutsideClickRef = React14__namespace.default.useRef(true);
|
|
2920
2933
|
const [isDesktop] = useMatchMedia(breakpoint);
|
|
2921
2934
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2922
2935
|
MotionDiv4,
|
|
@@ -2947,11 +2960,11 @@ function Backdrop(props) {
|
|
|
2947
2960
|
}
|
|
2948
2961
|
function useMatchMedia(queries) {
|
|
2949
2962
|
const isClient = typeof window !== "undefined";
|
|
2950
|
-
const [value, setValue] =
|
|
2963
|
+
const [value, setValue] = React14__namespace.default.useState(() => {
|
|
2951
2964
|
if (!isClient) return queries.map(() => false);
|
|
2952
2965
|
return queries.map((q) => window.matchMedia(q).matches);
|
|
2953
2966
|
});
|
|
2954
|
-
|
|
2967
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
2955
2968
|
if (!isClient) return;
|
|
2956
2969
|
const mediaQueryLists = queries.map((q) => window.matchMedia(q));
|
|
2957
2970
|
const handler = () => {
|
|
@@ -2970,9 +2983,9 @@ var TrackBgNameKey = "TrackBg";
|
|
|
2970
2983
|
var TrackFillNameKey = "TrackFill";
|
|
2971
2984
|
function Progress(props) {
|
|
2972
2985
|
const { children, steps, value, max: maxProp, ...rest } = props;
|
|
2973
|
-
const [progress, setProgress] =
|
|
2986
|
+
const [progress, setProgress] = React14__namespace.default.useState(0);
|
|
2974
2987
|
const max = maxProp ?? 100;
|
|
2975
|
-
|
|
2988
|
+
React14__namespace.default.useEffect(() => {
|
|
2976
2989
|
setProgress(Math.min((value ?? 0) / max, 1) * 100);
|
|
2977
2990
|
}, [value, max]);
|
|
2978
2991
|
const width = `${progress}%`;
|
|
@@ -3012,7 +3025,7 @@ function Progress(props) {
|
|
|
3012
3025
|
TrackFillNameKey
|
|
3013
3026
|
);
|
|
3014
3027
|
const barHeight = rest.h ?? 8;
|
|
3015
|
-
const bgEl = trackBgChild ?
|
|
3028
|
+
const bgEl = trackBgChild ? React14__namespace.default.cloneElement(trackBgChild, {
|
|
3016
3029
|
gridArea: "1 / 1",
|
|
3017
3030
|
h: barHeight,
|
|
3018
3031
|
w: trackBgChild.props.w ?? true
|
|
@@ -3027,7 +3040,7 @@ function Progress(props) {
|
|
|
3027
3040
|
bg: { base: "neutral.200", _dark: "neutral.700" }
|
|
3028
3041
|
}
|
|
3029
3042
|
);
|
|
3030
|
-
const fillEl = trackFillChild ?
|
|
3043
|
+
const fillEl = trackFillChild ? React14__namespace.default.cloneElement(trackFillChild, {
|
|
3031
3044
|
gridArea: "1 / 1",
|
|
3032
3045
|
h: barHeight,
|
|
3033
3046
|
roundedLeft: 9999,
|
|
@@ -3101,9 +3114,9 @@ var MotionDiv6 = motionTags.div;
|
|
|
3101
3114
|
var TrackNameKey2 = "SliderTrack";
|
|
3102
3115
|
var FillNameKey = "SliderFill";
|
|
3103
3116
|
var ThumbNameKey2 = "SliderThumb";
|
|
3104
|
-
var SliderContext =
|
|
3117
|
+
var SliderContext = React14__namespace.default.createContext(null);
|
|
3105
3118
|
var useSliderContext = () => {
|
|
3106
|
-
const context2 =
|
|
3119
|
+
const context2 = React14__namespace.default.useContext(SliderContext);
|
|
3107
3120
|
if (!context2) {
|
|
3108
3121
|
throw new Error("Slider compound components must be used within Slider");
|
|
3109
3122
|
}
|
|
@@ -3123,15 +3136,15 @@ function Slider(props) {
|
|
|
3123
3136
|
...rest
|
|
3124
3137
|
} = props;
|
|
3125
3138
|
const isControlled = controlledValue !== void 0;
|
|
3126
|
-
const [internalValue, setInternalValue] =
|
|
3139
|
+
const [internalValue, setInternalValue] = React14__namespace.default.useState(defaultValue);
|
|
3127
3140
|
const value = isControlled ? controlledValue : internalValue;
|
|
3128
|
-
const [isDragging, setIsDragging] =
|
|
3129
|
-
const trackRef =
|
|
3141
|
+
const [isDragging, setIsDragging] = React14__namespace.default.useState(false);
|
|
3142
|
+
const trackRef = React14__namespace.default.useRef(null);
|
|
3130
3143
|
const percent = Math.min(
|
|
3131
3144
|
100,
|
|
3132
3145
|
Math.max(0, (value - min) / (max - min) * 100)
|
|
3133
3146
|
);
|
|
3134
|
-
const clampValue =
|
|
3147
|
+
const clampValue = React14__namespace.default.useCallback(
|
|
3135
3148
|
(rawValue) => {
|
|
3136
3149
|
let clamped = Math.max(min, Math.min(max, rawValue));
|
|
3137
3150
|
if (step !== void 0 && step > 0) {
|
|
@@ -3142,7 +3155,7 @@ function Slider(props) {
|
|
|
3142
3155
|
},
|
|
3143
3156
|
[min, max, step]
|
|
3144
3157
|
);
|
|
3145
|
-
const getValueFromClientX =
|
|
3158
|
+
const getValueFromClientX = React14__namespace.default.useCallback(
|
|
3146
3159
|
(clientX) => {
|
|
3147
3160
|
const track = trackRef.current;
|
|
3148
3161
|
if (!track) return value;
|
|
@@ -3154,7 +3167,7 @@ function Slider(props) {
|
|
|
3154
3167
|
},
|
|
3155
3168
|
[min, max, value, clampValue]
|
|
3156
3169
|
);
|
|
3157
|
-
const updateValue =
|
|
3170
|
+
const updateValue = React14__namespace.default.useCallback(
|
|
3158
3171
|
(newValue) => {
|
|
3159
3172
|
if (disabled) return;
|
|
3160
3173
|
if (!isControlled) {
|
|
@@ -3171,7 +3184,7 @@ function Slider(props) {
|
|
|
3171
3184
|
const newValue = getValueFromClientX(e.clientX);
|
|
3172
3185
|
updateValue(newValue);
|
|
3173
3186
|
};
|
|
3174
|
-
|
|
3187
|
+
React14__namespace.default.useEffect(() => {
|
|
3175
3188
|
if (!isDragging) return;
|
|
3176
3189
|
const controller = new AbortController();
|
|
3177
3190
|
const handleMove = (e) => {
|
|
@@ -3241,19 +3254,19 @@ function Slider(props) {
|
|
|
3241
3254
|
trackRef
|
|
3242
3255
|
};
|
|
3243
3256
|
const height = rest.h ?? 8;
|
|
3244
|
-
const trackEl = trackChild ?
|
|
3257
|
+
const trackEl = trackChild ? React14__namespace.default.cloneElement(trackChild, {
|
|
3245
3258
|
sliderPercent: percent,
|
|
3246
3259
|
sliderValue: value,
|
|
3247
3260
|
sliderMin: min,
|
|
3248
3261
|
sliderMax: max
|
|
3249
3262
|
}) : /* @__PURE__ */ jsxRuntime.jsx(SliderTrack, {});
|
|
3250
|
-
const fillEl = fillChild ?
|
|
3263
|
+
const fillEl = fillChild ? React14__namespace.default.cloneElement(fillChild, {
|
|
3251
3264
|
sliderPercent: percent,
|
|
3252
3265
|
sliderValue: value,
|
|
3253
3266
|
sliderMin: min,
|
|
3254
3267
|
sliderMax: max
|
|
3255
3268
|
}) : /* @__PURE__ */ jsxRuntime.jsx(SliderFill, {});
|
|
3256
|
-
const thumbEl = thumbChild ?
|
|
3269
|
+
const thumbEl = thumbChild ? React14__namespace.default.cloneElement(thumbChild, {
|
|
3257
3270
|
sliderPercent: percent,
|
|
3258
3271
|
sliderValue: value,
|
|
3259
3272
|
sliderMin: min,
|
|
@@ -3379,27 +3392,113 @@ function SliderThumb(props) {
|
|
|
3379
3392
|
}
|
|
3380
3393
|
SliderThumb.displayName = ThumbNameKey2;
|
|
3381
3394
|
var Base5 = base;
|
|
3382
|
-
var
|
|
3395
|
+
var Svg = motionTags.svg;
|
|
3396
|
+
var CheckboxBtn = motionTags.button;
|
|
3397
|
+
function Checkbox(props) {
|
|
3383
3398
|
const {
|
|
3384
3399
|
children,
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
onAnimationComplete,
|
|
3400
|
+
onClick: _onClick,
|
|
3401
|
+
onAnimationStart: _onAnimationStart,
|
|
3402
|
+
onAnimationComplete: _onAnimationComplete,
|
|
3389
3403
|
...rest
|
|
3390
3404
|
} = props;
|
|
3391
|
-
|
|
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(
|
|
3392
3419
|
Base5,
|
|
3393
3420
|
{
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3421
|
+
...!hasAnyProp(rest, ["grid", "flex", "display"]) && {
|
|
3422
|
+
alignI: true,
|
|
3423
|
+
flex: true
|
|
3424
|
+
},
|
|
3425
|
+
gap: 2,
|
|
3426
|
+
cursor: "pointer",
|
|
3427
|
+
userSelect: "none",
|
|
3398
3428
|
...rest,
|
|
3399
|
-
|
|
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
|
+
]
|
|
3400
3498
|
}
|
|
3401
3499
|
);
|
|
3402
|
-
}
|
|
3500
|
+
}
|
|
3501
|
+
var Base6 = base;
|
|
3403
3502
|
function Tooltip(props) {
|
|
3404
3503
|
const {
|
|
3405
3504
|
children,
|
|
@@ -3413,9 +3512,15 @@ function Tooltip(props) {
|
|
|
3413
3512
|
delay = 80,
|
|
3414
3513
|
className
|
|
3415
3514
|
} = props;
|
|
3416
|
-
const referenceRef =
|
|
3417
|
-
const arrowRef =
|
|
3418
|
-
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();
|
|
3419
3524
|
const { x, y, refs, strategy, middlewareData, context: context2 } = react.useFloating({
|
|
3420
3525
|
open,
|
|
3421
3526
|
onOpenChange: setOpen,
|
|
@@ -3424,6 +3529,7 @@ function Tooltip(props) {
|
|
|
3424
3529
|
react.offset(offsetVal),
|
|
3425
3530
|
react.flip(),
|
|
3426
3531
|
react.shift({ padding: 6 }),
|
|
3532
|
+
// eslint-disable-next-line react-hooks/refs -- arrowRef is passed as object, not read during render
|
|
3427
3533
|
react.arrow({ element: arrowRef })
|
|
3428
3534
|
],
|
|
3429
3535
|
whileElementsMounted: react.autoUpdate,
|
|
@@ -3444,7 +3550,27 @@ function Tooltip(props) {
|
|
|
3444
3550
|
role
|
|
3445
3551
|
]);
|
|
3446
3552
|
const referenceProps = getReferenceProps({});
|
|
3447
|
-
|
|
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(() => {
|
|
3448
3574
|
if (!follow || !referenceRef.current) return;
|
|
3449
3575
|
const el = referenceRef.current;
|
|
3450
3576
|
const onMove = (e) => {
|
|
@@ -3459,6 +3585,21 @@ function Tooltip(props) {
|
|
|
3459
3585
|
el.removeEventListener("pointermove", onMove);
|
|
3460
3586
|
};
|
|
3461
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]);
|
|
3462
3603
|
const arrowX = middlewareData?.arrow?.x ?? 0;
|
|
3463
3604
|
const arrowY = middlewareData?.arrow?.y ?? 0;
|
|
3464
3605
|
const side = context2.placement || "top";
|
|
@@ -3467,14 +3608,14 @@ function Tooltip(props) {
|
|
|
3467
3608
|
const arrowAnchorStyle = side.startsWith("top") ? { bottom: -anchorOffset } : side.startsWith("bottom") ? { top: -anchorOffset } : side.startsWith("left") ? { right: -anchorOffset } : { left: -anchorOffset };
|
|
3468
3609
|
const arrowStyle = side.startsWith("top") || side.startsWith("bottom") ? { left: arrowX || void 0, ...arrowAnchorStyle } : { top: arrowY || void 0, ...arrowAnchorStyle };
|
|
3469
3610
|
const transformOrigin = side.startsWith("top") ? "center bottom" : side.startsWith("bottom") ? "center top" : side.startsWith("left") ? "right center" : side.startsWith("right") ? "left center" : "center";
|
|
3470
|
-
const childrenArray =
|
|
3611
|
+
const childrenArray = React14__namespace.default.Children.toArray(children);
|
|
3471
3612
|
const hasMultipleChildren = childrenArray.length > 1;
|
|
3472
3613
|
let child;
|
|
3473
3614
|
if (hasMultipleChildren) {
|
|
3474
3615
|
child = /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "inline-block" }, children });
|
|
3475
3616
|
} else {
|
|
3476
|
-
const only =
|
|
3477
|
-
const isDomElement =
|
|
3617
|
+
const only = React14__namespace.default.Children.only(children);
|
|
3618
|
+
const isDomElement = React14__namespace.default.isValidElement(only) && typeof only.type === "string";
|
|
3478
3619
|
child = isDomElement ? only : (
|
|
3479
3620
|
// Ensure the wrapper reliably captures mouseenter/pointerenter and can contain block elements
|
|
3480
3621
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "inline-block" }, children: only })
|
|
@@ -3487,79 +3628,43 @@ function Tooltip(props) {
|
|
|
3487
3628
|
}
|
|
3488
3629
|
const childWithRef = child;
|
|
3489
3630
|
const originalRef = childWithRef?.ref;
|
|
3490
|
-
if (typeof originalRef === "function")
|
|
3491
|
-
|
|
3631
|
+
if (typeof originalRef === "function") {
|
|
3632
|
+
originalRef(node);
|
|
3633
|
+
} else if (originalRef && "current" in originalRef) {
|
|
3492
3634
|
originalRef.current = node;
|
|
3635
|
+
}
|
|
3493
3636
|
};
|
|
3494
|
-
const
|
|
3495
|
-
const cloned = React13__namespace.default.cloneElement(
|
|
3637
|
+
const cloned = React14__namespace.default.cloneElement(
|
|
3496
3638
|
child,
|
|
3639
|
+
// eslint-disable-next-line react-hooks/refs -- ref callback is invoked after render, not during
|
|
3497
3640
|
{
|
|
3498
|
-
...
|
|
3641
|
+
...referenceProps,
|
|
3499
3642
|
ref: mergedRef,
|
|
3500
3643
|
"data-tooltip-ref": true
|
|
3501
3644
|
}
|
|
3502
3645
|
);
|
|
3503
3646
|
if (disabled) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: cloned });
|
|
3504
|
-
const [isMounted, setIsMounted] = React13__namespace.default.useState(false);
|
|
3505
|
-
const closeTimerRef = React13__namespace.default.useRef(
|
|
3506
|
-
null
|
|
3507
|
-
);
|
|
3508
|
-
React13__namespace.default.useEffect(() => {
|
|
3509
|
-
if (closeTimerRef.current) {
|
|
3510
|
-
clearTimeout(closeTimerRef.current);
|
|
3511
|
-
closeTimerRef.current = null;
|
|
3512
|
-
}
|
|
3513
|
-
if (open) {
|
|
3514
|
-
setIsMounted(true);
|
|
3515
|
-
} else {
|
|
3516
|
-
closeTimerRef.current = setTimeout(() => {
|
|
3517
|
-
setIsMounted(false);
|
|
3518
|
-
closeTimerRef.current = null;
|
|
3519
|
-
}, 160);
|
|
3520
|
-
}
|
|
3521
|
-
return () => {
|
|
3522
|
-
if (closeTimerRef.current) {
|
|
3523
|
-
clearTimeout(closeTimerRef.current);
|
|
3524
|
-
closeTimerRef.current = null;
|
|
3525
|
-
}
|
|
3526
|
-
};
|
|
3527
|
-
}, [open]);
|
|
3528
3647
|
let arrowEl = null;
|
|
3529
3648
|
let floatingNode = null;
|
|
3530
3649
|
const findRoleTooltipElement = (node) => {
|
|
3531
|
-
if (!
|
|
3650
|
+
if (!React14__namespace.default.isValidElement(node)) return null;
|
|
3532
3651
|
const el = node;
|
|
3533
3652
|
if (el.props?.role === "tooltip") return el;
|
|
3534
3653
|
const kids = el.props?.children;
|
|
3535
3654
|
if (!kids) return null;
|
|
3536
|
-
const arr =
|
|
3655
|
+
const arr = React14__namespace.default.Children.toArray(kids);
|
|
3537
3656
|
for (const c of arr) {
|
|
3538
|
-
if (
|
|
3539
|
-
|
|
3657
|
+
if (React14__namespace.default.isValidElement(c)) {
|
|
3658
|
+
const childEl = c;
|
|
3659
|
+
if (childEl.props?.role === "tooltip") {
|
|
3660
|
+
return childEl;
|
|
3661
|
+
}
|
|
3540
3662
|
}
|
|
3541
3663
|
}
|
|
3542
3664
|
return null;
|
|
3543
3665
|
};
|
|
3544
|
-
const isCustomTooltip =
|
|
3666
|
+
const isCustomTooltip = React14__namespace.default.isValidElement(content) && !!(content.type && content.type.isBlockTooltipContainer);
|
|
3545
3667
|
const customEl = isCustomTooltip ? content : findRoleTooltipElement(content);
|
|
3546
|
-
const containerRef = React13__namespace.default.useRef(null);
|
|
3547
|
-
const [containerBg, setContainerBg] = React13__namespace.default.useState();
|
|
3548
|
-
React13__namespace.default.useEffect(() => {
|
|
3549
|
-
if (!(open || isMounted)) return;
|
|
3550
|
-
const el = containerRef.current;
|
|
3551
|
-
if (!el) return;
|
|
3552
|
-
try {
|
|
3553
|
-
const cs = getComputedStyle(el);
|
|
3554
|
-
const bg = cs.backgroundColor;
|
|
3555
|
-
if (bg && bg !== "transparent" && bg !== "rgba(0, 0, 0, 0)") {
|
|
3556
|
-
setContainerBg(bg);
|
|
3557
|
-
} else {
|
|
3558
|
-
setContainerBg("rgba(20,20,20,0.95)");
|
|
3559
|
-
}
|
|
3560
|
-
} catch {
|
|
3561
|
-
}
|
|
3562
|
-
}, [open, isMounted, isCustomTooltip]);
|
|
3563
3668
|
if (isCustomTooltip) {
|
|
3564
3669
|
const el = customEl;
|
|
3565
3670
|
const childProps = el.props || {};
|
|
@@ -3593,17 +3698,19 @@ function Tooltip(props) {
|
|
|
3593
3698
|
...childProps,
|
|
3594
3699
|
...floatingProps});
|
|
3595
3700
|
Object.keys(floatingProps).forEach((key) => {
|
|
3596
|
-
|
|
3597
|
-
|
|
3701
|
+
const floatingValue = floatingProps[key];
|
|
3702
|
+
if (key.startsWith("on") && typeof floatingValue === "function") {
|
|
3598
3703
|
childProps[key];
|
|
3599
3704
|
}
|
|
3600
3705
|
});
|
|
3601
3706
|
const originalRef = el.ref;
|
|
3602
3707
|
const mergedFloatingRef = (node) => {
|
|
3603
3708
|
refs.setFloating(node);
|
|
3604
|
-
if (typeof originalRef === "function")
|
|
3605
|
-
|
|
3709
|
+
if (typeof originalRef === "function") {
|
|
3710
|
+
originalRef(node);
|
|
3711
|
+
} else if (originalRef && "current" in originalRef) {
|
|
3606
3712
|
originalRef.current = node;
|
|
3713
|
+
}
|
|
3607
3714
|
};
|
|
3608
3715
|
arrowEl = showArrow ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3609
3716
|
"div",
|
|
@@ -3649,12 +3756,15 @@ function Tooltip(props) {
|
|
|
3649
3756
|
const originalChildRef = el.ref;
|
|
3650
3757
|
const mergedChildRef = (node) => {
|
|
3651
3758
|
containerRef.current = node;
|
|
3652
|
-
if (typeof originalChildRef === "function")
|
|
3653
|
-
|
|
3759
|
+
if (typeof originalChildRef === "function") {
|
|
3760
|
+
originalChildRef(node);
|
|
3761
|
+
} else if (originalChildRef && "current" in originalChildRef) {
|
|
3654
3762
|
originalChildRef.current = node;
|
|
3763
|
+
}
|
|
3655
3764
|
};
|
|
3656
|
-
return
|
|
3765
|
+
return React14__namespace.default.cloneElement(
|
|
3657
3766
|
el,
|
|
3767
|
+
// eslint-disable-next-line react-hooks/refs -- ref callback is invoked after render, not during
|
|
3658
3768
|
{
|
|
3659
3769
|
// Spread childProps first
|
|
3660
3770
|
...childProps,
|
|
@@ -3717,7 +3827,7 @@ function Tooltip(props) {
|
|
|
3717
3827
|
transition: { type: "spring", stiffness: 520, damping: 34 },
|
|
3718
3828
|
children: [
|
|
3719
3829
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3720
|
-
|
|
3830
|
+
Base6,
|
|
3721
3831
|
{
|
|
3722
3832
|
role: "tooltip",
|
|
3723
3833
|
style: { position: "relative" },
|
|
@@ -3725,9 +3835,9 @@ function Tooltip(props) {
|
|
|
3725
3835
|
color: "white",
|
|
3726
3836
|
px: "10px",
|
|
3727
3837
|
py: "8px",
|
|
3838
|
+
fontSize: 13,
|
|
3728
3839
|
borderRadius: 6,
|
|
3729
3840
|
boxShadow: "0 6px 18px rgba(0,0,0,0.18)",
|
|
3730
|
-
fontSize: 13,
|
|
3731
3841
|
ref: containerRef,
|
|
3732
3842
|
children: content
|
|
3733
3843
|
}
|
|
@@ -3745,113 +3855,6 @@ function Tooltip(props) {
|
|
|
3745
3855
|
)
|
|
3746
3856
|
] });
|
|
3747
3857
|
}
|
|
3748
|
-
var Base6 = base;
|
|
3749
|
-
var Svg = motionTags.svg;
|
|
3750
|
-
var CheckboxBtn = motionTags.button;
|
|
3751
|
-
function Checkbox(props) {
|
|
3752
|
-
const {
|
|
3753
|
-
children,
|
|
3754
|
-
onClick: _onClick,
|
|
3755
|
-
onAnimationStart: _onAnimationStart,
|
|
3756
|
-
onAnimationComplete: _onAnimationComplete,
|
|
3757
|
-
...rest
|
|
3758
|
-
} = props;
|
|
3759
|
-
const [checked, setChecked] = React13__namespace.default.useState(false);
|
|
3760
|
-
const [indeterminate, setIndeterminate] = React13__namespace.default.useState(false);
|
|
3761
|
-
React13__namespace.default.useEffect(() => {
|
|
3762
|
-
setChecked(!!rest.checked);
|
|
3763
|
-
}, [rest.checked]);
|
|
3764
|
-
React13__namespace.default.useEffect(() => {
|
|
3765
|
-
setIndeterminate(!!rest.indeterminate);
|
|
3766
|
-
}, [rest.indeterminate]);
|
|
3767
|
-
const isIndeterminate = typeof rest.indeterminate === "boolean";
|
|
3768
|
-
const checkboxSelector = rest._checkbox;
|
|
3769
|
-
const hasCheckboxBg = checkboxSelector && hasAnyProp(checkboxSelector, ["bg", "background", "backgroundColor"]);
|
|
3770
|
-
const checkedSelector = rest._checked;
|
|
3771
|
-
const hasCheckedBg = checkedSelector && hasAnyProp(checkedSelector, ["bg", "background", "backgroundColor"]);
|
|
3772
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3773
|
-
Base6,
|
|
3774
|
-
{
|
|
3775
|
-
...!hasAnyProp(rest, ["grid", "flex", "display"]) && {
|
|
3776
|
-
alignI: true,
|
|
3777
|
-
flex: true
|
|
3778
|
-
},
|
|
3779
|
-
gap: 2,
|
|
3780
|
-
cursor: "pointer",
|
|
3781
|
-
userSelect: "none",
|
|
3782
|
-
...rest,
|
|
3783
|
-
onClick: () => rest.onChecked?.(!rest.checked),
|
|
3784
|
-
children: [
|
|
3785
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3786
|
-
CheckboxBtn,
|
|
3787
|
-
{
|
|
3788
|
-
"data-checkbox": true,
|
|
3789
|
-
...checked && { "data-checked": checked },
|
|
3790
|
-
w: "24px",
|
|
3791
|
-
p: 1,
|
|
3792
|
-
br: 6,
|
|
3793
|
-
cursor: "pointer",
|
|
3794
|
-
boxSizing: "border-box",
|
|
3795
|
-
outline: "none !important",
|
|
3796
|
-
...!hasCheckboxBg && {
|
|
3797
|
-
bg: { base: "neutral.200", _dark: "neutral.700" }
|
|
3798
|
-
},
|
|
3799
|
-
...!hasCheckedBg && {
|
|
3800
|
-
_checked: { bg: "blue.500", transition: ".14s background ease-out" }
|
|
3801
|
-
},
|
|
3802
|
-
_active: { scale: 0.9 },
|
|
3803
|
-
color: "neutral.100",
|
|
3804
|
-
transition: ".14s background ease-out .1s",
|
|
3805
|
-
_focus: { boxShadow: "0 0 0 6px hsl(0 0% 100% / 0.05)" },
|
|
3806
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3807
|
-
Svg,
|
|
3808
|
-
{
|
|
3809
|
-
fill: "none",
|
|
3810
|
-
width: "100%",
|
|
3811
|
-
viewBox: "0 0 24 24",
|
|
3812
|
-
stroke: "currentColor",
|
|
3813
|
-
strokeWidth: 4,
|
|
3814
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(framerMotion.AnimatePresence, { mode: "wait", children: [
|
|
3815
|
-
isIndeterminate && indeterminate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3816
|
-
framerMotion.motion.path,
|
|
3817
|
-
{
|
|
3818
|
-
initial: { scaleX: 0 },
|
|
3819
|
-
animate: { scaleX: 1 },
|
|
3820
|
-
exit: { scaleX: 0 },
|
|
3821
|
-
transition: {
|
|
3822
|
-
type: "tween",
|
|
3823
|
-
ease: "easeOut",
|
|
3824
|
-
duration: 0.3,
|
|
3825
|
-
delay: 0.2
|
|
3826
|
-
},
|
|
3827
|
-
strokeLinecap: "round",
|
|
3828
|
-
d: "M6 12 L18 12"
|
|
3829
|
-
},
|
|
3830
|
-
"indeterminate"
|
|
3831
|
-
),
|
|
3832
|
-
!indeterminate && checked && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3833
|
-
framerMotion.motion.path,
|
|
3834
|
-
{
|
|
3835
|
-
initial: { pathLength: 0 },
|
|
3836
|
-
animate: { pathLength: 1 },
|
|
3837
|
-
exit: { pathLength: 0 },
|
|
3838
|
-
transition: { type: "tween", ease: "easeOut", duration: 0.2 },
|
|
3839
|
-
strokeLinecap: "round",
|
|
3840
|
-
strokeLinejoin: "round",
|
|
3841
|
-
d: "M5 13l4 4L19 7"
|
|
3842
|
-
},
|
|
3843
|
-
"check"
|
|
3844
|
-
)
|
|
3845
|
-
] })
|
|
3846
|
-
}
|
|
3847
|
-
)
|
|
3848
|
-
}
|
|
3849
|
-
),
|
|
3850
|
-
children
|
|
3851
|
-
]
|
|
3852
|
-
}
|
|
3853
|
-
);
|
|
3854
|
-
}
|
|
3855
3858
|
var Hr = motionTags.hr;
|
|
3856
3859
|
var Skeleton = motionTags.div;
|
|
3857
3860
|
function Block(props) {
|
|
@@ -3863,7 +3866,7 @@ function Block(props) {
|
|
|
3863
3866
|
tooltip,
|
|
3864
3867
|
...rest
|
|
3865
3868
|
} = anyProps;
|
|
3866
|
-
const fileInputRef =
|
|
3869
|
+
const fileInputRef = React14__namespace.useRef(null);
|
|
3867
3870
|
const isLoading = anyProps.isLoading;
|
|
3868
3871
|
const multiple = anyProps.multiple;
|
|
3869
3872
|
const is = anyProps.is;
|
|
@@ -3900,7 +3903,7 @@ function Block(props) {
|
|
|
3900
3903
|
...anyProps
|
|
3901
3904
|
}
|
|
3902
3905
|
) : extract.filepickerAllowed ? /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick: () => fileInputRef.current?.click(), children: [
|
|
3903
|
-
|
|
3906
|
+
React14__namespace.createElement(
|
|
3904
3907
|
Comp,
|
|
3905
3908
|
{
|
|
3906
3909
|
cursor: "pointer",
|
|
@@ -3935,11 +3938,11 @@ function Block(props) {
|
|
|
3935
3938
|
value: ""
|
|
3936
3939
|
}
|
|
3937
3940
|
)
|
|
3938
|
-
] }) : extract.isVoidElement ?
|
|
3941
|
+
] }) : extract.isVoidElement ? React14__namespace.createElement(Comp, {
|
|
3939
3942
|
...isLoading && { "data-loading": isLoading },
|
|
3940
3943
|
onContextMenu: (e) => e.preventDefault(),
|
|
3941
3944
|
...initialStyles
|
|
3942
|
-
}) :
|
|
3945
|
+
}) : React14__namespace.createElement(
|
|
3943
3946
|
Comp,
|
|
3944
3947
|
{
|
|
3945
3948
|
...isLoading && { "data-loading": isLoading },
|
|
@@ -3964,13 +3967,9 @@ function Block(props) {
|
|
|
3964
3967
|
return component;
|
|
3965
3968
|
}
|
|
3966
3969
|
}
|
|
3967
|
-
var TaggedTooltipContainer = Object.assign(TooltipContainer, {
|
|
3968
|
-
isBlockTooltipContainer: true
|
|
3969
|
-
});
|
|
3970
3970
|
var TaggedMenuContainer = Object.assign(MenuContainer, {
|
|
3971
3971
|
isBlockMenuContainer: true
|
|
3972
3972
|
});
|
|
3973
|
-
var TooltipNamespace = { Container: TaggedTooltipContainer };
|
|
3974
3973
|
var MenuNamespace = { Container: TaggedMenuContainer };
|
|
3975
3974
|
var InputNamespace = {
|
|
3976
3975
|
Label: Label2,
|
|
@@ -4005,7 +4004,6 @@ var CompoundBlock = Object.assign(Block, {
|
|
|
4005
4004
|
Progress: ProgressNamespace,
|
|
4006
4005
|
Slider: SliderNamespace,
|
|
4007
4006
|
Textarea: TextareaNamespace,
|
|
4008
|
-
Tooltip: TooltipNamespace,
|
|
4009
4007
|
Switch: SwitchNamespace,
|
|
4010
4008
|
Drawer: DrawerNamespace,
|
|
4011
4009
|
Menu: MenuNamespace,
|
|
@@ -4044,22 +4042,22 @@ var saveTheme = (theme) => {
|
|
|
4044
4042
|
}
|
|
4045
4043
|
};
|
|
4046
4044
|
function useTheme() {
|
|
4047
|
-
const [value, setValue] =
|
|
4045
|
+
const [value, setValue] = React14__namespace.default.useState(() => {
|
|
4048
4046
|
return getDomTheme() ?? getStoredTheme() ?? "light";
|
|
4049
4047
|
});
|
|
4050
|
-
const valueRef =
|
|
4051
|
-
const isInternalRef =
|
|
4052
|
-
|
|
4048
|
+
const valueRef = React14__namespace.default.useRef(value);
|
|
4049
|
+
const isInternalRef = React14__namespace.default.useRef(false);
|
|
4050
|
+
React14__namespace.default.useEffect(() => {
|
|
4053
4051
|
valueRef.current = value;
|
|
4054
4052
|
}, [value]);
|
|
4055
|
-
|
|
4053
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
4056
4054
|
const domTheme = getDomTheme();
|
|
4057
4055
|
if (domTheme && domTheme !== valueRef.current) {
|
|
4058
4056
|
valueRef.current = domTheme;
|
|
4059
4057
|
setValue(domTheme);
|
|
4060
4058
|
}
|
|
4061
4059
|
}, []);
|
|
4062
|
-
|
|
4060
|
+
React14__namespace.default.useEffect(() => {
|
|
4063
4061
|
const ac = new AbortController();
|
|
4064
4062
|
window.addEventListener(
|
|
4065
4063
|
"storage",
|
|
@@ -4091,7 +4089,7 @@ function useTheme() {
|
|
|
4091
4089
|
);
|
|
4092
4090
|
return () => ac.abort();
|
|
4093
4091
|
}, []);
|
|
4094
|
-
const toggle =
|
|
4092
|
+
const toggle = React14__namespace.default.useCallback((theme) => {
|
|
4095
4093
|
const next = theme ?? (valueRef.current === "light" ? "dark" : "light");
|
|
4096
4094
|
valueRef.current = next;
|
|
4097
4095
|
setValue(next);
|
|
@@ -4104,8 +4102,8 @@ function useTheme() {
|
|
|
4104
4102
|
|
|
4105
4103
|
// src/react/index.ts
|
|
4106
4104
|
function useDebounce(value, delay = 500) {
|
|
4107
|
-
const [debouncedValue, setDebouncedValue] =
|
|
4108
|
-
|
|
4105
|
+
const [debouncedValue, setDebouncedValue] = React14__namespace.default.useState(value);
|
|
4106
|
+
React14__namespace.default.useEffect(() => {
|
|
4109
4107
|
const handler = setTimeout(() => {
|
|
4110
4108
|
setDebouncedValue(value);
|
|
4111
4109
|
}, delay);
|
|
@@ -4116,10 +4114,10 @@ function useDebounce(value, delay = 500) {
|
|
|
4116
4114
|
return debouncedValue;
|
|
4117
4115
|
}
|
|
4118
4116
|
function useThrottle(value, interval = 500) {
|
|
4119
|
-
const [throttledValue, setThrottledValue] =
|
|
4120
|
-
const lastUpdate =
|
|
4121
|
-
const timeoutRef =
|
|
4122
|
-
|
|
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(() => {
|
|
4123
4121
|
const now = Date.now();
|
|
4124
4122
|
const timeSinceLastUpdate = now - lastUpdate.current;
|
|
4125
4123
|
if (timeSinceLastUpdate >= interval) {
|
|
@@ -4145,11 +4143,11 @@ function useThrottle(value, interval = 500) {
|
|
|
4145
4143
|
function useMatchMedia2(queries, defaultValues = []) {
|
|
4146
4144
|
const initialValues = defaultValues.length ? defaultValues : Array(queries.length).fill(false);
|
|
4147
4145
|
const isClient = typeof window !== "undefined";
|
|
4148
|
-
const [value, setValue] =
|
|
4146
|
+
const [value, setValue] = React14__namespace.default.useState(() => {
|
|
4149
4147
|
if (!isClient) return initialValues;
|
|
4150
4148
|
return queries.map((q) => window.matchMedia(q).matches);
|
|
4151
4149
|
});
|
|
4152
|
-
|
|
4150
|
+
React14__namespace.default.useLayoutEffect(() => {
|
|
4153
4151
|
if (!isClient) return;
|
|
4154
4152
|
const mediaQueryLists = queries.map((q) => window.matchMedia(q));
|
|
4155
4153
|
const handler = () => {
|