@platned/ui 0.9.5 → 0.9.7
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/LICENSE +31 -0
- package/README.md +8 -0
- package/dist/{chunk-OGQIGGVB.js → chunk-O2Y4XUXQ.js} +2 -1
- package/dist/data-table.js +1 -1
- package/dist/index.cjs +1350 -661
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +288 -3
- package/dist/index.js +1159 -463
- package/dist/index.js.map +1 -1
- package/dist/sidebar.cjs +20 -1158
- 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 +18 -1170
- package/dist/sidebar.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- /package/dist/{chunk-OGQIGGVB.js.map → chunk-O2Y4XUXQ.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -213,7 +213,9 @@ __export(src_exports, {
|
|
|
213
213
|
MultiSelectCard: () => MultiSelectCard,
|
|
214
214
|
NativeSelect: () => NativeSelect,
|
|
215
215
|
NativeSelectControl: () => NativeSelectControl,
|
|
216
|
+
NavGroupHeader: () => NavGroupHeader,
|
|
216
217
|
NavItem: () => NavItem,
|
|
218
|
+
NavSubItem: () => NavSubItem,
|
|
217
219
|
NavigationMenu: () => NavigationMenu,
|
|
218
220
|
NavigationMenuItem: () => NavigationMenuItem,
|
|
219
221
|
NoteConfirmModal: () => NoteConfirmModal,
|
|
@@ -257,6 +259,11 @@ __export(src_exports, {
|
|
|
257
259
|
Select: () => Select,
|
|
258
260
|
SelectControl: () => SelectControl,
|
|
259
261
|
Separator: () => Separator,
|
|
262
|
+
Sidebar: () => Sidebar,
|
|
263
|
+
SidebarProvider: () => SidebarProvider,
|
|
264
|
+
SidebarSeparator: () => SidebarSeparator,
|
|
265
|
+
SidebarTrigger: () => SidebarTrigger,
|
|
266
|
+
SidebarUserCard: () => SidebarUserCard,
|
|
260
267
|
Skeleton: () => Skeleton,
|
|
261
268
|
Slider: () => Slider,
|
|
262
269
|
Slot: () => Slot,
|
|
@@ -333,6 +340,8 @@ __export(src_exports, {
|
|
|
333
340
|
createColumnHelper: () => import_react_table2.createColumnHelper,
|
|
334
341
|
createSelectColumn: () => createSelectColumn,
|
|
335
342
|
currentZoneName: () => currentZoneName,
|
|
343
|
+
filterNav: () => filterNav,
|
|
344
|
+
filterNavItems: () => filterNavItems,
|
|
336
345
|
formatFileSize: () => formatFileSize,
|
|
337
346
|
getScoreTone: () => getScoreTone,
|
|
338
347
|
nextTier: () => nextTier,
|
|
@@ -352,6 +361,7 @@ __export(src_exports, {
|
|
|
352
361
|
useFilePicker: () => useFilePicker,
|
|
353
362
|
useOverlayDismiss: () => useOverlayDismiss,
|
|
354
363
|
usePortalContainer: () => usePortalContainer,
|
|
364
|
+
useSidebar: () => useSidebar,
|
|
355
365
|
useToast: () => useToast,
|
|
356
366
|
useWidgetHeaderAccessory: () => useWidgetHeaderAccessory,
|
|
357
367
|
useWidthTier: () => useWidthTier
|
|
@@ -8626,7 +8636,9 @@ var TabsContent = (0, import_react59.forwardRef)(function TabsContent2({ value,
|
|
|
8626
8636
|
});
|
|
8627
8637
|
|
|
8628
8638
|
// src/components/chrome/nav-item.tsx
|
|
8639
|
+
var import_react60 = require("react");
|
|
8629
8640
|
var import_clsx56 = __toESM(require("clsx"), 1);
|
|
8641
|
+
var import_lucide_react25 = require("lucide-react");
|
|
8630
8642
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8631
8643
|
var SIZE9 = {
|
|
8632
8644
|
sm: { box: "h-9 gap-2 rounded-lg px-3 py-1.5", label: "text-body-xs", square: "w-9" },
|
|
@@ -8662,7 +8674,32 @@ var VARIANT2 = {
|
|
|
8662
8674
|
inactive: (0, import_clsx56.default)("text-default-secondary", STATE.hover)
|
|
8663
8675
|
}
|
|
8664
8676
|
};
|
|
8665
|
-
|
|
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({
|
|
8666
8703
|
icon,
|
|
8667
8704
|
label,
|
|
8668
8705
|
isActive = false,
|
|
@@ -8670,16 +8707,21 @@ function NavItem({
|
|
|
8670
8707
|
collapsed = false,
|
|
8671
8708
|
size: size2 = "md",
|
|
8672
8709
|
variant = "card",
|
|
8710
|
+
density,
|
|
8711
|
+
trailing,
|
|
8673
8712
|
asChild = false,
|
|
8674
8713
|
disabled = false,
|
|
8675
8714
|
children,
|
|
8676
8715
|
className,
|
|
8677
8716
|
onClick,
|
|
8678
8717
|
...rest
|
|
8679
|
-
}) {
|
|
8718
|
+
}, ref) {
|
|
8680
8719
|
const s = SIZE9[size2];
|
|
8681
8720
|
const v = VARIANT2[variant];
|
|
8721
|
+
const d = density ? DENSITY[density] : null;
|
|
8682
8722
|
const rootProps = {
|
|
8723
|
+
ref,
|
|
8724
|
+
"data-density": density,
|
|
8683
8725
|
// Only meaningful when `asChild` renders a real link — a decorative span with
|
|
8684
8726
|
// aria-current would be a lie.
|
|
8685
8727
|
"aria-current": asChild && isActive ? "page" : void 0,
|
|
@@ -8700,12 +8742,25 @@ function NavItem({
|
|
|
8700
8742
|
// halo on the #F5F5F5 rail. The offset itself is load-bearing — in dark mode
|
|
8701
8743
|
// `ring-brand` and `bg-brand` are both #F1F7FD, so without it a focused *active* row
|
|
8702
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.
|
|
8703
8748
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default-secondary",
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
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
|
+
),
|
|
8709
8764
|
className
|
|
8710
8765
|
),
|
|
8711
8766
|
...rest,
|
|
@@ -8721,7 +8776,22 @@ function NavItem({
|
|
|
8721
8776
|
}
|
|
8722
8777
|
};
|
|
8723
8778
|
const content = /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
8724
|
-
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
|
+
) : (
|
|
8725
8795
|
// Icons are optional, but the collapsed rail hides the label — so a row with neither
|
|
8726
8796
|
// renders as an empty box. Through 0.5.0 that is exactly what a nav without icons
|
|
8727
8797
|
// collapsed to, the docs site's own 36-row sidebar included. The monogram is
|
|
@@ -8740,19 +8810,23 @@ function NavItem({
|
|
|
8740
8810
|
"span",
|
|
8741
8811
|
{
|
|
8742
8812
|
className: (0, import_clsx56.default)(
|
|
8743
|
-
"min-w-0 truncate font-regular
|
|
8744
|
-
s.label,
|
|
8813
|
+
"min-w-0 truncate font-regular",
|
|
8814
|
+
d ? "text-body" : (0, import_clsx56.default)("leading-snug", s.label),
|
|
8745
8815
|
collapsed ? "sr-only" : "flex-1"
|
|
8746
8816
|
),
|
|
8747
8817
|
children: label
|
|
8748
8818
|
}
|
|
8749
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 }),
|
|
8750
8821
|
indicator && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8751
8822
|
"span",
|
|
8752
8823
|
{
|
|
8753
8824
|
role: "status",
|
|
8754
8825
|
"aria-label": "Unread",
|
|
8755
|
-
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
|
+
)
|
|
8756
8830
|
}
|
|
8757
8831
|
)
|
|
8758
8832
|
] });
|
|
@@ -8760,17 +8834,622 @@ function NavItem({
|
|
|
8760
8834
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Slot, { wrapChildren: () => content, ...rootProps, children });
|
|
8761
8835
|
}
|
|
8762
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
|
+
] });
|
|
8763
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
|
+
});
|
|
8764
8932
|
|
|
8765
|
-
// 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");
|
|
8766
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
|
|
8767
8957
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
8768
|
-
|
|
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 });
|
|
8769
9037
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9038
|
+
SidebarProvider,
|
|
9039
|
+
{
|
|
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 })
|
|
9045
|
+
}
|
|
9046
|
+
);
|
|
9047
|
+
}
|
|
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",
|
|
9109
|
+
{
|
|
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
|
+
),
|
|
9121
|
+
className
|
|
9122
|
+
),
|
|
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
|
+
]
|
|
9169
|
+
}
|
|
9170
|
+
);
|
|
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 context = (0, import_react62.useContext)(SidebarContext);
|
|
9363
|
+
if (!context) return null;
|
|
9364
|
+
const { mobileOpen, setMobileOpen } = context;
|
|
9365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9366
|
+
IconButton,
|
|
9367
|
+
{
|
|
9368
|
+
ref,
|
|
9369
|
+
"aria-label": ariaLabel,
|
|
9370
|
+
"aria-expanded": mobileOpen,
|
|
9371
|
+
"aria-haspopup": "dialog",
|
|
9372
|
+
variant,
|
|
9373
|
+
className: cn("md:hidden", className),
|
|
9374
|
+
onClick: (event) => {
|
|
9375
|
+
onClick?.(event);
|
|
9376
|
+
if (!event.defaultPrevented) setMobileOpen(!mobileOpen);
|
|
9377
|
+
},
|
|
9378
|
+
...rest,
|
|
9379
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react26.MenuIcon, { className: "size-5", "aria-hidden": true })
|
|
9380
|
+
}
|
|
9381
|
+
);
|
|
9382
|
+
});
|
|
9383
|
+
function filterNav(groups, isVisible) {
|
|
9384
|
+
return groups.map((group) => ({ ...group, items: filterNavItems(group.items, isVisible) })).filter((group) => group.items.length > 0);
|
|
9385
|
+
}
|
|
9386
|
+
function filterNavItems(items, isVisible) {
|
|
9387
|
+
return items.flatMap((item) => {
|
|
9388
|
+
if (!isVisible(item)) return [];
|
|
9389
|
+
if (!item.children) return [item];
|
|
9390
|
+
const children = filterNavItems(item.children, isVisible);
|
|
9391
|
+
if (children.length === 0 && !item.to && !item.href) return [];
|
|
9392
|
+
return [{ ...item, children }];
|
|
9393
|
+
});
|
|
9394
|
+
}
|
|
9395
|
+
function SidebarSeparator({ className, ...rest }) {
|
|
9396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { "aria-hidden": true, className: cn("mx-1 h-px shrink-0 bg-divider", className), ...rest });
|
|
9397
|
+
}
|
|
9398
|
+
function SidebarUserCard({
|
|
9399
|
+
name,
|
|
9400
|
+
role,
|
|
9401
|
+
onLogout,
|
|
9402
|
+
collapsed = false,
|
|
9403
|
+
menu,
|
|
9404
|
+
className
|
|
9405
|
+
}) {
|
|
9406
|
+
const initial = name.trim().charAt(0);
|
|
9407
|
+
const items = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
9408
|
+
menu,
|
|
9409
|
+
/* @__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" })
|
|
9410
|
+
] });
|
|
9411
|
+
if (collapsed) {
|
|
9412
|
+
return (
|
|
9413
|
+
// Figma collapsed user card: the avatar alone, 24px above and 16px below.
|
|
9414
|
+
/* @__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: [
|
|
9415
|
+
/* @__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" }) }) }),
|
|
9416
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuContent, { side: "right", align: "end", children: items })
|
|
9417
|
+
] }) })
|
|
9418
|
+
);
|
|
9419
|
+
}
|
|
9420
|
+
return (
|
|
9421
|
+
// Figma: 16px padding, plus 4px more above and below the row inside it.
|
|
9422
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: cn("flex shrink-0 items-center gap-2.5 px-4 py-5", className), children: [
|
|
9423
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Avatar, { initial, size: "lg", shape: "circle" }),
|
|
9424
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
9425
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "truncate text-body-sm font-semibold leading-snug text-default", children: name }),
|
|
9426
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "truncate text-body-tiny font-regular leading-none text-default-secondary", children: role })
|
|
9427
|
+
] }),
|
|
9428
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(DropdownMenu, { children: [
|
|
9429
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuTrigger, { asChild: true, label: "User options", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9430
|
+
"button",
|
|
9431
|
+
{
|
|
9432
|
+
type: "button",
|
|
9433
|
+
"aria-label": `${name} \u2014 user options`,
|
|
9434
|
+
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",
|
|
9435
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react26.EllipsisVerticalIcon, { className: "size-5", "aria-hidden": true })
|
|
9436
|
+
}
|
|
9437
|
+
) }),
|
|
9438
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(DropdownMenuContent, { side: "top", align: "end", children: items })
|
|
9439
|
+
] })
|
|
9440
|
+
] })
|
|
9441
|
+
);
|
|
9442
|
+
}
|
|
9443
|
+
|
|
9444
|
+
// src/components/chrome/eyebrow-label.tsx
|
|
9445
|
+
var import_clsx58 = __toESM(require("clsx"), 1);
|
|
9446
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
9447
|
+
function EyebrowLabel({ children, variant = "uppercase", className }) {
|
|
9448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8770
9449
|
"p",
|
|
8771
9450
|
{
|
|
8772
9451
|
"data-variant": variant,
|
|
8773
|
-
className: (0,
|
|
9452
|
+
className: (0, import_clsx58.default)(
|
|
8774
9453
|
"text-body-tiny font-semibold tracking-wide text-default-secondary",
|
|
8775
9454
|
variant === "uppercase" && "uppercase",
|
|
8776
9455
|
className
|
|
@@ -8781,18 +9460,18 @@ function EyebrowLabel({ children, variant = "uppercase", className }) {
|
|
|
8781
9460
|
}
|
|
8782
9461
|
|
|
8783
9462
|
// src/components/chrome/separator.tsx
|
|
8784
|
-
var
|
|
8785
|
-
var
|
|
8786
|
-
var
|
|
8787
|
-
var Separator = (0,
|
|
8788
|
-
return /* @__PURE__ */ (0,
|
|
9463
|
+
var import_react63 = require("react");
|
|
9464
|
+
var import_clsx59 = __toESM(require("clsx"), 1);
|
|
9465
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
9466
|
+
var Separator = (0, import_react63.forwardRef)(function Separator2({ orientation = "horizontal", decorative = true, className, ...rest }, ref) {
|
|
9467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8789
9468
|
"div",
|
|
8790
9469
|
{
|
|
8791
9470
|
ref,
|
|
8792
9471
|
role: decorative ? "none" : "separator",
|
|
8793
9472
|
"aria-orientation": decorative ? void 0 : orientation,
|
|
8794
9473
|
"data-slot": "separator",
|
|
8795
|
-
className: (0,
|
|
9474
|
+
className: (0, import_clsx59.default)(
|
|
8796
9475
|
"shrink-0 bg-divider",
|
|
8797
9476
|
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
8798
9477
|
className
|
|
@@ -8803,20 +9482,20 @@ var Separator = (0, import_react60.forwardRef)(function Separator2({ orientation
|
|
|
8803
9482
|
});
|
|
8804
9483
|
|
|
8805
9484
|
// src/components/chrome/kbd.tsx
|
|
8806
|
-
var
|
|
8807
|
-
var
|
|
8808
|
-
var
|
|
9485
|
+
var import_react64 = require("react");
|
|
9486
|
+
var import_clsx60 = __toESM(require("clsx"), 1);
|
|
9487
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8809
9488
|
var SIZE10 = {
|
|
8810
9489
|
sm: "h-4 min-w-4 px-1 text-body-tiny",
|
|
8811
9490
|
md: "h-5 min-w-5 px-1.5 text-body-xs"
|
|
8812
9491
|
};
|
|
8813
|
-
var Kbd = (0,
|
|
8814
|
-
return /* @__PURE__ */ (0,
|
|
9492
|
+
var Kbd = (0, import_react64.forwardRef)(function Kbd2({ children, size: size2 = "md", className, ...rest }, ref) {
|
|
9493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8815
9494
|
"kbd",
|
|
8816
9495
|
{
|
|
8817
9496
|
ref,
|
|
8818
9497
|
"data-slot": "kbd",
|
|
8819
|
-
className: (0,
|
|
9498
|
+
className: (0, import_clsx60.default)(
|
|
8820
9499
|
"inline-flex items-center justify-center rounded border border-default bg-default-secondary",
|
|
8821
9500
|
"font-medium tabular-nums text-default-secondary",
|
|
8822
9501
|
SIZE10[size2],
|
|
@@ -8829,12 +9508,12 @@ var Kbd = (0, import_react61.forwardRef)(function Kbd2({ children, size: size2 =
|
|
|
8829
9508
|
});
|
|
8830
9509
|
|
|
8831
9510
|
// src/components/chrome/breadcrumb.tsx
|
|
8832
|
-
var
|
|
8833
|
-
var
|
|
8834
|
-
var
|
|
8835
|
-
var
|
|
8836
|
-
var Breadcrumb = (0,
|
|
8837
|
-
return /* @__PURE__ */ (0,
|
|
9511
|
+
var import_react65 = require("react");
|
|
9512
|
+
var import_clsx61 = __toESM(require("clsx"), 1);
|
|
9513
|
+
var import_lucide_react27 = require("lucide-react");
|
|
9514
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
9515
|
+
var Breadcrumb = (0, import_react65.forwardRef)(function Breadcrumb2({ children, items, renderLink, maxItems, label = "Breadcrumb", className, ...rest }, ref) {
|
|
9516
|
+
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 }) });
|
|
8838
9517
|
});
|
|
8839
9518
|
function renderItems(items, renderLink, maxItems) {
|
|
8840
9519
|
const last = items.length - 1;
|
|
@@ -8843,21 +9522,21 @@ function renderItems(items, renderLink, maxItems) {
|
|
|
8843
9522
|
return shown.map((index, position) => {
|
|
8844
9523
|
const item = items[index];
|
|
8845
9524
|
const current = item.current ?? index === last;
|
|
8846
|
-
const crumb = !current && renderLink ? /* @__PURE__ */ (0,
|
|
8847
|
-
return /* @__PURE__ */ (0,
|
|
9525
|
+
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 });
|
|
9526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_react65.Fragment, { children: [
|
|
8848
9527
|
crumb,
|
|
8849
|
-
collapse && position === 0 && /* @__PURE__ */ (0,
|
|
9528
|
+
collapse && position === 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(BreadcrumbEllipsis, {})
|
|
8850
9529
|
] }, item.id ?? index);
|
|
8851
9530
|
});
|
|
8852
9531
|
}
|
|
8853
|
-
var BreadcrumbItem = (0,
|
|
9532
|
+
var BreadcrumbItem = (0, import_react65.forwardRef)(
|
|
8854
9533
|
function BreadcrumbItem2({ children, current = false, asChild = false, first = false, className, ...rest }, ref) {
|
|
8855
|
-
return /* @__PURE__ */ (0,
|
|
8856
|
-
!first && /* @__PURE__ */ (0,
|
|
8857
|
-
current ? /* @__PURE__ */ (0,
|
|
9534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("li", { className: "flex items-center gap-1.5", children: [
|
|
9535
|
+
!first && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react27.ChevronRightIcon, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
9536
|
+
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)(
|
|
8858
9537
|
Slot,
|
|
8859
9538
|
{
|
|
8860
|
-
className: (0,
|
|
9539
|
+
className: (0, import_clsx61.default)(
|
|
8861
9540
|
"rounded text-default-secondary transition-colors hover:text-brand",
|
|
8862
9541
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
8863
9542
|
className
|
|
@@ -8865,11 +9544,11 @@ var BreadcrumbItem = (0, import_react62.forwardRef)(
|
|
|
8865
9544
|
...rest,
|
|
8866
9545
|
children
|
|
8867
9546
|
}
|
|
8868
|
-
) : /* @__PURE__ */ (0,
|
|
9547
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8869
9548
|
"a",
|
|
8870
9549
|
{
|
|
8871
9550
|
ref,
|
|
8872
|
-
className: (0,
|
|
9551
|
+
className: (0, import_clsx61.default)(
|
|
8873
9552
|
"rounded text-default-secondary transition-colors hover:text-brand",
|
|
8874
9553
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
8875
9554
|
className
|
|
@@ -8881,16 +9560,16 @@ var BreadcrumbItem = (0, import_react62.forwardRef)(
|
|
|
8881
9560
|
] });
|
|
8882
9561
|
}
|
|
8883
9562
|
);
|
|
8884
|
-
var BreadcrumbEllipsis = (0,
|
|
9563
|
+
var BreadcrumbEllipsis = (0, import_react65.forwardRef)(
|
|
8885
9564
|
function BreadcrumbEllipsis2({ className, ...rest }, ref) {
|
|
8886
|
-
return /* @__PURE__ */ (0,
|
|
8887
|
-
/* @__PURE__ */ (0,
|
|
8888
|
-
/* @__PURE__ */ (0,
|
|
9565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("li", { className: "flex items-center gap-1.5", children: [
|
|
9566
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react27.ChevronRightIcon, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
9567
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8889
9568
|
"span",
|
|
8890
9569
|
{
|
|
8891
9570
|
ref,
|
|
8892
9571
|
"aria-label": "Collapsed items",
|
|
8893
|
-
className: (0,
|
|
9572
|
+
className: (0, import_clsx61.default)("px-0.5 text-default-tertiary", className),
|
|
8894
9573
|
...rest,
|
|
8895
9574
|
children: "\u2026"
|
|
8896
9575
|
}
|
|
@@ -8900,10 +9579,10 @@ var BreadcrumbEllipsis = (0, import_react62.forwardRef)(
|
|
|
8900
9579
|
);
|
|
8901
9580
|
|
|
8902
9581
|
// src/components/chrome/pagination.tsx
|
|
8903
|
-
var
|
|
8904
|
-
var
|
|
8905
|
-
var
|
|
8906
|
-
var
|
|
9582
|
+
var import_react66 = require("react");
|
|
9583
|
+
var import_clsx62 = __toESM(require("clsx"), 1);
|
|
9584
|
+
var import_lucide_react28 = require("lucide-react");
|
|
9585
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8907
9586
|
var GAP4 = "\u2026";
|
|
8908
9587
|
function paginationRange(page, pageCount, siblingCount = 1) {
|
|
8909
9588
|
const totalSlots = siblingCount * 2 + 5;
|
|
@@ -8930,13 +9609,13 @@ function paginationRange(page, pageCount, siblingCount = 1) {
|
|
|
8930
9609
|
pageCount
|
|
8931
9610
|
];
|
|
8932
9611
|
}
|
|
8933
|
-
var ARROW_BASE = (0,
|
|
9612
|
+
var ARROW_BASE = (0, import_clsx62.default)(
|
|
8934
9613
|
"inline-flex size-9 shrink-0 items-center justify-center rounded-lg border transition-colors",
|
|
8935
9614
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
8936
9615
|
"disabled:cursor-not-allowed disabled:border-disabled disabled:bg-disabled disabled:text-disabled",
|
|
8937
9616
|
"border-default bg-default text-default hover:bg-default-secondary hover:text-brand"
|
|
8938
9617
|
);
|
|
8939
|
-
var Pagination = (0,
|
|
9618
|
+
var Pagination = (0, import_react66.forwardRef)(function Pagination2({
|
|
8940
9619
|
page,
|
|
8941
9620
|
pageCount,
|
|
8942
9621
|
onPageChange,
|
|
@@ -8951,16 +9630,16 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8951
9630
|
const clamped = Math.min(Math.max(next, 1), pageCount);
|
|
8952
9631
|
if (clamped !== page) onPageChange(clamped);
|
|
8953
9632
|
};
|
|
8954
|
-
return /* @__PURE__ */ (0,
|
|
9633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8955
9634
|
"nav",
|
|
8956
9635
|
{
|
|
8957
9636
|
ref,
|
|
8958
9637
|
"aria-label": label,
|
|
8959
9638
|
"data-slot": "pagination",
|
|
8960
|
-
className: (0,
|
|
9639
|
+
className: (0, import_clsx62.default)("flex items-center gap-1.5", className),
|
|
8961
9640
|
...rest,
|
|
8962
9641
|
children: [
|
|
8963
|
-
/* @__PURE__ */ (0,
|
|
9642
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8964
9643
|
"button",
|
|
8965
9644
|
{
|
|
8966
9645
|
type: "button",
|
|
@@ -8968,26 +9647,26 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8968
9647
|
disabled: page <= 1,
|
|
8969
9648
|
onClick: () => go(page - 1),
|
|
8970
9649
|
className: ARROW_BASE,
|
|
8971
|
-
children: /* @__PURE__ */ (0,
|
|
9650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react28.ChevronLeftIcon, { "aria-hidden": true, className: "size-4" })
|
|
8972
9651
|
}
|
|
8973
9652
|
),
|
|
8974
9653
|
type === "dots" ? (
|
|
8975
9654
|
// The dots form has no room for numbers, so the list itself is the only place the
|
|
8976
9655
|
// position can be stated — hence the live-region-free but explicitly named group.
|
|
8977
|
-
/* @__PURE__ */ (0,
|
|
9656
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8978
9657
|
"span",
|
|
8979
9658
|
{
|
|
8980
9659
|
role: "group",
|
|
8981
9660
|
"aria-label": `Page ${page} of ${pageCount}`,
|
|
8982
9661
|
className: "flex items-center gap-2 px-2",
|
|
8983
|
-
children: Array.from({ length: pageCount }, (_, i) => i + 1).map((n) => /* @__PURE__ */ (0,
|
|
9662
|
+
children: Array.from({ length: pageCount }, (_, i) => i + 1).map((n) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8984
9663
|
"button",
|
|
8985
9664
|
{
|
|
8986
9665
|
type: "button",
|
|
8987
9666
|
"aria-label": `Page ${n}`,
|
|
8988
9667
|
"aria-current": n === page ? "page" : void 0,
|
|
8989
9668
|
onClick: () => go(n),
|
|
8990
|
-
className: (0,
|
|
9669
|
+
className: (0, import_clsx62.default)(
|
|
8991
9670
|
"size-2 rounded-full transition-colors",
|
|
8992
9671
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2 focus-visible:ring-offset-default",
|
|
8993
9672
|
n === page ? "bg-brand" : "bg-default-tertiary hover:bg-neutral-secondary"
|
|
@@ -8998,7 +9677,7 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8998
9677
|
}
|
|
8999
9678
|
)
|
|
9000
9679
|
) : paginationRange(page, pageCount, siblingCount).map(
|
|
9001
|
-
(entry, index) => entry === GAP4 ? /* @__PURE__ */ (0,
|
|
9680
|
+
(entry, index) => entry === GAP4 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9002
9681
|
"span",
|
|
9003
9682
|
{
|
|
9004
9683
|
"aria-hidden": true,
|
|
@@ -9006,14 +9685,14 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
9006
9685
|
children: GAP4
|
|
9007
9686
|
},
|
|
9008
9687
|
`gap-${index}`
|
|
9009
|
-
) : /* @__PURE__ */ (0,
|
|
9688
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9010
9689
|
"button",
|
|
9011
9690
|
{
|
|
9012
9691
|
type: "button",
|
|
9013
9692
|
"aria-label": `Page ${entry}`,
|
|
9014
9693
|
"aria-current": entry === page ? "page" : void 0,
|
|
9015
9694
|
onClick: () => go(entry),
|
|
9016
|
-
className: (0,
|
|
9695
|
+
className: (0, import_clsx62.default)(
|
|
9017
9696
|
"inline-flex size-9 shrink-0 items-center justify-center rounded-lg border text-body-sm tabular-nums transition-colors",
|
|
9018
9697
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
9019
9698
|
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"
|
|
@@ -9023,7 +9702,7 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
9023
9702
|
entry
|
|
9024
9703
|
)
|
|
9025
9704
|
),
|
|
9026
|
-
/* @__PURE__ */ (0,
|
|
9705
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9027
9706
|
"button",
|
|
9028
9707
|
{
|
|
9029
9708
|
type: "button",
|
|
@@ -9031,7 +9710,7 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
9031
9710
|
disabled: page >= pageCount,
|
|
9032
9711
|
onClick: () => go(page + 1),
|
|
9033
9712
|
className: ARROW_BASE,
|
|
9034
|
-
children: /* @__PURE__ */ (0,
|
|
9713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react28.ChevronRightIcon, { "aria-hidden": true, className: "size-4" })
|
|
9035
9714
|
}
|
|
9036
9715
|
)
|
|
9037
9716
|
]
|
|
@@ -9054,13 +9733,13 @@ function PaginationBar({
|
|
|
9054
9733
|
const to = Math.min(total, page * pageSize);
|
|
9055
9734
|
const showSize = Boolean(onPageSizeChange) && pageSizeOptions.length > 0;
|
|
9056
9735
|
const options = pageSizeOptions.includes(pageSize) ? pageSizeOptions : [...pageSizeOptions, pageSize].sort((a, b) => a - b);
|
|
9057
|
-
return /* @__PURE__ */ (0,
|
|
9736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9058
9737
|
"div",
|
|
9059
9738
|
{
|
|
9060
9739
|
"data-slot": "pagination-bar",
|
|
9061
|
-
className: (0,
|
|
9740
|
+
className: (0, import_clsx62.default)("flex flex-wrap items-center justify-between gap-x-4 gap-y-3", className),
|
|
9062
9741
|
children: [
|
|
9063
|
-
/* @__PURE__ */ (0,
|
|
9742
|
+
/* @__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: [
|
|
9064
9743
|
"Showing ",
|
|
9065
9744
|
from,
|
|
9066
9745
|
"\u2013",
|
|
@@ -9068,10 +9747,10 @@ function PaginationBar({
|
|
|
9068
9747
|
" of ",
|
|
9069
9748
|
total
|
|
9070
9749
|
] }) }),
|
|
9071
|
-
/* @__PURE__ */ (0,
|
|
9072
|
-
showSize && /* @__PURE__ */ (0,
|
|
9073
|
-
/* @__PURE__ */ (0,
|
|
9074
|
-
/* @__PURE__ */ (0,
|
|
9750
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-3", children: [
|
|
9751
|
+
showSize && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9752
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { "aria-hidden": true, className: "text-body-xs text-default-secondary", children: "Rows per page" }),
|
|
9753
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9075
9754
|
SelectControl,
|
|
9076
9755
|
{
|
|
9077
9756
|
"aria-label": "Rows per page",
|
|
@@ -9083,7 +9762,7 @@ function PaginationBar({
|
|
|
9083
9762
|
}
|
|
9084
9763
|
)
|
|
9085
9764
|
] }),
|
|
9086
|
-
/* @__PURE__ */ (0,
|
|
9765
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Pagination, { page, pageCount, onPageChange, label })
|
|
9087
9766
|
] })
|
|
9088
9767
|
]
|
|
9089
9768
|
}
|
|
@@ -9091,15 +9770,15 @@ function PaginationBar({
|
|
|
9091
9770
|
}
|
|
9092
9771
|
|
|
9093
9772
|
// src/components/chrome/navigation-menu.tsx
|
|
9094
|
-
var
|
|
9095
|
-
var
|
|
9096
|
-
var
|
|
9097
|
-
var NavigationMenu = (0,
|
|
9773
|
+
var import_react67 = require("react");
|
|
9774
|
+
var import_clsx63 = __toESM(require("clsx"), 1);
|
|
9775
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9776
|
+
var NavigationMenu = (0, import_react67.forwardRef)(
|
|
9098
9777
|
function NavigationMenu2({ children, orientation = "horizontal", label, className, ...rest }, ref) {
|
|
9099
|
-
return /* @__PURE__ */ (0,
|
|
9778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("nav", { ref, "aria-label": label, "data-slot": "navigation-menu", ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9100
9779
|
"ul",
|
|
9101
9780
|
{
|
|
9102
|
-
className: (0,
|
|
9781
|
+
className: (0, import_clsx63.default)(
|
|
9103
9782
|
"flex list-none p-0",
|
|
9104
9783
|
orientation === "vertical" ? "flex-col gap-1" : "flex-row items-center gap-1",
|
|
9105
9784
|
className
|
|
@@ -9109,21 +9788,21 @@ var NavigationMenu = (0, import_react64.forwardRef)(
|
|
|
9109
9788
|
) });
|
|
9110
9789
|
}
|
|
9111
9790
|
);
|
|
9112
|
-
var NavigationMenuItem = (0,
|
|
9791
|
+
var NavigationMenuItem = (0, import_react67.forwardRef)(
|
|
9113
9792
|
function NavigationMenuItem2({ children, active = false, variant = "pill", asChild = false, icon, className, ...rest }, ref) {
|
|
9114
|
-
const content = /* @__PURE__ */ (0,
|
|
9115
|
-
icon && /* @__PURE__ */ (0,
|
|
9116
|
-
/* @__PURE__ */ (0,
|
|
9793
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
9794
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { "aria-hidden": true, className: "shrink-0 [&_svg]:size-4", children: icon }),
|
|
9795
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "min-w-0 truncate", children })
|
|
9117
9796
|
] });
|
|
9118
9797
|
const linkProps = {
|
|
9119
9798
|
"aria-current": active ? "page" : void 0,
|
|
9120
|
-
className: (0,
|
|
9799
|
+
className: (0, import_clsx63.default)(
|
|
9121
9800
|
"inline-flex items-center gap-2 whitespace-nowrap transition-colors",
|
|
9122
9801
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
9123
|
-
variant === "pill" ? (0,
|
|
9802
|
+
variant === "pill" ? (0, import_clsx63.default)(
|
|
9124
9803
|
"rounded-lg px-3 py-1.5 text-body-xs font-medium",
|
|
9125
9804
|
active ? "bg-brand text-brand-on-brand" : "text-default-secondary hover:bg-default-secondary hover:text-default"
|
|
9126
|
-
) : (0,
|
|
9805
|
+
) : (0, import_clsx63.default)(
|
|
9127
9806
|
"rounded px-1 py-0.5 text-body-sm",
|
|
9128
9807
|
active ? "font-semibold text-brand" : "text-default-secondary hover:text-default"
|
|
9129
9808
|
),
|
|
@@ -9131,14 +9810,14 @@ var NavigationMenuItem = (0, import_react64.forwardRef)(
|
|
|
9131
9810
|
),
|
|
9132
9811
|
...rest
|
|
9133
9812
|
};
|
|
9134
|
-
return /* @__PURE__ */ (0,
|
|
9813
|
+
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 }) });
|
|
9135
9814
|
}
|
|
9136
9815
|
);
|
|
9137
9816
|
|
|
9138
9817
|
// src/components/chrome/typography.tsx
|
|
9139
|
-
var
|
|
9140
|
-
var
|
|
9141
|
-
var
|
|
9818
|
+
var import_react68 = require("react");
|
|
9819
|
+
var import_clsx64 = __toESM(require("clsx"), 1);
|
|
9820
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9142
9821
|
var TONE2 = {
|
|
9143
9822
|
default: "text-default",
|
|
9144
9823
|
muted: "text-default-secondary",
|
|
@@ -9149,9 +9828,9 @@ var TONE2 = {
|
|
|
9149
9828
|
danger: "text-danger"
|
|
9150
9829
|
};
|
|
9151
9830
|
function textComponent(displayName, defaultElement, classes) {
|
|
9152
|
-
const Component2 = (0,
|
|
9831
|
+
const Component2 = (0, import_react68.forwardRef)(function TextComponent({ children, asChild = false, tone, className, ...rest }, ref) {
|
|
9153
9832
|
const Root = asChild ? Slot : defaultElement;
|
|
9154
|
-
return /* @__PURE__ */ (0,
|
|
9833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9155
9834
|
Root,
|
|
9156
9835
|
{
|
|
9157
9836
|
ref,
|
|
@@ -9181,8 +9860,8 @@ var TitlePage = textComponent("TitlePage", "h1", "text-title font-bold text-defa
|
|
|
9181
9860
|
var Subtitle = textComponent("Subtitle", "p", "text-subtitle text-default-secondary");
|
|
9182
9861
|
var Heading = textComponent("Heading", "h2", "text-heading font-semibold text-default");
|
|
9183
9862
|
var Subheading = textComponent("Subheading", "h3", "text-subheading text-default");
|
|
9184
|
-
var Blockquote = (0,
|
|
9185
|
-
return /* @__PURE__ */ (0,
|
|
9863
|
+
var Blockquote = (0, import_react68.forwardRef)(function Blockquote2({ children, cite, tone, className, ...rest }, ref) {
|
|
9864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9186
9865
|
"blockquote",
|
|
9187
9866
|
{
|
|
9188
9867
|
ref,
|
|
@@ -9202,14 +9881,14 @@ var TEXT_LINK_TONE = {
|
|
|
9202
9881
|
brand: "text-brand underline decoration-1 hover:text-brand-secondary",
|
|
9203
9882
|
neutral: "text-default no-underline decoration-1 hover:underline"
|
|
9204
9883
|
};
|
|
9205
|
-
var TextLink = (0,
|
|
9884
|
+
var TextLink = (0, import_react68.forwardRef)(function TextLink2({ children, asChild = false, tone = "brand", className, ...rest }, ref) {
|
|
9206
9885
|
const Root = asChild ? Slot : "a";
|
|
9207
|
-
return /* @__PURE__ */ (0,
|
|
9886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9208
9887
|
Root,
|
|
9209
9888
|
{
|
|
9210
9889
|
ref,
|
|
9211
9890
|
"data-tone": tone,
|
|
9212
|
-
className: (0,
|
|
9891
|
+
className: (0, import_clsx64.default)(
|
|
9213
9892
|
"rounded underline-offset-2 transition-colors",
|
|
9214
9893
|
TEXT_LINK_TONE[tone],
|
|
9215
9894
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
@@ -9225,13 +9904,13 @@ var LIST_MARKER = {
|
|
|
9225
9904
|
numbered: "list-decimal pl-5",
|
|
9226
9905
|
plain: "list-none pl-0"
|
|
9227
9906
|
};
|
|
9228
|
-
var TextList = (0,
|
|
9907
|
+
var TextList = (0, import_react68.forwardRef)(function TextList2({ children, variant = "bulleted", density = "default", className, ...rest }, ref) {
|
|
9229
9908
|
const Root = variant === "numbered" ? "ol" : "ul";
|
|
9230
|
-
return /* @__PURE__ */ (0,
|
|
9909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9231
9910
|
Root,
|
|
9232
9911
|
{
|
|
9233
9912
|
ref,
|
|
9234
|
-
className: (0,
|
|
9913
|
+
className: (0, import_clsx64.default)(
|
|
9235
9914
|
"text-body text-default",
|
|
9236
9915
|
LIST_MARKER[variant],
|
|
9237
9916
|
density === "compact" ? "space-y-0.5" : "space-y-1.5",
|
|
@@ -9242,17 +9921,17 @@ var TextList = (0, import_react65.forwardRef)(function TextList2({ children, var
|
|
|
9242
9921
|
}
|
|
9243
9922
|
);
|
|
9244
9923
|
});
|
|
9245
|
-
var TextListItem = (0,
|
|
9246
|
-
return /* @__PURE__ */ (0,
|
|
9924
|
+
var TextListItem = (0, import_react68.forwardRef)(function TextListItem2({ children, className, ...rest }, ref) {
|
|
9925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { ref, className: (0, import_clsx64.default)("text-body text-default", className), ...rest, children });
|
|
9247
9926
|
});
|
|
9248
9927
|
|
|
9249
9928
|
// src/components/widgets/widget-header.tsx
|
|
9250
|
-
var
|
|
9251
|
-
var
|
|
9929
|
+
var import_react69 = require("react");
|
|
9930
|
+
var import_clsx66 = __toESM(require("clsx"), 1);
|
|
9252
9931
|
|
|
9253
9932
|
// src/components/widgets/widget-title.tsx
|
|
9254
|
-
var
|
|
9255
|
-
var
|
|
9933
|
+
var import_clsx65 = __toESM(require("clsx"), 1);
|
|
9934
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
9256
9935
|
var sizeStyles6 = {
|
|
9257
9936
|
sm: "text-subheading-sm font-semibold leading-none",
|
|
9258
9937
|
// Was `text-[18px]`, which had no step on the type scale (Scale 04 = 16, Scale 05 = 20).
|
|
@@ -9262,17 +9941,17 @@ var sizeStyles6 = {
|
|
|
9262
9941
|
lg: "text-subheading font-semibold leading-[1.2]"
|
|
9263
9942
|
};
|
|
9264
9943
|
function WidgetTitle({ children, size: size2 = "sm", className }) {
|
|
9265
|
-
return /* @__PURE__ */ (0,
|
|
9944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h3", { className: (0, import_clsx65.default)(sizeStyles6[size2], "text-default", className), children });
|
|
9266
9945
|
}
|
|
9267
9946
|
|
|
9268
9947
|
// src/components/widgets/widget-header.tsx
|
|
9269
|
-
var
|
|
9270
|
-
var WidgetHeaderAccessoryContext = (0,
|
|
9948
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
9949
|
+
var WidgetHeaderAccessoryContext = (0, import_react69.createContext)(null);
|
|
9271
9950
|
function WidgetHeaderAccessoryProvider({ accessory, children }) {
|
|
9272
|
-
return /* @__PURE__ */ (0,
|
|
9951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(WidgetHeaderAccessoryContext.Provider, { value: accessory, children });
|
|
9273
9952
|
}
|
|
9274
9953
|
function useWidgetHeaderAccessory() {
|
|
9275
|
-
return (0,
|
|
9954
|
+
return (0, import_react69.useContext)(WidgetHeaderAccessoryContext);
|
|
9276
9955
|
}
|
|
9277
9956
|
var eyebrowStyles = {
|
|
9278
9957
|
uppercase: "text-body-tiny font-medium uppercase tracking-[0.66px] text-default-secondary",
|
|
@@ -9291,13 +9970,13 @@ function WidgetHeader({
|
|
|
9291
9970
|
}) {
|
|
9292
9971
|
const provided = useWidgetHeaderAccessory();
|
|
9293
9972
|
const accessory = accessoryProp !== void 0 ? accessoryProp : provided;
|
|
9294
|
-
return /* @__PURE__ */ (0,
|
|
9295
|
-
/* @__PURE__ */ (0,
|
|
9296
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9298
|
-
subtitle && /* @__PURE__ */ (0,
|
|
9973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: (0, import_clsx66.default)("flex items-start justify-between gap-2", className), children: [
|
|
9974
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
9975
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: eyebrowStyles[eyebrowVariant], children: eyebrow }),
|
|
9976
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(WidgetTitle, { size: titleSize, children: title }),
|
|
9977
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "mt-1 text-body-xs text-default-secondary leading-snug", children: subtitle })
|
|
9299
9978
|
] }),
|
|
9300
|
-
/* @__PURE__ */ (0,
|
|
9979
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
9301
9980
|
badge,
|
|
9302
9981
|
action,
|
|
9303
9982
|
accessory
|
|
@@ -9306,24 +9985,24 @@ function WidgetHeader({
|
|
|
9306
9985
|
}
|
|
9307
9986
|
|
|
9308
9987
|
// src/components/widgets/widget-footer.tsx
|
|
9309
|
-
var
|
|
9310
|
-
var
|
|
9988
|
+
var import_clsx67 = __toESM(require("clsx"), 1);
|
|
9989
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
9311
9990
|
function WidgetFooter({ caption, subcaption, action, className }) {
|
|
9312
|
-
return /* @__PURE__ */ (0,
|
|
9313
|
-
caption && /* @__PURE__ */ (0,
|
|
9314
|
-
/* @__PURE__ */ (0,
|
|
9315
|
-
/* @__PURE__ */ (0,
|
|
9316
|
-
/* @__PURE__ */ (0,
|
|
9317
|
-
subcaption && /* @__PURE__ */ (0,
|
|
9991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: (0, import_clsx67.default)("flex items-center gap-3", className), children: [
|
|
9992
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex items-stretch gap-3 flex-1 min-w-0", children: [
|
|
9993
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "w-0.5 shrink-0 self-stretch rounded-full bg-brand" }),
|
|
9994
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "min-w-0", children: [
|
|
9995
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "text-body-sm font-medium text-default leading-snug", children: caption }),
|
|
9996
|
+
subcaption && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: subcaption })
|
|
9318
9997
|
] })
|
|
9319
9998
|
] }),
|
|
9320
|
-
action && /* @__PURE__ */ (0,
|
|
9999
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "ml-auto shrink-0", children: action })
|
|
9321
10000
|
] });
|
|
9322
10001
|
}
|
|
9323
10002
|
|
|
9324
10003
|
// src/components/widgets/widget-grid.tsx
|
|
9325
|
-
var
|
|
9326
|
-
var
|
|
10004
|
+
var import_clsx68 = __toESM(require("clsx"), 1);
|
|
10005
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9327
10006
|
var COL_SPAN = {
|
|
9328
10007
|
tiny: "col-span-6 lg:col-span-3",
|
|
9329
10008
|
small: "col-span-12 lg:col-span-4",
|
|
@@ -9342,18 +10021,18 @@ var HEIGHT_PX = {
|
|
|
9342
10021
|
large: 752
|
|
9343
10022
|
};
|
|
9344
10023
|
function WidgetGrid({ children, className }) {
|
|
9345
|
-
return /* @__PURE__ */ (0,
|
|
10024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: cn("flex w-full flex-col gap-3 lg:gap-6", className), children });
|
|
9346
10025
|
}
|
|
9347
10026
|
function WidgetGridRow({ children, className }) {
|
|
9348
|
-
return /* @__PURE__ */ (0,
|
|
10027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: cn("grid grid-cols-12 items-start gap-3 lg:gap-6", className), children });
|
|
9349
10028
|
}
|
|
9350
10029
|
function WidgetGridItem({ size: size2, height, className, ...rest }) {
|
|
9351
|
-
return /* @__PURE__ */ (0,
|
|
10030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9352
10031
|
"div",
|
|
9353
10032
|
{
|
|
9354
10033
|
"data-size": size2,
|
|
9355
10034
|
"data-height": height,
|
|
9356
|
-
className: cn(COL_SPAN[size2], height && (0,
|
|
10035
|
+
className: cn(COL_SPAN[size2], height && (0, import_clsx68.default)(HEIGHT_CLASS[height], "min-h-0"), className),
|
|
9357
10036
|
...rest
|
|
9358
10037
|
}
|
|
9359
10038
|
);
|
|
@@ -9416,23 +10095,23 @@ function slotWidthPx(gridWidthPx, columnGapPx, cols) {
|
|
|
9416
10095
|
}
|
|
9417
10096
|
|
|
9418
10097
|
// src/lib/use-width-tier.ts
|
|
9419
|
-
var
|
|
9420
|
-
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ?
|
|
10098
|
+
var import_react70 = require("react");
|
|
10099
|
+
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? import_react70.useEffect : import_react70.useLayoutEffect;
|
|
9421
10100
|
var TIER_SETTLE_MS = 200;
|
|
9422
10101
|
function useWidthTier({ frozen = false } = {}) {
|
|
9423
|
-
const [node, setNode] = (0,
|
|
9424
|
-
const [{ widthPx, tier }, setMeasured] = (0,
|
|
10102
|
+
const [node, setNode] = (0, import_react70.useState)(null);
|
|
10103
|
+
const [{ widthPx, tier }, setMeasured] = (0, import_react70.useState)({
|
|
9425
10104
|
widthPx: null,
|
|
9426
10105
|
tier: "wide"
|
|
9427
10106
|
});
|
|
9428
|
-
const observed = (0,
|
|
9429
|
-
const frozenRef = (0,
|
|
10107
|
+
const observed = (0, import_react70.useRef)(null);
|
|
10108
|
+
const frozenRef = (0, import_react70.useRef)(frozen);
|
|
9430
10109
|
frozenRef.current = frozen;
|
|
9431
|
-
const tierRef = (0,
|
|
10110
|
+
const tierRef = (0, import_react70.useRef)(tier);
|
|
9432
10111
|
tierRef.current = tier;
|
|
9433
|
-
const widthRef = (0,
|
|
10112
|
+
const widthRef = (0, import_react70.useRef)(widthPx);
|
|
9434
10113
|
widthRef.current = widthPx;
|
|
9435
|
-
const commit = (0,
|
|
10114
|
+
const commit = (0, import_react70.useCallback)(() => {
|
|
9436
10115
|
const raw = observed.current;
|
|
9437
10116
|
if (raw === null || raw <= 0 || frozenRef.current) return;
|
|
9438
10117
|
const next = quantizeWidth(raw);
|
|
@@ -9464,15 +10143,15 @@ function useWidthTier({ frozen = false } = {}) {
|
|
|
9464
10143
|
if (timer) clearTimeout(timer);
|
|
9465
10144
|
};
|
|
9466
10145
|
}, [node, commit]);
|
|
9467
|
-
(0,
|
|
10146
|
+
(0, import_react70.useEffect)(() => {
|
|
9468
10147
|
if (!frozen) commit();
|
|
9469
10148
|
}, [frozen, commit]);
|
|
9470
10149
|
return { ref: setNode, widthPx, tier };
|
|
9471
10150
|
}
|
|
9472
10151
|
|
|
9473
10152
|
// src/components/stats/stat-tile.tsx
|
|
9474
|
-
var
|
|
9475
|
-
var
|
|
10153
|
+
var import_clsx69 = __toESM(require("clsx"), 1);
|
|
10154
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
9476
10155
|
var DOT_TONE = {
|
|
9477
10156
|
neutral: "bg-status-dot-neutral",
|
|
9478
10157
|
info: "bg-status-dot-info",
|
|
@@ -9497,20 +10176,20 @@ function StatTile({
|
|
|
9497
10176
|
}) {
|
|
9498
10177
|
const showDot = Boolean(tone || dotColor);
|
|
9499
10178
|
const interactive = Boolean(onClick) || asChild;
|
|
9500
|
-
const content = /* @__PURE__ */ (0,
|
|
9501
|
-
/* @__PURE__ */ (0,
|
|
9502
|
-
showDot && /* @__PURE__ */ (0,
|
|
10179
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
10180
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
10181
|
+
showDot && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
9503
10182
|
"span",
|
|
9504
10183
|
{
|
|
9505
10184
|
"aria-hidden": true,
|
|
9506
|
-
className: (0,
|
|
10185
|
+
className: (0, import_clsx69.default)("size-2 shrink-0 rounded-full", tone && DOT_TONE[tone]),
|
|
9507
10186
|
style: tone ? void 0 : { backgroundColor: dotColor }
|
|
9508
10187
|
}
|
|
9509
10188
|
),
|
|
9510
|
-
/* @__PURE__ */ (0,
|
|
10189
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-body-xs font-medium text-default-secondary whitespace-nowrap", children: label })
|
|
9511
10190
|
] }),
|
|
9512
|
-
/* @__PURE__ */ (0,
|
|
9513
|
-
hint && /* @__PURE__ */ (0,
|
|
10191
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-heading font-semibold text-default leading-none", children: value }),
|
|
10192
|
+
hint && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-body-tiny text-default-secondary", children: hint })
|
|
9514
10193
|
] });
|
|
9515
10194
|
const rootProps = {
|
|
9516
10195
|
"data-state": selected ? "selected" : void 0,
|
|
@@ -9525,18 +10204,18 @@ function StatTile({
|
|
|
9525
10204
|
return (
|
|
9526
10205
|
// A link to a filtered view is the current one, not a pressed toggle: `aria-pressed` is
|
|
9527
10206
|
// only valid on a button.
|
|
9528
|
-
/* @__PURE__ */ (0,
|
|
10207
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Slot, { ...rootProps, "aria-current": selected ? "true" : void 0, wrapChildren: () => content, children })
|
|
9529
10208
|
);
|
|
9530
10209
|
}
|
|
9531
10210
|
if (onClick) {
|
|
9532
|
-
return /* @__PURE__ */ (0,
|
|
10211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("button", { type: "button", "aria-pressed": selected ?? false, onClick, ...rootProps, children: content });
|
|
9533
10212
|
}
|
|
9534
|
-
return /* @__PURE__ */ (0,
|
|
10213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { ...rootProps, children: content });
|
|
9535
10214
|
}
|
|
9536
10215
|
|
|
9537
10216
|
// src/components/stats/stat-number.tsx
|
|
9538
|
-
var
|
|
9539
|
-
var
|
|
10217
|
+
var import_clsx70 = __toESM(require("clsx"), 1);
|
|
10218
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
9540
10219
|
var sizeStyles7 = {
|
|
9541
10220
|
sm: "text-subtitle",
|
|
9542
10221
|
md: "text-subtitle-lg",
|
|
@@ -9547,22 +10226,22 @@ var weightStyles = {
|
|
|
9547
10226
|
bold: "font-bold"
|
|
9548
10227
|
};
|
|
9549
10228
|
function StatNumber({ value, unit, size: size2 = "md", weight = "bold", color, className }) {
|
|
9550
|
-
return /* @__PURE__ */ (0,
|
|
10229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
9551
10230
|
"p",
|
|
9552
10231
|
{
|
|
9553
|
-
className: (0,
|
|
10232
|
+
className: (0, import_clsx70.default)(sizeStyles7[size2], weightStyles[weight], "leading-none", !color && "text-default", className),
|
|
9554
10233
|
style: color ? { color } : void 0,
|
|
9555
10234
|
children: [
|
|
9556
10235
|
value,
|
|
9557
|
-
unit && /* @__PURE__ */ (0,
|
|
10236
|
+
unit && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "ml-1 text-subheading font-medium text-default-secondary", children: unit })
|
|
9558
10237
|
]
|
|
9559
10238
|
}
|
|
9560
10239
|
);
|
|
9561
10240
|
}
|
|
9562
10241
|
|
|
9563
10242
|
// src/components/stats/score-value.tsx
|
|
9564
|
-
var
|
|
9565
|
-
var
|
|
10243
|
+
var import_clsx71 = __toESM(require("clsx"), 1);
|
|
10244
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
9566
10245
|
var DEFAULT_SCORE_THRESHOLDS = { danger: 80, warning: 65, neutral: 50 };
|
|
9567
10246
|
function getScoreTone(score, {
|
|
9568
10247
|
direction = "higher-is-worse",
|
|
@@ -9606,15 +10285,15 @@ function ScoreValue({
|
|
|
9606
10285
|
}) {
|
|
9607
10286
|
const numeric = typeof value === "number" ? value : Number(value);
|
|
9608
10287
|
const resolved = tone === "auto" ? Number.isFinite(numeric) ? getScoreTone(numeric, { direction, thresholds }) : "default" : tone;
|
|
9609
|
-
return /* @__PURE__ */ (0,
|
|
9610
|
-
/* @__PURE__ */ (0,
|
|
9611
|
-
label && /* @__PURE__ */ (0,
|
|
10288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("span", { "data-tone": resolved, className: (0, import_clsx71.default)("inline-flex items-baseline gap-1", className), children: [
|
|
10289
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: (0, import_clsx71.default)(SIZE11[size2], WEIGHT[weight], TONE3[resolved]), children: value }),
|
|
10290
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "text-body-xs text-default-secondary whitespace-nowrap", children: label })
|
|
9612
10291
|
] });
|
|
9613
10292
|
}
|
|
9614
10293
|
|
|
9615
10294
|
// src/components/stats/tile-grid.tsx
|
|
9616
|
-
var
|
|
9617
|
-
var
|
|
10295
|
+
var import_clsx72 = __toESM(require("clsx"), 1);
|
|
10296
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
9618
10297
|
var COLUMNS2 = {
|
|
9619
10298
|
sm: {
|
|
9620
10299
|
2: "grid-cols-2",
|
|
@@ -9644,7 +10323,7 @@ function TileGrid({
|
|
|
9644
10323
|
at = "lg",
|
|
9645
10324
|
className
|
|
9646
10325
|
}) {
|
|
9647
|
-
return /* @__PURE__ */ (0,
|
|
10326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: (0, import_clsx72.default)("grid gap-3", COLUMNS2[at][columns], className), children });
|
|
9648
10327
|
}
|
|
9649
10328
|
|
|
9650
10329
|
// src/components/charts/chart-tone.ts
|
|
@@ -9665,8 +10344,8 @@ function resolveChartColor(color, tone, index = 0) {
|
|
|
9665
10344
|
}
|
|
9666
10345
|
|
|
9667
10346
|
// src/components/charts/bar-chart.tsx
|
|
9668
|
-
var
|
|
9669
|
-
var
|
|
10347
|
+
var import_clsx73 = __toESM(require("clsx"), 1);
|
|
10348
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
9670
10349
|
var SIZE12 = {
|
|
9671
10350
|
sm: { band: 14, gap: 6, label: "text-body-tiny" },
|
|
9672
10351
|
md: { band: 20, gap: 8, label: "text-body-xs" },
|
|
@@ -9693,10 +10372,10 @@ function BarChart({
|
|
|
9693
10372
|
);
|
|
9694
10373
|
const max = Math.max(...categoryTotals, 1);
|
|
9695
10374
|
const horizontal = orientation === "horizontal";
|
|
9696
|
-
return /* @__PURE__ */ (0,
|
|
10375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9697
10376
|
"div",
|
|
9698
10377
|
{
|
|
9699
|
-
className: (0,
|
|
10378
|
+
className: (0, import_clsx73.default)("flex w-full min-w-0", horizontal ? "flex-col gap-2" : "flex-row items-end gap-3", className),
|
|
9700
10379
|
role: label ? "img" : void 0,
|
|
9701
10380
|
"aria-label": label,
|
|
9702
10381
|
"aria-hidden": label ? void 0 : true,
|
|
@@ -9706,23 +10385,23 @@ function BarChart({
|
|
|
9706
10385
|
value: Math.max(0, s.values[ci] ?? 0),
|
|
9707
10386
|
color: resolveChartColor(s.color, s.tone, si)
|
|
9708
10387
|
}));
|
|
9709
|
-
return /* @__PURE__ */ (0,
|
|
10388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
9710
10389
|
"div",
|
|
9711
10390
|
{
|
|
9712
|
-
className: (0,
|
|
10391
|
+
className: (0, import_clsx73.default)("flex min-w-0", horizontal ? "flex-col gap-1" : "h-full flex-col justify-end gap-1.5"),
|
|
9713
10392
|
style: horizontal ? void 0 : { width: perCategory },
|
|
9714
10393
|
children: [
|
|
9715
|
-
showLabels && horizontal && /* @__PURE__ */ (0,
|
|
9716
|
-
/* @__PURE__ */ (0,
|
|
10394
|
+
showLabels && horizontal && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: (0, import_clsx73.default)("truncate text-default-secondary", labelClass2), children: category }),
|
|
10395
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
9717
10396
|
"div",
|
|
9718
10397
|
{
|
|
9719
|
-
className: (0,
|
|
10398
|
+
className: (0, import_clsx73.default)("flex", horizontal ? "items-center gap-2" : "w-full flex-1 items-end justify-center"),
|
|
9720
10399
|
style: horizontal ? void 0 : { height: length },
|
|
9721
10400
|
children: [
|
|
9722
|
-
/* @__PURE__ */ (0,
|
|
10401
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9723
10402
|
"div",
|
|
9724
10403
|
{
|
|
9725
|
-
className: (0,
|
|
10404
|
+
className: (0, import_clsx73.default)("flex min-w-0", stacked ? "gap-0" : ""),
|
|
9726
10405
|
style: horizontal ? { width: length, flexDirection: stacked ? "row" : "column", gap: stacked ? 0 : gap } : {
|
|
9727
10406
|
height: "100%",
|
|
9728
10407
|
width: perCategory,
|
|
@@ -9732,7 +10411,7 @@ function BarChart({
|
|
|
9732
10411
|
},
|
|
9733
10412
|
children: bars.map((bar) => {
|
|
9734
10413
|
const extent = `${bar.value / max * 100}%`;
|
|
9735
|
-
return /* @__PURE__ */ (0,
|
|
10414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9736
10415
|
"div",
|
|
9737
10416
|
{
|
|
9738
10417
|
title: `${category} \xB7 ${bar.key}: ${bar.value}`,
|
|
@@ -9748,11 +10427,11 @@ function BarChart({
|
|
|
9748
10427
|
})
|
|
9749
10428
|
}
|
|
9750
10429
|
),
|
|
9751
|
-
showValues && horizontal && /* @__PURE__ */ (0,
|
|
10430
|
+
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] })
|
|
9752
10431
|
]
|
|
9753
10432
|
}
|
|
9754
10433
|
),
|
|
9755
|
-
showLabels && !horizontal && /* @__PURE__ */ (0,
|
|
10434
|
+
showLabels && !horizontal && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: (0, import_clsx73.default)("truncate text-center text-default-secondary", labelClass2), children: category })
|
|
9756
10435
|
]
|
|
9757
10436
|
},
|
|
9758
10437
|
category
|
|
@@ -9763,8 +10442,8 @@ function BarChart({
|
|
|
9763
10442
|
}
|
|
9764
10443
|
|
|
9765
10444
|
// src/components/charts/donut-chart.tsx
|
|
9766
|
-
var
|
|
9767
|
-
var
|
|
10445
|
+
var import_clsx74 = __toESM(require("clsx"), 1);
|
|
10446
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
9768
10447
|
var SIZE13 = {
|
|
9769
10448
|
sm: { box: 88, thickness: 10 },
|
|
9770
10449
|
md: { box: 128, thickness: 14 },
|
|
@@ -9788,8 +10467,8 @@ function DonutChart({
|
|
|
9788
10467
|
const visible = segments.filter((s) => s.value > 0);
|
|
9789
10468
|
const gapLength = visible.length > 1 ? gap / 360 * circumference : 0;
|
|
9790
10469
|
let offset2 = 0;
|
|
9791
|
-
return /* @__PURE__ */ (0,
|
|
9792
|
-
/* @__PURE__ */ (0,
|
|
10470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: (0, import_clsx74.default)("relative inline-flex shrink-0 items-center justify-center", className), children: [
|
|
10471
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
9793
10472
|
"svg",
|
|
9794
10473
|
{
|
|
9795
10474
|
width: box,
|
|
@@ -9800,7 +10479,7 @@ function DonutChart({
|
|
|
9800
10479
|
"aria-hidden": label ? void 0 : true,
|
|
9801
10480
|
className: "block -rotate-90",
|
|
9802
10481
|
children: [
|
|
9803
|
-
/* @__PURE__ */ (0,
|
|
10482
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("circle", { cx: box / 2, cy: box / 2, r: radius, fill: "none", stroke: CHART_TRACK, strokeWidth: ring }),
|
|
9804
10483
|
total > 0 && segments.map((segment, i) => {
|
|
9805
10484
|
const fraction = Math.max(0, segment.value) / total;
|
|
9806
10485
|
const length = Math.max(0, fraction * circumference - gapLength);
|
|
@@ -9808,7 +10487,7 @@ function DonutChart({
|
|
|
9808
10487
|
const thisOffset = offset2;
|
|
9809
10488
|
offset2 += fraction * circumference;
|
|
9810
10489
|
if (segment.value <= 0) return null;
|
|
9811
|
-
return /* @__PURE__ */ (0,
|
|
10490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9812
10491
|
"circle",
|
|
9813
10492
|
{
|
|
9814
10493
|
cx: box / 2,
|
|
@@ -9827,16 +10506,16 @@ function DonutChart({
|
|
|
9827
10506
|
]
|
|
9828
10507
|
}
|
|
9829
10508
|
),
|
|
9830
|
-
(centerValue != null || centerLabel != null) && /* @__PURE__ */ (0,
|
|
9831
|
-
centerValue != null && /* @__PURE__ */ (0,
|
|
9832
|
-
centerLabel != null && /* @__PURE__ */ (0,
|
|
10509
|
+
(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: [
|
|
10510
|
+
centerValue != null && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "text-subheading-sm font-bold leading-none text-default", children: centerValue }),
|
|
10511
|
+
centerLabel != null && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "mt-0.5 text-body-tiny text-default-secondary", children: centerLabel })
|
|
9833
10512
|
] })
|
|
9834
10513
|
] });
|
|
9835
10514
|
}
|
|
9836
10515
|
|
|
9837
10516
|
// src/components/charts/radial-gauge.tsx
|
|
9838
|
-
var
|
|
9839
|
-
var
|
|
10517
|
+
var import_clsx75 = __toESM(require("clsx"), 1);
|
|
10518
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
9840
10519
|
var SIZE14 = {
|
|
9841
10520
|
sm: { box: 72, thickness: 8, value: "text-body-sm" },
|
|
9842
10521
|
md: { box: 104, thickness: 11, value: "text-subheading-sm" },
|
|
@@ -9865,8 +10544,8 @@ function RadialGauge({
|
|
|
9865
10544
|
const fraction = max > 0 ? Math.min(1, Math.max(0, value / max)) : 0;
|
|
9866
10545
|
const stroke = resolveChartColor(color, tone);
|
|
9867
10546
|
const rotation = -90 + (360 - clampedSweep) / 2;
|
|
9868
|
-
return /* @__PURE__ */ (0,
|
|
9869
|
-
/* @__PURE__ */ (0,
|
|
10547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: (0, import_clsx75.default)("relative inline-flex shrink-0 items-center justify-center", className), children: [
|
|
10548
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
9870
10549
|
"svg",
|
|
9871
10550
|
{
|
|
9872
10551
|
width: box,
|
|
@@ -9878,7 +10557,7 @@ function RadialGauge({
|
|
|
9878
10557
|
className: "block",
|
|
9879
10558
|
style: { transform: `rotate(${rotation}deg)` },
|
|
9880
10559
|
children: [
|
|
9881
|
-
/* @__PURE__ */ (0,
|
|
10560
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9882
10561
|
"circle",
|
|
9883
10562
|
{
|
|
9884
10563
|
cx: box / 2,
|
|
@@ -9891,7 +10570,7 @@ function RadialGauge({
|
|
|
9891
10570
|
strokeLinecap: "round"
|
|
9892
10571
|
}
|
|
9893
10572
|
),
|
|
9894
|
-
/* @__PURE__ */ (0,
|
|
10573
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9895
10574
|
"circle",
|
|
9896
10575
|
{
|
|
9897
10576
|
cx: box / 2,
|
|
@@ -9908,17 +10587,17 @@ function RadialGauge({
|
|
|
9908
10587
|
]
|
|
9909
10588
|
}
|
|
9910
10589
|
),
|
|
9911
|
-
/* @__PURE__ */ (0,
|
|
9912
|
-
children === void 0 ? /* @__PURE__ */ (0,
|
|
9913
|
-
centerLabel != null && /* @__PURE__ */ (0,
|
|
10590
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: [
|
|
10591
|
+
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,
|
|
10592
|
+
centerLabel != null && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "mt-0.5 text-body-tiny text-default-secondary", children: centerLabel })
|
|
9914
10593
|
] })
|
|
9915
10594
|
] });
|
|
9916
10595
|
}
|
|
9917
10596
|
|
|
9918
10597
|
// src/components/charts/sparkline.tsx
|
|
9919
|
-
var
|
|
9920
|
-
var
|
|
9921
|
-
var
|
|
10598
|
+
var import_react71 = require("react");
|
|
10599
|
+
var import_clsx76 = __toESM(require("clsx"), 1);
|
|
10600
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
9922
10601
|
var SIZE15 = {
|
|
9923
10602
|
sm: { width: 80, height: 24 },
|
|
9924
10603
|
md: { width: 120, height: 36 },
|
|
@@ -9938,7 +10617,7 @@ function Sparkline({
|
|
|
9938
10617
|
label,
|
|
9939
10618
|
className
|
|
9940
10619
|
}) {
|
|
9941
|
-
const gradientId = (0,
|
|
10620
|
+
const gradientId = (0, import_react71.useId)();
|
|
9942
10621
|
if (data.length < 2) return null;
|
|
9943
10622
|
const w = width ?? SIZE15[size2].width;
|
|
9944
10623
|
const h = height ?? SIZE15[size2].height;
|
|
@@ -9956,7 +10635,7 @@ function Sparkline({
|
|
|
9956
10635
|
const points = coords.map((p) => `${p.x.toFixed(2)},${p.y.toFixed(2)}`).join(" ");
|
|
9957
10636
|
const areaPath = `M ${points.split(" ").join(" L ")} L ${coords[coords.length - 1].x.toFixed(2)},${h} L ${coords[0].x.toFixed(2)},${h} Z`;
|
|
9958
10637
|
const last = coords[coords.length - 1];
|
|
9959
|
-
return /* @__PURE__ */ (0,
|
|
10638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
9960
10639
|
"svg",
|
|
9961
10640
|
{
|
|
9962
10641
|
width: stretch ? void 0 : w,
|
|
@@ -9967,16 +10646,16 @@ function Sparkline({
|
|
|
9967
10646
|
role: label ? "img" : void 0,
|
|
9968
10647
|
"aria-label": label,
|
|
9969
10648
|
"aria-hidden": label ? void 0 : true,
|
|
9970
|
-
className: (0,
|
|
10649
|
+
className: (0, import_clsx76.default)("block", stretch ? "h-full w-full" : "shrink-0", className),
|
|
9971
10650
|
children: [
|
|
9972
|
-
variant === "area" && /* @__PURE__ */ (0,
|
|
9973
|
-
/* @__PURE__ */ (0,
|
|
9974
|
-
/* @__PURE__ */ (0,
|
|
9975
|
-
/* @__PURE__ */ (0,
|
|
10651
|
+
variant === "area" && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
10652
|
+
/* @__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: [
|
|
10653
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("stop", { offset: "0%", stopColor: stroke, stopOpacity: 0.24 }),
|
|
10654
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("stop", { offset: "100%", stopColor: stroke, stopOpacity: 0 })
|
|
9976
10655
|
] }) }),
|
|
9977
|
-
/* @__PURE__ */ (0,
|
|
10656
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: areaPath, fill: `url(#${gradientId})` })
|
|
9978
10657
|
] }),
|
|
9979
|
-
/* @__PURE__ */ (0,
|
|
10658
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9980
10659
|
"polyline",
|
|
9981
10660
|
{
|
|
9982
10661
|
points,
|
|
@@ -9988,7 +10667,7 @@ function Sparkline({
|
|
|
9988
10667
|
fill: "none"
|
|
9989
10668
|
}
|
|
9990
10669
|
),
|
|
9991
|
-
showEndDot && /* @__PURE__ */ (0,
|
|
10670
|
+
showEndDot && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9992
10671
|
"circle",
|
|
9993
10672
|
{
|
|
9994
10673
|
cx: last.x,
|
|
@@ -10005,8 +10684,8 @@ function Sparkline({
|
|
|
10005
10684
|
}
|
|
10006
10685
|
|
|
10007
10686
|
// src/components/charts/mini-bar-chart.tsx
|
|
10008
|
-
var
|
|
10009
|
-
var
|
|
10687
|
+
var import_clsx77 = __toESM(require("clsx"), 1);
|
|
10688
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
10010
10689
|
var SIZE16 = {
|
|
10011
10690
|
sm: { width: 80, height: 32, gap: 2 },
|
|
10012
10691
|
md: { width: 120, height: 48, gap: 3 },
|
|
@@ -10042,7 +10721,7 @@ function MiniBarChart({
|
|
|
10042
10721
|
const span = vertical ? w : h;
|
|
10043
10722
|
const extent = vertical ? h : w;
|
|
10044
10723
|
const barThickness = (span - g * (bars.length - 1)) / bars.length;
|
|
10045
|
-
return /* @__PURE__ */ (0,
|
|
10724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
10046
10725
|
"svg",
|
|
10047
10726
|
{
|
|
10048
10727
|
width: stretch ? void 0 : w,
|
|
@@ -10053,11 +10732,11 @@ function MiniBarChart({
|
|
|
10053
10732
|
role: label ? "img" : void 0,
|
|
10054
10733
|
"aria-label": label,
|
|
10055
10734
|
"aria-hidden": label ? void 0 : true,
|
|
10056
|
-
className: (0,
|
|
10735
|
+
className: (0, import_clsx77.default)("block", stretch ? "h-full w-full" : "shrink-0", className),
|
|
10057
10736
|
children: bars.map((v, i) => {
|
|
10058
10737
|
const magnitude = Math.max(2, v / max * extent);
|
|
10059
10738
|
const offset2 = i * (barThickness + g);
|
|
10060
|
-
return /* @__PURE__ */ (0,
|
|
10739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
10061
10740
|
"rect",
|
|
10062
10741
|
{
|
|
10063
10742
|
x: (vertical ? offset2 : 0).toFixed(2),
|
|
@@ -10075,21 +10754,21 @@ function MiniBarChart({
|
|
|
10075
10754
|
}
|
|
10076
10755
|
|
|
10077
10756
|
// src/components/charts/chart-legend.tsx
|
|
10078
|
-
var
|
|
10757
|
+
var import_clsx79 = __toESM(require("clsx"), 1);
|
|
10079
10758
|
|
|
10080
10759
|
// src/components/charts/legend-dot.tsx
|
|
10081
|
-
var
|
|
10082
|
-
var
|
|
10760
|
+
var import_clsx78 = __toESM(require("clsx"), 1);
|
|
10761
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
10083
10762
|
var SHAPE = {
|
|
10084
10763
|
dot: { sm: "size-1.5 rounded-full", md: "size-2 rounded-full" },
|
|
10085
10764
|
square: { sm: "size-1.5 rounded-[2px]", md: "size-2 rounded-[3px]" },
|
|
10086
10765
|
line: { sm: "h-0.5 w-3 rounded-full", md: "h-0.5 w-4 rounded-full" }
|
|
10087
10766
|
};
|
|
10088
10767
|
function LegendDot({ tone, color, hue, size: size2 = "md", shape = "dot", className }) {
|
|
10089
|
-
return /* @__PURE__ */ (0,
|
|
10768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
10090
10769
|
"span",
|
|
10091
10770
|
{
|
|
10092
|
-
className: (0,
|
|
10771
|
+
className: (0, import_clsx78.default)("inline-block shrink-0", SHAPE[shape][size2], className),
|
|
10093
10772
|
style: { backgroundColor: color || !hue ? resolveChartColor(color, tone) : `var(--badge-${hue}-text)` },
|
|
10094
10773
|
"aria-hidden": true
|
|
10095
10774
|
}
|
|
@@ -10097,7 +10776,7 @@ function LegendDot({ tone, color, hue, size: size2 = "md", shape = "dot", classN
|
|
|
10097
10776
|
}
|
|
10098
10777
|
|
|
10099
10778
|
// src/components/charts/chart-legend.tsx
|
|
10100
|
-
var
|
|
10779
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
10101
10780
|
function ChartLegend({
|
|
10102
10781
|
items,
|
|
10103
10782
|
orientation = "vertical",
|
|
@@ -10106,23 +10785,23 @@ function ChartLegend({
|
|
|
10106
10785
|
className
|
|
10107
10786
|
}) {
|
|
10108
10787
|
const horizontal = orientation === "horizontal";
|
|
10109
|
-
return /* @__PURE__ */ (0,
|
|
10788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
10110
10789
|
"div",
|
|
10111
10790
|
{
|
|
10112
|
-
className: (0,
|
|
10791
|
+
className: (0, import_clsx79.default)(
|
|
10113
10792
|
horizontal ? "flex flex-wrap items-center gap-x-4 gap-y-2" : "flex flex-col gap-3",
|
|
10114
10793
|
className
|
|
10115
10794
|
),
|
|
10116
|
-
children: items.map((item, i) => /* @__PURE__ */ (0,
|
|
10795
|
+
children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
10117
10796
|
"div",
|
|
10118
10797
|
{
|
|
10119
|
-
className: (0,
|
|
10798
|
+
className: (0, import_clsx79.default)("flex items-center gap-2", horizontal ? "min-w-0" : "justify-between"),
|
|
10120
10799
|
children: [
|
|
10121
|
-
/* @__PURE__ */ (0,
|
|
10122
|
-
/* @__PURE__ */ (0,
|
|
10123
|
-
/* @__PURE__ */ (0,
|
|
10800
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
10801
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(LegendDot, { color: resolveChartColor(item.color, item.tone, i), size: size2, shape }),
|
|
10802
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "truncate text-body-xs text-default-secondary", children: item.label })
|
|
10124
10803
|
] }),
|
|
10125
|
-
item.count != null && /* @__PURE__ */ (0,
|
|
10804
|
+
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 })
|
|
10126
10805
|
]
|
|
10127
10806
|
},
|
|
10128
10807
|
item.label
|
|
@@ -10132,9 +10811,9 @@ function ChartLegend({
|
|
|
10132
10811
|
}
|
|
10133
10812
|
|
|
10134
10813
|
// src/components/charts/trend-label.tsx
|
|
10135
|
-
var
|
|
10136
|
-
var
|
|
10137
|
-
var
|
|
10814
|
+
var import_clsx80 = __toESM(require("clsx"), 1);
|
|
10815
|
+
var import_lucide_react29 = require("lucide-react");
|
|
10816
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
10138
10817
|
var SIZE17 = {
|
|
10139
10818
|
sm: "text-body-xs",
|
|
10140
10819
|
md: "text-body-sm",
|
|
@@ -10167,11 +10846,11 @@ function TrendLabel({
|
|
|
10167
10846
|
const rising = value > 0;
|
|
10168
10847
|
const flat = value === 0;
|
|
10169
10848
|
const good = direction === "up-is-good" ? rising : !rising;
|
|
10170
|
-
const Arrow = rising ?
|
|
10171
|
-
return /* @__PURE__ */ (0,
|
|
10849
|
+
const Arrow = rising ? import_lucide_react29.TrendingUpIcon : import_lucide_react29.TrendingDownIcon;
|
|
10850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
10172
10851
|
"span",
|
|
10173
10852
|
{
|
|
10174
|
-
className: (0,
|
|
10853
|
+
className: (0, import_clsx80.default)(
|
|
10175
10854
|
"inline-flex items-center gap-1 whitespace-nowrap",
|
|
10176
10855
|
SIZE17[size2],
|
|
10177
10856
|
WEIGHT2[weight ?? weightBySize[size2]],
|
|
@@ -10180,7 +10859,7 @@ function TrendLabel({
|
|
|
10180
10859
|
),
|
|
10181
10860
|
style: color ? { color } : void 0,
|
|
10182
10861
|
children: [
|
|
10183
|
-
showArrow && !flat && /* @__PURE__ */ (0,
|
|
10862
|
+
showArrow && !flat && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Arrow, { className: (0, import_clsx80.default)("shrink-0", ICON_SIZE[size2]), "aria-hidden": true }),
|
|
10184
10863
|
rising ? "+" : "",
|
|
10185
10864
|
value,
|
|
10186
10865
|
suffix
|
|
@@ -10190,9 +10869,9 @@ function TrendLabel({
|
|
|
10190
10869
|
}
|
|
10191
10870
|
|
|
10192
10871
|
// src/components/lists/listbox.tsx
|
|
10193
|
-
var
|
|
10194
|
-
var
|
|
10195
|
-
var
|
|
10872
|
+
var import_react72 = require("react");
|
|
10873
|
+
var import_clsx81 = __toESM(require("clsx"), 1);
|
|
10874
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
10196
10875
|
var isGroup3 = (entry) => "options" in entry;
|
|
10197
10876
|
function Listbox({
|
|
10198
10877
|
options,
|
|
@@ -10205,13 +10884,13 @@ function Listbox({
|
|
|
10205
10884
|
empty,
|
|
10206
10885
|
className
|
|
10207
10886
|
}) {
|
|
10208
|
-
const id = (0,
|
|
10887
|
+
const id = (0, import_react72.useId)();
|
|
10209
10888
|
const [value, setValue] = useControllableState({
|
|
10210
10889
|
value: valueProp,
|
|
10211
10890
|
defaultValue,
|
|
10212
10891
|
onChange: onValueChange
|
|
10213
10892
|
});
|
|
10214
|
-
const flat = (0,
|
|
10893
|
+
const flat = (0, import_react72.useMemo)(
|
|
10215
10894
|
() => options.flatMap((entry) => isGroup3(entry) ? entry.options : [entry]),
|
|
10216
10895
|
[options]
|
|
10217
10896
|
);
|
|
@@ -10223,7 +10902,7 @@ function Listbox({
|
|
|
10223
10902
|
defaultIndex: Math.max(0, selectedIndex)
|
|
10224
10903
|
});
|
|
10225
10904
|
const { setActiveIndex } = roving;
|
|
10226
|
-
(0,
|
|
10905
|
+
(0, import_react72.useEffect)(() => {
|
|
10227
10906
|
if (selectedIndex >= 0) setActiveIndex(selectedIndex);
|
|
10228
10907
|
}, [selectedIndex, setActiveIndex]);
|
|
10229
10908
|
let index = -1;
|
|
@@ -10238,7 +10917,7 @@ function Listbox({
|
|
|
10238
10917
|
const select = () => {
|
|
10239
10918
|
if (!option.disabled) setValue(option.value);
|
|
10240
10919
|
};
|
|
10241
|
-
return /* @__PURE__ */ (0,
|
|
10920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
10242
10921
|
"div",
|
|
10243
10922
|
{
|
|
10244
10923
|
ref: item.ref,
|
|
@@ -10259,7 +10938,7 @@ function Listbox({
|
|
|
10259
10938
|
select();
|
|
10260
10939
|
}
|
|
10261
10940
|
},
|
|
10262
|
-
className: (0,
|
|
10941
|
+
className: (0, import_clsx81.default)(
|
|
10263
10942
|
"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",
|
|
10264
10943
|
"hover:bg-default-secondary",
|
|
10265
10944
|
"data-[state=selected]:bg-brand-tertiary data-[state=selected]:font-semibold",
|
|
@@ -10267,17 +10946,17 @@ function Listbox({
|
|
|
10267
10946
|
FOCUS_RING_INSET
|
|
10268
10947
|
),
|
|
10269
10948
|
children: [
|
|
10270
|
-
/* @__PURE__ */ (0,
|
|
10271
|
-
option.meta !== void 0 && /* @__PURE__ */ (0,
|
|
10949
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "min-w-0 flex-1", children: option.label }),
|
|
10950
|
+
option.meta !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "shrink-0 whitespace-nowrap font-normal text-default-secondary", children: option.meta })
|
|
10272
10951
|
]
|
|
10273
10952
|
},
|
|
10274
10953
|
option.value
|
|
10275
10954
|
);
|
|
10276
10955
|
};
|
|
10277
10956
|
if (flat.length === 0 && empty) {
|
|
10278
|
-
return /* @__PURE__ */ (0,
|
|
10957
|
+
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 });
|
|
10279
10958
|
}
|
|
10280
|
-
return /* @__PURE__ */ (0,
|
|
10959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10281
10960
|
"div",
|
|
10282
10961
|
{
|
|
10283
10962
|
role: "listbox",
|
|
@@ -10286,10 +10965,10 @@ function Listbox({
|
|
|
10286
10965
|
className: cn(maxHeight !== void 0 && ["overflow-auto overscroll-contain", SCROLLBAR_CLASSES], className),
|
|
10287
10966
|
style: maxHeight !== void 0 ? { maxHeight } : void 0,
|
|
10288
10967
|
children: options.map((entry, groupIndex) => {
|
|
10289
|
-
if (!isGroup3(entry)) return /* @__PURE__ */ (0,
|
|
10968
|
+
if (!isGroup3(entry)) return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react72.Fragment, { children: renderOption(entry) }, entry.value);
|
|
10290
10969
|
const headerId = `${id}-group-${groupIndex}`;
|
|
10291
|
-
return /* @__PURE__ */ (0,
|
|
10292
|
-
/* @__PURE__ */ (0,
|
|
10970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { role: "group", "aria-labelledby": headerId, children: [
|
|
10971
|
+
/* @__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 }) }),
|
|
10293
10972
|
entry.options.map(renderOption)
|
|
10294
10973
|
] }, `${groupIndex}-${entry.label}`);
|
|
10295
10974
|
})
|
|
@@ -10298,9 +10977,9 @@ function Listbox({
|
|
|
10298
10977
|
}
|
|
10299
10978
|
|
|
10300
10979
|
// src/components/lists/list-row.tsx
|
|
10301
|
-
var
|
|
10302
|
-
var
|
|
10303
|
-
var
|
|
10980
|
+
var import_clsx82 = __toESM(require("clsx"), 1);
|
|
10981
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
10982
|
+
var DENSITY2 = {
|
|
10304
10983
|
default: {
|
|
10305
10984
|
pad: "py-4",
|
|
10306
10985
|
gap: "gap-3",
|
|
@@ -10339,7 +11018,7 @@ function ListRow({
|
|
|
10339
11018
|
"aria-label": ariaLabel,
|
|
10340
11019
|
className
|
|
10341
11020
|
}) {
|
|
10342
|
-
const d =
|
|
11021
|
+
const d = DENSITY2[density];
|
|
10343
11022
|
const hasTitleLine = Boolean(leading || title != null || titleMeta || meta);
|
|
10344
11023
|
const clickable = Boolean(onClick) && !asChild;
|
|
10345
11024
|
const interactive = clickable || asChild;
|
|
@@ -10360,24 +11039,24 @@ function ListRow({
|
|
|
10360
11039
|
className
|
|
10361
11040
|
)
|
|
10362
11041
|
};
|
|
10363
|
-
const body = /* @__PURE__ */ (0,
|
|
10364
|
-
/* @__PURE__ */ (0,
|
|
10365
|
-
hasTitleLine && /* @__PURE__ */ (0,
|
|
10366
|
-
/* @__PURE__ */ (0,
|
|
11042
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_jsx_runtime103.Fragment, { children: [
|
|
11043
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: (0, import_clsx82.default)("flex min-w-0 flex-1 flex-col", d.gap), children: [
|
|
11044
|
+
hasTitleLine && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
11045
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
10367
11046
|
leading,
|
|
10368
|
-
title != null && /* @__PURE__ */ (0,
|
|
10369
|
-
titleMeta && /* @__PURE__ */ (0,
|
|
11047
|
+
title != null && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: (0, import_clsx82.default)("truncate", d.title), children: title }),
|
|
11048
|
+
titleMeta && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "shrink-0", children: titleMeta })
|
|
10370
11049
|
] }),
|
|
10371
|
-
meta && /* @__PURE__ */ (0,
|
|
11050
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "shrink-0", children: meta })
|
|
10372
11051
|
] }),
|
|
10373
|
-
description && /* @__PURE__ */ (0,
|
|
11052
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: d.description, children: description }),
|
|
10374
11053
|
footer && // These two wrappers are propagation barriers, not controls — they add no
|
|
10375
11054
|
// behaviour of their own and must not be focusable or take a role.
|
|
10376
11055
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
10377
|
-
/* @__PURE__ */ (0,
|
|
11056
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { onClick: stopIfInteractive, onKeyDown: stopIfInteractive, children: footer })
|
|
10378
11057
|
] }),
|
|
10379
11058
|
trailing && // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
10380
|
-
/* @__PURE__ */ (0,
|
|
11059
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10381
11060
|
"div",
|
|
10382
11061
|
{
|
|
10383
11062
|
className: "ml-3 flex shrink-0 items-center self-center",
|
|
@@ -10388,7 +11067,7 @@ function ListRow({
|
|
|
10388
11067
|
)
|
|
10389
11068
|
] });
|
|
10390
11069
|
if (asChild) {
|
|
10391
|
-
return /* @__PURE__ */ (0,
|
|
11070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10392
11071
|
Slot,
|
|
10393
11072
|
{
|
|
10394
11073
|
...rootProps,
|
|
@@ -10401,7 +11080,7 @@ function ListRow({
|
|
|
10401
11080
|
}
|
|
10402
11081
|
);
|
|
10403
11082
|
}
|
|
10404
|
-
return /* @__PURE__ */ (0,
|
|
11083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10405
11084
|
Tag,
|
|
10406
11085
|
{
|
|
10407
11086
|
...rootProps,
|
|
@@ -10430,11 +11109,11 @@ function refusePress(event) {
|
|
|
10430
11109
|
}
|
|
10431
11110
|
|
|
10432
11111
|
// src/components/lists/file-row.tsx
|
|
10433
|
-
var
|
|
10434
|
-
var
|
|
10435
|
-
var
|
|
11112
|
+
var import_clsx83 = __toESM(require("clsx"), 1);
|
|
11113
|
+
var import_lucide_react30 = require("lucide-react");
|
|
11114
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
10436
11115
|
function FileTypeBadge({ type }) {
|
|
10437
|
-
return /* @__PURE__ */ (0,
|
|
11116
|
+
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 });
|
|
10438
11117
|
}
|
|
10439
11118
|
function FileRow({
|
|
10440
11119
|
name,
|
|
@@ -10448,24 +11127,24 @@ function FileRow({
|
|
|
10448
11127
|
actions,
|
|
10449
11128
|
className
|
|
10450
11129
|
}) {
|
|
10451
|
-
const lead = leading ?? (fileType ? /* @__PURE__ */ (0,
|
|
10452
|
-
return /* @__PURE__ */ (0,
|
|
11130
|
+
const lead = leading ?? (fileType ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FileTypeBadge, { type: fileType }) : null);
|
|
11131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
10453
11132
|
"div",
|
|
10454
11133
|
{
|
|
10455
|
-
className: (0,
|
|
11134
|
+
className: (0, import_clsx83.default)(
|
|
10456
11135
|
"flex items-center gap-3 rounded-lg border border-default bg-default px-3 py-2.5",
|
|
10457
11136
|
className
|
|
10458
11137
|
),
|
|
10459
11138
|
children: [
|
|
10460
11139
|
lead,
|
|
10461
|
-
/* @__PURE__ */ (0,
|
|
10462
|
-
/* @__PURE__ */ (0,
|
|
10463
|
-
detail && /* @__PURE__ */ (0,
|
|
11140
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
11141
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "truncate text-body-sm font-medium text-default", children: name }),
|
|
11142
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-body-xs text-default-secondary", children: detail })
|
|
10464
11143
|
] }),
|
|
10465
|
-
(onDownload || onRemove || actions) && /* @__PURE__ */ (0,
|
|
10466
|
-
onDownload && /* @__PURE__ */ (0,
|
|
10467
|
-
onRemove && /* @__PURE__ */ (0,
|
|
10468
|
-
actions && /* @__PURE__ */ (0,
|
|
11144
|
+
(onDownload || onRemove || actions) && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
11145
|
+
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 }) }) }),
|
|
11146
|
+
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 }) }) }),
|
|
11147
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "ml-2 flex items-center gap-2", children: actions })
|
|
10469
11148
|
] })
|
|
10470
11149
|
]
|
|
10471
11150
|
}
|
|
@@ -10473,8 +11152,8 @@ function FileRow({
|
|
|
10473
11152
|
}
|
|
10474
11153
|
|
|
10475
11154
|
// src/components/lists/scored-row.tsx
|
|
10476
|
-
var
|
|
10477
|
-
var
|
|
11155
|
+
var import_clsx84 = __toESM(require("clsx"), 1);
|
|
11156
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
10478
11157
|
var GAP5 = {
|
|
10479
11158
|
sm: "gap-2",
|
|
10480
11159
|
md: "gap-3",
|
|
@@ -10501,11 +11180,11 @@ function ScoredRow({
|
|
|
10501
11180
|
align = "center",
|
|
10502
11181
|
className
|
|
10503
11182
|
}) {
|
|
10504
|
-
return /* @__PURE__ */ (0,
|
|
10505
|
-
/* @__PURE__ */ (0,
|
|
11183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: (0, import_clsx84.default)("flex w-full", ALIGN3[align], GAP5[gap], className), children: [
|
|
11184
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
10506
11185
|
"div",
|
|
10507
11186
|
{
|
|
10508
|
-
className: (0,
|
|
11187
|
+
className: (0, import_clsx84.default)(
|
|
10509
11188
|
"flex min-w-0",
|
|
10510
11189
|
ALIGN3[align],
|
|
10511
11190
|
GAP5[leadingGap ?? gap],
|
|
@@ -10514,39 +11193,39 @@ function ScoredRow({
|
|
|
10514
11193
|
style: titleWidth ? { width: titleWidth } : void 0,
|
|
10515
11194
|
children: [
|
|
10516
11195
|
leading,
|
|
10517
|
-
/* @__PURE__ */ (0,
|
|
10518
|
-
/* @__PURE__ */ (0,
|
|
10519
|
-
subtitle && /* @__PURE__ */ (0,
|
|
11196
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
11197
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "truncate text-body-sm font-medium leading-none text-default", children: title }),
|
|
11198
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "mt-0.5 truncate text-body-xs text-default-secondary", children: subtitle })
|
|
10520
11199
|
] })
|
|
10521
11200
|
]
|
|
10522
11201
|
}
|
|
10523
11202
|
),
|
|
10524
|
-
aside && /* @__PURE__ */ (0,
|
|
11203
|
+
aside && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
10525
11204
|
"div",
|
|
10526
11205
|
{
|
|
10527
|
-
className: (0,
|
|
11206
|
+
className: (0, import_clsx84.default)("min-w-0", asideWidth ? "shrink-0" : "flex-1"),
|
|
10528
11207
|
style: asideWidth ? { width: asideWidth } : void 0,
|
|
10529
11208
|
children: aside
|
|
10530
11209
|
}
|
|
10531
11210
|
),
|
|
10532
|
-
meter && /* @__PURE__ */ (0,
|
|
11211
|
+
meter && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
10533
11212
|
"div",
|
|
10534
11213
|
{
|
|
10535
|
-
className: (0,
|
|
11214
|
+
className: (0, import_clsx84.default)("min-w-0", meterWidth ? "shrink-0" : "flex-1"),
|
|
10536
11215
|
style: meterWidth ? { width: meterWidth } : void 0,
|
|
10537
11216
|
children: meter
|
|
10538
11217
|
}
|
|
10539
11218
|
),
|
|
10540
|
-
trailing && /* @__PURE__ */ (0,
|
|
11219
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "shrink-0 text-right", style: trailingWidth ? { width: trailingWidth } : void 0, children: trailing })
|
|
10541
11220
|
] });
|
|
10542
11221
|
}
|
|
10543
11222
|
|
|
10544
11223
|
// src/components/lists/numbered-list.tsx
|
|
10545
|
-
var
|
|
11224
|
+
var import_clsx85 = __toESM(require("clsx"), 1);
|
|
10546
11225
|
|
|
10547
11226
|
// src/components/feedback/progress-bar.tsx
|
|
10548
|
-
var
|
|
10549
|
-
var
|
|
11227
|
+
var import_react73 = require("react");
|
|
11228
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
10550
11229
|
var SIZE18 = {
|
|
10551
11230
|
xs: "h-1",
|
|
10552
11231
|
sm: "h-1.5",
|
|
@@ -10574,9 +11253,9 @@ function ProgressBar({
|
|
|
10574
11253
|
}) {
|
|
10575
11254
|
const clamped = Math.min(100, Math.max(0, value));
|
|
10576
11255
|
const rounded = radius ? void 0 : "rounded-full";
|
|
10577
|
-
const labelId = (0,
|
|
11256
|
+
const labelId = (0, import_react73.useId)();
|
|
10578
11257
|
const filledSegments = segments ? Math.round(clamped / 100 * segments) : 0;
|
|
10579
|
-
const track = segments ? /* @__PURE__ */ (0,
|
|
11258
|
+
const track = segments ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10580
11259
|
"div",
|
|
10581
11260
|
{
|
|
10582
11261
|
role: "progressbar",
|
|
@@ -10588,7 +11267,7 @@ function ProgressBar({
|
|
|
10588
11267
|
"aria-label": label ? void 0 : ariaLabel,
|
|
10589
11268
|
"data-tone": tone,
|
|
10590
11269
|
className: cn("flex w-full gap-1", className),
|
|
10591
|
-
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0,
|
|
11270
|
+
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10592
11271
|
"span",
|
|
10593
11272
|
{
|
|
10594
11273
|
"data-filled": index < filledSegments || void 0,
|
|
@@ -10598,7 +11277,7 @@ function ProgressBar({
|
|
|
10598
11277
|
index
|
|
10599
11278
|
))
|
|
10600
11279
|
}
|
|
10601
|
-
) : /* @__PURE__ */ (0,
|
|
11280
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10602
11281
|
"div",
|
|
10603
11282
|
{
|
|
10604
11283
|
role: "progressbar",
|
|
@@ -10611,7 +11290,7 @@ function ProgressBar({
|
|
|
10611
11290
|
"aria-label": label ? void 0 : ariaLabel,
|
|
10612
11291
|
className: cn("w-full overflow-hidden bg-default-tertiary", SIZE18[size2], rounded, className),
|
|
10613
11292
|
style: radius ? { borderRadius: radius } : void 0,
|
|
10614
|
-
children: /* @__PURE__ */ (0,
|
|
11293
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10615
11294
|
"div",
|
|
10616
11295
|
{
|
|
10617
11296
|
className: cn("h-full transition-all motion-reduce:transition-none", rounded, FILL[tone]),
|
|
@@ -10621,10 +11300,10 @@ function ProgressBar({
|
|
|
10621
11300
|
}
|
|
10622
11301
|
);
|
|
10623
11302
|
if (!label && !showValue) return track;
|
|
10624
|
-
return /* @__PURE__ */ (0,
|
|
10625
|
-
/* @__PURE__ */ (0,
|
|
10626
|
-
label && /* @__PURE__ */ (0,
|
|
10627
|
-
showValue && /* @__PURE__ */ (0,
|
|
11303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { children: [
|
|
11304
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "mb-1.5 flex items-center justify-between gap-2", children: [
|
|
11305
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { id: labelId, className: "text-body-xs text-default-secondary", children: label }),
|
|
11306
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("span", { className: "ml-auto text-body-xs font-medium tabular-nums text-default", children: [
|
|
10628
11307
|
Math.round(clamped),
|
|
10629
11308
|
"%"
|
|
10630
11309
|
] })
|
|
@@ -10634,7 +11313,7 @@ function ProgressBar({
|
|
|
10634
11313
|
}
|
|
10635
11314
|
|
|
10636
11315
|
// src/components/lists/numbered-list.tsx
|
|
10637
|
-
var
|
|
11316
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
10638
11317
|
var GAP6 = {
|
|
10639
11318
|
sm: "gap-2",
|
|
10640
11319
|
md: "gap-3"
|
|
@@ -10648,18 +11327,18 @@ function NumberedList({
|
|
|
10648
11327
|
gap = "md",
|
|
10649
11328
|
className
|
|
10650
11329
|
}) {
|
|
10651
|
-
return /* @__PURE__ */ (0,
|
|
11330
|
+
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) => {
|
|
10652
11331
|
const tone = !item.tone || item.tone === "auto" ? getScoreTone(item.score, { direction }) : item.tone;
|
|
10653
|
-
return /* @__PURE__ */ (0,
|
|
10654
|
-
/* @__PURE__ */ (0,
|
|
10655
|
-
/* @__PURE__ */ (0,
|
|
10656
|
-
/* @__PURE__ */ (0,
|
|
10657
|
-
/* @__PURE__ */ (0,
|
|
10658
|
-
/* @__PURE__ */ (0,
|
|
10659
|
-
item.subtitle && /* @__PURE__ */ (0,
|
|
11332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("li", { className: "flex w-full shrink-0 flex-col gap-1.5", children: [
|
|
11333
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
11334
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
11335
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "w-[14px] shrink-0 text-body-xs font-bold text-default-secondary", children: startAt + index }),
|
|
11336
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex min-w-0 flex-col gap-px", children: [
|
|
11337
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "truncate text-body-sm font-medium leading-none text-default", children: item.title }),
|
|
11338
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "text-body-tiny text-default-tertiary", children: item.subtitle })
|
|
10660
11339
|
] })
|
|
10661
11340
|
] }),
|
|
10662
|
-
/* @__PURE__ */ (0,
|
|
11341
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10663
11342
|
ScoreValue,
|
|
10664
11343
|
{
|
|
10665
11344
|
value: item.score,
|
|
@@ -10670,43 +11349,43 @@ function NumberedList({
|
|
|
10670
11349
|
}
|
|
10671
11350
|
)
|
|
10672
11351
|
] }),
|
|
10673
|
-
/* @__PURE__ */ (0,
|
|
11352
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ProgressBar, { value: item.score, tone, "aria-label": `${item.title} score` })
|
|
10674
11353
|
] }, `${item.title}-${index}`);
|
|
10675
11354
|
}) });
|
|
10676
11355
|
}
|
|
10677
11356
|
|
|
10678
11357
|
// src/components/lists/icon-text-row.tsx
|
|
10679
|
-
var
|
|
10680
|
-
var
|
|
11358
|
+
var import_clsx86 = __toESM(require("clsx"), 1);
|
|
11359
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
10681
11360
|
function IconTextRow({ icon, title, detail, className }) {
|
|
10682
|
-
return /* @__PURE__ */ (0,
|
|
10683
|
-
/* @__PURE__ */ (0,
|
|
10684
|
-
/* @__PURE__ */ (0,
|
|
10685
|
-
/* @__PURE__ */ (0,
|
|
10686
|
-
/* @__PURE__ */ (0,
|
|
11361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: (0, import_clsx86.default)("flex items-start gap-3", className), children: [
|
|
11362
|
+
/* @__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 }),
|
|
11363
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "min-w-0", children: [
|
|
11364
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "text-body-sm font-semibold text-default", children: title }),
|
|
11365
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: detail })
|
|
10687
11366
|
] })
|
|
10688
11367
|
] });
|
|
10689
11368
|
}
|
|
10690
11369
|
|
|
10691
11370
|
// src/components/lists/checklist-row.tsx
|
|
10692
|
-
var
|
|
10693
|
-
var
|
|
10694
|
-
var
|
|
11371
|
+
var import_clsx87 = __toESM(require("clsx"), 1);
|
|
11372
|
+
var import_lucide_react31 = require("lucide-react");
|
|
11373
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
10695
11374
|
function ChecklistRow({ label, state, className }) {
|
|
10696
|
-
return /* @__PURE__ */ (0,
|
|
10697
|
-
/* @__PURE__ */ (0,
|
|
11375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("li", { "data-state": state, className: (0, import_clsx87.default)("flex items-center gap-3", className), children: [
|
|
11376
|
+
/* @__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)(
|
|
10698
11377
|
"span",
|
|
10699
11378
|
{
|
|
10700
|
-
className: (0,
|
|
11379
|
+
className: (0, import_clsx87.default)(
|
|
10701
11380
|
"size-3.5 rounded-full border-2",
|
|
10702
11381
|
state === "active" ? "motion-safe:animate-pulse border-brand-emphasis border-t-transparent" : "border-disabled"
|
|
10703
11382
|
)
|
|
10704
11383
|
}
|
|
10705
11384
|
) }),
|
|
10706
|
-
/* @__PURE__ */ (0,
|
|
11385
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
10707
11386
|
"span",
|
|
10708
11387
|
{
|
|
10709
|
-
className: (0,
|
|
11388
|
+
className: (0, import_clsx87.default)(
|
|
10710
11389
|
"text-body-sm",
|
|
10711
11390
|
state === "pending" ? "text-default-tertiary" : "font-semibold text-default"
|
|
10712
11391
|
),
|
|
@@ -10717,22 +11396,22 @@ function ChecklistRow({ label, state, className }) {
|
|
|
10717
11396
|
}
|
|
10718
11397
|
|
|
10719
11398
|
// src/components/lists/steps-list.tsx
|
|
10720
|
-
var
|
|
10721
|
-
var
|
|
11399
|
+
var import_clsx88 = __toESM(require("clsx"), 1);
|
|
11400
|
+
var import_jsx_runtime110 = (
|
|
10722
11401
|
// `text-[12px]` was off the type scale; 12 sits midway between Scale 01 (11) and
|
|
10723
11402
|
// Scale 02 (13), so it rounds up to 13 like every other snap in this pass.
|
|
10724
11403
|
require("react/jsx-runtime")
|
|
10725
11404
|
);
|
|
10726
11405
|
function StepsList({ steps, className }) {
|
|
10727
|
-
return /* @__PURE__ */ (0,
|
|
10728
|
-
/* @__PURE__ */ (0,
|
|
11406
|
+
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: [
|
|
11407
|
+
/* @__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 }),
|
|
10729
11408
|
step
|
|
10730
11409
|
] }, i)) });
|
|
10731
11410
|
}
|
|
10732
11411
|
|
|
10733
11412
|
// src/components/lists/detail-item.tsx
|
|
10734
|
-
var
|
|
10735
|
-
var
|
|
11413
|
+
var import_clsx89 = __toESM(require("clsx"), 1);
|
|
11414
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
10736
11415
|
var SPAN = {
|
|
10737
11416
|
1: "",
|
|
10738
11417
|
2: "sm:col-span-2",
|
|
@@ -10749,18 +11428,18 @@ function DetailItem({
|
|
|
10749
11428
|
}) {
|
|
10750
11429
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
10751
11430
|
if (layout === "inline") {
|
|
10752
|
-
return /* @__PURE__ */ (0,
|
|
10753
|
-
/* @__PURE__ */ (0,
|
|
10754
|
-
/* @__PURE__ */ (0,
|
|
10755
|
-
/* @__PURE__ */ (0,
|
|
10756
|
-
detail && /* @__PURE__ */ (0,
|
|
11431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_clsx89.default)("flex gap-3 text-body-xs", SPAN[span], className), children: [
|
|
11432
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: (0, import_clsx89.default)("shrink-0 text-default-secondary", labelWidth), children: label }),
|
|
11433
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5 [overflow-wrap:anywhere]", children: [
|
|
11434
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "text-default", children: shown }),
|
|
11435
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "text-default-secondary", children: detail })
|
|
10757
11436
|
] })
|
|
10758
11437
|
] });
|
|
10759
11438
|
}
|
|
10760
|
-
return /* @__PURE__ */ (0,
|
|
10761
|
-
/* @__PURE__ */ (0,
|
|
10762
|
-
/* @__PURE__ */ (0,
|
|
10763
|
-
detail && /* @__PURE__ */ (0,
|
|
11439
|
+
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: [
|
|
11440
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "text-body-tiny font-medium text-default-secondary", children: label }),
|
|
11441
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "text-body-sm font-medium text-default [overflow-wrap:anywhere]", children: shown }),
|
|
11442
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "text-body-xs text-default-secondary [overflow-wrap:anywhere]", children: detail })
|
|
10764
11443
|
] });
|
|
10765
11444
|
}
|
|
10766
11445
|
var COLUMNS3 = {
|
|
@@ -10771,38 +11450,38 @@ var COLUMNS3 = {
|
|
|
10771
11450
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"
|
|
10772
11451
|
};
|
|
10773
11452
|
function DetailGrid({ children, columns = "auto", className }) {
|
|
10774
|
-
return /* @__PURE__ */ (0,
|
|
11453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: (0, import_clsx89.default)("grid gap-x-4 gap-y-4", COLUMNS3[columns], className), children });
|
|
10775
11454
|
}
|
|
10776
11455
|
|
|
10777
11456
|
// src/components/lists/description-list.tsx
|
|
10778
|
-
var
|
|
10779
|
-
var
|
|
10780
|
-
var
|
|
10781
|
-
var
|
|
11457
|
+
var import_react74 = require("react");
|
|
11458
|
+
var import_clsx90 = __toESM(require("clsx"), 1);
|
|
11459
|
+
var import_lucide_react32 = require("lucide-react");
|
|
11460
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
10782
11461
|
function DescriptionList({ children, className }) {
|
|
10783
|
-
return /* @__PURE__ */ (0,
|
|
11462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("dl", { className: cn("flex flex-col gap-3", className), children });
|
|
10784
11463
|
}
|
|
10785
11464
|
function DescriptionItem({ label, value, copyValue, className }) {
|
|
10786
11465
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
10787
|
-
return /* @__PURE__ */ (0,
|
|
10788
|
-
/* @__PURE__ */ (0,
|
|
10789
|
-
/* @__PURE__ */ (0,
|
|
10790
|
-
/* @__PURE__ */ (0,
|
|
10791
|
-
copyValue && /* @__PURE__ */ (0,
|
|
11466
|
+
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: [
|
|
11467
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("dt", { className: "shrink-0 grow-0 basis-28 text-default-secondary", children: label }),
|
|
11468
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("dd", { className: "flex min-w-0 flex-[1_1_10rem] items-start gap-1.5 text-default", children: [
|
|
11469
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "min-w-0 [overflow-wrap:anywhere]", children: shown }),
|
|
11470
|
+
copyValue && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(CopyButton, { value: copyValue, label: `Copy ${label.toLowerCase()}` })
|
|
10792
11471
|
] })
|
|
10793
11472
|
] });
|
|
10794
11473
|
}
|
|
10795
11474
|
function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
10796
|
-
const [copied, setCopied] = (0,
|
|
10797
|
-
(0,
|
|
11475
|
+
const [copied, setCopied] = (0, import_react74.useState)(false);
|
|
11476
|
+
(0, import_react74.useEffect)(() => {
|
|
10798
11477
|
if (!copied) return;
|
|
10799
11478
|
const timer = window.setTimeout(() => setCopied(false), 2e3);
|
|
10800
11479
|
return () => window.clearTimeout(timer);
|
|
10801
11480
|
}, [copied]);
|
|
10802
11481
|
return (
|
|
10803
11482
|
// relative: keeps the sr-only status (absolutely positioned) inside a scrolling container.
|
|
10804
|
-
/* @__PURE__ */ (0,
|
|
10805
|
-
/* @__PURE__ */ (0,
|
|
11483
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("span", { className: "relative inline-flex", children: [
|
|
11484
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
10806
11485
|
IconButton,
|
|
10807
11486
|
{
|
|
10808
11487
|
variant: "subtle",
|
|
@@ -10816,10 +11495,10 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
10816
11495
|
() => void 0
|
|
10817
11496
|
);
|
|
10818
11497
|
},
|
|
10819
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
11498
|
+
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 })
|
|
10820
11499
|
}
|
|
10821
11500
|
),
|
|
10822
|
-
/* @__PURE__ */ (0,
|
|
11501
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { role: "status", className: "sr-only", children: copied ? copiedLabel : "" })
|
|
10823
11502
|
] })
|
|
10824
11503
|
);
|
|
10825
11504
|
}
|
|
@@ -10827,16 +11506,16 @@ function EmailText({ email, className }) {
|
|
|
10827
11506
|
const at = email.lastIndexOf("@");
|
|
10828
11507
|
const local = at > 0 ? email.slice(0, at) : email;
|
|
10829
11508
|
const domain = at > 0 ? email.slice(at) : "";
|
|
10830
|
-
return /* @__PURE__ */ (0,
|
|
10831
|
-
/* @__PURE__ */ (0,
|
|
10832
|
-
domain && /* @__PURE__ */ (0,
|
|
11509
|
+
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: [
|
|
11510
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: local }),
|
|
11511
|
+
domain && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap [flex-shrink:0.001]", children: domain })
|
|
10833
11512
|
] });
|
|
10834
11513
|
}
|
|
10835
11514
|
|
|
10836
11515
|
// src/components/lists/checked-group-list.tsx
|
|
10837
|
-
var
|
|
10838
|
-
var
|
|
10839
|
-
var
|
|
11516
|
+
var import_clsx91 = __toESM(require("clsx"), 1);
|
|
11517
|
+
var import_lucide_react33 = require("lucide-react");
|
|
11518
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
10840
11519
|
var COLUMNS4 = {
|
|
10841
11520
|
1: "columns-1",
|
|
10842
11521
|
2: "columns-2",
|
|
@@ -10850,23 +11529,23 @@ function CheckedGroupList({
|
|
|
10850
11529
|
className
|
|
10851
11530
|
}) {
|
|
10852
11531
|
if (groups.length === 0) {
|
|
10853
|
-
return /* @__PURE__ */ (0,
|
|
11532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("p", { className: (0, import_clsx91.default)("text-body-xs text-default-secondary", className), children: emptyLabel });
|
|
10854
11533
|
}
|
|
10855
|
-
const glyph = icon === void 0 ? /* @__PURE__ */ (0,
|
|
10856
|
-
return /* @__PURE__ */ (0,
|
|
10857
|
-
/* @__PURE__ */ (0,
|
|
10858
|
-
/* @__PURE__ */ (0,
|
|
10859
|
-
glyph && /* @__PURE__ */ (0,
|
|
11534
|
+
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;
|
|
11535
|
+
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: [
|
|
11536
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("p", { className: "mb-2 text-body-tiny font-semibold uppercase tracking-wide text-default-secondary", children: group.label }),
|
|
11537
|
+
/* @__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: [
|
|
11538
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "shrink-0", children: glyph }),
|
|
10860
11539
|
item
|
|
10861
11540
|
] }, item)) })
|
|
10862
11541
|
] }, group.label)) });
|
|
10863
11542
|
}
|
|
10864
11543
|
|
|
10865
11544
|
// src/components/lists/tree-view.tsx
|
|
10866
|
-
var
|
|
10867
|
-
var
|
|
10868
|
-
var
|
|
10869
|
-
var
|
|
11545
|
+
var import_react75 = require("react");
|
|
11546
|
+
var import_clsx92 = __toESM(require("clsx"), 1);
|
|
11547
|
+
var import_lucide_react34 = require("lucide-react");
|
|
11548
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
10870
11549
|
var ROW = {
|
|
10871
11550
|
sm: "min-h-8 py-1 text-body-xs",
|
|
10872
11551
|
md: "min-h-10 py-2 text-body-sm"
|
|
@@ -10896,10 +11575,10 @@ function TreeView({
|
|
|
10896
11575
|
value: selectedProp,
|
|
10897
11576
|
defaultValue: defaultSelected
|
|
10898
11577
|
});
|
|
10899
|
-
const [focusedId, setFocusedId] = (0,
|
|
10900
|
-
const rowRefs = (0,
|
|
10901
|
-
const expandedSet = (0,
|
|
10902
|
-
const visible = (0,
|
|
11578
|
+
const [focusedId, setFocusedId] = (0, import_react75.useState)(null);
|
|
11579
|
+
const rowRefs = (0, import_react75.useRef)(/* @__PURE__ */ new Map());
|
|
11580
|
+
const expandedSet = (0, import_react75.useMemo)(() => new Set(expanded), [expanded]);
|
|
11581
|
+
const visible = (0, import_react75.useMemo)(() => {
|
|
10903
11582
|
const out = [];
|
|
10904
11583
|
const walk = (nodes, level, parentId) => {
|
|
10905
11584
|
for (const item of nodes) {
|
|
@@ -10970,7 +11649,7 @@ function TreeView({
|
|
|
10970
11649
|
if (!node) return null;
|
|
10971
11650
|
const children = getChildren?.(item) ?? [];
|
|
10972
11651
|
const isSelected = selected === id;
|
|
10973
|
-
return /* @__PURE__ */ (0,
|
|
11652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
10974
11653
|
"li",
|
|
10975
11654
|
{
|
|
10976
11655
|
role: "treeitem",
|
|
@@ -10992,7 +11671,7 @@ function TreeView({
|
|
|
10992
11671
|
},
|
|
10993
11672
|
className: "outline-none [&:focus-visible>div]:ring-2 [&:focus-visible>div]:ring-inset [&:focus-visible>div]:ring-brand",
|
|
10994
11673
|
children: [
|
|
10995
|
-
/* @__PURE__ */ (0,
|
|
11674
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
10996
11675
|
"div",
|
|
10997
11676
|
{
|
|
10998
11677
|
onClick: () => {
|
|
@@ -11000,7 +11679,7 @@ function TreeView({
|
|
|
11000
11679
|
choose(node);
|
|
11001
11680
|
},
|
|
11002
11681
|
style: { paddingLeft: 8 + (level - 1) * INDENT },
|
|
11003
|
-
className: (0,
|
|
11682
|
+
className: (0, import_clsx92.default)(
|
|
11004
11683
|
"flex w-full cursor-pointer items-center gap-1.5 rounded-md pr-2 transition-colors",
|
|
11005
11684
|
ROW[size2],
|
|
11006
11685
|
isSelected ? "bg-brand-secondary text-default" : "text-default hover:bg-default-secondary"
|
|
@@ -11010,7 +11689,7 @@ function TreeView({
|
|
|
11010
11689
|
// Not a button: the treeitem is the one tab stop, and Left/Right already toggle.
|
|
11011
11690
|
// A pointer user still needs a target that toggles without selecting.
|
|
11012
11691
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
11013
|
-
/* @__PURE__ */ (0,
|
|
11692
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
11014
11693
|
"span",
|
|
11015
11694
|
{
|
|
11016
11695
|
"aria-hidden": true,
|
|
@@ -11021,11 +11700,11 @@ function TreeView({
|
|
|
11021
11700
|
focus(id);
|
|
11022
11701
|
},
|
|
11023
11702
|
className: "flex size-5 shrink-0 items-center justify-center rounded text-icon-default-secondary hover:bg-default-tertiary",
|
|
11024
|
-
children: /* @__PURE__ */ (0,
|
|
11703
|
+
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") })
|
|
11025
11704
|
}
|
|
11026
11705
|
)
|
|
11027
|
-
) : /* @__PURE__ */ (0,
|
|
11028
|
-
/* @__PURE__ */ (0,
|
|
11706
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { "aria-hidden": true, className: "size-5 shrink-0" }),
|
|
11707
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "min-w-0 flex-1", children: renderItem(item, {
|
|
11029
11708
|
level,
|
|
11030
11709
|
hasChildren: node.hasChildren,
|
|
11031
11710
|
expanded: node.expanded,
|
|
@@ -11034,38 +11713,38 @@ function TreeView({
|
|
|
11034
11713
|
]
|
|
11035
11714
|
}
|
|
11036
11715
|
),
|
|
11037
|
-
node.expanded && /* @__PURE__ */ (0,
|
|
11716
|
+
node.expanded && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("ul", { role: "group", className: "m-0 list-none p-0", children: renderLevel(children, level + 1) })
|
|
11038
11717
|
]
|
|
11039
11718
|
},
|
|
11040
11719
|
id
|
|
11041
11720
|
);
|
|
11042
11721
|
});
|
|
11043
|
-
return /* @__PURE__ */ (0,
|
|
11722
|
+
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) });
|
|
11044
11723
|
}
|
|
11045
11724
|
|
|
11046
11725
|
// src/components/lists/table.tsx
|
|
11047
|
-
var
|
|
11048
|
-
var
|
|
11049
|
-
var
|
|
11050
|
-
var
|
|
11051
|
-
var Table = (0,
|
|
11726
|
+
var import_react76 = require("react");
|
|
11727
|
+
var import_clsx93 = __toESM(require("clsx"), 1);
|
|
11728
|
+
var import_lucide_react35 = require("lucide-react");
|
|
11729
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
11730
|
+
var Table = (0, import_react76.forwardRef)(function Table2({ label, density = "default", fixed = false, maxHeight, className, children, ...rest }, ref) {
|
|
11052
11731
|
return (
|
|
11053
11732
|
// The scroll container is separate from the table so the header stays inside the
|
|
11054
11733
|
// scrolling region — a table that is its own scroll container cannot have a sticky
|
|
11055
11734
|
// header.
|
|
11056
11735
|
// The scroll wrapper is required for a <table>, which cannot itself scroll, so this
|
|
11057
11736
|
// takes the scrollbar styling rather than ScrollArea.
|
|
11058
|
-
/* @__PURE__ */ (0,
|
|
11737
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11059
11738
|
"div",
|
|
11060
11739
|
{
|
|
11061
|
-
className: (0,
|
|
11740
|
+
className: (0, import_clsx93.default)(
|
|
11062
11741
|
"w-full",
|
|
11063
|
-
maxHeight ? (0,
|
|
11742
|
+
maxHeight ? (0, import_clsx93.default)("overflow-auto overscroll-contain", FOCUS_RING_INSET) : "overflow-x-auto",
|
|
11064
11743
|
SCROLLBAR_CLASSES
|
|
11065
11744
|
),
|
|
11066
11745
|
style: maxHeight ? { maxHeight } : void 0,
|
|
11067
11746
|
...maxHeight ? { role: "region", tabIndex: 0, "aria-label": label ? `${label} (scrolls)` : "Table (scrolls)" } : {},
|
|
11068
|
-
children: /* @__PURE__ */ (0,
|
|
11747
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11069
11748
|
"table",
|
|
11070
11749
|
{
|
|
11071
11750
|
ref,
|
|
@@ -11081,9 +11760,9 @@ var Table = (0, import_react73.forwardRef)(function Table2({ label, density = "d
|
|
|
11081
11760
|
)
|
|
11082
11761
|
);
|
|
11083
11762
|
});
|
|
11084
|
-
var TableCaption = (0,
|
|
11763
|
+
var TableCaption = (0, import_react76.forwardRef)(
|
|
11085
11764
|
function TableCaption2({ className, ...rest }, ref) {
|
|
11086
|
-
return /* @__PURE__ */ (0,
|
|
11765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11087
11766
|
"caption",
|
|
11088
11767
|
{
|
|
11089
11768
|
ref,
|
|
@@ -11093,19 +11772,19 @@ var TableCaption = (0, import_react73.forwardRef)(
|
|
|
11093
11772
|
);
|
|
11094
11773
|
}
|
|
11095
11774
|
);
|
|
11096
|
-
var TableHeader = (0,
|
|
11775
|
+
var TableHeader = (0, import_react76.forwardRef)(
|
|
11097
11776
|
function TableHeader2({ className, ...rest }, ref) {
|
|
11098
|
-
return /* @__PURE__ */ (0,
|
|
11777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("thead", { ref, className: cn("border-b border-default", className), ...rest });
|
|
11099
11778
|
}
|
|
11100
11779
|
);
|
|
11101
|
-
var TableBody = (0,
|
|
11780
|
+
var TableBody = (0, import_react76.forwardRef)(
|
|
11102
11781
|
function TableBody2({ className, ...rest }, ref) {
|
|
11103
|
-
return /* @__PURE__ */ (0,
|
|
11782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("tbody", { ref, className, ...rest });
|
|
11104
11783
|
}
|
|
11105
11784
|
);
|
|
11106
|
-
var TableFooter = (0,
|
|
11785
|
+
var TableFooter = (0, import_react76.forwardRef)(
|
|
11107
11786
|
function TableFooter2({ className, ...rest }, ref) {
|
|
11108
|
-
return /* @__PURE__ */ (0,
|
|
11787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11109
11788
|
"tfoot",
|
|
11110
11789
|
{
|
|
11111
11790
|
ref,
|
|
@@ -11115,15 +11794,15 @@ var TableFooter = (0, import_react73.forwardRef)(
|
|
|
11115
11794
|
);
|
|
11116
11795
|
}
|
|
11117
11796
|
);
|
|
11118
|
-
var ROW_TONE = (0,
|
|
11797
|
+
var ROW_TONE = (0, import_clsx93.default)(
|
|
11119
11798
|
"data-[tone=muted]:bg-default-secondary",
|
|
11120
11799
|
"data-[tone=brand]:bg-brand-tertiary",
|
|
11121
11800
|
"data-[tone=positive]:bg-positive-tertiary",
|
|
11122
11801
|
"data-[tone=warning]:bg-warning-tertiary",
|
|
11123
11802
|
"data-[tone=danger]:bg-danger-tertiary"
|
|
11124
11803
|
);
|
|
11125
|
-
var TableRow = (0,
|
|
11126
|
-
return /* @__PURE__ */ (0,
|
|
11804
|
+
var TableRow = (0, import_react76.forwardRef)(function TableRow2({ selected, tone = "default", dimmed = false, className, ...rest }, ref) {
|
|
11805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11127
11806
|
"tr",
|
|
11128
11807
|
{
|
|
11129
11808
|
ref,
|
|
@@ -11144,9 +11823,9 @@ var TableRow = (0, import_react73.forwardRef)(function TableRow2({ selected, ton
|
|
|
11144
11823
|
);
|
|
11145
11824
|
});
|
|
11146
11825
|
var ALIGN4 = { left: "text-left", center: "text-center", right: "text-right" };
|
|
11147
|
-
var TableHead = (0,
|
|
11826
|
+
var TableHead = (0, import_react76.forwardRef)(function TableHead2({ sort, onSort, align = "left", sticky = false, className, children, ...rest }, ref) {
|
|
11148
11827
|
const sortable = sort !== void 0 && onSort !== void 0;
|
|
11149
|
-
return /* @__PURE__ */ (0,
|
|
11828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11150
11829
|
"th",
|
|
11151
11830
|
{
|
|
11152
11831
|
ref,
|
|
@@ -11159,27 +11838,27 @@ var TableHead = (0, import_react73.forwardRef)(function TableHead2({ sort, onSor
|
|
|
11159
11838
|
className
|
|
11160
11839
|
),
|
|
11161
11840
|
...rest,
|
|
11162
|
-
children: sortable ? /* @__PURE__ */ (0,
|
|
11841
|
+
children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
11163
11842
|
"button",
|
|
11164
11843
|
{
|
|
11165
11844
|
type: "button",
|
|
11166
11845
|
onClick: onSort,
|
|
11167
|
-
className: (0,
|
|
11846
|
+
className: (0, import_clsx93.default)(
|
|
11168
11847
|
"inline-flex items-center gap-1.5 rounded transition-colors hover:text-default",
|
|
11169
11848
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default"
|
|
11170
11849
|
),
|
|
11171
11850
|
children: [
|
|
11172
11851
|
children,
|
|
11173
|
-
sort === false ? /* @__PURE__ */ (0,
|
|
11852
|
+
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" })
|
|
11174
11853
|
]
|
|
11175
11854
|
}
|
|
11176
11855
|
) : children
|
|
11177
11856
|
}
|
|
11178
11857
|
);
|
|
11179
11858
|
});
|
|
11180
|
-
var TableCell = (0,
|
|
11859
|
+
var TableCell = (0, import_react76.forwardRef)(function TableCell2({ align = "left", density = "default", header = false, className, ...rest }, ref) {
|
|
11181
11860
|
const Tag = header ? "th" : "td";
|
|
11182
|
-
return /* @__PURE__ */ (0,
|
|
11861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
11183
11862
|
Tag,
|
|
11184
11863
|
{
|
|
11185
11864
|
ref,
|
|
@@ -11197,13 +11876,13 @@ var TableCell = (0, import_react73.forwardRef)(function TableCell2({ align = "le
|
|
|
11197
11876
|
});
|
|
11198
11877
|
|
|
11199
11878
|
// src/components/lists/data-table.tsx
|
|
11200
|
-
var
|
|
11201
|
-
var
|
|
11879
|
+
var import_react78 = require("react");
|
|
11880
|
+
var import_clsx97 = __toESM(require("clsx"), 1);
|
|
11202
11881
|
var import_react_table = require("@tanstack/react-table");
|
|
11203
11882
|
|
|
11204
11883
|
// src/components/feedback/empty-state.tsx
|
|
11205
|
-
var
|
|
11206
|
-
var
|
|
11884
|
+
var import_clsx94 = __toESM(require("clsx"), 1);
|
|
11885
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
11207
11886
|
var SIZES = {
|
|
11208
11887
|
sm: "py-8",
|
|
11209
11888
|
md: "py-12",
|
|
@@ -11222,11 +11901,11 @@ function EmptyState({
|
|
|
11222
11901
|
action,
|
|
11223
11902
|
className
|
|
11224
11903
|
}) {
|
|
11225
|
-
return /* @__PURE__ */ (0,
|
|
11904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
11226
11905
|
"div",
|
|
11227
11906
|
{
|
|
11228
11907
|
"data-variant": variant,
|
|
11229
|
-
className: (0,
|
|
11908
|
+
className: (0, import_clsx94.default)(
|
|
11230
11909
|
"flex flex-col items-center justify-center gap-2 px-4 text-center text-body-sm",
|
|
11231
11910
|
SIZES[size2],
|
|
11232
11911
|
TONES[variant],
|
|
@@ -11234,8 +11913,8 @@ function EmptyState({
|
|
|
11234
11913
|
),
|
|
11235
11914
|
"aria-live": variant === "empty" ? void 0 : "polite",
|
|
11236
11915
|
children: [
|
|
11237
|
-
icon && /* @__PURE__ */ (0,
|
|
11238
|
-
/* @__PURE__ */ (0,
|
|
11916
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "text-default-tertiary", children: icon }),
|
|
11917
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("p", { children: message }),
|
|
11239
11918
|
action
|
|
11240
11919
|
]
|
|
11241
11920
|
}
|
|
@@ -11243,20 +11922,20 @@ function EmptyState({
|
|
|
11243
11922
|
}
|
|
11244
11923
|
|
|
11245
11924
|
// src/components/feedback/skeleton.tsx
|
|
11246
|
-
var
|
|
11247
|
-
var
|
|
11248
|
-
var
|
|
11925
|
+
var import_react77 = require("react");
|
|
11926
|
+
var import_clsx95 = __toESM(require("clsx"), 1);
|
|
11927
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
11249
11928
|
var SHAPE2 = {
|
|
11250
11929
|
line: "h-4 rounded",
|
|
11251
11930
|
block: "h-full w-full rounded-lg",
|
|
11252
11931
|
circle: "aspect-square rounded-full"
|
|
11253
11932
|
};
|
|
11254
|
-
var Skeleton = (0,
|
|
11933
|
+
var Skeleton = (0, import_react77.forwardRef)(function Skeleton2({ shape = "line", lines = 1, className, ...rest }, ref) {
|
|
11255
11934
|
if (shape === "line" && lines > 1) {
|
|
11256
|
-
return /* @__PURE__ */ (0,
|
|
11935
|
+
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)(
|
|
11257
11936
|
"div",
|
|
11258
11937
|
{
|
|
11259
|
-
className: (0,
|
|
11938
|
+
className: (0, import_clsx95.default)(
|
|
11260
11939
|
"motion-safe:animate-pulse bg-default-tertiary",
|
|
11261
11940
|
SHAPE2.line,
|
|
11262
11941
|
// A ragged last line reads as a paragraph rather than a solid slab.
|
|
@@ -11267,13 +11946,13 @@ var Skeleton = (0, import_react74.forwardRef)(function Skeleton2({ shape = "line
|
|
|
11267
11946
|
index
|
|
11268
11947
|
)) });
|
|
11269
11948
|
}
|
|
11270
|
-
return /* @__PURE__ */ (0,
|
|
11949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
11271
11950
|
"div",
|
|
11272
11951
|
{
|
|
11273
11952
|
ref,
|
|
11274
11953
|
"aria-hidden": true,
|
|
11275
11954
|
"data-slot": "skeleton",
|
|
11276
|
-
className: (0,
|
|
11955
|
+
className: (0, import_clsx95.default)("motion-safe:animate-pulse bg-default-tertiary", SHAPE2[shape], className),
|
|
11277
11956
|
...rest
|
|
11278
11957
|
}
|
|
11279
11958
|
);
|
|
@@ -11308,8 +11987,8 @@ function cardSlots(columns) {
|
|
|
11308
11987
|
}
|
|
11309
11988
|
|
|
11310
11989
|
// src/components/lists/data-table-parts.tsx
|
|
11311
|
-
var
|
|
11312
|
-
var
|
|
11990
|
+
var import_lucide_react36 = require("lucide-react");
|
|
11991
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
11313
11992
|
var SELECT_COLUMN_ID = "select";
|
|
11314
11993
|
function columnLabel(column) {
|
|
11315
11994
|
const meta = column.columnDef.meta;
|
|
@@ -11325,11 +12004,11 @@ function DataTableColumnHeader({
|
|
|
11325
12004
|
const text = title ?? columnLabel(column);
|
|
11326
12005
|
const hidden = column.columnDef.meta?.hideHeader;
|
|
11327
12006
|
if (!column.getCanSort()) {
|
|
11328
|
-
return /* @__PURE__ */ (0,
|
|
12007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: cn(hidden ? "sr-only" : "inline-block w-max whitespace-nowrap", className), children: text });
|
|
11329
12008
|
}
|
|
11330
12009
|
const sorted = column.getIsSorted();
|
|
11331
|
-
const Icon = sorted === "asc" ?
|
|
11332
|
-
return /* @__PURE__ */ (0,
|
|
12010
|
+
const Icon = sorted === "asc" ? import_lucide_react36.ChevronUpIcon : sorted === "desc" ? import_lucide_react36.ChevronDownIcon : import_lucide_react36.ChevronsUpDownIcon;
|
|
12011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
11333
12012
|
"button",
|
|
11334
12013
|
{
|
|
11335
12014
|
type: "button",
|
|
@@ -11343,8 +12022,8 @@ function DataTableColumnHeader({
|
|
|
11343
12022
|
className
|
|
11344
12023
|
),
|
|
11345
12024
|
children: [
|
|
11346
|
-
/* @__PURE__ */ (0,
|
|
11347
|
-
/* @__PURE__ */ (0,
|
|
12025
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: cn(hidden && "sr-only"), children: text }),
|
|
12026
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11348
12027
|
Icon,
|
|
11349
12028
|
{
|
|
11350
12029
|
"aria-hidden": true,
|
|
@@ -11360,7 +12039,7 @@ function createSelectColumn(options = {}) {
|
|
|
11360
12039
|
const { getRowLabel, selectAllLabel = "Select all rows on this page" } = options;
|
|
11361
12040
|
return {
|
|
11362
12041
|
id: SELECT_COLUMN_ID,
|
|
11363
|
-
header: ({ table }) => /* @__PURE__ */ (0,
|
|
12042
|
+
header: ({ table }) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11364
12043
|
Checkbox,
|
|
11365
12044
|
{
|
|
11366
12045
|
"aria-label": selectAllLabel,
|
|
@@ -11369,7 +12048,7 @@ function createSelectColumn(options = {}) {
|
|
|
11369
12048
|
onCheckedChange: (checked) => table.toggleAllPageRowsSelected(checked)
|
|
11370
12049
|
}
|
|
11371
12050
|
),
|
|
11372
|
-
cell: ({ row }) => /* @__PURE__ */ (0,
|
|
12051
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11373
12052
|
Checkbox,
|
|
11374
12053
|
{
|
|
11375
12054
|
"aria-label": getRowLabel ? getRowLabel(row.original) : "Select row",
|
|
@@ -11387,11 +12066,11 @@ function createSelectColumn(options = {}) {
|
|
|
11387
12066
|
function DataTableViewOptions({ table, label = "Columns" }) {
|
|
11388
12067
|
const columns = table.getAllLeafColumns().filter((column) => column.getCanHide());
|
|
11389
12068
|
if (columns.length === 0) return null;
|
|
11390
|
-
return /* @__PURE__ */ (0,
|
|
11391
|
-
/* @__PURE__ */ (0,
|
|
11392
|
-
/* @__PURE__ */ (0,
|
|
11393
|
-
/* @__PURE__ */ (0,
|
|
11394
|
-
columns.map((column) => /* @__PURE__ */ (0,
|
|
12069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(DropdownMenu, { children: [
|
|
12070
|
+
/* @__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 }) }),
|
|
12071
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(DropdownMenuContent, { align: "end", children: [
|
|
12072
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(DropdownMenuLabel, { children: "Show columns" }),
|
|
12073
|
+
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11395
12074
|
DropdownMenuCheckboxItem,
|
|
11396
12075
|
{
|
|
11397
12076
|
checked: column.getIsVisible(),
|
|
@@ -11409,7 +12088,7 @@ function DataTablePagination({
|
|
|
11409
12088
|
summary
|
|
11410
12089
|
}) {
|
|
11411
12090
|
const { pageIndex, pageSize } = table.getState().pagination;
|
|
11412
|
-
return /* @__PURE__ */ (0,
|
|
12091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
11413
12092
|
PaginationBar,
|
|
11414
12093
|
{
|
|
11415
12094
|
page: pageIndex + 1,
|
|
@@ -11425,8 +12104,8 @@ function DataTablePagination({
|
|
|
11425
12104
|
}
|
|
11426
12105
|
|
|
11427
12106
|
// src/components/lists/data-table-cells.tsx
|
|
11428
|
-
var
|
|
11429
|
-
var
|
|
12107
|
+
var import_clsx96 = __toESM(require("clsx"), 1);
|
|
12108
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
11430
12109
|
function textFromNode(node) {
|
|
11431
12110
|
if (typeof node === "string") return node;
|
|
11432
12111
|
if (typeof node === "number") return String(node);
|
|
@@ -11437,23 +12116,23 @@ function textFromNode(node) {
|
|
|
11437
12116
|
return void 0;
|
|
11438
12117
|
}
|
|
11439
12118
|
function TableCellLeadText({ primary, secondary, size: size2 = "md", className }) {
|
|
11440
|
-
return /* @__PURE__ */ (0,
|
|
11441
|
-
/* @__PURE__ */ (0,
|
|
12119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: (0, import_clsx96.default)("flex min-w-0 flex-col gap-0.5", className), children: [
|
|
12120
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11442
12121
|
"span",
|
|
11443
12122
|
{
|
|
11444
12123
|
title: primary,
|
|
11445
|
-
className: (0,
|
|
12124
|
+
className: (0, import_clsx96.default)(
|
|
11446
12125
|
"block truncate font-medium leading-snug text-default",
|
|
11447
12126
|
size2 === "sm" ? "text-body-xs" : "text-body-sm"
|
|
11448
12127
|
),
|
|
11449
12128
|
children: primary
|
|
11450
12129
|
}
|
|
11451
12130
|
),
|
|
11452
|
-
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0,
|
|
12131
|
+
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11453
12132
|
"span",
|
|
11454
12133
|
{
|
|
11455
12134
|
title: String(secondary),
|
|
11456
|
-
className: (0,
|
|
12135
|
+
className: (0, import_clsx96.default)(
|
|
11457
12136
|
"block truncate font-normal leading-tight text-default-secondary",
|
|
11458
12137
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs"
|
|
11459
12138
|
),
|
|
@@ -11462,10 +12141,10 @@ function TableCellLeadText({ primary, secondary, size: size2 = "md", className }
|
|
|
11462
12141
|
) : (
|
|
11463
12142
|
// An element brings its own overflow handling, so it gets no `truncate` here,
|
|
11464
12143
|
// which a card layout's touch un-truncation would otherwise turn into wrapping.
|
|
11465
|
-
/* @__PURE__ */ (0,
|
|
12144
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11466
12145
|
"span",
|
|
11467
12146
|
{
|
|
11468
|
-
className: (0,
|
|
12147
|
+
className: (0, import_clsx96.default)(
|
|
11469
12148
|
"block min-w-0 font-normal leading-tight text-default-secondary",
|
|
11470
12149
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs"
|
|
11471
12150
|
),
|
|
@@ -11482,11 +12161,11 @@ function TableCellText({
|
|
|
11482
12161
|
truncate = true,
|
|
11483
12162
|
className
|
|
11484
12163
|
}) {
|
|
11485
|
-
return /* @__PURE__ */ (0,
|
|
12164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11486
12165
|
"span",
|
|
11487
12166
|
{
|
|
11488
12167
|
title: truncate ? textFromNode(children) : void 0,
|
|
11489
|
-
className: (0,
|
|
12168
|
+
className: (0, import_clsx96.default)(
|
|
11490
12169
|
"font-normal leading-snug",
|
|
11491
12170
|
size2 === "sm" ? "text-body-tiny" : "text-body-xs",
|
|
11492
12171
|
truncate ? "block min-w-0 truncate" : "whitespace-nowrap",
|
|
@@ -11498,15 +12177,15 @@ function TableCellText({
|
|
|
11498
12177
|
);
|
|
11499
12178
|
}
|
|
11500
12179
|
function TableCellBadge({ label, className }) {
|
|
11501
|
-
return /* @__PURE__ */ (0,
|
|
12180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11502
12181
|
"span",
|
|
11503
12182
|
{
|
|
11504
12183
|
title: label,
|
|
11505
|
-
className: (0,
|
|
12184
|
+
className: (0, import_clsx96.default)(
|
|
11506
12185
|
"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",
|
|
11507
12186
|
className
|
|
11508
12187
|
),
|
|
11509
|
-
children: /* @__PURE__ */ (0,
|
|
12188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "truncate", children: label })
|
|
11510
12189
|
}
|
|
11511
12190
|
);
|
|
11512
12191
|
}
|
|
@@ -11518,8 +12197,8 @@ function TableCellProgress({
|
|
|
11518
12197
|
className
|
|
11519
12198
|
}) {
|
|
11520
12199
|
const clamped = Math.round(Math.min(100, Math.max(0, percent)));
|
|
11521
|
-
return /* @__PURE__ */ (0,
|
|
11522
|
-
/* @__PURE__ */ (0,
|
|
12200
|
+
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: [
|
|
12201
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11523
12202
|
ProgressBar,
|
|
11524
12203
|
{
|
|
11525
12204
|
value: clamped,
|
|
@@ -11529,7 +12208,7 @@ function TableCellProgress({
|
|
|
11529
12208
|
"aria-label": label ?? `${clamped}%`
|
|
11530
12209
|
}
|
|
11531
12210
|
),
|
|
11532
|
-
/* @__PURE__ */ (0,
|
|
12211
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("span", { className: "shrink-0 text-body-tiny leading-none tabular-nums text-default-secondary", children: [
|
|
11533
12212
|
clamped,
|
|
11534
12213
|
"%"
|
|
11535
12214
|
] })
|
|
@@ -11537,11 +12216,11 @@ function TableCellProgress({
|
|
|
11537
12216
|
}
|
|
11538
12217
|
|
|
11539
12218
|
// src/components/lists/data-table.tsx
|
|
11540
|
-
var
|
|
12219
|
+
var import_jsx_runtime120 = (
|
|
11541
12220
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
11542
12221
|
require("react/jsx-runtime")
|
|
11543
12222
|
);
|
|
11544
|
-
var
|
|
12223
|
+
var DENSITY3 = {
|
|
11545
12224
|
default: {
|
|
11546
12225
|
headerCell: "px-4 py-3",
|
|
11547
12226
|
headerText: "text-body-xs font-medium text-default-secondary",
|
|
@@ -11567,14 +12246,14 @@ function resolve(updater, previous) {
|
|
|
11567
12246
|
return typeof updater === "function" ? updater(previous) : updater;
|
|
11568
12247
|
}
|
|
11569
12248
|
function useTableState(controlled, initial, onChange) {
|
|
11570
|
-
const [inner, setInner] = (0,
|
|
12249
|
+
const [inner, setInner] = (0, import_react78.useState)(initial);
|
|
11571
12250
|
const value = controlled ?? inner;
|
|
11572
|
-
const latest = (0,
|
|
12251
|
+
const latest = (0, import_react78.useRef)(value);
|
|
11573
12252
|
latest.current = value;
|
|
11574
12253
|
const isControlled = controlled !== void 0;
|
|
11575
|
-
const onChangeRef = (0,
|
|
12254
|
+
const onChangeRef = (0, import_react78.useRef)(onChange);
|
|
11576
12255
|
onChangeRef.current = onChange;
|
|
11577
|
-
const set = (0,
|
|
12256
|
+
const set = (0, import_react78.useCallback)(
|
|
11578
12257
|
(updater) => {
|
|
11579
12258
|
const next = resolve(updater, latest.current);
|
|
11580
12259
|
if (!isControlled) setInner(next);
|
|
@@ -11585,7 +12264,7 @@ function useTableState(controlled, initial, onChange) {
|
|
|
11585
12264
|
return [value, set];
|
|
11586
12265
|
}
|
|
11587
12266
|
function CellInteractionGuard({ children }) {
|
|
11588
|
-
return /* @__PURE__ */ (0,
|
|
12267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11589
12268
|
"div",
|
|
11590
12269
|
{
|
|
11591
12270
|
className: "contents",
|
|
@@ -11598,9 +12277,9 @@ function CellInteractionGuard({ children }) {
|
|
|
11598
12277
|
}
|
|
11599
12278
|
var HEADER_PADDING_PX = { default: 32, compact: 24 };
|
|
11600
12279
|
function useHeaderWidths(padding2, deps) {
|
|
11601
|
-
const nodes = (0,
|
|
11602
|
-
const [widths, setWidths] = (0,
|
|
11603
|
-
const measure = (0,
|
|
12280
|
+
const nodes = (0, import_react78.useRef)(/* @__PURE__ */ new Map());
|
|
12281
|
+
const [widths, setWidths] = (0, import_react78.useState)({});
|
|
12282
|
+
const measure = (0, import_react78.useCallback)(() => {
|
|
11604
12283
|
const next = {};
|
|
11605
12284
|
nodes.current.forEach((node, id) => {
|
|
11606
12285
|
next[id] = Math.ceil(node.getBoundingClientRect().width) + padding2;
|
|
@@ -11611,15 +12290,15 @@ function useHeaderWidths(padding2, deps) {
|
|
|
11611
12290
|
return same ? previous : next;
|
|
11612
12291
|
});
|
|
11613
12292
|
}, [padding2]);
|
|
11614
|
-
(0,
|
|
11615
|
-
(0,
|
|
12293
|
+
(0, import_react78.useLayoutEffect)(measure, [measure, deps]);
|
|
12294
|
+
(0, import_react78.useLayoutEffect)(() => {
|
|
11616
12295
|
let live = true;
|
|
11617
12296
|
void document.fonts?.ready.then(() => live && measure());
|
|
11618
12297
|
return () => {
|
|
11619
12298
|
live = false;
|
|
11620
12299
|
};
|
|
11621
12300
|
}, [measure]);
|
|
11622
|
-
const register = (0,
|
|
12301
|
+
const register = (0, import_react78.useCallback)(
|
|
11623
12302
|
(id) => (node) => {
|
|
11624
12303
|
if (node) nodes.current.set(id, node);
|
|
11625
12304
|
else nodes.current.delete(id);
|
|
@@ -11629,9 +12308,9 @@ function useHeaderWidths(padding2, deps) {
|
|
|
11629
12308
|
return { widths, register };
|
|
11630
12309
|
}
|
|
11631
12310
|
function useScrollEdges() {
|
|
11632
|
-
const [node, setNode] = (0,
|
|
11633
|
-
const [edges, setEdges] = (0,
|
|
11634
|
-
const measure = (0,
|
|
12311
|
+
const [node, setNode] = (0, import_react78.useState)(null);
|
|
12312
|
+
const [edges, setEdges] = (0, import_react78.useState)({ overflowing: false, atStart: true, atEnd: true, overflowingY: false, atTop: true });
|
|
12313
|
+
const measure = (0, import_react78.useCallback)(() => {
|
|
11635
12314
|
if (!node) return;
|
|
11636
12315
|
const { scrollLeft, scrollWidth, clientWidth, scrollTop, scrollHeight, clientHeight } = node;
|
|
11637
12316
|
const next = {
|
|
@@ -11645,7 +12324,7 @@ function useScrollEdges() {
|
|
|
11645
12324
|
(previous) => previous.overflowing === next.overflowing && previous.atStart === next.atStart && previous.atEnd === next.atEnd && previous.overflowingY === next.overflowingY && previous.atTop === next.atTop ? previous : next
|
|
11646
12325
|
);
|
|
11647
12326
|
}, [node]);
|
|
11648
|
-
(0,
|
|
12327
|
+
(0, import_react78.useLayoutEffect)(() => {
|
|
11649
12328
|
if (!node) return;
|
|
11650
12329
|
measure();
|
|
11651
12330
|
if (typeof ResizeObserver === "undefined") return;
|
|
@@ -11658,7 +12337,7 @@ function useScrollEdges() {
|
|
|
11658
12337
|
}
|
|
11659
12338
|
var serverSortedValue = () => void 0;
|
|
11660
12339
|
function defaultRowLink({ children, ...props }) {
|
|
11661
|
-
return /* @__PURE__ */ (0,
|
|
12340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("a", { ...props, children });
|
|
11662
12341
|
}
|
|
11663
12342
|
function DataTable({
|
|
11664
12343
|
columns,
|
|
@@ -11722,7 +12401,7 @@ function DataTable({
|
|
|
11722
12401
|
onColumnVisibilityChange
|
|
11723
12402
|
);
|
|
11724
12403
|
const [rowSelection, setRowSelection] = useTableState(state.rowSelection, {}, onRowSelectionChange);
|
|
11725
|
-
const allColumns = (0,
|
|
12404
|
+
const allColumns = (0, import_react78.useMemo)(() => {
|
|
11726
12405
|
let cols = columns;
|
|
11727
12406
|
if (manual.sorting) {
|
|
11728
12407
|
cols = cols.map(
|
|
@@ -11758,8 +12437,8 @@ function DataTable({
|
|
|
11758
12437
|
enableSortingRemoval: false,
|
|
11759
12438
|
...tableOptions
|
|
11760
12439
|
});
|
|
11761
|
-
const selectionReported = (0,
|
|
11762
|
-
(0,
|
|
12440
|
+
const selectionReported = (0, import_react78.useRef)(false);
|
|
12441
|
+
(0, import_react78.useEffect)(() => {
|
|
11763
12442
|
if (!onSelectionChange) return;
|
|
11764
12443
|
if (!selectionReported.current) {
|
|
11765
12444
|
selectionReported.current = true;
|
|
@@ -11768,9 +12447,9 @@ function DataTable({
|
|
|
11768
12447
|
onSelectionChange(table.getSelectedRowModel().rows.map((row) => row.original));
|
|
11769
12448
|
}, [rowSelection]);
|
|
11770
12449
|
const [wrapRef, containerWidth] = useElementWidth();
|
|
11771
|
-
const captionId = (0,
|
|
12450
|
+
const captionId = (0, import_react78.useId)();
|
|
11772
12451
|
const breakpoint = responsive === false ? 0 : typeof responsive === "object" ? responsive.breakpoint ?? DEFAULT_CARD_BREAKPOINT_PX : DEFAULT_CARD_BREAKPOINT_PX;
|
|
11773
|
-
const modeRef = (0,
|
|
12452
|
+
const modeRef = (0, import_react78.useRef)("table");
|
|
11774
12453
|
const mode = nextLayoutMode(modeRef.current, containerWidth, breakpoint);
|
|
11775
12454
|
modeRef.current = mode;
|
|
11776
12455
|
const search = searchable === true ? {} : searchable || void 0;
|
|
@@ -11783,16 +12462,16 @@ function DataTable({
|
|
|
11783
12462
|
const filtering = Boolean(globalFilter) || columnFilters.length > 0;
|
|
11784
12463
|
const rows = table.getRowModel().rows;
|
|
11785
12464
|
const isEmpty = !loading && !error && rows.length === 0;
|
|
11786
|
-
const placeholder = error ? /* @__PURE__ */ (0,
|
|
12465
|
+
const placeholder = error ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11787
12466
|
EmptyState,
|
|
11788
12467
|
{
|
|
11789
12468
|
message: typeof error === "string" ? error : "Something went wrong loading this data.",
|
|
11790
12469
|
variant: "error",
|
|
11791
12470
|
size: "md",
|
|
11792
|
-
action: onRetry ? /* @__PURE__ */ (0,
|
|
12471
|
+
action: onRetry ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Button, { variant: "neutral", size: "sm", onClick: onRetry, children: "Retry" }) : void 0,
|
|
11793
12472
|
className: "mx-auto max-w-[520px]"
|
|
11794
12473
|
}
|
|
11795
|
-
) : isEmpty ? typeof empty === "string" ? /* @__PURE__ */ (0,
|
|
12474
|
+
) : isEmpty ? typeof empty === "string" ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(EmptyState, { message: empty, size: "md", className: "mx-auto max-w-[520px]" }) : empty : null;
|
|
11796
12475
|
const resultCount = manual.filtering ? table.getRowCount() : table.getFilteredRowModel().rows.length;
|
|
11797
12476
|
const showToolbar = Boolean(search || toolbar || showColumnMenu);
|
|
11798
12477
|
const showPager = paginated && !error && table.getRowCount() > 0;
|
|
@@ -11814,9 +12493,9 @@ function DataTable({
|
|
|
11814
12493
|
getRowLabel,
|
|
11815
12494
|
maxHeight
|
|
11816
12495
|
};
|
|
11817
|
-
return /* @__PURE__ */ (0,
|
|
11818
|
-
showToolbar && /* @__PURE__ */ (0,
|
|
11819
|
-
search && /* @__PURE__ */ (0,
|
|
12496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { "data-slot": "data-table", className: cn("relative flex flex-col gap-3", className), children: [
|
|
12497
|
+
showToolbar && /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: cn("flex flex-wrap items-center gap-2", !bordered && "px-4 pt-3"), children: [
|
|
12498
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11820
12499
|
SearchInput,
|
|
11821
12500
|
{
|
|
11822
12501
|
size: "md",
|
|
@@ -11829,14 +12508,14 @@ function DataTable({
|
|
|
11829
12508
|
}
|
|
11830
12509
|
),
|
|
11831
12510
|
toolbar,
|
|
11832
|
-
showColumnMenu && /* @__PURE__ */ (0,
|
|
12511
|
+
showColumnMenu && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "ml-auto", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DataTableViewOptions, { table }) })
|
|
11833
12512
|
] }),
|
|
11834
|
-
/* @__PURE__ */ (0,
|
|
11835
|
-
/* @__PURE__ */ (0,
|
|
11836
|
-
mode === "cards" && caption && /* @__PURE__ */ (0,
|
|
11837
|
-
mode === "cards" ? maxHeight ? /* @__PURE__ */ (0,
|
|
11838
|
-
showPager && /* @__PURE__ */ (0,
|
|
11839
|
-
footer && /* @__PURE__ */ (0,
|
|
12513
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { role: "status", "aria-live": "polite", className: "sr-only", children: filtering && !loading ? `${resultCount} ${resultCount === 1 ? "result" : "results"}` : "" }),
|
|
12514
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { ref: wrapRef, className: cn("overflow-hidden bg-default", bordered && "rounded-xl border border-default"), children: [
|
|
12515
|
+
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 }),
|
|
12516
|
+
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 }),
|
|
12517
|
+
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 }) }),
|
|
12518
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "border-t border-default px-4 py-3", children: footer })
|
|
11840
12519
|
] })
|
|
11841
12520
|
] });
|
|
11842
12521
|
}
|
|
@@ -11860,7 +12539,7 @@ function TableView({
|
|
|
11860
12539
|
getRowDimmed,
|
|
11861
12540
|
maxHeight
|
|
11862
12541
|
}) {
|
|
11863
|
-
const d =
|
|
12542
|
+
const d = DENSITY3[density];
|
|
11864
12543
|
const columns = table.getVisibleLeafColumns();
|
|
11865
12544
|
const scroll = useScrollEdges();
|
|
11866
12545
|
const headers = useHeaderWidths(HEADER_PADDING_PX[density], columns.map((column) => column.id).join());
|
|
@@ -11874,7 +12553,7 @@ function TableView({
|
|
|
11874
12553
|
const hasSticky = Boolean(stickyStart || stickyEnd);
|
|
11875
12554
|
const titleId = titleColumnId(columns);
|
|
11876
12555
|
const rowAction = getRowHref ? "link" : onRowClick ? "click" : null;
|
|
11877
|
-
const stickyClass = (id, header) => (0,
|
|
12556
|
+
const stickyClass = (id, header) => (0, import_clsx97.default)(
|
|
11878
12557
|
id === stickyStart && [
|
|
11879
12558
|
"sticky left-0 z-raised",
|
|
11880
12559
|
// A hairline where content slides under the pinned column, once it has scrolled.
|
|
@@ -11889,9 +12568,9 @@ function TableView({
|
|
|
11889
12568
|
const scrolls = scroll.overflowing || Boolean(maxHeight) && scroll.overflowingY;
|
|
11890
12569
|
const direction = scroll.overflowing && maxHeight && scroll.overflowingY ? "scrolls" : scroll.overflowing ? "scrolls horizontally" : "scrolls vertically";
|
|
11891
12570
|
const regionLabel = `${label ?? "Table"} (${direction})`;
|
|
11892
|
-
const pinnedHeader = maxHeight ? (0,
|
|
11893
|
-
return /* @__PURE__ */ (0,
|
|
11894
|
-
/* @__PURE__ */ (0,
|
|
12571
|
+
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;
|
|
12572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "relative", children: [
|
|
12573
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11895
12574
|
"div",
|
|
11896
12575
|
{
|
|
11897
12576
|
ref: scroll.ref,
|
|
@@ -11903,18 +12582,18 @@ function TableView({
|
|
|
11903
12582
|
),
|
|
11904
12583
|
style: maxHeight ? { maxHeight } : void 0,
|
|
11905
12584
|
...scrolls ? { role: "region", tabIndex: 0, "aria-label": regionLabel } : {},
|
|
11906
|
-
children: /* @__PURE__ */ (0,
|
|
12585
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
11907
12586
|
"table",
|
|
11908
12587
|
{
|
|
11909
12588
|
className: "w-full table-fixed border-collapse text-left",
|
|
11910
12589
|
style: showPlaceholder ? void 0 : { minWidth },
|
|
11911
12590
|
"aria-busy": loading || void 0,
|
|
11912
12591
|
children: [
|
|
11913
|
-
caption ? /* @__PURE__ */ (0,
|
|
11914
|
-
/* @__PURE__ */ (0,
|
|
12592
|
+
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 }),
|
|
12593
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("colgroup", { children: columns.map((column) => {
|
|
11915
12594
|
const meta = column.columnDef.meta;
|
|
11916
12595
|
const floor = headers.widths[column.id] ?? 0;
|
|
11917
|
-
return /* @__PURE__ */ (0,
|
|
12596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11918
12597
|
"col",
|
|
11919
12598
|
{
|
|
11920
12599
|
style: meta?.grow || !meta?.width ? void 0 : { width: floor > widthToPx(meta.width) ? floor : meta.width }
|
|
@@ -11922,12 +12601,12 @@ function TableView({
|
|
|
11922
12601
|
column.id
|
|
11923
12602
|
);
|
|
11924
12603
|
}) }),
|
|
11925
|
-
/* @__PURE__ */ (0,
|
|
12604
|
+
/* @__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) => {
|
|
11926
12605
|
const meta = header.column.columnDef.meta;
|
|
11927
12606
|
const sortable = header.column.getCanSort();
|
|
11928
12607
|
const sorted = header.column.getIsSorted();
|
|
11929
12608
|
const definition = header.column.columnDef.header;
|
|
11930
|
-
return /* @__PURE__ */ (0,
|
|
12609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11931
12610
|
"th",
|
|
11932
12611
|
{
|
|
11933
12612
|
scope: "col",
|
|
@@ -11942,12 +12621,12 @@ function TableView({
|
|
|
11942
12621
|
pinnedHeader,
|
|
11943
12622
|
meta?.headerClassName
|
|
11944
12623
|
),
|
|
11945
|
-
children: header.isPlaceholder ? null : typeof definition === "string" || definition === void 0 ? /* @__PURE__ */ (0,
|
|
12624
|
+
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())
|
|
11946
12625
|
},
|
|
11947
12626
|
header.id
|
|
11948
12627
|
);
|
|
11949
12628
|
}) }, group.id)) }),
|
|
11950
|
-
/* @__PURE__ */ (0,
|
|
12629
|
+
/* @__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)(
|
|
11951
12630
|
BodyRow,
|
|
11952
12631
|
{
|
|
11953
12632
|
row,
|
|
@@ -11970,8 +12649,8 @@ function TableView({
|
|
|
11970
12649
|
)
|
|
11971
12650
|
}
|
|
11972
12651
|
),
|
|
11973
|
-
scroll.overflowing && !scroll.atStart && !stickyStart && /* @__PURE__ */ (0,
|
|
11974
|
-
scroll.overflowing && !scroll.atEnd && !stickyEnd && /* @__PURE__ */ (0,
|
|
12652
|
+
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" }),
|
|
12653
|
+
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" })
|
|
11975
12654
|
] });
|
|
11976
12655
|
}
|
|
11977
12656
|
function BodyRow({
|
|
@@ -11988,9 +12667,9 @@ function BodyRow({
|
|
|
11988
12667
|
getRowTone,
|
|
11989
12668
|
getRowDimmed
|
|
11990
12669
|
}) {
|
|
11991
|
-
const d =
|
|
12670
|
+
const d = DENSITY3[density];
|
|
11992
12671
|
const href = getRowHref?.(row.original);
|
|
11993
|
-
return /* @__PURE__ */ (0,
|
|
12672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11994
12673
|
TableRow,
|
|
11995
12674
|
{
|
|
11996
12675
|
selected: row.getIsSelected() || void 0,
|
|
@@ -12015,7 +12694,7 @@ function BodyRow({
|
|
|
12015
12694
|
onRowClick(row.original);
|
|
12016
12695
|
}
|
|
12017
12696
|
} : void 0,
|
|
12018
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0,
|
|
12697
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
12019
12698
|
BodyCell,
|
|
12020
12699
|
{
|
|
12021
12700
|
cell,
|
|
@@ -12044,7 +12723,7 @@ function BodyCell({
|
|
|
12044
12723
|
children: content
|
|
12045
12724
|
}, cell.row.original);
|
|
12046
12725
|
}
|
|
12047
|
-
return /* @__PURE__ */ (0,
|
|
12726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
12048
12727
|
"td",
|
|
12049
12728
|
{
|
|
12050
12729
|
className: cn(
|
|
@@ -12055,13 +12734,13 @@ function BodyCell({
|
|
|
12055
12734
|
!meta?.interactive && "overflow-hidden",
|
|
12056
12735
|
meta?.cellClassName
|
|
12057
12736
|
),
|
|
12058
|
-
children: meta?.interactive ? /* @__PURE__ */ (0,
|
|
12737
|
+
children: meta?.interactive ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CellInteractionGuard, { children: content }) : content
|
|
12059
12738
|
}
|
|
12060
12739
|
);
|
|
12061
12740
|
}
|
|
12062
12741
|
function CardScroll({ label, maxHeight, children }) {
|
|
12063
12742
|
const scroll = useScrollEdges();
|
|
12064
|
-
return /* @__PURE__ */ (0,
|
|
12743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
12065
12744
|
"div",
|
|
12066
12745
|
{
|
|
12067
12746
|
ref: scroll.ref,
|
|
@@ -12088,12 +12767,12 @@ function CardList({
|
|
|
12088
12767
|
getRowDimmed,
|
|
12089
12768
|
getRowLabel
|
|
12090
12769
|
}) {
|
|
12091
|
-
if (placeholder) return /* @__PURE__ */ (0,
|
|
12770
|
+
if (placeholder) return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "px-4", children: placeholder });
|
|
12092
12771
|
if (loading) {
|
|
12093
|
-
return /* @__PURE__ */ (0,
|
|
12094
|
-
/* @__PURE__ */ (0,
|
|
12095
|
-
/* @__PURE__ */ (0,
|
|
12096
|
-
/* @__PURE__ */ (0,
|
|
12772
|
+
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: [
|
|
12773
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Skeleton, { className: "w-2/3" }),
|
|
12774
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Skeleton, { className: "w-1/2" }),
|
|
12775
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Skeleton, { className: "w-5/6" })
|
|
12097
12776
|
] }, index)) });
|
|
12098
12777
|
}
|
|
12099
12778
|
const columns = table.getVisibleLeafColumns();
|
|
@@ -12101,7 +12780,7 @@ function CardList({
|
|
|
12101
12780
|
const slots = cardSlots(
|
|
12102
12781
|
columns.filter((column) => column.id !== SELECT_COLUMN_ID).map((column) => ({ id: column.id, mobile: column.columnDef.meta?.mobile, column }))
|
|
12103
12782
|
);
|
|
12104
|
-
const trigger = (0,
|
|
12783
|
+
const trigger = (0, import_clsx97.default)(
|
|
12105
12784
|
"block w-full min-w-0 text-left focus-visible:outline-none",
|
|
12106
12785
|
"after:absolute after:inset-0 after:content-['']",
|
|
12107
12786
|
"focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-brand"
|
|
@@ -12109,7 +12788,7 @@ function CardList({
|
|
|
12109
12788
|
return (
|
|
12110
12789
|
// Card mode un-truncates: on touch there is no hover tooltip, so a clipped value would be
|
|
12111
12790
|
// unreadable. `.truncate` cell renderers wrap here instead.
|
|
12112
|
-
/* @__PURE__ */ (0,
|
|
12791
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
12113
12792
|
"ul",
|
|
12114
12793
|
{
|
|
12115
12794
|
"aria-label": label,
|
|
@@ -12124,7 +12803,7 @@ function CardList({
|
|
|
12124
12803
|
const href = getRowHref?.(row.original);
|
|
12125
12804
|
const titleContent = render(slots.title?.id);
|
|
12126
12805
|
const tone = getRowTone?.(row.original);
|
|
12127
|
-
return /* @__PURE__ */ (0,
|
|
12806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
12128
12807
|
"li",
|
|
12129
12808
|
{
|
|
12130
12809
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
@@ -12139,9 +12818,9 @@ function CardList({
|
|
|
12139
12818
|
"data-[state=selected]:bg-brand-tertiary"
|
|
12140
12819
|
),
|
|
12141
12820
|
children: [
|
|
12142
|
-
/* @__PURE__ */ (0,
|
|
12143
|
-
selectable && /* @__PURE__ */ (0,
|
|
12144
|
-
/* @__PURE__ */ (0,
|
|
12821
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
12822
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "relative z-raised shrink-0 pt-0.5", children: render(SELECT_COLUMN_ID) }),
|
|
12823
|
+
/* @__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)(
|
|
12145
12824
|
"button",
|
|
12146
12825
|
{
|
|
12147
12826
|
type: "button",
|
|
@@ -12153,12 +12832,12 @@ function CardList({
|
|
|
12153
12832
|
) : titleContent }),
|
|
12154
12833
|
slots.status && // A status pill is `nowrap`, so a long label would spill off the card. Let it
|
|
12155
12834
|
// wrap inside the cap instead.
|
|
12156
|
-
/* @__PURE__ */ (0,
|
|
12157
|
-
slots.actions && /* @__PURE__ */ (0,
|
|
12835
|
+
/* @__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) }),
|
|
12836
|
+
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) }) })
|
|
12158
12837
|
] }),
|
|
12159
|
-
slots.fields.length > 0 && /* @__PURE__ */ (0,
|
|
12160
|
-
/* @__PURE__ */ (0,
|
|
12161
|
-
/* @__PURE__ */ (0,
|
|
12838
|
+
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: [
|
|
12839
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dt", { className: "text-body-tiny text-default-secondary", children: columnLabel(column) }),
|
|
12840
|
+
/* @__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) })
|
|
12162
12841
|
] }, id)) })
|
|
12163
12842
|
]
|
|
12164
12843
|
},
|
|
@@ -12174,9 +12853,9 @@ function CardList({
|
|
|
12174
12853
|
var import_react_table2 = require("@tanstack/react-table");
|
|
12175
12854
|
|
|
12176
12855
|
// src/components/feedback/inline-alert.tsx
|
|
12177
|
-
var
|
|
12178
|
-
var
|
|
12179
|
-
var
|
|
12856
|
+
var import_clsx98 = __toESM(require("clsx"), 1);
|
|
12857
|
+
var import_lucide_react37 = require("lucide-react");
|
|
12858
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
12180
12859
|
var toneStyles3 = {
|
|
12181
12860
|
info: "border-brand-tertiary bg-brand-tertiary text-brand",
|
|
12182
12861
|
warning: "border-warning-tertiary bg-warning-tertiary text-warning",
|
|
@@ -12185,36 +12864,36 @@ var toneStyles3 = {
|
|
|
12185
12864
|
neutral: "border-default bg-default text-default-secondary"
|
|
12186
12865
|
};
|
|
12187
12866
|
var toneIcons = {
|
|
12188
|
-
info: /* @__PURE__ */ (0,
|
|
12189
|
-
warning: /* @__PURE__ */ (0,
|
|
12190
|
-
danger: /* @__PURE__ */ (0,
|
|
12191
|
-
positive: /* @__PURE__ */ (0,
|
|
12192
|
-
neutral: /* @__PURE__ */ (0,
|
|
12867
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.InfoIcon, { className: "size-4" }),
|
|
12868
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.TriangleAlertIcon, { className: "size-4" }),
|
|
12869
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.TriangleAlertIcon, { className: "size-4" }),
|
|
12870
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.CircleCheckBigIcon, { className: "size-4" }),
|
|
12871
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.InfoIcon, { className: "size-4 text-icon-default-secondary" })
|
|
12193
12872
|
};
|
|
12194
12873
|
function InlineAlert({ tone, children, icon, role, className }) {
|
|
12195
12874
|
const glyph = icon === void 0 ? toneIcons[tone] : icon;
|
|
12196
|
-
return /* @__PURE__ */ (0,
|
|
12875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
12197
12876
|
"div",
|
|
12198
12877
|
{
|
|
12199
12878
|
"data-tone": tone,
|
|
12200
12879
|
role: role ?? (tone === "danger" ? "alert" : "status"),
|
|
12201
|
-
className: (0,
|
|
12880
|
+
className: (0, import_clsx98.default)(
|
|
12202
12881
|
"flex items-start gap-3 rounded-xl border p-4 text-body-xs",
|
|
12203
12882
|
toneStyles3[tone],
|
|
12204
12883
|
className
|
|
12205
12884
|
),
|
|
12206
12885
|
children: [
|
|
12207
|
-
glyph && /* @__PURE__ */ (0,
|
|
12208
|
-
/* @__PURE__ */ (0,
|
|
12886
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { "aria-hidden": true, className: "mt-px shrink-0", children: glyph }),
|
|
12887
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "min-w-0", children })
|
|
12209
12888
|
]
|
|
12210
12889
|
}
|
|
12211
12890
|
);
|
|
12212
12891
|
}
|
|
12213
12892
|
|
|
12214
12893
|
// src/components/feedback/error-boundary.tsx
|
|
12215
|
-
var
|
|
12216
|
-
var
|
|
12217
|
-
var ErrorBoundary = class extends
|
|
12894
|
+
var import_react79 = require("react");
|
|
12895
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
12896
|
+
var ErrorBoundary = class extends import_react79.Component {
|
|
12218
12897
|
constructor() {
|
|
12219
12898
|
super(...arguments);
|
|
12220
12899
|
this.state = { error: null };
|
|
@@ -12233,7 +12912,7 @@ var ErrorBoundary = class extends import_react76.Component {
|
|
|
12233
12912
|
}
|
|
12234
12913
|
render() {
|
|
12235
12914
|
if (!this.state.error) return this.props.children;
|
|
12236
|
-
return this.props.fallback ?? /* @__PURE__ */ (0,
|
|
12915
|
+
return this.props.fallback ?? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12237
12916
|
"div",
|
|
12238
12917
|
{
|
|
12239
12918
|
role: "status",
|
|
@@ -12246,10 +12925,10 @@ var ErrorBoundary = class extends import_react76.Component {
|
|
|
12246
12925
|
};
|
|
12247
12926
|
|
|
12248
12927
|
// src/components/feedback/banner.tsx
|
|
12249
|
-
var
|
|
12250
|
-
var
|
|
12251
|
-
var
|
|
12252
|
-
var
|
|
12928
|
+
var import_react80 = require("react");
|
|
12929
|
+
var import_clsx99 = __toESM(require("clsx"), 1);
|
|
12930
|
+
var import_lucide_react38 = require("lucide-react");
|
|
12931
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
12253
12932
|
var TONE_STYLES3 = {
|
|
12254
12933
|
info: "border-brand-tertiary bg-brand-tertiary text-default",
|
|
12255
12934
|
positive: "border-positive-tertiary bg-positive-tertiary text-default",
|
|
@@ -12265,13 +12944,13 @@ var TONE_ICON_COLOR = {
|
|
|
12265
12944
|
neutral: "text-icon-default-secondary"
|
|
12266
12945
|
};
|
|
12267
12946
|
var TONE_ICON2 = {
|
|
12268
|
-
info: /* @__PURE__ */ (0,
|
|
12269
|
-
positive: /* @__PURE__ */ (0,
|
|
12270
|
-
warning: /* @__PURE__ */ (0,
|
|
12271
|
-
danger: /* @__PURE__ */ (0,
|
|
12272
|
-
neutral: /* @__PURE__ */ (0,
|
|
12947
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.InfoIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12948
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.CircleCheckBigIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12949
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.TriangleAlertIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12950
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.TriangleAlertIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12951
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.InfoIcon, { "aria-hidden": true, className: "size-5" })
|
|
12273
12952
|
};
|
|
12274
|
-
var Banner = (0,
|
|
12953
|
+
var Banner = (0, import_react80.forwardRef)(function Banner2({
|
|
12275
12954
|
title,
|
|
12276
12955
|
children,
|
|
12277
12956
|
variant = "message",
|
|
@@ -12282,9 +12961,9 @@ var Banner = (0, import_react77.forwardRef)(function Banner2({
|
|
|
12282
12961
|
className,
|
|
12283
12962
|
...rest
|
|
12284
12963
|
}, ref) {
|
|
12285
|
-
const titleId = (0,
|
|
12964
|
+
const titleId = (0, import_react80.useId)();
|
|
12286
12965
|
const glyph = icon === void 0 ? TONE_ICON2[tone] : icon;
|
|
12287
|
-
return /* @__PURE__ */ (0,
|
|
12966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
12288
12967
|
"div",
|
|
12289
12968
|
{
|
|
12290
12969
|
"data-tone": tone,
|
|
@@ -12293,20 +12972,20 @@ var Banner = (0, import_react77.forwardRef)(function Banner2({
|
|
|
12293
12972
|
role: variant === "alert" ? "alert" : "status",
|
|
12294
12973
|
"aria-labelledby": titleId,
|
|
12295
12974
|
"data-slot": "banner",
|
|
12296
|
-
className: (0,
|
|
12975
|
+
className: (0, import_clsx99.default)(
|
|
12297
12976
|
"flex w-full items-start gap-3 rounded-xl border p-4",
|
|
12298
12977
|
TONE_STYLES3[tone],
|
|
12299
12978
|
className
|
|
12300
12979
|
),
|
|
12301
12980
|
...rest,
|
|
12302
12981
|
children: [
|
|
12303
|
-
glyph && /* @__PURE__ */ (0,
|
|
12304
|
-
/* @__PURE__ */ (0,
|
|
12305
|
-
/* @__PURE__ */ (0,
|
|
12306
|
-
children && /* @__PURE__ */ (0,
|
|
12307
|
-
action && /* @__PURE__ */ (0,
|
|
12982
|
+
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 }),
|
|
12983
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
12984
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { id: titleId, className: "text-body-sm font-semibold text-default", children: title }),
|
|
12985
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "mt-1 text-body-xs text-default-secondary", children }),
|
|
12986
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "mt-3 flex items-center gap-2", children: action })
|
|
12308
12987
|
] }),
|
|
12309
|
-
onDismiss && /* @__PURE__ */ (0,
|
|
12988
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
12310
12989
|
IconButton,
|
|
12311
12990
|
{
|
|
12312
12991
|
variant: "subtle",
|
|
@@ -12314,7 +12993,7 @@ var Banner = (0, import_react77.forwardRef)(function Banner2({
|
|
|
12314
12993
|
"aria-label": typeof title === "string" ? `Dismiss: ${title}` : "Dismiss",
|
|
12315
12994
|
onClick: onDismiss,
|
|
12316
12995
|
className: "-mr-1 -mt-1 shrink-0",
|
|
12317
|
-
children: /* @__PURE__ */ (0,
|
|
12996
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.XIcon, { "aria-hidden": true, size: 16 })
|
|
12318
12997
|
}
|
|
12319
12998
|
)
|
|
12320
12999
|
]
|
|
@@ -12323,22 +13002,22 @@ var Banner = (0, import_react77.forwardRef)(function Banner2({
|
|
|
12323
13002
|
});
|
|
12324
13003
|
|
|
12325
13004
|
// src/components/feedback/toast.tsx
|
|
12326
|
-
var
|
|
12327
|
-
var
|
|
12328
|
-
var
|
|
12329
|
-
var
|
|
12330
|
-
var ToastContext = (0,
|
|
13005
|
+
var import_react81 = require("react");
|
|
13006
|
+
var import_clsx100 = __toESM(require("clsx"), 1);
|
|
13007
|
+
var import_lucide_react39 = require("lucide-react");
|
|
13008
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
13009
|
+
var ToastContext = (0, import_react81.createContext)(null);
|
|
12331
13010
|
function useToast() {
|
|
12332
|
-
const context = (0,
|
|
13011
|
+
const context = (0, import_react81.useContext)(ToastContext);
|
|
12333
13012
|
if (!context) throw new Error("useToast() must be used inside <Toaster>");
|
|
12334
13013
|
return context;
|
|
12335
13014
|
}
|
|
12336
13015
|
var TONE_ICON3 = {
|
|
12337
|
-
info: /* @__PURE__ */ (0,
|
|
12338
|
-
positive: /* @__PURE__ */ (0,
|
|
12339
|
-
warning: /* @__PURE__ */ (0,
|
|
12340
|
-
danger: /* @__PURE__ */ (0,
|
|
12341
|
-
neutral: /* @__PURE__ */ (0,
|
|
13016
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.InfoIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13017
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.CircleCheckBigIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13018
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.TriangleAlertIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13019
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.TriangleAlertIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13020
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.InfoIcon, { "aria-hidden": true, className: "size-4" })
|
|
12342
13021
|
};
|
|
12343
13022
|
var TONE_ICON_COLOR2 = {
|
|
12344
13023
|
info: "text-icon-brand",
|
|
@@ -12366,10 +13045,10 @@ function Toaster({
|
|
|
12366
13045
|
offset: offset2 = 16,
|
|
12367
13046
|
mobileOffset
|
|
12368
13047
|
}) {
|
|
12369
|
-
const [toasts, setToasts] = (0,
|
|
12370
|
-
const timers = (0,
|
|
12371
|
-
const counter = (0,
|
|
12372
|
-
const dismiss = (0,
|
|
13048
|
+
const [toasts, setToasts] = (0, import_react81.useState)([]);
|
|
13049
|
+
const timers = (0, import_react81.useRef)(/* @__PURE__ */ new Map());
|
|
13050
|
+
const counter = (0, import_react81.useRef)(0);
|
|
13051
|
+
const dismiss = (0, import_react81.useCallback)((id) => {
|
|
12373
13052
|
const timer = timers.current.get(id);
|
|
12374
13053
|
if (timer) {
|
|
12375
13054
|
clearTimeout(timer);
|
|
@@ -12377,12 +13056,12 @@ function Toaster({
|
|
|
12377
13056
|
}
|
|
12378
13057
|
setToasts((current) => current.filter((entry) => entry.id !== id));
|
|
12379
13058
|
}, []);
|
|
12380
|
-
const dismissAll = (0,
|
|
13059
|
+
const dismissAll = (0, import_react81.useCallback)(() => {
|
|
12381
13060
|
for (const timer of timers.current.values()) clearTimeout(timer);
|
|
12382
13061
|
timers.current.clear();
|
|
12383
13062
|
setToasts([]);
|
|
12384
13063
|
}, []);
|
|
12385
|
-
const toast = (0,
|
|
13064
|
+
const toast = (0, import_react81.useCallback)(
|
|
12386
13065
|
(options) => {
|
|
12387
13066
|
counter.current += 1;
|
|
12388
13067
|
const id = `toast-${counter.current}`;
|
|
@@ -12398,23 +13077,23 @@ function Toaster({
|
|
|
12398
13077
|
},
|
|
12399
13078
|
[duration, max, dismiss]
|
|
12400
13079
|
);
|
|
12401
|
-
(0,
|
|
13080
|
+
(0, import_react81.useEffect)(() => {
|
|
12402
13081
|
const map = timers.current;
|
|
12403
13082
|
return () => {
|
|
12404
13083
|
for (const timer of map.values()) clearTimeout(timer);
|
|
12405
13084
|
map.clear();
|
|
12406
13085
|
};
|
|
12407
13086
|
}, []);
|
|
12408
|
-
const context = (0,
|
|
12409
|
-
return /* @__PURE__ */ (0,
|
|
13087
|
+
const context = (0, import_react81.useMemo)(() => ({ toast, dismiss, dismissAll }), [toast, dismiss, dismissAll]);
|
|
13088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(ToastContext.Provider, { value: context, children: [
|
|
12410
13089
|
children,
|
|
12411
|
-
/* @__PURE__ */ (0,
|
|
13090
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12412
13091
|
"div",
|
|
12413
13092
|
{
|
|
12414
13093
|
"aria-live": "polite",
|
|
12415
13094
|
"aria-atomic": "false",
|
|
12416
13095
|
...{ [TOASTER_ATTRIBUTE]: "" },
|
|
12417
|
-
className: (0,
|
|
13096
|
+
className: (0, import_clsx100.default)(
|
|
12418
13097
|
"pointer-events-none fixed z-toast flex w-[calc(100%-2rem)] max-w-[380px] flex-col gap-2",
|
|
12419
13098
|
POSITION[position]
|
|
12420
13099
|
),
|
|
@@ -12422,29 +13101,29 @@ function Toaster({
|
|
|
12422
13101
|
"--toaster-offset": toLength(offset2),
|
|
12423
13102
|
"--toaster-mobile-offset": toLength(mobileOffset ?? offset2)
|
|
12424
13103
|
},
|
|
12425
|
-
children: toasts.map((entry) => /* @__PURE__ */ (0,
|
|
13104
|
+
children: toasts.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ToastItem, { toast: entry, onDismiss: () => dismiss(entry.id) }, entry.id))
|
|
12426
13105
|
}
|
|
12427
13106
|
) })
|
|
12428
13107
|
] });
|
|
12429
13108
|
}
|
|
12430
13109
|
function ToastItem({ toast, onDismiss }) {
|
|
12431
13110
|
const tone = toast.tone ?? "info";
|
|
12432
|
-
return /* @__PURE__ */ (0,
|
|
13111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
12433
13112
|
"div",
|
|
12434
13113
|
{
|
|
12435
13114
|
role: tone === "danger" ? "alert" : "status",
|
|
12436
|
-
className: (0,
|
|
13115
|
+
className: (0, import_clsx100.default)(
|
|
12437
13116
|
"pointer-events-auto flex w-full items-start gap-3 rounded-xl border border-default",
|
|
12438
13117
|
"bg-default p-4 shadow-400"
|
|
12439
13118
|
),
|
|
12440
13119
|
children: [
|
|
12441
|
-
/* @__PURE__ */ (0,
|
|
12442
|
-
/* @__PURE__ */ (0,
|
|
12443
|
-
/* @__PURE__ */ (0,
|
|
12444
|
-
toast.description && /* @__PURE__ */ (0,
|
|
12445
|
-
toast.action && /* @__PURE__ */ (0,
|
|
13120
|
+
/* @__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] }),
|
|
13121
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
13122
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "text-body-sm font-semibold text-default", children: toast.title }),
|
|
13123
|
+
toast.description && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: toast.description }),
|
|
13124
|
+
toast.action && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "mt-2 flex items-center gap-2", children: toast.action })
|
|
12446
13125
|
] }),
|
|
12447
|
-
/* @__PURE__ */ (0,
|
|
13126
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12448
13127
|
IconButton,
|
|
12449
13128
|
{
|
|
12450
13129
|
variant: "subtle",
|
|
@@ -12452,7 +13131,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
12452
13131
|
"aria-label": typeof toast.title === "string" ? `Dismiss: ${toast.title}` : "Dismiss",
|
|
12453
13132
|
onClick: onDismiss,
|
|
12454
13133
|
className: "-mr-1 -mt-1 shrink-0",
|
|
12455
|
-
children: /* @__PURE__ */ (0,
|
|
13134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.XIcon, { "aria-hidden": true, size: 14 })
|
|
12456
13135
|
}
|
|
12457
13136
|
)
|
|
12458
13137
|
]
|
|
@@ -12461,25 +13140,25 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
12461
13140
|
}
|
|
12462
13141
|
|
|
12463
13142
|
// src/components/forms/password-input.tsx
|
|
12464
|
-
var
|
|
12465
|
-
var
|
|
12466
|
-
var
|
|
12467
|
-
var PasswordInput = (0,
|
|
12468
|
-
const [visible, setVisible] = (0,
|
|
12469
|
-
return /* @__PURE__ */ (0,
|
|
13143
|
+
var import_react82 = require("react");
|
|
13144
|
+
var import_lucide_react40 = require("lucide-react");
|
|
13145
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
13146
|
+
var PasswordInput = (0, import_react82.forwardRef)(function PasswordInput2(props, ref) {
|
|
13147
|
+
const [visible, setVisible] = (0, import_react82.useState)(false);
|
|
13148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12470
13149
|
Input,
|
|
12471
13150
|
{
|
|
12472
13151
|
ref,
|
|
12473
13152
|
...props,
|
|
12474
13153
|
type: visible ? "text" : "password",
|
|
12475
|
-
trailingAction: /* @__PURE__ */ (0,
|
|
13154
|
+
trailingAction: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12476
13155
|
"button",
|
|
12477
13156
|
{
|
|
12478
13157
|
type: "button",
|
|
12479
13158
|
"aria-label": visible ? "Hide password" : "Show password",
|
|
12480
13159
|
onClick: () => setVisible((v) => !v),
|
|
12481
13160
|
className: "flex items-center justify-center rounded transition-colors hover:text-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
12482
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
13161
|
+
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" })
|
|
12483
13162
|
}
|
|
12484
13163
|
)
|
|
12485
13164
|
}
|
|
@@ -12487,31 +13166,31 @@ var PasswordInput = (0, import_react79.forwardRef)(function PasswordInput2(props
|
|
|
12487
13166
|
});
|
|
12488
13167
|
|
|
12489
13168
|
// src/components/ai/ai-chat-bar.tsx
|
|
12490
|
-
var
|
|
12491
|
-
var
|
|
12492
|
-
var
|
|
13169
|
+
var import_clsx101 = __toESM(require("clsx"), 1);
|
|
13170
|
+
var import_lucide_react41 = require("lucide-react");
|
|
13171
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
12493
13172
|
function AIChatBar({
|
|
12494
13173
|
placeholder = "Ask Intelligence about any entity, supplier, or risk\u2026",
|
|
12495
13174
|
className
|
|
12496
13175
|
}) {
|
|
12497
|
-
return /* @__PURE__ */ (0,
|
|
13176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
12498
13177
|
"div",
|
|
12499
13178
|
{
|
|
12500
|
-
className: (0,
|
|
13179
|
+
className: (0, import_clsx101.default)(
|
|
12501
13180
|
"flex h-16 items-center gap-3 rounded-2xl border border-default bg-default px-6 shadow-panel",
|
|
12502
13181
|
className
|
|
12503
13182
|
),
|
|
12504
13183
|
children: [
|
|
12505
|
-
/* @__PURE__ */ (0,
|
|
12506
|
-
/* @__PURE__ */ (0,
|
|
12507
|
-
/* @__PURE__ */ (0,
|
|
13184
|
+
/* @__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" }) }),
|
|
13185
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "flex-1 text-body-sm text-default-tertiary truncate", children: placeholder }),
|
|
13186
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
12508
13187
|
"button",
|
|
12509
13188
|
{
|
|
12510
13189
|
type: "button",
|
|
12511
13190
|
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",
|
|
12512
13191
|
children: [
|
|
12513
13192
|
"Ask",
|
|
12514
|
-
/* @__PURE__ */ (0,
|
|
13193
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react41.ArrowRightIcon, { "aria-hidden": true, className: "size-4" })
|
|
12515
13194
|
]
|
|
12516
13195
|
}
|
|
12517
13196
|
)
|
|
@@ -12521,42 +13200,42 @@ function AIChatBar({
|
|
|
12521
13200
|
}
|
|
12522
13201
|
|
|
12523
13202
|
// src/components/ai/ai-suggestion-chip.tsx
|
|
12524
|
-
var
|
|
12525
|
-
var
|
|
12526
|
-
var
|
|
13203
|
+
var import_clsx102 = __toESM(require("clsx"), 1);
|
|
13204
|
+
var import_lucide_react42 = require("lucide-react");
|
|
13205
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
12527
13206
|
function AISuggestionChip({ prompt, onClick, className }) {
|
|
12528
|
-
return /* @__PURE__ */ (0,
|
|
13207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
12529
13208
|
"button",
|
|
12530
13209
|
{
|
|
12531
13210
|
type: "button",
|
|
12532
13211
|
onClick,
|
|
12533
|
-
className: (0,
|
|
13212
|
+
className: (0, import_clsx102.default)(
|
|
12534
13213
|
"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",
|
|
12535
13214
|
className
|
|
12536
13215
|
),
|
|
12537
13216
|
children: [
|
|
12538
|
-
/* @__PURE__ */ (0,
|
|
12539
|
-
/* @__PURE__ */ (0,
|
|
12540
|
-
/* @__PURE__ */ (0,
|
|
13217
|
+
/* @__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" }) }),
|
|
13218
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "flex-1 text-body-sm text-default truncate", children: prompt }),
|
|
13219
|
+
/* @__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 }) })
|
|
12541
13220
|
]
|
|
12542
13221
|
}
|
|
12543
13222
|
);
|
|
12544
13223
|
}
|
|
12545
13224
|
|
|
12546
13225
|
// src/components/ai/quick-actions-bar.tsx
|
|
12547
|
-
var
|
|
12548
|
-
var
|
|
13226
|
+
var import_clsx103 = __toESM(require("clsx"), 1);
|
|
13227
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
12549
13228
|
function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
12550
|
-
return /* @__PURE__ */ (0,
|
|
13229
|
+
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) => {
|
|
12551
13230
|
const isActive = active === action.value;
|
|
12552
|
-
return /* @__PURE__ */ (0,
|
|
13231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
12553
13232
|
"button",
|
|
12554
13233
|
{
|
|
12555
13234
|
type: "button",
|
|
12556
13235
|
"aria-pressed": isActive,
|
|
12557
13236
|
onClick: () => onSelect?.(action.value),
|
|
12558
13237
|
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",
|
|
12559
|
-
children: /* @__PURE__ */ (0,
|
|
13238
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(TagPill, { label: action.label, tone: isActive ? "brand" : "default" })
|
|
12560
13239
|
},
|
|
12561
13240
|
action.value
|
|
12562
13241
|
);
|
|
@@ -12564,25 +13243,25 @@ function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
|
12564
13243
|
}
|
|
12565
13244
|
|
|
12566
13245
|
// src/components/ai/chat.tsx
|
|
12567
|
-
var
|
|
12568
|
-
var
|
|
12569
|
-
var
|
|
13246
|
+
var import_clsx104 = __toESM(require("clsx"), 1);
|
|
13247
|
+
var import_lucide_react43 = require("lucide-react");
|
|
13248
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
12570
13249
|
function AiAvatar({ className, icon }) {
|
|
12571
|
-
return /* @__PURE__ */ (0,
|
|
13250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12572
13251
|
"span",
|
|
12573
13252
|
{
|
|
12574
13253
|
"aria-hidden": true,
|
|
12575
13254
|
className: cn("flex size-8 shrink-0 items-center justify-center rounded-full bg-brand text-icon-brand-on-brand", className),
|
|
12576
|
-
children: icon ?? /* @__PURE__ */ (0,
|
|
13255
|
+
children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react43.CpuIcon, { className: "size-3.5" })
|
|
12577
13256
|
}
|
|
12578
13257
|
);
|
|
12579
13258
|
}
|
|
12580
13259
|
function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
12581
|
-
return /* @__PURE__ */ (0,
|
|
12582
|
-
/* @__PURE__ */ (0,
|
|
12583
|
-
/* @__PURE__ */ (0,
|
|
12584
|
-
/* @__PURE__ */ (0,
|
|
12585
|
-
/* @__PURE__ */ (0,
|
|
13260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { role: "status", "aria-live": "polite", className: cn("flex items-center gap-3", className), children: [
|
|
13261
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AiAvatar, {}),
|
|
13262
|
+
/* @__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: [
|
|
13263
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "text-body-xs text-default-secondary", children: label }),
|
|
13264
|
+
/* @__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)(
|
|
12586
13265
|
"span",
|
|
12587
13266
|
{
|
|
12588
13267
|
className: "inline-block size-1.5 rounded-full bg-default-tertiary motion-safe:animate-bounce",
|
|
@@ -12595,16 +13274,16 @@ function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
|
12595
13274
|
}
|
|
12596
13275
|
function ChatBubble({ sender, children, failed = false, className }) {
|
|
12597
13276
|
if (sender === "user") {
|
|
12598
|
-
return /* @__PURE__ */ (0,
|
|
13277
|
+
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 }) });
|
|
12599
13278
|
}
|
|
12600
|
-
return /* @__PURE__ */ (0,
|
|
13279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12601
13280
|
"div",
|
|
12602
13281
|
{
|
|
12603
13282
|
"data-sender": "assistant",
|
|
12604
13283
|
"data-state": failed ? "failed" : void 0,
|
|
12605
13284
|
className: cn(
|
|
12606
13285
|
"rounded-2xl rounded-tl-sm border px-5 py-4 text-body-sm leading-relaxed",
|
|
12607
|
-
(0,
|
|
13286
|
+
(0, import_clsx104.default)(
|
|
12608
13287
|
"border-default bg-default-secondary text-default",
|
|
12609
13288
|
"data-[state=failed]:border-danger-secondary data-[state=failed]:bg-danger-tertiary data-[state=failed]:text-danger"
|
|
12610
13289
|
),
|
|
@@ -12616,17 +13295,17 @@ function ChatBubble({ sender, children, failed = false, className }) {
|
|
|
12616
13295
|
}
|
|
12617
13296
|
|
|
12618
13297
|
// src/components/decorative/aurora-backdrop.tsx
|
|
12619
|
-
var
|
|
13298
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
12620
13299
|
function blob(primitive, alpha) {
|
|
12621
13300
|
return `radial-gradient(ellipse, color-mix(in srgb, var(${primitive}) ${alpha}%, transparent) 0%, transparent 70%)`;
|
|
12622
13301
|
}
|
|
12623
13302
|
function AuroraBackdrop() {
|
|
12624
|
-
return /* @__PURE__ */ (0,
|
|
12625
|
-
/* @__PURE__ */ (0,
|
|
12626
|
-
/* @__PURE__ */ (0,
|
|
12627
|
-
/* @__PURE__ */ (0,
|
|
12628
|
-
/* @__PURE__ */ (0,
|
|
12629
|
-
/* @__PURE__ */ (0,
|
|
13303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": true, children: [
|
|
13304
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute -left-24 -top-28", style: { width: 380, height: 380, background: blob("--prim-red-400", 45) } }),
|
|
13305
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute -top-24 right-[-4%]", style: { width: 320, height: 320, background: blob("--prim-red-300", 40) } }),
|
|
13306
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute bottom-[-10%] right-[14%]", style: { width: 420, height: 420, background: blob("--prim-violet-400", 30) } }),
|
|
13307
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute bottom-[-6%] left-[4%]", style: { width: 280, height: 280, background: blob("--prim-blue-400", 25) } }),
|
|
13308
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "absolute left-[20%] top-[30%]", style: { width: 240, height: 240, background: blob("--prim-blue-300", 18) } })
|
|
12630
13309
|
] });
|
|
12631
13310
|
}
|
|
12632
13311
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -12814,7 +13493,9 @@ function AuroraBackdrop() {
|
|
|
12814
13493
|
MultiSelectCard,
|
|
12815
13494
|
NativeSelect,
|
|
12816
13495
|
NativeSelectControl,
|
|
13496
|
+
NavGroupHeader,
|
|
12817
13497
|
NavItem,
|
|
13498
|
+
NavSubItem,
|
|
12818
13499
|
NavigationMenu,
|
|
12819
13500
|
NavigationMenuItem,
|
|
12820
13501
|
NoteConfirmModal,
|
|
@@ -12858,6 +13539,11 @@ function AuroraBackdrop() {
|
|
|
12858
13539
|
Select,
|
|
12859
13540
|
SelectControl,
|
|
12860
13541
|
Separator,
|
|
13542
|
+
Sidebar,
|
|
13543
|
+
SidebarProvider,
|
|
13544
|
+
SidebarSeparator,
|
|
13545
|
+
SidebarTrigger,
|
|
13546
|
+
SidebarUserCard,
|
|
12861
13547
|
Skeleton,
|
|
12862
13548
|
Slider,
|
|
12863
13549
|
Slot,
|
|
@@ -12934,6 +13620,8 @@ function AuroraBackdrop() {
|
|
|
12934
13620
|
createColumnHelper,
|
|
12935
13621
|
createSelectColumn,
|
|
12936
13622
|
currentZoneName,
|
|
13623
|
+
filterNav,
|
|
13624
|
+
filterNavItems,
|
|
12937
13625
|
formatFileSize,
|
|
12938
13626
|
getScoreTone,
|
|
12939
13627
|
nextTier,
|
|
@@ -12953,6 +13641,7 @@ function AuroraBackdrop() {
|
|
|
12953
13641
|
useFilePicker,
|
|
12954
13642
|
useOverlayDismiss,
|
|
12955
13643
|
usePortalContainer,
|
|
13644
|
+
useSidebar,
|
|
12956
13645
|
useToast,
|
|
12957
13646
|
useWidgetHeaderAccessory,
|
|
12958
13647
|
useWidthTier
|