@fileverse/ui 5.1.8 → 5.1.10-menubar-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
@@ -1676,6 +1676,9 @@ video {
1676
1676
  .h-14 {
1677
1677
  height: 3.5rem;
1678
1678
  }
1679
+ .h-2 {
1680
+ height: 0.5rem;
1681
+ }
1679
1682
  .h-3 {
1680
1683
  height: 0.75rem;
1681
1684
  }
@@ -1840,6 +1843,9 @@ video {
1840
1843
  .w-16 {
1841
1844
  width: 4rem;
1842
1845
  }
1846
+ .w-2 {
1847
+ width: 0.5rem;
1848
+ }
1843
1849
  .w-20 {
1844
1850
  width: 5rem;
1845
1851
  }
@@ -1867,6 +1873,9 @@ video {
1867
1873
  .w-52 {
1868
1874
  width: 13rem;
1869
1875
  }
1876
+ .w-56 {
1877
+ width: 14rem;
1878
+ }
1870
1879
  .w-6 {
1871
1880
  width: 1.5rem;
1872
1881
  }
@@ -2010,6 +2019,9 @@ video {
2010
2019
  .min-w-\[129px\] {
2011
2020
  min-width: 129px;
2012
2021
  }
2022
+ .min-w-\[12rem\] {
2023
+ min-width: 12rem;
2024
+ }
2013
2025
  .min-w-\[145px\] {
2014
2026
  min-width: 145px;
2015
2027
  }
@@ -2571,6 +2583,9 @@ video {
2571
2583
  .bg-none {
2572
2584
  background-image: none;
2573
2585
  }
2586
+ .fill-current {
2587
+ fill: currentColor;
2588
+ }
2574
2589
  .stroke-\[hsl\(var\(--color-bg-default\)\)\] {
2575
2590
  stroke: hsl(var(--color-bg-default));
2576
2591
  }
@@ -2729,9 +2744,15 @@ video {
2729
2744
  .pl-6 {
2730
2745
  padding-left: 1.5rem;
2731
2746
  }
2747
+ .pl-8 {
2748
+ padding-left: 2rem;
2749
+ }
2732
2750
  .pr-10 {
2733
2751
  padding-right: 2.5rem;
2734
2752
  }
2753
+ .pr-2 {
2754
+ padding-right: 0.5rem;
2755
+ }
2735
2756
  .pr-3 {
2736
2757
  padding-right: 0.75rem;
2737
2758
  }
@@ -2916,6 +2937,12 @@ video {
2916
2937
  .outline-1 {
2917
2938
  outline-width: 1px;
2918
2939
  }
2940
+ .-outline-offset-\[0\.5px\] {
2941
+ outline-offset: -0.5px;
2942
+ }
2943
+ .-outline-offset-\[1px\] {
2944
+ outline-offset: -1px;
2945
+ }
2919
2946
  .outline-offset-\[-1px\] {
2920
2947
  outline-offset: -1px;
2921
2948
  }
@@ -3402,6 +3429,12 @@ textarea:is(:-webkit-autofill, :autofill) {
3402
3429
  .data-\[disabled\]\:color-text-disabled[data-disabled] {
3403
3430
  color: hsl(var(--color-text-disabled));
3404
3431
  }
3432
+ .data-\[highlighted\]\:color-bg-default-hover[data-highlighted] {
3433
+ background-color: hsl(var(--color-bg-default-hover));
3434
+ }
3435
+ .data-\[state\=open\]\:color-bg-default-hover[data-state="open"] {
3436
+ background-color: hsl(var(--color-bg-default-hover));
3437
+ }
3405
3438
  .data-\[state\=unchecked\]\:color-bg-default-hover[data-state="unchecked"] {
3406
3439
  background-color: hsl(var(--color-bg-default-hover));
3407
3440
  }
@@ -3795,6 +3828,27 @@ textarea:is(:-webkit-autofill, :autofill) {
3795
3828
  .data-\[state\=open\]\:duration-500[data-state="open"] {
3796
3829
  animation-duration: 500ms;
3797
3830
  }
3831
+ .data-\[highlighted\]\:hover\:bg-\[hsl\(var\(--color-bg-default-hover\)\)\]:hover[data-highlighted] {
3832
+ background-color: hsl(var(--color-bg-default-hover));
3833
+ }
3834
+ .data-\[highlighted\]\:hover\:\!outline-0:hover[data-highlighted] {
3835
+ outline-width: 0px !important;
3836
+ }
3837
+ .data-\[highlighted\]\:hover\:outline-0:hover[data-highlighted] {
3838
+ outline-width: 0px;
3839
+ }
3840
+ .data-\[highlighted\]\:hover\:\!outline-transparent:hover[data-highlighted] {
3841
+ outline-color: transparent !important;
3842
+ }
3843
+ .data-\[highlighted\]\:focus-visible\:outline:focus-visible[data-highlighted] {
3844
+ outline-style: solid;
3845
+ }
3846
+ .data-\[highlighted\]\:focus-visible\:outline-2:focus-visible[data-highlighted] {
3847
+ outline-width: 2px;
3848
+ }
3849
+ .data-\[highlighted\]\:focus-visible\:outline-\[hsl\(var\(--color-border-focused\)\)\]:focus-visible[data-highlighted] {
3850
+ outline-color: hsl(var(--color-border-focused));
3851
+ }
3798
3852
  .dark\:\!text-\[\#363B3F\]:is(.dark *) {
3799
3853
  --tw-text-opacity: 1 !important;
3800
3854
  color: rgb(54 59 63 / var(--tw-text-opacity, 1)) !important;
@@ -7,6 +7,7 @@ import { default as default_2 } from 'react';
7
7
  import * as DialogPrimitive from '@radix-ui/react-dialog';
8
8
  import { DialogProps } from '@radix-ui/react-dialog';
9
9
  import { Drawer as Drawer_2 } from 'vaul';
10
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
10
11
  import { EmojiClickData } from 'emoji-picker-react';
11
12
  import { default as EmojiPicker } from 'emoji-picker-react';
12
13
  import { EmojiStyle } from 'emoji-picker-react';
@@ -16,12 +17,14 @@ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
16
17
  import { InputHTMLAttributes } from 'react';
17
18
  import { JSX as JSX_2 } from 'react/jsx-runtime';
18
19
  import * as LabelPrimitive from '@radix-ui/react-label';
20
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
19
21
  import * as PopoverPrimitive from '@radix-ui/react-popover';
20
22
  import { Portal } from 'vaul';
21
23
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
22
24
  import * as React_2 from 'react';
23
25
  import { ReactNode } from 'react';
24
26
  import { RefAttributes } from 'react';
27
+ import { Scope } from '@radix-ui/react-context';
25
28
  import * as SelectPrimitive from '@radix-ui/react-select';
26
29
  import { SetStateAction } from 'react';
27
30
  import * as SwitchPrimitives from '@radix-ui/react-switch';
@@ -349,6 +352,173 @@ export declare const DrawerTitle: React_2.ForwardRefExoticComponent<Omit<DialogP
349
352
 
350
353
  export declare const DrawerTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
351
354
 
355
+ /**
356
+ * `DropdownMenu` — a menu of actions or options shown when a button is
357
+ * activated. Built on Radix UI's DropdownMenu primitive and styled with the
358
+ * Fileverse design system.
359
+ *
360
+ * Composition-first: import the parts you need and assemble them. Every part
361
+ * forwards its `ref` and spreads props onto the underlying Radix primitive, so
362
+ * any Radix prop works without extra wiring.
363
+ *
364
+ * @example
365
+ *
366
+ * Basic menu
367
+ * ```tsx
368
+ * <DropdownMenu>
369
+ * <DropdownMenuTrigger asChild>
370
+ * <Button>Open</Button>
371
+ * </DropdownMenuTrigger>
372
+ * <DropdownMenuContent align="start">
373
+ * <DropdownMenuLabel>My Account</DropdownMenuLabel>
374
+ * <DropdownMenuSeparator />
375
+ * <DropdownMenuItem>
376
+ * Profile <DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>
377
+ * </DropdownMenuItem>
378
+ * <DropdownMenuItem disabled>Log out</DropdownMenuItem>
379
+ * </DropdownMenuContent>
380
+ * </DropdownMenu>
381
+ * ```
382
+ *
383
+ * @example
384
+ *
385
+ * Checkbox items, a radio group, and a nested sub-menu
386
+ * ```tsx
387
+ * <DropdownMenuContent>
388
+ * <DropdownMenuCheckboxItem checked={show} onCheckedChange={setShow}>
389
+ * Show panel
390
+ * </DropdownMenuCheckboxItem>
391
+ * <DropdownMenuRadioGroup value={pos} onValueChange={setPos}>
392
+ * <DropdownMenuRadioItem value="top">Top</DropdownMenuRadioItem>
393
+ * <DropdownMenuRadioItem value="bottom">Bottom</DropdownMenuRadioItem>
394
+ * </DropdownMenuRadioGroup>
395
+ * <DropdownMenuSub>
396
+ * <DropdownMenuSubTrigger>More</DropdownMenuSubTrigger>
397
+ * <DropdownMenuSubContent>
398
+ * <DropdownMenuItem>Email</DropdownMenuItem>
399
+ * </DropdownMenuSubContent>
400
+ * </DropdownMenuSub>
401
+ * </DropdownMenuContent>
402
+ * ```
403
+ *
404
+ * @see Storybook — https://fileverse-ui.vercel.app/?path=/docs/components-dropdownmenu--docs
405
+ * @see Radix primitive — https://www.radix-ui.com/primitives/docs/components/dropdown-menu
406
+ *
407
+ * @remarks
408
+ * The root. Manages open state and must wrap the trigger and content. Pass
409
+ * `open` / `onOpenChange` to control it, or `defaultOpen` for the uncontrolled
410
+ * case.
411
+ */
412
+ export declare const DropdownMenu: React_2.FC<DropdownMenuPrimitive.DropdownMenuProps>;
413
+
414
+ /**
415
+ * Optional arrow pointing at the trigger. Not rendered by default — drop it
416
+ * inside {@link DropdownMenuContent} to opt in.
417
+ */
418
+ export declare const DropdownMenuArrow: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuArrowProps & React_2.RefAttributes<SVGSVGElement>>;
419
+
420
+ /**
421
+ * A toggleable item with a check indicator. Controlled via `checked` /
422
+ * `onCheckedChange`; `checked` also accepts `"indeterminate"`.
423
+ */
424
+ export declare const DropdownMenuCheckboxItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
425
+
426
+ /**
427
+ * Floating panel that holds the menu's items. Portaled automatically.
428
+ * Position it with `side` / `align` / `sideOffset` (defaults to `4`).
429
+ */
430
+ export declare const DropdownMenuContent: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
431
+
432
+ /**
433
+ * Groups related {@link DropdownMenuItem}s for semantics/accessibility. Pair
434
+ * with a {@link DropdownMenuLabel} to title the group.
435
+ */
436
+ export declare const DropdownMenuGroup: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React_2.RefAttributes<HTMLDivElement>>;
437
+
438
+ /**
439
+ * A selectable action. Wire up `onSelect`, set `disabled`, or use `inset` to
440
+ * align its label with sibling checkbox/radio items.
441
+ */
442
+ export declare const DropdownMenuItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
443
+ inset?: boolean;
444
+ } & React_2.RefAttributes<HTMLDivElement>>;
445
+
446
+ /**
447
+ * Non-interactive heading for a section of items. Use `inset` to align it with
448
+ * sibling checkbox/radio items.
449
+ */
450
+ export declare const DropdownMenuLabel: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
451
+ inset?: boolean;
452
+ } & React_2.RefAttributes<HTMLDivElement>>;
453
+
454
+ /**
455
+ * Renders menu content into a portal. {@link DropdownMenuContent} already
456
+ * portals its children, so reach for this only when you need to control the
457
+ * portal container yourself.
458
+ */
459
+ export declare const DropdownMenuPortal: React_2.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
460
+
461
+ /**
462
+ * Wraps {@link DropdownMenuRadioItem}s so only one can be selected at a time.
463
+ * Controlled via `value` / `onValueChange`.
464
+ */
465
+ export declare const DropdownMenuRadioGroup: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React_2.RefAttributes<HTMLDivElement>>;
466
+
467
+ /**
468
+ * A single-choice item with a dot indicator. Must live inside a
469
+ * {@link DropdownMenuRadioGroup}; identified by its `value`.
470
+ */
471
+ export declare const DropdownMenuRadioItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
472
+
473
+ /** Thin horizontal divider between groups of items. */
474
+ export declare const DropdownMenuSeparator: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
475
+
476
+ /**
477
+ * Right-aligned, muted hint for a keyboard shortcut. Purely presentational —
478
+ * render it as the trailing child of a {@link DropdownMenuItem}. It does not
479
+ * register the shortcut.
480
+ *
481
+ * @example
482
+ * ```tsx
483
+ * <DropdownMenuItem>Save <DropdownMenuShortcut>⌘S</DropdownMenuShortcut></DropdownMenuItem>
484
+ * ```
485
+ */
486
+ export declare const DropdownMenuShortcut: {
487
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
488
+ displayName: string;
489
+ };
490
+
491
+ /**
492
+ * Wraps a {@link DropdownMenuSubTrigger} and a {@link DropdownMenuSubContent}
493
+ * to create a nested sub-menu.
494
+ */
495
+ export declare const DropdownMenuSub: React_2.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
496
+
497
+ /** Floating panel that holds a sub-menu's items. Belongs inside {@link DropdownMenuSub}. */
498
+ export declare const DropdownMenuSubContent: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
499
+
500
+ /**
501
+ * Trigger row inside {@link DropdownMenuContent} that opens a nested sub-menu.
502
+ * Shows a trailing chevron. Set `inset` to align its label with sibling
503
+ * checkbox/radio items.
504
+ */
505
+ export declare const DropdownMenuSubTrigger: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
506
+ inset?: boolean;
507
+ } & React_2.RefAttributes<HTMLDivElement>>;
508
+
509
+ /**
510
+ * Button that opens the menu. Use `asChild` to render your own element (e.g.
511
+ * `Button` / `IconButton`) as the trigger instead of the default `<button>`.
512
+ *
513
+ * @example
514
+ * ```tsx
515
+ * <DropdownMenuTrigger asChild>
516
+ * <Button>Open</Button>
517
+ * </DropdownMenuTrigger>
518
+ * ```
519
+ */
520
+ export declare const DropdownMenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
521
+
352
522
  export declare const DynamicAlert: ({ title, description, variant, icon, className, iconClassName, ...props }: DynamicAlertProps) => JSX_2.Element;
353
523
 
354
524
  export declare interface DynamicAlertProps {
@@ -597,6 +767,63 @@ export declare interface LucideIconProps extends Omit<SvgProps, "name">, Variant
597
767
  strokeWidth?: number;
598
768
  }
599
769
 
770
+ /**
771
+ * `Menubar` — a horizontal, Google-Docs-style menu bar. Built on Radix UI's
772
+ * Menubar primitive and styled with the Fileverse design system.
773
+ *
774
+ * Composition-first: same part structure as `DropdownMenu`, plus a
775
+ * `MenubarMenu` wrapper per top-level menu.
776
+ *
777
+ * @see Radix primitive — https://www.radix-ui.com/primitives/docs/components/menubar
778
+ */
779
+ export declare const Menubar: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
780
+
781
+ export declare const MenubarCheckboxItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
782
+
783
+ export declare const MenubarContent: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
784
+
785
+ export declare const MenubarGroup: React_2.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React_2.RefAttributes<HTMLDivElement>>;
786
+
787
+ export declare const MenubarItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
788
+ inset?: boolean;
789
+ } & React_2.RefAttributes<HTMLDivElement>>;
790
+
791
+ export declare const MenubarLabel: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
792
+ inset?: boolean;
793
+ } & React_2.RefAttributes<HTMLDivElement>>;
794
+
795
+ /** One top-level menu (trigger + content). Direct child of {@link Menubar}. */
796
+ export declare const MenubarMenu: {
797
+ (props: MenubarPrimitive.MenubarMenuProps & {
798
+ __scopeMenubar?: Scope;
799
+ }): JSX_2.Element;
800
+ displayName: string;
801
+ };
802
+
803
+ export declare const MenubarPortal: React_2.FC<MenubarPrimitive.MenubarPortalProps>;
804
+
805
+ export declare const MenubarRadioGroup: React_2.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React_2.RefAttributes<HTMLDivElement>>;
806
+
807
+ export declare const MenubarRadioItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
808
+
809
+ export declare const MenubarSeparator: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
810
+
811
+ export declare const MenubarShortcut: {
812
+ ({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
813
+ displayName: string;
814
+ };
815
+
816
+ export declare const MenubarSub: React_2.FC<MenubarPrimitive.MenubarSubProps>;
817
+
818
+ export declare const MenubarSubContent: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
819
+
820
+ export declare const MenubarSubTrigger: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
821
+ inset?: boolean;
822
+ } & React_2.RefAttributes<HTMLDivElement>>;
823
+
824
+ /** Top-level menu button ("File", "Edit", …). Highlights while its menu is open. */
825
+ export declare const MenubarTrigger: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
826
+
600
827
  declare type Period = "AM" | "PM";
601
828
 
602
829
  declare interface PeriodSelectorProps {
@@ -916,7 +1143,12 @@ declare type ThemeProviderProps = {
916
1143
  defaultTheme?: Theme;
917
1144
  };
918
1145
 
919
- export declare const ThemeToggle: () => JSX_2.Element;
1146
+ export declare const ThemeToggle: ({ defaultOpen }?: ThemeToggleProps) => JSX_2.Element;
1147
+
1148
+ declare interface ThemeToggleProps {
1149
+ /** Opens the "More themes" dropdown on first mount (uncontrolled). */
1150
+ defaultOpen?: boolean;
1151
+ }
920
1152
 
921
1153
  export declare const TimePeriodSelect: React_2.ForwardRefExoticComponent<PeriodSelectorProps & React_2.RefAttributes<HTMLButtonElement>>;
922
1154