@viraui/react 0.0.8 → 0.0.10

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 (66) hide show
  1. package/dist/catalog.json +17 -17
  2. package/dist/components/avatar/avatar.d.ts +1 -1
  3. package/dist/components/avatar/avatar.js +2 -2
  4. package/dist/components/basic-input/field-helper-copy.js +1 -1
  5. package/dist/components/basic-input/input-control-group.js +1 -1
  6. package/dist/components/button/button.d.ts +1 -1
  7. package/dist/components/button/button.js +2 -2
  8. package/dist/components/clamp-text/clamp-text.d.ts +1 -1
  9. package/dist/components/clamp-text/clamp-text.js +1 -1
  10. package/dist/components/elevator/elevator.d.ts +5 -5
  11. package/dist/components/elevator/elevator.js +4 -4
  12. package/dist/components/icon/icon.d.ts +1 -1
  13. package/dist/components/icon/icon.js +1 -1
  14. package/dist/components/icon-button/icon-button.d.ts +1 -1
  15. package/dist/components/icon-button/icon-button.js +1 -1
  16. package/dist/components/select/select-group.js +2 -2
  17. package/dist/components/select/select-indicator-slot.js +1 -1
  18. package/dist/components/select/select-option.js +3 -3
  19. package/dist/components/select/select.d.ts +1 -1
  20. package/dist/components/select/select.js +4 -4
  21. package/dist/components/skeleton/skeleton.d.ts +2 -2
  22. package/dist/components/skeleton/skeleton.js +2 -2
  23. package/dist/components/slider/slider-control.js +1 -1
  24. package/dist/components/slider/slider.d.ts +1 -1
  25. package/dist/components/slider/slider.js +4 -4
  26. package/dist/components/spinner/spinner.d.ts +1 -1
  27. package/dist/components/spinner/spinner.js +1 -1
  28. package/dist/components/stack/stack.d.ts +2 -2
  29. package/dist/components/stack/stack.js +3 -3
  30. package/dist/components/surface/surface.d.ts +2 -2
  31. package/dist/components/surface/surface.js +3 -3
  32. package/dist/components/switch/switch.d.ts +1 -1
  33. package/dist/components/switch/switch.js +4 -4
  34. package/dist/components/text/text.d.ts +2 -2
  35. package/dist/components/text/text.js +2 -2
  36. package/dist/components/textarea/textarea.d.ts +1 -1
  37. package/dist/components/textarea/textarea.js +5 -5
  38. package/dist/components/textfield/textfield.d.ts +1 -1
  39. package/dist/components/textfield/textfield.js +5 -5
  40. package/dist/components/title/title.d.ts +2 -2
  41. package/dist/components/title/title.js +2 -2
  42. package/dist/consumption.json +77 -0
  43. package/dist/core/styles/resolve-axis-padding.d.ts +1 -1
  44. package/dist/core/styles/resolve-axis-padding.js +1 -1
  45. package/dist/core/theme/resolve-theme-value.d.ts +1 -1
  46. package/dist/core/theme/resolve-theme-value.js +1 -1
  47. package/package.json +8 -8
  48. package/dist/guides/consumption.json +0 -44
  49. /package/dist/{avatar → components/avatar}/avatar.guide.json +0 -0
  50. /package/dist/{button → components/button}/button.guide.json +0 -0
  51. /package/dist/{clamp-text → components/clamp-text}/clamp-text.guide.json +0 -0
  52. /package/dist/{elevator → components/elevator}/elevator.guide.json +0 -0
  53. /package/dist/{icon → components/icon}/icon.guide.json +0 -0
  54. /package/dist/{icon-button → components/icon-button}/icon-button.guide.json +0 -0
  55. /package/dist/{select → components/select}/select.guide.json +0 -0
  56. /package/dist/{skeleton → components/skeleton}/skeleton.guide.json +0 -0
  57. /package/dist/{slider → components/slider}/slider.guide.json +0 -0
  58. /package/dist/{spinner → components/spinner}/spinner.guide.json +0 -0
  59. /package/dist/{stack → components/stack}/stack.guide.json +0 -0
  60. /package/dist/{surface → components/surface}/surface.guide.json +0 -0
  61. /package/dist/{switch → components/switch}/switch.guide.json +0 -0
  62. /package/dist/{text → components/text}/text.guide.json +0 -0
  63. /package/dist/{textarea → components/textarea}/textarea.guide.json +0 -0
  64. /package/dist/{textfield → components/textfield}/textfield.guide.json +0 -0
  65. /package/dist/{title → components/title}/title.guide.json +0 -0
  66. /package/dist/{guides/theme-surface.json → theme-surface.json} +0 -0
package/dist/catalog.json CHANGED
@@ -6,103 +6,103 @@
6
6
  "id": "avatar",
7
7
  "name": "Avatar",
