@platned/ui 0.9.2 → 0.9.4
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 +2788 -0
- package/dist/chunk-OGQIGGVB.js.map +1 -0
- package/dist/data-table-gr08E5aX.d.ts +458 -0
- package/dist/data-table.cjs +3463 -0
- package/dist/data-table.cjs.map +1 -0
- package/dist/data-table.d.ts +3 -0
- package/dist/data-table.js +832 -0
- package/dist/data-table.js.map +1 -0
- package/dist/index.cjs +197 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +20 -465
- package/dist/index.js +1995 -5291
- package/dist/index.js.map +1 -1
- package/dist/sidebar.cjs +1 -4
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.js +1 -4
- package/dist/sidebar.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +6 -1
- package/tailwind-preset.cjs +18 -6
- package/dist/index.d.cts +0 -5422
package/dist/index.cjs
CHANGED
|
@@ -482,7 +482,7 @@ var Spinner = (0, import_react2.forwardRef)(function Spinner2({ size: size2 = "s
|
|
|
482
482
|
"aria-label": label,
|
|
483
483
|
"aria-hidden": label ? void 0 : true,
|
|
484
484
|
className: (0, import_clsx3.default)(
|
|
485
|
-
"inline-block shrink-0 animate-spin
|
|
485
|
+
"inline-block shrink-0 rounded-full motion-safe:animate-spin motion-reduce:animate-pulse",
|
|
486
486
|
"border-current border-t-transparent",
|
|
487
487
|
SIZE[size2],
|
|
488
488
|
className
|
|
@@ -3247,7 +3247,7 @@ var Switch = (0, import_react23.forwardRef)(function Switch2({
|
|
|
3247
3247
|
"span",
|
|
3248
3248
|
{
|
|
3249
3249
|
className: (0, import_clsx20.default)(
|
|
3250
|
-
"absolute left-0.5 top-0.5 rounded-full bg-default shadow-100 transition-transform",
|
|
3250
|
+
"absolute left-0.5 top-0.5 rounded-full bg-default shadow-100 transition-transform motion-reduce:transition-none",
|
|
3251
3251
|
s.knob,
|
|
3252
3252
|
checked ? s.translate : "translate-x-0"
|
|
3253
3253
|
)
|
|
@@ -4307,7 +4307,7 @@ function Combobox({
|
|
|
4307
4307
|
{
|
|
4308
4308
|
"aria-hidden": true,
|
|
4309
4309
|
className: (0, import_clsx29.default)(
|
|
4310
|
-
"shrink-0 transition-transform",
|
|
4310
|
+
"shrink-0 transition-transform motion-reduce:transition-none",
|
|
4311
4311
|
size2 === "sm" ? "size-3" : "size-4",
|
|
4312
4312
|
disabled ? "text-icon-disabled" : "text-icon-default-secondary",
|
|
4313
4313
|
open && "rotate-180"
|
|
@@ -5335,7 +5335,7 @@ var RadioCardsItem = (0, import_react34.forwardRef)(function RadioCardsItem2({ v
|
|
|
5335
5335
|
"[label:has(:checked)_&]:border-brand",
|
|
5336
5336
|
s.mark
|
|
5337
5337
|
),
|
|
5338
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "size-2 scale-0 rounded-full bg-brand transition-transform [label:has(:checked)_&]:scale-100" })
|
|
5338
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "size-2 scale-0 rounded-full bg-brand transition-transform motion-reduce:transition-none [label:has(:checked)_&]:scale-100" })
|
|
5339
5339
|
}
|
|
5340
5340
|
)
|
|
5341
5341
|
] }),
|
|
@@ -7090,11 +7090,20 @@ function FullscreenSurface({
|
|
|
7090
7090
|
className
|
|
7091
7091
|
}) {
|
|
7092
7092
|
const [node, setNode] = (0, import_react50.useState)(null);
|
|
7093
|
+
const [returnFocusTo] = (0, import_react50.useState)(
|
|
7094
|
+
() => typeof document === "undefined" ? null : document.activeElement
|
|
7095
|
+
);
|
|
7093
7096
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_radix_ui9.Dialog.Root, { open: true, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_radix_ui9.Dialog.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
7094
7097
|
import_radix_ui9.Dialog.Content,
|
|
7095
7098
|
{
|
|
7096
7099
|
ref: setNode,
|
|
7097
7100
|
"aria-describedby": void 0,
|
|
7101
|
+
onCloseAutoFocus: (event) => {
|
|
7102
|
+
if (returnFocusTo?.isConnected && returnFocusTo !== document.body) {
|
|
7103
|
+
event.preventDefault();
|
|
7104
|
+
returnFocusTo.focus();
|
|
7105
|
+
}
|
|
7106
|
+
},
|
|
7098
7107
|
onEscapeKeyDown: (event) => void deferEscapeToInnerPopup(event),
|
|
7099
7108
|
className: cn(
|
|
7100
7109
|
"fixed inset-0 overflow-auto bg-default-secondary p-4 focus:outline-none lg:p-6",
|
|
@@ -7367,7 +7376,7 @@ var AccordionTrigger = (0, import_react53.forwardRef)(
|
|
|
7367
7376
|
{
|
|
7368
7377
|
"aria-hidden": true,
|
|
7369
7378
|
className: (0, import_clsx48.default)(
|
|
7370
|
-
"size-4 shrink-0 text-icon-default-secondary transition-transform",
|
|
7379
|
+
"size-4 shrink-0 text-icon-default-secondary transition-transform motion-reduce:transition-none",
|
|
7371
7380
|
"group-data-[state=open]:rotate-180"
|
|
7372
7381
|
)
|
|
7373
7382
|
}
|
|
@@ -8229,6 +8238,7 @@ function FilterBar({ children, trailing, size: size2 = "md", className }) {
|
|
|
8229
8238
|
// src/components/chrome/tabs.tsx
|
|
8230
8239
|
var import_react59 = require("react");
|
|
8231
8240
|
var import_clsx55 = __toESM(require("clsx"), 1);
|
|
8241
|
+
var import_lucide_react24 = require("lucide-react");
|
|
8232
8242
|
var import_radix_ui14 = require("radix-ui");
|
|
8233
8243
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8234
8244
|
var SIZE8 = {
|
|
@@ -8247,7 +8257,7 @@ var TAB_VARIANT = {
|
|
|
8247
8257
|
"aria-selected:bg-brand aria-selected:text-brand-on-brand aria-selected:hover:bg-brand"
|
|
8248
8258
|
),
|
|
8249
8259
|
underline: (0, import_clsx55.default)(
|
|
8250
|
-
"leading-snug font-normal text-default-secondary hover:text-default",
|
|
8260
|
+
"snap-start leading-snug font-normal text-default-secondary hover:text-default",
|
|
8251
8261
|
"border-b-2 border-transparent",
|
|
8252
8262
|
"aria-selected:border-brand-emphasis aria-selected:font-semibold aria-selected:text-brand-emphasis"
|
|
8253
8263
|
)
|
|
@@ -8259,14 +8269,22 @@ var tabClasses = (variant, size2) => (0, import_clsx55.default)(
|
|
|
8259
8269
|
SIZE8[variant][size2].tab,
|
|
8260
8270
|
TAB_VARIANT[variant]
|
|
8261
8271
|
);
|
|
8272
|
+
var scrollsHorizontally = (variant, orientation) => variant === "underline" && orientation === "horizontal";
|
|
8262
8273
|
var stripClasses = (variant, size2, orientation) => (0, import_clsx55.default)(
|
|
8263
|
-
"flex
|
|
8274
|
+
"flex",
|
|
8264
8275
|
// The strip's own children are the tab stops, so it needs no tab stop of its own.
|
|
8265
|
-
orientation === "vertical" ? "flex-col" :
|
|
8276
|
+
orientation === "vertical" ? "shrink-0 flex-col" : variant === "pill" ? (
|
|
8277
|
+
// Pills are a handful of filter-style choices: wrap, so every one stays visible.
|
|
8278
|
+
"shrink-0 flex-wrap"
|
|
8279
|
+
) : (
|
|
8280
|
+
// Underline tabs are page sections: scroll, snapping to whole tabs. The edge buttons are
|
|
8281
|
+
// the affordance, so the (often overlay) native scrollbar is hidden rather than doubled.
|
|
8282
|
+
"min-w-0 flex-1 snap-x snap-mandatory overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
8283
|
+
),
|
|
8266
8284
|
SIZE8[variant][size2].strip,
|
|
8267
8285
|
variant === "underline" && (orientation === "vertical" ? "border-r border-default" : "border-b border-default")
|
|
8268
8286
|
);
|
|
8269
|
-
function TabCount({ count, variant }) {
|
|
8287
|
+
function TabCount({ count, variant, locale }) {
|
|
8270
8288
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8271
8289
|
"span",
|
|
8272
8290
|
{
|
|
@@ -8274,7 +8292,75 @@ function TabCount({ count, variant }) {
|
|
|
8274
8292
|
"rounded-md bg-default-secondary px-1.5 py-px text-body-tiny font-medium leading-snug text-default-secondary",
|
|
8275
8293
|
variant === "pill" && "group-aria-selected:bg-brand-hover group-aria-selected:text-brand-on-brand"
|
|
8276
8294
|
),
|
|
8277
|
-
children: count
|
|
8295
|
+
children: typeof count === "number" ? count.toLocaleString(locale) : count
|
|
8296
|
+
}
|
|
8297
|
+
);
|
|
8298
|
+
}
|
|
8299
|
+
var EDGE_PAD = 32;
|
|
8300
|
+
var prefersReducedMotion = () => typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
|
|
8301
|
+
function useTabStrip(enabled) {
|
|
8302
|
+
const listRef = (0, import_react59.useRef)(null);
|
|
8303
|
+
const selected = (0, import_react59.useRef)(null);
|
|
8304
|
+
const [edges, setEdges] = (0, import_react59.useState)({ start: false, end: false });
|
|
8305
|
+
const measure = (0, import_react59.useCallback)(() => {
|
|
8306
|
+
const el = listRef.current;
|
|
8307
|
+
if (!enabled || !el) return;
|
|
8308
|
+
const start = el.scrollLeft > 1;
|
|
8309
|
+
const end = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;
|
|
8310
|
+
setEdges((prev) => prev.start === start && prev.end === end ? prev : { start, end });
|
|
8311
|
+
}, [enabled]);
|
|
8312
|
+
(0, import_react59.useLayoutEffect)(() => {
|
|
8313
|
+
const el = listRef.current;
|
|
8314
|
+
if (!enabled || !el || typeof ResizeObserver === "undefined") return;
|
|
8315
|
+
const observer = new ResizeObserver(measure);
|
|
8316
|
+
observer.observe(el);
|
|
8317
|
+
return () => observer.disconnect();
|
|
8318
|
+
}, [enabled, measure]);
|
|
8319
|
+
(0, import_react59.useLayoutEffect)(() => {
|
|
8320
|
+
const list = listRef.current;
|
|
8321
|
+
if (!enabled || !list) return;
|
|
8322
|
+
measure();
|
|
8323
|
+
const tab = list.querySelector('[role="tab"][aria-selected="true"]');
|
|
8324
|
+
if (!tab || tab === selected.current) return;
|
|
8325
|
+
selected.current = tab;
|
|
8326
|
+
if (typeof list.scrollTo !== "function") return;
|
|
8327
|
+
const left = tab.offsetLeft - list.offsetLeft;
|
|
8328
|
+
const right = left + tab.offsetWidth;
|
|
8329
|
+
if (left < list.scrollLeft + EDGE_PAD) list.scrollTo({ left: Math.max(0, left - EDGE_PAD) });
|
|
8330
|
+
else if (right > list.scrollLeft + list.clientWidth - EDGE_PAD) {
|
|
8331
|
+
list.scrollTo({ left: right - list.clientWidth + EDGE_PAD });
|
|
8332
|
+
}
|
|
8333
|
+
});
|
|
8334
|
+
const page = (0, import_react59.useCallback)((direction) => {
|
|
8335
|
+
const el = listRef.current;
|
|
8336
|
+
if (!el || typeof el.scrollBy !== "function") return;
|
|
8337
|
+
el.scrollBy({ left: direction * el.clientWidth * 0.8, behavior: prefersReducedMotion() ? "auto" : "smooth" });
|
|
8338
|
+
}, []);
|
|
8339
|
+
return { listRef, edges, measure, page };
|
|
8340
|
+
}
|
|
8341
|
+
function TabStripFrame({ strip, children }) {
|
|
8342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "relative flex min-w-0 max-w-full", children: [
|
|
8343
|
+
children,
|
|
8344
|
+
strip.edges.start && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabStripEdge, { side: "start", onClick: () => strip.page(-1) }),
|
|
8345
|
+
strip.edges.end && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabStripEdge, { side: "end", onClick: () => strip.page(1) })
|
|
8346
|
+
] });
|
|
8347
|
+
}
|
|
8348
|
+
function TabStripEdge({ side, onClick }) {
|
|
8349
|
+
const Icon = side === "start" ? import_lucide_react24.ChevronLeftIcon : import_lucide_react24.ChevronRightIcon;
|
|
8350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8351
|
+
"button",
|
|
8352
|
+
{
|
|
8353
|
+
type: "button",
|
|
8354
|
+
"aria-hidden": true,
|
|
8355
|
+
tabIndex: -1,
|
|
8356
|
+
onClick,
|
|
8357
|
+
"data-edge": side,
|
|
8358
|
+
className: (0, import_clsx55.default)(
|
|
8359
|
+
// `bottom-px` keeps the strip's baseline visible under the fade.
|
|
8360
|
+
"absolute bottom-px top-0 z-raised flex w-8 items-center text-icon-default-secondary hover:text-icon-default",
|
|
8361
|
+
side === "start" ? "left-0 justify-start bg-gradient-to-r from-default via-default to-transparent" : "right-0 justify-end bg-gradient-to-l from-default via-default to-transparent"
|
|
8362
|
+
),
|
|
8363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Icon, { className: "size-4" })
|
|
8278
8364
|
}
|
|
8279
8365
|
);
|
|
8280
8366
|
}
|
|
@@ -8295,8 +8381,11 @@ function ItemsTabs({
|
|
|
8295
8381
|
activation = "automatic",
|
|
8296
8382
|
idPrefix,
|
|
8297
8383
|
label,
|
|
8384
|
+
locale,
|
|
8298
8385
|
className
|
|
8299
8386
|
}) {
|
|
8387
|
+
const scrolls = scrollsHorizontally(variant, orientation);
|
|
8388
|
+
const strip = useTabStrip(scrolls);
|
|
8300
8389
|
const generatedPrefix = (0, import_react59.useId)();
|
|
8301
8390
|
const prefix = idPrefix ?? generatedPrefix;
|
|
8302
8391
|
const [value, setValue] = useControllableState({
|
|
@@ -8313,14 +8402,20 @@ function ItemsTabs({
|
|
|
8313
8402
|
loop: true,
|
|
8314
8403
|
defaultIndex: selectedIndex
|
|
8315
8404
|
});
|
|
8316
|
-
|
|
8405
|
+
const list = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8317
8406
|
"div",
|
|
8318
8407
|
{
|
|
8408
|
+
ref: strip.listRef,
|
|
8319
8409
|
role: "tablist",
|
|
8320
8410
|
"aria-label": label,
|
|
8321
8411
|
"aria-orientation": orientation,
|
|
8322
8412
|
"data-variant": variant,
|
|
8323
|
-
|
|
8413
|
+
onScroll: scrolls ? strip.measure : void 0,
|
|
8414
|
+
className: cn(
|
|
8415
|
+
stripClasses(variant, size2, orientation),
|
|
8416
|
+
scrolls && (strip.edges.start || strip.edges.end) && "scroll-px-8",
|
|
8417
|
+
className
|
|
8418
|
+
),
|
|
8324
8419
|
...roving.containerProps,
|
|
8325
8420
|
children: items.map((tab, index) => {
|
|
8326
8421
|
const active = tab.key === value;
|
|
@@ -8351,7 +8446,7 @@ function ItemsTabs({
|
|
|
8351
8446
|
className: tabClasses(variant, size2),
|
|
8352
8447
|
children: [
|
|
8353
8448
|
tab.label,
|
|
8354
|
-
tab.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabCount, { count: tab.count, variant })
|
|
8449
|
+
tab.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabCount, { count: tab.count, variant, locale })
|
|
8355
8450
|
]
|
|
8356
8451
|
},
|
|
8357
8452
|
tab.key
|
|
@@ -8359,6 +8454,7 @@ function ItemsTabs({
|
|
|
8359
8454
|
})
|
|
8360
8455
|
}
|
|
8361
8456
|
);
|
|
8457
|
+
return scrolls ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabStripFrame, { strip, children: list }) : list;
|
|
8362
8458
|
}
|
|
8363
8459
|
var PANEL_CLASSES = (0, import_clsx55.default)(FOCUS_RING, "rounded-sm");
|
|
8364
8460
|
function TabsPanel({
|
|
@@ -8401,6 +8497,7 @@ function TabsRoot({
|
|
|
8401
8497
|
orientation = "horizontal",
|
|
8402
8498
|
activation = "automatic",
|
|
8403
8499
|
dir,
|
|
8500
|
+
locale,
|
|
8404
8501
|
className
|
|
8405
8502
|
}) {
|
|
8406
8503
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
@@ -8413,23 +8510,34 @@ function TabsRoot({
|
|
|
8413
8510
|
activationMode: activation,
|
|
8414
8511
|
dir,
|
|
8415
8512
|
className: cn(orientation === "vertical" ? "flex gap-6" : "flex flex-col gap-4", className),
|
|
8416
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabsStyle.Provider, { value: { variant, size: size2, orientation }, children })
|
|
8513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabsStyle.Provider, { value: { variant, size: size2, orientation, locale }, children })
|
|
8417
8514
|
}
|
|
8418
8515
|
);
|
|
8419
8516
|
}
|
|
8420
|
-
var TabsList = (0, import_react59.forwardRef)(function TabsList2({ label, className, ...rest }, ref) {
|
|
8517
|
+
var TabsList = (0, import_react59.forwardRef)(function TabsList2({ label, className, onScroll, ...rest }, ref) {
|
|
8421
8518
|
const style = (0, import_react59.useContext)(TabsStyle);
|
|
8422
|
-
|
|
8519
|
+
const scrolls = scrollsHorizontally(style.variant, style.orientation);
|
|
8520
|
+
const strip = useTabStrip(scrolls);
|
|
8521
|
+
const list = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8423
8522
|
import_radix_ui14.Tabs.List,
|
|
8424
8523
|
{
|
|
8425
|
-
ref,
|
|
8524
|
+
ref: composeRefs(ref, strip.listRef),
|
|
8426
8525
|
"aria-label": label,
|
|
8427
8526
|
loop: true,
|
|
8428
8527
|
"data-variant": style.variant,
|
|
8429
|
-
|
|
8528
|
+
onScroll: (event) => {
|
|
8529
|
+
onScroll?.(event);
|
|
8530
|
+
if (scrolls) strip.measure();
|
|
8531
|
+
},
|
|
8532
|
+
className: cn(
|
|
8533
|
+
stripClasses(style.variant, style.size, style.orientation),
|
|
8534
|
+
scrolls && (strip.edges.start || strip.edges.end) && "scroll-px-8",
|
|
8535
|
+
className
|
|
8536
|
+
),
|
|
8430
8537
|
...rest
|
|
8431
8538
|
}
|
|
8432
8539
|
);
|
|
8540
|
+
return scrolls ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabStripFrame, { strip, children: list }) : list;
|
|
8433
8541
|
});
|
|
8434
8542
|
var TabsTrigger = (0, import_react59.forwardRef)(function TabsTrigger2({ value, disabled, count, className, children, ...rest }, ref) {
|
|
8435
8543
|
const style = (0, import_react59.useContext)(TabsStyle);
|
|
@@ -8443,7 +8551,7 @@ var TabsTrigger = (0, import_react59.forwardRef)(function TabsTrigger2({ value,
|
|
|
8443
8551
|
...rest,
|
|
8444
8552
|
children: [
|
|
8445
8553
|
children,
|
|
8446
|
-
count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabCount, { count, variant: style.variant })
|
|
8554
|
+
count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TabCount, { count, variant: style.variant, locale: style.locale })
|
|
8447
8555
|
]
|
|
8448
8556
|
}
|
|
8449
8557
|
);
|
|
@@ -8667,7 +8775,7 @@ var Kbd = (0, import_react61.forwardRef)(function Kbd2({ children, size: size2 =
|
|
|
8667
8775
|
// src/components/chrome/breadcrumb.tsx
|
|
8668
8776
|
var import_react62 = require("react");
|
|
8669
8777
|
var import_clsx60 = __toESM(require("clsx"), 1);
|
|
8670
|
-
var
|
|
8778
|
+
var import_lucide_react25 = require("lucide-react");
|
|
8671
8779
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8672
8780
|
var Breadcrumb = (0, import_react62.forwardRef)(function Breadcrumb2({ children, items, renderLink, maxItems, label = "Breadcrumb", className, ...rest }, ref) {
|
|
8673
8781
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("nav", { ref, "aria-label": label, "data-slot": "breadcrumb", ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("ol", { className: (0, import_clsx60.default)("flex flex-wrap items-center gap-1.5 p-0 text-body-xs", className), children: items ? renderItems(items, renderLink, maxItems) : children }) });
|
|
@@ -8689,7 +8797,7 @@ function renderItems(items, renderLink, maxItems) {
|
|
|
8689
8797
|
var BreadcrumbItem = (0, import_react62.forwardRef)(
|
|
8690
8798
|
function BreadcrumbItem2({ children, current = false, asChild = false, first = false, className, ...rest }, ref) {
|
|
8691
8799
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("li", { className: "flex items-center gap-1.5", children: [
|
|
8692
|
-
!first && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8800
|
+
!first && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react25.ChevronRightIcon, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
8693
8801
|
current ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { "aria-current": "page", className: (0, import_clsx60.default)("font-medium text-default", className), children }) : asChild ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8694
8802
|
Slot,
|
|
8695
8803
|
{
|
|
@@ -8720,7 +8828,7 @@ var BreadcrumbItem = (0, import_react62.forwardRef)(
|
|
|
8720
8828
|
var BreadcrumbEllipsis = (0, import_react62.forwardRef)(
|
|
8721
8829
|
function BreadcrumbEllipsis2({ className, ...rest }, ref) {
|
|
8722
8830
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("li", { className: "flex items-center gap-1.5", children: [
|
|
8723
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8831
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_lucide_react25.ChevronRightIcon, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
8724
8832
|
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8725
8833
|
"span",
|
|
8726
8834
|
{
|
|
@@ -8738,7 +8846,7 @@ var BreadcrumbEllipsis = (0, import_react62.forwardRef)(
|
|
|
8738
8846
|
// src/components/chrome/pagination.tsx
|
|
8739
8847
|
var import_react63 = require("react");
|
|
8740
8848
|
var import_clsx61 = __toESM(require("clsx"), 1);
|
|
8741
|
-
var
|
|
8849
|
+
var import_lucide_react26 = require("lucide-react");
|
|
8742
8850
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8743
8851
|
var GAP4 = "\u2026";
|
|
8744
8852
|
function paginationRange(page, pageCount, siblingCount = 1) {
|
|
@@ -8804,7 +8912,7 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8804
8912
|
disabled: page <= 1,
|
|
8805
8913
|
onClick: () => go(page - 1),
|
|
8806
8914
|
className: ARROW_BASE,
|
|
8807
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8915
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react26.ChevronLeftIcon, { "aria-hidden": true, className: "size-4" })
|
|
8808
8916
|
}
|
|
8809
8917
|
),
|
|
8810
8918
|
type === "dots" ? (
|
|
@@ -8867,7 +8975,7 @@ var Pagination = (0, import_react63.forwardRef)(function Pagination2({
|
|
|
8867
8975
|
disabled: page >= pageCount,
|
|
8868
8976
|
onClick: () => go(page + 1),
|
|
8869
8977
|
className: ARROW_BASE,
|
|
8870
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react26.ChevronRightIcon, { "aria-hidden": true, className: "size-4" })
|
|
8871
8979
|
}
|
|
8872
8980
|
)
|
|
8873
8981
|
]
|
|
@@ -9567,7 +9675,7 @@ function BarChart({
|
|
|
9567
9675
|
"div",
|
|
9568
9676
|
{
|
|
9569
9677
|
title: `${category} \xB7 ${bar.key}: ${bar.value}`,
|
|
9570
|
-
className: "transition-all",
|
|
9678
|
+
className: "transition-all motion-reduce:transition-none",
|
|
9571
9679
|
style: {
|
|
9572
9680
|
backgroundColor: bar.color,
|
|
9573
9681
|
borderRadius: radius,
|
|
@@ -9733,7 +9841,7 @@ function RadialGauge({
|
|
|
9733
9841
|
strokeWidth: ring,
|
|
9734
9842
|
strokeDasharray: `${arc * fraction} ${circumference - arc * fraction}`,
|
|
9735
9843
|
strokeLinecap: "round",
|
|
9736
|
-
className: "transition-all"
|
|
9844
|
+
className: "transition-all motion-reduce:transition-none"
|
|
9737
9845
|
}
|
|
9738
9846
|
)
|
|
9739
9847
|
]
|
|
@@ -9964,7 +10072,7 @@ function ChartLegend({
|
|
|
9964
10072
|
|
|
9965
10073
|
// src/components/charts/trend-label.tsx
|
|
9966
10074
|
var import_clsx79 = __toESM(require("clsx"), 1);
|
|
9967
|
-
var
|
|
10075
|
+
var import_lucide_react27 = require("lucide-react");
|
|
9968
10076
|
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
9969
10077
|
var SIZE17 = {
|
|
9970
10078
|
sm: "text-body-xs",
|
|
@@ -9998,7 +10106,7 @@ function TrendLabel({
|
|
|
9998
10106
|
const rising = value > 0;
|
|
9999
10107
|
const flat = value === 0;
|
|
10000
10108
|
const good = direction === "up-is-good" ? rising : !rising;
|
|
10001
|
-
const Arrow = rising ?
|
|
10109
|
+
const Arrow = rising ? import_lucide_react27.TrendingUpIcon : import_lucide_react27.TrendingDownIcon;
|
|
10002
10110
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
10003
10111
|
"span",
|
|
10004
10112
|
{
|
|
@@ -10154,7 +10262,7 @@ function refusePress(event) {
|
|
|
10154
10262
|
|
|
10155
10263
|
// src/components/lists/file-row.tsx
|
|
10156
10264
|
var import_clsx81 = __toESM(require("clsx"), 1);
|
|
10157
|
-
var
|
|
10265
|
+
var import_lucide_react28 = require("lucide-react");
|
|
10158
10266
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
10159
10267
|
function FileTypeBadge({ type }) {
|
|
10160
10268
|
return /* @__PURE__ */ (0, import_jsx_runtime102.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 });
|
|
@@ -10186,8 +10294,8 @@ function FileRow({
|
|
|
10186
10294
|
detail && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "text-body-xs text-default-secondary", children: detail })
|
|
10187
10295
|
] }),
|
|
10188
10296
|
(onDownload || onRemove || actions) && /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
10189
|
-
onDownload && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Tooltip, { title: downloadLabel, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(IconButton, { variant: "subtle", size: "sm", "aria-label": `${downloadLabel} ${name}`, onClick: onDownload, className: "touch-hit", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10190
|
-
onRemove && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Tooltip, { title: removeLabel, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(IconButton, { variant: "subtle", size: "sm", "aria-label": `${removeLabel} ${name}`, onClick: onRemove, className: "touch-hit", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10297
|
+
onDownload && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Tooltip, { title: downloadLabel, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(IconButton, { variant: "subtle", size: "sm", "aria-label": `${downloadLabel} ${name}`, onClick: onDownload, className: "touch-hit", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react28.DownloadIcon, { "aria-hidden": true }) }) }),
|
|
10298
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Tooltip, { title: removeLabel, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(IconButton, { variant: "subtle", size: "sm", "aria-label": `${removeLabel} ${name}`, onClick: onRemove, className: "touch-hit", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react28.Trash2Icon, { "aria-hidden": true }) }) }),
|
|
10191
10299
|
actions && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "ml-2 flex items-center gap-2", children: actions })
|
|
10192
10300
|
] })
|
|
10193
10301
|
]
|
|
@@ -10337,7 +10445,7 @@ function ProgressBar({
|
|
|
10337
10445
|
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10338
10446
|
"div",
|
|
10339
10447
|
{
|
|
10340
|
-
className: cn("h-full transition-all", rounded, FILL[tone]),
|
|
10448
|
+
className: cn("h-full transition-all motion-reduce:transition-none", rounded, FILL[tone]),
|
|
10341
10449
|
style: { width: `${clamped}%`, ...radius ? { borderRadius: radius } : void 0 }
|
|
10342
10450
|
}
|
|
10343
10451
|
)
|
|
@@ -10413,16 +10521,16 @@ function IconTextRow({ icon, title, detail, className }) {
|
|
|
10413
10521
|
|
|
10414
10522
|
// src/components/lists/checklist-row.tsx
|
|
10415
10523
|
var import_clsx85 = __toESM(require("clsx"), 1);
|
|
10416
|
-
var
|
|
10524
|
+
var import_lucide_react29 = require("lucide-react");
|
|
10417
10525
|
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
10418
10526
|
function ChecklistRow({ label, state, className }) {
|
|
10419
10527
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("li", { "data-state": state, className: (0, import_clsx85.default)("flex items-center gap-3", className), children: [
|
|
10420
|
-
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "flex size-5 shrink-0 items-center justify-center", children: state === "done" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10528
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "flex size-5 shrink-0 items-center justify-center", children: state === "done" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react29.CheckIcon, { className: "size-4 text-positive", strokeWidth: 2.5, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10421
10529
|
"span",
|
|
10422
10530
|
{
|
|
10423
10531
|
className: (0, import_clsx85.default)(
|
|
10424
10532
|
"size-3.5 rounded-full border-2",
|
|
10425
|
-
state === "active" ? "animate-pulse border-brand-emphasis border-t-transparent" : "border-disabled"
|
|
10533
|
+
state === "active" ? "motion-safe:animate-pulse border-brand-emphasis border-t-transparent" : "border-disabled"
|
|
10426
10534
|
)
|
|
10427
10535
|
}
|
|
10428
10536
|
) }),
|
|
@@ -10500,7 +10608,7 @@ function DetailGrid({ children, columns = "auto", className }) {
|
|
|
10500
10608
|
// src/components/lists/description-list.tsx
|
|
10501
10609
|
var import_react70 = require("react");
|
|
10502
10610
|
var import_clsx88 = __toESM(require("clsx"), 1);
|
|
10503
|
-
var
|
|
10611
|
+
var import_lucide_react30 = require("lucide-react");
|
|
10504
10612
|
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
10505
10613
|
function DescriptionList({ children, className }) {
|
|
10506
10614
|
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("dl", { className: cn("flex flex-col gap-3", className), children });
|
|
@@ -10539,7 +10647,7 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
10539
10647
|
() => void 0
|
|
10540
10648
|
);
|
|
10541
10649
|
},
|
|
10542
|
-
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
10650
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react30.CheckIcon, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react30.CopyIcon, { "aria-hidden": true })
|
|
10543
10651
|
}
|
|
10544
10652
|
),
|
|
10545
10653
|
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { role: "status", className: "sr-only", children: copied ? copiedLabel : "" })
|
|
@@ -10558,7 +10666,7 @@ function EmailText({ email, className }) {
|
|
|
10558
10666
|
|
|
10559
10667
|
// src/components/lists/checked-group-list.tsx
|
|
10560
10668
|
var import_clsx89 = __toESM(require("clsx"), 1);
|
|
10561
|
-
var
|
|
10669
|
+
var import_lucide_react31 = require("lucide-react");
|
|
10562
10670
|
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
10563
10671
|
var COLUMNS4 = {
|
|
10564
10672
|
1: "columns-1",
|
|
@@ -10575,7 +10683,7 @@ function CheckedGroupList({
|
|
|
10575
10683
|
if (groups.length === 0) {
|
|
10576
10684
|
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: (0, import_clsx89.default)("text-body-xs text-default-secondary", className), children: emptyLabel });
|
|
10577
10685
|
}
|
|
10578
|
-
const glyph = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
10686
|
+
const glyph = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_lucide_react31.CheckIcon, { className: "size-3.5", strokeWidth: 2.5, "aria-hidden": true }) : icon;
|
|
10579
10687
|
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: (0, import_clsx89.default)(COLUMNS4[columns], "gap-x-6", className), children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "mb-5 break-inside-avoid last:mb-0", children: [
|
|
10580
10688
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "mb-2 text-body-tiny font-semibold uppercase tracking-wide text-default-secondary", children: group.label }),
|
|
10581
10689
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("ul", { className: "space-y-1.5", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("li", { className: "flex items-center gap-2 text-body-xs text-default", children: [
|
|
@@ -10588,7 +10696,7 @@ function CheckedGroupList({
|
|
|
10588
10696
|
// src/components/lists/tree-view.tsx
|
|
10589
10697
|
var import_react71 = require("react");
|
|
10590
10698
|
var import_clsx90 = __toESM(require("clsx"), 1);
|
|
10591
|
-
var
|
|
10699
|
+
var import_lucide_react32 = require("lucide-react");
|
|
10592
10700
|
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
10593
10701
|
var ROW = {
|
|
10594
10702
|
sm: "min-h-8 py-1 text-body-xs",
|
|
@@ -10744,7 +10852,7 @@ function TreeView({
|
|
|
10744
10852
|
focus(id);
|
|
10745
10853
|
},
|
|
10746
10854
|
className: "flex size-5 shrink-0 items-center justify-center rounded text-icon-default-secondary hover:bg-default-tertiary",
|
|
10747
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
10855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_lucide_react32.ChevronRightIcon, { className: (0, import_clsx90.default)("size-3.5 transition-transform motion-reduce:transition-none", node.expanded && "rotate-90") })
|
|
10748
10856
|
}
|
|
10749
10857
|
)
|
|
10750
10858
|
) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { "aria-hidden": true, className: "size-5 shrink-0" }),
|
|
@@ -10769,7 +10877,7 @@ function TreeView({
|
|
|
10769
10877
|
// src/components/lists/table.tsx
|
|
10770
10878
|
var import_react72 = require("react");
|
|
10771
10879
|
var import_clsx91 = __toESM(require("clsx"), 1);
|
|
10772
|
-
var
|
|
10880
|
+
var import_lucide_react33 = require("lucide-react");
|
|
10773
10881
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
10774
10882
|
var Table = (0, import_react72.forwardRef)(function Table2({ label, density = "default", fixed = false, maxHeight, className, children, ...rest }, ref) {
|
|
10775
10883
|
return (
|
|
@@ -10893,7 +11001,7 @@ var TableHead = (0, import_react72.forwardRef)(function TableHead2({ sort, onSor
|
|
|
10893
11001
|
),
|
|
10894
11002
|
children: [
|
|
10895
11003
|
children,
|
|
10896
|
-
sort === false ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
11004
|
+
sort === false ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react33.ChevronsUpDownIcon, { "aria-hidden": true, className: "size-3.5 opacity-50" }) : sort === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react33.ChevronUpIcon, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react33.ChevronDownIcon, { "aria-hidden": true, className: "size-3.5" })
|
|
10897
11005
|
]
|
|
10898
11006
|
}
|
|
10899
11007
|
) : children
|
|
@@ -10980,7 +11088,7 @@ var Skeleton = (0, import_react73.forwardRef)(function Skeleton2({ shape = "line
|
|
|
10980
11088
|
"div",
|
|
10981
11089
|
{
|
|
10982
11090
|
className: (0, import_clsx93.default)(
|
|
10983
|
-
"animate-pulse bg-default-tertiary",
|
|
11091
|
+
"motion-safe:animate-pulse bg-default-tertiary",
|
|
10984
11092
|
SHAPE2.line,
|
|
10985
11093
|
// A ragged last line reads as a paragraph rather than a solid slab.
|
|
10986
11094
|
index === lines - 1 ? "w-3/5" : "w-full",
|
|
@@ -10996,7 +11104,7 @@ var Skeleton = (0, import_react73.forwardRef)(function Skeleton2({ shape = "line
|
|
|
10996
11104
|
ref,
|
|
10997
11105
|
"aria-hidden": true,
|
|
10998
11106
|
"data-slot": "skeleton",
|
|
10999
|
-
className: (0, import_clsx93.default)("animate-pulse bg-default-tertiary", SHAPE2[shape], className),
|
|
11107
|
+
className: (0, import_clsx93.default)("motion-safe:animate-pulse bg-default-tertiary", SHAPE2[shape], className),
|
|
11000
11108
|
...rest
|
|
11001
11109
|
}
|
|
11002
11110
|
);
|
|
@@ -11031,7 +11139,7 @@ function cardSlots(columns) {
|
|
|
11031
11139
|
}
|
|
11032
11140
|
|
|
11033
11141
|
// src/components/lists/data-table-parts.tsx
|
|
11034
|
-
var
|
|
11142
|
+
var import_lucide_react34 = require("lucide-react");
|
|
11035
11143
|
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
11036
11144
|
var SELECT_COLUMN_ID = "select";
|
|
11037
11145
|
function columnLabel(column) {
|
|
@@ -11051,7 +11159,7 @@ function DataTableColumnHeader({
|
|
|
11051
11159
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: cn(hidden ? "sr-only" : "inline-block w-max whitespace-nowrap", className), children: text });
|
|
11052
11160
|
}
|
|
11053
11161
|
const sorted = column.getIsSorted();
|
|
11054
|
-
const Icon = sorted === "asc" ?
|
|
11162
|
+
const Icon = sorted === "asc" ? import_lucide_react34.ChevronUpIcon : sorted === "desc" ? import_lucide_react34.ChevronDownIcon : import_lucide_react34.ChevronsUpDownIcon;
|
|
11055
11163
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
11056
11164
|
"button",
|
|
11057
11165
|
{
|
|
@@ -11111,7 +11219,7 @@ function DataTableViewOptions({ table, label = "Columns" }) {
|
|
|
11111
11219
|
const columns = table.getAllLeafColumns().filter((column) => column.getCanHide());
|
|
11112
11220
|
if (columns.length === 0) return null;
|
|
11113
11221
|
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(DropdownMenu, { children: [
|
|
11114
|
-
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Button, { variant: "neutral", size: "md", leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
11222
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Button, { variant: "neutral", size: "md", leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react34.Columns3Icon, { "aria-hidden": true }), children: label }) }),
|
|
11115
11223
|
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(DropdownMenuContent, { align: "end", children: [
|
|
11116
11224
|
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(DropdownMenuLabel, { children: "Show columns" }),
|
|
11117
11225
|
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
@@ -11379,6 +11487,7 @@ function useScrollEdges() {
|
|
|
11379
11487
|
}, [node, measure]);
|
|
11380
11488
|
return { ref: setNode, onScroll: measure, ...edges };
|
|
11381
11489
|
}
|
|
11490
|
+
var serverSortedValue = () => void 0;
|
|
11382
11491
|
function defaultRowLink({ children, ...props }) {
|
|
11383
11492
|
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("a", { ...props, children });
|
|
11384
11493
|
}
|
|
@@ -11444,10 +11553,15 @@ function DataTable({
|
|
|
11444
11553
|
);
|
|
11445
11554
|
const [rowSelection, setRowSelection] = useTableState(state.rowSelection, {}, onRowSelectionChange);
|
|
11446
11555
|
const allColumns = (0, import_react74.useMemo)(() => {
|
|
11447
|
-
|
|
11556
|
+
let cols = columns;
|
|
11557
|
+
if (manual.sorting) {
|
|
11558
|
+
cols = cols.map(
|
|
11559
|
+
(column) => column.enableSorting === true && !("accessorFn" in column) && !("accessorKey" in column) ? { ...column, accessorFn: serverSortedValue } : column
|
|
11560
|
+
);
|
|
11561
|
+
}
|
|
11448
11562
|
if (!enableRowSelection || cols.some((column) => column.id === SELECT_COLUMN_ID)) return cols;
|
|
11449
11563
|
return [createSelectColumn({ getRowLabel: getRowLabel && ((row) => `Select ${getRowLabel(row)}`) }), ...cols];
|
|
11450
|
-
}, [columns, enableRowSelection, getRowLabel]);
|
|
11564
|
+
}, [columns, enableRowSelection, getRowLabel, manual.sorting]);
|
|
11451
11565
|
const table = (0, import_react_table.useReactTable)({
|
|
11452
11566
|
data,
|
|
11453
11567
|
columns: allColumns,
|
|
@@ -11468,6 +11582,10 @@ function DataTable({
|
|
|
11468
11582
|
manualFiltering: manual.filtering,
|
|
11469
11583
|
manualPagination: !paginated || manual.pagination,
|
|
11470
11584
|
rowCount: manual.rowCount,
|
|
11585
|
+
// Two states from 0.9.4: a third click no longer clears the sort. "Off" is not a direction a
|
|
11586
|
+
// person can see or ask for, and it silently reverted to an order nobody chose. Pass
|
|
11587
|
+
// `tableOptions={{ enableSortingRemoval: true }}` for the three-state cycle.
|
|
11588
|
+
enableSortingRemoval: false,
|
|
11471
11589
|
...tableOptions
|
|
11472
11590
|
});
|
|
11473
11591
|
const selectionReported = (0, import_react74.useRef)(false);
|
|
@@ -11876,12 +11994,12 @@ function CardList({
|
|
|
11876
11994
|
);
|
|
11877
11995
|
}
|
|
11878
11996
|
|
|
11879
|
-
// src/
|
|
11997
|
+
// src/data-table.tsx
|
|
11880
11998
|
var import_react_table2 = require("@tanstack/react-table");
|
|
11881
11999
|
|
|
11882
12000
|
// src/components/feedback/inline-alert.tsx
|
|
11883
12001
|
var import_clsx96 = __toESM(require("clsx"), 1);
|
|
11884
|
-
var
|
|
12002
|
+
var import_lucide_react35 = require("lucide-react");
|
|
11885
12003
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
11886
12004
|
var toneStyles3 = {
|
|
11887
12005
|
info: "border-brand-tertiary bg-brand-tertiary text-brand",
|
|
@@ -11890,10 +12008,10 @@ var toneStyles3 = {
|
|
|
11890
12008
|
positive: "border-positive-tertiary bg-positive-tertiary text-positive"
|
|
11891
12009
|
};
|
|
11892
12010
|
var toneIcons = {
|
|
11893
|
-
info: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11894
|
-
warning: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11895
|
-
danger: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
11896
|
-
positive: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
12011
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.InfoIcon, { className: "size-4" }),
|
|
12012
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.TriangleAlertIcon, { className: "size-4" }),
|
|
12013
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.TriangleAlertIcon, { className: "size-4" }),
|
|
12014
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.CircleCheckBigIcon, { className: "size-4" })
|
|
11897
12015
|
};
|
|
11898
12016
|
function InlineAlert({ tone, children, icon, className }) {
|
|
11899
12017
|
const glyph = icon === void 0 ? toneIcons[tone] : icon;
|
|
@@ -11952,7 +12070,7 @@ var ErrorBoundary = class extends import_react75.Component {
|
|
|
11952
12070
|
// src/components/feedback/banner.tsx
|
|
11953
12071
|
var import_react76 = require("react");
|
|
11954
12072
|
var import_clsx97 = __toESM(require("clsx"), 1);
|
|
11955
|
-
var
|
|
12073
|
+
var import_lucide_react36 = require("lucide-react");
|
|
11956
12074
|
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
11957
12075
|
var TONE_STYLES3 = {
|
|
11958
12076
|
info: "border-brand-tertiary bg-brand-tertiary text-default",
|
|
@@ -11967,10 +12085,10 @@ var TONE_ICON_COLOR = {
|
|
|
11967
12085
|
danger: "text-icon-danger"
|
|
11968
12086
|
};
|
|
11969
12087
|
var TONE_ICON2 = {
|
|
11970
|
-
info: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
11971
|
-
positive: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
11972
|
-
warning: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
11973
|
-
danger: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12088
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react36.InfoIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12089
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react36.CircleCheckBigIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12090
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react36.TriangleAlertIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12091
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react36.TriangleAlertIcon, { "aria-hidden": true, className: "size-5" })
|
|
11974
12092
|
};
|
|
11975
12093
|
var Banner = (0, import_react76.forwardRef)(function Banner2({
|
|
11976
12094
|
title,
|
|
@@ -12015,7 +12133,7 @@ var Banner = (0, import_react76.forwardRef)(function Banner2({
|
|
|
12015
12133
|
"aria-label": typeof title === "string" ? `Dismiss: ${title}` : "Dismiss",
|
|
12016
12134
|
onClick: onDismiss,
|
|
12017
12135
|
className: "-mr-1 -mt-1 shrink-0",
|
|
12018
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react36.XIcon, { "aria-hidden": true, size: 16 })
|
|
12019
12137
|
}
|
|
12020
12138
|
)
|
|
12021
12139
|
]
|
|
@@ -12026,7 +12144,7 @@ var Banner = (0, import_react76.forwardRef)(function Banner2({
|
|
|
12026
12144
|
// src/components/feedback/toast.tsx
|
|
12027
12145
|
var import_react77 = require("react");
|
|
12028
12146
|
var import_clsx98 = __toESM(require("clsx"), 1);
|
|
12029
|
-
var
|
|
12147
|
+
var import_lucide_react37 = require("lucide-react");
|
|
12030
12148
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
12031
12149
|
var ToastContext = (0, import_react77.createContext)(null);
|
|
12032
12150
|
function useToast() {
|
|
@@ -12035,10 +12153,10 @@ function useToast() {
|
|
|
12035
12153
|
return context;
|
|
12036
12154
|
}
|
|
12037
12155
|
var TONE_ICON3 = {
|
|
12038
|
-
info: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12039
|
-
positive: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12040
|
-
warning: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12041
|
-
danger: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12156
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_lucide_react37.InfoIcon, { "aria-hidden": true, className: "size-4" }),
|
|
12157
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_lucide_react37.CircleCheckBigIcon, { "aria-hidden": true, className: "size-4" }),
|
|
12158
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_lucide_react37.TriangleAlertIcon, { "aria-hidden": true, className: "size-4" }),
|
|
12159
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_lucide_react37.TriangleAlertIcon, { "aria-hidden": true, className: "size-4" })
|
|
12042
12160
|
};
|
|
12043
12161
|
var TONE_ICON_COLOR2 = {
|
|
12044
12162
|
info: "text-icon-brand",
|
|
@@ -12151,7 +12269,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
12151
12269
|
"aria-label": typeof toast.title === "string" ? `Dismiss: ${toast.title}` : "Dismiss",
|
|
12152
12270
|
onClick: onDismiss,
|
|
12153
12271
|
className: "-mr-1 -mt-1 shrink-0",
|
|
12154
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12272
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_lucide_react37.XIcon, { "aria-hidden": true, size: 14 })
|
|
12155
12273
|
}
|
|
12156
12274
|
)
|
|
12157
12275
|
]
|
|
@@ -12161,7 +12279,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
12161
12279
|
|
|
12162
12280
|
// src/components/forms/password-input.tsx
|
|
12163
12281
|
var import_react78 = require("react");
|
|
12164
|
-
var
|
|
12282
|
+
var import_lucide_react38 = require("lucide-react");
|
|
12165
12283
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
12166
12284
|
var PasswordInput = (0, import_react78.forwardRef)(function PasswordInput2(props, ref) {
|
|
12167
12285
|
const [visible, setVisible] = (0, import_react78.useState)(false);
|
|
@@ -12178,7 +12296,7 @@ var PasswordInput = (0, import_react78.forwardRef)(function PasswordInput2(props
|
|
|
12178
12296
|
"aria-label": visible ? "Hide password" : "Show password",
|
|
12179
12297
|
onClick: () => setVisible((v) => !v),
|
|
12180
12298
|
className: "flex items-center justify-center rounded transition-colors hover:text-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
12181
|
-
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
12299
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.EyeOffIcon, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react38.EyeIcon, { "aria-hidden": true, className: "size-4" })
|
|
12182
12300
|
}
|
|
12183
12301
|
)
|
|
12184
12302
|
}
|
|
@@ -12187,7 +12305,7 @@ var PasswordInput = (0, import_react78.forwardRef)(function PasswordInput2(props
|
|
|
12187
12305
|
|
|
12188
12306
|
// src/components/ai/ai-chat-bar.tsx
|
|
12189
12307
|
var import_clsx99 = __toESM(require("clsx"), 1);
|
|
12190
|
-
var
|
|
12308
|
+
var import_lucide_react39 = require("lucide-react");
|
|
12191
12309
|
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
12192
12310
|
function AIChatBar({
|
|
12193
12311
|
placeholder = "Ask Intelligence about any entity, supplier, or risk\u2026",
|
|
@@ -12201,7 +12319,7 @@ function AIChatBar({
|
|
|
12201
12319
|
className
|
|
12202
12320
|
),
|
|
12203
12321
|
children: [
|
|
12204
|
-
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12322
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.SearchIcon, { className: "size-4" }) }),
|
|
12205
12323
|
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "flex-1 text-body-sm text-default-tertiary truncate", children: placeholder }),
|
|
12206
12324
|
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
12207
12325
|
"button",
|
|
@@ -12210,7 +12328,7 @@ function AIChatBar({
|
|
|
12210
12328
|
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",
|
|
12211
12329
|
children: [
|
|
12212
12330
|
"Ask",
|
|
12213
|
-
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
12331
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react39.ArrowRightIcon, { "aria-hidden": true, className: "size-4" })
|
|
12214
12332
|
]
|
|
12215
12333
|
}
|
|
12216
12334
|
)
|
|
@@ -12221,7 +12339,7 @@ function AIChatBar({
|
|
|
12221
12339
|
|
|
12222
12340
|
// src/components/ai/ai-suggestion-chip.tsx
|
|
12223
12341
|
var import_clsx100 = __toESM(require("clsx"), 1);
|
|
12224
|
-
var
|
|
12342
|
+
var import_lucide_react40 = require("lucide-react");
|
|
12225
12343
|
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
12226
12344
|
function AISuggestionChip({ prompt, onClick, className }) {
|
|
12227
12345
|
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
@@ -12234,9 +12352,9 @@ function AISuggestionChip({ prompt, onClick, className }) {
|
|
|
12234
12352
|
className
|
|
12235
12353
|
),
|
|
12236
12354
|
children: [
|
|
12237
|
-
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-brand", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12355
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-brand", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_lucide_react40.CpuIcon, { className: "size-4" }) }),
|
|
12238
12356
|
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { className: "flex-1 text-body-sm text-default truncate", children: prompt }),
|
|
12239
|
-
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
12357
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_lucide_react40.ArrowRightIcon, { className: "size-3.5", strokeWidth: 2.5 }) })
|
|
12240
12358
|
]
|
|
12241
12359
|
}
|
|
12242
12360
|
);
|
|
@@ -12264,7 +12382,7 @@ function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
|
12264
12382
|
|
|
12265
12383
|
// src/components/ai/chat.tsx
|
|
12266
12384
|
var import_clsx102 = __toESM(require("clsx"), 1);
|
|
12267
|
-
var
|
|
12385
|
+
var import_lucide_react41 = require("lucide-react");
|
|
12268
12386
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
12269
12387
|
function AiAvatar({ className, icon }) {
|
|
12270
12388
|
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
@@ -12272,7 +12390,7 @@ function AiAvatar({ className, icon }) {
|
|
|
12272
12390
|
{
|
|
12273
12391
|
"aria-hidden": true,
|
|
12274
12392
|
className: cn("flex size-8 shrink-0 items-center justify-center rounded-full bg-brand text-icon-brand-on-brand", className),
|
|
12275
|
-
children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
12393
|
+
children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react41.CpuIcon, { className: "size-3.5" })
|
|
12276
12394
|
}
|
|
12277
12395
|
);
|
|
12278
12396
|
}
|