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