8
8
  "summary": "Circular identity image or fallback for users, entities, or profile chips.",
9
- "guidePath": "./avatar/avatar.guide.json"
9
+ "guidePath": "./components/avatar/avatar.guide.json"
10
10
  },
11
11
  {
12
12
  "id": "clamp-text",
13
13
  "name": "ClampText",
14
14
  "summary": "Presentational utility that truncates overflowing copy to a fixed line count.",
15
- "guidePath": "./clamp-text/clamp-text.guide.json"
15
+ "guidePath": "./components/clamp-text/clamp-text.guide.json"
16
16
  },
17
17
  {
18
18
  "id": "elevator",
19
19
  "name": "Elevator",
20
20
  "summary": "No-DOM elevation utility that merges shadow hooks onto valid element children.",
21
- "guidePath": "./elevator/elevator.guide.json"
21
+ "guidePath": "./components/elevator/elevator.guide.json"
22
22
  },
23
23
  {
24
24
  "id": "button",
25
25
  "name": "Button",
26
26
  "summary": "Primary action control with size, variant, optional icon, and loading state.",
27
- "guidePath": "./button/button.guide.json"
27
+ "guidePath": "./components/button/button.guide.json"
28
28
  },
29
29
  {
30
30
  "id": "icon-button",
31
31
  "name": "IconButton",
32
32
  "summary": "Icon-only button that requires an accessible name through aria-label or aria-labelledby.",
33
- "guidePath": "./icon-button/icon-button.guide.json"
33
+ "guidePath": "./components/icon-button/icon-button.guide.json"
34
34
  },
35
35
  {
36
36
  "id": "textfield",
37
37
  "name": "Textfield",
38
38
  "summary": "Single-line field input with control-group chrome and optional addons.",
39
- "guidePath": "./textfield/textfield.guide.json"
39
+ "guidePath": "./components/textfield/textfield.guide.json"
40
40
  },
41
41
  {
42
42
  "id": "textarea",
43
43
  "name": "Textarea",
44
44
  "summary": "Multi-line field control with shared field copy and optional resize.",
45
- "guidePath": "./textarea/textarea.guide.json"
45
+ "guidePath": "./components/textarea/textarea.guide.json"
46
46
  },
47
47
  {
48
48
  "id": "slider",
49
49
  "name": "Slider",
50
50
  "summary": "Field-wrapped range input supporting single-thumb or two-thumb range selection.",
51
- "guidePath": "./slider/slider.guide.json"
51
+ "guidePath": "./components/slider/slider.guide.json"
52
52
  },
53
53
  {
54
54
  "id": "switch",
55
55
  "name": "Switch",
56
56
  "summary": "Field-wrapped toggle control with regular or small track and optional field copy.",
57
- "guidePath": "./switch/switch.guide.json"
57
+ "guidePath": "./components/switch/switch.guide.json"
58
58
  },
59
59
  {
60
60
  "id": "select",
61
61
  "name": "Select",
62
62
  "summary": "Field-wrapped single-select dropdown with grouped options and field copy.",
63
- "guidePath": "./select/select.guide.json"
63
+ "guidePath": "./components/select/select.guide.json"
64
64
  },
65
65
  {
66
66
  "id": "icon",
67
67
  "name": "Icon",
68
68
  "summary": "Decorative Vira SVG icon selected by name and variant.",
69
- "guidePath": "./icon/icon.guide.json"
69
+ "guidePath": "./components/icon/icon.guide.json"
70
70
  },
71
71
  {
72
72
  "id": "skeleton",
73
73
  "name": "Skeleton",
74
74
  "summary": "Decorative loading placeholder sized by props, not children.",
75
- "guidePath": "./skeleton/skeleton.guide.json"
75
+ "guidePath": "./components/skeleton/skeleton.guide.json"
76
76
  },
77
77
  {
78
78
  "id": "stack",
79
79
  "name": "Stack",
80
80
  "summary": "Flex layout primitive for arranging children with token spacing, alignment, and padding.",
81
- "guidePath": "./stack/stack.guide.json"
81
+ "guidePath": "./components/stack/stack.guide.json"
82
82
  },
83
83
  {
84
84
  "id": "surface",
85
85
  "name": "Surface",
86
86
  "summary": "Presentational container with token background, optional border, radius, and padding.",
87
- "guidePath": "./surface/surface.guide.json"
87
+ "guidePath": "./components/surface/surface.guide.json"
88
88
  },
89
89
  {
90
90
  "id": "spinner",
91
91
  "name": "Spinner",
92
92
  "summary": "Decorative SVG pulsing loading indicator used inside interactive components.",
93
- "guidePath": "./spinner/spinner.guide.json"
93
+ "guidePath": "./components/spinner/spinner.guide.json"
94
94
  },
