@lessly/ui 4.2.0 → 5.0.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/{chunk-OMJRQ4JY.js → chunk-OTYVKDP2.js} +4 -3
- package/dist/index.d.ts +79 -6
- package/dist/index.js +318 -187
- package/dist/router.js +1 -1
- package/dist/styles-federated.css +13 -5
- package/dist/styles.css +14 -42
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
useSidebar,
|
|
28
28
|
useSidebarDismiss,
|
|
29
29
|
useSidebarDrawer
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-OTYVKDP2.js";
|
|
31
31
|
|
|
32
32
|
// src/components/auto-height.tsx
|
|
33
33
|
import * as React from "react";
|
|
@@ -283,7 +283,7 @@ var DropdownMenuSubContent = React4.forwardRef(({ className, ...props }, ref) =>
|
|
|
283
283
|
{
|
|
284
284
|
ref,
|
|
285
285
|
className: cn(
|
|
286
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-
|
|
286
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-overlay p-1 text-text-primary shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
287
287
|
className
|
|
288
288
|
),
|
|
289
289
|
...props
|
|
@@ -298,7 +298,7 @@ var DropdownMenuContent = React4.forwardRef(({ className, sideOffset = 4, collis
|
|
|
298
298
|
collisionPadding,
|
|
299
299
|
style: { maxHeight: "var(--radix-dropdown-menu-content-available-height, 24rem)", ...style },
|
|
300
300
|
className: cn(
|
|
301
|
-
"z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border border-border-subtle bg-bg-
|
|
301
|
+
"z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border border-border-subtle bg-bg-overlay p-1 text-text-primary shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
302
302
|
className
|
|
303
303
|
),
|
|
304
304
|
...props
|
|
@@ -1077,7 +1077,7 @@ var PopoverContent = React18.forwardRef(({ className, align = "center", sideOffs
|
|
|
1077
1077
|
align,
|
|
1078
1078
|
sideOffset,
|
|
1079
1079
|
className: cn(
|
|
1080
|
-
"z-50 w-72 rounded-md border border-border-subtle bg-bg-
|
|
1080
|
+
"z-50 w-72 rounded-md border border-border-subtle bg-bg-overlay p-4 text-text-primary shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1081
1081
|
className
|
|
1082
1082
|
),
|
|
1083
1083
|
...props
|
|
@@ -1098,7 +1098,7 @@ var HoverCardContent = React19.forwardRef(({ className, align = "center", sideOf
|
|
|
1098
1098
|
align,
|
|
1099
1099
|
sideOffset,
|
|
1100
1100
|
className: cn(
|
|
1101
|
-
"z-50 w-64 rounded-md border border-border-subtle bg-bg-
|
|
1101
|
+
"z-50 w-64 rounded-md border border-border-subtle bg-bg-overlay p-4 text-text-primary shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1102
1102
|
className
|
|
1103
1103
|
),
|
|
1104
1104
|
...props
|
|
@@ -1298,7 +1298,7 @@ var ContextMenuSubContent = React22.forwardRef(({ className, ...props }, ref) =>
|
|
|
1298
1298
|
{
|
|
1299
1299
|
ref,
|
|
1300
1300
|
className: cn(
|
|
1301
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-
|
|
1301
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-overlay p-1 text-text-primary shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
1302
1302
|
className
|
|
1303
1303
|
),
|
|
1304
1304
|
...props
|
|
@@ -1310,7 +1310,7 @@ var ContextMenuContent = React22.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1310
1310
|
{
|
|
1311
1311
|
ref,
|
|
1312
1312
|
className: cn(
|
|
1313
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-
|
|
1313
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-overlay p-1 text-text-primary shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1314
1314
|
className
|
|
1315
1315
|
),
|
|
1316
1316
|
...props
|
|
@@ -1402,7 +1402,7 @@ var Menubar = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1402
1402
|
{
|
|
1403
1403
|
ref,
|
|
1404
1404
|
className: cn(
|
|
1405
|
-
"flex h-10 items-center gap-1 rounded-md border border-border-subtle bg-bg-
|
|
1405
|
+
"flex h-10 items-center gap-1 rounded-md border border-border-subtle bg-bg-overlay p-1",
|
|
1406
1406
|
className
|
|
1407
1407
|
),
|
|
1408
1408
|
...props
|
|
@@ -1443,7 +1443,7 @@ var MenubarSubContent = React23.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1443
1443
|
{
|
|
1444
1444
|
ref,
|
|
1445
1445
|
className: cn(
|
|
1446
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-
|
|
1446
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-overlay p-1 text-text-primary shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1447
1447
|
className
|
|
1448
1448
|
),
|
|
1449
1449
|
...props
|
|
@@ -1458,7 +1458,7 @@ var MenubarContent = React23.forwardRef(({ className, align = "start", alignOffs
|
|
|
1458
1458
|
alignOffset,
|
|
1459
1459
|
sideOffset,
|
|
1460
1460
|
className: cn(
|
|
1461
|
-
"z-50 min-w-[12rem] overflow-hidden rounded-md border border-border-subtle bg-bg-
|
|
1461
|
+
"z-50 min-w-[12rem] overflow-hidden rounded-md border border-border-subtle bg-bg-overlay p-1 text-text-primary shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1462
1462
|
className
|
|
1463
1463
|
),
|
|
1464
1464
|
...props
|
|
@@ -1888,7 +1888,7 @@ var AccordionContent = React32.forwardRef(({ className, children, ...props }, re
|
|
|
1888
1888
|
{
|
|
1889
1889
|
ref,
|
|
1890
1890
|
className: cn(
|
|
1891
|
-
"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
1891
|
+
"overflow-hidden text-sm duration-200 data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
1892
1892
|
),
|
|
1893
1893
|
...props,
|
|
1894
1894
|
children: /* @__PURE__ */ jsx39("div", { className: cn("pb-4 pt-0", className), children })
|
|
@@ -1907,7 +1907,16 @@ var CollapsibleContent2 = React33.forwardRef(({ className, ...props }, ref) => /
|
|
|
1907
1907
|
{
|
|
1908
1908
|
ref,
|
|
1909
1909
|
className: cn(
|
|
1910
|
-
|
|
1910
|
+
// `duration-200` is not decoration and not the 200: it is what makes `prefers-reduced-motion`
|
|
1911
|
+
// reach the height. `animate-collapsible-*` reads `--tw-duration`, only a `duration-*` sets
|
|
1912
|
+
// it, and unset it falls to tw-animate-css's own literal 0.2s, which no media query can
|
|
1913
|
+
// collapse. The step resolves to `var(--motion-duration-normal)`, which the token layer takes
|
|
1914
|
+
// to 0ms, so a disclosure opens instantly for a reader who asked for that. Dialog, AlertDialog
|
|
1915
|
+
// and Sheet name theirs for the same reason. A caller's `className` merges into this element,
|
|
1916
|
+
// so a `duration-*` passed here replaces the step and a value the preset does not name
|
|
1917
|
+
// replaces the variable with a literal; `AccordionContent` puts its own `className` on the
|
|
1918
|
+
// padding box instead and cannot be overridden this way.
|
|
1919
|
+
"overflow-hidden text-sm duration-200 data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
|
|
1911
1920
|
className
|
|
1912
1921
|
),
|
|
1913
1922
|
...props
|
|
@@ -2138,14 +2147,14 @@ var Command = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2138
2147
|
{
|
|
2139
2148
|
ref,
|
|
2140
2149
|
className: cn(
|
|
2141
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-bg-
|
|
2150
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-bg-overlay text-text-primary",
|
|
2142
2151
|
className
|
|
2143
2152
|
),
|
|
2144
2153
|
...props
|
|
2145
2154
|
}
|
|
2146
2155
|
));
|
|
2147
2156
|
Command.displayName = CommandPrimitive.displayName;
|
|
2148
|
-
var KeyCap = ({ children }) => /* @__PURE__ */ jsx44("kbd", { className: "inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border-default bg-bg-
|
|
2157
|
+
var KeyCap = ({ children }) => /* @__PURE__ */ jsx44("kbd", { className: "inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border-default bg-bg-secondary px-1 font-sans text-xs text-text-secondary", children });
|
|
2149
2158
|
var CommandKeyHints = () => /* @__PURE__ */ jsx44("div", { className: "flex items-center gap-4 border-t border-border-subtle bg-bg-sunken px-3 py-2 text-xs text-text-tertiary", children: [[["\u2191", "\u2193"], "to navigate"], [["\u21B5"], "to select"]].map(([keys, verb]) => /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-1.5", children: [
|
|
2150
2159
|
/* @__PURE__ */ jsx44("span", { className: "flex items-center gap-1", children: keys.map((key) => /* @__PURE__ */ jsx44(KeyCap, { children: key }, key)) }),
|
|
2151
2160
|
" ",
|
|
@@ -2177,7 +2186,7 @@ var CommandDialog = ({
|
|
|
2177
2186
|
document.addEventListener("keydown", onKey);
|
|
2178
2187
|
return () => document.removeEventListener("keydown", onKey);
|
|
2179
2188
|
}, [shortcut, open, onOpenChange]);
|
|
2180
|
-
return /* @__PURE__ */ jsx44(Dialog, { open, onOpenChange, ...props, children: /* @__PURE__ */ jsx44(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx44(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-text-tertiary [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: groups ? /* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
2189
|
+
return /* @__PURE__ */ jsx44(Dialog, { open, onOpenChange, ...props, children: /* @__PURE__ */ jsx44(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx44(Command, { label: placeholder, className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-text-tertiary [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: groups ? /* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
2181
2190
|
/* @__PURE__ */ jsx44(CommandInput, { placeholder }),
|
|
2182
2191
|
/* @__PURE__ */ jsxs23(CommandList, { className: "max-h-[420px]", children: [
|
|
2183
2192
|
/* @__PURE__ */ jsx44(CommandEmpty, { children: empty }),
|
|
@@ -2352,7 +2361,7 @@ var NavigationMenuViewport = React38.forwardRef(({ className, ...props }, ref) =
|
|
|
2352
2361
|
{
|
|
2353
2362
|
ref,
|
|
2354
2363
|
className: cn(
|
|
2355
|
-
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-border-subtle bg-bg-
|
|
2364
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-border-subtle bg-bg-overlay text-text-primary shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
2356
2365
|
className
|
|
2357
2366
|
),
|
|
2358
2367
|
...props
|
|
@@ -2441,7 +2450,7 @@ var Toaster = ({ ...props }) => {
|
|
|
2441
2450
|
className: "toaster group",
|
|
2442
2451
|
toastOptions: {
|
|
2443
2452
|
classNames: {
|
|
2444
|
-
toast: "group toast bg-bg-
|
|
2453
|
+
toast: "group toast bg-bg-overlay border border-border-subtle text-text-primary shadow-lg",
|
|
2445
2454
|
description: "text-text-secondary",
|
|
2446
2455
|
actionButton: "bg-blue-400 text-text-on-brand",
|
|
2447
2456
|
cancelButton: "bg-bg-secondary text-text-primary"
|
|
@@ -3310,8 +3319,10 @@ function ConfirmDialog({
|
|
|
3310
3319
|
title,
|
|
3311
3320
|
description,
|
|
3312
3321
|
confirmLabel = "Confirm",
|
|
3322
|
+
continueLabel,
|
|
3313
3323
|
cancelLabel = "Cancel",
|
|
3314
3324
|
destructive = false,
|
|
3325
|
+
confirmFirst = false,
|
|
3315
3326
|
confirmPhrase,
|
|
3316
3327
|
stepUp,
|
|
3317
3328
|
onConfirm,
|
|
@@ -3326,7 +3337,8 @@ function ConfirmDialog({
|
|
|
3326
3337
|
const [stepped, setStepped] = React50.useState(false);
|
|
3327
3338
|
const phraseId = `${React50.useId()}-phrase`;
|
|
3328
3339
|
const phraseMet = !confirmPhrase || typed.trim().toLowerCase() === confirmPhrase.trim().toLowerCase();
|
|
3329
|
-
const
|
|
3340
|
+
const holdsPanel = Boolean(confirmPhrase) || confirmFirst;
|
|
3341
|
+
const challenging = Boolean(stepUp) && (!holdsPanel || stepped);
|
|
3330
3342
|
const panelTitle = challenging ? stepUp?.title ?? title : title;
|
|
3331
3343
|
const panelDescription = challenging ? stepUp?.description ?? description : description;
|
|
3332
3344
|
const reset = () => {
|
|
@@ -3389,10 +3401,11 @@ function ConfirmDialog({
|
|
|
3389
3401
|
codeLength: stepUp?.codeLength,
|
|
3390
3402
|
onMethodChange: stepUp?.onMethodChange,
|
|
3391
3403
|
confirmLabel,
|
|
3392
|
-
|
|
3404
|
+
destructive,
|
|
3405
|
+
backLabel: holdsPanel ? "Back" : cancelLabel,
|
|
3393
3406
|
onBack: () => {
|
|
3394
3407
|
setError(null);
|
|
3395
|
-
if (
|
|
3408
|
+
if (holdsPanel) setStepped(false);
|
|
3396
3409
|
else setOpen(false);
|
|
3397
3410
|
},
|
|
3398
3411
|
verifying: busy,
|
|
@@ -3405,12 +3418,12 @@ function ConfirmDialog({
|
|
|
3405
3418
|
/* @__PURE__ */ jsxs35(
|
|
3406
3419
|
Button,
|
|
3407
3420
|
{
|
|
3408
|
-
variant: destructive ? "destructive-solid" : "default",
|
|
3421
|
+
variant: destructive && !stepUp ? "destructive-solid" : "default",
|
|
3409
3422
|
disabled: busy || !phraseMet,
|
|
3410
3423
|
onClick: () => stepUp ? setStepped(true) : void handleConfirm(),
|
|
3411
3424
|
children: [
|
|
3412
3425
|
busy && /* @__PURE__ */ jsx60(Loader22, { className: "size-4 animate-spin", "aria-hidden": "true" }),
|
|
3413
|
-
confirmLabel
|
|
3426
|
+
stepUp ? continueLabel ?? confirmLabel : confirmLabel
|
|
3414
3427
|
]
|
|
3415
3428
|
}
|
|
3416
3429
|
)
|
|
@@ -5099,8 +5112,8 @@ Col.displayName = "Col";
|
|
|
5099
5112
|
// src/components/page-column.tsx
|
|
5100
5113
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
5101
5114
|
var WIDTH = {
|
|
5102
|
-
reading: "grid gap-5 page-column",
|
|
5103
|
-
full: "grid gap-5"
|
|
5115
|
+
reading: "grid grid-cols-1 gap-5 page-column",
|
|
5116
|
+
full: "grid grid-cols-1 gap-5"
|
|
5104
5117
|
};
|
|
5105
5118
|
function PageColumn({ className, width = "reading", ...props }) {
|
|
5106
5119
|
return /* @__PURE__ */ jsx83("div", { "data-slot": "page-column", className: cn(WIDTH[width], className), ...props });
|
|
@@ -5796,6 +5809,7 @@ import { BellRing, Settings } from "lucide-react";
|
|
|
5796
5809
|
|
|
5797
5810
|
// src/components/notification-row.tsx
|
|
5798
5811
|
import * as React77 from "react";
|
|
5812
|
+
import { Check as Check11 } from "lucide-react";
|
|
5799
5813
|
|
|
5800
5814
|
// src/components/notification-parts.tsx
|
|
5801
5815
|
import { Check as Check10 } from "lucide-react";
|
|
@@ -5830,30 +5844,63 @@ function DeepLinkControl({
|
|
|
5830
5844
|
|
|
5831
5845
|
// src/components/notification-row.tsx
|
|
5832
5846
|
import { jsx as jsx91, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5847
|
+
var DENSITY = {
|
|
5848
|
+
compact: {
|
|
5849
|
+
card: "px-3 py-2.5",
|
|
5850
|
+
body: "line-clamp-2 text-xs",
|
|
5851
|
+
deepLink: "text-xs font-semibold",
|
|
5852
|
+
actionChip: "rounded-md px-2.5 py-1 text-xs font-medium",
|
|
5853
|
+
actionText: "text-xs font-semibold",
|
|
5854
|
+
titleSettled: ""
|
|
5855
|
+
},
|
|
5856
|
+
comfortable: {
|
|
5857
|
+
card: "px-4 py-3",
|
|
5858
|
+
body: "text-sm",
|
|
5859
|
+
deepLink: "text-sm font-medium",
|
|
5860
|
+
actionChip: "rounded-md px-3 py-1.5 text-sm font-medium",
|
|
5861
|
+
actionText: "text-sm font-semibold",
|
|
5862
|
+
titleSettled: "font-medium"
|
|
5863
|
+
}
|
|
5864
|
+
};
|
|
5833
5865
|
var NotificationRow = React77.forwardRef(
|
|
5834
|
-
({
|
|
5866
|
+
({
|
|
5867
|
+
item,
|
|
5868
|
+
onItemClick,
|
|
5869
|
+
onActionClick,
|
|
5870
|
+
onMarkRead,
|
|
5871
|
+
formatAge,
|
|
5872
|
+
density = "compact",
|
|
5873
|
+
className,
|
|
5874
|
+
...props
|
|
5875
|
+
}, ref) => {
|
|
5876
|
+
const drawn = DENSITY[density];
|
|
5835
5877
|
const settled = isNotificationSettled(item);
|
|
5836
5878
|
const unread = !settled && !item.read;
|
|
5837
5879
|
const markable = Boolean(onMarkRead) && !item.read && item.cls !== "ephemeral";
|
|
5838
5880
|
const actions = settled ? [] : item.actions ?? [];
|
|
5839
5881
|
const stamp = item.createdAt ? item.createdAt instanceof Date ? item.createdAt : new Date(item.createdAt) : null;
|
|
5840
5882
|
const age = stamp ? formatAge ? formatAge(stamp) : formatRelativeAge(stamp) : null;
|
|
5883
|
+
const receiptLine = density === "comfortable" ? item.receipt : void 0;
|
|
5841
5884
|
return (
|
|
5842
5885
|
// Three steps of one ladder, and every one of them a token a reader can read:
|
|
5843
5886
|
// unread is the loudest, read is quieter, settled is quietest. An opacity is
|
|
5844
5887
|
// not a step — it drags the text under the contrast floor with the row.
|
|
5888
|
+
//
|
|
5889
|
+
// The fill is `bg-bg-overlay` and the lift is the hairline, because the bell's
|
|
5890
|
+
// panel is `bg-bg-overlay` too and that is the top of the ladder: on it a fill
|
|
5891
|
+
// can only step down, and stepping down inverts between the themes.
|
|
5845
5892
|
/* @__PURE__ */ jsxs59(
|
|
5846
5893
|
"div",
|
|
5847
5894
|
{
|
|
5848
5895
|
ref,
|
|
5849
|
-
className: cn("group rounded-lg
|
|
5896
|
+
className: cn("group rounded-lg border border-border-subtle bg-bg-overlay", drawn.card, className),
|
|
5850
5897
|
...props,
|
|
5851
5898
|
children: [
|
|
5852
5899
|
/* @__PURE__ */ jsxs59("div", { className: "flex items-start gap-2.5", children: [
|
|
5853
5900
|
/* @__PURE__ */ jsxs59("div", { className: "min-w-0 flex-1", children: [
|
|
5854
5901
|
/* @__PURE__ */ jsxs59("p", { className: "truncate text-xs text-text-tertiary", children: [
|
|
5855
5902
|
/* @__PURE__ */ jsx91("span", { className: "font-semibold", children: item.source }),
|
|
5856
|
-
item.receipt ? `, ${item.receipt}` : ""
|
|
5903
|
+
item.receipt && !receiptLine ? `, ${item.receipt}` : ""
|
|
5857
5904
|
] }),
|
|
5858
5905
|
/* @__PURE__ */ jsx91(
|
|
5859
5906
|
"button",
|
|
@@ -5862,7 +5909,7 @@ var NotificationRow = React77.forwardRef(
|
|
|
5862
5909
|
onClick: () => onItemClick?.(item),
|
|
5863
5910
|
className: cn(
|
|
5864
5911
|
"mt-0.5 block cursor-pointer text-left text-sm leading-tight underline-offset-2 hover:underline",
|
|
5865
|
-
settled ? "text-text-tertiary" : unread ? "font-semibold text-text-primary" : "text-text-secondary"
|
|
5912
|
+
settled ? cn("text-text-tertiary", drawn.titleSettled) : unread ? "font-semibold text-text-primary" : "text-text-secondary"
|
|
5866
5913
|
),
|
|
5867
5914
|
children: item.title
|
|
5868
5915
|
}
|
|
@@ -5871,7 +5918,8 @@ var NotificationRow = React77.forwardRef(
|
|
|
5871
5918
|
"p",
|
|
5872
5919
|
{
|
|
5873
5920
|
className: cn(
|
|
5874
|
-
"mt-0.5
|
|
5921
|
+
"mt-0.5",
|
|
5922
|
+
drawn.body,
|
|
5875
5923
|
settled ? "text-text-tertiary" : "text-text-secondary"
|
|
5876
5924
|
),
|
|
5877
5925
|
children: item.body
|
|
@@ -5883,7 +5931,11 @@ var NotificationRow = React77.forwardRef(
|
|
|
5883
5931
|
markable && /* @__PURE__ */ jsx91(MarkReadButton, { title: item.title, onClick: () => onMarkRead(item.id) })
|
|
5884
5932
|
] })
|
|
5885
5933
|
] }),
|
|
5886
|
-
(actions.length > 0 || item.deepLink) && /* @__PURE__ */ jsxs59("div", { className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-2", children: [
|
|
5934
|
+
(actions.length > 0 || item.deepLink || receiptLine) && /* @__PURE__ */ jsxs59("div", { className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-2", children: [
|
|
5935
|
+
receiptLine && /* @__PURE__ */ jsxs59("span", { className: "inline-flex items-center gap-1.5 text-sm text-text-tertiary", children: [
|
|
5936
|
+
/* @__PURE__ */ jsx91(Check11, { className: "size-3 shrink-0 text-text-success", "aria-hidden": "true" }),
|
|
5937
|
+
receiptLine
|
|
5938
|
+
] }),
|
|
5887
5939
|
actions.map((action) => {
|
|
5888
5940
|
const chip = action.variant === "primary" || action.variant === "destructive";
|
|
5889
5941
|
return /* @__PURE__ */ jsx91(
|
|
@@ -5895,9 +5947,19 @@ var NotificationRow = React77.forwardRef(
|
|
|
5895
5947
|
className: cn(
|
|
5896
5948
|
rowControlHitArea,
|
|
5897
5949
|
"cursor-pointer",
|
|
5898
|
-
chip ?
|
|
5950
|
+
chip ? cn(drawn.actionChip, "transition-colors duration-fast") : cn(
|
|
5951
|
+
drawn.actionText,
|
|
5952
|
+
"text-text-secondary transition-opacity duration-fast hover:opacity-80"
|
|
5953
|
+
),
|
|
5899
5954
|
action.variant === "primary" && "bg-bg-brand text-text-on-brand hover:bg-bg-brand-hover",
|
|
5900
|
-
|
|
5955
|
+
// The pair stays two filled chips, and the red one is the red wash rather than
|
|
5956
|
+
// a grey step: `bg-bg-elevated` is the same hex as the row's own `bg-bg-overlay`
|
|
5957
|
+
// in dark (1.000:1), so it had no fill left there at all. The wash steps off the
|
|
5958
|
+
// row in both (1.171:1 light, 1.328:1 dark) and is what
|
|
5959
|
+
// `Guidelines/Controls/Destructive actions` puts a destructive control on. The
|
|
5960
|
+
// pointer takes it to the solid plate, which is a hover affordance and not the
|
|
5961
|
+
// resting signal that page argues about.
|
|
5962
|
+
action.variant === "destructive" && "bg-bg-danger-subtle text-text-danger hover:bg-bg-danger hover:text-text-on-danger"
|
|
5901
5963
|
),
|
|
5902
5964
|
children: action.label
|
|
5903
5965
|
},
|
|
@@ -5912,7 +5974,8 @@ var NotificationRow = React77.forwardRef(
|
|
|
5912
5974
|
onClick: () => onItemClick?.(item),
|
|
5913
5975
|
className: cn(
|
|
5914
5976
|
rowControlHitArea,
|
|
5915
|
-
|
|
5977
|
+
drawn.deepLink,
|
|
5978
|
+
"text-text-brand transition-opacity duration-fast hover:opacity-80"
|
|
5916
5979
|
)
|
|
5917
5980
|
}
|
|
5918
5981
|
)
|
|
@@ -5974,7 +6037,7 @@ var NotificationBell = React78.forwardRef(
|
|
|
5974
6037
|
maxHeight: "var(--radix-popover-content-available-height, 32rem)",
|
|
5975
6038
|
maxWidth: "var(--radix-popover-content-available-width, 380px)"
|
|
5976
6039
|
},
|
|
5977
|
-
className: "flex w-[380px] flex-col overflow-hidden p-0",
|
|
6040
|
+
className: "flex w-[380px] flex-col overflow-hidden rounded-xl p-0",
|
|
5978
6041
|
children: [
|
|
5979
6042
|
/* @__PURE__ */ jsxs60("div", { className: "flex shrink-0 items-center justify-between px-5 py-3", children: [
|
|
5980
6043
|
/* @__PURE__ */ jsx92("span", { className: "text-sm font-bold text-text-primary", children: "Notification center" }),
|
|
@@ -6031,7 +6094,7 @@ NotificationBell.displayName = "NotificationBell";
|
|
|
6031
6094
|
|
|
6032
6095
|
// src/components/notification-center.tsx
|
|
6033
6096
|
import * as React79 from "react";
|
|
6034
|
-
import { Check as
|
|
6097
|
+
import { Check as Check12, Search as Search4 } from "lucide-react";
|
|
6035
6098
|
import { jsx as jsx93, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6036
6099
|
var chipBase = "cursor-pointer rounded-md px-3 py-1.5 text-sm font-medium transition-colors duration-fast";
|
|
6037
6100
|
var chipOn = "bg-bg-sunken font-semibold text-text-primary";
|
|
@@ -6078,7 +6141,7 @@ function CenterRow({
|
|
|
6078
6141
|
item.body && /* @__PURE__ */ jsx93("p", { className: "mt-0.5 text-sm leading-snug text-text-secondary", children: item.body }),
|
|
6079
6142
|
(item.receipt || item.deepLink) && /* @__PURE__ */ jsxs61("div", { className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-1.5", children: [
|
|
6080
6143
|
item.receipt && /* @__PURE__ */ jsxs61("span", { className: "inline-flex items-center gap-1.5 text-sm text-text-tertiary", children: [
|
|
6081
|
-
/* @__PURE__ */ jsx93(
|
|
6144
|
+
/* @__PURE__ */ jsx93(Check12, { className: "size-3 shrink-0 text-text-success", "aria-hidden": "true" }),
|
|
6082
6145
|
item.receipt
|
|
6083
6146
|
] }),
|
|
6084
6147
|
item.deepLink && /* @__PURE__ */ jsx93(
|
|
@@ -6452,7 +6515,7 @@ import { X as X4 } from "lucide-react";
|
|
|
6452
6515
|
import { jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6453
6516
|
var chipBase2 = "cursor-pointer rounded-lg px-2.5 py-1 text-sm font-medium transition-colors duration-fast";
|
|
6454
6517
|
var chipPrimary = "bg-bg-brand text-text-on-brand hover:bg-bg-brand-hover";
|
|
6455
|
-
var chipDestructive = "bg-bg-
|
|
6518
|
+
var chipDestructive = "bg-bg-danger-subtle text-text-danger hover:bg-bg-danger hover:text-text-on-danger";
|
|
6456
6519
|
var linkAction = "cursor-pointer text-sm font-semibold text-text-brand transition-colors duration-fast hover:text-text-primary";
|
|
6457
6520
|
var NotificationToast = React81.forwardRef(
|
|
6458
6521
|
({
|
|
@@ -6480,7 +6543,7 @@ var NotificationToast = React81.forwardRef(
|
|
|
6480
6543
|
role: "status",
|
|
6481
6544
|
"aria-live": item.severity === "critical" ? "assertive" : "polite",
|
|
6482
6545
|
className: cn(
|
|
6483
|
-
"rounded-2xl border border-border-subtle bg-bg-
|
|
6546
|
+
"rounded-2xl border border-border-subtle bg-bg-overlay p-4 shadow-(--menu-shadow)",
|
|
6484
6547
|
className
|
|
6485
6548
|
),
|
|
6486
6549
|
children: [
|
|
@@ -6656,6 +6719,80 @@ var NotificationToaster = React82.forwardRef(
|
|
|
6656
6719
|
);
|
|
6657
6720
|
NotificationToaster.displayName = "NotificationToaster";
|
|
6658
6721
|
|
|
6722
|
+
// src/components/onboarding-screen-shell.tsx
|
|
6723
|
+
import * as React83 from "react";
|
|
6724
|
+
|
|
6725
|
+
// src/lib/auth-surface.ts
|
|
6726
|
+
var AUTH_GLOW_BG = "radial-gradient(560px 320px at 28% 16%, var(--auth-glow-a), transparent 68%),radial-gradient(520px 340px at 78% 90%, var(--auth-glow-b), transparent 66%),var(--bg-sunken)";
|
|
6727
|
+
var AUTH_FILLED_BUTTON = "flex h-[46px] w-full items-center justify-center gap-[11px] rounded-[10px] border border-transparent bg-text-primary px-[14px] text-[14.5px] font-semibold tracking-[-0.005em] text-bg-sunken transition-opacity duration-fast hover:opacity-[0.92] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-text-brand active:translate-y-px disabled:cursor-not-allowed disabled:opacity-[0.55]";
|
|
6728
|
+
var AUTH_QUIET_BUTTON = "flex h-[46px] w-full items-center justify-center gap-[11px] rounded-[10px] border border-border-default bg-transparent px-[14px] text-[14.5px] font-medium tracking-[-0.005em] text-text-secondary transition-colors duration-fast hover:bg-bg-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-text-brand";
|
|
6729
|
+
var AUTH_BUTTON_SHADOW = "var(--auth-btn-shadow)";
|
|
6730
|
+
|
|
6731
|
+
// src/components/onboarding-screen-shell.tsx
|
|
6732
|
+
import { jsx as jsx97, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6733
|
+
var CARD_WIDTH = {
|
|
6734
|
+
md: "max-w-[440px]",
|
|
6735
|
+
lg: "max-w-[560px]"
|
|
6736
|
+
};
|
|
6737
|
+
var OnboardingScreenShell = React83.forwardRef(
|
|
6738
|
+
({
|
|
6739
|
+
logo,
|
|
6740
|
+
themeToggle = /* @__PURE__ */ jsx97(ThemeToggle, {}),
|
|
6741
|
+
title,
|
|
6742
|
+
description,
|
|
6743
|
+
footer,
|
|
6744
|
+
width = "md",
|
|
6745
|
+
children,
|
|
6746
|
+
className,
|
|
6747
|
+
...props
|
|
6748
|
+
}, ref) => /* @__PURE__ */ jsxs64(
|
|
6749
|
+
"div",
|
|
6750
|
+
{
|
|
6751
|
+
ref,
|
|
6752
|
+
className: cn(
|
|
6753
|
+
"relative flex min-h-screen w-full flex-col items-center justify-center overflow-hidden px-6 py-12 text-text-primary",
|
|
6754
|
+
className
|
|
6755
|
+
),
|
|
6756
|
+
style: { background: AUTH_GLOW_BG },
|
|
6757
|
+
...props,
|
|
6758
|
+
children: [
|
|
6759
|
+
themeToggle && /* @__PURE__ */ jsx97("div", { className: "absolute right-6 top-6", children: themeToggle }),
|
|
6760
|
+
/* @__PURE__ */ jsxs64(
|
|
6761
|
+
"div",
|
|
6762
|
+
{
|
|
6763
|
+
className: cn(
|
|
6764
|
+
"relative w-full rounded-2xl bg-bg-surface px-[34px] pb-[30px] pt-[38px] text-center",
|
|
6765
|
+
CARD_WIDTH[width]
|
|
6766
|
+
),
|
|
6767
|
+
style: {
|
|
6768
|
+
border: "1px solid var(--auth-card-border)",
|
|
6769
|
+
boxShadow: "var(--auth-card-shadow)"
|
|
6770
|
+
},
|
|
6771
|
+
children: [
|
|
6772
|
+
logo && /* @__PURE__ */ jsx97("div", { className: "mb-[22px] flex items-center justify-center text-xl font-bold leading-none tracking-[-0.02em] text-text-primary", children: logo }),
|
|
6773
|
+
title != null && /* @__PURE__ */ jsx97(
|
|
6774
|
+
"h1",
|
|
6775
|
+
{
|
|
6776
|
+
className: cn(
|
|
6777
|
+
"text-lg font-semibold leading-[1.25] tracking-[-0.015em] text-text-primary",
|
|
6778
|
+
// Without a description the headline itself carries the gap to the form.
|
|
6779
|
+
description ? "mb-[8px]" : "mb-[24px]"
|
|
6780
|
+
),
|
|
6781
|
+
children: title
|
|
6782
|
+
}
|
|
6783
|
+
),
|
|
6784
|
+
description && /* @__PURE__ */ jsx97("p", { className: "mx-auto mb-[24px] max-w-[320px] text-sm text-text-secondary", children: description }),
|
|
6785
|
+
/* @__PURE__ */ jsx97("div", { className: "text-left", children }),
|
|
6786
|
+
footer != null && /* @__PURE__ */ jsx97("div", { className: "mt-[24px] text-xs tracking-[0.005em] text-text-tertiary", children: footer })
|
|
6787
|
+
]
|
|
6788
|
+
}
|
|
6789
|
+
)
|
|
6790
|
+
]
|
|
6791
|
+
}
|
|
6792
|
+
)
|
|
6793
|
+
);
|
|
6794
|
+
OnboardingScreenShell.displayName = "OnboardingScreenShell";
|
|
6795
|
+
|
|
6659
6796
|
// src/lib/countries.ts
|
|
6660
6797
|
var COUNTRY_OPTIONS = [
|
|
6661
6798
|
{ value: "AF", label: "Afghanistan" },
|
|
@@ -6910,15 +7047,8 @@ var COUNTRY_OPTIONS = [
|
|
|
6910
7047
|
];
|
|
6911
7048
|
|
|
6912
7049
|
// src/components/organization-onboarding-form.tsx
|
|
6913
|
-
import * as
|
|
6914
|
-
|
|
6915
|
-
// src/lib/auth-surface.ts
|
|
6916
|
-
var AUTH_FILLED_BUTTON = "flex h-[46px] w-full items-center justify-center gap-[11px] rounded-[10px] border border-transparent bg-text-primary px-[14px] text-[14.5px] font-semibold tracking-[-0.005em] text-bg-sunken transition-opacity duration-fast hover:opacity-[0.92] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-text-brand active:translate-y-px disabled:cursor-not-allowed disabled:opacity-[0.55]";
|
|
6917
|
-
var AUTH_QUIET_BUTTON = "flex h-[46px] w-full items-center justify-center gap-[11px] rounded-[10px] border border-border-default bg-transparent px-[14px] text-[14.5px] font-medium tracking-[-0.005em] text-text-secondary transition-colors duration-fast hover:bg-bg-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-text-brand";
|
|
6918
|
-
var AUTH_BUTTON_SHADOW = "var(--auth-btn-shadow)";
|
|
6919
|
-
|
|
6920
|
-
// src/components/organization-onboarding-form.tsx
|
|
6921
|
-
import { jsx as jsx97, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
7050
|
+
import * as React84 from "react";
|
|
7051
|
+
import { jsx as jsx98, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6922
7052
|
var CONTROLLER_SHARE_PCT = 50;
|
|
6923
7053
|
var MAX_BENEFICIAL_OWNERS = 50;
|
|
6924
7054
|
var REQUIRED_FIELD_LABELS = {
|
|
@@ -6933,7 +7063,7 @@ function isOwnershipViolation(violation) {
|
|
|
6933
7063
|
return /ownership[_\s-]?confirmed/i.test(violation);
|
|
6934
7064
|
}
|
|
6935
7065
|
function RequiredMark() {
|
|
6936
|
-
return /* @__PURE__ */
|
|
7066
|
+
return /* @__PURE__ */ jsx98("span", { className: "text-text-danger", children: " *" });
|
|
6937
7067
|
}
|
|
6938
7068
|
function parseShare(raw) {
|
|
6939
7069
|
if (!/^\d{1,3}$/.test(raw.trim())) return null;
|
|
@@ -6962,23 +7092,23 @@ function OrganizationOnboardingForm({
|
|
|
6962
7092
|
onCancel,
|
|
6963
7093
|
className
|
|
6964
7094
|
}) {
|
|
6965
|
-
const [name, setName] =
|
|
6966
|
-
const [legalName, setLegalName] =
|
|
6967
|
-
const [ownerName, setOwnerName] =
|
|
6968
|
-
const [countryOfIncorporation, setCountryOfIncorporation] =
|
|
7095
|
+
const [name, setName] = React84.useState(defaultValues?.name ?? "");
|
|
7096
|
+
const [legalName, setLegalName] = React84.useState(defaultValues?.legal_name ?? "");
|
|
7097
|
+
const [ownerName, setOwnerName] = React84.useState(defaultValues?.owner_name ?? "");
|
|
7098
|
+
const [countryOfIncorporation, setCountryOfIncorporation] = React84.useState(
|
|
6969
7099
|
defaultValues?.country_of_incorporation ?? ""
|
|
6970
7100
|
);
|
|
6971
|
-
const [residencyCountry, setResidencyCountry] =
|
|
7101
|
+
const [residencyCountry, setResidencyCountry] = React84.useState(
|
|
6972
7102
|
defaultValues?.residency_country ?? ""
|
|
6973
7103
|
);
|
|
6974
|
-
const [owners, setOwners] =
|
|
7104
|
+
const [owners, setOwners] = React84.useState(
|
|
6975
7105
|
() => initialRows(defaultValues?.beneficial_owners)
|
|
6976
7106
|
);
|
|
6977
|
-
const [ownershipConfirmed, setOwnershipConfirmed] =
|
|
6978
|
-
const [confirmationAttempted, setConfirmationAttempted] =
|
|
6979
|
-
const [requiredAttempted, setRequiredAttempted] =
|
|
6980
|
-
const nextKeyRef =
|
|
6981
|
-
const submittingRef =
|
|
7107
|
+
const [ownershipConfirmed, setOwnershipConfirmed] = React84.useState(false);
|
|
7108
|
+
const [confirmationAttempted, setConfirmationAttempted] = React84.useState(false);
|
|
7109
|
+
const [requiredAttempted, setRequiredAttempted] = React84.useState(false);
|
|
7110
|
+
const nextKeyRef = React84.useRef(owners.length);
|
|
7111
|
+
const submittingRef = React84.useRef(false);
|
|
6982
7112
|
const trimmed = name.trim();
|
|
6983
7113
|
const filledOwners = owners.filter((row) => !isRowBlank(row));
|
|
6984
7114
|
const ownerShares = filledOwners.map((row) => parseShare(row.share));
|
|
@@ -7040,7 +7170,7 @@ function OrganizationOnboardingForm({
|
|
|
7040
7170
|
...needsOwnershipConfirmation ? { ownership_confirmed: ownershipConfirmed } : {}
|
|
7041
7171
|
});
|
|
7042
7172
|
};
|
|
7043
|
-
|
|
7173
|
+
React84.useEffect(() => {
|
|
7044
7174
|
submittingRef.current = false;
|
|
7045
7175
|
}, [
|
|
7046
7176
|
name,
|
|
@@ -7053,12 +7183,12 @@ function OrganizationOnboardingForm({
|
|
|
7053
7183
|
submitting,
|
|
7054
7184
|
serverError
|
|
7055
7185
|
]);
|
|
7056
|
-
const countryField = (params) => /* @__PURE__ */
|
|
7057
|
-
/* @__PURE__ */
|
|
7186
|
+
const countryField = (params) => /* @__PURE__ */ jsxs65("div", { className: "space-y-1.5", children: [
|
|
7187
|
+
/* @__PURE__ */ jsxs65(Label2, { htmlFor: params.id, children: [
|
|
7058
7188
|
params.label,
|
|
7059
|
-
/* @__PURE__ */
|
|
7189
|
+
/* @__PURE__ */ jsx98(RequiredMark, {})
|
|
7060
7190
|
] }),
|
|
7061
|
-
/* @__PURE__ */
|
|
7191
|
+
/* @__PURE__ */ jsx98(
|
|
7062
7192
|
Select,
|
|
7063
7193
|
{
|
|
7064
7194
|
id: params.id,
|
|
@@ -7071,13 +7201,13 @@ function OrganizationOnboardingForm({
|
|
|
7071
7201
|
}
|
|
7072
7202
|
)
|
|
7073
7203
|
] });
|
|
7074
|
-
return /* @__PURE__ */
|
|
7075
|
-
/* @__PURE__ */
|
|
7076
|
-
/* @__PURE__ */
|
|
7204
|
+
return /* @__PURE__ */ jsxs65("form", { onSubmit: handleSubmit, className: cn("space-y-4", className), children: [
|
|
7205
|
+
/* @__PURE__ */ jsxs65("div", { className: "space-y-1.5", children: [
|
|
7206
|
+
/* @__PURE__ */ jsxs65(Label2, { htmlFor: "create-org-name", children: [
|
|
7077
7207
|
REQUIRED_FIELD_LABELS.name,
|
|
7078
|
-
/* @__PURE__ */
|
|
7208
|
+
/* @__PURE__ */ jsx98(RequiredMark, {})
|
|
7079
7209
|
] }),
|
|
7080
|
-
/* @__PURE__ */
|
|
7210
|
+
/* @__PURE__ */ jsx98(
|
|
7081
7211
|
Input,
|
|
7082
7212
|
{
|
|
7083
7213
|
id: "create-org-name",
|
|
@@ -7088,12 +7218,12 @@ function OrganizationOnboardingForm({
|
|
|
7088
7218
|
}
|
|
7089
7219
|
)
|
|
7090
7220
|
] }),
|
|
7091
|
-
/* @__PURE__ */
|
|
7092
|
-
/* @__PURE__ */
|
|
7221
|
+
/* @__PURE__ */ jsxs65("div", { className: "space-y-1.5", children: [
|
|
7222
|
+
/* @__PURE__ */ jsxs65(Label2, { htmlFor: "create-org-legal-name", children: [
|
|
7093
7223
|
REQUIRED_FIELD_LABELS.legalName,
|
|
7094
|
-
/* @__PURE__ */
|
|
7224
|
+
/* @__PURE__ */ jsx98(RequiredMark, {})
|
|
7095
7225
|
] }),
|
|
7096
|
-
/* @__PURE__ */
|
|
7226
|
+
/* @__PURE__ */ jsx98(
|
|
7097
7227
|
Input,
|
|
7098
7228
|
{
|
|
7099
7229
|
id: "create-org-legal-name",
|
|
@@ -7104,12 +7234,12 @@ function OrganizationOnboardingForm({
|
|
|
7104
7234
|
}
|
|
7105
7235
|
)
|
|
7106
7236
|
] }),
|
|
7107
|
-
/* @__PURE__ */
|
|
7108
|
-
/* @__PURE__ */
|
|
7237
|
+
/* @__PURE__ */ jsxs65("div", { className: "space-y-1.5", children: [
|
|
7238
|
+
/* @__PURE__ */ jsxs65(Label2, { htmlFor: "create-org-owner-name", children: [
|
|
7109
7239
|
REQUIRED_FIELD_LABELS.ownerName,
|
|
7110
|
-
/* @__PURE__ */
|
|
7240
|
+
/* @__PURE__ */ jsx98(RequiredMark, {})
|
|
7111
7241
|
] }),
|
|
7112
|
-
/* @__PURE__ */
|
|
7242
|
+
/* @__PURE__ */ jsx98(
|
|
7113
7243
|
Input,
|
|
7114
7244
|
{
|
|
7115
7245
|
id: "create-org-owner-name",
|
|
@@ -7132,10 +7262,10 @@ function OrganizationOnboardingForm({
|
|
|
7132
7262
|
value: residencyCountry,
|
|
7133
7263
|
onChange: setResidencyCountry
|
|
7134
7264
|
}),
|
|
7135
|
-
/* @__PURE__ */
|
|
7136
|
-
/* @__PURE__ */
|
|
7137
|
-
/* @__PURE__ */
|
|
7138
|
-
/* @__PURE__ */
|
|
7265
|
+
/* @__PURE__ */ jsxs65("div", { className: "space-y-2", children: [
|
|
7266
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex items-center justify-between", children: [
|
|
7267
|
+
/* @__PURE__ */ jsx98(Label2, { children: "Beneficial owners" }),
|
|
7268
|
+
/* @__PURE__ */ jsx98(
|
|
7139
7269
|
Button,
|
|
7140
7270
|
{
|
|
7141
7271
|
type: "button",
|
|
@@ -7148,16 +7278,16 @@ function OrganizationOnboardingForm({
|
|
|
7148
7278
|
}
|
|
7149
7279
|
)
|
|
7150
7280
|
] }),
|
|
7151
|
-
owners.length === 0 && /* @__PURE__ */
|
|
7152
|
-
owners.map((row) => /* @__PURE__ */
|
|
7281
|
+
owners.length === 0 && /* @__PURE__ */ jsx98("p", { className: "text-xs text-text-tertiary", children: "List the natural persons who ultimately own or control the organization." }),
|
|
7282
|
+
owners.map((row) => /* @__PURE__ */ jsxs65(
|
|
7153
7283
|
"div",
|
|
7154
7284
|
{
|
|
7155
7285
|
"data-testid": `beneficial-owner-row-${row.key}`,
|
|
7156
7286
|
className: "flex items-end gap-2",
|
|
7157
7287
|
children: [
|
|
7158
|
-
/* @__PURE__ */
|
|
7159
|
-
/* @__PURE__ */
|
|
7160
|
-
/* @__PURE__ */
|
|
7288
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex-1 space-y-1", children: [
|
|
7289
|
+
/* @__PURE__ */ jsx98(Label2, { htmlFor: `bo-name-${row.key}`, className: "text-xs", children: "Name" }),
|
|
7290
|
+
/* @__PURE__ */ jsx98(
|
|
7161
7291
|
Input,
|
|
7162
7292
|
{
|
|
7163
7293
|
id: `bo-name-${row.key}`,
|
|
@@ -7167,9 +7297,9 @@ function OrganizationOnboardingForm({
|
|
|
7167
7297
|
}
|
|
7168
7298
|
)
|
|
7169
7299
|
] }),
|
|
7170
|
-
/* @__PURE__ */
|
|
7171
|
-
/* @__PURE__ */
|
|
7172
|
-
/* @__PURE__ */
|
|
7300
|
+
/* @__PURE__ */ jsxs65("div", { className: "w-40 space-y-1", children: [
|
|
7301
|
+
/* @__PURE__ */ jsx98(Label2, { htmlFor: `bo-country-${row.key}`, className: "text-xs", children: "Country" }),
|
|
7302
|
+
/* @__PURE__ */ jsx98(
|
|
7173
7303
|
Select,
|
|
7174
7304
|
{
|
|
7175
7305
|
id: `bo-country-${row.key}`,
|
|
@@ -7182,9 +7312,9 @@ function OrganizationOnboardingForm({
|
|
|
7182
7312
|
}
|
|
7183
7313
|
)
|
|
7184
7314
|
] }),
|
|
7185
|
-
/* @__PURE__ */
|
|
7186
|
-
/* @__PURE__ */
|
|
7187
|
-
/* @__PURE__ */
|
|
7315
|
+
/* @__PURE__ */ jsxs65("div", { className: "w-24 space-y-1", children: [
|
|
7316
|
+
/* @__PURE__ */ jsx98(Label2, { htmlFor: `bo-share-${row.key}`, className: "text-xs", children: "Share %" }),
|
|
7317
|
+
/* @__PURE__ */ jsx98(
|
|
7188
7318
|
Input,
|
|
7189
7319
|
{
|
|
7190
7320
|
id: `bo-share-${row.key}`,
|
|
@@ -7195,7 +7325,7 @@ function OrganizationOnboardingForm({
|
|
|
7195
7325
|
}
|
|
7196
7326
|
)
|
|
7197
7327
|
] }),
|
|
7198
|
-
/* @__PURE__ */
|
|
7328
|
+
/* @__PURE__ */ jsx98(
|
|
7199
7329
|
Button,
|
|
7200
7330
|
{
|
|
7201
7331
|
type: "button",
|
|
@@ -7210,16 +7340,16 @@ function OrganizationOnboardingForm({
|
|
|
7210
7340
|
},
|
|
7211
7341
|
row.key
|
|
7212
7342
|
)),
|
|
7213
|
-
!ownersValid && /* @__PURE__ */
|
|
7214
|
-
shareSum > 100 && /* @__PURE__ */
|
|
7343
|
+
!ownersValid && /* @__PURE__ */ jsx98("p", { "data-testid": "beneficial-owners-error", className: "text-xs text-text-danger", children: "Every owner needs a name, a country and a share between 0 and 100." }),
|
|
7344
|
+
shareSum > 100 && /* @__PURE__ */ jsxs65("p", { "data-testid": "beneficial-owners-sum-warning", className: "text-xs text-text-warning", children: [
|
|
7215
7345
|
"The listed shares add up to ",
|
|
7216
7346
|
shareSum,
|
|
7217
7347
|
"%, which is more than 100%."
|
|
7218
7348
|
] })
|
|
7219
7349
|
] }),
|
|
7220
|
-
needsOwnershipConfirmation && /* @__PURE__ */
|
|
7221
|
-
/* @__PURE__ */
|
|
7222
|
-
/* @__PURE__ */
|
|
7350
|
+
needsOwnershipConfirmation && /* @__PURE__ */ jsxs65("div", { className: "space-y-1", children: [
|
|
7351
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex items-start gap-2", children: [
|
|
7352
|
+
/* @__PURE__ */ jsx98(
|
|
7223
7353
|
Checkbox,
|
|
7224
7354
|
{
|
|
7225
7355
|
id: "create-org-ownership-confirmed",
|
|
@@ -7229,19 +7359,19 @@ function OrganizationOnboardingForm({
|
|
|
7229
7359
|
onCheckedChange: (value) => setOwnershipConfirmed(value === true)
|
|
7230
7360
|
}
|
|
7231
7361
|
),
|
|
7232
|
-
/* @__PURE__ */
|
|
7362
|
+
/* @__PURE__ */ jsxs65(
|
|
7233
7363
|
Label2,
|
|
7234
7364
|
{
|
|
7235
7365
|
htmlFor: "create-org-ownership-confirmed",
|
|
7236
7366
|
className: "text-xs font-regular leading-snug",
|
|
7237
7367
|
children: [
|
|
7238
7368
|
"I confirm the ownership structure above is complete and correct",
|
|
7239
|
-
/* @__PURE__ */
|
|
7369
|
+
/* @__PURE__ */ jsx98(RequiredMark, {})
|
|
7240
7370
|
]
|
|
7241
7371
|
}
|
|
7242
7372
|
)
|
|
7243
7373
|
] }),
|
|
7244
|
-
showConfirmationError && /* @__PURE__ */
|
|
7374
|
+
showConfirmationError && /* @__PURE__ */ jsx98(
|
|
7245
7375
|
"p",
|
|
7246
7376
|
{
|
|
7247
7377
|
id: "create-org-ownership-error",
|
|
@@ -7251,13 +7381,13 @@ function OrganizationOnboardingForm({
|
|
|
7251
7381
|
}
|
|
7252
7382
|
)
|
|
7253
7383
|
] }),
|
|
7254
|
-
showRequiredError && /* @__PURE__ */
|
|
7255
|
-
(serverError || otherViolations.length > 0) && /* @__PURE__ */
|
|
7384
|
+
showRequiredError && /* @__PURE__ */ jsx98(InlineError, { "data-testid": "create-org-required-error", children: missingRequired.length === 1 ? `${missingRequired[0]} is required` : `These fields are required: ${missingRequired.join(", ")}` }),
|
|
7385
|
+
(serverError || otherViolations.length > 0) && /* @__PURE__ */ jsxs65(InlineError, { "data-testid": "create-org-server-error", children: [
|
|
7256
7386
|
serverError,
|
|
7257
|
-
otherViolations.length > 0 && /* @__PURE__ */
|
|
7387
|
+
otherViolations.length > 0 && /* @__PURE__ */ jsx98("ul", { "data-testid": "create-org-violations", className: "mt-1 list-disc pl-4", children: otherViolations.map((violation) => /* @__PURE__ */ jsx98("li", { children: violation }, violation)) })
|
|
7258
7388
|
] }),
|
|
7259
|
-
/* @__PURE__ */
|
|
7260
|
-
/* @__PURE__ */
|
|
7389
|
+
/* @__PURE__ */ jsxs65("div", { className: "space-y-2 pt-1", children: [
|
|
7390
|
+
/* @__PURE__ */ jsx98(
|
|
7261
7391
|
"button",
|
|
7262
7392
|
{
|
|
7263
7393
|
type: "submit",
|
|
@@ -7268,14 +7398,14 @@ function OrganizationOnboardingForm({
|
|
|
7268
7398
|
children: submitting ? "Creating\u2026" : submitLabel
|
|
7269
7399
|
}
|
|
7270
7400
|
),
|
|
7271
|
-
onCancel && /* @__PURE__ */
|
|
7401
|
+
onCancel && /* @__PURE__ */ jsx98("button", { type: "button", onClick: onCancel, className: cn("cursor-pointer", AUTH_QUIET_BUTTON), children: "Cancel" })
|
|
7272
7402
|
] })
|
|
7273
7403
|
] });
|
|
7274
7404
|
}
|
|
7275
7405
|
|
|
7276
7406
|
// src/components/list-columns.tsx
|
|
7277
|
-
import * as
|
|
7278
|
-
import { jsx as
|
|
7407
|
+
import * as React85 from "react";
|
|
7408
|
+
import { jsx as jsx99, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
7279
7409
|
var CELL_WIDTH = { 20: "w-20", 24: "w-24", 28: "w-28", 32: "w-32" };
|
|
7280
7410
|
var headerClass = "flex items-center gap-3 border-b border-border-subtle bg-bg-secondary px-4 py-1.5 text-xs text-text-tertiary";
|
|
7281
7411
|
var cellsClass = "flex shrink-0 items-center gap-3";
|
|
@@ -7293,13 +7423,13 @@ function warnDuplicateKeys(columns, where) {
|
|
|
7293
7423
|
seen.add(c.key);
|
|
7294
7424
|
}
|
|
7295
7425
|
}
|
|
7296
|
-
var ListHeader =
|
|
7426
|
+
var ListHeader = React85.forwardRef(function ListHeader2({ lead, columns, mark = true, trailing = true, className, ...props }, ref) {
|
|
7297
7427
|
warnDuplicateKeys(columns, "ListHeader");
|
|
7298
|
-
return /* @__PURE__ */
|
|
7299
|
-
mark && /* @__PURE__ */
|
|
7300
|
-
/* @__PURE__ */
|
|
7301
|
-
/* @__PURE__ */
|
|
7302
|
-
trailing && /* @__PURE__ */
|
|
7428
|
+
return /* @__PURE__ */ jsxs66("div", { ref, className: cn(headerClass, className), ...props, children: [
|
|
7429
|
+
mark && /* @__PURE__ */ jsx99("span", { className: "size-8 shrink-0", "aria-hidden": true }),
|
|
7430
|
+
/* @__PURE__ */ jsx99("span", { className: "min-w-0 flex-1 truncate", children: lead }),
|
|
7431
|
+
/* @__PURE__ */ jsx99("span", { className: cellsClass, children: columns.map((c) => /* @__PURE__ */ jsx99("span", { className: cn(CELL_WIDTH[c.width], cellClass), children: c.label }, c.key)) }),
|
|
7432
|
+
trailing && /* @__PURE__ */ jsx99("span", { className: "size-4 shrink-0", "aria-hidden": true })
|
|
7303
7433
|
] });
|
|
7304
7434
|
});
|
|
7305
7435
|
function cellValue(values, column) {
|
|
@@ -7307,9 +7437,9 @@ function cellValue(values, column) {
|
|
|
7307
7437
|
const value = values[column.key];
|
|
7308
7438
|
return value === void 0 || value === null || value === "" ? column.fallback : value;
|
|
7309
7439
|
}
|
|
7310
|
-
var ListCells =
|
|
7440
|
+
var ListCells = React85.forwardRef(function ListCells2({ columns, values, className, ...props }, ref) {
|
|
7311
7441
|
warnDuplicateKeys(columns, "ListCells");
|
|
7312
|
-
return /* @__PURE__ */
|
|
7442
|
+
return /* @__PURE__ */ jsx99("span", { ref, className: cn(cellsClass, className), ...props, children: columns.map((c) => /* @__PURE__ */ jsx99(
|
|
7313
7443
|
"span",
|
|
7314
7444
|
{
|
|
7315
7445
|
className: cn(CELL_WIDTH[c.width], cellClass, c.quiet && "text-text-tertiary"),
|
|
@@ -7322,9 +7452,9 @@ ListHeader.displayName = "ListHeader";
|
|
|
7322
7452
|
ListCells.displayName = "ListCells";
|
|
7323
7453
|
|
|
7324
7454
|
// src/components/theme-picker.tsx
|
|
7325
|
-
import * as
|
|
7326
|
-
import { Check as
|
|
7327
|
-
import { jsx as
|
|
7455
|
+
import * as React86 from "react";
|
|
7456
|
+
import { Check as Check13 } from "lucide-react";
|
|
7457
|
+
import { jsx as jsx100, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
7328
7458
|
var THEME_SWATCHES = {
|
|
7329
7459
|
// --bg-surface --bg-sunken --bg-overlay --border-default --text-tertiary
|
|
7330
7460
|
light: { canvas: "#f2f3f4", rail: "#e1e2e4", body: "#ffffff", quiet: "#bbbec7", strong: "#535a6e" },
|
|
@@ -7338,13 +7468,13 @@ var OPTIONS = [
|
|
|
7338
7468
|
{ value: "system", label: "Auto", name: "Auto, follows your device theme" }
|
|
7339
7469
|
];
|
|
7340
7470
|
function Panels({ palette }) {
|
|
7341
|
-
return /* @__PURE__ */
|
|
7342
|
-
/* @__PURE__ */
|
|
7471
|
+
return /* @__PURE__ */ jsxs67("span", { className: "flex h-full gap-1.5 p-1.5", style: { background: palette.canvas }, children: [
|
|
7472
|
+
/* @__PURE__ */ jsx100(
|
|
7343
7473
|
"span",
|
|
7344
7474
|
{
|
|
7345
7475
|
className: "flex flex-col gap-1.5 p-1.5",
|
|
7346
7476
|
style: { width: "28%", borderRadius: 5, background: palette.rail },
|
|
7347
|
-
children: RAIL_BARS.map((w, i) => /* @__PURE__ */
|
|
7477
|
+
children: RAIL_BARS.map((w, i) => /* @__PURE__ */ jsx100(
|
|
7348
7478
|
"span",
|
|
7349
7479
|
{
|
|
7350
7480
|
className: "rounded-full",
|
|
@@ -7354,12 +7484,12 @@ function Panels({ palette }) {
|
|
|
7354
7484
|
))
|
|
7355
7485
|
}
|
|
7356
7486
|
),
|
|
7357
|
-
/* @__PURE__ */
|
|
7487
|
+
/* @__PURE__ */ jsx100(
|
|
7358
7488
|
"span",
|
|
7359
7489
|
{
|
|
7360
7490
|
className: "flex flex-1 flex-col gap-1.5 border p-2",
|
|
7361
7491
|
style: { borderRadius: 5, background: palette.body, borderColor: palette.quiet },
|
|
7362
|
-
children: BODY_BARS.map((w, i) => /* @__PURE__ */
|
|
7492
|
+
children: BODY_BARS.map((w, i) => /* @__PURE__ */ jsx100(
|
|
7363
7493
|
"span",
|
|
7364
7494
|
{
|
|
7365
7495
|
className: "rounded-full",
|
|
@@ -7373,21 +7503,21 @@ function Panels({ palette }) {
|
|
|
7373
7503
|
}
|
|
7374
7504
|
var CUT = "polygon(0 0, -8px 0, -8px calc(100% + 8px), calc(100% + 8px) calc(100% + 8px), calc(100% + 8px) calc(100% - 16px), 100% calc(100% - 16px))";
|
|
7375
7505
|
function AutoPanels() {
|
|
7376
|
-
return /* @__PURE__ */
|
|
7377
|
-
/* @__PURE__ */
|
|
7378
|
-
/* @__PURE__ */
|
|
7506
|
+
return /* @__PURE__ */ jsxs67("span", { className: "relative block h-full", children: [
|
|
7507
|
+
/* @__PURE__ */ jsx100("span", { className: "absolute inset-0", children: /* @__PURE__ */ jsx100(Panels, { palette: THEME_SWATCHES.light }) }),
|
|
7508
|
+
/* @__PURE__ */ jsx100("span", { className: "absolute inset-0", style: { clipPath: CUT }, children: /* @__PURE__ */ jsx100(Panels, { palette: THEME_SWATCHES.dark }) })
|
|
7379
7509
|
] });
|
|
7380
7510
|
}
|
|
7381
7511
|
var previewClass = "block h-28 overflow-hidden rounded-lg border border-border-default";
|
|
7382
7512
|
var cardClass = "grid cursor-pointer gap-2 rounded-lg p-1.5 text-left transition-colors duration-fast hover:bg-[var(--hov-bg)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus";
|
|
7383
7513
|
var TRACK = { gridTemplateColumns: "repeat(auto-fit, minmax(8rem, 1fr))" };
|
|
7384
|
-
var Picker =
|
|
7385
|
-
return /* @__PURE__ */
|
|
7514
|
+
var Picker = React86.forwardRef(function Picker2({ value, onValueChange, className, ...props }, ref) {
|
|
7515
|
+
return /* @__PURE__ */ jsx100("div", { role: "group", "aria-label": "Theme", ...props, ref, className: cn("grid gap-4", className), style: { ...TRACK, ...props.style }, children: OPTIONS.map((o) => {
|
|
7386
7516
|
const selected = o.value === value;
|
|
7387
7517
|
return (
|
|
7388
7518
|
// Not a `Button` (Guidelines/When it isn't a Button): the preview is the control, and
|
|
7389
7519
|
// `aria-pressed` is what says which one is on.
|
|
7390
|
-
/* @__PURE__ */
|
|
7520
|
+
/* @__PURE__ */ jsxs67(
|
|
7391
7521
|
"button",
|
|
7392
7522
|
{
|
|
7393
7523
|
type: "button",
|
|
@@ -7396,8 +7526,8 @@ var Picker = React85.forwardRef(function Picker2({ value, onValueChange, classNa
|
|
|
7396
7526
|
onClick: () => onValueChange(o.value),
|
|
7397
7527
|
className: cardClass,
|
|
7398
7528
|
children: [
|
|
7399
|
-
/* @__PURE__ */
|
|
7400
|
-
/* @__PURE__ */
|
|
7529
|
+
/* @__PURE__ */ jsx100("span", { className: cn(previewClass, selected && "border-border-strong"), "aria-hidden": true, children: o.value === "system" ? /* @__PURE__ */ jsx100(AutoPanels, {}) : /* @__PURE__ */ jsx100(Panels, { palette: THEME_SWATCHES[o.value] }) }),
|
|
7530
|
+
/* @__PURE__ */ jsxs67(
|
|
7401
7531
|
"span",
|
|
7402
7532
|
{
|
|
7403
7533
|
className: cn(
|
|
@@ -7405,7 +7535,7 @@ var Picker = React85.forwardRef(function Picker2({ value, onValueChange, classNa
|
|
|
7405
7535
|
selected ? "font-semibold text-text-primary" : "text-text-secondary"
|
|
7406
7536
|
),
|
|
7407
7537
|
children: [
|
|
7408
|
-
/* @__PURE__ */
|
|
7538
|
+
/* @__PURE__ */ jsx100(Check13, { className: cn("size-4 shrink-0", !selected && "invisible"), "aria-hidden": true }),
|
|
7409
7539
|
o.label
|
|
7410
7540
|
]
|
|
7411
7541
|
}
|
|
@@ -7417,9 +7547,9 @@ var Picker = React85.forwardRef(function Picker2({ value, onValueChange, classNa
|
|
|
7417
7547
|
);
|
|
7418
7548
|
}) });
|
|
7419
7549
|
});
|
|
7420
|
-
var WiredPicker =
|
|
7550
|
+
var WiredPicker = React86.forwardRef(function WiredPicker2({ onValueChange, ...props }, ref) {
|
|
7421
7551
|
const { theme, setTheme } = useTheme();
|
|
7422
|
-
return /* @__PURE__ */
|
|
7552
|
+
return /* @__PURE__ */ jsx100(
|
|
7423
7553
|
Picker,
|
|
7424
7554
|
{
|
|
7425
7555
|
...props,
|
|
@@ -7432,22 +7562,22 @@ var WiredPicker = React85.forwardRef(function WiredPicker2({ onValueChange, ...p
|
|
|
7432
7562
|
}
|
|
7433
7563
|
);
|
|
7434
7564
|
});
|
|
7435
|
-
var ThemePicker =
|
|
7436
|
-
const controlled =
|
|
7565
|
+
var ThemePicker = React86.forwardRef(function ThemePicker2({ value, onValueChange, ...props }, ref) {
|
|
7566
|
+
const controlled = React86.useRef(value !== void 0);
|
|
7437
7567
|
if (process.env.NODE_ENV !== "production" && controlled.current !== (value !== void 0)) {
|
|
7438
7568
|
console.warn(
|
|
7439
7569
|
"[ThemePicker] `value` went from " + (controlled.current ? "set to missing" : "missing to set") + " after mount. The picker stays " + (controlled.current ? "controlled" : "wired to the console theme") + " for its whole life: render it once its value is known, or leave `value` off entirely."
|
|
7440
7570
|
);
|
|
7441
7571
|
}
|
|
7442
|
-
return controlled.current ? /* @__PURE__ */
|
|
7443
|
-
}) }) : /* @__PURE__ */
|
|
7572
|
+
return controlled.current ? /* @__PURE__ */ jsx100(Picker, { ...props, ref, value: value ?? "system", onValueChange: onValueChange ?? (() => {
|
|
7573
|
+
}) }) : /* @__PURE__ */ jsx100(WiredPicker, { ...props, ref, onValueChange });
|
|
7444
7574
|
});
|
|
7445
7575
|
ThemePicker.displayName = "ThemePicker";
|
|
7446
7576
|
|
|
7447
7577
|
// src/components/secret-reveal.tsx
|
|
7448
|
-
import * as
|
|
7578
|
+
import * as React87 from "react";
|
|
7449
7579
|
import { Copy as Copy2, Download } from "lucide-react";
|
|
7450
|
-
import { jsx as
|
|
7580
|
+
import { jsx as jsx101, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
7451
7581
|
var asText = (value) => Array.isArray(value) ? value.join("\n") : value;
|
|
7452
7582
|
var REVEALED = "A secret is on screen and will not be shown again.";
|
|
7453
7583
|
var REFUSED = "The browser refused the clipboard. Select the value to copy it.";
|
|
@@ -7455,15 +7585,15 @@ function SecretValue({ value }) {
|
|
|
7455
7585
|
if (Array.isArray(value)) {
|
|
7456
7586
|
const half = Math.ceil(value.length / 2);
|
|
7457
7587
|
const columns = [value.slice(0, half), value.slice(half)].filter((column) => column.length > 0);
|
|
7458
|
-
return /* @__PURE__ */
|
|
7588
|
+
return /* @__PURE__ */ jsx101("div", { className: "flex w-fit gap-x-12", children: columns.map((column, index) => (
|
|
7459
7589
|
// Neither the columns nor the values inside one are ever reordered, and two identical
|
|
7460
7590
|
// values in a list are legal, so the index is the key and the value is not.
|
|
7461
|
-
/* @__PURE__ */
|
|
7591
|
+
/* @__PURE__ */ jsx101("div", { className: "grid gap-y-1.5", children: column.map((line, row) => /* @__PURE__ */ jsx101("code", { className: "font-mono text-sm font-medium tabular-nums text-text-primary", children: line }, row)) }, index)
|
|
7462
7592
|
)) });
|
|
7463
7593
|
}
|
|
7464
|
-
return /* @__PURE__ */
|
|
7594
|
+
return /* @__PURE__ */ jsx101("code", { className: "block break-all font-mono text-sm font-medium text-text-primary", children: value });
|
|
7465
7595
|
}
|
|
7466
|
-
var SecretReveal =
|
|
7596
|
+
var SecretReveal = React87.forwardRef(
|
|
7467
7597
|
({
|
|
7468
7598
|
value,
|
|
7469
7599
|
caption,
|
|
@@ -7480,18 +7610,18 @@ var SecretReveal = React86.forwardRef(
|
|
|
7480
7610
|
className,
|
|
7481
7611
|
...props
|
|
7482
7612
|
}, ref) => {
|
|
7483
|
-
const [takenText, setTakenText] =
|
|
7484
|
-
const [refusedText, setRefusedText] =
|
|
7485
|
-
const [announcedFor, setAnnouncedFor] =
|
|
7486
|
-
const copyRef =
|
|
7487
|
-
const captionId =
|
|
7613
|
+
const [takenText, setTakenText] = React87.useState(null);
|
|
7614
|
+
const [refusedText, setRefusedText] = React87.useState(null);
|
|
7615
|
+
const [announcedFor, setAnnouncedFor] = React87.useState(null);
|
|
7616
|
+
const copyRef = React87.useRef(null);
|
|
7617
|
+
const captionId = React87.useId();
|
|
7488
7618
|
const text = asText(value);
|
|
7489
7619
|
const empty = text.length === 0;
|
|
7490
7620
|
const taken = takenText === text;
|
|
7491
7621
|
const refused = refusedText === text;
|
|
7492
|
-
|
|
7622
|
+
React87.useEffect(() => setAnnouncedFor(text), [text]);
|
|
7493
7623
|
const announced = announcedFor === text ? REVEALED : "";
|
|
7494
|
-
|
|
7624
|
+
React87.useEffect(() => {
|
|
7495
7625
|
if (autoFocus) copyRef.current?.focus();
|
|
7496
7626
|
}, [autoFocus]);
|
|
7497
7627
|
const reportTaken = () => {
|
|
@@ -7517,12 +7647,12 @@ var SecretReveal = React86.forwardRef(
|
|
|
7517
7647
|
reportTaken();
|
|
7518
7648
|
onDownload?.();
|
|
7519
7649
|
};
|
|
7520
|
-
return /* @__PURE__ */
|
|
7521
|
-
/* @__PURE__ */
|
|
7522
|
-
/* @__PURE__ */
|
|
7523
|
-
/* @__PURE__ */
|
|
7524
|
-
/* @__PURE__ */
|
|
7525
|
-
/* @__PURE__ */
|
|
7650
|
+
return /* @__PURE__ */ jsx101("div", { ref, className: cn("overflow-hidden rounded-lg bg-bg-sunken", className), ...props, children: /* @__PURE__ */ jsx101("div", { className: highlightClassName, ref: highlightRef, children: /* @__PURE__ */ jsxs68("div", { className: "grid gap-3 rounded-lg border border-border-strong px-4 py-3", children: [
|
|
7651
|
+
/* @__PURE__ */ jsx101("span", { role: "status", className: "sr-only", children: announced }),
|
|
7652
|
+
/* @__PURE__ */ jsx101("div", { id: captionId, className: "text-sm text-text-secondary", children: caption }),
|
|
7653
|
+
/* @__PURE__ */ jsx101(SecretValue, { value }),
|
|
7654
|
+
/* @__PURE__ */ jsxs68("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
7655
|
+
/* @__PURE__ */ jsx101(
|
|
7526
7656
|
Button,
|
|
7527
7657
|
{
|
|
7528
7658
|
ref: copyRef,
|
|
@@ -7530,12 +7660,12 @@ var SecretReveal = React86.forwardRef(
|
|
|
7530
7660
|
"aria-describedby": captionId,
|
|
7531
7661
|
variant: "outline",
|
|
7532
7662
|
size: "sm",
|
|
7533
|
-
icon: /* @__PURE__ */
|
|
7663
|
+
icon: /* @__PURE__ */ jsx101(Copy2, {}),
|
|
7534
7664
|
children: copyLabel ?? (Array.isArray(value) ? "Copy all" : "Copy")
|
|
7535
7665
|
}
|
|
7536
7666
|
),
|
|
7537
|
-
onDownload && /* @__PURE__ */
|
|
7538
|
-
/* @__PURE__ */
|
|
7667
|
+
onDownload && /* @__PURE__ */ jsx101(Button, { onClick: download, "aria-describedby": captionId, variant: "outline", size: "sm", icon: /* @__PURE__ */ jsx101(Download, {}), children: downloadLabel }),
|
|
7668
|
+
/* @__PURE__ */ jsx101(
|
|
7539
7669
|
Button,
|
|
7540
7670
|
{
|
|
7541
7671
|
onClick: onConfirm,
|
|
@@ -7546,17 +7676,17 @@ var SecretReveal = React86.forwardRef(
|
|
|
7546
7676
|
}
|
|
7547
7677
|
)
|
|
7548
7678
|
] }),
|
|
7549
|
-
refused && /* @__PURE__ */
|
|
7679
|
+
refused && /* @__PURE__ */ jsx101("div", { role: "status", className: "text-xs text-text-tertiary", children: REFUSED })
|
|
7550
7680
|
] }) }) });
|
|
7551
7681
|
}
|
|
7552
7682
|
);
|
|
7553
7683
|
SecretReveal.displayName = "SecretReveal";
|
|
7554
7684
|
|
|
7555
7685
|
// src/components/star-rating.tsx
|
|
7556
|
-
import * as
|
|
7686
|
+
import * as React88 from "react";
|
|
7557
7687
|
import * as RadioGroupPrimitive2 from "@radix-ui/react-radio-group";
|
|
7558
7688
|
import { Star } from "lucide-react";
|
|
7559
|
-
import { jsx as
|
|
7689
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
7560
7690
|
var STAR_BOX = {
|
|
7561
7691
|
sm: "size-4",
|
|
7562
7692
|
md: "size-5",
|
|
@@ -7568,7 +7698,7 @@ var ROW_GAP = {
|
|
|
7568
7698
|
lg: "gap-1.5"
|
|
7569
7699
|
};
|
|
7570
7700
|
var defaultItemLabel = (value, max) => `${value} out of ${max} stars`;
|
|
7571
|
-
var StarGlyph = ({ filled, size }) => /* @__PURE__ */
|
|
7701
|
+
var StarGlyph = ({ filled, size }) => /* @__PURE__ */ jsx102(
|
|
7572
7702
|
Star,
|
|
7573
7703
|
{
|
|
7574
7704
|
"aria-hidden": "true",
|
|
@@ -7579,7 +7709,7 @@ var StarGlyph = ({ filled, size }) => /* @__PURE__ */ jsx101(
|
|
|
7579
7709
|
)
|
|
7580
7710
|
}
|
|
7581
7711
|
);
|
|
7582
|
-
var StarRating =
|
|
7712
|
+
var StarRating = React88.forwardRef(
|
|
7583
7713
|
({
|
|
7584
7714
|
className,
|
|
7585
7715
|
value,
|
|
@@ -7594,27 +7724,27 @@ var StarRating = React87.forwardRef(
|
|
|
7594
7724
|
...props
|
|
7595
7725
|
}, ref) => {
|
|
7596
7726
|
const stars = Array.from({ length: max }, (_, index) => index + 1);
|
|
7597
|
-
const [mirror, setMirror] =
|
|
7727
|
+
const [mirror, setMirror] = React88.useState(defaultValue ?? 0);
|
|
7598
7728
|
const selected = value ?? mirror;
|
|
7599
|
-
const [preview, setPreview] =
|
|
7729
|
+
const [preview, setPreview] = React88.useState(null);
|
|
7600
7730
|
const shown = preview ?? selected;
|
|
7601
7731
|
const commit = (next) => {
|
|
7602
7732
|
setMirror(next);
|
|
7603
7733
|
onValueChange?.(next);
|
|
7604
7734
|
};
|
|
7605
7735
|
if (readOnly) {
|
|
7606
|
-
return /* @__PURE__ */
|
|
7736
|
+
return /* @__PURE__ */ jsx102(
|
|
7607
7737
|
"div",
|
|
7608
7738
|
{
|
|
7609
7739
|
ref,
|
|
7610
7740
|
role: "img",
|
|
7611
7741
|
"aria-label": props["aria-label"] ?? itemLabel(selected, max),
|
|
7612
7742
|
className: cn("inline-flex items-center", ROW_GAP[size], className),
|
|
7613
|
-
children: stars.map((star) => /* @__PURE__ */
|
|
7743
|
+
children: stars.map((star) => /* @__PURE__ */ jsx102(StarGlyph, { filled: star <= selected, size }, star))
|
|
7614
7744
|
}
|
|
7615
7745
|
);
|
|
7616
7746
|
}
|
|
7617
|
-
return /* @__PURE__ */
|
|
7747
|
+
return /* @__PURE__ */ jsx102(
|
|
7618
7748
|
RadioGroupPrimitive2.Root,
|
|
7619
7749
|
{
|
|
7620
7750
|
ref,
|
|
@@ -7631,7 +7761,7 @@ var StarRating = React87.forwardRef(
|
|
|
7631
7761
|
orientation: "horizontal",
|
|
7632
7762
|
loop: false,
|
|
7633
7763
|
className: cn("inline-flex items-center", ROW_GAP[size], className),
|
|
7634
|
-
children: stars.map((star) => /* @__PURE__ */
|
|
7764
|
+
children: stars.map((star) => /* @__PURE__ */ jsx102(
|
|
7635
7765
|
RadioGroupPrimitive2.Item,
|
|
7636
7766
|
{
|
|
7637
7767
|
value: String(star),
|
|
@@ -7647,7 +7777,7 @@ var StarRating = React87.forwardRef(
|
|
|
7647
7777
|
"rounded-md p-0.5 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
7648
7778
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
7649
7779
|
),
|
|
7650
|
-
children: /* @__PURE__ */
|
|
7780
|
+
children: /* @__PURE__ */ jsx102(StarGlyph, { filled: star <= shown, size })
|
|
7651
7781
|
},
|
|
7652
7782
|
star
|
|
7653
7783
|
))
|
|
@@ -7658,16 +7788,16 @@ var StarRating = React87.forwardRef(
|
|
|
7658
7788
|
StarRating.displayName = "StarRating";
|
|
7659
7789
|
|
|
7660
7790
|
// src/components/rating-scale.tsx
|
|
7661
|
-
import * as
|
|
7791
|
+
import * as React89 from "react";
|
|
7662
7792
|
import * as RadioGroupPrimitive3 from "@radix-ui/react-radio-group";
|
|
7663
|
-
import { jsx as
|
|
7793
|
+
import { jsx as jsx103, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
7664
7794
|
var SLOT_BOX = {
|
|
7665
7795
|
sm: "h-8 min-w-8 px-2 text-xs",
|
|
7666
7796
|
md: "h-9 min-w-9 px-2 text-sm",
|
|
7667
7797
|
lg: "h-11 min-w-11 px-3 text-base"
|
|
7668
7798
|
};
|
|
7669
7799
|
var defaultItemLabel2 = (value, _min, max) => `${value} out of ${max}`;
|
|
7670
|
-
var RatingScale =
|
|
7800
|
+
var RatingScale = React89.forwardRef(
|
|
7671
7801
|
({
|
|
7672
7802
|
className,
|
|
7673
7803
|
value,
|
|
@@ -7683,9 +7813,9 @@ var RatingScale = React88.forwardRef(
|
|
|
7683
7813
|
...props
|
|
7684
7814
|
}, ref) => {
|
|
7685
7815
|
const slots = Array.from({ length: Math.max(0, max - min + 1) }, (_, index) => min + index);
|
|
7686
|
-
const [mirror, setMirror] =
|
|
7816
|
+
const [mirror, setMirror] = React89.useState(defaultValue);
|
|
7687
7817
|
const selected = value ?? mirror;
|
|
7688
|
-
const row = /* @__PURE__ */
|
|
7818
|
+
const row = /* @__PURE__ */ jsx103("div", { className: cn("flex flex-wrap items-center gap-1.5", !endLabels && className), children: slots.map((slot) => {
|
|
7689
7819
|
const isSelected = slot === selected;
|
|
7690
7820
|
const box = cn(
|
|
7691
7821
|
"inline-flex items-center justify-center rounded-md border tabular-nums transition-colors duration-fast",
|
|
@@ -7693,9 +7823,9 @@ var RatingScale = React88.forwardRef(
|
|
|
7693
7823
|
isSelected ? "border-border-strong font-semibold text-text-primary" : "border-field-border font-medium text-text-secondary"
|
|
7694
7824
|
);
|
|
7695
7825
|
if (readOnly) {
|
|
7696
|
-
return /* @__PURE__ */
|
|
7826
|
+
return /* @__PURE__ */ jsx103("span", { className: box, "aria-hidden": "true", children: slot }, slot);
|
|
7697
7827
|
}
|
|
7698
|
-
return /* @__PURE__ */
|
|
7828
|
+
return /* @__PURE__ */ jsx103(
|
|
7699
7829
|
RadioGroupPrimitive3.Item,
|
|
7700
7830
|
{
|
|
7701
7831
|
value: String(slot),
|
|
@@ -7714,12 +7844,12 @@ var RatingScale = React88.forwardRef(
|
|
|
7714
7844
|
slot
|
|
7715
7845
|
);
|
|
7716
7846
|
}) });
|
|
7717
|
-
const ends = endLabels ? /* @__PURE__ */
|
|
7718
|
-
/* @__PURE__ */
|
|
7719
|
-
/* @__PURE__ */
|
|
7847
|
+
const ends = endLabels ? /* @__PURE__ */ jsxs69("div", { className: "flex items-center justify-between text-xs text-text-tertiary", children: [
|
|
7848
|
+
/* @__PURE__ */ jsx103("span", { children: endLabels.low }),
|
|
7849
|
+
/* @__PURE__ */ jsx103("span", { children: endLabels.high })
|
|
7720
7850
|
] }) : null;
|
|
7721
7851
|
if (readOnly) {
|
|
7722
|
-
return /* @__PURE__ */
|
|
7852
|
+
return /* @__PURE__ */ jsxs69(
|
|
7723
7853
|
"div",
|
|
7724
7854
|
{
|
|
7725
7855
|
ref,
|
|
@@ -7733,7 +7863,7 @@ var RatingScale = React88.forwardRef(
|
|
|
7733
7863
|
}
|
|
7734
7864
|
);
|
|
7735
7865
|
}
|
|
7736
|
-
const group = /* @__PURE__ */
|
|
7866
|
+
const group = /* @__PURE__ */ jsx103(
|
|
7737
7867
|
RadioGroupPrimitive3.Root,
|
|
7738
7868
|
{
|
|
7739
7869
|
ref,
|
|
@@ -7752,7 +7882,7 @@ var RatingScale = React88.forwardRef(
|
|
|
7752
7882
|
}
|
|
7753
7883
|
);
|
|
7754
7884
|
if (!endLabels) return group;
|
|
7755
|
-
return /* @__PURE__ */
|
|
7885
|
+
return /* @__PURE__ */ jsxs69("div", { className: cn("flex flex-col gap-1.5", className), children: [
|
|
7756
7886
|
group,
|
|
7757
7887
|
ends
|
|
7758
7888
|
] });
|
|
@@ -7953,6 +8083,7 @@ export {
|
|
|
7953
8083
|
NotificationSettings,
|
|
7954
8084
|
NotificationToast,
|
|
7955
8085
|
NotificationToaster,
|
|
8086
|
+
OnboardingScreenShell,
|
|
7956
8087
|
OptionCard,
|
|
7957
8088
|
OrgProductSwitcher,
|
|
7958
8089
|
OrganizationOnboardingForm,
|