@espressif/dashboard-ui-components 1.14.1 → 1.15.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/.claude/rules/dashboard-ui-consumption.md +48 -0
- package/CHANGELOG.md +82 -0
- package/dist/bottom-sheet.props-CFpM7Gvx.d.ts +26 -0
- package/dist/common/index.d.ts +3 -3
- package/dist/common/my-account-menu/my-account-menu.js +3 -3
- package/dist/components/async-multi-select/async-multi-select.js +4 -8
- package/dist/components/async-multi-select/index.d.ts +5 -1
- package/dist/components/bottom-sheet/index.d.ts +3 -25
- package/dist/components/breadcrumb/index.d.ts +4 -1
- package/dist/components/cards/index.d.ts +1 -1
- package/dist/components/cards/section-card.js +2 -2
- package/dist/components/carousel/carousel.js +8 -4
- package/dist/components/carousel/index.d.ts +8 -0
- package/dist/components/combobox/index.d.ts +3 -1
- package/dist/components/coverflow/coverflow.js +3 -2
- package/dist/components/coverflow/index.d.ts +2 -0
- package/dist/components/data-table/data-table.js +8 -4
- package/dist/components/data-table/index.d.ts +5 -1
- package/dist/components/date-range-picker/date-range-picker.js +5 -5
- package/dist/components/date-range-picker/index.d.ts +9 -1
- package/dist/components/dialog/index.d.ts +3 -1
- package/dist/components/facet-filters/active-filters.js +2 -1
- package/dist/components/facet-filters/filter-group.js +2 -1
- package/dist/components/facet-filters/index.d.ts +4 -0
- package/dist/components/file-upload/file-upload.js +2 -2
- package/dist/components/file-upload/index.d.ts +2 -0
- package/dist/components/filters-bar/filters-bar-sheet.js +73 -0
- package/dist/components/filters-bar/filters-bar.js +51 -28
- package/dist/components/filters-bar/index.d.ts +35 -8
- package/dist/components/index.d.ts +8 -7
- package/dist/components/key-value-manager/index.d.ts +8 -0
- package/dist/components/key-value-manager/key-value-manager-table.js +4 -4
- package/dist/components/key-value-manager/key-value-manager.js +5 -1
- package/dist/components/key-value-manager/key-value-manager.props.js +5 -1
- package/dist/components/list-details/index.d.ts +1 -1
- package/dist/components/nav-bar/index.d.ts +19 -2
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +4 -3
- package/dist/components/nav-bar/nav-bar.js +10 -7
- package/dist/components/sheet/index.d.ts +3 -1
- package/dist/components/sidebar/index.d.ts +13 -6
- package/dist/components/sidebar/sidebar.js +4 -2
- package/dist/components/simple-paginated-list/index.d.ts +11 -2
- package/dist/components/simple-paginated-list/simple-paginated-list.js +3 -3
- package/dist/components/stat-card/index.d.ts +10 -0
- package/dist/components/stat-card/stat-card.js +60 -48
- package/dist/components/tag/index.d.ts +2 -0
- package/dist/components/tag/tag.js +2 -2
- package/dist/components/tag-input/index.d.ts +5 -0
- package/dist/components/tag-input/tag-input.js +5 -3
- package/dist/components/transfer-list/index.d.ts +22 -2
- package/dist/components/transfer-list/transfer-list.js +30 -8
- package/dist/components/user-type-badge/index.d.ts +2 -0
- package/dist/components/user-type-badge/user-type-badge.js +3 -2
- package/dist/core/animate-ui/components/radix/dialog.js +2 -2
- package/dist/core/animate-ui/components/radix/sheet.js +3 -3
- package/dist/core/animate-ui/components/radix/sidebar.js +4 -4
- package/dist/core/breadcrumb.js +2 -2
- package/dist/core/combobox/combobox.js +2 -2
- package/dist/index.d.ts +10 -9
- package/dist/layouts/index.d.ts +81 -35
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +8 -2
- package/dist/layouts/shared/account-menu-props.js +3 -2
- package/dist/layouts/workspace-layout/account-menu/account-menu.js +19 -8
- package/dist/layouts/workspace-layout/breadcrumbs/workspace-breadcrumbs.js +14 -11
- package/dist/layouts/workspace-layout/header/header.js +3 -3
- package/dist/layouts/workspace-layout/workspace-layout.js +13 -5
- package/dist/{my-account-menu.props-C7DK71WC.d.ts → my-account-menu.props-V3kFdvCZ.d.ts} +2 -0
- package/dist/{section-card-DqQeQkzU.d.ts → section-card-Bs3sKQtv.d.ts} +6 -1
- package/dist/{types-CkXflqg7.d.ts → types-CoZOfz4S.d.ts} +12 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export { S as SidebarEndActionConfig, a as SidebarGroupConfig, b as SidebarItemConfig, c as
|
|
2
|
+
import { f as SidebarProps$1 } from '../../types-CoZOfz4S.js';
|
|
3
|
+
export { S as SidebarEndActionConfig, a as SidebarGroupConfig, b as SidebarItemConfig, c as SidebarLabels, d as SidebarLinkComponentProps, e as SidebarNavEntry, g as SidebarTopLevelLinkConfig, i as isSidebarGroup } from '../../types-CoZOfz4S.js';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
import { Transition } from 'motion/react';
|
|
@@ -13,7 +13,7 @@ import '../../index-BQANnKs9.js';
|
|
|
13
13
|
import '@radix-ui/react-separator';
|
|
14
14
|
import '../../slot-DGErA9zi.js';
|
|
15
15
|
|
|
16
|
-
declare function Sidebar$1({ items, currentPath, header, headerHeight, footer, linkComponent: LinkComponent, collapsible, variant, focusActiveGroup, density, flyoutRadius, flyoutElevation, beforeContent, headerClassName, className, mobileClassName, id, onClick, }: SidebarProps$1): React.JSX.Element;
|
|
16
|
+
declare function Sidebar$1({ items, currentPath, header, headerHeight, footer, linkComponent: LinkComponent, collapsible, variant, focusActiveGroup, density, flyoutRadius, flyoutElevation, beforeContent, headerClassName, className, mobileClassName, id, onClick, labels, }: SidebarProps$1): React.JSX.Element;
|
|
17
17
|
|
|
18
18
|
type SidebarContextProps = {
|
|
19
19
|
state: 'expanded' | 'collapsed';
|
|
@@ -40,10 +40,17 @@ type SidebarProps = React.ComponentProps<'div'> & {
|
|
|
40
40
|
mobileClassName?: string;
|
|
41
41
|
animateOnHover?: boolean;
|
|
42
42
|
transition?: Transition;
|
|
43
|
+
/** Screen-reader title of the mobile sheet. Default "Sidebar". */
|
|
44
|
+
mobileTitle?: string;
|
|
45
|
+
/** Screen-reader description of the mobile sheet. Default "Displays the mobile sidebar.". */
|
|
46
|
+
mobileDescription?: string;
|
|
43
47
|
};
|
|
44
|
-
declare function Sidebar({ side, variant, collapsible, className, children, animateOnHover, containerClassName, mobileClassName, transition, ...props }: SidebarProps): React.JSX.Element;
|
|
45
|
-
type SidebarTriggerProps = React.ComponentProps<typeof Button
|
|
46
|
-
|
|
48
|
+
declare function Sidebar({ side, variant, collapsible, className, children, animateOnHover, containerClassName, mobileClassName, transition, mobileTitle, mobileDescription, ...props }: SidebarProps): React.JSX.Element;
|
|
49
|
+
type SidebarTriggerProps = React.ComponentProps<typeof Button> & {
|
|
50
|
+
/** Screen-reader name of the button. Default "Toggle Sidebar". */
|
|
51
|
+
label?: string;
|
|
52
|
+
};
|
|
53
|
+
declare function SidebarTrigger({ className, onClick, label, ...props }: SidebarTriggerProps): React.JSX.Element;
|
|
47
54
|
type SidebarRailProps = React.ComponentProps<'button'>;
|
|
48
55
|
declare function SidebarRail({ className, ...props }: SidebarRailProps): React.JSX.Element;
|
|
49
56
|
type SidebarInsetProps = React.ComponentProps<'main'>;
|
|
@@ -196,7 +196,7 @@ function TopLevelLinkRow({ item, isCollapsed, isMobile, renderMenuItem }) {
|
|
|
196
196
|
})
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
function Sidebar({ items, currentPath, header, headerHeight, footer, linkComponent: LinkComponent, collapsible = "icon", variant = "sidebar", focusActiveGroup = false, density, flyoutRadius, flyoutElevation, beforeContent, headerClassName, className, mobileClassName, id, onClick }) {
|
|
199
|
+
function Sidebar({ items, currentPath, header, headerHeight, footer, linkComponent: LinkComponent, collapsible = "icon", variant = "sidebar", focusActiveGroup = false, density, flyoutRadius, flyoutElevation, beforeContent, headerClassName, className, mobileClassName, id, onClick, labels }) {
|
|
200
200
|
const { state, isMobile, setOpenMobile } = useSidebar();
|
|
201
201
|
const isCollapsed = state === "collapsed";
|
|
202
202
|
/** On mobile the sidebar is a sheet overlaying the page: navigating away should dismiss it. */
|
|
@@ -322,6 +322,8 @@ function Sidebar({ items, currentPath, header, headerHeight, footer, linkCompone
|
|
|
322
322
|
variant,
|
|
323
323
|
style: densityStyle(density),
|
|
324
324
|
mobileClassName,
|
|
325
|
+
mobileTitle: labels?.mobileTitle,
|
|
326
|
+
mobileDescription: labels?.mobileDescription,
|
|
325
327
|
...!isMobile && {
|
|
326
328
|
className,
|
|
327
329
|
id,
|
|
@@ -341,7 +343,7 @@ function Sidebar({ items, currentPath, header, headerHeight, footer, linkCompone
|
|
|
341
343
|
onClick: () => setOpenMobile(false),
|
|
342
344
|
children: [/* @__PURE__ */ jsx(X, { className: "size-5" }), /* @__PURE__ */ jsx("span", {
|
|
343
345
|
className: "sr-only",
|
|
344
|
-
children: "Close sidebar"
|
|
346
|
+
children: labels?.close ?? "Close sidebar"
|
|
345
347
|
})]
|
|
346
348
|
})]
|
|
347
349
|
}),
|
|
@@ -8,13 +8,22 @@ interface SimplePaginatedListItem {
|
|
|
8
8
|
action?: ReactNode;
|
|
9
9
|
}
|
|
10
10
|
type SimplePaginatedListSize = "sm" | "default" | "lg";
|
|
11
|
+
/** The list's own words, for an app in another language. English by default. */
|
|
12
|
+
interface SimplePaginatedListLabels {
|
|
13
|
+
/** The previous-page arrow. Default "Previous page". */
|
|
14
|
+
previousPage?: string;
|
|
15
|
+
/** The next-page arrow. Default "Next page". */
|
|
16
|
+
nextPage?: string;
|
|
17
|
+
}
|
|
11
18
|
interface SimplePaginatedListProps {
|
|
12
19
|
items: SimplePaginatedListItem[];
|
|
13
20
|
itemsPerPage?: number;
|
|
14
21
|
size?: SimplePaginatedListSize;
|
|
15
22
|
className?: string;
|
|
23
|
+
/** Screen-reader names of the page arrows, for an app in another language. */
|
|
24
|
+
labels?: SimplePaginatedListLabels;
|
|
16
25
|
}
|
|
17
26
|
|
|
18
|
-
declare function SimplePaginatedList({ items, itemsPerPage, size, className, }: SimplePaginatedListProps): React.JSX.Element;
|
|
27
|
+
declare function SimplePaginatedList({ items, itemsPerPage, size, className, labels, }: SimplePaginatedListProps): React.JSX.Element;
|
|
19
28
|
|
|
20
|
-
export { SimplePaginatedList, type SimplePaginatedListItem, type SimplePaginatedListProps, type SimplePaginatedListSize };
|
|
29
|
+
export { SimplePaginatedList, type SimplePaginatedListItem, type SimplePaginatedListLabels, type SimplePaginatedListProps, type SimplePaginatedListSize };
|
|
@@ -90,7 +90,7 @@ function ListRow({ item, showBorder, styles }) {
|
|
|
90
90
|
]
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
function SimplePaginatedList({ items, itemsPerPage = 3, size = "default", className }) {
|
|
93
|
+
function SimplePaginatedList({ items, itemsPerPage = 3, size = "default", className, labels }) {
|
|
94
94
|
const [page, setPage] = useState(0);
|
|
95
95
|
const [direction, setDirection] = useState(1);
|
|
96
96
|
const pageSize = Math.max(1, itemsPerPage);
|
|
@@ -147,7 +147,7 @@ function SimplePaginatedList({ items, itemsPerPage = 3, size = "default", classN
|
|
|
147
147
|
color: "primary",
|
|
148
148
|
size: "icon",
|
|
149
149
|
fullWidth: false,
|
|
150
|
-
"aria-label": "Previous page",
|
|
150
|
+
"aria-label": labels?.previousPage ?? "Previous page",
|
|
151
151
|
disabled: noItems || !hasPrev,
|
|
152
152
|
onClick: goPrev,
|
|
153
153
|
children: /* @__PURE__ */ jsx(ChevronLeft, {
|
|
@@ -160,7 +160,7 @@ function SimplePaginatedList({ items, itemsPerPage = 3, size = "default", classN
|
|
|
160
160
|
color: "primary",
|
|
161
161
|
size: "icon",
|
|
162
162
|
fullWidth: false,
|
|
163
|
-
"aria-label": "Next page",
|
|
163
|
+
"aria-label": labels?.nextPage ?? "Next page",
|
|
164
164
|
disabled: noItems || !hasNext,
|
|
165
165
|
onClick: goNext,
|
|
166
166
|
children: /* @__PURE__ */ jsx(ChevronRight, {
|
|
@@ -17,10 +17,20 @@ interface StatCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "color">, P
|
|
|
17
17
|
loading?: boolean;
|
|
18
18
|
icon?: ReactNode;
|
|
19
19
|
heading: string | ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* One or two sentences under the heading that say what the number counts
|
|
22
|
+
* ("Devices that connected at least once in the window"). It wraps, and is
|
|
23
|
+
* never cut short. While the card is narrower than about 22rem the icon
|
|
24
|
+
* moves above the heading, so the heading and description get the card's
|
|
25
|
+
* full width.
|
|
26
|
+
*/
|
|
27
|
+
description?: ReactNode;
|
|
20
28
|
value: number;
|
|
21
29
|
previousValue?: number;
|
|
22
30
|
previousValueComparisonTip?: string | ReactNode;
|
|
23
31
|
infoContent?: string | ReactNode;
|
|
32
|
+
/** `aria-label` on the info trigger shown with `infoContent`. Default "More information". */
|
|
33
|
+
infoIconLabel?: string;
|
|
24
34
|
valueType?: StatCardValueType;
|
|
25
35
|
surface?: StatCardSurface;
|
|
26
36
|
/**
|
|
@@ -39,10 +39,11 @@ var SIZE_STYLES = {
|
|
|
39
39
|
gap: "gap-4",
|
|
40
40
|
headerGap: "gap-3",
|
|
41
41
|
avatar: 40,
|
|
42
|
-
|
|
42
|
+
avatarClass: "size-9! @[20rem]:size-10!",
|
|
43
|
+
icon: "size-4.5 @[20rem]:size-5",
|
|
43
44
|
value: "text-2xl",
|
|
44
45
|
badge: "gap-1 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-2.5 py-0.5 type-caption",
|
|
45
|
-
info: "size-
|
|
46
|
+
info: "-my-1 size-6 [&_svg]:size-3.5",
|
|
46
47
|
visual: "h-7"
|
|
47
48
|
},
|
|
48
49
|
default: {
|
|
@@ -50,10 +51,11 @@ var SIZE_STYLES = {
|
|
|
50
51
|
gap: "gap-5",
|
|
51
52
|
headerGap: "gap-3",
|
|
52
53
|
avatar: 52,
|
|
53
|
-
|
|
54
|
+
avatarClass: "size-10! @[20rem]:size-13!",
|
|
55
|
+
icon: "size-5 @[20rem]:size-6",
|
|
54
56
|
value: "text-3xl",
|
|
55
57
|
badge: "gap-1 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-3 py-1 type-caption",
|
|
56
|
-
info: "size-
|
|
58
|
+
info: "-my-1 size-7 [&_svg]:size-4",
|
|
57
59
|
visual: "h-8"
|
|
58
60
|
},
|
|
59
61
|
lg: {
|
|
@@ -61,10 +63,11 @@ var SIZE_STYLES = {
|
|
|
61
63
|
gap: "gap-6",
|
|
62
64
|
headerGap: "gap-4",
|
|
63
65
|
avatar: 60,
|
|
64
|
-
|
|
66
|
+
avatarClass: "size-12! @[20rem]:size-15!",
|
|
67
|
+
icon: "size-6 @[20rem]:size-7",
|
|
65
68
|
value: "text-4xl",
|
|
66
69
|
badge: "gap-1.5 rounded-[var(--espd-own-radius,var(--espd-radius-pill,calc(infinity*1px)))] px-3.5 py-1 type-caption",
|
|
67
|
-
info: "size-
|
|
70
|
+
info: "-my-1 size-8 [&_svg]:size-5",
|
|
68
71
|
visual: "h-10"
|
|
69
72
|
}
|
|
70
73
|
};
|
|
@@ -113,7 +116,7 @@ function getTrend(value, previousValue) {
|
|
|
113
116
|
label: `${Math.abs(percent).toLocaleString(void 0, { maximumFractionDigits: 1 })}%`
|
|
114
117
|
};
|
|
115
118
|
}
|
|
116
|
-
var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, icon, heading, value, previousValue, previousValueComparisonTip, infoContent, valueType = "number", surface: surfaceKind = "tinted", visual, caption, className, style, radius, ...divProps }, ref) => {
|
|
119
|
+
var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, icon, heading, description, value, previousValue, previousValueComparisonTip, infoContent, infoIconLabel = "More information", valueType = "number", surface: surfaceKind = "tinted", visual, caption, className, style, radius, ...divProps }, ref) => {
|
|
117
120
|
const { partStyle } = useStyleAxes({ radius }, ["radius"]);
|
|
118
121
|
const s = SIZE_STYLES[size];
|
|
119
122
|
const statColor = resolveStatColor(color, value, previousValue);
|
|
@@ -121,7 +124,6 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
121
124
|
const trend = getTrend(value, previousValue);
|
|
122
125
|
const showTrend = trend !== void 0 && !(value === 0 && previousValue === 0);
|
|
123
126
|
const showInfo = hasRenderableContent(infoContent);
|
|
124
|
-
const showFooter = showTrend || showInfo;
|
|
125
127
|
const presetInfoClass = isPresetColor(statColor) ? PRESET_INFO_CLASS[statColor] : void 0;
|
|
126
128
|
const infoButtonStyle = !isPresetColor(statColor) && typeof statColor === "string" ? {
|
|
127
129
|
color: statColor,
|
|
@@ -129,7 +131,7 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
129
131
|
} : void 0;
|
|
130
132
|
return /* @__PURE__ */ jsxs("div", {
|
|
131
133
|
ref,
|
|
132
|
-
className: cn("relative isolate flex w-full flex-col overflow-hidden border border-transparent text-foreground", s.card, surface.className, className),
|
|
134
|
+
className: cn("@container relative isolate flex w-full flex-col overflow-hidden border border-transparent text-foreground", s.card, surface.className, className),
|
|
133
135
|
style: {
|
|
134
136
|
...partStyle,
|
|
135
137
|
...surface.style,
|
|
@@ -144,10 +146,11 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
144
146
|
color: statColor
|
|
145
147
|
})
|
|
146
148
|
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
147
|
-
className: cn("relative z-10 flex flex-col", s.gap, loading && "pointer-events-none blur-[1px] opacity-60"),
|
|
149
|
+
className: cn("relative z-10 flex flex-1 flex-col", s.gap, loading && "pointer-events-none blur-[1px] opacity-60"),
|
|
148
150
|
children: [
|
|
149
151
|
/* @__PURE__ */ jsxs("div", {
|
|
150
|
-
|
|
152
|
+
"data-slot": "stat-card-header",
|
|
153
|
+
className: cn("flex flex-col items-start @[20rem]:flex-row @[20rem]:items-center", s.headerGap),
|
|
151
154
|
children: [icon ? /* @__PURE__ */ jsx(IconAvatar, {
|
|
152
155
|
color: statColor,
|
|
153
156
|
size: s.avatar,
|
|
@@ -155,16 +158,42 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
155
158
|
show: true,
|
|
156
159
|
color: statColor
|
|
157
160
|
},
|
|
161
|
+
className: s.avatarClass,
|
|
162
|
+
discClassName: s.avatarClass,
|
|
158
163
|
children: renderSizedIcon(icon, s.icon)
|
|
159
|
-
}) : null, /* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
165
|
+
className: "flex min-w-0 flex-col gap-1 @[20rem]:flex-1",
|
|
166
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
167
|
+
className: "flex min-w-0 items-center gap-1",
|
|
168
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
169
|
+
as: "div",
|
|
170
|
+
variant: "heading",
|
|
171
|
+
className: "min-w-0 font-medium leading-tight",
|
|
172
|
+
children: heading
|
|
173
|
+
}), showInfo ? /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
174
|
+
asChild: true,
|
|
175
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
176
|
+
type: "button",
|
|
177
|
+
"aria-label": infoIconLabel,
|
|
178
|
+
className: cn("inline-flex shrink-0 items-center justify-center rounded-full outline-none transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background", s.info, presetInfoClass),
|
|
179
|
+
style: infoButtonStyle,
|
|
180
|
+
children: /* @__PURE__ */ jsx(Info, { "aria-hidden": true })
|
|
181
|
+
})
|
|
182
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
183
|
+
align: "start",
|
|
184
|
+
side: "bottom",
|
|
185
|
+
sideOffset: 8,
|
|
186
|
+
children: infoContent
|
|
187
|
+
})] }) : null]
|
|
188
|
+
}), hasRenderableContent(description) ? /* @__PURE__ */ jsx("div", {
|
|
189
|
+
"data-slot": "stat-card-description",
|
|
190
|
+
className: cn("text-foreground-secondary", size === "sm" ? "type-secondary" : "type-body"),
|
|
191
|
+
children: description
|
|
192
|
+
}) : null]
|
|
164
193
|
})]
|
|
165
194
|
}),
|
|
166
195
|
/* @__PURE__ */ jsx("div", {
|
|
167
|
-
className: cn("font-bold leading-none tracking-tight text-foreground", s.value),
|
|
196
|
+
className: cn("mt-auto font-bold leading-none tracking-tight text-foreground", s.value),
|
|
168
197
|
children: formatValue(value, valueType)
|
|
169
198
|
}),
|
|
170
199
|
visual != null || caption != null ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -178,37 +207,20 @@ var StatCard = React$1.forwardRef(({ color, size = "default", loading = false, i
|
|
|
178
207
|
children: caption
|
|
179
208
|
}) : null]
|
|
180
209
|
}) : null,
|
|
181
|
-
|
|
182
|
-
className: "flex items-center gap-3 type-secondary",
|
|
183
|
-
children: [/* @__PURE__ */ jsxs(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
children: previousValueComparisonTip
|
|
196
|
-
}) : null]
|
|
197
|
-
}), showInfo ? /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
198
|
-
asChild: true,
|
|
199
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
200
|
-
type: "button",
|
|
201
|
-
"aria-label": "More information",
|
|
202
|
-
className: cn("inline-flex shrink-0 items-center justify-center rounded-full outline-none transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background", s.info, presetInfoClass),
|
|
203
|
-
style: infoButtonStyle,
|
|
204
|
-
children: /* @__PURE__ */ jsx(Info, { "aria-hidden": true })
|
|
205
|
-
})
|
|
206
|
-
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
207
|
-
align: "end",
|
|
208
|
-
side: "top",
|
|
209
|
-
sideOffset: 8,
|
|
210
|
-
children: infoContent
|
|
211
|
-
})] }) : null]
|
|
210
|
+
showTrend ? /* @__PURE__ */ jsxs("div", {
|
|
211
|
+
className: "flex min-w-0 items-center gap-3 type-secondary",
|
|
212
|
+
children: [/* @__PURE__ */ jsxs(Badge, {
|
|
213
|
+
color: statColor,
|
|
214
|
+
variant: "outline",
|
|
215
|
+
className: s.badge,
|
|
216
|
+
children: [trend.direction === "flat" ? null : /* @__PURE__ */ jsx(Triangle, {
|
|
217
|
+
"aria-hidden": true,
|
|
218
|
+
className: cn("size-3 fill-current stroke-current", trend.direction === "down" && "rotate-180")
|
|
219
|
+
}), trend.label]
|
|
220
|
+
}), hasRenderableContent(previousValueComparisonTip) ? /* @__PURE__ */ jsx("span", {
|
|
221
|
+
className: "min-w-0 truncate text-foreground",
|
|
222
|
+
children: previousValueComparisonTip
|
|
223
|
+
}) : null]
|
|
212
224
|
}) : null
|
|
213
225
|
]
|
|
214
226
|
})]
|
|
@@ -24,6 +24,8 @@ interface TagProps extends HTMLAttributes<HTMLDivElement>, Pick<StyleAxisProps,
|
|
|
24
24
|
/** When true, render the tag, name chip, and delete action with fully rounded corners. Same as `radius="full"`; `radius` wins when both are set. */
|
|
25
25
|
rounded?: boolean;
|
|
26
26
|
onDelete?: () => void;
|
|
27
|
+
/** Accessible name of the delete button. Default `Remove <name>: <value>` (or `Remove <value>`). */
|
|
28
|
+
deleteLabel?: string;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -133,7 +133,7 @@ var deleteButtonVariantClasses = {
|
|
|
133
133
|
gradient: "bg-error/10 text-error hover:bg-error/15 hover:text-error",
|
|
134
134
|
solid: "bg-error/20 text-error-foreground hover:bg-error/30 hover:text-error-foreground"
|
|
135
135
|
};
|
|
136
|
-
var Tag$1 = React$1.forwardRef(({ name, value, nameTooltip, valueTooltip, showFullName = false, showFullValue = false, size = "default", color = "secondary", variant = "soft", rounded = false, onDelete, className, radius, ...rest }, ref) => {
|
|
136
|
+
var Tag$1 = React$1.forwardRef(({ name, value, nameTooltip, valueTooltip, showFullName = false, showFullValue = false, size = "default", color = "secondary", variant = "soft", rounded = false, onDelete, deleteLabel, className, radius, ...rest }, ref) => {
|
|
137
137
|
const { partStyle } = useStyleAxes({ radius }, ["radius"]);
|
|
138
138
|
const fullRound = rounded && radius === void 0;
|
|
139
139
|
const nameTip = nameTooltip ?? name;
|
|
@@ -174,7 +174,7 @@ var Tag$1 = React$1.forwardRef(({ name, value, nameTooltip, valueTooltip, showFu
|
|
|
174
174
|
}),
|
|
175
175
|
onDelete ? /* @__PURE__ */ jsx("button", {
|
|
176
176
|
type: "button",
|
|
177
|
-
"aria-label": `Remove ${removeLabel}`,
|
|
177
|
+
"aria-label": deleteLabel ?? `Remove ${removeLabel}`,
|
|
178
178
|
style: partStyle,
|
|
179
179
|
className: cn(buttonVariants({
|
|
180
180
|
variant: "ghost",
|
|
@@ -24,6 +24,11 @@ interface TagInputProps extends Omit<ComponentProps<"input">, "size" | "value" |
|
|
|
24
24
|
allowDuplicates?: boolean;
|
|
25
25
|
/** @default 10 */
|
|
26
26
|
maxTagDisplayLength?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Accessible name of a tag's remove button, given the tag's full text.
|
|
29
|
+
* Default `` tag => `Remove ${tag}` `` (a `name:value` tag reads `Remove name: value`).
|
|
30
|
+
*/
|
|
31
|
+
removeTagLabel?: (tag: string) => string;
|
|
27
32
|
/**
|
|
28
33
|
* When true, each tag string is split on the first `:` into `Tag` `name` and `value`.
|
|
29
34
|
* Use together with a validator that only allows `name:value` shaped tags.
|
|
@@ -28,7 +28,7 @@ function parseNameValueTag(tag) {
|
|
|
28
28
|
value: tag.slice(i + 1)
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size, rounded, startHelperContent, endHelperContent, hintContent, error, errorContent, validatorRegex, onInvalidTag, allowDuplicates = false, maxTagDisplayLength = 10, nameValueTags = false, className, id, disabled, readOnly, placeholder, onKeyDown, onBlur, radius, border, ...restInputProps }, ref) => {
|
|
31
|
+
var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size, rounded, startHelperContent, endHelperContent, hintContent, error, errorContent, validatorRegex, onInvalidTag, allowDuplicates = false, maxTagDisplayLength = 10, removeTagLabel, nameValueTags = false, className, id, disabled, readOnly, placeholder, onKeyDown, onBlur, radius, border, ...restInputProps }, ref) => {
|
|
32
32
|
const axes = useStyleAxes({
|
|
33
33
|
radius,
|
|
34
34
|
border
|
|
@@ -119,13 +119,15 @@ var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size,
|
|
|
119
119
|
value: truncateDisplay(parsed.value, maxTagDisplayLength),
|
|
120
120
|
valueTooltip: parsed.value,
|
|
121
121
|
size: effectiveSize,
|
|
122
|
-
onDelete: disabled || readOnly ? void 0 : () => removeAt(index)
|
|
122
|
+
onDelete: disabled || readOnly ? void 0 : () => removeAt(index),
|
|
123
|
+
deleteLabel: removeTagLabel?.(tag)
|
|
123
124
|
}, `${tag}-${index}`);
|
|
124
125
|
return /* @__PURE__ */ jsx(Tag, {
|
|
125
126
|
value: truncateDisplay(tag, maxTagDisplayLength),
|
|
126
127
|
valueTooltip: tag,
|
|
127
128
|
size: effectiveSize,
|
|
128
|
-
onDelete: disabled || readOnly ? void 0 : () => removeAt(index)
|
|
129
|
+
onDelete: disabled || readOnly ? void 0 : () => removeAt(index),
|
|
130
|
+
deleteLabel: removeTagLabel?.(tag)
|
|
129
131
|
}, `${tag}-${index}`);
|
|
130
132
|
}), /* @__PURE__ */ jsx("input", {
|
|
131
133
|
ref,
|
|
@@ -6,6 +6,24 @@ interface TransferItem {
|
|
|
6
6
|
label: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* The transfer list's own words, for an app in another language. English by
|
|
11
|
+
* default. The functions receive the panel's title (`sourceTitle` / `targetTitle`).
|
|
12
|
+
*/
|
|
13
|
+
interface TransferListLabels {
|
|
14
|
+
/** A panel's checkbox that selects every item. Default `` title => `Select all in ${title}` ``. */
|
|
15
|
+
selectAll?: (title: string) => string;
|
|
16
|
+
/** A panel's search button. Default `` title => `Search ${title}` ``. */
|
|
17
|
+
search?: (title: string) => string;
|
|
18
|
+
/** Placeholder of a panel's search box. Default `` title => `Search ${title.toLowerCase()}...` ``. */
|
|
19
|
+
searchPlaceholder?: (title: string) => string;
|
|
20
|
+
/** The button that closes a panel's search. Default "Cancel search". */
|
|
21
|
+
cancelSearch?: string;
|
|
22
|
+
/** The search box's clear button. Default "Clear search". */
|
|
23
|
+
clearSearch?: string;
|
|
24
|
+
/** The move buttons between the panels. Default `` title => `Move selected to ${title}` ``. */
|
|
25
|
+
moveTo?: (title: string) => string;
|
|
26
|
+
}
|
|
9
27
|
interface TransferListProps<T> {
|
|
10
28
|
sourceItems: T[];
|
|
11
29
|
targetItems: T[];
|
|
@@ -29,8 +47,10 @@ interface TransferListProps<T> {
|
|
|
29
47
|
isItemDisabled?: (item: T) => boolean;
|
|
30
48
|
/** Defaults to "Transfer list" */
|
|
31
49
|
ariaLabel?: string;
|
|
50
|
+
/** The list's other words (search, select all, move), for an app in another language. */
|
|
51
|
+
labels?: TransferListLabels;
|
|
32
52
|
}
|
|
33
53
|
|
|
34
|
-
declare function TransferList<T>({ sourceItems, targetItems, getItemId, getItemLabel, onChange, renderItem, searchable, disabled, sourceTitle, targetTitle, className, name, form, isItemDisabled, ariaLabel, maxHeight, }: TransferListProps<T>): React.JSX.Element;
|
|
54
|
+
declare function TransferList<T>({ sourceItems, targetItems, getItemId, getItemLabel, onChange, renderItem, searchable, disabled, sourceTitle, targetTitle, className, name, form, isItemDisabled, ariaLabel, maxHeight, labels: labelsProp, }: TransferListProps<T>): React.JSX.Element;
|
|
35
55
|
|
|
36
|
-
export { type TransferItem, TransferList, type TransferListProps };
|
|
56
|
+
export { type TransferItem, TransferList, type TransferListLabels, type TransferListProps };
|
|
@@ -87,6 +87,24 @@ function filterItemsByQuery(items, query, getLabel) {
|
|
|
87
87
|
if (q === "") return items;
|
|
88
88
|
return items.filter((item) => getLabel(item).toLowerCase().includes(q));
|
|
89
89
|
}
|
|
90
|
+
var DEFAULT_LABELS = {
|
|
91
|
+
selectAll: (title) => `Select all in ${title}`,
|
|
92
|
+
search: (title) => `Search ${title}`,
|
|
93
|
+
searchPlaceholder: (title) => `Search ${title.toLowerCase()}...`,
|
|
94
|
+
cancelSearch: "Cancel search",
|
|
95
|
+
clearSearch: "Clear search",
|
|
96
|
+
moveTo: (title) => `Move selected to ${title}`
|
|
97
|
+
};
|
|
98
|
+
function resolveLabels(labels) {
|
|
99
|
+
return {
|
|
100
|
+
selectAll: labels?.selectAll ?? DEFAULT_LABELS.selectAll,
|
|
101
|
+
search: labels?.search ?? DEFAULT_LABELS.search,
|
|
102
|
+
searchPlaceholder: labels?.searchPlaceholder ?? DEFAULT_LABELS.searchPlaceholder,
|
|
103
|
+
cancelSearch: labels?.cancelSearch ?? DEFAULT_LABELS.cancelSearch,
|
|
104
|
+
clearSearch: labels?.clearSearch ?? DEFAULT_LABELS.clearSearch,
|
|
105
|
+
moveTo: labels?.moveTo ?? DEFAULT_LABELS.moveTo
|
|
106
|
+
};
|
|
107
|
+
}
|
|
90
108
|
function TransferListItems({ filteredItems, items, selectedIds, getItemId, getItemLabel, isItemDisabled, renderItem, disabled, rowVariants, onChecked }) {
|
|
91
109
|
if (filteredItems.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
92
110
|
className: "px-1 py-2 type-body text-muted-foreground",
|
|
@@ -120,7 +138,7 @@ function TransferListItems({ filteredItems, items, selectedIds, getItemId, getIt
|
|
|
120
138
|
})
|
|
121
139
|
});
|
|
122
140
|
}
|
|
123
|
-
function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChange, getItemId, getItemLabel, isItemDisabled, renderItem, searchable, disabled, side, maxHeight }) {
|
|
141
|
+
function TransferListPanel({ labels, title, titleId, items, selectedIds, onSelectionChange, getItemId, getItemLabel, isItemDisabled, renderItem, searchable, disabled, side, maxHeight }) {
|
|
124
142
|
const [searchQuery, setSearchQuery] = useState("");
|
|
125
143
|
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
|
126
144
|
const searchContainerRef = useRef(null);
|
|
@@ -187,7 +205,7 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
|
|
|
187
205
|
checked: selectAllChecked,
|
|
188
206
|
disabled: disabled || selectableFilteredIds.length === 0,
|
|
189
207
|
onCheckedChange: handleSelectAll,
|
|
190
|
-
"aria-label":
|
|
208
|
+
"aria-label": labels.selectAll(title)
|
|
191
209
|
}), /* @__PURE__ */ jsx("div", {
|
|
192
210
|
className: "relative min-w-0 flex-1",
|
|
193
211
|
children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
@@ -213,7 +231,8 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
|
|
|
213
231
|
children: /* @__PURE__ */ jsx(SearchBox, {
|
|
214
232
|
size: "sm",
|
|
215
233
|
className: "w-full",
|
|
216
|
-
placeholder:
|
|
234
|
+
placeholder: labels.searchPlaceholder(title),
|
|
235
|
+
clearLabel: labels.clearSearch,
|
|
217
236
|
onSearch: setSearchQuery,
|
|
218
237
|
onClear: () => setSearchQuery(""),
|
|
219
238
|
onValueChange: setSearchQuery
|
|
@@ -245,7 +264,7 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
|
|
|
245
264
|
size: "icon",
|
|
246
265
|
color: "mist",
|
|
247
266
|
disabled,
|
|
248
|
-
"aria-label":
|
|
267
|
+
"aria-label": labels.search(title),
|
|
249
268
|
onClick: handleOpenSearch,
|
|
250
269
|
children: /* @__PURE__ */ jsx(Search, { "aria-hidden": true })
|
|
251
270
|
})
|
|
@@ -268,7 +287,7 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
|
|
|
268
287
|
variant: "ghost",
|
|
269
288
|
size: "icon",
|
|
270
289
|
color: "error",
|
|
271
|
-
"aria-label":
|
|
290
|
+
"aria-label": labels.cancelSearch,
|
|
272
291
|
onClick: handleCloseSearch,
|
|
273
292
|
children: /* @__PURE__ */ jsx(X, { "aria-hidden": true })
|
|
274
293
|
})
|
|
@@ -288,7 +307,8 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
|
|
|
288
307
|
})
|
|
289
308
|
});
|
|
290
309
|
}
|
|
291
|
-
function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onChange, renderItem, searchable = true, disabled = false, sourceTitle, targetTitle, className, name, form, isItemDisabled, ariaLabel = "Transfer list", maxHeight }) {
|
|
310
|
+
function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onChange, renderItem, searchable = true, disabled = false, sourceTitle, targetTitle, className, name, form, isItemDisabled, ariaLabel = "Transfer list", maxHeight, labels: labelsProp }) {
|
|
311
|
+
const labels = resolveLabels(labelsProp);
|
|
292
312
|
const resolveId = getItemId ?? ((item) => item.id);
|
|
293
313
|
const resolveLabel = getItemLabel ?? ((item) => item.label);
|
|
294
314
|
const resolveDisabled = isItemDisabled ?? ((item) => Boolean(item.disabled));
|
|
@@ -344,6 +364,7 @@ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onCha
|
|
|
344
364
|
value: hiddenFieldValues
|
|
345
365
|
}),
|
|
346
366
|
/* @__PURE__ */ jsx(TransferListPanel, {
|
|
367
|
+
labels,
|
|
347
368
|
title: sourceTitle,
|
|
348
369
|
titleId: sourceTitleId,
|
|
349
370
|
items: sourceItems,
|
|
@@ -365,7 +386,7 @@ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onCha
|
|
|
365
386
|
variant: "default",
|
|
366
387
|
size: "icon",
|
|
367
388
|
disabled: !canMoveToTarget,
|
|
368
|
-
"aria-label":
|
|
389
|
+
"aria-label": labels.moveTo(targetTitle),
|
|
369
390
|
onClick: handleMoveToTarget,
|
|
370
391
|
children: /* @__PURE__ */ jsx(ChevronsRight, {
|
|
371
392
|
className: "max-md:rotate-90",
|
|
@@ -377,7 +398,7 @@ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onCha
|
|
|
377
398
|
size: "icon",
|
|
378
399
|
color: "error",
|
|
379
400
|
disabled: !canMoveToSource,
|
|
380
|
-
"aria-label":
|
|
401
|
+
"aria-label": labels.moveTo(sourceTitle),
|
|
381
402
|
onClick: handleMoveToSource,
|
|
382
403
|
children: /* @__PURE__ */ jsx(ChevronsLeft, {
|
|
383
404
|
className: "max-md:rotate-90",
|
|
@@ -386,6 +407,7 @@ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onCha
|
|
|
386
407
|
})]
|
|
387
408
|
}),
|
|
388
409
|
/* @__PURE__ */ jsx(TransferListPanel, {
|
|
410
|
+
labels,
|
|
389
411
|
title: targetTitle,
|
|
390
412
|
titleId: targetTitleId,
|
|
391
413
|
items: targetItems,
|
|
@@ -29,6 +29,8 @@ declare const userTypeBadgeUserTypes: UserType[];
|
|
|
29
29
|
interface UserTypeBadgeProps extends HTMLAttributes<HTMLDivElement>, Pick<StyleAxisProps, "radius"> {
|
|
30
30
|
userType: UserType;
|
|
31
31
|
size?: Size;
|
|
32
|
+
/** The badge's text, for an app in another language. Default "Admin" / "Super admin". */
|
|
33
|
+
label?: string;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
declare const userTypeBadgeSizeVariants: (props?: ({
|
|
@@ -14,8 +14,9 @@ var userTypeBadgeSizeVariants = cva("inline-flex type-caption font-medium tracki
|
|
|
14
14
|
defaultVariants: { size: "default" }
|
|
15
15
|
});
|
|
16
16
|
var userTypeBadgeMetallicClasses = cn("relative isolate overflow-hidden border border-white/20", "shadow-[inset_0_1px_0_rgba(255,255,255,0.30),inset_0_-1px_0_rgba(0,0,0,0.22)]", "before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit]", "before:bg-[linear-gradient(135deg,rgba(255,255,255,0.24)_0%,rgba(255,255,255,0.04)_36%,rgba(0,0,0,0.16)_72%,rgba(255,255,255,0.12)_100%)]", "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:border after:border-white/15", "after:bg-[linear-gradient(315deg,rgba(255,255,255,0.24)_0%,rgba(255,255,255,0.04)_36%,rgba(0,0,0,0.16)_72%,rgba(255,255,255,0.12)_100%)]", "after:opacity-0 after:transition-opacity after:duration-[1800ms] after:ease-in-out hover:after:opacity-100");
|
|
17
|
-
var UserTypeBadge = React$1.forwardRef(({ userType, size = "default", className, radius, ...props }, ref) => {
|
|
18
|
-
const { color, icon: Icon, label } = userTypeBadgeRegistry[userType];
|
|
17
|
+
var UserTypeBadge = React$1.forwardRef(({ userType, size = "default", className, radius, label: labelProp, ...props }, ref) => {
|
|
18
|
+
const { color, icon: Icon, label: defaultLabel } = userTypeBadgeRegistry[userType];
|
|
19
|
+
const label = labelProp ?? defaultLabel;
|
|
19
20
|
return /* @__PURE__ */ jsx("div", {
|
|
20
21
|
ref,
|
|
21
22
|
className: "inline-block",
|
|
@@ -20,7 +20,7 @@ function DialogOverlay({ className, ...props }) {
|
|
|
20
20
|
...props
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function DialogContent({ className, children, showCloseButton = true, closeButtonClassName, radius, elevation, density, style, ...props }) {
|
|
23
|
+
function DialogContent({ className, children, showCloseButton = true, closeButtonClassName, closeLabel = "Close", radius, elevation, density, style, ...props }) {
|
|
24
24
|
const axes = useStyleAxes({
|
|
25
25
|
radius,
|
|
26
26
|
elevation
|
|
@@ -41,7 +41,7 @@ function DialogContent({ className, children, showCloseButton = true, closeButto
|
|
|
41
41
|
className: cn("ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 z-50 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", closeButtonClassName),
|
|
42
42
|
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
43
43
|
className: "sr-only",
|
|
44
|
-
children:
|
|
44
|
+
children: closeLabel
|
|
45
45
|
})]
|
|
46
46
|
})]
|
|
47
47
|
})] });
|
|
@@ -35,7 +35,7 @@ function SheetOverlay({ className, ...props }) {
|
|
|
35
35
|
function SheetClose(props) {
|
|
36
36
|
return /* @__PURE__ */ jsx(SheetClose$1, { ...props });
|
|
37
37
|
}
|
|
38
|
-
function SheetContent({ className, children, side = "right", showCloseButton = true, onEscapeKeyDown, onPointerDownOutside, radius, elevation, density, style, ...props }) {
|
|
38
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, closeLabel = "Close", onEscapeKeyDown, onPointerDownOutside, radius, elevation, density, style, ...props }) {
|
|
39
39
|
const { partStyle } = useStyleAxes({
|
|
40
40
|
radius,
|
|
41
41
|
elevation
|
|
@@ -67,7 +67,7 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
67
67
|
className: closeClassName,
|
|
68
68
|
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
69
69
|
className: "sr-only",
|
|
70
|
-
children:
|
|
70
|
+
children: closeLabel
|
|
71
71
|
})]
|
|
72
72
|
})]
|
|
73
73
|
})
|
|
@@ -93,7 +93,7 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
93
93
|
className: closeClassName,
|
|
94
94
|
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
95
95
|
className: "sr-only",
|
|
96
|
-
children:
|
|
96
|
+
children: closeLabel
|
|
97
97
|
})]
|
|
98
98
|
})]
|
|
99
99
|
})] });
|