@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.cjs
CHANGED
|
@@ -64,6 +64,7 @@ __export(src_exports, {
|
|
|
64
64
|
DataTableMobile: () => DataTableMobile,
|
|
65
65
|
DatePickerInput: () => DatePickerInput,
|
|
66
66
|
DateRangePicker: () => DateRangePicker,
|
|
67
|
+
DesignSystemLoader: () => DesignSystemLoader,
|
|
67
68
|
Divider: () => Divider,
|
|
68
69
|
Drawer: () => Drawer,
|
|
69
70
|
Dropdown: () => Dropdown,
|
|
@@ -5474,18 +5475,121 @@ var DateRangePicker = React43.forwardRef(
|
|
|
5474
5475
|
);
|
|
5475
5476
|
DateRangePicker.displayName = "DateRangePicker";
|
|
5476
5477
|
|
|
5477
|
-
// virtual-pkg:src/atoms/
|
|
5478
|
+
// virtual-pkg:src/atoms/DesignSystemLoader/DesignSystemLoader.tsx
|
|
5478
5479
|
var React44 = __toESM(require("react"));
|
|
5479
5480
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5481
|
+
var GRID = 9;
|
|
5482
|
+
var SWEEP_MS = 2400;
|
|
5483
|
+
var STEP_MS = 35;
|
|
5484
|
+
var SPARKLES = [
|
|
5485
|
+
{ top: "0%", left: "14%", size: 10, delay: "0ms" },
|
|
5486
|
+
{ top: "2%", left: "46%", size: 8, delay: "150ms" },
|
|
5487
|
+
{ top: "1%", left: "78%", size: 9, delay: "75ms" },
|
|
5488
|
+
{ top: "30%", left: "0%", size: 7, delay: "300ms" },
|
|
5489
|
+
{ top: "58%", left: "97%", size: 8, delay: "125ms" },
|
|
5490
|
+
{ top: "96%", left: "20%", size: 8, delay: "225ms" },
|
|
5491
|
+
{ top: "93%", left: "62%", size: 10, delay: "375ms" }
|
|
5492
|
+
];
|
|
5493
|
+
var KEYFRAMES = `
|
|
5494
|
+
@keyframes dsl-twinkle {
|
|
5495
|
+
0%, 100% { opacity: 0.2; transform: scale(0.85); }
|
|
5496
|
+
50% { opacity: 0.9; transform: scale(1.1); }
|
|
5497
|
+
}
|
|
5498
|
+
@keyframes dsl-cell {
|
|
5499
|
+
0% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 1; }
|
|
5500
|
+
8% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 0.8; }
|
|
5501
|
+
18% { background-color: var(--color-primary-soft); border-color: transparent; border-style: solid; opacity: 1; }
|
|
5502
|
+
30% { background-color: var(--color-primary-soft); border-color: transparent; border-style: solid; opacity: 0.55; }
|
|
5503
|
+
45% { background-color: var(--color-surface-soft); border-color: var(--color-hairline); border-style: solid; opacity: 1; }
|
|
5504
|
+
62% { background-color: transparent; border-color: var(--color-hairline-strong); border-style: dashed; opacity: 1; }
|
|
5505
|
+
82% { background-color: transparent; border-color: var(--color-hairline-strong); border-style: dashed; opacity: 1; }
|
|
5506
|
+
100% { background-color: var(--color-primary); border-color: transparent; border-style: solid; opacity: 1; }
|
|
5507
|
+
}
|
|
5508
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5509
|
+
.dsl-animate { animation: none !important; }
|
|
5510
|
+
}
|
|
5511
|
+
`;
|
|
5512
|
+
var DesignSystemLoader = React44.forwardRef(
|
|
5513
|
+
({
|
|
5514
|
+
label = "Loading design system\u2026",
|
|
5515
|
+
sublabel = "Building your component library",
|
|
5516
|
+
className,
|
|
5517
|
+
...rest
|
|
5518
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
5519
|
+
"div",
|
|
5520
|
+
{
|
|
5521
|
+
ref,
|
|
5522
|
+
role: "status",
|
|
5523
|
+
"aria-live": "polite",
|
|
5524
|
+
"aria-busy": "true",
|
|
5525
|
+
className: [
|
|
5526
|
+
"mx-auto flex w-full max-w-3xl flex-col items-center justify-center gap-xl bg-canvas px-lg py-xxl text-center",
|
|
5527
|
+
className
|
|
5528
|
+
].filter(Boolean).join(" "),
|
|
5529
|
+
...rest,
|
|
5530
|
+
children: [
|
|
5531
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("style", { children: KEYFRAMES }),
|
|
5532
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "relative mx-auto w-full max-w-drawer", children: [
|
|
5533
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pointer-events-none absolute -inset-md", "aria-hidden": "true", children: SPARKLES.map((sparkle) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5534
|
+
Icon,
|
|
5535
|
+
{
|
|
5536
|
+
name: "sparkles",
|
|
5537
|
+
size: sparkle.size,
|
|
5538
|
+
className: "dsl-animate absolute text-primary opacity-30",
|
|
5539
|
+
style: {
|
|
5540
|
+
top: sparkle.top,
|
|
5541
|
+
left: sparkle.left,
|
|
5542
|
+
animation: `dsl-twinkle 1.6s ease-in-out ${sparkle.delay} infinite`
|
|
5543
|
+
}
|
|
5544
|
+
},
|
|
5545
|
+
`${sparkle.top}-${sparkle.left}`
|
|
5546
|
+
)) }),
|
|
5547
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5548
|
+
"div",
|
|
5549
|
+
{
|
|
5550
|
+
className: "relative grid gap-xxs",
|
|
5551
|
+
"aria-hidden": "true",
|
|
5552
|
+
style: { gridTemplateColumns: `repeat(${GRID}, minmax(0, 1fr))` },
|
|
5553
|
+
children: Array.from({ length: GRID * GRID }, (_, index) => {
|
|
5554
|
+
const row = Math.floor(index / GRID);
|
|
5555
|
+
const col = index % GRID;
|
|
5556
|
+
const diagonal = row + (GRID - 1 - col);
|
|
5557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5558
|
+
"span",
|
|
5559
|
+
{
|
|
5560
|
+
className: "dsl-animate aspect-square rounded-xs border-2 border-transparent bg-primary",
|
|
5561
|
+
style: {
|
|
5562
|
+
animation: `dsl-cell ${SWEEP_MS}ms ease-in-out ${diagonal * STEP_MS}ms infinite both`
|
|
5563
|
+
}
|
|
5564
|
+
},
|
|
5565
|
+
index
|
|
5566
|
+
);
|
|
5567
|
+
})
|
|
5568
|
+
}
|
|
5569
|
+
)
|
|
5570
|
+
] }),
|
|
5571
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "mx-auto flex w-full max-w-drawer flex-col items-center gap-xs", children: [
|
|
5572
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-heading-sm text-ink", children: label }),
|
|
5573
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-body-sm text-muted", children: sublabel })
|
|
5574
|
+
] })
|
|
5575
|
+
]
|
|
5576
|
+
}
|
|
5577
|
+
)
|
|
5578
|
+
);
|
|
5579
|
+
DesignSystemLoader.displayName = "DesignSystemLoader";
|
|
5580
|
+
|
|
5581
|
+
// virtual-pkg:src/atoms/Divider/Divider.tsx
|
|
5582
|
+
var React45 = __toESM(require("react"));
|
|
5583
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5480
5584
|
var LINE = {
|
|
5481
5585
|
default: "bg-hairline",
|
|
5482
5586
|
soft: "bg-hairline-soft",
|
|
5483
5587
|
strong: "bg-hairline-strong"
|
|
5484
5588
|
};
|
|
5485
|
-
var Divider =
|
|
5589
|
+
var Divider = React45.forwardRef(
|
|
5486
5590
|
({ orientation = "horizontal", label, labelAlign = "center", tone = "default", className, ...rest }, ref) => {
|
|
5487
5591
|
if (orientation === "vertical") {
|
|
5488
|
-
return /* @__PURE__ */ (0,
|
|
5592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5489
5593
|
"div",
|
|
5490
5594
|
{
|
|
5491
5595
|
ref,
|
|
@@ -5497,7 +5601,7 @@ var Divider = React44.forwardRef(
|
|
|
5497
5601
|
);
|
|
5498
5602
|
}
|
|
5499
5603
|
if (label) {
|
|
5500
|
-
return /* @__PURE__ */ (0,
|
|
5604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5501
5605
|
"div",
|
|
5502
5606
|
{
|
|
5503
5607
|
ref,
|
|
@@ -5506,7 +5610,7 @@ var Divider = React44.forwardRef(
|
|
|
5506
5610
|
className: ["flex w-full items-center gap-md rounded-none", className].filter(Boolean).join(" "),
|
|
5507
5611
|
...rest,
|
|
5508
5612
|
children: [
|
|
5509
|
-
/* @__PURE__ */ (0,
|
|
5613
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5510
5614
|
"span",
|
|
5511
5615
|
{
|
|
5512
5616
|
"aria-hidden": "true",
|
|
@@ -5517,13 +5621,13 @@ var Divider = React44.forwardRef(
|
|
|
5517
5621
|
].join(" ")
|
|
5518
5622
|
}
|
|
5519
5623
|
),
|
|
5520
|
-
/* @__PURE__ */ (0,
|
|
5521
|
-
/* @__PURE__ */ (0,
|
|
5624
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "shrink-0 text-body-sm text-body", children: label }),
|
|
5625
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { "aria-hidden": "true", className: ["h-px flex-1 rounded-none", LINE[tone]].join(" ") })
|
|
5522
5626
|
]
|
|
5523
5627
|
}
|
|
5524
5628
|
);
|
|
5525
5629
|
}
|
|
5526
|
-
return /* @__PURE__ */ (0,
|
|
5630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5527
5631
|
"div",
|
|
5528
5632
|
{
|
|
5529
5633
|
ref,
|
|
@@ -5538,11 +5642,11 @@ var Divider = React44.forwardRef(
|
|
|
5538
5642
|
Divider.displayName = "Divider";
|
|
5539
5643
|
|
|
5540
5644
|
// virtual-pkg:src/atoms/Drawer/Drawer.tsx
|
|
5541
|
-
var
|
|
5645
|
+
var React46 = __toESM(require("react"));
|
|
5542
5646
|
var import_react_dom5 = require("react-dom");
|
|
5543
|
-
var
|
|
5647
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5544
5648
|
var cn35 = (...parts) => parts.filter(Boolean).join(" ");
|
|
5545
|
-
var Drawer =
|
|
5649
|
+
var Drawer = React46.forwardRef(
|
|
5546
5650
|
({
|
|
5547
5651
|
open,
|
|
5548
5652
|
onOpenChange,
|
|
@@ -5560,11 +5664,11 @@ var Drawer = React45.forwardRef(
|
|
|
5560
5664
|
children,
|
|
5561
5665
|
...rest
|
|
5562
5666
|
}, ref) => {
|
|
5563
|
-
const titleId =
|
|
5564
|
-
const panelRef =
|
|
5565
|
-
const [mounted, setMounted] =
|
|
5566
|
-
|
|
5567
|
-
|
|
5667
|
+
const titleId = React46.useId();
|
|
5668
|
+
const panelRef = React46.useRef(null);
|
|
5669
|
+
const [mounted, setMounted] = React46.useState(false);
|
|
5670
|
+
React46.useEffect(() => setMounted(true), []);
|
|
5671
|
+
React46.useEffect(() => {
|
|
5568
5672
|
if (!open) return;
|
|
5569
5673
|
const onKey = (e) => {
|
|
5570
5674
|
if (e.key === "Escape") onOpenChange(false);
|
|
@@ -5592,7 +5696,7 @@ var Drawer = React45.forwardRef(
|
|
|
5592
5696
|
}, [open, onOpenChange, closeOnScrimClick]);
|
|
5593
5697
|
const state = open ? "open" : "closed";
|
|
5594
5698
|
const hasTitle = title !== void 0 && title !== null;
|
|
5595
|
-
const node = /* @__PURE__ */ (0,
|
|
5699
|
+
const node = /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
5596
5700
|
"div",
|
|
5597
5701
|
{
|
|
5598
5702
|
"data-state": state,
|
|
@@ -5600,7 +5704,7 @@ var Drawer = React45.forwardRef(
|
|
|
5600
5704
|
style: { zIndex: "var(--z-modal, 1200)" },
|
|
5601
5705
|
"aria-hidden": open ? void 0 : true,
|
|
5602
5706
|
children: [
|
|
5603
|
-
/* @__PURE__ */ (0,
|
|
5707
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5604
5708
|
"div",
|
|
5605
5709
|
{
|
|
5606
5710
|
"data-state": state,
|
|
@@ -5608,7 +5712,7 @@ var Drawer = React45.forwardRef(
|
|
|
5608
5712
|
className: "fixed inset-0 bg-scrim/40 transition-opacity duration-200 ease-out data-[state=open]:opacity-100 data-[state=closed]:opacity-0"
|
|
5609
5713
|
}
|
|
5610
5714
|
),
|
|
5611
|
-
/* @__PURE__ */ (0,
|
|
5715
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
5612
5716
|
"div",
|
|
5613
5717
|
{
|
|
5614
5718
|
ref: (el) => {
|
|
@@ -5631,12 +5735,12 @@ var Drawer = React45.forwardRef(
|
|
|
5631
5735
|
),
|
|
5632
5736
|
...rest,
|
|
5633
5737
|
children: [
|
|
5634
|
-
!hideHeader && /* @__PURE__ */ (0,
|
|
5635
|
-
/* @__PURE__ */ (0,
|
|
5738
|
+
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex shrink-0 items-center justify-between gap-sm px-base pb-sm pt-base", children: [
|
|
5739
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-sm", children: [
|
|
5636
5740
|
headerStart,
|
|
5637
|
-
hasTitle && /* @__PURE__ */ (0,
|
|
5741
|
+
hasTitle && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h2", { id: titleId, className: "truncate text-heading-sm text-ink", children: title })
|
|
5638
5742
|
] }),
|
|
5639
|
-
/* @__PURE__ */ (0,
|
|
5743
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5640
5744
|
IconButton,
|
|
5641
5745
|
{
|
|
5642
5746
|
icon: closeIcon,
|
|
@@ -5647,7 +5751,7 @@ var Drawer = React45.forwardRef(
|
|
|
5647
5751
|
}
|
|
5648
5752
|
)
|
|
5649
5753
|
] }),
|
|
5650
|
-
/* @__PURE__ */ (0,
|
|
5754
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5651
5755
|
"div",
|
|
5652
5756
|
{
|
|
5653
5757
|
className: cn35(
|
|
@@ -5657,7 +5761,7 @@ var Drawer = React45.forwardRef(
|
|
|
5657
5761
|
children
|
|
5658
5762
|
}
|
|
5659
5763
|
),
|
|
5660
|
-
footer && /* @__PURE__ */ (0,
|
|
5764
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex shrink-0 items-center justify-end gap-sm border-t border-hairline px-base py-md", children: footer })
|
|
5661
5765
|
]
|
|
5662
5766
|
}
|
|
5663
5767
|
)
|
|
@@ -5670,14 +5774,14 @@ var Drawer = React45.forwardRef(
|
|
|
5670
5774
|
Drawer.displayName = "Drawer";
|
|
5671
5775
|
|
|
5672
5776
|
// virtual-pkg:src/atoms/DropdownMenu/DropdownMenu.tsx
|
|
5673
|
-
var
|
|
5777
|
+
var React48 = __toESM(require("react"));
|
|
5674
5778
|
var import_react_dom6 = require("react-dom");
|
|
5675
5779
|
|
|
5676
5780
|
// virtual-pkg:src/atoms/MenuItem/MenuItem.tsx
|
|
5677
|
-
var
|
|
5678
|
-
var
|
|
5781
|
+
var React47 = __toESM(require("react"));
|
|
5782
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5679
5783
|
var cn36 = (...parts) => parts.filter(Boolean).join(" ");
|
|
5680
|
-
var MenuItem =
|
|
5784
|
+
var MenuItem = React47.forwardRef(
|
|
5681
5785
|
({
|
|
5682
5786
|
icon,
|
|
5683
5787
|
shortcut,
|
|
@@ -5690,7 +5794,7 @@ var MenuItem = React46.forwardRef(
|
|
|
5690
5794
|
...rest
|
|
5691
5795
|
}, ref) => {
|
|
5692
5796
|
const destructive = tone === "destructive";
|
|
5693
|
-
return /* @__PURE__ */ (0,
|
|
5797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
5694
5798
|
"button",
|
|
5695
5799
|
{
|
|
5696
5800
|
ref,
|
|
@@ -5708,7 +5812,7 @@ var MenuItem = React46.forwardRef(
|
|
|
5708
5812
|
),
|
|
5709
5813
|
...rest,
|
|
5710
5814
|
children: [
|
|
5711
|
-
icon && /* @__PURE__ */ (0,
|
|
5815
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5712
5816
|
Icon,
|
|
5713
5817
|
{
|
|
5714
5818
|
name: icon,
|
|
@@ -5716,14 +5820,14 @@ var MenuItem = React46.forwardRef(
|
|
|
5716
5820
|
className: destructive ? "text-semantic-error" : "text-body"
|
|
5717
5821
|
}
|
|
5718
5822
|
),
|
|
5719
|
-
/* @__PURE__ */ (0,
|
|
5720
|
-
shortcut && shortcut.length > 0 && /* @__PURE__ */ (0,
|
|
5823
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "min-w-0 flex-1 truncate", children }),
|
|
5824
|
+
shortcut && shortcut.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5721
5825
|
"span",
|
|
5722
5826
|
{
|
|
5723
5827
|
className: "ml-auto inline-flex shrink-0 items-center gap-xs text-body-sm text-muted",
|
|
5724
5828
|
"aria-label": `Shortcut ${shortcut.join(" ")}`,
|
|
5725
5829
|
children: shortcut.map(
|
|
5726
|
-
(key) => key === "command" ? /* @__PURE__ */ (0,
|
|
5830
|
+
(key) => key === "command" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { name: "command", size: 13 }, key) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("kbd", { className: "font-[inherit]", children: key }, key)
|
|
5727
5831
|
)
|
|
5728
5832
|
}
|
|
5729
5833
|
)
|
|
@@ -5735,13 +5839,13 @@ var MenuItem = React46.forwardRef(
|
|
|
5735
5839
|
MenuItem.displayName = "MenuItem";
|
|
5736
5840
|
|
|
5737
5841
|
// virtual-pkg:src/atoms/DropdownMenu/DropdownMenu.tsx
|
|
5738
|
-
var
|
|
5842
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5739
5843
|
var cn37 = (...parts) => parts.filter(Boolean).join(" ");
|
|
5740
5844
|
var isSeparator = (item) => item.type === "separator";
|
|
5741
5845
|
var isLabel = (item) => item.type === "label";
|
|
5742
5846
|
var EDGE = 8;
|
|
5743
5847
|
var GAP = 4;
|
|
5744
|
-
var DropdownMenu =
|
|
5848
|
+
var DropdownMenu = React48.forwardRef(
|
|
5745
5849
|
({
|
|
5746
5850
|
trigger,
|
|
5747
5851
|
items,
|
|
@@ -5754,33 +5858,33 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5754
5858
|
"aria-label": ariaLabel,
|
|
5755
5859
|
className
|
|
5756
5860
|
}, forwardedRef) => {
|
|
5757
|
-
const autoId =
|
|
5861
|
+
const autoId = React48.useId();
|
|
5758
5862
|
const panelId = `dropdown-menu-${autoId}`;
|
|
5759
|
-
const triggerRef =
|
|
5760
|
-
const panelRef =
|
|
5761
|
-
const itemRefs =
|
|
5762
|
-
const openedRef =
|
|
5763
|
-
const suppressFocusRef =
|
|
5764
|
-
const [mounted, setMounted] =
|
|
5765
|
-
const [innerOpen, setInnerOpen] =
|
|
5766
|
-
const [pos, setPos] =
|
|
5863
|
+
const triggerRef = React48.useRef(null);
|
|
5864
|
+
const panelRef = React48.useRef(null);
|
|
5865
|
+
const itemRefs = React48.useRef([]);
|
|
5866
|
+
const openedRef = React48.useRef(false);
|
|
5867
|
+
const suppressFocusRef = React48.useRef(false);
|
|
5868
|
+
const [mounted, setMounted] = React48.useState(false);
|
|
5869
|
+
const [innerOpen, setInnerOpen] = React48.useState(defaultOpen);
|
|
5870
|
+
const [pos, setPos] = React48.useState(null);
|
|
5767
5871
|
const open = openProp ?? innerOpen;
|
|
5768
|
-
|
|
5769
|
-
const setOpen =
|
|
5872
|
+
React48.useEffect(() => setMounted(true), []);
|
|
5873
|
+
const setOpen = React48.useCallback(
|
|
5770
5874
|
(next) => {
|
|
5771
5875
|
if (openProp === void 0) setInnerOpen(next);
|
|
5772
5876
|
onOpenChange?.(next);
|
|
5773
5877
|
},
|
|
5774
5878
|
[openProp, onOpenChange]
|
|
5775
5879
|
);
|
|
5776
|
-
const focusable =
|
|
5880
|
+
const focusable = React48.useMemo(
|
|
5777
5881
|
() => items.reduce((acc, item, index) => {
|
|
5778
5882
|
if (!isSeparator(item) && !isLabel(item) && !item.disabled) acc.push(index);
|
|
5779
5883
|
return acc;
|
|
5780
5884
|
}, []),
|
|
5781
5885
|
[items]
|
|
5782
5886
|
);
|
|
5783
|
-
const place2 =
|
|
5887
|
+
const place2 = React48.useCallback(() => {
|
|
5784
5888
|
const node = triggerRef.current;
|
|
5785
5889
|
const panel2 = panelRef.current;
|
|
5786
5890
|
if (!node || !panel2) return;
|
|
@@ -5800,7 +5904,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5800
5904
|
left = Math.max(EDGE, Math.min(left, Math.max(EDGE, vw - EDGE - width)));
|
|
5801
5905
|
setPos({ top, left });
|
|
5802
5906
|
}, [align, side]);
|
|
5803
|
-
|
|
5907
|
+
React48.useLayoutEffect(() => {
|
|
5804
5908
|
if (!open) return;
|
|
5805
5909
|
place2();
|
|
5806
5910
|
const frame2 = window.requestAnimationFrame(place2);
|
|
@@ -5812,7 +5916,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5812
5916
|
window.removeEventListener("scroll", place2, true);
|
|
5813
5917
|
};
|
|
5814
5918
|
}, [open, place2]);
|
|
5815
|
-
|
|
5919
|
+
React48.useEffect(() => {
|
|
5816
5920
|
if (open && !openedRef.current) {
|
|
5817
5921
|
openedRef.current = true;
|
|
5818
5922
|
const first = focusable.length > 0 ? itemRefs.current[focusable[0]] : null;
|
|
@@ -5823,7 +5927,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5823
5927
|
else triggerRef.current?.focus({ preventScroll: true });
|
|
5824
5928
|
}
|
|
5825
5929
|
}, [open, focusable]);
|
|
5826
|
-
|
|
5930
|
+
React48.useEffect(() => {
|
|
5827
5931
|
if (!open) return;
|
|
5828
5932
|
const onPointerDown = (event) => {
|
|
5829
5933
|
const target = event.target;
|
|
@@ -5901,7 +6005,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5901
6005
|
ref.current = node;
|
|
5902
6006
|
}
|
|
5903
6007
|
};
|
|
5904
|
-
const triggerNode =
|
|
6008
|
+
const triggerNode = React48.cloneElement(trigger, {
|
|
5905
6009
|
ref: mergeTriggerRef,
|
|
5906
6010
|
"aria-haspopup": "menu",
|
|
5907
6011
|
"aria-expanded": open,
|
|
@@ -5920,7 +6024,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5920
6024
|
}
|
|
5921
6025
|
}
|
|
5922
6026
|
});
|
|
5923
|
-
const panel = /* @__PURE__ */ (0,
|
|
6027
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
5924
6028
|
"div",
|
|
5925
6029
|
{
|
|
5926
6030
|
ref: panelRef,
|
|
@@ -5945,7 +6049,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5945
6049
|
"data-[state=closed]:pointer-events-none data-[state=closed]:-translate-y-1 data-[state=closed]:opacity-0"
|
|
5946
6050
|
),
|
|
5947
6051
|
children: [
|
|
5948
|
-
header ? /* @__PURE__ */ (0,
|
|
6052
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5949
6053
|
"div",
|
|
5950
6054
|
{
|
|
5951
6055
|
role: "presentation",
|
|
@@ -5953,12 +6057,12 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5953
6057
|
children: header
|
|
5954
6058
|
}
|
|
5955
6059
|
) : null,
|
|
5956
|
-
/* @__PURE__ */ (0,
|
|
6060
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain p-xs", children: items.map((entry, index) => {
|
|
5957
6061
|
if (isSeparator(entry)) {
|
|
5958
|
-
return /* @__PURE__ */ (0,
|
|
6062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Divider, { tone: "soft", className: "my-xs" }, entry.id);
|
|
5959
6063
|
}
|
|
5960
6064
|
if (isLabel(entry)) {
|
|
5961
|
-
return /* @__PURE__ */ (0,
|
|
6065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5962
6066
|
"div",
|
|
5963
6067
|
{
|
|
5964
6068
|
role: "presentation",
|
|
@@ -5968,7 +6072,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5968
6072
|
entry.id
|
|
5969
6073
|
);
|
|
5970
6074
|
}
|
|
5971
|
-
return /* @__PURE__ */ (0,
|
|
6075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5972
6076
|
MenuItem,
|
|
5973
6077
|
{
|
|
5974
6078
|
ref: (node) => {
|
|
@@ -5989,7 +6093,7 @@ var DropdownMenu = React47.forwardRef(
|
|
|
5989
6093
|
]
|
|
5990
6094
|
}
|
|
5991
6095
|
);
|
|
5992
|
-
return /* @__PURE__ */ (0,
|
|
6096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
5993
6097
|
"span",
|
|
5994
6098
|
{
|
|
5995
6099
|
ref: forwardedRef,
|
|
@@ -6006,11 +6110,11 @@ var DropdownMenu = React47.forwardRef(
|
|
|
6006
6110
|
DropdownMenu.displayName = "DropdownMenu";
|
|
6007
6111
|
|
|
6008
6112
|
// virtual-pkg:src/atoms/FileUpload/FileUpload.tsx
|
|
6009
|
-
var
|
|
6113
|
+
var React50 = __toESM(require("react"));
|
|
6010
6114
|
|
|
6011
6115
|
// virtual-pkg:src/atoms/ProgressBar/ProgressBar.tsx
|
|
6012
6116
|
var import_react2 = __toESM(require("react"));
|
|
6013
|
-
var
|
|
6117
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6014
6118
|
function cn38(...parts) {
|
|
6015
6119
|
return parts.filter(Boolean).join(" ");
|
|
6016
6120
|
}
|
|
@@ -6053,9 +6157,9 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6053
6157
|
if (variant === "gauge") {
|
|
6054
6158
|
const dim = size === "sm" ? "size-12" : "size-16";
|
|
6055
6159
|
const ring = size === "sm" ? "inset-[5px]" : "inset-[6px]";
|
|
6056
|
-
return /* @__PURE__ */ (0,
|
|
6057
|
-
/* @__PURE__ */ (0,
|
|
6058
|
-
/* @__PURE__ */ (0,
|
|
6160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ref, className: cn38("inline-flex flex-col items-center gap-sm", className), ...rest, children: [
|
|
6161
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ...a11y, className: cn38("relative rounded-full", dim), children: [
|
|
6162
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6059
6163
|
"div",
|
|
6060
6164
|
{
|
|
6061
6165
|
"aria-hidden": "true",
|
|
@@ -6065,7 +6169,7 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6065
6169
|
}
|
|
6066
6170
|
}
|
|
6067
6171
|
),
|
|
6068
|
-
/* @__PURE__ */ (0,
|
|
6172
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6069
6173
|
"div",
|
|
6070
6174
|
{
|
|
6071
6175
|
"aria-hidden": "true",
|
|
@@ -6078,15 +6182,15 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6078
6182
|
}
|
|
6079
6183
|
)
|
|
6080
6184
|
] }),
|
|
6081
|
-
label ? /* @__PURE__ */ (0,
|
|
6185
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
6082
6186
|
] });
|
|
6083
6187
|
}
|
|
6084
6188
|
const track = size === "sm" ? "h-1" : "h-2";
|
|
6085
6189
|
if (variant === "segmented") {
|
|
6086
6190
|
const steps = Math.max(1, Math.round(safeMax));
|
|
6087
6191
|
const done = Math.round(clamped);
|
|
6088
|
-
return /* @__PURE__ */ (0,
|
|
6089
|
-
/* @__PURE__ */ (0,
|
|
6192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ref, className: cn38("flex w-full flex-col items-start gap-md", className), ...rest, children: [
|
|
6193
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { ...a11y, "aria-valuetext": `Step ${done} of ${steps}`, className: "flex w-full items-center gap-xs", children: Array.from({ length: steps }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6090
6194
|
"span",
|
|
6091
6195
|
{
|
|
6092
6196
|
"aria-hidden": "true",
|
|
@@ -6098,11 +6202,11 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6098
6202
|
},
|
|
6099
6203
|
i
|
|
6100
6204
|
)) }),
|
|
6101
|
-
label ? /* @__PURE__ */ (0,
|
|
6205
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
6102
6206
|
] });
|
|
6103
6207
|
}
|
|
6104
|
-
return /* @__PURE__ */ (0,
|
|
6105
|
-
/* @__PURE__ */ (0,
|
|
6208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ref, className: cn38("flex w-full flex-col items-center gap-md", className), ...rest, children: [
|
|
6209
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { ...a11y, className: cn38("relative w-full overflow-hidden rounded-full bg-surface-strong", track), children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6106
6210
|
"div",
|
|
6107
6211
|
{
|
|
6108
6212
|
"aria-hidden": "true",
|
|
@@ -6113,21 +6217,21 @@ var ProgressBar = import_react2.default.forwardRef(
|
|
|
6113
6217
|
style: { width: `${pct}%` }
|
|
6114
6218
|
}
|
|
6115
6219
|
) }),
|
|
6116
|
-
label ? /* @__PURE__ */ (0,
|
|
6220
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
6117
6221
|
] });
|
|
6118
6222
|
}
|
|
6119
6223
|
);
|
|
6120
6224
|
ProgressBar.displayName = "ProgressBar";
|
|
6121
6225
|
|
|
6122
6226
|
// virtual-pkg:src/atoms/FileUpload/FileUpload.tsx
|
|
6123
|
-
var
|
|
6227
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6124
6228
|
var cn39 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6125
6229
|
var formatBytes = (bytes) => {
|
|
6126
6230
|
if (bytes < 1024) return `${bytes} B`;
|
|
6127
6231
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
6128
6232
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
6129
6233
|
};
|
|
6130
|
-
var FileUpload =
|
|
6234
|
+
var FileUpload = React50.forwardRef(
|
|
6131
6235
|
({
|
|
6132
6236
|
items = [],
|
|
6133
6237
|
onFilesAdded,
|
|
@@ -6142,18 +6246,18 @@ var FileUpload = React49.forwardRef(
|
|
|
6142
6246
|
id,
|
|
6143
6247
|
className
|
|
6144
6248
|
}, ref) => {
|
|
6145
|
-
const autoId =
|
|
6249
|
+
const autoId = React50.useId();
|
|
6146
6250
|
const inputId = id ?? `upload-${autoId}`;
|
|
6147
|
-
const inputRef =
|
|
6148
|
-
const [dragging, setDragging] =
|
|
6149
|
-
const depth =
|
|
6251
|
+
const inputRef = React50.useRef(null);
|
|
6252
|
+
const [dragging, setDragging] = React50.useState(false);
|
|
6253
|
+
const depth = React50.useRef(0);
|
|
6150
6254
|
const add = (list) => {
|
|
6151
6255
|
if (!list || disabled) return;
|
|
6152
6256
|
const files = Array.from(list);
|
|
6153
6257
|
if (files.length) onFilesAdded?.(multiple ? files : files.slice(0, 1));
|
|
6154
6258
|
};
|
|
6155
|
-
return /* @__PURE__ */ (0,
|
|
6156
|
-
/* @__PURE__ */ (0,
|
|
6259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref, className: cn39("flex w-full min-w-0 flex-col gap-sm rounded-none", className), children: [
|
|
6260
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6157
6261
|
"div",
|
|
6158
6262
|
{
|
|
6159
6263
|
"data-state": dragging ? "active" : "idle",
|
|
@@ -6181,7 +6285,7 @@ var FileUpload = React49.forwardRef(
|
|
|
6181
6285
|
disabled && "opacity-50"
|
|
6182
6286
|
),
|
|
6183
6287
|
children: [
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6288
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6185
6289
|
Icon,
|
|
6186
6290
|
{
|
|
6187
6291
|
name: "upload",
|
|
@@ -6192,7 +6296,7 @@ var FileUpload = React49.forwardRef(
|
|
|
6192
6296
|
)
|
|
6193
6297
|
}
|
|
6194
6298
|
),
|
|
6195
|
-
/* @__PURE__ */ (0,
|
|
6299
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6196
6300
|
Input,
|
|
6197
6301
|
{
|
|
6198
6302
|
ref: inputRef,
|
|
@@ -6212,8 +6316,8 @@ var FileUpload = React49.forwardRef(
|
|
|
6212
6316
|
}
|
|
6213
6317
|
}
|
|
6214
6318
|
),
|
|
6215
|
-
dragging ? /* @__PURE__ */ (0,
|
|
6216
|
-
/* @__PURE__ */ (0,
|
|
6319
|
+
dragging ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "flex h-7 items-center text-body-sm text-primary", "aria-live": "polite", children: dropLabel }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { className: "flex items-center gap-xxs text-body-sm text-muted", children: [
|
|
6320
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6217
6321
|
Button,
|
|
6218
6322
|
{
|
|
6219
6323
|
variant: "ghost",
|
|
@@ -6224,24 +6328,24 @@ var FileUpload = React49.forwardRef(
|
|
|
6224
6328
|
children: actionLabel
|
|
6225
6329
|
}
|
|
6226
6330
|
),
|
|
6227
|
-
/* @__PURE__ */ (0,
|
|
6331
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: hint })
|
|
6228
6332
|
] })
|
|
6229
6333
|
]
|
|
6230
6334
|
}
|
|
6231
6335
|
),
|
|
6232
|
-
items.length > 0 ? /* @__PURE__ */ (0,
|
|
6336
|
+
items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ul", { className: "flex flex-col gap-sm", "aria-label": "Uploaded files", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6233
6337
|
"li",
|
|
6234
6338
|
{
|
|
6235
6339
|
className: "flex items-center gap-md rounded-lg border border-hairline bg-canvas px-base py-md shadow-card",
|
|
6236
6340
|
children: [
|
|
6237
|
-
/* @__PURE__ */ (0,
|
|
6238
|
-
/* @__PURE__ */ (0,
|
|
6239
|
-
/* @__PURE__ */ (0,
|
|
6240
|
-
item.status === "error" ? /* @__PURE__ */ (0,
|
|
6341
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: "file", size: 20, className: "text-muted" }),
|
|
6342
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs", children: [
|
|
6343
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "truncate text-body-md font-weight-label text-ink", children: item.name }),
|
|
6344
|
+
item.status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-body-sm text-semantic-error", role: "alert", children: item.error ?? "Couldn\u2019t upload file" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { className: "text-body-sm text-muted", children: [
|
|
6241
6345
|
formatBytes(item.size),
|
|
6242
6346
|
item.status === "uploading" ? " \xB7 Uploading\u2026" : ""
|
|
6243
6347
|
] }),
|
|
6244
|
-
item.status === "uploading" ? /* @__PURE__ */ (0,
|
|
6348
|
+
item.status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6245
6349
|
ProgressBar,
|
|
6246
6350
|
{
|
|
6247
6351
|
value: item.progress ?? 0,
|
|
@@ -6253,7 +6357,7 @@ var FileUpload = React49.forwardRef(
|
|
|
6253
6357
|
}
|
|
6254
6358
|
) : null
|
|
6255
6359
|
] }),
|
|
6256
|
-
item.status === "uploading" ? /* @__PURE__ */ (0,
|
|
6360
|
+
item.status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6257
6361
|
IconButton,
|
|
6258
6362
|
{
|
|
6259
6363
|
icon: "x",
|
|
@@ -6262,7 +6366,7 @@ var FileUpload = React49.forwardRef(
|
|
|
6262
6366
|
"aria-label": `Cancel upload of ${item.name}`,
|
|
6263
6367
|
onClick: () => onRemove?.(item.id)
|
|
6264
6368
|
}
|
|
6265
|
-
) : item.status === "error" ? /* @__PURE__ */ (0,
|
|
6369
|
+
) : item.status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6266
6370
|
IconButton,
|
|
6267
6371
|
{
|
|
6268
6372
|
icon: "rotate-cw",
|
|
@@ -6271,9 +6375,9 @@ var FileUpload = React49.forwardRef(
|
|
|
6271
6375
|
"aria-label": `Retry upload of ${item.name}`,
|
|
6272
6376
|
onClick: () => onRetry?.(item.id)
|
|
6273
6377
|
}
|
|
6274
|
-
) : /* @__PURE__ */ (0,
|
|
6275
|
-
/* @__PURE__ */ (0,
|
|
6276
|
-
/* @__PURE__ */ (0,
|
|
6378
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "inline-flex items-center gap-xs", children: [
|
|
6379
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: "circle-check", size: 20, className: "text-semantic-success", "aria-label": "Uploaded" }),
|
|
6380
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6277
6381
|
IconButton,
|
|
6278
6382
|
{
|
|
6279
6383
|
icon: "x",
|
|
@@ -6294,11 +6398,11 @@ var FileUpload = React49.forwardRef(
|
|
|
6294
6398
|
FileUpload.displayName = "FileUpload";
|
|
6295
6399
|
|
|
6296
6400
|
// virtual-pkg:src/atoms/Footer/Footer.tsx
|
|
6297
|
-
var
|
|
6401
|
+
var React52 = __toESM(require("react"));
|
|
6298
6402
|
|
|
6299
6403
|
// virtual-pkg:src/atoms/Logo/Logo.tsx
|
|
6300
6404
|
var import_react3 = __toESM(require("react"));
|
|
6301
|
-
var
|
|
6405
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6302
6406
|
function cn40(...parts) {
|
|
6303
6407
|
return parts.filter(Boolean).join(" ");
|
|
6304
6408
|
}
|
|
@@ -6328,7 +6432,7 @@ var tileSize = {
|
|
|
6328
6432
|
lg: "size-16 rounded-lg"
|
|
6329
6433
|
};
|
|
6330
6434
|
function OrbitMark({ size }) {
|
|
6331
|
-
return /* @__PURE__ */ (0,
|
|
6435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6332
6436
|
"span",
|
|
6333
6437
|
{
|
|
6334
6438
|
"aria-hidden": "true",
|
|
@@ -6337,7 +6441,7 @@ function OrbitMark({ size }) {
|
|
|
6337
6441
|
markSize[size],
|
|
6338
6442
|
ringWidth[size]
|
|
6339
6443
|
),
|
|
6340
|
-
children: /* @__PURE__ */ (0,
|
|
6444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: cn40("absolute -right-px -top-px rounded-full bg-current", dotSize[size]) })
|
|
6341
6445
|
}
|
|
6342
6446
|
);
|
|
6343
6447
|
}
|
|
@@ -6352,8 +6456,8 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6352
6456
|
className,
|
|
6353
6457
|
...rest
|
|
6354
6458
|
}, ref) => {
|
|
6355
|
-
const glyph2 = mark ?? /* @__PURE__ */ (0,
|
|
6356
|
-
const markNode = tone === "inverse" ? /* @__PURE__ */ (0,
|
|
6459
|
+
const glyph2 = mark ?? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(OrbitMark, { size });
|
|
6460
|
+
const markNode = tone === "inverse" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6357
6461
|
"span",
|
|
6358
6462
|
{
|
|
6359
6463
|
"aria-hidden": "true",
|
|
@@ -6363,10 +6467,10 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6363
6467
|
),
|
|
6364
6468
|
children: glyph2
|
|
6365
6469
|
}
|
|
6366
|
-
) : /* @__PURE__ */ (0,
|
|
6367
|
-
const content = /* @__PURE__ */ (0,
|
|
6470
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": "true", className: "inline-flex shrink-0 text-ink", children: glyph2 });
|
|
6471
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
6368
6472
|
markNode,
|
|
6369
|
-
variant === "lockup" ? /* @__PURE__ */ (0,
|
|
6473
|
+
variant === "lockup" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": "true", className: cn40("whitespace-nowrap text-ink", wordSize[size]), children: name }) : null
|
|
6370
6474
|
] });
|
|
6371
6475
|
const base2 = cn40(
|
|
6372
6476
|
"inline-flex items-center",
|
|
@@ -6374,7 +6478,7 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6374
6478
|
className
|
|
6375
6479
|
);
|
|
6376
6480
|
if (href) {
|
|
6377
|
-
return /* @__PURE__ */ (0,
|
|
6481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6378
6482
|
"a",
|
|
6379
6483
|
{
|
|
6380
6484
|
ref,
|
|
@@ -6389,19 +6493,19 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6389
6493
|
}
|
|
6390
6494
|
);
|
|
6391
6495
|
}
|
|
6392
|
-
return /* @__PURE__ */ (0,
|
|
6496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { ref, role: "img", "aria-label": name, className: base2, ...rest, children: content });
|
|
6393
6497
|
}
|
|
6394
6498
|
);
|
|
6395
6499
|
Logo.displayName = "Logo";
|
|
6396
6500
|
|
|
6397
6501
|
// virtual-pkg:src/atoms/Footer/Footer.tsx
|
|
6398
|
-
var
|
|
6502
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6399
6503
|
var cn41 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6400
6504
|
function Newsletter({ n }) {
|
|
6401
|
-
const id =
|
|
6402
|
-
const [email, setEmail] =
|
|
6403
|
-
const [state, setState] =
|
|
6404
|
-
return /* @__PURE__ */ (0,
|
|
6505
|
+
const id = React52.useId();
|
|
6506
|
+
const [email, setEmail] = React52.useState("");
|
|
6507
|
+
const [state, setState] = React52.useState("idle");
|
|
6508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6405
6509
|
"form",
|
|
6406
6510
|
{
|
|
6407
6511
|
className: "flex w-full flex-col gap-base rounded-lg border border-hairline bg-canvas p-lg shadow-card",
|
|
@@ -6413,12 +6517,12 @@ function Newsletter({ n }) {
|
|
|
6413
6517
|
setState("done");
|
|
6414
6518
|
},
|
|
6415
6519
|
children: [
|
|
6416
|
-
/* @__PURE__ */ (0,
|
|
6417
|
-
/* @__PURE__ */ (0,
|
|
6418
|
-
n.description ? /* @__PURE__ */ (0,
|
|
6520
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
6521
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h3", { id: `${id}-title`, className: "text-heading-sm text-ink", children: n.title }),
|
|
6522
|
+
n.description ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-body-md text-muted", children: n.description }) : null
|
|
6419
6523
|
] }),
|
|
6420
|
-
/* @__PURE__ */ (0,
|
|
6421
|
-
/* @__PURE__ */ (0,
|
|
6524
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-sm sm:flex-row", children: [
|
|
6525
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6422
6526
|
Input,
|
|
6423
6527
|
{
|
|
6424
6528
|
type: "email",
|
|
@@ -6430,16 +6534,16 @@ function Newsletter({ n }) {
|
|
|
6430
6534
|
setEmail(e.target.value);
|
|
6431
6535
|
if (state === "done") setState("idle");
|
|
6432
6536
|
},
|
|
6433
|
-
leading: /* @__PURE__ */ (0,
|
|
6537
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { name: "mail", size: 16 })
|
|
6434
6538
|
}
|
|
6435
6539
|
) }),
|
|
6436
|
-
/* @__PURE__ */ (0,
|
|
6540
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { type: "submit", variant: "primary", loading: state === "loading", children: state === "done" ? "Subscribed" : n.buttonLabel ?? "Subscribe" })
|
|
6437
6541
|
] })
|
|
6438
6542
|
]
|
|
6439
6543
|
}
|
|
6440
6544
|
);
|
|
6441
6545
|
}
|
|
6442
|
-
var Footer =
|
|
6546
|
+
var Footer = React52.forwardRef(
|
|
6443
6547
|
({
|
|
6444
6548
|
variant = "full",
|
|
6445
6549
|
brandName = "Northline",
|
|
@@ -6452,9 +6556,9 @@ var Footer = React51.forwardRef(
|
|
|
6452
6556
|
className,
|
|
6453
6557
|
...rest
|
|
6454
6558
|
}, ref) => {
|
|
6455
|
-
const legal = legalLinks.length ? /* @__PURE__ */ (0,
|
|
6559
|
+
const legal = legalLinks.length ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("nav", { "aria-label": "Legal", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "flex flex-wrap items-center gap-x-lg gap-y-xs", children: legalLinks.map((l) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Link, { href: l.href, variant: "quiet", className: "text-body-sm", children: l.label }) }, l.label)) }) }) : null;
|
|
6456
6560
|
if (variant === "minimal") {
|
|
6457
|
-
return /* @__PURE__ */ (0,
|
|
6561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6458
6562
|
"footer",
|
|
6459
6563
|
{
|
|
6460
6564
|
ref,
|
|
@@ -6464,32 +6568,32 @@ var Footer = React51.forwardRef(
|
|
|
6464
6568
|
),
|
|
6465
6569
|
...rest,
|
|
6466
6570
|
children: [
|
|
6467
|
-
/* @__PURE__ */ (0,
|
|
6571
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Logo, { size: "sm", name: brandName, href: brandHref }),
|
|
6468
6572
|
legal
|
|
6469
6573
|
]
|
|
6470
6574
|
}
|
|
6471
6575
|
);
|
|
6472
6576
|
}
|
|
6473
|
-
return /* @__PURE__ */ (0,
|
|
6577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6474
6578
|
"footer",
|
|
6475
6579
|
{
|
|
6476
6580
|
ref,
|
|
6477
6581
|
className: cn41("w-full border-t border-hairline bg-canvas px-lg py-xl text-ink", className),
|
|
6478
6582
|
...rest,
|
|
6479
6583
|
children: [
|
|
6480
|
-
/* @__PURE__ */ (0,
|
|
6481
|
-
/* @__PURE__ */ (0,
|
|
6482
|
-
/* @__PURE__ */ (0,
|
|
6483
|
-
tagline ? /* @__PURE__ */ (0,
|
|
6584
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex w-full flex-col gap-xl md:flex-row md:justify-between", children: [
|
|
6585
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-base md:w-1/3", children: [
|
|
6586
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Logo, { size: "md", name: brandName, href: brandHref }),
|
|
6587
|
+
tagline ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-body-md text-body", children: tagline }) : null
|
|
6484
6588
|
] }),
|
|
6485
|
-
columns.length ? /* @__PURE__ */ (0,
|
|
6486
|
-
/* @__PURE__ */ (0,
|
|
6487
|
-
/* @__PURE__ */ (0,
|
|
6589
|
+
columns.length ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("nav", { "aria-label": "Footer", className: "grid grid-cols-2 gap-xl sm:grid-cols-3", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-md", children: [
|
|
6590
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h3", { className: "text-body-md font-weight-label text-ink", children: col.title }),
|
|
6591
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "flex flex-col gap-sm", children: col.links.map((l) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Link, { href: l.href, variant: "quiet", className: "text-body-sm", children: l.label }) }, l.label)) })
|
|
6488
6592
|
] }, col.title)) }) : null
|
|
6489
6593
|
] }),
|
|
6490
|
-
newsletter ? /* @__PURE__ */ (0,
|
|
6491
|
-
legal || copyright ? /* @__PURE__ */ (0,
|
|
6492
|
-
copyright ? /* @__PURE__ */ (0,
|
|
6594
|
+
newsletter ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mt-xl w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Newsletter, { n: newsletter }) }) : null,
|
|
6595
|
+
legal || copyright ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "mt-xl flex w-full flex-wrap items-center justify-between gap-base border-t border-hairline-soft pt-base", children: [
|
|
6596
|
+
copyright ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-body-sm text-muted", children: copyright }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", {}),
|
|
6493
6597
|
legal
|
|
6494
6598
|
] }) : null
|
|
6495
6599
|
]
|
|
@@ -6500,18 +6604,18 @@ var Footer = React51.forwardRef(
|
|
|
6500
6604
|
Footer.displayName = "Footer";
|
|
6501
6605
|
|
|
6502
6606
|
// virtual-pkg:src/atoms/Form/Form.tsx
|
|
6503
|
-
var
|
|
6607
|
+
var React57 = __toESM(require("react"));
|
|
6504
6608
|
|
|
6505
6609
|
// virtual-pkg:src/atoms/FormDesktop/FormDesktop.tsx
|
|
6506
|
-
var
|
|
6610
|
+
var React55 = __toESM(require("react"));
|
|
6507
6611
|
|
|
6508
6612
|
// virtual-pkg:src/atoms/FormField/FormField.tsx
|
|
6509
|
-
var
|
|
6613
|
+
var React54 = __toESM(require("react"));
|
|
6510
6614
|
|
|
6511
6615
|
// virtual-pkg:src/atoms/Label/Label.tsx
|
|
6512
|
-
var
|
|
6513
|
-
var
|
|
6514
|
-
var Label =
|
|
6616
|
+
var React53 = __toESM(require("react"));
|
|
6617
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
6618
|
+
var Label = React53.forwardRef(
|
|
6515
6619
|
({
|
|
6516
6620
|
required = false,
|
|
6517
6621
|
optional = false,
|
|
@@ -6523,7 +6627,7 @@ var Label = React52.forwardRef(
|
|
|
6523
6627
|
...rest
|
|
6524
6628
|
}, ref) => {
|
|
6525
6629
|
const optionalText = typeof optional === "string" ? optional : "Optional";
|
|
6526
|
-
return /* @__PURE__ */ (0,
|
|
6630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6527
6631
|
"div",
|
|
6528
6632
|
{
|
|
6529
6633
|
className: [
|
|
@@ -6532,7 +6636,7 @@ var Label = React52.forwardRef(
|
|
|
6532
6636
|
className
|
|
6533
6637
|
].filter(Boolean).join(" "),
|
|
6534
6638
|
children: [
|
|
6535
|
-
/* @__PURE__ */ (0,
|
|
6639
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6536
6640
|
"label",
|
|
6537
6641
|
{
|
|
6538
6642
|
ref,
|
|
@@ -6542,16 +6646,16 @@ var Label = React52.forwardRef(
|
|
|
6542
6646
|
].join(" "),
|
|
6543
6647
|
...rest,
|
|
6544
6648
|
children: [
|
|
6545
|
-
/* @__PURE__ */ (0,
|
|
6649
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { children: [
|
|
6546
6650
|
children,
|
|
6547
|
-
required && /* @__PURE__ */ (0,
|
|
6548
|
-
required && /* @__PURE__ */ (0,
|
|
6651
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ml-xxs text-semantic-error", "aria-hidden": "true", children: "*" }),
|
|
6652
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "sr-only", children: " (required)" })
|
|
6549
6653
|
] }),
|
|
6550
|
-
optional && !required && /* @__PURE__ */ (0,
|
|
6654
|
+
optional && !required && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-body-sm text-muted-soft", children: optionalText })
|
|
6551
6655
|
]
|
|
6552
6656
|
}
|
|
6553
6657
|
),
|
|
6554
|
-
helper && /* @__PURE__ */ (0,
|
|
6658
|
+
helper && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { id: helperId, className: "text-body-sm text-muted", children: helper })
|
|
6555
6659
|
]
|
|
6556
6660
|
}
|
|
6557
6661
|
);
|
|
@@ -6560,9 +6664,9 @@ var Label = React52.forwardRef(
|
|
|
6560
6664
|
Label.displayName = "Label";
|
|
6561
6665
|
|
|
6562
6666
|
// virtual-pkg:src/atoms/FormField/FormField.tsx
|
|
6563
|
-
var
|
|
6667
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6564
6668
|
var cn42 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6565
|
-
var FormField =
|
|
6669
|
+
var FormField = React54.forwardRef(
|
|
6566
6670
|
({
|
|
6567
6671
|
label,
|
|
6568
6672
|
helper,
|
|
@@ -6579,14 +6683,14 @@ var FormField = React53.forwardRef(
|
|
|
6579
6683
|
containerClassName,
|
|
6580
6684
|
...inputProps
|
|
6581
6685
|
}, ref) => {
|
|
6582
|
-
const autoId =
|
|
6686
|
+
const autoId = React54.useId();
|
|
6583
6687
|
const fieldId = id ?? `field-${autoId}`;
|
|
6584
6688
|
const messageId = `${fieldId}-message`;
|
|
6585
6689
|
const descriptionId = `${fieldId}-description`;
|
|
6586
6690
|
const resolved = status ?? (error ? "error" : successMessage ? "success" : "default");
|
|
6587
6691
|
const message = resolved === "error" && error ? error : resolved === "success" && successMessage ? successMessage : helper;
|
|
6588
6692
|
const describedBy = [description ? descriptionId : null, message ? messageId : null].filter(Boolean).join(" ") || void 0;
|
|
6589
|
-
const input = /* @__PURE__ */ (0,
|
|
6693
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6590
6694
|
Input,
|
|
6591
6695
|
{
|
|
6592
6696
|
ref,
|
|
@@ -6598,7 +6702,7 @@ var FormField = React53.forwardRef(
|
|
|
6598
6702
|
...inputProps
|
|
6599
6703
|
}
|
|
6600
6704
|
);
|
|
6601
|
-
const messageLine = /* @__PURE__ */ (0,
|
|
6705
|
+
const messageLine = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
6602
6706
|
"p",
|
|
6603
6707
|
{
|
|
6604
6708
|
id: messageId,
|
|
@@ -6609,12 +6713,12 @@ var FormField = React53.forwardRef(
|
|
|
6609
6713
|
resolved === "error" ? "text-semantic-error" : resolved === "success" ? "text-semantic-success" : "text-muted"
|
|
6610
6714
|
),
|
|
6611
6715
|
children: [
|
|
6612
|
-
resolved === "success" && successMessage ? /* @__PURE__ */ (0,
|
|
6716
|
+
resolved === "success" && successMessage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { name: "check", size: 14 }) : null,
|
|
6613
6717
|
message
|
|
6614
6718
|
]
|
|
6615
6719
|
}
|
|
6616
6720
|
);
|
|
6617
|
-
const labelNode = /* @__PURE__ */ (0,
|
|
6721
|
+
const labelNode = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6618
6722
|
Label,
|
|
6619
6723
|
{
|
|
6620
6724
|
htmlFor: fieldId,
|
|
@@ -6627,7 +6731,7 @@ var FormField = React53.forwardRef(
|
|
|
6627
6731
|
}
|
|
6628
6732
|
);
|
|
6629
6733
|
if (layout === "inline") {
|
|
6630
|
-
return /* @__PURE__ */ (0,
|
|
6734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
6631
6735
|
"div",
|
|
6632
6736
|
{
|
|
6633
6737
|
className: cn42(
|
|
@@ -6635,10 +6739,10 @@ var FormField = React53.forwardRef(
|
|
|
6635
6739
|
containerClassName
|
|
6636
6740
|
),
|
|
6637
6741
|
children: [
|
|
6638
|
-
/* @__PURE__ */ (0,
|
|
6639
|
-
/* @__PURE__ */ (0,
|
|
6640
|
-
/* @__PURE__ */ (0,
|
|
6641
|
-
addon ? /* @__PURE__ */ (0,
|
|
6742
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex min-h-8 items-center", children: labelNode }),
|
|
6743
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
6744
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
|
|
6745
|
+
addon ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "inline-flex shrink-0", children: addon }) : null,
|
|
6642
6746
|
input
|
|
6643
6747
|
] }),
|
|
6644
6748
|
message ? messageLine : null
|
|
@@ -6647,10 +6751,10 @@ var FormField = React53.forwardRef(
|
|
|
6647
6751
|
}
|
|
6648
6752
|
);
|
|
6649
6753
|
}
|
|
6650
|
-
return /* @__PURE__ */ (0,
|
|
6754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn42("flex w-full min-w-0 flex-col gap-sm rounded-none", containerClassName), children: [
|
|
6651
6755
|
labelNode,
|
|
6652
|
-
addon ? /* @__PURE__ */ (0,
|
|
6653
|
-
/* @__PURE__ */ (0,
|
|
6756
|
+
addon ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
|
|
6757
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "inline-flex shrink-0", children: addon }),
|
|
6654
6758
|
input
|
|
6655
6759
|
] }) : input,
|
|
6656
6760
|
messageLine
|
|
@@ -6660,7 +6764,7 @@ var FormField = React53.forwardRef(
|
|
|
6660
6764
|
FormField.displayName = "FormField";
|
|
6661
6765
|
|
|
6662
6766
|
// virtual-pkg:src/atoms/FormDesktop/FormDesktop.tsx
|
|
6663
|
-
var
|
|
6767
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
6664
6768
|
var DEFAULT_TIMEZONES = [
|
|
6665
6769
|
{ value: "utc-8", label: "GMT-8:00 \u2013 Pacific Time" },
|
|
6666
6770
|
{ value: "utc-5", label: "GMT-5:00 \u2013 Eastern Time" },
|
|
@@ -6670,7 +6774,7 @@ var DEFAULT_TIMEZONES = [
|
|
|
6670
6774
|
{ value: "utc+9", label: "GMT+9:00 \u2013 Japan Standard Time" }
|
|
6671
6775
|
];
|
|
6672
6776
|
var cn43 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6673
|
-
var FormDesktop =
|
|
6777
|
+
var FormDesktop = React55.forwardRef(
|
|
6674
6778
|
({
|
|
6675
6779
|
name,
|
|
6676
6780
|
onNameChange,
|
|
@@ -6692,10 +6796,10 @@ var FormDesktop = React54.forwardRef(
|
|
|
6692
6796
|
onSubmit,
|
|
6693
6797
|
...rest
|
|
6694
6798
|
}, ref) => {
|
|
6695
|
-
const autoId =
|
|
6799
|
+
const autoId = React55.useId();
|
|
6696
6800
|
const tzLabelId = `${autoId}-tz-label`;
|
|
6697
6801
|
const tzMessageId = `${autoId}-tz-message`;
|
|
6698
|
-
return /* @__PURE__ */ (0,
|
|
6802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6699
6803
|
"form",
|
|
6700
6804
|
{
|
|
6701
6805
|
ref,
|
|
@@ -6709,8 +6813,8 @@ var FormDesktop = React54.forwardRef(
|
|
|
6709
6813
|
className
|
|
6710
6814
|
),
|
|
6711
6815
|
...rest,
|
|
6712
|
-
children: /* @__PURE__ */ (0,
|
|
6713
|
-
/* @__PURE__ */ (0,
|
|
6816
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col divide-y divide-hairline-soft", children: [
|
|
6817
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6714
6818
|
FormField,
|
|
6715
6819
|
{
|
|
6716
6820
|
layout: "inline",
|
|
@@ -6720,17 +6824,17 @@ var FormDesktop = React54.forwardRef(
|
|
|
6720
6824
|
onChange: (e) => onNameChange?.(e.target.value),
|
|
6721
6825
|
error: errors.name,
|
|
6722
6826
|
disabled,
|
|
6723
|
-
addon: /* @__PURE__ */ (0,
|
|
6827
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6724
6828
|
"span",
|
|
6725
6829
|
{
|
|
6726
6830
|
"aria-hidden": "true",
|
|
6727
6831
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-semantic-info-soft text-semantic-info",
|
|
6728
|
-
children: /* @__PURE__ */ (0,
|
|
6832
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { name: icon, size: 18 })
|
|
6729
6833
|
}
|
|
6730
6834
|
)
|
|
6731
6835
|
}
|
|
6732
6836
|
) }),
|
|
6733
|
-
/* @__PURE__ */ (0,
|
|
6837
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6734
6838
|
FormField,
|
|
6735
6839
|
{
|
|
6736
6840
|
layout: "inline",
|
|
@@ -6743,10 +6847,10 @@ var FormDesktop = React54.forwardRef(
|
|
|
6743
6847
|
disabled
|
|
6744
6848
|
}
|
|
6745
6849
|
) }),
|
|
6746
|
-
/* @__PURE__ */ (0,
|
|
6747
|
-
/* @__PURE__ */ (0,
|
|
6748
|
-
/* @__PURE__ */ (0,
|
|
6749
|
-
/* @__PURE__ */ (0,
|
|
6850
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "grid w-full min-w-0 grid-cols-1 items-start gap-sm sm:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] sm:gap-lg", children: [
|
|
6851
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex min-h-8 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Label, { id: tzLabelId, disabled, children: timezoneLabel }) }),
|
|
6852
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
6853
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6750
6854
|
Dropdown,
|
|
6751
6855
|
{
|
|
6752
6856
|
options: timezoneOptions,
|
|
@@ -6758,7 +6862,7 @@ var FormDesktop = React54.forwardRef(
|
|
|
6758
6862
|
disabled
|
|
6759
6863
|
}
|
|
6760
6864
|
),
|
|
6761
|
-
errors.timezone ? /* @__PURE__ */ (0,
|
|
6865
|
+
errors.timezone ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { id: tzMessageId, "aria-live": "polite", className: "text-body-sm text-semantic-error", children: errors.timezone }) : null
|
|
6762
6866
|
] })
|
|
6763
6867
|
] }) })
|
|
6764
6868
|
] })
|
|
@@ -6769,8 +6873,8 @@ var FormDesktop = React54.forwardRef(
|
|
|
6769
6873
|
FormDesktop.displayName = "FormDesktop";
|
|
6770
6874
|
|
|
6771
6875
|
// virtual-pkg:src/atoms/FormMobile/FormMobile.tsx
|
|
6772
|
-
var
|
|
6773
|
-
var
|
|
6876
|
+
var React56 = __toESM(require("react"));
|
|
6877
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
6774
6878
|
var TIMEZONES = [
|
|
6775
6879
|
{ value: "utc-8", label: "GMT-8:00 \u2013 Pacific Time" },
|
|
6776
6880
|
{ value: "utc-5", label: "GMT-5:00 \u2013 Eastern Time" },
|
|
@@ -6780,7 +6884,7 @@ var TIMEZONES = [
|
|
|
6780
6884
|
{ value: "utc+9", label: "GMT+9:00 \u2013 Japan Standard Time" }
|
|
6781
6885
|
];
|
|
6782
6886
|
var cn44 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6783
|
-
var FormMobile =
|
|
6887
|
+
var FormMobile = React56.forwardRef(
|
|
6784
6888
|
({
|
|
6785
6889
|
name,
|
|
6786
6890
|
onNameChange,
|
|
@@ -6802,9 +6906,9 @@ var FormMobile = React55.forwardRef(
|
|
|
6802
6906
|
onSubmit,
|
|
6803
6907
|
...rest
|
|
6804
6908
|
}, ref) => {
|
|
6805
|
-
const autoId =
|
|
6909
|
+
const autoId = React56.useId();
|
|
6806
6910
|
const tzLabelId = `${autoId}-tz-label`;
|
|
6807
|
-
return /* @__PURE__ */ (0,
|
|
6911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6808
6912
|
"form",
|
|
6809
6913
|
{
|
|
6810
6914
|
ref,
|
|
@@ -6819,7 +6923,7 @@ var FormMobile = React55.forwardRef(
|
|
|
6819
6923
|
),
|
|
6820
6924
|
...rest,
|
|
6821
6925
|
children: [
|
|
6822
|
-
/* @__PURE__ */ (0,
|
|
6926
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6823
6927
|
FormField,
|
|
6824
6928
|
{
|
|
6825
6929
|
label: nameLabel,
|
|
@@ -6828,17 +6932,17 @@ var FormMobile = React55.forwardRef(
|
|
|
6828
6932
|
onChange: (e) => onNameChange?.(e.target.value),
|
|
6829
6933
|
error: errors.name,
|
|
6830
6934
|
disabled,
|
|
6831
|
-
addon: /* @__PURE__ */ (0,
|
|
6935
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6832
6936
|
"span",
|
|
6833
6937
|
{
|
|
6834
6938
|
"aria-hidden": "true",
|
|
6835
6939
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-semantic-info-soft text-semantic-info",
|
|
6836
|
-
children: /* @__PURE__ */ (0,
|
|
6940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: icon, size: 18 })
|
|
6837
6941
|
}
|
|
6838
6942
|
)
|
|
6839
6943
|
}
|
|
6840
6944
|
),
|
|
6841
|
-
/* @__PURE__ */ (0,
|
|
6945
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6842
6946
|
FormField,
|
|
6843
6947
|
{
|
|
6844
6948
|
label: identifierLabel,
|
|
@@ -6850,9 +6954,9 @@ var FormMobile = React55.forwardRef(
|
|
|
6850
6954
|
disabled
|
|
6851
6955
|
}
|
|
6852
6956
|
),
|
|
6853
|
-
/* @__PURE__ */ (0,
|
|
6854
|
-
/* @__PURE__ */ (0,
|
|
6855
|
-
/* @__PURE__ */ (0,
|
|
6957
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex w-full min-w-0 flex-col gap-sm", children: [
|
|
6958
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Label, { id: tzLabelId, disabled, children: timezoneLabel }),
|
|
6959
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6856
6960
|
Dropdown,
|
|
6857
6961
|
{
|
|
6858
6962
|
options: timezoneOptions,
|
|
@@ -6864,7 +6968,7 @@ var FormMobile = React55.forwardRef(
|
|
|
6864
6968
|
disabled
|
|
6865
6969
|
}
|
|
6866
6970
|
),
|
|
6867
|
-
errors.timezone ? /* @__PURE__ */ (0,
|
|
6971
|
+
errors.timezone ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { "aria-live": "polite", className: "text-body-sm text-semantic-error", children: errors.timezone }) : null
|
|
6868
6972
|
] })
|
|
6869
6973
|
]
|
|
6870
6974
|
}
|
|
@@ -6874,23 +6978,23 @@ var FormMobile = React55.forwardRef(
|
|
|
6874
6978
|
FormMobile.displayName = "FormMobile";
|
|
6875
6979
|
|
|
6876
6980
|
// virtual-pkg:src/atoms/Form/Form.tsx
|
|
6877
|
-
var
|
|
6878
|
-
var Form =
|
|
6879
|
-
({ wrapperClassName, ...props }, ref) => /* @__PURE__ */ (0,
|
|
6880
|
-
/* @__PURE__ */ (0,
|
|
6881
|
-
/* @__PURE__ */ (0,
|
|
6981
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
6982
|
+
var Form = React57.forwardRef(
|
|
6983
|
+
({ wrapperClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { ref, className: ["w-full min-w-0", wrapperClassName].filter(Boolean).join(" "), children: [
|
|
6984
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "hidden w-full md:block", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FormDesktop, { ...props }) }),
|
|
6985
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "w-full md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FormMobile, { ...props }) })
|
|
6882
6986
|
] })
|
|
6883
6987
|
);
|
|
6884
6988
|
Form.displayName = "Form";
|
|
6885
6989
|
|
|
6886
6990
|
// virtual-pkg:src/atoms/HeroSection/HeroSection.tsx
|
|
6887
|
-
var
|
|
6991
|
+
var React60 = __toESM(require("react"));
|
|
6888
6992
|
|
|
6889
6993
|
// virtual-pkg:src/atoms/HeroSectionDesktop/HeroSectionDesktop.tsx
|
|
6890
|
-
var
|
|
6891
|
-
var
|
|
6994
|
+
var React58 = __toESM(require("react"));
|
|
6995
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
6892
6996
|
var cn45 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6893
|
-
var HeroSectionDesktop =
|
|
6997
|
+
var HeroSectionDesktop = React58.forwardRef(
|
|
6894
6998
|
({
|
|
6895
6999
|
title,
|
|
6896
7000
|
description,
|
|
@@ -6902,7 +7006,7 @@ var HeroSectionDesktop = React57.forwardRef(
|
|
|
6902
7006
|
inset = true,
|
|
6903
7007
|
className,
|
|
6904
7008
|
...rest
|
|
6905
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7009
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
6906
7010
|
"section",
|
|
6907
7011
|
{
|
|
6908
7012
|
ref,
|
|
@@ -6913,7 +7017,7 @@ var HeroSectionDesktop = React57.forwardRef(
|
|
|
6913
7017
|
className
|
|
6914
7018
|
),
|
|
6915
7019
|
...rest,
|
|
6916
|
-
children: /* @__PURE__ */ (0,
|
|
7020
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
6917
7021
|
"div",
|
|
6918
7022
|
{
|
|
6919
7023
|
className: cn45(
|
|
@@ -6921,19 +7025,19 @@ var HeroSectionDesktop = React57.forwardRef(
|
|
|
6921
7025
|
media ? "grid-cols-2" : "grid-cols-1"
|
|
6922
7026
|
),
|
|
6923
7027
|
children: [
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
6925
|
-
/* @__PURE__ */ (0,
|
|
6926
|
-
description ? /* @__PURE__ */ (0,
|
|
6927
|
-
primaryAction || secondaryAction ? /* @__PURE__ */ (0,
|
|
6928
|
-
primaryAction ? /* @__PURE__ */ (0,
|
|
6929
|
-
secondaryAction ? /* @__PURE__ */ (0,
|
|
7028
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex min-w-0 flex-col items-start", children: [
|
|
7029
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h1", { className: "text-heading-lg text-ink lg:text-display-lg", children: title }),
|
|
7030
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "mt-base text-body-lg text-body", children: description }) : null,
|
|
7031
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mt-lg flex flex-wrap items-center gap-md", children: [
|
|
7032
|
+
primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { variant: "primary", size: "lg", onClick: primaryAction.onClick, children: primaryAction.label }) : null,
|
|
7033
|
+
secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { variant: "secondary", size: "lg", onClick: secondaryAction.onClick, children: secondaryAction.label }) : null
|
|
6930
7034
|
] }) : null,
|
|
6931
|
-
proof ? /* @__PURE__ */ (0,
|
|
6932
|
-
/* @__PURE__ */ (0,
|
|
6933
|
-
/* @__PURE__ */ (0,
|
|
7035
|
+
proof ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mt-lg flex items-center gap-md", children: [
|
|
7036
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "inline-flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AvatarGroup, { items: proof.avatars, size: "md", layout: "stacked", max: 4 }) }),
|
|
7037
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-body-md text-body [&_strong]:font-weight-label [&_strong]:text-ink", children: proof.text })
|
|
6934
7038
|
] }) : null
|
|
6935
7039
|
] }),
|
|
6936
|
-
media ? /* @__PURE__ */ (0,
|
|
7040
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex min-w-0 items-center justify-center", children: media }) : null
|
|
6937
7041
|
]
|
|
6938
7042
|
}
|
|
6939
7043
|
)
|
|
@@ -6943,10 +7047,10 @@ var HeroSectionDesktop = React57.forwardRef(
|
|
|
6943
7047
|
HeroSectionDesktop.displayName = "HeroSectionDesktop";
|
|
6944
7048
|
|
|
6945
7049
|
// virtual-pkg:src/atoms/HeroSectionMobile/HeroSectionMobile.tsx
|
|
6946
|
-
var
|
|
6947
|
-
var
|
|
7050
|
+
var React59 = __toESM(require("react"));
|
|
7051
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
6948
7052
|
var cn46 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6949
|
-
var HeroSectionMobile =
|
|
7053
|
+
var HeroSectionMobile = React59.forwardRef(
|
|
6950
7054
|
({
|
|
6951
7055
|
title,
|
|
6952
7056
|
description,
|
|
@@ -6958,7 +7062,7 @@ var HeroSectionMobile = React58.forwardRef(
|
|
|
6958
7062
|
inset = true,
|
|
6959
7063
|
className,
|
|
6960
7064
|
...rest
|
|
6961
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7065
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
6962
7066
|
"section",
|
|
6963
7067
|
{
|
|
6964
7068
|
ref,
|
|
@@ -6970,16 +7074,16 @@ var HeroSectionMobile = React58.forwardRef(
|
|
|
6970
7074
|
),
|
|
6971
7075
|
...rest,
|
|
6972
7076
|
children: [
|
|
6973
|
-
/* @__PURE__ */ (0,
|
|
6974
|
-
description ? /* @__PURE__ */ (0,
|
|
6975
|
-
primaryAction || secondaryAction ? /* @__PURE__ */ (0,
|
|
6976
|
-
primaryAction ? /* @__PURE__ */ (0,
|
|
6977
|
-
secondaryAction ? /* @__PURE__ */ (0,
|
|
7077
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h1", { className: "text-heading-md text-ink", children: title }),
|
|
7078
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "mt-sm text-body-lg text-muted", children: description }) : null,
|
|
7079
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mt-lg flex flex-col gap-sm", children: [
|
|
7080
|
+
primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "primary", size: "lg", fullWidth: true, onClick: primaryAction.onClick, children: primaryAction.label }) : null,
|
|
7081
|
+
secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "secondary", size: "lg", fullWidth: true, onClick: secondaryAction.onClick, children: secondaryAction.label }) : null
|
|
6978
7082
|
] }) : null,
|
|
6979
|
-
media ? /* @__PURE__ */ (0,
|
|
6980
|
-
proof ? /* @__PURE__ */ (0,
|
|
6981
|
-
/* @__PURE__ */ (0,
|
|
6982
|
-
/* @__PURE__ */ (0,
|
|
7083
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mt-base w-full", children: media }) : null,
|
|
7084
|
+
proof ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mt-base flex items-center gap-md", children: [
|
|
7085
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "inline-flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(AvatarGroup, { items: proof.avatars, size: "md", layout: "stacked", max: 4 }) }),
|
|
7086
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-body-sm text-body [&_strong]:font-weight-label [&_strong]:text-ink", children: proof.text })
|
|
6983
7087
|
] }) : null
|
|
6984
7088
|
]
|
|
6985
7089
|
}
|
|
@@ -6988,20 +7092,20 @@ var HeroSectionMobile = React58.forwardRef(
|
|
|
6988
7092
|
HeroSectionMobile.displayName = "HeroSectionMobile";
|
|
6989
7093
|
|
|
6990
7094
|
// virtual-pkg:src/atoms/HeroSection/HeroSection.tsx
|
|
6991
|
-
var
|
|
6992
|
-
var HeroSection =
|
|
6993
|
-
({ className, surface = "canvas", inset = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
6994
|
-
/* @__PURE__ */ (0,
|
|
6995
|
-
/* @__PURE__ */ (0,
|
|
7095
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7096
|
+
var HeroSection = React60.forwardRef(
|
|
7097
|
+
({ className, surface = "canvas", inset = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
7098
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeroSectionDesktop, { surface, inset, ...props }) }),
|
|
7099
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HeroSectionMobile, { surface, inset, ...props }) })
|
|
6996
7100
|
] })
|
|
6997
7101
|
);
|
|
6998
7102
|
HeroSection.displayName = "HeroSection";
|
|
6999
7103
|
|
|
7000
7104
|
// virtual-pkg:src/atoms/IssueCard/IssueCard.tsx
|
|
7001
|
-
var
|
|
7002
|
-
var
|
|
7105
|
+
var React61 = __toESM(require("react"));
|
|
7106
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7003
7107
|
var MAX_LABELS = 3;
|
|
7004
|
-
var IssueCard =
|
|
7108
|
+
var IssueCard = React61.forwardRef(
|
|
7005
7109
|
({
|
|
7006
7110
|
id,
|
|
7007
7111
|
title,
|
|
@@ -7043,7 +7147,7 @@ var IssueCard = React60.forwardRef(
|
|
|
7043
7147
|
onClick(event);
|
|
7044
7148
|
}
|
|
7045
7149
|
};
|
|
7046
|
-
return /* @__PURE__ */ (0,
|
|
7150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7047
7151
|
"div",
|
|
7048
7152
|
{
|
|
7049
7153
|
ref,
|
|
@@ -7052,32 +7156,32 @@ var IssueCard = React60.forwardRef(
|
|
|
7052
7156
|
className: rootClass,
|
|
7053
7157
|
...rest,
|
|
7054
7158
|
children: [
|
|
7055
|
-
/* @__PURE__ */ (0,
|
|
7056
|
-
/* @__PURE__ */ (0,
|
|
7057
|
-
priority ? /* @__PURE__ */ (0,
|
|
7058
|
-
/* @__PURE__ */ (0,
|
|
7159
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-start justify-between gap-sm", children: [
|
|
7160
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex min-w-0 items-center gap-xs", children: [
|
|
7161
|
+
priority ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "flex shrink-0 items-center", children: priority }) : null,
|
|
7162
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "truncate text-caption tabular-nums text-muted", children: id })
|
|
7059
7163
|
] }),
|
|
7060
|
-
actions ? /* @__PURE__ */ (0,
|
|
7164
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "relative z-10 shrink-0 opacity-0 transition-opacity duration-200 ease-out group-hover/issue:opacity-100 group-focus-within/issue:opacity-100 [@media(hover:none)]:opacity-100", children: actions }) : null
|
|
7061
7165
|
] }),
|
|
7062
|
-
/* @__PURE__ */ (0,
|
|
7063
|
-
status ? /* @__PURE__ */ (0,
|
|
7064
|
-
/* @__PURE__ */ (0,
|
|
7166
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-start gap-xs", children: [
|
|
7167
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "mt-xxs flex shrink-0 items-center", children: status }) : null,
|
|
7168
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "line-clamp-2 min-w-0 text-body-md text-ink", children: title })
|
|
7065
7169
|
] }),
|
|
7066
|
-
visibleLabels.length > 0 ? /* @__PURE__ */ (0,
|
|
7067
|
-
visibleLabels.map((label) => /* @__PURE__ */ (0,
|
|
7068
|
-
hiddenLabelCount > 0 ? /* @__PURE__ */ (0,
|
|
7069
|
-
/* @__PURE__ */ (0,
|
|
7170
|
+
visibleLabels.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "mt-xxs flex flex-wrap items-center gap-xs", children: [
|
|
7171
|
+
visibleLabels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Badge, { tone: label.tone, size: "sm", children: label.name }, label.name)),
|
|
7172
|
+
hiddenLabelCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Badge, { tone: "neutral", size: "sm", children: [
|
|
7173
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { className: "tabular-nums", children: [
|
|
7070
7174
|
"+",
|
|
7071
7175
|
hiddenLabelCount
|
|
7072
7176
|
] }),
|
|
7073
|
-
/* @__PURE__ */ (0,
|
|
7177
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "sr-only", children: " more labels" })
|
|
7074
7178
|
] }) : null
|
|
7075
7179
|
] }) : null,
|
|
7076
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
7077
|
-
/* @__PURE__ */ (0,
|
|
7078
|
-
assignee ? /* @__PURE__ */ (0,
|
|
7180
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "mt-xxs flex items-center justify-between gap-sm", children: [
|
|
7181
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "truncate text-caption text-muted-soft", children: meta }),
|
|
7182
|
+
assignee ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Avatar, { size: "xs", name: assignee.name, src: assignee.src, className: "shrink-0" }) : null
|
|
7079
7183
|
] }) : null,
|
|
7080
|
-
href ? /* @__PURE__ */ (0,
|
|
7184
|
+
href ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7081
7185
|
"a",
|
|
7082
7186
|
{
|
|
7083
7187
|
href,
|
|
@@ -7086,7 +7190,7 @@ var IssueCard = React60.forwardRef(
|
|
|
7086
7190
|
"aria-current": selected ? "true" : void 0,
|
|
7087
7191
|
className: triggerClass
|
|
7088
7192
|
}
|
|
7089
|
-
) : onClick ? /* @__PURE__ */ (0,
|
|
7193
|
+
) : onClick ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7090
7194
|
"a",
|
|
7091
7195
|
{
|
|
7092
7196
|
role: "button",
|
|
@@ -7106,10 +7210,10 @@ var IssueCard = React60.forwardRef(
|
|
|
7106
7210
|
IssueCard.displayName = "IssueCard";
|
|
7107
7211
|
|
|
7108
7212
|
// virtual-pkg:src/atoms/ListItem/ListItem.tsx
|
|
7109
|
-
var
|
|
7110
|
-
var
|
|
7213
|
+
var React62 = __toESM(require("react"));
|
|
7214
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
7111
7215
|
var cn47 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7112
|
-
var ListItem =
|
|
7216
|
+
var ListItem = React62.forwardRef(
|
|
7113
7217
|
({
|
|
7114
7218
|
title,
|
|
7115
7219
|
meta,
|
|
@@ -7123,7 +7227,7 @@ var ListItem = React61.forwardRef(
|
|
|
7123
7227
|
onClick,
|
|
7124
7228
|
className,
|
|
7125
7229
|
...rest
|
|
7126
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7230
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
7127
7231
|
"a",
|
|
7128
7232
|
{
|
|
7129
7233
|
ref,
|
|
@@ -7151,12 +7255,12 @@ var ListItem = React61.forwardRef(
|
|
|
7151
7255
|
),
|
|
7152
7256
|
...rest,
|
|
7153
7257
|
children: [
|
|
7154
|
-
leading ?? (icon && /* @__PURE__ */ (0,
|
|
7155
|
-
/* @__PURE__ */ (0,
|
|
7156
|
-
/* @__PURE__ */ (0,
|
|
7157
|
-
meta && /* @__PURE__ */ (0,
|
|
7258
|
+
leading ?? (icon && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: icon, size: 18, className: "shrink-0 text-ink group-data-[disabled]:text-muted" })),
|
|
7259
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
7260
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-body-md text-ink group-data-[disabled]:text-muted", children: title }),
|
|
7261
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-body-sm text-muted", children: meta })
|
|
7158
7262
|
] }),
|
|
7159
|
-
trailing === void 0 ? /* @__PURE__ */ (0,
|
|
7263
|
+
trailing === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
7160
7264
|
Icon,
|
|
7161
7265
|
{
|
|
7162
7266
|
name: "chevron-right",
|
|
@@ -7171,14 +7275,14 @@ var ListItem = React61.forwardRef(
|
|
|
7171
7275
|
ListItem.displayName = "ListItem";
|
|
7172
7276
|
|
|
7173
7277
|
// virtual-pkg:src/atoms/Navbar/Navbar.tsx
|
|
7174
|
-
var
|
|
7278
|
+
var React65 = __toESM(require("react"));
|
|
7175
7279
|
|
|
7176
7280
|
// virtual-pkg:src/atoms/NavbarDesktop/NavbarDesktop.tsx
|
|
7177
|
-
var
|
|
7281
|
+
var React63 = __toESM(require("react"));
|
|
7178
7282
|
var import_react_dom7 = require("react-dom");
|
|
7179
|
-
var
|
|
7283
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
7180
7284
|
var cn48 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7181
|
-
var NavbarDesktop =
|
|
7285
|
+
var NavbarDesktop = React63.forwardRef(
|
|
7182
7286
|
({
|
|
7183
7287
|
brandName = "Linear",
|
|
7184
7288
|
brandHref = "#",
|
|
@@ -7194,26 +7298,26 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7194
7298
|
className,
|
|
7195
7299
|
...rest
|
|
7196
7300
|
}, ref) => {
|
|
7197
|
-
const menuId =
|
|
7198
|
-
const triggerRef =
|
|
7199
|
-
const panelRef =
|
|
7200
|
-
const [innerOpen, setInnerOpen] =
|
|
7201
|
-
const [mounted, setMounted] =
|
|
7202
|
-
const [rect, setRect] =
|
|
7301
|
+
const menuId = React63.useId();
|
|
7302
|
+
const triggerRef = React63.useRef(null);
|
|
7303
|
+
const panelRef = React63.useRef(null);
|
|
7304
|
+
const [innerOpen, setInnerOpen] = React63.useState(false);
|
|
7305
|
+
const [mounted, setMounted] = React63.useState(false);
|
|
7306
|
+
const [rect, setRect] = React63.useState(null);
|
|
7203
7307
|
const open = menuOpen ?? innerOpen;
|
|
7204
|
-
|
|
7205
|
-
const setOpen =
|
|
7308
|
+
React63.useEffect(() => setMounted(true), []);
|
|
7309
|
+
const setOpen = React63.useCallback(
|
|
7206
7310
|
(next) => {
|
|
7207
7311
|
if (menuOpen === void 0) setInnerOpen(next);
|
|
7208
7312
|
onMenuOpenChange?.(next);
|
|
7209
7313
|
},
|
|
7210
7314
|
[menuOpen, onMenuOpenChange]
|
|
7211
7315
|
);
|
|
7212
|
-
const place2 =
|
|
7316
|
+
const place2 = React63.useCallback(() => {
|
|
7213
7317
|
const box = triggerRef.current?.getBoundingClientRect();
|
|
7214
7318
|
if (box) setRect({ top: box.bottom + 6, right: window.innerWidth - box.right });
|
|
7215
7319
|
}, []);
|
|
7216
|
-
|
|
7320
|
+
React63.useLayoutEffect(() => {
|
|
7217
7321
|
if (!open) return;
|
|
7218
7322
|
place2();
|
|
7219
7323
|
window.addEventListener("resize", place2);
|
|
@@ -7223,7 +7327,7 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7223
7327
|
window.removeEventListener("scroll", place2, true);
|
|
7224
7328
|
};
|
|
7225
7329
|
}, [open, place2]);
|
|
7226
|
-
|
|
7330
|
+
React63.useEffect(() => {
|
|
7227
7331
|
if (!open) return;
|
|
7228
7332
|
const onDown = (e) => {
|
|
7229
7333
|
const t = e.target;
|
|
@@ -7253,7 +7357,7 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7253
7357
|
const next = e.key === "ArrowDown" ? (idx + 1) % rows.length : (idx - 1 + rows.length) % rows.length;
|
|
7254
7358
|
rows[next]?.focus();
|
|
7255
7359
|
};
|
|
7256
|
-
const panel = /* @__PURE__ */ (0,
|
|
7360
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7257
7361
|
"div",
|
|
7258
7362
|
{
|
|
7259
7363
|
ref: panelRef,
|
|
@@ -7270,9 +7374,9 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7270
7374
|
zIndex: "var(--z-popover, 1300)"
|
|
7271
7375
|
},
|
|
7272
7376
|
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",
|
|
7273
|
-
children: menuItems.map((m) => /* @__PURE__ */ (0,
|
|
7274
|
-
m.separated && /* @__PURE__ */ (0,
|
|
7275
|
-
/* @__PURE__ */ (0,
|
|
7377
|
+
children: menuItems.map((m) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(React63.Fragment, { children: [
|
|
7378
|
+
m.separated && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Divider, { className: "my-xs" }),
|
|
7379
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7276
7380
|
MenuItem,
|
|
7277
7381
|
{
|
|
7278
7382
|
icon: m.icon,
|
|
@@ -7289,7 +7393,7 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7289
7393
|
] }, m.label))
|
|
7290
7394
|
}
|
|
7291
7395
|
);
|
|
7292
|
-
return /* @__PURE__ */ (0,
|
|
7396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
7293
7397
|
"header",
|
|
7294
7398
|
{
|
|
7295
7399
|
ref,
|
|
@@ -7299,11 +7403,11 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7299
7403
|
),
|
|
7300
7404
|
...rest,
|
|
7301
7405
|
children: [
|
|
7302
|
-
/* @__PURE__ */ (0,
|
|
7303
|
-
/* @__PURE__ */ (0,
|
|
7304
|
-
/* @__PURE__ */ (0,
|
|
7406
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
7407
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Divider, { orientation: "vertical" }) }),
|
|
7408
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-x-auto", children: items.map((item) => {
|
|
7305
7409
|
const current = item.href === activeHref;
|
|
7306
|
-
return /* @__PURE__ */ (0,
|
|
7410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
7307
7411
|
"a",
|
|
7308
7412
|
{
|
|
7309
7413
|
href: item.href,
|
|
@@ -7314,16 +7418,16 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7314
7418
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
7315
7419
|
),
|
|
7316
7420
|
children: [
|
|
7317
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7421
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { name: item.icon, size: 16 }),
|
|
7318
7422
|
item.label
|
|
7319
7423
|
]
|
|
7320
7424
|
},
|
|
7321
7425
|
item.href
|
|
7322
7426
|
);
|
|
7323
7427
|
}) }),
|
|
7324
|
-
/* @__PURE__ */ (0,
|
|
7325
|
-
onSearch && /* @__PURE__ */ (0,
|
|
7326
|
-
/* @__PURE__ */ (0,
|
|
7428
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
7429
|
+
onSearch && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IconButton, { icon: "search", variant: "ghost", "aria-label": "Search", onClick: onSearch }),
|
|
7430
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7327
7431
|
Button,
|
|
7328
7432
|
{
|
|
7329
7433
|
ref: triggerRef,
|
|
@@ -7337,8 +7441,8 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7337
7441
|
if (!open) place2();
|
|
7338
7442
|
setOpen(!open);
|
|
7339
7443
|
},
|
|
7340
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
7341
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
7444
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }),
|
|
7445
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7342
7446
|
Icon,
|
|
7343
7447
|
{
|
|
7344
7448
|
name: "chevron-down",
|
|
@@ -7358,11 +7462,11 @@ var NavbarDesktop = React62.forwardRef(
|
|
|
7358
7462
|
NavbarDesktop.displayName = "NavbarDesktop";
|
|
7359
7463
|
|
|
7360
7464
|
// virtual-pkg:src/atoms/NavbarMobile/NavbarMobile.tsx
|
|
7361
|
-
var
|
|
7362
|
-
var
|
|
7465
|
+
var React64 = __toESM(require("react"));
|
|
7466
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7363
7467
|
var cn49 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7364
7468
|
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";
|
|
7365
|
-
var NavbarMobile =
|
|
7469
|
+
var NavbarMobile = React64.forwardRef(
|
|
7366
7470
|
({
|
|
7367
7471
|
brandName = "Linear",
|
|
7368
7472
|
brandHref = "#",
|
|
@@ -7378,14 +7482,14 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7378
7482
|
className,
|
|
7379
7483
|
...rest
|
|
7380
7484
|
}, ref) => {
|
|
7381
|
-
const panelId =
|
|
7382
|
-
const [innerOpen, setInnerOpen] =
|
|
7485
|
+
const panelId = React64.useId();
|
|
7486
|
+
const [innerOpen, setInnerOpen] = React64.useState(defaultOpen);
|
|
7383
7487
|
const open = openProp ?? innerOpen;
|
|
7384
7488
|
const setOpen = (next) => {
|
|
7385
7489
|
if (openProp === void 0) setInnerOpen(next);
|
|
7386
7490
|
onOpenChange?.(next);
|
|
7387
7491
|
};
|
|
7388
|
-
|
|
7492
|
+
React64.useEffect(() => {
|
|
7389
7493
|
if (!open) return;
|
|
7390
7494
|
const onKey = (e) => {
|
|
7391
7495
|
if (e.key === "Escape") {
|
|
@@ -7397,7 +7501,7 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7397
7501
|
return () => document.removeEventListener("keydown", onKey);
|
|
7398
7502
|
}, [open, openProp, onOpenChange]);
|
|
7399
7503
|
const state = open ? "open" : "closed";
|
|
7400
|
-
return /* @__PURE__ */ (0,
|
|
7504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
7401
7505
|
"header",
|
|
7402
7506
|
{
|
|
7403
7507
|
ref,
|
|
@@ -7405,9 +7509,9 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7405
7509
|
className: cn49("w-full border-b border-hairline bg-canvas text-ink", className),
|
|
7406
7510
|
...rest,
|
|
7407
7511
|
children: [
|
|
7408
|
-
/* @__PURE__ */ (0,
|
|
7409
|
-
/* @__PURE__ */ (0,
|
|
7410
|
-
/* @__PURE__ */ (0,
|
|
7512
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex h-14 items-center justify-between gap-sm px-base", children: [
|
|
7513
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
7514
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7411
7515
|
IconButton,
|
|
7412
7516
|
{
|
|
7413
7517
|
icon: open ? "x" : "menu",
|
|
@@ -7419,22 +7523,22 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7419
7523
|
}
|
|
7420
7524
|
)
|
|
7421
7525
|
] }),
|
|
7422
|
-
/* @__PURE__ */ (0,
|
|
7526
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7423
7527
|
"div",
|
|
7424
7528
|
{
|
|
7425
7529
|
id: panelId,
|
|
7426
7530
|
"data-state": state,
|
|
7427
7531
|
"aria-hidden": open ? void 0 : true,
|
|
7428
7532
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
7429
|
-
children: /* @__PURE__ */ (0,
|
|
7533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
7430
7534
|
"div",
|
|
7431
7535
|
{
|
|
7432
7536
|
"data-state": state,
|
|
7433
7537
|
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",
|
|
7434
7538
|
children: [
|
|
7435
|
-
/* @__PURE__ */ (0,
|
|
7539
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("nav", { "aria-label": "Primary", className: "flex flex-col gap-xxs", children: items.map((item) => {
|
|
7436
7540
|
const current = item.href === activeHref;
|
|
7437
|
-
return /* @__PURE__ */ (0,
|
|
7541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
7438
7542
|
"a",
|
|
7439
7543
|
{
|
|
7440
7544
|
href: item.href,
|
|
@@ -7449,31 +7553,31 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7449
7553
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
7450
7554
|
),
|
|
7451
7555
|
children: [
|
|
7452
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7556
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }),
|
|
7453
7557
|
item.label
|
|
7454
7558
|
]
|
|
7455
7559
|
},
|
|
7456
7560
|
item.href
|
|
7457
7561
|
);
|
|
7458
7562
|
}) }),
|
|
7459
|
-
(userName || accountActions.length > 0) && /* @__PURE__ */ (0,
|
|
7460
|
-
/* @__PURE__ */ (0,
|
|
7461
|
-
userName && /* @__PURE__ */ (0,
|
|
7462
|
-
/* @__PURE__ */ (0,
|
|
7463
|
-
/* @__PURE__ */ (0,
|
|
7563
|
+
(userName || accountActions.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
7564
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Divider, { className: "my-sm" }),
|
|
7565
|
+
userName && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center gap-sm px-base py-sm", children: [
|
|
7566
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "xs" }),
|
|
7567
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "truncate text-body-md text-ink", children: userName })
|
|
7464
7568
|
] }),
|
|
7465
|
-
/* @__PURE__ */ (0,
|
|
7569
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { "aria-label": "Account", role: "group", className: "flex flex-col gap-xxs", children: accountActions.map((a) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7466
7570
|
Button,
|
|
7467
7571
|
{
|
|
7468
7572
|
variant: "item",
|
|
7469
7573
|
size: "lg",
|
|
7470
7574
|
tabIndex: open ? 0 : -1,
|
|
7471
|
-
leadingIcon: a.icon ? /* @__PURE__ */ (0,
|
|
7575
|
+
leadingIcon: a.icon ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: a.icon, size: 16, className: a.tone === "destructive" ? "text-semantic-error" : "text-body" }) : void 0,
|
|
7472
7576
|
onClick: () => {
|
|
7473
7577
|
a.onSelect?.();
|
|
7474
7578
|
setOpen(false);
|
|
7475
7579
|
},
|
|
7476
|
-
children: /* @__PURE__ */ (0,
|
|
7580
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: a.tone === "destructive" ? "text-semantic-error" : void 0, children: a.label })
|
|
7477
7581
|
},
|
|
7478
7582
|
a.label
|
|
7479
7583
|
)) })
|
|
@@ -7491,8 +7595,8 @@ var NavbarMobile = React63.forwardRef(
|
|
|
7491
7595
|
NavbarMobile.displayName = "NavbarMobile";
|
|
7492
7596
|
|
|
7493
7597
|
// virtual-pkg:src/atoms/Navbar/Navbar.tsx
|
|
7494
|
-
var
|
|
7495
|
-
var Navbar =
|
|
7598
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
7599
|
+
var Navbar = React65.forwardRef(
|
|
7496
7600
|
({
|
|
7497
7601
|
brandName,
|
|
7498
7602
|
brandHref,
|
|
@@ -7511,8 +7615,8 @@ var Navbar = React64.forwardRef(
|
|
|
7511
7615
|
className
|
|
7512
7616
|
}, ref) => {
|
|
7513
7617
|
const accountActions = mobileAccountActions ?? menuItems.map((m) => ({ label: m.label, icon: m.icon, tone: m.tone, onSelect: m.onSelect }));
|
|
7514
|
-
return /* @__PURE__ */ (0,
|
|
7515
|
-
/* @__PURE__ */ (0,
|
|
7618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
7619
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7516
7620
|
NavbarDesktop,
|
|
7517
7621
|
{
|
|
7518
7622
|
brandName,
|
|
@@ -7528,7 +7632,7 @@ var Navbar = React64.forwardRef(
|
|
|
7528
7632
|
onMenuOpenChange
|
|
7529
7633
|
}
|
|
7530
7634
|
) }),
|
|
7531
|
-
/* @__PURE__ */ (0,
|
|
7635
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7532
7636
|
NavbarMobile,
|
|
7533
7637
|
{
|
|
7534
7638
|
brandName,
|
|
@@ -7549,17 +7653,17 @@ var Navbar = React64.forwardRef(
|
|
|
7549
7653
|
Navbar.displayName = "Navbar";
|
|
7550
7654
|
|
|
7551
7655
|
// virtual-pkg:src/atoms/NavigationMenu/NavigationMenu.tsx
|
|
7552
|
-
var
|
|
7656
|
+
var React68 = __toESM(require("react"));
|
|
7553
7657
|
|
|
7554
7658
|
// virtual-pkg:src/atoms/NavigationMenuDesktop/NavigationMenuDesktop.tsx
|
|
7555
|
-
var
|
|
7659
|
+
var React66 = __toESM(require("react"));
|
|
7556
7660
|
var import_react_dom8 = require("react-dom");
|
|
7557
|
-
var
|
|
7661
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
7558
7662
|
var cn50 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7559
7663
|
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";
|
|
7560
7664
|
var useScrolled = (enabled, threshold = 16) => {
|
|
7561
|
-
const [scrolled, setScrolled] =
|
|
7562
|
-
|
|
7665
|
+
const [scrolled, setScrolled] = React66.useState(false);
|
|
7666
|
+
React66.useEffect(() => {
|
|
7563
7667
|
if (!enabled) {
|
|
7564
7668
|
setScrolled(false);
|
|
7565
7669
|
return;
|
|
@@ -7571,7 +7675,7 @@ var useScrolled = (enabled, threshold = 16) => {
|
|
|
7571
7675
|
}, [enabled, threshold]);
|
|
7572
7676
|
return scrolled;
|
|
7573
7677
|
};
|
|
7574
|
-
var NavigationMenuDesktop =
|
|
7678
|
+
var NavigationMenuDesktop = React66.forwardRef(
|
|
7575
7679
|
({
|
|
7576
7680
|
brandName = "Linear",
|
|
7577
7681
|
brandHref = "#",
|
|
@@ -7586,23 +7690,23 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7586
7690
|
className,
|
|
7587
7691
|
...rest
|
|
7588
7692
|
}, ref) => {
|
|
7589
|
-
const baseId =
|
|
7590
|
-
const [innerOpen, setInnerOpen] =
|
|
7693
|
+
const baseId = React66.useId();
|
|
7694
|
+
const [innerOpen, setInnerOpen] = React66.useState(null);
|
|
7591
7695
|
const openId = openIdProp !== void 0 ? openIdProp : innerOpen;
|
|
7592
|
-
const [mounted, setMounted] =
|
|
7593
|
-
const [rects, setRects] =
|
|
7594
|
-
const triggerRefs =
|
|
7595
|
-
const panelRefs =
|
|
7696
|
+
const [mounted, setMounted] = React66.useState(false);
|
|
7697
|
+
const [rects, setRects] = React66.useState({});
|
|
7698
|
+
const triggerRefs = React66.useRef({});
|
|
7699
|
+
const panelRefs = React66.useRef({});
|
|
7596
7700
|
const scrolled = useScrolled(transparent);
|
|
7597
|
-
|
|
7598
|
-
const setOpenId =
|
|
7701
|
+
React66.useEffect(() => setMounted(true), []);
|
|
7702
|
+
const setOpenId = React66.useCallback(
|
|
7599
7703
|
(id) => {
|
|
7600
7704
|
if (openIdProp === void 0) setInnerOpen(id);
|
|
7601
7705
|
onOpenIdChange?.(id);
|
|
7602
7706
|
},
|
|
7603
7707
|
[openIdProp, onOpenIdChange]
|
|
7604
7708
|
);
|
|
7605
|
-
const place2 =
|
|
7709
|
+
const place2 = React66.useCallback((id) => {
|
|
7606
7710
|
const el = triggerRefs.current[id];
|
|
7607
7711
|
const box = el?.getBoundingClientRect();
|
|
7608
7712
|
if (!box) return;
|
|
@@ -7611,7 +7715,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7611
7715
|
const left = Math.max(16, Math.min(box.left, window.innerWidth - width - 16));
|
|
7612
7716
|
setRects((prev) => ({ ...prev, [id]: { top: box.bottom + 6, left } }));
|
|
7613
7717
|
}, [items]);
|
|
7614
|
-
|
|
7718
|
+
React66.useLayoutEffect(() => {
|
|
7615
7719
|
if (!openId) return;
|
|
7616
7720
|
place2(openId);
|
|
7617
7721
|
const onMove = () => place2(openId);
|
|
@@ -7625,7 +7729,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7625
7729
|
window.removeEventListener("scroll", onMove, true);
|
|
7626
7730
|
};
|
|
7627
7731
|
}, [openId, place2]);
|
|
7628
|
-
|
|
7732
|
+
React66.useEffect(() => {
|
|
7629
7733
|
if (!openId) return;
|
|
7630
7734
|
const onDown = (e) => {
|
|
7631
7735
|
const t = e.target;
|
|
@@ -7660,7 +7764,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7660
7764
|
zIndex: "var(--z-popover, 1300)"
|
|
7661
7765
|
};
|
|
7662
7766
|
if (item.columns) {
|
|
7663
|
-
return /* @__PURE__ */ (0,
|
|
7767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7664
7768
|
"div",
|
|
7665
7769
|
{
|
|
7666
7770
|
ref: (el) => {
|
|
@@ -7672,11 +7776,11 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7672
7776
|
"data-state": open ? "open" : "closed",
|
|
7673
7777
|
style: { ...style, width: "min(760px, calc(100vw - 32px))" },
|
|
7674
7778
|
className: cn50("origin-top rounded-xl border border-hairline bg-canvas p-lg text-ink shadow-overlay", panelMotion),
|
|
7675
|
-
children: /* @__PURE__ */ (0,
|
|
7676
|
-
/* @__PURE__ */ (0,
|
|
7677
|
-
/* @__PURE__ */ (0,
|
|
7779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "grid grid-cols-3 gap-lg", children: item.columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
7780
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "px-sm text-label text-ink", children: col.title }),
|
|
7781
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("ul", { className: "flex flex-col", children: col.links.map((link) => {
|
|
7678
7782
|
const current = link.href === activeHref;
|
|
7679
|
-
return /* @__PURE__ */ (0,
|
|
7783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7680
7784
|
"a",
|
|
7681
7785
|
{
|
|
7682
7786
|
href: link.href,
|
|
@@ -7696,7 +7800,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7696
7800
|
item.id
|
|
7697
7801
|
);
|
|
7698
7802
|
}
|
|
7699
|
-
return /* @__PURE__ */ (0,
|
|
7803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7700
7804
|
"div",
|
|
7701
7805
|
{
|
|
7702
7806
|
ref: (el) => {
|
|
@@ -7710,9 +7814,9 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7710
7814
|
className: cn50("origin-top rounded-lg border border-hairline bg-canvas p-xs text-ink shadow-overlay", panelMotion),
|
|
7711
7815
|
children: (item.menu ?? []).map((link) => {
|
|
7712
7816
|
const current = link.href === activeHref;
|
|
7713
|
-
return /* @__PURE__ */ (0,
|
|
7714
|
-
link.separated && /* @__PURE__ */ (0,
|
|
7715
|
-
/* @__PURE__ */ (0,
|
|
7817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(React66.Fragment, { children: [
|
|
7818
|
+
link.separated && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Divider, { className: "my-xs" }),
|
|
7819
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7716
7820
|
"a",
|
|
7717
7821
|
{
|
|
7718
7822
|
href: link.href,
|
|
@@ -7734,7 +7838,7 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7734
7838
|
);
|
|
7735
7839
|
};
|
|
7736
7840
|
const solid = !transparent || scrolled;
|
|
7737
|
-
return /* @__PURE__ */ (0,
|
|
7841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
7738
7842
|
"header",
|
|
7739
7843
|
{
|
|
7740
7844
|
ref,
|
|
@@ -7747,14 +7851,14 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7747
7851
|
),
|
|
7748
7852
|
...rest,
|
|
7749
7853
|
children: [
|
|
7750
|
-
/* @__PURE__ */ (0,
|
|
7751
|
-
/* @__PURE__ */ (0,
|
|
7752
|
-
/* @__PURE__ */ (0,
|
|
7854
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
7855
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Divider, { orientation: "vertical" }) }),
|
|
7856
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-hidden", children: items.map((item) => {
|
|
7753
7857
|
const hasPanel = Boolean(item.menu?.length || item.columns?.length);
|
|
7754
7858
|
const current = item.id === activeId;
|
|
7755
7859
|
const open = openId === item.id;
|
|
7756
7860
|
if (!hasPanel) {
|
|
7757
|
-
return /* @__PURE__ */ (0,
|
|
7861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
7758
7862
|
"a",
|
|
7759
7863
|
{
|
|
7760
7864
|
href: item.href ?? "#",
|
|
@@ -7768,14 +7872,14 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7768
7872
|
current ? "bg-surface-strong text-ink" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
7769
7873
|
),
|
|
7770
7874
|
children: [
|
|
7771
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7875
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: item.icon, size: 16 }),
|
|
7772
7876
|
item.label
|
|
7773
7877
|
]
|
|
7774
7878
|
},
|
|
7775
7879
|
item.id
|
|
7776
7880
|
);
|
|
7777
7881
|
}
|
|
7778
|
-
return /* @__PURE__ */ (0,
|
|
7882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7779
7883
|
Button,
|
|
7780
7884
|
{
|
|
7781
7885
|
ref: (el) => {
|
|
@@ -7790,8 +7894,8 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7790
7894
|
if (!open) place2(item.id);
|
|
7791
7895
|
setOpenId(open ? null : item.id);
|
|
7792
7896
|
},
|
|
7793
|
-
leadingIcon: item.icon ? /* @__PURE__ */ (0,
|
|
7794
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
7897
|
+
leadingIcon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: item.icon, size: 16 }) : void 0,
|
|
7898
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7795
7899
|
Icon,
|
|
7796
7900
|
{
|
|
7797
7901
|
name: "chevron-down",
|
|
@@ -7804,9 +7908,9 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7804
7908
|
item.id
|
|
7805
7909
|
);
|
|
7806
7910
|
}) }),
|
|
7807
|
-
actions !== void 0 && /* @__PURE__ */ (0,
|
|
7911
|
+
actions !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex shrink-0 items-center gap-sm", children: actions }),
|
|
7808
7912
|
mounted ? (0, import_react_dom8.createPortal)(
|
|
7809
|
-
/* @__PURE__ */ (0,
|
|
7913
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: items.filter((i) => i.menu?.length || i.columns?.length).map(renderPanel) }),
|
|
7810
7914
|
document.body
|
|
7811
7915
|
) : null
|
|
7812
7916
|
]
|
|
@@ -7817,13 +7921,13 @@ var NavigationMenuDesktop = React65.forwardRef(
|
|
|
7817
7921
|
NavigationMenuDesktop.displayName = "NavigationMenuDesktop";
|
|
7818
7922
|
|
|
7819
7923
|
// virtual-pkg:src/atoms/NavigationMenuMobile/NavigationMenuMobile.tsx
|
|
7820
|
-
var
|
|
7821
|
-
var
|
|
7924
|
+
var React67 = __toESM(require("react"));
|
|
7925
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
7822
7926
|
var cn51 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7823
7927
|
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";
|
|
7824
7928
|
var useScrolled2 = (enabled, threshold = 16) => {
|
|
7825
|
-
const [scrolled, setScrolled] =
|
|
7826
|
-
|
|
7929
|
+
const [scrolled, setScrolled] = React67.useState(false);
|
|
7930
|
+
React67.useEffect(() => {
|
|
7827
7931
|
if (!enabled) {
|
|
7828
7932
|
setScrolled(false);
|
|
7829
7933
|
return;
|
|
@@ -7835,7 +7939,7 @@ var useScrolled2 = (enabled, threshold = 16) => {
|
|
|
7835
7939
|
}, [enabled, threshold]);
|
|
7836
7940
|
return scrolled;
|
|
7837
7941
|
};
|
|
7838
|
-
var NavigationMenuMobile =
|
|
7942
|
+
var NavigationMenuMobile = React67.forwardRef(
|
|
7839
7943
|
({
|
|
7840
7944
|
brandName = "Linear",
|
|
7841
7945
|
brandHref = "#",
|
|
@@ -7855,25 +7959,25 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7855
7959
|
className,
|
|
7856
7960
|
...rest
|
|
7857
7961
|
}, ref) => {
|
|
7858
|
-
const autoId =
|
|
7962
|
+
const autoId = React67.useId();
|
|
7859
7963
|
const panelId = panelIdProp ?? `${autoId}-panel`;
|
|
7860
|
-
const [innerOpen, setInnerOpen] =
|
|
7964
|
+
const [innerOpen, setInnerOpen] = React67.useState(defaultOpen);
|
|
7861
7965
|
const open = openProp ?? innerOpen;
|
|
7862
|
-
const setOpen =
|
|
7966
|
+
const setOpen = React67.useCallback(
|
|
7863
7967
|
(next) => {
|
|
7864
7968
|
if (openProp === void 0) setInnerOpen(next);
|
|
7865
7969
|
onOpenChange?.(next);
|
|
7866
7970
|
},
|
|
7867
7971
|
[openProp, onOpenChange]
|
|
7868
7972
|
);
|
|
7869
|
-
const [innerSection, setInnerSection] =
|
|
7973
|
+
const [innerSection, setInnerSection] = React67.useState(null);
|
|
7870
7974
|
const section = sectionProp !== void 0 ? sectionProp : innerSection;
|
|
7871
7975
|
const setSection = (id) => {
|
|
7872
7976
|
if (sectionProp === void 0) setInnerSection(id);
|
|
7873
7977
|
onSectionIdChange?.(id);
|
|
7874
7978
|
};
|
|
7875
7979
|
const scrolled = useScrolled2(transparent);
|
|
7876
|
-
|
|
7980
|
+
React67.useEffect(() => {
|
|
7877
7981
|
if (!open) return;
|
|
7878
7982
|
const onKey = (e) => {
|
|
7879
7983
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -7885,9 +7989,9 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7885
7989
|
const solid = !transparent || scrolled || open;
|
|
7886
7990
|
const subLink = (link, tabbable) => {
|
|
7887
7991
|
const current = link.href === activeHref;
|
|
7888
|
-
return /* @__PURE__ */ (0,
|
|
7889
|
-
link.separated && /* @__PURE__ */ (0,
|
|
7890
|
-
/* @__PURE__ */ (0,
|
|
7992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("li", { children: [
|
|
7993
|
+
link.separated && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Divider, { className: "my-xs" }),
|
|
7994
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7891
7995
|
"a",
|
|
7892
7996
|
{
|
|
7893
7997
|
href: link.href,
|
|
@@ -7906,7 +8010,7 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7906
8010
|
)
|
|
7907
8011
|
] }, link.href);
|
|
7908
8012
|
};
|
|
7909
|
-
return /* @__PURE__ */ (0,
|
|
8013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
7910
8014
|
"header",
|
|
7911
8015
|
{
|
|
7912
8016
|
ref,
|
|
@@ -7920,11 +8024,11 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7920
8024
|
),
|
|
7921
8025
|
...rest,
|
|
7922
8026
|
children: [
|
|
7923
|
-
/* @__PURE__ */ (0,
|
|
7924
|
-
/* @__PURE__ */ (0,
|
|
7925
|
-
/* @__PURE__ */ (0,
|
|
7926
|
-
actions !== void 0 && /* @__PURE__ */ (0,
|
|
7927
|
-
trigger ?? /* @__PURE__ */ (0,
|
|
8027
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex h-14 min-w-0 items-center justify-between gap-sm px-base", children: [
|
|
8028
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
8029
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex min-w-0 flex-1 items-center justify-end gap-xs", children: [
|
|
8030
|
+
actions !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex shrink-0 items-center gap-xs", children: actions }),
|
|
8031
|
+
trigger ?? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7928
8032
|
IconButton,
|
|
7929
8033
|
{
|
|
7930
8034
|
icon: open ? "x" : "menu",
|
|
@@ -7937,7 +8041,7 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7937
8041
|
)
|
|
7938
8042
|
] })
|
|
7939
8043
|
] }),
|
|
7940
|
-
/* @__PURE__ */ (0,
|
|
8044
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7941
8045
|
"div",
|
|
7942
8046
|
{
|
|
7943
8047
|
id: panelId,
|
|
@@ -7947,18 +8051,18 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7947
8051
|
"grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
7948
8052
|
open && "bg-canvas"
|
|
7949
8053
|
),
|
|
7950
|
-
children: /* @__PURE__ */ (0,
|
|
8054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
7951
8055
|
"nav",
|
|
7952
8056
|
{
|
|
7953
8057
|
"aria-label": "Primary",
|
|
7954
8058
|
"data-state": state,
|
|
7955
8059
|
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",
|
|
7956
8060
|
children: [
|
|
7957
|
-
/* @__PURE__ */ (0,
|
|
8061
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("ul", { className: "flex flex-col gap-xxs", children: items.map((item) => {
|
|
7958
8062
|
const hasSub = Boolean(item.menu?.length || item.columns?.length);
|
|
7959
8063
|
if (!hasSub) {
|
|
7960
8064
|
const current = item.href === activeHref;
|
|
7961
|
-
return /* @__PURE__ */ (0,
|
|
8065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
7962
8066
|
"a",
|
|
7963
8067
|
{
|
|
7964
8068
|
href: item.href ?? "#",
|
|
@@ -7973,7 +8077,7 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7973
8077
|
current ? "bg-surface-strong text-ink" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
7974
8078
|
),
|
|
7975
8079
|
children: [
|
|
7976
|
-
item.icon && /* @__PURE__ */ (0,
|
|
8080
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }),
|
|
7977
8081
|
item.label
|
|
7978
8082
|
]
|
|
7979
8083
|
}
|
|
@@ -7981,8 +8085,8 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7981
8085
|
}
|
|
7982
8086
|
const expanded = section === item.id;
|
|
7983
8087
|
const subId = `${autoId}-${item.id}`;
|
|
7984
|
-
return /* @__PURE__ */ (0,
|
|
7985
|
-
/* @__PURE__ */ (0,
|
|
8088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("li", { children: [
|
|
8089
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7986
8090
|
Button,
|
|
7987
8091
|
{
|
|
7988
8092
|
variant: "item",
|
|
@@ -7991,8 +8095,8 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
7991
8095
|
"aria-expanded": expanded,
|
|
7992
8096
|
"aria-controls": subId,
|
|
7993
8097
|
onClick: () => setSection(expanded ? null : item.id),
|
|
7994
|
-
leadingIcon: item.icon ? /* @__PURE__ */ (0,
|
|
7995
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
8098
|
+
leadingIcon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }) : void 0,
|
|
8099
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7996
8100
|
Icon,
|
|
7997
8101
|
{
|
|
7998
8102
|
name: "chevron-down",
|
|
@@ -8003,7 +8107,7 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
8003
8107
|
children: item.label
|
|
8004
8108
|
}
|
|
8005
8109
|
),
|
|
8006
|
-
/* @__PURE__ */ (0,
|
|
8110
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8007
8111
|
"div",
|
|
8008
8112
|
{
|
|
8009
8113
|
id: subId,
|
|
@@ -8011,18 +8115,18 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
8011
8115
|
"aria-label": item.label,
|
|
8012
8116
|
"data-state": expanded ? "open" : "closed",
|
|
8013
8117
|
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",
|
|
8014
|
-
children: /* @__PURE__ */ (0,
|
|
8015
|
-
item.menu && /* @__PURE__ */ (0,
|
|
8016
|
-
item.columns?.map((col) => /* @__PURE__ */ (0,
|
|
8017
|
-
/* @__PURE__ */ (0,
|
|
8018
|
-
/* @__PURE__ */ (0,
|
|
8118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "py-xs pl-lg", children: [
|
|
8119
|
+
item.menu && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("ul", { className: "flex flex-col gap-xxs", children: item.menu.map((l) => subLink(l, open && expanded)) }),
|
|
8120
|
+
item.columns?.map((col) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "pb-xs", children: [
|
|
8121
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "px-base pb-xxs pt-sm text-caption text-muted", children: col.title }),
|
|
8122
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("ul", { className: "flex flex-col gap-xxs", children: col.links.map((l) => subLink(l, open && expanded)) })
|
|
8019
8123
|
] }, col.title))
|
|
8020
8124
|
] }) })
|
|
8021
8125
|
}
|
|
8022
8126
|
)
|
|
8023
8127
|
] }, item.id);
|
|
8024
8128
|
}) }),
|
|
8025
|
-
menuFooter !== void 0 && /* @__PURE__ */ (0,
|
|
8129
|
+
menuFooter !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "mt-sm flex flex-col gap-xs border-t border-hairline px-base pb-xs pt-sm", children: menuFooter })
|
|
8026
8130
|
]
|
|
8027
8131
|
}
|
|
8028
8132
|
) })
|
|
@@ -8036,8 +8140,8 @@ var NavigationMenuMobile = React66.forwardRef(
|
|
|
8036
8140
|
NavigationMenuMobile.displayName = "NavigationMenuMobile";
|
|
8037
8141
|
|
|
8038
8142
|
// virtual-pkg:src/atoms/NavigationMenu/NavigationMenu.tsx
|
|
8039
|
-
var
|
|
8040
|
-
var NavigationMenu =
|
|
8143
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
8144
|
+
var NavigationMenu = React68.forwardRef(
|
|
8041
8145
|
({
|
|
8042
8146
|
brandName,
|
|
8043
8147
|
brandHref,
|
|
@@ -8057,22 +8161,22 @@ var NavigationMenu = React67.forwardRef(
|
|
|
8057
8161
|
transparent = false,
|
|
8058
8162
|
className
|
|
8059
8163
|
}, ref) => {
|
|
8060
|
-
const autoId =
|
|
8164
|
+
const autoId = React68.useId();
|
|
8061
8165
|
const panelId = `${autoId}-panel`;
|
|
8062
|
-
const [innerOpen, setInnerOpen] =
|
|
8166
|
+
const [innerOpen, setInnerOpen] = React68.useState(false);
|
|
8063
8167
|
const open = mobileOpen ?? innerOpen;
|
|
8064
|
-
const setMobileOpen =
|
|
8168
|
+
const setMobileOpen = React68.useCallback(
|
|
8065
8169
|
(next) => {
|
|
8066
8170
|
if (mobileOpen === void 0) setInnerOpen(next);
|
|
8067
8171
|
onMobileOpenChange?.(next);
|
|
8068
8172
|
},
|
|
8069
8173
|
[mobileOpen, onMobileOpenChange]
|
|
8070
8174
|
);
|
|
8071
|
-
const closeAll =
|
|
8175
|
+
const closeAll = React68.useCallback(() => {
|
|
8072
8176
|
onOpenIdChange?.(null);
|
|
8073
8177
|
setMobileOpen(false);
|
|
8074
8178
|
}, [onOpenIdChange, setMobileOpen]);
|
|
8075
|
-
return /* @__PURE__ */ (0,
|
|
8179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
8076
8180
|
"div",
|
|
8077
8181
|
{
|
|
8078
8182
|
ref,
|
|
@@ -8081,7 +8185,7 @@ var NavigationMenu = React67.forwardRef(
|
|
|
8081
8185
|
},
|
|
8082
8186
|
className: ["w-full rounded-none", className].filter(Boolean).join(" "),
|
|
8083
8187
|
children: [
|
|
8084
|
-
/* @__PURE__ */ (0,
|
|
8188
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8085
8189
|
NavigationMenuDesktop,
|
|
8086
8190
|
{
|
|
8087
8191
|
brandName,
|
|
@@ -8096,7 +8200,7 @@ var NavigationMenu = React67.forwardRef(
|
|
|
8096
8200
|
transparent
|
|
8097
8201
|
}
|
|
8098
8202
|
) }),
|
|
8099
|
-
/* @__PURE__ */ (0,
|
|
8203
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8100
8204
|
NavigationMenuMobile,
|
|
8101
8205
|
{
|
|
8102
8206
|
brandName,
|
|
@@ -8112,7 +8216,7 @@ var NavigationMenu = React67.forwardRef(
|
|
|
8112
8216
|
menuFooter: mobileMenuFooter,
|
|
8113
8217
|
transparent,
|
|
8114
8218
|
panelId,
|
|
8115
|
-
trigger: /* @__PURE__ */ (0,
|
|
8219
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8116
8220
|
IconButton,
|
|
8117
8221
|
{
|
|
8118
8222
|
icon: open ? "x" : "menu",
|
|
@@ -8133,8 +8237,8 @@ var NavigationMenu = React67.forwardRef(
|
|
|
8133
8237
|
NavigationMenu.displayName = "NavigationMenu";
|
|
8134
8238
|
|
|
8135
8239
|
// virtual-pkg:src/atoms/NotificationFeed/NotificationFeed.tsx
|
|
8136
|
-
var
|
|
8137
|
-
var
|
|
8240
|
+
var React69 = __toESM(require("react"));
|
|
8241
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8138
8242
|
var FILTERS = [
|
|
8139
8243
|
{ value: "all", label: "All" },
|
|
8140
8244
|
{ value: "unread", label: "Unread" },
|
|
@@ -8148,7 +8252,7 @@ function matches(entry, filter) {
|
|
|
8148
8252
|
if (filter === "assignments") return entry.kind === "assignment";
|
|
8149
8253
|
return true;
|
|
8150
8254
|
}
|
|
8151
|
-
var NotificationFeed =
|
|
8255
|
+
var NotificationFeed = React69.forwardRef(
|
|
8152
8256
|
({
|
|
8153
8257
|
title = "Inbox",
|
|
8154
8258
|
notifications,
|
|
@@ -8162,10 +8266,10 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8162
8266
|
className,
|
|
8163
8267
|
...rest
|
|
8164
8268
|
}, ref) => {
|
|
8165
|
-
const headingId =
|
|
8269
|
+
const headingId = React69.useId();
|
|
8166
8270
|
const unreadCount = notifications.filter((n) => n.unread).length;
|
|
8167
8271
|
const visible = notifications.filter((n) => matches(n, filter));
|
|
8168
|
-
return /* @__PURE__ */ (0,
|
|
8272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
8169
8273
|
"section",
|
|
8170
8274
|
{
|
|
8171
8275
|
ref,
|
|
@@ -8176,14 +8280,14 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8176
8280
|
),
|
|
8177
8281
|
...rest,
|
|
8178
8282
|
children: [
|
|
8179
|
-
/* @__PURE__ */ (0,
|
|
8180
|
-
/* @__PURE__ */ (0,
|
|
8181
|
-
/* @__PURE__ */ (0,
|
|
8283
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("header", { className: "flex min-w-0 items-center gap-md px-base py-md", children: [
|
|
8284
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("h2", { id: headingId, className: "shrink-0 text-heading-sm text-ink", children: title }),
|
|
8285
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { role: "group", "aria-label": "Filter notifications", className: "flex min-w-0 flex-1 flex-wrap items-center gap-xs", children: FILTERS.map((f) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Chip, { selected: filter === f.value, onSelectedChange: () => onFilterChange?.(f.value), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "inline-flex items-center gap-xs", children: [
|
|
8182
8286
|
f.label,
|
|
8183
|
-
f.value === "unread" && unreadCount > 0 ? /* @__PURE__ */ (0,
|
|
8287
|
+
f.value === "unread" && unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Badge, { size: "sm", tone: "primary", children: unreadCount }) : null
|
|
8184
8288
|
] }) }, f.value)) }),
|
|
8185
|
-
/* @__PURE__ */ (0,
|
|
8186
|
-
/* @__PURE__ */ (0,
|
|
8289
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
8290
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8187
8291
|
IconButton,
|
|
8188
8292
|
{
|
|
8189
8293
|
icon: "check",
|
|
@@ -8193,22 +8297,22 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8193
8297
|
onClick: onMarkAllRead
|
|
8194
8298
|
}
|
|
8195
8299
|
),
|
|
8196
|
-
/* @__PURE__ */ (0,
|
|
8300
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(IconButton, { icon: "ellipsis", variant: "ghost", "aria-label": "More options", onClick: onMoreClick })
|
|
8197
8301
|
] })
|
|
8198
8302
|
] }),
|
|
8199
|
-
visible.length === 0 ? /* @__PURE__ */ (0,
|
|
8200
|
-
/* @__PURE__ */ (0,
|
|
8201
|
-
/* @__PURE__ */ (0,
|
|
8202
|
-
/* @__PURE__ */ (0,
|
|
8203
|
-
] }) : /* @__PURE__ */ (0,
|
|
8303
|
+
visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex flex-col items-center justify-center gap-xs px-base pb-xl pt-lg text-center", children: [
|
|
8304
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: "inbox", size: 36, strokeWidth: 1.5, className: "text-muted-soft" }),
|
|
8305
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "mt-sm text-heading-sm text-ink", children: emptyTitle }),
|
|
8306
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-body-sm text-muted", children: emptyDescription })
|
|
8307
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("ul", { className: "flex flex-col px-sm pb-sm", "aria-label": "Notifications", children: visible.map((n) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8204
8308
|
ListItem,
|
|
8205
8309
|
{
|
|
8206
8310
|
variant: "plain",
|
|
8207
8311
|
href: n.href,
|
|
8208
8312
|
onClick: () => onNotificationClick?.(n),
|
|
8209
8313
|
"aria-label": typeof n.title === "string" ? `${n.unread ? "Unread: " : ""}${n.title}` : void 0,
|
|
8210
|
-
leading: /* @__PURE__ */ (0,
|
|
8211
|
-
/* @__PURE__ */ (0,
|
|
8314
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "flex shrink-0 items-center gap-sm", children: [
|
|
8315
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8212
8316
|
"span",
|
|
8213
8317
|
{
|
|
8214
8318
|
"aria-hidden": "true",
|
|
@@ -8218,11 +8322,11 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8218
8322
|
)
|
|
8219
8323
|
}
|
|
8220
8324
|
),
|
|
8221
|
-
/* @__PURE__ */ (0,
|
|
8325
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: n.icon, size: 18, className: "text-body" })
|
|
8222
8326
|
] }),
|
|
8223
8327
|
title: n.title,
|
|
8224
8328
|
meta: n.description,
|
|
8225
|
-
trailing: /* @__PURE__ */ (0,
|
|
8329
|
+
trailing: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "shrink-0 self-start pt-xxs text-body-sm text-muted tabular-nums", children: n.time })
|
|
8226
8330
|
}
|
|
8227
8331
|
) }, n.id)) })
|
|
8228
8332
|
]
|
|
@@ -8233,14 +8337,14 @@ var NotificationFeed = React68.forwardRef(
|
|
|
8233
8337
|
NotificationFeed.displayName = "NotificationFeed";
|
|
8234
8338
|
|
|
8235
8339
|
// virtual-pkg:src/atoms/PricingTable/PricingTable.tsx
|
|
8236
|
-
var
|
|
8340
|
+
var React73 = __toESM(require("react"));
|
|
8237
8341
|
|
|
8238
8342
|
// virtual-pkg:src/atoms/PricingTableDesktop/PricingTableDesktop.tsx
|
|
8239
|
-
var
|
|
8343
|
+
var React71 = __toESM(require("react"));
|
|
8240
8344
|
|
|
8241
8345
|
// virtual-pkg:src/atoms/Switch/Switch.tsx
|
|
8242
|
-
var
|
|
8243
|
-
var
|
|
8346
|
+
var React70 = __toESM(require("react"));
|
|
8347
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8244
8348
|
var TRACK = {
|
|
8245
8349
|
sm: "h-4 w-7",
|
|
8246
8350
|
md: "h-5 w-9"
|
|
@@ -8253,7 +8357,7 @@ var TRAVEL = {
|
|
|
8253
8357
|
sm: "translate-x-3",
|
|
8254
8358
|
md: "translate-x-4"
|
|
8255
8359
|
};
|
|
8256
|
-
var Switch =
|
|
8360
|
+
var Switch = React70.forwardRef(
|
|
8257
8361
|
({
|
|
8258
8362
|
checked,
|
|
8259
8363
|
defaultChecked,
|
|
@@ -8268,11 +8372,11 @@ var Switch = React69.forwardRef(
|
|
|
8268
8372
|
className,
|
|
8269
8373
|
...rest
|
|
8270
8374
|
}, ref) => {
|
|
8271
|
-
const autoId =
|
|
8375
|
+
const autoId = React70.useId();
|
|
8272
8376
|
const inputId = id ?? `switch-${autoId}`;
|
|
8273
8377
|
const descId = description ? `${inputId}-desc` : void 0;
|
|
8274
8378
|
const isControlled = checked !== void 0;
|
|
8275
|
-
const [inner, setInner] =
|
|
8379
|
+
const [inner, setInner] = React70.useState(Boolean(defaultChecked));
|
|
8276
8380
|
const on = isControlled ? Boolean(checked) : inner;
|
|
8277
8381
|
const handleChange = (e) => {
|
|
8278
8382
|
if (!isControlled) setInner(e.target.checked);
|
|
@@ -8280,7 +8384,7 @@ var Switch = React69.forwardRef(
|
|
|
8280
8384
|
onChange?.(e);
|
|
8281
8385
|
};
|
|
8282
8386
|
const labelled = Boolean(label);
|
|
8283
|
-
return /* @__PURE__ */ (0,
|
|
8387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
8284
8388
|
"label",
|
|
8285
8389
|
{
|
|
8286
8390
|
htmlFor: inputId,
|
|
@@ -8291,15 +8395,15 @@ var Switch = React69.forwardRef(
|
|
|
8291
8395
|
className
|
|
8292
8396
|
].filter(Boolean).join(" "),
|
|
8293
8397
|
children: [
|
|
8294
|
-
labelled ? /* @__PURE__ */ (0,
|
|
8295
|
-
leading ? /* @__PURE__ */ (0,
|
|
8296
|
-
/* @__PURE__ */ (0,
|
|
8297
|
-
/* @__PURE__ */ (0,
|
|
8298
|
-
description ? /* @__PURE__ */ (0,
|
|
8398
|
+
labelled ? /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "flex min-w-0 items-start gap-md", children: [
|
|
8399
|
+
leading ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "mt-xxs inline-flex shrink-0 text-ink", children: leading }) : null,
|
|
8400
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "flex min-w-0 flex-col", children: [
|
|
8401
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-body-md text-ink", children: label }),
|
|
8402
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { id: descId, className: "text-body-sm text-muted", children: description }) : null
|
|
8299
8403
|
] })
|
|
8300
8404
|
] }) : null,
|
|
8301
|
-
/* @__PURE__ */ (0,
|
|
8302
|
-
/* @__PURE__ */ (0,
|
|
8405
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "relative inline-flex shrink-0 items-center", children: [
|
|
8406
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8303
8407
|
"input",
|
|
8304
8408
|
{
|
|
8305
8409
|
ref,
|
|
@@ -8315,7 +8419,7 @@ var Switch = React69.forwardRef(
|
|
|
8315
8419
|
...rest
|
|
8316
8420
|
}
|
|
8317
8421
|
),
|
|
8318
|
-
/* @__PURE__ */ (0,
|
|
8422
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8319
8423
|
"span",
|
|
8320
8424
|
{
|
|
8321
8425
|
"aria-hidden": "true",
|
|
@@ -8327,7 +8431,7 @@ var Switch = React69.forwardRef(
|
|
|
8327
8431
|
disabled && !labelled ? "opacity-50" : "",
|
|
8328
8432
|
TRACK[size]
|
|
8329
8433
|
].join(" "),
|
|
8330
|
-
children: /* @__PURE__ */ (0,
|
|
8434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8331
8435
|
"span",
|
|
8332
8436
|
{
|
|
8333
8437
|
className: [
|
|
@@ -8348,10 +8452,10 @@ var Switch = React69.forwardRef(
|
|
|
8348
8452
|
Switch.displayName = "Switch";
|
|
8349
8453
|
|
|
8350
8454
|
// virtual-pkg:src/atoms/PricingTableDesktop/PricingTableDesktop.tsx
|
|
8351
|
-
var
|
|
8455
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
8352
8456
|
var cn53 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8353
8457
|
function useBilling(billing, defaultBilling, onBillingChange) {
|
|
8354
|
-
const [inner, setInner] =
|
|
8458
|
+
const [inner, setInner] = React71.useState(defaultBilling);
|
|
8355
8459
|
const value = billing ?? inner;
|
|
8356
8460
|
const set = (b) => {
|
|
8357
8461
|
if (billing === void 0) setInner(b);
|
|
@@ -8366,7 +8470,7 @@ var BILLING_OPTIONS = [
|
|
|
8366
8470
|
function priceOf(tier, billing) {
|
|
8367
8471
|
return billing === "yearly" ? tier.yearlyPrice ?? tier.monthlyPrice : tier.monthlyPrice;
|
|
8368
8472
|
}
|
|
8369
|
-
var PricingTableDesktop =
|
|
8473
|
+
var PricingTableDesktop = React71.forwardRef(
|
|
8370
8474
|
({
|
|
8371
8475
|
tiers,
|
|
8372
8476
|
billing,
|
|
@@ -8379,7 +8483,7 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8379
8483
|
...rest
|
|
8380
8484
|
}, ref) => {
|
|
8381
8485
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8382
|
-
return /* @__PURE__ */ (0,
|
|
8486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
8383
8487
|
"section",
|
|
8384
8488
|
{
|
|
8385
8489
|
ref,
|
|
@@ -8387,7 +8491,7 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8387
8491
|
className: cn53("flex w-full flex-col items-center gap-lg text-ink", className),
|
|
8388
8492
|
...rest,
|
|
8389
8493
|
children: [
|
|
8390
|
-
showBillingToggle ? /* @__PURE__ */ (0,
|
|
8494
|
+
showBillingToggle ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8391
8495
|
ButtonGroup,
|
|
8392
8496
|
{
|
|
8393
8497
|
tone: "primary",
|
|
@@ -8398,14 +8502,14 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8398
8502
|
"aria-label": "Billing period"
|
|
8399
8503
|
}
|
|
8400
8504
|
) }) : null,
|
|
8401
|
-
/* @__PURE__ */ (0,
|
|
8505
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8402
8506
|
"ul",
|
|
8403
8507
|
{
|
|
8404
8508
|
className: "grid w-full rounded-lg border border-hairline bg-canvas shadow-card",
|
|
8405
8509
|
style: { gridTemplateColumns: `repeat(${tiers.length}, minmax(0, 1fr))` },
|
|
8406
8510
|
children: tiers.map((tier, i) => {
|
|
8407
8511
|
const price = priceOf(tier, period);
|
|
8408
|
-
return /* @__PURE__ */ (0,
|
|
8512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
8409
8513
|
"li",
|
|
8410
8514
|
{
|
|
8411
8515
|
className: cn53(
|
|
@@ -8414,10 +8518,10 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8414
8518
|
tier.highlighted && "-m-px rounded-lg border border-primary bg-canvas shadow-md"
|
|
8415
8519
|
),
|
|
8416
8520
|
children: [
|
|
8417
|
-
/* @__PURE__ */ (0,
|
|
8418
|
-
/* @__PURE__ */ (0,
|
|
8419
|
-
/* @__PURE__ */ (0,
|
|
8420
|
-
/* @__PURE__ */ (0,
|
|
8521
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
8522
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h3", { className: "text-heading-sm text-ink", children: tier.name }),
|
|
8523
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("p", { className: "text-body-md text-body", children: [
|
|
8524
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "font-weight-label text-ink", children: [
|
|
8421
8525
|
currency,
|
|
8422
8526
|
price
|
|
8423
8527
|
] }),
|
|
@@ -8425,8 +8529,8 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8425
8529
|
tier.unit ?? "per user/month"
|
|
8426
8530
|
] })
|
|
8427
8531
|
] }),
|
|
8428
|
-
/* @__PURE__ */ (0,
|
|
8429
|
-
/* @__PURE__ */ (0,
|
|
8532
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex min-h-6 items-center", children: tier.note ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-body-sm text-muted", children: tier.note }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
8533
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8430
8534
|
Switch,
|
|
8431
8535
|
{
|
|
8432
8536
|
size: "sm",
|
|
@@ -8435,9 +8539,9 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8435
8539
|
onCheckedChange: (c) => setPeriod(c ? "yearly" : "monthly")
|
|
8436
8540
|
}
|
|
8437
8541
|
),
|
|
8438
|
-
/* @__PURE__ */ (0,
|
|
8542
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "text-body-sm text-body", children: period === "yearly" ? "Billed yearly" : "Billed monthly" })
|
|
8439
8543
|
] }) }),
|
|
8440
|
-
tier.current ? /* @__PURE__ */ (0,
|
|
8544
|
+
tier.current ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Button, { variant: "secondary", fullWidth: true, disabled: true, children: "Current plan" }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8441
8545
|
Button,
|
|
8442
8546
|
{
|
|
8443
8547
|
variant: tier.ctaVariant ?? "primary",
|
|
@@ -8461,10 +8565,10 @@ var PricingTableDesktop = React70.forwardRef(
|
|
|
8461
8565
|
PricingTableDesktop.displayName = "PricingTableDesktop";
|
|
8462
8566
|
|
|
8463
8567
|
// virtual-pkg:src/atoms/PricingTableMobile/PricingTableMobile.tsx
|
|
8464
|
-
var
|
|
8465
|
-
var
|
|
8568
|
+
var React72 = __toESM(require("react"));
|
|
8569
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
8466
8570
|
var cn54 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8467
|
-
var PricingTableMobile =
|
|
8571
|
+
var PricingTableMobile = React72.forwardRef(
|
|
8468
8572
|
({
|
|
8469
8573
|
tiers,
|
|
8470
8574
|
billing,
|
|
@@ -8477,7 +8581,7 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8477
8581
|
...rest
|
|
8478
8582
|
}, ref) => {
|
|
8479
8583
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8480
|
-
return /* @__PURE__ */ (0,
|
|
8584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
8481
8585
|
"section",
|
|
8482
8586
|
{
|
|
8483
8587
|
ref,
|
|
@@ -8485,7 +8589,7 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8485
8589
|
className: cn54("flex w-full flex-col gap-base text-ink", className),
|
|
8486
8590
|
...rest,
|
|
8487
8591
|
children: [
|
|
8488
|
-
showBillingToggle ? /* @__PURE__ */ (0,
|
|
8592
|
+
showBillingToggle ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8489
8593
|
ButtonGroup,
|
|
8490
8594
|
{
|
|
8491
8595
|
tone: "primary",
|
|
@@ -8496,7 +8600,7 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8496
8600
|
"aria-label": "Billing period"
|
|
8497
8601
|
}
|
|
8498
8602
|
) : null,
|
|
8499
|
-
/* @__PURE__ */ (0,
|
|
8603
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("ul", { className: "flex w-full flex-col gap-md", children: tiers.map((tier) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
8500
8604
|
"li",
|
|
8501
8605
|
{
|
|
8502
8606
|
className: cn54(
|
|
@@ -8504,10 +8608,10 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8504
8608
|
tier.highlighted ? "border-primary" : "border-hairline"
|
|
8505
8609
|
),
|
|
8506
8610
|
children: [
|
|
8507
|
-
/* @__PURE__ */ (0,
|
|
8508
|
-
/* @__PURE__ */ (0,
|
|
8509
|
-
/* @__PURE__ */ (0,
|
|
8510
|
-
/* @__PURE__ */ (0,
|
|
8611
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
8612
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h3", { className: "text-heading-sm text-ink", children: tier.name }),
|
|
8613
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("p", { className: "text-body-md text-body", children: [
|
|
8614
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "font-weight-label text-ink", children: [
|
|
8511
8615
|
currency,
|
|
8512
8616
|
priceOf(tier, period)
|
|
8513
8617
|
] }),
|
|
@@ -8515,8 +8619,8 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8515
8619
|
tier.unit ?? "per user/month"
|
|
8516
8620
|
] })
|
|
8517
8621
|
] }),
|
|
8518
|
-
tier.note ? /* @__PURE__ */ (0,
|
|
8519
|
-
/* @__PURE__ */ (0,
|
|
8622
|
+
tier.note ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-body-sm text-muted", children: tier.note }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
8623
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8520
8624
|
Switch,
|
|
8521
8625
|
{
|
|
8522
8626
|
size: "sm",
|
|
@@ -8525,9 +8629,9 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8525
8629
|
onCheckedChange: (c) => setPeriod(c ? "yearly" : "monthly")
|
|
8526
8630
|
}
|
|
8527
8631
|
),
|
|
8528
|
-
/* @__PURE__ */ (0,
|
|
8632
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-body-sm text-body", children: period === "yearly" ? "Billed yearly" : "Billed monthly" })
|
|
8529
8633
|
] }),
|
|
8530
|
-
tier.current ? /* @__PURE__ */ (0,
|
|
8634
|
+
tier.current ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { variant: "secondary", size: "lg", fullWidth: true, disabled: true, children: "Current plan" }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8531
8635
|
Button,
|
|
8532
8636
|
{
|
|
8533
8637
|
variant: tier.ctaVariant ?? "primary",
|
|
@@ -8549,12 +8653,12 @@ var PricingTableMobile = React71.forwardRef(
|
|
|
8549
8653
|
PricingTableMobile.displayName = "PricingTableMobile";
|
|
8550
8654
|
|
|
8551
8655
|
// virtual-pkg:src/atoms/PricingTable/PricingTable.tsx
|
|
8552
|
-
var
|
|
8553
|
-
var PricingTable =
|
|
8656
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
8657
|
+
var PricingTable = React73.forwardRef(
|
|
8554
8658
|
({ billing, defaultBilling = "monthly", onBillingChange, showBillingToggle = true, className, ...props }, ref) => {
|
|
8555
8659
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8556
|
-
return /* @__PURE__ */ (0,
|
|
8557
|
-
/* @__PURE__ */ (0,
|
|
8660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
8661
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8558
8662
|
PricingTableDesktop,
|
|
8559
8663
|
{
|
|
8560
8664
|
...props,
|
|
@@ -8563,7 +8667,7 @@ var PricingTable = React72.forwardRef(
|
|
|
8563
8667
|
showBillingToggle
|
|
8564
8668
|
}
|
|
8565
8669
|
) }),
|
|
8566
|
-
/* @__PURE__ */ (0,
|
|
8670
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8567
8671
|
PricingTableMobile,
|
|
8568
8672
|
{
|
|
8569
8673
|
...props,
|
|
@@ -8578,14 +8682,14 @@ var PricingTable = React72.forwardRef(
|
|
|
8578
8682
|
PricingTable.displayName = "PricingTable";
|
|
8579
8683
|
|
|
8580
8684
|
// virtual-pkg:src/atoms/ProductCardGrid/ProductCardGrid.tsx
|
|
8581
|
-
var
|
|
8582
|
-
var
|
|
8685
|
+
var React74 = __toESM(require("react"));
|
|
8686
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
8583
8687
|
var COLS = {
|
|
8584
8688
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
8585
8689
|
3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
|
|
8586
8690
|
4: "grid-cols-2 md:grid-cols-4"
|
|
8587
8691
|
};
|
|
8588
|
-
var ProductCardGrid =
|
|
8692
|
+
var ProductCardGrid = React74.forwardRef(
|
|
8589
8693
|
({
|
|
8590
8694
|
items,
|
|
8591
8695
|
columns = 3,
|
|
@@ -8597,19 +8701,19 @@ var ProductCardGrid = React73.forwardRef(
|
|
|
8597
8701
|
label = "Products",
|
|
8598
8702
|
className,
|
|
8599
8703
|
...rest
|
|
8600
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
8704
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8601
8705
|
"section",
|
|
8602
8706
|
{
|
|
8603
8707
|
ref,
|
|
8604
8708
|
"aria-label": label,
|
|
8605
8709
|
className: ["w-full", className].filter(Boolean).join(" "),
|
|
8606
8710
|
...rest,
|
|
8607
|
-
children: items.length === 0 ? /* @__PURE__ */ (0,
|
|
8608
|
-
/* @__PURE__ */ (0,
|
|
8609
|
-
/* @__PURE__ */ (0,
|
|
8610
|
-
emptyDescription ? /* @__PURE__ */ (0,
|
|
8611
|
-
onEmptyAction ? /* @__PURE__ */ (0,
|
|
8612
|
-
] }) : /* @__PURE__ */ (0,
|
|
8711
|
+
children: items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex w-full flex-col items-center justify-center gap-xs rounded-lg border border-dashed border-hairline-strong bg-canvas px-lg py-xl text-center", children: [
|
|
8712
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Icon, { name: emptyIcon, size: 24, className: "text-muted" }),
|
|
8713
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h3", { className: "mt-xs text-heading-sm text-ink", children: emptyTitle }),
|
|
8714
|
+
emptyDescription ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: "text-body-md text-muted", children: emptyDescription }) : null,
|
|
8715
|
+
onEmptyAction ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, { variant: "primary", className: "mt-sm", onClick: onEmptyAction, children: emptyActionLabel }) : null
|
|
8716
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("ul", { className: ["grid gap-gutter", COLS[columns]].join(" "), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("li", { className: "flex min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8613
8717
|
Card,
|
|
8614
8718
|
{
|
|
8615
8719
|
layout: "tile",
|
|
@@ -8618,7 +8722,7 @@ var ProductCardGrid = React73.forwardRef(
|
|
|
8618
8722
|
icon: item.icon ?? "box",
|
|
8619
8723
|
href: item.href,
|
|
8620
8724
|
linkLabel: `Open ${item.title}`,
|
|
8621
|
-
badge: item.badge ? /* @__PURE__ */ (0,
|
|
8725
|
+
badge: item.badge ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Badge, { tone: "primary", size: "md", children: item.badge }) : void 0
|
|
8622
8726
|
}
|
|
8623
8727
|
) }, item.id)) })
|
|
8624
8728
|
}
|
|
@@ -8627,14 +8731,14 @@ var ProductCardGrid = React73.forwardRef(
|
|
|
8627
8731
|
ProductCardGrid.displayName = "ProductCardGrid";
|
|
8628
8732
|
|
|
8629
8733
|
// virtual-pkg:src/atoms/Radio/Radio.tsx
|
|
8630
|
-
var
|
|
8631
|
-
var
|
|
8734
|
+
var React75 = __toESM(require("react"));
|
|
8735
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8632
8736
|
var cn55 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8633
8737
|
var RING2 = { sm: "h-3.5 w-3.5", md: "h-4 w-4" };
|
|
8634
8738
|
var DOT3 = { sm: "h-1.5 w-1.5", md: "h-2 w-2" };
|
|
8635
8739
|
var SWATCH = { sm: "h-5 w-5", md: "h-6 w-6" };
|
|
8636
8740
|
var TEXT3 = { sm: "text-body-sm", md: "text-body-md" };
|
|
8637
|
-
var Radio =
|
|
8741
|
+
var Radio = React75.forwardRef(
|
|
8638
8742
|
({
|
|
8639
8743
|
checked,
|
|
8640
8744
|
defaultChecked,
|
|
@@ -8652,18 +8756,18 @@ var Radio = React74.forwardRef(
|
|
|
8652
8756
|
"aria-label": ariaLabel,
|
|
8653
8757
|
...rest
|
|
8654
8758
|
}, ref) => {
|
|
8655
|
-
const autoId =
|
|
8759
|
+
const autoId = React75.useId();
|
|
8656
8760
|
const inputId = id ?? `radio-${autoId}`;
|
|
8657
8761
|
const descId = description ? `${inputId}-desc` : void 0;
|
|
8658
8762
|
const isControlled = checked !== void 0;
|
|
8659
|
-
const [inner, setInner] =
|
|
8763
|
+
const [inner, setInner] = React75.useState(Boolean(defaultChecked));
|
|
8660
8764
|
const on = isControlled ? Boolean(checked) : inner;
|
|
8661
8765
|
const handleChange = (e) => {
|
|
8662
8766
|
if (!isControlled) setInner(e.target.checked);
|
|
8663
8767
|
if (e.target.checked) onValueChange?.(String(value ?? ""));
|
|
8664
8768
|
onChange?.(e);
|
|
8665
8769
|
};
|
|
8666
|
-
const input = /* @__PURE__ */ (0,
|
|
8770
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8667
8771
|
"input",
|
|
8668
8772
|
{
|
|
8669
8773
|
ref,
|
|
@@ -8680,9 +8784,9 @@ var Radio = React74.forwardRef(
|
|
|
8680
8784
|
...rest
|
|
8681
8785
|
}
|
|
8682
8786
|
);
|
|
8683
|
-
const control = swatch ? /* @__PURE__ */ (0,
|
|
8787
|
+
const control = swatch ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: cn55("relative inline-flex", SWATCH[size]), children: [
|
|
8684
8788
|
input,
|
|
8685
|
-
/* @__PURE__ */ (0,
|
|
8789
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8686
8790
|
"span",
|
|
8687
8791
|
{
|
|
8688
8792
|
"aria-hidden": "true",
|
|
@@ -8694,9 +8798,9 @@ var Radio = React74.forwardRef(
|
|
|
8694
8798
|
)
|
|
8695
8799
|
}
|
|
8696
8800
|
)
|
|
8697
|
-
] }) : /* @__PURE__ */ (0,
|
|
8801
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: cn55("relative inline-flex", RING2[size]), children: [
|
|
8698
8802
|
input,
|
|
8699
|
-
/* @__PURE__ */ (0,
|
|
8803
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8700
8804
|
"span",
|
|
8701
8805
|
{
|
|
8702
8806
|
"aria-hidden": "true",
|
|
@@ -8706,7 +8810,7 @@ var Radio = React74.forwardRef(
|
|
|
8706
8810
|
on ? "border-primary" : invalid ? "border-semantic-error" : "border-hairline-strong group-hover:border-muted-soft",
|
|
8707
8811
|
disabled && !on && "bg-surface-soft border-hairline shadow-none"
|
|
8708
8812
|
),
|
|
8709
|
-
children: /* @__PURE__ */ (0,
|
|
8813
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8710
8814
|
"span",
|
|
8711
8815
|
{
|
|
8712
8816
|
className: cn55(
|
|
@@ -8719,7 +8823,7 @@ var Radio = React74.forwardRef(
|
|
|
8719
8823
|
}
|
|
8720
8824
|
)
|
|
8721
8825
|
] });
|
|
8722
|
-
return /* @__PURE__ */ (0,
|
|
8826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
8723
8827
|
"label",
|
|
8724
8828
|
{
|
|
8725
8829
|
htmlFor: inputId,
|
|
@@ -8729,7 +8833,7 @@ var Radio = React74.forwardRef(
|
|
|
8729
8833
|
className
|
|
8730
8834
|
),
|
|
8731
8835
|
children: [
|
|
8732
|
-
/* @__PURE__ */ (0,
|
|
8836
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8733
8837
|
"span",
|
|
8734
8838
|
{
|
|
8735
8839
|
className: cn55(
|
|
@@ -8740,9 +8844,9 @@ var Radio = React74.forwardRef(
|
|
|
8740
8844
|
children: control
|
|
8741
8845
|
}
|
|
8742
8846
|
),
|
|
8743
|
-
(label || description) && /* @__PURE__ */ (0,
|
|
8744
|
-
label && /* @__PURE__ */ (0,
|
|
8745
|
-
description && /* @__PURE__ */ (0,
|
|
8847
|
+
(label || description) && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "flex min-w-0 flex-col gap-xxs", children: [
|
|
8848
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: TEXT3[size], children: label }),
|
|
8849
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { id: descId, className: "text-body-sm text-muted", children: description })
|
|
8746
8850
|
] })
|
|
8747
8851
|
]
|
|
8748
8852
|
}
|
|
@@ -8752,20 +8856,20 @@ var Radio = React74.forwardRef(
|
|
|
8752
8856
|
Radio.displayName = "Radio";
|
|
8753
8857
|
|
|
8754
8858
|
// virtual-pkg:src/atoms/Rating/Rating.tsx
|
|
8755
|
-
var
|
|
8756
|
-
var
|
|
8859
|
+
var React76 = __toESM(require("react"));
|
|
8860
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8757
8861
|
var cn56 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8758
8862
|
var starPx = { sm: 14, md: 18 };
|
|
8759
8863
|
function Star({ fill, px }) {
|
|
8760
8864
|
const pct = Math.max(0, Math.min(1, fill)) * 100;
|
|
8761
|
-
return /* @__PURE__ */ (0,
|
|
8865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
8762
8866
|
"span",
|
|
8763
8867
|
{
|
|
8764
8868
|
className: "relative inline-flex shrink-0",
|
|
8765
8869
|
style: { width: px, height: px },
|
|
8766
8870
|
"aria-hidden": "true",
|
|
8767
8871
|
children: [
|
|
8768
|
-
/* @__PURE__ */ (0,
|
|
8872
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8769
8873
|
Icon,
|
|
8770
8874
|
{
|
|
8771
8875
|
name: "star",
|
|
@@ -8775,12 +8879,12 @@ function Star({ fill, px }) {
|
|
|
8775
8879
|
className: "text-hairline-strong"
|
|
8776
8880
|
}
|
|
8777
8881
|
),
|
|
8778
|
-
/* @__PURE__ */ (0,
|
|
8882
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8779
8883
|
"span",
|
|
8780
8884
|
{
|
|
8781
8885
|
className: "absolute inset-y-0 left-0 overflow-hidden transition-[width] duration-200 ease-out",
|
|
8782
8886
|
style: { width: `${pct}%` },
|
|
8783
|
-
children: /* @__PURE__ */ (0,
|
|
8887
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8784
8888
|
Icon,
|
|
8785
8889
|
{
|
|
8786
8890
|
name: "star",
|
|
@@ -8796,7 +8900,7 @@ function Star({ fill, px }) {
|
|
|
8796
8900
|
}
|
|
8797
8901
|
);
|
|
8798
8902
|
}
|
|
8799
|
-
var Rating =
|
|
8903
|
+
var Rating = React76.forwardRef(
|
|
8800
8904
|
({
|
|
8801
8905
|
value,
|
|
8802
8906
|
defaultValue = 0,
|
|
@@ -8811,8 +8915,8 @@ var Rating = React75.forwardRef(
|
|
|
8811
8915
|
className,
|
|
8812
8916
|
...rest
|
|
8813
8917
|
}, ref) => {
|
|
8814
|
-
const [inner, setInner] =
|
|
8815
|
-
const [hover, setHover] =
|
|
8918
|
+
const [inner, setInner] = React76.useState(defaultValue);
|
|
8919
|
+
const [hover, setHover] = React76.useState(null);
|
|
8816
8920
|
const current = value ?? inner;
|
|
8817
8921
|
const shown = hover ?? current;
|
|
8818
8922
|
const px = starPx[size];
|
|
@@ -8822,29 +8926,29 @@ var Rating = React75.forwardRef(
|
|
|
8822
8926
|
onChange?.(next);
|
|
8823
8927
|
};
|
|
8824
8928
|
const stars = Array.from({ length: max }, (_, i) => i + 1);
|
|
8825
|
-
return /* @__PURE__ */ (0,
|
|
8929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
8826
8930
|
"div",
|
|
8827
8931
|
{
|
|
8828
8932
|
ref,
|
|
8829
8933
|
className: cn56("inline-flex items-center gap-sm", className),
|
|
8830
8934
|
...rest,
|
|
8831
8935
|
children: [
|
|
8832
|
-
readOnly ? /* @__PURE__ */ (0,
|
|
8936
|
+
readOnly ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8833
8937
|
"span",
|
|
8834
8938
|
{
|
|
8835
8939
|
role: "img",
|
|
8836
8940
|
"aria-label": `${label}: ${current.toFixed(2)} out of ${max}`,
|
|
8837
8941
|
className: "inline-flex items-center gap-xs",
|
|
8838
|
-
children: stars.map((n) => /* @__PURE__ */ (0,
|
|
8942
|
+
children: stars.map((n) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Star, { fill: current - (n - 1), px }, n))
|
|
8839
8943
|
}
|
|
8840
|
-
) : /* @__PURE__ */ (0,
|
|
8944
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8841
8945
|
"div",
|
|
8842
8946
|
{
|
|
8843
8947
|
role: "radiogroup",
|
|
8844
8948
|
"aria-label": label,
|
|
8845
8949
|
className: "inline-flex items-center",
|
|
8846
8950
|
onMouseLeave: () => setHover(null),
|
|
8847
|
-
children: stars.map((n) => /* @__PURE__ */ (0,
|
|
8951
|
+
children: stars.map((n) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8848
8952
|
Button,
|
|
8849
8953
|
{
|
|
8850
8954
|
variant: "ghost",
|
|
@@ -8858,15 +8962,15 @@ var Rating = React75.forwardRef(
|
|
|
8858
8962
|
onFocus: () => setHover(n),
|
|
8859
8963
|
onBlur: () => setHover(null),
|
|
8860
8964
|
onClick: () => pick(n),
|
|
8861
|
-
children: /* @__PURE__ */ (0,
|
|
8965
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Star, { fill: shown >= n ? 1 : 0, px })
|
|
8862
8966
|
},
|
|
8863
8967
|
n
|
|
8864
8968
|
))
|
|
8865
8969
|
}
|
|
8866
8970
|
),
|
|
8867
|
-
showValue && /* @__PURE__ */ (0,
|
|
8868
|
-
/* @__PURE__ */ (0,
|
|
8869
|
-
count !== void 0 && /* @__PURE__ */ (0,
|
|
8971
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "inline-flex items-baseline gap-xs text-body-md", children: [
|
|
8972
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "text-ink", children: current.toFixed(2) }),
|
|
8973
|
+
count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "text-muted", children: [
|
|
8870
8974
|
"(",
|
|
8871
8975
|
count,
|
|
8872
8976
|
")"
|
|
@@ -8880,10 +8984,10 @@ var Rating = React75.forwardRef(
|
|
|
8880
8984
|
Rating.displayName = "Rating";
|
|
8881
8985
|
|
|
8882
8986
|
// virtual-pkg:src/atoms/SearchBar/SearchBar.tsx
|
|
8883
|
-
var
|
|
8884
|
-
var
|
|
8987
|
+
var React77 = __toESM(require("react"));
|
|
8988
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8885
8989
|
var cn57 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8886
|
-
var SearchBar =
|
|
8990
|
+
var SearchBar = React77.forwardRef(
|
|
8887
8991
|
({
|
|
8888
8992
|
value,
|
|
8889
8993
|
defaultValue = "",
|
|
@@ -8901,14 +9005,14 @@ var SearchBar = React76.forwardRef(
|
|
|
8901
9005
|
"aria-label": ariaLabel = "Search",
|
|
8902
9006
|
...inputProps
|
|
8903
9007
|
}, ref) => {
|
|
8904
|
-
const [inner, setInner] =
|
|
9008
|
+
const [inner, setInner] = React77.useState(defaultValue);
|
|
8905
9009
|
const query = value ?? inner;
|
|
8906
9010
|
const setQuery = (next) => {
|
|
8907
9011
|
if (value === void 0) setInner(next);
|
|
8908
9012
|
onValueChange?.(next);
|
|
8909
9013
|
};
|
|
8910
9014
|
const showHint = typeof resultCount === "number" && query.length > 0;
|
|
8911
|
-
return /* @__PURE__ */ (0,
|
|
9015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
8912
9016
|
"form",
|
|
8913
9017
|
{
|
|
8914
9018
|
role: "search",
|
|
@@ -8918,7 +9022,7 @@ var SearchBar = React76.forwardRef(
|
|
|
8918
9022
|
onSearch?.(query);
|
|
8919
9023
|
},
|
|
8920
9024
|
children: [
|
|
8921
|
-
/* @__PURE__ */ (0,
|
|
9025
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8922
9026
|
Input,
|
|
8923
9027
|
{
|
|
8924
9028
|
ref,
|
|
@@ -8935,13 +9039,13 @@ var SearchBar = React76.forwardRef(
|
|
|
8935
9039
|
setQuery("");
|
|
8936
9040
|
}
|
|
8937
9041
|
},
|
|
8938
|
-
leading: /* @__PURE__ */ (0,
|
|
8939
|
-
trailing: clearable ? /* @__PURE__ */ (0,
|
|
9042
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon, { name: "search", size: 16 }),
|
|
9043
|
+
trailing: clearable ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8940
9044
|
"span",
|
|
8941
9045
|
{
|
|
8942
9046
|
"data-state": query ? "open" : "closed",
|
|
8943
9047
|
className: "inline-flex transition duration-150 ease-out data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
8944
|
-
children: /* @__PURE__ */ (0,
|
|
9048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8945
9049
|
IconButton,
|
|
8946
9050
|
{
|
|
8947
9051
|
type: "button",
|
|
@@ -8958,13 +9062,13 @@ var SearchBar = React76.forwardRef(
|
|
|
8958
9062
|
}
|
|
8959
9063
|
)
|
|
8960
9064
|
}
|
|
8961
|
-
) : /* @__PURE__ */ (0,
|
|
9065
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8962
9066
|
"span",
|
|
8963
9067
|
{
|
|
8964
9068
|
"data-state": showHint ? "open" : "closed",
|
|
8965
9069
|
"aria-live": "polite",
|
|
8966
9070
|
className: "transition duration-150 ease-out data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
8967
|
-
children: typeof resultCount === "number" ? /* @__PURE__ */ (0,
|
|
9071
|
+
children: typeof resultCount === "number" ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Badge, { tone: "neutral", size: "sm", children: [
|
|
8968
9072
|
resultCount,
|
|
8969
9073
|
" ",
|
|
8970
9074
|
resultCount === 1 ? "result" : "results"
|
|
@@ -8975,7 +9079,7 @@ var SearchBar = React76.forwardRef(
|
|
|
8975
9079
|
...inputProps
|
|
8976
9080
|
}
|
|
8977
9081
|
),
|
|
8978
|
-
actionLabel ? /* @__PURE__ */ (0,
|
|
9082
|
+
actionLabel ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Button, { type: "button", variant: "secondary", size, disabled, onClick: onAction, children: actionLabel }) : null
|
|
8979
9083
|
]
|
|
8980
9084
|
}
|
|
8981
9085
|
);
|
|
@@ -8984,16 +9088,16 @@ var SearchBar = React76.forwardRef(
|
|
|
8984
9088
|
SearchBar.displayName = "SearchBar";
|
|
8985
9089
|
|
|
8986
9090
|
// virtual-pkg:src/atoms/SearchResultsList/SearchResultsList.tsx
|
|
8987
|
-
var
|
|
9091
|
+
var React79 = __toESM(require("react"));
|
|
8988
9092
|
|
|
8989
9093
|
// virtual-pkg:src/atoms/Skeleton/Skeleton.tsx
|
|
8990
9094
|
var import_react4 = __toESM(require("react"));
|
|
8991
|
-
var
|
|
9095
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
8992
9096
|
function cn58(...parts) {
|
|
8993
9097
|
return parts.filter(Boolean).join(" ");
|
|
8994
9098
|
}
|
|
8995
9099
|
function Bone({ className, animated }) {
|
|
8996
|
-
return /* @__PURE__ */ (0,
|
|
9100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8997
9101
|
"span",
|
|
8998
9102
|
{
|
|
8999
9103
|
"aria-hidden": "true",
|
|
@@ -9004,9 +9108,9 @@ function Bone({ className, animated }) {
|
|
|
9004
9108
|
var Skeleton = import_react4.default.forwardRef(
|
|
9005
9109
|
({ variant = "block", lines = 3, animated = true, label = "Loading", className, ...rest }, ref) => {
|
|
9006
9110
|
const a11y = { role: "status", "aria-live": "polite", "aria-busy": true };
|
|
9007
|
-
const sr = /* @__PURE__ */ (0,
|
|
9111
|
+
const sr = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "sr-only", children: label });
|
|
9008
9112
|
if (variant === "card") {
|
|
9009
|
-
return /* @__PURE__ */ (0,
|
|
9113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
9010
9114
|
"div",
|
|
9011
9115
|
{
|
|
9012
9116
|
ref,
|
|
@@ -9017,10 +9121,10 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9017
9121
|
),
|
|
9018
9122
|
...rest,
|
|
9019
9123
|
children: [
|
|
9020
|
-
/* @__PURE__ */ (0,
|
|
9021
|
-
/* @__PURE__ */ (0,
|
|
9022
|
-
/* @__PURE__ */ (0,
|
|
9023
|
-
/* @__PURE__ */ (0,
|
|
9124
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Bone, { animated, className: "size-14 shrink-0 rounded-md" }),
|
|
9125
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-sm", children: [
|
|
9126
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Bone, { animated, className: "h-3 w-full rounded-xs" }),
|
|
9127
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Bone, { animated, className: "h-3 w-1/2 rounded-xs" })
|
|
9024
9128
|
] }),
|
|
9025
9129
|
sr
|
|
9026
9130
|
]
|
|
@@ -9028,19 +9132,19 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9028
9132
|
);
|
|
9029
9133
|
}
|
|
9030
9134
|
if (variant === "list-row") {
|
|
9031
|
-
return /* @__PURE__ */ (0,
|
|
9032
|
-
/* @__PURE__ */ (0,
|
|
9033
|
-
/* @__PURE__ */ (0,
|
|
9034
|
-
/* @__PURE__ */ (0,
|
|
9035
|
-
/* @__PURE__ */ (0,
|
|
9135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { ref, ...a11y, className: cn58("flex w-full items-center gap-md py-xs", className), ...rest, children: [
|
|
9136
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Bone, { animated, className: "size-8 shrink-0 rounded-sm" }),
|
|
9137
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-sm", children: [
|
|
9138
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Bone, { animated, className: "h-2.5 w-full rounded-xs" }),
|
|
9139
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Bone, { animated, className: "h-2.5 w-3/5 rounded-xs" })
|
|
9036
9140
|
] }),
|
|
9037
9141
|
sr
|
|
9038
9142
|
] });
|
|
9039
9143
|
}
|
|
9040
9144
|
if (variant === "paragraph") {
|
|
9041
9145
|
const count = Math.max(1, lines);
|
|
9042
|
-
return /* @__PURE__ */ (0,
|
|
9043
|
-
Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0,
|
|
9146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { ref, ...a11y, className: cn58("flex w-full flex-col gap-sm", className), ...rest, children: [
|
|
9147
|
+
Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9044
9148
|
Bone,
|
|
9045
9149
|
{
|
|
9046
9150
|
animated,
|
|
@@ -9053,7 +9157,7 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9053
9157
|
}
|
|
9054
9158
|
const has = (prefix) => Boolean(className && prefix.test(className));
|
|
9055
9159
|
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");
|
|
9056
|
-
return /* @__PURE__ */ (0,
|
|
9160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9057
9161
|
"div",
|
|
9058
9162
|
{
|
|
9059
9163
|
ref,
|
|
@@ -9068,7 +9172,7 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9068
9172
|
Skeleton.displayName = "Skeleton";
|
|
9069
9173
|
|
|
9070
9174
|
// virtual-pkg:src/atoms/SearchResultsList/SearchResultsList.tsx
|
|
9071
|
-
var
|
|
9175
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
9072
9176
|
var DEFAULT_SCOPES = [
|
|
9073
9177
|
{ value: "all", label: "All" },
|
|
9074
9178
|
{ value: "issues", label: "Issues" },
|
|
@@ -9076,7 +9180,7 @@ var DEFAULT_SCOPES = [
|
|
|
9076
9180
|
{ value: "documents", label: "Documents" }
|
|
9077
9181
|
];
|
|
9078
9182
|
var cn59 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9079
|
-
var SearchResultsList =
|
|
9183
|
+
var SearchResultsList = React79.forwardRef(
|
|
9080
9184
|
({
|
|
9081
9185
|
query,
|
|
9082
9186
|
onQueryChange,
|
|
@@ -9094,7 +9198,7 @@ var SearchResultsList = React78.forwardRef(
|
|
|
9094
9198
|
}, ref) => {
|
|
9095
9199
|
const showEmpty = !loading && results.length === 0;
|
|
9096
9200
|
const resolvedEmptyDescription = emptyDescription ?? (query ? `Nothing matches \u201C${query}\u201D. Try a different term or scope.` : "Type to search.");
|
|
9097
|
-
return /* @__PURE__ */ (0,
|
|
9201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
9098
9202
|
"div",
|
|
9099
9203
|
{
|
|
9100
9204
|
ref,
|
|
@@ -9104,8 +9208,8 @@ var SearchResultsList = React78.forwardRef(
|
|
|
9104
9208
|
),
|
|
9105
9209
|
...rest,
|
|
9106
9210
|
children: [
|
|
9107
|
-
/* @__PURE__ */ (0,
|
|
9108
|
-
/* @__PURE__ */ (0,
|
|
9211
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex min-w-0 flex-wrap items-center gap-sm px-base py-md", children: [
|
|
9212
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "min-w-0 flex-1 basis-56", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9109
9213
|
SearchBar,
|
|
9110
9214
|
{
|
|
9111
9215
|
value: query,
|
|
@@ -9116,7 +9220,7 @@ var SearchResultsList = React78.forwardRef(
|
|
|
9116
9220
|
"aria-label": "Search"
|
|
9117
9221
|
}
|
|
9118
9222
|
) }),
|
|
9119
|
-
/* @__PURE__ */ (0,
|
|
9223
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { role: "group", "aria-label": "Search scope", className: "flex shrink-0 flex-wrap items-center gap-xs", children: scopes.map((s) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9120
9224
|
Chip,
|
|
9121
9225
|
{
|
|
9122
9226
|
selected: s.value === scope,
|
|
@@ -9126,30 +9230,30 @@ var SearchResultsList = React78.forwardRef(
|
|
|
9126
9230
|
s.value
|
|
9127
9231
|
)) })
|
|
9128
9232
|
] }),
|
|
9129
|
-
/* @__PURE__ */ (0,
|
|
9130
|
-
[0, 1, 2].map((i) => /* @__PURE__ */ (0,
|
|
9131
|
-
/* @__PURE__ */ (0,
|
|
9132
|
-
/* @__PURE__ */ (0,
|
|
9133
|
-
/* @__PURE__ */ (0,
|
|
9134
|
-
/* @__PURE__ */ (0,
|
|
9233
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { "aria-live": "polite", "aria-busy": loading || void 0, className: "min-h-40 px-sm pb-sm", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col gap-xs", children: [
|
|
9234
|
+
[0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex items-center gap-md px-base py-sm", children: [
|
|
9235
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Spinner, { size: "sm", tone: "current", className: "text-muted-soft" }),
|
|
9236
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xs", children: [
|
|
9237
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Skeleton, { variant: "text", className: "w-3/5" }),
|
|
9238
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Skeleton, { variant: "text", className: "w-2/5" })
|
|
9135
9239
|
] })
|
|
9136
9240
|
] }, i)),
|
|
9137
|
-
/* @__PURE__ */ (0,
|
|
9138
|
-
] }) : showEmpty ? /* @__PURE__ */ (0,
|
|
9139
|
-
/* @__PURE__ */ (0,
|
|
9140
|
-
/* @__PURE__ */ (0,
|
|
9141
|
-
/* @__PURE__ */ (0,
|
|
9142
|
-
] }) : /* @__PURE__ */ (0,
|
|
9241
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: "Searching\u2026" })
|
|
9242
|
+
] }) : showEmpty ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col items-center justify-center gap-xs px-base py-xl text-center", children: [
|
|
9243
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon, { name: "search", size: 36, strokeWidth: 1.5, className: "text-muted-soft" }),
|
|
9244
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "mt-sm text-heading-sm text-ink", children: emptyTitle }),
|
|
9245
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-body-sm text-muted", children: resolvedEmptyDescription })
|
|
9246
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("ul", { className: "flex flex-col", "aria-label": "Search results", children: results.map((r) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9143
9247
|
ListItem,
|
|
9144
9248
|
{
|
|
9145
9249
|
variant: "plain",
|
|
9146
9250
|
href: r.href,
|
|
9147
9251
|
onClick: () => onResultClick?.(r),
|
|
9148
|
-
leading: /* @__PURE__ */ (0,
|
|
9252
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon, { name: r.icon, size: 18, className: cn59("shrink-0", r.iconClassName ?? "text-muted") }),
|
|
9149
9253
|
trailing: null,
|
|
9150
|
-
title: /* @__PURE__ */ (0,
|
|
9151
|
-
/* @__PURE__ */ (0,
|
|
9152
|
-
/* @__PURE__ */ (0,
|
|
9254
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
9255
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "block truncate text-body-sm text-muted", children: r.type }),
|
|
9256
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "block truncate", children: r.title })
|
|
9153
9257
|
] })
|
|
9154
9258
|
}
|
|
9155
9259
|
) }, r.id)) }) })
|
|
@@ -9161,8 +9265,8 @@ var SearchResultsList = React78.forwardRef(
|
|
|
9161
9265
|
SearchResultsList.displayName = "SearchResultsList";
|
|
9162
9266
|
|
|
9163
9267
|
// virtual-pkg:src/atoms/SegmentedControl/SegmentedControl.tsx
|
|
9164
|
-
var
|
|
9165
|
-
var
|
|
9268
|
+
var React80 = __toESM(require("react"));
|
|
9269
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
9166
9270
|
var cn60 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9167
9271
|
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";
|
|
9168
9272
|
var frame = {
|
|
@@ -9173,13 +9277,13 @@ var pillRadius = {
|
|
|
9173
9277
|
sm: "rounded-sm",
|
|
9174
9278
|
md: "rounded-md"
|
|
9175
9279
|
};
|
|
9176
|
-
var SegmentedControl =
|
|
9280
|
+
var SegmentedControl = React80.forwardRef(
|
|
9177
9281
|
({ items, value, onValueChange, size = "sm", bare = false, className, ...rest }, ref) => {
|
|
9178
|
-
const trackRef =
|
|
9179
|
-
const itemRefs =
|
|
9180
|
-
const [pill, setPill] =
|
|
9282
|
+
const trackRef = React80.useRef(null);
|
|
9283
|
+
const itemRefs = React80.useRef({});
|
|
9284
|
+
const [pill, setPill] = React80.useState(null);
|
|
9181
9285
|
const valueKey = items.map((item) => item.value).join("|");
|
|
9182
|
-
|
|
9286
|
+
React80.useLayoutEffect(() => {
|
|
9183
9287
|
const el = value !== void 0 ? itemRefs.current[value] : null;
|
|
9184
9288
|
if (!el) {
|
|
9185
9289
|
setPill(null);
|
|
@@ -9209,7 +9313,7 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9209
9313
|
onValueChange(next.value);
|
|
9210
9314
|
itemRefs.current[next.value]?.focus();
|
|
9211
9315
|
};
|
|
9212
|
-
return /* @__PURE__ */ (0,
|
|
9316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { ref, className: cn60("w-full", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
9213
9317
|
"div",
|
|
9214
9318
|
{
|
|
9215
9319
|
ref: trackRef,
|
|
@@ -9223,7 +9327,7 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9223
9327
|
"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
9224
9328
|
),
|
|
9225
9329
|
children: [
|
|
9226
|
-
!bare ? /* @__PURE__ */ (0,
|
|
9330
|
+
!bare ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9227
9331
|
"span",
|
|
9228
9332
|
{
|
|
9229
9333
|
"aria-hidden": "true",
|
|
@@ -9238,7 +9342,7 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9238
9342
|
const active = item.value === value;
|
|
9239
9343
|
const iconOnly = Boolean(item.icon) && item.label == null;
|
|
9240
9344
|
const glyphSize3 = size === "sm" ? 14 : 16;
|
|
9241
|
-
return /* @__PURE__ */ (0,
|
|
9345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9242
9346
|
Button,
|
|
9243
9347
|
{
|
|
9244
9348
|
ref: (el) => {
|
|
@@ -9255,17 +9359,17 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9255
9359
|
disabled: item.disabled,
|
|
9256
9360
|
onClick: () => onValueChange(item.value),
|
|
9257
9361
|
className: segmentInteraction,
|
|
9258
|
-
children: iconOnly ? /* @__PURE__ */ (0,
|
|
9259
|
-
item.dotClassName ? /* @__PURE__ */ (0,
|
|
9362
|
+
children: iconOnly ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon, { name: item.icon, size: glyphSize3 }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9363
|
+
item.dotClassName ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9260
9364
|
"span",
|
|
9261
9365
|
{
|
|
9262
9366
|
"aria-hidden": "true",
|
|
9263
9367
|
className: cn60("h-2 w-2 shrink-0 rounded-full", item.dotClassName)
|
|
9264
9368
|
}
|
|
9265
9369
|
) : null,
|
|
9266
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
9267
|
-
/* @__PURE__ */ (0,
|
|
9268
|
-
item.count !== void 0 ? /* @__PURE__ */ (0,
|
|
9370
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon, { name: item.icon, size: glyphSize3 }) : null,
|
|
9371
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "truncate", children: item.label }),
|
|
9372
|
+
item.count !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9269
9373
|
Badge,
|
|
9270
9374
|
{
|
|
9271
9375
|
size: "sm",
|
|
@@ -9288,15 +9392,15 @@ var SegmentedControl = React79.forwardRef(
|
|
|
9288
9392
|
SegmentedControl.displayName = "SegmentedControl";
|
|
9289
9393
|
|
|
9290
9394
|
// virtual-pkg:src/atoms/Sidebar/Sidebar.tsx
|
|
9291
|
-
var
|
|
9395
|
+
var React84 = __toESM(require("react"));
|
|
9292
9396
|
|
|
9293
9397
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
9294
|
-
var
|
|
9398
|
+
var React82 = __toESM(require("react"));
|
|
9295
9399
|
|
|
9296
9400
|
// virtual-pkg:src/atoms/Tooltip/Tooltip.tsx
|
|
9297
9401
|
var import_react5 = __toESM(require("react"));
|
|
9298
9402
|
var import_react_dom9 = require("react-dom");
|
|
9299
|
-
var
|
|
9403
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
9300
9404
|
function cn61(...parts) {
|
|
9301
9405
|
return parts.filter(Boolean).join(" ");
|
|
9302
9406
|
}
|
|
@@ -9386,7 +9490,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9386
9490
|
const trigger = import_react5.default.cloneElement(children, {
|
|
9387
9491
|
"aria-describedby": open ? id : void 0
|
|
9388
9492
|
});
|
|
9389
|
-
const panel = /* @__PURE__ */ (0,
|
|
9493
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9390
9494
|
"div",
|
|
9391
9495
|
{
|
|
9392
9496
|
style: {
|
|
@@ -9397,7 +9501,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9397
9501
|
zIndex: "var(--z-tooltip, 1500)",
|
|
9398
9502
|
pointerEvents: "none"
|
|
9399
9503
|
},
|
|
9400
|
-
children: /* @__PURE__ */ (0,
|
|
9504
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
9401
9505
|
"div",
|
|
9402
9506
|
{
|
|
9403
9507
|
id,
|
|
@@ -9411,7 +9515,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9411
9515
|
),
|
|
9412
9516
|
children: [
|
|
9413
9517
|
content,
|
|
9414
|
-
variant === "default" && shortcut && shortcut.length > 0 ? /* @__PURE__ */ (0,
|
|
9518
|
+
variant === "default" && shortcut && shortcut.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "flex items-center gap-xxs", children: shortcut.map((key) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9415
9519
|
"kbd",
|
|
9416
9520
|
{
|
|
9417
9521
|
className: "inline-flex min-w-5 items-center justify-center rounded-xs bg-inverse-ink/15 px-xs text-caption text-inverse-ink",
|
|
@@ -9419,7 +9523,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9419
9523
|
},
|
|
9420
9524
|
key
|
|
9421
9525
|
)) }) : null,
|
|
9422
|
-
variant === "default" ? /* @__PURE__ */ (0,
|
|
9526
|
+
variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9423
9527
|
"span",
|
|
9424
9528
|
{
|
|
9425
9529
|
"aria-hidden": "true",
|
|
@@ -9431,7 +9535,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9431
9535
|
)
|
|
9432
9536
|
}
|
|
9433
9537
|
);
|
|
9434
|
-
return /* @__PURE__ */ (0,
|
|
9538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
9435
9539
|
"span",
|
|
9436
9540
|
{
|
|
9437
9541
|
ref: setRefs,
|
|
@@ -9454,11 +9558,11 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9454
9558
|
Tooltip.displayName = "Tooltip";
|
|
9455
9559
|
|
|
9456
9560
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
9457
|
-
var
|
|
9561
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
9458
9562
|
var cn62 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9459
9563
|
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";
|
|
9460
9564
|
var hasBadge = (badge) => badge !== void 0 && badge !== null && badge !== false;
|
|
9461
|
-
var SidebarDesktop =
|
|
9565
|
+
var SidebarDesktop = React82.forwardRef(
|
|
9462
9566
|
({
|
|
9463
9567
|
brandName = "Linear",
|
|
9464
9568
|
brandHref = "#",
|
|
@@ -9483,15 +9587,15 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9483
9587
|
children,
|
|
9484
9588
|
...rest
|
|
9485
9589
|
}, ref) => {
|
|
9486
|
-
const baseId =
|
|
9487
|
-
const [innerCollapsed, setInnerCollapsed] =
|
|
9590
|
+
const baseId = React82.useId();
|
|
9591
|
+
const [innerCollapsed, setInnerCollapsed] = React82.useState(defaultCollapsed);
|
|
9488
9592
|
const collapsed = collapsedProp ?? innerCollapsed;
|
|
9489
9593
|
const toggle = () => {
|
|
9490
9594
|
const next = !collapsed;
|
|
9491
9595
|
if (collapsedProp === void 0) setInnerCollapsed(next);
|
|
9492
9596
|
onCollapsedChange?.(next);
|
|
9493
9597
|
};
|
|
9494
|
-
const [expanded, setExpanded] =
|
|
9598
|
+
const [expanded, setExpanded] = React82.useState(
|
|
9495
9599
|
() => new Set(
|
|
9496
9600
|
defaultExpanded ?? sections.filter((s) => s.label).map((s) => s.id)
|
|
9497
9601
|
)
|
|
@@ -9507,9 +9611,9 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9507
9611
|
const showSettingsAction = onSettingsClick !== void 0;
|
|
9508
9612
|
const showFooterActions = showHelpAction || showSettingsAction;
|
|
9509
9613
|
const showFooterRow = showFooter && (Boolean(userName) || showFooterActions);
|
|
9510
|
-
const renderIcon = (link) => link.icon ? /* @__PURE__ */ (0,
|
|
9511
|
-
/* @__PURE__ */ (0,
|
|
9512
|
-
collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
9614
|
+
const renderIcon = (link) => link.icon ? /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: [
|
|
9615
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }),
|
|
9616
|
+
collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9513
9617
|
"span",
|
|
9514
9618
|
{
|
|
9515
9619
|
"aria-hidden": "true",
|
|
@@ -9519,7 +9623,7 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9519
9623
|
] }) : null;
|
|
9520
9624
|
const renderLink = (link, nested = false) => {
|
|
9521
9625
|
const current = link.id === activeId;
|
|
9522
|
-
const anchor = /* @__PURE__ */ (0,
|
|
9626
|
+
const anchor = /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9523
9627
|
"a",
|
|
9524
9628
|
{
|
|
9525
9629
|
href: link.href ?? `#${link.id}`,
|
|
@@ -9533,20 +9637,20 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9533
9637
|
),
|
|
9534
9638
|
children: [
|
|
9535
9639
|
renderIcon(link),
|
|
9536
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
9537
|
-
!collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
9640
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "min-w-0 flex-1 truncate", children: link.label }),
|
|
9641
|
+
!collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge })
|
|
9538
9642
|
]
|
|
9539
9643
|
}
|
|
9540
9644
|
);
|
|
9541
|
-
return /* @__PURE__ */ (0,
|
|
9645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("li", { className: collapsed ? "flex justify-center" : void 0, children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Tooltip, { content: link.label, placement: "right", children: anchor }) : anchor }, link.id);
|
|
9542
9646
|
};
|
|
9543
9647
|
const renderGroup = (link) => {
|
|
9544
9648
|
const open = isOpen(link.id);
|
|
9545
9649
|
const panelId = `${baseId}-${link.id}`;
|
|
9546
9650
|
const kids = link.children ?? [];
|
|
9547
9651
|
if (collapsed) {
|
|
9548
|
-
return /* @__PURE__ */ (0,
|
|
9549
|
-
/* @__PURE__ */ (0,
|
|
9652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(React82.Fragment, { children: [
|
|
9653
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("li", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Tooltip, { content: link.label, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9550
9654
|
IconButton,
|
|
9551
9655
|
{
|
|
9552
9656
|
icon: link.icon ?? "box",
|
|
@@ -9561,8 +9665,8 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9561
9665
|
open && kids.map((k) => renderLink(k))
|
|
9562
9666
|
] }, link.id);
|
|
9563
9667
|
}
|
|
9564
|
-
return /* @__PURE__ */ (0,
|
|
9565
|
-
/* @__PURE__ */ (0,
|
|
9668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("li", { children: [
|
|
9669
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9566
9670
|
Button,
|
|
9567
9671
|
{
|
|
9568
9672
|
variant: "item",
|
|
@@ -9570,12 +9674,12 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9570
9674
|
"aria-expanded": open,
|
|
9571
9675
|
"aria-controls": panelId,
|
|
9572
9676
|
onClick: () => flip(link.id),
|
|
9573
|
-
leadingIcon: link.icon ? /* @__PURE__ */ (0,
|
|
9677
|
+
leadingIcon: link.icon ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }) : void 0,
|
|
9574
9678
|
className: "px-sm",
|
|
9575
|
-
children: /* @__PURE__ */ (0,
|
|
9576
|
-
/* @__PURE__ */ (0,
|
|
9577
|
-
hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
9578
|
-
/* @__PURE__ */ (0,
|
|
9679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9680
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "truncate", children: link.label }),
|
|
9681
|
+
hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge }),
|
|
9682
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9579
9683
|
Icon,
|
|
9580
9684
|
{
|
|
9581
9685
|
name: "chevron-down",
|
|
@@ -9586,21 +9690,21 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9586
9690
|
] })
|
|
9587
9691
|
}
|
|
9588
9692
|
),
|
|
9589
|
-
/* @__PURE__ */ (0,
|
|
9693
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9590
9694
|
"div",
|
|
9591
9695
|
{
|
|
9592
9696
|
id: panelId,
|
|
9593
9697
|
"data-state": open ? "open" : "closed",
|
|
9594
9698
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9595
|
-
children: /* @__PURE__ */ (0,
|
|
9699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden pt-xxs", children: kids.map((k) => renderLink(k, true)) })
|
|
9596
9700
|
}
|
|
9597
9701
|
)
|
|
9598
9702
|
] }, link.id);
|
|
9599
9703
|
};
|
|
9600
9704
|
const renderItem = (link) => link.children?.length ? renderGroup(link) : renderLink(link);
|
|
9601
9705
|
const showWorkspaceRow = Boolean(workspaceName) || !collapsed && headerActions != null;
|
|
9602
|
-
return /* @__PURE__ */ (0,
|
|
9603
|
-
/* @__PURE__ */ (0,
|
|
9706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { ref, className: cn62("flex h-full w-full min-h-0 bg-canvas text-ink", className), ...rest, children: [
|
|
9707
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9604
9708
|
"aside",
|
|
9605
9709
|
{
|
|
9606
9710
|
"aria-label": "Sidebar",
|
|
@@ -9608,11 +9712,11 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9608
9712
|
style: { width: collapsed ? 64 : 256 },
|
|
9609
9713
|
className: "flex h-full shrink-0 flex-col overflow-hidden border-r border-hairline bg-surface transition-[width] duration-200 ease-out",
|
|
9610
9714
|
children: [
|
|
9611
|
-
collapsed ? /* @__PURE__ */ (0,
|
|
9612
|
-
/* @__PURE__ */ (0,
|
|
9613
|
-
/* @__PURE__ */ (0,
|
|
9715
|
+
collapsed ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex shrink-0 justify-center pb-sm pt-md", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconButton, { icon: "panel-right", variant: "secondary", "aria-label": "Expand sidebar", "aria-expanded": false, onClick: toggle }) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex shrink-0 items-center justify-between gap-sm pb-sm pl-base pr-md pt-md", children: [
|
|
9716
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
9717
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconButton, { icon: "panel-left", variant: "secondary", "aria-label": "Collapse sidebar", "aria-expanded": true, onClick: toggle })
|
|
9614
9718
|
] }),
|
|
9615
|
-
showWorkspaceRow && /* @__PURE__ */ (0,
|
|
9719
|
+
showWorkspaceRow && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9616
9720
|
"div",
|
|
9617
9721
|
{
|
|
9618
9722
|
className: cn62(
|
|
@@ -9620,26 +9724,26 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9620
9724
|
collapsed ? "flex justify-center" : "flex items-center gap-xxs px-sm"
|
|
9621
9725
|
),
|
|
9622
9726
|
children: [
|
|
9623
|
-
workspaceName ? collapsed ? /* @__PURE__ */ (0,
|
|
9727
|
+
workspaceName ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Tooltip, { content: workspaceName, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Button, { variant: "ghost", iconOnly: true, "aria-label": workspaceName, onClick: onWorkspaceClick, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9624
9728
|
Button,
|
|
9625
9729
|
{
|
|
9626
9730
|
variant: "ghost",
|
|
9627
9731
|
onClick: onWorkspaceClick,
|
|
9628
9732
|
className: "min-w-0 flex-1 justify-start px-sm",
|
|
9629
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
9630
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
9631
|
-
children: /* @__PURE__ */ (0,
|
|
9733
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }),
|
|
9734
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon, { name: "chevron-down", size: 14, className: "text-muted" }),
|
|
9735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "min-w-0 truncate text-ink", children: workspaceName })
|
|
9632
9736
|
}
|
|
9633
|
-
) : /* @__PURE__ */ (0,
|
|
9634
|
-
!collapsed && headerActions != null && /* @__PURE__ */ (0,
|
|
9737
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "min-w-0 flex-1" }),
|
|
9738
|
+
!collapsed && headerActions != null && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex shrink-0 items-center gap-xxs", children: headerActions })
|
|
9635
9739
|
]
|
|
9636
9740
|
}
|
|
9637
9741
|
),
|
|
9638
|
-
/* @__PURE__ */ (0,
|
|
9742
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("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) => {
|
|
9639
9743
|
const sectionOpen = !section.label || isOpen(section.id);
|
|
9640
9744
|
const listId = `${baseId}-section-${section.id}`;
|
|
9641
|
-
return /* @__PURE__ */ (0,
|
|
9642
|
-
section.label && !collapsed && /* @__PURE__ */ (0,
|
|
9745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: i > 0 ? "mt-base" : void 0, children: [
|
|
9746
|
+
section.label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9643
9747
|
Button,
|
|
9644
9748
|
{
|
|
9645
9749
|
variant: "item",
|
|
@@ -9648,9 +9752,9 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9648
9752
|
"aria-controls": listId,
|
|
9649
9753
|
onClick: () => flip(section.id),
|
|
9650
9754
|
className: "px-sm",
|
|
9651
|
-
children: /* @__PURE__ */ (0,
|
|
9755
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "inline-flex items-center gap-xs text-muted", children: [
|
|
9652
9756
|
section.label,
|
|
9653
|
-
/* @__PURE__ */ (0,
|
|
9757
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9654
9758
|
Icon,
|
|
9655
9759
|
{
|
|
9656
9760
|
name: "chevron-down",
|
|
@@ -9661,29 +9765,29 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9661
9765
|
] })
|
|
9662
9766
|
}
|
|
9663
9767
|
),
|
|
9664
|
-
/* @__PURE__ */ (0,
|
|
9768
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9665
9769
|
"div",
|
|
9666
9770
|
{
|
|
9667
9771
|
id: listId,
|
|
9668
9772
|
"data-state": sectionOpen || collapsed ? "open" : "closed",
|
|
9669
9773
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9670
|
-
children: /* @__PURE__ */ (0,
|
|
9774
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden", children: section.items.map(renderItem) })
|
|
9671
9775
|
}
|
|
9672
9776
|
)
|
|
9673
9777
|
] }, section.id);
|
|
9674
9778
|
}) }),
|
|
9675
|
-
announcement && !collapsed && /* @__PURE__ */ (0,
|
|
9779
|
+
announcement && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "shrink-0 px-sm pb-sm", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9676
9780
|
"a",
|
|
9677
9781
|
{
|
|
9678
9782
|
href: announcement.href ?? "#",
|
|
9679
9783
|
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",
|
|
9680
9784
|
children: [
|
|
9681
|
-
/* @__PURE__ */ (0,
|
|
9682
|
-
/* @__PURE__ */ (0,
|
|
9785
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "text-caption text-muted", children: announcement.eyebrow }),
|
|
9786
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "text-body-sm text-ink", children: announcement.title })
|
|
9683
9787
|
]
|
|
9684
9788
|
}
|
|
9685
9789
|
) }),
|
|
9686
|
-
showFooterRow && /* @__PURE__ */ (0,
|
|
9790
|
+
showFooterRow && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9687
9791
|
"div",
|
|
9688
9792
|
{
|
|
9689
9793
|
className: cn62(
|
|
@@ -9691,9 +9795,9 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9691
9795
|
collapsed ? "flex-col items-center gap-xs" : "items-center justify-between px-md"
|
|
9692
9796
|
),
|
|
9693
9797
|
children: [
|
|
9694
|
-
userName && /* @__PURE__ */ (0,
|
|
9695
|
-
showFooterActions && /* @__PURE__ */ (0,
|
|
9696
|
-
showHelpAction && /* @__PURE__ */ (0,
|
|
9798
|
+
userName && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }),
|
|
9799
|
+
showFooterActions && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: cn62("flex items-center gap-xxs", collapsed && "flex-col"), children: [
|
|
9800
|
+
showHelpAction && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9697
9801
|
IconButton,
|
|
9698
9802
|
{
|
|
9699
9803
|
icon: "message-circle",
|
|
@@ -9702,7 +9806,7 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9702
9806
|
onClick: onHelpClick
|
|
9703
9807
|
}
|
|
9704
9808
|
),
|
|
9705
|
-
showSettingsAction && /* @__PURE__ */ (0,
|
|
9809
|
+
showSettingsAction && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(IconButton, { icon: "settings", variant: "ghost", "aria-label": "Settings", onClick: onSettingsClick })
|
|
9706
9810
|
] })
|
|
9707
9811
|
]
|
|
9708
9812
|
}
|
|
@@ -9710,19 +9814,19 @@ var SidebarDesktop = React81.forwardRef(
|
|
|
9710
9814
|
]
|
|
9711
9815
|
}
|
|
9712
9816
|
),
|
|
9713
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
9817
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "min-w-0 flex-1 overflow-auto", children })
|
|
9714
9818
|
] });
|
|
9715
9819
|
}
|
|
9716
9820
|
);
|
|
9717
9821
|
SidebarDesktop.displayName = "SidebarDesktop";
|
|
9718
9822
|
|
|
9719
9823
|
// virtual-pkg:src/atoms/SidebarMobile/SidebarMobile.tsx
|
|
9720
|
-
var
|
|
9721
|
-
var
|
|
9824
|
+
var React83 = __toESM(require("react"));
|
|
9825
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
9722
9826
|
var cn63 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9723
9827
|
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";
|
|
9724
9828
|
var hasBadge2 = (badge) => badge !== void 0 && badge !== null && badge !== false;
|
|
9725
|
-
var SidebarMobile =
|
|
9829
|
+
var SidebarMobile = React83.forwardRef(
|
|
9726
9830
|
({
|
|
9727
9831
|
brandName = "Linear",
|
|
9728
9832
|
brandHref = "#",
|
|
@@ -9747,17 +9851,17 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9747
9851
|
children,
|
|
9748
9852
|
...rest
|
|
9749
9853
|
}, ref) => {
|
|
9750
|
-
const baseId =
|
|
9751
|
-
const [innerOpen, setInnerOpen] =
|
|
9854
|
+
const baseId = React83.useId();
|
|
9855
|
+
const [innerOpen, setInnerOpen] = React83.useState(defaultOpen);
|
|
9752
9856
|
const open = openProp ?? innerOpen;
|
|
9753
|
-
const setOpen =
|
|
9857
|
+
const setOpen = React83.useCallback(
|
|
9754
9858
|
(next) => {
|
|
9755
9859
|
if (openProp === void 0) setInnerOpen(next);
|
|
9756
9860
|
onOpenChange?.(next);
|
|
9757
9861
|
},
|
|
9758
9862
|
[openProp, onOpenChange]
|
|
9759
9863
|
);
|
|
9760
|
-
const [expanded, setExpanded] =
|
|
9864
|
+
const [expanded, setExpanded] = React83.useState(
|
|
9761
9865
|
() => new Set(defaultExpanded ?? sections.filter((s) => s.label).map((s) => s.id))
|
|
9762
9866
|
);
|
|
9763
9867
|
const flip = (id) => setExpanded((prev) => {
|
|
@@ -9772,7 +9876,7 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9772
9876
|
const showFooterRow = showFooter && (Boolean(userName) || showFooterActions);
|
|
9773
9877
|
const renderLink = (link, nested = false) => {
|
|
9774
9878
|
const current = link.id === activeId;
|
|
9775
|
-
return /* @__PURE__ */ (0,
|
|
9879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9776
9880
|
"a",
|
|
9777
9881
|
{
|
|
9778
9882
|
href: link.href ?? `#${link.id}`,
|
|
@@ -9787,9 +9891,9 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9787
9891
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
9788
9892
|
),
|
|
9789
9893
|
children: [
|
|
9790
|
-
link.icon && /* @__PURE__ */ (0,
|
|
9791
|
-
/* @__PURE__ */ (0,
|
|
9792
|
-
hasBadge2(link.badge) && /* @__PURE__ */ (0,
|
|
9894
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }),
|
|
9895
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "min-w-0 flex-1 truncate", children: link.label }),
|
|
9896
|
+
hasBadge2(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge })
|
|
9793
9897
|
]
|
|
9794
9898
|
}
|
|
9795
9899
|
) }, link.id);
|
|
@@ -9797,8 +9901,8 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9797
9901
|
const renderGroup = (link) => {
|
|
9798
9902
|
const isOpen = expanded.has(link.id);
|
|
9799
9903
|
const panelId = `${baseId}-${link.id}`;
|
|
9800
|
-
return /* @__PURE__ */ (0,
|
|
9801
|
-
/* @__PURE__ */ (0,
|
|
9904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("li", { children: [
|
|
9905
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9802
9906
|
Button,
|
|
9803
9907
|
{
|
|
9804
9908
|
variant: "item",
|
|
@@ -9806,12 +9910,12 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9806
9910
|
"aria-expanded": isOpen,
|
|
9807
9911
|
"aria-controls": panelId,
|
|
9808
9912
|
onClick: () => flip(link.id),
|
|
9809
|
-
leadingIcon: link.icon ? /* @__PURE__ */ (0,
|
|
9913
|
+
leadingIcon: link.icon ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }) : void 0,
|
|
9810
9914
|
className: "px-sm",
|
|
9811
|
-
children: /* @__PURE__ */ (0,
|
|
9812
|
-
/* @__PURE__ */ (0,
|
|
9813
|
-
hasBadge2(link.badge) && /* @__PURE__ */ (0,
|
|
9814
|
-
/* @__PURE__ */ (0,
|
|
9915
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9916
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "truncate", children: link.label }),
|
|
9917
|
+
hasBadge2(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge }),
|
|
9918
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9815
9919
|
Icon,
|
|
9816
9920
|
{
|
|
9817
9921
|
name: "chevron-down",
|
|
@@ -9822,23 +9926,23 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9822
9926
|
] })
|
|
9823
9927
|
}
|
|
9824
9928
|
),
|
|
9825
|
-
/* @__PURE__ */ (0,
|
|
9929
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9826
9930
|
"div",
|
|
9827
9931
|
{
|
|
9828
9932
|
id: panelId,
|
|
9829
9933
|
"data-state": isOpen ? "open" : "closed",
|
|
9830
9934
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9831
|
-
children: /* @__PURE__ */ (0,
|
|
9935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden pt-xxs", children: (link.children ?? []).map((k) => renderLink(k, true)) })
|
|
9832
9936
|
}
|
|
9833
9937
|
)
|
|
9834
9938
|
] }, link.id);
|
|
9835
9939
|
};
|
|
9836
|
-
return /* @__PURE__ */ (0,
|
|
9837
|
-
/* @__PURE__ */ (0,
|
|
9838
|
-
/* @__PURE__ */ (0,
|
|
9839
|
-
/* @__PURE__ */ (0,
|
|
9840
|
-
mobileActions != null && /* @__PURE__ */ (0,
|
|
9841
|
-
/* @__PURE__ */ (0,
|
|
9940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { ref, className: cn63("flex w-full flex-col bg-canvas text-ink", className), ...rest, children: [
|
|
9941
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("header", { className: "flex h-14 w-full shrink-0 items-center justify-between gap-sm border-b border-hairline bg-canvas px-base", children: [
|
|
9942
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
9943
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex min-w-0 items-center gap-xxs", children: [
|
|
9944
|
+
mobileActions != null && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex items-center gap-xxs", children: mobileActions }),
|
|
9945
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9842
9946
|
IconButton,
|
|
9843
9947
|
{
|
|
9844
9948
|
icon: "menu",
|
|
@@ -9850,8 +9954,8 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9850
9954
|
)
|
|
9851
9955
|
] })
|
|
9852
9956
|
] }),
|
|
9853
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
9854
|
-
/* @__PURE__ */ (0,
|
|
9957
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "min-w-0 flex-1", children }),
|
|
9958
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9855
9959
|
Drawer,
|
|
9856
9960
|
{
|
|
9857
9961
|
open,
|
|
@@ -9859,12 +9963,12 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9859
9963
|
side: "left",
|
|
9860
9964
|
"aria-label": "Navigation",
|
|
9861
9965
|
closeLabel: "Close navigation",
|
|
9862
|
-
headerStart: /* @__PURE__ */ (0,
|
|
9966
|
+
headerStart: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
9863
9967
|
bodyClassName: "px-sm",
|
|
9864
|
-
footer: showFooterRow ? /* @__PURE__ */ (0,
|
|
9865
|
-
userName ? /* @__PURE__ */ (0,
|
|
9866
|
-
showFooterActions && /* @__PURE__ */ (0,
|
|
9867
|
-
showHelpAction && /* @__PURE__ */ (0,
|
|
9968
|
+
footer: showFooterRow ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
9969
|
+
userName ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", {}),
|
|
9970
|
+
showFooterActions && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-xxs", children: [
|
|
9971
|
+
showHelpAction && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9868
9972
|
IconButton,
|
|
9869
9973
|
{
|
|
9870
9974
|
icon: "message-circle",
|
|
@@ -9873,26 +9977,26 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9873
9977
|
onClick: onHelpClick
|
|
9874
9978
|
}
|
|
9875
9979
|
),
|
|
9876
|
-
showSettingsAction && /* @__PURE__ */ (0,
|
|
9980
|
+
showSettingsAction && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(IconButton, { icon: "settings", variant: "ghost", "aria-label": "Settings", onClick: onSettingsClick })
|
|
9877
9981
|
] })
|
|
9878
9982
|
] }) : void 0,
|
|
9879
9983
|
children: [
|
|
9880
|
-
workspaceName && /* @__PURE__ */ (0,
|
|
9984
|
+
workspaceName && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "pb-sm", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9881
9985
|
Button,
|
|
9882
9986
|
{
|
|
9883
9987
|
variant: "ghost",
|
|
9884
9988
|
onClick: onWorkspaceClick,
|
|
9885
9989
|
className: "px-sm",
|
|
9886
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
9887
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
9888
|
-
children: /* @__PURE__ */ (0,
|
|
9990
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }),
|
|
9991
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { name: "chevron-down", size: 14, className: "text-muted" }),
|
|
9992
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-ink", children: workspaceName })
|
|
9889
9993
|
}
|
|
9890
9994
|
) }),
|
|
9891
|
-
/* @__PURE__ */ (0,
|
|
9995
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("nav", { "aria-label": "Main", children: sections.map((section, i) => {
|
|
9892
9996
|
const sectionOpen = !section.label || expanded.has(section.id);
|
|
9893
9997
|
const listId = `${baseId}-section-${section.id}`;
|
|
9894
|
-
return /* @__PURE__ */ (0,
|
|
9895
|
-
section.label && /* @__PURE__ */ (0,
|
|
9998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: i > 0 ? "mt-base" : void 0, children: [
|
|
9999
|
+
section.label && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9896
10000
|
Button,
|
|
9897
10001
|
{
|
|
9898
10002
|
variant: "item",
|
|
@@ -9901,9 +10005,9 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9901
10005
|
"aria-controls": listId,
|
|
9902
10006
|
onClick: () => flip(section.id),
|
|
9903
10007
|
className: "px-sm",
|
|
9904
|
-
children: /* @__PURE__ */ (0,
|
|
10008
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "inline-flex items-center gap-xs text-muted", children: [
|
|
9905
10009
|
section.label,
|
|
9906
|
-
/* @__PURE__ */ (0,
|
|
10010
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9907
10011
|
Icon,
|
|
9908
10012
|
{
|
|
9909
10013
|
name: "chevron-down",
|
|
@@ -9914,25 +10018,25 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9914
10018
|
] })
|
|
9915
10019
|
}
|
|
9916
10020
|
),
|
|
9917
|
-
/* @__PURE__ */ (0,
|
|
10021
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9918
10022
|
"div",
|
|
9919
10023
|
{
|
|
9920
10024
|
id: listId,
|
|
9921
10025
|
"data-state": sectionOpen ? "open" : "closed",
|
|
9922
10026
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9923
|
-
children: /* @__PURE__ */ (0,
|
|
10027
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden", children: section.items.map((l) => l.children?.length ? renderGroup(l) : renderLink(l)) })
|
|
9924
10028
|
}
|
|
9925
10029
|
)
|
|
9926
10030
|
] }, section.id);
|
|
9927
10031
|
}) }),
|
|
9928
|
-
announcement && /* @__PURE__ */ (0,
|
|
10032
|
+
announcement && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9929
10033
|
"a",
|
|
9930
10034
|
{
|
|
9931
10035
|
href: announcement.href ?? "#",
|
|
9932
10036
|
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",
|
|
9933
10037
|
children: [
|
|
9934
|
-
/* @__PURE__ */ (0,
|
|
9935
|
-
/* @__PURE__ */ (0,
|
|
10038
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-caption text-muted", children: announcement.eyebrow }),
|
|
10039
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-body-sm text-ink", children: announcement.title })
|
|
9936
10040
|
]
|
|
9937
10041
|
}
|
|
9938
10042
|
)
|
|
@@ -9945,8 +10049,8 @@ var SidebarMobile = React82.forwardRef(
|
|
|
9945
10049
|
SidebarMobile.displayName = "SidebarMobile";
|
|
9946
10050
|
|
|
9947
10051
|
// virtual-pkg:src/atoms/Sidebar/Sidebar.tsx
|
|
9948
|
-
var
|
|
9949
|
-
var Sidebar =
|
|
10052
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
10053
|
+
var Sidebar = React84.forwardRef(
|
|
9950
10054
|
({
|
|
9951
10055
|
collapsed,
|
|
9952
10056
|
defaultCollapsed,
|
|
@@ -9959,13 +10063,13 @@ var Sidebar = React83.forwardRef(
|
|
|
9959
10063
|
children,
|
|
9960
10064
|
className,
|
|
9961
10065
|
...shared
|
|
9962
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
10066
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9963
10067
|
"div",
|
|
9964
10068
|
{
|
|
9965
10069
|
ref,
|
|
9966
10070
|
className: ["flex h-full w-full min-h-0 flex-col bg-canvas md:flex-row", className].filter(Boolean).join(" "),
|
|
9967
10071
|
children: [
|
|
9968
|
-
/* @__PURE__ */ (0,
|
|
10072
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "hidden h-full shrink-0 md:block", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9969
10073
|
SidebarDesktop,
|
|
9970
10074
|
{
|
|
9971
10075
|
...shared,
|
|
@@ -9976,7 +10080,7 @@ var Sidebar = React83.forwardRef(
|
|
|
9976
10080
|
onCollapsedChange
|
|
9977
10081
|
}
|
|
9978
10082
|
) }),
|
|
9979
|
-
/* @__PURE__ */ (0,
|
|
10083
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "shrink-0 md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9980
10084
|
SidebarMobile,
|
|
9981
10085
|
{
|
|
9982
10086
|
...shared,
|
|
@@ -9986,7 +10090,7 @@ var Sidebar = React83.forwardRef(
|
|
|
9986
10090
|
onOpenChange: onMobileOpenChange
|
|
9987
10091
|
}
|
|
9988
10092
|
) }),
|
|
9989
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
10093
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "min-h-0 min-w-0 flex-1 overflow-auto", children })
|
|
9990
10094
|
]
|
|
9991
10095
|
}
|
|
9992
10096
|
)
|
|
@@ -9995,7 +10099,7 @@ Sidebar.displayName = "Sidebar";
|
|
|
9995
10099
|
|
|
9996
10100
|
// virtual-pkg:src/atoms/Slider/Slider.tsx
|
|
9997
10101
|
var import_react6 = __toESM(require("react"));
|
|
9998
|
-
var
|
|
10102
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9999
10103
|
function cn64(...parts) {
|
|
10000
10104
|
return parts.filter(Boolean).join(" ");
|
|
10001
10105
|
}
|
|
@@ -10035,19 +10139,19 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10035
10139
|
const lowPct = pctOf(low);
|
|
10036
10140
|
const highPct = pctOf(high);
|
|
10037
10141
|
const thumbState = disabled ? "border-hairline bg-surface-soft shadow-none" : "border-hairline-strong";
|
|
10038
|
-
return /* @__PURE__ */ (0,
|
|
10142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
10039
10143
|
"div",
|
|
10040
10144
|
{
|
|
10041
10145
|
ref,
|
|
10042
10146
|
className: cn64("flex w-full flex-col items-center gap-md", disabled && "opacity-50", className),
|
|
10043
10147
|
...rest,
|
|
10044
10148
|
children: [
|
|
10045
|
-
/* @__PURE__ */ (0,
|
|
10046
|
-
histogram && histogram.length > 0 ? /* @__PURE__ */ (0,
|
|
10149
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex w-full flex-col gap-xxs", children: [
|
|
10150
|
+
histogram && histogram.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { "aria-hidden": "true", className: "flex h-10 w-full items-end gap-xxs", style: { paddingInline: THUMB2 / 2 }, children: histogram.map((h, i) => {
|
|
10047
10151
|
const peak = Math.max(...histogram, 1);
|
|
10048
10152
|
const center = (i + 0.5) / histogram.length * 100;
|
|
10049
10153
|
const inside = center >= lowPct && center <= highPct;
|
|
10050
|
-
return /* @__PURE__ */ (0,
|
|
10154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10051
10155
|
"span",
|
|
10052
10156
|
{
|
|
10053
10157
|
className: cn64(
|
|
@@ -10059,9 +10163,9 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10059
10163
|
i
|
|
10060
10164
|
);
|
|
10061
10165
|
}) }) : null,
|
|
10062
|
-
/* @__PURE__ */ (0,
|
|
10063
|
-
/* @__PURE__ */ (0,
|
|
10064
|
-
/* @__PURE__ */ (0,
|
|
10166
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "relative h-5 w-full", children: [
|
|
10167
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "absolute left-0 right-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-surface-strong" }),
|
|
10168
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10065
10169
|
"div",
|
|
10066
10170
|
{
|
|
10067
10171
|
"aria-hidden": "true",
|
|
@@ -10075,8 +10179,8 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10075
10179
|
}
|
|
10076
10180
|
}
|
|
10077
10181
|
),
|
|
10078
|
-
isRange ? /* @__PURE__ */ (0,
|
|
10079
|
-
/* @__PURE__ */ (0,
|
|
10182
|
+
isRange ? /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
10183
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10080
10184
|
"input",
|
|
10081
10185
|
{
|
|
10082
10186
|
type: "range",
|
|
@@ -10093,7 +10197,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10093
10197
|
style: { zIndex: lowPct > 90 ? 2 : 1 }
|
|
10094
10198
|
}
|
|
10095
10199
|
),
|
|
10096
|
-
/* @__PURE__ */ (0,
|
|
10200
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10097
10201
|
"span",
|
|
10098
10202
|
{
|
|
10099
10203
|
"aria-hidden": "true",
|
|
@@ -10105,7 +10209,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10105
10209
|
style: { left: leftOf(lowPct) }
|
|
10106
10210
|
}
|
|
10107
10211
|
),
|
|
10108
|
-
/* @__PURE__ */ (0,
|
|
10212
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10109
10213
|
"input",
|
|
10110
10214
|
{
|
|
10111
10215
|
type: "range",
|
|
@@ -10121,7 +10225,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10121
10225
|
className: cn64("peer/high", inputClass, rangeInputClass)
|
|
10122
10226
|
}
|
|
10123
10227
|
),
|
|
10124
|
-
/* @__PURE__ */ (0,
|
|
10228
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10125
10229
|
"span",
|
|
10126
10230
|
{
|
|
10127
10231
|
"aria-hidden": "true",
|
|
@@ -10133,8 +10237,8 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10133
10237
|
style: { left: leftOf(highPct) }
|
|
10134
10238
|
}
|
|
10135
10239
|
)
|
|
10136
|
-
] }) : /* @__PURE__ */ (0,
|
|
10137
|
-
/* @__PURE__ */ (0,
|
|
10240
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
10241
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10138
10242
|
"input",
|
|
10139
10243
|
{
|
|
10140
10244
|
type: "range",
|
|
@@ -10150,7 +10254,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10150
10254
|
className: cn64("peer", inputClass)
|
|
10151
10255
|
}
|
|
10152
10256
|
),
|
|
10153
|
-
/* @__PURE__ */ (0,
|
|
10257
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10154
10258
|
"span",
|
|
10155
10259
|
{
|
|
10156
10260
|
"aria-hidden": "true",
|
|
@@ -10165,7 +10269,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10165
10269
|
] })
|
|
10166
10270
|
] })
|
|
10167
10271
|
] }),
|
|
10168
|
-
label ? /* @__PURE__ */ (0,
|
|
10272
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
10169
10273
|
]
|
|
10170
10274
|
}
|
|
10171
10275
|
);
|
|
@@ -10174,8 +10278,8 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10174
10278
|
Slider.displayName = "Slider";
|
|
10175
10279
|
|
|
10176
10280
|
// virtual-pkg:src/atoms/StepperItem/StepperItem.tsx
|
|
10177
|
-
var
|
|
10178
|
-
var
|
|
10281
|
+
var React86 = __toESM(require("react"));
|
|
10282
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
10179
10283
|
var cn65 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10180
10284
|
var statusLabel = {
|
|
10181
10285
|
upcoming: "Upcoming",
|
|
@@ -10185,8 +10289,8 @@ var statusLabel = {
|
|
|
10185
10289
|
};
|
|
10186
10290
|
function Indicator({ status }) {
|
|
10187
10291
|
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";
|
|
10188
|
-
return /* @__PURE__ */ (0,
|
|
10189
|
-
/* @__PURE__ */ (0,
|
|
10292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "grid h-5 w-5 shrink-0 place-items-center", "aria-hidden": "true", children: [
|
|
10293
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10190
10294
|
"span",
|
|
10191
10295
|
{
|
|
10192
10296
|
className: cn65(
|
|
@@ -10196,7 +10300,7 @@ function Indicator({ status }) {
|
|
|
10196
10300
|
)
|
|
10197
10301
|
}
|
|
10198
10302
|
),
|
|
10199
|
-
/* @__PURE__ */ (0,
|
|
10303
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10200
10304
|
"span",
|
|
10201
10305
|
{
|
|
10202
10306
|
className: cn65(
|
|
@@ -10204,10 +10308,10 @@ function Indicator({ status }) {
|
|
|
10204
10308
|
"border-2 border-primary bg-canvas",
|
|
10205
10309
|
status === "active" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10206
10310
|
),
|
|
10207
|
-
children: /* @__PURE__ */ (0,
|
|
10311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "h-2 w-2 rounded-full bg-primary" })
|
|
10208
10312
|
}
|
|
10209
10313
|
),
|
|
10210
|
-
/* @__PURE__ */ (0,
|
|
10314
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10211
10315
|
"span",
|
|
10212
10316
|
{
|
|
10213
10317
|
className: cn65(
|
|
@@ -10215,10 +10319,10 @@ function Indicator({ status }) {
|
|
|
10215
10319
|
"bg-semantic-success-soft text-semantic-success",
|
|
10216
10320
|
status === "complete" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10217
10321
|
),
|
|
10218
|
-
children: /* @__PURE__ */ (0,
|
|
10322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon, { name: "check", size: 11, strokeWidth: 3 })
|
|
10219
10323
|
}
|
|
10220
10324
|
),
|
|
10221
|
-
/* @__PURE__ */ (0,
|
|
10325
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10222
10326
|
"span",
|
|
10223
10327
|
{
|
|
10224
10328
|
className: cn65(
|
|
@@ -10226,13 +10330,13 @@ function Indicator({ status }) {
|
|
|
10226
10330
|
"text-semantic-error",
|
|
10227
10331
|
status === "error" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10228
10332
|
),
|
|
10229
|
-
children: /* @__PURE__ */ (0,
|
|
10333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon, { name: "circle-alert", size: 16 })
|
|
10230
10334
|
}
|
|
10231
10335
|
)
|
|
10232
10336
|
] });
|
|
10233
10337
|
}
|
|
10234
|
-
var StepperItem =
|
|
10235
|
-
({ status = "upcoming", title, meta, connector = false, className, children, ...rest }, ref) => /* @__PURE__ */ (0,
|
|
10338
|
+
var StepperItem = React86.forwardRef(
|
|
10339
|
+
({ status = "upcoming", title, meta, connector = false, className, children, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
10236
10340
|
"li",
|
|
10237
10341
|
{
|
|
10238
10342
|
ref,
|
|
@@ -10240,9 +10344,9 @@ var StepperItem = React85.forwardRef(
|
|
|
10240
10344
|
className: cn65("relative flex w-full gap-md", connector && "pb-base", className),
|
|
10241
10345
|
...rest,
|
|
10242
10346
|
children: [
|
|
10243
|
-
/* @__PURE__ */ (0,
|
|
10244
|
-
/* @__PURE__ */ (0,
|
|
10245
|
-
connector && /* @__PURE__ */ (0,
|
|
10347
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
10348
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Indicator, { status }),
|
|
10349
|
+
connector && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10246
10350
|
"span",
|
|
10247
10351
|
{
|
|
10248
10352
|
"aria-hidden": "true",
|
|
@@ -10253,17 +10357,17 @@ var StepperItem = React85.forwardRef(
|
|
|
10253
10357
|
}
|
|
10254
10358
|
)
|
|
10255
10359
|
] }),
|
|
10256
|
-
/* @__PURE__ */ (0,
|
|
10257
|
-
/* @__PURE__ */ (0,
|
|
10360
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs pt-px", children: [
|
|
10361
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "text-body-md text-ink", children: [
|
|
10258
10362
|
title,
|
|
10259
|
-
/* @__PURE__ */ (0,
|
|
10363
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "sr-only", children: [
|
|
10260
10364
|
" (",
|
|
10261
10365
|
statusLabel[status],
|
|
10262
10366
|
")"
|
|
10263
10367
|
] })
|
|
10264
10368
|
] }),
|
|
10265
|
-
meta && /* @__PURE__ */ (0,
|
|
10266
|
-
children != null && children !== false && /* @__PURE__ */ (0,
|
|
10369
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-body-sm text-muted", children: meta }),
|
|
10370
|
+
children != null && children !== false && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-full pt-sm", children })
|
|
10267
10371
|
] })
|
|
10268
10372
|
]
|
|
10269
10373
|
}
|
|
@@ -10272,10 +10376,10 @@ var StepperItem = React85.forwardRef(
|
|
|
10272
10376
|
StepperItem.displayName = "StepperItem";
|
|
10273
10377
|
|
|
10274
10378
|
// virtual-pkg:src/atoms/Tab/Tab.tsx
|
|
10275
|
-
var
|
|
10276
|
-
var
|
|
10379
|
+
var React87 = __toESM(require("react"));
|
|
10380
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
10277
10381
|
var cn66 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10278
|
-
var Tab =
|
|
10382
|
+
var Tab = React87.forwardRef(
|
|
10279
10383
|
({
|
|
10280
10384
|
selected = false,
|
|
10281
10385
|
controls,
|
|
@@ -10286,7 +10390,7 @@ var Tab = React86.forwardRef(
|
|
|
10286
10390
|
children,
|
|
10287
10391
|
tabIndex,
|
|
10288
10392
|
...rest
|
|
10289
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
10393
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10290
10394
|
Button,
|
|
10291
10395
|
{
|
|
10292
10396
|
ref,
|
|
@@ -10311,10 +10415,10 @@ var Tab = React86.forwardRef(
|
|
|
10311
10415
|
Tab.displayName = "Tab";
|
|
10312
10416
|
|
|
10313
10417
|
// virtual-pkg:src/atoms/Tabs/Tabs.tsx
|
|
10314
|
-
var
|
|
10315
|
-
var
|
|
10418
|
+
var React88 = __toESM(require("react"));
|
|
10419
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
10316
10420
|
var cn67 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10317
|
-
var Tabs =
|
|
10421
|
+
var Tabs = React88.forwardRef(
|
|
10318
10422
|
({
|
|
10319
10423
|
items,
|
|
10320
10424
|
value,
|
|
@@ -10325,19 +10429,19 @@ var Tabs = React87.forwardRef(
|
|
|
10325
10429
|
className,
|
|
10326
10430
|
...rest
|
|
10327
10431
|
}, ref) => {
|
|
10328
|
-
const baseId =
|
|
10329
|
-
const [inner, setInner] =
|
|
10432
|
+
const baseId = React88.useId();
|
|
10433
|
+
const [inner, setInner] = React88.useState(defaultValue ?? items[0]?.value);
|
|
10330
10434
|
const selected = value ?? inner;
|
|
10331
|
-
const tabRefs =
|
|
10332
|
-
const [indicator, setIndicator] =
|
|
10333
|
-
const measure =
|
|
10435
|
+
const tabRefs = React88.useRef({});
|
|
10436
|
+
const [indicator, setIndicator] = React88.useState(null);
|
|
10437
|
+
const measure = React88.useCallback(() => {
|
|
10334
10438
|
const el = selected ? tabRefs.current[selected] : null;
|
|
10335
10439
|
if (el) setIndicator({ left: el.offsetLeft, width: el.offsetWidth });
|
|
10336
10440
|
}, [selected]);
|
|
10337
|
-
|
|
10441
|
+
React88.useLayoutEffect(() => {
|
|
10338
10442
|
measure();
|
|
10339
10443
|
}, [measure, items]);
|
|
10340
|
-
|
|
10444
|
+
React88.useEffect(() => {
|
|
10341
10445
|
window.addEventListener("resize", measure);
|
|
10342
10446
|
const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(() => measure()) : null;
|
|
10343
10447
|
Object.values(tabRefs.current).forEach((el) => el && ro?.observe(el));
|
|
@@ -10367,7 +10471,7 @@ var Tabs = React87.forwardRef(
|
|
|
10367
10471
|
};
|
|
10368
10472
|
const tabId = (v) => `${baseId}-tab-${v}`;
|
|
10369
10473
|
const panelId = (v) => `${baseId}-panel-${v}`;
|
|
10370
|
-
return /* @__PURE__ */ (0,
|
|
10474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
10371
10475
|
"div",
|
|
10372
10476
|
{
|
|
10373
10477
|
ref,
|
|
@@ -10377,7 +10481,7 @@ var Tabs = React87.forwardRef(
|
|
|
10377
10481
|
),
|
|
10378
10482
|
...rest,
|
|
10379
10483
|
children: [
|
|
10380
|
-
/* @__PURE__ */ (0,
|
|
10484
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
10381
10485
|
"div",
|
|
10382
10486
|
{
|
|
10383
10487
|
role: "tablist",
|
|
@@ -10385,7 +10489,7 @@ var Tabs = React87.forwardRef(
|
|
|
10385
10489
|
onKeyDown,
|
|
10386
10490
|
className: "relative flex min-w-0 items-center gap-xs overflow-x-auto p-sm",
|
|
10387
10491
|
children: [
|
|
10388
|
-
/* @__PURE__ */ (0,
|
|
10492
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10389
10493
|
"span",
|
|
10390
10494
|
{
|
|
10391
10495
|
"aria-hidden": "true",
|
|
@@ -10399,7 +10503,7 @@ var Tabs = React87.forwardRef(
|
|
|
10399
10503
|
),
|
|
10400
10504
|
items.map((item) => {
|
|
10401
10505
|
const isSelected = item.value === selected;
|
|
10402
|
-
return /* @__PURE__ */ (0,
|
|
10506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10403
10507
|
Tab,
|
|
10404
10508
|
{
|
|
10405
10509
|
ref: (el) => {
|
|
@@ -10415,9 +10519,9 @@ var Tabs = React87.forwardRef(
|
|
|
10415
10519
|
disabled: item.disabled,
|
|
10416
10520
|
leadingIcon: item.icon,
|
|
10417
10521
|
onClick: () => select(item.value),
|
|
10418
|
-
children: /* @__PURE__ */ (0,
|
|
10522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "inline-flex items-center gap-sm", children: [
|
|
10419
10523
|
item.label,
|
|
10420
|
-
item.badge != null ? /* @__PURE__ */ (0,
|
|
10524
|
+
item.badge != null ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Badge, { size: "sm", tone: isSelected ? "primary" : "neutral", children: item.badge }) : null
|
|
10421
10525
|
] })
|
|
10422
10526
|
},
|
|
10423
10527
|
item.value
|
|
@@ -10428,7 +10532,7 @@ var Tabs = React87.forwardRef(
|
|
|
10428
10532
|
),
|
|
10429
10533
|
items.map((item) => {
|
|
10430
10534
|
const isSelected = item.value === selected;
|
|
10431
|
-
return /* @__PURE__ */ (0,
|
|
10535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10432
10536
|
"div",
|
|
10433
10537
|
{
|
|
10434
10538
|
id: panelId(item.value),
|
|
@@ -10450,26 +10554,26 @@ var Tabs = React87.forwardRef(
|
|
|
10450
10554
|
Tabs.displayName = "Tabs";
|
|
10451
10555
|
|
|
10452
10556
|
// virtual-pkg:src/atoms/TestimonialBlock/TestimonialBlock.tsx
|
|
10453
|
-
var
|
|
10454
|
-
var
|
|
10557
|
+
var React89 = __toESM(require("react"));
|
|
10558
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
10455
10559
|
var cn68 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10456
10560
|
function QuoteCard({ t }) {
|
|
10457
|
-
return /* @__PURE__ */ (0,
|
|
10458
|
-
/* @__PURE__ */ (0,
|
|
10561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("figure", { className: "m-0 flex h-full flex-col justify-between gap-base rounded-lg border border-hairline bg-canvas p-lg shadow-card", children: [
|
|
10562
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("blockquote", { className: "m-0", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("p", { className: "text-body-lg text-ink", children: [
|
|
10459
10563
|
"\u201C",
|
|
10460
10564
|
t.quote,
|
|
10461
10565
|
"\u201D"
|
|
10462
10566
|
] }) }),
|
|
10463
|
-
/* @__PURE__ */ (0,
|
|
10464
|
-
/* @__PURE__ */ (0,
|
|
10465
|
-
/* @__PURE__ */ (0,
|
|
10466
|
-
/* @__PURE__ */ (0,
|
|
10467
|
-
t.role ? /* @__PURE__ */ (0,
|
|
10567
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("figcaption", { className: "flex items-center gap-md", children: [
|
|
10568
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Avatar, { size: "lg", name: t.name, src: t.avatarSrc, alt: t.name }),
|
|
10569
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
10570
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "truncate text-body-sm font-weight-label text-ink", children: t.name }),
|
|
10571
|
+
t.role ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "truncate text-caption text-muted", children: t.role }) : null
|
|
10468
10572
|
] })
|
|
10469
10573
|
] })
|
|
10470
10574
|
] });
|
|
10471
10575
|
}
|
|
10472
|
-
var TestimonialBlock =
|
|
10576
|
+
var TestimonialBlock = React89.forwardRef(
|
|
10473
10577
|
({
|
|
10474
10578
|
testimonials = [],
|
|
10475
10579
|
logos,
|
|
@@ -10479,7 +10583,7 @@ var TestimonialBlock = React88.forwardRef(
|
|
|
10479
10583
|
...rest
|
|
10480
10584
|
}, ref) => {
|
|
10481
10585
|
const many = testimonials.length > 1;
|
|
10482
|
-
return /* @__PURE__ */ (0,
|
|
10586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
10483
10587
|
"section",
|
|
10484
10588
|
{
|
|
10485
10589
|
ref,
|
|
@@ -10487,18 +10591,18 @@ var TestimonialBlock = React88.forwardRef(
|
|
|
10487
10591
|
className: cn68("flex w-full flex-col gap-xl", className),
|
|
10488
10592
|
...rest,
|
|
10489
10593
|
children: [
|
|
10490
|
-
logos && logos.length ? /* @__PURE__ */ (0,
|
|
10491
|
-
/* @__PURE__ */ (0,
|
|
10492
|
-
/* @__PURE__ */ (0,
|
|
10594
|
+
logos && logos.length ? /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col items-center gap-lg py-base", children: [
|
|
10595
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-body-md text-muted", children: logosTitle }),
|
|
10596
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("ul", { className: "flex flex-wrap items-center justify-center gap-x-xl gap-y-base", children: logos.map((l) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("li", { className: "text-ink", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10493
10597
|
Logo,
|
|
10494
10598
|
{
|
|
10495
10599
|
size: "md",
|
|
10496
10600
|
name: l.name,
|
|
10497
|
-
mark: l.icon ? /* @__PURE__ */ (0,
|
|
10601
|
+
mark: l.icon ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Icon, { name: l.icon, size: 20 }) : void 0
|
|
10498
10602
|
}
|
|
10499
10603
|
) }, l.name)) })
|
|
10500
10604
|
] }) : null,
|
|
10501
|
-
testimonials.length ? /* @__PURE__ */ (0,
|
|
10605
|
+
testimonials.length ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10502
10606
|
"div",
|
|
10503
10607
|
{
|
|
10504
10608
|
className: cn68(
|
|
@@ -10506,7 +10610,7 @@ var TestimonialBlock = React88.forwardRef(
|
|
|
10506
10610
|
many ? "grid-cols-1 md:grid-cols-2" : "grid-cols-1",
|
|
10507
10611
|
testimonials.length > 2 && "lg:grid-cols-3"
|
|
10508
10612
|
),
|
|
10509
|
-
children: testimonials.map((t) => /* @__PURE__ */ (0,
|
|
10613
|
+
children: testimonials.map((t) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(QuoteCard, { t }, t.id))
|
|
10510
10614
|
}
|
|
10511
10615
|
) : null
|
|
10512
10616
|
]
|
|
@@ -10517,9 +10621,9 @@ var TestimonialBlock = React88.forwardRef(
|
|
|
10517
10621
|
TestimonialBlock.displayName = "TestimonialBlock";
|
|
10518
10622
|
|
|
10519
10623
|
// virtual-pkg:src/atoms/Toast/Toast.tsx
|
|
10520
|
-
var
|
|
10624
|
+
var React90 = __toESM(require("react"));
|
|
10521
10625
|
var import_react_dom10 = require("react-dom");
|
|
10522
|
-
var
|
|
10626
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
10523
10627
|
var cn69 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10524
10628
|
var toneIcon2 = {
|
|
10525
10629
|
success: { name: "circle-check", color: "text-inverse-ink" },
|
|
@@ -10530,7 +10634,7 @@ var placementClass = {
|
|
|
10530
10634
|
"bottom-center": "fixed bottom-lg left-1/2 -translate-x-1/2 w-[calc(100%-2rem)] sm:w-auto sm:min-w-[22rem]",
|
|
10531
10635
|
"bottom-right": "fixed bottom-lg right-lg left-lg sm:left-auto sm:min-w-[22rem]"
|
|
10532
10636
|
};
|
|
10533
|
-
var Toast =
|
|
10637
|
+
var Toast = React90.forwardRef(
|
|
10534
10638
|
({
|
|
10535
10639
|
open = true,
|
|
10536
10640
|
onOpenChange,
|
|
@@ -10544,16 +10648,16 @@ var Toast = React89.forwardRef(
|
|
|
10544
10648
|
className,
|
|
10545
10649
|
...rest
|
|
10546
10650
|
}, ref) => {
|
|
10547
|
-
const [mounted, setMounted] =
|
|
10548
|
-
|
|
10549
|
-
|
|
10651
|
+
const [mounted, setMounted] = React90.useState(false);
|
|
10652
|
+
React90.useEffect(() => setMounted(true), []);
|
|
10653
|
+
React90.useEffect(() => {
|
|
10550
10654
|
if (!open || !duration || !onOpenChange) return;
|
|
10551
10655
|
const t = window.setTimeout(() => onOpenChange(false), duration);
|
|
10552
10656
|
return () => window.clearTimeout(t);
|
|
10553
10657
|
}, [open, duration, onOpenChange]);
|
|
10554
10658
|
const glyph2 = toneIcon2[tone];
|
|
10555
10659
|
const floating = placement !== "inline";
|
|
10556
|
-
const card = /* @__PURE__ */ (0,
|
|
10660
|
+
const card = /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10557
10661
|
"div",
|
|
10558
10662
|
{
|
|
10559
10663
|
className: cn69(
|
|
@@ -10561,7 +10665,7 @@ var Toast = React89.forwardRef(
|
|
|
10561
10665
|
"pointer-events-none"
|
|
10562
10666
|
),
|
|
10563
10667
|
style: { zIndex: open ? "var(--z-toast, 1400)" : void 0 },
|
|
10564
|
-
children: /* @__PURE__ */ (0,
|
|
10668
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
10565
10669
|
"div",
|
|
10566
10670
|
{
|
|
10567
10671
|
ref,
|
|
@@ -10579,9 +10683,9 @@ var Toast = React89.forwardRef(
|
|
|
10579
10683
|
),
|
|
10580
10684
|
...rest,
|
|
10581
10685
|
children: [
|
|
10582
|
-
/* @__PURE__ */ (0,
|
|
10583
|
-
/* @__PURE__ */ (0,
|
|
10584
|
-
actionLabel ? /* @__PURE__ */ (0,
|
|
10686
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { name: icon ?? glyph2.name, size: 18, className: cn69("shrink-0", glyph2.color) }),
|
|
10687
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "min-w-0 flex-1 py-xxs text-body-md text-inverse-ink [&_strong]:font-weight-label", children: title }),
|
|
10688
|
+
actionLabel ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10585
10689
|
Button,
|
|
10586
10690
|
{
|
|
10587
10691
|
variant: "ghost",
|
|
@@ -10594,7 +10698,7 @@ var Toast = React89.forwardRef(
|
|
|
10594
10698
|
className: "shrink-0 text-inverse-ink enabled:hover:bg-inverse-ink/10 enabled:hover:text-inverse-ink",
|
|
10595
10699
|
children: actionLabel
|
|
10596
10700
|
}
|
|
10597
|
-
) : /* @__PURE__ */ (0,
|
|
10701
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "w-xs shrink-0", "aria-hidden": "true" })
|
|
10598
10702
|
]
|
|
10599
10703
|
}
|
|
10600
10704
|
)
|
|
@@ -10609,7 +10713,7 @@ Toast.displayName = "Toast";
|
|
|
10609
10713
|
|
|
10610
10714
|
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
10611
10715
|
var import_react7 = __toESM(require("react"));
|
|
10612
|
-
var
|
|
10716
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
10613
10717
|
function cn70(...parts) {
|
|
10614
10718
|
return parts.filter(Boolean).join(" ");
|
|
10615
10719
|
}
|
|
@@ -10659,7 +10763,7 @@ var toneClass2 = {
|
|
|
10659
10763
|
var Typography = import_react7.default.forwardRef(
|
|
10660
10764
|
({ variant = "body", as, tone, truncate = false, className, children, ...rest }, ref) => {
|
|
10661
10765
|
const Component = as ?? defaultElement[variant];
|
|
10662
|
-
return /* @__PURE__ */ (0,
|
|
10766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10663
10767
|
Component,
|
|
10664
10768
|
{
|
|
10665
10769
|
ref,
|
|
@@ -10679,10 +10783,10 @@ var Typography = import_react7.default.forwardRef(
|
|
|
10679
10783
|
Typography.displayName = "Typography";
|
|
10680
10784
|
|
|
10681
10785
|
// virtual-pkg:src/atoms/Wizard/Wizard.tsx
|
|
10682
|
-
var
|
|
10683
|
-
var
|
|
10786
|
+
var React92 = __toESM(require("react"));
|
|
10787
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
10684
10788
|
var cn71 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10685
|
-
var Wizard =
|
|
10789
|
+
var Wizard = React92.forwardRef(
|
|
10686
10790
|
({
|
|
10687
10791
|
title,
|
|
10688
10792
|
description,
|
|
@@ -10701,8 +10805,8 @@ var Wizard = React91.forwardRef(
|
|
|
10701
10805
|
className,
|
|
10702
10806
|
...rest
|
|
10703
10807
|
}, ref) => {
|
|
10704
|
-
const titleId =
|
|
10705
|
-
const [inner, setInner] =
|
|
10808
|
+
const titleId = React92.useId();
|
|
10809
|
+
const [inner, setInner] = React92.useState(defaultStep);
|
|
10706
10810
|
const step = stepProp ?? inner;
|
|
10707
10811
|
const go = (next) => {
|
|
10708
10812
|
const clamped = Math.max(0, Math.min(steps.length, next));
|
|
@@ -10713,7 +10817,7 @@ var Wizard = React91.forwardRef(
|
|
|
10713
10817
|
const current = steps[step];
|
|
10714
10818
|
const blocked = !reviewing && current?.canContinue === false;
|
|
10715
10819
|
const statusOf = (i) => i < step ? "complete" : i === step ? "active" : "upcoming";
|
|
10716
|
-
return /* @__PURE__ */ (0,
|
|
10820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ref, className: cn71("w-full", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
10717
10821
|
"section",
|
|
10718
10822
|
{
|
|
10719
10823
|
"aria-labelledby": titleId,
|
|
@@ -10722,40 +10826,40 @@ var Wizard = React91.forwardRef(
|
|
|
10722
10826
|
chrome === "card" && "rounded-xl border border-hairline bg-canvas p-lg shadow-card"
|
|
10723
10827
|
),
|
|
10724
10828
|
children: [
|
|
10725
|
-
/* @__PURE__ */ (0,
|
|
10726
|
-
/* @__PURE__ */ (0,
|
|
10727
|
-
(description || docsHref) && /* @__PURE__ */ (0,
|
|
10829
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("header", { className: "flex flex-col gap-xs", children: [
|
|
10830
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("h2", { id: titleId, className: "text-heading-md font-weight-heading-sm text-ink", children: title }),
|
|
10831
|
+
(description || docsHref) && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("p", { className: "text-body-sm text-muted", children: [
|
|
10728
10832
|
description,
|
|
10729
10833
|
" ",
|
|
10730
|
-
docsHref && /* @__PURE__ */ (0,
|
|
10834
|
+
docsHref && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Link, { href: docsHref, variant: "standalone", arrow: true, external: true, children: docsLabel })
|
|
10731
10835
|
] })
|
|
10732
10836
|
] }),
|
|
10733
|
-
/* @__PURE__ */ (0,
|
|
10837
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("ol", { className: "flex flex-col", "aria-label": "Steps", children: steps.map((s, i) => {
|
|
10734
10838
|
const status = statusOf(i);
|
|
10735
10839
|
const active = status === "active";
|
|
10736
|
-
return /* @__PURE__ */ (0,
|
|
10840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10737
10841
|
StepperItem,
|
|
10738
10842
|
{
|
|
10739
10843
|
status,
|
|
10740
10844
|
title: s.title,
|
|
10741
10845
|
meta: active ? s.description : status === "complete" ? s.summary : void 0,
|
|
10742
10846
|
connector: i < steps.length - 1,
|
|
10743
|
-
children: s.content ? /* @__PURE__ */ (0,
|
|
10847
|
+
children: s.content ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10744
10848
|
"div",
|
|
10745
10849
|
{
|
|
10746
10850
|
"data-state": active ? "open" : "closed",
|
|
10747
10851
|
"aria-hidden": active ? void 0 : true,
|
|
10748
10852
|
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",
|
|
10749
|
-
children: /* @__PURE__ */ (0,
|
|
10853
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: active ? "pb-xs" : "invisible", children: s.content }) })
|
|
10750
10854
|
}
|
|
10751
10855
|
) : null
|
|
10752
10856
|
},
|
|
10753
10857
|
s.id
|
|
10754
10858
|
);
|
|
10755
10859
|
}) }),
|
|
10756
|
-
/* @__PURE__ */ (0,
|
|
10757
|
-
step > 0 && /* @__PURE__ */ (0,
|
|
10758
|
-
reviewing ? /* @__PURE__ */ (0,
|
|
10860
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("footer", { className: "flex items-center justify-end gap-sm", children: [
|
|
10861
|
+
step > 0 && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { variant: "secondary", onClick: () => go(step - 1), disabled: submitting, children: backLabel }),
|
|
10862
|
+
reviewing ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { variant: "primary", loading: submitting, onClick: onComplete, children: completeLabel }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { variant: "primary", disabled: blocked, onClick: () => go(step + 1), children: continueLabel })
|
|
10759
10863
|
] })
|
|
10760
10864
|
]
|
|
10761
10865
|
}
|