@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,83 @@
1
+ import { ComponentType } from "react";
2
+ interface IconComponentProps {
3
+ size?: number | string;
4
+ strokeWidth?: number | string;
5
+ className?: string;
6
+ }
7
+ type IconComponent = ComponentType<IconComponentProps>;
8
+ /** One command: the label the query matches, plus what the row shows and does. */
9
+ interface CommandItem {
10
+ label: string;
11
+ icon?: IconComponent;
12
+ /** Shown at the end of the row; display only, nothing binds it. */
13
+ shortcut?: string;
14
+ /** More words the query matches. */
15
+ keywords?: string[];
16
+ disabled?: boolean;
17
+ onSelect?: () => void;
18
+ }
19
+ import { JSX as JSX_1kxb3 } from "react";
20
+ interface SearchProps {
21
+ /** How it rests: a pill showing the placeholder (and the shortcut), or a lone search icon. Defaults to `'pill'`. */
22
+ variant?: "pill" | "icon";
23
+ /** The field's placeholder, the pill's label and the accessible name of both. Defaults to `'Search'`. */
24
+ placeholder?: string;
25
+ /** Suggestions offered below the field and filtered as you type: strings, or Command items (`{ label, icon, keywords }`). Leave out for a plain search field. */
26
+ items?: (string | CommandItem)[];
27
+ /** Controlled query. */
28
+ value?: string;
29
+ /** Initial query, for an uncontrolled field. Defaults to `''`. */
30
+ defaultValue?: string;
31
+ /** Called on every change of the query. */
32
+ onValueChange?: (value: string) => void;
33
+ /** Called with the query on Enter, and with a suggestion's label when one is picked. */
34
+ onSubmit?: (query: string) => void;
35
+ /** Controlled expanded state. */
36
+ expanded?: boolean;
37
+ /** Initial expanded state, for an uncontrolled field. Defaults to `false`. */
38
+ defaultExpanded?: boolean;
39
+ /** Called when the field expands or collapses. */
40
+ onExpandedChange?: (expanded: boolean) => void;
41
+ /** Width of the expanded field, in px. Defaults to `288`. */
42
+ width?: number;
43
+ /** The edge that stays put: the field grows from it toward the other one, over its neighbors. Defaults to `'start'`. */
44
+ align?: "start" | "end";
45
+ /** A key that expands the field from anywhere on the page outside another field, shown on the pill. */
46
+ shortcut?: string;
47
+ /** Shown in the suggestions when none matches. Defaults to `'No results found.'`. */
48
+ emptyMessage?: string;
49
+ /** How the suggestions grow out of the field (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
50
+ effect?: "goo" | "morph" | "slide" | "fade";
51
+ /** Spring tier of the suggestions' plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'moderate'`. */
52
+ tier?: "moderate" | "slow";
53
+ /** Classes for the root, the box the resting button keeps in the layout. */
54
+ className?: string;
55
+ }
56
+ type Element_12xgc3 = JSX_1kxb3["Element"];
57
+ /**
58
+ * A search button that grows into the field in place, with suggestions that
59
+ * ooze out below it.
60
+ *
61
+ * At rest it is a pill showing the placeholder, or a lone search icon. A
62
+ * press (or its `shortcut` key) springs it to `width` and focuses the
63
+ * field. It grows over its neighbors rather than pushing them: the resting
64
+ * box stays in the layout, so nothing around it moves, and `align="end"`
65
+ * grows it leftward, for a toolbar's far end. The search icon never moves.
66
+ * Typing opens the suggestions, which melt out of the field through the
67
+ * goo neck (see Morph) once it has finished growing; the arrows move one
68
+ * fluid highlight through them, and Enter or a press picks one. Escape
69
+ * closes the suggestions, then clears the query, then collapses the field
70
+ * and hands focus back to the button; leaving an empty field collapses it
71
+ * too. The field lifts 2 surface levels while open, the same level as its
72
+ * suggestions, so the two read as one liquid.
73
+ *
74
+ * With `items` the field is a combobox over a listbox of suggestions,
75
+ * built on Base UI's Autocomplete (filtering by label and keywords, the
76
+ * input keeps focus while the highlight moves); without, it is a plain
77
+ * search box. Either way it sits in a `<search>` landmark around a form,
78
+ * and Enter reports the query to `onSubmit`.
79
+ *
80
+ * @example {@include ./examples.mdx}
81
+ */
82
+ declare function Search({ variant, placeholder, items, value, defaultValue, onValueChange, onSubmit, expanded, defaultExpanded, onExpandedChange, width, align, shortcut, emptyMessage, effect, tier, className }: SearchProps): Element_12xgc3;
83
+ export { Search as default, SearchProps, Search };
@@ -0,0 +1,28 @@
1
+ import {
2
+ Search,
3
+ search_default
4
+ } from "../../../shared/components-brnzrp2t.js";
5
+ import"../../../shared/components-4hh0gm0v.js";
6
+ import"../../../shared/components-61ckf42z.js";
7
+ import"../../../shared/components-5vxtcp88.js";
8
+ import"../../../shared/components-5pkcfprd.js";
9
+ import"../../../shared/components-m5br529r.js";
10
+ import"../../../shared/components-jw16snbn.js";
11
+ import"../../../shared/components-ed7cmssr.js";
12
+ import"../../../shared/components-csxz9f52.js";
13
+ import"../../../shared/components-jxgznftn.js";
14
+ import"../../../shared/components-r22vtgqc.js";
15
+ import"../../../shared/components-e46kf6cp.js";
16
+ import"../../../shared/components-7zp99w5d.js";
17
+ import"../../../shared/components-dg0w8g5p.js";
18
+ import"../../../shared/components-kf2ehztc.js";
19
+ import"../../../shared/components-7nww01w4.js";
20
+ import"../../../shared/components-nnnd2xef.js";
21
+ import"../../../shared/components-vc1k7yv2.js";
22
+ import"../../../shared/components-x3rz4cyn.js";
23
+ import"../../../shared/components-0f0as45n.js";
24
+ import"../../../shared/components-kpbcms10.js";
25
+ export {
26
+ search_default as default,
27
+ Search
28
+ };
@@ -0,0 +1,105 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import { HTMLAttributes, ReactNode as ReactNode2 } 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
+ type SizeVariant = "default" | "compact";
11
+ import { JSX as JSX_1kxb2 } from "react";
12
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
13
+ import { RefAttributes as RefAttributes_miuf56 } from "react";
14
+ import { ClassProp as ClassProp_wz9o0r } from "class-variance-authority/types";
15
+ interface SelectProps {
16
+ /** `Select.Trigger` and `Select.Content`. */
17
+ children: ReactNode2;
18
+ /** Controlled selected value. Pair with `onValueChange`. */
19
+ value?: string;
20
+ /** Uncontrolled default value — the select then keeps the selection itself. */
21
+ defaultValue?: string;
22
+ /** Called when the selected value changes. */
23
+ onValueChange?: (value: string) => void;
24
+ /** Disables the entire select. Defaults to `false`. */
25
+ disabled?: boolean;
26
+ /** Name for form submission (renders a hidden native input). */
27
+ name?: string;
28
+ /** Marks the select as required in forms. Defaults to `false`. */
29
+ required?: boolean;
30
+ /** Pins trigger and popup to one step of the size ladder (default 36px, compact 28px — see Sizes). Omitted, both follow the surrounding SizeProvider. */
31
+ size?: SizeVariant;
32
+ }
33
+ type Element_12xgc2 = JSX_1kxb2["Element"];
34
+ /**
35
+ * An animated select menu: fluid hover on the rows, a popup that oozes out of
36
+ * its trigger, and a checkmark that draws itself as the selection lands.
37
+ *
38
+ * Built on Base UI's Select — positioning and collision flipping, dismissal,
39
+ * typeahead, combobox ARIA and the hidden form input all come from the
40
+ * primitive. This layer adds the magnetic hover background, the selected
41
+ * background that springs from the old row to the picked one, a keyboard
42
+ * focus ring that only appears once you actually use the keyboard, and the
43
+ * popup's open and close through the shared morph (see Morph), goo by
44
+ * default. A pick holds the popup open for 300ms so that acknowledgment is
45
+ * seen; Escape and outside presses close at once. Uncontrolled through
46
+ * `defaultValue`, controlled through `value` + `onValueChange`.
47
+ *
48
+ * Statics: Select.Trigger (variant, icon, placeholder, error),
49
+ * Select.Content (the popup: the morph options from, effect, hideSource,
50
+ * tier), Select.Item (index, value, icon, disabled), Select.Group,
51
+ * Select.Label and Select.Separator.
52
+ *
53
+ * @example {@include ./examples.mdx}
54
+ */
55
+ declare function Select({ children, value, defaultValue, onValueChange, disabled, name, required, size }: SelectProps): Element_12xgc2;
56
+ declare const triggerVariants: (props?: ({
57
+ variant?: "borderless" | "bordered" | null | undefined;
58
+ } & ClassProp_wz9o0r) | undefined) => string;
59
+ interface SelectTriggerProps extends Omit<HTMLAttributes<HTMLButtonElement>, "children">, VariantProps<typeof triggerVariants> {
60
+ /** Visual style of the trigger. Defaults to `"bordered"`. */
61
+ variant?: "bordered" | "borderless";
62
+ /** Optional icon displayed before the value. */
63
+ icon?: IconComponent;
64
+ /** Text shown when no value is selected. Defaults to `"Select…"`. */
65
+ placeholder?: string;
66
+ /** Error message shown below the trigger; also tints the border and sets `aria-invalid`. */
67
+ error?: string;
68
+ /** Size override for the trigger alone. Prefer the `size` prop on `<Select>` (or a surrounding SizeProvider) so the popup matches. */
69
+ size?: SizeVariant;
70
+ /** Extra classes for the trigger button. */
71
+ className?: string;
72
+ }
73
+ declare const SelectTrigger: ForwardRefExoticComponent_tcubfn<SelectTriggerProps & RefAttributes_miuf56<HTMLButtonElement>>;
74
+ interface SelectContentProps {
75
+ /** 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'`. */
76
+ from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | React.RefObject<HTMLElement | null>;
77
+ /** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
78
+ effect?: "goo" | "morph" | "slide" | "fade";
79
+ /** Hide the trigger while open, so it reads as turning into the menu. Defaults to `false`. */
80
+ hideSource?: boolean;
81
+ /** Spring tier of a plain morph, slide or fade; goo runs on its own `spring.goo`. Defaults to `'moderate'`. */
82
+ tier?: "moderate" | "slow";
83
+ /** Additional classes for the menu container. */
84
+ className?: string;
85
+ /** `Select.Item`, `Select.Group`, `Select.Label`, `Select.Separator`. */
86
+ children: ReactNode2;
87
+ }
88
+ declare const SelectContent: ForwardRefExoticComponent_tcubfn<SelectContentProps & RefAttributes_miuf56<HTMLDivElement>>;
89
+ interface SelectItemProps extends HTMLAttributes<HTMLDivElement> {
90
+ /** Optional icon displayed before the label. */
91
+ icon?: IconComponent;
92
+ /** Position index within the content — what fluid hover measures rows by. */
93
+ index: number;
94
+ /** Unique value for this option. */
95
+ value: string;
96
+ /** Disables this individual item. Defaults to `false`. */
97
+ disabled?: boolean;
98
+ /** The row label. A string label is also what the trigger shows for this value. */
99
+ children?: ReactNode2;
100
+ }
101
+ declare const SelectItem: ForwardRefExoticComponent_tcubfn<SelectItemProps & RefAttributes_miuf56<HTMLDivElement>>;
102
+ declare function SelectGroup({ children, className,...props }: HTMLAttributes<HTMLDivElement>): Element_12xgc2;
103
+ declare const SelectLabel: ForwardRefExoticComponent_tcubfn<HTMLAttributes<HTMLDivElement> & RefAttributes_miuf56<HTMLDivElement>>;
104
+ declare const SelectSeparator: ForwardRefExoticComponent_tcubfn<HTMLAttributes<HTMLDivElement> & RefAttributes_miuf56<HTMLDivElement>>;
105
+ export { triggerVariants, Select as default, SelectTriggerProps, SelectTrigger, SelectSeparator, SelectProps, SelectLabel, SelectItemProps, SelectItem, SelectGroup, SelectContentProps, SelectContent, Select };
@@ -0,0 +1,37 @@
1
+ import {
2
+ Select,
3
+ SelectContent,
4
+ SelectGroup,
5
+ SelectItem,
6
+ SelectLabel,
7
+ SelectSeparator,
8
+ SelectTrigger,
9
+ select_default,
10
+ triggerVariants
11
+ } from "../../../shared/components-7gv95yfy.js";
12
+ import"../../../shared/components-vb033rns.js";
13
+ import"../../../shared/components-jw16snbn.js";
14
+ import"../../../shared/components-ed7cmssr.js";
15
+ import"../../../shared/components-csxz9f52.js";
16
+ import"../../../shared/components-jxgznftn.js";
17
+ import"../../../shared/components-r22vtgqc.js";
18
+ import"../../../shared/components-e46kf6cp.js";
19
+ import"../../../shared/components-7zp99w5d.js";
20
+ import"../../../shared/components-kf2ehztc.js";
21
+ import"../../../shared/components-7nww01w4.js";
22
+ import"../../../shared/components-nnnd2xef.js";
23
+ import"../../../shared/components-vc1k7yv2.js";
24
+ import"../../../shared/components-x3rz4cyn.js";
25
+ import"../../../shared/components-0f0as45n.js";
26
+ import"../../../shared/components-kpbcms10.js";
27
+ export {
28
+ triggerVariants,
29
+ select_default as default,
30
+ SelectTrigger,
31
+ SelectSeparator,
32
+ SelectLabel,
33
+ SelectItem,
34
+ SelectGroup,
35
+ SelectContent,
36
+ Select
37
+ };
@@ -0,0 +1,108 @@
1
+ import { CSSProperties, HTMLAttributes } from "react";
2
+ type SizeVariant = "default" | "compact";
3
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
4
+ import { RefAttributes as RefAttributes_miuf56 } from "react";
5
+ type SliderValue = number | [number, number];
6
+ type ValuePosition = "left" | "right" | "top" | "bottom" | "tooltip";
7
+ /** Props of the compact engine — the feature-rich design (ranges, discrete
8
+ * step lists, value display) that renders the ladder's compact step. The
9
+ * public <Slider> accepts these plus `variant` and `size`. */
10
+ interface SliderEngineProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
11
+ value: SliderValue;
12
+ onChange: (value: SliderValue) => void;
13
+ min?: number;
14
+ max?: number;
15
+ step?: number;
16
+ /**
17
+ * Discrete list of allowed values, e.g. [0.1, 0.5, 0.7, 1.1, 1.3].
18
+ *
19
+ * When set, the thumb snaps only to these values (positioned proportionally
20
+ * along the track) and arrow keys walk the list. `min`/`max` derive from the
21
+ * list's extremes and `step` is ignored.
22
+ */
23
+ steps?: number[];
24
+ showSteps?: boolean;
25
+ showValue?: boolean;
26
+ valuePosition?: ValuePosition;
27
+ formatValue?: (v: number) => string;
28
+ label?: string;
29
+ disabled?: boolean;
30
+ trackClassName?: string;
31
+ trackStyle?: CSSProperties;
32
+ fillClassName?: string;
33
+ fillStyle?: CSSProperties;
34
+ hideFill?: boolean;
35
+ thumbColor?: string;
36
+ thumbBorderColor?: string;
37
+ }
38
+ interface SliderComfortableProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragOver" | "onAnimationStart"> {
39
+ value: number;
40
+ onChange: (value: number) => void;
41
+ min?: number;
42
+ max?: number;
43
+ step?: number;
44
+ variant?: "pips" | "scrubber";
45
+ label?: string;
46
+ formatValue?: (v: number) => string;
47
+ disabled?: boolean;
48
+ }
49
+ interface SliderProps extends Omit<SliderEngineProps, "value" | "onChange"> {
50
+ /** Step on the size ladder (see Sizes). Default renders the pip/scrubber design; compact renders the dense design. Defaults to the surrounding SizeProvider, else `"default"`. */
51
+ size?: SizeVariant;
52
+ /** Default-step layout. "pips" shows discrete dot indicators; "scrubber" drags anywhere in the row for a continuous value. Ignored when the compact design renders. Defaults to `"pips"`. */
53
+ variant?: "pips" | "scrubber";
54
+ /** Current value (controlled). Pass an array to enable range mode with two thumbs. Omit it to let the slider keep its own state, seeded from `defaultValue`. */
55
+ value?: SliderValue;
56
+ /** Initial value when uncontrolled. An array starts the slider in range mode. Defaults to the lowest of `steps`, else `min`, else `0`. */
57
+ defaultValue?: SliderValue;
58
+ /** Called when the value changes via drag, click, or keyboard. */
59
+ onChange?: (value: SliderValue) => void;
60
+ /** Minimum value. Defaults to `0`. */
61
+ min?: number;
62
+ /** Maximum value. Defaults to `100`. */
63
+ max?: number;
64
+ /** Step increment. Thumb snaps to the nearest step during drag. Defaults to `1`. */
65
+ step?: number;
66
+ /** Discrete list of allowed values, e.g. 0.1, 0.5, 0.7, 1.1, 1.3. The thumb snaps only to these values and arrow keys walk the list; min/max derive from the list's extremes and step is ignored. */
67
+ steps?: number[];
68
+ /** Render dot indicators at each step position on the track. Defaults to `false`. */
69
+ showSteps?: boolean;
70
+ /** Whether to display the current value label. Defaults to `true`. */
71
+ showValue?: boolean;
72
+ /** Position of the value label. "tooltip" shows above the thumb during interaction. Defaults to `"left"`. */
73
+ valuePosition?: ValuePosition;
74
+ /** Custom formatter for the value label. Defaults to `String`. */
75
+ formatValue?: (v: number) => string;
76
+ /** Accessible label for the slider, also shown as prefix in the value display. */
77
+ label?: string;
78
+ /** Disables all interaction. Defaults to `false`. */
79
+ disabled?: boolean;
80
+ }
81
+ /**
82
+ * One slider, two ladder steps: the default step's pip/scrubber design, and
83
+ * the compact step's dense design with track fill, range mode, and value
84
+ * display.
85
+ *
86
+ * One component: the default step renders the pip/scrubber design, the
87
+ * compact step the dense one. Compact-only props (an array value, steps,
88
+ * showSteps, showValue, valuePosition, track styling) always render the
89
+ * compact design so no capability is lost. Either design snaps to the step
90
+ * grid while dragging, previews the value you are about to pick as a filled
91
+ * bar plus a tooltip, and carries an invisible Base UI slider underneath for
92
+ * the ARIA roles and arrow-key navigation. In the dense design the value
93
+ * label is click-to-edit.
94
+ *
95
+ * Works controlled (`value` + `onChange`, exactly as upstream) or
96
+ * uncontrolled (`defaultValue`, with `onChange` reporting each change).
97
+ * Track styling props are inherited from the compact engine:
98
+ * `trackClassName`, `trackStyle`, `fillClassName`, `fillStyle`, `hideFill`,
99
+ * `thumbColor` and `thumbBorderColor` — each one also forces the dense
100
+ * design.
101
+ *
102
+ * @example {@include ./examples.mdx}
103
+ */
104
+ declare const Slider: ForwardRefExoticComponent_tcubfn<SliderProps & RefAttributes_miuf56<HTMLDivElement>>;
105
+ /** @deprecated The comfortable design is now the ladder's default step —
106
+ * render <Slider> (optionally with `variant`) instead. */
107
+ declare const SliderComfortable: ForwardRefExoticComponent_tcubfn<SliderComfortableProps & RefAttributes_miuf56<HTMLDivElement>>;
108
+ export { Slider as default, ValuePosition, SliderValue, SliderProps, SliderComfortableProps, SliderComfortable, Slider };
@@ -0,0 +1,16 @@
1
+ import {
2
+ Slider,
3
+ SliderComfortable,
4
+ slider_default
5
+ } from "../../../shared/components-8hk9ve3r.js";
6
+ import"../../../shared/components-7zp99w5d.js";
7
+ import"../../../shared/components-dg0w8g5p.js";
8
+ import"../../../shared/components-vc1k7yv2.js";
9
+ import"../../../shared/components-x3rz4cyn.js";
10
+ import"../../../shared/components-0f0as45n.js";
11
+ import"../../../shared/components-kpbcms10.js";
12
+ export {
13
+ slider_default as default,
14
+ SliderComfortable,
15
+ Slider
16
+ };
@@ -0,0 +1,43 @@
1
+ import { Transition } from "motion/react";
2
+ import { HTMLAttributes } from "react";
3
+ type SizeVariant = "default" | "compact";
4
+ import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
5
+ import { RefAttributes as RefAttributes_miuf56 } from "react";
6
+ interface SwitchProps extends HTMLAttributes<HTMLDivElement> {
7
+ /** Text label displayed next to the switch. */
8
+ label: string;
9
+ /** Whether the switch is on (controlled). Omit it to let the switch keep its own state, seeded from `defaultChecked`. */
10
+ checked?: boolean;
11
+ /** Whether the switch starts on when uncontrolled. Defaults to `false`. */
12
+ defaultChecked?: boolean;
13
+ /** Called when the switch is toggled. */
14
+ onToggle?: () => void;
15
+ /** Called with the new state whenever the switch is toggled, controlled or not. */
16
+ onCheckedChange?: (checked: boolean) => void;
17
+ /** Disables the switch. Defaults to `false`. */
18
+ disabled?: boolean;
19
+ /** Transition for the thumb's slide and hover/press stretch. Defaults to the `spring.moderate` motion token. */
20
+ thumbTransition?: Transition;
21
+ /** Pins the switch to one step of the size ladder (see Sizes). Defaults to the surrounding SizeProvider, else `"default"`. */
22
+ size?: SizeVariant;
23
+ }
24
+ /**
25
+ * Toggle switch with animated thumb and label.
26
+ *
27
+ * The whole row — track and label — is the hit target: click anywhere to
28
+ * toggle, or grab the thumb and drag it across the midpoint. The thumb
29
+ * stretches into a pill on hover, squashes on press and melts across the
30
+ * track like a drop when it toggles (see Morph), springing with the motion
31
+ * tokens; a Base UI switch underneath carries the role, keyboard
32
+ * toggling (Space/Enter) and focus ring. The label brightens when the switch
33
+ * is on.
34
+ *
35
+ * Works controlled (`checked` + `onToggle`, exactly as upstream) or
36
+ * uncontrolled (`defaultChecked`, with `onCheckedChange` reporting each
37
+ * change). `size` pins it to one step of the size ladder; otherwise it
38
+ * follows the surrounding SizeProvider.
39
+ *
40
+ * @example {@include ./examples.mdx}
41
+ */
42
+ declare const Switch: ForwardRefExoticComponent_tcubfn<SwitchProps & RefAttributes_miuf56<HTMLDivElement>>;
43
+ export { Switch as default, SwitchProps, Switch };
@@ -0,0 +1,16 @@
1
+ import {
2
+ Switch,
3
+ switch_default
4
+ } from "../../../shared/components-hjkrv00c.js";
5
+ import"../../../shared/components-dg0w8g5p.js";
6
+ import"../../../shared/components-kf2ehztc.js";
7
+ import"../../../shared/components-7nww01w4.js";
8
+ import"../../../shared/components-nnnd2xef.js";
9
+ import"../../../shared/components-vc1k7yv2.js";
10
+ import"../../../shared/components-x3rz4cyn.js";
11
+ import"../../../shared/components-0f0as45n.js";
12
+ import"../../../shared/components-kpbcms10.js";
13
+ export {
14
+ switch_default as default,
15
+ Switch
16
+ };
@@ -0,0 +1,117 @@
1
+ import { ForwardRefExoticComponent, HTMLAttributes, ReactNode, RefAttributes } from "react";
2
+ type SizeVariant = "default" | "compact";
3
+ type AccordionGroupSingleProps = {
4
+ /** Whether one or multiple items can be expanded. Defaults to `"single"`. */
5
+ type?: "single";
6
+ /** Controlled expanded value. */
7
+ value?: string;
8
+ /** Initially expanded item value — uncontrolled. */
9
+ defaultValue?: string;
10
+ /** Callback when expanded state changes. */
11
+ onValueChange?: (value: string) => void;
12
+ /** Allow collapsing all items when type is single. Defaults to `true`. */
13
+ collapsible?: boolean;
14
+ };
15
+ type AccordionGroupMultipleProps = {
16
+ /** Whether one or multiple items can be expanded. */
17
+ type: "multiple";
18
+ /** Controlled expanded values. */
19
+ value?: string[];
20
+ /** Initially expanded item values — uncontrolled. */
21
+ defaultValue?: string[];
22
+ /** Callback when expanded state changes. */
23
+ onValueChange?: (value: string[]) => void;
24
+ };
25
+ type AccordionGroupProps = HTMLAttributes<HTMLDivElement> & {
26
+ children: ReactNode;
27
+ /** Pins the group's rows to one step of the size ladder (default 36px,
28
+ * compact 28px — see /docs/sizes). Omitted, they follow the surrounding
29
+ * SizeProvider. */
30
+ size?: SizeVariant;
31
+ /** What an open item tints. "item" paints the row and its panel as one
32
+ * block, and holds while it stays open. "trigger" scopes the fill to the
33
+ * row and shows it on hover only, leaving the panel on the page's own
34
+ * surface — the way a sidebar row highlights without colouring its
35
+ * sub-tree. @default "item" */
36
+ highlight?: "trigger" | "item";
37
+ } & (AccordionGroupSingleProps | AccordionGroupMultipleProps);
38
+ declare const AccordionGroup: ForwardRefExoticComponent<AccordionGroupProps & RefAttributes<HTMLDivElement>>;
39
+ interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
40
+ /** The accordion's items (`Accordion.Item`). */
41
+ children: ReactNode;
42
+ /** Whether one or multiple items can be expanded. Defaults to `"single"`. */
43
+ type?: "single" | "multiple";
44
+ /** Allow collapsing all items when type is single. Defaults to `true` (Base UI's single mode is always collapsible). */
45
+ collapsible?: boolean;
46
+ /** Initially expanded item value(s) — uncontrolled. A string for `type="single"`, an array for `type="multiple"`. */
47
+ defaultValue?: string | string[];
48
+ /** Controlled expanded value(s). Pair with `onValueChange`. */
49
+ value?: string | string[];
50
+ /** Callback when expanded state changes. Receives a string in single mode, an array in multiple mode. */
51
+ onValueChange?: ((value: string) => void) | ((value: string[]) => void);
52
+ /** What an open item tints: `item` holds a block across the row and its panel, `trigger` scopes it to the row and shows it on hover. Same prop on `Accordion.Group` and on a standalone `Accordion.Item`. Defaults to `"item"`. */
53
+ highlight?: "trigger" | "item";
54
+ /** Pins the accordion's rows to one step of the size ladder (default 36px, compact 28px). Omitted, they follow the surrounding SizeProvider. */
55
+ size?: SizeVariant;
56
+ }
57
+ type AccordionComponent = ForwardRefExoticComponent<AccordionProps & RefAttributes<HTMLDivElement>> & {
58
+ Group: typeof AccordionGroup;
59
+ Item: typeof AccordionItem;
60
+ Trigger: typeof AccordionTrigger;
61
+ Content: typeof AccordionContent;
62
+ };
63
+ /**
64
+ * Collapsible sections with animated expand/collapse and fluid hover in
65
+ * grouped mode.
66
+ *
67
+ * Accordion is the standalone form: every row carries its own hover fill.
68
+ * Accordion.Group takes the same props and adds one magnetic highlight that
69
+ * glides between rows, so give each item inside it an `index`. Built on Base
70
+ * UI Accordion (WAI-ARIA wiring, keyboard navigation, focus management).
71
+ * Uncontrolled through `defaultValue`, controlled through `value` +
72
+ * `onValueChange`.
73
+ *
74
+ * The panel grows out of its row (see Morph): a shape drips from where the
75
+ * row was pressed (its middle, from the keyboard), widens into the whole
76
+ * item, and the content is revealed by a clip from the same shape. Under the
77
+ * default `highlight="item"` that shape is the open tint, melted into the
78
+ * row through a liquid goo neck; closing folds it back into the row. The
79
+ * rows below ride the shape's bottom edge, so nothing jumps.
80
+ *
81
+ * Statics: Accordion.Group (the grouped root: type, collapsible,
82
+ * defaultValue, value, onValueChange, highlight, size), Accordion.Item (value,
83
+ * index, disabled), Accordion.Trigger (the row that toggles its item) and
84
+ * Accordion.Content (the collapsible panel: `effect` — `'goo'` or a plain
85
+ * `'morph'` — and the spring `tier`, `'slow'` or `'moderate'`).
86
+ *
87
+ * @example {@include ./examples.mdx}
88
+ */
89
+ declare const Accordion: AccordionComponent;
90
+ interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {
91
+ /** Unique identifier for this item. */
92
+ value: string;
93
+ /** Position index for fluid hover. Required inside `Accordion.Group`, omit for standalone. */
94
+ index?: number;
95
+ /** Whether this item is disabled. Defaults to `false`. */
96
+ disabled?: boolean;
97
+ /** Standalone equivalent of the group's prop: what an open item tints. Ignored inside a group, which decides for all its rows. Defaults to the standalone root's `highlight`, else `"item"`. */
98
+ highlight?: "trigger" | "item";
99
+ /** The item's `Accordion.Trigger` and `Accordion.Content`. */
100
+ children: ReactNode;
101
+ }
102
+ declare const AccordionItem: ForwardRefExoticComponent<AccordionItemProps & RefAttributes<HTMLDivElement>>;
103
+ interface AccordionTriggerProps extends HTMLAttributes<HTMLButtonElement> {
104
+ /** Trigger label content. */
105
+ children: ReactNode;
106
+ }
107
+ declare const AccordionTrigger: ForwardRefExoticComponent<AccordionTriggerProps & RefAttributes<HTMLButtonElement>>;
108
+ interface AccordionContentProps extends HTMLAttributes<HTMLDivElement> {
109
+ /** Collapsible content. */
110
+ children: ReactNode;
111
+ /** How the panel grows out of its row (see Morph): `goo` melts the open tint out of the row through a liquid neck, `morph` grows it without one. Defaults to `'goo'`. */
112
+ effect?: "goo" | "morph";
113
+ /** Spring tier the panel opens on; it closes on the tier's faster exit tween. Defaults to `'slow'`. */
114
+ tier?: "moderate" | "slow";
115
+ }
116
+ declare const AccordionContent: ForwardRefExoticComponent<AccordionContentProps & RefAttributes<HTMLDivElement>>;
117
+ export { Accordion as default, AccordionTrigger, AccordionItem, AccordionGroup, AccordionContent, Accordion };
@@ -0,0 +1,30 @@
1
+ import {
2
+ Accordion,
3
+ AccordionContent,
4
+ AccordionGroup,
5
+ AccordionItem,
6
+ AccordionTrigger,
7
+ accordion_default
8
+ } from "../../../shared/components-vktws5r6.js";
9
+ import"../../../shared/components-vb033rns.js";
10
+ import"../../../shared/components-m5br529r.js";
11
+ import"../../../shared/components-jxgznftn.js";
12
+ import"../../../shared/components-r22vtgqc.js";
13
+ import"../../../shared/components-e46kf6cp.js";
14
+ import"../../../shared/components-7zp99w5d.js";
15
+ import"../../../shared/components-dg0w8g5p.js";
16
+ import"../../../shared/components-kf2ehztc.js";
17
+ import"../../../shared/components-7nww01w4.js";
18
+ import"../../../shared/components-nnnd2xef.js";
19
+ import"../../../shared/components-vc1k7yv2.js";
20
+ import"../../../shared/components-x3rz4cyn.js";
21
+ import"../../../shared/components-0f0as45n.js";
22
+ import"../../../shared/components-kpbcms10.js";
23
+ export {
24
+ accordion_default as default,
25
+ AccordionTrigger,
26
+ AccordionItem,
27
+ AccordionGroup,
28
+ AccordionContent,
29
+ Accordion
30
+ };