@viraui/react 0.0.21 → 0.0.22

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.
Files changed (57) hide show
  1. package/dist/catalog.json +13 -1
  2. package/dist/components/avatar/avatar.js +1 -1
  3. package/dist/components/avatar-group/avatar-group.js +3 -2
  4. package/dist/components/basic-input/basic-input.js +1 -1
  5. package/dist/components/basic-input/field-label.js +1 -1
  6. package/dist/components/button/button.js +1 -1
  7. package/dist/components/checkbox/checkbox.js +1 -1
  8. package/dist/components/chip/chip.js +1 -1
  9. package/dist/components/clamp-text/clamp-text.js +1 -1
  10. package/dist/components/icon/icon.js +1 -1
  11. package/dist/components/index.d.ts +2 -0
  12. package/dist/components/linear-progress/linear-progress.js +1 -1
  13. package/dist/components/masonry/masonry-item.js +1 -1
  14. package/dist/components/masonry/masonry.js +1 -1
  15. package/dist/components/progressive-blur/index.d.ts +2 -0
  16. package/dist/components/progressive-blur/progressive-blur.css +1 -0
  17. package/dist/components/progressive-blur/progressive-blur.d.ts +38 -0
  18. package/dist/components/progressive-blur/progressive-blur.guide.json +25 -0
  19. package/dist/components/progressive-blur/progressive-blur.js +39 -0
  20. package/dist/components/progressive-blur/progressive-blur.module.js +6 -0
  21. package/dist/components/progressive-blur/progressive-blur.utils.d.ts +14 -0
  22. package/dist/components/progressive-blur/progressive-blur.utils.js +40 -0
  23. package/dist/components/radio/radio.js +1 -1
  24. package/dist/components/select/select-group.js +1 -1
  25. package/dist/components/select/select-option.d.ts +7 -1
  26. package/dist/components/select/select-option.js +19 -7
  27. package/dist/components/select/select-separator.js +1 -1
  28. package/dist/components/select/select.css +1 -1
  29. package/dist/components/select/select.d.ts +7 -1
  30. package/dist/components/select/select.guide.json +1 -0
  31. package/dist/components/select/select.js +3 -3
  32. package/dist/components/select/select.module.js +1 -0
  33. package/dist/components/skeleton/skeleton.js +2 -2
  34. package/dist/components/slider/slider.js +1 -1
  35. package/dist/components/spinner/spinner.js +2 -2
  36. package/dist/components/stack/stack.js +1 -1
  37. package/dist/components/static-noise/index.d.ts +2 -0
  38. package/dist/components/static-noise/static-noise.css +1 -0
  39. package/dist/components/static-noise/static-noise.d.ts +37 -0
  40. package/dist/components/static-noise/static-noise.guide.json +25 -0
  41. package/dist/components/static-noise/static-noise.js +45 -0
  42. package/dist/components/static-noise/static-noise.module.js +6 -0
  43. package/dist/components/surface/surface-radius-context.d.ts +37 -0
  44. package/dist/components/surface/surface-radius-context.js +70 -0
  45. package/dist/components/surface/surface.css +1 -1
  46. package/dist/components/surface/surface.d.ts +5 -5
  47. package/dist/components/surface/surface.guide.json +10 -4
  48. package/dist/components/surface/surface.js +23 -4
  49. package/dist/components/switch/switch.js +1 -1
  50. package/dist/components/text/text.js +1 -1
  51. package/dist/components/textarea/textarea.js +1 -1
  52. package/dist/components/textfield/textfield.js +1 -1
  53. package/dist/components/title/title.js +1 -1
  54. package/dist/core/clsx.d.ts +1 -0
  55. package/dist/core/clsx.js +36 -0
  56. package/dist/index.js +3 -1
  57. package/package.json +4 -7
package/dist/catalog.json CHANGED
@@ -119,7 +119,7 @@
119
119
  {
120
120
  "id": "surface",
121
121
  "name": "Surface",
122
- "summary": "Presentational container with token background, optional border, radius, and padding.",
122
+ "summary": "Presentational container with token background, optional border, radius, and padding; nested surfaces use radius=\"auto\" for concentric corners.",
123
123
  "guidePath": "./components/surface/surface.guide.json"
124
124
  },
125
125
  {
@@ -128,6 +128,18 @@
128
128
  "summary": "Decorative SVG pulsing loading indicator used inside interactive components.",
129
129
  "guidePath": "./components/spinner/spinner.guide.json"
130
130
  },
