@viraui/react 2026.0.13 → 2026.0.15
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/components/accordion/accordion-item.js +0 -2
- package/dist/components/accordion/accordion.js +1 -2
- package/dist/components/autocomplete/autocomplete-group.js +0 -2
- package/dist/components/autocomplete/autocomplete-item.js +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts +9 -1
- package/dist/components/autocomplete/autocomplete.guide.json +5 -1
- package/dist/components/autocomplete/autocomplete.js +44 -40
- package/dist/components/avatar-group/avatar-group.js +0 -1
- package/dist/components/basic-input/input-control-group.js +0 -3
- package/dist/components/checkbox/checkbox-group.js +1 -4
- package/dist/components/checkbox/checkbox.js +0 -2
- package/dist/components/chip/chip.js +0 -1
- package/dist/components/dialog/dialog-sheet.d.ts +9 -0
- package/dist/components/dialog/dialog-sheet.js +72 -67
- package/dist/components/dialog/dialog.guide.json +5 -1
- package/dist/components/fieldset/fieldset.js +1 -0
- package/dist/components/linear-progress/linear-progress.js +0 -2
- package/dist/components/masonry/masonry.js +0 -1
- package/dist/components/menu/menu-group.js +0 -2
- package/dist/components/menu/menu-indicator-slot.js +0 -2
- package/dist/components/menu/menu-item-row.js +1 -1
- package/dist/components/menu/menu-link-item.js +4 -1
- package/dist/components/menu/menu-popup.d.ts +9 -1
- package/dist/components/menu/menu-popup.js +21 -18
- package/dist/components/menu/menu-radio-group.js +0 -2
- package/dist/components/menu/menu.guide.json +5 -1
- package/dist/components/meter/meter.js +0 -2
- package/dist/components/popover/popover-sheet.d.ts +13 -3
- package/dist/components/popover/popover-sheet.js +62 -62
- package/dist/components/popover/popover.guide.json +5 -1
- package/dist/components/radio/radio-group.js +0 -1
- package/dist/components/radio/radio.js +0 -2
- package/dist/components/select/select-group.js +0 -2
- package/dist/components/select/select-indicator-slot.js +0 -2
- package/dist/components/select/select-option.js +2 -1
- package/dist/components/select/select.d.ts +10 -2
- package/dist/components/select/select.guide.json +5 -1
- package/dist/components/select/select.js +60 -58
- package/dist/components/separator/separator.js +0 -1
- package/dist/components/slider/slider-control.js +0 -1
- package/dist/components/slider/slider.js +1 -2
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/stack/stack.guide.json +3 -2
- package/dist/components/stack/stack.js +1 -1
- package/dist/components/switch/switch.js +0 -3
- package/dist/components/tabs/tabs-list.js +1 -0
- package/dist/components/tabs/tabs.js +0 -1
- package/dist/components/textarea/textarea.js +1 -0
- package/dist/components/textfield/textfield.js +1 -0
- package/dist/components/toast/toast-banner.js +0 -3
- package/dist/components/toast/toast.guide.json +5 -1
- package/dist/components/toggle-group/toggle-group.js +1 -4
- package/dist/components/tooltip/tooltip-content.d.ts +11 -2
- package/dist/components/tooltip/tooltip-content.js +23 -21
- package/dist/components/tooltip/tooltip.guide.json +7 -1
- package/dist/preflight-surface.json +24 -1
- package/package.json +2 -2
|
@@ -41,7 +41,6 @@ var AccordionItemComponent = ({ children, className, color = 1, iconClosed = /*
|
|
|
41
41
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
42
42
|
columnGap: iconAtStart ? "small" : void 0,
|
|
43
43
|
direction: iconAtStart ? "row" : "row-reverse",
|
|
44
|
-
fillChildren: false,
|
|
45
44
|
hAlign: iconPosition === "end" ? "space-between" : "start",
|
|
46
45
|
hPadding: "medium",
|
|
47
46
|
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
@@ -56,7 +55,6 @@ var AccordionItemComponent = ({ children, className, color = 1, iconClosed = /*
|
|
|
56
55
|
}), /* @__PURE__ */ jsx(Accordion.Panel, {
|
|
57
56
|
className: accordion_module_default.Panel,
|
|
58
57
|
children: /* @__PURE__ */ jsx(Stack, {
|
|
59
|
-
fillChildren: false,
|
|
60
58
|
hPadding: "medium",
|
|
61
59
|
vPadding: ["2x-small", "medium"],
|
|
62
60
|
children
|
|
@@ -11,8 +11,7 @@ var AccordionRootComponent = ({ children, className, islands = true, ...otherPro
|
|
|
11
11
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
12
12
|
className: clsx(accordion_module_default.Accordion, className),
|
|
13
13
|
"data-islands": islands ? "true" : "false",
|
|
14
|
-
direction: "column"
|
|
15
|
-
fillChildren: false
|
|
14
|
+
direction: "column"
|
|
16
15
|
}),
|
|
17
16
|
hiddenUntilFound: true,
|
|
18
17
|
children
|
|
@@ -9,7 +9,6 @@ var AutocompleteGroup = ({ children, className, label, ...otherProps }) => /* @_
|
|
|
9
9
|
className,
|
|
10
10
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
11
11
|
direction: "column",
|
|
12
|
-
fillChildren: false,
|
|
13
12
|
rowGap: "2x-small",
|
|
14
13
|
vPadding: "2x-small"
|
|
15
14
|
}),
|
|
@@ -17,7 +16,6 @@ var AutocompleteGroup = ({ children, className, label, ...otherProps }) => /* @_
|
|
|
17
16
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
18
17
|
columnGap: "small",
|
|
19
18
|
direction: "row",
|
|
20
|
-
fillChildren: false,
|
|
21
19
|
hPadding: "small",
|
|
22
20
|
vAlign: "center",
|
|
23
21
|
vPadding: ["small", "x-small"]
|
|
@@ -15,11 +15,11 @@ var AutocompleteItemPart = ({ addon, addonAlign = "center", children, className,
|
|
|
15
15
|
className: autocomplete_module_default.ItemRow,
|
|
16
16
|
columnGap: "small",
|
|
17
17
|
direction: "row",
|
|
18
|
-
fillChildren: false,
|
|
19
18
|
hPadding: "small",
|
|
20
19
|
vAlign: addonAlign,
|
|
21
20
|
vPadding: "small",
|
|
22
21
|
children: [addon && /* @__PURE__ */ jsx(Stack, {
|
|
22
|
+
fillChildren: true,
|
|
23
23
|
"aria-hidden": "true",
|
|
24
24
|
"data-grow": "false",
|
|
25
25
|
"data-shrink": "false",
|
|
@@ -77,12 +77,20 @@ export type AutocompleteProps = Omit<AutocompleteRoot.Props<any>, 'children'> &
|
|
|
77
77
|
* @default No ref is attached.
|
|
78
78
|
*/
|
|
79
79
|
ref?: React.Ref<HTMLInputElement>;
|
|
80
|
+
/**
|
|
81
|
+
* Portal mount node (iframe body, shadow root, or app overlay root).
|
|
82
|
+
* Omit for Base UI default (`document.body` from the module window —
|
|
83
|
+
* iframe hosts must pass the iframe document body explicitly).
|
|
84
|
+
*
|
|
85
|
+
* @default Base UI FloatingPortal resolution
|
|
86
|
+
*/
|
|
87
|
+
container?: React.ComponentProps<typeof PrimitiveAutocomplete.Portal>['container'];
|
|
80
88
|
/**
|
|
81
89
|
* List content: static nodes (`Item` / `Group` / `Collection`) or a Base UI list render function.
|
|
82
90
|
*/
|
|
83
91
|
children?: React.ReactNode | ((item: any, index: number) => React.ReactNode);
|
|
84
92
|
};
|
|
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;
|
|
93
|
+
declare function AutocompleteRootComponent({ children, className, container, description, dirty, disabled, empty, endAddon, error, fitContent, invalid, label, name, placeholder, ref, startAddon, status, touched, validate, validationDebounceTime, validationMode, ...autocompleteRootProps }: AutocompleteProps): React.JSX.Element;
|
|
86
94
|
declare const AutocompleteCollection: typeof PrimitiveAutocomplete.Collection;
|
|
87
95
|
type AutocompleteComponent = typeof AutocompleteRootComponent & {
|
|
88
96
|
Item: typeof AutocompleteItemPart;
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"Suggest options while allowing free-form text in the input",
|
|
8
8
|
"Filterable tag, movie, or docs search with optional empty and status copy",
|
|
9
9
|
"Grouped suggestion lists via Autocomplete.Group and Collection",
|
|
10
|
-
"Async or limited result lists that need polite status announcements"
|
|
10
|
+
"Async or limited result lists that need polite status announcements",
|
|
11
|
+
"Custom portal host (iframe preview, shadow root, or app overlay root) via `container` on the portal-owning public part"
|
|
11
12
|
],
|
|
12
13
|
"whenNotToUse": [
|
|
13
14
|
"Remembered selection from a closed list — use Select (or Combobox when available)",
|
|
@@ -27,6 +28,9 @@
|
|
|
27
28
|
"related": ["Textfield", "Select", "Fieldset", "Stack", "Surface", "Spinner"],
|
|
28
29
|
"properties": {
|
|
29
30
|
"react": {
|
|
31
|
+
"container": {
|
|
32
|
+
"description": "Portal mount node (iframe body, shadow root, or app overlay root). Omit for Base UI default (`document.body` from the module window — iframe hosts must pass the iframe document body explicitly)."
|
|
33
|
+
},
|
|
30
34
|
"description": {
|
|
31
35
|
"description": "Helper copy rendered with `Field.Description` and `Text` while the field is valid."
|
|
32
36
|
},
|
|
@@ -18,7 +18,7 @@ import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
|
18
18
|
import { useId } from "react";
|
|
19
19
|
//#region src/components/autocomplete/autocomplete.tsx
|
|
20
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 }) {
|
|
21
|
+
function AutocompleteRootComponent({ children, className, container, description, dirty, disabled, empty, endAddon, error, fitContent, invalid, label, name, placeholder, ref, startAddon, status, touched, validate, validationDebounceTime, validationMode, ...autocompleteRootProps }) {
|
|
22
22
|
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...restAutocompleteProps } = autocompleteRootProps;
|
|
23
23
|
const fieldLabelId = useId();
|
|
24
24
|
const listAccessibleNameProps = {};
|
|
@@ -36,6 +36,7 @@ function AutocompleteRootComponent({ children, className, description, dirty, di
|
|
|
36
36
|
validationDebounceTime,
|
|
37
37
|
validationMode,
|
|
38
38
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
39
|
+
fillChildren: true,
|
|
39
40
|
direction: "column",
|
|
40
41
|
rowGap: "small"
|
|
41
42
|
}),
|
|
@@ -63,48 +64,51 @@ function AutocompleteRootComponent({ children, className, description, dirty, di
|
|
|
63
64
|
ref,
|
|
64
65
|
...fitContent && { "data-sizing": "content" }
|
|
65
66
|
})
|
|
66
|
-
}), /* @__PURE__ */ jsx(Autocomplete.Portal, {
|
|
67
|
-
|
|
68
|
-
children: /* @__PURE__ */ jsx(Autocomplete.
|
|
69
|
-
|
|
70
|
-
children: /* @__PURE__ */ jsx(
|
|
71
|
-
|
|
72
|
-
children: /* @__PURE__ */
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
67
|
+
}), /* @__PURE__ */ jsx(Autocomplete.Portal, {
|
|
68
|
+
container,
|
|
69
|
+
children: /* @__PURE__ */ jsx(Autocomplete.Positioner, {
|
|
70
|
+
sideOffset: 2,
|
|
71
|
+
children: /* @__PURE__ */ jsx(Autocomplete.Popup, {
|
|
72
|
+
className: autocomplete_module_default.AutocompletePopup,
|
|
73
|
+
children: /* @__PURE__ */ jsx(Elevator, {
|
|
74
|
+
resting: 1,
|
|
75
|
+
children: /* @__PURE__ */ jsxs(Surface, {
|
|
76
|
+
border: "all",
|
|
77
|
+
className: autocomplete_module_default.PopupChrome,
|
|
78
|
+
color: 1,
|
|
79
|
+
"data-vibrant": "",
|
|
80
|
+
hPadding: "x-small",
|
|
81
|
+
overflow: "auto",
|
|
82
|
+
radius: "medium",
|
|
83
|
+
vPadding: "x-small",
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsx(Autocomplete.Status, {
|
|
86
|
+
className: autocomplete_module_default.Status,
|
|
87
|
+
children: typeof status === "string" ? /* @__PURE__ */ jsx(Text, {
|
|
88
|
+
size: "x-small",
|
|
89
|
+
tone: "muted",
|
|
90
|
+
children: status
|
|
91
|
+
}) : status
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ jsx(Autocomplete.Empty, {
|
|
94
|
+
className: autocomplete_module_default.Empty,
|
|
95
|
+
children: typeof empty === "string" ? /* @__PURE__ */ jsx(Text, {
|
|
96
|
+
size: "small",
|
|
97
|
+
tone: "muted",
|
|
98
|
+
children: empty
|
|
99
|
+
}) : empty
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsx(Autocomplete.List, {
|
|
102
|
+
...listAccessibleNameProps,
|
|
103
|
+
className: autocomplete_module_default.List,
|
|
104
|
+
children
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
})
|
|
104
108
|
})
|
|
105
109
|
})
|
|
106
110
|
})
|
|
107
|
-
})
|
|
111
|
+
})]
|
|
108
112
|
}),
|
|
109
113
|
/* @__PURE__ */ jsx(FieldHelperCopy, {
|
|
110
114
|
className: autocomplete_module_default.Description,
|
|
@@ -8,13 +8,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
var InputControlGroup = ({ addonClassName, children, controlGroupClassName, endAddon, startAddon }) => /* @__PURE__ */ jsxs(Stack, {
|
|
9
9
|
className: controlGroupClassName,
|
|
10
10
|
direction: "row",
|
|
11
|
-
fillChildren: false,
|
|
12
11
|
vAlign: "stretch",
|
|
13
12
|
children: [
|
|
14
13
|
startAddon && /* @__PURE__ */ jsx(Stack, {
|
|
15
14
|
className: addonClassName,
|
|
16
15
|
"data-position": "start",
|
|
17
|
-
fillChildren: false,
|
|
18
16
|
hAlign: "center",
|
|
19
17
|
hPadding: ["small", "x-small"],
|
|
20
18
|
inline: true,
|
|
@@ -26,7 +24,6 @@ var InputControlGroup = ({ addonClassName, children, controlGroupClassName, endA
|
|
|
26
24
|
endAddon && /* @__PURE__ */ jsx(Stack, {
|
|
27
25
|
className: addonClassName,
|
|
28
26
|
"data-position": "end",
|
|
29
|
-
fillChildren: false,
|
|
30
27
|
hAlign: "center",
|
|
31
28
|
hPadding: "x-small",
|
|
32
29
|
inline: true,
|
|
@@ -5,10 +5,7 @@ import { CheckboxGroup } from "@base-ui/react";
|
|
|
5
5
|
var CheckboxGroup$1 = ({ children, className, ...otherProps }) => /* @__PURE__ */ jsx(CheckboxGroup, {
|
|
6
6
|
...otherProps,
|
|
7
7
|
className,
|
|
8
|
-
render: /* @__PURE__ */ jsx(Stack, {
|
|
9
|
-
fillChildren: false,
|
|
10
|
-
rowGap: "small"
|
|
11
|
-
}),
|
|
8
|
+
render: /* @__PURE__ */ jsx(Stack, { rowGap: "small" }),
|
|
12
9
|
children
|
|
13
10
|
});
|
|
14
11
|
//#endregion
|
|
@@ -19,7 +19,6 @@ var Checkbox$1 = ({ className, description, disabled, error, label, ref, size =
|
|
|
19
19
|
children: /* @__PURE__ */ jsxs(Stack, {
|
|
20
20
|
direction: "row",
|
|
21
21
|
columnGap: size === "small" ? "small" : "medium",
|
|
22
|
-
fillChildren: false,
|
|
23
22
|
vAlign: hasTextDescription ? "start" : "center",
|
|
24
23
|
hPadding,
|
|
25
24
|
vPadding,
|
|
@@ -42,7 +41,6 @@ var Checkbox$1 = ({ className, description, disabled, error, label, ref, size =
|
|
|
42
41
|
})
|
|
43
42
|
}), label || description || error ? /* @__PURE__ */ jsxs(Stack, {
|
|
44
43
|
direction: "column",
|
|
45
|
-
fillChildren: false,
|
|
46
44
|
rowGap: "small",
|
|
47
45
|
children: [label ? /* @__PURE__ */ jsx(FieldLabel, {
|
|
48
46
|
size: size === "small" ? "small" : "medium",
|
|
@@ -11,7 +11,6 @@ var Chip = ({ addon, addonPosition = "start", children, className, ref, render,
|
|
|
11
11
|
inline: true,
|
|
12
12
|
direction: addonPosition === "start" ? "row" : "row-reverse",
|
|
13
13
|
vAlign: "center",
|
|
14
|
-
fillChildren: false,
|
|
15
14
|
hPadding: "small",
|
|
16
15
|
columnGap: "x-small",
|
|
17
16
|
className: chip_module_default.Content,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Drawer as PrimitiveDrawer } from '@base-ui/react';
|
|
1
2
|
import { StackProps } from '..';
|
|
2
3
|
import type * as React from 'react';
|
|
3
4
|
/**
|
|
@@ -62,5 +63,13 @@ export type DialogSheetProps = {
|
|
|
62
63
|
* @default `97dvh`
|
|
63
64
|
*/
|
|
64
65
|
maxHeight?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Portal mount node (iframe body, shadow root, or app overlay root).
|
|
68
|
+
* Omit for Base UI default (`document.body` from the module window —
|
|
69
|
+
* iframe hosts must pass the iframe document body explicitly).
|
|
70
|
+
*
|
|
71
|
+
* @default Base UI FloatingPortal resolution
|
|
72
|
+
*/
|
|
73
|
+
container?: React.ComponentProps<typeof PrimitiveDrawer.Portal>['container'];
|
|
65
74
|
};
|
|
66
75
|
export declare const DialogSheet: React.FC<DialogSheetProps>;
|
|
@@ -9,76 +9,81 @@ import { Title } from "../title/title.js";
|
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { Drawer } from "@base-ui/react";
|
|
11
11
|
//#region src/components/dialog/dialog-sheet.tsx
|
|
12
|
-
var DialogSheet = ({ children, description, title, showCloseButton = false, fitContent = false, showHandle = true, headerAlign = "start", maxContentWidth = "50ch", maxHeight = "97dvh" }) => /* @__PURE__ */ jsxs(Drawer.Portal, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
color: 1,
|
|
30
|
-
"data-vibrant": "",
|
|
31
|
-
radius: "large",
|
|
32
|
-
vPadding: ["medium", 0]
|
|
33
|
-
}),
|
|
34
|
-
children: [showHandle && /* @__PURE__ */ jsxs(Stack, {
|
|
35
|
-
inline: true,
|
|
36
|
-
direction: "row",
|
|
37
|
-
vPadding: [0, "medium"],
|
|
38
|
-
columnGap: "small",
|
|
39
|
-
children: [
|
|
40
|
-
/* @__PURE__ */ jsx("div", { className: dialog_module_default.HandleShape }),
|
|
41
|
-
/* @__PURE__ */ jsx("div", { className: dialog_module_default.HandleShape }),
|
|
42
|
-
/* @__PURE__ */ jsx("div", { className: dialog_module_default.HandleShape })
|
|
43
|
-
]
|
|
44
|
-
}), /* @__PURE__ */ jsxs(Stack, {
|
|
45
|
-
maxWidth: maxContentWidth,
|
|
46
|
-
rowGap: "large",
|
|
47
|
-
className: dialog_module_default.Body,
|
|
48
|
-
children: [/* @__PURE__ */ jsxs(Stack, {
|
|
49
|
-
className: dialog_module_default.Header,
|
|
50
|
-
"data-shrink": "false",
|
|
51
|
-
hAlign: headerAlign,
|
|
52
|
-
hPadding: "medium",
|
|
53
|
-
fillChildren: false,
|
|
54
|
-
children: [/* @__PURE__ */ jsx(Drawer.Title, {
|
|
55
|
-
render: /* @__PURE__ */ jsx(Title, { size: "4" }),
|
|
56
|
-
children: title
|
|
57
|
-
}), description && /* @__PURE__ */ jsx(Drawer.Description, {
|
|
58
|
-
render: /* @__PURE__ */ jsx(Text, {
|
|
59
|
-
tone: "muted",
|
|
60
|
-
render: /* @__PURE__ */ jsx("p", {})
|
|
61
|
-
}),
|
|
62
|
-
children: description
|
|
63
|
-
})]
|
|
64
|
-
}), /* @__PURE__ */ jsxs(Drawer.Content, {
|
|
12
|
+
var DialogSheet = ({ children, description, title, showCloseButton = false, fitContent = false, showHandle = true, headerAlign = "start", maxContentWidth = "50ch", maxHeight = "97dvh", container }) => /* @__PURE__ */ jsxs(Drawer.Portal, {
|
|
13
|
+
container,
|
|
14
|
+
children: [/* @__PURE__ */ jsx(Drawer.Backdrop, { className: dialog_module_default.Backdrop }), /* @__PURE__ */ jsx(Drawer.Viewport, {
|
|
15
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
16
|
+
vAlign: "end",
|
|
17
|
+
hPadding: "small",
|
|
18
|
+
vPadding: "small",
|
|
19
|
+
hAlign: fitContent ? "center" : void 0
|
|
20
|
+
}),
|
|
21
|
+
className: dialog_module_default.Viewport,
|
|
22
|
+
children: /* @__PURE__ */ jsx(Elevator, {
|
|
23
|
+
resting: 4,
|
|
24
|
+
children: /* @__PURE__ */ jsxs(Drawer.Popup, {
|
|
25
|
+
className: dialog_module_default.Popup,
|
|
26
|
+
style: { "--vui-dialog-max-block-size": maxHeight },
|
|
27
|
+
render: /* @__PURE__ */ jsx(Surface, {
|
|
28
|
+
border: "top",
|
|
65
29
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
className: dialog_module_default.Content
|
|
30
|
+
fillChildren: true,
|
|
31
|
+
hAlign: "center"
|
|
69
32
|
}),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
33
|
+
color: 1,
|
|
34
|
+
"data-vibrant": "",
|
|
35
|
+
radius: "large",
|
|
36
|
+
vPadding: ["medium", 0]
|
|
37
|
+
}),
|
|
38
|
+
children: [showHandle && /* @__PURE__ */ jsxs(Stack, {
|
|
39
|
+
fillChildren: true,
|
|
40
|
+
inline: true,
|
|
41
|
+
direction: "row",
|
|
42
|
+
vPadding: [0, "medium"],
|
|
43
|
+
columnGap: "small",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx("div", { className: dialog_module_default.HandleShape }),
|
|
46
|
+
/* @__PURE__ */ jsx("div", { className: dialog_module_default.HandleShape }),
|
|
47
|
+
/* @__PURE__ */ jsx("div", { className: dialog_module_default.HandleShape })
|
|
48
|
+
]
|
|
49
|
+
}), /* @__PURE__ */ jsxs(Stack, {
|
|
50
|
+
fillChildren: true,
|
|
51
|
+
maxWidth: maxContentWidth,
|
|
52
|
+
rowGap: "large",
|
|
53
|
+
className: dialog_module_default.Body,
|
|
54
|
+
children: [/* @__PURE__ */ jsxs(Stack, {
|
|
55
|
+
className: dialog_module_default.Header,
|
|
56
|
+
"data-shrink": "false",
|
|
57
|
+
hAlign: headerAlign,
|
|
58
|
+
hPadding: "medium",
|
|
59
|
+
children: [/* @__PURE__ */ jsx(Drawer.Title, {
|
|
60
|
+
render: /* @__PURE__ */ jsx(Title, { size: "4" }),
|
|
61
|
+
children: title
|
|
62
|
+
}), description && /* @__PURE__ */ jsx(Drawer.Description, {
|
|
63
|
+
render: /* @__PURE__ */ jsx(Text, {
|
|
64
|
+
tone: "muted",
|
|
65
|
+
render: /* @__PURE__ */ jsx("p", {})
|
|
66
|
+
}),
|
|
67
|
+
children: description
|
|
68
|
+
})]
|
|
69
|
+
}), /* @__PURE__ */ jsxs(Drawer.Content, {
|
|
70
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
71
|
+
vAlign: "start",
|
|
72
|
+
className: dialog_module_default.Content
|
|
73
|
+
}),
|
|
74
|
+
children: [showCloseButton && /* @__PURE__ */ jsx(Drawer.Close, {
|
|
75
|
+
className: dialog_module_default.CloseButton,
|
|
76
|
+
render: /* @__PURE__ */ jsx(IconButton, {
|
|
77
|
+
"aria-label": "Close dialog",
|
|
78
|
+
icon: /* @__PURE__ */ jsx(ChromeXmark, {}),
|
|
79
|
+
variant: "flat"
|
|
80
|
+
})
|
|
81
|
+
}), children]
|
|
82
|
+
})]
|
|
78
83
|
})]
|
|
79
|
-
})
|
|
84
|
+
})
|
|
80
85
|
})
|
|
81
|
-
})
|
|
82
|
-
})
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
83
88
|
//#endregion
|
|
84
89
|
export { DialogSheet };
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"Short forms or read-only content that needs a modal layer above the app",
|
|
9
9
|
"Bottom sheets where swipe dismissal or snap points are useful (pass `snapPoints`, `snapPoint`/`onSnapPointChange`, or `defaultSnapPoint` directly on `Dialog`)",
|
|
10
10
|
"Drill-down sheet flows (for example settings sub-pages) by nesting a `Dialog` inside `Dialog.Sheet` children",
|
|
11
|
-
"App-shell indent effects by wrapping page content in `Dialog.Provider`, `Dialog.IndentBackground`, and `Dialog.Indent`"
|
|
11
|
+
"App-shell indent effects by wrapping page content in `Dialog.Provider`, `Dialog.IndentBackground`, and `Dialog.Indent`",
|
|
12
|
+
"Custom portal host (iframe preview, shadow root, or app overlay root) via `container` on the portal-owning public part"
|
|
12
13
|
],
|
|
13
14
|
"whenNotToUse": [
|
|
14
15
|
"Small anchored hints or quick actions that should use Popover or Menu",
|
|
@@ -31,6 +32,9 @@
|
|
|
31
32
|
"Sheet.children": {
|
|
32
33
|
"description": "Optional body content rendered below the description."
|
|
33
34
|
},
|
|
35
|
+
"Sheet.container": {
|
|
36
|
+
"description": "Portal mount node (iframe body, shadow root, or app overlay root). Omit for Base UI default (`document.body` from the module window — iframe hosts must pass the iframe document body explicitly)."
|
|
37
|
+
},
|
|
34
38
|
"Sheet.description": {
|
|
35
39
|
"description": "Supporting copy announced with the title."
|
|
36
40
|
},
|
|
@@ -9,6 +9,7 @@ var Fieldset$1 = ({ children, className, description, disabled, error, label, ..
|
|
|
9
9
|
className,
|
|
10
10
|
disabled,
|
|
11
11
|
children: [(label || description || error) && /* @__PURE__ */ jsxs(Stack, {
|
|
12
|
+
fillChildren: true,
|
|
12
13
|
vPadding: [0, "small"],
|
|
13
14
|
rowGap: "small",
|
|
14
15
|
children: [label && /* @__PURE__ */ jsx(Fieldset.Legend, {
|
|
@@ -14,14 +14,12 @@ var LinearProgress = ({ className, description, label, showValue = false, value,
|
|
|
14
14
|
value,
|
|
15
15
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
16
16
|
direction: "column",
|
|
17
|
-
fillChildren: false,
|
|
18
17
|
rowGap: "small",
|
|
19
18
|
columnGap: "x-small"
|
|
20
19
|
}),
|
|
21
20
|
children: [
|
|
22
21
|
(label || showValue) && /* @__PURE__ */ jsxs(Stack, {
|
|
23
22
|
direction: "row",
|
|
24
|
-
fillChildren: false,
|
|
25
23
|
columnGap: "small",
|
|
26
24
|
vAlign: "center",
|
|
27
25
|
hAlign: "space-between",
|
|
@@ -70,7 +70,6 @@ var MasonryRoot = ({ children, className, breakpointCols = DEFAULT_BREAKPOINT_CO
|
|
|
70
70
|
style: dynamicStyle,
|
|
71
71
|
children: columns.map((column) => /* @__PURE__ */ jsx(Stack, {
|
|
72
72
|
direction: "column",
|
|
73
|
-
fillChildren: false,
|
|
74
73
|
rowGap: gap,
|
|
75
74
|
children: column.children
|
|
76
75
|
}, column.key))
|
|
@@ -8,7 +8,6 @@ var MenuGroup = ({ children, className, label, ...otherProps }) => /* @__PURE__
|
|
|
8
8
|
className,
|
|
9
9
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
10
10
|
direction: "column",
|
|
11
|
-
fillChildren: false,
|
|
12
11
|
rowGap: "2x-small",
|
|
13
12
|
vPadding: "2x-small"
|
|
14
13
|
}),
|
|
@@ -16,7 +15,6 @@ var MenuGroup = ({ children, className, label, ...otherProps }) => /* @__PURE__
|
|
|
16
15
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
17
16
|
columnGap: "small",
|
|
18
17
|
direction: "row",
|
|
19
|
-
fillChildren: false,
|
|
20
18
|
hPadding: "small",
|
|
21
19
|
vAlign: "center",
|
|
22
20
|
vPadding: ["small", "x-small"]
|
|
@@ -6,7 +6,6 @@ import { Menu } from "@base-ui/react/menu";
|
|
|
6
6
|
//#region src/components/menu/menu-indicator-slot.tsx
|
|
7
7
|
var indicatorStackRender = /* @__PURE__ */ jsx(Stack, {
|
|
8
8
|
"data-shrink": "false",
|
|
9
|
-
fillChildren: false,
|
|
10
9
|
hAlign: "center",
|
|
11
10
|
inline: true,
|
|
12
11
|
vAlign: "center"
|
|
@@ -35,7 +34,6 @@ var MenuIndicatorSlot = ({ kind }) => {
|
|
|
35
34
|
"aria-hidden": true,
|
|
36
35
|
"data-kind": "chevron",
|
|
37
36
|
"data-shrink": "false",
|
|
38
|
-
fillChildren: false,
|
|
39
37
|
hAlign: "center",
|
|
40
38
|
inline: true,
|
|
41
39
|
vAlign: "center",
|
|
@@ -11,13 +11,13 @@ var MenuItemRow = ({ addon, children, note, trailing }) => /* @__PURE__ */ jsxs(
|
|
|
11
11
|
columnGap: "small",
|
|
12
12
|
"data-grow": "true",
|
|
13
13
|
direction: "row",
|
|
14
|
-
fillChildren: false,
|
|
15
14
|
hPadding: "small",
|
|
16
15
|
vPadding: "small",
|
|
17
16
|
vAlign: "center",
|
|
18
17
|
className: menu_module_default.ItemRow,
|
|
19
18
|
children: [
|
|
20
19
|
addon && /* @__PURE__ */ jsx(Stack, {
|
|
20
|
+
fillChildren: true,
|
|
21
21
|
"aria-hidden": "true",
|
|
22
22
|
"data-grow": "false",
|
|
23
23
|
"data-shrink": "false",
|
|
@@ -12,7 +12,10 @@ var MenuLinkItem = ({ addon, children, className, note, sentiment, ...otherProps
|
|
|
12
12
|
...sentiment && { "data-sentiment": sentiment },
|
|
13
13
|
render: /* @__PURE__ */ jsx(Surface, {
|
|
14
14
|
radius: "auto",
|
|
15
|
-
render: /* @__PURE__ */ jsx(Stack, {
|
|
15
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
16
|
+
fillChildren: true,
|
|
17
|
+
render: /* @__PURE__ */ jsx("a", {})
|
|
18
|
+
})
|
|
16
19
|
}),
|
|
17
20
|
children: /* @__PURE__ */ jsx(MenuItemRow, {
|
|
18
21
|
addon,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MenuPositioner } from '@base-ui/react/menu';
|
|
1
|
+
import { Menu as PrimitiveMenu, MenuPositioner } from '@base-ui/react/menu';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
type MenuPopupPositionerProps = Omit<MenuPositioner.Props, 'className' | 'style' | 'render'>;
|
|
4
4
|
/**
|
|
@@ -13,6 +13,14 @@ type MenuPopupPositionerProps = Omit<MenuPositioner.Props, 'className' | 'style'
|
|
|
13
13
|
*/
|
|
14
14
|
export type MenuPopupProps = MenuPopupPositionerProps & {
|
|
15
15
|
children?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Portal mount node (iframe body, shadow root, or app overlay root).
|
|
18
|
+
* Omit for Base UI default (`document.body` from the module window —
|
|
19
|
+
* iframe hosts must pass the iframe document body explicitly).
|
|
20
|
+
*
|
|
21
|
+
* @default Base UI FloatingPortal resolution
|
|
22
|
+
*/
|
|
23
|
+
container?: React.ComponentProps<typeof PrimitiveMenu.Portal>['container'];
|
|
16
24
|
};
|
|
17
25
|
export declare const MenuPopup: React.FC<MenuPopupProps>;
|
|
18
26
|
export {};
|
|
@@ -4,25 +4,28 @@ import menu_module_default from "./menu.module.js";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Menu } from "@base-ui/react/menu";
|
|
6
6
|
//#region src/components/menu/menu-popup.tsx
|
|
7
|
-
var MenuPopup = ({ children, sideOffset = 2, ...positionerProps }) => /* @__PURE__ */ jsx(Menu.Portal, {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
children: /* @__PURE__ */ jsx(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
var MenuPopup = ({ children, sideOffset = 2, container, ...positionerProps }) => /* @__PURE__ */ jsx(Menu.Portal, {
|
|
8
|
+
container,
|
|
9
|
+
children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
10
|
+
sideOffset,
|
|
11
|
+
...positionerProps,
|
|
12
|
+
children: /* @__PURE__ */ jsx(Elevator, {
|
|
13
|
+
resting: 1,
|
|
14
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
15
|
+
className: menu_module_default.MenuPopup,
|
|
16
|
+
render: /* @__PURE__ */ jsx(Surface, {
|
|
17
|
+
border: "all",
|
|
18
|
+
color: 1,
|
|
19
|
+
"data-vibrant": true,
|
|
20
|
+
hPadding: "x-small",
|
|
21
|
+
overflow: "auto",
|
|
22
|
+
radius: "medium",
|
|
23
|
+
vPadding: "x-small"
|
|
24
|
+
}),
|
|
25
|
+
children
|
|
26
|
+
})
|
|
24
27
|
})
|
|
25
28
|
})
|
|
26
|
-
})
|
|
29
|
+
});
|
|
27
30
|
//#endregion
|
|
28
31
|
export { MenuPopup };
|