@viraui/react 1.0.10 → 1.0.12

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 (135) hide show
  1. package/dist/catalog.json +13 -1
  2. package/dist/components/accordion/accordion.guide.json +1 -0
  3. package/dist/components/annotate/annotate.css +1 -0
  4. package/dist/components/annotate/annotate.d.ts +101 -0
  5. package/dist/components/annotate/annotate.guide.json +121 -0
  6. package/dist/components/annotate/annotate.js +39 -0
  7. package/dist/components/annotate/annotate.module.js +11 -0
  8. package/dist/components/annotate/index.d.ts +2 -0
  9. package/dist/components/avatar/avatar.d.ts +1 -2
  10. package/dist/components/avatar/avatar.guide.json +1 -0
  11. package/dist/components/avatar/avatar.js +3 -6
  12. package/dist/components/avatar-group/avatar-group.d.ts +1 -2
  13. package/dist/components/avatar-group/avatar-group.guide.json +1 -0
  14. package/dist/components/avatar-group/avatar-group.js +1 -4
  15. package/dist/components/basic-input/basic-input.css +1 -1
  16. package/dist/components/basic-input/basic-input.d.ts +7 -0
  17. package/dist/components/basic-input/basic-input.js +4 -1
  18. package/dist/components/basic-input/input-control-group.js +2 -2
  19. package/dist/components/bleed/bleed.d.ts +1 -2
  20. package/dist/components/bleed/bleed.guide.json +1 -0
  21. package/dist/components/bleed/bleed.js +1 -4
  22. package/dist/components/button/button-link.d.ts +1 -2
  23. package/dist/components/button/button-link.guide.json +1 -0
  24. package/dist/components/button/button-link.js +1 -4
  25. package/dist/components/button/button.d.ts +1 -2
  26. package/dist/components/button/button.guide.json +1 -0
  27. package/dist/components/button/button.js +2 -6
  28. package/dist/components/checkbox/checkbox.css +1 -1
  29. package/dist/components/checkbox/checkbox.guide.json +1 -0
  30. package/dist/components/chip/chip.d.ts +1 -2
  31. package/dist/components/chip/chip.guide.json +1 -0
  32. package/dist/components/chip/chip.js +3 -6
  33. package/dist/components/clamp-text/clamp-text.d.ts +1 -2
  34. package/dist/components/clamp-text/clamp-text.guide.json +1 -0
  35. package/dist/components/clamp-text/clamp-text.js +1 -4
  36. package/dist/components/dialog/dialog-sheet.js +2 -2
  37. package/dist/components/dialog/dialog.guide.json +1 -0
  38. package/dist/components/elevator/elevator.d.ts +1 -2
  39. package/dist/components/elevator/elevator.guide.json +1 -0
  40. package/dist/components/elevator/elevator.js +1 -4
  41. package/dist/components/fieldset/fieldset.d.ts +1 -2
  42. package/dist/components/fieldset/fieldset.guide.json +1 -0
  43. package/dist/components/fieldset/fieldset.js +16 -21
  44. package/dist/components/fit-text/fit-text.css +1 -0
  45. package/dist/components/fit-text/fit-text.d.ts +18 -0
  46. package/dist/components/fit-text/fit-text.guide.json +40 -0
  47. package/dist/components/fit-text/fit-text.js +31 -0
  48. package/dist/components/fit-text/fit-text.module.js +13 -0
  49. package/dist/components/fit-text/index.d.ts +2 -0
  50. package/dist/components/icon-button/icon-button-link.guide.json +1 -0
  51. package/dist/components/icon-button/icon-button.guide.json +1 -0
  52. package/dist/components/index.d.ts +2 -0
  53. package/dist/components/linear-progress/linear-progress.d.ts +0 -13
  54. package/dist/components/linear-progress/linear-progress.guide.json +1 -0
  55. package/dist/components/linear-progress/linear-progress.js +41 -46
  56. package/dist/components/masonry/index.d.ts +1 -1
  57. package/dist/components/masonry/masonry-item.d.ts +1 -2
  58. package/dist/components/masonry/masonry-item.js +10 -15
  59. package/dist/components/masonry/masonry.d.ts +10 -11
  60. package/dist/components/masonry/masonry.guide.json +2 -1
  61. package/dist/components/masonry/masonry.js +9 -18
  62. package/dist/components/meter/meter.d.ts +0 -13
  63. package/dist/components/meter/meter.guide.json +1 -0
  64. package/dist/components/meter/meter.js +40 -45
  65. package/dist/components/popover/popover-sheet.js +2 -2
  66. package/dist/components/popover/popover.guide.json +1 -0
  67. package/dist/components/progressive-blur/progressive-blur.d.ts +1 -2
  68. package/dist/components/progressive-blur/progressive-blur.guide.json +1 -0
  69. package/dist/components/progressive-blur/progressive-blur.js +1 -4
  70. package/dist/components/progressive-blur/progressive-blur.utils.js +4 -7
  71. package/dist/components/radio/radio.guide.json +1 -0
  72. package/dist/components/select/select-indicator-slot.js +3 -3
  73. package/dist/components/select/select-option.js +2 -2
  74. package/dist/components/select/select.d.ts +1 -2
  75. package/dist/components/select/select.guide.json +1 -0
  76. package/dist/components/select/select.js +3 -6
  77. package/dist/components/separator/separator.d.ts +1 -2
  78. package/dist/components/separator/separator.guide.json +1 -0
  79. package/dist/components/separator/separator.js +1 -4
  80. package/dist/components/shimmer/shimmer.d.ts +1 -2
  81. package/dist/components/shimmer/shimmer.guide.json +1 -0
  82. package/dist/components/shimmer/shimmer.js +1 -4
  83. package/dist/components/skeleton/skeleton.d.ts +1 -2
  84. package/dist/components/skeleton/skeleton.guide.json +1 -0
  85. package/dist/components/skeleton/skeleton.js +1 -4
  86. package/dist/components/slider/slider.d.ts +0 -13
  87. package/dist/components/slider/slider.guide.json +1 -0
  88. package/dist/components/slider/slider.js +1 -4
  89. package/dist/components/spinner/spinner.d.ts +1 -2
  90. package/dist/components/spinner/spinner.guide.json +1 -0
  91. package/dist/components/spinner/spinner.js +19 -24
  92. package/dist/components/stack/stack.css +1 -1
  93. package/dist/components/stack/stack.d.ts +1 -2
  94. package/dist/components/stack/stack.guide.json +1 -0
  95. package/dist/components/stack/stack.js +1 -4
  96. package/dist/components/static-noise/static-noise.d.ts +1 -2
  97. package/dist/components/static-noise/static-noise.guide.json +1 -0
  98. package/dist/components/static-noise/static-noise.js +1 -4
  99. package/dist/components/surface/surface.css +1 -1
  100. package/dist/components/surface/surface.d.ts +1 -2
  101. package/dist/components/surface/surface.guide.json +1 -0
  102. package/dist/components/surface/surface.js +1 -4
  103. package/dist/components/switch/switch.d.ts +0 -13
  104. package/dist/components/switch/switch.guide.json +1 -0
  105. package/dist/components/switch/switch.js +1 -4
  106. package/dist/components/tabs/tabs.guide.json +1 -0
  107. package/dist/components/text/text.d.ts +1 -2
  108. package/dist/components/text/text.guide.json +1 -0
  109. package/dist/components/text/text.js +1 -4
  110. package/dist/components/textarea/textarea.d.ts +9 -15
  111. package/dist/components/textarea/textarea.guide.json +8 -1
  112. package/dist/components/textarea/textarea.js +34 -38
  113. package/dist/components/textfield/textfield.d.ts +9 -2
  114. package/dist/components/textfield/textfield.guide.json +6 -0
  115. package/dist/components/textfield/textfield.js +38 -42
  116. package/dist/components/title/title.css +1 -1
  117. package/dist/components/title/title.d.ts +5 -6
  118. package/dist/components/title/title.guide.json +13 -12
  119. package/dist/components/title/title.js +3 -6
  120. package/dist/components/toast/toast-banner.js +1 -1
  121. package/dist/components/toast/toast.guide.json +1 -0
  122. package/dist/components/toggle-button/toggle-button.guide.json +1 -0
  123. package/dist/components/toggle-group/toggle-group.guide.json +1 -0
  124. package/dist/components/tooltip/tooltip-content.js +1 -1
  125. package/dist/components/tooltip/tooltip.guide.json +1 -0
  126. package/dist/components/typewriter/typewriter.d.ts +1 -2
  127. package/dist/components/typewriter/typewriter.guide.json +1 -0
  128. package/dist/components/typewriter/typewriter.js +1 -4
  129. package/dist/index.d.ts +0 -1
  130. package/dist/index.js +3 -1
  131. package/dist/preflight-surface.json +19 -20
  132. package/dist/preflight.css +1 -1
  133. package/package.json +4 -4
  134. package/dist/core/props/intrinsic-vira-props.d.ts +0 -30
  135. package/dist/core/props/intrinsic-vira-props.js +0 -14
