@justanarthur/modo-ui 0.0.0-stage → 0.1.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 (172) 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 +34 -0
  10. package/dist/components/badge/index.d.ts +59 -0
  11. package/dist/components/badge/index.js +18 -0
  12. package/dist/components/button/index.d.ts +59 -0
  13. package/dist/components/button/index.js +16 -0
  14. package/dist/components/card/index.d.ts +141 -0
  15. package/dist/components/card/index.js +44 -0
  16. package/dist/components/inputs/checkbox-group/index.d.ts +50 -0
  17. package/dist/components/inputs/checkbox-group/index.js +23 -0
  18. package/dist/components/inputs/color-picker/index.d.ts +137 -0
  19. package/dist/components/inputs/color-picker/index.js +37 -0
  20. package/dist/components/inputs/combobox/index.d.ts +161 -0
  21. package/dist/components/inputs/combobox/index.js +41 -0
  22. package/dist/components/inputs/date-time/calendar/index.d.ts +45 -0
  23. package/dist/components/inputs/date-time/calendar/index.js +20 -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 +34 -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 +33 -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 +33 -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 +32 -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 +33 -0
  34. package/dist/components/inputs/input/index.d.ts +84 -0
  35. package/dist/components/inputs/input/index.js +20 -0
  36. package/dist/components/inputs/input-copy/index.d.ts +44 -0
  37. package/dist/components/inputs/input-copy/index.js +18 -0
  38. package/dist/components/inputs/input-message/index.d.ts +125 -0
  39. package/dist/components/inputs/input-message/index.js +27 -0
  40. package/dist/components/inputs/radio-group/index.d.ts +58 -0
  41. package/dist/components/inputs/radio-group/index.js +22 -0
  42. package/dist/components/inputs/search/index.d.ts +83 -0
  43. package/dist/components/inputs/search/index.js +28 -0
  44. package/dist/components/inputs/select/index.d.ts +105 -0
  45. package/dist/components/inputs/select/index.js +37 -0
  46. package/dist/components/inputs/slider/index.d.ts +108 -0
  47. package/dist/components/inputs/slider/index.js +16 -0
  48. package/dist/components/inputs/switch/index.d.ts +43 -0
  49. package/dist/components/inputs/switch/index.js +16 -0
  50. package/dist/components/navigation/accordion/index.d.ts +117 -0
  51. package/dist/components/navigation/accordion/index.js +30 -0
  52. package/dist/components/navigation/sidebar/index.d.ts +388 -0
  53. package/dist/components/navigation/sidebar/index.js +101 -0
  54. package/dist/components/navigation/tabs/index.d.ts +70 -0
  55. package/dist/components/navigation/tabs/index.js +25 -0
  56. package/dist/components/navigation/tabs-subtle/index.d.ts +73 -0
  57. package/dist/components/navigation/tabs-subtle/index.js +23 -0
  58. package/dist/components/overlays/alert-dialog/index.d.ts +67 -0
  59. package/dist/components/overlays/alert-dialog/index.js +24 -0
  60. package/dist/components/overlays/command/index.d.ts +121 -0
  61. package/dist/components/overlays/command/index.js +39 -0
  62. package/dist/components/overlays/context-menu/index.d.ts +97 -0
  63. package/dist/components/overlays/context-menu/index.js +32 -0
  64. package/dist/components/overlays/dialog/index.d.ts +130 -0
  65. package/dist/components/overlays/dialog/index.js +39 -0
  66. package/dist/components/overlays/dropdown/index.d.ts +222 -0
  67. package/dist/components/overlays/dropdown/index.js +47 -0
  68. package/dist/components/overlays/popover/index.d.ts +87 -0
  69. package/dist/components/overlays/popover/index.js +28 -0
  70. package/dist/components/overlays/preview-card/index.d.ts +75 -0
  71. package/dist/components/overlays/preview-card/index.js +21 -0
  72. package/dist/components/overlays/sheet/index.d.ts +67 -0
  73. package/dist/components/overlays/sheet/index.js +26 -0
  74. package/dist/components/overlays/toast/index.d.ts +107 -0
  75. package/dist/components/overlays/toast/index.js +23 -0
  76. package/dist/components/overlays/tooltip/index.d.ts +75 -0
  77. package/dist/components/overlays/tooltip/index.js +19 -0
  78. package/dist/components/table/index.d.ts +44 -0
  79. package/dist/components/table/index.js +28 -0
  80. package/dist/components/thinking-indicator/index.d.ts +32 -0
  81. package/dist/components/thinking-indicator/index.js +15 -0
  82. package/dist/index.d.ts +3926 -0
  83. package/dist/index.js +513 -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 +12 -0
  88. package/dist/primitives/craft/index.d.ts +31 -0
  89. package/dist/primitives/craft/index.js +13 -0
  90. package/dist/primitives/fluid-hover/index.d.ts +233 -0
  91. package/dist/primitives/fluid-hover/index.js +27 -0
  92. package/dist/primitives/morph/index.d.ts +127 -0
  93. package/dist/primitives/morph/index.js +21 -0
  94. package/dist/primitives/motion/index.d.ts +115 -0
  95. package/dist/primitives/motion/index.js +20 -0
  96. package/dist/primitives/scroll-area/index.d.ts +41 -0
  97. package/dist/primitives/scroll-area/index.js +13 -0
  98. package/dist/primitives/sizes/index.d.ts +128 -0
  99. package/dist/primitives/sizes/index.js +22 -0
  100. package/dist/primitives/surface/index.d.ts +69 -0
  101. package/dist/primitives/surface/index.js +18 -0
  102. package/dist/shared/components-0f0as45n.js +17 -0
  103. package/dist/shared/components-40j34hdb.js +986 -0
  104. package/dist/shared/components-4hh0gm0v.js +292 -0
  105. package/dist/shared/components-4xxddc44.js +15 -0
  106. package/dist/shared/components-4xxtggzp.js +110 -0
  107. package/dist/shared/components-54nf2x99.js +293 -0
  108. package/dist/shared/components-5pkcfprd.js +232 -0
  109. package/dist/shared/components-5vxtcp88.js +9 -0
  110. package/dist/shared/components-5zry9te1.js +152 -0
  111. package/dist/shared/components-61ckf42z.js +220 -0
  112. package/dist/shared/components-6hzwfmfd.js +58 -0
  113. package/dist/shared/components-6phwsry6.js +361 -0
  114. package/dist/shared/components-6t6nr33r.js +86 -0
  115. package/dist/shared/components-6y1th6k4.js +111 -0
  116. package/dist/shared/components-74c20v2f.js +32 -0
  117. package/dist/shared/components-7cqq1sqy.js +193 -0
  118. package/dist/shared/components-7gv95yfy.js +496 -0
  119. package/dist/shared/components-7nww01w4.js +375 -0
  120. package/dist/shared/components-7zp99w5d.js +62 -0
  121. package/dist/shared/components-8hk9ve3r.js +1200 -0
  122. package/dist/shared/components-8hzbsfbd.js +123 -0
  123. package/dist/shared/components-9p8s8n5q.js +171 -0
  124. package/dist/shared/components-aaq3yk4f.js +304 -0
  125. package/dist/shared/components-bf2d9k02.js +484 -0
  126. package/dist/shared/components-bkvb6nem.js +63 -0
  127. package/dist/shared/components-brnzrp2t.js +262 -0
  128. package/dist/shared/components-csxz9f52.js +42 -0
  129. package/dist/shared/components-de8xsm9y.js +22 -0
  130. package/dist/shared/components-dg0w8g5p.js +26 -0
  131. package/dist/shared/components-dphg9gjr.js +42 -0
  132. package/dist/shared/components-e46kf6cp.js +298 -0
  133. package/dist/shared/components-ed7cmssr.js +105 -0
  134. package/dist/shared/components-ess3ch6w.js +137 -0
  135. package/dist/shared/components-gjfrycb5.js +984 -0
  136. package/dist/shared/components-gndm6am4.js +128 -0
  137. package/dist/shared/components-hjkrv00c.js +191 -0
  138. package/dist/shared/components-hzfp4tjb.js +270 -0
  139. package/dist/shared/components-j65qt1mq.js +719 -0
  140. package/dist/shared/components-jw16snbn.js +19 -0
  141. package/dist/shared/components-jxgznftn.js +146 -0
  142. package/dist/shared/components-kf2ehztc.js +216 -0
  143. package/dist/shared/components-kpbcms10.js +9 -0
  144. package/dist/shared/components-m5br529r.js +141 -0
  145. package/dist/shared/components-nn6xezy2.js +1828 -0
  146. package/dist/shared/components-nnnd2xef.js +9 -0
  147. package/dist/shared/components-p2vmyfe1.js +345 -0
  148. package/dist/shared/components-peg09pzs.js +79 -0
  149. package/dist/shared/components-r22vtgqc.js +45 -0
  150. package/dist/shared/components-r2gke5p6.js +1759 -0
  151. package/dist/shared/components-r43mqnd6.js +160 -0
  152. package/dist/shared/components-r4jt6hgd.js +58 -0
  153. package/dist/shared/components-rc63qsy6.js +159 -0
  154. package/dist/shared/components-s3yfvfkr.js +149 -0
  155. package/dist/shared/components-s5pkbjx1.js +445 -0
  156. package/dist/shared/components-tad5h7ta.js +346 -0
  157. package/dist/shared/components-taxmgbnh.js +120 -0
  158. package/dist/shared/components-tm88ghva.js +215 -0
  159. package/dist/shared/components-v7es8aan.js +144 -0
  160. package/dist/shared/components-vb033rns.js +28 -0
  161. package/dist/shared/components-vc1k7yv2.js +30 -0
  162. package/dist/shared/components-vktws5r6.js +667 -0
  163. package/dist/shared/components-x2xyckd5.js +198 -0
  164. package/dist/shared/components-x3rz4cyn.js +61 -0
  165. package/dist/shared/components-xszag63d.js +141 -0
  166. package/dist/shared/components-y3cqdrgy.js +291 -0
  167. package/dist/shared/components-zvb11ker.js +288 -0
  168. package/dist/shared/components-zx2hr57f.js +124 -0
  169. package/dist/styles.css +1949 -0
  170. package/dist/tailwind.css +219 -0
  171. package/dist/tokens.css +345 -0
  172. package/package.json +102 -3
