@viraui/react 2026.0.3 → 2026.0.5
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/basic-input/basic-input.css +1 -1
- package/dist/components/dialog/dialog-sheet.js +59 -55
- package/dist/components/fit-text/fit-text.css +1 -1
- package/dist/components/glow/glow-tracker.d.ts +19 -0
- package/dist/components/glow/glow-tracker.js +87 -0
- package/dist/components/glow/glow.css +1 -0
- package/dist/components/glow/glow.d.ts +97 -0
- package/dist/components/glow/glow.guide.json +117 -0
- package/dist/components/glow/glow.js +67 -0
- package/dist/components/glow/glow.module.js +8 -0
- package/dist/components/glow/index.d.ts +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/popover/popover-sheet.js +1 -1
- package/dist/components/select/select.css +1 -1
- package/dist/components/select/select.js +1 -1
- package/dist/components/surface/surface.css +1 -1
- package/dist/components/surface/surface.d.ts +7 -3
- package/dist/components/surface/surface.guide.json +2 -2
- package/dist/components/surface/surface.js +5 -2
- package/dist/components/text/text.css +1 -1
- package/dist/components/title/title.css +1 -1
- package/dist/index.js +4 -2
- package/dist/preflight.css +1 -1
- package/package.json +2 -2
package/dist/catalog.json
CHANGED
|
@@ -92,6 +92,12 @@
|
|
|
92
92
|
"summary": "CSS-only fit-to-width wrapper that scales children to fill available inline space.",
|
|
93
93
|
"guidePath": "./components/fit-text/fit-text.guide.json"
|
|
94
94
|
},
|
|
95
|
+
{
|
|
96
|
+
"id": "glow",
|
|
97
|
+
"name": "Glow",
|
|
98
|
+
"summary": "Decorative pointer-driven border highlight on a transparent Surface shell (radius only). Put the visual card as children; a shared rAF tracker paints CSS variables without React re-renders.",
|
|
99
|
+
"guidePath": "./components/glow/glow.guide.json"
|
|
100
|
+
},
|
|
95
101
|
{
|
|
96
102
|
"id": "icon-button",
|
|
97
103
|
"name": "IconButton",
|
|
@@ -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}.viraui__basic-input-module__BasicInput_5uE64{--vui-basic-input-background:var(--base-1);--vui-basic-input-color:var(--global-foreground);--vui-basic-input-placeholder-color:var(--global-disabled-foreground);--vui-basic-input-padding-inline:var(--space-small);--vui-basic-input-font-size:var(--font-scale-body-small);--vui-basic-input-border-radius:var(--radius-medium);box-sizing:border-box;margin:0;inline-size:100%;min-inline-size:0;padding-inline:var(--vui-basic-input-padding-inline);font-family:inherit;font-size:var(--vui-basic-input-font-size);font-variation-settings:"wght" 400;color:var(--vui-basic-input-color);background:var(--vui-basic-input-background);border:none;border-radius:var(--vui-basic-input-border-radius);appearance:none;&::-webkit-contacts-auto-fill-button{background-color:var(--vui-basic-input-color)}&::placeholder{color:var(--vui-basic-input-placeholder-color)}&:disabled{--vui-basic-input-background:var(--global-disabled-background);--vui-basic-input-color:var(--global-disabled-foreground);--vui-basic-input-placeholder-color:var(--global-disabled-foreground);cursor:not-allowed}&[data-invalid]{outline-color:oklab(from var(--highlight-red) l a b/.3)}&[data-sizing=content]{field-sizing:content}}}
|
|
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}.viraui__basic-input-module__BasicInput_5uE64{--vui-basic-input-background:var(--base-1);--vui-basic-input-color:var(--global-foreground);--vui-basic-input-placeholder-color:var(--global-disabled-foreground);--vui-basic-input-padding-inline:calc(var(--space-small) + var(--space-x-small));--vui-basic-input-font-size:var(--font-scale-body-small);--vui-basic-input-border-radius:var(--radius-medium);box-sizing:border-box;margin:0;inline-size:100%;min-inline-size:0;padding-inline:var(--vui-basic-input-padding-inline);font-family:inherit;font-size:var(--vui-basic-input-font-size);font-variation-settings:"wght" 400;color:var(--vui-basic-input-color);background:var(--vui-basic-input-background);border:none;border-radius:var(--vui-basic-input-border-radius);appearance:none;&::-webkit-contacts-auto-fill-button{background-color:var(--vui-basic-input-color)}&::placeholder{color:var(--vui-basic-input-placeholder-color)}&:disabled{--vui-basic-input-background:var(--global-disabled-background);--vui-basic-input-color:var(--global-disabled-foreground);--vui-basic-input-placeholder-color:var(--global-disabled-foreground);cursor:not-allowed}&[data-invalid]{outline-color:oklab(from var(--highlight-red) l a b/.3)}&[data-sizing=content]{field-sizing:content}}}
|
|
@@ -2,8 +2,9 @@ import { ChromeXmark } from "../../internal/chrome-icons/chrome-icons.js";
|
|
|
2
2
|
import { Text } from "../text/text.js";
|
|
3
3
|
import { Stack } from "../stack/stack.js";
|
|
4
4
|
import dialog_module_default from "./dialog.module.js";
|
|
5
|
-
import {
|
|
5
|
+
import { Elevator } from "../elevator/elevator.js";
|
|
6
6
|
import { Surface } from "../surface/surface.js";
|
|
7
|
+
import { IconButton } from "../icon-button/icon-button.js";
|
|
7
8
|
import { Title } from "../title/title.js";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { Drawer } from "@base-ui/react";
|
|
@@ -17,63 +18,66 @@ var DialogSheet = ({ children, description, title, showCloseButton = false, fitC
|
|
|
17
18
|
hAlign: fitContent ? "center" : void 0
|
|
18
19
|
}),
|
|
19
20
|
className: dialog_module_default.Viewport,
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
render: /* @__PURE__ */ jsx(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
className: dialog_module_default.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
children:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
render: /* @__PURE__ */ jsx(
|
|
21
|
+
children: /* @__PURE__ */ jsx(Elevator, {
|
|
22
|
+
resting: 4,
|
|
23
|
+
children: /* @__PURE__ */ jsxs(Drawer.Popup, {
|
|
24
|
+
className: dialog_module_default.Popup,
|
|
25
|
+
style: { "--vui-dialog-max-block-size": maxHeight },
|
|
26
|
+
render: /* @__PURE__ */ jsx(Surface, {
|
|
27
|
+
border: "top",
|
|
28
|
+
render: /* @__PURE__ */ jsx(Stack, { hAlign: "center" }),
|
|
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, {
|
|
65
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
66
|
+
vAlign: "start",
|
|
67
|
+
fillChildren: false,
|
|
68
|
+
className: dialog_module_default.Content
|
|
58
69
|
}),
|
|
59
|
-
children:
|
|
70
|
+
children: [showCloseButton && /* @__PURE__ */ jsx(Drawer.Close, {
|
|
71
|
+
className: dialog_module_default.CloseButton,
|
|
72
|
+
render: /* @__PURE__ */ jsx(IconButton, {
|
|
73
|
+
"aria-label": "Close dialog",
|
|
74
|
+
icon: /* @__PURE__ */ jsx(ChromeXmark, {}),
|
|
75
|
+
variant: "flat"
|
|
76
|
+
})
|
|
77
|
+
}), children]
|
|
60
78
|
})]
|
|
61
|
-
}), /* @__PURE__ */ jsxs(Drawer.Content, {
|
|
62
|
-
render: /* @__PURE__ */ jsx(Stack, {
|
|
63
|
-
vAlign: "start",
|
|
64
|
-
fillChildren: false,
|
|
65
|
-
className: dialog_module_default.Content
|
|
66
|
-
}),
|
|
67
|
-
children: [showCloseButton && /* @__PURE__ */ jsx(Drawer.Close, {
|
|
68
|
-
className: dialog_module_default.CloseButton,
|
|
69
|
-
render: /* @__PURE__ */ jsx(IconButton, {
|
|
70
|
-
"aria-label": "Close dialog",
|
|
71
|
-
icon: /* @__PURE__ */ jsx(ChromeXmark, {}),
|
|
72
|
-
variant: "flat"
|
|
73
|
-
})
|
|
74
|
-
}), children]
|
|
75
79
|
})]
|
|
76
|
-
})
|
|
80
|
+
})
|
|
77
81
|
})
|
|
78
82
|
})] });
|
|
79
83
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --__fit-text-captured-length{syntax:"<length>";inherits:true;initial-value:0}@property --vui-fit-text-max-font-size{syntax:"<length>";inherits:true;initial-value:calc(infinity * 1px)}@property --__fit-text-available-space{syntax:"<length>";inherits:true;initial-value:0}@property --__fit-text-ratio{syntax:"<number>";inherits:false;initial-value:1}.viraui__fit-text-module__FitText_CdAvq{--__fit-text-captured-length:initial;display:flex;container-type:inline-size;.viraui__fit-text-module__Container_bawpR{--__fit-text-captured-length:100cqi;--__fit-text-available-space:var(--__fit-text-captured-length);flex-grow:1;container-type:inline-size}.viraui__fit-text-module__Display_Hraif{--__fit-text-captured-length:100cqi;--__fit-text-ratio:tan(atan2(var(--__fit-text-available-space),var(--__fit-text-available-space) - var(--__fit-text-captured-length)));inline-size:var(--__fit-text-available-space);font-size:clamp(0px,1em * var(--__fit-text-ratio),var(--vui-fit-text-max-font-size));>*{font-size:1em;max-inline-size:none}}.viraui__fit-text-module__Reference_6wCx7{visibility:hidden;>*{font-size:inherit;max-inline-size:none}}}}
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --__fit-text-captured-length{syntax:"<length>";inherits:true;initial-value:0}@property --vui-fit-text-max-font-size{syntax:"<length>";inherits:true;initial-value:calc(infinity * 1px)}@property --__fit-text-available-space{syntax:"<length>";inherits:true;initial-value:0}@property --__fit-text-ratio{syntax:"<number>";inherits:false;initial-value:1}.viraui__fit-text-module__FitText_CdAvq{--__fit-text-captured-length:initial;display:flex;container-type:inline-size;.viraui__fit-text-module__Container_bawpR{--__fit-text-captured-length:100cqi;--__fit-text-available-space:var(--__fit-text-captured-length);flex-grow:1;container-type:inline-size}.viraui__fit-text-module__Display_Hraif{--__fit-text-captured-length:100cqi;--__fit-text-ratio:tan(atan2(var(--__fit-text-available-space),var(--__fit-text-available-space) - var(--__fit-text-captured-length)));inline-size:var(--__fit-text-available-space);font-size:clamp(0px,1em * var(--__fit-text-ratio),var(--vui-fit-text-max-font-size));overflow:clip;>*{font-size:1em;max-inline-size:none;display:block}}.viraui__fit-text-module__Reference_6wCx7{visibility:hidden;>*{font-size:inherit;max-inline-size:none}}}}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type GlowTrackerEntry = {
|
|
2
|
+
el: HTMLElement;
|
|
3
|
+
proximity: number;
|
|
4
|
+
restingOpacity: number;
|
|
5
|
+
/** Unwrapped continuous angle written to `--vui-glow-starting-angle`. */
|
|
6
|
+
lastAngle?: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Advance `lastAngle` toward `rawDegrees` along the shortest arc so CSS
|
|
10
|
+
* transitions never interpolate the long way across the 0° seam.
|
|
11
|
+
*/
|
|
12
|
+
export declare const unwrapGlowAngle: (lastAngle: number | undefined, rawDegrees: number) => number;
|
|
13
|
+
export declare const registerGlow: (entry: GlowTrackerEntry) => void;
|
|
14
|
+
export declare const updateGlow: (entry: GlowTrackerEntry) => void;
|
|
15
|
+
export declare const unregisterGlow: (el: HTMLElement) => void;
|
|
16
|
+
/** Story / test helper: current document listener attach count (`0` or `1`). */
|
|
17
|
+
export declare const getGlowListenerCount: () => number;
|
|
18
|
+
/** Story / test helper: registered glow root count. */
|
|
19
|
+
export declare const getGlowRegistrySize: () => number;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//#region src/components/glow/glow-tracker.ts
|
|
2
|
+
var entries = /* @__PURE__ */ new Map();
|
|
3
|
+
var listenerCount = 0;
|
|
4
|
+
var rafId = null;
|
|
5
|
+
var pendingEvent = null;
|
|
6
|
+
var POINTER_QUERY = "(hover: hover) and (pointer: fine)";
|
|
7
|
+
var REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
8
|
+
var canTrackPointer = () => {
|
|
9
|
+
if (typeof window === "undefined" || typeof matchMedia !== "function") return false;
|
|
10
|
+
return matchMedia(POINTER_QUERY).matches && !matchMedia(REDUCED_MOTION_QUERY).matches;
|
|
11
|
+
};
|
|
12
|
+
/** Normalize degrees into `[0, 360)`. */
|
|
13
|
+
var normalizeAngle = (degrees) => (degrees % 360 + 360) % 360;
|
|
14
|
+
/**
|
|
15
|
+
* Advance `lastAngle` toward `rawDegrees` along the shortest arc so CSS
|
|
16
|
+
* transitions never interpolate the long way across the 0° seam.
|
|
17
|
+
*/
|
|
18
|
+
var unwrapGlowAngle = (lastAngle, rawDegrees) => {
|
|
19
|
+
const target = normalizeAngle(rawDegrees);
|
|
20
|
+
if (lastAngle === void 0) return target;
|
|
21
|
+
let delta = target - normalizeAngle(lastAngle);
|
|
22
|
+
if (delta > 180) delta -= 360;
|
|
23
|
+
else if (delta < -180) delta += 360;
|
|
24
|
+
return lastAngle + delta;
|
|
25
|
+
};
|
|
26
|
+
var paintEntry = (entry, event) => {
|
|
27
|
+
const bounds = entry.el.getBoundingClientRect();
|
|
28
|
+
const pointerX = event.clientX;
|
|
29
|
+
const pointerY = event.clientY;
|
|
30
|
+
const activeOpacity = pointerX > bounds.left - entry.proximity && pointerX < bounds.left + bounds.width + entry.proximity && pointerY > bounds.top - entry.proximity && pointerY < bounds.top + bounds.height + entry.proximity ? 1 : entry.restingOpacity;
|
|
31
|
+
const centerX = bounds.left + bounds.width * .5;
|
|
32
|
+
const centerY = bounds.top + bounds.height * .5;
|
|
33
|
+
let angle = Math.atan2(pointerY - centerY, pointerX - centerX) * 180 / Math.PI;
|
|
34
|
+
if (angle < 0) angle += 360;
|
|
35
|
+
const lastAngle = unwrapGlowAngle(entry.lastAngle, angle + 90);
|
|
36
|
+
entries.set(entry.el, {
|
|
37
|
+
...entry,
|
|
38
|
+
lastAngle
|
|
39
|
+
});
|
|
40
|
+
entry.el.style.setProperty("--vui-glow-starting-angle", String(lastAngle));
|
|
41
|
+
entry.el.style.setProperty("--vui-glow-active-opacity", String(activeOpacity));
|
|
42
|
+
};
|
|
43
|
+
var flushPaint = () => {
|
|
44
|
+
rafId = null;
|
|
45
|
+
const event = pendingEvent;
|
|
46
|
+
pendingEvent = null;
|
|
47
|
+
if (!event) return;
|
|
48
|
+
for (const entry of entries.values()) paintEntry(entry, event);
|
|
49
|
+
};
|
|
50
|
+
var onPointerMove = (event) => {
|
|
51
|
+
pendingEvent = event;
|
|
52
|
+
if (rafId !== null) return;
|
|
53
|
+
rafId = requestAnimationFrame(flushPaint);
|
|
54
|
+
};
|
|
55
|
+
var attachListener = () => {
|
|
56
|
+
if (listenerCount > 0 || !canTrackPointer()) return;
|
|
57
|
+
document.addEventListener("pointermove", onPointerMove);
|
|
58
|
+
listenerCount = 1;
|
|
59
|
+
};
|
|
60
|
+
var detachListener = () => {
|
|
61
|
+
if (listenerCount === 0 || entries.size > 0) return;
|
|
62
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
63
|
+
listenerCount = 0;
|
|
64
|
+
if (rafId !== null) {
|
|
65
|
+
cancelAnimationFrame(rafId);
|
|
66
|
+
rafId = null;
|
|
67
|
+
}
|
|
68
|
+
pendingEvent = null;
|
|
69
|
+
};
|
|
70
|
+
var registerGlow = (entry) => {
|
|
71
|
+
const existing = entries.get(entry.el);
|
|
72
|
+
entries.set(entry.el, {
|
|
73
|
+
...entry,
|
|
74
|
+
...existing?.lastAngle !== void 0 && { lastAngle: existing.lastAngle }
|
|
75
|
+
});
|
|
76
|
+
attachListener();
|
|
77
|
+
};
|
|
78
|
+
var unregisterGlow = (el) => {
|
|
79
|
+
entries.delete(el);
|
|
80
|
+
detachListener();
|
|
81
|
+
};
|
|
82
|
+
/** Story / test helper: current document listener attach count (`0` or `1`). */
|
|
83
|
+
var getGlowListenerCount = () => listenerCount;
|
|
84
|
+
/** Story / test helper: registered glow root count. */
|
|
85
|
+
var getGlowRegistrySize = () => entries.size;
|
|
86
|
+
//#endregion
|
|
87
|
+
export { getGlowListenerCount, getGlowRegistrySize, registerGlow, unregisterGlow, unwrapGlowAngle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-glow-starting-angle{syntax:"<number>";inherits:true;initial-value:0}@property --vui-glow-angle-lag{syntax:"<time>";inherits:true;initial-value:80ms}@property --vui-glow-auto-rotate-speed{syntax:"<time>";inherits:true;initial-value:4s}@property --vui-glow-active-opacity{syntax:"<number>";inherits:true;initial-value:0}@property --vui-glow-spread{syntax:"<number>";inherits:true;initial-value:250}@property --vui-glow-border-width{syntax:"<length>";inherits:true;initial-value:2px}@property --vui-glow-border-color{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-glow-border-offset{syntax:"<length>";inherits:true;initial-value:5px}@property --vui-glow-color{syntax:"*";inherits:true;initial-value:#0000}@property --__glow-radius-tl{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --__glow-radius-tr{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --__glow-radius-br{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --__glow-radius-bl{syntax:"<length-percentage>";inherits:true;initial-value:0}@keyframes viraui__glow-module__vui-glow-auto-rotate_Zh-hL{0%{--vui-glow-starting-angle:0}to{--vui-glow-starting-angle:360}}.viraui__glow-module__Glow_7394e{--vui-glow-border-color:var(--global-contrast);--vui-glow-color:conic-gradient(from 180deg at 50% 70%,#0000,var(--global-primary),#0000);--__glow-radius-tl:var(--vui-surface-border-radius-top-left);--__glow-radius-tr:var(--vui-surface-border-radius-top-right);--__glow-radius-br:var(--vui-surface-border-radius-bottom-right);--__glow-radius-bl:var(--vui-surface-border-radius-bottom-left);position:relative;z-index:0;transition:--vui-glow-starting-angle var(--vui-glow-angle-lag) ease-out;&[data-glow-fit-content=true]{max-width:fit-content}&[data-glow-rainbow=true]{--vui-glow-color:conic-gradient(from 180deg at 50% 50%,var(--highlight-cyan),var(--highlight-blue),var(--highlight-green),var(--highlight-purple),var(--highlight-red),var(--highlight-indigo),var(--highlight-yellow),var(--highlight-salmon),var(--highlight-magenta),var(--highlight-cyan))}&[data-glow-auto-rotate=true]{--vui-glow-active-opacity:1;transition:none;animation:viraui__glow-module__vui-glow-auto-rotate_Zh-hL var(--vui-glow-auto-rotate-speed) linear infinite;@media (prefers-reduced-motion:reduce){animation:none}}&:after,&:before{content:"";position:absolute;z-index:1;pointer-events:none;inset:calc(var(--vui-glow-border-offset) * -1);opacity:var(--vui-glow-active-opacity);border:var(--vui-glow-border-width) solid #0000;border-radius:calc(var(--vui-glow-border-offset) + var(--__glow-radius-tl)) calc(var(--vui-glow-border-offset) + var(--__glow-radius-tr)) calc(var(--vui-glow-border-offset) + var(--__glow-radius-br)) calc(var(--vui-glow-border-offset) + var(--__glow-radius-bl));transition:opacity 1s;@media (prefers-reduced-motion:reduce){display:none}}&:not([data-glow-auto-rotate=true]){&:after,&:before{@media (hover:none),(pointer:coarse){display:none}}}&:before{background:var(--vui-glow-border-color);mask:linear-gradient(#0000,#0000),conic-gradient(from calc(((var(--vui-glow-starting-angle) + (var(--vui-glow-spread) * .25)) - (var(--vui-glow-spread) * 1.5)) * 1deg),oklch(100% 0 0deg/15%) 0deg,#fff,oklch(100% 0 0deg/15%) calc(var(--vui-glow-spread) * 2.5deg));mask-clip:padding-box,border-box;mask-composite:intersect}&:after{background:var(--vui-glow-color);filter:brightness(1.5);mask:linear-gradient(#0000,#0000),conic-gradient(from calc(((var(--vui-glow-starting-angle) + (var(--vui-glow-spread) * .25)) - (var(--vui-glow-spread) * .5)) * 1deg),#0000 0deg,#fff,#0000 calc(var(--vui-glow-spread) * .5deg));mask-clip:padding-box,border-box;mask-composite:intersect;background-size:calc(100% + var(--vui-glow-border-width) * 2) calc(100% + var(--vui-glow-border-width) * 2);background-position:calc(var(--vui-glow-border-width) * -1) calc(var(--vui-glow-border-width) * -1)}&[data-glow-global=true]:after{background-attachment:fixed}}}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { SurfaceProps } from '../surface';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Public Glow props.
|
|
5
|
+
*
|
|
6
|
+
* Glow root is a transparent Surface shell that exposes only `radius` (token, per-corner
|
|
7
|
+
* tuple, or `auto`). Put the visual card as children (typically `Surface` with `radius="auto"`).
|
|
8
|
+
*
|
|
9
|
+
* @default Glow-owned props use the defaults below; `radius` keeps Surface defaults when omitted.
|
|
10
|
+
*/
|
|
11
|
+
export type GlowProps = React.ComponentProps<'div'> & Pick<SurfaceProps, 'radius'> & {
|
|
12
|
+
/**
|
|
13
|
+
* Distance from the surface edge where the glow becomes fully active.
|
|
14
|
+
*
|
|
15
|
+
* @default 170
|
|
16
|
+
*/
|
|
17
|
+
proximity?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Angular width of the highlighted arc (degrees, used as a unitless CSS number).
|
|
20
|
+
*
|
|
21
|
+
* @default 250
|
|
22
|
+
*/
|
|
23
|
+
spread?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Resting opacity of the glow when the pointer is outside proximity.
|
|
26
|
+
*
|
|
27
|
+
* @default 0
|
|
28
|
+
*/
|
|
29
|
+
opacity?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Shrinks the root to fit its content (`max-width: fit-content`).
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
fitContent?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Width of the masked glow border ring.
|
|
38
|
+
*
|
|
39
|
+
* @default 2
|
|
40
|
+
*/
|
|
41
|
+
borderWidth?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Color of the masked border ring under the highlight.
|
|
44
|
+
*
|
|
45
|
+
* @default var(--global-contrast)
|
|
46
|
+
*/
|
|
47
|
+
borderColor?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Offset of the glow ring from the surface edge. Negative values place the ring outside.
|
|
50
|
+
*
|
|
51
|
+
* @default 5
|
|
52
|
+
*/
|
|
53
|
+
borderOffset?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Overrides the glow gradient with a solid color or custom background value.
|
|
56
|
+
* Ignored when `rainbowColors` is true.
|
|
57
|
+
*
|
|
58
|
+
* @default Theme highlight conic gradient
|
|
59
|
+
*/
|
|
60
|
+
glowColor?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Shares the highlight gradient across cards via `background-attachment: fixed`.
|
|
63
|
+
* Forced off when `rainbowColors` is true.
|
|
64
|
+
*
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
67
|
+
globalHighlight?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Uses the multi-stop rainbow highlight gradient and disables global highlight attachment.
|
|
70
|
+
*
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
rainbowColors?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* CSS transition duration (ms) for `--vui-glow-starting-angle`. Soft follow by default;
|
|
76
|
+
* set `0` for instant snap. Tracker writes an unwrapped continuous angle so the
|
|
77
|
+
* transition does not take the long way across the 0° seam.
|
|
78
|
+
* Ignored when `autoRotate` is true.
|
|
79
|
+
*
|
|
80
|
+
* @default 80
|
|
81
|
+
*/
|
|
82
|
+
angleLag?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Continuously rotates the highlight with a linear CSS animation and ignores the pointer.
|
|
85
|
+
* Always visible (including coarse pointers); still hidden under `prefers-reduced-motion`.
|
|
86
|
+
*
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
autoRotate?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Full-turn duration in seconds when `autoRotate` is true.
|
|
92
|
+
*
|
|
93
|
+
* @default 2
|
|
94
|
+
*/
|
|
95
|
+
autoRotateSpeed?: number;
|
|
96
|
+
};
|
|
97
|
+
export declare const Glow: React.FC<GlowProps>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Glow",
|
|
3
|
+
"structure": "<Glow>{children}</Glow>",
|
|
4
|
+
"summary": "Decorative pointer-driven border highlight on a transparent Surface shell (radius only). Put the visual card as children; a shared rAF tracker paints CSS variables without React re-renders.",
|
|
5
|
+
"whenToUse": [
|
|
6
|
+
"Wrap a Surface (or other content) that should highlight toward the pointer",
|
|
7
|
+
"Grid of glow shells that share one pointer highlight path",
|
|
8
|
+
"Nested glow inside a padded Surface using radius=\"auto\"",
|
|
9
|
+
"Decorative continuous spin with autoRotate (no pointer)"
|
|
10
|
+
],
|
|
11
|
+
"whenNotToUse": [
|
|
12
|
+
"Static borders with no pointer interaction — use Surface border instead",
|
|
13
|
+
"Accessible status or focus indication — glow is decorative only",
|
|
14
|
+
"As a replacement for Surface color/padding — compose Surface as children"
|
|
15
|
+
],
|
|
16
|
+
"accessibility": [
|
|
17
|
+
"Root stays in the accessibility tree; highlight is decorative CSS only",
|
|
18
|
+
"Glow is not a focus or status indicator — consumer owns accessible names and state",
|
|
19
|
+
"Pointer mode hides under coarse pointer / no-hover; autoRotate stays visible; both hide under prefers-reduced-motion"
|
|
20
|
+
],
|
|
21
|
+
"antiPatterns": [
|
|
22
|
+
"Relying on Glow for keyboard focus visibility",
|
|
23
|
+
"Treating Glow as the visual card (color/padding) instead of composing Surface children",
|
|
24
|
+
"Setting overflow:hidden on an ancestor Surface when outer glow must remain visible",
|
|
25
|
+
"Expecting soft bloom Light layer — Glow is border-ring only"
|
|
26
|
+
],
|
|
27
|
+
"related": ["Surface", "Shimmer", "ProgressiveBlur"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"react": {
|
|
30
|
+
"radius": {
|
|
31
|
+
"description": "Sets corner radius from the Vira radius token scale, a per-corner [top-left, top-right, bottom-right, bottom-left] tuple (0 for square corners), or auto for concentric radii from the nearest ancestor Surface."
|
|
32
|
+
},
|
|
33
|
+
"proximity": {
|
|
34
|
+
"description": "Distance from the surface edge where the glow becomes fully active."
|
|
35
|
+
},
|
|
36
|
+
"spread": {
|
|
37
|
+
"description": "Angular width of the highlighted arc (degrees, used as a unitless CSS number).",
|
|
38
|
+
"refCss": "spread"
|
|
39
|
+
},
|
|
40
|
+
"opacity": {
|
|
41
|
+
"description": "Resting opacity of the glow when the pointer is outside proximity."
|
|
42
|
+
},
|
|
43
|
+
"fitContent": {
|
|
44
|
+
"description": "Shrinks the root to fit its content (`max-width: fit-content`)."
|
|
45
|
+
},
|
|
46
|
+
"borderWidth": {
|
|
47
|
+
"description": "Width of the masked glow border ring.",
|
|
48
|
+
"refCss": "border-width"
|
|
49
|
+
},
|
|
50
|
+
"borderColor": {
|
|
51
|
+
"description": "Color of the masked border ring under the highlight.",
|
|
52
|
+
"refCss": "border-color"
|
|
53
|
+
},
|
|
54
|
+
"borderOffset": {
|
|
55
|
+
"description": "Offset of the glow ring from the surface edge. Negative values place the ring outside.",
|
|
56
|
+
"refCss": "border-offset"
|
|
57
|
+
},
|
|
58
|
+
"glowColor": {
|
|
59
|
+
"description": "Overrides the glow gradient with a solid color or custom background value. Ignored when `rainbowColors` is true.",
|
|
60
|
+
"refCss": "color"
|
|
61
|
+
},
|
|
62
|
+
"globalHighlight": {
|
|
63
|
+
"description": "Shares the highlight gradient across cards via `background-attachment: fixed`. Forced off when `rainbowColors` is true."
|
|
64
|
+
},
|
|
65
|
+
"rainbowColors": {
|
|
66
|
+
"description": "Uses the multi-stop rainbow highlight gradient and disables global highlight attachment."
|
|
67
|
+
},
|
|
68
|
+
"angleLag": {
|
|
69
|
+
"description": "CSS transition duration in milliseconds for the pointer-driven starting angle. Soft follow by default; set 0 for instant snap. Ignored when autoRotate is true.",
|
|
70
|
+
"refCss": "angle-lag"
|
|
71
|
+
},
|
|
72
|
+
"autoRotate": {
|
|
73
|
+
"description": "Continuously rotates the highlight with a linear CSS animation and ignores the pointer. Always visible including on coarse pointers; still hidden under prefers-reduced-motion."
|
|
74
|
+
},
|
|
75
|
+
"autoRotateSpeed": {
|
|
76
|
+
"description": "Full-turn duration in seconds when autoRotate is true.",
|
|
77
|
+
"refCss": "auto-rotate-speed"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"css": {
|
|
81
|
+
"starting-angle": {
|
|
82
|
+
"description": "Conic gradient start angle in degrees (unitless number). Pointer tracker writes a continuous unwrapped value; autoRotate animates 0→360."
|
|
83
|
+
},
|
|
84
|
+
"angle-lag": {
|
|
85
|
+
"description": "Transition duration for `--vui-glow-starting-angle` (pointer mode).",
|
|
86
|
+
"refReact": "angleLag"
|
|
87
|
+
},
|
|
88
|
+
"auto-rotate-speed": {
|
|
89
|
+
"description": "Duration of one full auto-rotate turn.",
|
|
90
|
+
"refReact": "autoRotateSpeed"
|
|
91
|
+
},
|
|
92
|
+
"active-opacity": {
|
|
93
|
+
"description": "Current glow opacity from proximity tracking. Written by the shared tracker."
|
|
94
|
+
},
|
|
95
|
+
"spread": {
|
|
96
|
+
"description": "Angular width of the highlighted arc.",
|
|
97
|
+
"refReact": "spread"
|
|
98
|
+
},
|
|
99
|
+
"border-width": {
|
|
100
|
+
"description": "Masked glow border ring width.",
|
|
101
|
+
"refReact": "borderWidth"
|
|
102
|
+
},
|
|
103
|
+
"border-color": {
|
|
104
|
+
"description": "Masked border ring color under the highlight.",
|
|
105
|
+
"refReact": "borderColor"
|
|
106
|
+
},
|
|
107
|
+
"border-offset": {
|
|
108
|
+
"description": "Glow ring offset from the surface edge.",
|
|
109
|
+
"refReact": "borderOffset"
|
|
110
|
+
},
|
|
111
|
+
"color": {
|
|
112
|
+
"description": "Glow fill (solid color or gradient).",
|
|
113
|
+
"refReact": "glowColor"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import './glow.css';
|
|
3
|
+
import { clsx } from "../../core/clsx.js";
|
|
4
|
+
import { Surface } from "../surface/surface.js";
|
|
5
|
+
import { registerGlow, unregisterGlow } from "./glow-tracker.js";
|
|
6
|
+
import glow_module_default from "./glow.module.js";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { useEffect, useRef } from "react";
|
|
9
|
+
//#region src/components/glow/glow.tsx
|
|
10
|
+
var assignRef = (ref, value) => {
|
|
11
|
+
if (typeof ref === "function") {
|
|
12
|
+
ref(value);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (ref) Reflect.set(ref, "current", value);
|
|
16
|
+
};
|
|
17
|
+
var glowGlobalAttr = (rainbowColors, globalHighlight) => {
|
|
18
|
+
if (rainbowColors) return "false";
|
|
19
|
+
return globalHighlight ? "true" : "false";
|
|
20
|
+
};
|
|
21
|
+
var Glow = ({ angleLag = 80, autoRotate = false, autoRotateSpeed = 4, borderColor = "var(--global-contrast)", borderOffset = 5, borderWidth = 2, children, className, fitContent = false, globalHighlight = true, glowColor, opacity = 0, proximity = 170, rainbowColors = false, ref, spread = 250, style, radius, ...otherProps }) => {
|
|
22
|
+
const rootRef = useRef(null);
|
|
23
|
+
const setRootRef = (node) => {
|
|
24
|
+
rootRef.current = node;
|
|
25
|
+
assignRef(ref, node);
|
|
26
|
+
};
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const el = rootRef.current;
|
|
29
|
+
if (!el || autoRotate) return;
|
|
30
|
+
registerGlow({
|
|
31
|
+
el,
|
|
32
|
+
proximity,
|
|
33
|
+
restingOpacity: opacity
|
|
34
|
+
});
|
|
35
|
+
return () => {
|
|
36
|
+
unregisterGlow(el);
|
|
37
|
+
};
|
|
38
|
+
}, [
|
|
39
|
+
autoRotate,
|
|
40
|
+
proximity,
|
|
41
|
+
opacity
|
|
42
|
+
]);
|
|
43
|
+
const dynamicStyle = {
|
|
44
|
+
"--vui-glow-spread": spread,
|
|
45
|
+
"--vui-glow-border-width": `${borderWidth}px`,
|
|
46
|
+
"--vui-glow-border-color": borderColor,
|
|
47
|
+
"--vui-glow-border-offset": `${borderOffset}px`,
|
|
48
|
+
"--vui-glow-angle-lag": `${angleLag}ms`,
|
|
49
|
+
"--vui-glow-auto-rotate-speed": `${autoRotateSpeed}s`,
|
|
50
|
+
...glowColor && !rainbowColors && { "--vui-glow-color": glowColor },
|
|
51
|
+
...style
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ jsx(Surface, {
|
|
54
|
+
...otherProps,
|
|
55
|
+
ref: setRootRef,
|
|
56
|
+
className: clsx(glow_module_default.Glow, className),
|
|
57
|
+
style: dynamicStyle,
|
|
58
|
+
radius,
|
|
59
|
+
"data-glow-fit-content": fitContent ? "true" : "false",
|
|
60
|
+
"data-glow-global": glowGlobalAttr(rainbowColors, globalHighlight),
|
|
61
|
+
"data-glow-rainbow": rainbowColors ? "true" : "false",
|
|
62
|
+
"data-glow-auto-rotate": autoRotate ? "true" : "false",
|
|
63
|
+
children
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
export { Glow };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/components/glow/glow.module.css
|
|
2
|
+
var Glow = "viraui__glow-module__Glow_7394e";
|
|
3
|
+
var glow_module_default = {
|
|
4
|
+
Glow,
|
|
5
|
+
"vui-glow-auto-rotate": "viraui__glow-module__vui-glow-auto-rotate_Zh-hL"
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Glow, glow_module_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChromeXmark } from "../../internal/chrome-icons/chrome-icons.js";
|
|
2
2
|
import { Text } from "../text/text.js";
|
|
3
3
|
import { Stack } from "../stack/stack.js";
|
|
4
|
-
import { IconButton } from "../icon-button/icon-button.js";
|
|
5
4
|
import { Surface } from "../surface/surface.js";
|
|
5
|
+
import { IconButton } from "../icon-button/icon-button.js";
|
|
6
6
|
import popover_module_default from "./popover.module.js";
|
|
7
7
|
import { Title } from "../title/title.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-select-input-height{syntax:"<length>";inherits:true;initial-value:0}@property --vui-select-control-group-background{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-select-control-group-color{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-select-control-group-border-color{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-select-control-group-border-radius{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --vui-select-trigger-padding-inline-start{syntax:"<length>";inherits:true;initial-value:0}@property --vui-select-trigger-padding-inline-end{syntax:"<length>";inherits:true;initial-value:0}@property --vui-select-list-border-radius{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --vui-select-list-padding{syntax:"<length>";inherits:true;initial-value:0}@property --__select-list-appear-offset{syntax:"<length>";inherits:false;initial-value:8px}.viraui__select-module__Select_eXv4Y{--vui-select-input-height:var(--space-2x-large);--vui-select-control-group-background:var(--base-1);--vui-select-control-group-color:var(--global-foreground);--vui-select-control-group-border-color:var(--global-contrast);--vui-select-control-group-border-radius:var(--radius-medium);--vui-select-trigger-padding-inline-start:var(--space-small);--vui-select-trigger-padding-inline-end:var(--space-x-small);--vui-field-label-padding-inline:calc((var(--vui-select-control-group-border-radius) + 0px) / 2);z-index:0;&:has([required]) .viraui__select-module__Label_-Y1fR{&:after{content:" *";color:var(--highlight-red)}&:dir(rtl){&:after{content:none}&:before{content:"* ";color:var(--highlight-red)}}}&[data-invalid]>.viraui__select-module__Trigger_-wBsg:not(:disabled):not([data-disabled]){--vui-select-control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}}.viraui__select-module__Trigger_-wBsg{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--vui-select-input-height);padding-inline:var(--vui-select-trigger-padding-inline-start) var(--vui-select-trigger-padding-inline-end);border:1px solid var(--vui-select-control-group-border-color);border-radius:var(--vui-select-control-group-border-radius);background:var(--vui-select-control-group-background);color:var(--vui-select-control-group-color);font:inherit;text-align:start;cursor:pointer;&[data-popup-open]{outline:none}&:disabled,&[data-disabled]{--vui-select-control-group-background:var(--global-disabled-background);--vui-select-control-group-border-color:#0000;--vui-select-control-group-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.viraui__select-module__Icon_EOwki{font-size:var(--font-scale-body-small);pointer-events:none}.viraui__select-module__Description_OmwmV{padding-inline:calc((var(--vui-select-control-group-border-radius) + 0px) / 2)}.viraui__select-module__SelectPopup_UzGXL{--vui-select-list-border-radius:var(--radius-medium);--vui-select-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(--__select-list-appear-offset) * -1)}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{translate:0 var(--__select-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(--__select-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(--__select-list-appear-offset) * -1) 0}&[data-side=none]{transition:none;scale:1;translate:0;opacity:1}}.viraui__select-module__ScrollArrow_kHlEi{position:absolute;inset-inline:0;z-index:1;inline-size:100%;block-size:var(--space-large);cursor:default;background:var(--base-1);border:1px solid var(--global-contrast);@container root not style(--vibrancy-enable: initial){background:oklab(from var(--base-1) l a b/80%);backdrop-filter:brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px))}}.viraui__select-module__ScrollButton_sHBOa{pointer-events:none}.viraui__select-module__ScrollArrowUp_DGXS-{inset-block-start:0;border-radius:var(--vui-select-list-border-radius) var(--vui-select-list-border-radius) 0 0}.viraui__select-module__ScrollArrowDown_vhJy0{inset-block-end:0;border-radius:0 0 var(--vui-select-list-border-radius) var(--vui-select-list-border-radius)}.viraui__select-module__List_jdUWx{box-sizing:border-box;inline-size:100%;max-block-size:var(--available-height);scroll-padding-block:var(--vui-select-list-padding);overscroll-behavior:contain;&:focus,&:focus-visible{outline:none}}.viraui__select-module__Indicator_YNUuz{min-inline-size:var(--space-medium);min-block-size:var(--space-medium);inline-size:fit-content;block-size:fit-content;color:var(--global-primary);opacity:0;transition:opacity var(--duration-fast) var(--easing-standard),transform var(--duration-fast) var(--easing-standard);&[data-selected]{opacity:1}}}@layer viraui.overrides{.viraui__select-module__Value_uWHPX{flex:1 1 auto;min-inline-size:0;overflow:hidden;display:block;text-overflow:ellipsis;&[data-placeholder]{color:var(--global-disabled-foreground)}}.viraui__select-module__Option_KgYqz{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%)}}&:not([data-disabled],:hover)[data-selected]{background:light-dark(oklab(from var(--global-contrast) l a b/8%),oklab(from var(--global-contrast) l a b/5%))}&[data-disabled]{color:var(--global-disabled-foreground);cursor:not-allowed}}}
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-select-input-height{syntax:"<length>";inherits:true;initial-value:0}@property --vui-select-control-group-background{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-select-control-group-color{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-select-control-group-border-color{syntax:"<color>";inherits:true;initial-value:#0000}@property --vui-select-control-group-border-radius{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --vui-select-trigger-padding-inline-start{syntax:"<length>";inherits:true;initial-value:0}@property --vui-select-trigger-padding-inline-end{syntax:"<length>";inherits:true;initial-value:0}@property --vui-select-list-border-radius{syntax:"<length-percentage>";inherits:true;initial-value:0}@property --vui-select-list-padding{syntax:"<length>";inherits:true;initial-value:0}@property --__select-list-appear-offset{syntax:"<length>";inherits:false;initial-value:8px}.viraui__select-module__Select_eXv4Y{--vui-select-input-height:var(--space-2x-large);--vui-select-control-group-background:var(--base-1);--vui-select-control-group-color:var(--global-foreground);--vui-select-control-group-border-color:var(--global-contrast);--vui-select-control-group-border-radius:var(--radius-medium);--vui-select-trigger-padding-inline-start:calc(var(--space-small) + var(--space-x-small));--vui-select-trigger-padding-inline-end:var(--space-x-small);--vui-field-label-padding-inline:calc((var(--vui-select-control-group-border-radius) + 0px) / 2);z-index:0;&:has([required]) .viraui__select-module__Label_-Y1fR{&:after{content:" *";color:var(--highlight-red)}&:dir(rtl){&:after{content:none}&:before{content:"* ";color:var(--highlight-red)}}}&[data-invalid]>.viraui__select-module__Trigger_-wBsg:not(:disabled):not([data-disabled]){--vui-select-control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}}.viraui__select-module__Trigger_-wBsg{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--vui-select-input-height);padding-inline:var(--vui-select-trigger-padding-inline-start) var(--vui-select-trigger-padding-inline-end);border:1px solid var(--vui-select-control-group-border-color);border-radius:var(--vui-select-control-group-border-radius);background:var(--vui-select-control-group-background);color:var(--vui-select-control-group-color);font:inherit;text-align:start;cursor:pointer;&[data-popup-open]{outline:none}&:disabled,&[data-disabled]{--vui-select-control-group-background:var(--global-disabled-background);--vui-select-control-group-border-color:#0000;--vui-select-control-group-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.viraui__select-module__Icon_EOwki{font-size:var(--font-scale-body-small);pointer-events:none}.viraui__select-module__Description_OmwmV{padding-inline:calc((var(--vui-select-control-group-border-radius) + 0px) / 2)}.viraui__select-module__SelectPopup_UzGXL{--vui-select-list-border-radius:var(--radius-medium);--vui-select-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(--__select-list-appear-offset) * -1)}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{translate:0 var(--__select-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(--__select-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(--__select-list-appear-offset) * -1) 0}&[data-side=none]{transition:none;scale:1;translate:0;opacity:1}}.viraui__select-module__ScrollArrow_kHlEi{position:absolute;inset-inline:0;z-index:1;inline-size:100%;block-size:var(--space-large);cursor:default;background:var(--base-1);border:1px solid var(--global-contrast);@container root not style(--vibrancy-enable: initial){background:oklab(from var(--base-1) l a b/80%);backdrop-filter:brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px))}}.viraui__select-module__ScrollButton_sHBOa{pointer-events:none}.viraui__select-module__ScrollArrowUp_DGXS-{inset-block-start:0;border-radius:var(--vui-select-list-border-radius) var(--vui-select-list-border-radius) 0 0}.viraui__select-module__ScrollArrowDown_vhJy0{inset-block-end:0;border-radius:0 0 var(--vui-select-list-border-radius) var(--vui-select-list-border-radius)}.viraui__select-module__List_jdUWx{box-sizing:border-box;inline-size:100%;max-block-size:var(--available-height);scroll-padding-block:var(--vui-select-list-padding);overscroll-behavior:contain;&:focus,&:focus-visible{outline:none}}.viraui__select-module__Indicator_YNUuz{min-inline-size:var(--space-medium);min-block-size:var(--space-medium);inline-size:fit-content;block-size:fit-content;color:var(--global-primary);opacity:0;transition:opacity var(--duration-fast) var(--easing-standard),transform var(--duration-fast) var(--easing-standard);&[data-selected]{opacity:1}}}@layer viraui.overrides{.viraui__select-module__Value_uWHPX{flex:1 1 auto;min-inline-size:0;overflow:hidden;display:block;text-overflow:ellipsis;&[data-placeholder]{color:var(--global-disabled-foreground)}}.viraui__select-module__Option_KgYqz{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%)}}&:not([data-disabled],:hover)[data-selected]{background:light-dark(oklab(from var(--global-contrast) l a b/8%),oklab(from var(--global-contrast) l a b/5%))}&[data-disabled]{color:var(--global-disabled-foreground);cursor:not-allowed}}}
|
|
@@ -7,8 +7,8 @@ import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
|
|
|
7
7
|
import { FieldLabel } from "../basic-input/field-label.js";
|
|
8
8
|
import { Stack } from "../stack/stack.js";
|
|
9
9
|
import { Elevator } from "../elevator/elevator.js";
|
|
10
|
-
import { IconButton } from "../icon-button/icon-button.js";
|
|
11
10
|
import { Surface } from "../surface/surface.js";
|
|
11
|
+
import { IconButton } from "../icon-button/icon-button.js";
|
|
12
12
|
import select_module_default from "./select.module.js";
|
|
13
13
|
import { SelectGroup } from "./select-group.js";
|
|
14
14
|
import { SelectOption } from "./select-option.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-surface-background{syntax:"*";inherits:false;initial-value:none}@property --vui-surface-background-hover{syntax:"*";inherits:false;initial-value:none}@property --vui-surface-border-style{syntax:"<custom-ident>";inherits:false;initial-value:solid}@property --vui-surface-overflow{syntax:"<custom-ident>";inherits:false;initial-value:visible}@property --vui-surface-border-radius{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-border-radius-top-left{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-border-radius-top-right{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-border-radius-bottom-right{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-border-radius-bottom-left{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-padding-inline-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-surface-padding-inline-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-surface-padding-block-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-surface-padding-block-end{syntax:"<length>";inherits:false;initial-value:0}.viraui__surface-module__Surface_slEYq{--vui-surface-border-radius-top-left:var(--vui-surface-border-radius);--vui-surface-border-radius-top-right:var(--vui-surface-border-radius);--vui-surface-border-radius-bottom-right:var(--vui-surface-border-radius);--vui-surface-border-radius-bottom-left:var(--vui-surface-border-radius);--vui-surface-background-hover:var(--vui-surface-background);position:relative;overflow:var(--vui-surface-overflow);box-sizing:border-box;background:var(--vui-surface-background);border-radius:var(--vui-surface-border-radius-top-left) var(--vui-surface-border-radius-top-right) var(--vui-surface-border-radius-bottom-right) var(--vui-surface-border-radius-bottom-left);border:0
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-surface-background{syntax:"*";inherits:false;initial-value:none}@property --vui-surface-background-hover{syntax:"*";inherits:false;initial-value:none}@property --vui-surface-border-style{syntax:"<custom-ident>";inherits:false;initial-value:solid}@property --vui-surface-overflow{syntax:"<custom-ident>";inherits:false;initial-value:visible}@property --vui-surface-border-radius{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-border-radius-top-left{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-border-radius-top-right{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-border-radius-bottom-right{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-border-radius-bottom-left{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-surface-padding-inline-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-surface-padding-inline-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-surface-padding-block-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-surface-padding-block-end{syntax:"<length>";inherits:false;initial-value:0}.viraui__surface-module__Surface_slEYq{--vui-surface-border-radius-top-left:var(--vui-surface-border-radius);--vui-surface-border-radius-top-right:var(--vui-surface-border-radius);--vui-surface-border-radius-bottom-right:var(--vui-surface-border-radius);--vui-surface-border-radius-bottom-left:var(--vui-surface-border-radius);--vui-surface-background-hover:var(--vui-surface-background);position:relative;overflow:var(--vui-surface-overflow);box-sizing:border-box;background:var(--vui-surface-background);border-radius:var(--vui-surface-border-radius-top-left) var(--vui-surface-border-radius-top-right) var(--vui-surface-border-radius-bottom-right) var(--vui-surface-border-radius-bottom-left);border:0;&[data-surface-color=primary]{--vui-surface-background:light-dark(oklab(from var(--global-primary) l a b/20%),oklab(from var(--global-primary) l a b/10%))}&[data-surface-hover-color=primary]{--vui-surface-background-hover:light-dark(oklab(from var(--global-primary) l a b/20%),oklab(from var(--global-primary) l a b/10%))}@container root not style(--vibrancy-enable: initial){&[data-vibrant]{background:light-dark(oklab(from var(--vui-surface-background) l a b/60%),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)}&[data-surface-border=all]{border-width:1px}&[data-surface-border=top]{border-width:1px 0 0}&[data-surface-border=right]{border-width:0 1px 0 0}&[data-surface-border=bottom]{border-width:0 0 1px}&[data-surface-border=left]{border-width:0 0 0 1px}&[data-surface-border=x]{border-width:0 1px}&[data-surface-border=y]{border-width:1px 0}@media (hover:hover) and (pointer:fine){&[data-surface-has-hover-color=true]:hover{background:var(--vui-surface-background-hover)}}}}
|
|
@@ -3,7 +3,9 @@ import { SurfacePadding, SurfaceRadiusInput } from './surface-radius-context';
|
|
|
3
3
|
import type * as React from 'react';
|
|
4
4
|
/** Base ramp layer for nested surfaces; clamped to 1–3 at runtime. */
|
|
5
5
|
type SurfaceBaseLevel = 1 | 2 | 3;
|
|
6
|
-
|
|
6
|
+
/** Named surface color tokens resolved via `data-surface-color` / `data-surface-hover-color` CSS hooks. */
|
|
7
|
+
type SurfaceColorToken = 'primary';
|
|
8
|
+
type SurfaceColor = string | SurfaceBaseLevel | SurfaceColorToken;
|
|
7
9
|
/**
|
|
8
10
|
* Public Surface props.
|
|
9
11
|
*
|
|
@@ -26,13 +28,15 @@ export type SurfaceProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'color'>
|
|
|
26
28
|
*/
|
|
27
29
|
ref?: React.Ref<HTMLElement>;
|
|
28
30
|
/**
|
|
29
|
-
* Sets the resting background using a base ramp layer (`1`–`3`)
|
|
31
|
+
* Sets the resting background using a base ramp layer (`1`–`3`), a literal CSS color value, or the named token
|
|
32
|
+
* `primary` (`data-surface-color="primary"`; CSS owns light/dark opacity via `--global-primary`).
|
|
30
33
|
*
|
|
31
34
|
* @default No background.
|
|
32
35
|
*/
|
|
33
36
|
color?: SurfaceColor;
|
|
34
37
|
/**
|
|
35
|
-
* Sets the hover background on hover-capable pointers using a base ramp layer (`1`–`3`)
|
|
38
|
+
* Sets the hover background on hover-capable pointers using a base ramp layer (`1`–`3`), a literal CSS value, or the
|
|
39
|
+
* named token `primary` (`data-surface-hover-color="primary"`; CSS owns light/dark opacity via `--global-primary`).
|
|
36
40
|
*
|
|
37
41
|
* @default No hover color override.
|
|
38
42
|
*/
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"description": "Sets the CSS border style when `border` is set."
|
|
41
41
|
},
|
|
42
42
|
"color": {
|
|
43
|
-
"description": "Sets the resting background using a base ramp layer (`1`–`3`)
|
|
43
|
+
"description": "Sets the resting background using a base ramp layer (`1`–`3`), a literal CSS color value, or the named token `primary` (`data-surface-color=\"primary\"`; CSS owns light/dark opacity via `--global-primary`)."
|
|
44
44
|
},
|
|
45
45
|
"hoverColor": {
|
|
46
|
-
"description": "Sets the hover background on hover-capable pointers using a base ramp layer (`1`–`3`)
|
|
46
|
+
"description": "Sets the hover background on hover-capable pointers using a base ramp layer (`1`–`3`), a literal CSS value, or the named token `primary` (`data-surface-hover-color=\"primary\"`; CSS owns light/dark opacity via `--global-primary`)."
|
|
47
47
|
},
|
|
48
48
|
"hPadding": {
|
|
49
49
|
"description": "Sets inline padding using one token for both sides or a `[start, end]` tuple."
|
|
@@ -7,6 +7,7 @@ import surface_module_default from "./surface.module.js";
|
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { useRender } from "@base-ui/react/use-render";
|
|
9
9
|
//#region src/components/surface/surface.tsx
|
|
10
|
+
var isSurfaceColorToken = (value) => value === "primary";
|
|
10
11
|
var clampSurfaceBaseLevel = (value) => {
|
|
11
12
|
if (value <= 1) return 1;
|
|
12
13
|
if (value >= 3) return 3;
|
|
@@ -30,8 +31,8 @@ var Surface = ({ border, borderStyle = "solid", className, color, hPadding, hove
|
|
|
30
31
|
vPadding
|
|
31
32
|
});
|
|
32
33
|
const dynamicStyle = {
|
|
33
|
-
"--vui-surface-background": toSurfaceColor(color ?? "none"),
|
|
34
|
-
...hasHoverColor && { "--vui-surface-background-hover": toSurfaceColor(hoverColor) },
|
|
34
|
+
...!isSurfaceColorToken(color) && { "--vui-surface-background": toSurfaceColor(color ?? "none") },
|
|
35
|
+
...hasHoverColor && !isSurfaceColorToken(hoverColor) && { "--vui-surface-background-hover": toSurfaceColor(hoverColor) },
|
|
35
36
|
...border && { "--vui-surface-border-style": borderStyle },
|
|
36
37
|
...overflow && { "--vui-surface-overflow": overflow },
|
|
37
38
|
...radiusStyle,
|
|
@@ -47,6 +48,8 @@ var Surface = ({ border, borderStyle = "solid", className, color, hPadding, hove
|
|
|
47
48
|
...otherProps,
|
|
48
49
|
...border && { "data-surface-border": border },
|
|
49
50
|
...hasAutoRadius && { "data-surface-radius": "auto" },
|
|
51
|
+
...isSurfaceColorToken(color) && { "data-surface-color": color },
|
|
52
|
+
...isSurfaceColorToken(hoverColor) && { "data-surface-hover-color": hoverColor },
|
|
50
53
|
"data-surface-has-hover-color": hasHoverColor ? "true" : "false",
|
|
51
54
|
"data-surface-has-padding": hasPadding ? "true" : "false",
|
|
52
55
|
className: clsx(surface_module_default.Surface, className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-text-align{syntax:"*";inherits:false;initial-value:start}@property --vui-text-max-width{syntax:"*";inherits:false;initial-value:none}@property --vui-text-literal-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-text-white-space{syntax:"*";inherits:false;initial-value:normal}@property --vui-text-font-weight{syntax:"<number>";inherits:false;initial-value:400}@property --vui-text-font-width{syntax:"<number>";inherits:false;initial-value:100}@property --vui-text-font-opsz{syntax:"<number>";inherits:false;initial-value:16}@property --vui-text-trim{syntax:"*";inherits:false;initial-value:trim-both}@property --vui-text-trim-type{syntax:"*";inherits:false;initial-value:cap alphabetic}@property --vui-text-padding-inline-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-text-padding-inline-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-text-padding-block-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-text-padding-block-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-text-font-size{syntax:"<length>";inherits:false;initial-value:1rem}@property --vui-text-font-family{syntax:"*";inherits:false;initial-value:sans-serif}@property --vui-text-line-height{syntax:"normal | <number> | <length-percentage>";inherits:false;initial-value:normal}@property --__text-medium{syntax:"*";inherits:false;initial-value:0}.viraui__text-module__Text_bS8kv{--__text-medium:clamp(var(--font-scale-body-medium),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 12 + 0.24cqi),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 3));--vui-text-font-family:var(--font-family-body);--vui-text-font-size:clamp(var(--font-scale-body-small),var(--__text-medium),var(--font-scale-body-medium));--vui-text-line-height:var(--font-leading-standard);margin:0;min-inline-size:0;max-inline-size:var(--vui-text-max-width);font-family:var(--vui-text-font-family);font-size:var(--vui-text-font-size);line-height:var(--vui-text-line-height);text-align:var(--vui-text-align);white-space:var(--vui-text-white-space);word-break:break-word;
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-text-align{syntax:"*";inherits:false;initial-value:start}@property --vui-text-max-width{syntax:"*";inherits:false;initial-value:none}@property --vui-text-literal-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-text-white-space{syntax:"*";inherits:false;initial-value:normal}@property --vui-text-font-weight{syntax:"<number>";inherits:false;initial-value:400}@property --vui-text-font-width{syntax:"<number>";inherits:false;initial-value:100}@property --vui-text-font-opsz{syntax:"<number>";inherits:false;initial-value:16}@property --vui-text-trim{syntax:"*";inherits:false;initial-value:trim-both}@property --vui-text-trim-type{syntax:"*";inherits:false;initial-value:cap alphabetic}@property --vui-text-padding-inline-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-text-padding-inline-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-text-padding-block-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-text-padding-block-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-text-font-size{syntax:"<length>";inherits:false;initial-value:1rem}@property --vui-text-font-family{syntax:"*";inherits:false;initial-value:sans-serif}@property --vui-text-line-height{syntax:"normal | <number> | <length-percentage>";inherits:false;initial-value:normal}@property --__text-medium{syntax:"*";inherits:false;initial-value:0}.viraui__text-module__Text_bS8kv{--__text-medium:clamp(var(--font-scale-body-medium),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 12 + 0.24cqi),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 3));--vui-text-font-family:var(--font-family-body);--vui-text-font-size:clamp(var(--font-scale-body-small),var(--__text-medium),var(--font-scale-body-medium));--vui-text-line-height:var(--font-leading-standard);margin:0;min-inline-size:0;max-inline-size:var(--vui-text-max-width);font-family:var(--vui-text-font-family);font-size:var(--vui-text-font-size);line-height:var(--vui-text-line-height);text-align:var(--vui-text-align);white-space:var(--vui-text-white-space);word-break:break-word;font-weight:var(--vui-text-font-weight);font-stretch:calc(var(--vui-text-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-text-font-weight),"wdth" var(--vui-text-font-width),"opsz" var(--vui-text-font-opsz);text-box:var(--vui-text-trim) var(--vui-text-trim-type);&[data-text-balanced=true]{text-wrap:balance}&[data-text-selection=false]{-webkit-user-select:none;user-select:none}&[data-text-has-padding=true]{padding:var(--vui-text-padding-block-start) var(--vui-text-padding-inline-end) var(--vui-text-padding-block-end) var(--vui-text-padding-inline-start)}&[data-text-family=mono]{--vui-text-font-family:var(--font-family-mono)}&[data-text-size=x-large]{--vui-text-font-size:clamp(var(--font-scale-body-large),calc(var(--__text-medium) * pow(var(--font-heading-typescale), 2)),var(--font-scale-body-x-large))}&[data-text-size=large]{--vui-text-font-size:clamp(var(--font-scale-body-medium),calc(var(--__text-medium) * pow(var(--font-heading-typescale), 1)),var(--font-scale-body-large))}&[data-text-size=small]{--vui-text-font-size:clamp(var(--font-scale-body-x-small),calc(var(--__text-medium) * pow(var(--font-heading-typescale), -0.1)),var(--font-scale-body-small))}&[data-text-size=x-small]{--vui-text-font-size:var(--font-scale-body-x-small)}&[data-text-weight=light]{--vui-text-font-weight:200}&[data-text-weight=semibold]{--vui-text-font-weight:600}&[data-text-weight=bold]{--vui-text-font-weight:800}&[data-text-tone=muted]{color:var(--global-muted)}&[data-text-tone=interactive]{color:var(--global-interactive-text)}&[data-text-tone=positive]{color:var(--highlight-green)}&[data-text-tone=informative]{color:var(--highlight-blue)}&[data-text-tone=danger]{color:var(--highlight-red)}&[data-text-tone=warning]{color:var(--highlight-yellow)}&[data-text-has-literal-color=true]{color:var(--vui-text-literal-color)}&[data-text-line-height=none]{--vui-text-line-height:0}&[data-text-line-height=x-small]{--vui-text-line-height:var(--font-leading-x-small)}&[data-text-line-height=small]{--vui-text-line-height:var(--font-leading-small)}&[data-text-line-height=large]{--vui-text-line-height:var(--font-leading-large)}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-title-align{syntax:"*";inherits:false;initial-value:start}@property --vui-title-max-width{syntax:"*";inherits:false;initial-value:none}@property --vui-title-literal-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-title-white-space{syntax:"*";inherits:false;initial-value:normal}@property --vui-title-font-weight{syntax:"<number>";inherits:false;initial-value:500}@property --vui-title-font-width{syntax:"<number>";inherits:false;initial-value:100}@property --vui-title-font-opsz{syntax:"<number>";inherits:false;initial-value:16}@property --vui-title-trim{syntax:"*";inherits:false;initial-value:trim-both}@property --vui-title-trim-type{syntax:"*";inherits:false;initial-value:cap alphabetic}@property --vui-title-padding-inline-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-inline-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-block-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-block-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-font-size{syntax:"<length>";inherits:false;initial-value:1rem}@property --vui-title-line-height{syntax:"normal | <number> | <length-percentage>";inherits:false;initial-value:normal}@property --vui-title-letter-spacing{syntax:"normal | <length>";inherits:false;initial-value:normal}@property --vui-title-font-family{syntax:"*";inherits:false;initial-value:sans-serif}@property --__title-medium{syntax:"*";inherits:false;initial-value:0}.viraui__title-module__Title_CXMUX{--__title-medium:clamp(var(--font-scale-body-medium),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 12 + 0.24cqi),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 3));--vui-title-font-size:clamp(var(--font-scale-h2),calc(var(--__title-medium) * pow(var(--font-heading-typescale), 5)),var(--font-scale-h1));--vui-title-font-family:var(--font-family-heading);--vui-title-line-height:var(--font-leading-standard);--vui-title-letter-spacing:-0.03em;margin:0;max-inline-size:var(--vui-title-max-width);font-family:var(--vui-title-font-family);font-size:var(--vui-title-font-size);line-height:var(--vui-title-line-height);letter-spacing:var(--vui-title-letter-spacing);text-align:var(--vui-title-align);white-space:var(--vui-title-white-space);word-break:break-word;
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-title-align{syntax:"*";inherits:false;initial-value:start}@property --vui-title-max-width{syntax:"*";inherits:false;initial-value:none}@property --vui-title-literal-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-title-white-space{syntax:"*";inherits:false;initial-value:normal}@property --vui-title-font-weight{syntax:"<number>";inherits:false;initial-value:500}@property --vui-title-font-width{syntax:"<number>";inherits:false;initial-value:100}@property --vui-title-font-opsz{syntax:"<number>";inherits:false;initial-value:16}@property --vui-title-trim{syntax:"*";inherits:false;initial-value:trim-both}@property --vui-title-trim-type{syntax:"*";inherits:false;initial-value:cap alphabetic}@property --vui-title-padding-inline-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-inline-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-block-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-block-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-font-size{syntax:"<length>";inherits:false;initial-value:1rem}@property --vui-title-line-height{syntax:"normal | <number> | <length-percentage>";inherits:false;initial-value:normal}@property --vui-title-letter-spacing{syntax:"normal | <length>";inherits:false;initial-value:normal}@property --vui-title-font-family{syntax:"*";inherits:false;initial-value:sans-serif}@property --__title-medium{syntax:"*";inherits:false;initial-value:0}.viraui__title-module__Title_CXMUX{--__title-medium:clamp(var(--font-scale-body-medium),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 12 + 0.24cqi),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 3));--vui-title-font-size:clamp(var(--font-scale-h2),calc(var(--__title-medium) * pow(var(--font-heading-typescale), 5)),var(--font-scale-h1));--vui-title-font-family:var(--font-family-heading);--vui-title-line-height:var(--font-leading-standard);--vui-title-letter-spacing:-0.03em;margin:0;max-inline-size:var(--vui-title-max-width);font-family:var(--vui-title-font-family);font-size:var(--vui-title-font-size);line-height:var(--vui-title-line-height);letter-spacing:var(--vui-title-letter-spacing);text-align:var(--vui-title-align);white-space:var(--vui-title-white-space);word-break:break-word;font-weight:var(--vui-title-font-weight);font-stretch:calc(var(--vui-title-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-title-font-weight),"wdth" var(--vui-title-font-width),"opsz" var(--vui-title-font-opsz);text-box:var(--vui-title-trim) var(--vui-title-trim-type);display:inline-flex;&[data-title-balanced=true]{text-wrap:balance}&[data-title-selection=false]{-webkit-user-select:none;user-select:none}&[data-title-has-padding=true]{padding:var(--vui-title-padding-block-start) var(--vui-title-padding-inline-end) var(--vui-title-padding-block-end) var(--vui-title-padding-inline-start)}&[data-title-size=display]{--vui-title-font-size:clamp(var(--font-scale-h1),calc(var(--font-scale-h1) + 4.643cqi - 0.9286rem),var(--font-scale-display))}&[data-title-size="2"]{--vui-title-font-size:clamp(var(--font-scale-h3),calc(var(--__title-medium) * pow(var(--font-heading-typescale), 4)),var(--font-scale-h2))}&[data-title-size="3"]{--vui-title-font-size:clamp(var(--font-scale-h4),calc(var(--__title-medium) * pow(var(--font-heading-typescale), 3)),var(--font-scale-h3))}&[data-title-size="4"]{--vui-title-font-size:clamp(var(--font-scale-h5),calc(var(--__title-medium) * pow(var(--font-heading-typescale), 2)),var(--font-scale-h4))}&[data-title-size="5"]{--vui-title-font-size:clamp(var(--font-scale-h6),calc(var(--__title-medium) * pow(var(--font-heading-typescale), 1)),var(--font-scale-h5));--vui-title-letter-spacing:-0.02em}&[data-title-size="6"]{--vui-title-font-size:clamp(var(--font-scale-body-medium),var(--__title-medium),var(--font-scale-h6));--vui-title-letter-spacing:-0.02em}&[data-title-has-literal-color=true]{color:var(--vui-title-literal-color)}&[data-title-line-height=none]{--vui-title-line-height:0}&[data-title-line-height=x-small]{--vui-title-line-height:var(--font-leading-x-small)}&[data-title-line-height=small]{--vui-title-line-height:var(--font-leading-small)}&[data-title-line-height=large]{--vui-title-line-height:var(--font-leading-large)}}}
|
package/dist/index.js
CHANGED
|
@@ -25,11 +25,13 @@ import { getElevationProps } from "./core/elevation/get-elevation-props.js";
|
|
|
25
25
|
import { Elevator } from "./components/elevator/elevator.js";
|
|
26
26
|
import { Fieldset } from "./components/fieldset/fieldset.js";
|
|
27
27
|
import { FitText } from "./components/fit-text/fit-text.js";
|
|
28
|
+
import { Surface } from "./components/surface/surface.js";
|
|
29
|
+
import { getGlowListenerCount, getGlowRegistrySize } from "./components/glow/glow-tracker.js";
|
|
30
|
+
import { Glow } from "./components/glow/glow.js";
|
|
28
31
|
import { IconButton } from "./components/icon-button/icon-button.js";
|
|
29
32
|
import { IconButtonLink } from "./components/icon-button/icon-button-link.js";
|
|
30
33
|
import { LinearProgress } from "./components/linear-progress/linear-progress.js";
|
|
31
34
|
import { Masonry } from "./components/masonry/masonry.js";
|
|
32
|
-
import { Surface } from "./components/surface/surface.js";
|
|
33
35
|
import { MenuCheckboxItem } from "./components/menu/menu-checkbox-item.js";
|
|
34
36
|
import { MenuGroup } from "./components/menu/menu-group.js";
|
|
35
37
|
import { MenuItem } from "./components/menu/menu-item.js";
|
|
@@ -63,4 +65,4 @@ import { ToggleGroup } from "./components/toggle-group/toggle-group.js";
|
|
|
63
65
|
import { Typewriter } from "./components/typewriter/typewriter.js";
|
|
64
66
|
import { TooltipContent } from "./components/tooltip/tooltip-content.js";
|
|
65
67
|
import { Tooltip, TooltipProvider, TooltipTrigger } from "./components/tooltip/tooltip.js";
|
|
66
|
-
export { Accordion, Annotate, Autocomplete, Avatar, AvatarGroup, Badge, Bleed, Button, ButtonLink, Checkbox, CheckboxGroup, Chip, ClampText, Dialog, DialogClose, DialogIndent, DialogIndentBackground, DialogSheet, DialogTrigger, ELEVATION_DEFAULTS, Elevator, Fieldset, FitText, IconButton, IconButtonLink, LinearProgress, Masonry, Menu, MenuCheckboxItem, MenuGroup, MenuItem, MenuLinkItem, MenuPopup, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Meter, Popover, PopoverClose, PopoverDescription, PopoverSheet, PopoverTitle, PopoverTrigger, ProgressiveBlur, Radio, RadioGroup, Select, Separator, Shimmer, Skeleton, Slider, Spinner, Stack, StaticNoise, Surface, Switch, Tabs, Text, Textarea, Textfield, Title, Toast, ToggleButton, ToggleGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typewriter, getElevationProps };
|
|
68
|
+
export { Accordion, Annotate, Autocomplete, Avatar, AvatarGroup, Badge, Bleed, Button, ButtonLink, Checkbox, CheckboxGroup, Chip, ClampText, Dialog, DialogClose, DialogIndent, DialogIndentBackground, DialogSheet, DialogTrigger, ELEVATION_DEFAULTS, Elevator, Fieldset, FitText, Glow, IconButton, IconButtonLink, LinearProgress, Masonry, Menu, MenuCheckboxItem, MenuGroup, MenuItem, MenuLinkItem, MenuPopup, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger, Meter, Popover, PopoverClose, PopoverDescription, PopoverSheet, PopoverTitle, PopoverTrigger, ProgressiveBlur, Radio, RadioGroup, Select, Separator, Shimmer, Skeleton, Slider, Spinner, Stack, StaticNoise, Surface, Switch, Tabs, Text, Textarea, Textfield, Title, Toast, ToggleButton, ToggleGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typewriter, getElevationProps, getGlowListenerCount, getGlowRegistrySize };
|
package/dist/preflight.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.preflight{@property --scrollbar-thumb{syntax:"<color>";initial-value:#0000;inherits:true}@property --scrollbar-track{syntax:"<color>";initial-value:#0000;inherits:true}@property --outline-offset{syntax:"<length>";initial-value:2px;inherits:true}@property --outline-color{syntax:"<color>";initial-value:currentcolor;inherits:true}@property --outline{syntax:"*";initial-value:2px solid currentcolor;inherits:true}@property --is-light-mode{syntax:"<color>";initial-value:#000;inherits:true}}@layer viraui.preflight{html{--scrollbar-thumb:oklab(from var(--global-contrast) l a b/0.3);--scrollbar-track:#0000;--outline-offset:2px;--outline-color:var(--global-outline);--outline:2px solid var(--outline-color);--is-light-mode:contrast-color(var(--global-background));font-size:var(--font-root-size);box-sizing:border-box;line-height:1.5;background-color:var(--global-background);color:var(--global-foreground);container:root/normal}*{@container root not style(--corner-shape-enable: initial){corner-shape:var(--corner-shape-squircle)}}*,:after,:before{margin:0;box-sizing:inherit;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track)}:focus-visible{outline:var(--outline);outline-offset:var(--outline-offset)}body{color:var(--global-foreground);margin:0;font-size:var(--font-scale-body-medium);font-optical-sizing:auto;font-family:var(--font-family-body),system-ui,sans-serif;font-variation-settings:"wght" 400;font-variant-numeric:tabular-nums}::selection{background-color:var(--global-primary);color:contrast-color(var(--global-primary));text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg{display:inline-flex;vertical-align:middle;&:not([fill]){fill:currentcolor}}ol ul,ul ol{font-size:medium}table{border-spacing:0;inline-size:100%;border-collapse:collapse}table[data-layout-fixed]{table-layout:fixed}table thead{box-shadow:inset 0 -3px 0 var(--base-2)}table[data-table-separators] tr+tr{border-top:1px solid var(--base-2)}table th{white-space:nowrap;font-variation-settings:"wght" 800}table :is(td,th){border:none;text-align:left;font-size:medium;padding:calc(var(--space-x-small) + var(--space-2x-small)) var(--space-small)}button,fieldset{padding:0;margin:0;border:0}button{appearance:none;background:none;font-size:inherit;font-family:inherit;display:inline-flex;cursor:pointer;color:inherit}[data-elevation]{--shadow-direction:1;--shadow-opacity-factor:0.16;--extra-shadow:0 0 0 1px #0000;--shadow-color:oklch(0% 0 0);transition-property:box-shadow;transition-duration:var(--elevation-transition-duration,.16s);transition-timing-function:var(--elevation-transition-easing,ease)}}@layer viraui.preflight{[data-elevation]:where([data-elevation-direction=bottom],[data-elevation-direction=right]){--shadow-direction:1}[data-elevation]:where([data-elevation-direction=top],[data-elevation-direction=left]){--shadow-direction:-1}[data-elevation-hover="0"]:hover,[data-elevation="0"]{--y1:0px;--x1:0px;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 0 oklch(from var(--shadow-color) l c h/var(--shadow-opacity-factor)),0 0 0 color-mix(in oklch,var(--shadow-color),#0000 calc(94% - var(--shadow-opacity-factor))),0 0 0 oklch(from var(--shadow-color) l c h/var(--shadow-opacity-factor)),var(--extra-shadow)}[data-elevation-hover="1"]:hover,[data-elevation-hover="2"]:hover,[data-elevation-hover="3"]:hover,[data-elevation-hover="4"]:hover,[data-elevation="1"],[data-elevation="2"],[data-elevation="3"],[data-elevation="4"]{box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) var(--shadow-blur-1) oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) var(--shadow-blur-2) oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) var(--shadow-blur-3) oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) var(--shadow-blur-4) oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[data-elevation-hover="1"]:hover,[data-elevation="1"]{--y1:0px;--y2:2px;--y3:4px;--y4:7px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:1px;--shadow-blur-2:2px;--shadow-blur-3:2px;--shadow-blur-4:3px}[data-elevation-hover="1"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="1"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:0px;--x2:2px;--x3:4px;--x4:7px}[data-elevation-hover="2"]:hover,[data-elevation="2"]{--y1:1px;--y2:5px;--y3:11px;--y4:19px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:3px;--shadow-blur-2:5px;--shadow-blur-3:6px;--shadow-blur-4:8px}[data-elevation-hover="2"]:where([data-elevation-direction=top],[data-elevation-direction=left]):hover,[data-elevation="2"]:where([data-elevation-direction=top],[data-elevation-direction=left]){--shadow-blur-3:7px}[data-elevation-hover="2"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="2"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:1px;--x2:5px;--x3:11px;--x4:19px}[data-elevation-hover="2"]:where([data-elevation-direction=right]):hover,[data-elevation="2"]:where([data-elevation-direction=right]){--shadow-blur-3:6px}[data-elevation-hover="3"]:hover,[data-elevation="3"]{--y1:2px;--y2:7px;--y3:16px;--y4:29px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:4px;--shadow-blur-2:7px;--shadow-blur-3:10px;--shadow-blur-4:12px}[data-elevation-hover="3"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="3"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:2px;--x2:7px;--x3:16px;--x4:29px}[data-elevation-hover="3"]:where([data-elevation-direction=right]):hover,[data-elevation="3"]:where([data-elevation-direction=right]){--x2:10px;--x3:22px;--x4:39px;--shadow-blur-1:5px;--shadow-blur-2:10px;--shadow-blur-3:13px;--shadow-blur-4:15px}[data-elevation-hover="4"]:hover,[data-elevation="4"]{--y1:4px;--y2:14px;--y3:33px;--y4:58px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:8px;--shadow-blur-2:14px;--shadow-blur-3:20px;--shadow-blur-4:23px}[data-elevation-hover="4"]:where([data-elevation-direction=top]):hover,[data-elevation="4"]:where([data-elevation-direction=top]){--y2:15px;--shadow-blur-2:15px}[data-elevation-hover="4"]:where([data-elevation-direction=left]):hover,[data-elevation="4"]:where([data-elevation-direction=left]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:4px;--x2:15px;--x3:33px;--x4:58px;--shadow-blur-2:15px}[data-elevation-hover="4"]:where([data-elevation-direction=right]):hover,[data-elevation="4"]:where([data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:4px;--x2:14px;--x3:33px;--x4:58px}}@layer viraui.preflight{[data-grow=true]{--vira-flex-grow:1;flex-grow:1}[data-grow=false]{--vira-flex-grow:0;flex-grow:0}[data-shrink=true]{--vira-flex-shrink:1;flex-shrink:1}[data-shrink=false]{--vira-flex-shrink:0;flex-shrink:0}}@layer viraui.preflight{:where(p){line-height:1.5;min-block-size:.01vh;font-size:var(--font-scale-body-medium)}small{font-size:.7em}b,strong{font-variation-settings:"wght" 700}:where(a:any-link):not([data-no-link-style]){text-decoration:none;color:var(--global-interactive-text);word-break:break-word;&:not([class]){background:linear-gradient(currentcolor,currentcolor) no-repeat 0 100%;background-size:0 1px;transition:background-size var(--duration-fast) var(--easing-entrance);&:focus,&:hover{background-size:100% 1px}}}del{padding:0 .4em;margin:0 .2em;background-color:oklab(from var(--highlight-red) l a b/12%);color:var(--highlight-red);box-shadow:0 0 0 1px oklab(from var(--highlight-red) l a b/50%);border-radius:var(--radius-small)}ins{background-color:oklab(from var(--highlight-green) l a b/15%);color:var(--highlight-green);box-shadow:0 0 0 1px oklab(from var(--highlight-green) l a b/50%)}ins,mark{padding:0 .4em;margin:0 .2em;text-decoration:none;border-radius:var(--radius-small)}mark{background-color:oklab(from var(--highlight-yellow) l a b/15%);color:var(--highlight-yellow);box-shadow:0 0 0 1px oklab(from var(--highlight-yellow) l a b/50%)}address{font-style:normal;line-height:inherit}dt{font-variation-settings:"wght" 600}dd{margin:0;padding:0}ul{font-size:medium;padding-left:1rem;& li::marker{font-size:inherit;text-align:right;font-variation-settings:"wght" 400;min-inline-size:var(--space-x-large);color:oklab(from currentColor l a b/80%)}}ol{font-size:medium;& li::marker{font-size:inherit;font-variation-settings:"wght" 400;min-inline-size:var(--space-x-large);font-variant-numeric:tabular-nums;white-space:nowrap;color:oklab(from currentColor l a b/80%)}}kbd{padding:.2em .4em;border-radius:var(--radius-small);font-variation-settings:"wght" 600;box-shadow:var(--global-contrast);background:var(--global-contrast)}abbr{text-decoration:underline dashed var(--global-primary)}label,legend{font-size:inherit}code{background-color:var(--global-contrast);border-radius:var(--radius-small);box-shadow:var(--global-contrast);padding:.2em .4em;font-size:1em;font-family:var(--font-family-mono)}pre code{box-shadow:none}s{text-decoration:line-through;color:var(--global-disabled-foreground);text-decoration-color:oklab(from var(--global-foreground) l a b/50%)}:root{color-scheme:light dark}[data-mode=dark]{color-scheme:dark}[data-mode=light]{color-scheme:light}}@layer viraui.preflight{[data-mode=inverted]{@container root style(--is-light-mode: black){color-scheme:dark}@container root style(--is-light-mode: white){color-scheme:light}}}@layer viraui.preflight{@container root not style(--vibrancy-enable: initial){[data-vibrant]{backdrop-filter:brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px)) saturate(150%);@container root style(--is-light-mode: black){backdrop-filter:brightness(100%) blur(calc(var(--vibrancy-blur) * 1px)) saturate(150%)}}}}
|
|
1
|
+
@layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.preflight{@property --scrollbar-thumb{syntax:"<color>";initial-value:#0000;inherits:true}@property --scrollbar-track{syntax:"<color>";initial-value:#0000;inherits:true}@property --outline-offset{syntax:"<length>";initial-value:2px;inherits:true}@property --outline-color{syntax:"<color>";initial-value:currentcolor;inherits:true}@property --outline{syntax:"*";initial-value:2px solid currentcolor;inherits:true}@property --is-light-mode{syntax:"<color>";initial-value:#000;inherits:true}}@layer viraui.preflight{html{--scrollbar-thumb:oklab(from var(--global-contrast) l a b/0.3);--scrollbar-track:#0000;--outline-offset:2px;--outline-color:var(--global-outline);--outline:2px solid var(--outline-color);--is-light-mode:contrast-color(var(--global-background));font-size:var(--font-root-size);box-sizing:border-box;line-height:1.5;background-color:var(--global-background);color:var(--global-foreground);container:root/normal}*{@container root not style(--corner-shape-enable: initial){corner-shape:var(--corner-shape-squircle)}}*,:after,:before{margin:0;box-sizing:inherit;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track)}:focus-visible{outline:var(--outline);outline-offset:var(--outline-offset)}body{color:var(--global-foreground);margin:0;font-size:var(--font-scale-body-medium);font-optical-sizing:auto;font-family:var(--font-family-body),system-ui,sans-serif;font-variation-settings:"wght" 400;font-variant-numeric:tabular-nums}::selection{background-color:var(--global-primary);color:contrast-color(var(--global-primary));text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg{display:inline-flex;vertical-align:middle;&:not([fill]){fill:currentcolor}}ol ul,ul ol{font-size:medium}table{border-spacing:0;inline-size:100%;border-collapse:collapse}table[data-layout-fixed]{table-layout:fixed}table thead{box-shadow:inset 0 -3px 0 var(--base-2)}table[data-table-separators] tr+tr{border-top:1px solid var(--base-2)}table th{white-space:nowrap;font-variation-settings:"wght" 800}table :is(td,th){border:none;text-align:left;font-size:medium;padding:calc(var(--space-x-small) + var(--space-2x-small)) var(--space-small)}button,fieldset{padding:0;margin:0;border:0}button{appearance:none;background:none;font-size:inherit;font-family:inherit;display:inline-flex;cursor:pointer;color:inherit}[data-elevation]{--shadow-direction:1;--shadow-opacity-factor:0.16;--extra-shadow:0 0 0 1px #0000;--shadow-color:oklch(0% 0 0);transition-property:box-shadow;transition-duration:var(--elevation-transition-duration,.16s);transition-timing-function:var(--elevation-transition-easing,ease)}}@layer viraui.preflight{[data-elevation]:where([data-elevation-direction=bottom],[data-elevation-direction=right]){--shadow-direction:1}[data-elevation]:where([data-elevation-direction=top],[data-elevation-direction=left]){--shadow-direction:-1}[data-elevation-hover="0"]:hover,[data-elevation="0"]{--y1:0px;--x1:0px;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 0 oklch(from var(--shadow-color) l c h/var(--shadow-opacity-factor)),0 0 0 color-mix(in oklch,var(--shadow-color),#0000 calc(94% - var(--shadow-opacity-factor))),0 0 0 oklch(from var(--shadow-color) l c h/var(--shadow-opacity-factor)),var(--extra-shadow)}[data-elevation-hover="1"]:hover,[data-elevation-hover="2"]:hover,[data-elevation-hover="3"]:hover,[data-elevation-hover="4"]:hover,[data-elevation="1"],[data-elevation="2"],[data-elevation="3"],[data-elevation="4"]{box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) var(--shadow-blur-1) oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) var(--shadow-blur-2) oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) var(--shadow-blur-3) oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) var(--shadow-blur-4) oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[data-elevation-hover="1"]:hover,[data-elevation="1"]{--y1:0px;--y2:2px;--y3:4px;--y4:7px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:1px;--shadow-blur-2:2px;--shadow-blur-3:2px;--shadow-blur-4:3px}[data-elevation-hover="1"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="1"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:0px;--x2:2px;--x3:4px;--x4:7px}[data-elevation-hover="2"]:hover,[data-elevation="2"]{--y1:1px;--y2:5px;--y3:11px;--y4:19px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:3px;--shadow-blur-2:5px;--shadow-blur-3:6px;--shadow-blur-4:8px}[data-elevation-hover="2"]:where([data-elevation-direction=top],[data-elevation-direction=left]):hover,[data-elevation="2"]:where([data-elevation-direction=top],[data-elevation-direction=left]){--shadow-blur-3:7px}[data-elevation-hover="2"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="2"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:1px;--x2:5px;--x3:11px;--x4:19px}[data-elevation-hover="2"]:where([data-elevation-direction=right]):hover,[data-elevation="2"]:where([data-elevation-direction=right]){--shadow-blur-3:6px}[data-elevation-hover="3"]:hover,[data-elevation="3"]{--y1:2px;--y2:7px;--y3:16px;--y4:29px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:4px;--shadow-blur-2:7px;--shadow-blur-3:10px;--shadow-blur-4:12px}[data-elevation-hover="3"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="3"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:2px;--x2:7px;--x3:16px;--x4:29px}[data-elevation-hover="3"]:where([data-elevation-direction=right]):hover,[data-elevation="3"]:where([data-elevation-direction=right]){--x2:10px;--x3:22px;--x4:39px;--shadow-blur-1:5px;--shadow-blur-2:10px;--shadow-blur-3:13px;--shadow-blur-4:15px}[data-elevation-hover="4"]:hover,[data-elevation="4"]{--y1:4px;--y2:14px;--y3:33px;--y4:58px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:8px;--shadow-blur-2:14px;--shadow-blur-3:20px;--shadow-blur-4:23px}[data-elevation-hover="4"]:where([data-elevation-direction=top]):hover,[data-elevation="4"]:where([data-elevation-direction=top]){--y2:15px;--shadow-blur-2:15px}[data-elevation-hover="4"]:where([data-elevation-direction=left]):hover,[data-elevation="4"]:where([data-elevation-direction=left]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:4px;--x2:15px;--x3:33px;--x4:58px;--shadow-blur-2:15px}[data-elevation-hover="4"]:where([data-elevation-direction=right]):hover,[data-elevation="4"]:where([data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:4px;--x2:14px;--x3:33px;--x4:58px}}@layer viraui.preflight{[data-grow=true]{--vira-flex-grow:1;flex-grow:1}[data-grow=false]{--vira-flex-grow:0;flex-grow:0}[data-shrink=true]{--vira-flex-shrink:1;flex-shrink:1}[data-shrink=false]{--vira-flex-shrink:0;flex-shrink:0}}@layer viraui.preflight{:where(p){line-height:1.5;min-block-size:.01vh;font-size:var(--font-scale-body-medium)}small{font-size:.7em}b,strong{font-variation-settings:"wght" 700}:where(a:any-link):not([data-no-link-style]){text-decoration:none;color:var(--global-interactive-text);word-break:break-word;&:not([class]){background:linear-gradient(currentcolor,currentcolor) no-repeat 0 100%;background-size:0 1px;transition:background-size var(--duration-fast) var(--easing-entrance);&:focus,&:hover{background-size:100% 1px}}}del{padding:0 .4em;margin:0 .2em;background-color:oklab(from var(--highlight-red) l a b/12%);color:var(--highlight-red);box-shadow:0 0 0 1px oklab(from var(--highlight-red) l a b/50%);border-radius:var(--radius-small)}ins{background-color:oklab(from var(--highlight-green) l a b/15%);color:var(--highlight-green);box-shadow:0 0 0 1px oklab(from var(--highlight-green) l a b/50%)}ins,mark{padding:0 .4em;margin:0 .2em;text-decoration:none;border-radius:var(--radius-small)}mark{background-color:oklab(from var(--highlight-yellow) l a b/15%);color:var(--highlight-yellow);box-shadow:0 0 0 1px oklab(from var(--highlight-yellow) l a b/50%)}address{font-style:normal;line-height:inherit}dt{font-variation-settings:"wght" 600}dd{margin:0;padding:0}ul{font-size:medium;padding-left:1rem;& li::marker{font-size:inherit;text-align:right;font-variation-settings:"wght" 400;min-inline-size:var(--space-x-large);color:oklab(from currentColor l a b/80%)}}ol{font-size:medium;& li::marker{font-size:inherit;font-variation-settings:"wght" 400;min-inline-size:var(--space-x-large);font-variant-numeric:tabular-nums;white-space:nowrap;color:oklab(from currentColor l a b/80%)}}kbd{padding:.2em .4em;border-radius:var(--radius-small);font-variation-settings:"wght" 600;box-shadow:var(--global-contrast);background:var(--global-contrast)}abbr{text-decoration:underline dashed var(--global-primary)}label,legend{font-size:inherit}code{background-color:var(--global-contrast);border-radius:var(--radius-small);box-shadow:var(--global-contrast);padding:.2em .4em;font-size:1em;font-family:var(--font-family-mono)}pre code{box-shadow:none}s{text-decoration:line-through;color:var(--global-disabled-foreground);text-decoration-color:oklab(from var(--global-foreground) l a b/50%)}:root{color-scheme:light dark}[data-mode=dark]{color:var(--global-foreground);color-scheme:dark}[data-mode=light]{color:var(--global-foreground);color-scheme:light}}@layer viraui.preflight{[data-mode=inverted]{color:var(--global-foreground);@container root style(--is-light-mode: black){color-scheme:dark}@container root style(--is-light-mode: white){color-scheme:light}}}@layer viraui.preflight{@container root not style(--vibrancy-enable: initial){[data-vibrant]{backdrop-filter:brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px)) saturate(150%);@container root style(--is-light-mode: black){backdrop-filter:brightness(100%) blur(calc(var(--vibrancy-blur) * 1px)) saturate(150%)}}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viraui/react",
|
|
3
|
-
"version": "2026.0.
|
|
3
|
+
"version": "2026.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"unplugin-dts": "1.0.3",
|
|
36
36
|
"vite": "8.1.4",
|
|
37
37
|
"vite-plugin-static-copy": "4.1.1",
|
|
38
|
-
"@viraui/foundation": "2026.0.
|
|
38
|
+
"@viraui/foundation": "2026.0.5",
|
|
39
39
|
"@viraui/icons": "2026.0.0",
|
|
40
40
|
"@viraui/postcss-config": "2026.0.0",
|
|
41
41
|
"@viraui/tsconfig": "2026.0.0"
|