@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,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 +1 @@
1
- @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-title-align{syntax:"*";inherits:false;initial-value:start}@property --vui-title-max-width{syntax:"*";inherits:false;initial-value:none}@property --vui-title-literal-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-title-white-space{syntax:"*";inherits:false;initial-value:normal}@property --vui-title-font-weight{syntax:"<number>";inherits:false;initial-value:500}@property --vui-title-font-width{syntax:"<number>";inherits:false;initial-value:100}@property --vui-title-font-opsz{syntax:"<number>";inherits:false;initial-value:16}@property --vui-title-trim{syntax:"*";inherits:false;initial-value:none}@property --vui-title-trim-type{syntax:"*";inherits:false;initial-value:none}@property --vui-title-padding-inline-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-inline-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-block-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-block-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-font-size{syntax:"<length>";inherits:false;initial-value:1rem}@property --vui-title-line-height{syntax:"normal | <number> | <length-percentage>";inherits:false;initial-value:normal}@property --vui-title-letter-spacing{syntax:"normal | <length>";inherits:false;initial-value:-.03em}@property --vui-title-font-family{syntax:"*";inherits:false;initial-value:sans-serif}.viraui__title-module__Title_CXMUX{--title-medium:clamp(var(--font-scale-body-medium),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 12 + 0.24cqi),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 3));--vui-title-font-size:clamp(var(--font-scale-h2),calc(var(--title-medium) * pow(var(--font-heading-typescale), 5)),var(--font-scale-h1));--vui-title-font-family:var(--font-family-heading);--vui-title-line-height:var(--font-leading-standard);margin:0;max-inline-size:var(--vui-title-max-width);font-family:var(--vui-title-font-family);font-size:var(--vui-title-font-size);line-height:var(--vui-title-line-height);letter-spacing:var(--vui-title-letter-spacing);text-align:var(--vui-title-align);white-space:var(--vui-title-white-space);word-break:break-word;font-weight:var(--vui-title-font-weight);font-stretch:calc(var(--vui-title-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-title-font-weight),"wdth" var(--vui-title-font-width),"opsz" var(--vui-title-font-opsz);text-box:var(--vui-title-trim) var(--vui-title-trim-type);display:inline-flex;&[data-title-balanced=true]{text-wrap:balance}&[data-title-selection=false]{-webkit-user-select:none;user-select:none}&[data-title-has-padding=true]{padding:var(--vui-title-padding-block-start) var(--vui-title-padding-inline-end) var(--vui-title-padding-block-end) var(--vui-title-padding-inline-start)}&[data-title-level=display]{--vui-title-font-size:clamp(var(--font-scale-h1),calc(var(--font-scale-h1) + 4.643cqi - 0.9286rem),var(--font-scale-display))}&[data-title-level=h1]{--vui-title-font-size:clamp(var(--font-scale-h2),calc(var(--title-medium) * pow(var(--font-heading-typescale), 5)),var(--font-scale-h1))}&[data-title-level=h2]{--vui-title-font-size:clamp(var(--font-scale-h3),calc(var(--title-medium) * pow(var(--font-heading-typescale), 4)),var(--font-scale-h2))}&[data-title-level=h3]{--vui-title-font-size:clamp(var(--font-scale-h4),calc(var(--title-medium) * pow(var(--font-heading-typescale), 3)),var(--font-scale-h3))}&[data-title-level=h4]{--vui-title-font-size:clamp(var(--font-scale-h5),calc(var(--title-medium) * pow(var(--font-heading-typescale), 2)),var(--font-scale-h4))}&[data-title-level=h5]{--vui-title-font-size:clamp(var(--font-scale-h6),calc(var(--title-medium) * pow(var(--font-heading-typescale), 1)),var(--font-scale-h5));--vui-title-letter-spacing:-0.02em}&[data-title-level=h6]{--vui-title-font-size:clamp(var(--font-scale-body-medium),var(--title-medium),var(--font-scale-h6));--vui-title-letter-spacing:-0.02em}&[data-title-has-literal-color=true]{color:var(--vui-title-literal-color)}&[data-title-line-height=none]{--vui-title-line-height:0}&[data-title-line-height=x-small]{--vui-title-line-height:var(--font-leading-x-small)}&[data-title-line-height=small]{--vui-title-line-height:var(--font-leading-small)}&[data-title-line-height=large]{--vui-title-line-height:var(--font-leading-large)}}}
1
+ @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.components{@property --vui-title-align{syntax:"*";inherits:false;initial-value:start}@property --vui-title-max-width{syntax:"*";inherits:false;initial-value:none}@property --vui-title-literal-color{syntax:"<color>";inherits:false;initial-value:#0000}@property --vui-title-white-space{syntax:"*";inherits:false;initial-value:normal}@property --vui-title-font-weight{syntax:"<number>";inherits:false;initial-value:500}@property --vui-title-font-width{syntax:"<number>";inherits:false;initial-value:100}@property --vui-title-font-opsz{syntax:"<number>";inherits:false;initial-value:16}@property --vui-title-trim{syntax:"*";inherits:false;initial-value:none}@property --vui-title-trim-type{syntax:"*";inherits:false;initial-value:none}@property --vui-title-padding-inline-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-inline-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-block-start{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-padding-block-end{syntax:"<length>";inherits:false;initial-value:0}@property --vui-title-font-size{syntax:"<length>";inherits:false;initial-value:1rem}@property --vui-title-line-height{syntax:"normal | <number> | <length-percentage>";inherits:false;initial-value:normal}@property --vui-title-letter-spacing{syntax:"normal | <length>";inherits:false;initial-value:-.03em}@property --vui-title-font-family{syntax:"*";inherits:false;initial-value:sans-serif}.viraui__title-module__Title_CXMUX{--title-medium:clamp(var(--font-scale-body-medium),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 12 + 0.24cqi),calc(var(--font-scale-body-medium) + var(--font-scale-body-x-small) / 3));--vui-title-font-size:clamp(var(--font-scale-h2),calc(var(--title-medium) * pow(var(--font-heading-typescale), 5)),var(--font-scale-h1));--vui-title-font-family:var(--font-family-heading);--vui-title-line-height:var(--font-leading-standard);margin:0;max-inline-size:var(--vui-title-max-width);font-family:var(--vui-title-font-family);font-size:var(--vui-title-font-size);line-height:var(--vui-title-line-height);letter-spacing:var(--vui-title-letter-spacing);text-align:var(--vui-title-align);white-space:var(--vui-title-white-space);word-break:break-word;font-weight:var(--vui-title-font-weight);font-stretch:calc(var(--vui-title-font-width) * 1%);font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-title-font-weight),"wdth" var(--vui-title-font-width),"opsz" var(--vui-title-font-opsz);text-box:var(--vui-title-trim) var(--vui-title-trim-type);display:inline-flex;&[data-title-balanced=true]{text-wrap:balance}&[data-title-selection=false]{-webkit-user-select:none;user-select:none}&[data-title-has-padding=true]{padding:var(--vui-title-padding-block-start) var(--vui-title-padding-inline-end) var(--vui-title-padding-block-end) var(--vui-title-padding-inline-start)}&[data-title-size=display]{--vui-title-font-size:clamp(var(--font-scale-h1),calc(var(--font-scale-h1) + 4.643cqi - 0.9286rem),var(--font-scale-display))}&[data-title-size="1"]{--vui-title-font-size:clamp(var(--font-scale-h2),calc(var(--title-medium) * pow(var(--font-heading-typescale), 5)),var(--font-scale-h1))}&[data-title-size="2"]{--vui-title-font-size:clamp(var(--font-scale-h3),calc(var(--title-medium) * pow(var(--font-heading-typescale), 4)),var(--font-scale-h2))}&[data-title-size="3"]{--vui-title-font-size:clamp(var(--font-scale-h4),calc(var(--title-medium) * pow(var(--font-heading-typescale), 3)),var(--font-scale-h3))}&[data-title-size="4"]{--vui-title-font-size:clamp(var(--font-scale-h5),calc(var(--title-medium) * pow(var(--font-heading-typescale), 2)),var(--font-scale-h4))}&[data-title-size="5"]{--vui-title-font-size:clamp(var(--font-scale-h6),calc(var(--title-medium) * pow(var(--font-heading-typescale), 1)),var(--font-scale-h5));--vui-title-letter-spacing:-0.02em}&[data-title-size="6"]{--vui-title-font-size:clamp(var(--font-scale-body-medium),var(--title-medium),var(--font-scale-h6));--vui-title-letter-spacing:-0.02em}&[data-title-has-literal-color=true]{color:var(--vui-title-literal-color)}&[data-title-line-height=none]{--vui-title-line-height:0}&[data-title-line-height=x-small]{--vui-title-line-height:var(--font-leading-x-small)}&[data-title-line-height=small]{--vui-title-line-height:var(--font-leading-small)}&[data-title-line-height=large]{--vui-title-line-height:var(--font-leading-large)}}}
@@ -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,11 +11,11 @@ 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
  *
19
- * Pair this with `level` for most headings so DOM semantics and visual preset stay intentionally aligned.
18
+ * Pair this with `size` for most headings so DOM semantics and visual preset stay intentionally aligned.
20
19
  *
21
20
  * @default The title renders a `span` root.
22
21
  */
@@ -33,11 +32,11 @@ export type TitleProps = React.ComponentPropsWithoutRef<'span'> & IntrinsicViraP
33
32
  * This controls only the visual preset. Semantic heading choice remains owned by `render`,
34
33
  * because `Title` keeps a `span` root unless `render` replaces it.
35
34
  *
36
- * @default 'h1'
35
+ * @default '1'
37
36
  */
38
- level?: 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
37
+ size?: 'display' | '1' | '2' | '3' | '4' | '5' | '6';
39
38
  /**
40
- * Overrides the level preset weight (`font-weight` + `wght` axis).
39
+ * Overrides the size preset weight (`font-weight` + `wght` axis).
41
40
  *
42
41
  * @default No weight override.
43
42
  */
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "name": "Title",
3
+ "structure": "<Title>…</Title>",
3
4
  "summary": "Theme-aware heading and display typography primitive.",
4
5
  "whenToUse": [
5
6
  "Headings and display text with title presets",
6
7
  "Semantic heading tags chosen explicitly through render",
7
- "Level and render paired together for most heading use cases",
8
- "Fluid clamp sizing across title levels"
8
+ "Size and render paired together for most heading use cases",
9
+ "Fluid clamp sizing across title appearance presets"
9
10
  ],
10
11
  "whenNotToUse": ["Body copy — use Text", "Body or mono family typography"],
11
12
  "accessibility": [
12
13
  "Title renders a span by default, so choose render to match the correct heading level for the page outline",
13
- "Visual level presets do not replace picking the right h1–h6 element",
14
- "Use level for appearance and render for semantics; pair them unless you intentionally need a visual mismatch",
15
- "Keep heading hierarchy sequential; do not skip levels for styling alone"
14
+ "Visual size presets do not replace picking the right h1–h6 element",
15
+ "Use size for appearance and render for semantics; pair them unless you intentionally need a visual mismatch",
16
+ "Keep heading hierarchy sequential; do not skip outline levels for styling alone"
16
17
  ],
17
18
  "antiPatterns": [
18
- "Assuming level changes the HTML tag automatically",
19
- "Letting level force the HTML tag instead of choosing render explicitly",
19
+ "Assuming size changes the HTML tag automatically",
20
+ "Letting size force the HTML tag instead of choosing render explicitly",
20
21
  "Using Title for long body paragraphs"
21
22
  ],
22
23
  "related": ["Text", "ClampText"],
@@ -64,8 +65,8 @@
64
65
  "vPadding": {
65
66
  "description": "Sets block padding using one token or a [start, end] tuple."
66
67
  },
67
- "level": {
68
- "description": "Selects the visual heading preset; does not change semantic heading level.",
68
+ "size": {
69
+ "description": "Selects the visual heading appearance preset; does not change semantic heading level.",
69
70
  "refCss": "font-size"
70
71
  },
71
72
  "lineHeight": {
@@ -127,15 +128,15 @@
127
128
  "refReact": "vPadding"
128
129
  },
129
130
  "font-size": {
130
- "description": "Heading font size; level prop presets via data attributes.",
131
- "refReact": "level"
131
+ "description": "Heading font size; size prop presets via data attributes.",
132
+ "refReact": "size"
132
133
  },
133
134
  "line-height": {
134
135
  "description": "Line height; lineHeight prop presets via data attributes.",
135
136
  "refReact": "lineHeight"
136
137
  },
137
138
  "letter-spacing": {
138
- "description": "Heading letter spacing; level presets adjust this."
139
+ "description": "Heading letter spacing; size presets adjust this."
139
140
  },
140
141
  "font-family": {
141
142
  "description": "Heading font family on the root."
@@ -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
- 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 }) => {
7
+ var Title = ({ align = "start", balanced = false, selection = true, className, color, fontWidth, hPadding, size = "1", 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,9 +25,8 @@ var Title = ({ align = "start", balanced = false, selection = true, className, c
27
25
  render,
28
26
  ref,
29
27
  props: {
30
- ...componentProps,
31
- ...intrinsicAttributes,
32
- "data-title-level": level,
28
+ ...otherProps,
29
+ "data-title-size": size,
33
30
  "data-title-weight": weight !== void 0 ? "custom" : "preset",
34
31
  "data-title-line-height": lineHeight,
35
32
  "data-title-balanced": balanced ? "true" : "false",
@@ -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, {
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "Toast",
3
+ "structure": "<Toast.Provider>\n <Toast.Portal>\n <Toast.Viewport>\n <Toast.Banner toast={…}>\n <Toast.Action>…</Toast.Action>\n </Toast.Banner>\n </Toast.Viewport>\n </Toast.Portal>\n</Toast.Provider>",
3
4
  "summary": "Transient notification surface with stacked or anchored placement, Banner high-level API, and optional action buttons.",
4
5
  "whenToUse": [
5
6
  "Confirming a completed action such as save or delete",
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "ToggleButton",
3
+ "structure": "<ToggleButton restingIcon={<Plus />} aria-label=\"Pin\" />",
3
4
  "summary": "Icon-only two-state toggle that swaps resting and optional pressed icons on Base UI Toggle state.",
4
5
  "whenToUse": [
5
6
  "Toolbar pin, favorite, or mute toggles identified only by icon",
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "ToggleGroup",
3
+ "structure": "<ToggleGroup>\n <ToggleButton restingIcon={<Plus />} aria-label=\"List\" value=\"list\" />\n</ToggleGroup>",
3
4
  "summary": "Toolbar toggle set with shared selection state and default Stack spacing on Base UI ToggleGroup.",
4
5
  "whenToUse": [
5
6
  "Segmented icon toolbars such as text alignment or formatting controls",
@@ -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,5 +1,6 @@
1
1
  {
2
2
  "name": "Tooltip",
3
+ "structure": "<Tooltip>\n <Tooltip.Trigger />\n <Tooltip.Content />\n</Tooltip>",
3
4
  "summary": "Compound tooltip built on Base UI Tooltip with `Tooltip.Provider`, `Tooltip.Trigger`, `Tooltip.Content`, and `Tooltip.createHandle` for detached and multiple triggers; `Content` encapsulates Portal + Positioner + Popup + Viewport and animates position, size, and content between triggers.",
4
5
  "whenToUse": [
5
6
  "Short hints on hover or focus for toolbar controls and icon buttons",
@@ -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,5 +1,6 @@
1
1
  {
2
2
  "name": "Typewriter",
3
+ "structure": "<Typewriter>…</Typewriter>",
3
4
  "summary": "Decorative inline typewriter animation that inherits typography and color from a parent text primitive.",
4
5
  "whenToUse": [
5
6
  "Hero or marketing copy that cycles through short phrases",
@@ -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"
@@ -1 +1 @@
1
- @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.preflight{@property --scrollbar-thumb{syntax:"<color>";initial-value:#0000;inherits:true}@property --scrollbar-track{syntax:"<color>";initial-value:#0000;inherits:true}@property --outline-offset{syntax:"<length>";initial-value:2px;inherits:true}@property --outline-color{syntax:"<color>";initial-value:currentcolor;inherits:true}@property --outline{syntax:"*";initial-value:2px solid currentcolor;inherits:true}@property --is-light-mode{syntax:"<color>";initial-value:#000;inherits:true}}@layer viraui.preflight{html{--scrollbar-thumb:oklab(from var(--global-contrast) l a b/0.3);--scrollbar-track:#0000;--outline-offset:2px;--outline-color:var(--global-outline);--outline:2px solid var(--outline-color);--is-light-mode:contrast-color(var(--global-background));font-size:100%;box-sizing:border-box;line-height:1.5;background-color:var(--global-background);color:var(--global-foreground);container:root/normal}*{@container root not style(--corner-shape-enable: initial){corner-shape:var(--corner-shape-squircle)}}*,:after,:before{margin:0;box-sizing:inherit;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track)}:focus-visible{outline:var(--outline);outline-offset:var(--outline-offset)}body{color:var(--global-foreground);margin:0;font-size:var(--font-scale-body-medium);font-optical-sizing:auto;font-family:var(--font-family-body),system-ui,sans-serif;font-variation-settings:"wght" 400;font-variant-numeric:tabular-nums}::selection{background-color:var(--global-primary);color:contrast-color(var(--global-primary));text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg{display:inline-flex;vertical-align:middle;&:not([fill]){fill:currentcolor}}ol ul,ul ol{font-size:medium}table{border-spacing:0;inline-size:100%;border-collapse:collapse}table[data-layout-fixed]{table-layout:fixed}table thead{box-shadow:inset 0 -3px 0 var(--base-2)}table[data-table-separators] tr+tr{border-top:1px solid var(--base-2)}table th{white-space:nowrap;font-variation-settings:"wght" 800}table :is(td,th){border:none;text-align:left;font-size:medium;padding:calc(var(--space-x-small) + var(--space-2x-small)) var(--space-small)}button,fieldset{padding:0;margin:0;border:0}button{appearance:none;background:none;font-size:inherit;font-family:inherit;display:inline-flex;cursor:pointer;color:inherit}[data-elevation]{--shadow-direction:1;--shadow-opacity-factor:0.16;--extra-shadow:0 0 0 1px #0000;--shadow-color:oklab(0 0 0);transition-property:box-shadow;transition-duration:var(--elevation-transition-duration,.16s);transition-timing-function:var(--elevation-transition-easing,ease)}}@layer viraui.preflight{[data-elevation]:where([data-elevation-direction=bottom],[data-elevation-direction=right]){--shadow-direction:1}[data-elevation]:where([data-elevation-direction=top],[data-elevation-direction=left]){--shadow-direction:-1}[data-elevation-hover="0"]:hover,[data-elevation="0"]{--y1:0px;--x1:0px;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 0 oklch(from var(--shadow-color) l c h/var(--shadow-opacity-factor)),0 0 0 color-mix(in oklch,var(--shadow-color),#0000 calc(94% - var(--shadow-opacity-factor))),0 0 0 oklch(from var(--shadow-color) l c h/var(--shadow-opacity-factor)),var(--extra-shadow)}[data-elevation-hover="1"]:hover,[data-elevation-hover="2"]:hover,[data-elevation-hover="3"]:hover,[data-elevation-hover="4"]:hover,[data-elevation="1"],[data-elevation="2"],[data-elevation="3"],[data-elevation="4"]{box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) var(--shadow-blur-1) oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) var(--shadow-blur-2) oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) var(--shadow-blur-3) oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) var(--shadow-blur-4) oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[data-elevation-hover="1"]:hover,[data-elevation="1"]{--y1:0px;--y2:2px;--y3:4px;--y4:7px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:1px;--shadow-blur-2:2px;--shadow-blur-3:2px;--shadow-blur-4:3px}[data-elevation-hover="1"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="1"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:0px;--x2:2px;--x3:4px;--x4:7px}[data-elevation-hover="2"]:hover,[data-elevation="2"]{--y1:1px;--y2:5px;--y3:11px;--y4:19px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:3px;--shadow-blur-2:5px;--shadow-blur-3:6px;--shadow-blur-4:8px}[data-elevation-hover="2"]:where([data-elevation-direction=top],[data-elevation-direction=left]):hover,[data-elevation="2"]:where([data-elevation-direction=top],[data-elevation-direction=left]){--shadow-blur-3:7px}[data-elevation-hover="2"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="2"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:1px;--x2:5px;--x3:11px;--x4:19px}[data-elevation-hover="2"]:where([data-elevation-direction=right]):hover,[data-elevation="2"]:where([data-elevation-direction=right]){--shadow-blur-3:6px}[data-elevation-hover="3"]:hover,[data-elevation="3"]{--y1:2px;--y2:7px;--y3:16px;--y4:29px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:4px;--shadow-blur-2:7px;--shadow-blur-3:10px;--shadow-blur-4:12px}[data-elevation-hover="3"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="3"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:2px;--x2:7px;--x3:16px;--x4:29px}[data-elevation-hover="3"]:where([data-elevation-direction=right]):hover,[data-elevation="3"]:where([data-elevation-direction=right]){--x2:10px;--x3:22px;--x4:39px;--shadow-blur-1:5px;--shadow-blur-2:10px;--shadow-blur-3:13px;--shadow-blur-4:15px}[data-elevation-hover="4"]:hover,[data-elevation="4"]{--y1:4px;--y2:14px;--y3:33px;--y4:58px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:8px;--shadow-blur-2:14px;--shadow-blur-3:20px;--shadow-blur-4:23px}[data-elevation-hover="4"]:where([data-elevation-direction=top]):hover,[data-elevation="4"]:where([data-elevation-direction=top]){--y2:15px;--shadow-blur-2:15px}[data-elevation-hover="4"]:where([data-elevation-direction=left]):hover,[data-elevation="4"]:where([data-elevation-direction=left]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:4px;--x2:15px;--x3:33px;--x4:58px;--shadow-blur-2:15px}[data-elevation-hover="4"]:where([data-elevation-direction=right]):hover,[data-elevation="4"]:where([data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:4px;--x2:14px;--x3:33px;--x4:58px}}@layer viraui.preflight{[data-grow=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/12%);color:var(--highlight-red);box-shadow:0 0 0 1px oklab(from var(--highlight-red) l a b/50%);border-radius:var(--radius-small)}ins{background-color:oklab(from var(--highlight-green) l a b/15%);color:var(--highlight-green);box-shadow:0 0 0 1px oklab(from var(--highlight-green) l a b/50%)}ins,mark{padding:0 .4em;margin:0 .2em;text-decoration:none;border-radius:var(--radius-small)}mark{background-color:oklab(from var(--highlight-yellow) l a b/15%);color:var(--highlight-yellow);box-shadow:0 0 0 1px oklab(from var(--highlight-yellow) l a b/50%)}address{font-style:normal;line-height:inherit}dt{font-variation-settings:"wght" 600}dd{margin:0;padding:0}ul{font-size:medium;padding-left:1rem;& li::marker{font-size:inherit;text-align:right;font-variation-settings:"wght" 400;min-inline-size:var(--space-x-large);color:oklab(from currentColor l a b/80%)}}ol{font-size:medium;& li::marker{font-size:inherit;font-variation-settings:"wght" 400;min-inline-size:var(--space-x-large);font-variant-numeric:tabular-nums;white-space:nowrap;color:oklab(from currentColor l a b/80%)}}kbd{padding:.2em .4em;border-radius:var(--radius-small);font-variation-settings:"wght" 600;box-shadow:var(--global-contrast);background:var(--global-contrast)}abbr{text-decoration:underline dashed var(--global-primary)}label,legend{font-size:inherit}code{background-color:var(--global-contrast);border-radius:var(--radius-small);box-shadow:var(--global-contrast);padding:.2em .4em;font-size:1em;font-family:var(--font-family-mono)}pre code{box-shadow:none}s{text-decoration:line-through;color:var(--global-disabled-foreground);text-decoration-color:oklab(from var(--global-foreground) l a b/50%)}:root{color-scheme:light dark}[data-mode=dark]{color-scheme:dark}[data-mode=light]{color-scheme:light}}@layer viraui.preflight{[data-mode=inverted]{@container root style(--is-light-mode: black){color-scheme:dark}@container root style(--is-light-mode: white){color-scheme:light}}}@layer viraui.preflight{@container root not style(--vibrancy-enable: initial){[data-vibrant]{backdrop-filter:brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px)) saturate(150%);@container root style(--is-light-mode: black){backdrop-filter:brightness(100%) blur(calc(var(--vibrancy-blur) * 1px)) saturate(150%)}}}}
1
+ @layer viraui.preflight, viraui.components, viraui.overrides;@layer viraui.preflight{@property --scrollbar-thumb{syntax:"<color>";initial-value:#0000;inherits:true}@property --scrollbar-track{syntax:"<color>";initial-value:#0000;inherits:true}@property --outline-offset{syntax:"<length>";initial-value:2px;inherits:true}@property --outline-color{syntax:"<color>";initial-value:currentcolor;inherits:true}@property --outline{syntax:"*";initial-value:2px solid currentcolor;inherits:true}@property --is-light-mode{syntax:"<color>";initial-value:#000;inherits:true}}@layer viraui.preflight{html{--scrollbar-thumb:oklab(from var(--global-contrast) l a b/0.3);--scrollbar-track:#0000;--outline-offset:2px;--outline-color:var(--global-outline);--outline:2px solid var(--outline-color);--is-light-mode:contrast-color(var(--global-background));font-size:100%;box-sizing:border-box;line-height:1.5;background-color:var(--global-background);color:var(--global-foreground);container:root/normal}*{@container root not style(--corner-shape-enable: initial){corner-shape:var(--corner-shape-squircle)}}*,:after,:before{margin:0;box-sizing:inherit;scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track)}:focus-visible{outline:var(--outline);outline-offset:var(--outline-offset)}body{color:var(--global-foreground);margin:0;font-size:var(--font-scale-body-medium);font-optical-sizing:auto;font-family:var(--font-family-body),system-ui,sans-serif;font-variation-settings:"wght" 400;font-variant-numeric:tabular-nums}::selection{background-color:var(--global-primary);color:contrast-color(var(--global-primary));text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg{display:inline-flex;vertical-align:middle;&:not([fill]){fill:currentcolor}}ol ul,ul ol{font-size:medium}table{border-spacing:0;inline-size:100%;border-collapse:collapse}table[data-layout-fixed]{table-layout:fixed}table thead{box-shadow:inset 0 -3px 0 var(--base-2)}table[data-table-separators] tr+tr{border-top:1px solid var(--base-2)}table th{white-space:nowrap;font-variation-settings:"wght" 800}table :is(td,th){border:none;text-align:left;font-size:medium;padding:calc(var(--space-x-small) + var(--space-2x-small)) var(--space-small)}button,fieldset{padding:0;margin:0;border:0}button{appearance:none;background:none;font-size:inherit;font-family:inherit;display:inline-flex;cursor:pointer;color:inherit}[data-elevation]{--shadow-direction:1;--shadow-opacity-factor:0.16;--extra-shadow:0 0 0 1px #0000;--shadow-color:oklab(0 0 0);transition-property:box-shadow;transition-duration:var(--elevation-transition-duration,.16s);transition-timing-function:var(--elevation-transition-easing,ease)}}@layer viraui.preflight{[data-elevation]:where([data-elevation-direction=bottom],[data-elevation-direction=right]){--shadow-direction:1}[data-elevation]:where([data-elevation-direction=top],[data-elevation-direction=left]){--shadow-direction:-1}[data-elevation-hover="0"]:hover,[data-elevation="0"]{--y1:0px;--x1:0px;box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) 0 oklch(from var(--shadow-color) l c h/var(--shadow-opacity-factor)),0 0 0 color-mix(in oklch,var(--shadow-color),#0000 calc(94% - var(--shadow-opacity-factor))),0 0 0 oklch(from var(--shadow-color) l c h/var(--shadow-opacity-factor)),var(--extra-shadow)}[data-elevation-hover="1"]:hover,[data-elevation-hover="2"]:hover,[data-elevation-hover="3"]:hover,[data-elevation-hover="4"]:hover,[data-elevation="1"],[data-elevation="2"],[data-elevation="3"],[data-elevation="4"]{box-shadow:calc(var(--x1) * var(--shadow-direction)) calc(var(--y1) * var(--shadow-direction)) var(--shadow-blur-1) oklab(from var(--shadow-color) l a b/.1),calc(var(--x2) * var(--shadow-direction)) calc(var(--y2) * var(--shadow-direction)) var(--shadow-blur-2) oklab(from var(--shadow-color) l a b/.09),calc(var(--x3) * var(--shadow-direction)) calc(var(--y3) * var(--shadow-direction)) var(--shadow-blur-3) oklab(from var(--shadow-color) l a b/.05),calc(var(--x4) * var(--shadow-direction)) calc(var(--y4) * var(--shadow-direction)) var(--shadow-blur-4) oklab(from var(--shadow-color) l a b/.01),var(--extra-shadow)}[data-elevation-hover="1"]:hover,[data-elevation="1"]{--y1:0px;--y2:2px;--y3:4px;--y4:7px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:1px;--shadow-blur-2:2px;--shadow-blur-3:2px;--shadow-blur-4:3px}[data-elevation-hover="1"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="1"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:0px;--x2:2px;--x3:4px;--x4:7px}[data-elevation-hover="2"]:hover,[data-elevation="2"]{--y1:1px;--y2:5px;--y3:11px;--y4:19px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:3px;--shadow-blur-2:5px;--shadow-blur-3:6px;--shadow-blur-4:8px}[data-elevation-hover="2"]:where([data-elevation-direction=top],[data-elevation-direction=left]):hover,[data-elevation="2"]:where([data-elevation-direction=top],[data-elevation-direction=left]){--shadow-blur-3:7px}[data-elevation-hover="2"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="2"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:1px;--x2:5px;--x3:11px;--x4:19px}[data-elevation-hover="2"]:where([data-elevation-direction=right]):hover,[data-elevation="2"]:where([data-elevation-direction=right]){--shadow-blur-3:6px}[data-elevation-hover="3"]:hover,[data-elevation="3"]{--y1:2px;--y2:7px;--y3:16px;--y4:29px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:4px;--shadow-blur-2:7px;--shadow-blur-3:10px;--shadow-blur-4:12px}[data-elevation-hover="3"]:where([data-elevation-direction=left],[data-elevation-direction=right]):hover,[data-elevation="3"]:where([data-elevation-direction=left],[data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:2px;--x2:7px;--x3:16px;--x4:29px}[data-elevation-hover="3"]:where([data-elevation-direction=right]):hover,[data-elevation="3"]:where([data-elevation-direction=right]){--x2:10px;--x3:22px;--x4:39px;--shadow-blur-1:5px;--shadow-blur-2:10px;--shadow-blur-3:13px;--shadow-blur-4:15px}[data-elevation-hover="4"]:hover,[data-elevation="4"]{--y1:4px;--y2:14px;--y3:33px;--y4:58px;--x1:0px;--x2:0px;--x3:0px;--x4:0px;--shadow-blur-1:8px;--shadow-blur-2:14px;--shadow-blur-3:20px;--shadow-blur-4:23px}[data-elevation-hover="4"]:where([data-elevation-direction=top]):hover,[data-elevation="4"]:where([data-elevation-direction=top]){--y2:15px;--shadow-blur-2:15px}[data-elevation-hover="4"]:where([data-elevation-direction=left]):hover,[data-elevation="4"]:where([data-elevation-direction=left]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:4px;--x2:15px;--x3:33px;--x4:58px;--shadow-blur-2:15px}[data-elevation-hover="4"]:where([data-elevation-direction=right]):hover,[data-elevation="4"]:where([data-elevation-direction=right]){--y1:0px;--y2:0px;--y3:0px;--y4:0px;--x1:4px;--x2:14px;--x3:33px;--x4:58px}}@layer viraui.preflight{[data-grow=true]{--vira-flex-grow:1;flex-grow:1}[data-grow=false]{--vira-flex-grow:0;flex-grow:0}[data-shrink=true]{--vira-flex-shrink:1;flex-shrink:1}[data-shrink=false]{--vira-flex-shrink:0;flex-shrink:0}}@layer viraui.preflight{:where(p){line-height:1.5;min-block-size:.01vh;font-size:var(--font-scale-body-medium)}small{font-size:.7em}b,strong{font-variation-settings:"wght" 700}:where(a:any-link):not([data-no-link-style]){text-decoration:none;color:var(--global-interactive-text);word-break:break-word;&:not([class]){background:linear-gradient(currentcolor,currentcolor) no-repeat 0 100%;background-size:0 1px;transition:background-size var(--duration-fast) var(--easing-entrance);&:focus,&:hover{background-size:100% 1px}}}del{padding:0 .4em;margin:0 .2em;background-color:oklab(from var(--highlight-red) l a b/12%);color:var(--highlight-red);box-shadow:0 0 0 1px oklab(from var(--highlight-red) l a b/50%);border-radius:var(--radius-small)}ins{background-color:oklab(from var(--highlight-green) l a b/15%);color:var(--highlight-green);box-shadow:0 0 0 1px oklab(from var(--highlight-green) l a b/50%)}ins,mark{padding:0 .4em;margin:0 .2em;text-decoration:none;border-radius:var(--radius-small)}mark{background-color:oklab(from var(--highlight-yellow) l a b/15%);color:var(--highlight-yellow);box-shadow:0 0 0 1px oklab(from var(--highlight-yellow) l a b/50%)}address{font-style:normal;line-height:inherit}dt{font-variation-settings:"wght" 600}dd{margin:0;padding:0}ul{font-size:medium;padding-left:1rem;& li::marker{font-size:inherit;text-align:right;font-variation-settings:"wght" 400;min-inline-size:var(--space-x-large);color:oklab(from currentColor l a b/80%)}}ol{font-size:medium;& li::marker{font-size:inherit;font-variation-settings:"wght" 400;min-inline-size:var(--space-x-large);font-variant-numeric:tabular-nums;white-space:nowrap;color:oklab(from currentColor l a b/80%)}}kbd{padding:.2em .4em;border-radius:var(--radius-small);font-variation-settings:"wght" 600;box-shadow:var(--global-contrast);background:var(--global-contrast)}abbr{text-decoration:underline dashed var(--global-primary)}label,legend{font-size:inherit}code{background-color:var(--global-contrast);border-radius:var(--radius-small);box-shadow:var(--global-contrast);padding:.2em .4em;font-size:1em;font-family:var(--font-family-mono)}pre code{box-shadow:none}s{text-decoration:line-through;color:var(--global-disabled-foreground);text-decoration-color:oklab(from var(--global-foreground) l a b/50%)}:root{color-scheme:light dark}[data-mode=dark]{color-scheme:dark}[data-mode=light]{color-scheme:light}}@layer viraui.preflight{[data-mode=inverted]{@container root style(--is-light-mode: black){color-scheme:dark}@container root style(--is-light-mode: white){color-scheme:light}}}@layer viraui.preflight{@container root not style(--vibrancy-enable: initial){[data-vibrant]{backdrop-filter:brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px)) saturate(150%);@container root style(--is-light-mode: black){backdrop-filter:brightness(100%) blur(calc(var(--vibrancy-blur) * 1px)) saturate(150%)}}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viraui/react",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"
@@ -35,10 +35,10 @@
35
35
  "unplugin-dts": "1.0.3",
36
36
  "vite": "8.1.4",
37
37
  "vite-plugin-static-copy": "4.1.1",
38
- "@viraui/foundation": "1.0.10",
38
+ "@viraui/foundation": "1.0.12",
39
39
  "@viraui/icons": "0.1.7",
40
- "@viraui/tsconfig": "0.0.17",
41
- "@viraui/postcss-config": "0.0.18"
40
+ "@viraui/postcss-config": "0.0.18",
41
+ "@viraui/tsconfig": "0.0.17"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@base-ui/react": ">=1.6.0",
@@ -1,30 +0,0 @@
1
- export type IntrinsicViraProps = {
2
- /**
3
- * Adds `data-grow="false"` to the component root when false.
4
- *
5
- * @default The component root does not render a grow attribute.
6
- */
7
- grow?: boolean;
8
- /**
9
- * Adds `data-shrink="false"` to the component root when false.
10
- *
11
- * @default The component root does not render a shrink attribute.
12
- */
13
- shrink?: boolean;
14
- /**
15
- * Adds `data-vibrant` to the component root when true so preflight vibrancy styles can opt the surface into backdrop filtering.
16
- *
17
- * @default The component root does not render a vibrant attribute.
18
- */
19
- vibrant?: boolean;
20
- };
21
- type IntrinsicViraAttributes = {
22
- 'data-grow'?: 'false';
23
- 'data-shrink'?: 'false';
24
- 'data-vibrant'?: '';
25
- };
26
- export declare const extractIntrinsicViraProps: <Props extends IntrinsicViraProps>(props: Props) => {
27
- componentProps: Omit<Props, keyof IntrinsicViraProps>;
28
- intrinsicAttributes: IntrinsicViraAttributes;
29
- };
30
- export {};
@@ -1,14 +0,0 @@
1
- //#region src/core/props/intrinsic-vira-props.ts
2
- var extractIntrinsicViraProps = (props) => {
3
- const { grow, shrink, vibrant, ...componentProps } = props;
4
- return {
5
- componentProps,
6
- intrinsicAttributes: {
7
- ...grow === false && { "data-grow": "false" },
8
- ...shrink === false && { "data-shrink": "false" },
9
- ...vibrant && { "data-vibrant": "" }
10
- }
11
- };
12
- };
13
- //#endregion
14
- export { extractIntrinsicViraProps };