@ngrok/mantle 0.58.3 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{assets → dist}/mantle.css +1 -0
- package/dist/tooltip.d.ts +59 -12
- package/dist/tooltip.js +1 -1
- package/dist/tooltip.js.map +1 -1
- package/package.json +10 -8
package/dist/tooltip.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import * as _radix_ui_react_tooltip from '@radix-ui/react-tooltip';
|
|
4
|
-
import { Provider } from '@radix-ui/react-tooltip';
|
|
2
|
+
import { ComponentProps, ComponentPropsWithoutRef } from 'react';
|
|
5
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Wraps your app to provide global functionality to your tooltips.
|
|
9
8
|
* Only one instance of this component should be rendered in your app, preferably at the root.
|
|
10
9
|
*
|
|
11
|
-
* @see https://mantle.ngrok.com/
|
|
10
|
+
* @see https://mantle.ngrok.com/tooltip#tooltip-provider
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
14
13
|
* ```tsx
|
|
@@ -18,7 +17,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
18
17
|
* ```
|
|
19
18
|
*/
|
|
20
19
|
declare const TooltipProvider: {
|
|
21
|
-
({ delayDuration, ...props }: ComponentPropsWithoutRef<typeof Provider>): react_jsx_runtime.JSX.Element;
|
|
20
|
+
({ delayDuration, ...props }: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
|
|
22
21
|
displayName: string;
|
|
23
22
|
};
|
|
24
23
|
/**
|
|
@@ -26,7 +25,55 @@ declare const TooltipProvider: {
|
|
|
26
25
|
* This is the root, stateful component that manages the open/closed state of the tooltip.
|
|
27
26
|
* Will throw if you have not wrapped your app in a `TooltipProvider`.
|
|
28
27
|
*
|
|
29
|
-
* @see https://mantle.ngrok.com/
|
|
28
|
+
* @see https://mantle.ngrok.com/tooltip#tooltip-root
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <Tooltip.Root>
|
|
33
|
+
* <Tooltip.Trigger asChild>
|
|
34
|
+
* <Button type="button" appearance="outlined">
|
|
35
|
+
* Hover me
|
|
36
|
+
* </Button>
|
|
37
|
+
* </Tooltip.Trigger>
|
|
38
|
+
* <Tooltip.Content>
|
|
39
|
+
* This is a tooltip
|
|
40
|
+
* </Tooltip.Content>
|
|
41
|
+
* </Tooltip.Root>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare function Root(props: ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
45
|
+
declare namespace Root {
|
|
46
|
+
var displayName: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The trigger button that opens the tooltip.
|
|
50
|
+
*
|
|
51
|
+
* @see https://mantle.ngrok.com/tooltip#tooltip-trigger
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <Tooltip.Root>
|
|
56
|
+
* <Tooltip.Trigger asChild>
|
|
57
|
+
* <Button type="button" appearance="outlined">
|
|
58
|
+
* Hover me
|
|
59
|
+
* </Button>
|
|
60
|
+
* </Tooltip.Trigger>
|
|
61
|
+
* <Tooltip.Content>
|
|
62
|
+
* This is a tooltip
|
|
63
|
+
* </Tooltip.Content>
|
|
64
|
+
* </Tooltip.Root>
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
declare function Trigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
68
|
+
declare namespace Trigger {
|
|
69
|
+
var displayName: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
|
|
73
|
+
* This is the root, stateful component that manages the open/closed state of the tooltip.
|
|
74
|
+
* Will throw if you have not wrapped your app in a `TooltipProvider`.
|
|
75
|
+
*
|
|
76
|
+
* @see https://mantle.ngrok.com/tooltip
|
|
30
77
|
*
|
|
31
78
|
* @example
|
|
32
79
|
* ```tsx
|
|
@@ -48,7 +95,7 @@ declare const Tooltip: {
|
|
|
48
95
|
* This is the root, stateful component that manages the open/closed state of the tooltip.
|
|
49
96
|
* Will throw if you have not wrapped your app in a `TooltipProvider`.
|
|
50
97
|
*
|
|
51
|
-
* @see https://mantle.ngrok.com/
|
|
98
|
+
* @see https://mantle.ngrok.com/tooltip#tooltip-root
|
|
52
99
|
*
|
|
53
100
|
* @example
|
|
54
101
|
* ```tsx
|
|
@@ -64,11 +111,11 @@ declare const Tooltip: {
|
|
|
64
111
|
* </Tooltip.Root>
|
|
65
112
|
* ```
|
|
66
113
|
*/
|
|
67
|
-
readonly Root:
|
|
114
|
+
readonly Root: typeof Root;
|
|
68
115
|
/**
|
|
69
116
|
* The content to render inside the tooltip.
|
|
70
117
|
*
|
|
71
|
-
* @see https://mantle.ngrok.com/
|
|
118
|
+
* @see https://mantle.ngrok.com/tooltip#tooltip-content
|
|
72
119
|
*
|
|
73
120
|
* @example
|
|
74
121
|
* ```tsx
|
|
@@ -84,11 +131,11 @@ declare const Tooltip: {
|
|
|
84
131
|
* </Tooltip.Root>
|
|
85
132
|
* ```
|
|
86
133
|
*/
|
|
87
|
-
readonly Content: react.ForwardRefExoticComponent<Omit<
|
|
134
|
+
readonly Content: react.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
88
135
|
/**
|
|
89
136
|
* The trigger button that opens the tooltip.
|
|
90
137
|
*
|
|
91
|
-
* @see https://mantle.ngrok.com/
|
|
138
|
+
* @see https://mantle.ngrok.com/tooltip#tooltip-trigger
|
|
92
139
|
*
|
|
93
140
|
* @example
|
|
94
141
|
* ```tsx
|
|
@@ -104,7 +151,7 @@ declare const Tooltip: {
|
|
|
104
151
|
* </Tooltip.Root>
|
|
105
152
|
* ```
|
|
106
153
|
*/
|
|
107
|
-
readonly Trigger:
|
|
154
|
+
readonly Trigger: typeof Trigger;
|
|
108
155
|
};
|
|
109
156
|
|
|
110
157
|
export { Tooltip, TooltipProvider };
|
package/dist/tooltip.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as r}from"./chunk-PFXFESEN.js";import*as o from"@radix-ui/react-tooltip";import{forwardRef as f}from"react";import{jsx as i,jsxs as T}from"react/jsx-runtime";var p=({delayDuration:t=0,...e})=>i(o.Provider,{"data-slot":"tooltip-provider",delayDuration:t??0,...e});p.displayName="Tooltip.Provider";function a(t){return i(o.Root,{"data-slot":"tooltip",...t})}a.displayName="Tooltip.Root";function l(t){return i(o.Trigger,{"data-slot":"tooltip-trigger",...t})}l.displayName="Tooltip.Trigger";var n=f(({children:t,className:e,sideOffset:m=4,...s},d)=>i(o.Portal,{children:T(o.Content,{className:r("bg-tooltip text-tooltip animate-in fade-in-0 zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow",e),"data-slot":"tooltip-content",ref:d,sideOffset:m,...s,children:[t,i(o.Arrow,{asChild:!0,children:i("div",{className:"bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs"})})]})}));n.displayName="Tooltip.Content";var P={Root:a,Content:n,Trigger:l};export{P as Tooltip,p as TooltipProvider};
|
|
2
2
|
//# sourceMappingURL=tooltip.js.map
|
package/dist/tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { forwardRef } from \"react\";\nimport type {\n\tComponentProps,\n\tComponentPropsWithoutRef,\n\tComponentRef,\n} from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\n/**\n * Wraps your app to provide global functionality to your tooltips.\n * Only one instance of this component should be rendered in your app, preferably at the root.\n *\n * @see https://mantle.ngrok.com/tooltip#tooltip-provider\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <App />\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = ({\n\tdelayDuration = 0,\n\t...props\n}: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>) => (\n\t<TooltipPrimitive.Provider\n\t\tdata-slot=\"tooltip-provider\"\n\t\tdelayDuration={delayDuration ?? 0}\n\t\t{...props}\n\t/>\n);\nTooltipProvider.displayName = \"Tooltip.Provider\";\n\n/**\n * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n * This is the root, stateful component that manages the open/closed state of the tooltip.\n * Will throw if you have not wrapped your app in a `TooltipProvider`.\n *\n * @see https://mantle.ngrok.com/tooltip#tooltip-root\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nfunction Root(props: ComponentProps<typeof TooltipPrimitive.Root>) {\n\treturn <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\nRoot.displayName = \"Tooltip.Root\";\n\n/**\n * The trigger button that opens the tooltip.\n *\n * @see https://mantle.ngrok.com/tooltip#tooltip-trigger\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nfunction Trigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>) {\n\treturn <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\nTrigger.displayName = \"Tooltip.Trigger\";\n\n/**\n * The content to render inside the tooltip.\n *\n * @see https://mantle.ngrok.com/tooltip#tooltip-content\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof TooltipPrimitive.Content>,\n\tComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ children, className, sideOffset = 4, ...props }, ref) => (\n\t<TooltipPrimitive.Portal>\n\t\t<TooltipPrimitive.Content\n\t\t\tclassName={cx(\n\t\t\t\t\"bg-tooltip text-tooltip animate-in fade-in-0 zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"tooltip-content\"\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<TooltipPrimitive.Arrow asChild>\n\t\t\t\t<div className=\"bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs\" />\n\t\t\t</TooltipPrimitive.Arrow>\n\t\t</TooltipPrimitive.Content>\n\t</TooltipPrimitive.Portal>\n));\nContent.displayName = \"Tooltip.Content\";\n\n/**\n * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n * This is the root, stateful component that manages the open/closed state of the tooltip.\n * Will throw if you have not wrapped your app in a `TooltipProvider`.\n *\n * @see https://mantle.ngrok.com/tooltip\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nconst Tooltip = {\n\t/**\n\t * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n\t * This is the root, stateful component that manages the open/closed state of the tooltip.\n\t * Will throw if you have not wrapped your app in a `TooltipProvider`.\n\t *\n\t * @see https://mantle.ngrok.com/tooltip#tooltip-root\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * The content to render inside the tooltip.\n\t *\n\t * @see https://mantle.ngrok.com/tooltip#tooltip-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * The trigger button that opens the tooltip.\n\t *\n\t * @see https://mantle.ngrok.com/tooltip#tooltip-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tTrigger,\n} as const;\n\nexport {\n\t//,\n\tTooltip,\n\tTooltipProvider,\n};\n"],"mappings":"wCAAA,UAAYA,MAAsB,0BAClC,OAAS,cAAAC,MAAkB,QAyB1B,cAAAC,EAkFC,QAAAC,MAlFD,oBAJD,IAAMC,EAAkB,CAAC,CACxB,cAAAC,EAAgB,EAChB,GAAGC,CACJ,IACCJ,EAAkB,WAAjB,CACA,YAAU,mBACV,cAAeG,GAAiB,EAC/B,GAAGC,EACL,EAEDF,EAAgB,YAAc,mBAuB9B,SAASG,EAAKD,EAAqD,CAClE,OAAOJ,EAAkB,OAAjB,CAAsB,YAAU,UAAW,GAAGI,EAAO,CAC9D,CACAC,EAAK,YAAc,eAqBnB,SAASC,EAAQF,EAAwD,CACxE,OAAOJ,EAAkB,UAAjB,CAAyB,YAAU,kBAAmB,GAAGI,EAAO,CACzE,CACAE,EAAQ,YAAc,kBAqBtB,IAAMC,EAAUC,EAGd,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGP,CAAM,EAAGQ,IACrDZ,EAAkB,SAAjB,CACA,SAAAC,EAAkB,UAAjB,CACA,UAAWY,EACV,sYACAH,CACD,EACA,YAAU,kBACV,IAAKE,EACL,WAAYD,EACX,GAAGP,EAEH,UAAAK,EACDT,EAAkB,QAAjB,CAAuB,QAAO,GAC9B,SAAAA,EAAC,OAAI,UAAU,6EAA6E,EAC7F,GACD,EACD,CACA,EACDO,EAAQ,YAAc,kBAuBtB,IAAMO,EAAU,CAsBf,KAAAT,EAoBA,QAAAE,EAoBA,QAAAD,CACD","names":["TooltipPrimitive","forwardRef","jsx","jsxs","TooltipProvider","delayDuration","props","Root","Trigger","Content","forwardRef","children","className","sideOffset","ref","cx","Tooltip"]}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "mantle is ngrok's UI library and design system.",
|
|
4
4
|
"author": "ngrok",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.59.0",
|
|
7
7
|
"homepage": "https://mantle.ngrok.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
],
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
21
|
-
"assets",
|
|
22
21
|
"package.json"
|
|
23
22
|
],
|
|
24
23
|
"engines": {
|
|
@@ -46,7 +45,7 @@
|
|
|
46
45
|
"prismjs": "1.30.0",
|
|
47
46
|
"react-day-picker": "9.11.1",
|
|
48
47
|
"sonner": "2.0.7",
|
|
49
|
-
"tailwind-merge": "3.
|
|
48
|
+
"tailwind-merge": "3.4.0",
|
|
50
49
|
"tiny-invariant": "1.3.3",
|
|
51
50
|
"tw-animate-css": "1.4.0"
|
|
52
51
|
},
|
|
@@ -58,14 +57,14 @@
|
|
|
58
57
|
"@testing-library/user-event": "14.6.1",
|
|
59
58
|
"@types/prismjs": "1.26.5",
|
|
60
59
|
"@types/react": "18.3.26",
|
|
61
|
-
"@types/react-dom": "
|
|
62
|
-
"browserslist": "4.
|
|
60
|
+
"@types/react-dom": "18.3.7",
|
|
61
|
+
"browserslist": "4.28.0",
|
|
63
62
|
"date-fns": "4.1.0",
|
|
64
63
|
"happy-dom": "20.0.10",
|
|
65
64
|
"react": "18.3.1",
|
|
66
65
|
"react-dom": "18.3.1",
|
|
67
66
|
"react-router": "7.9.5",
|
|
68
|
-
"tailwindcss": "4.1.
|
|
67
|
+
"tailwindcss": "4.1.17",
|
|
69
68
|
"tsup": "8.5.0",
|
|
70
69
|
"typescript": "5.9.3",
|
|
71
70
|
"@cfg/tsconfig": "1.0.0"
|
|
@@ -76,10 +75,13 @@
|
|
|
76
75
|
"react": "^18 || ^19",
|
|
77
76
|
"react-dom": "^18 || ^19",
|
|
78
77
|
"react-router": "^7",
|
|
79
|
-
"tailwindcss": "^4.1.
|
|
78
|
+
"tailwindcss": "^4.1.17"
|
|
80
79
|
},
|
|
81
80
|
"exports": {
|
|
82
|
-
"./mantle.css":
|
|
81
|
+
"./mantle.css": {
|
|
82
|
+
"@ngrok/mantle/source": "./src/mantle.css",
|
|
83
|
+
"default": "./dist/mantle.css"
|
|
84
|
+
},
|
|
83
85
|
"./package.json": "./package.json",
|
|
84
86
|
"./accordion": {
|
|
85
87
|
"@ngrok/mantle/source": "./src/components/accordion/index.ts",
|