@tamagui/tooltip 1.0.1-beta.18 → 1.0.1-beta.180

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/Tooltip.js +107 -130
  2. package/dist/cjs/Tooltip.js.map +3 -3
  3. package/dist/cjs/Tooltip.native.js +7 -10
  4. package/dist/cjs/Tooltip.native.js.map +2 -2
  5. package/dist/cjs/TooltipSimple.js +91 -0
  6. package/dist/cjs/TooltipSimple.js.map +7 -0
  7. package/dist/cjs/TooltipSimple.native.js +32 -0
  8. package/dist/cjs/TooltipSimple.native.js.map +7 -0
  9. package/dist/cjs/index.js +2 -0
  10. package/dist/cjs/index.js.map +2 -2
  11. package/dist/esm/Tooltip.js +103 -102
  12. package/dist/esm/Tooltip.js.map +3 -3
  13. package/dist/esm/Tooltip.native.js +5 -9
  14. package/dist/esm/Tooltip.native.js.map +2 -2
  15. package/dist/esm/TooltipSimple.js +67 -0
  16. package/dist/esm/TooltipSimple.js.map +7 -0
  17. package/dist/esm/TooltipSimple.native.js +8 -0
  18. package/dist/esm/TooltipSimple.native.js.map +7 -0
  19. package/dist/esm/index.js +1 -0
  20. package/dist/esm/index.js.map +2 -2
  21. package/dist/jsx/Tooltip.js +73 -76
  22. package/dist/jsx/Tooltip.js.map +7 -0
  23. package/dist/jsx/Tooltip.native.js +6 -9
  24. package/dist/jsx/Tooltip.native.js.map +7 -0
  25. package/dist/jsx/TooltipSimple.js +38 -0
  26. package/dist/jsx/TooltipSimple.js.map +7 -0
  27. package/dist/jsx/TooltipSimple.native.js +8 -0
  28. package/dist/jsx/TooltipSimple.native.js.map +7 -0
  29. package/dist/jsx/index.js +2 -0
  30. package/dist/jsx/index.js.map +7 -0
  31. package/package.json +20 -15
  32. package/src/Tooltip.native.tsx +20 -0
  33. package/src/Tooltip.tsx +156 -0
  34. package/src/TooltipSimple.native.tsx +5 -0
  35. package/src/TooltipSimple.tsx +67 -0
  36. package/src/index.tsx +2 -0
  37. package/types/Tooltip.d.ts +25 -37
  38. package/types/TooltipSimple.d.ts +10 -0
  39. package/types/TooltipSimple.native.d.ts +2 -0
  40. package/types/index.d.ts +1 -0
  41. package/types/Tooltip.d.ts.map +0 -1
  42. package/types/Tooltip.native.d.ts.map +0 -1
  43. package/types/index.d.ts.map +0 -1
