@tamagui/tooltip 2.0.0-rc.35 → 2.0.0-rc.36-1775243248161

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.
@@ -2,33 +2,35 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
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);
32
34
  var Tooltip_exports = {};
33
35
  __export(Tooltip_exports, {
34
36
  Tooltip: () => Tooltip2,
@@ -36,189 +38,204 @@ __export(Tooltip_exports, {
36
38
  closeOpenTooltips: () => closeOpenTooltips
37
39
  });
38
40
  module.exports = __toCommonJS(Tooltip_exports);
39
- var import_polyfill_dev = require("@tamagui/polyfill-dev"),
40
- import_floating = require("@tamagui/floating"),
41
- import_core = require("@tamagui/core"),
42
- import_floating2 = require("@tamagui/floating"),
43
- import_get_token = require("@tamagui/get-token"),
44
- import_helpers = require("@tamagui/helpers"),
45
- import_popover = require("@tamagui/popover"),
46
- import_popper = require("@tamagui/popper"),
47
- import_use_controllable_state = require("@tamagui/use-controllable-state"),
48
- React = __toESM(require("react"), 1),
49
- import_jsx_runtime = require("react/jsx-runtime");
50
- const TOOLTIP_SCOPE = "",
51
- ALWAYS_DISABLE_TOOLTIP = {
52
- focus: !0,
53
- "remove-scroll": !0
54
- // it's nice to hit escape to hide a tooltip
55
- // dismiss: true
56
- },
57
- TooltipContent = import_popper.PopperContentFrame.styleable((props, ref) => {
58
- const preventAnimation = React.useContext(PreventTooltipAnimationContext),
59
- zIndexFromContext = React.useContext(TooltipZIndexContext);
60
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverContent, {
61
- scope: props.scope || TOOLTIP_SCOPE,
62
- alwaysDisable: ALWAYS_DISABLE_TOOLTIP,
63
- ...(!props.unstyled && {
64
- backgroundColor: "$background",
65
- alignItems: "center",
66
- pointerEvents: "none",
67
- size: "$true"
68
- }),
69
- ref,
70
- ...(zIndexFromContext !== void 0 && {
71
- zIndex: zIndexFromContext
72
- }),
73
- ...props,
74
- ...(preventAnimation && {
75
- transition: null
76
- })
77
- });
78
- }, {
79
- staticConfig: {
80
- componentName: "Tooltip"
81
- }
82
- }),
83
- TooltipArrow = React.forwardRef((props, ref) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverArrow, {
41
+ var import_polyfill_dev = require("@tamagui/polyfill-dev");
42
+ var import_floating = require("@tamagui/floating");
43
+ var import_core = require("@tamagui/core");
44
+ var import_floating2 = require("@tamagui/floating");
45
+ var import_get_token = require("@tamagui/get-token");
46
+ var import_helpers = require("@tamagui/helpers");
47
+ var import_popover = require("@tamagui/popover");
48
+ var import_popper = require("@tamagui/popper");
49
+ var import_use_controllable_state = require("@tamagui/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, {
84
87
  scope: props.scope || TOOLTIP_SCOPE,
85
88
  componentName: "Tooltip",
86
89
  ref,
87
90
  ...props
88
- })),
89
- PreventTooltipAnimationContext = React.createContext(!1),
90
- TooltipZIndexContext = React.createContext(void 0),
91
- TooltipGroup = ({
92
- children,
93
- delay,
94
- preventAnimation = !1,
95
- timeoutMs
96
- }) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(PreventTooltipAnimationContext.Provider, {
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, {
97
102
  value: preventAnimation,
98
103
  children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floating.FloatingDelayGroup, {
99
104
  timeoutMs,
100
105
  delay: React.useMemo(() => delay, [JSON.stringify(delay)]),
101
106
  children
102
107
  })
103
- }),
104
- setOpens = /* @__PURE__ */new Set(),
105
- closeOpenTooltips = () => {
106
- setOpens.forEach(x => x(!1));
107
- },
108
- TooltipComponent = React.forwardRef(function (props, ref) {
109
- "use no memo";
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";
110
116
 
111
- const {
112
- children,
113
- delay: delayProp,
114
- restMs: restMsProp,
115
- onOpenChange: onOpenChangeProp,
116
- focus,
117
- open: openProp,
118
- disableAutoCloseOnScroll,
119
- zIndex,
120
- scope = TOOLTIP_SCOPE,
121
- ...restProps
122
- } = props,
123
- triggerRef = React.useRef(null),
124
- [hasCustomAnchor, setHasCustomAnchor] = React.useState(!1),
125
- {
126
- delay: delayGroup,
127
- setCurrentId
128
- } = (0, import_floating.useDelayGroupContext)(),
129
- delay = delayProp !== void 0 ? delayProp : delayGroup ?? 400,
130
- restMs = restMsProp ?? (typeof delay == "number" ? delay : 0),
131
- [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
132
- prop: openProp,
133
- defaultProp: !1,
134
- onChange: onOpenChangeProp
135
- }),
136
- id = props.groupId,
137
- onOpenChange = (0, import_core.useEvent)(open2 => {
138
- open2 && setCurrentId(id), setOpen(open2);
139
- });
140
- React.useEffect(() => {
141
- if (!open || disableAutoCloseOnScroll || typeof document > "u") return;
142
- const closeIt = () => {
143
- setOpen(!1);
144
- };
145
- return setOpens.add(setOpen), document.documentElement.addEventListener("scroll", closeIt), () => {
146
- setOpens.delete(setOpen), document.documentElement.removeEventListener("scroll", closeIt);
147
- };
148
- }, [open, disableAutoCloseOnScroll]);
149
- const floatingContext = (0, import_popover.useFloatingContext)({
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,
150
195
  open,
151
- setOpen: onOpenChange,
152
- disable: !1,
153
- disableFocus: !1,
154
- hoverable: !0,
155
- role: "tooltip",
156
- focus,
157
- groupId: id,
158
- delay,
159
- restMs
160
- }),
161
- onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(!0), []),
162
- onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(!1), []),
163
- contentId = React.useId(),
164
- smallerSize = props.unstyled ? null : (0, import_get_token.getSize)("$true", {
165
- shift: -2,
166
- bounds: [0]
167
- }),
168
- content = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floating2.FloatingOverrideContext.Provider, {
169
- value: floatingContext,
170
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popper.Popper, {
171
- scope,
172
- size: smallerSize?.key,
173
- allowFlip: !0,
174
- stayInFrame: !0,
175
- open,
176
- ...restProps,
177
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverContextProvider, {
178
- scope,
179
- contentId,
180
- triggerRef,
181
- open,
182
- onOpenChange: setOpen,
183
- onOpenToggle: voidFn,
184
- hasCustomAnchor,
185
- onCustomAnchorAdd,
186
- onCustomAnchorRemove,
187
- children
188
- })
189
- })
190
- });
191
- return zIndex !== void 0 ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(TooltipZIndexContext.Provider, {
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, {
192
207
  value: zIndex,
193
208
  children: content
194
- }) : content;
195
- }),
196
- TooltipTrigger = React.forwardRef(function (props, ref) {
197
- const {
198
- scope,
199
- ...rest
200
- } = props;
201
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverTrigger, {
202
- ...rest,
203
- scope: scope || TOOLTIP_SCOPE,
204
- ref
205
209
  });
206
- }),
207
- TooltipAnchor = React.forwardRef(function (props, ref) {
208
- const {
209
- scope,
210
- ...rest
211
- } = props;
212
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_popover.PopoverAnchor, {
213
- ...rest,
214
- scope: scope || TOOLTIP_SCOPE,
215
- ref
216
- });
217
- }),
218
- Tooltip2 = (0, import_helpers.withStaticProperties)(TooltipComponent, {
219
- Anchor: TooltipAnchor,
220
- Arrow: TooltipArrow,
221
- Content: TooltipContent,
222
- Trigger: TooltipTrigger
223
- }),
224
- voidFn = () => {};
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 = () => {};
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var Tooltip_native_exports = {};
24
26
  __export(Tooltip_native_exports, {
@@ -27,22 +29,22 @@ __export(Tooltip_native_exports, {
27
29
  closeOpenTooltips: () => closeOpenTooltips
28
30
  });
29
31
  module.exports = __toCommonJS(Tooltip_native_exports);
30
- var import_helpers = require("@tamagui/helpers"),
31
- RenderChildren = function (props) {
32
- return props.children;
33
- },
34
- RenderNull = function (props) {
35
- return null;
36
- },
37
- TooltipGroup = function () {
38
- return null;
39
- },
40
- closeOpenTooltips = function () {},
41
- Tooltip = (0, import_helpers.withStaticProperties)(RenderChildren, {
42
- Anchor: RenderChildren,
43
- Arrow: RenderNull,
44
- Close: RenderNull,
45
- Content: RenderNull,
46
- Trigger: RenderChildren
47
- });
32
+ var import_helpers = require("@tamagui/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
+ });
48
50
  //# sourceMappingURL=Tooltip.native.js.map
@@ -1 +1 @@
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;EAGjCC,cAAA,GAAiB,SAAAA,CAASC,KAAA,EAAO;IACjC,OAAOA,KAAA,CAAMC,QAAA;EACjB;EACIC,UAAA,GAAa,SAAAA,CAASF,KAAA,EAAO;IAC7B,OAAO;EACX;EACWR,YAAA,GAAe,SAAAA,CAAA,EAAW;IACjC,OAAO;EACX;EACWC,iBAAA,GAAoB,SAAAA,CAAA,EAAW,CAAC;EACrBF,OAAA,OAAUM,cAAA,CAAAM,oBAAA,EAAqBJ,cAAA,EAAgB;IACjEK,MAAA,EAAQL,cAAA;IACRM,KAAA,EAAOH,UAAA;IACPI,KAAA,EAAOJ,UAAA;IACPK,OAAA,EAASL,UAAA;IACTM,OAAA,EAAST;EACb,CAAC","ignoreList":[]}
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":[]}
@@ -2,43 +2,45 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
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);
32
34
  var TooltipSimple_exports = {};
