@fileverse/ui 5.2.0 → 5.2.1-tooltip-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/index.css +41 -27
- package/dist/index.es.d.ts +94 -8
- package/dist/index.es.js +12909 -12940
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1388,6 +1388,17 @@ video {
|
|
|
1388
1388
|
border-radius: 8px;
|
|
1389
1389
|
border-width: 4px;
|
|
1390
1390
|
}
|
|
1391
|
+
.sr-only {
|
|
1392
|
+
position: absolute;
|
|
1393
|
+
width: 1px;
|
|
1394
|
+
height: 1px;
|
|
1395
|
+
padding: 0;
|
|
1396
|
+
margin: -1px;
|
|
1397
|
+
overflow: hidden;
|
|
1398
|
+
clip: rect(0, 0, 0, 0);
|
|
1399
|
+
white-space: nowrap;
|
|
1400
|
+
border-width: 0;
|
|
1401
|
+
}
|
|
1391
1402
|
.pointer-events-none {
|
|
1392
1403
|
pointer-events: none;
|
|
1393
1404
|
}
|
|
@@ -1504,6 +1515,9 @@ video {
|
|
|
1504
1515
|
.top-1\/2 {
|
|
1505
1516
|
top: 50%;
|
|
1506
1517
|
}
|
|
1518
|
+
.top-2 {
|
|
1519
|
+
top: 0.5rem;
|
|
1520
|
+
}
|
|
1507
1521
|
.top-3 {
|
|
1508
1522
|
top: 0.75rem;
|
|
1509
1523
|
}
|
|
@@ -1538,18 +1552,10 @@ video {
|
|
|
1538
1552
|
margin-left: -0.25rem;
|
|
1539
1553
|
margin-right: -0.25rem;
|
|
1540
1554
|
}
|
|
1541
|
-
.-my-1 {
|
|
1542
|
-
margin-top: -0.25rem;
|
|
1543
|
-
margin-bottom: -0.25rem;
|
|
1544
|
-
}
|
|
1545
1555
|
.mx-auto {
|
|
1546
1556
|
margin-left: auto;
|
|
1547
1557
|
margin-right: auto;
|
|
1548
1558
|
}
|
|
1549
|
-
.my-0 {
|
|
1550
|
-
margin-top: 0px;
|
|
1551
|
-
margin-bottom: 0px;
|
|
1552
|
-
}
|
|
1553
1559
|
.my-1 {
|
|
1554
1560
|
margin-top: 0.25rem;
|
|
1555
1561
|
margin-bottom: 0.25rem;
|
|
@@ -1782,6 +1788,9 @@ video {
|
|
|
1782
1788
|
.max-h-\[300px\] {
|
|
1783
1789
|
max-height: 300px;
|
|
1784
1790
|
}
|
|
1791
|
+
.max-h-\[var\(--radix-tooltip-content-available-height\2c none\)\] {
|
|
1792
|
+
max-height: var(--radix-tooltip-content-available-height,none);
|
|
1793
|
+
}
|
|
1785
1794
|
.max-h-screen {
|
|
1786
1795
|
max-height: 100vh;
|
|
1787
1796
|
}
|
|
@@ -1803,9 +1812,6 @@ video {
|
|
|
1803
1812
|
.min-h-\[296px\] {
|
|
1804
1813
|
min-height: 296px;
|
|
1805
1814
|
}
|
|
1806
|
-
.min-h-\[2vh\] {
|
|
1807
|
-
min-height: 2vh;
|
|
1808
|
-
}
|
|
1809
1815
|
.min-h-\[468px\] {
|
|
1810
1816
|
min-height: 468px;
|
|
1811
1817
|
}
|
|
@@ -1975,6 +1981,9 @@ video {
|
|
|
1975
1981
|
.w-\[8px\] {
|
|
1976
1982
|
width: 8px;
|
|
1977
1983
|
}
|
|
1984
|
+
.w-\[92\.5vw\] {
|
|
1985
|
+
width: 92.5vw;
|
|
1986
|
+
}
|
|
1978
1987
|
.w-\[calc\(100vw-24px\)\] {
|
|
1979
1988
|
width: calc(100vw - 24px);
|
|
1980
1989
|
}
|
|
@@ -2077,6 +2086,9 @@ video {
|
|
|
2077
2086
|
.max-w-\[172px\] {
|
|
2078
2087
|
max-width: 172px;
|
|
2079
2088
|
}
|
|
2089
|
+
.max-w-\[394px\] {
|
|
2090
|
+
max-width: 394px;
|
|
2091
|
+
}
|
|
2080
2092
|
.max-w-\[440px\] {
|
|
2081
2093
|
max-width: 440px;
|
|
2082
2094
|
}
|
|
@@ -2086,6 +2098,9 @@ video {
|
|
|
2086
2098
|
.max-w-\[70vw\] {
|
|
2087
2099
|
max-width: 70vw;
|
|
2088
2100
|
}
|
|
2101
|
+
.max-w-\[var\(--radix-tooltip-content-available-width\2c 24rem\)\] {
|
|
2102
|
+
max-width: var(--radix-tooltip-content-available-width,24rem);
|
|
2103
|
+
}
|
|
2089
2104
|
.max-w-fit {
|
|
2090
2105
|
max-width: -moz-fit-content;
|
|
2091
2106
|
max-width: fit-content;
|
|
@@ -2974,10 +2989,6 @@ video {
|
|
|
2974
2989
|
.ring-offset-white {
|
|
2975
2990
|
--tw-ring-offset-color: #fff;
|
|
2976
2991
|
}
|
|
2977
|
-
.blur {
|
|
2978
|
-
--tw-blur: blur(8px);
|
|
2979
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2980
|
-
}
|
|
2981
2992
|
.drop-shadow {
|
|
2982
2993
|
--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
|
|
2983
2994
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
@@ -3040,6 +3051,21 @@ video {
|
|
|
3040
3051
|
transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
|
|
3041
3052
|
}
|
|
3042
3053
|
}
|
|
3054
|
+
.animate-in {
|
|
3055
|
+
animation-name: enter;
|
|
3056
|
+
animation-duration: 150ms;
|
|
3057
|
+
--tw-enter-opacity: initial;
|
|
3058
|
+
--tw-enter-scale: initial;
|
|
3059
|
+
--tw-enter-rotate: initial;
|
|
3060
|
+
--tw-enter-translate-x: initial;
|
|
3061
|
+
--tw-enter-translate-y: initial;
|
|
3062
|
+
}
|
|
3063
|
+
.fade-in-0 {
|
|
3064
|
+
--tw-enter-opacity: 0;
|
|
3065
|
+
}
|
|
3066
|
+
.zoom-in-95 {
|
|
3067
|
+
--tw-enter-scale: .95;
|
|
3068
|
+
}
|
|
3043
3069
|
.duration-200 {
|
|
3044
3070
|
animation-duration: 200ms;
|
|
3045
3071
|
}
|
|
@@ -4061,18 +4087,6 @@ textarea:is(:-webkit-autofill, :autofill) {
|
|
|
4061
4087
|
.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]) {
|
|
4062
4088
|
padding-right: 0px;
|
|
4063
4089
|
}
|
|
4064
|
-
.\[\&\>span\]\:\!left-\[10\%\]>span {
|
|
4065
|
-
left: 10% !important;
|
|
4066
|
-
}
|
|
4067
|
-
.\[\&\>span\]\:\!left-\[80\%\]>span {
|
|
4068
|
-
left: 80% !important;
|
|
4069
|
-
}
|
|
4070
|
-
.\[\&\>span\]\:\!top-\[20\%\]>span {
|
|
4071
|
-
top: 20% !important;
|
|
4072
|
-
}
|
|
4073
|
-
.\[\&\>span\]\:\!top-\[60\%\]>span {
|
|
4074
|
-
top: 60% !important;
|
|
4075
|
-
}
|
|
4076
4090
|
.\[\&\>span\]\:line-clamp-1>span {
|
|
4077
4091
|
overflow: hidden;
|
|
4078
4092
|
display: -webkit-box;
|
package/dist/index.es.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ import { SetStateAction } from 'react';
|
|
|
30
30
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
31
31
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
32
32
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
33
|
+
import * as TooltipPrimitives from '@radix-ui/react-tooltip';
|
|
33
34
|
import { VariantProps } from 'class-variance-authority';
|
|
34
35
|
|
|
35
36
|
export declare const Accordion: React_2.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps & React_2.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React_2.RefAttributes<HTMLDivElement>, "ref">) & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -279,6 +280,34 @@ export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimit
|
|
|
279
280
|
|
|
280
281
|
export declare const DialogContent: React_2.ForwardRefExoticComponent<DialogContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
281
282
|
|
|
283
|
+
/**
|
|
284
|
+
* `DialogContentPrimitive` — the raw, unstyled Radix Dialog Content.
|
|
285
|
+
*
|
|
286
|
+
* Unlike {@link DialogContent}, this ships **no** styling, no portal, no
|
|
287
|
+
* overlay, and no close icon. Reach for it when the opinionated `DialogContent`
|
|
288
|
+
* gets in the way — e.g. custom centering, shared-element / layout animations
|
|
289
|
+
* (its default `translate(-50%,-50%)` centering conflicts with transform-driven
|
|
290
|
+
* animation), or when you need `asChild` to render your own element.
|
|
291
|
+
*
|
|
292
|
+
* Composition-first: assemble it yourself with {@link DialogPortal} and
|
|
293
|
+
* {@link DialogOverlay}. For the common "centered panel" case, prefer
|
|
294
|
+
* {@link DialogShell}, which wires those up for you.
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```tsx
|
|
298
|
+
* <Dialog open={open} onOpenChange={setOpen}>
|
|
299
|
+
* <DialogPortal>
|
|
300
|
+
* <DialogOverlay />
|
|
301
|
+
* <DialogContentPrimitive className="fixed inset-0 flex items-center justify-center">
|
|
302
|
+
* <DialogTitle className="sr-only">…</DialogTitle>
|
|
303
|
+
* <div className="rounded-lg color-bg-default">…</div>
|
|
304
|
+
* </DialogContentPrimitive>
|
|
305
|
+
* </DialogPortal>
|
|
306
|
+
* </Dialog>
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
export declare const DialogContentPrimitive: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
310
|
+
|
|
282
311
|
declare interface DialogContentProps extends React_2.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
283
312
|
hasCloseIcon?: boolean;
|
|
284
313
|
dismissable?: boolean;
|
|
@@ -301,6 +330,47 @@ export declare const DialogOverlay: React_2.ForwardRefExoticComponent<Omit<Dialo
|
|
|
301
330
|
|
|
302
331
|
export declare const DialogPortal: React_2.FC<DialogPrimitive.DialogPortalProps>;
|
|
303
332
|
|
|
333
|
+
/**
|
|
334
|
+
* `DialogShell` — a centered dialog that leaves the panel styling entirely to
|
|
335
|
+
* you, built for custom and **animated** content.
|
|
336
|
+
*
|
|
337
|
+
* It centers via flexbox (a full-screen `pointer-events-none` wrapper) rather
|
|
338
|
+
* than a CSS transform, so nothing sits on a transformed ancestor — making it
|
|
339
|
+
* safe for framer-motion layout / shared-element (`layoutId`) animations that
|
|
340
|
+
* {@link DialogContent} would break. Because the wrapper is transparent to
|
|
341
|
+
* pointer events, backdrop clicks reach the overlay and Radix's own
|
|
342
|
+
* outside-click dismissal keeps working; Escape and focus management come from
|
|
343
|
+
* Radix as usual.
|
|
344
|
+
*
|
|
345
|
+
* You provide the panel as `children` (style it however you like — including a
|
|
346
|
+
* `motion.div`); render your own close affordance with {@link DialogClose}.
|
|
347
|
+
*
|
|
348
|
+
* @example
|
|
349
|
+
* ```tsx
|
|
350
|
+
* <Dialog open={open} onOpenChange={setOpen}>
|
|
351
|
+
* <DialogShell>
|
|
352
|
+
* <DialogTitle className="sr-only">Announcement</DialogTitle>
|
|
353
|
+
* <div className="w-[92.5vw] max-w-[394px] rounded-xl color-bg-default">
|
|
354
|
+
* <DialogClose className="absolute top-2 right-2">
|
|
355
|
+
* <LucideIcon name="X" className="h-5 w-5" />
|
|
356
|
+
* </DialogClose>
|
|
357
|
+
* …
|
|
358
|
+
* </div>
|
|
359
|
+
* </DialogShell>
|
|
360
|
+
* </Dialog>
|
|
361
|
+
* ```
|
|
362
|
+
*/
|
|
363
|
+
export declare const DialogShell: React_2.ForwardRefExoticComponent<DialogShellProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
364
|
+
|
|
365
|
+
declare interface DialogShellProps extends React_2.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
366
|
+
/** Classes for the dimming {@link DialogOverlay}. */
|
|
367
|
+
overlayClasses?: string;
|
|
368
|
+
/** Classes for the full-screen flex-centering wrapper around the panel. */
|
|
369
|
+
containerClassName?: string;
|
|
370
|
+
/** When `false`, clicking the backdrop / pressing Escape won't close. Default `true`. */
|
|
371
|
+
dismissable?: boolean;
|
|
372
|
+
}
|
|
373
|
+
|
|
304
374
|
export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React_2.RefAttributes<HTMLHeadingElement>, "ref"> & React_2.RefAttributes<HTMLHeadingElement>>;
|
|
305
375
|
|
|
306
376
|
export declare const DialogTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -935,7 +1005,7 @@ export declare const SheetTitle: React_2.ForwardRefExoticComponent<Omit<DialogPr
|
|
|
935
1005
|
export declare const SheetTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
936
1006
|
|
|
937
1007
|
declare const sheetVariants: (props?: ({
|
|
938
|
-
side?: "
|
|
1008
|
+
side?: "top" | "right" | "bottom" | "left" | null | undefined;
|
|
939
1009
|
} & ClassProp) | undefined) => string;
|
|
940
1010
|
|
|
941
1011
|
export declare const Skeleton: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => JSX_2.Element;
|
|
@@ -1255,19 +1325,35 @@ declare const toggleVariants: (props?: ({
|
|
|
1255
1325
|
|
|
1256
1326
|
export declare const Tooltip: React_2.ForwardRefExoticComponent<TooltipProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1257
1327
|
|
|
1258
|
-
|
|
1328
|
+
declare const TooltipContent: React_2.ForwardRefExoticComponent<TooltipPrimitives.TooltipContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1329
|
+
|
|
1330
|
+
export declare interface TooltipProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
1259
1331
|
text: string | React_2.ReactNode;
|
|
1332
|
+
/**
|
|
1333
|
+
* Gap between the trigger and the tip of the beak, in px. Radix adds the
|
|
1334
|
+
* measured arrow height to this internally, so it is the visible gap rather
|
|
1335
|
+
* than the distance to the bubble edge.
|
|
1336
|
+
*/
|
|
1260
1337
|
sideOffset?: number;
|
|
1261
1338
|
asTriggerChild?: boolean;
|
|
1262
1339
|
open?: boolean;
|
|
1340
|
+
/**
|
|
1341
|
+
* Minimum gap kept between the tooltip and the collision boundary (the
|
|
1342
|
+
* viewport by default). Radix defaults this to 0, which lets long content sit
|
|
1343
|
+
* flush against the edge. This also shrinks
|
|
1344
|
+
* `--radix-tooltip-content-available-width/height`, so the max-width below
|
|
1345
|
+
* respects the same gutter rather than growing into it.
|
|
1346
|
+
*/
|
|
1347
|
+
collisionPadding?: React_2.ComponentPropsWithoutRef<typeof TooltipContent>["collisionPadding"];
|
|
1348
|
+
/** Side of the trigger to place the tooltip on. Maps to Radix `side`. */
|
|
1349
|
+
position?: "top" | "bottom" | "left" | "right" | null;
|
|
1350
|
+
/**
|
|
1351
|
+
* Alignment of the tooltip — and therefore its beak — along the trigger.
|
|
1352
|
+
* Maps to Radix `align`, which positions the beak natively.
|
|
1353
|
+
*/
|
|
1354
|
+
beakAlignment?: "start" | "center" | "end" | null;
|
|
1263
1355
|
}
|
|
1264
1356
|
|
|
1265
|
-
declare const tooltipVariants: (props?: ({
|
|
1266
|
-
position?: "bottom" | "top" | "right" | "left" | null | undefined;
|
|
1267
|
-
beakAlignment?: "end" | "center" | "start" | null | undefined;
|
|
1268
|
-
defaultVariants?: "variant" | "beakPosition" | null | undefined;
|
|
1269
|
-
} & ClassProp) | undefined) => string;
|
|
1270
|
-
|
|
1271
1357
|
export declare const UltimateIcons: any;
|
|
1272
1358
|
|
|
1273
1359
|
export declare const useHoverAndLongPress: ({ delay, }: UseHoverAndLongPressProps) => {
|