@viraui/react 0.0.25 → 0.0.27
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 +116 -68
- 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 +17 -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/avatar.module.js +8 -4
- package/dist/components/avatar-group/avatar-group.css +2 -2
- package/dist/components/avatar-group/avatar-group.guide.json +27 -1
- package/dist/components/avatar-group/avatar-group.js +2 -2
- package/dist/components/avatar-group/avatar-group.module.js +12 -6
- 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/basic-input.module.js +4 -2
- package/dist/components/basic-input/field-label.css +1 -1
- package/dist/components/basic-input/field-label.module.js +4 -2
- 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 +5 -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/button/button.module.js +8 -4
- package/dist/components/checkbox/checkbox-group.js +2 -2
- package/dist/components/checkbox/checkbox.css +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/checkbox/checkbox.module.js +16 -8
- package/dist/components/chip/chip.css +1 -1
- package/dist/components/chip/chip.guide.json +26 -1
- package/dist/components/chip/chip.module.js +10 -5
- 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/clamp-text/clamp-text.module.js +4 -2
- 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 +3 -3
- 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/dialog/dialog.module.js +24 -12
- package/dist/components/elevator/elevator.js +2 -2
- package/dist/components/fieldset/fieldset.js +1 -1
- package/dist/components/icon/icon.module.js +4 -2
- package/dist/components/icon-button/icon-button.js +2 -2
- package/dist/components/index.d.ts +21 -13
- package/dist/components/linear-progress/linear-progress.css +1 -1
- package/dist/components/linear-progress/linear-progress.guide.json +14 -1
- package/dist/components/linear-progress/linear-progress.js +1 -1
- package/dist/components/linear-progress/linear-progress.module.js +8 -4
- 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/masonry/masonry.module.js +6 -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 +11 -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 +13 -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/progressive-blur/progressive-blur.module.js +6 -3
- 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/radio/radio.js +1 -1
- package/dist/components/radio/radio.module.js +8 -4
- package/dist/components/select/select-group.js +1 -1
- package/dist/components/select/select-option.js +3 -3
- package/dist/components/select/select.css +1 -1
- package/dist/components/select/select.guide.json +26 -1
- package/dist/components/select/select.js +5 -4
- package/dist/components/select/select.module.js +36 -18
- package/dist/components/separator/separator.css +1 -1
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/separator/separator.module.js +4 -2
- package/dist/components/shimmer/shimmer.css +1 -1
- package/dist/components/shimmer/shimmer.guide.json +39 -1
- package/dist/components/shimmer/shimmer.js +4 -4
- package/dist/components/shimmer/shimmer.module.js +4 -2
- 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/skeleton/skeleton.module.js +4 -2
- 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/slider/slider.module.js +20 -10
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/spinner/spinner.guide.json +15 -1
- package/dist/components/spinner/spinner.module.js +6 -3
- package/dist/components/stack/stack.css +1 -1
- package/dist/components/stack/stack.guide.json +77 -1
- package/dist/components/stack/stack.js +8 -8
- package/dist/components/stack/stack.module.js +4 -2
- package/dist/components/static-noise/static-noise.module.js +6 -3
- package/dist/components/surface/surface-radius-context.js +7 -7
- package/dist/components/surface/surface.css +1 -1
- package/dist/components/surface/surface.d.ts +1 -1
- package/dist/components/surface/surface.guide.json +85 -1
- package/dist/components/surface/surface.js +6 -6
- package/dist/components/surface/surface.module.js +4 -2
- package/dist/components/switch/switch.css +1 -1
- package/dist/components/switch/switch.guide.json +32 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/switch/switch.module.js +10 -5
- 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/tabs/tabs.module.js +16 -8
- 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/text/text.module.js +4 -2
- package/dist/components/textarea/textarea.css +1 -1
- package/dist/components/textarea/textarea.guide.json +14 -1
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/textarea/textarea.module.js +10 -5
- package/dist/components/textfield/textfield.css +1 -1
- package/dist/components/textfield/textfield.guide.json +20 -1
- package/dist/components/textfield/textfield.js +1 -1
- package/dist/components/textfield/textfield.module.js +14 -7
- 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/title/title.module.js +4 -2
- package/dist/components/toast/toast-action.js +2 -2
- package/dist/components/toast/toast-banner.js +1 -1
- package/dist/components/toast/toast-viewport.js +2 -2
- package/dist/components/toast/toast.css +1 -1
- package/dist/components/toast/toast.module.js +8 -4
- package/dist/components/toggle-button/index.d.ts +2 -0
- package/dist/components/toggle-button/toggle-button.d.ts +39 -0
- package/dist/components/toggle-button/toggle-button.guide.json +25 -0
- package/dist/components/toggle-button/toggle-button.js +25 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/toggle-group.d.ts +11 -0
- package/dist/components/toggle-group/toggle-group.guide.json +26 -0
- package/dist/components/toggle-group/toggle-group.js +15 -0
- package/dist/components/tooltip/index.d.ts +6 -0
- package/dist/components/tooltip/tooltip-content.d.ts +15 -0
- package/dist/components/tooltip/tooltip-content.js +32 -0
- package/dist/components/tooltip/tooltip.css +1 -0
- package/dist/components/tooltip/tooltip.d.ts +13 -0
- package/dist/components/tooltip/tooltip.guide.json +25 -0
- package/dist/components/tooltip/tooltip.js +20 -0
- package/dist/components/tooltip/tooltip.module.js +11 -0
- package/dist/components/typewriter/index.d.ts +3 -0
- package/dist/components/typewriter/typewriter.css +1 -0
- package/dist/components/typewriter/typewriter.d.ts +68 -0
- package/dist/components/typewriter/typewriter.guide.json +39 -0
- package/dist/components/typewriter/typewriter.js +105 -0
- package/dist/components/typewriter/typewriter.module.js +18 -0
- package/dist/components/typewriter/typewriter.utils.d.ts +23 -0
- package/dist/components/typewriter/typewriter.utils.js +100 -0
- package/dist/index.js +26 -16
- package/dist/preflight-surface.json +17 -4
- package/dist/preflight.css +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
//#region src/components/skeleton/skeleton.module.css
|
|
2
|
+
var Skeleton = "viraui__skeleton-module__Skeleton_pn7Xk";
|
|
1
3
|
var skeleton_module_default = {
|
|
2
|
-
Skeleton
|
|
4
|
+
Skeleton,
|
|
3
5
|
"skeleton-fade": "viraui__skeleton-module__skeleton-fade_XHkG4"
|
|
4
6
|
};
|
|
5
7
|
//#endregion
|
|
6
|
-
export { skeleton_module_default as default };
|
|
8
|
+
export { Skeleton, skeleton_module_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__slider-module__Slider_vDNlm{--slider-track-size:var(--space-x-small);--slider-thumb-size:var(--space-medium);--slider-track-background:var(--global-contrast);--slider-progress-background:var(--global-primary);--slider-thumb-background:
|
|
1
|
+
.viraui__slider-module__Slider_vDNlm{--vui-slider-track-size:var(--space-x-small);--vui-slider-thumb-size:var(--space-medium);--vui-slider-track-background:var(--global-contrast);--vui-slider-progress-background:var(--global-primary);--vui-slider-thumb-background:var(--base-2);inline-size:100%;block-size:100%;min-inline-size:0;min-block-size:0;&:has([required]) .viraui__slider-module__Label_eQQHf:after{content:" *";color:var(--highlight-red)}&[data-invalid]{--vui-slider-progress-background:var(--highlight-red)}&:has(.viraui__slider-module__SliderRoot_4JScw[data-disabled]),&[data-disabled]{--vui-slider-track-background:var(--global-disabled-background);--vui-slider-progress-background:var(--global-disabled-foreground);--vui-slider-thumb-background:var(--global-disabled-foreground);cursor:not-allowed}}.viraui__slider-module__SliderRoot_4JScw{inline-size:100%;block-size:100%;min-inline-size:0;min-block-size:0}.viraui__slider-module__SliderHeader_gOy9k{inline-size:100%;min-inline-size:0}.viraui__slider-module__Value_FaY9i{flex-shrink:0}.viraui__slider-module__SliderControl_FQd5-{position:relative;flex:1 1 auto;-webkit-user-select:none;user-select:none;touch-action:none;inline-size:100%;block-size:var(--vui-slider-track-size);min-inline-size:0;min-block-size:0;&[data-orientation=vertical]{inline-size:var(--vui-slider-track-size);block-size:100%;>.viraui__slider-module__Track_wvLEH{inline-size:var(--vui-slider-track-size);block-size:100%}}}.viraui__slider-module__Track_wvLEH{position:relative;overflow:visible;inline-size:100%;block-size:var(--vui-slider-track-size);background:var(--vui-slider-track-background);border-radius:var(--radius-infinite)}.viraui__slider-module__Indicator_y3JyJ{background:var(--vui-slider-progress-background);border-radius:inherit}.viraui__slider-module__Thumb_S-uLF{box-sizing:border-box;inline-size:var(--vui-slider-thumb-size);block-size:calc(var(--vui-slider-thumb-size) - 2px);background:var(--vui-slider-thumb-background);border:2px solid var(--vui-slider-progress-background);border-radius:var(--radius-x-small);appearance:none;transition:scale var(--duration-instant) var(--easing-standard);&:not(:disabled,[data-disabled]){cursor:grab}&:not(:disabled,[data-disabled]):active,&:not(:disabled,[data-disabled]):has(>input:active),&:not(:disabled,[data-disabled])[data-dragging]:has(>input:focus){cursor:grabbing;scale:1.2}&:has(>input:focus-visible){outline:var(--outline);outline-offset:var(--outline-offset)}>input:focus-visible{outline:none}}
|
|
@@ -19,5 +19,24 @@
|
|
|
19
19
|
"Wrapping Slider.Control and Slider.Value in extra layout inside Slider.Root",
|
|
20
20
|
"Overriding Slider.Indicator position in CSS"
|
|
21
21
|
],
|
|
22
|
-
"related": ["Textfield", "Stack", "Text"]
|
|
22
|
+
"related": ["Textfield", "Stack", "Text"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"css": {
|
|
25
|
+
"track-size": {
|
|
26
|
+
"description": "Slider track thickness."
|
|
27
|
+
},
|
|
28
|
+
"thumb-size": {
|
|
29
|
+
"description": "Slider thumb size."
|
|
30
|
+
},
|
|
31
|
+
"track-background": {
|
|
32
|
+
"description": "Slider track background color."
|
|
33
|
+
},
|
|
34
|
+
"progress-background": {
|
|
35
|
+
"description": "Slider filled progress color."
|
|
36
|
+
},
|
|
37
|
+
"thumb-background": {
|
|
38
|
+
"description": "Slider thumb fill color."
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
23
42
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './slider.css';
|
|
2
2
|
import { clsx } from "../../core/clsx.js";
|
|
3
3
|
import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
|
|
4
|
-
import { Stack } from "../stack/stack.js";
|
|
5
4
|
import { Text } from "../text/text.js";
|
|
6
5
|
import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
|
|
7
6
|
import { FieldLabel } from "../basic-input/field-label.js";
|
|
7
|
+
import { Stack } from "../stack/stack.js";
|
|
8
8
|
import slider_module_default from "./slider.module.js";
|
|
9
9
|
import { SliderControl } from "./slider-control.js";
|
|
10
10
|
import { isRangeSlider } from "./slider-utils.js";
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
+
//#region src/components/slider/slider.module.css
|
|
2
|
+
var Slider = "viraui__slider-module__Slider_vDNlm";
|
|
3
|
+
var Label = "viraui__slider-module__Label_eQQHf";
|
|
4
|
+
var SliderRoot = "viraui__slider-module__SliderRoot_4JScw";
|
|
5
|
+
var SliderHeader = "viraui__slider-module__SliderHeader_gOy9k";
|
|
6
|
+
var Value = "viraui__slider-module__Value_FaY9i";
|
|
7
|
+
var SliderControl = "viraui__slider-module__SliderControl_FQd5-";
|
|
8
|
+
var Track = "viraui__slider-module__Track_wvLEH";
|
|
9
|
+
var Indicator = "viraui__slider-module__Indicator_y3JyJ";
|
|
10
|
+
var Thumb = "viraui__slider-module__Thumb_S-uLF";
|
|
1
11
|
var slider_module_default = {
|
|
2
|
-
Slider
|
|
3
|
-
Label
|
|
4
|
-
SliderRoot
|
|
5
|
-
SliderHeader
|
|
6
|
-
Value
|
|
7
|
-
SliderControl
|
|
8
|
-
Track
|
|
9
|
-
Indicator
|
|
10
|
-
Thumb
|
|
12
|
+
Slider,
|
|
13
|
+
Label,
|
|
14
|
+
SliderRoot,
|
|
15
|
+
SliderHeader,
|
|
16
|
+
Value,
|
|
17
|
+
SliderControl,
|
|
18
|
+
Track,
|
|
19
|
+
Indicator,
|
|
20
|
+
Thumb
|
|
11
21
|
};
|
|
12
22
|
//#endregion
|
|
13
|
-
export { slider_module_default as default };
|
|
23
|
+
export { Indicator, Label, Slider, SliderControl, SliderHeader, SliderRoot, Thumb, Track, Value, slider_module_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__spinner-module__Spinner_qCQzj{--spinner-size:var(--space-x-large);display:inline-block;inline-size:var(--spinner-size);block-size:var(--spinner-size);flex:none;vertical-align:middle;color:currentColor;&[data-dimension=small]{--spinner-size:var(--space-medium)}&[data-dimension=regular]{--spinner-size:var(--space-large)}}.viraui__spinner-module__Glyph_OV-cy>path{transform-origin:8px 8px;animation:viraui__spinner-module__spinner-bars_jDmaB var(--duration-slowest) infinite}.viraui__spinner-module__Glyph_OV-cy>path:first-child,.viraui__spinner-module__Glyph_OV-cy>path:nth-child(3){opacity:.3;transform:scaleY(.5);animation-delay:calc(var(--duration-slowest) / -2)}@keyframes viraui__spinner-module__spinner-bars_jDmaB{0%,to{opacity:1;transform:scaleY(1)}50%{opacity:.3;transform:scaleY(.5)}}
|
|
1
|
+
.viraui__spinner-module__Spinner_qCQzj{--vui-spinner-size:var(--space-x-large);display:inline-block;inline-size:var(--vui-spinner-size);block-size:var(--vui-spinner-size);flex:none;vertical-align:middle;color:currentColor;&[data-dimension=small]{--vui-spinner-size:var(--space-medium)}&[data-dimension=regular]{--vui-spinner-size:var(--space-large)}}.viraui__spinner-module__Glyph_OV-cy>path{transform-origin:8px 8px;animation:viraui__spinner-module__spinner-bars_jDmaB var(--duration-slowest) infinite}.viraui__spinner-module__Glyph_OV-cy>path:first-child,.viraui__spinner-module__Glyph_OV-cy>path:nth-child(3){opacity:.3;transform:scaleY(.5);animation-delay:calc(var(--duration-slowest) / -2)}@keyframes viraui__spinner-module__spinner-bars_jDmaB{0%,to{opacity:1;transform:scaleY(1)}50%{opacity:.3;transform:scaleY(.5)}}
|
|
@@ -19,5 +19,19 @@
|
|
|
19
19
|
"Using Spinner alone as the only loading announcement for a page",
|
|
20
20
|
"Embedding animation rules outside the component stylesheet"
|
|
21
21
|
],
|
|
22
|
-
"related": ["Button", "IconButton"]
|
|
22
|
+
"related": ["Button", "IconButton"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"react": {
|
|
25
|
+
"size": {
|
|
26
|
+
"description": "Sets the rendered spinner size.",
|
|
27
|
+
"refCss": "size"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"css": {
|
|
31
|
+
"size": {
|
|
32
|
+
"description": "Spinner glyph size on the root.",
|
|
33
|
+
"refReact": "size"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
23
37
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
//#region src/components/spinner/spinner.module.css
|
|
2
|
+
var Spinner = "viraui__spinner-module__Spinner_qCQzj";
|
|
3
|
+
var Glyph = "viraui__spinner-module__Glyph_OV-cy";
|
|
1
4
|
var spinner_module_default = {
|
|
2
|
-
Spinner
|
|
3
|
-
Glyph
|
|
5
|
+
Spinner,
|
|
6
|
+
Glyph,
|
|
4
7
|
"spinner-bars": "viraui__spinner-module__spinner-bars_jDmaB"
|
|
5
8
|
};
|
|
6
9
|
//#endregion
|
|
7
|
-
export { spinner_module_default as default };
|
|
10
|
+
export { Glyph, Spinner, spinner_module_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__stack-module__Stack_NR-Ey{--stack-row-gap:0;--stack-column-gap:0;--stack-h-align:initial;--stack-v-align:initial;--stack-padding-inline-start:0;--stack-padding-inline-end:0;--stack-padding-block-start:0;--stack-padding-block-end:0;container:stack/inline-size block-size;display:flex;gap:var(--stack-row-gap) var(--stack-column-gap);flex-direction:column;align-items:var(--stack-h-align);justify-content:var(--stack-v-align);max-inline-size:var(--stack-max-width,none);min-inline-size:var(--stack-min-width,none);&[data-stack-direction=column-reverse]{flex-direction:column-reverse}&[data-stack-direction=row-reverse],&[data-stack-direction=row]{align-items:var(--stack-v-align);justify-content:var(--stack-h-align)}&[data-stack-direction=row]{flex-direction:row}&[data-stack-direction=row-reverse]{flex-direction:row-reverse}&[data-stack-inline=true]{display:inline-flex;flex-grow:0}:where(&[data-stack-wrap=true]){flex-wrap:wrap}:where(&[data-stack-has-padding=true]){padding:var(--stack-padding-block-start) var(--stack-padding-inline-end) var(--stack-padding-block-end) var(--stack-padding-inline-start)}:where(&[data-stack-fill-children=true]>*){flex-grow:var(--vira-flex-grow,1)}}
|
|
1
|
+
.viraui__stack-module__Stack_NR-Ey{--vui-stack-row-gap:0;--vui-stack-column-gap:0;--vui-stack-h-align:initial;--vui-stack-v-align:initial;--vui-stack-padding-inline-start:0;--vui-stack-padding-inline-end:0;--vui-stack-padding-block-start:0;--vui-stack-padding-block-end:0;container:stack/inline-size block-size;display:flex;gap:var(--vui-stack-row-gap) var(--vui-stack-column-gap);flex-direction:column;align-items:var(--vui-stack-h-align);justify-content:var(--vui-stack-v-align);max-inline-size:var(--vui-stack-max-width,none);min-inline-size:var(--vui-stack-min-width,none);&[data-stack-direction=column-reverse]{flex-direction:column-reverse}&[data-stack-direction=row-reverse],&[data-stack-direction=row]{align-items:var(--vui-stack-v-align);justify-content:var(--vui-stack-h-align)}&[data-stack-direction=row]{flex-direction:row}&[data-stack-direction=row-reverse]{flex-direction:row-reverse}&[data-stack-inline=true]{display:inline-flex;flex-grow:0}:where(&[data-stack-wrap=true]){flex-wrap:wrap}:where(&[data-stack-has-padding=true]){padding:var(--vui-stack-padding-block-start) var(--vui-stack-padding-inline-end) var(--vui-stack-padding-block-end) var(--vui-stack-padding-inline-start)}:where(&[data-stack-fill-children=true]>*){flex-grow:var(--vira-flex-grow,1)}}
|
|
@@ -20,5 +20,81 @@
|
|
|
20
20
|
"Re-declaring primitive flex container rules in app CSS when Stack can own the layout",
|
|
21
21
|
"Using viewport media queries when @container stack queries against the rendered Stack size would match the design intent"
|
|
22
22
|
],
|
|
23
|
-
"related": ["Surface", "Text", "Button"]
|
|
23
|
+
"related": ["Surface", "Text", "Button"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"react": {
|
|
26
|
+
"rowGap": {
|
|
27
|
+
"description": "Sets row gap using a Vira space token.",
|
|
28
|
+
"refCss": "row-gap"
|
|
29
|
+
},
|
|
30
|
+
"columnGap": {
|
|
31
|
+
"description": "Sets column gap using a Vira space token.",
|
|
32
|
+
"refCss": "column-gap"
|
|
33
|
+
},
|
|
34
|
+
"hAlign": {
|
|
35
|
+
"description": "Sets main-axis alignment for column layouts and cross-axis for row layouts.",
|
|
36
|
+
"refCss": "h-align"
|
|
37
|
+
},
|
|
38
|
+
"vAlign": {
|
|
39
|
+
"description": "Sets cross-axis alignment for column layouts and main-axis for row layouts.",
|
|
40
|
+
"refCss": "v-align"
|
|
41
|
+
},
|
|
42
|
+
"hPadding": {
|
|
43
|
+
"description": "Sets inline padding using one token or a [start, end] tuple."
|
|
44
|
+
},
|
|
45
|
+
"vPadding": {
|
|
46
|
+
"description": "Sets block padding using one token or a [start, end] tuple."
|
|
47
|
+
},
|
|
48
|
+
"maxWidth": {
|
|
49
|
+
"description": "Constrains max inline size of the stack root.",
|
|
50
|
+
"refCss": "max-width"
|
|
51
|
+
},
|
|
52
|
+
"minWidth": {
|
|
53
|
+
"description": "Constrains min inline size of the stack root.",
|
|
54
|
+
"refCss": "min-width"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"css": {
|
|
58
|
+
"row-gap": {
|
|
59
|
+
"description": "Flex row gap on the root.",
|
|
60
|
+
"refReact": "rowGap"
|
|
61
|
+
},
|
|
62
|
+
"column-gap": {
|
|
63
|
+
"description": "Flex column gap on the root.",
|
|
64
|
+
"refReact": "columnGap"
|
|
65
|
+
},
|
|
66
|
+
"h-align": {
|
|
67
|
+
"description": "Logical horizontal flex alignment hook.",
|
|
68
|
+
"refReact": "hAlign"
|
|
69
|
+
},
|
|
70
|
+
"v-align": {
|
|
71
|
+
"description": "Logical vertical flex alignment hook.",
|
|
72
|
+
"refReact": "vAlign"
|
|
73
|
+
},
|
|
74
|
+
"padding-inline-start": {
|
|
75
|
+
"description": "Inline-start padding when padding is enabled.",
|
|
76
|
+
"refReact": "hPadding"
|
|
77
|
+
},
|
|
78
|
+
"padding-inline-end": {
|
|
79
|
+
"description": "Inline-end padding when padding is enabled.",
|
|
80
|
+
"refReact": "hPadding"
|
|
81
|
+
},
|
|
82
|
+
"padding-block-start": {
|
|
83
|
+
"description": "Block-start padding when padding is enabled.",
|
|
84
|
+
"refReact": "vPadding"
|
|
85
|
+
},
|
|
86
|
+
"padding-block-end": {
|
|
87
|
+
"description": "Block-end padding when padding is enabled.",
|
|
88
|
+
"refReact": "vPadding"
|
|
89
|
+
},
|
|
90
|
+
"max-width": {
|
|
91
|
+
"description": "Max inline size of the stack root.",
|
|
92
|
+
"refReact": "maxWidth"
|
|
93
|
+
},
|
|
94
|
+
"min-width": {
|
|
95
|
+
"description": "Min inline size of the stack root.",
|
|
96
|
+
"refReact": "minWidth"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
24
100
|
}
|
|
@@ -10,14 +10,14 @@ var Stack = ({ className, direction = "column", fillChildren = true, hAlign = "i
|
|
|
10
10
|
const hasPadding = Boolean(hPadding || vPadding);
|
|
11
11
|
const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
|
|
12
12
|
const dynamicStyle = {
|
|
13
|
-
"--stack-row-gap": resolveThemeValue(rowGap, "space", 0),
|
|
14
|
-
"--stack-column-gap": resolveThemeValue(columnGap, "space", 0),
|
|
15
|
-
"--stack-h-align": hAlign,
|
|
16
|
-
"--stack-v-align": vAlign,
|
|
17
|
-
...maxWidth && { "--stack-max-width": maxWidth },
|
|
18
|
-
...minWidth && { "--stack-min-width": minWidth },
|
|
19
|
-
...resolveAxisPadding(hPadding, "--stack-padding-inline-start", "--stack-padding-inline-end"),
|
|
20
|
-
...resolveAxisPadding(vPadding, "--stack-padding-block-start", "--stack-padding-block-end"),
|
|
13
|
+
"--vui-stack-row-gap": resolveThemeValue(rowGap, "space", 0),
|
|
14
|
+
"--vui-stack-column-gap": resolveThemeValue(columnGap, "space", 0),
|
|
15
|
+
"--vui-stack-h-align": hAlign,
|
|
16
|
+
"--vui-stack-v-align": vAlign,
|
|
17
|
+
...maxWidth && { "--vui-stack-max-width": maxWidth },
|
|
18
|
+
...minWidth && { "--vui-stack-min-width": minWidth },
|
|
19
|
+
...resolveAxisPadding(hPadding, "--vui-stack-padding-inline-start", "--vui-stack-padding-inline-end"),
|
|
20
|
+
...resolveAxisPadding(vPadding, "--vui-stack-padding-block-start", "--vui-stack-padding-block-end"),
|
|
21
21
|
...style
|
|
22
22
|
};
|
|
23
23
|
return useRender({
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/components/stack/stack.module.css
|
|
2
|
+
var Stack = "viraui__stack-module__Stack_NR-Ey";
|
|
3
|
+
var stack_module_default = { Stack };
|
|
2
4
|
//#endregion
|
|
3
|
-
export { stack_module_default as default };
|
|
5
|
+
export { Stack, stack_module_default as default };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
//#region src/components/static-noise/static-noise.module.css
|
|
2
|
+
var StaticNoise = "viraui__static-noise-module__StaticNoise_ZhNxO";
|
|
3
|
+
var FilterSvg = "viraui__static-noise-module__FilterSvg_0CP2y";
|
|
1
4
|
var static_noise_module_default = {
|
|
2
|
-
StaticNoise
|
|
3
|
-
FilterSvg
|
|
5
|
+
StaticNoise,
|
|
6
|
+
FilterSvg
|
|
4
7
|
};
|
|
5
8
|
//#endregion
|
|
6
|
-
export { static_noise_module_default as default };
|
|
9
|
+
export { FilterSvg, StaticNoise, static_noise_module_default as default };
|
|
@@ -31,12 +31,12 @@ var resolvePerCornerRadiusInput = (corners) => ({
|
|
|
31
31
|
bottomRight: resolveRadiusToken(corners[2]),
|
|
32
32
|
bottomLeft: resolveRadiusToken(corners[3])
|
|
33
33
|
});
|
|
34
|
-
var getSurfaceStyleRadius = (style) => style?.["--surface-border-radius"];
|
|
34
|
+
var getSurfaceStyleRadius = (style) => style?.["--vui-surface-border-radius"];
|
|
35
35
|
var getSurfaceRadiusStyle = (radius) => ({
|
|
36
|
-
"--surface-border-radius-top-left": radius.topLeft,
|
|
37
|
-
"--surface-border-radius-top-right": radius.topRight,
|
|
38
|
-
"--surface-border-radius-bottom-right": radius.bottomRight,
|
|
39
|
-
"--surface-border-radius-bottom-left": radius.bottomLeft
|
|
36
|
+
"--vui-surface-border-radius-top-left": radius.topLeft,
|
|
37
|
+
"--vui-surface-border-radius-top-right": radius.topRight,
|
|
38
|
+
"--vui-surface-border-radius-bottom-right": radius.bottomRight,
|
|
39
|
+
"--vui-surface-border-radius-bottom-left": radius.bottomLeft
|
|
40
40
|
});
|
|
41
41
|
var resolveDefaultContext = ({ hPadding, radius, style, vPadding }) => {
|
|
42
42
|
const [paddingInlineStart, paddingInlineEnd] = resolveAxisPaddingValues(hPadding);
|
|
@@ -74,8 +74,8 @@ var useSurfaceRadius = ({ defaults, hPadding, radius, style, vPadding }) => {
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
hasAutoRadius,
|
|
77
|
-
radiusStyle: hasAutoRadius || hasPerCornerRadius ? getSurfaceRadiusStyle(ownRadius) : { "--surface-border-radius": tokenRadius }
|
|
77
|
+
radiusStyle: hasAutoRadius || hasPerCornerRadius ? getSurfaceRadiusStyle(ownRadius) : { "--vui-surface-border-radius": tokenRadius }
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
//#endregion
|
|
81
|
-
export { SurfaceRadiusContext, useSurfaceRadius };
|
|
81
|
+
export { SurfaceRadiusContext, useSurfaceRadius, useSurfaceRadiusContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__surface-module__Surface_slEYq{--surface-border-radius:0;--surface-border-radius-top-left:var(--surface-border-radius);--surface-border-radius-top-right:var(--surface-border-radius);--surface-border-radius-bottom-right:var(--surface-border-radius);--surface-border-radius-bottom-left:var(--surface-border-radius);--surface-padding-inline-start:0;--surface-padding-inline-end:0;--surface-padding-block-start:0;--surface-padding-block-end:0;--surface-background-hover:var(--surface-background)
|
|
1
|
+
.viraui__surface-module__Surface_slEYq{--vui-surface-border-radius:0;--vui-surface-border-radius-top-left:var(--vui-surface-border-radius);--vui-surface-border-radius-top-right:var(--vui-surface-border-radius);--vui-surface-border-radius-bottom-right:var(--vui-surface-border-radius);--vui-surface-border-radius-bottom-left:var(--vui-surface-border-radius);--vui-surface-padding-inline-start:0;--vui-surface-padding-inline-end:0;--vui-surface-padding-block-start:0;--vui-surface-padding-block-end:0;--vui-surface-background-hover:var(--vui-surface-background);container:surface/inline-size block-size;position:relative;overflow:var(--vui-surface-overflow,visible);box-sizing:border-box;background:var(--vui-surface-background,#0000);border-radius:var(--vui-surface-border-radius-top-left) var(--vui-surface-border-radius-top-right) var(--vui-surface-border-radius-bottom-right) var(--vui-surface-border-radius-bottom-left);border:0;@container root not style(--vibrancy-enable: initial){&[data-vibrant]{background:oklab(from var(--vui-surface-background) l a b/80%)}}&[data-surface-radius=auto]{--vui-surface-border-radius-top-left:0;--vui-surface-border-radius-top-right:0;--vui-surface-border-radius-bottom-right:0;--vui-surface-border-radius-bottom-left:0}&[data-surface-has-padding=true]{padding:var(--vui-surface-padding-block-start) var(--vui-surface-padding-inline-end) var(--vui-surface-padding-block-end) var(--vui-surface-padding-inline-start)}&[data-surface-border]{border-style:var(--vui-surface-border-style,solid);border-color:var(--global-contrast)}&[data-surface-border=all]{border-width:1px}&[data-surface-border=top]{border-width:1px 0 0}&[data-surface-border=right]{border-width:0 1px 0 0}&[data-surface-border=bottom]{border-width:0 0 1px}&[data-surface-border=left]{border-width:0 0 0 1px}&[data-surface-border=x]{border-width:0 1px}&[data-surface-border=y]{border-width:1px 0}@media (hover:hover) and (pointer:fine){&[data-surface-has-hover-color=true]:hover{background:var(--vui-surface-background-hover)}}}
|
|
@@ -69,7 +69,7 @@ export type SurfaceProps = Omit<React.ComponentPropsWithoutRef<'div'>, 'color'>
|
|
|
69
69
|
*/
|
|
70
70
|
vPadding?: SurfacePadding;
|
|
71
71
|
/**
|
|
72
|
-
* Sets root overflow through the `--surface-overflow` custom property.
|
|
72
|
+
* Sets root overflow through the `--vui-surface-overflow` custom property.
|
|
73
73
|
*
|
|
74
74
|
* @default visible
|
|
75
75
|
*/
|
|
@@ -29,5 +29,89 @@
|
|
|
29
29
|
"Expecting radius=\"auto\" to inherit a token when the nearest ancestor Surface has no radius set",
|
|
30
30
|
"Using viewport media queries when @container surface queries against the rendered Surface size would match the design intent"
|
|
31
31
|
],
|
|
32
|
-
"related": ["Elevator", "Stack"]
|
|
32
|
+
"related": ["Elevator", "Stack"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"react": {
|
|
35
|
+
"color": {
|
|
36
|
+
"description": "Sets the resting background using a base ramp layer or literal CSS color.",
|
|
37
|
+
"refCss": "background"
|
|
38
|
+
},
|
|
39
|
+
"hoverColor": {
|
|
40
|
+
"description": "Sets the hover background on hover-capable pointers.",
|
|
41
|
+
"refCss": "background-hover"
|
|
42
|
+
},
|
|
43
|
+
"borderStyle": {
|
|
44
|
+
"description": "Sets the CSS border style when border is set.",
|
|
45
|
+
"refCss": "border-style"
|
|
46
|
+
},
|
|
47
|
+
"overflow": {
|
|
48
|
+
"description": "Sets root overflow through the surface overflow custom property.",
|
|
49
|
+
"refCss": "overflow"
|
|
50
|
+
},
|
|
51
|
+
"radius": {
|
|
52
|
+
"description": "Sets corner radius from tokens, a per-corner tuple, or auto for concentric radii.",
|
|
53
|
+
"refCss": "border-radius"
|
|
54
|
+
},
|
|
55
|
+
"hPadding": {
|
|
56
|
+
"description": "Sets inline padding using one token or a [start, end] tuple."
|
|
57
|
+
},
|
|
58
|
+
"vPadding": {
|
|
59
|
+
"description": "Sets block padding using one token or a [start, end] tuple."
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"css": {
|
|
63
|
+
"background": {
|
|
64
|
+
"description": "Resting surface background on the root.",
|
|
65
|
+
"refReact": "color"
|
|
66
|
+
},
|
|
67
|
+
"background-hover": {
|
|
68
|
+
"description": "Hover surface background on the root.",
|
|
69
|
+
"refReact": "hoverColor"
|
|
70
|
+
},
|
|
71
|
+
"border-style": {
|
|
72
|
+
"description": "Border style when border is enabled.",
|
|
73
|
+
"refReact": "borderStyle"
|
|
74
|
+
},
|
|
75
|
+
"overflow": {
|
|
76
|
+
"description": "Root overflow behavior.",
|
|
77
|
+
"refReact": "overflow"
|
|
78
|
+
},
|
|
79
|
+
"border-radius": {
|
|
80
|
+
"description": "Uniform corner radius when radius is a single token.",
|
|
81
|
+
"refReact": "radius"
|
|
82
|
+
},
|
|
83
|
+
"border-radius-top-left": {
|
|
84
|
+
"description": "Top-left corner radius; radius tuple or auto resolves per corner.",
|
|
85
|
+
"refReact": "radius"
|
|
86
|
+
},
|
|
87
|
+
"border-radius-top-right": {
|
|
88
|
+
"description": "Top-right corner radius; radius tuple or auto resolves per corner.",
|
|
89
|
+
"refReact": "radius"
|
|
90
|
+
},
|
|
91
|
+
"border-radius-bottom-right": {
|
|
92
|
+
"description": "Bottom-right corner radius; radius tuple or auto resolves per corner.",
|
|
93
|
+
"refReact": "radius"
|
|
94
|
+
},
|
|
95
|
+
"border-radius-bottom-left": {
|
|
96
|
+
"description": "Bottom-left corner radius; radius tuple or auto resolves per corner.",
|
|
97
|
+
"refReact": "radius"
|
|
98
|
+
},
|
|
99
|
+
"padding-inline-start": {
|
|
100
|
+
"description": "Inline-start padding when padding is enabled.",
|
|
101
|
+
"refReact": "hPadding"
|
|
102
|
+
},
|
|
103
|
+
"padding-inline-end": {
|
|
104
|
+
"description": "Inline-end padding when padding is enabled.",
|
|
105
|
+
"refReact": "hPadding"
|
|
106
|
+
},
|
|
107
|
+
"padding-block-start": {
|
|
108
|
+
"description": "Block-start padding when padding is enabled.",
|
|
109
|
+
"refReact": "vPadding"
|
|
110
|
+
},
|
|
111
|
+
"padding-block-end": {
|
|
112
|
+
"description": "Block-end padding when padding is enabled.",
|
|
113
|
+
"refReact": "vPadding"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
33
117
|
}
|
|
@@ -32,13 +32,13 @@ var Surface = ({ border, borderStyle = "solid", className, color, hPadding, hove
|
|
|
32
32
|
vPadding
|
|
33
33
|
});
|
|
34
34
|
const dynamicStyle = {
|
|
35
|
-
"--surface-background": toSurfaceColor(color ?? "none"),
|
|
36
|
-
...hasHoverColor && { "--surface-background-hover": toSurfaceColor(hoverColor) },
|
|
37
|
-
...border && { "--surface-border-style": borderStyle },
|
|
38
|
-
"--surface-overflow": overflow,
|
|
35
|
+
"--vui-surface-background": toSurfaceColor(color ?? "none"),
|
|
36
|
+
...hasHoverColor && { "--vui-surface-background-hover": toSurfaceColor(hoverColor) },
|
|
37
|
+
...border && { "--vui-surface-border-style": borderStyle },
|
|
38
|
+
...overflow && { "--vui-surface-overflow": overflow },
|
|
39
39
|
...radiusStyle,
|
|
40
|
-
...resolveAxisPadding(hPadding, "--surface-padding-inline-start", "--surface-padding-inline-end"),
|
|
41
|
-
...resolveAxisPadding(vPadding, "--surface-padding-block-start", "--surface-padding-block-end"),
|
|
40
|
+
...resolveAxisPadding(hPadding, "--vui-surface-padding-inline-start", "--vui-surface-padding-inline-end"),
|
|
41
|
+
...resolveAxisPadding(vPadding, "--vui-surface-padding-block-start", "--vui-surface-padding-block-end"),
|
|
42
42
|
...style
|
|
43
43
|
};
|
|
44
44
|
const surface = useRender({
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/components/surface/surface.module.css
|
|
2
|
+
var Surface = "viraui__surface-module__Surface_slEYq";
|
|
3
|
+
var surface_module_default = { Surface };
|
|
2
4
|
//#endregion
|
|
3
|
-
export { surface_module_default as default };
|
|
5
|
+
export { Surface, surface_module_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__switch-module__Switch_L86y7{--switch-track-block-size:var(--space-large);--switch-track-radius:var(--radius-small);--switch-track-background:var(--global-contrast);--switch-thumb-background:var(--base-
|
|
1
|
+
.viraui__switch-module__Switch_L86y7{--vui-switch-track-block-size:var(--space-large);--vui-switch-track-radius:var(--radius-small);--vui-switch-track-background:var(--global-contrast);--vui-switch-thumb-background:var(--base-1);--vui-switch-thumb-size:calc(var(--space-large) - var(--space-x-small));--vui-switch-thumb-inset:var(--space-2x-small);&:has([required]) .viraui__switch-module__Label_9R-rv:after{content:" *";color:var(--highlight-red)}}.viraui__switch-module__SwitchRoot_Zv9An{position:relative;appearance:none;border:0;box-shadow:none;inline-size:calc((var(--vui-switch-thumb-size) * 2) + var(--vui-switch-thumb-inset) * 2);block-size:var(--vui-switch-track-block-size);background:var(--vui-switch-track-background);border-radius:var(--vui-switch-track-radius);&[data-size=small]{--vui-switch-track-radius:var(--radius-x-small);--vui-switch-track-block-size:var(--space-medium);--vui-switch-thumb-size:calc(var(--space-medium) - var(--space-x-small))}&[data-checked]:not([data-disabled]){--vui-switch-track-background:var(--global-primary);--vui-switch-thumb-background:contrast-color(var(--global-primary))}&[data-invalid]:not([data-disabled]),.viraui__switch-module__Switch_L86y7[data-invalid]>&:not([data-disabled]){box-shadow:inset 0 0 0 1px var(--highlight-red);outline-color:oklab(from var(--highlight-red) l a b/.5)}&[data-disabled],.viraui__switch-module__Switch_L86y7[data-disabled]>&{--vui-switch-track-background:var(--global-disabled-background);--vui-switch-thumb-background:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.viraui__switch-module__Thumb_ldwJw{--switch-thumb-radius:calc(var(--vui-switch-track-radius) - var(--vui-switch-thumb-inset));position:absolute;inset-block:var(--vui-switch-thumb-inset);inset-inline-start:var(--vui-switch-thumb-inset);background:var(--vui-switch-thumb-background);inline-size:var(--vui-switch-thumb-size);block-size:var(--vui-switch-thumb-size);border-radius:var(--switch-thumb-radius);transition:translate var(--easing-entrance) var(--duration-fast);box-shadow:0 0 1px 1px var(--global-contrast);.viraui__switch-module__SwitchRoot_Zv9An[data-checked]>&{translate:100% 0;box-shadow:none}.viraui__switch-module__SwitchRoot_Zv9An[data-checked]:dir(rtl)>&{translate:-100% 0}}
|
|
@@ -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
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './switch.css';
|
|
2
2
|
import { clsx } from "../../core/clsx.js";
|
|
3
3
|
import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
|
|
4
|
-
import { Stack } from "../stack/stack.js";
|
|
5
4
|
import { FieldHelperCopy } from "../basic-input/field-helper-copy.js";
|
|
6
5
|
import { FieldLabel } from "../basic-input/field-label.js";
|
|
6
|
+
import { Stack } from "../stack/stack.js";
|
|
7
7
|
import switch_module_default from "./switch.module.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Field } from "@base-ui/react/field";
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
//#region src/components/switch/switch.module.css
|
|
2
|
+
var Switch = "viraui__switch-module__Switch_L86y7";
|
|
3
|
+
var Label = "viraui__switch-module__Label_9R-rv";
|
|
4
|
+
var SwitchRoot = "viraui__switch-module__SwitchRoot_Zv9An";
|
|
5
|
+
var Thumb = "viraui__switch-module__Thumb_ldwJw";
|
|
1
6
|
var switch_module_default = {
|
|
2
|
-
Switch
|
|
3
|
-
Label
|
|
4
|
-
SwitchRoot
|
|
5
|
-
Thumb
|
|
7
|
+
Switch,
|
|
8
|
+
Label,
|
|
9
|
+
SwitchRoot,
|
|
10
|
+
Thumb
|
|
6
11
|
};
|
|
7
12
|
//#endregion
|
|
8
|
-
export { switch_module_default as default };
|
|
13
|
+
export { Label, Switch, SwitchRoot, Thumb, switch_module_default as default };
|
|
@@ -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
|