@viraui/react 2026.3.10 → 2026.3.11
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 +1 -1
- package/dist/components/dialog/dialog-sheet.js +2 -1
- package/dist/components/separator/separator.d.ts +2 -2
- package/dist/components/separator/separator.guide.json +4 -4
- package/dist/components/separator/separator.js +2 -2
- package/dist/components/surface/surface.css +1 -1
- package/dist/components/surface/surface.guide.json +2 -1
- package/dist/components/surface/surface.js +2 -0
- package/dist/preflight-surface.json +1 -1
- package/package.json +2 -2
package/dist/catalog.json
CHANGED
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
{
|
|
216
216
|
"id": "surface",
|
|
217
217
|
"name": "Surface",
|
|
218
|
-
"summary": "Presentational container with token background, optional border, radius, and padding; nested surfaces use radius=\"auto\" for concentric corners; optionally enables a named CSS container query context (`surface`) via `enableContainer`.",
|
|
218
|
+
"summary": "Presentational container with token background, optional border, radius, and padding; `data-vibrant` frosts the fill even without `color` (page shell via `--global-background`); nested surfaces use radius=\"auto\" for concentric corners; optionally enables a named CSS container query context (`surface`) via `enableContainer`.",
|
|
219
219
|
"guidePath": "./components/surface/surface.guide.json"
|
|
220
220
|
},
|
|
221
221
|
{
|
|
@@ -62,7 +62,8 @@ var DialogSheet = ({ children, description, title, showCloseButton = false, fitC
|
|
|
62
62
|
children: [/* @__PURE__ */ jsx(Drawer.Title, {
|
|
63
63
|
render: /* @__PURE__ */ jsx(Title, {
|
|
64
64
|
align: headerAlign,
|
|
65
|
-
size: "4"
|
|
65
|
+
size: "4",
|
|
66
|
+
render: /* @__PURE__ */ jsx("h2", {})
|
|
66
67
|
}),
|
|
67
68
|
children: title
|
|
68
69
|
}), description && /* @__PURE__ */ jsx(Drawer.Description, {
|
|
@@ -50,11 +50,11 @@ export type SeparatorProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'childr
|
|
|
50
50
|
*/
|
|
51
51
|
size?: SeparatorSize;
|
|
52
52
|
/**
|
|
53
|
-
* Sets the separator line
|
|
53
|
+
* Sets the separator line variant through `--vui-separator-border-style`.
|
|
54
54
|
*
|
|
55
55
|
* @default 'solid'
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
variant?: React.CSSProperties['borderStyle'];
|
|
58
58
|
};
|
|
59
59
|
export declare const Separator: React.FC<SeparatorProps>;
|
|
60
60
|
export {};
|
|
@@ -23,10 +23,6 @@
|
|
|
23
23
|
"related": ["Stack", "Surface", "Select"],
|
|
24
24
|
"properties": {
|
|
25
25
|
"react": {
|
|
26
|
-
"borderStyle": {
|
|
27
|
-
"description": "Sets the separator line border style through `--vui-separator-border-style`.",
|
|
28
|
-
"refCss": "border-style"
|
|
29
|
-
},
|
|
30
26
|
"hPadding": {
|
|
31
27
|
"description": "Sets inline padding on the Stack wrapper using one token for both sides or a `[start, end]` tuple."
|
|
32
28
|
},
|
|
@@ -42,6 +38,10 @@
|
|
|
42
38
|
"size": {
|
|
43
39
|
"description": "Sets the line thickness preset."
|
|
44
40
|
},
|
|
41
|
+
"variant": {
|
|
42
|
+
"description": "Sets the separator line variant through `--vui-separator-border-style`.",
|
|
43
|
+
"refCss": "border-style"
|
|
44
|
+
},
|
|
45
45
|
"vPadding": {
|
|
46
46
|
"description": "Sets block padding on the Stack wrapper using one token for both sides or a `[start, end]` tuple."
|
|
47
47
|
}
|
|
@@ -10,10 +10,10 @@ var separatorSizeValues = {
|
|
|
10
10
|
medium: 2,
|
|
11
11
|
large: 3
|
|
12
12
|
};
|
|
13
|
-
var Separator = ({
|
|
13
|
+
var Separator = ({ className, hPadding, orientation = "horizontal", ref, render, size = "small", style, variant = "solid", vPadding, ...otherProps }) => {
|
|
14
14
|
const dynamicStyle = {
|
|
15
15
|
"--vui-separator-size": `${separatorSizeValues[size]}px`,
|
|
16
|
-
"--vui-separator-border-style":
|
|
16
|
+
"--vui-separator-border-style": variant,
|
|
17
17
|
...style
|
|
18
18
|
};
|
|
19
19
|
const line = useRender({
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
)}&[data-surface-hover-color=primary]{--vui-surface-background-hover:light-dark(
|
|
5
5
|
oklab(from var(--global-primary) l a b / 20%),
|
|
6
6
|
oklab(from var(--global-primary) l a b / 10%)
|
|
7
|
-
)}@container root not style(--effect-vibrancy: initial){&[data-vibrant]{background:oklab(from var(--vui-surface-background) l a b/80%)}}&[data-surface-has-padding=true]{padding:var(--vui-surface-padding-block-start) var(--vui-surface-padding-inline-end) var(--vui-surface-padding-block-end) var(--vui-surface-padding-inline-start)}&[data-surface-border]{border-style:var(--vui-surface-border-style);border-color:var(--global-contrast);border-left-width:0;border-bottom-width:0;border-right-width:0;border-top-width:0}&[data-surface-border~=all]{border-width:1px}&[data-surface-border~=top]{border-top-width:1px}&[data-surface-border~=right]{border-right-width:1px}&[data-surface-border~=bottom]{border-bottom-width:1px}&[data-surface-border~=left]{border-left-width:1px}@media (hover:hover) and (pointer:fine){&[data-surface-has-hover-color=true]:hover{background:var(--vui-surface-background-hover)}}&[data-surface-container=true]{container:surface/inline-size}}}
|
|
7
|
+
)}@container root not style(--effect-vibrancy: initial){&[data-vibrant]{background:oklab(from var(--global-background) l a b/80%)}&[data-vibrant][data-surface-has-color=true]{background:oklab(from var(--vui-surface-background) l a b/80%)}}&[data-surface-has-padding=true]{padding:var(--vui-surface-padding-block-start) var(--vui-surface-padding-inline-end) var(--vui-surface-padding-block-end) var(--vui-surface-padding-inline-start)}&[data-surface-border]{border-style:var(--vui-surface-border-style);border-color:var(--global-contrast);border-left-width:0;border-bottom-width:0;border-right-width:0;border-top-width:0}&[data-surface-border~=all]{border-width:1px}&[data-surface-border~=top]{border-top-width:1px}&[data-surface-border~=right]{border-right-width:1px}&[data-surface-border~=bottom]{border-bottom-width:1px}&[data-surface-border~=left]{border-left-width:1px}@media (hover:hover) and (pointer:fine){&[data-surface-has-hover-color=true]:hover{background:var(--vui-surface-background-hover)}}&[data-surface-container=true]{container:surface/inline-size}}}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Surface",
|
|
3
3
|
"structure": "<Surface>…</Surface>",
|
|
4
|
-
"summary": "Presentational container with token background, optional border, radius, and padding; nested surfaces use radius=\"auto\" for concentric corners; optionally enables a named CSS container query context (`surface`) via `enableContainer`.",
|
|
4
|
+
"summary": "Presentational container with token background, optional border, radius, and padding; `data-vibrant` frosts the fill even without `color` (page shell via `--global-background`); nested surfaces use radius=\"auto\" for concentric corners; optionally enables a named CSS container query context (`surface`) via `enableContainer`.",
|
|
5
5
|
"whenToUse": [
|
|
6
6
|
"Group content with base-level background and contrast border",
|
|
7
|
+
"Frosted glass panels with `data-vibrant` — omit `color` for page-level shell or pass `color` for a tinted fill",
|
|
7
8
|
"Popup or card chrome with optional hover background",
|
|
8
9
|
"Compose with Elevator for animated elevation transitions",
|
|
9
10
|
"Set radius to a token on the outermost Surface that needs rounded corners",
|
|
@@ -24,6 +24,7 @@ var surfaceDefaultRadiusProps = {
|
|
|
24
24
|
var Surface = ({ border, borderStyle = "solid", className, color, hPadding, hoverColor, overflow, radius, ref, render, style, vPadding, enableContainer, ...otherProps }) => {
|
|
25
25
|
const hasPadding = Boolean(hPadding || vPadding);
|
|
26
26
|
const hasHoverColor = hoverColor !== void 0;
|
|
27
|
+
const hasColor = color !== void 0;
|
|
27
28
|
const { contextValue, hasAutoRadius, radiusStyle } = useSurfaceRadius({
|
|
28
29
|
defaults: surfaceDefaultRadiusProps,
|
|
29
30
|
hPadding,
|
|
@@ -52,6 +53,7 @@ var Surface = ({ border, borderStyle = "solid", className, color, hPadding, hove
|
|
|
52
53
|
...isSurfaceColorToken(color) && { "data-surface-color": color },
|
|
53
54
|
...isSurfaceColorToken(hoverColor) && { "data-surface-hover-color": hoverColor },
|
|
54
55
|
...enableContainer && { "data-surface-container": "true" },
|
|
56
|
+
"data-surface-has-color": hasColor ? "true" : "false",
|
|
55
57
|
"data-surface-has-hover-color": hasHoverColor ? "true" : "false",
|
|
56
58
|
"data-surface-has-padding": hasPadding ? "true" : "false",
|
|
57
59
|
className: clsx(surface_module_default.Surface, className),
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"module": "vibrancy",
|
|
147
147
|
"values": ["(boolean presence)"],
|
|
148
148
|
"presence": "boolean attribute; value ignored",
|
|
149
|
-
"effect": "When the active theme sets --effect-vibrancy, applies vibrancy backdrop-filter (brightness/blur/saturate). Surface with data-vibrant
|
|
149
|
+
"effect": "When the active theme sets --effect-vibrancy, applies vibrancy backdrop-filter (brightness/blur/saturate). Surface with data-vibrant translucifies its fill via component CSS: without color, frosted shell from --global-background; with color, 80% tint from --vui-surface-background.",
|
|
150
150
|
"whenToUse": [
|
|
151
151
|
"Glass / frosted panels on Surface or other hosts over busy backgrounds",
|
|
152
152
|
"Match overlay chrome (Dialog/Popover/Menu/Toast) that ships with data-vibrant"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viraui/react",
|
|
3
|
-
"version": "2026.3.
|
|
3
|
+
"version": "2026.3.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@base-ui/react": ">=1.7.0",
|
|
31
|
-
"@viraui/foundation": "2026.3.
|
|
31
|
+
"@viraui/foundation": "2026.3.11",
|
|
32
32
|
"@viraui/icons": "2026.0.3",
|
|
33
33
|
"@viraui/postcss-config": "2026.0.0",
|
|
34
34
|
"@viraui/tsconfig": "2026.0.0",
|