@foundrykit/primitives 2.0.9 → 2.1.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.
- package/dist/{chunk-HS46TIMU.js → chunk-2UG6OCGA.js} +1 -1
- package/dist/chunk-3NQR7JZR.js +128 -0
- package/dist/{chunk-XCPGTXEJ.js → chunk-5RFGKG4K.js} +1 -1
- package/dist/chunk-B5YCE3UP.js +57 -0
- package/dist/chunk-F2TEA6ER.js +138 -0
- package/dist/{chunk-46UI3AUE.js → chunk-SEDTBIZW.js} +3 -3
- package/dist/chunk-SIQHWNPH.js +45 -0
- package/dist/chunk-STRBREHN.js +17 -0
- package/dist/components/button/index.cjs +3 -3
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/dialog/index.cjs +182 -0
- package/dist/components/dialog/index.d.cts +38 -0
- package/dist/components/dialog/index.d.ts +38 -0
- package/dist/components/dialog/index.js +25 -0
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/input-group/index.cjs +270 -0
- package/dist/components/input-group/index.d.cts +44 -0
- package/dist/components/input-group/index.d.ts +44 -0
- package/dist/components/input-group/index.js +153 -0
- package/dist/components/section/index.cjs +41 -0
- package/dist/components/section/index.d.cts +27 -0
- package/dist/components/section/index.d.ts +27 -0
- package/dist/components/section/index.js +6 -0
- package/dist/components/sheet/index.cjs +170 -0
- package/dist/components/sheet/index.d.cts +31 -0
- package/dist/components/sheet/index.d.ts +31 -0
- package/dist/components/sheet/index.js +21 -0
- package/dist/components/toggle/index.cjs +81 -0
- package/dist/components/toggle/index.d.cts +26 -0
- package/dist/components/toggle/index.d.ts +26 -0
- package/dist/components/toggle/index.js +9 -0
- package/dist/components/tooltip/index.cjs +95 -0
- package/dist/components/tooltip/index.d.cts +25 -0
- package/dist/components/tooltip/index.d.ts +25 -0
- package/dist/components/tooltip/index.js +13 -0
- package/dist/index.cjs +112 -96
- package/dist/index.d.cts +12 -105
- package/dist/index.d.ts +12 -105
- package/dist/index.js +104 -406
- package/package.json +206 -10
- package/CHANGELOG.md +0 -230
- package/postcss.config.mjs +0 -6
- package/registry.json +0 -64
- package/src/components/accordion/config.ts +0 -28
- package/src/components/accordion/index.tsx +0 -80
- package/src/components/alert/config.ts +0 -40
- package/src/components/alert/index.tsx +0 -80
- package/src/components/alert-dialog/config.ts +0 -28
- package/src/components/alert-dialog/index.tsx +0 -188
- package/src/components/aspect-ratio/config.ts +0 -27
- package/src/components/aspect-ratio/index.tsx +0 -24
- package/src/components/avatar/config.ts +0 -46
- package/src/components/avatar/index.tsx +0 -67
- package/src/components/badge/config.ts +0 -56
- package/src/components/badge/index.tsx +0 -56
- package/src/components/breadcrumb/config.ts +0 -121
- package/src/components/breadcrumb/index.tsx +0 -127
- package/src/components/button/config.ts +0 -97
- package/src/components/button/index.tsx +0 -86
- package/src/components/button-group/config.ts +0 -39
- package/src/components/button-group/index.tsx +0 -99
- package/src/components/card/config.ts +0 -89
- package/src/components/card/index.tsx +0 -90
- package/src/components/checkbox/config.ts +0 -46
- package/src/components/checkbox/index.tsx +0 -41
- package/src/components/collapsible/config.ts +0 -27
- package/src/components/collapsible/index.tsx +0 -47
- package/src/components/context-menu/config.ts +0 -28
- package/src/components/context-menu/index.tsx +0 -271
- package/src/components/dialog/config.ts +0 -582
- package/src/components/dialog/index.tsx +0 -162
- package/src/components/direction/config.ts +0 -28
- package/src/components/direction/index.tsx +0 -27
- package/src/components/drawer/config.ts +0 -28
- package/src/components/drawer/index.tsx +0 -153
- package/src/components/dropdown/config.ts +0 -262
- package/src/components/dropdown/index.tsx +0 -280
- package/src/components/empty/config.ts +0 -38
- package/src/components/empty/index.tsx +0 -127
- package/src/components/field/config.ts +0 -40
- package/src/components/field/index.tsx +0 -252
- package/src/components/hover-card/config.ts +0 -27
- package/src/components/hover-card/index.tsx +0 -56
- package/src/components/input/config.ts +0 -64
- package/src/components/input/index.tsx +0 -32
- package/src/components/input-group/config.ts +0 -209
- package/src/components/input-group/index.tsx +0 -177
- package/src/components/item/config.ts +0 -52
- package/src/components/item/index.tsx +0 -215
- package/src/components/kbd/config.ts +0 -38
- package/src/components/kbd/index.tsx +0 -40
- package/src/components/label/config.ts +0 -72
- package/src/components/label/index.tsx +0 -32
- package/src/components/menubar/config.ts +0 -28
- package/src/components/menubar/index.tsx +0 -295
- package/src/components/native-select/config.ts +0 -40
- package/src/components/native-select/index.tsx +0 -40
- package/src/components/navigation-menu/config.ts +0 -32
- package/src/components/navigation-menu/index.tsx +0 -188
- package/src/components/popover/config.ts +0 -222
- package/src/components/popover/index.tsx +0 -60
- package/src/components/progress/config.ts +0 -42
- package/src/components/progress/index.tsx +0 -39
- package/src/components/radio-group/config.ts +0 -303
- package/src/components/radio-group/index.tsx +0 -58
- package/src/components/resizable/config.ts +0 -28
- package/src/components/resizable/index.tsx +0 -67
- package/src/components/scroll-area/config.ts +0 -17
- package/src/components/scroll-area/index.tsx +0 -70
- package/src/components/select/config.ts +0 -277
- package/src/components/select/index.tsx +0 -202
- package/src/components/separator/config.ts +0 -63
- package/src/components/separator/index.tsx +0 -38
- package/src/components/sheet/config.ts +0 -16
- package/src/components/sheet/index.tsx +0 -153
- package/src/components/skeleton/config.ts +0 -77
- package/src/components/skeleton/index.tsx +0 -22
- package/src/components/slider/config.ts +0 -46
- package/src/components/slider/index.tsx +0 -76
- package/src/components/sonner/config.ts +0 -27
- package/src/components/sonner/index.tsx +0 -37
- package/src/components/spinner/config.ts +0 -40
- package/src/components/spinner/index.tsx +0 -30
- package/src/components/switch/config.ts +0 -171
- package/src/components/switch/index.tsx +0 -40
- package/src/components/table/config.ts +0 -38
- package/src/components/table/index.tsx +0 -135
- package/src/components/tabs/config.ts +0 -335
- package/src/components/tabs/index.tsx +0 -82
- package/src/components/textarea/config.ts +0 -117
- package/src/components/textarea/index.tsx +0 -26
- package/src/components/toggle/config.ts +0 -67
- package/src/components/toggle/index.tsx +0 -59
- package/src/components/toggle-group/config.ts +0 -46
- package/src/components/toggle-group/index.tsx +0 -106
- package/src/components/tooltip/config.ts +0 -16
- package/src/components/tooltip/index.tsx +0 -75
- package/src/components/typography/config.ts +0 -38
- package/src/components/typography/index.tsx +0 -172
- package/src/index.ts +0 -291
- package/tsconfig.json +0 -9
- package/tsconfig.lint.json +0 -8
- package/tsup.config.ts +0 -55
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/components/section/index.tsx
|
|
21
|
+
var section_exports = {};
|
|
22
|
+
__export(section_exports, {
|
|
23
|
+
Section: () => Section
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(section_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
function Section({ theme, className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
29
|
+
"section",
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "section",
|
|
32
|
+
"data-section-theme": theme && theme !== "default" ? theme : void 0,
|
|
33
|
+
className: ["py-12 md:py-20", className].filter(Boolean).join(" "),
|
|
34
|
+
...props
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
Section
|
|
41
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/** Section themes @foundrykit/tailwind ships; a site can add its own names. */
|
|
5
|
+
type SectionTheme = 'default' | 'light' | 'dark' | 'brand' | 'muted' | (string & {});
|
|
6
|
+
interface SectionProps extends React.ComponentProps<'section'> {
|
|
7
|
+
/**
|
|
8
|
+
* Sets `data-section-theme`, which sets the `--section-*` tokens and points
|
|
9
|
+
* the semantic colours (background, foreground, primary…) at them, so the
|
|
10
|
+
* primitives inside follow. `default` (or none) inherits the page.
|
|
11
|
+
*/
|
|
12
|
+
theme?: SectionTheme | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A page section with a colour theme. Name it with `aria-labelledby` (its
|
|
16
|
+
* heading's id) so assistive tech lists it as a region landmark.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Section theme='dark' aria-labelledby='faq-heading'>
|
|
21
|
+
* <h2 id='faq-heading'>Questions</h2>
|
|
22
|
+
* </Section>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare function Section({ theme, className, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { Section, type SectionProps, type SectionTheme };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/** Section themes @foundrykit/tailwind ships; a site can add its own names. */
|
|
5
|
+
type SectionTheme = 'default' | 'light' | 'dark' | 'brand' | 'muted' | (string & {});
|
|
6
|
+
interface SectionProps extends React.ComponentProps<'section'> {
|
|
7
|
+
/**
|
|
8
|
+
* Sets `data-section-theme`, which sets the `--section-*` tokens and points
|
|
9
|
+
* the semantic colours (background, foreground, primary…) at them, so the
|
|
10
|
+
* primitives inside follow. `default` (or none) inherits the page.
|
|
11
|
+
*/
|
|
12
|
+
theme?: SectionTheme | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A page section with a colour theme. Name it with `aria-labelledby` (its
|
|
16
|
+
* heading's id) so assistive tech lists it as a region landmark.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Section theme='dark' aria-labelledby='faq-heading'>
|
|
21
|
+
* <h2 id='faq-heading'>Questions</h2>
|
|
22
|
+
* </Section>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare function Section({ theme, className, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { Section, type SectionProps, type SectionTheme };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/components/sheet/index.tsx
|
|
32
|
+
var sheet_exports = {};
|
|
33
|
+
__export(sheet_exports, {
|
|
34
|
+
Sheet: () => Sheet,
|
|
35
|
+
SheetClose: () => SheetClose,
|
|
36
|
+
SheetContent: () => SheetContent,
|
|
37
|
+
SheetDescription: () => SheetDescription,
|
|
38
|
+
SheetFooter: () => SheetFooter,
|
|
39
|
+
SheetHeader: () => SheetHeader,
|
|
40
|
+
SheetTitle: () => SheetTitle,
|
|
41
|
+
SheetTrigger: () => SheetTrigger
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(sheet_exports);
|
|
44
|
+
var import_utils = require("@foundrykit/utils");
|
|
45
|
+
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
46
|
+
var import_lucide_react = require("lucide-react");
|
|
47
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
|
+
function Sheet({ ...props }) {
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
50
|
+
}
|
|
51
|
+
function SheetTrigger({
|
|
52
|
+
...props
|
|
53
|
+
}) {
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
55
|
+
}
|
|
56
|
+
function SheetClose({
|
|
57
|
+
...props
|
|
58
|
+
}) {
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
60
|
+
}
|
|
61
|
+
function SheetPortal({
|
|
62
|
+
...props
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
65
|
+
}
|
|
66
|
+
function SheetOverlay({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
SheetPrimitive.Overlay,
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "sheet-overlay",
|
|
74
|
+
className: (0, import_utils.cn)(
|
|
75
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
76
|
+
className
|
|
77
|
+
),
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
function SheetContent({
|
|
83
|
+
className,
|
|
84
|
+
children,
|
|
85
|
+
side = "right",
|
|
86
|
+
...props
|
|
87
|
+
}) {
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetPortal, { children: [
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetOverlay, {}),
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
91
|
+
SheetPrimitive.Content,
|
|
92
|
+
{
|
|
93
|
+
"data-slot": "sheet-content",
|
|
94
|
+
className: (0, import_utils.cn)(
|
|
95
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
96
|
+
side === "right" && "motion-safe:data-[state=closed]:slide-out-to-right motion-safe:data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
97
|
+
side === "left" && "motion-safe:data-[state=closed]:slide-out-to-left motion-safe:data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
98
|
+
side === "top" && "motion-safe:data-[state=closed]:slide-out-to-top motion-safe:data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
99
|
+
side === "bottom" && "motion-safe:data-[state=closed]:slide-out-to-bottom motion-safe:data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
...props,
|
|
103
|
+
children: [
|
|
104
|
+
children,
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.XIcon, { className: "size-4" }),
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
|
|
108
|
+
] })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] });
|
|
113
|
+
}
|
|
114
|
+
function SheetHeader({ className, ...props }) {
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
"data-slot": "sheet-header",
|
|
119
|
+
className: (0, import_utils.cn)("flex flex-col gap-1.5 p-4", className),
|
|
120
|
+
...props
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function SheetFooter({ className, ...props }) {
|
|
125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
"data-slot": "sheet-footer",
|
|
129
|
+
className: (0, import_utils.cn)("mt-auto flex flex-col gap-2 p-4", className),
|
|
130
|
+
...props
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function SheetTitle({
|
|
135
|
+
className,
|
|
136
|
+
...props
|
|
137
|
+
}) {
|
|
138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
|
+
SheetPrimitive.Title,
|
|
140
|
+
{
|
|
141
|
+
"data-slot": "sheet-title",
|
|
142
|
+
className: (0, import_utils.cn)("text-foreground font-semibold", className),
|
|
143
|
+
...props
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
function SheetDescription({
|
|
148
|
+
className,
|
|
149
|
+
...props
|
|
150
|
+
}) {
|
|
151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
152
|
+
SheetPrimitive.Description,
|
|
153
|
+
{
|
|
154
|
+
"data-slot": "sheet-description",
|
|
155
|
+
className: (0, import_utils.cn)("text-muted-foreground text-sm", className),
|
|
156
|
+
...props
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
161
|
+
0 && (module.exports = {
|
|
162
|
+
Sheet,
|
|
163
|
+
SheetClose,
|
|
164
|
+
SheetContent,
|
|
165
|
+
SheetDescription,
|
|
166
|
+
SheetFooter,
|
|
167
|
+
SheetHeader,
|
|
168
|
+
SheetTitle,
|
|
169
|
+
SheetTrigger
|
|
170
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Slide-in panel (drawer) built on the Radix Dialog primitive. Compose with
|
|
7
|
+
* {@link SheetTrigger}, {@link SheetContent}, {@link SheetHeader},
|
|
8
|
+
* {@link SheetTitle}, {@link SheetDescription} and {@link SheetFooter}.
|
|
9
|
+
* {@link SheetContent} slides from a chosen `side` and includes a close button.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Sheet>
|
|
14
|
+
* <SheetTrigger>Open</SheetTrigger>
|
|
15
|
+
* <SheetContent side="left">...</SheetContent>
|
|
16
|
+
* </Sheet>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function Sheet({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
/** Portalled sheet panel that slides in from `side` (`top`/`right`/`bottom`/`left`, default `right`) over an overlay, with a built-in close button. */
|
|
23
|
+
declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
24
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
25
|
+
}): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
28
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Slide-in panel (drawer) built on the Radix Dialog primitive. Compose with
|
|
7
|
+
* {@link SheetTrigger}, {@link SheetContent}, {@link SheetHeader},
|
|
8
|
+
* {@link SheetTitle}, {@link SheetDescription} and {@link SheetFooter}.
|
|
9
|
+
* {@link SheetContent} slides from a chosen `side` and includes a close button.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Sheet>
|
|
14
|
+
* <SheetTrigger>Open</SheetTrigger>
|
|
15
|
+
* <SheetContent side="left">...</SheetContent>
|
|
16
|
+
* </Sheet>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function Sheet({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
/** Portalled sheet panel that slides in from `side` (`top`/`right`/`bottom`/`left`, default `right`) over an overlay, with a built-in close button. */
|
|
23
|
+
declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
24
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
25
|
+
}): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
28
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
30
|
+
|
|
31
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Sheet,
|
|
4
|
+
SheetClose,
|
|
5
|
+
SheetContent,
|
|
6
|
+
SheetDescription,
|
|
7
|
+
SheetFooter,
|
|
8
|
+
SheetHeader,
|
|
9
|
+
SheetTitle,
|
|
10
|
+
SheetTrigger
|
|
11
|
+
} from "../../chunk-3NQR7JZR.js";
|
|
12
|
+
export {
|
|
13
|
+
Sheet,
|
|
14
|
+
SheetClose,
|
|
15
|
+
SheetContent,
|
|
16
|
+
SheetDescription,
|
|
17
|
+
SheetFooter,
|
|
18
|
+
SheetHeader,
|
|
19
|
+
SheetTitle,
|
|
20
|
+
SheetTrigger
|
|
21
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/components/toggle/index.tsx
|
|
32
|
+
var toggle_exports = {};
|
|
33
|
+
__export(toggle_exports, {
|
|
34
|
+
Toggle: () => Toggle,
|
|
35
|
+
toggleVariants: () => toggleVariants
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(toggle_exports);
|
|
38
|
+
var import_utils = require("@foundrykit/utils");
|
|
39
|
+
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
40
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
+
var toggleVariants = (0, import_class_variance_authority.cva)(
|
|
43
|
+
"hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
44
|
+
{
|
|
45
|
+
variants: {
|
|
46
|
+
variant: {
|
|
47
|
+
default: "bg-transparent",
|
|
48
|
+
outline: "border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs"
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
default: "h-9 min-w-9 px-2",
|
|
52
|
+
sm: "h-8 min-w-8 px-1.5",
|
|
53
|
+
lg: "h-10 min-w-10 px-2.5"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
variant: "default",
|
|
58
|
+
size: "default"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
function Toggle({
|
|
63
|
+
className,
|
|
64
|
+
variant,
|
|
65
|
+
size,
|
|
66
|
+
...props
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
+
TogglePrimitive.Root,
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "toggle",
|
|
72
|
+
className: (0, import_utils.cn)(toggleVariants({ variant, size, className })),
|
|
73
|
+
...props
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
78
|
+
0 && (module.exports = {
|
|
79
|
+
Toggle,
|
|
80
|
+
toggleVariants
|
|
81
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
|
|
7
|
+
declare const toggleVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "outline" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Two-state toggle button built on Radix `Toggle.Root`, styled via
|
|
13
|
+
* {@link toggleVariants} with a `variant` (default, outline) and `size`
|
|
14
|
+
* (default, sm, lg). Control the pressed state with Radix
|
|
15
|
+
* `pressed`/`onPressedChange`.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Toggle variant="outline" pressed={bold} onPressedChange={setBold}>
|
|
20
|
+
* <BoldIcon />
|
|
21
|
+
* </Toggle>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
|
|
7
|
+
declare const toggleVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "outline" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Two-state toggle button built on Radix `Toggle.Root`, styled via
|
|
13
|
+
* {@link toggleVariants} with a `variant` (default, outline) and `size`
|
|
14
|
+
* (default, sm, lg). Control the pressed state with Radix
|
|
15
|
+
* `pressed`/`onPressedChange`.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Toggle variant="outline" pressed={bold} onPressedChange={setBold}>
|
|
20
|
+
* <BoldIcon />
|
|
21
|
+
* </Toggle>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/components/tooltip/index.tsx
|
|
32
|
+
var tooltip_exports = {};
|
|
33
|
+
__export(tooltip_exports, {
|
|
34
|
+
Tooltip: () => Tooltip,
|
|
35
|
+
TooltipContent: () => TooltipContent,
|
|
36
|
+
TooltipProvider: () => TooltipProvider,
|
|
37
|
+
TooltipTrigger: () => TooltipTrigger
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(tooltip_exports);
|
|
40
|
+
var import_utils = require("@foundrykit/utils");
|
|
41
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
function TooltipProvider({
|
|
44
|
+
delayDuration = 0,
|
|
45
|
+
...props
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
TooltipPrimitive.Provider,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "tooltip-provider",
|
|
51
|
+
delayDuration,
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
function Tooltip({
|
|
57
|
+
...props
|
|
58
|
+
}) {
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
60
|
+
}
|
|
61
|
+
function TooltipTrigger({
|
|
62
|
+
...props
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
65
|
+
}
|
|
66
|
+
function TooltipContent({
|
|
67
|
+
className,
|
|
68
|
+
sideOffset = 0,
|
|
69
|
+
children,
|
|
70
|
+
...props
|
|
71
|
+
}) {
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
73
|
+
TooltipPrimitive.Content,
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "tooltip-content",
|
|
76
|
+
sideOffset,
|
|
77
|
+
className: (0, import_utils.cn)(
|
|
78
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 motion-safe:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
79
|
+
className
|
|
80
|
+
),
|
|
81
|
+
...props,
|
|
82
|
+
children: [
|
|
83
|
+
children,
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
) });
|
|
88
|
+
}
|
|
89
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
+
0 && (module.exports = {
|
|
91
|
+
Tooltip,
|
|
92
|
+
TooltipContent,
|
|
93
|
+
TooltipProvider,
|
|
94
|
+
TooltipTrigger
|
|
95
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/** Radix `Tooltip.Provider` wrapper (default `delayDuration` 0); wrap the app to share tooltip timing. */
|
|
6
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Tooltip root built on Radix `Tooltip.Root`. Wraps itself in a
|
|
9
|
+
* {@link TooltipProvider} (default `delayDuration` 0), so it works standalone.
|
|
10
|
+
* Compose with {@link TooltipTrigger} and {@link TooltipContent} (portalled,
|
|
11
|
+
* animated, with an arrow).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Tooltip>
|
|
16
|
+
* <TooltipTrigger>Hover</TooltipTrigger>
|
|
17
|
+
* <TooltipContent>Details</TooltipContent>
|
|
18
|
+
* </Tooltip>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/** Radix `Tooltip.Provider` wrapper (default `delayDuration` 0); wrap the app to share tooltip timing. */
|
|
6
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Tooltip root built on Radix `Tooltip.Root`. Wraps itself in a
|
|
9
|
+
* {@link TooltipProvider} (default `delayDuration` 0), so it works standalone.
|
|
10
|
+
* Compose with {@link TooltipTrigger} and {@link TooltipContent} (portalled,
|
|
11
|
+
* animated, with an arrow).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Tooltip>
|
|
16
|
+
* <TooltipTrigger>Hover</TooltipTrigger>
|
|
17
|
+
* <TooltipContent>Details</TooltipContent>
|
|
18
|
+
* </Tooltip>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|