@platned/ui 0.7.1 → 0.8.0
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/index.cjs +278 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +208 -15
- package/dist/index.d.ts +208 -15
- package/dist/index.js +414 -277
- package/dist/index.js.map +1 -1
- package/dist/sidebar.cjs +73 -1
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.js +87 -14
- package/dist/sidebar.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2086,7 +2086,7 @@ function Calendar({
|
|
|
2086
2086
|
children: /* @__PURE__ */ jsx14(ChevronLeftIcon, { "aria-hidden": true, size: 16 })
|
|
2087
2087
|
}
|
|
2088
2088
|
),
|
|
2089
|
-
captionLayout === "dropdown" ? /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1.5", children: [
|
|
2089
|
+
captionLayout === "dropdown" ? /* @__PURE__ */ jsxs8("div", { className: "relative flex items-center gap-1.5", children: [
|
|
2090
2090
|
/* @__PURE__ */ jsx14(
|
|
2091
2091
|
"select",
|
|
2092
2092
|
{
|
|
@@ -2805,6 +2805,7 @@ var Toggle = forwardRef12(function Toggle2({
|
|
|
2805
2805
|
var ToggleGroupContext = createContext5(null);
|
|
2806
2806
|
function ToggleGroup({
|
|
2807
2807
|
children,
|
|
2808
|
+
options,
|
|
2808
2809
|
type = "single",
|
|
2809
2810
|
value: valueProp,
|
|
2810
2811
|
defaultValue,
|
|
@@ -2858,7 +2859,16 @@ function ToggleGroup({
|
|
|
2858
2859
|
),
|
|
2859
2860
|
...roving.containerProps,
|
|
2860
2861
|
...rest,
|
|
2861
|
-
children
|
|
2862
|
+
children: options ? options.map((option) => /* @__PURE__ */ jsx19(
|
|
2863
|
+
ToggleGroupItem,
|
|
2864
|
+
{
|
|
2865
|
+
value: option.value,
|
|
2866
|
+
"aria-label": option["aria-label"],
|
|
2867
|
+
disabled: option.disabled,
|
|
2868
|
+
children: option.label
|
|
2869
|
+
},
|
|
2870
|
+
option.value
|
|
2871
|
+
)) : children
|
|
2862
2872
|
}
|
|
2863
2873
|
) });
|
|
2864
2874
|
}
|
|
@@ -2928,7 +2938,7 @@ var InputOTP = forwardRef13(function InputOTP2({
|
|
|
2928
2938
|
};
|
|
2929
2939
|
const chars = value.split("");
|
|
2930
2940
|
const activeIndex = Math.min(value.length, length - 1);
|
|
2931
|
-
return /* @__PURE__ */ jsxs13("div", { className: clsx21("inline-flex flex-col gap-1.5", className), children: [
|
|
2941
|
+
return /* @__PURE__ */ jsxs13("div", { className: clsx21("relative inline-flex flex-col gap-1.5", className), children: [
|
|
2932
2942
|
/* @__PURE__ */ jsxs13(
|
|
2933
2943
|
"div",
|
|
2934
2944
|
{
|
|
@@ -2989,7 +2999,7 @@ var InputOTP = forwardRef13(function InputOTP2({
|
|
|
2989
2999
|
import { useRef as useRef11, useState as useState10 } from "react";
|
|
2990
3000
|
import clsx22 from "clsx";
|
|
2991
3001
|
import { UploadIcon } from "lucide-react";
|
|
2992
|
-
import {
|
|
3002
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2993
3003
|
var DEFAULT_ACCEPT = ".pdf,.jpg,.jpeg,.png";
|
|
2994
3004
|
var DEFAULT_MAX_SIZE_BYTES = 10 * 1024 * 1024;
|
|
2995
3005
|
function formatFileSize(bytes) {
|
|
@@ -3055,62 +3065,66 @@ function FileDropZone({
|
|
|
3055
3065
|
const picker = useFilePicker({ accept, maxSizeBytes, onFileSelected });
|
|
3056
3066
|
const { error, handleFiles } = picker;
|
|
3057
3067
|
const inputRef = picker.inputProps.ref;
|
|
3058
|
-
return
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
{
|
|
3063
|
-
|
|
3064
|
-
"
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
e.preventDefault();
|
|
3078
|
-
if (!disabled) setIsDragging(true);
|
|
3079
|
-
},
|
|
3080
|
-
onDragEnter: (e) => {
|
|
3081
|
-
e.preventDefault();
|
|
3082
|
-
if (!disabled) setIsDragging(true);
|
|
3083
|
-
},
|
|
3084
|
-
onDragLeave: () => setIsDragging(false),
|
|
3085
|
-
onDrop: (e) => {
|
|
3086
|
-
e.preventDefault();
|
|
3087
|
-
setIsDragging(false);
|
|
3088
|
-
if (!disabled) handleFiles(e.dataTransfer.files);
|
|
3089
|
-
},
|
|
3090
|
-
className: clsx22(
|
|
3091
|
-
"flex flex-col items-center justify-center gap-1 rounded-lg border-2 border-dashed py-4 px-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1",
|
|
3092
|
-
disabled ? "cursor-not-allowed border-disabled bg-disabled" : clsx22(
|
|
3093
|
-
"cursor-pointer",
|
|
3094
|
-
isDragging ? "border-brand bg-brand-tertiary" : "border-default bg-default-secondary hover:border-brand hover:bg-brand-tertiary"
|
|
3095
|
-
),
|
|
3096
|
-
className
|
|
3097
|
-
),
|
|
3098
|
-
children: [
|
|
3099
|
-
/* @__PURE__ */ jsx21(
|
|
3100
|
-
"span",
|
|
3101
|
-
{
|
|
3102
|
-
"aria-hidden": true,
|
|
3103
|
-
className: disabled ? "text-disabled" : isDragging ? "text-brand" : "text-default-secondary",
|
|
3104
|
-
children: /* @__PURE__ */ jsx21(UploadIcon, { className: "size-5" })
|
|
3068
|
+
return (
|
|
3069
|
+
// relative: the hidden input is absolutely positioned (sr-only); without a positioned
|
|
3070
|
+
// ancestor its box escapes a scrolling container and scrolls the page instead.
|
|
3071
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative", children: [
|
|
3072
|
+
/* @__PURE__ */ jsx21("input", { ...picker.inputProps, disabled }),
|
|
3073
|
+
/* @__PURE__ */ jsxs14(
|
|
3074
|
+
"div",
|
|
3075
|
+
{
|
|
3076
|
+
role: "button",
|
|
3077
|
+
"data-state": isDragging ? "dragging" : void 0,
|
|
3078
|
+
tabIndex: disabled ? -1 : 0,
|
|
3079
|
+
"aria-disabled": disabled,
|
|
3080
|
+
onClick: () => {
|
|
3081
|
+
if (!disabled) inputRef.current?.click();
|
|
3082
|
+
},
|
|
3083
|
+
onKeyDown: (e) => {
|
|
3084
|
+
if (!disabled && (e.key === "Enter" || e.key === " ")) {
|
|
3085
|
+
e.preventDefault();
|
|
3086
|
+
inputRef.current?.click();
|
|
3105
3087
|
}
|
|
3088
|
+
},
|
|
3089
|
+
onDragOver: (e) => {
|
|
3090
|
+
e.preventDefault();
|
|
3091
|
+
if (!disabled) setIsDragging(true);
|
|
3092
|
+
},
|
|
3093
|
+
onDragEnter: (e) => {
|
|
3094
|
+
e.preventDefault();
|
|
3095
|
+
if (!disabled) setIsDragging(true);
|
|
3096
|
+
},
|
|
3097
|
+
onDragLeave: () => setIsDragging(false),
|
|
3098
|
+
onDrop: (e) => {
|
|
3099
|
+
e.preventDefault();
|
|
3100
|
+
setIsDragging(false);
|
|
3101
|
+
if (!disabled) handleFiles(e.dataTransfer.files);
|
|
3102
|
+
},
|
|
3103
|
+
className: clsx22(
|
|
3104
|
+
"flex flex-col items-center justify-center gap-1 rounded-lg border-2 border-dashed py-4 px-4 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1",
|
|
3105
|
+
disabled ? "cursor-not-allowed border-disabled bg-disabled" : clsx22(
|
|
3106
|
+
"cursor-pointer",
|
|
3107
|
+
isDragging ? "border-brand bg-brand-tertiary" : "border-default bg-default-secondary hover:border-brand hover:bg-brand-tertiary"
|
|
3108
|
+
),
|
|
3109
|
+
className
|
|
3106
3110
|
),
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3111
|
+
children: [
|
|
3112
|
+
/* @__PURE__ */ jsx21(
|
|
3113
|
+
"span",
|
|
3114
|
+
{
|
|
3115
|
+
"aria-hidden": true,
|
|
3116
|
+
className: disabled ? "text-disabled" : isDragging ? "text-brand" : "text-default-secondary",
|
|
3117
|
+
children: /* @__PURE__ */ jsx21(UploadIcon, { className: "size-5" })
|
|
3118
|
+
}
|
|
3119
|
+
),
|
|
3120
|
+
/* @__PURE__ */ jsx21("span", { className: clsx22("text-body-sm font-medium", disabled ? "text-disabled" : "text-default"), children: "Upload file" }),
|
|
3121
|
+
/* @__PURE__ */ jsx21("span", { className: "text-body-xs text-default-secondary text-center", children: description })
|
|
3122
|
+
]
|
|
3123
|
+
}
|
|
3124
|
+
),
|
|
3125
|
+
error && /* @__PURE__ */ jsx21("span", { role: "alert", className: "text-body-xs text-danger", children: error })
|
|
3126
|
+
] })
|
|
3127
|
+
);
|
|
3114
3128
|
}
|
|
3115
3129
|
|
|
3116
3130
|
// src/components/forms/tag-input.tsx
|
|
@@ -3483,7 +3497,7 @@ import {
|
|
|
3483
3497
|
} from "react";
|
|
3484
3498
|
import clsx27 from "clsx";
|
|
3485
3499
|
import { CheckIcon as CheckIcon4, ChevronDownIcon as ChevronDownIcon2 } from "lucide-react";
|
|
3486
|
-
import { Fragment as
|
|
3500
|
+
import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3487
3501
|
var HEIGHT = {
|
|
3488
3502
|
lg: "h-12 px-4 text-body",
|
|
3489
3503
|
md: "h-9 px-3 text-body-sm",
|
|
@@ -3719,7 +3733,7 @@ function Combobox({
|
|
|
3719
3733
|
"items-center",
|
|
3720
3734
|
option.disabled ? "cursor-not-allowed text-disabled" : isActive ? clsx27(OVERLAY_ITEM_ACTIVE, "text-default") : "text-default"
|
|
3721
3735
|
),
|
|
3722
|
-
children: renderOption ? renderOption(option, isSelected) : /* @__PURE__ */ jsxs18(
|
|
3736
|
+
children: renderOption ? renderOption(option, isSelected) : /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
3723
3737
|
/* @__PURE__ */ jsxs18("span", { className: "min-w-0 flex-1", children: [
|
|
3724
3738
|
/* @__PURE__ */ jsx26("span", { className: "block truncate", children: option.label }),
|
|
3725
3739
|
option.description && /* @__PURE__ */ jsx26("span", { className: "block truncate text-body-tiny text-default-secondary", children: option.description })
|
|
@@ -3737,7 +3751,7 @@ function Combobox({
|
|
|
3737
3751
|
}
|
|
3738
3752
|
|
|
3739
3753
|
// src/components/forms/role-combo-box.tsx
|
|
3740
|
-
import { Fragment as
|
|
3754
|
+
import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3741
3755
|
var ROLE_COMBO_OPTIONS = [
|
|
3742
3756
|
{ role: "Reviewer", description: "Reviews onboarding requests" },
|
|
3743
3757
|
{ role: "Admin", description: "Full org control" },
|
|
@@ -3772,7 +3786,7 @@ function RoleComboBox({
|
|
|
3772
3786
|
clearable: false,
|
|
3773
3787
|
emptyMessage: "No roles match",
|
|
3774
3788
|
className,
|
|
3775
|
-
renderOption: (option) => /* @__PURE__ */ jsxs19(
|
|
3789
|
+
renderOption: (option) => /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
3776
3790
|
/* @__PURE__ */ jsx27(RoleBadge, { role: option.value, size: "sm" }),
|
|
3777
3791
|
/* @__PURE__ */ jsx27("span", { className: "min-w-0 flex-1 truncate text-body-xs text-default-secondary", children: option.description })
|
|
3778
3792
|
] })
|
|
@@ -3952,7 +3966,7 @@ function Command({
|
|
|
3952
3966
|
});
|
|
3953
3967
|
};
|
|
3954
3968
|
let renderedGroup;
|
|
3955
|
-
return /* @__PURE__ */ jsxs20("div", { className: clsx28("flex w-full flex-col", className), children: [
|
|
3969
|
+
return /* @__PURE__ */ jsxs20("div", { className: clsx28("relative flex w-full flex-col", className), children: [
|
|
3956
3970
|
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 border-b border-default px-3.5 py-3", children: [
|
|
3957
3971
|
/* @__PURE__ */ jsx30(SearchIcon, { "aria-hidden": true, className: "size-4 shrink-0 text-icon-default-secondary" }),
|
|
3958
3972
|
/* @__PURE__ */ jsx30(
|
|
@@ -4420,7 +4434,10 @@ var Checkbox = forwardRef14(function Checkbox2({
|
|
|
4420
4434
|
{
|
|
4421
4435
|
htmlFor: controlId,
|
|
4422
4436
|
className: clsx38(
|
|
4423
|
-
|
|
4437
|
+
// relative: the hidden input is absolutely positioned (sr-only). Without a positioned
|
|
4438
|
+
// ancestor here its box lands far up the page, and focusing it on click scrolled a
|
|
4439
|
+
// scrolling container to that spot, away from the control.
|
|
4440
|
+
"group relative inline-flex items-start gap-2.5",
|
|
4424
4441
|
disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"
|
|
4425
4442
|
),
|
|
4426
4443
|
children: [
|
|
@@ -4481,6 +4498,7 @@ import { jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
|
4481
4498
|
var RadioGroupContext = createContext6(null);
|
|
4482
4499
|
var RadioGroup = forwardRef15(function RadioGroup2({
|
|
4483
4500
|
children,
|
|
4501
|
+
options,
|
|
4484
4502
|
value: valueProp,
|
|
4485
4503
|
defaultValue,
|
|
4486
4504
|
onValueChange,
|
|
@@ -4527,7 +4545,16 @@ var RadioGroup = forwardRef15(function RadioGroup2({
|
|
|
4527
4545
|
className
|
|
4528
4546
|
),
|
|
4529
4547
|
...rest,
|
|
4530
|
-
children
|
|
4548
|
+
children: options ? options.map((option) => /* @__PURE__ */ jsx42(
|
|
4549
|
+
Radio,
|
|
4550
|
+
{
|
|
4551
|
+
value: option.value,
|
|
4552
|
+
label: option.label,
|
|
4553
|
+
description: option.description,
|
|
4554
|
+
disabled: option.disabled
|
|
4555
|
+
},
|
|
4556
|
+
option.value
|
|
4557
|
+
)) : children
|
|
4531
4558
|
}
|
|
4532
4559
|
)
|
|
4533
4560
|
}
|
|
@@ -4551,7 +4578,10 @@ var Radio = forwardRef15(function Radio2({ value, label, description, disabled,
|
|
|
4551
4578
|
{
|
|
4552
4579
|
htmlFor: controlId,
|
|
4553
4580
|
className: clsx39(
|
|
4554
|
-
|
|
4581
|
+
// relative: the hidden input is absolutely positioned (sr-only). Without a positioned
|
|
4582
|
+
// ancestor here its box lands far up the page, and focusing it on click scrolled a
|
|
4583
|
+
// scrolling container to that spot, away from the control.
|
|
4584
|
+
"group relative inline-flex items-start gap-2.5",
|
|
4555
4585
|
isDisabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"
|
|
4556
4586
|
),
|
|
4557
4587
|
children: [
|
|
@@ -4612,6 +4642,7 @@ import { jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
|
4612
4642
|
var RadioCardsContext = createContext7(null);
|
|
4613
4643
|
var RadioCards = forwardRef16(function RadioCards2({
|
|
4614
4644
|
children,
|
|
4645
|
+
options,
|
|
4615
4646
|
value: valueProp,
|
|
4616
4647
|
defaultValue,
|
|
4617
4648
|
onValueChange,
|
|
@@ -4643,7 +4674,7 @@ var RadioCards = forwardRef16(function RadioCards2({
|
|
|
4643
4674
|
"data-slot": "radio-cards",
|
|
4644
4675
|
className: cn("grid gap-3", className),
|
|
4645
4676
|
...rest,
|
|
4646
|
-
children
|
|
4677
|
+
children: options ? options.map((option) => /* @__PURE__ */ jsx43(RadioCardsItem, { ...option }, option.value)) : children
|
|
4647
4678
|
}
|
|
4648
4679
|
)
|
|
4649
4680
|
}
|
|
@@ -4732,6 +4763,7 @@ import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
|
4732
4763
|
var CheckboxGroupContext = createContext8(null);
|
|
4733
4764
|
var CheckboxGroup = forwardRef17(function CheckboxGroup2({
|
|
4734
4765
|
children,
|
|
4766
|
+
options,
|
|
4735
4767
|
legend,
|
|
4736
4768
|
value: valueProp,
|
|
4737
4769
|
defaultValue = [],
|
|
@@ -4767,7 +4799,7 @@ var CheckboxGroup = forwardRef17(function CheckboxGroup2({
|
|
|
4767
4799
|
children: legend
|
|
4768
4800
|
}
|
|
4769
4801
|
),
|
|
4770
|
-
/* @__PURE__ */ jsx44("div", { className: cn("flex", orientation === "vertical" ? "flex-col gap-2.5" : "flex-row flex-wrap gap-4"), children })
|
|
4802
|
+
/* @__PURE__ */ jsx44("div", { className: cn("flex", orientation === "vertical" ? "flex-col gap-2.5" : "flex-row flex-wrap gap-4"), children: options ? options.map((option) => /* @__PURE__ */ jsx44(CheckboxGroupItem, { ...option }, option.value)) : children })
|
|
4771
4803
|
] }) });
|
|
4772
4804
|
});
|
|
4773
4805
|
var CheckboxGroupItem = forwardRef17(
|
|
@@ -5331,7 +5363,7 @@ var ModalFooter = forwardRef21(function ModalFooter2({ children, align = "end",
|
|
|
5331
5363
|
// src/components/overlays/tooltip.tsx
|
|
5332
5364
|
import { useId as useId15 } from "react";
|
|
5333
5365
|
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
5334
|
-
import { Fragment as
|
|
5366
|
+
import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5335
5367
|
function Tooltip({
|
|
5336
5368
|
children,
|
|
5337
5369
|
title,
|
|
@@ -5348,7 +5380,7 @@ function Tooltip({
|
|
|
5348
5380
|
const container = usePortalContainer();
|
|
5349
5381
|
const labelId = useId15();
|
|
5350
5382
|
const labelled = association === "labelledby";
|
|
5351
|
-
const content = /* @__PURE__ */ jsxs32(
|
|
5383
|
+
const content = /* @__PURE__ */ jsxs32(Fragment5, { children: [
|
|
5352
5384
|
title && /* @__PURE__ */ jsx50("p", { className: "font-semibold", children: title }),
|
|
5353
5385
|
body && /* @__PURE__ */ jsx50("p", { className: cn(title && "mt-0.5 opacity-80"), children: body })
|
|
5354
5386
|
] });
|
|
@@ -5457,12 +5489,13 @@ import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
|
5457
5489
|
|
|
5458
5490
|
// src/components/overlays/menu-core.tsx
|
|
5459
5491
|
import {
|
|
5492
|
+
Fragment as Fragment6,
|
|
5460
5493
|
forwardRef as forwardRef22,
|
|
5461
5494
|
useId as useId17
|
|
5462
5495
|
} from "react";
|
|
5463
5496
|
import clsx45 from "clsx";
|
|
5464
5497
|
import { CheckIcon as CheckIcon7, ChevronRightIcon as ChevronRightIcon3 } from "lucide-react";
|
|
5465
|
-
import { jsx as jsx52, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5498
|
+
import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5466
5499
|
var MENU_PANEL_CLASSES = cn("z-popover", OVERLAY_PANEL_MENU, "focus:outline-none");
|
|
5467
5500
|
var ITEM_BASE = clsx45(
|
|
5468
5501
|
OVERLAY_ITEM_BASE,
|
|
@@ -5489,6 +5522,18 @@ function focusMenuEdge(event, edge) {
|
|
|
5489
5522
|
else if (document.activeElement === panel) items[0]?.focus();
|
|
5490
5523
|
});
|
|
5491
5524
|
}
|
|
5525
|
+
function visibleMenuItems(items) {
|
|
5526
|
+
const kept = items.filter((item) => {
|
|
5527
|
+
if (item.hidden) return false;
|
|
5528
|
+
if (item.type === "group" || item.type === "submenu") return visibleMenuItems(item.items).length > 0;
|
|
5529
|
+
return true;
|
|
5530
|
+
});
|
|
5531
|
+
return kept.filter((item, i) => {
|
|
5532
|
+
if (item.type !== "separator") return true;
|
|
5533
|
+
const prev = kept[i - 1];
|
|
5534
|
+
return i > 0 && i < kept.length - 1 && prev.type !== "separator";
|
|
5535
|
+
});
|
|
5536
|
+
}
|
|
5492
5537
|
function createMenuParts(P) {
|
|
5493
5538
|
const Item = forwardRef22(function MenuItem({ children, onSelect, tone = "default", disabled = false, icon, description, shortcut, textValue, className, ...rest }, ref) {
|
|
5494
5539
|
const descriptionId = useId17();
|
|
@@ -5619,7 +5664,58 @@ function createMenuParts(P) {
|
|
|
5619
5664
|
}
|
|
5620
5665
|
) });
|
|
5621
5666
|
});
|
|
5667
|
+
function Items({ items }) {
|
|
5668
|
+
return /* @__PURE__ */ jsx52(Fragment7, { children: visibleMenuItems(items).map(renderItem) });
|
|
5669
|
+
}
|
|
5670
|
+
function renderItem(item) {
|
|
5671
|
+
switch (item.type) {
|
|
5672
|
+
case "checkbox":
|
|
5673
|
+
return /* @__PURE__ */ jsx52(
|
|
5674
|
+
CheckboxItem,
|
|
5675
|
+
{
|
|
5676
|
+
checked: item.checked,
|
|
5677
|
+
onCheckedChange: item.onCheckedChange,
|
|
5678
|
+
disabled: item.disabled,
|
|
5679
|
+
shortcut: item.shortcut,
|
|
5680
|
+
textValue: item.textValue,
|
|
5681
|
+
children: item.label
|
|
5682
|
+
},
|
|
5683
|
+
item.id
|
|
5684
|
+
);
|
|
5685
|
+
case "radio":
|
|
5686
|
+
return /* @__PURE__ */ jsx52(RadioGroup3, { value: item.value, onValueChange: item.onValueChange, children: item.options.map((option) => /* @__PURE__ */ jsx52(RadioItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) }, item.id);
|
|
5687
|
+
case "group":
|
|
5688
|
+
return /* @__PURE__ */ jsx52(Group, { label: item.label, children: /* @__PURE__ */ jsx52(Items, { items: item.items }) }, item.id);
|
|
5689
|
+
case "submenu":
|
|
5690
|
+
return /* @__PURE__ */ jsxs34(Sub, { children: [
|
|
5691
|
+
/* @__PURE__ */ jsx52(SubTrigger, { icon: item.icon, disabled: item.disabled, children: item.label }),
|
|
5692
|
+
/* @__PURE__ */ jsx52(SubContent, { children: /* @__PURE__ */ jsx52(Items, { items: item.items }) })
|
|
5693
|
+
] }, item.id);
|
|
5694
|
+
case "label":
|
|
5695
|
+
return /* @__PURE__ */ jsx52(Label3, { children: item.label }, item.id);
|
|
5696
|
+
case "separator":
|
|
5697
|
+
return /* @__PURE__ */ jsx52(Separator3, {}, item.id);
|
|
5698
|
+
case "custom":
|
|
5699
|
+
return /* @__PURE__ */ jsx52(Fragment6, { children: item.render() }, item.id);
|
|
5700
|
+
default:
|
|
5701
|
+
return /* @__PURE__ */ jsx52(
|
|
5702
|
+
Item,
|
|
5703
|
+
{
|
|
5704
|
+
onSelect: item.onSelect,
|
|
5705
|
+
tone: item.tone,
|
|
5706
|
+
disabled: item.disabled,
|
|
5707
|
+
icon: item.icon,
|
|
5708
|
+
description: item.description,
|
|
5709
|
+
shortcut: item.shortcut,
|
|
5710
|
+
textValue: item.textValue,
|
|
5711
|
+
children: item.label
|
|
5712
|
+
},
|
|
5713
|
+
item.id
|
|
5714
|
+
);
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5622
5717
|
return {
|
|
5718
|
+
Items,
|
|
5623
5719
|
Item,
|
|
5624
5720
|
CheckboxItem,
|
|
5625
5721
|
RadioGroup: RadioGroup3,
|
|
@@ -5635,14 +5731,17 @@ function createMenuParts(P) {
|
|
|
5635
5731
|
}
|
|
5636
5732
|
|
|
5637
5733
|
// src/components/overlays/context-menu.tsx
|
|
5638
|
-
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
5639
|
-
function ContextMenu({ children, open: openProp, defaultOpen = false, onOpenChange }) {
|
|
5734
|
+
import { Fragment as Fragment8, jsx as jsx53, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5735
|
+
function ContextMenu({ children, items, open: openProp, defaultOpen = false, onOpenChange }) {
|
|
5640
5736
|
const [, setOpen] = useControllableState({
|
|
5641
5737
|
value: openProp,
|
|
5642
5738
|
defaultValue: defaultOpen,
|
|
5643
5739
|
onChange: onOpenChange
|
|
5644
5740
|
});
|
|
5645
|
-
return /* @__PURE__ */ jsx53(ContextMenuPrimitive.Root, { onOpenChange: setOpen, modal: false, children
|
|
5741
|
+
return /* @__PURE__ */ jsx53(ContextMenuPrimitive.Root, { onOpenChange: setOpen, modal: false, children: items ? /* @__PURE__ */ jsxs35(Fragment8, { children: [
|
|
5742
|
+
/* @__PURE__ */ jsx53(ContextMenuTrigger, { children }),
|
|
5743
|
+
/* @__PURE__ */ jsx53(ContextMenuContent, { children: /* @__PURE__ */ jsx53(ContextMenuItems, { items }) })
|
|
5744
|
+
] }) : children });
|
|
5646
5745
|
}
|
|
5647
5746
|
var ContextMenuTrigger = forwardRef23(
|
|
5648
5747
|
function ContextMenuTrigger2({ children, disabled = false, className, onKeyDown, ...rest }, ref) {
|
|
@@ -5707,6 +5806,7 @@ var ContextMenuContent = forwardRef23(
|
|
|
5707
5806
|
}
|
|
5708
5807
|
);
|
|
5709
5808
|
var parts = createMenuParts(ContextMenuPrimitive);
|
|
5809
|
+
var ContextMenuItems = parts.Items;
|
|
5710
5810
|
var ContextMenuItem = parts.Item;
|
|
5711
5811
|
var ContextMenuCheckboxItem = parts.CheckboxItem;
|
|
5712
5812
|
var ContextMenuRadioGroup = parts.RadioGroup;
|
|
@@ -5722,8 +5822,8 @@ var ContextMenuSubContent = parts.SubContent;
|
|
|
5722
5822
|
// src/components/overlays/menubar.tsx
|
|
5723
5823
|
import { forwardRef as forwardRef24 } from "react";
|
|
5724
5824
|
import { Menubar as MenubarPrimitive } from "radix-ui";
|
|
5725
|
-
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
5726
|
-
var Menubar = forwardRef24(function Menubar2({ children, label, value, defaultValue, onValueChange, className, ...rest }, ref) {
|
|
5825
|
+
import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5826
|
+
var Menubar = forwardRef24(function Menubar2({ children, menus, label, value, defaultValue, onValueChange, className, ...rest }, ref) {
|
|
5727
5827
|
return /* @__PURE__ */ jsx54(
|
|
5728
5828
|
MenubarPrimitive.Root,
|
|
5729
5829
|
{
|
|
@@ -5736,7 +5836,10 @@ var Menubar = forwardRef24(function Menubar2({ children, label, value, defaultVa
|
|
|
5736
5836
|
"data-slot": "menubar",
|
|
5737
5837
|
className: cn("flex items-center gap-0.5", className),
|
|
5738
5838
|
...rest,
|
|
5739
|
-
children
|
|
5839
|
+
children: menus ? menus.filter((menu) => !menu.hidden).map((menu) => /* @__PURE__ */ jsxs36(MenubarMenu, { value: menu.value, children: [
|
|
5840
|
+
/* @__PURE__ */ jsx54(MenubarTrigger, { children: menu.label }),
|
|
5841
|
+
/* @__PURE__ */ jsx54(MenubarContent, { children: /* @__PURE__ */ jsx54(MenubarItems, { items: menu.items }) })
|
|
5842
|
+
] }, menu.value)) : children
|
|
5740
5843
|
}
|
|
5741
5844
|
);
|
|
5742
5845
|
});
|
|
@@ -5792,6 +5895,7 @@ var MenubarContent = forwardRef24(
|
|
|
5792
5895
|
}
|
|
5793
5896
|
);
|
|
5794
5897
|
var parts2 = createMenuParts(MenubarPrimitive);
|
|
5898
|
+
var MenubarItems = parts2.Items;
|
|
5795
5899
|
var MenubarItem = parts2.Item;
|
|
5796
5900
|
var MenubarCheckboxItem = parts2.CheckboxItem;
|
|
5797
5901
|
var MenubarRadioGroup = parts2.RadioGroup;
|
|
@@ -5865,7 +5969,7 @@ var ScrollArea = forwardRef25(function ScrollArea2({ children, axis = "vertical"
|
|
|
5865
5969
|
});
|
|
5866
5970
|
|
|
5867
5971
|
// src/components/overlays/drawer.tsx
|
|
5868
|
-
import { Fragment as
|
|
5972
|
+
import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5869
5973
|
var DrawerNaming = createContext10(null);
|
|
5870
5974
|
var Drawer = forwardRef26(function Drawer2({
|
|
5871
5975
|
open,
|
|
@@ -5884,7 +5988,7 @@ var Drawer = forwardRef26(function Drawer2({
|
|
|
5884
5988
|
initialFocus,
|
|
5885
5989
|
container
|
|
5886
5990
|
}, ref) {
|
|
5887
|
-
return /* @__PURE__ */
|
|
5991
|
+
return /* @__PURE__ */ jsxs37(DialogPrimitive2.Root, { open, defaultOpen, onOpenChange, children: [
|
|
5888
5992
|
extractTrigger2(children),
|
|
5889
5993
|
/* @__PURE__ */ jsx56(DialogPrimitive2.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx56(
|
|
5890
5994
|
DrawerPanel,
|
|
@@ -5897,7 +6001,7 @@ var Drawer = forwardRef26(function Drawer2({
|
|
|
5897
6001
|
onEscapeKeyDown,
|
|
5898
6002
|
onInteractOutside,
|
|
5899
6003
|
initialFocus,
|
|
5900
|
-
children: header !== void 0 ? /* @__PURE__ */
|
|
6004
|
+
children: header !== void 0 ? /* @__PURE__ */ jsxs37(Fragment9, { children: [
|
|
5901
6005
|
/* @__PURE__ */ jsx56(DrawerHeader, { children: header }),
|
|
5902
6006
|
/* @__PURE__ */ jsx56(DrawerBody, { label, children: withoutTrigger2(children) }),
|
|
5903
6007
|
footer && /* @__PURE__ */ jsx56(DrawerFooter, { align: footerAlign, children: footer })
|
|
@@ -5951,7 +6055,7 @@ var DrawerPanel = forwardRef26(function DrawerPanel2({ side = "right", width, la
|
|
|
5951
6055
|
onInteractOutside?.(original);
|
|
5952
6056
|
if (original.defaultPrevented) event.preventDefault();
|
|
5953
6057
|
},
|
|
5954
|
-
children: /* @__PURE__ */
|
|
6058
|
+
children: /* @__PURE__ */ jsxs37(
|
|
5955
6059
|
"div",
|
|
5956
6060
|
{
|
|
5957
6061
|
ref: composeRefs(ref, setPanelNode),
|
|
@@ -5999,7 +6103,7 @@ function withoutTrigger2(children) {
|
|
|
5999
6103
|
return Array.isArray(children) ? children.filter((child) => !isTrigger2(child)) : isTrigger2(children) ? null : children;
|
|
6000
6104
|
}
|
|
6001
6105
|
var DrawerHeader = forwardRef26(function DrawerHeader2({ children, showClose = true, className, ...rest }, ref) {
|
|
6002
|
-
return /* @__PURE__ */
|
|
6106
|
+
return /* @__PURE__ */ jsxs37(
|
|
6003
6107
|
"div",
|
|
6004
6108
|
{
|
|
6005
6109
|
ref,
|
|
@@ -6067,7 +6171,7 @@ var DrawerFooter = forwardRef26(function DrawerFooter2({ align = "end", classNam
|
|
|
6067
6171
|
|
|
6068
6172
|
// src/components/overlays/confirm-dialog.tsx
|
|
6069
6173
|
import { useRef as useRef16 } from "react";
|
|
6070
|
-
import { jsx as jsx57, jsxs as
|
|
6174
|
+
import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6071
6175
|
function ConfirmDialog({
|
|
6072
6176
|
open,
|
|
6073
6177
|
title,
|
|
@@ -6093,7 +6197,7 @@ function ConfirmDialog({
|
|
|
6093
6197
|
// `alertdialog`, not `dialog`: this interrupts to ask a yes/no question, so the body
|
|
6094
6198
|
// should be announced on open rather than waiting to be browsed to. The name comes
|
|
6095
6199
|
// from `ModalTitle` via `aria-labelledby`, so there is no `label` to keep in sync.
|
|
6096
|
-
/* @__PURE__ */
|
|
6200
|
+
/* @__PURE__ */ jsxs38(
|
|
6097
6201
|
Modal,
|
|
6098
6202
|
{
|
|
6099
6203
|
open,
|
|
@@ -6103,12 +6207,12 @@ function ConfirmDialog({
|
|
|
6103
6207
|
className,
|
|
6104
6208
|
initialFocus: cancelRef,
|
|
6105
6209
|
children: [
|
|
6106
|
-
/* @__PURE__ */
|
|
6210
|
+
/* @__PURE__ */ jsxs38(ModalHeader, { tone, divider: Boolean(children), children: [
|
|
6107
6211
|
/* @__PURE__ */ jsx57(ModalTitle, { children: title }),
|
|
6108
6212
|
subtitle && /* @__PURE__ */ jsx57(ModalDescription, { children: subtitle })
|
|
6109
6213
|
] }),
|
|
6110
6214
|
children && /* @__PURE__ */ jsx57(ModalBody, { children }),
|
|
6111
|
-
/* @__PURE__ */
|
|
6215
|
+
/* @__PURE__ */ jsxs38(ModalFooter, { children: [
|
|
6112
6216
|
/* @__PURE__ */ jsx57(
|
|
6113
6217
|
Button,
|
|
6114
6218
|
{
|
|
@@ -6140,7 +6244,7 @@ function ConfirmDialog({
|
|
|
6140
6244
|
|
|
6141
6245
|
// src/components/overlays/note-confirm-modal.tsx
|
|
6142
6246
|
import { useState as useState18 } from "react";
|
|
6143
|
-
import { jsx as jsx58, jsxs as
|
|
6247
|
+
import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6144
6248
|
function NoteConfirmModal({ open, ...rest }) {
|
|
6145
6249
|
if (!open) return null;
|
|
6146
6250
|
return /* @__PURE__ */ jsx58(NoteConfirmModalShell, { ...rest });
|
|
@@ -6178,7 +6282,7 @@ function NoteConfirmModalShell({
|
|
|
6178
6282
|
const confirmed = onDiscardNote ? onDiscardNote(note) : typeof window !== "undefined" && window.confirm("Discard your note? It will not be saved.");
|
|
6179
6283
|
if (!confirmed) event.preventDefault();
|
|
6180
6284
|
};
|
|
6181
|
-
return /* @__PURE__ */
|
|
6285
|
+
return /* @__PURE__ */ jsxs39(
|
|
6182
6286
|
Modal,
|
|
6183
6287
|
{
|
|
6184
6288
|
open: true,
|
|
@@ -6188,7 +6292,7 @@ function NoteConfirmModalShell({
|
|
|
6188
6292
|
onEscapeKeyDown: guardDiscard,
|
|
6189
6293
|
onInteractOutside: guardDiscard,
|
|
6190
6294
|
children: [
|
|
6191
|
-
/* @__PURE__ */
|
|
6295
|
+
/* @__PURE__ */ jsxs39(ModalHeader, { tone, children: [
|
|
6192
6296
|
/* @__PURE__ */ jsx58(ModalTitle, { children: title }),
|
|
6193
6297
|
subtitle && /* @__PURE__ */ jsx58(ModalDescription, { children: subtitle })
|
|
6194
6298
|
] }),
|
|
@@ -6202,7 +6306,7 @@ function NoteConfirmModalShell({
|
|
|
6202
6306
|
rows: 4
|
|
6203
6307
|
}
|
|
6204
6308
|
) }),
|
|
6205
|
-
/* @__PURE__ */
|
|
6309
|
+
/* @__PURE__ */ jsxs39(ModalFooter, { children: [
|
|
6206
6310
|
/* @__PURE__ */ jsx58(
|
|
6207
6311
|
Button,
|
|
6208
6312
|
{
|
|
@@ -6241,7 +6345,7 @@ import {
|
|
|
6241
6345
|
} from "react";
|
|
6242
6346
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
6243
6347
|
import { EllipsisIcon } from "lucide-react";
|
|
6244
|
-
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
6348
|
+
import { Fragment as Fragment10, jsx as jsx59, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6245
6349
|
var DropdownMenuStateContext = createContext11(null);
|
|
6246
6350
|
function useDropdownMenuState(part) {
|
|
6247
6351
|
const value = useContext11(DropdownMenuStateContext);
|
|
@@ -6250,6 +6354,11 @@ function useDropdownMenuState(part) {
|
|
|
6250
6354
|
}
|
|
6251
6355
|
function DropdownMenu({
|
|
6252
6356
|
children,
|
|
6357
|
+
items,
|
|
6358
|
+
trigger,
|
|
6359
|
+
label,
|
|
6360
|
+
side,
|
|
6361
|
+
align,
|
|
6253
6362
|
open: openProp,
|
|
6254
6363
|
defaultOpen = false,
|
|
6255
6364
|
onOpenChange,
|
|
@@ -6262,7 +6371,10 @@ function DropdownMenu({
|
|
|
6262
6371
|
});
|
|
6263
6372
|
const pendingEdge = useRef17("start");
|
|
6264
6373
|
const state = useMemo9(() => ({ setOpen, pendingEdge }), [setOpen]);
|
|
6265
|
-
return /* @__PURE__ */ jsx59(DropdownMenuPrimitive.Root, { open, onOpenChange: setOpen, modal, children: /* @__PURE__ */ jsx59(DropdownMenuStateContext.Provider, { value: state, children
|
|
6374
|
+
return /* @__PURE__ */ jsx59(DropdownMenuPrimitive.Root, { open, onOpenChange: setOpen, modal, children: /* @__PURE__ */ jsx59(DropdownMenuStateContext.Provider, { value: state, children: items ? /* @__PURE__ */ jsxs40(Fragment10, { children: [
|
|
6375
|
+
/* @__PURE__ */ jsx59(DropdownMenuTrigger, { asChild: trigger != null, label, children: trigger }),
|
|
6376
|
+
/* @__PURE__ */ jsx59(DropdownMenuContent, { side, align, children: /* @__PURE__ */ jsx59(DropdownMenuItems, { items }) })
|
|
6377
|
+
] }) : children }) });
|
|
6266
6378
|
}
|
|
6267
6379
|
var DropdownMenuTrigger = forwardRef27(
|
|
6268
6380
|
function DropdownMenuTrigger2({ children, asChild = false, label = "Open menu", onClick, onPointerDown, onMouseDown, onKeyDown, ...rest }, ref) {
|
|
@@ -6347,6 +6459,7 @@ var DropdownMenuContent = forwardRef27(
|
|
|
6347
6459
|
}
|
|
6348
6460
|
);
|
|
6349
6461
|
var parts3 = createMenuParts(DropdownMenuPrimitive);
|
|
6462
|
+
var DropdownMenuItems = parts3.Items;
|
|
6350
6463
|
var DropdownMenuItem = parts3.Item;
|
|
6351
6464
|
var DropdownMenuCheckboxItem = parts3.CheckboxItem;
|
|
6352
6465
|
var DropdownMenuRadioGroup = parts3.RadioGroup;
|
|
@@ -6380,7 +6493,7 @@ function Scrim({ onClose, label, position = "fixed", open, className }) {
|
|
|
6380
6493
|
import { useState as useState19 } from "react";
|
|
6381
6494
|
import { Dialog as DialogPrimitive3 } from "radix-ui";
|
|
6382
6495
|
import { XIcon as XIcon6 } from "lucide-react";
|
|
6383
|
-
import { jsx as jsx61, jsxs as
|
|
6496
|
+
import { jsx as jsx61, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6384
6497
|
var STACKING = {
|
|
6385
6498
|
base: "z-overlay",
|
|
6386
6499
|
elevated: "z-modal"
|
|
@@ -6394,7 +6507,7 @@ function FullscreenSurface({
|
|
|
6394
6507
|
className
|
|
6395
6508
|
}) {
|
|
6396
6509
|
const [node, setNode] = useState19(null);
|
|
6397
|
-
return /* @__PURE__ */ jsx61(DialogPrimitive3.Root, { open: true, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsx61(DialogPrimitive3.Portal, { children: /* @__PURE__ */
|
|
6510
|
+
return /* @__PURE__ */ jsx61(DialogPrimitive3.Root, { open: true, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsx61(DialogPrimitive3.Portal, { children: /* @__PURE__ */ jsxs41(
|
|
6398
6511
|
DialogPrimitive3.Content,
|
|
6399
6512
|
{
|
|
6400
6513
|
ref: setNode,
|
|
@@ -6581,10 +6694,11 @@ import { createContext as createContext13, forwardRef as forwardRef29, useContex
|
|
|
6581
6694
|
import clsx47 from "clsx";
|
|
6582
6695
|
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
6583
6696
|
import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
|
|
6584
|
-
import { jsx as jsx65, jsxs as
|
|
6697
|
+
import { jsx as jsx65, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6585
6698
|
var HeadingLevel = createContext13(3);
|
|
6586
6699
|
var Accordion = forwardRef29(function Accordion2({
|
|
6587
|
-
children,
|
|
6700
|
+
children: childrenProp,
|
|
6701
|
+
items,
|
|
6588
6702
|
type = "single",
|
|
6589
6703
|
value,
|
|
6590
6704
|
defaultValue,
|
|
@@ -6595,6 +6709,10 @@ var Accordion = forwardRef29(function Accordion2({
|
|
|
6595
6709
|
className,
|
|
6596
6710
|
...rest
|
|
6597
6711
|
}, ref) {
|
|
6712
|
+
const children = items ? items.filter((item) => !item.hidden).map((item) => /* @__PURE__ */ jsxs42(AccordionItem, { value: item.value, disabled: item.disabled, children: [
|
|
6713
|
+
/* @__PURE__ */ jsx65(AccordionTrigger, { children: item.label }),
|
|
6714
|
+
/* @__PURE__ */ jsx65(AccordionContent, { children: item.content })
|
|
6715
|
+
] }, item.value)) : childrenProp;
|
|
6598
6716
|
const shared = {
|
|
6599
6717
|
ref,
|
|
6600
6718
|
disabled,
|
|
@@ -6646,7 +6764,7 @@ var AccordionTrigger = forwardRef29(
|
|
|
6646
6764
|
return (
|
|
6647
6765
|
// The heading carries no styling of its own — it exists so the accordion shows up in
|
|
6648
6766
|
// the document outline, which is how screen reader users navigate between sections.
|
|
6649
|
-
/* @__PURE__ */ jsx65(AccordionPrimitive.Header, { asChild: true, children: /* @__PURE__ */ jsx65(Heading2, { className: "m-0", children: /* @__PURE__ */
|
|
6767
|
+
/* @__PURE__ */ jsx65(AccordionPrimitive.Header, { asChild: true, children: /* @__PURE__ */ jsx65(Heading2, { className: "m-0", children: /* @__PURE__ */ jsxs42(
|
|
6650
6768
|
AccordionPrimitive.Trigger,
|
|
6651
6769
|
{
|
|
6652
6770
|
ref,
|
|
@@ -7044,7 +7162,7 @@ import {
|
|
|
7044
7162
|
} from "react";
|
|
7045
7163
|
import clsx49 from "clsx";
|
|
7046
7164
|
import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon4 } from "lucide-react";
|
|
7047
|
-
import { jsx as jsx69, jsxs as
|
|
7165
|
+
import { jsx as jsx69, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
7048
7166
|
var CarouselContext = createContext15(null);
|
|
7049
7167
|
function useCarousel(part) {
|
|
7050
7168
|
const value = useContext15(CarouselContext);
|
|
@@ -7174,7 +7292,7 @@ function CarouselControls({ showDots = true, className, ...rest }) {
|
|
|
7174
7292
|
},
|
|
7175
7293
|
[carousel, count, loop]
|
|
7176
7294
|
);
|
|
7177
|
-
return /* @__PURE__ */
|
|
7295
|
+
return /* @__PURE__ */ jsxs43(
|
|
7178
7296
|
"div",
|
|
7179
7297
|
{
|
|
7180
7298
|
className: clsx49("mt-3 flex items-center justify-between gap-3", className),
|
|
@@ -7207,7 +7325,7 @@ function CarouselControls({ showDots = true, className, ...rest }) {
|
|
|
7207
7325
|
},
|
|
7208
7326
|
i
|
|
7209
7327
|
)) }),
|
|
7210
|
-
/* @__PURE__ */
|
|
7328
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-1.5", children: [
|
|
7211
7329
|
carousel.hasAutoplay && /* @__PURE__ */ jsx69(
|
|
7212
7330
|
IconButton,
|
|
7213
7331
|
{
|
|
@@ -7248,7 +7366,7 @@ import {
|
|
|
7248
7366
|
useState as useState21
|
|
7249
7367
|
} from "react";
|
|
7250
7368
|
import clsx50 from "clsx";
|
|
7251
|
-
import { jsx as jsx70, jsxs as
|
|
7369
|
+
import { jsx as jsx70, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7252
7370
|
var ResizableContext = createContext16(null);
|
|
7253
7371
|
function useResizable(part) {
|
|
7254
7372
|
const value = useContext16(ResizableContext);
|
|
@@ -7364,7 +7482,7 @@ function ResizableHandle({
|
|
|
7364
7482
|
// resized with a mouse. ARIA explicitly allows a focusable separator, which is what
|
|
7365
7483
|
// carries `aria-valuenow`; jsx-a11y models `separator` as always non-interactive.
|
|
7366
7484
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, jsx-a11y/no-noninteractive-element-interactions
|
|
7367
|
-
/* @__PURE__ */
|
|
7485
|
+
/* @__PURE__ */ jsxs44(
|
|
7368
7486
|
"div",
|
|
7369
7487
|
{
|
|
7370
7488
|
role: "separator",
|
|
@@ -7443,7 +7561,7 @@ function ResizableHandle({
|
|
|
7443
7561
|
|
|
7444
7562
|
// src/components/chrome/page-heading.tsx
|
|
7445
7563
|
import clsx51 from "clsx";
|
|
7446
|
-
import { jsx as jsx71, jsxs as
|
|
7564
|
+
import { jsx as jsx71, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
7447
7565
|
var TITLE = {
|
|
7448
7566
|
// `text-2xl` was stock Tailwind rather than the design tokens. Same 24px, now on-token.
|
|
7449
7567
|
page: "text-heading font-semibold text-default",
|
|
@@ -7468,12 +7586,12 @@ function PageHeading({
|
|
|
7468
7586
|
className
|
|
7469
7587
|
}) {
|
|
7470
7588
|
const Tag = as ?? (size2 === "section" ? "h2" : "h1");
|
|
7471
|
-
const heading = /* @__PURE__ */
|
|
7589
|
+
const heading = /* @__PURE__ */ jsxs45("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
7472
7590
|
/* @__PURE__ */ jsx71(Tag, { className: clsx51(TITLE[size2], truncateTitle && "truncate"), children: title }),
|
|
7473
7591
|
subtitle && /* @__PURE__ */ jsx71("p", { className: SUBTITLE[size2], children: subtitle })
|
|
7474
7592
|
] });
|
|
7475
7593
|
if (!actions) return className ? /* @__PURE__ */ jsx71("div", { className, children: heading }) : heading;
|
|
7476
|
-
return /* @__PURE__ */
|
|
7594
|
+
return /* @__PURE__ */ jsxs45("div", { className: clsx51("flex items-start justify-between gap-4", className), children: [
|
|
7477
7595
|
heading,
|
|
7478
7596
|
/* @__PURE__ */ jsx71("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
7479
7597
|
] });
|
|
@@ -7482,7 +7600,7 @@ function PageHeading({
|
|
|
7482
7600
|
// src/components/chrome/page-toolbar.tsx
|
|
7483
7601
|
import clsx52 from "clsx";
|
|
7484
7602
|
import { ArrowLeftIcon as ArrowLeftIcon2 } from "lucide-react";
|
|
7485
|
-
import { jsx as jsx72, jsxs as
|
|
7603
|
+
import { jsx as jsx72, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7486
7604
|
var SIZE9 = {
|
|
7487
7605
|
sm: "min-h-[56px] px-4 py-3 md:px-7",
|
|
7488
7606
|
md: "min-h-[72px] px-4 py-4 md:px-7"
|
|
@@ -7495,7 +7613,7 @@ function PageToolbar({
|
|
|
7495
7613
|
size: size2 = "md",
|
|
7496
7614
|
className
|
|
7497
7615
|
}) {
|
|
7498
|
-
return /* @__PURE__ */
|
|
7616
|
+
return /* @__PURE__ */ jsxs46(
|
|
7499
7617
|
"div",
|
|
7500
7618
|
{
|
|
7501
7619
|
className: clsx52(
|
|
@@ -7515,13 +7633,13 @@ function PageToolbar({
|
|
|
7515
7633
|
|
|
7516
7634
|
// src/components/chrome/filter-bar.tsx
|
|
7517
7635
|
import clsx53 from "clsx";
|
|
7518
|
-
import { jsx as jsx73, jsxs as
|
|
7636
|
+
import { jsx as jsx73, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7519
7637
|
var GAP3 = {
|
|
7520
7638
|
sm: "gap-2",
|
|
7521
7639
|
md: "gap-3"
|
|
7522
7640
|
};
|
|
7523
7641
|
function FilterBar({ children, trailing, size: size2 = "md", className }) {
|
|
7524
|
-
return /* @__PURE__ */ jsx73(ControlSizeProvider, { size: size2, children: /* @__PURE__ */
|
|
7642
|
+
return /* @__PURE__ */ jsx73(ControlSizeProvider, { size: size2, children: /* @__PURE__ */ jsxs47("div", { className: clsx53("flex flex-wrap items-center", GAP3[size2], className), children: [
|
|
7525
7643
|
children,
|
|
7526
7644
|
trailing && /* @__PURE__ */ jsx73("div", { className: clsx53("ml-auto flex items-center", GAP3[size2]), children: trailing })
|
|
7527
7645
|
] }) });
|
|
@@ -7536,7 +7654,7 @@ import {
|
|
|
7536
7654
|
} from "react";
|
|
7537
7655
|
import clsx54 from "clsx";
|
|
7538
7656
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
7539
|
-
import { jsx as jsx74, jsxs as
|
|
7657
|
+
import { jsx as jsx74, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
7540
7658
|
var SIZE10 = {
|
|
7541
7659
|
underline: {
|
|
7542
7660
|
sm: { strip: "gap-4", tab: "px-0.5 py-1.5 text-body-xs" },
|
|
@@ -7631,7 +7749,7 @@ function ItemsTabs({
|
|
|
7631
7749
|
children: items.map((tab, index) => {
|
|
7632
7750
|
const active = tab.key === value;
|
|
7633
7751
|
const itemProps = roving.itemProps(index, { disabled: tab.disabled, label: tab.label });
|
|
7634
|
-
return /* @__PURE__ */
|
|
7752
|
+
return /* @__PURE__ */ jsxs48(
|
|
7635
7753
|
"button",
|
|
7636
7754
|
{
|
|
7637
7755
|
type: "button",
|
|
@@ -7739,7 +7857,7 @@ var TabsList = forwardRef33(function TabsList2({ label, className, ...rest }, re
|
|
|
7739
7857
|
});
|
|
7740
7858
|
var TabsTrigger = forwardRef33(function TabsTrigger2({ value, disabled, count, className, children, ...rest }, ref) {
|
|
7741
7859
|
const style = useContext17(TabsStyle);
|
|
7742
|
-
return /* @__PURE__ */
|
|
7860
|
+
return /* @__PURE__ */ jsxs48(
|
|
7743
7861
|
TabsPrimitive.Trigger,
|
|
7744
7862
|
{
|
|
7745
7863
|
ref,
|
|
@@ -7769,7 +7887,7 @@ var TabsContent = forwardRef33(function TabsContent2({ value, keepMounted = fals
|
|
|
7769
7887
|
|
|
7770
7888
|
// src/components/chrome/nav-item.tsx
|
|
7771
7889
|
import clsx55 from "clsx";
|
|
7772
|
-
import { Fragment as
|
|
7890
|
+
import { Fragment as Fragment11, jsx as jsx75, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
7773
7891
|
var SIZE11 = {
|
|
7774
7892
|
sm: { box: "h-9 gap-2 rounded-lg px-3 py-1.5", label: "text-body-xs", square: "w-9" },
|
|
7775
7893
|
md: { box: "h-11 gap-3 rounded-xl px-3.5 py-2.5", label: "text-body-sm", square: "w-11" }
|
|
@@ -7862,7 +7980,7 @@ function NavItem({
|
|
|
7862
7980
|
onClick?.(event);
|
|
7863
7981
|
}
|
|
7864
7982
|
};
|
|
7865
|
-
const content = /* @__PURE__ */
|
|
7983
|
+
const content = /* @__PURE__ */ jsxs49(Fragment11, { children: [
|
|
7866
7984
|
icon != null ? /* @__PURE__ */ jsx75("span", { "aria-hidden": true, className: "shrink-0 [&_svg]:size-4", children: icon }) : (
|
|
7867
7985
|
// Icons are optional, but the collapsed rail hides the label — so a row with neither
|
|
7868
7986
|
// renders as an empty box. Through 0.5.0 that is exactly what a nav without icons
|
|
@@ -7971,16 +8089,33 @@ var Kbd = forwardRef35(function Kbd2({ children, size: size2 = "md", className,
|
|
|
7971
8089
|
});
|
|
7972
8090
|
|
|
7973
8091
|
// src/components/chrome/breadcrumb.tsx
|
|
7974
|
-
import {
|
|
8092
|
+
import {
|
|
8093
|
+
Fragment as Fragment12,
|
|
8094
|
+
forwardRef as forwardRef36
|
|
8095
|
+
} from "react";
|
|
7975
8096
|
import clsx59 from "clsx";
|
|
7976
8097
|
import { ChevronRightIcon as ChevronRightIcon5 } from "lucide-react";
|
|
7977
|
-
import { jsx as jsx79, jsxs as
|
|
7978
|
-
var Breadcrumb = forwardRef36(function Breadcrumb2({ children, label = "Breadcrumb", className, ...rest }, ref) {
|
|
7979
|
-
return /* @__PURE__ */ jsx79("nav", { ref, "aria-label": label, "data-slot": "breadcrumb", ...rest, children: /* @__PURE__ */ jsx79("ol", { className: clsx59("flex flex-wrap items-center gap-1.5 p-0 text-body-xs", className), children }) });
|
|
8098
|
+
import { jsx as jsx79, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
8099
|
+
var Breadcrumb = forwardRef36(function Breadcrumb2({ children, items, renderLink, maxItems, label = "Breadcrumb", className, ...rest }, ref) {
|
|
8100
|
+
return /* @__PURE__ */ jsx79("nav", { ref, "aria-label": label, "data-slot": "breadcrumb", ...rest, children: /* @__PURE__ */ jsx79("ol", { className: clsx59("flex flex-wrap items-center gap-1.5 p-0 text-body-xs", className), children: items ? renderItems(items, renderLink, maxItems) : children }) });
|
|
7980
8101
|
});
|
|
8102
|
+
function renderItems(items, renderLink, maxItems) {
|
|
8103
|
+
const last = items.length - 1;
|
|
8104
|
+
const collapse = maxItems !== void 0 && maxItems >= 2 && items.length > maxItems;
|
|
8105
|
+
const shown = collapse ? [0, ...items.map((_, i) => i).slice(items.length - (maxItems - 1))] : items.map((_, i) => i);
|
|
8106
|
+
return shown.map((index, position) => {
|
|
8107
|
+
const item = items[index];
|
|
8108
|
+
const current = item.current ?? index === last;
|
|
8109
|
+
const crumb = !current && renderLink ? /* @__PURE__ */ jsx79(BreadcrumbItem, { asChild: true, first: position === 0, children: renderLink(item) }) : /* @__PURE__ */ jsx79(BreadcrumbItem, { href: item.href, current, first: position === 0, children: item.label });
|
|
8110
|
+
return /* @__PURE__ */ jsxs50(Fragment12, { children: [
|
|
8111
|
+
crumb,
|
|
8112
|
+
collapse && position === 0 && /* @__PURE__ */ jsx79(BreadcrumbEllipsis, {})
|
|
8113
|
+
] }, item.id ?? index);
|
|
8114
|
+
});
|
|
8115
|
+
}
|
|
7981
8116
|
var BreadcrumbItem = forwardRef36(
|
|
7982
8117
|
function BreadcrumbItem2({ children, current = false, asChild = false, first = false, className, ...rest }, ref) {
|
|
7983
|
-
return /* @__PURE__ */
|
|
8118
|
+
return /* @__PURE__ */ jsxs50("li", { className: "flex items-center gap-1.5", children: [
|
|
7984
8119
|
!first && /* @__PURE__ */ jsx79(ChevronRightIcon5, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
7985
8120
|
current ? /* @__PURE__ */ jsx79("span", { "aria-current": "page", className: clsx59("font-medium text-default", className), children }) : asChild ? /* @__PURE__ */ jsx79(
|
|
7986
8121
|
Slot,
|
|
@@ -8011,7 +8146,7 @@ var BreadcrumbItem = forwardRef36(
|
|
|
8011
8146
|
);
|
|
8012
8147
|
var BreadcrumbEllipsis = forwardRef36(
|
|
8013
8148
|
function BreadcrumbEllipsis2({ className, ...rest }, ref) {
|
|
8014
|
-
return /* @__PURE__ */
|
|
8149
|
+
return /* @__PURE__ */ jsxs50("li", { className: "flex items-center gap-1.5", children: [
|
|
8015
8150
|
/* @__PURE__ */ jsx79(ChevronRightIcon5, { "aria-hidden": true, className: "size-3.5 shrink-0 text-icon-default-tertiary" }),
|
|
8016
8151
|
/* @__PURE__ */ jsx79(
|
|
8017
8152
|
"span",
|
|
@@ -8031,7 +8166,7 @@ var BreadcrumbEllipsis = forwardRef36(
|
|
|
8031
8166
|
import { forwardRef as forwardRef37 } from "react";
|
|
8032
8167
|
import clsx60 from "clsx";
|
|
8033
8168
|
import { ChevronLeftIcon as ChevronLeftIcon3, ChevronRightIcon as ChevronRightIcon6 } from "lucide-react";
|
|
8034
|
-
import { Fragment as
|
|
8169
|
+
import { Fragment as Fragment13, jsx as jsx80, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8035
8170
|
var GAP4 = "\u2026";
|
|
8036
8171
|
function paginationRange(page, pageCount, siblingCount = 1) {
|
|
8037
8172
|
const totalSlots = siblingCount * 2 + 5;
|
|
@@ -8079,7 +8214,7 @@ var Pagination = forwardRef37(function Pagination2({
|
|
|
8079
8214
|
const clamped = Math.min(Math.max(next, 1), pageCount);
|
|
8080
8215
|
if (clamped !== page) onPageChange(clamped);
|
|
8081
8216
|
};
|
|
8082
|
-
return /* @__PURE__ */
|
|
8217
|
+
return /* @__PURE__ */ jsxs51(
|
|
8083
8218
|
"nav",
|
|
8084
8219
|
{
|
|
8085
8220
|
ref,
|
|
@@ -8182,13 +8317,13 @@ function PaginationBar({
|
|
|
8182
8317
|
const to = Math.min(total, page * pageSize);
|
|
8183
8318
|
const showSize = Boolean(onPageSizeChange) && pageSizeOptions.length > 0;
|
|
8184
8319
|
const options = pageSizeOptions.includes(pageSize) ? pageSizeOptions : [...pageSizeOptions, pageSize].sort((a, b) => a - b);
|
|
8185
|
-
return /* @__PURE__ */
|
|
8320
|
+
return /* @__PURE__ */ jsxs51(
|
|
8186
8321
|
"div",
|
|
8187
8322
|
{
|
|
8188
8323
|
"data-slot": "pagination-bar",
|
|
8189
8324
|
className: clsx60("flex flex-wrap items-center justify-between gap-x-4 gap-y-3", className),
|
|
8190
8325
|
children: [
|
|
8191
|
-
/* @__PURE__ */ jsx80("p", { className: "text-body-xs text-default-secondary", children: summary ?? /* @__PURE__ */
|
|
8326
|
+
/* @__PURE__ */ jsx80("p", { className: "text-body-xs text-default-secondary", children: summary ?? /* @__PURE__ */ jsxs51(Fragment13, { children: [
|
|
8192
8327
|
"Showing ",
|
|
8193
8328
|
from,
|
|
8194
8329
|
"\u2013",
|
|
@@ -8196,8 +8331,8 @@ function PaginationBar({
|
|
|
8196
8331
|
" of ",
|
|
8197
8332
|
total
|
|
8198
8333
|
] }) }),
|
|
8199
|
-
/* @__PURE__ */
|
|
8200
|
-
showSize && /* @__PURE__ */
|
|
8334
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-3", children: [
|
|
8335
|
+
showSize && /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2", children: [
|
|
8201
8336
|
/* @__PURE__ */ jsx80("span", { "aria-hidden": true, className: "text-body-xs text-default-secondary", children: "Rows per page" }),
|
|
8202
8337
|
/* @__PURE__ */ jsx80(
|
|
8203
8338
|
SelectControl,
|
|
@@ -8221,7 +8356,7 @@ function PaginationBar({
|
|
|
8221
8356
|
// src/components/chrome/navigation-menu.tsx
|
|
8222
8357
|
import { forwardRef as forwardRef38 } from "react";
|
|
8223
8358
|
import clsx61 from "clsx";
|
|
8224
|
-
import { Fragment as
|
|
8359
|
+
import { Fragment as Fragment14, jsx as jsx81, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
8225
8360
|
var NavigationMenu = forwardRef38(
|
|
8226
8361
|
function NavigationMenu2({ children, orientation = "horizontal", label, className, ...rest }, ref) {
|
|
8227
8362
|
return /* @__PURE__ */ jsx81("nav", { ref, "aria-label": label, "data-slot": "navigation-menu", ...rest, children: /* @__PURE__ */ jsx81(
|
|
@@ -8239,7 +8374,7 @@ var NavigationMenu = forwardRef38(
|
|
|
8239
8374
|
);
|
|
8240
8375
|
var NavigationMenuItem = forwardRef38(
|
|
8241
8376
|
function NavigationMenuItem2({ children, active = false, variant = "pill", asChild = false, icon, className, ...rest }, ref) {
|
|
8242
|
-
const content = /* @__PURE__ */
|
|
8377
|
+
const content = /* @__PURE__ */ jsxs52(Fragment14, { children: [
|
|
8243
8378
|
icon && /* @__PURE__ */ jsx81("span", { "aria-hidden": true, className: "shrink-0 [&_svg]:size-4", children: icon }),
|
|
8244
8379
|
/* @__PURE__ */ jsx81("span", { className: "min-w-0 truncate", children })
|
|
8245
8380
|
] });
|
|
@@ -8388,7 +8523,7 @@ function WidgetTitle({ children, size: size2 = "sm", className }) {
|
|
|
8388
8523
|
}
|
|
8389
8524
|
|
|
8390
8525
|
// src/components/widgets/widget-header.tsx
|
|
8391
|
-
import { jsx as jsx84, jsxs as
|
|
8526
|
+
import { jsx as jsx84, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
8392
8527
|
var eyebrowStyles = {
|
|
8393
8528
|
uppercase: "text-body-tiny font-medium uppercase tracking-[0.66px] text-default-secondary",
|
|
8394
8529
|
plain: "text-body-xs leading-[1.4] text-default-secondary"
|
|
@@ -8403,13 +8538,13 @@ function WidgetHeader({
|
|
|
8403
8538
|
action,
|
|
8404
8539
|
className
|
|
8405
8540
|
}) {
|
|
8406
|
-
return /* @__PURE__ */
|
|
8407
|
-
/* @__PURE__ */
|
|
8541
|
+
return /* @__PURE__ */ jsxs53("div", { className: clsx64("flex items-start justify-between gap-2", className), children: [
|
|
8542
|
+
/* @__PURE__ */ jsxs53("div", { className: "min-w-0 flex-1", children: [
|
|
8408
8543
|
eyebrow && /* @__PURE__ */ jsx84("p", { className: eyebrowStyles[eyebrowVariant], children: eyebrow }),
|
|
8409
8544
|
/* @__PURE__ */ jsx84(WidgetTitle, { size: titleSize, children: title }),
|
|
8410
8545
|
subtitle && /* @__PURE__ */ jsx84("p", { className: "mt-1 text-body-xs text-default-secondary leading-snug", children: subtitle })
|
|
8411
8546
|
] }),
|
|
8412
|
-
/* @__PURE__ */
|
|
8547
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
8413
8548
|
badge,
|
|
8414
8549
|
action
|
|
8415
8550
|
] })
|
|
@@ -8418,12 +8553,12 @@ function WidgetHeader({
|
|
|
8418
8553
|
|
|
8419
8554
|
// src/components/widgets/widget-footer.tsx
|
|
8420
8555
|
import clsx65 from "clsx";
|
|
8421
|
-
import { jsx as jsx85, jsxs as
|
|
8556
|
+
import { jsx as jsx85, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
8422
8557
|
function WidgetFooter({ caption, subcaption, action, className }) {
|
|
8423
|
-
return /* @__PURE__ */
|
|
8424
|
-
caption && /* @__PURE__ */
|
|
8558
|
+
return /* @__PURE__ */ jsxs54("div", { className: clsx65("flex items-center gap-3", className), children: [
|
|
8559
|
+
caption && /* @__PURE__ */ jsxs54("div", { className: "flex items-stretch gap-3 flex-1 min-w-0", children: [
|
|
8425
8560
|
/* @__PURE__ */ jsx85("div", { className: "w-0.5 shrink-0 self-stretch rounded-full bg-brand" }),
|
|
8426
|
-
/* @__PURE__ */
|
|
8561
|
+
/* @__PURE__ */ jsxs54("div", { className: "min-w-0", children: [
|
|
8427
8562
|
/* @__PURE__ */ jsx85("p", { className: "text-body-sm font-medium text-default leading-snug", children: caption }),
|
|
8428
8563
|
subcaption && /* @__PURE__ */ jsx85("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: subcaption })
|
|
8429
8564
|
] })
|
|
@@ -8583,7 +8718,7 @@ function useWidthTier({ frozen = false } = {}) {
|
|
|
8583
8718
|
|
|
8584
8719
|
// src/components/stats/stat-tile.tsx
|
|
8585
8720
|
import clsx67 from "clsx";
|
|
8586
|
-
import { Fragment as
|
|
8721
|
+
import { Fragment as Fragment15, jsx as jsx87, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
8587
8722
|
var DOT_TONE = {
|
|
8588
8723
|
neutral: "bg-status-dot-neutral",
|
|
8589
8724
|
info: "bg-status-dot-info",
|
|
@@ -8607,8 +8742,8 @@ function StatTile({
|
|
|
8607
8742
|
}) {
|
|
8608
8743
|
const showDot = Boolean(tone || dotColor);
|
|
8609
8744
|
const interactive = Boolean(onClick) || asChild;
|
|
8610
|
-
const content = /* @__PURE__ */
|
|
8611
|
-
/* @__PURE__ */
|
|
8745
|
+
const content = /* @__PURE__ */ jsxs55(Fragment15, { children: [
|
|
8746
|
+
/* @__PURE__ */ jsxs55("span", { className: "flex items-center gap-1.5", children: [
|
|
8612
8747
|
showDot && /* @__PURE__ */ jsx87(
|
|
8613
8748
|
"span",
|
|
8614
8749
|
{
|
|
@@ -8646,7 +8781,7 @@ function StatTile({
|
|
|
8646
8781
|
|
|
8647
8782
|
// src/components/stats/stat-number.tsx
|
|
8648
8783
|
import clsx68 from "clsx";
|
|
8649
|
-
import { jsx as jsx88, jsxs as
|
|
8784
|
+
import { jsx as jsx88, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
8650
8785
|
var sizeStyles6 = {
|
|
8651
8786
|
sm: "text-subtitle",
|
|
8652
8787
|
md: "text-subtitle-lg",
|
|
@@ -8657,7 +8792,7 @@ var weightStyles = {
|
|
|
8657
8792
|
bold: "font-bold"
|
|
8658
8793
|
};
|
|
8659
8794
|
function StatNumber({ value, unit, size: size2 = "md", weight = "bold", color, className }) {
|
|
8660
|
-
return /* @__PURE__ */
|
|
8795
|
+
return /* @__PURE__ */ jsxs56(
|
|
8661
8796
|
"p",
|
|
8662
8797
|
{
|
|
8663
8798
|
className: clsx68(sizeStyles6[size2], weightStyles[weight], "leading-none", !color && "text-default", className),
|
|
@@ -8672,7 +8807,7 @@ function StatNumber({ value, unit, size: size2 = "md", weight = "bold", color, c
|
|
|
8672
8807
|
|
|
8673
8808
|
// src/components/stats/score-value.tsx
|
|
8674
8809
|
import clsx69 from "clsx";
|
|
8675
|
-
import { jsx as jsx89, jsxs as
|
|
8810
|
+
import { jsx as jsx89, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
8676
8811
|
var DEFAULT_SCORE_THRESHOLDS = { danger: 80, warning: 65, neutral: 50 };
|
|
8677
8812
|
function getScoreTone(score, {
|
|
8678
8813
|
direction = "higher-is-worse",
|
|
@@ -8716,7 +8851,7 @@ function ScoreValue({
|
|
|
8716
8851
|
}) {
|
|
8717
8852
|
const numeric = typeof value === "number" ? value : Number(value);
|
|
8718
8853
|
const resolved = tone === "auto" ? Number.isFinite(numeric) ? getScoreTone(numeric, { direction, thresholds }) : "default" : tone;
|
|
8719
|
-
return /* @__PURE__ */
|
|
8854
|
+
return /* @__PURE__ */ jsxs57("span", { "data-tone": resolved, className: clsx69("inline-flex items-baseline gap-1", className), children: [
|
|
8720
8855
|
/* @__PURE__ */ jsx89("span", { className: clsx69(SIZE13[size2], WEIGHT[weight], TONE3[resolved]), children: value }),
|
|
8721
8856
|
label && /* @__PURE__ */ jsx89("span", { className: "text-body-xs text-default-secondary whitespace-nowrap", children: label })
|
|
8722
8857
|
] });
|
|
@@ -8776,7 +8911,7 @@ function resolveChartColor(color, tone, index = 0) {
|
|
|
8776
8911
|
|
|
8777
8912
|
// src/components/charts/bar-chart.tsx
|
|
8778
8913
|
import clsx71 from "clsx";
|
|
8779
|
-
import { jsx as jsx91, jsxs as
|
|
8914
|
+
import { jsx as jsx91, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
8780
8915
|
var SIZE14 = {
|
|
8781
8916
|
sm: { band: 14, gap: 6, label: "text-body-tiny" },
|
|
8782
8917
|
md: { band: 20, gap: 8, label: "text-body-xs" },
|
|
@@ -8816,14 +8951,14 @@ function BarChart({
|
|
|
8816
8951
|
value: Math.max(0, s.values[ci] ?? 0),
|
|
8817
8952
|
color: resolveChartColor(s.color, s.tone, si)
|
|
8818
8953
|
}));
|
|
8819
|
-
return /* @__PURE__ */
|
|
8954
|
+
return /* @__PURE__ */ jsxs58(
|
|
8820
8955
|
"div",
|
|
8821
8956
|
{
|
|
8822
8957
|
className: clsx71("flex min-w-0", horizontal ? "flex-col gap-1" : "h-full flex-col justify-end gap-1.5"),
|
|
8823
8958
|
style: horizontal ? void 0 : { width: perCategory },
|
|
8824
8959
|
children: [
|
|
8825
8960
|
showLabels && horizontal && /* @__PURE__ */ jsx91("span", { className: clsx71("truncate text-default-secondary", labelClass2), children: category }),
|
|
8826
|
-
/* @__PURE__ */
|
|
8961
|
+
/* @__PURE__ */ jsxs58(
|
|
8827
8962
|
"div",
|
|
8828
8963
|
{
|
|
8829
8964
|
className: clsx71("flex", horizontal ? "items-center gap-2" : "w-full flex-1 items-end justify-center"),
|
|
@@ -8874,7 +9009,7 @@ function BarChart({
|
|
|
8874
9009
|
|
|
8875
9010
|
// src/components/charts/donut-chart.tsx
|
|
8876
9011
|
import clsx72 from "clsx";
|
|
8877
|
-
import { jsx as jsx92, jsxs as
|
|
9012
|
+
import { jsx as jsx92, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
8878
9013
|
var SIZE15 = {
|
|
8879
9014
|
sm: { box: 88, thickness: 10 },
|
|
8880
9015
|
md: { box: 128, thickness: 14 },
|
|
@@ -8898,8 +9033,8 @@ function DonutChart({
|
|
|
8898
9033
|
const visible = segments.filter((s) => s.value > 0);
|
|
8899
9034
|
const gapLength = visible.length > 1 ? gap / 360 * circumference : 0;
|
|
8900
9035
|
let offset2 = 0;
|
|
8901
|
-
return /* @__PURE__ */
|
|
8902
|
-
/* @__PURE__ */
|
|
9036
|
+
return /* @__PURE__ */ jsxs59("div", { className: clsx72("relative inline-flex shrink-0 items-center justify-center", className), children: [
|
|
9037
|
+
/* @__PURE__ */ jsxs59(
|
|
8903
9038
|
"svg",
|
|
8904
9039
|
{
|
|
8905
9040
|
width: box,
|
|
@@ -8937,7 +9072,7 @@ function DonutChart({
|
|
|
8937
9072
|
]
|
|
8938
9073
|
}
|
|
8939
9074
|
),
|
|
8940
|
-
(centerValue != null || centerLabel != null) && /* @__PURE__ */
|
|
9075
|
+
(centerValue != null || centerLabel != null) && /* @__PURE__ */ jsxs59("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: [
|
|
8941
9076
|
centerValue != null && /* @__PURE__ */ jsx92("span", { className: "text-subheading-sm font-bold leading-none text-default", children: centerValue }),
|
|
8942
9077
|
centerLabel != null && /* @__PURE__ */ jsx92("span", { className: "mt-0.5 text-body-tiny text-default-secondary", children: centerLabel })
|
|
8943
9078
|
] })
|
|
@@ -8946,7 +9081,7 @@ function DonutChart({
|
|
|
8946
9081
|
|
|
8947
9082
|
// src/components/charts/radial-gauge.tsx
|
|
8948
9083
|
import clsx73 from "clsx";
|
|
8949
|
-
import { jsx as jsx93, jsxs as
|
|
9084
|
+
import { jsx as jsx93, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
8950
9085
|
var SIZE16 = {
|
|
8951
9086
|
sm: { box: 72, thickness: 8, value: "text-body-sm" },
|
|
8952
9087
|
md: { box: 104, thickness: 11, value: "text-subheading-sm" },
|
|
@@ -8975,8 +9110,8 @@ function RadialGauge({
|
|
|
8975
9110
|
const fraction = max > 0 ? Math.min(1, Math.max(0, value / max)) : 0;
|
|
8976
9111
|
const stroke = resolveChartColor(color, tone);
|
|
8977
9112
|
const rotation = -90 + (360 - clampedSweep) / 2;
|
|
8978
|
-
return /* @__PURE__ */
|
|
8979
|
-
/* @__PURE__ */
|
|
9113
|
+
return /* @__PURE__ */ jsxs60("div", { className: clsx73("relative inline-flex shrink-0 items-center justify-center", className), children: [
|
|
9114
|
+
/* @__PURE__ */ jsxs60(
|
|
8980
9115
|
"svg",
|
|
8981
9116
|
{
|
|
8982
9117
|
width: box,
|
|
@@ -9018,7 +9153,7 @@ function RadialGauge({
|
|
|
9018
9153
|
]
|
|
9019
9154
|
}
|
|
9020
9155
|
),
|
|
9021
|
-
/* @__PURE__ */
|
|
9156
|
+
/* @__PURE__ */ jsxs60("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: [
|
|
9022
9157
|
children === void 0 ? /* @__PURE__ */ jsx93("span", { className: clsx73("font-bold leading-none text-default", preset.value), children: value }) : children,
|
|
9023
9158
|
centerLabel != null && /* @__PURE__ */ jsx93("span", { className: "mt-0.5 text-body-tiny text-default-secondary", children: centerLabel })
|
|
9024
9159
|
] })
|
|
@@ -9028,7 +9163,7 @@ function RadialGauge({
|
|
|
9028
9163
|
// src/components/charts/sparkline.tsx
|
|
9029
9164
|
import { useId as useId22 } from "react";
|
|
9030
9165
|
import clsx74 from "clsx";
|
|
9031
|
-
import { Fragment as
|
|
9166
|
+
import { Fragment as Fragment16, jsx as jsx94, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
9032
9167
|
var SIZE17 = {
|
|
9033
9168
|
sm: { width: 80, height: 24 },
|
|
9034
9169
|
md: { width: 120, height: 36 },
|
|
@@ -9066,7 +9201,7 @@ function Sparkline({
|
|
|
9066
9201
|
const points = coords.map((p) => `${p.x.toFixed(2)},${p.y.toFixed(2)}`).join(" ");
|
|
9067
9202
|
const areaPath = `M ${points.split(" ").join(" L ")} L ${coords[coords.length - 1].x.toFixed(2)},${h} L ${coords[0].x.toFixed(2)},${h} Z`;
|
|
9068
9203
|
const last = coords[coords.length - 1];
|
|
9069
|
-
return /* @__PURE__ */
|
|
9204
|
+
return /* @__PURE__ */ jsxs61(
|
|
9070
9205
|
"svg",
|
|
9071
9206
|
{
|
|
9072
9207
|
width: stretch ? void 0 : w,
|
|
@@ -9079,8 +9214,8 @@ function Sparkline({
|
|
|
9079
9214
|
"aria-hidden": label ? void 0 : true,
|
|
9080
9215
|
className: clsx74("block", stretch ? "h-full w-full" : "shrink-0", className),
|
|
9081
9216
|
children: [
|
|
9082
|
-
variant === "area" && /* @__PURE__ */
|
|
9083
|
-
/* @__PURE__ */ jsx94("defs", { children: /* @__PURE__ */
|
|
9217
|
+
variant === "area" && /* @__PURE__ */ jsxs61(Fragment16, { children: [
|
|
9218
|
+
/* @__PURE__ */ jsx94("defs", { children: /* @__PURE__ */ jsxs61("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
9084
9219
|
/* @__PURE__ */ jsx94("stop", { offset: "0%", stopColor: stroke, stopOpacity: 0.24 }),
|
|
9085
9220
|
/* @__PURE__ */ jsx94("stop", { offset: "100%", stopColor: stroke, stopOpacity: 0 })
|
|
9086
9221
|
] }) }),
|
|
@@ -9207,7 +9342,7 @@ function LegendDot({ tone, color, size: size2 = "md", shape = "dot", className }
|
|
|
9207
9342
|
}
|
|
9208
9343
|
|
|
9209
9344
|
// src/components/charts/chart-legend.tsx
|
|
9210
|
-
import { jsx as jsx97, jsxs as
|
|
9345
|
+
import { jsx as jsx97, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
9211
9346
|
function ChartLegend({
|
|
9212
9347
|
items,
|
|
9213
9348
|
orientation = "vertical",
|
|
@@ -9223,12 +9358,12 @@ function ChartLegend({
|
|
|
9223
9358
|
horizontal ? "flex flex-wrap items-center gap-x-4 gap-y-2" : "flex flex-col gap-3",
|
|
9224
9359
|
className
|
|
9225
9360
|
),
|
|
9226
|
-
children: items.map((item, i) => /* @__PURE__ */
|
|
9361
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs62(
|
|
9227
9362
|
"div",
|
|
9228
9363
|
{
|
|
9229
9364
|
className: clsx77("flex items-center gap-2", horizontal ? "min-w-0" : "justify-between"),
|
|
9230
9365
|
children: [
|
|
9231
|
-
/* @__PURE__ */
|
|
9366
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
9232
9367
|
/* @__PURE__ */ jsx97(LegendDot, { color: resolveChartColor(item.color, item.tone, i), size: size2, shape }),
|
|
9233
9368
|
/* @__PURE__ */ jsx97("span", { className: "truncate text-body-xs text-default-secondary", children: item.label })
|
|
9234
9369
|
] }),
|
|
@@ -9244,7 +9379,7 @@ function ChartLegend({
|
|
|
9244
9379
|
// src/components/charts/trend-label.tsx
|
|
9245
9380
|
import clsx78 from "clsx";
|
|
9246
9381
|
import { TrendingDownIcon, TrendingUpIcon } from "lucide-react";
|
|
9247
|
-
import { jsx as jsx98, jsxs as
|
|
9382
|
+
import { jsx as jsx98, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
9248
9383
|
var SIZE19 = {
|
|
9249
9384
|
sm: "text-body-xs",
|
|
9250
9385
|
md: "text-body-sm",
|
|
@@ -9278,7 +9413,7 @@ function TrendLabel({
|
|
|
9278
9413
|
const flat = value === 0;
|
|
9279
9414
|
const good = direction === "up-is-good" ? rising : !rising;
|
|
9280
9415
|
const Arrow = rising ? TrendingUpIcon : TrendingDownIcon;
|
|
9281
|
-
return /* @__PURE__ */
|
|
9416
|
+
return /* @__PURE__ */ jsxs63(
|
|
9282
9417
|
"span",
|
|
9283
9418
|
{
|
|
9284
9419
|
className: clsx78(
|
|
@@ -9301,7 +9436,7 @@ function TrendLabel({
|
|
|
9301
9436
|
|
|
9302
9437
|
// src/components/lists/list-row.tsx
|
|
9303
9438
|
import clsx79 from "clsx";
|
|
9304
|
-
import { Fragment as
|
|
9439
|
+
import { Fragment as Fragment17, jsx as jsx99, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
9305
9440
|
var DENSITY = {
|
|
9306
9441
|
default: {
|
|
9307
9442
|
pad: "py-4",
|
|
@@ -9362,10 +9497,10 @@ function ListRow({
|
|
|
9362
9497
|
className
|
|
9363
9498
|
)
|
|
9364
9499
|
};
|
|
9365
|
-
const body = /* @__PURE__ */
|
|
9366
|
-
/* @__PURE__ */
|
|
9367
|
-
hasTitleLine && /* @__PURE__ */
|
|
9368
|
-
/* @__PURE__ */
|
|
9500
|
+
const body = /* @__PURE__ */ jsxs64(Fragment17, { children: [
|
|
9501
|
+
/* @__PURE__ */ jsxs64("div", { className: clsx79("flex min-w-0 flex-1 flex-col", d.gap), children: [
|
|
9502
|
+
hasTitleLine && /* @__PURE__ */ jsxs64("div", { className: "flex items-center justify-between gap-2", children: [
|
|
9503
|
+
/* @__PURE__ */ jsxs64("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
9369
9504
|
leading,
|
|
9370
9505
|
title != null && /* @__PURE__ */ jsx99("span", { className: clsx79("truncate", d.title), children: title }),
|
|
9371
9506
|
titleMeta && /* @__PURE__ */ jsx99("span", { className: "shrink-0", children: titleMeta })
|
|
@@ -9433,7 +9568,8 @@ function refusePress(event) {
|
|
|
9433
9568
|
|
|
9434
9569
|
// src/components/lists/file-row.tsx
|
|
9435
9570
|
import clsx80 from "clsx";
|
|
9436
|
-
import {
|
|
9571
|
+
import { DownloadIcon, Trash2Icon } from "lucide-react";
|
|
9572
|
+
import { jsx as jsx100, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
9437
9573
|
function FileTypeBadge({ type }) {
|
|
9438
9574
|
return /* @__PURE__ */ jsx100("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 });
|
|
9439
9575
|
}
|
|
@@ -9444,11 +9580,13 @@ function FileRow({
|
|
|
9444
9580
|
leading,
|
|
9445
9581
|
onDownload,
|
|
9446
9582
|
downloadLabel = "Download",
|
|
9583
|
+
onRemove,
|
|
9584
|
+
removeLabel = "Remove",
|
|
9447
9585
|
actions,
|
|
9448
9586
|
className
|
|
9449
9587
|
}) {
|
|
9450
9588
|
const lead = leading ?? (fileType ? /* @__PURE__ */ jsx100(FileTypeBadge, { type: fileType }) : null);
|
|
9451
|
-
return /* @__PURE__ */
|
|
9589
|
+
return /* @__PURE__ */ jsxs65(
|
|
9452
9590
|
"div",
|
|
9453
9591
|
{
|
|
9454
9592
|
className: clsx80(
|
|
@@ -9457,21 +9595,14 @@ function FileRow({
|
|
|
9457
9595
|
),
|
|
9458
9596
|
children: [
|
|
9459
9597
|
lead,
|
|
9460
|
-
/* @__PURE__ */
|
|
9598
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
9461
9599
|
/* @__PURE__ */ jsx100("span", { className: "truncate text-body-sm font-medium text-default", children: name }),
|
|
9462
9600
|
detail && /* @__PURE__ */ jsx100("span", { className: "text-body-xs text-default-secondary", children: detail })
|
|
9463
9601
|
] }),
|
|
9464
|
-
(onDownload || actions) && /* @__PURE__ */
|
|
9465
|
-
onDownload && /* @__PURE__ */ jsx100(
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
type: "button",
|
|
9469
|
-
onClick: onDownload,
|
|
9470
|
-
className: "text-body-xs font-medium text-brand hover:underline",
|
|
9471
|
-
children: downloadLabel
|
|
9472
|
-
}
|
|
9473
|
-
),
|
|
9474
|
-
actions
|
|
9602
|
+
(onDownload || onRemove || actions) && /* @__PURE__ */ jsxs65("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
9603
|
+
onDownload && /* @__PURE__ */ jsx100(Tooltip, { title: downloadLabel, children: /* @__PURE__ */ jsx100(IconButton, { variant: "subtle", size: "sm", "aria-label": `${downloadLabel} ${name}`, onClick: onDownload, className: "touch-hit", children: /* @__PURE__ */ jsx100(DownloadIcon, { "aria-hidden": true }) }) }),
|
|
9604
|
+
onRemove && /* @__PURE__ */ jsx100(Tooltip, { title: removeLabel, children: /* @__PURE__ */ jsx100(IconButton, { variant: "subtle", size: "sm", "aria-label": `${removeLabel} ${name}`, onClick: onRemove, className: "touch-hit", children: /* @__PURE__ */ jsx100(Trash2Icon, { "aria-hidden": true }) }) }),
|
|
9605
|
+
actions && /* @__PURE__ */ jsx100("div", { className: "ml-2 flex items-center gap-2", children: actions })
|
|
9475
9606
|
] })
|
|
9476
9607
|
]
|
|
9477
9608
|
}
|
|
@@ -9480,7 +9611,7 @@ function FileRow({
|
|
|
9480
9611
|
|
|
9481
9612
|
// src/components/lists/scored-row.tsx
|
|
9482
9613
|
import clsx81 from "clsx";
|
|
9483
|
-
import { jsx as jsx101, jsxs as
|
|
9614
|
+
import { jsx as jsx101, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
9484
9615
|
var GAP5 = {
|
|
9485
9616
|
sm: "gap-2",
|
|
9486
9617
|
md: "gap-3",
|
|
@@ -9507,8 +9638,8 @@ function ScoredRow({
|
|
|
9507
9638
|
align = "center",
|
|
9508
9639
|
className
|
|
9509
9640
|
}) {
|
|
9510
|
-
return /* @__PURE__ */
|
|
9511
|
-
/* @__PURE__ */
|
|
9641
|
+
return /* @__PURE__ */ jsxs66("div", { className: clsx81("flex w-full", ALIGN2[align], GAP5[gap], className), children: [
|
|
9642
|
+
/* @__PURE__ */ jsxs66(
|
|
9512
9643
|
"div",
|
|
9513
9644
|
{
|
|
9514
9645
|
className: clsx81(
|
|
@@ -9520,7 +9651,7 @@ function ScoredRow({
|
|
|
9520
9651
|
style: titleWidth ? { width: titleWidth } : void 0,
|
|
9521
9652
|
children: [
|
|
9522
9653
|
leading,
|
|
9523
|
-
/* @__PURE__ */
|
|
9654
|
+
/* @__PURE__ */ jsxs66("div", { className: "min-w-0 flex-1", children: [
|
|
9524
9655
|
/* @__PURE__ */ jsx101("p", { className: "truncate text-body-sm font-medium leading-none text-default", children: title }),
|
|
9525
9656
|
subtitle && /* @__PURE__ */ jsx101("p", { className: "mt-0.5 truncate text-body-xs text-default-secondary", children: subtitle })
|
|
9526
9657
|
] })
|
|
@@ -9552,7 +9683,7 @@ import clsx82 from "clsx";
|
|
|
9552
9683
|
|
|
9553
9684
|
// src/components/feedback/progress-bar.tsx
|
|
9554
9685
|
import { useId as useId23 } from "react";
|
|
9555
|
-
import { jsx as jsx102, jsxs as
|
|
9686
|
+
import { jsx as jsx102, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
9556
9687
|
var SIZE20 = {
|
|
9557
9688
|
xs: "h-1",
|
|
9558
9689
|
sm: "h-1.5",
|
|
@@ -9627,10 +9758,10 @@ function ProgressBar({
|
|
|
9627
9758
|
}
|
|
9628
9759
|
);
|
|
9629
9760
|
if (!label && !showValue) return track;
|
|
9630
|
-
return /* @__PURE__ */
|
|
9631
|
-
/* @__PURE__ */
|
|
9761
|
+
return /* @__PURE__ */ jsxs67("div", { children: [
|
|
9762
|
+
/* @__PURE__ */ jsxs67("div", { className: "mb-1.5 flex items-center justify-between gap-2", children: [
|
|
9632
9763
|
label && /* @__PURE__ */ jsx102("span", { id: labelId, className: "text-body-xs text-default-secondary", children: label }),
|
|
9633
|
-
showValue && /* @__PURE__ */
|
|
9764
|
+
showValue && /* @__PURE__ */ jsxs67("span", { className: "ml-auto text-body-xs font-medium tabular-nums text-default", children: [
|
|
9634
9765
|
Math.round(clamped),
|
|
9635
9766
|
"%"
|
|
9636
9767
|
] })
|
|
@@ -9640,7 +9771,7 @@ function ProgressBar({
|
|
|
9640
9771
|
}
|
|
9641
9772
|
|
|
9642
9773
|
// src/components/lists/numbered-list.tsx
|
|
9643
|
-
import { jsx as jsx103, jsxs as
|
|
9774
|
+
import { jsx as jsx103, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
9644
9775
|
var GAP6 = {
|
|
9645
9776
|
sm: "gap-2",
|
|
9646
9777
|
md: "gap-3"
|
|
@@ -9656,11 +9787,11 @@ function NumberedList({
|
|
|
9656
9787
|
}) {
|
|
9657
9788
|
return /* @__PURE__ */ jsx103("ol", { className: clsx82("flex list-none flex-col p-0", GAP6[gap], className), children: items.map((item, index) => {
|
|
9658
9789
|
const tone = !item.tone || item.tone === "auto" ? getScoreTone(item.score, { direction }) : item.tone;
|
|
9659
|
-
return /* @__PURE__ */
|
|
9660
|
-
/* @__PURE__ */
|
|
9661
|
-
/* @__PURE__ */
|
|
9790
|
+
return /* @__PURE__ */ jsxs68("li", { className: "flex w-full shrink-0 flex-col gap-1.5", children: [
|
|
9791
|
+
/* @__PURE__ */ jsxs68("div", { className: "flex w-full items-center justify-between", children: [
|
|
9792
|
+
/* @__PURE__ */ jsxs68("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
9662
9793
|
/* @__PURE__ */ jsx103("span", { className: "w-[14px] shrink-0 text-body-xs font-bold text-default-secondary", children: startAt + index }),
|
|
9663
|
-
/* @__PURE__ */
|
|
9794
|
+
/* @__PURE__ */ jsxs68("div", { className: "flex min-w-0 flex-col gap-px", children: [
|
|
9664
9795
|
/* @__PURE__ */ jsx103("span", { className: "truncate text-body-sm font-medium leading-none text-default", children: item.title }),
|
|
9665
9796
|
item.subtitle && /* @__PURE__ */ jsx103("span", { className: "text-body-tiny text-default-tertiary", children: item.subtitle })
|
|
9666
9797
|
] })
|
|
@@ -9683,11 +9814,11 @@ function NumberedList({
|
|
|
9683
9814
|
|
|
9684
9815
|
// src/components/lists/icon-text-row.tsx
|
|
9685
9816
|
import clsx83 from "clsx";
|
|
9686
|
-
import { jsx as jsx104, jsxs as
|
|
9817
|
+
import { jsx as jsx104, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
9687
9818
|
function IconTextRow({ icon, title, detail, className }) {
|
|
9688
|
-
return /* @__PURE__ */
|
|
9819
|
+
return /* @__PURE__ */ jsxs69("div", { className: clsx83("flex items-start gap-3", className), children: [
|
|
9689
9820
|
/* @__PURE__ */ jsx104("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-full bg-brand-tertiary text-brand", children: icon }),
|
|
9690
|
-
/* @__PURE__ */
|
|
9821
|
+
/* @__PURE__ */ jsxs69("div", { className: "min-w-0", children: [
|
|
9691
9822
|
/* @__PURE__ */ jsx104("p", { className: "text-body-sm font-semibold text-default", children: title }),
|
|
9692
9823
|
/* @__PURE__ */ jsx104("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: detail })
|
|
9693
9824
|
] })
|
|
@@ -9697,9 +9828,9 @@ function IconTextRow({ icon, title, detail, className }) {
|
|
|
9697
9828
|
// src/components/lists/checklist-row.tsx
|
|
9698
9829
|
import clsx84 from "clsx";
|
|
9699
9830
|
import { CheckIcon as CheckIcon8 } from "lucide-react";
|
|
9700
|
-
import { jsx as jsx105, jsxs as
|
|
9831
|
+
import { jsx as jsx105, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
9701
9832
|
function ChecklistRow({ label, state, className }) {
|
|
9702
|
-
return /* @__PURE__ */
|
|
9833
|
+
return /* @__PURE__ */ jsxs70("li", { "data-state": state, className: clsx84("flex items-center gap-3", className), children: [
|
|
9703
9834
|
/* @__PURE__ */ jsx105("span", { className: "flex size-5 shrink-0 items-center justify-center", children: state === "done" ? /* @__PURE__ */ jsx105(CheckIcon8, { className: "size-4 text-positive", strokeWidth: 2.5, "aria-hidden": true }) : /* @__PURE__ */ jsx105(
|
|
9704
9835
|
"span",
|
|
9705
9836
|
{
|
|
@@ -9724,12 +9855,12 @@ function ChecklistRow({ label, state, className }) {
|
|
|
9724
9855
|
|
|
9725
9856
|
// src/components/lists/steps-list.tsx
|
|
9726
9857
|
import clsx85 from "clsx";
|
|
9727
|
-
import { jsx as jsx106, jsxs as
|
|
9858
|
+
import { jsx as jsx106, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
9728
9859
|
function StepsList({ steps, className }) {
|
|
9729
9860
|
return /* @__PURE__ */ jsx106("ol", { className: clsx85("flex flex-col gap-1.5", className), children: steps.map((step, i) => (
|
|
9730
9861
|
// `text-[12px]` was off the type scale; 12 sits midway between Scale 01 (11) and
|
|
9731
9862
|
// Scale 02 (13), so it rounds up to 13 like every other snap in this pass.
|
|
9732
|
-
/* @__PURE__ */
|
|
9863
|
+
/* @__PURE__ */ jsxs71("li", { className: "flex items-start gap-2 text-body-xs text-default", children: [
|
|
9733
9864
|
/* @__PURE__ */ jsx106("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 }),
|
|
9734
9865
|
step
|
|
9735
9866
|
] }, i)
|
|
@@ -9738,7 +9869,7 @@ function StepsList({ steps, className }) {
|
|
|
9738
9869
|
|
|
9739
9870
|
// src/components/lists/detail-item.tsx
|
|
9740
9871
|
import clsx86 from "clsx";
|
|
9741
|
-
import { jsx as jsx107, jsxs as
|
|
9872
|
+
import { jsx as jsx107, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
9742
9873
|
var SPAN = {
|
|
9743
9874
|
1: "",
|
|
9744
9875
|
2: "sm:col-span-2",
|
|
@@ -9755,15 +9886,15 @@ function DetailItem({
|
|
|
9755
9886
|
}) {
|
|
9756
9887
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
9757
9888
|
if (layout === "inline") {
|
|
9758
|
-
return /* @__PURE__ */
|
|
9889
|
+
return /* @__PURE__ */ jsxs72("div", { className: clsx86("flex gap-3 text-body-xs", SPAN[span], className), children: [
|
|
9759
9890
|
/* @__PURE__ */ jsx107("span", { className: clsx86("shrink-0 text-default-secondary", labelWidth), children: label }),
|
|
9760
|
-
/* @__PURE__ */
|
|
9891
|
+
/* @__PURE__ */ jsxs72("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
9761
9892
|
/* @__PURE__ */ jsx107("span", { className: "text-default", children: shown }),
|
|
9762
9893
|
detail && /* @__PURE__ */ jsx107("span", { className: "text-default-secondary", children: detail })
|
|
9763
9894
|
] })
|
|
9764
9895
|
] });
|
|
9765
9896
|
}
|
|
9766
|
-
return /* @__PURE__ */
|
|
9897
|
+
return /* @__PURE__ */ jsxs72("div", { className: clsx86("flex min-w-0 flex-col gap-0.5", SPAN[span], className), children: [
|
|
9767
9898
|
/* @__PURE__ */ jsx107("p", { className: "text-body-tiny font-medium text-default-secondary", children: label }),
|
|
9768
9899
|
/* @__PURE__ */ jsx107("p", { className: "text-body-sm font-medium text-default", children: shown }),
|
|
9769
9900
|
detail && /* @__PURE__ */ jsx107("p", { className: "text-body-xs text-default-secondary", children: detail })
|
|
@@ -9784,15 +9915,15 @@ function DetailGrid({ children, columns = "auto", className }) {
|
|
|
9784
9915
|
import { useEffect as useEffect17, useState as useState23 } from "react";
|
|
9785
9916
|
import clsx87 from "clsx";
|
|
9786
9917
|
import { CheckIcon as CheckIcon9, CopyIcon } from "lucide-react";
|
|
9787
|
-
import {
|
|
9918
|
+
import { jsx as jsx108, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
9788
9919
|
function DescriptionList({ children, className }) {
|
|
9789
9920
|
return /* @__PURE__ */ jsx108("dl", { className: cn("flex flex-col gap-3", className), children });
|
|
9790
9921
|
}
|
|
9791
9922
|
function DescriptionItem({ label, value, copyValue, className }) {
|
|
9792
9923
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
9793
|
-
return /* @__PURE__ */
|
|
9924
|
+
return /* @__PURE__ */ jsxs73("div", { className: cn("flex flex-wrap items-start gap-x-4 gap-y-0.5 text-body-xs", className), children: [
|
|
9794
9925
|
/* @__PURE__ */ jsx108("dt", { className: "shrink-0 grow-0 basis-28 text-default-secondary", children: label }),
|
|
9795
|
-
/* @__PURE__ */
|
|
9926
|
+
/* @__PURE__ */ jsxs73("dd", { className: "flex min-w-0 flex-[1_1_10rem] items-start gap-1.5 text-default", children: [
|
|
9796
9927
|
/* @__PURE__ */ jsx108("span", { className: "min-w-0 [overflow-wrap:anywhere]", children: shown }),
|
|
9797
9928
|
copyValue && /* @__PURE__ */ jsx108(CopyButton, { value: copyValue, label: `Copy ${label.toLowerCase()}` })
|
|
9798
9929
|
] })
|
|
@@ -9805,32 +9936,35 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
9805
9936
|
const timer = window.setTimeout(() => setCopied(false), 2e3);
|
|
9806
9937
|
return () => window.clearTimeout(timer);
|
|
9807
9938
|
}, [copied]);
|
|
9808
|
-
return
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
()
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9939
|
+
return (
|
|
9940
|
+
// relative: keeps the sr-only status (absolutely positioned) inside a scrolling container.
|
|
9941
|
+
/* @__PURE__ */ jsxs73("span", { className: "relative inline-flex", children: [
|
|
9942
|
+
/* @__PURE__ */ jsx108(
|
|
9943
|
+
IconButton,
|
|
9944
|
+
{
|
|
9945
|
+
variant: "subtle",
|
|
9946
|
+
size: "sm",
|
|
9947
|
+
"aria-label": label,
|
|
9948
|
+
"data-state": copied ? "copied" : void 0,
|
|
9949
|
+
className: cn("-my-0.5 touch-hit", className),
|
|
9950
|
+
onClick: () => {
|
|
9951
|
+
void navigator.clipboard?.writeText(value).then(
|
|
9952
|
+
() => setCopied(true),
|
|
9953
|
+
() => void 0
|
|
9954
|
+
);
|
|
9955
|
+
},
|
|
9956
|
+
children: copied ? /* @__PURE__ */ jsx108(CheckIcon9, { "aria-hidden": true }) : /* @__PURE__ */ jsx108(CopyIcon, { "aria-hidden": true })
|
|
9957
|
+
}
|
|
9958
|
+
),
|
|
9959
|
+
/* @__PURE__ */ jsx108("span", { role: "status", className: "sr-only", children: copied ? copiedLabel : "" })
|
|
9960
|
+
] })
|
|
9961
|
+
);
|
|
9828
9962
|
}
|
|
9829
9963
|
function EmailText({ email, className }) {
|
|
9830
9964
|
const at = email.lastIndexOf("@");
|
|
9831
9965
|
const local = at > 0 ? email.slice(0, at) : email;
|
|
9832
9966
|
const domain = at > 0 ? email.slice(at) : "";
|
|
9833
|
-
return /* @__PURE__ */
|
|
9967
|
+
return /* @__PURE__ */ jsxs73("span", { title: email, className: clsx87("flex min-w-0 max-w-full", className), children: [
|
|
9834
9968
|
/* @__PURE__ */ jsx108("span", { className: "min-w-0 truncate", children: local }),
|
|
9835
9969
|
domain && /* @__PURE__ */ jsx108("span", { className: "min-w-0 truncate [flex-shrink:0.001]", children: domain })
|
|
9836
9970
|
] });
|
|
@@ -9839,7 +9973,7 @@ function EmailText({ email, className }) {
|
|
|
9839
9973
|
// src/components/lists/checked-group-list.tsx
|
|
9840
9974
|
import clsx88 from "clsx";
|
|
9841
9975
|
import { CheckIcon as CheckIcon10 } from "lucide-react";
|
|
9842
|
-
import { jsx as jsx109, jsxs as
|
|
9976
|
+
import { jsx as jsx109, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
9843
9977
|
var COLUMNS4 = {
|
|
9844
9978
|
1: "columns-1",
|
|
9845
9979
|
2: "columns-2",
|
|
@@ -9856,9 +9990,9 @@ function CheckedGroupList({
|
|
|
9856
9990
|
return /* @__PURE__ */ jsx109("p", { className: clsx88("text-body-xs text-default-secondary", className), children: emptyLabel });
|
|
9857
9991
|
}
|
|
9858
9992
|
const glyph = icon === void 0 ? /* @__PURE__ */ jsx109(CheckIcon10, { className: "size-3.5", strokeWidth: 2.5, "aria-hidden": true }) : icon;
|
|
9859
|
-
return /* @__PURE__ */ jsx109("div", { className: clsx88(COLUMNS4[columns], "gap-x-6", className), children: groups.map((group) => /* @__PURE__ */
|
|
9993
|
+
return /* @__PURE__ */ jsx109("div", { className: clsx88(COLUMNS4[columns], "gap-x-6", className), children: groups.map((group) => /* @__PURE__ */ jsxs74("div", { className: "mb-5 break-inside-avoid last:mb-0", children: [
|
|
9860
9994
|
/* @__PURE__ */ jsx109("p", { className: "mb-2 text-body-tiny font-semibold uppercase tracking-wide text-default-secondary", children: group.label }),
|
|
9861
|
-
/* @__PURE__ */ jsx109("ul", { className: "space-y-1.5", children: group.items.map((item) => /* @__PURE__ */
|
|
9995
|
+
/* @__PURE__ */ jsx109("ul", { className: "space-y-1.5", children: group.items.map((item) => /* @__PURE__ */ jsxs74("li", { className: "flex items-center gap-2 text-body-xs text-default", children: [
|
|
9862
9996
|
glyph && /* @__PURE__ */ jsx109("span", { className: "shrink-0", children: glyph }),
|
|
9863
9997
|
item
|
|
9864
9998
|
] }, item)) })
|
|
@@ -9869,7 +10003,7 @@ function CheckedGroupList({
|
|
|
9869
10003
|
import { useMemo as useMemo12, useRef as useRef21, useState as useState24 } from "react";
|
|
9870
10004
|
import clsx89 from "clsx";
|
|
9871
10005
|
import { ChevronRightIcon as ChevronRightIcon7 } from "lucide-react";
|
|
9872
|
-
import { jsx as jsx110, jsxs as
|
|
10006
|
+
import { jsx as jsx110, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
9873
10007
|
var ROW = {
|
|
9874
10008
|
sm: "min-h-8 py-1 text-body-xs",
|
|
9875
10009
|
md: "min-h-10 py-2 text-body-sm"
|
|
@@ -9973,7 +10107,7 @@ function TreeView({
|
|
|
9973
10107
|
if (!node) return null;
|
|
9974
10108
|
const children = getChildren?.(item) ?? [];
|
|
9975
10109
|
const isSelected = selected === id;
|
|
9976
|
-
return /* @__PURE__ */
|
|
10110
|
+
return /* @__PURE__ */ jsxs75(
|
|
9977
10111
|
"li",
|
|
9978
10112
|
{
|
|
9979
10113
|
role: "treeitem",
|
|
@@ -9995,7 +10129,7 @@ function TreeView({
|
|
|
9995
10129
|
},
|
|
9996
10130
|
className: "outline-none [&:focus-visible>div]:ring-2 [&:focus-visible>div]:ring-inset [&:focus-visible>div]:ring-brand",
|
|
9997
10131
|
children: [
|
|
9998
|
-
/* @__PURE__ */
|
|
10132
|
+
/* @__PURE__ */ jsxs75(
|
|
9999
10133
|
"div",
|
|
10000
10134
|
{
|
|
10001
10135
|
onClick: () => {
|
|
@@ -10050,7 +10184,7 @@ function TreeView({
|
|
|
10050
10184
|
import { forwardRef as forwardRef40 } from "react";
|
|
10051
10185
|
import clsx90 from "clsx";
|
|
10052
10186
|
import { ChevronDownIcon as ChevronDownIcon4, ChevronsUpDownIcon, ChevronUpIcon } from "lucide-react";
|
|
10053
|
-
import { jsx as jsx111, jsxs as
|
|
10187
|
+
import { jsx as jsx111, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
10054
10188
|
var Table = forwardRef40(function Table2({ label, density = "default", fixed = false, maxHeight, className, children, ...rest }, ref) {
|
|
10055
10189
|
return (
|
|
10056
10190
|
// The scroll container is separate from the table so the header stays inside the
|
|
@@ -10162,7 +10296,7 @@ var TableHead = forwardRef40(function TableHead2({ sort, onSort, align = "left",
|
|
|
10162
10296
|
className
|
|
10163
10297
|
),
|
|
10164
10298
|
...rest,
|
|
10165
|
-
children: sortable ? /* @__PURE__ */
|
|
10299
|
+
children: sortable ? /* @__PURE__ */ jsxs76(
|
|
10166
10300
|
"button",
|
|
10167
10301
|
{
|
|
10168
10302
|
type: "button",
|
|
@@ -10244,7 +10378,7 @@ function useElementWidth() {
|
|
|
10244
10378
|
|
|
10245
10379
|
// src/components/feedback/empty-state.tsx
|
|
10246
10380
|
import clsx91 from "clsx";
|
|
10247
|
-
import { jsx as jsx112, jsxs as
|
|
10381
|
+
import { jsx as jsx112, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
10248
10382
|
var SIZES = {
|
|
10249
10383
|
sm: "py-8",
|
|
10250
10384
|
md: "py-12",
|
|
@@ -10263,7 +10397,7 @@ function EmptyState({
|
|
|
10263
10397
|
action,
|
|
10264
10398
|
className
|
|
10265
10399
|
}) {
|
|
10266
|
-
return /* @__PURE__ */
|
|
10400
|
+
return /* @__PURE__ */ jsxs77(
|
|
10267
10401
|
"div",
|
|
10268
10402
|
{
|
|
10269
10403
|
"data-variant": variant,
|
|
@@ -10350,7 +10484,7 @@ function cardSlots(columns) {
|
|
|
10350
10484
|
|
|
10351
10485
|
// src/components/lists/data-table-parts.tsx
|
|
10352
10486
|
import { ChevronDownIcon as ChevronDownIcon5, ChevronUpIcon as ChevronUpIcon2, ChevronsUpDownIcon as ChevronsUpDownIcon2, Columns3Icon } from "lucide-react";
|
|
10353
|
-
import { jsx as jsx114, jsxs as
|
|
10487
|
+
import { jsx as jsx114, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
10354
10488
|
var SELECT_COLUMN_ID = "select";
|
|
10355
10489
|
function columnLabel(column) {
|
|
10356
10490
|
const meta = column.columnDef.meta;
|
|
@@ -10370,7 +10504,7 @@ function DataTableColumnHeader({
|
|
|
10370
10504
|
}
|
|
10371
10505
|
const sorted = column.getIsSorted();
|
|
10372
10506
|
const Icon = sorted === "asc" ? ChevronUpIcon2 : sorted === "desc" ? ChevronDownIcon5 : ChevronsUpDownIcon2;
|
|
10373
|
-
return /* @__PURE__ */
|
|
10507
|
+
return /* @__PURE__ */ jsxs78(
|
|
10374
10508
|
"button",
|
|
10375
10509
|
{
|
|
10376
10510
|
type: "button",
|
|
@@ -10428,9 +10562,9 @@ function createSelectColumn(options = {}) {
|
|
|
10428
10562
|
function DataTableViewOptions({ table, label = "Columns" }) {
|
|
10429
10563
|
const columns = table.getAllLeafColumns().filter((column) => column.getCanHide());
|
|
10430
10564
|
if (columns.length === 0) return null;
|
|
10431
|
-
return /* @__PURE__ */
|
|
10565
|
+
return /* @__PURE__ */ jsxs78(DropdownMenu, { children: [
|
|
10432
10566
|
/* @__PURE__ */ jsx114(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx114(Button, { variant: "neutral", size: "md", leadingIcon: /* @__PURE__ */ jsx114(Columns3Icon, { "aria-hidden": true }), children: label }) }),
|
|
10433
|
-
/* @__PURE__ */
|
|
10567
|
+
/* @__PURE__ */ jsxs78(DropdownMenuContent, { align: "end", children: [
|
|
10434
10568
|
/* @__PURE__ */ jsx114(DropdownMenuLabel, { children: "Show columns" }),
|
|
10435
10569
|
columns.map((column) => /* @__PURE__ */ jsx114(
|
|
10436
10570
|
DropdownMenuCheckboxItem,
|
|
@@ -10467,9 +10601,9 @@ function DataTablePagination({
|
|
|
10467
10601
|
|
|
10468
10602
|
// src/components/lists/data-table-cells.tsx
|
|
10469
10603
|
import clsx93 from "clsx";
|
|
10470
|
-
import { jsx as jsx115, jsxs as
|
|
10604
|
+
import { jsx as jsx115, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
10471
10605
|
function TableCellLeadText({ primary, secondary, size: size2 = "md", className }) {
|
|
10472
|
-
return /* @__PURE__ */
|
|
10606
|
+
return /* @__PURE__ */ jsxs79("div", { className: clsx93("flex flex-col gap-0.5", className), children: [
|
|
10473
10607
|
/* @__PURE__ */ jsx115(
|
|
10474
10608
|
"span",
|
|
10475
10609
|
{
|
|
@@ -10532,7 +10666,7 @@ function TableCellProgress({
|
|
|
10532
10666
|
className
|
|
10533
10667
|
}) {
|
|
10534
10668
|
const clamped = Math.min(100, Math.max(0, percent));
|
|
10535
|
-
return /* @__PURE__ */
|
|
10669
|
+
return /* @__PURE__ */ jsxs79("div", { className: clsx93("flex w-full min-w-0 items-center gap-2", className), children: [
|
|
10536
10670
|
/* @__PURE__ */ jsx115(
|
|
10537
10671
|
ProgressBar,
|
|
10538
10672
|
{
|
|
@@ -10543,7 +10677,7 @@ function TableCellProgress({
|
|
|
10543
10677
|
"aria-label": `${clamped}%`
|
|
10544
10678
|
}
|
|
10545
10679
|
),
|
|
10546
|
-
/* @__PURE__ */
|
|
10680
|
+
/* @__PURE__ */ jsxs79("span", { className: "shrink-0 text-body-tiny leading-none tabular-nums text-default-secondary", children: [
|
|
10547
10681
|
percent,
|
|
10548
10682
|
"%"
|
|
10549
10683
|
] })
|
|
@@ -10551,7 +10685,7 @@ function TableCellProgress({
|
|
|
10551
10685
|
}
|
|
10552
10686
|
|
|
10553
10687
|
// src/components/lists/data-table.tsx
|
|
10554
|
-
import { jsx as jsx116, jsxs as
|
|
10688
|
+
import { jsx as jsx116, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
10555
10689
|
var DENSITY2 = {
|
|
10556
10690
|
default: {
|
|
10557
10691
|
headerCell: "px-4 py-3",
|
|
@@ -10815,8 +10949,8 @@ function DataTable({
|
|
|
10815
10949
|
getRowLabel,
|
|
10816
10950
|
maxHeight
|
|
10817
10951
|
};
|
|
10818
|
-
return /* @__PURE__ */
|
|
10819
|
-
showToolbar && /* @__PURE__ */
|
|
10952
|
+
return /* @__PURE__ */ jsxs80("div", { "data-slot": "data-table", className: cn("relative flex flex-col gap-3", className), children: [
|
|
10953
|
+
showToolbar && /* @__PURE__ */ jsxs80("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
10820
10954
|
search && /* @__PURE__ */ jsx116(
|
|
10821
10955
|
SearchInput,
|
|
10822
10956
|
{
|
|
@@ -10833,7 +10967,7 @@ function DataTable({
|
|
|
10833
10967
|
showColumnMenu && /* @__PURE__ */ jsx116("div", { className: "ml-auto", children: /* @__PURE__ */ jsx116(DataTableViewOptions, { table }) })
|
|
10834
10968
|
] }),
|
|
10835
10969
|
/* @__PURE__ */ jsx116("p", { role: "status", "aria-live": "polite", className: "sr-only", children: filtering && !loading ? `${resultCount} ${resultCount === 1 ? "result" : "results"}` : "" }),
|
|
10836
|
-
/* @__PURE__ */
|
|
10970
|
+
/* @__PURE__ */ jsxs80("div", { ref: wrapRef, className: "overflow-hidden rounded-xl border border-default bg-default", children: [
|
|
10837
10971
|
mode === "cards" ? maxHeight ? /* @__PURE__ */ jsx116(CardScroll, { label, maxHeight, children: /* @__PURE__ */ jsx116(CardList, { ...view }) }) : /* @__PURE__ */ jsx116(CardList, { ...view }) : /* @__PURE__ */ jsx116(TableView, { ...view }),
|
|
10838
10972
|
showPager && /* @__PURE__ */ jsx116("div", { className: "border-t border-default px-4 py-3", children: /* @__PURE__ */ jsx116(DataTablePagination, { table, pageSizeOptions }) }),
|
|
10839
10973
|
footer && /* @__PURE__ */ jsx116("div", { className: "border-t border-default px-4 py-3", children: footer })
|
|
@@ -10890,7 +11024,7 @@ function TableView({
|
|
|
10890
11024
|
const direction = scroll.overflowing && maxHeight && scroll.overflowingY ? "scrolls" : scroll.overflowing ? "scrolls horizontally" : "scrolls vertically";
|
|
10891
11025
|
const regionLabel = `${label ?? "Table"} (${direction})`;
|
|
10892
11026
|
const pinnedHeader = maxHeight ? clsx94("sticky top-0 z-sticky bg-default-secondary", !scroll.atTop && "shadow-[inset_0_-1px_0_var(--color-border-default-default)]") : void 0;
|
|
10893
|
-
return /* @__PURE__ */
|
|
11027
|
+
return /* @__PURE__ */ jsxs80("div", { className: "relative", children: [
|
|
10894
11028
|
/* @__PURE__ */ jsx116(
|
|
10895
11029
|
"div",
|
|
10896
11030
|
{
|
|
@@ -10903,7 +11037,7 @@ function TableView({
|
|
|
10903
11037
|
),
|
|
10904
11038
|
style: maxHeight ? { maxHeight } : void 0,
|
|
10905
11039
|
...scrolls ? { role: "region", tabIndex: 0, "aria-label": regionLabel } : {},
|
|
10906
|
-
children: /* @__PURE__ */
|
|
11040
|
+
children: /* @__PURE__ */ jsxs80(
|
|
10907
11041
|
"table",
|
|
10908
11042
|
{
|
|
10909
11043
|
className: "w-full table-fixed border-collapse text-left",
|
|
@@ -11088,7 +11222,7 @@ function CardList({
|
|
|
11088
11222
|
}) {
|
|
11089
11223
|
if (placeholder) return /* @__PURE__ */ jsx116("div", { className: "px-4", children: placeholder });
|
|
11090
11224
|
if (loading) {
|
|
11091
|
-
return /* @__PURE__ */ jsx116("ul", { "aria-label": label, "aria-busy": "true", className: "divide-y divide-default", children: Array.from({ length: loadingRows }, (_, index) => /* @__PURE__ */
|
|
11225
|
+
return /* @__PURE__ */ jsx116("ul", { "aria-label": label, "aria-busy": "true", className: "divide-y divide-default", children: Array.from({ length: loadingRows }, (_, index) => /* @__PURE__ */ jsxs80("li", { className: "flex flex-col gap-3 p-4", children: [
|
|
11092
11226
|
/* @__PURE__ */ jsx116(Skeleton, { className: "w-2/3" }),
|
|
11093
11227
|
/* @__PURE__ */ jsx116(Skeleton, { className: "w-1/2" }),
|
|
11094
11228
|
/* @__PURE__ */ jsx116(Skeleton, { className: "w-5/6" })
|
|
@@ -11121,7 +11255,7 @@ function CardList({
|
|
|
11121
11255
|
const href = getRowHref?.(row.original);
|
|
11122
11256
|
const titleContent = render(slots.title?.id);
|
|
11123
11257
|
const tone = getRowTone?.(row.original);
|
|
11124
|
-
return /* @__PURE__ */
|
|
11258
|
+
return /* @__PURE__ */ jsxs80(
|
|
11125
11259
|
"li",
|
|
11126
11260
|
{
|
|
11127
11261
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
@@ -11136,7 +11270,7 @@ function CardList({
|
|
|
11136
11270
|
"data-[state=selected]:bg-brand-tertiary"
|
|
11137
11271
|
),
|
|
11138
11272
|
children: [
|
|
11139
|
-
/* @__PURE__ */
|
|
11273
|
+
/* @__PURE__ */ jsxs80("div", { className: "flex items-start gap-3", children: [
|
|
11140
11274
|
selectable && /* @__PURE__ */ jsx116("div", { className: "relative z-raised shrink-0 pt-0.5", children: render(SELECT_COLUMN_ID) }),
|
|
11141
11275
|
/* @__PURE__ */ jsx116("div", { className: "min-w-0 flex-1", children: href ? renderRowLink({ href, [ROW_LINK_ATTR]: "", className: trigger, children: titleContent }) : onRowClick ? /* @__PURE__ */ jsx116(
|
|
11142
11276
|
"button",
|
|
@@ -11153,7 +11287,7 @@ function CardList({
|
|
|
11153
11287
|
/* @__PURE__ */ jsx116("div", { className: "flex max-w-[45%] shrink-0 justify-end [&_.whitespace-nowrap]:whitespace-normal", children: render(slots.status.id) }),
|
|
11154
11288
|
slots.actions && /* @__PURE__ */ jsx116("div", { className: "relative z-raised shrink-0", children: /* @__PURE__ */ jsx116(CellInteractionGuard, { children: render(slots.actions.id) }) })
|
|
11155
11289
|
] }),
|
|
11156
|
-
slots.fields.length > 0 && /* @__PURE__ */ jsx116("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__ */
|
|
11290
|
+
slots.fields.length > 0 && /* @__PURE__ */ jsx116("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__ */ jsxs80("div", { className: clsx94("min-w-0", column.columnDef.meta?.interactive && "relative z-raised"), children: [
|
|
11157
11291
|
/* @__PURE__ */ jsx116("dt", { className: "text-body-tiny text-default-secondary", children: columnLabel(column) }),
|
|
11158
11292
|
/* @__PURE__ */ jsx116("dd", { className: "mt-0.5 min-w-0 text-body-xs text-default", children: column.columnDef.meta?.interactive ? /* @__PURE__ */ jsx116(CellInteractionGuard, { children: render(id) }) : render(id) })
|
|
11159
11293
|
] }, id)) })
|
|
@@ -11173,7 +11307,7 @@ import { createColumnHelper } from "@tanstack/react-table";
|
|
|
11173
11307
|
// src/components/feedback/inline-alert.tsx
|
|
11174
11308
|
import clsx95 from "clsx";
|
|
11175
11309
|
import { CircleCheckBigIcon as CircleCheckBigIcon2, InfoIcon as InfoIcon2, TriangleAlertIcon as TriangleAlertIcon2 } from "lucide-react";
|
|
11176
|
-
import { jsx as jsx117, jsxs as
|
|
11310
|
+
import { jsx as jsx117, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
11177
11311
|
var toneStyles3 = {
|
|
11178
11312
|
info: "border-brand-tertiary bg-brand-tertiary text-brand",
|
|
11179
11313
|
warning: "border-warning-tertiary bg-warning-tertiary text-warning",
|
|
@@ -11188,7 +11322,7 @@ var toneIcons = {
|
|
|
11188
11322
|
};
|
|
11189
11323
|
function InlineAlert({ tone, children, icon, className }) {
|
|
11190
11324
|
const glyph = icon === void 0 ? toneIcons[tone] : icon;
|
|
11191
|
-
return /* @__PURE__ */
|
|
11325
|
+
return /* @__PURE__ */ jsxs81(
|
|
11192
11326
|
"div",
|
|
11193
11327
|
{
|
|
11194
11328
|
"data-tone": tone,
|
|
@@ -11244,7 +11378,7 @@ var ErrorBoundary = class extends Component {
|
|
|
11244
11378
|
import { forwardRef as forwardRef42, useId as useId24 } from "react";
|
|
11245
11379
|
import clsx96 from "clsx";
|
|
11246
11380
|
import { CircleCheckBigIcon as CircleCheckBigIcon3, InfoIcon as InfoIcon3, TriangleAlertIcon as TriangleAlertIcon3, XIcon as XIcon7 } from "lucide-react";
|
|
11247
|
-
import { jsx as jsx119, jsxs as
|
|
11381
|
+
import { jsx as jsx119, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
11248
11382
|
var TONE_STYLES3 = {
|
|
11249
11383
|
info: "border-brand-tertiary bg-brand-tertiary text-default",
|
|
11250
11384
|
positive: "border-positive-tertiary bg-positive-tertiary text-default",
|
|
@@ -11276,7 +11410,7 @@ var Banner = forwardRef42(function Banner2({
|
|
|
11276
11410
|
}, ref) {
|
|
11277
11411
|
const titleId = useId24();
|
|
11278
11412
|
const glyph = icon === void 0 ? TONE_ICON2[tone] : icon;
|
|
11279
|
-
return /* @__PURE__ */
|
|
11413
|
+
return /* @__PURE__ */ jsxs82(
|
|
11280
11414
|
"div",
|
|
11281
11415
|
{
|
|
11282
11416
|
"data-tone": tone,
|
|
@@ -11293,7 +11427,7 @@ var Banner = forwardRef42(function Banner2({
|
|
|
11293
11427
|
...rest,
|
|
11294
11428
|
children: [
|
|
11295
11429
|
glyph && /* @__PURE__ */ jsx119("span", { "aria-hidden": true, className: clsx96("mt-px shrink-0", TONE_ICON_COLOR[tone]), children: glyph }),
|
|
11296
|
-
/* @__PURE__ */
|
|
11430
|
+
/* @__PURE__ */ jsxs82("div", { className: "min-w-0 flex-1", children: [
|
|
11297
11431
|
/* @__PURE__ */ jsx119("p", { id: titleId, className: "text-body-sm font-semibold text-default", children: title }),
|
|
11298
11432
|
children && /* @__PURE__ */ jsx119("div", { className: "mt-1 text-body-xs text-default-secondary", children }),
|
|
11299
11433
|
action && /* @__PURE__ */ jsx119("div", { className: "mt-3 flex items-center gap-2", children: action })
|
|
@@ -11326,7 +11460,7 @@ import {
|
|
|
11326
11460
|
} from "react";
|
|
11327
11461
|
import clsx97 from "clsx";
|
|
11328
11462
|
import { CircleCheckBigIcon as CircleCheckBigIcon4, InfoIcon as InfoIcon4, TriangleAlertIcon as TriangleAlertIcon4, XIcon as XIcon8 } from "lucide-react";
|
|
11329
|
-
import { jsx as jsx120, jsxs as
|
|
11463
|
+
import { jsx as jsx120, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
11330
11464
|
var ToastContext = createContext18(null);
|
|
11331
11465
|
function useToast() {
|
|
11332
11466
|
const context = useContext18(ToastContext);
|
|
@@ -11399,7 +11533,7 @@ function Toaster({
|
|
|
11399
11533
|
};
|
|
11400
11534
|
}, []);
|
|
11401
11535
|
const context = useMemo14(() => ({ toast, dismiss, dismissAll }), [toast, dismiss, dismissAll]);
|
|
11402
|
-
return /* @__PURE__ */
|
|
11536
|
+
return /* @__PURE__ */ jsxs83(ToastContext.Provider, { value: context, children: [
|
|
11403
11537
|
children,
|
|
11404
11538
|
/* @__PURE__ */ jsx120(Portal, { children: /* @__PURE__ */ jsx120(
|
|
11405
11539
|
"div",
|
|
@@ -11418,7 +11552,7 @@ function Toaster({
|
|
|
11418
11552
|
}
|
|
11419
11553
|
function ToastItem({ toast, onDismiss }) {
|
|
11420
11554
|
const tone = toast.tone ?? "info";
|
|
11421
|
-
return /* @__PURE__ */
|
|
11555
|
+
return /* @__PURE__ */ jsxs83(
|
|
11422
11556
|
"div",
|
|
11423
11557
|
{
|
|
11424
11558
|
role: tone === "danger" ? "alert" : "status",
|
|
@@ -11428,7 +11562,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
11428
11562
|
),
|
|
11429
11563
|
children: [
|
|
11430
11564
|
/* @__PURE__ */ jsx120("span", { "aria-hidden": true, className: clsx97("mt-px shrink-0", TONE_ICON_COLOR2[tone]), children: TONE_ICON3[tone] }),
|
|
11431
|
-
/* @__PURE__ */
|
|
11565
|
+
/* @__PURE__ */ jsxs83("div", { className: "min-w-0 flex-1", children: [
|
|
11432
11566
|
/* @__PURE__ */ jsx120("p", { className: "text-body-sm font-semibold text-default", children: toast.title }),
|
|
11433
11567
|
toast.description && /* @__PURE__ */ jsx120("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: toast.description }),
|
|
11434
11568
|
toast.action && /* @__PURE__ */ jsx120("div", { className: "mt-2 flex items-center gap-2", children: toast.action })
|
|
@@ -11478,12 +11612,12 @@ var PasswordInput = forwardRef43(function PasswordInput2(props, ref) {
|
|
|
11478
11612
|
// src/components/ai/ai-chat-bar.tsx
|
|
11479
11613
|
import clsx98 from "clsx";
|
|
11480
11614
|
import { ArrowRightIcon as ArrowRightIcon2, SearchIcon as SearchIcon3 } from "lucide-react";
|
|
11481
|
-
import { jsx as jsx122, jsxs as
|
|
11615
|
+
import { jsx as jsx122, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
11482
11616
|
function AIChatBar({
|
|
11483
11617
|
placeholder = "Ask Intelligence about any entity, supplier, or risk\u2026",
|
|
11484
11618
|
className
|
|
11485
11619
|
}) {
|
|
11486
|
-
return /* @__PURE__ */
|
|
11620
|
+
return /* @__PURE__ */ jsxs84(
|
|
11487
11621
|
"div",
|
|
11488
11622
|
{
|
|
11489
11623
|
className: clsx98(
|
|
@@ -11493,7 +11627,7 @@ function AIChatBar({
|
|
|
11493
11627
|
children: [
|
|
11494
11628
|
/* @__PURE__ */ jsx122("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ jsx122(SearchIcon3, { className: "size-4" }) }),
|
|
11495
11629
|
/* @__PURE__ */ jsx122("p", { className: "flex-1 text-body-sm text-default-tertiary truncate", children: placeholder }),
|
|
11496
|
-
/* @__PURE__ */
|
|
11630
|
+
/* @__PURE__ */ jsxs84(
|
|
11497
11631
|
"button",
|
|
11498
11632
|
{
|
|
11499
11633
|
type: "button",
|
|
@@ -11512,9 +11646,9 @@ function AIChatBar({
|
|
|
11512
11646
|
// src/components/ai/ai-suggestion-chip.tsx
|
|
11513
11647
|
import clsx99 from "clsx";
|
|
11514
11648
|
import { ArrowRightIcon as ArrowRightIcon3, CpuIcon } from "lucide-react";
|
|
11515
|
-
import { jsx as jsx123, jsxs as
|
|
11649
|
+
import { jsx as jsx123, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
11516
11650
|
function AISuggestionChip({ prompt, onClick, className }) {
|
|
11517
|
-
return /* @__PURE__ */
|
|
11651
|
+
return /* @__PURE__ */ jsxs85(
|
|
11518
11652
|
"button",
|
|
11519
11653
|
{
|
|
11520
11654
|
type: "button",
|
|
@@ -11555,7 +11689,7 @@ function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
|
11555
11689
|
// src/components/ai/chat.tsx
|
|
11556
11690
|
import clsx101 from "clsx";
|
|
11557
11691
|
import { CpuIcon as CpuIcon2 } from "lucide-react";
|
|
11558
|
-
import { jsx as jsx125, jsxs as
|
|
11692
|
+
import { jsx as jsx125, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
11559
11693
|
function AiAvatar({ className, icon }) {
|
|
11560
11694
|
return /* @__PURE__ */ jsx125(
|
|
11561
11695
|
"span",
|
|
@@ -11567,9 +11701,9 @@ function AiAvatar({ className, icon }) {
|
|
|
11567
11701
|
);
|
|
11568
11702
|
}
|
|
11569
11703
|
function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
11570
|
-
return /* @__PURE__ */
|
|
11704
|
+
return /* @__PURE__ */ jsxs86("div", { role: "status", "aria-live": "polite", className: cn("flex items-center gap-3", className), children: [
|
|
11571
11705
|
/* @__PURE__ */ jsx125(AiAvatar, {}),
|
|
11572
|
-
/* @__PURE__ */
|
|
11706
|
+
/* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-2 rounded-2xl rounded-tl-sm border border-default bg-default-secondary px-5 py-3", children: [
|
|
11573
11707
|
/* @__PURE__ */ jsx125("span", { className: "text-body-xs text-default-secondary", children: label }),
|
|
11574
11708
|
/* @__PURE__ */ jsx125("span", { "aria-hidden": true, className: "flex gap-1", children: [0, 1, 2].map((index) => /* @__PURE__ */ jsx125(
|
|
11575
11709
|
"span",
|
|
@@ -11605,9 +11739,9 @@ function ChatBubble({ sender, children, failed = false, className }) {
|
|
|
11605
11739
|
}
|
|
11606
11740
|
|
|
11607
11741
|
// src/components/decorative/aurora-backdrop.tsx
|
|
11608
|
-
import { jsx as jsx126, jsxs as
|
|
11742
|
+
import { jsx as jsx126, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
11609
11743
|
function AuroraBackdrop() {
|
|
11610
|
-
return /* @__PURE__ */
|
|
11744
|
+
return /* @__PURE__ */ jsxs87("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": true, children: [
|
|
11611
11745
|
/* @__PURE__ */ jsx126("div", { className: "absolute -left-24 -top-28", style: { width: 380, height: 380, background: "radial-gradient(ellipse, rgba(249,133,133,0.45) 0%, transparent 70%)" } }),
|
|
11612
11746
|
/* @__PURE__ */ jsx126("div", { className: "absolute -top-24 right-[-4%]", style: { width: 320, height: 320, background: "radial-gradient(ellipse, rgba(254,160,160,0.4) 0%, transparent 70%)" } }),
|
|
11613
11747
|
/* @__PURE__ */ jsx126("div", { className: "absolute bottom-[-10%] right-[14%]", style: { width: 420, height: 420, background: "radial-gradient(ellipse, rgba(196,181,253,0.3) 0%, transparent 70%)" } }),
|
|
@@ -11677,6 +11811,7 @@ export {
|
|
|
11677
11811
|
ContextMenuContent,
|
|
11678
11812
|
ContextMenuGroup,
|
|
11679
11813
|
ContextMenuItem,
|
|
11814
|
+
ContextMenuItems,
|
|
11680
11815
|
ContextMenuLabel,
|
|
11681
11816
|
ContextMenuRadioGroup,
|
|
11682
11817
|
ContextMenuRadioItem,
|
|
@@ -11714,6 +11849,7 @@ export {
|
|
|
11714
11849
|
DropdownMenuContent,
|
|
11715
11850
|
DropdownMenuGroup,
|
|
11716
11851
|
DropdownMenuItem,
|
|
11852
|
+
DropdownMenuItems,
|
|
11717
11853
|
DropdownMenuLabel,
|
|
11718
11854
|
DropdownMenuRadioGroup,
|
|
11719
11855
|
DropdownMenuRadioItem,
|
|
@@ -11772,6 +11908,7 @@ export {
|
|
|
11772
11908
|
MenubarContent,
|
|
11773
11909
|
MenubarGroup,
|
|
11774
11910
|
MenubarItem,
|
|
11911
|
+
MenubarItems,
|
|
11775
11912
|
MenubarLabel,
|
|
11776
11913
|
MenubarMenu,
|
|
11777
11914
|
MenubarRadioGroup,
|