@@ -1,12 +1,10 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import { withStaticProperties } from "@tamagui/core";
4
- const RenderChildren = /* @__PURE__ */ __name((props) => {
2
+ const RenderChildren = (props) => {
5
3
  return props.children;
6
- }, "RenderChildren");
7
- const RenderNull = /* @__PURE__ */ __name((props) => {
4
+ };
5
+ const RenderNull = (props) => {
8
6
  return null;
9
- }, "RenderNull");
7
+ };
10
8
  const Tooltip = withStaticProperties(RenderChildren, {
11
9
  Anchor: RenderChildren,
12
10
  Arrow: RenderNull,
@@ -14,8 +12,7 @@ const Tooltip = withStaticProperties(RenderChildren, {
14
12
  Content: RenderNull,
15
13
  Trigger: RenderChildren
16
14
  });
17
- const TooltipSimple = RenderChildren;
18
15
  export {
19
- Tooltip,
20
- TooltipSimple
16
+ Tooltip
21
17
  };
18
+ //# sourceMappingURL=Tooltip.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Tooltip.native.tsx"],
4
+ "sourcesContent": ["import { withStaticProperties } from '@tamagui/core'\n\n// no output on native for now\n// could have an option to long-press or similar to show in a context menu/drawer\n\nconst RenderChildren = (props: any) => {\n return props.children\n}\n\nconst RenderNull = (props: any) => {\n return null\n}\n\nexport const Tooltip = withStaticProperties(RenderChildren, {\n Anchor: RenderChildren,\n Arrow: RenderNull,\n Close: RenderNull,\n Content: RenderNull,\n Trigger: RenderChildren,\n})\n"],
5
+ "mappings": "AAAA,SAAS,4BAA4B;AAKrC,MAAM,iBAAiB,CAAC,UAAe;AACrC,SAAO,MAAM;AACf;AAEA,MAAM,aAAa,CAAC,UAAe;AACjC,SAAO;AACT;AAEO,MAAM,UAAU,qBAAqB,gBAAgB;AAAA,EAC1D,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AACX,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,38 @@
1
+ import { useDelayGroupContext } from "@floating-ui/react-dom-interactions";
2
+ import { ThemeInverse } from "@tamagui/core";
3
+ import { Paragraph } from "@tamagui/text";
4
+ import { Tooltip, TooltipGroup } from "./Tooltip";
5
+ const TooltipSimple = ({
6
+ label,
7
+ children,
8
+ contentProps,
9
+ ...tooltipProps
10
+ }) => {
11
+ let context;
12
+ try {
13
+ context = useDelayGroupContext();
14
+ } catch {
15
+ }
16
+ const contents = <Tooltip {...tooltipProps}>
17
+ <Tooltip.Trigger asChild>{children}</Tooltip.Trigger>
18
+ <ThemeInverse><Tooltip.Content zIndex={1e3} enterStyle={{ x: 0, y: -8, opacity: 0, scale: 0.93 }} exitStyle={{ x: 0, y: -8, opacity: 0, scale: 0.93 }} x={0} scale={1} y={0} elevation="$0.5" opacity={1} paddingVertical="$1" animation={[
19
+ "quick",
20
+ {
21
+ opacity: {
22
+ overshootClamping: true
23
+ }
24
+ }
25
+ ]} {...contentProps}>
26
+ <Tooltip.Arrow />
27
+ <Paragraph size="$2" lineHeight="$0">{label}</Paragraph>
28
+ </Tooltip.Content></ThemeInverse>
29
+ </Tooltip>;
30
+ if (!context) {
31
+ return <TooltipGroup delay={{ open: 3e3, close: 100 }}>{contents}</TooltipGroup>;
32
+ }
33
+ return contents;
34
+ };
35
+ export {
36
+ TooltipSimple
37
+ };
38
+ //# sourceMappingURL=TooltipSimple.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/TooltipSimple.tsx"],
4
+ "sourcesContent": ["import { useDelayGroupContext } from '@floating-ui/react-dom-interactions'\nimport { ThemeInverse } from '@tamagui/core'\nimport { SizableStackProps } from '@tamagui/stacks'\nimport { Paragraph } from '@tamagui/text'\nimport * as React from 'react'\n\nimport { Tooltip, TooltipGroup, TooltipProps } from './Tooltip'\n\nexport type TooltipSimpleProps = TooltipProps & {\n label?: React.ReactNode\n children?: React.ReactNode\n contentProps?: SizableStackProps\n}\n\nexport const TooltipSimple: React.FC<TooltipSimpleProps> = ({\n label,\n children,\n contentProps,\n ...tooltipProps\n}) => {\n let context\n try {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n context = useDelayGroupContext()\n } catch {\n // ok\n }\n\n const contents = (\n <Tooltip {...tooltipProps}>\n <Tooltip.Trigger asChild>{children}</Tooltip.Trigger>\n <ThemeInverse>\n <Tooltip.Content\n zIndex={1000}\n enterStyle={{ x: 0, y: -8, opacity: 0, scale: 0.93 }}\n exitStyle={{ x: 0, y: -8, opacity: 0, scale: 0.93 }}\n x={0}\n scale={1}\n y={0}\n elevation=\"$0.5\"\n opacity={1}\n paddingVertical=\"$1\"\n animation={[\n 'quick',\n {\n opacity: {\n overshootClamping: true,\n },\n },\n ]}\n {...contentProps}\n >\n <Tooltip.Arrow />\n <Paragraph size=\"$2\" lineHeight=\"$0\">\n {label}\n </Paragraph>\n </Tooltip.Content>\n </ThemeInverse>\n </Tooltip>\n )\n\n if (!context) {\n return <TooltipGroup delay={{ open: 3000, close: 100 }}>{contents}</TooltipGroup>\n }\n\n return contents\n}\n"],
5
+ "mappings": "AAAA,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB;AAG1B,SAAS,SAAS,oBAAkC;AAQ7C,MAAM,gBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,KACG;AACL,MAAM;AACJ,MAAI;AACJ,MAAI;AAEF,cAAU,qBAAqB;AAAA,EACjC,QAAE;AAAA,EAEF;AAEA,QAAM,WACJ,CAAC,YAAY;AAAA,IACX,CAAC,QAAQ,QAAQ,SAAS,SAAS,EAAlC,QAAQ;AAAA,IACT,CAAC,aACC,CAAC,QAAQ,QACP,QAAQ,KACR,YAAY,EAAE,GAAG,GAAG,GAAG,IAAI,SAAS,GAAG,OAAO,KAAK,GACnD,WAAW,EAAE,GAAG,GAAG,GAAG,IAAI,SAAS,GAAG,OAAO,KAAK,GAClD,GAAG,GACH,OAAO,GACP,GAAG,GACH,UAAU,OACV,SAAS,GACT,gBAAgB,KAChB,WAAW;AAAA,MACT;AAAA,MACA;AAAA,QACE,SAAS;AAAA,UACP,mBAAmB;AAAA,QACrB;AAAA,MACF;AAAA,IACF,OACI;AAAA,MAEJ,CAAC,QAAQ,MAAM;AAAA,MACf,CAAC,UAAU,KAAK,KAAK,WAAW,MAC7B,MACH,EAFC;AAAA,IAGH,EAxBC,QAAQ,QAyBX,EA1BC;AAAA,EA2BH,EA7BC;AAgCH,MAAI,CAAC,SAAS;AACZ,WAAO,CAAC,aAAa,OAAO,EAAE,MAAM,KAAM,OAAO,IAAI,IAAI,SAAS,EAA1D;AAAA,EACV;AAEA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ const RenderChildren = (props) => {
2
+ return props.children;
3
+ };
4
+ const TooltipSimple = RenderChildren;
5
+ export {
6
+ TooltipSimple
7
+ };
8
+ //# sourceMappingURL=TooltipSimple.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/TooltipSimple.native.tsx"],
4
+ "sourcesContent": ["const RenderChildren = (props: any) => {\n return props.children\n}\n\nexport const TooltipSimple = RenderChildren\n"],
5
+ "mappings": "AAAA,MAAM,iBAAiB,CAAC,UAAe;AACrC,SAAO,MAAM;AACf;AAEO,MAAM,gBAAgB;",
6
+ "names": []
7
+ }
package/dist/jsx/index.js CHANGED
@@ -1 +1,3 @@
1
1
  export * from "./Tooltip";
