@viraui/react 0.0.24 → 0.0.26
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.
- package/dist/catalog.json +44 -2
- package/dist/components/accordion/accordion-item.d.ts +58 -0
- package/dist/components/accordion/accordion-item.js +65 -0
- package/dist/components/accordion/accordion.css +1 -0
- package/dist/components/accordion/accordion.d.ts +26 -0
- package/dist/components/accordion/accordion.guide.json +30 -0
- package/dist/components/accordion/accordion.js +22 -0
- package/dist/components/accordion/accordion.module.js +10 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/avatar/avatar.css +1 -1
- package/dist/components/avatar/avatar.guide.json +25 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar-group/avatar-group.css +7 -1
- package/dist/components/avatar-group/avatar-group.d.ts +0 -7
- package/dist/components/avatar-group/avatar-group.guide.json +27 -1
- package/dist/components/avatar-group/avatar-group.js +3 -10
- package/dist/components/basic-input/basic-input.css +1 -1
- package/dist/components/basic-input/basic-input.js +3 -3
- package/dist/components/basic-input/field-label.css +1 -1
- package/dist/components/bleed/bleed.css +1 -0
- package/dist/components/bleed/bleed.d.ts +26 -0
- package/dist/components/bleed/bleed.guide.json +39 -0
- package/dist/components/bleed/bleed.js +24 -0
- package/dist/components/bleed/bleed.module.js +3 -0
- package/dist/components/bleed/index.d.ts +2 -0
- package/dist/components/button/button.css +1 -1
- package/dist/components/button/button.guide.json +33 -3
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox-group.js +2 -2
- package/dist/components/checkbox/checkbox.css +1 -1
- package/dist/components/chip/chip.css +1 -1
- package/dist/components/chip/chip.guide.json +26 -1
- package/dist/components/clamp-text/clamp-text.css +1 -1
- package/dist/components/clamp-text/clamp-text.guide.json +15 -1
- package/dist/components/clamp-text/clamp-text.js +1 -1
- package/dist/components/dialog/dialog-close.js +2 -2
- package/dist/components/dialog/dialog-indent-background.js +2 -2
- package/dist/components/dialog/dialog-indent.js +2 -2
- package/dist/components/dialog/dialog-sheet.js +1 -1
- package/dist/components/dialog/dialog-trigger.js +2 -2
- package/dist/components/dialog/dialog.css +1 -1
- package/dist/components/dialog/dialog.d.ts +5 -4
- package/dist/components/dialog/dialog.guide.json +15 -1
- package/dist/components/dialog/dialog.js +4 -3
- package/dist/components/fieldset/fieldset.js +1 -2
- package/dist/components/icon-button/icon-button.js +2 -2
- package/dist/components/index.d.ts +7 -0
- package/dist/components/linear-progress/linear-progress.css +1 -1
- package/dist/components/linear-progress/linear-progress.guide.json +14 -1
- package/dist/components/masonry/masonry.css +1 -1
- package/dist/components/masonry/masonry.guide.json +42 -1
- package/dist/components/masonry/masonry.js +3 -3
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/meter.css +1 -0
- package/dist/components/meter/meter.d.ts +44 -0
- package/dist/components/meter/meter.guide.json +39 -0
- package/dist/components/meter/meter.js +59 -0
- package/dist/components/meter/meter.module.js +7 -0
- package/dist/components/popover/index.d.ts +4 -0
- package/dist/components/popover/popover-sheet.d.ts +65 -0
- package/dist/components/popover/popover-sheet.js +79 -0
- package/dist/components/popover/popover.css +1 -0
- package/dist/components/popover/popover.d.ts +74 -0
- package/dist/components/popover/popover.guide.json +28 -0
- package/dist/components/popover/popover.js +23 -0
- package/dist/components/popover/popover.module.js +8 -0
- package/dist/components/progressive-blur/progressive-blur.css +1 -1
- package/dist/components/progressive-blur/progressive-blur.guide.json +15 -1
- package/dist/components/progressive-blur/progressive-blur.js +1 -1
- package/dist/components/radio/radio-group.d.ts +1 -1
- package/dist/components/radio/radio-group.js +2 -2
- package/dist/components/radio/radio.css +1 -1
- package/dist/components/select/select-option.js +1 -1
- package/dist/components/select/select.css +1 -1
- package/dist/components/select/select.guide.json +26 -1
- package/dist/components/select/select.js +1 -0
- package/dist/components/separator/separator.css +1 -1
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/shimmer/index.d.ts +2 -0
- package/dist/components/shimmer/shimmer.css +1 -0
- package/dist/components/shimmer/shimmer.d.ts +43 -0
- package/dist/components/shimmer/shimmer.guide.json +63 -0
- package/dist/components/shimmer/shimmer.js +25 -0
- package/dist/components/shimmer/shimmer.module.js +6 -0
- package/dist/components/skeleton/skeleton.css +1 -1
- package/dist/components/skeleton/skeleton.guide.json +50 -1
- package/dist/components/skeleton/skeleton.js +5 -5
- package/dist/components/slider/slider.css +1 -1
- package/dist/components/slider/slider.guide.json +20 -1
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/spinner/spinner.guide.json +15 -1
- package/dist/components/stack/stack.css +1 -1
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/stack/stack.guide.json +84 -4
- package/dist/components/stack/stack.js +8 -8
- package/dist/components/surface/surface-radius-context.js +6 -6
- package/dist/components/surface/surface.css +1 -1
- package/dist/components/surface/surface.d.ts +1 -1
- package/dist/components/surface/surface.guide.json +90 -4
- package/dist/components/surface/surface.js +8 -8
- package/dist/components/switch/switch.css +1 -1
- package/dist/components/switch/switch.guide.json +32 -1
- package/dist/components/tabs/tabs-indicator.js +2 -2
- package/dist/components/tabs/tabs-list.js +2 -2
- package/dist/components/tabs/tabs-panel.js +2 -2
- package/dist/components/tabs/tabs-tab.js +2 -2
- package/dist/components/tabs/tabs-viewport.js +2 -2
- package/dist/components/tabs/tabs.css +1 -1
- package/dist/components/tabs/tabs.guide.json +8 -1
- package/dist/components/tabs/tabs.js +2 -2
- package/dist/components/text/text.css +1 -1
- package/dist/components/text/text.guide.json +125 -1
- package/dist/components/text/text.js +11 -11
- package/dist/components/textarea/textarea.css +1 -1
- package/dist/components/textarea/textarea.guide.json +14 -1
- package/dist/components/textfield/textfield.css +1 -1
- package/dist/components/textfield/textfield.guide.json +20 -1
- package/dist/components/title/title.css +1 -1
- package/dist/components/title/title.guide.json +123 -1
- package/dist/components/title/title.js +11 -11
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/toast-action.d.ts +9 -0
- package/dist/components/toast/toast-action.js +10 -0
- package/dist/components/toast/toast-banner.d.ts +59 -0
- package/dist/components/toast/toast-banner.js +66 -0
- package/dist/components/toast/toast-viewport.d.ts +17 -0
- package/dist/components/toast/toast-viewport.js +12 -0
- package/dist/components/toast/toast.css +1 -0
- package/dist/components/toast/toast.d.ts +18 -0
- package/dist/components/toast/toast.guide.json +26 -0
- package/dist/components/toast/toast.js +22 -0
- package/dist/components/toast/toast.module.js +7 -0
- package/dist/core/props/intrinsic-vira-props.js +3 -3
- package/dist/index.js +8 -1
- package/dist/preflight-surface.json +17 -4
- package/dist/preflight.css +1 -1
- package/package.json +13 -5
|
@@ -19,5 +19,36 @@
|
|
|
19
19
|
"Rendering a switch without label and without aria-label",
|
|
20
20
|
"Expecting description to stay visible when invalid without an error message"
|
|
21
21
|
],
|
|
22
|
-
"related": ["Textfield", "Stack", "Text"]
|
|
22
|
+
"related": ["Textfield", "Stack", "Text"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"react": {
|
|
25
|
+
"size": {
|
|
26
|
+
"description": "Controls the visual switch size.",
|
|
27
|
+
"refCss": "track-block-size"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"css": {
|
|
31
|
+
"track-block-size": {
|
|
32
|
+
"description": "Switch track block size; size presets adjust track and thumb.",
|
|
33
|
+
"refReact": "size"
|
|
34
|
+
},
|
|
35
|
+
"track-radius": {
|
|
36
|
+
"description": "Switch track corner radius.",
|
|
37
|
+
"refReact": "size"
|
|
38
|
+
},
|
|
39
|
+
"thumb-size": {
|
|
40
|
+
"description": "Switch thumb size derived from track block size.",
|
|
41
|
+
"refReact": "size"
|
|
42
|
+
},
|
|
43
|
+
"track-background": {
|
|
44
|
+
"description": "Switch track background color."
|
|
45
|
+
},
|
|
46
|
+
"thumb-background": {
|
|
47
|
+
"description": "Switch thumb background color."
|
|
48
|
+
},
|
|
49
|
+
"thumb-inset": {
|
|
50
|
+
"description": "Inset between thumb and track edges."
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
23
54
|
}
|
|
@@ -3,14 +3,14 @@ import tabs_module_default from "./tabs.module.js";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Tabs } from "@base-ui/react/tabs";
|
|
5
5
|
//#region src/components/tabs/tabs-indicator.tsx
|
|
6
|
-
var TabsIndicator = ({ className, ref, ...
|
|
6
|
+
var TabsIndicator = ({ className, ref, ...otherProps }) => /* @__PURE__ */ jsx(Tabs.Indicator, {
|
|
7
7
|
render: /* @__PURE__ */ jsx(Surface, {
|
|
8
8
|
border: "all",
|
|
9
9
|
radius: "auto",
|
|
10
10
|
color: 3
|
|
11
11
|
}),
|
|
12
12
|
className: tabs_module_default.Indicator,
|
|
13
|
-
...
|
|
13
|
+
...otherProps
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
16
16
|
export { TabsIndicator };
|
|
@@ -6,7 +6,7 @@ import { TabsIndicator } from "./tabs-indicator.js";
|
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Tabs } from "@base-ui/react/tabs";
|
|
8
8
|
//#region src/components/tabs/tabs-list.tsx
|
|
9
|
-
var TabsList = ({ children, className, activateOnFocus = true, ref, ...
|
|
9
|
+
var TabsList = ({ children, className, activateOnFocus = true, ref, ...otherProps }) => /* @__PURE__ */ jsx(Tabs.List, {
|
|
10
10
|
className: clsx(tabs_module_default.List, className),
|
|
11
11
|
activateOnFocus,
|
|
12
12
|
render: /* @__PURE__ */ jsx(Surface, {
|
|
@@ -16,7 +16,7 @@ var TabsList = ({ children, className, activateOnFocus = true, ref, ...props })
|
|
|
16
16
|
radius: "medium",
|
|
17
17
|
vPadding: "2x-small"
|
|
18
18
|
}),
|
|
19
|
-
...
|
|
19
|
+
...otherProps,
|
|
20
20
|
children: /* @__PURE__ */ jsxs(Stack, {
|
|
21
21
|
direction: "row",
|
|
22
22
|
columnGap: "small",
|
|
@@ -3,10 +3,10 @@ import tabs_module_default from "./tabs.module.js";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Tabs } from "@base-ui/react/tabs";
|
|
5
5
|
//#region src/components/tabs/tabs-panel.tsx
|
|
6
|
-
var TabsPanel = ({ children, className, ref, ...
|
|
6
|
+
var TabsPanel = ({ children, className, ref, ...otherProps }) => /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
7
7
|
ref,
|
|
8
8
|
className: clsx(tabs_module_default.Panel, className),
|
|
9
|
-
...
|
|
9
|
+
...otherProps,
|
|
10
10
|
children
|
|
11
11
|
});
|
|
12
12
|
//#endregion
|
|
@@ -5,14 +5,14 @@ import tabs_module_default from "./tabs.module.js";
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { Tabs } from "@base-ui/react/tabs";
|
|
7
7
|
//#region src/components/tabs/tabs-tab.tsx
|
|
8
|
-
var TabsTab = ({ addon, addonPosition = "start", children, className, ...
|
|
8
|
+
var TabsTab = ({ addon, addonPosition = "start", children, className, ...otherProps }) => /* @__PURE__ */ jsx(Tabs.Tab, {
|
|
9
9
|
render: /* @__PURE__ */ jsx(Button, {
|
|
10
10
|
variant: "flat",
|
|
11
11
|
addon,
|
|
12
12
|
addonPosition,
|
|
13
13
|
className: clsx(tabs_module_default.Item, className)
|
|
14
14
|
}),
|
|
15
|
-
...
|
|
15
|
+
...otherProps,
|
|
16
16
|
children: /* @__PURE__ */ jsx(Text, {
|
|
17
17
|
tone: "muted",
|
|
18
18
|
whiteSpace: "nowrap",
|
|
@@ -2,9 +2,9 @@ import { clsx } from "../../core/clsx.js";
|
|
|
2
2
|
import tabs_module_default from "./tabs.module.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/tabs/tabs-viewport.tsx
|
|
5
|
-
var TabsViewport = ({ children, className, ...
|
|
5
|
+
var TabsViewport = ({ children, className, ...otherProps }) => /* @__PURE__ */ jsx("div", {
|
|
6
6
|
className: clsx(tabs_module_default.Viewport, className),
|
|
7
|
-
...
|
|
7
|
+
...otherProps,
|
|
8
8
|
children
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__tabs-module__Tabs_AwbZZ{--tabs-translate-amount:10px;min-block-size:10rem}.viraui__tabs-module__Viewport_15X1I{display:grid;grid-template-columns:minmax(0,1fr);inline-size:100%}.viraui__tabs-module__List_XJorr{position:relative;overflow-x:auto}.viraui__tabs-module__Indicator_UyNUn{position:absolute;pointer-events:none;inset-block-start:var(--active-tab-top);inset-inline-start:var(--active-tab-left);inline-size:var(--active-tab-width);block-size:var(--active-tab-height);transition:inset-inline-start var(--duration-fast) var(--easing-standard),inset-block-start var(--duration-fast) var(--easing-standard),inline-size var(--duration-fast) var(--easing-standard),block-size var(--duration-fast) var(--easing-standard)}.viraui__tabs-module__Item_XZ86Z{position:relative;flex-shrink:0;cursor:pointer;flex-basis:0;transition:none;will-change:auto;&[data-variant]:not(:disabled):active{translate:0 0}&:hover
|
|
1
|
+
.viraui__tabs-module__Tabs_AwbZZ{--vui-tabs-translate-amount:10px;min-block-size:10rem}.viraui__tabs-module__Viewport_15X1I{display:grid;grid-template-columns:minmax(0,1fr);inline-size:100%}.viraui__tabs-module__List_XJorr{position:relative;overflow-x:auto}.viraui__tabs-module__Indicator_UyNUn{position:absolute;pointer-events:none;inset-block-start:var(--active-tab-top);inset-inline-start:var(--active-tab-left);inline-size:var(--active-tab-width);block-size:var(--active-tab-height);transition:inset-inline-start var(--duration-fast) var(--easing-standard),inset-block-start var(--duration-fast) var(--easing-standard),inline-size var(--duration-fast) var(--easing-standard),block-size var(--duration-fast) var(--easing-standard)}.viraui__tabs-module__Item_XZ86Z{position:relative;flex-shrink:0;cursor:pointer;flex-basis:0;transition:none;will-change:auto;&[data-variant]:not(:disabled):active{translate:0 0}&:hover{background:#0000}&[data-disabled]{opacity:.5;background:#0000}&[data-active]{color:var(--global-foreground)}&:focus-visible{border-radius:var(--radius-small);outline-offset:0}}.viraui__tabs-module__Item_XZ86Z[data-active] .viraui__tabs-module__Label_5-8-Y{color:var(--global-foreground)}.viraui__tabs-module__Panel_vkCFI{grid-area:1/1;inline-size:100%;opacity:1;translate:0 0;transition:opacity var(--duration-fast) var(--easing-entrance),translate var(--duration-fast) var(--easing-entrance);&[data-ending-style]{pointer-events:none}&[data-ending-style],&[data-starting-style]{opacity:0}&[data-activation-direction=right][data-starting-style]{translate:var(--vui-tabs-translate-amount) 0}&[data-activation-direction=left][data-starting-style],&[data-activation-direction=right][data-ending-style]{translate:calc(var(--vui-tabs-translate-amount) * -1) 0}&[data-activation-direction=left][data-ending-style]{translate:var(--vui-tabs-translate-amount) 0}&[data-activation-direction=none][data-ending-style],&[data-activation-direction=none][data-starting-style]{translate:0 var(--vui-tabs-translate-amount)}&[hidden]{display:none}@media (prefers-reduced-motion:reduce){transition:none;&[data-ending-style],&[data-starting-style]{opacity:1;translate:0 0}}}
|
|
@@ -19,5 +19,12 @@
|
|
|
19
19
|
"Using addons as the only visible label for a tab",
|
|
20
20
|
"Trying to compose a separate public `Tabs.Indicator`; the indicator is owned by `Tabs.List`"
|
|
21
21
|
],
|
|
22
|
-
"related": ["Surface", "Stack", "Text"]
|
|
22
|
+
"related": ["Surface", "Stack", "Text"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"css": {
|
|
25
|
+
"translate-amount": {
|
|
26
|
+
"description": "Panel entry translate distance for tab transitions."
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
23
30
|
}
|
|
@@ -10,14 +10,14 @@ import { jsx } from "react/jsx-runtime";
|
|
|
10
10
|
import "react";
|
|
11
11
|
import { Tabs } from "@base-ui/react/tabs";
|
|
12
12
|
//#region src/components/tabs/tabs.tsx
|
|
13
|
-
var TabsRootComponent = ({ children, className, listAlignment = "start", ...
|
|
13
|
+
var TabsRootComponent = ({ children, className, listAlignment = "start", ...otherProps }) => /* @__PURE__ */ jsx(Tabs.Root, {
|
|
14
14
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
15
15
|
hAlign: listAlignment,
|
|
16
16
|
vAlign: "start",
|
|
17
17
|
fillChildren: false,
|
|
18
18
|
className: clsx(tabs_module_default.Tabs, className)
|
|
19
19
|
}),
|
|
20
|
-
...
|
|
20
|
+
...otherProps,
|
|
21
21
|
children
|
|
22
22
|
});
|
|
23
23
|
var Tabs$1 = Object.assign(TabsRootComponent, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__text-module__Text_bS8kv{--text-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));--text-align:start;--text-max-width:none;--text-white-space:normal;--text-padding-inline-start:0;--text-padding-inline-end:0;--text-padding-block-start:0;--text-padding-block-end:0;--text-font-family:var(--font-family-body);--text-font-size:clamp(var(--font-scale-body-small),var(--text-medium),var(--font-scale-body-medium));--text-font-weight:400;--text-font-width:100;--text-font-opsz:16;--text-line-height:var(--font-leading-standard);margin:0;min-inline-size:0;max-inline-size:var(--text-max-width);font-family:var(--text-font-family);font-size:var(--text-font-size);line-height:var(--text-line-height);text-align:var(--text-align);white-space:var(--text-white-space);word-break:break-word;font-optical-sizing:auto;font-variation-settings:"wght" var(--text-font-weight),"wdth" var(--text-font-width),"opsz" var(--text-font-opsz);text-box:var(--text-trim) var(--text-trim-type);&[data-text-balanced=true]{text-wrap:balance}&[data-text-selection=false]{-webkit-user-select:none;user-select:none}&[data-text-has-padding=true]{padding:var(--text-padding-block-start) var(--text-padding-inline-end) var(--text-padding-block-end) var(--text-padding-inline-start)}&[data-text-family=mono]{--text-font-family:var(--font-family-mono)}&[data-text-size=x-large]{--text-font-size:clamp(var(--font-scale-body-large),calc(var(--text-medium) * pow(var(--font-heading-typescale), 2)),var(--font-scale-body-x-large))}&[data-text-size=large]{--text-font-size:clamp(var(--font-scale-body-medium),calc(var(--text-medium) * pow(var(--font-heading-typescale), 1)),var(--font-scale-body-large))}&[data-text-size=medium]{--text-font-size:clamp(var(--font-scale-body-small),var(--text-medium),var(--font-scale-body-medium))}&[data-text-size=small]{--text-font-size:clamp(var(--font-scale-body-x-small),calc(var(--text-medium) * pow(var(--font-heading-typescale), -0.1)),var(--font-scale-body-small))}&[data-text-size=x-small]{--text-font-size:var(--font-scale-body-x-small)}&[data-text-weight=light]{--text-font-weight:200}&[data-text-weight=semibold]{--text-font-weight:600}&[data-text-weight=bold]{--text-font-weight:800}&[data-text-tone=muted]{color:var(--global-muted)}&[data-text-tone=interactive]{color:var(--global-interactive-text)}&[data-text-tone=positive]{color:var(--highlight-green)}&[data-text-tone=informative]{color:var(--highlight-blue)}&[data-text-tone=danger]{color:var(--highlight-red)}&[data-text-tone=warning]{color:var(--highlight-yellow)}&[data-text-has-literal-color=true]{color:var(--text-literal-color)}&[data-text-line-height=none]{--text-line-height:0}&[data-text-line-height=x-small]{--text-line-height:var(--font-leading-x-small)}&[data-text-line-height=small]{--text-line-height:var(--font-leading-small)}&[data-text-line-height=large]{--text-line-height:var(--font-leading-large)}}
|
|
1
|
+
.viraui__text-module__Text_bS8kv{--text-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-text-align:start;--vui-text-max-width:none;--vui-text-white-space:normal;--vui-text-padding-inline-start:0;--vui-text-padding-inline-end:0;--vui-text-padding-block-start:0;--vui-text-padding-block-end:0;--vui-text-font-family:var(--font-family-body);--vui-text-font-size:clamp(var(--font-scale-body-small),var(--text-medium),var(--font-scale-body-medium));--vui-text-font-weight:400;--vui-text-font-width:100;--vui-text-font-opsz:16;--vui-text-line-height:var(--font-leading-standard);margin:0;min-inline-size:0;max-inline-size:var(--vui-text-max-width);font-family:var(--vui-text-font-family);font-size:var(--vui-text-font-size);line-height:var(--vui-text-line-height);text-align:var(--vui-text-align);white-space:var(--vui-text-white-space);word-break:break-word;font-optical-sizing:auto;font-variation-settings:"wght" var(--vui-text-font-weight),"wdth" var(--vui-text-font-width),"opsz" var(--vui-text-font-opsz);text-box:var(--vui-text-trim) var(--vui-text-trim-type);&[data-text-balanced=true]{text-wrap:balance}&[data-text-selection=false]{-webkit-user-select:none;user-select:none}&[data-text-has-padding=true]{padding:var(--vui-text-padding-block-start) var(--vui-text-padding-inline-end) var(--vui-text-padding-block-end) var(--vui-text-padding-inline-start)}&[data-text-family=mono]{--vui-text-font-family:var(--font-family-mono)}&[data-text-size=x-large]{--vui-text-font-size:clamp(var(--font-scale-body-large),calc(var(--text-medium) * pow(var(--font-heading-typescale), 2)),var(--font-scale-body-x-large))}&[data-text-size=large]{--vui-text-font-size:clamp(var(--font-scale-body-medium),calc(var(--text-medium) * pow(var(--font-heading-typescale), 1)),var(--font-scale-body-large))}&[data-text-size=medium]{--vui-text-font-size:clamp(var(--font-scale-body-small),var(--text-medium),var(--font-scale-body-medium))}&[data-text-size=small]{--vui-text-font-size:clamp(var(--font-scale-body-x-small),calc(var(--text-medium) * pow(var(--font-heading-typescale), -0.1)),var(--font-scale-body-small))}&[data-text-size=x-small]{--vui-text-font-size:var(--font-scale-body-x-small)}&[data-text-weight=light]{--vui-text-font-weight:200}&[data-text-weight=semibold]{--vui-text-font-weight:600}&[data-text-weight=bold]{--vui-text-font-weight:800}&[data-text-tone=muted]{color:var(--global-muted)}&[data-text-tone=interactive]{color:var(--global-interactive-text)}&[data-text-tone=positive]{color:var(--highlight-green)}&[data-text-tone=informative]{color:var(--highlight-blue)}&[data-text-tone=danger]{color:var(--highlight-red)}&[data-text-tone=warning]{color:var(--highlight-yellow)}&[data-text-has-literal-color=true]{color:var(--vui-text-literal-color)}&[data-text-line-height=none]{--vui-text-line-height:0}&[data-text-line-height=x-small]{--vui-text-line-height:var(--font-leading-x-small)}&[data-text-line-height=small]{--vui-text-line-height:var(--font-leading-small)}&[data-text-line-height=large]{--vui-text-line-height:var(--font-leading-large)}}
|
|
@@ -16,5 +16,129 @@
|
|
|
16
16
|
"Choose render when the copy must live on a specific inline or block element"
|
|
17
17
|
],
|
|
18
18
|
"antiPatterns": ["Using Text for headings instead of Title"],
|
|
19
|
-
"related": ["Title", "ClampText"]
|
|
19
|
+
"related": ["Title", "ClampText"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"react": {
|
|
22
|
+
"align": {
|
|
23
|
+
"description": "Aligns text using logical alignment values.",
|
|
24
|
+
"refCss": "align"
|
|
25
|
+
},
|
|
26
|
+
"maxWidth": {
|
|
27
|
+
"description": "Constrains the maximum inline size of the rendered text block.",
|
|
28
|
+
"refCss": "max-width"
|
|
29
|
+
},
|
|
30
|
+
"color": {
|
|
31
|
+
"description": "Applies a literal color escape hatch when semantic tone is not used.",
|
|
32
|
+
"refCss": "literal-color"
|
|
33
|
+
},
|
|
34
|
+
"whiteSpace": {
|
|
35
|
+
"description": "Controls white-space preservation and wrapping behavior.",
|
|
36
|
+
"refCss": "white-space"
|
|
37
|
+
},
|
|
38
|
+
"weight": {
|
|
39
|
+
"description": "Numeric variable-font weight override.",
|
|
40
|
+
"refCss": "font-weight"
|
|
41
|
+
},
|
|
42
|
+
"fontWidth": {
|
|
43
|
+
"description": "Variable-font width axis override.",
|
|
44
|
+
"refCss": "font-width"
|
|
45
|
+
},
|
|
46
|
+
"opticalSize": {
|
|
47
|
+
"description": "Variable-font optical size axis override.",
|
|
48
|
+
"refCss": "font-opsz"
|
|
49
|
+
},
|
|
50
|
+
"trim": {
|
|
51
|
+
"description": "Trims text box whitespace at the chosen edge.",
|
|
52
|
+
"refCss": "trim"
|
|
53
|
+
},
|
|
54
|
+
"trimType": {
|
|
55
|
+
"description": "Selects the text-box trim basis when trim is active.",
|
|
56
|
+
"refCss": "trim-type"
|
|
57
|
+
},
|
|
58
|
+
"hPadding": {
|
|
59
|
+
"description": "Sets inline padding using one token or a [start, end] tuple."
|
|
60
|
+
},
|
|
61
|
+
"vPadding": {
|
|
62
|
+
"description": "Sets block padding using one token or a [start, end] tuple."
|
|
63
|
+
},
|
|
64
|
+
"size": {
|
|
65
|
+
"description": "Selects a semantic body typography size from the active theme scale.",
|
|
66
|
+
"refCss": "font-size"
|
|
67
|
+
},
|
|
68
|
+
"family": {
|
|
69
|
+
"description": "Selects the semantic font family for body copy.",
|
|
70
|
+
"refCss": "font-family"
|
|
71
|
+
},
|
|
72
|
+
"lineHeight": {
|
|
73
|
+
"description": "Controls line height through foundation leading tokens.",
|
|
74
|
+
"refCss": "line-height"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"css": {
|
|
78
|
+
"align": {
|
|
79
|
+
"description": "Text alignment on the root.",
|
|
80
|
+
"refReact": "align"
|
|
81
|
+
},
|
|
82
|
+
"max-width": {
|
|
83
|
+
"description": "Max inline size of the text root.",
|
|
84
|
+
"refReact": "maxWidth"
|
|
85
|
+
},
|
|
86
|
+
"literal-color": {
|
|
87
|
+
"description": "Literal color override on the root.",
|
|
88
|
+
"refReact": "color"
|
|
89
|
+
},
|
|
90
|
+
"white-space": {
|
|
91
|
+
"description": "White-space behavior on the root.",
|
|
92
|
+
"refReact": "whiteSpace"
|
|
93
|
+
},
|
|
94
|
+
"font-weight": {
|
|
95
|
+
"description": "Font weight on the root.",
|
|
96
|
+
"refReact": "weight"
|
|
97
|
+
},
|
|
98
|
+
"font-width": {
|
|
99
|
+
"description": "Font width axis on the root.",
|
|
100
|
+
"refReact": "fontWidth"
|
|
101
|
+
},
|
|
102
|
+
"font-opsz": {
|
|
103
|
+
"description": "Font optical size axis on the root.",
|
|
104
|
+
"refReact": "opticalSize"
|
|
105
|
+
},
|
|
106
|
+
"trim": {
|
|
107
|
+
"description": "Text-box trim mode on the root.",
|
|
108
|
+
"refReact": "trim"
|
|
109
|
+
},
|
|
110
|
+
"trim-type": {
|
|
111
|
+
"description": "Text-box trim basis on the root.",
|
|
112
|
+
"refReact": "trimType"
|
|
113
|
+
},
|
|
114
|
+
"padding-inline-start": {
|
|
115
|
+
"description": "Inline-start padding when padding is enabled.",
|
|
116
|
+
"refReact": "hPadding"
|
|
117
|
+
},
|
|
118
|
+
"padding-inline-end": {
|
|
119
|
+
"description": "Inline-end padding when padding is enabled.",
|
|
120
|
+
"refReact": "hPadding"
|
|
121
|
+
},
|
|
122
|
+
"padding-block-start": {
|
|
123
|
+
"description": "Block-start padding when padding is enabled.",
|
|
124
|
+
"refReact": "vPadding"
|
|
125
|
+
},
|
|
126
|
+
"padding-block-end": {
|
|
127
|
+
"description": "Block-end padding when padding is enabled.",
|
|
128
|
+
"refReact": "vPadding"
|
|
129
|
+
},
|
|
130
|
+
"font-size": {
|
|
131
|
+
"description": "Body font size; size prop presets via data attributes.",
|
|
132
|
+
"refReact": "size"
|
|
133
|
+
},
|
|
134
|
+
"font-family": {
|
|
135
|
+
"description": "Font family; family prop presets via data attributes.",
|
|
136
|
+
"refReact": "family"
|
|
137
|
+
},
|
|
138
|
+
"line-height": {
|
|
139
|
+
"description": "Line height; lineHeight prop presets via data attributes.",
|
|
140
|
+
"refReact": "lineHeight"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
20
144
|
}
|
|
@@ -9,17 +9,17 @@ var Text = ({ align = "start", balanced = false, selection = true, className, co
|
|
|
9
9
|
const hasPadding = Boolean(hPadding || vPadding);
|
|
10
10
|
const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
|
|
11
11
|
const dynamicStyle = {
|
|
12
|
-
"--text-align": align,
|
|
13
|
-
"--text-max-width": maxWidth ?? "none",
|
|
14
|
-
"--text-literal-color": color,
|
|
15
|
-
"--text-white-space": whiteSpace,
|
|
16
|
-
"--text-trim": trim ? `trim-${trim}` : "initial",
|
|
17
|
-
"--text-trim-type": trim ? trimType : "initial",
|
|
18
|
-
...typeof weight === "number"
|
|
19
|
-
"--text-font-width": fontWidth,
|
|
20
|
-
"--text-font-opsz": opticalSize,
|
|
21
|
-
...resolveAxisPadding(hPadding, "--text-padding-inline-start", "--text-padding-inline-end"),
|
|
22
|
-
...resolveAxisPadding(vPadding, "--text-padding-block-start", "--text-padding-block-end"),
|
|
12
|
+
"--vui-text-align": align,
|
|
13
|
+
"--vui-text-max-width": maxWidth ?? "none",
|
|
14
|
+
"--vui-text-literal-color": color,
|
|
15
|
+
"--vui-text-white-space": whiteSpace,
|
|
16
|
+
"--vui-text-trim": trim ? `trim-${trim}` : "initial",
|
|
17
|
+
"--vui-text-trim-type": trim ? trimType : "initial",
|
|
18
|
+
...typeof weight === "number" && { "--vui-text-font-weight": weight },
|
|
19
|
+
"--vui-text-font-width": fontWidth,
|
|
20
|
+
"--vui-text-font-opsz": opticalSize,
|
|
21
|
+
...resolveAxisPadding(hPadding, "--vui-text-padding-inline-start", "--vui-text-padding-inline-end"),
|
|
22
|
+
...resolveAxisPadding(vPadding, "--vui-text-padding-block-start", "--vui-text-padding-block-end"),
|
|
23
23
|
...style
|
|
24
24
|
};
|
|
25
25
|
return useRender({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__textarea-module__Textarea_mtOUG{--textarea-min-block-size:calc(var(--space-x-large) * 2);--textarea-padding-block:var(--space-small);--textarea-input-border-radius:var(--radius-small);--field-label-padding-inline:calc(var(--textarea-input-border-radius) / 2);inline-size:100%;&:has([required]) .viraui__textarea-module__Label_5dOso:after{content:" *";color:var(--highlight-red)}}.viraui__textarea-module__CustomBasicInput_Ce7yA{--basic-input-border-radius:var(--textarea-input-border-radius);border:1px solid var(--global-contrast);min-block-size:var(--textarea-min-block-size);padding-block:var(--textarea-padding-block);line-height:1.4;resize:none;&[data-resize=vertical]{resize:vertical}&[data-resize=both]{resize:both}&[data-invalid]{border-color:var(--highlight-red)}&:disabled,&[data-disabled]{border-color
|
|
1
|
+
.viraui__textarea-module__Textarea_mtOUG{--vui-textarea-min-block-size:calc(var(--space-x-large) * 2);--vui-textarea-padding-block:var(--space-small);--vui-textarea-input-border-radius:var(--radius-small);--vui-field-label-padding-inline:calc(var(--vui-textarea-input-border-radius) / 2);inline-size:100%;&:has([required]) .viraui__textarea-module__Label_5dOso:after{content:" *";color:var(--highlight-red)}}.viraui__textarea-module__CustomBasicInput_Ce7yA{--vui-basic-input-border-radius:var(--vui-textarea-input-border-radius);border:1px solid var(--global-contrast);min-block-size:var(--vui-textarea-min-block-size);padding-block:var(--vui-textarea-padding-block);line-height:1.4;resize:none;&[data-resize=vertical]{resize:vertical}&[data-resize=both]{resize:both}&[data-invalid]{border-color:var(--highlight-red)}&:disabled,&[data-disabled]{border-color:#0000}}.viraui__textarea-module__Description_er3zI{padding-inline:calc(var(--vui-textarea-input-border-radius) / 2)}
|
|
@@ -18,5 +18,18 @@
|
|
|
18
18
|
"Prefer resize modes that do not hide required content from keyboard users"
|
|
19
19
|
],
|
|
20
20
|
"antiPatterns": ["Using Textarea for single-line values", "Expecting unsupported size or variant props"],
|
|
21
|
-
"related": ["Fieldset", "Textfield", "Text"]
|
|
21
|
+
"related": ["Fieldset", "Textfield", "Text"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"css": {
|
|
24
|
+
"min-block-size": {
|
|
25
|
+
"description": "Minimum block size of the textarea field root."
|
|
26
|
+
},
|
|
27
|
+
"padding-block": {
|
|
28
|
+
"description": "Block padding applied through the textarea root."
|
|
29
|
+
},
|
|
30
|
+
"input-border-radius": {
|
|
31
|
+
"description": "Corner radius for the textarea control group."
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
22
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__textfield-module__Textfield_o-70A{--input-height:var(--space-x-large);--control-group-background:var(--base-1);--control-group-color:var(--global-foreground);--control-group-border-color:var(--global-contrast);--control-group-border-radius:var(--radius-medium);--field-label-padding-inline:calc(var(--control-group-border-radius) / 2);inline-size:100%;&:has([required]) .viraui__textfield-module__Label_5rjr0:after{content:" *";color:var(--highlight-red)}}.viraui__textfield-module__ControlGroup_2W-OC{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--input-height);background:var(--control-group-background);border:1px solid var(--control-group-border-color);border-radius:var(--control-group-border-radius);&:has(.viraui__textfield-module__CustomBasicInput_oHgtd:focus-visible),&:has(.viraui__textfield-module__CustomBasicInput_oHgtd[data-focused]){outline:var(--outline);outline-offset:var(--outline-offset)}&:has(.viraui__textfield-module__CustomBasicInput_oHgtd[data-invalid]){--control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}&:has(.viraui__textfield-module__CustomBasicInput_oHgtd:disabled),&:has(.viraui__textfield-module__CustomBasicInput_oHgtd[data-disabled]){--control-group-background:var(--global-disabled-background);--control-group-border-color
|
|
1
|
+
.viraui__textfield-module__Textfield_o-70A{--vui-textfield-input-height:var(--space-x-large);--vui-textfield-control-group-background:var(--base-1);--vui-textfield-control-group-color:var(--global-foreground);--vui-textfield-control-group-border-color:var(--global-contrast);--vui-textfield-control-group-border-radius:var(--radius-medium);--vui-field-label-padding-inline:calc(var(--vui-textfield-control-group-border-radius) / 2);inline-size:100%;&:has([required]) .viraui__textfield-module__Label_5rjr0:after{content:" *";color:var(--highlight-red)}}.viraui__textfield-module__ControlGroup_2W-OC{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--vui-textfield-input-height);background:var(--vui-textfield-control-group-background);border:1px solid var(--vui-textfield-control-group-border-color);border-radius:var(--vui-textfield-control-group-border-radius);&:has(.viraui__textfield-module__CustomBasicInput_oHgtd:focus-visible),&:has(.viraui__textfield-module__CustomBasicInput_oHgtd[data-focused]){outline:var(--outline);outline-offset:var(--outline-offset)}&:has(.viraui__textfield-module__CustomBasicInput_oHgtd[data-invalid]){--vui-textfield-control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}&:has(.viraui__textfield-module__CustomBasicInput_oHgtd:disabled),&:has(.viraui__textfield-module__CustomBasicInput_oHgtd[data-disabled]){--vui-textfield-control-group-background:var(--global-disabled-background);--vui-textfield-control-group-border-color:#0000;box-shadow:none;cursor:not-allowed}&:has(.viraui__textfield-module__Addon_kK1ef[data-position=start])>.viraui__textfield-module__CustomBasicInput_oHgtd{padding-inline-start:var(--space-x-small)}&:has(.viraui__textfield-module__Addon_kK1ef[data-position=end])>.viraui__textfield-module__CustomBasicInput_oHgtd{padding-inline-end:var(--space-x-small)}}.viraui__textfield-module__CustomBasicInput_oHgtd{flex:1 1 auto;min-inline-size:0;block-size:100%;line-height:1.2;border:none;background:#0000;box-shadow:none;border-radius:inherit;&:focus-visible{outline:none}&:disabled{cursor:not-allowed}}.viraui__textfield-module__Addon_kK1ef{min-inline-size:var(--space-x-large)}.viraui__textfield-module__Description_8Qxot{padding-inline:calc(var(--vui-textfield-control-group-border-radius) / 2)}
|
|
@@ -22,5 +22,24 @@
|
|
|
22
22
|
"Passing unsupported size or variant props",
|
|
23
23
|
"Expecting a focus ring when focus is only on addon controls"
|
|
24
24
|
],
|
|
25
|
-
"related": ["Fieldset", "Textarea", "Select", "Text"]
|
|
25
|
+
"related": ["Fieldset", "Textarea", "Select", "Text"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"css": {
|
|
28
|
+
"input-height": {
|
|
29
|
+
"description": "Textfield control group block size."
|
|
30
|
+
},
|
|
31
|
+
"control-group-background": {
|
|
32
|
+
"description": "Textfield control group background."
|
|
33
|
+
},
|
|
34
|
+
"control-group-color": {
|
|
35
|
+
"description": "Textfield control group foreground color."
|
|
36
|
+
},
|
|
37
|
+
"control-group-border-color": {
|
|
38
|
+
"description": "Textfield control group border color."
|
|
39
|
+
},
|
|
40
|
+
"control-group-border-radius": {
|
|
41
|
+
"description": "Textfield control group corner radius."
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
26
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.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));--title-font-size:clamp(var(--font-scale-h2),calc(var(--title-medium) * pow(var(--font-heading-typescale), 5)),var(--font-scale-h1));--title-font-family:var(--font-family-heading);--title-font-weight:500;--title-font-width:100;--title-font-opsz:16;--title-line-height:var(--font-leading-standard);--title-letter-spacing:-0.03em;--title-align:start;--title-max-width:none;--title-white-space:normal;--title-padding-inline-start:0;--title-padding-inline-end:0;--title-padding-block-start:0;--title-padding-block-end:0;margin:0;max-inline-size:var(--title-max-width);font-family:var(--title-font-family);font-size:var(--title-font-size);line-height:var(--title-line-height);letter-spacing:var(--title-letter-spacing);text-align:var(--title-align);white-space:var(--title-white-space);word-break:break-word;font-optical-sizing:auto;font-variation-settings:"wght" var(--title-font-weight),"wdth" var(--title-font-width),"opsz" var(--title-font-opsz);text-box:var(--title-trim) var(--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(--title-padding-block-start) var(--title-padding-inline-end) var(--title-padding-block-end) var(--title-padding-inline-start)}&[data-title-level=display]{--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]{--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]{--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]{--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]{--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]{--title-font-size:clamp(var(--font-scale-h6),calc(var(--title-medium) * pow(var(--font-heading-typescale), 1)),var(--font-scale-h5));--title-letter-spacing:-0.02em}&[data-title-level=h6]{--title-font-size:clamp(var(--font-scale-body-medium),var(--title-medium),var(--font-scale-h6));--title-letter-spacing:-0.02em}&[data-title-has-literal-color=true]{color:var(--title-literal-color)}&[data-title-line-height=none]{--title-line-height:0}&[data-title-line-height=x-small]{--title-line-height:var(--font-leading-x-small)}&[data-title-line-height=small]{--title-line-height:var(--font-leading-small)}&[data-title-line-height=large]{--title-line-height:var(--font-leading-large)}}
|
|
1
|
+
.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-font-weight:500;--vui-title-font-width:100;--vui-title-font-opsz:16;--vui-title-line-height:var(--font-leading-standard);--vui-title-letter-spacing:-0.03em;--vui-title-align:start;--vui-title-max-width:none;--vui-title-white-space:normal;--vui-title-padding-inline-start:0;--vui-title-padding-inline-end:0;--vui-title-padding-block-start:0;--vui-title-padding-block-end:0;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-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)}}
|
|
@@ -19,5 +19,127 @@
|
|
|
19
19
|
"Letting level force the HTML tag instead of choosing render explicitly",
|
|
20
20
|
"Using Title for long body paragraphs"
|
|
21
21
|
],
|
|
22
|
-
"related": ["Text", "ClampText"]
|
|
22
|
+
"related": ["Text", "ClampText"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"react": {
|
|
25
|
+
"align": {
|
|
26
|
+
"description": "Aligns text using logical alignment values.",
|
|
27
|
+
"refCss": "align"
|
|
28
|
+
},
|
|
29
|
+
"maxWidth": {
|
|
30
|
+
"description": "Constrains the maximum inline size of the rendered title block.",
|
|
31
|
+
"refCss": "max-width"
|
|
32
|
+
},
|
|
33
|
+
"color": {
|
|
34
|
+
"description": "Applies a literal color escape hatch when semantic tone is not used.",
|
|
35
|
+
"refCss": "literal-color"
|
|
36
|
+
},
|
|
37
|
+
"whiteSpace": {
|
|
38
|
+
"description": "Controls white-space preservation and wrapping behavior.",
|
|
39
|
+
"refCss": "white-space"
|
|
40
|
+
},
|
|
41
|
+
"weight": {
|
|
42
|
+
"description": "Numeric variable-font weight override.",
|
|
43
|
+
"refCss": "font-weight"
|
|
44
|
+
},
|
|
45
|
+
"fontWidth": {
|
|
46
|
+
"description": "Variable-font width axis override.",
|
|
47
|
+
"refCss": "font-width"
|
|
48
|
+
},
|
|
49
|
+
"opticalSize": {
|
|
50
|
+
"description": "Variable-font optical size axis override.",
|
|
51
|
+
"refCss": "font-opsz"
|
|
52
|
+
},
|
|
53
|
+
"trim": {
|
|
54
|
+
"description": "Trims text box whitespace at the chosen edge.",
|
|
55
|
+
"refCss": "trim"
|
|
56
|
+
},
|
|
57
|
+
"trimType": {
|
|
58
|
+
"description": "Selects the text-box trim basis when trim is active.",
|
|
59
|
+
"refCss": "trim-type"
|
|
60
|
+
},
|
|
61
|
+
"hPadding": {
|
|
62
|
+
"description": "Sets inline padding using one token or a [start, end] tuple."
|
|
63
|
+
},
|
|
64
|
+
"vPadding": {
|
|
65
|
+
"description": "Sets block padding using one token or a [start, end] tuple."
|
|
66
|
+
},
|
|
67
|
+
"level": {
|
|
68
|
+
"description": "Selects the visual heading preset; does not change semantic heading level.",
|
|
69
|
+
"refCss": "font-size"
|
|
70
|
+
},
|
|
71
|
+
"lineHeight": {
|
|
72
|
+
"description": "Controls line height through foundation leading tokens.",
|
|
73
|
+
"refCss": "line-height"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"css": {
|
|
77
|
+
"align": {
|
|
78
|
+
"description": "Title alignment on the root.",
|
|
79
|
+
"refReact": "align"
|
|
80
|
+
},
|
|
81
|
+
"max-width": {
|
|
82
|
+
"description": "Max inline size of the title root.",
|
|
83
|
+
"refReact": "maxWidth"
|
|
84
|
+
},
|
|
85
|
+
"literal-color": {
|
|
86
|
+
"description": "Literal color override on the root.",
|
|
87
|
+
"refReact": "color"
|
|
88
|
+
},
|
|
89
|
+
"white-space": {
|
|
90
|
+
"description": "White-space behavior on the root.",
|
|
91
|
+
"refReact": "whiteSpace"
|
|
92
|
+
},
|
|
93
|
+
"font-weight": {
|
|
94
|
+
"description": "Font weight on the root.",
|
|
95
|
+
"refReact": "weight"
|
|
96
|
+
},
|
|
97
|
+
"font-width": {
|
|
98
|
+
"description": "Font width axis on the root.",
|
|
99
|
+
"refReact": "fontWidth"
|
|
100
|
+
},
|
|
101
|
+
"font-opsz": {
|
|
102
|
+
"description": "Font optical size axis on the root.",
|
|
103
|
+
"refReact": "opticalSize"
|
|
104
|
+
},
|
|
105
|
+
"trim": {
|
|
106
|
+
"description": "Text-box trim mode on the root.",
|
|
107
|
+
"refReact": "trim"
|
|
108
|
+
},
|
|
109
|
+
"trim-type": {
|
|
110
|
+
"description": "Text-box trim basis on the root.",
|
|
111
|
+
"refReact": "trimType"
|
|
112
|
+
},
|
|
113
|
+
"padding-inline-start": {
|
|
114
|
+
"description": "Inline-start padding when padding is enabled.",
|
|
115
|
+
"refReact": "hPadding"
|
|
116
|
+
},
|
|
117
|
+
"padding-inline-end": {
|
|
118
|
+
"description": "Inline-end padding when padding is enabled.",
|
|
119
|
+
"refReact": "hPadding"
|
|
120
|
+
},
|
|
121
|
+
"padding-block-start": {
|
|
122
|
+
"description": "Block-start padding when padding is enabled.",
|
|
123
|
+
"refReact": "vPadding"
|
|
124
|
+
},
|
|
125
|
+
"padding-block-end": {
|
|
126
|
+
"description": "Block-end padding when padding is enabled.",
|
|
127
|
+
"refReact": "vPadding"
|
|
128
|
+
},
|
|
129
|
+
"font-size": {
|
|
130
|
+
"description": "Heading font size; level prop presets via data attributes.",
|
|
131
|
+
"refReact": "level"
|
|
132
|
+
},
|
|
133
|
+
"line-height": {
|
|
134
|
+
"description": "Line height; lineHeight prop presets via data attributes.",
|
|
135
|
+
"refReact": "lineHeight"
|
|
136
|
+
},
|
|
137
|
+
"letter-spacing": {
|
|
138
|
+
"description": "Heading letter spacing; level presets adjust this."
|
|
139
|
+
},
|
|
140
|
+
"font-family": {
|
|
141
|
+
"description": "Heading font family on the root."
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
23
145
|
}
|
|
@@ -9,17 +9,17 @@ var Title = ({ align = "start", balanced = false, selection = true, className, c
|
|
|
9
9
|
const hasPadding = Boolean(hPadding || vPadding);
|
|
10
10
|
const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
|
|
11
11
|
const dynamicStyle = {
|
|
12
|
-
"--title-align": align,
|
|
13
|
-
"--title-max-width": maxWidth ?? "none",
|
|
14
|
-
"--title-literal-color": color,
|
|
15
|
-
"--title-white-space": whiteSpace,
|
|
16
|
-
"--title-trim": trim ? `trim-${trim}` : "initial",
|
|
17
|
-
"--title-trim-type": trim ? trimType : "initial",
|
|
18
|
-
...typeof weight === "number"
|
|
19
|
-
"--title-font-width": fontWidth,
|
|
20
|
-
"--title-font-opsz": opticalSize,
|
|
21
|
-
...resolveAxisPadding(hPadding, "--title-padding-inline-start", "--title-padding-inline-end"),
|
|
22
|
-
...resolveAxisPadding(vPadding, "--title-padding-block-start", "--title-padding-block-end"),
|
|
12
|
+
"--vui-title-align": align,
|
|
13
|
+
"--vui-title-max-width": maxWidth ?? "none",
|
|
14
|
+
"--vui-title-literal-color": color,
|
|
15
|
+
"--vui-title-white-space": whiteSpace,
|
|
16
|
+
"--vui-title-trim": trim ? `trim-${trim}` : "initial",
|
|
17
|
+
"--vui-title-trim-type": trim ? trimType : "initial",
|
|
18
|
+
...typeof weight === "number" && { "--vui-title-font-weight": weight },
|
|
19
|
+
"--vui-title-font-width": fontWidth,
|
|
20
|
+
"--vui-title-font-opsz": opticalSize,
|
|
21
|
+
...resolveAxisPadding(hPadding, "--vui-title-padding-inline-start", "--vui-title-padding-inline-end"),
|
|
22
|
+
...resolveAxisPadding(vPadding, "--vui-title-padding-block-start", "--vui-title-padding-block-end"),
|
|
23
23
|
...style
|
|
24
24
|
};
|
|
25
25
|
return useRender({
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ToastAction as ToastActionNamespace } from '@base-ui/react/toast';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Public Toast.Action props.
|
|
5
|
+
*
|
|
6
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
7
|
+
*/
|
|
8
|
+
export type ToastActionProps = ToastActionNamespace.Props;
|
|
9
|
+
export declare const ToastAction: React.FC<ToastActionProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Button } from "../button/button.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Toast } from "@base-ui/react/toast";
|
|
4
|
+
//#region src/components/toast/toast-action.tsx
|
|
5
|
+
var ToastAction = ({ render, ...otherProps }) => /* @__PURE__ */ jsx(Toast.Action, {
|
|
6
|
+
render: render ?? /* @__PURE__ */ jsx(Button, { variant: "secondary" }),
|
|
7
|
+
...otherProps
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ToastAction };
|