95
95
  {
96
96
  "id": "text",
97
97
  "name": "Text",
98
98
  "summary": "Theme-aware body-copy primitive with tone, family, and responsive body sizing.",
99
- "guidePath": "./text/text.guide.json"
99
+ "guidePath": "./components/text/text.guide.json"
100
100
  },
101
101
  {
102
102
  "id": "title",
103
103
  "name": "Title",
104
104
  "summary": "Theme-aware heading and display typography primitive.",
105
- "guidePath": "./title/title.guide.json"
105
+ "guidePath": "./components/title/title.guide.json"
106
106
  }
107
107
  ],
108
108
  "consumption": "./consumption.json",
@@ -1,4 +1,4 @@
1
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
1
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
2
2
  import type * as React from 'react';
3
3
  import './avatar.css';
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Avatar as PrimitiveAvatar } from '@base-ui/react/avatar';
3
- import { Skeleton, Text } from '@react/src/components';
4
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
3
+ import { Skeleton, Text } from '..';
4
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
5
  import { clsx } from 'clsx';
6
6
  import './avatar.css';
7
7
  const fallbackTextSizeByAvatarSize = {
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Field } from '@base-ui/react/field';
4
- import { Text } from '@react/src/components/text';
4
+ import { Text } from '../text';
5
5
  /**
6
6
  * Renders field helper copy in the shared `Description` slot via `Field.Validity`.
7
7
  * Static `error` replaces `description` only while invalid and `error` is set.
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Stack } from '@react/src/components';
3
+ import { Stack } from '..';
4
4
  /**
5
5
  * Internal flex wrapper for a field control plus optional start/end addons.
6
6
  * Not exported from the package public surface.
@@ -1,7 +1,7 @@
1
1
  import { Button as PrimitiveButton } from '@base-ui/react/button';
2
2
  import './button.css';
3
3
  import type { ReactNode } from 'react';
4
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
5
  /**
6
6
  * Public Button props.
7
7
  *
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button as PrimitiveButton } from '@base-ui/react/button';
3
- import { Spinner } from '@react/src/components/spinner';
4
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
3
+ import { Spinner } from '../spinner';
4
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
5
  import { clsx } from 'clsx';
6
6
  import './button.css';
7
7
  const spinnerDimensionsBySize = {
@@ -1,7 +1,7 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
2
  import type * as React from 'react';
3
3
  import './clamp-text.css';
4
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
5
  /**
6
6
  * Public ClampText props.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
3
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
4
  import { clsx } from 'clsx';
5
5
  import { useMemo } from 'react';
6
6
  import './clamp-text.css';
@@ -1,9 +1,9 @@
1
1
  import type * as React from 'react';
2
- import type { ElevationDirection, ElevationLevel, ElevationShadowColor } from '@react/src/core/elevation/elevation-types';
3
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
- export type { ElevationDirection, ElevationLevel, ElevationShadowColor, } from '@react/src/core/elevation/elevation-types';
5
- export { ELEVATION_DEFAULTS } from '@react/src/core/elevation/elevation-types';
6
- export { getElevationProps } from '@react/src/core/elevation/get-elevation-props';
2
+ import type { ElevationDirection, ElevationLevel, ElevationShadowColor } from '../../core/elevation/elevation-types';
3
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
+ export type { ElevationDirection, ElevationLevel, ElevationShadowColor } from '../../core/elevation/elevation-types';
5
+ export { ELEVATION_DEFAULTS } from '../../core/elevation/elevation-types';
6
+ export { getElevationProps } from '../../core/elevation/get-elevation-props';
7
7
  /**
8
8
  * Public Elevator props.
9
9
  *
@@ -1,8 +1,8 @@
1
1
  import { Children, cloneElement, isValidElement } from 'react';
2
- import { getElevationProps } from '@react/src/core/elevation/get-elevation-props';
3
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
- export { ELEVATION_DEFAULTS } from '@react/src/core/elevation/elevation-types';
5
- export { getElevationProps } from '@react/src/core/elevation/get-elevation-props';
2
+ import { getElevationProps } from '../../core/elevation/get-elevation-props';
3
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
+ export { ELEVATION_DEFAULTS } from '../../core/elevation/elevation-types';
5
+ export { getElevationProps } from '../../core/elevation/get-elevation-props';
6
6
  const mergeChildStyle = (childStyle, elevationStyle) => ({
7
7
  ...(childStyle ?? {}),
8
8
  ...elevationStyle,
@@ -1,6 +1,6 @@
1
1
  import type { GeneratedIconName, GeneratedIconVariant } from '#internal-icons/icon-registry';
2
2
  import './icon.css';
3
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
3
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
4
  export type IconName = GeneratedIconName;
5
5
  export type IconVariant = GeneratedIconVariant;
6
6
  export type IconProps = React.ComponentProps<'svg'> & IntrinsicViraProps & {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { generatedDefaultIconVariant, generatedIconRegistry } from '#internal-icons/icon-registry';
3
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
3
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
4
  import { clsx } from 'clsx';
5
5
  import './icon.css';
6
6
  export const Icon = ({ className, name, size = 24, variant = generatedDefaultIconVariant, ...otherProps }) => {
@@ -1,4 +1,4 @@
1
- import type { ButtonProps } from '@react/src/components';
1
+ import type { ButtonProps } from '..';
2
2
  import type { ReactNode } from 'react';
3
3
  type AccessibleNameProps = {
4
4
  'aria-label': string;
@@ -1,3 +1,3 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Button } from '@react/src/components/button/button';
2
+ import { Button } from '../button/button';
3
3
  export const IconButton = ({ icon, size = 'medium', ...props }) => (_jsx(Button, { icon: icon, size: size, ...props }));
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Select as PrimitiveSelect } from '@base-ui/react/select';
4
- import { Stack } from '@react/src/components/stack';
5
- import { Text } from '@react/src/components/text';
4
+ import { Stack } from '../stack';
5
+ import { Text } from '../text';
6
6
  import { clsx } from 'clsx';
7
7
  import { SelectIndicatorSlot } from './select-indicator-slot';
8
8
  export function SelectGroup({ children, className, label, ...groupProps }) {
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Select as PrimitiveSelect } from '@base-ui/react/select';
4
- import { Stack } from '@react/src/components/stack';
4
+ import { Stack } from '../stack';
5
5
  const indicatorStackRender = _jsx(Stack, { fillChildren: false, hAlign: "center", inline: true, shrink: false, vAlign: "center" });
6
6
  export function SelectIndicatorSlot({ children, interactive = false }) {
7
7
  if (interactive) {
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Select as PrimitiveSelect } from '@base-ui/react/select';
4
- import { Icon } from '@react/src/components/icon';
5
- import { Stack } from '@react/src/components/stack';
6
- import { Text } from '@react/src/components/text';
4
+ import { Icon } from '../icon';
5
+ import { Stack } from '../stack';
6
+ import { Text } from '../text';
7
7
  import { clsx } from 'clsx';
8
8
  import { SelectIndicatorSlot } from './select-indicator-slot';
9
9
  export function SelectOption({ children, className, disabled, indicator, label, value, ...itemProps }) {
@@ -1,7 +1,7 @@
1
1
  import type { FieldRoot } from '@base-ui/react/field';
2
2
  import type { SelectRoot } from '@base-ui/react/select';
3
3
  import type * as React from 'react';
4
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
5
  import { SelectGroup } from './select-group';
6
6
  import { SelectOption } from './select-option';
7
7
  import { SelectSeparator } from './select-separator';
@@ -2,10 +2,10 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Field } from '@base-ui/react/field';
4
4
  import { Select as PrimitiveSelect } from '@base-ui/react/select';
5
- import { Elevator, Icon, Stack, Surface, Text } from '@react/src/components';
6
- import { FieldHelperCopy } from '@react/src/components/basic-input/field-helper-copy';
7
- import { IconButton } from '@react/src/components/icon-button';
8
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
+ import { Elevator, Icon, Stack, Surface, Text } from '..';
6
+ import { FieldHelperCopy } from '../basic-input/field-helper-copy';
7
+ import { IconButton } from '../icon-button';
8
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
9
9
  import { clsx } from 'clsx';
10
10
  import { useId } from 'react';
11
11
  import { SelectGroup } from './select-group';
@@ -1,5 +1,5 @@
1
- import type { ThemeTypes } from '@foundation/platforms/web/vira/types';
2
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
1
+ import type { ThemeTypes } from '@viraui/foundation/vira/types';
2
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
3
  import type * as React from 'react';
4
4
  import './skeleton.css';
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
3
- import { resolveThemeValue } from '@react/src/core/theme/resolve-theme-value';
2
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
+ import { resolveThemeValue } from '../../core/theme/resolve-theme-value';
4
4
  import clsx from 'clsx';
5
5
  import './skeleton.css';
6
6
  export const Skeleton = ({ className, height, minHeight, minWidth, radius, ref, style, width, ...otherProps }) => {
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Slider as PrimitiveSlider } from '@base-ui/react/slider';
4
- import { Stack } from '@react/src/components/stack';
4
+ import { Stack } from '../stack';
5
5
  import './slider-control.css';
6
6
  function resolveThumbAriaLabels(thumbAriaLabel, isRange) {
7
7
  if (thumbAriaLabel === undefined) {
@@ -1,6 +1,6 @@
1
1
  import type { FieldRoot } from '@base-ui/react/field';
2
2
  import type { SliderRoot } from '@base-ui/react/slider';
3
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
3
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
4
  import type * as React from 'react';
5
5
  import './slider-control.css';
6
6
  import './slider.css';
@@ -2,10 +2,10 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Field } from '@base-ui/react/field';
4
4
  import { Slider as PrimitiveSlider } from '@base-ui/react/slider';
5
- import { FieldHelperCopy } from '@react/src/components/basic-input/field-helper-copy';
6
- import { Stack } from '@react/src/components/stack';
7
- import { Text } from '@react/src/components/text';
8
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
+ import { FieldHelperCopy } from '../basic-input/field-helper-copy';
6
+ import { Stack } from '../stack';
7
+ import { Text } from '../text';
8
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
9
9
  import { clsx } from 'clsx';
10
10
  import { SliderControl } from './slider-control';
11
11
  import './slider-control.css';
@@ -1,5 +1,5 @@
1
1
  import './spinner.css';
2
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
2
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
3
  export type SpinnerProps = Omit<React.ComponentProps<'svg'>, 'color'> & IntrinsicViraProps & {
4
4
  /**
5
5
  * Sets the rendered spinner size.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
2
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
3
3
  import clsx from 'clsx';
4
4
  import './spinner.css';
5
5
  export const Spinner = ({ className, color, size = 'big', ref, style, ...otherProps }) => {
@@ -1,8 +1,8 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
- import type { ThemeTypes } from '@foundation/platforms/web/vira/types';
2
+ import type { ThemeTypes } from '@viraui/foundation/vira/types';
3
3
  import type * as React from 'react';
4
4
  import './stack.css';
5
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
6
6
  type StackAlignment = 'start' | 'center' | 'end' | 'stretch' | 'initial' | 'space-between' | 'space-around' | 'space-evenly';
7
7
  type StackSpace = ThemeTypes['space'];
8
8
  type StackAxisPadding = StackSpace | [StackSpace | 0, StackSpace | 0];
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import { resolveAxisPadding } from '@react/src/core/styles/resolve-axis-padding';
4
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
- import { resolveThemeValue } from '@react/src/core/theme/resolve-theme-value';
3
+ import { resolveAxisPadding } from '../../core/styles/resolve-axis-padding';
4
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
+ import { resolveThemeValue } from '../../core/theme/resolve-theme-value';
6
6
  import { clsx } from 'clsx';
7
7
  import './stack.css';
8
8
  export const Stack = ({ className, direction = 'column', fillChildren = true, hAlign = 'initial', hPadding, inline = false, maxWidth, minWidth, ref, render, rowGap, columnGap, style, vAlign = 'initial', vPadding, wrap = false, ...otherProps }) => {
@@ -1,8 +1,8 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
- import type { ThemeTypes } from '@foundation/platforms/web/vira/types';
2
+ import type { ThemeTypes } from '@viraui/foundation/vira/types';
3
3
  import type * as React from 'react';
4
4
  import './surface.css';
5
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
6
6
  /** Base ramp layer for nested surfaces; clamped to 1–3 at runtime. */
