@viraui/react 0.0.20 → 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 (58) 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/dist/preflight.css +1 -1
  58. package/package.json +4 -7
@@ -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 };
@@ -1 +1 @@
1
- @layer viraui.preflight;@layer viraui.preflight{html{--scrollbar-thumb:light-dark(var(--base-4),var(--base-3));--scrollbar-track:transparent;font-size:100%;box-sizing:border-box;line-height:1.5;background-color:var(--global-background);color:var(--global-foreground)}*{corner-shape:var(--corner-shape,unset)}*,:after,:before{margin:0;box-sizing:inherit;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track)}:focus-visible{outline:2px solid var(--global-foreground);outline-offset:2px}body{color:var(--global-foreground);margin:0;font-size:var(--font-scale-body-medium);font-optical-sizing:auto;font-family:var(--font-family-body),sans-serif;font-variation-settings:"wght" 400}::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:not([fill]){fill:currentcolor}fieldset{border:0}ol ul,ul ol{font-size:medium}table{border-spacing:0;width: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 td,table th{border:none;text-align:left;font-size:medium;padding:calc(var(--space-x-small) + var(--space-2x-small)) var(--space-small)}[data-elevation]{--shadow-direction:1;--shadow-opacity-factor:0.16;--extra-shadow:0 0 0 1px transparent;--shadow-color:oklch(0% 0 0deg)}}@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),transparent 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="1"]{--y1:0px;--y2:2px;--y3:4px;--y4:7px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 1px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 2px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 2px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 3px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[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;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 3px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 5px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 6px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 8px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[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]){box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 3px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 5px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 7px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 8px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[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]){box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 3px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 5px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 6px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 8px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[data-elevation-hover="3"]:hover,[data-elevation="3"]{--y1:2px;--y2:7px;--y3:16px;--y4:29px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 4px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 7px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 10px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 12px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[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;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 5px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 10px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 13px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 15px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[data-elevation-hover="4"]:hover,[data-elevation="4"]{--y1:4px;--y2:14px;--y3:33px;--y4:58px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 8px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 14px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 20px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 23px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[data-elevation-hover="4"]:where([data-elevation-direction=top]):hover,[data-elevation="4"]:where([data-elevation-direction=top]){--y2:15px;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 8px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 15px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 20px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 23px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[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;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 8px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 15px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 20px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 23px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[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;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 8px oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) 14px oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) 20px oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) 23px oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}}@layer viraui.preflight{[data-grow=false]{--vira-flex-grow:0;flex-grow:0}[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/15%);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);vertical-align:top}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-theme=dark]{color-scheme:dark}[data-theme=light]{color-scheme:light}[data-vibrant]{--is-vibrancy-active:var(--vibrancy-enable);--vibrancy-filter:var(--vibrancy-enable) brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px));backdrop-filter:var(--vibrancy-filter,none)}}@layer viraui.preflight{}@layer viraui.preflight{}[data-elevation]{transition-property:box-shadow;transition-duration:var(--elevation-transition-duration,.16s);transition-timing-function:var(--elevation-transition-easing,ease)}
1
+ @layer viraui.preflight;@layer viraui.preflight{html{--scrollbar-thumb:light-dark(var(--base-4),var(--base-3));--scrollbar-track:transparent;font-size:100%;box-sizing:border-box;line-height:1.5;background-color:var(--global-background);color:var(--global-foreground)}*{corner-shape:var(--corner-shape,unset)}*,:after,:before{margin:0;box-sizing:inherit;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track)}:focus-visible{outline:2px solid var(--global-foreground);outline-offset:2px}body{color:var(--global-foreground);margin:0;font-size:var(--font-scale-body-medium);font-optical-sizing:auto;font-family:var(--font-family-body),sans-serif;font-variation-settings:"wght" 400}::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:not([fill]){fill:currentcolor}fieldset{border:0}ol ul,ul ol{font-size:medium}table{border-spacing:0;width: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 td,table th{border:none;text-align:left;font-size:medium;padding:calc(var(--space-x-small) + var(--space-2x-small)) var(--space-small)}[data-elevation]{--shadow-direction:1;--shadow-opacity-factor:0.16;--extra-shadow:0 0 0 1px transparent;--shadow-color:oklch(0% 0 0deg)}}@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),transparent 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=false]{--vira-flex-grow:0;flex-grow:0}[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/15%);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);vertical-align:top}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-theme=dark]{color-scheme:dark}[data-theme=light]{color-scheme:light}[data-vibrant]{--is-vibrancy-active:var(--vibrancy-enable);--vibrancy-filter:var(--vibrancy-enable) brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px));backdrop-filter:var(--vibrancy-filter,none)}}@layer viraui.preflight{}@layer viraui.preflight{}[data-elevation]{transition-property:box-shadow;transition-duration:var(--elevation-transition-duration,.16s);transition-timing-function:var(--elevation-transition-easing,ease)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viraui/react",
3
- "version": "0.0.20",
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.20",
45
+ "@viraui/foundation": "0.0.22",
49
46
  "@viraui/icons": "0.0.15",
50
- "@viraui/postcss-config": "0.0.15",
51
- "@viraui/tsconfig": "0.0.15"
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",