@platned/ui 0.9.4 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-OGQIGGVB.js → chunk-O2Y4XUXQ.js} +2 -1
- package/dist/{data-table-gr08E5aX.d.ts → data-table-JX-vnL0F.d.ts} +7 -1
- package/dist/data-table.cjs +10 -3
- package/dist/data-table.cjs.map +1 -1
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.js +12 -4
- package/dist/data-table.js.map +1 -1
- package/dist/index.cjs +1608 -736
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +432 -13
- package/dist/index.js +1429 -559
- package/dist/index.js.map +1 -1
- package/dist/sidebar.cjs +922 -239
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.d.cts +175 -105
- package/dist/sidebar.d.ts +175 -105
- package/dist/sidebar.js +924 -219
- package/dist/sidebar.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-OGQIGGVB.js.map → chunk-O2Y4XUXQ.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -43,6 +43,7 @@ __export(src_exports, {
|
|
|
43
43
|
Avatar: () => Avatar,
|
|
44
44
|
AvatarBlock: () => AvatarBlock,
|
|
45
45
|
AvatarGroup: () => AvatarGroup,
|
|
46
|
+
BADGE_COLORS: () => BADGE_COLORS,
|
|
46
47
|
Badge: () => Badge,
|
|
47
48
|
Banner: () => Banner,
|
|
48
49
|
BarChart: () => BarChart,
|
|
@@ -183,6 +184,7 @@ __export(src_exports, {
|
|
|
183
184
|
Label: () => Label,
|
|
184
185
|
LegendDot: () => LegendDot,
|
|
185
186
|
ListRow: () => ListRow,
|
|
187
|
+
Listbox: () => Listbox,
|
|
186
188
|
Menubar: () => Menubar,
|
|
187
189
|
MenubarCheckboxItem: () => MenubarCheckboxItem,
|
|
188
190
|
MenubarContent: () => MenubarContent,
|
|
@@ -211,7 +213,9 @@ __export(src_exports, {
|
|
|
211
213
|
MultiSelectCard: () => MultiSelectCard,
|
|
212
214
|
NativeSelect: () => NativeSelect,
|
|
213
215
|
NativeSelectControl: () => NativeSelectControl,
|
|
216
|
+
NavGroupHeader: () => NavGroupHeader,
|
|
214
217
|
NavItem: () => NavItem,
|
|
218
|
+
NavSubItem: () => NavSubItem,
|
|
215
219
|
NavigationMenu: () => NavigationMenu,
|
|
216
220
|
NavigationMenuItem: () => NavigationMenuItem,
|
|
217
221
|
NoteConfirmModal: () => NoteConfirmModal,
|
|
@@ -255,6 +259,11 @@ __export(src_exports, {
|
|
|
255
259
|
Select: () => Select,
|
|
256
260
|
SelectControl: () => SelectControl,
|
|
257
261
|
Separator: () => Separator,
|
|
262
|
+
Sidebar: () => Sidebar,
|
|
263
|
+
SidebarProvider: () => SidebarProvider,
|
|
264
|
+
SidebarSeparator: () => SidebarSeparator,
|
|
265
|
+
SidebarTrigger: () => SidebarTrigger,
|
|
266
|
+
SidebarUserCard: () => SidebarUserCard,
|
|
258
267
|
Skeleton: () => Skeleton,
|
|
259
268
|
Slider: () => Slider,
|
|
260
269
|
Slot: () => Slot,
|
|
@@ -331,6 +340,8 @@ __export(src_exports, {
|
|
|
331
340
|
createColumnHelper: () => import_react_table2.createColumnHelper,
|
|
332
341
|
createSelectColumn: () => createSelectColumn,
|
|
333
342
|
currentZoneName: () => currentZoneName,
|
|
343
|
+
filterNav: () => filterNav,
|
|
344
|
+
filterNavItems: () => filterNavItems,
|
|
334
345
|
formatFileSize: () => formatFileSize,
|
|
335
346
|
getScoreTone: () => getScoreTone,
|
|
336
347
|
nextTier: () => nextTier,
|
|
@@ -350,6 +361,7 @@ __export(src_exports, {
|
|
|
350
361
|
useFilePicker: () => useFilePicker,
|
|
351
362
|
useOverlayDismiss: () => useOverlayDismiss,
|
|
352
363
|
usePortalContainer: () => usePortalContainer,
|
|
364
|
+
useSidebar: () => useSidebar,
|
|
353
365
|
useToast: () => useToast,
|
|
354
366
|
useWidgetHeaderAccessory: () => useWidgetHeaderAccessory,
|
|
355
367
|
useWidthTier: () => useWidthTier
|
|
@@ -3707,51 +3719,64 @@ function TagPill({
|
|
|
3707
3719
|
tone = "default",
|
|
3708
3720
|
size: size2 = "sm",
|
|
3709
3721
|
onRemove,
|
|
3722
|
+
asChild = false,
|
|
3723
|
+
icon,
|
|
3724
|
+
title,
|
|
3725
|
+
children,
|
|
3710
3726
|
bg,
|
|
3711
3727
|
color,
|
|
3712
3728
|
className
|
|
3713
3729
|
}) {
|
|
3730
|
+
if (asChild && onRemove) devWarn("TagPill: `asChild` and `onRemove` cannot be combined; `onRemove` is ignored.");
|
|
3714
3731
|
const removeOnKey = (event) => {
|
|
3715
3732
|
if (event.key === "Backspace" || event.key === "Delete") {
|
|
3716
3733
|
event.preventDefault();
|
|
3717
3734
|
onRemove?.();
|
|
3718
3735
|
}
|
|
3719
3736
|
};
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
{
|
|
3744
|
-
type: "button",
|
|
3745
|
-
onClick: onRemove,
|
|
3746
|
-
onKeyDown: removeOnKey,
|
|
3747
|
-
"aria-label": `Remove ${label}`,
|
|
3748
|
-
className: "touch-hit inline-flex shrink-0 items-center justify-center rounded-full opacity-60 transition-opacity hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-current",
|
|
3749
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.XIcon, { className: "size-3", strokeWidth: 2.5, "aria-hidden": true })
|
|
3750
|
-
}
|
|
3751
|
-
)
|
|
3752
|
-
]
|
|
3737
|
+
const glyph = icon && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": true, className: "inline-flex size-3 shrink-0 [&>svg]:size-full", children: icon });
|
|
3738
|
+
const labelContent = icon ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
3739
|
+
glyph,
|
|
3740
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "truncate", children: label })
|
|
3741
|
+
] }) : label;
|
|
3742
|
+
const rootProps = {
|
|
3743
|
+
"data-tone": tone,
|
|
3744
|
+
"data-size": size2,
|
|
3745
|
+
"data-removable": onRemove && !asChild ? "" : void 0,
|
|
3746
|
+
title: title ?? (onRemove && !asChild ? label : void 0),
|
|
3747
|
+
className: (0, import_clsx24.default)(
|
|
3748
|
+
"inline-flex items-center rounded-full text-body-xs font-medium",
|
|
3749
|
+
sizeStyles4[size2],
|
|
3750
|
+
// The remove button sits in the end padding, so trim it to keep the × optically centred.
|
|
3751
|
+
"data-[removable]:max-w-full data-[removable]:gap-1 data-[removable]:whitespace-nowrap data-[removable]:pr-1.5",
|
|
3752
|
+
icon && "max-w-full gap-1",
|
|
3753
|
+
!bg && !color && toneStyles[tone],
|
|
3754
|
+
asChild && ["hover:underline underline-offset-2", FOCUS_RING],
|
|
3755
|
+
className
|
|
3756
|
+
),
|
|
3757
|
+
style: {
|
|
3758
|
+
...bg ? { backgroundColor: bg } : void 0,
|
|
3759
|
+
...color ? { color } : void 0
|
|
3753
3760
|
}
|
|
3754
|
-
|
|
3761
|
+
};
|
|
3762
|
+
if (asChild) {
|
|
3763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Slot, { ...rootProps, wrapChildren: () => labelContent, children });
|
|
3764
|
+
}
|
|
3765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { ...rootProps, children: [
|
|
3766
|
+
glyph,
|
|
3767
|
+
onRemove || icon ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "truncate", children: label }) : label,
|
|
3768
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3769
|
+
"button",
|
|
3770
|
+
{
|
|
3771
|
+
type: "button",
|
|
3772
|
+
onClick: onRemove,
|
|
3773
|
+
onKeyDown: removeOnKey,
|
|
3774
|
+
"aria-label": `Remove ${label}`,
|
|
3775
|
+
className: "touch-hit inline-flex shrink-0 items-center justify-center rounded-full opacity-60 transition-opacity hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-current",
|
|
3776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react8.XIcon, { className: "size-3", strokeWidth: 2.5, "aria-hidden": true })
|
|
3777
|
+
}
|
|
3778
|
+
)
|
|
3779
|
+
] });
|
|
3755
3780
|
}
|
|
3756
3781
|
|
|
3757
3782
|
// src/components/forms/tag-input.tsx
|
|
@@ -3987,6 +4012,7 @@ function FormCardFooter({
|
|
|
3987
4012
|
var import_clsx27 = __toESM(require("clsx"), 1);
|
|
3988
4013
|
var import_lucide_react10 = require("lucide-react");
|
|
3989
4014
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4015
|
+
var BADGE_COLORS = ["blue", "green", "violet", "yellow", "teal", "pink", "lime", "red", "slate", "gray"];
|
|
3990
4016
|
var defaultClasses = {
|
|
3991
4017
|
gray: "bg-badge-gray text-badge-gray",
|
|
3992
4018
|
red: "bg-badge-red text-badge-red",
|
|
@@ -4017,6 +4043,7 @@ function Badge({
|
|
|
4017
4043
|
size: size2 = "sm",
|
|
4018
4044
|
variant = "default",
|
|
4019
4045
|
indicator = false,
|
|
4046
|
+
icon,
|
|
4020
4047
|
onRemove: onRemoveProp,
|
|
4021
4048
|
onClose,
|
|
4022
4049
|
className
|
|
@@ -4043,6 +4070,14 @@ function Badge({
|
|
|
4043
4070
|
)
|
|
4044
4071
|
}
|
|
4045
4072
|
),
|
|
4073
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4074
|
+
"span",
|
|
4075
|
+
{
|
|
4076
|
+
"aria-hidden": true,
|
|
4077
|
+
className: (0, import_clsx27.default)("inline-flex shrink-0 [&>svg]:h-full [&>svg]:w-full", size2 === "sm" ? "h-3 w-3" : "h-3.5 w-3.5"),
|
|
4078
|
+
children: icon
|
|
4079
|
+
}
|
|
4080
|
+
),
|
|
4046
4081
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4047
4082
|
"span",
|
|
4048
4083
|
{
|
|
@@ -4926,11 +4961,12 @@ var import_clsx37 = __toESM(require("clsx"), 1);
|
|
|
4926
4961
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4927
4962
|
var sizeStyles5 = {
|
|
4928
4963
|
sm: "size-8",
|
|
4929
|
-
md: "size-10"
|
|
4964
|
+
md: "size-10",
|
|
4965
|
+
lg: "size-14"
|
|
4930
4966
|
};
|
|
4931
4967
|
var shapeStyles = {
|
|
4932
|
-
square: { sm: "rounded-lg", md: "rounded-xl" },
|
|
4933
|
-
circle: { sm: "rounded-full", md: "rounded-full" }
|
|
4968
|
+
square: { sm: "rounded-lg", md: "rounded-xl", lg: "rounded-2xl" },
|
|
4969
|
+
circle: { sm: "rounded-full", md: "rounded-full", lg: "rounded-full" }
|
|
4934
4970
|
};
|
|
4935
4971
|
var toneStyles2 = {
|
|
4936
4972
|
default: "bg-default-secondary text-icon-default",
|
|
@@ -4940,16 +4976,29 @@ var toneStyles2 = {
|
|
|
4940
4976
|
danger: "bg-danger-tertiary text-icon-danger",
|
|
4941
4977
|
neutral: "bg-neutral-tertiary text-icon-neutral"
|
|
4942
4978
|
};
|
|
4943
|
-
|
|
4979
|
+
var hueStyles = {
|
|
4980
|
+
gray: "bg-badge-gray text-badge-gray",
|
|
4981
|
+
red: "bg-badge-red text-badge-red",
|
|
4982
|
+
yellow: "bg-badge-yellow text-badge-yellow",
|
|
4983
|
+
lime: "bg-badge-lime text-badge-lime",
|
|
4984
|
+
green: "bg-badge-green text-badge-green",
|
|
4985
|
+
teal: "bg-badge-teal text-badge-teal",
|
|
4986
|
+
blue: "bg-badge-blue text-badge-blue",
|
|
4987
|
+
pink: "bg-badge-pink text-badge-pink",
|
|
4988
|
+
slate: "bg-badge-slate text-badge-slate",
|
|
4989
|
+
violet: "bg-badge-violet text-badge-violet"
|
|
4990
|
+
};
|
|
4991
|
+
function EntityIconBadge({ size: size2 = "sm", tone = "default", shape = "square", hue, bg, iconColor, children, className }) {
|
|
4944
4992
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4945
4993
|
"span",
|
|
4946
4994
|
{
|
|
4947
|
-
"data-tone": tone,
|
|
4995
|
+
"data-tone": hue ? void 0 : tone,
|
|
4996
|
+
"data-hue": hue,
|
|
4948
4997
|
className: (0, import_clsx37.default)(
|
|
4949
4998
|
"inline-flex shrink-0 items-center justify-center",
|
|
4950
4999
|
sizeStyles5[size2],
|
|
4951
5000
|
shapeStyles[shape][size2],
|
|
4952
|
-
!bg && !iconColor && toneStyles2[tone],
|
|
5001
|
+
!bg && !iconColor && (hue ? hueStyles[hue] : toneStyles2[tone]),
|
|
4953
5002
|
className
|
|
4954
5003
|
),
|
|
4955
5004
|
style: {
|
|
@@ -5164,14 +5213,33 @@ var LABEL_TEXT3 = {
|
|
|
5164
5213
|
sm: "text-body-tiny",
|
|
5165
5214
|
md: "text-body-xs"
|
|
5166
5215
|
};
|
|
5167
|
-
var Radio = (0, import_react33.forwardRef)(function Radio2({
|
|
5216
|
+
var Radio = (0, import_react33.forwardRef)(function Radio2({
|
|
5217
|
+
value,
|
|
5218
|
+
label,
|
|
5219
|
+
description,
|
|
5220
|
+
disabled,
|
|
5221
|
+
id,
|
|
5222
|
+
className,
|
|
5223
|
+
checked: checkedProp,
|
|
5224
|
+
onCheckedChange,
|
|
5225
|
+
size: sizeProp,
|
|
5226
|
+
invalid: invalidProp,
|
|
5227
|
+
name: nameProp,
|
|
5228
|
+
...props
|
|
5229
|
+
}, ref) {
|
|
5168
5230
|
const group = (0, import_react33.useContext)(RadioGroupContext);
|
|
5169
|
-
if (!group
|
|
5231
|
+
if (!group && !nameProp) {
|
|
5232
|
+
devWarn("A standalone <Radio> needs a `name` shared by its set: without one, each radio is a group of its own.");
|
|
5233
|
+
}
|
|
5170
5234
|
const generatedId = (0, import_react33.useId)();
|
|
5171
5235
|
const controlId = id ?? generatedId;
|
|
5172
5236
|
const descriptionId = `${controlId}-description`;
|
|
5173
|
-
const isDisabled = disabled ?? group
|
|
5174
|
-
const checked = group.value === value;
|
|
5237
|
+
const isDisabled = disabled ?? group?.disabled ?? false;
|
|
5238
|
+
const checked = group ? group.value === value : Boolean(checkedProp);
|
|
5239
|
+
const size2 = group?.size ?? sizeProp ?? "md";
|
|
5240
|
+
const invalid = group?.invalid ?? invalidProp ?? false;
|
|
5241
|
+
const name = group?.name ?? nameProp;
|
|
5242
|
+
const select = () => group ? group.setValue(value) : onCheckedChange?.(true);
|
|
5175
5243
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: (0, import_clsx40.default)("flex flex-col", className), children: [
|
|
5176
5244
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
5177
5245
|
"label",
|
|
@@ -5191,27 +5259,19 @@ var Radio = (0, import_react33.forwardRef)(function Radio2({ value, label, descr
|
|
|
5191
5259
|
ref,
|
|
5192
5260
|
id: controlId,
|
|
5193
5261
|
type: "radio",
|
|
5194
|
-
name
|
|
5262
|
+
name,
|
|
5195
5263
|
value,
|
|
5196
5264
|
checked,
|
|
5197
5265
|
disabled: isDisabled,
|
|
5266
|
+
"aria-invalid": !group && invalid ? true : void 0,
|
|
5198
5267
|
"aria-describedby": description ? descriptionId : void 0,
|
|
5199
|
-
onChange:
|
|
5268
|
+
onChange: select,
|
|
5200
5269
|
className: "peer sr-only",
|
|
5201
5270
|
...props
|
|
5202
5271
|
}
|
|
5203
5272
|
),
|
|
5204
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5205
|
-
|
|
5206
|
-
{
|
|
5207
|
-
type: "radio",
|
|
5208
|
-
checked,
|
|
5209
|
-
disabled: isDisabled,
|
|
5210
|
-
invalid: group.invalid,
|
|
5211
|
-
size: group.size
|
|
5212
|
-
}
|
|
5213
|
-
),
|
|
5214
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: (0, import_clsx40.default)(LABEL_TEXT3[group.size], "text-default"), children: label })
|
|
5273
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CheckControl, { type: "radio", checked, disabled: isDisabled, invalid, size: size2 }),
|
|
5274
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: (0, import_clsx40.default)(LABEL_TEXT3[size2], "text-default"), children: label })
|
|
5215
5275
|
]
|
|
5216
5276
|
}
|
|
5217
5277
|
),
|
|
@@ -5221,7 +5281,7 @@ var Radio = (0, import_react33.forwardRef)(function Radio2({ value, label, descr
|
|
|
5221
5281
|
id: descriptionId,
|
|
5222
5282
|
className: (0, import_clsx40.default)(
|
|
5223
5283
|
"mt-0.5 pl-[26px]",
|
|
5224
|
-
LABEL_TEXT3[
|
|
5284
|
+
LABEL_TEXT3[size2],
|
|
5225
5285
|
isDisabled ? "text-disabled" : "text-default-secondary"
|
|
5226
5286
|
),
|
|
5227
5287
|
children: description
|
|
@@ -8150,13 +8210,19 @@ function PageHeading({
|
|
|
8150
8210
|
subtitle,
|
|
8151
8211
|
size: size2 = "page",
|
|
8152
8212
|
as,
|
|
8213
|
+
badges,
|
|
8214
|
+
meta,
|
|
8153
8215
|
actions,
|
|
8154
8216
|
truncateTitle,
|
|
8155
8217
|
className
|
|
8156
8218
|
}) {
|
|
8157
8219
|
const Tag = as ?? (size2 === "section" ? "h2" : "h1");
|
|
8158
8220
|
const heading = /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
8159
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.
|
|
8221
|
+
badges ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 flex-wrap items-center gap-2.5", children: [
|
|
8222
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Tag, { className: (0, import_clsx52.default)(TITLE[size2], truncateTitle && "truncate"), children: title }),
|
|
8223
|
+
badges
|
|
8224
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Tag, { className: (0, import_clsx52.default)(TITLE[size2], truncateTitle && "truncate"), children: title }),
|
|
8225
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex flex-wrap items-center gap-2.5 text-body-xs text-default-secondary", children: meta }),
|
|
8160
8226
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { className: SUBTITLE[size2], children: subtitle })
|
|
8161
8227
|
] });
|
|
8162
8228
|
if (!actions) return className ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className, children: heading }) : heading;
|
|
@@ -8570,7 +8636,9 @@ var TabsContent = (0, import_react59.forwardRef)(function TabsContent2({ value,
|
|
|
8570
8636
|
});
|
|
8571
8637
|
|
|
8572
8638
|
// src/components/chrome/nav-item.tsx
|
|
8639
|
+
var import_react60 = require("react");
|
|
8573
8640
|
var import_clsx56 = __toESM(require("clsx"), 1);
|
|
8641
|
+
var import_lucide_react25 = require("lucide-react");
|
|
8574
8642
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8575
8643
|
var SIZE9 = {
|
|
8576
8644
|
sm: { box: "h-9 gap-2 rounded-lg px-3 py-1.5", label: "text-body-xs", square: "w-9" },
|
|
@@ -8606,7 +8674,32 @@ var VARIANT2 = {
|
|
|
8606
8674
|
inactive: (0, import_clsx56.default)("text-default-secondary", STATE.hover)
|
|
8607
8675
|
}
|
|
8608
8676
|
};
|
|
8609
|
-
|
|
8677
|
+
var DENSITY = {
|
|
8678
|
+
comfortable: {
|
|
8679
|
+
box: "h-11 gap-3 rounded-xl",
|
|
8680
|
+
pad: "px-3.5",
|
|
8681
|
+
square: "w-11",
|
|
8682
|
+
active: (0, import_clsx56.default)("border border-transparent", STATE.active),
|
|
8683
|
+
inactive: (0, import_clsx56.default)("border border-default bg-default text-default", STATE.hover),
|
|
8684
|
+
disabled: "data-[disabled]:hover:bg-default",
|
|
8685
|
+
// Straddles the card's corner, as in Figma.
|
|
8686
|
+
dot: "-right-px -top-px",
|
|
8687
|
+
railDot: "-right-px -top-px"
|
|
8688
|
+
},
|
|
8689
|
+
compact: {
|
|
8690
|
+
box: "h-10 gap-3 rounded-xl",
|
|
8691
|
+
pad: "px-3",
|
|
8692
|
+
square: "w-10",
|
|
8693
|
+
active: STATE.active,
|
|
8694
|
+
inactive: (0, import_clsx56.default)("text-default", STATE.hover),
|
|
8695
|
+
disabled: "data-[disabled]:hover:bg-transparent",
|
|
8696
|
+
// A plain row has no corner to sit on, so the expanded dot trails the label instead.
|
|
8697
|
+
dot: "right-2 top-1/2 -translate-y-1/2",
|
|
8698
|
+
railDot: "right-0 top-0"
|
|
8699
|
+
}
|
|
8700
|
+
};
|
|
8701
|
+
var DENSITY_DISABLED = "data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled data-[disabled]:hover:text-disabled";
|
|
8702
|
+
var NavItem = (0, import_react60.forwardRef)(function NavItem2({
|
|
8610
8703
|
icon,
|
|
8611
8704
|
label,
|
|
8612
8705
|
isActive = false,
|
|
@@ -8614,16 +8707,21 @@ function NavItem({
|
|
|
8614
8707
|
collapsed = false,
|
|
8615
8708
|
size: size2 = "md",
|
|
8616
8709
|
variant = "card",
|
|
8710
|
+
density,
|
|
8711
|
+
trailing,
|
|
8617
8712
|
asChild = false,
|
|
8618
8713
|
disabled = false,
|
|
8619
8714
|
children,
|
|
8620
8715
|
className,
|
|
8621
8716
|
onClick,
|
|
8622
8717
|
...rest
|
|
8623
|
-
}) {
|
|
8718
|
+
}, ref) {
|
|
8624
8719
|
const s = SIZE9[size2];
|
|
8625
8720
|
const v = VARIANT2[variant];
|
|
8721
|
+
const d = density ? DENSITY[density] : null;
|
|
8626
8722
|
const rootProps = {
|
|
8723
|
+
ref,
|
|
8724
|
+
"data-density": density,
|
|
8627
8725
|
// Only meaningful when `asChild` renders a real link — a decorative span with
|
|
8628
8726
|
// aria-current would be a lie.
|
|
8629
8727
|
"aria-current": asChild && isActive ? "page" : void 0,
|
|
@@ -8644,12 +8742,25 @@ function NavItem({
|
|
|
8644
8742
|
// halo on the #F5F5F5 rail. The offset itself is load-bearing — in dark mode
|
|
8645
8743
|
// `ring-brand` and `bg-brand` are both #F1F7FD, so without it a focused *active* row
|
|
8646
8744
|
// would have no visible ring at its inner edge.
|
|
8745
|
+
// It is also Figma's focus state for both densities: 1px rail-coloured gap, 3px of brand
|
|
8746
|
+
// in all. Figma's compact focus variant draws a 0px shadow — no ring at all — which
|
|
8747
|
+
// would fail WCAG 2.4.7, so compact keeps this ring too.
|
|
8647
8748
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default-secondary",
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8749
|
+
d ? (0, import_clsx56.default)(
|
|
8750
|
+
// text-left: a parent row is a <button>, which centres its text by default.
|
|
8751
|
+
"group/nav-item text-left",
|
|
8752
|
+
d.box,
|
|
8753
|
+
collapsed ? (0, import_clsx56.default)("justify-center", d.square) : (0, import_clsx56.default)("w-full", d.pad),
|
|
8754
|
+
isActive ? d.active : d.inactive,
|
|
8755
|
+
DENSITY_DISABLED,
|
|
8756
|
+
d.disabled
|
|
8757
|
+
) : (0, import_clsx56.default)(
|
|
8758
|
+
s.box,
|
|
8759
|
+
// Expanded rows fill the nav; a collapsed one is a centred square, not a stretched row.
|
|
8760
|
+
collapsed ? (0, import_clsx56.default)("justify-center", s.square) : "w-full",
|
|
8761
|
+
isActive ? v.active : v.inactive,
|
|
8762
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-40 data-[disabled]:hover:bg-transparent data-[disabled]:hover:text-default-secondary"
|
|
8763
|
+
),
|
|
8653
8764
|
className
|
|
8654
8765
|
),
|
|
8655
8766
|
...rest,
|
|
@@ -8665,7 +8776,22 @@ function NavItem({
|
|
|
8665
8776
|
}
|
|
8666
8777
|
};
|
|
8667
8778
|
const content = /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
8668
|
-
icon != null ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8779
|
+
icon != null ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8780
|
+
"span",
|
|
8781
|
+
{
|
|
8782
|
+
"aria-hidden": true,
|
|
8783
|
+
className: (0, import_clsx56.default)(
|
|
8784
|
+
"shrink-0",
|
|
8785
|
+
d ? (0, import_clsx56.default)(
|
|
8786
|
+
// Figma: a 20px glyph, icon-secondary at rest, brand under hover,
|
|
8787
|
+
// on-brand on the current row, disabled grey on a disabled one.
|
|
8788
|
+
"flex size-5 items-center justify-center [&_svg]:size-5",
|
|
8789
|
+
disabled ? "text-icon-disabled" : isActive ? "text-icon-brand-on-brand" : "text-icon-default-secondary group-hover/nav-item:text-icon-brand"
|
|
8790
|
+
) : "[&_svg]:size-4"
|
|
8791
|
+
),
|
|
8792
|
+
children: icon
|
|
8793
|
+
}
|
|
8794
|
+
) : (
|
|
8669
8795
|
// Icons are optional, but the collapsed rail hides the label — so a row with neither
|
|
8670
8796
|
// renders as an empty box. Through 0.5.0 that is exactly what a nav without icons
|
|
8671
8797
|
// collapsed to, the docs site's own 36-row sidebar included. The monogram is
|
|
@@ -8684,19 +8810,23 @@ function NavItem({
|
|
|
8684
8810
|
"span",
|
|
8685
8811
|
{
|
|
8686
8812
|
className: (0, import_clsx56.default)(
|
|
8687
|
-
"min-w-0 truncate font-regular
|
|
8688
|
-
s.label,
|
|
8813
|
+
"min-w-0 truncate font-regular",
|
|
8814
|
+
d ? "text-body" : (0, import_clsx56.default)("leading-snug", s.label),
|
|
8689
8815
|
collapsed ? "sr-only" : "flex-1"
|
|
8690
8816
|
),
|
|
8691
8817
|
children: label
|
|
8692
8818
|
}
|
|
8693
8819
|
),
|
|
8820
|
+
trailing != null && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { "aria-hidden": true, className: "flex shrink-0 items-center [&_svg]:size-4", children: trailing }),
|
|
8694
8821
|
indicator && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8695
8822
|
"span",
|
|
8696
8823
|
{
|
|
8697
8824
|
role: "status",
|
|
8698
8825
|
"aria-label": "Unread",
|
|
8699
|
-
className:
|
|
8826
|
+
className: (0, import_clsx56.default)(
|
|
8827
|
+
"absolute size-2 rounded-full bg-danger",
|
|
8828
|
+
d ? collapsed ? d.railDot : d.dot : "-right-px -top-px"
|
|
8829
|
+
)
|
|
8700
8830
|
}
|
|
8701
8831
|
)
|
|
8702
8832
|
] });
|
|
@@ -8704,63 +8834,666 @@ function NavItem({
|
|
|
8704
8834
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Slot, { wrapChildren: () => content, ...rootProps, children });
|
|
8705
8835
|
}
|
|
8706
8836
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { ...rootProps, children: content });
|
|
8837
|
+
});
|
|
8838
|
+
var SUB_HEIGHT = { comfortable: "h-11", compact: "h-10" };
|
|
8839
|
+
var NavSubItem = (0, import_react60.forwardRef)(function NavSubItem2({
|
|
8840
|
+
label,
|
|
8841
|
+
isActive = false,
|
|
8842
|
+
disabled = false,
|
|
8843
|
+
last = false,
|
|
8844
|
+
density = "comfortable",
|
|
8845
|
+
asChild = false,
|
|
8846
|
+
children,
|
|
8847
|
+
className,
|
|
8848
|
+
onClick,
|
|
8849
|
+
...rest
|
|
8850
|
+
}, ref) {
|
|
8851
|
+
const rootProps = {
|
|
8852
|
+
ref,
|
|
8853
|
+
"aria-current": asChild && isActive ? "page" : void 0,
|
|
8854
|
+
"data-state": isActive ? "active" : void 0,
|
|
8855
|
+
"data-disabled": disabled || void 0,
|
|
8856
|
+
"aria-disabled": disabled || void 0,
|
|
8857
|
+
className: (0, import_clsx56.default)(
|
|
8858
|
+
"relative flex w-full items-center gap-3 rounded-md pl-4 pr-3 transition-colors",
|
|
8859
|
+
// Figma's focus variant is a 1px brand border on the hover tint. The transparent
|
|
8860
|
+
// border holds the 1px at rest so the label does not move when focus arrives.
|
|
8861
|
+
"border border-transparent focus-visible:border-brand focus-visible:bg-brand-secondary focus-visible:text-brand focus-visible:outline-none",
|
|
8862
|
+
SUB_HEIGHT[density],
|
|
8863
|
+
isActive ? "bg-brand text-brand-on-brand" : "text-default-secondary hover:bg-brand-secondary hover:text-brand",
|
|
8864
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled data-[disabled]:hover:bg-transparent data-[disabled]:hover:text-disabled",
|
|
8865
|
+
className
|
|
8866
|
+
),
|
|
8867
|
+
...rest,
|
|
8868
|
+
...disabled ? { tabIndex: -1 } : {},
|
|
8869
|
+
onClick: (event) => {
|
|
8870
|
+
if (disabled) {
|
|
8871
|
+
event.preventDefault();
|
|
8872
|
+
return;
|
|
8873
|
+
}
|
|
8874
|
+
onClick?.(event);
|
|
8875
|
+
}
|
|
8876
|
+
};
|
|
8877
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
8878
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(NestIndicator, { last }),
|
|
8879
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "min-w-0 flex-1 truncate text-body font-regular", children: label })
|
|
8880
|
+
] });
|
|
8881
|
+
if (asChild) {
|
|
8882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Slot, { wrapChildren: () => content, ...rootProps, children });
|
|
8883
|
+
}
|
|
8884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { ...rootProps, children: content });
|
|
8885
|
+
});
|
|
8886
|
+
function NestIndicator({ last }) {
|
|
8887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { "aria-hidden": true, className: "relative w-4 shrink-0 self-stretch", children: [
|
|
8888
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8889
|
+
"span",
|
|
8890
|
+
{
|
|
8891
|
+
className: (0, import_clsx56.default)(
|
|
8892
|
+
"absolute left-1/2 top-0 w-px -translate-x-1/2 bg-[var(--prim-stone-400)]",
|
|
8893
|
+
last ? "h-1/2" : "h-full"
|
|
8894
|
+
)
|
|
8895
|
+
}
|
|
8896
|
+
),
|
|
8897
|
+
last && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "absolute left-1/2 right-0 top-1/2 h-px bg-[var(--prim-stone-400)]" })
|
|
8898
|
+
] });
|
|
8707
8899
|
}
|
|
8900
|
+
var NavGroupHeader = (0, import_react60.forwardRef)(function NavGroupHeader2({ title, open, onOpenChange, controls, action, className, ...rest }, ref) {
|
|
8901
|
+
const collapsible = open !== void 0 && onOpenChange !== void 0;
|
|
8902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { ref, className: (0, import_clsx56.default)("flex items-center gap-2 pl-2.5", className), ...rest, children: [
|
|
8903
|
+
collapsible && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8904
|
+
"button",
|
|
8905
|
+
{
|
|
8906
|
+
type: "button",
|
|
8907
|
+
"aria-expanded": open,
|
|
8908
|
+
"aria-controls": controls,
|
|
8909
|
+
"aria-label": `${open ? "Collapse" : "Expand"} ${title}`,
|
|
8910
|
+
onClick: () => onOpenChange(!open),
|
|
8911
|
+
className: (0, import_clsx56.default)(
|
|
8912
|
+
"flex shrink-0 items-center justify-center rounded-full p-1 text-icon-default-secondary transition-colors",
|
|
8913
|
+
"hover:bg-brand-tertiary-hover hover:text-icon-brand",
|
|
8914
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default-secondary"
|
|
8915
|
+
),
|
|
8916
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8917
|
+
import_lucide_react25.ChevronDownIcon,
|
|
8918
|
+
{
|
|
8919
|
+
"aria-hidden": true,
|
|
8920
|
+
className: (0, import_clsx56.default)(
|
|
8921
|
+
"size-4 transition-transform motion-reduce:transition-none",
|
|
8922
|
+
!open && "-rotate-90"
|
|
8923
|
+
)
|
|
8924
|
+
}
|
|
8925
|
+
)
|
|
8926
|
+
}
|
|
8927
|
+
),
|
|
8928
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { className: "min-w-0 flex-1 truncate text-body font-regular text-neutral-tertiary", children: title }),
|
|
8929
|
+
action != null && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex shrink-0 items-center", children: action })
|
|
8930
|
+
] });
|
|
8931
|
+
});
|
|
8708
8932
|
|
|
8709
|
-
// src/components/chrome/
|
|
8933
|
+
// src/components/chrome/sidebar.tsx
|
|
8934
|
+
var import_react62 = require("react");
|
|
8935
|
+
var import_radix_ui15 = require("radix-ui");
|
|
8936
|
+
var import_lucide_react26 = require("lucide-react");
|
|
8710
8937
|
var import_clsx57 = __toESM(require("clsx"), 1);
|
|
8938
|
+
|
|
8939
|
+
// src/lib/use-media-query.ts
|
|
8940
|
+
var import_react61 = require("react");
|
|
8941
|
+
function useMediaQuery(query) {
|
|
8942
|
+
const subscribe = (0, import_react61.useCallback)(
|
|
8943
|
+
(onChange) => {
|
|
8944
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return () => {
|
|
8945
|
+
};
|
|
8946
|
+
const list = window.matchMedia(query);
|
|
8947
|
+
list.addEventListener("change", onChange);
|
|
8948
|
+
return () => list.removeEventListener("change", onChange);
|
|
8949
|
+
},
|
|
8950
|
+
[query]
|
|
8951
|
+
);
|
|
8952
|
+
const getSnapshot = () => typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia(query).matches : false;
|
|
8953
|
+
return (0, import_react61.useSyncExternalStore)(subscribe, getSnapshot, () => false);
|
|
8954
|
+
}
|
|
8955
|
+
|
|
8956
|
+
// src/components/chrome/sidebar.tsx
|
|
8711
8957
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
8712
|
-
|
|
8958
|
+
var MOBILE_QUERY = "(max-width: 767.98px)";
|
|
8959
|
+
var SidebarContext = (0, import_react62.createContext)(null);
|
|
8960
|
+
function useSidebar() {
|
|
8961
|
+
const value = (0, import_react62.useContext)(SidebarContext);
|
|
8962
|
+
if (!value) throw new Error("useSidebar must be used inside <SidebarProvider>");
|
|
8963
|
+
return value;
|
|
8964
|
+
}
|
|
8965
|
+
function readStored(key) {
|
|
8966
|
+
try {
|
|
8967
|
+
const value = window.localStorage.getItem(key);
|
|
8968
|
+
return value === "true" ? true : value === "false" ? false : null;
|
|
8969
|
+
} catch {
|
|
8970
|
+
return null;
|
|
8971
|
+
}
|
|
8972
|
+
}
|
|
8973
|
+
function writeStored(key, value) {
|
|
8974
|
+
try {
|
|
8975
|
+
window.localStorage.setItem(key, String(value));
|
|
8976
|
+
} catch {
|
|
8977
|
+
}
|
|
8978
|
+
}
|
|
8979
|
+
function SidebarProvider({
|
|
8980
|
+
children,
|
|
8981
|
+
collapsed: collapsedProp,
|
|
8982
|
+
defaultCollapsed = false,
|
|
8983
|
+
onCollapsedChange,
|
|
8984
|
+
storageKey,
|
|
8985
|
+
mobileOpen: mobileOpenProp,
|
|
8986
|
+
defaultMobileOpen = false,
|
|
8987
|
+
onMobileOpenChange
|
|
8988
|
+
}) {
|
|
8989
|
+
const [collapsed, setCollapsedState] = useControllableState({
|
|
8990
|
+
value: collapsedProp,
|
|
8991
|
+
defaultValue: defaultCollapsed,
|
|
8992
|
+
onChange: onCollapsedChange
|
|
8993
|
+
});
|
|
8994
|
+
const [mobileOpen, setMobileOpen] = useControllableState({
|
|
8995
|
+
value: mobileOpenProp,
|
|
8996
|
+
defaultValue: defaultMobileOpen,
|
|
8997
|
+
onChange: onMobileOpenChange
|
|
8998
|
+
});
|
|
8999
|
+
const isMobile = useMediaQuery(MOBILE_QUERY);
|
|
9000
|
+
(0, import_react62.useEffect)(() => {
|
|
9001
|
+
if (!storageKey) return;
|
|
9002
|
+
const stored = readStored(storageKey);
|
|
9003
|
+
if (stored !== null) setCollapsedState(stored);
|
|
9004
|
+
}, [storageKey, setCollapsedState]);
|
|
9005
|
+
const setCollapsed = (0, import_react62.useCallback)(
|
|
9006
|
+
(next) => {
|
|
9007
|
+
if (storageKey) writeStored(storageKey, next);
|
|
9008
|
+
setCollapsedState(next);
|
|
9009
|
+
},
|
|
9010
|
+
[storageKey, setCollapsedState]
|
|
9011
|
+
);
|
|
9012
|
+
const value = (0, import_react62.useMemo)(
|
|
9013
|
+
() => ({
|
|
9014
|
+
collapsed,
|
|
9015
|
+
setCollapsed,
|
|
9016
|
+
toggleCollapsed: () => setCollapsed(!collapsed),
|
|
9017
|
+
mobileOpen,
|
|
9018
|
+
setMobileOpen,
|
|
9019
|
+
isMobile
|
|
9020
|
+
}),
|
|
9021
|
+
[collapsed, setCollapsed, mobileOpen, setMobileOpen, isMobile]
|
|
9022
|
+
);
|
|
9023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarContext.Provider, { value, children });
|
|
9024
|
+
}
|
|
9025
|
+
var DefaultLink = (0, import_react62.forwardRef)(function DefaultLink2({ children, ...rest }, ref) {
|
|
9026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("a", { ref, ...rest, children });
|
|
9027
|
+
});
|
|
9028
|
+
var Row = (0, import_react62.createContext)(null);
|
|
9029
|
+
function useRow() {
|
|
9030
|
+
const value = (0, import_react62.useContext)(Row);
|
|
9031
|
+
if (!value) throw new Error("Sidebar rows must be rendered by <Sidebar>");
|
|
9032
|
+
return value;
|
|
9033
|
+
}
|
|
9034
|
+
function Sidebar(props) {
|
|
9035
|
+
const outer = (0, import_react62.useContext)(SidebarContext);
|
|
9036
|
+
if (outer) return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarRoot, { ...props, context: outer, ownsState: false });
|
|
8713
9037
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8714
|
-
|
|
9038
|
+
SidebarProvider,
|
|
8715
9039
|
{
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
),
|
|
8722
|
-
children
|
|
9040
|
+
collapsed: props.collapsed,
|
|
9041
|
+
defaultCollapsed: props.defaultCollapsed,
|
|
9042
|
+
onCollapsedChange: props.onCollapsedChange,
|
|
9043
|
+
storageKey: props.storageKey,
|
|
9044
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarFromContext, { ...props })
|
|
8723
9045
|
}
|
|
8724
9046
|
);
|
|
8725
9047
|
}
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
9048
|
+
function SidebarFromContext(props) {
|
|
9049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarRoot, { ...props, context: useSidebar(), ownsState: true });
|
|
9050
|
+
}
|
|
9051
|
+
function SidebarRoot({
|
|
9052
|
+
groups,
|
|
9053
|
+
footerNav,
|
|
9054
|
+
brand,
|
|
9055
|
+
footer,
|
|
9056
|
+
density: densityProp,
|
|
9057
|
+
collapsible = true,
|
|
9058
|
+
collapsed: collapsedProp,
|
|
9059
|
+
onCollapsedChange,
|
|
9060
|
+
onToggle,
|
|
9061
|
+
currentPath,
|
|
9062
|
+
currentHash,
|
|
9063
|
+
linkComponent = DefaultLink,
|
|
9064
|
+
onNavigate,
|
|
9065
|
+
label = "Primary",
|
|
9066
|
+
variant,
|
|
9067
|
+
width = "w-80",
|
|
9068
|
+
collapsedWidth,
|
|
9069
|
+
className,
|
|
9070
|
+
context,
|
|
9071
|
+
ownsState
|
|
9072
|
+
}) {
|
|
9073
|
+
const density = densityProp ?? (variant === "plain" ? "compact" : "comfortable");
|
|
9074
|
+
const asideId = (0, import_react62.useId)();
|
|
9075
|
+
const { isMobile, setMobileOpen } = context;
|
|
9076
|
+
const collapsed = !isMobile && collapsible && (collapsedProp ?? context.collapsed);
|
|
9077
|
+
const showToggle = collapsible && !isMobile && (collapsedProp === void 0 || onToggle != null || onCollapsedChange != null);
|
|
9078
|
+
const toggle = () => {
|
|
9079
|
+
const next = !collapsed;
|
|
9080
|
+
onToggle?.();
|
|
9081
|
+
if (!ownsState) onCollapsedChange?.(next);
|
|
9082
|
+
context.setCollapsed(next);
|
|
9083
|
+
};
|
|
9084
|
+
const hashTargets = (0, import_react62.useMemo)(
|
|
9085
|
+
() => new Set(
|
|
9086
|
+
[...groups.flatMap((group) => group.items), ...footerNav ?? []].flatMap((item) => [item, ...item.children ?? []]).map((item) => item.to).filter((to) => to?.includes("#") ?? false)
|
|
9087
|
+
),
|
|
9088
|
+
[groups, footerNav]
|
|
9089
|
+
);
|
|
9090
|
+
const row = (0, import_react62.useMemo)(
|
|
9091
|
+
() => ({
|
|
9092
|
+
density,
|
|
9093
|
+
collapsed,
|
|
9094
|
+
path: currentPath,
|
|
9095
|
+
hash: currentHash,
|
|
9096
|
+
hashTargets,
|
|
9097
|
+
Link: linkComponent,
|
|
9098
|
+
onNavigate: () => {
|
|
9099
|
+
if (isMobile) setMobileOpen(false);
|
|
9100
|
+
onNavigate?.();
|
|
9101
|
+
}
|
|
9102
|
+
}),
|
|
9103
|
+
[density, collapsed, currentPath, currentHash, hashTargets, linkComponent, isMobile, setMobileOpen, onNavigate]
|
|
9104
|
+
);
|
|
9105
|
+
const state = { collapsed, density };
|
|
9106
|
+
const comfortable = density === "comfortable";
|
|
9107
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
9108
|
+
"aside",
|
|
8734
9109
|
{
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
"
|
|
8738
|
-
"data-
|
|
8739
|
-
className: (
|
|
8740
|
-
"shrink-0 bg-
|
|
8741
|
-
|
|
9110
|
+
id: asideId,
|
|
9111
|
+
"aria-label": label,
|
|
9112
|
+
"data-density": density,
|
|
9113
|
+
"data-collapsed": collapsed || void 0,
|
|
9114
|
+
className: cn(
|
|
9115
|
+
"relative flex h-full shrink-0 flex-col justify-between bg-default-secondary py-2",
|
|
9116
|
+
"transition-[width] duration-200 motion-reduce:transition-none",
|
|
9117
|
+
isMobile ? "w-full" : (0, import_clsx57.default)(
|
|
9118
|
+
"rounded-xl border-r border-default",
|
|
9119
|
+
collapsed ? collapsedWidth ?? (comfortable ? "w-20" : "w-[72px]") : width
|
|
9120
|
+
),
|
|
8742
9121
|
className
|
|
8743
9122
|
),
|
|
8744
|
-
|
|
9123
|
+
children: [
|
|
9124
|
+
showToggle && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9125
|
+
"button",
|
|
9126
|
+
{
|
|
9127
|
+
type: "button",
|
|
9128
|
+
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
9129
|
+
"aria-expanded": !collapsed,
|
|
9130
|
+
"aria-controls": asideId,
|
|
9131
|
+
onClick: toggle,
|
|
9132
|
+
className: cn(
|
|
9133
|
+
"absolute -right-3 top-5 z-raised flex size-6 items-center justify-center rounded-full",
|
|
9134
|
+
"border border-default bg-default text-default-secondary",
|
|
9135
|
+
// Not `hover:bg-default-hover` — that is #F5F5F5, exactly the rail colour, and
|
|
9136
|
+
// this button straddles the rail edge, so half of it dissolved into the rail on
|
|
9137
|
+
// hover. Same hover vocabulary as the rows instead.
|
|
9138
|
+
"shadow-100 transition-colors hover:bg-brand-tertiary-hover hover:text-brand",
|
|
9139
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default"
|
|
9140
|
+
),
|
|
9141
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react26.ChevronRightIcon, { className: "size-3", strokeWidth: 2.5, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react26.ChevronLeftIcon, { className: "size-3", strokeWidth: 2.5, "aria-hidden": true })
|
|
9142
|
+
}
|
|
9143
|
+
),
|
|
9144
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col gap-1 pb-3", children: [
|
|
9145
|
+
brand && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9146
|
+
"div",
|
|
9147
|
+
{
|
|
9148
|
+
className: cn(
|
|
9149
|
+
"flex shrink-0 items-center overflow-hidden p-4",
|
|
9150
|
+
collapsed ? "justify-center" : "gap-2.5"
|
|
9151
|
+
),
|
|
9152
|
+
children: typeof brand === "function" ? brand(state) : brand
|
|
9153
|
+
}
|
|
9154
|
+
),
|
|
9155
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ScrollArea, { axis: "vertical", label: "Sidebar navigation", className: "min-h-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Row.Provider, { value: row, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("nav", { "aria-label": "Main", className: cn("flex flex-col px-4", comfortable ? "gap-4 pt-2" : "gap-2"), children: groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarGroupView, { group }, group.id ?? group.title ?? `group-${index}`)) }) }) })
|
|
9156
|
+
] }),
|
|
9157
|
+
(Boolean(footerNav?.length) || footer != null) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex shrink-0 flex-col", children: [
|
|
9158
|
+
footerNav && footerNav.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Row.Provider, { value: row, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9159
|
+
"nav",
|
|
9160
|
+
{
|
|
9161
|
+
"aria-label": "Secondary",
|
|
9162
|
+
className: cn("flex flex-col px-4 pt-2", comfortable && "gap-1", collapsed && "items-center"),
|
|
9163
|
+
children: footerNav.map((item) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarRow, { item }, itemKey(item)))
|
|
9164
|
+
}
|
|
9165
|
+
) }),
|
|
9166
|
+
typeof footer === "function" ? footer(state) : footer
|
|
9167
|
+
] })
|
|
9168
|
+
]
|
|
8745
9169
|
}
|
|
8746
9170
|
);
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
9171
|
+
if (isMobile) {
|
|
9172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9173
|
+
Drawer,
|
|
9174
|
+
{
|
|
9175
|
+
side: "left",
|
|
9176
|
+
open: context.mobileOpen,
|
|
9177
|
+
onOpenChange: setMobileOpen,
|
|
9178
|
+
label,
|
|
9179
|
+
width: "w-80 max-w-[85vw]",
|
|
9180
|
+
className: "bg-default-secondary",
|
|
9181
|
+
children: panel
|
|
9182
|
+
}
|
|
9183
|
+
);
|
|
9184
|
+
}
|
|
9185
|
+
return panel;
|
|
9186
|
+
}
|
|
9187
|
+
function itemKey(item) {
|
|
9188
|
+
return item.id ?? item.to ?? item.href ?? item.label;
|
|
9189
|
+
}
|
|
9190
|
+
function SidebarGroupView({ group }) {
|
|
9191
|
+
const { density, collapsed } = useRow();
|
|
9192
|
+
const [open, setOpen] = (0, import_react62.useState)(group.defaultOpen ?? true);
|
|
9193
|
+
const regionId = (0, import_react62.useId)();
|
|
9194
|
+
const foldable = Boolean(group.collapsible && group.title) && !collapsed;
|
|
9195
|
+
const comfortable = density === "comfortable";
|
|
9196
|
+
return (
|
|
9197
|
+
// Figma "Menu Container": 8px above and below; 12px (comfortable) or 8px (compact)
|
|
9198
|
+
// between the heading and the rows; rows 4px apart when comfortable, touching when compact.
|
|
9199
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: cn("flex flex-col py-2", comfortable ? "gap-3" : "gap-2"), children: [
|
|
9200
|
+
group.title && (collapsed ? (
|
|
9201
|
+
// No room in the rail, but still the only thing naming the run of icons below.
|
|
9202
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "sr-only", children: group.title })
|
|
9203
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9204
|
+
NavGroupHeader,
|
|
9205
|
+
{
|
|
9206
|
+
title: group.title,
|
|
9207
|
+
action: group.action,
|
|
9208
|
+
...foldable ? { open, onOpenChange: setOpen, controls: regionId } : {}
|
|
9209
|
+
}
|
|
9210
|
+
)),
|
|
9211
|
+
(!foldable || open) && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { id: regionId, className: cn("flex flex-col", comfortable && "gap-1", collapsed && "items-center"), children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SidebarRow, { item }, itemKey(item))) })
|
|
9212
|
+
] })
|
|
9213
|
+
);
|
|
9214
|
+
}
|
|
9215
|
+
function isRowActive(item, row) {
|
|
9216
|
+
if (item.isActive !== void 0) return item.isActive;
|
|
9217
|
+
if (!item.to || row.path === void 0) return false;
|
|
9218
|
+
const [path, hash] = item.to.split("#");
|
|
9219
|
+
const pathMatches = item.end ? row.path === path : row.path === path || row.path.startsWith(`${path.replace(/\/$/, "")}/`);
|
|
9220
|
+
if (!pathMatches) return false;
|
|
9221
|
+
if (hash !== void 0) return row.hash === `#${hash}`;
|
|
9222
|
+
return !row.hashTargets.has(`${row.path}${row.hash ?? ""}`);
|
|
9223
|
+
}
|
|
9224
|
+
function SidebarRow({ item }) {
|
|
9225
|
+
const row = useRow();
|
|
9226
|
+
if (item.children?.length) {
|
|
9227
|
+
return row.collapsed ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(RailParent, { item }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ParentRow, { item });
|
|
9228
|
+
}
|
|
9229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(LeafRow, { item });
|
|
9230
|
+
}
|
|
9231
|
+
function navigateHandler(row) {
|
|
9232
|
+
return (event) => {
|
|
9233
|
+
if (!event.defaultPrevented) row.onNavigate();
|
|
9234
|
+
};
|
|
9235
|
+
}
|
|
9236
|
+
function LeafRow({ item }) {
|
|
9237
|
+
const row = useRow();
|
|
9238
|
+
const active = isRowActive(item, row);
|
|
9239
|
+
const common = {
|
|
9240
|
+
icon: item.icon,
|
|
9241
|
+
label: item.label,
|
|
9242
|
+
isActive: active,
|
|
9243
|
+
indicator: item.indicator,
|
|
9244
|
+
disabled: item.disabled,
|
|
9245
|
+
collapsed: row.collapsed,
|
|
9246
|
+
density: row.density
|
|
9247
|
+
};
|
|
9248
|
+
let element;
|
|
9249
|
+
if (item.href) {
|
|
9250
|
+
element = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NavItem, { asChild: true, ...common, onClick: navigateHandler(row), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("a", { href: item.href, target: "_blank", rel: "noreferrer" }) });
|
|
9251
|
+
} else if (item.to) {
|
|
9252
|
+
const { Link } = row;
|
|
9253
|
+
element = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NavItem, { asChild: true, ...common, onClick: navigateHandler(row), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Link, { href: item.to }) });
|
|
9254
|
+
} else {
|
|
9255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NavItem, { ...common });
|
|
9256
|
+
}
|
|
9257
|
+
if (!row.collapsed) return element;
|
|
9258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Tooltip, { title: item.label, side: "right", children: element });
|
|
9259
|
+
}
|
|
9260
|
+
function ParentRow({ item }) {
|
|
9261
|
+
const row = useRow();
|
|
9262
|
+
const children = item.children ?? [];
|
|
9263
|
+
const childActive = children.some((child) => isRowActive(child, row));
|
|
9264
|
+
const [open, setOpen] = (0, import_react62.useState)(item.defaultOpen ?? childActive);
|
|
9265
|
+
const regionId = (0, import_react62.useId)();
|
|
9266
|
+
(0, import_react62.useEffect)(() => {
|
|
9267
|
+
if (childActive) setOpen(true);
|
|
9268
|
+
}, [childActive]);
|
|
9269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
9270
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9271
|
+
NavItem,
|
|
9272
|
+
{
|
|
9273
|
+
asChild: true,
|
|
9274
|
+
icon: item.icon,
|
|
9275
|
+
label: item.label,
|
|
9276
|
+
isActive: !open && childActive,
|
|
9277
|
+
indicator: item.indicator,
|
|
9278
|
+
disabled: item.disabled,
|
|
9279
|
+
density: row.density,
|
|
9280
|
+
trailing: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9281
|
+
import_lucide_react26.ChevronDownIcon,
|
|
9282
|
+
{
|
|
9283
|
+
className: cn(
|
|
9284
|
+
"text-icon-default-secondary transition-transform motion-reduce:transition-none",
|
|
9285
|
+
!open && "-rotate-90"
|
|
9286
|
+
)
|
|
9287
|
+
}
|
|
9288
|
+
),
|
|
9289
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("button", { type: "button", "aria-expanded": open, "aria-controls": regionId, onClick: () => setOpen(!open) })
|
|
9290
|
+
}
|
|
9291
|
+
),
|
|
9292
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { id: regionId, className: "flex flex-col", children: children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SubRow, { item: child, last: index === children.length - 1 }, itemKey(child))) })
|
|
9293
|
+
] });
|
|
9294
|
+
}
|
|
9295
|
+
function SubRow({ item, last }) {
|
|
9296
|
+
const row = useRow();
|
|
9297
|
+
const common = {
|
|
9298
|
+
label: item.label,
|
|
9299
|
+
isActive: isRowActive(item, row),
|
|
9300
|
+
disabled: item.disabled,
|
|
9301
|
+
last,
|
|
9302
|
+
density: row.density
|
|
9303
|
+
};
|
|
9304
|
+
if (item.href) {
|
|
9305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NavSubItem, { asChild: true, ...common, onClick: navigateHandler(row), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("a", { href: item.href, target: "_blank", rel: "noreferrer" }) });
|
|
9306
|
+
}
|
|
9307
|
+
if (item.to) {
|
|
9308
|
+
const { Link } = row;
|
|
9309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NavSubItem, { asChild: true, ...common, onClick: navigateHandler(row), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Link, { href: item.to }) });
|
|
9310
|
+
}
|
|
9311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NavSubItem, { ...common });
|
|
9312
|
+
}
|
|
9313
|
+
var FLYOUT_ITEM = (0, import_clsx57.default)(OVERLAY_ITEM_BASE, OVERLAY_ITEM_SIZE.md, "no-underline");
|
|
9314
|
+
function RailParent({ item }) {
|
|
9315
|
+
const row = useRow();
|
|
9316
|
+
const children = item.children ?? [];
|
|
9317
|
+
const childActive = children.some((child) => isRowActive(child, row));
|
|
9318
|
+
const { Link } = row;
|
|
9319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(DropdownMenu, { children: [
|
|
9320
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Tooltip, { title: item.label, side: "right", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9321
|
+
NavItem,
|
|
9322
|
+
{
|
|
9323
|
+
asChild: true,
|
|
9324
|
+
icon: item.icon,
|
|
9325
|
+
label: item.label,
|
|
9326
|
+
isActive: childActive,
|
|
9327
|
+
indicator: item.indicator,
|
|
9328
|
+
disabled: item.disabled,
|
|
9329
|
+
collapsed: true,
|
|
9330
|
+
density: row.density,
|
|
9331
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("button", { type: "button" })
|
|
9332
|
+
}
|
|
9333
|
+
) }) }),
|
|
9334
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(DropdownMenuContent, { side: "right", align: "start", children: [
|
|
9335
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuLabel, { children: item.label }),
|
|
9336
|
+
children.map((child) => {
|
|
9337
|
+
const active = isRowActive(child, row);
|
|
9338
|
+
const className = cn(
|
|
9339
|
+
FLYOUT_ITEM,
|
|
9340
|
+
overlayItemTone("default", Boolean(child.disabled)),
|
|
9341
|
+
active && "bg-brand text-brand-on-brand hover:bg-brand-hover focus:bg-brand-hover"
|
|
9342
|
+
);
|
|
9343
|
+
if (!child.to && !child.href) {
|
|
9344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuItem, { disabled: child.disabled, children: child.label }, itemKey(child));
|
|
9345
|
+
}
|
|
9346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9347
|
+
import_radix_ui15.DropdownMenu.Item,
|
|
9348
|
+
{
|
|
9349
|
+
asChild: true,
|
|
9350
|
+
disabled: child.disabled,
|
|
9351
|
+
className,
|
|
9352
|
+
onSelect: () => row.onNavigate(),
|
|
9353
|
+
children: child.href ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("a", { href: child.href, target: "_blank", rel: "noreferrer", children: child.label }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Link, { href: child.to, "aria-current": active ? "page" : void 0, children: child.label })
|
|
9354
|
+
},
|
|
9355
|
+
itemKey(child)
|
|
9356
|
+
);
|
|
9357
|
+
})
|
|
9358
|
+
] })
|
|
9359
|
+
] });
|
|
9360
|
+
}
|
|
9361
|
+
var SidebarTrigger = (0, import_react62.forwardRef)(function SidebarTrigger2({ "aria-label": ariaLabel = "Open navigation", className, onClick, variant = "subtle", ...rest }, ref) {
|
|
9362
|
+
const { mobileOpen, setMobileOpen } = useSidebar();
|
|
9363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9364
|
+
IconButton,
|
|
9365
|
+
{
|
|
8761
9366
|
ref,
|
|
8762
|
-
"
|
|
9367
|
+
"aria-label": ariaLabel,
|
|
9368
|
+
"aria-expanded": mobileOpen,
|
|
9369
|
+
"aria-haspopup": "dialog",
|
|
9370
|
+
variant,
|
|
9371
|
+
className: cn("md:hidden", className),
|
|
9372
|
+
onClick: (event) => {
|
|
9373
|
+
onClick?.(event);
|
|
9374
|
+
if (!event.defaultPrevented) setMobileOpen(!mobileOpen);
|
|
9375
|
+
},
|
|
9376
|
+
...rest,
|
|
9377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react26.MenuIcon, { className: "size-5", "aria-hidden": true })
|
|
9378
|
+
}
|
|
9379
|
+
);
|
|
9380
|
+
});
|
|
9381
|
+
function filterNav(groups, isVisible) {
|
|
9382
|
+
return groups.map((group) => ({ ...group, items: filterNavItems(group.items, isVisible) })).filter((group) => group.items.length > 0);
|
|
9383
|
+
}
|
|
9384
|
+
function filterNavItems(items, isVisible) {
|
|
9385
|
+
return items.flatMap((item) => {
|
|
9386
|
+
if (!isVisible(item)) return [];
|
|
9387
|
+
if (!item.children) return [item];
|
|
9388
|
+
const children = filterNavItems(item.children, isVisible);
|
|
9389
|
+
if (children.length === 0 && !item.to && !item.href) return [];
|
|
9390
|
+
return [{ ...item, children }];
|
|
9391
|
+
});
|
|
9392
|
+
}
|
|
9393
|
+
function SidebarSeparator({ className, ...rest }) {
|
|
9394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { "aria-hidden": true, className: cn("mx-1 h-px shrink-0 bg-divider", className), ...rest });
|
|
9395
|
+
}
|
|
9396
|
+
function SidebarUserCard({
|
|
9397
|
+
name,
|
|
9398
|
+
role,
|
|
9399
|
+
onLogout,
|
|
9400
|
+
collapsed = false,
|
|
9401
|
+
menu,
|
|
9402
|
+
className
|
|
9403
|
+
}) {
|
|
9404
|
+
const initial = name.trim().charAt(0);
|
|
9405
|
+
const items = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
9406
|
+
menu,
|
|
9407
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuItem, { icon: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react26.LogOutIcon, { className: "size-3.5", "aria-hidden": true }), onSelect: onLogout, children: "Sign out" })
|
|
9408
|
+
] });
|
|
9409
|
+
if (collapsed) {
|
|
9410
|
+
return (
|
|
9411
|
+
// Figma collapsed user card: the avatar alone, 24px above and 16px below.
|
|
9412
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: cn("flex shrink-0 items-center justify-center px-4 pb-4 pt-6", className), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(DropdownMenu, { children: [
|
|
9413
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuTrigger, { asChild: true, label: "User options", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("button", { type: "button", "aria-label": `${name} \u2014 user options`, className: "rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Avatar, { initial, size: "lg", shape: "circle" }) }) }),
|
|
9414
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuContent, { side: "right", align: "end", children: items })
|
|
9415
|
+
] }) })
|
|
9416
|
+
);
|
|
9417
|
+
}
|
|
9418
|
+
return (
|
|
9419
|
+
// Figma: 16px padding, plus 4px more above and below the row inside it.
|
|
9420
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: cn("flex shrink-0 items-center gap-2.5 px-4 py-5", className), children: [
|
|
9421
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Avatar, { initial, size: "lg", shape: "circle" }),
|
|
9422
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
9423
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "truncate text-body-sm font-semibold leading-snug text-default", children: name }),
|
|
9424
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "truncate text-body-tiny font-regular leading-none text-default-secondary", children: role })
|
|
9425
|
+
] }),
|
|
9426
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(DropdownMenu, { children: [
|
|
9427
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuTrigger, { asChild: true, label: "User options", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9428
|
+
"button",
|
|
9429
|
+
{
|
|
9430
|
+
type: "button",
|
|
9431
|
+
"aria-label": `${name} \u2014 user options`,
|
|
9432
|
+
className: "flex size-6 shrink-0 items-center justify-center rounded-md text-default-secondary transition-colors hover:bg-brand-tertiary-hover hover:text-brand",
|
|
9433
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react26.EllipsisVerticalIcon, { className: "size-5", "aria-hidden": true })
|
|
9434
|
+
}
|
|
9435
|
+
) }),
|
|
9436
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuContent, { side: "top", align: "end", children: items })
|
|
9437
|
+
] })
|
|
9438
|
+
] })
|
|
9439
|
+
);
|
|
9440
|
+
}
|
|
9441
|
+
|
|
9442
|
+
// src/components/chrome/eyebrow-label.tsx
|
|
9443
|
+
var import_clsx58 = __toESM(require("clsx"), 1);
|
|
9444
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
9445
|
+
function EyebrowLabel({ children, variant = "uppercase", className }) {
|
|
9446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9447
|
+
"p",
|
|
9448
|
+
{
|
|
9449
|
+
"data-variant": variant,
|
|
9450
|
+
className: (0, import_clsx58.default)(
|
|
9451
|
+
"text-body-tiny font-semibold tracking-wide text-default-secondary",
|
|
9452
|
+
variant === "uppercase" && "uppercase",
|
|
9453
|
+
className
|
|
9454
|
+
),
|
|
9455
|
+
children
|
|
9456
|
+
}
|
|
9457
|
+
);
|
|
9458
|
+
}
|
|
9459
|
+
|
|
9460
|
+
// src/components/chrome/separator.tsx
|
|
9461
|
+
var import_react63 = require("react");
|
|
9462
|
+
var import_clsx59 = __toESM(require("clsx"), 1);
|
|
9463
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
9464
|
+
var Separator = (0, import_react63.forwardRef)(function Separator2({ orientation = "horizontal", decorative = true, className, ...rest }, ref) {
|
|
9465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9466
|
+
"div",
|
|
9467
|
+
{
|
|
9468
|
+
ref,
|
|
9469
|
+
role: decorative ? "none" : "separator",
|
|
9470
|
+
"aria-orientation": decorative ? void 0 : orientation,
|
|
9471
|
+
"data-slot": "separator",
|
|
8763
9472
|
className: (0, import_clsx59.default)(
|
|
9473
|
+
"shrink-0 bg-divider",
|
|
9474
|
+
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
9475
|
+
className
|
|
9476
|
+
),
|
|
9477
|
+
...rest
|
|
9478
|
+
}
|
|
9479
|
+
);
|
|
9480
|
+
});
|
|
9481
|
+
|
|
9482
|
+
// src/components/chrome/kbd.tsx
|
|
9483
|
+
var import_react64 = require("react");
|
|
9484
|
+
var import_clsx60 = __toESM(require("clsx"), 1);
|
|
9485
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
9486
|
+
var SIZE10 = {
|
|
9487
|
+
sm: "h-4 min-w-4 px-1 text-body-tiny",
|
|
9488
|
+
md: "h-5 min-w-5 px-1.5 text-body-xs"
|
|
9489
|
+
};
|
|
9490
|
+
var Kbd = (0, import_react64.forwardRef)(function Kbd2({ children, size: size2 = "md", className, ...rest }, ref) {
|
|
9491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9492
|
+
"kbd",
|
|
9493
|
+
{
|
|
9494
|
+
ref,
|
|
9495
|
+
"data-slot": "kbd",
|
|
9496
|
+
className: (0, import_clsx60.default)(
|
|
8764
9497
|
"inline-flex items-center justify-center rounded border border-default bg-default-secondary",
|
|
8765
9498
|
"font-medium tabular-nums text-default-secondary",
|
|
8766
9499
|
SIZE10[size2],
|
|
@@ -8773,12 +9506,12 @@ var Kbd = (0, import_react61.forwardRef)(function Kbd2({ children, size: size2 =
|
|
|
8773
9506
|
});
|
|
8774
9507
|
|
|
8775
9508
|
// src/components/chrome/breadcrumb.tsx
|
|
8776
|
-
var
|
|
8777
|
-
var
|
|
8778
|
-
var
|
|
8779
|
-
var
|
|
8780
|
-
var Breadcrumb = (0,
|
|
8781
|
-
return /* @__PURE__ */ (0,
|
|
9509
|
+
var import_react65 = require("react");
|
|
9510
|
+
var import_clsx61 = __toESM(require("clsx"), 1);
|
|
9511
|
+
var import_lucide_react27 = require("lucide-react");
|
|
9512
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
9513
|
+
var Breadcrumb = (0, import_react65.forwardRef)(function Breadcrumb2({ children, items, renderLink, maxItems, label = "Breadcrumb", className, ...rest }, ref) {
|
|
9514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("nav", { ref, "aria-label": label, "data-slot": "breadcrumb", ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("ol", { className: (0, import_clsx61.default)("flex flex-wrap items-center gap-1.5 p-0 text-body-xs", className), children: items ? renderItems(items, renderLink, maxItems) : children }) });
|
|
8782
9515
|
});
|
|
8783
9516
|
function renderItems(items, renderLink, maxItems) {
|
|
8784
9517
|
const last = items.length - 1;
|
|
@@ -8787,21 +9520,21 @@ function renderItems(items, renderLink, maxItems) {
|
|
|
8787
9520
|
return shown.map((index, position) => {
|
|
8788
9521
|
const item = items[index];
|
|
8789
9522
|
const current = item.current ?? index === last;
|
|
8790
|
-
const crumb = !current && renderLink ? /* @__PURE__ */ (0,
|
|
8791
|
-
return /* @__PURE__ */ (0,
|
|
9523
|
+
const crumb = !current && renderLink ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(BreadcrumbItem, { asChild: true, first: position === 0, children: renderLink(item) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(BreadcrumbItem, { href: item.href, current, first: position === 0, children: item.label });
|
|
9524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_react65.Fragment, { children: [
|
|
8792
9525
|
crumb,
|
|
8793
|
-
collapse && position === 0 && /* @__PURE__ */ (0,
|
|
9526
|
+
collapse && position === 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(BreadcrumbEllipsis, {})
|
|
8794
9527
|
] }, item.id ?? index);
|
|
8795
9528
|
});
|
|
8796
9529
|
}
|
|
8797
|
-
var BreadcrumbItem = (0,
|
|
9530
|
+
var BreadcrumbItem = (0, import_react65.forwardRef)(
|
|
8798
9531
|
function BreadcrumbItem2({ children, current = false, asChild = false, first = false, className, ...rest }, ref) {
|
|
8799
|
-
return /* @__PURE__ */ (0,
|
|
8800
|
-
!first && /* @__PURE__ */ (0,
|
|
8801
|
-
current ? /* @__PURE__ */ (0,
|
|
9532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("li", { className: "flex items-center gap-1.5", children: [
|
|
9533
|
+
!first && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react27.ChevronRightIcon, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
9534
|
+
current ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { "aria-current": "page", className: (0, import_clsx61.default)("font-medium text-default", className), children }) : asChild ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8802
9535
|
Slot,
|
|
8803
9536
|
{
|
|
8804
|
-
className: (0,
|
|
9537
|
+
className: (0, import_clsx61.default)(
|
|
8805
9538
|
"rounded text-default-secondary transition-colors hover:text-brand",
|
|
8806
9539
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
8807
9540
|
className
|
|
@@ -8809,11 +9542,11 @@ var BreadcrumbItem = (0, import_react62.forwardRef)(
|
|
|
8809
9542
|
...rest,
|
|
8810
9543
|
children
|
|
8811
9544
|
}
|
|
8812
|
-
) : /* @__PURE__ */ (0,
|
|
9545
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8813
9546
|
"a",
|
|
8814
9547
|
{
|
|
8815
9548
|
ref,
|
|
8816
|
-
className: (0,
|
|
9549
|
+
className: (0, import_clsx61.default)(
|
|
8817
9550
|
"rounded text-default-secondary transition-colors hover:text-brand",
|
|
8818
9551
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
8819
9552
|
className
|
|
@@ -8825,16 +9558,16 @@ var BreadcrumbItem = (0, import_react62.forwardRef)(
|
|
|
8825
9558
|
] });
|
|
8826
9559
|
}
|
|
8827
9560
|
);
|
|
8828
|
-
var BreadcrumbEllipsis = (0,
|
|
9561
|
+
var BreadcrumbEllipsis = (0, import_react65.forwardRef)(
|
|
8829
9562
|
function BreadcrumbEllipsis2({ className, ...rest }, ref) {
|
|
8830
|
-
return /* @__PURE__ */ (0,
|
|
8831
|
-
/* @__PURE__ */ (0,
|
|
8832
|
-
/* @__PURE__ */ (0,
|
|
9563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("li", { className: "flex items-center gap-1.5", children: [
|
|
9564
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react27.ChevronRightIcon, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
9565
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8833
9566
|
"span",
|
|
8834
9567
|
{
|
|
8835
9568
|
ref,
|
|
8836
9569
|
"aria-label": "Collapsed items",
|
|
8837
|
-
className: (0,
|
|
9570
|
+
className: (0, import_clsx61.default)("px-0.5 text-default-tertiary", className),
|
|
8838
9571
|
...rest,
|
|
8839
9572
|
children: "\u2026"
|
|
8840
9573
|
}
|
|
@@ -8844,10 +9577,10 @@ var BreadcrumbEllipsis = (0, import_react62.forwardRef)(
|
|
|
8844
9577
|
);
|
|
8845
9578
|
|
|
8846
9579
|
// src/components/chrome/pagination.tsx
|
|
8847
|
-
var
|
|
8848
|
-
var
|
|
8849
|
-
var
|
|
8850
|
-
var
|
|
9580
|
+
var import_react66 = require("react");
|
|
9581
|
+
var import_clsx62 = __toESM(require("clsx"), 1);
|
|
9582
|
+
var import_lucide_react28 = require("lucide-react");
|
|
9583
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8851
9584
|
var GAP4 = "\u2026";
|
|
8852
9585
|
function paginationRange(page, pageCount, siblingCount = 1) {
|
|
8853
9586
|
const totalSlots = siblingCount * 2 + 5;
|
|
@@ -8874,13 +9607,13 @@ function paginationRange(page, pageCount, siblingCount = 1) {
|
|
|
8874
9607
|
pageCount
|
|
8875
9608
|
];
|
|
8876
9609
|
}
|
|
8877
|
-
var ARROW_BASE = (0,
|
|
9610
|
+
var ARROW_BASE = (0, import_clsx62.default)(
|
|
8878
9611
|
"inline-flex size-9 shrink-0 items-center justify-center rounded-lg border transition-colors",
|
|
8879
9612
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
8880
9613
|
"disabled:cursor-not-allowed disabled:border-disabled disabled:bg-disabled disabled:text-disabled",
|
|
8881
9614
|
"border-default bg-default text-default hover:bg-default-secondary hover:text-brand"
|
|
8882
9615
|
);
|
|
8883
|
-
var Pagination = (0,
|
|
9616
|
+
var Pagination = (0, import_react66.forwardRef)(function Pagination2({
|
|
8884
9617
|
page,
|
|
8885
9618
|
pageCount,
|
|
8886
9619
|
onPageChange,
|
|
@@ -8895,16 +9628,16 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8895
9628
|
const clamped = Math.min(Math.max(next, 1), pageCount);
|
|
8896
9629
|
if (clamped !== page) onPageChange(clamped);
|
|
8897
9630
|
};
|
|
8898
|
-
return /* @__PURE__ */ (0,
|
|
9631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8899
9632
|
"nav",
|
|
8900
9633
|
{
|
|
8901
9634
|
ref,
|
|
8902
9635
|
"aria-label": label,
|
|
8903
9636
|
"data-slot": "pagination",
|
|
8904
|
-
className: (0,
|
|
9637
|
+
className: (0, import_clsx62.default)("flex items-center gap-1.5", className),
|
|
8905
9638
|
...rest,
|
|
8906
9639
|
children: [
|
|
8907
|
-
/* @__PURE__ */ (0,
|
|
9640
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8908
9641
|
"button",
|
|
8909
9642
|
{
|
|
8910
9643
|
type: "button",
|
|
@@ -8912,26 +9645,26 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8912
9645
|
disabled: page <= 1,
|
|
8913
9646
|
onClick: () => go(page - 1),
|
|
8914
9647
|
className: ARROW_BASE,
|
|
8915
|
-
children: /* @__PURE__ */ (0,
|
|
9648
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react28.ChevronLeftIcon, { "aria-hidden": true, className: "size-4" })
|
|
8916
9649
|
}
|
|
8917
9650
|
),
|
|
8918
9651
|
type === "dots" ? (
|
|
8919
9652
|
// The dots form has no room for numbers, so the list itself is the only place the
|
|
8920
9653
|
// position can be stated — hence the live-region-free but explicitly named group.
|
|
8921
|
-
/* @__PURE__ */ (0,
|
|
9654
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8922
9655
|
"span",
|
|
8923
9656
|
{
|
|
8924
9657
|
role: "group",
|
|
8925
9658
|
"aria-label": `Page ${page} of ${pageCount}`,
|
|
8926
9659
|
className: "flex items-center gap-2 px-2",
|
|
8927
|
-
children: Array.from({ length: pageCount }, (_, i) => i + 1).map((n) => /* @__PURE__ */ (0,
|
|
9660
|
+
children: Array.from({ length: pageCount }, (_, i) => i + 1).map((n) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8928
9661
|
"button",
|
|
8929
9662
|
{
|
|
8930
9663
|
type: "button",
|
|
8931
9664
|
"aria-label": `Page ${n}`,
|
|
8932
9665
|
"aria-current": n === page ? "page" : void 0,
|
|
8933
9666
|
onClick: () => go(n),
|
|
8934
|
-
className: (0,
|
|
9667
|
+
className: (0, import_clsx62.default)(
|
|
8935
9668
|
"size-2 rounded-full transition-colors",
|
|
8936
9669
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-default",
|
|
8937
9670
|
n === page ? "bg-brand" : "bg-default-tertiary hover:bg-neutral-secondary"
|
|
@@ -8942,7 +9675,7 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8942
9675
|
}
|
|
8943
9676
|
)
|
|
8944
9677
|
) : paginationRange(page, pageCount, siblingCount).map(
|
|
8945
|
-
(entry, index) => entry === GAP4 ? /* @__PURE__ */ (0,
|
|
9678
|
+
(entry, index) => entry === GAP4 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8946
9679
|
"span",
|
|
8947
9680
|
{
|
|
8948
9681
|
"aria-hidden": true,
|
|
@@ -8950,14 +9683,14 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8950
9683
|
children: GAP4
|
|
8951
9684
|
},
|
|
8952
9685
|
`gap-${index}`
|
|
8953
|
-
) : /* @__PURE__ */ (0,
|
|
9686
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8954
9687
|
"button",
|
|
8955
9688
|
{
|
|
8956
9689
|
type: "button",
|
|
8957
9690
|
"aria-label": `Page ${entry}`,
|
|
8958
9691
|
"aria-current": entry === page ? "page" : void 0,
|
|
8959
9692
|
onClick: () => go(entry),
|
|
8960
|
-
className: (0,
|
|
9693
|
+
className: (0, import_clsx62.default)(
|
|
8961
9694
|
"inline-flex size-9 shrink-0 items-center justify-center rounded-lg border text-body-sm tabular-nums transition-colors",
|
|
8962
9695
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
8963
9696
|
entry === page ? "border-brand bg-brand font-semibold text-brand-on-brand" : "border-default bg-default text-default hover:bg-default-secondary hover:text-brand"
|
|
@@ -8967,7 +9700,7 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8967
9700
|
entry
|
|
8968
9701
|
)
|
|
8969
9702
|
),
|
|
8970
|
-
/* @__PURE__ */ (0,
|
|
9703
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8971
9704
|
"button",
|
|
8972
9705
|
{
|
|
8973
9706
|
type: "button",
|
|
@@ -8975,7 +9708,7 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8975
9708
|
disabled: page >= pageCount,
|
|
8976
9709
|
onClick: () => go(page + 1),
|
|
8977
9710
|
className: ARROW_BASE,
|
|
8978
|
-
children: /* @__PURE__ */ (0,
|
|
9711
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react28.ChevronRightIcon, { "aria-hidden": true, className: "size-4" })
|
|
8979
9712
|
}
|
|
8980
9713
|
)
|
|
8981
9714
|
]
|
|
@@ -8998,13 +9731,13 @@ function PaginationBar({
|
|
|
8998
9731
|
const to = Math.min(total, page * pageSize);
|
|
8999
9732
|
const showSize = Boolean(onPageSizeChange) && pageSizeOptions.length > 0;
|
|
9000
9733
|
const options = pageSizeOptions.includes(pageSize) ? pageSizeOptions : [...pageSizeOptions, pageSize].sort((a, b) => a - b);
|
|
9001
|
-
return /* @__PURE__ */ (0,
|
|
9734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9002
9735
|
"div",
|
|
9003
9736
|
{
|
|
9004
9737
|
"data-slot": "pagination-bar",
|
|
9005
|
-
className: (0,
|
|
9738
|
+
className: (0, import_clsx62.default)("flex flex-wrap items-center justify-between gap-x-4 gap-y-3", className),
|
|
9006
9739
|
children: [
|
|
9007
|
-
/* @__PURE__ */ (0,
|
|
9740
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-body-xs text-default-secondary", children: summary ?? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
9008
9741
|
"Showing ",
|
|
9009
9742
|
from,
|
|
9010
9743
|
"\u2013",
|
|
@@ -9012,10 +9745,10 @@ function PaginationBar({
|
|
|
9012
9745
|
" of ",
|
|
9013
9746
|
total
|
|
9014
9747
|
] }) }),
|
|
9015
|
-
/* @__PURE__ */ (0,
|
|
9016
|
-
showSize && /* @__PURE__ */ (0,
|
|
9017
|
-
/* @__PURE__ */ (0,
|
|
9018
|
-
/* @__PURE__ */ (0,
|
|
9748
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-3", children: [
|
|
9749
|
+
showSize && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9750
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { "aria-hidden": true, className: "text-body-xs text-default-secondary", children: "Rows per page" }),
|
|
9751
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9019
9752
|
SelectControl,
|
|
9020
9753
|
{
|
|
9021
9754
|
"aria-label": "Rows per page",
|
|
@@ -9027,7 +9760,7 @@ function PaginationBar({
|
|
|
9027
9760
|
}
|
|
9028
9761
|
)
|
|
9029
9762
|
] }),
|
|
9030
|
-
/* @__PURE__ */ (0,
|
|
9763
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Pagination, { page, pageCount, onPageChange, label })
|
|
9031
9764
|
] })
|
|
9032
9765
|
]
|
|
9033
9766
|
}
|
|
@@ -9035,15 +9768,15 @@ function PaginationBar({
|
|
|
9035
9768
|
}
|
|
9036
9769
|
|
|
9037
9770
|
// src/components/chrome/navigation-menu.tsx
|
|
9038
|
-
var
|
|
9039
|
-
var
|
|
9040
|
-
var
|
|
9041
|
-
var NavigationMenu = (0,
|
|
9771
|
+
var import_react67 = require("react");
|
|
9772
|
+
var import_clsx63 = __toESM(require("clsx"), 1);
|
|
9773
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9774
|
+
var NavigationMenu = (0, import_react67.forwardRef)(
|
|
9042
9775
|
function NavigationMenu2({ children, orientation = "horizontal", label, className, ...rest }, ref) {
|
|
9043
|
-
return /* @__PURE__ */ (0,
|
|
9776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("nav", { ref, "aria-label": label, "data-slot": "navigation-menu", ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9044
9777
|
"ul",
|
|
9045
9778
|
{
|
|
9046
|
-
className: (0,
|
|
9779
|
+
className: (0, import_clsx63.default)(
|
|
9047
9780
|
"flex list-none p-0",
|
|
9048
9781
|
orientation === "vertical" ? "flex-col gap-1" : "flex-row items-center gap-1",
|
|
9049
9782
|
className
|
|
@@ -9053,21 +9786,21 @@ var NavigationMenu = (0, import_react64.forwardRef)(
|
|
|
9053
9786
|
) });
|
|
9054
9787
|
}
|
|
9055
9788
|
);
|
|
9056
|
-
var NavigationMenuItem = (0,
|
|
9789
|
+
var NavigationMenuItem = (0, import_react67.forwardRef)(
|
|
9057
9790
|
function NavigationMenuItem2({ children, active = false, variant = "pill", asChild = false, icon, className, ...rest }, ref) {
|
|
9058
|
-
const content = /* @__PURE__ */ (0,
|
|
9059
|
-
icon && /* @__PURE__ */ (0,
|
|
9060
|
-
/* @__PURE__ */ (0,
|
|
9791
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
9792
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { "aria-hidden": true, className: "shrink-0 [&_svg]:size-4", children: icon }),
|
|
9793
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "min-w-0 truncate", children })
|
|
9061
9794
|
] });
|
|
9062
9795
|
const linkProps = {
|
|
9063
9796
|
"aria-current": active ? "page" : void 0,
|
|
9064
|
-
className: (0,
|
|
9797
|
+
className: (0, import_clsx63.default)(
|
|
9065
9798
|
"inline-flex items-center gap-2 whitespace-nowrap transition-colors",
|
|
9066
9799
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
9067
|
-
variant === "pill" ? (0,
|
|
9800
|
+
variant === "pill" ? (0, import_clsx63.default)(
|
|
9068
9801
|
"rounded-lg px-3 py-1.5 text-body-xs font-medium",
|
|
9069
9802
|
active ? "bg-brand text-brand-on-brand" : "text-default-secondary hover:bg-default-secondary hover:text-default"
|
|
9070
|
-
) : (0,
|
|
9803
|
+
) : (0, import_clsx63.default)(
|
|
9071
9804
|
"rounded px-1 py-0.5 text-body-sm",
|
|
9072
9805
|
active ? "font-semibold text-brand" : "text-default-secondary hover:text-default"
|
|
9073
9806
|
),
|
|
@@ -9075,14 +9808,14 @@ var NavigationMenuItem = (0, import_react64.forwardRef)(
|
|
|
9075
9808
|
),
|
|
9076
9809
|
...rest
|
|
9077
9810
|
};
|
|
9078
|
-
return /* @__PURE__ */ (0,
|
|
9811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("li", { children: asChild ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Slot, { wrapChildren: () => content, ...linkProps, children }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("a", { ref, ...linkProps, children: content }) });
|
|
9079
9812
|
}
|
|
9080
9813
|
);
|
|
9081
9814
|
|
|
9082
9815
|
// src/components/chrome/typography.tsx
|
|
9083
|
-
var
|
|
9084
|
-
var
|
|
9085
|
-
var
|
|
9816
|
+
var import_react68 = require("react");
|
|
9817
|
+
var import_clsx64 = __toESM(require("clsx"), 1);
|
|
9818
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9086
9819
|
var TONE2 = {
|
|
9087
9820
|
default: "text-default",
|
|
9088
9821
|
muted: "text-default-secondary",
|
|
@@ -9093,9 +9826,9 @@ var TONE2 = {
|
|
|
9093
9826
|
danger: "text-danger"
|
|
9094
9827
|
};
|
|
9095
9828
|
function textComponent(displayName, defaultElement, classes) {
|
|
9096
|
-
const Component2 = (0,
|
|
9829
|
+
const Component2 = (0, import_react68.forwardRef)(function TextComponent({ children, asChild = false, tone, className, ...rest }, ref) {
|
|
9097
9830
|
const Root = asChild ? Slot : defaultElement;
|
|
9098
|
-
return /* @__PURE__ */ (0,
|
|
9831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9099
9832
|
Root,
|
|
9100
9833
|
{
|
|
9101
9834
|
ref,
|
|
@@ -9125,8 +9858,8 @@ var TitlePage = textComponent("TitlePage", "h1", "text-title font-bold text-defa
|
|
|
9125
9858
|
var Subtitle = textComponent("Subtitle", "p", "text-subtitle text-default-secondary");
|
|
9126
9859
|
var Heading = textComponent("Heading", "h2", "text-heading font-semibold text-default");
|
|
9127
9860
|
var Subheading = textComponent("Subheading", "h3", "text-subheading text-default");
|
|
9128
|
-
var Blockquote = (0,
|
|
9129
|
-
return /* @__PURE__ */ (0,
|
|
9861
|
+
var Blockquote = (0, import_react68.forwardRef)(function Blockquote2({ children, cite, tone, className, ...rest }, ref) {
|
|
9862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9130
9863
|
"blockquote",
|
|
9131
9864
|
{
|
|
9132
9865
|
ref,
|
|
@@ -9142,15 +9875,20 @@ var Blockquote = (0, import_react65.forwardRef)(function Blockquote2({ children,
|
|
|
9142
9875
|
}
|
|
9143
9876
|
);
|
|
9144
9877
|
});
|
|
9145
|
-
var
|
|
9878
|
+
var TEXT_LINK_TONE = {
|
|
9879
|
+
brand: "text-brand underline decoration-1 hover:text-brand-secondary",
|
|
9880
|
+
neutral: "text-default no-underline decoration-1 hover:underline"
|
|
9881
|
+
};
|
|
9882
|
+
var TextLink = (0, import_react68.forwardRef)(function TextLink2({ children, asChild = false, tone = "brand", className, ...rest }, ref) {
|
|
9146
9883
|
const Root = asChild ? Slot : "a";
|
|
9147
|
-
return /* @__PURE__ */ (0,
|
|
9884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9148
9885
|
Root,
|
|
9149
9886
|
{
|
|
9150
9887
|
ref,
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
"
|
|
9888
|
+
"data-tone": tone,
|
|
9889
|
+
className: (0, import_clsx64.default)(
|
|
9890
|
+
"rounded underline-offset-2 transition-colors",
|
|
9891
|
+
TEXT_LINK_TONE[tone],
|
|
9154
9892
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
9155
9893
|
className
|
|
9156
9894
|
),
|
|
@@ -9164,13 +9902,13 @@ var LIST_MARKER = {
|
|
|
9164
9902
|
numbered: "list-decimal pl-5",
|
|
9165
9903
|
plain: "list-none pl-0"
|
|
9166
9904
|
};
|
|
9167
|
-
var TextList = (0,
|
|
9905
|
+
var TextList = (0, import_react68.forwardRef)(function TextList2({ children, variant = "bulleted", density = "default", className, ...rest }, ref) {
|
|
9168
9906
|
const Root = variant === "numbered" ? "ol" : "ul";
|
|
9169
|
-
return /* @__PURE__ */ (0,
|
|
9907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9170
9908
|
Root,
|
|
9171
9909
|
{
|
|
9172
9910
|
ref,
|
|
9173
|
-
className: (0,
|
|
9911
|
+
className: (0, import_clsx64.default)(
|
|
9174
9912
|
"text-body text-default",
|
|
9175
9913
|
LIST_MARKER[variant],
|
|
9176
9914
|
density === "compact" ? "space-y-0.5" : "space-y-1.5",
|
|
@@ -9181,17 +9919,17 @@ var TextList = (0, import_react65.forwardRef)(function TextList2({ children, var
|
|
|
9181
9919
|
}
|
|
9182
9920
|
);
|
|
9183
9921
|
});
|
|
9184
|
-
var TextListItem = (0,
|
|
9185
|
-
return /* @__PURE__ */ (0,
|
|
9922
|
+
var TextListItem = (0, import_react68.forwardRef)(function TextListItem2({ children, className, ...rest }, ref) {
|
|
9923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { ref, className: (0, import_clsx64.default)("text-body text-default", className), ...rest, children });
|
|
9186
9924
|
});
|
|
9187
9925
|
|
|
9188
9926
|
// src/components/widgets/widget-header.tsx
|
|
9189
|
-
var
|
|
9190
|
-
var
|
|
9927
|
+
var import_react69 = require("react");
|
|
9928
|
+
var import_clsx66 = __toESM(require("clsx"), 1);
|
|
9191
9929
|
|
|
9192
9930
|
// src/components/widgets/widget-title.tsx
|
|
9193
|
-
var
|
|
9194
|
-
var
|
|
9931
|
+
var import_clsx65 = __toESM(require("clsx"), 1);
|
|
9932
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
9195
9933
|
var sizeStyles6 = {
|
|
9196
9934
|
sm: "text-subheading-sm font-semibold leading-none",
|
|
9197
9935
|
// Was `text-[18px]`, which had no step on the type scale (Scale 04 = 16, Scale 05 = 20).
|
|
@@ -9201,17 +9939,17 @@ var sizeStyles6 = {
|
|
|
9201
9939
|
lg: "text-subheading font-semibold leading-[1.2]"
|
|
9202
9940
|
};
|
|
9203
9941
|
function WidgetTitle({ children, size: size2 = "sm", className }) {
|
|
9204
|
-
return /* @__PURE__ */ (0,
|
|
9942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h3", { className: (0, import_clsx65.default)(sizeStyles6[size2], "text-default", className), children });
|
|
9205
9943
|
}
|
|
9206
9944
|
|
|
9207
9945
|
// src/components/widgets/widget-header.tsx
|
|
9208
|
-
var
|
|
9209
|
-
var WidgetHeaderAccessoryContext = (0,
|
|
9946
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
9947
|
+
var WidgetHeaderAccessoryContext = (0, import_react69.createContext)(null);
|
|
9210
9948
|
function WidgetHeaderAccessoryProvider({ accessory, children }) {
|
|
9211
|
-
return /* @__PURE__ */ (0,
|
|
9949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(WidgetHeaderAccessoryContext.Provider, { value: accessory, children });
|
|
9212
9950
|
}
|
|
9213
9951
|
function useWidgetHeaderAccessory() {
|
|
9214
|
-
return (0,
|
|
9952
|
+
return (0, import_react69.useContext)(WidgetHeaderAccessoryContext);
|
|
9215
9953
|
}
|
|
9216
9954
|
var eyebrowStyles = {
|
|
9217
9955
|
uppercase: "text-body-tiny font-medium uppercase tracking-[0.66px] text-default-secondary",
|
|
@@ -9230,13 +9968,13 @@ function WidgetHeader({
|
|
|
9230
9968
|
}) {
|
|
9231
9969
|
const provided = useWidgetHeaderAccessory();
|
|
9232
9970
|
const accessory = accessoryProp !== void 0 ? accessoryProp : provided;
|
|
9233
|
-
return /* @__PURE__ */ (0,
|
|
9234
|
-
/* @__PURE__ */ (0,
|
|
9235
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
9236
|
-
/* @__PURE__ */ (0,
|
|
9237
|
-
subtitle && /* @__PURE__ */ (0,
|
|
9971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_clsx66.default)("flex items-start justify-between gap-2", className), children: [
|
|
9972
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
9973
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: eyebrowStyles[eyebrowVariant], children: eyebrow }),
|
|
9974
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(WidgetTitle, { size: titleSize, children: title }),
|
|
9975
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "mt-1 text-body-xs text-default-secondary leading-snug", children: subtitle })
|
|
9238
9976
|
] }),
|
|
9239
|
-
/* @__PURE__ */ (0,
|
|
9977
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
9240
9978
|
badge,
|
|
9241
9979
|
action,
|
|
9242
9980
|
accessory
|
|
@@ -9245,24 +9983,24 @@ function WidgetHeader({
|
|
|
9245
9983
|
}
|
|
9246
9984
|
|
|
9247
9985
|
// src/components/widgets/widget-footer.tsx
|
|
9248
|
-
var
|
|
9249
|
-
var
|
|
9986
|
+
var import_clsx67 = __toESM(require("clsx"), 1);
|
|
9987
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
9250
9988
|
function WidgetFooter({ caption, subcaption, action, className }) {
|
|
9251
|
-
return /* @__PURE__ */ (0,
|
|
9252
|
-
caption && /* @__PURE__ */ (0,
|
|
9253
|
-
/* @__PURE__ */ (0,
|
|
9254
|
-
/* @__PURE__ */ (0,
|
|
9255
|
-
/* @__PURE__ */ (0,
|
|
9256
|
-
subcaption && /* @__PURE__ */ (0,
|
|
9989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: (0, import_clsx67.default)("flex items-center gap-3", className), children: [
|
|
9990
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex items-stretch gap-3 flex-1 min-w-0", children: [
|
|
9991
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "w-0.5 shrink-0 self-stretch rounded-full bg-brand" }),
|
|
9992
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "min-w-0", children: [
|
|
9993
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "text-body-sm font-medium text-default leading-snug", children: caption }),
|
|
9994
|
+
subcaption && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: subcaption })
|
|
9257
9995
|
] })
|
|
9258
9996
|
] }),
|
|
9259
|
-
action && /* @__PURE__ */ (0,
|
|
9997
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "ml-auto shrink-0", children: action })
|
|
9260
9998
|
] });
|
|
9261
9999
|
}
|
|
9262
10000
|
|
|
9263
10001
|
// src/components/widgets/widget-grid.tsx
|
|
9264
|
-
var
|
|
9265
|
-
var
|
|
10002
|
+
var import_clsx68 = __toESM(require("clsx"), 1);
|
|
10003
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9266
10004
|
var COL_SPAN = {
|
|
9267
10005
|
tiny: "col-span-6 lg:col-span-3",
|
|
9268
10006
|
small: "col-span-12 lg:col-span-4",
|
|
@@ -9281,18 +10019,18 @@ var HEIGHT_PX = {
|
|
|
9281
10019
|
large: 752
|
|
9282
10020
|
};
|
|
9283
10021
|
function WidgetGrid({ children, className }) {
|
|
9284
|
-
return /* @__PURE__ */ (0,
|
|
10022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: cn("flex w-full flex-col gap-3 lg:gap-6", className), children });
|
|
9285
10023
|
}
|
|
9286
10024
|
function WidgetGridRow({ children, className }) {
|
|
9287
|
-
return /* @__PURE__ */ (0,
|
|
10025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: cn("grid grid-cols-12 items-start gap-3 lg:gap-6", className), children });
|
|
9288
10026
|
}
|
|
9289
10027
|
function WidgetGridItem({ size: size2, height, className, ...rest }) {
|
|
9290
|
-
return /* @__PURE__ */ (0,
|
|
10028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9291
10029
|
"div",
|
|
9292
10030
|
{
|
|
9293
10031
|
"data-size": size2,
|
|
9294
10032
|
"data-height": height,
|
|
9295
|
-
className: cn(COL_SPAN[size2], height && (0,
|
|
10033
|
+
className: cn(COL_SPAN[size2], height && (0, import_clsx68.default)(HEIGHT_CLASS[height], "min-h-0"), className),
|
|
9296
10034
|
...rest
|
|
9297
10035
|
}
|
|
9298
10036
|
);
|
|
@@ -9355,23 +10093,23 @@ function slotWidthPx(gridWidthPx, columnGapPx, cols) {
|
|
|
9355
10093
|
}
|
|
9356
10094
|
|
|
9357
10095
|
// src/lib/use-width-tier.ts
|
|
9358
|
-
var
|
|
9359
|
-
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ?
|
|
10096
|
+
var import_react70 = require("react");
|
|
10097
|
+
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? import_react70.useEffect : import_react70.useLayoutEffect;
|
|
9360
10098
|
var TIER_SETTLE_MS = 200;
|
|
9361
10099
|
function useWidthTier({ frozen = false } = {}) {
|
|
9362
|
-
const [node, setNode] = (0,
|
|
9363
|
-
const [{ widthPx, tier }, setMeasured] = (0,
|
|
10100
|
+
const [node, setNode] = (0, import_react70.useState)(null);
|
|
10101
|
+
const [{ widthPx, tier }, setMeasured] = (0, import_react70.useState)({
|
|
9364
10102
|
widthPx: null,
|
|
9365
10103
|
tier: "wide"
|
|
9366
10104
|
});
|
|
9367
|
-
const observed = (0,
|
|
9368
|
-
const frozenRef = (0,
|
|
10105
|
+
const observed = (0, import_react70.useRef)(null);
|
|
10106
|
+
const frozenRef = (0, import_react70.useRef)(frozen);
|
|
9369
10107
|
frozenRef.current = frozen;
|
|
9370
|
-
const tierRef = (0,
|
|
10108
|
+
const tierRef = (0, import_react70.useRef)(tier);
|
|
9371
10109
|
tierRef.current = tier;
|
|
9372
|
-
const widthRef = (0,
|
|
10110
|
+
const widthRef = (0, import_react70.useRef)(widthPx);
|
|
9373
10111
|
widthRef.current = widthPx;
|
|
9374
|
-
const commit = (0,
|
|
10112
|
+
const commit = (0, import_react70.useCallback)(() => {
|
|
9375
10113
|
const raw = observed.current;
|
|
9376
10114
|
if (raw === null || raw <= 0 || frozenRef.current) return;
|
|
9377
10115
|
const next = quantizeWidth(raw);
|
|
@@ -9403,15 +10141,15 @@ function useWidthTier({ frozen = false } = {}) {
|
|
|
9403
10141
|
if (timer) clearTimeout(timer);
|
|
9404
10142
|
};
|
|
9405
10143
|
}, [node, commit]);
|
|
9406
|
-
(0,
|
|
10144
|
+
(0, import_react70.useEffect)(() => {
|
|
9407
10145
|
if (!frozen) commit();
|
|
9408
10146
|
}, [frozen, commit]);
|
|
9409
10147
|
return { ref: setNode, widthPx, tier };
|
|
9410
10148
|
}
|
|
9411
10149
|
|
|
9412
10150
|
// src/components/stats/stat-tile.tsx
|
|
9413
|
-
var
|
|
9414
|
-
var
|
|
10151
|
+
var import_clsx69 = __toESM(require("clsx"), 1);
|
|
10152
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
9415
10153
|
var DOT_TONE = {
|
|
9416
10154
|
neutral: "bg-status-dot-neutral",
|
|
9417
10155
|
info: "bg-status-dot-info",
|
|
@@ -9436,20 +10174,20 @@ function StatTile({
|
|
|
9436
10174
|
}) {
|
|
9437
10175
|
const showDot = Boolean(tone || dotColor);
|
|
9438
10176
|
const interactive = Boolean(onClick) || asChild;
|
|
9439
|
-
const content = /* @__PURE__ */ (0,
|
|
9440
|
-
/* @__PURE__ */ (0,
|
|
9441
|
-
showDot && /* @__PURE__ */ (0,
|
|
10177
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
10178
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
10179
|
+
showDot && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
9442
10180
|
"span",
|
|
9443
10181
|
{
|
|
9444
10182
|
"aria-hidden": true,
|
|
9445
|
-
className: (0,
|
|
10183
|
+
className: (0, import_clsx69.default)("size-2 shrink-0 rounded-full", tone && DOT_TONE[tone]),
|
|
9446
10184
|
style: tone ? void 0 : { backgroundColor: dotColor }
|
|
9447
10185
|
}
|
|
9448
10186
|
),
|
|
9449
|
-
/* @__PURE__ */ (0,
|
|
10187
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-body-xs font-medium text-default-secondary whitespace-nowrap", children: label })
|
|
9450
10188
|
] }),
|
|
9451
|
-
/* @__PURE__ */ (0,
|
|
9452
|
-
hint && /* @__PURE__ */ (0,
|
|
10189
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-heading font-semibold text-default leading-none", children: value }),
|
|
10190
|
+
hint && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-body-tiny text-default-secondary", children: hint })
|
|
9453
10191
|
] });
|
|
9454
10192
|
const rootProps = {
|
|
9455
10193
|
"data-state": selected ? "selected" : void 0,
|
|
@@ -9464,18 +10202,18 @@ function StatTile({
|
|
|
9464
10202
|
return (
|
|
9465
10203
|
// A link to a filtered view is the current one, not a pressed toggle: `aria-pressed` is
|
|
9466
10204
|
// only valid on a button.
|
|
9467
|
-
/* @__PURE__ */ (0,
|
|
10205
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Slot, { ...rootProps, "aria-current": selected ? "true" : void 0, wrapChildren: () => content, children })
|
|
9468
10206
|
);
|
|
9469
10207
|
}
|
|
9470
10208
|
if (onClick) {
|
|
9471
|
-
return /* @__PURE__ */ (0,
|
|
10209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("button", { type: "button", "aria-pressed": selected ?? false, onClick, ...rootProps, children: content });
|
|
9472
10210
|
}
|
|
9473
|
-
return /* @__PURE__ */ (0,
|
|
10211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { ...rootProps, children: content });
|
|
9474
10212
|
}
|
|
9475
10213
|
|
|
9476
10214
|
// src/components/stats/stat-number.tsx
|
|
9477
|
-
var
|
|
9478
|
-
var
|
|
10215
|
+
var import_clsx70 = __toESM(require("clsx"), 1);
|
|
10216
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
9479
10217
|
var sizeStyles7 = {
|
|
9480
10218
|
sm: "text-subtitle",
|
|
9481
10219
|
md: "text-subtitle-lg",
|
|
@@ -9486,22 +10224,22 @@ var weightStyles = {
|
|
|
9486
10224
|
bold: "font-bold"
|
|
9487
10225
|
};
|
|
9488
10226
|
function StatNumber({ value, unit, size: size2 = "md", weight = "bold", color, className }) {
|
|
9489
|
-
return /* @__PURE__ */ (0,
|
|
10227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
9490
10228
|
"p",
|
|
9491
10229
|
{
|
|
9492
|
-
className: (0,
|
|
10230
|
+
className: (0, import_clsx70.default)(sizeStyles7[size2], weightStyles[weight], "leading-none", !color && "text-default", className),
|
|
9493
10231
|
style: color ? { color } : void 0,
|
|
9494
10232
|
children: [
|
|
9495
10233
|
value,
|
|
9496
|
-
unit && /* @__PURE__ */ (0,
|
|
10234
|
+
unit && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ml-1 text-subheading font-medium text-default-secondary", children: unit })
|
|
9497
10235
|
]
|
|
9498
10236
|
}
|
|
9499
10237
|
);
|
|
9500
10238
|
}
|
|
9501
10239
|
|
|
9502
10240
|
// src/components/stats/score-value.tsx
|
|
9503
|
-
var
|
|
9504
|
-
var
|
|
10241
|
+
var import_clsx71 = __toESM(require("clsx"), 1);
|
|
10242
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
9505
10243
|
var DEFAULT_SCORE_THRESHOLDS = { danger: 80, warning: 65, neutral: 50 };
|
|
9506
10244
|
function getScoreTone(score, {
|
|
9507
10245
|
direction = "higher-is-worse",
|
|
@@ -9545,15 +10283,15 @@ function ScoreValue({
|
|
|
9545
10283
|
}) {
|
|
9546
10284
|
const numeric = typeof value === "number" ? value : Number(value);
|
|
9547
10285
|
const resolved = tone === "auto" ? Number.isFinite(numeric) ? getScoreTone(numeric, { direction, thresholds }) : "default" : tone;
|
|
9548
|
-
return /* @__PURE__ */ (0,
|
|
9549
|
-
/* @__PURE__ */ (0,
|
|
9550
|
-
label && /* @__PURE__ */ (0,
|
|
10286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("span", { "data-tone": resolved, className: (0, import_clsx71.default)("inline-flex items-baseline gap-1", className), children: [
|
|
10287
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: (0, import_clsx71.default)(SIZE11[size2], WEIGHT[weight], TONE3[resolved]), children: value }),
|
|
10288
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "text-body-xs text-default-secondary whitespace-nowrap", children: label })
|
|
9551
10289
|
] });
|
|
9552
10290
|
}
|
|
9553
10291
|
|
|
9554
10292
|
// src/components/stats/tile-grid.tsx
|
|
9555
|
-
var
|
|
9556
|
-
var
|
|
10293
|
+
var import_clsx72 = __toESM(require("clsx"), 1);
|
|
10294
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
9557
10295
|
var COLUMNS2 = {
|
|
9558
10296
|
sm: {
|
|
9559
10297
|
2: "grid-cols-2",
|
|
@@ -9583,7 +10321,7 @@ function TileGrid({
|
|
|
9583
10321
|
at = "lg",
|
|
9584
10322
|
className
|
|
9585
10323
|
}) {
|
|
9586
|
-
return /* @__PURE__ */ (0,
|
|
10324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_clsx72.default)("grid gap-3", COLUMNS2[at][columns], className), children });
|
|
9587
10325
|
}
|
|
9588
10326
|
|
|
9589
10327
|
// src/components/charts/chart-tone.ts
|
|
@@ -9604,8 +10342,8 @@ function resolveChartColor(color, tone, index = 0) {
|
|
|
9604
10342
|
}
|
|
9605
10343
|
|
|
9606
10344
|
// src/components/charts/bar-chart.tsx
|
|
9607
|
-
var
|
|
9608
|
-
var
|
|
10345
|
+
var import_clsx73 = __toESM(require("clsx"), 1);
|
|
10346
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
9609
10347
|
var SIZE12 = {
|
|
9610
10348
|
sm: { band: 14, gap: 6, label: "text-body-tiny" },
|
|
9611
10349
|
md: { band: 20, gap: 8, label: "text-body-xs" },
|
|
@@ -9632,10 +10370,10 @@ function BarChart({
|
|
|
9632
10370
|
);
|
|
9633
10371
|
const max = Math.max(...categoryTotals, 1);
|
|
9634
10372
|
const horizontal = orientation === "horizontal";
|
|
9635
|
-
return /* @__PURE__ */ (0,
|
|
10373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9636
10374
|
"div",
|
|
9637
10375
|
{
|
|
9638
|
-
className: (0,
|
|
10376
|
+
className: (0, import_clsx73.default)("flex w-full min-w-0", horizontal ? "flex-col gap-2" : "flex-row items-end gap-3", className),
|
|
9639
10377
|
role: label ? "img" : void 0,
|
|
9640
10378
|
"aria-label": label,
|
|
9641
10379
|
"aria-hidden": label ? void 0 : true,
|
|
@@ -9645,23 +10383,23 @@ function BarChart({
|
|
|
9645
10383
|
value: Math.max(0, s.values[ci] ?? 0),
|
|
9646
10384
|
color: resolveChartColor(s.color, s.tone, si)
|
|
9647
10385
|
}));
|
|
9648
|
-
return /* @__PURE__ */ (0,
|
|
10386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
9649
10387
|
"div",
|
|
9650
10388
|
{
|
|
9651
|
-
className: (0,
|
|
10389
|
+
className: (0, import_clsx73.default)("flex min-w-0", horizontal ? "flex-col gap-1" : "h-full flex-col justify-end gap-1.5"),
|
|
9652
10390
|
style: horizontal ? void 0 : { width: perCategory },
|
|
9653
10391
|
children: [
|
|
9654
|
-
showLabels && horizontal && /* @__PURE__ */ (0,
|
|
9655
|
-
/* @__PURE__ */ (0,
|
|
10392
|
+
showLabels && horizontal && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: (0, import_clsx73.default)("truncate text-default-secondary", labelClass2), children: category }),
|
|
10393
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
9656
10394
|
"div",
|
|
9657
10395
|
{
|
|
9658
|
-
className: (0,
|
|
10396
|
+
className: (0, import_clsx73.default)("flex", horizontal ? "items-center gap-2" : "w-full flex-1 items-end justify-center"),
|
|
9659
10397
|
style: horizontal ? void 0 : { height: length },
|
|
9660
10398
|
children: [
|
|
9661
|
-
/* @__PURE__ */ (0,
|
|
10399
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9662
10400
|
"div",
|
|
9663
10401
|
{
|
|
9664
|
-
className: (0,
|
|
10402
|
+
className: (0, import_clsx73.default)("flex min-w-0", stacked ? "gap-0" : ""),
|
|
9665
10403
|
style: horizontal ? { width: length, flexDirection: stacked ? "row" : "column", gap: stacked ? 0 : gap } : {
|
|
9666
10404
|
height: "100%",
|
|
9667
10405
|
width: perCategory,
|
|
@@ -9671,7 +10409,7 @@ function BarChart({
|
|
|
9671
10409
|
},
|
|
9672
10410
|
children: bars.map((bar) => {
|
|
9673
10411
|
const extent = `${bar.value / max * 100}%`;
|
|
9674
|
-
return /* @__PURE__ */ (0,
|
|
10412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9675
10413
|
"div",
|
|
9676
10414
|
{
|
|
9677
10415
|
title: `${category} \xB7 ${bar.key}: ${bar.value}`,
|
|
@@ -9687,11 +10425,11 @@ function BarChart({
|
|
|
9687
10425
|
})
|
|
9688
10426
|
}
|
|
9689
10427
|
),
|
|
9690
|
-
showValues && horizontal && /* @__PURE__ */ (0,
|
|
10428
|
+
showValues && horizontal && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: (0, import_clsx73.default)("shrink-0 tabular-nums text-default-secondary", labelClass2), children: categoryTotals[ci] })
|
|
9691
10429
|
]
|
|
9692
10430
|
}
|
|
9693
10431
|
),
|
|
9694
|
-
showLabels && !horizontal && /* @__PURE__ */ (0,
|
|
10432
|
+
showLabels && !horizontal && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: (0, import_clsx73.default)("truncate text-center text-default-secondary", labelClass2), children: category })
|
|
9695
10433
|
]
|
|
9696
10434
|
},
|
|
9697
10435
|
category
|
|
@@ -9702,8 +10440,8 @@ function BarChart({
|
|
|
9702
10440
|
}
|
|
9703
10441
|
|
|
9704
10442
|
// src/components/charts/donut-chart.tsx
|
|
9705
|
-
var
|
|
9706
|
-
var
|
|
10443
|
+
var import_clsx74 = __toESM(require("clsx"), 1);
|
|
10444
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
9707
10445
|
var SIZE13 = {
|
|
9708
10446
|
sm: { box: 88, thickness: 10 },
|
|
9709
10447
|
md: { box: 128, thickness: 14 },
|
|
@@ -9727,8 +10465,8 @@ function DonutChart({
|
|
|
9727
10465
|
const visible = segments.filter((s) => s.value > 0);
|
|
9728
10466
|
const gapLength = visible.length > 1 ? gap / 360 * circumference : 0;
|
|
9729
10467
|
let offset2 = 0;
|
|
9730
|
-
return /* @__PURE__ */ (0,
|
|
9731
|
-
/* @__PURE__ */ (0,
|
|
10468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: (0, import_clsx74.default)("relative inline-flex shrink-0 items-center justify-center", className), children: [
|
|
10469
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
9732
10470
|
"svg",
|
|
9733
10471
|
{
|
|
9734
10472
|
width: box,
|
|
@@ -9739,7 +10477,7 @@ function DonutChart({
|
|
|
9739
10477
|
"aria-hidden": label ? void 0 : true,
|
|
9740
10478
|
className: "block -rotate-90",
|
|
9741
10479
|
children: [
|
|
9742
|
-
/* @__PURE__ */ (0,
|
|
10480
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("circle", { cx: box / 2, cy: box / 2, r: radius, fill: "none", stroke: CHART_TRACK, strokeWidth: ring }),
|
|
9743
10481
|
total > 0 && segments.map((segment, i) => {
|
|
9744
10482
|
const fraction = Math.max(0, segment.value) / total;
|
|
9745
10483
|
const length = Math.max(0, fraction * circumference - gapLength);
|
|
@@ -9747,7 +10485,7 @@ function DonutChart({
|
|
|
9747
10485
|
const thisOffset = offset2;
|
|
9748
10486
|
offset2 += fraction * circumference;
|
|
9749
10487
|
if (segment.value <= 0) return null;
|
|
9750
|
-
return /* @__PURE__ */ (0,
|
|
10488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9751
10489
|
"circle",
|
|
9752
10490
|
{
|
|
9753
10491
|
cx: box / 2,
|
|
@@ -9766,16 +10504,16 @@ function DonutChart({
|
|
|
9766
10504
|
]
|
|
9767
10505
|
}
|
|
9768
10506
|
),
|
|
9769
|
-
(centerValue != null || centerLabel != null) && /* @__PURE__ */ (0,
|
|
9770
|
-
centerValue != null && /* @__PURE__ */ (0,
|
|
9771
|
-
centerLabel != null && /* @__PURE__ */ (0,
|
|
10507
|
+
(centerValue != null || centerLabel != null) && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: [
|
|
10508
|
+
centerValue != null && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "text-subheading-sm font-bold leading-none text-default", children: centerValue }),
|
|
10509
|
+
centerLabel != null && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "mt-0.5 text-body-tiny text-default-secondary", children: centerLabel })
|
|
9772
10510
|
] })
|
|
9773
10511
|
] });
|
|
9774
10512
|
}
|
|
9775
10513
|
|
|
9776
10514
|
// src/components/charts/radial-gauge.tsx
|
|
9777
|
-
var
|
|
9778
|
-
var
|
|
10515
|
+
var import_clsx75 = __toESM(require("clsx"), 1);
|
|
10516
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
9779
10517
|
var SIZE14 = {
|
|
9780
10518
|
sm: { box: 72, thickness: 8, value: "text-body-sm" },
|
|
9781
10519
|
md: { box: 104, thickness: 11, value: "text-subheading-sm" },
|
|
@@ -9804,8 +10542,8 @@ function RadialGauge({
|
|
|
9804
10542
|
const fraction = max > 0 ? Math.min(1, Math.max(0, value / max)) : 0;
|
|
9805
10543
|
const stroke = resolveChartColor(color, tone);
|
|
9806
10544
|
const rotation = -90 + (360 - clampedSweep) / 2;
|
|
9807
|
-
return /* @__PURE__ */ (0,
|
|
9808
|
-
/* @__PURE__ */ (0,
|
|
10545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: (0, import_clsx75.default)("relative inline-flex shrink-0 items-center justify-center", className), children: [
|
|
10546
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
9809
10547
|
"svg",
|
|
9810
10548
|
{
|
|
9811
10549
|
width: box,
|
|
@@ -9817,7 +10555,7 @@ function RadialGauge({
|
|
|
9817
10555
|
className: "block",
|
|
9818
10556
|
style: { transform: `rotate(${rotation}deg)` },
|
|
9819
10557
|
children: [
|
|
9820
|
-
/* @__PURE__ */ (0,
|
|
10558
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9821
10559
|
"circle",
|
|
9822
10560
|
{
|
|
9823
10561
|
cx: box / 2,
|
|
@@ -9830,7 +10568,7 @@ function RadialGauge({
|
|
|
9830
10568
|
strokeLinecap: "round"
|
|
9831
10569
|
}
|
|
9832
10570
|
),
|
|
9833
|
-
/* @__PURE__ */ (0,
|
|
10571
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9834
10572
|
"circle",
|
|
9835
10573
|
{
|
|
9836
10574
|
cx: box / 2,
|
|
@@ -9847,17 +10585,17 @@ function RadialGauge({
|
|
|
9847
10585
|
]
|
|
9848
10586
|
}
|
|
9849
10587
|
),
|
|
9850
|
-
/* @__PURE__ */ (0,
|
|
9851
|
-
children === void 0 ? /* @__PURE__ */ (0,
|
|
9852
|
-
centerLabel != null && /* @__PURE__ */ (0,
|
|
10588
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: [
|
|
10589
|
+
children === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: (0, import_clsx75.default)("font-bold leading-none text-default", preset.value), children: value }) : children,
|
|
10590
|
+
centerLabel != null && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "mt-0.5 text-body-tiny text-default-secondary", children: centerLabel })
|
|
9853
10591
|
] })
|
|
9854
10592
|
] });
|
|
9855
10593
|
}
|
|
9856
10594
|
|
|
9857
10595
|
// src/components/charts/sparkline.tsx
|
|
9858
|
-
var
|
|
9859
|
-
var
|
|
9860
|
-
var
|
|
10596
|
+
var import_react71 = require("react");
|
|
10597
|
+
var import_clsx76 = __toESM(require("clsx"), 1);
|
|
10598
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
9861
10599
|
var SIZE15 = {
|
|
9862
10600
|
sm: { width: 80, height: 24 },
|
|
9863
10601
|
md: { width: 120, height: 36 },
|
|
@@ -9877,7 +10615,7 @@ function Sparkline({
|
|
|
9877
10615
|
label,
|
|
9878
10616
|
className
|
|
9879
10617
|
}) {
|
|
9880
|
-
const gradientId = (0,
|
|
10618
|
+
const gradientId = (0, import_react71.useId)();
|
|
9881
10619
|
if (data.length < 2) return null;
|
|
9882
10620
|
const w = width ?? SIZE15[size2].width;
|
|
9883
10621
|
const h = height ?? SIZE15[size2].height;
|
|
@@ -9895,7 +10633,7 @@ function Sparkline({
|
|
|
9895
10633
|
const points = coords.map((p) => `${p.x.toFixed(2)},${p.y.toFixed(2)}`).join(" ");
|
|
9896
10634
|
const areaPath = `M ${points.split(" ").join(" L ")} L ${coords[coords.length - 1].x.toFixed(2)},${h} L ${coords[0].x.toFixed(2)},${h} Z`;
|
|
9897
10635
|
const last = coords[coords.length - 1];
|
|
9898
|
-
return /* @__PURE__ */ (0,
|
|
10636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
9899
10637
|
"svg",
|
|
9900
10638
|
{
|
|
9901
10639
|
width: stretch ? void 0 : w,
|
|
@@ -9906,16 +10644,16 @@ function Sparkline({
|
|
|
9906
10644
|
role: label ? "img" : void 0,
|
|
9907
10645
|
"aria-label": label,
|
|
9908
10646
|
"aria-hidden": label ? void 0 : true,
|
|
9909
|
-
className: (0,
|
|
10647
|
+
className: (0, import_clsx76.default)("block", stretch ? "h-full w-full" : "shrink-0", className),
|
|
9910
10648
|
children: [
|
|
9911
|
-
variant === "area" && /* @__PURE__ */ (0,
|
|
9912
|
-
/* @__PURE__ */ (0,
|
|
9913
|
-
/* @__PURE__ */ (0,
|
|
9914
|
-
/* @__PURE__ */ (0,
|
|
10649
|
+
variant === "area" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
10650
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
10651
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("stop", { offset: "0%", stopColor: stroke, stopOpacity: 0.24 }),
|
|
10652
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("stop", { offset: "100%", stopColor: stroke, stopOpacity: 0 })
|
|
9915
10653
|
] }) }),
|
|
9916
|
-
/* @__PURE__ */ (0,
|
|
10654
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: areaPath, fill: `url(#${gradientId})` })
|
|
9917
10655
|
] }),
|
|
9918
|
-
/* @__PURE__ */ (0,
|
|
10656
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9919
10657
|
"polyline",
|
|
9920
10658
|
{
|
|
9921
10659
|
points,
|
|
@@ -9927,7 +10665,7 @@ function Sparkline({
|
|
|
9927
10665
|
fill: "none"
|
|
9928
10666
|
}
|
|
9929
10667
|
),
|
|
9930
|
-
showEndDot && /* @__PURE__ */ (0,
|
|
10668
|
+
showEndDot && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9931
10669
|
"circle",
|
|
9932
10670
|
{
|
|
9933
10671
|
cx: last.x,
|
|
@@ -9944,8 +10682,8 @@ function Sparkline({
|
|
|
9944
10682
|
}
|
|
9945
10683
|
|
|
9946
10684
|
// src/components/charts/mini-bar-chart.tsx
|
|
9947
|
-
var
|
|
9948
|
-
var
|
|
10685
|
+
var import_clsx77 = __toESM(require("clsx"), 1);
|
|
10686
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
9949
10687
|
var SIZE16 = {
|
|
9950
10688
|
sm: { width: 80, height: 32, gap: 2 },
|
|
9951
10689
|
md: { width: 120, height: 48, gap: 3 },
|
|
@@ -9981,7 +10719,7 @@ function MiniBarChart({
|
|
|
9981
10719
|
const span = vertical ? w : h;
|
|
9982
10720
|
const extent = vertical ? h : w;
|
|
9983
10721
|
const barThickness = (span - g * (bars.length - 1)) / bars.length;
|
|
9984
|
-
return /* @__PURE__ */ (0,
|
|
10722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
9985
10723
|
"svg",
|
|
9986
10724
|
{
|
|
9987
10725
|
width: stretch ? void 0 : w,
|
|
@@ -9992,11 +10730,11 @@ function MiniBarChart({
|
|
|
9992
10730
|
role: label ? "img" : void 0,
|
|
9993
10731
|
"aria-label": label,
|
|
9994
10732
|
"aria-hidden": label ? void 0 : true,
|
|
9995
|
-
className: (0,
|
|
10733
|
+
className: (0, import_clsx77.default)("block", stretch ? "h-full w-full" : "shrink-0", className),
|
|
9996
10734
|
children: bars.map((v, i) => {
|
|
9997
10735
|
const magnitude = Math.max(2, v / max * extent);
|
|
9998
10736
|
const offset2 = i * (barThickness + g);
|
|
9999
|
-
return /* @__PURE__ */ (0,
|
|
10737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
10000
10738
|
"rect",
|
|
10001
10739
|
{
|
|
10002
10740
|
x: (vertical ? offset2 : 0).toFixed(2),
|
|
@@ -10014,29 +10752,29 @@ function MiniBarChart({
|
|
|
10014
10752
|
}
|
|
10015
10753
|
|
|
10016
10754
|
// src/components/charts/chart-legend.tsx
|
|
10017
|
-
var
|
|
10755
|
+
var import_clsx79 = __toESM(require("clsx"), 1);
|
|
10018
10756
|
|
|
10019
10757
|
// src/components/charts/legend-dot.tsx
|
|
10020
|
-
var
|
|
10021
|
-
var
|
|
10758
|
+
var import_clsx78 = __toESM(require("clsx"), 1);
|
|
10759
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
10022
10760
|
var SHAPE = {
|
|
10023
10761
|
dot: { sm: "size-1.5 rounded-full", md: "size-2 rounded-full" },
|
|
10024
10762
|
square: { sm: "size-1.5 rounded-[2px]", md: "size-2 rounded-[3px]" },
|
|
10025
10763
|
line: { sm: "h-0.5 w-3 rounded-full", md: "h-0.5 w-4 rounded-full" }
|
|
10026
10764
|
};
|
|
10027
|
-
function LegendDot({ tone, color, size: size2 = "md", shape = "dot", className }) {
|
|
10028
|
-
return /* @__PURE__ */ (0,
|
|
10765
|
+
function LegendDot({ tone, color, hue, size: size2 = "md", shape = "dot", className }) {
|
|
10766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
10029
10767
|
"span",
|
|
10030
10768
|
{
|
|
10031
|
-
className: (0,
|
|
10032
|
-
style: { backgroundColor: resolveChartColor(color, tone) },
|
|
10769
|
+
className: (0, import_clsx78.default)("inline-block shrink-0", SHAPE[shape][size2], className),
|
|
10770
|
+
style: { backgroundColor: color || !hue ? resolveChartColor(color, tone) : `var(--badge-${hue}-text)` },
|
|
10033
10771
|
"aria-hidden": true
|
|
10034
10772
|
}
|
|
10035
10773
|
);
|
|
10036
10774
|
}
|
|
10037
10775
|
|
|
10038
10776
|
// src/components/charts/chart-legend.tsx
|
|
10039
|
-
var
|
|
10777
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
10040
10778
|
function ChartLegend({
|
|
10041
10779
|
items,
|
|
10042
10780
|
orientation = "vertical",
|
|
@@ -10045,23 +10783,23 @@ function ChartLegend({
|
|
|
10045
10783
|
className
|
|
10046
10784
|
}) {
|
|
10047
10785
|
const horizontal = orientation === "horizontal";
|
|
10048
|
-
return /* @__PURE__ */ (0,
|
|
10786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
10049
10787
|
"div",
|
|
10050
10788
|
{
|
|
10051
|
-
className: (0,
|
|
10789
|
+
className: (0, import_clsx79.default)(
|
|
10052
10790
|
horizontal ? "flex flex-wrap items-center gap-x-4 gap-y-2" : "flex flex-col gap-3",
|
|
10053
10791
|
className
|
|
10054
10792
|
),
|
|
10055
|
-
children: items.map((item, i) => /* @__PURE__ */ (0,
|
|
10793
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
10056
10794
|
"div",
|
|
10057
10795
|
{
|
|
10058
|
-
className: (0,
|
|
10796
|
+
className: (0, import_clsx79.default)("flex items-center gap-2", horizontal ? "min-w-0" : "justify-between"),
|
|
10059
10797
|
children: [
|
|
10060
|
-
/* @__PURE__ */ (0,
|
|
10061
|
-
/* @__PURE__ */ (0,
|
|
10062
|
-
/* @__PURE__ */ (0,
|
|
10798
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
10799
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(LegendDot, { color: resolveChartColor(item.color, item.tone, i), size: size2, shape }),
|
|
10800
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "truncate text-body-xs text-default-secondary", children: item.label })
|
|
10063
10801
|
] }),
|
|
10064
|
-
item.count != null && /* @__PURE__ */ (0,
|
|
10802
|
+
item.count != null && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "shrink-0 text-body-xs font-semibold tabular-nums text-default", children: item.count })
|
|
10065
10803
|
]
|
|
10066
10804
|
},
|
|
10067
10805
|
item.label
|
|
@@ -10071,9 +10809,9 @@ function ChartLegend({
|
|
|
10071
10809
|
}
|
|
10072
10810
|
|
|
10073
10811
|
// src/components/charts/trend-label.tsx
|
|
10074
|
-
var
|
|
10075
|
-
var
|
|
10076
|
-
var
|
|
10812
|
+
var import_clsx80 = __toESM(require("clsx"), 1);
|
|
10813
|
+
var import_lucide_react29 = require("lucide-react");
|
|
10814
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
10077
10815
|
var SIZE17 = {
|
|
10078
10816
|
sm: "text-body-xs",
|
|
10079
10817
|
md: "text-body-sm",
|
|
@@ -10106,11 +10844,11 @@ function TrendLabel({
|
|
|
10106
10844
|
const rising = value > 0;
|
|
10107
10845
|
const flat = value === 0;
|
|
10108
10846
|
const good = direction === "up-is-good" ? rising : !rising;
|
|
10109
|
-
const Arrow = rising ?
|
|
10110
|
-
return /* @__PURE__ */ (0,
|
|
10847
|
+
const Arrow = rising ? import_lucide_react29.TrendingUpIcon : import_lucide_react29.TrendingDownIcon;
|
|
10848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
10111
10849
|
"span",
|
|
10112
10850
|
{
|
|
10113
|
-
className: (0,
|
|
10851
|
+
className: (0, import_clsx80.default)(
|
|
10114
10852
|
"inline-flex items-center gap-1 whitespace-nowrap",
|
|
10115
10853
|
SIZE17[size2],
|
|
10116
10854
|
WEIGHT2[weight ?? weightBySize[size2]],
|
|
@@ -10119,7 +10857,7 @@ function TrendLabel({
|
|
|
10119
10857
|
),
|
|
10120
10858
|
style: color ? { color } : void 0,
|
|
10121
10859
|
children: [
|
|
10122
|
-
showArrow && !flat && /* @__PURE__ */ (0,
|
|
10860
|
+
showArrow && !flat && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Arrow, { className: (0, import_clsx80.default)("shrink-0", ICON_SIZE[size2]), "aria-hidden": true }),
|
|
10123
10861
|
rising ? "+" : "",
|
|
10124
10862
|
value,
|
|
10125
10863
|
suffix
|
|
@@ -10128,10 +10866,118 @@ function TrendLabel({
|
|
|
10128
10866
|
);
|
|
10129
10867
|
}
|
|
10130
10868
|
|
|
10869
|
+
// src/components/lists/listbox.tsx
|
|
10870
|
+
var import_react72 = require("react");
|
|
10871
|
+
var import_clsx81 = __toESM(require("clsx"), 1);
|
|
10872
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
10873
|
+
var isGroup3 = (entry) => "options" in entry;
|
|
10874
|
+
function Listbox({
|
|
10875
|
+
options,
|
|
10876
|
+
value: valueProp,
|
|
10877
|
+
defaultValue,
|
|
10878
|
+
onValueChange,
|
|
10879
|
+
label,
|
|
10880
|
+
selectionFollowsFocus = true,
|
|
10881
|
+
maxHeight,
|
|
10882
|
+
empty,
|
|
10883
|
+
className
|
|
10884
|
+
}) {
|
|
10885
|
+
const id = (0, import_react72.useId)();
|
|
10886
|
+
const [value, setValue] = useControllableState({
|
|
10887
|
+
value: valueProp,
|
|
10888
|
+
defaultValue,
|
|
10889
|
+
onChange: onValueChange
|
|
10890
|
+
});
|
|
10891
|
+
const flat = (0, import_react72.useMemo)(
|
|
10892
|
+
() => options.flatMap((entry) => isGroup3(entry) ? entry.options : [entry]),
|
|
10893
|
+
[options]
|
|
10894
|
+
);
|
|
10895
|
+
const selectedIndex = flat.findIndex((option) => option.value === value);
|
|
10896
|
+
const roving = useRovingFocus({
|
|
10897
|
+
orientation: "vertical",
|
|
10898
|
+
loop: false,
|
|
10899
|
+
typeahead: true,
|
|
10900
|
+
defaultIndex: Math.max(0, selectedIndex)
|
|
10901
|
+
});
|
|
10902
|
+
const { setActiveIndex } = roving;
|
|
10903
|
+
(0, import_react72.useEffect)(() => {
|
|
10904
|
+
if (selectedIndex >= 0) setActiveIndex(selectedIndex);
|
|
10905
|
+
}, [selectedIndex, setActiveIndex]);
|
|
10906
|
+
let index = -1;
|
|
10907
|
+
const renderOption = (option) => {
|
|
10908
|
+
index += 1;
|
|
10909
|
+
const position = index;
|
|
10910
|
+
const selected = option.value === value;
|
|
10911
|
+
const item = roving.itemProps(position, {
|
|
10912
|
+
disabled: option.disabled,
|
|
10913
|
+
label: option.textValue ?? (typeof option.label === "string" ? option.label : void 0)
|
|
10914
|
+
});
|
|
10915
|
+
const select = () => {
|
|
10916
|
+
if (!option.disabled) setValue(option.value);
|
|
10917
|
+
};
|
|
10918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
10919
|
+
"div",
|
|
10920
|
+
{
|
|
10921
|
+
ref: item.ref,
|
|
10922
|
+
tabIndex: item.tabIndex,
|
|
10923
|
+
"data-roving-index": item["data-roving-index"],
|
|
10924
|
+
role: "option",
|
|
10925
|
+
"aria-selected": selected,
|
|
10926
|
+
"aria-disabled": option.disabled || void 0,
|
|
10927
|
+
"data-state": selected ? "selected" : void 0,
|
|
10928
|
+
onFocus: () => {
|
|
10929
|
+
item.onFocus();
|
|
10930
|
+
if (selectionFollowsFocus) select();
|
|
10931
|
+
},
|
|
10932
|
+
onClick: select,
|
|
10933
|
+
onKeyDown: (event) => {
|
|
10934
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
10935
|
+
event.preventDefault();
|
|
10936
|
+
select();
|
|
10937
|
+
}
|
|
10938
|
+
},
|
|
10939
|
+
className: (0, import_clsx81.default)(
|
|
10940
|
+
"flex w-full cursor-pointer items-center gap-2.5 border-b border-default bg-default px-4 py-2 text-left text-body-xs text-default",
|
|
10941
|
+
"hover:bg-default-secondary",
|
|
10942
|
+
"data-[state=selected]:bg-brand-tertiary data-[state=selected]:font-semibold",
|
|
10943
|
+
"aria-disabled:cursor-not-allowed aria-disabled:text-disabled",
|
|
10944
|
+
FOCUS_RING_INSET
|
|
10945
|
+
),
|
|
10946
|
+
children: [
|
|
10947
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "min-w-0 flex-1", children: option.label }),
|
|
10948
|
+
option.meta !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "shrink-0 whitespace-nowrap font-normal text-default-secondary", children: option.meta })
|
|
10949
|
+
]
|
|
10950
|
+
},
|
|
10951
|
+
option.value
|
|
10952
|
+
);
|
|
10953
|
+
};
|
|
10954
|
+
if (flat.length === 0 && empty) {
|
|
10955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: cn("px-4 py-6 text-center text-body-xs text-default-secondary", className), children: empty });
|
|
10956
|
+
}
|
|
10957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10958
|
+
"div",
|
|
10959
|
+
{
|
|
10960
|
+
role: "listbox",
|
|
10961
|
+
"aria-label": label,
|
|
10962
|
+
...roving.containerProps,
|
|
10963
|
+
className: cn(maxHeight !== void 0 && ["overflow-auto overscroll-contain", SCROLLBAR_CLASSES], className),
|
|
10964
|
+
style: maxHeight !== void 0 ? { maxHeight } : void 0,
|
|
10965
|
+
children: options.map((entry, groupIndex) => {
|
|
10966
|
+
if (!isGroup3(entry)) return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react72.Fragment, { children: renderOption(entry) }, entry.value);
|
|
10967
|
+
const headerId = `${id}-group-${groupIndex}`;
|
|
10968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { role: "group", "aria-labelledby": headerId, children: [
|
|
10969
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { id: headerId, className: "border-b border-default bg-default-secondary px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(EyebrowLabel, { children: entry.label }) }),
|
|
10970
|
+
entry.options.map(renderOption)
|
|
10971
|
+
] }, `${groupIndex}-${entry.label}`);
|
|
10972
|
+
})
|
|
10973
|
+
}
|
|
10974
|
+
);
|
|
10975
|
+
}
|
|
10976
|
+
|
|
10131
10977
|
// src/components/lists/list-row.tsx
|
|
10132
|
-
var
|
|
10133
|
-
var
|
|
10134
|
-
var
|
|
10978
|
+
var import_clsx82 = __toESM(require("clsx"), 1);
|
|
10979
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
10980
|
+
var DENSITY2 = {
|
|
10135
10981
|
default: {
|
|
10136
10982
|
pad: "py-4",
|
|
10137
10983
|
gap: "gap-3",
|
|
@@ -10170,7 +11016,7 @@ function ListRow({
|
|
|
10170
11016
|
"aria-label": ariaLabel,
|
|
10171
11017
|
className
|
|
10172
11018
|
}) {
|
|
10173
|
-
const d =
|
|
11019
|
+
const d = DENSITY2[density];
|
|
10174
11020
|
const hasTitleLine = Boolean(leading || title != null || titleMeta || meta);
|
|
10175
11021
|
const clickable = Boolean(onClick) && !asChild;
|
|
10176
11022
|
const interactive = clickable || asChild;
|
|
@@ -10191,24 +11037,24 @@ function ListRow({
|
|
|
10191
11037
|
className
|
|
10192
11038
|
)
|
|
10193
11039
|
};
|
|
10194
|
-
const body = /* @__PURE__ */ (0,
|
|
10195
|
-
/* @__PURE__ */ (0,
|
|
10196
|
-
hasTitleLine && /* @__PURE__ */ (0,
|
|
10197
|
-
/* @__PURE__ */ (0,
|
|
11040
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_jsx_runtime103.Fragment, { children: [
|
|
11041
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: (0, import_clsx82.default)("flex min-w-0 flex-1 flex-col", d.gap), children: [
|
|
11042
|
+
hasTitleLine && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
11043
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
10198
11044
|
leading,
|
|
10199
|
-
title != null && /* @__PURE__ */ (0,
|
|
10200
|
-
titleMeta && /* @__PURE__ */ (0,
|
|
11045
|
+
title != null && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: (0, import_clsx82.default)("truncate", d.title), children: title }),
|
|
11046
|
+
titleMeta && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "shrink-0", children: titleMeta })
|
|
10201
11047
|
] }),
|
|
10202
|
-
meta && /* @__PURE__ */ (0,
|
|
11048
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "shrink-0", children: meta })
|
|
10203
11049
|
] }),
|
|
10204
|
-
description && /* @__PURE__ */ (0,
|
|
11050
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: d.description, children: description }),
|
|
10205
11051
|
footer && // These two wrappers are propagation barriers, not controls — they add no
|
|
10206
11052
|
// behaviour of their own and must not be focusable or take a role.
|
|
10207
11053
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
10208
|
-
/* @__PURE__ */ (0,
|
|
11054
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { onClick: stopIfInteractive, onKeyDown: stopIfInteractive, children: footer })
|
|
10209
11055
|
] }),
|
|
10210
11056
|
trailing && // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
10211
|
-
/* @__PURE__ */ (0,
|
|
11057
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10212
11058
|
"div",
|
|
10213
11059
|
{
|
|
10214
11060
|
className: "ml-3 flex shrink-0 items-center self-center",
|
|
@@ -10219,7 +11065,7 @@ function ListRow({
|
|
|
10219
11065
|
)
|
|
10220
11066
|
] });
|
|
10221
11067
|
if (asChild) {
|
|
10222
|
-
return /* @__PURE__ */ (0,
|
|
11068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10223
11069
|
Slot,
|
|
10224
11070
|
{
|
|
10225
11071
|
...rootProps,
|
|
@@ -10232,7 +11078,7 @@ function ListRow({
|
|
|
10232
11078
|
}
|
|
10233
11079
|
);
|
|
10234
11080
|
}
|
|
10235
|
-
return /* @__PURE__ */ (0,
|
|
11081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10236
11082
|
Tag,
|
|
10237
11083
|
{
|
|
10238
11084
|
...rootProps,
|
|
@@ -10261,11 +11107,11 @@ function refusePress(event) {
|
|
|
10261
11107
|
}
|
|
10262
11108
|
|
|
10263
11109
|
// src/components/lists/file-row.tsx
|
|
10264
|
-
var
|
|
10265
|
-
var
|
|
10266
|
-
var
|
|
11110
|
+
var import_clsx83 = __toESM(require("clsx"), 1);
|
|
11111
|
+
var import_lucide_react30 = require("lucide-react");
|
|
11112
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
10267
11113
|
function FileTypeBadge({ type }) {
|
|
10268
|
-
return /* @__PURE__ */ (0,
|
|
11114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "flex size-[34px] shrink-0 items-center justify-center rounded-md bg-brand-tertiary text-body-tiny font-semibold text-brand", children: type });
|
|
10269
11115
|
}
|
|
10270
11116
|
function FileRow({
|
|
10271
11117
|
name,
|
|
@@ -10279,24 +11125,24 @@ function FileRow({
|
|
|
10279
11125
|
actions,
|
|
10280
11126
|
className
|
|
10281
11127
|
}) {
|
|
10282
|
-
const lead = leading ?? (fileType ? /* @__PURE__ */ (0,
|
|
10283
|
-
return /* @__PURE__ */ (0,
|
|
11128
|
+
const lead = leading ?? (fileType ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FileTypeBadge, { type: fileType }) : null);
|
|
11129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
10284
11130
|
"div",
|
|
10285
11131
|
{
|
|
10286
|
-
className: (0,
|
|
11132
|
+
className: (0, import_clsx83.default)(
|
|
10287
11133
|
"flex items-center gap-3 rounded-lg border border-default bg-default px-3 py-2.5",
|
|
10288
11134
|
className
|
|
10289
11135
|
),
|
|
10290
11136
|
children: [
|
|
10291
11137
|
lead,
|
|
10292
|
-
/* @__PURE__ */ (0,
|
|
10293
|
-
/* @__PURE__ */ (0,
|
|
10294
|
-
detail && /* @__PURE__ */ (0,
|
|
11138
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
11139
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "truncate text-body-sm font-medium text-default", children: name }),
|
|
11140
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-body-xs text-default-secondary", children: detail })
|
|
10295
11141
|
] }),
|
|
10296
|
-
(onDownload || onRemove || actions) && /* @__PURE__ */ (0,
|
|
10297
|
-
onDownload && /* @__PURE__ */ (0,
|
|
10298
|
-
onRemove && /* @__PURE__ */ (0,
|
|
10299
|
-
actions && /* @__PURE__ */ (0,
|
|
11142
|
+
(onDownload || onRemove || actions) && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
11143
|
+
onDownload && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Tooltip, { title: downloadLabel, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(IconButton, { variant: "subtle", size: "sm", "aria-label": `${downloadLabel} ${name}`, onClick: onDownload, className: "touch-hit", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react30.DownloadIcon, { "aria-hidden": true }) }) }),
|
|
11144
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Tooltip, { title: removeLabel, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(IconButton, { variant: "subtle", size: "sm", "aria-label": `${removeLabel} ${name}`, onClick: onRemove, className: "touch-hit", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react30.Trash2Icon, { "aria-hidden": true }) }) }),
|
|
11145
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "ml-2 flex items-center gap-2", children: actions })
|
|
10300
11146
|
] })
|
|
10301
11147
|
]
|
|
10302
11148
|
}
|
|
@@ -10304,8 +11150,8 @@ function FileRow({
|
|
|
10304
11150
|
}
|
|
10305
11151
|
|
|
10306
11152
|
// src/components/lists/scored-row.tsx
|
|
10307
|
-
var
|
|
10308
|
-
var
|
|
11153
|
+
var import_clsx84 = __toESM(require("clsx"), 1);
|
|
11154
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
10309
11155
|
var GAP5 = {
|
|
10310
11156
|
sm: "gap-2",
|
|
10311
11157
|
md: "gap-3",
|
|
@@ -10332,11 +11178,11 @@ function ScoredRow({
|
|
|
10332
11178
|
align = "center",
|
|
10333
11179
|
className
|
|
10334
11180
|
}) {
|
|
10335
|
-
return /* @__PURE__ */ (0,
|
|
10336
|
-
/* @__PURE__ */ (0,
|
|
11181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: (0, import_clsx84.default)("flex w-full", ALIGN3[align], GAP5[gap], className), children: [
|
|
11182
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
10337
11183
|
"div",
|
|
10338
11184
|
{
|
|
10339
|
-
className: (0,
|
|
11185
|
+
className: (0, import_clsx84.default)(
|
|
10340
11186
|
"flex min-w-0",
|
|
10341
11187
|
ALIGN3[align],
|
|
10342
11188
|
GAP5[leadingGap ?? gap],
|
|
@@ -10345,39 +11191,39 @@ function ScoredRow({
|
|
|
10345
11191
|
style: titleWidth ? { width: titleWidth } : void 0,
|
|
10346
11192
|
children: [
|
|
10347
11193
|
leading,
|
|
10348
|
-
/* @__PURE__ */ (0,
|
|
10349
|
-
/* @__PURE__ */ (0,
|
|
10350
|
-
subtitle && /* @__PURE__ */ (0,
|
|
11194
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
11195
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "truncate text-body-sm font-medium leading-none text-default", children: title }),
|
|
11196
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "mt-0.5 truncate text-body-xs text-default-secondary", children: subtitle })
|
|
10351
11197
|
] })
|
|
10352
11198
|
]
|
|
10353
11199
|
}
|
|
10354
11200
|
),
|
|
10355
|
-
aside && /* @__PURE__ */ (0,
|
|
11201
|
+
aside && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
10356
11202
|
"div",
|
|
10357
11203
|
{
|
|
10358
|
-
className: (0,
|
|
11204
|
+
className: (0, import_clsx84.default)("min-w-0", asideWidth ? "shrink-0" : "flex-1"),
|
|
10359
11205
|
style: asideWidth ? { width: asideWidth } : void 0,
|
|
10360
11206
|
children: aside
|
|
10361
11207
|
}
|
|
10362
11208
|
),
|
|
10363
|
-
meter && /* @__PURE__ */ (0,
|
|
11209
|
+
meter && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
10364
11210
|
"div",
|
|
10365
11211
|
{
|
|
10366
|
-
className: (0,
|
|
11212
|
+
className: (0, import_clsx84.default)("min-w-0", meterWidth ? "shrink-0" : "flex-1"),
|
|
10367
11213
|
style: meterWidth ? { width: meterWidth } : void 0,
|
|
10368
11214
|
children: meter
|
|
10369
11215
|
}
|
|
10370
11216
|
),
|
|
10371
|
-
trailing && /* @__PURE__ */ (0,
|
|
11217
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "shrink-0 text-right", style: trailingWidth ? { width: trailingWidth } : void 0, children: trailing })
|
|
10372
11218
|
] });
|
|
10373
11219
|
}
|
|
10374
11220
|
|
|
10375
11221
|
// src/components/lists/numbered-list.tsx
|
|
10376
|
-
var
|
|
11222
|
+
var import_clsx85 = __toESM(require("clsx"), 1);
|
|
10377
11223
|
|
|
10378
11224
|
// src/components/feedback/progress-bar.tsx
|
|
10379
|
-
var
|
|
10380
|
-
var
|
|
11225
|
+
var import_react73 = require("react");
|
|
11226
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
10381
11227
|
var SIZE18 = {
|
|
10382
11228
|
xs: "h-1",
|
|
10383
11229
|
sm: "h-1.5",
|
|
@@ -10405,9 +11251,9 @@ function ProgressBar({
|
|
|
10405
11251
|
}) {
|
|
10406
11252
|
const clamped = Math.min(100, Math.max(0, value));
|
|
10407
11253
|
const rounded = radius ? void 0 : "rounded-full";
|
|
10408
|
-
const labelId = (0,
|
|
11254
|
+
const labelId = (0, import_react73.useId)();
|
|
10409
11255
|
const filledSegments = segments ? Math.round(clamped / 100 * segments) : 0;
|
|
10410
|
-
const track = segments ? /* @__PURE__ */ (0,
|
|
11256
|
+
const track = segments ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10411
11257
|
"div",
|
|
10412
11258
|
{
|
|
10413
11259
|
role: "progressbar",
|
|
@@ -10419,7 +11265,7 @@ function ProgressBar({
|
|
|
10419
11265
|
"aria-label": label ? void 0 : ariaLabel,
|
|
10420
11266
|
"data-tone": tone,
|
|
10421
11267
|
className: cn("flex w-full gap-1", className),
|
|
10422
|
-
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0,
|
|
11268
|
+
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10423
11269
|
"span",
|
|
10424
11270
|
{
|
|
10425
11271
|
"data-filled": index < filledSegments || void 0,
|
|
@@ -10429,7 +11275,7 @@ function ProgressBar({
|
|
|
10429
11275
|
index
|
|
10430
11276
|
))
|
|
10431
11277
|
}
|
|
10432
|
-
) : /* @__PURE__ */ (0,
|
|
11278
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10433
11279
|
"div",
|
|
10434
11280
|
{
|
|
10435
11281
|
role: "progressbar",
|
|
@@ -10442,7 +11288,7 @@ function ProgressBar({
|
|
|
10442
11288
|
"aria-label": label ? void 0 : ariaLabel,
|
|
10443
11289
|
className: cn("w-full overflow-hidden bg-default-tertiary", SIZE18[size2], rounded, className),
|
|
10444
11290
|
style: radius ? { borderRadius: radius } : void 0,
|
|
10445
|
-
children: /* @__PURE__ */ (0,
|
|
11291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10446
11292
|
"div",
|
|
10447
11293
|
{
|
|
10448
11294
|
className: cn("h-full transition-all motion-reduce:transition-none", rounded, FILL[tone]),
|
|
@@ -10452,10 +11298,10 @@ function ProgressBar({
|
|
|
10452
11298
|
}
|
|
10453
11299
|
);
|
|
10454
11300
|
if (!label && !showValue) return track;
|
|
10455
|
-
return /* @__PURE__ */ (0,
|
|
10456
|
-
/* @__PURE__ */ (0,
|
|
10457
|
-
label && /* @__PURE__ */ (0,
|
|
10458
|
-
showValue && /* @__PURE__ */ (0,
|
|
11301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
|
|
11302
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "mb-1.5 flex items-center justify-between gap-2", children: [
|
|
11303
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { id: labelId, className: "text-body-xs text-default-secondary", children: label }),
|
|
11304
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("span", { className: "ml-auto text-body-xs font-medium tabular-nums text-default", children: [
|
|
10459
11305
|
Math.round(clamped),
|
|
10460
11306
|
"%"
|
|
10461
11307
|
] })
|
|
@@ -10465,7 +11311,7 @@ function ProgressBar({
|
|
|
10465
11311
|
}
|
|
10466
11312
|
|
|
10467
11313
|
// src/components/lists/numbered-list.tsx
|
|
10468
|
-
var
|
|
11314
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
10469
11315
|
var GAP6 = {
|
|
10470
11316
|
sm: "gap-2",
|
|
10471
11317
|
md: "gap-3"
|
|
@@ -10479,18 +11325,18 @@ function NumberedList({
|
|
|
10479
11325
|
gap = "md",
|
|
10480
11326
|
className
|
|
10481
11327
|
}) {
|
|
10482
|
-
return /* @__PURE__ */ (0,
|
|
11328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("ol", { className: (0, import_clsx85.default)("flex list-none flex-col p-0", GAP6[gap], className), children: items.map((item, index) => {
|
|
10483
11329
|
const tone = !item.tone || item.tone === "auto" ? getScoreTone(item.score, { direction }) : item.tone;
|
|
10484
|
-
return /* @__PURE__ */ (0,
|
|
10485
|
-
/* @__PURE__ */ (0,
|
|
10486
|
-
/* @__PURE__ */ (0,
|
|
10487
|
-
/* @__PURE__ */ (0,
|
|
10488
|
-
/* @__PURE__ */ (0,
|
|
10489
|
-
/* @__PURE__ */ (0,
|
|
10490
|
-
item.subtitle && /* @__PURE__ */ (0,
|
|
11330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("li", { className: "flex w-full shrink-0 flex-col gap-1.5", children: [
|
|
11331
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
11332
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
11333
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "w-[14px] shrink-0 text-body-xs font-bold text-default-secondary", children: startAt + index }),
|
|
11334
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex min-w-0 flex-col gap-px", children: [
|
|
11335
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "truncate text-body-sm font-medium leading-none text-default", children: item.title }),
|
|
11336
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "text-body-tiny text-default-tertiary", children: item.subtitle })
|
|
10491
11337
|
] })
|
|
10492
11338
|
] }),
|
|
10493
|
-
/* @__PURE__ */ (0,
|
|
11339
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10494
11340
|
ScoreValue,
|
|
10495
11341
|
{
|
|
10496
11342
|
value: item.score,
|
|
@@ -10501,43 +11347,43 @@ function NumberedList({
|
|
|
10501
11347
|
}
|
|
10502
11348
|
)
|
|
10503
11349
|
] }),
|
|
10504
|
-
/* @__PURE__ */ (0,
|
|
11350
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ProgressBar, { value: item.score, tone, "aria-label": `${item.title} score` })
|
|
10505
11351
|
] }, `${item.title}-${index}`);
|
|
10506
11352
|
}) });
|
|
10507
11353
|
}
|
|
10508
11354
|
|
|
10509
11355
|
// src/components/lists/icon-text-row.tsx
|
|
10510
|
-
var
|
|
10511
|
-
var
|
|
11356
|
+
var import_clsx86 = __toESM(require("clsx"), 1);
|
|
11357
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
10512
11358
|
function IconTextRow({ icon, title, detail, className }) {
|
|
10513
|
-
return /* @__PURE__ */ (0,
|
|
10514
|
-
/* @__PURE__ */ (0,
|
|
10515
|
-
/* @__PURE__ */ (0,
|
|
10516
|
-
/* @__PURE__ */ (0,
|
|
10517
|
-
/* @__PURE__ */ (0,
|
|
11359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: (0, import_clsx86.default)("flex items-start gap-3", className), children: [
|
|
11360
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-full bg-brand-tertiary text-brand", children: icon }),
|
|
11361
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "min-w-0", children: [
|
|
11362
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "text-body-sm font-semibold text-default", children: title }),
|
|
11363
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: detail })
|
|
10518
11364
|
] })
|
|
10519
11365
|
] });
|
|
10520
11366
|
}
|
|
10521
11367
|
|
|
10522
11368
|
// src/components/lists/checklist-row.tsx
|
|
10523
|
-
var
|
|
10524
|
-
var
|
|
10525
|
-
var
|
|
11369
|
+
var import_clsx87 = __toESM(require("clsx"), 1);
|
|
11370
|
+
var import_lucide_react31 = require("lucide-react");
|
|
11371
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
10526
11372
|
function ChecklistRow({ label, state, className }) {
|
|
10527
|
-
return /* @__PURE__ */ (0,
|
|
10528
|
-
/* @__PURE__ */ (0,
|
|
11373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("li", { "data-state": state, className: (0, import_clsx87.default)("flex items-center gap-3", className), children: [
|
|
11374
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "flex size-5 shrink-0 items-center justify-center", children: state === "done" ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react31.CheckIcon, { className: "size-4 text-positive", strokeWidth: 2.5, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
10529
11375
|
"span",
|
|
10530
11376
|
{
|
|
10531
|
-
className: (0,
|
|
11377
|
+
className: (0, import_clsx87.default)(
|
|
10532
11378
|
"size-3.5 rounded-full border-2",
|
|
10533
11379
|
state === "active" ? "motion-safe:animate-pulse border-brand-emphasis border-t-transparent" : "border-disabled"
|
|
10534
11380
|
)
|
|
10535
11381
|
}
|
|
10536
11382
|
) }),
|
|
10537
|
-
/* @__PURE__ */ (0,
|
|
11383
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
10538
11384
|
"span",
|
|
10539
11385
|
{
|
|
10540
|
-
className: (0,
|
|
11386
|
+
className: (0, import_clsx87.default)(
|
|
10541
11387
|
"text-body-sm",
|
|
10542
11388
|
state === "pending" ? "text-default-tertiary" : "font-semibold text-default"
|
|
10543
11389
|
),
|
|
@@ -10548,22 +11394,22 @@ function ChecklistRow({ label, state, className }) {
|
|
|
10548
11394
|
}
|
|
10549
11395
|
|
|
10550
11396
|
// src/components/lists/steps-list.tsx
|
|
10551
|
-
var
|
|
10552
|
-
var
|
|
11397
|
+
var import_clsx88 = __toESM(require("clsx"), 1);
|
|
11398
|
+
var import_jsx_runtime110 = (
|
|
10553
11399
|
// `text-[12px]` was off the type scale; 12 sits midway between Scale 01 (11) and
|
|
10554
11400
|
// Scale 02 (13), so it rounds up to 13 like every other snap in this pass.
|
|
10555
11401
|
require("react/jsx-runtime")
|
|
10556
11402
|
);
|
|
10557
11403
|
function StepsList({ steps, className }) {
|
|
10558
|
-
return /* @__PURE__ */ (0,
|
|
10559
|
-
/* @__PURE__ */ (0,
|
|
11404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("ol", { className: (0, import_clsx88.default)("flex flex-col gap-1.5", className), children: steps.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("li", { className: "flex items-start gap-2 text-body-xs text-default", children: [
|
|
11405
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full bg-brand-tertiary text-[9px] font-bold text-brand", children: i + 1 }),
|
|
10560
11406
|
step
|
|
10561
11407
|
] }, i)) });
|
|
10562
11408
|
}
|
|
10563
11409
|
|
|
10564
11410
|
// src/components/lists/detail-item.tsx
|
|
10565
|
-
var
|
|
10566
|
-
var
|
|
11411
|
+
var import_clsx89 = __toESM(require("clsx"), 1);
|
|
11412
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
10567
11413
|
var SPAN = {
|
|
10568
11414
|
1: "",
|
|
10569
11415
|
2: "sm:col-span-2",
|
|
@@ -10580,18 +11426,18 @@ function DetailItem({
|
|
|
10580
11426
|
}) {
|
|
10581
11427
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
10582
11428
|
if (layout === "inline") {
|
|
10583
|
-
return /* @__PURE__ */ (0,
|
|
10584
|
-
/* @__PURE__ */ (0,
|
|
10585
|
-
/* @__PURE__ */ (0,
|
|
10586
|
-
/* @__PURE__ */ (0,
|
|
10587
|
-
detail && /* @__PURE__ */ (0,
|
|
11429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_clsx89.default)("flex gap-3 text-body-xs", SPAN[span], className), children: [
|
|
11430
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: (0, import_clsx89.default)("shrink-0 text-default-secondary", labelWidth), children: label }),
|
|
11431
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5 [overflow-wrap:anywhere]", children: [
|
|
11432
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "text-default", children: shown }),
|
|
11433
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "text-default-secondary", children: detail })
|
|
10588
11434
|
] })
|
|
10589
11435
|
] });
|
|
10590
11436
|
}
|
|
10591
|
-
return /* @__PURE__ */ (0,
|
|
10592
|
-
/* @__PURE__ */ (0,
|
|
10593
|
-
/* @__PURE__ */ (0,
|
|
10594
|
-
detail && /* @__PURE__ */ (0,
|
|
11437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_clsx89.default)("flex min-w-0 flex-col gap-0.5", SPAN[span], className), children: [
|
|
11438
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "text-body-tiny font-medium text-default-secondary", children: label }),
|
|
11439
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "text-body-sm font-medium text-default [overflow-wrap:anywhere]", children: shown }),
|
|
11440
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "text-body-xs text-default-secondary [overflow-wrap:anywhere]", children: detail })
|
|
10595
11441
|
] });
|
|
10596
11442
|
}
|
|
10597
11443
|
var COLUMNS3 = {
|
|
@@ -10602,38 +11448,38 @@ var COLUMNS3 = {
|
|
|
10602
11448
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"
|
|
10603
11449
|
};
|
|
10604
11450
|
function DetailGrid({ children, columns = "auto", className }) {
|
|
10605
|
-
return /* @__PURE__ */ (0,
|
|
11451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: (0, import_clsx89.default)("grid gap-x-4 gap-y-4", COLUMNS3[columns], className), children });
|
|
10606
11452
|
}
|
|
10607
11453
|
|
|
10608
11454
|
// src/components/lists/description-list.tsx
|
|
10609
|
-
var
|
|
10610
|
-
var
|
|
10611
|
-
var
|
|
10612
|
-
var
|
|
11455
|
+
var import_react74 = require("react");
|
|
11456
|
+
var import_clsx90 = __toESM(require("clsx"), 1);
|
|
11457
|
+
var import_lucide_react32 = require("lucide-react");
|
|
11458
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
10613
11459
|
function DescriptionList({ children, className }) {
|
|
10614
|
-
return /* @__PURE__ */ (0,
|
|
11460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("dl", { className: cn("flex flex-col gap-3", className), children });
|
|
10615
11461
|
}
|
|
10616
11462
|
function DescriptionItem({ label, value, copyValue, className }) {
|
|
10617
11463
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
10618
|
-
return /* @__PURE__ */ (0,
|
|
10619
|
-
/* @__PURE__ */ (0,
|
|
10620
|
-
/* @__PURE__ */ (0,
|
|
10621
|
-
/* @__PURE__ */ (0,
|
|
10622
|
-
copyValue && /* @__PURE__ */ (0,
|
|
11464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: cn("flex flex-wrap items-start gap-x-4 gap-y-0.5 text-body-xs", className), children: [
|
|
11465
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("dt", { className: "shrink-0 grow-0 basis-28 text-default-secondary", children: label }),
|
|
11466
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("dd", { className: "flex min-w-0 flex-[1_1_10rem] items-start gap-1.5 text-default", children: [
|
|
11467
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "min-w-0 [overflow-wrap:anywhere]", children: shown }),
|
|
11468
|
+
copyValue && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(CopyButton, { value: copyValue, label: `Copy ${label.toLowerCase()}` })
|
|
10623
11469
|
] })
|
|
10624
11470
|
] });
|
|
10625
11471
|
}
|
|
10626
11472
|
function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
10627
|
-
const [copied, setCopied] = (0,
|
|
10628
|
-
(0,
|
|
11473
|
+
const [copied, setCopied] = (0, import_react74.useState)(false);
|
|
11474
|
+
(0, import_react74.useEffect)(() => {
|
|
10629
11475
|
if (!copied) return;
|
|
10630
11476
|
const timer = window.setTimeout(() => setCopied(false), 2e3);
|
|
10631
11477
|
return () => window.clearTimeout(timer);
|
|
10632
11478
|
}, [copied]);
|
|
10633
11479
|
return (
|
|
10634
11480
|
// relative: keeps the sr-only status (absolutely positioned) inside a scrolling container.
|
|
10635
|
-
/* @__PURE__ */ (0,
|
|
10636
|
-
/* @__PURE__ */ (0,
|
|
11481
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("span", { className: "relative inline-flex", children: [
|
|
11482
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
10637
11483
|
IconButton,
|
|
10638
11484
|
{
|
|
10639
11485
|
variant: "subtle",
|
|
@@ -10647,10 +11493,10 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
10647
11493
|
() => void 0
|
|
10648
11494
|
);
|
|
10649
11495
|
},
|
|
10650
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
11496
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_lucide_react32.CheckIcon, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_lucide_react32.CopyIcon, { "aria-hidden": true })
|
|
10651
11497
|
}
|
|
10652
11498
|
),
|
|
10653
|
-
/* @__PURE__ */ (0,
|
|
11499
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { role: "status", className: "sr-only", children: copied ? copiedLabel : "" })
|
|
10654
11500
|
] })
|
|
10655
11501
|
);
|
|
10656
11502
|
}
|
|
@@ -10658,16 +11504,16 @@ function EmailText({ email, className }) {
|
|
|
10658
11504
|
const at = email.lastIndexOf("@");
|
|
10659
11505
|
const local = at > 0 ? email.slice(0, at) : email;
|
|
10660
11506
|
const domain = at > 0 ? email.slice(at) : "";
|
|
10661
|
-
return /* @__PURE__ */ (0,
|
|
10662
|
-
/* @__PURE__ */ (0,
|
|
10663
|
-
domain && /* @__PURE__ */ (0,
|
|
11507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("span", { title: email, "data-slot": "email-text", className: (0, import_clsx90.default)("flex min-w-0 max-w-full", className), children: [
|
|
11508
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: local }),
|
|
11509
|
+
domain && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap [flex-shrink:0.001]", children: domain })
|
|
10664
11510
|
] });
|
|
10665
11511
|
}
|
|
10666
11512
|
|
|
10667
11513
|
// src/components/lists/checked-group-list.tsx
|
|
10668
|
-
var
|
|
10669
|
-
var
|
|
10670
|
-
var
|
|
11514
|
+
var import_clsx91 = __toESM(require("clsx"), 1);
|
|
11515
|
+
var import_lucide_react33 = require("lucide-react");
|
|
11516
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
10671
11517
|
var COLUMNS4 = {
|
|
10672
11518
|
1: "columns-1",
|
|
10673
11519
|
2: "columns-2",
|
|
@@ -10681,23 +11527,23 @@ function CheckedGroupList({
|
|
|
10681
11527
|
className
|
|
10682
11528
|
}) {
|
|
10683
11529
|
if (groups.length === 0) {
|
|
10684
|
-
return /* @__PURE__ */ (0,
|
|
11530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("p", { className: (0, import_clsx91.default)("text-body-xs text-default-secondary", className), children: emptyLabel });
|
|
10685
11531
|
}
|
|
10686
|
-
const glyph = icon === void 0 ? /* @__PURE__ */ (0,
|
|
10687
|
-
return /* @__PURE__ */ (0,
|
|
10688
|
-
/* @__PURE__ */ (0,
|
|
10689
|
-
/* @__PURE__ */ (0,
|
|
10690
|
-
glyph && /* @__PURE__ */ (0,
|
|
11532
|
+
const glyph = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react33.CheckIcon, { className: "size-3.5", strokeWidth: 2.5, "aria-hidden": true }) : icon;
|
|
11533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: (0, import_clsx91.default)(COLUMNS4[columns], "gap-x-6", className), children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "mb-5 break-inside-avoid last:mb-0", children: [
|
|
11534
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("p", { className: "mb-2 text-body-tiny font-semibold uppercase tracking-wide text-default-secondary", children: group.label }),
|
|
11535
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("ul", { className: "space-y-1.5", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("li", { className: "flex items-center gap-2 text-body-xs text-default", children: [
|
|
11536
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "shrink-0", children: glyph }),
|
|
10691
11537
|
item
|
|
10692
11538
|
] }, item)) })
|
|
10693
11539
|
] }, group.label)) });
|
|
10694
11540
|
}
|
|
10695
11541
|
|
|
10696
11542
|
// src/components/lists/tree-view.tsx
|
|
10697
|
-
var
|
|
10698
|
-
var
|
|
10699
|
-
var
|
|
10700
|
-
var
|
|
11543
|
+
var import_react75 = require("react");
|
|
11544
|
+
var import_clsx92 = __toESM(require("clsx"), 1);
|
|
11545
|
+
var import_lucide_react34 = require("lucide-react");
|
|
11546
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
10701
11547
|
var ROW = {
|
|
10702
11548
|
sm: "min-h-8 py-1 text-body-xs",
|
|
10703
11549
|
md: "min-h-10 py-2 text-body-sm"
|
|
@@ -10727,10 +11573,10 @@ function TreeView({
|
|
|
10727
11573
|
value: selectedProp,
|
|
10728
11574
|
defaultValue: defaultSelected
|
|
10729
11575
|
});
|
|
10730
|
-
const [focusedId, setFocusedId] = (0,
|
|
10731
|
-
const rowRefs = (0,
|
|
10732
|
-
const expandedSet = (0,
|
|
10733
|
-
const visible = (0,
|
|
11576
|
+
const [focusedId, setFocusedId] = (0, import_react75.useState)(null);
|
|
11577
|
+
const rowRefs = (0, import_react75.useRef)(/* @__PURE__ */ new Map());
|
|
11578
|
+
const expandedSet = (0, import_react75.useMemo)(() => new Set(expanded), [expanded]);
|
|
11579
|
+
const visible = (0, import_react75.useMemo)(() => {
|
|
10734
11580
|
const out = [];
|
|
10735
11581
|
const walk = (nodes, level, parentId) => {
|
|
10736
11582
|
for (const item of nodes) {
|
|
@@ -10801,7 +11647,7 @@ function TreeView({
|
|
|
10801
11647
|
if (!node) return null;
|
|
10802
11648
|
const children = getChildren?.(item) ?? [];
|
|
10803
11649
|
const isSelected = selected === id;
|
|
10804
|
-
return /* @__PURE__ */ (0,
|
|
11650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
10805
11651
|
"li",
|
|
10806
11652
|
{
|
|
10807
11653
|
role: "treeitem",
|
|
@@ -10823,7 +11669,7 @@ function TreeView({
|
|
|
10823
11669
|
},
|
|
10824
11670
|
className: "outline-none [&:focus-visible>div]:ring-2 [&:focus-visible>div]:ring-inset [&:focus-visible>div]:ring-brand",
|
|
10825
11671
|
children: [
|
|
10826
|
-
/* @__PURE__ */ (0,
|
|
11672
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
10827
11673
|
"div",
|
|
10828
11674
|
{
|
|
10829
11675
|
onClick: () => {
|
|
@@ -10831,7 +11677,7 @@ function TreeView({
|
|
|
10831
11677
|
choose(node);
|
|
10832
11678
|
},
|
|
10833
11679
|
style: { paddingLeft: 8 + (level - 1) * INDENT },
|
|
10834
|
-
className: (0,
|
|
11680
|
+
className: (0, import_clsx92.default)(
|
|
10835
11681
|
"flex w-full cursor-pointer items-center gap-1.5 rounded-md pr-2 transition-colors",
|
|
10836
11682
|
ROW[size2],
|
|
10837
11683
|
isSelected ? "bg-brand-secondary text-default" : "text-default hover:bg-default-secondary"
|
|
@@ -10841,7 +11687,7 @@ function TreeView({
|
|
|
10841
11687
|
// Not a button: the treeitem is the one tab stop, and Left/Right already toggle.
|
|
10842
11688
|
// A pointer user still needs a target that toggles without selecting.
|
|
10843
11689
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
10844
|
-
/* @__PURE__ */ (0,
|
|
11690
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
10845
11691
|
"span",
|
|
10846
11692
|
{
|
|
10847
11693
|
"aria-hidden": true,
|
|
@@ -10852,11 +11698,11 @@ function TreeView({
|
|
|
10852
11698
|
focus(id);
|
|
10853
11699
|
},
|
|
10854
11700
|
className: "flex size-5 shrink-0 items-center justify-center rounded text-icon-default-secondary hover:bg-default-tertiary",
|
|
10855
|
-
children: /* @__PURE__ */ (0,
|
|
11701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_lucide_react34.ChevronRightIcon, { className: (0, import_clsx92.default)("size-3.5 transition-transform motion-reduce:transition-none", node.expanded && "rotate-90") })
|
|
10856
11702
|
}
|
|
10857
11703
|
)
|
|
10858
|
-
) : /* @__PURE__ */ (0,
|
|
10859
|
-
/* @__PURE__ */ (0,
|
|
11704
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { "aria-hidden": true, className: "size-5 shrink-0" }),
|
|
11705
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "min-w-0 flex-1", children: renderItem(item, {
|
|
10860
11706
|
level,
|
|
10861
11707
|
hasChildren: node.hasChildren,
|
|
10862
11708
|
expanded: node.expanded,
|
|
@@ -10865,38 +11711,38 @@ function TreeView({
|
|
|
10865
11711
|
]
|
|
10866
11712
|
}
|
|
10867
11713
|
),
|
|
10868
|
-
node.expanded && /* @__PURE__ */ (0,
|
|
11714
|
+
node.expanded && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("ul", { role: "group", className: "m-0 list-none p-0", children: renderLevel(children, level + 1) })
|
|
10869
11715
|
]
|
|
10870
11716
|
},
|
|
10871
11717
|
id
|
|
10872
11718
|
);
|
|
10873
11719
|
});
|
|
10874
|
-
return /* @__PURE__ */ (0,
|
|
11720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("ul", { role: "tree", "aria-label": label, className: (0, import_clsx92.default)("m-0 flex list-none flex-col p-0", className), children: renderLevel(items, 1) });
|
|
10875
11721
|
}
|
|
10876
11722
|
|
|
10877
11723
|
// src/components/lists/table.tsx
|
|
10878
|
-
var
|
|
10879
|
-
var
|
|
10880
|
-
var
|
|
10881
|
-
var
|
|
10882
|
-
var Table = (0,
|
|
11724
|
+
var import_react76 = require("react");
|
|
11725
|
+
var import_clsx93 = __toESM(require("clsx"), 1);
|
|
11726
|
+
var import_lucide_react35 = require("lucide-react");
|
|
11727
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
11728
|
+
var Table = (0, import_react76.forwardRef)(function Table2({ label, density = "default", fixed = false, maxHeight, className, children, ...rest }, ref) {
|
|
10883
11729
|
return (
|
|
10884
11730
|
// The scroll container is separate from the table so the header stays inside the
|
|
10885
11731
|
// scrolling region — a table that is its own scroll container cannot have a sticky
|
|
10886
11732
|
// header.
|
|
10887
11733
|
// The scroll wrapper is required for a <table>, which cannot itself scroll, so this
|
|
10888
11734
|
// takes the scrollbar styling rather than ScrollArea.
|
|
10889
|
-
/* @__PURE__ */ (0,
|
|
11735
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
10890
11736
|
"div",
|
|
10891
11737
|
{
|
|
10892
|
-
className: (0,
|
|
11738
|
+
className: (0, import_clsx93.default)(
|
|
10893
11739
|
"w-full",
|
|
10894
|
-
maxHeight ? (0,
|
|
11740
|
+
maxHeight ? (0, import_clsx93.default)("overflow-auto overscroll-contain", FOCUS_RING_INSET) : "overflow-x-auto",
|
|
10895
11741
|
SCROLLBAR_CLASSES
|
|
10896
11742
|
),
|
|
10897
11743
|
style: maxHeight ? { maxHeight } : void 0,
|
|
10898
11744
|
...maxHeight ? { role: "region", tabIndex: 0, "aria-label": label ? `${label} (scrolls)` : "Table (scrolls)" } : {},
|
|
10899
|
-
children: /* @__PURE__ */ (0,
|
|
11745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
10900
11746
|
"table",
|
|
10901
11747
|
{
|
|
10902
11748
|
ref,
|
|
@@ -10912,9 +11758,9 @@ var Table = (0, import_react72.forwardRef)(function Table2({ label, density = "d
|
|
|
10912
11758
|
)
|
|
10913
11759
|
);
|
|
10914
11760
|
});
|
|
10915
|
-
var TableCaption = (0,
|
|
11761
|
+
var TableCaption = (0, import_react76.forwardRef)(
|
|
10916
11762
|
function TableCaption2({ className, ...rest }, ref) {
|
|
10917
|
-
return /* @__PURE__ */ (0,
|
|
11763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
10918
11764
|
"caption",
|
|
10919
11765
|
{
|
|
10920
11766
|
ref,
|
|
@@ -10924,19 +11770,19 @@ var TableCaption = (0, import_react72.forwardRef)(
|
|
|
10924
11770
|
);
|
|
10925
11771
|
}
|
|
10926
11772
|
);
|
|
10927
|
-
var TableHeader = (0,
|
|
11773
|
+
var TableHeader = (0, import_react76.forwardRef)(
|
|
10928
11774
|
function TableHeader2({ className, ...rest }, ref) {
|
|
10929
|
-
return /* @__PURE__ */ (0,
|
|
11775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("thead", { ref, className: cn("border-b border-default", className), ...rest });
|
|
10930
11776
|
}
|
|
10931
11777
|
);
|
|
10932
|
-
var TableBody = (0,
|
|
11778
|
+
var TableBody = (0, import_react76.forwardRef)(
|
|
10933
11779
|
function TableBody2({ className, ...rest }, ref) {
|
|
10934
|
-
return /* @__PURE__ */ (0,
|
|
11780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("tbody", { ref, className, ...rest });
|
|
10935
11781
|
}
|
|
10936
11782
|
);
|
|
10937
|
-
var TableFooter = (0,
|
|
11783
|
+
var TableFooter = (0, import_react76.forwardRef)(
|
|
10938
11784
|
function TableFooter2({ className, ...rest }, ref) {
|
|
10939
|
-
return /* @__PURE__ */ (0,
|
|
11785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
10940
11786
|
"tfoot",
|
|
10941
11787
|
{
|
|
10942
11788
|
ref,
|
|
@@ -10946,15 +11792,15 @@ var TableFooter = (0, import_react72.forwardRef)(
|
|
|
10946
11792
|
);
|
|
10947
11793
|
}
|
|
10948
11794
|
);
|
|
10949
|
-
var ROW_TONE = (0,
|
|
11795
|
+
var ROW_TONE = (0, import_clsx93.default)(
|
|
10950
11796
|
"data-[tone=muted]:bg-default-secondary",
|
|
10951
11797
|
"data-[tone=brand]:bg-brand-tertiary",
|
|
10952
11798
|
"data-[tone=positive]:bg-positive-tertiary",
|
|
10953
11799
|
"data-[tone=warning]:bg-warning-tertiary",
|
|
10954
11800
|
"data-[tone=danger]:bg-danger-tertiary"
|
|
10955
11801
|
);
|
|
10956
|
-
var TableRow = (0,
|
|
10957
|
-
return /* @__PURE__ */ (0,
|
|
11802
|
+
var TableRow = (0, import_react76.forwardRef)(function TableRow2({ selected, tone = "default", dimmed = false, className, ...rest }, ref) {
|
|
11803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
10958
11804
|
"tr",
|
|
10959
11805
|
{
|
|
10960
11806
|
ref,
|
|
@@ -10975,9 +11821,9 @@ var TableRow = (0, import_react72.forwardRef)(function TableRow2({ selected, ton
|
|
|
10975
11821
|
);
|
|
10976
11822
|
});
|
|
10977
11823
|
var ALIGN4 = { left: "text-left", center: "text-center", right: "text-right" };
|
|
10978
|
-
var TableHead = (0,
|
|
11824
|
+
var TableHead = (0, import_react76.forwardRef)(function TableHead2({ sort, onSort, align = "left", sticky = false, className, children, ...rest }, ref) {
|
|
10979
11825
|
const sortable = sort !== void 0 && onSort !== void 0;
|
|
10980
|
-
return /* @__PURE__ */ (0,
|
|
11826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
10981
11827
|
"th",
|
|
10982
11828
|
{
|
|
10983
11829
|
ref,
|
|
@@ -10990,27 +11836,27 @@ var TableHead = (0, import_react72.forwardRef)(function TableHead2({ sort, onSor
|
|
|
10990
11836
|
className
|
|
10991
11837
|
),
|
|
10992
11838
|
...rest,
|
|
10993
|
-
children: sortable ? /* @__PURE__ */ (0,
|
|
11839
|
+
children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
10994
11840
|
"button",
|
|
10995
11841
|
{
|
|
10996
11842
|
type: "button",
|
|
10997
11843
|
onClick: onSort,
|
|
10998
|
-
className: (0,
|
|
11844
|
+
className: (0, import_clsx93.default)(
|
|
10999
11845
|
"inline-flex items-center gap-1.5 rounded transition-colors hover:text-default",
|
|
11000
11846
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default"
|
|
11001
11847
|
),
|
|
11002
11848
|
children: [
|
|
11003
11849
|
children,
|
|
11004
|
-
sort === false ? /* @__PURE__ */ (0,
|
|
11850
|
+
sort === false ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react35.ChevronsUpDownIcon, { "aria-hidden": true, className: "size-3.5 opacity-50" }) : sort === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react35.ChevronUpIcon, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react35.ChevronDownIcon, { "aria-hidden": true, className: "size-3.5" })
|
|
11005
11851
|
]
|
|
11006
11852
|
}
|
|
11007
11853
|
) : children
|
|
11008
11854
|
}
|
|
11009
11855
|
);
|
|
11010
11856
|
});
|
|
11011
|
-
var TableCell = (0,
|
|
11857
|
+
var TableCell = (0, import_react76.forwardRef)(function TableCell2({ align = "left", density = "default", header = false, className, ...rest }, ref) {
|
|
11012
11858
|
const Tag = header ? "th" : "td";
|
|
11013
|
-
return /* @__PURE__ */ (0,
|
|
11859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11014
11860
|
Tag,
|
|
11015
11861
|
{
|
|
11016
11862
|
ref,
|
|
@@ -11028,13 +11874,13 @@ var TableCell = (0, import_react72.forwardRef)(function TableCell2({ align = "le
|
|
|
11028
11874
|
});
|
|
11029
11875
|
|
|
11030
11876
|
// src/components/lists/data-table.tsx
|
|
11031
|
-
var
|
|
11032
|
-
var
|
|
11877
|
+
var import_react78 = require("react");
|
|
11878
|
+
var import_clsx97 = __toESM(require("clsx"), 1);
|
|
11033
11879
|
var import_react_table = require("@tanstack/react-table");
|
|
11034
11880
|
|
|
11035
11881
|
// src/components/feedback/empty-state.tsx
|
|
11036
|
-
var
|
|
11037
|
-
var
|
|
11882
|
+
var import_clsx94 = __toESM(require("clsx"), 1);
|
|
11883
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
11038
11884
|
var SIZES = {
|
|
11039
11885
|
sm: "py-8",
|
|
11040
11886
|
md: "py-12",
|
|
@@ -11053,11 +11899,11 @@ function EmptyState({
|
|
|
11053
11899
|
action,
|
|
11054
11900
|
className
|
|
11055
11901
|
}) {
|
|
11056
|
-
return /* @__PURE__ */ (0,
|
|
11902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
11057
11903
|
"div",
|
|
11058
11904
|
{
|
|
11059
11905
|
"data-variant": variant,
|
|
11060
|
-
className: (0,
|
|
11906
|
+
className: (0, import_clsx94.default)(
|
|
11061
11907
|
"flex flex-col items-center justify-center gap-2 px-4 text-center text-body-sm",
|
|
11062
11908
|
SIZES[size2],
|
|
11063
11909
|
TONES[variant],
|
|
@@ -11065,8 +11911,8 @@ function EmptyState({
|
|
|
11065
11911
|
),
|
|
11066
11912
|
"aria-live": variant === "empty" ? void 0 : "polite",
|
|
11067
11913
|
children: [
|
|
11068
|
-
icon && /* @__PURE__ */ (0,
|
|
11069
|
-
/* @__PURE__ */ (0,
|
|
11914
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "text-default-tertiary", children: icon }),
|
|
11915
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("p", { children: message }),
|
|
11070
11916
|
action
|
|
11071
11917
|
]
|
|
11072
11918
|
}
|
|
@@ -11074,20 +11920,20 @@ function EmptyState({
|
|
|
11074
11920
|
}
|
|
11075
11921
|
|
|
11076
11922
|
// src/components/feedback/skeleton.tsx
|
|
11077
|
-
var
|
|
11078
|
-
var
|
|
11079
|
-
var
|
|
11923
|
+
var import_react77 = require("react");
|
|
11924
|
+
var import_clsx95 = __toESM(require("clsx"), 1);
|
|
11925
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
11080
11926
|
var SHAPE2 = {
|
|
11081
11927
|
line: "h-4 rounded",
|
|
11082
11928
|
block: "h-full w-full rounded-lg",
|
|
11083
11929
|
circle: "aspect-square rounded-full"
|
|
11084
11930
|
};
|
|
11085
|
-
var Skeleton = (0,
|
|
11931
|
+
var Skeleton = (0, import_react77.forwardRef)(function Skeleton2({ shape = "line", lines = 1, className, ...rest }, ref) {
|
|
11086
11932
|
if (shape === "line" && lines > 1) {
|
|
11087
|
-
return /* @__PURE__ */ (0,
|
|
11933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { ref, "aria-hidden": true, "data-slot": "skeleton-group", className: "flex flex-col gap-2", ...rest, children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
11088
11934
|
"div",
|
|
11089
11935
|
{
|
|
11090
|
-
className: (0,
|
|
11936
|
+
className: (0, import_clsx95.default)(
|
|
11091
11937
|
"motion-safe:animate-pulse bg-default-tertiary",
|
|
11092
11938
|
SHAPE2.line,
|
|
11093
11939
|
// A ragged last line reads as a paragraph rather than a solid slab.
|
|
@@ -11098,13 +11944,13 @@ var Skeleton = (0, import_react73.forwardRef)(function Skeleton2({ shape = "line
|
|
|
11098
11944
|
index
|
|
11099
11945
|
)) });
|
|
11100
11946
|
}
|
|
11101
|
-
return /* @__PURE__ */ (0,
|
|
11947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
11102
11948
|
"div",
|
|
11103
11949
|
{
|
|
11104
11950
|
ref,
|
|
11105
11951
|
"aria-hidden": true,
|
|
11106
11952
|
"data-slot": "skeleton",
|
|
11107
|
-
className: (0,
|
|
11953
|
+
className: (0, import_clsx95.default)("motion-safe:animate-pulse bg-default-tertiary", SHAPE2[shape], className),
|
|
11108
11954
|
...rest
|
|
11109
11955
|
}
|
|
11110
11956
|
);
|
|
@@ -11139,8 +11985,8 @@ function cardSlots(columns) {
|
|
|
11139
11985
|
}
|
|
11140
11986
|
|
|
11141
11987
|
// src/components/lists/data-table-parts.tsx
|
|
11142
|
-
var
|
|
11143
|
-
var
|
|
11988
|
+
var import_lucide_react36 = require("lucide-react");
|
|
11989
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
11144
11990
|
var SELECT_COLUMN_ID = "select";
|
|
11145
11991
|
function columnLabel(column) {
|
|
11146
11992
|
const meta = column.columnDef.meta;
|
|
@@ -11156,11 +12002,11 @@ function DataTableColumnHeader({
|
|
|
11156
12002
|
const text = title ?? columnLabel(column);
|
|
11157
12003
|
const hidden = column.columnDef.meta?.hideHeader;
|
|
11158
12004
|
if (!column.getCanSort()) {
|
|
11159
|
-
return /* @__PURE__ */ (0,
|
|
12005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: cn(hidden ? "sr-only" : "inline-block w-max whitespace-nowrap", className), children: text });
|
|
11160
12006
|
}
|
|
11161
12007
|
const sorted = column.getIsSorted();
|
|
11162
|
-
const Icon = sorted === "asc" ?
|
|
11163
|
-
return /* @__PURE__ */ (0,
|
|
12008
|
+
const Icon = sorted === "asc" ? import_lucide_react36.ChevronUpIcon : sorted === "desc" ? import_lucide_react36.ChevronDownIcon : import_lucide_react36.ChevronsUpDownIcon;
|
|
12009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
11164
12010
|
"button",
|
|
11165
12011
|
{
|
|
11166
12012
|
type: "button",
|
|
@@ -11174,8 +12020,8 @@ function DataTableColumnHeader({
|
|
|
11174
12020
|
className
|
|
11175
12021
|
),
|
|
11176
12022
|
children: [
|
|
11177
|
-
/* @__PURE__ */ (0,
|
|
11178
|
-
/* @__PURE__ */ (0,
|
|
12023
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: cn(hidden && "sr-only"), children: text }),
|
|
12024
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11179
12025
|
Icon,
|
|
11180
12026
|
{
|
|
11181
12027
|
"aria-hidden": true,
|
|
@@ -11191,7 +12037,7 @@ function createSelectColumn(options = {}) {
|
|
|
11191
12037
|
const { getRowLabel, selectAllLabel = "Select all rows on this page" } = options;
|
|
11192
12038
|
return {
|
|
11193
12039
|
id: SELECT_COLUMN_ID,
|
|
11194
|
-
header: ({ table }) => /* @__PURE__ */ (0,
|
|
12040
|
+
header: ({ table }) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11195
12041
|
Checkbox,
|
|
11196
12042
|
{
|
|
11197
12043
|
"aria-label": selectAllLabel,
|
|
@@ -11200,7 +12046,7 @@ function createSelectColumn(options = {}) {
|
|
|
11200
12046
|
onCheckedChange: (checked) => table.toggleAllPageRowsSelected(checked)
|
|
11201
12047
|
}
|
|
11202
12048
|
),
|
|
11203
|
-
cell: ({ row }) => /* @__PURE__ */ (0,
|
|
12049
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11204
12050
|
Checkbox,
|
|
11205
12051
|
{
|
|
11206
12052
|
"aria-label": getRowLabel ? getRowLabel(row.original) : "Select row",
|
|
@@ -11218,11 +12064,11 @@ function createSelectColumn(options = {}) {
|
|
|
11218
12064
|
function DataTableViewOptions({ table, label = "Columns" }) {
|
|
11219
12065
|
const columns = table.getAllLeafColumns().filter((column) => column.getCanHide());
|
|
11220
12066
|
if (columns.length === 0) return null;
|
|
11221
|
-
return /* @__PURE__ */ (0,
|
|
11222
|
-
/* @__PURE__ */ (0,
|
|
11223
|
-
/* @__PURE__ */ (0,
|
|
11224
|
-
/* @__PURE__ */ (0,
|
|
11225
|
-
columns.map((column) => /* @__PURE__ */ (0,
|
|
12067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(DropdownMenu, { children: [
|
|
12068
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Button, { variant: "neutral", size: "md", leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react36.Columns3Icon, { "aria-hidden": true }), children: label }) }),
|
|
12069
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(DropdownMenuContent, { align: "end", children: [
|
|
12070
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(DropdownMenuLabel, { children: "Show columns" }),
|
|
12071
|
+
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11226
12072
|
DropdownMenuCheckboxItem,
|
|
11227
12073
|
{
|
|
11228
12074
|
checked: column.getIsVisible(),
|
|
@@ -11240,7 +12086,7 @@ function DataTablePagination({
|
|
|
11240
12086
|
summary
|
|
11241
12087
|
}) {
|
|
11242
12088
|
const { pageIndex, pageSize } = table.getState().pagination;
|
|
11243
|
-
return /* @__PURE__ */ (0,
|
|
12089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11244
12090
|
PaginationBar,
|
|
11245
12091
|
{
|
|
11246
12092
|
page: pageIndex + 1,
|
|
@@ -11256,8 +12102,8 @@ function DataTablePagination({
|
|
|
11256
12102
|
}
|
|
11257
12103
|
|
|
11258
12104
|
// src/components/lists/data-table-cells.tsx
|
|
11259
|
-
var
|
|
11260
|
-
var
|
|
12105
|
+
var import_clsx96 = __toESM(require("clsx"), 1);
|
|
12106
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
11261
12107
|
function textFromNode(node) {
|
|
11262
12108
|
if (typeof node === "string") return node;
|
|
11263
12109
|
if (typeof node === "number") return String(node);
|
|
@@ -11268,23 +12114,23 @@ function textFromNode(node) {
|
|
|
11268
12114
|
return void 0;
|
|
11269
12115
|
}
|
|
11270
12116
|
function TableCellLeadText({ primary, secondary, size: size2 = "md", className }) {
|
|
11271
|
-
return /* @__PURE__ */ (0,
|
|
11272
|
-
/* @__PURE__ */ (0,
|
|
12117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: (0, import_clsx96.default)("flex min-w-0 flex-col gap-0.5", className), children: [
|
|
12118
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11273
12119
|
"span",
|
|
11274
12120
|
{
|
|
11275
12121
|
title: primary,
|
|
11276
|
-
className: (0,
|
|
12122
|
+
className: (0, import_clsx96.default)(
|
|
11277
12123
|
"block truncate font-medium leading-snug text-default",
|
|
11278
12124
|
size2 === "sm" ? "text-body-xs" : "text-body-sm"
|
|
11279
12125
|
),
|
|
11280
12126
|
children: primary
|
|
11281
12127
|
}
|
|
11282
12128
|
),
|
|
11283
|
-
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0,
|
|
12129
|
+
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11284
12130
|
"span",
|
|
11285
12131
|
{
|
|
11286
12132
|
title: String(secondary),
|
|
11287
|
-
className: (0,
|
|
12133
|
+
className: (0, import_clsx96.default)(
|
|
11288
12134
|
"block truncate font-normal leading-tight text-default-secondary",
|
|
11289
12135
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs"
|
|
11290
12136
|
),
|
|
@@ -11293,10 +12139,10 @@ function TableCellLeadText({ primary, secondary, size: size2 = "md", className }
|
|
|
11293
12139
|
) : (
|
|
11294
12140
|
// An element brings its own overflow handling, so it gets no `truncate` here,
|
|
11295
12141
|
// which a card layout's touch un-truncation would otherwise turn into wrapping.
|
|
11296
|
-
/* @__PURE__ */ (0,
|
|
12142
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11297
12143
|
"span",
|
|
11298
12144
|
{
|
|
11299
|
-
className: (0,
|
|
12145
|
+
className: (0, import_clsx96.default)(
|
|
11300
12146
|
"block min-w-0 font-normal leading-tight text-default-secondary",
|
|
11301
12147
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs"
|
|
11302
12148
|
),
|
|
@@ -11313,11 +12159,11 @@ function TableCellText({
|
|
|
11313
12159
|
truncate = true,
|
|
11314
12160
|
className
|
|
11315
12161
|
}) {
|
|
11316
|
-
return /* @__PURE__ */ (0,
|
|
12162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11317
12163
|
"span",
|
|
11318
12164
|
{
|
|
11319
12165
|
title: truncate ? textFromNode(children) : void 0,
|
|
11320
|
-
className: (0,
|
|
12166
|
+
className: (0, import_clsx96.default)(
|
|
11321
12167
|
"font-normal leading-snug",
|
|
11322
12168
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs",
|
|
11323
12169
|
truncate ? "block min-w-0 truncate" : "whitespace-nowrap",
|
|
@@ -11329,15 +12175,15 @@ function TableCellText({
|
|
|
11329
12175
|
);
|
|
11330
12176
|
}
|
|
11331
12177
|
function TableCellBadge({ label, className }) {
|
|
11332
|
-
return /* @__PURE__ */ (0,
|
|
12178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11333
12179
|
"span",
|
|
11334
12180
|
{
|
|
11335
12181
|
title: label,
|
|
11336
|
-
className: (0,
|
|
12182
|
+
className: (0, import_clsx96.default)(
|
|
11337
12183
|
"inline-flex max-w-full items-center rounded-md border border-default bg-default-secondary px-2 py-0.5 text-body-tiny font-medium text-default-secondary",
|
|
11338
12184
|
className
|
|
11339
12185
|
),
|
|
11340
|
-
children: /* @__PURE__ */ (0,
|
|
12186
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "truncate", children: label })
|
|
11341
12187
|
}
|
|
11342
12188
|
);
|
|
11343
12189
|
}
|
|
@@ -11349,8 +12195,8 @@ function TableCellProgress({
|
|
|
11349
12195
|
className
|
|
11350
12196
|
}) {
|
|
11351
12197
|
const clamped = Math.round(Math.min(100, Math.max(0, percent)));
|
|
11352
|
-
return /* @__PURE__ */ (0,
|
|
11353
|
-
/* @__PURE__ */ (0,
|
|
12198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: (0, import_clsx96.default)("flex w-full min-w-0 items-center gap-2", className), children: [
|
|
12199
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11354
12200
|
ProgressBar,
|
|
11355
12201
|
{
|
|
11356
12202
|
value: clamped,
|
|
@@ -11360,7 +12206,7 @@ function TableCellProgress({
|
|
|
11360
12206
|
"aria-label": label ?? `${clamped}%`
|
|
11361
12207
|
}
|
|
11362
12208
|
),
|
|
11363
|
-
/* @__PURE__ */ (0,
|
|
12209
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("span", { className: "shrink-0 text-body-tiny leading-none tabular-nums text-default-secondary", children: [
|
|
11364
12210
|
clamped,
|
|
11365
12211
|
"%"
|
|
11366
12212
|
] })
|
|
@@ -11368,11 +12214,11 @@ function TableCellProgress({
|
|
|
11368
12214
|
}
|
|
11369
12215
|
|
|
11370
12216
|
// src/components/lists/data-table.tsx
|
|
11371
|
-
var
|
|
12217
|
+
var import_jsx_runtime120 = (
|
|
11372
12218
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
11373
12219
|
require("react/jsx-runtime")
|
|
11374
12220
|
);
|
|
11375
|
-
var
|
|
12221
|
+
var DENSITY3 = {
|
|
11376
12222
|
default: {
|
|
11377
12223
|
headerCell: "px-4 py-3",
|
|
11378
12224
|
headerText: "text-body-xs font-medium text-default-secondary",
|
|
@@ -11398,14 +12244,14 @@ function resolve(updater, previous) {
|
|
|
11398
12244
|
return typeof updater === "function" ? updater(previous) : updater;
|
|
11399
12245
|
}
|
|
11400
12246
|
function useTableState(controlled, initial, onChange) {
|
|
11401
|
-
const [inner, setInner] = (0,
|
|
12247
|
+
const [inner, setInner] = (0, import_react78.useState)(initial);
|
|
11402
12248
|
const value = controlled ?? inner;
|
|
11403
|
-
const latest = (0,
|
|
12249
|
+
const latest = (0, import_react78.useRef)(value);
|
|
11404
12250
|
latest.current = value;
|
|
11405
12251
|
const isControlled = controlled !== void 0;
|
|
11406
|
-
const onChangeRef = (0,
|
|
12252
|
+
const onChangeRef = (0, import_react78.useRef)(onChange);
|
|
11407
12253
|
onChangeRef.current = onChange;
|
|
11408
|
-
const set = (0,
|
|
12254
|
+
const set = (0, import_react78.useCallback)(
|
|
11409
12255
|
(updater) => {
|
|
11410
12256
|
const next = resolve(updater, latest.current);
|
|
11411
12257
|
if (!isControlled) setInner(next);
|
|
@@ -11416,7 +12262,7 @@ function useTableState(controlled, initial, onChange) {
|
|
|
11416
12262
|
return [value, set];
|
|
11417
12263
|
}
|
|
11418
12264
|
function CellInteractionGuard({ children }) {
|
|
11419
|
-
return /* @__PURE__ */ (0,
|
|
12265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11420
12266
|
"div",
|
|
11421
12267
|
{
|
|
11422
12268
|
className: "contents",
|
|
@@ -11429,9 +12275,9 @@ function CellInteractionGuard({ children }) {
|
|
|
11429
12275
|
}
|
|
11430
12276
|
var HEADER_PADDING_PX = { default: 32, compact: 24 };
|
|
11431
12277
|
function useHeaderWidths(padding2, deps) {
|
|
11432
|
-
const nodes = (0,
|
|
11433
|
-
const [widths, setWidths] = (0,
|
|
11434
|
-
const measure = (0,
|
|
12278
|
+
const nodes = (0, import_react78.useRef)(/* @__PURE__ */ new Map());
|
|
12279
|
+
const [widths, setWidths] = (0, import_react78.useState)({});
|
|
12280
|
+
const measure = (0, import_react78.useCallback)(() => {
|
|
11435
12281
|
const next = {};
|
|
11436
12282
|
nodes.current.forEach((node, id) => {
|
|
11437
12283
|
next[id] = Math.ceil(node.getBoundingClientRect().width) + padding2;
|
|
@@ -11442,15 +12288,15 @@ function useHeaderWidths(padding2, deps) {
|
|
|
11442
12288
|
return same ? previous : next;
|
|
11443
12289
|
});
|
|
11444
12290
|
}, [padding2]);
|
|
11445
|
-
(0,
|
|
11446
|
-
(0,
|
|
12291
|
+
(0, import_react78.useLayoutEffect)(measure, [measure, deps]);
|
|
12292
|
+
(0, import_react78.useLayoutEffect)(() => {
|
|
11447
12293
|
let live = true;
|
|
11448
12294
|
void document.fonts?.ready.then(() => live && measure());
|
|
11449
12295
|
return () => {
|
|
11450
12296
|
live = false;
|
|
11451
12297
|
};
|
|
11452
12298
|
}, [measure]);
|
|
11453
|
-
const register = (0,
|
|
12299
|
+
const register = (0, import_react78.useCallback)(
|
|
11454
12300
|
(id) => (node) => {
|
|
11455
12301
|
if (node) nodes.current.set(id, node);
|
|
11456
12302
|
else nodes.current.delete(id);
|
|
@@ -11460,9 +12306,9 @@ function useHeaderWidths(padding2, deps) {
|
|
|
11460
12306
|
return { widths, register };
|
|
11461
12307
|
}
|
|
11462
12308
|
function useScrollEdges() {
|
|
11463
|
-
const [node, setNode] = (0,
|
|
11464
|
-
const [edges, setEdges] = (0,
|
|
11465
|
-
const measure = (0,
|
|
12309
|
+
const [node, setNode] = (0, import_react78.useState)(null);
|
|
12310
|
+
const [edges, setEdges] = (0, import_react78.useState)({ overflowing: false, atStart: true, atEnd: true, overflowingY: false, atTop: true });
|
|
12311
|
+
const measure = (0, import_react78.useCallback)(() => {
|
|
11466
12312
|
if (!node) return;
|
|
11467
12313
|
const { scrollLeft, scrollWidth, clientWidth, scrollTop, scrollHeight, clientHeight } = node;
|
|
11468
12314
|
const next = {
|
|
@@ -11476,7 +12322,7 @@ function useScrollEdges() {
|
|
|
11476
12322
|
(previous) => previous.overflowing === next.overflowing && previous.atStart === next.atStart && previous.atEnd === next.atEnd && previous.overflowingY === next.overflowingY && previous.atTop === next.atTop ? previous : next
|
|
11477
12323
|
);
|
|
11478
12324
|
}, [node]);
|
|
11479
|
-
(0,
|
|
12325
|
+
(0, import_react78.useLayoutEffect)(() => {
|
|
11480
12326
|
if (!node) return;
|
|
11481
12327
|
measure();
|
|
11482
12328
|
if (typeof ResizeObserver === "undefined") return;
|
|
@@ -11489,7 +12335,7 @@ function useScrollEdges() {
|
|
|
11489
12335
|
}
|
|
11490
12336
|
var serverSortedValue = () => void 0;
|
|
11491
12337
|
function defaultRowLink({ children, ...props }) {
|
|
11492
|
-
return /* @__PURE__ */ (0,
|
|
12338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("a", { ...props, children });
|
|
11493
12339
|
}
|
|
11494
12340
|
function DataTable({
|
|
11495
12341
|
columns,
|
|
@@ -11530,6 +12376,7 @@ function DataTable({
|
|
|
11530
12376
|
onColumnVisibilityChange,
|
|
11531
12377
|
onRowSelectionChange,
|
|
11532
12378
|
tableOptions,
|
|
12379
|
+
bordered = true,
|
|
11533
12380
|
className
|
|
11534
12381
|
}) {
|
|
11535
12382
|
if (!label && !caption) {
|
|
@@ -11552,7 +12399,7 @@ function DataTable({
|
|
|
11552
12399
|
onColumnVisibilityChange
|
|
11553
12400
|
);
|
|
11554
12401
|
const [rowSelection, setRowSelection] = useTableState(state.rowSelection, {}, onRowSelectionChange);
|
|
11555
|
-
const allColumns = (0,
|
|
12402
|
+
const allColumns = (0, import_react78.useMemo)(() => {
|
|
11556
12403
|
let cols = columns;
|
|
11557
12404
|
if (manual.sorting) {
|
|
11558
12405
|
cols = cols.map(
|
|
@@ -11588,8 +12435,8 @@ function DataTable({
|
|
|
11588
12435
|
enableSortingRemoval: false,
|
|
11589
12436
|
...tableOptions
|
|
11590
12437
|
});
|
|
11591
|
-
const selectionReported = (0,
|
|
11592
|
-
(0,
|
|
12438
|
+
const selectionReported = (0, import_react78.useRef)(false);
|
|
12439
|
+
(0, import_react78.useEffect)(() => {
|
|
11593
12440
|
if (!onSelectionChange) return;
|
|
11594
12441
|
if (!selectionReported.current) {
|
|
11595
12442
|
selectionReported.current = true;
|
|
@@ -11598,8 +12445,9 @@ function DataTable({
|
|
|
11598
12445
|
onSelectionChange(table.getSelectedRowModel().rows.map((row) => row.original));
|
|
11599
12446
|
}, [rowSelection]);
|
|
11600
12447
|
const [wrapRef, containerWidth] = useElementWidth();
|
|
12448
|
+
const captionId = (0, import_react78.useId)();
|
|
11601
12449
|
const breakpoint = responsive === false ? 0 : typeof responsive === "object" ? responsive.breakpoint ?? DEFAULT_CARD_BREAKPOINT_PX : DEFAULT_CARD_BREAKPOINT_PX;
|
|
11602
|
-
const modeRef = (0,
|
|
12450
|
+
const modeRef = (0, import_react78.useRef)("table");
|
|
11603
12451
|
const mode = nextLayoutMode(modeRef.current, containerWidth, breakpoint);
|
|
11604
12452
|
modeRef.current = mode;
|
|
11605
12453
|
const search = searchable === true ? {} : searchable || void 0;
|
|
@@ -11612,16 +12460,16 @@ function DataTable({
|
|
|
11612
12460
|
const filtering = Boolean(globalFilter) || columnFilters.length > 0;
|
|
11613
12461
|
const rows = table.getRowModel().rows;
|
|
11614
12462
|
const isEmpty = !loading && !error && rows.length === 0;
|
|
11615
|
-
const placeholder = error ? /* @__PURE__ */ (0,
|
|
12463
|
+
const placeholder = error ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11616
12464
|
EmptyState,
|
|
11617
12465
|
{
|
|
11618
12466
|
message: typeof error === "string" ? error : "Something went wrong loading this data.",
|
|
11619
12467
|
variant: "error",
|
|
11620
12468
|
size: "md",
|
|
11621
|
-
action: onRetry ? /* @__PURE__ */ (0,
|
|
12469
|
+
action: onRetry ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Button, { variant: "neutral", size: "sm", onClick: onRetry, children: "Retry" }) : void 0,
|
|
11622
12470
|
className: "mx-auto max-w-[520px]"
|
|
11623
12471
|
}
|
|
11624
|
-
) : isEmpty ? typeof empty === "string" ? /* @__PURE__ */ (0,
|
|
12472
|
+
) : isEmpty ? typeof empty === "string" ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(EmptyState, { message: empty, size: "md", className: "mx-auto max-w-[520px]" }) : empty : null;
|
|
11625
12473
|
const resultCount = manual.filtering ? table.getRowCount() : table.getFilteredRowModel().rows.length;
|
|
11626
12474
|
const showToolbar = Boolean(search || toolbar || showColumnMenu);
|
|
11627
12475
|
const showPager = paginated && !error && table.getRowCount() > 0;
|
|
@@ -11629,6 +12477,7 @@ function DataTable({
|
|
|
11629
12477
|
table,
|
|
11630
12478
|
label,
|
|
11631
12479
|
caption,
|
|
12480
|
+
captionId,
|
|
11632
12481
|
density,
|
|
11633
12482
|
align,
|
|
11634
12483
|
loading,
|
|
@@ -11642,9 +12491,9 @@ function DataTable({
|
|
|
11642
12491
|
getRowLabel,
|
|
11643
12492
|
maxHeight
|
|
11644
12493
|
};
|
|
11645
|
-
return /* @__PURE__ */ (0,
|
|
11646
|
-
showToolbar && /* @__PURE__ */ (0,
|
|
11647
|
-
search && /* @__PURE__ */ (0,
|
|
12494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { "data-slot": "data-table", className: cn("relative flex flex-col gap-3", className), children: [
|
|
12495
|
+
showToolbar && /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: cn("flex flex-wrap items-center gap-2", !bordered && "px-4 pt-3"), children: [
|
|
12496
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11648
12497
|
SearchInput,
|
|
11649
12498
|
{
|
|
11650
12499
|
size: "md",
|
|
@@ -11657,13 +12506,14 @@ function DataTable({
|
|
|
11657
12506
|
}
|
|
11658
12507
|
),
|
|
11659
12508
|
toolbar,
|
|
11660
|
-
showColumnMenu && /* @__PURE__ */ (0,
|
|
12509
|
+
showColumnMenu && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "ml-auto", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DataTableViewOptions, { table }) })
|
|
11661
12510
|
] }),
|
|
11662
|
-
/* @__PURE__ */ (0,
|
|
11663
|
-
/* @__PURE__ */ (0,
|
|
11664
|
-
mode === "cards"
|
|
11665
|
-
|
|
11666
|
-
|
|
12511
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { role: "status", "aria-live": "polite", className: "sr-only", children: filtering && !loading ? `${resultCount} ${resultCount === 1 ? "result" : "results"}` : "" }),
|
|
12512
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { ref: wrapRef, className: cn("overflow-hidden bg-default", bordered && "rounded-xl border border-default"), children: [
|
|
12513
|
+
mode === "cards" && caption && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { id: captionId, className: "px-4 pt-3 text-left text-body-sm text-default-secondary", children: caption }),
|
|
12514
|
+
mode === "cards" ? maxHeight ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CardScroll, { label, maxHeight, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CardList, { ...view }) }) : /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CardList, { ...view }) : /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(TableView, { ...view }),
|
|
12515
|
+
showPager && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "border-t border-default px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DataTablePagination, { table, pageSizeOptions }) }),
|
|
12516
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "border-t border-default px-4 py-3", children: footer })
|
|
11667
12517
|
] })
|
|
11668
12518
|
] });
|
|
11669
12519
|
}
|
|
@@ -11687,7 +12537,7 @@ function TableView({
|
|
|
11687
12537
|
getRowDimmed,
|
|
11688
12538
|
maxHeight
|
|
11689
12539
|
}) {
|
|
11690
|
-
const d =
|
|
12540
|
+
const d = DENSITY3[density];
|
|
11691
12541
|
const columns = table.getVisibleLeafColumns();
|
|
11692
12542
|
const scroll = useScrollEdges();
|
|
11693
12543
|
const headers = useHeaderWidths(HEADER_PADDING_PX[density], columns.map((column) => column.id).join());
|
|
@@ -11701,7 +12551,7 @@ function TableView({
|
|
|
11701
12551
|
const hasSticky = Boolean(stickyStart || stickyEnd);
|
|
11702
12552
|
const titleId = titleColumnId(columns);
|
|
11703
12553
|
const rowAction = getRowHref ? "link" : onRowClick ? "click" : null;
|
|
11704
|
-
const stickyClass = (id, header) => (0,
|
|
12554
|
+
const stickyClass = (id, header) => (0, import_clsx97.default)(
|
|
11705
12555
|
id === stickyStart && [
|
|
11706
12556
|
"sticky left-0 z-raised",
|
|
11707
12557
|
// A hairline where content slides under the pinned column, once it has scrolled.
|
|
@@ -11716,9 +12566,9 @@ function TableView({
|
|
|
11716
12566
|
const scrolls = scroll.overflowing || Boolean(maxHeight) && scroll.overflowingY;
|
|
11717
12567
|
const direction = scroll.overflowing && maxHeight && scroll.overflowingY ? "scrolls" : scroll.overflowing ? "scrolls horizontally" : "scrolls vertically";
|
|
11718
12568
|
const regionLabel = `${label ?? "Table"} (${direction})`;
|
|
11719
|
-
const pinnedHeader = maxHeight ? (0,
|
|
11720
|
-
return /* @__PURE__ */ (0,
|
|
11721
|
-
/* @__PURE__ */ (0,
|
|
12569
|
+
const pinnedHeader = maxHeight ? (0, import_clsx97.default)("sticky top-0 z-sticky bg-default-secondary", !scroll.atTop && "shadow-[inset_0_-1px_0_var(--color-border-default-default)]") : void 0;
|
|
12570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "relative", children: [
|
|
12571
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11722
12572
|
"div",
|
|
11723
12573
|
{
|
|
11724
12574
|
ref: scroll.ref,
|
|
@@ -11730,18 +12580,18 @@ function TableView({
|
|
|
11730
12580
|
),
|
|
11731
12581
|
style: maxHeight ? { maxHeight } : void 0,
|
|
11732
12582
|
...scrolls ? { role: "region", tabIndex: 0, "aria-label": regionLabel } : {},
|
|
11733
|
-
children: /* @__PURE__ */ (0,
|
|
12583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
11734
12584
|
"table",
|
|
11735
12585
|
{
|
|
11736
12586
|
className: "w-full table-fixed border-collapse text-left",
|
|
11737
12587
|
style: showPlaceholder ? void 0 : { minWidth },
|
|
11738
12588
|
"aria-busy": loading || void 0,
|
|
11739
12589
|
children: [
|
|
11740
|
-
caption ? /* @__PURE__ */ (0,
|
|
11741
|
-
/* @__PURE__ */ (0,
|
|
12590
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("caption", { className: "px-4 pt-3 text-left text-body-sm text-default-secondary", children: caption }) : label && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("caption", { className: "sr-only", children: label }),
|
|
12591
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("colgroup", { children: columns.map((column) => {
|
|
11742
12592
|
const meta = column.columnDef.meta;
|
|
11743
12593
|
const floor = headers.widths[column.id] ?? 0;
|
|
11744
|
-
return /* @__PURE__ */ (0,
|
|
12594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11745
12595
|
"col",
|
|
11746
12596
|
{
|
|
11747
12597
|
style: meta?.grow || !meta?.width ? void 0 : { width: floor > widthToPx(meta.width) ? floor : meta.width }
|
|
@@ -11749,12 +12599,12 @@ function TableView({
|
|
|
11749
12599
|
column.id
|
|
11750
12600
|
);
|
|
11751
12601
|
}) }),
|
|
11752
|
-
/* @__PURE__ */ (0,
|
|
12602
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("thead", { children: table.getHeaderGroups().map((group) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("tr", { className: "bg-default-secondary", children: group.headers.map((header) => {
|
|
11753
12603
|
const meta = header.column.columnDef.meta;
|
|
11754
12604
|
const sortable = header.column.getCanSort();
|
|
11755
12605
|
const sorted = header.column.getIsSorted();
|
|
11756
12606
|
const definition = header.column.columnDef.header;
|
|
11757
|
-
return /* @__PURE__ */ (0,
|
|
12607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11758
12608
|
"th",
|
|
11759
12609
|
{
|
|
11760
12610
|
scope: "col",
|
|
@@ -11769,12 +12619,12 @@ function TableView({
|
|
|
11769
12619
|
pinnedHeader,
|
|
11770
12620
|
meta?.headerClassName
|
|
11771
12621
|
),
|
|
11772
|
-
children: header.isPlaceholder ? null : typeof definition === "string" || definition === void 0 ? /* @__PURE__ */ (0,
|
|
12622
|
+
children: header.isPlaceholder ? null : typeof definition === "string" || definition === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { ref: meta?.hideHeader ? void 0 : headers.register(header.column.id), className: "inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DataTableColumnHeader, { column: header.column }) }) : (0, import_react_table.flexRender)(definition, header.getContext())
|
|
11773
12623
|
},
|
|
11774
12624
|
header.id
|
|
11775
12625
|
);
|
|
11776
12626
|
}) }, group.id)) }),
|
|
11777
|
-
/* @__PURE__ */ (0,
|
|
12627
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("tbody", { children: loading && !placeholder ? Array.from({ length: loadingRows }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("tr", { className: (0, import_clsx97.default)(index > 0 && "border-t border-default"), children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("td", { className: (0, import_clsx97.default)(d.bodyCell, "align-middle"), children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Skeleton, { className: column.columnDef.meta?.grow ? "w-[70%]" : "w-[55%]" }) }, column.id)) }, `skeleton-${index}`)) : placeholder ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("td", { colSpan: columns.length, className: "px-4", children: placeholder }) }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11778
12628
|
BodyRow,
|
|
11779
12629
|
{
|
|
11780
12630
|
row,
|
|
@@ -11797,8 +12647,8 @@ function TableView({
|
|
|
11797
12647
|
)
|
|
11798
12648
|
}
|
|
11799
12649
|
),
|
|
11800
|
-
scroll.overflowing && !scroll.atStart && !stickyStart && /* @__PURE__ */ (0,
|
|
11801
|
-
scroll.overflowing && !scroll.atEnd && !stickyEnd && /* @__PURE__ */ (0,
|
|
12650
|
+
scroll.overflowing && !scroll.atStart && !stickyStart && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-y-0 left-0 w-6 bg-gradient-to-r from-default-secondary to-transparent" }),
|
|
12651
|
+
scroll.overflowing && !scroll.atEnd && !stickyEnd && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-y-0 right-0 w-6 bg-gradient-to-l from-default-secondary to-transparent" })
|
|
11802
12652
|
] });
|
|
11803
12653
|
}
|
|
11804
12654
|
function BodyRow({
|
|
@@ -11815,9 +12665,9 @@ function BodyRow({
|
|
|
11815
12665
|
getRowTone,
|
|
11816
12666
|
getRowDimmed
|
|
11817
12667
|
}) {
|
|
11818
|
-
const d =
|
|
12668
|
+
const d = DENSITY3[density];
|
|
11819
12669
|
const href = getRowHref?.(row.original);
|
|
11820
|
-
return /* @__PURE__ */ (0,
|
|
12670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11821
12671
|
TableRow,
|
|
11822
12672
|
{
|
|
11823
12673
|
selected: row.getIsSelected() || void 0,
|
|
@@ -11842,7 +12692,7 @@ function BodyRow({
|
|
|
11842
12692
|
onRowClick(row.original);
|
|
11843
12693
|
}
|
|
11844
12694
|
} : void 0,
|
|
11845
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0,
|
|
12695
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11846
12696
|
BodyCell,
|
|
11847
12697
|
{
|
|
11848
12698
|
cell,
|
|
@@ -11871,7 +12721,7 @@ function BodyCell({
|
|
|
11871
12721
|
children: content
|
|
11872
12722
|
}, cell.row.original);
|
|
11873
12723
|
}
|
|
11874
|
-
return /* @__PURE__ */ (0,
|
|
12724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11875
12725
|
"td",
|
|
11876
12726
|
{
|
|
11877
12727
|
className: cn(
|
|
@@ -11882,13 +12732,13 @@ function BodyCell({
|
|
|
11882
12732
|
!meta?.interactive && "overflow-hidden",
|
|
11883
12733
|
meta?.cellClassName
|
|
11884
12734
|
),
|
|
11885
|
-
children: meta?.interactive ? /* @__PURE__ */ (0,
|
|
12735
|
+
children: meta?.interactive ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CellInteractionGuard, { children: content }) : content
|
|
11886
12736
|
}
|
|
11887
12737
|
);
|
|
11888
12738
|
}
|
|
11889
12739
|
function CardScroll({ label, maxHeight, children }) {
|
|
11890
12740
|
const scroll = useScrollEdges();
|
|
11891
|
-
return /* @__PURE__ */ (0,
|
|
12741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11892
12742
|
"div",
|
|
11893
12743
|
{
|
|
11894
12744
|
ref: scroll.ref,
|
|
@@ -11903,6 +12753,8 @@ function CardScroll({ label, maxHeight, children }) {
|
|
|
11903
12753
|
function CardList({
|
|
11904
12754
|
table,
|
|
11905
12755
|
label,
|
|
12756
|
+
caption,
|
|
12757
|
+
captionId,
|
|
11906
12758
|
loading,
|
|
11907
12759
|
loadingRows,
|
|
11908
12760
|
placeholder,
|
|
@@ -11913,12 +12765,12 @@ function CardList({
|
|
|
11913
12765
|
getRowDimmed,
|
|
11914
12766
|
getRowLabel
|
|
11915
12767
|
}) {
|
|
11916
|
-
if (placeholder) return /* @__PURE__ */ (0,
|
|
12768
|
+
if (placeholder) return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "px-4", children: placeholder });
|
|
11917
12769
|
if (loading) {
|
|
11918
|
-
return /* @__PURE__ */ (0,
|
|
11919
|
-
/* @__PURE__ */ (0,
|
|
11920
|
-
/* @__PURE__ */ (0,
|
|
11921
|
-
/* @__PURE__ */ (0,
|
|
12770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("ul", { "aria-label": label, "aria-labelledby": !label && caption ? captionId : void 0, "aria-busy": "true", className: "divide-y divide-default", children: Array.from({ length: loadingRows }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("li", { className: "flex flex-col gap-3 p-4", children: [
|
|
12771
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Skeleton, { className: "w-2/3" }),
|
|
12772
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Skeleton, { className: "w-1/2" }),
|
|
12773
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Skeleton, { className: "w-5/6" })
|
|
11922
12774
|
] }, index)) });
|
|
11923
12775
|
}
|
|
11924
12776
|
const columns = table.getVisibleLeafColumns();
|
|
@@ -11926,7 +12778,7 @@ function CardList({
|
|
|
11926
12778
|
const slots = cardSlots(
|
|
11927
12779
|
columns.filter((column) => column.id !== SELECT_COLUMN_ID).map((column) => ({ id: column.id, mobile: column.columnDef.meta?.mobile, column }))
|
|
11928
12780
|
);
|
|
11929
|
-
const trigger = (0,
|
|
12781
|
+
const trigger = (0, import_clsx97.default)(
|
|
11930
12782
|
"block w-full min-w-0 text-left focus-visible:outline-none",
|
|
11931
12783
|
"after:absolute after:inset-0 after:content-['']",
|
|
11932
12784
|
"focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-brand"
|
|
@@ -11934,10 +12786,11 @@ function CardList({
|
|
|
11934
12786
|
return (
|
|
11935
12787
|
// Card mode un-truncates: on touch there is no hover tooltip, so a clipped value would be
|
|
11936
12788
|
// unreadable. `.truncate` cell renderers wrap here instead.
|
|
11937
|
-
/* @__PURE__ */ (0,
|
|
12789
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11938
12790
|
"ul",
|
|
11939
12791
|
{
|
|
11940
12792
|
"aria-label": label,
|
|
12793
|
+
"aria-labelledby": !label && caption ? captionId : void 0,
|
|
11941
12794
|
className: "divide-y divide-default [&_.truncate]:whitespace-normal [&_.truncate]:[overflow-wrap:anywhere]",
|
|
11942
12795
|
children: table.getRowModel().rows.map((row) => {
|
|
11943
12796
|
const cells = new Map(row.getVisibleCells().map((cell) => [cell.column.id, cell]));
|
|
@@ -11948,7 +12801,7 @@ function CardList({
|
|
|
11948
12801
|
const href = getRowHref?.(row.original);
|
|
11949
12802
|
const titleContent = render(slots.title?.id);
|
|
11950
12803
|
const tone = getRowTone?.(row.original);
|
|
11951
|
-
return /* @__PURE__ */ (0,
|
|
12804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
11952
12805
|
"li",
|
|
11953
12806
|
{
|
|
11954
12807
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
@@ -11963,9 +12816,9 @@ function CardList({
|
|
|
11963
12816
|
"data-[state=selected]:bg-brand-tertiary"
|
|
11964
12817
|
),
|
|
11965
12818
|
children: [
|
|
11966
|
-
/* @__PURE__ */ (0,
|
|
11967
|
-
selectable && /* @__PURE__ */ (0,
|
|
11968
|
-
/* @__PURE__ */ (0,
|
|
12819
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
12820
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "relative z-raised shrink-0 pt-0.5", children: render(SELECT_COLUMN_ID) }),
|
|
12821
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "min-w-0 flex-1", children: href ? renderRowLink({ href, [ROW_LINK_ATTR]: "", className: trigger, children: titleContent }, row.original) : onRowClick ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11969
12822
|
"button",
|
|
11970
12823
|
{
|
|
11971
12824
|
type: "button",
|
|
@@ -11977,12 +12830,12 @@ function CardList({
|
|
|
11977
12830
|
) : titleContent }),
|
|
11978
12831
|
slots.status && // A status pill is `nowrap`, so a long label would spill off the card. Let it
|
|
11979
12832
|
// wrap inside the cap instead.
|
|
11980
|
-
/* @__PURE__ */ (0,
|
|
11981
|
-
slots.actions && /* @__PURE__ */ (0,
|
|
12833
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "flex max-w-[45%] shrink-0 justify-end [&_.whitespace-nowrap]:whitespace-normal", children: render(slots.status.id) }),
|
|
12834
|
+
slots.actions && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "relative z-raised shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CellInteractionGuard, { children: render(slots.actions.id) }) })
|
|
11982
12835
|
] }),
|
|
11983
|
-
slots.fields.length > 0 && /* @__PURE__ */ (0,
|
|
11984
|
-
/* @__PURE__ */ (0,
|
|
11985
|
-
/* @__PURE__ */ (0,
|
|
12836
|
+
slots.fields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dl", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,8.5rem),1fr))] gap-x-4 gap-y-2.5", children: slots.fields.map(({ id, column }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: (0, import_clsx97.default)("min-w-0", column.columnDef.meta?.interactive && "relative z-raised"), children: [
|
|
12837
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dt", { className: "text-body-tiny text-default-secondary", children: columnLabel(column) }),
|
|
12838
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dd", { className: "mt-0.5 min-w-0 text-body-xs text-default", children: column.columnDef.meta?.interactive ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CellInteractionGuard, { children: render(id) }) : render(id) })
|
|
11986
12839
|
] }, id)) })
|
|
11987
12840
|
]
|
|
11988
12841
|
},
|
|
@@ -11998,45 +12851,47 @@ function CardList({
|
|
|
11998
12851
|
var import_react_table2 = require("@tanstack/react-table");
|
|
11999
12852
|
|
|
12000
12853
|
// src/components/feedback/inline-alert.tsx
|
|
12001
|
-
var
|
|
12002
|
-
var
|
|
12003
|
-
var
|
|
12854
|
+
var import_clsx98 = __toESM(require("clsx"), 1);
|
|
12855
|
+
var import_lucide_react37 = require("lucide-react");
|
|
12856
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
12004
12857
|
var toneStyles3 = {
|
|
12005
12858
|
info: "border-brand-tertiary bg-brand-tertiary text-brand",
|
|
12006
12859
|
warning: "border-warning-tertiary bg-warning-tertiary text-warning",
|
|
12007
12860
|
danger: "border-danger-tertiary bg-danger-tertiary text-danger",
|
|
12008
|
-
positive: "border-positive-tertiary bg-positive-tertiary text-positive"
|
|
12861
|
+
positive: "border-positive-tertiary bg-positive-tertiary text-positive",
|
|
12862
|
+
neutral: "border-default bg-default text-default-secondary"
|
|
12009
12863
|
};
|
|
12010
12864
|
var toneIcons = {
|
|
12011
|
-
info: /* @__PURE__ */ (0,
|
|
12012
|
-
warning: /* @__PURE__ */ (0,
|
|
12013
|
-
danger: /* @__PURE__ */ (0,
|
|
12014
|
-
positive: /* @__PURE__ */ (0,
|
|
12865
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.InfoIcon, { className: "size-4" }),
|
|
12866
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.TriangleAlertIcon, { className: "size-4" }),
|
|
12867
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.TriangleAlertIcon, { className: "size-4" }),
|
|
12868
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.CircleCheckBigIcon, { className: "size-4" }),
|
|
12869
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.InfoIcon, { className: "size-4 text-icon-default-secondary" })
|
|
12015
12870
|
};
|
|
12016
|
-
function InlineAlert({ tone, children, icon, className }) {
|
|
12871
|
+
function InlineAlert({ tone, children, icon, role, className }) {
|
|
12017
12872
|
const glyph = icon === void 0 ? toneIcons[tone] : icon;
|
|
12018
|
-
return /* @__PURE__ */ (0,
|
|
12873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
12019
12874
|
"div",
|
|
12020
12875
|
{
|
|
12021
12876
|
"data-tone": tone,
|
|
12022
|
-
role: tone === "danger" ? "alert" : "status",
|
|
12023
|
-
className: (0,
|
|
12877
|
+
role: role ?? (tone === "danger" ? "alert" : "status"),
|
|
12878
|
+
className: (0, import_clsx98.default)(
|
|
12024
12879
|
"flex items-start gap-3 rounded-xl border p-4 text-body-xs",
|
|
12025
12880
|
toneStyles3[tone],
|
|
12026
12881
|
className
|
|
12027
12882
|
),
|
|
12028
12883
|
children: [
|
|
12029
|
-
glyph && /* @__PURE__ */ (0,
|
|
12030
|
-
/* @__PURE__ */ (0,
|
|
12884
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { "aria-hidden": true, className: "mt-px shrink-0", children: glyph }),
|
|
12885
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "min-w-0", children })
|
|
12031
12886
|
]
|
|
12032
12887
|
}
|
|
12033
12888
|
);
|
|
12034
12889
|
}
|
|
12035
12890
|
|
|
12036
12891
|
// src/components/feedback/error-boundary.tsx
|
|
12037
|
-
var
|
|
12038
|
-
var
|
|
12039
|
-
var ErrorBoundary = class extends
|
|
12892
|
+
var import_react79 = require("react");
|
|
12893
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
12894
|
+
var ErrorBoundary = class extends import_react79.Component {
|
|
12040
12895
|
constructor() {
|
|
12041
12896
|
super(...arguments);
|
|
12042
12897
|
this.state = { error: null };
|
|
@@ -12055,7 +12910,7 @@ var ErrorBoundary = class extends import_react75.Component {
|
|
|
12055
12910
|
}
|
|
12056
12911
|
render() {
|
|
12057
12912
|
if (!this.state.error) return this.props.children;
|
|
12058
|
-
return this.props.fallback ?? /* @__PURE__ */ (0,
|
|
12913
|
+
return this.props.fallback ?? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12059
12914
|
"div",
|
|
12060
12915
|
{
|
|
12061
12916
|
role: "status",
|
|
@@ -12068,29 +12923,32 @@ var ErrorBoundary = class extends import_react75.Component {
|
|
|
12068
12923
|
};
|
|
12069
12924
|
|
|
12070
12925
|
// src/components/feedback/banner.tsx
|
|
12071
|
-
var
|
|
12072
|
-
var
|
|
12073
|
-
var
|
|
12074
|
-
var
|
|
12926
|
+
var import_react80 = require("react");
|
|
12927
|
+
var import_clsx99 = __toESM(require("clsx"), 1);
|
|
12928
|
+
var import_lucide_react38 = require("lucide-react");
|
|
12929
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
12075
12930
|
var TONE_STYLES3 = {
|
|
12076
12931
|
info: "border-brand-tertiary bg-brand-tertiary text-default",
|
|
12077
12932
|
positive: "border-positive-tertiary bg-positive-tertiary text-default",
|
|
12078
12933
|
warning: "border-warning-tertiary bg-warning-tertiary text-default",
|
|
12079
|
-
danger: "border-danger-tertiary bg-danger-tertiary text-default"
|
|
12934
|
+
danger: "border-danger-tertiary bg-danger-tertiary text-default",
|
|
12935
|
+
neutral: "border-default bg-default text-default"
|
|
12080
12936
|
};
|
|
12081
12937
|
var TONE_ICON_COLOR = {
|
|
12082
12938
|
info: "text-icon-brand",
|
|
12083
12939
|
positive: "text-icon-positive",
|
|
12084
12940
|
warning: "text-icon-warning",
|
|
12085
|
-
danger: "text-icon-danger"
|
|
12941
|
+
danger: "text-icon-danger",
|
|
12942
|
+
neutral: "text-icon-default-secondary"
|
|
12086
12943
|
};
|
|
12087
12944
|
var TONE_ICON2 = {
|
|
12088
|
-
info: /* @__PURE__ */ (0,
|
|
12089
|
-
positive: /* @__PURE__ */ (0,
|
|
12090
|
-
warning: /* @__PURE__ */ (0,
|
|
12091
|
-
danger: /* @__PURE__ */ (0,
|
|
12945
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.InfoIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12946
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.CircleCheckBigIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12947
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.TriangleAlertIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12948
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.TriangleAlertIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12949
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.InfoIcon, { "aria-hidden": true, className: "size-5" })
|
|
12092
12950
|
};
|
|
12093
|
-
var Banner = (0,
|
|
12951
|
+
var Banner = (0, import_react80.forwardRef)(function Banner2({
|
|
12094
12952
|
title,
|
|
12095
12953
|
children,
|
|
12096
12954
|
variant = "message",
|
|
@@ -12101,9 +12959,9 @@ var Banner = (0, import_react76.forwardRef)(function Banner2({
|
|
|
12101
12959
|
className,
|
|
12102
12960
|
...rest
|
|
12103
12961
|
}, ref) {
|
|
12104
|
-
const titleId = (0,
|
|
12962
|
+
const titleId = (0, import_react80.useId)();
|
|
12105
12963
|
const glyph = icon === void 0 ? TONE_ICON2[tone] : icon;
|
|
12106
|
-
return /* @__PURE__ */ (0,
|
|
12964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
12107
12965
|
"div",
|
|
12108
12966
|
{
|
|
12109
12967
|
"data-tone": tone,
|
|
@@ -12112,20 +12970,20 @@ var Banner = (0, import_react76.forwardRef)(function Banner2({
|
|
|
12112
12970
|
role: variant === "alert" ? "alert" : "status",
|
|
12113
12971
|
"aria-labelledby": titleId,
|
|
12114
12972
|
"data-slot": "banner",
|
|
12115
|
-
className: (0,
|
|
12973
|
+
className: (0, import_clsx99.default)(
|
|
12116
12974
|
"flex w-full items-start gap-3 rounded-xl border p-4",
|
|
12117
12975
|
TONE_STYLES3[tone],
|
|
12118
12976
|
className
|
|
12119
12977
|
),
|
|
12120
12978
|
...rest,
|
|
12121
12979
|
children: [
|
|
12122
|
-
glyph && /* @__PURE__ */ (0,
|
|
12123
|
-
/* @__PURE__ */ (0,
|
|
12124
|
-
/* @__PURE__ */ (0,
|
|
12125
|
-
children && /* @__PURE__ */ (0,
|
|
12126
|
-
action && /* @__PURE__ */ (0,
|
|
12980
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { "aria-hidden": true, className: (0, import_clsx99.default)("mt-px shrink-0", TONE_ICON_COLOR[tone]), children: glyph }),
|
|
12981
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
12982
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { id: titleId, className: "text-body-sm font-semibold text-default", children: title }),
|
|
12983
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "mt-1 text-body-xs text-default-secondary", children }),
|
|
12984
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "mt-3 flex items-center gap-2", children: action })
|
|
12127
12985
|
] }),
|
|
12128
|
-
onDismiss && /* @__PURE__ */ (0,
|
|
12986
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
12129
12987
|
IconButton,
|
|
12130
12988
|
{
|
|
12131
12989
|
variant: "subtle",
|
|
@@ -12133,7 +12991,7 @@ var Banner = (0, import_react76.forwardRef)(function Banner2({
|
|
|
12133
12991
|
"aria-label": typeof title === "string" ? `Dismiss: ${title}` : "Dismiss",
|
|
12134
12992
|
onClick: onDismiss,
|
|
12135
12993
|
className: "-mr-1 -mt-1 shrink-0",
|
|
12136
|
-
children: /* @__PURE__ */ (0,
|
|
12994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.XIcon, { "aria-hidden": true, size: 16 })
|
|
12137
12995
|
}
|
|
12138
12996
|
)
|
|
12139
12997
|
]
|
|
@@ -12142,27 +13000,29 @@ var Banner = (0, import_react76.forwardRef)(function Banner2({
|
|
|
12142
13000
|
});
|
|
12143
13001
|
|
|
12144
13002
|
// src/components/feedback/toast.tsx
|
|
12145
|
-
var
|
|
12146
|
-
var
|
|
12147
|
-
var
|
|
12148
|
-
var
|
|
12149
|
-
var ToastContext = (0,
|
|
13003
|
+
var import_react81 = require("react");
|
|
13004
|
+
var import_clsx100 = __toESM(require("clsx"), 1);
|
|
13005
|
+
var import_lucide_react39 = require("lucide-react");
|
|
13006
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
13007
|
+
var ToastContext = (0, import_react81.createContext)(null);
|
|
12150
13008
|
function useToast() {
|
|
12151
|
-
const context = (0,
|
|
13009
|
+
const context = (0, import_react81.useContext)(ToastContext);
|
|
12152
13010
|
if (!context) throw new Error("useToast() must be used inside <Toaster>");
|
|
12153
13011
|
return context;
|
|
12154
13012
|
}
|
|
12155
13013
|
var TONE_ICON3 = {
|
|
12156
|
-
info: /* @__PURE__ */ (0,
|
|
12157
|
-
positive: /* @__PURE__ */ (0,
|
|
12158
|
-
warning: /* @__PURE__ */ (0,
|
|
12159
|
-
danger: /* @__PURE__ */ (0,
|
|
13014
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.InfoIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13015
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.CircleCheckBigIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13016
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.TriangleAlertIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13017
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.TriangleAlertIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13018
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.InfoIcon, { "aria-hidden": true, className: "size-4" })
|
|
12160
13019
|
};
|
|
12161
13020
|
var TONE_ICON_COLOR2 = {
|
|
12162
13021
|
info: "text-icon-brand",
|
|
12163
13022
|
positive: "text-icon-positive",
|
|
12164
13023
|
warning: "text-icon-warning",
|
|
12165
|
-
danger: "text-icon-danger"
|
|
13024
|
+
danger: "text-icon-danger",
|
|
13025
|
+
neutral: "text-icon-default-secondary"
|
|
12166
13026
|
};
|
|
12167
13027
|
var POSITION = {
|
|
12168
13028
|
"top-left": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] left-4 items-start",
|
|
@@ -12183,10 +13043,10 @@ function Toaster({
|
|
|
12183
13043
|
offset: offset2 = 16,
|
|
12184
13044
|
mobileOffset
|
|
12185
13045
|
}) {
|
|
12186
|
-
const [toasts, setToasts] = (0,
|
|
12187
|
-
const timers = (0,
|
|
12188
|
-
const counter = (0,
|
|
12189
|
-
const dismiss = (0,
|
|
13046
|
+
const [toasts, setToasts] = (0, import_react81.useState)([]);
|
|
13047
|
+
const timers = (0, import_react81.useRef)(/* @__PURE__ */ new Map());
|
|
13048
|
+
const counter = (0, import_react81.useRef)(0);
|
|
13049
|
+
const dismiss = (0, import_react81.useCallback)((id) => {
|
|
12190
13050
|
const timer = timers.current.get(id);
|
|
12191
13051
|
if (timer) {
|
|
12192
13052
|
clearTimeout(timer);
|
|
@@ -12194,12 +13054,12 @@ function Toaster({
|
|
|
12194
13054
|
}
|
|
12195
13055
|
setToasts((current) => current.filter((entry) => entry.id !== id));
|
|
12196
13056
|
}, []);
|
|
12197
|
-
const dismissAll = (0,
|
|
13057
|
+
const dismissAll = (0, import_react81.useCallback)(() => {
|
|
12198
13058
|
for (const timer of timers.current.values()) clearTimeout(timer);
|
|
12199
13059
|
timers.current.clear();
|
|
12200
13060
|
setToasts([]);
|
|
12201
13061
|
}, []);
|
|
12202
|
-
const toast = (0,
|
|
13062
|
+
const toast = (0, import_react81.useCallback)(
|
|
12203
13063
|
(options) => {
|
|
12204
13064
|
counter.current += 1;
|
|
12205
13065
|
const id = `toast-${counter.current}`;
|
|
@@ -12215,23 +13075,23 @@ function Toaster({
|
|
|
12215
13075
|
},
|
|
12216
13076
|
[duration, max, dismiss]
|
|
12217
13077
|
);
|
|
12218
|
-
(0,
|
|
13078
|
+
(0, import_react81.useEffect)(() => {
|
|
12219
13079
|
const map = timers.current;
|
|
12220
13080
|
return () => {
|
|
12221
13081
|
for (const timer of map.values()) clearTimeout(timer);
|
|
12222
13082
|
map.clear();
|
|
12223
13083
|
};
|
|
12224
13084
|
}, []);
|
|
12225
|
-
const context = (0,
|
|
12226
|
-
return /* @__PURE__ */ (0,
|
|
13085
|
+
const context = (0, import_react81.useMemo)(() => ({ toast, dismiss, dismissAll }), [toast, dismiss, dismissAll]);
|
|
13086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(ToastContext.Provider, { value: context, children: [
|
|
12227
13087
|
children,
|
|
12228
|
-
/* @__PURE__ */ (0,
|
|
13088
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12229
13089
|
"div",
|
|
12230
13090
|
{
|
|
12231
13091
|
"aria-live": "polite",
|
|
12232
13092
|
"aria-atomic": "false",
|
|
12233
13093
|
...{ [TOASTER_ATTRIBUTE]: "" },
|
|
12234
|
-
className: (0,
|
|
13094
|
+
className: (0, import_clsx100.default)(
|
|
12235
13095
|
"pointer-events-none fixed z-toast flex w-[calc(100%-2rem)] max-w-[380px] flex-col gap-2",
|
|
12236
13096
|
POSITION[position]
|
|
12237
13097
|
),
|
|
@@ -12239,29 +13099,29 @@ function Toaster({
|
|
|
12239
13099
|
"--toaster-offset": toLength(offset2),
|
|
12240
13100
|
"--toaster-mobile-offset": toLength(mobileOffset ?? offset2)
|
|
12241
13101
|
},
|
|
12242
|
-
children: toasts.map((entry) => /* @__PURE__ */ (0,
|
|
13102
|
+
children: toasts.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ToastItem, { toast: entry, onDismiss: () => dismiss(entry.id) }, entry.id))
|
|
12243
13103
|
}
|
|
12244
13104
|
) })
|
|
12245
13105
|
] });
|
|
12246
13106
|
}
|
|
12247
13107
|
function ToastItem({ toast, onDismiss }) {
|
|
12248
13108
|
const tone = toast.tone ?? "info";
|
|
12249
|
-
return /* @__PURE__ */ (0,
|
|
13109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
12250
13110
|
"div",
|
|
12251
13111
|
{
|
|
12252
13112
|
role: tone === "danger" ? "alert" : "status",
|
|
12253
|
-
className: (0,
|
|
13113
|
+
className: (0, import_clsx100.default)(
|
|
12254
13114
|
"pointer-events-auto flex w-full items-start gap-3 rounded-xl border border-default",
|
|
12255
13115
|
"bg-default p-4 shadow-400"
|
|
12256
13116
|
),
|
|
12257
13117
|
children: [
|
|
12258
|
-
/* @__PURE__ */ (0,
|
|
12259
|
-
/* @__PURE__ */ (0,
|
|
12260
|
-
/* @__PURE__ */ (0,
|
|
12261
|
-
toast.description && /* @__PURE__ */ (0,
|
|
12262
|
-
toast.action && /* @__PURE__ */ (0,
|
|
13118
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { "aria-hidden": true, className: (0, import_clsx100.default)("mt-px shrink-0", TONE_ICON_COLOR2[tone]), children: TONE_ICON3[tone] }),
|
|
13119
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
13120
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "text-body-sm font-semibold text-default", children: toast.title }),
|
|
13121
|
+
toast.description && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: toast.description }),
|
|
13122
|
+
toast.action && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "mt-2 flex items-center gap-2", children: toast.action })
|
|
12263
13123
|
] }),
|
|
12264
|
-
/* @__PURE__ */ (0,
|
|
13124
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12265
13125
|
IconButton,
|
|
12266
13126
|
{
|
|
12267
13127
|
variant: "subtle",
|
|
@@ -12269,7 +13129,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
12269
13129
|
"aria-label": typeof toast.title === "string" ? `Dismiss: ${toast.title}` : "Dismiss",
|
|
12270
13130
|
onClick: onDismiss,
|
|
12271
13131
|
className: "-mr-1 -mt-1 shrink-0",
|
|
12272
|
-
children: /* @__PURE__ */ (0,
|
|
13132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.XIcon, { "aria-hidden": true, size: 14 })
|
|
12273
13133
|
}
|
|
12274
13134
|
)
|
|
12275
13135
|
]
|
|
@@ -12278,25 +13138,25 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
12278
13138
|
}
|
|
12279
13139
|
|
|
12280
13140
|
// src/components/forms/password-input.tsx
|
|
12281
|
-
var
|
|
12282
|
-
var
|
|
12283
|
-
var
|
|
12284
|
-
var PasswordInput = (0,
|
|
12285
|
-
const [visible, setVisible] = (0,
|
|
12286
|
-
return /* @__PURE__ */ (0,
|
|
13141
|
+
var import_react82 = require("react");
|
|
13142
|
+
var import_lucide_react40 = require("lucide-react");
|
|
13143
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
13144
|
+
var PasswordInput = (0, import_react82.forwardRef)(function PasswordInput2(props, ref) {
|
|
13145
|
+
const [visible, setVisible] = (0, import_react82.useState)(false);
|
|
13146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12287
13147
|
Input,
|
|
12288
13148
|
{
|
|
12289
13149
|
ref,
|
|
12290
13150
|
...props,
|
|
12291
13151
|
type: visible ? "text" : "password",
|
|
12292
|
-
trailingAction: /* @__PURE__ */ (0,
|
|
13152
|
+
trailingAction: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12293
13153
|
"button",
|
|
12294
13154
|
{
|
|
12295
13155
|
type: "button",
|
|
12296
13156
|
"aria-label": visible ? "Hide password" : "Show password",
|
|
12297
13157
|
onClick: () => setVisible((v) => !v),
|
|
12298
13158
|
className: "flex items-center justify-center rounded transition-colors hover:text-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
12299
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
13159
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_lucide_react40.EyeOffIcon, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_lucide_react40.EyeIcon, { "aria-hidden": true, className: "size-4" })
|
|
12300
13160
|
}
|
|
12301
13161
|
)
|
|
12302
13162
|
}
|
|
@@ -12304,31 +13164,31 @@ var PasswordInput = (0, import_react78.forwardRef)(function PasswordInput2(props
|
|
|
12304
13164
|
});
|
|
12305
13165
|
|
|
12306
13166
|
// src/components/ai/ai-chat-bar.tsx
|
|
12307
|
-
var
|
|
12308
|
-
var
|
|
12309
|
-
var
|
|
13167
|
+
var import_clsx101 = __toESM(require("clsx"), 1);
|
|
13168
|
+
var import_lucide_react41 = require("lucide-react");
|
|
13169
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
12310
13170
|
function AIChatBar({
|
|
12311
13171
|
placeholder = "Ask Intelligence about any entity, supplier, or risk\u2026",
|
|
12312
13172
|
className
|
|
12313
13173
|
}) {
|
|
12314
|
-
return /* @__PURE__ */ (0,
|
|
13174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
12315
13175
|
"div",
|
|
12316
13176
|
{
|
|
12317
|
-
className: (0,
|
|
13177
|
+
className: (0, import_clsx101.default)(
|
|
12318
13178
|
"flex h-16 items-center gap-3 rounded-2xl border border-default bg-default px-6 shadow-panel",
|
|
12319
13179
|
className
|
|
12320
13180
|
),
|
|
12321
13181
|
children: [
|
|
12322
|
-
/* @__PURE__ */ (0,
|
|
12323
|
-
/* @__PURE__ */ (0,
|
|
12324
|
-
/* @__PURE__ */ (0,
|
|
13182
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react41.SearchIcon, { className: "size-4" }) }),
|
|
13183
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "flex-1 text-body-sm text-default-tertiary truncate", children: placeholder }),
|
|
13184
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
12325
13185
|
"button",
|
|
12326
13186
|
{
|
|
12327
13187
|
type: "button",
|
|
12328
13188
|
className: "inline-flex shrink-0 items-center gap-2 rounded-xl bg-brand px-4 py-3 text-body-sm font-semibold text-brand-on-brand hover:bg-brand-hover transition-colors",
|
|
12329
13189
|
children: [
|
|
12330
13190
|
"Ask",
|
|
12331
|
-
/* @__PURE__ */ (0,
|
|
13191
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react41.ArrowRightIcon, { "aria-hidden": true, className: "size-4" })
|
|
12332
13192
|
]
|
|
12333
13193
|
}
|
|
12334
13194
|
)
|
|
@@ -12338,42 +13198,42 @@ function AIChatBar({
|
|
|
12338
13198
|
}
|
|
12339
13199
|
|
|
12340
13200
|
// src/components/ai/ai-suggestion-chip.tsx
|
|
12341
|
-
var
|
|
12342
|
-
var
|
|
12343
|
-
var
|
|
13201
|
+
var import_clsx102 = __toESM(require("clsx"), 1);
|
|
13202
|
+
var import_lucide_react42 = require("lucide-react");
|
|
13203
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
12344
13204
|
function AISuggestionChip({ prompt, onClick, className }) {
|
|
12345
|
-
return /* @__PURE__ */ (0,
|
|
13205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
12346
13206
|
"button",
|
|
12347
13207
|
{
|
|
12348
13208
|
type: "button",
|
|
12349
13209
|
onClick,
|
|
12350
|
-
className: (0,
|
|
13210
|
+
className: (0, import_clsx102.default)(
|
|
12351
13211
|
"flex h-12 w-full items-center gap-3 rounded-xl border border-default bg-default px-3 text-left hover:bg-default-hover transition-colors",
|
|
12352
13212
|
className
|
|
12353
13213
|
),
|
|
12354
13214
|
children: [
|
|
12355
|
-
/* @__PURE__ */ (0,
|
|
12356
|
-
/* @__PURE__ */ (0,
|
|
12357
|
-
/* @__PURE__ */ (0,
|
|
13215
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-brand", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react42.CpuIcon, { className: "size-4" }) }),
|
|
13216
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "flex-1 text-body-sm text-default truncate", children: prompt }),
|
|
13217
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react42.ArrowRightIcon, { className: "size-3.5", strokeWidth: 2.5 }) })
|
|
12358
13218
|
]
|
|
12359
13219
|
}
|
|
12360
13220
|
);
|
|
12361
13221
|
}
|
|
12362
13222
|
|
|
12363
13223
|
// src/components/ai/quick-actions-bar.tsx
|
|
12364
|
-
var
|
|
12365
|
-
var
|
|
13224
|
+
var import_clsx103 = __toESM(require("clsx"), 1);
|
|
13225
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
12366
13226
|
function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
12367
|
-
return /* @__PURE__ */ (0,
|
|
13227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: (0, import_clsx103.default)("flex flex-wrap items-center gap-3", className), children: actions.map((action) => {
|
|
12368
13228
|
const isActive = active === action.value;
|
|
12369
|
-
return /* @__PURE__ */ (0,
|
|
13229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
12370
13230
|
"button",
|
|
12371
13231
|
{
|
|
12372
13232
|
type: "button",
|
|
12373
13233
|
"aria-pressed": isActive,
|
|
12374
13234
|
onClick: () => onSelect?.(action.value),
|
|
12375
13235
|
className: "rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
12376
|
-
children: /* @__PURE__ */ (0,
|
|
13236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(TagPill, { label: action.label, tone: isActive ? "brand" : "default" })
|
|
12377
13237
|
},
|
|
12378
13238
|
action.value
|
|
12379
13239
|
);
|
|
@@ -12381,25 +13241,25 @@ function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
|
12381
13241
|
}
|
|
12382
13242
|
|
|
12383
13243
|
// src/components/ai/chat.tsx
|
|
12384
|
-
var
|
|
12385
|
-
var
|
|
12386
|
-
var
|
|
13244
|
+
var import_clsx104 = __toESM(require("clsx"), 1);
|
|
13245
|
+
var import_lucide_react43 = require("lucide-react");
|
|
13246
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
12387
13247
|
function AiAvatar({ className, icon }) {
|
|
12388
|
-
return /* @__PURE__ */ (0,
|
|
13248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12389
13249
|
"span",
|
|
12390
13250
|
{
|
|
12391
13251
|
"aria-hidden": true,
|
|
12392
13252
|
className: cn("flex size-8 shrink-0 items-center justify-center rounded-full bg-brand text-icon-brand-on-brand", className),
|
|
12393
|
-
children: icon ?? /* @__PURE__ */ (0,
|
|
13253
|
+
children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react43.CpuIcon, { className: "size-3.5" })
|
|
12394
13254
|
}
|
|
12395
13255
|
);
|
|
12396
13256
|
}
|
|
12397
13257
|
function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
12398
|
-
return /* @__PURE__ */ (0,
|
|
12399
|
-
/* @__PURE__ */ (0,
|
|
12400
|
-
/* @__PURE__ */ (0,
|
|
12401
|
-
/* @__PURE__ */ (0,
|
|
12402
|
-
/* @__PURE__ */ (0,
|
|
13258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { role: "status", "aria-live": "polite", className: cn("flex items-center gap-3", className), children: [
|
|
13259
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AiAvatar, {}),
|
|
13260
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex items-center gap-2 rounded-2xl rounded-tl-sm border border-default bg-default-secondary px-5 py-3", children: [
|
|
13261
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-body-xs text-default-secondary", children: label }),
|
|
13262
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { "aria-hidden": true, className: "flex gap-1", children: [0, 1, 2].map((index) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12403
13263
|
"span",
|
|
12404
13264
|
{
|
|
12405
13265
|
className: "inline-block size-1.5 rounded-full bg-default-tertiary motion-safe:animate-bounce",
|
|
@@ -12412,16 +13272,16 @@ function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
|
12412
13272
|
}
|
|
12413
13273
|
function ChatBubble({ sender, children, failed = false, className }) {
|
|
12414
13274
|
if (sender === "user") {
|
|
12415
|
-
return /* @__PURE__ */ (0,
|
|
13275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { "data-sender": "user", className: cn("flex justify-end", className), children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "max-w-[85%] rounded-[18px] rounded-tr-sm bg-neutral px-5 py-3.5 text-body-sm leading-relaxed text-neutral-on-neutral md:max-w-[441px] md:px-7 md:py-4", children }) });
|
|
12416
13276
|
}
|
|
12417
|
-
return /* @__PURE__ */ (0,
|
|
13277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12418
13278
|
"div",
|
|
12419
13279
|
{
|
|
12420
13280
|
"data-sender": "assistant",
|
|
12421
13281
|
"data-state": failed ? "failed" : void 0,
|
|
12422
13282
|
className: cn(
|
|
12423
13283
|
"rounded-2xl rounded-tl-sm border px-5 py-4 text-body-sm leading-relaxed",
|
|
12424
|
-
(0,
|
|
13284
|
+
(0, import_clsx104.default)(
|
|
12425
13285
|
"border-default bg-default-secondary text-default",
|
|
12426
13286
|
"data-[state=failed]:border-danger-secondary data-[state=failed]:bg-danger-tertiary data-[state=failed]:text-danger"
|
|
12427
13287
|
),
|
|
@@ -12433,17 +13293,17 @@ function ChatBubble({ sender, children, failed = false, className }) {
|
|
|
12433
13293
|
}
|
|
12434
13294
|
|
|
12435
13295
|
// src/components/decorative/aurora-backdrop.tsx
|
|
12436
|
-
var
|
|
13296
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
12437
13297
|
function blob(primitive, alpha) {
|
|
12438
13298
|
return `radial-gradient(ellipse, color-mix(in srgb, var(${primitive}) ${alpha}%, transparent) 0%, transparent 70%)`;
|
|
12439
13299
|
}
|
|
12440
13300
|
function AuroraBackdrop() {
|
|
12441
|
-
return /* @__PURE__ */ (0,
|
|
12442
|
-
/* @__PURE__ */ (0,
|
|
12443
|
-
/* @__PURE__ */ (0,
|
|
12444
|
-
/* @__PURE__ */ (0,
|
|
12445
|
-
/* @__PURE__ */ (0,
|
|
12446
|
-
/* @__PURE__ */ (0,
|
|
13301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": true, children: [
|
|
13302
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute -left-24 -top-28", style: { width: 380, height: 380, background: blob("--prim-red-400", 45) } }),
|
|
13303
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute -top-24 right-[-4%]", style: { width: 320, height: 320, background: blob("--prim-red-300", 40) } }),
|
|
13304
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute bottom-[-10%] right-[14%]", style: { width: 420, height: 420, background: blob("--prim-violet-400", 30) } }),
|
|
13305
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute bottom-[-6%] left-[4%]", style: { width: 280, height: 280, background: blob("--prim-blue-400", 25) } }),
|
|
13306
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute left-[20%] top-[30%]", style: { width: 240, height: 240, background: blob("--prim-blue-300", 18) } })
|
|
12447
13307
|
] });
|
|
12448
13308
|
}
|
|
12449
13309
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -12461,6 +13321,7 @@ function AuroraBackdrop() {
|
|
|
12461
13321
|
Avatar,
|
|
12462
13322
|
AvatarBlock,
|
|
12463
13323
|
AvatarGroup,
|
|
13324
|
+
BADGE_COLORS,
|
|
12464
13325
|
Badge,
|
|
12465
13326
|
Banner,
|
|
12466
13327
|
BarChart,
|
|
@@ -12601,6 +13462,7 @@ function AuroraBackdrop() {
|
|
|
12601
13462
|
Label,
|
|
12602
13463
|
LegendDot,
|
|
12603
13464
|
ListRow,
|
|
13465
|
+
Listbox,
|
|
12604
13466
|
Menubar,
|
|
12605
13467
|
MenubarCheckboxItem,
|
|
12606
13468
|
MenubarContent,
|
|
@@ -12629,7 +13491,9 @@ function AuroraBackdrop() {
|
|
|
12629
13491
|
MultiSelectCard,
|
|
12630
13492
|
NativeSelect,
|
|
12631
13493
|
NativeSelectControl,
|
|
13494
|
+
NavGroupHeader,
|
|
12632
13495
|
NavItem,
|
|
13496
|
+
NavSubItem,
|
|
12633
13497
|
NavigationMenu,
|
|
12634
13498
|
NavigationMenuItem,
|
|
12635
13499
|
NoteConfirmModal,
|
|
@@ -12673,6 +13537,11 @@ function AuroraBackdrop() {
|
|
|
12673
13537
|
Select,
|
|
12674
13538
|
SelectControl,
|
|
12675
13539
|
Separator,
|
|
13540
|
+
Sidebar,
|
|
13541
|
+
SidebarProvider,
|
|
13542
|
+
SidebarSeparator,
|
|
13543
|
+
SidebarTrigger,
|
|
13544
|
+
SidebarUserCard,
|
|
12676
13545
|
Skeleton,
|
|
12677
13546
|
Slider,
|
|
12678
13547
|
Slot,
|
|
@@ -12749,6 +13618,8 @@ function AuroraBackdrop() {
|
|
|
12749
13618
|
createColumnHelper,
|
|
12750
13619
|
createSelectColumn,
|
|
12751
13620
|
currentZoneName,
|
|
13621
|
+
filterNav,
|
|
13622
|
+
filterNavItems,
|
|
12752
13623
|
formatFileSize,
|
|
12753
13624
|
getScoreTone,
|
|
12754
13625
|
nextTier,
|
|
@@ -12768,6 +13639,7 @@ function AuroraBackdrop() {
|
|
|
12768
13639
|
useFilePicker,
|
|
12769
13640
|
useOverlayDismiss,
|
|
12770
13641
|
usePortalContainer,
|
|
13642
|
+
useSidebar,
|
|
12771
13643
|
useToast,
|
|
12772
13644
|
useWidgetHeaderAccessory,
|
|
12773
13645
|
useWidthTier
|