beez-ui 2.7.1 → 3.0.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/CHANGELOG.md +78 -0
- package/README.md +43 -13
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/components/account-menu.d.ts +4 -3
- package/dist/components/account-menu.js +63 -54
- package/dist/components/alert.d.ts +15 -15
- package/dist/components/alert.js +289 -270
- package/dist/components/animated-theme-toggler.js +1 -1
- package/dist/components/avatar.d.ts +56 -31
- package/dist/components/avatar.js +394 -277
- package/dist/components/badge.d.ts +8 -28
- package/dist/components/badge.js +55 -108
- package/dist/components/calendar.d.ts +36 -26
- package/dist/components/calendar.js +132 -1227
- package/dist/components/card.d.ts +36 -25
- package/dist/components/card.js +895 -72
- package/dist/components/carousel.d.ts +63 -47
- package/dist/components/carousel.js +496 -777
- package/dist/components/data-table.d.ts +5 -4
- package/dist/components/data-table.js +7 -6
- package/dist/components/dialog-surface.d.ts +23 -1
- package/dist/components/dialog-surface.js +99 -3
- package/dist/components/dialog.d.ts +80 -45
- package/dist/components/dialog.js +258 -503
- package/dist/components/dropdown-menu.d.ts +56 -73
- package/dist/components/dropdown-menu.js +79 -714
- package/dist/components/field.d.ts +3 -1
- package/dist/components/field.js +49 -39
- package/dist/components/filter-presets-bar.js +2 -2
- package/dist/components/filter-query-bar.js +1 -1
- package/dist/components/hover-card.d.ts +42 -41
- package/dist/components/hover-card.js +57 -483
- package/dist/components/pagination.d.ts +53 -31
- package/dist/components/pagination.js +176 -412
- package/dist/components/popover.d.ts +11 -23
- package/dist/components/popover.js +19 -304
- package/dist/components/{alert-dialog.d.ts → primitives/alert-dialog.d.ts} +17 -5
- package/dist/components/{alert-dialog.js → primitives/alert-dialog.js} +102 -54
- package/dist/components/primitives/avatar.d.ts +46 -0
- package/dist/components/primitives/avatar.js +268 -0
- package/dist/components/primitives/calendar.d.ts +37 -0
- package/dist/components/primitives/calendar.js +1250 -0
- package/dist/components/primitives/carousel.d.ts +106 -0
- package/dist/components/primitives/carousel.js +928 -0
- package/dist/components/primitives/dialog.d.ts +62 -0
- package/dist/components/primitives/dialog.js +490 -0
- package/dist/components/primitives/dropdown-menu-items.d.ts +59 -0
- package/dist/components/primitives/dropdown-menu-items.js +265 -0
- package/dist/components/primitives/dropdown-menu.d.ts +64 -0
- package/dist/components/primitives/dropdown-menu.js +557 -0
- package/dist/components/primitives/hover-card.d.ts +50 -0
- package/dist/components/primitives/hover-card.js +507 -0
- package/dist/components/primitives/pagination.d.ts +65 -0
- package/dist/components/primitives/pagination.js +373 -0
- package/dist/components/primitives/popover.d.ts +22 -0
- package/dist/components/primitives/popover.js +213 -0
- package/dist/components/primitives/select.d.ts +36 -0
- package/dist/components/primitives/select.js +407 -0
- package/dist/components/primitives/tooltip.d.ts +30 -0
- package/dist/components/primitives/tooltip.js +277 -0
- package/dist/components/radio-group.d.ts +30 -17
- package/dist/components/radio-group.js +266 -315
- package/dist/components/rich-link-editor.js +1 -1
- package/dist/components/select.d.ts +51 -42
- package/dist/components/select.js +163 -495
- package/dist/components/skeleton.d.ts +16 -15
- package/dist/components/skeleton.js +99 -205
- package/dist/components/split-button.js +1 -1
- package/dist/components/switch.d.ts +3 -6
- package/dist/components/switch.js +163 -170
- package/dist/components/tabs.d.ts +3 -11
- package/dist/components/tabs.js +61 -75
- package/dist/components/themed-toaster.d.ts +1 -1
- package/dist/components/themed-toaster.js +1 -1
- package/dist/components/toaster.d.ts +1 -1
- package/dist/components/toaster.js +1 -1
- package/dist/components/tooltip.d.ts +36 -31
- package/dist/components/tooltip.js +44 -284
- package/dist/constants/alert.d.ts +5 -1
- package/dist/constants/alert.js +5 -1
- package/dist/constants/avatar.d.ts +29 -1
- package/dist/constants/avatar.js +25 -0
- package/dist/constants/calendar.d.ts +12 -0
- package/dist/constants/calendar.js +12 -0
- package/dist/constants/card.d.ts +23 -0
- package/dist/constants/card.js +20 -0
- package/dist/constants/carousel.d.ts +31 -13
- package/dist/constants/carousel.js +32 -11
- package/dist/constants/dialog.d.ts +6 -1
- package/dist/constants/dialog.js +5 -1
- package/dist/constants/dropdown-menu.d.ts +2 -2
- package/dist/constants/dropdown-menu.js +2 -2
- package/dist/constants/pagination.d.ts +13 -2
- package/dist/constants/pagination.js +13 -2
- package/dist/constants/select.d.ts +4 -2
- package/dist/constants/select.js +4 -2
- package/dist/constants/switch.d.ts +5 -16
- package/dist/constants/switch.js +6 -14
- package/dist/hooks/use-today.d.ts +7 -0
- package/dist/hooks/use-today.js +50 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/motion/glide-indicator.d.ts +1 -1
- package/dist/motion/glide-indicator.js +1 -1
- package/dist/motion/presence.d.ts +0 -1
- package/dist/motion/presence.js +0 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -6
package/dist/components/tabs.js
CHANGED
|
@@ -7,7 +7,6 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
7
7
|
* panel. Radix keeps the roles, keyboard navigation and controlled or uncontrolled value.
|
|
8
8
|
*/
|
|
9
9
|
import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
|
|
10
|
-
import { cva } from "class-variance-authority";
|
|
11
10
|
import { Slot, Tabs as TabsPrimitive } from "radix-ui";
|
|
12
11
|
import { AnimatePresence, animate, motion, useIsPresent } from "motion/react";
|
|
13
12
|
import { TABS_DIRECTION, TABS_PANEL_HEIGHT_TOLERANCE_PX, TABS_PANEL_OFFSET_PX, TABS_PANEL_REDUCED_EXIT_DURATION_S, TABS_REVEAL_MARGIN_PX } from "../constants/tabs.js";
|
|
@@ -167,16 +166,10 @@ function Tabs(t0) {
|
|
|
167
166
|
return t6;
|
|
168
167
|
}
|
|
169
168
|
/**
|
|
170
|
-
* Arc's segmented list
|
|
171
|
-
*
|
|
169
|
+
* Arc's segmented list: a muted track whose active trigger is a raised surface. Horizontal lists scroll sideways
|
|
170
|
+
* without a visible scrollbar.
|
|
172
171
|
*/
|
|
173
|
-
const
|
|
174
|
-
variants: { variant: {
|
|
175
|
-
default: "gap-(--space-1) rounded-(--radius-control) border border-border bg-surface-muted p-(--space-1)",
|
|
176
|
-
line: "gap-(--space-1) bg-transparent"
|
|
177
|
-
} },
|
|
178
|
-
defaultVariants: { variant: "default" }
|
|
179
|
-
});
|
|
172
|
+
const tabsListClassName = "group/tabs-list inline-flex w-fit max-w-full min-w-0 items-center gap-(--space-1) rounded-(--radius-control) border border-border bg-surface-muted p-(--space-1) text-text-muted group-data-horizontal/tabs:overflow-x-auto group-data-horizontal/tabs:[scrollbar-width:none] group-data-horizontal/tabs:[&::-webkit-scrollbar]:hidden group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col";
|
|
180
173
|
/**
|
|
181
174
|
* Scrolls a horizontally overflowing list just enough to show the trigger, never the page around it. The target is an
|
|
182
175
|
* absolute offset, so a second call while a smooth scroll is still running (focus and selection both reveal the
|
|
@@ -202,39 +195,35 @@ function revealTrigger(list, trigger, reduceMotion) {
|
|
|
202
195
|
/**
|
|
203
196
|
* Holds the triggers. The active highlight glides to the newly selected trigger and the list scrolls to keep the
|
|
204
197
|
* active or focused trigger visible.
|
|
205
|
-
* @param props - Radix list props,
|
|
198
|
+
* @param props - Radix list props, including `aria-label`, `loop` and `ref`.
|
|
206
199
|
* @returns The tab list.
|
|
207
200
|
*/
|
|
208
201
|
function TabsList(t0) {
|
|
209
|
-
const $ = _c(
|
|
202
|
+
const $ = _c(28);
|
|
210
203
|
let className;
|
|
211
204
|
let onFocusCapture;
|
|
212
205
|
let props;
|
|
213
206
|
let ref;
|
|
214
|
-
let t1;
|
|
215
207
|
if ($[0] !== t0) {
|
|
216
|
-
({className,
|
|
208
|
+
({className, ref, onFocusCapture, ...props} = t0);
|
|
217
209
|
$[0] = t0;
|
|
218
210
|
$[1] = className;
|
|
219
211
|
$[2] = onFocusCapture;
|
|
220
212
|
$[3] = props;
|
|
221
213
|
$[4] = ref;
|
|
222
|
-
$[5] = t1;
|
|
223
214
|
} else {
|
|
224
215
|
className = $[1];
|
|
225
216
|
onFocusCapture = $[2];
|
|
226
217
|
props = $[3];
|
|
227
218
|
ref = $[4];
|
|
228
|
-
t1 = $[5];
|
|
229
219
|
}
|
|
230
|
-
const variant = t1 === undefined ? "default" : t1;
|
|
231
220
|
const motionState = useContext(TabsMotionContext);
|
|
232
221
|
const reduceMotion = usePrefersReducedMotion();
|
|
233
222
|
const [list, attachList] = useAttachedElement(ref);
|
|
234
223
|
const activeValue = motionState?.activeValue;
|
|
235
|
-
let
|
|
236
|
-
if ($[
|
|
237
|
-
|
|
224
|
+
let t1;
|
|
225
|
+
if ($[5] !== list || $[6] !== motionState?.orientation || $[7] !== reduceMotion) {
|
|
226
|
+
t1 = () => {
|
|
238
227
|
if (!list || motionState?.orientation === "vertical") {
|
|
239
228
|
return;
|
|
240
229
|
}
|
|
@@ -246,34 +235,34 @@ function TabsList(t0) {
|
|
|
246
235
|
}
|
|
247
236
|
return () => observer.disconnect();
|
|
248
237
|
};
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
238
|
+
$[5] = list;
|
|
239
|
+
$[6] = motionState?.orientation;
|
|
240
|
+
$[7] = reduceMotion;
|
|
241
|
+
$[8] = t1;
|
|
253
242
|
} else {
|
|
254
|
-
|
|
243
|
+
t1 = $[8];
|
|
255
244
|
}
|
|
256
|
-
const
|
|
257
|
-
let
|
|
258
|
-
if ($[
|
|
259
|
-
|
|
245
|
+
const t2 = motionState?.orientation;
|
|
246
|
+
let t3;
|
|
247
|
+
if ($[9] !== activeValue || $[10] !== list || $[11] !== reduceMotion || $[12] !== t2) {
|
|
248
|
+
t3 = [
|
|
260
249
|
list,
|
|
261
250
|
activeValue,
|
|
262
|
-
|
|
251
|
+
t2,
|
|
263
252
|
reduceMotion
|
|
264
253
|
];
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
254
|
+
$[9] = activeValue;
|
|
255
|
+
$[10] = list;
|
|
256
|
+
$[11] = reduceMotion;
|
|
257
|
+
$[12] = t2;
|
|
268
258
|
$[13] = t3;
|
|
269
|
-
$[14] = t4;
|
|
270
259
|
} else {
|
|
271
|
-
|
|
260
|
+
t3 = $[13];
|
|
272
261
|
}
|
|
273
|
-
useLayoutEffect(
|
|
274
|
-
let
|
|
275
|
-
if ($[
|
|
276
|
-
|
|
262
|
+
useLayoutEffect(t1, t3);
|
|
263
|
+
let t4;
|
|
264
|
+
if ($[14] !== list || $[15] !== motionState?.orientation || $[16] !== onFocusCapture || $[17] !== reduceMotion) {
|
|
265
|
+
t4 = function handleFocusCapture(event) {
|
|
277
266
|
onFocusCapture?.(event);
|
|
278
267
|
if (!list || motionState?.orientation === "vertical") {
|
|
279
268
|
return;
|
|
@@ -282,55 +271,52 @@ function TabsList(t0) {
|
|
|
282
271
|
revealTrigger(list, event.target, reduceMotion);
|
|
283
272
|
}
|
|
284
273
|
};
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
274
|
+
$[14] = list;
|
|
275
|
+
$[15] = motionState?.orientation;
|
|
276
|
+
$[16] = onFocusCapture;
|
|
277
|
+
$[17] = reduceMotion;
|
|
278
|
+
$[18] = t4;
|
|
290
279
|
} else {
|
|
291
|
-
|
|
280
|
+
t4 = $[18];
|
|
292
281
|
}
|
|
293
|
-
const handleFocusCapture =
|
|
294
|
-
let
|
|
295
|
-
if ($[
|
|
296
|
-
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[22] = t6;
|
|
282
|
+
const handleFocusCapture = t4;
|
|
283
|
+
let t5;
|
|
284
|
+
if ($[19] !== className) {
|
|
285
|
+
t5 = cn(tabsListClassName, className);
|
|
286
|
+
$[19] = className;
|
|
287
|
+
$[20] = t5;
|
|
300
288
|
} else {
|
|
301
|
-
|
|
289
|
+
t5 = $[20];
|
|
302
290
|
}
|
|
303
|
-
let
|
|
304
|
-
if ($[
|
|
305
|
-
|
|
291
|
+
let t6;
|
|
292
|
+
if ($[21] !== handleFocusCapture || $[22] !== props || $[23] !== t5) {
|
|
293
|
+
t6 = /* @__PURE__ */ _jsx(TabsPrimitive.List, {
|
|
306
294
|
"data-slot": "tabs-list",
|
|
307
|
-
|
|
308
|
-
className: t6,
|
|
295
|
+
className: t5,
|
|
309
296
|
onFocusCapture: handleFocusCapture,
|
|
310
297
|
...props
|
|
311
298
|
});
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[27] = t7;
|
|
299
|
+
$[21] = handleFocusCapture;
|
|
300
|
+
$[22] = props;
|
|
301
|
+
$[23] = t5;
|
|
302
|
+
$[24] = t6;
|
|
317
303
|
} else {
|
|
318
|
-
|
|
304
|
+
t6 = $[24];
|
|
319
305
|
}
|
|
320
|
-
let
|
|
321
|
-
if ($[
|
|
322
|
-
|
|
306
|
+
let t7;
|
|
307
|
+
if ($[25] !== attachList || $[26] !== t6) {
|
|
308
|
+
t7 = /* @__PURE__ */ _jsx(GlideSlot, {
|
|
323
309
|
preset: "tabs",
|
|
324
310
|
ref: attachList,
|
|
325
|
-
children:
|
|
311
|
+
children: t6
|
|
326
312
|
});
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
313
|
+
$[25] = attachList;
|
|
314
|
+
$[26] = t6;
|
|
315
|
+
$[27] = t7;
|
|
330
316
|
} else {
|
|
331
|
-
|
|
317
|
+
t7 = $[27];
|
|
332
318
|
}
|
|
333
|
-
return
|
|
319
|
+
return t7;
|
|
334
320
|
}
|
|
335
321
|
/**
|
|
336
322
|
* Selects a panel. Arc's trigger: muted label, accent label once active, hover only on fine pointers and the
|
|
@@ -356,7 +342,7 @@ function TabsTrigger(t0) {
|
|
|
356
342
|
}
|
|
357
343
|
let t1;
|
|
358
344
|
if ($[4] !== className) {
|
|
359
|
-
t1 = cn("relative inline-flex min-h-(--control-height-sm) min-w-[5.5rem] flex-[1_0_auto] cursor-pointer items-center justify-center gap-1.5 rounded-[calc(var(--radius-control)-3px)] border border-transparent bg-transparent px-(--space-3) font-sans text-sm font-medium whitespace-nowrap text-text-muted [-webkit-tap-highlight-color:transparent] transition-[color,background-color,border-color,box-shadow] duration-(--duration-fast) ease-(--ease-standard) select-none motion-reduce:transition-none hover-fine:text-foreground active:text-foreground disabled:cursor-not-allowed disabled:opacity-50 data-active:text-(--accent-strong) group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "
|
|
345
|
+
t1 = cn("relative inline-flex min-h-(--control-height-sm) min-w-[5.5rem] flex-[1_0_auto] cursor-pointer items-center justify-center gap-1.5 rounded-[calc(var(--radius-control)-3px)] border border-transparent bg-transparent px-(--space-3) font-sans text-sm font-medium whitespace-nowrap text-text-muted [-webkit-tap-highlight-color:transparent] transition-[color,background-color,border-color,box-shadow] duration-(--duration-fast) ease-(--ease-standard) select-none motion-reduce:transition-none hover-fine:text-foreground active:text-foreground disabled:cursor-not-allowed disabled:opacity-50 data-active:text-(--accent-strong) group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "data-active:border-border data-active:bg-surface data-active:shadow-(--shadow-resting)", className);
|
|
360
346
|
$[4] = className;
|
|
361
347
|
$[5] = t1;
|
|
362
348
|
} else {
|
|
@@ -647,4 +633,4 @@ function TabsContent(t0) {
|
|
|
647
633
|
}
|
|
648
634
|
return t5;
|
|
649
635
|
}
|
|
650
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent
|
|
636
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ToasterProps } from "sonner";
|
|
2
2
|
/**
|
|
3
3
|
* Renders shared notification styling using the consumer's resolved theme, on top of beez-ui's `Toaster`, so its
|
|
4
|
-
* toasts stay usable from an open `Dialog
|
|
4
|
+
* toasts stay usable from an open `Dialog` (also in `alert` mode) or `Sheet`.
|
|
5
5
|
*/
|
|
6
6
|
declare const ThemedToaster: ({ theme, className, ...props }: ToasterProps) => import("react").JSX.Element;
|
|
7
7
|
export { ThemedToaster };
|
|
@@ -8,7 +8,7 @@ import { CircleCheck, Info, TriangleAlert, OctagonAlert, Loader } from "lucide-r
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
/**
|
|
10
10
|
* Renders shared notification styling using the consumer's resolved theme, on top of beez-ui's `Toaster`, so its
|
|
11
|
-
* toasts stay usable from an open `Dialog
|
|
11
|
+
* toasts stay usable from an open `Dialog` (also in `alert` mode) or `Sheet`.
|
|
12
12
|
*/
|
|
13
13
|
const ThemedToaster = (t0) => {
|
|
14
14
|
const $ = _c(16);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps } from "react";
|
|
2
2
|
import { Toaster as SonnerToaster } from "sonner";
|
|
3
3
|
/**
|
|
4
|
-
* Renders Sonner's toaster unchanged in look, but keeps its toasts usable while a modal `Dialog
|
|
4
|
+
* Renders Sonner's toaster unchanged in look, but keeps its toasts usable while a modal `Dialog` (also in `alert` mode) or
|
|
5
5
|
* `Sheet` is open: the toast layer takes pointer input even though the modal disables pointer events on the page,
|
|
6
6
|
* and Sonner's hotkey moves keyboard focus into the toasts past the modal's focus trap (focus returns to the modal
|
|
7
7
|
* when the focused toast goes away). Accepts every Sonner prop, including `ref`, and keeps the consumer's `className`.
|
|
@@ -6,7 +6,7 @@ import { useEffect } from "react";
|
|
|
6
6
|
import { Toaster as SonnerToaster } from "sonner";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
/**
|
|
9
|
-
* Renders Sonner's toaster unchanged in look, but keeps its toasts usable while a modal `Dialog
|
|
9
|
+
* Renders Sonner's toaster unchanged in look, but keeps its toasts usable while a modal `Dialog` (also in `alert` mode) or
|
|
10
10
|
* `Sheet` is open: the toast layer takes pointer input even though the modal disables pointer events on the page,
|
|
11
11
|
* and Sonner's hotkey moves keyboard focus into the toasts past the modal's focus trap (focus returns to the modal
|
|
12
12
|
* when the focused toast goes away). Accepts every Sonner prop, including `ref`, and keeps the consumer's `className`.
|
|
@@ -1,38 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Arc's Tooltip (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a short dark bubble on Arc's tokens that
|
|
3
3
|
* waits a moment, then rises a few pixels from its trigger. While a tooltip is open, and briefly after it closes, the
|
|
4
|
-
* next one opens at once and only fades
|
|
5
|
-
*
|
|
4
|
+
* next one opens at once and only fades, without any app-level provider: the skip window is shared by every tooltip
|
|
5
|
+
* on the page. It follows Arc's closed API, `<Tooltip content="...">` around its trigger, plus placement and open
|
|
6
|
+
* state extensions.
|
|
6
7
|
*/
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
|
|
8
|
+
import type { ReactElement, ReactNode } from "react";
|
|
9
|
+
/** Side of the trigger a tooltip prefers. Arc offers `top` and `bottom`; beez-ui adds `left` and `right`. */
|
|
10
|
+
export type TooltipSide = "top" | "bottom" | "left" | "right";
|
|
11
|
+
/** Alignment of the bubble against its trigger. */
|
|
12
|
+
export type TooltipAlign = "start" | "center" | "end";
|
|
13
|
+
export type TooltipProps = {
|
|
14
|
+
/** Supplemental text of the bubble. Icon-only triggers still need their own `aria-label`. */
|
|
15
|
+
content: ReactNode;
|
|
16
|
+
/** The trigger. Rendered with `asChild`, so it must accept a ref and be focusable. */
|
|
17
|
+
children: ReactElement;
|
|
18
|
+
/** Preferred side of the trigger. Defaults to `top`. */
|
|
19
|
+
side?: TooltipSide;
|
|
20
|
+
/** Alignment against the trigger. Defaults to `center`. */
|
|
21
|
+
align?: TooltipAlign;
|
|
22
|
+
/** Gap, in px, between the bubble and its trigger. Defaults to 8. */
|
|
23
|
+
sideOffset?: number;
|
|
24
|
+
/** Distance, in px, the bubble keeps from the viewport edges. Defaults to 12. */
|
|
25
|
+
collisionPadding?: number;
|
|
26
|
+
/** Class added to the bubble. */
|
|
27
|
+
contentClassName?: string;
|
|
28
|
+
/** Controlled open state. */
|
|
29
|
+
open?: boolean;
|
|
30
|
+
/** Initial open state when uncontrolled. */
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
/** Called when the tooltip opens or closes. */
|
|
33
|
+
onOpenChange?: (open: boolean) => void;
|
|
34
|
+
/** Milliseconds of hover or focus before the first tooltip opens. Defaults to Arc's 250. */
|
|
35
|
+
delayDuration?: number;
|
|
23
36
|
};
|
|
24
37
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
28
|
-
* @returns The tooltip root.
|
|
29
|
-
*/
|
|
30
|
-
declare function Tooltip({ content, side, children, delayDuration, ...props }: TooltipProps): React.JSX.Element;
|
|
31
|
-
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
32
|
-
/**
|
|
33
|
-
* Renders Arc's bubble: inverted colors, a hairline border, the raised shadow and 15rem of maximum width.
|
|
34
|
-
* @param props - Radix content properties. `sideOffset` defaults to 8px and `collisionPadding` to 12px.
|
|
35
|
-
* @returns The portaled bubble.
|
|
38
|
+
* A short label on hover or focus that opens without delay when moving between tooltips.
|
|
39
|
+
* @param props - The bubble content, the trigger and optional placement and open state.
|
|
40
|
+
* @returns The trigger with its tooltip.
|
|
36
41
|
*/
|
|
37
|
-
declare function
|
|
38
|
-
export { Tooltip
|
|
42
|
+
declare function Tooltip({ content, children, side, align, sideOffset, collisionPadding, contentClassName, open, defaultOpen, onOpenChange, delayDuration, }: TooltipProps): import("react").JSX.Element;
|
|
43
|
+
export { Tooltip };
|