@react-hive/honey-layout 5.6.0-beta → 6.2.0

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.
Files changed (35) hide show
  1. package/LICENSE +1 -1
  2. package/dist/components/HoneyBox/HoneyBox.d.ts +14 -5
  3. package/dist/components/HoneyContextMenu/HoneyContextMenu.d.ts +3 -2
  4. package/dist/components/HoneyContextMenu/HoneyContextMenuContent.d.ts +3 -2
  5. package/dist/components/HoneyFlexBox.d.ts +11 -1
  6. package/dist/components/HoneyGrid/HoneyGridContext.d.ts +1 -1
  7. package/dist/components/HoneyGrid/HoneyGridStyled.d.ts +13 -2
  8. package/dist/components/HoneyGridColumn/HoneyGridColumn.d.ts +2 -1
  9. package/dist/components/HoneyGridColumn/HoneyGridColumn.types.d.ts +2 -1
  10. package/dist/components/HoneyGridColumn/HoneyGridColumnStyled.d.ts +15 -5
  11. package/dist/components/HoneyList/HoneyList.d.ts +2 -1
  12. package/dist/components/HoneyList/HoneyListStyled.d.ts +11 -1
  13. package/dist/components/HoneyOverlay.d.ts +2 -1
  14. package/dist/components/HoneyPopup/HoneyPopup.d.ts +6 -5
  15. package/dist/components/HoneyPopup/HoneyPopupContext.d.ts +0 -1
  16. package/dist/components/HoneyPopup/HoneyPopupStyled.d.ts +11 -1
  17. package/dist/components/HoneyPopup/hooks/use-honey-popup-interactions.d.ts +7 -6
  18. package/dist/components/HoneyPopup/hooks/use-honey-popup.d.ts +28 -9
  19. package/dist/contexts/HoneyLayoutContext.d.ts +4 -4
  20. package/dist/effects.d.ts +1 -1
  21. package/dist/helpers/helpers.d.ts +13 -12
  22. package/dist/helpers/react.helpers.d.ts +0 -2
  23. package/dist/hooks/use-honey-media-query.d.ts +3 -1
  24. package/dist/index.mjs +5959 -0
  25. package/dist/providers/HoneyLayoutProvider.d.ts +3 -6
  26. package/dist/providers/HoneyLayoutThemeOverride.d.ts +2 -2
  27. package/dist/types/css.types.d.ts +23 -67
  28. package/dist/types/data.types.d.ts +2 -2
  29. package/dist/types/index.d.ts +0 -1
  30. package/dist/utils/utils.d.ts +2 -1
  31. package/package.json +21 -16
  32. package/dist/__mocks__/index.d.ts +0 -1
  33. package/dist/__mocks__/theme-mock.d.ts +0 -2
  34. package/dist/index.js +0 -5486
  35. package/dist/types/types.d.ts +0 -189
@@ -1,3 +1,4 @@
1
+ import { FastOmit } from '@react-hive/honey-style';
1
2
  import { ReactNode } from 'react';
2
3
  import { HoneyActiveOverlay, HoneyOverlayId, Nullable } from '../types';
3
4
  import { HoneyFlexBoxProps } from './HoneyFlexBox';
@@ -11,7 +12,7 @@ export interface HoneyOverlayContext {
11
12
  */
12
13
  deactivateOverlay: () => void;
13
14
  }