@@ -1,5 +1,4 @@
1
1
  import './button.css';
2
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
3
2
  import { ButtonChromeChildren, getButtonChromeRootAttrs } from "./button-chrome.js";
4
3
  import { jsx } from "react/jsx-runtime";
5
4
  import { Button } from "@base-ui/react/button";
@@ -29,7 +28,7 @@ var ButtonRenderRoot = ({ isDisabled, ref, render, rootProps }) => {
29
28
  }
30
29
  });
31
30
  };
32
- var ButtonRoot = ({ children, className, intrinsicAttributes, isDisabled, isIconOnly, addon, addonPosition, loading, passThroughProps, pill, ref, render, size, variant }) => {
31
+ var ButtonRoot = ({ children, className, isDisabled, isIconOnly, addon, addonPosition, loading, passThroughProps, pill, ref, render, size, variant }) => {
33
32
  const chromeAttrs = getButtonChromeRootAttrs({
34
33
  addon,
35
34
  addonPosition,
@@ -42,7 +41,6 @@ var ButtonRoot = ({ children, className, intrinsicAttributes, isDisabled, isIcon
42
41
  });
43
42
  const rootProps = {
44
43
  ...passThroughProps,
45
- ...intrinsicAttributes,
46
44
  ...chromeAttrs,
47
45
  className: typeof className === "function" ? className : chromeAttrs.className,
48
46
  children
@@ -64,11 +62,9 @@ var ButtonRoot = ({ children, className, intrinsicAttributes, isDisabled, isIcon
64
62
  var Button$1 = ({ children, className, disabled, addon, addonPosition = "start", loading = false, pill = false, size = "medium", variant = "primary", ...otherProps }) => {
65
63
  const isDisabled = disabled || loading;
66
64
  const isIconOnly = Boolean(addon) && (children == null || children === "");
67
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
68
- const { render, ref, ...passThroughProps } = componentProps;
65
+ const { render, ref, ...passThroughProps } = otherProps;
69
66
  return /* @__PURE__ */ jsx(ButtonRoot, {
70
67
  className,
71
- intrinsicAttributes,
72
68
  isDisabled,
73
69
  isIconOnly,
74
70
  addon,
@@ -1 +1 @@
1
- @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-checkbox-size{syntax:"<length>";inherits:false;initial-value:0}@property --vui-checkbox-radius{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-checkbox-background{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-checkbox-border-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-checkbox-indicator-color{syntax:"<color>";inherits:true;initial-value:#0000}.viraui__checkbox-module__Checkbox_3oGip{&:has([required]) .viraui__checkbox-module__Label_n9HL7:after{content:" *";color:var(--highlight-red)}}.viraui__checkbox-module__CheckboxRoot_PeyF5{--vui-checkbox-size:var(--space-medium);--vui-checkbox-radius:var(--radius-x-small);--vui-checkbox-background:var(--global-contrast);--vui-checkbox-indicator-color:contrast-color(var(--global-primary));position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;appearance:none;border:0;box-shadow:inset 0 0 0 1px var(--vui-checkbox-border-color);inline-size:var(--vui-checkbox-size);block-size:var(--vui-checkbox-size);background:var(--vui-checkbox-background);border-radius:var(--vui-checkbox-radius);&[data-size=regular]{--vui-checkbox-size:var(--space-large);--vui-checkbox-radius:var(--radius-small)}&[data-checked]:not([data-disabled]):not([data-invalid]),&[data-indeterminate]:not([data-disabled]):not([data-invalid]){--vui-checkbox-background:var(--global-primary);--vui-checkbox-border-color:var(--global-primary);box-shadow:none}&[data-invalid]:not([data-disabled]),[data-invalid] &:not([data-disabled]){--vui-checkbox-border-color:var(--highlight-red);--vui-checkbox-indicator-color:var(--global-primary);box-shadow:inset 0 0 0 1px var(--highlight-red);outline-color:oklab(from var(--highlight-red) l a b/.5)}&[data-disabled],[data-disabled] &{--vui-checkbox-background:var(--global-disabled-background);--vui-checkbox-border-color:#0000;--vui-checkbox-indicator-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.viraui__checkbox-module__Indicator_C-k-l{display:inline-flex;align-items:center;justify-content:center;color:var(--vui-checkbox-indicator-color)}.viraui__checkbox-module__Icon_926Sa{stroke:currentColor}.viraui__checkbox-module__CheckboxRoot_PeyF5:not([data-indeterminate]) .viraui__checkbox-module__MinusIcon_Q57pY,.viraui__checkbox-module__CheckboxRoot_PeyF5[data-indeterminate] .viraui__checkbox-module__CheckIcon_XqUcs{display:none}.viraui__checkbox-module__CheckboxRoot_PeyF5[data-indeterminate] .viraui__checkbox-module__MinusIcon_Q57pY{display:inline-flex}}
1
+ @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-checkbox-size{syntax:"<length>";inherits:false;initial-value:0}@property --vui-checkbox-radius{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --vui-checkbox-background{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-checkbox-border-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-checkbox-indicator-color{syntax:"<color>";inherits:true;initial-value:#0000}.viraui__checkbox-module__Checkbox_3oGip{&:has([required]) .viraui__checkbox-module__Label_n9HL7:after{content:" *";color:var(--highlight-red)}}.viraui__checkbox-module__CheckboxRoot_PeyF5{--vui-checkbox-size:var(--space-medium);--vui-checkbox-radius:var(--radius-x-small);--vui-checkbox-background:var(--global-contrast);--vui-checkbox-indicator-color:contrast-color(var(--global-primary));position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;appearance:none;border:0;box-shadow:inset 0 0 0 1px var(--vui-checkbox-border-color);inline-size:var(--vui-checkbox-size);block-size:var(--vui-checkbox-size);background:var(--vui-checkbox-background);border-radius:var(--vui-checkbox-radius);&[data-size=regular]{--vui-checkbox-size:var(--space-large);--vui-checkbox-radius:var(--radius-small)}&[data-checked]:not([data-disabled]):not([data-invalid]){--vui-checkbox-background:var(--global-primary);--vui-checkbox-border-color:var(--global-primary);box-shadow:none}&[data-indeterminate]:not([data-disabled]):not([data-invalid]){--vui-checkbox-indicator-color:var(--global-primary)}&[data-invalid]:not([data-disabled]),[data-invalid] &:not([data-disabled]){--vui-checkbox-border-color:var(--highlight-red);--vui-checkbox-indicator-color:var(--global-primary);box-shadow:inset 0 0 0 1px var(--highlight-red);outline-color:oklab(from var(--highlight-red) l a b/.5)}&[data-disabled],[data-disabled] &{--vui-checkbox-background:var(--global-disabled-background);--vui-checkbox-border-color:#0000;--vui-checkbox-indicator-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.viraui__checkbox-module__Indicator_C-k-l{display:inline-flex;align-items:center;justify-content:center;color:var(--vui-checkbox-indicator-color)}.viraui__checkbox-module__Icon_926Sa{stroke:currentColor}.viraui__checkbox-module__CheckboxRoot_PeyF5:not([data-indeterminate]) .viraui__checkbox-module__MinusIcon_Q57pY,.viraui__checkbox-module__CheckboxRoot_PeyF5[data-indeterminate] .viraui__checkbox-module__CheckIcon_XqUcs{display:none}.viraui__checkbox-module__CheckboxRoot_PeyF5[data-indeterminate] .viraui__checkbox-module__MinusIcon_Q57pY{display:inline-flex}}
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "Checkbox",
3
+ "structure": "<Checkbox label=\"…\" />",
3
4
  "summary": "Field.Item checkbox option for standalone fields or CheckboxGroup children.",
4
5
  "whenToUse": [
5
6
  "Single boolean fields wrapped in Field.Root with optional label and helper text — no Fieldset required",
@@ -1,5 +1,4 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
2
  import { ThemeTypes } from '@viraui/foundation/vira/types';
4
3
  import { ReactNode } from 'react';
5
4
  import * as React from 'react';
@@ -11,7 +10,7 @@ import * as React from 'react';
11
10
  *
12
11
  * @default Base UI pass-through props keep upstream defaults.
13
12
  */
14
- export type ChipProps = React.ComponentPropsWithRef<'div'> & IntrinsicViraProps & {
13
+ export type ChipProps = React.ComponentPropsWithRef<'div'> & {
15
14
  /**
16
15
  * Replaces the default `div` root using Base UI render semantics.
17
16
  *
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "Chip",
3
+ "structure": "<Chip>Label</Chip>",
3
4
  "summary": "Compact visual label primitive for short status, category, or metadata treatments.",
4
5
  "whenToUse": [
5
6
  "Short, non-interactive labels that need a compact pill treatment",
@@ -1,6 +1,5 @@
1
1
  import './chip.css';
2
2
  import { clsx } from "../../core/clsx.js";
3
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
3
  import { Stack } from "../stack/stack.js";
5
4
  import chip_module_default from "./chip.module.js";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -8,7 +7,6 @@ import { useRender } from "@base-ui/react/use-render";
8
7
  import "react";
9
8
  //#region src/components/chip/chip.tsx
10
9
  var Chip = ({ addon, addonPosition = "start", children, className, ref, render, variant = "primary", ...otherProps }) => {
11
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
12
10
  const content = /* @__PURE__ */ jsxs(Stack, {
13
11
  inline: true,
14
12
  direction: addonPosition === "start" ? "row" : "row-reverse",
@@ -31,10 +29,9 @@ var Chip = ({ addon, addonPosition = "start", children, className, ref, render,
31
29
  render,
32
30
  ref,
33
31
  props: {
34
- ...componentProps,
35
- ...intrinsicAttributes,
36
- "data-grow": false,
37
- "data-shrink": false,
32
+ ...otherProps,
33
+ "data-grow": "false",
34
+ "data-shrink": "false",
38
35
  children: content,
39
36
  className: clsx(chip_module_default.Chip, className),
40
37
  "data-has-icon": addon ? "true" : void 0,
@@ -1,5 +1,4 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
2
  import type * as React from 'react';
4
3
  /**
5
4
  * Public ClampText props.
@@ -9,7 +8,7 @@ import type * as React from 'react';
9
8
  *
10
9
  * @default Native span pass-through props keep React defaults.
11
10
  */
12
- export type ClampTextProps = React.ComponentPropsWithoutRef<'span'> & IntrinsicViraProps & {
11
+ export type ClampTextProps = React.ComponentPropsWithoutRef<'span'> & {
13
12
  /**
14
13
  * Replaces the default `span` root using Base UI render semantics.
15
14
  *
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "ClampText",
3
+ "structure": "<ClampText>…</ClampText>",
3
4
  "summary": "Presentational utility that truncates overflowing copy to a fixed line count.",
4
5
  "whenToUse": [
5
6
  "Single- or multi-line ellipsis in constrained layouts",
@@ -1,21 +1,18 @@
1
1
  "use client";
2
2
  import './clamp-text.css';
3
3
  import { clsx } from "../../core/clsx.js";
4
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
5
4
  import clamp_text_module_default from "./clamp-text.module.js";
6
5
  import { useRender } from "@base-ui/react/use-render";
7
6
  import { useMemo } from "react";
8
7
  //#region src/components/clamp-text/clamp-text.tsx
9
8
  var ClampText = ({ className, inline = false, ref, render, rows = 1, style, ...otherProps }) => {
10
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
11
9
  const dynamicStyle = useMemo(() => ({ "--vui-clamp-text-rows": rows }), [rows]);
12
10
  return useRender({
13
11
  defaultTagName: "span",
14
12
  render,
15
13
  ref,
16
14
  props: {
17
- ...componentProps,
18
- ...intrinsicAttributes,
15
+ ...otherProps,
19
16
  "data-clamp-text-inline": inline ? "true" : "false",
20
17
  className: clsx(clamp_text_module_default.ClampText, className),
21
18
  style: {
@@ -24,7 +24,7 @@ var DialogSheet = ({ children, description, title, showCloseButton = false, fitC
24
24
  border: "top",
25
25
  render: /* @__PURE__ */ jsx(Stack, { hAlign: "center" }),
26
26
  color: 1,
27
- vibrant: true,
27
+ "data-vibrant": "",
28
28
  radius: "large",
29
29
  vPadding: ["medium", 0]
30
30
  }),
@@ -49,7 +49,7 @@ var DialogSheet = ({ children, description, title, showCloseButton = false, fitC
49
49
  hPadding: "medium",
50
50
  fillChildren: false,
51
51
  children: [/* @__PURE__ */ jsx(Drawer.Title, {
52
- render: /* @__PURE__ */ jsx(Title, { level: "h4" }),
52
+ render: /* @__PURE__ */ jsx(Title, { size: "4" }),
53
53
  children: title
54
54
  }), description && /* @__PURE__ */ jsx(Drawer.Description, {
55
55
  render: /* @__PURE__ */ jsx(Text, {
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "Dialog",
3
+ "structure": "<Dialog>\n <Dialog.Trigger />\n <Dialog.Sheet title=\"…\">…</Dialog.Sheet>\n</Dialog>",
3
4
  "summary": "Compound drawer sheet with `Dialog.Trigger`, `Dialog.Sheet`, `Dialog.Close`, and Base UI pass-through `Dialog.Provider`, `Dialog.Indent`, and `Dialog.IndentBackground` for app-shell indent effects.",
4
5
  "whenToUse": [
5
6
  "Focused tasks or confirmations that interrupt the current page without navigation",
@@ -1,5 +1,4 @@
1
1
  import { ElevationDirection, ElevationLevel, ElevationShadowColor } from '../../core/elevation/elevation-types';
2
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
2
  import type * as React from 'react';
4
3
  export type { ElevationDirection, ElevationLevel, ElevationShadowColor, } from '../../core/elevation/elevation-types';
5
4
  export { ELEVATION_DEFAULTS } from '../../core/elevation/elevation-types';
@@ -11,7 +10,7 @@ export { getElevationProps } from '../../core/elevation/get-elevation-props';
11
10
  *
12
11
  * @default Native child pass-through props are preserved and merged with elevation hooks.
13
12
  */
14
- export type ElevatorProps = IntrinsicViraProps & {
13
+ export type ElevatorProps = {
15
14
  /**
16
15
  * Element or elements that receive elevation hooks on their rendered root.
17
16
  *
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "Elevator",
3
+ "structure": "<Elevator resting={1}>…</Elevator>",
3
4
  "summary": "No-DOM elevation utility that merges shadow hooks onto valid element children.",
4
5
  "whenToUse": [
5
6
  "Apply resting and optional hover elevation to existing elements",
@@ -1,4 +1,3 @@
1
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
2
1
  import { ELEVATION_DEFAULTS } from "../../core/elevation/elevation-types.js";
3
2
  import { getElevationProps } from "../../core/elevation/get-elevation-props.js";
4
3
  import { Children, cloneElement, isValidElement } from "react";
@@ -7,8 +6,7 @@ var mergeChildStyle = (childStyle, elevationStyle) => ({
7
6
  ...childStyle ?? {},
8
7
  ...elevationStyle
9
8
  });
10
- var Elevator = ({ children, resting, hover, direction, shadowColor, extraShadow, ...otherProps }) => {
11
- const { intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
9
+ var Elevator = ({ children, resting, hover, direction, shadowColor, extraShadow }) => {
12
10
  const elevation = getElevationProps({
13
11
  resting,
14
12
  hover,
@@ -19,7 +17,6 @@ var Elevator = ({ children, resting, hover, direction, shadowColor, extraShadow,
19
17
  return Children.map(children, (child) => {
20
18
  if (!isValidElement(child)) return child;
21
19
  return cloneElement(child, {
22
- ...intrinsicAttributes,
23
20
  ...elevation.attributes,
24
21
  style: mergeChildStyle(child.props.style, elevation.style)
25
22
  });
@@ -1,5 +1,4 @@
1
1
  import { FieldsetRoot } from '@base-ui/react';
2
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
2
  import type * as React from 'react';
4
3
  /**
5
4
  * Public Fieldset props.
@@ -10,7 +9,7 @@ import type * as React from 'react';
10
9
  *
11
10
  * @default Base UI pass-through props keep upstream defaults.
12
11
  */
13
- export type FieldsetProps = FieldsetRoot.Props & IntrinsicViraProps & {
12
+ export type FieldsetProps = FieldsetRoot.Props & {
14
13
  /**
15
14
  * Visible legend copy rendered with shared internal `FieldLabel`.
16
15
  *
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "Fieldset",
3
+ "structure": "<Fieldset label=\"…\">…</Fieldset>",
3
4
  "summary": "Semantic field grouping with shared legend and optional group helper copy.",
4
5
  "whenToUse": [
5
6
  "Section legends for multiple related fields — billing details with Textfield, Textarea, or Select children",
@@ -1,29 +1,24 @@
1
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
2
1
  import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
3
2
  import { FieldLabel } from "../basic-input/field-label.js";
4
3
  import { Stack } from "../stack/stack.js";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
6
5
  import { Fieldset } from "@base-ui/react";
7
6
  //#region src/components/fieldset/fieldset.tsx
8
- var Fieldset$1 = ({ children, className, description, disabled, error, label, ...fieldsetRootProps }) => {
9
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(fieldsetRootProps);
10
- return /* @__PURE__ */ jsxs(Fieldset.Root, {
11
- ...intrinsicAttributes,
12
- ...componentProps,
13
- className,
14
- disabled,
15
- children: [/* @__PURE__ */ jsxs(Stack, {
16
- vPadding: [0, "small"],
17
- rowGap: "small",
18
- children: [label ? /* @__PURE__ */ jsx(Fieldset.Legend, {
19
- render: /* @__PURE__ */ jsx(FieldLabel, {}),
20
- children: label
21
- }) : null, description || error ? /* @__PURE__ */ jsx(FieldHelperCopy, {
22
- description,
23
- error
24
- }) : null]
25
- }), children]
26
- });
27
- };
7
+ var Fieldset$1 = ({ children, className, description, disabled, error, label, ...fieldsetRootProps }) => /* @__PURE__ */ jsxs(Fieldset.Root, {
8
+ ...fieldsetRootProps,
9
+ className,
10
+ disabled,
11
+ children: [/* @__PURE__ */ jsxs(Stack, {
12
+ vPadding: [0, "small"],
13
+ rowGap: "small",
14
+ children: [label ? /* @__PURE__ */ jsx(Fieldset.Legend, {
15
+ render: /* @__PURE__ */ jsx(FieldLabel, {}),
16
+ children: label
17
+ }) : null, description || error ? /* @__PURE__ */ jsx(FieldHelperCopy, {
18
+ description,
19
+ error
20
+ }) : null]
21
+ }), children]
22
+ });
28
23
  //#endregion
29
24
  export { Fieldset$1 as Fieldset };
@@ -0,0 +1 @@
1
+ @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-fit-text-captured-length{syntax:"<length>";inherits:true;initial-value:0}@property --vui-fit-text-max-font-size{syntax:"<length>";inherits:true;initial-value:calc(infinity * 1px)}.viraui__fit-text-module__FitText_CdAvq{--vui-fit-text-captured-length:initial;display:flex;container-type:inline-size;.viraui__fit-text-module__Container_bawpR{--vui-fit-text-captured-length:100cqi;--vui-fit-text-available-space:var(--vui-fit-text-captured-length);flex-grow:1;container-type:inline-size}.viraui__fit-text-module__Display_Hraif{--vui-fit-text-captured-length:100cqi;--vui-fit-text-ratio:tan(atan2(var(--vui-fit-text-available-space),var(--vui-fit-text-available-space) - var(--vui-fit-text-captured-length)));display:block;inline-size:var(--vui-fit-text-available-space);font-size:clamp(0px,1em * var(--vui-fit-text-ratio),var(--vui-fit-text-max-font-size));>*{font-size:1em;max-inline-size:none}}.viraui__fit-text-module__Reference_6wCx7{visibility:hidden;>*{font-size:inherit;max-inline-size:none}}}}
@@ -0,0 +1,18 @@
1
+ import type * as React from 'react';
2
+ /**
3
+ * Public FitText props.
4
+ *
5
+ * Includes standard `div` attributes such as `children`, `id`, `className`, and event handlers,
6
+ * plus an optional fitted font-size cap.
7
+ *
8
+ * @default Native div pass-through props keep React defaults.
9
+ */
10
+ export type FitTextProps = React.ComponentPropsWithRef<'div'> & {
11
+ /**
12
+ * Caps the fitted font size using any valid CSS length string.
13
+ *
14
+ * @default No maximum — fitted size may grow without an upper bound.
15
+ */
16
+ maxFontSize?: string;
17
+ };
18
+ export declare const FitText: React.FC<FitTextProps>;
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "FitText",
3
+ "structure": "<FitText>…</FitText>",
4
+ "summary": "CSS-only fit-to-width wrapper that scales children to fill available inline space.",
5
+ "whenToUse": [
6
+ "Headlines or short copy that should fill a constrained inline width",
7
+ "Multi-line display type broken with br (or equivalent) inside Title, Text, or native markup",
8
+ "Resize-friendly marketing/hero type without JS measurement"
9
+ ],
10
+ "whenNotToUse": [
11
+ "Long body copy that should wrap and reflow at a fixed type size",
12
+ "Truncation — use ClampText instead",
13
+ "Cases that need a JS-measured or observer-driven fit"
14
+ ],
15
+ "accessibility": [
16
+ "Children render twice; the reference copy is aria-hidden and inert so assistive tech sees one tree",
17
+ "Keep semantic roots on the visible children (Title render, heading elements, paragraphs)",
18
+ "Fitted size still respects user zoom because the ratio multiplies 1em"
19
+ ],
20
+ "antiPatterns": [
21
+ "Expecting automatic line breaks without br or block structure in children",
22
+ "Putting interactive controls inside FitText (duplicate trees and inert reference)",
23
+ "Using FitText for truncation or ellipsis"
24
+ ],
25
+ "related": ["Title", "Text", "ClampText"],
26
+ "properties": {
27
+ "react": {
28
+ "maxFontSize": {
29
+ "description": "Caps the fitted font size using any valid CSS length string.",
30
+ "refCss": "max-font-size"
31
+ }
32
+ },
33
+ "css": {
34
+ "max-font-size": {
35
+ "description": "Upper bound for the fitted font size on the display slot.",
36
+ "refReact": "maxFontSize"
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,31 @@
1
+ import './fit-text.css';
2
+ import { clsx } from "../../core/clsx.js";
3
+ import fit_text_module_default from "./fit-text.module.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/components/fit-text/fit-text.tsx
6
+ var FitText = ({ children, className, maxFontSize, ref, style, ...otherProps }) => {
7
+ const dynamicStyle = {
8
+ ...maxFontSize && { "--vui-fit-text-max-font-size": maxFontSize },
9
+ ...style
10
+ };
11
+ return /* @__PURE__ */ jsxs("div", {
12
+ ...otherProps,
13
+ ref,
14
+ className: clsx(fit_text_module_default.FitText, className),
15
+ style: dynamicStyle,
16
+ children: [/* @__PURE__ */ jsx("div", {
17
+ className: fit_text_module_default.Container,
18
+ children: /* @__PURE__ */ jsx("div", {
19
+ className: fit_text_module_default.Display,
20
+ children
21
+ })
22
+ }), /* @__PURE__ */ jsx("div", {
23
+ "aria-hidden": "true",
24
+ className: fit_text_module_default.Reference,
25
+ inert: true,
26
+ children
27
+ })]
28
+ });
29
+ };
30
+ //#endregion
31
+ export { FitText };
@@ -0,0 +1,13 @@
1
+ //#region src/components/fit-text/fit-text.module.css
2
+ var FitText = "viraui__fit-text-module__FitText_CdAvq";
3
+ var Container = "viraui__fit-text-module__Container_bawpR";
4
+ var Display = "viraui__fit-text-module__Display_Hraif";
5
+ var Reference = "viraui__fit-text-module__Reference_6wCx7";
6
+ var fit_text_module_default = {
7
+ FitText,
8
+ Container,
9
+ Display,
10
+ Reference
11
+ };
12
+ //#endregion
13
+ export { Container, Display, FitText, Reference, fit_text_module_default as default };
@@ -0,0 +1,2 @@
1
+ export { FitText } from './fit-text';
2
+ export type { FitTextProps } from './fit-text';
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "IconButtonLink",
3
+ "structure": "<IconButtonLink href=\"#\" icon={<Plus />} aria-label=\"Add\" />",
3
4
  "summary": "Icon-only navigation link that requires an accessible name; wraps ButtonLink.",
4
5
  "whenToUse": [
5
6
  "Compact toolbar or chrome navigation identified only by icon",
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "IconButton",
3
+ "structure": "<IconButton icon={<Plus />} aria-label=\"Add\" />",
3
4
  "summary": "Icon-only button that requires an accessible name through aria-label or aria-labelledby.",
4
5
  "whenToUse": [
5
6
  "Compact toolbar or chrome actions identified only by icon",
@@ -1,4 +1,5 @@
1
1
  export * from './accordion';
2
+ export * from './annotate';
2
3
  export * from './avatar';
3
4
  export * from './avatar-group';
4
5
  export * from './bleed';
@@ -9,6 +10,7 @@ export * from './clamp-text';
9
10
  export * from './dialog';
10
11
  export * from './elevator';
11
12
  export * from './fieldset';
13
+ export * from './fit-text';
12
14
  export * from './icon-button';
13
15
  export * from './linear-progress';
14
16
  export * from './masonry';
@@ -1,5 +1,4 @@
1
1
  import { ProgressRoot } from '@base-ui/react/progress';
2
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
2
  import type * as React from 'react';
4
3
  /**
5
4
  * Public LinearProgress props.
@@ -10,18 +9,6 @@ import type * as React from 'react';
10
9
  * @default Base UI pass-through props keep upstream defaults.
11
10
  */
12
11
  export type LinearProgressProps = ProgressRoot.Props & {
13
- /**
14
- * Adds `data-grow="false"` to the progress root when false.
15
- *
16
- * @default The progress root does not render a grow attribute.
17
- */
18
- grow?: IntrinsicViraProps['grow'];
19
- /**
20
- * Adds `data-shrink="false"` to the progress root when false.
21
- *
22
- * @default The progress root does not render a shrink attribute.
23
- */
24
- shrink?: IntrinsicViraProps['shrink'];
25
12
  /**
26
13
  * Visible label rendered through `Progress.Label` with shared internal `FieldLabel`.
27
14
  *
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "LinearProgress",
3
+ "structure": "<LinearProgress value={40} />",
3
4
  "summary": "Shows determinate or indeterminate progress for a task in a compact horizontal track.",
4
5
  "whenToUse": [
5
6
  "Use for task completion with a known percentage or bounded numeric value.",
@@ -1,6 +1,5 @@
1
1
  import './linear-progress.css';
2
2
  import { clsx } from "../../core/clsx.js";
3
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
3
  import { Text } from "../text/text.js";
5
4
  import { FieldLabel } from "../basic-input/field-label.js";
6
5
  import { Stack } from "../stack/stack.js";
@@ -8,53 +7,49 @@ import linear_progress_module_default from "./linear-progress.module.js";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";
9
8
  import { Progress } from "@base-ui/react/progress";
10
9
  //#region src/components/linear-progress/linear-progress.tsx
11
- var LinearProgress = ({ className, description, label, showValue = false, value, ref, ...progressRootProps }) => {
12
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(progressRootProps);
13
- return /* @__PURE__ */ jsxs(Progress.Root, {
14
- ...componentProps,
15
- ...intrinsicAttributes,
16
- ref,
17
- className: clsx(linear_progress_module_default.LinearProgress, className),
18
- value,
19
- render: /* @__PURE__ */ jsx(Stack, {
20
- direction: "column",
10
+ var LinearProgress = ({ className, description, label, showValue = false, value, ref, ...progressRootProps }) => /* @__PURE__ */ jsxs(Progress.Root, {
11
+ ...progressRootProps,
12
+ ref,
13
+ className: clsx(linear_progress_module_default.LinearProgress, className),
14
+ value,
15
+ render: /* @__PURE__ */ jsx(Stack, {
16
+ direction: "column",
17
+ fillChildren: false,
18
+ rowGap: "small",
19
+ columnGap: "x-small"
20
+ }),
21
+ children: [
22
+ (label || showValue) && /* @__PURE__ */ jsxs(Stack, {
23
+ direction: "row",
21
24
  fillChildren: false,
22
- rowGap: "small",
23
- columnGap: "x-small"
24
- }),
25
- children: [
26
- (label || showValue) && /* @__PURE__ */ jsxs(Stack, {
27
- direction: "row",
28
- fillChildren: false,
29
- columnGap: "small",
30
- vAlign: "center",
31
- hAlign: "space-between",
32
- children: [label && /* @__PURE__ */ jsx(Progress.Label, {
33
- render: /* @__PURE__ */ jsx(FieldLabel, {}),
34
- children: label
35
- }), showValue && /* @__PURE__ */ jsx(Text, {
36
- size: "small",
37
- tone: "muted",
38
- family: "mono",
39
- whiteSpace: "nowrap",
40
- selection: false,
41
- align: "end",
42
- shrink: false,
43
- render: /* @__PURE__ */ jsx(Progress.Value, { render: /* @__PURE__ */ jsx("output", {}) })
44
- })]
45
- }),
46
- /* @__PURE__ */ jsx(Progress.Track, {
47
- className: linear_progress_module_default.Track,
48
- children: /* @__PURE__ */ jsx(Progress.Indicator, { className: linear_progress_module_default.Indicator })
49
- }),
50
- description && /* @__PURE__ */ jsx(Text, {
51
- className: linear_progress_module_default.Description,
25
+ columnGap: "small",
26
+ vAlign: "center",
27
+ hAlign: "space-between",
28
+ children: [label && /* @__PURE__ */ jsx(Progress.Label, {
29
+ render: /* @__PURE__ */ jsx(FieldLabel, {}),
30
+ children: label
31
+ }), showValue && /* @__PURE__ */ jsx(Text, {
52
32
  size: "small",
53
33
  tone: "muted",
54
- children: description
55
- })
56
- ]
57
- });
58
- };
34
+ family: "mono",
35
+ whiteSpace: "nowrap",
36
+ selection: false,
37
+ align: "end",
38
+ "data-shrink": "false",
39
+ render: /* @__PURE__ */ jsx(Progress.Value, { render: /* @__PURE__ */ jsx("output", {}) })
40
+ })]
41
+ }),
42
+ /* @__PURE__ */ jsx(Progress.Track, {
43
+ className: linear_progress_module_default.Track,
44
+ children: /* @__PURE__ */ jsx(Progress.Indicator, { className: linear_progress_module_default.Indicator })
45
+ }),
46
+ description && /* @__PURE__ */ jsx(Text, {
47
+ className: linear_progress_module_default.Description,
48
+ size: "small",
49
+ tone: "muted",
50
+ children: description
51
+ })
52
+ ]
53
+ });
59
54
  //#endregion
60
55
  export { LinearProgress };
@@ -1,2 +1,2 @@
1
1
  export { Masonry } from './masonry';
2
- export type { MasonryItemProps, MasonryProps } from './masonry';
2
+ export type { MasonryBreakpointCols, MasonryItemProps, MasonryProps } from './masonry';
@@ -1,5 +1,4 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
2
  import type * as React from 'react';
4
3
  /**
5
4
  * Public Masonry.Item props.
@@ -9,7 +8,7 @@ import type * as React from 'react';
9
8
  *
10
9
  * @default Native div pass-through props keep React defaults.
11
10
  */
12
- export type MasonryItemProps = React.ComponentPropsWithRef<'div'> & IntrinsicViraProps & {
11
+ export type MasonryItemProps = React.ComponentPropsWithRef<'div'> & {
13
12
  /**
14
13
  * Replaces the default `div` root using Base UI render semantics.
15
14
  *
@@ -1,21 +1,16 @@
1
1
  import { clsx } from "../../core/clsx.js";
2
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
3
2
  import masonry_module_default from "./masonry.module.js";
4
3
  import { useRender } from "@base-ui/react/use-render";
5
4
  //#region src/components/masonry/masonry-item.tsx
6
- var MasonryItem = ({ className, ref, render, style, ...otherProps }) => {
7
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
8
- return useRender({
9
- defaultTagName: "div",
10
- render,
11
- ref,
12
- props: {
13
- ...componentProps,
14
- ...intrinsicAttributes,
15
- className: clsx(masonry_module_default.Item, className),
16
- style: { ...style }
17
- }
18
- });
19
- };
5
+ var MasonryItem = ({ className, ref, render, style, ...otherProps }) => useRender({
6
+ defaultTagName: "div",
7
+ render,
8
+ ref,
9
+ props: {
10
+ ...otherProps,
11
+ className: clsx(masonry_module_default.Item, className),
12
+ style: { ...style }
13
+ }
14
+ });
20
15
  //#endregion
21
16
  export { MasonryItem };