@justanarthur/modo-ui 0.0.0-stage → 0.2.0

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.
Files changed (171) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.beui +21 -0
  3. package/LICENSE.fluid-functionalism +21 -0
  4. package/LICENSE.motion-primitives +21 -0
  5. package/LICENSE.sileo +21 -0
  6. package/README.md +608 -2
  7. package/dist/base.css +994 -0
  8. package/dist/blocks/sidebar-app/index.d.ts +34 -0
  9. package/dist/blocks/sidebar-app/index.js +31 -0
  10. package/dist/components/badge/index.d.ts +59 -0
  11. package/dist/components/badge/index.js +16 -0
  12. package/dist/components/button/index.d.ts +59 -0
  13. package/dist/components/button/index.js +14 -0
  14. package/dist/components/card/index.d.ts +141 -0
  15. package/dist/components/card/index.js +42 -0
  16. package/dist/components/inputs/checkbox-group/index.d.ts +50 -0
  17. package/dist/components/inputs/checkbox-group/index.js +21 -0
  18. package/dist/components/inputs/color-picker/index.d.ts +137 -0
  19. package/dist/components/inputs/color-picker/index.js +35 -0
  20. package/dist/components/inputs/combobox/index.d.ts +161 -0
  21. package/dist/components/inputs/combobox/index.js +38 -0
  22. package/dist/components/inputs/date-time/calendar/index.d.ts +45 -0
  23. package/dist/components/inputs/date-time/calendar/index.js +18 -0
  24. package/dist/components/inputs/date-time/date-picker/index.d.ts +82 -0
  25. package/dist/components/inputs/date-time/date-picker/index.js +32 -0
  26. package/dist/components/inputs/date-time/date-range-picker/index.d.ts +64 -0
  27. package/dist/components/inputs/date-time/date-range-picker/index.js +31 -0
  28. package/dist/components/inputs/date-time/duration-picker/index.d.ts +57 -0
  29. package/dist/components/inputs/date-time/duration-picker/index.js +31 -0
  30. package/dist/components/inputs/date-time/month-picker/index.d.ts +57 -0
  31. package/dist/components/inputs/date-time/month-picker/index.js +30 -0
  32. package/dist/components/inputs/date-time/time-picker/index.d.ts +59 -0
  33. package/dist/components/inputs/date-time/time-picker/index.js +31 -0
  34. package/dist/components/inputs/input/index.d.ts +84 -0
  35. package/dist/components/inputs/input/index.js +19 -0
  36. package/dist/components/inputs/input-copy/index.d.ts +44 -0
  37. package/dist/components/inputs/input-copy/index.js +16 -0
  38. package/dist/components/inputs/input-message/index.d.ts +125 -0
  39. package/dist/components/inputs/input-message/index.js +25 -0
  40. package/dist/components/inputs/radio-group/index.d.ts +58 -0
  41. package/dist/components/inputs/radio-group/index.js +20 -0
  42. package/dist/components/inputs/search/index.d.ts +83 -0
  43. package/dist/components/inputs/search/index.js +25 -0
  44. package/dist/components/inputs/select/index.d.ts +105 -0
  45. package/dist/components/inputs/select/index.js +34 -0
  46. package/dist/components/inputs/slider/index.d.ts +108 -0
  47. package/dist/components/inputs/slider/index.js +14 -0
  48. package/dist/components/inputs/switch/index.d.ts +43 -0
  49. package/dist/components/inputs/switch/index.js +14 -0
  50. package/dist/components/navigation/accordion/index.d.ts +117 -0
  51. package/dist/components/navigation/accordion/index.js +28 -0
  52. package/dist/components/navigation/sidebar/index.d.ts +388 -0
  53. package/dist/components/navigation/sidebar/index.js +99 -0
  54. package/dist/components/navigation/tabs/index.d.ts +70 -0
  55. package/dist/components/navigation/tabs/index.js +23 -0
  56. package/dist/components/navigation/tabs-subtle/index.d.ts +73 -0
  57. package/dist/components/navigation/tabs-subtle/index.js +21 -0
  58. package/dist/components/overlays/alert-dialog/index.d.ts +67 -0
  59. package/dist/components/overlays/alert-dialog/index.js +22 -0
  60. package/dist/components/overlays/command/index.d.ts +121 -0
  61. package/dist/components/overlays/command/index.js +36 -0
  62. package/dist/components/overlays/context-menu/index.d.ts +97 -0
  63. package/dist/components/overlays/context-menu/index.js +29 -0
  64. package/dist/components/overlays/dialog/index.d.ts +130 -0
  65. package/dist/components/overlays/dialog/index.js +37 -0
  66. package/dist/components/overlays/dropdown/index.d.ts +222 -0
  67. package/dist/components/overlays/dropdown/index.js +44 -0
  68. package/dist/components/overlays/popover/index.d.ts +87 -0
  69. package/dist/components/overlays/popover/index.js +26 -0
  70. package/dist/components/overlays/preview-card/index.d.ts +75 -0
  71. package/dist/components/overlays/preview-card/index.js +19 -0
  72. package/dist/components/overlays/sheet/index.d.ts +67 -0
  73. package/dist/components/overlays/sheet/index.js +24 -0
  74. package/dist/components/overlays/toast/index.d.ts +107 -0
  75. package/dist/components/overlays/toast/index.js +21 -0
  76. package/dist/components/overlays/tooltip/index.d.ts +75 -0
  77. package/dist/components/overlays/tooltip/index.js +17 -0
  78. package/dist/components/table/index.d.ts +44 -0
  79. package/dist/components/table/index.js +26 -0
  80. package/dist/components/thinking-indicator/index.d.ts +32 -0
  81. package/dist/components/thinking-indicator/index.js +13 -0
  82. package/dist/index.d.ts +3926 -0
  83. package/dist/index.js +511 -0
  84. package/dist/preset.d.ts +104 -0
  85. package/dist/preset.js +124 -0
  86. package/dist/primitives/code/index.d.ts +23 -0
  87. package/dist/primitives/code/index.js +11 -0
  88. package/dist/primitives/craft/index.d.ts +31 -0
  89. package/dist/primitives/craft/index.js +11 -0
  90. package/dist/primitives/fluid-hover/index.d.ts +233 -0
  91. package/dist/primitives/fluid-hover/index.js +25 -0
  92. package/dist/primitives/morph/index.d.ts +127 -0
  93. package/dist/primitives/morph/index.js +19 -0
  94. package/dist/primitives/motion/index.d.ts +115 -0
  95. package/dist/primitives/motion/index.js +19 -0
  96. package/dist/primitives/scroll-area/index.d.ts +41 -0
  97. package/dist/primitives/scroll-area/index.js +12 -0
  98. package/dist/primitives/sizes/index.d.ts +128 -0
  99. package/dist/primitives/sizes/index.js +21 -0
  100. package/dist/primitives/surface/index.d.ts +69 -0
  101. package/dist/primitives/surface/index.js +17 -0
  102. package/dist/shared/components-0ke6xada.js +123 -0
  103. package/dist/shared/components-0q0sqfh4.js +146 -0
  104. package/dist/shared/components-0sn7ypjw.js +61 -0
  105. package/dist/shared/components-1j9791sn.js +345 -0
  106. package/dist/shared/components-1rfwbyyc.js +361 -0
  107. package/dist/shared/components-1v7rxytx.js +30 -0
  108. package/dist/shared/components-1xekx2hx.js +215 -0
  109. package/dist/shared/components-39jq9va1.js +86 -0
  110. package/dist/shared/components-3gae8nta.js +719 -0
  111. package/dist/shared/components-3k8xpnpq.js +1759 -0
  112. package/dist/shared/components-3ky44908.js +9 -0
  113. package/dist/shared/components-3mkepka5.js +111 -0
  114. package/dist/shared/components-3wk0w46f.js +667 -0
  115. package/dist/shared/components-4cnjmgex.js +124 -0
  116. package/dist/shared/components-59efxjd9.js +298 -0
  117. package/dist/shared/components-5xc2j8jz.js +159 -0
  118. package/dist/shared/components-62ybc7t2.js +496 -0
  119. package/dist/shared/components-66mv71kx.js +262 -0
  120. package/dist/shared/components-7ans7ce5.js +120 -0
  121. package/dist/shared/components-7btqt08d.js +270 -0
  122. package/dist/shared/components-7r3etddy.js +171 -0
  123. package/dist/shared/components-7x9kawxv.js +152 -0
  124. package/dist/shared/components-8fpr3s4p.js +292 -0
  125. package/dist/shared/components-9jvzzvt1.js +198 -0
  126. package/dist/shared/components-apdwtweq.js +484 -0
  127. package/dist/shared/components-asr5pg50.js +191 -0
  128. package/dist/shared/components-b2wyq2cq.js +232 -0
  129. package/dist/shared/components-c6s6b43g.js +15 -0
  130. package/dist/shared/components-ca2c898n.js +1828 -0
  131. package/dist/shared/components-cbxjn9p8.js +141 -0
  132. package/dist/shared/components-chacnk61.js +216 -0
  133. package/dist/shared/components-cv16mryv.js +62 -0
  134. package/dist/shared/components-ez65vtbq.js +110 -0
  135. package/dist/shared/components-ezxhrmer.js +17 -0
  136. package/dist/shared/components-gc5vtq2f.js +149 -0
  137. package/dist/shared/components-gf5s6ap9.js +42 -0
  138. package/dist/shared/components-gvr9w41t.js +193 -0
  139. package/dist/shared/components-h2dpcwgc.js +137 -0
  140. package/dist/shared/components-hawvy2qz.js +105 -0
  141. package/dist/shared/components-hqeq3w9q.js +375 -0
  142. package/dist/shared/components-jjw69c4c.js +28 -0
  143. package/dist/shared/components-jwst3vtj.js +346 -0
  144. package/dist/shared/components-kvr7f9hy.js +45 -0
  145. package/dist/shared/components-men63rwj.js +9 -0
  146. package/dist/shared/components-mhd39z7x.js +22 -0
  147. package/dist/shared/components-n7mjr357.js +26 -0
  148. package/dist/shared/components-ng72k97e.js +128 -0
  149. package/dist/shared/components-nh8tma1n.js +986 -0
  150. package/dist/shared/components-njzgqdwy.js +445 -0
  151. package/dist/shared/components-ny774h8p.js +293 -0
  152. package/dist/shared/components-q4daerx0.js +58 -0
  153. package/dist/shared/components-q5xj5c16.js +79 -0
  154. package/dist/shared/components-rr7a6ja9.js +160 -0
  155. package/dist/shared/components-s2bz1xpk.js +63 -0
  156. package/dist/shared/components-tqvarbfv.js +288 -0
  157. package/dist/shared/components-v6xp325t.js +304 -0
  158. package/dist/shared/components-v7wtz8hk.js +144 -0
  159. package/dist/shared/components-vc7vq5nz.js +32 -0
  160. package/dist/shared/components-vfbhxf5r.js +58 -0
  161. package/dist/shared/components-vynjtrk6.js +19 -0
  162. package/dist/shared/components-wvp1m52g.js +1200 -0
  163. package/dist/shared/components-yh3kwdhr.js +981 -0
  164. package/dist/shared/components-ytb2tefr.js +291 -0
  165. package/dist/shared/components-zfnmn5d4.js +220 -0
  166. package/dist/shared/components-zrkzcayz.js +141 -0
  167. package/dist/shared/components-zx6b6yby.js +42 -0
  168. package/dist/styles.css +1949 -0
  169. package/dist/tailwind.css +219 -0
  170. package/dist/tokens.css +345 -0
  171. package/package.json +103 -4
