@designa8/vibedesign-v6 2.2.4 → 2.2.6
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 +32 -15
- package/dist/index.js +32 -15
- package/dist/styles.css +1 -15
- package/package.json +1 -1
- package/src/atoms/AppSidebar/index.ts +1 -1
- package/src/atoms/AppSidebarMobile/AppSidebarMobile.tsx +0 -1
- package/src/atoms/ExportDesignMdModal/ExportDesignMdModal.tsx +2 -2
- package/src/atoms/HomePageTemplate/HomePageTemplate.tsx +1 -1
- package/src/atoms/MarketingNavbar/MarketingNavbar.tsx +44 -23
- package/src/atoms/MarketingNavbar/preview.tsx +30 -6
- package/src/atoms/Menu/Menu.tsx +2 -2
- package/src/atoms/MobileActionsDrawer/MobileActionsDrawer.tsx +1 -1
- package/src/atoms/PreviewDock/PreviewDock.tsx +2 -2
- package/src/atoms/TemplateHero/TemplateHero.tsx +2 -2
- package/src/atoms/ToastStack/ToastStack.tsx +2 -2
- package/src/atoms/UpgradeCard/UpgradeCard.tsx +2 -2
- package/dist/fonts/plusjakartasans/PlusJakartaSans-Italic[wght].ttf +0 -0
- package/dist/fonts/plusjakartasans/PlusJakartaSans[wght].ttf +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @plasma/vibedesign-v6
|
|
2
2
|
|
|
3
|
-
Complete design system generated by Atoms Design, version **2.2.
|
|
3
|
+
Complete design system generated by Atoms Design, version **2.2.6**.
|
|
4
4
|
Tokens, atoms, molecules, organisms, and templates — import from the package root;
|
|
5
5
|
never hardcode visual values in consumer code.
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -5336,8 +5336,7 @@ var AppSidebarMobile = import_react18.default.forwardRef(
|
|
|
5336
5336
|
workspaceName && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
5337
5337
|
WorkspaceMenu,
|
|
5338
5338
|
{
|
|
5339
|
-
workspaceName
|
|
5340
|
-
initials: workspaceName.charAt(0).toUpperCase()
|
|
5339
|
+
workspaceName
|
|
5341
5340
|
}
|
|
5342
5341
|
),
|
|
5343
5342
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { className: "space-y-xxs", role: "list", children: entries.map((entry) => {
|
|
@@ -10712,11 +10711,12 @@ var DEFAULT_LINKS = [
|
|
|
10712
10711
|
var DEFAULT_SECONDARY = { label: "Log in" };
|
|
10713
10712
|
var DEFAULT_PRIMARY = { label: "Start free" };
|
|
10714
10713
|
var linkFocus = "cursor-pointer transition duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
10715
|
-
var itemClass = `flex w-full items-center gap-sm rounded-sm px-sm py-sm text-left text-body-sm text-ink transition duration-150 ease-out hover:bg-surface-soft active:
|
|
10714
|
+
var itemClass = `flex w-full items-center justify-start gap-sm rounded-sm px-sm py-sm text-left text-body-sm text-ink transition duration-150 ease-out hover:bg-surface-soft active:bg-surface-strong ${linkFocus}`;
|
|
10716
10715
|
var MarketingNavbar = import_react35.default.forwardRef(
|
|
10717
10716
|
({
|
|
10718
10717
|
brandName = "Atoms Design",
|
|
10719
10718
|
logoSrc,
|
|
10719
|
+
showLogo = true,
|
|
10720
10720
|
brandHref = "/",
|
|
10721
10721
|
links = DEFAULT_LINKS,
|
|
10722
10722
|
secondaryAction: secondaryAction2 = DEFAULT_SECONDARY,
|
|
@@ -10793,13 +10793,13 @@ var MarketingNavbar = import_react35.default.forwardRef(
|
|
|
10793
10793
|
window.location.assign(a.href);
|
|
10794
10794
|
}
|
|
10795
10795
|
};
|
|
10796
|
-
const renderAction = (a,
|
|
10796
|
+
const renderAction = (a, actionVariant, full = false) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10797
10797
|
Button,
|
|
10798
10798
|
{
|
|
10799
|
-
variant:
|
|
10799
|
+
variant: actionVariant,
|
|
10800
10800
|
size: "md",
|
|
10801
10801
|
onClick: () => runAction(a),
|
|
10802
|
-
className: `shrink-0 whitespace-nowrap !rounded-full ${full ? "w-full" : ""} ${floating &&
|
|
10802
|
+
className: `shrink-0 whitespace-nowrap !rounded-full ${full ? "w-full" : ""} ${floating && actionVariant === "ghost" ? "!text-ink" : ""}`,
|
|
10803
10803
|
children: a.label
|
|
10804
10804
|
}
|
|
10805
10805
|
);
|
|
@@ -10827,26 +10827,32 @@ var MarketingNavbar = import_react35.default.forwardRef(
|
|
|
10827
10827
|
};
|
|
10828
10828
|
const accountRows = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col gap-xxs", children: [
|
|
10829
10829
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
10830
|
-
|
|
10830
|
+
Button,
|
|
10831
10831
|
{
|
|
10832
10832
|
type: "button",
|
|
10833
|
+
variant: "bare",
|
|
10834
|
+
size: "auto",
|
|
10835
|
+
pushEffect: false,
|
|
10833
10836
|
onClick: () => pickAccountAction(account?.onSettings),
|
|
10834
10837
|
className: itemClass,
|
|
10835
10838
|
children: [
|
|
10836
10839
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "settings-gear", className: "size-4 shrink-0 text-muted" }),
|
|
10837
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex-1 truncate", children: settingsLabel })
|
|
10840
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex-1 truncate font-weight-body-sm", children: settingsLabel })
|
|
10838
10841
|
]
|
|
10839
10842
|
}
|
|
10840
10843
|
),
|
|
10841
10844
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
10842
|
-
|
|
10845
|
+
Button,
|
|
10843
10846
|
{
|
|
10844
10847
|
type: "button",
|
|
10848
|
+
variant: "bare",
|
|
10849
|
+
size: "auto",
|
|
10850
|
+
pushEffect: false,
|
|
10845
10851
|
onClick: () => pickAccountAction(account?.onLogout),
|
|
10846
10852
|
className: itemClass,
|
|
10847
10853
|
children: [
|
|
10848
10854
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "logout-sign-out", className: "size-4 shrink-0 text-muted" }),
|
|
10849
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex-1 truncate", children: logoutLabel })
|
|
10855
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex-1 truncate font-weight-body-sm", children: logoutLabel })
|
|
10850
10856
|
]
|
|
10851
10857
|
}
|
|
10852
10858
|
)
|
|
@@ -10892,7 +10898,14 @@ var MarketingNavbar = import_react35.default.forwardRef(
|
|
|
10892
10898
|
href: brandHref,
|
|
10893
10899
|
className: `flex shrink-0 items-center gap-sm rounded-sm text-ink no-underline active:scale-[0.98] ${linkFocus}`,
|
|
10894
10900
|
children: [
|
|
10895
|
-
|
|
10901
|
+
showLogo && (logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10902
|
+
"img",
|
|
10903
|
+
{
|
|
10904
|
+
src: logoSrc,
|
|
10905
|
+
alt: "",
|
|
10906
|
+
className: "h-8 w-8 rounded-sm object-cover"
|
|
10907
|
+
}
|
|
10908
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex h-8 w-8 items-center justify-center rounded-sm bg-linear-to-br from-logo-violet via-logo-pink to-logo-orange text-on-primary", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "atom", size: 18 }) })),
|
|
10896
10909
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10897
10910
|
"span",
|
|
10898
10911
|
{
|
|
@@ -10924,10 +10937,12 @@ var MarketingNavbar = import_react35.default.forwardRef(
|
|
|
10924
10937
|
secondaryAction2 && renderAction(secondaryAction2, "ghost"),
|
|
10925
10938
|
primaryAction2 && renderAction(primaryAction2, "primary"),
|
|
10926
10939
|
account && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
10927
|
-
|
|
10940
|
+
Button,
|
|
10928
10941
|
{
|
|
10929
10942
|
ref: accountBtnRef,
|
|
10930
10943
|
type: "button",
|
|
10944
|
+
variant: "bare",
|
|
10945
|
+
size: "auto",
|
|
10931
10946
|
"aria-expanded": accountOpen,
|
|
10932
10947
|
"aria-controls": accountPanelId,
|
|
10933
10948
|
"aria-label": `Account: ${account.email}`,
|
|
@@ -10935,10 +10950,10 @@ var MarketingNavbar = import_react35.default.forwardRef(
|
|
|
10935
10950
|
setOpen(false);
|
|
10936
10951
|
setAccountOpen((v) => !v);
|
|
10937
10952
|
},
|
|
10938
|
-
className: `flex items-center gap-xs rounded-full border border-hairline-soft bg-surface/60 py-xxs pl-xxs pr-xs text-ink transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] ${linkFocus}`,
|
|
10953
|
+
className: `flex items-center justify-start gap-xs rounded-full border border-hairline-soft bg-surface/60 py-xxs pl-xxs pr-xs text-ink transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] ${linkFocus}`,
|
|
10939
10954
|
children: [
|
|
10940
10955
|
avatar(),
|
|
10941
|
-
showAccountEmail && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "hidden min-w-0 max-w-56 truncate whitespace-nowrap text-caption text-body xl:block", children: account.email }),
|
|
10956
|
+
showAccountEmail && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "hidden min-w-0 max-w-56 truncate whitespace-nowrap text-caption text-body font-weight-body-sm xl:block", children: account.email }),
|
|
10942
10957
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10943
10958
|
Icon,
|
|
10944
10959
|
{
|
|
@@ -10951,9 +10966,11 @@ var MarketingNavbar = import_react35.default.forwardRef(
|
|
|
10951
10966
|
)
|
|
10952
10967
|
] }),
|
|
10953
10968
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10954
|
-
|
|
10969
|
+
Button,
|
|
10955
10970
|
{
|
|
10956
10971
|
type: "button",
|
|
10972
|
+
variant: "bare",
|
|
10973
|
+
size: "auto",
|
|
10957
10974
|
className: `flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-ink hover:bg-surface-soft active:scale-[0.98] md:hidden ${linkFocus}`,
|
|
10958
10975
|
"aria-label": open ? "Close menu" : "Open menu",
|
|
10959
10976
|
"aria-expanded": open,
|
package/dist/index.js
CHANGED
|
@@ -5242,8 +5242,7 @@ var AppSidebarMobile = React19.forwardRef(
|
|
|
5242
5242
|
workspaceName && /* @__PURE__ */ jsx19(
|
|
5243
5243
|
WorkspaceMenu,
|
|
5244
5244
|
{
|
|
5245
|
-
workspaceName
|
|
5246
|
-
initials: workspaceName.charAt(0).toUpperCase()
|
|
5245
|
+
workspaceName
|
|
5247
5246
|
}
|
|
5248
5247
|
),
|
|
5249
5248
|
/* @__PURE__ */ jsx19("ul", { className: "space-y-xxs", role: "list", children: entries.map((entry) => {
|
|
@@ -10618,11 +10617,12 @@ var DEFAULT_LINKS = [
|
|
|
10618
10617
|
var DEFAULT_SECONDARY = { label: "Log in" };
|
|
10619
10618
|
var DEFAULT_PRIMARY = { label: "Start free" };
|
|
10620
10619
|
var linkFocus = "cursor-pointer transition duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
10621
|
-
var itemClass = `flex w-full items-center gap-sm rounded-sm px-sm py-sm text-left text-body-sm text-ink transition duration-150 ease-out hover:bg-surface-soft active:
|
|
10620
|
+
var itemClass = `flex w-full items-center justify-start gap-sm rounded-sm px-sm py-sm text-left text-body-sm text-ink transition duration-150 ease-out hover:bg-surface-soft active:bg-surface-strong ${linkFocus}`;
|
|
10622
10621
|
var MarketingNavbar = React41.forwardRef(
|
|
10623
10622
|
({
|
|
10624
10623
|
brandName = "Atoms Design",
|
|
10625
10624
|
logoSrc,
|
|
10625
|
+
showLogo = true,
|
|
10626
10626
|
brandHref = "/",
|
|
10627
10627
|
links = DEFAULT_LINKS,
|
|
10628
10628
|
secondaryAction: secondaryAction2 = DEFAULT_SECONDARY,
|
|
@@ -10699,13 +10699,13 @@ var MarketingNavbar = React41.forwardRef(
|
|
|
10699
10699
|
window.location.assign(a.href);
|
|
10700
10700
|
}
|
|
10701
10701
|
};
|
|
10702
|
-
const renderAction = (a,
|
|
10702
|
+
const renderAction = (a, actionVariant, full = false) => /* @__PURE__ */ jsx41(
|
|
10703
10703
|
Button,
|
|
10704
10704
|
{
|
|
10705
|
-
variant:
|
|
10705
|
+
variant: actionVariant,
|
|
10706
10706
|
size: "md",
|
|
10707
10707
|
onClick: () => runAction(a),
|
|
10708
|
-
className: `shrink-0 whitespace-nowrap !rounded-full ${full ? "w-full" : ""} ${floating &&
|
|
10708
|
+
className: `shrink-0 whitespace-nowrap !rounded-full ${full ? "w-full" : ""} ${floating && actionVariant === "ghost" ? "!text-ink" : ""}`,
|
|
10709
10709
|
children: a.label
|
|
10710
10710
|
}
|
|
10711
10711
|
);
|
|
@@ -10733,26 +10733,32 @@ var MarketingNavbar = React41.forwardRef(
|
|
|
10733
10733
|
};
|
|
10734
10734
|
const accountRows = /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-xxs", children: [
|
|
10735
10735
|
/* @__PURE__ */ jsxs39(
|
|
10736
|
-
|
|
10736
|
+
Button,
|
|
10737
10737
|
{
|
|
10738
10738
|
type: "button",
|
|
10739
|
+
variant: "bare",
|
|
10740
|
+
size: "auto",
|
|
10741
|
+
pushEffect: false,
|
|
10739
10742
|
onClick: () => pickAccountAction(account?.onSettings),
|
|
10740
10743
|
className: itemClass,
|
|
10741
10744
|
children: [
|
|
10742
10745
|
/* @__PURE__ */ jsx41(Icon, { name: "settings-gear", className: "size-4 shrink-0 text-muted" }),
|
|
10743
|
-
/* @__PURE__ */ jsx41("span", { className: "flex-1 truncate", children: settingsLabel })
|
|
10746
|
+
/* @__PURE__ */ jsx41("span", { className: "flex-1 truncate font-weight-body-sm", children: settingsLabel })
|
|
10744
10747
|
]
|
|
10745
10748
|
}
|
|
10746
10749
|
),
|
|
10747
10750
|
/* @__PURE__ */ jsxs39(
|
|
10748
|
-
|
|
10751
|
+
Button,
|
|
10749
10752
|
{
|
|
10750
10753
|
type: "button",
|
|
10754
|
+
variant: "bare",
|
|
10755
|
+
size: "auto",
|
|
10756
|
+
pushEffect: false,
|
|
10751
10757
|
onClick: () => pickAccountAction(account?.onLogout),
|
|
10752
10758
|
className: itemClass,
|
|
10753
10759
|
children: [
|
|
10754
10760
|
/* @__PURE__ */ jsx41(Icon, { name: "logout-sign-out", className: "size-4 shrink-0 text-muted" }),
|
|
10755
|
-
/* @__PURE__ */ jsx41("span", { className: "flex-1 truncate", children: logoutLabel })
|
|
10761
|
+
/* @__PURE__ */ jsx41("span", { className: "flex-1 truncate font-weight-body-sm", children: logoutLabel })
|
|
10756
10762
|
]
|
|
10757
10763
|
}
|
|
10758
10764
|
)
|
|
@@ -10798,7 +10804,14 @@ var MarketingNavbar = React41.forwardRef(
|
|
|
10798
10804
|
href: brandHref,
|
|
10799
10805
|
className: `flex shrink-0 items-center gap-sm rounded-sm text-ink no-underline active:scale-[0.98] ${linkFocus}`,
|
|
10800
10806
|
children: [
|
|
10801
|
-
|
|
10807
|
+
showLogo && (logoSrc ? /* @__PURE__ */ jsx41(
|
|
10808
|
+
"img",
|
|
10809
|
+
{
|
|
10810
|
+
src: logoSrc,
|
|
10811
|
+
alt: "",
|
|
10812
|
+
className: "h-8 w-8 rounded-sm object-cover"
|
|
10813
|
+
}
|
|
10814
|
+
) : /* @__PURE__ */ jsx41("span", { className: "flex h-8 w-8 items-center justify-center rounded-sm bg-linear-to-br from-logo-violet via-logo-pink to-logo-orange text-on-primary", children: /* @__PURE__ */ jsx41(Icon, { name: "atom", size: 18 }) })),
|
|
10802
10815
|
/* @__PURE__ */ jsx41(
|
|
10803
10816
|
"span",
|
|
10804
10817
|
{
|
|
@@ -10830,10 +10843,12 @@ var MarketingNavbar = React41.forwardRef(
|
|
|
10830
10843
|
secondaryAction2 && renderAction(secondaryAction2, "ghost"),
|
|
10831
10844
|
primaryAction2 && renderAction(primaryAction2, "primary"),
|
|
10832
10845
|
account && /* @__PURE__ */ jsxs39(
|
|
10833
|
-
|
|
10846
|
+
Button,
|
|
10834
10847
|
{
|
|
10835
10848
|
ref: accountBtnRef,
|
|
10836
10849
|
type: "button",
|
|
10850
|
+
variant: "bare",
|
|
10851
|
+
size: "auto",
|
|
10837
10852
|
"aria-expanded": accountOpen,
|
|
10838
10853
|
"aria-controls": accountPanelId,
|
|
10839
10854
|
"aria-label": `Account: ${account.email}`,
|
|
@@ -10841,10 +10856,10 @@ var MarketingNavbar = React41.forwardRef(
|
|
|
10841
10856
|
setOpen(false);
|
|
10842
10857
|
setAccountOpen((v) => !v);
|
|
10843
10858
|
},
|
|
10844
|
-
className: `flex items-center gap-xs rounded-full border border-hairline-soft bg-surface/60 py-xxs pl-xxs pr-xs text-ink transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] ${linkFocus}`,
|
|
10859
|
+
className: `flex items-center justify-start gap-xs rounded-full border border-hairline-soft bg-surface/60 py-xxs pl-xxs pr-xs text-ink transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] ${linkFocus}`,
|
|
10845
10860
|
children: [
|
|
10846
10861
|
avatar(),
|
|
10847
|
-
showAccountEmail && /* @__PURE__ */ jsx41("span", { className: "hidden min-w-0 max-w-56 truncate whitespace-nowrap text-caption text-body xl:block", children: account.email }),
|
|
10862
|
+
showAccountEmail && /* @__PURE__ */ jsx41("span", { className: "hidden min-w-0 max-w-56 truncate whitespace-nowrap text-caption text-body font-weight-body-sm xl:block", children: account.email }),
|
|
10848
10863
|
/* @__PURE__ */ jsx41(
|
|
10849
10864
|
Icon,
|
|
10850
10865
|
{
|
|
@@ -10857,9 +10872,11 @@ var MarketingNavbar = React41.forwardRef(
|
|
|
10857
10872
|
)
|
|
10858
10873
|
] }),
|
|
10859
10874
|
/* @__PURE__ */ jsx41(
|
|
10860
|
-
|
|
10875
|
+
Button,
|
|
10861
10876
|
{
|
|
10862
10877
|
type: "button",
|
|
10878
|
+
variant: "bare",
|
|
10879
|
+
size: "auto",
|
|
10863
10880
|
className: `flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-ink hover:bg-surface-soft active:scale-[0.98] md:hidden ${linkFocus}`,
|
|
10864
10881
|
"aria-label": open ? "Close menu" : "Open menu",
|
|
10865
10882
|
"aria-expanded": open,
|
package/dist/styles.css
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: "Plus Jakarta Sans";
|
|
4
|
-
font-style: italic;
|
|
5
|
-
font-weight: 100 900;
|
|
6
|
-
font-display: swap;
|
|
7
|
-
src: url("./fonts/plusjakartasans/PlusJakartaSans-Italic%5Bwght%5D.ttf") format("truetype");
|
|
8
|
-
}
|
|
9
|
-
@font-face {
|
|
10
|
-
font-family: "Plus Jakarta Sans";
|
|
11
|
-
font-style: normal;
|
|
12
|
-
font-weight: 100 900;
|
|
13
|
-
font-display: swap;
|
|
14
|
-
src: url("./fonts/plusjakartasans/PlusJakartaSans%5Bwght%5D.ttf") format("truetype");
|
|
15
|
-
}
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Plus%20Jakarta%20Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
|
|
16
2
|
|
|
17
3
|
/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
18
4
|
@layer properties;
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { AppSidebar } from "./AppSidebar";
|
|
2
|
-
export type { AppSidebarProps } from "./AppSidebar";
|
|
2
|
+
export type { AppSidebarProps, NavEntry, NavSubItem } from "./AppSidebar";
|
|
@@ -3,7 +3,7 @@ import { Modal } from "../Modal";
|
|
|
3
3
|
import { Button } from "../Button";
|
|
4
4
|
import { Chip } from "../Chip";
|
|
5
5
|
import { Typography } from "../Typography";
|
|
6
|
-
import { Icon } from "../Icon";
|
|
6
|
+
import { Icon, type IconName } from "../Icon";
|
|
7
7
|
|
|
8
8
|
export type ExportDesignMdSource = "production" | "local";
|
|
9
9
|
|
|
@@ -76,7 +76,7 @@ const defaultLines: ExportDesignMdLine[] = [
|
|
|
76
76
|
|
|
77
77
|
const SOURCE_INFO: Record<
|
|
78
78
|
ExportDesignMdSource,
|
|
79
|
-
{ icon:
|
|
79
|
+
{ icon: IconName; title: string; description: string; helper: string }
|
|
80
80
|
> = {
|
|
81
81
|
production: {
|
|
82
82
|
icon: "cloud",
|
|
@@ -475,7 +475,7 @@ const SuggestionMarquee: React.FC<SuggestionMarqueeProps> = ({ suggestions, onCh
|
|
|
475
475
|
scrubBy(-delta);
|
|
476
476
|
};
|
|
477
477
|
|
|
478
|
-
const renderRow = (items: string[], trackRef: React.RefObject<HTMLDivElement>) => (
|
|
478
|
+
const renderRow = (items: string[], trackRef: React.RefObject<HTMLDivElement | null>) => (
|
|
479
479
|
<div
|
|
480
480
|
ref={trackRef}
|
|
481
481
|
className="flex w-max gap-sm px-md hpt-marquee-track"
|
|
@@ -32,6 +32,11 @@ export interface MarketingNavbarProps
|
|
|
32
32
|
brandName?: string;
|
|
33
33
|
/** Optional logo image. When omitted a gradient atom mark is rendered. */
|
|
34
34
|
logoSrc?: string;
|
|
35
|
+
/**
|
|
36
|
+
* When false the brand mark is omitted entirely — no logo image, no gradient
|
|
37
|
+
* atom mark, and no empty logo box. Only the brand name text is rendered.
|
|
38
|
+
*/
|
|
39
|
+
showLogo?: boolean;
|
|
35
40
|
brandHref?: string;
|
|
36
41
|
links?: MarketingNavLink[];
|
|
37
42
|
/** Secondary auth action (e.g. "Log in"). Hidden when null. */
|
|
@@ -78,13 +83,14 @@ const DEFAULT_PRIMARY: MarketingNavAction = { label: "Start free" };
|
|
|
78
83
|
const linkFocus =
|
|
79
84
|
"cursor-pointer transition duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
80
85
|
|
|
81
|
-
const itemClass = `flex w-full items-center gap-sm rounded-sm px-sm py-sm text-left text-body-sm text-ink transition duration-150 ease-out hover:bg-surface-soft active:
|
|
86
|
+
const itemClass = `flex w-full items-center justify-start gap-sm rounded-sm px-sm py-sm text-left text-body-sm text-ink transition duration-150 ease-out hover:bg-surface-soft active:bg-surface-strong ${linkFocus}`;
|
|
82
87
|
|
|
83
88
|
export const MarketingNavbar = React.forwardRef<HTMLElement, MarketingNavbarProps>(
|
|
84
89
|
(
|
|
85
90
|
{
|
|
86
91
|
brandName = "Atoms Design",
|
|
87
92
|
logoSrc,
|
|
93
|
+
showLogo = true,
|
|
88
94
|
brandHref = "/",
|
|
89
95
|
links = DEFAULT_LINKS,
|
|
90
96
|
secondaryAction = DEFAULT_SECONDARY,
|
|
@@ -176,15 +182,15 @@ export const MarketingNavbar = React.forwardRef<HTMLElement, MarketingNavbarProp
|
|
|
176
182
|
|
|
177
183
|
const renderAction = (
|
|
178
184
|
a: MarketingNavAction,
|
|
179
|
-
|
|
185
|
+
actionVariant: "primary" | "ghost",
|
|
180
186
|
full = false,
|
|
181
187
|
) => (
|
|
182
188
|
<Button
|
|
183
|
-
variant={
|
|
189
|
+
variant={actionVariant}
|
|
184
190
|
size="md"
|
|
185
191
|
onClick={() => runAction(a)}
|
|
186
192
|
className={`shrink-0 whitespace-nowrap !rounded-full ${full ? "w-full" : ""} ${
|
|
187
|
-
floating &&
|
|
193
|
+
floating && actionVariant === "ghost" ? "!text-ink" : ""
|
|
188
194
|
}`}
|
|
189
195
|
>
|
|
190
196
|
{a.label}
|
|
@@ -219,22 +225,28 @@ export const MarketingNavbar = React.forwardRef<HTMLElement, MarketingNavbarProp
|
|
|
219
225
|
|
|
220
226
|
const accountRows = (
|
|
221
227
|
<div className="flex flex-col gap-xxs">
|
|
222
|
-
<
|
|
228
|
+
<Button
|
|
223
229
|
type="button"
|
|
230
|
+
variant="bare"
|
|
231
|
+
size="auto"
|
|
232
|
+
pushEffect={false}
|
|
224
233
|
onClick={() => pickAccountAction(account?.onSettings)}
|
|
225
234
|
className={itemClass}
|
|
226
235
|
>
|
|
227
236
|
<Icon name="settings-gear" className="size-4 shrink-0 text-muted" />
|
|
228
|
-
<span className="flex-1 truncate">{settingsLabel}</span>
|
|
229
|
-
</
|
|
230
|
-
<
|
|
237
|
+
<span className="flex-1 truncate font-weight-body-sm">{settingsLabel}</span>
|
|
238
|
+
</Button>
|
|
239
|
+
<Button
|
|
231
240
|
type="button"
|
|
241
|
+
variant="bare"
|
|
242
|
+
size="auto"
|
|
243
|
+
pushEffect={false}
|
|
232
244
|
onClick={() => pickAccountAction(account?.onLogout)}
|
|
233
245
|
className={itemClass}
|
|
234
246
|
>
|
|
235
247
|
<Icon name="logout-sign-out" className="size-4 shrink-0 text-muted" />
|
|
236
|
-
<span className="flex-1 truncate">{logoutLabel}</span>
|
|
237
|
-
</
|
|
248
|
+
<span className="flex-1 truncate font-weight-body-sm">{logoutLabel}</span>
|
|
249
|
+
</Button>
|
|
238
250
|
</div>
|
|
239
251
|
);
|
|
240
252
|
|
|
@@ -285,13 +297,18 @@ export const MarketingNavbar = React.forwardRef<HTMLElement, MarketingNavbarProp
|
|
|
285
297
|
href={brandHref}
|
|
286
298
|
className={`flex shrink-0 items-center gap-sm rounded-sm text-ink no-underline active:scale-[0.98] ${linkFocus}`}
|
|
287
299
|
>
|
|
288
|
-
{
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
300
|
+
{showLogo &&
|
|
301
|
+
(logoSrc ? (
|
|
302
|
+
<img
|
|
303
|
+
src={logoSrc}
|
|
304
|
+
alt=""
|
|
305
|
+
className="h-8 w-8 rounded-sm object-cover"
|
|
306
|
+
/>
|
|
307
|
+
) : (
|
|
308
|
+
<span className="flex h-8 w-8 items-center justify-center rounded-sm bg-linear-to-br from-logo-violet via-logo-pink to-logo-orange text-on-primary">
|
|
309
|
+
<Icon name="atom" size={18} />
|
|
310
|
+
</span>
|
|
311
|
+
))}
|
|
295
312
|
<span
|
|
296
313
|
className={`whitespace-nowrap text-body-md text-ink ${floating ? "font-weight-body-md" : ""}`}
|
|
297
314
|
>
|
|
@@ -321,9 +338,11 @@ export const MarketingNavbar = React.forwardRef<HTMLElement, MarketingNavbarProp
|
|
|
321
338
|
{secondaryAction && renderAction(secondaryAction, "ghost")}
|
|
322
339
|
{primaryAction && renderAction(primaryAction, "primary")}
|
|
323
340
|
{account && (
|
|
324
|
-
<
|
|
341
|
+
<Button
|
|
325
342
|
ref={accountBtnRef}
|
|
326
343
|
type="button"
|
|
344
|
+
variant="bare"
|
|
345
|
+
size="auto"
|
|
327
346
|
aria-expanded={accountOpen}
|
|
328
347
|
aria-controls={accountPanelId}
|
|
329
348
|
aria-label={`Account: ${account.email}`}
|
|
@@ -331,11 +350,11 @@ export const MarketingNavbar = React.forwardRef<HTMLElement, MarketingNavbarProp
|
|
|
331
350
|
setOpen(false);
|
|
332
351
|
setAccountOpen((v) => !v);
|
|
333
352
|
}}
|
|
334
|
-
className={`flex items-center gap-xs rounded-full border border-hairline-soft bg-surface/60 py-xxs pl-xxs pr-xs text-ink transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] ${linkFocus}`}
|
|
353
|
+
className={`flex items-center justify-start gap-xs rounded-full border border-hairline-soft bg-surface/60 py-xxs pl-xxs pr-xs text-ink transition duration-150 ease-out hover:bg-surface-soft active:scale-[0.98] ${linkFocus}`}
|
|
335
354
|
>
|
|
336
355
|
{avatar()}
|
|
337
356
|
{showAccountEmail && (
|
|
338
|
-
<span className="hidden min-w-0 max-w-56 truncate whitespace-nowrap text-caption text-body xl:block">
|
|
357
|
+
<span className="hidden min-w-0 max-w-56 truncate whitespace-nowrap text-caption text-body font-weight-body-sm xl:block">
|
|
339
358
|
{account.email}
|
|
340
359
|
</span>
|
|
341
360
|
)}
|
|
@@ -345,12 +364,14 @@ export const MarketingNavbar = React.forwardRef<HTMLElement, MarketingNavbarProp
|
|
|
345
364
|
accountOpen ? "rotate-180" : "rotate-0"
|
|
346
365
|
}`}
|
|
347
366
|
/>
|
|
348
|
-
</
|
|
367
|
+
</Button>
|
|
349
368
|
)}
|
|
350
369
|
</div>
|
|
351
370
|
|
|
352
|
-
<
|
|
371
|
+
<Button
|
|
353
372
|
type="button"
|
|
373
|
+
variant="bare"
|
|
374
|
+
size="auto"
|
|
354
375
|
className={`flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-ink hover:bg-surface-soft active:scale-[0.98] md:hidden ${linkFocus}`}
|
|
355
376
|
aria-label={open ? "Close menu" : "Open menu"}
|
|
356
377
|
aria-expanded={open}
|
|
@@ -361,7 +382,7 @@ export const MarketingNavbar = React.forwardRef<HTMLElement, MarketingNavbarProp
|
|
|
361
382
|
}}
|
|
362
383
|
>
|
|
363
384
|
<Icon name={open ? "close" : "hamburger-menu"} size={20} />
|
|
364
|
-
</
|
|
385
|
+
</Button>
|
|
365
386
|
</div>
|
|
366
387
|
|
|
367
388
|
<div
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { Button } from "../Button";
|
|
2
3
|
import { MarketingNavbar } from "./MarketingNavbar";
|
|
3
4
|
|
|
4
5
|
export default function Preview() {
|
|
@@ -58,13 +59,15 @@ export default function Preview() {
|
|
|
58
59
|
<p className="text-caption text-muted">
|
|
59
60
|
Signed in — avatar button with the email, plus settings and log out
|
|
60
61
|
</p>
|
|
61
|
-
<
|
|
62
|
+
<Button
|
|
62
63
|
type="button"
|
|
64
|
+
variant="bare"
|
|
65
|
+
size="auto"
|
|
63
66
|
onClick={() => setSignedIn((v) => !v)}
|
|
64
|
-
className="
|
|
67
|
+
className="rounded-full border border-hairline px-sm py-xs text-caption text-ink 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"
|
|
65
68
|
>
|
|
66
69
|
{signedIn ? "Sign out" : "Sign in"}
|
|
67
|
-
</
|
|
70
|
+
</Button>
|
|
68
71
|
</div>
|
|
69
72
|
|
|
70
73
|
<div className="rounded-lg border border-hairline">
|
|
@@ -93,17 +96,38 @@ export default function Preview() {
|
|
|
93
96
|
{account.email}
|
|
94
97
|
</p>
|
|
95
98
|
</div>
|
|
96
|
-
<
|
|
99
|
+
<Button
|
|
97
100
|
type="button"
|
|
101
|
+
variant="bare"
|
|
102
|
+
size="auto"
|
|
98
103
|
onClick={() => setSettingsOpen(false)}
|
|
99
|
-
className="
|
|
104
|
+
className="rounded-full px-sm py-xs text-caption text-muted 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"
|
|
100
105
|
>
|
|
101
106
|
Close
|
|
102
|
-
</
|
|
107
|
+
</Button>
|
|
103
108
|
</div>
|
|
104
109
|
</div>
|
|
105
110
|
)}
|
|
106
111
|
</section>
|
|
112
|
+
|
|
113
|
+
<section className="space-y-sm">
|
|
114
|
+
<p className="text-caption text-muted">
|
|
115
|
+
Wordmark only — showLogo=false drops the mark entirely, no empty box
|
|
116
|
+
</p>
|
|
117
|
+
<div className="overflow-hidden rounded-lg border border-hairline">
|
|
118
|
+
<MarketingNavbar
|
|
119
|
+
sticky={false}
|
|
120
|
+
showLogo={false}
|
|
121
|
+
account={null}
|
|
122
|
+
links={[
|
|
123
|
+
{ label: "Product", href: "#product" },
|
|
124
|
+
{ label: "Changelog", href: "#changelog" },
|
|
125
|
+
{ label: "Pricing", href: "/pricing" },
|
|
126
|
+
]}
|
|
127
|
+
onLinkClick={(_, e) => e.preventDefault()}
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
</section>
|
|
107
131
|
</div>
|
|
108
132
|
);
|
|
109
133
|
}
|
package/src/atoms/Menu/Menu.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { createPortal } from "react-dom";
|
|
3
3
|
import { Button } from "../Button";
|
|
4
|
-
import { Icon } from "../Icon";
|
|
4
|
+
import { Icon, type IconName } from "../Icon";
|
|
5
5
|
|
|
6
6
|
export interface MenuItem {
|
|
7
7
|
/** Stable identifier, also used as the React key */
|
|
@@ -9,7 +9,7 @@ export interface MenuItem {
|
|
|
9
9
|
/** Visible label */
|
|
10
10
|
label: string;
|
|
11
11
|
/** Optional icon name resolved through the shared Icon atom, rendered as a leading prefix */
|
|
12
|
-
icon?:
|
|
12
|
+
icon?: IconName;
|
|
13
13
|
/** Called when the item is chosen (click or Enter/Space while focused) */
|
|
14
14
|
onSelect?: () => void;
|
|
15
15
|
/** Disables the item */
|
|
@@ -40,7 +40,7 @@ export interface DrawerUpgrade {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export interface MobileActionsDrawerProps
|
|
43
|
-
extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
43
|
+
extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onSelect" | "onToggle"> {
|
|
44
44
|
open: boolean;
|
|
45
45
|
onOpenChange: (open: boolean) => void;
|
|
46
46
|
projectName?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Icon } from "../Icon";
|
|
2
|
+
import { Icon, type IconName } from "../Icon";
|
|
3
3
|
|
|
4
4
|
export interface PreviewDockProps {
|
|
5
5
|
/** Label shown under the viewport icon, e.g. "Desktop" or "Mobile". Defaults to "Desktop". */
|
|
@@ -16,7 +16,7 @@ export interface PreviewDockProps {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
interface DockActionProps {
|
|
19
|
-
icon:
|
|
19
|
+
icon: IconName;
|
|
20
20
|
label: string;
|
|
21
21
|
active: boolean;
|
|
22
22
|
onClick?: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Typography } from "../Typography";
|
|
3
3
|
import { Button } from "../Button";
|
|
4
|
-
import { Icon } from "../Icon";
|
|
4
|
+
import { Icon, type IconName } from "../Icon";
|
|
5
5
|
|
|
6
6
|
interface Swatch {
|
|
7
7
|
label: string;
|
|
@@ -116,7 +116,7 @@ export interface TemplateHeroProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
116
116
|
* - a string — renders `Icon` with that name (e.g. "grid") instead.
|
|
117
117
|
* - `null` — renders the primary CTA with no leading icon, label only.
|
|
118
118
|
*/
|
|
119
|
-
buyIcon?:
|
|
119
|
+
buyIcon?: IconName | null;
|
|
120
120
|
/** Secondary CTA label */
|
|
121
121
|
previewLabel?: string;
|
|
122
122
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Button } from "../Button";
|
|
3
|
-
import { Icon } from "../Icon";
|
|
3
|
+
import { Icon, type IconName } from "../Icon";
|
|
4
4
|
|
|
5
5
|
export type ToastTone = "success" | "error" | "info" | "warning";
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ export interface ToastStackProps
|
|
|
32
32
|
|
|
33
33
|
const TONE: Record<
|
|
34
34
|
ToastTone,
|
|
35
|
-
{ icon:
|
|
35
|
+
{ icon: IconName; tile: string; glyph: string; rail: string; border: string }
|
|
36
36
|
> = {
|
|
37
37
|
success: {
|
|
38
38
|
icon: "check-checkmark",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Icon } from "../Icon";
|
|
2
|
+
import { Icon, type IconName } from "../Icon";
|
|
3
3
|
|
|
4
4
|
export interface UpgradeCardCredits {
|
|
5
5
|
/** Credits remaining */
|
|
@@ -17,7 +17,7 @@ export interface UpgradeCardProps
|
|
|
17
17
|
/** Muted supporting text beneath the title */
|
|
18
18
|
subtitle?: string;
|
|
19
19
|
/** Icon rendered inside the tinted badge */
|
|
20
|
-
iconName?:
|
|
20
|
+
iconName?: IconName;
|
|
21
21
|
/** When provided, renders the credits-left block under the header row */
|
|
22
22
|
credits?: UpgradeCardCredits;
|
|
23
23
|
/** Fraction of total at or below which the meter switches to the warning recipe. Default 0.1 */
|
|
Binary file
|
|
Binary file
|