14
- export interface HoneyOverlayProps extends Omit<HoneyFlexBoxProps, 'children'> {
15
+ export interface HoneyOverlayProps extends FastOmit<HoneyFlexBoxProps, 'children'> {
15
16
  /**
16
17
  * The content of the overlay, either as static nodes or a function that receives the object
17
18
  * with the current overlay state and helper methods.
@@ -1,5 +1,6 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  import { UseInteractionsReturn, FloatingArrowProps, FloatingFocusManagerProps, MiddlewareData } from '@floating-ui/react';
3
+ import { FastOmit } from '@react-hive/honey-style';
3
4
  import { HoneyPopupPortalProps } from './HoneyPopupPortal';
4
5
  import { HoneyPopupStyledProps } from './HoneyPopupStyled';
5
6
  import { HoneyPopupContextProps } from './HoneyPopupContext';
@@ -8,10 +9,10 @@ import { HoneyOverlayProps } from '../HoneyOverlay';
8
9
  export interface HoneyPopupChildrenContextProps {
9
10
  referenceProps: ReturnType<UseInteractionsReturn['getReferenceProps']>;
10
11
  }
11
- type InheritedHoneyOverlayProps = Omit<HoneyOverlayProps, 'children' | 'active' | 'onDeactivate'>;
12
+ type InheritedHoneyOverlayProps = FastOmit<HoneyOverlayProps, 'children' | 'active' | 'onDeactivate' | '$position'>;
12
13
  export interface HoneyPopupProps<Context = undefined, UseAutoSize extends boolean = boolean> extends UseHoneyPopupOptions<UseAutoSize> {
13
14
  children: (context: HoneyPopupChildrenContextProps) => ReactNode;
14
- referenceProps?: Omit<HoneyPopupStyledProps, 'children' | 'content'>;
15
+ referenceProps?: FastOmit<HoneyPopupStyledProps, 'children' | 'content'>;
15
16
  /**
16
17
  * Content inside the popup.
17
18
  */
@@ -25,17 +26,17 @@ export interface HoneyPopupProps<Context = undefined, UseAutoSize extends boolea
25
26
  *
26
27
  * @see https://floating-ui.com/docs/floatingfocusmanager#props
27
28
  */
28
- focusManagerProps?: Omit<FloatingFocusManagerProps, 'children' | 'context'>;
29
+ focusManagerProps?: FastOmit<FloatingFocusManagerProps, 'children' | 'context'>;
29
30
  /**
30
31
  * Properties for an arrow component.
31
32
  *
32
33
  * @see https://floating-ui.com/docs/FloatingArrow#props
33
34
  */
34
- arrowProps?: Omit<FloatingArrowProps, 'ref' | 'context'>;
35
+ arrowProps?: FastOmit<FloatingArrowProps, 'ref' | 'context'>;
35
36
  /**
36
37
  * Properties for `HoneyPopupPortal` component.
37
38
  */
38
- portalProps?: Omit<HoneyPopupPortalProps, 'children'>;
39
+ portalProps?: FastOmit<HoneyPopupPortalProps, 'children'>;
39
40
  /**
40
41
  * Function to adjust the floating content's styles before rendering.
41
42
  */
@@ -1,5 +1,4 @@
1
1
  export interface HoneyPopupContextProps<Context> {
2
2
  context: Context | undefined;
3
- closePopup: () => void;
4
3
  }
5
4
  export declare const HoneyPopupContext: import('react').Context<HoneyPopupContextProps<any> | undefined>;
@@ -1,3 +1,13 @@
1
1
  import { HoneyFlexBoxProps } from '../HoneyFlexBox';
2
2
  export type HoneyPopupStyledProps = HoneyFlexBoxProps;
3
- export declare const HoneyPopupStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, import('..').HoneyBoxProps<"div">>, never>, import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, import('..').HoneyBoxProps<"div">>, never>>, HoneyFlexBoxProps<"div">>, never>, import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, import('..').HoneyBoxProps<"div">>, never>, import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, import('..').HoneyBoxProps<"div">>, never>>, HoneyFlexBoxProps<"div">>, never>>, HoneyPopupStyledProps>, never>> & string;
3
+ export declare const HoneyPopupStyled: {
4
+ <AsElement extends import('react').ElementType = import('react').ElementType>({ as, className, __compositionDepth, css: cssProp, ...props }: {
5
+ as?: AsElement | undefined;
6
+ } & import('@react-hive/honey-style').FastOmit<import('react').ComponentProps<AsElement>, "color" | "content" | "translate" | "slot" | "style" | "title" | "accessKey" | "dir" | "$margin" | "$marginTop" | "$marginRight" | "$marginBottom" | "$marginLeft" | "$padding" | "$paddingTop" | "$paddingRight" | "$paddingBottom" | "$paddingLeft" | "$top" | "$right" | "$bottom" | "$left" | "$gap" | "$rowGap" | "$columnGap" | "$accentColor" | "$alignContent" | "$alignItems" | "$alignSelf" | "$alignTracks" | "$animationComposition" | "$animationDelay" | "$animationDirection" | "$animationDuration" | "$animationFillMode" | "$animationIterationCount" | "$animationName" | "$animationPlayState" | "$animationRangeEnd" | "$animationRangeStart" | "$animationTimeline" | "$animationTimingFunction" | "$appearance" | "$aspectRatio" | "$backdropFilter" | "$backfaceVisibility" | "$backgroundAttachment" | "$backgroundBlendMode" | "$backgroundClip" | "$backgroundColor" | "$backgroundImage" | "$backgroundOrigin" | "$backgroundPositionX" | "$backgroundPositionY" | "$backgroundRepeat" | "$backgroundSize" | "$blockOverflow" | "$blockSize" | "$borderBlockColor" | "$borderBlockEndColor" | "$borderBlockEndStyle" | "$borderBlockEndWidth" | "$borderBlockStartColor" | "$borderBlockStartStyle" | "$borderBlockStartWidth" | "$borderBlockStyle" | "$borderBlockWidth" | "$borderBottomColor" | "$borderBottomLeftRadius" | "$borderBottomRightRadius" | "$borderBottomStyle" | "$borderBottomWidth" | "$borderCollapse" | "$borderEndEndRadius" | "$borderEndStartRadius" | "$borderImageOutset" | "$borderImageRepeat" | "$borderImageSlice" | "$borderImageSource" | "$borderImageWidth" | "$borderInlineColor" | "$borderInlineEndColor" | "$borderInlineEndStyle" | "$borderInlineEndWidth" | "$borderInlineStartColor" | "$borderInlineStartStyle" | "$borderInlineStartWidth" | "$borderInlineStyle" | "$borderInlineWidth" | "$borderLeftColor" | "$borderLeftStyle" | "$borderLeftWidth" | "$borderRightColor" | "$borderRightStyle" | "$borderRightWidth" | "$borderSpacing" | "$borderStartEndRadius" | "$borderStartStartRadius" | "$borderTopColor" | "$borderTopLeftRadius" | "$borderTopRightRadius" | "$borderTopStyle" | "$borderTopWidth" | "$boxDecorationBreak" | "$boxShadow" | "$boxSizing" | "$breakAfter" | "$breakBefore" | "$breakInside" | "$captionSide" | "$caretColor" | "$caretShape" | "$clear" | "$clipPath" | "$color" | "$colorAdjust" | "$colorScheme" | "$columnCount" | "$columnFill" | "$columnRuleColor" | "$columnRuleStyle" | "$columnRuleWidth" | "$columnSpan" | "$columnWidth" | "$contain" | "$containIntrinsicBlockSize" | "$containIntrinsicHeight" | "$containIntrinsicInlineSize" | "$containIntrinsicWidth" | "$containerName" | "$containerType" | "$content" | "$contentVisibility" | "$counterIncrement" | "$counterReset" | "$counterSet" | "$cursor" | "$direction" | "$display" | "$emptyCells" | "$filter" | "$flexBasis" | "$flexDirection" | "$flexGrow" | "$flexShrink" | "$flexWrap" | "$float" | "$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" | "$gridAutoColumns" | "$gridAutoFlow" | "$gridAutoRows" | "$gridColumnEnd" | "$gridColumnStart" | "$gridRowEnd" | "$gridRowStart" | "$gridTemplateAreas" | "$gridTemplateColumns" | "$gridTemplateRows" | "$hangingPunctuation" | "$height" | "$hyphenateCharacter" | "$hyphenateLimitChars" | "$hyphens" | "$imageOrientation" | "$imageRendering" | "$imageResolution" | "$initialLetter" | "$inlineSize" | "$inputSecurity" | "$insetBlockEnd" | "$insetBlockStart" | "$insetInlineEnd" | "$insetInlineStart" | "$isolation" | "$justifyContent" | "$justifyItems" | "$justifySelf" | "$justifyTracks" | "$letterSpacing" | "$lineBreak" | "$lineHeight" | "$lineHeightStep" | "$listStyleImage" | "$listStylePosition" | "$listStyleType" | "$marginBlockEnd" | "$marginBlockStart" | "$marginInlineEnd" | "$marginInlineStart" | "$marginTrim" | "$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" | "$motionDistance" | "$motionPath" | "$motionRotation" | "$objectFit" | "$objectPosition" | "$offsetAnchor" | "$offsetDistance" | "$offsetPath" | "$offsetPosition" | "$offsetRotate" | "$offsetRotation" | "$opacity" | "$order" | "$orphans" | "$outlineColor" | "$outlineOffset" | "$outlineStyle" | "$outlineWidth" | "$overflowAnchor" | "$overflowBlock" | "$overflowClipBox" | "$overflowClipMargin" | "$overflowInline" | "$overflowWrap" | "$overflowX" | "$overflowY" | "$overlay" | "$overscrollBehaviorBlock" | "$overscrollBehaviorInline" | "$overscrollBehaviorX" | "$overscrollBehaviorY" | "$paddingBlockEnd" | "$paddingBlockStart" | "$paddingInlineEnd" | "$paddingInlineStart" | "$page" | "$pageBreakAfter" | "$pageBreakBefore" | "$pageBreakInside" | "$paintOrder" | "$perspective" | "$perspectiveOrigin" | "$pointerEvents" | "$position" | "$printColorAdjust" | "$quotes" | "$resize" | "$rotate" | "$rubyAlign" | "$rubyMerge" | "$rubyPosition" | "$scale" | "$scrollBehavior" | "$scrollMarginBlockEnd" | "$scrollMarginBlockStart" | "$scrollMarginBottom" | "$scrollMarginInlineEnd" | "$scrollMarginInlineStart" | "$scrollMarginLeft" | "$scrollMarginRight" | "$scrollMarginTop" | "$scrollPaddingBlockEnd" | "$scrollPaddingBlockStart" | "$scrollPaddingBottom" | "$scrollPaddingInlineEnd" | "$scrollPaddingInlineStart" | "$scrollPaddingLeft" | "$scrollPaddingRight" | "$scrollPaddingTop" | "$scrollSnapAlign" | "$scrollSnapMarginBottom" | "$scrollSnapMarginLeft" | "$scrollSnapMarginRight" | "$scrollSnapMarginTop" | "$scrollSnapStop" | "$scrollSnapType" | "$scrollTimelineAxis" | "$scrollTimelineName" | "$scrollbarColor" | "$scrollbarGutter" | "$scrollbarWidth" | "$shapeImageThreshold" | "$shapeMargin" | "$shapeOutside" | "$tabSize" | "$tableLayout" | "$textAlign" | "$textAlignLast" | "$textCombineUpright" | "$textDecorationColor" | "$textDecorationLine" | "$textDecorationSkip" | "$textDecorationSkipInk" | "$textDecorationStyle" | "$textDecorationThickness" | "$textEmphasisColor" | "$textEmphasisPosition" | "$textEmphasisStyle" | "$textIndent" | "$textJustify" | "$textOrientation" | "$textOverflow" | "$textRendering" | "$textShadow" | "$textSizeAdjust" | "$textTransform" | "$textUnderlineOffset" | "$textUnderlinePosition" | "$textWrap" | "$timelineScope" | "$touchAction" | "$transform" | "$transformBox" | "$transformOrigin" | "$transformStyle" | "$transitionBehavior" | "$transitionDelay" | "$transitionDuration" | "$transitionProperty" | "$transitionTimingFunction" | "$translate" | "$unicodeBidi" | "$userSelect" | "$verticalAlign" | "$viewTimelineAxis" | "$viewTimelineInset" | "$viewTimelineName" | "$viewTransitionName" | "$visibility" | "$whiteSpace" | "$whiteSpaceCollapse" | "$whiteSpaceTrim" | "$widows" | "$width" | "$willChange" | "$wordBreak" | "$wordSpacing" | "$wordWrap" | "$writingMode" | "$zIndex" | "$zoom" | "$all" | "$animation" | "$animationRange" | "$background" | "$backgroundPosition" | "$border" | "$borderBlock" | "$borderBlockEnd" | "$borderBlockStart" | "$borderBottom" | "$borderColor" | "$borderImage" | "$borderInline" | "$borderInlineEnd" | "$borderInlineStart" | "$borderLeft" | "$borderRadius" | "$borderRight" | "$borderStyle" | "$borderTop" | "$borderWidth" | "$caret" | "$columnRule" | "$columns" | "$containIntrinsicSize" | "$container" | "$flex" | "$flexFlow" | "$font" | "$grid" | "$gridArea" | "$gridColumn" | "$gridRow" | "$gridTemplate" | "$inset" | "$insetBlock" | "$insetInline" | "$lineClamp" | "$listStyle" | "$marginBlock" | "$marginInline" | "$mask" | "$maskBorder" | "$motion" | "$offset" | "$outline" | "$overflow" | "$overscrollBehavior" | "$paddingBlock" | "$paddingInline" | "$placeContent" | "$placeItems" | "$placeSelf" | "$scrollMargin" | "$scrollMarginBlock" | "$scrollMarginInline" | "$scrollPadding" | "$scrollPaddingBlock" | "$scrollPaddingInline" | "$scrollSnapMargin" | "$scrollTimeline" | "$textDecoration" | "$textEmphasis" | "$transition" | "$viewTimeline" | "$MozAnimationDelay" | "$MozAnimationDirection" | "$MozAnimationDuration" | "$MozAnimationFillMode" | "$MozAnimationIterationCount" | "$MozAnimationName" | "$MozAnimationPlayState" | "$MozAnimationTimingFunction" | "$MozAppearance" | "$MozBinding" | "$MozBorderBottomColors" | "$MozBorderEndColor" | "$MozBorderEndStyle" | "$MozBorderEndWidth" | "$MozBorderLeftColors" | "$MozBorderRightColors" | "$MozBorderStartColor" | "$MozBorderStartStyle" | "$MozBorderTopColors" | "$MozBoxSizing" | "$MozColumnCount" | "$MozColumnFill" | "$MozColumnRuleColor" | "$MozColumnRuleStyle" | "$MozColumnRuleWidth" | "$MozColumnWidth" | "$MozContextProperties" | "$MozFontFeatureSettings" | "$MozFontLanguageOverride" | "$MozHyphens" | "$MozImageRegion" | "$MozMarginEnd" | "$MozMarginStart" | "$MozOrient" | "$MozOsxFontSmoothing" | "$MozOutlineRadiusBottomleft" | "$MozOutlineRadiusBottomright" | "$MozOutlineRadiusTopleft" | "$MozOutlineRadiusTopright" | "$MozPaddingEnd" | "$MozPaddingStart" | "$MozStackSizing" | "$MozTabSize" | "$MozTextBlink" | "$MozTextSizeAdjust" | "$MozUserFocus" | "$MozUserModify" | "$MozUserSelect" | "$MozWindowDragging" | "$MozWindowShadow" | "$msAccelerator" | "$msBlockProgression" | "$msContentZoomChaining" | "$msContentZoomLimitMax" | "$msContentZoomLimitMin" | "$msContentZoomSnapPoints" | "$msContentZoomSnapType" | "$msContentZooming" | "$msFilter" | "$msFlexDirection" | "$msFlexPositive" | "$msFlowFrom" | "$msFlowInto" | "$msGridColumns" | "$msGridRows" | "$msHighContrastAdjust" | "$msHyphenateLimitChars" | "$msHyphenateLimitLines" | "$msHyphenateLimitZone" | "$msHyphens" | "$msImeAlign" | "$msLineBreak" | "$msOrder" | "$msOverflowStyle" | "$msOverflowX" | "$msOverflowY" | "$msScrollChaining" | "$msScrollLimitXMax" | "$msScrollLimitXMin" | "$msScrollLimitYMax" | "$msScrollLimitYMin" | "$msScrollRails" | "$msScrollSnapPointsX" | "$msScrollSnapPointsY" | "$msScrollSnapType" | "$msScrollTranslation" | "$msScrollbar3dlightColor" | "$msScrollbarArrowColor" | "$msScrollbarBaseColor" | "$msScrollbarDarkshadowColor" | "$msScrollbarFaceColor" | "$msScrollbarHighlightColor" | "$msScrollbarShadowColor" | "$msScrollbarTrackColor" | "$msTextAutospace" | "$msTextCombineHorizontal" | "$msTextOverflow" | "$msTouchAction" | "$msTouchSelect" | "$msTransform" | "$msTransformOrigin" | "$msTransitionDelay" | "$msTransitionDuration" | "$msTransitionProperty" | "$msTransitionTimingFunction" | "$msUserSelect" | "$msWordBreak" | "$msWrapFlow" | "$msWrapMargin" | "$msWrapThrough" | "$msWritingMode" | "$WebkitAlignContent" | "$WebkitAlignItems" | "$WebkitAlignSelf" | "$WebkitAnimationDelay" | "$WebkitAnimationDirection" | "$WebkitAnimationDuration" | "$WebkitAnimationFillMode" | "$WebkitAnimationIterationCount" | "$WebkitAnimationName" | "$WebkitAnimationPlayState" | "$WebkitAnimationTimingFunction" | "$WebkitAppearance" | "$WebkitBackdropFilter" | "$WebkitBackfaceVisibility" | "$WebkitBackgroundClip" | "$WebkitBackgroundOrigin" | "$WebkitBackgroundSize" | "$WebkitBorderBeforeColor" | "$WebkitBorderBeforeStyle" | "$WebkitBorderBeforeWidth" | "$WebkitBorderBottomLeftRadius" | "$WebkitBorderBottomRightRadius" | "$WebkitBorderImageSlice" | "$WebkitBorderTopLeftRadius" | "$WebkitBorderTopRightRadius" | "$WebkitBoxDecorationBreak" | "$WebkitBoxReflect" | "$WebkitBoxShadow" | "$WebkitBoxSizing" | "$WebkitClipPath" | "$WebkitColumnCount" | "$WebkitColumnFill" | "$WebkitColumnRuleColor" | "$WebkitColumnRuleStyle" | "$WebkitColumnRuleWidth" | "$WebkitColumnSpan" | "$WebkitColumnWidth" | "$WebkitFilter" | "$WebkitFlexBasis" | "$WebkitFlexDirection" | "$WebkitFlexGrow" | "$WebkitFlexShrink" | "$WebkitFlexWrap" | "$WebkitFontFeatureSettings" | "$WebkitFontKerning" | "$WebkitFontSmoothing" | "$WebkitFontVariantLigatures" | "$WebkitHyphenateCharacter" | "$WebkitHyphens" | "$WebkitInitialLetter" | "$WebkitJustifyContent" | "$WebkitLineBreak" | "$WebkitLineClamp" | "$WebkitMarginEnd" | "$WebkitMarginStart" | "$WebkitMaskAttachment" | "$WebkitMaskBoxImageOutset" | "$WebkitMaskBoxImageRepeat" | "$WebkitMaskBoxImageSlice" | "$WebkitMaskBoxImageSource" | "$WebkitMaskBoxImageWidth" | "$WebkitMaskClip" | "$WebkitMaskComposite" | "$WebkitMaskImage" | "$WebkitMaskOrigin" | "$WebkitMaskPosition" | "$WebkitMaskPositionX" | "$WebkitMaskPositionY" | "$WebkitMaskRepeat" | "$WebkitMaskRepeatX" | "$WebkitMaskRepeatY" | "$WebkitMaskSize" | "$WebkitMaxInlineSize" | "$WebkitOrder" | "$WebkitOverflowScrolling" | "$WebkitPaddingEnd" | "$WebkitPaddingStart" | "$WebkitPerspective" | "$WebkitPerspectiveOrigin" | "$WebkitPrintColorAdjust" | "$WebkitRubyPosition" | "$WebkitScrollSnapType" | "$WebkitShapeMargin" | "$WebkitTapHighlightColor" | "$WebkitTextCombine" | "$WebkitTextDecorationColor" | "$WebkitTextDecorationLine" | "$WebkitTextDecorationSkip" | "$WebkitTextDecorationStyle" | "$WebkitTextEmphasisColor" | "$WebkitTextEmphasisPosition" | "$WebkitTextEmphasisStyle" | "$WebkitTextFillColor" | "$WebkitTextOrientation" | "$WebkitTextSizeAdjust" | "$WebkitTextStrokeColor" | "$WebkitTextStrokeWidth" | "$WebkitTextUnderlinePosition" | "$WebkitTouchCallout" | "$WebkitTransform" | "$WebkitTransformOrigin" | "$WebkitTransformStyle" | "$WebkitTransitionDelay" | "$WebkitTransitionDuration" | "$WebkitTransitionProperty" | "$WebkitTransitionTimingFunction" | "$WebkitUserModify" | "$WebkitUserSelect" | "$WebkitWritingMode" | "$MozAnimation" | "$MozBorderImage" | "$MozColumnRule" | "$MozColumns" | "$MozOutlineRadius" | "$msContentZoomLimit" | "$msContentZoomSnap" | "$msFlex" | "$msScrollLimit" | "$msScrollSnapX" | "$msScrollSnapY" | "$msTransition" | "$WebkitAnimation" | "$WebkitBorderBefore" | "$WebkitBorderImage" | "$WebkitBorderRadius" | "$WebkitColumnRule" | "$WebkitColumns" | "$WebkitFlex" | "$WebkitFlexFlow" | "$WebkitMask" | "$WebkitMaskBoxImage" | "$WebkitTextEmphasis" | "$WebkitTextStroke" | "$WebkitTransition" | "$azimuth" | "$boxAlign" | "$boxDirection" | "$boxFlex" | "$boxFlexGroup" | "$boxLines" | "$boxOrdinalGroup" | "$boxOrient" | "$boxPack" | "$clip" | "$gridColumnGap" | "$gridGap" | "$gridRowGap" | "$imeMode" | "$offsetBlock" | "$offsetBlockEnd" | "$offsetBlockStart" | "$offsetInline" | "$offsetInlineEnd" | "$offsetInlineStart" | "$scrollSnapCoordinate" | "$scrollSnapDestination" | "$scrollSnapPointsX" | "$scrollSnapPointsY" | "$scrollSnapTypeX" | "$scrollSnapTypeY" | "$KhtmlBoxAlign" | "$KhtmlBoxDirection" | "$KhtmlBoxFlex" | "$KhtmlBoxFlexGroup" | "$KhtmlBoxLines" | "$KhtmlBoxOrdinalGroup" | "$KhtmlBoxOrient" | "$KhtmlBoxPack" | "$KhtmlLineBreak" | "$KhtmlOpacity" | "$KhtmlUserSelect" | "$MozBackfaceVisibility" | "$MozBackgroundClip" | "$MozBackgroundInlinePolicy" | "$MozBackgroundOrigin" | "$MozBackgroundSize" | "$MozBorderRadius" | "$MozBorderRadiusBottomleft" | "$MozBorderRadiusBottomright" | "$MozBorderRadiusTopleft" | "$MozBorderRadiusTopright" | "$MozBoxAlign" | "$MozBoxDirection" | "$MozBoxFlex" | "$MozBoxOrdinalGroup" | "$MozBoxOrient" | "$MozBoxPack" | "$MozBoxShadow" | "$MozFloatEdge" | "$MozForceBrokenImageIcon" | "$MozOpacity" | "$MozOutline" | "$MozOutlineColor" | "$MozOutlineStyle" | "$MozOutlineWidth" | "$MozPerspective" | "$MozPerspectiveOrigin" | "$MozTextAlignLast" | "$MozTextDecorationColor" | "$MozTextDecorationLine" | "$MozTextDecorationStyle" | "$MozTransform" | "$MozTransformOrigin" | "$MozTransformStyle" | "$MozTransition" | "$MozTransitionDelay" | "$MozTransitionDuration" | "$MozTransitionProperty" | "$MozTransitionTimingFunction" | "$MozUserInput" | "$msImeMode" | "$OAnimation" | "$OAnimationDelay" | "$OAnimationDirection" | "$OAnimationDuration" | "$OAnimationFillMode" | "$OAnimationIterationCount" | "$OAnimationName" | "$OAnimationPlayState" | "$OAnimationTimingFunction" | "$OBackgroundSize" | "$OBorderImage" | "$OObjectFit" | "$OObjectPosition" | "$OTabSize" | "$OTextOverflow" | "$OTransform" | "$OTransformOrigin" | "$OTransition" | "$OTransitionDelay" | "$OTransitionDuration" | "$OTransitionProperty" | "$OTransitionTimingFunction" | "$WebkitBoxAlign" | "$WebkitBoxDirection" | "$WebkitBoxFlex" | "$WebkitBoxFlexGroup" | "$WebkitBoxLines" | "$WebkitBoxOrdinalGroup" | "$WebkitBoxOrient" | "$WebkitBoxPack" | "$alignmentBaseline" | "$baselineShift" | "$clipRule" | "$colorInterpolation" | "$colorRendering" | "$dominantBaseline" | "$fill" | "$fillOpacity" | "$fillRule" | "$floodColor" | "$floodOpacity" | "$glyphOrientationVertical" | "$lightingColor" | "$marker" | "$markerEnd" | "$markerMid" | "$markerStart" | "$shapeRendering" | "$stopColor" | "$stopOpacity" | "$stroke" | "$strokeDasharray" | "$strokeDashoffset" | "$strokeLinecap" | "$strokeLinejoin" | "$strokeMiterlimit" | "$strokeOpacity" | "$strokeWidth" | "$textAnchor" | "$vectorEffect" | "hidden" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | `data-${string}` | "ref" | "key" | "effects"> & import('@react-hive/honey-style').FastOmit<HoneyPopupStyledProps, "as"> & {
7
+ css?: import('@react-hive/honey-style').HoneyStyledInterpolation<HoneyPopupStyledProps>;
8
+ className?: import('@react-hive/honey-style').HoneyCSSClassName;
9
+ __compositionDepth?: number;
10
+ }): import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>;
11
+ displayName: string;
12
+ $$ComponentId: string;
13
+ };
@@ -1,4 +1,5 @@
1
1
  import { FloatingContext, UseDismissProps, UseClickProps, UseHoverProps, UseFocusProps, UseClientPointProps, UseRoleProps } from '@floating-ui/react';
2
+ import { FastOmit } from '@react-hive/honey-style';
2
3
  /**
3
4
  * Options for configuring popup interactions.
4
5
  */
@@ -18,13 +19,13 @@ export interface UseHoneyPopupInteractionsOptions {
18
19
  *
19
20
  * @see https://floating-ui.com/docs/usedismiss
20
21
  */
21
- dismissOptions?: Omit<UseDismissProps, 'escapeKey'>;
22
+ dismissOptions?: FastOmit<UseDismissProps, 'escapeKey'>;
22
23
  /**
23
24
  * Configuration for click interactions.
24
25
  *
25
26
  * @see https://floating-ui.com/docs/useclick
26
27
  */
27
- clickOptions?: Omit<UseClickProps, 'enabled'>;
28
+ clickOptions?: FastOmit<UseClickProps, 'enabled'>;
28
29
  /**
29
30
  * Configuration for hover interactions.
30
31
  *
@@ -33,24 +34,24 @@ export interface UseHoneyPopupInteractionsOptions {
33
34
  *
34
35
  * @see https://floating-ui.com/docs/usehover
35
36
  */
36
- hoverOptions?: Omit<UseHoverProps, 'enabled'>;
37
+ hoverOptions?: FastOmit<UseHoverProps, 'enabled'>;
37
38
  /**
38
39
  * Configuration for focus interactions.
39
40
  *
40
41
  * @see https://floating-ui.com/docs/usefocus
41
42
  */
42
- focusOptions?: Omit<UseFocusProps, 'enabled'>;
43
+ focusOptions?: FastOmit<UseFocusProps, 'enabled'>;
43
44
  /**
44
45
  * Configuration for pointer interactions.
45
46
  *
46
47
  * @see https://floating-ui.com/docs/useclientpoint
47
48
  */
48
- clientPointsOptions?: Omit<UseClientPointProps, 'enabled'>;
49
+ clientPointsOptions?: FastOmit<UseClientPointProps, 'enabled'>;
49
50
  /**
50
51
  * Configuration for role assignment.
51
52
  *
52
53
  * @see https://floating-ui.com/docs/userole
53
54
  */
54
- roleOptions?: Omit<UseRoleProps, 'enabled'>;
55
+ roleOptions?: FastOmit<UseRoleProps, 'enabled'>;
55
56
  }
56
57
  export declare const useHoneyPopupInteractions: (context: FloatingContext, { enabled, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, }: UseHoneyPopupInteractionsOptions) => import('@floating-ui/react').UseInteractionsReturn;
@@ -1,5 +1,7 @@
1
- import { useTransitionStyles, AutoUpdateOptions, ArrowOptions, FlipOptions, OffsetOptions, ShiftOptions, UseFloatingOptions, UseFloatingReturn, UseInteractionsReturn, UseTransitionStylesProps } from '@floating-ui/react';
1
+ import { useTransitionStyles, AutoUpdateOptions, AutoPlacementOptions, ArrowOptions, FlipOptions, OffsetOptions, ShiftOptions, OpenChangeReason, UseFloatingOptions, UseFloatingReturn, UseInteractionsReturn, UseTransitionStylesProps } from '@floating-ui/react';
2
2
  import { RefObject } from 'react';
3
+ import { Derivable } from '@floating-ui/dom';
4
+ import { FastOmit } from '@react-hive/honey-style';
3
5
  import { Nullable } from '../../../types';
4
6
  import { UseHoneyPopupInteractionsOptions } from './use-honey-popup-interactions';
5
7
  export interface UseHoneyPopupOptions<UseAutoSize extends boolean = boolean> extends UseHoneyPopupInteractionsOptions {
@@ -7,20 +9,33 @@ export interface UseHoneyPopupOptions<UseAutoSize extends boolean = boolean> ext
7
9
  /**
8
10
  * Options for configuring the floating UI behavior.
9
11
  */
10
- floatingOptions?: Omit<UseFloatingOptions, 'nodeId' | 'open' | 'whileElementsMounted' | 'onOpenChange'>;
12
+ floatingOptions?: FastOmit<UseFloatingOptions, 'nodeId' | 'open' | 'whileElementsMounted' | 'onOpenChange'>;
11
13
  /**
12
14
  * Configuration for offset middleware.
13
15
  *
14
16
  * @see https://floating-ui.com/docs/offset
15
17
  */
16
18
  offsetOptions?: OffsetOptions;
19
+ /**
20
+ * Whether to use the flip middleware.
21
+ *
22
+ * @default true
23
+ */
24
+ useFlip?: boolean;
17
25
  /**
18
26
  * Configuration for flip middleware.
19
27
  *
20
28
  * @prop crossAxis - Default is `false`.
21
29
  * See details by https://floating-ui.com/docs/flip#combining-with-shift
30
+ * @prop fallbackStrategy - Default is `bestFit`.
22
31
  */
23
32
  flipOptions?: FlipOptions;
33
+ /**
34
+ * Whether to use the shift middleware.
35
+ *
36
+ * @default true
37
+ */
38
+ useShift?: boolean;
24
39
  /**
25
40
  * Configuration for shift middleware.
26
41
  *
@@ -36,13 +51,21 @@ export interface UseHoneyPopupOptions<UseAutoSize extends boolean = boolean> ext
36
51
  /**
37
52
  * Configuration for the floating arrow.
38
53
  */
39
- arrowOptions?: Omit<ArrowOptions, 'element'>;
54
+ arrowOptions?: FastOmit<ArrowOptions, 'element'>;
40
55
  /**
41
56
  * @prop duration Default is 250.
42
57
  *
43
58
  * @see https://floating-ui.com/docs/usetransition#usetransitionstyles
44
59
  */
45
60
  transitionOptions?: UseTransitionStylesProps;
61
+ /**
62
+ * @default false
63
+ */
64
+ useAutoPlacement?: boolean;
65
+ /**
66
+ * @see https://floating-ui.com/docs/autoplacement
67
+ */
68
+ autoPlacementOptions?: AutoPlacementOptions | Derivable<AutoPlacementOptions>;
46
69
  /**
47
70
  * Whether to use automatic position updates.
48
71
  *
@@ -90,7 +113,7 @@ export interface UseHoneyPopupOptions<UseAutoSize extends boolean = boolean> ext
90
113
  /**
91
114
  * Callback invoked when the popup closes.
92
115
  */
93
- onClose?: () => void;
116
+ onClose?: (reason?: OpenChangeReason, event?: Event) => void;
94
117
  }
95
118
  interface UseHoneyPopupApi {
96
119
  /**
@@ -114,10 +137,6 @@ interface UseHoneyPopupApi {
114
137
  */
115
138
  interactions: UseInteractionsReturn;
116
139
  transition: ReturnType<typeof useTransitionStyles>;
117
- /**
118
- * Function to manually close the popup.
119
- */
120
- closePopup: () => void;
121
140
  }
122
141
  /**
123
142
  * Hook for managing a floating popup with customizable behavior.
@@ -126,5 +145,5 @@ interface UseHoneyPopupApi {
126
145
  *
127
146
  * @returns An object containing state and utilities for managing the popup.
128
147
  */
129
- export declare const useHoneyPopup: ({ enabled, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, open, floatingOptions, offsetOptions, flipOptions, shiftOptions, useArrow, arrowOptions, transitionOptions, useAutoUpdate, autoUpdateOptions, useAutoSize, minAcceptableWidth, minAcceptableHeight, maxAcceptableWidth, maxAcceptableHeight, onOpen, onClose, }: UseHoneyPopupOptions) => UseHoneyPopupApi;
148
+ export declare const useHoneyPopup: ({ enabled, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, open, floatingOptions, offsetOptions, useFlip, flipOptions, useShift, shiftOptions, useArrow, arrowOptions, transitionOptions, useAutoPlacement, autoPlacementOptions, useAutoUpdate, autoUpdateOptions, useAutoSize, minAcceptableWidth, minAcceptableHeight, maxAcceptableWidth, maxAcceptableHeight, onOpen, onClose, }: UseHoneyPopupOptions) => UseHoneyPopupApi;
130
149
  export {};
@@ -1,5 +1,5 @@
1
- import { DefaultTheme, Interpolation } from 'styled-components';
2
- import { HoneyColorKey, HoneyCSSColor, HoneyDimensionName, HoneyFontName, HoneyOverlayConfig, HoneySpacings, Nullable, HoneyScreenState, HoneyCSSDimensionUnit, HoneyCSSDimensionValue, HoneyOverlayId, HoneyActiveOverlay, HoneyCSSSpacingValue } from '../types';
1
+ import { HoneyTheme, HoneyCSSDimensionUnit, HoneyFontName, HoneyColorKey, HoneyCSSColor, HoneyDimensionName, HoneySpacings, HoneyCSSDimensionValue, HoneyStyledInterpolation } from '@react-hive/honey-style';
2
+ import { Nullable, HoneyOverlayConfig, HoneyScreenState, HoneyOverlayId, HoneyActiveOverlay, HoneyCSSSpacingValue } from '../types';
3
3
  import { HoneyResolveSpacingResult } from '../helpers';
4
4
  /**
5
5
  * Function to unregister a previously registered overlay.
@@ -15,7 +15,7 @@ export interface HoneyLayoutContextValue {
15
15
  /**
16
16
  * Represents the theme object.
17
17
  */
18
- theme: DefaultTheme;
18
+ theme: HoneyTheme;
19
19
  /**
20
20
  * Represents the current state of the screen.
21
21
  */
@@ -61,7 +61,7 @@ export interface HoneyLayoutContextValue {
61
61
  *
62
62
  * @returns The CSS style rules for the specified font.
63
63
  */
64
- resolveFont: (fontName: HoneyFontName) => Interpolation<object>;
64
+ resolveFont: (fontName: HoneyFontName) => HoneyStyledInterpolation<object>;
65
65
  /**
66
66
  * Function to resolve dimension values based on the theme.
67
67
  *
package/dist/effects.d.ts CHANGED
@@ -40,7 +40,7 @@ export interface HoneyVisibilityTransitionEffectContextProps {
40
40
  active?: boolean;
41
41
  }
42
42
  /**
43
- * A styled-components effect that applies smooth transitions to the `visibility`, `opacity`, and optional extra properties of an element.
43
+ * An effect that applies smooth transitions to the `visibility`, `opacity`, and optional extra properties of an element.
44
44
  *
45
45
  * This effect allows you to animate the appearance or disappearance of an element, making it fade in or out.
46
46
  * The behavior is customizable via the configuration, including the duration of the transition, timing functions, and any additional
@@ -1,6 +1,6 @@
1
- import { css, ExecutionContext, StyleFunction } from 'styled-components';
2
1
  import { HTMLAttributes } from 'react';
3
- import { Nullable, HoneyBreakpointName, HoneyCSSShorthandTuple, HoneyCSSShorthandDimensionOutput, HoneyCSSDimensionUnit, HoneyCSSSpacingValue, HoneyCSSMediaRule, HoneySpacings, HoneyColorKey, HoneyFontName, HoneyCSSColor, HoneyDimensionName, HoneyPrefixedCSSProperties, HoneyBreakpoints, HoneyScreenState, HoneyCSSDimensionValue } from '../types';
2
+ import { FastOmit, HoneyCSSDimensionUnit, HoneyFontName, HoneyColor, HoneyCSSColor, HoneyStyledContext, HoneyStyledFunction, HoneyDimensionName, HoneyBreakpointName, HoneyBreakpoints, HoneySpacings, HoneyCSSDimensionValue } from '@react-hive/honey-style';
3
+ import { Nullable, HoneyScreenState, HoneyCSSShorthandTuple, HoneyCSSShorthandDimensionOutput, HoneyCSSSpacingValue, HoneyCSSMediaRule, HoneyPrefixedCSSProperties } from '../types';
4
4
  export declare const noop: () => void;
5
5
  export declare function assert(condition: any, message: string): asserts condition;
6
6
  export declare const generateUniqueId: () => string;
@@ -43,11 +43,11 @@ export type HoneyResolveSpacingResult<Value extends HoneyCSSSpacingValue, Unit e
43
43
  * - A space-separated string (e.g., `'8px 12px'`) if `value` is an array.
44
44
  * - `never` if the input is a raw string (unsupported).
45
45
  */
46
- export declare const resolveSpacing: <Value extends HoneyCSSSpacingValue, Unit extends Nullable<HoneyCSSDimensionUnit> = "px">(value: Value, unit?: Unit, type?: keyof HoneySpacings) => ((context: ExecutionContext) => HoneyResolveSpacingResult<Value, Unit>);
46
+ export declare const resolveSpacing: <Value extends HoneyCSSSpacingValue, Unit extends Nullable<HoneyCSSDimensionUnit> = "px">(value: Value, unit?: Unit, type?: keyof HoneySpacings) => ((context: HoneyStyledContext<object>) => HoneyResolveSpacingResult<Value, Unit>);
47
47
  /**
48
48
  * Resolves a color value from the theme or returns the input color directly if it's a standalone color name or HEX value.
49
49
  *
50
- * @param colorKey - A string representing the color to resolve.
50
+ * @param colorInput - A string representing the color to resolve.
51
51
  * This can be:
52
52
  * - A theme key in the format 'colorType.colorName'.
53
53
  * - A standalone color name (e.g., "red", "blue").
@@ -63,7 +63,7 @@ export declare const resolveSpacing: <Value extends HoneyCSSSpacingValue, Unit e
63
63
  * @throws Will throw an error if the provided alpha value is not within the valid range (0 to 1).
64
64
  * @throws Will throw an error if the color format is invalid.
65
65
  */
66
- export declare const resolveColor: (colorKey: HoneyColorKey | HoneyCSSColor, alpha?: number) => ({ theme }: ExecutionContext) => HoneyCSSColor;
66
+ export declare const resolveColor: (colorInput: HoneyColor, alpha?: number) => ({ theme }: HoneyStyledContext<object>) => HoneyCSSColor;
67
67
  /**
68
68
  * Resolves the font styles based on the provided font name from the theme.
69
69
  *
@@ -71,7 +71,7 @@ export declare const resolveColor: (colorKey: HoneyColorKey | HoneyCSSColor, alp
71
71
  *
72
72
  * @returns A style function that takes a theme object and returns the CSS styles for the specified font.
73
73
  */
74
- export declare const resolveFont: (fontName: HoneyFontName) => ({ theme }: ExecutionContext) => import('styled-components').RuleSet<object>;
74
+ export declare const resolveFont: (fontName: HoneyFontName) => ({ theme }: HoneyStyledContext<object>) => (context: HoneyStyledContext<object>) => string;
75
75
  /**
76
76
  * Resolves a specific dimension value from the theme configuration.
77
77
  *
@@ -79,7 +79,8 @@ export declare const resolveFont: (fontName: HoneyFontName) => ({ theme }: Execu
79
79
  *
80
80
  * @returns A style function that takes the theme and returns the resolved dimension value from the theme.
81
81
  */
82
- export declare const resolveDimension: (dimensionName: HoneyDimensionName) => ({ theme }: ExecutionContext) => HoneyCSSDimensionValue;
82
+ export declare const resolveDimension: (dimensionName: HoneyDimensionName) => ({ theme }: HoneyStyledContext<object>) => HoneyCSSDimensionValue;
83
+ export type HoneyStyledBoxProps = HTMLAttributes<HTMLElement> & HoneyPrefixedCSSProperties;
83
84
  /**
84
85
  * Generates CSS styles based on the provided breakpoint and properties.
85
86
  * Filters the properties to include only those that match the specified breakpoint.
@@ -92,7 +93,7 @@ export declare const resolveDimension: (dimensionName: HoneyDimensionName) => ({
92
93
  * @returns A function that takes an execution context and properties, and returns a CSS block
93
94
  * with styles generated for the specified breakpoint.
94
95
  */
95
- export declare const createStyles: <Props extends HTMLAttributes<HTMLElement> & HoneyPrefixedCSSProperties>(breakpoint: HoneyBreakpointName) => ((context: ExecutionContext & Props) => ReturnType<typeof css>);
96
+ export declare const createStyles: (breakpoint: HoneyBreakpointName) => HoneyStyledFunction<HoneyStyledBoxProps>;
96
97
  /**
97
98
  * Utility function that returns functions for generating media queries for the specified breakpoint.
98
99
  * The down function creates a media query for screen sizes smaller than the breakpoint,
@@ -103,9 +104,9 @@ export declare const createStyles: <Props extends HTMLAttributes<HTMLElement> &
103
104
  *
104
105
  * @returns Styled functions for generating media queries.
105
106
  */
106
- export declare const bpMedia: (breakpoint: HoneyBreakpointName, ruleOptions?: Omit<HoneyCSSMediaRule, "width" | "minWidth" | "maxWidth">) => {
107
- down: StyleFunction<object>;
108
- up: StyleFunction<object>;
107
+ export declare const bpMedia: (breakpoint: HoneyBreakpointName, ruleOptions?: FastOmit<HoneyCSSMediaRule, "width" | "minWidth" | "maxWidth">) => {
108
+ down: HoneyStyledFunction<object>;
109
+ up: HoneyStyledFunction<object>;
109
110
  };
110
111
  /**
111
112
  * Applies CSS styles wrapped in a media query for the specified breakpoint based on the provided properties.
@@ -119,7 +120,7 @@ export declare const bpMedia: (breakpoint: HoneyBreakpointName, ruleOptions?: Om
119
120
  * @returns A function that takes context and properties and returns a CSS block wrapped in a media query
120
121
  * if styles exist for the specified breakpoint; otherwise, returns `null`.
121
122
  */
122
- export declare const applyBreakpointStyles: <Props extends HTMLAttributes<HTMLElement> & HoneyPrefixedCSSProperties>(breakpoint: HoneyBreakpointName) => ((context: ExecutionContext & Props) => Nullable<ReturnType<typeof css>>);
123
+ export declare const applyBreakpointStyles: (breakpoint: HoneyBreakpointName) => HoneyStyledFunction<HoneyStyledBoxProps>;
123
124
  /**
124
125
  * Resolves the current screen state based on the window's dimensions and the breakpoints provided in the theme.
125
126
  *
@@ -1,6 +1,4 @@
1
1
  import { Ref, RefCallback } from 'react';
2
- import { IStyleSheetManager } from 'styled-components';
3
- export declare const shouldForwardProp: IStyleSheetManager['shouldForwardProp'];
4
2
  /**
5
3
  * Merges multiple refs into a single ref callback.
6
4
  * This ensures that all provided refs receive the same reference.
@@ -1,3 +1,4 @@
1
+ import { HoneyTheme } from '@react-hive/honey-style';
1
2
  import { HoneyScreenState } from '../types';
2
3
  export interface UseHoneyMediaQueryOptions {
3
4
  /**
@@ -19,9 +20,10 @@ export interface UseHoneyMediaQueryOptions {
19
20
  * The hook that tracks the current screen state based on the theme's media breakpoints.
20
21
  * It updates the state on window resize and orientation change.
21
22
  *
23
+ * @param theme - Theme object.
22
24
  * @param options - Optional configuration object.
23
25
  *
24
26
  * @returns The current screen state, indicating the orientation (portrait or landscape)
25
27
  * and the active breakpoint (xs, sm, md, lg, xl).
26
28
  */
27
- export declare const useHoneyMediaQuery: ({ resizeThrottle, overrideScreenState, }?: UseHoneyMediaQueryOptions) => HoneyScreenState;
29
+ export declare const useHoneyMediaQuery: (theme: HoneyTheme, { resizeThrottle, overrideScreenState }?: UseHoneyMediaQueryOptions) => HoneyScreenState;