@designa8/vibedesign-linear-internal-v1-b737 0.8.0 → 0.9.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 +1 -1
- package/dist/index.cjs +1040 -868
- package/dist/index.js +1068 -896
- package/dist/styles.css +16 -0
- package/package.json +6 -1
- package/src/atoms/ExpandableMessage/ExpandableMessage.tsx +224 -0
- package/src/atoms/ExpandableMessage/index.ts +5 -0
- package/src/atoms/ExpandableMessage/preview.tsx +102 -0
- package/src/index.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -69,6 +69,7 @@ __export(src_exports, {
|
|
|
69
69
|
Drawer: () => Drawer,
|
|
70
70
|
Dropdown: () => Dropdown,
|
|
71
71
|
DropdownMenu: () => DropdownMenu,
|
|
72
|
+
ExpandableMessage: () => ExpandableMessage,
|
|
72
73
|
FileUpload: () => FileUpload,
|
|
73
74
|
Footer: () => Footer,
|
|
74
75
|
Form: () => Form,
|
|
@@ -6109,13 +6110,184 @@ var DropdownMenu = React48.forwardRef(
|
|
|
6109
6110
|
);
|
|
6110
6111
|
DropdownMenu.displayName = "DropdownMenu";
|
|
6111
6112
|
|
|
6113
|
+
// virtual-pkg:src/atoms/ExpandableMessage/ExpandableMessage.tsx
|
|
6114
|
+
var React49 = __toESM(require("react"));
|
|
6115
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6116
|
+
var cn38 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6117
|
+
var clampStyle = (lines) => ({
|
|
6118
|
+
display: "-webkit-box",
|
|
6119
|
+
WebkitLineClamp: lines,
|
|
6120
|
+
WebkitBoxOrient: "vertical",
|
|
6121
|
+
overflow: "hidden"
|
|
6122
|
+
});
|
|
6123
|
+
var CHUNK_TEXT_CLASS = "whitespace-pre-wrap text-body-md leading-body-lg text-body";
|
|
6124
|
+
function MessageParagraph({
|
|
6125
|
+
index,
|
|
6126
|
+
text,
|
|
6127
|
+
maxLines,
|
|
6128
|
+
clamp: clamp2,
|
|
6129
|
+
showFade,
|
|
6130
|
+
onOverflowChange
|
|
6131
|
+
}) {
|
|
6132
|
+
const measureRef = React49.useRef(null);
|
|
6133
|
+
React49.useLayoutEffect(() => {
|
|
6134
|
+
const el = measureRef.current;
|
|
6135
|
+
if (!el) return;
|
|
6136
|
+
const update = () => onOverflowChange(index, el.scrollHeight - el.clientHeight > 1);
|
|
6137
|
+
update();
|
|
6138
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
6139
|
+
const observer = new ResizeObserver(update);
|
|
6140
|
+
observer.observe(el);
|
|
6141
|
+
return () => observer.disconnect();
|
|
6142
|
+
}, [index, text, maxLines, onOverflowChange]);
|
|
6143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative", children: [
|
|
6144
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6145
|
+
"p",
|
|
6146
|
+
{
|
|
6147
|
+
className: CHUNK_TEXT_CLASS,
|
|
6148
|
+
style: clamp2 ? clampStyle(maxLines) : void 0,
|
|
6149
|
+
children: text
|
|
6150
|
+
}
|
|
6151
|
+
),
|
|
6152
|
+
showFade && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6153
|
+
"div",
|
|
6154
|
+
{
|
|
6155
|
+
"aria-hidden": "true",
|
|
6156
|
+
className: "pointer-events-none absolute inset-x-0 bottom-0 h-xl",
|
|
6157
|
+
style: {
|
|
6158
|
+
background: "linear-gradient(to bottom, transparent, var(--color-surface))"
|
|
6159
|
+
}
|
|
6160
|
+
}
|
|
6161
|
+
),
|
|
6162
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6163
|
+
"p",
|
|
6164
|
+
{
|
|
6165
|
+
ref: measureRef,
|
|
6166
|
+
"aria-hidden": "true",
|
|
6167
|
+
className: cn38(
|
|
6168
|
+
"invisible absolute inset-x-0 top-0 -z-10",
|
|
6169
|
+
CHUNK_TEXT_CLASS
|
|
6170
|
+
),
|
|
6171
|
+
style: clampStyle(maxLines),
|
|
6172
|
+
children: text
|
|
6173
|
+
}
|
|
6174
|
+
)
|
|
6175
|
+
] });
|
|
6176
|
+
}
|
|
6177
|
+
var ExpandableMessage = React49.forwardRef(
|
|
6178
|
+
({
|
|
6179
|
+
content,
|
|
6180
|
+
maxLines = 4,
|
|
6181
|
+
expanded: expandedProp,
|
|
6182
|
+
defaultExpanded = false,
|
|
6183
|
+
onExpandedChange,
|
|
6184
|
+
disabled = false,
|
|
6185
|
+
variant = "card",
|
|
6186
|
+
toggleClassName,
|
|
6187
|
+
className,
|
|
6188
|
+
...rest
|
|
6189
|
+
}, ref) => {
|
|
6190
|
+
const reactId = React49.useId();
|
|
6191
|
+
const textId = `expandable-message-${reactId.replace(/:/g, "")}`;
|
|
6192
|
+
const isFlush = variant === "flush";
|
|
6193
|
+
const isControlled = expandedProp !== void 0;
|
|
6194
|
+
const [internalExpanded, setInternalExpanded] = React49.useState(defaultExpanded);
|
|
6195
|
+
const expanded = isControlled ? expandedProp : internalExpanded;
|
|
6196
|
+
const setExpanded = React49.useCallback(
|
|
6197
|
+
(next) => {
|
|
6198
|
+
if (!isControlled) setInternalExpanded(next);
|
|
6199
|
+
onExpandedChange?.(next);
|
|
6200
|
+
},
|
|
6201
|
+
[isControlled, onExpandedChange]
|
|
6202
|
+
);
|
|
6203
|
+
const paragraphs = React49.useMemo(
|
|
6204
|
+
() => content.split(/\r?\n/).filter((line) => line.trim().length > 0),
|
|
6205
|
+
[content]
|
|
6206
|
+
);
|
|
6207
|
+
const [overflowing, setOverflowing] = React49.useState([]);
|
|
6208
|
+
const handleOverflowChange = React49.useCallback(
|
|
6209
|
+
(index, isOverflowing) => {
|
|
6210
|
+
setOverflowing((prev) => {
|
|
6211
|
+
if (prev[index] === isOverflowing) return prev;
|
|
6212
|
+
const next = prev.slice();
|
|
6213
|
+
next[index] = isOverflowing;
|
|
6214
|
+
return next;
|
|
6215
|
+
});
|
|
6216
|
+
},
|
|
6217
|
+
[]
|
|
6218
|
+
);
|
|
6219
|
+
const canExpand = paragraphs.some(
|
|
6220
|
+
(_, index) => overflowing[index] === true
|
|
6221
|
+
);
|
|
6222
|
+
const toggleTone = toggleClassName ?? "text-primary hover:text-primary-hover";
|
|
6223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
6224
|
+
"div",
|
|
6225
|
+
{
|
|
6226
|
+
ref,
|
|
6227
|
+
className: cn38(
|
|
6228
|
+
"w-full",
|
|
6229
|
+
!isFlush && "rounded-lg bg-surface p-lg shadow-sm",
|
|
6230
|
+
className
|
|
6231
|
+
),
|
|
6232
|
+
...rest,
|
|
6233
|
+
children: [
|
|
6234
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { id: textId, className: "flex flex-col gap-xs", children: paragraphs.map((text, index) => {
|
|
6235
|
+
const clamp2 = !expanded && overflowing[index] === true;
|
|
6236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6237
|
+
MessageParagraph,
|
|
6238
|
+
{
|
|
6239
|
+
index,
|
|
6240
|
+
text,
|
|
6241
|
+
maxLines,
|
|
6242
|
+
clamp: clamp2,
|
|
6243
|
+
showFade: !isFlush && clamp2,
|
|
6244
|
+
onOverflowChange: handleOverflowChange
|
|
6245
|
+
},
|
|
6246
|
+
index
|
|
6247
|
+
);
|
|
6248
|
+
}) }),
|
|
6249
|
+
canExpand && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
6250
|
+
"button",
|
|
6251
|
+
{
|
|
6252
|
+
type: "button",
|
|
6253
|
+
disabled,
|
|
6254
|
+
onClick: () => setExpanded(!expanded),
|
|
6255
|
+
"aria-expanded": expanded,
|
|
6256
|
+
"aria-controls": textId,
|
|
6257
|
+
className: cn38(
|
|
6258
|
+
"mt-xs flex w-full cursor-pointer items-center justify-start gap-xs rounded-none border-0 bg-transparent px-0 py-0 text-left text-body-sm font-weight-label transition-colors duration-150 ease-out hover:bg-surface-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50",
|
|
6259
|
+
toggleTone
|
|
6260
|
+
),
|
|
6261
|
+
children: [
|
|
6262
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: expanded ? "Show less" : "Show more" }),
|
|
6263
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6264
|
+
Icon,
|
|
6265
|
+
{
|
|
6266
|
+
name: "chevron-down",
|
|
6267
|
+
size: 14,
|
|
6268
|
+
className: cn38(
|
|
6269
|
+
"transition-transform duration-200 ease-out",
|
|
6270
|
+
expanded ? "rotate-180" : "rotate-0"
|
|
6271
|
+
)
|
|
6272
|
+
}
|
|
6273
|
+
)
|
|
6274
|
+
]
|
|
6275
|
+
}
|
|
6276
|
+
)
|
|
6277
|
+
]
|
|
6278
|
+
}
|
|
6279
|
+
);
|
|
6280
|
+
}
|
|
6281
|
+
);
|
|
6282
|
+
ExpandableMessage.displayName = "ExpandableMessage";
|
|
6283
|
+
|
|
6112
6284
|
// virtual-pkg:src/atoms/FileUpload/FileUpload.tsx
|
|
6113
|
-
var
|
|
6285
|
+
var React51 = __toESM(require("react"));
|
|
6114
6286
|
|
|
6115
6287
|
// virtual-pkg:src/atoms/ProgressBar/ProgressBar.tsx
|
|
6116
6288
|
var import_react2 = __toESM(require("react"));
|
|
6117
|
-
var
|
|
6118
|
-
function
|
|
6289
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6290
|
+
function cn39(...parts) {
|
|
6119
6291
|
return parts.filter(Boolean).join(" ");
|
|
6120
6292
|
}
|
|
6121
6293
|
var fillByStatus = {
|
|
@@ -6157,9 +6329,9 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6157
6329
|
if (variant === "gauge") {
|
|
6158
6330
|
const dim = size === "sm" ? "size-12" : "size-16";
|
|
6159
6331
|
const ring = size === "sm" ? "inset-[5px]" : "inset-[6px]";
|
|
6160
|
-
return /* @__PURE__ */ (0,
|
|
6161
|
-
/* @__PURE__ */ (0,
|
|
6162
|
-
/* @__PURE__ */ (0,
|
|
6332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref, className: cn39("inline-flex flex-col items-center gap-sm", className), ...rest, children: [
|
|
6333
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ...a11y, className: cn39("relative rounded-full", dim), children: [
|
|
6334
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6163
6335
|
"div",
|
|
6164
6336
|
{
|
|
6165
6337
|
"aria-hidden": "true",
|
|
@@ -6169,11 +6341,11 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6169
6341
|
}
|
|
6170
6342
|
}
|
|
6171
6343
|
),
|
|
6172
|
-
/* @__PURE__ */ (0,
|
|
6344
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6173
6345
|
"div",
|
|
6174
6346
|
{
|
|
6175
6347
|
"aria-hidden": "true",
|
|
6176
|
-
className:
|
|
6348
|
+
className: cn39(
|
|
6177
6349
|
"absolute flex items-center justify-center rounded-full bg-canvas text-ink",
|
|
6178
6350
|
ring,
|
|
6179
6351
|
size === "sm" ? "text-caption" : "text-body-md font-weight-heading-sm"
|
|
@@ -6182,19 +6354,19 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6182
6354
|
}
|
|
6183
6355
|
)
|
|
6184
6356
|
] }),
|
|
6185
|
-
label ? /* @__PURE__ */ (0,
|
|
6357
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
6186
6358
|
] });
|
|
6187
6359
|
}
|
|
6188
6360
|
const track = size === "sm" ? "h-1" : "h-2";
|
|
6189
6361
|
if (variant === "segmented") {
|
|
6190
6362
|
const steps = Math.max(1, Math.round(safeMax));
|
|
6191
6363
|
const done = Math.round(clamped);
|
|
6192
|
-
return /* @__PURE__ */ (0,
|
|
6193
|
-
/* @__PURE__ */ (0,
|
|
6364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref, className: cn39("flex w-full flex-col items-start gap-md", className), ...rest, children: [
|
|
6365
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ...a11y, "aria-valuetext": `Step ${done} of ${steps}`, className: "flex w-full items-center gap-xs", children: Array.from({ length: steps }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6194
6366
|
"span",
|
|
6195
6367
|
{
|
|
6196
6368
|
"aria-hidden": "true",
|
|
6197
|
-
className:
|
|
6369
|
+
className: cn39(
|
|
6198
6370
|
"flex-1 rounded-full transition-colors duration-200 ease-out",
|
|
6199
6371
|
track,
|
|
6200
6372
|
i < done ? resolvedStatus === "error" ? "bg-semantic-error" : "bg-primary" : "bg-surface-strong"
|
|
@@ -6202,36 +6374,36 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6202
6374
|
},
|
|
6203
6375
|
i
|
|
6204
6376
|
)) }),
|
|
6205
|
-
label ? /* @__PURE__ */ (0,
|
|
6377
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
6206
6378
|
] });
|
|
6207
6379
|
}
|
|
6208
|
-
return /* @__PURE__ */ (0,
|
|
6209
|
-
/* @__PURE__ */ (0,
|
|
6380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref, className: cn39("flex w-full flex-col items-center gap-md", className), ...rest, children: [
|
|
6381
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ...a11y, className: cn39("relative w-full overflow-hidden rounded-full bg-surface-strong", track), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6210
6382
|
"div",
|
|
6211
6383
|
{
|
|
6212
6384
|
"aria-hidden": "true",
|
|
6213
|
-
className:
|
|
6385
|
+
className: cn39(
|
|
6214
6386
|
"h-full rounded-full transition-[width,background-color] duration-200 ease-out",
|
|
6215
6387
|
fillByStatus[resolvedStatus]
|
|
6216
6388
|
),
|
|
6217
6389
|
style: { width: `${pct}%` }
|
|
6218
6390
|
}
|
|
6219
6391
|
) }),
|
|
6220
|
-
label ? /* @__PURE__ */ (0,
|
|
6392
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
6221
6393
|
] });
|
|
6222
6394
|
}
|
|
6223
6395
|
);
|
|
6224
6396
|
ProgressBar.displayName = "ProgressBar";
|
|
6225
6397
|
|
|
6226
6398
|
// virtual-pkg:src/atoms/FileUpload/FileUpload.tsx
|
|
6227
|
-
var
|
|
6228
|
-
var
|
|
6399
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6400
|
+
var cn40 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6229
6401
|
var formatBytes = (bytes) => {
|
|
6230
6402
|
if (bytes < 1024) return `${bytes} B`;
|
|
6231
6403
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
6232
6404
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
6233
6405
|
};
|
|
6234
|
-
var FileUpload =
|
|
6406
|
+
var FileUpload = React51.forwardRef(
|
|
6235
6407
|
({
|
|
6236
6408
|
items = [],
|
|
6237
6409
|
onFilesAdded,
|
|
@@ -6246,18 +6418,18 @@ var FileUpload = React50.forwardRef(
|
|
|
6246
6418
|
id,
|
|
6247
6419
|
className
|
|
6248
6420
|
}, ref) => {
|
|
6249
|
-
const autoId =
|
|
6421
|
+
const autoId = React51.useId();
|
|
6250
6422
|
const inputId = id ?? `upload-${autoId}`;
|
|
6251
|
-
const inputRef =
|
|
6252
|
-
const [dragging, setDragging] =
|
|
6253
|
-
const depth =
|
|
6423
|
+
const inputRef = React51.useRef(null);
|
|
6424
|
+
const [dragging, setDragging] = React51.useState(false);
|
|
6425
|
+
const depth = React51.useRef(0);
|
|
6254
6426
|
const add = (list) => {
|
|
6255
6427
|
if (!list || disabled) return;
|
|
6256
6428
|
const files = Array.from(list);
|
|
6257
6429
|
if (files.length) onFilesAdded?.(multiple ? files : files.slice(0, 1));
|
|
6258
6430
|
};
|
|
6259
|
-
return /* @__PURE__ */ (0,
|
|
6260
|
-
/* @__PURE__ */ (0,
|
|
6431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { ref, className: cn40("flex w-full min-w-0 flex-col gap-sm rounded-none", className), children: [
|
|
6432
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
6261
6433
|
"div",
|
|
6262
6434
|
{
|
|
6263
6435
|
"data-state": dragging ? "active" : "idle",
|
|
@@ -6279,24 +6451,24 @@ var FileUpload = React50.forwardRef(
|
|
|
6279
6451
|
setDragging(false);
|
|
6280
6452
|
add(e.dataTransfer.files);
|
|
6281
6453
|
},
|
|
6282
|
-
className:
|
|
6454
|
+
className: cn40(
|
|
6283
6455
|
"flex w-full flex-col items-center justify-center gap-xs rounded-lg border border-dashed px-lg py-base text-center transition-colors duration-200 ease-out",
|
|
6284
6456
|
dragging ? "border-primary bg-primary-soft" : "border-hairline-strong bg-canvas",
|
|
6285
6457
|
disabled && "opacity-50"
|
|
6286
6458
|
),
|
|
6287
6459
|
children: [
|
|
6288
|
-
/* @__PURE__ */ (0,
|
|
6460
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6289
6461
|
Icon,
|
|
6290
6462
|
{
|
|
6291
6463
|
name: "upload",
|
|
6292
6464
|
size: 20,
|
|
6293
|
-
className:
|
|
6465
|
+
className: cn40(
|
|
6294
6466
|
"transition duration-200 ease-out",
|
|
6295
6467
|
dragging ? "-translate-y-0.5 text-primary" : "text-body"
|
|
6296
6468
|
)
|
|
6297
6469
|
}
|
|
6298
6470
|
),
|
|
6299
|
-
/* @__PURE__ */ (0,
|
|
6471
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6300
6472
|
Input,
|
|
6301
6473
|
{
|
|
6302
6474
|
ref: inputRef,
|
|
@@ -6316,8 +6488,8 @@ var FileUpload = React50.forwardRef(
|
|
|
6316
6488
|
}
|
|
6317
6489
|
}
|
|
6318
6490
|
),
|
|
6319
|
-
dragging ? /* @__PURE__ */ (0,
|
|
6320
|
-
/* @__PURE__ */ (0,
|
|
6491
|
+
dragging ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "flex h-7 items-center text-body-sm text-primary", "aria-live": "polite", children: dropLabel }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "flex items-center gap-xxs text-body-sm text-muted", children: [
|
|
6492
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6321
6493
|
Button,
|
|
6322
6494
|
{
|
|
6323
6495
|
variant: "ghost",
|
|
@@ -6328,24 +6500,24 @@ var FileUpload = React50.forwardRef(
|
|
|
6328
6500
|
children: actionLabel
|
|
6329
6501
|
}
|
|
6330
6502
|
),
|
|
6331
|
-
/* @__PURE__ */ (0,
|
|
6503
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: hint })
|
|
6332
6504
|
] })
|
|
6333
6505
|
]
|
|
6334
6506
|
}
|
|
6335
6507
|
),
|
|
6336
|
-
items.length > 0 ? /* @__PURE__ */ (0,
|
|
6508
|
+
items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("ul", { className: "flex flex-col gap-sm", "aria-label": "Uploaded files", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
6337
6509
|
"li",
|
|
6338
6510
|
{
|
|
6339
6511
|
className: "flex items-center gap-md rounded-lg border border-hairline bg-canvas px-base py-md shadow-card",
|
|
6340
6512
|
children: [
|
|
6341
|
-
/* @__PURE__ */ (0,
|
|
6342
|
-
/* @__PURE__ */ (0,
|
|
6343
|
-
/* @__PURE__ */ (0,
|
|
6344
|
-
item.status === "error" ? /* @__PURE__ */ (0,
|
|
6513
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { name: "file", size: 20, className: "text-muted" }),
|
|
6514
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs", children: [
|
|
6515
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "truncate text-body-md font-weight-label text-ink", children: item.name }),
|
|
6516
|
+
item.status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-body-sm text-semantic-error", role: "alert", children: item.error ?? "Couldn\u2019t upload file" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-body-sm text-muted", children: [
|
|
6345
6517
|
formatBytes(item.size),
|
|
6346
6518
|
item.status === "uploading" ? " \xB7 Uploading\u2026" : ""
|
|
6347
6519
|
] }),
|
|
6348
|
-
item.status === "uploading" ? /* @__PURE__ */ (0,
|
|
6520
|
+
item.status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6349
6521
|
ProgressBar,
|
|
6350
6522
|
{
|
|
6351
6523
|
value: item.progress ?? 0,
|
|
@@ -6357,7 +6529,7 @@ var FileUpload = React50.forwardRef(
|
|
|
6357
6529
|
}
|
|
6358
6530
|
) : null
|
|
6359
6531
|
] }),
|
|
6360
|
-
item.status === "uploading" ? /* @__PURE__ */ (0,
|
|
6532
|
+
item.status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6361
6533
|
IconButton,
|
|
6362
6534
|
{
|
|
6363
6535
|
icon: "x",
|
|
@@ -6366,7 +6538,7 @@ var FileUpload = React50.forwardRef(
|
|
|
6366
6538
|
"aria-label": `Cancel upload of ${item.name}`,
|
|
6367
6539
|
onClick: () => onRemove?.(item.id)
|
|
6368
6540
|
}
|
|
6369
|
-
) : item.status === "error" ? /* @__PURE__ */ (0,
|
|
6541
|
+
) : item.status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6370
6542
|
IconButton,
|
|
6371
6543
|
{
|
|
6372
6544
|
icon: "rotate-cw",
|
|
@@ -6375,9 +6547,9 @@ var FileUpload = React50.forwardRef(
|
|
|
6375
6547
|
"aria-label": `Retry upload of ${item.name}`,
|
|
6376
6548
|
onClick: () => onRetry?.(item.id)
|
|
6377
6549
|
}
|
|
6378
|
-
) : /* @__PURE__ */ (0,
|
|
6379
|
-
/* @__PURE__ */ (0,
|
|
6380
|
-
/* @__PURE__ */ (0,
|
|
6550
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "inline-flex items-center gap-xs", children: [
|
|
6551
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { name: "circle-check", size: 20, className: "text-semantic-success", "aria-label": "Uploaded" }),
|
|
6552
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6381
6553
|
IconButton,
|
|
6382
6554
|
{
|
|
6383
6555
|
icon: "x",
|
|
@@ -6398,12 +6570,12 @@ var FileUpload = React50.forwardRef(
|
|
|
6398
6570
|
FileUpload.displayName = "FileUpload";
|
|
6399
6571
|
|
|
6400
6572
|
// virtual-pkg:src/atoms/Footer/Footer.tsx
|
|
6401
|
-
var
|
|
6573
|
+
var React53 = __toESM(require("react"));
|
|
6402
6574
|
|
|
6403
6575
|
// virtual-pkg:src/atoms/Logo/Logo.tsx
|
|
6404
6576
|
var import_react3 = __toESM(require("react"));
|
|
6405
|
-
var
|
|
6406
|
-
function
|
|
6577
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6578
|
+
function cn41(...parts) {
|
|
6407
6579
|
return parts.filter(Boolean).join(" ");
|
|
6408
6580
|
}
|
|
6409
6581
|
var markSize = {
|
|
@@ -6432,16 +6604,16 @@ var tileSize = {
|
|
|
6432
6604
|
lg: "size-16 rounded-lg"
|
|
6433
6605
|
};
|
|
6434
6606
|
function OrbitMark({ size }) {
|
|
6435
|
-
return /* @__PURE__ */ (0,
|
|
6607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6436
6608
|
"span",
|
|
6437
6609
|
{
|
|
6438
6610
|
"aria-hidden": "true",
|
|
6439
|
-
className:
|
|
6611
|
+
className: cn41(
|
|
6440
6612
|
"relative inline-flex shrink-0 items-center justify-center rounded-full border-current",
|
|
6441
6613
|
markSize[size],
|
|
6442
6614
|
ringWidth[size]
|
|
6443
6615
|
),
|
|
6444
|
-
children: /* @__PURE__ */ (0,
|
|
6616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: cn41("absolute -right-px -top-px rounded-full bg-current", dotSize[size]) })
|
|
6445
6617
|
}
|
|
6446
6618
|
);
|
|
6447
6619
|
}
|
|
@@ -6456,35 +6628,35 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6456
6628
|
className,
|
|
6457
6629
|
...rest
|
|
6458
6630
|
}, ref) => {
|
|
6459
|
-
const glyph2 = mark ?? /* @__PURE__ */ (0,
|
|
6460
|
-
const markNode = tone === "inverse" ? /* @__PURE__ */ (0,
|
|
6631
|
+
const glyph2 = mark ?? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(OrbitMark, { size });
|
|
6632
|
+
const markNode = tone === "inverse" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6461
6633
|
"span",
|
|
6462
6634
|
{
|
|
6463
6635
|
"aria-hidden": "true",
|
|
6464
|
-
className:
|
|
6636
|
+
className: cn41(
|
|
6465
6637
|
"inline-flex shrink-0 items-center justify-center bg-inverse-canvas text-inverse-ink shadow-sm",
|
|
6466
6638
|
tileSize[size]
|
|
6467
6639
|
),
|
|
6468
6640
|
children: glyph2
|
|
6469
6641
|
}
|
|
6470
|
-
) : /* @__PURE__ */ (0,
|
|
6471
|
-
const content = /* @__PURE__ */ (0,
|
|
6642
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { "aria-hidden": "true", className: "inline-flex shrink-0 text-ink", children: glyph2 });
|
|
6643
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
6472
6644
|
markNode,
|
|
6473
|
-
variant === "lockup" ? /* @__PURE__ */ (0,
|
|
6645
|
+
variant === "lockup" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { "aria-hidden": "true", className: cn41("whitespace-nowrap text-ink", wordSize[size]), children: name }) : null
|
|
6474
6646
|
] });
|
|
6475
|
-
const base2 =
|
|
6647
|
+
const base2 = cn41(
|
|
6476
6648
|
"inline-flex items-center",
|
|
6477
6649
|
size === "lg" ? "gap-md" : "gap-sm",
|
|
6478
6650
|
className
|
|
6479
6651
|
);
|
|
6480
6652
|
if (href) {
|
|
6481
|
-
return /* @__PURE__ */ (0,
|
|
6653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6482
6654
|
"a",
|
|
6483
6655
|
{
|
|
6484
6656
|
ref,
|
|
6485
6657
|
href,
|
|
6486
6658
|
"aria-label": `${name} home`,
|
|
6487
|
-
className:
|
|
6659
|
+
className: cn41(
|
|
6488
6660
|
base2,
|
|
6489
6661
|
"cursor-pointer rounded-sm transition duration-150 ease-out hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue"
|
|
6490
6662
|
),
|
|
@@ -6493,19 +6665,19 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6493
6665
|
}
|
|
6494
6666
|
);
|
|
6495
6667
|
}
|
|
6496
|
-
return /* @__PURE__ */ (0,
|
|
6668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { ref, role: "img", "aria-label": name, className: base2, ...rest, children: content });
|
|
6497
6669
|
}
|
|
6498
6670
|
);
|
|
6499
6671
|
Logo.displayName = "Logo";
|
|
6500
6672
|
|
|
6501
6673
|
// virtual-pkg:src/atoms/Footer/Footer.tsx
|
|
6502
|
-
var
|
|
6503
|
-
var
|
|
6674
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
6675
|
+
var cn42 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6504
6676
|
function Newsletter({ n }) {
|
|
6505
|
-
const id =
|
|
6506
|
-
const [email, setEmail] =
|
|
6507
|
-
const [state, setState] =
|
|
6508
|
-
return /* @__PURE__ */ (0,
|
|
6677
|
+
const id = React53.useId();
|
|
6678
|
+
const [email, setEmail] = React53.useState("");
|
|
6679
|
+
const [state, setState] = React53.useState("idle");
|
|
6680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6509
6681
|
"form",
|
|
6510
6682
|
{
|
|
6511
6683
|
className: "flex w-full flex-col gap-base rounded-lg border border-hairline bg-canvas p-lg shadow-card",
|
|
@@ -6517,12 +6689,12 @@ function Newsletter({ n }) {
|
|
|
6517
6689
|
setState("done");
|
|
6518
6690
|
},
|
|
6519
6691
|
children: [
|
|
6520
|
-
/* @__PURE__ */ (0,
|
|
6521
|
-
/* @__PURE__ */ (0,
|
|
6522
|
-
n.description ? /* @__PURE__ */ (0,
|
|
6692
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
6693
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h3", { id: `${id}-title`, className: "text-heading-sm text-ink", children: n.title }),
|
|
6694
|
+
n.description ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-body-md text-muted", children: n.description }) : null
|
|
6523
6695
|
] }),
|
|
6524
|
-
/* @__PURE__ */ (0,
|
|
6525
|
-
/* @__PURE__ */ (0,
|
|
6696
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-sm sm:flex-row", children: [
|
|
6697
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6526
6698
|
Input,
|
|
6527
6699
|
{
|
|
6528
6700
|
type: "email",
|
|
@@ -6534,16 +6706,16 @@ function Newsletter({ n }) {
|
|
|
6534
6706
|
setEmail(e.target.value);
|
|
6535
6707
|
if (state === "done") setState("idle");
|
|
6536
6708
|
},
|
|
6537
|
-
leading: /* @__PURE__ */ (0,
|
|
6709
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { name: "mail", size: 16 })
|
|
6538
6710
|
}
|
|
6539
6711
|
) }),
|
|
6540
|
-
/* @__PURE__ */ (0,
|
|
6712
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { type: "submit", variant: "primary", loading: state === "loading", children: state === "done" ? "Subscribed" : n.buttonLabel ?? "Subscribe" })
|
|
6541
6713
|
] })
|
|
6542
6714
|
]
|
|
6543
6715
|
}
|
|
6544
6716
|
);
|
|
6545
6717
|
}
|
|
6546
|
-
var Footer =
|
|
6718
|
+
var Footer = React53.forwardRef(
|
|
6547
6719
|
({
|
|
6548
6720
|
variant = "full",
|
|
6549
6721
|
brandName = "Northline",
|
|
@@ -6556,44 +6728,44 @@ var Footer = React52.forwardRef(
|
|
|
6556
6728
|
className,
|
|
6557
6729
|
...rest
|
|
6558
6730
|
}, ref) => {
|
|
6559
|
-
const legal = legalLinks.length ? /* @__PURE__ */ (0,
|
|
6731
|
+
const legal = legalLinks.length ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("nav", { "aria-label": "Legal", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { className: "flex flex-wrap items-center gap-x-lg gap-y-xs", children: legalLinks.map((l) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Link, { href: l.href, variant: "quiet", className: "text-body-sm", children: l.label }) }, l.label)) }) }) : null;
|
|
6560
6732
|
if (variant === "minimal") {
|
|
6561
|
-
return /* @__PURE__ */ (0,
|
|
6733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6562
6734
|
"footer",
|
|
6563
6735
|
{
|
|
6564
6736
|
ref,
|
|
6565
|
-
className:
|
|
6737
|
+
className: cn42(
|
|
6566
6738
|
"flex w-full flex-wrap items-center justify-between gap-base border-t border-hairline bg-canvas px-lg py-base text-ink",
|
|
6567
6739
|
className
|
|
6568
6740
|
),
|
|
6569
6741
|
...rest,
|
|
6570
6742
|
children: [
|
|
6571
|
-
/* @__PURE__ */ (0,
|
|
6743
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Logo, { size: "sm", name: brandName, href: brandHref }),
|
|
6572
6744
|
legal
|
|
6573
6745
|
]
|
|
6574
6746
|
}
|
|
6575
6747
|
);
|
|
6576
6748
|
}
|
|
6577
|
-
return /* @__PURE__ */ (0,
|
|
6749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6578
6750
|
"footer",
|
|
6579
6751
|
{
|
|
6580
6752
|
ref,
|
|
6581
|
-
className:
|
|
6753
|
+
className: cn42("w-full border-t border-hairline bg-canvas px-lg py-xl text-ink", className),
|
|
6582
6754
|
...rest,
|
|
6583
6755
|
children: [
|
|
6584
|
-
/* @__PURE__ */ (0,
|
|
6585
|
-
/* @__PURE__ */ (0,
|
|
6586
|
-
/* @__PURE__ */ (0,
|
|
6587
|
-
tagline ? /* @__PURE__ */ (0,
|
|
6756
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex w-full flex-col gap-xl md:flex-row md:justify-between", children: [
|
|
6757
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-base md:w-1/3", children: [
|
|
6758
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Logo, { size: "md", name: brandName, href: brandHref }),
|
|
6759
|
+
tagline ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-body-md text-body", children: tagline }) : null
|
|
6588
6760
|
] }),
|
|
6589
|
-
columns.length ? /* @__PURE__ */ (0,
|
|
6590
|
-
/* @__PURE__ */ (0,
|
|
6591
|
-
/* @__PURE__ */ (0,
|
|
6761
|
+
columns.length ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("nav", { "aria-label": "Footer", className: "grid grid-cols-2 gap-xl sm:grid-cols-3", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-md", children: [
|
|
6762
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h3", { className: "text-body-md font-weight-label text-ink", children: col.title }),
|
|
6763
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { className: "flex flex-col gap-sm", children: col.links.map((l) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Link, { href: l.href, variant: "quiet", className: "text-body-sm", children: l.label }) }, l.label)) })
|
|
6592
6764
|
] }, col.title)) }) : null
|
|
6593
6765
|
] }),
|
|
6594
|
-
newsletter ? /* @__PURE__ */ (0,
|
|
6595
|
-
legal || copyright ? /* @__PURE__ */ (0,
|
|
6596
|
-
copyright ? /* @__PURE__ */ (0,
|
|
6766
|
+
newsletter ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mt-xl w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Newsletter, { n: newsletter }) }) : null,
|
|
6767
|
+
legal || copyright ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "mt-xl flex w-full flex-wrap items-center justify-between gap-base border-t border-hairline-soft pt-base", children: [
|
|
6768
|
+
copyright ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-body-sm text-muted", children: copyright }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", {}),
|
|
6597
6769
|
legal
|
|
6598
6770
|
] }) : null
|
|
6599
6771
|
]
|
|
@@ -6604,18 +6776,18 @@ var Footer = React52.forwardRef(
|
|
|
6604
6776
|
Footer.displayName = "Footer";
|
|
6605
6777
|
|
|
6606
6778
|
// virtual-pkg:src/atoms/Form/Form.tsx
|
|
6607
|
-
var
|
|
6779
|
+
var React58 = __toESM(require("react"));
|
|
6608
6780
|
|
|
6609
6781
|
// virtual-pkg:src/atoms/FormDesktop/FormDesktop.tsx
|
|
6610
|
-
var
|
|
6782
|
+
var React56 = __toESM(require("react"));
|
|
6611
6783
|
|
|
6612
6784
|
// virtual-pkg:src/atoms/FormField/FormField.tsx
|
|
6613
|
-
var
|
|
6785
|
+
var React55 = __toESM(require("react"));
|
|
6614
6786
|
|
|
6615
6787
|
// virtual-pkg:src/atoms/Label/Label.tsx
|
|
6616
|
-
var
|
|
6617
|
-
var
|
|
6618
|
-
var Label =
|
|
6788
|
+
var React54 = __toESM(require("react"));
|
|
6789
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6790
|
+
var Label = React54.forwardRef(
|
|
6619
6791
|
({
|
|
6620
6792
|
required = false,
|
|
6621
6793
|
optional = false,
|
|
@@ -6627,7 +6799,7 @@ var Label = React53.forwardRef(
|
|
|
6627
6799
|
...rest
|
|
6628
6800
|
}, ref) => {
|
|
6629
6801
|
const optionalText = typeof optional === "string" ? optional : "Optional";
|
|
6630
|
-
return /* @__PURE__ */ (0,
|
|
6802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
6631
6803
|
"div",
|
|
6632
6804
|
{
|
|
6633
6805
|
className: [
|
|
@@ -6636,7 +6808,7 @@ var Label = React53.forwardRef(
|
|
|
6636
6808
|
className
|
|
6637
6809
|
].filter(Boolean).join(" "),
|
|
6638
6810
|
children: [
|
|
6639
|
-
/* @__PURE__ */ (0,
|
|
6811
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
6640
6812
|
"label",
|
|
6641
6813
|
{
|
|
6642
6814
|
ref,
|
|
@@ -6646,16 +6818,16 @@ var Label = React53.forwardRef(
|
|
|
6646
6818
|
].join(" "),
|
|
6647
6819
|
...rest,
|
|
6648
6820
|
children: [
|
|
6649
|
-
/* @__PURE__ */ (0,
|
|
6821
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { children: [
|
|
6650
6822
|
children,
|
|
6651
|
-
required && /* @__PURE__ */ (0,
|
|
6652
|
-
required && /* @__PURE__ */ (0,
|
|
6823
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "ml-xxs text-semantic-error", "aria-hidden": "true", children: "*" }),
|
|
6824
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "sr-only", children: " (required)" })
|
|
6653
6825
|
] }),
|
|
6654
|
-
optional && !required && /* @__PURE__ */ (0,
|
|
6826
|
+
optional && !required && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-body-sm text-muted-soft", children: optionalText })
|
|
6655
6827
|
]
|
|
6656
6828
|
}
|
|
6657
6829
|
),
|
|
6658
|
-
helper && /* @__PURE__ */ (0,
|
|
6830
|
+
helper && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { id: helperId, className: "text-body-sm text-muted", children: helper })
|
|
6659
6831
|
]
|
|
6660
6832
|
}
|
|
6661
6833
|
);
|
|
@@ -6664,9 +6836,9 @@ var Label = React53.forwardRef(
|
|
|
6664
6836
|
Label.displayName = "Label";
|
|
6665
6837
|
|
|
6666
6838
|
// virtual-pkg:src/atoms/FormField/FormField.tsx
|
|
6667
|
-
var
|
|
6668
|
-
var
|
|
6669
|
-
var FormField =
|
|
6839
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
6840
|
+
var cn43 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6841
|
+
var FormField = React55.forwardRef(
|
|
6670
6842
|
({
|
|
6671
6843
|
label,
|
|
6672
6844
|
helper,
|
|
@@ -6683,14 +6855,14 @@ var FormField = React54.forwardRef(
|
|
|
6683
6855
|
containerClassName,
|
|
6684
6856
|
...inputProps
|
|
6685
6857
|
}, ref) => {
|
|
6686
|
-
const autoId =
|
|
6858
|
+
const autoId = React55.useId();
|
|
6687
6859
|
const fieldId = id ?? `field-${autoId}`;
|
|
6688
6860
|
const messageId = `${fieldId}-message`;
|
|
6689
6861
|
const descriptionId = `${fieldId}-description`;
|
|
6690
6862
|
const resolved = status ?? (error ? "error" : successMessage ? "success" : "default");
|
|
6691
6863
|
const message = resolved === "error" && error ? error : resolved === "success" && successMessage ? successMessage : helper;
|
|
6692
6864
|
const describedBy = [description ? descriptionId : null, message ? messageId : null].filter(Boolean).join(" ") || void 0;
|
|
6693
|
-
const input = /* @__PURE__ */ (0,
|
|
6865
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6694
6866
|
Input,
|
|
6695
6867
|
{
|
|
6696
6868
|
ref,
|
|
@@ -6702,23 +6874,23 @@ var FormField = React54.forwardRef(
|
|
|
6702
6874
|
...inputProps
|
|
6703
6875
|
}
|
|
6704
6876
|
);
|
|
6705
|
-
const messageLine = /* @__PURE__ */ (0,
|
|
6877
|
+
const messageLine = /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
6706
6878
|
"p",
|
|
6707
6879
|
{
|
|
6708
6880
|
id: messageId,
|
|
6709
6881
|
"aria-live": resolved === "default" ? void 0 : "polite",
|
|
6710
|
-
className:
|
|
6882
|
+
className: cn43(
|
|
6711
6883
|
"flex items-center gap-xs text-body-sm transition-colors duration-150 ease-out",
|
|
6712
6884
|
layout === "stacked" && "min-h-5",
|
|
6713
6885
|
resolved === "error" ? "text-semantic-error" : resolved === "success" ? "text-semantic-success" : "text-muted"
|
|
6714
6886
|
),
|
|
6715
6887
|
children: [
|
|
6716
|
-
resolved === "success" && successMessage ? /* @__PURE__ */ (0,
|
|
6888
|
+
resolved === "success" && successMessage ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { name: "check", size: 14 }) : null,
|
|
6717
6889
|
message
|
|
6718
6890
|
]
|
|
6719
6891
|
}
|
|
6720
6892
|
);
|
|
6721
|
-
const labelNode = /* @__PURE__ */ (0,
|
|
6893
|
+
const labelNode = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6722
6894
|
Label,
|
|
6723
6895
|
{
|
|
6724
6896
|
htmlFor: fieldId,
|
|
@@ -6731,18 +6903,18 @@ var FormField = React54.forwardRef(
|
|
|
6731
6903
|
}
|
|
6732
6904
|
);
|
|
6733
6905
|
if (layout === "inline") {
|
|
6734
|
-
return /* @__PURE__ */ (0,
|
|
6906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
6735
6907
|
"div",
|
|
6736
6908
|
{
|
|
6737
|
-
className:
|
|
6909
|
+
className: cn43(
|
|
6738
6910
|
"grid w-full min-w-0 grid-cols-1 items-start gap-sm rounded-none sm:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] sm:gap-lg",
|
|
6739
6911
|
containerClassName
|
|
6740
6912
|
),
|
|
6741
6913
|
children: [
|
|
6742
|
-
/* @__PURE__ */ (0,
|
|
6743
|
-
/* @__PURE__ */ (0,
|
|
6744
|
-
/* @__PURE__ */ (0,
|
|
6745
|
-
addon ? /* @__PURE__ */ (0,
|
|
6914
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex min-h-8 items-center", children: labelNode }),
|
|
6915
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
6916
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
|
|
6917
|
+
addon ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "inline-flex shrink-0", children: addon }) : null,
|
|
6746
6918
|
input
|
|
6747
6919
|
] }),
|
|
6748
6920
|
message ? messageLine : null
|
|
@@ -6751,10 +6923,10 @@ var FormField = React54.forwardRef(
|
|
|
6751
6923
|
}
|
|
6752
6924
|
);
|
|
6753
6925
|
}
|
|
6754
|
-
return /* @__PURE__ */ (0,
|
|
6926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: cn43("flex w-full min-w-0 flex-col gap-sm rounded-none", containerClassName), children: [
|
|
6755
6927
|
labelNode,
|
|
6756
|
-
addon ? /* @__PURE__ */ (0,
|
|
6757
|
-
/* @__PURE__ */ (0,
|
|
6928
|
+
addon ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
|
|
6929
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "inline-flex shrink-0", children: addon }),
|
|
6758
6930
|
input
|
|
6759
6931
|
] }) : input,
|
|
6760
6932
|
messageLine
|
|
@@ -6764,7 +6936,7 @@ var FormField = React54.forwardRef(
|
|
|
6764
6936
|
FormField.displayName = "FormField";
|
|
6765
6937
|
|
|
6766
6938
|
// virtual-pkg:src/atoms/FormDesktop/FormDesktop.tsx
|
|
6767
|
-
var
|
|
6939
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
6768
6940
|
var DEFAULT_TIMEZONES = [
|
|
6769
6941
|
{ value: "utc-8", label: "GMT-8:00 \u2013 Pacific Time" },
|
|
6770
6942
|
{ value: "utc-5", label: "GMT-5:00 \u2013 Eastern Time" },
|
|
@@ -6773,8 +6945,8 @@ var DEFAULT_TIMEZONES = [
|
|
|
6773
6945
|
{ value: "utc+8", label: "GMT+8:00 \u2013 Singapore Standard Time" },
|
|
6774
6946
|
{ value: "utc+9", label: "GMT+9:00 \u2013 Japan Standard Time" }
|
|
6775
6947
|
];
|
|
6776
|
-
var
|
|
6777
|
-
var FormDesktop =
|
|
6948
|
+
var cn44 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6949
|
+
var FormDesktop = React56.forwardRef(
|
|
6778
6950
|
({
|
|
6779
6951
|
name,
|
|
6780
6952
|
onNameChange,
|
|
@@ -6796,10 +6968,10 @@ var FormDesktop = React55.forwardRef(
|
|
|
6796
6968
|
onSubmit,
|
|
6797
6969
|
...rest
|
|
6798
6970
|
}, ref) => {
|
|
6799
|
-
const autoId =
|
|
6971
|
+
const autoId = React56.useId();
|
|
6800
6972
|
const tzLabelId = `${autoId}-tz-label`;
|
|
6801
6973
|
const tzMessageId = `${autoId}-tz-message`;
|
|
6802
|
-
return /* @__PURE__ */ (0,
|
|
6974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6803
6975
|
"form",
|
|
6804
6976
|
{
|
|
6805
6977
|
ref,
|
|
@@ -6808,13 +6980,13 @@ var FormDesktop = React55.forwardRef(
|
|
|
6808
6980
|
e.preventDefault();
|
|
6809
6981
|
onSubmit?.(e);
|
|
6810
6982
|
},
|
|
6811
|
-
className:
|
|
6983
|
+
className: cn44(
|
|
6812
6984
|
"w-full min-w-0 overflow-hidden rounded-lg border border-hairline bg-canvas text-ink shadow-card",
|
|
6813
6985
|
className
|
|
6814
6986
|
),
|
|
6815
6987
|
...rest,
|
|
6816
|
-
children: /* @__PURE__ */ (0,
|
|
6817
|
-
/* @__PURE__ */ (0,
|
|
6988
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col divide-y divide-hairline-soft", children: [
|
|
6989
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6818
6990
|
FormField,
|
|
6819
6991
|
{
|
|
6820
6992
|
layout: "inline",
|
|
@@ -6824,17 +6996,17 @@ var FormDesktop = React55.forwardRef(
|
|
|
6824
6996
|
onChange: (e) => onNameChange?.(e.target.value),
|
|
6825
6997
|
error: errors.name,
|
|
6826
6998
|
disabled,
|
|
6827
|
-
addon: /* @__PURE__ */ (0,
|
|
6999
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6828
7000
|
"span",
|
|
6829
7001
|
{
|
|
6830
7002
|
"aria-hidden": "true",
|
|
6831
7003
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-semantic-info-soft text-semantic-info",
|
|
6832
|
-
children: /* @__PURE__ */ (0,
|
|
7004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: icon, size: 18 })
|
|
6833
7005
|
}
|
|
6834
7006
|
)
|
|
6835
7007
|
}
|
|
6836
7008
|
) }),
|
|
6837
|
-
/* @__PURE__ */ (0,
|
|
7009
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6838
7010
|
FormField,
|
|
6839
7011
|
{
|
|
6840
7012
|
layout: "inline",
|
|
@@ -6847,10 +7019,10 @@ var FormDesktop = React55.forwardRef(
|
|
|
6847
7019
|
disabled
|
|
6848
7020
|
}
|
|
6849
7021
|
) }),
|
|
6850
|
-
/* @__PURE__ */ (0,
|
|
6851
|
-
/* @__PURE__ */ (0,
|
|
6852
|
-
/* @__PURE__ */ (0,
|
|
6853
|
-
/* @__PURE__ */ (0,
|
|
7022
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "grid w-full min-w-0 grid-cols-1 items-start gap-sm sm:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] sm:gap-lg", children: [
|
|
7023
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex min-h-8 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Label, { id: tzLabelId, disabled, children: timezoneLabel }) }),
|
|
7024
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
7025
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6854
7026
|
Dropdown,
|
|
6855
7027
|
{
|
|
6856
7028
|
options: timezoneOptions,
|
|
@@ -6862,7 +7034,7 @@ var FormDesktop = React55.forwardRef(
|
|
|
6862
7034
|
disabled
|
|
6863
7035
|
}
|
|
6864
7036
|
),
|
|
6865
|
-
errors.timezone ? /* @__PURE__ */ (0,
|
|
7037
|
+
errors.timezone ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { id: tzMessageId, "aria-live": "polite", className: "text-body-sm text-semantic-error", children: errors.timezone }) : null
|
|
6866
7038
|
] })
|
|
6867
7039
|
] }) })
|
|
6868
7040
|
] })
|
|
@@ -6873,8 +7045,8 @@ var FormDesktop = React55.forwardRef(
|
|
|
6873
7045
|
FormDesktop.displayName = "FormDesktop";
|
|
6874
7046
|
|
|
6875
7047
|
// virtual-pkg:src/atoms/FormMobile/FormMobile.tsx
|
|
6876
|
-
var
|
|
6877
|
-
var
|
|
7048
|
+
var React57 = __toESM(require("react"));
|
|
7049
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
6878
7050
|
var TIMEZONES = [
|
|
6879
7051
|
{ value: "utc-8", label: "GMT-8:00 \u2013 Pacific Time" },
|
|
6880
7052
|
{ value: "utc-5", label: "GMT-5:00 \u2013 Eastern Time" },
|
|
@@ -6883,8 +7055,8 @@ var TIMEZONES = [
|
|
|
6883
7055
|
{ value: "utc+8", label: "GMT+8:00 \u2013 Singapore Standard Time" },
|
|
6884
7056
|
{ value: "utc+9", label: "GMT+9:00 \u2013 Japan Standard Time" }
|
|
6885
7057
|
];
|
|
6886
|
-
var
|
|
6887
|
-
var FormMobile =
|
|
7058
|
+
var cn45 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7059
|
+
var FormMobile = React57.forwardRef(
|
|
6888
7060
|
({
|
|
6889
7061
|
name,
|
|
6890
7062
|
onNameChange,
|
|
@@ -6906,9 +7078,9 @@ var FormMobile = React56.forwardRef(
|
|
|
6906
7078
|
onSubmit,
|
|
6907
7079
|
...rest
|
|
6908
7080
|
}, ref) => {
|
|
6909
|
-
const autoId =
|
|
7081
|
+
const autoId = React57.useId();
|
|
6910
7082
|
const tzLabelId = `${autoId}-tz-label`;
|
|
6911
|
-
return /* @__PURE__ */ (0,
|
|
7083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
6912
7084
|
"form",
|
|
6913
7085
|
{
|
|
6914
7086
|
ref,
|
|
@@ -6917,13 +7089,13 @@ var FormMobile = React56.forwardRef(
|
|
|
6917
7089
|
e.preventDefault();
|
|
6918
7090
|
onSubmit?.(e);
|
|
6919
7091
|
},
|
|
6920
|
-
className:
|
|
7092
|
+
className: cn45(
|
|
6921
7093
|
"flex w-full min-w-0 flex-col gap-xs rounded-lg border border-hairline bg-canvas p-base text-ink shadow-card",
|
|
6922
7094
|
className
|
|
6923
7095
|
),
|
|
6924
7096
|
...rest,
|
|
6925
7097
|
children: [
|
|
6926
|
-
/* @__PURE__ */ (0,
|
|
7098
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6927
7099
|
FormField,
|
|
6928
7100
|
{
|
|
6929
7101
|
label: nameLabel,
|
|
@@ -6932,17 +7104,17 @@ var FormMobile = React56.forwardRef(
|
|
|
6932
7104
|
onChange: (e) => onNameChange?.(e.target.value),
|
|
6933
7105
|
error: errors.name,
|
|
6934
7106
|
disabled,
|
|
6935
|
-
addon: /* @__PURE__ */ (0,
|
|
7107
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6936
7108
|
"span",
|
|
6937
7109
|
{
|
|
6938
7110
|
"aria-hidden": "true",
|
|
6939
7111
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-semantic-info-soft text-semantic-info",
|
|
6940
|
-
children: /* @__PURE__ */ (0,
|
|
7112
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: icon, size: 18 })
|
|
6941
7113
|
}
|
|
6942
7114
|
)
|
|
6943
7115
|
}
|
|
6944
7116
|
),
|
|
6945
|
-
/* @__PURE__ */ (0,
|
|
7117
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6946
7118
|
FormField,
|
|
6947
7119
|
{
|
|
6948
7120
|
label: identifierLabel,
|
|
@@ -6954,9 +7126,9 @@ var FormMobile = React56.forwardRef(
|
|
|
6954
7126
|
disabled
|
|
6955
7127
|
}
|
|
6956
7128
|
),
|
|
6957
|
-
/* @__PURE__ */ (0,
|
|
6958
|
-
/* @__PURE__ */ (0,
|
|
6959
|
-
/* @__PURE__ */ (0,
|
|
7129
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex w-full min-w-0 flex-col gap-sm", children: [
|
|
7130
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Label, { id: tzLabelId, disabled, children: timezoneLabel }),
|
|
7131
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6960
7132
|
Dropdown,
|
|
6961
7133
|
{
|
|
6962
7134
|
options: timezoneOptions,
|
|
@@ -6968,7 +7140,7 @@ var FormMobile = React56.forwardRef(
|
|
|
6968
7140
|
disabled
|
|
6969
7141
|
}
|
|
6970
7142
|
),
|
|
6971
|
-
errors.timezone ? /* @__PURE__ */ (0,
|
|
7143
|
+
errors.timezone ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { "aria-live": "polite", className: "text-body-sm text-semantic-error", children: errors.timezone }) : null
|
|
6972
7144
|
] })
|
|
6973
7145
|
]
|
|
6974
7146
|
}
|
|
@@ -6978,23 +7150,23 @@ var FormMobile = React56.forwardRef(
|
|
|
6978
7150
|
FormMobile.displayName = "FormMobile";
|
|
6979
7151
|
|
|
6980
7152
|
// virtual-pkg:src/atoms/Form/Form.tsx
|
|
6981
|
-
var
|
|
6982
|
-
var Form =
|
|
6983
|
-
({ wrapperClassName, ...props }, ref) => /* @__PURE__ */ (0,
|
|
6984
|
-
/* @__PURE__ */ (0,
|
|
6985
|
-
/* @__PURE__ */ (0,
|
|
7153
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7154
|
+
var Form = React58.forwardRef(
|
|
7155
|
+
({ wrapperClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { ref, className: ["w-full min-w-0", wrapperClassName].filter(Boolean).join(" "), children: [
|
|
7156
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "hidden w-full md:block", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(FormDesktop, { ...props }) }),
|
|
7157
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "w-full md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(FormMobile, { ...props }) })
|
|
6986
7158
|
] })
|
|
6987
7159
|
);
|
|
6988
7160
|
Form.displayName = "Form";
|
|
6989
7161
|
|
|
6990
7162
|
// virtual-pkg:src/atoms/HeroSection/HeroSection.tsx
|
|
6991
|
-
var
|
|
7163
|
+
var React61 = __toESM(require("react"));
|
|
6992
7164
|
|
|
6993
7165
|
// virtual-pkg:src/atoms/HeroSectionDesktop/HeroSectionDesktop.tsx
|
|
6994
|
-
var
|
|
6995
|
-
var
|
|
6996
|
-
var
|
|
6997
|
-
var HeroSectionDesktop =
|
|
7166
|
+
var React59 = __toESM(require("react"));
|
|
7167
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7168
|
+
var cn46 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7169
|
+
var HeroSectionDesktop = React59.forwardRef(
|
|
6998
7170
|
({
|
|
6999
7171
|
title,
|
|
7000
7172
|
description,
|
|
@@ -7006,38 +7178,38 @@ var HeroSectionDesktop = React58.forwardRef(
|
|
|
7006
7178
|
inset = true,
|
|
7007
7179
|
className,
|
|
7008
7180
|
...rest
|
|
7009
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7181
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7010
7182
|
"section",
|
|
7011
7183
|
{
|
|
7012
7184
|
ref,
|
|
7013
|
-
className:
|
|
7185
|
+
className: cn46(
|
|
7014
7186
|
"w-full py-section text-ink",
|
|
7015
7187
|
inset && "px-xxl",
|
|
7016
7188
|
surface === "canvas" ? "bg-canvas" : "bg-transparent",
|
|
7017
7189
|
className
|
|
7018
7190
|
),
|
|
7019
7191
|
...rest,
|
|
7020
|
-
children: /* @__PURE__ */ (0,
|
|
7192
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7021
7193
|
"div",
|
|
7022
7194
|
{
|
|
7023
|
-
className:
|
|
7195
|
+
className: cn46(
|
|
7024
7196
|
"grid w-full items-center gap-xxl",
|
|
7025
7197
|
media ? "grid-cols-2" : "grid-cols-1"
|
|
7026
7198
|
),
|
|
7027
7199
|
children: [
|
|
7028
|
-
/* @__PURE__ */ (0,
|
|
7029
|
-
/* @__PURE__ */ (0,
|
|
7030
|
-
description ? /* @__PURE__ */ (0,
|
|
7031
|
-
primaryAction || secondaryAction ? /* @__PURE__ */ (0,
|
|
7032
|
-
primaryAction ? /* @__PURE__ */ (0,
|
|
7033
|
-
secondaryAction ? /* @__PURE__ */ (0,
|
|
7200
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex min-w-0 flex-col items-start", children: [
|
|
7201
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h1", { className: "text-heading-lg text-ink lg:text-display-lg", children: title }),
|
|
7202
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "mt-base text-body-lg text-body", children: description }) : null,
|
|
7203
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mt-lg flex flex-wrap items-center gap-md", children: [
|
|
7204
|
+
primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "primary", size: "lg", onClick: primaryAction.onClick, children: primaryAction.label }) : null,
|
|
7205
|
+
secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "secondary", size: "lg", onClick: secondaryAction.onClick, children: secondaryAction.label }) : null
|
|
7034
7206
|
] }) : null,
|
|
7035
|
-
proof ? /* @__PURE__ */ (0,
|
|
7036
|
-
/* @__PURE__ */ (0,
|
|
7037
|
-
/* @__PURE__ */ (0,
|
|
7207
|
+
proof ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mt-lg flex items-center gap-md", children: [
|
|
7208
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "inline-flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(AvatarGroup, { items: proof.avatars, size: "md", layout: "stacked", max: 4 }) }),
|
|
7209
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-body-md text-body [&_strong]:font-weight-label [&_strong]:text-ink", children: proof.text })
|
|
7038
7210
|
] }) : null
|
|
7039
7211
|
] }),
|
|
7040
|
-
media ? /* @__PURE__ */ (0,
|
|
7212
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex min-w-0 items-center justify-center", children: media }) : null
|
|
7041
7213
|
]
|
|
7042
7214
|
}
|
|
7043
7215
|
)
|
|
@@ -7047,10 +7219,10 @@ var HeroSectionDesktop = React58.forwardRef(
|
|
|
7047
7219
|
HeroSectionDesktop.displayName = "HeroSectionDesktop";
|
|
7048
7220
|
|
|
7049
7221
|
// virtual-pkg:src/atoms/HeroSectionMobile/HeroSectionMobile.tsx
|
|
7050
|
-
var
|
|
7051
|
-
var
|
|
7052
|
-
var
|
|
7053
|
-
var HeroSectionMobile =
|
|
7222
|
+
var React60 = __toESM(require("react"));
|
|
7223
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7224
|
+
var cn47 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7225
|
+
var HeroSectionMobile = React60.forwardRef(
|
|
7054
7226
|
({
|
|
7055
7227
|
title,
|
|
7056
7228
|
description,
|
|
@@ -7062,11 +7234,11 @@ var HeroSectionMobile = React59.forwardRef(
|
|
|
7062
7234
|
inset = true,
|
|
7063
7235
|
className,
|
|
7064
7236
|
...rest
|
|
7065
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7237
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
7066
7238
|
"section",
|
|
7067
7239
|
{
|
|
7068
7240
|
ref,
|
|
7069
|
-
className:
|
|
7241
|
+
className: cn47(
|
|
7070
7242
|
"flex w-full flex-col py-xl text-ink",
|
|
7071
7243
|
inset && "px-base",
|
|
7072
7244
|
surface === "canvas" ? "bg-canvas" : "bg-transparent",
|
|
@@ -7074,16 +7246,16 @@ var HeroSectionMobile = React59.forwardRef(
|
|
|
7074
7246
|
),
|
|
7075
7247
|
...rest,
|
|
7076
7248
|
children: [
|
|
7077
|
-
/* @__PURE__ */ (0,
|
|
7078
|
-
description ? /* @__PURE__ */ (0,
|
|
7079
|
-
primaryAction || secondaryAction ? /* @__PURE__ */ (0,
|
|
7080
|
-
primaryAction ? /* @__PURE__ */ (0,
|
|
7081
|
-
secondaryAction ? /* @__PURE__ */ (0,
|
|
7249
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h1", { className: "text-heading-md text-ink", children: title }),
|
|
7250
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "mt-sm text-body-lg text-muted", children: description }) : null,
|
|
7251
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "mt-lg flex flex-col gap-sm", children: [
|
|
7252
|
+
primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { variant: "primary", size: "lg", fullWidth: true, onClick: primaryAction.onClick, children: primaryAction.label }) : null,
|
|
7253
|
+
secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { variant: "secondary", size: "lg", fullWidth: true, onClick: secondaryAction.onClick, children: secondaryAction.label }) : null
|
|
7082
7254
|
] }) : null,
|
|
7083
|
-
media ? /* @__PURE__ */ (0,
|
|
7084
|
-
proof ? /* @__PURE__ */ (0,
|
|
7085
|
-
/* @__PURE__ */ (0,
|
|
7086
|
-
/* @__PURE__ */ (0,
|
|
7255
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "mt-base w-full", children: media }) : null,
|
|
7256
|
+
proof ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "mt-base flex items-center gap-md", children: [
|
|
7257
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "inline-flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(AvatarGroup, { items: proof.avatars, size: "md", layout: "stacked", max: 4 }) }),
|
|
7258
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-body-sm text-body [&_strong]:font-weight-label [&_strong]:text-ink", children: proof.text })
|
|
7087
7259
|
] }) : null
|
|
7088
7260
|
]
|
|
7089
7261
|
}
|
|
@@ -7092,20 +7264,20 @@ var HeroSectionMobile = React59.forwardRef(
|
|
|
7092
7264
|
HeroSectionMobile.displayName = "HeroSectionMobile";
|
|
7093
7265
|
|
|
7094
7266
|
// virtual-pkg:src/atoms/HeroSection/HeroSection.tsx
|
|
7095
|
-
var
|
|
7096
|
-
var HeroSection =
|
|
7097
|
-
({ className, surface = "canvas", inset = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
7098
|
-
/* @__PURE__ */ (0,
|
|
7099
|
-
/* @__PURE__ */ (0,
|
|
7267
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7268
|
+
var HeroSection = React61.forwardRef(
|
|
7269
|
+
({ className, surface = "canvas", inset = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
7270
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(HeroSectionDesktop, { surface, inset, ...props }) }),
|
|
7271
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(HeroSectionMobile, { surface, inset, ...props }) })
|
|
7100
7272
|
] })
|
|
7101
7273
|
);
|
|
7102
7274
|
HeroSection.displayName = "HeroSection";
|
|
7103
7275
|
|
|
7104
7276
|
// virtual-pkg:src/atoms/IssueCard/IssueCard.tsx
|
|
7105
|
-
var
|
|
7106
|
-
var
|
|
7277
|
+
var React62 = __toESM(require("react"));
|
|
7278
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
7107
7279
|
var MAX_LABELS = 3;
|
|
7108
|
-
var IssueCard =
|
|
7280
|
+
var IssueCard = React62.forwardRef(
|
|
7109
7281
|
({
|
|
7110
7282
|
id,
|
|
7111
7283
|
title,
|
|
@@ -7147,7 +7319,7 @@ var IssueCard = React61.forwardRef(
|
|
|
7147
7319
|
onClick(event);
|
|
7148
7320
|
}
|
|
7149
7321
|
};
|
|
7150
|
-
return /* @__PURE__ */ (0,
|
|
7322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
7151
7323
|
"div",
|
|
7152
7324
|
{
|
|
7153
7325
|
ref,
|
|
@@ -7156,32 +7328,32 @@ var IssueCard = React61.forwardRef(
|
|
|
7156
7328
|
className: rootClass,
|
|
7157
7329
|
...rest,
|
|
7158
7330
|
children: [
|
|
7159
|
-
/* @__PURE__ */ (0,
|
|
7160
|
-
/* @__PURE__ */ (0,
|
|
7161
|
-
priority ? /* @__PURE__ */ (0,
|
|
7162
|
-
/* @__PURE__ */ (0,
|
|
7331
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-start justify-between gap-sm", children: [
|
|
7332
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex min-w-0 items-center gap-xs", children: [
|
|
7333
|
+
priority ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "flex shrink-0 items-center", children: priority }) : null,
|
|
7334
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-caption tabular-nums text-muted", children: id })
|
|
7163
7335
|
] }),
|
|
7164
|
-
actions ? /* @__PURE__ */ (0,
|
|
7336
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "relative z-10 shrink-0 opacity-0 transition-opacity duration-200 ease-out group-hover/issue:opacity-100 group-focus-within/issue:opacity-100 [@media(hover:none)]:opacity-100", children: actions }) : null
|
|
7165
7337
|
] }),
|
|
7166
|
-
/* @__PURE__ */ (0,
|
|
7167
|
-
status ? /* @__PURE__ */ (0,
|
|
7168
|
-
/* @__PURE__ */ (0,
|
|
7338
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-start gap-xs", children: [
|
|
7339
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "mt-xxs flex shrink-0 items-center", children: status }) : null,
|
|
7340
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "line-clamp-2 min-w-0 text-body-md text-ink", children: title })
|
|
7169
7341
|
] }),
|
|
7170
|
-
visibleLabels.length > 0 ? /* @__PURE__ */ (0,
|
|
7171
|
-
visibleLabels.map((label) => /* @__PURE__ */ (0,
|
|
7172
|
-
hiddenLabelCount > 0 ? /* @__PURE__ */ (0,
|
|
7173
|
-
/* @__PURE__ */ (0,
|
|
7342
|
+
visibleLabels.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "mt-xxs flex flex-wrap items-center gap-xs", children: [
|
|
7343
|
+
visibleLabels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Badge, { tone: label.tone, size: "sm", children: label.name }, label.name)),
|
|
7344
|
+
hiddenLabelCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Badge, { tone: "neutral", size: "sm", children: [
|
|
7345
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "tabular-nums", children: [
|
|
7174
7346
|
"+",
|
|
7175
7347
|
hiddenLabelCount
|
|
7176
7348
|
] }),
|
|
7177
|
-
/* @__PURE__ */ (0,
|
|
7349
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "sr-only", children: " more labels" })
|
|
7178
7350
|
] }) : null
|
|
7179
7351
|
] }) : null,
|
|
7180
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
7181
|
-
/* @__PURE__ */ (0,
|
|
7182
|
-
assignee ? /* @__PURE__ */ (0,
|
|
7352
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "mt-xxs flex items-center justify-between gap-sm", children: [
|
|
7353
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-caption text-muted-soft", children: meta }),
|
|
7354
|
+
assignee ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Avatar, { size: "xs", name: assignee.name, src: assignee.src, className: "shrink-0" }) : null
|
|
7183
7355
|
] }) : null,
|
|
7184
|
-
href ? /* @__PURE__ */ (0,
|
|
7356
|
+
href ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
7185
7357
|
"a",
|
|
7186
7358
|
{
|
|
7187
7359
|
href,
|
|
@@ -7190,7 +7362,7 @@ var IssueCard = React61.forwardRef(
|
|
|
7190
7362
|
"aria-current": selected ? "true" : void 0,
|
|
7191
7363
|
className: triggerClass
|
|
7192
7364
|
}
|
|
7193
|
-
) : onClick ? /* @__PURE__ */ (0,
|
|
7365
|
+
) : onClick ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
7194
7366
|
"a",
|
|
7195
7367
|
{
|
|
7196
7368
|
role: "button",
|
|
@@ -7210,10 +7382,10 @@ var IssueCard = React61.forwardRef(
|
|
|
7210
7382
|
IssueCard.displayName = "IssueCard";
|
|
7211
7383
|
|
|
7212
7384
|
// virtual-pkg:src/atoms/ListItem/ListItem.tsx
|
|
7213
|
-
var
|
|
7214
|
-
var
|
|
7215
|
-
var
|
|
7216
|
-
var ListItem =
|
|
7385
|
+
var React63 = __toESM(require("react"));
|
|
7386
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
7387
|
+
var cn48 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7388
|
+
var ListItem = React63.forwardRef(
|
|
7217
7389
|
({
|
|
7218
7390
|
title,
|
|
7219
7391
|
meta,
|
|
@@ -7227,7 +7399,7 @@ var ListItem = React62.forwardRef(
|
|
|
7227
7399
|
onClick,
|
|
7228
7400
|
className,
|
|
7229
7401
|
...rest
|
|
7230
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7402
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
7231
7403
|
"a",
|
|
7232
7404
|
{
|
|
7233
7405
|
ref,
|
|
@@ -7246,7 +7418,7 @@ var ListItem = React62.forwardRef(
|
|
|
7246
7418
|
if (!href) e.preventDefault();
|
|
7247
7419
|
onClick?.(e);
|
|
7248
7420
|
},
|
|
7249
|
-
className:
|
|
7421
|
+
className: cn48(
|
|
7250
7422
|
"group flex w-full items-center gap-md text-left",
|
|
7251
7423
|
meta ? "min-h-14 py-sm" : "min-h-12 py-sm",
|
|
7252
7424
|
"px-base cursor-pointer transition duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
@@ -7255,12 +7427,12 @@ var ListItem = React62.forwardRef(
|
|
|
7255
7427
|
),
|
|
7256
7428
|
...rest,
|
|
7257
7429
|
children: [
|
|
7258
|
-
leading ?? (icon && /* @__PURE__ */ (0,
|
|
7259
|
-
/* @__PURE__ */ (0,
|
|
7260
|
-
/* @__PURE__ */ (0,
|
|
7261
|
-
meta && /* @__PURE__ */ (0,
|
|
7430
|
+
leading ?? (icon && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { name: icon, size: 18, className: "shrink-0 text-ink group-data-[disabled]:text-muted" })),
|
|
7431
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
7432
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "truncate text-body-md text-ink group-data-[disabled]:text-muted", children: title }),
|
|
7433
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "truncate text-body-sm text-muted", children: meta })
|
|
7262
7434
|
] }),
|
|
7263
|
-
trailing === void 0 ? /* @__PURE__ */ (0,
|
|
7435
|
+
trailing === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7264
7436
|
Icon,
|
|
7265
7437
|
{
|
|
7266
7438
|
name: "chevron-right",
|
|
@@ -7275,14 +7447,14 @@ var ListItem = React62.forwardRef(
|
|
|
7275
7447
|
ListItem.displayName = "ListItem";
|
|
7276
7448
|
|
|
7277
7449
|
// virtual-pkg:src/atoms/Navbar/Navbar.tsx
|
|
7278
|
-
var
|
|
7450
|
+
var React66 = __toESM(require("react"));
|
|
7279
7451
|
|
|
7280
7452
|
// virtual-pkg:src/atoms/NavbarDesktop/NavbarDesktop.tsx
|
|
7281
|
-
var
|
|
7453
|
+
var React64 = __toESM(require("react"));
|
|
7282
7454
|
var import_react_dom7 = require("react-dom");
|
|
7283
|
-
var
|
|
7284
|
-
var
|
|
7285
|
-
var NavbarDesktop =
|
|
7455
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7456
|
+
var cn49 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7457
|
+
var NavbarDesktop = React64.forwardRef(
|
|
7286
7458
|
({
|
|
7287
7459
|
brandName = "Linear",
|
|
7288
7460
|
brandHref = "#",
|
|
@@ -7298,26 +7470,26 @@ var NavbarDesktop = React63.forwardRef(
|
|
|
7298
7470
|
className,
|
|
7299
7471
|
...rest
|
|
7300
7472
|
}, ref) => {
|
|
7301
|
-
const menuId =
|
|
7302
|
-
const triggerRef =
|
|
7303
|
-
const panelRef =
|
|
7304
|
-
const [innerOpen, setInnerOpen] =
|
|
7305
|
-
const [mounted, setMounted] =
|
|
7306
|
-
const [rect, setRect] =
|
|
7473
|
+
const menuId = React64.useId();
|
|
7474
|
+
const triggerRef = React64.useRef(null);
|
|
7475
|
+
const panelRef = React64.useRef(null);
|
|
7476
|
+
const [innerOpen, setInnerOpen] = React64.useState(false);
|
|
7477
|
+
const [mounted, setMounted] = React64.useState(false);
|
|
7478
|
+
const [rect, setRect] = React64.useState(null);
|
|
7307
7479
|
const open = menuOpen ?? innerOpen;
|
|
7308
|
-
|
|
7309
|
-
const setOpen =
|
|
7480
|
+
React64.useEffect(() => setMounted(true), []);
|
|
7481
|
+
const setOpen = React64.useCallback(
|
|
7310
7482
|
(next) => {
|
|
7311
7483
|
if (menuOpen === void 0) setInnerOpen(next);
|
|
7312
7484
|
onMenuOpenChange?.(next);
|
|
7313
7485
|
},
|
|
7314
7486
|
[menuOpen, onMenuOpenChange]
|
|
7315
7487
|
);
|
|
7316
|
-
const place2 =
|
|
7488
|
+
const place2 = React64.useCallback(() => {
|
|
7317
7489
|
const box = triggerRef.current?.getBoundingClientRect();
|
|
7318
7490
|
if (box) setRect({ top: box.bottom + 6, right: window.innerWidth - box.right });
|
|
7319
7491
|
}, []);
|
|
7320
|
-
|
|
7492
|
+
React64.useLayoutEffect(() => {
|
|
7321
7493
|
if (!open) return;
|
|
7322
7494
|
place2();
|
|
7323
7495
|
window.addEventListener("resize", place2);
|
|
@@ -7327,7 +7499,7 @@ var NavbarDesktop = React63.forwardRef(
|
|
|
7327
7499
|
window.removeEventListener("scroll", place2, true);
|
|
7328
7500
|
};
|
|
7329
7501
|
}, [open, place2]);
|
|
7330
|
-
|
|
7502
|
+
React64.useEffect(() => {
|
|
7331
7503
|
if (!open) return;
|
|
7332
7504
|
const onDown = (e) => {
|
|
7333
7505
|
const t = e.target;
|
|
@@ -7357,7 +7529,7 @@ var NavbarDesktop = React63.forwardRef(
|
|
|
7357
7529
|
const next = e.key === "ArrowDown" ? (idx + 1) % rows.length : (idx - 1 + rows.length) % rows.length;
|
|
7358
7530
|
rows[next]?.focus();
|
|
7359
7531
|
};
|
|
7360
|
-
const panel = /* @__PURE__ */ (0,
|
|
7532
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7361
7533
|
"div",
|
|
7362
7534
|
{
|
|
7363
7535
|
ref: panelRef,
|
|
@@ -7374,9 +7546,9 @@ var NavbarDesktop = React63.forwardRef(
|
|
|
7374
7546
|
zIndex: "var(--z-popover, 1300)"
|
|
7375
7547
|
},
|
|
7376
7548
|
className: "origin-top-right rounded-lg border border-hairline bg-canvas p-xs text-ink shadow-overlay transition duration-200 ease-out data-[state=open]:translate-y-0 data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:invisible data-[state=closed]:-translate-y-1 data-[state=closed]:opacity-0",
|
|
7377
|
-
children: menuItems.map((m) => /* @__PURE__ */ (0,
|
|
7378
|
-
m.separated && /* @__PURE__ */ (0,
|
|
7379
|
-
/* @__PURE__ */ (0,
|
|
7549
|
+
children: menuItems.map((m) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(React64.Fragment, { children: [
|
|
7550
|
+
m.separated && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Divider, { className: "my-xs" }),
|
|
7551
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7380
7552
|
MenuItem,
|
|
7381
7553
|
{
|
|
7382
7554
|
icon: m.icon,
|
|
@@ -7393,41 +7565,41 @@ var NavbarDesktop = React63.forwardRef(
|
|
|
7393
7565
|
] }, m.label))
|
|
7394
7566
|
}
|
|
7395
7567
|
);
|
|
7396
|
-
return /* @__PURE__ */ (0,
|
|
7568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
7397
7569
|
"header",
|
|
7398
7570
|
{
|
|
7399
7571
|
ref,
|
|
7400
|
-
className:
|
|
7572
|
+
className: cn49(
|
|
7401
7573
|
"flex h-14 w-full items-center gap-base border-b border-hairline bg-canvas px-lg text-ink",
|
|
7402
7574
|
className
|
|
7403
7575
|
),
|
|
7404
7576
|
...rest,
|
|
7405
7577
|
children: [
|
|
7406
|
-
/* @__PURE__ */ (0,
|
|
7407
|
-
/* @__PURE__ */ (0,
|
|
7408
|
-
/* @__PURE__ */ (0,
|
|
7578
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
7579
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Divider, { orientation: "vertical" }) }),
|
|
7580
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-x-auto", children: items.map((item) => {
|
|
7409
7581
|
const current = item.href === activeHref;
|
|
7410
|
-
return /* @__PURE__ */ (0,
|
|
7582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
7411
7583
|
"a",
|
|
7412
7584
|
{
|
|
7413
7585
|
href: item.href,
|
|
7414
7586
|
"aria-current": current ? "page" : void 0,
|
|
7415
7587
|
onClick: (e) => onNavigate?.(item, e),
|
|
7416
|
-
className:
|
|
7588
|
+
className: cn49(
|
|
7417
7589
|
"inline-flex h-8 shrink-0 items-center gap-sm whitespace-nowrap rounded-md px-md text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
|
|
7418
7590
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
7419
7591
|
),
|
|
7420
7592
|
children: [
|
|
7421
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7593
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: item.icon, size: 16 }),
|
|
7422
7594
|
item.label
|
|
7423
7595
|
]
|
|
7424
7596
|
},
|
|
7425
7597
|
item.href
|
|
7426
7598
|
);
|
|
7427
7599
|
}) }),
|
|
7428
|
-
/* @__PURE__ */ (0,
|
|
7429
|
-
onSearch && /* @__PURE__ */ (0,
|
|
7430
|
-
/* @__PURE__ */ (0,
|
|
7600
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
7601
|
+
onSearch && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(IconButton, { icon: "search", variant: "ghost", "aria-label": "Search", onClick: onSearch }),
|
|
7602
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7431
7603
|
Button,
|
|
7432
7604
|
{
|
|
7433
7605
|
ref: triggerRef,
|
|
@@ -7441,13 +7613,13 @@ var NavbarDesktop = React63.forwardRef(
|
|
|
7441
7613
|
if (!open) place2();
|
|
7442
7614
|
setOpen(!open);
|
|
7443
7615
|
},
|
|
7444
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
7445
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
7616
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }),
|
|
7617
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7446
7618
|
Icon,
|
|
7447
7619
|
{
|
|
7448
7620
|
name: "chevron-down",
|
|
7449
7621
|
size: 14,
|
|
7450
|
-
className:
|
|
7622
|
+
className: cn49("text-muted transition-transform duration-200 ease-out", open && "rotate-180")
|
|
7451
7623
|
}
|
|
7452
7624
|
)
|
|
7453
7625
|
}
|
|
@@ -7462,11 +7634,11 @@ var NavbarDesktop = React63.forwardRef(
|
|
|
7462
7634
|
NavbarDesktop.displayName = "NavbarDesktop";
|
|
7463
7635
|
|
|
7464
7636
|
// virtual-pkg:src/atoms/NavbarMobile/NavbarMobile.tsx
|
|
7465
|
-
var
|
|
7466
|
-
var
|
|
7467
|
-
var
|
|
7637
|
+
var React65 = __toESM(require("react"));
|
|
7638
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
7639
|
+
var cn50 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7468
7640
|
var rowClass = "flex h-9 w-full items-center gap-sm rounded-md px-base text-left text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue";
|
|
7469
|
-
var NavbarMobile =
|
|
7641
|
+
var NavbarMobile = React65.forwardRef(
|
|
7470
7642
|
({
|
|
7471
7643
|
brandName = "Linear",
|
|
7472
7644
|
brandHref = "#",
|
|
@@ -7482,14 +7654,14 @@ var NavbarMobile = React64.forwardRef(
|
|
|
7482
7654
|
className,
|
|
7483
7655
|
...rest
|
|
7484
7656
|
}, ref) => {
|
|
7485
|
-
const panelId =
|
|
7486
|
-
const [innerOpen, setInnerOpen] =
|
|
7657
|
+
const panelId = React65.useId();
|
|
7658
|
+
const [innerOpen, setInnerOpen] = React65.useState(defaultOpen);
|
|
7487
7659
|
const open = openProp ?? innerOpen;
|
|
7488
7660
|
const setOpen = (next) => {
|
|
7489
7661
|
if (openProp === void 0) setInnerOpen(next);
|
|
7490
7662
|
onOpenChange?.(next);
|
|
7491
7663
|
};
|
|
7492
|
-
|
|
7664
|
+
React65.useEffect(() => {
|
|
7493
7665
|
if (!open) return;
|
|
7494
7666
|
const onKey = (e) => {
|
|
7495
7667
|
if (e.key === "Escape") {
|
|
@@ -7501,17 +7673,17 @@ var NavbarMobile = React64.forwardRef(
|
|
|
7501
7673
|
return () => document.removeEventListener("keydown", onKey);
|
|
7502
7674
|
}, [open, openProp, onOpenChange]);
|
|
7503
7675
|
const state = open ? "open" : "closed";
|
|
7504
|
-
return /* @__PURE__ */ (0,
|
|
7676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
7505
7677
|
"header",
|
|
7506
7678
|
{
|
|
7507
7679
|
ref,
|
|
7508
7680
|
"data-state": state,
|
|
7509
|
-
className:
|
|
7681
|
+
className: cn50("w-full border-b border-hairline bg-canvas text-ink", className),
|
|
7510
7682
|
...rest,
|
|
7511
7683
|
children: [
|
|
7512
|
-
/* @__PURE__ */ (0,
|
|
7513
|
-
/* @__PURE__ */ (0,
|
|
7514
|
-
/* @__PURE__ */ (0,
|
|
7684
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex h-14 items-center justify-between gap-sm px-base", children: [
|
|
7685
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
7686
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7515
7687
|
IconButton,
|
|
7516
7688
|
{
|
|
7517
7689
|
icon: open ? "x" : "menu",
|
|
@@ -7523,22 +7695,22 @@ var NavbarMobile = React64.forwardRef(
|
|
|
7523
7695
|
}
|
|
7524
7696
|
)
|
|
7525
7697
|
] }),
|
|
7526
|
-
/* @__PURE__ */ (0,
|
|
7698
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7527
7699
|
"div",
|
|
7528
7700
|
{
|
|
7529
7701
|
id: panelId,
|
|
7530
7702
|
"data-state": state,
|
|
7531
7703
|
"aria-hidden": open ? void 0 : true,
|
|
7532
7704
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
7533
|
-
children: /* @__PURE__ */ (0,
|
|
7705
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
7534
7706
|
"div",
|
|
7535
7707
|
{
|
|
7536
7708
|
"data-state": state,
|
|
7537
7709
|
className: "border-t border-hairline px-sm py-sm transition duration-200 ease-out data-[state=open]:translate-y-0 data-[state=open]:opacity-100 data-[state=closed]:invisible data-[state=closed]:-translate-y-1 data-[state=closed]:opacity-0",
|
|
7538
7710
|
children: [
|
|
7539
|
-
/* @__PURE__ */ (0,
|
|
7711
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("nav", { "aria-label": "Primary", className: "flex flex-col gap-xxs", children: items.map((item) => {
|
|
7540
7712
|
const current = item.href === activeHref;
|
|
7541
|
-
return /* @__PURE__ */ (0,
|
|
7713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
7542
7714
|
"a",
|
|
7543
7715
|
{
|
|
7544
7716
|
href: item.href,
|
|
@@ -7548,36 +7720,36 @@ var NavbarMobile = React64.forwardRef(
|
|
|
7548
7720
|
onNavigate?.(item, e);
|
|
7549
7721
|
setOpen(false);
|
|
7550
7722
|
},
|
|
7551
|
-
className:
|
|
7723
|
+
className: cn50(
|
|
7552
7724
|
rowClass,
|
|
7553
7725
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
7554
7726
|
),
|
|
7555
7727
|
children: [
|
|
7556
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7728
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }),
|
|
7557
7729
|
item.label
|
|
7558
7730
|
]
|
|
7559
7731
|
},
|
|
7560
7732
|
item.href
|
|
7561
7733
|
);
|
|
7562
7734
|
}) }),
|
|
7563
|
-
(userName || accountActions.length > 0) && /* @__PURE__ */ (0,
|
|
7564
|
-
/* @__PURE__ */ (0,
|
|
7565
|
-
userName && /* @__PURE__ */ (0,
|
|
7566
|
-
/* @__PURE__ */ (0,
|
|
7567
|
-
/* @__PURE__ */ (0,
|
|
7735
|
+
(userName || accountActions.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
7736
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Divider, { className: "my-sm" }),
|
|
7737
|
+
userName && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center gap-sm px-base py-sm", children: [
|
|
7738
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "xs" }),
|
|
7739
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "truncate text-body-md text-ink", children: userName })
|
|
7568
7740
|
] }),
|
|
7569
|
-
/* @__PURE__ */ (0,
|
|
7741
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { "aria-label": "Account", role: "group", className: "flex flex-col gap-xxs", children: accountActions.map((a) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7570
7742
|
Button,
|
|
7571
7743
|
{
|
|
7572
7744
|
variant: "item",
|
|
7573
7745
|
size: "lg",
|
|
7574
7746
|
tabIndex: open ? 0 : -1,
|
|
7575
|
-
leadingIcon: a.icon ? /* @__PURE__ */ (0,
|
|
7747
|
+
leadingIcon: a.icon ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { name: a.icon, size: 16, className: a.tone === "destructive" ? "text-semantic-error" : "text-body" }) : void 0,
|
|
7576
7748
|
onClick: () => {
|
|
7577
7749
|
a.onSelect?.();
|
|
7578
7750
|
setOpen(false);
|
|
7579
7751
|
},
|
|
7580
|
-
children: /* @__PURE__ */ (0,
|
|
7752
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: a.tone === "destructive" ? "text-semantic-error" : void 0, children: a.label })
|
|
7581
7753
|
},
|
|
7582
7754
|
a.label
|
|
7583
7755
|
)) })
|
|
@@ -7595,8 +7767,8 @@ var NavbarMobile = React64.forwardRef(
|
|
|
7595
7767
|
NavbarMobile.displayName = "NavbarMobile";
|
|
7596
7768
|
|
|
7597
7769
|
// virtual-pkg:src/atoms/Navbar/Navbar.tsx
|
|
7598
|
-
var
|
|
7599
|
-
var Navbar =
|
|
7770
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
7771
|
+
var Navbar = React66.forwardRef(
|
|
7600
7772
|
({
|
|
7601
7773
|
brandName,
|
|
7602
7774
|
brandHref,
|
|
@@ -7615,8 +7787,8 @@ var Navbar = React65.forwardRef(
|
|
|
7615
7787
|
className
|
|
7616
7788
|
}, ref) => {
|
|
7617
7789
|
const accountActions = mobileAccountActions ?? menuItems.map((m) => ({ label: m.label, icon: m.icon, tone: m.tone, onSelect: m.onSelect }));
|
|
7618
|
-
return /* @__PURE__ */ (0,
|
|
7619
|
-
/* @__PURE__ */ (0,
|
|
7790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
7791
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7620
7792
|
NavbarDesktop,
|
|
7621
7793
|
{
|
|
7622
7794
|
brandName,
|
|
@@ -7632,7 +7804,7 @@ var Navbar = React65.forwardRef(
|
|
|
7632
7804
|
onMenuOpenChange
|
|
7633
7805
|
}
|
|
7634
7806
|
) }),
|
|
7635
|
-
/* @__PURE__ */ (0,
|
|
7807
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7636
7808
|
NavbarMobile,
|
|
7637
7809
|
{
|
|
7638
7810
|
brandName,
|
|
@@ -7653,17 +7825,17 @@ var Navbar = React65.forwardRef(
|
|
|
7653
7825
|
Navbar.displayName = "Navbar";
|
|
7654
7826
|
|
|
7655
7827
|
// virtual-pkg:src/atoms/NavigationMenu/NavigationMenu.tsx
|
|
7656
|
-
var
|
|
7828
|
+
var React69 = __toESM(require("react"));
|
|
7657
7829
|
|
|
7658
7830
|
// virtual-pkg:src/atoms/NavigationMenuDesktop/NavigationMenuDesktop.tsx
|
|
7659
|
-
var
|
|
7831
|
+
var React67 = __toESM(require("react"));
|
|
7660
7832
|
var import_react_dom8 = require("react-dom");
|
|
7661
|
-
var
|
|
7662
|
-
var
|
|
7833
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
7834
|
+
var cn51 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7663
7835
|
var panelMotion = "transition duration-200 ease-out data-[state=open]:translate-y-0 data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:invisible data-[state=closed]:-translate-y-1 data-[state=closed]:opacity-0";
|
|
7664
7836
|
var useScrolled = (enabled, threshold = 16) => {
|
|
7665
|
-
const [scrolled, setScrolled] =
|
|
7666
|
-
|
|
7837
|
+
const [scrolled, setScrolled] = React67.useState(false);
|
|
7838
|
+
React67.useEffect(() => {
|
|
7667
7839
|
if (!enabled) {
|
|
7668
7840
|
setScrolled(false);
|
|
7669
7841
|
return;
|
|
@@ -7675,7 +7847,7 @@ var useScrolled = (enabled, threshold = 16) => {
|
|
|
7675
7847
|
}, [enabled, threshold]);
|
|
7676
7848
|
return scrolled;
|
|
7677
7849
|
};
|
|
7678
|
-
var NavigationMenuDesktop =
|
|
7850
|
+
var NavigationMenuDesktop = React67.forwardRef(
|
|
7679
7851
|
({
|
|
7680
7852
|
brandName = "Linear",
|
|
7681
7853
|
brandHref = "#",
|
|
@@ -7690,23 +7862,23 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7690
7862
|
className,
|
|
7691
7863
|
...rest
|
|
7692
7864
|
}, ref) => {
|
|
7693
|
-
const baseId =
|
|
7694
|
-
const [innerOpen, setInnerOpen] =
|
|
7865
|
+
const baseId = React67.useId();
|
|
7866
|
+
const [innerOpen, setInnerOpen] = React67.useState(null);
|
|
7695
7867
|
const openId = openIdProp !== void 0 ? openIdProp : innerOpen;
|
|
7696
|
-
const [mounted, setMounted] =
|
|
7697
|
-
const [rects, setRects] =
|
|
7698
|
-
const triggerRefs =
|
|
7699
|
-
const panelRefs =
|
|
7868
|
+
const [mounted, setMounted] = React67.useState(false);
|
|
7869
|
+
const [rects, setRects] = React67.useState({});
|
|
7870
|
+
const triggerRefs = React67.useRef({});
|
|
7871
|
+
const panelRefs = React67.useRef({});
|
|
7700
7872
|
const scrolled = useScrolled(transparent);
|
|
7701
|
-
|
|
7702
|
-
const setOpenId =
|
|
7873
|
+
React67.useEffect(() => setMounted(true), []);
|
|
7874
|
+
const setOpenId = React67.useCallback(
|
|
7703
7875
|
(id) => {
|
|
7704
7876
|
if (openIdProp === void 0) setInnerOpen(id);
|
|
7705
7877
|
onOpenIdChange?.(id);
|
|
7706
7878
|
},
|
|
7707
7879
|
[openIdProp, onOpenIdChange]
|
|
7708
7880
|
);
|
|
7709
|
-
const place2 =
|
|
7881
|
+
const place2 = React67.useCallback((id) => {
|
|
7710
7882
|
const el = triggerRefs.current[id];
|
|
7711
7883
|
const box = el?.getBoundingClientRect();
|
|
7712
7884
|
if (!box) return;
|
|
@@ -7715,7 +7887,7 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7715
7887
|
const left = Math.max(16, Math.min(box.left, window.innerWidth - width - 16));
|
|
7716
7888
|
setRects((prev) => ({ ...prev, [id]: { top: box.bottom + 6, left } }));
|
|
7717
7889
|
}, [items]);
|
|
7718
|
-
|
|
7890
|
+
React67.useLayoutEffect(() => {
|
|
7719
7891
|
if (!openId) return;
|
|
7720
7892
|
place2(openId);
|
|
7721
7893
|
const onMove = () => place2(openId);
|
|
@@ -7729,7 +7901,7 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7729
7901
|
window.removeEventListener("scroll", onMove, true);
|
|
7730
7902
|
};
|
|
7731
7903
|
}, [openId, place2]);
|
|
7732
|
-
|
|
7904
|
+
React67.useEffect(() => {
|
|
7733
7905
|
if (!openId) return;
|
|
7734
7906
|
const onDown = (e) => {
|
|
7735
7907
|
const t = e.target;
|
|
@@ -7764,7 +7936,7 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7764
7936
|
zIndex: "var(--z-popover, 1300)"
|
|
7765
7937
|
};
|
|
7766
7938
|
if (item.columns) {
|
|
7767
|
-
return /* @__PURE__ */ (0,
|
|
7939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7768
7940
|
"div",
|
|
7769
7941
|
{
|
|
7770
7942
|
ref: (el) => {
|
|
@@ -7775,19 +7947,19 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7775
7947
|
role: "region",
|
|
7776
7948
|
"data-state": open ? "open" : "closed",
|
|
7777
7949
|
style: { ...style, width: "min(760px, calc(100vw - 32px))" },
|
|
7778
|
-
className:
|
|
7779
|
-
children: /* @__PURE__ */ (0,
|
|
7780
|
-
/* @__PURE__ */ (0,
|
|
7781
|
-
/* @__PURE__ */ (0,
|
|
7950
|
+
className: cn51("origin-top rounded-xl border border-hairline bg-canvas p-lg text-ink shadow-overlay", panelMotion),
|
|
7951
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "grid grid-cols-3 gap-lg", children: item.columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
7952
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "px-sm text-label text-ink", children: col.title }),
|
|
7953
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("ul", { className: "flex flex-col", children: col.links.map((link) => {
|
|
7782
7954
|
const current = link.href === activeHref;
|
|
7783
|
-
return /* @__PURE__ */ (0,
|
|
7955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7784
7956
|
"a",
|
|
7785
7957
|
{
|
|
7786
7958
|
href: link.href,
|
|
7787
7959
|
tabIndex: open ? 0 : -1,
|
|
7788
7960
|
"aria-current": current ? "page" : void 0,
|
|
7789
7961
|
onClick: (e) => clickLink(link, e),
|
|
7790
|
-
className:
|
|
7962
|
+
className: cn51(
|
|
7791
7963
|
"flex h-8 items-center rounded-md px-sm text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue",
|
|
7792
7964
|
current ? "bg-primary-soft text-ink" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
7793
7965
|
),
|
|
@@ -7800,7 +7972,7 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7800
7972
|
item.id
|
|
7801
7973
|
);
|
|
7802
7974
|
}
|
|
7803
|
-
return /* @__PURE__ */ (0,
|
|
7975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7804
7976
|
"div",
|
|
7805
7977
|
{
|
|
7806
7978
|
ref: (el) => {
|
|
@@ -7811,12 +7983,12 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7811
7983
|
"aria-label": item.label,
|
|
7812
7984
|
"data-state": open ? "open" : "closed",
|
|
7813
7985
|
style: { ...style, minWidth: 240 },
|
|
7814
|
-
className:
|
|
7986
|
+
className: cn51("origin-top rounded-lg border border-hairline bg-canvas p-xs text-ink shadow-overlay", panelMotion),
|
|
7815
7987
|
children: (item.menu ?? []).map((link) => {
|
|
7816
7988
|
const current = link.href === activeHref;
|
|
7817
|
-
return /* @__PURE__ */ (0,
|
|
7818
|
-
link.separated && /* @__PURE__ */ (0,
|
|
7819
|
-
/* @__PURE__ */ (0,
|
|
7989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(React67.Fragment, { children: [
|
|
7990
|
+
link.separated && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Divider, { className: "my-xs" }),
|
|
7991
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7820
7992
|
"a",
|
|
7821
7993
|
{
|
|
7822
7994
|
href: link.href,
|
|
@@ -7824,7 +7996,7 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7824
7996
|
tabIndex: open ? 0 : -1,
|
|
7825
7997
|
"aria-current": current ? "page" : void 0,
|
|
7826
7998
|
onClick: (e) => clickLink(link, e),
|
|
7827
|
-
className:
|
|
7999
|
+
className: cn51(
|
|
7828
8000
|
"flex h-9 w-full items-center rounded-md px-md text-body-md text-ink cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue",
|
|
7829
8001
|
current ? "bg-primary-soft font-weight-label" : "hover:bg-surface-soft active:bg-surface-strong"
|
|
7830
8002
|
),
|
|
@@ -7838,12 +8010,12 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7838
8010
|
);
|
|
7839
8011
|
};
|
|
7840
8012
|
const solid = !transparent || scrolled;
|
|
7841
|
-
return /* @__PURE__ */ (0,
|
|
8013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
7842
8014
|
"header",
|
|
7843
8015
|
{
|
|
7844
8016
|
ref,
|
|
7845
8017
|
style: transparent ? { zIndex: "var(--z-sticky, 1100)" } : void 0,
|
|
7846
|
-
className:
|
|
8018
|
+
className: cn51(
|
|
7847
8019
|
"flex h-14 w-full items-center gap-sm border-b px-md text-ink transition-colors duration-200 ease-out",
|
|
7848
8020
|
transparent && "sticky top-0",
|
|
7849
8021
|
solid ? "border-hairline bg-canvas" : "border-transparent bg-transparent",
|
|
@@ -7851,14 +8023,14 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7851
8023
|
),
|
|
7852
8024
|
...rest,
|
|
7853
8025
|
children: [
|
|
7854
|
-
/* @__PURE__ */ (0,
|
|
7855
|
-
/* @__PURE__ */ (0,
|
|
7856
|
-
/* @__PURE__ */ (0,
|
|
8026
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
8027
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Divider, { orientation: "vertical" }) }),
|
|
8028
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-hidden", children: items.map((item) => {
|
|
7857
8029
|
const hasPanel = Boolean(item.menu?.length || item.columns?.length);
|
|
7858
8030
|
const current = item.id === activeId;
|
|
7859
8031
|
const open = openId === item.id;
|
|
7860
8032
|
if (!hasPanel) {
|
|
7861
|
-
return /* @__PURE__ */ (0,
|
|
8033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
7862
8034
|
"a",
|
|
7863
8035
|
{
|
|
7864
8036
|
href: item.href ?? "#",
|
|
@@ -7867,19 +8039,19 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7867
8039
|
onNavigate?.({ label: item.label, href: item.href ?? "#" }, e);
|
|
7868
8040
|
setOpenId(null);
|
|
7869
8041
|
},
|
|
7870
|
-
className:
|
|
8042
|
+
className: cn51(
|
|
7871
8043
|
"inline-flex h-8 shrink-0 items-center gap-sm whitespace-nowrap rounded-md px-sm text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
|
|
7872
8044
|
current ? "bg-surface-strong text-ink" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
7873
8045
|
),
|
|
7874
8046
|
children: [
|
|
7875
|
-
item.icon && /* @__PURE__ */ (0,
|
|
8047
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { name: item.icon, size: 16 }),
|
|
7876
8048
|
item.label
|
|
7877
8049
|
]
|
|
7878
8050
|
},
|
|
7879
8051
|
item.id
|
|
7880
8052
|
);
|
|
7881
8053
|
}
|
|
7882
|
-
return /* @__PURE__ */ (0,
|
|
8054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7883
8055
|
Button,
|
|
7884
8056
|
{
|
|
7885
8057
|
ref: (el) => {
|
|
@@ -7894,13 +8066,13 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7894
8066
|
if (!open) place2(item.id);
|
|
7895
8067
|
setOpenId(open ? null : item.id);
|
|
7896
8068
|
},
|
|
7897
|
-
leadingIcon: item.icon ? /* @__PURE__ */ (0,
|
|
7898
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
8069
|
+
leadingIcon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { name: item.icon, size: 16 }) : void 0,
|
|
8070
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7899
8071
|
Icon,
|
|
7900
8072
|
{
|
|
7901
8073
|
name: "chevron-down",
|
|
7902
8074
|
size: 12,
|
|
7903
|
-
className:
|
|
8075
|
+
className: cn51("text-muted transition-transform duration-200 ease-out", open && "rotate-180")
|
|
7904
8076
|
}
|
|
7905
8077
|
),
|
|
7906
8078
|
children: item.label
|
|
@@ -7908,9 +8080,9 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7908
8080
|
item.id
|
|
7909
8081
|
);
|
|
7910
8082
|
}) }),
|
|
7911
|
-
actions !== void 0 && /* @__PURE__ */ (0,
|
|
8083
|
+
actions !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex shrink-0 items-center gap-sm", children: actions }),
|
|
7912
8084
|
mounted ? (0, import_react_dom8.createPortal)(
|
|
7913
|
-
/* @__PURE__ */ (0,
|
|
8085
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: items.filter((i) => i.menu?.length || i.columns?.length).map(renderPanel) }),
|
|
7914
8086
|
document.body
|
|
7915
8087
|
) : null
|
|
7916
8088
|
]
|
|
@@ -7921,13 +8093,13 @@ var NavigationMenuDesktop = React66.forwardRef(
|
|
|
7921
8093
|
NavigationMenuDesktop.displayName = "NavigationMenuDesktop";
|
|
7922
8094
|
|
|
7923
8095
|
// virtual-pkg:src/atoms/NavigationMenuMobile/NavigationMenuMobile.tsx
|
|
7924
|
-
var
|
|
7925
|
-
var
|
|
7926
|
-
var
|
|
8096
|
+
var React68 = __toESM(require("react"));
|
|
8097
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
8098
|
+
var cn52 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7927
8099
|
var rowClass2 = "flex h-9 w-full items-center gap-sm rounded-md border border-transparent px-base text-left text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue";
|
|
7928
8100
|
var useScrolled2 = (enabled, threshold = 16) => {
|
|
7929
|
-
const [scrolled, setScrolled] =
|
|
7930
|
-
|
|
8101
|
+
const [scrolled, setScrolled] = React68.useState(false);
|
|
8102
|
+
React68.useEffect(() => {
|
|
7931
8103
|
if (!enabled) {
|
|
7932
8104
|
setScrolled(false);
|
|
7933
8105
|
return;
|
|
@@ -7939,7 +8111,7 @@ var useScrolled2 = (enabled, threshold = 16) => {
|
|
|
7939
8111
|
}, [enabled, threshold]);
|
|
7940
8112
|
return scrolled;
|
|
7941
8113
|
};
|
|
7942
|
-
var NavigationMenuMobile =
|
|
8114
|
+
var NavigationMenuMobile = React68.forwardRef(
|
|
7943
8115
|
({
|
|
7944
8116
|
brandName = "Linear",
|
|
7945
8117
|
brandHref = "#",
|
|
@@ -7959,25 +8131,25 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
7959
8131
|
className,
|
|
7960
8132
|
...rest
|
|
7961
8133
|
}, ref) => {
|
|
7962
|
-
const autoId =
|
|
8134
|
+
const autoId = React68.useId();
|
|
7963
8135
|
const panelId = panelIdProp ?? `${autoId}-panel`;
|
|
7964
|
-
const [innerOpen, setInnerOpen] =
|
|
8136
|
+
const [innerOpen, setInnerOpen] = React68.useState(defaultOpen);
|
|
7965
8137
|
const open = openProp ?? innerOpen;
|
|
7966
|
-
const setOpen =
|
|
8138
|
+
const setOpen = React68.useCallback(
|
|
7967
8139
|
(next) => {
|
|
7968
8140
|
if (openProp === void 0) setInnerOpen(next);
|
|
7969
8141
|
onOpenChange?.(next);
|
|
7970
8142
|
},
|
|
7971
8143
|
[openProp, onOpenChange]
|
|
7972
8144
|
);
|
|
7973
|
-
const [innerSection, setInnerSection] =
|
|
8145
|
+
const [innerSection, setInnerSection] = React68.useState(null);
|
|
7974
8146
|
const section = sectionProp !== void 0 ? sectionProp : innerSection;
|
|
7975
8147
|
const setSection = (id) => {
|
|
7976
8148
|
if (sectionProp === void 0) setInnerSection(id);
|
|
7977
8149
|
onSectionIdChange?.(id);
|
|
7978
8150
|
};
|
|
7979
8151
|
const scrolled = useScrolled2(transparent);
|
|
7980
|
-
|
|
8152
|
+
React68.useEffect(() => {
|
|
7981
8153
|
if (!open) return;
|
|
7982
8154
|
const onKey = (e) => {
|
|
7983
8155
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -7989,9 +8161,9 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
7989
8161
|
const solid = !transparent || scrolled || open;
|
|
7990
8162
|
const subLink = (link, tabbable) => {
|
|
7991
8163
|
const current = link.href === activeHref;
|
|
7992
|
-
return /* @__PURE__ */ (0,
|
|
7993
|
-
link.separated && /* @__PURE__ */ (0,
|
|
7994
|
-
/* @__PURE__ */ (0,
|
|
8164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("li", { children: [
|
|
8165
|
+
link.separated && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Divider, { className: "my-xs" }),
|
|
8166
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7995
8167
|
"a",
|
|
7996
8168
|
{
|
|
7997
8169
|
href: link.href,
|
|
@@ -8001,7 +8173,7 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8001
8173
|
onNavigate?.(link, e);
|
|
8002
8174
|
setOpen(false);
|
|
8003
8175
|
},
|
|
8004
|
-
className:
|
|
8176
|
+
className: cn52(
|
|
8005
8177
|
"flex h-9 w-full items-center rounded-md px-base text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue",
|
|
8006
8178
|
current ? "bg-surface-strong text-ink" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
8007
8179
|
),
|
|
@@ -8010,13 +8182,13 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8010
8182
|
)
|
|
8011
8183
|
] }, link.href);
|
|
8012
8184
|
};
|
|
8013
|
-
return /* @__PURE__ */ (0,
|
|
8185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
8014
8186
|
"header",
|
|
8015
8187
|
{
|
|
8016
8188
|
ref,
|
|
8017
8189
|
"data-state": state,
|
|
8018
8190
|
style: transparent ? { zIndex: "var(--z-sticky, 1100)" } : void 0,
|
|
8019
|
-
className:
|
|
8191
|
+
className: cn52(
|
|
8020
8192
|
"w-full border-b text-ink transition-colors duration-200 ease-out",
|
|
8021
8193
|
transparent && "sticky top-0",
|
|
8022
8194
|
solid ? "border-hairline bg-canvas" : "border-transparent bg-transparent",
|
|
@@ -8024,11 +8196,11 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8024
8196
|
),
|
|
8025
8197
|
...rest,
|
|
8026
8198
|
children: [
|
|
8027
|
-
/* @__PURE__ */ (0,
|
|
8028
|
-
/* @__PURE__ */ (0,
|
|
8029
|
-
/* @__PURE__ */ (0,
|
|
8030
|
-
actions !== void 0 && /* @__PURE__ */ (0,
|
|
8031
|
-
trigger ?? /* @__PURE__ */ (0,
|
|
8199
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex h-14 min-w-0 items-center justify-between gap-sm px-base", children: [
|
|
8200
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
8201
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex min-w-0 flex-1 items-center justify-end gap-xs", children: [
|
|
8202
|
+
actions !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex shrink-0 items-center gap-xs", children: actions }),
|
|
8203
|
+
trigger ?? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8032
8204
|
IconButton,
|
|
8033
8205
|
{
|
|
8034
8206
|
icon: open ? "x" : "menu",
|
|
@@ -8041,28 +8213,28 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8041
8213
|
)
|
|
8042
8214
|
] })
|
|
8043
8215
|
] }),
|
|
8044
|
-
/* @__PURE__ */ (0,
|
|
8216
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8045
8217
|
"div",
|
|
8046
8218
|
{
|
|
8047
8219
|
id: panelId,
|
|
8048
8220
|
"data-state": state,
|
|
8049
8221
|
"aria-hidden": open ? void 0 : true,
|
|
8050
|
-
className:
|
|
8222
|
+
className: cn52(
|
|
8051
8223
|
"grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
8052
8224
|
open && "bg-canvas"
|
|
8053
8225
|
),
|
|
8054
|
-
children: /* @__PURE__ */ (0,
|
|
8226
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
8055
8227
|
"nav",
|
|
8056
8228
|
{
|
|
8057
8229
|
"aria-label": "Primary",
|
|
8058
8230
|
"data-state": state,
|
|
8059
8231
|
className: "border-t border-hairline px-sm py-sm transition duration-200 ease-out data-[state=open]:translate-y-0 data-[state=open]:opacity-100 data-[state=closed]:invisible data-[state=closed]:-translate-y-1 data-[state=closed]:opacity-0",
|
|
8060
8232
|
children: [
|
|
8061
|
-
/* @__PURE__ */ (0,
|
|
8233
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("ul", { className: "flex flex-col gap-xxs", children: items.map((item) => {
|
|
8062
8234
|
const hasSub = Boolean(item.menu?.length || item.columns?.length);
|
|
8063
8235
|
if (!hasSub) {
|
|
8064
8236
|
const current = item.href === activeHref;
|
|
8065
|
-
return /* @__PURE__ */ (0,
|
|
8237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
8066
8238
|
"a",
|
|
8067
8239
|
{
|
|
8068
8240
|
href: item.href ?? "#",
|
|
@@ -8072,12 +8244,12 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8072
8244
|
onNavigate?.({ label: item.label, href: item.href ?? "#" }, e);
|
|
8073
8245
|
setOpen(false);
|
|
8074
8246
|
},
|
|
8075
|
-
className:
|
|
8247
|
+
className: cn52(
|
|
8076
8248
|
rowClass2,
|
|
8077
8249
|
current ? "bg-surface-strong text-ink" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
8078
8250
|
),
|
|
8079
8251
|
children: [
|
|
8080
|
-
item.icon && /* @__PURE__ */ (0,
|
|
8252
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }),
|
|
8081
8253
|
item.label
|
|
8082
8254
|
]
|
|
8083
8255
|
}
|
|
@@ -8085,8 +8257,8 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8085
8257
|
}
|
|
8086
8258
|
const expanded = section === item.id;
|
|
8087
8259
|
const subId = `${autoId}-${item.id}`;
|
|
8088
|
-
return /* @__PURE__ */ (0,
|
|
8089
|
-
/* @__PURE__ */ (0,
|
|
8260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("li", { children: [
|
|
8261
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8090
8262
|
Button,
|
|
8091
8263
|
{
|
|
8092
8264
|
variant: "item",
|
|
@@ -8095,19 +8267,19 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8095
8267
|
"aria-expanded": expanded,
|
|
8096
8268
|
"aria-controls": subId,
|
|
8097
8269
|
onClick: () => setSection(expanded ? null : item.id),
|
|
8098
|
-
leadingIcon: item.icon ? /* @__PURE__ */ (0,
|
|
8099
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
8270
|
+
leadingIcon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }) : void 0,
|
|
8271
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8100
8272
|
Icon,
|
|
8101
8273
|
{
|
|
8102
8274
|
name: "chevron-down",
|
|
8103
8275
|
size: 16,
|
|
8104
|
-
className:
|
|
8276
|
+
className: cn52("text-muted transition-transform duration-200 ease-out", expanded && "rotate-180")
|
|
8105
8277
|
}
|
|
8106
8278
|
),
|
|
8107
8279
|
children: item.label
|
|
8108
8280
|
}
|
|
8109
8281
|
),
|
|
8110
|
-
/* @__PURE__ */ (0,
|
|
8282
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8111
8283
|
"div",
|
|
8112
8284
|
{
|
|
8113
8285
|
id: subId,
|
|
@@ -8115,18 +8287,18 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8115
8287
|
"aria-label": item.label,
|
|
8116
8288
|
"data-state": expanded ? "open" : "closed",
|
|
8117
8289
|
className: "grid transition-[grid-template-rows,opacity] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=open]:opacity-100 data-[state=closed]:grid-rows-[0fr] data-[state=closed]:opacity-0",
|
|
8118
|
-
children: /* @__PURE__ */ (0,
|
|
8119
|
-
item.menu && /* @__PURE__ */ (0,
|
|
8120
|
-
item.columns?.map((col) => /* @__PURE__ */ (0,
|
|
8121
|
-
/* @__PURE__ */ (0,
|
|
8122
|
-
/* @__PURE__ */ (0,
|
|
8290
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "py-xs pl-lg", children: [
|
|
8291
|
+
item.menu && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("ul", { className: "flex flex-col gap-xxs", children: item.menu.map((l) => subLink(l, open && expanded)) }),
|
|
8292
|
+
item.columns?.map((col) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "pb-xs", children: [
|
|
8293
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "px-base pb-xxs pt-sm text-caption text-muted", children: col.title }),
|
|
8294
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("ul", { className: "flex flex-col gap-xxs", children: col.links.map((l) => subLink(l, open && expanded)) })
|
|
8123
8295
|
] }, col.title))
|
|
8124
8296
|
] }) })
|
|
8125
8297
|
}
|
|
8126
8298
|
)
|
|
8127
8299
|
] }, item.id);
|
|
8128
8300
|
}) }),
|
|
8129
|
-
menuFooter !== void 0 && /* @__PURE__ */ (0,
|
|
8301
|
+
menuFooter !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "mt-sm flex flex-col gap-xs border-t border-hairline px-base pb-xs pt-sm", children: menuFooter })
|
|
8130
8302
|
]
|
|
8131
8303
|
}
|
|
8132
8304
|
) })
|
|
@@ -8140,8 +8312,8 @@ var NavigationMenuMobile = React67.forwardRef(
|
|
|
8140
8312
|
NavigationMenuMobile.displayName = "NavigationMenuMobile";
|
|
8141
8313
|
|
|
8142
8314
|
// virtual-pkg:src/atoms/NavigationMenu/NavigationMenu.tsx
|
|
8143
|
-
var
|
|
8144
|
-
var NavigationMenu =
|
|
8315
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8316
|
+
var NavigationMenu = React69.forwardRef(
|
|
8145
8317
|
({
|
|
8146
8318
|
brandName,
|
|
8147
8319
|
brandHref,
|
|
@@ -8161,22 +8333,22 @@ var NavigationMenu = React68.forwardRef(
|
|
|
8161
8333
|
transparent = false,
|
|
8162
8334
|
className
|
|
8163
8335
|
}, ref) => {
|
|
8164
|
-
const autoId =
|
|
8336
|
+
const autoId = React69.useId();
|
|
8165
8337
|
const panelId = `${autoId}-panel`;
|
|
8166
|
-
const [innerOpen, setInnerOpen] =
|
|
8338
|
+
const [innerOpen, setInnerOpen] = React69.useState(false);
|
|
8167
8339
|
const open = mobileOpen ?? innerOpen;
|
|
8168
|
-
const setMobileOpen =
|
|
8340
|
+
const setMobileOpen = React69.useCallback(
|
|
8169
8341
|
(next) => {
|
|
8170
8342
|
if (mobileOpen === void 0) setInnerOpen(next);
|
|
8171
8343
|
onMobileOpenChange?.(next);
|
|
8172
8344
|
},
|
|
8173
8345
|
[mobileOpen, onMobileOpenChange]
|
|
8174
8346
|
);
|
|
8175
|
-
const closeAll =
|
|
8347
|
+
const closeAll = React69.useCallback(() => {
|
|
8176
8348
|
onOpenIdChange?.(null);
|
|
8177
8349
|
setMobileOpen(false);
|
|
8178
8350
|
}, [onOpenIdChange, setMobileOpen]);
|
|
8179
|
-
return /* @__PURE__ */ (0,
|
|
8351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
8180
8352
|
"div",
|
|
8181
8353
|
{
|
|
8182
8354
|
ref,
|
|
@@ -8185,7 +8357,7 @@ var NavigationMenu = React68.forwardRef(
|
|
|
8185
8357
|
},
|
|
8186
8358
|
className: ["w-full rounded-none", className].filter(Boolean).join(" "),
|
|
8187
8359
|
children: [
|
|
8188
|
-
/* @__PURE__ */ (0,
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8189
8361
|
NavigationMenuDesktop,
|
|
8190
8362
|
{
|
|
8191
8363
|
brandName,
|
|
@@ -8200,7 +8372,7 @@ var NavigationMenu = React68.forwardRef(
|
|
|
8200
8372
|
transparent
|
|
8201
8373
|
}
|
|
8202
8374
|
) }),
|
|
8203
|
-
/* @__PURE__ */ (0,
|
|
8375
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8204
8376
|
NavigationMenuMobile,
|
|
8205
8377
|
{
|
|
8206
8378
|
brandName,
|
|
@@ -8216,7 +8388,7 @@ var NavigationMenu = React68.forwardRef(
|
|
|
8216
8388
|
menuFooter: mobileMenuFooter,
|
|
8217
8389
|
transparent,
|
|
8218
8390
|
panelId,
|
|
8219
|
-
trigger: /* @__PURE__ */ (0,
|
|
8391
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8220
8392
|
IconButton,
|
|
8221
8393
|
{
|
|
8222
8394
|
icon: open ? "x" : "menu",
|
|
@@ -8237,22 +8409,22 @@ var NavigationMenu = React68.forwardRef(
|
|
|
8237
8409
|
NavigationMenu.displayName = "NavigationMenu";
|
|
8238
8410
|
|
|
8239
8411
|
// virtual-pkg:src/atoms/NotificationFeed/NotificationFeed.tsx
|
|
8240
|
-
var
|
|
8241
|
-
var
|
|
8412
|
+
var React70 = __toESM(require("react"));
|
|
8413
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8242
8414
|
var FILTERS = [
|
|
8243
8415
|
{ value: "all", label: "All" },
|
|
8244
8416
|
{ value: "unread", label: "Unread" },
|
|
8245
8417
|
{ value: "mentions", label: "Mentions" },
|
|
8246
8418
|
{ value: "assignments", label: "Assignments" }
|
|
8247
8419
|
];
|
|
8248
|
-
var
|
|
8420
|
+
var cn53 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8249
8421
|
function matches(entry, filter) {
|
|
8250
8422
|
if (filter === "unread") return Boolean(entry.unread);
|
|
8251
8423
|
if (filter === "mentions") return entry.kind === "mention";
|
|
8252
8424
|
if (filter === "assignments") return entry.kind === "assignment";
|
|
8253
8425
|
return true;
|
|
8254
8426
|
}
|
|
8255
|
-
var NotificationFeed =
|
|
8427
|
+
var NotificationFeed = React70.forwardRef(
|
|
8256
8428
|
({
|
|
8257
8429
|
title = "Inbox",
|
|
8258
8430
|
notifications,
|
|
@@ -8266,28 +8438,28 @@ var NotificationFeed = React69.forwardRef(
|
|
|
8266
8438
|
className,
|
|
8267
8439
|
...rest
|
|
8268
8440
|
}, ref) => {
|
|
8269
|
-
const headingId =
|
|
8441
|
+
const headingId = React70.useId();
|
|
8270
8442
|
const unreadCount = notifications.filter((n) => n.unread).length;
|
|
8271
8443
|
const visible = notifications.filter((n) => matches(n, filter));
|
|
8272
|
-
return /* @__PURE__ */ (0,
|
|
8444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
8273
8445
|
"section",
|
|
8274
8446
|
{
|
|
8275
8447
|
ref,
|
|
8276
8448
|
"aria-labelledby": headingId,
|
|
8277
|
-
className:
|
|
8449
|
+
className: cn53(
|
|
8278
8450
|
"flex w-full min-w-0 flex-col overflow-hidden rounded-xl border border-hairline bg-canvas text-ink shadow-card",
|
|
8279
8451
|
className
|
|
8280
8452
|
),
|
|
8281
8453
|
...rest,
|
|
8282
8454
|
children: [
|
|
8283
|
-
/* @__PURE__ */ (0,
|
|
8284
|
-
/* @__PURE__ */ (0,
|
|
8285
|
-
/* @__PURE__ */ (0,
|
|
8455
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("header", { className: "flex min-w-0 items-center gap-md px-base py-md", children: [
|
|
8456
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("h2", { id: headingId, className: "shrink-0 text-heading-sm text-ink", children: title }),
|
|
8457
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { role: "group", "aria-label": "Filter notifications", className: "flex min-w-0 flex-1 flex-wrap items-center gap-xs", children: FILTERS.map((f) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Chip, { selected: filter === f.value, onSelectedChange: () => onFilterChange?.(f.value), children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "inline-flex items-center gap-xs", children: [
|
|
8286
8458
|
f.label,
|
|
8287
|
-
f.value === "unread" && unreadCount > 0 ? /* @__PURE__ */ (0,
|
|
8459
|
+
f.value === "unread" && unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Badge, { size: "sm", tone: "primary", children: unreadCount }) : null
|
|
8288
8460
|
] }) }, f.value)) }),
|
|
8289
|
-
/* @__PURE__ */ (0,
|
|
8290
|
-
/* @__PURE__ */ (0,
|
|
8461
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
8462
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8291
8463
|
IconButton,
|
|
8292
8464
|
{
|
|
8293
8465
|
icon: "check",
|
|
@@ -8297,36 +8469,36 @@ var NotificationFeed = React69.forwardRef(
|
|
|
8297
8469
|
onClick: onMarkAllRead
|
|
8298
8470
|
}
|
|
8299
8471
|
),
|
|
8300
|
-
/* @__PURE__ */ (0,
|
|
8472
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(IconButton, { icon: "ellipsis", variant: "ghost", "aria-label": "More options", onClick: onMoreClick })
|
|
8301
8473
|
] })
|
|
8302
8474
|
] }),
|
|
8303
|
-
visible.length === 0 ? /* @__PURE__ */ (0,
|
|
8304
|
-
/* @__PURE__ */ (0,
|
|
8305
|
-
/* @__PURE__ */ (0,
|
|
8306
|
-
/* @__PURE__ */ (0,
|
|
8307
|
-
] }) : /* @__PURE__ */ (0,
|
|
8475
|
+
visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex flex-col items-center justify-center gap-xs px-base pb-xl pt-lg text-center", children: [
|
|
8476
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon, { name: "inbox", size: 36, strokeWidth: 1.5, className: "text-muted-soft" }),
|
|
8477
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "mt-sm text-heading-sm text-ink", children: emptyTitle }),
|
|
8478
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: "text-body-sm text-muted", children: emptyDescription })
|
|
8479
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("ul", { className: "flex flex-col px-sm pb-sm", "aria-label": "Notifications", children: visible.map((n) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8308
8480
|
ListItem,
|
|
8309
8481
|
{
|
|
8310
8482
|
variant: "plain",
|
|
8311
8483
|
href: n.href,
|
|
8312
8484
|
onClick: () => onNotificationClick?.(n),
|
|
8313
8485
|
"aria-label": typeof n.title === "string" ? `${n.unread ? "Unread: " : ""}${n.title}` : void 0,
|
|
8314
|
-
leading: /* @__PURE__ */ (0,
|
|
8315
|
-
/* @__PURE__ */ (0,
|
|
8486
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "flex shrink-0 items-center gap-sm", children: [
|
|
8487
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8316
8488
|
"span",
|
|
8317
8489
|
{
|
|
8318
8490
|
"aria-hidden": "true",
|
|
8319
|
-
className:
|
|
8491
|
+
className: cn53(
|
|
8320
8492
|
"h-2 w-2 rounded-full bg-primary transition duration-200 ease-out",
|
|
8321
8493
|
n.unread ? "scale-100 opacity-100" : "scale-50 opacity-0"
|
|
8322
8494
|
)
|
|
8323
8495
|
}
|
|
8324
8496
|
),
|
|
8325
|
-
/* @__PURE__ */ (0,
|
|
8497
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon, { name: n.icon, size: 18, className: "text-body" })
|
|
8326
8498
|
] }),
|
|
8327
8499
|
title: n.title,
|
|
8328
8500
|
meta: n.description,
|
|
8329
|
-
trailing: /* @__PURE__ */ (0,
|
|
8501
|
+
trailing: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "shrink-0 self-start pt-xxs text-body-sm text-muted tabular-nums", children: n.time })
|
|
8330
8502
|
}
|
|
8331
8503
|
) }, n.id)) })
|
|
8332
8504
|
]
|
|
@@ -8337,14 +8509,14 @@ var NotificationFeed = React69.forwardRef(
|
|
|
8337
8509
|
NotificationFeed.displayName = "NotificationFeed";
|
|
8338
8510
|
|
|
8339
8511
|
// virtual-pkg:src/atoms/PricingTable/PricingTable.tsx
|
|
8340
|
-
var
|
|
8512
|
+
var React74 = __toESM(require("react"));
|
|
8341
8513
|
|
|
8342
8514
|
// virtual-pkg:src/atoms/PricingTableDesktop/PricingTableDesktop.tsx
|
|
8343
|
-
var
|
|
8515
|
+
var React72 = __toESM(require("react"));
|
|
8344
8516
|
|
|
8345
8517
|
// virtual-pkg:src/atoms/Switch/Switch.tsx
|
|
8346
|
-
var
|
|
8347
|
-
var
|
|
8518
|
+
var React71 = __toESM(require("react"));
|
|
8519
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
8348
8520
|
var TRACK = {
|
|
8349
8521
|
sm: "h-4 w-7",
|
|
8350
8522
|
md: "h-5 w-9"
|
|
@@ -8357,7 +8529,7 @@ var TRAVEL = {
|
|
|
8357
8529
|
sm: "translate-x-3",
|
|
8358
8530
|
md: "translate-x-4"
|
|
8359
8531
|
};
|
|
8360
|
-
var Switch =
|
|
8532
|
+
var Switch = React71.forwardRef(
|
|
8361
8533
|
({
|
|
8362
8534
|
checked,
|
|
8363
8535
|
defaultChecked,
|
|
@@ -8372,11 +8544,11 @@ var Switch = React70.forwardRef(
|
|
|
8372
8544
|
className,
|
|
8373
8545
|
...rest
|
|
8374
8546
|
}, ref) => {
|
|
8375
|
-
const autoId =
|
|
8547
|
+
const autoId = React71.useId();
|
|
8376
8548
|
const inputId = id ?? `switch-${autoId}`;
|
|
8377
8549
|
const descId = description ? `${inputId}-desc` : void 0;
|
|
8378
8550
|
const isControlled = checked !== void 0;
|
|
8379
|
-
const [inner, setInner] =
|
|
8551
|
+
const [inner, setInner] = React71.useState(Boolean(defaultChecked));
|
|
8380
8552
|
const on = isControlled ? Boolean(checked) : inner;
|
|
8381
8553
|
const handleChange = (e) => {
|
|
8382
8554
|
if (!isControlled) setInner(e.target.checked);
|
|
@@ -8384,7 +8556,7 @@ var Switch = React70.forwardRef(
|
|
|
8384
8556
|
onChange?.(e);
|
|
8385
8557
|
};
|
|
8386
8558
|
const labelled = Boolean(label);
|
|
8387
|
-
return /* @__PURE__ */ (0,
|
|
8559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
8388
8560
|
"label",
|
|
8389
8561
|
{
|
|
8390
8562
|
htmlFor: inputId,
|
|
@@ -8395,15 +8567,15 @@ var Switch = React70.forwardRef(
|
|
|
8395
8567
|
className
|
|
8396
8568
|
].filter(Boolean).join(" "),
|
|
8397
8569
|
children: [
|
|
8398
|
-
labelled ? /* @__PURE__ */ (0,
|
|
8399
|
-
leading ? /* @__PURE__ */ (0,
|
|
8400
|
-
/* @__PURE__ */ (0,
|
|
8401
|
-
/* @__PURE__ */ (0,
|
|
8402
|
-
description ? /* @__PURE__ */ (0,
|
|
8570
|
+
labelled ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "flex min-w-0 items-start gap-md", children: [
|
|
8571
|
+
leading ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "mt-xxs inline-flex shrink-0 text-ink", children: leading }) : null,
|
|
8572
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "flex min-w-0 flex-col", children: [
|
|
8573
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-body-md text-ink", children: label }),
|
|
8574
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { id: descId, className: "text-body-sm text-muted", children: description }) : null
|
|
8403
8575
|
] })
|
|
8404
8576
|
] }) : null,
|
|
8405
|
-
/* @__PURE__ */ (0,
|
|
8406
|
-
/* @__PURE__ */ (0,
|
|
8577
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "relative inline-flex shrink-0 items-center", children: [
|
|
8578
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8407
8579
|
"input",
|
|
8408
8580
|
{
|
|
8409
8581
|
ref,
|
|
@@ -8419,7 +8591,7 @@ var Switch = React70.forwardRef(
|
|
|
8419
8591
|
...rest
|
|
8420
8592
|
}
|
|
8421
8593
|
),
|
|
8422
|
-
/* @__PURE__ */ (0,
|
|
8594
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8423
8595
|
"span",
|
|
8424
8596
|
{
|
|
8425
8597
|
"aria-hidden": "true",
|
|
@@ -8431,7 +8603,7 @@ var Switch = React70.forwardRef(
|
|
|
8431
8603
|
disabled && !labelled ? "opacity-50" : "",
|
|
8432
8604
|
TRACK[size]
|
|
8433
8605
|
].join(" "),
|
|
8434
|
-
children: /* @__PURE__ */ (0,
|
|
8606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8435
8607
|
"span",
|
|
8436
8608
|
{
|
|
8437
8609
|
className: [
|
|
@@ -8452,10 +8624,10 @@ var Switch = React70.forwardRef(
|
|
|
8452
8624
|
Switch.displayName = "Switch";
|
|
8453
8625
|
|
|
8454
8626
|
// virtual-pkg:src/atoms/PricingTableDesktop/PricingTableDesktop.tsx
|
|
8455
|
-
var
|
|
8456
|
-
var
|
|
8627
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
8628
|
+
var cn54 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8457
8629
|
function useBilling(billing, defaultBilling, onBillingChange) {
|
|
8458
|
-
const [inner, setInner] =
|
|
8630
|
+
const [inner, setInner] = React72.useState(defaultBilling);
|
|
8459
8631
|
const value = billing ?? inner;
|
|
8460
8632
|
const set = (b) => {
|
|
8461
8633
|
if (billing === void 0) setInner(b);
|
|
@@ -8470,7 +8642,7 @@ var BILLING_OPTIONS = [
|
|
|
8470
8642
|
function priceOf(tier, billing) {
|
|
8471
8643
|
return billing === "yearly" ? tier.yearlyPrice ?? tier.monthlyPrice : tier.monthlyPrice;
|
|
8472
8644
|
}
|
|
8473
|
-
var PricingTableDesktop =
|
|
8645
|
+
var PricingTableDesktop = React72.forwardRef(
|
|
8474
8646
|
({
|
|
8475
8647
|
tiers,
|
|
8476
8648
|
billing,
|
|
@@ -8483,15 +8655,15 @@ var PricingTableDesktop = React71.forwardRef(
|
|
|
8483
8655
|
...rest
|
|
8484
8656
|
}, ref) => {
|
|
8485
8657
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8486
|
-
return /* @__PURE__ */ (0,
|
|
8658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
8487
8659
|
"section",
|
|
8488
8660
|
{
|
|
8489
8661
|
ref,
|
|
8490
8662
|
"aria-label": "Pricing",
|
|
8491
|
-
className:
|
|
8663
|
+
className: cn54("flex w-full flex-col items-center gap-lg text-ink", className),
|
|
8492
8664
|
...rest,
|
|
8493
8665
|
children: [
|
|
8494
|
-
showBillingToggle ? /* @__PURE__ */ (0,
|
|
8666
|
+
showBillingToggle ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8495
8667
|
ButtonGroup,
|
|
8496
8668
|
{
|
|
8497
8669
|
tone: "primary",
|
|
@@ -8502,26 +8674,26 @@ var PricingTableDesktop = React71.forwardRef(
|
|
|
8502
8674
|
"aria-label": "Billing period"
|
|
8503
8675
|
}
|
|
8504
8676
|
) }) : null,
|
|
8505
|
-
/* @__PURE__ */ (0,
|
|
8677
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8506
8678
|
"ul",
|
|
8507
8679
|
{
|
|
8508
8680
|
className: "grid w-full rounded-lg border border-hairline bg-canvas shadow-card",
|
|
8509
8681
|
style: { gridTemplateColumns: `repeat(${tiers.length}, minmax(0, 1fr))` },
|
|
8510
8682
|
children: tiers.map((tier, i) => {
|
|
8511
8683
|
const price = priceOf(tier, period);
|
|
8512
|
-
return /* @__PURE__ */ (0,
|
|
8684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
8513
8685
|
"li",
|
|
8514
8686
|
{
|
|
8515
|
-
className:
|
|
8687
|
+
className: cn54(
|
|
8516
8688
|
"relative flex min-w-0 flex-col gap-base p-lg",
|
|
8517
8689
|
i > 0 && "border-l border-hairline",
|
|
8518
8690
|
tier.highlighted && "-m-px rounded-lg border border-primary bg-canvas shadow-md"
|
|
8519
8691
|
),
|
|
8520
8692
|
children: [
|
|
8521
|
-
/* @__PURE__ */ (0,
|
|
8522
|
-
/* @__PURE__ */ (0,
|
|
8523
|
-
/* @__PURE__ */ (0,
|
|
8524
|
-
/* @__PURE__ */ (0,
|
|
8693
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
8694
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h3", { className: "text-heading-sm text-ink", children: tier.name }),
|
|
8695
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("p", { className: "text-body-md text-body", children: [
|
|
8696
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "font-weight-label text-ink", children: [
|
|
8525
8697
|
currency,
|
|
8526
8698
|
price
|
|
8527
8699
|
] }),
|
|
@@ -8529,8 +8701,8 @@ var PricingTableDesktop = React71.forwardRef(
|
|
|
8529
8701
|
tier.unit ?? "per user/month"
|
|
8530
8702
|
] })
|
|
8531
8703
|
] }),
|
|
8532
|
-
/* @__PURE__ */ (0,
|
|
8533
|
-
/* @__PURE__ */ (0,
|
|
8704
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex min-h-6 items-center", children: tier.note ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-body-sm text-muted", children: tier.note }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
8705
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8534
8706
|
Switch,
|
|
8535
8707
|
{
|
|
8536
8708
|
size: "sm",
|
|
@@ -8539,9 +8711,9 @@ var PricingTableDesktop = React71.forwardRef(
|
|
|
8539
8711
|
onCheckedChange: (c) => setPeriod(c ? "yearly" : "monthly")
|
|
8540
8712
|
}
|
|
8541
8713
|
),
|
|
8542
|
-
/* @__PURE__ */ (0,
|
|
8714
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-body-sm text-body", children: period === "yearly" ? "Billed yearly" : "Billed monthly" })
|
|
8543
8715
|
] }) }),
|
|
8544
|
-
tier.current ? /* @__PURE__ */ (0,
|
|
8716
|
+
tier.current ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { variant: "secondary", fullWidth: true, disabled: true, children: "Current plan" }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8545
8717
|
Button,
|
|
8546
8718
|
{
|
|
8547
8719
|
variant: tier.ctaVariant ?? "primary",
|
|
@@ -8565,10 +8737,10 @@ var PricingTableDesktop = React71.forwardRef(
|
|
|
8565
8737
|
PricingTableDesktop.displayName = "PricingTableDesktop";
|
|
8566
8738
|
|
|
8567
8739
|
// virtual-pkg:src/atoms/PricingTableMobile/PricingTableMobile.tsx
|
|
8568
|
-
var
|
|
8569
|
-
var
|
|
8570
|
-
var
|
|
8571
|
-
var PricingTableMobile =
|
|
8740
|
+
var React73 = __toESM(require("react"));
|
|
8741
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
8742
|
+
var cn55 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8743
|
+
var PricingTableMobile = React73.forwardRef(
|
|
8572
8744
|
({
|
|
8573
8745
|
tiers,
|
|
8574
8746
|
billing,
|
|
@@ -8581,15 +8753,15 @@ var PricingTableMobile = React72.forwardRef(
|
|
|
8581
8753
|
...rest
|
|
8582
8754
|
}, ref) => {
|
|
8583
8755
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8584
|
-
return /* @__PURE__ */ (0,
|
|
8756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
8585
8757
|
"section",
|
|
8586
8758
|
{
|
|
8587
8759
|
ref,
|
|
8588
8760
|
"aria-label": "Pricing",
|
|
8589
|
-
className:
|
|
8761
|
+
className: cn55("flex w-full flex-col gap-base text-ink", className),
|
|
8590
8762
|
...rest,
|
|
8591
8763
|
children: [
|
|
8592
|
-
showBillingToggle ? /* @__PURE__ */ (0,
|
|
8764
|
+
showBillingToggle ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8593
8765
|
ButtonGroup,
|
|
8594
8766
|
{
|
|
8595
8767
|
tone: "primary",
|
|
@@ -8600,18 +8772,18 @@ var PricingTableMobile = React72.forwardRef(
|
|
|
8600
8772
|
"aria-label": "Billing period"
|
|
8601
8773
|
}
|
|
8602
8774
|
) : null,
|
|
8603
|
-
/* @__PURE__ */ (0,
|
|
8775
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("ul", { className: "flex w-full flex-col gap-md", children: tiers.map((tier) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
8604
8776
|
"li",
|
|
8605
8777
|
{
|
|
8606
|
-
className:
|
|
8778
|
+
className: cn55(
|
|
8607
8779
|
"flex flex-col gap-md rounded-lg border bg-canvas p-base shadow-card",
|
|
8608
8780
|
tier.highlighted ? "border-primary" : "border-hairline"
|
|
8609
8781
|
),
|
|
8610
8782
|
children: [
|
|
8611
|
-
/* @__PURE__ */ (0,
|
|
8612
|
-
/* @__PURE__ */ (0,
|
|
8613
|
-
/* @__PURE__ */ (0,
|
|
8614
|
-
/* @__PURE__ */ (0,
|
|
8783
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
8784
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h3", { className: "text-heading-sm text-ink", children: tier.name }),
|
|
8785
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("p", { className: "text-body-md text-body", children: [
|
|
8786
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "font-weight-label text-ink", children: [
|
|
8615
8787
|
currency,
|
|
8616
8788
|
priceOf(tier, period)
|
|
8617
8789
|
] }),
|
|
@@ -8619,8 +8791,8 @@ var PricingTableMobile = React72.forwardRef(
|
|
|
8619
8791
|
tier.unit ?? "per user/month"
|
|
8620
8792
|
] })
|
|
8621
8793
|
] }),
|
|
8622
|
-
tier.note ? /* @__PURE__ */ (0,
|
|
8623
|
-
/* @__PURE__ */ (0,
|
|
8794
|
+
tier.note ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-body-sm text-muted", children: tier.note }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
8795
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8624
8796
|
Switch,
|
|
8625
8797
|
{
|
|
8626
8798
|
size: "sm",
|
|
@@ -8629,9 +8801,9 @@ var PricingTableMobile = React72.forwardRef(
|
|
|
8629
8801
|
onCheckedChange: (c) => setPeriod(c ? "yearly" : "monthly")
|
|
8630
8802
|
}
|
|
8631
8803
|
),
|
|
8632
|
-
/* @__PURE__ */ (0,
|
|
8804
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-body-sm text-body", children: period === "yearly" ? "Billed yearly" : "Billed monthly" })
|
|
8633
8805
|
] }),
|
|
8634
|
-
tier.current ? /* @__PURE__ */ (0,
|
|
8806
|
+
tier.current ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { variant: "secondary", size: "lg", fullWidth: true, disabled: true, children: "Current plan" }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8635
8807
|
Button,
|
|
8636
8808
|
{
|
|
8637
8809
|
variant: tier.ctaVariant ?? "primary",
|
|
@@ -8653,12 +8825,12 @@ var PricingTableMobile = React72.forwardRef(
|
|
|
8653
8825
|
PricingTableMobile.displayName = "PricingTableMobile";
|
|
8654
8826
|
|
|
8655
8827
|
// virtual-pkg:src/atoms/PricingTable/PricingTable.tsx
|
|
8656
|
-
var
|
|
8657
|
-
var PricingTable =
|
|
8828
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
8829
|
+
var PricingTable = React74.forwardRef(
|
|
8658
8830
|
({ billing, defaultBilling = "monthly", onBillingChange, showBillingToggle = true, className, ...props }, ref) => {
|
|
8659
8831
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8660
|
-
return /* @__PURE__ */ (0,
|
|
8661
|
-
/* @__PURE__ */ (0,
|
|
8832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
8833
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8662
8834
|
PricingTableDesktop,
|
|
8663
8835
|
{
|
|
8664
8836
|
...props,
|
|
@@ -8667,7 +8839,7 @@ var PricingTable = React73.forwardRef(
|
|
|
8667
8839
|
showBillingToggle
|
|
8668
8840
|
}
|
|
8669
8841
|
) }),
|
|
8670
|
-
/* @__PURE__ */ (0,
|
|
8842
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8671
8843
|
PricingTableMobile,
|
|
8672
8844
|
{
|
|
8673
8845
|
...props,
|
|
@@ -8682,14 +8854,14 @@ var PricingTable = React73.forwardRef(
|
|
|
8682
8854
|
PricingTable.displayName = "PricingTable";
|
|
8683
8855
|
|
|
8684
8856
|
// virtual-pkg:src/atoms/ProductCardGrid/ProductCardGrid.tsx
|
|
8685
|
-
var
|
|
8686
|
-
var
|
|
8857
|
+
var React75 = __toESM(require("react"));
|
|
8858
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8687
8859
|
var COLS = {
|
|
8688
8860
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
8689
8861
|
3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
|
|
8690
8862
|
4: "grid-cols-2 md:grid-cols-4"
|
|
8691
8863
|
};
|
|
8692
|
-
var ProductCardGrid =
|
|
8864
|
+
var ProductCardGrid = React75.forwardRef(
|
|
8693
8865
|
({
|
|
8694
8866
|
items,
|
|
8695
8867
|
columns = 3,
|
|
@@ -8701,19 +8873,19 @@ var ProductCardGrid = React74.forwardRef(
|
|
|
8701
8873
|
label = "Products",
|
|
8702
8874
|
className,
|
|
8703
8875
|
...rest
|
|
8704
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
8876
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8705
8877
|
"section",
|
|
8706
8878
|
{
|
|
8707
8879
|
ref,
|
|
8708
8880
|
"aria-label": label,
|
|
8709
8881
|
className: ["w-full", className].filter(Boolean).join(" "),
|
|
8710
8882
|
...rest,
|
|
8711
|
-
children: items.length === 0 ? /* @__PURE__ */ (0,
|
|
8712
|
-
/* @__PURE__ */ (0,
|
|
8713
|
-
/* @__PURE__ */ (0,
|
|
8714
|
-
emptyDescription ? /* @__PURE__ */ (0,
|
|
8715
|
-
onEmptyAction ? /* @__PURE__ */ (0,
|
|
8716
|
-
] }) : /* @__PURE__ */ (0,
|
|
8883
|
+
children: items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex w-full flex-col items-center justify-center gap-xs rounded-lg border border-dashed border-hairline-strong bg-canvas px-lg py-xl text-center", children: [
|
|
8884
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Icon, { name: emptyIcon, size: 24, className: "text-muted" }),
|
|
8885
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("h3", { className: "mt-xs text-heading-sm text-ink", children: emptyTitle }),
|
|
8886
|
+
emptyDescription ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "text-body-md text-muted", children: emptyDescription }) : null,
|
|
8887
|
+
onEmptyAction ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Button, { variant: "primary", className: "mt-sm", onClick: onEmptyAction, children: emptyActionLabel }) : null
|
|
8888
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("ul", { className: ["grid gap-gutter", COLS[columns]].join(" "), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("li", { className: "flex min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8717
8889
|
Card,
|
|
8718
8890
|
{
|
|
8719
8891
|
layout: "tile",
|
|
@@ -8722,7 +8894,7 @@ var ProductCardGrid = React74.forwardRef(
|
|
|
8722
8894
|
icon: item.icon ?? "box",
|
|
8723
8895
|
href: item.href,
|
|
8724
8896
|
linkLabel: `Open ${item.title}`,
|
|
8725
|
-
badge: item.badge ? /* @__PURE__ */ (0,
|
|
8897
|
+
badge: item.badge ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Badge, { tone: "primary", size: "md", children: item.badge }) : void 0
|
|
8726
8898
|
}
|
|
8727
8899
|
) }, item.id)) })
|
|
8728
8900
|
}
|
|
@@ -8731,14 +8903,14 @@ var ProductCardGrid = React74.forwardRef(
|
|
|
8731
8903
|
ProductCardGrid.displayName = "ProductCardGrid";
|
|
8732
8904
|
|
|
8733
8905
|
// virtual-pkg:src/atoms/Radio/Radio.tsx
|
|
8734
|
-
var
|
|
8735
|
-
var
|
|
8736
|
-
var
|
|
8906
|
+
var React76 = __toESM(require("react"));
|
|
8907
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8908
|
+
var cn56 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8737
8909
|
var RING2 = { sm: "h-3.5 w-3.5", md: "h-4 w-4" };
|
|
8738
8910
|
var DOT3 = { sm: "h-1.5 w-1.5", md: "h-2 w-2" };
|
|
8739
8911
|
var SWATCH = { sm: "h-5 w-5", md: "h-6 w-6" };
|
|
8740
8912
|
var TEXT3 = { sm: "text-body-sm", md: "text-body-md" };
|
|
8741
|
-
var Radio =
|
|
8913
|
+
var Radio = React76.forwardRef(
|
|
8742
8914
|
({
|
|
8743
8915
|
checked,
|
|
8744
8916
|
defaultChecked,
|
|
@@ -8756,18 +8928,18 @@ var Radio = React75.forwardRef(
|
|
|
8756
8928
|
"aria-label": ariaLabel,
|
|
8757
8929
|
...rest
|
|
8758
8930
|
}, ref) => {
|
|
8759
|
-
const autoId =
|
|
8931
|
+
const autoId = React76.useId();
|
|
8760
8932
|
const inputId = id ?? `radio-${autoId}`;
|
|
8761
8933
|
const descId = description ? `${inputId}-desc` : void 0;
|
|
8762
8934
|
const isControlled = checked !== void 0;
|
|
8763
|
-
const [inner, setInner] =
|
|
8935
|
+
const [inner, setInner] = React76.useState(Boolean(defaultChecked));
|
|
8764
8936
|
const on = isControlled ? Boolean(checked) : inner;
|
|
8765
8937
|
const handleChange = (e) => {
|
|
8766
8938
|
if (!isControlled) setInner(e.target.checked);
|
|
8767
8939
|
if (e.target.checked) onValueChange?.(String(value ?? ""));
|
|
8768
8940
|
onChange?.(e);
|
|
8769
8941
|
};
|
|
8770
|
-
const input = /* @__PURE__ */ (0,
|
|
8942
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8771
8943
|
"input",
|
|
8772
8944
|
{
|
|
8773
8945
|
ref,
|
|
@@ -8784,13 +8956,13 @@ var Radio = React75.forwardRef(
|
|
|
8784
8956
|
...rest
|
|
8785
8957
|
}
|
|
8786
8958
|
);
|
|
8787
|
-
const control = swatch ? /* @__PURE__ */ (0,
|
|
8959
|
+
const control = swatch ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: cn56("relative inline-flex", SWATCH[size]), children: [
|
|
8788
8960
|
input,
|
|
8789
|
-
/* @__PURE__ */ (0,
|
|
8961
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8790
8962
|
"span",
|
|
8791
8963
|
{
|
|
8792
8964
|
"aria-hidden": "true",
|
|
8793
|
-
className:
|
|
8965
|
+
className: cn56(
|
|
8794
8966
|
"pointer-events-none h-full w-full rounded-full transition duration-200 ease-out",
|
|
8795
8967
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-focus-blue peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-canvas",
|
|
8796
8968
|
swatch,
|
|
@@ -8798,22 +8970,22 @@ var Radio = React75.forwardRef(
|
|
|
8798
8970
|
)
|
|
8799
8971
|
}
|
|
8800
8972
|
)
|
|
8801
|
-
] }) : /* @__PURE__ */ (0,
|
|
8973
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: cn56("relative inline-flex", RING2[size]), children: [
|
|
8802
8974
|
input,
|
|
8803
|
-
/* @__PURE__ */ (0,
|
|
8975
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8804
8976
|
"span",
|
|
8805
8977
|
{
|
|
8806
8978
|
"aria-hidden": "true",
|
|
8807
|
-
className:
|
|
8979
|
+
className: cn56(
|
|
8808
8980
|
"pointer-events-none flex h-full w-full items-center justify-center rounded-full border bg-canvas shadow-sm transition duration-150 ease-out",
|
|
8809
8981
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-focus-blue peer-focus-visible:ring-offset-1 peer-focus-visible:ring-offset-canvas",
|
|
8810
8982
|
on ? "border-primary" : invalid ? "border-semantic-error" : "border-hairline-strong group-hover:border-muted-soft",
|
|
8811
8983
|
disabled && !on && "bg-surface-soft border-hairline shadow-none"
|
|
8812
8984
|
),
|
|
8813
|
-
children: /* @__PURE__ */ (0,
|
|
8985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8814
8986
|
"span",
|
|
8815
8987
|
{
|
|
8816
|
-
className:
|
|
8988
|
+
className: cn56(
|
|
8817
8989
|
"rounded-full bg-primary transition duration-150 ease-out",
|
|
8818
8990
|
DOT3[size],
|
|
8819
8991
|
on ? "scale-100 opacity-100" : "scale-50 opacity-0"
|
|
@@ -8823,20 +8995,20 @@ var Radio = React75.forwardRef(
|
|
|
8823
8995
|
}
|
|
8824
8996
|
)
|
|
8825
8997
|
] });
|
|
8826
|
-
return /* @__PURE__ */ (0,
|
|
8998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
8827
8999
|
"label",
|
|
8828
9000
|
{
|
|
8829
9001
|
htmlFor: inputId,
|
|
8830
|
-
className:
|
|
9002
|
+
className: cn56(
|
|
8831
9003
|
"group inline-flex items-start gap-sm rounded-sm text-ink",
|
|
8832
9004
|
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
8833
9005
|
className
|
|
8834
9006
|
),
|
|
8835
9007
|
children: [
|
|
8836
|
-
/* @__PURE__ */ (0,
|
|
9008
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8837
9009
|
"span",
|
|
8838
9010
|
{
|
|
8839
|
-
className:
|
|
9011
|
+
className: cn56(
|
|
8840
9012
|
"inline-flex shrink-0 items-center justify-center",
|
|
8841
9013
|
!swatch && (size === "md" ? "h-[1.5em]" : "h-[1.45em]"),
|
|
8842
9014
|
TEXT3[size]
|
|
@@ -8844,9 +9016,9 @@ var Radio = React75.forwardRef(
|
|
|
8844
9016
|
children: control
|
|
8845
9017
|
}
|
|
8846
9018
|
),
|
|
8847
|
-
(label || description) && /* @__PURE__ */ (0,
|
|
8848
|
-
label && /* @__PURE__ */ (0,
|
|
8849
|
-
description && /* @__PURE__ */ (0,
|
|
9019
|
+
(label || description) && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "flex min-w-0 flex-col gap-xxs", children: [
|
|
9020
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: TEXT3[size], children: label }),
|
|
9021
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { id: descId, className: "text-body-sm text-muted", children: description })
|
|
8850
9022
|
] })
|
|
8851
9023
|
]
|
|
8852
9024
|
}
|
|
@@ -8856,20 +9028,20 @@ var Radio = React75.forwardRef(
|
|
|
8856
9028
|
Radio.displayName = "Radio";
|
|
8857
9029
|
|
|
8858
9030
|
// virtual-pkg:src/atoms/Rating/Rating.tsx
|
|
8859
|
-
var
|
|
8860
|
-
var
|
|
8861
|
-
var
|
|
9031
|
+
var React77 = __toESM(require("react"));
|
|
9032
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
9033
|
+
var cn57 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8862
9034
|
var starPx = { sm: 14, md: 18 };
|
|
8863
9035
|
function Star({ fill, px }) {
|
|
8864
9036
|
const pct = Math.max(0, Math.min(1, fill)) * 100;
|
|
8865
|
-
return /* @__PURE__ */ (0,
|
|
9037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
8866
9038
|
"span",
|
|
8867
9039
|
{
|
|
8868
9040
|
className: "relative inline-flex shrink-0",
|
|
8869
9041
|
style: { width: px, height: px },
|
|
8870
9042
|
"aria-hidden": "true",
|
|
8871
9043
|
children: [
|
|
8872
|
-
/* @__PURE__ */ (0,
|
|
9044
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8873
9045
|
Icon,
|
|
8874
9046
|
{
|
|
8875
9047
|
name: "star",
|
|
@@ -8879,12 +9051,12 @@ function Star({ fill, px }) {
|
|
|
8879
9051
|
className: "text-hairline-strong"
|
|
8880
9052
|
}
|
|
8881
9053
|
),
|
|
8882
|
-
/* @__PURE__ */ (0,
|
|
9054
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8883
9055
|
"span",
|
|
8884
9056
|
{
|
|
8885
9057
|
className: "absolute inset-y-0 left-0 overflow-hidden transition-[width] duration-200 ease-out",
|
|
8886
9058
|
style: { width: `${pct}%` },
|
|
8887
|
-
children: /* @__PURE__ */ (0,
|
|
9059
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8888
9060
|
Icon,
|
|
8889
9061
|
{
|
|
8890
9062
|
name: "star",
|
|
@@ -8900,7 +9072,7 @@ function Star({ fill, px }) {
|
|
|
8900
9072
|
}
|
|
8901
9073
|
);
|
|
8902
9074
|
}
|
|
8903
|
-
var Rating =
|
|
9075
|
+
var Rating = React77.forwardRef(
|
|
8904
9076
|
({
|
|
8905
9077
|
value,
|
|
8906
9078
|
defaultValue = 0,
|
|
@@ -8915,8 +9087,8 @@ var Rating = React76.forwardRef(
|
|
|
8915
9087
|
className,
|
|
8916
9088
|
...rest
|
|
8917
9089
|
}, ref) => {
|
|
8918
|
-
const [inner, setInner] =
|
|
8919
|
-
const [hover, setHover] =
|
|
9090
|
+
const [inner, setInner] = React77.useState(defaultValue);
|
|
9091
|
+
const [hover, setHover] = React77.useState(null);
|
|
8920
9092
|
const current = value ?? inner;
|
|
8921
9093
|
const shown = hover ?? current;
|
|
8922
9094
|
const px = starPx[size];
|
|
@@ -8926,29 +9098,29 @@ var Rating = React76.forwardRef(
|
|
|
8926
9098
|
onChange?.(next);
|
|
8927
9099
|
};
|
|
8928
9100
|
const stars = Array.from({ length: max }, (_, i) => i + 1);
|
|
8929
|
-
return /* @__PURE__ */ (0,
|
|
9101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
8930
9102
|
"div",
|
|
8931
9103
|
{
|
|
8932
9104
|
ref,
|
|
8933
|
-
className:
|
|
9105
|
+
className: cn57("inline-flex items-center gap-sm", className),
|
|
8934
9106
|
...rest,
|
|
8935
9107
|
children: [
|
|
8936
|
-
readOnly ? /* @__PURE__ */ (0,
|
|
9108
|
+
readOnly ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8937
9109
|
"span",
|
|
8938
9110
|
{
|
|
8939
9111
|
role: "img",
|
|
8940
9112
|
"aria-label": `${label}: ${current.toFixed(2)} out of ${max}`,
|
|
8941
9113
|
className: "inline-flex items-center gap-xs",
|
|
8942
|
-
children: stars.map((n) => /* @__PURE__ */ (0,
|
|
9114
|
+
children: stars.map((n) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Star, { fill: current - (n - 1), px }, n))
|
|
8943
9115
|
}
|
|
8944
|
-
) : /* @__PURE__ */ (0,
|
|
9116
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8945
9117
|
"div",
|
|
8946
9118
|
{
|
|
8947
9119
|
role: "radiogroup",
|
|
8948
9120
|
"aria-label": label,
|
|
8949
9121
|
className: "inline-flex items-center",
|
|
8950
9122
|
onMouseLeave: () => setHover(null),
|
|
8951
|
-
children: stars.map((n) => /* @__PURE__ */ (0,
|
|
9123
|
+
children: stars.map((n) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8952
9124
|
Button,
|
|
8953
9125
|
{
|
|
8954
9126
|
variant: "ghost",
|
|
@@ -8962,15 +9134,15 @@ var Rating = React76.forwardRef(
|
|
|
8962
9134
|
onFocus: () => setHover(n),
|
|
8963
9135
|
onBlur: () => setHover(null),
|
|
8964
9136
|
onClick: () => pick(n),
|
|
8965
|
-
children: /* @__PURE__ */ (0,
|
|
9137
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Star, { fill: shown >= n ? 1 : 0, px })
|
|
8966
9138
|
},
|
|
8967
9139
|
n
|
|
8968
9140
|
))
|
|
8969
9141
|
}
|
|
8970
9142
|
),
|
|
8971
|
-
showValue && /* @__PURE__ */ (0,
|
|
8972
|
-
/* @__PURE__ */ (0,
|
|
8973
|
-
count !== void 0 && /* @__PURE__ */ (0,
|
|
9143
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "inline-flex items-baseline gap-xs text-body-md", children: [
|
|
9144
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-ink", children: current.toFixed(2) }),
|
|
9145
|
+
count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "text-muted", children: [
|
|
8974
9146
|
"(",
|
|
8975
9147
|
count,
|
|
8976
9148
|
")"
|
|
@@ -8984,10 +9156,10 @@ var Rating = React76.forwardRef(
|
|
|
8984
9156
|
Rating.displayName = "Rating";
|
|
8985
9157
|
|
|
8986
9158
|
// virtual-pkg:src/atoms/SearchBar/SearchBar.tsx
|
|
8987
|
-
var
|
|
8988
|
-
var
|
|
8989
|
-
var
|
|
8990
|
-
var SearchBar =
|
|
9159
|
+
var React78 = __toESM(require("react"));
|
|
9160
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
9161
|
+
var cn58 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9162
|
+
var SearchBar = React78.forwardRef(
|
|
8991
9163
|
({
|
|
8992
9164
|
value,
|
|
8993
9165
|
defaultValue = "",
|
|
@@ -9005,24 +9177,24 @@ var SearchBar = React77.forwardRef(
|
|
|
9005
9177
|
"aria-label": ariaLabel = "Search",
|
|
9006
9178
|
...inputProps
|
|
9007
9179
|
}, ref) => {
|
|
9008
|
-
const [inner, setInner] =
|
|
9180
|
+
const [inner, setInner] = React78.useState(defaultValue);
|
|
9009
9181
|
const query = value ?? inner;
|
|
9010
9182
|
const setQuery = (next) => {
|
|
9011
9183
|
if (value === void 0) setInner(next);
|
|
9012
9184
|
onValueChange?.(next);
|
|
9013
9185
|
};
|
|
9014
9186
|
const showHint = typeof resultCount === "number" && query.length > 0;
|
|
9015
|
-
return /* @__PURE__ */ (0,
|
|
9187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
9016
9188
|
"form",
|
|
9017
9189
|
{
|
|
9018
9190
|
role: "search",
|
|
9019
|
-
className:
|
|
9191
|
+
className: cn58("flex w-full min-w-0 items-center gap-sm rounded-none", containerClassName),
|
|
9020
9192
|
onSubmit: (e) => {
|
|
9021
9193
|
e.preventDefault();
|
|
9022
9194
|
onSearch?.(query);
|
|
9023
9195
|
},
|
|
9024
9196
|
children: [
|
|
9025
|
-
/* @__PURE__ */ (0,
|
|
9197
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9026
9198
|
Input,
|
|
9027
9199
|
{
|
|
9028
9200
|
ref,
|
|
@@ -9039,13 +9211,13 @@ var SearchBar = React77.forwardRef(
|
|
|
9039
9211
|
setQuery("");
|
|
9040
9212
|
}
|
|
9041
9213
|
},
|
|
9042
|
-
leading: /* @__PURE__ */ (0,
|
|
9043
|
-
trailing: clearable ? /* @__PURE__ */ (0,
|
|
9214
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon, { name: "search", size: 16 }),
|
|
9215
|
+
trailing: clearable ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9044
9216
|
"span",
|
|
9045
9217
|
{
|
|
9046
9218
|
"data-state": query ? "open" : "closed",
|
|
9047
9219
|
className: "inline-flex transition duration-150 ease-out data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
9048
|
-
children: /* @__PURE__ */ (0,
|
|
9220
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9049
9221
|
IconButton,
|
|
9050
9222
|
{
|
|
9051
9223
|
type: "button",
|
|
@@ -9062,13 +9234,13 @@ var SearchBar = React77.forwardRef(
|
|
|
9062
9234
|
}
|
|
9063
9235
|
)
|
|
9064
9236
|
}
|
|
9065
|
-
) : /* @__PURE__ */ (0,
|
|
9237
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9066
9238
|
"span",
|
|
9067
9239
|
{
|
|
9068
9240
|
"data-state": showHint ? "open" : "closed",
|
|
9069
9241
|
"aria-live": "polite",
|
|
9070
9242
|
className: "transition duration-150 ease-out data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
9071
|
-
children: typeof resultCount === "number" ? /* @__PURE__ */ (0,
|
|
9243
|
+
children: typeof resultCount === "number" ? /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Badge, { tone: "neutral", size: "sm", children: [
|
|
9072
9244
|
resultCount,
|
|
9073
9245
|
" ",
|
|
9074
9246
|
resultCount === 1 ? "result" : "results"
|
|
@@ -9079,7 +9251,7 @@ var SearchBar = React77.forwardRef(
|
|
|
9079
9251
|
...inputProps
|
|
9080
9252
|
}
|
|
9081
9253
|
),
|
|
9082
|
-
actionLabel ? /* @__PURE__ */ (0,
|
|
9254
|
+
actionLabel ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Button, { type: "button", variant: "secondary", size, disabled, onClick: onAction, children: actionLabel }) : null
|
|
9083
9255
|
]
|
|
9084
9256
|
}
|
|
9085
9257
|
);
|
|
@@ -9088,43 +9260,43 @@ var SearchBar = React77.forwardRef(
|
|
|
9088
9260
|
SearchBar.displayName = "SearchBar";
|
|
9089
9261
|
|
|
9090
9262
|
// virtual-pkg:src/atoms/SearchResultsList/SearchResultsList.tsx
|
|
9091
|
-
var
|
|
9263
|
+
var React80 = __toESM(require("react"));
|
|
9092
9264
|
|
|
9093
9265
|
// virtual-pkg:src/atoms/Skeleton/Skeleton.tsx
|
|
9094
9266
|
var import_react4 = __toESM(require("react"));
|
|
9095
|
-
var
|
|
9096
|
-
function
|
|
9267
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
9268
|
+
function cn59(...parts) {
|
|
9097
9269
|
return parts.filter(Boolean).join(" ");
|
|
9098
9270
|
}
|
|
9099
9271
|
function Bone({ className, animated }) {
|
|
9100
|
-
return /* @__PURE__ */ (0,
|
|
9272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9101
9273
|
"span",
|
|
9102
9274
|
{
|
|
9103
9275
|
"aria-hidden": "true",
|
|
9104
|
-
className:
|
|
9276
|
+
className: cn59("block bg-surface-strong", animated && "motion-safe:animate-pulse", className)
|
|
9105
9277
|
}
|
|
9106
9278
|
);
|
|
9107
9279
|
}
|
|
9108
9280
|
var Skeleton = import_react4.default.forwardRef(
|
|
9109
9281
|
({ variant = "block", lines = 3, animated = true, label = "Loading", className, ...rest }, ref) => {
|
|
9110
9282
|
const a11y = { role: "status", "aria-live": "polite", "aria-busy": true };
|
|
9111
|
-
const sr = /* @__PURE__ */ (0,
|
|
9283
|
+
const sr = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: label });
|
|
9112
9284
|
if (variant === "card") {
|
|
9113
|
-
return /* @__PURE__ */ (0,
|
|
9285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
9114
9286
|
"div",
|
|
9115
9287
|
{
|
|
9116
9288
|
ref,
|
|
9117
9289
|
...a11y,
|
|
9118
|
-
className:
|
|
9290
|
+
className: cn59(
|
|
9119
9291
|
"flex w-full items-center gap-base rounded-lg border border-hairline bg-canvas p-md shadow-card",
|
|
9120
9292
|
className
|
|
9121
9293
|
),
|
|
9122
9294
|
...rest,
|
|
9123
9295
|
children: [
|
|
9124
|
-
/* @__PURE__ */ (0,
|
|
9125
|
-
/* @__PURE__ */ (0,
|
|
9126
|
-
/* @__PURE__ */ (0,
|
|
9127
|
-
/* @__PURE__ */ (0,
|
|
9296
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Bone, { animated, className: "size-14 shrink-0 rounded-md" }),
|
|
9297
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-sm", children: [
|
|
9298
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Bone, { animated, className: "h-3 w-full rounded-xs" }),
|
|
9299
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Bone, { animated, className: "h-3 w-1/2 rounded-xs" })
|
|
9128
9300
|
] }),
|
|
9129
9301
|
sr
|
|
9130
9302
|
]
|
|
@@ -9132,23 +9304,23 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9132
9304
|
);
|
|
9133
9305
|
}
|
|
9134
9306
|
if (variant === "list-row") {
|
|
9135
|
-
return /* @__PURE__ */ (0,
|
|
9136
|
-
/* @__PURE__ */ (0,
|
|
9137
|
-
/* @__PURE__ */ (0,
|
|
9138
|
-
/* @__PURE__ */ (0,
|
|
9139
|
-
/* @__PURE__ */ (0,
|
|
9307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { ref, ...a11y, className: cn59("flex w-full items-center gap-md py-xs", className), ...rest, children: [
|
|
9308
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Bone, { animated, className: "size-8 shrink-0 rounded-sm" }),
|
|
9309
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-sm", children: [
|
|
9310
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Bone, { animated, className: "h-2.5 w-full rounded-xs" }),
|
|
9311
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Bone, { animated, className: "h-2.5 w-3/5 rounded-xs" })
|
|
9140
9312
|
] }),
|
|
9141
9313
|
sr
|
|
9142
9314
|
] });
|
|
9143
9315
|
}
|
|
9144
9316
|
if (variant === "paragraph") {
|
|
9145
9317
|
const count = Math.max(1, lines);
|
|
9146
|
-
return /* @__PURE__ */ (0,
|
|
9147
|
-
Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0,
|
|
9318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { ref, ...a11y, className: cn59("flex w-full flex-col gap-sm", className), ...rest, children: [
|
|
9319
|
+
Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9148
9320
|
Bone,
|
|
9149
9321
|
{
|
|
9150
9322
|
animated,
|
|
9151
|
-
className:
|
|
9323
|
+
className: cn59("h-2.5 rounded-xs", i === count - 1 && count > 1 ? "w-3/5" : "w-full")
|
|
9152
9324
|
},
|
|
9153
9325
|
i
|
|
9154
9326
|
)),
|
|
@@ -9156,13 +9328,13 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9156
9328
|
] });
|
|
9157
9329
|
}
|
|
9158
9330
|
const has = (prefix) => Boolean(className && prefix.test(className));
|
|
9159
|
-
const shape = variant === "circle" ?
|
|
9160
|
-
return /* @__PURE__ */ (0,
|
|
9331
|
+
const shape = variant === "circle" ? cn59(!has(/(^|\s)size-/) && "size-8", "rounded-full") : variant === "text" ? cn59(!has(/(^|\s)h-/) && "h-2.5", !has(/(^|\s)w-/) && "w-full", "rounded-xs") : cn59(!has(/(^|\s)h-/) && "h-16", !has(/(^|\s)w-/) && "w-full", "rounded-md");
|
|
9332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9161
9333
|
"div",
|
|
9162
9334
|
{
|
|
9163
9335
|
ref,
|
|
9164
9336
|
...a11y,
|
|
9165
|
-
className:
|
|
9337
|
+
className: cn59("bg-surface-strong", animated && "motion-safe:animate-pulse", shape, className),
|
|
9166
9338
|
...rest,
|
|
9167
9339
|
children: sr
|
|
9168
9340
|
}
|
|
@@ -9172,15 +9344,15 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9172
9344
|
Skeleton.displayName = "Skeleton";
|
|
9173
9345
|
|
|
9174
9346
|
// virtual-pkg:src/atoms/SearchResultsList/SearchResultsList.tsx
|
|
9175
|
-
var
|
|
9347
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
9176
9348
|
var DEFAULT_SCOPES = [
|
|
9177
9349
|
{ value: "all", label: "All" },
|
|
9178
9350
|
{ value: "issues", label: "Issues" },
|
|
9179
9351
|
{ value: "projects", label: "Projects" },
|
|
9180
9352
|
{ value: "documents", label: "Documents" }
|
|
9181
9353
|
];
|
|
9182
|
-
var
|
|
9183
|
-
var SearchResultsList =
|
|
9354
|
+
var cn60 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9355
|
+
var SearchResultsList = React80.forwardRef(
|
|
9184
9356
|
({
|
|
9185
9357
|
query,
|
|
9186
9358
|
onQueryChange,
|
|
@@ -9198,18 +9370,18 @@ var SearchResultsList = React79.forwardRef(
|
|
|
9198
9370
|
}, ref) => {
|
|
9199
9371
|
const showEmpty = !loading && results.length === 0;
|
|
9200
9372
|
const resolvedEmptyDescription = emptyDescription ?? (query ? `Nothing matches \u201C${query}\u201D. Try a different term or scope.` : "Type to search.");
|
|
9201
|
-
return /* @__PURE__ */ (0,
|
|
9373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
9202
9374
|
"div",
|
|
9203
9375
|
{
|
|
9204
9376
|
ref,
|
|
9205
|
-
className:
|
|
9377
|
+
className: cn60(
|
|
9206
9378
|
"flex w-full min-w-0 flex-col overflow-hidden rounded-xl border border-hairline bg-canvas text-ink shadow-card",
|
|
9207
9379
|
className
|
|
9208
9380
|
),
|
|
9209
9381
|
...rest,
|
|
9210
9382
|
children: [
|
|
9211
|
-
/* @__PURE__ */ (0,
|
|
9212
|
-
/* @__PURE__ */ (0,
|
|
9383
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex min-w-0 flex-wrap items-center gap-sm px-base py-md", children: [
|
|
9384
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "min-w-0 flex-1 basis-56", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9213
9385
|
SearchBar,
|
|
9214
9386
|
{
|
|
9215
9387
|
value: query,
|
|
@@ -9220,7 +9392,7 @@ var SearchResultsList = React79.forwardRef(
|
|
|
9220
9392
|
"aria-label": "Search"
|
|
9221
9393
|
}
|
|
9222
9394
|
) }),
|
|
9223
|
-
/* @__PURE__ */ (0,
|
|
9395
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { role: "group", "aria-label": "Search scope", className: "flex shrink-0 flex-wrap items-center gap-xs", children: scopes.map((s) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9224
9396
|
Chip,
|
|
9225
9397
|
{
|
|
9226
9398
|
selected: s.value === scope,
|
|
@@ -9230,30 +9402,30 @@ var SearchResultsList = React79.forwardRef(
|
|
|
9230
9402
|
s.value
|
|
9231
9403
|
)) })
|
|
9232
9404
|
] }),
|
|
9233
|
-
/* @__PURE__ */ (0,
|
|
9234
|
-
[0, 1, 2].map((i) => /* @__PURE__ */ (0,
|
|
9235
|
-
/* @__PURE__ */ (0,
|
|
9236
|
-
/* @__PURE__ */ (0,
|
|
9237
|
-
/* @__PURE__ */ (0,
|
|
9238
|
-
/* @__PURE__ */ (0,
|
|
9405
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { "aria-live": "polite", "aria-busy": loading || void 0, className: "min-h-40 px-sm pb-sm", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col gap-xs", children: [
|
|
9406
|
+
[0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex items-center gap-md px-base py-sm", children: [
|
|
9407
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Spinner, { size: "sm", tone: "current", className: "text-muted-soft" }),
|
|
9408
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xs", children: [
|
|
9409
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Skeleton, { variant: "text", className: "w-3/5" }),
|
|
9410
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Skeleton, { variant: "text", className: "w-2/5" })
|
|
9239
9411
|
] })
|
|
9240
9412
|
] }, i)),
|
|
9241
|
-
/* @__PURE__ */ (0,
|
|
9242
|
-
] }) : showEmpty ? /* @__PURE__ */ (0,
|
|
9243
|
-
/* @__PURE__ */ (0,
|
|
9244
|
-
/* @__PURE__ */ (0,
|
|
9245
|
-
/* @__PURE__ */ (0,
|
|
9246
|
-
] }) : /* @__PURE__ */ (0,
|
|
9413
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "sr-only", children: "Searching\u2026" })
|
|
9414
|
+
] }) : showEmpty ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col items-center justify-center gap-xs px-base py-xl text-center", children: [
|
|
9415
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon, { name: "search", size: 36, strokeWidth: 1.5, className: "text-muted-soft" }),
|
|
9416
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "mt-sm text-heading-sm text-ink", children: emptyTitle }),
|
|
9417
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { className: "text-body-sm text-muted", children: resolvedEmptyDescription })
|
|
9418
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("ul", { className: "flex flex-col", "aria-label": "Search results", children: results.map((r) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9247
9419
|
ListItem,
|
|
9248
9420
|
{
|
|
9249
9421
|
variant: "plain",
|
|
9250
9422
|
href: r.href,
|
|
9251
9423
|
onClick: () => onResultClick?.(r),
|
|
9252
|
-
leading: /* @__PURE__ */ (0,
|
|
9424
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon, { name: r.icon, size: 18, className: cn60("shrink-0", r.iconClassName ?? "text-muted") }),
|
|
9253
9425
|
trailing: null,
|
|
9254
|
-
title: /* @__PURE__ */ (0,
|
|
9255
|
-
/* @__PURE__ */ (0,
|
|
9256
|
-
/* @__PURE__ */ (0,
|
|
9426
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
9427
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "block truncate text-body-sm text-muted", children: r.type }),
|
|
9428
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "block truncate", children: r.title })
|
|
9257
9429
|
] })
|
|
9258
9430
|
}
|
|
9259
9431
|
) }, r.id)) }) })
|
|
@@ -9265,9 +9437,9 @@ var SearchResultsList = React79.forwardRef(
|
|
|
9265
9437
|
SearchResultsList.displayName = "SearchResultsList";
|
|
9266
9438
|
|
|
9267
9439
|
// virtual-pkg:src/atoms/SegmentedControl/SegmentedControl.tsx
|
|
9268
|
-
var
|
|
9269
|
-
var
|
|
9270
|
-
var
|
|
9440
|
+
var React81 = __toESM(require("react"));
|
|
9441
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
9442
|
+
var cn61 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9271
9443
|
var segmentInteraction = "cursor-pointer transition duration-150 ease-out not-aria-selected:hover:bg-surface-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50";
|
|
9272
9444
|
var frame = {
|
|
9273
9445
|
sm: "gap-xxs p-xxs",
|
|
@@ -9277,13 +9449,13 @@ var pillRadius = {
|
|
|
9277
9449
|
sm: "rounded-sm",
|
|
9278
9450
|
md: "rounded-md"
|
|
9279
9451
|
};
|
|
9280
|
-
var SegmentedControl =
|
|
9452
|
+
var SegmentedControl = React81.forwardRef(
|
|
9281
9453
|
({ items, value, onValueChange, size = "sm", bare = false, className, ...rest }, ref) => {
|
|
9282
|
-
const trackRef =
|
|
9283
|
-
const itemRefs =
|
|
9284
|
-
const [pill, setPill] =
|
|
9454
|
+
const trackRef = React81.useRef(null);
|
|
9455
|
+
const itemRefs = React81.useRef({});
|
|
9456
|
+
const [pill, setPill] = React81.useState(null);
|
|
9285
9457
|
const valueKey = items.map((item) => item.value).join("|");
|
|
9286
|
-
|
|
9458
|
+
React81.useLayoutEffect(() => {
|
|
9287
9459
|
const el = value !== void 0 ? itemRefs.current[value] : null;
|
|
9288
9460
|
if (!el) {
|
|
9289
9461
|
setPill(null);
|
|
@@ -9313,25 +9485,25 @@ var SegmentedControl = React80.forwardRef(
|
|
|
9313
9485
|
onValueChange(next.value);
|
|
9314
9486
|
itemRefs.current[next.value]?.focus();
|
|
9315
9487
|
};
|
|
9316
|
-
return /* @__PURE__ */ (0,
|
|
9488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { ref, className: cn61("w-full", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
9317
9489
|
"div",
|
|
9318
9490
|
{
|
|
9319
9491
|
ref: trackRef,
|
|
9320
9492
|
role: "tablist",
|
|
9321
9493
|
"aria-orientation": "horizontal",
|
|
9322
9494
|
onKeyDown,
|
|
9323
|
-
className:
|
|
9495
|
+
className: cn61(
|
|
9324
9496
|
"relative isolate inline-flex max-w-full items-center overflow-x-auto rounded-lg",
|
|
9325
9497
|
frame[size],
|
|
9326
9498
|
bare ? "bg-transparent" : "border border-hairline bg-canvas shadow-sm",
|
|
9327
9499
|
"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
9328
9500
|
),
|
|
9329
9501
|
children: [
|
|
9330
|
-
!bare ? /* @__PURE__ */ (0,
|
|
9502
|
+
!bare ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9331
9503
|
"span",
|
|
9332
9504
|
{
|
|
9333
9505
|
"aria-hidden": "true",
|
|
9334
|
-
className:
|
|
9506
|
+
className: cn61(
|
|
9335
9507
|
"pointer-events-none absolute top-xxs bottom-xxs left-0 -z-10 bg-primary shadow-sm transition-[transform,width] duration-200 ease-out",
|
|
9336
9508
|
pillRadius[size]
|
|
9337
9509
|
),
|
|
@@ -9342,7 +9514,7 @@ var SegmentedControl = React80.forwardRef(
|
|
|
9342
9514
|
const active = item.value === value;
|
|
9343
9515
|
const iconOnly = Boolean(item.icon) && item.label == null;
|
|
9344
9516
|
const glyphSize3 = size === "sm" ? 14 : 16;
|
|
9345
|
-
return /* @__PURE__ */ (0,
|
|
9517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9346
9518
|
Button,
|
|
9347
9519
|
{
|
|
9348
9520
|
ref: (el) => {
|
|
@@ -9359,17 +9531,17 @@ var SegmentedControl = React80.forwardRef(
|
|
|
9359
9531
|
disabled: item.disabled,
|
|
9360
9532
|
onClick: () => onValueChange(item.value),
|
|
9361
9533
|
className: segmentInteraction,
|
|
9362
|
-
children: iconOnly ? /* @__PURE__ */ (0,
|
|
9363
|
-
item.dotClassName ? /* @__PURE__ */ (0,
|
|
9534
|
+
children: iconOnly ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon, { name: item.icon, size: glyphSize3 }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9535
|
+
item.dotClassName ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9364
9536
|
"span",
|
|
9365
9537
|
{
|
|
9366
9538
|
"aria-hidden": "true",
|
|
9367
|
-
className:
|
|
9539
|
+
className: cn61("h-2 w-2 shrink-0 rounded-full", item.dotClassName)
|
|
9368
9540
|
}
|
|
9369
9541
|
) : null,
|
|
9370
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
9371
|
-
/* @__PURE__ */ (0,
|
|
9372
|
-
item.count !== void 0 ? /* @__PURE__ */ (0,
|
|
9542
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon, { name: item.icon, size: glyphSize3 }) : null,
|
|
9543
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "truncate", children: item.label }),
|
|
9544
|
+
item.count !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9373
9545
|
Badge,
|
|
9374
9546
|
{
|
|
9375
9547
|
size: "sm",
|
|
@@ -9392,16 +9564,16 @@ var SegmentedControl = React80.forwardRef(
|
|
|
9392
9564
|
SegmentedControl.displayName = "SegmentedControl";
|
|
9393
9565
|
|
|
9394
9566
|
// virtual-pkg:src/atoms/Sidebar/Sidebar.tsx
|
|
9395
|
-
var
|
|
9567
|
+
var React85 = __toESM(require("react"));
|
|
9396
9568
|
|
|
9397
9569
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
9398
|
-
var
|
|
9570
|
+
var React83 = __toESM(require("react"));
|
|
9399
9571
|
|
|
9400
9572
|
// virtual-pkg:src/atoms/Tooltip/Tooltip.tsx
|
|
9401
9573
|
var import_react5 = __toESM(require("react"));
|
|
9402
9574
|
var import_react_dom9 = require("react-dom");
|
|
9403
|
-
var
|
|
9404
|
-
function
|
|
9575
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
9576
|
+
function cn62(...parts) {
|
|
9405
9577
|
return parts.filter(Boolean).join(" ");
|
|
9406
9578
|
}
|
|
9407
9579
|
var GAP2 = 8;
|
|
@@ -9490,7 +9662,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9490
9662
|
const trigger = import_react5.default.cloneElement(children, {
|
|
9491
9663
|
"aria-describedby": open ? id : void 0
|
|
9492
9664
|
});
|
|
9493
|
-
const panel = /* @__PURE__ */ (0,
|
|
9665
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9494
9666
|
"div",
|
|
9495
9667
|
{
|
|
9496
9668
|
style: {
|
|
@@ -9501,13 +9673,13 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9501
9673
|
zIndex: "var(--z-tooltip, 1500)",
|
|
9502
9674
|
pointerEvents: "none"
|
|
9503
9675
|
},
|
|
9504
|
-
children: /* @__PURE__ */ (0,
|
|
9676
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9505
9677
|
"div",
|
|
9506
9678
|
{
|
|
9507
9679
|
id,
|
|
9508
9680
|
role: "tooltip",
|
|
9509
9681
|
"data-state": open && coords ? "open" : "closed",
|
|
9510
|
-
className:
|
|
9682
|
+
className: cn62(
|
|
9511
9683
|
"relative transition duration-150 ease-out data-[state=open]:translate-x-0 data-[state=open]:translate-y-0 data-[state=open]:opacity-100 data-[state=closed]:opacity-0",
|
|
9512
9684
|
nudgeClosed[placement],
|
|
9513
9685
|
variant === "card" ? "min-w-[8rem] rounded-lg border border-hairline bg-canvas px-md py-sm text-ink shadow-lg" : "flex items-center gap-sm whitespace-nowrap rounded-md bg-inverse-canvas px-sm py-xs text-body-sm text-inverse-ink shadow-md",
|
|
@@ -9515,7 +9687,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9515
9687
|
),
|
|
9516
9688
|
children: [
|
|
9517
9689
|
content,
|
|
9518
|
-
variant === "default" && shortcut && shortcut.length > 0 ? /* @__PURE__ */ (0,
|
|
9690
|
+
variant === "default" && shortcut && shortcut.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "flex items-center gap-xxs", children: shortcut.map((key) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9519
9691
|
"kbd",
|
|
9520
9692
|
{
|
|
9521
9693
|
className: "inline-flex min-w-5 items-center justify-center rounded-xs bg-inverse-ink/15 px-xs text-caption text-inverse-ink",
|
|
@@ -9523,11 +9695,11 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9523
9695
|
},
|
|
9524
9696
|
key
|
|
9525
9697
|
)) }) : null,
|
|
9526
|
-
variant === "default" ? /* @__PURE__ */ (0,
|
|
9698
|
+
variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9527
9699
|
"span",
|
|
9528
9700
|
{
|
|
9529
9701
|
"aria-hidden": "true",
|
|
9530
|
-
className:
|
|
9702
|
+
className: cn62("absolute size-2 rotate-45 rounded-none bg-inverse-canvas", arrowPos[placement])
|
|
9531
9703
|
}
|
|
9532
9704
|
) : null
|
|
9533
9705
|
]
|
|
@@ -9535,7 +9707,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9535
9707
|
)
|
|
9536
9708
|
}
|
|
9537
9709
|
);
|
|
9538
|
-
return /* @__PURE__ */ (0,
|
|
9710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9539
9711
|
"span",
|
|
9540
9712
|
{
|
|
9541
9713
|
ref: setRefs,
|
|
@@ -9558,11 +9730,11 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9558
9730
|
Tooltip.displayName = "Tooltip";
|
|
9559
9731
|
|
|
9560
9732
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
9561
|
-
var
|
|
9562
|
-
var
|
|
9733
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
9734
|
+
var cn63 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9563
9735
|
var linkBase = "flex h-8 items-center rounded-md border border-transparent text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue";
|
|
9564
9736
|
var hasBadge = (badge) => badge !== void 0 && badge !== null && badge !== false;
|
|
9565
|
-
var SidebarDesktop =
|
|
9737
|
+
var SidebarDesktop = React83.forwardRef(
|
|
9566
9738
|
({
|
|
9567
9739
|
brandName = "Linear",
|
|
9568
9740
|
brandHref = "#",
|
|
@@ -9587,15 +9759,15 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9587
9759
|
children,
|
|
9588
9760
|
...rest
|
|
9589
9761
|
}, ref) => {
|
|
9590
|
-
const baseId =
|
|
9591
|
-
const [innerCollapsed, setInnerCollapsed] =
|
|
9762
|
+
const baseId = React83.useId();
|
|
9763
|
+
const [innerCollapsed, setInnerCollapsed] = React83.useState(defaultCollapsed);
|
|
9592
9764
|
const collapsed = collapsedProp ?? innerCollapsed;
|
|
9593
9765
|
const toggle = () => {
|
|
9594
9766
|
const next = !collapsed;
|
|
9595
9767
|
if (collapsedProp === void 0) setInnerCollapsed(next);
|
|
9596
9768
|
onCollapsedChange?.(next);
|
|
9597
9769
|
};
|
|
9598
|
-
const [expanded, setExpanded] =
|
|
9770
|
+
const [expanded, setExpanded] = React83.useState(
|
|
9599
9771
|
() => new Set(
|
|
9600
9772
|
defaultExpanded ?? sections.filter((s) => s.label).map((s) => s.id)
|
|
9601
9773
|
)
|
|
@@ -9611,9 +9783,9 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9611
9783
|
const showSettingsAction = onSettingsClick !== void 0;
|
|
9612
9784
|
const showFooterActions = showHelpAction || showSettingsAction;
|
|
9613
9785
|
const showFooterRow = showFooter && (Boolean(userName) || showFooterActions);
|
|
9614
|
-
const renderIcon = (link) => link.icon ? /* @__PURE__ */ (0,
|
|
9615
|
-
/* @__PURE__ */ (0,
|
|
9616
|
-
collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
9786
|
+
const renderIcon = (link) => link.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: [
|
|
9787
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }),
|
|
9788
|
+
collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9617
9789
|
"span",
|
|
9618
9790
|
{
|
|
9619
9791
|
"aria-hidden": "true",
|
|
@@ -9623,34 +9795,34 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9623
9795
|
] }) : null;
|
|
9624
9796
|
const renderLink = (link, nested = false) => {
|
|
9625
9797
|
const current = link.id === activeId;
|
|
9626
|
-
const anchor = /* @__PURE__ */ (0,
|
|
9798
|
+
const anchor = /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9627
9799
|
"a",
|
|
9628
9800
|
{
|
|
9629
9801
|
href: link.href ?? `#${link.id}`,
|
|
9630
9802
|
"aria-current": current ? "page" : void 0,
|
|
9631
9803
|
"aria-label": collapsed ? link.label : void 0,
|
|
9632
9804
|
onClick: (e) => onNavigate?.(link, e),
|
|
9633
|
-
className:
|
|
9805
|
+
className: cn63(
|
|
9634
9806
|
linkBase,
|
|
9635
|
-
collapsed ? "w-9 justify-center" :
|
|
9807
|
+
collapsed ? "w-9 justify-center" : cn63("w-full gap-sm px-sm", nested && "pl-xl"),
|
|
9636
9808
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
9637
9809
|
),
|
|
9638
9810
|
children: [
|
|
9639
9811
|
renderIcon(link),
|
|
9640
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
9641
|
-
!collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
9812
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "min-w-0 flex-1 truncate", children: link.label }),
|
|
9813
|
+
!collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge })
|
|
9642
9814
|
]
|
|
9643
9815
|
}
|
|
9644
9816
|
);
|
|
9645
|
-
return /* @__PURE__ */ (0,
|
|
9817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("li", { className: collapsed ? "flex justify-center" : void 0, children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Tooltip, { content: link.label, placement: "right", children: anchor }) : anchor }, link.id);
|
|
9646
9818
|
};
|
|
9647
9819
|
const renderGroup = (link) => {
|
|
9648
9820
|
const open = isOpen(link.id);
|
|
9649
9821
|
const panelId = `${baseId}-${link.id}`;
|
|
9650
9822
|
const kids = link.children ?? [];
|
|
9651
9823
|
if (collapsed) {
|
|
9652
|
-
return /* @__PURE__ */ (0,
|
|
9653
|
-
/* @__PURE__ */ (0,
|
|
9824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(React83.Fragment, { children: [
|
|
9825
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("li", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Tooltip, { content: link.label, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9654
9826
|
IconButton,
|
|
9655
9827
|
{
|
|
9656
9828
|
icon: link.icon ?? "box",
|
|
@@ -9665,8 +9837,8 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9665
9837
|
open && kids.map((k) => renderLink(k))
|
|
9666
9838
|
] }, link.id);
|
|
9667
9839
|
}
|
|
9668
|
-
return /* @__PURE__ */ (0,
|
|
9669
|
-
/* @__PURE__ */ (0,
|
|
9840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("li", { children: [
|
|
9841
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9670
9842
|
Button,
|
|
9671
9843
|
{
|
|
9672
9844
|
variant: "item",
|
|
@@ -9674,37 +9846,37 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9674
9846
|
"aria-expanded": open,
|
|
9675
9847
|
"aria-controls": panelId,
|
|
9676
9848
|
onClick: () => flip(link.id),
|
|
9677
|
-
leadingIcon: link.icon ? /* @__PURE__ */ (0,
|
|
9849
|
+
leadingIcon: link.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }) : void 0,
|
|
9678
9850
|
className: "px-sm",
|
|
9679
|
-
children: /* @__PURE__ */ (0,
|
|
9680
|
-
/* @__PURE__ */ (0,
|
|
9681
|
-
hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
9682
|
-
/* @__PURE__ */ (0,
|
|
9851
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9852
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "truncate", children: link.label }),
|
|
9853
|
+
hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge }),
|
|
9854
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9683
9855
|
Icon,
|
|
9684
9856
|
{
|
|
9685
9857
|
name: "chevron-down",
|
|
9686
9858
|
size: 12,
|
|
9687
|
-
className:
|
|
9859
|
+
className: cn63("text-muted transition-transform duration-200 ease-out", !open && "-rotate-90")
|
|
9688
9860
|
}
|
|
9689
9861
|
)
|
|
9690
9862
|
] })
|
|
9691
9863
|
}
|
|
9692
9864
|
),
|
|
9693
|
-
/* @__PURE__ */ (0,
|
|
9865
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9694
9866
|
"div",
|
|
9695
9867
|
{
|
|
9696
9868
|
id: panelId,
|
|
9697
9869
|
"data-state": open ? "open" : "closed",
|
|
9698
9870
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9699
|
-
children: /* @__PURE__ */ (0,
|
|
9871
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden pt-xxs", children: kids.map((k) => renderLink(k, true)) })
|
|
9700
9872
|
}
|
|
9701
9873
|
)
|
|
9702
9874
|
] }, link.id);
|
|
9703
9875
|
};
|
|
9704
9876
|
const renderItem = (link) => link.children?.length ? renderGroup(link) : renderLink(link);
|
|
9705
9877
|
const showWorkspaceRow = Boolean(workspaceName) || !collapsed && headerActions != null;
|
|
9706
|
-
return /* @__PURE__ */ (0,
|
|
9707
|
-
/* @__PURE__ */ (0,
|
|
9878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { ref, className: cn63("flex h-full w-full min-h-0 bg-canvas text-ink", className), ...rest, children: [
|
|
9879
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9708
9880
|
"aside",
|
|
9709
9881
|
{
|
|
9710
9882
|
"aria-label": "Sidebar",
|
|
@@ -9712,38 +9884,38 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9712
9884
|
style: { width: collapsed ? 64 : 256 },
|
|
9713
9885
|
className: "flex h-full shrink-0 flex-col overflow-hidden border-r border-hairline bg-surface transition-[width] duration-200 ease-out",
|
|
9714
9886
|
children: [
|
|
9715
|
-
collapsed ? /* @__PURE__ */ (0,
|
|
9716
|
-
/* @__PURE__ */ (0,
|
|
9717
|
-
/* @__PURE__ */ (0,
|
|
9887
|
+
collapsed ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex shrink-0 justify-center pb-sm pt-md", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconButton, { icon: "panel-right", variant: "secondary", "aria-label": "Expand sidebar", "aria-expanded": false, onClick: toggle }) }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex shrink-0 items-center justify-between gap-sm pb-sm pl-base pr-md pt-md", children: [
|
|
9888
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
9889
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconButton, { icon: "panel-left", variant: "secondary", "aria-label": "Collapse sidebar", "aria-expanded": true, onClick: toggle })
|
|
9718
9890
|
] }),
|
|
9719
|
-
showWorkspaceRow && /* @__PURE__ */ (0,
|
|
9891
|
+
showWorkspaceRow && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9720
9892
|
"div",
|
|
9721
9893
|
{
|
|
9722
|
-
className:
|
|
9894
|
+
className: cn63(
|
|
9723
9895
|
"shrink-0 pb-sm",
|
|
9724
9896
|
collapsed ? "flex justify-center" : "flex items-center gap-xxs px-sm"
|
|
9725
9897
|
),
|
|
9726
9898
|
children: [
|
|
9727
|
-
workspaceName ? collapsed ? /* @__PURE__ */ (0,
|
|
9899
|
+
workspaceName ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Tooltip, { content: workspaceName, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { variant: "ghost", iconOnly: true, "aria-label": workspaceName, onClick: onWorkspaceClick, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9728
9900
|
Button,
|
|
9729
9901
|
{
|
|
9730
9902
|
variant: "ghost",
|
|
9731
9903
|
onClick: onWorkspaceClick,
|
|
9732
9904
|
className: "min-w-0 flex-1 justify-start px-sm",
|
|
9733
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
9734
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
9735
|
-
children: /* @__PURE__ */ (0,
|
|
9905
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }),
|
|
9906
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: "chevron-down", size: 14, className: "text-muted" }),
|
|
9907
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "min-w-0 truncate text-ink", children: workspaceName })
|
|
9736
9908
|
}
|
|
9737
|
-
) : /* @__PURE__ */ (0,
|
|
9738
|
-
!collapsed && headerActions != null && /* @__PURE__ */ (0,
|
|
9909
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "min-w-0 flex-1" }),
|
|
9910
|
+
!collapsed && headerActions != null && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex shrink-0 items-center gap-xxs", children: headerActions })
|
|
9739
9911
|
]
|
|
9740
9912
|
}
|
|
9741
9913
|
),
|
|
9742
|
-
/* @__PURE__ */ (0,
|
|
9914
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("nav", { "aria-label": "Main", className: cn63("min-h-0 flex-1 overflow-y-auto overscroll-contain pb-sm", collapsed ? "px-0" : "px-sm"), children: sections.map((section, i) => {
|
|
9743
9915
|
const sectionOpen = !section.label || isOpen(section.id);
|
|
9744
9916
|
const listId = `${baseId}-section-${section.id}`;
|
|
9745
|
-
return /* @__PURE__ */ (0,
|
|
9746
|
-
section.label && !collapsed && /* @__PURE__ */ (0,
|
|
9917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: i > 0 ? "mt-base" : void 0, children: [
|
|
9918
|
+
section.label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9747
9919
|
Button,
|
|
9748
9920
|
{
|
|
9749
9921
|
variant: "item",
|
|
@@ -9752,52 +9924,52 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9752
9924
|
"aria-controls": listId,
|
|
9753
9925
|
onClick: () => flip(section.id),
|
|
9754
9926
|
className: "px-sm",
|
|
9755
|
-
children: /* @__PURE__ */ (0,
|
|
9927
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "inline-flex items-center gap-xs text-muted", children: [
|
|
9756
9928
|
section.label,
|
|
9757
|
-
/* @__PURE__ */ (0,
|
|
9929
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9758
9930
|
Icon,
|
|
9759
9931
|
{
|
|
9760
9932
|
name: "chevron-down",
|
|
9761
9933
|
size: 12,
|
|
9762
|
-
className:
|
|
9934
|
+
className: cn63("transition-transform duration-200 ease-out", !sectionOpen && "-rotate-90")
|
|
9763
9935
|
}
|
|
9764
9936
|
)
|
|
9765
9937
|
] })
|
|
9766
9938
|
}
|
|
9767
9939
|
),
|
|
9768
|
-
/* @__PURE__ */ (0,
|
|
9940
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9769
9941
|
"div",
|
|
9770
9942
|
{
|
|
9771
9943
|
id: listId,
|
|
9772
9944
|
"data-state": sectionOpen || collapsed ? "open" : "closed",
|
|
9773
9945
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9774
|
-
children: /* @__PURE__ */ (0,
|
|
9946
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden", children: section.items.map(renderItem) })
|
|
9775
9947
|
}
|
|
9776
9948
|
)
|
|
9777
9949
|
] }, section.id);
|
|
9778
9950
|
}) }),
|
|
9779
|
-
announcement && !collapsed && /* @__PURE__ */ (0,
|
|
9951
|
+
announcement && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "shrink-0 px-sm pb-sm", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9780
9952
|
"a",
|
|
9781
9953
|
{
|
|
9782
9954
|
href: announcement.href ?? "#",
|
|
9783
9955
|
className: "flex flex-col gap-xxs rounded-lg border border-hairline bg-canvas px-md py-sm cursor-pointer transition-colors duration-150 ease-out hover:bg-surface-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
|
|
9784
9956
|
children: [
|
|
9785
|
-
/* @__PURE__ */ (0,
|
|
9786
|
-
/* @__PURE__ */ (0,
|
|
9957
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-caption text-muted", children: announcement.eyebrow }),
|
|
9958
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-body-sm text-ink", children: announcement.title })
|
|
9787
9959
|
]
|
|
9788
9960
|
}
|
|
9789
9961
|
) }),
|
|
9790
|
-
showFooterRow && /* @__PURE__ */ (0,
|
|
9962
|
+
showFooterRow && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9791
9963
|
"div",
|
|
9792
9964
|
{
|
|
9793
|
-
className:
|
|
9965
|
+
className: cn63(
|
|
9794
9966
|
"flex shrink-0 border-t border-hairline py-sm",
|
|
9795
9967
|
collapsed ? "flex-col items-center gap-xs" : "items-center justify-between px-md"
|
|
9796
9968
|
),
|
|
9797
9969
|
children: [
|
|
9798
|
-
userName && /* @__PURE__ */ (0,
|
|
9799
|
-
showFooterActions && /* @__PURE__ */ (0,
|
|
9800
|
-
showHelpAction && /* @__PURE__ */ (0,
|
|
9970
|
+
userName && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }),
|
|
9971
|
+
showFooterActions && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: cn63("flex items-center gap-xxs", collapsed && "flex-col"), children: [
|
|
9972
|
+
showHelpAction && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9801
9973
|
IconButton,
|
|
9802
9974
|
{
|
|
9803
9975
|
icon: "message-circle",
|
|
@@ -9806,7 +9978,7 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9806
9978
|
onClick: onHelpClick
|
|
9807
9979
|
}
|
|
9808
9980
|
),
|
|
9809
|
-
showSettingsAction && /* @__PURE__ */ (0,
|
|
9981
|
+
showSettingsAction && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconButton, { icon: "settings", variant: "ghost", "aria-label": "Settings", onClick: onSettingsClick })
|
|
9810
9982
|
] })
|
|
9811
9983
|
]
|
|
9812
9984
|
}
|
|
@@ -9814,19 +9986,19 @@ var SidebarDesktop = React82.forwardRef(
|
|
|
9814
9986
|
]
|
|
9815
9987
|
}
|
|
9816
9988
|
),
|
|
9817
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
9989
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "min-w-0 flex-1 overflow-auto", children })
|
|
9818
9990
|
] });
|
|
9819
9991
|
}
|
|
9820
9992
|
);
|
|
9821
9993
|
SidebarDesktop.displayName = "SidebarDesktop";
|
|
9822
9994
|
|
|
9823
9995
|
// virtual-pkg:src/atoms/SidebarMobile/SidebarMobile.tsx
|
|
9824
|
-
var
|
|
9825
|
-
var
|
|
9826
|
-
var
|
|
9996
|
+
var React84 = __toESM(require("react"));
|
|
9997
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9998
|
+
var cn64 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9827
9999
|
var linkBase2 = "flex h-9 w-full items-center gap-sm rounded-md border border-transparent px-sm text-body-md cursor-pointer transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-blue";
|
|
9828
10000
|
var hasBadge2 = (badge) => badge !== void 0 && badge !== null && badge !== false;
|
|
9829
|
-
var SidebarMobile =
|
|
10001
|
+
var SidebarMobile = React84.forwardRef(
|
|
9830
10002
|
({
|
|
9831
10003
|
brandName = "Linear",
|
|
9832
10004
|
brandHref = "#",
|
|
@@ -9851,17 +10023,17 @@ var SidebarMobile = React83.forwardRef(
|
|
|
9851
10023
|
children,
|
|
9852
10024
|
...rest
|
|
9853
10025
|
}, ref) => {
|
|
9854
|
-
const baseId =
|
|
9855
|
-
const [innerOpen, setInnerOpen] =
|
|
10026
|
+
const baseId = React84.useId();
|
|
10027
|
+
const [innerOpen, setInnerOpen] = React84.useState(defaultOpen);
|
|
9856
10028
|
const open = openProp ?? innerOpen;
|
|
9857
|
-
const setOpen =
|
|
10029
|
+
const setOpen = React84.useCallback(
|
|
9858
10030
|
(next) => {
|
|
9859
10031
|
if (openProp === void 0) setInnerOpen(next);
|
|
9860
10032
|
onOpenChange?.(next);
|
|
9861
10033
|
},
|
|
9862
10034
|
[openProp, onOpenChange]
|
|
9863
10035
|
);
|
|
9864
|
-
const [expanded, setExpanded] =
|
|
10036
|
+
const [expanded, setExpanded] = React84.useState(
|
|
9865
10037
|
() => new Set(defaultExpanded ?? sections.filter((s) => s.label).map((s) => s.id))
|
|
9866
10038
|
);
|
|
9867
10039
|
const flip = (id) => setExpanded((prev) => {
|
|
@@ -9876,7 +10048,7 @@ var SidebarMobile = React83.forwardRef(
|
|
|
9876
10048
|
const showFooterRow = showFooter && (Boolean(userName) || showFooterActions);
|
|
9877
10049
|
const renderLink = (link, nested = false) => {
|
|
9878
10050
|
const current = link.id === activeId;
|
|
9879
|
-
return /* @__PURE__ */ (0,
|
|
10051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9880
10052
|
"a",
|
|
9881
10053
|
{
|
|
9882
10054
|
href: link.href ?? `#${link.id}`,
|
|
@@ -9885,15 +10057,15 @@ var SidebarMobile = React83.forwardRef(
|
|
|
9885
10057
|
onNavigate?.(link, e);
|
|
9886
10058
|
setOpen(false);
|
|
9887
10059
|
},
|
|
9888
|
-
className:
|
|
10060
|
+
className: cn64(
|
|
9889
10061
|
linkBase2,
|
|
9890
10062
|
nested && "pl-xl",
|
|
9891
10063
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
9892
10064
|
),
|
|
9893
10065
|
children: [
|
|
9894
|
-
link.icon && /* @__PURE__ */ (0,
|
|
9895
|
-
/* @__PURE__ */ (0,
|
|
9896
|
-
hasBadge2(link.badge) && /* @__PURE__ */ (0,
|
|
10066
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }),
|
|
10067
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "min-w-0 flex-1 truncate", children: link.label }),
|
|
10068
|
+
hasBadge2(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge })
|
|
9897
10069
|
]
|
|
9898
10070
|
}
|
|
9899
10071
|
) }, link.id);
|
|
@@ -9901,8 +10073,8 @@ var SidebarMobile = React83.forwardRef(
|
|
|
9901
10073
|
const renderGroup = (link) => {
|
|
9902
10074
|
const isOpen = expanded.has(link.id);
|
|
9903
10075
|
const panelId = `${baseId}-${link.id}`;
|
|
9904
|
-
return /* @__PURE__ */ (0,
|
|
9905
|
-
/* @__PURE__ */ (0,
|
|
10076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("li", { children: [
|
|
10077
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9906
10078
|
Button,
|
|
9907
10079
|
{
|
|
9908
10080
|
variant: "item",
|
|
@@ -9910,39 +10082,39 @@ var SidebarMobile = React83.forwardRef(
|
|
|
9910
10082
|
"aria-expanded": isOpen,
|
|
9911
10083
|
"aria-controls": panelId,
|
|
9912
10084
|
onClick: () => flip(link.id),
|
|
9913
|
-
leadingIcon: link.icon ? /* @__PURE__ */ (0,
|
|
10085
|
+
leadingIcon: link.icon ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }) : void 0,
|
|
9914
10086
|
className: "px-sm",
|
|
9915
|
-
children: /* @__PURE__ */ (0,
|
|
9916
|
-
/* @__PURE__ */ (0,
|
|
9917
|
-
hasBadge2(link.badge) && /* @__PURE__ */ (0,
|
|
9918
|
-
/* @__PURE__ */ (0,
|
|
10087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
10088
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "truncate", children: link.label }),
|
|
10089
|
+
hasBadge2(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge }),
|
|
10090
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9919
10091
|
Icon,
|
|
9920
10092
|
{
|
|
9921
10093
|
name: "chevron-down",
|
|
9922
10094
|
size: 12,
|
|
9923
|
-
className:
|
|
10095
|
+
className: cn64("text-muted transition-transform duration-200 ease-out", !isOpen && "-rotate-90")
|
|
9924
10096
|
}
|
|
9925
10097
|
)
|
|
9926
10098
|
] })
|
|
9927
10099
|
}
|
|
9928
10100
|
),
|
|
9929
|
-
/* @__PURE__ */ (0,
|
|
10101
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9930
10102
|
"div",
|
|
9931
10103
|
{
|
|
9932
10104
|
id: panelId,
|
|
9933
10105
|
"data-state": isOpen ? "open" : "closed",
|
|
9934
10106
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9935
|
-
children: /* @__PURE__ */ (0,
|
|
10107
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden pt-xxs", children: (link.children ?? []).map((k) => renderLink(k, true)) })
|
|
9936
10108
|
}
|
|
9937
10109
|
)
|
|
9938
10110
|
] }, link.id);
|
|
9939
10111
|
};
|
|
9940
|
-
return /* @__PURE__ */ (0,
|
|
9941
|
-
/* @__PURE__ */ (0,
|
|
9942
|
-
/* @__PURE__ */ (0,
|
|
9943
|
-
/* @__PURE__ */ (0,
|
|
9944
|
-
mobileActions != null && /* @__PURE__ */ (0,
|
|
9945
|
-
/* @__PURE__ */ (0,
|
|
10112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { ref, className: cn64("flex w-full flex-col bg-canvas text-ink", className), ...rest, children: [
|
|
10113
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("header", { className: "flex h-14 w-full shrink-0 items-center justify-between gap-sm border-b border-hairline bg-canvas px-base", children: [
|
|
10114
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
10115
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex min-w-0 items-center gap-xxs", children: [
|
|
10116
|
+
mobileActions != null && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex items-center gap-xxs", children: mobileActions }),
|
|
10117
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9946
10118
|
IconButton,
|
|
9947
10119
|
{
|
|
9948
10120
|
icon: "menu",
|
|
@@ -9954,8 +10126,8 @@ var SidebarMobile = React83.forwardRef(
|
|
|
9954
10126
|
)
|
|
9955
10127
|
] })
|
|
9956
10128
|
] }),
|
|
9957
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
9958
|
-
/* @__PURE__ */ (0,
|
|
10129
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "min-w-0 flex-1", children }),
|
|
10130
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9959
10131
|
Drawer,
|
|
9960
10132
|
{
|
|
9961
10133
|
open,
|
|
@@ -9963,12 +10135,12 @@ var SidebarMobile = React83.forwardRef(
|
|
|
9963
10135
|
side: "left",
|
|
9964
10136
|
"aria-label": "Navigation",
|
|
9965
10137
|
closeLabel: "Close navigation",
|
|
9966
|
-
headerStart: /* @__PURE__ */ (0,
|
|
10138
|
+
headerStart: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
9967
10139
|
bodyClassName: "px-sm",
|
|
9968
|
-
footer: showFooterRow ? /* @__PURE__ */ (0,
|
|
9969
|
-
userName ? /* @__PURE__ */ (0,
|
|
9970
|
-
showFooterActions && /* @__PURE__ */ (0,
|
|
9971
|
-
showHelpAction && /* @__PURE__ */ (0,
|
|
10140
|
+
footer: showFooterRow ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
10141
|
+
userName ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", {}),
|
|
10142
|
+
showFooterActions && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center gap-xxs", children: [
|
|
10143
|
+
showHelpAction && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9972
10144
|
IconButton,
|
|
9973
10145
|
{
|
|
9974
10146
|
icon: "message-circle",
|
|
@@ -9977,26 +10149,26 @@ var SidebarMobile = React83.forwardRef(
|
|
|
9977
10149
|
onClick: onHelpClick
|
|
9978
10150
|
}
|
|
9979
10151
|
),
|
|
9980
|
-
showSettingsAction && /* @__PURE__ */ (0,
|
|
10152
|
+
showSettingsAction && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconButton, { icon: "settings", variant: "ghost", "aria-label": "Settings", onClick: onSettingsClick })
|
|
9981
10153
|
] })
|
|
9982
10154
|
] }) : void 0,
|
|
9983
10155
|
children: [
|
|
9984
|
-
workspaceName && /* @__PURE__ */ (0,
|
|
10156
|
+
workspaceName && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "pb-sm", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9985
10157
|
Button,
|
|
9986
10158
|
{
|
|
9987
10159
|
variant: "ghost",
|
|
9988
10160
|
onClick: onWorkspaceClick,
|
|
9989
10161
|
className: "px-sm",
|
|
9990
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
9991
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
9992
|
-
children: /* @__PURE__ */ (0,
|
|
10162
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }),
|
|
10163
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon, { name: "chevron-down", size: 14, className: "text-muted" }),
|
|
10164
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-ink", children: workspaceName })
|
|
9993
10165
|
}
|
|
9994
10166
|
) }),
|
|
9995
|
-
/* @__PURE__ */ (0,
|
|
10167
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("nav", { "aria-label": "Main", children: sections.map((section, i) => {
|
|
9996
10168
|
const sectionOpen = !section.label || expanded.has(section.id);
|
|
9997
10169
|
const listId = `${baseId}-section-${section.id}`;
|
|
9998
|
-
return /* @__PURE__ */ (0,
|
|
9999
|
-
section.label && /* @__PURE__ */ (0,
|
|
10170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: i > 0 ? "mt-base" : void 0, children: [
|
|
10171
|
+
section.label && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
10000
10172
|
Button,
|
|
10001
10173
|
{
|
|
10002
10174
|
variant: "item",
|
|
@@ -10005,38 +10177,38 @@ var SidebarMobile = React83.forwardRef(
|
|
|
10005
10177
|
"aria-controls": listId,
|
|
10006
10178
|
onClick: () => flip(section.id),
|
|
10007
10179
|
className: "px-sm",
|
|
10008
|
-
children: /* @__PURE__ */ (0,
|
|
10180
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "inline-flex items-center gap-xs text-muted", children: [
|
|
10009
10181
|
section.label,
|
|
10010
|
-
/* @__PURE__ */ (0,
|
|
10182
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
10011
10183
|
Icon,
|
|
10012
10184
|
{
|
|
10013
10185
|
name: "chevron-down",
|
|
10014
10186
|
size: 12,
|
|
10015
|
-
className:
|
|
10187
|
+
className: cn64("transition-transform duration-200 ease-out", !sectionOpen && "-rotate-90")
|
|
10016
10188
|
}
|
|
10017
10189
|
)
|
|
10018
10190
|
] })
|
|
10019
10191
|
}
|
|
10020
10192
|
),
|
|
10021
|
-
/* @__PURE__ */ (0,
|
|
10193
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
10022
10194
|
"div",
|
|
10023
10195
|
{
|
|
10024
10196
|
id: listId,
|
|
10025
10197
|
"data-state": sectionOpen ? "open" : "closed",
|
|
10026
10198
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
10027
|
-
children: /* @__PURE__ */ (0,
|
|
10199
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden", children: section.items.map((l) => l.children?.length ? renderGroup(l) : renderLink(l)) })
|
|
10028
10200
|
}
|
|
10029
10201
|
)
|
|
10030
10202
|
] }, section.id);
|
|
10031
10203
|
}) }),
|
|
10032
|
-
announcement && /* @__PURE__ */ (0,
|
|
10204
|
+
announcement && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
10033
10205
|
"a",
|
|
10034
10206
|
{
|
|
10035
10207
|
href: announcement.href ?? "#",
|
|
10036
10208
|
className: "mt-base flex flex-col gap-xxs rounded-lg border border-hairline bg-canvas px-md py-sm cursor-pointer transition-colors duration-150 ease-out hover:bg-surface-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue",
|
|
10037
10209
|
children: [
|
|
10038
|
-
/* @__PURE__ */ (0,
|
|
10039
|
-
/* @__PURE__ */ (0,
|
|
10210
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-caption text-muted", children: announcement.eyebrow }),
|
|
10211
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-body-sm text-ink", children: announcement.title })
|
|
10040
10212
|
]
|
|
10041
10213
|
}
|
|
10042
10214
|
)
|
|
@@ -10049,8 +10221,8 @@ var SidebarMobile = React83.forwardRef(
|
|
|
10049
10221
|
SidebarMobile.displayName = "SidebarMobile";
|
|
10050
10222
|
|
|
10051
10223
|
// virtual-pkg:src/atoms/Sidebar/Sidebar.tsx
|
|
10052
|
-
var
|
|
10053
|
-
var Sidebar =
|
|
10224
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
10225
|
+
var Sidebar = React85.forwardRef(
|
|
10054
10226
|
({
|
|
10055
10227
|
collapsed,
|
|
10056
10228
|
defaultCollapsed,
|
|
@@ -10063,13 +10235,13 @@ var Sidebar = React84.forwardRef(
|
|
|
10063
10235
|
children,
|
|
10064
10236
|
className,
|
|
10065
10237
|
...shared
|
|
10066
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
10238
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
10067
10239
|
"div",
|
|
10068
10240
|
{
|
|
10069
10241
|
ref,
|
|
10070
10242
|
className: ["flex h-full w-full min-h-0 flex-col bg-canvas md:flex-row", className].filter(Boolean).join(" "),
|
|
10071
10243
|
children: [
|
|
10072
|
-
/* @__PURE__ */ (0,
|
|
10244
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "hidden h-full shrink-0 md:block", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10073
10245
|
SidebarDesktop,
|
|
10074
10246
|
{
|
|
10075
10247
|
...shared,
|
|
@@ -10080,7 +10252,7 @@ var Sidebar = React84.forwardRef(
|
|
|
10080
10252
|
onCollapsedChange
|
|
10081
10253
|
}
|
|
10082
10254
|
) }),
|
|
10083
|
-
/* @__PURE__ */ (0,
|
|
10255
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "shrink-0 md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10084
10256
|
SidebarMobile,
|
|
10085
10257
|
{
|
|
10086
10258
|
...shared,
|
|
@@ -10090,7 +10262,7 @@ var Sidebar = React84.forwardRef(
|
|
|
10090
10262
|
onOpenChange: onMobileOpenChange
|
|
10091
10263
|
}
|
|
10092
10264
|
) }),
|
|
10093
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
10265
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "min-h-0 min-w-0 flex-1 overflow-auto", children })
|
|
10094
10266
|
]
|
|
10095
10267
|
}
|
|
10096
10268
|
)
|
|
@@ -10099,8 +10271,8 @@ Sidebar.displayName = "Sidebar";
|
|
|
10099
10271
|
|
|
10100
10272
|
// virtual-pkg:src/atoms/Slider/Slider.tsx
|
|
10101
10273
|
var import_react6 = __toESM(require("react"));
|
|
10102
|
-
var
|
|
10103
|
-
function
|
|
10274
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
10275
|
+
function cn65(...parts) {
|
|
10104
10276
|
return parts.filter(Boolean).join(" ");
|
|
10105
10277
|
}
|
|
10106
10278
|
var THUMB2 = 20;
|
|
@@ -10139,22 +10311,22 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10139
10311
|
const lowPct = pctOf(low);
|
|
10140
10312
|
const highPct = pctOf(high);
|
|
10141
10313
|
const thumbState = disabled ? "border-hairline bg-surface-soft shadow-none" : "border-hairline-strong";
|
|
10142
|
-
return /* @__PURE__ */ (0,
|
|
10314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
10143
10315
|
"div",
|
|
10144
10316
|
{
|
|
10145
10317
|
ref,
|
|
10146
|
-
className:
|
|
10318
|
+
className: cn65("flex w-full flex-col items-center gap-md", disabled && "opacity-50", className),
|
|
10147
10319
|
...rest,
|
|
10148
10320
|
children: [
|
|
10149
|
-
/* @__PURE__ */ (0,
|
|
10150
|
-
histogram && histogram.length > 0 ? /* @__PURE__ */ (0,
|
|
10321
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex w-full flex-col gap-xxs", children: [
|
|
10322
|
+
histogram && histogram.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { "aria-hidden": "true", className: "flex h-10 w-full items-end gap-xxs", style: { paddingInline: THUMB2 / 2 }, children: histogram.map((h, i) => {
|
|
10151
10323
|
const peak = Math.max(...histogram, 1);
|
|
10152
10324
|
const center = (i + 0.5) / histogram.length * 100;
|
|
10153
10325
|
const inside = center >= lowPct && center <= highPct;
|
|
10154
|
-
return /* @__PURE__ */ (0,
|
|
10326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10155
10327
|
"span",
|
|
10156
10328
|
{
|
|
10157
|
-
className:
|
|
10329
|
+
className: cn65(
|
|
10158
10330
|
"flex-1 rounded-t-xs transition-colors duration-200 ease-out",
|
|
10159
10331
|
inside ? "bg-hairline-strong" : "bg-surface-strong"
|
|
10160
10332
|
),
|
|
@@ -10163,13 +10335,13 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10163
10335
|
i
|
|
10164
10336
|
);
|
|
10165
10337
|
}) }) : null,
|
|
10166
|
-
/* @__PURE__ */ (0,
|
|
10167
|
-
/* @__PURE__ */ (0,
|
|
10168
|
-
/* @__PURE__ */ (0,
|
|
10338
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "relative h-5 w-full", children: [
|
|
10339
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "absolute left-0 right-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-surface-strong" }),
|
|
10340
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10169
10341
|
"div",
|
|
10170
10342
|
{
|
|
10171
10343
|
"aria-hidden": "true",
|
|
10172
|
-
className:
|
|
10344
|
+
className: cn65(
|
|
10173
10345
|
"absolute top-1/2 h-1.5 -translate-y-1/2 rounded-full transition-[left,width] duration-150 ease-out",
|
|
10174
10346
|
disabled ? "bg-hairline-strong" : "bg-primary"
|
|
10175
10347
|
),
|
|
@@ -10179,8 +10351,8 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10179
10351
|
}
|
|
10180
10352
|
}
|
|
10181
10353
|
),
|
|
10182
|
-
isRange ? /* @__PURE__ */ (0,
|
|
10183
|
-
/* @__PURE__ */ (0,
|
|
10354
|
+
isRange ? /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
10355
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10184
10356
|
"input",
|
|
10185
10357
|
{
|
|
10186
10358
|
type: "range",
|
|
@@ -10193,15 +10365,15 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10193
10365
|
"aria-label": `${ariaLabel ?? "Value"} minimum`,
|
|
10194
10366
|
"aria-labelledby": label ? labelId : void 0,
|
|
10195
10367
|
onChange: (e) => commit([Math.min(Number(e.target.value), high), high]),
|
|
10196
|
-
className:
|
|
10368
|
+
className: cn65("peer/low", inputClass, rangeInputClass),
|
|
10197
10369
|
style: { zIndex: lowPct > 90 ? 2 : 1 }
|
|
10198
10370
|
}
|
|
10199
10371
|
),
|
|
10200
|
-
/* @__PURE__ */ (0,
|
|
10372
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10201
10373
|
"span",
|
|
10202
10374
|
{
|
|
10203
10375
|
"aria-hidden": "true",
|
|
10204
|
-
className:
|
|
10376
|
+
className: cn65(
|
|
10205
10377
|
thumbBase,
|
|
10206
10378
|
thumbState,
|
|
10207
10379
|
"peer-focus-visible/low:border-2 peer-focus-visible/low:border-primary peer-focus-visible/low:ring-4 peer-focus-visible/low:ring-primary/25 peer-active/low:scale-110"
|
|
@@ -10209,7 +10381,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10209
10381
|
style: { left: leftOf(lowPct) }
|
|
10210
10382
|
}
|
|
10211
10383
|
),
|
|
10212
|
-
/* @__PURE__ */ (0,
|
|
10384
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10213
10385
|
"input",
|
|
10214
10386
|
{
|
|
10215
10387
|
type: "range",
|
|
@@ -10222,14 +10394,14 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10222
10394
|
"aria-label": `${ariaLabel ?? "Value"} maximum`,
|
|
10223
10395
|
"aria-labelledby": label ? labelId : void 0,
|
|
10224
10396
|
onChange: (e) => commit([low, Math.max(Number(e.target.value), low)]),
|
|
10225
|
-
className:
|
|
10397
|
+
className: cn65("peer/high", inputClass, rangeInputClass)
|
|
10226
10398
|
}
|
|
10227
10399
|
),
|
|
10228
|
-
/* @__PURE__ */ (0,
|
|
10400
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10229
10401
|
"span",
|
|
10230
10402
|
{
|
|
10231
10403
|
"aria-hidden": "true",
|
|
10232
|
-
className:
|
|
10404
|
+
className: cn65(
|
|
10233
10405
|
thumbBase,
|
|
10234
10406
|
thumbState,
|
|
10235
10407
|
"peer-focus-visible/high:border-2 peer-focus-visible/high:border-primary peer-focus-visible/high:ring-4 peer-focus-visible/high:ring-primary/25 peer-active/high:scale-110"
|
|
@@ -10237,8 +10409,8 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10237
10409
|
style: { left: leftOf(highPct) }
|
|
10238
10410
|
}
|
|
10239
10411
|
)
|
|
10240
|
-
] }) : /* @__PURE__ */ (0,
|
|
10241
|
-
/* @__PURE__ */ (0,
|
|
10412
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
10413
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10242
10414
|
"input",
|
|
10243
10415
|
{
|
|
10244
10416
|
type: "range",
|
|
@@ -10251,14 +10423,14 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10251
10423
|
"aria-label": label ? void 0 : ariaLabel ?? "Value",
|
|
10252
10424
|
"aria-labelledby": label ? labelId : void 0,
|
|
10253
10425
|
onChange: (e) => commit(Number(e.target.value)),
|
|
10254
|
-
className:
|
|
10426
|
+
className: cn65("peer", inputClass)
|
|
10255
10427
|
}
|
|
10256
10428
|
),
|
|
10257
|
-
/* @__PURE__ */ (0,
|
|
10429
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10258
10430
|
"span",
|
|
10259
10431
|
{
|
|
10260
10432
|
"aria-hidden": "true",
|
|
10261
|
-
className:
|
|
10433
|
+
className: cn65(
|
|
10262
10434
|
thumbBase,
|
|
10263
10435
|
thumbState,
|
|
10264
10436
|
"peer-focus-visible:border-2 peer-focus-visible:border-primary peer-focus-visible:ring-4 peer-focus-visible:ring-primary/25 peer-active:scale-110"
|
|
@@ -10269,7 +10441,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10269
10441
|
] })
|
|
10270
10442
|
] })
|
|
10271
10443
|
] }),
|
|
10272
|
-
label ? /* @__PURE__ */ (0,
|
|
10444
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
10273
10445
|
]
|
|
10274
10446
|
}
|
|
10275
10447
|
);
|
|
@@ -10278,9 +10450,9 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10278
10450
|
Slider.displayName = "Slider";
|
|
10279
10451
|
|
|
10280
10452
|
// virtual-pkg:src/atoms/StepperItem/StepperItem.tsx
|
|
10281
|
-
var
|
|
10282
|
-
var
|
|
10283
|
-
var
|
|
10453
|
+
var React87 = __toESM(require("react"));
|
|
10454
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
10455
|
+
var cn66 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10284
10456
|
var statusLabel = {
|
|
10285
10457
|
upcoming: "Upcoming",
|
|
10286
10458
|
active: "In progress",
|
|
@@ -10289,85 +10461,85 @@ var statusLabel = {
|
|
|
10289
10461
|
};
|
|
10290
10462
|
function Indicator({ status }) {
|
|
10291
10463
|
const shell = "col-start-1 row-start-1 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full transition duration-200 ease-out";
|
|
10292
|
-
return /* @__PURE__ */ (0,
|
|
10293
|
-
/* @__PURE__ */ (0,
|
|
10464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "grid h-5 w-5 shrink-0 place-items-center", "aria-hidden": "true", children: [
|
|
10465
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10294
10466
|
"span",
|
|
10295
10467
|
{
|
|
10296
|
-
className:
|
|
10468
|
+
className: cn66(
|
|
10297
10469
|
shell,
|
|
10298
10470
|
"border border-hairline-strong bg-canvas",
|
|
10299
10471
|
status === "upcoming" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10300
10472
|
)
|
|
10301
10473
|
}
|
|
10302
10474
|
),
|
|
10303
|
-
/* @__PURE__ */ (0,
|
|
10475
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10304
10476
|
"span",
|
|
10305
10477
|
{
|
|
10306
|
-
className:
|
|
10478
|
+
className: cn66(
|
|
10307
10479
|
shell,
|
|
10308
10480
|
"border-2 border-primary bg-canvas",
|
|
10309
10481
|
status === "active" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10310
10482
|
),
|
|
10311
|
-
children: /* @__PURE__ */ (0,
|
|
10483
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "h-2 w-2 rounded-full bg-primary" })
|
|
10312
10484
|
}
|
|
10313
10485
|
),
|
|
10314
|
-
/* @__PURE__ */ (0,
|
|
10486
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10315
10487
|
"span",
|
|
10316
10488
|
{
|
|
10317
|
-
className:
|
|
10489
|
+
className: cn66(
|
|
10318
10490
|
shell,
|
|
10319
10491
|
"bg-semantic-success-soft text-semantic-success",
|
|
10320
10492
|
status === "complete" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10321
10493
|
),
|
|
10322
|
-
children: /* @__PURE__ */ (0,
|
|
10494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Icon, { name: "check", size: 11, strokeWidth: 3 })
|
|
10323
10495
|
}
|
|
10324
10496
|
),
|
|
10325
|
-
/* @__PURE__ */ (0,
|
|
10497
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10326
10498
|
"span",
|
|
10327
10499
|
{
|
|
10328
|
-
className:
|
|
10500
|
+
className: cn66(
|
|
10329
10501
|
shell,
|
|
10330
10502
|
"text-semantic-error",
|
|
10331
10503
|
status === "error" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10332
10504
|
),
|
|
10333
|
-
children: /* @__PURE__ */ (0,
|
|
10505
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Icon, { name: "circle-alert", size: 16 })
|
|
10334
10506
|
}
|
|
10335
10507
|
)
|
|
10336
10508
|
] });
|
|
10337
10509
|
}
|
|
10338
|
-
var StepperItem =
|
|
10339
|
-
({ status = "upcoming", title, meta, connector = false, className, children, ...rest }, ref) => /* @__PURE__ */ (0,
|
|
10510
|
+
var StepperItem = React87.forwardRef(
|
|
10511
|
+
({ status = "upcoming", title, meta, connector = false, className, children, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
10340
10512
|
"li",
|
|
10341
10513
|
{
|
|
10342
10514
|
ref,
|
|
10343
10515
|
"aria-current": status === "active" ? "step" : void 0,
|
|
10344
|
-
className:
|
|
10516
|
+
className: cn66("relative flex w-full gap-md", connector && "pb-base", className),
|
|
10345
10517
|
...rest,
|
|
10346
10518
|
children: [
|
|
10347
|
-
/* @__PURE__ */ (0,
|
|
10348
|
-
/* @__PURE__ */ (0,
|
|
10349
|
-
connector && /* @__PURE__ */ (0,
|
|
10519
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
10520
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Indicator, { status }),
|
|
10521
|
+
connector && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10350
10522
|
"span",
|
|
10351
10523
|
{
|
|
10352
10524
|
"aria-hidden": "true",
|
|
10353
|
-
className:
|
|
10525
|
+
className: cn66(
|
|
10354
10526
|
"mt-xs w-px flex-1 transition-colors duration-200 ease-out",
|
|
10355
10527
|
status === "complete" ? "bg-semantic-success" : "bg-hairline"
|
|
10356
10528
|
)
|
|
10357
10529
|
}
|
|
10358
10530
|
)
|
|
10359
10531
|
] }),
|
|
10360
|
-
/* @__PURE__ */ (0,
|
|
10361
|
-
/* @__PURE__ */ (0,
|
|
10532
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs pt-px", children: [
|
|
10533
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "text-body-md text-ink", children: [
|
|
10362
10534
|
title,
|
|
10363
|
-
/* @__PURE__ */ (0,
|
|
10535
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { className: "sr-only", children: [
|
|
10364
10536
|
" (",
|
|
10365
10537
|
statusLabel[status],
|
|
10366
10538
|
")"
|
|
10367
10539
|
] })
|
|
10368
10540
|
] }),
|
|
10369
|
-
meta && /* @__PURE__ */ (0,
|
|
10370
|
-
children != null && children !== false && /* @__PURE__ */ (0,
|
|
10541
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-body-sm text-muted", children: meta }),
|
|
10542
|
+
children != null && children !== false && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "w-full pt-sm", children })
|
|
10371
10543
|
] })
|
|
10372
10544
|
]
|
|
10373
10545
|
}
|
|
@@ -10376,10 +10548,10 @@ var StepperItem = React86.forwardRef(
|
|
|
10376
10548
|
StepperItem.displayName = "StepperItem";
|
|
10377
10549
|
|
|
10378
10550
|
// virtual-pkg:src/atoms/Tab/Tab.tsx
|
|
10379
|
-
var
|
|
10380
|
-
var
|
|
10381
|
-
var
|
|
10382
|
-
var Tab =
|
|
10551
|
+
var React88 = __toESM(require("react"));
|
|
10552
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
10553
|
+
var cn67 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10554
|
+
var Tab = React88.forwardRef(
|
|
10383
10555
|
({
|
|
10384
10556
|
selected = false,
|
|
10385
10557
|
controls,
|
|
@@ -10390,7 +10562,7 @@ var Tab = React87.forwardRef(
|
|
|
10390
10562
|
children,
|
|
10391
10563
|
tabIndex,
|
|
10392
10564
|
...rest
|
|
10393
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
10565
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10394
10566
|
Button,
|
|
10395
10567
|
{
|
|
10396
10568
|
ref,
|
|
@@ -10401,7 +10573,7 @@ var Tab = React87.forwardRef(
|
|
|
10401
10573
|
"aria-controls": controls,
|
|
10402
10574
|
tabIndex: tabIndex ?? (selected ? 0 : -1),
|
|
10403
10575
|
leadingIcon,
|
|
10404
|
-
className:
|
|
10576
|
+
className: cn67(
|
|
10405
10577
|
"cursor-pointer transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue disabled:cursor-not-allowed disabled:opacity-50",
|
|
10406
10578
|
"text-ink disabled:text-muted",
|
|
10407
10579
|
sharedIndicator ? "relative aria-selected:bg-transparent aria-selected:hover:bg-transparent aria-selected:font-weight-label aria-selected:text-ink" : "aria-selected:bg-primary-soft aria-selected:font-weight-label aria-selected:text-ink",
|
|
@@ -10415,10 +10587,10 @@ var Tab = React87.forwardRef(
|
|
|
10415
10587
|
Tab.displayName = "Tab";
|
|
10416
10588
|
|
|
10417
10589
|
// virtual-pkg:src/atoms/Tabs/Tabs.tsx
|
|
10418
|
-
var
|
|
10419
|
-
var
|
|
10420
|
-
var
|
|
10421
|
-
var Tabs =
|
|
10590
|
+
var React89 = __toESM(require("react"));
|
|
10591
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
10592
|
+
var cn68 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10593
|
+
var Tabs = React89.forwardRef(
|
|
10422
10594
|
({
|
|
10423
10595
|
items,
|
|
10424
10596
|
value,
|
|
@@ -10429,19 +10601,19 @@ var Tabs = React88.forwardRef(
|
|
|
10429
10601
|
className,
|
|
10430
10602
|
...rest
|
|
10431
10603
|
}, ref) => {
|
|
10432
|
-
const baseId =
|
|
10433
|
-
const [inner, setInner] =
|
|
10604
|
+
const baseId = React89.useId();
|
|
10605
|
+
const [inner, setInner] = React89.useState(defaultValue ?? items[0]?.value);
|
|
10434
10606
|
const selected = value ?? inner;
|
|
10435
|
-
const tabRefs =
|
|
10436
|
-
const [indicator, setIndicator] =
|
|
10437
|
-
const measure =
|
|
10607
|
+
const tabRefs = React89.useRef({});
|
|
10608
|
+
const [indicator, setIndicator] = React89.useState(null);
|
|
10609
|
+
const measure = React89.useCallback(() => {
|
|
10438
10610
|
const el = selected ? tabRefs.current[selected] : null;
|
|
10439
10611
|
if (el) setIndicator({ left: el.offsetLeft, width: el.offsetWidth });
|
|
10440
10612
|
}, [selected]);
|
|
10441
|
-
|
|
10613
|
+
React89.useLayoutEffect(() => {
|
|
10442
10614
|
measure();
|
|
10443
10615
|
}, [measure, items]);
|
|
10444
|
-
|
|
10616
|
+
React89.useEffect(() => {
|
|
10445
10617
|
window.addEventListener("resize", measure);
|
|
10446
10618
|
const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(() => measure()) : null;
|
|
10447
10619
|
Object.values(tabRefs.current).forEach((el) => el && ro?.observe(el));
|
|
@@ -10471,17 +10643,17 @@ var Tabs = React88.forwardRef(
|
|
|
10471
10643
|
};
|
|
10472
10644
|
const tabId = (v) => `${baseId}-tab-${v}`;
|
|
10473
10645
|
const panelId = (v) => `${baseId}-panel-${v}`;
|
|
10474
|
-
return /* @__PURE__ */ (0,
|
|
10646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
10475
10647
|
"div",
|
|
10476
10648
|
{
|
|
10477
10649
|
ref,
|
|
10478
|
-
className:
|
|
10650
|
+
className: cn68(
|
|
10479
10651
|
"flex w-full min-w-0 flex-col rounded-lg border border-hairline bg-surface text-ink shadow-card",
|
|
10480
10652
|
className
|
|
10481
10653
|
),
|
|
10482
10654
|
...rest,
|
|
10483
10655
|
children: [
|
|
10484
|
-
/* @__PURE__ */ (0,
|
|
10656
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
10485
10657
|
"div",
|
|
10486
10658
|
{
|
|
10487
10659
|
role: "tablist",
|
|
@@ -10489,7 +10661,7 @@ var Tabs = React88.forwardRef(
|
|
|
10489
10661
|
onKeyDown,
|
|
10490
10662
|
className: "relative flex min-w-0 items-center gap-xs overflow-x-auto p-sm",
|
|
10491
10663
|
children: [
|
|
10492
|
-
/* @__PURE__ */ (0,
|
|
10664
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10493
10665
|
"span",
|
|
10494
10666
|
{
|
|
10495
10667
|
"aria-hidden": "true",
|
|
@@ -10503,7 +10675,7 @@ var Tabs = React88.forwardRef(
|
|
|
10503
10675
|
),
|
|
10504
10676
|
items.map((item) => {
|
|
10505
10677
|
const isSelected = item.value === selected;
|
|
10506
|
-
return /* @__PURE__ */ (0,
|
|
10678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10507
10679
|
Tab,
|
|
10508
10680
|
{
|
|
10509
10681
|
ref: (el) => {
|
|
@@ -10519,9 +10691,9 @@ var Tabs = React88.forwardRef(
|
|
|
10519
10691
|
disabled: item.disabled,
|
|
10520
10692
|
leadingIcon: item.icon,
|
|
10521
10693
|
onClick: () => select(item.value),
|
|
10522
|
-
children: /* @__PURE__ */ (0,
|
|
10694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("span", { className: "inline-flex items-center gap-sm", children: [
|
|
10523
10695
|
item.label,
|
|
10524
|
-
item.badge != null ? /* @__PURE__ */ (0,
|
|
10696
|
+
item.badge != null ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Badge, { size: "sm", tone: isSelected ? "primary" : "neutral", children: item.badge }) : null
|
|
10525
10697
|
] })
|
|
10526
10698
|
},
|
|
10527
10699
|
item.value
|
|
@@ -10532,7 +10704,7 @@ var Tabs = React88.forwardRef(
|
|
|
10532
10704
|
),
|
|
10533
10705
|
items.map((item) => {
|
|
10534
10706
|
const isSelected = item.value === selected;
|
|
10535
|
-
return /* @__PURE__ */ (0,
|
|
10707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10536
10708
|
"div",
|
|
10537
10709
|
{
|
|
10538
10710
|
id: panelId(item.value),
|
|
@@ -10554,26 +10726,26 @@ var Tabs = React88.forwardRef(
|
|
|
10554
10726
|
Tabs.displayName = "Tabs";
|
|
10555
10727
|
|
|
10556
10728
|
// virtual-pkg:src/atoms/TestimonialBlock/TestimonialBlock.tsx
|
|
10557
|
-
var
|
|
10558
|
-
var
|
|
10559
|
-
var
|
|
10729
|
+
var React90 = __toESM(require("react"));
|
|
10730
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
10731
|
+
var cn69 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10560
10732
|
function QuoteCard({ t }) {
|
|
10561
|
-
return /* @__PURE__ */ (0,
|
|
10562
|
-
/* @__PURE__ */ (0,
|
|
10733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("figure", { className: "m-0 flex h-full flex-col justify-between gap-base rounded-lg border border-hairline bg-canvas p-lg shadow-card", children: [
|
|
10734
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("blockquote", { className: "m-0", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("p", { className: "text-body-lg text-ink", children: [
|
|
10563
10735
|
"\u201C",
|
|
10564
10736
|
t.quote,
|
|
10565
10737
|
"\u201D"
|
|
10566
10738
|
] }) }),
|
|
10567
|
-
/* @__PURE__ */ (0,
|
|
10568
|
-
/* @__PURE__ */ (0,
|
|
10569
|
-
/* @__PURE__ */ (0,
|
|
10570
|
-
/* @__PURE__ */ (0,
|
|
10571
|
-
t.role ? /* @__PURE__ */ (0,
|
|
10739
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("figcaption", { className: "flex items-center gap-md", children: [
|
|
10740
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Avatar, { size: "lg", name: t.name, src: t.avatarSrc, alt: t.name }),
|
|
10741
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
10742
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "truncate text-body-sm font-weight-label text-ink", children: t.name }),
|
|
10743
|
+
t.role ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "truncate text-caption text-muted", children: t.role }) : null
|
|
10572
10744
|
] })
|
|
10573
10745
|
] })
|
|
10574
10746
|
] });
|
|
10575
10747
|
}
|
|
10576
|
-
var TestimonialBlock =
|
|
10748
|
+
var TestimonialBlock = React90.forwardRef(
|
|
10577
10749
|
({
|
|
10578
10750
|
testimonials = [],
|
|
10579
10751
|
logos,
|
|
@@ -10583,34 +10755,34 @@ var TestimonialBlock = React89.forwardRef(
|
|
|
10583
10755
|
...rest
|
|
10584
10756
|
}, ref) => {
|
|
10585
10757
|
const many = testimonials.length > 1;
|
|
10586
|
-
return /* @__PURE__ */ (0,
|
|
10758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
10587
10759
|
"section",
|
|
10588
10760
|
{
|
|
10589
10761
|
ref,
|
|
10590
10762
|
"aria-label": label,
|
|
10591
|
-
className:
|
|
10763
|
+
className: cn69("flex w-full flex-col gap-xl", className),
|
|
10592
10764
|
...rest,
|
|
10593
10765
|
children: [
|
|
10594
|
-
logos && logos.length ? /* @__PURE__ */ (0,
|
|
10595
|
-
/* @__PURE__ */ (0,
|
|
10596
|
-
/* @__PURE__ */ (0,
|
|
10766
|
+
logos && logos.length ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex flex-col items-center gap-lg py-base", children: [
|
|
10767
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "text-body-md text-muted", children: logosTitle }),
|
|
10768
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("ul", { className: "flex flex-wrap items-center justify-center gap-x-xl gap-y-base", children: logos.map((l) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("li", { className: "text-ink", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10597
10769
|
Logo,
|
|
10598
10770
|
{
|
|
10599
10771
|
size: "md",
|
|
10600
10772
|
name: l.name,
|
|
10601
|
-
mark: l.icon ? /* @__PURE__ */ (0,
|
|
10773
|
+
mark: l.icon ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { name: l.icon, size: 20 }) : void 0
|
|
10602
10774
|
}
|
|
10603
10775
|
) }, l.name)) })
|
|
10604
10776
|
] }) : null,
|
|
10605
|
-
testimonials.length ? /* @__PURE__ */ (0,
|
|
10777
|
+
testimonials.length ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10606
10778
|
"div",
|
|
10607
10779
|
{
|
|
10608
|
-
className:
|
|
10780
|
+
className: cn69(
|
|
10609
10781
|
"grid gap-gutter",
|
|
10610
10782
|
many ? "grid-cols-1 md:grid-cols-2" : "grid-cols-1",
|
|
10611
10783
|
testimonials.length > 2 && "lg:grid-cols-3"
|
|
10612
10784
|
),
|
|
10613
|
-
children: testimonials.map((t) => /* @__PURE__ */ (0,
|
|
10785
|
+
children: testimonials.map((t) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(QuoteCard, { t }, t.id))
|
|
10614
10786
|
}
|
|
10615
10787
|
) : null
|
|
10616
10788
|
]
|
|
@@ -10621,10 +10793,10 @@ var TestimonialBlock = React89.forwardRef(
|
|
|
10621
10793
|
TestimonialBlock.displayName = "TestimonialBlock";
|
|
10622
10794
|
|
|
10623
10795
|
// virtual-pkg:src/atoms/Toast/Toast.tsx
|
|
10624
|
-
var
|
|
10796
|
+
var React91 = __toESM(require("react"));
|
|
10625
10797
|
var import_react_dom10 = require("react-dom");
|
|
10626
|
-
var
|
|
10627
|
-
var
|
|
10798
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
10799
|
+
var cn70 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10628
10800
|
var toneIcon2 = {
|
|
10629
10801
|
success: { name: "circle-check", color: "text-inverse-ink" },
|
|
10630
10802
|
error: { name: "circle-x", color: "text-semantic-error" },
|
|
@@ -10634,7 +10806,7 @@ var placementClass = {
|
|
|
10634
10806
|
"bottom-center": "fixed bottom-lg left-1/2 -translate-x-1/2 w-[calc(100%-2rem)] sm:w-auto sm:min-w-[22rem]",
|
|
10635
10807
|
"bottom-right": "fixed bottom-lg right-lg left-lg sm:left-auto sm:min-w-[22rem]"
|
|
10636
10808
|
};
|
|
10637
|
-
var Toast =
|
|
10809
|
+
var Toast = React91.forwardRef(
|
|
10638
10810
|
({
|
|
10639
10811
|
open = true,
|
|
10640
10812
|
onOpenChange,
|
|
@@ -10648,24 +10820,24 @@ var Toast = React90.forwardRef(
|
|
|
10648
10820
|
className,
|
|
10649
10821
|
...rest
|
|
10650
10822
|
}, ref) => {
|
|
10651
|
-
const [mounted, setMounted] =
|
|
10652
|
-
|
|
10653
|
-
|
|
10823
|
+
const [mounted, setMounted] = React91.useState(false);
|
|
10824
|
+
React91.useEffect(() => setMounted(true), []);
|
|
10825
|
+
React91.useEffect(() => {
|
|
10654
10826
|
if (!open || !duration || !onOpenChange) return;
|
|
10655
10827
|
const t = window.setTimeout(() => onOpenChange(false), duration);
|
|
10656
10828
|
return () => window.clearTimeout(t);
|
|
10657
10829
|
}, [open, duration, onOpenChange]);
|
|
10658
10830
|
const glyph2 = toneIcon2[tone];
|
|
10659
10831
|
const floating = placement !== "inline";
|
|
10660
|
-
const card = /* @__PURE__ */ (0,
|
|
10832
|
+
const card = /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10661
10833
|
"div",
|
|
10662
10834
|
{
|
|
10663
|
-
className:
|
|
10835
|
+
className: cn70(
|
|
10664
10836
|
floating ? placementClass[placement] : "w-full",
|
|
10665
10837
|
"pointer-events-none"
|
|
10666
10838
|
),
|
|
10667
10839
|
style: { zIndex: open ? "var(--z-toast, 1400)" : void 0 },
|
|
10668
|
-
children: /* @__PURE__ */ (0,
|
|
10840
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
10669
10841
|
"div",
|
|
10670
10842
|
{
|
|
10671
10843
|
ref,
|
|
@@ -10676,16 +10848,16 @@ var Toast = React90.forwardRef(
|
|
|
10676
10848
|
onKeyDown: (e) => {
|
|
10677
10849
|
if (e.key === "Escape") onOpenChange?.(false);
|
|
10678
10850
|
},
|
|
10679
|
-
className:
|
|
10851
|
+
className: cn70(
|
|
10680
10852
|
"flex min-h-11 w-full items-center gap-md rounded-lg bg-inverse-canvas py-sm pl-base pr-sm text-inverse-ink shadow-overlay",
|
|
10681
10853
|
"transition duration-200 ease-out data-[state=open]:pointer-events-auto data-[state=open]:translate-y-0 data-[state=open]:opacity-100 data-[state=closed]:translate-y-2 data-[state=closed]:opacity-0",
|
|
10682
10854
|
className
|
|
10683
10855
|
),
|
|
10684
10856
|
...rest,
|
|
10685
10857
|
children: [
|
|
10686
|
-
/* @__PURE__ */ (0,
|
|
10687
|
-
/* @__PURE__ */ (0,
|
|
10688
|
-
actionLabel ? /* @__PURE__ */ (0,
|
|
10858
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Icon, { name: icon ?? glyph2.name, size: 18, className: cn70("shrink-0", glyph2.color) }),
|
|
10859
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "min-w-0 flex-1 py-xxs text-body-md text-inverse-ink [&_strong]:font-weight-label", children: title }),
|
|
10860
|
+
actionLabel ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10689
10861
|
Button,
|
|
10690
10862
|
{
|
|
10691
10863
|
variant: "ghost",
|
|
@@ -10698,7 +10870,7 @@ var Toast = React90.forwardRef(
|
|
|
10698
10870
|
className: "shrink-0 text-inverse-ink enabled:hover:bg-inverse-ink/10 enabled:hover:text-inverse-ink",
|
|
10699
10871
|
children: actionLabel
|
|
10700
10872
|
}
|
|
10701
|
-
) : /* @__PURE__ */ (0,
|
|
10873
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "w-xs shrink-0", "aria-hidden": "true" })
|
|
10702
10874
|
]
|
|
10703
10875
|
}
|
|
10704
10876
|
)
|
|
@@ -10713,8 +10885,8 @@ Toast.displayName = "Toast";
|
|
|
10713
10885
|
|
|
10714
10886
|
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
10715
10887
|
var import_react7 = __toESM(require("react"));
|
|
10716
|
-
var
|
|
10717
|
-
function
|
|
10888
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
10889
|
+
function cn71(...parts) {
|
|
10718
10890
|
return parts.filter(Boolean).join(" ");
|
|
10719
10891
|
}
|
|
10720
10892
|
var variantClass = {
|
|
@@ -10763,11 +10935,11 @@ var toneClass2 = {
|
|
|
10763
10935
|
var Typography = import_react7.default.forwardRef(
|
|
10764
10936
|
({ variant = "body", as, tone, truncate = false, className, children, ...rest }, ref) => {
|
|
10765
10937
|
const Component = as ?? defaultElement[variant];
|
|
10766
|
-
return /* @__PURE__ */ (0,
|
|
10938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10767
10939
|
Component,
|
|
10768
10940
|
{
|
|
10769
10941
|
ref,
|
|
10770
|
-
className:
|
|
10942
|
+
className: cn71(
|
|
10771
10943
|
"m-0",
|
|
10772
10944
|
variantClass[variant],
|
|
10773
10945
|
toneClass2[tone ?? defaultTone[variant]],
|
|
@@ -10783,10 +10955,10 @@ var Typography = import_react7.default.forwardRef(
|
|
|
10783
10955
|
Typography.displayName = "Typography";
|
|
10784
10956
|
|
|
10785
10957
|
// virtual-pkg:src/atoms/Wizard/Wizard.tsx
|
|
10786
|
-
var
|
|
10787
|
-
var
|
|
10788
|
-
var
|
|
10789
|
-
var Wizard =
|
|
10958
|
+
var React93 = __toESM(require("react"));
|
|
10959
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
10960
|
+
var cn72 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10961
|
+
var Wizard = React93.forwardRef(
|
|
10790
10962
|
({
|
|
10791
10963
|
title,
|
|
10792
10964
|
description,
|
|
@@ -10805,8 +10977,8 @@ var Wizard = React92.forwardRef(
|
|
|
10805
10977
|
className,
|
|
10806
10978
|
...rest
|
|
10807
10979
|
}, ref) => {
|
|
10808
|
-
const titleId =
|
|
10809
|
-
const [inner, setInner] =
|
|
10980
|
+
const titleId = React93.useId();
|
|
10981
|
+
const [inner, setInner] = React93.useState(defaultStep);
|
|
10810
10982
|
const step = stepProp ?? inner;
|
|
10811
10983
|
const go = (next) => {
|
|
10812
10984
|
const clamped = Math.max(0, Math.min(steps.length, next));
|
|
@@ -10817,49 +10989,49 @@ var Wizard = React92.forwardRef(
|
|
|
10817
10989
|
const current = steps[step];
|
|
10818
10990
|
const blocked = !reviewing && current?.canContinue === false;
|
|
10819
10991
|
const statusOf = (i) => i < step ? "complete" : i === step ? "active" : "upcoming";
|
|
10820
|
-
return /* @__PURE__ */ (0,
|
|
10992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { ref, className: cn72("w-full", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
10821
10993
|
"section",
|
|
10822
10994
|
{
|
|
10823
10995
|
"aria-labelledby": titleId,
|
|
10824
|
-
className:
|
|
10996
|
+
className: cn72(
|
|
10825
10997
|
"mx-auto flex w-full flex-col gap-lg text-ink",
|
|
10826
10998
|
chrome === "card" && "rounded-xl border border-hairline bg-canvas p-lg shadow-card"
|
|
10827
10999
|
),
|
|
10828
11000
|
children: [
|
|
10829
|
-
/* @__PURE__ */ (0,
|
|
10830
|
-
/* @__PURE__ */ (0,
|
|
10831
|
-
(description || docsHref) && /* @__PURE__ */ (0,
|
|
11001
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("header", { className: "flex flex-col gap-xs", children: [
|
|
11002
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("h2", { id: titleId, className: "text-heading-md font-weight-heading-sm text-ink", children: title }),
|
|
11003
|
+
(description || docsHref) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("p", { className: "text-body-sm text-muted", children: [
|
|
10832
11004
|
description,
|
|
10833
11005
|
" ",
|
|
10834
|
-
docsHref && /* @__PURE__ */ (0,
|
|
11006
|
+
docsHref && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Link, { href: docsHref, variant: "standalone", arrow: true, external: true, children: docsLabel })
|
|
10835
11007
|
] })
|
|
10836
11008
|
] }),
|
|
10837
|
-
/* @__PURE__ */ (0,
|
|
11009
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("ol", { className: "flex flex-col", "aria-label": "Steps", children: steps.map((s, i) => {
|
|
10838
11010
|
const status = statusOf(i);
|
|
10839
11011
|
const active = status === "active";
|
|
10840
|
-
return /* @__PURE__ */ (0,
|
|
11012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10841
11013
|
StepperItem,
|
|
10842
11014
|
{
|
|
10843
11015
|
status,
|
|
10844
11016
|
title: s.title,
|
|
10845
11017
|
meta: active ? s.description : status === "complete" ? s.summary : void 0,
|
|
10846
11018
|
connector: i < steps.length - 1,
|
|
10847
|
-
children: s.content ? /* @__PURE__ */ (0,
|
|
11019
|
+
children: s.content ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10848
11020
|
"div",
|
|
10849
11021
|
{
|
|
10850
11022
|
"data-state": active ? "open" : "closed",
|
|
10851
11023
|
"aria-hidden": active ? void 0 : true,
|
|
10852
11024
|
className: "grid transition-[grid-template-rows,opacity] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=open]:opacity-100 data-[state=closed]:grid-rows-[0fr] data-[state=closed]:opacity-0",
|
|
10853
|
-
children: /* @__PURE__ */ (0,
|
|
11025
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: active ? "pb-xs" : "invisible", children: s.content }) })
|
|
10854
11026
|
}
|
|
10855
11027
|
) : null
|
|
10856
11028
|
},
|
|
10857
11029
|
s.id
|
|
10858
11030
|
);
|
|
10859
11031
|
}) }),
|
|
10860
|
-
/* @__PURE__ */ (0,
|
|
10861
|
-
step > 0 && /* @__PURE__ */ (0,
|
|
10862
|
-
reviewing ? /* @__PURE__ */ (0,
|
|
11032
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("footer", { className: "flex items-center justify-end gap-sm", children: [
|
|
11033
|
+
step > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { variant: "secondary", onClick: () => go(step - 1), disabled: submitting, children: backLabel }),
|
|
11034
|
+
reviewing ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { variant: "primary", loading: submitting, onClick: onComplete, children: completeLabel }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { variant: "primary", disabled: blocked, onClick: () => go(step + 1), children: continueLabel })
|
|
10863
11035
|
] })
|
|
10864
11036
|
]
|
|
10865
11037
|
}
|