2
+ export * from "./TooltipSimple";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx"],
4
+ "sourcesContent": ["export * from './Tooltip'\nexport * from './TooltipSimple'\n"],
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,33 +1,38 @@
1
1
  {
2
2
  "name": "@tamagui/tooltip",
3
- "version": "1.0.1-beta.18",
4
- "sideEffects": true,
3
+ "version": "1.0.1-beta.180",
4
+ "sideEffects": [
5
+ "*.css"
6
+ ],
5
7
  "source": "src/index.ts",
6
- "typings": "types",
8
+ "types": "./types/index.d.ts",
7
9
  "main": "dist/cjs",
8
10
  "module": "dist/esm",
9
11
  "module:jsx": "dist/jsx",
10
12
  "files": [
13
+ "src",
11
14
  "types",
12
15
  "dist"
13
16
  ],
14
17
  "scripts": {
15
18
  "build": "tamagui-build",
16
19
  "watch": "tamagui-build --watch",
20
+ "lint": "eslint",
21
+ "lint:fix": "yarn lint --fix",
17
22
  "clean": "tamagui-build clean",
18
23
  "clean:build": "tamagui-build clean:build"
19
24
  },
20
25
  "dependencies": {
21
- "@floating-ui/react-dom-interactions": "^0.4.0",
22
- "@tamagui/compose-refs": "^1.0.1-beta.18",
23
- "@tamagui/core": "^1.0.1-beta.18",
24
- "@tamagui/create-context": "^1.0.1-beta.18",
25
- "@tamagui/polyfill-dev": "^1.0.1-beta.18",
26
- "@tamagui/popover": "^1.0.1-beta.18",
27
- "@tamagui/popper": "^1.0.1-beta.18",
28
- "@tamagui/stacks": "^1.0.1-beta.18",
29
- "@tamagui/text": "^1.0.1-beta.18",
30
- "@tamagui/use-controllable-state": "^1.0.1-beta.18"
26
+ "@floating-ui/react-dom-interactions": "^0.8.1",
27
+ "@tamagui/compose-refs": "^1.0.1-beta.180",
28
+ "@tamagui/core": "^1.0.1-beta.180",
29
+ "@tamagui/create-context": "^1.0.1-beta.180",
30
+ "@tamagui/polyfill-dev": "^1.0.1-beta.180",
31
+ "@tamagui/popover": "^1.0.1-beta.180",
32
+ "@tamagui/popper": "^1.0.1-beta.180",
33
+ "@tamagui/stacks": "^1.0.1-beta.180",
34
+ "@tamagui/text": "^1.0.1-beta.180",
35
+ "@tamagui/use-controllable-state": "^1.0.1-beta.180"
31
36
  },
32
37
  "peerDependencies": {
33
38
  "react": "*",
@@ -35,9 +40,9 @@
35
40
  "react-native": "*"
36
41
  },
37
42
  "devDependencies": {
38
- "@tamagui/build": "^1.0.1-beta.18",
43
+ "@tamagui/build": "^1.0.1-beta.180",
39
44
  "@types/react-dom": "^18.0.3",
40
- "@types/react-native": "^0.67.3",
45
+ "@types/react-native": "^0.69.2",
41
46
  "react": "*",
42
47
  "react-dom": "*",
43
48
  "react-native": "*"
@@ -0,0 +1,20 @@
1
+ import { withStaticProperties } from '@tamagui/core'
2
+
3
+ // no output on native for now
4
+ // could have an option to long-press or similar to show in a context menu/drawer
5
+
6
+ const RenderChildren = (props: any) => {
7
+ return props.children
8
+ }
9
+
10
+ const RenderNull = (props: any) => {
11
+ return null
12
+ }
13
+
14
+ export const Tooltip = withStaticProperties(RenderChildren, {
15
+ Anchor: RenderChildren,
16
+ Arrow: RenderNull,
17
+ Close: RenderNull,
18
+ Content: RenderNull,
19
+ Trigger: RenderChildren,
20
+ })
@@ -0,0 +1,156 @@
1
+ import '@tamagui/polyfill-dev'
2
+
3
+ import {
4
+ FloatingDelayGroup,
5
+ useDelayGroup,
6
+ useDelayGroupContext,
7
+ useDismiss,
8
+ useFloating,
9
+ useFocus,
10
+ useHover,
11
+ useInteractions,
12
+ useRole,
13
+ } from '@floating-ui/react-dom-interactions'
14
+ import { useEvent, useId, withStaticProperties } from '@tamagui/core'
15
+ import { ScopedProps } from '@tamagui/create-context'
16
+ import {
17
+ PopoverAnchor,
18
+ PopoverArrow,
19
+ PopoverArrowProps,
20
+ PopoverContent,
21
+ PopoverContentProps,
22
+ PopoverTrigger,
23
+ __PopoverProviderInternal,
24
+ usePopoverScope,
25
+ } from '@tamagui/popover'
26
+ import {
27
+ FloatingOverrideContext,
28
+ Popper,
29
+ PopperProps,
30
+ UseFloatingFn,
31
+ usePopperContext,
32
+ } from '@tamagui/popper'
33
+ import * as React from 'react'
34
+
35
+ const TooltipContent = React.forwardRef(
36
+ ({ __scopePopover, ...props }: ScopedProps<PopoverContentProps, 'Popover'>, ref: any) => {
37
+ const popperScope = usePopoverScope(__scopePopover)
38
+ const popper = usePopperContext('PopperContent', popperScope['__scopePopper'])
39
+ return (
40
+ <PopoverContent
41
+ componentName="TooltipContent"
42
+ disableRemoveScroll
43
+ trapFocus={false}
44
+ padding={props.size || popper.size || '$2'}
45
+ pointerEvents="none"
46
+ ref={ref}
47
+ {...props}
48
+ />
49
+ )
50
+ }
51
+ )
52
+
53
+ const TooltipArrow = React.forwardRef((props: PopoverArrowProps, ref: any) => {
54
+ return <PopoverArrow componentName="TooltipArrow" ref={ref} {...props} />
55
+ })
56
+
57
+ export type TooltipProps = PopperProps & {
58
+ children?: React.ReactNode
59
+ onOpenChange?: (open: boolean) => void
60
+ groupId?: string
61
+ restMs?: number
62
+ delay?:
63
+ | number
64
+ | {
65
+ open?: number
66
+ close?: number
67
+ }
68
+ }
69
+
70
+ export const TooltipGroup = FloatingDelayGroup
71
+
72
+ export const Tooltip = withStaticProperties(
73
+ ((props: ScopedProps<TooltipProps, 'Popover'>) => {
74
+ const {
75
+ __scopePopover,
76
+ children,
77
+ restMs = 500,
78
+ delay: delayProp,
79
+ onOpenChange: onOpenChangeProp,
80
+ ...restProps
81
+ } = props
82
+ const popperScope = usePopoverScope(__scopePopover)
83
+ const triggerRef = React.useRef<HTMLButtonElement>(null)
84
+ const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false)
85
+ const { delay: delayGroup, setCurrentId } = useDelayGroupContext()
86
+ const delay = delayProp ?? delayGroup
87
+ const [open, setOpen] = React.useState(false)
88
+ const id = props.groupId
89
+
90
+ const onOpenChange = useEvent((open) => {
91
+ setOpen(open)
92
+ if (open) {
93
+ setCurrentId(id)
94
+ }
95
+ onOpenChangeProp?.(open)
96
+ })
97
+
98
+ const useFloatingFn: UseFloatingFn = (props) => {
99
+ const floating = useFloating({
100
+ ...props,
101
+ open,
102
+ onOpenChange,
103
+ })
104
+ const { getReferenceProps, getFloatingProps } = useInteractions([
105
+ useHover(floating.context, { delay, restMs }),
106
+ useFocus(floating.context),
107
+ useRole(floating.context, { role: 'tooltip' }),
108
+ useDismiss(floating.context),
109
+ useDelayGroup(floating.context, { id }),
110
+ ])
111
+ return {
112
+ ...floating,
113
+ getReferenceProps,
114
+ getFloatingProps,
115
+ } as any
116
+ }
117
+
118
+ const useFloatingContext = React.useCallback(useFloatingFn, [id, delay, open])
119
+ const onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), [])
120
+ const onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(false), [])
121
+ const contentId = useId()
122
+
123
+ return (
124
+ <FloatingOverrideContext.Provider value={useFloatingContext}>
125
+ {/* default tooltip to a smaller size */}
126
+ <Popper size="$2" {...popperScope} {...restProps}>
127
+ <__PopoverProviderInternal
128
+ scope={__scopePopover}
129
+ contentId={contentId}
130
+ triggerRef={triggerRef}
131
+ sheetBreakpoint={false}
132
+ scopeKey=""
133
+ open={open}
134
+ onOpenChange={setOpen}
135
+ onOpenToggle={voidFn}
136
+ hasCustomAnchor={hasCustomAnchor}
137
+ onCustomAnchorAdd={onCustomAnchorAdd}
138
+ onCustomAnchorRemove={onCustomAnchorRemove}
139
+ >
140
+ {children}
141
+ </__PopoverProviderInternal>
142
+ </Popper>
143
+ </FloatingOverrideContext.Provider>
144
+ )
145
+ }) as React.FC<TooltipProps>,
146
+ {
147
+ Anchor: PopoverAnchor,
148
+ Arrow: TooltipArrow,
149
+ Content: TooltipContent,
150
+ Trigger: PopoverTrigger,
151
+ }
152
+ )
153
+
154
+ Tooltip.displayName = 'Tooltip'
155
+
156
+ const voidFn = () => {}
@@ -0,0 +1,5 @@
1
+ const RenderChildren = (props: any) => {
2
+ return props.children
3
+ }
4
+
5
+ export const TooltipSimple = RenderChildren
@@ -0,0 +1,67 @@
1
+ import { useDelayGroupContext } from '@floating-ui/react-dom-interactions'
2
+ import { ThemeInverse } from '@tamagui/core'
3
+ import { SizableStackProps } from '@tamagui/stacks'
4
+ import { Paragraph } from '@tamagui/text'
5
+ import * as React from 'react'
6
+
7
+ import { Tooltip, TooltipGroup, TooltipProps } from './Tooltip'
8
+
9
+ export type TooltipSimpleProps = TooltipProps & {
10
+ label?: React.ReactNode
11
+ children?: React.ReactNode
12
+ contentProps?: SizableStackProps
13
+ }
14
+
15
+ export const TooltipSimple: React.FC<TooltipSimpleProps> = ({
16
+ label,
17
+ children,
18
+ contentProps,
19
+ ...tooltipProps
20
+ }) => {
21
+ let context
22
+ try {
23
+ // eslint-disable-next-line react-hooks/rules-of-hooks
24
+ context = useDelayGroupContext()
25
+ } catch {
26
+ // ok
27
+ }
28
+
29
+ const contents = (
30
+ <Tooltip {...tooltipProps}>
31
+ <Tooltip.Trigger asChild>{children}</Tooltip.Trigger>
32
+ <ThemeInverse>
33
+ <Tooltip.Content
34
+ zIndex={1000}
35
+ enterStyle={{ x: 0, y: -8, opacity: 0, scale: 0.93 }}
36
+ exitStyle={{ x: 0, y: -8, opacity: 0, scale: 0.93 }}
37
+ x={0}
38
+ scale={1}
39
+ y={0}
40
+ elevation="$0.5"
41
+ opacity={1}
42
+ paddingVertical="$1"
43
+ animation={[
44
+ 'quick',
45
+ {
46
+ opacity: {
47
+ overshootClamping: true,
48
+ },
49
+ },
50
+ ]}
51
+ {...contentProps}
52
+ >
53
+ <Tooltip.Arrow />
54
+ <Paragraph size="$2" lineHeight="$0">
55
+ {label}
56
+ </Paragraph>
57
+ </Tooltip.Content>
58
+ </ThemeInverse>
59
+ </Tooltip>
60
+ )
61
+
62
+ if (!context) {
63
+ return <TooltipGroup delay={{ open: 3000, close: 100 }}>{contents}</TooltipGroup>
64
+ }
65
+
66
+ return contents
67
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,2 @@
1
+ export * from './Tooltip'
2
+ export * from './TooltipSimple'
@@ -1,6 +1,5 @@
1
1
  import '@tamagui/polyfill-dev';
2
2
  import { PopperProps } from '@tamagui/popper';
3
- import { SizableStackProps } from '@tamagui/stacks';
4
3
  import * as React from 'react';
5
4
  export declare type TooltipProps = PopperProps & {
6
5
  children?: React.ReactNode;
@@ -21,51 +20,40 @@ export declare const TooltipGroup: ({ children, delay, }: {
21
20
  }) => JSX.Element;
22
21
  export declare const Tooltip: React.FC<TooltipProps> & {
23
22
  Anchor: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
24
- fullscreen?: boolean | undefined;
25
- elevation?: import("@tamagui/core").SizeTokens | undefined;
23
+ readonly fullscreen?: boolean | undefined;
24
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
26
25
  } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
27
- fullscreen?: boolean | undefined;
28
- elevation?: import("@tamagui/core").SizeTokens | undefined;
26
+ readonly fullscreen?: boolean | undefined;
27
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
29
28
  }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
30
- fullscreen?: boolean | undefined;
31
- elevation?: import("@tamagui/core").SizeTokens | undefined;
29
+ readonly fullscreen?: boolean | undefined;
30
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
32
31
  }>> & React.RefAttributes<HTMLElement | import("react-native").View>>;