@@ -0,0 +1,222 @@
1
+ import { MenuTriggerProps } from "@base-ui/react/menu";
2
+ import { Menu } from "@base-ui/react/menu";
3
+ import { ComponentProps, ForwardRefExoticComponent, HTMLAttributes as HTMLAttributes3, ReactNode as ReactNode3, RefAttributes, RefObject as RefObject2 } from "react";
4
+ type SizeVariant = "default" | "compact";
5
+ import { HTMLAttributes, InputHTMLAttributes } from "react";
6
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
7
+ import { RefAttributes as RefAttributes_miuf56 } from "react";
8
+ interface DropdownSearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "size" | "defaultValue"> {
9
+ /** The query. Filter the MenuItems you render against it. Optional under `filter`, where the panel holds the query. */
10
+ value?: string;
11
+ /** Called on every keystroke, and with `""` on close (see `clearOnClose`). Optional under `filter`. */
12
+ onValueChange?: (value: string) => void;
13
+ /** Local addition. Let the surrounding panel hold the query and filter its own `Dropdown.Item` rows by `label`, re-indexing the survivors and showing `Dropdown.Empty` when none match. Defaults to `false`. */
14
+ filter?: boolean;
15
+ /** Placeholder text. Defaults to `"Search…"`. */
16
+ placeholder?: string;
17
+ /** Reset the query to "" when the popup closes (the field unmounts with
18
+ * it), so the menu reopens unfiltered. @default true */
19
+ clearOnClose?: boolean;
20
+ /** Take focus when the popup opens. @default true */
21
+ autoFocus?: boolean;
22
+ }
23
+ declare const DropdownSearch: ForwardRefExoticComponent_tcubfn<DropdownSearchProps & RefAttributes_miuf56<HTMLInputElement>>;
24
+ declare const DropdownEmpty: ForwardRefExoticComponent_tcubfn<HTMLAttributes<HTMLDivElement> & RefAttributes_miuf56<HTMLDivElement>>;
25
+ import { HTMLAttributes as HTMLAttributes2, ReactElement, ReactNode as ReactNode2 } from "react";
26
+ import { ComponentType } from "react";
27
+ interface IconComponentProps {
28
+ size?: number | string;
29
+ strokeWidth?: number | string;
30
+ className?: string;
31
+ }
32
+ type IconComponent = ComponentType<IconComponentProps>;
33
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn2 } from "react";
34
+ import { RefAttributes as RefAttributes_miuf562 } from "react";
35
+ /** What MenuItem hands to the popup's primitive wrapper. `element` is the
36
+ * styled row div (visuals + fluid hover registration, no children); `children`
37
+ * is the row content (icon, label, check). The dropdown wraps them in its
38
+ * own Item / RadioItem primitive, so MenuItem itself stays primitive-free. */
39
+ interface MenuItemRenderOptions {
40
+ /** Radio-style option (boolean `checked` on MenuItem) vs plain action item. */
41
+ radio: boolean;
42
+ /** Checkbox-style option: a boolean `checked` inside a multiple-selection
43
+ * dropdown (`checkedIndices`). Takes precedence over `radio`. */
44
+ checkbox: boolean;
45
+ /** The item's checked state (radio and checkbox items). */
46
+ checked?: boolean;
47
+ /** The item's index — doubles as the radio value. */
48
+ value: number;
49
+ disabled?: boolean;
50
+ label: string;
51
+ closeOnClick: boolean;
52
+ /** The row's activation. It goes on the primitive, not on `element`: Base
53
+ * UI's Enter/Space activation calls the primitive's own `onClick` prop and
54
+ * never sees a handler on the render element. */
55
+ onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
56
+ element: ReactElement;
57
+ children: ReactNode2;
58
+ }
59
+ interface DropdownContextValue {
60
+ registerItem: (index: number, element: HTMLElement | null) => void;
61
+ activeIndex: number | null;
62
+ checkedIndex?: number;
63
+ /** Multiple selection (`checkedIndices` on the dropdown): rows are
64
+ * checkbox items and activating one keeps the menu open by default. */
65
+ multiple?: boolean;
66
+ checkedIndices?: number[];
67
+ /** True when items render inside a Menu popup (DropdownContent), where the
68
+ * primitive's Item / RadioItem own roles, roving highlight, typeahead,
69
+ * and activation. MenuItem switches its rendering accordingly. */
70
+ inMenu?: boolean;
71
+ /** Popup-only: wraps a MenuItem's styled div in the dropdown's menu-item
72
+ * primitive. Absent in the inline Dropdown panel, where MenuItem renders
73
+ * its own ARIA menuitem div. */
74
+ renderMenuItem?: (opts: MenuItemRenderOptions) => ReactElement;
75
+ /** Local addition. The panel owns its selection (`defaultCheckedIndex` /
76
+ * `defaultCheckedIndices`), so a row with no `checked` prop takes its
77
+ * checked state from `checkedIndex` / `checkedIndices` and toggles the
78
+ * panel on activation. */
79
+ selfManaged?: boolean;
80
+ /** Local addition. Toggles the row at an AUTHORED index (see
81
+ * `sourceIndex`). Present with `selfManaged`. */
82
+ toggleIndex?: (sourceIndex: number) => void;
83
+ }
84
+ declare function useDropdown(): DropdownContextValue;
85
+ /** Null-safe context read for callers that render outside a provider. */
86
+ declare function useDropdownMaybe(): DropdownContextValue | null;
87
+ interface MenuItemProps extends HTMLAttributes2<HTMLDivElement> {
88
+ /** Optional leading icon. When omitted, the row renders text-only with no
89
+ * reserved icon column. */
90
+ icon?: IconComponent;
91
+ label: string;
92
+ index: number;
93
+ /** When a boolean, the item is a radio-style option (role="menuitemradio"
94
+ * with aria-checked). When undefined, it is a plain action item
95
+ * (role="menuitem"), unless the panel owns the selection — then the row
96
+ * reads its checked state off the panel and toggles it on activation. */
97
+ checked?: boolean;
98
+ onSelect?: () => void;
99
+ disabled?: boolean;
100
+ /** Popup-only (inside DropdownContent): whether activating the item closes
101
+ * the menu. Ignored in the inline Dropdown panel. @default true */
102
+ closeOnClick?: boolean;
103
+ /** Internal: the row's authored index, stamped by a filtering panel that
104
+ * re-indexed the visible rows. Selection is keyed on it. */
105
+ sourceIndex?: number;
106
+ }
107
+ declare const MenuItem: ForwardRefExoticComponent_tcubfn2<MenuItemProps & RefAttributes_miuf562<HTMLDivElement>>;
108
+ import { JSX as JSX_1kxb2 } from "react";
109
+ interface DropdownProps extends HTMLAttributes3<HTMLDivElement> {
110
+ /** `Dropdown.Item` rows, plus `Dropdown.Label` and `Dropdown.Separator`. */
111
+ children: ReactNode3;
112
+ /** The checked row: drives the animated selected background and the rows' radio semantics. */
113
+ checkedIndex?: number;
114
+ /** Uncontrolled twin of `checkedIndex`: the panel owns the selection, so rows need no `checked` or `onSelect` of their own. */
115
+ defaultCheckedIndex?: number;
116
+ /** Called with the newly checked row, or `undefined` when nothing is checked. */
117
+ onCheckedIndexChange?: (index: number | undefined) => void;
118
+ /** Multiple selection: the checked rows. Rows become checkbox items and contiguous runs share one merged background (see CheckboxGroup). */
119
+ checkedIndices?: number[];
120
+ /** Uncontrolled twin of `checkedIndices`: the panel toggles rows itself. */
121
+ defaultCheckedIndices?: number[];
122
+ /** Called with every checked row after a toggle. */
123
+ onCheckedIndicesChange?: (indices: number[]) => void;
124
+ /** Pins the panel's rows to one step of the size ladder (default 36px, compact 28px — see Sizes). Omitted, they follow the surrounding SizeProvider. */
125
+ size?: SizeVariant;
126
+ /** Extra classes for the panel surface — it is 18rem wide by default. */
127
+ className?: string;
128
+ }
129
+ type DropdownComponent = ForwardRefExoticComponent<DropdownProps & RefAttributes<HTMLDivElement>> & {
130
+ Menu: typeof DropdownMenu;
131
+ Trigger: typeof DropdownTrigger;
132
+ Content: typeof DropdownContent;
133
+ Item: typeof MenuItem;
134
+ Label: typeof DropdownLabel;
135
+ Separator: typeof DropdownSeparator;
136
+ Search: typeof DropdownSearch;
137
+ Empty: typeof DropdownEmpty;
138
+ };
139
+ /**
140
+ * A menu in two forms: an inline panel that sits in the page, or a popup on
141
+ * any trigger you like.
142
+ *
143
+ * `Dropdown` is the inline panel — an elevated surface with the fluid hover
144
+ * background gliding between rows, a selected background that springs to the
145
+ * picked one, contiguous picks merging into a single block in multiple mode,
146
+ * and an animated focus ring. `Dropdown.Menu` + `Dropdown.Trigger` +
147
+ * `Dropdown.Content` is the same panel as a popup on Base UI's Menu, which
148
+ * brings the positioning, dismissal, roving highlight, typeahead and
149
+ * close-on-select; the popup oozes out of its trigger and back through the
150
+ * shared morph (see Morph), goo by default. Both take `checkedIndex` / `checkedIndices` to be driven
151
+ * from outside, or `defaultCheckedIndex` / `defaultCheckedIndices` to run
152
+ * themselves — and a `Dropdown.Search` marked `filter` makes the panel own
153
+ * the query too, keeping only the rows whose `label` matches and showing
154
+ * `Dropdown.Empty` when none do.
155
+ *
156
+ * Statics: Dropdown.Menu (the popup root: open, defaultOpen, onOpenChange,
157
+ * disabled), Dropdown.Trigger (render), Dropdown.Content (the popup panel:
158
+ * side, align, sideOffset and the morph options from, effect, hideSource, tier),
159
+ * Dropdown.Item (a row: index, label, icon, checked, onSelect, disabled),
160
+ * Dropdown.Label, Dropdown.Separator, Dropdown.Search and Dropdown.Empty.
161
+ *
162
+ * @example {@include ./examples.mdx}
163
+ */
164
+ declare const Dropdown: DropdownComponent;
165
+ interface DropdownMenuProps {
166
+ /** `Dropdown.Trigger` and `Dropdown.Content`. */
167
+ children: ReactNode3;
168
+ /** Controlled open state. Pair with `onOpenChange`. */
169
+ open?: boolean;
170
+ /** Initial open state — uncontrolled. Defaults to `false`. */
171
+ defaultOpen?: boolean;
172
+ /** Called when the menu opens or closes. */
173
+ onOpenChange?: (open: boolean) => void;
174
+ /** Disables the menu. Defaults to `false`. */
175
+ disabled?: boolean;
176
+ /** Pins trigger-side content and the portalled popup rows to one step of the size ladder (default 36px, compact 28px — see Sizes). Omitted, they follow the surrounding SizeProvider. */
177
+ size?: SizeVariant;
178
+ }
179
+ type Element_12xgc2 = JSX_1kxb2["Element"];
180
+ declare function DropdownMenu({ children, open: openProp, defaultOpen, onOpenChange, disabled, size }: DropdownMenuProps): Element_12xgc2;
181
+ type DropdownTriggerProps = MenuTriggerProps;
182
+ declare const DropdownTrigger: Menu.Trigger;
183
+ type MenuPositionerProps = ComponentProps<typeof Menu.Positioner>;
184
+ interface DropdownContentProps {
185
+ /** `Dropdown.Item` rows, plus `Dropdown.Label`, `Dropdown.Separator`, `Dropdown.Search`, `Dropdown.Empty`. */
186
+ children: ReactNode3;
187
+ /** Extra classes for the popup surface. */
188
+ className?: string;
189
+ /** Index of the checked item. Drives the animated selected background and
190
+ * the radio-group value announced to assistive tech. */
191
+ checkedIndex?: number;
192
+ /** Uncontrolled twin of `checkedIndex`: the popup owns the selection, so rows need no `checked` or `onSelect` of their own. */
193
+ defaultCheckedIndex?: number;
194
+ /** Called with the newly checked row, or `undefined` when nothing is checked. */
195
+ onCheckedIndexChange?: (index: number | undefined) => void;
196
+ /** Multiple selection: the checked rows. Rows become checkbox items that
197
+ * keep the menu open when toggled, and contiguous runs share one merged
198
+ * background (see CheckboxGroup). */
199
+ checkedIndices?: number[];
200
+ /** Uncontrolled twin of `checkedIndices`: the popup toggles rows itself. */
201
+ defaultCheckedIndices?: number[];
202
+ /** Called with every checked row after a toggle. */
203
+ onCheckedIndicesChange?: (indices: number[]) => void;
204
+ /** Side of the trigger the popup prefers. Defaults to `"bottom"`. */
205
+ side?: MenuPositionerProps["side"];
206
+ /** Alignment against the trigger. Defaults to `"start"`. */
207
+ align?: MenuPositionerProps["align"];
208
+ /** Gap to the trigger, in px. Ignored when the menu opens in place over its trigger (`effect="morph"` with `hideSource`). Defaults to `6`. */
209
+ sideOffset?: number;
210
+ /** Where the menu grows from (see Morph): the trigger, the pointer, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'`. */
211
+ from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
212
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
213
+ effect?: "goo" | "morph" | "slide" | "fade";
214
+ /** Hide the trigger while open, so it reads as turning into the menu. Defaults to `false`. */
215
+ hideSource?: boolean;
216
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'moderate'`. */
217
+ tier?: "moderate" | "slow";
218
+ }
219
+ declare const DropdownContent: ForwardRefExoticComponent<DropdownContentProps & RefAttributes<HTMLDivElement>>;
220
+ declare const DropdownLabel: ForwardRefExoticComponent<HTMLAttributes3<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
221
+ declare const DropdownSeparator: ForwardRefExoticComponent<HTMLAttributes3<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
222
+ export { useDropdownMaybe, useDropdown, Dropdown as default, MenuItemRenderOptions, MenuItem, DropdownTriggerProps, DropdownTrigger, DropdownSeparator, DropdownSearchProps, DropdownSearch, DropdownProps, DropdownMenuProps, DropdownMenu, DropdownLabel, DropdownEmpty, DropdownContextValue, DropdownContentProps, DropdownContent, Dropdown };
@@ -0,0 +1,47 @@
1
+ import {
2
+ Dropdown,
3
+ DropdownContent,
4
+ DropdownEmpty,
5
+ DropdownLabel,
6
+ DropdownMenu,
7
+ DropdownSearch,
8
+ DropdownSeparator,
9
+ DropdownTrigger,
10
+ MenuItem,
11
+ dropdown_default,
12
+ useDropdown,
13
+ useDropdownMaybe
14
+ } from "../../../shared/components-40j34hdb.js";
15
+ import"../../../shared/components-74c20v2f.js";
16
+ import"../../../shared/components-rc63qsy6.js";
17
+ import"../../../shared/components-vb033rns.js";
18
+ import"../../../shared/components-m5br529r.js";
19
+ import"../../../shared/components-jw16snbn.js";
20
+ import"../../../shared/components-ed7cmssr.js";
21
+ import"../../../shared/components-csxz9f52.js";
22
+ import"../../../shared/components-jxgznftn.js";
23
+ import"../../../shared/components-r22vtgqc.js";
24
+ import"../../../shared/components-e46kf6cp.js";
25
+ import"../../../shared/components-7zp99w5d.js";
26
+ import"../../../shared/components-dg0w8g5p.js";
27
+ import"../../../shared/components-kf2ehztc.js";
28
+ import"../../../shared/components-7nww01w4.js";
29
+ import"../../../shared/components-nnnd2xef.js";
30
+ import"../../../shared/components-vc1k7yv2.js";
31
+ import"../../../shared/components-x3rz4cyn.js";
32
+ import"../../../shared/components-0f0as45n.js";
33
+ import"../../../shared/components-kpbcms10.js";
34
+ export {
35
+ useDropdownMaybe,
36
+ useDropdown,
37
+ dropdown_default as default,
38
+ MenuItem,
39
+ DropdownTrigger,
40
+ DropdownSeparator,
41
+ DropdownSearch,
42
+ DropdownMenu,
43
+ DropdownLabel,
44
+ DropdownEmpty,
45
+ DropdownContent,
46
+ Dropdown
47
+ };
@@ -0,0 +1,87 @@
1
+ import { HTMLAttributes, ReactNode as ReactNode2, RefObject } 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
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
12
+ import { RefAttributes as RefAttributes_miuf56 } from "react";
13
+ import { JSX as JSX_1kxb } from "react";
14
+ interface PopoverTriggerProps extends SlotProps {
15
+ /** Open on hover as well as on press (a tap still toggles it on touch). Defaults to `false`. */
16
+ openOnHover?: boolean;
17
+ /** Hover delay before opening, in ms. Needs `openOnHover`. Defaults to `300`. */
18
+ delay?: number;
19
+ /** Delay before closing once the pointer leaves, in ms. Needs `openOnHover`. Defaults to `0`. */
20
+ closeDelay?: number;
21
+ }
22
+ declare const PopoverTrigger: ForwardRefExoticComponent_tcubfn<PopoverTriggerProps & RefAttributes_miuf56<HTMLButtonElement>>;
23
+ declare const PopoverClose: ForwardRefExoticComponent_tcubfn<SlotProps & RefAttributes_miuf56<HTMLButtonElement>>;
24
+ interface PopoverContentProps extends HTMLAttributes<HTMLDivElement> {
25
+ /** Side of the trigger the panel opens on; it flips when there is no room. Defaults to `'bottom'`. */
26
+ side?: "top" | "right" | "bottom" | "left";
27
+ /** Alignment along that side. Defaults to `'center'`, or `'start'` when the panel opens in place (`effect="morph"` with `hideSource`). */
28
+ align?: "start" | "center" | "end";
29
+ /** Gap between trigger and panel in px — the length of the goo neck. Ignored when the panel opens in place over its trigger (`effect="morph"` with `hideSource`). Defaults to `12`. */
30
+ sideOffset?: number;
31
+ /** Where the panel grows from (see Morph): the pressed trigger, the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'`. */
32
+ from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject<HTMLElement | null>;
33
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
34
+ effect?: "goo" | "morph" | "slide" | "fade";
35
+ /** Hide the trigger while open, so it reads as turning into the panel. Defaults to `false`. */
36
+ hideSource?: boolean;
37
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'slow'`. */
38
+ tier?: "moderate" | "slow";
39
+ /** Portal target. Defaults to the document body. */
40
+ container?: HTMLElement | null;
41
+ /** Classes for the panel's content box: padding, width, layout. */
42
+ className?: string;
43
+ /** The panel's content. Everything inside reads the popover's surface level as its substrate. */
44
+ children?: ReactNode2;
45
+ }
46
+ declare const PopoverContent: ForwardRefExoticComponent_tcubfn<PopoverContentProps & RefAttributes_miuf56<HTMLDivElement>>;
47
+ declare const PopoverTitle: ForwardRefExoticComponent_tcubfn<HTMLAttributes<HTMLHeadingElement> & RefAttributes_miuf56<HTMLHeadingElement>>;
48
+ declare const PopoverDescription: ForwardRefExoticComponent_tcubfn<HTMLAttributes<HTMLParagraphElement> & RefAttributes_miuf56<HTMLParagraphElement>>;
49
+ interface PopoverProps {
50
+ /** Controlled open state. Pair with `onOpenChange`. */
51
+ open?: boolean;
52
+ /** Initial open state, for an uncontrolled popover. Defaults to `false`. */
53
+ defaultOpen?: boolean;
54
+ /** Called when the popover opens or closes. */
55
+ onOpenChange?: (open: boolean) => void;
56
+ /** Trap focus and block page interaction while open. Defaults to `false`. */
57
+ modal?: boolean;
58
+ /** The trigger and the panel — `Popover.Trigger` plus a `Popover.Content`. */
59
+ children?: ReactNode2;
60
+ }
61
+ type Element_12xgc = JSX_1kxb["Element"];
62
+ /**
63
+ * A panel that oozes out of its trigger: the surface melts out of the button
64
+ * through a liquid neck, then lets go and settles beside it.
65
+ *
66
+ * The morph comes from the shared engine (see Morph), so the panel can grow
67
+ * from the trigger (the default), the press point, its own center, a viewport
68
+ * edge or any element, with the goo neck, a plain morph, a slide or a fade.
69
+ * It closes back into wherever it came from. The panel lifts 2 surface levels
70
+ * off its substrate and re-provides that level. Built on Base UI's Popover:
71
+ * it opens on press, or on hover too with `openOnHover`; it flips to the
72
+ * other side when there is no room; Escape and an outside press close it.
73
+ *
74
+ * Statics:
75
+ * - `Popover.Trigger` — the control that opens it: `render={<Button/>}` or
76
+ * `asChild`; `openOnHover`, `delay`, `closeDelay`.
77
+ * - `Popover.Content` — the panel: `side`, `align` (the trigger's `start`,
78
+ * `center` or `end`), `sideOffset` and the morph options `from`,
79
+ * `effect`, `hideSource`, `tier`.
80
+ * - `Popover.Title` / `Popover.Description` — its labelled heading and
81
+ * supporting line, wired for screen readers.
82
+ * - `Popover.Close` — closes it; same `render` / `asChild` shape.
83
+ *
84
+ * @example {@include ./examples.mdx}
85
+ */
86
+ declare function Popover({ open, defaultOpen, onOpenChange, modal, children }: PopoverProps): Element_12xgc;
87
+ export { Popover as default, PopoverTriggerProps, PopoverTrigger, PopoverTitle, PopoverProps, PopoverDescription, PopoverContentProps, PopoverContent, PopoverClose, Popover };
@@ -0,0 +1,28 @@
1
+ import {
2
+ Popover,
3
+ PopoverClose,
4
+ PopoverContent,
5
+ PopoverDescription,
6
+ PopoverTitle,
7
+ PopoverTrigger,
8
+ popover_default
9
+ } from "../../../shared/components-s3yfvfkr.js";
10
+ import"../../../shared/components-5vxtcp88.js";
11
+ import"../../../shared/components-csxz9f52.js";
12
+ import"../../../shared/components-jxgznftn.js";
13
+ import"../../../shared/components-7zp99w5d.js";
14
+ import"../../../shared/components-dg0w8g5p.js";
15
+ import"../../../shared/components-7nww01w4.js";
16
+ import"../../../shared/components-nnnd2xef.js";
17
+ import"../../../shared/components-vc1k7yv2.js";
18
+ import"../../../shared/components-0f0as45n.js";
19
+ import"../../../shared/components-kpbcms10.js";
20
+ export {
21
+ popover_default as default,
22
+ PopoverTrigger,
23
+ PopoverTitle,
24
+ PopoverDescription,
25
+ PopoverContent,
26
+ PopoverClose,
27
+ Popover
28
+ };
@@ -0,0 +1,75 @@
1
+ import { AnchorHTMLAttributes, HTMLAttributes, ReactElement, ReactNode, RefObject } from "react";
2
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
3
+ import { RefAttributes as RefAttributes_miuf56 } from "react";
4
+ import { JSX as JSX_1kxb } from "react";
5
+ interface PreviewCardTriggerProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
6
+ /** Hover delay before the card opens, in ms. Defaults to `600`. */
7
+ delay?: number;
8
+ /** Delay before the card closes once the pointer leaves, in ms. Defaults to `300`. */
9
+ closeDelay?: number;
10
+ /** The element that becomes the trigger instead of the default link, e.g. an avatar; it brings its own styling. */
11
+ render?: ReactElement;
12
+ /** Extra classes for the link. */
13
+ className?: string;
14
+ /** The link's content. */
15
+ children?: ReactNode;
16
+ }
17
+ declare const PreviewCardTrigger: ForwardRefExoticComponent_tcubfn<PreviewCardTriggerProps & RefAttributes_miuf56<HTMLAnchorElement>>;
18
+ interface PreviewCardContentProps extends HTMLAttributes<HTMLDivElement> {
19
+ /** Side of the link the card opens on; it flips when there is no room. Defaults to `'bottom'`. */
20
+ side?: "top" | "right" | "bottom" | "left";
21
+ /** Alignment along that side. Defaults to `'center'`, or `'start'` when the card opens in place (`effect="morph"` with `hideSource`). */
22
+ align?: "start" | "center" | "end";
23
+ /** Gap between link and card in px — the length of the goo neck. Ignored when the card opens in place over its link (`effect="morph"` with `hideSource`). Defaults to `12`. */
24
+ sideOffset?: number;
25
+ /** Where the card grows from (see Morph): the hovered link, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'`. */
26
+ from?: "trigger" | "center" | "top" | "right" | "bottom" | "left" | RefObject<HTMLElement | null>;
27
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
28
+ effect?: "goo" | "morph" | "slide" | "fade";
29
+ /** Hide the link while open, so it reads as turning into the card. Defaults to `false`. */
30
+ hideSource?: boolean;
31
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'slow'`. */
32
+ tier?: "moderate" | "slow";
33
+ /** Portal target. Defaults to the document body. */
34
+ container?: HTMLElement | null;
35
+ /** Classes for the card's content box: padding, width, layout. */
36
+ className?: string;
37
+ /** The card's content. Everything inside reads the card's surface level as its substrate. */
38
+ children?: ReactNode;
39
+ }
40
+ declare const PreviewCardContent: ForwardRefExoticComponent_tcubfn<PreviewCardContentProps & RefAttributes_miuf56<HTMLDivElement>>;
41
+ interface PreviewCardProps {
42
+ /** Controlled open state. Pair with `onOpenChange`. */
43
+ open?: boolean;
44
+ /** Initial open state, for an uncontrolled card. Defaults to `false`. */
45
+ defaultOpen?: boolean;
46
+ /** Called when the card opens or closes. */
47
+ onOpenChange?: (open: boolean) => void;
48
+ /** The link and the card — `PreviewCard.Trigger` plus a `PreviewCard.Content`. */
49
+ children?: ReactNode;
50
+ }
51
+ type Element_12xgc = JSX_1kxb["Element"];
52
+ /**
53
+ * A card that oozes out of a link on hover: a preview of what is behind it,
54
+ * melting out of the link through a liquid neck.
55
+ *
56
+ * The morph comes from the shared engine (see Morph), so the card can grow
57
+ * from the link (the default), its own center, a viewport edge or any
58
+ * element, with the goo neck, a plain morph, a slide or a fade, and closes
59
+ * back into wherever it came from. The card lifts 2 surface levels off its
60
+ * substrate and re-provides that level. Built on Base UI's PreviewCard: it
61
+ * opens after a hover or focus delay, stays open while the pointer travels
62
+ * into it, flips to the other side when there is no room, and closes on
63
+ * leave, Escape or an outside press. The card is a visual extra that touch
64
+ * and screen-reader users never get, so the link must make sense on its own.
65
+ *
66
+ * Statics:
67
+ * - `PreviewCard.Trigger` — the link: `href`, `delay`, `closeDelay`, or
68
+ * `render` for another element.
69
+ * - `PreviewCard.Content` — the card: `side`, `align`, `sideOffset` and the
70
+ * morph options `from`, `effect`, `hideSource`, `tier`.
71
+ *
72
+ * @example {@include ./examples.mdx}
73
+ */
74
+ declare function PreviewCard({ open, defaultOpen, onOpenChange, children }: PreviewCardProps): Element_12xgc;
75
+ export { PreviewCard as default, PreviewCardTriggerProps, PreviewCardTrigger, PreviewCardProps, PreviewCardContentProps, PreviewCardContent, PreviewCard };
@@ -0,0 +1,21 @@
1
+ import {
2
+ PreviewCard,
3
+ PreviewCardContent,
4
+ PreviewCardTrigger,
5
+ preview_card_default
6
+ } from "../../../shared/components-6y1th6k4.js";
7
+ import"../../../shared/components-csxz9f52.js";
8
+ import"../../../shared/components-jxgznftn.js";
9
+ import"../../../shared/components-7zp99w5d.js";
10
+ import"../../../shared/components-dg0w8g5p.js";
11
+ import"../../../shared/components-7nww01w4.js";
12
+ import"../../../shared/components-nnnd2xef.js";
13
+ import"../../../shared/components-vc1k7yv2.js";
14
+ import"../../../shared/components-0f0as45n.js";
15
+ import"../../../shared/components-kpbcms10.js";
16
+ export {
17
+ preview_card_default as default,
18
+ PreviewCardTrigger,
19
+ PreviewCardContent,
20
+ PreviewCard
21
+ };
@@ -0,0 +1,67 @@
1
+ import { HTMLAttributes as HTMLAttributes2, ReactNode as ReactNode3, RefObject as RefObject3 } from "react";
2
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn2 } from "react";
3
+ import { RefAttributes as RefAttributes_miuf562 } from "react";
4
+ import { JSX as JSX_1kxb2 } from "react";
5
+ type SheetSide = "top" | "right" | "bottom" | "left";
6
+ interface SheetContentProps extends HTMLAttributes2<HTMLDivElement> {
7
+ /** Where the sheet grows from (see Morph): its own edge, the pressed trigger, the press point, its center, another edge, or a ref to any element. Defaults to the sheet's `side`. */
8
+ from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject3<HTMLElement | null>;
9
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
10
+ effect?: "goo" | "morph" | "slide" | "fade";
11
+ /** Hide the trigger while open, so it reads as turning into the sheet. Defaults to `false`. */
12
+ hideSource?: boolean;
13
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'slow'`. */
14
+ tier?: "moderate" | "slow";
15
+ /** Portal target. Defaults to the document body. */
16
+ container?: HTMLElement | null;
17
+ /** Classes for the sheet's content box: padding, layout. */
18
+ className?: string;
19
+ /** The sheet's content. Everything inside reads the sheet's surface level as its substrate. */
20
+ children?: ReactNode3;
21
+ }
22
+ declare const SheetContent: ForwardRefExoticComponent_tcubfn2<SheetContentProps & RefAttributes_miuf562<HTMLDivElement>>;
23
+ declare const SheetIndent: ForwardRefExoticComponent_tcubfn2<HTMLAttributes2<HTMLDivElement> & RefAttributes_miuf562<HTMLDivElement>>;
24
+ interface SheetProps {
25
+ /** Controlled open state. */
26
+ open?: boolean;
27
+ /** Initial open state, for an uncontrolled sheet. Defaults to `false`. */
28
+ defaultOpen?: boolean;
29
+ /** Called when the sheet opens or closes, including by a swipe. */
30
+ onOpenChange?: (open: boolean) => void;
31
+ /** The edge the sheet is attached to; a swipe back toward it dismisses it. Defaults to `'bottom'`. */
32
+ side?: "top" | "right" | "bottom" | "left";
33
+ /** Snap points for a top or bottom sheet: fractions of the viewport height (0–1), pixels, or `px` / `rem` strings. */
34
+ snapPoints?: (number | string)[];
35
+ /** The snap point an uncontrolled sheet opens at. Defaults to the first one. */
36
+ defaultSnapPoint?: number | string;
37
+ /** Traps focus and locks page scroll while open. Defaults to `true`. */
38
+ modal?: boolean;
39
+ /** The trigger and the content — `Sheet.Trigger` plus a `Sheet.Content`. */
40
+ children?: ReactNode3;
41
+ }
42
+ type Element_12xgc2 = JSX_1kxb2["Element"];
43
+ /**
44
+ * A panel attached to an edge of the window, swiped away to dismiss.
45
+ *
46
+ * The sheet grows out of its own edge with the goo neck by default (see
47
+ * Morph), or from its trigger, the press point or any element, and closes
48
+ * back the same way. Base UI's Drawer does the rest: a swipe back toward the
49
+ * edge dismisses it (it slides on off the edge from where the finger let
50
+ * go), top and bottom sheets can rest at `snapPoints`, and
51
+ * focus and scroll are held while it is open. It floats a spacing step off
52
+ * its edge and lifts 4 surface levels off its substrate, like a dialog; top
53
+ * and bottom sheets show a handle.
54
+ *
55
+ * Statics:
56
+ * - `Sheet.Trigger`, `Sheet.Header`, `Sheet.Footer`, `Sheet.Title`,
57
+ * `Sheet.Description`, `Sheet.Close` — Dialog's parts, which work the same
58
+ * here.
59
+ * - `Sheet.Content` — the panel, with the morph options `from`, `effect`,
60
+ * `hideSource`, `tier`.
61
+ * - `Sheet.Provider` / `Sheet.Indent` — wrap the page in an `Indent` under a
62
+ * `Provider` and it eases back while any sheet inside is open.
63
+ *
64
+ * @example {@include ./examples.mdx}
65
+ */
66
+ declare function Sheet({ children, open, defaultOpen, onOpenChange, side, snapPoints, defaultSnapPoint, modal }: SheetProps): Element_12xgc2;
67
+ export { Sheet as default, SheetSide, SheetProps, SheetIndent, SheetContentProps, SheetContent, Sheet };
@@ -0,0 +1,26 @@
1
+ import {
2
+ Sheet,
3
+ SheetContent,
4
+ SheetIndent,
5
+ sheet_default
6
+ } from "../../../shared/components-r43mqnd6.js";
7
+ import"../../../shared/components-61ckf42z.js";
8
+ import"../../../shared/components-5vxtcp88.js";
9
+ import"../../../shared/components-5pkcfprd.js";
10
+ import"../../../shared/components-m5br529r.js";
11
+ import"../../../shared/components-csxz9f52.js";
12
+ import"../../../shared/components-jxgznftn.js";
13
+ import"../../../shared/components-7zp99w5d.js";
14
+ import"../../../shared/components-dg0w8g5p.js";
15
+ import"../../../shared/components-7nww01w4.js";
16
+ import"../../../shared/components-nnnd2xef.js";
17
+ import"../../../shared/components-vc1k7yv2.js";
18
+ import"../../../shared/components-x3rz4cyn.js";
19
+ import"../../../shared/components-0f0as45n.js";
20
+ import"../../../shared/components-kpbcms10.js";
21
+ export {
22
+ sheet_default as default,
23
+ SheetIndent,
24
+ SheetContent,
25
+ Sheet
26
+ };