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