@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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import './meter.css';
|
|
2
|
+
import { clsx } from "../../core/clsx.js";
|
|
3
|
+
import { extractIntrinsicViraProps } from "../../core/props/intrinsic-vira-props.js";
|
|
4
|
+
import { Stack } from "../stack/stack.js";
|
|
5
|
+
import { Text } from "../text/text.js";
|
|
6
|
+
import { FieldLabel } from "../basic-input/field-label.js";
|
|
7
|
+
import meter_module_default from "./meter.module.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Meter } from "@base-ui/react";
|
|
10
|
+
//#region src/components/meter/meter.tsx
|
|
11
|
+
var Meter$1 = ({ className, description, label, showValue = false, value, ...otherProps }) => {
|
|
12
|
+
const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
|
|
13
|
+
return /* @__PURE__ */ jsxs(Meter.Root, {
|
|
14
|
+
...componentProps,
|
|
15
|
+
...intrinsicAttributes,
|
|
16
|
+
className: clsx(meter_module_default.Meter, className),
|
|
17
|
+
value,
|
|
18
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
19
|
+
direction: "column",
|
|
20
|
+
fillChildren: false,
|
|
21
|
+
rowGap: "small",
|
|
22
|
+
columnGap: "x-small"
|
|
23
|
+
}),
|
|
24
|
+
children: [
|
|
25
|
+
(label || showValue) && /* @__PURE__ */ jsxs(Stack, {
|
|
26
|
+
direction: "row",
|
|
27
|
+
fillChildren: false,
|
|
28
|
+
columnGap: "small",
|
|
29
|
+
vAlign: "center",
|
|
30
|
+
hAlign: "space-between",
|
|
31
|
+
children: [label && /* @__PURE__ */ jsx(Meter.Label, {
|
|
32
|
+
render: /* @__PURE__ */ jsx(FieldLabel, {}),
|
|
33
|
+
children: label
|
|
34
|
+
}), showValue && /* @__PURE__ */ jsx(Text, {
|
|
35
|
+
size: "small",
|
|
36
|
+
tone: "muted",
|
|
37
|
+
family: "mono",
|
|
38
|
+
whiteSpace: "nowrap",
|
|
39
|
+
selection: false,
|
|
40
|
+
align: "end",
|
|
41
|
+
shrink: false,
|
|
42
|
+
render: /* @__PURE__ */ jsx(Meter.Value, { render: /* @__PURE__ */ jsx("output", {}) })
|
|
43
|
+
})]
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx(Meter.Track, {
|
|
46
|
+
className: meter_module_default.Track,
|
|
47
|
+
children: /* @__PURE__ */ jsx(Meter.Indicator, { className: meter_module_default.Indicator })
|
|
48
|
+
}),
|
|
49
|
+
description && /* @__PURE__ */ jsx(Text, {
|
|
50
|
+
className: meter_module_default.Description,
|
|
51
|
+
size: "small",
|
|
52
|
+
tone: "muted",
|
|
53
|
+
children: description
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Meter$1 as Meter };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Popover, PopoverClose, PopoverDescription, PopoverTitle, PopoverTrigger } from './popover';
|
|
2
|
+
export type { PopoverCloseProps, PopoverDescriptionProps, PopoverProps, PopoverTitleProps, PopoverTriggerProps, } from './popover';
|
|
3
|
+
export { PopoverSheet } from './popover-sheet';
|
|
4
|
+
export type { PopoverSheetProps } from './popover-sheet';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PopoverPositioner } from '@base-ui/react/popover';
|
|
2
|
+
import { StackProps } from '..';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
type PopoverSheetPositionerProps = Omit<PopoverPositioner.Props, 'className' | 'style' | 'render'>;
|
|
5
|
+
type PopoverSheetStyledProps = PopoverSheetPositionerProps & {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to skip the built-in Surface, header, and close chrome and render
|
|
8
|
+
* only the positioning/animation shell (Portal + Positioner + Popup + Viewport).
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
unstyled?: false;
|
|
13
|
+
/**
|
|
14
|
+
* Accessible popover title rendered as the popup heading.
|
|
15
|
+
*/
|
|
16
|
+
title: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Supporting copy announced with the title.
|
|
19
|
+
*
|
|
20
|
+
* @default No description is rendered.
|
|
21
|
+
*/
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to show the built-in flat IconButton close control.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
showCloseButton?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Aligns the header content.
|
|
31
|
+
*
|
|
32
|
+
* @default `start`
|
|
33
|
+
*/
|
|
34
|
+
headerAlign?: Extract<StackProps['hAlign'], 'start' | 'center' | 'end'>;
|
|
35
|
+
};
|
|
36
|
+
type PopoverSheetUnstyledProps = PopoverSheetPositionerProps & {
|
|
37
|
+
/**
|
|
38
|
+
* Renders only the positioning/animation shell; compose `Popover.Title`,
|
|
39
|
+
* `Popover.Description`, and any chrome inside `children`.
|
|
40
|
+
*/
|
|
41
|
+
unstyled: true;
|
|
42
|
+
title?: never;
|
|
43
|
+
description?: never;
|
|
44
|
+
showCloseButton?: never;
|
|
45
|
+
headerAlign?: never;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Public Popover.Sheet props.
|
|
49
|
+
*
|
|
50
|
+
* Encapsulates Portal + Positioner + Popup + Viewport + Title + Description +
|
|
51
|
+
* optional body `children`. Positioning props forward to the Positioner; `sideOffset`
|
|
52
|
+
* defaults to `8`. Always renders the internal Viewport so multi-trigger content
|
|
53
|
+
* animations work by default. Compose `Popover.Close` inside `children` when a
|
|
54
|
+
* close control is needed, or set `showCloseButton` for the built-in flat IconButton.
|
|
55
|
+
*
|
|
56
|
+
* With `unstyled`, the built-in Surface, header, and close chrome are skipped and
|
|
57
|
+
* `children` render directly inside the Viewport; the consumer owns the popup markup
|
|
58
|
+
* and must compose `Popover.Title` (and `Popover.Description` when needed) for
|
|
59
|
+
* accessible naming.
|
|
60
|
+
*
|
|
61
|
+
* @default `sideOffset` is `8`; no description, no close button, styled chrome.
|
|
62
|
+
*/
|
|
63
|
+
export type PopoverSheetProps = PopoverSheetStyledProps | PopoverSheetUnstyledProps;
|
|
64
|
+
export declare const PopoverSheet: React.FC<PopoverSheetProps>;
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Stack } from "../stack/stack.js";
|
|
2
|
+
import { IconButton } from "../icon-button/icon-button.js";
|
|
3
|
+
import { Text } from "../text/text.js";
|
|
4
|
+
import popover_module_default from "./popover.module.js";
|
|
5
|
+
import { Icon } from "../icon/icon.js";
|
|
6
|
+
import { Surface } from "../surface/surface.js";
|
|
7
|
+
import { Title } from "../title/title.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Popover } from "@base-ui/react/popover";
|
|
10
|
+
//#region src/components/popover/popover-sheet.tsx
|
|
11
|
+
var PopoverSheet = ({ unstyled, title, description, children, showCloseButton = false, headerAlign = "start", sideOffset = 8, ...positionerProps }) => /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
12
|
+
className: popover_module_default.Sheet,
|
|
13
|
+
sideOffset,
|
|
14
|
+
...positionerProps,
|
|
15
|
+
children: unstyled ? /* @__PURE__ */ jsx(Popover.Popup, {
|
|
16
|
+
className: popover_module_default.Popup,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Popover.Viewport, {
|
|
18
|
+
className: popover_module_default.Viewport,
|
|
19
|
+
"data-unstyled": "",
|
|
20
|
+
children
|
|
21
|
+
})
|
|
22
|
+
}) : /* @__PURE__ */ jsx(Popover.Popup, {
|
|
23
|
+
className: popover_module_default.Popup,
|
|
24
|
+
render: /* @__PURE__ */ jsx(Surface, {
|
|
25
|
+
color: 1,
|
|
26
|
+
border: "all",
|
|
27
|
+
radius: "large",
|
|
28
|
+
vibrant: true,
|
|
29
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
30
|
+
rowGap: "medium",
|
|
31
|
+
fillChildren: false
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
children: /* @__PURE__ */ jsxs(Popover.Viewport, {
|
|
35
|
+
className: popover_module_default.Viewport,
|
|
36
|
+
render: /* @__PURE__ */ jsx(Stack, {
|
|
37
|
+
rowGap: "medium",
|
|
38
|
+
vPadding: "medium",
|
|
39
|
+
hPadding: "medium",
|
|
40
|
+
fillChildren: false
|
|
41
|
+
}),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
44
|
+
hAlign: headerAlign,
|
|
45
|
+
rowGap: "small",
|
|
46
|
+
vAlign: "start",
|
|
47
|
+
vPadding: [0, children ? "medium" : 0],
|
|
48
|
+
children: [/* @__PURE__ */ jsx(Popover.Title, {
|
|
49
|
+
render: /* @__PURE__ */ jsx(Title, {
|
|
50
|
+
align: headerAlign,
|
|
51
|
+
level: "h6",
|
|
52
|
+
lineHeight: "x-small"
|
|
53
|
+
}),
|
|
54
|
+
children: title
|
|
55
|
+
}), description && /* @__PURE__ */ jsx(Popover.Description, {
|
|
56
|
+
render: /* @__PURE__ */ jsx(Text, {
|
|
57
|
+
align: headerAlign,
|
|
58
|
+
tone: "muted",
|
|
59
|
+
render: /* @__PURE__ */ jsx("p", {})
|
|
60
|
+
}),
|
|
61
|
+
children: description
|
|
62
|
+
})]
|
|
63
|
+
}),
|
|
64
|
+
showCloseButton && /* @__PURE__ */ jsx(Popover.Close, {
|
|
65
|
+
className: popover_module_default.CloseButton,
|
|
66
|
+
render: /* @__PURE__ */ jsx(IconButton, {
|
|
67
|
+
"aria-label": "Close popover",
|
|
68
|
+
icon: /* @__PURE__ */ jsx(Icon, { name: "Xmark" }),
|
|
69
|
+
size: "small",
|
|
70
|
+
variant: "flat"
|
|
71
|
+
})
|
|
72
|
+
}),
|
|
73
|
+
children
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
}) });
|
|
78
|
+
//#endregion
|
|
79
|
+
export { PopoverSheet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.viraui__popover-module__Sheet_4x-7H{width:var(--positioner-width);height:var(--positioner-height);max-width:var(--available-width);transition:top var(--duration-fast) var(--easing-standard),right var(--duration-fast) var(--easing-standard),bottom var(--duration-fast) var(--easing-standard),left var(--duration-fast) var(--easing-standard),transform var(--duration-fast) var(--easing-standard);&[data-instant=click],&[data-instant=dismiss]{transition:none}@media (prefers-reduced-motion:reduce){transition:none}}.viraui__popover-module__Popup_pJyIh{position:relative;box-sizing:border-box;width:var(--popup-width,auto);height:var(--popup-height,auto);transform-origin:var(--transform-origin);transition:width var(--duration-fast) var(--easing-standard),height var(--duration-fast) var(--easing-standard),opacity var(--duration-fast) var(--easing-entrance),transform var(--duration-fast) var(--easing-entrance);&[data-ending-style],&[data-starting-style]{opacity:0;transform:scale(.96)}&[data-instant=click],&[data-instant=dismiss]{transition:none}@media (prefers-reduced-motion:reduce){transition:none;&[data-ending-style],&[data-starting-style]{opacity:1;transform:none}}}.viraui__popover-module__Viewport_KrjBC{--vui-popover-content-fade-duration:var(--duration-fast);position:relative;display:grid;grid-template-columns:minmax(0,1fr);overflow:clip;width:100%;height:100%;&>[data-current],&>[data-previous]{grid-area:1/1;inline-size:calc(var(--popup-width) - 2px - var(--vui-stack-padding-inline-start) - var(--vui-stack-padding-inline-end))}&[data-unstyled]>:is([data-current],[data-previous]){inline-size:var(--popup-width,100%)}&[data-unstyled]>[data-previous]{block-size:var(--popup-height,100%)}&>[data-previous]{position:absolute;block-size:calc(var(--popup-height) - 2px - var(--vui-stack-padding-block-start) - var(--vui-stack-padding-block-end));overflow:clip;pointer-events:none;opacity:1;transition:opacity var(--vui-popover-content-fade-duration) var(--easing-standard)}&>[data-previous][data-ending-style]{opacity:0}&>[data-current]{opacity:1;transition:opacity var(--vui-popover-content-fade-duration) var(--easing-entrance)}&>[data-current][data-starting-style]{opacity:0}&[data-instant=click]>[data-current],&[data-instant=click]>[data-previous],&[data-instant=dismiss]>[data-current],&[data-instant=dismiss]>[data-previous]{transition:none}@media (prefers-reduced-motion:reduce){&>[data-current],&>[data-previous]{transition:none}&>[data-current][data-starting-style],&>[data-previous][data-ending-style]{opacity:1}}}.viraui__popover-module__CloseButton_YOe2L.viraui__popover-module__CloseButton_YOe2L{position:absolute;inset-block-start:var(--space-small);inset-inline-end:var(--space-small)}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Popover as PrimitivePopover, PopoverClose as PopoverCloseNamespace, PopoverDescription as PopoverDescriptionNamespace, PopoverRoot, PopoverTitle as PopoverTitleNamespace, PopoverTrigger as PopoverTriggerNamespace } from '@base-ui/react/popover';
|
|
2
|
+
import { PopoverSheetProps } from './popover-sheet';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Public Popover root props.
|
|
6
|
+
*
|
|
7
|
+
* Pass-through to Base UI `Popover.Root`. Supports `open`/`defaultOpen`/`onOpenChange`,
|
|
8
|
+
* `modal` (focus trap and outside interaction), `triggerId` for controlled activation,
|
|
9
|
+
* and `handle` for detached/multiple triggers. `children` may be a node or a
|
|
10
|
+
* `({ payload }) => ReactNode` render function for per-trigger content.
|
|
11
|
+
*
|
|
12
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
13
|
+
*/
|
|
14
|
+
export type PopoverProps = PopoverRoot.Props;
|
|
15
|
+
/**
|
|
16
|
+
* Public Popover.Trigger props.
|
|
17
|
+
*
|
|
18
|
+
* Pass-through to Base UI `Popover.Trigger`. Use `render` for the visible control
|
|
19
|
+
* (`Button`, `IconButton`, or another element) and set `nativeButton` when the
|
|
20
|
+
* rendered root is not a native `<button>`. Pass `handle` for detached triggers,
|
|
21
|
+
* `payload` for per-trigger content, `openOnHover`/`delay`/`closeDelay` for hover
|
|
22
|
+
* open behavior, and `id` for controlled activation via the Root `triggerId` prop.
|
|
23
|
+
*
|
|
24
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
25
|
+
*/
|
|
26
|
+
export type PopoverTriggerProps = PopoverTriggerNamespace.Props;
|
|
27
|
+
/**
|
|
28
|
+
* Public Popover.Close props.
|
|
29
|
+
*
|
|
30
|
+
* Pass-through to Base UI `Popover.Close`. Use `render` for the visible control
|
|
31
|
+
* (`Button`, `IconButton`, or another element) and set `nativeButton` when the
|
|
32
|
+
* rendered root is not a native `<button>`.
|
|
33
|
+
*
|
|
34
|
+
* Compose inside `Popover.Sheet` so the control closes the open popover.
|
|
35
|
+
*
|
|
36
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
37
|
+
*/
|
|
38
|
+
export type PopoverCloseProps = PopoverCloseNamespace.Props;
|
|
39
|
+
/**
|
|
40
|
+
* Public Popover.Title props.
|
|
41
|
+
*
|
|
42
|
+
* Pass-through to Base UI `Popover.Title`. Use `render` for the visible heading
|
|
43
|
+
* (for example the Vira `Title` primitive). Compose inside an `unstyled`
|
|
44
|
+
* `Popover.Sheet` so the popup keeps an accessible name; the styled sheet
|
|
45
|
+
* renders it internally from its `title` prop.
|
|
46
|
+
*
|
|
47
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
48
|
+
*/
|
|
49
|
+
export type PopoverTitleProps = PopoverTitleNamespace.Props;
|
|
50
|
+
/**
|
|
51
|
+
* Public Popover.Description props.
|
|
52
|
+
*
|
|
53
|
+
* Pass-through to Base UI `Popover.Description`. Use `render` for the visible
|
|
54
|
+
* copy (for example the Vira `Text` primitive). Compose inside an `unstyled`
|
|
55
|
+
* `Popover.Sheet`; the styled sheet renders it internally from its
|
|
56
|
+
* `description` prop.
|
|
57
|
+
*
|
|
58
|
+
* @default Base UI pass-through props keep upstream defaults.
|
|
59
|
+
*/
|
|
60
|
+
export type PopoverDescriptionProps = PopoverDescriptionNamespace.Props;
|
|
61
|
+
export declare const PopoverTrigger: PrimitivePopover.Trigger;
|
|
62
|
+
export declare const PopoverClose: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').PopoverCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
63
|
+
export declare const PopoverTitle: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').PopoverTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
64
|
+
export declare const PopoverDescription: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').PopoverDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
65
|
+
type PopoverComponent = React.FC<PopoverProps> & {
|
|
66
|
+
Trigger: React.FC<PopoverTriggerProps>;
|
|
67
|
+
Sheet: React.FC<PopoverSheetProps>;
|
|
68
|
+
Close: React.FC<PopoverCloseProps>;
|
|
69
|
+
Title: React.FC<PopoverTitleProps>;
|
|
70
|
+
Description: React.FC<PopoverDescriptionProps>;
|
|
71
|
+
createHandle: typeof PrimitivePopover.createHandle;
|
|
72
|
+
};
|
|
73
|
+
export declare const Popover: PopoverComponent;
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Popover",
|
|
3
|
+
"summary": "Compound popover built on Base UI Popover with `Popover.Trigger`, `Popover.Sheet`, `Popover.Close`, `Popover.Title`, `Popover.Description`, and `Popover.createHandle` for detached and multiple triggers; `Sheet` encapsulates Portal + Positioner + Popup + Viewport + Title + Description and animates position, size, and content between triggers; `Sheet` with `unstyled` skips the built-in Surface and header so the consumer composes the popup chrome, including `Popover.Title` and `Popover.Description`.",
|
|
4
|
+
"whenToUse": [
|
|
5
|
+
"Anchored quick actions or contextual hints next to a triggering control",
|
|
6
|
+
"Lightweight forms or confirmations that float beside the trigger without blocking the page",
|
|
7
|
+
"Multi-trigger panels that swap content with direction-aware animations using `Popover.createHandle` and trigger `payload`",
|
|
8
|
+
"Hover-revealed hints via `openOnHover` with `delay` and `closeDelay`",
|
|
9
|
+
"Fully custom popup chrome via `Sheet` `unstyled` composed with `Popover.Title` and `Popover.Description`"
|
|
10
|
+
],
|
|
11
|
+
"whenNotToUse": [
|
|
12
|
+
"Modal tasks that must block the page and demand focused attention (use Dialog)",
|
|
13
|
+
"Nested drill-down sheet flows (use Dialog)",
|
|
14
|
+
"System-wide transient alerts and confirmations (use Toast)"
|
|
15
|
+
],
|
|
16
|
+
"accessibility": [
|
|
17
|
+
"Always pass `title`; add `description` when the heading alone is not enough context",
|
|
18
|
+
"With `unstyled`, render `Popover.Title` inside `children` (and `Popover.Description` when needed) so the popup keeps an accessible name",
|
|
19
|
+
"Compose `Popover.Close` with an accessible name when a visible close control is needed, or set `showCloseButton` for the built-in one",
|
|
20
|
+
"Use `modal` to control focus trap and outside interaction; render a `Popover.Close` inside the popup when `modal` is `true` or `'trap-focus'` so touch screen readers can escape"
|
|
21
|
+
],
|
|
22
|
+
"antiPatterns": [
|
|
23
|
+
"Opening a popover without `title` copy for assistive technologies",
|
|
24
|
+
"Rendering heavy or scroll-bound content that belongs in a Dialog",
|
|
25
|
+
"Expecting `Popover.Arrow` (it is intentionally not exported or rendered)"
|
|
26
|
+
],
|
|
27
|
+
"related": ["Surface", "Button", "IconButton", "Stack", "Dialog", "Tabs"]
|
|
28
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import './popover.css';
|
|
2
|
+
import { PopoverSheet } from "./popover-sheet.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Popover } from "@base-ui/react/popover";
|
|
5
|
+
//#region src/components/popover/popover.tsx
|
|
6
|
+
var PopoverTrigger = Popover.Trigger;
|
|
7
|
+
var PopoverClose = Popover.Close;
|
|
8
|
+
var PopoverTitle = Popover.Title;
|
|
9
|
+
var PopoverDescription = Popover.Description;
|
|
10
|
+
var PopoverRootComponent = ({ children, ...otherProps }) => /* @__PURE__ */ jsx(Popover.Root, {
|
|
11
|
+
...otherProps,
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
var Popover$1 = Object.assign(PopoverRootComponent, {
|
|
15
|
+
Trigger: Popover.Trigger,
|
|
16
|
+
Sheet: PopoverSheet,
|
|
17
|
+
Close: Popover.Close,
|
|
18
|
+
Title: Popover.Title,
|
|
19
|
+
Description: Popover.Description,
|
|
20
|
+
createHandle: Popover.createHandle
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Popover$1 as Popover, PopoverClose, PopoverDescription, PopoverTitle, PopoverTrigger };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var popover_module_default = {
|
|
2
|
+
Sheet: "viraui__popover-module__Sheet_4x-7H",
|
|
3
|
+
Popup: "viraui__popover-module__Popup_pJyIh",
|
|
4
|
+
Viewport: "viraui__popover-module__Viewport_KrjBC",
|
|
5
|
+
CloseButton: "viraui__popover-module__CloseButton_YOe2L"
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { popover_module_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__progressive-blur-module__ProgressiveBlur_eIxTK{--progressive-blur:16px;pointer-events:none}.viraui__progressive-blur-module__Layer_zbzMS{position:absolute;inset:0;backdrop-filter:blur(calc(var(--progressive-blur) * var(--progressive-blur-factor)));mask-image:var(--progressive-blur-mask-image);.viraui__progressive-blur-module__ProgressiveBlur_eIxTK[data-direction=top] &{--progressive-blur-mask-image:linear-gradient(to top,var(--progressive-blur-mask-gradient))}.viraui__progressive-blur-module__ProgressiveBlur_eIxTK[data-direction=right] &{--progressive-blur-mask-image:linear-gradient(to right,var(--progressive-blur-mask-gradient))}.viraui__progressive-blur-module__ProgressiveBlur_eIxTK[data-direction=bottom] &{--progressive-blur-mask-image:linear-gradient(to bottom,var(--progressive-blur-mask-gradient))}.viraui__progressive-blur-module__ProgressiveBlur_eIxTK[data-direction=left] &{--progressive-blur-mask-image:linear-gradient(to left,var(--progressive-blur-mask-gradient))}}
|
|
1
|
+
.viraui__progressive-blur-module__ProgressiveBlur_eIxTK{--vui-progressive-blur-amount:16px;pointer-events:none}.viraui__progressive-blur-module__Layer_zbzMS{position:absolute;inset:0;backdrop-filter:blur(calc(var(--vui-progressive-blur-amount) * var(--progressive-blur-factor)));mask-image:var(--progressive-blur-mask-image);.viraui__progressive-blur-module__ProgressiveBlur_eIxTK[data-direction=top] &{--progressive-blur-mask-image:linear-gradient(to top,var(--progressive-blur-mask-gradient))}.viraui__progressive-blur-module__ProgressiveBlur_eIxTK[data-direction=right] &{--progressive-blur-mask-image:linear-gradient(to right,var(--progressive-blur-mask-gradient))}.viraui__progressive-blur-module__ProgressiveBlur_eIxTK[data-direction=bottom] &{--progressive-blur-mask-image:linear-gradient(to bottom,var(--progressive-blur-mask-gradient))}.viraui__progressive-blur-module__ProgressiveBlur_eIxTK[data-direction=left] &{--progressive-blur-mask-image:linear-gradient(to left,var(--progressive-blur-mask-gradient))}}
|
|
@@ -21,5 +21,19 @@
|
|
|
21
21
|
"Driving layout size or scroll behavior from inside the overlay component",
|
|
22
22
|
"Embedding layout positioning rules inside the component stylesheet"
|
|
23
23
|
],
|
|
24
|
-
"related": ["Surface", "StaticNoise"]
|
|
24
|
+
"related": ["Surface", "StaticNoise"],
|
|
25
|
+
"properties": {
|
|
26
|
+
"react": {
|
|
27
|
+
"blur": {
|
|
28
|
+
"description": "Sets the maximum blur radius applied to the first layer at the selected edge.",
|
|
29
|
+
"refCss": "amount"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"css": {
|
|
33
|
+
"amount": {
|
|
34
|
+
"description": "Maximum blur amount for progressive blur layers.",
|
|
35
|
+
"refReact": "blur"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
25
39
|
}
|
|
@@ -9,7 +9,7 @@ var ProgressiveBlur = ({ blur = "16px", className, direction = "bottom", easing
|
|
|
9
9
|
const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
|
|
10
10
|
const resolvedSteps = resolveProgressiveBlurSteps(steps, easing);
|
|
11
11
|
const dynamicStyle = {
|
|
12
|
-
"--progressive-blur": blur,
|
|
12
|
+
"--vui-progressive-blur-amount": blur,
|
|
13
13
|
...style
|
|
14
14
|
};
|
|
15
15
|
const layers = Array.from({ length: resolvedSteps }, (_, layerIndex) => {
|
|
@@ -8,4 +8,4 @@ import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react';
|
|
|
8
8
|
* @default Base UI pass-through props keep upstream defaults.
|
|
9
9
|
*/
|
|
10
10
|
export type RadioGroupProps<Value = string> = RadioGroupPrimitive.Props<Value>;
|
|
11
|
-
export declare const RadioGroup: <Value>({ children, className, ...
|
|
11
|
+
export declare const RadioGroup: <Value>({ children, className, ...otherProps }: RadioGroupProps<Value>) => import("react").JSX.Element;
|
|
@@ -2,8 +2,8 @@ import { Stack } from "../stack/stack.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { RadioGroup } from "@base-ui/react";
|
|
4
4
|
//#region src/components/radio/radio-group.tsx
|
|
5
|
-
var RadioGroup$1 = ({ children, className, ...
|
|
6
|
-
...
|
|
5
|
+
var RadioGroup$1 = ({ children, className, ...otherProps }) => /* @__PURE__ */ jsx(RadioGroup, {
|
|
6
|
+
...otherProps,
|
|
7
7
|
className,
|
|
8
8
|
render: /* @__PURE__ */ jsx(Stack, {
|
|
9
9
|
"data-radiogroup": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__radio-module__RadioRoot_3uvvn{--radio-size:var(--space-medium);--radio-background:var(--global-contrast);--radio-border-color
|
|
1
|
+
.viraui__radio-module__RadioRoot_3uvvn{--vui-radio-size:var(--space-medium);--vui-radio-background:var(--global-contrast);--vui-radio-border-color:#0000;--vui-radio-indicator-color:contrast-color(var(--global-primary));--radio-disk-size:calc(var(--vui-radio-size) / 2);position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;appearance:none;border:0;box-shadow:inset 0 0 0 1px var(--vui-radio-border-color);inline-size:var(--vui-radio-size);block-size:var(--vui-radio-size);background:var(--vui-radio-background);border-radius:100000px;corner-shape:unset;&[data-size=regular]{--vui-radio-size:var(--space-large)}&[data-checked]:not([data-disabled]):not([data-invalid]){--vui-radio-background:var(--global-primary);--vui-radio-border-color:var(--global-primary);box-shadow:none}&[data-invalid]:not([data-disabled]),[data-invalid] &:not([data-disabled]){--vui-radio-border-color:var(--highlight-red);--vui-radio-indicator-color:var(--global-primary);box-shadow:inset 0 0 0 1px var(--highlight-red);outline-color:oklab(from var(--highlight-red) l a b/.5)}&[data-disabled],[data-disabled] &{--vui-radio-background:var(--global-disabled-background);--vui-radio-border-color:#0000;--vui-radio-indicator-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.viraui__radio-module__Indicator_Ecavw{display:inline-flex;align-items:center;justify-content:center;color:var(--vui-radio-indicator-color)}.viraui__radio-module__Disk_pV-Q1{inline-size:var(--radio-disk-size);aspect-ratio:1/1;border-radius:100000px;corner-shape:unset;background:currentColor}.viraui__radio-module__RadioRoot_3uvvn:not([data-checked]) .viraui__radio-module__Disk_pV-Q1{display:none}
|
|
@@ -18,7 +18,7 @@ function SelectOption({ addon, addonAlign = "center", children, className, disab
|
|
|
18
18
|
render: /* @__PURE__ */ jsx(Surface, { radius: "auto" }),
|
|
19
19
|
value,
|
|
20
20
|
children: /* @__PURE__ */ jsxs(Stack, {
|
|
21
|
-
columnGap: "
|
|
21
|
+
columnGap: "medium",
|
|
22
22
|
direction: "row",
|
|
23
23
|
hPadding: "small",
|
|
24
24
|
vPadding: "small",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__select-module__Select_eXv4Y{--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);--select-trigger-padding-inline-start:var(--space-small);--select-trigger-padding-inline-end:var(--space-x-small);--field-label-padding-inline:calc((var(--control-group-border-radius) + 0px) / 2);--select-list-appear-offest:8px;z-index:0;&:has([required]) .viraui__select-module__Label_-Y1fR:after{content:" *";color:var(--highlight-red)}&[data-invalid]>.viraui__select-module__Trigger_-wBsg:not(:disabled):not([data-disabled]){--control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}}.viraui__select-module__Trigger_-wBsg{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--input-height);padding-inline:var(--select-trigger-padding-inline-start) var(--select-trigger-padding-inline-end);border:1px solid var(--control-group-border-color);border-radius:var(--control-group-border-radius);background:var(--control-group-background);color:var(--control-group-color);font:inherit;text-align:start;cursor:pointer;&[data-popup-open]{outline:none}&:disabled,&[data-disabled]{--control-group-background:var(--global-disabled-background);--control-group-border-color
|
|
1
|
+
.viraui__select-module__Select_eXv4Y{--vui-select-input-height:var(--space-x-large);--vui-select-control-group-background:var(--base-1);--vui-select-control-group-color:var(--global-foreground);--vui-select-control-group-border-color:var(--global-contrast);--vui-select-control-group-border-radius:var(--radius-medium);--vui-select-trigger-padding-inline-start:var(--space-small);--vui-select-trigger-padding-inline-end:var(--space-x-small);--vui-field-label-padding-inline:calc((var(--vui-select-control-group-border-radius) + 0px) / 2);--select-list-appear-offest:8px;z-index:0;&:has([required]) .viraui__select-module__Label_-Y1fR:after{content:" *";color:var(--highlight-red)}&[data-invalid]>.viraui__select-module__Trigger_-wBsg:not(:disabled):not([data-disabled]){--vui-select-control-group-border-color:var(--highlight-red);box-shadow:none;outline-color:oklab(from var(--highlight-red) l a b/.5)}}.viraui__select-module__Trigger_-wBsg{box-sizing:border-box;inline-size:100%;min-inline-size:0;block-size:var(--vui-select-input-height);padding-inline:var(--vui-select-trigger-padding-inline-start) var(--vui-select-trigger-padding-inline-end);border:1px solid var(--vui-select-control-group-border-color);border-radius:var(--vui-select-control-group-border-radius);background:var(--vui-select-control-group-background);color:var(--vui-select-control-group-color);font:inherit;text-align:start;cursor:pointer;&[data-popup-open]{outline:none}&:disabled,&[data-disabled]{--vui-select-control-group-background:var(--global-disabled-background);--vui-select-control-group-border-color:#0000;--vui-select-control-group-color:var(--global-disabled-foreground);box-shadow:none;cursor:not-allowed}}.viraui__select-module__Value_uWHPX{--text-fluid-factor:0;--text-font-size:var(--font-scale-body-small);flex:1 1 auto;min-inline-size:0;overflow:hidden;display:block;text-overflow:ellipsis;&[data-placeholder]{color:var(--global-disabled-foreground)}}.viraui__select-module__Icon_EOwki{font-size:var(--font-scale-body-small);pointer-events:none}.viraui__select-module__Description_OmwmV{padding-inline:calc((var(--vui-select-control-group-border-radius) + 0px) / 2)}.viraui__select-module__SelectPopup_UzGXL{--vui-select-list-border-radius:var(--radius-medium);--vui-select-list-padding:var(--space-x-small);box-sizing:border-box;min-inline-size:var(--anchor-width);overflow:visible;color:var(--global-foreground);outline:none;position:relative;transform-origin:var(--transform-origin);transition:opacity var(--duration-instant) var(--easing-entrance),scale var(--duration-instant) var(--easing-entrance),translate var(--duration-instant) var(--easing-entrance);&[data-ending-style],&[data-starting-style]{opacity:0;scale:.96}&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{scale:.96;translate:0 calc(var(--select-list-appear-offest) * -1)}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{scale:.96;translate:0 var(--select-list-appear-offest)}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style],&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{scale:.96;translate:var(--select-list-appear-offest) 0}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style],&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{scale:.96;translate:calc(var(--select-list-appear-offest) * -1) 0}&[data-side=none]{transition:none;scale:1;translate:0;opacity:1}}.viraui__select-module__ScrollArrow_kHlEi{position:absolute;inset-inline:0;z-index:1;inline-size:100%;block-size:var(--space-large);cursor:default;background:var(--base-1);border:1px solid var(--global-contrast);@container root not style(--vibrancy-enable: initial){background:oklab(from var(--base-1) l a b/80%);backdrop-filter:brightness(var(--vibrancy-brightness)) blur(calc(var(--vibrancy-blur) * 1px))}}.viraui__select-module__ScrollButton_sHBOa{pointer-events:none}.viraui__select-module__ScrollArrowUp_DGXS-{inset-block-start:0;border-radius:var(--vui-select-list-border-radius) var(--vui-select-list-border-radius) 0 0}.viraui__select-module__ScrollArrowDown_vhJy0{inset-block-end:0;border-radius:0 0 var(--vui-select-list-border-radius) var(--vui-select-list-border-radius)}.viraui__select-module__List_jdUWx{box-sizing:border-box;inline-size:100%;max-block-size:var(--available-height);scroll-padding-block:var(--vui-select-list-padding);list-style:none;overscroll-behavior:contain;&:focus,&:focus-visible{outline:none}}.viraui__select-module__OptionText_UynBD{flex:1 1 auto;min-inline-size:0}.viraui__select-module__Option_KgYqz{border-radius:calc((var(--vui-select-list-border-radius) + 0px) - var(--vui-select-list-padding));cursor:pointer;&:focus{outline:none}&:focus-visible{outline:none;box-shadow:none}&:not([data-disabled]):hover,&:not([data-disabled])[data-highlighted]{background:var(--global-contrast);@container root not style(--vibrancy-enable: initial){background:oklab(from var(--global-contrast) l a b/12%)}}&:not([data-disabled],:hover)[data-selected]{background:oklab(from var(--global-contrast) l a b/8%)}&[data-disabled]{color:var(--global-disabled-foreground);cursor:not-allowed}}.viraui__select-module__Indicator_YNUuz{inline-size:var(--space-medium);color:var(--global-primary);opacity:0;transition:opacity var(--duration-fast) var(--easing-standard),transform var(--duration-fast) var(--easing-standard);&[data-selected]{opacity:1}}.viraui__select-module__Group_xzkuA+.viraui__select-module__Group_xzkuA{margin-block-start:var(--space-medium)}.viraui__select-module__Separator_Q-ri9{block-size:1px;margin-block:var(--space-small);margin-inline:var(--space-small);background:var(--base-3)}
|
|
@@ -23,5 +23,30 @@
|
|
|
23
23
|
"Leaving the trigger without label or aria-label",
|
|
24
24
|
"Never set the size prop (if present) of Buttons, IconButtons or other interactive elements passed as addon other than small"
|
|
25
25
|
],
|
|
26
|
-
"related": ["Fieldset", "Textfield", "Stack", "Surface", "Icon"]
|
|
26
|
+
"related": ["Fieldset", "Textfield", "Stack", "Surface", "Icon"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"css": {
|
|
29
|
+
"input-height": {
|
|
30
|
+
"description": "Select trigger block size."
|
|
31
|
+
},
|
|
32
|
+
"control-group-background": {
|
|
33
|
+
"description": "Trigger background fill."
|
|
34
|
+
},
|
|
35
|
+
"control-group-color": {
|
|
36
|
+
"description": "Trigger text and icon color."
|
|
37
|
+
},
|
|
38
|
+
"control-group-border-color": {
|
|
39
|
+
"description": "Trigger border color; invalid state overrides."
|
|
40
|
+
},
|
|
41
|
+
"control-group-border-radius": {
|
|
42
|
+
"description": "Trigger corner radius."
|
|
43
|
+
},
|
|
44
|
+
"trigger-padding-inline-start": {
|
|
45
|
+
"description": "Trigger inline-start padding."
|
|
46
|
+
},
|
|
47
|
+
"trigger-padding-inline-end": {
|
|
48
|
+
"description": "Trigger inline-end padding."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
27
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.viraui__separator-module__Line_xXOe9{--separator-size:1px;border:0;margin:0;background:oklab(from var(--global-contrast) l a b/20%);&[data-separator-orientation=horizontal]{inline-size:100%;block-size:var(--separator-size)}&[data-separator-orientation=vertical]{inline-size:var(--separator-size);block-size:100%}}
|
|
1
|
+
.viraui__separator-module__Line_xXOe9{--vui-separator-size:1px;border:0;margin:0;background:oklab(from var(--global-contrast) l a b/20%);&[data-separator-orientation=horizontal]{inline-size:100%;block-size:var(--vui-separator-size)}&[data-separator-orientation=vertical]{inline-size:var(--vui-separator-size);block-size:100%}}
|
|
@@ -14,7 +14,7 @@ var separatorSizeValues = {
|
|
|
14
14
|
var Separator = ({ className, hPadding, orientation = "horizontal", ref, render, size = "small", style, vPadding, ...otherProps }) => {
|
|
15
15
|
const { componentProps, intrinsicAttributes } = extractIntrinsicViraProps(otherProps);
|
|
16
16
|
const dynamicStyle = {
|
|
17
|
-
"--separator-size": `${separatorSizeValues[size]}px`,
|
|
17
|
+
"--vui-separator-size": `${separatorSizeValues[size]}px`,
|
|
18
18
|
...style
|
|
19
19
|
};
|
|
20
20
|
const line = useRender({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.viraui__shimmer-module__Shimmer_1k-ZM{--vui-shimmer-duration:var(--duration-slowest);--vui-shimmer-spread:calc(3ch + var(--space-2x-large));--vui-shimmer-angle:0deg;--shimmer-base:currentcolor;--vui-shimmer-highlight:oklch(from var(--shimmer-base) min(calc(l + 0.35),1) c h);background-image:linear-gradient(calc(90deg + var(--vui-shimmer-angle)),var(--shimmer-base) calc(50% - var(--vui-shimmer-spread)),color-mix(in oklch,var(--vui-shimmer-highlight),var(--shimmer-base) 50%) calc(50% - var(--vui-shimmer-spread) * .5),var(--vui-shimmer-highlight) 50%,color-mix(in oklch,var(--vui-shimmer-highlight),var(--shimmer-base) 50%) calc(50% + var(--vui-shimmer-spread) * .5),var(--shimmer-base) calc(50% + var(--vui-shimmer-spread)));background-repeat:no-repeat;background-size:calc(200% + var(--vui-shimmer-spread) * 2) 100%;background-position:0 0;background-clip:text;-webkit-text-fill-color:#0000;animation:viraui__shimmer-module__shimmer-slide_V1znC var(--vui-shimmer-duration) linear infinite;&::selection{background-color:var(--global-primary);color:contrast-color(var(--global-primary));-webkit-text-fill-color:contrast-color(var(--global-primary));background-image:none;background-clip:initial;text-shadow:none}@media (prefers-reduced-motion:reduce){animation:none;background-image:none;-webkit-text-fill-color:currentcolor}}@keyframes viraui__shimmer-module__shimmer-slide_V1znC{0%{background-position:0 0}to{background-position:100% 0}}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IntrinsicViraProps } from '../../core/props/intrinsic-vira-props';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Public Shimmer props.
|
|
5
|
+
*
|
|
6
|
+
* Includes standard `span` attributes such as `children`, `id`, `title`, and event handlers,
|
|
7
|
+
* plus Vira-owned shimmer tuning controls.
|
|
8
|
+
*
|
|
9
|
+
* @default Native span pass-through props keep React defaults.
|
|
10
|
+
*/
|
|
11
|
+
export type ShimmerProps = React.ComponentPropsWithoutRef<'span'> & IntrinsicViraProps & {
|
|
12
|
+
/**
|
|
13
|
+
* Sets the shimmer sweep duration using any valid CSS time string.
|
|
14
|
+
*
|
|
15
|
+
* @default The CSS duration is `var(--duration-slowest)`.
|
|
16
|
+
*/
|
|
17
|
+
duration?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Sets the shimmer highlight spread using any valid CSS length string.
|
|
20
|
+
*
|
|
21
|
+
* @default The CSS spread is `calc(3ch + var(--space-2x-large))`.
|
|
22
|
+
*/
|
|
23
|
+
spread?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Sets the shimmer gradient angle offset using any valid CSS angle string.
|
|
26
|
+
*
|
|
27
|
+
* @default The CSS angle offset is `0deg`.
|
|
28
|
+
*/
|
|
29
|
+
angle?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Overrides the shimmer highlight color when relative base lightness tuning is not used.
|
|
32
|
+
*
|
|
33
|
+
* @default The highlight increases base `currentColor` lightness.
|
|
34
|
+
*/
|
|
35
|
+
highlightColor?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Ref forwarded to the rendered shimmer root element.
|
|
38
|
+
*
|
|
39
|
+
* @default No ref is attached.
|
|
40
|
+
*/
|
|
41
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
42
|
+
};
|
|
43
|
+
export declare const Shimmer: React.FC<ShimmerProps>;
|