@vamos-ui/react 0.4.0 → 0.4.1
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/README.md +4 -0
- package/dist/blocks/block-heading.js +1 -1
- package/dist/blocks/block-link.js +1 -1
- package/dist/blocks/index.d.ts +3 -3
- package/dist/blocks/index.js +3 -3
- package/dist/blocks/labels.d.ts +8 -0
- package/dist/blocks/labels.js +60 -0
- package/dist/blocks/section-header.js +1 -1
- package/dist/blocks/section.js +2 -2
- package/dist/blocks/site/feature-tabs.js +1 -1
- package/dist/blocks/site/footer.d.ts +10 -1
- package/dist/blocks/site/footer.js +28 -4
- package/dist/blocks/site/registry-2.js +3 -1
- package/dist/blocks/site/shared/labels-2.d.ts +8 -0
- package/dist/blocks/site/shared/labels-2.js +808 -0
- package/dist/blocks/site/site-shell.js +3 -3
- package/dist/business/approval-flow.js +2 -2
- package/dist/business/import-wizard.js +1 -1
- package/dist/business/line-items.js +1 -1
- package/dist/business/multi-step-form.js +2 -2
- package/dist/business/permission-matrix.js +1 -1
- package/dist/business/setup-checklist.js +2 -2
- package/dist/business/signer-status.js +1 -1
- package/dist/charts/bar-list.js +1 -1
- package/dist/charts/chart-shell.js +1 -1
- package/dist/charts/donut-chart.js +1 -1
- package/dist/charts/funnel.js +1 -1
- package/dist/charts/gauge.js +2 -2
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +8 -8
- package/dist/components/activity-timeline.js +6 -6
- package/dist/components/address-field.js +3 -3
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +8 -8
- package/dist/components/alert.js +2 -2
- package/dist/components/app-shell.js +3 -3
- package/dist/components/aspect-ratio.js +2 -2
- package/dist/components/attachment-list.js +2 -2
- package/dist/components/audit-log.js +1 -1
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +8 -8
- package/dist/components/backup-codes.js +1 -1
- package/dist/components/badge.js +3 -3
- package/dist/components/breadcrumb.js +10 -9
- package/dist/components/button-group.js +4 -4
- package/dist/components/button.js +4 -4
- package/dist/components/calendar.js +5 -5
- package/dist/components/card.js +8 -8
- package/dist/components/carousel.js +9 -9
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +6 -6
- package/dist/components/collapsible.d.ts +1 -1
- package/dist/components/collapsible.js +4 -4
- package/dist/components/color-picker.js +3 -3
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.js +9 -9
- package/dist/components/comment-thread.js +3 -3
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.js +9 -9
- package/dist/components/currency-input.js +1 -1
- package/dist/components/date-picker.js +2 -2
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/description-list.js +2 -2
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +9 -9
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +9 -9
- package/dist/components/editor-layout.js +9 -9
- package/dist/components/empty-state.js +2 -2
- package/dist/components/entity-card.js +1 -1
- package/dist/components/file-upload.js +5 -5
- package/dist/components/formatted-input.js +3 -3
- package/dist/components/hierarchy-chart.js +1 -1
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.js +3 -3
- package/dist/components/iban-input.js +1 -1
- package/dist/components/id-input.js +3 -3
- package/dist/components/image.js +5 -5
- package/dist/components/input-otp.js +6 -6
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +6 -6
- package/dist/components/item.js +4 -4
- package/dist/components/kbd.js +3 -3
- package/dist/components/list-layout.js +9 -9
- package/dist/components/menubar.d.ts +1 -1
- package/dist/components/menubar.js +12 -12
- package/dist/components/native-select.js +1 -1
- package/dist/components/navigation-menu.d.ts +1 -1
- package/dist/components/navigation-menu.js +12 -11
- package/dist/components/notification-center.js +4 -4
- package/dist/components/page-header.js +3 -3
- package/dist/components/pagination.js +9 -9
- package/dist/components/phone-input.js +1 -1
- package/dist/components/pin-map.js +1 -1
- package/dist/components/placeholder-art.js +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +7 -7
- package/dist/components/progress.js +3 -3
- package/dist/components/qr-code.js +1 -1
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +4 -4
- package/dist/components/record-detail-layout.js +10 -10
- package/dist/components/record-picker.js +2 -2
- package/dist/components/resizable.js +2 -2
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area.js +4 -4
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +10 -10
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +3 -3
- package/dist/components/settings-layout.js +6 -6
- package/dist/components/sheet.js +3 -3
- package/dist/components/sidebar.js +12 -11
- package/dist/components/signature-pad.js +1 -1
- package/dist/components/skeleton.js +5 -5
- package/dist/components/sla-timer.js +2 -2
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +2 -2
- package/dist/components/slug-input.js +1 -1
- package/dist/components/sparkline.js +1 -1
- package/dist/components/spinner.js +2 -2
- package/dist/components/stat.js +5 -5
- package/dist/components/status-picker.js +2 -2
- package/dist/components/stepper.js +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +3 -3
- package/dist/components/table.js +10 -10
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +11 -11
- package/dist/components/tag-input.js +1 -1
- package/dist/components/task-list.js +1 -1
- package/dist/components/time-picker.js +3 -3
- package/dist/components/toggle.d.ts +2 -1
- package/dist/components/toggle.js +7 -6
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +5 -4
- package/dist/components/top-bar.js +4 -4
- package/dist/components/tour.js +1 -1
- package/dist/components/tree-select.js +2 -2
- package/dist/components/tree-view.js +3 -3
- package/dist/components/typography.js +11 -11
- package/dist/components/user-picker.js +2 -2
- package/dist/components/version-history.js +3 -3
- package/dist/data-table/data-table.js +1 -1
- package/dist/data-table/filter-bar.js +2 -2
- package/dist/data-table/index.d.ts +15 -8
- package/dist/data-table/index.js +9 -8
- package/dist/data-table/saved-views.js +1 -1
- package/dist/editor/block-editor.js +1 -1
- package/dist/editor/context.js +1 -1
- package/dist/editor/menus.js +1 -1
- package/dist/fonts/font-picker.js +3 -3
- package/dist/fonts/pairing-picker.js +1 -1
- package/dist/fonts/provider.js +1 -1
- package/dist/index.d.ts +188 -94
- package/dist/index.js +94 -94
- package/dist/lib/data-islands.js +1 -1
- package/dist/lib/field-context.js +1 -1
- package/dist/lib/floating-arrow.js +1 -1
- package/dist/lib/islands.js +1 -1
- package/dist/lib/layer.js +3 -3
- package/dist/lib/locale.js +2 -2
- package/dist/lib/menu.js +2 -2
- package/dist/lib/provider.js +4 -4
- package/dist/lib/theme-scope.js +4 -3
- package/dist/lib/variants.js +2 -2
- package/dist/media/focal-point.js +1 -1
- package/dist/media/gallery.js +1 -1
- package/dist/media/image-cropper.js +1 -1
- package/dist/media/image-field.js +2 -2
- package/dist/media/lightbox.js +4 -3
- package/dist/media/link-preview.js +3 -3
- package/dist/media/media-library.js +3 -3
- package/dist/media/media-picker.js +1 -1
- package/dist/media/media-provider.js +1 -1
- package/dist/media/video-player.js +4 -4
- package/dist/motion/count-up.js +1 -1
- package/dist/motion/motion-scope.js +2 -2
- package/dist/motion/page-transition.js +1 -1
- package/dist/motion/parallax.js +2 -2
- package/dist/motion/pointer.js +3 -3
- package/dist/motion/reveal.js +3 -3
- package/dist/motion/skeleton-swap.js +1 -1
- package/dist/motion/text-reveal.js +1 -1
- package/dist/motion/ticker.js +1 -1
- package/dist/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/dist/scheduler/gantt.js +2 -2
- package/dist/scheduler/resource-calendar.js +2 -2
- package/dist/scheduler/scheduler.js +3 -3
- package/dist/scheduler/time-tracker.js +4 -4
- package/dist/sortable/kanban.js +2 -2
- package/dist/sortable/sortable-list.js +2 -2
- package/dist/sortable/sortable.js +4 -4
- package/package.json +1 -1
package/dist/components/badge.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import
|
|
3
|
+
import * as Slot from "radix-ui/slot";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { ChipRemoveButton, LocaleCount } from "../lib/islands.js";
|
|
7
|
-
export const badgeVariants = cva("inline-flex shrink-0 items-center gap-1 whitespace-nowrap font-medium leading-none [&_svg]:size-3 [&_svg]:shrink-0", {
|
|
7
|
+
export const badgeVariants = /*#__PURE__*/ cva("inline-flex shrink-0 items-center gap-1 whitespace-nowrap font-medium leading-none [&_svg]:size-3 [&_svg]:shrink-0", {
|
|
8
8
|
variants: {
|
|
9
9
|
tone: {
|
|
10
10
|
neutral: "bg-selected text-fg-muted",
|
|
@@ -47,7 +47,7 @@ export const badgeVariants = cva("inline-flex shrink-0 items-center gap-1 whites
|
|
|
47
47
|
*
|
|
48
48
|
* No CSS `uppercase` — it breaks Turkish (i → I) without the right `lang`; use `upperText()`.
|
|
49
49
|
*/
|
|
50
|
-
export const Badge = React.forwardRef(function Badge({ className, tone, size, shape, dot, color, count, max = 99, onRemove, removeLabel, disabled, asChild, children, style, ...props }, ref) {
|
|
50
|
+
export const Badge = /*#__PURE__*/ React.forwardRef(function Badge({ className, tone, size, shape, dot, color, count, max = 99, onRemove, removeLabel, disabled, asChild, children, style, ...props }, ref) {
|
|
51
51
|
const removable = Boolean(onRemove);
|
|
52
52
|
const Comp = asChild && !removable ? Slot.Root : "span";
|
|
53
53
|
const classes = cn(badgeVariants({ tone: color ? "custom" : tone, size, shape, interactive: asChild && !removable ? true : undefined }), count !== undefined && "tabular justify-center", count !== undefined && (size === "lg" ? "min-w-7 px-2" : size === "md" ? "min-w-6 px-2" : "min-w-5 px-1.5"), removable && "pe-1.5", disabled && "pointer-events-none opacity-50", className);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as DropdownMenu from "radix-ui/dropdown-menu";
|
|
5
|
+
import * as Slot from "radix-ui/slot";
|
|
5
6
|
import { ChevronRight, ChevronsUpDown, MoreHorizontal } from "lucide-react";
|
|
6
7
|
import { cva } from "class-variance-authority";
|
|
7
8
|
import { cn } from "../lib/cn.js";
|
|
@@ -15,7 +16,7 @@ const breadcrumbLabels = {
|
|
|
15
16
|
showHidden: "Show hidden pages",
|
|
16
17
|
siblings: "Pages next to {label}",
|
|
17
18
|
};
|
|
18
|
-
const SizeContext = React.createContext("md");
|
|
19
|
+
const SizeContext = /*#__PURE__*/ React.createContext("md");
|
|
19
20
|
/**
|
|
20
21
|
* Shows where a page sits in a hierarchy and offers a way up (WAI-ARIA Breadcrumb: `nav` + `ol`,
|
|
21
22
|
* `aria-current="page"` on the last item). Links go through the app's router `Link`.
|
|
@@ -26,7 +27,7 @@ const SizeContext = React.createContext("md");
|
|
|
26
27
|
*
|
|
27
28
|
* Compound: `<Breadcrumb><BreadcrumbList><BreadcrumbItem><BreadcrumbLink href/></BreadcrumbItem><BreadcrumbSeparator/>…<BreadcrumbPage/></BreadcrumbList></Breadcrumb>`.
|
|
28
29
|
*/
|
|
29
|
-
export const Breadcrumb = React.forwardRef(function Breadcrumb({ items, maxItems, separator, size = "md", jsonLd, baseUrl, labels, className, children, ...props }, ref) {
|
|
30
|
+
export const Breadcrumb = /*#__PURE__*/ React.forwardRef(function Breadcrumb({ items, maxItems, separator, size = "md", jsonLd, baseUrl, labels, className, children, ...props }, ref) {
|
|
30
31
|
const t = useLabels("breadcrumb", breadcrumbLabels, labels);
|
|
31
32
|
return (_jsx(SizeContext.Provider, { value: size, children: _jsxs("nav", { ref: ref, "aria-label": t("label"), "data-slot": "breadcrumb", className: cn("min-w-0", className), ...props, children: [items ? _jsx(BreadcrumbTrail, { items: items, maxItems: maxItems, separator: separator, labels: labels }) : children, items && jsonLd ? _jsx(BreadcrumbJsonLd, { items: items, baseUrl: baseUrl }) : null] }) }));
|
|
32
33
|
});
|
|
@@ -47,29 +48,29 @@ function BreadcrumbTrail({ items, maxItems, separator, labels }) {
|
|
|
47
48
|
return (_jsxs(React.Fragment, { children: [sep, _jsxs(BreadcrumbItem, { children: [last || !item.href ? (_jsx(BreadcrumbPage, { icon: item.icon, "aria-current": last ? "page" : undefined, children: item.label })) : (_jsx(BreadcrumbLink, { href: item.href, icon: item.icon, children: item.label })), item.menu?.length ? _jsx(BreadcrumbSiblings, { label: item.label, items: item.menu, labels: labels }) : null] })] }, index));
|
|
48
49
|
}) }));
|
|
49
50
|
}
|
|
50
|
-
const listVariants = cva("flex min-w-0 flex-wrap items-center text-fg-muted", {
|
|
51
|
+
const listVariants = /*#__PURE__*/ cva("flex min-w-0 flex-wrap items-center text-fg-muted", {
|
|
51
52
|
variants: { size: { sm: "gap-1 text-[13px] [&_svg]:size-3.5", md: "gap-1.5 text-sm [&_svg]:size-4" } },
|
|
52
53
|
defaultVariants: { size: "md" },
|
|
53
54
|
});
|
|
54
55
|
/** The ordered list of crumbs. */
|
|
55
|
-
export const BreadcrumbList = React.forwardRef(function BreadcrumbList({ className, ...props }, ref) {
|
|
56
|
+
export const BreadcrumbList = /*#__PURE__*/ React.forwardRef(function BreadcrumbList({ className, ...props }, ref) {
|
|
56
57
|
const size = React.useContext(SizeContext);
|
|
57
58
|
return _jsx("ol", { ref: ref, "data-slot": "breadcrumb-list", className: cn(listVariants({ size }), className), ...props });
|
|
58
59
|
});
|
|
59
60
|
/** One crumb (`li`). */
|
|
60
|
-
export const BreadcrumbItem = React.forwardRef(function BreadcrumbItem({ className, ...props }, ref) {
|
|
61
|
+
export const BreadcrumbItem = /*#__PURE__*/ React.forwardRef(function BreadcrumbItem({ className, ...props }, ref) {
|
|
61
62
|
return _jsx("li", { ref: ref, "data-slot": "breadcrumb-item", className: cn("inline-flex min-w-0 items-center gap-0.5", className), ...props });
|
|
62
63
|
});
|
|
63
64
|
const crumbClass = "inline-flex min-w-0 max-w-[16rem] items-center gap-1.5 rounded-ui-sm [&_svg]:shrink-0";
|
|
64
65
|
/** A crumb that links up the hierarchy. Uses the app's router `Link` (external URLs open in a new tab). */
|
|
65
|
-
export const BreadcrumbLink = React.forwardRef(function BreadcrumbLink({ href, icon, asChild, className, children, title, ...props }, ref) {
|
|
66
|
+
export const BreadcrumbLink = /*#__PURE__*/ React.forwardRef(function BreadcrumbLink({ href, icon, asChild, className, children, title, ...props }, ref) {
|
|
66
67
|
const classes = cn(crumbClass, "transition-colors hover:text-fg focus-ring", className);
|
|
67
68
|
if (asChild)
|
|
68
69
|
return _jsx(Slot.Root, { ref: ref, "data-slot": "breadcrumb-link", className: classes, ...props, children: children });
|
|
69
70
|
return (_jsxs(SmartLink, { ref: ref, href: href ?? "#", "data-slot": "breadcrumb-link", className: classes, title: title ?? (typeof children === "string" ? children : undefined), ...props, children: [icon ? _jsx("span", { "aria-hidden": true, className: "inline-flex", children: icon }) : null, _jsx("span", { className: "truncate", children: children })] }));
|
|
70
71
|
});
|
|
71
72
|
/** The current page: plain text, `aria-current="page"` (override for a non-link middle crumb). */
|
|
72
|
-
export const BreadcrumbPage = React.forwardRef(function BreadcrumbPage({ icon, className, children, title, ...props }, ref) {
|
|
73
|
+
export const BreadcrumbPage = /*#__PURE__*/ React.forwardRef(function BreadcrumbPage({ icon, className, children, title, ...props }, ref) {
|
|
73
74
|
const current = !("aria-current" in props) || props["aria-current"] !== undefined;
|
|
74
75
|
return (_jsxs("span", { ref: ref, "data-slot": "breadcrumb-page", "aria-current": "page", title: title ?? (typeof children === "string" ? children : undefined), className: cn(crumbClass, current ? "font-medium text-fg" : "text-fg-muted", className), ...props, children: [icon ? _jsx("span", { "aria-hidden": true, className: "inline-flex", children: icon }) : null, _jsx("span", { className: "truncate", children: children })] }));
|
|
75
76
|
});
|
|
@@ -84,7 +85,7 @@ function CrumbMenu({ trigger, items }) {
|
|
|
84
85
|
}
|
|
85
86
|
const iconTrigger = "inline-flex size-6 items-center justify-center rounded-ui-sm text-fg-subtle transition-colors hover:bg-hover hover:text-fg focus-ring data-[state=open]:bg-hover data-[state=open]:text-fg";
|
|
86
87
|
/** "…" for collapsed crumbs; opens a menu with the hidden pages. */
|
|
87
|
-
export const BreadcrumbEllipsis = React.forwardRef(function BreadcrumbEllipsis({ items, labels, className, ...props }, ref) {
|
|
88
|
+
export const BreadcrumbEllipsis = /*#__PURE__*/ React.forwardRef(function BreadcrumbEllipsis({ items, labels, className, ...props }, ref) {
|
|
88
89
|
const t = useLabels("breadcrumb", breadcrumbLabels, labels);
|
|
89
90
|
if (!items?.length) {
|
|
90
91
|
return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis", className: "inline-flex size-6 items-center justify-center text-fg-subtle", children: [_jsx(MoreHorizontal, { "aria-hidden": true }), _jsx("span", { className: "sr-only", children: t("showHidden") })] }));
|
|
@@ -7,7 +7,7 @@ import { Button, IconButton } from "./button.js";
|
|
|
7
7
|
* Merged-edge styling for any row of controls. Corner rounding is done with logical
|
|
8
8
|
* properties (`rounded-s` / `rounded-e`), so the group is RTL-safe.
|
|
9
9
|
*/
|
|
10
|
-
export const buttonGroupVariants = cva("relative isolate inline-flex w-fit max-w-full", {
|
|
10
|
+
export const buttonGroupVariants = /*#__PURE__*/ cva("relative isolate inline-flex w-fit max-w-full", {
|
|
11
11
|
variants: {
|
|
12
12
|
orientation: {
|
|
13
13
|
horizontal: "flex-row items-stretch",
|
|
@@ -48,7 +48,7 @@ export const buttonGroupVariants = cva("relative isolate inline-flex w-fit max-w
|
|
|
48
48
|
* For a selected state (view switch, text alignment) use `ToggleGroup`; for a form value use
|
|
49
49
|
* `RadioGroup variant="segmented"`.
|
|
50
50
|
*/
|
|
51
|
-
export const ButtonGroup = React.forwardRef(function ButtonGroup({ attached = true, orientation = "horizontal", variant, size, className, children, ...props }, ref) {
|
|
51
|
+
export const ButtonGroup = /*#__PURE__*/ React.forwardRef(function ButtonGroup({ attached = true, orientation = "horizontal", variant, size, className, children, ...props }, ref) {
|
|
52
52
|
const content = variant || size
|
|
53
53
|
? React.Children.map(children, (child) => {
|
|
54
54
|
if (!React.isValidElement(child))
|
|
@@ -68,10 +68,10 @@ export const ButtonGroup = React.forwardRef(function ButtonGroup({ attached = tr
|
|
|
68
68
|
* Hairline between two attached buttons that share a fill (a primary split button), where
|
|
69
69
|
* the merged border would otherwise disappear.
|
|
70
70
|
*/
|
|
71
|
-
export const ButtonGroupSeparator = React.forwardRef(function ButtonGroupSeparator({ orientation = "vertical", className, ...props }, ref) {
|
|
71
|
+
export const ButtonGroupSeparator = /*#__PURE__*/ React.forwardRef(function ButtonGroupSeparator({ orientation = "vertical", className, ...props }, ref) {
|
|
72
72
|
return (_jsx("div", { ref: ref, "aria-hidden": true, "data-slot": "button-group-separator", className: cn("relative z-20 shrink-0 self-stretch bg-(--group-sep,var(--field-border))", orientation === "vertical" ? "w-px" : "h-px", className), ...props }));
|
|
73
73
|
});
|
|
74
74
|
/** A static segment inside a group: "21–40 of 340", a unit, a prefix. */
|
|
75
|
-
export const ButtonGroupText = React.forwardRef(function ButtonGroupText({ size = "md", className, ...props }, ref) {
|
|
75
|
+
export const ButtonGroupText = /*#__PURE__*/ React.forwardRef(function ButtonGroupText({ size = "md", className, ...props }, ref) {
|
|
76
76
|
return (_jsx("span", { ref: ref, "data-slot": "button-group-text", className: cn("inline-flex shrink-0 items-center whitespace-nowrap border border-field-border bg-surface-2 font-medium tabular text-fg-muted [&_svg]:size-4", size === "xs" ? "h-7 rounded-ui-sm px-2.5 text-xs" : size === "sm" ? "h-8 rounded-ui-sm px-3 text-[13px]" : size === "lg" ? "h-12 rounded-ui px-5 text-[15px]" : "h-(--control-h) rounded-ui px-3.5 text-sm", className), ...props }));
|
|
77
77
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import
|
|
3
|
+
import * as Slot from "radix-ui/slot";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { Spinner } from "./spinner.js";
|
|
7
7
|
import { IconButtonTooltip } from "./tooltip.js";
|
|
8
|
-
export const buttonVariants = cva([
|
|
8
|
+
export const buttonVariants = /*#__PURE__*/ cva([
|
|
9
9
|
"relative inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap font-medium",
|
|
10
10
|
"transition-[background-color,border-color,box-shadow,color,filter,opacity] duration-150 focus-ring",
|
|
11
11
|
"disabled:pointer-events-none disabled:opacity-45 aria-disabled:pointer-events-none aria-disabled:opacity-45",
|
|
@@ -56,7 +56,7 @@ const spinnerSize = (size) => (size === "xs" || size === "sm" || size === "icon-
|
|
|
56
56
|
* Defaults to `type="button"` (no accidental form submits). With `asChild` + `disabled`/`loading`
|
|
57
57
|
* the element gets `aria-disabled`, leaves the tab order and ignores clicks.
|
|
58
58
|
*/
|
|
59
|
-
export const Button = React.forwardRef(function Button({ className, variant, size, block, pill, asChild, loading, loadingText, loadingMode = "inline", disabled, children, type, onClick, ...props }, ref) {
|
|
59
|
+
export const Button = /*#__PURE__*/ React.forwardRef(function Button({ className, variant, size, block, pill, asChild, loading, loadingText, loadingMode = "inline", disabled, children, type, onClick, ...props }, ref) {
|
|
60
60
|
const classes = cn(buttonVariants({ variant, size, block, pill }), className);
|
|
61
61
|
const state = {
|
|
62
62
|
"data-slot": "button",
|
|
@@ -99,7 +99,7 @@ const iconSize = { xs: "icon-xs", sm: "icon-sm", md: "icon", lg: "icon-lg" };
|
|
|
99
99
|
* <IconButton label="Edit" shortcut="mod+e"><Pencil /></IconButton>
|
|
100
100
|
* ```
|
|
101
101
|
*/
|
|
102
|
-
export const IconButton = React.forwardRef(function IconButton({ label, size = "md", variant = "ghost", title, loading, tooltip = true, tooltipSide, shortcut, children, ...props }, ref) {
|
|
102
|
+
export const IconButton = /*#__PURE__*/ React.forwardRef(function IconButton({ label, size = "md", variant = "ghost", title, loading, tooltip = true, tooltipSide, shortcut, children, ...props }, ref) {
|
|
103
103
|
if (tooltip === false) {
|
|
104
104
|
return (_jsx(Button, { ref: ref, "aria-label": label, title: title ?? label, variant: variant, size: iconSize[size], loading: loading, loadingMode: "replace", ...props, children: children }));
|
|
105
105
|
}
|
|
@@ -73,7 +73,7 @@ export function useCalendarWeek(locale) {
|
|
|
73
73
|
weekend: info.weekend,
|
|
74
74
|
}), [info]);
|
|
75
75
|
}
|
|
76
|
-
const GridContext = React.createContext({ size: "md" });
|
|
76
|
+
const GridContext = /*#__PURE__*/ React.createContext({ size: "md" });
|
|
77
77
|
// Modifiers surfaced as data attributes on the day cell (in addition to rdp's own).
|
|
78
78
|
const DATA_MODIFIERS = {
|
|
79
79
|
range_start: "data-range-start",
|
|
@@ -116,7 +116,7 @@ function GridChevron({ orientation = "left", className }) {
|
|
|
116
116
|
const Icon = orientation === "right" ? ChevronRight : orientation === "down" ? ChevronDown : orientation === "up" ? ChevronUp : ChevronLeft;
|
|
117
117
|
return _jsx(Icon, { "aria-hidden": true, className: cn("size-4", (orientation === "left" || orientation === "right") && "rtl:-scale-x-100", className) });
|
|
118
118
|
}
|
|
119
|
-
const MonthDateContext = React.createContext(null);
|
|
119
|
+
const MonthDateContext = /*#__PURE__*/ React.createContext(null);
|
|
120
120
|
function GridMonthCaption({ calendarMonth, displayIndex: _i, ...props }) {
|
|
121
121
|
return (_jsx(MonthDateContext.Provider, { value: calendarMonth.date, children: _jsx("div", { ...props }) }));
|
|
122
122
|
}
|
|
@@ -262,7 +262,7 @@ function initialSelectionMonth(props) {
|
|
|
262
262
|
* <Calendar months={12} size="sm" markers={density} />
|
|
263
263
|
* ```
|
|
264
264
|
*/
|
|
265
|
-
export const Calendar = React.forwardRef(function Calendar(props, ref) {
|
|
265
|
+
export const Calendar = /*#__PURE__*/ React.forwardRef(function Calendar(props, ref) {
|
|
266
266
|
const { months = 1, month: monthProp, defaultMonth, onMonthChange, onVisibleRangeChange, min, max, disabledDays, required, showWeekNumbers, holidays: holidaysProp, holidayRegion, markers, renderDay, size: sizeProp, variant = "plain", header = true, headerAction, legend, loading, weekStartsOn, footer, gridProps, className, id, labels, } = props;
|
|
267
267
|
const mode = props.mode ?? "single";
|
|
268
268
|
const t = useLabels("calendar", calendarLabels, labels);
|
|
@@ -428,7 +428,7 @@ export const Calendar = React.forwardRef(function Calendar(props, ref) {
|
|
|
428
428
|
}, ...restGrid }), legendItems.length ? _jsx(CalendarLegend, { items: legendItems }) : null] }));
|
|
429
429
|
});
|
|
430
430
|
/** Key for the marks on a Calendar (dot tones, holidays, today). */
|
|
431
|
-
export const CalendarLegend = React.forwardRef(function CalendarLegend({ items, className, labels: _labels, ...props }, ref) {
|
|
431
|
+
export const CalendarLegend = /*#__PURE__*/ React.forwardRef(function CalendarLegend({ items, className, labels: _labels, ...props }, ref) {
|
|
432
432
|
return (_jsx("ul", { ref: ref, "data-slot": "calendar-legend", className: cn("flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-fg-muted", className), ...props, children: items.map((item, i) => (_jsxs("li", { className: "inline-flex items-center gap-1.5", children: [item.kind === "holiday" ? (_jsx("span", { "aria-hidden": true, className: "ui-cal-legend-holiday" })) : item.kind === "today" ? (_jsx("span", { "aria-hidden": true, className: "h-0.5 w-3 rounded-full bg-accent-ink" })) : (_jsx("span", { "aria-hidden": true, className: "size-1.5 rounded-full", style: { background: toneVar[item.tone ?? "accent"] } })), item.label] }, i))) }));
|
|
433
433
|
});
|
|
434
434
|
/**
|
|
@@ -439,7 +439,7 @@ export const CalendarLegend = React.forwardRef(function CalendarLegend({ items,
|
|
|
439
439
|
* <CalendarSlots day={day} slots={slots} value={time} onValueChange={setTime} />
|
|
440
440
|
* ```
|
|
441
441
|
*/
|
|
442
|
-
export const CalendarSlots = React.forwardRef(function CalendarSlots({ slots, value: valueProp, defaultValue, onValueChange, day, loading, error, onRetry, hourCycle, columns = 3, labels, className, ...props }, ref) {
|
|
442
|
+
export const CalendarSlots = /*#__PURE__*/ React.forwardRef(function CalendarSlots({ slots, value: valueProp, defaultValue, onValueChange, day, loading, error, onRetry, hourCycle, columns = 3, labels, className, ...props }, ref) {
|
|
443
443
|
const t = useLabels("calendar", calendarLabels, labels);
|
|
444
444
|
const { locale, format } = useLocale();
|
|
445
445
|
const [value, setValue] = useControllableState({ value: valueProp, defaultValue: defaultValue ?? null, onChange: onValueChange, name: "CalendarSlots" });
|
package/dist/components/card.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import
|
|
3
|
+
import * as Slot from "radix-ui/slot";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { SkeletonText } from "./skeleton.js";
|
|
7
|
-
export const cardVariants = cva("relative block [--card-p:var(--gap)]", {
|
|
7
|
+
export const cardVariants = /*#__PURE__*/ cva("relative block [--card-p:var(--gap)]", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
/** The main surface: glass or solid from tokens. */
|
|
@@ -40,12 +40,12 @@ export const cardVariants = cva("relative block [--card-p:var(--gap)]", {
|
|
|
40
40
|
* </Card>
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
export const Card = React.forwardRef(function Card({ className, variant, padding, interactive, asChild, as = "div", loading, selected, ...props }, ref) {
|
|
43
|
+
export const Card = /*#__PURE__*/ React.forwardRef(function Card({ className, variant, padding, interactive, asChild, as = "div", loading, selected, ...props }, ref) {
|
|
44
44
|
const Comp = (asChild ? Slot.Root : as);
|
|
45
45
|
return (_jsx(Comp, { ref: ref, "data-slot": "card", "data-variant": variant ?? "surface", "data-selected": selected ? "" : undefined, "aria-busy": loading || undefined, className: cn(cardVariants({ variant, padding, interactive }), selected && "border-accent-ink! ring-1 ring-accent-ink", className), ...props }));
|
|
46
46
|
});
|
|
47
47
|
/** Prop-based header (title, description, action). For custom layouts compose CardTitle / CardDescription / CardAction. */
|
|
48
|
-
export const CardHeader = React.forwardRef(function CardHeader({ eyebrow, title, description, action, titleAs = "h3", titleId, divider, className, children, ...props }, ref) {
|
|
48
|
+
export const CardHeader = /*#__PURE__*/ React.forwardRef(function CardHeader({ eyebrow, title, description, action, titleAs = "h3", titleId, divider, className, children, ...props }, ref) {
|
|
49
49
|
return (_jsxs("div", { ref: ref, "data-slot": "card-header", className: cn("flex items-start justify-between gap-4 px-(--card-p,1.25rem) pt-[calc(var(--card-p,1.25rem)*0.8)] pb-[calc(var(--card-p,1.25rem)*0.6)]", divider && "border-b border-line pb-[calc(var(--card-p,1.25rem)*0.8)]", className), ...props, children: [_jsxs("div", { className: "min-w-0", children: [eyebrow ? _jsx(CardEyebrow, { children: eyebrow }) : null, title ? (_jsx(CardTitle, { as: titleAs, id: titleId, children: title })) : null, description ? _jsx(CardDescription, { children: description }) : null, children] }), action ? _jsx(CardAction, { children: action }) : null] }));
|
|
50
50
|
});
|
|
51
51
|
/** Small mono line above a title. */
|
|
@@ -53,7 +53,7 @@ export function CardEyebrow({ className, ...props }) {
|
|
|
53
53
|
return _jsx("p", { "data-slot": "card-eyebrow", className: cn("mb-1 font-mono text-[11px] tracking-[0.06em] text-fg-subtle", className), ...props });
|
|
54
54
|
}
|
|
55
55
|
/** Card title. Default `<h3>`. */
|
|
56
|
-
export const CardTitle = React.forwardRef(function CardTitle({ as: Tag = "h3", className, ...props }, ref) {
|
|
56
|
+
export const CardTitle = /*#__PURE__*/ React.forwardRef(function CardTitle({ as: Tag = "h3", className, ...props }, ref) {
|
|
57
57
|
return _jsx(Tag, { ref: ref, "data-slot": "card-title", className: cn("text-[15px] font-semibold tracking-[-0.01em] text-balance text-fg", className), ...props });
|
|
58
58
|
});
|
|
59
59
|
/** Secondary line under the title. */
|
|
@@ -64,13 +64,13 @@ export function CardDescription({ className, ...props }) {
|
|
|
64
64
|
export function CardAction({ className, ...props }) {
|
|
65
65
|
return _jsx("div", { "data-slot": "card-action", className: cn("flex shrink-0 items-center gap-1.5", className), ...props });
|
|
66
66
|
}
|
|
67
|
-
export const CardBody = React.forwardRef(function CardBody({ className, loading, loadingLines = 3, children, ...props }, ref) {
|
|
67
|
+
export const CardBody = /*#__PURE__*/ React.forwardRef(function CardBody({ className, loading, loadingLines = 3, children, ...props }, ref) {
|
|
68
68
|
return (_jsx("div", { ref: ref, "data-slot": "card-body", className: cn("px-(--card-p,1.25rem) pb-(--card-p,1.25rem)", className), ...props, children: loading ? _jsx(SkeletonText, { lines: loadingLines }) : children }));
|
|
69
69
|
});
|
|
70
|
-
export const CardFooter = React.forwardRef(function CardFooter({ className, ...props }, ref) {
|
|
70
|
+
export const CardFooter = /*#__PURE__*/ React.forwardRef(function CardFooter({ className, ...props }, ref) {
|
|
71
71
|
return (_jsx("div", { ref: ref, "data-slot": "card-footer", className: cn("flex items-center gap-2 border-t border-line px-(--card-p,1.25rem) py-[calc(var(--card-p,1.25rem)*0.6)]", className), ...props }));
|
|
72
72
|
});
|
|
73
73
|
/** A secondary tile inside a card (`surface-2`, never blurs). */
|
|
74
|
-
export const Inset = React.forwardRef(function Inset({ className, ...props }, ref) {
|
|
74
|
+
export const Inset = /*#__PURE__*/ React.forwardRef(function Inset({ className, ...props }, ref) {
|
|
75
75
|
return _jsx("div", { ref: ref, "data-slot": "inset", className: cn("surface-2 rounded-ui", className), ...props });
|
|
76
76
|
});
|
|
@@ -29,7 +29,7 @@ const carouselLabels = {
|
|
|
29
29
|
loading: "Loading slides",
|
|
30
30
|
marqueePause: "Pause scrolling",
|
|
31
31
|
};
|
|
32
|
-
const CarouselContext = React.createContext(null);
|
|
32
|
+
const CarouselContext = /*#__PURE__*/ React.createContext(null);
|
|
33
33
|
function useCarouselContext(part) {
|
|
34
34
|
const ctx = React.useContext(CarouselContext);
|
|
35
35
|
if (!ctx)
|
|
@@ -63,7 +63,7 @@ export function useCarousel() {
|
|
|
63
63
|
/* ------------------------------------------------------------------ */
|
|
64
64
|
/* Root */
|
|
65
65
|
/* ------------------------------------------------------------------ */
|
|
66
|
-
export const carouselVariants = cva("vui-carousel relative min-w-0", {
|
|
66
|
+
export const carouselVariants = /*#__PURE__*/ cva("vui-carousel relative min-w-0", {
|
|
67
67
|
variants: {
|
|
68
68
|
preset: {
|
|
69
69
|
default: "",
|
|
@@ -102,7 +102,7 @@ const GAP = {
|
|
|
102
102
|
* </Carousel>
|
|
103
103
|
* ```
|
|
104
104
|
*/
|
|
105
|
-
export const Carousel = React.forwardRef(function Carousel({ label, preset = "default", orientation = "horizontal", slidesPerView, gap = "md", loop = false, align = "start", transition = "slide", autoplay = false, controls: controlsProp, index: indexProp, defaultIndex = 0, onIndexChange, loading = false, options, plugins: extraPlugins, setApi, labels, className, style, onKeyDown, children, ...props }, ref) {
|
|
105
|
+
export const Carousel = /*#__PURE__*/ React.forwardRef(function Carousel({ label, preset = "default", orientation = "horizontal", slidesPerView, gap = "md", loop = false, align = "start", transition = "slide", autoplay = false, controls: controlsProp, index: indexProp, defaultIndex = 0, onIndexChange, loading = false, options, plugins: extraPlugins, setApi, labels, className, style, onKeyDown, children, ...props }, ref) {
|
|
106
106
|
const t = useLabels("carousel", carouselLabels, labels);
|
|
107
107
|
const { dir, locale } = useLocale();
|
|
108
108
|
const reduced = useReducedMotion();
|
|
@@ -258,12 +258,12 @@ export const Carousel = React.forwardRef(function Carousel({ label, preset = "de
|
|
|
258
258
|
/* ------------------------------------------------------------------ */
|
|
259
259
|
/* Viewport + slides */
|
|
260
260
|
/* ------------------------------------------------------------------ */
|
|
261
|
-
const SlideIndexContext = React.createContext({ index: -1, total: 0 });
|
|
261
|
+
const SlideIndexContext = /*#__PURE__*/ React.createContext({ index: -1, total: 0 });
|
|
262
262
|
/**
|
|
263
263
|
* The clipping viewport and the slide track. Children are `CarouselSlide`s. Renders the arrows
|
|
264
264
|
* (and the pause button with autoplay) on the stage, so they line up with the slides.
|
|
265
265
|
*/
|
|
266
|
-
export const CarouselViewport = React.forwardRef(function CarouselViewport({ arrows = true, playPause = true, empty, containerClassName, className, children, ...props }, ref) {
|
|
266
|
+
export const CarouselViewport = /*#__PURE__*/ React.forwardRef(function CarouselViewport({ arrows = true, playPause = true, empty, containerClassName, className, children, ...props }, ref) {
|
|
267
267
|
const c = useCarouselContext("CarouselViewport");
|
|
268
268
|
const slides = React.Children.toArray(children).filter(React.isValidElement);
|
|
269
269
|
const n = slides.length;
|
|
@@ -277,7 +277,7 @@ export const CarouselViewport = React.forwardRef(function CarouselViewport({ arr
|
|
|
277
277
|
return (_jsxs("div", { "data-slot": "carousel-stage", className: "vui-carousel-stage relative", children: [c.autoplay && playPause ? _jsx(CarouselPlayPause, { className: "vui-carousel-playpause absolute end-3 top-3 z-20" }) : null, _jsx("div", { ref: ref, className: cn("vui-carousel-viewport overflow-hidden", className), "data-slot": "carousel-viewport", ...props, children: _jsx("div", { ref: c.viewportRef, className: "h-full", children: _jsx("div", { "data-slot": "carousel-container", "aria-live": c.playing ? "off" : "polite", "aria-busy": c.loading || undefined, className: cn("vui-carousel-container flex", vertical ? "h-full flex-col" : "touch-pan-y", containerClassName), children: c.loading && n === 0 ? (_jsx(CarouselSlide, { "aria-label": c.t("loading"), children: _jsx(Skeleton, { className: "ui-shimmer aspect-video w-full rounded-ui" }) })) : (slides.map((slide, i) => (_jsx(SlideIndexContext.Provider, { value: { index: i, total: n }, children: slide }, slide.key ?? i)))) }) }) }), showArrows ? (_jsxs(_Fragment, { children: [_jsx(CarouselPrev, { className: cn("vui-carousel-arrow absolute z-10", vertical ? "start-1/2 top-2 -translate-x-1/2 rtl:translate-x-1/2" : "start-3 top-1/2 -translate-y-1/2") }), _jsx(CarouselNext, { className: cn("vui-carousel-arrow absolute z-10", vertical ? "start-1/2 bottom-2 -translate-x-1/2 rtl:translate-x-1/2" : "end-3 top-1/2 -translate-y-1/2") })] })) : null] }));
|
|
278
278
|
});
|
|
279
279
|
/** One slide: `role="group"`, `aria-roledescription="slide"`, labelled "3 of 7"; `inert` while off-screen. */
|
|
280
|
-
export const CarouselSlide = React.forwardRef(function CarouselSlide({ className, children, ...props }, ref) {
|
|
280
|
+
export const CarouselSlide = /*#__PURE__*/ React.forwardRef(function CarouselSlide({ className, children, ...props }, ref) {
|
|
281
281
|
const c = useCarouselContext("CarouselSlide");
|
|
282
282
|
const { index: i, total } = React.useContext(SlideIndexContext);
|
|
283
283
|
const hidden = c.inView !== null && i >= 0 && !c.inView.has(i);
|
|
@@ -304,14 +304,14 @@ export function CarouselNext(props) {
|
|
|
304
304
|
return _jsx(ArrowButton, { direction: "next", ...props });
|
|
305
305
|
}
|
|
306
306
|
/** One button per slide; the current one is `aria-current` and painted with `--accent`. */
|
|
307
|
-
export const CarouselDots = React.forwardRef(function CarouselDots({ className, ...props }, ref) {
|
|
307
|
+
export const CarouselDots = /*#__PURE__*/ React.forwardRef(function CarouselDots({ className, ...props }, ref) {
|
|
308
308
|
const c = useCarouselContext("CarouselDots");
|
|
309
309
|
if (c.count <= 1)
|
|
310
310
|
return null;
|
|
311
311
|
return (_jsx("div", { ref: ref, role: "group", "aria-label": c.t("dots"), "data-slot": "carousel-dots", className: cn("vui-carousel-dots flex items-center justify-center gap-1", c.preset === "hero" ? "absolute inset-x-0 bottom-4 z-10" : "mt-4", className), ...props, children: Array.from({ length: c.count }, (_, i) => (_jsx("button", { type: "button", "aria-label": c.t("goTo", { index: c.nf.format(i + 1) }), "aria-current": i === c.index ? "true" : undefined, "data-slot": "carousel-dot", onClick: () => c.scrollTo(i), className: "vui-carousel-dot focus-ring group/dot relative flex h-6 min-w-6 items-center justify-center rounded-full", children: _jsx("span", { "aria-hidden": true, className: "block h-1.5 rounded-full" }) }, i))) }));
|
|
312
312
|
});
|
|
313
313
|
/** A row of thumbnail buttons under a gallery carousel; the selected one gets a `--ring` border. */
|
|
314
|
-
export const CarouselThumbs = React.forwardRef(function CarouselThumbs({ items, aspect = 4 / 3, align = "start", className, ...props }, ref) {
|
|
314
|
+
export const CarouselThumbs = /*#__PURE__*/ React.forwardRef(function CarouselThumbs({ items, aspect = 4 / 3, align = "start", className, ...props }, ref) {
|
|
315
315
|
const c = useCarouselContext("CarouselThumbs");
|
|
316
316
|
const listRef = React.useRef(null);
|
|
317
317
|
React.useEffect(() => {
|
|
@@ -332,7 +332,7 @@ export function CarouselPlayPause({ className, size, ...props }) {
|
|
|
332
332
|
return (_jsx(IconButton, { label: c.t(c.playing ? "pause" : "play"), tooltip: false, size: size ?? "sm", variant: "ghost", "data-slot": "carousel-playpause", "aria-pressed": undefined, onClick: c.playing ? c.pause : c.play, className: cn("surface-popover rounded-full! hover:bg-popover", className), ...props, children: c.playing ? _jsx(Pause, { "aria-hidden": true }) : _jsx(Play, { "aria-hidden": true }) }));
|
|
333
333
|
}
|
|
334
334
|
/** "3 / 7" in the locale's digits. */
|
|
335
|
-
export const CarouselCounter = React.forwardRef(function CarouselCounter({ className, ...props }, ref) {
|
|
335
|
+
export const CarouselCounter = /*#__PURE__*/ React.forwardRef(function CarouselCounter({ className, ...props }, ref) {
|
|
336
336
|
const c = useCarouselContext("CarouselCounter");
|
|
337
337
|
if (c.count === 0)
|
|
338
338
|
return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as CheckboxPrimitive from "radix-ui/checkbox";
|
|
3
3
|
export type CheckboxCheckedState = boolean | "indeterminate";
|
|
4
4
|
export declare const checkboxVariants: (props?: ({
|
|
5
5
|
size?: "sm" | "md" | null | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as CheckboxPrimitive from "radix-ui/checkbox";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { cn } from "../lib/cn.js";
|
|
7
7
|
import { mergeIds } from "../lib/compose-refs.js";
|
|
8
8
|
import { FieldContextReset, useFieldContext, useFieldControl } from "../lib/field-context.js";
|
|
9
9
|
import { useControllableState } from "../lib/use-controllable-state.js";
|
|
10
|
-
export const checkboxVariants = cva([
|
|
10
|
+
export const checkboxVariants = /*#__PURE__*/ cva([
|
|
11
11
|
"peer relative inline-flex shrink-0 items-center justify-center border bg-field text-accent-fg outline-none",
|
|
12
12
|
// 16–18px boxes need the stronger edge in every material, or they vanish on dark solid
|
|
13
13
|
"border-field-border-hover",
|
|
@@ -29,7 +29,7 @@ export const checkboxVariants = cva([
|
|
|
29
29
|
},
|
|
30
30
|
defaultVariants: { size: "md" },
|
|
31
31
|
});
|
|
32
|
-
const CheckboxGroupContext = React.createContext(null);
|
|
32
|
+
const CheckboxGroupContext = /*#__PURE__*/ React.createContext(null);
|
|
33
33
|
function CheckIcon() {
|
|
34
34
|
return (_jsx("svg", { viewBox: "0 0 14 14", fill: "none", "aria-hidden": true, focusable: "false", children: _jsx("path", { className: "ui-check-path", d: "M3 7.4 5.8 10 11 4.2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
35
35
|
}
|
|
@@ -46,7 +46,7 @@ function DashIcon() {
|
|
|
46
46
|
* <Field label="I accept the terms" orientation="horizontal" error={err}><Checkbox name="terms" /></Field>
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
|
-
export const Checkbox = React.forwardRef(function Checkbox(rawProps, ref) {
|
|
49
|
+
export const Checkbox = /*#__PURE__*/ React.forwardRef(function Checkbox(rawProps, ref) {
|
|
50
50
|
const group = React.useContext(CheckboxGroupContext);
|
|
51
51
|
const { checked: checkedProp, defaultChecked, onCheckedChange, label, description, size = group?.size ?? "md", variant = group?.variant ?? "default", icon, invalid, readOnly: readOnlyProp, className, controlClassName, value, style, ...rest } = rawProps;
|
|
52
52
|
const groupValue = value === undefined ? undefined : String(value);
|
|
@@ -103,7 +103,7 @@ export const Checkbox = React.forwardRef(function Checkbox(rawProps, ref) {
|
|
|
103
103
|
* </Field>
|
|
104
104
|
* ```
|
|
105
105
|
*/
|
|
106
|
-
export const CheckboxGroup = React.forwardRef(function CheckboxGroup({ value, defaultValue, onValueChange, name, items, orientation = "vertical", variant = "default", size, disabled, readOnly, invalid, required, className, children, id, "aria-labelledby": labelledBy, "aria-describedby": describedBy, ...props }, ref) {
|
|
106
|
+
export const CheckboxGroup = /*#__PURE__*/ React.forwardRef(function CheckboxGroup({ value, defaultValue, onValueChange, name, items, orientation = "vertical", variant = "default", size, disabled, readOnly, invalid, required, className, children, id, "aria-labelledby": labelledBy, "aria-describedby": describedBy, ...props }, ref) {
|
|
107
107
|
const field = useFieldContext();
|
|
108
108
|
const [current, setCurrent] = useControllableState({ value, defaultValue: defaultValue ?? [], onChange: onValueChange, name: "CheckboxGroup" });
|
|
109
109
|
const order = React.useRef([]);
|
|
@@ -133,6 +133,6 @@ export const CheckboxGroup = React.forwardRef(function CheckboxGroup({ value, de
|
|
|
133
133
|
: "grid gap-2.5", className), children: _jsx(FieldContextReset, { children: _jsxs(CheckboxGroupContext.Provider, { value: ctx, children: [items?.map((item) => (_jsx(CheckboxGroupItem, { value: item.value, label: item.label, description: item.description, icon: item.icon, disabled: item.disabled }, item.value))), children] }) }) }));
|
|
134
134
|
});
|
|
135
135
|
/** One option inside a `CheckboxGroup`. */
|
|
136
|
-
export const CheckboxGroupItem = React.forwardRef(function CheckboxGroupItem(props, ref) {
|
|
136
|
+
export const CheckboxGroupItem = /*#__PURE__*/ React.forwardRef(function CheckboxGroupItem(props, ref) {
|
|
137
137
|
return _jsx(Checkbox, { ref: ref, ...props });
|
|
138
138
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as CollapsiblePrimitive from "radix-ui/collapsible";
|
|
3
3
|
export interface CollapsibleProps extends React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root> {
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as CollapsiblePrimitive from "radix-ui/collapsible";
|
|
5
5
|
import { ChevronDown } from "lucide-react";
|
|
6
6
|
import { cn } from "../lib/cn.js";
|
|
7
7
|
/**
|
|
@@ -15,14 +15,14 @@ import { cn } from "../lib/cn.js";
|
|
|
15
15
|
* </Collapsible>
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
export const Collapsible = React.forwardRef(function Collapsible({ className, ...props }, ref) {
|
|
18
|
+
export const Collapsible = /*#__PURE__*/ React.forwardRef(function Collapsible({ className, ...props }, ref) {
|
|
19
19
|
return _jsx(CollapsiblePrimitive.Root, { ref: ref, "data-slot": "collapsible", className: cn("group/collapsible", className), ...props });
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
22
|
* The toggle button (`aria-expanded`, `aria-controls`). Styled as a quiet full-width row; pass
|
|
23
23
|
* `asChild` to make any button (a Button, a link-styled text) the trigger instead.
|
|
24
24
|
*/
|
|
25
|
-
export const CollapsibleTrigger = React.forwardRef(function CollapsibleTrigger({ className, chevron = true, icon, meta, asChild, children, ...props }, ref) {
|
|
25
|
+
export const CollapsibleTrigger = /*#__PURE__*/ React.forwardRef(function CollapsibleTrigger({ className, chevron = true, icon, meta, asChild, children, ...props }, ref) {
|
|
26
26
|
if (asChild) {
|
|
27
27
|
return (_jsx(CollapsiblePrimitive.Trigger, { ref: ref, "data-slot": "collapsible-trigger", asChild: true, className: className, ...props, children: children }));
|
|
28
28
|
}
|
|
@@ -32,6 +32,6 @@ export const CollapsibleTrigger = React.forwardRef(function CollapsibleTrigger({
|
|
|
32
32
|
* The hidden region. Animates its height (`ui-collapse`); no animation with
|
|
33
33
|
* `prefers-reduced-motion` or inside `data-motion="off"`. `forceMount` keeps it in the DOM while closed.
|
|
34
34
|
*/
|
|
35
|
-
export const CollapsibleContent = React.forwardRef(function CollapsibleContent({ className, ...props }, ref) {
|
|
35
|
+
export const CollapsibleContent = /*#__PURE__*/ React.forwardRef(function CollapsibleContent({ className, ...props }, ref) {
|
|
36
36
|
return _jsx(CollapsiblePrimitive.Content, { ref: ref, "data-slot": "collapsible-content", className: cn("ui-collapse in-data-[motion=off]:animate-none", className), ...props });
|
|
37
37
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { HexAlphaColorPicker, HexColorPicker } from "react-colorful";
|
|
5
|
-
import
|
|
5
|
+
import * as RadioGroupPrimitive from "radix-ui/radio-group";
|
|
6
6
|
import { Check, ChevronDown, Pipette } from "lucide-react";
|
|
7
7
|
import { cn } from "../lib/cn.js";
|
|
8
8
|
import { mergeIds } from "../lib/compose-refs.js";
|
|
@@ -72,7 +72,7 @@ function useSwatches(swatches, probe) {
|
|
|
72
72
|
* A row of preset colours as a radio group (one tab stop, arrow keys move and select). For label
|
|
73
73
|
* colours, calendar categories and campaign colours where a free picker is too much.
|
|
74
74
|
*/
|
|
75
|
-
export const ColorSwatchPicker = React.forwardRef(function ColorSwatchPicker({ swatches: swatchesProp, value: valueProp, defaultValue, onValueChange, size = "md", name: nameProp, disabled, id, className, labels, ...aria }, ref) {
|
|
75
|
+
export const ColorSwatchPicker = /*#__PURE__*/ React.forwardRef(function ColorSwatchPicker({ swatches: swatchesProp, value: valueProp, defaultValue, onValueChange, size = "md", name: nameProp, disabled, id, className, labels, ...aria }, ref) {
|
|
76
76
|
const t = useLabels("colorPicker", colorLabels, labels);
|
|
77
77
|
const field = useFieldContext();
|
|
78
78
|
const probe = React.useRef(null);
|
|
@@ -204,7 +204,7 @@ export function ColorPickerPanel({ value, onValueChange, alpha = false, swatches
|
|
|
204
204
|
* <ColorPicker alpha swatches="tokens" variant="inline" />
|
|
205
205
|
* ```
|
|
206
206
|
*/
|
|
207
|
-
export const ColorPicker = React.forwardRef(function ColorPicker(props, ref) {
|
|
207
|
+
export const ColorPicker = /*#__PURE__*/ React.forwardRef(function ColorPicker(props, ref) {
|
|
208
208
|
const { value: valueProp, defaultValue, onValueChange, alpha, swatches, eyeDropper, format: formatProp, defaultFormat, onFormatChange, showFormats, contrastAgainst, variant = "popover", name: nameProp, size = "md", invalid, open: openProp, defaultOpen, onOpenChange, className, labels, } = props;
|
|
209
209
|
const t = useLabels("colorPicker", colorLabels, labels);
|
|
210
210
|
const field = useFieldContext();
|
|
@@ -291,4 +291,4 @@ function ComboboxInner(props, ref) {
|
|
|
291
291
|
* <Combobox items={categories} onCreate={async (name) => api.createCategory(name)} />
|
|
292
292
|
* ```
|
|
293
293
|
*/
|
|
294
|
-
export const Combobox = React.forwardRef(ComboboxInner);
|
|
294
|
+
export const Combobox = /*#__PURE__*/ React.forwardRef(ComboboxInner);
|
|
@@ -48,43 +48,43 @@ const commandLabels = {
|
|
|
48
48
|
* </Command>
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
export const Command = React.forwardRef(function Command({ className, filter, label, loop = true, vimBindings = false, labels, ...props }, ref) {
|
|
51
|
+
export const Command = /*#__PURE__*/ React.forwardRef(function Command({ className, filter, label, loop = true, vimBindings = false, labels, ...props }, ref) {
|
|
52
52
|
const { locale } = useLocale();
|
|
53
53
|
const t = useLabels("command", commandLabels, labels);
|
|
54
54
|
const defaultFilter = React.useMemo(() => cmdkFilter(locale), [locale]);
|
|
55
55
|
return (_jsx(Cmdk, { ref: ref, "data-slot": "command", label: label ?? t("label"), filter: filter ?? defaultFilter, loop: loop, vimBindings: vimBindings, className: cn("vui-command flex min-h-0 w-full flex-col overflow-hidden text-fg", className), ...props }));
|
|
56
56
|
});
|
|
57
57
|
/** The search field. Placeholder from the dictionary (`command.placeholder`). */
|
|
58
|
-
export const CommandInput = React.forwardRef(function CommandInput({ className, chip, end, placeholder, labels, ...props }, ref) {
|
|
58
|
+
export const CommandInput = /*#__PURE__*/ React.forwardRef(function CommandInput({ className, chip, end, placeholder, labels, ...props }, ref) {
|
|
59
59
|
const t = useLabels("command", commandLabels, labels);
|
|
60
60
|
return (_jsxs("div", { "data-slot": "command-input", className: "flex items-center gap-2.5 border-b border-line px-4", children: [_jsx(Search, { "aria-hidden": true, className: "size-4 shrink-0 text-fg-subtle" }), chip ? (_jsx("span", { "data-slot": "command-chip", className: "inline-flex max-w-[40%] shrink-0 items-center gap-1 truncate rounded-ui-sm bg-selected px-2 py-0.5 text-xs font-medium text-fg-muted", children: chip })) : null, _jsx(Cmdk.Input, { ref: ref, placeholder: placeholder ?? t("placeholder"), className: cn("h-[calc(var(--control-h)+0.75rem)] min-w-0 flex-1 bg-transparent text-[15px] text-fg outline-none placeholder:text-fg-subtle", className), ...props }), end] }));
|
|
61
61
|
});
|
|
62
62
|
/** The scrolling listbox. */
|
|
63
|
-
export const CommandList = React.forwardRef(function CommandList({ className, ...props }, ref) {
|
|
63
|
+
export const CommandList = /*#__PURE__*/ React.forwardRef(function CommandList({ className, ...props }, ref) {
|
|
64
64
|
return (_jsx(Cmdk.List, { ref: ref, "data-slot": "command-list", className: cn("max-h-[min(26rem,60dvh)] min-h-0 scroll-py-2 overflow-y-auto overscroll-contain p-1.5 outline-none", className), ...props }));
|
|
65
65
|
});
|
|
66
66
|
/** Shown when nothing matches. Default text from the dictionary (`command.empty`). */
|
|
67
|
-
export const CommandEmpty = React.forwardRef(function CommandEmpty({ className, children, labels, ...props }, ref) {
|
|
67
|
+
export const CommandEmpty = /*#__PURE__*/ React.forwardRef(function CommandEmpty({ className, children, labels, ...props }, ref) {
|
|
68
68
|
const t = useLabels("command", commandLabels, labels);
|
|
69
69
|
return (_jsx(Cmdk.Empty, { ref: ref, "data-slot": "command-empty", className: cn("px-3 py-8 text-center text-sm text-fg-muted", className), ...props, children: children ?? t("empty") }));
|
|
70
70
|
});
|
|
71
71
|
/** A loading row (async results). */
|
|
72
|
-
export const CommandLoading = React.forwardRef(function CommandLoading({ className, children, labels, label, ...props }, ref) {
|
|
72
|
+
export const CommandLoading = /*#__PURE__*/ React.forwardRef(function CommandLoading({ className, children, labels, label, ...props }, ref) {
|
|
73
73
|
const t = useLabels("command", commandLabels, labels);
|
|
74
74
|
return (_jsx(Cmdk.Loading, { ref: ref, "data-slot": "command-loading", label: label ?? t("loading"), className: cn("flex items-center gap-2 px-3 py-2.5 text-[13px] text-fg-muted", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(Spinner, { size: "xs" }), " ", t("loading")] })) }));
|
|
75
75
|
});
|
|
76
76
|
/** A titled group of items. */
|
|
77
|
-
export const CommandGroup = React.forwardRef(function CommandGroup({ className, ...props }, ref) {
|
|
77
|
+
export const CommandGroup = /*#__PURE__*/ React.forwardRef(function CommandGroup({ className, ...props }, ref) {
|
|
78
78
|
return (_jsx(Cmdk.Group, { ref: ref, "data-slot": "command-group", className: cn("[&:not(:first-child)]:mt-1.5", "[&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:pt-2 [&_[cmdk-group-heading]]:pb-1.5", "[&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:tracking-[0.04em] [&_[cmdk-group-heading]]:text-fg-subtle", className), ...props }));
|
|
79
79
|
});
|
|
80
80
|
/** A hairline between groups. */
|
|
81
|
-
export const CommandSeparator = React.forwardRef(function CommandSeparator({ className, ...props }, ref) {
|
|
81
|
+
export const CommandSeparator = /*#__PURE__*/ React.forwardRef(function CommandSeparator({ className, ...props }, ref) {
|
|
82
82
|
// Decorative: role="separator" is not an allowed child of the listbox (axe aria-required-children);
|
|
83
83
|
// the group headings already tell screen readers where a section starts.
|
|
84
84
|
return _jsx(Cmdk.Separator, { ref: ref, "aria-hidden": true, "data-slot": "command-separator", className: cn("-mx-1.5 my-1.5 h-px bg-line", className), ...props });
|
|
85
85
|
});
|
|
86
86
|
/** One selectable row. Highlighted with the arrow keys; Enter or click runs `onSelect`. */
|
|
87
|
-
export const CommandItem = React.forwardRef(function CommandItem({ className, icon, description, shortcut, badge, chevron, loading, children, ...props }, ref) {
|
|
87
|
+
export const CommandItem = /*#__PURE__*/ React.forwardRef(function CommandItem({ className, icon, description, shortcut, badge, chevron, loading, children, ...props }, ref) {
|
|
88
88
|
return (_jsxs(Cmdk.Item, { ref: ref, "data-slot": "command-item", "aria-busy": loading || undefined, className: cn(itemVariants({ size: "md" }), "min-h-[calc(var(--control-h)*0.95)] gap-2.5 px-2.5 data-[selected=true]:bg-selected", className), ...props, children: [loading ? (_jsx(Spinner, { size: "xs", className: "shrink-0" })) : icon ? (_jsx("span", { "aria-hidden": true, className: cn("flex shrink-0 items-center text-fg-muted", description && "self-start pt-0.5"), children: icon })) : null, _jsxs("span", { className: itemSlots.label, children: [children, description ? _jsx("span", { className: cn(itemSlots.description, "mt-0.5 truncate"), children: description }) : null] }), badge != null ? _jsx("span", { className: "ms-auto flex shrink-0 items-center ps-3", children: badge }) : null, shortcut ? _jsx(CommandShortcut, { keys: shortcut, className: badge == null ? "ms-auto" : undefined }) : null, chevron ? _jsx(ChevronRight, { "aria-hidden": true, className: cn("size-3.5! shrink-0 text-fg-subtle rtl:-scale-x-100", !shortcut && badge == null && "ms-auto") }) : null] }));
|
|
89
89
|
});
|
|
90
90
|
const MODIFIER_KEYS = /^(mod|ctrl|control|meta|cmd|command|alt|option|shift)$/i;
|
|
@@ -167,7 +167,7 @@ export function createCommandRegistry(init = {}) {
|
|
|
167
167
|
registry.registerSource(s);
|
|
168
168
|
return registry;
|
|
169
169
|
}
|
|
170
|
-
const PaletteContext = React.createContext(null);
|
|
170
|
+
const PaletteContext = /*#__PURE__*/ React.createContext(null);
|
|
171
171
|
const allowedBy = (a, can) => !a.permission || (Array.isArray(a.permission) ? a.permission : [a.permission]).every((p) => can(p));
|
|
172
172
|
const toShortcut = (s) => (Array.isArray(s) ? s.join("+") : s);
|
|
173
173
|
const RECENT_KEY = "ui-cmd-recent";
|
|
@@ -147,7 +147,7 @@ function findTrigger(value, caret, triggers) {
|
|
|
147
147
|
* ↑/↓ move, Enter or Tab insert, Esc close), optional attachments, and ⌘/Ctrl+Enter to send.
|
|
148
148
|
* Picked mentions are stored as `@[Name](user:id)` in the submitted body.
|
|
149
149
|
*/
|
|
150
|
-
export const CommentComposer = React.forwardRef(function CommentComposer({ onSubmit, onCancel, defaultValue, parentId, mentionSources, allowAttachments, placeholder, submitLabel, author, autoFocus, variant = "inline", compact, labels, className, ...props }, ref) {
|
|
150
|
+
export const CommentComposer = /*#__PURE__*/ React.forwardRef(function CommentComposer({ onSubmit, onCancel, defaultValue, parentId, mentionSources, allowAttachments, placeholder, submitLabel, author, autoFocus, variant = "inline", compact, labels, className, ...props }, ref) {
|
|
151
151
|
const t = useLabels("comments", commentLabels, labels);
|
|
152
152
|
const { locale } = useLocale();
|
|
153
153
|
const initial = React.useMemo(() => (defaultValue ? parseMentions(defaultValue) : null), [defaultValue]);
|
|
@@ -318,7 +318,7 @@ export const CommentComposer = React.forwardRef(function CommentComposer({ onSub
|
|
|
318
318
|
}) }), results.length === 0 ? (_jsx("p", { className: "flex items-center gap-2 px-2 py-1.5 text-[13px] text-fg-muted", children: searching ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { size: "xs" }), " ", t("searching")] })) : (t("noMatch", { query: picker.query })) })) : null] })) : null, _jsx("span", { className: "sr-only", "aria-live": "polite", children: open && !searching ? t("suggestions", { count: results.length }) : "" })] })] }));
|
|
319
319
|
});
|
|
320
320
|
/** One comment: avatar, author and time, body with mention chips, attachments, reactions and actions. An `<article>` labelled by its header. */
|
|
321
|
-
export const Comment = React.forwardRef(function Comment({ comment: c, currentUserId, isReply, onReply, onEdit, onDelete, onResolve, onRetry, onDiscard, onReact, getLink, reactions = defaultReactions, mentionSources, renderMention, onPreviewAttachment, readOnly, compact, now, labels, className, children, ...props }, ref) {
|
|
321
|
+
export const Comment = /*#__PURE__*/ React.forwardRef(function Comment({ comment: c, currentUserId, isReply, onReply, onEdit, onDelete, onResolve, onRetry, onDiscard, onReact, getLink, reactions = defaultReactions, mentionSources, renderMention, onPreviewAttachment, readOnly, compact, now, labels, className, children, ...props }, ref) {
|
|
322
322
|
const t = useLabels("comments", commentLabels, labels);
|
|
323
323
|
const f = useFormat();
|
|
324
324
|
const headId = React.useId();
|
|
@@ -380,7 +380,7 @@ function ReactionPicker({ reactions, current, onPick, t }) {
|
|
|
380
380
|
* />
|
|
381
381
|
* ```
|
|
382
382
|
*/
|
|
383
|
-
export const CommentThread = React.forwardRef(function CommentThread({ comments, currentUserId, currentUser, onSubmit, onEdit, onDelete, onResolve, onRetry, onDiscard, onReact, reactions, getLink, mentionSources, renderMention, onPreviewAttachment, allowAttachments, order = "oldest-first", layout = "thread", composer = "inline", readOnly, now, labels, className, ...props }, ref) {
|
|
383
|
+
export const CommentThread = /*#__PURE__*/ React.forwardRef(function CommentThread({ comments, currentUserId, currentUser, onSubmit, onEdit, onDelete, onResolve, onRetry, onDiscard, onReact, reactions, getLink, mentionSources, renderMention, onPreviewAttachment, allowAttachments, order = "oldest-first", layout = "thread", composer = "inline", readOnly, now, labels, className, ...props }, ref) {
|
|
384
384
|
const t = useLabels("comments", commentLabels, labels);
|
|
385
385
|
const compact = layout === "compact";
|
|
386
386
|
const [replyTo, setReplyTo] = React.useState(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as ContextMenuPrimitive from "radix-ui/context-menu";
|
|
3
3
|
import type { MenuEntry } from "../lib/variants.js";
|
|
4
4
|
export declare const ContextMenuRoot: React.FC<ContextMenuPrimitive.ContextMenuProps>;
|
|
5
5
|
export declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|