@viraui/react 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/catalog.json +13 -1
  2. package/dist/components/annotate/annotate.css +1 -0
  3. package/dist/components/annotate/annotate.d.ts +88 -0
  4. package/dist/components/annotate/annotate.guide.json +103 -0
  5. package/dist/components/annotate/annotate.js +31 -0
  6. package/dist/components/annotate/annotate.module.js +5 -0
  7. package/dist/components/annotate/index.d.ts +2 -0
  8. package/dist/components/avatar/avatar.d.ts +1 -2
  9. package/dist/components/avatar/avatar.js +3 -6
  10. package/dist/components/avatar-group/avatar-group.d.ts +1 -2
  11. package/dist/components/avatar-group/avatar-group.js +1 -4
  12. package/dist/components/basic-input/basic-input.css +1 -1
  13. package/dist/components/basic-input/basic-input.d.ts +7 -0
  14. package/dist/components/basic-input/basic-input.js +4 -1
  15. package/dist/components/basic-input/input-control-group.js +2 -2
  16. package/dist/components/bleed/bleed.d.ts +1 -2
  17. package/dist/components/bleed/bleed.js +1 -4
  18. package/dist/components/button/button-link.d.ts +1 -2
  19. package/dist/components/button/button-link.js +1 -4
  20. package/dist/components/button/button.d.ts +1 -2
  21. package/dist/components/button/button.js +2 -6
  22. package/dist/components/checkbox/checkbox.css +1 -1
  23. package/dist/components/chip/chip.d.ts +1 -2
  24. package/dist/components/chip/chip.js +3 -6
  25. package/dist/components/clamp-text/clamp-text.d.ts +1 -2
  26. package/dist/components/clamp-text/clamp-text.js +1 -4
  27. package/dist/components/dialog/dialog-sheet.js +1 -1
  28. package/dist/components/dialog/dialog.css +1 -1
  29. package/dist/components/elevator/elevator.d.ts +1 -2
  30. package/dist/components/elevator/elevator.js +1 -4
  31. package/dist/components/fieldset/fieldset.d.ts +1 -2
  32. package/dist/components/fieldset/fieldset.js +16 -21
  33. package/dist/components/fit-text/fit-text.css +1 -0
  34. package/dist/components/fit-text/fit-text.d.ts +18 -0
  35. package/dist/components/fit-text/fit-text.guide.json +39 -0
  36. package/dist/components/fit-text/fit-text.js +31 -0
  37. package/dist/components/fit-text/fit-text.module.js +13 -0
  38. package/dist/components/fit-text/index.d.ts +2 -0
  39. package/dist/components/index.d.ts +2 -0
  40. package/dist/components/linear-progress/linear-progress.d.ts +0 -13
  41. package/dist/components/linear-progress/linear-progress.js +41 -46
  42. package/dist/components/masonry/index.d.ts +1 -1
  43. package/dist/components/masonry/masonry-item.d.ts +1 -2
  44. package/dist/components/masonry/masonry-item.js +10 -15
  45. package/dist/components/masonry/masonry.d.ts +10 -11
  46. package/dist/components/masonry/masonry.guide.json +1 -1
  47. package/dist/components/masonry/masonry.js +9 -18
  48. package/dist/components/meter/meter.d.ts +0 -13
  49. package/dist/components/meter/meter.js +40 -45
  50. package/dist/components/popover/popover-sheet.js +1 -1
  51. package/dist/components/progressive-blur/progressive-blur.d.ts +1 -2
  52. package/dist/components/progressive-blur/progressive-blur.js +1 -4
  53. package/dist/components/progressive-blur/progressive-blur.utils.js +4 -7
  54. package/dist/components/select/select-indicator-slot.js +3 -3
  55. package/dist/components/select/select-option.js +2 -2
  56. package/dist/components/select/select.d.ts +1 -2
  57. package/dist/components/select/select.js +3 -6
  58. package/dist/components/separator/separator.d.ts +1 -2
  59. package/dist/components/separator/separator.js +1 -4
  60. package/dist/components/shimmer/shimmer.d.ts +1 -2
  61. package/dist/components/shimmer/shimmer.js +1 -4
  62. package/dist/components/skeleton/skeleton.d.ts +1 -2
  63. package/dist/components/skeleton/skeleton.js +1 -4
  64. package/dist/components/slider/slider.d.ts +0 -13
  65. package/dist/components/slider/slider.js +1 -4
  66. package/dist/components/spinner/spinner.d.ts +1 -2
  67. package/dist/components/spinner/spinner.js +19 -24
  68. package/dist/components/stack/stack.d.ts +1 -2
  69. package/dist/components/stack/stack.js +1 -4
  70. package/dist/components/static-noise/static-noise.d.ts +1 -2
  71. package/dist/components/static-noise/static-noise.js +1 -4
  72. package/dist/components/surface/surface.d.ts +1 -2
  73. package/dist/components/surface/surface.js +1 -4
  74. package/dist/components/switch/switch.d.ts +0 -13
  75. package/dist/components/switch/switch.js +1 -4
  76. package/dist/components/text/text.d.ts +1 -2
  77. package/dist/components/text/text.js +1 -4
  78. package/dist/components/textarea/textarea.d.ts +9 -15
  79. package/dist/components/textarea/textarea.guide.json +7 -1
  80. package/dist/components/textarea/textarea.js +34 -38
  81. package/dist/components/textfield/textfield.d.ts +9 -2
  82. package/dist/components/textfield/textfield.guide.json +5 -0
  83. package/dist/components/textfield/textfield.js +38 -42
  84. package/dist/components/title/title.d.ts +1 -2
  85. package/dist/components/title/title.js +1 -4
  86. package/dist/components/toast/toast-banner.js +1 -1
  87. package/dist/components/tooltip/tooltip-content.js +1 -1
  88. package/dist/components/typewriter/typewriter.d.ts +1 -2
  89. package/dist/components/typewriter/typewriter.js +1 -4
  90. package/dist/index.d.ts +0 -1
  91. package/dist/index.js +3 -1
  92. package/dist/preflight-surface.json +19 -20
  93. package/dist/preflight.css +1 -1
  94. package/package.json +2 -2
  95. package/dist/core/props/intrinsic-vira-props.d.ts +0 -30
  96. package/dist/core/props/intrinsic-vira-props.js +0 -14