33
32
  Arrow: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
34
- fullscreen?: boolean | undefined;
35
- elevation?: import("@tamagui/core").SizeTokens | undefined;
33
+ readonly fullscreen?: boolean | undefined;
34
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
36
35
  } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
37
- fullscreen?: boolean | undefined;
38
- elevation?: import("@tamagui/core").SizeTokens | undefined;
36
+ readonly fullscreen?: boolean | undefined;
37
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
39
38
  }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
40
- fullscreen?: boolean | undefined;
41
- elevation?: import("@tamagui/core").SizeTokens | undefined;
42
- }>> & React.RefAttributes<HTMLElement | import("react-native").View>>;
43
- Close: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
44
- fullscreen?: boolean | undefined;
45
- elevation?: import("@tamagui/core").SizeTokens | undefined;
46
- } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
47
- fullscreen?: boolean | undefined;
48
- elevation?: import("@tamagui/core").SizeTokens | undefined;
49
- }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
50
- fullscreen?: boolean | undefined;
51
- elevation?: import("@tamagui/core").SizeTokens | undefined;
52
- }>> & React.RefAttributes<HTMLElement | import("react-native").View>>;
53
- Content: React.ForwardRefExoticComponent<import("@tamagui/popover").PopoverContentTypeProps & React.RefAttributes<unknown>>;
39
+ readonly fullscreen?: boolean | undefined;
40
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
41
+ }>> & {
42
+ offset?: number | undefined;
43
+ size?: import("@tamagui/core").SizeTokens | undefined;
44
+ } & React.RefAttributes<unknown>>;
45
+ Content: React.ForwardRefExoticComponent<import("@tamagui/popover").PopoverContentTypeProps & {
46
+ __scopePopover?: import("@tamagui/create-context").Scope<any>;
47
+ } & React.RefAttributes<unknown>>;
54
48
  Trigger: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
