@justanarthur/modo-ui 0.3.0 → 0.4.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/README.md +2 -1
- package/dist/blocks/sidebar-app/index.js +3 -3
- package/dist/components/inputs/combobox/index.d.ts +7 -6
- package/dist/components/inputs/combobox/index.js +2 -2
- package/dist/components/inputs/date-time/date-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/date-picker/index.js +5 -5
- package/dist/components/inputs/date-time/date-range-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/date-range-picker/index.js +4 -4
- package/dist/components/inputs/date-time/duration-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/duration-picker/index.js +4 -4
- package/dist/components/inputs/date-time/month-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/month-picker/index.js +4 -4
- package/dist/components/inputs/date-time/time-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/time-picker/index.js +4 -4
- package/dist/components/inputs/input/index.d.ts +5 -1
- package/dist/components/inputs/input/index.js +2 -2
- package/dist/components/inputs/textarea/index.d.ts +46 -0
- package/dist/components/inputs/textarea/index.js +13 -0
- package/dist/components/navigation/sidebar/index.js +2 -2
- package/dist/index.d.ts +166 -111
- package/dist/index.js +15 -11
- package/dist/shared/{components-mhd39z7x.js → components-3myrw7ne.js} +36 -1
- package/dist/shared/{components-gvr9w41t.js → components-50m950y9.js} +19 -23
- package/dist/shared/{components-nb87fjy4.js → components-mqyvvh8k.js} +1 -1
- package/dist/shared/{components-3fbbvq5j.js → components-nsjec21k.js} +3 -1
- package/dist/shared/{components-re6rs21k.js → components-nyq0rym2.js} +3 -1
- package/dist/shared/{components-7btqt08d.js → components-qtqxgfrb.js} +17 -20
- package/dist/shared/components-rd9tbsqv.js +89 -0
- package/dist/shared/{components-8ey44d79.js → components-tcee5k0s.js} +22 -24
- package/dist/shared/{components-bshdmf75.js → components-wshd8f3n.js} +3 -1
- package/dist/shared/{components-2nhgyh31.js → components-wtbesgdp.js} +3 -1
- package/dist/shared/{components-2n3whx7z.js → components-ye0ze0h8.js} +1 -1
- package/dist/shared/{components-k809mbn0.js → components-zwhtxm15.js} +3 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -169,7 +169,7 @@ positioning) are ported.
|
|
|
169
169
|
| — (new) | `lib/use-controllable-state.ts` | Local addition: controlled + uncontrolled state, Base UI style |
|
|
170
170
|
| — (new) | `lib/use-morph.ts` | Local addition: the morph engine (source rect → popup box on a spring tier, exit hold for Base UI's unmount), geometry after beUI's popover; goo runs on its own `spring.goo` with a blur of at least 8px that eases to nothing as the surface lands, so the neck pinches off; a close-only `exit` override, an `instant` predicate that ends a run at once, press points from clicks, context menus and long presses (a droplet source for `from="pointer"`), cleanup when the popup unmounts mid-run; focus goes back to the trigger when a closed popup that held it is gone and Base UI skipped the return (the exit hold makes a menu read the pointer leaving the inert popup as a hover close) |
|
|
171
171
|
| — (new) | `lib/reduced-motion.ts` | Local addition: `useReduceMotion`, the one reduced-motion read for the morph layer and the liquid indicators — the OS setting, or a `MotionConfig` asking for it (motion's `useReducedMotionConfig` alone ignores the OS without `<MotionConfig reducedMotion="user">`) |
|
|
172
|
-
| — (new) | `lib/field-classes.ts` | Local addition: the field ladder FF repeats per text field (rest → muted fill on hover or a group's `data-active` → card fill on focus; `data-invalid` keeps a destructive ring), as `fieldVariants` + `fieldIconClasses`, shared by Input, Combobox and Sidebar's input |
|
|
172
|
+
| — (new) | `lib/field-classes.ts` | Local addition: the field ladder FF repeats per text field (rest → muted fill on hover or a group's `data-active` → card fill on focus; `data-invalid` keeps a destructive ring), as `fieldVariants` + `fieldIconClasses`, shared by Input, Textarea, Combobox and Sidebar's input; `useFieldBox` (variant, state attributes, radius, inset) + `focusControlOnPress`, the box Input, Textarea, Combobox's fields and the date/time pickers' field build on, so each takes `variant` |
|
|
173
173
|
| — (new) | `lib/date-locale.ts` | Local addition: what the date and time pickers read off a react-day-picker (date-fns) locale — the hour cycle (Intl), typed dates, times and months in the locale's formats (date-fns `parse` with `P`…`PPPP`), field names for column labels (`Intl.DisplayNames`) |
|
|
174
174
|
| — (new) | `lib/scroll-column.tsx` | Local addition: `ScrollColumn`, the scrolling option list beside a calendar (months, years, hours, minutes) or a strip above it: the pick gets a dot, a run of `inView` options one band, the followed option stays centred; fluid hover, listbox semantics, arrow keys; `dividedColumns` puts a hairline between neighbours |
|
|
175
175
|
| — (new) | `lib/slot.ts` | Local addition: Dialog's `render` / `asChild` slot shape (`SlotProps`, `slotRender`), shared by every overlay part that wraps a control |
|
|
@@ -255,6 +255,7 @@ only what is specific to it:
|
|
|
255
255
|
| `Table` | `registry/default/table.tsx` | `components/table/index.tsx` | statics `.Header/.Body/.Row/.Head/.Cell`; `TableProps` / `TableRowProps` exported |
|
|
256
256
|
| `Tabs` | `registry/base/tabs.tsx` | `components/navigation/tabs/index.tsx` | `defaultSelectedIndex` added as the index-mode twin of the existing `defaultValue`; indicator and hover pill are `GooIndicator`s (the hover pill returns to the active tab as it fades); statics `.List/.Item/.Panel` |
|
|
257
257
|
| `TabsSubtle` | `registry/base/tabs-subtle.tsx` | `components/navigation/tabs-subtle/index.tsx` | uncontrolled mode; panels may be authored inside the root (below); the tab list's ref write goes through `MutableRefObject`; selected and hover pills are `GooIndicator`s; statics `.Item/.Panel` |
|
|
258
|
+
| `Textarea` | — (local; Input's multi-line twin) | `components/inputs/textarea/index.tsx` | Base UI `Field.Control` rendered as a `<textarea>`; the field ladder from `lib/field-classes.ts`; padding sized so one row matches the control height; grows from `minRows` to `maxRows` (InputMessage's measure), then scrolls; `value` / `defaultValue` / `onChange` |
|
|
258
259
|
| `ThinkingIndicator` | `registry/default/thinking-indicator.tsx` | `components/AI/thinking-indicator/index.tsx` | upstream prop JSDoc kept (it already matches the FF API table); the `.shimmer-text` rule it rides lives in `base.css`; local `variant="goo"` (three dots merging and splitting through `GooFilter`, plain label; default stays `shimmer`); reduced motion also follows MotionConfig |
|
|
259
260
|
| `Toast` | — (local; after Sileo, see [Morph sources](#morph-sources)) | `components/overlays/toast/index.tsx` | Base UI Toast (queue, timers, swipe, announcements) with Sileo's pill melting into a body through the shared `GooFilter`; autopilot expand/collapse, six states on the `--status-*` tokens, promise toasts; `Toast` is the provider + viewport, `Toast.Trigger` shows one, `useToast()` the imperative API |
|
|
260
261
|
| `Tooltip` | `registry/base/tooltip.tsx` | `components/overlays/tooltip/index.tsx` | `className`/`children` docs filled in; statics `.Provider` / `.PortalContainer`; the slide + fade replaced by the morph layer (goo from the trigger on `spring.goo`, `from` / `effect` / `tier` props; `followCursor` tooltips fade); a hand-off between grouped tooltips skips the morph (Base UI's `data-instant`) |
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SidebarApp2
|
|
3
|
-
} from "../../shared/components-
|
|
4
|
-
import"../../shared/components-
|
|
3
|
+
} from "../../shared/components-ye0ze0h8.js";
|
|
4
|
+
import"../../shared/components-mqyvvh8k.js";
|
|
5
5
|
import"../../shared/components-c6s6b43g.js";
|
|
6
|
-
import"../../shared/components-
|
|
6
|
+
import"../../shared/components-3myrw7ne.js";
|
|
7
7
|
import"../../shared/components-rr7a6ja9.js";
|
|
8
8
|
import"../../shared/components-ng72k97e.js";
|
|
9
9
|
import"../../shared/components-zfnmn5d4.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HTMLAttributes, InputHTMLAttributes, ReactNode as ReactNode2, RefObject as RefObject2 } from "react";
|
|
2
|
+
type SizeVariant = "default" | "compact";
|
|
3
3
|
import { ClassProp as ClassProp_wz9o0r } from "class-variance-authority/types";
|
|
4
4
|
/**
|
|
5
5
|
* The ringed box of a text field. It steps from rest to a muted fill when lit
|
|
@@ -12,6 +12,8 @@ import { ClassProp as ClassProp_wz9o0r } from "class-variance-authority/types";
|
|
|
12
12
|
declare const fieldVariants: (props?: ({
|
|
13
13
|
variant?: "borderless" | "bordered" | null | undefined;
|
|
14
14
|
} & ClassProp_wz9o0r) | undefined) => string;
|
|
15
|
+
/** Framed at rest (`bordered`), or invisible until hovered or focused (`borderless`). */
|
|
16
|
+
type FieldVariant = "bordered" | "borderless";
|
|
15
17
|
import { ComponentType } from "react";
|
|
16
18
|
interface IconComponentProps {
|
|
17
19
|
size?: number | string;
|
|
@@ -19,7 +21,6 @@ interface IconComponentProps {
|
|
|
19
21
|
className?: string;
|
|
20
22
|
}
|
|
21
23
|
type IconComponent = ComponentType<IconComponentProps>;
|
|
22
|
-
type SizeVariant = "default" | "compact";
|
|
23
24
|
import { JSX as JSX_1kxb2 } from "react";
|
|
24
25
|
import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
|
|
25
26
|
import { RefAttributes as RefAttributes_miuf56 } from "react";
|
|
@@ -91,9 +92,9 @@ type Element_12xgc2 = JSX_1kxb2["Element"];
|
|
|
91
92
|
* @example {@include ./examples.mdx}
|
|
92
93
|
*/
|
|
93
94
|
declare function Combobox({ children, items, multiple, value, defaultValue, onValueChange, filter, onCreate, createLabel, creatable, hideSelected, disabled, name, required, size }: ComboboxProps): Element_12xgc2;
|
|
94
|
-
interface ComboboxFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange"
|
|
95
|
+
interface ComboboxFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange"> {
|
|
95
96
|
/** Framed at rest, or invisible until hovered or focused. Defaults to `"bordered"`. */
|
|
96
|
-
variant?:
|
|
97
|
+
variant?: FieldVariant;
|
|
97
98
|
/** Leading icon inside the field. */
|
|
98
99
|
icon?: IconComponent;
|
|
99
100
|
/** Shown while nothing is typed or selected. Defaults to `"Search…"`. */
|
|
@@ -123,7 +124,7 @@ interface ComboboxContentProps {
|
|
|
123
124
|
/** Gap to the field, in px. Ignored when the list opens in place over the field (`effect="morph"` with `hideSource`). Defaults to `6`. */
|
|
124
125
|
sideOffset?: number;
|
|
125
126
|
/** Where the list grows from (see Morph): the field, the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'` (the field). */
|
|
126
|
-
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" |
|
|
127
|
+
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
|
|
127
128
|
/** How it grows (see Morph): with the liquid goo neck, a plain morph, a slide or a fade. Defaults to `'goo'`. */
|
|
128
129
|
effect?: "goo" | "morph" | "slide" | "fade";
|
|
129
130
|
/** Hide the field while open, so it reads as turning into the list. Defaults to `false`. */
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
ComboboxItem2,
|
|
8
8
|
ComboboxEmpty2,
|
|
9
9
|
combobox_default
|
|
10
|
-
} from "../../../shared/components-
|
|
10
|
+
} from "../../../shared/components-tcee5k0s.js";
|
|
11
11
|
import {
|
|
12
12
|
fieldVariants
|
|
13
|
-
} from "../../../shared/components-
|
|
13
|
+
} from "../../../shared/components-3myrw7ne.js";
|
|
14
14
|
import"../../../shared/components-5xc2j8jz.js";
|
|
15
15
|
import"../../../shared/components-zrkzcayz.js";
|
|
16
16
|
import"../../../shared/components-0q0sqfh4.js";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Locale as Locale2 } from "date-fns";
|
|
2
|
-
import { RefObject } from "react";
|
|
2
|
+
import { RefObject as RefObject2 } from "react";
|
|
3
3
|
import { Matcher } from "react-day-picker";
|
|
4
4
|
type HourCycle = "h11" | "h12" | "h23" | "h24";
|
|
5
5
|
type SizeVariant = "default" | "compact";
|
|
6
|
+
/** Framed at rest (`bordered`), or invisible until hovered or focused (`borderless`). */
|
|
7
|
+
type FieldVariant = "bordered" | "borderless";
|
|
6
8
|
import { JSX as JSX_1kxb } from "react";
|
|
7
9
|
interface DatePickerProps {
|
|
8
10
|
/** The picked date (and time, with `withTime`); `null` when empty. */
|
|
@@ -27,6 +29,8 @@ interface DatePickerProps {
|
|
|
27
29
|
startMonth?: Date;
|
|
28
30
|
/** The last month the calendar reaches. Defaults to 50 years ahead. */
|
|
29
31
|
endMonth?: Date;
|
|
32
|
+
/** Framed at rest, or invisible until hovered or focused. Defaults to `"bordered"`. */
|
|
33
|
+
variant?: FieldVariant;
|
|
30
34
|
/** Marks the field invalid. Defaults to `false`. */
|
|
31
35
|
invalid?: boolean;
|
|
32
36
|
/** Pins the field and its panel to one step of the size ladder. Defaults to the surrounding SizeProvider. */
|
|
@@ -46,7 +50,7 @@ interface DatePickerProps {
|
|
|
46
50
|
/** Id of the field, for a `Label`'s `htmlFor`. */
|
|
47
51
|
id?: string;
|
|
48
52
|
/** Where the panel grows from (see Morph): the field, the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'` (the field). */
|
|
49
|
-
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" |
|
|
53
|
+
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
|
|
50
54
|
/** How the panel grows (see Morph), as Combobox's list does: with the liquid goo neck, a plain morph, a slide or a fade. `'morph'` with `hideSource` opens it in place over the field. Defaults to `'goo'`. */
|
|
51
55
|
effect?: "goo" | "morph" | "slide" | "fade";
|
|
52
56
|
/** Hide the field while open, so it reads as turning into the panel. Defaults to `false`. */
|
|
@@ -78,5 +82,5 @@ type Element_12xgc = JSX_1kxb["Element"];
|
|
|
78
82
|
*
|
|
79
83
|
* @example {@include ./examples.mdx}
|
|
80
84
|
*/
|
|
81
|
-
declare function DatePicker({ value: valueProp, defaultValue, onValueChange, withTime, hourCycle, minuteStep, locale, placeholder, disabled, startMonth, endMonth, invalid, size, open: openProp, defaultOpen, onOpenChange, dir, columnsSide, timeColumnsSide, id, from, effect, hideSource, tier, className }: DatePickerProps): Element_12xgc;
|
|
85
|
+
declare function DatePicker({ value: valueProp, defaultValue, onValueChange, withTime, hourCycle, minuteStep, locale, placeholder, disabled, startMonth, endMonth, variant, invalid, size, open: openProp, defaultOpen, onOpenChange, dir, columnsSide, timeColumnsSide, id, from, effect, hideSource, tier, className }: DatePickerProps): Element_12xgc;
|
|
82
86
|
export { DatePicker, DatePickerProps, DatePicker as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DatePicker2,
|
|
3
3
|
date_picker_default
|
|
4
|
-
} from "../../../../shared/components-
|
|
5
|
-
import"../../../../shared/components-1z6tdadk.js";
|
|
4
|
+
} from "../../../../shared/components-wtbesgdp.js";
|
|
6
5
|
import"../../../../shared/components-mjthm1kf.js";
|
|
7
|
-
import"../../../../shared/components-
|
|
8
|
-
import"../../../../shared/components-
|
|
6
|
+
import"../../../../shared/components-1z6tdadk.js";
|
|
7
|
+
import"../../../../shared/components-qtqxgfrb.js";
|
|
8
|
+
import"../../../../shared/components-50m950y9.js";
|
|
9
9
|
import"../../../../shared/components-gz8zf3ec.js";
|
|
10
10
|
import"../../../../shared/components-c6s6b43g.js";
|
|
11
|
-
import"../../../../shared/components-
|
|
11
|
+
import"../../../../shared/components-3myrw7ne.js";
|
|
12
12
|
import"../../../../shared/components-rr7a6ja9.js";
|
|
13
13
|
import"../../../../shared/components-zfnmn5d4.js";
|
|
14
14
|
import"../../../../shared/components-3ky44908.js";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
|
-
import { RefObject } from "react";
|
|
2
|
+
import { RefObject as RefObject2 } from "react";
|
|
3
3
|
import { DateRange, Matcher } from "react-day-picker";
|
|
4
4
|
type SizeVariant = "default" | "compact";
|
|
5
|
+
/** Framed at rest (`bordered`), or invisible until hovered or focused (`borderless`). */
|
|
6
|
+
type FieldVariant = "bordered" | "borderless";
|
|
5
7
|
import { JSX as JSX_1kxb } from "react";
|
|
6
8
|
interface DateRangePickerProps {
|
|
7
9
|
/** The picked range, react-day-picker's `{ from, to }`; `null` when empty. */
|
|
@@ -20,6 +22,8 @@ interface DateRangePickerProps {
|
|
|
20
22
|
startMonth?: Date;
|
|
21
23
|
/** The last month the calendar reaches. Defaults to 50 years ahead. */
|
|
22
24
|
endMonth?: Date;
|
|
25
|
+
/** Framed at rest, or invisible until hovered or focused. Defaults to `"bordered"`. */
|
|
26
|
+
variant?: FieldVariant;
|
|
23
27
|
/** Marks the field invalid. Defaults to `false`. */
|
|
24
28
|
invalid?: boolean;
|
|
25
29
|
/** Pins the field and its panel to one step of the size ladder. Defaults to the surrounding SizeProvider. */
|
|
@@ -37,7 +41,7 @@ interface DateRangePickerProps {
|
|
|
37
41
|
/** Id of the field, for a `Label`'s `htmlFor`. */
|
|
38
42
|
id?: string;
|
|
39
43
|
/** Where the panel grows from (see Morph): the field, the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'` (the field). */
|
|
40
|
-
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" |
|
|
44
|
+
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
|
|
41
45
|
/** How the panel grows (see Morph), as Combobox's list does: with the liquid goo neck, a plain morph, a slide or a fade. `'morph'` with `hideSource` opens it in place over the field. Defaults to `'goo'`. */
|
|
42
46
|
effect?: "goo" | "morph" | "slide" | "fade";
|
|
43
47
|
/** Hide the field while open, so it reads as turning into the panel. Defaults to `false`. */
|
|
@@ -60,5 +64,5 @@ type Element_12xgc = JSX_1kxb["Element"];
|
|
|
60
64
|
*
|
|
61
65
|
* @example {@include ./examples.mdx}
|
|
62
66
|
*/
|
|
63
|
-
declare function DateRangePicker({ value: valueProp, defaultValue, onValueChange, locale, placeholder, disabled, startMonth, endMonth, invalid, size, open: openProp, defaultOpen, onOpenChange, dir, columnsSide, id, from: growFrom, effect, hideSource, tier, className }: DateRangePickerProps): Element_12xgc;
|
|
67
|
+
declare function DateRangePicker({ value: valueProp, defaultValue, onValueChange, locale, placeholder, disabled, startMonth, endMonth, variant, invalid, size, open: openProp, defaultOpen, onOpenChange, dir, columnsSide, id, from: growFrom, effect, hideSource, tier, className }: DateRangePickerProps): Element_12xgc;
|
|
64
68
|
export { DateRangePicker, DateRangePickerProps, DateRangePicker as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DateRangePicker2,
|
|
3
3
|
date_range_picker_default
|
|
4
|
-
} from "../../../../shared/components-
|
|
4
|
+
} from "../../../../shared/components-zwhtxm15.js";
|
|
5
5
|
import"../../../../shared/components-1z6tdadk.js";
|
|
6
|
-
import"../../../../shared/components-
|
|
7
|
-
import"../../../../shared/components-
|
|
6
|
+
import"../../../../shared/components-qtqxgfrb.js";
|
|
7
|
+
import"../../../../shared/components-50m950y9.js";
|
|
8
8
|
import"../../../../shared/components-gz8zf3ec.js";
|
|
9
9
|
import"../../../../shared/components-c6s6b43g.js";
|
|
10
|
-
import"../../../../shared/components-
|
|
10
|
+
import"../../../../shared/components-3myrw7ne.js";
|
|
11
11
|
import"../../../../shared/components-rr7a6ja9.js";
|
|
12
12
|
import"../../../../shared/components-zfnmn5d4.js";
|
|
13
13
|
import"../../../../shared/components-3ky44908.js";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Duration, Locale } from "date-fns";
|
|
2
|
-
import { RefObject } from "react";
|
|
2
|
+
import { RefObject as RefObject2 } from "react";
|
|
3
3
|
type SizeVariant = "default" | "compact";
|
|
4
|
+
/** Framed at rest (`bordered`), or invisible until hovered or focused (`borderless`). */
|
|
5
|
+
type FieldVariant = "bordered" | "borderless";
|
|
4
6
|
import { JSX as JSX_1kxb } from "react";
|
|
5
7
|
interface DurationPickerProps {
|
|
6
8
|
/** The picked duration, a date-fns `Duration` (`{ hours, minutes }`); `null` when empty. */
|
|
@@ -19,6 +21,8 @@ interface DurationPickerProps {
|
|
|
19
21
|
placeholder?: string;
|
|
20
22
|
/** Disables the field. Defaults to `false`. */
|
|
21
23
|
disabled?: boolean;
|
|
24
|
+
/** Framed at rest, or invisible until hovered or focused. Defaults to `"bordered"`. */
|
|
25
|
+
variant?: FieldVariant;
|
|
22
26
|
/** Marks the field invalid. Defaults to `false`. */
|
|
23
27
|
invalid?: boolean;
|
|
24
28
|
/** Pins the field and its panel to one step of the size ladder. Defaults to the surrounding SizeProvider. */
|
|
@@ -32,7 +36,7 @@ interface DurationPickerProps {
|
|
|
32
36
|
/** Id of the field, for a `Label`'s `htmlFor`. */
|
|
33
37
|
id?: string;
|
|
34
38
|
/** Where the panel grows from (see Morph): the field, the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'` (the field). */
|
|
35
|
-
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" |
|
|
39
|
+
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
|
|
36
40
|
/** How the panel grows (see Morph), as Combobox's list does: with the liquid goo neck, a plain morph, a slide or a fade. `'morph'` with `hideSource` opens it in place over the field. Defaults to `'goo'`. */
|
|
37
41
|
effect?: "goo" | "morph" | "slide" | "fade";
|
|
38
42
|
/** Hide the field while open, so it reads as turning into the panel. Defaults to `false`. */
|
|
@@ -53,5 +57,5 @@ type Element_12xgc = JSX_1kxb["Element"];
|
|
|
53
57
|
*
|
|
54
58
|
* @example {@include ./examples.mdx}
|
|
55
59
|
*/
|
|
56
|
-
declare function DurationPicker({ value: valueProp, defaultValue, onValueChange, maxHours, minuteStep, locale, placeholder, disabled, invalid, size, open: openProp, defaultOpen, onOpenChange, id, from, effect, hideSource, tier, className }: DurationPickerProps): Element_12xgc;
|
|
60
|
+
declare function DurationPicker({ value: valueProp, defaultValue, onValueChange, maxHours, minuteStep, locale, placeholder, disabled, variant, invalid, size, open: openProp, defaultOpen, onOpenChange, id, from, effect, hideSource, tier, className }: DurationPickerProps): Element_12xgc;
|
|
57
61
|
export { DurationPicker, DurationPickerProps, DurationPicker as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DurationPicker2,
|
|
3
3
|
duration_picker_default
|
|
4
|
-
} from "../../../../shared/components-
|
|
4
|
+
} from "../../../../shared/components-nyq0rym2.js";
|
|
5
5
|
import"../../../../shared/components-mjthm1kf.js";
|
|
6
|
-
import"../../../../shared/components-
|
|
7
|
-
import"../../../../shared/components-
|
|
6
|
+
import"../../../../shared/components-qtqxgfrb.js";
|
|
7
|
+
import"../../../../shared/components-50m950y9.js";
|
|
8
8
|
import"../../../../shared/components-gz8zf3ec.js";
|
|
9
9
|
import"../../../../shared/components-c6s6b43g.js";
|
|
10
|
-
import"../../../../shared/components-
|
|
10
|
+
import"../../../../shared/components-3myrw7ne.js";
|
|
11
11
|
import"../../../../shared/components-rr7a6ja9.js";
|
|
12
12
|
import"../../../../shared/components-zfnmn5d4.js";
|
|
13
13
|
import"../../../../shared/components-3ky44908.js";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
|
-
import { RefObject } from "react";
|
|
2
|
+
import { RefObject as RefObject2 } from "react";
|
|
3
3
|
type SizeVariant = "default" | "compact";
|
|
4
|
+
/** Framed at rest (`bordered`), or invisible until hovered or focused (`borderless`). */
|
|
5
|
+
type FieldVariant = "bordered" | "borderless";
|
|
4
6
|
import { JSX as JSX_1kxb } from "react";
|
|
5
7
|
interface MonthPickerProps {
|
|
6
8
|
/** The picked month as its first day; `null` when empty. */
|
|
@@ -19,6 +21,8 @@ interface MonthPickerProps {
|
|
|
19
21
|
endMonth?: Date;
|
|
20
22
|
/** Disables the field. Defaults to `false`. */
|
|
21
23
|
disabled?: boolean;
|
|
24
|
+
/** Framed at rest, or invisible until hovered or focused. Defaults to `"bordered"`. */
|
|
25
|
+
variant?: FieldVariant;
|
|
22
26
|
/** Marks the field invalid. Defaults to `false`. */
|
|
23
27
|
invalid?: boolean;
|
|
24
28
|
/** Pins the field and its panel to one step of the size ladder. Defaults to the surrounding SizeProvider. */
|
|
@@ -32,7 +36,7 @@ interface MonthPickerProps {
|
|
|
32
36
|
/** Id of the field, for a `Label`'s `htmlFor`. */
|
|
33
37
|
id?: string;
|
|
34
38
|
/** Where the panel grows from (see Morph): the field, the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'` (the field). */
|
|
35
|
-
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" |
|
|
39
|
+
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
|
|
36
40
|
/** How the panel grows (see Morph), as Combobox's list does: with the liquid goo neck, a plain morph, a slide or a fade. `'morph'` with `hideSource` opens it in place over the field. Defaults to `'goo'`. */
|
|
37
41
|
effect?: "goo" | "morph" | "slide" | "fade";
|
|
38
42
|
/** Hide the field while open, so it reads as turning into the panel. Defaults to `false`. */
|
|
@@ -53,5 +57,5 @@ type Element_12xgc = JSX_1kxb["Element"];
|
|
|
53
57
|
*
|
|
54
58
|
* @example {@include ./examples.mdx}
|
|
55
59
|
*/
|
|
56
|
-
declare function MonthPicker({ value: valueProp, defaultValue, onValueChange, locale, placeholder, startMonth, endMonth, disabled, invalid, size, open: openProp, defaultOpen, onOpenChange, id, from, effect, hideSource, tier, className }: MonthPickerProps): Element_12xgc;
|
|
60
|
+
declare function MonthPicker({ value: valueProp, defaultValue, onValueChange, locale, placeholder, startMonth, endMonth, disabled, variant, invalid, size, open: openProp, defaultOpen, onOpenChange, id, from, effect, hideSource, tier, className }: MonthPickerProps): Element_12xgc;
|
|
57
61
|
export { MonthPicker, MonthPickerProps, MonthPicker as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MonthPicker2,
|
|
3
3
|
month_picker_default
|
|
4
|
-
} from "../../../../shared/components-
|
|
5
|
-
import"../../../../shared/components-
|
|
6
|
-
import"../../../../shared/components-
|
|
4
|
+
} from "../../../../shared/components-nsjec21k.js";
|
|
5
|
+
import"../../../../shared/components-qtqxgfrb.js";
|
|
6
|
+
import"../../../../shared/components-50m950y9.js";
|
|
7
7
|
import"../../../../shared/components-gz8zf3ec.js";
|
|
8
8
|
import"../../../../shared/components-c6s6b43g.js";
|
|
9
|
-
import"../../../../shared/components-
|
|
9
|
+
import"../../../../shared/components-3myrw7ne.js";
|
|
10
10
|
import"../../../../shared/components-rr7a6ja9.js";
|
|
11
11
|
import"../../../../shared/components-zfnmn5d4.js";
|
|
12
12
|
import"../../../../shared/components-3ky44908.js";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Locale as Locale2 } from "date-fns";
|
|
2
|
-
import { RefObject } from "react";
|
|
2
|
+
import { RefObject as RefObject2 } from "react";
|
|
3
3
|
type HourCycle = "h11" | "h12" | "h23" | "h24";
|
|
4
4
|
type SizeVariant = "default" | "compact";
|
|
5
|
+
/** Framed at rest (`bordered`), or invisible until hovered or focused (`borderless`). */
|
|
6
|
+
type FieldVariant = "bordered" | "borderless";
|
|
5
7
|
import { JSX as JSX_1kxb } from "react";
|
|
6
8
|
interface TimePickerProps {
|
|
7
9
|
/** The picked time as `"HH:mm"` on a 24-hour clock (an `<input type="time">`'s value); `null` when empty. */
|
|
@@ -20,6 +22,8 @@ interface TimePickerProps {
|
|
|
20
22
|
placeholder?: string;
|
|
21
23
|
/** Disables the field. Defaults to `false`. */
|
|
22
24
|
disabled?: boolean;
|
|
25
|
+
/** Framed at rest, or invisible until hovered or focused. Defaults to `"bordered"`. */
|
|
26
|
+
variant?: FieldVariant;
|
|
23
27
|
/** Marks the field invalid. Defaults to `false`. */
|
|
24
28
|
invalid?: boolean;
|
|
25
29
|
/** Pins the field and its panel to one step of the size ladder. Defaults to the surrounding SizeProvider. */
|
|
@@ -33,7 +37,7 @@ interface TimePickerProps {
|
|
|
33
37
|
/** Id of the field, for a `Label`'s `htmlFor`. */
|
|
34
38
|
id?: string;
|
|
35
39
|
/** Where the panel grows from (see Morph): the field, the press point, its own center, a viewport edge, or a ref to any element. Defaults to `'trigger'` (the field). */
|
|
36
|
-
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" |
|
|
40
|
+
from?: "trigger" | "pointer" | "center" | "top" | "right" | "bottom" | "left" | RefObject2<HTMLElement | null>;
|
|
37
41
|
/** How the panel grows (see Morph), as Combobox's list does: with the liquid goo neck, a plain morph, a slide or a fade. `'morph'` with `hideSource` opens it in place over the field. Defaults to `'goo'`. */
|
|
38
42
|
effect?: "goo" | "morph" | "slide" | "fade";
|
|
39
43
|
/** Hide the field while open, so it reads as turning into the panel. Defaults to `false`. */
|
|
@@ -55,5 +59,5 @@ type Element_12xgc = JSX_1kxb["Element"];
|
|
|
55
59
|
*
|
|
56
60
|
* @example {@include ./examples.mdx}
|
|
57
61
|
*/
|
|
58
|
-
declare function TimePicker({ value: valueProp, defaultValue, onValueChange, hourCycle, minuteStep, locale, placeholder, disabled, invalid, size, open: openProp, defaultOpen, onOpenChange, id, from, effect, hideSource, tier, className }: TimePickerProps): Element_12xgc;
|
|
62
|
+
declare function TimePicker({ value: valueProp, defaultValue, onValueChange, hourCycle, minuteStep, locale, placeholder, disabled, variant, invalid, size, open: openProp, defaultOpen, onOpenChange, id, from, effect, hideSource, tier, className }: TimePickerProps): Element_12xgc;
|
|
59
63
|
export { TimePicker, TimePickerProps, TimePicker as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TimePicker2,
|
|
3
3
|
time_picker_default
|
|
4
|
-
} from "../../../../shared/components-
|
|
4
|
+
} from "../../../../shared/components-wshd8f3n.js";
|
|
5
5
|
import"../../../../shared/components-mjthm1kf.js";
|
|
6
|
-
import"../../../../shared/components-
|
|
7
|
-
import"../../../../shared/components-
|
|
6
|
+
import"../../../../shared/components-qtqxgfrb.js";
|
|
7
|
+
import"../../../../shared/components-50m950y9.js";
|
|
8
8
|
import"../../../../shared/components-gz8zf3ec.js";
|
|
9
9
|
import"../../../../shared/components-c6s6b43g.js";
|
|
10
|
-
import"../../../../shared/components-
|
|
10
|
+
import"../../../../shared/components-3myrw7ne.js";
|
|
11
11
|
import"../../../../shared/components-rr7a6ja9.js";
|
|
12
12
|
import"../../../../shared/components-zfnmn5d4.js";
|
|
13
13
|
import"../../../../shared/components-3ky44908.js";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, ReactNode as ReactNode2, RefAttributes } from "react";
|
|
2
|
+
type SizeVariant = "default" | "compact";
|
|
3
|
+
/** Framed at rest (`bordered`), or invisible until hovered or focused (`borderless`). */
|
|
4
|
+
type FieldVariant = "bordered" | "borderless";
|
|
2
5
|
import { ComponentType } from "react";
|
|
3
6
|
interface IconComponentProps {
|
|
4
7
|
size?: number | string;
|
|
@@ -6,7 +9,6 @@ interface IconComponentProps {
|
|
|
6
9
|
className?: string;
|
|
7
10
|
}
|
|
8
11
|
type IconComponent = ComponentType<IconComponentProps>;
|
|
9
|
-
type SizeVariant = "default" | "compact";
|
|
10
12
|
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "defaultValue" | "size"> {
|
|
11
13
|
/** Placeholder text. */
|
|
12
14
|
placeholder?: string;
|
|
@@ -18,6 +20,8 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChan
|
|
|
18
20
|
defaultValue?: string;
|
|
19
21
|
/** Called when the input value changes. */
|
|
20
22
|
onChange?: (value: string) => void;
|
|
23
|
+
/** Framed at rest, or invisible until hovered or focused. Defaults to `"borderless"`. */
|
|
24
|
+
variant?: FieldVariant;
|
|
21
25
|
/** Marks the value invalid: the field turns destructive and sets `aria-invalid`. Defaults to `false`. */
|
|
22
26
|
invalid?: boolean;
|
|
23
27
|
/** Disables the input. Defaults to `false`. */
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
Label2,
|
|
4
4
|
InputGroup2,
|
|
5
5
|
input_default
|
|
6
|
-
} from "../../../shared/components-
|
|
7
|
-
import"../../../shared/components-
|
|
6
|
+
} from "../../../shared/components-50m950y9.js";
|
|
7
|
+
import"../../../shared/components-3myrw7ne.js";
|
|
8
8
|
import"../../../shared/components-59efxjd9.js";
|
|
9
9
|
import"../../../shared/components-jjw69c4c.js";
|
|
10
10
|
import"../../../shared/components-n7mjr357.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from "react";
|
|
2
|
+
type SizeVariant = "default" | "compact";
|
|
3
|
+
/** Framed at rest (`bordered`), or invisible until hovered or focused (`borderless`). */
|
|
4
|
+
type FieldVariant = "bordered" | "borderless";
|
|
5
|
+
import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
|
|
6
|
+
import { RefAttributes as RefAttributes_miuf56 } from "react";
|
|
7
|
+
interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "value" | "defaultValue" | "rows"> {
|
|
8
|
+
/** Placeholder text. */
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
/** Controlled value. Pair with `onChange`. */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** Initial value when uncontrolled. Defaults to `''`. */
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
/** Called with the new value on every change. */
|
|
15
|
+
onChange?: (value: string) => void;
|
|
16
|
+
/** Rows shown when empty; the box never gets shorter. Defaults to `3`. */
|
|
17
|
+
minRows?: number;
|
|
18
|
+
/** Rows the box grows to before it scrolls. Set it to `minRows` for a fixed height. Defaults to `8`. */
|
|
19
|
+
maxRows?: number;
|
|
20
|
+
/** Framed at rest, or invisible until hovered or focused. Defaults to `"borderless"`. */
|
|
21
|
+
variant?: FieldVariant;
|
|
22
|
+
/** Marks the value invalid: the field turns destructive and sets `aria-invalid`. Defaults to `false`. */
|
|
23
|
+
invalid?: boolean;
|
|
24
|
+
/** Disables the textarea. Defaults to `false`. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Pins the textarea to one step of the size ladder (36px default, 28px compact): its text and padding follow, so one row matches an Input. Defaults to the surrounding SizeProvider. */
|
|
27
|
+
size?: SizeVariant;
|
|
28
|
+
/** Classes for the ringed box around the textarea. */
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Multi-line text field that grows with what you type.
|
|
33
|
+
*
|
|
34
|
+
* It sits on the same ground as Input: bare text at rest (or framed, with
|
|
35
|
+
* `variant="bordered"`), a muted fill with a hairline ring on hover, the
|
|
36
|
+
* card ground on focus, a destructive ring when `invalid`. The box starts at `minRows`, grows line by line as text wraps,
|
|
37
|
+
* and scrolls once it reaches `maxRows`. One row lines up with an Input of
|
|
38
|
+
* the same size, so the two stack in a form without a seam. It is
|
|
39
|
+
* uncontrolled with `defaultValue`, or controlled with `value` + `onChange`,
|
|
40
|
+
* fills the width of its container, and joins a Base UI `Field` when placed
|
|
41
|
+
* inside one. Pair it with a `Label` (see Input) through `htmlFor` / `id`.
|
|
42
|
+
*
|
|
43
|
+
* @example {@include ./examples.mdx}
|
|
44
|
+
*/
|
|
45
|
+
declare const Textarea: ForwardRefExoticComponent_tcubfn<TextareaProps & RefAttributes_miuf56<HTMLTextAreaElement>>;
|
|
46
|
+
export { Textarea, TextareaProps, Textarea as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Textarea2,
|
|
3
|
+
textarea_default
|
|
4
|
+
} from "../../../shared/components-rd9tbsqv.js";
|
|
5
|
+
import"../../../shared/components-3myrw7ne.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
|
+
Textarea2 as Textarea,
|
|
12
|
+
textarea_default as default
|
|
13
|
+
};
|
|
@@ -36,9 +36,9 @@ import {
|
|
|
36
36
|
Sidebar2,
|
|
37
37
|
SidebarContent2,
|
|
38
38
|
sidebar_default
|
|
39
|
-
} from "../../../shared/components-
|
|
39
|
+
} from "../../../shared/components-mqyvvh8k.js";
|
|
40
40
|
import"../../../shared/components-c6s6b43g.js";
|
|
41
|
-
import"../../../shared/components-
|
|
41
|
+
import"../../../shared/components-3myrw7ne.js";
|
|
42
42
|
import"../../../shared/components-rr7a6ja9.js";
|
|
43
43
|
import"../../../shared/components-ng72k97e.js";
|
|
44
44
|
import"../../../shared/components-zfnmn5d4.js";
|