@assure-one/design-system 0.4.1 → 0.5.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/README.md +13 -14
- package/dist/index.d.ts +141 -75
- package/dist/index.js +374 -136
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/index.d.ts +3 -5
- package/dist/tokens/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2120,6 +2120,74 @@ function FilterIcon({ size = 24, ...props }) {
|
|
|
2120
2120
|
}
|
|
2121
2121
|
) });
|
|
2122
2122
|
}
|
|
2123
|
+
function CheckCircleSolidIcon({ size = 24, ...props }) {
|
|
2124
|
+
return /* @__PURE__ */ jsx(Icon, { size, ...props, children: /* @__PURE__ */ jsx(
|
|
2125
|
+
"path",
|
|
2126
|
+
{
|
|
2127
|
+
fillRule: "evenodd",
|
|
2128
|
+
clipRule: "evenodd",
|
|
2129
|
+
fill: "currentColor",
|
|
2130
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 0 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z"
|
|
2131
|
+
}
|
|
2132
|
+
) });
|
|
2133
|
+
}
|
|
2134
|
+
function XCircleSolidIcon({ size = 24, ...props }) {
|
|
2135
|
+
return /* @__PURE__ */ jsx(Icon, { size, ...props, children: /* @__PURE__ */ jsx(
|
|
2136
|
+
"path",
|
|
2137
|
+
{
|
|
2138
|
+
fillRule: "evenodd",
|
|
2139
|
+
clipRule: "evenodd",
|
|
2140
|
+
fill: "currentColor",
|
|
2141
|
+
d: "M12 2.25C6.615 2.25 2.25 6.615 2.25 12s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 0 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z"
|
|
2142
|
+
}
|
|
2143
|
+
) });
|
|
2144
|
+
}
|
|
2145
|
+
function AlertTriangleSolidIcon({ size = 24, ...props }) {
|
|
2146
|
+
return /* @__PURE__ */ jsx(Icon, { size, ...props, children: /* @__PURE__ */ jsx(
|
|
2147
|
+
"path",
|
|
2148
|
+
{
|
|
2149
|
+
fillRule: "evenodd",
|
|
2150
|
+
clipRule: "evenodd",
|
|
2151
|
+
fill: "currentColor",
|
|
2152
|
+
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z"
|
|
2153
|
+
}
|
|
2154
|
+
) });
|
|
2155
|
+
}
|
|
2156
|
+
function InfoCircleSolidIcon({ size = 24, ...props }) {
|
|
2157
|
+
return /* @__PURE__ */ jsx(Icon, { size, ...props, children: /* @__PURE__ */ jsx(
|
|
2158
|
+
"path",
|
|
2159
|
+
{
|
|
2160
|
+
fillRule: "evenodd",
|
|
2161
|
+
clipRule: "evenodd",
|
|
2162
|
+
fill: "currentColor",
|
|
2163
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.342l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.341l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z"
|
|
2164
|
+
}
|
|
2165
|
+
) });
|
|
2166
|
+
}
|
|
2167
|
+
function TrendingUpIcon({ size = 24, ...props }) {
|
|
2168
|
+
return /* @__PURE__ */ jsx(Icon, { size, ...props, children: /* @__PURE__ */ jsx(
|
|
2169
|
+
"path",
|
|
2170
|
+
{
|
|
2171
|
+
d: "M2 17l6.5-6.5 5 5L22 7M16 7h6v6",
|
|
2172
|
+
stroke: "currentColor",
|
|
2173
|
+
strokeWidth: "1.5",
|
|
2174
|
+
strokeLinecap: "round",
|
|
2175
|
+
strokeLinejoin: "round"
|
|
2176
|
+
}
|
|
2177
|
+
) });
|
|
2178
|
+
}
|
|
2179
|
+
function TrendingDownIcon({ size = 24, ...props }) {
|
|
2180
|
+
return /* @__PURE__ */ jsx(Icon, { size, ...props, children: /* @__PURE__ */ jsx(
|
|
2181
|
+
"path",
|
|
2182
|
+
{
|
|
2183
|
+
d: "M2 7l6.5 6.5 5-5L22 17M16 17h6v-6",
|
|
2184
|
+
stroke: "currentColor",
|
|
2185
|
+
strokeWidth: "1.5",
|
|
2186
|
+
strokeLinecap: "round",
|
|
2187
|
+
strokeLinejoin: "round"
|
|
2188
|
+
}
|
|
2189
|
+
) });
|
|
2190
|
+
}
|
|
2123
2191
|
var Accordion = React36.forwardRef(function Accordion2({ className, ...props }, ref) {
|
|
2124
2192
|
return /* @__PURE__ */ jsx(
|
|
2125
2193
|
AccordionPrimitive.Root,
|
|
@@ -3071,8 +3139,8 @@ function Select({
|
|
|
3071
3139
|
children: /* @__PURE__ */ jsx(SelectValue, { placeholder })
|
|
3072
3140
|
}
|
|
3073
3141
|
),
|
|
3074
|
-
/* @__PURE__ */ jsx(SelectContent, { className: contentClassName, children: options.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, disabled: opt.disabled, children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5
|
|
3075
|
-
opt.label,
|
|
3142
|
+
/* @__PURE__ */ jsx(SelectContent, { className: contentClassName, children: options.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, disabled: opt.disabled, children: /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
3143
|
+
/* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: opt.label }),
|
|
3076
3144
|
opt.labelSuffix
|
|
3077
3145
|
] }) }, opt.value)) })
|
|
3078
3146
|
]
|
|
@@ -3090,16 +3158,17 @@ function ClientSelect({
|
|
|
3090
3158
|
placeholder = "Select a client..."
|
|
3091
3159
|
}) {
|
|
3092
3160
|
const radixValue = value ?? void 0;
|
|
3161
|
+
const selected = value ? clients.find((c) => c.id === value) : void 0;
|
|
3093
3162
|
const handleChange = (next) => {
|
|
3094
3163
|
onChange(next === "" ? null : next);
|
|
3095
3164
|
};
|
|
3096
3165
|
return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", className), children: [
|
|
3097
3166
|
/* @__PURE__ */ jsx("input", { type: "hidden", name, value: value ?? "" }),
|
|
3098
3167
|
/* @__PURE__ */ jsxs(SelectRoot, { value: radixValue, onValueChange: handleChange, children: [
|
|
3099
|
-
/* @__PURE__ */ jsx(SelectTrigger, { "aria-invalid": !!error || void 0, "aria-label": placeholder, children: /* @__PURE__ */ jsx(SelectValue, { placeholder }) }),
|
|
3100
|
-
/* @__PURE__ */ jsx(SelectContent, { children: clients.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-fg-3 px-3 py-6 text-center text-xs", children: "No clients yet" }) : clients.map((c) => /* @__PURE__ */ jsx(SelectItem, { value: c.id, children: /* @__PURE__ */ jsxs("span", { className: "flex flex-col", children: [
|
|
3101
|
-
/* @__PURE__ */ jsx("span", { className: "text-fg text-[13px] font-medium", children: c.label }),
|
|
3102
|
-
c.email && /* @__PURE__ */ jsx("span", { className: "text-fg-3 text-xs", children: c.email })
|
|
3168
|
+
/* @__PURE__ */ jsx(SelectTrigger, { "aria-invalid": !!error || void 0, "aria-label": placeholder, children: /* @__PURE__ */ jsx(SelectValue, { placeholder, children: selected?.label ?? "" }) }),
|
|
3169
|
+
/* @__PURE__ */ jsx(SelectContent, { children: clients.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-fg-3 px-3 py-6 text-center text-xs", children: "No clients yet" }) : clients.map((c) => /* @__PURE__ */ jsx(SelectItem, { value: c.id, children: /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
3170
|
+
/* @__PURE__ */ jsx("span", { className: "text-fg line-clamp-1 text-[13px] font-medium", children: c.label }),
|
|
3171
|
+
c.email && /* @__PURE__ */ jsx("span", { className: "text-fg-3 line-clamp-1 text-xs", children: c.email })
|
|
3103
3172
|
] }) }, c.id)) })
|
|
3104
3173
|
] }),
|
|
3105
3174
|
error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-danger-fg mt-1.5 text-xs", children: error })
|
|
@@ -3436,7 +3505,7 @@ function CommandPalette({
|
|
|
3436
3505
|
),
|
|
3437
3506
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3438
3507
|
/* @__PURE__ */ jsx("div", { className: "text-fg text-sm font-medium", children: item.label }),
|
|
3439
|
-
item.description && /* @__PURE__ */ jsx("div", { className: "text-fg-3
|
|
3508
|
+
item.description && /* @__PURE__ */ jsx("div", { className: "text-fg-3 line-clamp-1 text-xs", children: item.description })
|
|
3440
3509
|
] }),
|
|
3441
3510
|
item.shortcut && /* @__PURE__ */ jsx("kbd", { className: cn(kbdClass, "hidden shrink-0 sm:inline-flex"), children: item.shortcut })
|
|
3442
3511
|
]
|
|
@@ -4417,67 +4486,45 @@ var Input = forwardRef(function Input2({
|
|
|
4417
4486
|
] });
|
|
4418
4487
|
});
|
|
4419
4488
|
Input.displayName = "Input";
|
|
4420
|
-
var
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
},
|
|
4431
|
-
{
|
|
4432
|
-
title: "Go to",
|
|
4433
|
-
icon: null,
|
|
4434
|
-
shortcuts: [
|
|
4435
|
-
{ keys: ["G", "O"], description: "Overview" },
|
|
4436
|
-
{ keys: ["G", "C"], description: "Clients" },
|
|
4437
|
-
{ keys: ["G", "W"], description: "Workflow" },
|
|
4438
|
-
{ keys: ["G", "D"], description: "Documents" },
|
|
4439
|
-
{ keys: ["G", "B"], description: "Billing" },
|
|
4440
|
-
{ keys: ["G", "M"], description: "Communications" },
|
|
4441
|
-
{ keys: ["G", "A"], description: "Calendar" },
|
|
4442
|
-
{ keys: ["G", "R"], description: "Reports" },
|
|
4443
|
-
{ keys: ["G", "S"], description: "Settings" }
|
|
4444
|
-
]
|
|
4445
|
-
},
|
|
4446
|
-
{
|
|
4447
|
-
title: "General",
|
|
4448
|
-
icon: /* @__PURE__ */ jsx(CommandIcon, { className: "size-3" }),
|
|
4449
|
-
shortcuts: [
|
|
4450
|
-
{ keys: ["\u2318", "K"], description: "Command palette" },
|
|
4451
|
-
{ keys: ["/"], description: "Focus search" },
|
|
4452
|
-
{ keys: ["?"], description: "Keyboard shortcuts" },
|
|
4453
|
-
{ keys: ["Esc"], description: "Close / go back" }
|
|
4454
|
-
]
|
|
4455
|
-
}
|
|
4456
|
-
];
|
|
4489
|
+
var GENERAL_SECTION = {
|
|
4490
|
+
title: "General",
|
|
4491
|
+
icon: /* @__PURE__ */ jsx(CommandIcon, { className: "size-3" }),
|
|
4492
|
+
shortcuts: [
|
|
4493
|
+
{ keys: ["\u2318", "K"], description: "Command palette" },
|
|
4494
|
+
{ keys: ["/"], description: "Focus search" },
|
|
4495
|
+
{ keys: ["?"], description: "Keyboard shortcuts" },
|
|
4496
|
+
{ keys: ["Esc"], description: "Close / go back" }
|
|
4497
|
+
]
|
|
4498
|
+
};
|
|
4457
4499
|
var kbdClass2 = cn(
|
|
4458
4500
|
"inline-flex items-center justify-center min-w-[18px] h-[18px] px-[5px]",
|
|
4459
4501
|
"font-mono text-[10.5px] text-fg-3 bg-bg-2 border border-rule rounded-icon",
|
|
4460
4502
|
"[border-bottom-width:1.5px]"
|
|
4461
4503
|
);
|
|
4462
|
-
function KeyboardShortcutsDialog(
|
|
4504
|
+
function KeyboardShortcutsDialog({
|
|
4505
|
+
sections,
|
|
4506
|
+
hotkey = "?"
|
|
4507
|
+
} = {}) {
|
|
4463
4508
|
const [open, setOpen] = React36.useState(false);
|
|
4464
4509
|
React36.useEffect(() => {
|
|
4510
|
+
if (hotkey === null) return;
|
|
4465
4511
|
function handleKeyDown(e) {
|
|
4466
4512
|
const target = e.target;
|
|
4467
4513
|
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement || target instanceof HTMLSelectElement || target?.isContentEditable) {
|
|
4468
4514
|
return;
|
|
4469
4515
|
}
|
|
4470
|
-
if (e.key ===
|
|
4516
|
+
if (e.key === hotkey && !e.metaKey && !e.ctrlKey && !e.altKey) {
|
|
4471
4517
|
e.preventDefault();
|
|
4472
4518
|
setOpen((prev) => !prev);
|
|
4473
4519
|
}
|
|
4474
4520
|
}
|
|
4475
4521
|
document.addEventListener("keydown", handleKeyDown);
|
|
4476
4522
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
4477
|
-
}, []);
|
|
4523
|
+
}, [hotkey]);
|
|
4524
|
+
const allSections = sections ? [...sections, GENERAL_SECTION] : [GENERAL_SECTION];
|
|
4478
4525
|
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs(DialogContent, { size: "md", className: "p-0", children: [
|
|
4479
4526
|
/* @__PURE__ */ jsx(DialogHeader, { className: "border-rule mb-0 border-b px-5 py-4 pr-12", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-sm font-semibold", children: "Keyboard Shortcuts" }) }),
|
|
4480
|
-
/* @__PURE__ */ jsx("div", { className: "scrollbar-thin max-h-[60vh] overflow-y-auto px-5 py-4", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-x-6 gap-y-5", children:
|
|
4527
|
+
/* @__PURE__ */ jsx("div", { className: "scrollbar-thin max-h-[60vh] overflow-y-auto px-5 py-4", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-x-6 gap-y-5", children: allSections.map((section) => /* @__PURE__ */ jsxs("div", { className: cn(section.wide && "row-span-2"), children: [
|
|
4481
4528
|
/* @__PURE__ */ jsxs(
|
|
4482
4529
|
"h3",
|
|
4483
4530
|
{
|
|
@@ -4508,7 +4555,7 @@ function KeyboardShortcutsDialog() {
|
|
|
4508
4555
|
] }, section.title)) }) }),
|
|
4509
4556
|
/* @__PURE__ */ jsx("div", { className: "border-rule bg-bg-2/40 border-t px-5 py-3", children: /* @__PURE__ */ jsxs("p", { className: "text-fg-3 text-[11px]", children: [
|
|
4510
4557
|
"Press ",
|
|
4511
|
-
/* @__PURE__ */ jsx("kbd", { className: kbdClass2, children: "?" }),
|
|
4558
|
+
/* @__PURE__ */ jsx("kbd", { className: kbdClass2, children: hotkey ?? "?" }),
|
|
4512
4559
|
" anytime to toggle this dialog"
|
|
4513
4560
|
] }) })
|
|
4514
4561
|
] }) });
|
|
@@ -4637,15 +4684,17 @@ function Logo({
|
|
|
4637
4684
|
className,
|
|
4638
4685
|
iconClassName,
|
|
4639
4686
|
textClassName,
|
|
4687
|
+
productName = "Pro",
|
|
4640
4688
|
inverted = false
|
|
4641
4689
|
}) {
|
|
4642
4690
|
const s = sizeStyles[size];
|
|
4691
|
+
const ariaLabel = productName ? `Assure ${productName}` : "Assure";
|
|
4643
4692
|
return /* @__PURE__ */ jsxs(
|
|
4644
4693
|
Link,
|
|
4645
4694
|
{
|
|
4646
4695
|
href,
|
|
4647
4696
|
className: cn("inline-flex items-center", s.gap, className),
|
|
4648
|
-
"aria-label":
|
|
4697
|
+
"aria-label": ariaLabel,
|
|
4649
4698
|
children: [
|
|
4650
4699
|
/* @__PURE__ */ jsx(
|
|
4651
4700
|
Image2,
|
|
@@ -4669,8 +4718,10 @@ function Logo({
|
|
|
4669
4718
|
),
|
|
4670
4719
|
children: [
|
|
4671
4720
|
/* @__PURE__ */ jsx("span", { children: "Assure" }),
|
|
4672
|
-
|
|
4673
|
-
|
|
4721
|
+
productName && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4722
|
+
" ",
|
|
4723
|
+
/* @__PURE__ */ jsx("span", { className: "text-pro-fg font-medium", children: productName })
|
|
4724
|
+
] })
|
|
4674
4725
|
]
|
|
4675
4726
|
}
|
|
4676
4727
|
)
|
|
@@ -4701,7 +4752,7 @@ function MultiFilterPill({
|
|
|
4701
4752
|
),
|
|
4702
4753
|
children: [
|
|
4703
4754
|
icon && /* @__PURE__ */ jsx("span", { className: "[&>svg]:size-3.5", "aria-hidden": "true", children: icon }),
|
|
4704
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
4755
|
+
/* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: displayLabel }),
|
|
4705
4756
|
active ? /* @__PURE__ */ jsx(
|
|
4706
4757
|
"span",
|
|
4707
4758
|
{
|
|
@@ -4781,7 +4832,7 @@ function MultiFilterPill({
|
|
|
4781
4832
|
"aria-hidden": "true"
|
|
4782
4833
|
}
|
|
4783
4834
|
),
|
|
4784
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
4835
|
+
/* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: opt.label })
|
|
4785
4836
|
]
|
|
4786
4837
|
}
|
|
4787
4838
|
) }, opt.key);
|
|
@@ -5580,7 +5631,7 @@ function SearchSelect({
|
|
|
5580
5631
|
),
|
|
5581
5632
|
children: [
|
|
5582
5633
|
/* @__PURE__ */ jsx(CheckIcon, { className: "size-4 shrink-0 text-transparent", "aria-hidden": "true" }),
|
|
5583
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
5634
|
+
/* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: option.label })
|
|
5584
5635
|
]
|
|
5585
5636
|
},
|
|
5586
5637
|
option.id
|
|
@@ -5600,7 +5651,7 @@ function SearchSelect({
|
|
|
5600
5651
|
),
|
|
5601
5652
|
children: [
|
|
5602
5653
|
/* @__PURE__ */ jsx(PlusIcon, { className: "size-4 shrink-0", "aria-hidden": "true" }),
|
|
5603
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
5654
|
+
/* @__PURE__ */ jsxs("span", { className: "line-clamp-1", children: [
|
|
5604
5655
|
"Create \u201C",
|
|
5605
5656
|
trimmedSearch,
|
|
5606
5657
|
"\u201D"
|
|
@@ -5892,7 +5943,7 @@ function SideDrawer({
|
|
|
5892
5943
|
function SideDrawerHeader({ title, subtitle, onClose, className }) {
|
|
5893
5944
|
return /* @__PURE__ */ jsx("div", { className: cn("border-rule bg-surface shrink-0 border-b px-6 py-4", className), children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
5894
5945
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
5895
|
-
/* @__PURE__ */ jsx("h2", { className: "font-display text-fg
|
|
5946
|
+
/* @__PURE__ */ jsx("h2", { className: "font-display text-fg line-clamp-1 text-base leading-tight font-medium tracking-tight", children: title }),
|
|
5896
5947
|
subtitle && /* @__PURE__ */ jsx("p", { className: "text-fg-3 mt-1 text-sm", children: subtitle })
|
|
5897
5948
|
] }),
|
|
5898
5949
|
onClose && /* @__PURE__ */ jsx(
|
|
@@ -6637,32 +6688,55 @@ function ToastProvider({ children }) {
|
|
|
6637
6688
|
)
|
|
6638
6689
|
] });
|
|
6639
6690
|
}
|
|
6640
|
-
var
|
|
6641
|
-
default: "bg-
|
|
6642
|
-
success:
|
|
6643
|
-
|
|
6644
|
-
|
|
6691
|
+
var variantConfig = {
|
|
6692
|
+
default: { chip: "bg-pro-bg", icon: "text-pro-fg", bar: "bg-pro-fg", Icon: InfoCircleSolidIcon },
|
|
6693
|
+
success: {
|
|
6694
|
+
chip: "bg-success-bg",
|
|
6695
|
+
icon: "text-success-fg",
|
|
6696
|
+
bar: "bg-success-fg",
|
|
6697
|
+
Icon: CheckCircleSolidIcon
|
|
6698
|
+
},
|
|
6699
|
+
destructive: {
|
|
6700
|
+
chip: "bg-danger-bg",
|
|
6701
|
+
icon: "text-danger-fg",
|
|
6702
|
+
bar: "bg-danger-fg",
|
|
6703
|
+
Icon: XCircleSolidIcon
|
|
6704
|
+
},
|
|
6705
|
+
warning: {
|
|
6706
|
+
chip: "bg-warning-bg",
|
|
6707
|
+
icon: "text-warning-fg",
|
|
6708
|
+
bar: "bg-warning-fg",
|
|
6709
|
+
Icon: AlertTriangleSolidIcon
|
|
6710
|
+
}
|
|
6645
6711
|
};
|
|
6646
6712
|
function ToastItem({ toast, onDismiss }) {
|
|
6647
6713
|
const timerRef = useRef(void 0);
|
|
6648
6714
|
const [exiting, setExiting] = useState(false);
|
|
6715
|
+
const [filled, setFilled] = useState(false);
|
|
6716
|
+
const duration = toast.duration ?? 5e3;
|
|
6717
|
+
const showProgress = duration > 0;
|
|
6649
6718
|
const close = useCallback(() => {
|
|
6650
6719
|
setExiting(true);
|
|
6651
6720
|
setTimeout(() => onDismiss(toast.id), 150);
|
|
6652
6721
|
}, [toast.id, onDismiss]);
|
|
6653
6722
|
useEffect(() => {
|
|
6654
|
-
|
|
6655
|
-
if (duration <= 0) return;
|
|
6723
|
+
if (!showProgress) return;
|
|
6656
6724
|
timerRef.current = setTimeout(close, duration);
|
|
6657
6725
|
return () => clearTimeout(timerRef.current);
|
|
6658
|
-
}, [
|
|
6659
|
-
|
|
6726
|
+
}, [showProgress, duration, close]);
|
|
6727
|
+
useEffect(() => {
|
|
6728
|
+
if (!showProgress) return;
|
|
6729
|
+
const raf = requestAnimationFrame(() => setFilled(true));
|
|
6730
|
+
return () => cancelAnimationFrame(raf);
|
|
6731
|
+
}, [showProgress]);
|
|
6732
|
+
const { chip, icon, bar, Icon: Icon3 } = variantConfig[toast.variant ?? "default"];
|
|
6733
|
+
return /* @__PURE__ */ jsxs(
|
|
6660
6734
|
"div",
|
|
6661
6735
|
{
|
|
6662
6736
|
role: "status",
|
|
6663
6737
|
"data-state": exiting ? "closed" : "open",
|
|
6664
6738
|
className: cn(
|
|
6665
|
-
"rounded-card shadow-card pointer-events-auto w-80 border p-4",
|
|
6739
|
+
"bg-surface border-rule text-fg rounded-card shadow-card pointer-events-auto relative w-80 overflow-hidden border p-4",
|
|
6666
6740
|
"font-body",
|
|
6667
6741
|
// Unified data-state animation (spec §5.27) — same model as Dialog/Tooltip:
|
|
6668
6742
|
// open → fade+slide in over --duration-overlay (200ms), ease-out-quart
|
|
@@ -6671,29 +6745,68 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
6671
6745
|
"data-[state=open]:duration-[var(--duration-overlay)] data-[state=open]:ease-[var(--ease-out-quart)]",
|
|
6672
6746
|
"data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right-8 data-[state=closed]:fade-out-0",
|
|
6673
6747
|
"data-[state=closed]:duration-[var(--duration-fast)] data-[state=closed]:ease-[var(--ease-in)]",
|
|
6674
|
-
"motion-reduce:animate-none"
|
|
6675
|
-
variantStyles[toast.variant ?? "default"]
|
|
6748
|
+
"motion-reduce:animate-none"
|
|
6676
6749
|
),
|
|
6677
|
-
children:
|
|
6678
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
6679
|
-
/* @__PURE__ */ jsx(
|
|
6680
|
-
|
|
6750
|
+
children: [
|
|
6751
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
6752
|
+
/* @__PURE__ */ jsx(
|
|
6753
|
+
"span",
|
|
6754
|
+
{
|
|
6755
|
+
className: cn(
|
|
6756
|
+
"inline-flex size-8 shrink-0 items-center justify-center rounded-[9px]",
|
|
6757
|
+
chip,
|
|
6758
|
+
icon
|
|
6759
|
+
),
|
|
6760
|
+
"aria-hidden": "true",
|
|
6761
|
+
children: /* @__PURE__ */ jsx(Icon3, { className: "size-5" })
|
|
6762
|
+
}
|
|
6763
|
+
),
|
|
6764
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
6765
|
+
/* @__PURE__ */ jsx("p", { className: "text-fg text-sm leading-tight font-semibold", children: toast.title }),
|
|
6766
|
+
toast.description && /* @__PURE__ */ jsx("p", { className: "text-fg-3 mt-0.5 text-sm leading-snug", children: toast.description }),
|
|
6767
|
+
toast.action && /* @__PURE__ */ jsx(
|
|
6768
|
+
"button",
|
|
6769
|
+
{
|
|
6770
|
+
type: "button",
|
|
6771
|
+
onClick: () => {
|
|
6772
|
+
toast.action?.onClick();
|
|
6773
|
+
close();
|
|
6774
|
+
},
|
|
6775
|
+
className: cn(
|
|
6776
|
+
"text-pro-fg mt-2 text-sm font-semibold",
|
|
6777
|
+
"transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] hover:underline motion-reduce:transition-none",
|
|
6778
|
+
"focus-visible:[box-shadow:var(--shadow-focus-ring)] rounded-sm focus-visible:outline-none"
|
|
6779
|
+
),
|
|
6780
|
+
children: toast.action.label
|
|
6781
|
+
}
|
|
6782
|
+
)
|
|
6783
|
+
] }),
|
|
6784
|
+
/* @__PURE__ */ jsx(
|
|
6785
|
+
"button",
|
|
6786
|
+
{
|
|
6787
|
+
type: "button",
|
|
6788
|
+
onClick: close,
|
|
6789
|
+
className: cn(
|
|
6790
|
+
"text-fg-4 hover:text-fg-2 rounded-icon -mr-1 inline-flex size-5 shrink-0 items-center justify-center",
|
|
6791
|
+
"transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
|
|
6792
|
+
"focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none"
|
|
6793
|
+
),
|
|
6794
|
+
"aria-label": "Dismiss",
|
|
6795
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
6796
|
+
}
|
|
6797
|
+
)
|
|
6681
6798
|
] }),
|
|
6682
|
-
/* @__PURE__ */ jsx(
|
|
6683
|
-
"
|
|
6799
|
+
showProgress && /* @__PURE__ */ jsx("div", { className: "bg-rule absolute inset-x-0 bottom-0 h-1", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
6800
|
+
"div",
|
|
6684
6801
|
{
|
|
6685
|
-
type: "button",
|
|
6686
|
-
onClick: close,
|
|
6687
6802
|
className: cn(
|
|
6688
|
-
"
|
|
6689
|
-
|
|
6690
|
-
"focus-visible:[box-shadow:var(--shadow-focus-ring)] focus-visible:outline-none"
|
|
6803
|
+
"h-full transition-[width] ease-linear motion-reduce:transition-none",
|
|
6804
|
+
bar
|
|
6691
6805
|
),
|
|
6692
|
-
"
|
|
6693
|
-
children: /* @__PURE__ */ jsx(XIcon, { className: "size-3.5", "aria-hidden": "true" })
|
|
6806
|
+
style: { width: filled ? "100%" : "0%", transitionDuration: `${duration}ms` }
|
|
6694
6807
|
}
|
|
6695
|
-
)
|
|
6696
|
-
]
|
|
6808
|
+
) })
|
|
6809
|
+
]
|
|
6697
6810
|
}
|
|
6698
6811
|
);
|
|
6699
6812
|
}
|
|
@@ -7039,7 +7152,9 @@ var SidebarBrandText = React36.forwardRef(
|
|
|
7039
7152
|
ref,
|
|
7040
7153
|
"aria-hidden": "false",
|
|
7041
7154
|
className: cn(
|
|
7042
|
-
|
|
7155
|
+
// line-clamp-1 (not `truncate`) so multi-word wordmarks clip at a
|
|
7156
|
+
// word boundary instead of mid-word when the rail is narrow.
|
|
7157
|
+
"min-w-0 line-clamp-1",
|
|
7043
7158
|
// Smooth fade + width collapse on rail. Keeps the wordmark
|
|
7044
7159
|
// legible up to the moment the column reaches rail width, then
|
|
7045
7160
|
// fully drops out (visibility:hidden cuts hit-testing).
|
|
@@ -7157,7 +7272,10 @@ var SidebarLink = React36.forwardRef(
|
|
|
7157
7272
|
"span",
|
|
7158
7273
|
{
|
|
7159
7274
|
className: cn(
|
|
7160
|
-
|
|
7275
|
+
// line-clamp-1 (not `truncate`) so multi-word labels clip at a
|
|
7276
|
+
// word boundary; collapses cleanly with the rail-mode max-width
|
|
7277
|
+
// animation since both rules only constrain visible content.
|
|
7278
|
+
"min-w-0 flex-1 line-clamp-1",
|
|
7161
7279
|
"transition-[opacity,max-width] duration-[180ms] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
|
|
7162
7280
|
"max-w-full opacity-100",
|
|
7163
7281
|
"group-data-[labels=hide]/sidebar:max-w-0 group-data-[labels=hide]/sidebar:opacity-0 group-data-[labels=hide]/sidebar:invisible"
|
|
@@ -7178,7 +7296,10 @@ var SidebarLinkLabel = React36.forwardRef(
|
|
|
7178
7296
|
{
|
|
7179
7297
|
ref,
|
|
7180
7298
|
className: cn(
|
|
7181
|
-
|
|
7299
|
+
// line-clamp-1 (not `truncate`) so multi-word labels clip at a
|
|
7300
|
+
// word boundary; collapses cleanly with the rail-mode max-width
|
|
7301
|
+
// animation since both rules only constrain visible content.
|
|
7302
|
+
"min-w-0 flex-1 line-clamp-1",
|
|
7182
7303
|
// Fade + collapse instead of hard display:none so a single
|
|
7183
7304
|
// 180ms opacity tween covers all labels in lockstep with the
|
|
7184
7305
|
// 220ms aside-width transition — no snap on the last frame.
|
|
@@ -7296,7 +7417,10 @@ var SidebarLinkGroup = React36.forwardRef(
|
|
|
7296
7417
|
"span",
|
|
7297
7418
|
{
|
|
7298
7419
|
className: cn(
|
|
7299
|
-
|
|
7420
|
+
// line-clamp-1 (not `truncate`) so multi-word labels clip at a
|
|
7421
|
+
// word boundary; collapses cleanly with the rail-mode max-width
|
|
7422
|
+
// animation since both rules only constrain visible content.
|
|
7423
|
+
"min-w-0 flex-1 line-clamp-1",
|
|
7300
7424
|
"transition-[opacity,max-width] duration-[180ms] ease-[var(--ease-out-quart)] motion-reduce:transition-none",
|
|
7301
7425
|
"max-w-full opacity-100",
|
|
7302
7426
|
"group-data-[labels=hide]/sidebar:max-w-0 group-data-[labels=hide]/sidebar:opacity-0 group-data-[labels=hide]/sidebar:invisible"
|
|
@@ -7390,8 +7514,8 @@ var SidebarUser = React36.forwardRef(function SidebarUser2({ name, subtitle, ava
|
|
|
7390
7514
|
"group-data-[labels=hide]/sidebar:max-w-0 group-data-[labels=hide]/sidebar:opacity-0 group-data-[labels=hide]/sidebar:invisible"
|
|
7391
7515
|
),
|
|
7392
7516
|
children: [
|
|
7393
|
-
/* @__PURE__ */ jsx("div", { className: "text-fg
|
|
7394
|
-
subtitle != null && /* @__PURE__ */ jsx("div", { className: "text-fg-4
|
|
7517
|
+
/* @__PURE__ */ jsx("div", { className: "text-fg line-clamp-1 text-[13px] font-medium", children: name }),
|
|
7518
|
+
subtitle != null && /* @__PURE__ */ jsx("div", { className: "text-fg-4 line-clamp-1 font-mono text-[10.5px]", children: subtitle })
|
|
7395
7519
|
]
|
|
7396
7520
|
}
|
|
7397
7521
|
)
|
|
@@ -7460,7 +7584,7 @@ var AppHeaderSearch = forwardRef(
|
|
|
7460
7584
|
...props,
|
|
7461
7585
|
children: [
|
|
7462
7586
|
/* @__PURE__ */ jsx(SearchIcon, { className: "size-[13px] shrink-0", strokeWidth: 1.8, "aria-hidden": "true" }),
|
|
7463
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
7587
|
+
/* @__PURE__ */ jsx("span", { className: "line-clamp-1 text-left", children: placeholder }),
|
|
7464
7588
|
shortcut !== null && shortcut !== void 0 && shortcut !== "" && /* @__PURE__ */ jsx(
|
|
7465
7589
|
"kbd",
|
|
7466
7590
|
{
|
|
@@ -7569,35 +7693,125 @@ var toneToValue = {
|
|
|
7569
7693
|
accent: "text-accent",
|
|
7570
7694
|
muted: "text-fg"
|
|
7571
7695
|
};
|
|
7572
|
-
var
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7696
|
+
var sentimentChip = {
|
|
7697
|
+
positive: "bg-success-bg text-success-fg",
|
|
7698
|
+
negative: "bg-danger-bg text-danger-fg",
|
|
7699
|
+
neutral: "bg-bg-3 text-fg-3"
|
|
7700
|
+
};
|
|
7701
|
+
var sentimentText = {
|
|
7702
|
+
positive: "text-success-fg",
|
|
7703
|
+
negative: "text-danger-fg",
|
|
7704
|
+
neutral: "text-fg-3"
|
|
7705
|
+
};
|
|
7706
|
+
var directionToSentiment = {
|
|
7707
|
+
up: "positive",
|
|
7708
|
+
down: "negative",
|
|
7709
|
+
flat: "neutral"
|
|
7710
|
+
};
|
|
7711
|
+
var directionToIcon = {
|
|
7712
|
+
up: TrendingUpIcon,
|
|
7713
|
+
down: TrendingDownIcon,
|
|
7714
|
+
flat: MinusIcon
|
|
7715
|
+
};
|
|
7716
|
+
var directionToSrLabel = {
|
|
7717
|
+
up: "Up",
|
|
7718
|
+
down: "Down",
|
|
7719
|
+
flat: "No change"
|
|
7720
|
+
};
|
|
7721
|
+
function Sparkline({ data, className }) {
|
|
7722
|
+
if (data.length < 2) return null;
|
|
7723
|
+
const w = 100;
|
|
7724
|
+
const h = 28;
|
|
7725
|
+
const min = Math.min(...data);
|
|
7726
|
+
const max = Math.max(...data);
|
|
7727
|
+
const range = max - min || 1;
|
|
7728
|
+
const coords = data.map((d, i) => {
|
|
7729
|
+
const x = i / (data.length - 1) * w;
|
|
7730
|
+
const y = h - (d - min) / range * (h - 2) - 1;
|
|
7731
|
+
return [x, y];
|
|
7732
|
+
});
|
|
7733
|
+
const line = coords.map(([x, y]) => `${x.toFixed(2)},${y.toFixed(2)}`).join(" ");
|
|
7734
|
+
const area = `0,${h} ${line} ${w},${h}`;
|
|
7735
|
+
return /* @__PURE__ */ jsxs(
|
|
7736
|
+
"svg",
|
|
7737
|
+
{
|
|
7738
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
7739
|
+
preserveAspectRatio: "none",
|
|
7740
|
+
className: cn("h-7 w-full", className),
|
|
7741
|
+
"aria-hidden": "true",
|
|
7742
|
+
children: [
|
|
7743
|
+
/* @__PURE__ */ jsx("polygon", { points: area, fill: "currentColor", className: "opacity-10" }),
|
|
7744
|
+
/* @__PURE__ */ jsx(
|
|
7745
|
+
"polyline",
|
|
7746
|
+
{
|
|
7747
|
+
points: line,
|
|
7748
|
+
fill: "none",
|
|
7749
|
+
stroke: "currentColor",
|
|
7750
|
+
strokeWidth: "2",
|
|
7751
|
+
strokeLinecap: "round",
|
|
7752
|
+
strokeLinejoin: "round",
|
|
7753
|
+
vectorEffect: "non-scaling-stroke"
|
|
7754
|
+
}
|
|
7755
|
+
)
|
|
7756
|
+
]
|
|
7757
|
+
}
|
|
7758
|
+
);
|
|
7759
|
+
}
|
|
7760
|
+
var KpiCard = forwardRef(function KpiCard2({ label, value, icon, tone = "muted", delta, trend, hint, action, toneValue, className, ...props }, ref) {
|
|
7761
|
+
const deltaSentiment = delta ? delta.sentiment ?? directionToSentiment[delta.direction] : null;
|
|
7762
|
+
const DeltaIcon = delta ? directionToIcon[delta.direction] : null;
|
|
7763
|
+
const sparkColor = deltaSentiment ? sentimentText[deltaSentiment] : toneToValue[tone];
|
|
7764
|
+
return /* @__PURE__ */ jsxs(Card, { ref, className: cn("p-4", className), ...props, children: [
|
|
7765
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
7766
|
+
icon && /* @__PURE__ */ jsx(
|
|
7767
|
+
"div",
|
|
7588
7768
|
{
|
|
7769
|
+
"aria-hidden": "true",
|
|
7589
7770
|
className: cn(
|
|
7590
|
-
"
|
|
7591
|
-
|
|
7771
|
+
"flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg]:size-5",
|
|
7772
|
+
toneToTile[tone]
|
|
7592
7773
|
),
|
|
7593
|
-
children:
|
|
7774
|
+
children: icon
|
|
7594
7775
|
}
|
|
7595
7776
|
),
|
|
7596
|
-
/* @__PURE__ */
|
|
7597
|
-
|
|
7777
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7778
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-1", children: [
|
|
7779
|
+
/* @__PURE__ */ jsx(
|
|
7780
|
+
"p",
|
|
7781
|
+
{
|
|
7782
|
+
className: cn(
|
|
7783
|
+
"text-2xl font-bold tracking-tight tabular-nums",
|
|
7784
|
+
toneValue ? toneToValue[tone] : "text-fg"
|
|
7785
|
+
),
|
|
7786
|
+
children: value
|
|
7787
|
+
}
|
|
7788
|
+
),
|
|
7789
|
+
delta && DeltaIcon && deltaSentiment && /* @__PURE__ */ jsxs(
|
|
7790
|
+
"span",
|
|
7791
|
+
{
|
|
7792
|
+
className: cn(
|
|
7793
|
+
"inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[11px] font-semibold tabular-nums",
|
|
7794
|
+
sentimentChip[deltaSentiment]
|
|
7795
|
+
),
|
|
7796
|
+
children: [
|
|
7797
|
+
/* @__PURE__ */ jsx(DeltaIcon, { className: "size-3" }),
|
|
7798
|
+
/* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
7799
|
+
directionToSrLabel[delta.direction],
|
|
7800
|
+
" "
|
|
7801
|
+
] }),
|
|
7802
|
+
delta.value
|
|
7803
|
+
]
|
|
7804
|
+
}
|
|
7805
|
+
)
|
|
7806
|
+
] }),
|
|
7807
|
+
/* @__PURE__ */ jsx("p", { className: "text-fg-3 text-xs", children: label }),
|
|
7808
|
+
delta?.label && /* @__PURE__ */ jsx("p", { className: "text-fg-4 mt-0.5 text-[11px]", children: delta.label }),
|
|
7809
|
+
hint && /* @__PURE__ */ jsx("p", { className: "text-fg-4 mt-0.5 text-[11px]", children: hint })
|
|
7810
|
+
] }),
|
|
7811
|
+
action && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
|
|
7598
7812
|
] }),
|
|
7599
|
-
|
|
7600
|
-
] })
|
|
7813
|
+
trend && trend.length > 1 && /* @__PURE__ */ jsx(Sparkline, { data: trend, className: cn("mt-3", sparkColor) })
|
|
7814
|
+
] });
|
|
7601
7815
|
});
|
|
7602
7816
|
KpiCard.displayName = "KpiCard";
|
|
7603
7817
|
var DataTable = forwardRef(function DataTable2({ withToolbar, className, children, ...props }, ref) {
|
|
@@ -7970,7 +8184,7 @@ var DetailSpineHeader = forwardRef(
|
|
|
7970
8184
|
}
|
|
7971
8185
|
),
|
|
7972
8186
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7973
|
-
/* @__PURE__ */ jsx("div", { className: "font-display text-fg
|
|
8187
|
+
/* @__PURE__ */ jsx("div", { className: "font-display text-fg line-clamp-1 text-base leading-tight font-medium", children: title }),
|
|
7974
8188
|
/* @__PURE__ */ jsx("div", { className: "font-spec text-fg-4 text-[11px]", children: subtitle })
|
|
7975
8189
|
] })
|
|
7976
8190
|
] });
|
|
@@ -8049,27 +8263,51 @@ var KanbanColumn = forwardRef(function KanbanColumn2({ title, count, className,
|
|
|
8049
8263
|
);
|
|
8050
8264
|
});
|
|
8051
8265
|
KanbanColumn.displayName = "KanbanColumn";
|
|
8052
|
-
var
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
"transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] motion-reduce:transition-none"
|
|
8056
|
-
),
|
|
8057
|
-
{
|
|
8058
|
-
variants: {
|
|
8059
|
-
variant: {
|
|
8060
|
-
default: "",
|
|
8061
|
-
pro: "border-l-2 border-l-pro-fg",
|
|
8062
|
-
warn: "border-l-2 border-l-warning-fg",
|
|
8063
|
-
danger: "border-l-2 border-l-danger-fg"
|
|
8064
|
-
}
|
|
8065
|
-
},
|
|
8066
|
-
defaultVariants: {
|
|
8067
|
-
variant: "default"
|
|
8068
|
-
}
|
|
8069
|
-
}
|
|
8266
|
+
var kanbanCardBase = cn(
|
|
8267
|
+
"bg-surface border border-rule rounded-card shadow-quiet p-3 space-y-2 cursor-grab",
|
|
8268
|
+
"transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out-quart)] hover:border-rule-strong motion-reduce:transition-none"
|
|
8070
8269
|
);
|
|
8071
|
-
var
|
|
8072
|
-
|
|
8270
|
+
var priorityConfig = {
|
|
8271
|
+
high: { label: "High", variant: "destructive" },
|
|
8272
|
+
medium: { label: "Med", variant: "warning" },
|
|
8273
|
+
low: { label: "Low", variant: "secondary" }
|
|
8274
|
+
};
|
|
8275
|
+
var dueStatusClass = {
|
|
8276
|
+
overdue: "text-danger-fg font-semibold",
|
|
8277
|
+
soon: "text-warning-fg font-semibold",
|
|
8278
|
+
default: "text-fg-3 font-medium"
|
|
8279
|
+
};
|
|
8280
|
+
var KanbanCard = forwardRef(function KanbanCard2({ className, label, title, client, priority, dueDate, dueStatus, assignee, children, ...props }, ref) {
|
|
8281
|
+
const isRich = title !== void 0;
|
|
8282
|
+
const pri = priority ? priorityConfig[priority] : null;
|
|
8283
|
+
const hasFooter = Boolean(dueDate || assignee);
|
|
8284
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn(kanbanCardBase, className), ...props, children: isRich ? /* @__PURE__ */ jsxs("div", { children: [
|
|
8285
|
+
(label || pri) && /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-start justify-between gap-2", children: [
|
|
8286
|
+
label ? /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: label }) : /* @__PURE__ */ jsx("span", {}),
|
|
8287
|
+
pri && /* @__PURE__ */ jsx(Badge, { variant: pri.variant, size: "sm", children: pri.label })
|
|
8288
|
+
] }),
|
|
8289
|
+
/* @__PURE__ */ jsx("p", { className: "text-fg text-[13px] leading-snug font-semibold", children: title }),
|
|
8290
|
+
client && /* @__PURE__ */ jsxs("p", { className: "text-fg-3 mt-1 flex items-center gap-1.5 text-xs", children: [
|
|
8291
|
+
/* @__PURE__ */ jsx(UserIcon, { className: "size-3 shrink-0", "aria-hidden": "true" }),
|
|
8292
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: client })
|
|
8293
|
+
] }),
|
|
8294
|
+
hasFooter && /* @__PURE__ */ jsxs("div", { className: "border-rule-soft mt-3 flex items-center justify-between border-t pt-2.5", children: [
|
|
8295
|
+
dueDate ? /* @__PURE__ */ jsxs(
|
|
8296
|
+
"span",
|
|
8297
|
+
{
|
|
8298
|
+
className: cn(
|
|
8299
|
+
"flex items-center gap-1 text-xs",
|
|
8300
|
+
dueStatusClass[dueStatus ?? "default"]
|
|
8301
|
+
),
|
|
8302
|
+
children: [
|
|
8303
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "size-3 shrink-0", "aria-hidden": "true" }),
|
|
8304
|
+
dueDate
|
|
8305
|
+
]
|
|
8306
|
+
}
|
|
8307
|
+
) : /* @__PURE__ */ jsx("span", {}),
|
|
8308
|
+
assignee && /* @__PURE__ */ jsx(Avatar, { size: "xs", name: assignee.name, src: assignee.src, title: assignee.name })
|
|
8309
|
+
] })
|
|
8310
|
+
] }) : children });
|
|
8073
8311
|
});
|
|
8074
8312
|
KanbanCard.displayName = "KanbanCard";
|
|
8075
8313
|
var Toolbar = forwardRef(function Toolbar2({ className, children, ...props }, ref) {
|
|
@@ -8199,6 +8437,6 @@ var KbdHint = forwardRef(function KbdHint2({ className, children, ...props }, re
|
|
|
8199
8437
|
});
|
|
8200
8438
|
KbdHint.displayName = "KbdHint";
|
|
8201
8439
|
|
|
8202
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityItem, ActivityList, Alert, AlertCircleIcon, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTriangleIcon, AppHeader, AppHeaderActions, AppHeaderBreadcrumb, AppHeaderSearch, AppHeaderTitle, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, AspectRatio, AtSignIcon, Avatar, Badge, BarChartIcon, BellIcon, Blockquote, BoldIcon, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BriefcaseIcon, Building2Icon, BuildingIcon, Button, Calendar, CalendarIcon, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatBubbleIcon, CheckCircle2Icon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleDotIcon, CircleIcon, ClientSelect, ClipboardCheckIcon, ClockIcon, CloseIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, ComingSoon, CommandIcon, CommandPalette, ConfirmActionButton, Content15 as Content, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, CopyIcon, CornerDownLeftIcon, CreditCardIcon, DATE_DISPLAY_PLACEHOLDER, DangerAction, DataItem, DataTable, DataTableBody, DataTableCell, DataTableCellDue, DataTableCellId, DataTableCellMono, DataTableCellName, DataTableCheckbox, DataTableHead, DataTableHeader, DataTablePagination, DataTableResultsCount, DataTableRow, DataTableSearch, DataTableSpacer, DataTableToolbar, DatePicker, DetailGrid, DetailMain, DetailSpine, DetailSpineHeader, DetailSpineSection, DetailSpineStats, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DismissibleChip, DocumentIcon, DollarSignIcon, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EyeIcon, EyeOffIcon, Eyebrow, FileIcon, FileReturnIcon, FileTextIcon, FileUpload, FilterChip, FilterIcon, FlagIcon, FolderClosedIcon, FolderOpenIcon, FolderPlusIcon, FormError, FormSection, FormSuccess, GlobeIcon, GoogleBrandIcon, HelpCircleIcon, HistoryIcon, HomeIcon, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, IconAction, InboxIcon, InfoIcon, Input, ItalicIcon, Kanban, KanbanCard, KanbanColumn, KanbanIcon, KbdHint, KeyIcon, KeyboardShortcutsDialog, KpiCard, Label4 as Label, LayoutDashboardIcon, LayoutGridIcon, LayoutListIcon, LightningIcon, Link2Icon, LinkAction, LinkButton, LinkIcon, ListChecksIcon, ListIcon, ListOrderedIcon, LoaderIcon, LoadingRows, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, Logo, MailIcon, Main, MapPinIcon, MenuIcon, MessageCircleIcon, MessageCircleWarningIcon, MetadataGrid, MicrosoftBrandIcon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveIcon, MultiFilterPill, MultiSelectField, MutedSpec, Numeric, OTPInput, PageHeader, PageHeaderSep, PageHeaderSpec, Pagination, PaletteIcon, PanelLeftCloseIcon, PanelLeftIcon, PaperclipIcon, PenSignIcon, PencilIcon, PhoneIcon, PhoneInput, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PrimaryAction, ProgressBar, ProgressRing, RadioGroup3 as RadioGroup, RadioGroupItem, ReceiptIcon, ReplyIcon, RotateCcwIcon, SaveIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, SearchSelect, SecondaryAction, Section, SectionHead, SectionHeader, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SendIcon, Separator4 as Separator, SettingsIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Shell, ShieldIcon, SideDrawer, Sidebar, SidebarBrand, SidebarBrandText, SidebarFooter, SidebarLink, SidebarLinkAction, SidebarLinkBadge, SidebarLinkGroup, SidebarLinkLabel, SidebarProvider, SidebarSection, SidebarTrigger, SidebarUser, Skeleton, SkeletonCircle, SkeletonText, SlashIcon, Slider, SmartphoneIcon, SparkleIcon, SparklesIcon, StarIcon, StarRating, Stat, Stepper, StrikethroughIcon, SubmitButton, SunIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableIcon, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagIcon, TeamIcon, TeamMemberSelect, Textarea, ToastProvider, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Trash2Icon, TrashIcon, UnderlineIcon, UploadIcon, UserCircleIcon, UserIcon, UsersIcon, VisuallyHidden, WorkflowIcon, XIcon, ZoomInIcon, ZoomOutIcon, alertVariants, badgeVariants, buttonVariants, cardVariants, cn, colors, displayToIso, filterChipVariants, inputVariants, isoToDisplay,
|
|
8440
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityItem, ActivityList, Alert, AlertCircleIcon, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTriangleIcon, AlertTriangleSolidIcon, AppHeader, AppHeaderActions, AppHeaderBreadcrumb, AppHeaderSearch, AppHeaderTitle, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, AspectRatio, AtSignIcon, Avatar, Badge, BarChartIcon, BellIcon, Blockquote, BoldIcon, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BriefcaseIcon, Building2Icon, BuildingIcon, Button, Calendar, CalendarIcon, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatBubbleIcon, CheckCircle2Icon, CheckCircleSolidIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleDotIcon, CircleIcon, ClientSelect, ClipboardCheckIcon, ClockIcon, CloseIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, ComingSoon, CommandIcon, CommandPalette, ConfirmActionButton, Content15 as Content, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, CopyIcon, CornerDownLeftIcon, CreditCardIcon, DATE_DISPLAY_PLACEHOLDER, DangerAction, DataItem, DataTable, DataTableBody, DataTableCell, DataTableCellDue, DataTableCellId, DataTableCellMono, DataTableCellName, DataTableCheckbox, DataTableHead, DataTableHeader, DataTablePagination, DataTableResultsCount, DataTableRow, DataTableSearch, DataTableSpacer, DataTableToolbar, DatePicker, DetailGrid, DetailMain, DetailSpine, DetailSpineHeader, DetailSpineSection, DetailSpineStats, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DismissibleChip, DocumentIcon, DollarSignIcon, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EyeIcon, EyeOffIcon, Eyebrow, FileIcon, FileReturnIcon, FileTextIcon, FileUpload, FilterChip, FilterIcon, FlagIcon, FolderClosedIcon, FolderOpenIcon, FolderPlusIcon, FormError, FormSection, FormSuccess, GlobeIcon, GoogleBrandIcon, HelpCircleIcon, HistoryIcon, HomeIcon, HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger, IconAction, InboxIcon, InfoCircleSolidIcon, InfoIcon, Input, ItalicIcon, Kanban, KanbanCard, KanbanColumn, KanbanIcon, KbdHint, KeyIcon, KeyboardShortcutsDialog, KpiCard, Label4 as Label, LayoutDashboardIcon, LayoutGridIcon, LayoutListIcon, LightningIcon, Link2Icon, LinkAction, LinkButton, LinkIcon, ListChecksIcon, ListIcon, ListOrderedIcon, LoaderIcon, LoadingRows, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, Logo, MailIcon, Main, MapPinIcon, MenuIcon, MessageCircleIcon, MessageCircleWarningIcon, MetadataGrid, MicrosoftBrandIcon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoveIcon, MultiFilterPill, MultiSelectField, MutedSpec, Numeric, OTPInput, PageHeader, PageHeaderSep, PageHeaderSpec, Pagination, PaletteIcon, PanelLeftCloseIcon, PanelLeftIcon, PaperclipIcon, PenSignIcon, PencilIcon, PhoneIcon, PhoneInput, PlusIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, PrimaryAction, ProgressBar, ProgressRing, RadioGroup3 as RadioGroup, RadioGroupItem, ReceiptIcon, ReplyIcon, RotateCcwIcon, SaveIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, SearchSelect, SecondaryAction, Section, SectionHead, SectionHeader, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SendIcon, Separator4 as Separator, SettingsIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Shell, ShieldIcon, SideDrawer, Sidebar, SidebarBrand, SidebarBrandText, SidebarFooter, SidebarLink, SidebarLinkAction, SidebarLinkBadge, SidebarLinkGroup, SidebarLinkLabel, SidebarProvider, SidebarSection, SidebarTrigger, SidebarUser, Skeleton, SkeletonCircle, SkeletonText, SlashIcon, Slider, SmartphoneIcon, SparkleIcon, SparklesIcon, StarIcon, StarRating, Stat, Stepper, StrikethroughIcon, SubmitButton, SunIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableIcon, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagIcon, TeamIcon, TeamMemberSelect, Textarea, ToastProvider, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Trash2Icon, TrashIcon, TrendingDownIcon, TrendingUpIcon, UnderlineIcon, UploadIcon, UserCircleIcon, UserIcon, UsersIcon, VisuallyHidden, WorkflowIcon, XCircleSolidIcon, XIcon, ZoomInIcon, ZoomOutIcon, alertVariants, badgeVariants, buttonVariants, cardVariants, cn, colors, displayToIso, filterChipVariants, inputVariants, isoToDisplay, labelVariants, progressBarVariants, progressRingVariants, radii, reference, searchInputVariants, shadows, sidebarLinkBadgeVariants, spacing, starRatingVariants, surfaces, systemTokens, textareaVariants, typography, useSidebarState, useToast };
|
|
8203
8441
|
//# sourceMappingURL=index.js.map
|
|
8204
8442
|
//# sourceMappingURL=index.js.map
|