@hanzogui/tooltip 8.3.1 → 8.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Tooltip.js +142 -0
- package/dist/cjs/Tooltip.js.map +1 -0
- package/dist/cjs/TooltipSimple.js +35 -0
- package/dist/cjs/TooltipSimple.js.map +1 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/Tooltip.js +136 -0
- package/dist/esm/Tooltip.js.map +1 -0
- package/dist/esm/TooltipSimple.js +31 -0
- package/dist/esm/TooltipSimple.js.map +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/native/Tooltip.js +21 -0
- package/dist/native/Tooltip.js.map +1 -0
- package/dist/native/TooltipSimple.js +5 -0
- package/dist/native/TooltipSimple.js.map +1 -0
- package/dist/native/index.js +3 -0
- package/dist/native/index.js.map +1 -0
- package/package.json +32 -27
- package/src/TooltipSimple.tsx +2 -2
- package/src/index.tsx +2 -2
- package/types/Tooltip.d.ts +6 -6
- package/types/Tooltip.d.ts.map +1 -1
- package/types/Tooltip.native.d.ts +9 -6
- package/types/Tooltip.native.d.ts.map +1 -1
- package/types/TooltipSimple.d.ts +1 -1
- package/types/TooltipSimple.d.ts.map +1 -1
- package/types/TooltipSimple.native.d.ts +3 -1
- package/types/TooltipSimple.native.d.ts.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/dist/cjs/Tooltip.cjs +0 -241
- package/dist/cjs/Tooltip.native.js +0 -50
- package/dist/cjs/Tooltip.native.js.map +0 -1
- package/dist/cjs/TooltipSimple.cjs +0 -112
- package/dist/cjs/TooltipSimple.native.js +0 -34
- package/dist/cjs/TooltipSimple.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -21
- package/dist/cjs/index.native.js +0 -24
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/esm/Tooltip.mjs +0 -202
- package/dist/esm/Tooltip.mjs.map +0 -1
- package/dist/esm/Tooltip.native.js +0 -20
- package/dist/esm/Tooltip.native.js.map +0 -1
- package/dist/esm/TooltipSimple.mjs +0 -76
- package/dist/esm/TooltipSimple.mjs.map +0 -1
- package/dist/esm/TooltipSimple.native.js +0 -6
- package/dist/esm/TooltipSimple.native.js.map +0 -1
- package/dist/esm/index.mjs +0 -3
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -3
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/Tooltip.mjs +0 -202
- package/dist/jsx/Tooltip.mjs.map +0 -1
- package/dist/jsx/Tooltip.native.js +0 -50
- package/dist/jsx/Tooltip.native.js.map +0 -1
- package/dist/jsx/TooltipSimple.mjs +0 -76
- package/dist/jsx/TooltipSimple.mjs.map +0 -1
- package/dist/jsx/TooltipSimple.native.js +0 -34
- package/dist/jsx/TooltipSimple.native.js.map +0 -1
- package/dist/jsx/index.js +0 -3
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs +0 -3
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/index.native.js +0 -24
- package/dist/jsx/index.native.js.map +0 -1
package/types/Tooltip.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const TooltipGroup: ({ children, delay, preventAnimation, timeout
|
|
|
36
36
|
delay: Delay;
|
|
37
37
|
preventAnimation?: boolean;
|
|
38
38
|
timeoutMs?: number;
|
|
39
|
-
}) =>
|
|
39
|
+
}) => React.JSX.Element;
|
|
40
40
|
export declare const closeOpenTooltips: () => void;
|
|
41
41
|
export declare const Tooltip: React.ForwardRefExoticComponent<Omit<PopperProps & {
|
|
42
42
|
open?: boolean;
|
|
@@ -70,19 +70,19 @@ export declare const Tooltip: React.ForwardRefExoticComponent<Omit<PopperProps &
|
|
|
70
70
|
fullscreen?: boolean | undefined;
|
|
71
71
|
}>, keyof import("@hanzogui/stacks").StackVariants> & import("@hanzogui/stacks").StackVariants & import("@hanzogui/popper").PopperArrowExtraProps & React.RefAttributes<GuiElement>>;
|
|
72
72
|
Content: import("@hanzogui/web").GuiComponent<Omit<import("@hanzogui/web").GetFinalProps<import("@hanzogui/core").RNGuiViewNonStyleProps, import("@hanzogui/web").StackStyleBase, {
|
|
73
|
-
size?: SizeTokens | undefined;
|
|
74
|
-
unstyled?: boolean | undefined;
|
|
75
73
|
elevation?: number | SizeTokens | undefined;
|
|
76
74
|
fullscreen?: boolean | undefined;
|
|
77
|
-
|
|
75
|
+
size?: SizeTokens | undefined;
|
|
76
|
+
unstyled?: boolean | undefined;
|
|
77
|
+
}>, "accessibilityActions" | "accessibilityElementsHidden" | "accessibilityHint" | "accessibilityIgnoresInvertColors" | "accessibilityLabel" | "accessibilityLabelledBy" | "accessibilityLanguage" | "accessibilityLargeContentTitle" | "accessibilityLiveRegion" | "accessibilityRespondsToUserInteraction" | "accessibilityRole" | "accessibilityShowsLargeContentViewer" | "accessibilityState" | "accessibilityValue" | "accessibilityViewIsModal" | "accessible" | "alignContent" | "alignItems" | "alignSelf" | "alwaysDisable" | "animateOnly" | "animatePosition" | "animatePresence" | "animatedBy" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-hidden" | "aria-label" | "aria-labelledby" | "aria-live" | "aria-modal" | "aria-selected" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "asChild" | "aspectRatio" | "backdropFilter" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "blockSize" | "border" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottomColor" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderBottomWidth" | "borderColor" | "borderCurve" | "borderEndColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderEndWidth" | "borderImage" | "borderInlineColor" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeftColor" | "borderLeftWidth" | "borderRadius" | "borderRightColor" | "borderRightWidth" | "borderStartColor" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStartWidth" | "borderStyle" | "borderTopColor" | "borderTopEndRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStartRadius" | "borderTopWidth" | "borderWidth" | "bordered" | "bottom" | "boxShadow" | "boxSizing" | "branches" | "caretColor" | "children" | "chromeless" | "circular" | "className" | "clipPath" | "collapsable" | "collapsableChildren" | "columnGap" | "componentName" | "contain" | "containerType" | "content" | "cursor" | "dangerouslySetInnerHTML" | "debug" | "direction" | "disableClassName" | "disableFocusScope" | "disableOptimization" | "disabled" | "disabledStyle" | "display" | "download" | "elevate" | "elevation" | "elevationAndroid" | "enableAnimationForPositionChange" | "enableRemoveScroll" | "end" | "enterStyle" | "exitStyle" | "experimental_backgroundImage" | "filter" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "focusStyle" | "focusVisibleStyle" | "focusWithinStyle" | "focusable" | "forceStyle" | "forceUnmount" | "freezeContentsWhenHidden" | "fullscreen" | "gap" | "grid" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnStart" | "gridRow" | "gridRowEnd" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "group" | "hasTVPreferredFocus" | "height" | "hitSlop" | "hoverStyle" | "htmlFor" | "id" | "importantForAccessibility" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isTVSelectable" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "lazyMount" | "left" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginEnd" | "marginHorizontal" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginStart" | "marginTop" | "marginVertical" | "mask" | "maskBorder" | "maskBorderMode" | "maskBorderOutset" | "maskBorderRepeat" | "maskBorderSlice" | "maskBorderSource" | "maskBorderWidth" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "matrix" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "nativeID" | "needsOffscreenAlphaCompositing" | "objectFit" | "onAccessibilityAction" | "onAccessibilityEscape" | "onAccessibilityTap" | "onBeforeInput" | "onBlur" | "onBlurCapture" | "onChange" | "onClick" | "onCloseAutoFocus" | "onContextMenu" | "onCopy" | "onCut" | "onDoubleClick" | "onDrag" | "onDragEnd" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDragStart" | "onDrop" | "onEscapeKeyDown" | "onFocus" | "onFocusCapture" | "onFocusOutside" | "onInput" | "onInteractOutside" | "onKeyDown" | "onKeyUp" | "onLayout" | "onLongPress" | "onMagicTap" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseOut" | "onMouseOver" | "onMouseUp" | "onMoveShouldSetResponder" | "onMoveShouldSetResponderCapture" | "onOpenAutoFocus" | "onPaste" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerDownOutside" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPress" | "onPressIn" | "onPressOut" | "onResponderEnd" | "onResponderGrant" | "onResponderMove" | "onResponderReject" | "onResponderRelease" | "onResponderStart" | "onResponderTerminate" | "onResponderTerminationRequest" | "onScroll" | "onScrollShouldSetResponder" | "onScrollShouldSetResponderCapture" | "onSelectionChangeShouldSetResponder" | "onSelectionChangeShouldSetResponderCapture" | "onStartShouldSetResponder" | "onStartShouldSetResponderCapture" | "onTouchCancel" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchStart" | "onWheel" | "opacity" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowBlock" | "overflowInline" | "overflowX" | "overflowY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingEnd" | "paddingHorizontal" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingStart" | "paddingTop" | "paddingVertical" | "passThrough" | "perspective" | "placeContent" | "placeItems" | "placeSelf" | "pointerEvents" | "position" | "pressStyle" | "rel" | "removeClippedSubviews" | "render" | "renderToHardwareTextureAndroid" | "right" | "role" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "rotation" | "rowGap" | "scale" | "scaleX" | "scaleY" | "scope" | "screenReaderFocusable" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "shouldRasterizeIOS" | "size" | "skewX" | "skewY" | "start" | "style" | "tabIndex" | "target" | "testID" | "textEmphasis" | "theme" | "themeShallow" | "top" | "transform" | "transformMatrix" | "transformOrigin" | "transformStyle" | "transition" | "translateX" | "translateY" | "transparent" | "trapFocus" | "tvParallaxMagnification" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "unstyled" | "untilMeasured" | "userSelect" | "verticalAlign" | "width" | "x" | "y" | "zIndex" | `$${string}` | `$${number}` | `$group-${string}` | `$group-${number}` | `$group-${string}-focus` | `$group-${number}-focus` | `$group-${string}-focusVisible` | `$group-${number}-focusVisible` | `$group-${string}-focusWithin` | `$group-${number}-focusWithin` | `$group-${string}-hover` | `$group-${number}-hover` | `$group-${string}-press` | `$group-${number}-press`> & Omit<import("@hanzogui/popover").PopoverContentTypeProps, "scope"> & {
|
|
78
78
|
scope?: TooltipScopes;
|
|
79
79
|
}, GuiElement, import("@hanzogui/core").RNGuiViewNonStyleProps & Omit<import("@hanzogui/popover").PopoverContentTypeProps, "scope"> & {
|
|
80
80
|
scope?: TooltipScopes;
|
|
81
81
|
}, import("@hanzogui/web").StackStyleBase, {
|
|
82
|
-
size?: SizeTokens | undefined;
|
|
83
|
-
unstyled?: boolean | undefined;
|
|
84
82
|
elevation?: number | SizeTokens | undefined;
|
|
85
83
|
fullscreen?: boolean | undefined;
|
|
84
|
+
size?: SizeTokens | undefined;
|
|
85
|
+
unstyled?: boolean | undefined;
|
|
86
86
|
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
87
87
|
Trigger: React.ForwardRefExoticComponent<Omit<PopoverTriggerProps, "scope"> & {
|
|
88
88
|
scope?: TooltipScopes;
|
package/types/Tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAA4C,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAK5D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,mBAAmB,CAAA;AAS1B,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAElC,KAAK,WAAW,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,CAAA;AAElE,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC,CAAA;AAuDlE,MAAM,MAAM,YAAY,GAAG,WAAW,CACpC,WAAW,GAAG;IACZ,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,CAAA;IACD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EACF,MAAM,GACN;QACE,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACL,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CACF,CAAA;AAKD,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAA4C,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAK5D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,mBAAmB,CAAA;AAS1B,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAElC,KAAK,WAAW,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,CAAA;AAElE,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC,CAAA;AAuDlE,MAAM,MAAM,YAAY,GAAG,WAAW,CACpC,WAAW,GAAG;IACZ,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,CAAA;IACD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EACF,MAAM,GACN;QACE,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACL,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CACF,CAAA;AAKD,eAAO,MAAM,YAAY,sDAKtB;IACD,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,KAAK,EAAE,KAAK,CAAA;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,sBAWA,CAAA;AAID,eAAO,MAAM,iBAAiB,YAE7B,CAAA;AA2ID,eAAO,MAAM,OAAO;WAlMT,OAAO;eACH,OAAO;eACP,KAAK,CAAC,SAAS;mBACX,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;YAC9B;QACN,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB;cACS,MAAM;aACP,MAAM;YAEX,MAAM,GACN;QACE,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf;+BACsB,OAAO;IAClC;;;OAGG;aACM,MAAM;;YAhFgC,aAAa;;;gBAAb,aAAa;;;;;;;;;;;;;;;;;;;;;;;;CAkQ9D,CAAA"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
declare const RenderChildren: (props: any) => any;
|
|
2
|
+
declare const RenderNull: (props: any) => null;
|
|
1
3
|
export declare const TooltipGroup: () => null;
|
|
2
4
|
export declare const closeOpenTooltips: () => void;
|
|
3
|
-
export declare const Tooltip:
|
|
4
|
-
Anchor:
|
|
5
|
-
Arrow:
|
|
6
|
-
Close:
|
|
7
|
-
Content:
|
|
8
|
-
Trigger:
|
|
5
|
+
export declare const Tooltip: typeof RenderChildren & {
|
|
6
|
+
Anchor: typeof RenderChildren;
|
|
7
|
+
Arrow: typeof RenderNull;
|
|
8
|
+
Close: typeof RenderNull;
|
|
9
|
+
Content: typeof RenderNull;
|
|
10
|
+
Trigger: typeof RenderChildren;
|
|
9
11
|
};
|
|
12
|
+
export {};
|
|
10
13
|
//# sourceMappingURL=Tooltip.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.native.d.ts","sourceRoot":"","sources":["../src/Tooltip.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.native.d.ts","sourceRoot":"","sources":["../src/Tooltip.native.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,cAAc,UAAW,GAAG,QAEjC,CAAA;AAED,QAAA,MAAM,UAAU,UAAW,GAAG,SAE7B,CAAA;AAED,eAAO,MAAM,YAAY,YAAa,CAAA;AAEtC,eAAO,MAAM,iBAAiB,YAE7B,CAAA;AAED,eAAO,MAAM,OAAO;;;;;;CAMlB,CAAA"}
|
package/types/TooltipSimple.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SizableStackProps } from '@hanzogui/stacks';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import type { TooltipProps } from './Tooltip';
|
|
3
|
+
import type { TooltipProps } from './Tooltip.tsx';
|
|
4
4
|
export type TooltipSimpleProps = TooltipProps & {
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
label?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipSimple.d.ts","sourceRoot":"","sources":["../src/TooltipSimple.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TooltipSimple.d.ts","sourceRoot":"","sources":["../src/TooltipSimple.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqEtD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipSimple.native.d.ts","sourceRoot":"","sources":["../src/TooltipSimple.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TooltipSimple.native.d.ts","sourceRoot":"","sources":["../src/TooltipSimple.native.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc,UAAW,GAAG,QAEjC,CAAA;AAED,eAAO,MAAM,aAAa,uBAAiB,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Tooltip';
|
|
2
|
-
export * from './TooltipSimple';
|
|
1
|
+
export * from './Tooltip.tsx';
|
|
2
|
+
export * from './TooltipSimple.tsx';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA"}
|
package/dist/cjs/Tooltip.cjs
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: true
|
|
30
|
-
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
34
|
-
var Tooltip_exports = {};
|
|
35
|
-
__export(Tooltip_exports, {
|
|
36
|
-
Tooltip: () => Tooltip2,
|
|
37
|
-
TooltipGroup: () => TooltipGroup,
|
|
38
|
-
closeOpenTooltips: () => closeOpenTooltips
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(Tooltip_exports);
|
|
41
|
-
var import_polyfill_dev = require("@hanzogui/polyfill-dev");
|
|
42
|
-
var import_floating = require("@hanzogui/floating");
|
|
43
|
-
var import_core = require("@hanzogui/core");
|
|
44
|
-
var import_floating2 = require("@hanzogui/floating");
|
|
45
|
-
var import_get_token = require("@hanzogui/get-token");
|
|
46
|
-
var import_helpers = require("@hanzogui/helpers");
|
|
47
|
-
var import_popover = require("@hanzogui/popover");
|
|
48
|
-
var import_popper = require("@hanzogui/popper");
|
|
49
|
-
var import_use_controllable_state = require("@hanzogui/use-controllable-state");
|
|
50
|
-
var React = __toESM(require("react"), 1);
|
|
51
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
52
|
-
const TOOLTIP_SCOPE = "";
|
|
53
|
-
const ALWAYS_DISABLE_TOOLTIP = {
|
|
54
|
-
focus: true,
|
|
55
|
-
"remove-scroll": true
|
|
56
|
-
// it's nice to hit escape to hide a tooltip
|
|
57
|
-
// dismiss: true
|
|
58
|
-
};
|
|
59
|
-
const TooltipContent = import_popper.PopperContentFrame.styleable((props, ref) => {
|
|
60
|
-
const preventAnimation = React.useContext(PreventTooltipAnimationContext);
|
|
61
|
-
const zIndexFromContext = React.useContext(TooltipZIndexContext);
|
|
62
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverContent, {
|
|
63
|
-
scope: props.scope || TOOLTIP_SCOPE,
|
|
64
|
-
alwaysDisable: ALWAYS_DISABLE_TOOLTIP,
|
|
65
|
-
...(!props.unstyled && {
|
|
66
|
-
backgroundColor: "$background",
|
|
67
|
-
alignItems: "center",
|
|
68
|
-
pointerEvents: "none",
|
|
69
|
-
size: "$true"
|
|
70
|
-
}),
|
|
71
|
-
ref,
|
|
72
|
-
...(zIndexFromContext !== void 0 && {
|
|
73
|
-
zIndex: zIndexFromContext
|
|
74
|
-
}),
|
|
75
|
-
...props,
|
|
76
|
-
...(preventAnimation && {
|
|
77
|
-
transition: null
|
|
78
|
-
})
|
|
79
|
-
});
|
|
80
|
-
}, {
|
|
81
|
-
staticConfig: {
|
|
82
|
-
componentName: "Tooltip"
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
const TooltipArrow = React.forwardRef((props, ref) => {
|
|
86
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverArrow, {
|
|
87
|
-
scope: props.scope || TOOLTIP_SCOPE,
|
|
88
|
-
componentName: "Tooltip",
|
|
89
|
-
ref,
|
|
90
|
-
...props
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
const PreventTooltipAnimationContext = React.createContext(false);
|
|
94
|
-
const TooltipZIndexContext = React.createContext(void 0);
|
|
95
|
-
const TooltipGroup = ({
|
|
96
|
-
children,
|
|
97
|
-
delay,
|
|
98
|
-
preventAnimation = false,
|
|
99
|
-
timeoutMs
|
|
100
|
-
}) => {
|
|
101
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(PreventTooltipAnimationContext.Provider, {
|
|
102
|
-
value: preventAnimation,
|
|
103
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floating.FloatingDelayGroup, {
|
|
104
|
-
timeoutMs,
|
|
105
|
-
delay: React.useMemo(() => delay, [JSON.stringify(delay)]),
|
|
106
|
-
children
|
|
107
|
-
})
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
const setOpens = /* @__PURE__ */new Set();
|
|
111
|
-
const closeOpenTooltips = () => {
|
|
112
|
-
setOpens.forEach(x => x(false));
|
|
113
|
-
};
|
|
114
|
-
const TooltipComponent = React.forwardRef(function Tooltip(props, ref) {
|
|
115
|
-
"use no memo";
|
|
116
|
-
|
|
117
|
-
const {
|
|
118
|
-
children,
|
|
119
|
-
delay: delayProp,
|
|
120
|
-
restMs: restMsProp,
|
|
121
|
-
onOpenChange: onOpenChangeProp,
|
|
122
|
-
focus,
|
|
123
|
-
open: openProp,
|
|
124
|
-
disableAutoCloseOnScroll,
|
|
125
|
-
zIndex,
|
|
126
|
-
scope = TOOLTIP_SCOPE,
|
|
127
|
-
...restProps
|
|
128
|
-
} = props;
|
|
129
|
-
const triggerRef = React.useRef(null);
|
|
130
|
-
const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
|
|
131
|
-
const {
|
|
132
|
-
delay: delayGroup,
|
|
133
|
-
setCurrentId
|
|
134
|
-
} = (0, import_floating.useDelayGroupContext)();
|
|
135
|
-
const delay = delayProp !== void 0 ? delayProp : delayGroup ?? 400;
|
|
136
|
-
const restMs = restMsProp ?? (typeof delay === "number" ? delay : 0);
|
|
137
|
-
const [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
138
|
-
prop: openProp,
|
|
139
|
-
defaultProp: false,
|
|
140
|
-
onChange: onOpenChangeProp
|
|
141
|
-
});
|
|
142
|
-
const id = props.groupId;
|
|
143
|
-
const onOpenChange = (0, import_core.useEvent)(open2 => {
|
|
144
|
-
if (open2) {
|
|
145
|
-
setCurrentId(id);
|
|
146
|
-
}
|
|
147
|
-
setOpen(open2);
|
|
148
|
-
});
|
|
149
|
-
React.useEffect(() => {
|
|
150
|
-
if (!open) return;
|
|
151
|
-
if (disableAutoCloseOnScroll) return;
|
|
152
|
-
if (typeof document === "undefined") return;
|
|
153
|
-
const closeIt = () => {
|
|
154
|
-
setOpen(false);
|
|
155
|
-
};
|
|
156
|
-
setOpens.add(setOpen);
|
|
157
|
-
document.documentElement.addEventListener("scroll", closeIt);
|
|
158
|
-
return () => {
|
|
159
|
-
setOpens.delete(setOpen);
|
|
160
|
-
document.documentElement.removeEventListener("scroll", closeIt);
|
|
161
|
-
};
|
|
162
|
-
}, [open, disableAutoCloseOnScroll]);
|
|
163
|
-
const floatingContext = (0, import_popover.useFloatingContext)({
|
|
164
|
-
open,
|
|
165
|
-
setOpen: onOpenChange,
|
|
166
|
-
disable: false,
|
|
167
|
-
disableFocus: false,
|
|
168
|
-
hoverable: true,
|
|
169
|
-
role: "tooltip",
|
|
170
|
-
focus,
|
|
171
|
-
groupId: id,
|
|
172
|
-
delay,
|
|
173
|
-
restMs
|
|
174
|
-
});
|
|
175
|
-
const onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), []);
|
|
176
|
-
const onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(false), []);
|
|
177
|
-
const contentId = React.useId();
|
|
178
|
-
const smallerSize = props.unstyled ? null : (0, import_get_token.getSize)("$true", {
|
|
179
|
-
shift: -2,
|
|
180
|
-
bounds: [0]
|
|
181
|
-
});
|
|
182
|
-
const content = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floating2.FloatingOverrideContext.Provider, {
|
|
183
|
-
value: floatingContext,
|
|
184
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popper.Popper, {
|
|
185
|
-
scope,
|
|
186
|
-
size: smallerSize?.key,
|
|
187
|
-
allowFlip: true,
|
|
188
|
-
stayInFrame: true,
|
|
189
|
-
open,
|
|
190
|
-
...restProps,
|
|
191
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverContextProvider, {
|
|
192
|
-
scope,
|
|
193
|
-
contentId,
|
|
194
|
-
triggerRef,
|
|
195
|
-
open,
|
|
196
|
-
onOpenChange: setOpen,
|
|
197
|
-
onOpenToggle: voidFn,
|
|
198
|
-
hasCustomAnchor,
|
|
199
|
-
onCustomAnchorAdd,
|
|
200
|
-
onCustomAnchorRemove,
|
|
201
|
-
children
|
|
202
|
-
})
|
|
203
|
-
})
|
|
204
|
-
});
|
|
205
|
-
if (zIndex !== void 0) {
|
|
206
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(TooltipZIndexContext.Provider, {
|
|
207
|
-
value: zIndex,
|
|
208
|
-
children: content
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
return content;
|
|
212
|
-
});
|
|
213
|
-
const TooltipTrigger = React.forwardRef(function TooltipTrigger2(props, ref) {
|
|
214
|
-
const {
|
|
215
|
-
scope,
|
|
216
|
-
...rest
|
|
217
|
-
} = props;
|
|
218
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverTrigger, {
|
|
219
|
-
...rest,
|
|
220
|
-
scope: scope || TOOLTIP_SCOPE,
|
|
221
|
-
ref
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
const TooltipAnchor = React.forwardRef(function TooltipAnchor2(props, ref) {
|
|
225
|
-
const {
|
|
226
|
-
scope,
|
|
227
|
-
...rest
|
|
228
|
-
} = props;
|
|
229
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverAnchor, {
|
|
230
|
-
...rest,
|
|
231
|
-
scope: scope || TOOLTIP_SCOPE,
|
|
232
|
-
ref
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
const Tooltip2 = (0, import_helpers.withStaticProperties)(TooltipComponent, {
|
|
236
|
-
Anchor: TooltipAnchor,
|
|
237
|
-
Arrow: TooltipArrow,
|
|
238
|
-
Content: TooltipContent,
|
|
239
|
-
Trigger: TooltipTrigger
|
|
240
|
-
});
|
|
241
|
-
const voidFn = () => {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var Tooltip_native_exports = {};
|
|
26
|
-
__export(Tooltip_native_exports, {
|
|
27
|
-
Tooltip: () => Tooltip,
|
|
28
|
-
TooltipGroup: () => TooltipGroup,
|
|
29
|
-
closeOpenTooltips: () => closeOpenTooltips
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(Tooltip_native_exports);
|
|
32
|
-
var import_helpers = require("@hanzogui/helpers");
|
|
33
|
-
var RenderChildren = function (props) {
|
|
34
|
-
return props.children;
|
|
35
|
-
};
|
|
36
|
-
var RenderNull = function (props) {
|
|
37
|
-
return null;
|
|
38
|
-
};
|
|
39
|
-
var TooltipGroup = function () {
|
|
40
|
-
return null;
|
|
41
|
-
};
|
|
42
|
-
var closeOpenTooltips = function () {};
|
|
43
|
-
var Tooltip = (0, import_helpers.withStaticProperties)(RenderChildren, {
|
|
44
|
-
Anchor: RenderChildren,
|
|
45
|
-
Arrow: RenderNull,
|
|
46
|
-
Close: RenderNull,
|
|
47
|
-
Content: RenderNull,
|
|
48
|
-
Trigger: RenderChildren
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=Tooltip.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Tooltip_native_exports","__export","Tooltip","TooltipGroup","closeOpenTooltips","module","exports","__toCommonJS","import_helpers","require","RenderChildren","props","children","RenderNull","withStaticProperties","Anchor","Arrow","Close","Content","Trigger"],"sources":["../../src/Tooltip.native.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,sBAAA;AAAAC,QAAA,CAAAD,sBAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA,OAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAP,sBAAA;AAAA,IAAAQ,cAAA,GAAqCC,OAAA;AAGrC,IAAIC,cAAA,GAAiB,SAAAA,CAASC,KAAA,EAAO;EACjC,OAAOA,KAAA,CAAMC,QAAA;AACjB;AACA,IAAIC,UAAA,GAAa,SAAAA,CAASF,KAAA,EAAO;EAC7B,OAAO;AACX;AACO,IAAIR,YAAA,GAAe,SAAAA,CAAA,EAAW;EACjC,OAAO;AACX;AACO,IAAIC,iBAAA,GAAoB,SAAAA,CAAA,EAAW,CAAC;AACzB,IAAIF,OAAA,OAAUM,cAAA,CAAAM,oBAAA,EAAqBJ,cAAA,EAAgB;EACjEK,MAAA,EAAQL,cAAA;EACRM,KAAA,EAAOH,UAAA;EACPI,KAAA,EAAOJ,UAAA;EACPK,OAAA,EAASL,UAAA;EACTM,OAAA,EAAST;AACb,CAAC","ignoreList":[]}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: true
|
|
30
|
-
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
34
|
-
var TooltipSimple_exports = {};
|
|
35
|
-
__export(TooltipSimple_exports, {
|
|
36
|
-
TooltipSimple: () => TooltipSimple
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(TooltipSimple_exports);
|
|
39
|
-
var import_get_token = require("@hanzogui/get-token");
|
|
40
|
-
var import_text = require("@hanzogui/text");
|
|
41
|
-
var React = __toESM(require("react"), 1);
|
|
42
|
-
var import_Tooltip = require("./Tooltip.cjs");
|
|
43
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
-
const TooltipSimple = React.forwardRef(({
|
|
45
|
-
label,
|
|
46
|
-
children,
|
|
47
|
-
contentProps,
|
|
48
|
-
disabled,
|
|
49
|
-
...tooltipProps
|
|
50
|
-
}, ref) => {
|
|
51
|
-
"use no memo";
|
|
52
|
-
|
|
53
|
-
const child = React.Children.only(children);
|
|
54
|
-
if (!label) {
|
|
55
|
-
return children;
|
|
56
|
-
}
|
|
57
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_Tooltip.Tooltip, {
|
|
58
|
-
disableRTL: true,
|
|
59
|
-
offset: 15,
|
|
60
|
-
restMs: 40,
|
|
61
|
-
delay: 40,
|
|
62
|
-
zIndex: 1e6,
|
|
63
|
-
...tooltipProps,
|
|
64
|
-
...(disabled ? {
|
|
65
|
-
open: false
|
|
66
|
-
} : null),
|
|
67
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Tooltip.Tooltip.Trigger, {
|
|
68
|
-
...(typeof label === "string" && {
|
|
69
|
-
"aria-label": label
|
|
70
|
-
}),
|
|
71
|
-
asChild: "except-style",
|
|
72
|
-
children: ref && React.isValidElement(child) ? React.cloneElement(child, {
|
|
73
|
-
ref
|
|
74
|
-
}) : child
|
|
75
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_Tooltip.Tooltip.Content, {
|
|
76
|
-
enterStyle: {
|
|
77
|
-
y: -4,
|
|
78
|
-
opacity: 0,
|
|
79
|
-
scale: 0.96
|
|
80
|
-
},
|
|
81
|
-
exitStyle: {
|
|
82
|
-
y: -4,
|
|
83
|
-
opacity: 0,
|
|
84
|
-
scale: 0.96
|
|
85
|
-
},
|
|
86
|
-
scale: 1,
|
|
87
|
-
elevation: "$0.5",
|
|
88
|
-
opacity: 1,
|
|
89
|
-
pointerEvents: "none",
|
|
90
|
-
paddingVertical: (0, import_get_token.getSpace)(tooltipProps.size || "$true", {
|
|
91
|
-
shift: -4
|
|
92
|
-
}),
|
|
93
|
-
animateOnly: ["transform", "opacity"],
|
|
94
|
-
transition: ["quicker", {
|
|
95
|
-
opacity: {
|
|
96
|
-
overshootClamping: true
|
|
97
|
-
}
|
|
98
|
-
}],
|
|
99
|
-
...contentProps,
|
|
100
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Tooltip.Tooltip.Arrow, {}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_text.Paragraph, {
|
|
101
|
-
maxWidth: 350,
|
|
102
|
-
overflow: "hidden",
|
|
103
|
-
size: "$3",
|
|
104
|
-
textAlign: "center",
|
|
105
|
-
"$platform-web": {
|
|
106
|
-
textWrap: "balance"
|
|
107
|
-
},
|
|
108
|
-
children: label
|
|
109
|
-
})]
|
|
110
|
-
})]
|
|
111
|
-
});
|
|
112
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var TooltipSimple_native_exports = {};
|
|
26
|
-
__export(TooltipSimple_native_exports, {
|
|
27
|
-
TooltipSimple: () => TooltipSimple
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(TooltipSimple_native_exports);
|
|
30
|
-
var RenderChildren = function (props) {
|
|
31
|
-
return props.children;
|
|
32
|
-
};
|
|
33
|
-
var TooltipSimple = RenderChildren;
|
|
34
|
-
//# sourceMappingURL=TooltipSimple.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TooltipSimple_native_exports","__export","TooltipSimple","module","exports","__toCommonJS","RenderChildren","props","children"],"sources":["../../src/TooltipSimple.native.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,4BAAA;AAAAC,QAAA,CAAAD,4BAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,4BAAA;AAAA,IAAIM,cAAA,GAAiB,SAAAA,CAASC,KAAA,EAAO;EACjC,OAAOA,KAAA,CAAMC,QAAA;AACjB;AACO,IAAIN,aAAA,GAAgBI,cAAA","ignoreList":[]}
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
-
get: () => from[key],
|
|
9
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
}), mod);
|
|
18
|
-
var index_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("./Tooltip.cjs"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./TooltipSimple.cjs"), module.exports);
|
package/dist/cjs/index.native.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
-
get: () => from[key],
|
|
11
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
20
|
-
var index_exports = {};
|
|
21
|
-
module.exports = __toCommonJS(index_exports);
|
|
22
|
-
__reExport(index_exports, require("./Tooltip.native.js"), module.exports);
|
|
23
|
-
__reExport(index_exports, require("./TooltipSimple.native.js"), module.exports);
|
|
24
|
-
//# sourceMappingURL=index.native.js.map
|