@@ -0,0 +1,21 @@
1
+ import {
2
+ TabsSubtle2,
3
+ TabsSubtleItem2,
4
+ TabsSubtlePanel2,
5
+ tabs_subtle_default
6
+ } from "../../../shared/components-v6xp325t.js";
7
+ import"../../../shared/components-59efxjd9.js";
8
+ import"../../../shared/components-chacnk61.js";
9
+ import"../../../shared/components-hqeq3w9q.js";
10
+ import"../../../shared/components-jjw69c4c.js";
11
+ import"../../../shared/components-n7mjr357.js";
12
+ import"../../../shared/components-men63rwj.js";
13
+ import"../../../shared/components-0sn7ypjw.js";
14
+ import"../../../shared/components-cv16mryv.js";
15
+ import"../../../shared/components-ezxhrmer.js";
16
+ export {
17
+ TabsSubtle2 as TabsSubtle,
18
+ TabsSubtleItem2 as TabsSubtleItem,
19
+ TabsSubtlePanel2 as TabsSubtlePanel,
20
+ tabs_subtle_default as default
21
+ };
@@ -0,0 +1,67 @@
1
+ import { ReactNode as ReactNode3 } from "react";
2
+ import { HTMLAttributes, ReactNode as ReactNode2, RefObject as RefObject2 } from "react";
3
+ interface DialogContentProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** Width: 400, 540, or 880. Compact regions narrow each by 1 notch: 360,
5
+ * 480, 800. `xl` is the canvas for composed layouts — a sidebar beside a
6
+ * panel — which usually pair it with `className="p-0"` and a fixed
7
+ * height. Defaults to `"sm"`. */
8
+ size?: "sm" | "lg" | "xl";
9
+ /** Portal target. When set, the overlay and panel render inside this element
10
+ * (positioned `absolute`) instead of covering the viewport (`fixed`). Pair
11
+ * with a `position: relative; overflow: hidden` container — and usually
12
+ * `<Dialog modal={false}>` — to scope a dialog to a bounded region, e.g. a
13
+ * docs preview. Defaults to the document body / full-viewport behaviour. */
14
+ container?: HTMLElement | null;
15
+ /** The ✕ in the top-right corner. Drop it when the content has its own
16
+ * way out, e.g. a command menu that closes on Escape and on a pick.
17
+ * Defaults to `true`. */
18
+ showCloseButton?: boolean;
19
+ /** Where the panel sits: centered, or anchored 12dvh from the top so a
20
+ * panel whose height follows its content (a command menu) keeps its top
21
+ * edge still. Defaults to `"center"`. */
22
+ position?: "center" | "top";
23
+ /** Where the panel grows from (see Morph): the pressed trigger (its center when none), the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'`. */
24
+ from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
25
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
26
+ effect?: "goo" | "morph" | "slide" | "fade";
27
+ /** Hide the trigger while open, so it reads as turning into the panel. Defaults to `false`. */
28
+ hideSource?: boolean;
29
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'slow'`. */
30
+ tier?: "moderate" | "slow";
31
+ /** Dialog content. Everything inside reads the dialog's surface level as its substrate. */
32
+ children?: ReactNode2;
33
+ }
34
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn2 } from "react";
35
+ import { RefAttributes as RefAttributes_miuf562 } from "react";
36
+ import { JSX as JSX_1kxb2 } from "react";
37
+ declare const AlertDialogContent: ForwardRefExoticComponent_tcubfn2<DialogContentProps & RefAttributes_miuf562<HTMLDivElement>>;
38
+ interface AlertDialogProps {
39
+ /** Controlled open state. */
40
+ open?: boolean;
41
+ /** Initial open state, for an uncontrolled alert dialog. Defaults to `false`. */
42
+ defaultOpen?: boolean;
43
+ /** Called when the dialog opens or closes. */
44
+ onOpenChange?: (open: boolean) => void;
45
+ /** The trigger and the content — `AlertDialog.Trigger` plus an `AlertDialog.Content`. */
46
+ children?: ReactNode3;
47
+ }
48
+ type Element_12xgc2 = JSX_1kxb2["Element"];
49
+ /**
50
+ * A dialog that asks before something happens and waits for an answer.
51
+ *
52
+ * It is always modal, and a press outside does not close it: only its own
53
+ * actions (and Escape) do, so a destructive step is never confirmed or
54
+ * skipped by accident. Screen readers announce it as an alert. Everything
55
+ * else is Dialog's: the panel grows out of its trigger with the goo neck by
56
+ * default (see Morph), takes the same `size`, `position` and morph options,
57
+ * and lifts 4 surface levels. Unlike Dialog it has no ✕ unless
58
+ * `showCloseButton` asks for one.
59
+ *
60
+ * Statics: the same parts as Dialog — `AlertDialog.Trigger`,
61
+ * `AlertDialog.Content`, `AlertDialog.Header`, `AlertDialog.Footer`,
62
+ * `AlertDialog.Title`, `AlertDialog.Description` and `AlertDialog.Close`.
63
+ *
64
+ * @example {@include ./examples.mdx}
65
+ */
66
+ declare function AlertDialog({ children, open, defaultOpen, onOpenChange }: AlertDialogProps): Element_12xgc2;
67
+ export { AlertDialog, AlertDialogContent, AlertDialogProps, AlertDialog as default };
@@ -0,0 +1,22 @@
1
+ import {
2
+ AlertDialogContent2,
3
+ AlertDialog2,
4
+ alert_dialog_default
5
+ } from "../../../shared/components-gf5s6ap9.js";
6
+ import"../../../shared/components-zfnmn5d4.js";
7
+ import"../../../shared/components-3ky44908.js";
8
+ import"../../../shared/components-zrkzcayz.js";
9
+ import"../../../shared/components-0q0sqfh4.js";
10
+ import"../../../shared/components-hqeq3w9q.js";
11
+ import"../../../shared/components-b2wyq2cq.js";
12
+ import"../../../shared/components-n7mjr357.js";
13
+ import"../../../shared/components-men63rwj.js";
14
+ import"../../../shared/components-0sn7ypjw.js";
15
+ import"../../../shared/components-cv16mryv.js";
16
+ import"../../../shared/components-zx6b6yby.js";
17
+ import"../../../shared/components-ezxhrmer.js";
18
+ export {
19
+ AlertDialog2 as AlertDialog,
20
+ AlertDialogContent2 as AlertDialogContent,
21
+ alert_dialog_default as default
22
+ };
@@ -0,0 +1,121 @@
1
+ import { Autocomplete } from "@base-ui/react/autocomplete";
2
+ import { HTMLAttributes, ReactNode as ReactNode3, RefObject } from "react";
3
+ import { ComponentType } from "react";
4
+ interface IconComponentProps {
5
+ size?: number | string;
6
+ strokeWidth?: number | string;
7
+ className?: string;
8
+ }
9
+ type IconComponent = ComponentType<IconComponentProps>;
10
+ import { ButtonHTMLAttributes, ReactElement, ReactNode as ReactNode2 } from "react";
11
+ interface SlotProps extends ButtonHTMLAttributes<HTMLButtonElement> {
12
+ /** The element that becomes the control, e.g. a Button. */
13
+ render?: ReactElement;
14
+ /** Compose onto the single child instead. Both spellings work in both flavors. Defaults to `false`. */
15
+ asChild?: boolean;
16
+ /** Control content when there is no render element. */
17
+ children?: ReactNode2;
18
+ }
19
+ import { JSX as JSX_1kxb2 } from "react";
20
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
21
+ import { RefAttributes as RefAttributes_miuf56 } from "react";
22
+ /** One command: the label the query matches, plus what the row shows and does. */
23
+ interface CommandItem {
24
+ label: string;
25
+ icon?: IconComponent;
26
+ /** Shown at the end of the row; display only, nothing binds it. */
27
+ shortcut?: string;
28
+ /** More words the query matches. */
29
+ keywords?: string[];
30
+ disabled?: boolean;
31
+ onSelect?: () => void;
32
+ }
33
+ interface CommandGroup {
34
+ label: string;
35
+ items: CommandItem[];
36
+ }
37
+ type CommandItems = CommandItem[] | CommandGroup[];
38
+ type CommandListRootProps = Omit<Autocomplete.Root.Props<CommandItem>, "items" | "filter" | "itemToStringValue" | "onItemHighlighted"> & {
39
+ items: CommandItems;
40
+ };
41
+ type Element_12xgc2 = JSX_1kxb2["Element"];
42
+ /** Base UI's Autocomplete set up for command rows: it matches labels and keywords and hands its highlight to `CommandList`. */
43
+ declare function CommandListRoot({ items,...props }: CommandListRootProps): Element_12xgc2;
44
+ declare function CommandShortcut({ className,...props }: HTMLAttributes<HTMLElement>): Element_12xgc2;
45
+ interface CommandListProps {
46
+ onPick: (item: CommandItem) => void;
47
+ emptyMessage: ReactNode3;
48
+ className?: string;
49
+ }
50
+ /** The filtered rows (grouped or flat) under one fluid highlight, inside a ScrollArea. Goes inside `CommandListRoot`. */
51
+ declare function CommandList({ onPick, emptyMessage, className }: CommandListProps): Element_12xgc2;
52
+ interface CommandPaletteProps {
53
+ /** The commands, flat or in labelled groups. */
54
+ items: CommandItems;
55
+ /** The search field's placeholder. Defaults to `'Type a command or search…'`. */
56
+ placeholder?: string;
57
+ /** Shown when nothing matches the query. Defaults to `'No results found.'`. */
58
+ emptyMessage?: ReactNode3;
59
+ /** Classes for the palette's box. */
60
+ className?: string;
61
+ }
62
+ declare function CommandPalette({ items, placeholder, emptyMessage, className }: CommandPaletteProps): Element_12xgc2;
63
+ declare const CommandTrigger: ForwardRefExoticComponent_tcubfn<SlotProps & RefAttributes_miuf56<HTMLButtonElement>>;
64
+ interface CommandContentProps extends CommandPaletteProps {
65
+ /** Accessible name of the panel. Defaults to `'Command menu'`. */
66
+ label?: string;
67
+ /** Where the panel grows from (see Morph): the pressed trigger (its center when none), the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'`. */
68
+ from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject<HTMLElement | null>;
69
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
70
+ effect?: "goo" | "morph" | "slide" | "fade";
71
+ /** Hide the trigger while open, so it reads as turning into the panel. Defaults to `false`. */
72
+ hideSource?: boolean;
73
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'slow'`. */
74
+ tier?: "moderate" | "slow";
75
+ }
76
+ declare const CommandContent: ForwardRefExoticComponent_tcubfn<CommandContentProps & RefAttributes_miuf56<HTMLDivElement>>;
77
+ interface CommandProps {
78
+ /** Controlled open state. */
79
+ open?: boolean;
80
+ /** Initial open state, for an uncontrolled palette. Defaults to `false`. */
81
+ defaultOpen?: boolean;
82
+ /** Called when the palette opens or closes. */
83
+ onOpenChange?: (open: boolean) => void;
84
+ /** The key that toggles the palette with ⌘ (Ctrl elsewhere); `false` leaves the keyboard alone. Defaults to `'k'`. */
85
+ hotkey?: string | false;
86
+ /** The trigger and the panel: `Command.Trigger` plus a `Command.Content`. */
87
+ children?: ReactNode3;
88
+ }
89
+ /**
90
+ * A ⌘K command menu: a search field over grouped commands, grown out of
91
+ * whatever opened it.
92
+ *
93
+ * Type to filter by label and keywords; the arrows move one highlight
94
+ * through the rows, springing between them like the fluid hover, and Enter
95
+ * or a press runs the command and closes the panel. The first match is
96
+ * always highlighted, so Enter has a target, and an empty result says so.
97
+ * The panel is Dialog's: it grows out of its trigger with the goo neck
98
+ * (see Morph) and sits near the top of the window, so it keeps its top edge
99
+ * still as the list filters. ⌘K (Ctrl+K elsewhere) toggles it from anywhere
100
+ * on the page and still grows it out of the trigger; with several palettes
101
+ * on one page, one answers each press. Escape and a press outside close it.
102
+ * Built on Base UI's Autocomplete, rendered inline: the input keeps focus
103
+ * and screen readers follow the highlighted row.
104
+ *
105
+ * Commands are data: `{ label, icon, shortcut, keywords, disabled, onSelect }`,
106
+ * flat or in `{ label, items }` groups. A `shortcut` is only shown.
107
+ *
108
+ * Statics:
109
+ * - `Command.Trigger` — the control that opens it: `render={<Button/>}` or
110
+ * `asChild`.
111
+ * - `Command.Content` — the panel: `items`, `placeholder`, `emptyMessage`,
112
+ * `label`, and the morph options `from`, `effect`, `hideSource`, `tier`.
113
+ * - `Command.Palette` — the search field and list on their own, for a
114
+ * palette that lives in the page: `items`, `placeholder`, `emptyMessage`.
115
+ * - `Command.Shortcut` — a key hint, as the rows show it, e.g. in the
116
+ * trigger.
117
+ *
118
+ * @example {@include ./examples.mdx}
119
+ */
120
+ declare function Command({ open, defaultOpen, onOpenChange, hotkey, children }: CommandProps): Element_12xgc2;
121
+ export { Command, CommandContent, CommandContentProps, CommandGroup, CommandItem, CommandItems, CommandList, CommandListRoot, CommandPalette, CommandPaletteProps, CommandProps, CommandShortcut, CommandTrigger, Command as default };
@@ -0,0 +1,36 @@
1
+ import {
2
+ CommandListRoot2,
3
+ CommandShortcut2,
4
+ CommandList2,
5
+ CommandPalette2,
6
+ CommandTrigger2,
7
+ CommandContent2,
8
+ Command2,
9
+ command_default
10
+ } from "../../../shared/components-8fpr3s4p.js";
11
+ import"../../../shared/components-zfnmn5d4.js";
12
+ import"../../../shared/components-3ky44908.js";
13
+ import"../../../shared/components-zrkzcayz.js";
14
+ import"../../../shared/components-0q0sqfh4.js";
15
+ import"../../../shared/components-kvr7f9hy.js";
16
+ import"../../../shared/components-59efxjd9.js";
17
+ import"../../../shared/components-chacnk61.js";
18
+ import"../../../shared/components-hqeq3w9q.js";
19
+ import"../../../shared/components-b2wyq2cq.js";
20
+ import"../../../shared/components-n7mjr357.js";
21
+ import"../../../shared/components-men63rwj.js";
22
+ import"../../../shared/components-0sn7ypjw.js";
23
+ import"../../../shared/components-hawvy2qz.js";
24
+ import"../../../shared/components-cv16mryv.js";
25
+ import"../../../shared/components-zx6b6yby.js";
26
+ import"../../../shared/components-ezxhrmer.js";
27
+ export {
28
+ Command2 as Command,
29
+ CommandContent2 as CommandContent,
30
+ CommandList2 as CommandList,
31
+ CommandListRoot2 as CommandListRoot,
32
+ CommandPalette2 as CommandPalette,
33
+ CommandShortcut2 as CommandShortcut,
34
+ CommandTrigger2 as CommandTrigger,
35
+ command_default as default
36
+ };
@@ -0,0 +1,97 @@
1
+ import { ReactNode as ReactNode3, RefObject } from "react";
2
+ type SizeVariant = "default" | "compact";
3
+ import { HTMLAttributes } from "react";
4
+ import { ComponentType } from "react";
5
+ interface IconComponentProps {
6
+ size?: number | string;
7
+ strokeWidth?: number | string;
8
+ className?: string;
9
+ }
10
+ type IconComponent = ComponentType<IconComponentProps>;
11
+ interface MenuItemProps extends HTMLAttributes<HTMLDivElement> {
12
+ /** Optional leading icon. When omitted, the row renders text-only with no
13
+ * reserved icon column. */
14
+ icon?: IconComponent;
15
+ label: string;
16
+ index: number;
17
+ /** When a boolean, the item is a radio-style option (role="menuitemradio"
18
+ * with aria-checked). When undefined, it is a plain action item
19
+ * (role="menuitem"), unless the panel owns the selection — then the row
20
+ * reads its checked state off the panel and toggles it on activation. */
21
+ checked?: boolean;
22
+ onSelect?: () => void;
23
+ disabled?: boolean;
24
+ /** Popup-only (inside DropdownContent): whether activating the item closes
25
+ * the menu. Ignored in the inline Dropdown panel. @default true */
26
+ closeOnClick?: boolean;
27
+ /** Internal: the row's authored index, stamped by a filtering panel that
28
+ * re-indexed the visible rows. Selection is keyed on it. */
29
+ sourceIndex?: number;
30
+ }
31
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn2 } from "react";
32
+ import { RefAttributes as RefAttributes_miuf562 } from "react";
33
+ import { JSX as JSX_1kxb2 } from "react";
34
+ interface ContextMenuItemProps extends MenuItemProps {
35
+ /** Keyboard shortcut shown at the row's end, e.g. `⌘C`. */
36
+ shortcut?: string;
37
+ }
38
+ declare const ContextMenuItem: ForwardRefExoticComponent_tcubfn2<ContextMenuItemProps & RefAttributes_miuf562<HTMLDivElement>>;
39
+ interface ContextMenuContentProps {
40
+ /** Where the menu grows from (see Morph): the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'pointer'`. */
41
+ from?: "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject<HTMLElement | null>;
42
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
43
+ effect?: "goo" | "morph" | "slide" | "fade";
44
+ /** Hide the `from` element while open, so it reads as turning into the menu. Defaults to `false`. */
45
+ hideSource?: boolean;
46
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'moderate'`. */
47
+ tier?: "moderate" | "slow";
48
+ /** Portal target. Defaults to the document body. */
49
+ container?: HTMLElement | null;
50
+ /** Extra classes for the menu surface — it is 14rem wide by default. */
51
+ className?: string;
52
+ /** `ContextMenu.Item` rows, plus `ContextMenu.Label` and `ContextMenu.Separator`. */
53
+ children?: ReactNode3;
54
+ }
55
+ declare const ContextMenuContent: ForwardRefExoticComponent_tcubfn2<ContextMenuContentProps & RefAttributes_miuf562<HTMLDivElement>>;
56
+ interface ContextMenuProps {
57
+ /** Controlled open state. Pair with `onOpenChange`. */
58
+ open?: boolean;
59
+ /** Initial open state, for an uncontrolled menu. Defaults to `false`. */
60
+ defaultOpen?: boolean;
61
+ /** Called when the menu opens or closes. */
62
+ onOpenChange?: (open: boolean) => void;
63
+ /** Turns the trigger area back into a plain one: no menu on right click or long press. Defaults to `false`. */
64
+ disabled?: boolean;
65
+ /** Pins the rows to one step of the size ladder (default 36px, compact 28px — see Sizes). Omitted, they follow the surrounding SizeProvider. */
66
+ size?: SizeVariant;
67
+ /** The area and the menu — `ContextMenu.Trigger` plus a `ContextMenu.Content`. */
68
+ children?: ReactNode3;
69
+ }
70
+ type Element_12xgc2 = JSX_1kxb2["Element"];
71
+ /**
72
+ * A menu that grows out of the pointer on right click, or on a long press on
73
+ * touch: the surface swells from the exact point you pressed into the menu.
74
+ *
75
+ * The morph comes from the shared engine (see Morph): from the press point
76
+ * by default, or from its own center, a viewport edge or any element, with
77
+ * the goo, a plain morph, a slide or a fade. The rows are Dropdown's — the
78
+ * fluid hover background gliding between them, icons that firm up under it,
79
+ * dimmed disabled rows the pointer skips — plus a keyboard shortcut at the
80
+ * end of a row. The menu lifts 2 surface levels off its substrate. Built on
81
+ * Base UI's ContextMenu: it opens at the pointer and flips or shifts to stay
82
+ * on screen, arrow keys and typeahead move between rows, and picking a row,
83
+ * Escape or an outside press closes it.
84
+ *
85
+ * Statics:
86
+ * - `ContextMenu.Trigger` — the area that opens it (a `div`).
87
+ * - `ContextMenu.Content` — the menu: the morph options `from`, `effect`,
88
+ * `hideSource`, `tier`.
89
+ * - `ContextMenu.Item` — a row: `index`, `label`, `icon`, `shortcut`,
90
+ * `onSelect`, `disabled`.
91
+ * - `ContextMenu.Label` / `ContextMenu.Separator` — a caption over a run of
92
+ * rows and a rule between runs (Dropdown's).
93
+ *
94
+ * @example {@include ./examples.mdx}
95
+ */
96
+ declare function ContextMenu({ open, defaultOpen, onOpenChange, disabled, size, children }: ContextMenuProps): Element_12xgc2;
97
+ export { ContextMenu, ContextMenuContent, ContextMenuContentProps, ContextMenuItem, ContextMenuItemProps, ContextMenuProps, ContextMenu as default };
@@ -0,0 +1,29 @@
1
+ import {
2
+ ContextMenuItem2,
3
+ ContextMenuContent2,
4
+ ContextMenu2,
5
+ context_menu_default
6
+ } from "../../../shared/components-1xekx2hx.js";
7
+ import"../../../shared/components-nh8tma1n.js";
8
+ import"../../../shared/components-5xc2j8jz.js";
9
+ import"../../../shared/components-zrkzcayz.js";
10
+ import"../../../shared/components-0q0sqfh4.js";
11
+ import"../../../shared/components-kvr7f9hy.js";
12
+ import"../../../shared/components-59efxjd9.js";
13
+ import"../../../shared/components-chacnk61.js";
14
+ import"../../../shared/components-hqeq3w9q.js";
15
+ import"../../../shared/components-jjw69c4c.js";
16
+ import"../../../shared/components-n7mjr357.js";
17
+ import"../../../shared/components-men63rwj.js";
18
+ import"../../../shared/components-0sn7ypjw.js";
19
+ import"../../../shared/components-hawvy2qz.js";
20
+ import"../../../shared/components-cv16mryv.js";
21
+ import"../../../shared/components-vc7vq5nz.js";
22
+ import"../../../shared/components-zx6b6yby.js";
23
+ import"../../../shared/components-ezxhrmer.js";
24
+ export {
25
+ ContextMenu2 as ContextMenu,
26
+ ContextMenuContent2 as ContextMenuContent,
27
+ ContextMenuItem2 as ContextMenuItem,
28
+ context_menu_default as default
29
+ };
@@ -0,0 +1,130 @@
1
+ import { HTMLAttributes, ReactNode as ReactNode2, RefObject as RefObject2 } from "react";
2
+ import { ButtonHTMLAttributes, ReactElement, ReactNode } from "react";
3
+ interface SlotProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ /** The element that becomes the control, e.g. a Button. */
5
+ render?: ReactElement;
6
+ /** Compose onto the single child instead. Both spellings work in both flavors. Defaults to `false`. */
7
+ asChild?: boolean;
8
+ /** Control content when there is no render element. */
9
+ children?: ReactNode;
10
+ }
11
+ /** What opened the overlay: the pressed trigger and the press point. */
12
+ interface MorphOrigin {
13
+ trigger?: HTMLElement;
14
+ point?: {
15
+ x: number;
16
+ y: number;
17
+ };
18
+ }
19
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
20
+ import { RefAttributes as RefAttributes_miuf56 } from "react";
21
+ import { JSX as JSX_1kxb } from "react";
22
+ type DialogSlotProps = SlotProps;
23
+ /** The open state and origin `DialogState` provides, for content built on another Base UI popup (Sheet). */
24
+ declare const useDialogState: () => {
25
+ open: boolean;
26
+ origin: RefObject2<MorphOrigin>;
27
+ };
28
+ declare const DialogTrigger: ForwardRefExoticComponent_tcubfn<SlotProps & RefAttributes_miuf56<HTMLButtonElement>>;
29
+ declare const DialogClose: ForwardRefExoticComponent_tcubfn<SlotProps & RefAttributes_miuf56<HTMLButtonElement>>;
30
+ interface DialogContentProps extends HTMLAttributes<HTMLDivElement> {
31
+ /** Width: 400, 540, or 880. Compact regions narrow each by 1 notch: 360,
32
+ * 480, 800. `xl` is the canvas for composed layouts — a sidebar beside a
33
+ * panel — which usually pair it with `className="p-0"` and a fixed
34
+ * height. Defaults to `"sm"`. */
35
+ size?: "sm" | "lg" | "xl";
36
+ /** Portal target. When set, the overlay and panel render inside this element
37
+ * (positioned `absolute`) instead of covering the viewport (`fixed`). Pair
38
+ * with a `position: relative; overflow: hidden` container — and usually
39
+ * `<Dialog modal={false}>` — to scope a dialog to a bounded region, e.g. a
40
+ * docs preview. Defaults to the document body / full-viewport behaviour. */
41
+ container?: HTMLElement | null;
42
+ /** The ✕ in the top-right corner. Drop it when the content has its own
43
+ * way out, e.g. a command menu that closes on Escape and on a pick.
44
+ * Defaults to `true`. */
45
+ showCloseButton?: boolean;
46
+ /** Where the panel sits: centered, or anchored 12dvh from the top so a
47
+ * panel whose height follows its content (a command menu) keeps its top
48
+ * edge still. Defaults to `"center"`. */
49
+ position?: "center" | "top";
50
+ /** Where the panel grows from (see Morph): the pressed trigger (its center when none), the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'`. */
51
+ from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
52
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
53
+ effect?: "goo" | "morph" | "slide" | "fade";
54
+ /** Hide the trigger while open, so it reads as turning into the panel. Defaults to `false`. */
55
+ hideSource?: boolean;
56
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'slow'`. */
57
+ tier?: "moderate" | "slow";
58
+ /** Dialog content. Everything inside reads the dialog's surface level as its substrate. */
59
+ children?: ReactNode2;
60
+ }
61
+ declare const DialogContent: ForwardRefExoticComponent_tcubfn<DialogContentProps & RefAttributes_miuf56<HTMLDivElement>>;
62
+ type Element_12xgc = JSX_1kxb["Element"];
63
+ declare function DialogHeader({ className,...props }: HTMLAttributes<HTMLDivElement>): Element_12xgc;
64
+ declare function DialogFooter({ className,...props }: HTMLAttributes<HTMLDivElement>): Element_12xgc;
65
+ declare const DialogTitle: ForwardRefExoticComponent_tcubfn<HTMLAttributes<HTMLHeadingElement> & RefAttributes_miuf56<HTMLHeadingElement>>;
66
+ declare const DialogDescription: ForwardRefExoticComponent_tcubfn<HTMLAttributes<HTMLParagraphElement> & RefAttributes_miuf56<HTMLParagraphElement>>;
67
+ interface DialogStateProps {
68
+ open?: boolean;
69
+ defaultOpen?: boolean;
70
+ onOpenChange?: (open: boolean) => void;
71
+ children: (root: {
72
+ open: boolean;
73
+ onOpenChange: (next: boolean, details: {
74
+ trigger?: Element;
75
+ event?: Event;
76
+ }) => void;
77
+ }) => ReactNode2;
78
+ }
79
+ /**
80
+ * A dialog's open state, held here (not in Base UI's Root) because the morph
81
+ * reads it, and the open event tells it which trigger was pressed. Also
82
+ * scopes `Morph.Part` pairs. AlertDialog shares it.
83
+ */
84
+ declare function DialogState({ open, defaultOpen, onOpenChange, children }: DialogStateProps): Element_12xgc;
85
+ interface DialogProps {
86
+ /** Controlled open state. */
87
+ open?: boolean;
88
+ /** Initial open state, for an uncontrolled dialog. Defaults to `false`. */
89
+ defaultOpen?: boolean;
90
+ /** Called when the dialog opens or closes. */
91
+ onOpenChange?: (open: boolean) => void;
92
+ /** Traps focus and locks page scroll while open. Defaults to `true`. */
93
+ modal?: boolean;
94
+ /** The trigger and the content — `Dialog.Trigger` plus a `Dialog.Content`. */
95
+ children?: ReactNode2;
96
+ }
97
+ /**
98
+ * 3 widths, grown out of whatever opened them.
99
+ *
100
+ * The panel lifts 4 surface levels off whatever substrate it opens on and
101
+ * re-provides that level, so a dropdown or select inside it keeps climbing
102
+ * the ladder instead of melting into the dialog. Width comes from
103
+ * `Dialog.Content`'s `size` — 400, 540 or 880, each one notch narrower in
104
+ * compact regions. The panel grows out of its trigger through the shared
105
+ * morph (see Morph): goo by default on `spring.goo`, or from the press
106
+ * point, its own center, a viewport edge or any element, and the backdrop
107
+ * fades with it. `Morph.Part` pairs an element in the trigger with its twin
108
+ * in the panel, so a card's image or title flies into the dialog.
109
+ * `position="top"` anchors the panel 12dvh down so a content-sized panel (a
110
+ * command menu) keeps its top edge still. Built on Base UI's Dialog: open
111
+ * state is controlled with `open` / `onOpenChange` or left to `defaultOpen`.
112
+ *
113
+ * Statics:
114
+ * - `Dialog.Trigger` — the control that opens it. `render={<Button/>}` or
115
+ * Radix-style `asChild` with a single child both work.
116
+ * - `Dialog.Content` — the panel: `size`, `position`, `showCloseButton`,
117
+ * `container`, and the morph options `from`, `effect`, `hideSource`,
118
+ * `tier`.
119
+ * - `Dialog.Header` / `Dialog.Footer` — the stacked title block, and the
120
+ * right-aligned action row.
121
+ * - `Dialog.Title` / `Dialog.Description` — the labelled heading and its
122
+ * supporting line, wired to the panel for screen readers.
123
+ * - `Dialog.Close` — dismisses it; same `render` / `asChild` shape as the
124
+ * trigger. `Dialog.Content` renders its own ✕ unless
125
+ * `showCloseButton={false}`.
126
+ *
127
+ * @example {@include ./examples.mdx}
128
+ */
129
+ declare function Dialog({ children, open, defaultOpen, onOpenChange, modal }: DialogProps): Element_12xgc;
130
+ export { Dialog, DialogClose, DialogSlotProps as DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogProps, DialogState, DialogTitle, DialogTrigger, DialogSlotProps as DialogTriggerProps, Dialog as default, useDialogState };
@@ -0,0 +1,37 @@
1
+ import {
2
+ useDialogState2,
3
+ DialogTrigger2,
4
+ DialogClose2,
5
+ DialogContent2,
6
+ DialogHeader2,
7
+ DialogFooter2,
8
+ DialogTitle2,
9
+ DialogDescription2,
10
+ DialogState2,
11
+ Dialog2,
12
+ dialog_default
13
+ } from "../../../shared/components-zfnmn5d4.js";
14
+ import"../../../shared/components-3ky44908.js";
15
+ import"../../../shared/components-zrkzcayz.js";
16
+ import"../../../shared/components-0q0sqfh4.js";
17
+ import"../../../shared/components-hqeq3w9q.js";
18
+ import"../../../shared/components-b2wyq2cq.js";
19
+ import"../../../shared/components-n7mjr357.js";
20
+ import"../../../shared/components-men63rwj.js";
21
+ import"../../../shared/components-0sn7ypjw.js";
22
+ import"../../../shared/components-cv16mryv.js";
23
+ import"../../../shared/components-zx6b6yby.js";
24
+ import"../../../shared/components-ezxhrmer.js";
25
+ export {
26
+ Dialog2 as Dialog,
27
+ DialogClose2 as DialogClose,
28
+ DialogContent2 as DialogContent,
29
+ DialogDescription2 as DialogDescription,
30
+ DialogFooter2 as DialogFooter,
31
+ DialogHeader2 as DialogHeader,
32
+ DialogState2 as DialogState,
33
+ DialogTitle2 as DialogTitle,
34
+ DialogTrigger2 as DialogTrigger,
35
+ dialog_default as default,
36
+ useDialogState2 as useDialogState
37
+ };