@tamagui/tooltip 3.0.0-beta.1216.1 → 3.0.0-beta.1310.1

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.
@@ -40,12 +40,11 @@ var import_size = require("@tamagui/size");
40
40
  var import_helpers = require("@tamagui/helpers");
41
41
  var import_popover = require("@tamagui/popover");
42
42
  var import_popper = require("@tamagui/popper");
43
- var import_stacks = require("@tamagui/stacks");
44
43
  var import_use_controllable_state = require("@tamagui/use-controllable-state");
45
44
  var React = __toESM(require("react"), 1);
46
45
  var import_jsx_runtime = require("react/jsx-runtime");
47
46
  const TOOLTIP_SCOPE = "";
48
- const TooltipContentFrame = (0, import_core.styled)(import_popper.PopperContentFrame, { variants: { elevation: import_stacks.getElevation } });
47
+ const TooltipContentFrame = (0, import_core.styled)(import_popper.PopperContentFrame, {});
49
48
  const ALWAYS_DISABLE_TOOLTIP = {
50
49
  focus: true,
51
50
  "remove-scroll": true
@@ -59,6 +58,8 @@ const TooltipContent = (0, import_core.createStyledHOC)(TooltipContentFrame, (pr
59
58
  backgroundColor: "background",
60
59
  alignItems: "center",
61
60
  pointerEvents: "none",
61
+ paddingHorizontal: "2",
62
+ paddingVertical: "1",
62
63
  ...zIndexFromContext !== void 0 && { zIndex: zIndexFromContext },
63
64
  ...props,
64
65
  ...preventAnimation && { transition: null },
@@ -28,7 +28,7 @@ var TooltipSimple_exports = {};
28
28
  __export(TooltipSimple_exports, { TooltipSimple: () => TooltipSimple });
29
29
  module.exports = __toCommonJS(TooltipSimple_exports);
30
30
  var import_core = require("@tamagui/core");
31
- var import_get_token = require("@tamagui/get-token");
31
+ var import_size = require("@tamagui/size");
32
32
  var import_text = require("@tamagui/text");
33
33
  var React = __toESM(require("react"), 1);
34
34
  var import_Tooltip = require("./Tooltip.cjs");
@@ -39,6 +39,7 @@ const TooltipSimple = (0, import_core.createRefComponent)(({ label, children, co
39
39
  if (!label) {
40
40
  return children;
41
41
  }
42
+ const { frame } = (0, import_size.resolveSize)(tooltipProps.size ?? true);
42
43
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Tooltip.Tooltip, {
43
44
  disableRTL: true,
44
45
  offset: 15,
@@ -52,14 +53,14 @@ const TooltipSimple = (0, import_core.createRefComponent)(({ label, children, co
52
53
  asChild: "except-style",
53
54
  children: ref && React.isValidElement(child) ? React.cloneElement(child, { ref }) : child
54
55
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Tooltip.Tooltip.Content, {
55
- theme: "Tooltip",
56
+ theme: "brand",
56
57
  y: "enter:-4px exit:-4px",
57
58
  scale: "1 enter:0.96 exit:0.96",
58
59
  opacity: "1 enter:0 exit:0",
59
60
  pointerEvents: "none",
60
- paddingHorizontal: (0, import_core.getVariableValue)((0, import_get_token.getSpace)(tooltipProps.size ?? true)),
61
- paddingVertical: Math.max(0, Math.round((0, import_core.getVariableValue)((0, import_get_token.getSize)(tooltipProps.size ?? true)) * .36 - 9)),
62
- borderRadius: (0, import_core.getVariableValue)((0, import_get_token.getRadius)(tooltipProps.size ?? true)),
61
+ paddingHorizontal: "2",
62
+ paddingVertical: "1",
63
+ borderRadius: frame.borderRadius,
63
64
  boxShadow: "0 2px 4px shadow-color",
64
65
  transition: {
65
66
  preset: "quicker",
@@ -4,13 +4,12 @@ import { oneSizeSmaller } from "@tamagui/size";
4
4
  import { withStaticProperties } from "@tamagui/helpers";
5
5
  import { PopoverAnchor, PopoverArrow, PopoverContent, PopoverContextProvider, PopoverTrigger, useFloatingContext } from "@tamagui/popover";
6
6
  import { Popper, PopperContentFrame } from "@tamagui/popper";
7
- import { getElevation } from "@tamagui/stacks";
8
7
  import { useControllableState } from "@tamagui/use-controllable-state";
9
8
  import * as React from "react";
10
9
  import { jsx } from "react/jsx-runtime";
11
10
 
12
11
  const TOOLTIP_SCOPE = "";
13
- const TooltipContentFrame = styled(PopperContentFrame, { variants: { elevation: getElevation } });
12
+ const TooltipContentFrame = styled(PopperContentFrame, {});
14
13
  const ALWAYS_DISABLE_TOOLTIP = {
15
14
  focus: true,
16
15
  "remove-scroll": true
@@ -24,6 +23,8 @@ const TooltipContent = createStyledHOC(TooltipContentFrame, (props, ref) => {
24
23
  backgroundColor: "background",
25
24
  alignItems: "center",
26
25
  pointerEvents: "none",
26
+ paddingHorizontal: "2",
27
+ paddingVertical: "1",
27
28
  ...zIndexFromContext !== void 0 && { zIndex: zIndexFromContext },
28
29
  ...props,
29
30
  ...preventAnimation && { transition: null },
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","names":[],"sources":["esm/Tooltip.js"],"sourcesContent":["import { createStyledHOC, createRefComponent, getConfig, styled } from \"@tamagui/core\";\n\nimport { FloatingDelayGroup, useDelayGroupContext } from \"@tamagui/floating\";\nimport { useEvent } from \"@tamagui/core\";\nimport { FloatingOverrideContext } from \"@tamagui/floating\";\nimport { oneSizeSmaller } from \"@tamagui/size\";\nimport { withStaticProperties } from \"@tamagui/helpers\";\nimport {\n PopoverAnchor,\n PopoverArrow,\n PopoverContent,\n PopoverContextProvider,\n PopoverTrigger,\n useFloatingContext\n} from \"@tamagui/popover\";\nimport { Popper, PopperContentFrame } from \"@tamagui/popper\";\nimport { getElevation } from \"@tamagui/stacks\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nconst TOOLTIP_SCOPE = \"\";\nconst TooltipContentFrame = styled(PopperContentFrame, {\n variants: {\n elevation: getElevation\n }\n});\nconst ALWAYS_DISABLE_TOOLTIP = {\n focus: true,\n \"remove-scroll\": true\n // it's nice to hit escape to hide a tooltip\n // dismiss: true\n};\nconst TooltipContent = createStyledHOC(\n TooltipContentFrame,\n (props, ref) => {\n const preventAnimation = React.useContext(PreventTooltipAnimationContext);\n const zIndexFromContext = React.useContext(TooltipZIndexContext);\n return /* @__PURE__ */ jsx(\n PopoverContent,\n {\n scope: props.scope || TOOLTIP_SCOPE,\n alwaysDisable: ALWAYS_DISABLE_TOOLTIP,\n backgroundColor: \"background\",\n alignItems: \"center\",\n pointerEvents: \"none\",\n ...zIndexFromContext !== void 0 && { zIndex: zIndexFromContext },\n ...props,\n ...preventAnimation && { transition: null },\n ref\n }\n );\n },\n {\n displayName: \"Tooltip\"\n }\n);\nconst TooltipArrow = createRefComponent(\n (props, ref) => {\n const { className, ...rest } = props;\n return /* @__PURE__ */ jsx(\n PopoverArrow,\n {\n scope: props.scope || TOOLTIP_SCOPE,\n className: `is_Tooltip ${className || \"\"}`.trim(),\n ref,\n ...rest\n }\n );\n }\n);\nconst PreventTooltipAnimationContext = React.createContext(false);\nconst TooltipZIndexContext = React.createContext(void 0);\nconst TooltipGroup = ({\n children,\n delay,\n preventAnimation = false,\n timeoutMs\n}) => {\n return /* @__PURE__ */ jsx(PreventTooltipAnimationContext.Provider, { value: preventAnimation, children: /* @__PURE__ */ jsx(\n FloatingDelayGroup,\n {\n timeoutMs,\n delay: React.useMemo(() => delay, [JSON.stringify(delay)]),\n children\n }\n ) });\n};\nconst setOpens = /* @__PURE__ */ new Set();\nconst closeOpenTooltips = () => {\n setOpens.forEach((x) => x(false));\n};\nconst TooltipComponent = createRefComponent(function Tooltip(props, ref) {\n \"use no memo\";\n const {\n children,\n delay: delayProp,\n restMs: restMsProp,\n onOpenChange: onOpenChangeProp,\n focus,\n open: openProp,\n disableAutoCloseOnScroll,\n zIndex,\n scope = TOOLTIP_SCOPE,\n ...restProps\n } = props;\n const triggerRef = React.useRef(null);\n const closeReasonRef = React.useRef(void 0);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const { delay: delayGroup, setCurrentId } = useDelayGroupContext();\n const delay = delayProp !== void 0 ? delayProp : delayGroup ?? 400;\n const restMs = restMsProp ?? (typeof delay === \"number\" ? delay : 0);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: false,\n onChange: onOpenChangeProp\n });\n const id = props.groupId;\n const onOpenChange = useEvent((open2) => {\n if (open2) {\n setCurrentId(id);\n }\n setOpen(open2);\n });\n React.useEffect(() => {\n if (!open) return;\n if (disableAutoCloseOnScroll) return;\n if (typeof document === \"undefined\") return;\n const closeIt = () => {\n setOpen(false);\n };\n setOpens.add(setOpen);\n document.documentElement.addEventListener(\"scroll\", closeIt);\n return () => {\n setOpens.delete(setOpen);\n document.documentElement.removeEventListener(\"scroll\", closeIt);\n };\n }, [open, disableAutoCloseOnScroll]);\n const floatingContext = useFloatingContext({\n open,\n setOpen: onOpenChange,\n closeReasonRef,\n disable: false,\n disableFocus: false,\n hoverable: true,\n role: \"tooltip\",\n focus,\n groupId: id,\n delay,\n restMs\n });\n const onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), []);\n const onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(false), []);\n const contentId = React.useId();\n const smallerSize = oneSizeSmaller(true, getConfig().sizes);\n const content = /* @__PURE__ */ jsx(FloatingOverrideContext.Provider, { value: floatingContext, children: /* @__PURE__ */ jsx(\n Popper,\n {\n scope,\n size: smallerSize,\n allowFlip: true,\n stayInFrame: true,\n open,\n ...restProps,\n children: /* @__PURE__ */ jsx(\n PopoverContextProvider,\n {\n scope,\n contentId,\n triggerRef,\n open,\n onOpenChange: setOpen,\n closeReasonRef,\n onOpenToggle: voidFn,\n hasCustomAnchor,\n onCustomAnchorAdd,\n onCustomAnchorRemove,\n children\n }\n )\n }\n ) });\n if (zIndex !== void 0) {\n return /* @__PURE__ */ jsx(TooltipZIndexContext.Provider, { value: zIndex, children: content });\n }\n return content;\n});\nconst TooltipTrigger = createRefComponent(function TooltipTrigger2(props, ref) {\n const { scope, ...rest } = props;\n return /* @__PURE__ */ jsx(PopoverTrigger, { ...rest, scope: scope || TOOLTIP_SCOPE, ref });\n});\nconst TooltipAnchor = createRefComponent(function TooltipAnchor2(props, ref) {\n const { scope, ...rest } = props;\n return /* @__PURE__ */ jsx(PopoverAnchor, { ...rest, scope: scope || TOOLTIP_SCOPE, ref });\n});\nconst Tooltip2 = withStaticProperties(TooltipComponent, {\n Anchor: TooltipAnchor,\n Arrow: TooltipArrow,\n Content: TooltipContent,\n Trigger: TooltipTrigger\n});\nconst voidFn = () => {\n};\nexport {\n Tooltip2 as Tooltip,\n TooltipGroup,\n closeOpenTooltips\n};\n//# sourceMappingURL=Tooltip.js.map\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAM,gBAAgB;AACtB,MAAM,sBAAsB,OAAO,oBAAoB,EACrD,UAAU,EACR,WAAW,aACb,EACF,CAAC;AACD,MAAM,yBAAyB;CAC7B,OAAO;CACP,iBAAiB;AAGnB;AACA,MAAM,iBAAiB,gBACrB,sBACC,OAAO,QAAQ;CACd,MAAM,mBAAmB,MAAM,WAAW,8BAA8B;CACxE,MAAM,oBAAoB,MAAM,WAAW,oBAAoB;CAC/D,OAAuB,oBACrB,gBACA;EACE,OAAO,MAAM,SAAS;EACtB,eAAe;EACf,iBAAiB;EACjB,YAAY;EACZ,eAAe;EACf,GAAG,sBAAsB,KAAK,KAAK,EAAE,QAAQ,kBAAkB;EAC/D,GAAG;EACH,GAAG,oBAAoB,EAAE,YAAY,KAAK;EAC1C;CACF,CACF;AACF,GACA,EACE,aAAa,UACf,CACF;AACA,MAAM,eAAe,oBAClB,OAAO,QAAQ;CACd,MAAM,EAAE,WAAW,GAAG,SAAS;CAC/B,OAAuB,oBACrB,cACA;EACE,OAAO,MAAM,SAAS;EACtB,WAAW,cAAc,aAAa,KAAK,KAAK;EAChD;EACA,GAAG;CACL,CACF;AACF,CACF;AACA,MAAM,iCAAiC,MAAM,cAAc,KAAK;AAChE,MAAM,uBAAuB,MAAM,cAAc,KAAK,CAAC;AACvD,MAAM,gBAAgB,EACpB,UACA,OACA,mBAAmB,OACnB,gBACI;CACJ,OAAuB,oBAAI,+BAA+B,UAAU;EAAE,OAAO;EAAkB,UAA0B,oBACvH,oBACA;GACE;GACA,OAAO,MAAM,cAAc,OAAO,CAAC,KAAK,UAAU,KAAK,CAAC,CAAC;GACzD;EACF,CACF;CAAE,C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AoB,MAAM,kBAAkB,mBAAmB,IAAI,GAAG,CAAC,CAAC;CAC9E,MAAM,uBAAuB,MAAM,kBAAkB,mBAAmB,KAAK,GAAG,CAAC,CAAC;CAClF,MAAM,YAAY,MAAM,MAAM;CAC9B,MAAM,cAAc,eAAe,MAAM,UAAU,CAAC,CAAC,KAAK;CAC1D,MAAM,UAA0B,oBAAI,wBAAwB,UAAU;EAAE,OAAO;EAAiB,UAA0B,oBACxH,QACA;GACE;GACA,MAAM;GACN,WAAW;GACX,aAAa;GACb;GACA,GAAG;GACH,UAA0B,oBACxB,wBACA;IACE;IACA;IACA;IACA;IACA,cAAc;IACd;IACA,cAAc;IACd;IACA;IACA;IACA;GACF,CACF;EACF,CACF;CAAE,CAAC;CACH,IAAI,WAAW,KAAK,GAAG;EACrB,OAAuB,oBAAI,qBAAqB,UAAU;GAAE,OAAO;GAAQ,UAAU;EAAQ,CAAC;CAChG;CACA,OAAO;AACT,CAAC;AACD,MAAM,iBAAiB,mBAAmB,SAAS,gBAAgB,OAAO,KAAK;CAC7E,MAAM,EAAE,OAAO,GAAG,SAAS;CAC3B,OAAuB,oBAAI,gBAAgB;EAAE,GAAG;EAAM,OAAO,SAAS;EAAe;CAAI,CAAC;AAC5F,CAAC;AACD,MAAM,gBAAgB,mBAAmB,SAAS,eAAe,OAAO,KAAK;CAC3E,MAAM,EAAE,OAAO,GAAG,SAAS;CAC3B,OAAuB,oBAAI,eAAe;EAAE,GAAG;EAAM,OAAO,SAAS;EAAe;CAAI,CAAC;AAC3F,CAAC;AACD,MAAM,WAAW,qBAAqB,kBAAkB;CACtD,QAAQ;CACR,OAAO;CACP,SAAS;CACT,SAAS;AACX,CAAC;AACD,MAAM,eAAe,CACrB"}
1
+ {"version":3,"file":"Tooltip.js","names":[],"sources":["esm/Tooltip.js"],"sourcesContent":["import { createStyledHOC, createRefComponent, getConfig, styled } from \"@tamagui/core\";\n\nimport { FloatingDelayGroup, useDelayGroupContext } from \"@tamagui/floating\";\nimport { useEvent } from \"@tamagui/core\";\nimport { FloatingOverrideContext } from \"@tamagui/floating\";\nimport { oneSizeSmaller } from \"@tamagui/size\";\nimport { withStaticProperties } from \"@tamagui/helpers\";\nimport {\n PopoverAnchor,\n PopoverArrow,\n PopoverContent,\n PopoverContextProvider,\n PopoverTrigger,\n useFloatingContext\n} from \"@tamagui/popover\";\nimport { Popper, PopperContentFrame } from \"@tamagui/popper\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nconst TOOLTIP_SCOPE = \"\";\nconst TooltipContentFrame = styled(PopperContentFrame, {});\nconst ALWAYS_DISABLE_TOOLTIP = {\n focus: true,\n \"remove-scroll\": true\n // it's nice to hit escape to hide a tooltip\n // dismiss: true\n};\nconst TooltipContent = createStyledHOC(\n TooltipContentFrame,\n (props, ref) => {\n const preventAnimation = React.useContext(PreventTooltipAnimationContext);\n const zIndexFromContext = React.useContext(TooltipZIndexContext);\n return /* @__PURE__ */ jsx(\n PopoverContent,\n {\n scope: props.scope || TOOLTIP_SCOPE,\n alwaysDisable: ALWAYS_DISABLE_TOOLTIP,\n backgroundColor: \"background\",\n alignItems: \"center\",\n pointerEvents: \"none\",\n paddingHorizontal: \"2\",\n paddingVertical: \"1\",\n ...zIndexFromContext !== void 0 && { zIndex: zIndexFromContext },\n ...props,\n ...preventAnimation && { transition: null },\n ref\n }\n );\n },\n {\n displayName: \"Tooltip\"\n }\n);\nconst TooltipArrow = createRefComponent(\n (props, ref) => {\n const { className, ...rest } = props;\n return /* @__PURE__ */ jsx(\n PopoverArrow,\n {\n scope: props.scope || TOOLTIP_SCOPE,\n className: `is_Tooltip ${className || \"\"}`.trim(),\n ref,\n ...rest\n }\n );\n }\n);\nconst PreventTooltipAnimationContext = React.createContext(false);\nconst TooltipZIndexContext = React.createContext(void 0);\nconst TooltipGroup = ({\n children,\n delay,\n preventAnimation = false,\n timeoutMs\n}) => {\n return /* @__PURE__ */ jsx(PreventTooltipAnimationContext.Provider, { value: preventAnimation, children: /* @__PURE__ */ jsx(\n FloatingDelayGroup,\n {\n timeoutMs,\n delay: React.useMemo(() => delay, [JSON.stringify(delay)]),\n children\n }\n ) });\n};\nconst setOpens = /* @__PURE__ */ new Set();\nconst closeOpenTooltips = () => {\n setOpens.forEach((x) => x(false));\n};\nconst TooltipComponent = createRefComponent(function Tooltip(props, ref) {\n \"use no memo\";\n const {\n children,\n delay: delayProp,\n restMs: restMsProp,\n onOpenChange: onOpenChangeProp,\n focus,\n open: openProp,\n disableAutoCloseOnScroll,\n zIndex,\n scope = TOOLTIP_SCOPE,\n ...restProps\n } = props;\n const triggerRef = React.useRef(null);\n const closeReasonRef = React.useRef(void 0);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const { delay: delayGroup, setCurrentId } = useDelayGroupContext();\n const delay = delayProp !== void 0 ? delayProp : delayGroup ?? 400;\n const restMs = restMsProp ?? (typeof delay === \"number\" ? delay : 0);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: false,\n onChange: onOpenChangeProp\n });\n const id = props.groupId;\n const onOpenChange = useEvent((open2) => {\n if (open2) {\n setCurrentId(id);\n }\n setOpen(open2);\n });\n React.useEffect(() => {\n if (!open) return;\n if (disableAutoCloseOnScroll) return;\n if (typeof document === \"undefined\") return;\n const closeIt = () => {\n setOpen(false);\n };\n setOpens.add(setOpen);\n document.documentElement.addEventListener(\"scroll\", closeIt);\n return () => {\n setOpens.delete(setOpen);\n document.documentElement.removeEventListener(\"scroll\", closeIt);\n };\n }, [open, disableAutoCloseOnScroll]);\n const floatingContext = useFloatingContext({\n open,\n setOpen: onOpenChange,\n closeReasonRef,\n disable: false,\n disableFocus: false,\n hoverable: true,\n role: \"tooltip\",\n focus,\n groupId: id,\n delay,\n restMs\n });\n const onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), []);\n const onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(false), []);\n const contentId = React.useId();\n const smallerSize = oneSizeSmaller(true, getConfig().sizes);\n const content = /* @__PURE__ */ jsx(FloatingOverrideContext.Provider, { value: floatingContext, children: /* @__PURE__ */ jsx(\n Popper,\n {\n scope,\n size: smallerSize,\n allowFlip: true,\n stayInFrame: true,\n open,\n ...restProps,\n children: /* @__PURE__ */ jsx(\n PopoverContextProvider,\n {\n scope,\n contentId,\n triggerRef,\n open,\n onOpenChange: setOpen,\n closeReasonRef,\n onOpenToggle: voidFn,\n hasCustomAnchor,\n onCustomAnchorAdd,\n onCustomAnchorRemove,\n children\n }\n )\n }\n ) });\n if (zIndex !== void 0) {\n return /* @__PURE__ */ jsx(TooltipZIndexContext.Provider, { value: zIndex, children: content });\n }\n return content;\n});\nconst TooltipTrigger = createRefComponent(function TooltipTrigger2(props, ref) {\n const { scope, ...rest } = props;\n return /* @__PURE__ */ jsx(PopoverTrigger, { ...rest, scope: scope || TOOLTIP_SCOPE, ref });\n});\nconst TooltipAnchor = createRefComponent(function TooltipAnchor2(props, ref) {\n const { scope, ...rest } = props;\n return /* @__PURE__ */ jsx(PopoverAnchor, { ...rest, scope: scope || TOOLTIP_SCOPE, ref });\n});\nconst Tooltip2 = withStaticProperties(TooltipComponent, {\n Anchor: TooltipAnchor,\n Arrow: TooltipArrow,\n Content: TooltipContent,\n Trigger: TooltipTrigger\n});\nconst voidFn = () => {\n};\nexport {\n Tooltip2 as Tooltip,\n TooltipGroup,\n closeOpenTooltips\n};\n//# sourceMappingURL=Tooltip.js.map\n"],"mappings":";;;;;;;;;;;AAmBA,MAAM,gBAAgB;AACtB,MAAM,sBAAsB,OAAO,oBAAoB,CAAC,CAAC;AACzD,MAAM,yBAAyB;CAC7B,OAAO;CACP,iBAAiB;AAGnB;AACA,MAAM,iBAAiB,gBACrB,sBACC,OAAO,QAAQ;CACd,MAAM,mBAAmB,MAAM,WAAW,8BAA8B;CACxE,MAAM,oBAAoB,MAAM,WAAW,oBAAoB;CAC/D,OAAuB,oBACrB,gBACA;EACE,OAAO,MAAM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AAuB,oBAAI,qBAAqB,UAAU;GAAE,OAAO;GAAQ,UAAU;EAAQ,CAAC;CAChG;CACA,OAAO;AACT,CAAC;AACD,MAAM,iBAAiB,mBAAmB,SAAS,gBAAgB,OAAO,KAAK;CAC7E,MAAM,EAAE,OAAO,GAAG,SAAS;CAC3B,OAAuB,oBAAI,gBAAgB;EAAE,GAAG;EAAM,OAAO,SAAS;EAAe;CAAI,CAAC;AAC5F,CAAC;AACD,MAAM,gBAAgB,mBAAmB,SAAS,eAAe,OAAO,KAAK;CAC3E,MAAM,EAAE,OAAO,GAAG,SAAS;CAC3B,OAAuB,oBAAI,eAAe;EAAE,GAAG;EAAM,OAAO,SAAS;EAAe;CAAI,CAAC;AAC3F,CAAC;AACD,MAAM,WAAW,qBAAqB,kBAAkB;CACtD,QAAQ;CACR,OAAO;CACP,SAAS;CACT,SAAS;AACX,CAAC;AACD,MAAM,eAAe,CACrB"}
@@ -1,5 +1,5 @@
1
- import { createRefComponent, getVariableValue } from "@tamagui/core";
2
- import { getRadius, getSize, getSpace } from "@tamagui/get-token";
1
+ import { createRefComponent } from "@tamagui/core";
2
+ import { resolveSize } from "@tamagui/size";
3
3
  import { Paragraph } from "@tamagui/text";
4
4
  import * as React from "react";
5
5
  import { Tooltip } from "./Tooltip.mjs";
@@ -11,6 +11,7 @@ const TooltipSimple = createRefComponent(({ label, children, contentProps, disab
11
11
  if (!label) {
12
12
  return children;
13
13
  }
14
+ const { frame } = resolveSize(tooltipProps.size ?? true);
14
15
  return /* @__PURE__ */ jsxs(Tooltip, {
15
16
  disableRTL: true,
16
17
  offset: 15,
@@ -24,14 +25,14 @@ const TooltipSimple = createRefComponent(({ label, children, contentProps, disab
24
25
  asChild: "except-style",
25
26
  children: ref && React.isValidElement(child) ? React.cloneElement(child, { ref }) : child
26
27
  }), /* @__PURE__ */ jsxs(Tooltip.Content, {
27
- theme: "Tooltip",
28
+ theme: "brand",
28
29
  y: "enter:-4px exit:-4px",
29
30
  scale: "1 enter:0.96 exit:0.96",
30
31
  opacity: "1 enter:0 exit:0",
31
32
  pointerEvents: "none",
32
- paddingHorizontal: getVariableValue(getSpace(tooltipProps.size ?? true)),
33
- paddingVertical: Math.max(0, Math.round(getVariableValue(getSize(tooltipProps.size ?? true)) * .36 - 9)),
34
- borderRadius: getVariableValue(getRadius(tooltipProps.size ?? true)),
33
+ paddingHorizontal: "2",
34
+ paddingVertical: "1",
35
+ borderRadius: frame.borderRadius,
35
36
  boxShadow: "0 2px 4px shadow-color",
36
37
  transition: {
37
38
  preset: "quicker",
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipSimple.js","names":[],"sources":["esm/TooltipSimple.js"],"sourcesContent":["import { createRefComponent, getVariableValue } from \"@tamagui/core\";\nimport { getRadius, getSize, getSpace } from \"@tamagui/get-token\";\nimport { Paragraph } from \"@tamagui/text\";\nimport * as React from \"react\";\nimport { Tooltip } from \"./Tooltip\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst TooltipSimple = createRefComponent(\n ({ label, children, contentProps, disabled, ...tooltipProps }, ref) => {\n \"use no memo\";\n const child = React.Children.only(children);\n if (!label) {\n return children;\n }\n return /* @__PURE__ */ jsxs(\n Tooltip,\n {\n disableRTL: true,\n offset: 15,\n restMs: 40,\n delay: 40,\n zIndex: 1e6,\n ...tooltipProps,\n ...disabled ? { open: false } : null,\n children: [\n /* @__PURE__ */ jsx(\n Tooltip.Trigger,\n {\n ...typeof label === \"string\" && {\n \"aria-label\": label\n },\n asChild: \"except-style\",\n children: ref && React.isValidElement(child) ? React.cloneElement(child, { ref }) : child\n }\n ),\n /* @__PURE__ */ jsxs(\n Tooltip.Content,\n {\n theme: \"Tooltip\",\n y: \"enter:-4px exit:-4px\",\n scale: \"1 enter:0.96 exit:0.96\",\n opacity: \"1 enter:0 exit:0\",\n pointerEvents: \"none\",\n paddingHorizontal: getVariableValue(getSpace(tooltipProps.size ?? true)),\n paddingVertical: Math.max(\n 0,\n Math.round(\n getVariableValue(getSize(tooltipProps.size ?? true)) * 0.36 - 9\n )\n ),\n borderRadius: getVariableValue(getRadius(tooltipProps.size ?? true)),\n boxShadow: \"0 2px 4px shadow-color\",\n transition: {\n preset: \"quicker\",\n properties: \"transform, opacity\",\n opacity: { preset: \"quicker\", spring: { overshootClamping: true } }\n },\n ...contentProps,\n children: [\n /* @__PURE__ */ jsx(\n Tooltip.Arrow,\n {\n size: tooltipProps.size ?? 7,\n backgroundColor: \"background\",\n borderColor: \"border-color\"\n }\n ),\n /* @__PURE__ */ jsx(\n Paragraph,\n {\n maxWidth: 350,\n overflow: \"hidden\",\n textAlign: \"center\",\n textWrap: \"web:balance\",\n size: \"3\",\n children: label\n }\n )\n ]\n }\n )\n ]\n }\n );\n }\n);\nexport {\n TooltipSimple\n};\n//# sourceMappingURL=TooltipSimple.js.map\n"],"mappings":";;;;;;;;AAMA,MAAM,gBAAgB,oBACnB,EAAE,OAAO,UAAU,cAAc,UAAU,GAAG,gBAAgB,QAAQ;CACrE;CACA,MAAM,QAAQ,MAAM,SAAS,KAAK,QAAQ;CAC1C,IAAI,CAAC,OAAO;EACV,OAAO;CACT;CACA,OAAuB,qBACrB,SACA;EACE,YAAY;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,GAAG;EACH,GAAG,WAAW,EAAE,MAAM,MAAM,IAAI;EAChC,UAAU,CACQ,oBACd,QAAQ,SACR;GACE,GAAG,OAAO,UAAU,YAAY,EAC9B,cAAc,MAChB;GACA,SAAS;GACT,UAAU,OAAO,MAAM,eAAe,KAAK,IAAI,MAAM,aAAa,OAAO,EAAE,IAAI,CAAC,IAAI;EACtF,CACF,GACgB,qBACd,QAAQ,SACR;GACE,OAAO;GACP,GAAG;GACH,OAAO;GACP,SAAS;GACT,eAAe;GACf,mBAAmB,iBAAiB,SAAS,aAAa,QAAQ,IAAI,CAAC;GACvE,iBAAiB,KAAK,IACpB,GACA,KAAK,MACH,iBAAiB,QAAQ,aAAa,QAAQ,IAAI,CAAC,IAAI,MAAO,CAChE,CACF;GACA,cAAc,iBAAiB,UAAU,aAAa,QAAQ,IAAI,CAAC;GACnE,WAAW;GACX,YAAY;IACV,QAAQ;IACR,YAAY;IACZ,SAAS;KAAE,QAAQ;KAAW,QAAQ,EAAE,mBAAmB,KAAK;IAAE;GACpE;GACA,GAAG;GACH,UAAU,CACQ,oBACd,QAAQ,OACR;IACE,MAAM,aAAa,QAAQ;IAC3B,iBAAiB;IACjB,aAAa;GACf,CACF,GACgB,oBACd,WACA;IACE,UAAU;IACV,UAAU;IACV,WAAW;IACX,UAAU;IACV,MAAM;IACN,UAAU;GACZ,CACF,CACF;EACF,CACF,CACF;CACF,CACF;AACF,CACF"}
1
+ {"version":3,"file":"TooltipSimple.js","names":[],"sources":["esm/TooltipSimple.js"],"sourcesContent":["import { createRefComponent } from \"@tamagui/core\";\nimport { resolveSize } from \"@tamagui/size\";\nimport { Paragraph } from \"@tamagui/text\";\nimport * as React from \"react\";\nimport { Tooltip } from \"./Tooltip\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst TooltipSimple = createRefComponent(\n ({ label, children, contentProps, disabled, ...tooltipProps }, ref) => {\n \"use no memo\";\n const child = React.Children.only(children);\n if (!label) {\n return children;\n }\n const { frame } = resolveSize(tooltipProps.size ?? true);\n return /* @__PURE__ */ jsxs(\n Tooltip,\n {\n disableRTL: true,\n offset: 15,\n restMs: 40,\n delay: 40,\n zIndex: 1e6,\n ...tooltipProps,\n ...disabled ? { open: false } : null,\n children: [\n /* @__PURE__ */ jsx(\n Tooltip.Trigger,\n {\n ...typeof label === \"string\" && {\n \"aria-label\": label\n },\n asChild: \"except-style\",\n children: ref && React.isValidElement(child) ? React.cloneElement(child, { ref }) : child\n }\n ),\n /* @__PURE__ */ jsxs(\n Tooltip.Content,\n {\n theme: \"brand\",\n y: \"enter:-4px exit:-4px\",\n scale: \"1 enter:0.96 exit:0.96\",\n opacity: \"1 enter:0 exit:0\",\n pointerEvents: \"none\",\n paddingHorizontal: \"2\",\n paddingVertical: \"1\",\n borderRadius: frame.borderRadius,\n boxShadow: \"0 2px 4px shadow-color\",\n transition: {\n preset: \"quicker\",\n properties: \"transform, opacity\",\n opacity: { preset: \"quicker\", spring: { overshootClamping: true } }\n },\n ...contentProps,\n children: [\n /* @__PURE__ */ jsx(\n Tooltip.Arrow,\n {\n size: tooltipProps.size ?? 7,\n backgroundColor: \"background\",\n borderColor: \"border-color\"\n }\n ),\n /* @__PURE__ */ jsx(\n Paragraph,\n {\n maxWidth: 350,\n overflow: \"hidden\",\n textAlign: \"center\",\n textWrap: \"web:balance\",\n size: \"3\",\n children: label\n }\n )\n ]\n }\n )\n ]\n }\n );\n }\n);\nexport {\n TooltipSimple\n};\n//# sourceMappingURL=TooltipSimple.js.map\n"],"mappings":";;;;;;;;AAMA,MAAM,gBAAgB,oBACnB,EAAE,OAAO,UAAU,cAAc,UAAU,GAAG,gBAAgB,QAAQ;CACrE;CACA,MAAM,QAAQ,MAAM,SAAS,KAAK,QAAQ;CAC1C,IAAI,CAAC,OAAO;EACV,OAAO;CACT;CACA,MAAM,EAAE,UAAU,YAAY,aAAa,QAAQ,IAAI;CACvD,OAAuB,qBACrB,SACA;EACE,YAAY;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,GAAG;EACH,GAAG,WAAW,EAAE,MAAM,MAAM,IAAI;EAChC,UAAU,CACQ,oBACd,QAAQ,SACR;GACE,GAAG,OAAO,UAAU,YAAY,EAC9B,cAAc,MAChB;GACA,SAAS;GACT,UAAU,OAAO,MAAM,eAAe,KAAK,IAAI,MAAM,aAAa,OAAO,EAAE,IAAI,CAAC,IAAI;EACtF,CACF,GACgB,qBACd,QAAQ,SACR;GACE,OAAO;GACP,GAAG;GACH,OAAO;GACP,SAAS;GACT,eAAe;GACf,mBAAmB;GACnB,iBAAiB;GACjB,cAAc,MAAM;GACpB,WAAW;GACX,YAAY;IACV,QAAQ;IACR,YAAY;IACZ,SAAS;KAAE,QAAQ;KAAW,QAAQ,EAAE,mBAAmB,KAAK;IAAE;GACpE;GACA,GAAG;GACH,UAAU,CACQ,oBACd,QAAQ,OACR;IACE,MAAM,aAAa,QAAQ;IAC3B,iBAAiB;IACjB,aAAa;GACf,CACF,GACgB,oBACd,WACA;IACE,UAAU;IACV,UAAU;IACV,WAAW;IACX,UAAU;IACV,MAAM;IACN,UAAU;GACZ,CACF,CACF;EACF,CACF,CACF;CACF,CACF;AACF,CACF"}
@@ -4,13 +4,12 @@ import { oneSizeSmaller } from "@tamagui/size";
4
4
  import { withStaticProperties } from "@tamagui/helpers";
5
5
  import { PopoverAnchor, PopoverArrow, PopoverContent, PopoverContextProvider, PopoverTrigger, useFloatingContext } from "@tamagui/popover";
6
6
  import { Popper, PopperContentFrame } from "@tamagui/popper";
7
- import { getElevation } from "@tamagui/stacks";
8
7
  import { useControllableState } from "@tamagui/use-controllable-state";
9
8
  import * as React from "react";
10
9
  import { jsx } from "react/jsx-runtime";
11
10
 
12
11
  const TOOLTIP_SCOPE = "";
13
- const TooltipContentFrame = styled(PopperContentFrame, { variants: { elevation: getElevation } });
12
+ const TooltipContentFrame = styled(PopperContentFrame, {});
14
13
  const ALWAYS_DISABLE_TOOLTIP = {
15
14
  focus: true,
16
15
  "remove-scroll": true
@@ -24,6 +23,8 @@ const TooltipContent = createStyledHOC(TooltipContentFrame, (props, ref) => {
24
23
  backgroundColor: "background",
25
24
  alignItems: "center",
26
25
  pointerEvents: "none",
26
+ paddingHorizontal: "2",
27
+ paddingVertical: "1",
27
28
  ...zIndexFromContext !== void 0 && { zIndex: zIndexFromContext },
28
29
  ...props,
29
30
  ...preventAnimation && { transition: null },
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","names":[],"sources":["jsx/Tooltip.js"],"sourcesContent":["import { createStyledHOC, createRefComponent, getConfig, styled } from \"@tamagui/core\";\n\nimport { FloatingDelayGroup, useDelayGroupContext } from \"@tamagui/floating\";\nimport { useEvent } from \"@tamagui/core\";\nimport { FloatingOverrideContext } from \"@tamagui/floating\";\nimport { oneSizeSmaller } from \"@tamagui/size\";\nimport { withStaticProperties } from \"@tamagui/helpers\";\nimport {\n PopoverAnchor,\n PopoverArrow,\n PopoverContent,\n PopoverContextProvider,\n PopoverTrigger,\n useFloatingContext\n} from \"@tamagui/popover\";\nimport { Popper, PopperContentFrame } from \"@tamagui/popper\";\nimport { getElevation } from \"@tamagui/stacks\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nconst TOOLTIP_SCOPE = \"\";\nconst TooltipContentFrame = styled(PopperContentFrame, {\n variants: {\n elevation: getElevation\n }\n});\nconst ALWAYS_DISABLE_TOOLTIP = {\n focus: true,\n \"remove-scroll\": true\n // it's nice to hit escape to hide a tooltip\n // dismiss: true\n};\nconst TooltipContent = createStyledHOC(\n TooltipContentFrame,\n (props, ref) => {\n const preventAnimation = React.useContext(PreventTooltipAnimationContext);\n const zIndexFromContext = React.useContext(TooltipZIndexContext);\n return /* @__PURE__ */ jsx(\n PopoverContent,\n {\n scope: props.scope || TOOLTIP_SCOPE,\n alwaysDisable: ALWAYS_DISABLE_TOOLTIP,\n backgroundColor: \"background\",\n alignItems: \"center\",\n pointerEvents: \"none\",\n ...zIndexFromContext !== void 0 && { zIndex: zIndexFromContext },\n ...props,\n ...preventAnimation && { transition: null },\n ref\n }\n );\n },\n {\n displayName: \"Tooltip\"\n }\n);\nconst TooltipArrow = createRefComponent(\n (props, ref) => {\n const { className, ...rest } = props;\n return /* @__PURE__ */ jsx(\n PopoverArrow,\n {\n scope: props.scope || TOOLTIP_SCOPE,\n className: `is_Tooltip ${className || \"\"}`.trim(),\n ref,\n ...rest\n }\n );\n }\n);\nconst PreventTooltipAnimationContext = React.createContext(false);\nconst TooltipZIndexContext = React.createContext(void 0);\nconst TooltipGroup = ({\n children,\n delay,\n preventAnimation = false,\n timeoutMs\n}) => {\n return /* @__PURE__ */ jsx(PreventTooltipAnimationContext.Provider, { value: preventAnimation, children: /* @__PURE__ */ jsx(\n FloatingDelayGroup,\n {\n timeoutMs,\n delay: React.useMemo(() => delay, [JSON.stringify(delay)]),\n children\n }\n ) });\n};\nconst setOpens = /* @__PURE__ */ new Set();\nconst closeOpenTooltips = () => {\n setOpens.forEach((x) => x(false));\n};\nconst TooltipComponent = createRefComponent(function Tooltip(props, ref) {\n \"use no memo\";\n const {\n children,\n delay: delayProp,\n restMs: restMsProp,\n onOpenChange: onOpenChangeProp,\n focus,\n open: openProp,\n disableAutoCloseOnScroll,\n zIndex,\n scope = TOOLTIP_SCOPE,\n ...restProps\n } = props;\n const triggerRef = React.useRef(null);\n const closeReasonRef = React.useRef(void 0);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const { delay: delayGroup, setCurrentId } = useDelayGroupContext();\n const delay = delayProp !== void 0 ? delayProp : delayGroup ?? 400;\n const restMs = restMsProp ?? (typeof delay === \"number\" ? delay : 0);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: false,\n onChange: onOpenChangeProp\n });\n const id = props.groupId;\n const onOpenChange = useEvent((open2) => {\n if (open2) {\n setCurrentId(id);\n }\n setOpen(open2);\n });\n React.useEffect(() => {\n if (!open) return;\n if (disableAutoCloseOnScroll) return;\n if (typeof document === \"undefined\") return;\n const closeIt = () => {\n setOpen(false);\n };\n setOpens.add(setOpen);\n document.documentElement.addEventListener(\"scroll\", closeIt);\n return () => {\n setOpens.delete(setOpen);\n document.documentElement.removeEventListener(\"scroll\", closeIt);\n };\n }, [open, disableAutoCloseOnScroll]);\n const floatingContext = useFloatingContext({\n open,\n setOpen: onOpenChange,\n closeReasonRef,\n disable: false,\n disableFocus: false,\n hoverable: true,\n role: \"tooltip\",\n focus,\n groupId: id,\n delay,\n restMs\n });\n const onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), []);\n const onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(false), []);\n const contentId = React.useId();\n const smallerSize = oneSizeSmaller(true, getConfig().sizes);\n const content = /* @__PURE__ */ jsx(FloatingOverrideContext.Provider, { value: floatingContext, children: /* @__PURE__ */ jsx(\n Popper,\n {\n scope,\n size: smallerSize,\n allowFlip: true,\n stayInFrame: true,\n open,\n ...restProps,\n children: /* @__PURE__ */ jsx(\n PopoverContextProvider,\n {\n scope,\n contentId,\n triggerRef,\n open,\n onOpenChange: setOpen,\n closeReasonRef,\n onOpenToggle: voidFn,\n hasCustomAnchor,\n onCustomAnchorAdd,\n onCustomAnchorRemove,\n children\n }\n )\n }\n ) });\n if (zIndex !== void 0) {\n return /* @__PURE__ */ jsx(TooltipZIndexContext.Provider, { value: zIndex, children: content });\n }\n return content;\n});\nconst TooltipTrigger = createRefComponent(function TooltipTrigger2(props, ref) {\n const { scope, ...rest } = props;\n return /* @__PURE__ */ jsx(PopoverTrigger, { ...rest, scope: scope || TOOLTIP_SCOPE, ref });\n});\nconst TooltipAnchor = createRefComponent(function TooltipAnchor2(props, ref) {\n const { scope, ...rest } = props;\n return /* @__PURE__ */ jsx(PopoverAnchor, { ...rest, scope: scope || TOOLTIP_SCOPE, ref });\n});\nconst Tooltip2 = withStaticProperties(TooltipComponent, {\n Anchor: TooltipAnchor,\n Arrow: TooltipArrow,\n Content: TooltipContent,\n Trigger: TooltipTrigger\n});\nconst voidFn = () => {\n};\nexport {\n Tooltip2 as Tooltip,\n TooltipGroup,\n closeOpenTooltips\n};\n//# sourceMappingURL=Tooltip.js.map\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAM,gBAAgB;AACtB,MAAM,sBAAsB,OAAO,oBAAoB,EACrD,UAAU,EACR,WAAW,aACb,EACF,CAAC;AACD,MAAM,yBAAyB;CAC7B,OAAO;CACP,iBAAiB;AAGnB;AACA,MAAM,iBAAiB,gBACrB,sBACC,OAAO,QAAQ;CACd,MAAM,mBAAmB,MAAM,WAAW,8BAA8B;CACxE,MAAM,oBAAoB,MAAM,WAAW,oBAAoB;CAC/D,OAAuB,oBACrB,gBACA;EACE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AqB,UAAU;GAAE,OAAO;GAAQ,UAAU;EAAQ,CAAC;CAChG;CACA,OAAO;AACT,CAAC;AACD,MAAM,iBAAiB,mBAAmB,SAAS,gBAAgB,OAAO,KAAK;CAC7E,MAAM,EAAE,OAAO,GAAG,SAAS;CAC3B,OAAuB,oBAAI,gBAAgB;EAAE,GAAG;EAAM,OAAO,SAAS;EAAe;CAAI,CAAC;AAC5F,CAAC;AACD,MAAM,gBAAgB,mBAAmB,SAAS,eAAe,OAAO,KAAK;CAC3E,MAAM,EAAE,OAAO,GAAG,SAAS;CAC3B,OAAuB,oBAAI,eAAe;EAAE,GAAG;EAAM,OAAO,SAAS;EAAe;CAAI,CAAC;AAC3F,CAAC;AACD,MAAM,WAAW,qBAAqB,kBAAkB;CACtD,QAAQ;CACR,OAAO;CACP,SAAS;CACT,SAAS;AACX,CAAC;AACD,MAAM,eAAe,CACrB"}
1
+ {"version":3,"file":"Tooltip.js","names":[],"sources":["jsx/Tooltip.js"],"sourcesContent":["import { createStyledHOC, createRefComponent, getConfig, styled } from \"@tamagui/core\";\n\nimport { FloatingDelayGroup, useDelayGroupContext } from \"@tamagui/floating\";\nimport { useEvent } from \"@tamagui/core\";\nimport { FloatingOverrideContext } from \"@tamagui/floating\";\nimport { oneSizeSmaller } from \"@tamagui/size\";\nimport { withStaticProperties } from \"@tamagui/helpers\";\nimport {\n PopoverAnchor,\n PopoverArrow,\n PopoverContent,\n PopoverContextProvider,\n PopoverTrigger,\n useFloatingContext\n} from \"@tamagui/popover\";\nimport { Popper, PopperContentFrame } from \"@tamagui/popper\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nconst TOOLTIP_SCOPE = \"\";\nconst TooltipContentFrame = styled(PopperContentFrame, {});\nconst ALWAYS_DISABLE_TOOLTIP = {\n focus: true,\n \"remove-scroll\": true\n // it's nice to hit escape to hide a tooltip\n // dismiss: true\n};\nconst TooltipContent = createStyledHOC(\n TooltipContentFrame,\n (props, ref) => {\n const preventAnimation = React.useContext(PreventTooltipAnimationContext);\n const zIndexFromContext = React.useContext(TooltipZIndexContext);\n return /* @__PURE__ */ jsx(\n PopoverContent,\n {\n scope: props.scope || TOOLTIP_SCOPE,\n alwaysDisable: ALWAYS_DISABLE_TOOLTIP,\n backgroundColor: \"background\",\n alignItems: \"center\",\n pointerEvents: \"none\",\n paddingHorizontal: \"2\",\n paddingVertical: \"1\",\n ...zIndexFromContext !== void 0 && { zIndex: zIndexFromContext },\n ...props,\n ...preventAnimation && { transition: null },\n ref\n }\n );\n },\n {\n displayName: \"Tooltip\"\n }\n);\nconst TooltipArrow = createRefComponent(\n (props, ref) => {\n const { className, ...rest } = props;\n return /* @__PURE__ */ jsx(\n PopoverArrow,\n {\n scope: props.scope || TOOLTIP_SCOPE,\n className: `is_Tooltip ${className || \"\"}`.trim(),\n ref,\n ...rest\n }\n );\n }\n);\nconst PreventTooltipAnimationContext = React.createContext(false);\nconst TooltipZIndexContext = React.createContext(void 0);\nconst TooltipGroup = ({\n children,\n delay,\n preventAnimation = false,\n timeoutMs\n}) => {\n return /* @__PURE__ */ jsx(PreventTooltipAnimationContext.Provider, { value: preventAnimation, children: /* @__PURE__ */ jsx(\n FloatingDelayGroup,\n {\n timeoutMs,\n delay: React.useMemo(() => delay, [JSON.stringify(delay)]),\n children\n }\n ) });\n};\nconst setOpens = /* @__PURE__ */ new Set();\nconst closeOpenTooltips = () => {\n setOpens.forEach((x) => x(false));\n};\nconst TooltipComponent = createRefComponent(function Tooltip(props, ref) {\n \"use no memo\";\n const {\n children,\n delay: delayProp,\n restMs: restMsProp,\n onOpenChange: onOpenChangeProp,\n focus,\n open: openProp,\n disableAutoCloseOnScroll,\n zIndex,\n scope = TOOLTIP_SCOPE,\n ...restProps\n } = props;\n const triggerRef = React.useRef(null);\n const closeReasonRef = React.useRef(void 0);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const { delay: delayGroup, setCurrentId } = useDelayGroupContext();\n const delay = delayProp !== void 0 ? delayProp : delayGroup ?? 400;\n const restMs = restMsProp ?? (typeof delay === \"number\" ? delay : 0);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: false,\n onChange: onOpenChangeProp\n });\n const id = props.groupId;\n const onOpenChange = useEvent((open2) => {\n if (open2) {\n setCurrentId(id);\n }\n setOpen(open2);\n });\n React.useEffect(() => {\n if (!open) return;\n if (disableAutoCloseOnScroll) return;\n if (typeof document === \"undefined\") return;\n const closeIt = () => {\n setOpen(false);\n };\n setOpens.add(setOpen);\n document.documentElement.addEventListener(\"scroll\", closeIt);\n return () => {\n setOpens.delete(setOpen);\n document.documentElement.removeEventListener(\"scroll\", closeIt);\n };\n }, [open, disableAutoCloseOnScroll]);\n const floatingContext = useFloatingContext({\n open,\n setOpen: onOpenChange,\n closeReasonRef,\n disable: false,\n disableFocus: false,\n hoverable: true,\n role: \"tooltip\",\n focus,\n groupId: id,\n delay,\n restMs\n });\n const onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), []);\n const onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(false), []);\n const contentId = React.useId();\n const smallerSize = oneSizeSmaller(true, getConfig().sizes);\n const content = /* @__PURE__ */ jsx(FloatingOverrideContext.Provider, { value: floatingContext, children: /* @__PURE__ */ jsx(\n Popper,\n {\n scope,\n size: smallerSize,\n allowFlip: true,\n stayInFrame: true,\n open,\n ...restProps,\n children: /* @__PURE__ */ jsx(\n PopoverContextProvider,\n {\n scope,\n contentId,\n triggerRef,\n open,\n onOpenChange: setOpen,\n closeReasonRef,\n onOpenToggle: voidFn,\n hasCustomAnchor,\n onCustomAnchorAdd,\n onCustomAnchorRemove,\n children\n }\n )\n }\n ) });\n if (zIndex !== void 0) {\n return /* @__PURE__ */ jsx(TooltipZIndexContext.Provider, { value: zIndex, children: content });\n }\n return content;\n});\nconst TooltipTrigger = createRefComponent(function TooltipTrigger2(props, ref) {\n const { scope, ...rest } = props;\n return /* @__PURE__ */ jsx(PopoverTrigger, { ...rest, scope: scope || TOOLTIP_SCOPE, ref });\n});\nconst TooltipAnchor = createRefComponent(function TooltipAnchor2(props, ref) {\n const { scope, ...rest } = props;\n return /* @__PURE__ */ jsx(PopoverAnchor, { ...rest, scope: scope || TOOLTIP_SCOPE, ref });\n});\nconst Tooltip2 = withStaticProperties(TooltipComponent, {\n Anchor: TooltipAnchor,\n Arrow: TooltipArrow,\n Content: TooltipContent,\n Trigger: TooltipTrigger\n});\nconst voidFn = () => {\n};\nexport {\n Tooltip2 as Tooltip,\n TooltipGroup,\n closeOpenTooltips\n};\n//# sourceMappingURL=Tooltip.js.map\n"],"mappings":";;;;;;;;;;;AAmBA,MAAM,gBAAgB;AACtB,MAAM,sBAAsB,OAAO,oBAAoB,CAAC,CAAC;AACzD,MAAM,yBAAyB;CAC7B,OAAO;CACP,iBAAiB;AAGnB;AACA,MAAM,iBAAiB,gBACrB,sBACC,OAAO,QAAQ;CACd,MAAM,mBAAmB,MAAM,WAAW,8BAA8B;CACxE,MAAM,oBAAoB,MAAM,WAAW,oBAAoB;CAC/D,OAAuB,oBACrB,gBACA;EACE,OAAO,MAAM,SAAS;EACtB,eAAe;EACf,iBAAiB;EACjB,YAAY;EACZ,eAAe;EACf,mBAAmB;EACnB,iBAAiB;EACjB,GAAG,sBAAsB,KAAK,KAAK,EAAE,QAAQ,kBAAkB;EAC/D,GAAG;EACH,GAAG,oBAAoB,EAAE,YAAY,KAAK;EAC1C;CACF,CACF;AACF,GACA,EACE,aAAa,UACf,CACF;AACA,MAAM,eAAe,oBAClB,OAAO,QAAQ;CACd,MAAM,EAAE,WAAW,GAAG,SAAS;CAC/B,OAAuB,oBACrB,cACA;EACE,OAAO,MAAM,SAAS;EACtB,WAAW,cAAc,aAAa,KAAK,KAAK;EAChD;EACA,GAAG;CACL,CACF;AACF,CACF;AACA,MAAM,iCAAiC,MAAM,cAAc,KAAK;AAChE,MAAM,uBAAuB,MAAM,cAAc,KAAK,CAAC;A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CACP,SAAS;CACT,SAAS;AACX,CAAC;AACD,MAAM,eAAe,CACrB"}
@@ -1,5 +1,5 @@
1
- import { createRefComponent, getVariableValue } from "@tamagui/core";
2
- import { getRadius, getSize, getSpace } from "@tamagui/get-token";
1
+ import { createRefComponent } from "@tamagui/core";
2
+ import { resolveSize } from "@tamagui/size";
3
3
  import { Paragraph } from "@tamagui/text";
4
4
  import * as React from "react";
5
5
  import { Tooltip } from "./Tooltip.mjs";
@@ -11,6 +11,7 @@ const TooltipSimple = createRefComponent(({ label, children, contentProps, disab
11
11
  if (!label) {
12
12
  return children;
13
13
  }
14
+ const { frame } = resolveSize(tooltipProps.size ?? true);
14
15
  return /* @__PURE__ */ jsxs(Tooltip, {
15
16
  disableRTL: true,
16
17
  offset: 15,
@@ -24,14 +25,14 @@ const TooltipSimple = createRefComponent(({ label, children, contentProps, disab
24
25
  asChild: "except-style",
25
26
  children: ref && React.isValidElement(child) ? React.cloneElement(child, { ref }) : child
26
27
  }), /* @__PURE__ */ jsxs(Tooltip.Content, {
27
- theme: "Tooltip",
28
+ theme: "brand",
28
29
  y: "enter:-4px exit:-4px",
29
30
  scale: "1 enter:0.96 exit:0.96",
30
31
  opacity: "1 enter:0 exit:0",
31
32
  pointerEvents: "none",
32
- paddingHorizontal: getVariableValue(getSpace(tooltipProps.size ?? true)),
33
- paddingVertical: Math.max(0, Math.round(getVariableValue(getSize(tooltipProps.size ?? true)) * .36 - 9)),
34
- borderRadius: getVariableValue(getRadius(tooltipProps.size ?? true)),
33
+ paddingHorizontal: "2",
34
+ paddingVertical: "1",
35
+ borderRadius: frame.borderRadius,
35
36
  boxShadow: "0 2px 4px shadow-color",
36
37
  transition: {
37
38
  preset: "quicker",
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipSimple.js","names":[],"sources":["jsx/TooltipSimple.js"],"sourcesContent":["import { createRefComponent, getVariableValue } from \"@tamagui/core\";\nimport { getRadius, getSize, getSpace } from \"@tamagui/get-token\";\nimport { Paragraph } from \"@tamagui/text\";\nimport * as React from \"react\";\nimport { Tooltip } from \"./Tooltip\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst TooltipSimple = createRefComponent(\n ({ label, children, contentProps, disabled, ...tooltipProps }, ref) => {\n \"use no memo\";\n const child = React.Children.only(children);\n if (!label) {\n return children;\n }\n return /* @__PURE__ */ jsxs(\n Tooltip,\n {\n disableRTL: true,\n offset: 15,\n restMs: 40,\n delay: 40,\n zIndex: 1e6,\n ...tooltipProps,\n ...disabled ? { open: false } : null,\n children: [\n /* @__PURE__ */ jsx(\n Tooltip.Trigger,\n {\n ...typeof label === \"string\" && {\n \"aria-label\": label\n },\n asChild: \"except-style\",\n children: ref && React.isValidElement(child) ? React.cloneElement(child, { ref }) : child\n }\n ),\n /* @__PURE__ */ jsxs(\n Tooltip.Content,\n {\n theme: \"Tooltip\",\n y: \"enter:-4px exit:-4px\",\n scale: \"1 enter:0.96 exit:0.96\",\n opacity: \"1 enter:0 exit:0\",\n pointerEvents: \"none\",\n paddingHorizontal: getVariableValue(getSpace(tooltipProps.size ?? true)),\n paddingVertical: Math.max(\n 0,\n Math.round(\n getVariableValue(getSize(tooltipProps.size ?? true)) * 0.36 - 9\n )\n ),\n borderRadius: getVariableValue(getRadius(tooltipProps.size ?? true)),\n boxShadow: \"0 2px 4px shadow-color\",\n transition: {\n preset: \"quicker\",\n properties: \"transform, opacity\",\n opacity: { preset: \"quicker\", spring: { overshootClamping: true } }\n },\n ...contentProps,\n children: [\n /* @__PURE__ */ jsx(\n Tooltip.Arrow,\n {\n size: tooltipProps.size ?? 7,\n backgroundColor: \"background\",\n borderColor: \"border-color\"\n }\n ),\n /* @__PURE__ */ jsx(\n Paragraph,\n {\n maxWidth: 350,\n overflow: \"hidden\",\n textAlign: \"center\",\n textWrap: \"web:balance\",\n size: \"3\",\n children: label\n }\n )\n ]\n }\n )\n ]\n }\n );\n }\n);\nexport {\n TooltipSimple\n};\n//# sourceMappingURL=TooltipSimple.js.map\n"],"mappings":";;;;;;;;AAMA,MAAM,gBAAgB,oBACnB,EAAE,OAAO,UAAU,cAAc,UAAU,GAAG,gBAAgB,QAAQ;CACrE;CACA,MAAM,QAAQ,MAAM,SAAS,KAAK,QAAQ;CAC1C,IAAI,CAAC,OAAO;EACV,OAAO;CACT;CACA,OAAuB,qBACrB,SACA;EACE,YAAY;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,GAAG;EACH,GAAG,WAAW,EAAE,MAAM,MAAM,IAAI;EAChC,UAAU,CACQ,oBACd,QAAQ,SACR;GACE,GAAG,OAAO,UAAU,YAAY,EAC9B,cAAc,MAChB;GACA,SAAS;GACT,UAAU,OAAO,MAAM,eAAe,KAAK,IAAI,MAAM,aAAa,OAAO,EAAE,IAAI,CAAC,IAAI;EACtF,CACF,GACgB,qBACd,QAAQ,SACR;GACE,OAAO;GACP,GAAG;GACH,OAAO;GACP,SAAS;GACT,eAAe;GACf,mBAAmB,iBAAiB,SAAS,aAAa,QAAQ,IAAI,CAAC;GACvE,iBAAiB,KAAK,IACpB,GACA,KAAK,MACH,iBAAiB,QAAQ,aAAa,QAAQ,IAAI,CAAC,IAAI,MAAO,CAChE,CACF;GACA,cAAc,iBAAiB,UAAU,aAAa,QAAQ,IAAI,CAAC;GACnE,WAAW;GACX,YAAY;IACV,QAAQ;IACR,YAAY;IACZ,SAAS;KAAE,QAAQ;KAAW,QAAQ,EAAE,mBAAmB,KAAK;IAAE;GACpE;GACA,GAAG;GACH,UAAU,CACQ,oBACd,QAAQ,OACR;IACE,MAAM,aAAa,QAAQ;IAC3B,iBAAiB;IACjB,aAAa;GACf,CACF,GACgB,oBACd,WACA;IACE,UAAU;IACV,UAAU;IACV,WAAW;IACX,UAAU;IACV,MAAM;IACN,UAAU;GACZ,CACF,CACF;EACF,CACF,CACF;CACF,CACF;AACF,CACF"}
1
+ {"version":3,"file":"TooltipSimple.js","names":[],"sources":["jsx/TooltipSimple.js"],"sourcesContent":["import { createRefComponent } from \"@tamagui/core\";\nimport { resolveSize } from \"@tamagui/size\";\nimport { Paragraph } from \"@tamagui/text\";\nimport * as React from \"react\";\nimport { Tooltip } from \"./Tooltip\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst TooltipSimple = createRefComponent(\n ({ label, children, contentProps, disabled, ...tooltipProps }, ref) => {\n \"use no memo\";\n const child = React.Children.only(children);\n if (!label) {\n return children;\n }\n const { frame } = resolveSize(tooltipProps.size ?? true);\n return /* @__PURE__ */ jsxs(\n Tooltip,\n {\n disableRTL: true,\n offset: 15,\n restMs: 40,\n delay: 40,\n zIndex: 1e6,\n ...tooltipProps,\n ...disabled ? { open: false } : null,\n children: [\n /* @__PURE__ */ jsx(\n Tooltip.Trigger,\n {\n ...typeof label === \"string\" && {\n \"aria-label\": label\n },\n asChild: \"except-style\",\n children: ref && React.isValidElement(child) ? React.cloneElement(child, { ref }) : child\n }\n ),\n /* @__PURE__ */ jsxs(\n Tooltip.Content,\n {\n theme: \"brand\",\n y: \"enter:-4px exit:-4px\",\n scale: \"1 enter:0.96 exit:0.96\",\n opacity: \"1 enter:0 exit:0\",\n pointerEvents: \"none\",\n paddingHorizontal: \"2\",\n paddingVertical: \"1\",\n borderRadius: frame.borderRadius,\n boxShadow: \"0 2px 4px shadow-color\",\n transition: {\n preset: \"quicker\",\n properties: \"transform, opacity\",\n opacity: { preset: \"quicker\", spring: { overshootClamping: true } }\n },\n ...contentProps,\n children: [\n /* @__PURE__ */ jsx(\n Tooltip.Arrow,\n {\n size: tooltipProps.size ?? 7,\n backgroundColor: \"background\",\n borderColor: \"border-color\"\n }\n ),\n /* @__PURE__ */ jsx(\n Paragraph,\n {\n maxWidth: 350,\n overflow: \"hidden\",\n textAlign: \"center\",\n textWrap: \"web:balance\",\n size: \"3\",\n children: label\n }\n )\n ]\n }\n )\n ]\n }\n );\n }\n);\nexport {\n TooltipSimple\n};\n//# sourceMappingURL=TooltipSimple.js.map\n"],"mappings":";;;;;;;;AAMA,MAAM,gBAAgB,oBACnB,EAAE,OAAO,UAAU,cAAc,UAAU,GAAG,gBAAgB,QAAQ;CACrE;CACA,MAAM,QAAQ,MAAM,SAAS,KAAK,QAAQ;CAC1C,IAAI,CAAC,OAAO;EACV,OAAO;CACT;CACA,MAAM,EAAE,UAAU,YAAY,aAAa,QAAQ,IAAI;CACvD,OAAuB,qBACrB,SACA;EACE,YAAY;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,GAAG;EACH,GAAG,WAAW,EAAE,MAAM,MAAM,IAAI;EAChC,UAAU,CACQ,oBACd,QAAQ,SACR;GACE,GAAG,OAAO,UAAU,YAAY,EAC9B,cAAc,MAChB;GACA,SAAS;GACT,UAAU,OAAO,MAAM,eAAe,KAAK,IAAI,MAAM,aAAa,OAAO,EAAE,IAAI,CAAC,IAAI;EACtF,CACF,GACgB,qBACd,QAAQ,SACR;GACE,OAAO;GACP,GAAG;GACH,OAAO;GACP,SAAS;GACT,eAAe;GACf,mBAAmB;GACnB,iBAAiB;GACjB,cAAc,MAAM;GACpB,WAAW;GACX,YAAY;IACV,QAAQ;IACR,YAAY;IACZ,SAAS;KAAE,QAAQ;KAAW,QAAQ,EAAE,mBAAmB,KAAK;IAAE;GACpE;GACA,GAAG;GACH,UAAU,CACQ,oBACd,QAAQ,OACR;IACE,MAAM,aAAa,QAAQ;IAC3B,iBAAiB;IACjB,aAAa;GACf,CACF,GACgB,oBACd,WACA;IACE,UAAU;IACV,UAAU;IACV,WAAW;IACX,UAAU;IACV,MAAM;IACN,UAAU;GACZ,CACF,CACF;EACF,CACF,CACF;CACF,CACF;AACF,CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/tooltip",
3
- "version": "3.0.0-beta.1216.1",
3
+ "version": "3.0.0-beta.1310.1",
4
4
  "license": "MIT",
5
5
  "source": "src/index.tsx",
6
6
  "files": [
@@ -35,22 +35,21 @@
35
35
  "clean:build": "tamagui-build clean:build"
36
36
  },
37
37
  "dependencies": {
38
- "@tamagui/compose-refs": "3.0.0-beta.1216.1",
39
- "@tamagui/core": "3.0.0-beta.1216.1",
40
- "@tamagui/create-context": "3.0.0-beta.1216.1",
41
- "@tamagui/floating": "3.0.0-beta.1216.1",
42
- "@tamagui/get-token": "3.0.0-beta.1216.1",
43
- "@tamagui/helpers": "3.0.0-beta.1216.1",
44
- "@tamagui/polyfill-dev": "3.0.0-beta.1216.1",
45
- "@tamagui/popover": "3.0.0-beta.1216.1",
46
- "@tamagui/popper": "3.0.0-beta.1216.1",
47
- "@tamagui/size": "3.0.0-beta.1216.1",
48
- "@tamagui/stacks": "3.0.0-beta.1216.1",
49
- "@tamagui/text": "3.0.0-beta.1216.1",
50
- "@tamagui/use-controllable-state": "3.0.0-beta.1216.1"
38
+ "@tamagui/compose-refs": "3.0.0-beta.1310.1",
39
+ "@tamagui/core": "3.0.0-beta.1310.1",
40
+ "@tamagui/create-context": "3.0.0-beta.1310.1",
41
+ "@tamagui/floating": "3.0.0-beta.1310.1",
42
+ "@tamagui/helpers": "3.0.0-beta.1310.1",
43
+ "@tamagui/polyfill-dev": "3.0.0-beta.1310.1",
44
+ "@tamagui/popover": "3.0.0-beta.1310.1",
45
+ "@tamagui/popper": "3.0.0-beta.1310.1",
46
+ "@tamagui/size": "3.0.0-beta.1310.1",
47
+ "@tamagui/stacks": "3.0.0-beta.1310.1",
48
+ "@tamagui/text": "3.0.0-beta.1310.1",
49
+ "@tamagui/use-controllable-state": "3.0.0-beta.1310.1"
51
50
  },
52
51
  "devDependencies": {
53
- "@tamagui/build": "3.0.0-beta.1216.1",
52
+ "@tamagui/build": "3.0.0-beta.1310.1",
54
53
  "react": "19.2.3",
55
54
  "react-native": "0.86.2"
56
55
  },
package/src/Tooltip.tsx CHANGED
@@ -23,7 +23,6 @@ import {
23
23
  } from '@tamagui/popover'
24
24
  import type { PopperArrowProps, PopperProps } from '@tamagui/popper'
25
25
  import { Popper, PopperContentFrame } from '@tamagui/popper'
26
- import { getElevation } from '@tamagui/stacks'
27
26
  import { useControllableState } from '@tamagui/use-controllable-state'
28
27
  import * as React from 'react'
29
28
 
@@ -35,11 +34,7 @@ type ScopedProps<P> = Omit<P, 'scope'> & { scope?: TooltipScopes }
35
34
 
36
35
  export type TooltipContentProps = ScopedProps<PopoverContentProps>
37
36
 
38
- const TooltipContentFrame = styled(PopperContentFrame, {
39
- variants: {
40
- elevation: getElevation,
41
- } as const,
42
- })
37
+ const TooltipContentFrame = styled(PopperContentFrame, {})
43
38
 
44
39
  // warning: setting to createStyledHOC causes issues with themes across portal roots
45
40
 
@@ -64,6 +59,8 @@ const TooltipContent = createStyledHOC(
64
59
  backgroundColor="background"
65
60
  alignItems="center"
66
61
  pointerEvents="none"
62
+ paddingHorizontal="2"
63
+ paddingVertical="1"
67
64
  {...(zIndexFromContext !== undefined && { zIndex: zIndexFromContext })}
68
65
  {...props}
69
66
  {...(preventAnimation && { transition: null })}
@@ -1,5 +1,5 @@
1
- import { createRefComponent, getVariableValue } from '@tamagui/core'
2
- import { getRadius, getSize, getSpace } from '@tamagui/get-token'
1
+ import { createRefComponent } from '@tamagui/core'
2
+ import { resolveSize } from '@tamagui/size'
3
3
  import type { YStackProps } from '@tamagui/stacks'
4
4
  import { Paragraph } from '@tamagui/text'
5
5
  import * as React from 'react'
@@ -24,6 +24,8 @@ export const TooltipSimple: React.FC<TooltipSimpleProps> = createRefComponent(
24
24
  return children
25
25
  }
26
26
 
27
+ const { frame } = resolveSize(tooltipProps.size ?? true)
28
+
27
29
  return (
28
30
  <Tooltip
29
31
  disableRTL
@@ -47,19 +49,14 @@ export const TooltipSimple: React.FC<TooltipSimpleProps> = createRefComponent(
47
49
  </Tooltip.Trigger>
48
50
 
49
51
  <Tooltip.Content
50
- theme="Tooltip"
52
+ theme="brand"
51
53
  y="enter:-4px exit:-4px"
52
54
  scale="1 enter:0.96 exit:0.96"
53
55
  opacity="1 enter:0 exit:0"
54
56
  pointerEvents="none"
55
- paddingHorizontal={getVariableValue(getSpace(tooltipProps.size ?? true))}
56
- paddingVertical={Math.max(
57
- 0,
58
- Math.round(
59
- (getVariableValue(getSize(tooltipProps.size ?? true)) as number) * 0.36 - 9
60
- )
61
- )}
62
- borderRadius={getVariableValue(getRadius(tooltipProps.size ?? true))}
57
+ paddingHorizontal="2"
58
+ paddingVertical="1"
59
+ borderRadius={frame.borderRadius}
63
60
  boxShadow="0 2px 4px shadow-color"
64
61
  transition={{
65
62
  preset: 'quicker',
@@ -65,15 +65,11 @@ export declare const Tooltip: ((props: Omit<PopperProps & {
65
65
  } & {
66
66
  Anchor: import("@tamagui/core").RefComponent<unknown, ScopedProps<PopoverAnchorProps>>;
67
67
  Arrow: import("@tamagui/core").RefComponent<TamaguiElement, PopperArrowProps>;
68
- Content: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
69
- elevation?: number | false | import("@tamagui/core").Size | undefined;
70
- }>, "accessibilityActions" | "accessibilityElementsHidden" | "accessibilityHint" | "accessibilityIgnoresInvertColors" | "accessibilityLabel" | "accessibilityLabelledBy" | "accessibilityLanguage" | "accessibilityLargeContentTitle" | "accessibilityLiveRegion" | "accessibilityRespondsToUserInteraction" | "accessibilityRole" | "accessibilityShowsLargeContentViewer" | "accessibilityState" | "accessibilityValue" | "accessibilityViewIsModal" | "accessible" | "alignContent" | "alignItems" | "alignSelf" | "alwaysDisable" | "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" | "borderBlock" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottomColor" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderBottomWidth" | "borderColor" | "borderCurve" | "borderEndColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderEndWidth" | "borderImage" | "borderInline" | "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" | "bottom" | "boxShadow" | "boxSizing" | "branches" | "caretColor" | "children" | "className" | "clipPath" | "collapsable" | "collapsableChildren" | "color" | "columnGap" | "contain" | "container" | "containerName" | "containerType" | "cursor" | "dangerouslySetInnerHTML" | "debug" | "direction" | "disableClassName" | "disableFocusScope" | "disableNativeStyle" | "disableOptimization" | "disabled" | "display" | "enableRemoveScroll" | "end" | "experimental_backgroundImage" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "experimental_backgroundSize" | "filter" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "forceMount" | "forceStyle" | "forceUnmount" | "freezeContentsWhenHidden" | "gap" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "group" | "hasTVPreferredFocus" | "height" | "hitSlop" | "htmlFor" | "id" | "importantForAccessibility" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isTVSelectable" | "isolation" | "justifyContent" | "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" | "name" | "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" | "onLongPress" | "onMagicTap" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseOut" | "onMouseOver" | "onMouseUp" | "onOpenAutoFocus" | "onPaste" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerDownOutside" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPress" | "onPressIn" | "onPressOut" | "onScroll" | "onTouchCancel" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchStart" | "onTransition" | "onWheel" | "opacity" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowBlock" | "overflowInline" | "overflowWrap" | "overflowX" | "overflowY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingEnd" | "paddingHorizontal" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingStart" | "paddingTop" | "paddingVertical" | "passThrough" | "perspective" | "pointerEvents" | "position" | "removeClippedSubviews" | "render" | "renderToHardwareTextureAndroid" | "resize" | "right" | "role" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "rotation" | "rowGap" | "scale" | "scaleX" | "scaleY" | "scope" | "screenReaderFocusable" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "shouldRasterizeIOS" | "skewX" | "skewY" | "start" | "style" | "tabIndex" | "target" | "testID" | "textEmphasis" | "textWrap" | "theme" | "themeShallow" | "top" | "transform" | "transformMatrix" | "transformOrigin" | "transformStyle" | "transition" | "translateX" | "translateY" | "trapFocus" | "tvParallaxMagnification" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "untilMeasured" | "userSelect" | "verticalAlign" | "visibility" | "width" | "wordWrap" | "x" | "y" | "zIndex"> & Omit<import("@tamagui/popover").PopoverContentTypeProps, "scope"> & {
68
+ Content: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {}>, "accessibilityActions" | "accessibilityElementsHidden" | "accessibilityHint" | "accessibilityIgnoresInvertColors" | "accessibilityLabel" | "accessibilityLabelledBy" | "accessibilityLanguage" | "accessibilityLargeContentTitle" | "accessibilityLiveRegion" | "accessibilityRespondsToUserInteraction" | "accessibilityRole" | "accessibilityShowsLargeContentViewer" | "accessibilityState" | "accessibilityValue" | "accessibilityViewIsModal" | "accessible" | "alignContent" | "alignItems" | "alignSelf" | "alwaysDisable" | "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" | "borderBlock" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottomColor" | "borderBottomEndRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStartRadius" | "borderBottomWidth" | "borderColor" | "borderCurve" | "borderEndColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderEndWidth" | "borderImage" | "borderInline" | "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" | "bottom" | "boxShadow" | "boxSizing" | "branches" | "caretColor" | "children" | "className" | "clipPath" | "collapsable" | "collapsableChildren" | "color" | "columnGap" | "contain" | "container" | "containerName" | "containerType" | "cursor" | "dangerouslySetInnerHTML" | "debug" | "direction" | "disableClassName" | "disableFocusScope" | "disableNativeStyle" | "disableOptimization" | "disabled" | "display" | "enableRemoveScroll" | "end" | "experimental_backgroundImage" | "experimental_backgroundPosition" | "experimental_backgroundRepeat" | "experimental_backgroundSize" | "filter" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "forceMount" | "forceStyle" | "forceUnmount" | "freezeContentsWhenHidden" | "gap" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "group" | "hasTVPreferredFocus" | "height" | "hitSlop" | "htmlFor" | "id" | "importantForAccessibility" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isTVSelectable" | "isolation" | "justifyContent" | "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" | "name" | "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" | "onLongPress" | "onMagicTap" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseOut" | "onMouseOver" | "onMouseUp" | "onOpenAutoFocus" | "onPaste" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerDownOutside" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPress" | "onPressIn" | "onPressOut" | "onScroll" | "onTouchCancel" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchStart" | "onTransition" | "onWheel" | "opacity" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowBlock" | "overflowInline" | "overflowWrap" | "overflowX" | "overflowY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingEnd" | "paddingHorizontal" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingStart" | "paddingTop" | "paddingVertical" | "passThrough" | "perspective" | "pointerEvents" | "position" | "removeClippedSubviews" | "render" | "renderToHardwareTextureAndroid" | "resize" | "right" | "role" | "rotate" | "rotateX" | "rotateY" | "rotateZ" | "rotation" | "rowGap" | "scale" | "scaleX" | "scaleY" | "scope" | "screenReaderFocusable" | "shadowColor" | "shadowOffset" | "shadowOpacity" | "shadowRadius" | "shouldRasterizeIOS" | "skewX" | "skewY" | "start" | "style" | "tabIndex" | "target" | "testID" | "textEmphasis" | "textWrap" | "theme" | "themeShallow" | "top" | "transform" | "transformMatrix" | "transformOrigin" | "transformStyle" | "transition" | "translateX" | "translateY" | "trapFocus" | "tvParallaxMagnification" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "untilMeasured" | "userSelect" | "verticalAlign" | "visibility" | "width" | "wordWrap" | "x" | "y" | "zIndex"> & Omit<import("@tamagui/popover").PopoverContentTypeProps, "scope"> & {
71
69
  scope?: TooltipScopes;
72
- }, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & Omit<import("@tamagui/popover").PopoverContentTypeProps, "scope"> & {
70
+ }, import("@tamagui/react-native-types/src").View | (HTMLElement & import("@tamagui/core").TamaguiElementMethods), import("@tamagui/core").RNTamaguiViewNonStyleProps & Omit<import("@tamagui/popover").PopoverContentTypeProps, "scope"> & {
73
71
  scope?: TooltipScopes;
74
- }, import("@tamagui/core").StackStyleBase, {
75
- elevation?: number | false | import("@tamagui/core").Size | undefined;
76
- }, import("@tamagui/core").StaticConfigPublic>;
72
+ }, import("@tamagui/core").StackStyleBase, {}, import("@tamagui/core").StaticConfigPublic>;
77
73
  Trigger: import("@tamagui/core").RefComponent<unknown, ScopedProps<PopoverTriggerProps>>;
78
74
  };
79
75
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAA4C,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxF,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,eAAe,CAAA;AAK/D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAkB,CAAA;AASzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAIpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAElC,KAAK,WAAW,C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,KAAK,CAAC,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,WAAW,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAwEtD,CAAA"}
1
+ {"version":3,"file":"TooltipSimple.d.ts","sourceRoot":"","sources":["../src/TooltipSimple.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,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,WAAW,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqEtD,CAAA"}