55
- fullscreen?: boolean | undefined;
56
- elevation?: import("@tamagui/core").SizeTokens | undefined;
49
+ readonly fullscreen?: boolean | undefined;
50
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
57
51
  } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
58
- fullscreen?: boolean | undefined;
59
- elevation?: import("@tamagui/core").SizeTokens | undefined;
52
+ readonly fullscreen?: boolean | undefined;
53
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
60
54
  }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
61
- fullscreen?: boolean | undefined;
62
- elevation?: import("@tamagui/core").SizeTokens | undefined;
55
+ readonly fullscreen?: boolean | undefined;
56
+ readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
63
57
  }>> & React.RefAttributes<HTMLElement | import("react-native").View>>;
64
58
  };
65
- export declare type TooltipSimpleProps = TooltipProps & {
66
- label?: React.ReactNode;
67
- children?: React.ReactNode;
68
- contentProps?: SizableStackProps;
69
- };
70
- export declare const TooltipSimple: React.FC<TooltipSimpleProps>;
71
59
  //# sourceMappingURL=Tooltip.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { SizableStackProps } from '@tamagui/stacks';
2
+ import * as React from 'react';
3
+ import { TooltipProps } from './Tooltip';
4
+ export declare type TooltipSimpleProps = TooltipProps & {
5
+ label?: React.ReactNode;
6
+ children?: React.ReactNode;
7
+ contentProps?: SizableStackProps;
8
+ };
9
+ export declare const TooltipSimple: React.FC<TooltipSimpleProps>;
10
+ //# sourceMappingURL=TooltipSimple.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const TooltipSimple: (props: any) => any;
2
+ //# sourceMappingURL=TooltipSimple.native.d.ts.map
package/types/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './Tooltip';
2
+ export * from './TooltipSimple';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA;AAyB9B,OAAO,EAAmC,WAAW,EAAiB,MAAM,iBAAiB,CAAA;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,oBAAY,YAAY,GAAG,WAAW,GAAG;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EACF,MAAM,GACN;QACE,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACN,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;iBAAqB,CAAA;AAE9C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EnB,CAAA;AAID,oBAAY,kBAAkB,GAAG,YAAY,GAAG;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkCtD,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tooltip.native.d.ts","sourceRoot":"","sources":["../src/Tooltip.native.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,OAAO,WARW,GAAG;oBAAH,GAAG;mBAIP,GAAG;mBAAH,GAAG;qBAAH,GAAG;qBAJC,GAAG;CAchC,CAAA;AAEF,eAAO,MAAM,aAAa,UAhBK,GAAG,QAgBS,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}