@@ -1,7 +1,6 @@
1
1
  import { FieldRoot } from '@base-ui/react/field';
2
2
  import { SwitchRoot } from '@base-ui/react/switch';
3
3
  import { StackProps } from '..';
4
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
4
  import type * as React from 'react';
6
5
  /**
7
6
  * Public Switch props.
@@ -13,18 +12,6 @@ import type * as React from 'react';
13
12
  * @default Base UI pass-through props keep upstream defaults.
14
13
  */
15
14
  export type SwitchProps = SwitchRoot.Props & Omit<FieldRoot.Props, 'ref'> & {
16
- /**
17
- * Adds `data-grow="false"` to the field root when false.
18
- *
19
- * @default The field root does not render a grow attribute.
20
- */
21
- grow?: IntrinsicViraProps['grow'];
22
- /**
23
- * Adds `data-shrink="false"` to the field root when false.
24
- *
25
- * @default The field root does not render a shrink attribute.
26
- */
27
- shrink?: IntrinsicViraProps['shrink'];
28
15
  /**
29
16
  * Visible label rendered with shared internal `FieldLabel`.
30
17
  *
@@ -1,6 +1,5 @@
1
1
  import './switch.css';
2
2
  import { clsx } from "../../core/clsx.js";
3
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
3
  import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
5
4
  import { FieldLabel } from "../basic-input/field-label.js";
6
5
  import { Stack } from "../stack/stack.js";
@@ -11,9 +10,7 @@ import { Switch } from "@base-ui/react/switch";
11
10
  //#region src/components/switch/switch.tsx
12
11
  var Switch$1 = ({ className, description, dirty, disabled, error, invalid, label, name, ref, size = "small", vPadding, hPadding, touched, validate, validationDebounceTime, validationMode, ...switchRootProps }) => {
13
12
  const hasTextDescription = Boolean(description || error);
14
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(switchRootProps);
15
13
  return /* @__PURE__ */ jsx(Field.Root, {
16
- ...intrinsicAttributes,
17
14
  className: switch_module_default.Switch,
18
15
  dirty,
19
16
  disabled,
@@ -39,7 +36,7 @@ var Switch$1 = ({ className, description, dirty, disabled, error, invalid, label
39
36
  hPadding,
40
37
  vPadding,
41
38
  children: [/* @__PURE__ */ jsx(Switch.Root, {
42
- ...componentProps,
39
+ ...switchRootProps,
43
40
  className: clsx(switch_module_default.SwitchRoot, className),
44
41
  "data-shrink": "false",
45
42
  "data-size": size,
@@ -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 type * as React from 'react';
5
4
  type TextSpace = ThemeTypes['space'];
@@ -12,7 +11,7 @@ type TextAxisPadding = TextSpace | [TextSpace | 0, TextSpace | 0];
12
11
  *
13
12
  * @default Base HTML pass-through props keep upstream defaults.
14
13
  */
15
- export type TextProps = React.ComponentPropsWithoutRef<'span'> & IntrinsicViraProps & {
14
+ export type TextProps = React.ComponentPropsWithoutRef<'span'> & {
16
15
  /**
17
16
  * Replaces the default `span` root using Base UI render semantics.
18
17
  *
@@ -1,13 +1,11 @@
1
1
  import './text.css';
2
2
  import { clsx } from "../../core/clsx.js";
3
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
3
  import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
5
4
  import text_module_default from "./text.module.js";
6
5
  import { useRender } from "@base-ui/react/use-render";
7
6
  //#region src/components/text/text.tsx
8
7
  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 }) => {
9
8
  const hasPadding = Boolean(hPadding || vPadding);
10
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
11
9
  const dynamicStyle = {
12
10
  "--vui-text-align": align,
13
11
  "--vui-text-max-width": maxWidth ?? "none",
@@ -27,8 +25,7 @@ var Text = ({ align = "start", balanced = false, selection = true, className, co
27
25
  render,
28
26
  ref,
29
27
  props: {
30
- ...componentProps,
31
- ...intrinsicAttributes,
28
+ ...otherProps,
32
29
  "data-text-size": size,
33
30
  "data-text-family": family,
34
31
  "data-text-weight": typeof weight === "string" ? weight : "custom",
@@ -1,5 +1,5 @@
1
1
  import { FieldRoot } from '@base-ui/react/field';
2
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
2
+ import { BasicInputProps } from '../basic-input';
3
3
  import type * as React from 'react';
4
4
  /**
5
5
  * Public Textarea props.
@@ -10,20 +10,7 @@ import type * as React from 'react';
10
10
  *
11
11
  * @default Base UI `Field.Root` pass-through props keep upstream defaults.
12
12
  */
13
- export type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & Omit<FieldRoot.Props, 'ref'> & {
14
- /**
15
- * Adds `data-grow="false"` to the field root when false.
16
- *
17
- * @default The field root does not render a grow attribute.
18
- */
19
- grow?: IntrinsicViraProps['grow'];
20
- /**
21
- * Adds `data-shrink="false"` to the field root when false.
22
- *
23
- * @default The field root does not render a shrink attribute.
24
- */
25
- shrink?: IntrinsicViraProps['shrink'];
26
- ref?: React.Ref<HTMLTextAreaElement>;
13
+ export type TextareaProps = React.ComponentPropsWithRef<'textarea'> & Omit<FieldRoot.Props, 'ref'> & {
27
14
  /**
28
15
  * Visible label rendered with shared internal `FieldLabel`.
29
16
  *
@@ -51,5 +38,12 @@ export type TextareaProps = React.ComponentPropsWithoutRef<'textarea'> & Omit<Fi
51
38
  * @default undefined (no resize)
52
39
  */
53
40
  resize?: 'vertical' | 'both';
41
+ /**
42
+ * When `true`, sets `field-sizing: content` so the control grows with its value.
43
+ * Still respects `min-block-size` and `resize`. Omitted / `false` keeps the browser fixed default.
44
+ *
45
+ * @default undefined (browser fixed)
46
+ */
47
+ fitContent?: BasicInputProps['fitContent'];
54
48
  };
55
49
  export declare const Textarea: React.FC<TextareaProps>;
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "Textarea",
3
- "summary": "Multi-line field control with shared field copy and optional resize.",
3
+ "summary": "Multi-line field control with shared field copy, optional resize, and optional content sizing.",
4
4
  "whenToUse": [
5
5
  "Multi-line text entry with label, description, and error",
6
6
  "Controlled vertical or bidirectional resize",
7
+ "Content-sized growth via fitContent",
7
8
  "Native textarea attributes through the field control",
8
9
  "One or more Textareas inside Fieldset when they belong to a labeled form section with other fields"
9
10
  ],
@@ -20,6 +21,11 @@
20
21
  "antiPatterns": ["Using Textarea for single-line values", "Expecting unsupported size or variant props"],
21
22
  "related": ["Fieldset", "Textfield", "Text"],
22
23
  "properties": {
24
+ "react": {
25
+ "fitContent": {
26
+ "description": "When true, sets field-sizing: content so the control grows with its value while still respecting min-block-size and resize. Omitted or false keeps the browser fixed default."
27
+ }
28
+ },
23
29
  "css": {
24
30
  "min-block-size": {
25
31
  "description": "Minimum block size of the textarea field root."
@@ -1,6 +1,5 @@
1
1
  import './textarea.css';
2
2
  import { clsx } from "../../core/clsx.js";
3
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
3
  import { BasicInput } from "../basic-input/basic-input.js";
5
4
  import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
6
5
  import { FieldLabel } from "../basic-input/field-label.js";
@@ -9,43 +8,40 @@ import textarea_module_default from "./textarea.module.js";
9
8
  import { jsx, jsxs } from "react/jsx-runtime";
10
9
  import { Field } from "@base-ui/react/field";
11
10
  //#region src/components/textarea/textarea.tsx
12
- var Textarea = ({ className, description, dirty, disabled, error, invalid, label, name, ref, resize, touched, validate, validationDebounceTime, validationMode, ...textareaProps }) => {
13
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(textareaProps);
14
- return /* @__PURE__ */ jsxs(Field.Root, {
15
- ...intrinsicAttributes,
16
- className: textarea_module_default.Textarea,
17
- dirty,
18
- disabled,
19
- invalid,
20
- name,
21
- touched,
22
- validate,
23
- validationDebounceTime,
24
- validationMode,
25
- render: /* @__PURE__ */ jsx(Stack, {
26
- direction: "column",
27
- rowGap: "small"
11
+ var Textarea = ({ className, description, dirty, disabled, error, fitContent, invalid, label, name, ref, resize, touched, validate, validationDebounceTime, validationMode, ...textareaProps }) => /* @__PURE__ */ jsxs(Field.Root, {
12
+ className: textarea_module_default.Textarea,
13
+ dirty,
14
+ disabled,
15
+ invalid,
16
+ name,
17
+ touched,
18
+ validate,
19
+ validationDebounceTime,
20
+ validationMode,
21
+ render: /* @__PURE__ */ jsx(Stack, {
22
+ direction: "column",
23
+ rowGap: "small"
24
+ }),
25
+ children: [
26
+ label && /* @__PURE__ */ jsx(Field.Label, {
27
+ className: textarea_module_default.Label,
28
+ children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
28
29
  }),
29
- children: [
30
- label && /* @__PURE__ */ jsx(Field.Label, {
31
- className: textarea_module_default.Label,
32
- children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
33
- }),
34
- /* @__PURE__ */ jsx(BasicInput, {
35
- ...componentProps,
36
- ref,
37
- className: clsx(textarea_module_default.CustomBasicInput, className),
38
- "data-resize": resize,
39
- disabled,
40
- render: /* @__PURE__ */ jsx("textarea", {})
41
- }),
42
- /* @__PURE__ */ jsx(FieldHelperCopy, {
43
- className: textarea_module_default.Description,
44
- description,
45
- error
46
- })
47
- ]
48
- });
49
- };
30
+ /* @__PURE__ */ jsx(BasicInput, {
31
+ ...textareaProps,
32
+ ref,
33
+ className: clsx(textarea_module_default.CustomBasicInput, className),
34
+ "data-resize": resize,
35
+ disabled,
36
+ fitContent,
37
+ render: /* @__PURE__ */ jsx("textarea", {})
38
+ }),
39
+ /* @__PURE__ */ jsx(FieldHelperCopy, {
40
+ className: textarea_module_default.Description,
41
+ description,
42
+ error
43
+ })
44
+ ]
45
+ });
50
46
  //#endregion
51
47
  export { Textarea };
@@ -1,6 +1,6 @@
1
1
  import { FieldRoot } from '@base-ui/react/field';
2
2
  import { Input as PrimitiveInput } from '@base-ui/react/input';
3
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
+ import { BasicInputProps } from '../basic-input';
4
4
  import type * as React from 'react';
5
5
  /**
6
6
  * Public Textfield props.
@@ -11,7 +11,7 @@ import type * as React from 'react';
11
11
  *
12
12
  * @default Base UI pass-through props keep upstream defaults.
13
13
  */
14
- export type TextfieldProps = PrimitiveInput.Props & FieldRoot.Props & IntrinsicViraProps & {
14
+ export type TextfieldProps = PrimitiveInput.Props & FieldRoot.Props & {
15
15
  /**
16
16
  * Visible label rendered with shared internal `FieldLabel`.
17
17
  *
@@ -44,5 +44,12 @@ export type TextfieldProps = PrimitiveInput.Props & FieldRoot.Props & IntrinsicV
44
44
  * @default No end addon is rendered.
45
45
  */
46
46
  endAddon?: React.ReactNode;
47
+ /**
48
+ * When `true`, sets `field-sizing: content` so the control grows inline with its value.
49
+ * Block chrome stays `var(--vui-textfield-input-height)`. Omitted / `false` keeps the browser fixed default.
50
+ *
51
+ * @default undefined (browser fixed)
52
+ */
53
+ fitContent?: BasicInputProps['fitContent'];
47
54
  };
48
55
  export declare const Textfield: React.FC<TextfieldProps>;
@@ -24,6 +24,11 @@
24
24
  ],
25
25
  "related": ["Fieldset", "Textarea", "Select", "Text"],
26
26
  "properties": {
27
+ "react": {
28
+ "fitContent": {
29
+ "description": "When true, sets field-sizing: content so the control grows inline with its value; block chrome stays the fixed textfield input height. Omitted or false keeps the browser fixed default."
30
+ }
31
+ },
27
32
  "css": {
28
33
  "input-height": {
29
34
  "description": "Textfield control group block size."
@@ -1,6 +1,5 @@
1
1
  import './textfield.css';
2
2
  import { clsx } from "../../core/clsx.js";
3
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
3
  import { BasicInput } from "../basic-input/basic-input.js";
5
4
  import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
6
5
  import { FieldLabel } from "../basic-input/field-label.js";
@@ -11,48 +10,45 @@ import { jsx, jsxs } from "react/jsx-runtime";
11
10
  import { Field } from "@base-ui/react/field";
12
11
  import { Input } from "@base-ui/react/input";
13
12
  //#region src/components/textfield/textfield.tsx
14
- var Textfield = ({ className, description, dirty, disabled, endAddon, error, invalid, label, name, ref, startAddon, touched, validate, validationDebounceTime, validationMode, ...inputProps }) => {
15
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(inputProps);
16
- return /* @__PURE__ */ jsxs(Field.Root, {
17
- ...intrinsicAttributes,
18
- className: textfield_module_default.Textfield,
19
- dirty,
20
- disabled,
21
- invalid,
22
- name,
23
- touched,
24
- validate,
25
- validationDebounceTime,
26
- validationMode,
27
- render: /* @__PURE__ */ jsx(Stack, {
28
- direction: "column",
29
- rowGap: "small"
13
+ var Textfield = ({ className, description, dirty, disabled, endAddon, error, fitContent, invalid, label, name, ref, startAddon, touched, validate, validationDebounceTime, validationMode, ...inputProps }) => /* @__PURE__ */ jsxs(Field.Root, {
14
+ className: textfield_module_default.Textfield,
15
+ dirty,
16
+ disabled,
17
+ invalid,
18
+ name,
19
+ touched,
20
+ validate,
21
+ validationDebounceTime,
22
+ validationMode,
23
+ render: /* @__PURE__ */ jsx(Stack, {
24
+ direction: "column",
25
+ rowGap: "small"
26
+ }),
27
+ children: [
28
+ label && /* @__PURE__ */ jsx(Field.Label, {
29
+ className: textfield_module_default.Label,
30
+ children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
30
31
  }),
31
- children: [
32
- label && /* @__PURE__ */ jsx(Field.Label, {
33
- className: textfield_module_default.Label,
34
- children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
35
- }),
36
- /* @__PURE__ */ jsx(InputControlGroup, {
37
- addonClassName: textfield_module_default.Addon,
38
- controlGroupClassName: textfield_module_default.ControlGroup,
39
- endAddon,
40
- startAddon,
41
- children: /* @__PURE__ */ jsx(BasicInput, {
42
- ...componentProps,
43
- ref,
44
- className: clsx(textfield_module_default.CustomBasicInput, className),
45
- disabled,
46
- render: /* @__PURE__ */ jsx(Input, {})
47
- })
48
- }),
49
- /* @__PURE__ */ jsx(FieldHelperCopy, {
50
- className: textfield_module_default.Description,
51
- description,
52
- error
32
+ /* @__PURE__ */ jsx(InputControlGroup, {
33
+ addonClassName: textfield_module_default.Addon,
34
+ controlGroupClassName: textfield_module_default.ControlGroup,
35
+ endAddon,
36
+ startAddon,
37
+ children: /* @__PURE__ */ jsx(BasicInput, {
38
+ ...inputProps,
39
+ ref,
40
+ className: clsx(textfield_module_default.CustomBasicInput, className),
41
+ disabled,
42
+ fitContent,
43
+ render: /* @__PURE__ */ jsx(Input, {})
53
44
  })
54
- ]
55
- });
56
- };
45
+ }),
46
+ /* @__PURE__ */ jsx(FieldHelperCopy, {
47
+ className: textfield_module_default.Description,
48
+ description,
49
+ error
50
+ })
51
+ ]
52
+ });
57
53
  //#endregion
58
54
  export { Textfield };
@@ -1,6 +1,5 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
2
  import { ThemeTypes } from '@viraui/foundation/vira/types';
3
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
3
  import type * as React from 'react';
5
4
  type TitleSpace = ThemeTypes['space'];
6
5
  type TitleAxisPadding = TitleSpace | [TitleSpace | 0, TitleSpace | 0];
@@ -12,7 +11,7 @@ type TitleAxisPadding = TitleSpace | [TitleSpace | 0, TitleSpace | 0];
12
11
  *
13
12
  * @default Base HTML pass-through props keep upstream defaults.
14
13
  */
15
- export type TitleProps = React.ComponentPropsWithoutRef<'span'> & IntrinsicViraProps & {
14
+ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & {
16
15
  /**
17
16
  * Replaces the default `span` root using Base UI render semantics.
18
17
  *
@@ -1,13 +1,11 @@
1
1
  import './title.css';
2
2
  import { clsx } from "../../core/clsx.js";
3
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
4
3
  import { resolveAxisPadding } from "../../core/styles/resolve-axis-padding.js";
5
4
  import title_module_default from "./title.module.js";
6
5
  import { useRender } from "@base-ui/react/use-render";
7
6
  //#region src/components/title/title.tsx
8
7
  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 }) => {
9
8
  const hasPadding = Boolean(hPadding || vPadding);
10
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
11
9
  const dynamicStyle = {
12
10
  "--vui-title-align": align,
13
11
  "--vui-title-max-width": maxWidth ?? "none",
@@ -27,8 +25,7 @@ var Title = ({ align = "start", balanced = false, selection = true, className, c
27
25
  render,
28
26
  ref,
29
27
  props: {
30
- ...componentProps,
31
- ...intrinsicAttributes,
28
+ ...otherProps,
32
29
  "data-title-level": level,
33
30
  "data-title-weight": weight !== void 0 ? "custom" : "preset",
34
31
  "data-title-line-height": lineHeight,
@@ -19,7 +19,7 @@ var ToastBanner = ({ children, className, description, dismissable = true, dismi
19
19
  color: 1,
20
20
  border: "all",
21
21
  radius: "large",
22
- vibrant: true
22
+ "data-vibrant": ""
23
23
  }),
24
24
  ...!resolvedTitle && resolvedDescription && { "aria-label": typeof resolvedDescription === "string" ? resolvedDescription : void 0 },
25
25
  children: /* @__PURE__ */ jsxs(Toast.Content, {
@@ -15,7 +15,7 @@ var TooltipContent = ({ children, sideOffset = 8, ...positionerProps }) => /* @_
15
15
  color: 1,
16
16
  border: "all",
17
17
  radius: "medium",
18
- vibrant: true
18
+ "data-vibrant": ""
19
19
  }),
20
20
  children: /* @__PURE__ */ jsx(Tooltip.Viewport, {
21
21
  className: tooltip_module_default.Viewport,
@@ -1,4 +1,3 @@
1
- import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
2
1
  import { TypewriterCaret } from './typewriter.utils';
3
2
  import type * as React from 'react';
4
3
  /**
@@ -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 TypewriterProps = React.ComponentPropsWithRef<'span'> & IntrinsicViraProps & {
11
+ export type TypewriterProps = React.ComponentPropsWithRef<'span'> & {
13
12
  /**
14
13
  * Cycles through multiple phrases instead of a single `children` string.
15
14
  *
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
  import './typewriter.css';
3
3
  import { clsx } from "../../core/clsx.js";
4
- import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
5
4
  import typewriter_module_default from "./typewriter.module.js";
6
5
  import { resolveTextsKey, runTypewriterAnimation, splitTextsKey } from "./typewriter.utils.js";
7
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -15,7 +14,6 @@ var createCaretElement = (caret) => {
15
14
  return element;
16
15
  };
17
16
  var Typewriter = ({ caret = "pipe", caretColor, children, className, delay = 0, deleteSpeed = 25, loop = true, pause = 2e3, preserveSpace = false, ref, speed = 40, style, texts, ...otherProps }) => {
18
- const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
19
17
  const displayRef = useRef(null);
20
18
  const liveRef = useRef(null);
21
19
  const textsKey = resolveTextsKey(texts, children);
@@ -78,8 +76,7 @@ var Typewriter = ({ caret = "pipe", caretColor, children, className, delay = 0,
78
76
  ...style
79
77
  };
80
78
  return /* @__PURE__ */ jsxs("span", {
81
- ...componentProps,
82
- ...intrinsicAttributes,
79
+ ...otherProps,
83
80
  ref,
84
81
  className: clsx(typewriter_module_default.Typewriter, className),
85
82
  style: dynamicStyle,
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export * from './components';
2
- export type { IntrinsicViraProps } from './core/props/intrinsic-vira-props';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Accordion } from "./components/accordion/accordion.js";
2
+ import { Annotate } from "./components/annotate/annotate.js";
2
3
  import { Avatar } from "./components/avatar/avatar.js";
3
4
  import { AvatarGroup } from "./components/avatar-group/avatar-group.js";
4
5
  import { Bleed } from "./components/bleed/bleed.js";
@@ -21,6 +22,7 @@ import { ELEVATION_DEFAULTS } from "./core/elevation/elevation-types.js";
21
22
  import { getElevationProps } from "./core/elevation/get-elevation-props.js";
22
23
  import { Elevator } from "./components/elevator/elevator.js";
23
24
  import { Fieldset } from "./components/fieldset/fieldset.js";
25
+ import { FitText } from "./components/fit-text/fit-text.js";
24
26
  import { IconButton } from "./components/icon-button/icon-button.js";
25
27
  import { IconButtonLink } from "./components/icon-button/icon-button-link.js";
26
28
  import { LinearProgress } from "./components/linear-progress/linear-progress.js";
@@ -49,4 +51,4 @@ import { ToggleGroup } from "./components/toggle-group/toggle-group.js";
49
51
  import { Typewriter } from "./components/typewriter/typewriter.js";
50
52
  import { TooltipContent } from "./components/tooltip/tooltip-content.js";
51
53
  import { Tooltip, TooltipProvider, TooltipTrigger } from "./components/tooltip/tooltip.js";
52
- export { Accordion, Avatar, AvatarGroup, Bleed, Button, ButtonLink, Checkbox, CheckboxGroup, Chip, ClampText, Dialog, DialogClose, DialogIndent, DialogIndentBackground, DialogSheet, DialogTrigger, ELEVATION_DEFAULTS, Elevator, Fieldset, IconButton, IconButtonLink, LinearProgress, Masonry, Meter, Popover, PopoverClose, PopoverDescription, PopoverSheet, PopoverTitle, PopoverTrigger, ProgressiveBlur, Radio, RadioGroup, Select, Separator, Shimmer, Skeleton, Slider, Spinner, Stack, StaticNoise, Surface, Switch, Tabs, Text, Textarea, Textfield, Title, Toast, ToggleButton, ToggleGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typewriter, getElevationProps };
54
+ export { Accordion, Annotate, Avatar, AvatarGroup, Bleed, Button, ButtonLink, Checkbox, CheckboxGroup, Chip, ClampText, Dialog, DialogClose, DialogIndent, DialogIndentBackground, DialogSheet, DialogTrigger, ELEVATION_DEFAULTS, Elevator, Fieldset, FitText, IconButton, IconButtonLink, LinearProgress, Masonry, Meter, Popover, PopoverClose, PopoverDescription, PopoverSheet, PopoverTitle, PopoverTrigger, ProgressiveBlur, Radio, RadioGroup, Select, Separator, Shimmer, Skeleton, Slider, Spinner, Stack, StaticNoise, Surface, Switch, Tabs, Text, Textarea, Textfield, Title, Toast, ToggleButton, ToggleGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typewriter, getElevationProps };
@@ -25,7 +25,7 @@
25
25
  {
26
26
  "id": "layout",
27
27
  "file": "layout.css",
28
- "purpose": "Flex growth and shrink opt-out utilities for Stack and component children."
28
+ "purpose": "Flex growth and shrink utilities via data-grow / data-shrink for Stack and component children."
29
29
  }
30
30
  ],
31
31
  "attributes": [
@@ -98,28 +98,28 @@
98
98
  {
99
99
  "name": "data-grow",
100
100
  "module": "layout",
101
- "values": ["false"],
102
- "presence": "only false is meaningful; true or omitted does not render the attribute",
103
- "effect": "Sets --vira-flex-grow: 0 and flex-grow: 0 so the element opts out of flex growth.",
101
+ "values": ["true", "false"],
102
+ "presence": "optional; omit for default flex growth",
103
+ "effect": "true sets --vira-flex-grow: 1 and flex-grow: 1; false sets --vira-flex-grow: 0 and flex-grow: 0.",
104
104
  "whenToUse": [
105
- "Fixed-width icons, indicators, or trailing slots inside Stack fillChildren layouts",
106
- "Public component grow={false} on the outermost root"
105
+ "Force grow or opt out inside Stack fillChildren layouts",
106
+ "Fixed-width icons, indicators, or trailing slots (false)"
107
107
  ],
108
- "whenNotToUse": ["When the element should grow to fill available flex space"],
109
- "related": ["Stack", "grow prop on public components"]
108
+ "whenNotToUse": ["When default flex growth is already correct"],
109
+ "related": ["Stack"]
110
110
  },
111
111
  {
112
112
  "name": "data-shrink",
113
113
  "module": "layout",
114
- "values": ["false"],
115
- "presence": "only false is meaningful; true or omitted does not render the attribute",
116
- "effect": "Sets --vira-flex-shrink: 0 and flex-shrink: 0 so the element resists flex shrink.",
114
+ "values": ["true", "false"],
115
+ "presence": "optional; omit for default flex shrink",
116
+ "effect": "true sets --vira-flex-shrink: 1 and flex-shrink: 1; false sets --vira-flex-shrink: 0 and flex-shrink: 0.",
117
117
  "whenToUse": [
118
- "Labels, icons, or controls that must keep their intrinsic width in shrinking flex rows",
119
- "Public component shrink={false} on the outermost root"
118
+ "Force shrink or resist shrink in flex rows",
119
+ "Labels, icons, or controls that must keep intrinsic width (false)"
120
120
  ],
121
- "whenNotToUse": ["When the element should shrink with the flex container"],
122
- "related": ["Stack", "shrink prop on public components"]
121
+ "whenNotToUse": ["When default flex shrink is already correct"],
122
+ "related": ["Stack"]
123
123
  }
124
124
  ],
125
125
  "customProperties": [
@@ -161,20 +161,19 @@
161
161
  {
162
162
  "name": "--vira-flex-grow",
163
163
  "module": "layout",
164
- "setBy": "data-grow=\"false\"",
164
+ "setBy": "data-grow=\"true\" or data-grow=\"false\"",
165
165
  "default": "unset; Stack child rules use var(--vira-flex-grow, 1)",
166
- "purpose": "Lets component child flex defaults honor grow opt-out without !important."
166
+ "purpose": "Lets component child flex defaults honor grow data attrs without !important."
167
167
  },
168
168
  {
169
169
  "name": "--vira-flex-shrink",
170
170
  "module": "layout",
171
- "setBy": "data-shrink=\"false\"",
171
+ "setBy": "data-shrink=\"true\" or data-shrink=\"false\"",
172
172
  "default": "unset",
173
- "purpose": "Lets component child flex defaults honor shrink opt-out without !important."
173
+ "purpose": "Lets component child flex defaults honor shrink data attrs without !important."
174
174
  }
175
175
  ],
176
176
  "antiPatterns": [
177
- "Setting data-grow or data-shrink to true; only false is serialized by Vira components",
178
177
  "Using data-elevation without importing @viraui/react/preflight.css",
179
178
  "Fighting data-mode color-scheme rules without documenting a deliberate override",
180
179
  "Applying data-no-link-style to prose links that should use the default interactive underline treatment"