@fileverse/ui 5.2.0 → 5.2.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 +20 -0
- package/dist/index.es.d.ts +69 -0
- package/dist/index.es.js +8655 -8618
- 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
|
}
|
|
@@ -1975,6 +1989,9 @@ video {
|
|
|
1975
1989
|
.w-\[8px\] {
|
|
1976
1990
|
width: 8px;
|
|
1977
1991
|
}
|
|
1992
|
+
.w-\[92\.5vw\] {
|
|
1993
|
+
width: 92.5vw;
|
|
1994
|
+
}
|
|
1978
1995
|
.w-\[calc\(100vw-24px\)\] {
|
|
1979
1996
|
width: calc(100vw - 24px);
|
|
1980
1997
|
}
|
|
@@ -2077,6 +2094,9 @@ video {
|
|
|
2077
2094
|
.max-w-\[172px\] {
|
|
2078
2095
|
max-width: 172px;
|
|
2079
2096
|
}
|
|
2097
|
+
.max-w-\[394px\] {
|
|
2098
|
+
max-width: 394px;
|
|
2099
|
+
}
|
|
2080
2100
|
.max-w-\[440px\] {
|
|
2081
2101
|
max-width: 440px;
|
|
2082
2102
|
}
|
package/dist/index.es.d.ts
CHANGED
|
@@ -279,6 +279,34 @@ export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimit
|
|
|
279
279
|
|
|
280
280
|
export declare const DialogContent: React_2.ForwardRefExoticComponent<DialogContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
281
281
|
|
|
282
|
+
/**
|
|
283
|
+
* `DialogContentPrimitive` — the raw, unstyled Radix Dialog Content.
|
|
284
|
+
*
|
|
285
|
+
* Unlike {@link DialogContent}, this ships **no** styling, no portal, no
|
|
286
|
+
* overlay, and no close icon. Reach for it when the opinionated `DialogContent`
|
|
287
|
+
* gets in the way — e.g. custom centering, shared-element / layout animations
|
|
288
|
+
* (its default `translate(-50%,-50%)` centering conflicts with transform-driven
|
|
289
|
+
* animation), or when you need `asChild` to render your own element.
|
|
290
|
+
*
|
|
291
|
+
* Composition-first: assemble it yourself with {@link DialogPortal} and
|
|
292
|
+
* {@link DialogOverlay}. For the common "centered panel" case, prefer
|
|
293
|
+
* {@link DialogShell}, which wires those up for you.
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* ```tsx
|
|
297
|
+
* <Dialog open={open} onOpenChange={setOpen}>
|
|
298
|
+
* <DialogPortal>
|
|
299
|
+
* <DialogOverlay />
|
|
300
|
+
* <DialogContentPrimitive className="fixed inset-0 flex items-center justify-center">
|
|
301
|
+
* <DialogTitle className="sr-only">…</DialogTitle>
|
|
302
|
+
* <div className="rounded-lg color-bg-default">…</div>
|
|
303
|
+
* </DialogContentPrimitive>
|
|
304
|
+
* </DialogPortal>
|
|
305
|
+
* </Dialog>
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
export declare const DialogContentPrimitive: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
309
|
+
|
|
282
310
|
declare interface DialogContentProps extends React_2.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
283
311
|
hasCloseIcon?: boolean;
|
|
284
312
|
dismissable?: boolean;
|
|
@@ -301,6 +329,47 @@ export declare const DialogOverlay: React_2.ForwardRefExoticComponent<Omit<Dialo
|
|
|
301
329
|
|
|
302
330
|
export declare const DialogPortal: React_2.FC<DialogPrimitive.DialogPortalProps>;
|
|
303
331
|
|
|
332
|
+
/**
|
|
333
|
+
* `DialogShell` — a centered dialog that leaves the panel styling entirely to
|
|
334
|
+
* you, built for custom and **animated** content.
|
|
335
|
+
*
|
|
336
|
+
* It centers via flexbox (a full-screen `pointer-events-none` wrapper) rather
|
|
337
|
+
* than a CSS transform, so nothing sits on a transformed ancestor — making it
|
|
338
|
+
* safe for framer-motion layout / shared-element (`layoutId`) animations that
|
|
339
|
+
* {@link DialogContent} would break. Because the wrapper is transparent to
|
|
340
|
+
* pointer events, backdrop clicks reach the overlay and Radix's own
|
|
341
|
+
* outside-click dismissal keeps working; Escape and focus management come from
|
|
342
|
+
* Radix as usual.
|
|
343
|
+
*
|
|
344
|
+
* You provide the panel as `children` (style it however you like — including a
|
|
345
|
+
* `motion.div`); render your own close affordance with {@link DialogClose}.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ```tsx
|
|
349
|
+
* <Dialog open={open} onOpenChange={setOpen}>
|
|
350
|
+
* <DialogShell>
|
|
351
|
+
* <DialogTitle className="sr-only">Announcement</DialogTitle>
|
|
352
|
+
* <div className="w-[92.5vw] max-w-[394px] rounded-xl color-bg-default">
|
|
353
|
+
* <DialogClose className="absolute top-2 right-2">
|
|
354
|
+
* <LucideIcon name="X" className="h-5 w-5" />
|
|
355
|
+
* </DialogClose>
|
|
356
|
+
* …
|
|
357
|
+
* </div>
|
|
358
|
+
* </DialogShell>
|
|
359
|
+
* </Dialog>
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
export declare const DialogShell: React_2.ForwardRefExoticComponent<DialogShellProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
363
|
+
|
|
364
|
+
declare interface DialogShellProps extends React_2.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
365
|
+
/** Classes for the dimming {@link DialogOverlay}. */
|
|
366
|
+
overlayClasses?: string;
|
|
367
|
+
/** Classes for the full-screen flex-centering wrapper around the panel. */
|
|
368
|
+
containerClassName?: string;
|
|
369
|
+
/** When `false`, clicking the backdrop / pressing Escape won't close. Default `true`. */
|
|
370
|
+
dismissable?: boolean;
|
|
371
|
+
}
|
|
372
|
+
|
|
304
373
|
export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React_2.RefAttributes<HTMLHeadingElement>, "ref"> & React_2.RefAttributes<HTMLHeadingElement>>;
|
|
305
374
|
|
|
306
375
|
export declare const DialogTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|