33
35
  __export(TooltipSimple_exports, {
34
36
  TooltipSimple: () => TooltipSimple
35
37
  });
36
38
  module.exports = __toCommonJS(TooltipSimple_exports);
37
- var import_get_token = require("@tamagui/get-token"),
38
- import_text = require("@tamagui/text"),
39
- React = __toESM(require("react"), 1),
40
- import_Tooltip = require("./Tooltip.cjs"),
41
- import_jsx_runtime = require("react/jsx-runtime");
39
+ var import_get_token = require("@tamagui/get-token");
40
+ var import_text = require("@tamagui/text");
41
+ var React = __toESM(require("react"), 1);
42
+ var import_Tooltip = require("./Tooltip.cjs");
43
+ var import_jsx_runtime = require("react/jsx-runtime");
42
44
  const TooltipSimple = React.forwardRef(({
43
45
  label,
44
46
  children,
@@ -49,18 +51,21 @@ const TooltipSimple = React.forwardRef(({
49
51
  "use no memo";
50
52
 
51
53
  const child = React.Children.only(children);
52
- return label ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_Tooltip.Tooltip, {
53
- disableRTL: !0,
54
+ if (!label) {
55
+ return children;
56
+ }
57
+ return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_Tooltip.Tooltip, {
58
+ disableRTL: true,
54
59
  offset: 15,
55
60
  restMs: 40,
56
61
  delay: 40,
57
62
  zIndex: 1e6,
58
63
  ...tooltipProps,
59
64
  ...(disabled ? {
60
- open: !1
65
+ open: false
61
66
  } : null),
62
67
  children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Tooltip.Tooltip.Trigger, {
63
- ...(typeof label == "string" && {
68
+ ...(typeof label === "string" && {
64
69
  "aria-label": label
65
70
  }),
66
71
  asChild: "except-style",
@@ -88,7 +93,7 @@ const TooltipSimple = React.forwardRef(({
88
93
  animateOnly: ["transform", "opacity"],
89
94
  transition: ["quicker", {
90
95
  opacity: {
91
- overshootClamping: !0
96
+ overshootClamping: true
92
97
  }
93
98
  }],
94
99
  ...contentProps,
@@ -103,5 +108,5 @@ const TooltipSimple = React.forwardRef(({
103
108
  children: label
104
109
  })]
105
110
  })]
106
- }) : children;
111
+ });
107
112
  });