@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.
- package/LICENSE +21 -0
- package/LICENSE.beui +21 -0
- package/LICENSE.fluid-functionalism +21 -0
- package/LICENSE.motion-primitives +21 -0
- package/LICENSE.sileo +21 -0
- package/README.md +608 -2
- package/dist/base.css +994 -0
- package/dist/blocks/sidebar-app/index.d.ts +34 -0
- package/dist/blocks/sidebar-app/index.js +31 -0
- package/dist/components/badge/index.d.ts +59 -0
- package/dist/components/badge/index.js +16 -0
- package/dist/components/button/index.d.ts +59 -0
- package/dist/components/button/index.js +14 -0
- package/dist/components/card/index.d.ts +141 -0
- package/dist/components/card/index.js +42 -0
- package/dist/components/inputs/checkbox-group/index.d.ts +50 -0
- package/dist/components/inputs/checkbox-group/index.js +21 -0
- package/dist/components/inputs/color-picker/index.d.ts +137 -0
- package/dist/components/inputs/color-picker/index.js +35 -0
- package/dist/components/inputs/combobox/index.d.ts +161 -0
- package/dist/components/inputs/combobox/index.js +38 -0
- package/dist/components/inputs/date-time/calendar/index.d.ts +45 -0
- package/dist/components/inputs/date-time/calendar/index.js +18 -0
- package/dist/components/inputs/date-time/date-picker/index.d.ts +82 -0
- package/dist/components/inputs/date-time/date-picker/index.js +32 -0
- package/dist/components/inputs/date-time/date-range-picker/index.d.ts +64 -0
- package/dist/components/inputs/date-time/date-range-picker/index.js +31 -0
- package/dist/components/inputs/date-time/duration-picker/index.d.ts +57 -0
- package/dist/components/inputs/date-time/duration-picker/index.js +31 -0
- package/dist/components/inputs/date-time/month-picker/index.d.ts +57 -0
- package/dist/components/inputs/date-time/month-picker/index.js +30 -0
- package/dist/components/inputs/date-time/time-picker/index.d.ts +59 -0
- package/dist/components/inputs/date-time/time-picker/index.js +31 -0
- package/dist/components/inputs/input/index.d.ts +84 -0
- package/dist/components/inputs/input/index.js +19 -0
- package/dist/components/inputs/input-copy/index.d.ts +44 -0
- package/dist/components/inputs/input-copy/index.js +16 -0
- package/dist/components/inputs/input-message/index.d.ts +125 -0
- package/dist/components/inputs/input-message/index.js +25 -0
- package/dist/components/inputs/radio-group/index.d.ts +58 -0
- package/dist/components/inputs/radio-group/index.js +20 -0
- package/dist/components/inputs/search/index.d.ts +83 -0
- package/dist/components/inputs/search/index.js +25 -0
- package/dist/components/inputs/select/index.d.ts +105 -0
- package/dist/components/inputs/select/index.js +34 -0
- package/dist/components/inputs/slider/index.d.ts +108 -0
- package/dist/components/inputs/slider/index.js +14 -0
- package/dist/components/inputs/switch/index.d.ts +43 -0
- package/dist/components/inputs/switch/index.js +14 -0
- package/dist/components/navigation/accordion/index.d.ts +117 -0
- package/dist/components/navigation/accordion/index.js +28 -0
- package/dist/components/navigation/sidebar/index.d.ts +388 -0
- package/dist/components/navigation/sidebar/index.js +99 -0
- package/dist/components/navigation/tabs/index.d.ts +70 -0
- package/dist/components/navigation/tabs/index.js +23 -0
- package/dist/components/navigation/tabs-subtle/index.d.ts +73 -0
- package/dist/components/navigation/tabs-subtle/index.js +21 -0
- package/dist/components/overlays/alert-dialog/index.d.ts +67 -0
- package/dist/components/overlays/alert-dialog/index.js +22 -0
- package/dist/components/overlays/command/index.d.ts +121 -0
- package/dist/components/overlays/command/index.js +36 -0
- package/dist/components/overlays/context-menu/index.d.ts +97 -0
- package/dist/components/overlays/context-menu/index.js +29 -0
- package/dist/components/overlays/dialog/index.d.ts +130 -0
- package/dist/components/overlays/dialog/index.js +37 -0
- package/dist/components/overlays/dropdown/index.d.ts +222 -0
- package/dist/components/overlays/dropdown/index.js +44 -0
- package/dist/components/overlays/popover/index.d.ts +87 -0
- package/dist/components/overlays/popover/index.js +26 -0
- package/dist/components/overlays/preview-card/index.d.ts +75 -0
- package/dist/components/overlays/preview-card/index.js +19 -0
- package/dist/components/overlays/sheet/index.d.ts +67 -0
- package/dist/components/overlays/sheet/index.js +24 -0
- package/dist/components/overlays/toast/index.d.ts +107 -0
- package/dist/components/overlays/toast/index.js +21 -0
- package/dist/components/overlays/tooltip/index.d.ts +75 -0
- package/dist/components/overlays/tooltip/index.js +17 -0
- package/dist/components/table/index.d.ts +44 -0
- package/dist/components/table/index.js +26 -0
- package/dist/components/thinking-indicator/index.d.ts +32 -0
- package/dist/components/thinking-indicator/index.js +13 -0
- package/dist/index.d.ts +3926 -0
- package/dist/index.js +511 -0
- package/dist/preset.d.ts +104 -0
- package/dist/preset.js +124 -0
- package/dist/primitives/code/index.d.ts +23 -0
- package/dist/primitives/code/index.js +11 -0
- package/dist/primitives/craft/index.d.ts +31 -0
- package/dist/primitives/craft/index.js +11 -0
- package/dist/primitives/fluid-hover/index.d.ts +233 -0
- package/dist/primitives/fluid-hover/index.js +25 -0
- package/dist/primitives/morph/index.d.ts +127 -0
- package/dist/primitives/morph/index.js +19 -0
- package/dist/primitives/motion/index.d.ts +115 -0
- package/dist/primitives/motion/index.js +19 -0
- package/dist/primitives/scroll-area/index.d.ts +41 -0
- package/dist/primitives/scroll-area/index.js +12 -0
- package/dist/primitives/sizes/index.d.ts +128 -0
- package/dist/primitives/sizes/index.js +21 -0
- package/dist/primitives/surface/index.d.ts +69 -0
- package/dist/primitives/surface/index.js +17 -0
- package/dist/shared/components-0ke6xada.js +123 -0
- package/dist/shared/components-0q0sqfh4.js +146 -0
- package/dist/shared/components-0sn7ypjw.js +61 -0
- package/dist/shared/components-1j9791sn.js +345 -0
- package/dist/shared/components-1rfwbyyc.js +361 -0
- package/dist/shared/components-1v7rxytx.js +30 -0
- package/dist/shared/components-1xekx2hx.js +215 -0
- package/dist/shared/components-39jq9va1.js +86 -0
- package/dist/shared/components-3gae8nta.js +719 -0
- package/dist/shared/components-3k8xpnpq.js +1759 -0
- package/dist/shared/components-3ky44908.js +9 -0
- package/dist/shared/components-3mkepka5.js +111 -0
- package/dist/shared/components-3wk0w46f.js +667 -0
- package/dist/shared/components-4cnjmgex.js +124 -0
- package/dist/shared/components-59efxjd9.js +298 -0
- package/dist/shared/components-5xc2j8jz.js +159 -0
- package/dist/shared/components-62ybc7t2.js +496 -0
- package/dist/shared/components-66mv71kx.js +262 -0
- package/dist/shared/components-7ans7ce5.js +120 -0
- package/dist/shared/components-7btqt08d.js +270 -0
- package/dist/shared/components-7r3etddy.js +171 -0
- package/dist/shared/components-7x9kawxv.js +152 -0
- package/dist/shared/components-8fpr3s4p.js +292 -0
- package/dist/shared/components-9jvzzvt1.js +198 -0
- package/dist/shared/components-apdwtweq.js +484 -0
- package/dist/shared/components-asr5pg50.js +191 -0
- package/dist/shared/components-b2wyq2cq.js +232 -0
- package/dist/shared/components-c6s6b43g.js +15 -0
- package/dist/shared/components-ca2c898n.js +1828 -0
- package/dist/shared/components-cbxjn9p8.js +141 -0
- package/dist/shared/components-chacnk61.js +216 -0
- package/dist/shared/components-cv16mryv.js +62 -0
- package/dist/shared/components-ez65vtbq.js +110 -0
- package/dist/shared/components-ezxhrmer.js +17 -0
- package/dist/shared/components-gc5vtq2f.js +149 -0
- package/dist/shared/components-gf5s6ap9.js +42 -0
- package/dist/shared/components-gvr9w41t.js +193 -0
- package/dist/shared/components-h2dpcwgc.js +137 -0
- package/dist/shared/components-hawvy2qz.js +105 -0
- package/dist/shared/components-hqeq3w9q.js +375 -0
- package/dist/shared/components-jjw69c4c.js +28 -0
- package/dist/shared/components-jwst3vtj.js +346 -0
- package/dist/shared/components-kvr7f9hy.js +45 -0
- package/dist/shared/components-men63rwj.js +9 -0
- package/dist/shared/components-mhd39z7x.js +22 -0
- package/dist/shared/components-n7mjr357.js +26 -0
- package/dist/shared/components-ng72k97e.js +128 -0
- package/dist/shared/components-nh8tma1n.js +986 -0
- package/dist/shared/components-njzgqdwy.js +445 -0
- package/dist/shared/components-ny774h8p.js +293 -0
- package/dist/shared/components-q4daerx0.js +58 -0
- package/dist/shared/components-q5xj5c16.js +79 -0
- package/dist/shared/components-rr7a6ja9.js +160 -0
- package/dist/shared/components-s2bz1xpk.js +63 -0
- package/dist/shared/components-tqvarbfv.js +288 -0
- package/dist/shared/components-v6xp325t.js +304 -0
- package/dist/shared/components-v7wtz8hk.js +144 -0
- package/dist/shared/components-vc7vq5nz.js +32 -0
- package/dist/shared/components-vfbhxf5r.js +58 -0
- package/dist/shared/components-vynjtrk6.js +19 -0
- package/dist/shared/components-wvp1m52g.js +1200 -0
- package/dist/shared/components-yh3kwdhr.js +981 -0
- package/dist/shared/components-ytb2tefr.js +291 -0
- package/dist/shared/components-zfnmn5d4.js +220 -0
- package/dist/shared/components-zrkzcayz.js +141 -0
- package/dist/shared/components-zx6b6yby.js +42 -0
- package/dist/styles.css +1949 -0
- package/dist/tailwind.css +219 -0
- package/dist/tokens.css +345 -0
- package/package.json +103 -4
|
@@ -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 { Select, SelectContent, SelectContentProps, SelectGroup, SelectItem, SelectItemProps, SelectLabel, SelectProps, SelectSeparator, SelectTrigger, SelectTriggerProps, Select as default, triggerVariants };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Select2,
|
|
3
|
+
triggerVariants2,
|
|
4
|
+
SelectTrigger2,
|
|
5
|
+
SelectContent2,
|
|
6
|
+
SelectItem2,
|
|
7
|
+
SelectGroup2,
|
|
8
|
+
SelectLabel2,
|
|
9
|
+
SelectSeparator2,
|
|
10
|
+
select_default
|
|
11
|
+
} from "../../../shared/components-62ybc7t2.js";
|
|
12
|
+
import"../../../shared/components-0q0sqfh4.js";
|
|
13
|
+
import"../../../shared/components-kvr7f9hy.js";
|
|
14
|
+
import"../../../shared/components-59efxjd9.js";
|
|
15
|
+
import"../../../shared/components-chacnk61.js";
|
|
16
|
+
import"../../../shared/components-hqeq3w9q.js";
|
|
17
|
+
import"../../../shared/components-jjw69c4c.js";
|
|
18
|
+
import"../../../shared/components-men63rwj.js";
|
|
19
|
+
import"../../../shared/components-0sn7ypjw.js";
|
|
20
|
+
import"../../../shared/components-hawvy2qz.js";
|
|
21
|
+
import"../../../shared/components-cv16mryv.js";
|
|
22
|
+
import"../../../shared/components-zx6b6yby.js";
|
|
23
|
+
import"../../../shared/components-ezxhrmer.js";
|
|
24
|
+
export {
|
|
25
|
+
Select2 as Select,
|
|
26
|
+
SelectContent2 as SelectContent,
|
|
27
|
+
SelectGroup2 as SelectGroup,
|
|
28
|
+
SelectItem2 as SelectItem,
|
|
29
|
+
SelectLabel2 as SelectLabel,
|
|
30
|
+
SelectSeparator2 as SelectSeparator,
|
|
31
|
+
SelectTrigger2 as SelectTrigger,
|
|
32
|
+
select_default as default,
|
|
33
|
+
triggerVariants2 as triggerVariants
|
|
34
|
+
};
|
|
@@ -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, SliderComfortable, SliderComfortableProps, SliderProps, SliderValue, ValuePosition, Slider as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Slider2,
|
|
3
|
+
SliderComfortable2,
|
|
4
|
+
slider_default
|
|
5
|
+
} from "../../../shared/components-wvp1m52g.js";
|
|
6
|
+
import"../../../shared/components-n7mjr357.js";
|
|
7
|
+
import"../../../shared/components-0sn7ypjw.js";
|
|
8
|
+
import"../../../shared/components-cv16mryv.js";
|
|
9
|
+
import"../../../shared/components-ezxhrmer.js";
|
|
10
|
+
export {
|
|
11
|
+
Slider2 as Slider,
|
|
12
|
+
SliderComfortable2 as SliderComfortable,
|
|
13
|
+
slider_default as default
|
|
14
|
+
};
|
|
@@ -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, SwitchProps, Switch as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Switch2,
|
|
3
|
+
switch_default
|
|
4
|
+
} from "../../../shared/components-asr5pg50.js";
|
|
5
|
+
import"../../../shared/components-chacnk61.js";
|
|
6
|
+
import"../../../shared/components-hqeq3w9q.js";
|
|
7
|
+
import"../../../shared/components-n7mjr357.js";
|
|
8
|
+
import"../../../shared/components-men63rwj.js";
|
|
9
|
+
import"../../../shared/components-0sn7ypjw.js";
|
|
10
|
+
import"../../../shared/components-ezxhrmer.js";
|
|
11
|
+
export {
|
|
12
|
+
Switch2 as Switch,
|
|
13
|
+
switch_default as default
|
|
14
|
+
};
|
|
@@ -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, AccordionContent, AccordionGroup, AccordionItem, AccordionTrigger, Accordion as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AccordionGroup2,
|
|
3
|
+
Accordion2,
|
|
4
|
+
AccordionItem2,
|
|
5
|
+
AccordionTrigger2,
|
|
6
|
+
AccordionContent2,
|
|
7
|
+
accordion_default
|
|
8
|
+
} from "../../../shared/components-3wk0w46f.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-cv16mryv.js";
|
|
20
|
+
import"../../../shared/components-ezxhrmer.js";
|
|
21
|
+
export {
|
|
22
|
+
Accordion2 as Accordion,
|
|
23
|
+
AccordionContent2 as AccordionContent,
|
|
24
|
+
AccordionGroup2 as AccordionGroup,
|
|
25
|
+
AccordionItem2 as AccordionItem,
|
|
26
|
+
AccordionTrigger2 as AccordionTrigger,
|
|
27
|
+
accordion_default as default
|
|
28
|
+
};
|