@viraui/react 1.0.15 → 1.0.16
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/dist/catalog.json +6 -0
- package/dist/components/autocomplete/autocomplete-group.d.ts +12 -0
- package/dist/components/autocomplete/autocomplete-group.js +34 -0
- package/dist/components/autocomplete/autocomplete-item.d.ts +23 -0
- package/dist/components/autocomplete/autocomplete-item.js +37 -0
- package/dist/components/autocomplete/autocomplete.css +1 -0
- package/dist/components/autocomplete/autocomplete.d.ts +96 -0
- package/dist/components/autocomplete/autocomplete.guide.json +95 -0
- package/dist/components/autocomplete/autocomplete.js +126 -0
- package/dist/components/autocomplete/autocomplete.module.js +31 -0
- package/dist/components/autocomplete/index.d.ts +2 -0
- package/dist/components/avatar/avatar.css +1 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar-group/avatar-group.js +2 -2
- package/dist/components/basic-input/basic-input.js +1 -1
- package/dist/components/basic-input/field-label.css +1 -1
- package/dist/components/basic-input/field-label.js +1 -2
- package/dist/components/button/button-chrome.js +4 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/menu/menu-checkbox-item.d.ts +0 -13
- package/dist/components/menu/menu-checkbox-item.js +2 -7
- package/dist/components/menu/menu-group.js +4 -7
- package/dist/components/menu/menu-indicator-slot.d.ts +3 -7
- package/dist/components/menu/menu-indicator-slot.js +15 -21
- package/dist/components/menu/menu-item-row.d.ts +2 -4
- package/dist/components/menu/menu-item-row.js +15 -17
- package/dist/components/menu/menu-item.d.ts +1 -9
- package/dist/components/menu/menu-item.js +1 -4
- package/dist/components/menu/menu-link-item.d.ts +2 -10
- package/dist/components/menu/menu-link-item.js +4 -6
- package/dist/components/menu/menu-popup.d.ts +2 -1
- package/dist/components/menu/menu-radio-group.js +4 -7
- package/dist/components/menu/menu-radio-item.d.ts +0 -13
- package/dist/components/menu/menu-radio-item.js +2 -7
- package/dist/components/menu/menu-submenu-trigger.d.ts +0 -7
- package/dist/components/menu/menu-submenu-trigger.js +2 -7
- package/dist/components/menu/menu.css +1 -1
- package/dist/components/menu/menu.guide.json +14 -29
- package/dist/components/menu/menu.module.js +3 -3
- package/dist/components/select/select-group.js +1 -3
- package/dist/components/select/select.css +1 -1
- package/dist/components/select/select.guide.json +3 -2
- package/dist/components/select/select.js +1 -1
- package/dist/components/select/select.module.js +1 -3
- package/dist/components/spinner/index.d.ts +1 -1
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/spinner/spinner.d.ts +8 -0
- package/dist/components/spinner/spinner.guide.json +3 -0
- package/dist/components/spinner/spinner.js +22 -20
- package/dist/components/spinner/spinner.module.js +2 -7
- package/dist/components/spinner/variants/bars.d.ts +2 -0
- package/dist/components/spinner/variants/bars.js +134 -0
- package/dist/components/spinner/variants/dot-grid.css +1 -0
- package/dist/components/spinner/variants/dot-grid.d.ts +2 -0
- package/dist/components/spinner/variants/dot-grid.js +57 -0
- package/dist/components/spinner/variants/dot-grid.module.js +16 -0
- package/dist/components/spinner/variants/dots.d.ts +2 -0
- package/dist/components/spinner/variants/dots.js +189 -0
- package/dist/components/spinner/variants/index.d.ts +5 -0
- package/dist/components/spinner/variants/index.js +16 -0
- package/dist/components/tabs/tabs-tab.js +1 -1
- package/dist/components/textfield/textfield.guide.json +1 -1
- package/dist/components/toast/toast-banner.js +1 -1
- package/dist/components/typewriter/typewriter.js +3 -3
- package/dist/index.js +4 -3
- package/package.json +4 -4
package/dist/catalog.json
CHANGED
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
"summary": "Decorative arrow and handwritten label that wraps inline content with optional highlighter mark, positioned via CSS anchor positioning.",
|
|
15
15
|
"guidePath": "./components/annotate/annotate.guide.json"
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
"id": "autocomplete",
|
|
19
|
+
"name": "Autocomplete",
|
|
20
|
+
"summary": "Field-wrapped free-form suggest input with Textfield chrome and Select-like popup list.",
|
|
21
|
+
"guidePath": "./components/autocomplete/autocomplete.guide.json"
|
|
22
|
+
},
|
|
17
23
|
{
|
|
18
24
|
"id": "avatar",
|
|
19
25
|
"name": "Avatar",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AutocompleteGroupProps as PrimitiveAutocompleteGroupProps } from '@base-ui/react/autocomplete';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Public Autocomplete.Group props.
|
|
5
|
+
*/
|
|
6
|
+
export type AutocompleteGroupProps = PrimitiveAutocompleteGroupProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Accessible group label rendered with `Autocomplete.GroupLabel`.
|
|
9
|
+
*/
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export declare const AutocompleteGroup: React.FC<AutocompleteGroupProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Text } from "../text/text.js";
|
|
3
|
+
import { Stack } from "../stack/stack.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
6
|
+
//#region src/components/autocomplete/autocomplete-group.tsx
|
|
7
|
+
var AutocompleteGroup = ({ children, className, label, ...otherProps }) => /* @__PURE__ */ jsxs(Autocomplete.Group, {
|
|
8
|
+
...otherProps,
|
|
9
|
+
className,
|
|
10
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
11
|
+
direction: "column",
|
|
12
|
+
fillChildren: false,
|
|
13
|
+
rowGap: "2x-small",
|
|
14
|
+
vPadding: "2x-small"
|
|
15
|
+
}),
|
|
16
|
+
children: [/* @__PURE__ */ jsx(Autocomplete.GroupLabel, {
|
|
17
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
18
|
+
columnGap: "small",
|
|
19
|
+
direction: "row",
|
|
20
|
+
fillChildren: false,
|
|
21
|
+
hPadding: "small",
|
|
22
|
+
vAlign: "center",
|
|
23
|
+
vPadding: ["small", "x-small"]
|
|
24
|
+
}),
|
|
25
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
26
|
+
size: "x-small",
|
|
27
|
+
tone: "muted",
|
|
28
|
+
weight: "semibold",
|
|
29
|
+
children: label
|
|
30
|
+
})
|
|
31
|
+
}), children]
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
export { AutocompleteGroup };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AutocompleteItem } from '@base-ui/react/autocomplete';
|
|
2
|
+
import { StackProps } from '..';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Public Autocomplete.Item props.
|
|
6
|
+
*
|
|
7
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
8
|
+
*/
|
|
9
|
+
export type AutocompleteItemProps = AutocompleteItem.Props & {
|
|
10
|
+
/**
|
|
11
|
+
* Decorative leading node rendered before the item label.
|
|
12
|
+
*
|
|
13
|
+
* @default No addon is rendered.
|
|
14
|
+
*/
|
|
15
|
+
addon?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Vertical alignment of the addon relative to the item label row.
|
|
18
|
+
*
|
|
19
|
+
* @default 'center'
|
|
20
|
+
*/
|
|
21
|
+
addonAlign?: StackProps['vAlign'];
|
|
22
|
+
};
|
|
23
|
+
export declare const AutocompleteItemPart: React.FC<AutocompleteItemProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx } from "../../core/clsx.js";
|
|
3
|
+
import { Text } from "../text/text.js";
|
|
4
|
+
import { Stack } from "../stack/stack.js";
|
|
5
|
+
import autocomplete_module_default from "./autocomplete.module.js";
|
|
6
|
+
import { Surface } from "../surface/surface.js";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
9
|
+
//#region src/components/autocomplete/autocomplete-item.tsx
|
|
10
|
+
var AutocompleteItemPart = ({ addon, addonAlign = "center", children, className, ...otherProps }) => /* @__PURE__ */ jsx(Autocomplete.Item, {
|
|
11
|
+
...otherProps,
|
|
12
|
+
className: clsx(autocomplete_module_default.Item, className),
|
|
13
|
+
render: /* @__PURE__ */ jsx(Surface, { radius: "auto" }),
|
|
14
|
+
children: /* @__PURE__ */ jsxs(Stack, {
|
|
15
|
+
className: autocomplete_module_default.ItemRow,
|
|
16
|
+
columnGap: "small",
|
|
17
|
+
direction: "row",
|
|
18
|
+
fillChildren: false,
|
|
19
|
+
hPadding: "small",
|
|
20
|
+
vAlign: addonAlign,
|
|
21
|
+
vPadding: "small",
|
|
22
|
+
children: [addon && /* @__PURE__ */ jsx(Stack, {
|
|
23
|
+
"aria-hidden": "true",
|
|
24
|
+
"data-grow": "false",
|
|
25
|
+
"data-shrink": "false",
|
|
26
|
+
children: addon
|
|
27
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
28
|
+
"data-grow": "true",
|
|
29
|
+
"data-shrink": "true",
|
|
30
|
+
lineHeight: "small",
|
|
31
|
+
size: "small",
|
|
32
|
+
children
|
|
33
|
+
})]
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { AutocompleteItemPart };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-autocomplete-input-height{syntax:"<length>";inherits:true;initial-value:0}@property --vui-autocomplete-control-group-background{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-autocomplete-control-group-color{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-autocomplete-control-group-border-color{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-autocomplete-control-group-border-radius{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --vui-autocomplete-list-border-radius{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --vui-autocomplete-list-padding{syntax:"<length>";inherits:true;initial-value:0}@property --__autocomplete-list-appear-offset{syntax:"<length>";inherits:false;initial-value:8px}.viraui__autocomplete-module__Autocomplete_WfXkD{--vui-autocomplete-input-height:var(--space-x-large);--vui-autocomplete-control-group-background:var(--base-1);--vui-autocomplete-control-group-color:var(--global-foreground);--vui-autocomplete-control-group-border-color:var(--global-contrast);--vui-autocomplete-control-group-border-radius:var(--radius-medium);--vui-field-label-padding-inline:calc(var(--vui-autocomplete-control-group-border-radius) / 2);inline-size:100%;&:has([required]) .viraui__autocomplete-module__Label_aOSjz:after{content:" *";color:var(--highlight-red)}}.viraui__autocomplete-module__ControlGroup_AUq7O{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--vui-autocomplete-input-height);background:var(--vui-autocomplete-control-group-background);color:var(--vui-autocomplete-control-group-color);border:1px solid var(--vui-autocomplete-control-group-border-color);border-radius:var(--vui-autocomplete-control-group-border-radius);&:has(.viraui__autocomplete-module__CustomBasicInput_k7dx4:focus-visible),&:has(.viraui__autocomplete-module__CustomBasicInput_k7dx4[data-focused]){outline:var(--outline);outline-offset:var(--outline-offset)}&:has(.viraui__autocomplete-module__CustomBasicInput_k7dx4[data-invalid]){--vui-autocomplete-control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}&:has(.viraui__autocomplete-module__CustomBasicInput_k7dx4:disabled),&:has(.viraui__autocomplete-module__CustomBasicInput_k7dx4[data-disabled]){--vui-autocomplete-control-group-background:var(--global-disabled-background);--vui-autocomplete-control-group-border-color:#0000;--vui-autocomplete-control-group-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}&:has(.viraui__autocomplete-module__Addon_6ajrr[data-position=start])>.viraui__autocomplete-module__CustomBasicInput_k7dx4{padding-inline-start:var(--space-x-small)}&:has(.viraui__autocomplete-module__Addon_6ajrr[data-position=end])>.viraui__autocomplete-module__CustomBasicInput_k7dx4{padding-inline-end:var(--space-x-small)}}.viraui__autocomplete-module__Addon_6ajrr{min-inline-size:var(--space-x-large)}.viraui__autocomplete-module__Description_cr8U6{padding-inline:calc(var(--vui-autocomplete-control-group-border-radius) / 2)}.viraui__autocomplete-module__AutocompletePopup_nF49j{--vui-autocomplete-list-border-radius:var(--radius-medium);--vui-autocomplete-list-padding:var(--space-x-small);box-sizing:border-box;min-inline-size:var(--anchor-width);overflow:visible;color:var(--global-foreground);outline:none;position:relative;transform-origin:var(--transform-origin);transition:opacity var(--duration-instant) var(--easing-entrance),scale var(--duration-instant) var(--easing-entrance),translate var(--duration-instant) var(--easing-entrance);&[data-ending-style],&[data-starting-style]{opacity:0;scale:.96}&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{translate:0 calc(var(--__autocomplete-list-appear-offset) * -1)}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{translate:0 var(--__autocomplete-list-appear-offset)}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style],&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{translate:var(--__autocomplete-list-appear-offset) 0}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style],&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{translate:calc(var(--__autocomplete-list-appear-offset) * -1) 0}}.viraui__autocomplete-module__PopupChrome_573fy{box-sizing:border-box;max-block-size:var(--available-height);overscroll-behavior:contain}.viraui__autocomplete-module__List_Tl5j1{box-sizing:border-box;inline-size:100%;scroll-padding-block:var(--vui-autocomplete-list-padding);&:focus,&:focus-visible{outline:none}}.viraui__autocomplete-module__Empty_Xa34u:not(:empty),.viraui__autocomplete-module__Status_XLDvE:not(:empty){padding-inline:var(--space-small);padding-block:var(--space-small)}.viraui__autocomplete-module__ItemRow_ab22I{min-block-size:var(--space-x-large)}}@layer viraui.overrides{.viraui__autocomplete-module__CustomBasicInput_k7dx4{flex:1 1 auto;block-size:100%;line-height:1.2;background:#0000;box-shadow:none;border-radius:inherit;&:focus-visible{outline:none}}.viraui__autocomplete-module__Item_TmEz2{cursor:pointer;&:focus{outline:none}&:focus-visible{outline:none;box-shadow:none}&:not([data-disabled]):hover,&:not([data-disabled])[data-highlighted]{background:var(--global-contrast);@container root not style(--vibrancy-enable: initial){background:oklab(from var(--global-contrast) l a b/12%)}}&[data-disabled]{color:var(--global-disabled-foreground);cursor:not-allowed}}}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { FieldRoot } from '@base-ui/react/field';
|
|
2
|
+
import { AutocompleteRoot, Autocomplete as PrimitiveAutocomplete } from '@base-ui/react/autocomplete';
|
|
3
|
+
import { BasicInputProps } from '../basic-input';
|
|
4
|
+
import { AutocompleteGroup } from './autocomplete-group';
|
|
5
|
+
import { AutocompleteItemPart } from './autocomplete-item';
|
|
6
|
+
import type * as React from 'react';
|
|
7
|
+
/**
|
|
8
|
+
* Public Autocomplete props.
|
|
9
|
+
*
|
|
10
|
+
* Includes Base UI autocomplete root props such as `value`, `defaultValue`, `items`,
|
|
11
|
+
* `mode`, `filter`, `limit`, and `autoHighlight`, plus optional field copy and Textfield
|
|
12
|
+
* control-group chrome (`startAddon` / `endAddon` / `fitContent`).
|
|
13
|
+
*
|
|
14
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
15
|
+
*/
|
|
16
|
+
export type AutocompleteProps = Omit<AutocompleteRoot.Props<any>, 'children'> & Omit<FieldRoot.Props, 'ref' | 'children'> & {
|
|
17
|
+
/**
|
|
18
|
+
* Visible label rendered with shared internal `FieldLabel`.
|
|
19
|
+
*
|
|
20
|
+
* @default No label is rendered.
|
|
21
|
+
*/
|
|
22
|
+
label?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Helper copy rendered with `Field.Description` and `Text` while the field is valid.
|
|
25
|
+
*
|
|
26
|
+
* @default No description is rendered.
|
|
27
|
+
*/
|
|
28
|
+
description?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Error copy rendered with `Field.Error` and `Text` in the same slot as `description`.
|
|
31
|
+
* Replaces description while the field is invalid.
|
|
32
|
+
*
|
|
33
|
+
* @default No static error copy is rendered.
|
|
34
|
+
*/
|
|
35
|
+
error?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Leading decoration (prefix text, icon). Not a second field control.
|
|
38
|
+
*
|
|
39
|
+
* @default No start addon is rendered.
|
|
40
|
+
*/
|
|
41
|
+
startAddon?: React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Trailing decoration (icon, button). Buttons must use `type="button"`.
|
|
44
|
+
*
|
|
45
|
+
* @default No end addon is rendered.
|
|
46
|
+
*/
|
|
47
|
+
endAddon?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* When `true`, sets `field-sizing: content` so the control grows inline with its value.
|
|
50
|
+
* Block chrome stays `var(--vui-autocomplete-input-height)`. Omitted / `false` keeps the browser fixed default.
|
|
51
|
+
*
|
|
52
|
+
* @default undefined (browser fixed)
|
|
53
|
+
*/
|
|
54
|
+
fitContent?: BasicInputProps['fitContent'];
|
|
55
|
+
/**
|
|
56
|
+
* Placeholder text shown in the input when empty.
|
|
57
|
+
*
|
|
58
|
+
* @default No placeholder is rendered.
|
|
59
|
+
*/
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Content rendered inside baked `Autocomplete.Empty` when the filtered list has no items.
|
|
63
|
+
*
|
|
64
|
+
* @default No empty copy is rendered.
|
|
65
|
+
*/
|
|
66
|
+
empty?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* Content rendered inside baked `Autocomplete.Status` (async / limit messaging).
|
|
69
|
+
* Keep the slot mounted; update children when status changes.
|
|
70
|
+
*
|
|
71
|
+
* @default No status copy is rendered.
|
|
72
|
+
*/
|
|
73
|
+
status?: React.ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* Ref forwarded to the autocomplete input.
|
|
76
|
+
*
|
|
77
|
+
* @default No ref is attached.
|
|
78
|
+
*/
|
|
79
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
80
|
+
/**
|
|
81
|
+
* List content: static nodes (`Item` / `Group` / `Collection`) or a Base UI list render function.
|
|
82
|
+
*/
|
|
83
|
+
children?: React.ReactNode | ((item: any, index: number) => React.ReactNode);
|
|
84
|
+
};
|
|
85
|
+
declare function AutocompleteRootComponent({ children, className, description, dirty, disabled, empty, endAddon, error, fitContent, invalid, label, name, placeholder, ref, startAddon, status, touched, validate, validationDebounceTime, validationMode, ...autocompleteRootProps }: AutocompleteProps): React.JSX.Element;
|
|
86
|
+
declare const AutocompleteCollection: typeof PrimitiveAutocomplete.Collection;
|
|
87
|
+
type AutocompleteComponent = typeof AutocompleteRootComponent & {
|
|
88
|
+
Item: typeof AutocompleteItemPart;
|
|
89
|
+
Group: typeof AutocompleteGroup;
|
|
90
|
+
Collection: typeof AutocompleteCollection;
|
|
91
|
+
useFilter: typeof PrimitiveAutocomplete.useFilter;
|
|
92
|
+
useFilteredItems: typeof PrimitiveAutocomplete.useFilteredItems;
|
|
93
|
+
};
|
|
94
|
+
export declare const Autocomplete: AutocompleteComponent;
|
|
95
|
+
export type { AutocompleteGroupProps } from './autocomplete-group';
|
|
96
|
+
export type { AutocompleteItemProps } from './autocomplete-item';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Autocomplete",
|
|
3
|
+
"structure": "<Autocomplete>\n <Autocomplete.Item value=\"…\">…</Autocomplete.Item>\n <Autocomplete.Group label=\"…\" items={[…]}>\n <Autocomplete.Collection>\n {(item) => <Autocomplete.Item value={item}>…</Autocomplete.Item>}\n </Autocomplete.Collection>\n </Autocomplete.Group>\n</Autocomplete>",
|
|
4
|
+
"summary": "Field-wrapped free-form suggest input with Textfield chrome and Select-like popup list.",
|
|
5
|
+
"whenToUse": [
|
|
6
|
+
"Suggest options while allowing free-form text in the input",
|
|
7
|
+
"Filterable tag, movie, or docs search with optional empty and status copy",
|
|
8
|
+
"Grouped suggestion lists via Autocomplete.Group and Collection",
|
|
9
|
+
"Async or limited result lists that need polite status announcements"
|
|
10
|
+
],
|
|
11
|
+
"whenNotToUse": [
|
|
12
|
+
"Remembered selection from a closed list — use Select (or Combobox when available)",
|
|
13
|
+
"Command palette, grid picker, or virtualized lists — separate surfaces on Base UI Autocomplete",
|
|
14
|
+
"Wrapping a lone Autocomplete in Fieldset when its own label is sufficient"
|
|
15
|
+
],
|
|
16
|
+
"accessibility": [
|
|
17
|
+
"Provide label or aria-label so the input has an accessible name",
|
|
18
|
+
"Wire description and error copy through the field pattern so assistive tech gets helper text",
|
|
19
|
+
"Keep empty and status slots mounted; update their children when messaging changes"
|
|
20
|
+
],
|
|
21
|
+
"antiPatterns": [
|
|
22
|
+
"Expecting Select-like closed selection state",
|
|
23
|
+
"Leaving the input without label or aria-label",
|
|
24
|
+
"Conditionally unmounting Empty or Status instead of updating their children"
|
|
25
|
+
],
|
|
26
|
+
"related": ["Textfield", "Select", "Fieldset", "Stack", "Surface", "Spinner"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"react": {
|
|
29
|
+
"description": {
|
|
30
|
+
"description": "Helper copy rendered with `Field.Description` and `Text` while the field is valid."
|
|
31
|
+
},
|
|
32
|
+
"empty": {
|
|
33
|
+
"description": "Content rendered inside baked `Autocomplete.Empty` when the filtered list has no items."
|
|
34
|
+
},
|
|
35
|
+
"endAddon": {
|
|
36
|
+
"description": "Trailing decoration (icon, button). Buttons must use `type=\"button\"`."
|
|
37
|
+
},
|
|
38
|
+
"error": {
|
|
39
|
+
"description": "Error copy rendered with `Field.Error` and `Text` in the same slot as `description`. Replaces description while the field is invalid."
|
|
40
|
+
},
|
|
41
|
+
"fitContent": {
|
|
42
|
+
"description": "When `true`, sets `field-sizing: content` so the control grows inline with its value. Block chrome stays `var(--vui-autocomplete-input-height)`. Omitted / `false` keeps the browser fixed default.",
|
|
43
|
+
"refCss": "input-height"
|
|
44
|
+
},
|
|
45
|
+
"Group.label": {
|
|
46
|
+
"description": "Accessible group label rendered with `Autocomplete.GroupLabel`."
|
|
47
|
+
},
|
|
48
|
+
"Item.addon": {
|
|
49
|
+
"description": "Decorative leading node rendered before the item label."
|
|
50
|
+
},
|
|
51
|
+
"Item.addonAlign": {
|
|
52
|
+
"description": "Vertical alignment of the addon relative to the item label row."
|
|
53
|
+
},
|
|
54
|
+
"label": {
|
|
55
|
+
"description": "Visible label rendered with shared internal `FieldLabel`."
|
|
56
|
+
},
|
|
57
|
+
"placeholder": {
|
|
58
|
+
"description": "Placeholder text shown in the input when empty."
|
|
59
|
+
},
|
|
60
|
+
"ref": {
|
|
61
|
+
"description": "Ref forwarded to the autocomplete input."
|
|
62
|
+
},
|
|
63
|
+
"startAddon": {
|
|
64
|
+
"description": "Leading decoration (prefix text, icon). Not a second field control."
|
|
65
|
+
},
|
|
66
|
+
"status": {
|
|
67
|
+
"description": "Content rendered inside baked `Autocomplete.Status` (async / limit messaging). Keep the slot mounted; update children when status changes."
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"css": {
|
|
71
|
+
"control-group-background": {
|
|
72
|
+
"description": "Autocomplete control group background."
|
|
73
|
+
},
|
|
74
|
+
"control-group-border-color": {
|
|
75
|
+
"description": "Autocomplete control group border color; invalid state overrides."
|
|
76
|
+
},
|
|
77
|
+
"control-group-border-radius": {
|
|
78
|
+
"description": "Autocomplete control group corner radius."
|
|
79
|
+
},
|
|
80
|
+
"control-group-color": {
|
|
81
|
+
"description": "Autocomplete control group foreground color."
|
|
82
|
+
},
|
|
83
|
+
"input-height": {
|
|
84
|
+
"description": "Autocomplete control group block size.",
|
|
85
|
+
"refReact": "fitContent"
|
|
86
|
+
},
|
|
87
|
+
"list-border-radius": {
|
|
88
|
+
"description": "Popup list border radius custom property on the popup root."
|
|
89
|
+
},
|
|
90
|
+
"list-padding": {
|
|
91
|
+
"description": "Popup list padding custom property used for scroll padding."
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import './autocomplete.css';
|
|
3
|
+
import { clsx } from "../../core/clsx.js";
|
|
4
|
+
import basic_input_module_default from "../basic-input/basic-input.module.js";
|
|
5
|
+
import { Text } from "../text/text.js";
|
|
6
|
+
import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
|
|
7
|
+
import { FieldLabel } from "../basic-input/field-label.js";
|
|
8
|
+
import { InputControlGroup } from "../basic-input/input-control-group.js";
|
|
9
|
+
import { Stack } from "../stack/stack.js";
|
|
10
|
+
import { AutocompleteGroup } from "./autocomplete-group.js";
|
|
11
|
+
import autocomplete_module_default from "./autocomplete.module.js";
|
|
12
|
+
import { AutocompleteItemPart } from "./autocomplete-item.js";
|
|
13
|
+
import { Elevator } from "../elevator/elevator.js";
|
|
14
|
+
import { Surface } from "../surface/surface.js";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { Field } from "@base-ui/react/field";
|
|
17
|
+
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
18
|
+
import { useId } from "react";
|
|
19
|
+
//#region src/components/autocomplete/autocomplete.tsx
|
|
20
|
+
var AutocompletePrimitiveRoot = Autocomplete.Root;
|
|
21
|
+
function AutocompleteRootComponent({ children, className, description, dirty, disabled, empty, endAddon, error, fitContent, invalid, label, name, placeholder, ref, startAddon, status, touched, validate, validationDebounceTime, validationMode, ...autocompleteRootProps }) {
|
|
22
|
+
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...restAutocompleteProps } = autocompleteRootProps;
|
|
23
|
+
const fieldLabelId = useId();
|
|
24
|
+
const listAccessibleNameProps = {};
|
|
25
|
+
if (ariaLabel !== void 0) listAccessibleNameProps["aria-label"] = ariaLabel;
|
|
26
|
+
else if (ariaLabelledBy !== void 0) listAccessibleNameProps["aria-labelledby"] = ariaLabelledBy;
|
|
27
|
+
else if (label !== void 0) listAccessibleNameProps["aria-labelledby"] = fieldLabelId;
|
|
28
|
+
return /* @__PURE__ */ jsxs(Field.Root, {
|
|
29
|
+
className: clsx(autocomplete_module_default.Autocomplete, className),
|
|
30
|
+
dirty,
|
|
31
|
+
disabled,
|
|
32
|
+
invalid,
|
|
33
|
+
name,
|
|
34
|
+
touched,
|
|
35
|
+
validate,
|
|
36
|
+
validationDebounceTime,
|
|
37
|
+
validationMode,
|
|
38
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
39
|
+
direction: "column",
|
|
40
|
+
rowGap: "small"
|
|
41
|
+
}),
|
|
42
|
+
children: [
|
|
43
|
+
label && /* @__PURE__ */ jsx(Field.Label, {
|
|
44
|
+
className: autocomplete_module_default.Label,
|
|
45
|
+
id: fieldLabelId,
|
|
46
|
+
children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsxs(AutocompletePrimitiveRoot, {
|
|
49
|
+
...restAutocompleteProps,
|
|
50
|
+
disabled,
|
|
51
|
+
name,
|
|
52
|
+
children: [/* @__PURE__ */ jsx(InputControlGroup, {
|
|
53
|
+
addonClassName: autocomplete_module_default.Addon,
|
|
54
|
+
controlGroupClassName: autocomplete_module_default.ControlGroup,
|
|
55
|
+
endAddon,
|
|
56
|
+
startAddon,
|
|
57
|
+
children: /* @__PURE__ */ jsx(Autocomplete.Input, {
|
|
58
|
+
"aria-label": ariaLabel,
|
|
59
|
+
"aria-labelledby": ariaLabelledBy,
|
|
60
|
+
className: clsx(basic_input_module_default.BasicInput, autocomplete_module_default.CustomBasicInput),
|
|
61
|
+
disabled,
|
|
62
|
+
placeholder,
|
|
63
|
+
ref,
|
|
64
|
+
...fitContent && { "data-sizing": "content" }
|
|
65
|
+
})
|
|
66
|
+
}), /* @__PURE__ */ jsx(Autocomplete.Portal, { children: /* @__PURE__ */ jsx(Autocomplete.Positioner, {
|
|
67
|
+
sideOffset: 2,
|
|
68
|
+
children: /* @__PURE__ */ jsx(Autocomplete.Popup, {
|
|
69
|
+
className: autocomplete_module_default.AutocompletePopup,
|
|
70
|
+
children: /* @__PURE__ */ jsx(Elevator, {
|
|
71
|
+
resting: 1,
|
|
72
|
+
children: /* @__PURE__ */ jsxs(Surface, {
|
|
73
|
+
border: "all",
|
|
74
|
+
className: autocomplete_module_default.PopupChrome,
|
|
75
|
+
color: 1,
|
|
76
|
+
"data-vibrant": "",
|
|
77
|
+
hPadding: "x-small",
|
|
78
|
+
overflow: "auto",
|
|
79
|
+
radius: "medium",
|
|
80
|
+
vPadding: "x-small",
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsx(Autocomplete.Status, {
|
|
83
|
+
className: autocomplete_module_default.Status,
|
|
84
|
+
children: typeof status === "string" ? /* @__PURE__ */ jsx(Text, {
|
|
85
|
+
size: "x-small",
|
|
86
|
+
tone: "muted",
|
|
87
|
+
children: status
|
|
88
|
+
}) : status
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx(Autocomplete.Empty, {
|
|
91
|
+
className: autocomplete_module_default.Empty,
|
|
92
|
+
children: typeof empty === "string" ? /* @__PURE__ */ jsx(Text, {
|
|
93
|
+
size: "small",
|
|
94
|
+
tone: "muted",
|
|
95
|
+
children: empty
|
|
96
|
+
}) : empty
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx(Autocomplete.List, {
|
|
99
|
+
...listAccessibleNameProps,
|
|
100
|
+
className: autocomplete_module_default.List,
|
|
101
|
+
children
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
}) })]
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ jsx(FieldHelperCopy, {
|
|
110
|
+
className: autocomplete_module_default.Description,
|
|
111
|
+
description,
|
|
112
|
+
error
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
var AutocompleteCollection = Autocomplete.Collection;
|
|
118
|
+
var Autocomplete$1 = Object.assign(AutocompleteRootComponent, {
|
|
119
|
+
Item: AutocompleteItemPart,
|
|
120
|
+
Group: AutocompleteGroup,
|
|
121
|
+
Collection: AutocompleteCollection,
|
|
122
|
+
useFilter: Autocomplete.useFilter,
|
|
123
|
+
useFilteredItems: Autocomplete.useFilteredItems
|
|
124
|
+
});
|
|
125
|
+
//#endregion
|
|
126
|
+
export { Autocomplete$1 as Autocomplete };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/components/autocomplete/autocomplete.module.css
|
|
2
|
+
var Autocomplete = "viraui__autocomplete-module__Autocomplete_WfXkD";
|
|
3
|
+
var Label = "viraui__autocomplete-module__Label_aOSjz";
|
|
4
|
+
var ControlGroup = "viraui__autocomplete-module__ControlGroup_AUq7O";
|
|
5
|
+
var CustomBasicInput = "viraui__autocomplete-module__CustomBasicInput_k7dx4";
|
|
6
|
+
var Addon = "viraui__autocomplete-module__Addon_6ajrr";
|
|
7
|
+
var Description = "viraui__autocomplete-module__Description_cr8U6";
|
|
8
|
+
var AutocompletePopup = "viraui__autocomplete-module__AutocompletePopup_nF49j";
|
|
9
|
+
var PopupChrome = "viraui__autocomplete-module__PopupChrome_573fy";
|
|
10
|
+
var List = "viraui__autocomplete-module__List_Tl5j1";
|
|
11
|
+
var Empty = "viraui__autocomplete-module__Empty_Xa34u";
|
|
12
|
+
var Status = "viraui__autocomplete-module__Status_XLDvE";
|
|
13
|
+
var ItemRow = "viraui__autocomplete-module__ItemRow_ab22I";
|
|
14
|
+
var Item = "viraui__autocomplete-module__Item_TmEz2";
|
|
15
|
+
var autocomplete_module_default = {
|
|
16
|
+
Autocomplete,
|
|
17
|
+
Label,
|
|
18
|
+
ControlGroup,
|
|
19
|
+
CustomBasicInput,
|
|
20
|
+
Addon,
|
|
21
|
+
Description,
|
|
22
|
+
AutocompletePopup,
|
|
23
|
+
PopupChrome,
|
|
24
|
+
List,
|
|
25
|
+
Empty,
|
|
26
|
+
Status,
|
|
27
|
+
ItemRow,
|
|
28
|
+
Item
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Addon, Autocomplete, AutocompletePopup, ControlGroup, CustomBasicInput, Description, Empty, Item, ItemRow, Label, List, PopupChrome, Status, autocomplete_module_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-avatar-size{syntax:"<length>";inherits:false;initial-value:0}@property --vui-avatar-radius{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --vui-avatar-background{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-avatar-foreground{syntax:"<color>";inherits:false;initial-value:#0000}.viraui__avatar-module__Avatar_BRuS3{--vui-avatar-size:var(--space-2x-large);--vui-avatar-background:var(--global-contrast);--vui-avatar-foreground:var(--global-foreground);--vui-avatar-radius:var(--radius-
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-avatar-size{syntax:"<length>";inherits:false;initial-value:0}@property --vui-avatar-radius{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --vui-avatar-background{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-avatar-foreground{syntax:"<color>";inherits:false;initial-value:#0000}.viraui__avatar-module__Avatar_BRuS3{--vui-avatar-size:var(--space-2x-large);--vui-avatar-background:var(--global-contrast);--vui-avatar-foreground:var(--global-foreground);--vui-avatar-radius:var(--radius-small);display:inline-flex;align-items:center;justify-content:center;inline-size:var(--vui-avatar-size);block-size:var(--vui-avatar-size);min-inline-size:var(--vui-avatar-size);min-block-size:var(--vui-avatar-size);overflow:hidden;border-radius:var(--vui-avatar-radius);background:var(--vui-avatar-background);color:var(--vui-avatar-foreground);vertical-align:middle;-webkit-user-select:none;user-select:none;container-type:inline-size;&[data-size=x-small]{--vui-avatar-size:var(--space-large);--vui-avatar-radius:var(--radius-small)}&[data-size=regular]{--vui-avatar-size:var(--space-wide)}&[data-size=big]{--vui-avatar-size:var(--space-2x-wide);--vui-avatar-radius:var(--radius-large)}}.viraui__avatar-module__Image_Q7bHi{inline-size:100%;block-size:100%;display:block;object-fit:cover}}@layer viraui.overrides{.viraui__avatar-module__AvatarSkeleton_AnE8Q{border-radius:inherit}.viraui__avatar-module__Label_QASTF{font-size:30cqw}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './avatar.css';
|
|
2
2
|
import { clsx } from "../../core/clsx.js";
|
|
3
|
-
import avatar_module_default from "./avatar.module.js";
|
|
4
3
|
import { Text } from "../text/text.js";
|
|
4
|
+
import avatar_module_default from "./avatar.module.js";
|
|
5
5
|
import { Skeleton } from "../skeleton/skeleton.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Avatar } from "@base-ui/react/avatar";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './avatar-group.css';
|
|
2
2
|
import { clsx } from "../../core/clsx.js";
|
|
3
|
-
import { Avatar } from "../avatar/avatar.js";
|
|
4
|
-
import avatar_group_module_default from "./avatar-group.module.js";
|
|
5
3
|
import { Text } from "../text/text.js";
|
|
6
4
|
import { Stack } from "../stack/stack.js";
|
|
5
|
+
import { Avatar } from "../avatar/avatar.js";
|
|
6
|
+
import avatar_group_module_default from "./avatar-group.module.js";
|
|
7
7
|
import { Surface } from "../surface/surface.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/avatar-group/avatar-group.tsx
|
|
@@ -2,9 +2,9 @@ import './basic-input.css';
|
|
|
2
2
|
import { clsx } from "../../core/clsx.js";
|
|
3
3
|
import basic_input_module_default from "./basic-input.module.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Field } from "@base-ui/react/field";
|
|
7
6
|
import { Input } from "@base-ui/react/input";
|
|
7
|
+
import * as React from "react";
|
|
8
8
|
//#region src/components/basic-input/basic-input.tsx
|
|
9
9
|
function usesInputPrimitiveRender(render) {
|
|
10
10
|
return React.isValidElement(render) && render.type === Input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-basic-input-background{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-basic-input-border-radius{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-basic-input-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-basic-input-font-size{syntax:"<length>";inherits:false;initial-value:1rem}@property --vui-basic-input-padding-inline{syntax:"<length>";inherits:false;initial-value:0}@property --vui-basic-input-placeholder-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-field-label-padding-inline{syntax:"<length>";inherits:true;initial-value:0}}@layer viraui.overrides{.viraui__field-label-module__FieldLabel_R9SYf{padding-inline:var(--vui-field-label-padding-inline)}}
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-basic-input-background{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-basic-input-border-radius{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-basic-input-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-basic-input-font-size{syntax:"<length>";inherits:false;initial-value:1rem}@property --vui-basic-input-padding-inline{syntax:"<length>";inherits:false;initial-value:0}@property --vui-basic-input-placeholder-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-field-label-padding-inline{syntax:"<length>";inherits:true;initial-value:0}}@layer viraui.overrides{.viraui__field-label-module__FieldLabel_R9SYf{padding-inline-start:var(--vui-field-label-padding-inline)}}
|
|
@@ -2,7 +2,6 @@ import './field-label.css';
|
|
|
2
2
|
import { clsx } from "../../core/clsx.js";
|
|
3
3
|
import { Text } from "../text/text.js";
|
|
4
4
|
import field_label_module_default from "./field-label.module.js";
|
|
5
|
-
import { Stack } from "../stack/stack.js";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
//#region src/components/basic-input/field-label.tsx
|
|
8
7
|
/**
|
|
@@ -17,7 +16,7 @@ var FieldLabel = ({ children, className, size = "small", ...textProps }) => /* @
|
|
|
17
16
|
lineHeight: "small",
|
|
18
17
|
selection: false,
|
|
19
18
|
size,
|
|
20
|
-
render: /* @__PURE__ */ jsx(
|
|
19
|
+
render: /* @__PURE__ */ jsx("span", {}),
|
|
21
20
|
weight: "semibold",
|
|
22
21
|
...textProps,
|
|
23
22
|
children
|
|
@@ -39,7 +39,10 @@ var ButtonChromeChildren = ({ addon, children, isIconOnly, loading, size }) => /
|
|
|
39
39
|
})] }), loading && /* @__PURE__ */ jsx("span", {
|
|
40
40
|
"aria-hidden": "true",
|
|
41
41
|
className: button_module_default.SpinnerOverlay,
|
|
42
|
-
children: /* @__PURE__ */ jsx(Spinner, {
|
|
42
|
+
children: /* @__PURE__ */ jsx(Spinner, {
|
|
43
|
+
variant: "dots",
|
|
44
|
+
size: spinnerDimensionsBySize[size]
|
|
45
|
+
})
|
|
43
46
|
})] });
|
|
44
47
|
//#endregion
|
|
45
48
|
export { ButtonChromeChildren, getButtonChromeRootAttrs, spinnerDimensionsBySize };
|
|
@@ -2,8 +2,8 @@ import './button.css';
|
|
|
2
2
|
import { ButtonChromeChildren, getButtonChromeRootAttrs } from "./button-chrome.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import { Button } from "@base-ui/react/button";
|
|
6
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
import { Button } from "@base-ui/react/button";
|
|
7
7
|
//#region src/components/button/button.tsx
|
|
8
8
|
function usesButtonPrimitiveRender(render) {
|
|
9
9
|
return render === void 0 || React.isValidElement(render) && render.type === "button";
|
|
@@ -3,8 +3,8 @@ import { clsx } from "../../core/clsx.js";
|
|
|
3
3
|
import { ChromeCheck, ChromeMinus } from "../../internal/chrome-icons/chrome-icons.js";
|
|
4
4
|
import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
|
|
5
5
|
import { FieldLabel } from "../basic-input/field-label.js";
|
|
6
|
-
import checkbox_module_default from "./checkbox.module.js";
|
|
7
6
|
import { Stack } from "../stack/stack.js";
|
|
7
|
+
import checkbox_module_default from "./checkbox.module.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Field } from "@base-ui/react/field";
|
|
10
10
|
import { Checkbox } from "@base-ui/react/checkbox";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MenuCheckboxItem as MenuCheckboxItemPrimitive } from '@base-ui/react/menu';
|
|
2
|
-
import { StackProps } from '../stack';
|
|
3
2
|
import type * as React from 'react';
|
|
4
3
|
/**
|
|
5
4
|
* Public Menu.CheckboxItem props.
|
|
@@ -13,18 +12,6 @@ export type MenuCheckboxItemProps = MenuCheckboxItemPrimitive.Props & {
|
|
|
13
12
|
* @default No addon is rendered.
|
|
14
13
|
*/
|
|
15
14
|
addon?: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* Vertical alignment of the addon relative to the label row.
|
|
18
|
-
*
|
|
19
|
-
* @default 'center'
|
|
20
|
-
*/
|
|
21
|
-
addonAlign?: StackProps['vAlign'];
|
|
22
|
-
/**
|
|
23
|
-
* Custom indicator node when checked.
|
|
24
|
-
*
|
|
25
|
-
* @default Built-in Check chrome SVG at size 16
|
|
26
|
-
*/
|
|
27
|
-
indicator?: React.ReactNode;
|
|
28
15
|
/**
|
|
29
16
|
* End-aligned secondary text (e.g. keyboard shortcut) before the check indicator.
|
|
30
17
|
* Rendered muted `x-small`.
|