@designa8/vibedesign-linear-internal-v1-b737 0.9.0 → 0.10.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 +1221 -762
- package/dist/index.js +1246 -787
- package/package.json +6 -1
- package/src/atoms/FontCombobox/FontCombobox.tsx +562 -0
- package/src/atoms/FontCombobox/index.ts +6 -0
- package/src/atoms/FontCombobox/preview.tsx +96 -0
- package/src/index.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -71,6 +71,7 @@ __export(src_exports, {
|
|
|
71
71
|
DropdownMenu: () => DropdownMenu,
|
|
72
72
|
ExpandableMessage: () => ExpandableMessage,
|
|
73
73
|
FileUpload: () => FileUpload,
|
|
74
|
+
FontCombobox: () => FontCombobox,
|
|
74
75
|
Footer: () => Footer,
|
|
75
76
|
Form: () => Form,
|
|
76
77
|
FormDesktop: () => FormDesktop,
|
|
@@ -6569,12 +6570,523 @@ var FileUpload = React51.forwardRef(
|
|
|
6569
6570
|
);
|
|
6570
6571
|
FileUpload.displayName = "FileUpload";
|
|
6571
6572
|
|
|
6572
|
-
// virtual-pkg:src/atoms/
|
|
6573
|
+
// virtual-pkg:src/atoms/FontCombobox/FontCombobox.tsx
|
|
6573
6574
|
var React53 = __toESM(require("react"));
|
|
6575
|
+
var import_react_dom7 = require("react-dom");
|
|
6576
|
+
|
|
6577
|
+
// virtual-pkg:src/atoms/Label/Label.tsx
|
|
6578
|
+
var React52 = __toESM(require("react"));
|
|
6579
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6580
|
+
var Label = React52.forwardRef(
|
|
6581
|
+
({
|
|
6582
|
+
required = false,
|
|
6583
|
+
optional = false,
|
|
6584
|
+
helper,
|
|
6585
|
+
helperId,
|
|
6586
|
+
disabled = false,
|
|
6587
|
+
className,
|
|
6588
|
+
children,
|
|
6589
|
+
...rest
|
|
6590
|
+
}, ref) => {
|
|
6591
|
+
const optionalText = typeof optional === "string" ? optional : "Optional";
|
|
6592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6593
|
+
"div",
|
|
6594
|
+
{
|
|
6595
|
+
className: [
|
|
6596
|
+
"inline-flex flex-col gap-xxs",
|
|
6597
|
+
disabled ? "opacity-50" : "",
|
|
6598
|
+
className
|
|
6599
|
+
].filter(Boolean).join(" "),
|
|
6600
|
+
children: [
|
|
6601
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6602
|
+
"label",
|
|
6603
|
+
{
|
|
6604
|
+
ref,
|
|
6605
|
+
className: [
|
|
6606
|
+
"inline-flex items-baseline gap-sm text-label text-ink",
|
|
6607
|
+
disabled ? "cursor-not-allowed" : "cursor-default"
|
|
6608
|
+
].join(" "),
|
|
6609
|
+
...rest,
|
|
6610
|
+
children: [
|
|
6611
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
|
|
6612
|
+
children,
|
|
6613
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ml-xxs text-semantic-error", "aria-hidden": "true", children: "*" }),
|
|
6614
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "sr-only", children: " (required)" })
|
|
6615
|
+
] }),
|
|
6616
|
+
optional && !required && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-body-sm text-muted-soft", children: optionalText })
|
|
6617
|
+
]
|
|
6618
|
+
}
|
|
6619
|
+
),
|
|
6620
|
+
helper && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { id: helperId, className: "text-body-sm text-muted", children: helper })
|
|
6621
|
+
]
|
|
6622
|
+
}
|
|
6623
|
+
);
|
|
6624
|
+
}
|
|
6625
|
+
);
|
|
6626
|
+
Label.displayName = "Label";
|
|
6627
|
+
|
|
6628
|
+
// virtual-pkg:src/atoms/FontCombobox/FontCombobox.tsx
|
|
6629
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
6630
|
+
var FILTERS = [
|
|
6631
|
+
{ id: "ALL", label: "All" },
|
|
6632
|
+
{ id: "SANS_SERIF", label: "Sans Serif" },
|
|
6633
|
+
{ id: "SERIF", label: "Serif" },
|
|
6634
|
+
{ id: "DISPLAY", label: "Display" },
|
|
6635
|
+
{ id: "HANDWRITING", label: "Handwriting" },
|
|
6636
|
+
{ id: "MONOSPACE", label: "Monospace" }
|
|
6637
|
+
];
|
|
6638
|
+
var CATEGORY_LABELS = {
|
|
6639
|
+
SANS_SERIF: "Sans Serif",
|
|
6640
|
+
SERIF: "Serif",
|
|
6641
|
+
DISPLAY: "Display",
|
|
6642
|
+
HANDWRITING: "Handwriting",
|
|
6643
|
+
MONOSPACE: "Monospace",
|
|
6644
|
+
OTHER: ""
|
|
6645
|
+
};
|
|
6646
|
+
var ROW_HEIGHT = 40;
|
|
6647
|
+
var LIST_MAX = 320;
|
|
6648
|
+
var OVERSCAN = 4;
|
|
6649
|
+
var CHROME = 136;
|
|
6650
|
+
var GAP2 = 4;
|
|
6651
|
+
var MARGIN = 8;
|
|
6652
|
+
var MIN_PANEL_W = 280;
|
|
6653
|
+
var INITIAL_POS = {
|
|
6654
|
+
left: 0,
|
|
6655
|
+
width: MIN_PANEL_W,
|
|
6656
|
+
top: 0,
|
|
6657
|
+
maxList: LIST_MAX,
|
|
6658
|
+
above: false
|
|
6659
|
+
};
|
|
6660
|
+
function genericFor(category) {
|
|
6661
|
+
switch (category) {
|
|
6662
|
+
case "SERIF":
|
|
6663
|
+
return "serif";
|
|
6664
|
+
case "MONOSPACE":
|
|
6665
|
+
return "monospace";
|
|
6666
|
+
case "HANDWRITING":
|
|
6667
|
+
return "cursive";
|
|
6668
|
+
default:
|
|
6669
|
+
return "sans-serif";
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6672
|
+
function stackFor(name, category) {
|
|
6673
|
+
return `"${name.replace(/"/g, '\\"')}", ${genericFor(category)}`;
|
|
6674
|
+
}
|
|
6675
|
+
var FontCombobox = React53.forwardRef(
|
|
6676
|
+
({
|
|
6677
|
+
label,
|
|
6678
|
+
value,
|
|
6679
|
+
fonts,
|
|
6680
|
+
onChange,
|
|
6681
|
+
onRowVisible,
|
|
6682
|
+
placeholder = "Select a font\u2026",
|
|
6683
|
+
searchPlaceholder,
|
|
6684
|
+
disabled = false,
|
|
6685
|
+
id,
|
|
6686
|
+
className
|
|
6687
|
+
}, ref) => {
|
|
6688
|
+
const uid = React53.useId();
|
|
6689
|
+
const triggerId = id ?? `${uid}-trigger`;
|
|
6690
|
+
const panelId = `${uid}-panel`;
|
|
6691
|
+
const listId = `${uid}-list`;
|
|
6692
|
+
const [open, setOpen] = React53.useState(false);
|
|
6693
|
+
const [rendered, setRendered] = React53.useState(false);
|
|
6694
|
+
const [mounted, setMounted] = React53.useState(false);
|
|
6695
|
+
const [search, setSearch] = React53.useState("");
|
|
6696
|
+
const [category, setCategory] = React53.useState("ALL");
|
|
6697
|
+
const [highlighted, setHighlighted] = React53.useState(0);
|
|
6698
|
+
const [scrollTop, setScrollTop] = React53.useState(0);
|
|
6699
|
+
const [pos, setPos] = React53.useState(INITIAL_POS);
|
|
6700
|
+
const triggerRef = React53.useRef(null);
|
|
6701
|
+
const panelRef = React53.useRef(null);
|
|
6702
|
+
const searchRef = React53.useRef(null);
|
|
6703
|
+
const listRef = React53.useRef(null);
|
|
6704
|
+
const chipsRef = React53.useRef(null);
|
|
6705
|
+
const chipRefs = React53.useRef({});
|
|
6706
|
+
const visibleCb = React53.useRef(onRowVisible);
|
|
6707
|
+
visibleCb.current = onRowVisible;
|
|
6708
|
+
const notifyVisible = React53.useCallback(
|
|
6709
|
+
(name) => visibleCb.current?.(name),
|
|
6710
|
+
[]
|
|
6711
|
+
);
|
|
6712
|
+
React53.useEffect(() => setMounted(true), []);
|
|
6713
|
+
const selectedEntry = React53.useMemo(() => {
|
|
6714
|
+
const needle = value.trim().toLowerCase();
|
|
6715
|
+
if (!needle) return void 0;
|
|
6716
|
+
return fonts.find((f) => f.name.toLowerCase() === needle);
|
|
6717
|
+
}, [fonts, value]);
|
|
6718
|
+
React53.useEffect(() => {
|
|
6719
|
+
if (value) notifyVisible(value);
|
|
6720
|
+
}, [value, notifyVisible]);
|
|
6721
|
+
const filtered = React53.useMemo(() => {
|
|
6722
|
+
const needle = search.trim().toLowerCase();
|
|
6723
|
+
return fonts.filter((f) => {
|
|
6724
|
+
if (category !== "ALL" && f.category !== category) return false;
|
|
6725
|
+
if (needle && !f.name.toLowerCase().includes(needle)) return false;
|
|
6726
|
+
return true;
|
|
6727
|
+
});
|
|
6728
|
+
}, [fonts, search, category]);
|
|
6729
|
+
const selectedIdx = React53.useMemo(
|
|
6730
|
+
() => selectedEntry ? filtered.findIndex((f) => f.name === selectedEntry.name) : -1,
|
|
6731
|
+
[filtered, selectedEntry]
|
|
6732
|
+
);
|
|
6733
|
+
React53.useEffect(() => {
|
|
6734
|
+
if (open) {
|
|
6735
|
+
setRendered(true);
|
|
6736
|
+
return;
|
|
6737
|
+
}
|
|
6738
|
+
const t = window.setTimeout(() => setRendered(false), 260);
|
|
6739
|
+
return () => window.clearTimeout(t);
|
|
6740
|
+
}, [open]);
|
|
6741
|
+
const openPanel = () => {
|
|
6742
|
+
if (disabled) return;
|
|
6743
|
+
setSearch("");
|
|
6744
|
+
setCategory("ALL");
|
|
6745
|
+
setScrollTop(0);
|
|
6746
|
+
setOpen(true);
|
|
6747
|
+
};
|
|
6748
|
+
const closePanel = React53.useCallback((refocus) => {
|
|
6749
|
+
setOpen(false);
|
|
6750
|
+
if (refocus) window.setTimeout(() => triggerRef.current?.focus(), 0);
|
|
6751
|
+
}, []);
|
|
6752
|
+
const updatePosition = React53.useCallback(() => {
|
|
6753
|
+
const el = triggerRef.current;
|
|
6754
|
+
if (!el) return;
|
|
6755
|
+
const r = el.getBoundingClientRect();
|
|
6756
|
+
const vw = window.innerWidth;
|
|
6757
|
+
const vh = window.innerHeight;
|
|
6758
|
+
const width = Math.min(Math.max(r.width, MIN_PANEL_W), vw - MARGIN * 2);
|
|
6759
|
+
const left = Math.min(Math.max(r.left, MARGIN), vw - width - MARGIN);
|
|
6760
|
+
const below = vh - r.bottom - GAP2 - MARGIN;
|
|
6761
|
+
const aboveSpace = r.top - GAP2 - MARGIN;
|
|
6762
|
+
const above = below < CHROME + LIST_MAX && aboveSpace > below;
|
|
6763
|
+
const avail = above ? aboveSpace : below;
|
|
6764
|
+
const maxList = Math.max(ROW_HEIGHT * 3, Math.min(LIST_MAX, avail - CHROME));
|
|
6765
|
+
const next = above ? { left, width, bottom: vh - r.top + GAP2, maxList, above } : { left, width, top: r.bottom + GAP2, maxList, above };
|
|
6766
|
+
setPos(
|
|
6767
|
+
(prev) => prev.left === next.left && prev.width === next.width && prev.top === next.top && prev.bottom === next.bottom && prev.maxList === next.maxList && prev.above === next.above ? prev : next
|
|
6768
|
+
);
|
|
6769
|
+
}, []);
|
|
6770
|
+
React53.useLayoutEffect(() => {
|
|
6771
|
+
if (!open) return;
|
|
6772
|
+
updatePosition();
|
|
6773
|
+
const onScroll = (e) => {
|
|
6774
|
+
if (panelRef.current?.contains(e.target)) return;
|
|
6775
|
+
updatePosition();
|
|
6776
|
+
};
|
|
6777
|
+
window.addEventListener("resize", updatePosition);
|
|
6778
|
+
window.addEventListener("scroll", onScroll, true);
|
|
6779
|
+
return () => {
|
|
6780
|
+
window.removeEventListener("resize", updatePosition);
|
|
6781
|
+
window.removeEventListener("scroll", onScroll, true);
|
|
6782
|
+
};
|
|
6783
|
+
}, [open, updatePosition]);
|
|
6784
|
+
React53.useEffect(() => {
|
|
6785
|
+
if (!open) return;
|
|
6786
|
+
const onPointerDown = (e) => {
|
|
6787
|
+
const target = e.target;
|
|
6788
|
+
if (!target) return;
|
|
6789
|
+
if (panelRef.current?.contains(target) || triggerRef.current?.contains(target)) return;
|
|
6790
|
+
closePanel(false);
|
|
6791
|
+
};
|
|
6792
|
+
const onKey = (e) => {
|
|
6793
|
+
if (e.key === "Escape") {
|
|
6794
|
+
e.stopPropagation();
|
|
6795
|
+
closePanel(true);
|
|
6796
|
+
}
|
|
6797
|
+
};
|
|
6798
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
6799
|
+
document.addEventListener("keydown", onKey, true);
|
|
6800
|
+
return () => {
|
|
6801
|
+
document.removeEventListener("pointerdown", onPointerDown);
|
|
6802
|
+
document.removeEventListener("keydown", onKey, true);
|
|
6803
|
+
};
|
|
6804
|
+
}, [open, closePanel]);
|
|
6805
|
+
React53.useEffect(() => {
|
|
6806
|
+
if (!open) return;
|
|
6807
|
+
const t = window.setTimeout(() => searchRef.current?.focus({ preventScroll: true }), 30);
|
|
6808
|
+
return () => window.clearTimeout(t);
|
|
6809
|
+
}, [open]);
|
|
6810
|
+
React53.useEffect(() => {
|
|
6811
|
+
if (!open) return;
|
|
6812
|
+
setHighlighted(selectedIdx >= 0 ? selectedIdx : 0);
|
|
6813
|
+
}, [open, filtered, selectedIdx]);
|
|
6814
|
+
const listHeight = Math.min(pos.maxList, Math.max(filtered.length, 1) * ROW_HEIGHT);
|
|
6815
|
+
React53.useEffect(() => {
|
|
6816
|
+
const el = listRef.current;
|
|
6817
|
+
if (!open || !el) return;
|
|
6818
|
+
const rowTop = highlighted * ROW_HEIGHT;
|
|
6819
|
+
const rowBottom = rowTop + ROW_HEIGHT;
|
|
6820
|
+
if (rowTop < el.scrollTop) el.scrollTop = rowTop;
|
|
6821
|
+
else if (rowBottom > el.scrollTop + listHeight) el.scrollTop = rowBottom - listHeight;
|
|
6822
|
+
}, [highlighted, open, rendered, listHeight, filtered]);
|
|
6823
|
+
const first = Math.max(0, Math.floor(scrollTop / ROW_HEIGHT) - OVERSCAN);
|
|
6824
|
+
const last = Math.min(
|
|
6825
|
+
filtered.length,
|
|
6826
|
+
Math.ceil((scrollTop + listHeight) / ROW_HEIGHT) + OVERSCAN
|
|
6827
|
+
);
|
|
6828
|
+
const windowRows = filtered.slice(first, last);
|
|
6829
|
+
const padTop = first * ROW_HEIGHT;
|
|
6830
|
+
const padBottom = Math.max(0, (filtered.length - last) * ROW_HEIGHT);
|
|
6831
|
+
const resetScroll = () => {
|
|
6832
|
+
if (listRef.current) listRef.current.scrollTop = 0;
|
|
6833
|
+
setScrollTop(0);
|
|
6834
|
+
};
|
|
6835
|
+
const pickCategory = (next) => {
|
|
6836
|
+
setCategory(next);
|
|
6837
|
+
resetScroll();
|
|
6838
|
+
const el = chipRefs.current[next];
|
|
6839
|
+
if (el && chipsRef.current) {
|
|
6840
|
+
chipsRef.current.scrollTo({ left: Math.max(0, el.offsetLeft - MARGIN), behavior: "smooth" });
|
|
6841
|
+
}
|
|
6842
|
+
};
|
|
6843
|
+
const commit = (entry) => {
|
|
6844
|
+
onChange(entry.name);
|
|
6845
|
+
closePanel(true);
|
|
6846
|
+
};
|
|
6847
|
+
const onSearchKeyDown = (e) => {
|
|
6848
|
+
const max = filtered.length - 1;
|
|
6849
|
+
if (e.key === "ArrowDown") setHighlighted((h) => Math.min(max, h + 1));
|
|
6850
|
+
else if (e.key === "ArrowUp") setHighlighted((h) => Math.max(0, h - 1));
|
|
6851
|
+
else if (e.key === "PageDown") setHighlighted((h) => Math.min(max, h + 7));
|
|
6852
|
+
else if (e.key === "PageUp") setHighlighted((h) => Math.max(0, h - 7));
|
|
6853
|
+
else if (e.key === "Enter") {
|
|
6854
|
+
const entry = filtered[highlighted];
|
|
6855
|
+
if (entry) commit(entry);
|
|
6856
|
+
} else return;
|
|
6857
|
+
e.preventDefault();
|
|
6858
|
+
};
|
|
6859
|
+
const activeId = open && filtered[highlighted] ? `${listId}-opt-${highlighted}` : void 0;
|
|
6860
|
+
const total = fonts.length.toLocaleString();
|
|
6861
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6862
|
+
"div",
|
|
6863
|
+
{
|
|
6864
|
+
ref: panelRef,
|
|
6865
|
+
id: panelId,
|
|
6866
|
+
"data-state": open ? "open" : "closed",
|
|
6867
|
+
className: [
|
|
6868
|
+
"fixed flex flex-col overflow-hidden rounded-lg border border-hairline bg-canvas text-ink shadow-overlay",
|
|
6869
|
+
"transition duration-200 ease-out",
|
|
6870
|
+
pos.above ? "origin-bottom" : "origin-top",
|
|
6871
|
+
"data-[state=open]:visible data-[state=open]:translate-y-0 data-[state=open]:opacity-100",
|
|
6872
|
+
"data-[state=closed]:invisible data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
6873
|
+
pos.above ? "data-[state=closed]:translate-y-1" : "data-[state=closed]:-translate-y-1"
|
|
6874
|
+
].join(" "),
|
|
6875
|
+
style: {
|
|
6876
|
+
left: pos.left,
|
|
6877
|
+
width: pos.width,
|
|
6878
|
+
top: pos.top,
|
|
6879
|
+
bottom: pos.bottom,
|
|
6880
|
+
zIndex: "var(--z-popover, 1300)"
|
|
6881
|
+
},
|
|
6882
|
+
children: [
|
|
6883
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-sm border-b border-hairline-soft p-sm", children: [
|
|
6884
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6885
|
+
Input,
|
|
6886
|
+
{
|
|
6887
|
+
ref: searchRef,
|
|
6888
|
+
size: "md",
|
|
6889
|
+
role: "combobox",
|
|
6890
|
+
"aria-label": "Search fonts",
|
|
6891
|
+
"aria-expanded": open,
|
|
6892
|
+
"aria-controls": listId,
|
|
6893
|
+
"aria-activedescendant": activeId,
|
|
6894
|
+
"aria-autocomplete": "list",
|
|
6895
|
+
autoComplete: "off",
|
|
6896
|
+
spellCheck: false,
|
|
6897
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { name: "search", size: 16 }),
|
|
6898
|
+
placeholder: searchPlaceholder ?? `Search ${total} fonts\u2026`,
|
|
6899
|
+
value: search,
|
|
6900
|
+
onChange: (e) => {
|
|
6901
|
+
setSearch(e.target.value);
|
|
6902
|
+
resetScroll();
|
|
6903
|
+
},
|
|
6904
|
+
onKeyDown: onSearchKeyDown
|
|
6905
|
+
}
|
|
6906
|
+
),
|
|
6907
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6908
|
+
"div",
|
|
6909
|
+
{
|
|
6910
|
+
ref: chipsRef,
|
|
6911
|
+
role: "group",
|
|
6912
|
+
"aria-label": "Filter by category",
|
|
6913
|
+
className: "flex gap-xs overflow-x-auto p-xxs",
|
|
6914
|
+
children: FILTERS.map((f) => {
|
|
6915
|
+
const active = f.id === category;
|
|
6916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6917
|
+
Chip,
|
|
6918
|
+
{
|
|
6919
|
+
ref: (node) => {
|
|
6920
|
+
chipRefs.current[f.id] = node;
|
|
6921
|
+
},
|
|
6922
|
+
size: "sm",
|
|
6923
|
+
selected: active,
|
|
6924
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
6925
|
+
onClick: () => pickCategory(f.id),
|
|
6926
|
+
children: f.label
|
|
6927
|
+
},
|
|
6928
|
+
f.id
|
|
6929
|
+
);
|
|
6930
|
+
})
|
|
6931
|
+
}
|
|
6932
|
+
)
|
|
6933
|
+
] }),
|
|
6934
|
+
rendered && filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6935
|
+
"div",
|
|
6936
|
+
{
|
|
6937
|
+
role: "status",
|
|
6938
|
+
className: "px-md py-lg text-center text-body-sm text-muted",
|
|
6939
|
+
children: fonts.length === 0 ? "No fonts available." : `No fonts match \u201C${search}\u201D.`
|
|
6940
|
+
}
|
|
6941
|
+
) : null,
|
|
6942
|
+
rendered && filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6943
|
+
"div",
|
|
6944
|
+
{
|
|
6945
|
+
ref: listRef,
|
|
6946
|
+
id: listId,
|
|
6947
|
+
role: "listbox",
|
|
6948
|
+
"aria-label": "Fonts",
|
|
6949
|
+
onScroll: (e) => setScrollTop(e.currentTarget.scrollTop),
|
|
6950
|
+
className: "overflow-y-auto px-xs",
|
|
6951
|
+
style: { height: listHeight },
|
|
6952
|
+
children: [
|
|
6953
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { height: padTop }, "aria-hidden": "true" }),
|
|
6954
|
+
windowRows.map((entry, i) => {
|
|
6955
|
+
const idx = first + i;
|
|
6956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6957
|
+
FontRow,
|
|
6958
|
+
{
|
|
6959
|
+
id: `${listId}-opt-${idx}`,
|
|
6960
|
+
entry,
|
|
6961
|
+
index: idx,
|
|
6962
|
+
total: filtered.length,
|
|
6963
|
+
selected: selectedEntry?.name === entry.name,
|
|
6964
|
+
highlighted: idx === highlighted,
|
|
6965
|
+
onSelect: () => commit(entry),
|
|
6966
|
+
onHover: () => setHighlighted(idx),
|
|
6967
|
+
onVisible: notifyVisible
|
|
6968
|
+
},
|
|
6969
|
+
entry.name
|
|
6970
|
+
);
|
|
6971
|
+
}),
|
|
6972
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { height: padBottom }, "aria-hidden": "true" })
|
|
6973
|
+
]
|
|
6974
|
+
}
|
|
6975
|
+
) : null,
|
|
6976
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center justify-between gap-sm border-t border-hairline-soft bg-surface px-md py-xs text-caption text-muted", children: [
|
|
6977
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "truncate", children: [
|
|
6978
|
+
filtered.length.toLocaleString(),
|
|
6979
|
+
" of ",
|
|
6980
|
+
total,
|
|
6981
|
+
" fonts"
|
|
6982
|
+
] }),
|
|
6983
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "shrink-0", children: "\u2191\u2193 \xB7 \u21B5 \xB7 esc" })
|
|
6984
|
+
] })
|
|
6985
|
+
]
|
|
6986
|
+
}
|
|
6987
|
+
);
|
|
6988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6989
|
+
"div",
|
|
6990
|
+
{
|
|
6991
|
+
ref,
|
|
6992
|
+
className: ["flex w-full min-w-0 flex-col gap-xs", className].filter(Boolean).join(" "),
|
|
6993
|
+
children: [
|
|
6994
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Label, { htmlFor: triggerId, children: label }) : null,
|
|
6995
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6996
|
+
Button,
|
|
6997
|
+
{
|
|
6998
|
+
ref: triggerRef,
|
|
6999
|
+
id: triggerId,
|
|
7000
|
+
variant: "field",
|
|
7001
|
+
size: "lg",
|
|
7002
|
+
fullWidth: true,
|
|
7003
|
+
disabled,
|
|
7004
|
+
"aria-haspopup": "listbox",
|
|
7005
|
+
"aria-expanded": open,
|
|
7006
|
+
"aria-controls": panelId,
|
|
7007
|
+
onKeyDown: (e) => {
|
|
7008
|
+
if ((e.key === "ArrowDown" || e.key === "ArrowUp") && !open) {
|
|
7009
|
+
e.preventDefault();
|
|
7010
|
+
openPanel();
|
|
7011
|
+
}
|
|
7012
|
+
},
|
|
7013
|
+
onClick: () => open ? closePanel(false) : openPanel(),
|
|
7014
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7015
|
+
Icon,
|
|
7016
|
+
{
|
|
7017
|
+
name: "chevron-down",
|
|
7018
|
+
size: 16,
|
|
7019
|
+
className: [
|
|
7020
|
+
"text-muted transition-transform duration-200 ease-out",
|
|
7021
|
+
open ? "rotate-180" : ""
|
|
7022
|
+
].filter(Boolean).join(" ")
|
|
7023
|
+
}
|
|
7024
|
+
),
|
|
7025
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7026
|
+
"span",
|
|
7027
|
+
{
|
|
7028
|
+
className: value ? "text-ink" : "text-muted-soft",
|
|
7029
|
+
style: value ? { fontFamily: stackFor(value, selectedEntry?.category) } : void 0,
|
|
7030
|
+
children: value || placeholder
|
|
7031
|
+
}
|
|
7032
|
+
)
|
|
7033
|
+
}
|
|
7034
|
+
),
|
|
7035
|
+
mounted ? (0, import_react_dom7.createPortal)(panel, document.body) : null
|
|
7036
|
+
]
|
|
7037
|
+
}
|
|
7038
|
+
);
|
|
7039
|
+
}
|
|
7040
|
+
);
|
|
7041
|
+
FontCombobox.displayName = "FontCombobox";
|
|
7042
|
+
function FontRow({
|
|
7043
|
+
id,
|
|
7044
|
+
entry,
|
|
7045
|
+
index,
|
|
7046
|
+
total,
|
|
7047
|
+
selected,
|
|
7048
|
+
highlighted,
|
|
7049
|
+
onSelect,
|
|
7050
|
+
onHover,
|
|
7051
|
+
onVisible
|
|
7052
|
+
}) {
|
|
7053
|
+
React53.useEffect(() => {
|
|
7054
|
+
onVisible(entry.name);
|
|
7055
|
+
}, [entry.name, onVisible]);
|
|
7056
|
+
const category = CATEGORY_LABELS[entry.category];
|
|
7057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7058
|
+
Button,
|
|
7059
|
+
{
|
|
7060
|
+
id,
|
|
7061
|
+
variant: "item",
|
|
7062
|
+
size: "md",
|
|
7063
|
+
role: "option",
|
|
7064
|
+
tabIndex: -1,
|
|
7065
|
+
"aria-selected": selected,
|
|
7066
|
+
"aria-posinset": index + 1,
|
|
7067
|
+
"aria-setsize": total,
|
|
7068
|
+
"aria-label": category ? `${entry.name}, ${category}` : entry.name,
|
|
7069
|
+
"data-highlighted": highlighted ? "true" : void 0,
|
|
7070
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
7071
|
+
onClick: onSelect,
|
|
7072
|
+
onMouseEnter: onHover,
|
|
7073
|
+
style: { height: ROW_HEIGHT },
|
|
7074
|
+
className: "cursor-pointer transition-colors duration-150 ease-out enabled:hover:bg-surface-soft data-[highlighted=true]:bg-surface-soft",
|
|
7075
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "inline-flex items-center gap-sm", children: [
|
|
7076
|
+
category ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-caption text-muted", children: category }) : null,
|
|
7077
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "inline-flex size-4 items-center justify-center text-primary", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { name: "check", size: 16 }) : null })
|
|
7078
|
+
] }),
|
|
7079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { style: { fontFamily: stackFor(entry.name, entry.category) }, children: entry.name })
|
|
7080
|
+
}
|
|
7081
|
+
);
|
|
7082
|
+
}
|
|
7083
|
+
|
|
7084
|
+
// virtual-pkg:src/atoms/Footer/Footer.tsx
|
|
7085
|
+
var React55 = __toESM(require("react"));
|
|
6574
7086
|
|
|
6575
7087
|
// virtual-pkg:src/atoms/Logo/Logo.tsx
|
|
6576
7088
|
var import_react3 = __toESM(require("react"));
|
|
6577
|
-
var
|
|
7089
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6578
7090
|
function cn41(...parts) {
|
|
6579
7091
|
return parts.filter(Boolean).join(" ");
|
|
6580
7092
|
}
|
|
@@ -6604,7 +7116,7 @@ var tileSize = {
|
|
|
6604
7116
|
lg: "size-16 rounded-lg"
|
|
6605
7117
|
};
|
|
6606
7118
|
function OrbitMark({ size }) {
|
|
6607
|
-
return /* @__PURE__ */ (0,
|
|
7119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6608
7120
|
"span",
|
|
6609
7121
|
{
|
|
6610
7122
|
"aria-hidden": "true",
|
|
@@ -6613,7 +7125,7 @@ function OrbitMark({ size }) {
|
|
|
6613
7125
|
markSize[size],
|
|
6614
7126
|
ringWidth[size]
|
|
6615
7127
|
),
|
|
6616
|
-
children: /* @__PURE__ */ (0,
|
|
7128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn41("absolute -right-px -top-px rounded-full bg-current", dotSize[size]) })
|
|
6617
7129
|
}
|
|
6618
7130
|
);
|
|
6619
7131
|
}
|
|
@@ -6628,8 +7140,8 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6628
7140
|
className,
|
|
6629
7141
|
...rest
|
|
6630
7142
|
}, ref) => {
|
|
6631
|
-
const glyph2 = mark ?? /* @__PURE__ */ (0,
|
|
6632
|
-
const markNode = tone === "inverse" ? /* @__PURE__ */ (0,
|
|
7143
|
+
const glyph2 = mark ?? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OrbitMark, { size });
|
|
7144
|
+
const markNode = tone === "inverse" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6633
7145
|
"span",
|
|
6634
7146
|
{
|
|
6635
7147
|
"aria-hidden": "true",
|
|
@@ -6639,10 +7151,10 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6639
7151
|
),
|
|
6640
7152
|
children: glyph2
|
|
6641
7153
|
}
|
|
6642
|
-
) : /* @__PURE__ */ (0,
|
|
6643
|
-
const content = /* @__PURE__ */ (0,
|
|
7154
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": "true", className: "inline-flex shrink-0 text-ink", children: glyph2 });
|
|
7155
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
6644
7156
|
markNode,
|
|
6645
|
-
variant === "lockup" ? /* @__PURE__ */ (0,
|
|
7157
|
+
variant === "lockup" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": "true", className: cn41("whitespace-nowrap text-ink", wordSize[size]), children: name }) : null
|
|
6646
7158
|
] });
|
|
6647
7159
|
const base2 = cn41(
|
|
6648
7160
|
"inline-flex items-center",
|
|
@@ -6650,7 +7162,7 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6650
7162
|
className
|
|
6651
7163
|
);
|
|
6652
7164
|
if (href) {
|
|
6653
|
-
return /* @__PURE__ */ (0,
|
|
7165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6654
7166
|
"a",
|
|
6655
7167
|
{
|
|
6656
7168
|
ref,
|
|
@@ -6665,19 +7177,19 @@ var Logo = import_react3.default.forwardRef(
|
|
|
6665
7177
|
}
|
|
6666
7178
|
);
|
|
6667
7179
|
}
|
|
6668
|
-
return /* @__PURE__ */ (0,
|
|
7180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { ref, role: "img", "aria-label": name, className: base2, ...rest, children: content });
|
|
6669
7181
|
}
|
|
6670
7182
|
);
|
|
6671
7183
|
Logo.displayName = "Logo";
|
|
6672
7184
|
|
|
6673
7185
|
// virtual-pkg:src/atoms/Footer/Footer.tsx
|
|
6674
|
-
var
|
|
7186
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
6675
7187
|
var cn42 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6676
7188
|
function Newsletter({ n }) {
|
|
6677
|
-
const id =
|
|
6678
|
-
const [email, setEmail] =
|
|
6679
|
-
const [state, setState] =
|
|
6680
|
-
return /* @__PURE__ */ (0,
|
|
7189
|
+
const id = React55.useId();
|
|
7190
|
+
const [email, setEmail] = React55.useState("");
|
|
7191
|
+
const [state, setState] = React55.useState("idle");
|
|
7192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
6681
7193
|
"form",
|
|
6682
7194
|
{
|
|
6683
7195
|
className: "flex w-full flex-col gap-base rounded-lg border border-hairline bg-canvas p-lg shadow-card",
|
|
@@ -6689,12 +7201,12 @@ function Newsletter({ n }) {
|
|
|
6689
7201
|
setState("done");
|
|
6690
7202
|
},
|
|
6691
7203
|
children: [
|
|
6692
|
-
/* @__PURE__ */ (0,
|
|
6693
|
-
/* @__PURE__ */ (0,
|
|
6694
|
-
n.description ? /* @__PURE__ */ (0,
|
|
7204
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
7205
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h3", { id: `${id}-title`, className: "text-heading-sm text-ink", children: n.title }),
|
|
7206
|
+
n.description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-body-md text-muted", children: n.description }) : null
|
|
6695
7207
|
] }),
|
|
6696
|
-
/* @__PURE__ */ (0,
|
|
6697
|
-
/* @__PURE__ */ (0,
|
|
7208
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-sm sm:flex-row", children: [
|
|
7209
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6698
7210
|
Input,
|
|
6699
7211
|
{
|
|
6700
7212
|
type: "email",
|
|
@@ -6706,16 +7218,16 @@ function Newsletter({ n }) {
|
|
|
6706
7218
|
setEmail(e.target.value);
|
|
6707
7219
|
if (state === "done") setState("idle");
|
|
6708
7220
|
},
|
|
6709
|
-
leading: /* @__PURE__ */ (0,
|
|
7221
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { name: "mail", size: 16 })
|
|
6710
7222
|
}
|
|
6711
7223
|
) }),
|
|
6712
|
-
/* @__PURE__ */ (0,
|
|
7224
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Button, { type: "submit", variant: "primary", loading: state === "loading", children: state === "done" ? "Subscribed" : n.buttonLabel ?? "Subscribe" })
|
|
6713
7225
|
] })
|
|
6714
7226
|
]
|
|
6715
7227
|
}
|
|
6716
7228
|
);
|
|
6717
7229
|
}
|
|
6718
|
-
var Footer =
|
|
7230
|
+
var Footer = React55.forwardRef(
|
|
6719
7231
|
({
|
|
6720
7232
|
variant = "full",
|
|
6721
7233
|
brandName = "Northline",
|
|
@@ -6728,9 +7240,9 @@ var Footer = React53.forwardRef(
|
|
|
6728
7240
|
className,
|
|
6729
7241
|
...rest
|
|
6730
7242
|
}, ref) => {
|
|
6731
|
-
const legal = legalLinks.length ? /* @__PURE__ */ (0,
|
|
7243
|
+
const legal = legalLinks.length ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("nav", { "aria-label": "Legal", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("ul", { className: "flex flex-wrap items-center gap-x-lg gap-y-xs", children: legalLinks.map((l) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Link, { href: l.href, variant: "quiet", className: "text-body-sm", children: l.label }) }, l.label)) }) }) : null;
|
|
6732
7244
|
if (variant === "minimal") {
|
|
6733
|
-
return /* @__PURE__ */ (0,
|
|
7245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
6734
7246
|
"footer",
|
|
6735
7247
|
{
|
|
6736
7248
|
ref,
|
|
@@ -6740,32 +7252,32 @@ var Footer = React53.forwardRef(
|
|
|
6740
7252
|
),
|
|
6741
7253
|
...rest,
|
|
6742
7254
|
children: [
|
|
6743
|
-
/* @__PURE__ */ (0,
|
|
7255
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Logo, { size: "sm", name: brandName, href: brandHref }),
|
|
6744
7256
|
legal
|
|
6745
7257
|
]
|
|
6746
7258
|
}
|
|
6747
7259
|
);
|
|
6748
7260
|
}
|
|
6749
|
-
return /* @__PURE__ */ (0,
|
|
7261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
6750
7262
|
"footer",
|
|
6751
7263
|
{
|
|
6752
7264
|
ref,
|
|
6753
7265
|
className: cn42("w-full border-t border-hairline bg-canvas px-lg py-xl text-ink", className),
|
|
6754
7266
|
...rest,
|
|
6755
7267
|
children: [
|
|
6756
|
-
/* @__PURE__ */ (0,
|
|
6757
|
-
/* @__PURE__ */ (0,
|
|
6758
|
-
/* @__PURE__ */ (0,
|
|
6759
|
-
tagline ? /* @__PURE__ */ (0,
|
|
7268
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex w-full flex-col gap-xl md:flex-row md:justify-between", children: [
|
|
7269
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-base md:w-1/3", children: [
|
|
7270
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Logo, { size: "md", name: brandName, href: brandHref }),
|
|
7271
|
+
tagline ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-body-md text-body", children: tagline }) : null
|
|
6760
7272
|
] }),
|
|
6761
|
-
columns.length ? /* @__PURE__ */ (0,
|
|
6762
|
-
/* @__PURE__ */ (0,
|
|
6763
|
-
/* @__PURE__ */ (0,
|
|
7273
|
+
columns.length ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("nav", { "aria-label": "Footer", className: "grid grid-cols-2 gap-xl sm:grid-cols-3", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-md", children: [
|
|
7274
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h3", { className: "text-body-md font-weight-label text-ink", children: col.title }),
|
|
7275
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("ul", { className: "flex flex-col gap-sm", children: col.links.map((l) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Link, { href: l.href, variant: "quiet", className: "text-body-sm", children: l.label }) }, l.label)) })
|
|
6764
7276
|
] }, col.title)) }) : null
|
|
6765
7277
|
] }),
|
|
6766
|
-
newsletter ? /* @__PURE__ */ (0,
|
|
6767
|
-
legal || copyright ? /* @__PURE__ */ (0,
|
|
6768
|
-
copyright ? /* @__PURE__ */ (0,
|
|
7278
|
+
newsletter ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mt-xl w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Newsletter, { n: newsletter }) }) : null,
|
|
7279
|
+
legal || copyright ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "mt-xl flex w-full flex-wrap items-center justify-between gap-base border-t border-hairline-soft pt-base", children: [
|
|
7280
|
+
copyright ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-body-sm text-muted", children: copyright }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", {}),
|
|
6769
7281
|
legal
|
|
6770
7282
|
] }) : null
|
|
6771
7283
|
]
|
|
@@ -6776,69 +7288,16 @@ var Footer = React53.forwardRef(
|
|
|
6776
7288
|
Footer.displayName = "Footer";
|
|
6777
7289
|
|
|
6778
7290
|
// virtual-pkg:src/atoms/Form/Form.tsx
|
|
6779
|
-
var
|
|
7291
|
+
var React59 = __toESM(require("react"));
|
|
6780
7292
|
|
|
6781
7293
|
// virtual-pkg:src/atoms/FormDesktop/FormDesktop.tsx
|
|
6782
|
-
var
|
|
6783
|
-
|
|
6784
|
-
// virtual-pkg:src/atoms/FormField/FormField.tsx
|
|
6785
|
-
var React55 = __toESM(require("react"));
|
|
6786
|
-
|
|
6787
|
-
// virtual-pkg:src/atoms/Label/Label.tsx
|
|
6788
|
-
var React54 = __toESM(require("react"));
|
|
6789
|
-
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6790
|
-
var Label = React54.forwardRef(
|
|
6791
|
-
({
|
|
6792
|
-
required = false,
|
|
6793
|
-
optional = false,
|
|
6794
|
-
helper,
|
|
6795
|
-
helperId,
|
|
6796
|
-
disabled = false,
|
|
6797
|
-
className,
|
|
6798
|
-
children,
|
|
6799
|
-
...rest
|
|
6800
|
-
}, ref) => {
|
|
6801
|
-
const optionalText = typeof optional === "string" ? optional : "Optional";
|
|
6802
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
6803
|
-
"div",
|
|
6804
|
-
{
|
|
6805
|
-
className: [
|
|
6806
|
-
"inline-flex flex-col gap-xxs",
|
|
6807
|
-
disabled ? "opacity-50" : "",
|
|
6808
|
-
className
|
|
6809
|
-
].filter(Boolean).join(" "),
|
|
6810
|
-
children: [
|
|
6811
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
6812
|
-
"label",
|
|
6813
|
-
{
|
|
6814
|
-
ref,
|
|
6815
|
-
className: [
|
|
6816
|
-
"inline-flex items-baseline gap-sm text-label text-ink",
|
|
6817
|
-
disabled ? "cursor-not-allowed" : "cursor-default"
|
|
6818
|
-
].join(" "),
|
|
6819
|
-
...rest,
|
|
6820
|
-
children: [
|
|
6821
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { children: [
|
|
6822
|
-
children,
|
|
6823
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "ml-xxs text-semantic-error", "aria-hidden": "true", children: "*" }),
|
|
6824
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "sr-only", children: " (required)" })
|
|
6825
|
-
] }),
|
|
6826
|
-
optional && !required && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-body-sm text-muted-soft", children: optionalText })
|
|
6827
|
-
]
|
|
6828
|
-
}
|
|
6829
|
-
),
|
|
6830
|
-
helper && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { id: helperId, className: "text-body-sm text-muted", children: helper })
|
|
6831
|
-
]
|
|
6832
|
-
}
|
|
6833
|
-
);
|
|
6834
|
-
}
|
|
6835
|
-
);
|
|
6836
|
-
Label.displayName = "Label";
|
|
7294
|
+
var React57 = __toESM(require("react"));
|
|
6837
7295
|
|
|
6838
7296
|
// virtual-pkg:src/atoms/FormField/FormField.tsx
|
|
6839
|
-
var
|
|
7297
|
+
var React56 = __toESM(require("react"));
|
|
7298
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
6840
7299
|
var cn43 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6841
|
-
var FormField =
|
|
7300
|
+
var FormField = React56.forwardRef(
|
|
6842
7301
|
({
|
|
6843
7302
|
label,
|
|
6844
7303
|
helper,
|
|
@@ -6855,14 +7314,14 @@ var FormField = React55.forwardRef(
|
|
|
6855
7314
|
containerClassName,
|
|
6856
7315
|
...inputProps
|
|
6857
7316
|
}, ref) => {
|
|
6858
|
-
const autoId =
|
|
7317
|
+
const autoId = React56.useId();
|
|
6859
7318
|
const fieldId = id ?? `field-${autoId}`;
|
|
6860
7319
|
const messageId = `${fieldId}-message`;
|
|
6861
7320
|
const descriptionId = `${fieldId}-description`;
|
|
6862
7321
|
const resolved = status ?? (error ? "error" : successMessage ? "success" : "default");
|
|
6863
7322
|
const message = resolved === "error" && error ? error : resolved === "success" && successMessage ? successMessage : helper;
|
|
6864
7323
|
const describedBy = [description ? descriptionId : null, message ? messageId : null].filter(Boolean).join(" ") || void 0;
|
|
6865
|
-
const input = /* @__PURE__ */ (0,
|
|
7324
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6866
7325
|
Input,
|
|
6867
7326
|
{
|
|
6868
7327
|
ref,
|
|
@@ -6874,7 +7333,7 @@ var FormField = React55.forwardRef(
|
|
|
6874
7333
|
...inputProps
|
|
6875
7334
|
}
|
|
6876
7335
|
);
|
|
6877
|
-
const messageLine = /* @__PURE__ */ (0,
|
|
7336
|
+
const messageLine = /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6878
7337
|
"p",
|
|
6879
7338
|
{
|
|
6880
7339
|
id: messageId,
|
|
@@ -6885,12 +7344,12 @@ var FormField = React55.forwardRef(
|
|
|
6885
7344
|
resolved === "error" ? "text-semantic-error" : resolved === "success" ? "text-semantic-success" : "text-muted"
|
|
6886
7345
|
),
|
|
6887
7346
|
children: [
|
|
6888
|
-
resolved === "success" && successMessage ? /* @__PURE__ */ (0,
|
|
7347
|
+
resolved === "success" && successMessage ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "check", size: 14 }) : null,
|
|
6889
7348
|
message
|
|
6890
7349
|
]
|
|
6891
7350
|
}
|
|
6892
7351
|
);
|
|
6893
|
-
const labelNode = /* @__PURE__ */ (0,
|
|
7352
|
+
const labelNode = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6894
7353
|
Label,
|
|
6895
7354
|
{
|
|
6896
7355
|
htmlFor: fieldId,
|
|
@@ -6903,7 +7362,7 @@ var FormField = React55.forwardRef(
|
|
|
6903
7362
|
}
|
|
6904
7363
|
);
|
|
6905
7364
|
if (layout === "inline") {
|
|
6906
|
-
return /* @__PURE__ */ (0,
|
|
7365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6907
7366
|
"div",
|
|
6908
7367
|
{
|
|
6909
7368
|
className: cn43(
|
|
@@ -6911,10 +7370,10 @@ var FormField = React55.forwardRef(
|
|
|
6911
7370
|
containerClassName
|
|
6912
7371
|
),
|
|
6913
7372
|
children: [
|
|
6914
|
-
/* @__PURE__ */ (0,
|
|
6915
|
-
/* @__PURE__ */ (0,
|
|
6916
|
-
/* @__PURE__ */ (0,
|
|
6917
|
-
addon ? /* @__PURE__ */ (0,
|
|
7373
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex min-h-8 items-center", children: labelNode }),
|
|
7374
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
7375
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
|
|
7376
|
+
addon ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "inline-flex shrink-0", children: addon }) : null,
|
|
6918
7377
|
input
|
|
6919
7378
|
] }),
|
|
6920
7379
|
message ? messageLine : null
|
|
@@ -6923,10 +7382,10 @@ var FormField = React55.forwardRef(
|
|
|
6923
7382
|
}
|
|
6924
7383
|
);
|
|
6925
7384
|
}
|
|
6926
|
-
return /* @__PURE__ */ (0,
|
|
7385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn43("flex w-full min-w-0 flex-col gap-sm rounded-none", containerClassName), children: [
|
|
6927
7386
|
labelNode,
|
|
6928
|
-
addon ? /* @__PURE__ */ (0,
|
|
6929
|
-
/* @__PURE__ */ (0,
|
|
7387
|
+
addon ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex min-w-0 items-center gap-sm", children: [
|
|
7388
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "inline-flex shrink-0", children: addon }),
|
|
6930
7389
|
input
|
|
6931
7390
|
] }) : input,
|
|
6932
7391
|
messageLine
|
|
@@ -6936,7 +7395,7 @@ var FormField = React55.forwardRef(
|
|
|
6936
7395
|
FormField.displayName = "FormField";
|
|
6937
7396
|
|
|
6938
7397
|
// virtual-pkg:src/atoms/FormDesktop/FormDesktop.tsx
|
|
6939
|
-
var
|
|
7398
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
6940
7399
|
var DEFAULT_TIMEZONES = [
|
|
6941
7400
|
{ value: "utc-8", label: "GMT-8:00 \u2013 Pacific Time" },
|
|
6942
7401
|
{ value: "utc-5", label: "GMT-5:00 \u2013 Eastern Time" },
|
|
@@ -6946,7 +7405,7 @@ var DEFAULT_TIMEZONES = [
|
|
|
6946
7405
|
{ value: "utc+9", label: "GMT+9:00 \u2013 Japan Standard Time" }
|
|
6947
7406
|
];
|
|
6948
7407
|
var cn44 = (...parts) => parts.filter(Boolean).join(" ");
|
|
6949
|
-
var FormDesktop =
|
|
7408
|
+
var FormDesktop = React57.forwardRef(
|
|
6950
7409
|
({
|
|
6951
7410
|
name,
|
|
6952
7411
|
onNameChange,
|
|
@@ -6968,10 +7427,10 @@ var FormDesktop = React56.forwardRef(
|
|
|
6968
7427
|
onSubmit,
|
|
6969
7428
|
...rest
|
|
6970
7429
|
}, ref) => {
|
|
6971
|
-
const autoId =
|
|
7430
|
+
const autoId = React57.useId();
|
|
6972
7431
|
const tzLabelId = `${autoId}-tz-label`;
|
|
6973
7432
|
const tzMessageId = `${autoId}-tz-message`;
|
|
6974
|
-
return /* @__PURE__ */ (0,
|
|
7433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6975
7434
|
"form",
|
|
6976
7435
|
{
|
|
6977
7436
|
ref,
|
|
@@ -6985,8 +7444,8 @@ var FormDesktop = React56.forwardRef(
|
|
|
6985
7444
|
className
|
|
6986
7445
|
),
|
|
6987
7446
|
...rest,
|
|
6988
|
-
children: /* @__PURE__ */ (0,
|
|
6989
|
-
/* @__PURE__ */ (0,
|
|
7447
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col divide-y divide-hairline-soft", children: [
|
|
7448
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6990
7449
|
FormField,
|
|
6991
7450
|
{
|
|
6992
7451
|
layout: "inline",
|
|
@@ -6996,17 +7455,17 @@ var FormDesktop = React56.forwardRef(
|
|
|
6996
7455
|
onChange: (e) => onNameChange?.(e.target.value),
|
|
6997
7456
|
error: errors.name,
|
|
6998
7457
|
disabled,
|
|
6999
|
-
addon: /* @__PURE__ */ (0,
|
|
7458
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7000
7459
|
"span",
|
|
7001
7460
|
{
|
|
7002
7461
|
"aria-hidden": "true",
|
|
7003
7462
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-semantic-info-soft text-semantic-info",
|
|
7004
|
-
children: /* @__PURE__ */ (0,
|
|
7463
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: icon, size: 18 })
|
|
7005
7464
|
}
|
|
7006
7465
|
)
|
|
7007
7466
|
}
|
|
7008
7467
|
) }),
|
|
7009
|
-
/* @__PURE__ */ (0,
|
|
7468
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7010
7469
|
FormField,
|
|
7011
7470
|
{
|
|
7012
7471
|
layout: "inline",
|
|
@@ -7019,10 +7478,10 @@ var FormDesktop = React56.forwardRef(
|
|
|
7019
7478
|
disabled
|
|
7020
7479
|
}
|
|
7021
7480
|
) }),
|
|
7022
|
-
/* @__PURE__ */ (0,
|
|
7023
|
-
/* @__PURE__ */ (0,
|
|
7024
|
-
/* @__PURE__ */ (0,
|
|
7025
|
-
/* @__PURE__ */ (0,
|
|
7481
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "px-base py-md", children: /* @__PURE__ */ (0, import_jsx_runtime57.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: [
|
|
7482
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex min-h-8 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Label, { id: tzLabelId, disabled, children: timezoneLabel }) }),
|
|
7483
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
7484
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7026
7485
|
Dropdown,
|
|
7027
7486
|
{
|
|
7028
7487
|
options: timezoneOptions,
|
|
@@ -7034,7 +7493,7 @@ var FormDesktop = React56.forwardRef(
|
|
|
7034
7493
|
disabled
|
|
7035
7494
|
}
|
|
7036
7495
|
),
|
|
7037
|
-
errors.timezone ? /* @__PURE__ */ (0,
|
|
7496
|
+
errors.timezone ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { id: tzMessageId, "aria-live": "polite", className: "text-body-sm text-semantic-error", children: errors.timezone }) : null
|
|
7038
7497
|
] })
|
|
7039
7498
|
] }) })
|
|
7040
7499
|
] })
|
|
@@ -7045,8 +7504,8 @@ var FormDesktop = React56.forwardRef(
|
|
|
7045
7504
|
FormDesktop.displayName = "FormDesktop";
|
|
7046
7505
|
|
|
7047
7506
|
// virtual-pkg:src/atoms/FormMobile/FormMobile.tsx
|
|
7048
|
-
var
|
|
7049
|
-
var
|
|
7507
|
+
var React58 = __toESM(require("react"));
|
|
7508
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7050
7509
|
var TIMEZONES = [
|
|
7051
7510
|
{ value: "utc-8", label: "GMT-8:00 \u2013 Pacific Time" },
|
|
7052
7511
|
{ value: "utc-5", label: "GMT-5:00 \u2013 Eastern Time" },
|
|
@@ -7056,7 +7515,7 @@ var TIMEZONES = [
|
|
|
7056
7515
|
{ value: "utc+9", label: "GMT+9:00 \u2013 Japan Standard Time" }
|
|
7057
7516
|
];
|
|
7058
7517
|
var cn45 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7059
|
-
var FormMobile =
|
|
7518
|
+
var FormMobile = React58.forwardRef(
|
|
7060
7519
|
({
|
|
7061
7520
|
name,
|
|
7062
7521
|
onNameChange,
|
|
@@ -7078,9 +7537,9 @@ var FormMobile = React57.forwardRef(
|
|
|
7078
7537
|
onSubmit,
|
|
7079
7538
|
...rest
|
|
7080
7539
|
}, ref) => {
|
|
7081
|
-
const autoId =
|
|
7540
|
+
const autoId = React58.useId();
|
|
7082
7541
|
const tzLabelId = `${autoId}-tz-label`;
|
|
7083
|
-
return /* @__PURE__ */ (0,
|
|
7542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
7084
7543
|
"form",
|
|
7085
7544
|
{
|
|
7086
7545
|
ref,
|
|
@@ -7095,7 +7554,7 @@ var FormMobile = React57.forwardRef(
|
|
|
7095
7554
|
),
|
|
7096
7555
|
...rest,
|
|
7097
7556
|
children: [
|
|
7098
|
-
/* @__PURE__ */ (0,
|
|
7557
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7099
7558
|
FormField,
|
|
7100
7559
|
{
|
|
7101
7560
|
label: nameLabel,
|
|
@@ -7104,17 +7563,17 @@ var FormMobile = React57.forwardRef(
|
|
|
7104
7563
|
onChange: (e) => onNameChange?.(e.target.value),
|
|
7105
7564
|
error: errors.name,
|
|
7106
7565
|
disabled,
|
|
7107
|
-
addon: /* @__PURE__ */ (0,
|
|
7566
|
+
addon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7108
7567
|
"span",
|
|
7109
7568
|
{
|
|
7110
7569
|
"aria-hidden": "true",
|
|
7111
7570
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-semantic-info-soft text-semantic-info",
|
|
7112
|
-
children: /* @__PURE__ */ (0,
|
|
7571
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: icon, size: 18 })
|
|
7113
7572
|
}
|
|
7114
7573
|
)
|
|
7115
7574
|
}
|
|
7116
7575
|
),
|
|
7117
|
-
/* @__PURE__ */ (0,
|
|
7576
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7118
7577
|
FormField,
|
|
7119
7578
|
{
|
|
7120
7579
|
label: identifierLabel,
|
|
@@ -7126,9 +7585,9 @@ var FormMobile = React57.forwardRef(
|
|
|
7126
7585
|
disabled
|
|
7127
7586
|
}
|
|
7128
7587
|
),
|
|
7129
|
-
/* @__PURE__ */ (0,
|
|
7130
|
-
/* @__PURE__ */ (0,
|
|
7131
|
-
/* @__PURE__ */ (0,
|
|
7588
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex w-full min-w-0 flex-col gap-sm", children: [
|
|
7589
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Label, { id: tzLabelId, disabled, children: timezoneLabel }),
|
|
7590
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7132
7591
|
Dropdown,
|
|
7133
7592
|
{
|
|
7134
7593
|
options: timezoneOptions,
|
|
@@ -7140,7 +7599,7 @@ var FormMobile = React57.forwardRef(
|
|
|
7140
7599
|
disabled
|
|
7141
7600
|
}
|
|
7142
7601
|
),
|
|
7143
|
-
errors.timezone ? /* @__PURE__ */ (0,
|
|
7602
|
+
errors.timezone ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { "aria-live": "polite", className: "text-body-sm text-semantic-error", children: errors.timezone }) : null
|
|
7144
7603
|
] })
|
|
7145
7604
|
]
|
|
7146
7605
|
}
|
|
@@ -7150,23 +7609,23 @@ var FormMobile = React57.forwardRef(
|
|
|
7150
7609
|
FormMobile.displayName = "FormMobile";
|
|
7151
7610
|
|
|
7152
7611
|
// virtual-pkg:src/atoms/Form/Form.tsx
|
|
7153
|
-
var
|
|
7154
|
-
var Form =
|
|
7155
|
-
({ wrapperClassName, ...props }, ref) => /* @__PURE__ */ (0,
|
|
7156
|
-
/* @__PURE__ */ (0,
|
|
7157
|
-
/* @__PURE__ */ (0,
|
|
7612
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7613
|
+
var Form = React59.forwardRef(
|
|
7614
|
+
({ wrapperClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { ref, className: ["w-full min-w-0", wrapperClassName].filter(Boolean).join(" "), children: [
|
|
7615
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "hidden w-full md:block", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FormDesktop, { ...props }) }),
|
|
7616
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "w-full md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FormMobile, { ...props }) })
|
|
7158
7617
|
] })
|
|
7159
7618
|
);
|
|
7160
7619
|
Form.displayName = "Form";
|
|
7161
7620
|
|
|
7162
7621
|
// virtual-pkg:src/atoms/HeroSection/HeroSection.tsx
|
|
7163
|
-
var
|
|
7622
|
+
var React62 = __toESM(require("react"));
|
|
7164
7623
|
|
|
7165
7624
|
// virtual-pkg:src/atoms/HeroSectionDesktop/HeroSectionDesktop.tsx
|
|
7166
|
-
var
|
|
7167
|
-
var
|
|
7625
|
+
var React60 = __toESM(require("react"));
|
|
7626
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7168
7627
|
var cn46 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7169
|
-
var HeroSectionDesktop =
|
|
7628
|
+
var HeroSectionDesktop = React60.forwardRef(
|
|
7170
7629
|
({
|
|
7171
7630
|
title,
|
|
7172
7631
|
description,
|
|
@@ -7178,7 +7637,7 @@ var HeroSectionDesktop = React59.forwardRef(
|
|
|
7178
7637
|
inset = true,
|
|
7179
7638
|
className,
|
|
7180
7639
|
...rest
|
|
7181
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7640
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7182
7641
|
"section",
|
|
7183
7642
|
{
|
|
7184
7643
|
ref,
|
|
@@ -7189,7 +7648,7 @@ var HeroSectionDesktop = React59.forwardRef(
|
|
|
7189
7648
|
className
|
|
7190
7649
|
),
|
|
7191
7650
|
...rest,
|
|
7192
|
-
children: /* @__PURE__ */ (0,
|
|
7651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
7193
7652
|
"div",
|
|
7194
7653
|
{
|
|
7195
7654
|
className: cn46(
|
|
@@ -7197,19 +7656,19 @@ var HeroSectionDesktop = React59.forwardRef(
|
|
|
7197
7656
|
media ? "grid-cols-2" : "grid-cols-1"
|
|
7198
7657
|
),
|
|
7199
7658
|
children: [
|
|
7200
|
-
/* @__PURE__ */ (0,
|
|
7201
|
-
/* @__PURE__ */ (0,
|
|
7202
|
-
description ? /* @__PURE__ */ (0,
|
|
7203
|
-
primaryAction || secondaryAction ? /* @__PURE__ */ (0,
|
|
7204
|
-
primaryAction ? /* @__PURE__ */ (0,
|
|
7205
|
-
secondaryAction ? /* @__PURE__ */ (0,
|
|
7659
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex min-w-0 flex-col items-start", children: [
|
|
7660
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h1", { className: "text-heading-lg text-ink lg:text-display-lg", children: title }),
|
|
7661
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "mt-base text-body-lg text-body", children: description }) : null,
|
|
7662
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "mt-lg flex flex-wrap items-center gap-md", children: [
|
|
7663
|
+
primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { variant: "primary", size: "lg", onClick: primaryAction.onClick, children: primaryAction.label }) : null,
|
|
7664
|
+
secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { variant: "secondary", size: "lg", onClick: secondaryAction.onClick, children: secondaryAction.label }) : null
|
|
7206
7665
|
] }) : null,
|
|
7207
|
-
proof ? /* @__PURE__ */ (0,
|
|
7208
|
-
/* @__PURE__ */ (0,
|
|
7209
|
-
/* @__PURE__ */ (0,
|
|
7666
|
+
proof ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "mt-lg flex items-center gap-md", children: [
|
|
7667
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "inline-flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(AvatarGroup, { items: proof.avatars, size: "md", layout: "stacked", max: 4 }) }),
|
|
7668
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-body-md text-body [&_strong]:font-weight-label [&_strong]:text-ink", children: proof.text })
|
|
7210
7669
|
] }) : null
|
|
7211
7670
|
] }),
|
|
7212
|
-
media ? /* @__PURE__ */ (0,
|
|
7671
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex min-w-0 items-center justify-center", children: media }) : null
|
|
7213
7672
|
]
|
|
7214
7673
|
}
|
|
7215
7674
|
)
|
|
@@ -7219,10 +7678,10 @@ var HeroSectionDesktop = React59.forwardRef(
|
|
|
7219
7678
|
HeroSectionDesktop.displayName = "HeroSectionDesktop";
|
|
7220
7679
|
|
|
7221
7680
|
// virtual-pkg:src/atoms/HeroSectionMobile/HeroSectionMobile.tsx
|
|
7222
|
-
var
|
|
7223
|
-
var
|
|
7681
|
+
var React61 = __toESM(require("react"));
|
|
7682
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7224
7683
|
var cn47 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7225
|
-
var HeroSectionMobile =
|
|
7684
|
+
var HeroSectionMobile = React61.forwardRef(
|
|
7226
7685
|
({
|
|
7227
7686
|
title,
|
|
7228
7687
|
description,
|
|
@@ -7234,7 +7693,7 @@ var HeroSectionMobile = React60.forwardRef(
|
|
|
7234
7693
|
inset = true,
|
|
7235
7694
|
className,
|
|
7236
7695
|
...rest
|
|
7237
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7696
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7238
7697
|
"section",
|
|
7239
7698
|
{
|
|
7240
7699
|
ref,
|
|
@@ -7246,16 +7705,16 @@ var HeroSectionMobile = React60.forwardRef(
|
|
|
7246
7705
|
),
|
|
7247
7706
|
...rest,
|
|
7248
7707
|
children: [
|
|
7249
|
-
/* @__PURE__ */ (0,
|
|
7250
|
-
description ? /* @__PURE__ */ (0,
|
|
7251
|
-
primaryAction || secondaryAction ? /* @__PURE__ */ (0,
|
|
7252
|
-
primaryAction ? /* @__PURE__ */ (0,
|
|
7253
|
-
secondaryAction ? /* @__PURE__ */ (0,
|
|
7708
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("h1", { className: "text-heading-md text-ink", children: title }),
|
|
7709
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "mt-sm text-body-lg text-muted", children: description }) : null,
|
|
7710
|
+
primaryAction || secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "mt-lg flex flex-col gap-sm", children: [
|
|
7711
|
+
primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { variant: "primary", size: "lg", fullWidth: true, onClick: primaryAction.onClick, children: primaryAction.label }) : null,
|
|
7712
|
+
secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { variant: "secondary", size: "lg", fullWidth: true, onClick: secondaryAction.onClick, children: secondaryAction.label }) : null
|
|
7254
7713
|
] }) : null,
|
|
7255
|
-
media ? /* @__PURE__ */ (0,
|
|
7256
|
-
proof ? /* @__PURE__ */ (0,
|
|
7257
|
-
/* @__PURE__ */ (0,
|
|
7258
|
-
/* @__PURE__ */ (0,
|
|
7714
|
+
media ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "mt-base w-full", children: media }) : null,
|
|
7715
|
+
proof ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "mt-base flex items-center gap-md", children: [
|
|
7716
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "inline-flex shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(AvatarGroup, { items: proof.avatars, size: "md", layout: "stacked", max: 4 }) }),
|
|
7717
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "text-body-sm text-body [&_strong]:font-weight-label [&_strong]:text-ink", children: proof.text })
|
|
7259
7718
|
] }) : null
|
|
7260
7719
|
]
|
|
7261
7720
|
}
|
|
@@ -7264,20 +7723,20 @@ var HeroSectionMobile = React60.forwardRef(
|
|
|
7264
7723
|
HeroSectionMobile.displayName = "HeroSectionMobile";
|
|
7265
7724
|
|
|
7266
7725
|
// virtual-pkg:src/atoms/HeroSection/HeroSection.tsx
|
|
7267
|
-
var
|
|
7268
|
-
var HeroSection =
|
|
7269
|
-
({ className, surface = "canvas", inset = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
7270
|
-
/* @__PURE__ */ (0,
|
|
7271
|
-
/* @__PURE__ */ (0,
|
|
7726
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
7727
|
+
var HeroSection = React62.forwardRef(
|
|
7728
|
+
({ className, surface = "canvas", inset = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
7729
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeroSectionDesktop, { surface, inset, ...props }) }),
|
|
7730
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(HeroSectionMobile, { surface, inset, ...props }) })
|
|
7272
7731
|
] })
|
|
7273
7732
|
);
|
|
7274
7733
|
HeroSection.displayName = "HeroSection";
|
|
7275
7734
|
|
|
7276
7735
|
// virtual-pkg:src/atoms/IssueCard/IssueCard.tsx
|
|
7277
|
-
var
|
|
7278
|
-
var
|
|
7736
|
+
var React63 = __toESM(require("react"));
|
|
7737
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
7279
7738
|
var MAX_LABELS = 3;
|
|
7280
|
-
var IssueCard =
|
|
7739
|
+
var IssueCard = React63.forwardRef(
|
|
7281
7740
|
({
|
|
7282
7741
|
id,
|
|
7283
7742
|
title,
|
|
@@ -7319,7 +7778,7 @@ var IssueCard = React62.forwardRef(
|
|
|
7319
7778
|
onClick(event);
|
|
7320
7779
|
}
|
|
7321
7780
|
};
|
|
7322
|
-
return /* @__PURE__ */ (0,
|
|
7781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
7323
7782
|
"div",
|
|
7324
7783
|
{
|
|
7325
7784
|
ref,
|
|
@@ -7328,32 +7787,32 @@ var IssueCard = React62.forwardRef(
|
|
|
7328
7787
|
className: rootClass,
|
|
7329
7788
|
...rest,
|
|
7330
7789
|
children: [
|
|
7331
|
-
/* @__PURE__ */ (0,
|
|
7332
|
-
/* @__PURE__ */ (0,
|
|
7333
|
-
priority ? /* @__PURE__ */ (0,
|
|
7334
|
-
/* @__PURE__ */ (0,
|
|
7790
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-start justify-between gap-sm", children: [
|
|
7791
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex min-w-0 items-center gap-xs", children: [
|
|
7792
|
+
priority ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "flex shrink-0 items-center", children: priority }) : null,
|
|
7793
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "truncate text-caption tabular-nums text-muted", children: id })
|
|
7335
7794
|
] }),
|
|
7336
|
-
actions ? /* @__PURE__ */ (0,
|
|
7795
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime63.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
|
|
7337
7796
|
] }),
|
|
7338
|
-
/* @__PURE__ */ (0,
|
|
7339
|
-
status ? /* @__PURE__ */ (0,
|
|
7340
|
-
/* @__PURE__ */ (0,
|
|
7797
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-start gap-xs", children: [
|
|
7798
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "mt-xxs flex shrink-0 items-center", children: status }) : null,
|
|
7799
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "line-clamp-2 min-w-0 text-body-md text-ink", children: title })
|
|
7341
7800
|
] }),
|
|
7342
|
-
visibleLabels.length > 0 ? /* @__PURE__ */ (0,
|
|
7343
|
-
visibleLabels.map((label) => /* @__PURE__ */ (0,
|
|
7344
|
-
hiddenLabelCount > 0 ? /* @__PURE__ */ (0,
|
|
7345
|
-
/* @__PURE__ */ (0,
|
|
7801
|
+
visibleLabels.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "mt-xxs flex flex-wrap items-center gap-xs", children: [
|
|
7802
|
+
visibleLabels.map((label) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Badge, { tone: label.tone, size: "sm", children: label.name }, label.name)),
|
|
7803
|
+
hiddenLabelCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Badge, { tone: "neutral", size: "sm", children: [
|
|
7804
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "tabular-nums", children: [
|
|
7346
7805
|
"+",
|
|
7347
7806
|
hiddenLabelCount
|
|
7348
7807
|
] }),
|
|
7349
|
-
/* @__PURE__ */ (0,
|
|
7808
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "sr-only", children: " more labels" })
|
|
7350
7809
|
] }) : null
|
|
7351
7810
|
] }) : null,
|
|
7352
|
-
hasFooter ? /* @__PURE__ */ (0,
|
|
7353
|
-
/* @__PURE__ */ (0,
|
|
7354
|
-
assignee ? /* @__PURE__ */ (0,
|
|
7811
|
+
hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "mt-xxs flex items-center justify-between gap-sm", children: [
|
|
7812
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "truncate text-caption text-muted-soft", children: meta }),
|
|
7813
|
+
assignee ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Avatar, { size: "xs", name: assignee.name, src: assignee.src, className: "shrink-0" }) : null
|
|
7355
7814
|
] }) : null,
|
|
7356
|
-
href ? /* @__PURE__ */ (0,
|
|
7815
|
+
href ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7357
7816
|
"a",
|
|
7358
7817
|
{
|
|
7359
7818
|
href,
|
|
@@ -7362,7 +7821,7 @@ var IssueCard = React62.forwardRef(
|
|
|
7362
7821
|
"aria-current": selected ? "true" : void 0,
|
|
7363
7822
|
className: triggerClass
|
|
7364
7823
|
}
|
|
7365
|
-
) : onClick ? /* @__PURE__ */ (0,
|
|
7824
|
+
) : onClick ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
7366
7825
|
"a",
|
|
7367
7826
|
{
|
|
7368
7827
|
role: "button",
|
|
@@ -7382,10 +7841,10 @@ var IssueCard = React62.forwardRef(
|
|
|
7382
7841
|
IssueCard.displayName = "IssueCard";
|
|
7383
7842
|
|
|
7384
7843
|
// virtual-pkg:src/atoms/ListItem/ListItem.tsx
|
|
7385
|
-
var
|
|
7386
|
-
var
|
|
7844
|
+
var React64 = __toESM(require("react"));
|
|
7845
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7387
7846
|
var cn48 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7388
|
-
var ListItem =
|
|
7847
|
+
var ListItem = React64.forwardRef(
|
|
7389
7848
|
({
|
|
7390
7849
|
title,
|
|
7391
7850
|
meta,
|
|
@@ -7399,7 +7858,7 @@ var ListItem = React63.forwardRef(
|
|
|
7399
7858
|
onClick,
|
|
7400
7859
|
className,
|
|
7401
7860
|
...rest
|
|
7402
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7861
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
7403
7862
|
"a",
|
|
7404
7863
|
{
|
|
7405
7864
|
ref,
|
|
@@ -7427,12 +7886,12 @@ var ListItem = React63.forwardRef(
|
|
|
7427
7886
|
),
|
|
7428
7887
|
...rest,
|
|
7429
7888
|
children: [
|
|
7430
|
-
leading ?? (icon && /* @__PURE__ */ (0,
|
|
7431
|
-
/* @__PURE__ */ (0,
|
|
7432
|
-
/* @__PURE__ */ (0,
|
|
7433
|
-
meta && /* @__PURE__ */ (0,
|
|
7889
|
+
leading ?? (icon && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: icon, size: 18, className: "shrink-0 text-ink group-data-[disabled]:text-muted" })),
|
|
7890
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
7891
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "truncate text-body-md text-ink group-data-[disabled]:text-muted", children: title }),
|
|
7892
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "truncate text-body-sm text-muted", children: meta })
|
|
7434
7893
|
] }),
|
|
7435
|
-
trailing === void 0 ? /* @__PURE__ */ (0,
|
|
7894
|
+
trailing === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
7436
7895
|
Icon,
|
|
7437
7896
|
{
|
|
7438
7897
|
name: "chevron-right",
|
|
@@ -7447,14 +7906,14 @@ var ListItem = React63.forwardRef(
|
|
|
7447
7906
|
ListItem.displayName = "ListItem";
|
|
7448
7907
|
|
|
7449
7908
|
// virtual-pkg:src/atoms/Navbar/Navbar.tsx
|
|
7450
|
-
var
|
|
7909
|
+
var React67 = __toESM(require("react"));
|
|
7451
7910
|
|
|
7452
7911
|
// virtual-pkg:src/atoms/NavbarDesktop/NavbarDesktop.tsx
|
|
7453
|
-
var
|
|
7454
|
-
var
|
|
7455
|
-
var
|
|
7912
|
+
var React65 = __toESM(require("react"));
|
|
7913
|
+
var import_react_dom8 = require("react-dom");
|
|
7914
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
7456
7915
|
var cn49 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7457
|
-
var NavbarDesktop =
|
|
7916
|
+
var NavbarDesktop = React65.forwardRef(
|
|
7458
7917
|
({
|
|
7459
7918
|
brandName = "Linear",
|
|
7460
7919
|
brandHref = "#",
|
|
@@ -7470,26 +7929,26 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7470
7929
|
className,
|
|
7471
7930
|
...rest
|
|
7472
7931
|
}, ref) => {
|
|
7473
|
-
const menuId =
|
|
7474
|
-
const triggerRef =
|
|
7475
|
-
const panelRef =
|
|
7476
|
-
const [innerOpen, setInnerOpen] =
|
|
7477
|
-
const [mounted, setMounted] =
|
|
7478
|
-
const [rect, setRect] =
|
|
7932
|
+
const menuId = React65.useId();
|
|
7933
|
+
const triggerRef = React65.useRef(null);
|
|
7934
|
+
const panelRef = React65.useRef(null);
|
|
7935
|
+
const [innerOpen, setInnerOpen] = React65.useState(false);
|
|
7936
|
+
const [mounted, setMounted] = React65.useState(false);
|
|
7937
|
+
const [rect, setRect] = React65.useState(null);
|
|
7479
7938
|
const open = menuOpen ?? innerOpen;
|
|
7480
|
-
|
|
7481
|
-
const setOpen =
|
|
7939
|
+
React65.useEffect(() => setMounted(true), []);
|
|
7940
|
+
const setOpen = React65.useCallback(
|
|
7482
7941
|
(next) => {
|
|
7483
7942
|
if (menuOpen === void 0) setInnerOpen(next);
|
|
7484
7943
|
onMenuOpenChange?.(next);
|
|
7485
7944
|
},
|
|
7486
7945
|
[menuOpen, onMenuOpenChange]
|
|
7487
7946
|
);
|
|
7488
|
-
const place2 =
|
|
7947
|
+
const place2 = React65.useCallback(() => {
|
|
7489
7948
|
const box = triggerRef.current?.getBoundingClientRect();
|
|
7490
7949
|
if (box) setRect({ top: box.bottom + 6, right: window.innerWidth - box.right });
|
|
7491
7950
|
}, []);
|
|
7492
|
-
|
|
7951
|
+
React65.useLayoutEffect(() => {
|
|
7493
7952
|
if (!open) return;
|
|
7494
7953
|
place2();
|
|
7495
7954
|
window.addEventListener("resize", place2);
|
|
@@ -7499,7 +7958,7 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7499
7958
|
window.removeEventListener("scroll", place2, true);
|
|
7500
7959
|
};
|
|
7501
7960
|
}, [open, place2]);
|
|
7502
|
-
|
|
7961
|
+
React65.useEffect(() => {
|
|
7503
7962
|
if (!open) return;
|
|
7504
7963
|
const onDown = (e) => {
|
|
7505
7964
|
const t = e.target;
|
|
@@ -7529,7 +7988,7 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7529
7988
|
const next = e.key === "ArrowDown" ? (idx + 1) % rows.length : (idx - 1 + rows.length) % rows.length;
|
|
7530
7989
|
rows[next]?.focus();
|
|
7531
7990
|
};
|
|
7532
|
-
const panel = /* @__PURE__ */ (0,
|
|
7991
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7533
7992
|
"div",
|
|
7534
7993
|
{
|
|
7535
7994
|
ref: panelRef,
|
|
@@ -7546,9 +8005,9 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7546
8005
|
zIndex: "var(--z-popover, 1300)"
|
|
7547
8006
|
},
|
|
7548
8007
|
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",
|
|
7549
|
-
children: menuItems.map((m) => /* @__PURE__ */ (0,
|
|
7550
|
-
m.separated && /* @__PURE__ */ (0,
|
|
7551
|
-
/* @__PURE__ */ (0,
|
|
8008
|
+
children: menuItems.map((m) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(React65.Fragment, { children: [
|
|
8009
|
+
m.separated && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Divider, { className: "my-xs" }),
|
|
8010
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7552
8011
|
MenuItem,
|
|
7553
8012
|
{
|
|
7554
8013
|
icon: m.icon,
|
|
@@ -7565,7 +8024,7 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7565
8024
|
] }, m.label))
|
|
7566
8025
|
}
|
|
7567
8026
|
);
|
|
7568
|
-
return /* @__PURE__ */ (0,
|
|
8027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
7569
8028
|
"header",
|
|
7570
8029
|
{
|
|
7571
8030
|
ref,
|
|
@@ -7575,11 +8034,11 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7575
8034
|
),
|
|
7576
8035
|
...rest,
|
|
7577
8036
|
children: [
|
|
7578
|
-
/* @__PURE__ */ (0,
|
|
7579
|
-
/* @__PURE__ */ (0,
|
|
7580
|
-
/* @__PURE__ */ (0,
|
|
8037
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
8038
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Divider, { orientation: "vertical" }) }),
|
|
8039
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-x-auto", children: items.map((item) => {
|
|
7581
8040
|
const current = item.href === activeHref;
|
|
7582
|
-
return /* @__PURE__ */ (0,
|
|
8041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
7583
8042
|
"a",
|
|
7584
8043
|
{
|
|
7585
8044
|
href: item.href,
|
|
@@ -7590,16 +8049,16 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7590
8049
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
7591
8050
|
),
|
|
7592
8051
|
children: [
|
|
7593
|
-
item.icon && /* @__PURE__ */ (0,
|
|
8052
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { name: item.icon, size: 16 }),
|
|
7594
8053
|
item.label
|
|
7595
8054
|
]
|
|
7596
8055
|
},
|
|
7597
8056
|
item.href
|
|
7598
8057
|
);
|
|
7599
8058
|
}) }),
|
|
7600
|
-
/* @__PURE__ */ (0,
|
|
7601
|
-
onSearch && /* @__PURE__ */ (0,
|
|
7602
|
-
/* @__PURE__ */ (0,
|
|
8059
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
8060
|
+
onSearch && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IconButton, { icon: "search", variant: "ghost", "aria-label": "Search", onClick: onSearch }),
|
|
8061
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7603
8062
|
Button,
|
|
7604
8063
|
{
|
|
7605
8064
|
ref: triggerRef,
|
|
@@ -7613,8 +8072,8 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7613
8072
|
if (!open) place2();
|
|
7614
8073
|
setOpen(!open);
|
|
7615
8074
|
},
|
|
7616
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
7617
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
8075
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }),
|
|
8076
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7618
8077
|
Icon,
|
|
7619
8078
|
{
|
|
7620
8079
|
name: "chevron-down",
|
|
@@ -7625,7 +8084,7 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7625
8084
|
}
|
|
7626
8085
|
)
|
|
7627
8086
|
] }),
|
|
7628
|
-
mounted ? (0,
|
|
8087
|
+
mounted ? (0, import_react_dom8.createPortal)(panel, document.body) : null
|
|
7629
8088
|
]
|
|
7630
8089
|
}
|
|
7631
8090
|
);
|
|
@@ -7634,11 +8093,11 @@ var NavbarDesktop = React64.forwardRef(
|
|
|
7634
8093
|
NavbarDesktop.displayName = "NavbarDesktop";
|
|
7635
8094
|
|
|
7636
8095
|
// virtual-pkg:src/atoms/NavbarMobile/NavbarMobile.tsx
|
|
7637
|
-
var
|
|
7638
|
-
var
|
|
8096
|
+
var React66 = __toESM(require("react"));
|
|
8097
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
7639
8098
|
var cn50 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7640
8099
|
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";
|
|
7641
|
-
var NavbarMobile =
|
|
8100
|
+
var NavbarMobile = React66.forwardRef(
|
|
7642
8101
|
({
|
|
7643
8102
|
brandName = "Linear",
|
|
7644
8103
|
brandHref = "#",
|
|
@@ -7654,14 +8113,14 @@ var NavbarMobile = React65.forwardRef(
|
|
|
7654
8113
|
className,
|
|
7655
8114
|
...rest
|
|
7656
8115
|
}, ref) => {
|
|
7657
|
-
const panelId =
|
|
7658
|
-
const [innerOpen, setInnerOpen] =
|
|
8116
|
+
const panelId = React66.useId();
|
|
8117
|
+
const [innerOpen, setInnerOpen] = React66.useState(defaultOpen);
|
|
7659
8118
|
const open = openProp ?? innerOpen;
|
|
7660
8119
|
const setOpen = (next) => {
|
|
7661
8120
|
if (openProp === void 0) setInnerOpen(next);
|
|
7662
8121
|
onOpenChange?.(next);
|
|
7663
8122
|
};
|
|
7664
|
-
|
|
8123
|
+
React66.useEffect(() => {
|
|
7665
8124
|
if (!open) return;
|
|
7666
8125
|
const onKey = (e) => {
|
|
7667
8126
|
if (e.key === "Escape") {
|
|
@@ -7673,7 +8132,7 @@ var NavbarMobile = React65.forwardRef(
|
|
|
7673
8132
|
return () => document.removeEventListener("keydown", onKey);
|
|
7674
8133
|
}, [open, openProp, onOpenChange]);
|
|
7675
8134
|
const state = open ? "open" : "closed";
|
|
7676
|
-
return /* @__PURE__ */ (0,
|
|
8135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
7677
8136
|
"header",
|
|
7678
8137
|
{
|
|
7679
8138
|
ref,
|
|
@@ -7681,9 +8140,9 @@ var NavbarMobile = React65.forwardRef(
|
|
|
7681
8140
|
className: cn50("w-full border-b border-hairline bg-canvas text-ink", className),
|
|
7682
8141
|
...rest,
|
|
7683
8142
|
children: [
|
|
7684
|
-
/* @__PURE__ */ (0,
|
|
7685
|
-
/* @__PURE__ */ (0,
|
|
7686
|
-
/* @__PURE__ */ (0,
|
|
8143
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex h-14 items-center justify-between gap-sm px-base", children: [
|
|
8144
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
8145
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7687
8146
|
IconButton,
|
|
7688
8147
|
{
|
|
7689
8148
|
icon: open ? "x" : "menu",
|
|
@@ -7695,22 +8154,22 @@ var NavbarMobile = React65.forwardRef(
|
|
|
7695
8154
|
}
|
|
7696
8155
|
)
|
|
7697
8156
|
] }),
|
|
7698
|
-
/* @__PURE__ */ (0,
|
|
8157
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7699
8158
|
"div",
|
|
7700
8159
|
{
|
|
7701
8160
|
id: panelId,
|
|
7702
8161
|
"data-state": state,
|
|
7703
8162
|
"aria-hidden": open ? void 0 : true,
|
|
7704
8163
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
7705
|
-
children: /* @__PURE__ */ (0,
|
|
8164
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
7706
8165
|
"div",
|
|
7707
8166
|
{
|
|
7708
8167
|
"data-state": state,
|
|
7709
8168
|
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",
|
|
7710
8169
|
children: [
|
|
7711
|
-
/* @__PURE__ */ (0,
|
|
8170
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("nav", { "aria-label": "Primary", className: "flex flex-col gap-xxs", children: items.map((item) => {
|
|
7712
8171
|
const current = item.href === activeHref;
|
|
7713
|
-
return /* @__PURE__ */ (0,
|
|
8172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
7714
8173
|
"a",
|
|
7715
8174
|
{
|
|
7716
8175
|
href: item.href,
|
|
@@ -7725,31 +8184,31 @@ var NavbarMobile = React65.forwardRef(
|
|
|
7725
8184
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
7726
8185
|
),
|
|
7727
8186
|
children: [
|
|
7728
|
-
item.icon && /* @__PURE__ */ (0,
|
|
8187
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }),
|
|
7729
8188
|
item.label
|
|
7730
8189
|
]
|
|
7731
8190
|
},
|
|
7732
8191
|
item.href
|
|
7733
8192
|
);
|
|
7734
8193
|
}) }),
|
|
7735
|
-
(userName || accountActions.length > 0) && /* @__PURE__ */ (0,
|
|
7736
|
-
/* @__PURE__ */ (0,
|
|
7737
|
-
userName && /* @__PURE__ */ (0,
|
|
7738
|
-
/* @__PURE__ */ (0,
|
|
7739
|
-
/* @__PURE__ */ (0,
|
|
8194
|
+
(userName || accountActions.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
8195
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Divider, { className: "my-sm" }),
|
|
8196
|
+
userName && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center gap-sm px-base py-sm", children: [
|
|
8197
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "xs" }),
|
|
8198
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "truncate text-body-md text-ink", children: userName })
|
|
7740
8199
|
] }),
|
|
7741
|
-
/* @__PURE__ */ (0,
|
|
8200
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { "aria-label": "Account", role: "group", className: "flex flex-col gap-xxs", children: accountActions.map((a) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7742
8201
|
Button,
|
|
7743
8202
|
{
|
|
7744
8203
|
variant: "item",
|
|
7745
8204
|
size: "lg",
|
|
7746
8205
|
tabIndex: open ? 0 : -1,
|
|
7747
|
-
leadingIcon: a.icon ? /* @__PURE__ */ (0,
|
|
8206
|
+
leadingIcon: a.icon ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: a.icon, size: 16, className: a.tone === "destructive" ? "text-semantic-error" : "text-body" }) : void 0,
|
|
7748
8207
|
onClick: () => {
|
|
7749
8208
|
a.onSelect?.();
|
|
7750
8209
|
setOpen(false);
|
|
7751
8210
|
},
|
|
7752
|
-
children: /* @__PURE__ */ (0,
|
|
8211
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: a.tone === "destructive" ? "text-semantic-error" : void 0, children: a.label })
|
|
7753
8212
|
},
|
|
7754
8213
|
a.label
|
|
7755
8214
|
)) })
|
|
@@ -7767,8 +8226,8 @@ var NavbarMobile = React65.forwardRef(
|
|
|
7767
8226
|
NavbarMobile.displayName = "NavbarMobile";
|
|
7768
8227
|
|
|
7769
8228
|
// virtual-pkg:src/atoms/Navbar/Navbar.tsx
|
|
7770
|
-
var
|
|
7771
|
-
var Navbar =
|
|
8229
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
8230
|
+
var Navbar = React67.forwardRef(
|
|
7772
8231
|
({
|
|
7773
8232
|
brandName,
|
|
7774
8233
|
brandHref,
|
|
@@ -7787,8 +8246,8 @@ var Navbar = React66.forwardRef(
|
|
|
7787
8246
|
className
|
|
7788
8247
|
}, ref) => {
|
|
7789
8248
|
const accountActions = mobileAccountActions ?? menuItems.map((m) => ({ label: m.label, icon: m.icon, tone: m.tone, onSelect: m.onSelect }));
|
|
7790
|
-
return /* @__PURE__ */ (0,
|
|
7791
|
-
/* @__PURE__ */ (0,
|
|
8249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
8250
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7792
8251
|
NavbarDesktop,
|
|
7793
8252
|
{
|
|
7794
8253
|
brandName,
|
|
@@ -7804,7 +8263,7 @@ var Navbar = React66.forwardRef(
|
|
|
7804
8263
|
onMenuOpenChange
|
|
7805
8264
|
}
|
|
7806
8265
|
) }),
|
|
7807
|
-
/* @__PURE__ */ (0,
|
|
8266
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
7808
8267
|
NavbarMobile,
|
|
7809
8268
|
{
|
|
7810
8269
|
brandName,
|
|
@@ -7825,17 +8284,17 @@ var Navbar = React66.forwardRef(
|
|
|
7825
8284
|
Navbar.displayName = "Navbar";
|
|
7826
8285
|
|
|
7827
8286
|
// virtual-pkg:src/atoms/NavigationMenu/NavigationMenu.tsx
|
|
7828
|
-
var
|
|
8287
|
+
var React70 = __toESM(require("react"));
|
|
7829
8288
|
|
|
7830
8289
|
// virtual-pkg:src/atoms/NavigationMenuDesktop/NavigationMenuDesktop.tsx
|
|
7831
|
-
var
|
|
7832
|
-
var
|
|
7833
|
-
var
|
|
8290
|
+
var React68 = __toESM(require("react"));
|
|
8291
|
+
var import_react_dom9 = require("react-dom");
|
|
8292
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
7834
8293
|
var cn51 = (...parts) => parts.filter(Boolean).join(" ");
|
|
7835
8294
|
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";
|
|
7836
8295
|
var useScrolled = (enabled, threshold = 16) => {
|
|
7837
|
-
const [scrolled, setScrolled] =
|
|
7838
|
-
|
|
8296
|
+
const [scrolled, setScrolled] = React68.useState(false);
|
|
8297
|
+
React68.useEffect(() => {
|
|
7839
8298
|
if (!enabled) {
|
|
7840
8299
|
setScrolled(false);
|
|
7841
8300
|
return;
|
|
@@ -7847,7 +8306,7 @@ var useScrolled = (enabled, threshold = 16) => {
|
|
|
7847
8306
|
}, [enabled, threshold]);
|
|
7848
8307
|
return scrolled;
|
|
7849
8308
|
};
|
|
7850
|
-
var NavigationMenuDesktop =
|
|
8309
|
+
var NavigationMenuDesktop = React68.forwardRef(
|
|
7851
8310
|
({
|
|
7852
8311
|
brandName = "Linear",
|
|
7853
8312
|
brandHref = "#",
|
|
@@ -7862,23 +8321,23 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
7862
8321
|
className,
|
|
7863
8322
|
...rest
|
|
7864
8323
|
}, ref) => {
|
|
7865
|
-
const baseId =
|
|
7866
|
-
const [innerOpen, setInnerOpen] =
|
|
8324
|
+
const baseId = React68.useId();
|
|
8325
|
+
const [innerOpen, setInnerOpen] = React68.useState(null);
|
|
7867
8326
|
const openId = openIdProp !== void 0 ? openIdProp : innerOpen;
|
|
7868
|
-
const [mounted, setMounted] =
|
|
7869
|
-
const [rects, setRects] =
|
|
7870
|
-
const triggerRefs =
|
|
7871
|
-
const panelRefs =
|
|
8327
|
+
const [mounted, setMounted] = React68.useState(false);
|
|
8328
|
+
const [rects, setRects] = React68.useState({});
|
|
8329
|
+
const triggerRefs = React68.useRef({});
|
|
8330
|
+
const panelRefs = React68.useRef({});
|
|
7872
8331
|
const scrolled = useScrolled(transparent);
|
|
7873
|
-
|
|
7874
|
-
const setOpenId =
|
|
8332
|
+
React68.useEffect(() => setMounted(true), []);
|
|
8333
|
+
const setOpenId = React68.useCallback(
|
|
7875
8334
|
(id) => {
|
|
7876
8335
|
if (openIdProp === void 0) setInnerOpen(id);
|
|
7877
8336
|
onOpenIdChange?.(id);
|
|
7878
8337
|
},
|
|
7879
8338
|
[openIdProp, onOpenIdChange]
|
|
7880
8339
|
);
|
|
7881
|
-
const place2 =
|
|
8340
|
+
const place2 = React68.useCallback((id) => {
|
|
7882
8341
|
const el = triggerRefs.current[id];
|
|
7883
8342
|
const box = el?.getBoundingClientRect();
|
|
7884
8343
|
if (!box) return;
|
|
@@ -7887,7 +8346,7 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
7887
8346
|
const left = Math.max(16, Math.min(box.left, window.innerWidth - width - 16));
|
|
7888
8347
|
setRects((prev) => ({ ...prev, [id]: { top: box.bottom + 6, left } }));
|
|
7889
8348
|
}, [items]);
|
|
7890
|
-
|
|
8349
|
+
React68.useLayoutEffect(() => {
|
|
7891
8350
|
if (!openId) return;
|
|
7892
8351
|
place2(openId);
|
|
7893
8352
|
const onMove = () => place2(openId);
|
|
@@ -7901,7 +8360,7 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
7901
8360
|
window.removeEventListener("scroll", onMove, true);
|
|
7902
8361
|
};
|
|
7903
8362
|
}, [openId, place2]);
|
|
7904
|
-
|
|
8363
|
+
React68.useEffect(() => {
|
|
7905
8364
|
if (!openId) return;
|
|
7906
8365
|
const onDown = (e) => {
|
|
7907
8366
|
const t = e.target;
|
|
@@ -7936,7 +8395,7 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
7936
8395
|
zIndex: "var(--z-popover, 1300)"
|
|
7937
8396
|
};
|
|
7938
8397
|
if (item.columns) {
|
|
7939
|
-
return /* @__PURE__ */ (0,
|
|
8398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7940
8399
|
"div",
|
|
7941
8400
|
{
|
|
7942
8401
|
ref: (el) => {
|
|
@@ -7948,11 +8407,11 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
7948
8407
|
"data-state": open ? "open" : "closed",
|
|
7949
8408
|
style: { ...style, width: "min(760px, calc(100vw - 32px))" },
|
|
7950
8409
|
className: cn51("origin-top rounded-xl border border-hairline bg-canvas p-lg text-ink shadow-overlay", panelMotion),
|
|
7951
|
-
children: /* @__PURE__ */ (0,
|
|
7952
|
-
/* @__PURE__ */ (0,
|
|
7953
|
-
/* @__PURE__ */ (0,
|
|
8410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "grid grid-cols-3 gap-lg", children: item.columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
8411
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "px-sm text-label text-ink", children: col.title }),
|
|
8412
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("ul", { className: "flex flex-col", children: col.links.map((link) => {
|
|
7954
8413
|
const current = link.href === activeHref;
|
|
7955
|
-
return /* @__PURE__ */ (0,
|
|
8414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7956
8415
|
"a",
|
|
7957
8416
|
{
|
|
7958
8417
|
href: link.href,
|
|
@@ -7972,7 +8431,7 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
7972
8431
|
item.id
|
|
7973
8432
|
);
|
|
7974
8433
|
}
|
|
7975
|
-
return /* @__PURE__ */ (0,
|
|
8434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7976
8435
|
"div",
|
|
7977
8436
|
{
|
|
7978
8437
|
ref: (el) => {
|
|
@@ -7986,9 +8445,9 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
7986
8445
|
className: cn51("origin-top rounded-lg border border-hairline bg-canvas p-xs text-ink shadow-overlay", panelMotion),
|
|
7987
8446
|
children: (item.menu ?? []).map((link) => {
|
|
7988
8447
|
const current = link.href === activeHref;
|
|
7989
|
-
return /* @__PURE__ */ (0,
|
|
7990
|
-
link.separated && /* @__PURE__ */ (0,
|
|
7991
|
-
/* @__PURE__ */ (0,
|
|
8448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(React68.Fragment, { children: [
|
|
8449
|
+
link.separated && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Divider, { className: "my-xs" }),
|
|
8450
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7992
8451
|
"a",
|
|
7993
8452
|
{
|
|
7994
8453
|
href: link.href,
|
|
@@ -8010,7 +8469,7 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
8010
8469
|
);
|
|
8011
8470
|
};
|
|
8012
8471
|
const solid = !transparent || scrolled;
|
|
8013
|
-
return /* @__PURE__ */ (0,
|
|
8472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
8014
8473
|
"header",
|
|
8015
8474
|
{
|
|
8016
8475
|
ref,
|
|
@@ -8023,14 +8482,14 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
8023
8482
|
),
|
|
8024
8483
|
...rest,
|
|
8025
8484
|
children: [
|
|
8026
|
-
/* @__PURE__ */ (0,
|
|
8027
|
-
/* @__PURE__ */ (0,
|
|
8028
|
-
/* @__PURE__ */ (0,
|
|
8485
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
8486
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "flex h-5 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Divider, { orientation: "vertical" }) }),
|
|
8487
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("nav", { "aria-label": "Primary", className: "flex min-w-0 flex-1 items-center gap-xxs overflow-hidden", children: items.map((item) => {
|
|
8029
8488
|
const hasPanel = Boolean(item.menu?.length || item.columns?.length);
|
|
8030
8489
|
const current = item.id === activeId;
|
|
8031
8490
|
const open = openId === item.id;
|
|
8032
8491
|
if (!hasPanel) {
|
|
8033
|
-
return /* @__PURE__ */ (0,
|
|
8492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
8034
8493
|
"a",
|
|
8035
8494
|
{
|
|
8036
8495
|
href: item.href ?? "#",
|
|
@@ -8044,14 +8503,14 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
8044
8503
|
current ? "bg-surface-strong text-ink" : "text-body hover:bg-surface-soft hover:text-ink active:bg-surface-strong"
|
|
8045
8504
|
),
|
|
8046
8505
|
children: [
|
|
8047
|
-
item.icon && /* @__PURE__ */ (0,
|
|
8506
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon, { name: item.icon, size: 16 }),
|
|
8048
8507
|
item.label
|
|
8049
8508
|
]
|
|
8050
8509
|
},
|
|
8051
8510
|
item.id
|
|
8052
8511
|
);
|
|
8053
8512
|
}
|
|
8054
|
-
return /* @__PURE__ */ (0,
|
|
8513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8055
8514
|
Button,
|
|
8056
8515
|
{
|
|
8057
8516
|
ref: (el) => {
|
|
@@ -8066,8 +8525,8 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
8066
8525
|
if (!open) place2(item.id);
|
|
8067
8526
|
setOpenId(open ? null : item.id);
|
|
8068
8527
|
},
|
|
8069
|
-
leadingIcon: item.icon ? /* @__PURE__ */ (0,
|
|
8070
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
8528
|
+
leadingIcon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon, { name: item.icon, size: 16 }) : void 0,
|
|
8529
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8071
8530
|
Icon,
|
|
8072
8531
|
{
|
|
8073
8532
|
name: "chevron-down",
|
|
@@ -8080,9 +8539,9 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
8080
8539
|
item.id
|
|
8081
8540
|
);
|
|
8082
8541
|
}) }),
|
|
8083
|
-
actions !== void 0 && /* @__PURE__ */ (0,
|
|
8084
|
-
mounted ? (0,
|
|
8085
|
-
/* @__PURE__ */ (0,
|
|
8542
|
+
actions !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex shrink-0 items-center gap-sm", children: actions }),
|
|
8543
|
+
mounted ? (0, import_react_dom9.createPortal)(
|
|
8544
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: items.filter((i) => i.menu?.length || i.columns?.length).map(renderPanel) }),
|
|
8086
8545
|
document.body
|
|
8087
8546
|
) : null
|
|
8088
8547
|
]
|
|
@@ -8093,13 +8552,13 @@ var NavigationMenuDesktop = React67.forwardRef(
|
|
|
8093
8552
|
NavigationMenuDesktop.displayName = "NavigationMenuDesktop";
|
|
8094
8553
|
|
|
8095
8554
|
// virtual-pkg:src/atoms/NavigationMenuMobile/NavigationMenuMobile.tsx
|
|
8096
|
-
var
|
|
8097
|
-
var
|
|
8555
|
+
var React69 = __toESM(require("react"));
|
|
8556
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8098
8557
|
var cn52 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8099
8558
|
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";
|
|
8100
8559
|
var useScrolled2 = (enabled, threshold = 16) => {
|
|
8101
|
-
const [scrolled, setScrolled] =
|
|
8102
|
-
|
|
8560
|
+
const [scrolled, setScrolled] = React69.useState(false);
|
|
8561
|
+
React69.useEffect(() => {
|
|
8103
8562
|
if (!enabled) {
|
|
8104
8563
|
setScrolled(false);
|
|
8105
8564
|
return;
|
|
@@ -8111,7 +8570,7 @@ var useScrolled2 = (enabled, threshold = 16) => {
|
|
|
8111
8570
|
}, [enabled, threshold]);
|
|
8112
8571
|
return scrolled;
|
|
8113
8572
|
};
|
|
8114
|
-
var NavigationMenuMobile =
|
|
8573
|
+
var NavigationMenuMobile = React69.forwardRef(
|
|
8115
8574
|
({
|
|
8116
8575
|
brandName = "Linear",
|
|
8117
8576
|
brandHref = "#",
|
|
@@ -8131,25 +8590,25 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8131
8590
|
className,
|
|
8132
8591
|
...rest
|
|
8133
8592
|
}, ref) => {
|
|
8134
|
-
const autoId =
|
|
8593
|
+
const autoId = React69.useId();
|
|
8135
8594
|
const panelId = panelIdProp ?? `${autoId}-panel`;
|
|
8136
|
-
const [innerOpen, setInnerOpen] =
|
|
8595
|
+
const [innerOpen, setInnerOpen] = React69.useState(defaultOpen);
|
|
8137
8596
|
const open = openProp ?? innerOpen;
|
|
8138
|
-
const setOpen =
|
|
8597
|
+
const setOpen = React69.useCallback(
|
|
8139
8598
|
(next) => {
|
|
8140
8599
|
if (openProp === void 0) setInnerOpen(next);
|
|
8141
8600
|
onOpenChange?.(next);
|
|
8142
8601
|
},
|
|
8143
8602
|
[openProp, onOpenChange]
|
|
8144
8603
|
);
|
|
8145
|
-
const [innerSection, setInnerSection] =
|
|
8604
|
+
const [innerSection, setInnerSection] = React69.useState(null);
|
|
8146
8605
|
const section = sectionProp !== void 0 ? sectionProp : innerSection;
|
|
8147
8606
|
const setSection = (id) => {
|
|
8148
8607
|
if (sectionProp === void 0) setInnerSection(id);
|
|
8149
8608
|
onSectionIdChange?.(id);
|
|
8150
8609
|
};
|
|
8151
8610
|
const scrolled = useScrolled2(transparent);
|
|
8152
|
-
|
|
8611
|
+
React69.useEffect(() => {
|
|
8153
8612
|
if (!open) return;
|
|
8154
8613
|
const onKey = (e) => {
|
|
8155
8614
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -8161,9 +8620,9 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8161
8620
|
const solid = !transparent || scrolled || open;
|
|
8162
8621
|
const subLink = (link, tabbable) => {
|
|
8163
8622
|
const current = link.href === activeHref;
|
|
8164
|
-
return /* @__PURE__ */ (0,
|
|
8165
|
-
link.separated && /* @__PURE__ */ (0,
|
|
8166
|
-
/* @__PURE__ */ (0,
|
|
8623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("li", { children: [
|
|
8624
|
+
link.separated && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Divider, { className: "my-xs" }),
|
|
8625
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8167
8626
|
"a",
|
|
8168
8627
|
{
|
|
8169
8628
|
href: link.href,
|
|
@@ -8182,7 +8641,7 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8182
8641
|
)
|
|
8183
8642
|
] }, link.href);
|
|
8184
8643
|
};
|
|
8185
|
-
return /* @__PURE__ */ (0,
|
|
8644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
8186
8645
|
"header",
|
|
8187
8646
|
{
|
|
8188
8647
|
ref,
|
|
@@ -8196,11 +8655,11 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8196
8655
|
),
|
|
8197
8656
|
...rest,
|
|
8198
8657
|
children: [
|
|
8199
|
-
/* @__PURE__ */ (0,
|
|
8200
|
-
/* @__PURE__ */ (0,
|
|
8201
|
-
/* @__PURE__ */ (0,
|
|
8202
|
-
actions !== void 0 && /* @__PURE__ */ (0,
|
|
8203
|
-
trigger ?? /* @__PURE__ */ (0,
|
|
8658
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex h-14 min-w-0 items-center justify-between gap-sm px-base", children: [
|
|
8659
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Logo, { name: brandName, href: brandHref, size: "md", className: "shrink-0" }),
|
|
8660
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex min-w-0 flex-1 items-center justify-end gap-xs", children: [
|
|
8661
|
+
actions !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex shrink-0 items-center gap-xs", children: actions }),
|
|
8662
|
+
trigger ?? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8204
8663
|
IconButton,
|
|
8205
8664
|
{
|
|
8206
8665
|
icon: open ? "x" : "menu",
|
|
@@ -8213,7 +8672,7 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8213
8672
|
)
|
|
8214
8673
|
] })
|
|
8215
8674
|
] }),
|
|
8216
|
-
/* @__PURE__ */ (0,
|
|
8675
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8217
8676
|
"div",
|
|
8218
8677
|
{
|
|
8219
8678
|
id: panelId,
|
|
@@ -8223,18 +8682,18 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8223
8682
|
"grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
8224
8683
|
open && "bg-canvas"
|
|
8225
8684
|
),
|
|
8226
|
-
children: /* @__PURE__ */ (0,
|
|
8685
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
8227
8686
|
"nav",
|
|
8228
8687
|
{
|
|
8229
8688
|
"aria-label": "Primary",
|
|
8230
8689
|
"data-state": state,
|
|
8231
8690
|
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",
|
|
8232
8691
|
children: [
|
|
8233
|
-
/* @__PURE__ */ (0,
|
|
8692
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("ul", { className: "flex flex-col gap-xxs", children: items.map((item) => {
|
|
8234
8693
|
const hasSub = Boolean(item.menu?.length || item.columns?.length);
|
|
8235
8694
|
if (!hasSub) {
|
|
8236
8695
|
const current = item.href === activeHref;
|
|
8237
|
-
return /* @__PURE__ */ (0,
|
|
8696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
8238
8697
|
"a",
|
|
8239
8698
|
{
|
|
8240
8699
|
href: item.href ?? "#",
|
|
@@ -8249,7 +8708,7 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8249
8708
|
current ? "bg-surface-strong text-ink" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
8250
8709
|
),
|
|
8251
8710
|
children: [
|
|
8252
|
-
item.icon && /* @__PURE__ */ (0,
|
|
8711
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }),
|
|
8253
8712
|
item.label
|
|
8254
8713
|
]
|
|
8255
8714
|
}
|
|
@@ -8257,8 +8716,8 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8257
8716
|
}
|
|
8258
8717
|
const expanded = section === item.id;
|
|
8259
8718
|
const subId = `${autoId}-${item.id}`;
|
|
8260
|
-
return /* @__PURE__ */ (0,
|
|
8261
|
-
/* @__PURE__ */ (0,
|
|
8719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("li", { children: [
|
|
8720
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8262
8721
|
Button,
|
|
8263
8722
|
{
|
|
8264
8723
|
variant: "item",
|
|
@@ -8267,8 +8726,8 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8267
8726
|
"aria-expanded": expanded,
|
|
8268
8727
|
"aria-controls": subId,
|
|
8269
8728
|
onClick: () => setSection(expanded ? null : item.id),
|
|
8270
|
-
leadingIcon: item.icon ? /* @__PURE__ */ (0,
|
|
8271
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
8729
|
+
leadingIcon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon, { name: item.icon, size: 16, className: "text-body" }) : void 0,
|
|
8730
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8272
8731
|
Icon,
|
|
8273
8732
|
{
|
|
8274
8733
|
name: "chevron-down",
|
|
@@ -8279,7 +8738,7 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8279
8738
|
children: item.label
|
|
8280
8739
|
}
|
|
8281
8740
|
),
|
|
8282
|
-
/* @__PURE__ */ (0,
|
|
8741
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8283
8742
|
"div",
|
|
8284
8743
|
{
|
|
8285
8744
|
id: subId,
|
|
@@ -8287,18 +8746,18 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8287
8746
|
"aria-label": item.label,
|
|
8288
8747
|
"data-state": expanded ? "open" : "closed",
|
|
8289
8748
|
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",
|
|
8290
|
-
children: /* @__PURE__ */ (0,
|
|
8291
|
-
item.menu && /* @__PURE__ */ (0,
|
|
8292
|
-
item.columns?.map((col) => /* @__PURE__ */ (0,
|
|
8293
|
-
/* @__PURE__ */ (0,
|
|
8294
|
-
/* @__PURE__ */ (0,
|
|
8749
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "py-xs pl-lg", children: [
|
|
8750
|
+
item.menu && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("ul", { className: "flex flex-col gap-xxs", children: item.menu.map((l) => subLink(l, open && expanded)) }),
|
|
8751
|
+
item.columns?.map((col) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "pb-xs", children: [
|
|
8752
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "px-base pb-xxs pt-sm text-caption text-muted", children: col.title }),
|
|
8753
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("ul", { className: "flex flex-col gap-xxs", children: col.links.map((l) => subLink(l, open && expanded)) })
|
|
8295
8754
|
] }, col.title))
|
|
8296
8755
|
] }) })
|
|
8297
8756
|
}
|
|
8298
8757
|
)
|
|
8299
8758
|
] }, item.id);
|
|
8300
8759
|
}) }),
|
|
8301
|
-
menuFooter !== void 0 && /* @__PURE__ */ (0,
|
|
8760
|
+
menuFooter !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mt-sm flex flex-col gap-xs border-t border-hairline px-base pb-xs pt-sm", children: menuFooter })
|
|
8302
8761
|
]
|
|
8303
8762
|
}
|
|
8304
8763
|
) })
|
|
@@ -8312,8 +8771,8 @@ var NavigationMenuMobile = React68.forwardRef(
|
|
|
8312
8771
|
NavigationMenuMobile.displayName = "NavigationMenuMobile";
|
|
8313
8772
|
|
|
8314
8773
|
// virtual-pkg:src/atoms/NavigationMenu/NavigationMenu.tsx
|
|
8315
|
-
var
|
|
8316
|
-
var NavigationMenu =
|
|
8774
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8775
|
+
var NavigationMenu = React70.forwardRef(
|
|
8317
8776
|
({
|
|
8318
8777
|
brandName,
|
|
8319
8778
|
brandHref,
|
|
@@ -8333,22 +8792,22 @@ var NavigationMenu = React69.forwardRef(
|
|
|
8333
8792
|
transparent = false,
|
|
8334
8793
|
className
|
|
8335
8794
|
}, ref) => {
|
|
8336
|
-
const autoId =
|
|
8795
|
+
const autoId = React70.useId();
|
|
8337
8796
|
const panelId = `${autoId}-panel`;
|
|
8338
|
-
const [innerOpen, setInnerOpen] =
|
|
8797
|
+
const [innerOpen, setInnerOpen] = React70.useState(false);
|
|
8339
8798
|
const open = mobileOpen ?? innerOpen;
|
|
8340
|
-
const setMobileOpen =
|
|
8799
|
+
const setMobileOpen = React70.useCallback(
|
|
8341
8800
|
(next) => {
|
|
8342
8801
|
if (mobileOpen === void 0) setInnerOpen(next);
|
|
8343
8802
|
onMobileOpenChange?.(next);
|
|
8344
8803
|
},
|
|
8345
8804
|
[mobileOpen, onMobileOpenChange]
|
|
8346
8805
|
);
|
|
8347
|
-
const closeAll =
|
|
8806
|
+
const closeAll = React70.useCallback(() => {
|
|
8348
8807
|
onOpenIdChange?.(null);
|
|
8349
8808
|
setMobileOpen(false);
|
|
8350
8809
|
}, [onOpenIdChange, setMobileOpen]);
|
|
8351
|
-
return /* @__PURE__ */ (0,
|
|
8810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
8352
8811
|
"div",
|
|
8353
8812
|
{
|
|
8354
8813
|
ref,
|
|
@@ -8357,7 +8816,7 @@ var NavigationMenu = React69.forwardRef(
|
|
|
8357
8816
|
},
|
|
8358
8817
|
className: ["w-full rounded-none", className].filter(Boolean).join(" "),
|
|
8359
8818
|
children: [
|
|
8360
|
-
/* @__PURE__ */ (0,
|
|
8819
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8361
8820
|
NavigationMenuDesktop,
|
|
8362
8821
|
{
|
|
8363
8822
|
brandName,
|
|
@@ -8372,7 +8831,7 @@ var NavigationMenu = React69.forwardRef(
|
|
|
8372
8831
|
transparent
|
|
8373
8832
|
}
|
|
8374
8833
|
) }),
|
|
8375
|
-
/* @__PURE__ */ (0,
|
|
8834
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8376
8835
|
NavigationMenuMobile,
|
|
8377
8836
|
{
|
|
8378
8837
|
brandName,
|
|
@@ -8388,7 +8847,7 @@ var NavigationMenu = React69.forwardRef(
|
|
|
8388
8847
|
menuFooter: mobileMenuFooter,
|
|
8389
8848
|
transparent,
|
|
8390
8849
|
panelId,
|
|
8391
|
-
trigger: /* @__PURE__ */ (0,
|
|
8850
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8392
8851
|
IconButton,
|
|
8393
8852
|
{
|
|
8394
8853
|
icon: open ? "x" : "menu",
|
|
@@ -8409,9 +8868,9 @@ var NavigationMenu = React69.forwardRef(
|
|
|
8409
8868
|
NavigationMenu.displayName = "NavigationMenu";
|
|
8410
8869
|
|
|
8411
8870
|
// virtual-pkg:src/atoms/NotificationFeed/NotificationFeed.tsx
|
|
8412
|
-
var
|
|
8413
|
-
var
|
|
8414
|
-
var
|
|
8871
|
+
var React71 = __toESM(require("react"));
|
|
8872
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
8873
|
+
var FILTERS2 = [
|
|
8415
8874
|
{ value: "all", label: "All" },
|
|
8416
8875
|
{ value: "unread", label: "Unread" },
|
|
8417
8876
|
{ value: "mentions", label: "Mentions" },
|
|
@@ -8424,7 +8883,7 @@ function matches(entry, filter) {
|
|
|
8424
8883
|
if (filter === "assignments") return entry.kind === "assignment";
|
|
8425
8884
|
return true;
|
|
8426
8885
|
}
|
|
8427
|
-
var NotificationFeed =
|
|
8886
|
+
var NotificationFeed = React71.forwardRef(
|
|
8428
8887
|
({
|
|
8429
8888
|
title = "Inbox",
|
|
8430
8889
|
notifications,
|
|
@@ -8438,10 +8897,10 @@ var NotificationFeed = React70.forwardRef(
|
|
|
8438
8897
|
className,
|
|
8439
8898
|
...rest
|
|
8440
8899
|
}, ref) => {
|
|
8441
|
-
const headingId =
|
|
8900
|
+
const headingId = React71.useId();
|
|
8442
8901
|
const unreadCount = notifications.filter((n) => n.unread).length;
|
|
8443
8902
|
const visible = notifications.filter((n) => matches(n, filter));
|
|
8444
|
-
return /* @__PURE__ */ (0,
|
|
8903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
8445
8904
|
"section",
|
|
8446
8905
|
{
|
|
8447
8906
|
ref,
|
|
@@ -8452,14 +8911,14 @@ var NotificationFeed = React70.forwardRef(
|
|
|
8452
8911
|
),
|
|
8453
8912
|
...rest,
|
|
8454
8913
|
children: [
|
|
8455
|
-
/* @__PURE__ */ (0,
|
|
8456
|
-
/* @__PURE__ */ (0,
|
|
8457
|
-
/* @__PURE__ */ (0,
|
|
8914
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("header", { className: "flex min-w-0 items-center gap-md px-base py-md", children: [
|
|
8915
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h2", { id: headingId, className: "shrink-0 text-heading-sm text-ink", children: title }),
|
|
8916
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { role: "group", "aria-label": "Filter notifications", className: "flex min-w-0 flex-1 flex-wrap items-center gap-xs", children: FILTERS2.map((f) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Chip, { selected: filter === f.value, onSelectedChange: () => onFilterChange?.(f.value), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "inline-flex items-center gap-xs", children: [
|
|
8458
8917
|
f.label,
|
|
8459
|
-
f.value === "unread" && unreadCount > 0 ? /* @__PURE__ */ (0,
|
|
8918
|
+
f.value === "unread" && unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Badge, { size: "sm", tone: "primary", children: unreadCount }) : null
|
|
8460
8919
|
] }) }, f.value)) }),
|
|
8461
|
-
/* @__PURE__ */ (0,
|
|
8462
|
-
/* @__PURE__ */ (0,
|
|
8920
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex shrink-0 items-center gap-xs", children: [
|
|
8921
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8463
8922
|
IconButton,
|
|
8464
8923
|
{
|
|
8465
8924
|
icon: "check",
|
|
@@ -8469,22 +8928,22 @@ var NotificationFeed = React70.forwardRef(
|
|
|
8469
8928
|
onClick: onMarkAllRead
|
|
8470
8929
|
}
|
|
8471
8930
|
),
|
|
8472
|
-
/* @__PURE__ */ (0,
|
|
8931
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IconButton, { icon: "ellipsis", variant: "ghost", "aria-label": "More options", onClick: onMoreClick })
|
|
8473
8932
|
] })
|
|
8474
8933
|
] }),
|
|
8475
|
-
visible.length === 0 ? /* @__PURE__ */ (0,
|
|
8476
|
-
/* @__PURE__ */ (0,
|
|
8477
|
-
/* @__PURE__ */ (0,
|
|
8478
|
-
/* @__PURE__ */ (0,
|
|
8479
|
-
] }) : /* @__PURE__ */ (0,
|
|
8934
|
+
visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "flex flex-col items-center justify-center gap-xs px-base pb-xl pt-lg text-center", children: [
|
|
8935
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Icon, { name: "inbox", size: 36, strokeWidth: 1.5, className: "text-muted-soft" }),
|
|
8936
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "mt-sm text-heading-sm text-ink", children: emptyTitle }),
|
|
8937
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("p", { className: "text-body-sm text-muted", children: emptyDescription })
|
|
8938
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("ul", { className: "flex flex-col px-sm pb-sm", "aria-label": "Notifications", children: visible.map((n) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8480
8939
|
ListItem,
|
|
8481
8940
|
{
|
|
8482
8941
|
variant: "plain",
|
|
8483
8942
|
href: n.href,
|
|
8484
8943
|
onClick: () => onNotificationClick?.(n),
|
|
8485
8944
|
"aria-label": typeof n.title === "string" ? `${n.unread ? "Unread: " : ""}${n.title}` : void 0,
|
|
8486
|
-
leading: /* @__PURE__ */ (0,
|
|
8487
|
-
/* @__PURE__ */ (0,
|
|
8945
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "flex shrink-0 items-center gap-sm", children: [
|
|
8946
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8488
8947
|
"span",
|
|
8489
8948
|
{
|
|
8490
8949
|
"aria-hidden": "true",
|
|
@@ -8494,11 +8953,11 @@ var NotificationFeed = React70.forwardRef(
|
|
|
8494
8953
|
)
|
|
8495
8954
|
}
|
|
8496
8955
|
),
|
|
8497
|
-
/* @__PURE__ */ (0,
|
|
8956
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Icon, { name: n.icon, size: 18, className: "text-body" })
|
|
8498
8957
|
] }),
|
|
8499
8958
|
title: n.title,
|
|
8500
8959
|
meta: n.description,
|
|
8501
|
-
trailing: /* @__PURE__ */ (0,
|
|
8960
|
+
trailing: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "shrink-0 self-start pt-xxs text-body-sm text-muted tabular-nums", children: n.time })
|
|
8502
8961
|
}
|
|
8503
8962
|
) }, n.id)) })
|
|
8504
8963
|
]
|
|
@@ -8509,14 +8968,14 @@ var NotificationFeed = React70.forwardRef(
|
|
|
8509
8968
|
NotificationFeed.displayName = "NotificationFeed";
|
|
8510
8969
|
|
|
8511
8970
|
// virtual-pkg:src/atoms/PricingTable/PricingTable.tsx
|
|
8512
|
-
var
|
|
8971
|
+
var React75 = __toESM(require("react"));
|
|
8513
8972
|
|
|
8514
8973
|
// virtual-pkg:src/atoms/PricingTableDesktop/PricingTableDesktop.tsx
|
|
8515
|
-
var
|
|
8974
|
+
var React73 = __toESM(require("react"));
|
|
8516
8975
|
|
|
8517
8976
|
// virtual-pkg:src/atoms/Switch/Switch.tsx
|
|
8518
|
-
var
|
|
8519
|
-
var
|
|
8977
|
+
var React72 = __toESM(require("react"));
|
|
8978
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
8520
8979
|
var TRACK = {
|
|
8521
8980
|
sm: "h-4 w-7",
|
|
8522
8981
|
md: "h-5 w-9"
|
|
@@ -8529,7 +8988,7 @@ var TRAVEL = {
|
|
|
8529
8988
|
sm: "translate-x-3",
|
|
8530
8989
|
md: "translate-x-4"
|
|
8531
8990
|
};
|
|
8532
|
-
var Switch =
|
|
8991
|
+
var Switch = React72.forwardRef(
|
|
8533
8992
|
({
|
|
8534
8993
|
checked,
|
|
8535
8994
|
defaultChecked,
|
|
@@ -8544,11 +9003,11 @@ var Switch = React71.forwardRef(
|
|
|
8544
9003
|
className,
|
|
8545
9004
|
...rest
|
|
8546
9005
|
}, ref) => {
|
|
8547
|
-
const autoId =
|
|
9006
|
+
const autoId = React72.useId();
|
|
8548
9007
|
const inputId = id ?? `switch-${autoId}`;
|
|
8549
9008
|
const descId = description ? `${inputId}-desc` : void 0;
|
|
8550
9009
|
const isControlled = checked !== void 0;
|
|
8551
|
-
const [inner, setInner] =
|
|
9010
|
+
const [inner, setInner] = React72.useState(Boolean(defaultChecked));
|
|
8552
9011
|
const on = isControlled ? Boolean(checked) : inner;
|
|
8553
9012
|
const handleChange = (e) => {
|
|
8554
9013
|
if (!isControlled) setInner(e.target.checked);
|
|
@@ -8556,7 +9015,7 @@ var Switch = React71.forwardRef(
|
|
|
8556
9015
|
onChange?.(e);
|
|
8557
9016
|
};
|
|
8558
9017
|
const labelled = Boolean(label);
|
|
8559
|
-
return /* @__PURE__ */ (0,
|
|
9018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
8560
9019
|
"label",
|
|
8561
9020
|
{
|
|
8562
9021
|
htmlFor: inputId,
|
|
@@ -8567,15 +9026,15 @@ var Switch = React71.forwardRef(
|
|
|
8567
9026
|
className
|
|
8568
9027
|
].filter(Boolean).join(" "),
|
|
8569
9028
|
children: [
|
|
8570
|
-
labelled ? /* @__PURE__ */ (0,
|
|
8571
|
-
leading ? /* @__PURE__ */ (0,
|
|
8572
|
-
/* @__PURE__ */ (0,
|
|
8573
|
-
/* @__PURE__ */ (0,
|
|
8574
|
-
description ? /* @__PURE__ */ (0,
|
|
9029
|
+
labelled ? /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "flex min-w-0 items-start gap-md", children: [
|
|
9030
|
+
leading ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "mt-xxs inline-flex shrink-0 text-ink", children: leading }) : null,
|
|
9031
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "flex min-w-0 flex-col", children: [
|
|
9032
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-body-md text-ink", children: label }),
|
|
9033
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { id: descId, className: "text-body-sm text-muted", children: description }) : null
|
|
8575
9034
|
] })
|
|
8576
9035
|
] }) : null,
|
|
8577
|
-
/* @__PURE__ */ (0,
|
|
8578
|
-
/* @__PURE__ */ (0,
|
|
9036
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "relative inline-flex shrink-0 items-center", children: [
|
|
9037
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8579
9038
|
"input",
|
|
8580
9039
|
{
|
|
8581
9040
|
ref,
|
|
@@ -8591,7 +9050,7 @@ var Switch = React71.forwardRef(
|
|
|
8591
9050
|
...rest
|
|
8592
9051
|
}
|
|
8593
9052
|
),
|
|
8594
|
-
/* @__PURE__ */ (0,
|
|
9053
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8595
9054
|
"span",
|
|
8596
9055
|
{
|
|
8597
9056
|
"aria-hidden": "true",
|
|
@@ -8603,7 +9062,7 @@ var Switch = React71.forwardRef(
|
|
|
8603
9062
|
disabled && !labelled ? "opacity-50" : "",
|
|
8604
9063
|
TRACK[size]
|
|
8605
9064
|
].join(" "),
|
|
8606
|
-
children: /* @__PURE__ */ (0,
|
|
9065
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8607
9066
|
"span",
|
|
8608
9067
|
{
|
|
8609
9068
|
className: [
|
|
@@ -8624,10 +9083,10 @@ var Switch = React71.forwardRef(
|
|
|
8624
9083
|
Switch.displayName = "Switch";
|
|
8625
9084
|
|
|
8626
9085
|
// virtual-pkg:src/atoms/PricingTableDesktop/PricingTableDesktop.tsx
|
|
8627
|
-
var
|
|
9086
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
8628
9087
|
var cn54 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8629
9088
|
function useBilling(billing, defaultBilling, onBillingChange) {
|
|
8630
|
-
const [inner, setInner] =
|
|
9089
|
+
const [inner, setInner] = React73.useState(defaultBilling);
|
|
8631
9090
|
const value = billing ?? inner;
|
|
8632
9091
|
const set = (b) => {
|
|
8633
9092
|
if (billing === void 0) setInner(b);
|
|
@@ -8642,7 +9101,7 @@ var BILLING_OPTIONS = [
|
|
|
8642
9101
|
function priceOf(tier, billing) {
|
|
8643
9102
|
return billing === "yearly" ? tier.yearlyPrice ?? tier.monthlyPrice : tier.monthlyPrice;
|
|
8644
9103
|
}
|
|
8645
|
-
var PricingTableDesktop =
|
|
9104
|
+
var PricingTableDesktop = React73.forwardRef(
|
|
8646
9105
|
({
|
|
8647
9106
|
tiers,
|
|
8648
9107
|
billing,
|
|
@@ -8655,7 +9114,7 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
8655
9114
|
...rest
|
|
8656
9115
|
}, ref) => {
|
|
8657
9116
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8658
|
-
return /* @__PURE__ */ (0,
|
|
9117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
8659
9118
|
"section",
|
|
8660
9119
|
{
|
|
8661
9120
|
ref,
|
|
@@ -8663,7 +9122,7 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
8663
9122
|
className: cn54("flex w-full flex-col items-center gap-lg text-ink", className),
|
|
8664
9123
|
...rest,
|
|
8665
9124
|
children: [
|
|
8666
|
-
showBillingToggle ? /* @__PURE__ */ (0,
|
|
9125
|
+
showBillingToggle ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8667
9126
|
ButtonGroup,
|
|
8668
9127
|
{
|
|
8669
9128
|
tone: "primary",
|
|
@@ -8674,14 +9133,14 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
8674
9133
|
"aria-label": "Billing period"
|
|
8675
9134
|
}
|
|
8676
9135
|
) }) : null,
|
|
8677
|
-
/* @__PURE__ */ (0,
|
|
9136
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8678
9137
|
"ul",
|
|
8679
9138
|
{
|
|
8680
9139
|
className: "grid w-full rounded-lg border border-hairline bg-canvas shadow-card",
|
|
8681
9140
|
style: { gridTemplateColumns: `repeat(${tiers.length}, minmax(0, 1fr))` },
|
|
8682
9141
|
children: tiers.map((tier, i) => {
|
|
8683
9142
|
const price = priceOf(tier, period);
|
|
8684
|
-
return /* @__PURE__ */ (0,
|
|
9143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
8685
9144
|
"li",
|
|
8686
9145
|
{
|
|
8687
9146
|
className: cn54(
|
|
@@ -8690,10 +9149,10 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
8690
9149
|
tier.highlighted && "-m-px rounded-lg border border-primary bg-canvas shadow-md"
|
|
8691
9150
|
),
|
|
8692
9151
|
children: [
|
|
8693
|
-
/* @__PURE__ */ (0,
|
|
8694
|
-
/* @__PURE__ */ (0,
|
|
8695
|
-
/* @__PURE__ */ (0,
|
|
8696
|
-
/* @__PURE__ */ (0,
|
|
9152
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
9153
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h3", { className: "text-heading-sm text-ink", children: tier.name }),
|
|
9154
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("p", { className: "text-body-md text-body", children: [
|
|
9155
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "font-weight-label text-ink", children: [
|
|
8697
9156
|
currency,
|
|
8698
9157
|
price
|
|
8699
9158
|
] }),
|
|
@@ -8701,8 +9160,8 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
8701
9160
|
tier.unit ?? "per user/month"
|
|
8702
9161
|
] })
|
|
8703
9162
|
] }),
|
|
8704
|
-
/* @__PURE__ */ (0,
|
|
8705
|
-
/* @__PURE__ */ (0,
|
|
9163
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex min-h-6 items-center", children: tier.note ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-body-sm text-muted", children: tier.note }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
9164
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8706
9165
|
Switch,
|
|
8707
9166
|
{
|
|
8708
9167
|
size: "sm",
|
|
@@ -8711,9 +9170,9 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
8711
9170
|
onCheckedChange: (c) => setPeriod(c ? "yearly" : "monthly")
|
|
8712
9171
|
}
|
|
8713
9172
|
),
|
|
8714
|
-
/* @__PURE__ */ (0,
|
|
9173
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-body-sm text-body", children: period === "yearly" ? "Billed yearly" : "Billed monthly" })
|
|
8715
9174
|
] }) }),
|
|
8716
|
-
tier.current ? /* @__PURE__ */ (0,
|
|
9175
|
+
tier.current ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Button, { variant: "secondary", fullWidth: true, disabled: true, children: "Current plan" }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8717
9176
|
Button,
|
|
8718
9177
|
{
|
|
8719
9178
|
variant: tier.ctaVariant ?? "primary",
|
|
@@ -8737,10 +9196,10 @@ var PricingTableDesktop = React72.forwardRef(
|
|
|
8737
9196
|
PricingTableDesktop.displayName = "PricingTableDesktop";
|
|
8738
9197
|
|
|
8739
9198
|
// virtual-pkg:src/atoms/PricingTableMobile/PricingTableMobile.tsx
|
|
8740
|
-
var
|
|
8741
|
-
var
|
|
9199
|
+
var React74 = __toESM(require("react"));
|
|
9200
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
8742
9201
|
var cn55 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8743
|
-
var PricingTableMobile =
|
|
9202
|
+
var PricingTableMobile = React74.forwardRef(
|
|
8744
9203
|
({
|
|
8745
9204
|
tiers,
|
|
8746
9205
|
billing,
|
|
@@ -8753,7 +9212,7 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
8753
9212
|
...rest
|
|
8754
9213
|
}, ref) => {
|
|
8755
9214
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8756
|
-
return /* @__PURE__ */ (0,
|
|
9215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8757
9216
|
"section",
|
|
8758
9217
|
{
|
|
8759
9218
|
ref,
|
|
@@ -8761,7 +9220,7 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
8761
9220
|
className: cn55("flex w-full flex-col gap-base text-ink", className),
|
|
8762
9221
|
...rest,
|
|
8763
9222
|
children: [
|
|
8764
|
-
showBillingToggle ? /* @__PURE__ */ (0,
|
|
9223
|
+
showBillingToggle ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8765
9224
|
ButtonGroup,
|
|
8766
9225
|
{
|
|
8767
9226
|
tone: "primary",
|
|
@@ -8772,7 +9231,7 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
8772
9231
|
"aria-label": "Billing period"
|
|
8773
9232
|
}
|
|
8774
9233
|
) : null,
|
|
8775
|
-
/* @__PURE__ */ (0,
|
|
9234
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("ul", { className: "flex w-full flex-col gap-md", children: tiers.map((tier) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8776
9235
|
"li",
|
|
8777
9236
|
{
|
|
8778
9237
|
className: cn55(
|
|
@@ -8780,10 +9239,10 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
8780
9239
|
tier.highlighted ? "border-primary" : "border-hairline"
|
|
8781
9240
|
),
|
|
8782
9241
|
children: [
|
|
8783
|
-
/* @__PURE__ */ (0,
|
|
8784
|
-
/* @__PURE__ */ (0,
|
|
8785
|
-
/* @__PURE__ */ (0,
|
|
8786
|
-
/* @__PURE__ */ (0,
|
|
9242
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
9243
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h3", { className: "text-heading-sm text-ink", children: tier.name }),
|
|
9244
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("p", { className: "text-body-md text-body", children: [
|
|
9245
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "font-weight-label text-ink", children: [
|
|
8787
9246
|
currency,
|
|
8788
9247
|
priceOf(tier, period)
|
|
8789
9248
|
] }),
|
|
@@ -8791,8 +9250,8 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
8791
9250
|
tier.unit ?? "per user/month"
|
|
8792
9251
|
] })
|
|
8793
9252
|
] }),
|
|
8794
|
-
tier.note ? /* @__PURE__ */ (0,
|
|
8795
|
-
/* @__PURE__ */ (0,
|
|
9253
|
+
tier.note ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "text-body-sm text-muted", children: tier.note }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
9254
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8796
9255
|
Switch,
|
|
8797
9256
|
{
|
|
8798
9257
|
size: "sm",
|
|
@@ -8801,9 +9260,9 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
8801
9260
|
onCheckedChange: (c) => setPeriod(c ? "yearly" : "monthly")
|
|
8802
9261
|
}
|
|
8803
9262
|
),
|
|
8804
|
-
/* @__PURE__ */ (0,
|
|
9263
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "text-body-sm text-body", children: period === "yearly" ? "Billed yearly" : "Billed monthly" })
|
|
8805
9264
|
] }),
|
|
8806
|
-
tier.current ? /* @__PURE__ */ (0,
|
|
9265
|
+
tier.current ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, { variant: "secondary", size: "lg", fullWidth: true, disabled: true, children: "Current plan" }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8807
9266
|
Button,
|
|
8808
9267
|
{
|
|
8809
9268
|
variant: tier.ctaVariant ?? "primary",
|
|
@@ -8825,12 +9284,12 @@ var PricingTableMobile = React73.forwardRef(
|
|
|
8825
9284
|
PricingTableMobile.displayName = "PricingTableMobile";
|
|
8826
9285
|
|
|
8827
9286
|
// virtual-pkg:src/atoms/PricingTable/PricingTable.tsx
|
|
8828
|
-
var
|
|
8829
|
-
var PricingTable =
|
|
9287
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
9288
|
+
var PricingTable = React75.forwardRef(
|
|
8830
9289
|
({ billing, defaultBilling = "monthly", onBillingChange, showBillingToggle = true, className, ...props }, ref) => {
|
|
8831
9290
|
const [period, setPeriod] = useBilling(billing, defaultBilling, onBillingChange);
|
|
8832
|
-
return /* @__PURE__ */ (0,
|
|
8833
|
-
/* @__PURE__ */ (0,
|
|
9291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { ref, className: ["w-full", className].filter(Boolean).join(" "), children: [
|
|
9292
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8834
9293
|
PricingTableDesktop,
|
|
8835
9294
|
{
|
|
8836
9295
|
...props,
|
|
@@ -8839,7 +9298,7 @@ var PricingTable = React74.forwardRef(
|
|
|
8839
9298
|
showBillingToggle
|
|
8840
9299
|
}
|
|
8841
9300
|
) }),
|
|
8842
|
-
/* @__PURE__ */ (0,
|
|
9301
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8843
9302
|
PricingTableMobile,
|
|
8844
9303
|
{
|
|
8845
9304
|
...props,
|
|
@@ -8854,14 +9313,14 @@ var PricingTable = React74.forwardRef(
|
|
|
8854
9313
|
PricingTable.displayName = "PricingTable";
|
|
8855
9314
|
|
|
8856
9315
|
// virtual-pkg:src/atoms/ProductCardGrid/ProductCardGrid.tsx
|
|
8857
|
-
var
|
|
8858
|
-
var
|
|
9316
|
+
var React76 = __toESM(require("react"));
|
|
9317
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8859
9318
|
var COLS = {
|
|
8860
9319
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
8861
9320
|
3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
|
|
8862
9321
|
4: "grid-cols-2 md:grid-cols-4"
|
|
8863
9322
|
};
|
|
8864
|
-
var ProductCardGrid =
|
|
9323
|
+
var ProductCardGrid = React76.forwardRef(
|
|
8865
9324
|
({
|
|
8866
9325
|
items,
|
|
8867
9326
|
columns = 3,
|
|
@@ -8873,19 +9332,19 @@ var ProductCardGrid = React75.forwardRef(
|
|
|
8873
9332
|
label = "Products",
|
|
8874
9333
|
className,
|
|
8875
9334
|
...rest
|
|
8876
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
9335
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8877
9336
|
"section",
|
|
8878
9337
|
{
|
|
8879
9338
|
ref,
|
|
8880
9339
|
"aria-label": label,
|
|
8881
9340
|
className: ["w-full", className].filter(Boolean).join(" "),
|
|
8882
9341
|
...rest,
|
|
8883
|
-
children: items.length === 0 ? /* @__PURE__ */ (0,
|
|
8884
|
-
/* @__PURE__ */ (0,
|
|
8885
|
-
/* @__PURE__ */ (0,
|
|
8886
|
-
emptyDescription ? /* @__PURE__ */ (0,
|
|
8887
|
-
onEmptyAction ? /* @__PURE__ */ (0,
|
|
8888
|
-
] }) : /* @__PURE__ */ (0,
|
|
9342
|
+
children: items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime76.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: [
|
|
9343
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Icon, { name: emptyIcon, size: 24, className: "text-muted" }),
|
|
9344
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("h3", { className: "mt-xs text-heading-sm text-ink", children: emptyTitle }),
|
|
9345
|
+
emptyDescription ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("p", { className: "text-body-md text-muted", children: emptyDescription }) : null,
|
|
9346
|
+
onEmptyAction ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Button, { variant: "primary", className: "mt-sm", onClick: onEmptyAction, children: emptyActionLabel }) : null
|
|
9347
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("ul", { className: ["grid gap-gutter", COLS[columns]].join(" "), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("li", { className: "flex min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8889
9348
|
Card,
|
|
8890
9349
|
{
|
|
8891
9350
|
layout: "tile",
|
|
@@ -8894,7 +9353,7 @@ var ProductCardGrid = React75.forwardRef(
|
|
|
8894
9353
|
icon: item.icon ?? "box",
|
|
8895
9354
|
href: item.href,
|
|
8896
9355
|
linkLabel: `Open ${item.title}`,
|
|
8897
|
-
badge: item.badge ? /* @__PURE__ */ (0,
|
|
9356
|
+
badge: item.badge ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Badge, { tone: "primary", size: "md", children: item.badge }) : void 0
|
|
8898
9357
|
}
|
|
8899
9358
|
) }, item.id)) })
|
|
8900
9359
|
}
|
|
@@ -8903,14 +9362,14 @@ var ProductCardGrid = React75.forwardRef(
|
|
|
8903
9362
|
ProductCardGrid.displayName = "ProductCardGrid";
|
|
8904
9363
|
|
|
8905
9364
|
// virtual-pkg:src/atoms/Radio/Radio.tsx
|
|
8906
|
-
var
|
|
8907
|
-
var
|
|
9365
|
+
var React77 = __toESM(require("react"));
|
|
9366
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8908
9367
|
var cn56 = (...parts) => parts.filter(Boolean).join(" ");
|
|
8909
9368
|
var RING2 = { sm: "h-3.5 w-3.5", md: "h-4 w-4" };
|
|
8910
9369
|
var DOT3 = { sm: "h-1.5 w-1.5", md: "h-2 w-2" };
|
|
8911
9370
|
var SWATCH = { sm: "h-5 w-5", md: "h-6 w-6" };
|
|
8912
9371
|
var TEXT3 = { sm: "text-body-sm", md: "text-body-md" };
|
|
8913
|
-
var Radio =
|
|
9372
|
+
var Radio = React77.forwardRef(
|
|
8914
9373
|
({
|
|
8915
9374
|
checked,
|
|
8916
9375
|
defaultChecked,
|
|
@@ -8928,18 +9387,18 @@ var Radio = React76.forwardRef(
|
|
|
8928
9387
|
"aria-label": ariaLabel,
|
|
8929
9388
|
...rest
|
|
8930
9389
|
}, ref) => {
|
|
8931
|
-
const autoId =
|
|
9390
|
+
const autoId = React77.useId();
|
|
8932
9391
|
const inputId = id ?? `radio-${autoId}`;
|
|
8933
9392
|
const descId = description ? `${inputId}-desc` : void 0;
|
|
8934
9393
|
const isControlled = checked !== void 0;
|
|
8935
|
-
const [inner, setInner] =
|
|
9394
|
+
const [inner, setInner] = React77.useState(Boolean(defaultChecked));
|
|
8936
9395
|
const on = isControlled ? Boolean(checked) : inner;
|
|
8937
9396
|
const handleChange = (e) => {
|
|
8938
9397
|
if (!isControlled) setInner(e.target.checked);
|
|
8939
9398
|
if (e.target.checked) onValueChange?.(String(value ?? ""));
|
|
8940
9399
|
onChange?.(e);
|
|
8941
9400
|
};
|
|
8942
|
-
const input = /* @__PURE__ */ (0,
|
|
9401
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8943
9402
|
"input",
|
|
8944
9403
|
{
|
|
8945
9404
|
ref,
|
|
@@ -8956,9 +9415,9 @@ var Radio = React76.forwardRef(
|
|
|
8956
9415
|
...rest
|
|
8957
9416
|
}
|
|
8958
9417
|
);
|
|
8959
|
-
const control = swatch ? /* @__PURE__ */ (0,
|
|
9418
|
+
const control = swatch ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: cn56("relative inline-flex", SWATCH[size]), children: [
|
|
8960
9419
|
input,
|
|
8961
|
-
/* @__PURE__ */ (0,
|
|
9420
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8962
9421
|
"span",
|
|
8963
9422
|
{
|
|
8964
9423
|
"aria-hidden": "true",
|
|
@@ -8970,9 +9429,9 @@ var Radio = React76.forwardRef(
|
|
|
8970
9429
|
)
|
|
8971
9430
|
}
|
|
8972
9431
|
)
|
|
8973
|
-
] }) : /* @__PURE__ */ (0,
|
|
9432
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: cn56("relative inline-flex", RING2[size]), children: [
|
|
8974
9433
|
input,
|
|
8975
|
-
/* @__PURE__ */ (0,
|
|
9434
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8976
9435
|
"span",
|
|
8977
9436
|
{
|
|
8978
9437
|
"aria-hidden": "true",
|
|
@@ -8982,7 +9441,7 @@ var Radio = React76.forwardRef(
|
|
|
8982
9441
|
on ? "border-primary" : invalid ? "border-semantic-error" : "border-hairline-strong group-hover:border-muted-soft",
|
|
8983
9442
|
disabled && !on && "bg-surface-soft border-hairline shadow-none"
|
|
8984
9443
|
),
|
|
8985
|
-
children: /* @__PURE__ */ (0,
|
|
9444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8986
9445
|
"span",
|
|
8987
9446
|
{
|
|
8988
9447
|
className: cn56(
|
|
@@ -8995,7 +9454,7 @@ var Radio = React76.forwardRef(
|
|
|
8995
9454
|
}
|
|
8996
9455
|
)
|
|
8997
9456
|
] });
|
|
8998
|
-
return /* @__PURE__ */ (0,
|
|
9457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
8999
9458
|
"label",
|
|
9000
9459
|
{
|
|
9001
9460
|
htmlFor: inputId,
|
|
@@ -9005,7 +9464,7 @@ var Radio = React76.forwardRef(
|
|
|
9005
9464
|
className
|
|
9006
9465
|
),
|
|
9007
9466
|
children: [
|
|
9008
|
-
/* @__PURE__ */ (0,
|
|
9467
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
9009
9468
|
"span",
|
|
9010
9469
|
{
|
|
9011
9470
|
className: cn56(
|
|
@@ -9016,9 +9475,9 @@ var Radio = React76.forwardRef(
|
|
|
9016
9475
|
children: control
|
|
9017
9476
|
}
|
|
9018
9477
|
),
|
|
9019
|
-
(label || description) && /* @__PURE__ */ (0,
|
|
9020
|
-
label && /* @__PURE__ */ (0,
|
|
9021
|
-
description && /* @__PURE__ */ (0,
|
|
9478
|
+
(label || description) && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "flex min-w-0 flex-col gap-xxs", children: [
|
|
9479
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: TEXT3[size], children: label }),
|
|
9480
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { id: descId, className: "text-body-sm text-muted", children: description })
|
|
9022
9481
|
] })
|
|
9023
9482
|
]
|
|
9024
9483
|
}
|
|
@@ -9028,20 +9487,20 @@ var Radio = React76.forwardRef(
|
|
|
9028
9487
|
Radio.displayName = "Radio";
|
|
9029
9488
|
|
|
9030
9489
|
// virtual-pkg:src/atoms/Rating/Rating.tsx
|
|
9031
|
-
var
|
|
9032
|
-
var
|
|
9490
|
+
var React78 = __toESM(require("react"));
|
|
9491
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
9033
9492
|
var cn57 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9034
9493
|
var starPx = { sm: 14, md: 18 };
|
|
9035
9494
|
function Star({ fill, px }) {
|
|
9036
9495
|
const pct = Math.max(0, Math.min(1, fill)) * 100;
|
|
9037
|
-
return /* @__PURE__ */ (0,
|
|
9496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
9038
9497
|
"span",
|
|
9039
9498
|
{
|
|
9040
9499
|
className: "relative inline-flex shrink-0",
|
|
9041
9500
|
style: { width: px, height: px },
|
|
9042
9501
|
"aria-hidden": "true",
|
|
9043
9502
|
children: [
|
|
9044
|
-
/* @__PURE__ */ (0,
|
|
9503
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9045
9504
|
Icon,
|
|
9046
9505
|
{
|
|
9047
9506
|
name: "star",
|
|
@@ -9051,12 +9510,12 @@ function Star({ fill, px }) {
|
|
|
9051
9510
|
className: "text-hairline-strong"
|
|
9052
9511
|
}
|
|
9053
9512
|
),
|
|
9054
|
-
/* @__PURE__ */ (0,
|
|
9513
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9055
9514
|
"span",
|
|
9056
9515
|
{
|
|
9057
9516
|
className: "absolute inset-y-0 left-0 overflow-hidden transition-[width] duration-200 ease-out",
|
|
9058
9517
|
style: { width: `${pct}%` },
|
|
9059
|
-
children: /* @__PURE__ */ (0,
|
|
9518
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9060
9519
|
Icon,
|
|
9061
9520
|
{
|
|
9062
9521
|
name: "star",
|
|
@@ -9072,7 +9531,7 @@ function Star({ fill, px }) {
|
|
|
9072
9531
|
}
|
|
9073
9532
|
);
|
|
9074
9533
|
}
|
|
9075
|
-
var Rating =
|
|
9534
|
+
var Rating = React78.forwardRef(
|
|
9076
9535
|
({
|
|
9077
9536
|
value,
|
|
9078
9537
|
defaultValue = 0,
|
|
@@ -9087,8 +9546,8 @@ var Rating = React77.forwardRef(
|
|
|
9087
9546
|
className,
|
|
9088
9547
|
...rest
|
|
9089
9548
|
}, ref) => {
|
|
9090
|
-
const [inner, setInner] =
|
|
9091
|
-
const [hover, setHover] =
|
|
9549
|
+
const [inner, setInner] = React78.useState(defaultValue);
|
|
9550
|
+
const [hover, setHover] = React78.useState(null);
|
|
9092
9551
|
const current = value ?? inner;
|
|
9093
9552
|
const shown = hover ?? current;
|
|
9094
9553
|
const px = starPx[size];
|
|
@@ -9098,29 +9557,29 @@ var Rating = React77.forwardRef(
|
|
|
9098
9557
|
onChange?.(next);
|
|
9099
9558
|
};
|
|
9100
9559
|
const stars = Array.from({ length: max }, (_, i) => i + 1);
|
|
9101
|
-
return /* @__PURE__ */ (0,
|
|
9560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
9102
9561
|
"div",
|
|
9103
9562
|
{
|
|
9104
9563
|
ref,
|
|
9105
9564
|
className: cn57("inline-flex items-center gap-sm", className),
|
|
9106
9565
|
...rest,
|
|
9107
9566
|
children: [
|
|
9108
|
-
readOnly ? /* @__PURE__ */ (0,
|
|
9567
|
+
readOnly ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9109
9568
|
"span",
|
|
9110
9569
|
{
|
|
9111
9570
|
role: "img",
|
|
9112
9571
|
"aria-label": `${label}: ${current.toFixed(2)} out of ${max}`,
|
|
9113
9572
|
className: "inline-flex items-center gap-xs",
|
|
9114
|
-
children: stars.map((n) => /* @__PURE__ */ (0,
|
|
9573
|
+
children: stars.map((n) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Star, { fill: current - (n - 1), px }, n))
|
|
9115
9574
|
}
|
|
9116
|
-
) : /* @__PURE__ */ (0,
|
|
9575
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9117
9576
|
"div",
|
|
9118
9577
|
{
|
|
9119
9578
|
role: "radiogroup",
|
|
9120
9579
|
"aria-label": label,
|
|
9121
9580
|
className: "inline-flex items-center",
|
|
9122
9581
|
onMouseLeave: () => setHover(null),
|
|
9123
|
-
children: stars.map((n) => /* @__PURE__ */ (0,
|
|
9582
|
+
children: stars.map((n) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
9124
9583
|
Button,
|
|
9125
9584
|
{
|
|
9126
9585
|
variant: "ghost",
|
|
@@ -9134,15 +9593,15 @@ var Rating = React77.forwardRef(
|
|
|
9134
9593
|
onFocus: () => setHover(n),
|
|
9135
9594
|
onBlur: () => setHover(null),
|
|
9136
9595
|
onClick: () => pick(n),
|
|
9137
|
-
children: /* @__PURE__ */ (0,
|
|
9596
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Star, { fill: shown >= n ? 1 : 0, px })
|
|
9138
9597
|
},
|
|
9139
9598
|
n
|
|
9140
9599
|
))
|
|
9141
9600
|
}
|
|
9142
9601
|
),
|
|
9143
|
-
showValue && /* @__PURE__ */ (0,
|
|
9144
|
-
/* @__PURE__ */ (0,
|
|
9145
|
-
count !== void 0 && /* @__PURE__ */ (0,
|
|
9602
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "inline-flex items-baseline gap-xs text-body-md", children: [
|
|
9603
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-ink", children: current.toFixed(2) }),
|
|
9604
|
+
count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "text-muted", children: [
|
|
9146
9605
|
"(",
|
|
9147
9606
|
count,
|
|
9148
9607
|
")"
|
|
@@ -9156,10 +9615,10 @@ var Rating = React77.forwardRef(
|
|
|
9156
9615
|
Rating.displayName = "Rating";
|
|
9157
9616
|
|
|
9158
9617
|
// virtual-pkg:src/atoms/SearchBar/SearchBar.tsx
|
|
9159
|
-
var
|
|
9160
|
-
var
|
|
9618
|
+
var React79 = __toESM(require("react"));
|
|
9619
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
9161
9620
|
var cn58 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9162
|
-
var SearchBar =
|
|
9621
|
+
var SearchBar = React79.forwardRef(
|
|
9163
9622
|
({
|
|
9164
9623
|
value,
|
|
9165
9624
|
defaultValue = "",
|
|
@@ -9177,14 +9636,14 @@ var SearchBar = React78.forwardRef(
|
|
|
9177
9636
|
"aria-label": ariaLabel = "Search",
|
|
9178
9637
|
...inputProps
|
|
9179
9638
|
}, ref) => {
|
|
9180
|
-
const [inner, setInner] =
|
|
9639
|
+
const [inner, setInner] = React79.useState(defaultValue);
|
|
9181
9640
|
const query = value ?? inner;
|
|
9182
9641
|
const setQuery = (next) => {
|
|
9183
9642
|
if (value === void 0) setInner(next);
|
|
9184
9643
|
onValueChange?.(next);
|
|
9185
9644
|
};
|
|
9186
9645
|
const showHint = typeof resultCount === "number" && query.length > 0;
|
|
9187
|
-
return /* @__PURE__ */ (0,
|
|
9646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
9188
9647
|
"form",
|
|
9189
9648
|
{
|
|
9190
9649
|
role: "search",
|
|
@@ -9194,7 +9653,7 @@ var SearchBar = React78.forwardRef(
|
|
|
9194
9653
|
onSearch?.(query);
|
|
9195
9654
|
},
|
|
9196
9655
|
children: [
|
|
9197
|
-
/* @__PURE__ */ (0,
|
|
9656
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9198
9657
|
Input,
|
|
9199
9658
|
{
|
|
9200
9659
|
ref,
|
|
@@ -9211,13 +9670,13 @@ var SearchBar = React78.forwardRef(
|
|
|
9211
9670
|
setQuery("");
|
|
9212
9671
|
}
|
|
9213
9672
|
},
|
|
9214
|
-
leading: /* @__PURE__ */ (0,
|
|
9215
|
-
trailing: clearable ? /* @__PURE__ */ (0,
|
|
9673
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Icon, { name: "search", size: 16 }),
|
|
9674
|
+
trailing: clearable ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9216
9675
|
"span",
|
|
9217
9676
|
{
|
|
9218
9677
|
"data-state": query ? "open" : "closed",
|
|
9219
9678
|
className: "inline-flex transition duration-150 ease-out data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
9220
|
-
children: /* @__PURE__ */ (0,
|
|
9679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9221
9680
|
IconButton,
|
|
9222
9681
|
{
|
|
9223
9682
|
type: "button",
|
|
@@ -9234,13 +9693,13 @@ var SearchBar = React78.forwardRef(
|
|
|
9234
9693
|
}
|
|
9235
9694
|
)
|
|
9236
9695
|
}
|
|
9237
|
-
) : /* @__PURE__ */ (0,
|
|
9696
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
9238
9697
|
"span",
|
|
9239
9698
|
{
|
|
9240
9699
|
"data-state": showHint ? "open" : "closed",
|
|
9241
9700
|
"aria-live": "polite",
|
|
9242
9701
|
className: "transition duration-150 ease-out data-[state=open]:opacity-100 data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
9243
|
-
children: typeof resultCount === "number" ? /* @__PURE__ */ (0,
|
|
9702
|
+
children: typeof resultCount === "number" ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Badge, { tone: "neutral", size: "sm", children: [
|
|
9244
9703
|
resultCount,
|
|
9245
9704
|
" ",
|
|
9246
9705
|
resultCount === 1 ? "result" : "results"
|
|
@@ -9251,7 +9710,7 @@ var SearchBar = React78.forwardRef(
|
|
|
9251
9710
|
...inputProps
|
|
9252
9711
|
}
|
|
9253
9712
|
),
|
|
9254
|
-
actionLabel ? /* @__PURE__ */ (0,
|
|
9713
|
+
actionLabel ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Button, { type: "button", variant: "secondary", size, disabled, onClick: onAction, children: actionLabel }) : null
|
|
9255
9714
|
]
|
|
9256
9715
|
}
|
|
9257
9716
|
);
|
|
@@ -9260,16 +9719,16 @@ var SearchBar = React78.forwardRef(
|
|
|
9260
9719
|
SearchBar.displayName = "SearchBar";
|
|
9261
9720
|
|
|
9262
9721
|
// virtual-pkg:src/atoms/SearchResultsList/SearchResultsList.tsx
|
|
9263
|
-
var
|
|
9722
|
+
var React81 = __toESM(require("react"));
|
|
9264
9723
|
|
|
9265
9724
|
// virtual-pkg:src/atoms/Skeleton/Skeleton.tsx
|
|
9266
9725
|
var import_react4 = __toESM(require("react"));
|
|
9267
|
-
var
|
|
9726
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
9268
9727
|
function cn59(...parts) {
|
|
9269
9728
|
return parts.filter(Boolean).join(" ");
|
|
9270
9729
|
}
|
|
9271
9730
|
function Bone({ className, animated }) {
|
|
9272
|
-
return /* @__PURE__ */ (0,
|
|
9731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9273
9732
|
"span",
|
|
9274
9733
|
{
|
|
9275
9734
|
"aria-hidden": "true",
|
|
@@ -9280,9 +9739,9 @@ function Bone({ className, animated }) {
|
|
|
9280
9739
|
var Skeleton = import_react4.default.forwardRef(
|
|
9281
9740
|
({ variant = "block", lines = 3, animated = true, label = "Loading", className, ...rest }, ref) => {
|
|
9282
9741
|
const a11y = { role: "status", "aria-live": "polite", "aria-busy": true };
|
|
9283
|
-
const sr = /* @__PURE__ */ (0,
|
|
9742
|
+
const sr = /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "sr-only", children: label });
|
|
9284
9743
|
if (variant === "card") {
|
|
9285
|
-
return /* @__PURE__ */ (0,
|
|
9744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
9286
9745
|
"div",
|
|
9287
9746
|
{
|
|
9288
9747
|
ref,
|
|
@@ -9293,10 +9752,10 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9293
9752
|
),
|
|
9294
9753
|
...rest,
|
|
9295
9754
|
children: [
|
|
9296
|
-
/* @__PURE__ */ (0,
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9298
|
-
/* @__PURE__ */ (0,
|
|
9299
|
-
/* @__PURE__ */ (0,
|
|
9755
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Bone, { animated, className: "size-14 shrink-0 rounded-md" }),
|
|
9756
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-sm", children: [
|
|
9757
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Bone, { animated, className: "h-3 w-full rounded-xs" }),
|
|
9758
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Bone, { animated, className: "h-3 w-1/2 rounded-xs" })
|
|
9300
9759
|
] }),
|
|
9301
9760
|
sr
|
|
9302
9761
|
]
|
|
@@ -9304,19 +9763,19 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9304
9763
|
);
|
|
9305
9764
|
}
|
|
9306
9765
|
if (variant === "list-row") {
|
|
9307
|
-
return /* @__PURE__ */ (0,
|
|
9308
|
-
/* @__PURE__ */ (0,
|
|
9309
|
-
/* @__PURE__ */ (0,
|
|
9310
|
-
/* @__PURE__ */ (0,
|
|
9311
|
-
/* @__PURE__ */ (0,
|
|
9766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { ref, ...a11y, className: cn59("flex w-full items-center gap-md py-xs", className), ...rest, children: [
|
|
9767
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Bone, { animated, className: "size-8 shrink-0 rounded-sm" }),
|
|
9768
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-sm", children: [
|
|
9769
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Bone, { animated, className: "h-2.5 w-full rounded-xs" }),
|
|
9770
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Bone, { animated, className: "h-2.5 w-3/5 rounded-xs" })
|
|
9312
9771
|
] }),
|
|
9313
9772
|
sr
|
|
9314
9773
|
] });
|
|
9315
9774
|
}
|
|
9316
9775
|
if (variant === "paragraph") {
|
|
9317
9776
|
const count = Math.max(1, lines);
|
|
9318
|
-
return /* @__PURE__ */ (0,
|
|
9319
|
-
Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0,
|
|
9777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { ref, ...a11y, className: cn59("flex w-full flex-col gap-sm", className), ...rest, children: [
|
|
9778
|
+
Array.from({ length: count }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9320
9779
|
Bone,
|
|
9321
9780
|
{
|
|
9322
9781
|
animated,
|
|
@@ -9329,7 +9788,7 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9329
9788
|
}
|
|
9330
9789
|
const has = (prefix) => Boolean(className && prefix.test(className));
|
|
9331
9790
|
const shape = variant === "circle" ? cn59(!has(/(^|\s)size-/) && "size-8", "rounded-full") : variant === "text" ? cn59(!has(/(^|\s)h-/) && "h-2.5", !has(/(^|\s)w-/) && "w-full", "rounded-xs") : cn59(!has(/(^|\s)h-/) && "h-16", !has(/(^|\s)w-/) && "w-full", "rounded-md");
|
|
9332
|
-
return /* @__PURE__ */ (0,
|
|
9791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9333
9792
|
"div",
|
|
9334
9793
|
{
|
|
9335
9794
|
ref,
|
|
@@ -9344,7 +9803,7 @@ var Skeleton = import_react4.default.forwardRef(
|
|
|
9344
9803
|
Skeleton.displayName = "Skeleton";
|
|
9345
9804
|
|
|
9346
9805
|
// virtual-pkg:src/atoms/SearchResultsList/SearchResultsList.tsx
|
|
9347
|
-
var
|
|
9806
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
9348
9807
|
var DEFAULT_SCOPES = [
|
|
9349
9808
|
{ value: "all", label: "All" },
|
|
9350
9809
|
{ value: "issues", label: "Issues" },
|
|
@@ -9352,7 +9811,7 @@ var DEFAULT_SCOPES = [
|
|
|
9352
9811
|
{ value: "documents", label: "Documents" }
|
|
9353
9812
|
];
|
|
9354
9813
|
var cn60 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9355
|
-
var SearchResultsList =
|
|
9814
|
+
var SearchResultsList = React81.forwardRef(
|
|
9356
9815
|
({
|
|
9357
9816
|
query,
|
|
9358
9817
|
onQueryChange,
|
|
@@ -9370,7 +9829,7 @@ var SearchResultsList = React80.forwardRef(
|
|
|
9370
9829
|
}, ref) => {
|
|
9371
9830
|
const showEmpty = !loading && results.length === 0;
|
|
9372
9831
|
const resolvedEmptyDescription = emptyDescription ?? (query ? `Nothing matches \u201C${query}\u201D. Try a different term or scope.` : "Type to search.");
|
|
9373
|
-
return /* @__PURE__ */ (0,
|
|
9832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
9374
9833
|
"div",
|
|
9375
9834
|
{
|
|
9376
9835
|
ref,
|
|
@@ -9380,8 +9839,8 @@ var SearchResultsList = React80.forwardRef(
|
|
|
9380
9839
|
),
|
|
9381
9840
|
...rest,
|
|
9382
9841
|
children: [
|
|
9383
|
-
/* @__PURE__ */ (0,
|
|
9384
|
-
/* @__PURE__ */ (0,
|
|
9842
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex min-w-0 flex-wrap items-center gap-sm px-base py-md", children: [
|
|
9843
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "min-w-0 flex-1 basis-56", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9385
9844
|
SearchBar,
|
|
9386
9845
|
{
|
|
9387
9846
|
value: query,
|
|
@@ -9392,7 +9851,7 @@ var SearchResultsList = React80.forwardRef(
|
|
|
9392
9851
|
"aria-label": "Search"
|
|
9393
9852
|
}
|
|
9394
9853
|
) }),
|
|
9395
|
-
/* @__PURE__ */ (0,
|
|
9854
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.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_runtime81.jsx)(
|
|
9396
9855
|
Chip,
|
|
9397
9856
|
{
|
|
9398
9857
|
selected: s.value === scope,
|
|
@@ -9402,30 +9861,30 @@ var SearchResultsList = React80.forwardRef(
|
|
|
9402
9861
|
s.value
|
|
9403
9862
|
)) })
|
|
9404
9863
|
] }),
|
|
9405
|
-
/* @__PURE__ */ (0,
|
|
9406
|
-
[0, 1, 2].map((i) => /* @__PURE__ */ (0,
|
|
9407
|
-
/* @__PURE__ */ (0,
|
|
9408
|
-
/* @__PURE__ */ (0,
|
|
9409
|
-
/* @__PURE__ */ (0,
|
|
9410
|
-
/* @__PURE__ */ (0,
|
|
9864
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { "aria-live": "polite", "aria-busy": loading || void 0, className: "min-h-40 px-sm pb-sm", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex flex-col gap-xs", children: [
|
|
9865
|
+
[0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex items-center gap-md px-base py-sm", children: [
|
|
9866
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Spinner, { size: "sm", tone: "current", className: "text-muted-soft" }),
|
|
9867
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xs", children: [
|
|
9868
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Skeleton, { variant: "text", className: "w-3/5" }),
|
|
9869
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Skeleton, { variant: "text", className: "w-2/5" })
|
|
9411
9870
|
] })
|
|
9412
9871
|
] }, i)),
|
|
9413
|
-
/* @__PURE__ */ (0,
|
|
9414
|
-
] }) : showEmpty ? /* @__PURE__ */ (0,
|
|
9415
|
-
/* @__PURE__ */ (0,
|
|
9416
|
-
/* @__PURE__ */ (0,
|
|
9417
|
-
/* @__PURE__ */ (0,
|
|
9418
|
-
] }) : /* @__PURE__ */ (0,
|
|
9872
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "sr-only", children: "Searching\u2026" })
|
|
9873
|
+
] }) : showEmpty ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex flex-col items-center justify-center gap-xs px-base py-xl text-center", children: [
|
|
9874
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon, { name: "search", size: 36, strokeWidth: 1.5, className: "text-muted-soft" }),
|
|
9875
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "mt-sm text-heading-sm text-ink", children: emptyTitle }),
|
|
9876
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "text-body-sm text-muted", children: resolvedEmptyDescription })
|
|
9877
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("ul", { className: "flex flex-col", "aria-label": "Search results", children: results.map((r) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9419
9878
|
ListItem,
|
|
9420
9879
|
{
|
|
9421
9880
|
variant: "plain",
|
|
9422
9881
|
href: r.href,
|
|
9423
9882
|
onClick: () => onResultClick?.(r),
|
|
9424
|
-
leading: /* @__PURE__ */ (0,
|
|
9883
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon, { name: r.icon, size: 18, className: cn60("shrink-0", r.iconClassName ?? "text-muted") }),
|
|
9425
9884
|
trailing: null,
|
|
9426
|
-
title: /* @__PURE__ */ (0,
|
|
9427
|
-
/* @__PURE__ */ (0,
|
|
9428
|
-
/* @__PURE__ */ (0,
|
|
9885
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
9886
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "block truncate text-body-sm text-muted", children: r.type }),
|
|
9887
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "block truncate", children: r.title })
|
|
9429
9888
|
] })
|
|
9430
9889
|
}
|
|
9431
9890
|
) }, r.id)) }) })
|
|
@@ -9437,8 +9896,8 @@ var SearchResultsList = React80.forwardRef(
|
|
|
9437
9896
|
SearchResultsList.displayName = "SearchResultsList";
|
|
9438
9897
|
|
|
9439
9898
|
// virtual-pkg:src/atoms/SegmentedControl/SegmentedControl.tsx
|
|
9440
|
-
var
|
|
9441
|
-
var
|
|
9899
|
+
var React82 = __toESM(require("react"));
|
|
9900
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
9442
9901
|
var cn61 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9443
9902
|
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";
|
|
9444
9903
|
var frame = {
|
|
@@ -9449,13 +9908,13 @@ var pillRadius = {
|
|
|
9449
9908
|
sm: "rounded-sm",
|
|
9450
9909
|
md: "rounded-md"
|
|
9451
9910
|
};
|
|
9452
|
-
var SegmentedControl =
|
|
9911
|
+
var SegmentedControl = React82.forwardRef(
|
|
9453
9912
|
({ items, value, onValueChange, size = "sm", bare = false, className, ...rest }, ref) => {
|
|
9454
|
-
const trackRef =
|
|
9455
|
-
const itemRefs =
|
|
9456
|
-
const [pill, setPill] =
|
|
9913
|
+
const trackRef = React82.useRef(null);
|
|
9914
|
+
const itemRefs = React82.useRef({});
|
|
9915
|
+
const [pill, setPill] = React82.useState(null);
|
|
9457
9916
|
const valueKey = items.map((item) => item.value).join("|");
|
|
9458
|
-
|
|
9917
|
+
React82.useLayoutEffect(() => {
|
|
9459
9918
|
const el = value !== void 0 ? itemRefs.current[value] : null;
|
|
9460
9919
|
if (!el) {
|
|
9461
9920
|
setPill(null);
|
|
@@ -9485,7 +9944,7 @@ var SegmentedControl = React81.forwardRef(
|
|
|
9485
9944
|
onValueChange(next.value);
|
|
9486
9945
|
itemRefs.current[next.value]?.focus();
|
|
9487
9946
|
};
|
|
9488
|
-
return /* @__PURE__ */ (0,
|
|
9947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { ref, className: cn61("w-full", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9489
9948
|
"div",
|
|
9490
9949
|
{
|
|
9491
9950
|
ref: trackRef,
|
|
@@ -9499,7 +9958,7 @@ var SegmentedControl = React81.forwardRef(
|
|
|
9499
9958
|
"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
9500
9959
|
),
|
|
9501
9960
|
children: [
|
|
9502
|
-
!bare ? /* @__PURE__ */ (0,
|
|
9961
|
+
!bare ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9503
9962
|
"span",
|
|
9504
9963
|
{
|
|
9505
9964
|
"aria-hidden": "true",
|
|
@@ -9514,7 +9973,7 @@ var SegmentedControl = React81.forwardRef(
|
|
|
9514
9973
|
const active = item.value === value;
|
|
9515
9974
|
const iconOnly = Boolean(item.icon) && item.label == null;
|
|
9516
9975
|
const glyphSize3 = size === "sm" ? 14 : 16;
|
|
9517
|
-
return /* @__PURE__ */ (0,
|
|
9976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9518
9977
|
Button,
|
|
9519
9978
|
{
|
|
9520
9979
|
ref: (el) => {
|
|
@@ -9531,17 +9990,17 @@ var SegmentedControl = React81.forwardRef(
|
|
|
9531
9990
|
disabled: item.disabled,
|
|
9532
9991
|
onClick: () => onValueChange(item.value),
|
|
9533
9992
|
className: segmentInteraction,
|
|
9534
|
-
children: iconOnly ? /* @__PURE__ */ (0,
|
|
9535
|
-
item.dotClassName ? /* @__PURE__ */ (0,
|
|
9993
|
+
children: iconOnly ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon, { name: item.icon, size: glyphSize3 }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
9994
|
+
item.dotClassName ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9536
9995
|
"span",
|
|
9537
9996
|
{
|
|
9538
9997
|
"aria-hidden": "true",
|
|
9539
9998
|
className: cn61("h-2 w-2 shrink-0 rounded-full", item.dotClassName)
|
|
9540
9999
|
}
|
|
9541
10000
|
) : null,
|
|
9542
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
9543
|
-
/* @__PURE__ */ (0,
|
|
9544
|
-
item.count !== void 0 ? /* @__PURE__ */ (0,
|
|
10001
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Icon, { name: item.icon, size: glyphSize3 }) : null,
|
|
10002
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "truncate", children: item.label }),
|
|
10003
|
+
item.count !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9545
10004
|
Badge,
|
|
9546
10005
|
{
|
|
9547
10006
|
size: "sm",
|
|
@@ -9564,29 +10023,29 @@ var SegmentedControl = React81.forwardRef(
|
|
|
9564
10023
|
SegmentedControl.displayName = "SegmentedControl";
|
|
9565
10024
|
|
|
9566
10025
|
// virtual-pkg:src/atoms/Sidebar/Sidebar.tsx
|
|
9567
|
-
var
|
|
10026
|
+
var React86 = __toESM(require("react"));
|
|
9568
10027
|
|
|
9569
10028
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
9570
|
-
var
|
|
10029
|
+
var React84 = __toESM(require("react"));
|
|
9571
10030
|
|
|
9572
10031
|
// virtual-pkg:src/atoms/Tooltip/Tooltip.tsx
|
|
9573
10032
|
var import_react5 = __toESM(require("react"));
|
|
9574
|
-
var
|
|
9575
|
-
var
|
|
10033
|
+
var import_react_dom10 = require("react-dom");
|
|
10034
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
9576
10035
|
function cn62(...parts) {
|
|
9577
10036
|
return parts.filter(Boolean).join(" ");
|
|
9578
10037
|
}
|
|
9579
|
-
var
|
|
10038
|
+
var GAP3 = 8;
|
|
9580
10039
|
function place(rect, placement) {
|
|
9581
10040
|
switch (placement) {
|
|
9582
10041
|
case "bottom":
|
|
9583
|
-
return { top: rect.bottom +
|
|
10042
|
+
return { top: rect.bottom + GAP3, left: rect.left + rect.width / 2, transform: "translate(-50%, 0)" };
|
|
9584
10043
|
case "left":
|
|
9585
|
-
return { top: rect.top + rect.height / 2, left: rect.left -
|
|
10044
|
+
return { top: rect.top + rect.height / 2, left: rect.left - GAP3, transform: "translate(-100%, -50%)" };
|
|
9586
10045
|
case "right":
|
|
9587
|
-
return { top: rect.top + rect.height / 2, left: rect.right +
|
|
10046
|
+
return { top: rect.top + rect.height / 2, left: rect.right + GAP3, transform: "translate(0, -50%)" };
|
|
9588
10047
|
default:
|
|
9589
|
-
return { top: rect.top -
|
|
10048
|
+
return { top: rect.top - GAP3, left: rect.left + rect.width / 2, transform: "translate(-50%, -100%)" };
|
|
9590
10049
|
}
|
|
9591
10050
|
}
|
|
9592
10051
|
var nudgeClosed = {
|
|
@@ -9662,7 +10121,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9662
10121
|
const trigger = import_react5.default.cloneElement(children, {
|
|
9663
10122
|
"aria-describedby": open ? id : void 0
|
|
9664
10123
|
});
|
|
9665
|
-
const panel = /* @__PURE__ */ (0,
|
|
10124
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9666
10125
|
"div",
|
|
9667
10126
|
{
|
|
9668
10127
|
style: {
|
|
@@ -9673,7 +10132,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9673
10132
|
zIndex: "var(--z-tooltip, 1500)",
|
|
9674
10133
|
pointerEvents: "none"
|
|
9675
10134
|
},
|
|
9676
|
-
children: /* @__PURE__ */ (0,
|
|
10135
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9677
10136
|
"div",
|
|
9678
10137
|
{
|
|
9679
10138
|
id,
|
|
@@ -9687,7 +10146,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9687
10146
|
),
|
|
9688
10147
|
children: [
|
|
9689
10148
|
content,
|
|
9690
|
-
variant === "default" && shortcut && shortcut.length > 0 ? /* @__PURE__ */ (0,
|
|
10149
|
+
variant === "default" && shortcut && shortcut.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "flex items-center gap-xxs", children: shortcut.map((key) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9691
10150
|
"kbd",
|
|
9692
10151
|
{
|
|
9693
10152
|
className: "inline-flex min-w-5 items-center justify-center rounded-xs bg-inverse-ink/15 px-xs text-caption text-inverse-ink",
|
|
@@ -9695,7 +10154,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9695
10154
|
},
|
|
9696
10155
|
key
|
|
9697
10156
|
)) }) : null,
|
|
9698
|
-
variant === "default" ? /* @__PURE__ */ (0,
|
|
10157
|
+
variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9699
10158
|
"span",
|
|
9700
10159
|
{
|
|
9701
10160
|
"aria-hidden": "true",
|
|
@@ -9707,7 +10166,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9707
10166
|
)
|
|
9708
10167
|
}
|
|
9709
10168
|
);
|
|
9710
|
-
return /* @__PURE__ */ (0,
|
|
10169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9711
10170
|
"span",
|
|
9712
10171
|
{
|
|
9713
10172
|
ref: setRefs,
|
|
@@ -9721,7 +10180,7 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9721
10180
|
onBlur: () => setOpen(false),
|
|
9722
10181
|
children: [
|
|
9723
10182
|
trigger,
|
|
9724
|
-
mounted ? (0,
|
|
10183
|
+
mounted ? (0, import_react_dom10.createPortal)(panel, document.body) : null
|
|
9725
10184
|
]
|
|
9726
10185
|
}
|
|
9727
10186
|
);
|
|
@@ -9730,11 +10189,11 @@ var Tooltip = import_react5.default.forwardRef(
|
|
|
9730
10189
|
Tooltip.displayName = "Tooltip";
|
|
9731
10190
|
|
|
9732
10191
|
// virtual-pkg:src/atoms/SidebarDesktop/SidebarDesktop.tsx
|
|
9733
|
-
var
|
|
10192
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9734
10193
|
var cn63 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9735
10194
|
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";
|
|
9736
10195
|
var hasBadge = (badge) => badge !== void 0 && badge !== null && badge !== false;
|
|
9737
|
-
var SidebarDesktop =
|
|
10196
|
+
var SidebarDesktop = React84.forwardRef(
|
|
9738
10197
|
({
|
|
9739
10198
|
brandName = "Linear",
|
|
9740
10199
|
brandHref = "#",
|
|
@@ -9759,15 +10218,15 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9759
10218
|
children,
|
|
9760
10219
|
...rest
|
|
9761
10220
|
}, ref) => {
|
|
9762
|
-
const baseId =
|
|
9763
|
-
const [innerCollapsed, setInnerCollapsed] =
|
|
10221
|
+
const baseId = React84.useId();
|
|
10222
|
+
const [innerCollapsed, setInnerCollapsed] = React84.useState(defaultCollapsed);
|
|
9764
10223
|
const collapsed = collapsedProp ?? innerCollapsed;
|
|
9765
10224
|
const toggle = () => {
|
|
9766
10225
|
const next = !collapsed;
|
|
9767
10226
|
if (collapsedProp === void 0) setInnerCollapsed(next);
|
|
9768
10227
|
onCollapsedChange?.(next);
|
|
9769
10228
|
};
|
|
9770
|
-
const [expanded, setExpanded] =
|
|
10229
|
+
const [expanded, setExpanded] = React84.useState(
|
|
9771
10230
|
() => new Set(
|
|
9772
10231
|
defaultExpanded ?? sections.filter((s) => s.label).map((s) => s.id)
|
|
9773
10232
|
)
|
|
@@ -9783,9 +10242,9 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9783
10242
|
const showSettingsAction = onSettingsClick !== void 0;
|
|
9784
10243
|
const showFooterActions = showHelpAction || showSettingsAction;
|
|
9785
10244
|
const showFooterRow = showFooter && (Boolean(userName) || showFooterActions);
|
|
9786
|
-
const renderIcon = (link) => link.icon ? /* @__PURE__ */ (0,
|
|
9787
|
-
/* @__PURE__ */ (0,
|
|
9788
|
-
collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
10245
|
+
const renderIcon = (link) => link.icon ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "relative inline-flex shrink-0 items-center justify-center", children: [
|
|
10246
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }),
|
|
10247
|
+
collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9789
10248
|
"span",
|
|
9790
10249
|
{
|
|
9791
10250
|
"aria-hidden": "true",
|
|
@@ -9795,7 +10254,7 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9795
10254
|
] }) : null;
|
|
9796
10255
|
const renderLink = (link, nested = false) => {
|
|
9797
10256
|
const current = link.id === activeId;
|
|
9798
|
-
const anchor = /* @__PURE__ */ (0,
|
|
10257
|
+
const anchor = /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9799
10258
|
"a",
|
|
9800
10259
|
{
|
|
9801
10260
|
href: link.href ?? `#${link.id}`,
|
|
@@ -9809,20 +10268,20 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9809
10268
|
),
|
|
9810
10269
|
children: [
|
|
9811
10270
|
renderIcon(link),
|
|
9812
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
9813
|
-
!collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
10271
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "min-w-0 flex-1 truncate", children: link.label }),
|
|
10272
|
+
!collapsed && hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge })
|
|
9814
10273
|
]
|
|
9815
10274
|
}
|
|
9816
10275
|
);
|
|
9817
|
-
return /* @__PURE__ */ (0,
|
|
10276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("li", { className: collapsed ? "flex justify-center" : void 0, children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Tooltip, { content: link.label, placement: "right", children: anchor }) : anchor }, link.id);
|
|
9818
10277
|
};
|
|
9819
10278
|
const renderGroup = (link) => {
|
|
9820
10279
|
const open = isOpen(link.id);
|
|
9821
10280
|
const panelId = `${baseId}-${link.id}`;
|
|
9822
10281
|
const kids = link.children ?? [];
|
|
9823
10282
|
if (collapsed) {
|
|
9824
|
-
return /* @__PURE__ */ (0,
|
|
9825
|
-
/* @__PURE__ */ (0,
|
|
10283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(React84.Fragment, { children: [
|
|
10284
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("li", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Tooltip, { content: link.label, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9826
10285
|
IconButton,
|
|
9827
10286
|
{
|
|
9828
10287
|
icon: link.icon ?? "box",
|
|
@@ -9837,8 +10296,8 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9837
10296
|
open && kids.map((k) => renderLink(k))
|
|
9838
10297
|
] }, link.id);
|
|
9839
10298
|
}
|
|
9840
|
-
return /* @__PURE__ */ (0,
|
|
9841
|
-
/* @__PURE__ */ (0,
|
|
10299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("li", { children: [
|
|
10300
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9842
10301
|
Button,
|
|
9843
10302
|
{
|
|
9844
10303
|
variant: "item",
|
|
@@ -9846,12 +10305,12 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9846
10305
|
"aria-expanded": open,
|
|
9847
10306
|
"aria-controls": panelId,
|
|
9848
10307
|
onClick: () => flip(link.id),
|
|
9849
|
-
leadingIcon: link.icon ? /* @__PURE__ */ (0,
|
|
10308
|
+
leadingIcon: link.icon ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }) : void 0,
|
|
9850
10309
|
className: "px-sm",
|
|
9851
|
-
children: /* @__PURE__ */ (0,
|
|
9852
|
-
/* @__PURE__ */ (0,
|
|
9853
|
-
hasBadge(link.badge) && /* @__PURE__ */ (0,
|
|
9854
|
-
/* @__PURE__ */ (0,
|
|
10310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
10311
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "truncate", children: link.label }),
|
|
10312
|
+
hasBadge(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge }),
|
|
10313
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9855
10314
|
Icon,
|
|
9856
10315
|
{
|
|
9857
10316
|
name: "chevron-down",
|
|
@@ -9862,21 +10321,21 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9862
10321
|
] })
|
|
9863
10322
|
}
|
|
9864
10323
|
),
|
|
9865
|
-
/* @__PURE__ */ (0,
|
|
10324
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9866
10325
|
"div",
|
|
9867
10326
|
{
|
|
9868
10327
|
id: panelId,
|
|
9869
10328
|
"data-state": open ? "open" : "closed",
|
|
9870
10329
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9871
|
-
children: /* @__PURE__ */ (0,
|
|
10330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden pt-xxs", children: kids.map((k) => renderLink(k, true)) })
|
|
9872
10331
|
}
|
|
9873
10332
|
)
|
|
9874
10333
|
] }, link.id);
|
|
9875
10334
|
};
|
|
9876
10335
|
const renderItem = (link) => link.children?.length ? renderGroup(link) : renderLink(link);
|
|
9877
10336
|
const showWorkspaceRow = Boolean(workspaceName) || !collapsed && headerActions != null;
|
|
9878
|
-
return /* @__PURE__ */ (0,
|
|
9879
|
-
/* @__PURE__ */ (0,
|
|
10337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { ref, className: cn63("flex h-full w-full min-h-0 bg-canvas text-ink", className), ...rest, children: [
|
|
10338
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9880
10339
|
"aside",
|
|
9881
10340
|
{
|
|
9882
10341
|
"aria-label": "Sidebar",
|
|
@@ -9884,11 +10343,11 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9884
10343
|
style: { width: collapsed ? 64 : 256 },
|
|
9885
10344
|
className: "flex h-full shrink-0 flex-col overflow-hidden border-r border-hairline bg-surface transition-[width] duration-200 ease-out",
|
|
9886
10345
|
children: [
|
|
9887
|
-
collapsed ? /* @__PURE__ */ (0,
|
|
9888
|
-
/* @__PURE__ */ (0,
|
|
9889
|
-
/* @__PURE__ */ (0,
|
|
10346
|
+
collapsed ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex shrink-0 justify-center pb-sm pt-md", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconButton, { icon: "panel-right", variant: "secondary", "aria-label": "Expand sidebar", "aria-expanded": false, onClick: toggle }) }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex shrink-0 items-center justify-between gap-sm pb-sm pl-base pr-md pt-md", children: [
|
|
10347
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
10348
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconButton, { icon: "panel-left", variant: "secondary", "aria-label": "Collapse sidebar", "aria-expanded": true, onClick: toggle })
|
|
9890
10349
|
] }),
|
|
9891
|
-
showWorkspaceRow && /* @__PURE__ */ (0,
|
|
10350
|
+
showWorkspaceRow && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9892
10351
|
"div",
|
|
9893
10352
|
{
|
|
9894
10353
|
className: cn63(
|
|
@@ -9896,26 +10355,26 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9896
10355
|
collapsed ? "flex justify-center" : "flex items-center gap-xxs px-sm"
|
|
9897
10356
|
),
|
|
9898
10357
|
children: [
|
|
9899
|
-
workspaceName ? collapsed ? /* @__PURE__ */ (0,
|
|
10358
|
+
workspaceName ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Tooltip, { content: workspaceName, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Button, { variant: "ghost", iconOnly: true, "aria-label": workspaceName, onClick: onWorkspaceClick, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9900
10359
|
Button,
|
|
9901
10360
|
{
|
|
9902
10361
|
variant: "ghost",
|
|
9903
10362
|
onClick: onWorkspaceClick,
|
|
9904
10363
|
className: "min-w-0 flex-1 justify-start px-sm",
|
|
9905
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
9906
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
9907
|
-
children: /* @__PURE__ */ (0,
|
|
10364
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }),
|
|
10365
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon, { name: "chevron-down", size: 14, className: "text-muted" }),
|
|
10366
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "min-w-0 truncate text-ink", children: workspaceName })
|
|
9908
10367
|
}
|
|
9909
|
-
) : /* @__PURE__ */ (0,
|
|
9910
|
-
!collapsed && headerActions != null && /* @__PURE__ */ (0,
|
|
10368
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "min-w-0 flex-1" }),
|
|
10369
|
+
!collapsed && headerActions != null && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex shrink-0 items-center gap-xxs", children: headerActions })
|
|
9911
10370
|
]
|
|
9912
10371
|
}
|
|
9913
10372
|
),
|
|
9914
|
-
/* @__PURE__ */ (0,
|
|
10373
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("nav", { "aria-label": "Main", className: cn63("min-h-0 flex-1 overflow-y-auto overscroll-contain pb-sm", collapsed ? "px-0" : "px-sm"), children: sections.map((section, i) => {
|
|
9915
10374
|
const sectionOpen = !section.label || isOpen(section.id);
|
|
9916
10375
|
const listId = `${baseId}-section-${section.id}`;
|
|
9917
|
-
return /* @__PURE__ */ (0,
|
|
9918
|
-
section.label && !collapsed && /* @__PURE__ */ (0,
|
|
10376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: i > 0 ? "mt-base" : void 0, children: [
|
|
10377
|
+
section.label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9919
10378
|
Button,
|
|
9920
10379
|
{
|
|
9921
10380
|
variant: "item",
|
|
@@ -9924,9 +10383,9 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9924
10383
|
"aria-controls": listId,
|
|
9925
10384
|
onClick: () => flip(section.id),
|
|
9926
10385
|
className: "px-sm",
|
|
9927
|
-
children: /* @__PURE__ */ (0,
|
|
10386
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("span", { className: "inline-flex items-center gap-xs text-muted", children: [
|
|
9928
10387
|
section.label,
|
|
9929
|
-
/* @__PURE__ */ (0,
|
|
10388
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9930
10389
|
Icon,
|
|
9931
10390
|
{
|
|
9932
10391
|
name: "chevron-down",
|
|
@@ -9937,29 +10396,29 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9937
10396
|
] })
|
|
9938
10397
|
}
|
|
9939
10398
|
),
|
|
9940
|
-
/* @__PURE__ */ (0,
|
|
10399
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9941
10400
|
"div",
|
|
9942
10401
|
{
|
|
9943
10402
|
id: listId,
|
|
9944
10403
|
"data-state": sectionOpen || collapsed ? "open" : "closed",
|
|
9945
10404
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
9946
|
-
children: /* @__PURE__ */ (0,
|
|
10405
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden", children: section.items.map(renderItem) })
|
|
9947
10406
|
}
|
|
9948
10407
|
)
|
|
9949
10408
|
] }, section.id);
|
|
9950
10409
|
}) }),
|
|
9951
|
-
announcement && !collapsed && /* @__PURE__ */ (0,
|
|
10410
|
+
announcement && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "shrink-0 px-sm pb-sm", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9952
10411
|
"a",
|
|
9953
10412
|
{
|
|
9954
10413
|
href: announcement.href ?? "#",
|
|
9955
10414
|
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",
|
|
9956
10415
|
children: [
|
|
9957
|
-
/* @__PURE__ */ (0,
|
|
9958
|
-
/* @__PURE__ */ (0,
|
|
10416
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-caption text-muted", children: announcement.eyebrow }),
|
|
10417
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-body-sm text-ink", children: announcement.title })
|
|
9959
10418
|
]
|
|
9960
10419
|
}
|
|
9961
10420
|
) }),
|
|
9962
|
-
showFooterRow && /* @__PURE__ */ (0,
|
|
10421
|
+
showFooterRow && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9963
10422
|
"div",
|
|
9964
10423
|
{
|
|
9965
10424
|
className: cn63(
|
|
@@ -9967,9 +10426,9 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9967
10426
|
collapsed ? "flex-col items-center gap-xs" : "items-center justify-between px-md"
|
|
9968
10427
|
),
|
|
9969
10428
|
children: [
|
|
9970
|
-
userName && /* @__PURE__ */ (0,
|
|
9971
|
-
showFooterActions && /* @__PURE__ */ (0,
|
|
9972
|
-
showHelpAction && /* @__PURE__ */ (0,
|
|
10429
|
+
userName && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }),
|
|
10430
|
+
showFooterActions && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: cn63("flex items-center gap-xxs", collapsed && "flex-col"), children: [
|
|
10431
|
+
showHelpAction && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9973
10432
|
IconButton,
|
|
9974
10433
|
{
|
|
9975
10434
|
icon: "message-circle",
|
|
@@ -9978,7 +10437,7 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9978
10437
|
onClick: onHelpClick
|
|
9979
10438
|
}
|
|
9980
10439
|
),
|
|
9981
|
-
showSettingsAction && /* @__PURE__ */ (0,
|
|
10440
|
+
showSettingsAction && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconButton, { icon: "settings", variant: "ghost", "aria-label": "Settings", onClick: onSettingsClick })
|
|
9982
10441
|
] })
|
|
9983
10442
|
]
|
|
9984
10443
|
}
|
|
@@ -9986,19 +10445,19 @@ var SidebarDesktop = React83.forwardRef(
|
|
|
9986
10445
|
]
|
|
9987
10446
|
}
|
|
9988
10447
|
),
|
|
9989
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
10448
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "min-w-0 flex-1 overflow-auto", children })
|
|
9990
10449
|
] });
|
|
9991
10450
|
}
|
|
9992
10451
|
);
|
|
9993
10452
|
SidebarDesktop.displayName = "SidebarDesktop";
|
|
9994
10453
|
|
|
9995
10454
|
// virtual-pkg:src/atoms/SidebarMobile/SidebarMobile.tsx
|
|
9996
|
-
var
|
|
9997
|
-
var
|
|
10455
|
+
var React85 = __toESM(require("react"));
|
|
10456
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9998
10457
|
var cn64 = (...parts) => parts.filter(Boolean).join(" ");
|
|
9999
10458
|
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";
|
|
10000
10459
|
var hasBadge2 = (badge) => badge !== void 0 && badge !== null && badge !== false;
|
|
10001
|
-
var SidebarMobile =
|
|
10460
|
+
var SidebarMobile = React85.forwardRef(
|
|
10002
10461
|
({
|
|
10003
10462
|
brandName = "Linear",
|
|
10004
10463
|
brandHref = "#",
|
|
@@ -10023,17 +10482,17 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10023
10482
|
children,
|
|
10024
10483
|
...rest
|
|
10025
10484
|
}, ref) => {
|
|
10026
|
-
const baseId =
|
|
10027
|
-
const [innerOpen, setInnerOpen] =
|
|
10485
|
+
const baseId = React85.useId();
|
|
10486
|
+
const [innerOpen, setInnerOpen] = React85.useState(defaultOpen);
|
|
10028
10487
|
const open = openProp ?? innerOpen;
|
|
10029
|
-
const setOpen =
|
|
10488
|
+
const setOpen = React85.useCallback(
|
|
10030
10489
|
(next) => {
|
|
10031
10490
|
if (openProp === void 0) setInnerOpen(next);
|
|
10032
10491
|
onOpenChange?.(next);
|
|
10033
10492
|
},
|
|
10034
10493
|
[openProp, onOpenChange]
|
|
10035
10494
|
);
|
|
10036
|
-
const [expanded, setExpanded] =
|
|
10495
|
+
const [expanded, setExpanded] = React85.useState(
|
|
10037
10496
|
() => new Set(defaultExpanded ?? sections.filter((s) => s.label).map((s) => s.id))
|
|
10038
10497
|
);
|
|
10039
10498
|
const flip = (id) => setExpanded((prev) => {
|
|
@@ -10048,7 +10507,7 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10048
10507
|
const showFooterRow = showFooter && (Boolean(userName) || showFooterActions);
|
|
10049
10508
|
const renderLink = (link, nested = false) => {
|
|
10050
10509
|
const current = link.id === activeId;
|
|
10051
|
-
return /* @__PURE__ */ (0,
|
|
10510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
10052
10511
|
"a",
|
|
10053
10512
|
{
|
|
10054
10513
|
href: link.href ?? `#${link.id}`,
|
|
@@ -10063,9 +10522,9 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10063
10522
|
current ? "bg-surface-strong text-ink font-weight-label" : "text-ink hover:bg-surface-soft active:bg-surface-strong"
|
|
10064
10523
|
),
|
|
10065
10524
|
children: [
|
|
10066
|
-
link.icon && /* @__PURE__ */ (0,
|
|
10067
|
-
/* @__PURE__ */ (0,
|
|
10068
|
-
hasBadge2(link.badge) && /* @__PURE__ */ (0,
|
|
10525
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }),
|
|
10526
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "min-w-0 flex-1 truncate", children: link.label }),
|
|
10527
|
+
hasBadge2(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge })
|
|
10069
10528
|
]
|
|
10070
10529
|
}
|
|
10071
10530
|
) }, link.id);
|
|
@@ -10073,8 +10532,8 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10073
10532
|
const renderGroup = (link) => {
|
|
10074
10533
|
const isOpen = expanded.has(link.id);
|
|
10075
10534
|
const panelId = `${baseId}-${link.id}`;
|
|
10076
|
-
return /* @__PURE__ */ (0,
|
|
10077
|
-
/* @__PURE__ */ (0,
|
|
10535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("li", { children: [
|
|
10536
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10078
10537
|
Button,
|
|
10079
10538
|
{
|
|
10080
10539
|
variant: "item",
|
|
@@ -10082,12 +10541,12 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10082
10541
|
"aria-expanded": isOpen,
|
|
10083
10542
|
"aria-controls": panelId,
|
|
10084
10543
|
onClick: () => flip(link.id),
|
|
10085
|
-
leadingIcon: link.icon ? /* @__PURE__ */ (0,
|
|
10544
|
+
leadingIcon: link.icon ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon, { name: link.icon, size: 16, className: "text-body" }) : void 0,
|
|
10086
10545
|
className: "px-sm",
|
|
10087
|
-
children: /* @__PURE__ */ (0,
|
|
10088
|
-
/* @__PURE__ */ (0,
|
|
10089
|
-
hasBadge2(link.badge) && /* @__PURE__ */ (0,
|
|
10090
|
-
/* @__PURE__ */ (0,
|
|
10546
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-xs", children: [
|
|
10547
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "truncate", children: link.label }),
|
|
10548
|
+
hasBadge2(link.badge) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "shrink-0 text-caption text-muted tabular-nums", children: link.badge }),
|
|
10549
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10091
10550
|
Icon,
|
|
10092
10551
|
{
|
|
10093
10552
|
name: "chevron-down",
|
|
@@ -10098,23 +10557,23 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10098
10557
|
] })
|
|
10099
10558
|
}
|
|
10100
10559
|
),
|
|
10101
|
-
/* @__PURE__ */ (0,
|
|
10560
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10102
10561
|
"div",
|
|
10103
10562
|
{
|
|
10104
10563
|
id: panelId,
|
|
10105
10564
|
"data-state": isOpen ? "open" : "closed",
|
|
10106
10565
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
10107
|
-
children: /* @__PURE__ */ (0,
|
|
10566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("ul", { className: "flex min-h-0 flex-col gap-xxs overflow-hidden pt-xxs", children: (link.children ?? []).map((k) => renderLink(k, true)) })
|
|
10108
10567
|
}
|
|
10109
10568
|
)
|
|
10110
10569
|
] }, link.id);
|
|
10111
10570
|
};
|
|
10112
|
-
return /* @__PURE__ */ (0,
|
|
10113
|
-
/* @__PURE__ */ (0,
|
|
10114
|
-
/* @__PURE__ */ (0,
|
|
10115
|
-
/* @__PURE__ */ (0,
|
|
10116
|
-
mobileActions != null && /* @__PURE__ */ (0,
|
|
10117
|
-
/* @__PURE__ */ (0,
|
|
10571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { ref, className: cn64("flex w-full flex-col bg-canvas text-ink", className), ...rest, children: [
|
|
10572
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.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: [
|
|
10573
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
10574
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex min-w-0 items-center gap-xxs", children: [
|
|
10575
|
+
mobileActions != null && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "flex items-center gap-xxs", children: mobileActions }),
|
|
10576
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10118
10577
|
IconButton,
|
|
10119
10578
|
{
|
|
10120
10579
|
icon: "menu",
|
|
@@ -10126,8 +10585,8 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10126
10585
|
)
|
|
10127
10586
|
] })
|
|
10128
10587
|
] }),
|
|
10129
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
10130
|
-
/* @__PURE__ */ (0,
|
|
10588
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "min-w-0 flex-1", children }),
|
|
10589
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
10131
10590
|
Drawer,
|
|
10132
10591
|
{
|
|
10133
10592
|
open,
|
|
@@ -10135,12 +10594,12 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10135
10594
|
side: "left",
|
|
10136
10595
|
"aria-label": "Navigation",
|
|
10137
10596
|
closeLabel: "Close navigation",
|
|
10138
|
-
headerStart: /* @__PURE__ */ (0,
|
|
10597
|
+
headerStart: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Logo, { name: brandName, href: brandHref, size: "md" }),
|
|
10139
10598
|
bodyClassName: "px-sm",
|
|
10140
|
-
footer: showFooterRow ? /* @__PURE__ */ (0,
|
|
10141
|
-
userName ? /* @__PURE__ */ (0,
|
|
10142
|
-
showFooterActions && /* @__PURE__ */ (0,
|
|
10143
|
-
showHelpAction && /* @__PURE__ */ (0,
|
|
10599
|
+
footer: showFooterRow ? /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
10600
|
+
userName ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Avatar, { name: userName, src: userAvatarSrc, size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", {}),
|
|
10601
|
+
showFooterActions && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center gap-xxs", children: [
|
|
10602
|
+
showHelpAction && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10144
10603
|
IconButton,
|
|
10145
10604
|
{
|
|
10146
10605
|
icon: "message-circle",
|
|
@@ -10149,26 +10608,26 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10149
10608
|
onClick: onHelpClick
|
|
10150
10609
|
}
|
|
10151
10610
|
),
|
|
10152
|
-
showSettingsAction && /* @__PURE__ */ (0,
|
|
10611
|
+
showSettingsAction && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(IconButton, { icon: "settings", variant: "ghost", "aria-label": "Settings", onClick: onSettingsClick })
|
|
10153
10612
|
] })
|
|
10154
10613
|
] }) : void 0,
|
|
10155
10614
|
children: [
|
|
10156
|
-
workspaceName && /* @__PURE__ */ (0,
|
|
10615
|
+
workspaceName && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "pb-sm", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10157
10616
|
Button,
|
|
10158
10617
|
{
|
|
10159
10618
|
variant: "ghost",
|
|
10160
10619
|
onClick: onWorkspaceClick,
|
|
10161
10620
|
className: "px-sm",
|
|
10162
|
-
leadingIcon: /* @__PURE__ */ (0,
|
|
10163
|
-
trailingIcon: /* @__PURE__ */ (0,
|
|
10164
|
-
children: /* @__PURE__ */ (0,
|
|
10621
|
+
leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Avatar, { name: workspaceName, src: workspaceAvatarSrc, size: "sm" }),
|
|
10622
|
+
trailingIcon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon, { name: "chevron-down", size: 14, className: "text-muted" }),
|
|
10623
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-ink", children: workspaceName })
|
|
10165
10624
|
}
|
|
10166
10625
|
) }),
|
|
10167
|
-
/* @__PURE__ */ (0,
|
|
10626
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("nav", { "aria-label": "Main", children: sections.map((section, i) => {
|
|
10168
10627
|
const sectionOpen = !section.label || expanded.has(section.id);
|
|
10169
10628
|
const listId = `${baseId}-section-${section.id}`;
|
|
10170
|
-
return /* @__PURE__ */ (0,
|
|
10171
|
-
section.label && /* @__PURE__ */ (0,
|
|
10629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: i > 0 ? "mt-base" : void 0, children: [
|
|
10630
|
+
section.label && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10172
10631
|
Button,
|
|
10173
10632
|
{
|
|
10174
10633
|
variant: "item",
|
|
@@ -10177,9 +10636,9 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10177
10636
|
"aria-controls": listId,
|
|
10178
10637
|
onClick: () => flip(section.id),
|
|
10179
10638
|
className: "px-sm",
|
|
10180
|
-
children: /* @__PURE__ */ (0,
|
|
10639
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("span", { className: "inline-flex items-center gap-xs text-muted", children: [
|
|
10181
10640
|
section.label,
|
|
10182
|
-
/* @__PURE__ */ (0,
|
|
10641
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10183
10642
|
Icon,
|
|
10184
10643
|
{
|
|
10185
10644
|
name: "chevron-down",
|
|
@@ -10190,25 +10649,25 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10190
10649
|
] })
|
|
10191
10650
|
}
|
|
10192
10651
|
),
|
|
10193
|
-
/* @__PURE__ */ (0,
|
|
10652
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
10194
10653
|
"div",
|
|
10195
10654
|
{
|
|
10196
10655
|
id: listId,
|
|
10197
10656
|
"data-state": sectionOpen ? "open" : "closed",
|
|
10198
10657
|
className: "grid transition-[grid-template-rows] duration-200 ease-out data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]",
|
|
10199
|
-
children: /* @__PURE__ */ (0,
|
|
10658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.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)) })
|
|
10200
10659
|
}
|
|
10201
10660
|
)
|
|
10202
10661
|
] }, section.id);
|
|
10203
10662
|
}) }),
|
|
10204
|
-
announcement && /* @__PURE__ */ (0,
|
|
10663
|
+
announcement && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
10205
10664
|
"a",
|
|
10206
10665
|
{
|
|
10207
10666
|
href: announcement.href ?? "#",
|
|
10208
10667
|
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",
|
|
10209
10668
|
children: [
|
|
10210
|
-
/* @__PURE__ */ (0,
|
|
10211
|
-
/* @__PURE__ */ (0,
|
|
10669
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-caption text-muted", children: announcement.eyebrow }),
|
|
10670
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-body-sm text-ink", children: announcement.title })
|
|
10212
10671
|
]
|
|
10213
10672
|
}
|
|
10214
10673
|
)
|
|
@@ -10221,8 +10680,8 @@ var SidebarMobile = React84.forwardRef(
|
|
|
10221
10680
|
SidebarMobile.displayName = "SidebarMobile";
|
|
10222
10681
|
|
|
10223
10682
|
// virtual-pkg:src/atoms/Sidebar/Sidebar.tsx
|
|
10224
|
-
var
|
|
10225
|
-
var Sidebar =
|
|
10683
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
10684
|
+
var Sidebar = React86.forwardRef(
|
|
10226
10685
|
({
|
|
10227
10686
|
collapsed,
|
|
10228
10687
|
defaultCollapsed,
|
|
@@ -10235,13 +10694,13 @@ var Sidebar = React85.forwardRef(
|
|
|
10235
10694
|
children,
|
|
10236
10695
|
className,
|
|
10237
10696
|
...shared
|
|
10238
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
10697
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
10239
10698
|
"div",
|
|
10240
10699
|
{
|
|
10241
10700
|
ref,
|
|
10242
10701
|
className: ["flex h-full w-full min-h-0 flex-col bg-canvas md:flex-row", className].filter(Boolean).join(" "),
|
|
10243
10702
|
children: [
|
|
10244
|
-
/* @__PURE__ */ (0,
|
|
10703
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "hidden h-full shrink-0 md:block", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10245
10704
|
SidebarDesktop,
|
|
10246
10705
|
{
|
|
10247
10706
|
...shared,
|
|
@@ -10252,7 +10711,7 @@ var Sidebar = React85.forwardRef(
|
|
|
10252
10711
|
onCollapsedChange
|
|
10253
10712
|
}
|
|
10254
10713
|
) }),
|
|
10255
|
-
/* @__PURE__ */ (0,
|
|
10714
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "shrink-0 md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
10256
10715
|
SidebarMobile,
|
|
10257
10716
|
{
|
|
10258
10717
|
...shared,
|
|
@@ -10262,7 +10721,7 @@ var Sidebar = React85.forwardRef(
|
|
|
10262
10721
|
onOpenChange: onMobileOpenChange
|
|
10263
10722
|
}
|
|
10264
10723
|
) }),
|
|
10265
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
10724
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "min-h-0 min-w-0 flex-1 overflow-auto", children })
|
|
10266
10725
|
]
|
|
10267
10726
|
}
|
|
10268
10727
|
)
|
|
@@ -10271,7 +10730,7 @@ Sidebar.displayName = "Sidebar";
|
|
|
10271
10730
|
|
|
10272
10731
|
// virtual-pkg:src/atoms/Slider/Slider.tsx
|
|
10273
10732
|
var import_react6 = __toESM(require("react"));
|
|
10274
|
-
var
|
|
10733
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
10275
10734
|
function cn65(...parts) {
|
|
10276
10735
|
return parts.filter(Boolean).join(" ");
|
|
10277
10736
|
}
|
|
@@ -10311,19 +10770,19 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10311
10770
|
const lowPct = pctOf(low);
|
|
10312
10771
|
const highPct = pctOf(high);
|
|
10313
10772
|
const thumbState = disabled ? "border-hairline bg-surface-soft shadow-none" : "border-hairline-strong";
|
|
10314
|
-
return /* @__PURE__ */ (0,
|
|
10773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
10315
10774
|
"div",
|
|
10316
10775
|
{
|
|
10317
10776
|
ref,
|
|
10318
10777
|
className: cn65("flex w-full flex-col items-center gap-md", disabled && "opacity-50", className),
|
|
10319
10778
|
...rest,
|
|
10320
10779
|
children: [
|
|
10321
|
-
/* @__PURE__ */ (0,
|
|
10322
|
-
histogram && histogram.length > 0 ? /* @__PURE__ */ (0,
|
|
10780
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex w-full flex-col gap-xxs", children: [
|
|
10781
|
+
histogram && histogram.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { "aria-hidden": "true", className: "flex h-10 w-full items-end gap-xxs", style: { paddingInline: THUMB2 / 2 }, children: histogram.map((h, i) => {
|
|
10323
10782
|
const peak = Math.max(...histogram, 1);
|
|
10324
10783
|
const center = (i + 0.5) / histogram.length * 100;
|
|
10325
10784
|
const inside = center >= lowPct && center <= highPct;
|
|
10326
|
-
return /* @__PURE__ */ (0,
|
|
10785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10327
10786
|
"span",
|
|
10328
10787
|
{
|
|
10329
10788
|
className: cn65(
|
|
@@ -10335,9 +10794,9 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10335
10794
|
i
|
|
10336
10795
|
);
|
|
10337
10796
|
}) }) : null,
|
|
10338
|
-
/* @__PURE__ */ (0,
|
|
10339
|
-
/* @__PURE__ */ (0,
|
|
10340
|
-
/* @__PURE__ */ (0,
|
|
10797
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "relative h-5 w-full", children: [
|
|
10798
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "absolute left-0 right-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-surface-strong" }),
|
|
10799
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10341
10800
|
"div",
|
|
10342
10801
|
{
|
|
10343
10802
|
"aria-hidden": "true",
|
|
@@ -10351,8 +10810,8 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10351
10810
|
}
|
|
10352
10811
|
}
|
|
10353
10812
|
),
|
|
10354
|
-
isRange ? /* @__PURE__ */ (0,
|
|
10355
|
-
/* @__PURE__ */ (0,
|
|
10813
|
+
isRange ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
|
|
10814
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10356
10815
|
"input",
|
|
10357
10816
|
{
|
|
10358
10817
|
type: "range",
|
|
@@ -10369,7 +10828,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10369
10828
|
style: { zIndex: lowPct > 90 ? 2 : 1 }
|
|
10370
10829
|
}
|
|
10371
10830
|
),
|
|
10372
|
-
/* @__PURE__ */ (0,
|
|
10831
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10373
10832
|
"span",
|
|
10374
10833
|
{
|
|
10375
10834
|
"aria-hidden": "true",
|
|
@@ -10381,7 +10840,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10381
10840
|
style: { left: leftOf(lowPct) }
|
|
10382
10841
|
}
|
|
10383
10842
|
),
|
|
10384
|
-
/* @__PURE__ */ (0,
|
|
10843
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10385
10844
|
"input",
|
|
10386
10845
|
{
|
|
10387
10846
|
type: "range",
|
|
@@ -10397,7 +10856,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10397
10856
|
className: cn65("peer/high", inputClass, rangeInputClass)
|
|
10398
10857
|
}
|
|
10399
10858
|
),
|
|
10400
|
-
/* @__PURE__ */ (0,
|
|
10859
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10401
10860
|
"span",
|
|
10402
10861
|
{
|
|
10403
10862
|
"aria-hidden": "true",
|
|
@@ -10409,8 +10868,8 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10409
10868
|
style: { left: leftOf(highPct) }
|
|
10410
10869
|
}
|
|
10411
10870
|
)
|
|
10412
|
-
] }) : /* @__PURE__ */ (0,
|
|
10413
|
-
/* @__PURE__ */ (0,
|
|
10871
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
|
|
10872
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10414
10873
|
"input",
|
|
10415
10874
|
{
|
|
10416
10875
|
type: "range",
|
|
@@ -10426,7 +10885,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10426
10885
|
className: cn65("peer", inputClass)
|
|
10427
10886
|
}
|
|
10428
10887
|
),
|
|
10429
|
-
/* @__PURE__ */ (0,
|
|
10888
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
10430
10889
|
"span",
|
|
10431
10890
|
{
|
|
10432
10891
|
"aria-hidden": "true",
|
|
@@ -10441,7 +10900,7 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10441
10900
|
] })
|
|
10442
10901
|
] })
|
|
10443
10902
|
] }),
|
|
10444
|
-
label ? /* @__PURE__ */ (0,
|
|
10903
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { id: labelId, className: "text-body-md text-muted", children: label }) : null
|
|
10445
10904
|
]
|
|
10446
10905
|
}
|
|
10447
10906
|
);
|
|
@@ -10450,8 +10909,8 @@ var Slider = import_react6.default.forwardRef(
|
|
|
10450
10909
|
Slider.displayName = "Slider";
|
|
10451
10910
|
|
|
10452
10911
|
// virtual-pkg:src/atoms/StepperItem/StepperItem.tsx
|
|
10453
|
-
var
|
|
10454
|
-
var
|
|
10912
|
+
var React88 = __toESM(require("react"));
|
|
10913
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
10455
10914
|
var cn66 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10456
10915
|
var statusLabel = {
|
|
10457
10916
|
upcoming: "Upcoming",
|
|
@@ -10461,8 +10920,8 @@ var statusLabel = {
|
|
|
10461
10920
|
};
|
|
10462
10921
|
function Indicator({ status }) {
|
|
10463
10922
|
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";
|
|
10464
|
-
return /* @__PURE__ */ (0,
|
|
10465
|
-
/* @__PURE__ */ (0,
|
|
10923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "grid h-5 w-5 shrink-0 place-items-center", "aria-hidden": "true", children: [
|
|
10924
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10466
10925
|
"span",
|
|
10467
10926
|
{
|
|
10468
10927
|
className: cn66(
|
|
@@ -10472,7 +10931,7 @@ function Indicator({ status }) {
|
|
|
10472
10931
|
)
|
|
10473
10932
|
}
|
|
10474
10933
|
),
|
|
10475
|
-
/* @__PURE__ */ (0,
|
|
10934
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10476
10935
|
"span",
|
|
10477
10936
|
{
|
|
10478
10937
|
className: cn66(
|
|
@@ -10480,10 +10939,10 @@ function Indicator({ status }) {
|
|
|
10480
10939
|
"border-2 border-primary bg-canvas",
|
|
10481
10940
|
status === "active" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10482
10941
|
),
|
|
10483
|
-
children: /* @__PURE__ */ (0,
|
|
10942
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "h-2 w-2 rounded-full bg-primary" })
|
|
10484
10943
|
}
|
|
10485
10944
|
),
|
|
10486
|
-
/* @__PURE__ */ (0,
|
|
10945
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10487
10946
|
"span",
|
|
10488
10947
|
{
|
|
10489
10948
|
className: cn66(
|
|
@@ -10491,10 +10950,10 @@ function Indicator({ status }) {
|
|
|
10491
10950
|
"bg-semantic-success-soft text-semantic-success",
|
|
10492
10951
|
status === "complete" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10493
10952
|
),
|
|
10494
|
-
children: /* @__PURE__ */ (0,
|
|
10953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon, { name: "check", size: 11, strokeWidth: 3 })
|
|
10495
10954
|
}
|
|
10496
10955
|
),
|
|
10497
|
-
/* @__PURE__ */ (0,
|
|
10956
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10498
10957
|
"span",
|
|
10499
10958
|
{
|
|
10500
10959
|
className: cn66(
|
|
@@ -10502,13 +10961,13 @@ function Indicator({ status }) {
|
|
|
10502
10961
|
"text-semantic-error",
|
|
10503
10962
|
status === "error" ? "scale-100 opacity-100" : "scale-90 opacity-0"
|
|
10504
10963
|
),
|
|
10505
|
-
children: /* @__PURE__ */ (0,
|
|
10964
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon, { name: "circle-alert", size: 16 })
|
|
10506
10965
|
}
|
|
10507
10966
|
)
|
|
10508
10967
|
] });
|
|
10509
10968
|
}
|
|
10510
|
-
var StepperItem =
|
|
10511
|
-
({ status = "upcoming", title, meta, connector = false, className, children, ...rest }, ref) => /* @__PURE__ */ (0,
|
|
10969
|
+
var StepperItem = React88.forwardRef(
|
|
10970
|
+
({ status = "upcoming", title, meta, connector = false, className, children, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
10512
10971
|
"li",
|
|
10513
10972
|
{
|
|
10514
10973
|
ref,
|
|
@@ -10516,9 +10975,9 @@ var StepperItem = React87.forwardRef(
|
|
|
10516
10975
|
className: cn66("relative flex w-full gap-md", connector && "pb-base", className),
|
|
10517
10976
|
...rest,
|
|
10518
10977
|
children: [
|
|
10519
|
-
/* @__PURE__ */ (0,
|
|
10520
|
-
/* @__PURE__ */ (0,
|
|
10521
|
-
connector && /* @__PURE__ */ (0,
|
|
10978
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
10979
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Indicator, { status }),
|
|
10980
|
+
connector && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
10522
10981
|
"span",
|
|
10523
10982
|
{
|
|
10524
10983
|
"aria-hidden": "true",
|
|
@@ -10529,17 +10988,17 @@ var StepperItem = React87.forwardRef(
|
|
|
10529
10988
|
}
|
|
10530
10989
|
)
|
|
10531
10990
|
] }),
|
|
10532
|
-
/* @__PURE__ */ (0,
|
|
10533
|
-
/* @__PURE__ */ (0,
|
|
10991
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-xxs pt-px", children: [
|
|
10992
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "text-body-md text-ink", children: [
|
|
10534
10993
|
title,
|
|
10535
|
-
/* @__PURE__ */ (0,
|
|
10994
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: "sr-only", children: [
|
|
10536
10995
|
" (",
|
|
10537
10996
|
statusLabel[status],
|
|
10538
10997
|
")"
|
|
10539
10998
|
] })
|
|
10540
10999
|
] }),
|
|
10541
|
-
meta && /* @__PURE__ */ (0,
|
|
10542
|
-
children != null && children !== false && /* @__PURE__ */ (0,
|
|
11000
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "text-body-sm text-muted", children: meta }),
|
|
11001
|
+
children != null && children !== false && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "w-full pt-sm", children })
|
|
10543
11002
|
] })
|
|
10544
11003
|
]
|
|
10545
11004
|
}
|
|
@@ -10548,10 +11007,10 @@ var StepperItem = React87.forwardRef(
|
|
|
10548
11007
|
StepperItem.displayName = "StepperItem";
|
|
10549
11008
|
|
|
10550
11009
|
// virtual-pkg:src/atoms/Tab/Tab.tsx
|
|
10551
|
-
var
|
|
10552
|
-
var
|
|
11010
|
+
var React89 = __toESM(require("react"));
|
|
11011
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
10553
11012
|
var cn67 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10554
|
-
var Tab =
|
|
11013
|
+
var Tab = React89.forwardRef(
|
|
10555
11014
|
({
|
|
10556
11015
|
selected = false,
|
|
10557
11016
|
controls,
|
|
@@ -10562,7 +11021,7 @@ var Tab = React88.forwardRef(
|
|
|
10562
11021
|
children,
|
|
10563
11022
|
tabIndex,
|
|
10564
11023
|
...rest
|
|
10565
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
11024
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
10566
11025
|
Button,
|
|
10567
11026
|
{
|
|
10568
11027
|
ref,
|
|
@@ -10587,10 +11046,10 @@ var Tab = React88.forwardRef(
|
|
|
10587
11046
|
Tab.displayName = "Tab";
|
|
10588
11047
|
|
|
10589
11048
|
// virtual-pkg:src/atoms/Tabs/Tabs.tsx
|
|
10590
|
-
var
|
|
10591
|
-
var
|
|
11049
|
+
var React90 = __toESM(require("react"));
|
|
11050
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
10592
11051
|
var cn68 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10593
|
-
var Tabs =
|
|
11052
|
+
var Tabs = React90.forwardRef(
|
|
10594
11053
|
({
|
|
10595
11054
|
items,
|
|
10596
11055
|
value,
|
|
@@ -10601,19 +11060,19 @@ var Tabs = React89.forwardRef(
|
|
|
10601
11060
|
className,
|
|
10602
11061
|
...rest
|
|
10603
11062
|
}, ref) => {
|
|
10604
|
-
const baseId =
|
|
10605
|
-
const [inner, setInner] =
|
|
11063
|
+
const baseId = React90.useId();
|
|
11064
|
+
const [inner, setInner] = React90.useState(defaultValue ?? items[0]?.value);
|
|
10606
11065
|
const selected = value ?? inner;
|
|
10607
|
-
const tabRefs =
|
|
10608
|
-
const [indicator, setIndicator] =
|
|
10609
|
-
const measure =
|
|
11066
|
+
const tabRefs = React90.useRef({});
|
|
11067
|
+
const [indicator, setIndicator] = React90.useState(null);
|
|
11068
|
+
const measure = React90.useCallback(() => {
|
|
10610
11069
|
const el = selected ? tabRefs.current[selected] : null;
|
|
10611
11070
|
if (el) setIndicator({ left: el.offsetLeft, width: el.offsetWidth });
|
|
10612
11071
|
}, [selected]);
|
|
10613
|
-
|
|
11072
|
+
React90.useLayoutEffect(() => {
|
|
10614
11073
|
measure();
|
|
10615
11074
|
}, [measure, items]);
|
|
10616
|
-
|
|
11075
|
+
React90.useEffect(() => {
|
|
10617
11076
|
window.addEventListener("resize", measure);
|
|
10618
11077
|
const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(() => measure()) : null;
|
|
10619
11078
|
Object.values(tabRefs.current).forEach((el) => el && ro?.observe(el));
|
|
@@ -10643,7 +11102,7 @@ var Tabs = React89.forwardRef(
|
|
|
10643
11102
|
};
|
|
10644
11103
|
const tabId = (v) => `${baseId}-tab-${v}`;
|
|
10645
11104
|
const panelId = (v) => `${baseId}-panel-${v}`;
|
|
10646
|
-
return /* @__PURE__ */ (0,
|
|
11105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
10647
11106
|
"div",
|
|
10648
11107
|
{
|
|
10649
11108
|
ref,
|
|
@@ -10653,7 +11112,7 @@ var Tabs = React89.forwardRef(
|
|
|
10653
11112
|
),
|
|
10654
11113
|
...rest,
|
|
10655
11114
|
children: [
|
|
10656
|
-
/* @__PURE__ */ (0,
|
|
11115
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
10657
11116
|
"div",
|
|
10658
11117
|
{
|
|
10659
11118
|
role: "tablist",
|
|
@@ -10661,7 +11120,7 @@ var Tabs = React89.forwardRef(
|
|
|
10661
11120
|
onKeyDown,
|
|
10662
11121
|
className: "relative flex min-w-0 items-center gap-xs overflow-x-auto p-sm",
|
|
10663
11122
|
children: [
|
|
10664
|
-
/* @__PURE__ */ (0,
|
|
11123
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10665
11124
|
"span",
|
|
10666
11125
|
{
|
|
10667
11126
|
"aria-hidden": "true",
|
|
@@ -10675,7 +11134,7 @@ var Tabs = React89.forwardRef(
|
|
|
10675
11134
|
),
|
|
10676
11135
|
items.map((item) => {
|
|
10677
11136
|
const isSelected = item.value === selected;
|
|
10678
|
-
return /* @__PURE__ */ (0,
|
|
11137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10679
11138
|
Tab,
|
|
10680
11139
|
{
|
|
10681
11140
|
ref: (el) => {
|
|
@@ -10691,9 +11150,9 @@ var Tabs = React89.forwardRef(
|
|
|
10691
11150
|
disabled: item.disabled,
|
|
10692
11151
|
leadingIcon: item.icon,
|
|
10693
11152
|
onClick: () => select(item.value),
|
|
10694
|
-
children: /* @__PURE__ */ (0,
|
|
11153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "inline-flex items-center gap-sm", children: [
|
|
10695
11154
|
item.label,
|
|
10696
|
-
item.badge != null ? /* @__PURE__ */ (0,
|
|
11155
|
+
item.badge != null ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Badge, { size: "sm", tone: isSelected ? "primary" : "neutral", children: item.badge }) : null
|
|
10697
11156
|
] })
|
|
10698
11157
|
},
|
|
10699
11158
|
item.value
|
|
@@ -10704,7 +11163,7 @@ var Tabs = React89.forwardRef(
|
|
|
10704
11163
|
),
|
|
10705
11164
|
items.map((item) => {
|
|
10706
11165
|
const isSelected = item.value === selected;
|
|
10707
|
-
return /* @__PURE__ */ (0,
|
|
11166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10708
11167
|
"div",
|
|
10709
11168
|
{
|
|
10710
11169
|
id: panelId(item.value),
|
|
@@ -10726,26 +11185,26 @@ var Tabs = React89.forwardRef(
|
|
|
10726
11185
|
Tabs.displayName = "Tabs";
|
|
10727
11186
|
|
|
10728
11187
|
// virtual-pkg:src/atoms/TestimonialBlock/TestimonialBlock.tsx
|
|
10729
|
-
var
|
|
10730
|
-
var
|
|
11188
|
+
var React91 = __toESM(require("react"));
|
|
11189
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
10731
11190
|
var cn69 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10732
11191
|
function QuoteCard({ t }) {
|
|
10733
|
-
return /* @__PURE__ */ (0,
|
|
10734
|
-
/* @__PURE__ */ (0,
|
|
11192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.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: [
|
|
11193
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("blockquote", { className: "m-0", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("p", { className: "text-body-lg text-ink", children: [
|
|
10735
11194
|
"\u201C",
|
|
10736
11195
|
t.quote,
|
|
10737
11196
|
"\u201D"
|
|
10738
11197
|
] }) }),
|
|
10739
|
-
/* @__PURE__ */ (0,
|
|
10740
|
-
/* @__PURE__ */ (0,
|
|
10741
|
-
/* @__PURE__ */ (0,
|
|
10742
|
-
/* @__PURE__ */ (0,
|
|
10743
|
-
t.role ? /* @__PURE__ */ (0,
|
|
11198
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("figcaption", { className: "flex items-center gap-md", children: [
|
|
11199
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Avatar, { size: "lg", name: t.name, src: t.avatarSrc, alt: t.name }),
|
|
11200
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
11201
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "truncate text-body-sm font-weight-label text-ink", children: t.name }),
|
|
11202
|
+
t.role ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "truncate text-caption text-muted", children: t.role }) : null
|
|
10744
11203
|
] })
|
|
10745
11204
|
] })
|
|
10746
11205
|
] });
|
|
10747
11206
|
}
|
|
10748
|
-
var TestimonialBlock =
|
|
11207
|
+
var TestimonialBlock = React91.forwardRef(
|
|
10749
11208
|
({
|
|
10750
11209
|
testimonials = [],
|
|
10751
11210
|
logos,
|
|
@@ -10755,7 +11214,7 @@ var TestimonialBlock = React90.forwardRef(
|
|
|
10755
11214
|
...rest
|
|
10756
11215
|
}, ref) => {
|
|
10757
11216
|
const many = testimonials.length > 1;
|
|
10758
|
-
return /* @__PURE__ */ (0,
|
|
11217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
10759
11218
|
"section",
|
|
10760
11219
|
{
|
|
10761
11220
|
ref,
|
|
@@ -10763,18 +11222,18 @@ var TestimonialBlock = React90.forwardRef(
|
|
|
10763
11222
|
className: cn69("flex w-full flex-col gap-xl", className),
|
|
10764
11223
|
...rest,
|
|
10765
11224
|
children: [
|
|
10766
|
-
logos && logos.length ? /* @__PURE__ */ (0,
|
|
10767
|
-
/* @__PURE__ */ (0,
|
|
10768
|
-
/* @__PURE__ */ (0,
|
|
11225
|
+
logos && logos.length ? /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex flex-col items-center gap-lg py-base", children: [
|
|
11226
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("p", { className: "text-body-md text-muted", children: logosTitle }),
|
|
11227
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("ul", { className: "flex flex-wrap items-center justify-center gap-x-xl gap-y-base", children: logos.map((l) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("li", { className: "text-ink", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10769
11228
|
Logo,
|
|
10770
11229
|
{
|
|
10771
11230
|
size: "md",
|
|
10772
11231
|
name: l.name,
|
|
10773
|
-
mark: l.icon ? /* @__PURE__ */ (0,
|
|
11232
|
+
mark: l.icon ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Icon, { name: l.icon, size: 20 }) : void 0
|
|
10774
11233
|
}
|
|
10775
11234
|
) }, l.name)) })
|
|
10776
11235
|
] }) : null,
|
|
10777
|
-
testimonials.length ? /* @__PURE__ */ (0,
|
|
11236
|
+
testimonials.length ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10778
11237
|
"div",
|
|
10779
11238
|
{
|
|
10780
11239
|
className: cn69(
|
|
@@ -10782,7 +11241,7 @@ var TestimonialBlock = React90.forwardRef(
|
|
|
10782
11241
|
many ? "grid-cols-1 md:grid-cols-2" : "grid-cols-1",
|
|
10783
11242
|
testimonials.length > 2 && "lg:grid-cols-3"
|
|
10784
11243
|
),
|
|
10785
|
-
children: testimonials.map((t) => /* @__PURE__ */ (0,
|
|
11244
|
+
children: testimonials.map((t) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(QuoteCard, { t }, t.id))
|
|
10786
11245
|
}
|
|
10787
11246
|
) : null
|
|
10788
11247
|
]
|
|
@@ -10793,9 +11252,9 @@ var TestimonialBlock = React90.forwardRef(
|
|
|
10793
11252
|
TestimonialBlock.displayName = "TestimonialBlock";
|
|
10794
11253
|
|
|
10795
11254
|
// virtual-pkg:src/atoms/Toast/Toast.tsx
|
|
10796
|
-
var
|
|
10797
|
-
var
|
|
10798
|
-
var
|
|
11255
|
+
var React92 = __toESM(require("react"));
|
|
11256
|
+
var import_react_dom11 = require("react-dom");
|
|
11257
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
10799
11258
|
var cn70 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10800
11259
|
var toneIcon2 = {
|
|
10801
11260
|
success: { name: "circle-check", color: "text-inverse-ink" },
|
|
@@ -10806,7 +11265,7 @@ var placementClass = {
|
|
|
10806
11265
|
"bottom-center": "fixed bottom-lg left-1/2 -translate-x-1/2 w-[calc(100%-2rem)] sm:w-auto sm:min-w-[22rem]",
|
|
10807
11266
|
"bottom-right": "fixed bottom-lg right-lg left-lg sm:left-auto sm:min-w-[22rem]"
|
|
10808
11267
|
};
|
|
10809
|
-
var Toast =
|
|
11268
|
+
var Toast = React92.forwardRef(
|
|
10810
11269
|
({
|
|
10811
11270
|
open = true,
|
|
10812
11271
|
onOpenChange,
|
|
@@ -10820,16 +11279,16 @@ var Toast = React91.forwardRef(
|
|
|
10820
11279
|
className,
|
|
10821
11280
|
...rest
|
|
10822
11281
|
}, ref) => {
|
|
10823
|
-
const [mounted, setMounted] =
|
|
10824
|
-
|
|
10825
|
-
|
|
11282
|
+
const [mounted, setMounted] = React92.useState(false);
|
|
11283
|
+
React92.useEffect(() => setMounted(true), []);
|
|
11284
|
+
React92.useEffect(() => {
|
|
10826
11285
|
if (!open || !duration || !onOpenChange) return;
|
|
10827
11286
|
const t = window.setTimeout(() => onOpenChange(false), duration);
|
|
10828
11287
|
return () => window.clearTimeout(t);
|
|
10829
11288
|
}, [open, duration, onOpenChange]);
|
|
10830
11289
|
const glyph2 = toneIcon2[tone];
|
|
10831
11290
|
const floating = placement !== "inline";
|
|
10832
|
-
const card = /* @__PURE__ */ (0,
|
|
11291
|
+
const card = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10833
11292
|
"div",
|
|
10834
11293
|
{
|
|
10835
11294
|
className: cn70(
|
|
@@ -10837,7 +11296,7 @@ var Toast = React91.forwardRef(
|
|
|
10837
11296
|
"pointer-events-none"
|
|
10838
11297
|
),
|
|
10839
11298
|
style: { zIndex: open ? "var(--z-toast, 1400)" : void 0 },
|
|
10840
|
-
children: /* @__PURE__ */ (0,
|
|
11299
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
10841
11300
|
"div",
|
|
10842
11301
|
{
|
|
10843
11302
|
ref,
|
|
@@ -10855,9 +11314,9 @@ var Toast = React91.forwardRef(
|
|
|
10855
11314
|
),
|
|
10856
11315
|
...rest,
|
|
10857
11316
|
children: [
|
|
10858
|
-
/* @__PURE__ */ (0,
|
|
10859
|
-
/* @__PURE__ */ (0,
|
|
10860
|
-
actionLabel ? /* @__PURE__ */ (0,
|
|
11317
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Icon, { name: icon ?? glyph2.name, size: 18, className: cn70("shrink-0", glyph2.color) }),
|
|
11318
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "min-w-0 flex-1 py-xxs text-body-md text-inverse-ink [&_strong]:font-weight-label", children: title }),
|
|
11319
|
+
actionLabel ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10861
11320
|
Button,
|
|
10862
11321
|
{
|
|
10863
11322
|
variant: "ghost",
|
|
@@ -10870,7 +11329,7 @@ var Toast = React91.forwardRef(
|
|
|
10870
11329
|
className: "shrink-0 text-inverse-ink enabled:hover:bg-inverse-ink/10 enabled:hover:text-inverse-ink",
|
|
10871
11330
|
children: actionLabel
|
|
10872
11331
|
}
|
|
10873
|
-
) : /* @__PURE__ */ (0,
|
|
11332
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "w-xs shrink-0", "aria-hidden": "true" })
|
|
10874
11333
|
]
|
|
10875
11334
|
}
|
|
10876
11335
|
)
|
|
@@ -10878,14 +11337,14 @@ var Toast = React91.forwardRef(
|
|
|
10878
11337
|
);
|
|
10879
11338
|
if (!floating) return card;
|
|
10880
11339
|
if (!mounted || typeof document === "undefined") return null;
|
|
10881
|
-
return (0,
|
|
11340
|
+
return (0, import_react_dom11.createPortal)(card, document.body);
|
|
10882
11341
|
}
|
|
10883
11342
|
);
|
|
10884
11343
|
Toast.displayName = "Toast";
|
|
10885
11344
|
|
|
10886
11345
|
// virtual-pkg:src/atoms/Typography/Typography.tsx
|
|
10887
11346
|
var import_react7 = __toESM(require("react"));
|
|
10888
|
-
var
|
|
11347
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
10889
11348
|
function cn71(...parts) {
|
|
10890
11349
|
return parts.filter(Boolean).join(" ");
|
|
10891
11350
|
}
|
|
@@ -10935,7 +11394,7 @@ var toneClass2 = {
|
|
|
10935
11394
|
var Typography = import_react7.default.forwardRef(
|
|
10936
11395
|
({ variant = "body", as, tone, truncate = false, className, children, ...rest }, ref) => {
|
|
10937
11396
|
const Component = as ?? defaultElement[variant];
|
|
10938
|
-
return /* @__PURE__ */ (0,
|
|
11397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10939
11398
|
Component,
|
|
10940
11399
|
{
|
|
10941
11400
|
ref,
|
|
@@ -10955,10 +11414,10 @@ var Typography = import_react7.default.forwardRef(
|
|
|
10955
11414
|
Typography.displayName = "Typography";
|
|
10956
11415
|
|
|
10957
11416
|
// virtual-pkg:src/atoms/Wizard/Wizard.tsx
|
|
10958
|
-
var
|
|
10959
|
-
var
|
|
11417
|
+
var React94 = __toESM(require("react"));
|
|
11418
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
10960
11419
|
var cn72 = (...parts) => parts.filter(Boolean).join(" ");
|
|
10961
|
-
var Wizard =
|
|
11420
|
+
var Wizard = React94.forwardRef(
|
|
10962
11421
|
({
|
|
10963
11422
|
title,
|
|
10964
11423
|
description,
|
|
@@ -10977,8 +11436,8 @@ var Wizard = React93.forwardRef(
|
|
|
10977
11436
|
className,
|
|
10978
11437
|
...rest
|
|
10979
11438
|
}, ref) => {
|
|
10980
|
-
const titleId =
|
|
10981
|
-
const [inner, setInner] =
|
|
11439
|
+
const titleId = React94.useId();
|
|
11440
|
+
const [inner, setInner] = React94.useState(defaultStep);
|
|
10982
11441
|
const step = stepProp ?? inner;
|
|
10983
11442
|
const go = (next) => {
|
|
10984
11443
|
const clamped = Math.max(0, Math.min(steps.length, next));
|
|
@@ -10989,7 +11448,7 @@ var Wizard = React93.forwardRef(
|
|
|
10989
11448
|
const current = steps[step];
|
|
10990
11449
|
const blocked = !reviewing && current?.canContinue === false;
|
|
10991
11450
|
const statusOf = (i) => i < step ? "complete" : i === step ? "active" : "upcoming";
|
|
10992
|
-
return /* @__PURE__ */ (0,
|
|
11451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { ref, className: cn72("w-full", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
10993
11452
|
"section",
|
|
10994
11453
|
{
|
|
10995
11454
|
"aria-labelledby": titleId,
|
|
@@ -10998,40 +11457,40 @@ var Wizard = React93.forwardRef(
|
|
|
10998
11457
|
chrome === "card" && "rounded-xl border border-hairline bg-canvas p-lg shadow-card"
|
|
10999
11458
|
),
|
|
11000
11459
|
children: [
|
|
11001
|
-
/* @__PURE__ */ (0,
|
|
11002
|
-
/* @__PURE__ */ (0,
|
|
11003
|
-
(description || docsHref) && /* @__PURE__ */ (0,
|
|
11460
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("header", { className: "flex flex-col gap-xs", children: [
|
|
11461
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h2", { id: titleId, className: "text-heading-md font-weight-heading-sm text-ink", children: title }),
|
|
11462
|
+
(description || docsHref) && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "text-body-sm text-muted", children: [
|
|
11004
11463
|
description,
|
|
11005
11464
|
" ",
|
|
11006
|
-
docsHref && /* @__PURE__ */ (0,
|
|
11465
|
+
docsHref && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Link, { href: docsHref, variant: "standalone", arrow: true, external: true, children: docsLabel })
|
|
11007
11466
|
] })
|
|
11008
11467
|
] }),
|
|
11009
|
-
/* @__PURE__ */ (0,
|
|
11468
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("ol", { className: "flex flex-col", "aria-label": "Steps", children: steps.map((s, i) => {
|
|
11010
11469
|
const status = statusOf(i);
|
|
11011
11470
|
const active = status === "active";
|
|
11012
|
-
return /* @__PURE__ */ (0,
|
|
11471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11013
11472
|
StepperItem,
|
|
11014
11473
|
{
|
|
11015
11474
|
status,
|
|
11016
11475
|
title: s.title,
|
|
11017
11476
|
meta: active ? s.description : status === "complete" ? s.summary : void 0,
|
|
11018
11477
|
connector: i < steps.length - 1,
|
|
11019
|
-
children: s.content ? /* @__PURE__ */ (0,
|
|
11478
|
+
children: s.content ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
11020
11479
|
"div",
|
|
11021
11480
|
{
|
|
11022
11481
|
"data-state": active ? "open" : "closed",
|
|
11023
11482
|
"aria-hidden": active ? void 0 : true,
|
|
11024
11483
|
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",
|
|
11025
|
-
children: /* @__PURE__ */ (0,
|
|
11484
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: active ? "pb-xs" : "invisible", children: s.content }) })
|
|
11026
11485
|
}
|
|
11027
11486
|
) : null
|
|
11028
11487
|
},
|
|
11029
11488
|
s.id
|
|
11030
11489
|
);
|
|
11031
11490
|
}) }),
|
|
11032
|
-
/* @__PURE__ */ (0,
|
|
11033
|
-
step > 0 && /* @__PURE__ */ (0,
|
|
11034
|
-
reviewing ? /* @__PURE__ */ (0,
|
|
11491
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("footer", { className: "flex items-center justify-end gap-sm", children: [
|
|
11492
|
+
step > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { variant: "secondary", onClick: () => go(step - 1), disabled: submitting, children: backLabel }),
|
|
11493
|
+
reviewing ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { variant: "primary", loading: submitting, onClick: onComplete, children: completeLabel }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { variant: "primary", disabled: blocked, onClick: () => go(step + 1), children: continueLabel })
|
|
11035
11494
|
] })
|
|
11036
11495
|
]
|
|
11037
11496
|
}
|