@fileverse/ui 5.1.10 → 5.2.0-dialog-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 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
  }
@@ -2019,6 +2036,9 @@ video {
2019
2036
  .min-w-\[129px\] {
2020
2037
  min-width: 129px;
2021
2038
  }
2039
+ .min-w-\[12rem\] {
2040
+ min-width: 12rem;
2041
+ }
2022
2042
  .min-w-\[145px\] {
2023
2043
  min-width: 145px;
2024
2044
  }
@@ -2074,6 +2094,9 @@ video {
2074
2094
  .max-w-\[172px\] {
2075
2095
  max-width: 172px;
2076
2096
  }
2097
+ .max-w-\[394px\] {
2098
+ max-width: 394px;
2099
+ }
2077
2100
  .max-w-\[440px\] {
2078
2101
  max-width: 440px;
2079
2102
  }
@@ -2560,6 +2583,9 @@ video {
2560
2583
  .\!bg-transparent {
2561
2584
  background-color: transparent !important;
2562
2585
  }
2586
+ .bg-\[hsl\(var\(--color-border-default\)\)\] {
2587
+ background-color: hsl(var(--color-border-default));
2588
+ }
2563
2589
  .bg-black\/5 {
2564
2590
  background-color: rgb(0 0 0 / 0.05);
2565
2591
  }
@@ -3837,6 +3863,12 @@ textarea:is(:-webkit-autofill, :autofill) {
3837
3863
  .data-\[highlighted\]\:hover\:\!outline-transparent:hover[data-highlighted] {
3838
3864
  outline-color: transparent !important;
3839
3865
  }
3866
+ .data-\[highlighted\]\:focus-visible\:outline:focus-visible[data-highlighted] {
3867
+ outline-style: solid;
3868
+ }
3869
+ .data-\[highlighted\]\:focus-visible\:outline-2:focus-visible[data-highlighted] {
3870
+ outline-width: 2px;
3871
+ }
3840
3872
  .data-\[highlighted\]\:focus-visible\:outline-\[hsl\(var\(--color-border-focused\)\)\]:focus-visible[data-highlighted] {
3841
3873
  outline-color: hsl(var(--color-border-focused));
3842
3874
  }
@@ -17,12 +17,14 @@ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
17
17
  import { InputHTMLAttributes } from 'react';
18
18
  import { JSX as JSX_2 } from 'react/jsx-runtime';
19
19
  import * as LabelPrimitive from '@radix-ui/react-label';
20
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
20
21
  import * as PopoverPrimitive from '@radix-ui/react-popover';
21
22
  import { Portal } from 'vaul';
22
23
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
23
24
  import * as React_2 from 'react';
24
25
  import { ReactNode } from 'react';
25
26
  import { RefAttributes } from 'react';
27
+ import { Scope } from '@radix-ui/react-context';
26
28
  import * as SelectPrimitive from '@radix-ui/react-select';
27
29
  import { SetStateAction } from 'react';
28
30
  import * as SwitchPrimitives from '@radix-ui/react-switch';
@@ -277,6 +279,34 @@ export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimit
277
279
 
278
280
  export declare const DialogContent: React_2.ForwardRefExoticComponent<DialogContentProps & React_2.RefAttributes<HTMLDivElement>>;
279
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
+
280
310
  declare interface DialogContentProps extends React_2.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
281
311
  hasCloseIcon?: boolean;
282
312
  dismissable?: boolean;
@@ -299,6 +329,47 @@ export declare const DialogOverlay: React_2.ForwardRefExoticComponent<Omit<Dialo
299
329
 
300
330
  export declare const DialogPortal: React_2.FC<DialogPrimitive.DialogPortalProps>;
301
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
+
302
373
  export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React_2.RefAttributes<HTMLHeadingElement>, "ref"> & React_2.RefAttributes<HTMLHeadingElement>>;
303
374
 
304
375
  export declare const DialogTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
@@ -765,6 +836,63 @@ export declare interface LucideIconProps extends Omit<SvgProps, "name">, Variant
765
836
  strokeWidth?: number;
766
837
  }
767
838
 
839
+ /**
840
+ * `Menubar` — a horizontal, Google-Docs-style menu bar. Built on Radix UI's
841
+ * Menubar primitive and styled with the Fileverse design system.
842
+ *
843
+ * Composition-first: same part structure as `DropdownMenu`, plus a
844
+ * `MenubarMenu` wrapper per top-level menu.
845
+ *
846
+ * @see Radix primitive — https://www.radix-ui.com/primitives/docs/components/menubar
847
+ */
848
+ export declare const Menubar: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
849
+
850
+ export declare const MenubarCheckboxItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
851
+
852
+ export declare const MenubarContent: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
853
+
854
+ export declare const MenubarGroup: React_2.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React_2.RefAttributes<HTMLDivElement>>;
855
+
856
+ export declare const MenubarItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
857
+ inset?: boolean;
858
+ } & React_2.RefAttributes<HTMLDivElement>>;
859
+
860
+ export declare const MenubarLabel: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
861
+ inset?: boolean;
862
+ } & React_2.RefAttributes<HTMLDivElement>>;
863
+
864
+ /** One top-level menu (trigger + content). Direct child of {@link Menubar}. */
865
+ export declare const MenubarMenu: {
866
+ (props: MenubarPrimitive.MenubarMenuProps & {
867
+ __scopeMenubar?: Scope;
868
+ }): JSX_2.Element;
869
+ displayName: string;
870
+ };
871
+
872
+ export declare const MenubarPortal: React_2.FC<MenubarPrimitive.MenubarPortalProps>;
873
+
874
+ export declare const MenubarRadioGroup: React_2.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React_2.RefAttributes<HTMLDivElement>>;
875
+
876
+ export declare const MenubarRadioItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
877
+
878
+ export declare const MenubarSeparator: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
879
+
880
+ export declare const MenubarShortcut: {
881
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
882
+ displayName: string;
883
+ };
884
+
885
+ export declare const MenubarSub: React_2.FC<MenubarPrimitive.MenubarSubProps>;
886
+
887
+ export declare const MenubarSubContent: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
888
+
889
+ export declare const MenubarSubTrigger: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
890
+ inset?: boolean;
891
+ } & React_2.RefAttributes<HTMLDivElement>>;
892
+
893
+ /** Top-level menu button ("File", "Edit", …). Highlights while its menu is open. */
894
+ export declare const MenubarTrigger: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
895
+
768
896
  declare type Period = "AM" | "PM";
769
897
 
770
898
  declare interface PeriodSelectorProps {