7
7
  type SurfaceBaseLevel = 1 | 2 | 3;
8
8
  type SurfaceColor = string | SurfaceBaseLevel;
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
- import { resolveAxisPadding } from '@react/src/core/styles/resolve-axis-padding';
5
- import { resolveThemeValue } from '@react/src/core/theme/resolve-theme-value';
3
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
+ import { resolveAxisPadding } from '../../core/styles/resolve-axis-padding';
5
+ import { resolveThemeValue } from '../../core/theme/resolve-theme-value';
6
6
  import { clsx } from 'clsx';
7
7
  import './surface.css';
8
8
  const clampSurfaceBaseLevel = (value) => {
@@ -1,7 +1,7 @@
1
1
  import type { FieldRoot } from '@base-ui/react/field';
2
2
  import type { SwitchRoot } from '@base-ui/react/switch';
3
3
  import type * as React from 'react';
4
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
5
  import './switch.css';
6
6
  /**
7
7
  * Public Switch props.
@@ -2,10 +2,10 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Field } from '@base-ui/react/field';
4
4
  import { Switch as PrimitiveSwitch } from '@base-ui/react/switch';
5
- import { FieldHelperCopy } from '@react/src/components/basic-input/field-helper-copy';
6
- import { Stack } from '@react/src/components/stack';
7
- import { Text } from '@react/src/components/text';
8
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
+ import { FieldHelperCopy } from '../basic-input/field-helper-copy';
6
+ import { Stack } from '../stack';
7
+ import { Text } from '../text';
8
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
9
9
  import { clsx } from 'clsx';
10
10
  import './switch.css';
11
11
  export const Switch = ({ className, description, dirty, disabled, error, invalid, label, name, ref, size = 'small', touched, validate, validationDebounceTime, validationMode, ...switchRootProps }) => {
@@ -1,6 +1,6 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
- import type { ThemeTypes } from '@foundation/platforms/web/vira/types';
3
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
2
+ import type { ThemeTypes } from '@viraui/foundation/vira/types';
3
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
4
  import type * as React from 'react';
5
5
  import './text.css';
6
6
  type TextSpace = ThemeTypes['space'];
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
- import { resolveAxisPadding } from '@react/src/core/styles/resolve-axis-padding';
3
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
+ import { resolveAxisPadding } from '../../core/styles/resolve-axis-padding';
5
5
  import { clsx } from 'clsx';
6
6
  import './text.css';
7
7
  export const Text = ({ align = 'start', balanced = false, className, color, family = 'body', fontWidth, hPadding, lineHeight = 'standard', maxWidth, opticalSize, ref, render, size = 'medium', style, tone, trim, trimType = 'cap alphabetic', vPadding, weight = 'regular', whiteSpace = 'normal', ...otherProps }) => {
@@ -1,7 +1,7 @@
1
1
  import type { FieldRoot } from '@base-ui/react/field';
2
2
  import type * as React from 'react';
3
3
  import './textarea.css';
4
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
5
5
  /**
6
6
  * Public Textarea props.
7
7
  *
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Field } from '@base-ui/react/field';
4
- import { BasicInput } from '@react/src/components/basic-input';
5
- import { FieldHelperCopy } from '@react/src/components/basic-input/field-helper-copy';
6
- import { Stack } from '@react/src/components/stack';
7
- import { Text } from '@react/src/components/text';
8
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
+ import { BasicInput } from '../basic-input';
5
+ import { FieldHelperCopy } from '../basic-input/field-helper-copy';
6
+ import { Stack } from '../stack';
7
+ import { Text } from '../text';
8
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
9
9
  import './textarea.css';
10
10
  export const Textarea = ({ className, description, dirty, disabled, error, invalid, label, name, ref, resize, touched, validate, validationDebounceTime, validationMode, ...textareaProps }) => {
11
11
  const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(textareaProps);
@@ -2,7 +2,7 @@ import type { FieldRoot } from '@base-ui/react/field';
2
2
  import { Input as PrimitiveInput } from '@base-ui/react/input';
3
3
  import type * as React from 'react';
4
4
  import './textfield.css';
5
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
6
6
  /**
7
7
  * Public Textfield props.
8
8
  *
@@ -2,11 +2,11 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Field } from '@base-ui/react/field';
4
4
  import { Input as PrimitiveInput } from '@base-ui/react/input';
5
- import { Stack, Text } from '@react/src/components';
6
- import { BasicInput } from '@react/src/components/basic-input';
7
- import { FieldHelperCopy } from '@react/src/components/basic-input/field-helper-copy';
8
- import { InputControlGroup } from '@react/src/components/basic-input/input-control-group';
9
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
+ import { Stack, Text } from '..';
6
+ import { BasicInput } from '../basic-input';
7
+ import { FieldHelperCopy } from '../basic-input/field-helper-copy';
8
+ import { InputControlGroup } from '../basic-input/input-control-group';
9
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
10
10
  import './textfield.css';
11
11
  export const Textfield = ({ className, description, dirty, disabled, endAddon, error, invalid, label, name, ref, startAddon, touched, validate, validationDebounceTime, validationMode, ...inputProps }) => {
12
12
  const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(inputProps);
@@ -1,8 +1,8 @@
1
1
  import { useRender } from '@base-ui/react/use-render';
2
- import type { ThemeTypes } from '@foundation/platforms/web/vira/types';
2
+ import type { ThemeTypes } from '@viraui/foundation/vira/types';
3
3
  import type * as React from 'react';
4
4
  import './title.css';
5
- import type { IntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
5
+ import type { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
6
6
  type TitleSpace = ThemeTypes['space'];
7
7
  type TitleAxisPadding = TitleSpace | [TitleSpace | 0, TitleSpace | 0];
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import { extractIntrinsicViraProps } from '@react/src/core/props/intrinsic-vira-props';
4
- import { resolveAxisPadding } from '@react/src/core/styles/resolve-axis-padding';
3
+ import { extractIntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
4
+ import { resolveAxisPadding } from '../../core/styles/resolve-axis-padding';
5
5
  import { clsx } from 'clsx';
6
6
  import './title.css';
7
7
  export const Title = ({ align = 'start', balanced = false, className, color, fontWidth, hPadding, level = 'h1', lineHeight = 'standard', maxWidth, opticalSize, ref, render, style, trim = 'both', trimType = 'cap alphabetic', vPadding, weight, whiteSpace = 'normal', ...otherProps }) => {
@@ -0,0 +1,77 @@
1
+ {
2
+ "summary": "Minimal bootstrap for external apps consuming @viraui/react.",
3
+ "requiredPackages": {
4
+ "@viraui/react": "Public components, preflight CSS, and usage guides.",
5
+ "react": "Peer dependency.",
6
+ "react-dom": "Peer dependency.",
7
+ "@base-ui/react": "Peer dependency for wrapped primitives."
8
+ },
9
+ "optionalPackages": {
10
+ "@viraui/foundation": "Preset Vira brand theme CSS, ThemeTypes, and JSON only.",
11
+ "@viraui/icons": "ViraUI icons assets when not using Icon from @viraui/react."
12
+ },
13
+ "importOrder": [
14
+ "Compatible theme CSS (preset @viraui/foundation/vira.css, custom theme CSS, or future theme-builder export)",
15
+ "Consumer font CSS or @font-face rules matching theme font-family strings (for example @fontsource-variable packages)",
16
+ "@viraui/react/preflight.css"
17
+ ],
18
+ "importMechanism": {
19
+ "rule": "Load theme CSS, font CSS, and preflight through JavaScript side-effect imports in the app root entry module.",
20
+ "forbidden": "Do not bootstrap Vira theme, font, or preflight CSS with CSS @import in a global stylesheet."
21
+ },
22
+ "nextJsAppRouter": {
23
+ "mandatory": true,
24
+ "rule": "In Next.js App Router apps, import theme CSS, font CSS, and @viraui/react/preflight.css as JavaScript side-effect imports in root app/layout.tsx; never bootstrap them with CSS @import in globals.css.",
25
+ "entryModule": "app/layout.tsx",
26
+ "importOrder": [
27
+ "Compatible theme CSS (preset @viraui/foundation/vira.css, custom theme CSS, or future theme-builder export)",
28
+ "Consumer font CSS or @fontsource-variable packages matching theme font-family strings",
29
+ "@viraui/react/preflight.css"
30
+ ],
31
+ "requiredImports": [
32
+ "import '@viraui/foundation/vira.css'",
33
+ "import '@fontsource-variable/geist/wght.css'",
34
+ "import '@fontsource-variable/geist-mono/wght.css'",
35
+ "import '@viraui/react/preflight.css'"
36
+ ],
37
+ "forbidden": {
38
+ "location": "app/globals.css",
39
+ "mechanism": "CSS @import",
40
+ "targets": ["@viraui/foundation/*", "@viraui/react/preflight.css", "@fontsource-variable/*"]
41
+ },
42
+ "globalsCssScope": "App-owned global styles only; no @viraui/* or font-package @import",
43
+ "layoutExample": [
44
+ "import '@viraui/foundation/vira.css';",
45
+ "import '@fontsource-variable/geist/wght.css';",
46
+ "import '@fontsource-variable/geist-mono/wght.css';",
47
+ "import '@viraui/react/preflight.css';",
48
+ "import './globals.css';"
49
+ ]
50
+ },
51
+ "themePaths": [
52
+ {
53
+ "id": "preset-vira",
54
+ "label": "Preset Vira brand",
55
+ "foundation": true,
56
+ "themeCss": "@viraui/foundation/vira.css"
57
+ },
58
+ {
59
+ "id": "custom",
60
+ "label": "Consumer custom theme",
61
+ "foundation": false,
62
+ "themeCss": "Consumer-authored CSS with public semantic variables"
63
+ },
64
+ {
65
+ "id": "theme-builder",
66
+ "label": "Future theme builder export",
67
+ "foundation": false,
68
+ "themeCss": "Exported theme CSS from a Vira theme builder"
69
+ }
70
+ ],
71
+ "discovery": {
72
+ "catalog": "@viraui/react/catalog.json",
73
+ "consumption": "@viraui/react/consumption.json",
74
+ "themeSurface": "@viraui/react/theme-surface.json",
75
+ "componentGuide": "@viraui/react/<component>.guide.json"
76
+ }
77
+ }
@@ -1,4 +1,4 @@
1
- import type { ThemeTypes } from '@foundation/platforms/web/vira/types';
1
+ import type { ThemeTypes } from '@viraui/foundation/vira/types';
2
2
  import type * as React from 'react';
3
3
  type AxisPadding = ThemeTypes['space'] | [ThemeTypes['space'] | 0, ThemeTypes['space'] | 0];
4
4
  export declare const resolveAxisPadding: (value: AxisPadding | undefined, startKey: string, endKey: string) => React.CSSProperties;
@@ -1,4 +1,4 @@
1
- import { resolveThemeValue } from '@react/src/core/theme/resolve-theme-value';
1
+ import { resolveThemeValue } from '../theme/resolve-theme-value';
2
2
  export const resolveAxisPadding = (value, startKey, endKey) => {
3
3
  if (!value) {
4
4
  return {};
@@ -1,4 +1,4 @@
1
- import theme from '@foundation/platforms/web/vira/vira-nested.json';
1
+ import theme from '@viraui/foundation/vira/nested';
2
2
  type ThemeTree = typeof theme;
3
3
  type ThemeKey = keyof ThemeTree;
4
4
  export declare const resolveThemeValue: <TKey extends ThemeKey, TValue extends keyof ThemeTree[TKey], TFallback>(key: TValue | null | undefined | 0, themeKey: TKey, fallbackValue: TFallback) => ThemeTree[TKey][TValue] | TFallback;
@@ -1,4 +1,4 @@
1
- import theme from '@foundation/platforms/web/vira/vira-nested.json';
1
+ import theme from '@viraui/foundation/vira/nested';
2
2
  export const resolveThemeValue = (key, themeKey, fallbackValue) => {
3
3
  if (!key) {
4
4
  return fallbackValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viraui/react",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"
@@ -24,8 +24,8 @@
24
24
  "./catalog.json": "./dist/catalog.json",
25
25
  "./consumption.json": "./dist/consumption.json",
26
26
  "./theme-surface.json": "./dist/theme-surface.json",
27
- "./*.css": "./dist/*/*.css",
28
- "./*.guide.json": "./dist/*/*.guide.json"
27
+ "./*.css": "./dist/components/*/*.css",
28
+ "./*.guide.json": "./dist/components/*/*.guide.json"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public",
@@ -40,10 +40,10 @@
40
40
  "react": ">=19.2.7",
41
41
  "react-dom": ">=19.2.7",
42
42
  "svger-cli": "4.0.8",
43
- "@viraui/foundation": "0.0.8",
44
- "@viraui/icons": "0.0.8",
45
- "@viraui/postcss-config": "0.0.8",
46
- "@viraui/tsconfig": "0.0.8"
43
+ "@viraui/foundation": "0.0.10",
44
+ "@viraui/icons": "0.0.10",
45
+ "@viraui/postcss-config": "0.0.10",
46
+ "@viraui/tsconfig": "0.0.10"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@base-ui/react": ">=1.5.0",
@@ -56,7 +56,7 @@
56
56
  "build:css": "run-s build:css:components build:css:preflight build:css:guides",
57
57
  "build:css:components": "copyfiles -u 1 \"src/components/**/*.css\" dist",
58
58
  "build:css:preflight": "postcss src/preflight.css --output dist/preflight.css",
59
- "build:css:guides": "copyfiles -u 2 \"src/components/**/*.guide.json\" dist && copyfiles -u 1 \"src/guides/*.json\" dist",
59
+ "build:css:guides": "copyfiles -u 1 \"src/components/**/*.guide.json\" dist && copyfiles -u 2 \"src/guides/*.json\" dist",
60
60
  "build:catalog": "node --import tsx src/build-catalog.ts",
61
61
  "build:icons": "node --import tsx src/build-icons.ts",
62
62
  "build:types": "tsc -p tsconfig.json"
@@ -1,44 +0,0 @@
1
- {
2
- "summary": "Minimal bootstrap for external apps consuming @viraui/react.",
3
- "requiredPackages": {
4
- "@viraui/react": "Public components, preflight CSS, and usage guides.",
5
- "react": "Peer dependency.",
6
- "react-dom": "Peer dependency.",
7
- "@base-ui/react": "Peer dependency for wrapped primitives."
8
- },
9
- "optionalPackages": {
10
- "@viraui/foundation": "Preset Vira brand theme CSS, ThemeTypes, and JSON only.",
11
- "@viraui/icons": "ViraUI icons assets when not using Icon from @viraui/react."
12
- },
13
- "importOrder": [
14
- "@viraui/react/preflight.css",
15
- "Compatible theme CSS (preset @viraui/foundation/vira/css, custom theme CSS, or future theme-builder export)",
16
- "Consumer @font-face rules matching theme font-family strings or import from fontsource packages"
17
- ],
18
- "themePaths": [
19
- {
20
- "id": "preset-vira",
21
- "label": "Preset Vira brand",
22
- "foundation": true,
23
- "themeCss": "@viraui/foundation/vira/css"
24
- },
25
- {
26
- "id": "custom",
27
- "label": "Consumer custom theme",
28
- "foundation": false,
29
- "themeCss": "Consumer-authored CSS with public semantic variables"
30
- },
31
- {
32
- "id": "theme-builder",
33
- "label": "Future theme builder export",
34
- "foundation": false,
35
- "themeCss": "Exported theme CSS from a Vira theme builder"
36
- }
37
- ],
38
- "discovery": {
39
- "catalog": "@viraui/react/catalog.json",
40
- "consumption": "@viraui/react/consumption.json",
41
- "themeSurface": "@viraui/react/theme-surface.json",
42
- "componentGuide": "@viraui/react/<component>.guide.json"
43
- }
44
- }
File without changes
File without changes