131
+ {
132
+ "id": "static-noise",
133
+ "name": "StaticNoise",
134
+ "summary": "Decorative SVG turbulence noise overlay for textured surfaces and hero sections.",
135
+ "guidePath": "./components/static-noise/static-noise.guide.json"
136
+ },
137
+ {
138
+ "id": "progressive-blur",
139
+ "name": "ProgressiveBlur",
140
+ "summary": "Decorative stacked backdrop-filter overlay that ramps blur from one edge toward the opposite edge.",
141
+ "guidePath": "./components/progressive-blur/progressive-blur.guide.json"
142
+ },
131
143
  {
132
144
  "id": "text",
133
145
  "name": "Text",
@@ -1,10 +1,10 @@
1
1
  import './avatar.css';
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
3
4
  import avatar_module_default from "./avatar.module.js";
4
5
  import { Text } from "../text/text.js";
5
6
  import { Skeleton } from "../skeleton/skeleton.js";
6
7
  import { Avatar } from "@base-ui/react/avatar";
7
- import { clsx } from "clsx";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/components/avatar/avatar.tsx
10
10
  var fallbackTextSizeByAvatarSize = {
@@ -1,4 +1,5 @@
1
1
  import './avatar-group.css';
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
3
4
  import { Avatar } from "../avatar/avatar.js";
4
5
  import { resolveThemeValue } from "../../core/theme/resolve-theme-value.js";
@@ -6,11 +7,10 @@ import avatar_group_module_default from "./avatar-group.module.js";
6
7
  import { Stack } from "../stack/stack.js";
7
8
  import { Text } from "../text/text.js";
8
9
  import { Surface } from "../surface/surface.js";
9
- import { clsx } from "clsx";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  //#region src/components/avatar-group/avatar-group.tsx
12
12
  var getAvatarKey = (avatar, index) => `${avatar.src ?? "fallback"}-${typeof avatar.fallback === "string" ? avatar.fallback : "node"}-${index}`;
13
- var AvatarGroup = ({ avatars, className, direction = "horizontal", gap = "x-small", maxVisible, overflowText, size = "small", style, ...otherProps }) => {
13
+ var AvatarGroup = ({ avatars, className, direction = "horizontal", gap = "x-small", maxVisible, overflowText, ref, size = "small", style, ...otherProps }) => {
14
14
  const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
15
15
  const isOverflowing = typeof maxVisible === "number" && maxVisible > 0 && avatars.length > maxVisible;
16
16
  const hasOverflow = isOverflowing && overflowText !== void 0 && overflowText !== null;
@@ -22,6 +22,7 @@ var AvatarGroup = ({ avatars, className, direction = "horizontal", gap = "x-smal
22
22
  return /* @__PURE__ */ jsxs("div", {
23
23
  ...componentProps,
24
24
  ...intrinsicAttributes,
25
+ ref,
25
26
  className: clsx(avatar_group_module_default.AvatarGroup, className),
26
27
  "data-direction": direction,
27
28
  "data-gap": gap,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import './basic-input.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import basic_input_module_default from "./basic-input.module.js";
4
- import { clsx } from "clsx";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import * as React from "react";
7
7
  import { Field } from "@base-ui/react/field";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import './field-label.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { Text } from "../text/text.js";
4
5
  import field_label_module_default from "./field-label.module.js";
5
- import { clsx } from "clsx";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/components/basic-input/field-label.tsx
8
8
  /**
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import './button.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Spinner } from "../spinner/spinner.js";
5
6
  import button_module_default from "./button.module.js";
6
- import { clsx } from "clsx";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { useRender } from "@base-ui/react/use-render";
9
9
  import * as React from "react";
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import './checkbox.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Stack } from "../stack/stack.js";
5
6
  import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
6
7
  import { FieldLabel } from "../basic-input/field-label.js";
7
8
  import checkbox_module_default from "./checkbox.module.js";
8
9
  import { Icon } from "../icon/icon.js";
9
- import { clsx } from "clsx";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { Checkbox, Field } from "@base-ui/react";
12
12
  //#region src/components/checkbox/checkbox.tsx
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import './chip.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Stack } from "../stack/stack.js";
5
6
  import chip_module_default from "./chip.module.js";
6
- import { clsx } from "clsx";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { useRender } from "@base-ui/react/use-render";
9
9
  import "react";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import './clamp-text.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import clamp_text_module_default from "./clamp-text.module.js";
5
- import { clsx } from "clsx";
6
6
  import { useRender } from "@base-ui/react/use-render";
7
7
  import { useMemo } from "react";
8
8
  //#region src/components/clamp-text/clamp-text.tsx
@@ -1,7 +1,7 @@
1
1
  import './icon.css';
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
3
4
  import icon_module_default from "./icon.module.js";
4
- import { clsx } from "clsx";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { generatedDefaultIconVariant, generatedIconRegistry } from "#internal-icons/icon-registry";
7
7
  //#region src/components/icon/icon.tsx
@@ -19,5 +19,7 @@ export * from './skeleton';
19
19
  export * from './stack';
20
20
  export * from './surface';
21
21
  export * from './spinner';
22
+ export * from './static-noise';
23
+ export * from './progressive-blur';
22
24
  export * from './text';
23
25
  export * from './title';
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import './linear-progress.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Stack } from "../stack/stack.js";
5
6
  import { Text } from "../text/text.js";
6
7
  import { FieldLabel } from "../basic-input/field-label.js";
7
8
  import linear_progress_module_default from "./linear-progress.module.js";
8
- import { clsx } from "clsx";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { Progress } from "@base-ui/react/progress";
11
11
  //#region src/components/linear-progress/linear-progress.tsx
@@ -1,7 +1,7 @@
1
1
  "use client";
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
3
4
  import masonry_module_default from "./masonry.module.js";
4
- import { clsx } from "clsx";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
6
  //#region src/components/masonry/masonry-item.tsx
7
7
  var MasonryItem = ({ className, ref, render, spanAll = false, ...otherProps }) => {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import './masonry.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { resolveThemeValue } from "../../core/theme/resolve-theme-value.js";
5
6
  import masonry_module_default from "./masonry.module.js";
6
7
  import { MasonryItem } from "./masonry-item.js";
7
- import { clsx } from "clsx";
8
8
  import { useRender } from "@base-ui/react/use-render";
9
9
  //#region src/components/masonry/masonry.tsx
10
10
  var MasonryRoot = ({ children, className, columnCount = 4, columnFill = "balance", columnRuleStyle, columnRuleWidth, columnWidth, gap = "large", ref, render, style, ...otherProps }) => {
@@ -0,0 +1,2 @@
1
+ export { ProgressiveBlur } from './progressive-blur';
2
+ export type { ProgressiveBlurProps } from './progressive-blur';
@@ -0,0 +1 @@
1
+ .progressive-blur-module_ProgressiveBlur_eIxTK{--progressive-blur:16px;pointer-events:none}.progressive-blur-module_Layer_zbzMS{position:absolute;inset:0;backdrop-filter:blur(calc(var(--progressive-blur) * var(--progressive-blur-factor)));mask-image:var(--progressive-blur-mask-image);.progressive-blur-module_ProgressiveBlur_eIxTK[data-direction=top] &{--progressive-blur-mask-image:linear-gradient(to top,var(--progressive-blur-mask-gradient))}.progressive-blur-module_ProgressiveBlur_eIxTK[data-direction=right] &{--progressive-blur-mask-image:linear-gradient(to right,var(--progressive-blur-mask-gradient))}.progressive-blur-module_ProgressiveBlur_eIxTK[data-direction=bottom] &{--progressive-blur-mask-image:linear-gradient(to bottom,var(--progressive-blur-mask-gradient))}.progressive-blur-module_ProgressiveBlur_eIxTK[data-direction=left] &{--progressive-blur-mask-image:linear-gradient(to left,var(--progressive-blur-mask-gradient))}}
@@ -0,0 +1,38 @@
1
+ import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
2
+ import { ProgressiveBlurDirection, ProgressiveBlurEasing } from './progressive-blur.utils';
3
+ import type * as React from 'react';
4
+ /**
5
+ * Public ProgressiveBlur props.
6
+ *
7
+ * Includes standard `div` attributes such as `id`, `className`, and event handlers,
8
+ * plus Vira-owned progressive backdrop blur controls.
9
+ *
10
+ * @default Native div pass-through props keep React defaults.
11
+ */
12
+ export type ProgressiveBlurProps = React.ComponentPropsWithRef<'div'> & IntrinsicViraProps & {
13
+ /**
14
+ * Sets the maximum blur radius applied to the first layer at the selected edge.
15
+ *
16
+ * @default '16px'
17
+ */
18
+ blur?: string;
19
+ /**
20
+ * Selects the edge where maximum blur starts and fades toward the opposite edge.
21
+ *
22
+ * @default 'bottom'
23
+ */
24
+ direction?: ProgressiveBlurDirection;
25
+ /**
26
+ * Selects the easing curve used to distribute blur factors across internal layers.
27
+ *
28
+ * @default 'exponential'
29
+ */
30
+ easing?: ProgressiveBlurEasing;
31
+ /**
32
+ * Sets the number of internal blur layers. Values are clamped to `2..16`.
33
+ *
34
+ * @default Varies by easing: linear `6`, ease-in/out `8`, ease-in-out `10`, exponential `8`.
35
+ */
36
+ steps?: number;
37
+ };
38
+ export declare const ProgressiveBlur: React.FC<ProgressiveBlurProps>;
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "ProgressiveBlur",
3
+ "summary": "Decorative stacked backdrop-filter overlay that ramps blur from one edge toward the opposite edge.",
4
+ "whenToUse": [
5
+ "Edge scrims on cards, sheets, heroes, or scroll regions where content should fade into blur",
6
+ "Glass or vibrant surfaces that need directional legibility without a hard blur cutoff",
7
+ "Decorative atmosphere where the parent owns semantics and layout positioning"
8
+ ],
9
+ "whenNotToUse": [
10
+ "Standalone loading or status feedback without a labeled parent region",
11
+ "Large full-viewport stacks with many simultaneous high-radius blur layers",
12
+ "Cases where a single uniform backdrop blur is sufficient"
13
+ ],
14
+ "accessibility": [
15
+ "ProgressiveBlur is decorative — the root renders with aria-hidden by default",
16
+ "Parent surface or region must expose any meaningful label or busy state",
17
+ "Consumer owns position, inset, z-index, and sizing for the overlay placement"
18
+ ],
19
+ "antiPatterns": [
20
+ "Stacking many full-viewport ProgressiveBlur instances on one screen",
21
+ "Driving layout size or scroll behavior from inside the overlay component",
22
+ "Embedding layout positioning rules inside the component stylesheet"
23
+ ],
24
+ "related": ["Surface", "StaticNoise"]
25
+ }
@@ -0,0 +1,39 @@
1
+ import './progressive-blur.css';
2
+ import { clsx } from "../../core/clsx.js";
3
+ import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
+ import progressive_blur_module_default from "./progressive-blur.module.js";
5
+ import { formatProgressiveBlurMaskGradient, getProgressiveBlurFactor, getProgressiveBlurMaskStops, resolveProgressiveBlurSteps } from "./progressive-blur.utils.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ //#region src/components/progressive-blur/progressive-blur.tsx
8
+ var ProgressiveBlur = ({ blur = "16px", className, direction = "bottom", easing = "exponential", ref, steps, style, ...otherProps }) => {
9
+ const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
10
+ const resolvedSteps = resolveProgressiveBlurSteps(steps, easing);
11
+ const dynamicStyle = {
12
+ "--progressive-blur": blur,
13
+ ...style
14
+ };
15
+ const layers = Array.from({ length: resolvedSteps }, (_, layerIndex) => {
16
+ const factor = getProgressiveBlurFactor(easing, layerIndex, resolvedSteps);
17
+ const maskGradient = formatProgressiveBlurMaskGradient(getProgressiveBlurMaskStops(layerIndex, resolvedSteps));
18
+ return /* @__PURE__ */ jsx("span", {
19
+ "aria-hidden": "true",
20
+ className: progressive_blur_module_default.Layer,
21
+ style: {
22
+ "--progressive-blur-factor": factor,
23
+ "--progressive-blur-mask-gradient": maskGradient
24
+ }
25
+ }, layerIndex);
26
+ });
27
+ return /* @__PURE__ */ jsx("div", {
28
+ ...componentProps,
29
+ ...intrinsicAttributes,
30
+ ref,
31
+ "aria-hidden": "true",
32
+ className: clsx(progressive_blur_module_default.ProgressiveBlur, className),
33
+ "data-direction": direction,
34
+ style: dynamicStyle,
35
+ children: layers
36
+ });
37
+ };
38
+ //#endregion
39
+ export { ProgressiveBlur };
@@ -0,0 +1,6 @@
1
+ var progressive_blur_module_default = {
2
+ ProgressiveBlur: "progressive-blur-module_ProgressiveBlur_eIxTK",
3
+ Layer: "progressive-blur-module_Layer_zbzMS"
4
+ };
5
+ //#endregion
6
+ export { progressive_blur_module_default as default };
@@ -0,0 +1,14 @@
1
+ export type ProgressiveBlurDirection = 'top' | 'right' | 'bottom' | 'left';
2
+ export type ProgressiveBlurEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'exponential';
3
+ export declare const PROGRESSIVE_BLUR_MIN_STEPS = 2;
4
+ export declare const PROGRESSIVE_BLUR_MAX_STEPS = 16;
5
+ export declare const resolveProgressiveBlurSteps: (steps: number | undefined, easing: ProgressiveBlurEasing) => number;
6
+ export declare const getProgressiveBlurFactor: (easing: ProgressiveBlurEasing, layerIndex: number, totalSteps: number) => number;
7
+ export type ProgressiveBlurMaskStops = {
8
+ p1: number;
9
+ p2: number;
10
+ p3: number;
11
+ p4: number;
12
+ };
13
+ export declare const getProgressiveBlurMaskStops: (layerIndex: number, totalSteps: number) => ProgressiveBlurMaskStops;
14
+ export declare const formatProgressiveBlurMaskGradient: (stops: ProgressiveBlurMaskStops) => string;
@@ -0,0 +1,40 @@
1
+ var DEFAULT_STEPS_BY_EASING = {
2
+ linear: 6,
3
+ "ease-in": 8,
4
+ "ease-out": 8,
5
+ "ease-in-out": 10,
6
+ exponential: 8
7
+ };
8
+ var resolveProgressiveBlurSteps = (steps, easing) => {
9
+ const resolved = steps ?? DEFAULT_STEPS_BY_EASING[easing];
10
+ return Math.min(16, Math.max(2, resolved));
11
+ };
12
+ var getProgressiveBlurFactor = (easing, layerIndex, totalSteps) => {
13
+ if (easing === "exponential") return .5 ** layerIndex;
14
+ const progress = layerIndex / (totalSteps - 1);
15
+ switch (easing) {
16
+ case "linear": return 1 - progress;
17
+ case "ease-in": return 1 - progress * progress;
18
+ case "ease-out": return 1 - (1 - (1 - progress) ** 2);
19
+ case "ease-in-out": return 1 - (progress < .5 ? 2 * progress * progress : 1 - (-2 * progress + 2) ** 2 / 2);
20
+ default: return 1 - progress;
21
+ }
22
+ };
23
+ var getProgressiveBlurMaskStops = (layerIndex, totalSteps) => {
24
+ const increment = 100 / totalSteps;
25
+ const maskIndex = totalSteps - layerIndex;
26
+ return {
27
+ p1: Math.round((increment * maskIndex - increment) * 10) / 10,
28
+ p2: Math.round(increment * maskIndex * 10) / 10,
29
+ p3: Math.round((increment * maskIndex + increment) * 10) / 10,
30
+ p4: Math.round((increment * maskIndex + increment * 2) * 10) / 10
31
+ };
32
+ };
33
+ var formatProgressiveBlurMaskGradient = (stops) => {
34
+ let gradient = `transparent ${stops.p1}%, black ${stops.p2}%`;
35
+ if (stops.p3 <= 100) gradient += `, black ${stops.p3}%`;
36
+ if (stops.p4 <= 100) gradient += `, transparent ${stops.p4}%`;
37
+ return gradient;
38
+ };
39
+ //#endregion
40
+ export { formatProgressiveBlurMaskGradient, getProgressiveBlurFactor, getProgressiveBlurMaskStops, resolveProgressiveBlurSteps };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import './radio.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { Stack } from "../stack/stack.js";
4
5
  import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
5
6
  import { FieldLabel } from "../basic-input/field-label.js";
6
7
  import radio_module_default from "./radio.module.js";
7
- import { clsx } from "clsx";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { Field } from "@base-ui/react/field";
10
10
  import { Radio } from "@base-ui/react/radio";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import { Stack } from "../stack/stack.js";
3
4
  import { Text } from "../text/text.js";
4
5
  import select_module_default from "./select.module.js";
5
6
  import { SelectIndicatorSlot } from "./select-indicator-slot.js";
6
- import { clsx } from "clsx";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Select } from "@base-ui/react/select";
9
9
  //#region src/components/select/select-group.tsx
@@ -6,6 +6,12 @@ import type * as React from 'react';
6
6
  * @default Base UI pass-through props keep upstream defaults.
7
7
  */
8
8
  export type SelectOptionProps = SelectItem.Props & {
9
+ /**
10
+ * Decorative leading node rendered before the option label.
11
+ *
12
+ * @default No addon is rendered.
13
+ */
14
+ addon?: React.ReactNode;
9
15
  /**
10
16
  * Custom indicator node rendered when the option is selected.
11
17
  *
@@ -13,4 +19,4 @@ export type SelectOptionProps = SelectItem.Props & {
13
19
  */
14
20
  indicator?: React.ReactNode;
15
21
  };
16
- export declare function SelectOption({ children, className, disabled, indicator, label, value, ...itemProps }: SelectOptionProps): React.JSX.Element;
22
+ export declare function SelectOption({ addon, children, className, disabled, indicator, label, value, ...itemProps }: SelectOptionProps): React.JSX.Element;
@@ -1,14 +1,14 @@
1
1
  "use client";
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import { Stack } from "../stack/stack.js";
3
4
  import { Text } from "../text/text.js";
4
5
  import select_module_default from "./select.module.js";
5
6
  import { SelectIndicatorSlot } from "./select-indicator-slot.js";
6
7
  import { Icon } from "../icon/icon.js";
7
- import { clsx } from "clsx";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { Select } from "@base-ui/react/select";
10
10
  //#region src/components/select/select-option.tsx
11
- function SelectOption({ children, className, disabled, indicator, label, value, ...itemProps }) {
11
+ function SelectOption({ addon, children, className, disabled, indicator, label, value, ...itemProps }) {
12
12
  return /* @__PURE__ */ jsxs(Select.Item, {
13
13
  ...itemProps,
14
14
  "aria-label": label,
@@ -23,11 +23,23 @@ function SelectOption({ children, className, disabled, indicator, label, value,
23
23
  vAlign: "center"
24
24
  }),
25
25
  value,
26
- children: [/* @__PURE__ */ jsx(Text, {
27
- lineHeight: "small",
28
- render: /* @__PURE__ */ jsx(Select.ItemText, {}),
29
- size: "small",
30
- children
26
+ children: [/* @__PURE__ */ jsxs(Stack, {
27
+ direction: "row",
28
+ columnGap: "small",
29
+ vAlign: "start",
30
+ children: [addon && /* @__PURE__ */ jsx(Stack, {
31
+ vPadding: "2x-small",
32
+ "aria-hidden": "true",
33
+ grow: false,
34
+ shrink: false,
35
+ children: addon
36
+ }), /* @__PURE__ */ jsx(Text, {
37
+ className: select_module_default.OptionText,
38
+ lineHeight: "small",
39
+ render: /* @__PURE__ */ jsx(Select.ItemText, {}),
40
+ size: "small",
41
+ children
42
+ })]
31
43
  }), /* @__PURE__ */ jsx(SelectIndicatorSlot, {
32
44
  interactive: true,
33
45
  children: indicator ?? /* @__PURE__ */ jsx(Icon, {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import select_module_default from "./select.module.js";
3
- import { clsx } from "clsx";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { Select } from "@base-ui/react/select";
6
6
  //#region src/components/select/select-separator.tsx
@@ -1 +1 @@
1
- .select-module_Select_eXv4Y{--input-height:var(--space-x-large);--control-group-background:var(--base-1);--control-group-color:var(--global-foreground);--control-group-border-color:var(--global-contrast);--control-group-border-radius:var(--radius-small);--select-trigger-padding-inline-start:var(--space-small);--select-trigger-padding-inline-end:var(--space-x-small);--field-label-padding-inline:calc((var(--control-group-border-radius) + 0px) / 2);z-index:0;&:has([required]) [data-field-label]:after{content:" *";color:var(--highlight-red)}&[data-invalid]>.select-module_Trigger_-wBsg:not(:disabled):not([data-disabled]){--control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}}.select-module_Trigger_-wBsg{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--input-height);padding-inline:calc(var(--select-trigger-padding-inline-start) + ((var(--control-group-border-radius) + 0px) / 4)) var(--select-trigger-padding-inline-end);border:1px solid var(--control-group-border-color);border-radius:var(--control-group-border-radius);background:var(--control-group-background);color:var(--control-group-color);font:inherit;text-align:start;cursor:pointer;&:focus-visible{outline:2px solid var(--global-foreground);outline-offset:2px}&[data-popup-open]{outline:none}&:disabled,&[data-disabled]{--control-group-background:var(--global-disabled-background);--control-group-border-color:transparent;--control-group-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.select-module_Value_uWHPX{--text-fluid-factor:0;--text-font-size:var(--font-scale-body-small);flex:1 1 auto;min-inline-size:0;overflow:hidden;display:block;text-overflow:ellipsis;&[data-placeholder]{color:var(--global-disabled-foreground)}}.select-module_Icon_EOwki{font-size:var(--font-scale-body-small);pointer-events:none}.select-module_Description_OmwmV{padding-inline:calc((var(--control-group-border-radius) + 0px) / 2)}.select-module_SelectPopup_UzGXL{--select-list-border-radius:var(--radius-medium);--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}.select-module_ScrollArrow_kHlEi{--scroll-arrow-background:var(--is-vibrancy-active) oklab(from var(--base-1) l a b/80%);position:absolute;inset-inline:0;z-index:1;inline-size:100%;block-size:var(--space-large);cursor:default;background:var(--scroll-arrow-background,var(--base-1));backdrop-filter:var(--vibrancy-filter,none);border:1px solid var(--global-contrast)}.select-module_ScrollButton_sHBOa{pointer-events:none}.select-module_ScrollArrowUp_DGXS-{inset-block-start:0;border-radius:var(--select-list-border-radius) var(--select-list-border-radius) 0 0}.select-module_ScrollArrowDown_vhJy0{inset-block-end:0;border-radius:0 0 var(--select-list-border-radius) var(--select-list-border-radius)}.select-module_List_jdUWx{box-sizing:border-box;inline-size:100%;max-block-size:var(--available-height);overflow-y:auto;scroll-padding-block:var(--select-list-padding);list-style:none;overscroll-behavior:contain;&:focus,&:focus-visible{outline:none}}.select-module_Option_KgYqz{border-radius:calc((var(--select-list-border-radius) + 0px) - var(--select-list-padding));cursor:pointer;&:focus{outline:none}&:focus-visible{outline:2px solid var(--global-foreground);outline-offset:0}&:not([data-disabled]):hover,&:not([data-disabled])[data-highlighted]{--option-hover-background:var(--is-vibrancy-active) oklab(from var(--global-contrast) l a b/14%);background:var(--option-hover-background,var(--global-contrast))}&[data-disabled]{color:var(--global-disabled-foreground);cursor:not-allowed}}.select-module_Indicator_YNUuz{inline-size:var(--space-medium);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}}.select-module_Group_xzkuA+.select-module_Group_xzkuA{margin-block-start:var(--space-medium)}.select-module_Separator_Q-ri9{block-size:1px;margin-block:var(--space-small);margin-inline:var(--space-small);background:var(--base-3)}
1
+ .select-module_Select_eXv4Y{--input-height:var(--space-x-large);--control-group-background:var(--base-1);--control-group-color:var(--global-foreground);--control-group-border-color:var(--global-contrast);--control-group-border-radius:var(--radius-small);--select-trigger-padding-inline-start:var(--space-small);--select-trigger-padding-inline-end:var(--space-x-small);--field-label-padding-inline:calc((var(--control-group-border-radius) + 0px) / 2);z-index:0;&:has([required]) [data-field-label]:after{content:" *";color:var(--highlight-red)}&[data-invalid]>.select-module_Trigger_-wBsg:not(:disabled):not([data-disabled]){--control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}}.select-module_Trigger_-wBsg{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--input-height);padding-inline:calc(var(--select-trigger-padding-inline-start) + ((var(--control-group-border-radius) + 0px) / 4)) var(--select-trigger-padding-inline-end);border:1px solid var(--control-group-border-color);border-radius:var(--control-group-border-radius);background:var(--control-group-background);color:var(--control-group-color);font:inherit;text-align:start;cursor:pointer;&:focus-visible{outline:2px solid var(--global-foreground);outline-offset:2px}&[data-popup-open]{outline:none}&:disabled,&[data-disabled]{--control-group-background:var(--global-disabled-background);--control-group-border-color:transparent;--control-group-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.select-module_Value_uWHPX{--text-fluid-factor:0;--text-font-size:var(--font-scale-body-small);flex:1 1 auto;min-inline-size:0;overflow:hidden;display:block;text-overflow:ellipsis;&[data-placeholder]{color:var(--global-disabled-foreground)}}.select-module_Icon_EOwki{font-size:var(--font-scale-body-small);pointer-events:none}.select-module_Description_OmwmV{padding-inline:calc((var(--control-group-border-radius) + 0px) / 2)}.select-module_SelectPopup_UzGXL{--select-list-border-radius:var(--radius-medium);--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}.select-module_ScrollArrow_kHlEi{--scroll-arrow-background:var(--is-vibrancy-active) oklab(from var(--base-1) l a b/80%);position:absolute;inset-inline:0;z-index:1;inline-size:100%;block-size:var(--space-large);cursor:default;background:var(--scroll-arrow-background,var(--base-1));backdrop-filter:var(--vibrancy-filter,none);border:1px solid var(--global-contrast)}.select-module_ScrollButton_sHBOa{pointer-events:none}.select-module_ScrollArrowUp_DGXS-{inset-block-start:0;border-radius:var(--select-list-border-radius) var(--select-list-border-radius) 0 0}.select-module_ScrollArrowDown_vhJy0{inset-block-end:0;border-radius:0 0 var(--select-list-border-radius) var(--select-list-border-radius)}.select-module_List_jdUWx{box-sizing:border-box;inline-size:100%;max-block-size:var(--available-height);overflow-y:auto;scroll-padding-block:var(--select-list-padding);list-style:none;overscroll-behavior:contain;&:focus,&:focus-visible{outline:none}}.select-module_OptionText_UynBD{flex:1 1 auto;min-inline-size:0}.select-module_Option_KgYqz{border-radius:calc((var(--select-list-border-radius) + 0px) - var(--select-list-padding));cursor:pointer;&:focus{outline:none}&:focus-visible{outline:2px solid var(--global-foreground);outline-offset:0}&:not([data-disabled]):hover,&:not([data-disabled])[data-highlighted]{--option-hover-background:var(--is-vibrancy-active) oklab(from var(--global-contrast) l a b/14%);background:var(--option-hover-background,var(--global-contrast))}&[data-disabled]{color:var(--global-disabled-foreground);cursor:not-allowed}}.select-module_Indicator_YNUuz{inline-size:var(--space-medium);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}}.select-module_Group_xzkuA+.select-module_Group_xzkuA{margin-block-start:var(--space-medium)}.select-module_Separator_Q-ri9{block-size:1px;margin-block:var(--space-small);margin-inline:var(--space-small);background:var(--base-3)}
@@ -53,8 +53,14 @@ export type SelectProps = SelectRoot.Props<string> & Omit<FieldRoot.Props, 'ref'
53
53
  * @default No ref is attached.
54
54
  */
55
55
  ref?: React.Ref<HTMLButtonElement>;
56
+ /**
57
+ * When `true`, aligns the list popup width with the trigger via Base UI `alignItemWithTrigger`.
58
+ *
59
+ * @default false
60
+ */
61
+ alignListWithTrigger?: boolean;
56
62
  };
57
- declare function SelectRootComponent({ children, className, description, dirty, disabled, error, icon, invalid, label, name, placeholder, ref, touched, validate, validationDebounceTime, validationMode, ...selectRootProps }: SelectProps): React.JSX.Element;
63
+ declare function SelectRootComponent({ alignListWithTrigger, children, className, description, dirty, disabled, error, icon, invalid, label, name, placeholder, ref, touched, validate, validationDebounceTime, validationMode, ...selectRootProps }: SelectProps): React.JSX.Element;
58
64
  export declare const Select: typeof SelectRootComponent & {
59
65
  Option: typeof SelectOption;
60
66
  Group: typeof SelectGroup;
@@ -4,6 +4,7 @@
4
4
  "whenToUse": [
5
5
  "Choose one value from a predefined list with label and helper copy",
6
6
  "Grouped or separated option lists",
7
+ "Rich option rows with a leading decorative addon and multi-line label content",
7
8
  "Trigger chrome aligned with Textfield control shell"
8
9
  ],
9
10
  "whenNotToUse": ["Multiple selection", "Combobox, filterable search, or custom anchor positioning"],
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import './select.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Stack } from "../stack/stack.js";
5
6
  import { Elevator } from "../elevator/elevator.js";
@@ -13,13 +14,12 @@ import { SelectOption } from "./select-option.js";
13
14
  import { SelectSeparator } from "./select-separator.js";
14
15
  import { Icon } from "../icon/icon.js";
15
16
  import { Surface } from "../surface/surface.js";
16
- import { clsx } from "clsx";
17
17
  import { jsx, jsxs } from "react/jsx-runtime";
18
18
  import { useId } from "react";
19
19
  import { Field } from "@base-ui/react/field";
20
20
  import { Select } from "@base-ui/react/select";
21
21
  //#region src/components/select/select.tsx
22
- function SelectRootComponent({ children, className, description, dirty, disabled, error, icon = /* @__PURE__ */ jsx(Icon, {
22
+ function SelectRootComponent({ alignListWithTrigger = false, children, className, description, dirty, disabled, error, icon = /* @__PURE__ */ jsx(Icon, {
23
23
  name: "ChevronExpandY",
24
24
  size: 16
25
25
  }), invalid, label, name, placeholder, ref, touched, validate, validationDebounceTime, validationMode, ...selectRootProps }) {
@@ -87,7 +87,7 @@ function SelectRootComponent({ children, className, description, dirty, disabled
87
87
  children: icon
88
88
  })]
89
89
  }), /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
90
- alignItemWithTrigger: true,
90
+ alignItemWithTrigger: alignListWithTrigger,
91
91
  children: /* @__PURE__ */ jsxs(Select.Popup, {
92
92
  className: select_module_default.SelectPopup,
93
93
  children: [
@@ -10,6 +10,7 @@ var select_module_default = {
10
10
  ScrollArrowUp: "select-module_ScrollArrowUp_DGXS-",
11
11
  ScrollArrowDown: "select-module_ScrollArrowDown_vhJy0",
12
12
  List: "select-module_List_jdUWx",
13
+ OptionText: "select-module_OptionText_UynBD",
13
14
  Option: "select-module_Option_KgYqz",
14
15
  Indicator: "select-module_Indicator_YNUuz",
15
16
  Group: "select-module_Group_xzkuA",
@@ -1,8 +1,8 @@
1
1
  import './skeleton.css';
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
3
4
  import { resolveThemeValue } from "../../core/theme/resolve-theme-value.js";
4
5
  import skeleton_module_default from "./skeleton.module.js";
5
- import clsx$1 from "clsx";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/components/skeleton/skeleton.tsx
8
8
  var Skeleton = ({ className, height, minHeight, minWidth, radius, ref, style, width, ...otherProps }) => {
@@ -20,7 +20,7 @@ var Skeleton = ({ className, height, minHeight, minWidth, radius, ref, style, wi
20
20
  ...intrinsicAttributes,
21
21
  ref,
22
22
  "aria-hidden": "true",
23
- className: clsx$1(skeleton_module_default.Skeleton, className),
23
+ className: clsx(skeleton_module_default.Skeleton, className),
24
24
  style: dynamicStyle
25
25
  });
26
26
  };
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import './slider.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Stack } from "../stack/stack.js";
5
6
  import { Text } from "../text/text.js";
@@ -8,7 +9,6 @@ import { FieldLabel } from "../basic-input/field-label.js";
8
9
  import slider_module_default from "./slider.module.js";
9
10
  import { SliderControl } from "./slider-control.js";
10
11
  import { isRangeSlider } from "./slider-utils.js";
11
- import { clsx } from "clsx";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  import { Field } from "@base-ui/react/field";
14
14
  import { Slider } from "@base-ui/react/slider";
@@ -1,7 +1,7 @@
1
1
  import './spinner.css';
2
+ import { clsx } from "../../core/clsx.js";
2
3
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
3
4
  import spinner_module_default from "./spinner.module.js";
4
- import clsx$1 from "clsx";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/spinner/spinner.tsx
7
7
  var Spinner = ({ className, color, size = "big", ref, style, ...otherProps }) => {
@@ -10,7 +10,7 @@ var Spinner = ({ className, color, size = "big", ref, style, ...otherProps }) =>
10
10
  ...componentProps,
11
11
  ...intrinsicAttributes,
12
12
  ref,
13
- className: clsx$1(spinner_module_default.Spinner, className),
13
+ className: clsx(spinner_module_default.Spinner, className),
14
14
  "data-dimension": size,
15
15
  viewBox: "0 0 16 16",
16
16
  xmlns: "http://www.w3.org/2000/svg",
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import './stack.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { resolveThemeValue } from "../../core/theme/resolve-theme-value.js";
5
6
  import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
6
7
  import stack_module_default from "./stack.module.js";
7
- import { clsx } from "clsx";
8
8
  import { useRender } from "@base-ui/react/use-render";
9
9
  //#region src/components/stack/stack.tsx
10
10
  var Stack = ({ className, direction = "column", fillChildren = true, hAlign = "initial", hPadding, inline = false, maxWidth, minWidth, ref, render, rowGap, columnGap, style, vAlign = "initial", vPadding, wrap = false, ...otherProps }) => {
@@ -0,0 +1,2 @@
1
+ export { StaticNoise } from './static-noise';
2
+ export type { StaticNoiseProps } from './static-noise';
@@ -0,0 +1 @@
1
+ .static-noise-module_StaticNoise_ZhNxO{pointer-events:none;margin:0}.static-noise-module_FilterSvg_0CP2y{display:block}
@@ -0,0 +1,37 @@
1
+ import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
2
+ import type * as React from 'react';
3
+ /**
4
+ * Public StaticNoise props.
5
+ *
6
+ * Includes standard `figure` attributes such as `id`, `className`, and event handlers,
7
+ * plus Vira-owned turbulence tuning controls.
8
+ *
9
+ * @default Native figure pass-through props keep React defaults.
10
+ */
11
+ export type StaticNoiseProps = React.ComponentPropsWithRef<'figure'> & IntrinsicViraProps & {
12
+ /**
13
+ * Sets the SVG turbulence `baseFrequency` for the internal noise filter.
14
+ *
15
+ * @default 0.5
16
+ */
17
+ baseFrequency?: number | string;
18
+ /**
19
+ * Sets the rendered overlay opacity.
20
+ *
21
+ * @default 0.1
22
+ */
23
+ opacity?: number;
24
+ /**
25
+ * Sets the rendered overlay mix blend mode.
26
+ *
27
+ * @default 'difference'
28
+ */
29
+ mixBlendMode?: React.CSSProperties['mixBlendMode'];
30
+ /**
31
+ * Animates the internal turbulence filter by cycling `feTurbulence` seed values.
32
+ *
33
+ * @default false
34
+ */
35
+ animate?: boolean;
36
+ };
37
+ export declare const StaticNoise: React.FC<StaticNoiseProps>;
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "StaticNoise",
3
+ "summary": "Decorative SVG turbulence noise overlay for textured surfaces and hero sections.",
4
+ "whenToUse": [
5
+ "Subtle grain or texture overlay on cards, panels, or hero sections",
6
+ "Glass or vibrant surfaces that need visual depth without extra content",
7
+ "Decorative atmosphere where the parent owns semantics and layout positioning"
8
+ ],
9
+ "whenNotToUse": [
10
+ "Standalone loading or status feedback without a labeled parent region",
11
+ "Critical readable content where contrast has not been verified",
12
+ "Large numbers of simultaneous full-viewport overlays on the same page"
13
+ ],
14
+ "accessibility": [
15
+ "StaticNoise is decorative — the root renders with aria-hidden by default",
16
+ "Parent surface or region must expose any meaningful label or busy state",
17
+ "Consumer owns position, inset, z-index, and sizing for the overlay placement"
18
+ ],
19
+ "antiPatterns": [
20
+ "Stacking many full-viewport StaticNoise instances on one screen",
21
+ "Using StaticNoise as the only loading announcement for a page",
22
+ "Embedding layout positioning rules inside the component stylesheet"
23
+ ],
24
+ "related": ["Surface", "Skeleton"]
25
+ }
@@ -0,0 +1,45 @@
1
+ import './static-noise.css';
2
+ import { clsx } from "../../core/clsx.js";
3
+ import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
+ import static_noise_module_default from "./static-noise.module.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { useId } from "react";
7
+ //#region src/components/static-noise/static-noise.tsx
8
+ var STATIC_NOISE_SEED_FRAMES = "1;5;2;9;3;7;4;11;6;13;8;15;10;17;12;19;14;16;18;20;3;8;1;13";
9
+ var StaticNoise = ({ animate = false, baseFrequency = .5, className, mixBlendMode = "multiply", opacity = .15, ref, style, ...otherProps }) => {
10
+ const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
11
+ const reactId = useId();
12
+ const dynamicStyle = {
13
+ filter: `url(#${reactId}) grayscale(100%)`,
14
+ opacity,
15
+ mixBlendMode,
16
+ ...style
17
+ };
18
+ return /* @__PURE__ */ jsx("figure", {
19
+ ...componentProps,
20
+ ...intrinsicAttributes,
21
+ ref,
22
+ "aria-hidden": "true",
23
+ className: clsx(static_noise_module_default.StaticNoise, className),
24
+ style: dynamicStyle,
25
+ children: /* @__PURE__ */ jsx("svg", {
26
+ "aria-hidden": "true",
27
+ className: static_noise_module_default.FilterSvg,
28
+ children: /* @__PURE__ */ jsx("filter", {
29
+ id: reactId,
30
+ children: /* @__PURE__ */ jsx("feTurbulence", {
31
+ baseFrequency: String(baseFrequency),
32
+ children: animate ? /* @__PURE__ */ jsx("animate", {
33
+ attributeName: "seed",
34
+ calcMode: "discrete",
35
+ dur: "1s",
36
+ repeatCount: "indefinite",
37
+ values: STATIC_NOISE_SEED_FRAMES
38
+ }) : null
39
+ })
40
+ })
41
+ })
42
+ });
43
+ };
44
+ //#endregion
45
+ export { StaticNoise };
@@ -0,0 +1,6 @@
1
+ var static_noise_module_default = {
2
+ StaticNoise: "static-noise-module_StaticNoise_ZhNxO",
3
+ FilterSvg: "static-noise-module_FilterSvg_0CP2y"
4
+ };
5
+ //#endregion
6
+ export { static_noise_module_default as default };
@@ -0,0 +1,37 @@
1
+ import { ThemeTypes } from '@viraui/foundation/vira/types';
2
+ import type * as React from 'react';
3
+ export type SurfaceRadius = ThemeTypes['radius'] | 'auto';
4
+ export type SurfacePadding = ThemeTypes['space'] | [ThemeTypes['space'] | 0, ThemeTypes['space'] | 0];
5
+ export type SurfaceRadiusCorners = {
6
+ topLeft: string;
7
+ topRight: string;
8
+ bottomRight: string;
9
+ bottomLeft: string;
10
+ };
11
+ export type SurfacePaddingEdges = {
12
+ inlineStart: string;
13
+ inlineEnd: string;
14
+ blockStart: string;
15
+ blockEnd: string;
16
+ };
17
+ export type SurfaceRadiusContextValue = {
18
+ radius: SurfaceRadiusCorners;
19
+ padding: SurfacePaddingEdges;
20
+ };
21
+ export type SurfaceRadiusDefaults = {
22
+ hPadding?: SurfacePadding | undefined;
23
+ radius?: SurfaceRadius | undefined;
24
+ style?: React.CSSProperties | undefined;
25
+ vPadding?: SurfacePadding | undefined;
26
+ };
27
+ type SurfaceRadiusConfig = SurfaceRadiusDefaults & {
28
+ defaults: SurfaceRadiusDefaults;
29
+ };
30
+ export declare const SurfaceRadiusContext: React.Context<SurfaceRadiusContextValue | null>;
31
+ export declare const useSurfaceRadiusContext: () => SurfaceRadiusContextValue | null;
32
+ export declare const useSurfaceRadius: ({ defaults, hPadding, radius, style, vPadding }: SurfaceRadiusConfig) => {
33
+ contextValue: SurfaceRadiusContextValue;
34
+ hasAutoRadius: boolean;
35
+ radiusStyle: React.CSSProperties;
36
+ };
37
+ export {};
@@ -0,0 +1,70 @@
1
+ "use client";
2
+ import { resolveThemeValue } from "../../core/theme/resolve-theme-value.js";
3
+ import { createContext, useContext } from "react";
4
+ //#region src/components/surface/surface-radius-context.ts
5
+ var SurfaceRadiusContext = createContext(null);
6
+ var useSurfaceRadiusContext = () => useContext(SurfaceRadiusContext);
7
+ var toCssLength = (value) => value === void 0 || value === 0 ? "0px" : String(value);
8
+ var resolveAxisPaddingValues = (value) => {
9
+ if (!value) return ["0px", "0px"];
10
+ if (Array.isArray(value)) return [toCssLength(resolveThemeValue(value[0], "space", 0)), toCssLength(resolveThemeValue(value[1], "space", 0))];
11
+ const resolvedValue = toCssLength(resolveThemeValue(value, "space", 0));
12
+ return [resolvedValue, resolvedValue];
13
+ };
14
+ var resolveAutoRadiusCorners = ({ padding, radius }) => ({
15
+ topLeft: `max(0px, calc(${radius.topLeft} - max(${padding.blockStart}, ${padding.inlineStart})))`,
16
+ topRight: `max(0px, calc(${radius.topRight} - max(${padding.blockStart}, ${padding.inlineEnd})))`,
17
+ bottomRight: `max(0px, calc(${radius.bottomRight} - max(${padding.blockEnd}, ${padding.inlineEnd})))`,
18
+ bottomLeft: `max(0px, calc(${radius.bottomLeft} - max(${padding.blockEnd}, ${padding.inlineStart})))`
19
+ });
20
+ var resolveTokenRadiusCorners = (radius) => ({
21
+ topLeft: radius,
22
+ topRight: radius,
23
+ bottomRight: radius,
24
+ bottomLeft: radius
25
+ });
26
+ var getSurfaceStyleRadius = (style) => style?.["--surface-border-radius"];
27
+ var getSurfaceRadiusStyle = (radius) => ({
28
+ "--surface-border-radius-top-left": radius.topLeft,
29
+ "--surface-border-radius-top-right": radius.topRight,
30
+ "--surface-border-radius-bottom-right": radius.bottomRight,
31
+ "--surface-border-radius-bottom-left": radius.bottomLeft
32
+ });
33
+ var resolveDefaultContext = ({ hPadding, radius, style, vPadding }) => {
34
+ const resolvedRadius = toCssLength(resolveThemeValue(radius, "radius", 0));
35
+ const [paddingInlineStart, paddingInlineEnd] = resolveAxisPaddingValues(hPadding);
36
+ const [paddingBlockStart, paddingBlockEnd] = resolveAxisPaddingValues(vPadding);
37
+ return {
38
+ radius: resolveTokenRadiusCorners(toCssLength(getSurfaceStyleRadius(style) ?? resolvedRadius)),
39
+ padding: {
40
+ inlineStart: paddingInlineStart,
41
+ inlineEnd: paddingInlineEnd,
42
+ blockStart: paddingBlockStart,
43
+ blockEnd: paddingBlockEnd
44
+ }
45
+ };
46
+ };
47
+ var useSurfaceRadius = ({ defaults, hPadding, radius, style, vPadding }) => {
48
+ const parentContext = useSurfaceRadiusContext() ?? resolveDefaultContext(defaults);
49
+ const hasAutoRadius = radius === "auto";
50
+ const resolvedRadius = toCssLength(hasAutoRadius ? void 0 : resolveThemeValue(radius, "radius", 0));
51
+ const tokenRadius = toCssLength(getSurfaceStyleRadius(style) ?? resolvedRadius);
52
+ const ownRadius = hasAutoRadius ? resolveAutoRadiusCorners(parentContext) : resolveTokenRadiusCorners(tokenRadius);
53
+ const [paddingInlineStart, paddingInlineEnd] = resolveAxisPaddingValues(hPadding);
54
+ const [paddingBlockStart, paddingBlockEnd] = resolveAxisPaddingValues(vPadding);
55
+ return {
56
+ contextValue: {
57
+ radius: ownRadius,
58
+ padding: {
59
+ inlineStart: paddingInlineStart,
60
+ inlineEnd: paddingInlineEnd,
61
+ blockStart: paddingBlockStart,
62
+ blockEnd: paddingBlockEnd
63
+ }
64
+ },
65
+ hasAutoRadius,
66
+ radiusStyle: hasAutoRadius ? getSurfaceRadiusStyle(ownRadius) : { "--surface-border-radius": tokenRadius }
67
+ };
68
+ };
69
+ //#endregion
70
+ export { SurfaceRadiusContext, useSurfaceRadius };
@@ -1 +1 @@
1
- .surface-module_Surface_slEYq{--surface-background-hover:var(--surface-background);--surface-border-radius:var(--radius-medium);--surface-padding-inline-start:0;--surface-padding-inline-end:0;--surface-padding-block-start:0;--surface-padding-block-end:0;--surface-vibrancy-background:var(--is-vibrancy-active) oklab(from var(--surface-background) l a b/80%);position:relative;box-sizing:border-box;background:var(--surface-vibrancy-background,var(--surface-background,transparent));border-radius:var(--surface-border-radius);border:0;&[data-surface-has-padding=true]{padding:var(--surface-padding-block-start) var(--surface-padding-inline-end) var(--surface-padding-block-end) var(--surface-padding-inline-start)}&[data-surface-border]{border-style:var(--surface-border-style,solid);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{animation:surface-module_surface-background-hover_HwH9- var(--duration-fast) var(--easing-standard);animation-fill-mode:both}}}@keyframes surface-module_surface-background-hover_HwH9-{to{background:var(--surface-background-hover)}}
1
+ .surface-module_Surface_slEYq{--surface-background-hover:var(--surface-background);--surface-border-radius:0;--surface-border-radius-top-left:var(--surface-border-radius);--surface-border-radius-top-right:var(--surface-border-radius);--surface-border-radius-bottom-right:var(--surface-border-radius);--surface-border-radius-bottom-left:var(--surface-border-radius);--surface-padding-inline-start:0;--surface-padding-inline-end:0;--surface-padding-block-start:0;--surface-padding-block-end:0;--surface-vibrancy-background:var(--is-vibrancy-active) oklab(from var(--surface-background) l a b/80%);position:relative;box-sizing:border-box;background:var(--surface-vibrancy-background,var(--surface-background,transparent));border-radius:var(--surface-border-radius-top-left) var(--surface-border-radius-top-right) var(--surface-border-radius-bottom-right) var(--surface-border-radius-bottom-left);border:0;&[data-surface-radius=auto]{--surface-border-radius-top-left:0;--surface-border-radius-top-right:0;--surface-border-radius-bottom-right:0;--surface-border-radius-bottom-left:0}&[data-surface-has-padding=true]{padding:var(--surface-padding-block-start) var(--surface-padding-inline-end) var(--surface-padding-block-end) var(--surface-padding-inline-start)}&[data-surface-border]{border-style:var(--surface-border-style,solid);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{animation:surface-module_surface-background-hover_HwH9- var(--duration-fast) var(--easing-standard);animation-fill-mode:both}}}@keyframes surface-module_surface-background-hover_HwH9-{to{background:var(--surface-background-hover)}}
@@ -1,6 +1,6 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
2
  import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
- import { ThemeTypes } from '@viraui/foundation/vira/types';
3
+ import { SurfacePadding, SurfaceRadius } from './surface-radius-context';
4
4
  import type * as React from 'react';
5
5
  /** Base ramp layer for nested surfaces; clamped to 1–3 at runtime. */
6
6
  type SurfaceBaseLevel = 1 | 2 | 3;
@@ -51,23 +51,23 @@ export type SurfaceProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'color'>
51
51
  */
52
52
  borderStyle?: 'solid' | 'dashed' | 'dotted' | 'double';
53
53
  /**
54
- * Sets the corner radius from the Vira radius token scale.
54
+ * Sets the corner radius from the Vira radius token scale, or derives concentric radii from the nearest ancestor Surface.
55
55
  *
56
56
  * @default No radius.
57
57
  */
58
- radius?: ThemeTypes['radius'];
58
+ radius?: SurfaceRadius;
59
59
  /**
60
60
  * Sets inline padding using one token for both sides or a `[start, end]` tuple.
61
61
  *
62
62
  * @default No inline padding.
63
63
  */
64
- hPadding?: ThemeTypes['space'] | [ThemeTypes['space'] | 0, ThemeTypes['space'] | 0];
64
+ hPadding?: SurfacePadding;
65
65
  /**
66
66
  * Sets block padding using one token for both sides or a `[start, end]` tuple.
67
67
  *
68
68
  * @default No block padding.
69
69
  */
70
- vPadding?: ThemeTypes['space'] | [ThemeTypes['space'] | 0, ThemeTypes['space'] | 0];
70
+ vPadding?: SurfacePadding;
71
71
  };
72
72
  export declare const Surface: React.FC<SurfaceProps>;
73
73
  export {};
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "name": "Surface",
3
- "summary": "Presentational container with token background, optional border, radius, and padding.",
3
+ "summary": "Presentational container with token background, optional border, radius, and padding; nested surfaces use radius=\"auto\" for concentric corners.",
4
4
  "whenToUse": [
5
5
  "Group content with base-level background and contrast border",
6
6
  "Popup or card chrome with optional hover background",
7
- "Compose with Elevator for animated elevation transitions"
7
+ "Compose with Elevator for animated elevation transitions",
8
+ "Set radius to a token on the outermost Surface that needs rounded corners",
9
+ "Set radius=\"auto\" on a nested Surface when its parent Surface has a radius so each corner subtracts the nearest ancestor padding and stays concentric",
10
+ "Stack nested auto-radius Surfaces recursively; context still resolves through wrapper layout such as Stack"
8
11
  ],
9
12
  "whenNotToUse": [
10
13
  "Interactive control semantics without an appropriate render root",
11
- "Expecting hover background on touch-primary devices"
14
+ "Expecting hover background on touch-primary devices",
15
+ "Using radius=\"auto\" on the outermost Surface when no ancestor Surface provides a radius context"
12
16
  ],
13
17
  "accessibility": [
14
18
  "Surface is presentational — pair with headings or labels so grouped content is discoverable",
@@ -17,7 +21,9 @@
17
21
  ],
18
22
  "antiPatterns": [
19
23
  "Overwriting transition shorthand without composing box-shadow when data-elevation is present",
20
- "Assuming hoverColor applies on touch devices"
24
+ "Assuming hoverColor applies on touch devices",
25
+ "Reusing the parent token radius on nested Surfaces instead of radius=\"auto\" when concentric corners are required",
26
+ "Expecting radius=\"auto\" to inherit a token when the nearest ancestor Surface has no radius set"
21
27
  ],
22
28
  "related": ["Elevator", "Stack"]
23
29
  }
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import './surface.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
- import { resolveThemeValue } from "../../core/theme/resolve-theme-value.js";
5
5
  import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
6
+ import { SurfaceRadiusContext, useSurfaceRadius } from "./surface-radius-context.js";
6
7
  import surface_module_default from "./surface.module.js";
7
- import { clsx } from "clsx";
8
+ import { jsx } from "react/jsx-runtime";
8
9
  import { useRender } from "@base-ui/react/use-render";
9
10
  //#region src/components/surface/surface.tsx
10
11
  var clampSurfaceBaseLevel = (value) => {
@@ -13,21 +14,34 @@ var clampSurfaceBaseLevel = (value) => {
13
14
  return value;
14
15
  };
15
16
  var toSurfaceColor = (value) => typeof value === "string" ? value : `var(--base-${clampSurfaceBaseLevel(value)})`;
17
+ var surfaceDefaultRadiusProps = {
18
+ hPadding: void 0,
19
+ radius: void 0,
20
+ style: void 0,
21
+ vPadding: void 0
22
+ };
16
23
  var Surface = ({ border, borderStyle = "solid", className, color, hPadding, hoverColor, radius, ref, render, style, vPadding, ...otherProps }) => {
17
24
  const hasColor = color !== void 0;
18
25
  const hasPadding = Boolean(hPadding || vPadding);
19
26
  const hasHoverColor = hoverColor !== void 0;
20
27
  const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
28
+ const { contextValue, hasAutoRadius, radiusStyle } = useSurfaceRadius({
29
+ defaults: surfaceDefaultRadiusProps,
30
+ hPadding,
31
+ radius,
32
+ style,
33
+ vPadding
34
+ });
21
35
  const dynamicStyle = {
22
36
  ...hasColor ? { "--surface-background": toSurfaceColor(color) } : {},
23
37
  ...hasHoverColor ? { "--surface-background-hover": toSurfaceColor(hoverColor) } : {},
24
38
  ...border ? { "--surface-border-style": borderStyle } : {},
25
- "--surface-border-radius": resolveThemeValue(radius, "radius", 0),
39
+ ...radiusStyle,
26
40
  ...resolveAxisPadding(hPadding, "--surface-padding-inline-start", "--surface-padding-inline-end"),
27
41
  ...resolveAxisPadding(vPadding, "--surface-padding-block-start", "--surface-padding-block-end"),
28
42
  ...style
29
43
  };
30
- return useRender({
44
+ const surface = useRender({
31
45
  defaultTagName: "div",
32
46
  render,
33
47
  ref,
@@ -35,12 +49,17 @@ var Surface = ({ border, borderStyle = "solid", className, color, hPadding, hove
35
49
  ...componentProps,
36
50
  ...intrinsicAttributes,
37
51
  ...border ? { "data-surface-border": border } : {},
52
+ ...hasAutoRadius ? { "data-surface-radius": "auto" } : {},
38
53
  "data-surface-has-hover-color": hasHoverColor ? "true" : "false",
39
54
  "data-surface-has-padding": hasPadding ? "true" : "false",
40
55
  className: clsx(surface_module_default.Surface, className),
41
56
  style: dynamicStyle
42
57
  }
43
58
  });
59
+ return /* @__PURE__ */ jsx(SurfaceRadiusContext.Provider, {
60
+ value: contextValue,
61
+ children: surface
62
+ });
44
63
  };
45
64
  //#endregion
46
65
  export { Surface };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import './switch.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Stack } from "../stack/stack.js";
5
6
  import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
6
7
  import { FieldLabel } from "../basic-input/field-label.js";
7
8
  import switch_module_default from "./switch.module.js";
8
- import { clsx } from "clsx";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { Field } from "@base-ui/react/field";
11
11
  import { Switch } from "@base-ui/react/switch";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import './text.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
5
6
  import text_module_default from "./text.module.js";
6
- import { clsx } from "clsx";
7
7
  import { useRender } from "@base-ui/react/use-render";
8
8
  //#region src/components/text/text.tsx
9
9
  var Text = ({ align = "start", balanced = false, selection = true, className, color, family = "body", fontWidth, hPadding, lineHeight = "standard", maxWidth, opticalSize, ref, render, size = "medium", style, tone, trim = "both", trimType = "cap alphabetic", vPadding, weight = "regular", whiteSpace = "normal", ...otherProps }) => {
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import './textarea.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Stack } from "../stack/stack.js";
5
6
  import { BasicInput } from "../basic-input/basic-input.js";
6
7
  import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
7
8
  import { FieldLabel } from "../basic-input/field-label.js";
8
9
  import textarea_module_default from "./textarea.module.js";
9
- import { clsx } from "clsx";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { Field } from "@base-ui/react/field";
12
12
  //#region src/components/textarea/textarea.tsx
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import './textfield.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { Stack } from "../stack/stack.js";
5
6
  import { BasicInput } from "../basic-input/basic-input.js";
@@ -7,7 +8,6 @@ import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
7
8
  import { FieldLabel } from "../basic-input/field-label.js";
8
9
  import { InputControlGroup } from "../basic-input/input-control-group.js";
9
10
  import textfield_module_default from "./textfield.module.js";
10
- import { clsx } from "clsx";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
12
  import { Field } from "@base-ui/react/field";
13
13
  import { Input } from "@base-ui/react/input";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import './title.css';
3
+ import { clsx } from "../../core/clsx.js";
3
4
  import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
5
  import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
5
6
  import title_module_default from "./title.module.js";
6
- import { clsx } from "clsx";
7
7
  import { useRender } from "@base-ui/react/use-render";
8
8
  //#region src/components/title/title.tsx
9
9
  var Title = ({ align = "start", balanced = false, selection = true, className, color, fontWidth, hPadding, level = "h1", lineHeight = "standard", maxWidth, opticalSize, ref, render, style, trim = "both", trimType = "cap alphabetic", vPadding, weight, whiteSpace = "normal", ...otherProps }) => {
@@ -0,0 +1 @@
1
+ export declare const clsx: (...inputs: any[]) => string;
@@ -0,0 +1,36 @@
1
+ //#region src/core/clsx.ts
2
+ var toVal = (mix) => {
3
+ let str = "";
4
+ if (typeof mix === "string" || typeof mix === "number") str += mix;
5
+ else if (typeof mix === "object" && mix !== null) {
6
+ if (Array.isArray(mix)) {
7
+ for (let index = 0; index < mix.length; index += 1) if (mix[index]) {
8
+ const value = toVal(mix[index]);
9
+ if (value) {
10
+ if (str) str += " ";
11
+ str += value;
12
+ }
13
+ }
14
+ } else for (const key in mix) if (mix[key]) {
15
+ if (str) str += " ";
16
+ str += key;
17
+ }
18
+ }
19
+ return str;
20
+ };
21
+ var clsx = (...inputs) => {
22
+ let str = "";
23
+ for (let index = 0; index < inputs.length; index += 1) {
24
+ const input = inputs[index];
25
+ if (input) {
26
+ const value = toVal(input);
27
+ if (value) {
28
+ if (str) str += " ";
29
+ str += value;
30
+ }
31
+ }
32
+ }
33
+ return str;
34
+ };
35
+ //#endregion
36
+ export { clsx };
package/dist/index.js CHANGED
@@ -23,5 +23,7 @@ import { Select } from "./components/select/select.js";
23
23
  import { Icon } from "./components/icon/icon.js";
24
24
  import { Skeleton } from "./components/skeleton/skeleton.js";
25
25
  import { Surface } from "./components/surface/surface.js";
26
+ import { StaticNoise } from "./components/static-noise/static-noise.js";
27
+ import { ProgressiveBlur } from "./components/progressive-blur/progressive-blur.js";
26
28
  import { Title } from "./components/title/title.js";
27
- export { Avatar, AvatarGroup, Button, Checkbox, Chip, ClampText, ELEVATION_DEFAULTS, Elevator, Icon, IconButton, LinearProgress, Masonry, Radio, RadioGroup, Select, Skeleton, Slider, Spinner, Stack, Surface, Switch, Text, Textarea, Textfield, Title, getElevationProps };
29
+ export { Avatar, AvatarGroup, Button, Checkbox, Chip, ClampText, ELEVATION_DEFAULTS, Elevator, Icon, IconButton, LinearProgress, Masonry, ProgressiveBlur, Radio, RadioGroup, Select, Skeleton, Slider, Spinner, Stack, StaticNoise, Surface, Switch, Text, Textarea, Textfield, Title, getElevationProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viraui/react",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"
@@ -32,9 +32,6 @@
32
32
  "access": "public",
33
33
  "registry": "https://registry.npmjs.org/"
34
34
  },
35
- "dependencies": {
36
- "clsx": "2.1.1"
37
- },
38
35
  "devDependencies": {
39
36
  "@base-ui/react": "1.5.0",
40
37
  "postcss": "8.5.6",
@@ -45,10 +42,10 @@
45
42
  "vite": "8.0.16",
46
43
  "vite-plugin-dts": "4.5.4",
47
44
  "vite-plugin-static-copy": "2.3.0",
48
- "@viraui/foundation": "0.0.21",
45
+ "@viraui/foundation": "0.0.22",
49
46
  "@viraui/icons": "0.0.15",
50
- "@viraui/tsconfig": "0.0.16",
51
- "@viraui/postcss-config": "0.0.16"
47
+ "@viraui/postcss-config": "0.0.16",
48
+ "@viraui/tsconfig": "0.0.16"
52
49
  },
53
50
  "peerDependencies": {
54
51
  "@base-ui/react": ">=1.5.0",