@omer-x/tailwind-ui-kit 1.0.0-alpha.43 → 1.0.0-alpha.45
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 +115 -0
- package/dist/components/form/BaseSlider.d.ts +136 -0
- package/dist/components/form/BaseSlider.js +66 -0
- package/dist/components/form/BaseSliderControl.d.ts +12 -0
- package/dist/components/form/BaseSliderControl.js +14 -0
- package/dist/components/form/BaseSliderIndicator.d.ts +12 -0
- package/dist/components/form/BaseSliderIndicator.js +14 -0
- package/dist/components/form/BaseSliderLabel.d.ts +9 -0
- package/dist/components/form/BaseSliderLabel.js +7 -0
- package/dist/components/form/BaseSliderThumb.d.ts +30 -0
- package/dist/components/form/BaseSliderThumb.js +15 -0
- package/dist/components/form/BaseSliderTrack.d.ts +12 -0
- package/dist/components/form/BaseSliderTrack.js +12 -0
- package/dist/components/form/BaseSliderValue.d.ts +14 -0
- package/dist/components/form/BaseSliderValue.js +10 -0
- package/dist/components/form/index.d.ts +3 -1
- package/dist/components/form/index.js +2 -1
- package/dist/components/form/sliderStyles.d.ts +5 -0
- package/dist/components/form/sliderStyles.js +32 -0
- package/dist/components/layout/BaseSeparator.d.ts +16 -0
- package/dist/components/layout/BaseSeparator.js +18 -0
- package/dist/components/layout/index.d.ts +2 -1
- package/dist/components/layout/index.js +3 -1
- package/dist/components/menu/menuTypes.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -730,6 +730,98 @@ Every part takes `className` and a `render` prop. Render functions get the part'
|
|
|
730
730
|
</BaseFormField>
|
|
731
731
|
```
|
|
732
732
|
|
|
733
|
+
#### `BaseSlider`
|
|
734
|
+
|
|
735
|
+
A Base UI [`Slider`](https://base-ui.com/react/components/slider): pick a number, or a range of numbers, within known bounds by dragging a thumb, pressing the track or using the keyboard (arrows by `step`, Page Up / Page Down by `largeStep`, Home / End to the bounds). It renders a `<div>` with the label and the value on top and the control below (`flex flex-wrap`). An array value makes a range slider with one thumb per value.
|
|
736
|
+
|
|
737
|
+
```tsx
|
|
738
|
+
import { BaseSlider } from "@omer-x/tailwind-ui-kit/form";
|
|
739
|
+
|
|
740
|
+
<BaseSlider
|
|
741
|
+
label="Volume"
|
|
742
|
+
defaultValue={40}
|
|
743
|
+
showValue
|
|
744
|
+
trackClassName="bg-neutral-200"
|
|
745
|
+
indicatorClassName="bg-blue-600"
|
|
746
|
+
thumbClassName="border-2 border-blue-600 bg-white outline-blue-500"
|
|
747
|
+
/>
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
| Prop | Type | Default | Description |
|
|
751
|
+
|------|------|---------|-------------|
|
|
752
|
+
| `value` / `defaultValue` | `number \| number[]` | | The value, controlled / uncontrolled. An array makes a range |
|
|
753
|
+
| `onValueChange` | `(value, event) => void` | | Called on every move with the new value and the DOM event |
|
|
754
|
+
| `onValueCommitted` | `(value, event) => void` | | Called with the final value when a drag ends or a key press is done |
|
|
755
|
+
| `min` / `max` | `number` | `0` / `100` | The bounds |
|
|
756
|
+
| `step` | `number` | `1` | Values snap to multiples of it, counted from `min` |
|
|
757
|
+
| `largeStep` | `number` | `10` | The step of Page Up / Page Down and Shift + arrows |
|
|
758
|
+
| `minStepsBetweenValues` | `number` | `0` | The minimum gap between the thumbs of a range, in steps |
|
|
759
|
+
| `thumbCollisionBehavior` | `"push" \| "swap" \| "none"` | `"push"` | What thumbs of a range do when they meet while dragging |
|
|
760
|
+
| `thumbAlignment` | `"center" \| "edge" \| "edge-client-only"` | `"center"` | Where the thumbs sit at the bounds: centered on the control's edge, or inside it |
|
|
761
|
+
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | A vertical slider stacks the parts in a column. Give it a height |
|
|
762
|
+
| `disabled` | `boolean` | | |
|
|
763
|
+
| `name`, `form` | `string` | | Form props. Each thumb submits its value under `name`, so a range sends one value per thumb. Inside `BaseFormField`, the field's `name` is used |
|
|
764
|
+
| `format` | `Intl.NumberFormatOptions` | | How values are formatted for the value text and screen readers |
|
|
765
|
+
| `locale` | `Intl.LocalesArgument` | runtime locale | The locale used to format values |
|
|
766
|
+
| `label` | `ReactNode` | | The visible name. It labels every thumb. Not needed inside `BaseFormField`, whose `label` names it |
|
|
767
|
+
| `labelClassName` | `string` | | Classes for the label `<div>` (default `grow` while horizontal) |
|
|
768
|
+
| `renderLabel` | `RenderProp<"div", SliderState>` | | Render another element for the label |
|
|
769
|
+
| `showValue` | `boolean \| (formattedValues, values) => ReactNode` | `false` | Shows the value as text next to the label (a range shows `20 – 80`). A function shows something else, e.g. `` (f) => f.join(" to ") `` |
|
|
770
|
+
| `valueClassName` | `string` | | Classes for the value `<output>` (default `ms-auto tabular-nums` while horizontal) |
|
|
771
|
+
| `renderValue` | `RenderProp<"output", SliderState>` | | Render another element for the value |
|
|
772
|
+
| `size` | `"lg" \| "md" \| "sm" \| "xs"` | `"md"` | The track's thickness (`2` / `1.5` / `1` / `0.5`) and the thumbs' size (`size-5` / `4` / `3.5` / `3`) |
|
|
773
|
+
| `controlClassName` | `string` | | Classes for the control `<div>`, the area that reacts to the pointer (default `flex touch-none items-center select-none`, full width with `py-2` while horizontal) |
|
|
774
|
+
| `renderControl` | `RenderProp<"div", SliderState>` | | Render another element for the control |
|
|
775
|
+
| `trackClassName` | `string` | | Classes for the track `<div>` (default `rounded-full`, full length) |
|
|
776
|
+
| `renderTrack` | `RenderProp<"div", SliderState>` | | Render another element for the track |
|
|
777
|
+
| `indicatorClassName` | `string` | | Classes for the indicator `<div>`, the filled part (default `rounded-full`). Its position and length are set inline |
|
|
778
|
+
| `renderIndicator` | `RenderProp<"div", SliderState>` | | Render another element for the indicator |
|
|
779
|
+
| `thumbClassName` | `string` | | Classes for every thumb `<div>` (default `rounded-full`, a focus outline through `has-focus-visible:outline-2 outline-offset-2`: set its color) |
|
|
780
|
+
| `renderThumb` | `RenderProp<"div", SliderState>` | | Render another element for the thumbs. Keep `props.children`: it holds the thumb's `<input type="range">` |
|
|
781
|
+
| `getAriaLabel` | `(index) => string` | | The thumbs' accessible names. Use it without a `label`, or to name the thumbs of a range |
|
|
782
|
+
| `getAriaValueText` | `(formattedValue, value, index) => string` | | What screen readers announce for a thumb's value |
|
|
783
|
+
| `children` | `ReactNode` | | Lays out the parts yourself (see below). The built-in label, value and control aren't rendered then |
|
|
784
|
+
| `className` | `string` | | Classes for the root `<div>` |
|
|
785
|
+
| `render` | `RenderProp<"div", SliderState>` | | Render another element for the root |
|
|
786
|
+
| …rest | | | `<div>` props |
|
|
787
|
+
|
|
788
|
+
To place the parts yourself, pass them as children. Dot notation only works in client components.
|
|
789
|
+
|
|
790
|
+
```tsx
|
|
791
|
+
<BaseSlider defaultValue={[20, 80]} className="flex-col items-stretch">
|
|
792
|
+
<BaseSlider.Label>Price</BaseSlider.Label>
|
|
793
|
+
<BaseSlider.Control>
|
|
794
|
+
<BaseSlider.Track className="bg-neutral-200">
|
|
795
|
+
<BaseSlider.Indicator className="bg-blue-600" />
|
|
796
|
+
<BaseSlider.Thumb index={0} className="bg-blue-600" getAriaLabel={() => "Minimum price"} />
|
|
797
|
+
<BaseSlider.Thumb index={1} className="bg-blue-600" getAriaLabel={() => "Maximum price"} />
|
|
798
|
+
</BaseSlider.Track>
|
|
799
|
+
</BaseSlider.Control>
|
|
800
|
+
<BaseSlider.Value>{formatted => formatted.join(" to ")}</BaseSlider.Value>
|
|
801
|
+
</BaseSlider>
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
| Part | Renders | Props |
|
|
805
|
+
|------|---------|-------|
|
|
806
|
+
| `BaseSlider.Label` | `<div>` | `className`, `render` |
|
|
807
|
+
| `BaseSlider.Value` | `<output>` | `className`, `render`, `children?: (formattedValues, values) => ReactNode` |
|
|
808
|
+
| `BaseSlider.Control` | `<div>` | `className`, `render` |
|
|
809
|
+
| `BaseSlider.Track` | `<div>` | `size`, `className`, `render` |
|
|
810
|
+
| `BaseSlider.Indicator` | `<div>` | `className`, `render` |
|
|
811
|
+
| `BaseSlider.Thumb` | `<div>` with a hidden `<input type="range">` | `index` (needed to server-render a range), `size`, `disabled`, `getAriaLabel`, `getAriaValueText`, `inputRef`, `onFocus` / `onBlur` / `onKeyDown` (on the input), `className`, `render` |
|
|
812
|
+
|
|
813
|
+
Render functions get `SliderState`: `{ values, min, max, step, orientation, disabled, dragging, activeThumbIndex, touched, dirty, valid, focused }`. Every part sets `data-orientation`, `data-disabled` and `data-dragging`; inside `BaseFormField` also `data-valid` / `data-invalid`, `data-touched`, `data-dirty` and `data-focused`. Thumbs set `data-index`.
|
|
814
|
+
|
|
815
|
+
**In a form.** Put it in `BaseFormField`'s `children`. The field gives it its `name`, label, server errors and `data-invalid`, and `onlyDirty` sees its value (`defaultValues` holds a number, or an array for a range). Read the bounds from the schema:
|
|
816
|
+
|
|
817
|
+
```tsx
|
|
818
|
+
<BaseFormField name="rating" label="Rating" schema={z.coerce.number().int().min(0).max(10)}>
|
|
819
|
+
{constraints => (
|
|
820
|
+
<BaseSlider defaultValue={5} min={Number(constraints.min)} max={Number(constraints.max)} showValue />
|
|
821
|
+
)}
|
|
822
|
+
</BaseFormField>
|
|
823
|
+
```
|
|
824
|
+
|
|
733
825
|
### `@omer-x/tailwind-ui-kit/dialog`
|
|
734
826
|
|
|
735
827
|
#### `BaseDialog`
|
|
@@ -1644,6 +1736,29 @@ toastManager.add({ title: "Session expired", type: "error" });
|
|
|
1644
1736
|
|
|
1645
1737
|
### `@omer-x/tailwind-ui-kit/layout`
|
|
1646
1738
|
|
|
1739
|
+
#### `BaseSeparator`
|
|
1740
|
+
|
|
1741
|
+
A Base UI [`Separator`](https://base-ui.com/react/components/separator): a `1px` line between blocks that screen readers announce. Renders a `<div>` with `role="separator"`, `aria-orientation` and `data-orientation`. It has no color: give it one with `className`.
|
|
1742
|
+
|
|
1743
|
+
```tsx
|
|
1744
|
+
import { BaseSeparator } from "@omer-x/tailwind-ui-kit/layout";
|
|
1745
|
+
|
|
1746
|
+
<BaseSeparator className="bg-neutral-300" />
|
|
1747
|
+
|
|
1748
|
+
<nav className="flex items-center gap-3">
|
|
1749
|
+
<a href="/">Home</a>
|
|
1750
|
+
<BaseSeparator orientation="vertical" className="h-4 bg-neutral-300" />
|
|
1751
|
+
<a href="/pricing">Pricing</a>
|
|
1752
|
+
</nav>
|
|
1753
|
+
```
|
|
1754
|
+
|
|
1755
|
+
| Prop | Type | Default | Description |
|
|
1756
|
+
|------|------|---------|-------------|
|
|
1757
|
+
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Horizontal: `h-px w-full`. Vertical: `w-px self-stretch` (the height of its flex row; set a height with `className` otherwise) |
|
|
1758
|
+
| `render` | `RenderProp<"div", SeparatorState>` | | The state is `{ orientation }`. E.g. `render={<hr />}` (add `border-0`: Tailwind's preflight gives `<hr>` a top border) |
|
|
1759
|
+
|
|
1760
|
+
Style each orientation with `data-[orientation=vertical]:…`.
|
|
1761
|
+
|
|
1647
1762
|
#### `Container`
|
|
1648
1763
|
|
|
1649
1764
|
Tailwind's `container`, centered with horizontal padding (`container mx-auto px-3`). Accepts all `<div>` props.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { SliderSize } from "./sliderStyles.js";
|
|
2
|
+
import { RenderProp } from "../../utils/render.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
export type SliderOrientation = "horizontal" | "vertical";
|
|
5
|
+
/** The state every slider part gets in its render function. */
|
|
6
|
+
export type SliderState = {
|
|
7
|
+
/** The values, one per thumb. */
|
|
8
|
+
values: readonly number[];
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
step: number;
|
|
12
|
+
orientation: SliderOrientation;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
/** A thumb is being dragged. */
|
|
15
|
+
dragging: boolean;
|
|
16
|
+
/** The index of the focused or dragged thumb, `-1` when none is. */
|
|
17
|
+
activeThumbIndex: number;
|
|
18
|
+
/** The slider has lost focus at least once (inside a `BaseFormField`). */
|
|
19
|
+
touched: boolean;
|
|
20
|
+
/** The value differs from the initial one (inside a `BaseFormField`). */
|
|
21
|
+
dirty: boolean;
|
|
22
|
+
/** `null` until the field is validated (inside a `BaseFormField`). */
|
|
23
|
+
valid: boolean | null;
|
|
24
|
+
/** A thumb has focus (inside a `BaseFormField`). */
|
|
25
|
+
focused: boolean;
|
|
26
|
+
};
|
|
27
|
+
/** A single value is a `number`, a range (one value per thumb) an array of numbers. */
|
|
28
|
+
type SliderChangedValue<Value> = Value extends number ? number : Value;
|
|
29
|
+
type BaseSliderProps<Value extends number | readonly number[]> = Omit<ComponentProps<"div">, "children" | "defaultValue" | "onChange"> & {
|
|
30
|
+
render?: RenderProp<"div", SliderState>;
|
|
31
|
+
/** The value, controlled. An array makes a range slider with one thumb per value. */
|
|
32
|
+
value?: Value;
|
|
33
|
+
/** The initial value, uncontrolled. An array makes a range slider with one thumb per value. */
|
|
34
|
+
defaultValue?: Value;
|
|
35
|
+
/** Called with the new value and the DOM event that changed it, on every move. */
|
|
36
|
+
onValueChange?: (value: SliderChangedValue<Value>, event: Event) => void;
|
|
37
|
+
/** Called with the final value when the user releases the thumb or finishes a key press. */
|
|
38
|
+
onValueCommitted?: (value: SliderChangedValue<Value>, event: Event) => void;
|
|
39
|
+
/** @default 0 */
|
|
40
|
+
min?: number;
|
|
41
|
+
/** @default 100 */
|
|
42
|
+
max?: number;
|
|
43
|
+
/** The values snap to multiples of `step`, counted from `min`. @default 1 */
|
|
44
|
+
step?: number;
|
|
45
|
+
/** The step of Page Up / Page Down and Shift + arrow keys. @default 10 */
|
|
46
|
+
largeStep?: number;
|
|
47
|
+
/** The minimum number of steps between the thumbs of a range. @default 0 */
|
|
48
|
+
minStepsBetweenValues?: number;
|
|
49
|
+
/** @default "horizontal" */
|
|
50
|
+
orientation?: SliderOrientation;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
/** Submitted name. A range submits one value per thumb under it. Inside a `BaseFormField`, the field's name is used. */
|
|
53
|
+
name?: string;
|
|
54
|
+
/** The `id` of a `<form>` to submit with, when the slider isn't inside it. */
|
|
55
|
+
form?: string;
|
|
56
|
+
/** How the value is formatted for `Value` and screen readers. */
|
|
57
|
+
format?: Intl.NumberFormatOptions;
|
|
58
|
+
/** The locale used to format the value. Defaults to the user's runtime locale. */
|
|
59
|
+
locale?: Intl.LocalesArgument;
|
|
60
|
+
/**
|
|
61
|
+
* Where the thumbs sit at `min` and `max`: centered on the control's edge, or inside it (`edge`).
|
|
62
|
+
* `edge-client-only` is `edge` without the server-rendering script.
|
|
63
|
+
* @default "center"
|
|
64
|
+
*/
|
|
65
|
+
thumbAlignment?: "center" | "edge" | "edge-client-only";
|
|
66
|
+
/**
|
|
67
|
+
* What thumbs of a range do when they meet while dragging: push each other, swap places, or stop.
|
|
68
|
+
* @default "push"
|
|
69
|
+
*/
|
|
70
|
+
thumbCollisionBehavior?: "push" | "swap" | "none";
|
|
71
|
+
/** The slider's visible name. It labels every thumb for assistive technology. */
|
|
72
|
+
label?: ReactNode;
|
|
73
|
+
/** Classes for the label `<div>`. */
|
|
74
|
+
labelClassName?: string;
|
|
75
|
+
renderLabel?: RenderProp<"div", SliderState>;
|
|
76
|
+
/** Shows the value as text next to the label. A function shows something else, e.g. `"20 to 80"`. */
|
|
77
|
+
showValue?: boolean | ((formattedValues: readonly string[], values: readonly number[]) => ReactNode);
|
|
78
|
+
/** Classes for the value `<output>`. */
|
|
79
|
+
valueClassName?: string;
|
|
80
|
+
renderValue?: RenderProp<"output", SliderState>;
|
|
81
|
+
/** The track's thickness and the thumbs' size. */
|
|
82
|
+
size?: SliderSize;
|
|
83
|
+
/** Classes for the control `<div>`, the area that reacts to the pointer. */
|
|
84
|
+
controlClassName?: string;
|
|
85
|
+
renderControl?: RenderProp<"div", SliderState>;
|
|
86
|
+
/** Classes for the track `<div>`. */
|
|
87
|
+
trackClassName?: string;
|
|
88
|
+
renderTrack?: RenderProp<"div", SliderState>;
|
|
89
|
+
/** Classes for the indicator `<div>`, the filled part of the track. */
|
|
90
|
+
indicatorClassName?: string;
|
|
91
|
+
renderIndicator?: RenderProp<"div", SliderState>;
|
|
92
|
+
/** Classes for every thumb `<div>`. */
|
|
93
|
+
thumbClassName?: string;
|
|
94
|
+
renderThumb?: RenderProp<"div", SliderState>;
|
|
95
|
+
/** The thumbs' accessible names, built from their index. Use it when no label names the slider. */
|
|
96
|
+
getAriaLabel?: (index: number) => string;
|
|
97
|
+
/** Text that screen readers announce for a thumb's value. */
|
|
98
|
+
getAriaValueText?: (formattedValue: string, value: number, index: number) => string;
|
|
99
|
+
/**
|
|
100
|
+
* Lays out the slider's parts yourself (`BaseSlider.Label`, `.Value`, `.Control`, `.Track`, `.Indicator`, `.Thumb`).
|
|
101
|
+
* When given, the built-in label, value and control aren't rendered.
|
|
102
|
+
*/
|
|
103
|
+
children?: ReactNode;
|
|
104
|
+
};
|
|
105
|
+
declare const _default: (<Value extends number | readonly number[]>({ label, labelClassName, renderLabel, showValue, valueClassName, renderValue, size, controlClassName, renderControl, trackClassName, renderTrack, indicatorClassName, renderIndicator, thumbClassName, renderThumb, getAriaLabel, getAriaValueText, onValueChange, onValueCommitted, className, children, ...otherProps }: BaseSliderProps<Value>) => import("react").JSX.Element) & {
|
|
106
|
+
Label: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "id"> & {
|
|
107
|
+
render?: RenderProp<"div", SliderState>;
|
|
108
|
+
}) => import("react").JSX.Element;
|
|
109
|
+
Value: (props: Omit<import("react").DetailedHTMLProps<import("react").OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, "children"> & {
|
|
110
|
+
render?: RenderProp<"output", SliderState>;
|
|
111
|
+
children?: (formattedValues: readonly string[], values: readonly number[]) => ReactNode;
|
|
112
|
+
}) => import("react").JSX.Element;
|
|
113
|
+
Control: ({ className, ...otherProps }: import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
114
|
+
render?: RenderProp<"div", SliderState>;
|
|
115
|
+
}) => import("react").JSX.Element;
|
|
116
|
+
Track: ({ size, className, ...otherProps }: import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
117
|
+
render?: RenderProp<"div", SliderState>;
|
|
118
|
+
size?: SliderSize;
|
|
119
|
+
}) => import("react").JSX.Element;
|
|
120
|
+
Indicator: ({ className, ...otherProps }: import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
121
|
+
render?: RenderProp<"div", SliderState>;
|
|
122
|
+
}) => import("react").JSX.Element;
|
|
123
|
+
Thumb: ({ size, className, ...otherProps }: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onFocus" | "onBlur" | "onKeyDown"> & {
|
|
124
|
+
render?: RenderProp<"div", SliderState>;
|
|
125
|
+
size?: SliderSize;
|
|
126
|
+
index?: number;
|
|
127
|
+
disabled?: boolean;
|
|
128
|
+
getAriaLabel?: (index: number) => string;
|
|
129
|
+
getAriaValueText?: (formattedValue: string, value: number, index: number) => string;
|
|
130
|
+
inputRef?: import("react").Ref<HTMLInputElement>;
|
|
131
|
+
onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
|
|
132
|
+
onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
|
|
133
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLInputElement>;
|
|
134
|
+
}) => import("react").JSX.Element;
|
|
135
|
+
};
|
|
136
|
+
export { type SliderSize, _default as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import BaseSliderControl from "./BaseSliderControl.js";
|
|
5
|
+
import BaseSliderIndicator from "./BaseSliderIndicator.js";
|
|
6
|
+
import BaseSliderLabel from "./BaseSliderLabel.js";
|
|
7
|
+
import BaseSliderThumb from "./BaseSliderThumb.js";
|
|
8
|
+
import BaseSliderTrack from "./BaseSliderTrack.js";
|
|
9
|
+
import BaseSliderValue from "./BaseSliderValue.js";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
// src/components/form/BaseSlider.tsx
|
|
12
|
+
/**
|
|
13
|
+
* An input for a number, or a range of numbers, within known bounds.
|
|
14
|
+
* Renders a `<div>`: the label and the value on top, the control with its track and thumbs below.
|
|
15
|
+
*/
|
|
16
|
+
const BaseSlider = ({ label, labelClassName, renderLabel, showValue = false, valueClassName, renderValue, size = "md", controlClassName, renderControl, trackClassName, renderTrack, indicatorClassName, renderIndicator, thumbClassName, renderThumb, getAriaLabel, getAriaValueText, onValueChange, onValueCommitted, className, children, ...otherProps }) => {
|
|
17
|
+
const initialValue = otherProps.value ?? otherProps.defaultValue;
|
|
18
|
+
const thumbCount = Array.isArray(initialValue) ? initialValue.length : 1;
|
|
19
|
+
return /* @__PURE__ */ jsx(Slider.Root, {
|
|
20
|
+
...otherProps,
|
|
21
|
+
onValueChange: onValueChange && ((value, details) => onValueChange(value, details.event)),
|
|
22
|
+
onValueCommitted: onValueCommitted && ((value, details) => onValueCommitted(value, details.event)),
|
|
23
|
+
className: cn("flex", "flex-wrap", "items-center", "gap-x-2", "gap-y-1", "data-[orientation=vertical]:flex-col", "data-[orientation=vertical]:flex-nowrap", className),
|
|
24
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
|
+
typeof label !== "undefined" && /* @__PURE__ */ jsx(BaseSliderLabel, {
|
|
26
|
+
render: renderLabel,
|
|
27
|
+
className: cn("data-[orientation=horizontal]:grow", labelClassName),
|
|
28
|
+
children: label
|
|
29
|
+
}),
|
|
30
|
+
showValue !== false && /* @__PURE__ */ jsx(BaseSliderValue, {
|
|
31
|
+
render: renderValue,
|
|
32
|
+
className: cn("data-[orientation=horizontal]:ms-auto", "tabular-nums", valueClassName),
|
|
33
|
+
children: typeof showValue === "function" ? showValue : void 0
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsx(BaseSliderControl, {
|
|
36
|
+
render: renderControl,
|
|
37
|
+
className: controlClassName,
|
|
38
|
+
children: /* @__PURE__ */ jsxs(BaseSliderTrack, {
|
|
39
|
+
size,
|
|
40
|
+
render: renderTrack,
|
|
41
|
+
className: trackClassName,
|
|
42
|
+
children: [/* @__PURE__ */ jsx(BaseSliderIndicator, {
|
|
43
|
+
render: renderIndicator,
|
|
44
|
+
className: indicatorClassName
|
|
45
|
+
}), Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ jsx(BaseSliderThumb, {
|
|
46
|
+
index,
|
|
47
|
+
size,
|
|
48
|
+
render: renderThumb,
|
|
49
|
+
className: thumbClassName,
|
|
50
|
+
getAriaLabel,
|
|
51
|
+
getAriaValueText
|
|
52
|
+
}, index))]
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
] })
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
var BaseSlider_default = Object.assign(BaseSlider, {
|
|
59
|
+
Label: BaseSliderLabel,
|
|
60
|
+
Value: BaseSliderValue,
|
|
61
|
+
Control: BaseSliderControl,
|
|
62
|
+
Track: BaseSliderTrack,
|
|
63
|
+
Indicator: BaseSliderIndicator,
|
|
64
|
+
Thumb: BaseSliderThumb
|
|
65
|
+
});
|
|
66
|
+
export { BaseSlider_default as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SliderState } from "./BaseSlider.js";
|
|
2
|
+
import { RenderProp } from "../../utils/render.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
type BaseSliderControlProps = ComponentProps<"div"> & {
|
|
5
|
+
render?: RenderProp<"div", SliderState>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The interactive area: pressing anywhere in it moves the closest thumb there.
|
|
9
|
+
* Put a `BaseSlider.Track` inside it. Renders a `<div>`.
|
|
10
|
+
*/
|
|
11
|
+
declare const BaseSliderControl: ({ className, ...otherProps }: BaseSliderControlProps) => import("react").JSX.Element;
|
|
12
|
+
export { BaseSliderControl as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/form/BaseSliderControl.tsx
|
|
6
|
+
/**
|
|
7
|
+
* The interactive area: pressing anywhere in it moves the closest thumb there.
|
|
8
|
+
* Put a `BaseSlider.Track` inside it. Renders a `<div>`.
|
|
9
|
+
*/
|
|
10
|
+
const BaseSliderControl = ({ className, ...otherProps }) => /* @__PURE__ */ jsx(Slider.Control, {
|
|
11
|
+
...otherProps,
|
|
12
|
+
className: cn("flex", "touch-none", "items-center", "select-none", "data-disabled:cursor-not-allowed", "data-[orientation=horizontal]:w-full", "data-[orientation=horizontal]:py-2", "data-[orientation=vertical]:grow", "data-[orientation=vertical]:flex-col", "data-[orientation=vertical]:px-2", className)
|
|
13
|
+
});
|
|
14
|
+
export { BaseSliderControl as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SliderState } from "./BaseSlider.js";
|
|
2
|
+
import { RenderProp } from "../../utils/render.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
type BaseSliderIndicatorProps = ComponentProps<"div"> & {
|
|
5
|
+
render?: RenderProp<"div", SliderState>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The filled part of the track: from the start to the thumb, or between the thumbs of a range.
|
|
9
|
+
* Base UI sets its position and length inline. Renders a `<div>`.
|
|
10
|
+
*/
|
|
11
|
+
declare const BaseSliderIndicator: ({ className, ...otherProps }: BaseSliderIndicatorProps) => import("react").JSX.Element;
|
|
12
|
+
export { BaseSliderIndicator as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/form/BaseSliderIndicator.tsx
|
|
6
|
+
/**
|
|
7
|
+
* The filled part of the track: from the start to the thumb, or between the thumbs of a range.
|
|
8
|
+
* Base UI sets its position and length inline. Renders a `<div>`.
|
|
9
|
+
*/
|
|
10
|
+
const BaseSliderIndicator = ({ className, ...otherProps }) => /* @__PURE__ */ jsx(Slider.Indicator, {
|
|
11
|
+
...otherProps,
|
|
12
|
+
className: cn("rounded-full", "select-none", className)
|
|
13
|
+
});
|
|
14
|
+
export { BaseSliderIndicator as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SliderState } from "./BaseSlider.js";
|
|
2
|
+
import { RenderProp } from "../../utils/render.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
type BaseSliderLabelProps = Omit<ComponentProps<"div">, "id"> & {
|
|
5
|
+
render?: RenderProp<"div", SliderState>;
|
|
6
|
+
};
|
|
7
|
+
/** The slider's visible name. It labels every thumb for assistive technology. Renders a `<div>`. */
|
|
8
|
+
declare const BaseSliderLabel: (props: BaseSliderLabelProps) => import("react").JSX.Element;
|
|
9
|
+
export { BaseSliderLabel as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/form/BaseSliderLabel.tsx
|
|
5
|
+
/** The slider's visible name. It labels every thumb for assistive technology. Renders a `<div>`. */
|
|
6
|
+
const BaseSliderLabel = (props) => /* @__PURE__ */ jsx(Slider.Label, { ...props });
|
|
7
|
+
export { BaseSliderLabel as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SliderSize } from "./sliderStyles.js";
|
|
2
|
+
import { SliderState } from "./BaseSlider.js";
|
|
3
|
+
import { RenderProp } from "../../utils/render.js";
|
|
4
|
+
import { ComponentProps, FocusEventHandler, KeyboardEventHandler, Ref } from "react";
|
|
5
|
+
type BaseSliderThumbProps = Omit<ComponentProps<"div">, "onFocus" | "onBlur" | "onKeyDown"> & {
|
|
6
|
+
render?: RenderProp<"div", SliderState>;
|
|
7
|
+
/** The thumb's size. */
|
|
8
|
+
size?: SliderSize;
|
|
9
|
+
/** The index of the thumb's value in a range. Needed for server rendering of a range. */
|
|
10
|
+
index?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** The thumb's accessible name, built from its index. Use it when no label names the slider. */
|
|
13
|
+
getAriaLabel?: (index: number) => string;
|
|
14
|
+
/** Text that screen readers announce for the thumb's value. */
|
|
15
|
+
getAriaValueText?: (formattedValue: string, value: number, index: number) => string;
|
|
16
|
+
/** A ref to the thumb's hidden `<input type="range">`. */
|
|
17
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
18
|
+
/** Called when the thumb's `<input>` gets focus. */
|
|
19
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
20
|
+
/** Called when the thumb's `<input>` loses focus. */
|
|
21
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
22
|
+
/** Called on key presses in the thumb's `<input>`. */
|
|
23
|
+
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The draggable handle of a value. Renders a `<div>` with a hidden `<input type="range">` inside,
|
|
27
|
+
* which takes the focus and submits the value with the form.
|
|
28
|
+
*/
|
|
29
|
+
declare const BaseSliderThumb: ({ size, className, ...otherProps }: BaseSliderThumbProps) => import("react").JSX.Element;
|
|
30
|
+
export { BaseSliderThumb as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { sliderThumbClassName } from "./sliderStyles.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
// src/components/form/BaseSliderThumb.tsx
|
|
7
|
+
/**
|
|
8
|
+
* The draggable handle of a value. Renders a `<div>` with a hidden `<input type="range">` inside,
|
|
9
|
+
* which takes the focus and submits the value with the form.
|
|
10
|
+
*/
|
|
11
|
+
const BaseSliderThumb = ({ size = "md", className, ...otherProps }) => /* @__PURE__ */ jsx(Slider.Thumb, {
|
|
12
|
+
...otherProps,
|
|
13
|
+
className: cn(sliderThumbClassName(size), className)
|
|
14
|
+
});
|
|
15
|
+
export { BaseSliderThumb as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SliderSize } from "./sliderStyles.js";
|
|
2
|
+
import { SliderState } from "./BaseSlider.js";
|
|
3
|
+
import { RenderProp } from "../../utils/render.js";
|
|
4
|
+
import { ComponentProps } from "react";
|
|
5
|
+
type BaseSliderTrackProps = ComponentProps<"div"> & {
|
|
6
|
+
render?: RenderProp<"div", SliderState>;
|
|
7
|
+
/** The track's thickness. */
|
|
8
|
+
size?: SliderSize;
|
|
9
|
+
};
|
|
10
|
+
/** The whole range of the slider. Put a `BaseSlider.Indicator` and the thumbs inside it. Renders a `<div>`. */
|
|
11
|
+
declare const BaseSliderTrack: ({ size, className, ...otherProps }: BaseSliderTrackProps) => import("react").JSX.Element;
|
|
12
|
+
export { BaseSliderTrack as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { sliderTrackClassName } from "./sliderStyles.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
// src/components/form/BaseSliderTrack.tsx
|
|
7
|
+
/** The whole range of the slider. Put a `BaseSlider.Indicator` and the thumbs inside it. Renders a `<div>`. */
|
|
8
|
+
const BaseSliderTrack = ({ size = "md", className, ...otherProps }) => /* @__PURE__ */ jsx(Slider.Track, {
|
|
9
|
+
...otherProps,
|
|
10
|
+
className: cn(sliderTrackClassName(size), className)
|
|
11
|
+
});
|
|
12
|
+
export { BaseSliderTrack as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SliderState } from "./BaseSlider.js";
|
|
2
|
+
import { RenderProp } from "../../utils/render.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
type BaseSliderValueProps = Omit<ComponentProps<"output">, "children"> & {
|
|
5
|
+
render?: RenderProp<"output", SliderState>;
|
|
6
|
+
/** Shows something else than the formatted values, e.g. `(formatted) => formatted.join(" to ")`. */
|
|
7
|
+
children?: (formattedValues: readonly string[], values: readonly number[]) => ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The value as text, formatted with the slider's `format` and `locale`. A range shows every thumb's value.
|
|
11
|
+
* Renders an `<output>`.
|
|
12
|
+
*/
|
|
13
|
+
declare const BaseSliderValue: (props: BaseSliderValueProps) => import("react").JSX.Element;
|
|
14
|
+
export { BaseSliderValue as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/form/BaseSliderValue.tsx
|
|
5
|
+
/**
|
|
6
|
+
* The value as text, formatted with the slider's `format` and `locale`. A range shows every thumb's value.
|
|
7
|
+
* Renders an `<output>`.
|
|
8
|
+
*/
|
|
9
|
+
const BaseSliderValue = (props) => /* @__PURE__ */ jsx(Slider.Value, { ...props });
|
|
10
|
+
export { BaseSliderValue as default };
|
|
@@ -23,7 +23,9 @@ import { SelectItemState } from "./BaseSelectItem.js";
|
|
|
23
23
|
import { SelectItemIndicatorState } from "./BaseSelectItemIndicator.js";
|
|
24
24
|
import { SelectArrowState, SelectBackdropState, SelectCollisionAvoidance, SelectFocusTarget, SelectOffsetFunction, SelectPopupState, SelectPositionerState } from "./BaseSelectPopup.js";
|
|
25
25
|
import { SelectSeparatorState } from "./BaseSelectSeparator.js";
|
|
26
|
+
import { SliderSize } from "./sliderStyles.js";
|
|
26
27
|
import { SelectValueState } from "./BaseSelectValue.js";
|
|
27
28
|
import BaseRadioGroup, { RadioGroupState } from "./BaseRadioGroup.js";
|
|
28
29
|
import BaseRadio, { RadioState } from "./BaseRadio.js";
|
|
29
|
-
|
|
30
|
+
import _default$2, { SliderOrientation, SliderState } from "./BaseSlider.js";
|
|
31
|
+
export { type AutocompleteActions, type AutocompleteAlign, type AutocompleteArrowState, type AutocompleteBackdropState, type AutocompleteClearState, type AutocompleteCollisionAvoidance, type AutocompleteFilter, type AutocompleteFocusTarget, type AutocompleteHighlightReason, type AutocompleteInputState, type AutocompleteInteractionType, type AutocompleteItemGroup, type AutocompleteItemState, type AutocompleteListState, type AutocompleteOffsetFunction, type AutocompletePopupState, type AutocompletePositionerState, type AutocompleteSeparatorState, type AutocompleteSide, _default as BaseAutocomplete, BaseCheckbox, BaseCheckboxGroup, BaseFieldset, BaseForm, BaseFormField, BaseInput, BaseRadio, BaseRadioGroup, _default$1 as BaseSelect, _default$2 as BaseSlider, BaseSwitch, type CheckboxGroupState, type CheckboxState, type DisplayedFormMessage, type FieldConstraints, type FieldState, type FieldsetState, type InputSize, type MessageFormatter, type RadioGroupState, type RadioState, type SelectActions, type SelectAlign, type SelectArrowState, type SelectBackdropState, type SelectCollisionAvoidance, type SelectFocusTarget, type SelectIconState, type SelectInteractionType, type SelectItemGroup, type SelectItemIndicatorState, type SelectItemState, type SelectLabeledItem, type SelectOffsetFunction, type SelectPopupState, type SelectPositionerState, type SelectScrollArrowState, type SelectSeparatorState, type SelectSide, type SelectTriggerState, type SelectValueState, type SliderOrientation, type SliderSize, type SliderState, type SwitchState, type UseAutocompleteFilterOptions, useAutocompleteFilter, useFormMessages };
|
|
@@ -11,4 +11,5 @@ import BaseFieldset from "./BaseFieldset.js";
|
|
|
11
11
|
import BaseSelect_default from "./BaseSelect.js";
|
|
12
12
|
import BaseRadioGroup from "./BaseRadioGroup.js";
|
|
13
13
|
import BaseRadio from "./BaseRadio.js";
|
|
14
|
-
|
|
14
|
+
import BaseSlider_default from "./BaseSlider.js";
|
|
15
|
+
export { BaseAutocomplete_default as BaseAutocomplete, BaseCheckbox, BaseCheckboxGroup, BaseFieldset, BaseForm, BaseFormField, BaseInput, BaseRadio, BaseRadioGroup, BaseSelect_default as BaseSelect, BaseSlider_default as BaseSlider, BaseSwitch, useAutocompleteFilter, useFormMessages };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type SliderSize = "lg" | "md" | "sm" | "xs";
|
|
2
|
+
/** Classes for the slider's track: its thickness across the orientation, and the full length along it. */
|
|
3
|
+
export declare function sliderTrackClassName(size: SliderSize): string;
|
|
4
|
+
/** Classes for a thumb. Base UI positions it inline. */
|
|
5
|
+
export declare function sliderThumbClassName(size: SliderSize): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cn } from "cn";
|
|
2
|
+
// src/components/form/sliderStyles.ts
|
|
3
|
+
/** Classes for the slider's track: its thickness across the orientation, and the full length along it. */
|
|
4
|
+
function sliderTrackClassName(size) {
|
|
5
|
+
return cn({
|
|
6
|
+
"data-[orientation=horizontal]:h-2 data-[orientation=vertical]:w-2": size === "lg",
|
|
7
|
+
"data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5": size === "md",
|
|
8
|
+
"data-[orientation=horizontal]:h-1 data-[orientation=vertical]:w-1": size === "sm",
|
|
9
|
+
"data-[orientation=horizontal]:h-0.5 data-[orientation=vertical]:w-0.5": size === "xs"
|
|
10
|
+
}, [
|
|
11
|
+
"rounded-full",
|
|
12
|
+
"select-none",
|
|
13
|
+
"data-[orientation=horizontal]:w-full",
|
|
14
|
+
"data-[orientation=vertical]:h-full"
|
|
15
|
+
]);
|
|
16
|
+
}
|
|
17
|
+
/** Classes for a thumb. Base UI positions it inline. */
|
|
18
|
+
function sliderThumbClassName(size) {
|
|
19
|
+
return cn({
|
|
20
|
+
"size-5": size === "lg",
|
|
21
|
+
"size-4": size === "md",
|
|
22
|
+
"size-3.5": size === "sm",
|
|
23
|
+
"size-3": size === "xs"
|
|
24
|
+
}, [
|
|
25
|
+
"rounded-full",
|
|
26
|
+
"select-none",
|
|
27
|
+
"outline-offset-2",
|
|
28
|
+
"has-focus-visible:outline-2",
|
|
29
|
+
"data-disabled:cursor-not-allowed"
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
export { sliderThumbClassName, sliderTrackClassName };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RenderProp } from "../../utils/render.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
export type SeparatorState = {
|
|
4
|
+
orientation: "horizontal" | "vertical";
|
|
5
|
+
};
|
|
6
|
+
type BaseSeparatorProps = ComponentProps<"div"> & {
|
|
7
|
+
render?: RenderProp<"div", SeparatorState>;
|
|
8
|
+
/** @default "horizontal" */
|
|
9
|
+
orientation?: "horizontal" | "vertical";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A `1px` line that screen readers announce. Renders a `<div>` with `role="separator"`,
|
|
13
|
+
* `aria-orientation` and `data-orientation`. Give it a color with `className`.
|
|
14
|
+
*/
|
|
15
|
+
declare const BaseSeparator: ({ orientation, className, ...otherProps }: BaseSeparatorProps) => import("react").JSX.Element;
|
|
16
|
+
export { BaseSeparator as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Separator } from "@base-ui/react/separator";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/layout/BaseSeparator.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A `1px` line that screen readers announce. Renders a `<div>` with `role="separator"`,
|
|
8
|
+
* `aria-orientation` and `data-orientation`. Give it a color with `className`.
|
|
9
|
+
*/
|
|
10
|
+
const BaseSeparator = ({ orientation = "horizontal", className, ...otherProps }) => /* @__PURE__ */ jsx(Separator, {
|
|
11
|
+
...otherProps,
|
|
12
|
+
orientation,
|
|
13
|
+
className: cn("shrink-0", {
|
|
14
|
+
"h-px w-full": orientation === "horizontal",
|
|
15
|
+
"w-px self-stretch": orientation === "vertical"
|
|
16
|
+
}, className)
|
|
17
|
+
});
|
|
18
|
+
export { BaseSeparator as default };
|
|
@@ -65,5 +65,5 @@ export declare function splitFilterProps<Props extends MenuRootSharedProps>({ fi
|
|
|
65
65
|
event: Event | undefined;
|
|
66
66
|
}) => void) | undefined;
|
|
67
67
|
} | null;
|
|
68
|
-
rootProps: Omit<Props, "filter" | "locale" | "
|
|
68
|
+
rootProps: Omit<Props, "filter" | "locale" | "autoHighlight" | "filterable" | "query" | "defaultQuery" | "onQueryChange">;
|
|
69
69
|
};
|