@designa8/vibedesign-linear-internal-v1-b737 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +906 -802
- package/dist/index.js +934 -830
- package/dist/styles.css +17 -0
- package/package.json +6 -1
- package/src/atoms/DesignSystemLoader/DesignSystemLoader.tsx +139 -0
- package/src/atoms/DesignSystemLoader/index.ts +2 -0
- package/src/atoms/DesignSystemLoader/preview.tsx +19 -0
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -5334,18 +5334,121 @@ var DateRangePicker = React43.forwardRef(
|
|
|
5334
5334
|
);
|
|
5335
5335
|
DateRangePicker.displayName = "DateRangePicker";
|
|
5336
5336
|
|
|
5337
|
-
// virtual-pkg:src/atoms/
|
|
5337
|
+
// virtual-pkg:src/atoms/DesignSystemLoader/DesignSystemLoader.tsx
|
|
5338
5338
|
import * as React44 from "react";
|
|
5339
5339
|
import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5340
|
+
var GRID = 9;
|
|
5341
|
+
var SWEEP_MS = 2400;
|
|
5342
|
+
var STEP_MS = 35;
|
|
5343
|
+
var SPARKLES = [
|
|
5344
|
+
{ top: "0%", left: "14%", size: 10, delay: "0ms" },
|
|
5345
|
+
{ top: "2%", left: "46%", size: 8, delay: "150ms" },
|
|
5346
|
+
{ top: "1%", left: "78%", size: 9, delay: "75ms" },
|
|
5347
|
+
{ top: "30%", left: "0%", size: 7, delay: "300ms" },
|
|
5348
|
+
{ top: "58%", left: "97%", size: 8, delay: "125ms" },
|
|
5349
|
+
{ top: "96%", left: "20%", size: 8, delay: "225ms" },
|
|
5350
|
+
{ top: "93%", left: "62%", size: 10, delay: "375ms" }
|
|
5351
|
+
];
|
|
5352
|
+
var KEYFRAMES = `
|
|
5353
|
+
@keyframes dsl-twinkle {
|
|
5354
|
+
0%, 100% { opacity: 0.2; transform: scale(0.85); }
|
|
5355
|
+
50% { opacity: 0.9; transform: scale(1.1); }
|
|
5356
|
+
}
|
|
5357
|
+
@keyframes dsl-cell {
|
|
5358
|
+
0% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 1; }
|
|
5359
|
+
8% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 0.8; }
|
|
5360
|
+
18% { background-color: var(--color-primary-soft); border-color: transparent; border-style: solid; opacity: 1; }
|
|
5361
|
+
30% { background-color: var(--color-primary-soft); border-color: transparent; border-style: solid; opacity: 0.55; }
|
|
5362
|
+
45% { background-color: var(--color-surface-soft); border-color: var(--color-hairline); border-style: solid; opacity: 1; }
|
|
5363
|
+
62% { background-color: transparent; border-color: var(--color-hairline-strong); border-style: dashed; opacity: 1; }
|
|
5364
|
+
82% { background-color: transparent; border-color: var(--color-hairline-strong); border-style: dashed; opacity: 1; }
|
|
5365
|
+
100% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 1; }
|
|
5366
|
+
}
|
|
5367
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5368
|
+
.dsl-animate { animation: none !important; }
|
|
5369
|
+
}
|
|
5370
|
+
`;
|
|
5371
|
+
var DesignSystemLoader = React44.forwardRef(
|
|
5372
|
+
({
|
|
5373
|
+
label = "Loading design system\u2026",
|
|
5374
|
+
sublabel = "Building your component library",
|
|
5375
|
+
className,
|
|
5376
|
+
...rest
|
|
5377
|
+
}, ref) => /* @__PURE__ */ jsxs38(
|
|
5378
|
+
"div",
|
|
5379
|
+
{
|
|
5380
|
+
ref,
|
|
5381
|
+
role: "status",
|
|
5382
|
+
"aria-live": "polite",
|
|
5383
|
+
"aria-busy": "true",
|
|
5384
|
+
className: [
|
|
5385
|
+
"mx-auto flex w-full max-w-3xl flex-col items-center justify-center gap-xl bg-canvas px-lg py-xxl text-center",
|
|
5386
|
+
className
|
|
5387
|
+
].filter(Boolean).join(" "),
|
|
5388
|
+
...rest,
|
|
5389
|
+
children: [
|
|
5390
|
+
/* @__PURE__ */ jsx44("style", { children: KEYFRAMES }),
|
|
5391
|
+
/* @__PURE__ */ jsxs38("div", { className: "relative mx-auto w-full max-w-drawer", children: [
|
|
5392
|
+
/* @__PURE__ */ jsx44("div", { className: "pointer-events-none absolute -inset-md", "aria-hidden": "true", children: SPARKLES.map((sparkle) => /* @__PURE__ */ jsx44(
|
|
5393
|
+
Icon,
|
|
5394
|
+
{
|
|
5395
|
+
name: "sparkles",
|
|
5396
|
+
size: sparkle.size,
|
|
5397
|
+
className: "dsl-animate absolute text-primary opacity-30",
|
|
5398
|
+
style: {
|
|
5399
|
+
top: sparkle.top,
|
|
5400
|
+
left: sparkle.left,
|
|
5401
|
+
animation: `dsl-twinkle 1.6s ease-in-out ${sparkle.delay} infinite`
|
|
5402
|
+
}
|
|
5403
|
+
},
|
|
5404
|
+
`${sparkle.top}-${sparkle.left}`
|
|
5405
|
+
)) }),
|
|
5406
|
+
/* @__PURE__ */ jsx44(
|
|
5407
|
+
"div",
|
|
5408
|
+
{
|
|
5409
|
+
className: "relative grid gap-xxs",
|
|
5410
|
+
"aria-hidden": "true",
|
|
5411
|
+
style: { gridTemplateColumns: `repeat(${GRID}, minmax(0, 1fr))` },
|
|
5412
|
+
children: Array.from({ length: GRID * GRID }, (_, index) => {
|
|
5413
|
+
const row = Math.floor(index / GRID);
|
|
5414
|
+
const col = index % GRID;
|
|
5415
|
+
const diagonal = row + (GRID - 1 - col);
|
|
5416
|
+
return /* @__PURE__ */ jsx44(
|
|
5417
|
+
"span",
|
|
5418
|
+
{
|
|
5419
|
+
className: "dsl-animate aspect-square rounded-xs border-2 border-transparent bg-primary",
|
|
5420
|
+
style: {
|
|
5421
|
+
animation: `dsl-cell ${SWEEP_MS}ms ease-in-out ${diagonal * STEP_MS}ms infinite both`
|
|
5422
|
+
}
|
|
5423
|
+
},
|
|
5424
|
+
index
|
|
5425
|
+
);
|
|
5426
|
+
})
|
|
5427
|
+
}
|
|
5428
|
+
)
|
|
5429
|
+
] }),
|
|
5430
|
+
/* @__PURE__ */ jsxs38("div", { className: "mx-auto flex w-full max-w-drawer flex-col items-center gap-xs", children: [
|
|
5431
|
+
/* @__PURE__ */ jsx44("p", { className: "text-heading-sm text-ink", children: label }),
|
|
5432
|
+
/* @__PURE__ */ jsx44("p", { className: "text-body-sm text-muted", children: sublabel })
|
|
5433
|
+
] })
|
|
5434
|
+
]
|
|
5435
|
+
}
|
|
5436
|
+
)
|
|
5437
|
+
);
|
|
5438
|
+
DesignSystemLoader.displayName = "DesignSystemLoader";
|
|
5439
|
+
|
|
5440
|
+
// virtual-pkg:src/atoms/Divider/Divider.tsx
|
|
5441
|
+
import * as React45 from "react";
|
|
5442
|
+
import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5340
5443
|
var LINE = {
|
|
5341
5444
|
default: "bg-hairline",
|
|
5342
5445
|
soft: "bg-hairline-soft",
|
|
5343
5446
|
strong: "bg-hairline-strong"
|
|
5344
5447
|
};
|
|
5345
|
-
var Divider =
|
|
5448
|
+
var Divider = React45.forwardRef(
|
|
5346
5449
|
({ orientation = "horizontal", label, labelAlign = "center", tone = "default", className, ...rest }, ref) => {
|
|
5347
5450
|
if (orientation === "vertical") {
|
|
5348
|
-
return /* @__PURE__ */
|
|
5451
|
+
return /* @__PURE__ */ jsx45(
|
|
5349
5452
|
"div",
|
|
5350
5453
|
{
|
|
5351
5454
|
ref,
|
|
@@ -5357,7 +5460,7 @@ var Divider = React44.forwardRef(
|
|
|
5357
5460
|
);
|
|
5358
5461
|
}
|
|
5359
5462
|
if (label) {
|
|
5360
|
-
return /* @__PURE__ */
|
|
5463
|
+
return /* @__PURE__ */ jsxs39(
|
|
5361
5464
|
"div",
|
|
5362
5465
|
{
|
|
5363
5466
|
ref,
|
|
@@ -5366,7 +5469,7 @@ var Divider = React44.forwardRef(
|
|
|
5366
5469
|
className: ["flex w-full items-center gap-md rounded-none", className].filter(Boolean).join(" "),
|
|
5367
5470
|
...rest,
|
|
5368
5471
|
children: [
|
|
5369
|
-
/* @__PURE__ */
|
|
5472
|
+
/* @__PURE__ */ jsx45(
|
|
5370
5473
|
"span",
|
|
5371
5474
|
{
|
|
5372
5475
|
"aria-hidden": "true",
|
|
@@ -5377,13 +5480,13 @@ var Divider = React44.forwardRef(
|
|
|
5377
5480
|
].join(" ")
|
|
5378
5481
|
}
|
|
5379
5482
|
),
|
|
5380
|
-
/* @__PURE__ */
|
|
5381
|
-
/* @__PURE__ */
|
|
5483
|
+
/* @__PURE__ */ jsx45("span", { className: "shrink-0 text-body-sm text-body", children: label }),
|
|
5484
|
+
/* @__PURE__ */ jsx45("span", { "aria-hidden": "true", className: ["h-px flex-1 rounded-none", LINE[tone]].join(" ") })
|
|
5382
5485
|
]
|
|
5383
5486
|
}
|
|
5384
5487
|
);
|
|
5385
5488
|
}
|
|
5386
|
-
return /* @__PURE__ */
|
|
5489
|
+
return /* @__PURE__ */ jsx45(
|
|
5387
5490
|
"div",
|
|
5388
5491
|
{
|
|
5389
5492
|
ref,
|
|
@@ -5398,11 +5501,11 @@ var Divider = React44.forwardRef(
|
|
|
5398
5501
|
Divider.displayName = "Divider";
|
|
5399
5502
|
|
|
5400
5503
|
// virtual-pkg:src/atoms/Drawer/Drawer.tsx
|
|
5401
|
-
import * as
|
|
5504
|
+
import * as React46 from "react";
|
|
5402
5505
|
import { createPortal as createPortal5 } from "react-dom";
|
|
5403
|
-
import { jsx as
|
|
5506
|
+
import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5404
5507
|
var cn35 = (...parts) => parts.filter(Boolean).join(" ");
|
|
5405
|
-
var Drawer =
|
|
5508
|
+
var Drawer = React46.forwardRef(
|
|
5406
5509
|
({
|
|
5407
5510
|
open,
|
|
5408
5511
|
onOpenChange,
|
|
@@ -5420,11 +5523,11 @@ var Drawer = React45.forwardRef(
|
|
|
5420
5523
|
children,
|
|
5421
5524
|
...rest
|
|
5422
5525
|
}, ref) => {
|
|
5423
|
-
const titleId =
|
|
5424
|
-
const panelRef =
|
|
5425
|
-
const [mounted, setMounted] =
|
|
5426
|
-
|
|
5427
|
-
|
|
5526
|
+
const titleId = React46.useId();
|
|
5527
|
+
const panelRef = React46.useRef(null);
|
|
5528
|
+
const [mounted, setMounted] = React46.useState(false);
|
|
5529
|
+
React46.useEffect(() => setMounted(true), []);
|
|
5530
|
+
React46.useEffect(() => {
|
|
5428
5531
|
if (!open) return;
|
|
5429
5532
|
const onKey = (e) => {
|
|
5430
5533
|
if (e.key === "Escape") onOpenChange(false);
|
|
@@ -5452,7 +5555,7 @@ var Drawer = React45.forwardRef(
|
|
|
5452
5555
|
}, [open, onOpenChange, closeOnScrimClick]);
|
|
5453
5556
|
const state = open ? "open" : "closed";
|
|
5454
5557
|
const hasTitle = title !== void 0 && title !== null;
|
|
5455
|
-
const node = /* @__PURE__ */
|
|
5558
|
+
const node = /* @__PURE__ */ jsxs40(
|
|
5456
5559
|
"div",
|
|
5457
5560
|
{
|
|
5458
5561
|
"data-state": state,
|
|
@@ -5460,7 +5563,7 @@ var Drawer = React45.forwardRef(
|
|
|
5460
5563
|
style: { zIndex: "var(--z-modal, 1200)" },
|
|
5461
5564
|
"aria-hidden": open ? void 0 : true,
|
|
5462
5565
|
children: [
|
|
5463
|
-
/* @__PURE__ */
|
|
5566
|
+
/* @__PURE__ */ jsx46(
|
|
5464
5567
|
"div",
|
|
5465
5568
|
{
|
|
5466
5569
|
"data-state": state,
|
|
@@ -5468,7 +5571,7 @@ var Drawer = React45.forwardRef(
|
|
|
5468
5571
|
className: "fixed inset-0 bg-scrim/40 transition-opacity duration-200 ease-out data-[state=open]:opacity-100 data-[state=closed]:opacity-0"
|
|
5469
5572
|
}
|
|
5470
5573
|
),
|
|
5471
|
-
/* @__PURE__ */
|
|
5574
|
+
/* @__PURE__ */ jsxs40(
|
|
5472
5575
|
"div",
|
|
5473
5576
|
{
|
|
5474
5577
|
ref: (el) => {
|
|
@@ -5491,12 +5594,12 @@ var Drawer = React45.forwardRef(
|
|
|
5491
5594
|
),
|
|
5492
5595
|
...rest,
|
|
5493
5596
|
children: [
|
|
5494
|
-
!hideHeader && /* @__PURE__ */
|
|
5495
|
-
/* @__PURE__ */
|
|
5597
|
+
!hideHeader && /* @__PURE__ */ jsxs40("div", { className: "flex shrink-0 items-center justify-between gap-sm px-base pb-sm pt-base", children: [
|
|
5598
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex min-w-0 flex-1 items-center gap-sm", children: [
|
|
5496
5599
|
headerStart,
|
|
5497
|
-
hasTitle && /* @__PURE__ */
|
|
5600
|
+
hasTitle && /* @__PURE__ */ jsx46("h2", { id: titleId, className: "truncate text-heading-sm text-ink", children: title })
|
|
5498
5601
|
] }),
|
|
5499
|
-
/* @__PURE__ */
|
|
5602
|
+
/* @__PURE__ */ jsx46(
|
|
5500
5603
|
IconButton,
|
|
5501
5604
|
{
|
|
5502
5605
|
icon: closeIcon,
|
|
@@ -5507,7 +5610,7 @@ var Drawer = React45.forwardRef(
|
|
|
5507
5610
|
}
|
|
5508
5611
|
)
|
|
5509
5612
|
] }),
|
|
5510
|
-
/* @__PURE__ */
|
|
5613
|
+
/* @__PURE__ */ jsx46(
|
|
5511
5614
|
"div",
|
|
5512
5615
|
{
|
|
5513
5616
|
className: cn35(
|
|
@@ -5517,7 +5620,7 @@ var Drawer = React45.forwardRef(
|
|
|
5517
5620
|
children
|
|
5518
5621
|
}
|
|
5519
5622
|
),
|
|
5520
|
-
footer && /* @__PURE__ */
|
|
5623
|
+
footer && /* @__PURE__ */ jsx46("div", { className: "flex shrink-0 items-center justify-end gap-sm border-t border-hairline px-base py-md", children: footer })
|
|
5521
5624
|
]
|
|
5522
5625
|
}
|
|
5523
5626
|
)
|
|
@@ -5530,14 +5633,14 @@ var Drawer = React45.forwardRef(
|
|
|
5530
5633
|
Drawer.displayName = "Drawer";
|
|
5531
5634
|
|
|
5532
5635
|
// virtual-pkg:src/atoms/DropdownMenu/DropdownMenu.tsx
|
|
5533
|
-
import * as
|
|
5636
|
+
import * as React48 from "react";
|
|
5534
5637
|
import { createPortal as createPortal6 } from "react-dom";
|
|
5535
5638
|
|
|
5536
5639
|
// virtual-pkg:src/atoms/MenuItem/MenuItem.tsx
|
|
5537
|
-
import * as
|
|
5538
|
-
import { jsx as
|
|
5640
|
+
import * as React47 from "react";
|
|
5641
|
+
import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5539
5642
|
var cn36 = (...parts) => parts.filter(Boolean).join(" ");
|
|
5540
|
-
var MenuItem =
|
|
5643
|
+
var MenuItem = React47.forwardRef(
|
|
5541
5644
|
({
|
|
5542
5645
|
icon,
|
|
5543
5646
|
shortcut,
|
|
@@ -5550,7 +5653,7 @@ var MenuItem = React46.forwardRef(
|
|
|
5550
5653
|
...rest
|
|
5551
5654
|
}, ref) => {
|
|
5552
5655
|
const destructive = tone === "destructive";
|
|
5553
|
-
return /* @__PURE__ */
|
|
5656
|
+
return /* @__PURE__ */ jsxs41(
|
|
5554
5657
|
"button",
|
|
5555
5658
|
{
|
|
5556
5659
|
ref,
|
|
@@ -5568,7 +5671,7 @@ var MenuItem = React46.forwardRef(
|
|
|
5568
5671
|
),
|
|
5569
5672
|
...rest,
|
|
5570
5673
|
children: [
|
|
5571
|
-
icon && /* @__PURE__ */
|
|
5674
|
+
icon && /* @__PURE__ */ jsx47(
|
|
5572
5675
|
Icon,
|
|
5573
5676
|
{
|
|
5574
5677
|
name: icon,
|
|
@@ -5576,14 +5679,14 @@ var MenuItem = React46.forwardRef(
|
|
|
5576
5679
|
className: destructive ? "text-semantic-error" : "text-body"
|
|
5577
5680
|
}
|
|
5578
5681
|
),
|
|
5579
|
-
/* @__PURE__ */
|
|
5580
|
-
shortcut && shortcut.length > 0 && /* @__PURE__ */
|
|
5682
|
+
/* @__PURE__ */ jsx47("span", { className: "min-w-0 flex-1 truncate", children }),
|
|
5683
|
+
shortcut && shortcut.length > 0 && /* @__PURE__ */ jsx47(
|
|
5581
5684
|
"span",
|
|
5582
5685
|
{
|
|
5583
5686
|
className: "ml-auto inline-flex shrink-0 items-center gap-xs text-body-sm text-muted",
|
|
5584
5687
|
"aria-label": `Shortcut ${shortcut.join(" ")}`,
|
|
5585
5688
|
children: shortcut.map(
|
|
5586
|
-
(key) => key === "command" ? /* @__PURE__ */
|
|
5689
|
+
(key) => key === "command" ? /* @__PURE__ */ jsx47(Icon, { name: "command", size: 13 }, key) : /* @__PURE__ */ jsx47("kbd", { className: "font-[inherit]", children: key }, key)
|
|
5587
5690
|
)
|
|
5588
5691
|
}
|
|
5589
5692
|
)
|
|
@@ -5595,13 +5698,13 @@ var MenuItem = React46.forwardRef(
|
|
|
5595
5698
|
MenuItem.displayName = "MenuItem";
|
|
5596
5699
|
|
|
5597
5700
|
// virtual-pkg:src/atoms/DropdownMenu/DropdownMenu.tsx
|
|
5598
|
-
import { jsx as
|
|
5701
|
+
import { jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5599
5702
|
var cn37 = (...parts) => parts.filter(Boolean).join(" ");
|
|
5600
5703
|
var isSeparator = (item) => item.type === "separator";
|
|
5601
5704
|
var isLabel = (item) => item.type === "label";
|
|
5602
5705
|
var EDGE = 8;
|
|
5603
5706
|
var GAP = 4;
|
|
5604
|
-
var DropdownMenu =
|
|
5707
|
+
var DropdownMenu = React48.forwardRef(
|
|
5605
5708
|
({
|
|
5606
5709
|
trigger,
|
|
5607
5710
|
items,
|
|
@@ -5614,33 +5717,33 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5614
5717
|
"aria-label": ariaLabel,
|
|
5615
5718
|
className
|
|
5616
5719
|
}, forwardedRef) => {
|
|
5617
|
-
const autoId =
|
|
5720
|
+
const autoId = React48.useId();
|
|
5618
5721
|
const panelId = `dropdown-menu-${autoId}`;
|
|
5619
|
-
const triggerRef =
|
|
5620
|
-
const panelRef =
|
|
5621
|
-
const itemRefs =
|
|
5622
|
-
const openedRef =
|
|
5623
|
-
const suppressFocusRef =
|
|
5624
|
-
const [mounted, setMounted] =
|
|
5625
|
-
const [innerOpen, setInnerOpen] =
|
|
5626
|
-
const [pos, setPos] =
|
|
5722
|
+
const triggerRef = React48.useRef(null);
|
|
5723
|
+
const panelRef = React48.useRef(null);
|
|
5724
|
+
const itemRefs = React48.useRef([]);
|
|
5725
|
+
const openedRef = React48.useRef(false);
|
|
5726
|
+
const suppressFocusRef = React48.useRef(false);
|
|
5727
|
+
const [mounted, setMounted] = React48.useState(false);
|
|
5728
|
+
const [innerOpen, setInnerOpen] = React48.useState(defaultOpen);
|
|
5729
|
+
const [pos, setPos] = React48.useState(null);
|
|
5627
5730
|
const open = openProp ?? innerOpen;
|
|
5628
|
-
|
|
5629
|
-
const setOpen =
|
|
5731
|
+
React48.useEffect(() => setMounted(true), []);
|
|
5732
|
+
const setOpen = React48.useCallback(
|
|
5630
5733
|
(next) => {
|
|
5631
5734
|
if (openProp === void 0) setInnerOpen(next);
|
|
5632
5735
|
onOpenChange?.(next);
|
|
5633
5736
|
},
|
|
5634
5737
|
[openProp, onOpenChange]
|
|
5635
5738
|
);
|
|
5636
|
-
const focusable =
|
|
5739
|
+
const focusable = React48.useMemo(
|
|
5637
5740
|
() => items.reduce((acc, item, index) => {
|
|
5638
5741
|
if (!isSeparator(item) && !isLabel(item) && !item.disabled) acc.push(index);
|
|
5639
5742
|
return acc;
|
|
5640
5743
|
}, []),
|
|
5641
5744
|
[items]
|
|
5642
5745
|
);
|
|
5643
|
-
const place2 =
|
|
5746
|
+
const place2 = React48.useCallback(() => {
|
|
5644
5747
|
const node = triggerRef.current;
|
|
5645
5748
|
const panel2 = panelRef.current;
|
|
5646
5749
|
if (!node || !panel2) return;
|
|
@@ -5660,7 +5763,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5660
5763
|
left = Math.max(EDGE, Math.min(left, Math.max(EDGE, vw - EDGE - width)));
|
|
5661
5764
|
setPos({ top, left });
|
|
5662
5765
|
}, [align, side]);
|
|
5663
|
-
|
|
5766
|
+
React48.useLayoutEffect(() => {
|
|
5664
5767
|
if (!open) return;
|
|
5665
5768
|
place2();
|
|
5666
5769
|
const frame2 = window.requestAnimationFrame(place2);
|
|
@@ -5672,7 +5775,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5672
5775
|
window.removeEventListener("scroll", place2, true);
|
|
5673
5776
|
};
|
|
5674
5777
|
}, [open, place2]);
|
|
5675
|
-
|
|
5778
|
+
React48.useEffect(() => {
|
|
5676
5779
|
if (open && !openedRef.current) {
|
|
5677
5780
|
openedRef.current = true;
|
|
5678
5781
|
const first = focusable.length > 0 ? itemRefs.current[focusable[0]] : null;
|
|
@@ -5683,7 +5786,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5683
5786
|
else triggerRef.current?.focus({ preventScroll: true });
|
|
5684
5787
|
}
|
|
5685
5788
|
}, [open, focusable]);
|
|
5686
|
-
|
|
5789
|
+
React48.useEffect(() => {
|
|
5687
5790
|
if (!open) return;
|
|
5688
5791
|
const onPointerDown = (event) => {
|
|
5689
5792
|
const target = event.target;
|
|
@@ -5761,7 +5864,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5761
5864
|
ref.current = node;
|
|
5762
5865
|
}
|
|
5763
5866
|
};
|
|
5764
|
-
const triggerNode =
|
|
5867
|
+
const triggerNode = React48.cloneElement(trigger, {
|
|
5765
5868
|
ref: mergeTriggerRef,
|
|
5766
5869
|
"aria-haspopup": "menu",
|
|
5767
5870
|
"aria-expanded": open,
|
|
@@ -5780,7 +5883,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5780
5883
|
}
|
|
5781
5884
|
}
|
|
5782
5885
|
});
|
|
5783
|
-
const panel = /* @__PURE__ */
|
|
5886
|
+
const panel = /* @__PURE__ */ jsxs42(
|
|
5784
5887
|
"div",
|
|
5785
5888
|
{
|
|
5786
5889
|
ref: panelRef,
|
|
@@ -5805,7 +5908,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5805
5908
|
"data-[state=closed]:pointer-events-none data-[state=closed]:-translate-y-1 data-[state=closed]:opacity-0"
|
|
5806
5909
|
),
|
|
5807
5910
|
children: [
|
|
5808
|
-
header ? /* @__PURE__ */
|
|
5911
|
+
header ? /* @__PURE__ */ jsx48(
|
|
5809
5912
|
"div",
|
|
5810
5913
|
{
|
|
5811
5914
|
role: "presentation",
|
|
@@ -5813,12 +5916,12 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5813
5916
|
children: header
|
|
5814
5917
|
}
|
|
5815
5918
|
) : null,
|
|
5816
|
-
/* @__PURE__ */
|
|
5919
|
+
/* @__PURE__ */ jsx48("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain p-xs", children: items.map((entry, index) => {
|
|
5817
5920
|
if (isSeparator(entry)) {
|
|
5818
|
-
return /* @__PURE__ */
|
|
5921
|
+
return /* @__PURE__ */ jsx48(Divider, { tone: "soft", className: "my-xs" }, entry.id);
|
|
5819
5922
|
}
|
|
5820
5923
|
if (isLabel(entry)) {
|
|
5821
|
-
return /* @__PURE__ */
|
|
5924
|
+
return /* @__PURE__ */ jsx48(
|
|
5822
5925
|
"div",
|
|
5823
5926
|
{
|
|
5824
5927
|
role: "presentation",
|
|
@@ -5828,7 +5931,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5828
5931
|
entry.id
|
|
5829
5932
|
);
|
|
5830
5933
|
}
|
|
5831
|
-
return /* @__PURE__ */
|
|
5934
|
+
return /* @__PURE__ */ jsx48(
|
|
5832
5935
|
MenuItem,
|
|
5833
5936
|
{
|
|
5834
5937
|
ref: (node) => {
|
|
@@ -5849,7 +5952,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5849
5952
|
]
|
|
5850
5953
|
}
|
|
5851
5954
|
);
|
|
5852
|
-
return /* @__PURE__ */
|
|
5955
|
+
return /* @__PURE__ */ jsxs42(
|
|
5853
5956
|
"span",
|
|
5854
5957
|
{
|
|
5855
5958
|
ref: forwardedRef,
|
|
@@ -5866,11 +5969,11 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5866
5969
|
DropdownMenu.displayName = "DropdownMenu";
|
|
5867
5970
|
|
|
5868
5971
|
// virtual-pkg:src/atoms/FileUpload/FileUpload.tsx
|
|
5869
|
-
import * as
|
|
5972
|
+
import * as React50 from "react";
|
|
5870
5973
|
|
|
5871
5974
|
// virtual-pkg:src/atoms/ProgressBar/ProgressBar.tsx
|
|
5872
|
-
import
|
|
5873
|
-
import { jsx as
|
|
5975
|
+
import React49 from "react";
|
|
5976
|
+
import { jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5874
5977
|
function cn38(...parts) {
|
|
5875
5978
|
return parts.filter(Boolean).join(" ");
|
|
5876
5979
|
}
|
|
@@ -5884,7 +5987,7 @@ var strokeVarByStatus = {
|
|
|
5884
5987
|
complete: "var(--color-primary)",
|
|
5885
5988
|
error: "var(--color-semantic-error)"
|
|
5886
5989
|
};
|
|
5887
|
-
var ProgressBar =
|
|
5990
|
+
var ProgressBar = React49.forwardRef(
|
|
5888
5991
|
({
|
|
5889
5992
|
value = 0,
|
|
5890
5993
|
max = 100,
|
|
@@ -5901,7 +6004,7 @@ var ProgressBar = React48.forwardRef(
|
|
|
5901
6004
|
const clamped = Math.min(Math.max(value, 0), safeMax);
|
|
5902
6005
|
const pct = Math.round(clamped / safeMax * 100);
|
|
5903
6006
|
const resolvedStatus = status ?? (variant === "linear" && pct >= 100 ? "complete" : "active");
|
|
5904
|
-
const labelId =
|
|
6007
|
+
const labelId = React49.useId();
|
|
5905
6008
|
const a11y = {
|
|
5906
6009
|
role: "progressbar",
|
|
5907
6010
|
"aria-valuemin": 0,
|
|
@@ -5913,9 +6016,9 @@ var ProgressBar = React48.forwardRef(
|
|
|
5913
6016
|
if (variant === "gauge") {
|
|
5914
6017
|
const dim = size === "sm" ? "size-12" : "size-16";
|
|
5915
6018
|
const ring = size === "sm" ? "inset-[5px]" : "inset-[6px]";
|
|
5916
|
-
return /* @__PURE__ */
|
|
5917
|
-
/* @__PURE__ */
|
|
5918
|
-
/* @__PURE__ */
|
|
6019
|
+
return /* @__PURE__ */ jsxs43("div", { ref, className: cn38("inline-flex flex-col items-center gap-sm", className), ...rest, children: [
|
|
6020
|
+
/* @__PURE__ */ jsxs43("div", { ...a11y, className: cn38("relative rounded-full", dim), children: [
|
|
6021
|
+
/* @__PURE__ */ jsx49(
|
|
5919
6022
|
"div",
|
|
5920
6023
|
{
|
|
5921
6024
|
"aria-hidden": "true",
|
|
@@ -5925,7 +6028,7 @@ var ProgressBar = React48.forwardRef(
|
|
|
5925
6028
|
}
|
|
5926
6029
|
}
|
|
5927
6030
|
),
|
|
5928
|
-
/* @__PURE__ */
|
|
6031
|
+
/* @__PURE__ */ jsx49(
|
|
5929
6032
|
"div",
|
|
5930
6033
|
{
|
|
5931
6034
|
"aria-hidden": "true",
|
|
@@ -5938,15 +6041,15 @@ var ProgressBar = React48.forwardRef(
|
|
|
5938
6041
|
}
|
|
5939
6042
|
)
|
|
5940
6043
|
] }),
|
|
5941
|
-
label ? /* @__PURE__ */
|
|
6044
|
+
label ? /* @__PURE__ */ jsx49("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
5942
6045
|
] });
|
|
5943
6046
|
}
|
|
5944
6047
|
const track = size === "sm" ? "h-1" : "h-2";
|
|
5945
6048
|
if (variant === "segmented") {
|
|
5946
6049
|
const steps = Math.max(1, Math.round(safeMax));
|
|
5947
6050
|
const done = Math.round(clamped);
|
|
5948
|
-
return /* @__PURE__ */
|
|
5949
|
-
/* @__PURE__ */
|
|
6051
|
+
return /* @__PURE__ */ jsxs43("div", { ref, className: cn38("flex w-full flex-col items-start gap-md", className), ...rest, children: [
|
|
6052
|
+
/* @__PURE__ */ jsx49("div", { ...a11y, "aria-valuetext": `Step ${done} of ${steps}`, className: "flex w-full items-center gap-xs", children: Array.from({ length: steps }).map((_, i) => /* @__PURE__ */ jsx49(
|
|
5950
6053
|
"span",
|
|
5951
6054
|
{
|
|
5952
6055
|
"aria-hidden": "true",
|
|
@@ -5958,11 +6061,11 @@ var ProgressBar = React48.forwardRef(
|
|
|
5958
6061
|
},
|
|
5959
6062
|
i
|
|
5960
6063
|
)) }),
|
|
5961
|
-
label ? /* @__PURE__ */
|
|
6064
|
+
label ? /* @__PURE__ */ jsx49("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
5962
6065
|
] });
|
|
5963
6066
|
}
|
|
5964
|
-
return /* @__PURE__ */
|
|
5965
|
-
/* @__PURE__ */
|
|
6067
|
+
return /* @__PURE__ */ jsxs43("div", { ref, className: cn38("flex w-full flex-col items-center gap-md", className), ...rest, children: [
|
|
6068
|
+
/* @__PURE__ */ jsx49("div", { ...a11y, className: cn38("relative w-full overflow-hidden rounded-full bg-surface-strong", track), children: /* @__PURE__ */ jsx49(
|
|
5966
6069
|
"div",
|
|
5967
6070
|
{
|
|
5968
6071
|
"aria-hidden": "true",
|
|
@@ -5973,21 +6076,21 @@ var ProgressBar = React48.forwardRef(
|
|
|
5973
6076
|
style: { width: `${pct}%` }
|
|
5974
6077
|
}
|
|
5975
6078
|
) }),
|
|
5976
|
-
label ? /* @__PURE__ */
|
|
6079
|
+
label ? /* @__PURE__ */ jsx49("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
5977
6080
|
] });
|
|
5978
6081
|
}
|
|
5979
6082
|
);
|
|
5980
6083
|
ProgressBar.displayName = "ProgressBar";
|
|
5981
6084
|
|
|
5982
6085
|
// virtual-pkg:src/atoms/FileUpload/FileUpload.tsx
|
|
5983
|
-
import { jsx as
|
|
6086
|
+
import { jsx as jsx50, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
5984
6087
|
var cn39 = (...parts) => parts.filter(Boolean).join(" ");
|
|
5985
6088
|
var formatBytes = (bytes) => {
|
|
5986
6089
|
if (bytes < 1024) return `${bytes} B`;
|
|
5987
6090
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
5988
6091
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
5989
6092
|
};
|
|
5990
|
-
var FileUpload =
|
|
6093
|
+
var FileUpload = React50.forwardRef(
|
|
5991
6094
|
({
|
|
5992
6095
|
items = [],
|
|
5993
6096
|
onFilesAdded,
|
|
@@ -6002,18 +6105,18 @@ var FileUpload = React49.forwardRef(
|
|
|
6002
6105
|
id,
|
|
6003
6106
|
className
|
|
6004
6107
|
}, ref) => {
|
|
6005
|
-
const autoId =
|
|
6108
|
+
const autoId = React50.useId();
|
|
6006
6109
|
const inputId = id ?? `upload-${autoId}`;
|
|
6007
|
-
const inputRef =
|
|
6008
|
-
const [dragging, setDragging] =
|
|
6009
|
-
const depth =
|
|
6110
|
+
const inputRef = React50.useRef(null);
|
|
6111
|
+
const [dragging, setDragging] = React50.useState(false);
|
|
6112
|
+
const depth = React50.useRef(0);
|
|
6010
6113
|
const add = (list) => {
|
|
6011
6114
|
if (!list || disabled) return;
|
|
6012
6115
|
const files = Array.from(list);
|
|
6013
6116
|
if (files.length) onFilesAdded?.(multiple ? files : files.slice(0, 1));
|
|
6014
6117
|
};
|
|
6015
|
-
return /* @__PURE__ */
|
|
6016
|
-
/* @__PURE__ */
|
|
6118
|
+
return /* @__PURE__ */ jsxs44("div", { ref, className: cn39("flex w-full min-w-0 flex-col gap-sm rounded-none", className), children: [
|
|
6119
|
+
/* @__PURE__ */ jsxs44(
|
|
6017
6120
|
"div",
|
|
6018
6121
|
{
|
|
6019
6122
|
"data-state": dragging ? "active" : "idle",
|
|
@@ -6041,7 +6144,7 @@ var FileUpload = React49.forwardRef(
|
|
|
6041
6144
|
disabled && "opacity-50"
|
|
6042
6145
|
),
|
|
6043
6146
|
children: [
|
|
6044
|
-
/* @__PURE__ */
|
|
6147
|
+
/* @__PURE__ */ jsx50(
|
|
6045
6148
|
Icon,
|
|
6046
6149
|
{
|
|
6047
6150
|
name: "upload",
|
|
@@ -6052,7 +6155,7 @@ var FileUpload = React49.forwardRef(
|
|
|
6052
6155
|
)
|
|
6053
6156
|
}
|
|
6054
6157
|
),
|
|
6055
|
-
/* @__PURE__ */
|
|
6158
|
+
/* @__PURE__ */ jsx50(
|
|
6056
6159
|
Input,
|
|
6057
6160
|
{
|
|
6058
6161
|
ref: inputRef,
|
|
@@ -6072,8 +6175,8 @@ var FileUpload = React49.forwardRef(
|
|
|
6072
6175
|
}
|
|
6073
6176
|
}
|
|
6074
6177
|
),
|
|
6075
|
-
dragging ? /* @__PURE__ */
|
|
6076
|
-
/* @__PURE__ */
|
|
6178
|
+
dragging ? /* @__PURE__ */ jsx50("p", { className: "flex h-7 items-center text-body-sm text-primary", "aria-live": "polite", children: dropLabel }) : /* @__PURE__ */ jsxs44("p", { className: "flex items-center gap-xxs text-body-sm text-muted", children: [
|
|
6179
|
+
/* @__PURE__ */ jsx50(
|
|
6077
6180
|
Button,
|
|
6078
6181
|
{
|
|
6079
6182
|
variant: "ghost",
|
|
@@ -6084,24 +6187,24 @@ var FileUpload = React49.forwardRef(
|
|
|
6084
6187
|
children: actionLabel
|
|
6085
6188
|
}
|
|
6086
6189
|
),
|
|
6087
|
-
/* @__PURE__ */
|
|
6190
|
+
/* @__PURE__ */ jsx50("span", { children: hint })
|
|
6088
6191
|
] })
|
|
6089
6192
|
]
|
|
6090
6193
|
}
|
|
6091
6194
|
),
|
|
6092
|
-
items.length > 0 ? /* @__PURE__ */
|
|
6195
|
+
items.length > 0 ? /* @__PURE__ */ jsx50("ul", { className: "flex flex-col gap-sm", "aria-label": "Uploaded files", children: items.map((item) => /* @__PURE__ */ jsxs44(
|
|
6093
6196
|
"li",
|
|
6094
6197
|
{
|
|
6095
6198
|
className: "flex items-center gap-md rounded-lg border border-hairline bg-canvas px-base py-md shadow-card",
|
|
6096
6199
|
children: [
|
|
6097
|
-
/* @__PURE__ */
|
|
6098
|
-
/* @__PURE__ */
|
|
6099
|
-
/* @__PURE__ */
|
|
6100
|
-
item.status === "error" ? /* @__PURE__ */
|
|
6200
|
+
/* @__PURE__ */ jsx50(Icon, { name: "file", size: 20, className: "text-muted" }),
|
|
6201
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs", children: [
|
|
6202
|
+
/* @__PURE__ */ jsx50("p", { className: "truncate text-body-md font-weight-label text-ink", children: item.name }),
|
|
6203
|
+
item.status === "error" ? /* @__PURE__ */ jsx50("p", { className: "text-body-sm text-semantic-error", role: "alert", children: item.error ?? "Couldn\u2019t upload file" }) : /* @__PURE__ */ jsxs44("p", { className: "text-body-sm text-muted", children: [
|
|
6101
6204
|
formatBytes(item.size),
|
|
6102
6205
|
item.status === "uploading" ? " \xB7 Uploading\u2026" : ""
|
|
6103
6206
|
] }),
|
|
6104
|
-
item.status === "uploading" ? /* @__PURE__ */
|
|
6207
|
+
item.status === "uploading" ? /* @__PURE__ */ jsx50(
|
|
6105
6208
|
ProgressBar,
|
|
6106
6209
|
{
|
|
6107
6210
|
value: item.progress ?? 0,
|
|
@@ -6113,7 +6216,7 @@ var FileUpload = React49.forwardRef(
|
|
|
6113
6216
|
}
|
|
6114
6217
|
) : null
|
|
6115
6218
|
] }),
|
|
6116
|
-
item.status === "uploading" ? /* @__PURE__ */
|
|
6219
|
+
item.status === "uploading" ? /* @__PURE__ */ jsx50(
|
|
6117
6220
|
IconButton,
|
|
6118
6221
|
{
|
|
6119
6222
|
icon: "x",
|
|
@@ -6122,7 +6225,7 @@ var FileUpload = React49.forwardRef(
|
|
|
6122
6225
|
"aria-label": `Cancel upload of ${item.name}`,
|
|
6123
6226
|
onClick: () => onRemove?.(item.id)
|
|
6124
6227
|
}
|
|
6125
|
-
) : item.status === "error" ? /* @__PURE__ */
|
|
6228
|
+
) : item.status === "error" ? /* @__PURE__ */ jsx50(
|
|
6126
6229
|
IconButton,
|
|
6127
6230
|
{
|
|
6128
6231
|
icon: "rotate-cw",
|
|
@@ -6131,9 +6234,9 @@ var FileUpload = React49.forwardRef(
|
|
|
6131
6234
|
"aria-label": `Retry upload of ${item.name}`,
|
|
6132
6235
|
onClick: () => onRetry?.(item.id)
|
|
6133
6236
|
}
|
|
6134
|
-
) : /* @__PURE__ */
|
|
6135
|
-
/* @__PURE__ */
|
|
6136
|
-
/* @__PURE__ */
|
|
6237
|
+
) : /* @__PURE__ */ jsxs44("span", { className: "inline-flex items-center gap-xs", children: [
|
|
6238
|
+
/* @__PURE__ */ jsx50(Icon, { name: "circle-check", size: 20, className: "text-semantic-success", "aria-label": "Uploaded" }),
|
|
6239
|
+
/* @__PURE__ */ jsx50(
|
|
6137
6240
|
IconButton,
|
|
6138
6241
|
{
|
|
6139
6242
|
icon: "x",
|
|
@@ -6154,11 +6257,11 @@ var FileUpload = React49.forwardRef(
|
|
|
6154
6257
|
FileUpload.displayName = "FileUpload";
|
|
6155
6258
|
|
|
6156
6259
|
// virtual-pkg:src/atoms/Footer/Footer.tsx
|
|
6157
|
-
import * as
|
|
6260
|
+
import * as React52 from "react";
|
|
6158
6261
|
|
|
6159
6262
|
// virtual-pkg:src/atoms/Logo/Logo.tsx
|
|
6160
|
-
import
|
|
6161
|
-
import { Fragment as Fragment5, jsx as
|
|
6263
|
+
import React51 from "react";
|
|
6264
|
+
import { Fragment as Fragment5, jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
6162
6265
|
function cn40(...parts) {
|
|
6163
6266
|
return parts.filter(Boolean).join(" ");
|
|
6164
6267
|
}
|
|
@@ -6188,7 +6291,7 @@ var tileSize = {
|
|
|
6188
6291
|
lg: "size-16 rounded-lg"
|
|
6189
6292
|
};
|
|
6190
6293
|
function OrbitMark({ size }) {
|
|
6191
|
-
return /* @__PURE__ */
|
|
6294
|
+
return /* @__PURE__ */ jsx51(
|
|
6192
6295
|
"span",
|
|
6193
6296
|
{
|
|
6194
6297
|
"aria-hidden": "true",
|
|
@@ -6197,11 +6300,11 @@ function OrbitMark({ size }) {
|
|
|
6197
6300
|
markSize[size],
|
|
6198
6301
|
ringWidth[size]
|
|
6199
6302
|
),
|
|
6200
|
-
children: /* @__PURE__ */
|
|
6303
|
+
children: /* @__PURE__ */ jsx51("span", { className: cn40("absolute -right-px -top-px rounded-full bg-current", dotSize[size]) })
|
|
6201
6304
|
}
|
|
6202
6305
|
);
|
|
6203
6306
|
}
|
|
6204
|
-
var Logo =
|
|
6307
|
+
var Logo = React51.forwardRef(
|
|
6205
6308
|
({
|
|
6206
6309
|
variant = "lockup",
|
|
6207
6310
|
tone = "default",
|
|
@@ -6212,8 +6315,8 @@ var Logo = React50.forwardRef(
|
|
|
6212
6315
|
className,
|
|
6213
6316
|
...rest
|
|
6214
6317
|
}, ref) => {
|
|
6215
|
-
const glyph2 = mark ?? /* @__PURE__ */
|
|
6216
|
-
const markNode = tone === "inverse" ? /* @__PURE__ */
|
|
6318
|
+
const glyph2 = mark ?? /* @__PURE__ */ jsx51(OrbitMark, { size });
|
|
6319
|
+
const markNode = tone === "inverse" ? /* @__PURE__ */ jsx51(
|
|
6217
6320
|
"span",
|
|
6218
6321
|
{
|
|
6219
6322
|
"aria-hidden": "true",
|
|
@@ -6223,10 +6326,10 @@ var Logo = React50.forwardRef(
|
|
|
6223
6326
|
),
|
|
6224
6327
|
children: glyph2
|
|
6225
6328
|
}
|
|
6226
|
-
) : /* @__PURE__ */
|
|
6227
|
-
const content = /* @__PURE__ */
|
|
6329
|
+
) : /* @__PURE__ */ jsx51("span", { "aria-hidden": "true", className: "inline-flex shrink-0 text-ink", children: glyph2 });
|
|
6330
|
+
const content = /* @__PURE__ */ jsxs45(Fragment5, { children: [
|
|
6228
6331
|
markNode,
|
|
6229
|
-
variant === "lockup" ? /* @__PURE__ */
|
|
6332
|
+
variant === "lockup" ? /* @__PURE__ */ jsx51("span", { "aria-hidden": "true", className: cn40("whitespace-nowrap text-ink", wordSize[size]), children: name }) : null
|
|
6230
6333
|
] });
|
|
6231
6334
|
const base2 = cn40(
|
|
6232
6335
|
"inline-flex items-center",
|
|
@@ -6234,7 +6337,7 @@ var Logo = React50.forwardRef(
|
|
|
6234
6337
|
className
|
|
6235
6338
|
);
|
|
6236
6339
|
if (href) {
|
|
6237
|
-
return /* @__PURE__ */
|
|
6340
|
+
return /* @__PURE__ */ jsx51(
|
|
6238
6341
|
"a",
|
|
6239
6342
|
{
|
|
6240
6343
|
ref,
|
|
@@ -6249,19 +6352,19 @@ var Logo = React50.forwardRef(
|
|
|
6249
6352
|
}
|
|
6250
6353
|
);
|
|
6251
6354
|
}
|
|
6252
|
-
return /* @__PURE__ */
|
|
6355
|
+
return /* @__PURE__ */ jsx51("span", { ref, role: "img", "aria-label": name, className: base2, ...rest, children: content });
|
|
6253
6356
|
}
|
|
6254
6357
|
);
|
|
6255
6358
|
Logo.displayName = "Logo";
|
|
6256
6359
|
|
|
6257
6360
|
// virtual-pkg:src/atoms/Footer/Footer.tsx
|
|
6258
|
-
import { jsx as
|
|
6361
|
+
import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6259
6362
|
var cn41 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6260
6363
|
function Newsletter({ n }) {
|
|
6261
|
-
const id =
|
|
6262
|
-
const [email, setEmail] =
|
|
6263
|
-
const [state, setState] =
|
|
6264
|
-
return /* @__PURE__ */
|
|
6364
|
+
const id = React52.useId();
|
|
6365
|
+
const [email, setEmail] = React52.useState("");
|
|
6366
|
+
const [state, setState] = React52.useState("idle");
|
|
6367
|
+
return /* @__PURE__ */ jsxs46(
|
|
6265
6368
|
"form",
|
|
6266
6369
|
{
|
|
6267
6370
|
className: "flex w-full flex-col gap-base rounded-lg border border-hairline bg-canvas p-lg shadow-card",
|
|
@@ -6273,12 +6376,12 @@ function Newsletter({ n }) {
|
|
|
6273
6376
|
setState("done");
|
|
6274
6377
|
},
|
|
6275
6378
|
children: [
|
|
6276
|
-
/* @__PURE__ */
|
|
6277
|
-
/* @__PURE__ */
|
|
6278
|
-
n.description ? /* @__PURE__ */
|
|
6379
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-xxs", children: [
|
|
6380
|
+
/* @__PURE__ */ jsx52("h3", { id: `${id}-title`, className: "text-heading-sm text-ink", children: n.title }),
|
|
6381
|
+
n.description ? /* @__PURE__ */ jsx52("p", { className: "text-body-md text-muted", children: n.description }) : null
|
|
6279
6382
|
] }),
|
|
6280
|
-
/* @__PURE__ */
|
|
6281
|
-
/* @__PURE__ */
|
|
6383
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-sm sm:flex-row", children: [
|
|
6384
|
+
/* @__PURE__ */ jsx52("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx52(
|
|
6282
6385
|
Input,
|
|
6283
6386
|
{
|
|
6284
6387
|
type: "email",
|
|
@@ -6290,16 +6393,16 @@ function Newsletter({ n }) {
|
|
|
6290
6393
|
setEmail(e.target.value);
|
|
6291
6394
|
if (state === "done") setState("idle");
|
|
6292
6395
|
},
|
|
6293
|
-
leading: /* @__PURE__ */
|
|
6396
|
+
leading: /* @__PURE__ */ jsx52(Icon, { name: "mail", size: 16 })
|
|
6294
6397
|
}
|
|
6295
6398
|
) }),
|
|
6296
|
-
/* @__PURE__ */
|
|
6399
|
+
/* @__PURE__ */ jsx52(Button, { type: "submit", variant: "primary", loading: state === "loading", children: state === "done" ? "Subscribed" : n.buttonLabel ?? "Subscribe" })
|
|
6297
6400
|
] })
|
|
6298
6401
|
]
|
|
6299
6402
|
}
|
|
6300
6403
|
);
|
|
6301
6404
|
}
|
|
6302
|
-
var Footer =
|
|
6405
|
+
var Footer = React52.forwardRef(
|
|
6303
6406
|
({
|
|
6304
6407
|
variant = "full",
|
|
6305
6408
|
brandName = "Northline",
|
|
@@ -6312,9 +6415,9 @@ var Footer = React51.forwardRef(
|
|
|
6312
6415
|
className,
|
|
6313
6416
|
...rest
|
|
6314
6417
|
}, ref) => {
|
|
6315
|
-
const legal = legalLinks.length ? /* @__PURE__ */
|
|
6418
|
+
const legal = legalLinks.length ? /* @__PURE__ */ jsx52("nav", { "aria-label": "Legal", children: /* @__PURE__ */ jsx52("ul", { className: "flex flex-wrap items-center gap-x-lg gap-y-xs", children: legalLinks.map((l) => /* @__PURE__ */ jsx52("li", { children: /* @__PURE__ */ jsx52(Link, { href: l.href, variant: "quiet", className: "text-body-sm", children: l.label }) }, l.label)) }) }) : null;
|
|
6316
6419
|
if (variant === "minimal") {
|
|
6317
|
-
return /* @__PURE__ */
|
|
6420
|
+
return /* @__PURE__ */ jsxs46(
|
|
6318
6421
|
"footer",
|
|
6319
6422
|
{
|
|
6320
6423
|
ref,
|
|
@@ -6324,32 +6427,32 @@ var Footer = React51.forwardRef(
|
|
|
6324
6427
|
),
|
|
6325
6428
|
...rest,
|
|
6326
6429
|
children: [
|
|
6327
|
-
/* @__PURE__ */
|
|
6430
|
+
/* @__PURE__ */ jsx52(Logo, { size: "sm", name: brandName, href: brandHref }),
|
|
6328
6431
|
legal
|
|
6329
6432
|
]
|
|
6330
6433
|
}
|
|
6331
6434
|
);
|
|
6332
6435
|
}
|
|
6333
|
-
return /* @__PURE__ */
|
|
6436
|
+
return /* @__PURE__ */ jsxs46(
|
|
6334
6437
|
"footer",
|
|
6335
6438
|
{
|
|
6336
6439
|
ref,
|
|
6337
6440
|
className: cn41("w-full border-t border-hairline bg-canvas px-lg py-xl text-ink", className),
|
|
6338
6441
|
...rest,
|
|
6339
6442
|
children: [
|
|
6340
|
-
/* @__PURE__ */
|
|
6341
|
-
/* @__PURE__ */
|
|
6342
|
-
/* @__PURE__ */
|
|
6343
|
-
tagline ? /* @__PURE__ */
|
|
6443
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex w-full flex-col gap-xl md:flex-row md:justify-between", children: [
|
|
6444
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-base md:w-1/3", children: [
|
|
6445
|
+
/* @__PURE__ */ jsx52(Logo, { size: "md", name: brandName, href: brandHref }),
|
|
6446
|
+
tagline ? /* @__PURE__ */ jsx52("p", { className: "text-body-md text-body", children: tagline }) : null
|
|
6344
6447
|
] }),
|
|
6345
|
-
columns.length ? /* @__PURE__ */
|
|
6346
|
-
/* @__PURE__ */
|
|
6347
|
-
/* @__PURE__ */
|
|
6448
|
+
columns.length ? /* @__PURE__ */ jsx52("nav", { "aria-label": "Footer", className: "grid grid-cols-2 gap-xl sm:grid-cols-3", children: columns.map((col) => /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-md", children: [
|
|
6449
|
+
/* @__PURE__ */ jsx52("h3", { className: "text-body-md font-weight-label text-ink", children: col.title }),
|
|
6450
|
+
/* @__PURE__ */ jsx52("ul", { className: "flex flex-col gap-sm", children: col.links.map((l) => /* @__PURE__ */ jsx52("li", { children: /* @__PURE__ */ jsx52(Link, { href: l.href, variant: "quiet", className: "text-body-sm", children: l.label }) }, l.label)) })
|
|
6348
6451
|
] }, col.title)) }) : null
|
|
6349
6452
|
] }),
|
|
6350
|
-
newsletter ? /* @__PURE__ */
|
|
6351
|
-
legal || copyright ? /* @__PURE__ */
|
|
6352
|
-
copyright ? /* @__PURE__ */
|
|
6453
|
+
newsletter ? /* @__PURE__ */ jsx52("div", { className: "mt-xl w-full md:w-1/2", children: /* @__PURE__ */ jsx52(Newsletter, { n: newsletter }) }) : null,
|
|
6454
|
+
legal || copyright ? /* @__PURE__ */ jsxs46("div", { className: "mt-xl flex w-full flex-wrap items-center justify-between gap-base border-t border-hairline-soft pt-base", children: [
|
|
6455
|
+
copyright ? /* @__PURE__ */ jsx52("p", { className: "text-body-sm text-muted", children: copyright }) : /* @__PURE__ */ jsx52("span", {}),
|
|
6353
6456
|
legal
|
|
6354
6457
|
] }) : null
|
|
6355
6458
|
]
|
|
@@ -6360,18 +6463,18 @@ var Footer = React51.forwardRef(
|
|
|
6360
6463
|
Footer.displayName = "Footer";
|
|
6361
6464
|
|
|
6362
6465
|
// virtual-pkg:src/atoms/Form/Form.tsx
|
|
6363
|
-
import * as
|
|
6466
|
+
import * as React57 from "react";
|
|
6364
6467
|
|
|
6365
6468
|
// virtual-pkg:src/atoms/FormDesktop/FormDesktop.tsx
|
|
6366
|
-
import * as
|
|
6469
|
+
import * as React55 from "react";
|
|
6367
6470
|
|
|
6368
6471
|
// virtual-pkg:src/atoms/FormField/FormField.tsx
|
|
6369
|
-
import * as
|
|
6472
|
+
import * as React54 from "react";
|
|
6370
6473
|
|
|
6371
6474
|
// virtual-pkg:src/atoms/Label/Label.tsx
|
|
6372
|
-
import * as
|
|
6373
|
-
import { jsx as
|
|
6374
|
-
var Label =
|
|
6475
|
+
import * as React53 from "react";
|
|
6476
|
+
import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
6477
|
+
var Label = React53.forwardRef(
|
|
6375
6478
|
({
|
|
6376
6479
|
required = false,
|
|
6377
6480
|
optional = false,
|
|
@@ -6383,7 +6486,7 @@ var Label = React52.forwardRef(
|
|
|
6383
6486
|
...rest
|
|
6384
6487
|
}, ref) => {
|
|
6385
6488
|
const optionalText = typeof optional === "string" ? optional : "Optional";
|
|
6386
|
-
return /* @__PURE__ */
|
|
6489
|
+
return /* @__PURE__ */ jsxs47(
|
|
6387
6490
|
"div",
|
|
6388
6491
|
{
|
|
6389
6492
|
className: [
|
|
@@ -6392,7 +6495,7 @@ var Label = React52.forwardRef(
|
|
|
6392
6495
|
className
|
|
6393
6496
|
].filter(Boolean).join(" "),
|
|
6394
6497
|
children: [
|
|
6395
|
-
/* @__PURE__ */
|
|
6498
|
+
/* @__PURE__ */ jsxs47(
|
|
6396
6499
|
"label",
|
|
6397
6500
|
{
|
|
6398
6501
|
ref,
|
|
@@ -6402,16 +6505,16 @@ var Label = React52.forwardRef(
|
|
|
6402
6505
|
].join(" "),
|
|
6403
6506
|
...rest,
|
|
6404
6507
|
children: [
|
|
6405
|
-
/* @__PURE__ */
|
|
6508
|
+
/* @__PURE__ */ jsxs47("span", { children: [
|
|
6406
6509
|
children,
|
|
6407
|
-
required && /* @__PURE__ */
|
|
6408
|
-
required && /* @__PURE__ */
|
|
6510
|
+
required && /* @__PURE__ */ jsx53("span", { className: "ml-xxs text-semantic-error", "aria-hidden": "true", children: "*" }),
|
|
6511
|
+
required && /* @__PURE__ */ jsx53("span", { className: "sr-only", children: " (required)" })
|
|
6409
6512
|
] }),
|
|
6410
|
-
optional && !required && /* @__PURE__ */
|
|
6513
|
+
optional && !required && /* @__PURE__ */ jsx53("span", { className: "text-body-sm text-muted-soft", children: optionalText })
|
|
6411
6514
|
]
|
|
6412
6515
|
}
|
|
6413
6516
|
),
|
|
6414
|
-
helper && /* @__PURE__ */
|
|
6517
|
+
helper && /* @__PURE__ */ jsx53("span", { id: helperId, className: "text-body-sm text-muted", children: helper })
|
|
6415
6518
|
]
|
|
6416
6519
|
}
|
|
6417
6520
|
);
|
|
@@ -6420,9 +6523,9 @@ var Label = React52.forwardRef(
|
|
|
6420
6523
|
Label.displayName = "Label";
|
|
6421
6524
|
|
|
6422
6525
|
// virtual-pkg:src/atoms/FormField/FormField.tsx
|
|
6423
|
-
import { jsx as
|
|
6526
|
+
import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
6424
6527
|
var cn42 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6425
|
-
var FormField =
|
|
6528
|
+
var FormField = React54.forwardRef(
|
|
6426
6529
|
({
|
|
6427
6530
|
label,
|
|
6428
6531
|
helper,
|
|
@@ -6439,14 +6542,14 @@ var FormField = React53.forwardRef(
|
|
|
6439
6542
|
containerClassName,
|
|
6440
6543
|
...inputProps
|
|
6441
6544
|
}, ref) => {
|
|
6442
|
-
const autoId =
|
|
6545
|
+
const autoId = React54.useId();
|
|
6443
6546
|
const fieldId = id ?? `field-${autoId}`;
|
|
6444
6547
|
const messageId = `${fieldId}-message`;
|
|
6445
6548
|
const descriptionId = `${fieldId}-description`;
|
|
6446
6549
|
const resolved = status ?? (error ? "error" : successMessage ? "success" : "default");
|
|
6447
6550
|
const message = resolved === "error" && error ? error : resolved === "success" && successMessage ? successMessage : helper;
|
|
6448
6551
|
const describedBy = [description ? descriptionId : null, message ? messageId : null].filter(Boolean).join(" ") || void 0;
|
|
6449
|
-
const input = /* @__PURE__ */
|
|
6552
|
+
const input = /* @__PURE__ */ jsx54(
|
|
6450
6553
|
Input,
|
|
6451
6554
|
{
|
|
6452
6555
|
ref,
|
|
@@ -6458,7 +6561,7 @@ var FormField = React53.forwardRef(
|
|
|
6458
6561
|
...inputProps
|
|
6459
6562
|
}
|
|
6460
6563
|
);
|
|
6461
|
-
const messageLine = /* @__PURE__ */
|
|
6564
|
+
const messageLine = /* @__PURE__ */ jsxs48(
|
|
6462
6565
|
"p",
|
|
6463
6566
|
{
|
|
6464
6567
|
id: messageId,
|
|
@@ -6469,12 +6572,12 @@ var FormField = React53.forwardRef(
|
|
|
6469
6572
|
resolved === "error" ? "text-semantic-error" : resolved === "success" ? "text-semantic-success" : "text-muted"
|
|
6470
6573
|
),
|
|
6471
6574
|
children: [
|
|
6472
|
-
resolved === "success" && successMessage ? /* @__PURE__ */
|
|
6575
|
+
resolved === "success" && successMessage ? /* @__PURE__ */ jsx54(Icon, { name: "check", size: 14 }) : null,
|
|
6473
6576
|
message
|
|
6474
6577
|
]
|
|
6475
6578
|
}
|
|
6476
6579
|
);
|
|
6477
|
-
const labelNode = /* @__PURE__ */
|
|
6580
|
+
const labelNode = /* @__PURE__ */ jsx54(
|
|
6478
6581
|
Label,
|
|
6479
6582
|
{
|
|
6480
6583
|
htmlFor: fieldId,
|
|
@@ -6487,7 +6590,7 @@ var FormField = React53.forwardRef(
|
|
|
6487
6590
|
}
|
|
6488
6591
|
);
|
|
6489
6592
|
if (layout === "inline") {
|
|
6490
|
-
return /* @__PURE__ */
|
|
6593
|
+
return /* @__PURE__ */ jsxs48(
|
|
6491
6594
|
"div",
|
|
6492
6595
|
{
|
|
6493
6596
|
className: cn42(
|
|
@@ -6495,10 +6598,10 @@ var FormField = React53.forwardRef(
|
|
|
6495
6598
|
containerClassName
|
|
6496
6599
|
),
|
|
6497
6600
|
children: [
|
|
6498
|
-
/* @__PURE__ */
|
|
6499
|
-
/* @__PURE__ */
|
|
6500
|
-
/* @__PURE__ */
|
|
6501
|
-
addon ? /* @__PURE__ */
|
|
6601
|
+
/* @__PURE__ */ jsx54("div", { className: "flex min-h-8 items-center", children: labelNode }),
|
|
6602
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
6603
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex min-w-0 items-center gap-sm", children: [
|
|
6604
|
+
addon ? /* @__PURE__ */ jsx54("span", { className: "inline-flex shrink-0", children: addon }) : null,
|
|
6502
6605
|
input
|
|
6503
6606
|
] }),
|
|
6504
6607
|
message ? messageLine : null
|
|
@@ -6507,10 +6610,10 @@ var FormField = React53.forwardRef(
|
|
|
6507
6610
|
}
|
|
6508
6611
|
);
|
|
6509
6612
|
}
|
|
6510
|
-
return /* @__PURE__ */
|
|
6613
|
+
return /* @__PURE__ */ jsxs48("div", { className: cn42("flex w-full min-w-0 flex-col gap-sm rounded-none", containerClassName), children: [
|
|
6511
6614
|
labelNode,
|
|
6512
|
-
addon ? /* @__PURE__ */
|
|
6513
|
-
/* @__PURE__ */
|
|
6615
|
+
addon ? /* @__PURE__ */ jsxs48("div", { className: "flex min-w-0 items-center gap-sm", children: [
|
|
6616
|
+
/* @__PURE__ */ jsx54("span", { className: "inline-flex shrink-0", children: addon }),
|
|
6514
6617
|
input
|
|
6515
6618
|
] }) : input,
|
|
6516
6619
|
messageLine
|
|
@@ -6520,7 +6623,7 @@ var FormField = React53.forwardRef(
|
|
|
6520
6623
|
FormField.displayName = "FormField";
|
|
6521
6624
|
|
|
6522
6625
|
// virtual-pkg:src/atoms/FormDesktop/FormDesktop.tsx
|
|
6523
|
-
import { jsx as
|
|
6626
|
+
import { jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6524
6627
|
var DEFAULT_TIMEZONES = [
|
|
6525
6628
|
{ value: "utc-8", label: "GMT-8:00 \u2013 Pacific Time" },
|
|
6526
6629
|
{ value: "utc-5", label: "GMT-5:00 \u2013 Eastern Time" },
|
|
@@ -6530,7 +6633,7 @@ var DEFAULT_TIMEZONES = [
|
|
|
6530
6633
|
{ value: "utc+9", label: "GMT+9:00 \u2013 Japan Standard Time" }
|
|
6531
6634
|
];
|
|
6532
6635
|
var cn43 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6533
|
-
var FormDesktop =
|
|
6636
|
+
var FormDesktop = React55.forwardRef(
|
|
6534
6637
|
({
|
|
6535
6638
|
name,
|
|
6536
6639
|
onNameChange,
|
|
@@ -6552,10 +6655,10 @@ var FormDesktop = React54.forwardRef(
|
|
|
6552
6655
|
onSubmit,
|
|
6553
6656
|
...rest
|
|
6554
6657
|
}, ref) => {
|
|
6555
|
-
const autoId =
|
|
6658
|
+
const autoId = React55.useId();
|
|
6556
6659
|
const tzLabelId = `${autoId}-tz-label`;
|
|
6557
6660
|
const tzMessageId = `${autoId}-tz-message`;
|
|
6558
|
-
return /* @__PURE__ */
|
|
6661
|
+
return /* @__PURE__ */ jsx55(
|
|
6559
6662
|
"form",
|
|
6560
6663
|
{
|
|
6561
6664
|
ref,
|
|
@@ -6569,8 +6672,8 @@ var FormDesktop = React54.forwardRef(
|
|
|
6569
6672
|
className
|
|
6570
6673
|
),
|
|
6571
6674
|
...rest,
|
|
6572
|
-
children: /* @__PURE__ */
|
|
6573
|
-
/* @__PURE__ */
|
|
6675
|
+
children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col divide-y divide-hairline-soft", children: [
|
|
6676
|
+
/* @__PURE__ */ jsx55("div", { className: "px-base py-md", children: /* @__PURE__ */ jsx55(
|
|
6574
6677
|
FormField,
|
|
6575
6678
|
{
|
|
6576
6679
|
layout: "inline",
|
|
@@ -6580,17 +6683,17 @@ var FormDesktop = React54.forwardRef(
|
|
|
6580
6683
|
onChange: (e) => onNameChange?.(e.target.value),
|
|
6581
6684
|
error: errors.name,
|
|
6582
6685
|
disabled,
|
|
6583
|
-
addon: /* @__PURE__ */
|
|
6686
|
+
addon: /* @__PURE__ */ jsx55(
|
|
6584
6687
|
"span",
|
|
6585
6688
|
{
|
|
6586
6689
|
"aria-hidden": "true",
|
|
6587
6690
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-semantic-info-soft text-semantic-info",
|
|
6588
|
-
children: /* @__PURE__ */
|
|
6691
|
+
children: /* @__PURE__ */ jsx55(Icon, { name: icon, size: 18 })
|
|
6589
6692
|
}
|
|
6590
6693
|
)
|
|
6591
6694
|
}
|
|
6592
6695
|
) }),
|
|
6593
|
-
/* @__PURE__ */
|
|
6696
|
+
/* @__PURE__ */ jsx55("div", { className: "px-base py-md", children: /* @__PURE__ */ jsx55(
|
|
6594
6697
|
FormField,
|
|
6595
6698
|
{
|
|
6596
6699
|
layout: "inline",
|
|
@@ -6603,10 +6706,10 @@ var FormDesktop = React54.forwardRef(
|
|
|
6603
6706
|
disabled
|
|
6604
6707
|
}
|
|
6605
6708
|
) }),
|
|
6606
|
-
/* @__PURE__ */
|
|
6607
|
-
/* @__PURE__ */
|
|
6608
|
-
/* @__PURE__ */
|
|
6609
|
-
/* @__PURE__ */
|
|
6709
|
+
/* @__PURE__ */ jsx55("div", { className: "px-base py-md", children: /* @__PURE__ */ jsxs49("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: [
|
|
6710
|
+
/* @__PURE__ */ jsx55("div", { className: "flex min-h-8 items-center", children: /* @__PURE__ */ jsx55(Label, { id: tzLabelId, disabled, children: timezoneLabel }) }),
|
|
6711
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
6712
|
+
/* @__PURE__ */ jsx55(
|
|
6610
6713
|
Dropdown,
|
|
6611
6714
|
{
|
|
6612
6715
|
options: timezoneOptions,
|
|
@@ -6618,7 +6721,7 @@ var FormDesktop = React54.forwardRef(
|
|
|
6618
6721
|
disabled
|
|
6619
6722
|
}
|
|
6620
6723
|
),
|
|
6621
|
-
errors.timezone ? /* @__PURE__ */
|
|
6724
|
+
errors.timezone ? /* @__PURE__ */ jsx55("p", { id: tzMessageId, "aria-live": "polite", className: "text-body-sm text-semantic-error", children: errors.timezone }) : null
|
|
6622
6725
|
] })
|
|
6623
6726
|
] }) })
|
|
6624
6727
|
] })
|
|
@@ -6629,8 +6732,8 @@ var FormDesktop = React54.forwardRef(
|
|
|
6629
6732
|
FormDesktop.displayName = "FormDesktop";
|
|
6630
6733
|
|
|
6631
6734
|
// virtual-pkg:src/atoms/FormMobile/FormMobile.tsx
|
|
6632
|
-
import * as
|
|
6633
|
-
import { jsx as
|
|
6735
|
+
import * as React56 from "react";
|
|
6736
|
+
import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
6634
6737
|
var TIMEZONES = [
|
|
6635
6738
|
{ value: "utc-8", label: "GMT-8:00 \u2013 Pacific Time" },
|
|
6636
6739
|
{ value: "utc-5", label: "GMT-5:00 \u2013 Eastern Time" },
|
|
@@ -6640,7 +6743,7 @@ var TIMEZONES = [
|
|
|
6640
6743
|
{ value: "utc+9", label: "GMT+9:00 \u2013 Japan Standard Time" }
|
|
6641
6744
|
];
|
|
6642
6745
|
var cn44 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6643
|
-
var FormMobile =
|
|
6746
|
+
var FormMobile = React56.forwardRef(
|
|
6644
6747
|
({
|
|
6645
6748
|
name,
|
|
6646
6749
|
onNameChange,
|
|
@@ -6662,9 +6765,9 @@ var FormMobile = React55.forwardRef(
|
|
|
6662
6765
|
onSubmit,
|
|
6663
6766
|
...rest
|
|
6664
6767
|
}, ref) => {
|
|
6665
|
-
const autoId =
|
|
6768
|
+
const autoId = React56.useId();
|
|
6666
6769
|
const tzLabelId = `${autoId}-tz-label`;
|
|
6667
|
-
return /* @__PURE__ */
|
|
6770
|
+
return /* @__PURE__ */ jsxs50(
|
|
6668
6771
|
"form",
|
|
6669
6772
|
{
|
|
6670
6773
|
ref,
|
|
@@ -6679,7 +6782,7 @@ var FormMobile = React55.forwardRef(
|
|
|
6679
6782
|
),
|
|
6680
6783
|
...rest,
|
|
6681
6784
|
children: [
|
|
6682
|
-
/* @__PURE__ */
|
|
6785
|
+
/* @__PURE__ */ jsx56(
|
|
6683
6786
|
FormField,
|
|
6684
6787
|
{
|
|
6685
6788
|
label: nameLabel,
|
|
@@ -6688,17 +6791,17 @@ var FormMobile = React55.forwardRef(
|
|
|
6688
6791
|
onChange: (e) => onNameChange?.(e.target.value),
|
|
6689
6792
|
error: errors.name,
|
|
6690
6793
|
disabled,
|
|
6691
|
-
addon: /* @__PURE__ */
|
|
6794
|
+
addon: /* @__PURE__ */ jsx56(
|
|
6692
6795
|
"span",
|
|
6693
6796
|
{
|
|
6694
6797
|
"aria-hidden": "true",
|
|
6695
6798
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-semantic-info-soft text-semantic-info",
|
|
6696
|
-
children: /* @__PURE__ */
|
|
6799
|
+
children: /* @__PURE__ */ jsx56(Icon, { name: icon, size: 18 })
|
|
6697
6800
|
}
|
|
6698
6801
|
)
|
|
6699
6802
|
}
|
|
6700
6803
|
),
|
|
6701
|
-
/* @__PURE__ */
|
|
6804
|
+
/* @__PURE__ */ jsx56(
|
|
6702
6805
|
FormField,
|
|
6703
6806
|
{
|
|
6704
6807
|
label: identifierLabel,
|
|
@@ -6710,9 +6813,9 @@ var FormMobile = React55.forwardRef(
|
|
|
6710
6813
|
disabled
|
|
6711
6814
|
}
|
|
6712
6815
|
),
|
|
6713
|
-
/* @__PURE__ */
|
|
6714
|
-
/* @__PURE__ */
|
|
6715
|
-
/* @__PURE__ */
|
|
6816
|
+
/* @__PURE__ */ jsxs50("div", { className: "flex w-full min-w-0 flex-col gap-sm", children: [
|
|
6817
|
+
/* @__PURE__ */ jsx56(Label, { id: tzLabelId, disabled, children: timezoneLabel }),
|
|
6818
|
+
/* @__PURE__ */ jsx56(
|
|
6716
6819
|
Dropdown,
|
|
6717
6820
|
{
|
|
6718
6821
|
options: timezoneOptions,
|
|
@@ -6724,7 +6827,7 @@ var FormMobile = React55.forwardRef(
|
|
|
6724
6827
|
disabled
|
|
6725
6828
|
}
|
|
6726
6829
|
),
|
|
6727
|
-
errors.timezone ? /* @__PURE__ */
|
|
6830
|
+
errors.timezone ? /* @__PURE__ */ jsx56("p", { "aria-live": "polite", className: "text-body-sm text-semantic-error", children: errors.timezone }) : null
|
|
6728
6831
|
] })
|
|
6729
6832
|
]
|
|
6730
6833
|
}
|
|
@@ -6734,23 +6837,23 @@ var FormMobile = React55.forwardRef(
|
|
|
6734
6837
|
FormMobile.displayName = "FormMobile";
|
|
6735
6838
|
|
|
6736
6839
|
// virtual-pkg:src/atoms/Form/Form.tsx
|
|
6737
|
-
import { jsx as
|
|
6738
|
-
var Form =
|
|
6739
|
-
({ wrapperClassName, ...props }, ref) => /* @__PURE__ */
|
|
6740
|
-
/* @__PURE__ */
|
|
6741
|
-
/* @__PURE__ */
|
|
6840
|
+
import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
6841
|
+
var Form = React57.forwardRef(
|
|
6842
|
+
({ wrapperClassName, ...props }, ref) => /* @__PURE__ */ jsxs51("div", { ref, className: ["w-full min-w-0", wrapperClassName].filter(Boolean).join(" "), children: [
|
|
6843
|
+
/* @__PURE__ */ jsx57("div", { className: "hidden w-full md:block", children: /* @__PURE__ */ jsx57(FormDesktop, { ...props }) }),
|
|
6844
|
+
/* @__PURE__ */ jsx57("div", { className: "w-full md:hidden", children: /* @__PURE__ */ jsx57(FormMobile, { ...props }) })
|
|
6742
6845
|
] })
|
|
6743
6846
|
);
|
|
6744
6847
|
Form.displayName = "Form";
|
|
6745
6848
|
|
|
6746
6849
|
// virtual-pkg:src/atoms/HeroSection/HeroSection.tsx
|
|
6747
|
-
import * as
|
|
6850
|
+
import * as React60 from "react";
|
|
6748
6851
|
|
|
6749
6852
|
// virtual-pkg:src/atoms/HeroSectionDesktop/HeroSectionDesktop.tsx
|
|
6750
|
-
import * as
|
|
6751
|
-
import { jsx as
|
|
6853
|
+
import * as React58 from "react";
|
|
6854
|
+
import { jsx as jsx58, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
6752
6855
|
var cn45 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6753
|
-
var HeroSectionDesktop =
|
|
6856
|
+
var HeroSectionDesktop = React58.forwardRef(
|
|
6754
6857
|
({
|
|
6755
6858
|
title,
|
|
6756
6859
|
description,
|
|
@@ -6762,7 +6865,7 @@ var HeroSectionDesktop = React57.forwardRef(
|
|
|
6762
6865
|
inset = true,
|
|
6763
6866
|
className,
|
|
6764
6867
|
...rest
|
|
6765
|
-
}, ref) => /* @__PURE__ */
|
|
6868
|
+
}, ref) => /* @__PURE__ */ jsx58(
|
|
6766
6869
|
"section",
|
|
6767
6870
|
{
|
|
6768
6871
|
ref,
|
|
@@ -6773,7 +6876,7 @@ var HeroSectionDesktop = React57.forwardRef(
|
|
|
6773
6876
|
className
|
|
6774
6877
|
),
|
|
6775
6878
|
...rest,
|
|
6776
|
-
children: /* @__PURE__ */
|
|
6879
|
+
children: /* @__PURE__ */ jsxs52(
|
|
6777
6880
|
"div",
|
|
6778
6881
|
{
|
|
6779
6882
|
className: cn45(
|
|
@@ -6781,19 +6884,19 @@ var HeroSectionDesktop = React57.forwardRef(
|
|
|
6781
6884
|
media ? "grid-cols-2" : "grid-cols-1"
|
|
6782
6885
|
),
|
|
6783
6886
|
children: [
|
|
6784
|
-
/* @__PURE__ */
|
|
6785
|
-
/* @__PURE__ */
|
|
6786
|
-
description ? /* @__PURE__ */
|
|
6787
|
-
primaryAction || secondaryAction ? /* @__PURE__ */
|
|
6788
|
-
primaryAction ? /* @__PURE__ */
|
|
6789
|
-
secondaryAction ? /* @__PURE__ */
|
|
6887
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex min-w-0 flex-col items-start", children: [
|
|
6888
|
+
/* @__PURE__ */ jsx58("h1", { className: "text-heading-lg text-ink lg:text-display-lg", children: title }),
|
|
6889
|
+
description ? /* @__PURE__ */ jsx58("p", { className: "mt-base text-body-lg text-body", children: description }) : null,
|
|
6890
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ jsxs52("div", { className: "mt-lg flex flex-wrap items-center gap-md", children: [
|
|
6891
|
+
primaryAction ? /* @__PURE__ */ jsx58(Button, { variant: "primary", size: "lg", onClick: primaryAction.onClick, children: primaryAction.label }) : null,
|
|
6892
|
+
secondaryAction ? /* @__PURE__ */ jsx58(Button, { variant: "secondary", size: "lg", onClick: secondaryAction.onClick, children: secondaryAction.label }) : null
|
|
6790
6893
|
] }) : null,
|
|
6791
|
-
proof ? /* @__PURE__ */
|
|
6792
|
-
/* @__PURE__ */
|
|
6793
|
-
/* @__PURE__ */
|
|
6894
|
+
proof ? /* @__PURE__ */ jsxs52("div", { className: "mt-lg flex items-center gap-md", children: [
|
|
6895
|
+
/* @__PURE__ */ jsx58("div", { className: "inline-flex shrink-0", children: /* @__PURE__ */ jsx58(AvatarGroup, { items: proof.avatars, size: "md", layout: "stacked", max: 4 }) }),
|
|
6896
|
+
/* @__PURE__ */ jsx58("p", { className: "text-body-md text-body [&_strong]:font-weight-label [&_strong]:text-ink", children: proof.text })
|
|
6794
6897
|
] }) : null
|
|
6795
6898
|
] }),
|
|
6796
|
-
media ? /* @__PURE__ */
|
|
6899
|
+
media ? /* @__PURE__ */ jsx58("div", { className: "flex min-w-0 items-center justify-center", children: media }) : null
|
|
6797
6900
|
]
|
|
6798
6901
|
}
|
|
6799
6902
|
)
|
|
@@ -6803,10 +6906,10 @@ var HeroSectionDesktop = React57.forwardRef(
|
|
|
6803
6906
|
HeroSectionDesktop.displayName = "HeroSectionDesktop";
|
|
6804
6907
|
|
|
6805
6908
|
// virtual-pkg:src/atoms/HeroSectionMobile/HeroSectionMobile.tsx
|
|
6806
|
-
import * as
|
|
6807
|
-
import { jsx as
|
|
6909
|
+
import * as React59 from "react";
|
|
6910
|
+
import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
6808
6911
|
var cn46 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6809
|
-
var HeroSectionMobile =
|
|
6912
|
+
var HeroSectionMobile = React59.forwardRef(
|
|
6810
6913
|
({
|
|
6811
6914
|
title,
|
|
6812
6915
|
description,
|
|
@@ -6818,7 +6921,7 @@ var HeroSectionMobile = React58.forwardRef(
|
|
|
6818
6921
|
inset = true,
|
|
6819
6922
|
className,
|
|
6820
6923
|
...rest
|
|
6821
|
-
}, ref) => /* @__PURE__ */
|
|
6924
|
+
}, ref) => /* @__PURE__ */ jsxs53(
|
|
6822
6925
|
"section",
|
|
6823
6926
|
{
|
|
6824
6927
|
ref,
|
|
@@ -6830,16 +6933,16 @@ var HeroSectionMobile = React58.forwardRef(
|
|
|
6830
6933
|
),
|
|
6831
6934
|
...rest,
|
|
6832
6935
|
children: [
|
|
6833
|
-
/* @__PURE__ */
|
|
6834
|
-
description ? /* @__PURE__ */
|
|
6835
|
-
primaryAction || secondaryAction ? /* @__PURE__ */
|
|
6836
|
-
primaryAction ? /* @__PURE__ */
|
|
6837
|
-
secondaryAction ? /* @__PURE__ */
|
|
6936
|
+
/* @__PURE__ */ jsx59("h1", { className: "text-heading-md text-ink", children: title }),
|
|
6937
|
+
description ? /* @__PURE__ */ jsx59("p", { className: "mt-sm text-body-lg text-muted", children: description }) : null,
|
|
6938
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ jsxs53("div", { className: "mt-lg flex flex-col gap-sm", children: [
|
|
6939
|
+
primaryAction ? /* @__PURE__ */ jsx59(Button, { variant: "primary", size: "lg", fullWidth: true, onClick: primaryAction.onClick, children: primaryAction.label }) : null,
|
|
6940
|
+
secondaryAction ? /* @__PURE__ */ jsx59(Button, { variant: "secondary", size: "lg", fullWidth: true, onClick: secondaryAction.onClick, children: secondaryAction.label }) : null
|
|
6838
6941
|
] }) : null,
|
|
6839
|
-
media ? /* @__PURE__ */
|
|
6840
|
-
proof ? /* @__PURE__ */
|
|
6841
|
-
/* @__PURE__ */
|
|
6842
|
-
/* @__PURE__ */
|
|
6942
|
+
media ? /* @__PURE__ */ jsx59("div", { className: "mt-base w-full", children: media }) : null,
|
|
6943
|
+
proof ? /* @__PURE__ */ jsxs53("div", { className: "mt-base flex items-center gap-md", children: [
|
|
6944
|
+
/* @__PURE__ */ jsx59("div", { className: "inline-flex shrink-0", children: /* @__PURE__ */ jsx59(AvatarGroup, { items: proof.avatars, size: "md", layout: "stacked", max: 4 }) }),
|
|
6945
|
+
/* @__PURE__ */ jsx59("p", { className: "text-body-sm text-body [&_strong]:font-weight-label [&_strong]:text-ink", children: proof.text })
|
|
6843
6946
|
] }) : null
|
|
6844
6947
|
]
|
|
6845
6948
|
}
|
|
@@ -6848,20 +6951,20 @@ var HeroSectionMobile = React58.forwardRef(
|
|
|
6848
6951
|
HeroSectionMobile.displayName = "HeroSectionMobile";
|
|
6849
6952
|
|
|
6850
6953
|
// virtual-pkg:src/atoms/HeroSection/HeroSection.tsx
|
|
6851
|
-
import { jsx as
|
|
6852
|
-
var HeroSection =
|
|
6853
|
-
({ className, surface = "canvas", inset = true, ...props }, ref) => /* @__PURE__ */
|
|
6854
|
-
/* @__PURE__ */
|
|
6855
|
-
/* @__PURE__ */
|
|
6954
|
+
import { jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
6955
|
+
var HeroSection = React60.forwardRef(
|
|
6956
|
+
({ className, surface = "canvas", inset = true, ...props }, ref) => /* @__PURE__ */ jsxs54("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
6957
|
+
/* @__PURE__ */ jsx60("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx60(HeroSectionDesktop, { surface, inset, ...props }) }),
|
|
6958
|
+
/* @__PURE__ */ jsx60("div", { className: "md:hidden", children: /* @__PURE__ */ jsx60(HeroSectionMobile, { surface, inset, ...props }) })
|
|
6856
6959
|
] })
|
|
6857
6960
|
);
|
|
6858
6961
|
HeroSection.displayName = "HeroSection";
|
|
6859
6962
|
|
|
6860
6963
|
// virtual-pkg:src/atoms/IssueCard/IssueCard.tsx
|
|
6861
|
-
import * as
|
|
6862
|
-
import { jsx as
|
|
6964
|
+
import * as React61 from "react";
|
|
6965
|
+
import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
6863
6966
|
var MAX_LABELS = 3;
|
|
6864
|
-
var IssueCard =
|
|
6967
|
+
var IssueCard = React61.forwardRef(
|
|
6865
6968
|
({
|
|
6866
6969
|
id,
|
|
6867
6970
|
title,
|
|
@@ -6903,7 +7006,7 @@ var IssueCard = React60.forwardRef(
|
|
|
6903
7006
|
onClick(event);
|
|
6904
7007
|
}
|
|
6905
7008
|
};
|
|
6906
|
-
return /* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ jsxs55(
|
|
6907
7010
|
"div",
|
|
6908
7011
|
{
|
|
6909
7012
|
ref,
|
|
@@ -6912,32 +7015,32 @@ var IssueCard = React60.forwardRef(
|
|
|
6912
7015
|
className: rootClass,
|
|
6913
7016
|
...rest,
|
|
6914
7017
|
children: [
|
|
6915
|
-
/* @__PURE__ */
|
|
6916
|
-
/* @__PURE__ */
|
|
6917
|
-
priority ? /* @__PURE__ */
|
|
6918
|
-
/* @__PURE__ */
|
|
7018
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-start justify-between gap-sm", children: [
|
|
7019
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex min-w-0 items-center gap-xs", children: [
|
|
7020
|
+
priority ? /* @__PURE__ */ jsx61("span", { className: "flex shrink-0 items-center", children: priority }) : null,
|
|
7021
|
+
/* @__PURE__ */ jsx61("span", { className: "truncate text-caption tabular-nums text-muted", children: id })
|
|
6919
7022
|
] }),
|
|
6920
|
-
actions ? /* @__PURE__ */
|
|
7023
|
+
actions ? /* @__PURE__ */ jsx61("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
|
|
6921
7024
|
] }),
|
|
6922
|
-
/* @__PURE__ */
|
|
6923
|
-
status ? /* @__PURE__ */
|
|
6924
|
-
/* @__PURE__ */
|
|
7025
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-start gap-xs", children: [
|
|
7026
|
+
status ? /* @__PURE__ */ jsx61("span", { className: "mt-xxs flex shrink-0 items-center", children: status }) : null,
|
|
7027
|
+
/* @__PURE__ */ jsx61("p", { className: "line-clamp-2 min-w-0 text-body-md text-ink", children: title })
|
|
6925
7028
|
] }),
|
|
6926
|
-
visibleLabels.length > 0 ? /* @__PURE__ */
|
|
6927
|
-
visibleLabels.map((label) => /* @__PURE__ */
|
|
6928
|
-
hiddenLabelCount > 0 ? /* @__PURE__ */
|
|
6929
|
-
/* @__PURE__ */
|
|
7029
|
+
visibleLabels.length > 0 ? /* @__PURE__ */ jsxs55("div", { className: "mt-xxs flex flex-wrap items-center gap-xs", children: [
|
|
7030
|
+
visibleLabels.map((label) => /* @__PURE__ */ jsx61(Badge, { tone: label.tone, size: "sm", children: label.name }, label.name)),
|
|
7031
|
+
hiddenLabelCount > 0 ? /* @__PURE__ */ jsxs55(Badge, { tone: "neutral", size: "sm", children: [
|
|
7032
|
+
/* @__PURE__ */ jsxs55("span", { className: "tabular-nums", children: [
|
|
6930
7033
|
"+",
|
|
6931
7034
|
hiddenLabelCount
|
|
6932
7035
|
] }),
|
|
6933
|
-
/* @__PURE__ */
|
|
7036
|
+
/* @__PURE__ */ jsx61("span", { className: "sr-only", children: " more labels" })
|
|
6934
7037
|
] }) : null
|
|
6935
7038
|
] }) : null,
|
|
6936
|
-
hasFooter ? /* @__PURE__ */
|
|
6937
|
-
/* @__PURE__ */
|
|
6938
|
-
assignee ? /* @__PURE__ */
|
|
7039
|
+
hasFooter ? /* @__PURE__ */ jsxs55("div", { className: "mt-xxs flex items-center justify-between gap-sm", children: [
|
|
7040
|
+
/* @__PURE__ */ jsx61("span", { className: "truncate text-caption text-muted-soft", children: meta }),
|
|
7041
|
+
assignee ? /* @__PURE__ */ jsx61(Avatar, { size: "xs", name: assignee.name, src: assignee.src, className: "shrink-0" }) : null
|
|
6939
7042
|
] }) : null,
|
|
6940
|
-
href ? /* @__PURE__ */
|
|
7043
|
+
href ? /* @__PURE__ */ jsx61(
|
|
6941
7044
|
"a",
|
|
6942
7045
|
{
|
|
6943
7046
|
href,
|
|
@@ -6946,7 +7049,7 @@ var IssueCard = React60.forwardRef(
|
|
|
6946
7049
|
"aria-current": selected ? "true" : void 0,
|
|
6947
7050
|
className: triggerClass
|
|
6948
7051
|
}
|
|
6949
|
-
) : onClick ? /* @__PURE__ */
|
|
7052
|
+
) : onClick ? /* @__PURE__ */ jsx61(
|
|
6950
7053
|
"a",
|
|
6951
7054
|
{
|
|
6952
7055
|
role: "button",
|
|
@@ -6966,10 +7069,10 @@ var IssueCard = React60.forwardRef(
|
|
|
6966
7069
|
IssueCard.displayName = "IssueCard";
|
|
6967
7070
|
|
|
6968
7071
|
// virtual-pkg:src/atoms/ListItem/ListItem.tsx
|
|
6969
|
-
import * as
|
|
6970
|
-
import { jsx as
|
|
7072
|
+
import * as React62 from "react";
|
|
7073
|
+
import { jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
6971
7074
|
var cn47 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6972
|
-
var ListItem =
|
|
7075
|
+
var ListItem = React62.forwardRef(
|
|
6973
7076
|
({
|
|
6974
7077
|
title,
|
|
6975
7078
|
meta,
|
|
@@ -6983,7 +7086,7 @@ var ListItem = React61.forwardRef(
|
|
|
6983
7086
|
onClick,
|
|
6984
7087
|
className,
|
|
6985
7088
|
...rest
|
|
6986
|
-
}, ref) => /* @__PURE__ */
|
|
7089
|
+
}, ref) => /* @__PURE__ */ jsxs56(
|
|
6987
7090
|
"a",
|
|
6988
7091
|
{
|
|
6989
7092
|
ref,
|
|
@@ -7011,12 +7114,12 @@ var ListItem = React61.forwardRef(
|
|
|
7011
7114
|
),
|
|
7012
7115
|
...rest,
|
|
7013
7116
|
children: [
|
|
7014
|
-
leading ?? (icon && /* @__PURE__ */
|
|
7015
|
-
/* @__PURE__ */
|
|
7016
|
-
/* @__PURE__ */
|
|
7017
|
-
meta && /* @__PURE__ */
|
|
7117
|
+
leading ?? (icon && /* @__PURE__ */ jsx62(Icon, { name: icon, size: 18, className: "shrink-0 text-ink group-data-[disabled]:text-muted" })),
|
|
7118
|
+
/* @__PURE__ */ jsxs56("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
7119
|
+
/* @__PURE__ */ jsx62("span", { className: "truncate text-body-md text-ink group-data-[disabled]:text-muted", children: title }),
|
|
7120
|
+
meta && /* @__PURE__ */ jsx62("span", { className: "truncate text-body-sm text-muted", children: meta })
|
|
7018
7121
|
] }),
|
|
7019
|
-
trailing === void 0 ? /* @__PURE__ */
|
|
7122
|
+
trailing === void 0 ? /* @__PURE__ */ jsx62(
|
|
7020
7123
|
Icon,
|
|
7021
7124
|
{
|
|
7022
7125
|
name: "chevron-right",
|
|
@@ -7031,14 +7134,14 @@ var ListItem = React61.forwardRef(
|
|
|
7031
7134
|
ListItem.displayName = "ListItem";
|
|
7032
7135
|
|
|
7033
7136
|
// virtual-pkg:src/atoms/Navbar/Navbar.tsx
|
|
7034
|
-
import * as
|
|
7137
|
+
import * as React65 from "react";
|
|
7035
7138
|
|
|
7036
7139
|
// virtual-pkg:src/atoms/NavbarDesktop/NavbarDesktop.tsx
|
|
7037
|
-
import * as
|
|
7140
|
+
import * as React63 from "react";
|
|
7038
7141
|
import { createPortal as createPortal7 } from "react-dom";
|
|
7039
|
-
import { jsx as
|
|
7142
|
+
import { jsx as jsx63, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
7040
7143
|
var cn48 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7041
|
-
var NavbarDesktop =
|
|
7144
|
+
var NavbarDesktop = React63.forwardRef(
|
|
7042
7145
|
({
|
|
7043
7146
|
brandName = "Linear",
|
|
7044
7147
|
brandHref = "#",
|
|
@@ -7054,26 +7157,26 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7054
7157
|
className,
|
|
7055
7158
|
...rest
|
|
7056
7159
|
}, ref) => {
|
|
7057
|
-
const menuId =
|
|
7058
|
-
const triggerRef =
|
|
7059
|
-
const panelRef =
|
|
7060
|
-
const [innerOpen, setInnerOpen] =
|
|
7061
|
-
const [mounted, setMounted] =
|
|
7062
|
-
const [rect, setRect] =
|
|
7160
|
+
const menuId = React63.useId();
|
|
7161
|
+
const triggerRef = React63.useRef(null);
|
|
7162
|
+
const panelRef = React63.useRef(null);
|
|
7163
|
+
const [innerOpen, setInnerOpen] = React63.useState(false);
|
|
7164
|
+
const [mounted, setMounted] = React63.useState(false);
|
|
7165
|
+
const [rect, setRect] = React63.useState(null);
|
|
7063
7166
|
const open = menuOpen ?? innerOpen;
|
|
7064
|
-
|
|
7065
|
-
const setOpen =
|
|
7167
|
+
React63.useEffect(() => setMounted(true), []);
|
|
7168
|
+
const setOpen = React63.useCallback(
|
|
7066
7169
|
(next) => {
|
|
7067
7170
|
if (menuOpen === void 0) setInnerOpen(next);
|
|
7068
7171
|
onMenuOpenChange?.(next);
|
|
7069
7172
|
},
|
|
7070
7173
|
[menuOpen, onMenuOpenChange]
|
|
7071
7174
|
);
|
|
7072
|
-
const place2 =
|
|
7175
|
+
const place2 = React63.useCallback(() => {
|
|
7073
7176
|
const box = triggerRef.current?.getBoundingClientRect();
|
|
7074
7177
|
if (box) setRect({ top: box.bottom + 6, right: window.innerWidth - box.right });
|
|
7075
7178
|
}, []);
|
|
7076
|
-
|
|
7179
|
+
React63.useLayoutEffect(() => {
|
|
7077
7180
|
if (!open) return;
|
|
7078
7181
|
place2();
|
|
7079
7182
|
window.addEventListener("resize", place2);
|
|
@@ -7083,7 +7186,7 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7083
7186
|
window.removeEventListener("scroll", place2, true);
|
|
7084
7187
|
};
|
|
7085
7188
|
}, [open, place2]);
|
|
7086
|
-
|
|
7189
|
+
React63.useEffect(() => {
|
|
7087
7190
|
if (!open) return;
|
|
7088
7191
|
const onDown = (e) => {
|
|
7089
7192
|
const t = e.target;
|
|
@@ -7113,7 +7216,7 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7113
7216
|
const next = e.key === "ArrowDown" ? (idx + 1) % rows.length : (idx - 1 + rows.length) % rows.length;
|
|
7114
7217
|
rows[next]?.focus();
|
|
7115
7218
|
};
|
|
7116
|
-
const panel = /* @__PURE__ */
|
|
7219
|
+
const panel = /* @__PURE__ */ jsx63(
|
|
7117
7220
|
"div",
|
|
7118
7221
|
{
|
|
7119
7222
|
ref: panelRef,
|
|
@@ -7130,9 +7233,9 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7130
7233
|
zIndex: "var(--z-popover, 1300)"
|
|
7131
7234
|
},
|
|
7132
7235
|
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",
|
|
7133
|
-
children: menuItems.map((m) => /* @__PURE__ */
|
|
7134
|
-
m.separated && /* @__PURE__ */
|
|
7135
|
-
/* @__PURE__ */
|
|
7236
|
+
children: menuItems.map((m) => /* @__PURE__ */ jsxs57(React63.Fragment, { children: [
|
|
7237
|
+
m.separated && /* @__PURE__ */ jsx63(Divider, { className: "my-xs" }),
|
|
7238
|
+
/* @__PURE__ */ jsx63(
|
|
7136
7239
|
MenuItem,
|
|
7137
7240
|
{
|
|
7138
7241
|
icon: m.icon,
|
|
@@ -7149,7 +7252,7 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7149
7252
|
] }, m.label))
|
|
7150
7253
|
}
|
|
7151
7254
|
);
|
|
7152
|
-
return /* @__PURE__ */
|
|
7255
|
+
return /* @__PURE__ */ jsxs57(
|
|
7153
7256
|
"header",
|
|
7154
7257
|
{
|
|
7155
7258
|
ref,
|
|
@@ -7159,11 +7262,11 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7159
7262
|
),
|
|
7160
7263
|
...rest,
|
|
7161
7264
|
children: [
|
|
7162
|
-
/* @__PURE__ */
|
|
7163
|
-
/* @__PURE__ */
|
|
7164
|
-
/* @__PURE__ */
|
|
7265
|
+
/* @__PURE__ */ jsx63(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
7266
|
+
/* @__PURE__ */ jsx63("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ jsx63(Divider, { orientation: "vertical" }) }),
|
|
7267
|
+
/* @__PURE__ */ jsx63("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-x-auto", children: items.map((item) => {
|
|
7165
7268
|
const current = item.href === activeHref;
|
|
7166
|
-
return /* @__PURE__ */
|
|
7269
|
+
return /* @__PURE__ */ jsxs57(
|
|
7167
7270
|
"a",
|
|
7168
7271
|
{
|
|
7169
7272
|
href: item.href,
|
|
@@ -7174,16 +7277,16 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7174
7277
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
7175
7278
|
),
|
|
7176
7279
|
children: [
|
|
7177
|
-
item.icon && /* @__PURE__ */
|
|
7280
|
+
item.icon && /* @__PURE__ */ jsx63(Icon, { name: item.icon, size: 16 }),
|
|
7178
7281
|
item.label
|
|
7179
7282
|
]
|
|
7180
7283
|
},
|
|
7181
7284
|
item.href
|
|
7182
7285
|
);
|
|
7183
7286
|
}) }),
|
|
7184
|
-
/* @__PURE__ */
|
|
7185
|
-
onSearch && /* @__PURE__ */
|
|
7186
|
-
/* @__PURE__ */
|
|
7287
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
7288
|
+
onSearch && /* @__PURE__ */ jsx63(IconButton, { icon: "search", variant: "ghost", "aria-label": "Search", onClick: onSearch }),
|
|
7289
|
+
/* @__PURE__ */ jsx63(
|
|
7187
7290
|
Button,
|
|
7188
7291
|
{
|
|
7189
7292
|
ref: triggerRef,
|
|
@@ -7197,8 +7300,8 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7197
7300
|
if (!open) place2();
|
|
7198
7301
|
setOpen(!open);
|
|
7199
7302
|
},
|
|
7200
|
-
leadingIcon: /* @__PURE__ */
|
|
7201
|
-
trailingIcon: /* @__PURE__ */
|
|
7303
|
+
leadingIcon: /* @__PURE__ */ jsx63(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }),
|
|
7304
|
+
trailingIcon: /* @__PURE__ */ jsx63(
|
|
7202
7305
|
Icon,
|
|
7203
7306
|
{
|
|
7204
7307
|
name: "chevron-down",
|
|
@@ -7218,11 +7321,11 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7218
7321
|
NavbarDesktop.displayName = "NavbarDesktop";
|
|
7219
7322
|
|
|
7220
7323
|
// virtual-pkg:src/atoms/NavbarMobile/NavbarMobile.tsx
|
|
7221
|
-
import * as
|
|
7222
|
-
import { Fragment as Fragment7, jsx as
|
|
7324
|
+
import * as React64 from "react";
|
|
7325
|
+
import { Fragment as Fragment7, jsx as jsx64, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
7223
7326
|
var cn49 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7224
7327
|
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";
|
|
7225
|
-
var NavbarMobile =
|
|
7328
|
+
var NavbarMobile = React64.forwardRef(
|
|
7226
7329
|
({
|
|
7227
7330
|
brandName = "Linear",
|
|
7228
7331
|
brandHref = "#",
|
|
@@ -7238,14 +7341,14 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7238
7341
|
className,
|
|
7239
7342
|
...rest
|
|
7240
7343
|
}, ref) => {
|
|
7241
|
-
const panelId =
|
|
7242
|
-
const [innerOpen, setInnerOpen] =
|
|
7344
|
+
const panelId = React64.useId();
|
|
7345
|
+
const [innerOpen, setInnerOpen] = React64.useState(defaultOpen);
|
|
7243
7346
|
const open = openProp ?? innerOpen;
|
|
7244
7347
|
const setOpen = (next) => {
|
|
7245
7348
|
if (openProp === void 0) setInnerOpen(next);
|
|
7246
7349
|
onOpenChange?.(next);
|
|
7247
7350
|
};
|
|
7248
|
-
|
|
7351
|
+
React64.useEffect(() => {
|
|
7249
7352
|
if (!open) return;
|
|
7250
7353
|
const onKey = (e) => {
|
|
7251
7354
|
if (e.key === "Escape") {
|
|
@@ -7257,7 +7360,7 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7257
7360
|
return () => document.removeEventListener("keydown", onKey);
|
|
7258
7361
|
}, [open, openProp, onOpenChange]);
|
|
7259
7362
|
const state = open ? "open" : "closed";
|
|
7260
|
-
return /* @__PURE__ */
|
|
7363
|
+
return /* @__PURE__ */ jsxs58(
|
|
7261
7364
|
"header",
|
|
7262
7365
|
{
|
|
7263
7366
|
ref,
|
|
@@ -7265,9 +7368,9 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7265
7368
|
className: cn49("w-full border-b border-hairline bg-canvas text-ink", className),
|
|
7266
7369
|
...rest,
|
|
7267
7370
|
children: [
|
|
7268
|
-
/* @__PURE__ */
|
|
7269
|
-
/* @__PURE__ */
|
|
7270
|
-
/* @__PURE__ */
|
|
7371
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex h-14 items-center justify-between gap-sm px-base", children: [
|
|
7372
|
+
/* @__PURE__ */ jsx64(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
7373
|
+
/* @__PURE__ */ jsx64(
|
|
7271
7374
|
IconButton,
|
|
7272
7375
|
{
|
|
7273
7376
|
icon: open ? "x" : "menu",
|
|
@@ -7279,22 +7382,22 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7279
7382
|
}
|
|
7280
7383
|
)
|
|
7281
7384
|
] }),
|
|
7282
|
-
/* @__PURE__ */
|
|
7385
|
+
/* @__PURE__ */ jsx64(
|
|
7283
7386
|
"div",
|
|
7284
7387
|
{
|
|
7285
7388
|
id: panelId,
|
|
7286
7389
|
"data-state": state,
|
|
7287
7390
|
"aria-hidden": open ? void 0 : true,
|
|
7288
7391
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
7289
|
-
children: /* @__PURE__ */
|
|
7392
|
+
children: /* @__PURE__ */ jsx64("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxs58(
|
|
7290
7393
|
"div",
|
|
7291
7394
|
{
|
|
7292
7395
|
"data-state": state,
|
|
7293
7396
|
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",
|
|
7294
7397
|
children: [
|
|
7295
|
-
/* @__PURE__ */
|
|
7398
|
+
/* @__PURE__ */ jsx64("nav", { "aria-label": "Primary", className: "flex flex-col gap-xxs", children: items.map((item) => {
|
|
7296
7399
|
const current = item.href === activeHref;
|
|
7297
|
-
return /* @__PURE__ */
|
|
7400
|
+
return /* @__PURE__ */ jsxs58(
|
|
7298
7401
|
"a",
|
|
7299
7402
|
{
|
|
7300
7403
|
href: item.href,
|
|
@@ -7309,31 +7412,31 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7309
7412
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
7310
7413
|
),
|
|
7311
7414
|
children: [
|
|
7312
|
-
item.icon && /* @__PURE__ */
|
|
7415
|
+
item.icon && /* @__PURE__ */ jsx64(Icon, { name: item.icon, size: 16, className: "text-body" }),
|
|
7313
7416
|
item.label
|
|
7314
7417
|
]
|
|
7315
7418
|
},
|
|
7316
7419
|
item.href
|
|
7317
7420
|
);
|
|
7318
7421
|
}) }),
|
|
7319
|
-
(userName || accountActions.length > 0) && /* @__PURE__ */
|
|
7320
|
-
/* @__PURE__ */
|
|
7321
|
-
userName && /* @__PURE__ */
|
|
7322
|
-
/* @__PURE__ */
|
|
7323
|
-
/* @__PURE__ */
|
|
7422
|
+
(userName || accountActions.length > 0) && /* @__PURE__ */ jsxs58(Fragment7, { children: [
|
|
7423
|
+
/* @__PURE__ */ jsx64(Divider, { className: "my-sm" }),
|
|
7424
|
+
userName && /* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-sm px-base py-sm", children: [
|
|
7425
|
+
/* @__PURE__ */ jsx64(Avatar, { name: userName, src: userAvatarSrc, size: "xs" }),
|
|
7426
|
+
/* @__PURE__ */ jsx64("span", { className: "truncate text-body-md text-ink", children: userName })
|
|
7324
7427
|
] }),
|
|
7325
|
-
/* @__PURE__ */
|
|
7428
|
+
/* @__PURE__ */ jsx64("div", { "aria-label": "Account", role: "group", className: "flex flex-col gap-xxs", children: accountActions.map((a) => /* @__PURE__ */ jsx64(
|
|
7326
7429
|
Button,
|
|
7327
7430
|
{
|
|
7328
7431
|
variant: "item",
|
|
7329
7432
|
size: "lg",
|
|
7330
7433
|
tabIndex: open ? 0 : -1,
|
|
7331
|
-
leadingIcon: a.icon ? /* @__PURE__ */
|
|
7434
|
+
leadingIcon: a.icon ? /* @__PURE__ */ jsx64(Icon, { name: a.icon, size: 16, className: a.tone === "destructive" ? "text-semantic-error" : "text-body" }) : void 0,
|
|
7332
7435
|
onClick: () => {
|
|
7333
7436
|
a.onSelect?.();
|
|
7334
7437
|
setOpen(false);
|
|
7335
7438
|
},
|
|
7336
|
-
children: /* @__PURE__ */
|
|
7439
|
+
children: /* @__PURE__ */ jsx64("span", { className: a.tone === "destructive" ? "text-semantic-error" : void 0, children: a.label })
|
|
7337
7440
|
},
|
|
7338
7441
|
a.label
|
|
7339
7442
|
)) })
|
|
@@ -7351,8 +7454,8 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7351
7454
|
NavbarMobile.displayName = "NavbarMobile";
|
|
7352
7455
|
|
|
7353
7456
|
// virtual-pkg:src/atoms/Navbar/Navbar.tsx
|
|
7354
|
-
import { jsx as
|
|
7355
|
-
var Navbar =
|
|
7457
|
+
import { jsx as jsx65, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
7458
|
+
var Navbar = React65.forwardRef(
|
|
7356
7459
|
({
|
|
7357
7460
|
brandName,
|
|
7358
7461
|
brandHref,
|
|
@@ -7371,8 +7474,8 @@ var Navbar = React64.forwardRef(
|
|
|
7371
7474
|
className
|
|
7372
7475
|
}, ref) => {
|
|
7373
7476
|
const accountActions = mobileAccountActions ?? menuItems.map((m) => ({ label: m.label, icon: m.icon, tone: m.tone, onSelect: m.onSelect }));
|
|
7374
|
-
return /* @__PURE__ */
|
|
7375
|
-
/* @__PURE__ */
|
|
7477
|
+
return /* @__PURE__ */ jsxs59("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
7478
|
+
/* @__PURE__ */ jsx65("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx65(
|
|
7376
7479
|
NavbarDesktop,
|
|
7377
7480
|
{
|
|
7378
7481
|
brandName,
|
|
@@ -7388,7 +7491,7 @@ var Navbar = React64.forwardRef(
|
|
|
7388
7491
|
onMenuOpenChange
|
|
7389
7492
|
}
|
|
7390
7493
|
) }),
|
|
7391
|
-
/* @__PURE__ */
|
|
7494
|
+
/* @__PURE__ */ jsx65("div", { className: "md:hidden", children: /* @__PURE__ */ jsx65(
|
|
7392
7495
|
NavbarMobile,
|
|
7393
7496
|
{
|
|
7394
7497
|
brandName,
|
|
@@ -7409,17 +7512,17 @@ var Navbar = React64.forwardRef(
|
|
|
7409
7512
|
Navbar.displayName = "Navbar";
|
|
7410
7513
|
|
|
7411
7514
|
// virtual-pkg:src/atoms/NavigationMenu/NavigationMenu.tsx
|
|
7412
|
-
import * as
|
|
7515
|
+
import * as React68 from "react";
|
|
7413
7516
|
|
|
7414
7517
|
// virtual-pkg:src/atoms/NavigationMenuDesktop/NavigationMenuDesktop.tsx
|
|
7415
|
-
import * as
|
|
7518
|
+
import * as React66 from "react";
|
|
7416
7519
|
import { createPortal as createPortal8 } from "react-dom";
|
|
7417
|
-
import { Fragment as Fragment9, jsx as
|
|
7520
|
+
import { Fragment as Fragment9, jsx as jsx66, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
7418
7521
|
var cn50 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7419
7522
|
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";
|
|
7420
7523
|
var useScrolled = (enabled, threshold = 16) => {
|
|
7421
|
-
const [scrolled, setScrolled] =
|
|
7422
|
-
|
|
7524
|
+
const [scrolled, setScrolled] = React66.useState(false);
|
|
7525
|
+
React66.useEffect(() => {
|
|
7423
7526
|
if (!enabled) {
|
|
7424
7527
|
setScrolled(false);
|
|
7425
7528
|
return;
|
|
@@ -7431,7 +7534,7 @@ var useScrolled = (enabled, threshold = 16) => {
|
|
|
7431
7534
|
}, [enabled, threshold]);
|
|
7432
7535
|
return scrolled;
|
|
7433
7536
|
};
|
|
7434
|
-
var NavigationMenuDesktop =
|
|
7537
|
+
var NavigationMenuDesktop = React66.forwardRef(
|
|
7435
7538
|
({
|
|
7436
7539
|
brandName = "Linear",
|
|
7437
7540
|
brandHref = "#",
|
|
@@ -7446,23 +7549,23 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7446
7549
|
className,
|
|
7447
7550
|
...rest
|
|
7448
7551
|
}, ref) => {
|
|
7449
|
-
const baseId =
|
|
7450
|
-
const [innerOpen, setInnerOpen] =
|
|
7552
|
+
const baseId = React66.useId();
|
|
7553
|
+
const [innerOpen, setInnerOpen] = React66.useState(null);
|
|
7451
7554
|
const openId = openIdProp !== void 0 ? openIdProp : innerOpen;
|
|
7452
|
-
const [mounted, setMounted] =
|
|
7453
|
-
const [rects, setRects] =
|
|
7454
|
-
const triggerRefs =
|
|
7455
|
-
const panelRefs =
|
|
7555
|
+
const [mounted, setMounted] = React66.useState(false);
|
|
7556
|
+
const [rects, setRects] = React66.useState({});
|
|
7557
|
+
const triggerRefs = React66.useRef({});
|
|
7558
|
+
const panelRefs = React66.useRef({});
|
|
7456
7559
|
const scrolled = useScrolled(transparent);
|
|
7457
|
-
|
|
7458
|
-
const setOpenId =
|
|
7560
|
+
React66.useEffect(() => setMounted(true), []);
|
|
7561
|
+
const setOpenId = React66.useCallback(
|
|
7459
7562
|
(id) => {
|
|
7460
7563
|
if (openIdProp === void 0) setInnerOpen(id);
|
|
7461
7564
|
onOpenIdChange?.(id);
|
|
7462
7565
|
},
|
|
7463
7566
|
[openIdProp, onOpenIdChange]
|
|
7464
7567
|
);
|
|
7465
|
-
const place2 =
|
|
7568
|
+
const place2 = React66.useCallback((id) => {
|
|
7466
7569
|
const el = triggerRefs.current[id];
|
|
7467
7570
|
const box = el?.getBoundingClientRect();
|
|
7468
7571
|
if (!box) return;
|
|
@@ -7471,7 +7574,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7471
7574
|
const left = Math.max(16, Math.min(box.left, window.innerWidth - width - 16));
|
|
7472
7575
|
setRects((prev) => ({ ...prev, [id]: { top: box.bottom + 6, left } }));
|
|
7473
7576
|
}, [items]);
|
|
7474
|
-
|
|
7577
|
+
React66.useLayoutEffect(() => {
|
|
7475
7578
|
if (!openId) return;
|
|
7476
7579
|
place2(openId);
|
|
7477
7580
|
const onMove = () => place2(openId);
|
|
@@ -7485,7 +7588,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7485
7588
|
window.removeEventListener("scroll", onMove, true);
|
|
7486
7589
|
};
|
|
7487
7590
|
}, [openId, place2]);
|
|
7488
|
-
|
|
7591
|
+
React66.useEffect(() => {
|
|
7489
7592
|
if (!openId) return;
|
|
7490
7593
|
const onDown = (e) => {
|
|
7491
7594
|
const t = e.target;
|
|
@@ -7520,7 +7623,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7520
7623
|
zIndex: "var(--z-popover, 1300)"
|
|
7521
7624
|
};
|
|
7522
7625
|
if (item.columns) {
|
|
7523
|
-
return /* @__PURE__ */
|
|
7626
|
+
return /* @__PURE__ */ jsx66(
|
|
7524
7627
|
"div",
|
|
7525
7628
|
{
|
|
7526
7629
|
ref: (el) => {
|
|
@@ -7532,11 +7635,11 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7532
7635
|
"data-state": open ? "open" : "closed",
|
|
7533
7636
|
style: { ...style, width: "min(760px, calc(100vw - 32px))" },
|
|
7534
7637
|
className: cn50("origin-top rounded-xl border border-hairline bg-canvas p-lg text-ink shadow-overlay", panelMotion),
|
|
7535
|
-
children: /* @__PURE__ */
|
|
7536
|
-
/* @__PURE__ */
|
|
7537
|
-
/* @__PURE__ */
|
|
7638
|
+
children: /* @__PURE__ */ jsx66("div", { className: "grid grid-cols-3 gap-lg", children: item.columns.map((col) => /* @__PURE__ */ jsxs60("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
7639
|
+
/* @__PURE__ */ jsx66("p", { className: "px-sm text-label text-ink", children: col.title }),
|
|
7640
|
+
/* @__PURE__ */ jsx66("ul", { className: "flex flex-col", children: col.links.map((link) => {
|
|
7538
7641
|
const current = link.href === activeHref;
|
|
7539
|
-
return /* @__PURE__ */
|
|
7642
|
+
return /* @__PURE__ */ jsx66("li", { children: /* @__PURE__ */ jsx66(
|
|
7540
7643
|
"a",
|
|
7541
7644
|
{
|
|
7542
7645
|
href: link.href,
|
|
@@ -7556,7 +7659,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7556
7659
|
item.id
|
|
7557
7660
|
);
|
|
7558
7661
|
}
|
|
7559
|
-
return /* @__PURE__ */
|
|
7662
|
+
return /* @__PURE__ */ jsx66(
|
|
7560
7663
|
"div",
|
|
7561
7664
|
{
|
|
7562
7665
|
ref: (el) => {
|
|
@@ -7570,9 +7673,9 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7570
7673
|
className: cn50("origin-top rounded-lg border border-hairline bg-canvas p-xs text-ink shadow-overlay", panelMotion),
|
|
7571
7674
|
children: (item.menu ?? []).map((link) => {
|
|
7572
7675
|
const current = link.href === activeHref;
|
|
7573
|
-
return /* @__PURE__ */
|
|
7574
|
-
link.separated && /* @__PURE__ */
|
|
7575
|
-
/* @__PURE__ */
|
|
7676
|
+
return /* @__PURE__ */ jsxs60(React66.Fragment, { children: [
|
|
7677
|
+
link.separated && /* @__PURE__ */ jsx66(Divider, { className: "my-xs" }),
|
|
7678
|
+
/* @__PURE__ */ jsx66(
|
|
7576
7679
|
"a",
|
|
7577
7680
|
{
|
|
7578
7681
|
href: link.href,
|
|
@@ -7594,7 +7697,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7594
7697
|
);
|
|
7595
7698
|
};
|
|
7596
7699
|
const solid = !transparent || scrolled;
|
|
7597
|
-
return /* @__PURE__ */
|
|
7700
|
+
return /* @__PURE__ */ jsxs60(
|
|
7598
7701
|
"header",
|
|
7599
7702
|
{
|
|
7600
7703
|
ref,
|
|
@@ -7607,14 +7710,14 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7607
7710
|
),
|
|
7608
7711
|
...rest,
|
|
7609
7712
|
children: [
|
|
7610
|
-
/* @__PURE__ */
|
|
7611
|
-
/* @__PURE__ */
|
|
7612
|
-
/* @__PURE__ */
|
|
7713
|
+
/* @__PURE__ */ jsx66(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
7714
|
+
/* @__PURE__ */ jsx66("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ jsx66(Divider, { orientation: "vertical" }) }),
|
|
7715
|
+
/* @__PURE__ */ jsx66("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-hidden", children: items.map((item) => {
|
|
7613
7716
|
const hasPanel = Boolean(item.menu?.length || item.columns?.length);
|
|
7614
7717
|
const current = item.id === activeId;
|
|
7615
7718
|
const open = openId === item.id;
|
|
7616
7719
|
if (!hasPanel) {
|
|
7617
|
-
return /* @__PURE__ */
|
|
7720
|
+
return /* @__PURE__ */ jsxs60(
|
|
7618
7721
|
"a",
|
|
7619
7722
|
{
|
|
7620
7723
|
href: item.href ?? "#",
|
|
@@ -7628,14 +7731,14 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7628
7731
|
current ? "bg-surface-strong text-ink" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
7629
7732
|
),
|
|
7630
7733
|
children: [
|
|
7631
|
-
item.icon && /* @__PURE__ */
|
|
7734
|
+
item.icon && /* @__PURE__ */ jsx66(Icon, { name: item.icon, size: 16 }),
|
|
7632
7735
|
item.label
|
|
7633
7736
|
]
|
|
7634
7737
|
},
|
|
7635
7738
|
item.id
|
|
7636
7739
|
);
|
|
7637
7740
|
}
|
|
7638
|
-
return /* @__PURE__ */
|
|
7741
|
+
return /* @__PURE__ */ jsx66(
|
|
7639
7742
|
Button,
|
|
7640
7743
|
{
|
|
7641
7744
|
ref: (el) => {
|
|
@@ -7650,8 +7753,8 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7650
7753
|
if (!open) place2(item.id);
|
|
7651
7754
|
setOpenId(open ? null : item.id);
|
|
7652
7755
|
},
|
|
7653
|
-
leadingIcon: item.icon ? /* @__PURE__ */
|
|
7654
|
-
trailingIcon: /* @__PURE__ */
|
|
7756
|
+
leadingIcon: item.icon ? /* @__PURE__ */ jsx66(Icon, { name: item.icon, size: 16 }) : void 0,
|
|
7757
|
+
trailingIcon: /* @__PURE__ */ jsx66(
|
|
7655
7758
|
Icon,
|
|
7656
7759
|
{
|
|
7657
7760
|
name: "chevron-down",
|
|
@@ -7664,9 +7767,9 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7664
7767
|
item.id
|
|
7665
7768
|
);
|
|
7666
7769
|
}) }),
|
|
7667
|
-
actions !== void 0 && /* @__PURE__ */
|
|
7770
|
+
actions !== void 0 && /* @__PURE__ */ jsx66("div", { className: "flex shrink-0 items-center gap-sm", children: actions }),
|
|
7668
7771
|
mounted ? createPortal8(
|
|
7669
|
-
/* @__PURE__ */
|
|
7772
|
+
/* @__PURE__ */ jsx66(Fragment9, { children: items.filter((i) => i.menu?.length || i.columns?.length).map(renderPanel) }),
|
|
7670
7773
|
document.body
|
|
7671
7774
|
) : null
|
|
7672
7775
|
]
|
|
@@ -7677,13 +7780,13 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7677
7780
|
NavigationMenuDesktop.displayName = "NavigationMenuDesktop";
|
|
7678
7781
|
|
|
7679
7782
|
// virtual-pkg:src/atoms/NavigationMenuMobile/NavigationMenuMobile.tsx
|
|
7680
|
-
import * as
|
|
7681
|
-
import { jsx as
|
|
7783
|
+
import * as React67 from "react";
|
|
7784
|
+
import { jsx as jsx67, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
7682
7785
|
var cn51 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7683
7786
|
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";
|
|
7684
7787
|
var useScrolled2 = (enabled, threshold = 16) => {
|
|
7685
|
-
const [scrolled, setScrolled] =
|
|
7686
|
-
|
|
7788
|
+
const [scrolled, setScrolled] = React67.useState(false);
|
|
7789
|
+
React67.useEffect(() => {
|
|
7687
7790
|
if (!enabled) {
|
|
7688
7791
|
setScrolled(false);
|
|
7689
7792
|
return;
|
|
@@ -7695,7 +7798,7 @@ var useScrolled2 = (enabled, threshold = 16) => {
|
|
|
7695
7798
|
}, [enabled, threshold]);
|
|
7696
7799
|
return scrolled;
|
|
7697
7800
|
};
|
|
7698
|
-
var NavigationMenuMobile =
|
|
7801
|
+
var NavigationMenuMobile = React67.forwardRef(
|
|
7699
7802
|
({
|
|
7700
7803
|
brandName = "Linear",
|
|
7701
7804
|
brandHref = "#",
|
|
@@ -7715,25 +7818,25 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7715
7818
|
className,
|
|
7716
7819
|
...rest
|
|
7717
7820
|
}, ref) => {
|
|
7718
|
-
const autoId =
|
|
7821
|
+
const autoId = React67.useId();
|
|
7719
7822
|
const panelId = panelIdProp ?? `${autoId}-panel`;
|
|
7720
|
-
const [innerOpen, setInnerOpen] =
|
|
7823
|
+
const [innerOpen, setInnerOpen] = React67.useState(defaultOpen);
|
|
7721
7824
|
const open = openProp ?? innerOpen;
|
|
7722
|
-
const setOpen =
|
|
7825
|
+
const setOpen = React67.useCallback(
|
|
7723
7826
|
(next) => {
|
|
7724
7827
|
if (openProp === void 0) setInnerOpen(next);
|
|
7725
7828
|
onOpenChange?.(next);
|
|
7726
7829
|
},
|
|
7727
7830
|
[openProp, onOpenChange]
|
|
7728
7831
|
);
|
|
7729
|
-
const [innerSection, setInnerSection] =
|
|
7832
|
+
const [innerSection, setInnerSection] = React67.useState(null);
|
|
7730
7833
|
const section = sectionProp !== void 0 ? sectionProp : innerSection;
|
|
7731
7834
|
const setSection = (id) => {
|
|
7732
7835
|
if (sectionProp === void 0) setInnerSection(id);
|
|
7733
7836
|
onSectionIdChange?.(id);
|
|
7734
7837
|
};
|
|
7735
7838
|
const scrolled = useScrolled2(transparent);
|
|
7736
|
-
|
|
7839
|
+
React67.useEffect(() => {
|
|
7737
7840
|
if (!open) return;
|
|
7738
7841
|
const onKey = (e) => {
|
|
7739
7842
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -7745,9 +7848,9 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7745
7848
|
const solid = !transparent || scrolled || open;
|
|
7746
7849
|
const subLink = (link, tabbable) => {
|
|
7747
7850
|
const current = link.href === activeHref;
|
|
7748
|
-
return /* @__PURE__ */
|
|
7749
|
-
link.separated && /* @__PURE__ */
|
|
7750
|
-
/* @__PURE__ */
|
|
7851
|
+
return /* @__PURE__ */ jsxs61("li", { children: [
|
|
7852
|
+
link.separated && /* @__PURE__ */ jsx67(Divider, { className: "my-xs" }),
|
|
7853
|
+
/* @__PURE__ */ jsx67(
|
|
7751
7854
|
"a",
|
|
7752
7855
|
{
|
|
7753
7856
|
href: link.href,
|
|
@@ -7766,7 +7869,7 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7766
7869
|
)
|
|
7767
7870
|
] }, link.href);
|
|
7768
7871
|
};
|
|
7769
|
-
return /* @__PURE__ */
|
|
7872
|
+
return /* @__PURE__ */ jsxs61(
|
|
7770
7873
|
"header",
|
|
7771
7874
|
{
|
|
7772
7875
|
ref,
|
|
@@ -7780,11 +7883,11 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7780
7883
|
),
|
|
7781
7884
|
...rest,
|
|
7782
7885
|
children: [
|
|
7783
|
-
/* @__PURE__ */
|
|
7784
|
-
/* @__PURE__ */
|
|
7785
|
-
/* @__PURE__ */
|
|
7786
|
-
actions !== void 0 && /* @__PURE__ */
|
|
7787
|
-
trigger ?? /* @__PURE__ */
|
|
7886
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex h-14 min-w-0 items-center justify-between gap-sm px-base", children: [
|
|
7887
|
+
/* @__PURE__ */ jsx67(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
7888
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex min-w-0 flex-1 items-center justify-end gap-xs", children: [
|
|
7889
|
+
actions !== void 0 && /* @__PURE__ */ jsx67("div", { className: "flex shrink-0 items-center gap-xs", children: actions }),
|
|
7890
|
+
trigger ?? /* @__PURE__ */ jsx67(
|
|
7788
7891
|
IconButton,
|
|
7789
7892
|
{
|
|
7790
7893
|
icon: open ? "x" : "menu",
|
|
@@ -7797,7 +7900,7 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7797
7900
|
)
|
|
7798
7901
|
] })
|
|
7799
7902
|
] }),
|
|
7800
|
-
/* @__PURE__ */
|
|
7903
|
+
/* @__PURE__ */ jsx67(
|
|
7801
7904
|
"div",
|
|
7802
7905
|
{
|
|
7803
7906
|
id: panelId,
|
|
@@ -7807,18 +7910,18 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7807
7910
|
"grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
7808
7911
|
open && "bg-canvas"
|
|
7809
7912
|
),
|
|
7810
|
-
children: /* @__PURE__ */
|
|
7913
|
+
children: /* @__PURE__ */ jsx67("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxs61(
|
|
7811
7914
|
"nav",
|
|
7812
7915
|
{
|
|
7813
7916
|
"aria-label": "Primary",
|
|
7814
7917
|
"data-state": state,
|
|
7815
7918
|
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",
|
|
7816
7919
|
children: [
|
|
7817
|
-
/* @__PURE__ */
|
|
7920
|
+
/* @__PURE__ */ jsx67("ul", { className: "flex flex-col gap-xxs", children: items.map((item) => {
|
|
7818
7921
|
const hasSub = Boolean(item.menu?.length || item.columns?.length);
|
|
7819
7922
|
if (!hasSub) {
|
|
7820
7923
|
const current = item.href === activeHref;
|
|
7821
|
-
return /* @__PURE__ */
|
|
7924
|
+
return /* @__PURE__ */ jsx67("li", { children: /* @__PURE__ */ jsxs61(
|
|
7822
7925
|
"a",
|
|
7823
7926
|
{
|
|
7824
7927
|
href: item.href ?? "#",
|
|
@@ -7833,7 +7936,7 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7833
7936
|
current ? "bg-surface-strong text-ink" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
7834
7937
|
),
|
|
7835
7938
|
children: [
|
|
7836
|
-
item.icon && /* @__PURE__ */
|
|
7939
|
+
item.icon && /* @__PURE__ */ jsx67(Icon, { name: item.icon, size: 16, className: "text-body" }),
|
|
7837
7940
|
item.label
|
|
7838
7941
|
]
|
|
7839
7942
|
}
|
|
@@ -7841,8 +7944,8 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7841
7944
|
}
|
|
7842
7945
|
const expanded = section === item.id;
|
|
7843
7946
|
const subId = `${autoId}-${item.id}`;
|
|
7844
|
-
return /* @__PURE__ */
|
|
7845
|
-
/* @__PURE__ */
|
|
7947
|
+
return /* @__PURE__ */ jsxs61("li", { children: [
|
|
7948
|
+
/* @__PURE__ */ jsx67(
|
|
7846
7949
|
Button,
|
|
7847
7950
|
{
|
|
7848
7951
|
variant: "item",
|
|
@@ -7851,8 +7954,8 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7851
7954
|
"aria-expanded": expanded,
|
|
7852
7955
|
"aria-controls": subId,
|
|
7853
7956
|
onClick: () => setSection(expanded ? null : item.id),
|
|
7854
|
-
leadingIcon: item.icon ? /* @__PURE__ */
|
|
7855
|
-
trailingIcon: /* @__PURE__ */
|
|
7957
|
+
leadingIcon: item.icon ? /* @__PURE__ */ jsx67(Icon, { name: item.icon, size: 16, className: "text-body" }) : void 0,
|
|
7958
|
+
trailingIcon: /* @__PURE__ */ jsx67(
|
|
7856
7959
|
Icon,
|
|
7857
7960
|
{
|
|
7858
7961
|
name: "chevron-down",
|
|
@@ -7863,7 +7966,7 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7863
7966
|
children: item.label
|
|
7864
7967
|
}
|
|
7865
7968
|
),
|
|
7866
|
-
/* @__PURE__ */
|
|
7969
|
+
/* @__PURE__ */ jsx67(
|
|
7867
7970
|
"div",
|
|
7868
7971
|
{
|
|
7869
7972
|
id: subId,
|
|
@@ -7871,18 +7974,18 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7871
7974
|
"aria-label": item.label,
|
|
7872
7975
|
"data-state": expanded ? "open" : "closed",
|
|
7873
7976
|
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",
|
|
7874
|
-
children: /* @__PURE__ */
|
|
7875
|
-
item.menu && /* @__PURE__ */
|
|
7876
|
-
item.columns?.map((col) => /* @__PURE__ */
|
|
7877
|
-
/* @__PURE__ */
|
|
7878
|
-
/* @__PURE__ */
|
|
7977
|
+
children: /* @__PURE__ */ jsx67("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxs61("div", { className: "py-xs pl-lg", children: [
|
|
7978
|
+
item.menu && /* @__PURE__ */ jsx67("ul", { className: "flex flex-col gap-xxs", children: item.menu.map((l) => subLink(l, open && expanded)) }),
|
|
7979
|
+
item.columns?.map((col) => /* @__PURE__ */ jsxs61("div", { className: "pb-xs", children: [
|
|
7980
|
+
/* @__PURE__ */ jsx67("p", { className: "px-base pb-xxs pt-sm text-caption text-muted", children: col.title }),
|
|
7981
|
+
/* @__PURE__ */ jsx67("ul", { className: "flex flex-col gap-xxs", children: col.links.map((l) => subLink(l, open && expanded)) })
|
|
7879
7982
|
] }, col.title))
|
|
7880
7983
|
] }) })
|
|
7881
7984
|
}
|
|
7882
7985
|
)
|
|
7883
7986
|
] }, item.id);
|
|
7884
7987
|
}) }),
|
|
7885
|
-
menuFooter !== void 0 && /* @__PURE__ */
|
|
7988
|
+
menuFooter !== void 0 && /* @__PURE__ */ jsx67("div", { className: "mt-sm flex flex-col gap-xs border-t border-hairline px-base pb-xs pt-sm", children: menuFooter })
|
|
7886
7989
|
]
|
|
7887
7990
|
}
|
|
7888
7991
|
) })
|
|
@@ -7896,8 +7999,8 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7896
7999
|
NavigationMenuMobile.displayName = "NavigationMenuMobile";
|
|
7897
8000
|
|
|
7898
8001
|
// virtual-pkg:src/atoms/NavigationMenu/NavigationMenu.tsx
|
|
7899
|
-
import { jsx as
|
|
7900
|
-
var NavigationMenu =
|
|
8002
|
+
import { jsx as jsx68, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
8003
|
+
var NavigationMenu = React68.forwardRef(
|
|
7901
8004
|
({
|
|
7902
8005
|
brandName,
|
|
7903
8006
|
brandHref,
|
|
@@ -7917,22 +8020,22 @@ var NavigationMenu = React67.forwardRef(
|
|
|
7917
8020
|
transparent = false,
|
|
7918
8021
|
className
|
|
7919
8022
|
}, ref) => {
|
|
7920
|
-
const autoId =
|
|
8023
|
+
const autoId = React68.useId();
|
|
7921
8024
|
const panelId = `${autoId}-panel`;
|
|
7922
|
-
const [innerOpen, setInnerOpen] =
|
|
8025
|
+
const [innerOpen, setInnerOpen] = React68.useState(false);
|
|
7923
8026
|
const open = mobileOpen ?? innerOpen;
|
|
7924
|
-
const setMobileOpen =
|
|
8027
|
+
const setMobileOpen = React68.useCallback(
|
|
7925
8028
|
(next) => {
|
|
7926
8029
|
if (mobileOpen === void 0) setInnerOpen(next);
|
|
7927
8030
|
onMobileOpenChange?.(next);
|
|
7928
8031
|
},
|
|
7929
8032
|
[mobileOpen, onMobileOpenChange]
|
|
7930
8033
|
);
|
|
7931
|
-
const closeAll =
|
|
8034
|
+
const closeAll = React68.useCallback(() => {
|
|
7932
8035
|
onOpenIdChange?.(null);
|
|
7933
8036
|
setMobileOpen(false);
|
|
7934
8037
|
}, [onOpenIdChange, setMobileOpen]);
|
|
7935
|
-
return /* @__PURE__ */
|
|
8038
|
+
return /* @__PURE__ */ jsxs62(
|
|
7936
8039
|
"div",
|
|
7937
8040
|
{
|
|
7938
8041
|
ref,
|
|
@@ -7941,7 +8044,7 @@ var NavigationMenu = React67.forwardRef(
|
|
|
7941
8044
|
},
|
|
7942
8045
|
className: ["w-full rounded-none", className].filter(Boolean).join(" "),
|
|
7943
8046
|
children: [
|
|
7944
|
-
/* @__PURE__ */
|
|
8047
|
+
/* @__PURE__ */ jsx68("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx68(
|
|
7945
8048
|
NavigationMenuDesktop,
|
|
7946
8049
|
{
|
|
7947
8050
|
brandName,
|
|
@@ -7956,7 +8059,7 @@ var NavigationMenu = React67.forwardRef(
|
|
|
7956
8059
|
transparent
|
|
7957
8060
|
}
|
|
7958
8061
|
) }),
|
|
7959
|
-
/* @__PURE__ */
|
|
8062
|
+
/* @__PURE__ */ jsx68("div", { className: "md:hidden", children: /* @__PURE__ */ jsx68(
|
|
7960
8063
|
NavigationMenuMobile,
|
|
7961
8064
|
{
|
|
7962
8065
|
brandName,
|
|
@@ -7972,7 +8075,7 @@ var NavigationMenu = React67.forwardRef(
|
|
|
7972
8075
|
menuFooter: mobileMenuFooter,
|
|
7973
8076
|
transparent,
|
|
7974
8077
|
panelId,
|
|
7975
|
-
trigger: /* @__PURE__ */
|
|
8078
|
+
trigger: /* @__PURE__ */ jsx68(
|
|
7976
8079
|
IconButton,
|
|
7977
8080
|
{
|
|
7978
8081
|
icon: open ? "x" : "menu",
|
|
@@ -7993,8 +8096,8 @@ var NavigationMenu = React67.forwardRef(
|
|
|
7993
8096
|
NavigationMenu.displayName = "NavigationMenu";
|
|
7994
8097
|
|
|
7995
8098
|
// virtual-pkg:src/atoms/NotificationFeed/NotificationFeed.tsx
|
|
7996
|
-
import * as
|
|
7997
|
-
import { jsx as
|
|
8099
|
+
import * as React69 from "react";
|
|
8100
|
+
import { jsx as jsx69, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
7998
8101
|
var FILTERS = [
|
|
7999
8102
|
{ value: "all", label: "All" },
|
|
8000
8103
|
{ value: "unread", label: "Unread" },
|
|
@@ -8008,7 +8111,7 @@ function matches(entry, filter) {
|
|
|
8008
8111
|
if (filter === "assignments") return entry.kind === "assignment";
|
|
8009
8112
|
return true;
|
|
8010
8113
|
}
|
|
8011
|
-
var NotificationFeed =
|
|
8114
|
+
var NotificationFeed = React69.forwardRef(
|
|
8012
8115
|
({
|
|
8013
8116
|
title = "Inbox",
|
|
8014
8117
|
notifications,
|
|
@@ -8022,10 +8125,10 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8022
8125
|
className,
|
|
8023
8126
|
...rest
|
|
8024
8127
|
}, ref) => {
|
|
8025
|
-
const headingId =
|
|
8128
|
+
const headingId = React69.useId();
|
|
8026
8129
|
const unreadCount = notifications.filter((n) => n.unread).length;
|
|
8027
8130
|
const visible = notifications.filter((n) => matches(n, filter));
|
|
8028
|
-
return /* @__PURE__ */
|
|
8131
|
+
return /* @__PURE__ */ jsxs63(
|
|
8029
8132
|
"section",
|
|
8030
8133
|
{
|
|
8031
8134
|
ref,
|
|
@@ -8036,14 +8139,14 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8036
8139
|
),
|
|
8037
8140
|
...rest,
|
|
8038
8141
|
children: [
|
|
8039
|
-
/* @__PURE__ */
|
|
8040
|
-
/* @__PURE__ */
|
|
8041
|
-
/* @__PURE__ */
|
|
8142
|
+
/* @__PURE__ */ jsxs63("header", { className: "flex min-w-0 items-center gap-md px-base py-md", children: [
|
|
8143
|
+
/* @__PURE__ */ jsx69("h2", { id: headingId, className: "shrink-0 text-heading-sm text-ink", children: title }),
|
|
8144
|
+
/* @__PURE__ */ jsx69("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__ */ jsx69(Chip, { selected: filter === f.value, onSelectedChange: () => onFilterChange?.(f.value), children: /* @__PURE__ */ jsxs63("span", { className: "inline-flex items-center gap-xs", children: [
|
|
8042
8145
|
f.label,
|
|
8043
|
-
f.value === "unread" && unreadCount > 0 ? /* @__PURE__ */
|
|
8146
|
+
f.value === "unread" && unreadCount > 0 ? /* @__PURE__ */ jsx69(Badge, { size: "sm", tone: "primary", children: unreadCount }) : null
|
|
8044
8147
|
] }) }, f.value)) }),
|
|
8045
|
-
/* @__PURE__ */
|
|
8046
|
-
/* @__PURE__ */
|
|
8148
|
+
/* @__PURE__ */ jsxs63("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
8149
|
+
/* @__PURE__ */ jsx69(
|
|
8047
8150
|
IconButton,
|
|
8048
8151
|
{
|
|
8049
8152
|
icon: "check",
|
|
@@ -8053,22 +8156,22 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8053
8156
|
onClick: onMarkAllRead
|
|
8054
8157
|
}
|
|
8055
8158
|
),
|
|
8056
|
-
/* @__PURE__ */
|
|
8159
|
+
/* @__PURE__ */ jsx69(IconButton, { icon: "ellipsis", variant: "ghost", "aria-label": "More options", onClick: onMoreClick })
|
|
8057
8160
|
] })
|
|
8058
8161
|
] }),
|
|
8059
|
-
visible.length === 0 ? /* @__PURE__ */
|
|
8060
|
-
/* @__PURE__ */
|
|
8061
|
-
/* @__PURE__ */
|
|
8062
|
-
/* @__PURE__ */
|
|
8063
|
-
] }) : /* @__PURE__ */
|
|
8162
|
+
visible.length === 0 ? /* @__PURE__ */ jsxs63("div", { className: "flex flex-col items-center justify-center gap-xs px-base pb-xl pt-lg text-center", children: [
|
|
8163
|
+
/* @__PURE__ */ jsx69(Icon, { name: "inbox", size: 36, strokeWidth: 1.5, className: "text-muted-soft" }),
|
|
8164
|
+
/* @__PURE__ */ jsx69("p", { className: "mt-sm text-heading-sm text-ink", children: emptyTitle }),
|
|
8165
|
+
/* @__PURE__ */ jsx69("p", { className: "text-body-sm text-muted", children: emptyDescription })
|
|
8166
|
+
] }) : /* @__PURE__ */ jsx69("ul", { className: "flex flex-col px-sm pb-sm", "aria-label": "Notifications", children: visible.map((n) => /* @__PURE__ */ jsx69("li", { children: /* @__PURE__ */ jsx69(
|
|
8064
8167
|
ListItem,
|
|
8065
8168
|
{
|
|
8066
8169
|
variant: "plain",
|
|
8067
8170
|
href: n.href,
|
|
8068
8171
|
onClick: () => onNotificationClick?.(n),
|
|
8069
8172
|
"aria-label": typeof n.title === "string" ? `${n.unread ? "Unread: " : ""}${n.title}` : void 0,
|
|
8070
|
-
leading: /* @__PURE__ */
|
|
8071
|
-
/* @__PURE__ */
|
|
8173
|
+
leading: /* @__PURE__ */ jsxs63("span", { className: "flex shrink-0 items-center gap-sm", children: [
|
|
8174
|
+
/* @__PURE__ */ jsx69(
|
|
8072
8175
|
"span",
|
|
8073
8176
|
{
|
|
8074
8177
|
"aria-hidden": "true",
|
|
@@ -8078,11 +8181,11 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8078
8181
|
)
|
|
8079
8182
|
}
|
|
8080
8183
|
),
|
|
8081
|
-
/* @__PURE__ */
|
|
8184
|
+
/* @__PURE__ */ jsx69(Icon, { name: n.icon, size: 18, className: "text-body" })
|
|
8082
8185
|
] }),
|
|
8083
8186
|
title: n.title,
|
|
8084
8187
|
meta: n.description,
|
|
8085
|
-
trailing: /* @__PURE__ */
|
|
8188
|
+
trailing: /* @__PURE__ */ jsx69("span", { className: "shrink-0 self-start pt-xxs text-body-sm text-muted tabular-nums", children: n.time })
|
|
8086
8189
|
}
|
|
8087
8190
|
) }, n.id)) })
|
|
8088
8191
|
]
|
|
@@ -8093,14 +8196,14 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8093
8196
|
NotificationFeed.displayName = "NotificationFeed";
|
|
8094
8197
|
|
|
8095
8198
|
// virtual-pkg:src/atoms/PricingTable/PricingTable.tsx
|
|
8096
|
-
import * as
|
|
8199
|
+
import * as React73 from "react";
|
|
8097
8200
|
|
|
8098
8201
|
// virtual-pkg:src/atoms/PricingTableDesktop/PricingTableDesktop.tsx
|
|
8099
|
-
import * as
|
|
8202
|
+
import * as React71 from "react";
|
|
8100
8203
|
|
|
8101
8204
|
// virtual-pkg:src/atoms/Switch/Switch.tsx
|
|
8102
|
-
import * as
|
|
8103
|
-
import { jsx as
|
|
8205
|
+
import * as React70 from "react";
|
|
8206
|
+
import { jsx as jsx70, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
8104
8207
|
var TRACK = {
|
|
8105
8208
|
sm: "h-4 w-7",
|
|
8106
8209
|
md: "h-5 w-9"
|
|
@@ -8113,7 +8216,7 @@ var TRAVEL = {
|
|
|
8113
8216
|
sm: "translate-x-3",
|
|
8114
8217
|
md: "translate-x-4"
|
|
8115
8218
|
};
|
|
8116
|
-
var Switch =
|
|
8219
|
+
var Switch = React70.forwardRef(
|
|
8117
8220
|
({
|
|
8118
8221
|
checked,
|
|
8119
8222
|
defaultChecked,
|
|
@@ -8128,11 +8231,11 @@ var Switch = React69.forwardRef(
|
|
|
8128
8231
|
className,
|
|
8129
8232
|
...rest
|
|
8130
8233
|
}, ref) => {
|
|
8131
|
-
const autoId =
|
|
8234
|
+
const autoId = React70.useId();
|
|
8132
8235
|
const inputId = id ?? `switch-${autoId}`;
|
|
8133
8236
|
const descId = description ? `${inputId}-desc` : void 0;
|
|
8134
8237
|
const isControlled = checked !== void 0;
|
|
8135
|
-
const [inner, setInner] =
|
|
8238
|
+
const [inner, setInner] = React70.useState(Boolean(defaultChecked));
|
|
8136
8239
|
const on = isControlled ? Boolean(checked) : inner;
|
|
8137
8240
|
const handleChange = (e) => {
|
|
8138
8241
|
if (!isControlled) setInner(e.target.checked);
|
|
@@ -8140,7 +8243,7 @@ var Switch = React69.forwardRef(
|
|
|
8140
8243
|
onChange?.(e);
|
|
8141
8244
|
};
|
|
8142
8245
|
const labelled = Boolean(label);
|
|
8143
|
-
return /* @__PURE__ */
|
|
8246
|
+
return /* @__PURE__ */ jsxs64(
|
|
8144
8247
|
"label",
|
|
8145
8248
|
{
|
|
8146
8249
|
htmlFor: inputId,
|
|
@@ -8151,15 +8254,15 @@ var Switch = React69.forwardRef(
|
|
|
8151
8254
|
className
|
|
8152
8255
|
].filter(Boolean).join(" "),
|
|
8153
8256
|
children: [
|
|
8154
|
-
labelled ? /* @__PURE__ */
|
|
8155
|
-
leading ? /* @__PURE__ */
|
|
8156
|
-
/* @__PURE__ */
|
|
8157
|
-
/* @__PURE__ */
|
|
8158
|
-
description ? /* @__PURE__ */
|
|
8257
|
+
labelled ? /* @__PURE__ */ jsxs64("span", { className: "flex min-w-0 items-start gap-md", children: [
|
|
8258
|
+
leading ? /* @__PURE__ */ jsx70("span", { className: "mt-xxs inline-flex shrink-0 text-ink", children: leading }) : null,
|
|
8259
|
+
/* @__PURE__ */ jsxs64("span", { className: "flex min-w-0 flex-col", children: [
|
|
8260
|
+
/* @__PURE__ */ jsx70("span", { className: "text-body-md text-ink", children: label }),
|
|
8261
|
+
description ? /* @__PURE__ */ jsx70("span", { id: descId, className: "text-body-sm text-muted", children: description }) : null
|
|
8159
8262
|
] })
|
|
8160
8263
|
] }) : null,
|
|
8161
|
-
/* @__PURE__ */
|
|
8162
|
-
/* @__PURE__ */
|
|
8264
|
+
/* @__PURE__ */ jsxs64("span", { className: "relative inline-flex shrink-0 items-center", children: [
|
|
8265
|
+
/* @__PURE__ */ jsx70(
|
|
8163
8266
|
"input",
|
|
8164
8267
|
{
|
|
8165
8268
|
ref,
|
|
@@ -8175,7 +8278,7 @@ var Switch = React69.forwardRef(
|
|
|
8175
8278
|
...rest
|
|
8176
8279
|
}
|
|
8177
8280
|
),
|
|
8178
|
-
/* @__PURE__ */
|
|
8281
|
+
/* @__PURE__ */ jsx70(
|
|
8179
8282
|
"span",
|
|
8180
8283
|
{
|
|
8181
8284
|
"aria-hidden": "true",
|
|
@@ -8187,7 +8290,7 @@ var Switch = React69.forwardRef(
|
|
|
8187
8290
|
disabled && !labelled ? "opacity-50" : "",
|
|
8188
8291
|
TRACK[size]
|
|
8189
8292
|
].join(" "),
|
|
8190
|
-
children: /* @__PURE__ */
|
|
8293
|
+
children: /* @__PURE__ */ jsx70(
|
|
8191
8294
|
"span",
|
|
8192
8295
|
{
|
|
8193
8296
|
className: [
|
|
@@ -8208,10 +8311,10 @@ var Switch = React69.forwardRef(
|
|
|
8208
8311
|
Switch.displayName = "Switch";
|
|
8209
8312
|
|
|
8210
8313
|
// virtual-pkg:src/atoms/PricingTableDesktop/PricingTableDesktop.tsx
|
|
8211
|
-
import { jsx as
|
|
8314
|
+
import { jsx as jsx71, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
8212
8315
|
var cn53 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8213
8316
|
function useBilling(billing, defaultBilling, onBillingChange) {
|
|
8214
|
-
const [inner, setInner] =
|
|
8317
|
+
const [inner, setInner] = React71.useState(defaultBilling);
|
|
8215
8318
|
const value = billing ?? inner;
|
|
8216
8319
|
const set = (b) => {
|
|
8217
8320
|
if (billing === void 0) setInner(b);
|
|
@@ -8226,7 +8329,7 @@ var BILLING_OPTIONS = [
|
|
|
8226
8329
|
function priceOf(tier, billing) {
|
|
8227
8330
|
return billing === "yearly" ? tier.yearlyPrice ?? tier.monthlyPrice : tier.monthlyPrice;
|
|
8228
8331
|
}
|
|
8229
|
-
var PricingTableDesktop =
|
|
8332
|
+
var PricingTableDesktop = React71.forwardRef(
|
|
8230
8333
|
({
|
|
8231
8334
|
tiers,
|
|
8232
8335
|
billing,
|
|
@@ -8239,7 +8342,7 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8239
8342
|
...rest
|
|
8240
8343
|
}, ref) => {
|
|
8241
8344
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8242
|
-
return /* @__PURE__ */
|
|
8345
|
+
return /* @__PURE__ */ jsxs65(
|
|
8243
8346
|
"section",
|
|
8244
8347
|
{
|
|
8245
8348
|
ref,
|
|
@@ -8247,7 +8350,7 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8247
8350
|
className: cn53("flex w-full flex-col items-center gap-lg text-ink", className),
|
|
8248
8351
|
...rest,
|
|
8249
8352
|
children: [
|
|
8250
|
-
showBillingToggle ? /* @__PURE__ */
|
|
8353
|
+
showBillingToggle ? /* @__PURE__ */ jsx71("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ jsx71(
|
|
8251
8354
|
ButtonGroup,
|
|
8252
8355
|
{
|
|
8253
8356
|
tone: "primary",
|
|
@@ -8258,14 +8361,14 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8258
8361
|
"aria-label": "Billing period"
|
|
8259
8362
|
}
|
|
8260
8363
|
) }) : null,
|
|
8261
|
-
/* @__PURE__ */
|
|
8364
|
+
/* @__PURE__ */ jsx71(
|
|
8262
8365
|
"ul",
|
|
8263
8366
|
{
|
|
8264
8367
|
className: "grid w-full rounded-lg border border-hairline bg-canvas shadow-card",
|
|
8265
8368
|
style: { gridTemplateColumns: `repeat(${tiers.length}, minmax(0, 1fr))` },
|
|
8266
8369
|
children: tiers.map((tier, i) => {
|
|
8267
8370
|
const price = priceOf(tier, period);
|
|
8268
|
-
return /* @__PURE__ */
|
|
8371
|
+
return /* @__PURE__ */ jsxs65(
|
|
8269
8372
|
"li",
|
|
8270
8373
|
{
|
|
8271
8374
|
className: cn53(
|
|
@@ -8274,10 +8377,10 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8274
8377
|
tier.highlighted && "-m-px rounded-lg border border-primary bg-canvas shadow-md"
|
|
8275
8378
|
),
|
|
8276
8379
|
children: [
|
|
8277
|
-
/* @__PURE__ */
|
|
8278
|
-
/* @__PURE__ */
|
|
8279
|
-
/* @__PURE__ */
|
|
8280
|
-
/* @__PURE__ */
|
|
8380
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex flex-col gap-xxs", children: [
|
|
8381
|
+
/* @__PURE__ */ jsx71("h3", { className: "text-heading-sm text-ink", children: tier.name }),
|
|
8382
|
+
/* @__PURE__ */ jsxs65("p", { className: "text-body-md text-body", children: [
|
|
8383
|
+
/* @__PURE__ */ jsxs65("span", { className: "font-weight-label text-ink", children: [
|
|
8281
8384
|
currency,
|
|
8282
8385
|
price
|
|
8283
8386
|
] }),
|
|
@@ -8285,8 +8388,8 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8285
8388
|
tier.unit ?? "per user/month"
|
|
8286
8389
|
] })
|
|
8287
8390
|
] }),
|
|
8288
|
-
/* @__PURE__ */
|
|
8289
|
-
/* @__PURE__ */
|
|
8391
|
+
/* @__PURE__ */ jsx71("div", { className: "flex min-h-6 items-center", children: tier.note ? /* @__PURE__ */ jsx71("span", { className: "text-body-sm text-muted", children: tier.note }) : /* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-sm", children: [
|
|
8392
|
+
/* @__PURE__ */ jsx71(
|
|
8290
8393
|
Switch,
|
|
8291
8394
|
{
|
|
8292
8395
|
size: "sm",
|
|
@@ -8295,9 +8398,9 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8295
8398
|
onCheckedChange: (c) => setPeriod(c ? "yearly" : "monthly")
|
|
8296
8399
|
}
|
|
8297
8400
|
),
|
|
8298
|
-
/* @__PURE__ */
|
|
8401
|
+
/* @__PURE__ */ jsx71("span", { className: "text-body-sm text-body", children: period === "yearly" ? "Billed yearly" : "Billed monthly" })
|
|
8299
8402
|
] }) }),
|
|
8300
|
-
tier.current ? /* @__PURE__ */
|
|
8403
|
+
tier.current ? /* @__PURE__ */ jsx71(Button, { variant: "secondary", fullWidth: true, disabled: true, children: "Current plan" }) : /* @__PURE__ */ jsx71(
|
|
8301
8404
|
Button,
|
|
8302
8405
|
{
|
|
8303
8406
|
variant: tier.ctaVariant ?? "primary",
|
|
@@ -8321,10 +8424,10 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8321
8424
|
PricingTableDesktop.displayName = "PricingTableDesktop";
|
|
8322
8425
|
|
|
8323
8426
|
// virtual-pkg:src/atoms/PricingTableMobile/PricingTableMobile.tsx
|
|
8324
|
-
import * as
|
|
8325
|
-
import { jsx as
|
|
8427
|
+
import * as React72 from "react";
|
|
8428
|
+
import { jsx as jsx72, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
8326
8429
|
var cn54 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8327
|
-
var PricingTableMobile =
|
|
8430
|
+
var PricingTableMobile = React72.forwardRef(
|
|
8328
8431
|
({
|
|
8329
8432
|
tiers,
|
|
8330
8433
|
billing,
|
|
@@ -8337,7 +8440,7 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8337
8440
|
...rest
|
|
8338
8441
|
}, ref) => {
|
|
8339
8442
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8340
|
-
return /* @__PURE__ */
|
|
8443
|
+
return /* @__PURE__ */ jsxs66(
|
|
8341
8444
|
"section",
|
|
8342
8445
|
{
|
|
8343
8446
|
ref,
|
|
@@ -8345,7 +8448,7 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8345
8448
|
className: cn54("flex w-full flex-col gap-base text-ink", className),
|
|
8346
8449
|
...rest,
|
|
8347
8450
|
children: [
|
|
8348
|
-
showBillingToggle ? /* @__PURE__ */
|
|
8451
|
+
showBillingToggle ? /* @__PURE__ */ jsx72(
|
|
8349
8452
|
ButtonGroup,
|
|
8350
8453
|
{
|
|
8351
8454
|
tone: "primary",
|
|
@@ -8356,7 +8459,7 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8356
8459
|
"aria-label": "Billing period"
|
|
8357
8460
|
}
|
|
8358
8461
|
) : null,
|
|
8359
|
-
/* @__PURE__ */
|
|
8462
|
+
/* @__PURE__ */ jsx72("ul", { className: "flex w-full flex-col gap-md", children: tiers.map((tier) => /* @__PURE__ */ jsxs66(
|
|
8360
8463
|
"li",
|
|
8361
8464
|
{
|
|
8362
8465
|
className: cn54(
|
|
@@ -8364,10 +8467,10 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8364
8467
|
tier.highlighted ? "border-primary" : "border-hairline"
|
|
8365
8468
|
),
|
|
8366
8469
|
children: [
|
|
8367
|
-
/* @__PURE__ */
|
|
8368
|
-
/* @__PURE__ */
|
|
8369
|
-
/* @__PURE__ */
|
|
8370
|
-
/* @__PURE__ */
|
|
8470
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-xxs", children: [
|
|
8471
|
+
/* @__PURE__ */ jsx72("h3", { className: "text-heading-sm text-ink", children: tier.name }),
|
|
8472
|
+
/* @__PURE__ */ jsxs66("p", { className: "text-body-md text-body", children: [
|
|
8473
|
+
/* @__PURE__ */ jsxs66("span", { className: "font-weight-label text-ink", children: [
|
|
8371
8474
|
currency,
|
|
8372
8475
|
priceOf(tier, period)
|
|
8373
8476
|
] }),
|
|
@@ -8375,8 +8478,8 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8375
8478
|
tier.unit ?? "per user/month"
|
|
8376
8479
|
] })
|
|
8377
8480
|
] }),
|
|
8378
|
-
tier.note ? /* @__PURE__ */
|
|
8379
|
-
/* @__PURE__ */
|
|
8481
|
+
tier.note ? /* @__PURE__ */ jsx72("span", { className: "text-body-sm text-muted", children: tier.note }) : /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-sm", children: [
|
|
8482
|
+
/* @__PURE__ */ jsx72(
|
|
8380
8483
|
Switch,
|
|
8381
8484
|
{
|
|
8382
8485
|
size: "sm",
|
|
@@ -8385,9 +8488,9 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8385
8488
|
onCheckedChange: (c) => setPeriod(c ? "yearly" : "monthly")
|
|
8386
8489
|
}
|
|
8387
8490
|
),
|
|
8388
|
-
/* @__PURE__ */
|
|
8491
|
+
/* @__PURE__ */ jsx72("span", { className: "text-body-sm text-body", children: period === "yearly" ? "Billed yearly" : "Billed monthly" })
|
|
8389
8492
|
] }),
|
|
8390
|
-
tier.current ? /* @__PURE__ */
|
|
8493
|
+
tier.current ? /* @__PURE__ */ jsx72(Button, { variant: "secondary", size: "lg", fullWidth: true, disabled: true, children: "Current plan" }) : /* @__PURE__ */ jsx72(
|
|
8391
8494
|
Button,
|
|
8392
8495
|
{
|
|
8393
8496
|
variant: tier.ctaVariant ?? "primary",
|
|
@@ -8409,12 +8512,12 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8409
8512
|
PricingTableMobile.displayName = "PricingTableMobile";
|
|
8410
8513
|
|
|
8411
8514
|
// virtual-pkg:src/atoms/PricingTable/PricingTable.tsx
|
|
8412
|
-
import { jsx as
|
|
8413
|
-
var PricingTable =
|
|
8515
|
+
import { jsx as jsx73, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
8516
|
+
var PricingTable = React73.forwardRef(
|
|
8414
8517
|
({ billing, defaultBilling = "monthly", onBillingChange, showBillingToggle = true, className, ...props }, ref) => {
|
|
8415
8518
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8416
|
-
return /* @__PURE__ */
|
|
8417
|
-
/* @__PURE__ */
|
|
8519
|
+
return /* @__PURE__ */ jsxs67("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
8520
|
+
/* @__PURE__ */ jsx73("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx73(
|
|
8418
8521
|
PricingTableDesktop,
|
|
8419
8522
|
{
|
|
8420
8523
|
...props,
|
|
@@ -8423,7 +8526,7 @@ var PricingTable = React72.forwardRef(
|
|
|
8423
8526
|
showBillingToggle
|
|
8424
8527
|
}
|
|
8425
8528
|
) }),
|
|
8426
|
-
/* @__PURE__ */
|
|
8529
|
+
/* @__PURE__ */ jsx73("div", { className: "md:hidden", children: /* @__PURE__ */ jsx73(
|
|
8427
8530
|
PricingTableMobile,
|
|
8428
8531
|
{
|
|
8429
8532
|
...props,
|
|
@@ -8438,14 +8541,14 @@ var PricingTable = React72.forwardRef(
|
|
|
8438
8541
|
PricingTable.displayName = "PricingTable";
|
|
8439
8542
|
|
|
8440
8543
|
// virtual-pkg:src/atoms/ProductCardGrid/ProductCardGrid.tsx
|
|
8441
|
-
import * as
|
|
8442
|
-
import { jsx as
|
|
8544
|
+
import * as React74 from "react";
|
|
8545
|
+
import { jsx as jsx74, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
8443
8546
|
var COLS = {
|
|
8444
8547
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
8445
8548
|
3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
|
|
8446
8549
|
4: "grid-cols-2 md:grid-cols-4"
|
|
8447
8550
|
};
|
|
8448
|
-
var ProductCardGrid =
|
|
8551
|
+
var ProductCardGrid = React74.forwardRef(
|
|
8449
8552
|
({
|
|
8450
8553
|
items,
|
|
8451
8554
|
columns = 3,
|
|
@@ -8457,19 +8560,19 @@ var ProductCardGrid = React73.forwardRef(
|
|
|
8457
8560
|
label = "Products",
|
|
8458
8561
|
className,
|
|
8459
8562
|
...rest
|
|
8460
|
-
}, ref) => /* @__PURE__ */
|
|
8563
|
+
}, ref) => /* @__PURE__ */ jsx74(
|
|
8461
8564
|
"section",
|
|
8462
8565
|
{
|
|
8463
8566
|
ref,
|
|
8464
8567
|
"aria-label": label,
|
|
8465
8568
|
className: ["w-full", className].filter(Boolean).join(" "),
|
|
8466
8569
|
...rest,
|
|
8467
|
-
children: items.length === 0 ? /* @__PURE__ */
|
|
8468
|
-
/* @__PURE__ */
|
|
8469
|
-
/* @__PURE__ */
|
|
8470
|
-
emptyDescription ? /* @__PURE__ */
|
|
8471
|
-
onEmptyAction ? /* @__PURE__ */
|
|
8472
|
-
] }) : /* @__PURE__ */
|
|
8570
|
+
children: items.length === 0 ? /* @__PURE__ */ jsxs68("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: [
|
|
8571
|
+
/* @__PURE__ */ jsx74(Icon, { name: emptyIcon, size: 24, className: "text-muted" }),
|
|
8572
|
+
/* @__PURE__ */ jsx74("h3", { className: "mt-xs text-heading-sm text-ink", children: emptyTitle }),
|
|
8573
|
+
emptyDescription ? /* @__PURE__ */ jsx74("p", { className: "text-body-md text-muted", children: emptyDescription }) : null,
|
|
8574
|
+
onEmptyAction ? /* @__PURE__ */ jsx74(Button, { variant: "primary", className: "mt-sm", onClick: onEmptyAction, children: emptyActionLabel }) : null
|
|
8575
|
+
] }) : /* @__PURE__ */ jsx74("ul", { className: ["grid gap-gutter", COLS[columns]].join(" "), children: items.map((item) => /* @__PURE__ */ jsx74("li", { className: "flex min-w-0", children: /* @__PURE__ */ jsx74(
|
|
8473
8576
|
Card,
|
|
8474
8577
|
{
|
|
8475
8578
|
layout: "tile",
|
|
@@ -8478,7 +8581,7 @@ var ProductCardGrid = React73.forwardRef(
|
|
|
8478
8581
|
icon: item.icon ?? "box",
|
|
8479
8582
|
href: item.href,
|
|
8480
8583
|
linkLabel: `Open ${item.title}`,
|
|
8481
|
-
badge: item.badge ? /* @__PURE__ */
|
|
8584
|
+
badge: item.badge ? /* @__PURE__ */ jsx74(Badge, { tone: "primary", size: "md", children: item.badge }) : void 0
|
|
8482
8585
|
}
|
|
8483
8586
|
) }, item.id)) })
|
|
8484
8587
|
}
|
|
@@ -8487,14 +8590,14 @@ var ProductCardGrid = React73.forwardRef(
|
|
|
8487
8590
|
ProductCardGrid.displayName = "ProductCardGrid";
|
|
8488
8591
|
|
|
8489
8592
|
// virtual-pkg:src/atoms/Radio/Radio.tsx
|
|
8490
|
-
import * as
|
|
8491
|
-
import { jsx as
|
|
8593
|
+
import * as React75 from "react";
|
|
8594
|
+
import { jsx as jsx75, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
8492
8595
|
var cn55 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8493
8596
|
var RING2 = { sm: "h-3.5 w-3.5", md: "h-4 w-4" };
|
|
8494
8597
|
var DOT3 = { sm: "h-1.5 w-1.5", md: "h-2 w-2" };
|
|
8495
8598
|
var SWATCH = { sm: "h-5 w-5", md: "h-6 w-6" };
|
|
8496
8599
|
var TEXT3 = { sm: "text-body-sm", md: "text-body-md" };
|
|
8497
|
-
var Radio =
|
|
8600
|
+
var Radio = React75.forwardRef(
|
|
8498
8601
|
({
|
|
8499
8602
|
checked,
|
|
8500
8603
|
defaultChecked,
|
|
@@ -8512,18 +8615,18 @@ var Radio = React74.forwardRef(
|
|
|
8512
8615
|
"aria-label": ariaLabel,
|
|
8513
8616
|
...rest
|
|
8514
8617
|
}, ref) => {
|
|
8515
|
-
const autoId =
|
|
8618
|
+
const autoId = React75.useId();
|
|
8516
8619
|
const inputId = id ?? `radio-${autoId}`;
|
|
8517
8620
|
const descId = description ? `${inputId}-desc` : void 0;
|
|
8518
8621
|
const isControlled = checked !== void 0;
|
|
8519
|
-
const [inner, setInner] =
|
|
8622
|
+
const [inner, setInner] = React75.useState(Boolean(defaultChecked));
|
|
8520
8623
|
const on = isControlled ? Boolean(checked) : inner;
|
|
8521
8624
|
const handleChange = (e) => {
|
|
8522
8625
|
if (!isControlled) setInner(e.target.checked);
|
|
8523
8626
|
if (e.target.checked) onValueChange?.(String(value ?? ""));
|
|
8524
8627
|
onChange?.(e);
|
|
8525
8628
|
};
|
|
8526
|
-
const input = /* @__PURE__ */
|
|
8629
|
+
const input = /* @__PURE__ */ jsx75(
|
|
8527
8630
|
"input",
|
|
8528
8631
|
{
|
|
8529
8632
|
ref,
|
|
@@ -8540,9 +8643,9 @@ var Radio = React74.forwardRef(
|
|
|
8540
8643
|
...rest
|
|
8541
8644
|
}
|
|
8542
8645
|
);
|
|
8543
|
-
const control = swatch ? /* @__PURE__ */
|
|
8646
|
+
const control = swatch ? /* @__PURE__ */ jsxs69("span", { className: cn55("relative inline-flex", SWATCH[size]), children: [
|
|
8544
8647
|
input,
|
|
8545
|
-
/* @__PURE__ */
|
|
8648
|
+
/* @__PURE__ */ jsx75(
|
|
8546
8649
|
"span",
|
|
8547
8650
|
{
|
|
8548
8651
|
"aria-hidden": "true",
|
|
@@ -8554,9 +8657,9 @@ var Radio = React74.forwardRef(
|
|
|
8554
8657
|
)
|
|
8555
8658
|
}
|
|
8556
8659
|
)
|
|
8557
|
-
] }) : /* @__PURE__ */
|
|
8660
|
+
] }) : /* @__PURE__ */ jsxs69("span", { className: cn55("relative inline-flex", RING2[size]), children: [
|
|
8558
8661
|
input,
|
|
8559
|
-
/* @__PURE__ */
|
|
8662
|
+
/* @__PURE__ */ jsx75(
|
|
8560
8663
|
"span",
|
|
8561
8664
|
{
|
|
8562
8665
|
"aria-hidden": "true",
|
|
@@ -8566,7 +8669,7 @@ var Radio = React74.forwardRef(
|
|
|
8566
8669
|
on ? "border-primary" : invalid ? "border-semantic-error" : "border-hairline-strong group-hover:border-muted-soft",
|
|
8567
8670
|
disabled && !on && "bg-surface-soft border-hairline shadow-none"
|
|
8568
8671
|
),
|
|
8569
|
-
children: /* @__PURE__ */
|
|
8672
|
+
children: /* @__PURE__ */ jsx75(
|
|
8570
8673
|
"span",
|
|
8571
8674
|
{
|
|
8572
8675
|
className: cn55(
|
|
@@ -8579,7 +8682,7 @@ var Radio = React74.forwardRef(
|
|
|
8579
8682
|
}
|
|
8580
8683
|
)
|
|
8581
8684
|
] });
|
|
8582
|
-
return /* @__PURE__ */
|
|
8685
|
+
return /* @__PURE__ */ jsxs69(
|
|
8583
8686
|
"label",
|
|
8584
8687
|
{
|
|
8585
8688
|
htmlFor: inputId,
|
|
@@ -8589,7 +8692,7 @@ var Radio = React74.forwardRef(
|
|
|
8589
8692
|
className
|
|
8590
8693
|
),
|
|
8591
8694
|
children: [
|
|
8592
|
-
/* @__PURE__ */
|
|
8695
|
+
/* @__PURE__ */ jsx75(
|
|
8593
8696
|
"span",
|
|
8594
8697
|
{
|
|
8595
8698
|
className: cn55(
|
|
@@ -8600,9 +8703,9 @@ var Radio = React74.forwardRef(
|
|
|
8600
8703
|
children: control
|
|
8601
8704
|
}
|
|
8602
8705
|
),
|
|
8603
|
-
(label || description) && /* @__PURE__ */
|
|
8604
|
-
label && /* @__PURE__ */
|
|
8605
|
-
description && /* @__PURE__ */
|
|
8706
|
+
(label || description) && /* @__PURE__ */ jsxs69("span", { className: "flex min-w-0 flex-col gap-xxs", children: [
|
|
8707
|
+
label && /* @__PURE__ */ jsx75("span", { className: TEXT3[size], children: label }),
|
|
8708
|
+
description && /* @__PURE__ */ jsx75("span", { id: descId, className: "text-body-sm text-muted", children: description })
|
|
8606
8709
|
] })
|
|
8607
8710
|
]
|
|
8608
8711
|
}
|
|
@@ -8612,20 +8715,20 @@ var Radio = React74.forwardRef(
|
|
|
8612
8715
|
Radio.displayName = "Radio";
|
|
8613
8716
|
|
|
8614
8717
|
// virtual-pkg:src/atoms/Rating/Rating.tsx
|
|
8615
|
-
import * as
|
|
8616
|
-
import { jsx as
|
|
8718
|
+
import * as React76 from "react";
|
|
8719
|
+
import { jsx as jsx76, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
8617
8720
|
var cn56 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8618
8721
|
var starPx = { sm: 14, md: 18 };
|
|
8619
8722
|
function Star({ fill, px }) {
|
|
8620
8723
|
const pct = Math.max(0, Math.min(1, fill)) * 100;
|
|
8621
|
-
return /* @__PURE__ */
|
|
8724
|
+
return /* @__PURE__ */ jsxs70(
|
|
8622
8725
|
"span",
|
|
8623
8726
|
{
|
|
8624
8727
|
className: "relative inline-flex shrink-0",
|
|
8625
8728
|
style: { width: px, height: px },
|
|
8626
8729
|
"aria-hidden": "true",
|
|
8627
8730
|
children: [
|
|
8628
|
-
/* @__PURE__ */
|
|
8731
|
+
/* @__PURE__ */ jsx76(
|
|
8629
8732
|
Icon,
|
|
8630
8733
|
{
|
|
8631
8734
|
name: "star",
|
|
@@ -8635,12 +8738,12 @@ function Star({ fill, px }) {
|
|
|
8635
8738
|
className: "text-hairline-strong"
|
|
8636
8739
|
}
|
|
8637
8740
|
),
|
|
8638
|
-
/* @__PURE__ */
|
|
8741
|
+
/* @__PURE__ */ jsx76(
|
|
8639
8742
|
"span",
|
|
8640
8743
|
{
|
|
8641
8744
|
className: "absolute inset-y-0 left-0 overflow-hidden transition-[width] duration-200 ease-out",
|
|
8642
8745
|
style: { width: `${pct}%` },
|
|
8643
|
-
children: /* @__PURE__ */
|
|
8746
|
+
children: /* @__PURE__ */ jsx76(
|
|
8644
8747
|
Icon,
|
|
8645
8748
|
{
|
|
8646
8749
|
name: "star",
|
|
@@ -8656,7 +8759,7 @@ function Star({ fill, px }) {
|
|
|
8656
8759
|
}
|
|
8657
8760
|
);
|
|
8658
8761
|
}
|
|
8659
|
-
var Rating =
|
|
8762
|
+
var Rating = React76.forwardRef(
|
|
8660
8763
|
({
|
|
8661
8764
|
value,
|
|
8662
8765
|
defaultValue = 0,
|
|
@@ -8671,8 +8774,8 @@ var Rating = React75.forwardRef(
|
|
|
8671
8774
|
className,
|
|
8672
8775
|
...rest
|
|
8673
8776
|
}, ref) => {
|
|
8674
|
-
const [inner, setInner] =
|
|
8675
|
-
const [hover, setHover] =
|
|
8777
|
+
const [inner, setInner] = React76.useState(defaultValue);
|
|
8778
|
+
const [hover, setHover] = React76.useState(null);
|
|
8676
8779
|
const current = value ?? inner;
|
|
8677
8780
|
const shown = hover ?? current;
|
|
8678
8781
|
const px = starPx[size];
|
|
@@ -8682,29 +8785,29 @@ var Rating = React75.forwardRef(
|
|
|
8682
8785
|
onChange?.(next);
|
|
8683
8786
|
};
|
|
8684
8787
|
const stars = Array.from({ length: max }, (_, i) => i + 1);
|
|
8685
|
-
return /* @__PURE__ */
|
|
8788
|
+
return /* @__PURE__ */ jsxs70(
|
|
8686
8789
|
"div",
|
|
8687
8790
|
{
|
|
8688
8791
|
ref,
|
|
8689
8792
|
className: cn56("inline-flex items-center gap-sm", className),
|
|
8690
8793
|
...rest,
|
|
8691
8794
|
children: [
|
|
8692
|
-
readOnly ? /* @__PURE__ */
|
|
8795
|
+
readOnly ? /* @__PURE__ */ jsx76(
|
|
8693
8796
|
"span",
|
|
8694
8797
|
{
|
|
8695
8798
|
role: "img",
|
|
8696
8799
|
"aria-label": `${label}: ${current.toFixed(2)} out of ${max}`,
|
|
8697
8800
|
className: "inline-flex items-center gap-xs",
|
|
8698
|
-
children: stars.map((n) => /* @__PURE__ */
|
|
8801
|
+
children: stars.map((n) => /* @__PURE__ */ jsx76(Star, { fill: current - (n - 1), px }, n))
|
|
8699
8802
|
}
|
|
8700
|
-
) : /* @__PURE__ */
|
|
8803
|
+
) : /* @__PURE__ */ jsx76(
|
|
8701
8804
|
"div",
|
|
8702
8805
|
{
|
|
8703
8806
|
role: "radiogroup",
|
|
8704
8807
|
"aria-label": label,
|
|
8705
8808
|
className: "inline-flex items-center",
|
|
8706
8809
|
onMouseLeave: () => setHover(null),
|
|
8707
|
-
children: stars.map((n) => /* @__PURE__ */
|
|
8810
|
+
children: stars.map((n) => /* @__PURE__ */ jsx76(
|
|
8708
8811
|
Button,
|
|
8709
8812
|
{
|
|
8710
8813
|
variant: "ghost",
|
|
@@ -8718,15 +8821,15 @@ var Rating = React75.forwardRef(
|
|
|
8718
8821
|
onFocus: () => setHover(n),
|
|
8719
8822
|
onBlur: () => setHover(null),
|
|
8720
8823
|
onClick: () => pick(n),
|
|
8721
|
-
children: /* @__PURE__ */
|
|
8824
|
+
children: /* @__PURE__ */ jsx76(Star, { fill: shown >= n ? 1 : 0, px })
|
|
8722
8825
|
},
|
|
8723
8826
|
n
|
|
8724
8827
|
))
|
|
8725
8828
|
}
|
|
8726
8829
|
),
|
|
8727
|
-
showValue && /* @__PURE__ */
|
|
8728
|
-
/* @__PURE__ */
|
|
8729
|
-
count !== void 0 && /* @__PURE__ */
|
|
8830
|
+
showValue && /* @__PURE__ */ jsxs70("span", { className: "inline-flex items-baseline gap-xs text-body-md", children: [
|
|
8831
|
+
/* @__PURE__ */ jsx76("span", { className: "text-ink", children: current.toFixed(2) }),
|
|
8832
|
+
count !== void 0 && /* @__PURE__ */ jsxs70("span", { className: "text-muted", children: [
|
|
8730
8833
|
"(",
|
|
8731
8834
|
count,
|
|
8732
8835
|
")"
|
|
@@ -8740,10 +8843,10 @@ var Rating = React75.forwardRef(
|
|
|
8740
8843
|
Rating.displayName = "Rating";
|
|
8741
8844
|
|
|
8742
8845
|
// virtual-pkg:src/atoms/SearchBar/SearchBar.tsx
|
|
8743
|
-
import * as
|
|
8744
|
-
import { jsx as
|
|
8846
|
+
import * as React77 from "react";
|
|
8847
|
+
import { jsx as jsx77, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
8745
8848
|
var cn57 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8746
|
-
var SearchBar =
|
|
8849
|
+
var SearchBar = React77.forwardRef(
|
|
8747
8850
|
({
|
|
8748
8851
|
value,
|
|
8749
8852
|
defaultValue = "",
|
|
@@ -8761,14 +8864,14 @@ var SearchBar = React76.forwardRef(
|
|
|
8761
8864
|
"aria-label": ariaLabel = "Search",
|
|
8762
8865
|
...inputProps
|
|
8763
8866
|
}, ref) => {
|
|
8764
|
-
const [inner, setInner] =
|
|
8867
|
+
const [inner, setInner] = React77.useState(defaultValue);
|
|
8765
8868
|
const query = value ?? inner;
|
|
8766
8869
|
const setQuery = (next) => {
|
|
8767
8870
|
if (value === void 0) setInner(next);
|
|
8768
8871
|
onValueChange?.(next);
|
|
8769
8872
|
};
|
|
8770
8873
|
const showHint = typeof resultCount === "number" && query.length > 0;
|
|
8771
|
-
return /* @__PURE__ */
|
|
8874
|
+
return /* @__PURE__ */ jsxs71(
|
|
8772
8875
|
"form",
|
|
8773
8876
|
{
|
|
8774
8877
|
role: "search",
|
|
@@ -8778,7 +8881,7 @@ var SearchBar = React76.forwardRef(
|
|
|
8778
8881
|
onSearch?.(query);
|
|
8779
8882
|
},
|
|
8780
8883
|
children: [
|
|
8781
|
-
/* @__PURE__ */
|
|
8884
|
+
/* @__PURE__ */ jsx77(
|
|
8782
8885
|
Input,
|
|
8783
8886
|
{
|
|
8784
8887
|
ref,
|
|
@@ -8795,13 +8898,13 @@ var SearchBar = React76.forwardRef(
|
|
|
8795
8898
|
setQuery("");
|
|
8796
8899
|
}
|
|
8797
8900
|
},
|
|
8798
|
-
leading: /* @__PURE__ */
|
|
8799
|
-
trailing: clearable ? /* @__PURE__ */
|
|
8901
|
+
leading: /* @__PURE__ */ jsx77(Icon, { name: "search", size: 16 }),
|
|
8902
|
+
trailing: clearable ? /* @__PURE__ */ jsx77(
|
|
8800
8903
|
"span",
|
|
8801
8904
|
{
|
|
8802
8905
|
"data-state": query ? "open" : "closed",
|
|
8803
8906
|
className: "inline-flex transition duration-150 ease-out data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
8804
|
-
children: /* @__PURE__ */
|
|
8907
|
+
children: /* @__PURE__ */ jsx77(
|
|
8805
8908
|
IconButton,
|
|
8806
8909
|
{
|
|
8807
8910
|
type: "button",
|
|
@@ -8818,13 +8921,13 @@ var SearchBar = React76.forwardRef(
|
|
|
8818
8921
|
}
|
|
8819
8922
|
)
|
|
8820
8923
|
}
|
|
8821
|
-
) : /* @__PURE__ */
|
|
8924
|
+
) : /* @__PURE__ */ jsx77(
|
|
8822
8925
|
"span",
|
|
8823
8926
|
{
|
|
8824
8927
|
"data-state": showHint ? "open" : "closed",
|
|
8825
8928
|
"aria-live": "polite",
|
|
8826
8929
|
className: "transition duration-150 ease-out data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
8827
|
-
children: typeof resultCount === "number" ? /* @__PURE__ */
|
|
8930
|
+
children: typeof resultCount === "number" ? /* @__PURE__ */ jsxs71(Badge, { tone: "neutral", size: "sm", children: [
|
|
8828
8931
|
resultCount,
|
|
8829
8932
|
" ",
|
|
8830
8933
|
resultCount === 1 ? "result" : "results"
|
|
@@ -8835,7 +8938,7 @@ var SearchBar = React76.forwardRef(
|
|
|
8835
8938
|
...inputProps
|
|
8836
8939
|
}
|
|
8837
8940
|
),
|
|
8838
|
-
actionLabel ? /* @__PURE__ */
|
|
8941
|
+
actionLabel ? /* @__PURE__ */ jsx77(Button, { type: "button", variant: "secondary", size, disabled, onClick: onAction, children: actionLabel }) : null
|
|
8839
8942
|
]
|
|
8840
8943
|
}
|
|
8841
8944
|
);
|
|
@@ -8844,16 +8947,16 @@ var SearchBar = React76.forwardRef(
|
|
|
8844
8947
|
SearchBar.displayName = "SearchBar";
|
|
8845
8948
|
|
|
8846
8949
|
// virtual-pkg:src/atoms/SearchResultsList/SearchResultsList.tsx
|
|
8847
|
-
import * as
|
|
8950
|
+
import * as React79 from "react";
|
|
8848
8951
|
|
|
8849
8952
|
// virtual-pkg:src/atoms/Skeleton/Skeleton.tsx
|
|
8850
|
-
import
|
|
8851
|
-
import { jsx as
|
|
8953
|
+
import React78 from "react";
|
|
8954
|
+
import { jsx as jsx78, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
8852
8955
|
function cn58(...parts) {
|
|
8853
8956
|
return parts.filter(Boolean).join(" ");
|
|
8854
8957
|
}
|
|
8855
8958
|
function Bone({ className, animated }) {
|
|
8856
|
-
return /* @__PURE__ */
|
|
8959
|
+
return /* @__PURE__ */ jsx78(
|
|
8857
8960
|
"span",
|
|
8858
8961
|
{
|
|
8859
8962
|
"aria-hidden": "true",
|
|
@@ -8861,12 +8964,12 @@ function Bone({ className, animated }) {
|
|
|
8861
8964
|
}
|
|
8862
8965
|
);
|
|
8863
8966
|
}
|
|
8864
|
-
var Skeleton =
|
|
8967
|
+
var Skeleton = React78.forwardRef(
|
|
8865
8968
|
({ variant = "block", lines = 3, animated = true, label = "Loading", className, ...rest }, ref) => {
|
|
8866
8969
|
const a11y = { role: "status", "aria-live": "polite", "aria-busy": true };
|
|
8867
|
-
const sr = /* @__PURE__ */
|
|
8970
|
+
const sr = /* @__PURE__ */ jsx78("span", { className: "sr-only", children: label });
|
|
8868
8971
|
if (variant === "card") {
|
|
8869
|
-
return /* @__PURE__ */
|
|
8972
|
+
return /* @__PURE__ */ jsxs72(
|
|
8870
8973
|
"div",
|
|
8871
8974
|
{
|
|
8872
8975
|
ref,
|
|
@@ -8877,10 +8980,10 @@ var Skeleton = React77.forwardRef(
|
|
|
8877
8980
|
),
|
|
8878
8981
|
...rest,
|
|
8879
8982
|
children: [
|
|
8880
|
-
/* @__PURE__ */
|
|
8881
|
-
/* @__PURE__ */
|
|
8882
|
-
/* @__PURE__ */
|
|
8883
|
-
/* @__PURE__ */
|
|
8983
|
+
/* @__PURE__ */ jsx78(Bone, { animated, className: "size-14 shrink-0 rounded-md" }),
|
|
8984
|
+
/* @__PURE__ */ jsxs72("div", { className: "flex min-w-0 flex-1 flex-col gap-sm", children: [
|
|
8985
|
+
/* @__PURE__ */ jsx78(Bone, { animated, className: "h-3 w-full rounded-xs" }),
|
|
8986
|
+
/* @__PURE__ */ jsx78(Bone, { animated, className: "h-3 w-1/2 rounded-xs" })
|
|
8884
8987
|
] }),
|
|
8885
8988
|
sr
|
|
8886
8989
|
]
|
|
@@ -8888,19 +8991,19 @@ var Skeleton = React77.forwardRef(
|
|
|
8888
8991
|
);
|
|
8889
8992
|
}
|
|
8890
8993
|
if (variant === "list-row") {
|
|
8891
|
-
return /* @__PURE__ */
|
|
8892
|
-
/* @__PURE__ */
|
|
8893
|
-
/* @__PURE__ */
|
|
8894
|
-
/* @__PURE__ */
|
|
8895
|
-
/* @__PURE__ */
|
|
8994
|
+
return /* @__PURE__ */ jsxs72("div", { ref, ...a11y, className: cn58("flex w-full items-center gap-md py-xs", className), ...rest, children: [
|
|
8995
|
+
/* @__PURE__ */ jsx78(Bone, { animated, className: "size-8 shrink-0 rounded-sm" }),
|
|
8996
|
+
/* @__PURE__ */ jsxs72("div", { className: "flex min-w-0 flex-1 flex-col gap-sm", children: [
|
|
8997
|
+
/* @__PURE__ */ jsx78(Bone, { animated, className: "h-2.5 w-full rounded-xs" }),
|
|
8998
|
+
/* @__PURE__ */ jsx78(Bone, { animated, className: "h-2.5 w-3/5 rounded-xs" })
|
|
8896
8999
|
] }),
|
|
8897
9000
|
sr
|
|
8898
9001
|
] });
|
|
8899
9002
|
}
|
|
8900
9003
|
if (variant === "paragraph") {
|
|
8901
9004
|
const count = Math.max(1, lines);
|
|
8902
|
-
return /* @__PURE__ */
|
|
8903
|
-
Array.from({ length: count }).map((_, i) => /* @__PURE__ */
|
|
9005
|
+
return /* @__PURE__ */ jsxs72("div", { ref, ...a11y, className: cn58("flex w-full flex-col gap-sm", className), ...rest, children: [
|
|
9006
|
+
Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsx78(
|
|
8904
9007
|
Bone,
|
|
8905
9008
|
{
|
|
8906
9009
|
animated,
|
|
@@ -8913,7 +9016,7 @@ var Skeleton = React77.forwardRef(
|
|
|
8913
9016
|
}
|
|
8914
9017
|
const has = (prefix) => Boolean(className && prefix.test(className));
|
|
8915
9018
|
const shape = variant === "circle" ? cn58(!has(/(^|\s)size-/) && "size-8", "rounded-full") : variant === "text" ? cn58(!has(/(^|\s)h-/) && "h-2.5", !has(/(^|\s)w-/) && "w-full", "rounded-xs") : cn58(!has(/(^|\s)h-/) && "h-16", !has(/(^|\s)w-/) && "w-full", "rounded-md");
|
|
8916
|
-
return /* @__PURE__ */
|
|
9019
|
+
return /* @__PURE__ */ jsx78(
|
|
8917
9020
|
"div",
|
|
8918
9021
|
{
|
|
8919
9022
|
ref,
|
|
@@ -8928,7 +9031,7 @@ var Skeleton = React77.forwardRef(
|
|
|
8928
9031
|
Skeleton.displayName = "Skeleton";
|
|
8929
9032
|
|
|
8930
9033
|
// virtual-pkg:src/atoms/SearchResultsList/SearchResultsList.tsx
|
|
8931
|
-
import { Fragment as Fragment10, jsx as
|
|
9034
|
+
import { Fragment as Fragment10, jsx as jsx79, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
8932
9035
|
var DEFAULT_SCOPES = [
|
|
8933
9036
|
{ value: "all", label: "All" },
|
|
8934
9037
|
{ value: "issues", label: "Issues" },
|
|
@@ -8936,7 +9039,7 @@ var DEFAULT_SCOPES = [
|
|
|
8936
9039
|
{ value: "documents", label: "Documents" }
|
|
8937
9040
|
];
|
|
8938
9041
|
var cn59 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8939
|
-
var SearchResultsList =
|
|
9042
|
+
var SearchResultsList = React79.forwardRef(
|
|
8940
9043
|
({
|
|
8941
9044
|
query,
|
|
8942
9045
|
onQueryChange,
|
|
@@ -8954,7 +9057,7 @@ var SearchResultsList = React78.forwardRef(
|
|
|
8954
9057
|
}, ref) => {
|
|
8955
9058
|
const showEmpty = !loading && results.length === 0;
|
|
8956
9059
|
const resolvedEmptyDescription = emptyDescription ?? (query ? `Nothing matches \u201C${query}\u201D. Try a different term or scope.` : "Type to search.");
|
|
8957
|
-
return /* @__PURE__ */
|
|
9060
|
+
return /* @__PURE__ */ jsxs73(
|
|
8958
9061
|
"div",
|
|
8959
9062
|
{
|
|
8960
9063
|
ref,
|
|
@@ -8964,8 +9067,8 @@ var SearchResultsList = React78.forwardRef(
|
|
|
8964
9067
|
),
|
|
8965
9068
|
...rest,
|
|
8966
9069
|
children: [
|
|
8967
|
-
/* @__PURE__ */
|
|
8968
|
-
/* @__PURE__ */
|
|
9070
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex min-w-0 flex-wrap items-center gap-sm px-base py-md", children: [
|
|
9071
|
+
/* @__PURE__ */ jsx79("div", { className: "min-w-0 flex-1 basis-56", children: /* @__PURE__ */ jsx79(
|
|
8969
9072
|
SearchBar,
|
|
8970
9073
|
{
|
|
8971
9074
|
value: query,
|
|
@@ -8976,7 +9079,7 @@ var SearchResultsList = React78.forwardRef(
|
|
|
8976
9079
|
"aria-label": "Search"
|
|
8977
9080
|
}
|
|
8978
9081
|
) }),
|
|
8979
|
-
/* @__PURE__ */
|
|
9082
|
+
/* @__PURE__ */ jsx79("div", { role: "group", "aria-label": "Search scope", className: "flex shrink-0 flex-wrap items-center gap-xs", children: scopes.map((s) => /* @__PURE__ */ jsx79(
|
|
8980
9083
|
Chip,
|
|
8981
9084
|
{
|
|
8982
9085
|
selected: s.value === scope,
|
|
@@ -8986,30 +9089,30 @@ var SearchResultsList = React78.forwardRef(
|
|
|
8986
9089
|
s.value
|
|
8987
9090
|
)) })
|
|
8988
9091
|
] }),
|
|
8989
|
-
/* @__PURE__ */
|
|
8990
|
-
[0, 1, 2].map((i) => /* @__PURE__ */
|
|
8991
|
-
/* @__PURE__ */
|
|
8992
|
-
/* @__PURE__ */
|
|
8993
|
-
/* @__PURE__ */
|
|
8994
|
-
/* @__PURE__ */
|
|
9092
|
+
/* @__PURE__ */ jsx79("div", { "aria-live": "polite", "aria-busy": loading || void 0, className: "min-h-40 px-sm pb-sm", children: loading ? /* @__PURE__ */ jsxs73("div", { className: "flex flex-col gap-xs", children: [
|
|
9093
|
+
[0, 1, 2].map((i) => /* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-md px-base py-sm", children: [
|
|
9094
|
+
/* @__PURE__ */ jsx79(Spinner, { size: "sm", tone: "current", className: "text-muted-soft" }),
|
|
9095
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex min-w-0 flex-1 flex-col gap-xs", children: [
|
|
9096
|
+
/* @__PURE__ */ jsx79(Skeleton, { variant: "text", className: "w-3/5" }),
|
|
9097
|
+
/* @__PURE__ */ jsx79(Skeleton, { variant: "text", className: "w-2/5" })
|
|
8995
9098
|
] })
|
|
8996
9099
|
] }, i)),
|
|
8997
|
-
/* @__PURE__ */
|
|
8998
|
-
] }) : showEmpty ? /* @__PURE__ */
|
|
8999
|
-
/* @__PURE__ */
|
|
9000
|
-
/* @__PURE__ */
|
|
9001
|
-
/* @__PURE__ */
|
|
9002
|
-
] }) : /* @__PURE__ */
|
|
9100
|
+
/* @__PURE__ */ jsx79("span", { className: "sr-only", children: "Searching\u2026" })
|
|
9101
|
+
] }) : showEmpty ? /* @__PURE__ */ jsxs73("div", { className: "flex flex-col items-center justify-center gap-xs px-base py-xl text-center", children: [
|
|
9102
|
+
/* @__PURE__ */ jsx79(Icon, { name: "search", size: 36, strokeWidth: 1.5, className: "text-muted-soft" }),
|
|
9103
|
+
/* @__PURE__ */ jsx79("p", { className: "mt-sm text-heading-sm text-ink", children: emptyTitle }),
|
|
9104
|
+
/* @__PURE__ */ jsx79("p", { className: "text-body-sm text-muted", children: resolvedEmptyDescription })
|
|
9105
|
+
] }) : /* @__PURE__ */ jsx79("ul", { className: "flex flex-col", "aria-label": "Search results", children: results.map((r) => /* @__PURE__ */ jsx79("li", { children: /* @__PURE__ */ jsx79(
|
|
9003
9106
|
ListItem,
|
|
9004
9107
|
{
|
|
9005
9108
|
variant: "plain",
|
|
9006
9109
|
href: r.href,
|
|
9007
9110
|
onClick: () => onResultClick?.(r),
|
|
9008
|
-
leading: /* @__PURE__ */
|
|
9111
|
+
leading: /* @__PURE__ */ jsx79(Icon, { name: r.icon, size: 18, className: cn59("shrink-0", r.iconClassName ?? "text-muted") }),
|
|
9009
9112
|
trailing: null,
|
|
9010
|
-
title: /* @__PURE__ */
|
|
9011
|
-
/* @__PURE__ */
|
|
9012
|
-
/* @__PURE__ */
|
|
9113
|
+
title: /* @__PURE__ */ jsxs73(Fragment10, { children: [
|
|
9114
|
+
/* @__PURE__ */ jsx79("span", { className: "block truncate text-body-sm text-muted", children: r.type }),
|
|
9115
|
+
/* @__PURE__ */ jsx79("span", { className: "block truncate", children: r.title })
|
|
9013
9116
|
] })
|
|
9014
9117
|
}
|
|
9015
9118
|
) }, r.id)) }) })
|
|
@@ -9021,8 +9124,8 @@ var SearchResultsList = React78.forwardRef(
|
|
|
9021
9124
|
SearchResultsList.displayName = "SearchResultsList";
|
|
9022
9125
|
|
|
9023
9126
|
// virtual-pkg:src/atoms/SegmentedControl/SegmentedControl.tsx
|
|
9024
|
-
import * as
|
|
9025
|
-
import { jsx as
|
|
9127
|
+
import * as React80 from "react";
|
|
9128
|
+
import { jsx as jsx80, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
9026
9129
|
var cn60 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9027
9130
|
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";
|
|
9028
9131
|
var frame = {
|
|
@@ -9033,13 +9136,13 @@ var pillRadius = {
|
|
|
9033
9136
|
sm: "rounded-sm",
|
|
9034
9137
|
md: "rounded-md"
|
|
9035
9138
|
};
|
|
9036
|
-
var SegmentedControl =
|
|
9139
|
+
var SegmentedControl = React80.forwardRef(
|
|
9037
9140
|
({ items, value, onValueChange, size = "sm", bare = false, className, ...rest }, ref) => {
|
|
9038
|
-
const trackRef =
|
|
9039
|
-
const itemRefs =
|
|
9040
|
-
const [pill, setPill] =
|
|
9141
|
+
const trackRef = React80.useRef(null);
|
|
9142
|
+
const itemRefs = React80.useRef({});
|
|
9143
|
+
const [pill, setPill] = React80.useState(null);
|
|
9041
9144
|
const valueKey = items.map((item) => item.value).join("|");
|
|
9042
|
-
|
|
9145
|
+
React80.useLayoutEffect(() => {
|
|
9043
9146
|
const el = value !== void 0 ? itemRefs.current[value] : null;
|
|
9044
9147
|
if (!el) {
|
|
9045
9148
|
setPill(null);
|
|
@@ -9069,7 +9172,7 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9069
9172
|
onValueChange(next.value);
|
|
9070
9173
|
itemRefs.current[next.value]?.focus();
|
|
9071
9174
|
};
|
|
9072
|
-
return /* @__PURE__ */
|
|
9175
|
+
return /* @__PURE__ */ jsx80("div", { ref, className: cn60("w-full", className), ...rest, children: /* @__PURE__ */ jsxs74(
|
|
9073
9176
|
"div",
|
|
9074
9177
|
{
|
|
9075
9178
|
ref: trackRef,
|
|
@@ -9083,7 +9186,7 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9083
9186
|
"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
9084
9187
|
),
|
|
9085
9188
|
children: [
|
|
9086
|
-
!bare ? /* @__PURE__ */
|
|
9189
|
+
!bare ? /* @__PURE__ */ jsx80(
|
|
9087
9190
|
"span",
|
|
9088
9191
|
{
|
|
9089
9192
|
"aria-hidden": "true",
|
|
@@ -9098,7 +9201,7 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9098
9201
|
const active = item.value === value;
|
|
9099
9202
|
const iconOnly = Boolean(item.icon) && item.label == null;
|
|
9100
9203
|
const glyphSize3 = size === "sm" ? 14 : 16;
|
|
9101
|
-
return /* @__PURE__ */
|
|
9204
|
+
return /* @__PURE__ */ jsx80(
|
|
9102
9205
|
Button,
|
|
9103
9206
|
{
|
|
9104
9207
|
ref: (el) => {
|
|
@@ -9115,17 +9218,17 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9115
9218
|
disabled: item.disabled,
|
|
9116
9219
|
onClick: () => onValueChange(item.value),
|
|
9117
9220
|
className: segmentInteraction,
|
|
9118
|
-
children: iconOnly ? /* @__PURE__ */
|
|
9119
|
-
item.dotClassName ? /* @__PURE__ */
|
|
9221
|
+
children: iconOnly ? /* @__PURE__ */ jsx80(Icon, { name: item.icon, size: glyphSize3 }) : /* @__PURE__ */ jsxs74("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9222
|
+
item.dotClassName ? /* @__PURE__ */ jsx80(
|
|
9120
9223
|
"span",
|
|
9121
9224
|
{
|
|
9122
9225
|
"aria-hidden": "true",
|
|
9123
9226
|
className: cn60("h-2 w-2 shrink-0 rounded-full", item.dotClassName)
|
|
9124
9227
|
}
|
|
9125
9228
|
) : null,
|
|
9126
|
-
item.icon ? /* @__PURE__ */
|
|
9127
|
-
/* @__PURE__ */
|
|
9128
|
-
item.count !== void 0 ? /* @__PURE__ */
|
|
9229
|
+
item.icon ? /* @__PURE__ */ jsx80(Icon, { name: item.icon, size: glyphSize3 }) : null,
|
|
9230
|
+
/* @__PURE__ */ jsx80("span", { className: "truncate", children: item.label }),
|
|
9231
|
+
item.count !== void 0 ? /* @__PURE__ */ jsx80(
|
|
9129
9232
|
Badge,
|
|
9130
9233
|
{
|
|
9131
9234
|
size: "sm",
|
|
@@ -9148,15 +9251,15 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9148
9251
|
SegmentedControl.displayName = "SegmentedControl";
|
|
9149
9252
|
|
|
9150
9253
|
// virtual-pkg:src/atoms/Sidebar/Sidebar.tsx
|
|
9151
|
-
import * as
|
|
9254
|
+
import * as React84 from "react";
|
|
9152
9255
|
|
|
9153
9256
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
9154
|
-
import * as
|
|
9257
|
+
import * as React82 from "react";
|
|
9155
9258
|
|
|
9156
9259
|
// virtual-pkg:src/atoms/Tooltip/Tooltip.tsx
|
|
9157
|
-
import
|
|
9260
|
+
import React81 from "react";
|
|
9158
9261
|
import { createPortal as createPortal9 } from "react-dom";
|
|
9159
|
-
import { jsx as
|
|
9262
|
+
import { jsx as jsx81, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
9160
9263
|
function cn61(...parts) {
|
|
9161
9264
|
return parts.filter(Boolean).join(" ");
|
|
9162
9265
|
}
|
|
@@ -9185,7 +9288,7 @@ var arrowPos = {
|
|
|
9185
9288
|
left: "top-1/2 -right-1 -translate-y-1/2",
|
|
9186
9289
|
right: "top-1/2 -left-1 -translate-y-1/2"
|
|
9187
9290
|
};
|
|
9188
|
-
var Tooltip =
|
|
9291
|
+
var Tooltip = React81.forwardRef(
|
|
9189
9292
|
({
|
|
9190
9293
|
children,
|
|
9191
9294
|
content,
|
|
@@ -9199,20 +9302,20 @@ var Tooltip = React80.forwardRef(
|
|
|
9199
9302
|
disabled = false,
|
|
9200
9303
|
className
|
|
9201
9304
|
}, ref) => {
|
|
9202
|
-
const [inner, setInner] =
|
|
9305
|
+
const [inner, setInner] = React81.useState(defaultOpen);
|
|
9203
9306
|
const open = !disabled && (openProp ?? inner);
|
|
9204
|
-
const [coords, setCoords] =
|
|
9205
|
-
const [mounted, setMounted] =
|
|
9206
|
-
const anchorRef =
|
|
9207
|
-
const timer =
|
|
9208
|
-
const id =
|
|
9209
|
-
|
|
9307
|
+
const [coords, setCoords] = React81.useState(null);
|
|
9308
|
+
const [mounted, setMounted] = React81.useState(false);
|
|
9309
|
+
const anchorRef = React81.useRef(null);
|
|
9310
|
+
const timer = React81.useRef(void 0);
|
|
9311
|
+
const id = React81.useId();
|
|
9312
|
+
React81.useEffect(() => setMounted(true), []);
|
|
9210
9313
|
const setRefs = (node) => {
|
|
9211
9314
|
anchorRef.current = node;
|
|
9212
9315
|
if (typeof ref === "function") ref(node);
|
|
9213
9316
|
else if (ref) ref.current = node;
|
|
9214
9317
|
};
|
|
9215
|
-
const setOpen =
|
|
9318
|
+
const setOpen = React81.useCallback(
|
|
9216
9319
|
(next) => {
|
|
9217
9320
|
window.clearTimeout(timer.current);
|
|
9218
9321
|
if (openProp === void 0) setInner(next);
|
|
@@ -9220,11 +9323,11 @@ var Tooltip = React80.forwardRef(
|
|
|
9220
9323
|
},
|
|
9221
9324
|
[openProp, onOpenChange]
|
|
9222
9325
|
);
|
|
9223
|
-
const measure =
|
|
9326
|
+
const measure = React81.useCallback(() => {
|
|
9224
9327
|
const el = anchorRef.current;
|
|
9225
9328
|
if (el) setCoords(place(el.getBoundingClientRect(), placement));
|
|
9226
9329
|
}, [placement]);
|
|
9227
|
-
|
|
9330
|
+
React81.useLayoutEffect(() => {
|
|
9228
9331
|
if (!open) return;
|
|
9229
9332
|
measure();
|
|
9230
9333
|
window.addEventListener("scroll", measure, true);
|
|
@@ -9234,7 +9337,7 @@ var Tooltip = React80.forwardRef(
|
|
|
9234
9337
|
window.removeEventListener("resize", measure);
|
|
9235
9338
|
};
|
|
9236
9339
|
}, [open, measure]);
|
|
9237
|
-
|
|
9340
|
+
React81.useEffect(() => {
|
|
9238
9341
|
if (!open) return;
|
|
9239
9342
|
const onKey = (e) => {
|
|
9240
9343
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -9242,11 +9345,11 @@ var Tooltip = React80.forwardRef(
|
|
|
9242
9345
|
document.addEventListener("keydown", onKey);
|
|
9243
9346
|
return () => document.removeEventListener("keydown", onKey);
|
|
9244
9347
|
}, [open, setOpen]);
|
|
9245
|
-
|
|
9246
|
-
const trigger =
|
|
9348
|
+
React81.useEffect(() => () => window.clearTimeout(timer.current), []);
|
|
9349
|
+
const trigger = React81.cloneElement(children, {
|
|
9247
9350
|
"aria-describedby": open ? id : void 0
|
|
9248
9351
|
});
|
|
9249
|
-
const panel = /* @__PURE__ */
|
|
9352
|
+
const panel = /* @__PURE__ */ jsx81(
|
|
9250
9353
|
"div",
|
|
9251
9354
|
{
|
|
9252
9355
|
style: {
|
|
@@ -9257,7 +9360,7 @@ var Tooltip = React80.forwardRef(
|
|
|
9257
9360
|
zIndex: "var(--z-tooltip, 1500)",
|
|
9258
9361
|
pointerEvents: "none"
|
|
9259
9362
|
},
|
|
9260
|
-
children: /* @__PURE__ */
|
|
9363
|
+
children: /* @__PURE__ */ jsxs75(
|
|
9261
9364
|
"div",
|
|
9262
9365
|
{
|
|
9263
9366
|
id,
|
|
@@ -9271,7 +9374,7 @@ var Tooltip = React80.forwardRef(
|
|
|
9271
9374
|
),
|
|
9272
9375
|
children: [
|
|
9273
9376
|
content,
|
|
9274
|
-
variant === "default" && shortcut && shortcut.length > 0 ? /* @__PURE__ */
|
|
9377
|
+
variant === "default" && shortcut && shortcut.length > 0 ? /* @__PURE__ */ jsx81("span", { className: "flex items-center gap-xxs", children: shortcut.map((key) => /* @__PURE__ */ jsx81(
|
|
9275
9378
|
"kbd",
|
|
9276
9379
|
{
|
|
9277
9380
|
className: "inline-flex min-w-5 items-center justify-center rounded-xs bg-inverse-ink/15 px-xs text-caption text-inverse-ink",
|
|
@@ -9279,7 +9382,7 @@ var Tooltip = React80.forwardRef(
|
|
|
9279
9382
|
},
|
|
9280
9383
|
key
|
|
9281
9384
|
)) }) : null,
|
|
9282
|
-
variant === "default" ? /* @__PURE__ */
|
|
9385
|
+
variant === "default" ? /* @__PURE__ */ jsx81(
|
|
9283
9386
|
"span",
|
|
9284
9387
|
{
|
|
9285
9388
|
"aria-hidden": "true",
|
|
@@ -9291,7 +9394,7 @@ var Tooltip = React80.forwardRef(
|
|
|
9291
9394
|
)
|
|
9292
9395
|
}
|
|
9293
9396
|
);
|
|
9294
|
-
return /* @__PURE__ */
|
|
9397
|
+
return /* @__PURE__ */ jsxs75(
|
|
9295
9398
|
"span",
|
|
9296
9399
|
{
|
|
9297
9400
|
ref: setRefs,
|
|
@@ -9314,11 +9417,11 @@ var Tooltip = React80.forwardRef(
|
|
|
9314
9417
|
Tooltip.displayName = "Tooltip";
|
|
9315
9418
|
|
|
9316
9419
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
9317
|
-
import { jsx as
|
|
9420
|
+
import { jsx as jsx82, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
9318
9421
|
var cn62 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9319
9422
|
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";
|
|
9320
9423
|
var hasBadge = (badge) => badge !== void 0 && badge !== null && badge !== false;
|
|
9321
|
-
var SidebarDesktop =
|
|
9424
|
+
var SidebarDesktop = React82.forwardRef(
|
|
9322
9425
|
({
|
|
9323
9426
|
brandName = "Linear",
|
|
9324
9427
|
brandHref = "#",
|
|
@@ -9343,15 +9446,15 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9343
9446
|
children,
|
|
9344
9447
|
...rest
|
|
9345
9448
|
}, ref) => {
|
|
9346
|
-
const baseId =
|
|
9347
|
-
const [innerCollapsed, setInnerCollapsed] =
|
|
9449
|
+
const baseId = React82.useId();
|
|
9450
|
+
const [innerCollapsed, setInnerCollapsed] = React82.useState(defaultCollapsed);
|
|
9348
9451
|
const collapsed = collapsedProp ?? innerCollapsed;
|
|
9349
9452
|
const toggle = () => {
|
|
9350
9453
|
const next = !collapsed;
|
|
9351
9454
|
if (collapsedProp === void 0) setInnerCollapsed(next);
|
|
9352
9455
|
onCollapsedChange?.(next);
|
|
9353
9456
|
};
|
|
9354
|
-
const [expanded, setExpanded] =
|
|
9457
|
+
const [expanded, setExpanded] = React82.useState(
|
|
9355
9458
|
() => new Set(
|
|
9356
9459
|
defaultExpanded ?? sections.filter((s) => s.label).map((s) => s.id)
|
|
9357
9460
|
)
|
|
@@ -9367,9 +9470,9 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9367
9470
|
const showSettingsAction = onSettingsClick !== void 0;
|
|
9368
9471
|
const showFooterActions = showHelpAction || showSettingsAction;
|
|
9369
9472
|
const showFooterRow = showFooter && (Boolean(userName) || showFooterActions);
|
|
9370
|
-
const renderIcon = (link) => link.icon ? /* @__PURE__ */
|
|
9371
|
-
/* @__PURE__ */
|
|
9372
|
-
collapsed && hasBadge(link.badge) && /* @__PURE__ */
|
|
9473
|
+
const renderIcon = (link) => link.icon ? /* @__PURE__ */ jsxs76("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: [
|
|
9474
|
+
/* @__PURE__ */ jsx82(Icon, { name: link.icon, size: 16, className: "text-body" }),
|
|
9475
|
+
collapsed && hasBadge(link.badge) && /* @__PURE__ */ jsx82(
|
|
9373
9476
|
"span",
|
|
9374
9477
|
{
|
|
9375
9478
|
"aria-hidden": "true",
|
|
@@ -9379,7 +9482,7 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9379
9482
|
] }) : null;
|
|
9380
9483
|
const renderLink = (link, nested = false) => {
|
|
9381
9484
|
const current = link.id === activeId;
|
|
9382
|
-
const anchor = /* @__PURE__ */
|
|
9485
|
+
const anchor = /* @__PURE__ */ jsxs76(
|
|
9383
9486
|
"a",
|
|
9384
9487
|
{
|
|
9385
9488
|
href: link.href ?? `#${link.id}`,
|
|
@@ -9393,20 +9496,20 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9393
9496
|
),
|
|
9394
9497
|
children: [
|
|
9395
9498
|
renderIcon(link),
|
|
9396
|
-
!collapsed && /* @__PURE__ */
|
|
9397
|
-
!collapsed && hasBadge(link.badge) && /* @__PURE__ */
|
|
9499
|
+
!collapsed && /* @__PURE__ */ jsx82("span", { className: "min-w-0 flex-1 truncate", children: link.label }),
|
|
9500
|
+
!collapsed && hasBadge(link.badge) && /* @__PURE__ */ jsx82("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge })
|
|
9398
9501
|
]
|
|
9399
9502
|
}
|
|
9400
9503
|
);
|
|
9401
|
-
return /* @__PURE__ */
|
|
9504
|
+
return /* @__PURE__ */ jsx82("li", { className: collapsed ? "flex justify-center" : void 0, children: collapsed ? /* @__PURE__ */ jsx82(Tooltip, { content: link.label, placement: "right", children: anchor }) : anchor }, link.id);
|
|
9402
9505
|
};
|
|
9403
9506
|
const renderGroup = (link) => {
|
|
9404
9507
|
const open = isOpen(link.id);
|
|
9405
9508
|
const panelId = `${baseId}-${link.id}`;
|
|
9406
9509
|
const kids = link.children ?? [];
|
|
9407
9510
|
if (collapsed) {
|
|
9408
|
-
return /* @__PURE__ */
|
|
9409
|
-
/* @__PURE__ */
|
|
9511
|
+
return /* @__PURE__ */ jsxs76(React82.Fragment, { children: [
|
|
9512
|
+
/* @__PURE__ */ jsx82("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx82(Tooltip, { content: link.label, placement: "right", children: /* @__PURE__ */ jsx82(
|
|
9410
9513
|
IconButton,
|
|
9411
9514
|
{
|
|
9412
9515
|
icon: link.icon ?? "box",
|
|
@@ -9421,8 +9524,8 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9421
9524
|
open && kids.map((k) => renderLink(k))
|
|
9422
9525
|
] }, link.id);
|
|
9423
9526
|
}
|
|
9424
|
-
return /* @__PURE__ */
|
|
9425
|
-
/* @__PURE__ */
|
|
9527
|
+
return /* @__PURE__ */ jsxs76("li", { children: [
|
|
9528
|
+
/* @__PURE__ */ jsx82(
|
|
9426
9529
|
Button,
|
|
9427
9530
|
{
|
|
9428
9531
|
variant: "item",
|
|
@@ -9430,12 +9533,12 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9430
9533
|
"aria-expanded": open,
|
|
9431
9534
|
"aria-controls": panelId,
|
|
9432
9535
|
onClick: () => flip(link.id),
|
|
9433
|
-
leadingIcon: link.icon ? /* @__PURE__ */
|
|
9536
|
+
leadingIcon: link.icon ? /* @__PURE__ */ jsx82(Icon, { name: link.icon, size: 16, className: "text-body" }) : void 0,
|
|
9434
9537
|
className: "px-sm",
|
|
9435
|
-
children: /* @__PURE__ */
|
|
9436
|
-
/* @__PURE__ */
|
|
9437
|
-
hasBadge(link.badge) && /* @__PURE__ */
|
|
9438
|
-
/* @__PURE__ */
|
|
9538
|
+
children: /* @__PURE__ */ jsxs76("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9539
|
+
/* @__PURE__ */ jsx82("span", { className: "truncate", children: link.label }),
|
|
9540
|
+
hasBadge(link.badge) && /* @__PURE__ */ jsx82("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge }),
|
|
9541
|
+
/* @__PURE__ */ jsx82(
|
|
9439
9542
|
Icon,
|
|
9440
9543
|
{
|
|
9441
9544
|
name: "chevron-down",
|
|
@@ -9446,21 +9549,21 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9446
9549
|
] })
|
|
9447
9550
|
}
|
|
9448
9551
|
),
|
|
9449
|
-
/* @__PURE__ */
|
|
9552
|
+
/* @__PURE__ */ jsx82(
|
|
9450
9553
|
"div",
|
|
9451
9554
|
{
|
|
9452
9555
|
id: panelId,
|
|
9453
9556
|
"data-state": open ? "open" : "closed",
|
|
9454
9557
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9455
|
-
children: /* @__PURE__ */
|
|
9558
|
+
children: /* @__PURE__ */ jsx82("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden pt-xxs", children: kids.map((k) => renderLink(k, true)) })
|
|
9456
9559
|
}
|
|
9457
9560
|
)
|
|
9458
9561
|
] }, link.id);
|
|
9459
9562
|
};
|
|
9460
9563
|
const renderItem = (link) => link.children?.length ? renderGroup(link) : renderLink(link);
|
|
9461
9564
|
const showWorkspaceRow = Boolean(workspaceName) || !collapsed && headerActions != null;
|
|
9462
|
-
return /* @__PURE__ */
|
|
9463
|
-
/* @__PURE__ */
|
|
9565
|
+
return /* @__PURE__ */ jsxs76("div", { ref, className: cn62("flex h-full w-full min-h-0 bg-canvas text-ink", className), ...rest, children: [
|
|
9566
|
+
/* @__PURE__ */ jsxs76(
|
|
9464
9567
|
"aside",
|
|
9465
9568
|
{
|
|
9466
9569
|
"aria-label": "Sidebar",
|
|
@@ -9468,11 +9571,11 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9468
9571
|
style: { width: collapsed ? 64 : 256 },
|
|
9469
9572
|
className: "flex h-full shrink-0 flex-col overflow-hidden border-r border-hairline bg-surface transition-[width] duration-200 ease-out",
|
|
9470
9573
|
children: [
|
|
9471
|
-
collapsed ? /* @__PURE__ */
|
|
9472
|
-
/* @__PURE__ */
|
|
9473
|
-
/* @__PURE__ */
|
|
9574
|
+
collapsed ? /* @__PURE__ */ jsx82("div", { className: "flex shrink-0 justify-center pb-sm pt-md", children: /* @__PURE__ */ jsx82(IconButton, { icon: "panel-right", variant: "secondary", "aria-label": "Expand sidebar", "aria-expanded": false, onClick: toggle }) }) : /* @__PURE__ */ jsxs76("div", { className: "flex shrink-0 items-center justify-between gap-sm pb-sm pl-base pr-md pt-md", children: [
|
|
9575
|
+
/* @__PURE__ */ jsx82(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
9576
|
+
/* @__PURE__ */ jsx82(IconButton, { icon: "panel-left", variant: "secondary", "aria-label": "Collapse sidebar", "aria-expanded": true, onClick: toggle })
|
|
9474
9577
|
] }),
|
|
9475
|
-
showWorkspaceRow && /* @__PURE__ */
|
|
9578
|
+
showWorkspaceRow && /* @__PURE__ */ jsxs76(
|
|
9476
9579
|
"div",
|
|
9477
9580
|
{
|
|
9478
9581
|
className: cn62(
|
|
@@ -9480,26 +9583,26 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9480
9583
|
collapsed ? "flex justify-center" : "flex items-center gap-xxs px-sm"
|
|
9481
9584
|
),
|
|
9482
9585
|
children: [
|
|
9483
|
-
workspaceName ? collapsed ? /* @__PURE__ */
|
|
9586
|
+
workspaceName ? collapsed ? /* @__PURE__ */ jsx82(Tooltip, { content: workspaceName, placement: "right", children: /* @__PURE__ */ jsx82(Button, { variant: "ghost", iconOnly: true, "aria-label": workspaceName, onClick: onWorkspaceClick, children: /* @__PURE__ */ jsx82(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }) }) }) : /* @__PURE__ */ jsx82(
|
|
9484
9587
|
Button,
|
|
9485
9588
|
{
|
|
9486
9589
|
variant: "ghost",
|
|
9487
9590
|
onClick: onWorkspaceClick,
|
|
9488
9591
|
className: "min-w-0 flex-1 justify-start px-sm",
|
|
9489
|
-
leadingIcon: /* @__PURE__ */
|
|
9490
|
-
trailingIcon: /* @__PURE__ */
|
|
9491
|
-
children: /* @__PURE__ */
|
|
9592
|
+
leadingIcon: /* @__PURE__ */ jsx82(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }),
|
|
9593
|
+
trailingIcon: /* @__PURE__ */ jsx82(Icon, { name: "chevron-down", size: 14, className: "text-muted" }),
|
|
9594
|
+
children: /* @__PURE__ */ jsx82("span", { className: "min-w-0 truncate text-ink", children: workspaceName })
|
|
9492
9595
|
}
|
|
9493
|
-
) : /* @__PURE__ */
|
|
9494
|
-
!collapsed && headerActions != null && /* @__PURE__ */
|
|
9596
|
+
) : /* @__PURE__ */ jsx82("span", { className: "min-w-0 flex-1" }),
|
|
9597
|
+
!collapsed && headerActions != null && /* @__PURE__ */ jsx82("div", { className: "flex shrink-0 items-center gap-xxs", children: headerActions })
|
|
9495
9598
|
]
|
|
9496
9599
|
}
|
|
9497
9600
|
),
|
|
9498
|
-
/* @__PURE__ */
|
|
9601
|
+
/* @__PURE__ */ jsx82("nav", { "aria-label": "Main", className: cn62("min-h-0 flex-1 overflow-y-auto overscroll-contain pb-sm", collapsed ? "px-0" : "px-sm"), children: sections.map((section, i) => {
|
|
9499
9602
|
const sectionOpen = !section.label || isOpen(section.id);
|
|
9500
9603
|
const listId = `${baseId}-section-${section.id}`;
|
|
9501
|
-
return /* @__PURE__ */
|
|
9502
|
-
section.label && !collapsed && /* @__PURE__ */
|
|
9604
|
+
return /* @__PURE__ */ jsxs76("div", { className: i > 0 ? "mt-base" : void 0, children: [
|
|
9605
|
+
section.label && !collapsed && /* @__PURE__ */ jsx82(
|
|
9503
9606
|
Button,
|
|
9504
9607
|
{
|
|
9505
9608
|
variant: "item",
|
|
@@ -9508,9 +9611,9 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9508
9611
|
"aria-controls": listId,
|
|
9509
9612
|
onClick: () => flip(section.id),
|
|
9510
9613
|
className: "px-sm",
|
|
9511
|
-
children: /* @__PURE__ */
|
|
9614
|
+
children: /* @__PURE__ */ jsxs76("span", { className: "inline-flex items-center gap-xs text-muted", children: [
|
|
9512
9615
|
section.label,
|
|
9513
|
-
/* @__PURE__ */
|
|
9616
|
+
/* @__PURE__ */ jsx82(
|
|
9514
9617
|
Icon,
|
|
9515
9618
|
{
|
|
9516
9619
|
name: "chevron-down",
|
|
@@ -9521,29 +9624,29 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9521
9624
|
] })
|
|
9522
9625
|
}
|
|
9523
9626
|
),
|
|
9524
|
-
/* @__PURE__ */
|
|
9627
|
+
/* @__PURE__ */ jsx82(
|
|
9525
9628
|
"div",
|
|
9526
9629
|
{
|
|
9527
9630
|
id: listId,
|
|
9528
9631
|
"data-state": sectionOpen || collapsed ? "open" : "closed",
|
|
9529
9632
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9530
|
-
children: /* @__PURE__ */
|
|
9633
|
+
children: /* @__PURE__ */ jsx82("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden", children: section.items.map(renderItem) })
|
|
9531
9634
|
}
|
|
9532
9635
|
)
|
|
9533
9636
|
] }, section.id);
|
|
9534
9637
|
}) }),
|
|
9535
|
-
announcement && !collapsed && /* @__PURE__ */
|
|
9638
|
+
announcement && !collapsed && /* @__PURE__ */ jsx82("div", { className: "shrink-0 px-sm pb-sm", children: /* @__PURE__ */ jsxs76(
|
|
9536
9639
|
"a",
|
|
9537
9640
|
{
|
|
9538
9641
|
href: announcement.href ?? "#",
|
|
9539
9642
|
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",
|
|
9540
9643
|
children: [
|
|
9541
|
-
/* @__PURE__ */
|
|
9542
|
-
/* @__PURE__ */
|
|
9644
|
+
/* @__PURE__ */ jsx82("span", { className: "text-caption text-muted", children: announcement.eyebrow }),
|
|
9645
|
+
/* @__PURE__ */ jsx82("span", { className: "text-body-sm text-ink", children: announcement.title })
|
|
9543
9646
|
]
|
|
9544
9647
|
}
|
|
9545
9648
|
) }),
|
|
9546
|
-
showFooterRow && /* @__PURE__ */
|
|
9649
|
+
showFooterRow && /* @__PURE__ */ jsxs76(
|
|
9547
9650
|
"div",
|
|
9548
9651
|
{
|
|
9549
9652
|
className: cn62(
|
|
@@ -9551,9 +9654,9 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9551
9654
|
collapsed ? "flex-col items-center gap-xs" : "items-center justify-between px-md"
|
|
9552
9655
|
),
|
|
9553
9656
|
children: [
|
|
9554
|
-
userName && /* @__PURE__ */
|
|
9555
|
-
showFooterActions && /* @__PURE__ */
|
|
9556
|
-
showHelpAction && /* @__PURE__ */
|
|
9657
|
+
userName && /* @__PURE__ */ jsx82(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }),
|
|
9658
|
+
showFooterActions && /* @__PURE__ */ jsxs76("div", { className: cn62("flex items-center gap-xxs", collapsed && "flex-col"), children: [
|
|
9659
|
+
showHelpAction && /* @__PURE__ */ jsx82(
|
|
9557
9660
|
IconButton,
|
|
9558
9661
|
{
|
|
9559
9662
|
icon: "message-circle",
|
|
@@ -9562,7 +9665,7 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9562
9665
|
onClick: onHelpClick
|
|
9563
9666
|
}
|
|
9564
9667
|
),
|
|
9565
|
-
showSettingsAction && /* @__PURE__ */
|
|
9668
|
+
showSettingsAction && /* @__PURE__ */ jsx82(IconButton, { icon: "settings", variant: "ghost", "aria-label": "Settings", onClick: onSettingsClick })
|
|
9566
9669
|
] })
|
|
9567
9670
|
]
|
|
9568
9671
|
}
|
|
@@ -9570,19 +9673,19 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9570
9673
|
]
|
|
9571
9674
|
}
|
|
9572
9675
|
),
|
|
9573
|
-
children !== void 0 && /* @__PURE__ */
|
|
9676
|
+
children !== void 0 && /* @__PURE__ */ jsx82("div", { className: "min-w-0 flex-1 overflow-auto", children })
|
|
9574
9677
|
] });
|
|
9575
9678
|
}
|
|
9576
9679
|
);
|
|
9577
9680
|
SidebarDesktop.displayName = "SidebarDesktop";
|
|
9578
9681
|
|
|
9579
9682
|
// virtual-pkg:src/atoms/SidebarMobile/SidebarMobile.tsx
|
|
9580
|
-
import * as
|
|
9581
|
-
import { jsx as
|
|
9683
|
+
import * as React83 from "react";
|
|
9684
|
+
import { jsx as jsx83, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
9582
9685
|
var cn63 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9583
9686
|
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";
|
|
9584
9687
|
var hasBadge2 = (badge) => badge !== void 0 && badge !== null && badge !== false;
|
|
9585
|
-
var SidebarMobile =
|
|
9688
|
+
var SidebarMobile = React83.forwardRef(
|
|
9586
9689
|
({
|
|
9587
9690
|
brandName = "Linear",
|
|
9588
9691
|
brandHref = "#",
|
|
@@ -9607,17 +9710,17 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9607
9710
|
children,
|
|
9608
9711
|
...rest
|
|
9609
9712
|
}, ref) => {
|
|
9610
|
-
const baseId =
|
|
9611
|
-
const [innerOpen, setInnerOpen] =
|
|
9713
|
+
const baseId = React83.useId();
|
|
9714
|
+
const [innerOpen, setInnerOpen] = React83.useState(defaultOpen);
|
|
9612
9715
|
const open = openProp ?? innerOpen;
|
|
9613
|
-
const setOpen =
|
|
9716
|
+
const setOpen = React83.useCallback(
|
|
9614
9717
|
(next) => {
|
|
9615
9718
|
if (openProp === void 0) setInnerOpen(next);
|
|
9616
9719
|
onOpenChange?.(next);
|
|
9617
9720
|
},
|
|
9618
9721
|
[openProp, onOpenChange]
|
|
9619
9722
|
);
|
|
9620
|
-
const [expanded, setExpanded] =
|
|
9723
|
+
const [expanded, setExpanded] = React83.useState(
|
|
9621
9724
|
() => new Set(defaultExpanded ?? sections.filter((s) => s.label).map((s) => s.id))
|
|
9622
9725
|
);
|
|
9623
9726
|
const flip = (id) => setExpanded((prev) => {
|
|
@@ -9632,7 +9735,7 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9632
9735
|
const showFooterRow = showFooter && (Boolean(userName) || showFooterActions);
|
|
9633
9736
|
const renderLink = (link, nested = false) => {
|
|
9634
9737
|
const current = link.id === activeId;
|
|
9635
|
-
return /* @__PURE__ */
|
|
9738
|
+
return /* @__PURE__ */ jsx83("li", { children: /* @__PURE__ */ jsxs77(
|
|
9636
9739
|
"a",
|
|
9637
9740
|
{
|
|
9638
9741
|
href: link.href ?? `#${link.id}`,
|
|
@@ -9647,9 +9750,9 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9647
9750
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
9648
9751
|
),
|
|
9649
9752
|
children: [
|
|
9650
|
-
link.icon && /* @__PURE__ */
|
|
9651
|
-
/* @__PURE__ */
|
|
9652
|
-
hasBadge2(link.badge) && /* @__PURE__ */
|
|
9753
|
+
link.icon && /* @__PURE__ */ jsx83(Icon, { name: link.icon, size: 16, className: "text-body" }),
|
|
9754
|
+
/* @__PURE__ */ jsx83("span", { className: "min-w-0 flex-1 truncate", children: link.label }),
|
|
9755
|
+
hasBadge2(link.badge) && /* @__PURE__ */ jsx83("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge })
|
|
9653
9756
|
]
|
|
9654
9757
|
}
|
|
9655
9758
|
) }, link.id);
|
|
@@ -9657,8 +9760,8 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9657
9760
|
const renderGroup = (link) => {
|
|
9658
9761
|
const isOpen = expanded.has(link.id);
|
|
9659
9762
|
const panelId = `${baseId}-${link.id}`;
|
|
9660
|
-
return /* @__PURE__ */
|
|
9661
|
-
/* @__PURE__ */
|
|
9763
|
+
return /* @__PURE__ */ jsxs77("li", { children: [
|
|
9764
|
+
/* @__PURE__ */ jsx83(
|
|
9662
9765
|
Button,
|
|
9663
9766
|
{
|
|
9664
9767
|
variant: "item",
|
|
@@ -9666,12 +9769,12 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9666
9769
|
"aria-expanded": isOpen,
|
|
9667
9770
|
"aria-controls": panelId,
|
|
9668
9771
|
onClick: () => flip(link.id),
|
|
9669
|
-
leadingIcon: link.icon ? /* @__PURE__ */
|
|
9772
|
+
leadingIcon: link.icon ? /* @__PURE__ */ jsx83(Icon, { name: link.icon, size: 16, className: "text-body" }) : void 0,
|
|
9670
9773
|
className: "px-sm",
|
|
9671
|
-
children: /* @__PURE__ */
|
|
9672
|
-
/* @__PURE__ */
|
|
9673
|
-
hasBadge2(link.badge) && /* @__PURE__ */
|
|
9674
|
-
/* @__PURE__ */
|
|
9774
|
+
children: /* @__PURE__ */ jsxs77("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9775
|
+
/* @__PURE__ */ jsx83("span", { className: "truncate", children: link.label }),
|
|
9776
|
+
hasBadge2(link.badge) && /* @__PURE__ */ jsx83("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge }),
|
|
9777
|
+
/* @__PURE__ */ jsx83(
|
|
9675
9778
|
Icon,
|
|
9676
9779
|
{
|
|
9677
9780
|
name: "chevron-down",
|
|
@@ -9682,23 +9785,23 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9682
9785
|
] })
|
|
9683
9786
|
}
|
|
9684
9787
|
),
|
|
9685
|
-
/* @__PURE__ */
|
|
9788
|
+
/* @__PURE__ */ jsx83(
|
|
9686
9789
|
"div",
|
|
9687
9790
|
{
|
|
9688
9791
|
id: panelId,
|
|
9689
9792
|
"data-state": isOpen ? "open" : "closed",
|
|
9690
9793
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9691
|
-
children: /* @__PURE__ */
|
|
9794
|
+
children: /* @__PURE__ */ jsx83("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden pt-xxs", children: (link.children ?? []).map((k) => renderLink(k, true)) })
|
|
9692
9795
|
}
|
|
9693
9796
|
)
|
|
9694
9797
|
] }, link.id);
|
|
9695
9798
|
};
|
|
9696
|
-
return /* @__PURE__ */
|
|
9697
|
-
/* @__PURE__ */
|
|
9698
|
-
/* @__PURE__ */
|
|
9699
|
-
/* @__PURE__ */
|
|
9700
|
-
mobileActions != null && /* @__PURE__ */
|
|
9701
|
-
/* @__PURE__ */
|
|
9799
|
+
return /* @__PURE__ */ jsxs77("div", { ref, className: cn63("flex w-full flex-col bg-canvas text-ink", className), ...rest, children: [
|
|
9800
|
+
/* @__PURE__ */ jsxs77("header", { className: "flex h-14 w-full shrink-0 items-center justify-between gap-sm border-b border-hairline bg-canvas px-base", children: [
|
|
9801
|
+
/* @__PURE__ */ jsx83(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
9802
|
+
/* @__PURE__ */ jsxs77("div", { className: "flex min-w-0 items-center gap-xxs", children: [
|
|
9803
|
+
mobileActions != null && /* @__PURE__ */ jsx83("div", { className: "flex items-center gap-xxs", children: mobileActions }),
|
|
9804
|
+
/* @__PURE__ */ jsx83(
|
|
9702
9805
|
IconButton,
|
|
9703
9806
|
{
|
|
9704
9807
|
icon: "menu",
|
|
@@ -9710,8 +9813,8 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9710
9813
|
)
|
|
9711
9814
|
] })
|
|
9712
9815
|
] }),
|
|
9713
|
-
children !== void 0 && /* @__PURE__ */
|
|
9714
|
-
/* @__PURE__ */
|
|
9816
|
+
children !== void 0 && /* @__PURE__ */ jsx83("div", { className: "min-w-0 flex-1", children }),
|
|
9817
|
+
/* @__PURE__ */ jsxs77(
|
|
9715
9818
|
Drawer,
|
|
9716
9819
|
{
|
|
9717
9820
|
open,
|
|
@@ -9719,12 +9822,12 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9719
9822
|
side: "left",
|
|
9720
9823
|
"aria-label": "Navigation",
|
|
9721
9824
|
closeLabel: "Close navigation",
|
|
9722
|
-
headerStart: /* @__PURE__ */
|
|
9825
|
+
headerStart: /* @__PURE__ */ jsx83(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
9723
9826
|
bodyClassName: "px-sm",
|
|
9724
|
-
footer: showFooterRow ? /* @__PURE__ */
|
|
9725
|
-
userName ? /* @__PURE__ */
|
|
9726
|
-
showFooterActions && /* @__PURE__ */
|
|
9727
|
-
showHelpAction && /* @__PURE__ */
|
|
9827
|
+
footer: showFooterRow ? /* @__PURE__ */ jsxs77("div", { className: "flex w-full items-center justify-between", children: [
|
|
9828
|
+
userName ? /* @__PURE__ */ jsx83(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }) : /* @__PURE__ */ jsx83("span", {}),
|
|
9829
|
+
showFooterActions && /* @__PURE__ */ jsxs77("div", { className: "flex items-center gap-xxs", children: [
|
|
9830
|
+
showHelpAction && /* @__PURE__ */ jsx83(
|
|
9728
9831
|
IconButton,
|
|
9729
9832
|
{
|
|
9730
9833
|
icon: "message-circle",
|
|
@@ -9733,26 +9836,26 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9733
9836
|
onClick: onHelpClick
|
|
9734
9837
|
}
|
|
9735
9838
|
),
|
|
9736
|
-
showSettingsAction && /* @__PURE__ */
|
|
9839
|
+
showSettingsAction && /* @__PURE__ */ jsx83(IconButton, { icon: "settings", variant: "ghost", "aria-label": "Settings", onClick: onSettingsClick })
|
|
9737
9840
|
] })
|
|
9738
9841
|
] }) : void 0,
|
|
9739
9842
|
children: [
|
|
9740
|
-
workspaceName && /* @__PURE__ */
|
|
9843
|
+
workspaceName && /* @__PURE__ */ jsx83("div", { className: "pb-sm", children: /* @__PURE__ */ jsx83(
|
|
9741
9844
|
Button,
|
|
9742
9845
|
{
|
|
9743
9846
|
variant: "ghost",
|
|
9744
9847
|
onClick: onWorkspaceClick,
|
|
9745
9848
|
className: "px-sm",
|
|
9746
|
-
leadingIcon: /* @__PURE__ */
|
|
9747
|
-
trailingIcon: /* @__PURE__ */
|
|
9748
|
-
children: /* @__PURE__ */
|
|
9849
|
+
leadingIcon: /* @__PURE__ */ jsx83(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }),
|
|
9850
|
+
trailingIcon: /* @__PURE__ */ jsx83(Icon, { name: "chevron-down", size: 14, className: "text-muted" }),
|
|
9851
|
+
children: /* @__PURE__ */ jsx83("span", { className: "text-ink", children: workspaceName })
|
|
9749
9852
|
}
|
|
9750
9853
|
) }),
|
|
9751
|
-
/* @__PURE__ */
|
|
9854
|
+
/* @__PURE__ */ jsx83("nav", { "aria-label": "Main", children: sections.map((section, i) => {
|
|
9752
9855
|
const sectionOpen = !section.label || expanded.has(section.id);
|
|
9753
9856
|
const listId = `${baseId}-section-${section.id}`;
|
|
9754
|
-
return /* @__PURE__ */
|
|
9755
|
-
section.label && /* @__PURE__ */
|
|
9857
|
+
return /* @__PURE__ */ jsxs77("div", { className: i > 0 ? "mt-base" : void 0, children: [
|
|
9858
|
+
section.label && /* @__PURE__ */ jsx83(
|
|
9756
9859
|
Button,
|
|
9757
9860
|
{
|
|
9758
9861
|
variant: "item",
|
|
@@ -9761,9 +9864,9 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9761
9864
|
"aria-controls": listId,
|
|
9762
9865
|
onClick: () => flip(section.id),
|
|
9763
9866
|
className: "px-sm",
|
|
9764
|
-
children: /* @__PURE__ */
|
|
9867
|
+
children: /* @__PURE__ */ jsxs77("span", { className: "inline-flex items-center gap-xs text-muted", children: [
|
|
9765
9868
|
section.label,
|
|
9766
|
-
/* @__PURE__ */
|
|
9869
|
+
/* @__PURE__ */ jsx83(
|
|
9767
9870
|
Icon,
|
|
9768
9871
|
{
|
|
9769
9872
|
name: "chevron-down",
|
|
@@ -9774,25 +9877,25 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9774
9877
|
] })
|
|
9775
9878
|
}
|
|
9776
9879
|
),
|
|
9777
|
-
/* @__PURE__ */
|
|
9880
|
+
/* @__PURE__ */ jsx83(
|
|
9778
9881
|
"div",
|
|
9779
9882
|
{
|
|
9780
9883
|
id: listId,
|
|
9781
9884
|
"data-state": sectionOpen ? "open" : "closed",
|
|
9782
9885
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9783
|
-
children: /* @__PURE__ */
|
|
9886
|
+
children: /* @__PURE__ */ jsx83("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden", children: section.items.map((l) => l.children?.length ? renderGroup(l) : renderLink(l)) })
|
|
9784
9887
|
}
|
|
9785
9888
|
)
|
|
9786
9889
|
] }, section.id);
|
|
9787
9890
|
}) }),
|
|
9788
|
-
announcement && /* @__PURE__ */
|
|
9891
|
+
announcement && /* @__PURE__ */ jsxs77(
|
|
9789
9892
|
"a",
|
|
9790
9893
|
{
|
|
9791
9894
|
href: announcement.href ?? "#",
|
|
9792
9895
|
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",
|
|
9793
9896
|
children: [
|
|
9794
|
-
/* @__PURE__ */
|
|
9795
|
-
/* @__PURE__ */
|
|
9897
|
+
/* @__PURE__ */ jsx83("span", { className: "text-caption text-muted", children: announcement.eyebrow }),
|
|
9898
|
+
/* @__PURE__ */ jsx83("span", { className: "text-body-sm text-ink", children: announcement.title })
|
|
9796
9899
|
]
|
|
9797
9900
|
}
|
|
9798
9901
|
)
|
|
@@ -9805,8 +9908,8 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9805
9908
|
SidebarMobile.displayName = "SidebarMobile";
|
|
9806
9909
|
|
|
9807
9910
|
// virtual-pkg:src/atoms/Sidebar/Sidebar.tsx
|
|
9808
|
-
import { jsx as
|
|
9809
|
-
var Sidebar =
|
|
9911
|
+
import { jsx as jsx84, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
9912
|
+
var Sidebar = React84.forwardRef(
|
|
9810
9913
|
({
|
|
9811
9914
|
collapsed,
|
|
9812
9915
|
defaultCollapsed,
|
|
@@ -9819,13 +9922,13 @@ var Sidebar = React83.forwardRef(
|
|
|
9819
9922
|
children,
|
|
9820
9923
|
className,
|
|
9821
9924
|
...shared
|
|
9822
|
-
}, ref) => /* @__PURE__ */
|
|
9925
|
+
}, ref) => /* @__PURE__ */ jsxs78(
|
|
9823
9926
|
"div",
|
|
9824
9927
|
{
|
|
9825
9928
|
ref,
|
|
9826
9929
|
className: ["flex h-full w-full min-h-0 flex-col bg-canvas md:flex-row", className].filter(Boolean).join(" "),
|
|
9827
9930
|
children: [
|
|
9828
|
-
/* @__PURE__ */
|
|
9931
|
+
/* @__PURE__ */ jsx84("div", { className: "hidden h-full shrink-0 md:block", children: /* @__PURE__ */ jsx84(
|
|
9829
9932
|
SidebarDesktop,
|
|
9830
9933
|
{
|
|
9831
9934
|
...shared,
|
|
@@ -9836,7 +9939,7 @@ var Sidebar = React83.forwardRef(
|
|
|
9836
9939
|
onCollapsedChange
|
|
9837
9940
|
}
|
|
9838
9941
|
) }),
|
|
9839
|
-
/* @__PURE__ */
|
|
9942
|
+
/* @__PURE__ */ jsx84("div", { className: "shrink-0 md:hidden", children: /* @__PURE__ */ jsx84(
|
|
9840
9943
|
SidebarMobile,
|
|
9841
9944
|
{
|
|
9842
9945
|
...shared,
|
|
@@ -9846,7 +9949,7 @@ var Sidebar = React83.forwardRef(
|
|
|
9846
9949
|
onOpenChange: onMobileOpenChange
|
|
9847
9950
|
}
|
|
9848
9951
|
) }),
|
|
9849
|
-
children !== void 0 && /* @__PURE__ */
|
|
9952
|
+
children !== void 0 && /* @__PURE__ */ jsx84("div", { className: "min-h-0 min-w-0 flex-1 overflow-auto", children })
|
|
9850
9953
|
]
|
|
9851
9954
|
}
|
|
9852
9955
|
)
|
|
@@ -9854,8 +9957,8 @@ var Sidebar = React83.forwardRef(
|
|
|
9854
9957
|
Sidebar.displayName = "Sidebar";
|
|
9855
9958
|
|
|
9856
9959
|
// virtual-pkg:src/atoms/Slider/Slider.tsx
|
|
9857
|
-
import
|
|
9858
|
-
import { Fragment as Fragment12, jsx as
|
|
9960
|
+
import React85 from "react";
|
|
9961
|
+
import { Fragment as Fragment12, jsx as jsx85, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
9859
9962
|
function cn64(...parts) {
|
|
9860
9963
|
return parts.filter(Boolean).join(" ");
|
|
9861
9964
|
}
|
|
@@ -9863,7 +9966,7 @@ var THUMB2 = 20;
|
|
|
9863
9966
|
var inputClass = "absolute inset-0 m-0 h-full w-full cursor-pointer appearance-none bg-transparent opacity-0 outline-none disabled:cursor-not-allowed [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-moz-range-thumb]:h-5 [&::-moz-range-thumb]:w-5";
|
|
9864
9967
|
var rangeInputClass = "pointer-events-none [&::-webkit-slider-thumb]:pointer-events-auto [&::-moz-range-thumb]:pointer-events-auto";
|
|
9865
9968
|
var thumbBase = "pointer-events-none absolute top-1/2 size-5 -translate-x-1/2 -translate-y-1/2 rounded-full border bg-canvas shadow-md transition-[box-shadow,border-color,transform] duration-150 ease-out";
|
|
9866
|
-
var Slider =
|
|
9969
|
+
var Slider = React85.forwardRef(
|
|
9867
9970
|
({
|
|
9868
9971
|
value,
|
|
9869
9972
|
defaultValue = 50,
|
|
@@ -9879,10 +9982,10 @@ var Slider = React84.forwardRef(
|
|
|
9879
9982
|
"aria-label": ariaLabel,
|
|
9880
9983
|
...rest
|
|
9881
9984
|
}, ref) => {
|
|
9882
|
-
const [inner, setInner] =
|
|
9985
|
+
const [inner, setInner] = React85.useState(defaultValue);
|
|
9883
9986
|
const current = value ?? inner;
|
|
9884
9987
|
const isRange = Array.isArray(current);
|
|
9885
|
-
const labelId =
|
|
9988
|
+
const labelId = React85.useId();
|
|
9886
9989
|
const span = max - min || 1;
|
|
9887
9990
|
const commit = (next) => {
|
|
9888
9991
|
if (value === void 0) setInner(next);
|
|
@@ -9895,19 +9998,19 @@ var Slider = React84.forwardRef(
|
|
|
9895
9998
|
const lowPct = pctOf(low);
|
|
9896
9999
|
const highPct = pctOf(high);
|
|
9897
10000
|
const thumbState = disabled ? "border-hairline bg-surface-soft shadow-none" : "border-hairline-strong";
|
|
9898
|
-
return /* @__PURE__ */
|
|
10001
|
+
return /* @__PURE__ */ jsxs79(
|
|
9899
10002
|
"div",
|
|
9900
10003
|
{
|
|
9901
10004
|
ref,
|
|
9902
10005
|
className: cn64("flex w-full flex-col items-center gap-md", disabled && "opacity-50", className),
|
|
9903
10006
|
...rest,
|
|
9904
10007
|
children: [
|
|
9905
|
-
/* @__PURE__ */
|
|
9906
|
-
histogram && histogram.length > 0 ? /* @__PURE__ */
|
|
10008
|
+
/* @__PURE__ */ jsxs79("div", { className: "flex w-full flex-col gap-xxs", children: [
|
|
10009
|
+
histogram && histogram.length > 0 ? /* @__PURE__ */ jsx85("div", { "aria-hidden": "true", className: "flex h-10 w-full items-end gap-xxs", style: { paddingInline: THUMB2 / 2 }, children: histogram.map((h, i) => {
|
|
9907
10010
|
const peak = Math.max(...histogram, 1);
|
|
9908
10011
|
const center = (i + 0.5) / histogram.length * 100;
|
|
9909
10012
|
const inside = center >= lowPct && center <= highPct;
|
|
9910
|
-
return /* @__PURE__ */
|
|
10013
|
+
return /* @__PURE__ */ jsx85(
|
|
9911
10014
|
"span",
|
|
9912
10015
|
{
|
|
9913
10016
|
className: cn64(
|
|
@@ -9919,9 +10022,9 @@ var Slider = React84.forwardRef(
|
|
|
9919
10022
|
i
|
|
9920
10023
|
);
|
|
9921
10024
|
}) }) : null,
|
|
9922
|
-
/* @__PURE__ */
|
|
9923
|
-
/* @__PURE__ */
|
|
9924
|
-
/* @__PURE__ */
|
|
10025
|
+
/* @__PURE__ */ jsxs79("div", { className: "relative h-5 w-full", children: [
|
|
10026
|
+
/* @__PURE__ */ jsx85("div", { className: "absolute left-0 right-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-surface-strong" }),
|
|
10027
|
+
/* @__PURE__ */ jsx85(
|
|
9925
10028
|
"div",
|
|
9926
10029
|
{
|
|
9927
10030
|
"aria-hidden": "true",
|
|
@@ -9935,8 +10038,8 @@ var Slider = React84.forwardRef(
|
|
|
9935
10038
|
}
|
|
9936
10039
|
}
|
|
9937
10040
|
),
|
|
9938
|
-
isRange ? /* @__PURE__ */
|
|
9939
|
-
/* @__PURE__ */
|
|
10041
|
+
isRange ? /* @__PURE__ */ jsxs79(Fragment12, { children: [
|
|
10042
|
+
/* @__PURE__ */ jsx85(
|
|
9940
10043
|
"input",
|
|
9941
10044
|
{
|
|
9942
10045
|
type: "range",
|
|
@@ -9953,7 +10056,7 @@ var Slider = React84.forwardRef(
|
|
|
9953
10056
|
style: { zIndex: lowPct > 90 ? 2 : 1 }
|
|
9954
10057
|
}
|
|
9955
10058
|
),
|
|
9956
|
-
/* @__PURE__ */
|
|
10059
|
+
/* @__PURE__ */ jsx85(
|
|
9957
10060
|
"span",
|
|
9958
10061
|
{
|
|
9959
10062
|
"aria-hidden": "true",
|
|
@@ -9965,7 +10068,7 @@ var Slider = React84.forwardRef(
|
|
|
9965
10068
|
style: { left: leftOf(lowPct) }
|
|
9966
10069
|
}
|
|
9967
10070
|
),
|
|
9968
|
-
/* @__PURE__ */
|
|
10071
|
+
/* @__PURE__ */ jsx85(
|
|
9969
10072
|
"input",
|
|
9970
10073
|
{
|
|
9971
10074
|
type: "range",
|
|
@@ -9981,7 +10084,7 @@ var Slider = React84.forwardRef(
|
|
|
9981
10084
|
className: cn64("peer/high", inputClass, rangeInputClass)
|
|
9982
10085
|
}
|
|
9983
10086
|
),
|
|
9984
|
-
/* @__PURE__ */
|
|
10087
|
+
/* @__PURE__ */ jsx85(
|
|
9985
10088
|
"span",
|
|
9986
10089
|
{
|
|
9987
10090
|
"aria-hidden": "true",
|
|
@@ -9993,8 +10096,8 @@ var Slider = React84.forwardRef(
|
|
|
9993
10096
|
style: { left: leftOf(highPct) }
|
|
9994
10097
|
}
|
|
9995
10098
|
)
|
|
9996
|
-
] }) : /* @__PURE__ */
|
|
9997
|
-
/* @__PURE__ */
|
|
10099
|
+
] }) : /* @__PURE__ */ jsxs79(Fragment12, { children: [
|
|
10100
|
+
/* @__PURE__ */ jsx85(
|
|
9998
10101
|
"input",
|
|
9999
10102
|
{
|
|
10000
10103
|
type: "range",
|
|
@@ -10010,7 +10113,7 @@ var Slider = React84.forwardRef(
|
|
|
10010
10113
|
className: cn64("peer", inputClass)
|
|
10011
10114
|
}
|
|
10012
10115
|
),
|
|
10013
|
-
/* @__PURE__ */
|
|
10116
|
+
/* @__PURE__ */ jsx85(
|
|
10014
10117
|
"span",
|
|
10015
10118
|
{
|
|
10016
10119
|
"aria-hidden": "true",
|
|
@@ -10025,7 +10128,7 @@ var Slider = React84.forwardRef(
|
|
|
10025
10128
|
] })
|
|
10026
10129
|
] })
|
|
10027
10130
|
] }),
|
|
10028
|
-
label ? /* @__PURE__ */
|
|
10131
|
+
label ? /* @__PURE__ */ jsx85("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
10029
10132
|
]
|
|
10030
10133
|
}
|
|
10031
10134
|
);
|
|
@@ -10034,8 +10137,8 @@ var Slider = React84.forwardRef(
|
|
|
10034
10137
|
Slider.displayName = "Slider";
|
|
10035
10138
|
|
|
10036
10139
|
// virtual-pkg:src/atoms/StepperItem/StepperItem.tsx
|
|
10037
|
-
import * as
|
|
10038
|
-
import { jsx as
|
|
10140
|
+
import * as React86 from "react";
|
|
10141
|
+
import { jsx as jsx86, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
10039
10142
|
var cn65 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10040
10143
|
var statusLabel = {
|
|
10041
10144
|
upcoming: "Upcoming",
|
|
@@ -10045,8 +10148,8 @@ var statusLabel = {
|
|
|
10045
10148
|
};
|
|
10046
10149
|
function Indicator({ status }) {
|
|
10047
10150
|
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";
|
|
10048
|
-
return /* @__PURE__ */
|
|
10049
|
-
/* @__PURE__ */
|
|
10151
|
+
return /* @__PURE__ */ jsxs80("span", { className: "grid h-5 w-5 shrink-0 place-items-center", "aria-hidden": "true", children: [
|
|
10152
|
+
/* @__PURE__ */ jsx86(
|
|
10050
10153
|
"span",
|
|
10051
10154
|
{
|
|
10052
10155
|
className: cn65(
|
|
@@ -10056,7 +10159,7 @@ function Indicator({ status }) {
|
|
|
10056
10159
|
)
|
|
10057
10160
|
}
|
|
10058
10161
|
),
|
|
10059
|
-
/* @__PURE__ */
|
|
10162
|
+
/* @__PURE__ */ jsx86(
|
|
10060
10163
|
"span",
|
|
10061
10164
|
{
|
|
10062
10165
|
className: cn65(
|
|
@@ -10064,10 +10167,10 @@ function Indicator({ status }) {
|
|
|
10064
10167
|
"border-2 border-primary bg-canvas",
|
|
10065
10168
|
status === "active" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10066
10169
|
),
|
|
10067
|
-
children: /* @__PURE__ */
|
|
10170
|
+
children: /* @__PURE__ */ jsx86("span", { className: "h-2 w-2 rounded-full bg-primary" })
|
|
10068
10171
|
}
|
|
10069
10172
|
),
|
|
10070
|
-
/* @__PURE__ */
|
|
10173
|
+
/* @__PURE__ */ jsx86(
|
|
10071
10174
|
"span",
|
|
10072
10175
|
{
|
|
10073
10176
|
className: cn65(
|
|
@@ -10075,10 +10178,10 @@ function Indicator({ status }) {
|
|
|
10075
10178
|
"bg-semantic-success-soft text-semantic-success",
|
|
10076
10179
|
status === "complete" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10077
10180
|
),
|
|
10078
|
-
children: /* @__PURE__ */
|
|
10181
|
+
children: /* @__PURE__ */ jsx86(Icon, { name: "check", size: 11, strokeWidth: 3 })
|
|
10079
10182
|
}
|
|
10080
10183
|
),
|
|
10081
|
-
/* @__PURE__ */
|
|
10184
|
+
/* @__PURE__ */ jsx86(
|
|
10082
10185
|
"span",
|
|
10083
10186
|
{
|
|
10084
10187
|
className: cn65(
|
|
@@ -10086,13 +10189,13 @@ function Indicator({ status }) {
|
|
|
10086
10189
|
"text-semantic-error",
|
|
10087
10190
|
status === "error" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10088
10191
|
),
|
|
10089
|
-
children: /* @__PURE__ */
|
|
10192
|
+
children: /* @__PURE__ */ jsx86(Icon, { name: "circle-alert", size: 16 })
|
|
10090
10193
|
}
|
|
10091
10194
|
)
|
|
10092
10195
|
] });
|
|
10093
10196
|
}
|
|
10094
|
-
var StepperItem =
|
|
10095
|
-
({ status = "upcoming", title, meta, connector = false, className, children, ...rest }, ref) => /* @__PURE__ */
|
|
10197
|
+
var StepperItem = React86.forwardRef(
|
|
10198
|
+
({ status = "upcoming", title, meta, connector = false, className, children, ...rest }, ref) => /* @__PURE__ */ jsxs80(
|
|
10096
10199
|
"li",
|
|
10097
10200
|
{
|
|
10098
10201
|
ref,
|
|
@@ -10100,9 +10203,9 @@ var StepperItem = React85.forwardRef(
|
|
|
10100
10203
|
className: cn65("relative flex w-full gap-md", connector && "pb-base", className),
|
|
10101
10204
|
...rest,
|
|
10102
10205
|
children: [
|
|
10103
|
-
/* @__PURE__ */
|
|
10104
|
-
/* @__PURE__ */
|
|
10105
|
-
connector && /* @__PURE__ */
|
|
10206
|
+
/* @__PURE__ */ jsxs80("div", { className: "flex flex-col items-center", children: [
|
|
10207
|
+
/* @__PURE__ */ jsx86(Indicator, { status }),
|
|
10208
|
+
connector && /* @__PURE__ */ jsx86(
|
|
10106
10209
|
"span",
|
|
10107
10210
|
{
|
|
10108
10211
|
"aria-hidden": "true",
|
|
@@ -10113,17 +10216,17 @@ var StepperItem = React85.forwardRef(
|
|
|
10113
10216
|
}
|
|
10114
10217
|
)
|
|
10115
10218
|
] }),
|
|
10116
|
-
/* @__PURE__ */
|
|
10117
|
-
/* @__PURE__ */
|
|
10219
|
+
/* @__PURE__ */ jsxs80("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs pt-px", children: [
|
|
10220
|
+
/* @__PURE__ */ jsxs80("span", { className: "text-body-md text-ink", children: [
|
|
10118
10221
|
title,
|
|
10119
|
-
/* @__PURE__ */
|
|
10222
|
+
/* @__PURE__ */ jsxs80("span", { className: "sr-only", children: [
|
|
10120
10223
|
" (",
|
|
10121
10224
|
statusLabel[status],
|
|
10122
10225
|
")"
|
|
10123
10226
|
] })
|
|
10124
10227
|
] }),
|
|
10125
|
-
meta && /* @__PURE__ */
|
|
10126
|
-
children != null && children !== false && /* @__PURE__ */
|
|
10228
|
+
meta && /* @__PURE__ */ jsx86("span", { className: "text-body-sm text-muted", children: meta }),
|
|
10229
|
+
children != null && children !== false && /* @__PURE__ */ jsx86("div", { className: "w-full pt-sm", children })
|
|
10127
10230
|
] })
|
|
10128
10231
|
]
|
|
10129
10232
|
}
|
|
@@ -10132,10 +10235,10 @@ var StepperItem = React85.forwardRef(
|
|
|
10132
10235
|
StepperItem.displayName = "StepperItem";
|
|
10133
10236
|
|
|
10134
10237
|
// virtual-pkg:src/atoms/Tab/Tab.tsx
|
|
10135
|
-
import * as
|
|
10136
|
-
import { jsx as
|
|
10238
|
+
import * as React87 from "react";
|
|
10239
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
10137
10240
|
var cn66 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10138
|
-
var Tab =
|
|
10241
|
+
var Tab = React87.forwardRef(
|
|
10139
10242
|
({
|
|
10140
10243
|
selected = false,
|
|
10141
10244
|
controls,
|
|
@@ -10146,7 +10249,7 @@ var Tab = React86.forwardRef(
|
|
|
10146
10249
|
children,
|
|
10147
10250
|
tabIndex,
|
|
10148
10251
|
...rest
|
|
10149
|
-
}, ref) => /* @__PURE__ */
|
|
10252
|
+
}, ref) => /* @__PURE__ */ jsx87(
|
|
10150
10253
|
Button,
|
|
10151
10254
|
{
|
|
10152
10255
|
ref,
|
|
@@ -10171,10 +10274,10 @@ var Tab = React86.forwardRef(
|
|
|
10171
10274
|
Tab.displayName = "Tab";
|
|
10172
10275
|
|
|
10173
10276
|
// virtual-pkg:src/atoms/Tabs/Tabs.tsx
|
|
10174
|
-
import * as
|
|
10175
|
-
import { jsx as
|
|
10277
|
+
import * as React88 from "react";
|
|
10278
|
+
import { jsx as jsx88, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
10176
10279
|
var cn67 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10177
|
-
var Tabs =
|
|
10280
|
+
var Tabs = React88.forwardRef(
|
|
10178
10281
|
({
|
|
10179
10282
|
items,
|
|
10180
10283
|
value,
|
|
@@ -10185,19 +10288,19 @@ var Tabs = React87.forwardRef(
|
|
|
10185
10288
|
className,
|
|
10186
10289
|
...rest
|
|
10187
10290
|
}, ref) => {
|
|
10188
|
-
const baseId =
|
|
10189
|
-
const [inner, setInner] =
|
|
10291
|
+
const baseId = React88.useId();
|
|
10292
|
+
const [inner, setInner] = React88.useState(defaultValue ?? items[0]?.value);
|
|
10190
10293
|
const selected = value ?? inner;
|
|
10191
|
-
const tabRefs =
|
|
10192
|
-
const [indicator, setIndicator] =
|
|
10193
|
-
const measure =
|
|
10294
|
+
const tabRefs = React88.useRef({});
|
|
10295
|
+
const [indicator, setIndicator] = React88.useState(null);
|
|
10296
|
+
const measure = React88.useCallback(() => {
|
|
10194
10297
|
const el = selected ? tabRefs.current[selected] : null;
|
|
10195
10298
|
if (el) setIndicator({ left: el.offsetLeft, width: el.offsetWidth });
|
|
10196
10299
|
}, [selected]);
|
|
10197
|
-
|
|
10300
|
+
React88.useLayoutEffect(() => {
|
|
10198
10301
|
measure();
|
|
10199
10302
|
}, [measure, items]);
|
|
10200
|
-
|
|
10303
|
+
React88.useEffect(() => {
|
|
10201
10304
|
window.addEventListener("resize", measure);
|
|
10202
10305
|
const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(() => measure()) : null;
|
|
10203
10306
|
Object.values(tabRefs.current).forEach((el) => el && ro?.observe(el));
|
|
@@ -10227,7 +10330,7 @@ var Tabs = React87.forwardRef(
|
|
|
10227
10330
|
};
|
|
10228
10331
|
const tabId = (v) => `${baseId}-tab-${v}`;
|
|
10229
10332
|
const panelId = (v) => `${baseId}-panel-${v}`;
|
|
10230
|
-
return /* @__PURE__ */
|
|
10333
|
+
return /* @__PURE__ */ jsxs81(
|
|
10231
10334
|
"div",
|
|
10232
10335
|
{
|
|
10233
10336
|
ref,
|
|
@@ -10237,7 +10340,7 @@ var Tabs = React87.forwardRef(
|
|
|
10237
10340
|
),
|
|
10238
10341
|
...rest,
|
|
10239
10342
|
children: [
|
|
10240
|
-
/* @__PURE__ */
|
|
10343
|
+
/* @__PURE__ */ jsxs81(
|
|
10241
10344
|
"div",
|
|
10242
10345
|
{
|
|
10243
10346
|
role: "tablist",
|
|
@@ -10245,7 +10348,7 @@ var Tabs = React87.forwardRef(
|
|
|
10245
10348
|
onKeyDown,
|
|
10246
10349
|
className: "relative flex min-w-0 items-center gap-xs overflow-x-auto p-sm",
|
|
10247
10350
|
children: [
|
|
10248
|
-
/* @__PURE__ */
|
|
10351
|
+
/* @__PURE__ */ jsx88(
|
|
10249
10352
|
"span",
|
|
10250
10353
|
{
|
|
10251
10354
|
"aria-hidden": "true",
|
|
@@ -10259,7 +10362,7 @@ var Tabs = React87.forwardRef(
|
|
|
10259
10362
|
),
|
|
10260
10363
|
items.map((item) => {
|
|
10261
10364
|
const isSelected = item.value === selected;
|
|
10262
|
-
return /* @__PURE__ */
|
|
10365
|
+
return /* @__PURE__ */ jsx88(
|
|
10263
10366
|
Tab,
|
|
10264
10367
|
{
|
|
10265
10368
|
ref: (el) => {
|
|
@@ -10275,9 +10378,9 @@ var Tabs = React87.forwardRef(
|
|
|
10275
10378
|
disabled: item.disabled,
|
|
10276
10379
|
leadingIcon: item.icon,
|
|
10277
10380
|
onClick: () => select(item.value),
|
|
10278
|
-
children: /* @__PURE__ */
|
|
10381
|
+
children: /* @__PURE__ */ jsxs81("span", { className: "inline-flex items-center gap-sm", children: [
|
|
10279
10382
|
item.label,
|
|
10280
|
-
item.badge != null ? /* @__PURE__ */
|
|
10383
|
+
item.badge != null ? /* @__PURE__ */ jsx88(Badge, { size: "sm", tone: isSelected ? "primary" : "neutral", children: item.badge }) : null
|
|
10281
10384
|
] })
|
|
10282
10385
|
},
|
|
10283
10386
|
item.value
|
|
@@ -10288,7 +10391,7 @@ var Tabs = React87.forwardRef(
|
|
|
10288
10391
|
),
|
|
10289
10392
|
items.map((item) => {
|
|
10290
10393
|
const isSelected = item.value === selected;
|
|
10291
|
-
return /* @__PURE__ */
|
|
10394
|
+
return /* @__PURE__ */ jsx88(
|
|
10292
10395
|
"div",
|
|
10293
10396
|
{
|
|
10294
10397
|
id: panelId(item.value),
|
|
@@ -10310,26 +10413,26 @@ var Tabs = React87.forwardRef(
|
|
|
10310
10413
|
Tabs.displayName = "Tabs";
|
|
10311
10414
|
|
|
10312
10415
|
// virtual-pkg:src/atoms/TestimonialBlock/TestimonialBlock.tsx
|
|
10313
|
-
import * as
|
|
10314
|
-
import { jsx as
|
|
10416
|
+
import * as React89 from "react";
|
|
10417
|
+
import { jsx as jsx89, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
10315
10418
|
var cn68 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10316
10419
|
function QuoteCard({ t }) {
|
|
10317
|
-
return /* @__PURE__ */
|
|
10318
|
-
/* @__PURE__ */
|
|
10420
|
+
return /* @__PURE__ */ jsxs82("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: [
|
|
10421
|
+
/* @__PURE__ */ jsx89("blockquote", { className: "m-0", children: /* @__PURE__ */ jsxs82("p", { className: "text-body-lg text-ink", children: [
|
|
10319
10422
|
"\u201C",
|
|
10320
10423
|
t.quote,
|
|
10321
10424
|
"\u201D"
|
|
10322
10425
|
] }) }),
|
|
10323
|
-
/* @__PURE__ */
|
|
10324
|
-
/* @__PURE__ */
|
|
10325
|
-
/* @__PURE__ */
|
|
10326
|
-
/* @__PURE__ */
|
|
10327
|
-
t.role ? /* @__PURE__ */
|
|
10426
|
+
/* @__PURE__ */ jsxs82("figcaption", { className: "flex items-center gap-md", children: [
|
|
10427
|
+
/* @__PURE__ */ jsx89(Avatar, { size: "lg", name: t.name, src: t.avatarSrc, alt: t.name }),
|
|
10428
|
+
/* @__PURE__ */ jsxs82("div", { className: "flex min-w-0 flex-col", children: [
|
|
10429
|
+
/* @__PURE__ */ jsx89("span", { className: "truncate text-body-sm font-weight-label text-ink", children: t.name }),
|
|
10430
|
+
t.role ? /* @__PURE__ */ jsx89("span", { className: "truncate text-caption text-muted", children: t.role }) : null
|
|
10328
10431
|
] })
|
|
10329
10432
|
] })
|
|
10330
10433
|
] });
|
|
10331
10434
|
}
|
|
10332
|
-
var TestimonialBlock =
|
|
10435
|
+
var TestimonialBlock = React89.forwardRef(
|
|
10333
10436
|
({
|
|
10334
10437
|
testimonials = [],
|
|
10335
10438
|
logos,
|
|
@@ -10339,7 +10442,7 @@ var TestimonialBlock = React88.forwardRef(
|
|
|
10339
10442
|
...rest
|
|
10340
10443
|
}, ref) => {
|
|
10341
10444
|
const many = testimonials.length > 1;
|
|
10342
|
-
return /* @__PURE__ */
|
|
10445
|
+
return /* @__PURE__ */ jsxs82(
|
|
10343
10446
|
"section",
|
|
10344
10447
|
{
|
|
10345
10448
|
ref,
|
|
@@ -10347,18 +10450,18 @@ var TestimonialBlock = React88.forwardRef(
|
|
|
10347
10450
|
className: cn68("flex w-full flex-col gap-xl", className),
|
|
10348
10451
|
...rest,
|
|
10349
10452
|
children: [
|
|
10350
|
-
logos && logos.length ? /* @__PURE__ */
|
|
10351
|
-
/* @__PURE__ */
|
|
10352
|
-
/* @__PURE__ */
|
|
10453
|
+
logos && logos.length ? /* @__PURE__ */ jsxs82("div", { className: "flex flex-col items-center gap-lg py-base", children: [
|
|
10454
|
+
/* @__PURE__ */ jsx89("p", { className: "text-body-md text-muted", children: logosTitle }),
|
|
10455
|
+
/* @__PURE__ */ jsx89("ul", { className: "flex flex-wrap items-center justify-center gap-x-xl gap-y-base", children: logos.map((l) => /* @__PURE__ */ jsx89("li", { className: "text-ink", children: /* @__PURE__ */ jsx89(
|
|
10353
10456
|
Logo,
|
|
10354
10457
|
{
|
|
10355
10458
|
size: "md",
|
|
10356
10459
|
name: l.name,
|
|
10357
|
-
mark: l.icon ? /* @__PURE__ */
|
|
10460
|
+
mark: l.icon ? /* @__PURE__ */ jsx89(Icon, { name: l.icon, size: 20 }) : void 0
|
|
10358
10461
|
}
|
|
10359
10462
|
) }, l.name)) })
|
|
10360
10463
|
] }) : null,
|
|
10361
|
-
testimonials.length ? /* @__PURE__ */
|
|
10464
|
+
testimonials.length ? /* @__PURE__ */ jsx89(
|
|
10362
10465
|
"div",
|
|
10363
10466
|
{
|
|
10364
10467
|
className: cn68(
|
|
@@ -10366,7 +10469,7 @@ var TestimonialBlock = React88.forwardRef(
|
|
|
10366
10469
|
many ? "grid-cols-1 md:grid-cols-2" : "grid-cols-1",
|
|
10367
10470
|
testimonials.length > 2 && "lg:grid-cols-3"
|
|
10368
10471
|
),
|
|
10369
|
-
children: testimonials.map((t) => /* @__PURE__ */
|
|
10472
|
+
children: testimonials.map((t) => /* @__PURE__ */ jsx89(QuoteCard, { t }, t.id))
|
|
10370
10473
|
}
|
|
10371
10474
|
) : null
|
|
10372
10475
|
]
|
|
@@ -10377,9 +10480,9 @@ var TestimonialBlock = React88.forwardRef(
|
|
|
10377
10480
|
TestimonialBlock.displayName = "TestimonialBlock";
|
|
10378
10481
|
|
|
10379
10482
|
// virtual-pkg:src/atoms/Toast/Toast.tsx
|
|
10380
|
-
import * as
|
|
10483
|
+
import * as React90 from "react";
|
|
10381
10484
|
import { createPortal as createPortal10 } from "react-dom";
|
|
10382
|
-
import { jsx as
|
|
10485
|
+
import { jsx as jsx90, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
10383
10486
|
var cn69 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10384
10487
|
var toneIcon2 = {
|
|
10385
10488
|
success: { name: "circle-check", color: "text-inverse-ink" },
|
|
@@ -10390,7 +10493,7 @@ var placementClass = {
|
|
|
10390
10493
|
"bottom-center": "fixed bottom-lg left-1/2 -translate-x-1/2 w-[calc(100%-2rem)] sm:w-auto sm:min-w-[22rem]",
|
|
10391
10494
|
"bottom-right": "fixed bottom-lg right-lg left-lg sm:left-auto sm:min-w-[22rem]"
|
|
10392
10495
|
};
|
|
10393
|
-
var Toast =
|
|
10496
|
+
var Toast = React90.forwardRef(
|
|
10394
10497
|
({
|
|
10395
10498
|
open = true,
|
|
10396
10499
|
onOpenChange,
|
|
@@ -10404,16 +10507,16 @@ var Toast = React89.forwardRef(
|
|
|
10404
10507
|
className,
|
|
10405
10508
|
...rest
|
|
10406
10509
|
}, ref) => {
|
|
10407
|
-
const [mounted, setMounted] =
|
|
10408
|
-
|
|
10409
|
-
|
|
10510
|
+
const [mounted, setMounted] = React90.useState(false);
|
|
10511
|
+
React90.useEffect(() => setMounted(true), []);
|
|
10512
|
+
React90.useEffect(() => {
|
|
10410
10513
|
if (!open || !duration || !onOpenChange) return;
|
|
10411
10514
|
const t = window.setTimeout(() => onOpenChange(false), duration);
|
|
10412
10515
|
return () => window.clearTimeout(t);
|
|
10413
10516
|
}, [open, duration, onOpenChange]);
|
|
10414
10517
|
const glyph2 = toneIcon2[tone];
|
|
10415
10518
|
const floating = placement !== "inline";
|
|
10416
|
-
const card = /* @__PURE__ */
|
|
10519
|
+
const card = /* @__PURE__ */ jsx90(
|
|
10417
10520
|
"div",
|
|
10418
10521
|
{
|
|
10419
10522
|
className: cn69(
|
|
@@ -10421,7 +10524,7 @@ var Toast = React89.forwardRef(
|
|
|
10421
10524
|
"pointer-events-none"
|
|
10422
10525
|
),
|
|
10423
10526
|
style: { zIndex: open ? "var(--z-toast, 1400)" : void 0 },
|
|
10424
|
-
children: /* @__PURE__ */
|
|
10527
|
+
children: /* @__PURE__ */ jsxs83(
|
|
10425
10528
|
"div",
|
|
10426
10529
|
{
|
|
10427
10530
|
ref,
|
|
@@ -10439,9 +10542,9 @@ var Toast = React89.forwardRef(
|
|
|
10439
10542
|
),
|
|
10440
10543
|
...rest,
|
|
10441
10544
|
children: [
|
|
10442
|
-
/* @__PURE__ */
|
|
10443
|
-
/* @__PURE__ */
|
|
10444
|
-
actionLabel ? /* @__PURE__ */
|
|
10545
|
+
/* @__PURE__ */ jsx90(Icon, { name: icon ?? glyph2.name, size: 18, className: cn69("shrink-0", glyph2.color) }),
|
|
10546
|
+
/* @__PURE__ */ jsx90("p", { className: "min-w-0 flex-1 py-xxs text-body-md text-inverse-ink [&_strong]:font-weight-label", children: title }),
|
|
10547
|
+
actionLabel ? /* @__PURE__ */ jsx90(
|
|
10445
10548
|
Button,
|
|
10446
10549
|
{
|
|
10447
10550
|
variant: "ghost",
|
|
@@ -10454,7 +10557,7 @@ var Toast = React89.forwardRef(
|
|
|
10454
10557
|
className: "shrink-0 text-inverse-ink enabled:hover:bg-inverse-ink/10 enabled:hover:text-inverse-ink",
|
|
10455
10558
|
children: actionLabel
|
|
10456
10559
|
}
|
|
10457
|
-
) : /* @__PURE__ */
|
|
10560
|
+
) : /* @__PURE__ */ jsx90("span", { className: "w-xs shrink-0", "aria-hidden": "true" })
|
|
10458
10561
|
]
|
|
10459
10562
|
}
|
|
10460
10563
|
)
|
|
@@ -10468,8 +10571,8 @@ var Toast = React89.forwardRef(
|
|
|
10468
10571
|
Toast.displayName = "Toast";
|
|
10469
10572
|
|
|
10470
10573
|
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
10471
|
-
import
|
|
10472
|
-
import { jsx as
|
|
10574
|
+
import React91 from "react";
|
|
10575
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
10473
10576
|
function cn70(...parts) {
|
|
10474
10577
|
return parts.filter(Boolean).join(" ");
|
|
10475
10578
|
}
|
|
@@ -10516,10 +10619,10 @@ var toneClass2 = {
|
|
|
10516
10619
|
primary: "text-primary",
|
|
10517
10620
|
error: "text-semantic-error"
|
|
10518
10621
|
};
|
|
10519
|
-
var Typography =
|
|
10622
|
+
var Typography = React91.forwardRef(
|
|
10520
10623
|
({ variant = "body", as, tone, truncate = false, className, children, ...rest }, ref) => {
|
|
10521
10624
|
const Component = as ?? defaultElement[variant];
|
|
10522
|
-
return /* @__PURE__ */
|
|
10625
|
+
return /* @__PURE__ */ jsx91(
|
|
10523
10626
|
Component,
|
|
10524
10627
|
{
|
|
10525
10628
|
ref,
|
|
@@ -10539,10 +10642,10 @@ var Typography = React90.forwardRef(
|
|
|
10539
10642
|
Typography.displayName = "Typography";
|
|
10540
10643
|
|
|
10541
10644
|
// virtual-pkg:src/atoms/Wizard/Wizard.tsx
|
|
10542
|
-
import * as
|
|
10543
|
-
import { jsx as
|
|
10645
|
+
import * as React92 from "react";
|
|
10646
|
+
import { jsx as jsx92, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
10544
10647
|
var cn71 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10545
|
-
var Wizard =
|
|
10648
|
+
var Wizard = React92.forwardRef(
|
|
10546
10649
|
({
|
|
10547
10650
|
title,
|
|
10548
10651
|
description,
|
|
@@ -10561,8 +10664,8 @@ var Wizard = React91.forwardRef(
|
|
|
10561
10664
|
className,
|
|
10562
10665
|
...rest
|
|
10563
10666
|
}, ref) => {
|
|
10564
|
-
const titleId =
|
|
10565
|
-
const [inner, setInner] =
|
|
10667
|
+
const titleId = React92.useId();
|
|
10668
|
+
const [inner, setInner] = React92.useState(defaultStep);
|
|
10566
10669
|
const step = stepProp ?? inner;
|
|
10567
10670
|
const go = (next) => {
|
|
10568
10671
|
const clamped = Math.max(0, Math.min(steps.length, next));
|
|
@@ -10573,7 +10676,7 @@ var Wizard = React91.forwardRef(
|
|
|
10573
10676
|
const current = steps[step];
|
|
10574
10677
|
const blocked = !reviewing && current?.canContinue === false;
|
|
10575
10678
|
const statusOf = (i) => i < step ? "complete" : i === step ? "active" : "upcoming";
|
|
10576
|
-
return /* @__PURE__ */
|
|
10679
|
+
return /* @__PURE__ */ jsx92("div", { ref, className: cn71("w-full", className), ...rest, children: /* @__PURE__ */ jsxs84(
|
|
10577
10680
|
"section",
|
|
10578
10681
|
{
|
|
10579
10682
|
"aria-labelledby": titleId,
|
|
@@ -10582,40 +10685,40 @@ var Wizard = React91.forwardRef(
|
|
|
10582
10685
|
chrome === "card" && "rounded-xl border border-hairline bg-canvas p-lg shadow-card"
|
|
10583
10686
|
),
|
|
10584
10687
|
children: [
|
|
10585
|
-
/* @__PURE__ */
|
|
10586
|
-
/* @__PURE__ */
|
|
10587
|
-
(description || docsHref) && /* @__PURE__ */
|
|
10688
|
+
/* @__PURE__ */ jsxs84("header", { className: "flex flex-col gap-xs", children: [
|
|
10689
|
+
/* @__PURE__ */ jsx92("h2", { id: titleId, className: "text-heading-md font-weight-heading-sm text-ink", children: title }),
|
|
10690
|
+
(description || docsHref) && /* @__PURE__ */ jsxs84("p", { className: "text-body-sm text-muted", children: [
|
|
10588
10691
|
description,
|
|
10589
10692
|
" ",
|
|
10590
|
-
docsHref && /* @__PURE__ */
|
|
10693
|
+
docsHref && /* @__PURE__ */ jsx92(Link, { href: docsHref, variant: "standalone", arrow: true, external: true, children: docsLabel })
|
|
10591
10694
|
] })
|
|
10592
10695
|
] }),
|
|
10593
|
-
/* @__PURE__ */
|
|
10696
|
+
/* @__PURE__ */ jsx92("ol", { className: "flex flex-col", "aria-label": "Steps", children: steps.map((s, i) => {
|
|
10594
10697
|
const status = statusOf(i);
|
|
10595
10698
|
const active = status === "active";
|
|
10596
|
-
return /* @__PURE__ */
|
|
10699
|
+
return /* @__PURE__ */ jsx92(
|
|
10597
10700
|
StepperItem,
|
|
10598
10701
|
{
|
|
10599
10702
|
status,
|
|
10600
10703
|
title: s.title,
|
|
10601
10704
|
meta: active ? s.description : status === "complete" ? s.summary : void 0,
|
|
10602
10705
|
connector: i < steps.length - 1,
|
|
10603
|
-
children: s.content ? /* @__PURE__ */
|
|
10706
|
+
children: s.content ? /* @__PURE__ */ jsx92(
|
|
10604
10707
|
"div",
|
|
10605
10708
|
{
|
|
10606
10709
|
"data-state": active ? "open" : "closed",
|
|
10607
10710
|
"aria-hidden": active ? void 0 : true,
|
|
10608
10711
|
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",
|
|
10609
|
-
children: /* @__PURE__ */
|
|
10712
|
+
children: /* @__PURE__ */ jsx92("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsx92("div", { className: active ? "pb-xs" : "invisible", children: s.content }) })
|
|
10610
10713
|
}
|
|
10611
10714
|
) : null
|
|
10612
10715
|
},
|
|
10613
10716
|
s.id
|
|
10614
10717
|
);
|
|
10615
10718
|
}) }),
|
|
10616
|
-
/* @__PURE__ */
|
|
10617
|
-
step > 0 && /* @__PURE__ */
|
|
10618
|
-
reviewing ? /* @__PURE__ */
|
|
10719
|
+
/* @__PURE__ */ jsxs84("footer", { className: "flex items-center justify-end gap-sm", children: [
|
|
10720
|
+
step > 0 && /* @__PURE__ */ jsx92(Button, { variant: "secondary", onClick: () => go(step - 1), disabled: submitting, children: backLabel }),
|
|
10721
|
+
reviewing ? /* @__PURE__ */ jsx92(Button, { variant: "primary", loading: submitting, onClick: onComplete, children: completeLabel }) : /* @__PURE__ */ jsx92(Button, { variant: "primary", disabled: blocked, onClick: () => go(step + 1), children: continueLabel })
|
|
10619
10722
|
] })
|
|
10620
10723
|
]
|
|
10621
10724
|
}
|
|
@@ -10659,6 +10762,7 @@ export {
|
|
|
10659
10762
|
DataTableMobile,
|
|
10660
10763
|
DatePickerInput,
|
|
10661
10764
|
DateRangePicker,
|
|
10765
|
+
DesignSystemLoader,
|
|
10662
10766
|
Divider,
|
|
10663
10767
|
Drawer,
|
|
10664
10768
|
Dropdown,
|