@nswds/app 1.108.2 → 1.109.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/dist/globals.css +1017 -56
- package/dist/index.cjs +16 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -12
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1012 -50
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -15737,8 +15737,8 @@ function ColorPairingToolContent({ visibleFormats }) {
|
|
|
15737
15737
|
const previewHeroStatusLabel = getPreviewHeroStatusLabel(contrastRatio);
|
|
15738
15738
|
const contrastTone = getContrastTone(contrastRatio);
|
|
15739
15739
|
const resolvedCopyFormat = visibleFormats.includes(copyFormat) ? copyFormat : visibleFormats[0] ?? DEFAULT_VISIBLE_FORMATS[0];
|
|
15740
|
-
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "overflow-hidden rounded-sm bg-white text-grey-800", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid min-h-[46rem] xl:grid-cols-[260px_minmax(0,1fr)] xl:gap-x-6", children: [
|
|
15741
|
-
/* @__PURE__ */ jsxRuntime.jsx("aside", { className: "border-b border-grey-200 py-5 xl:border-b-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
15740
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "min-w-0 overflow-hidden rounded-sm bg-white text-grey-800", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid min-w-0 xl:min-h-[46rem] xl:grid-cols-[260px_minmax(0,1fr)] xl:gap-x-6", children: [
|
|
15741
|
+
/* @__PURE__ */ jsxRuntime.jsx("aside", { className: "border-b border-grey-200 px-4 py-5 sm:px-6 xl:border-b-0 xl:px-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
15742
15742
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-3", children: [
|
|
15743
15743
|
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: "Palette" }),
|
|
15744
15744
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex rounded-sm border border-grey-200 bg-white p-1", children: [
|
|
@@ -15762,7 +15762,7 @@ function ColorPairingToolContent({ visibleFormats }) {
|
|
|
15762
15762
|
] }),
|
|
15763
15763
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-3", children: [
|
|
15764
15764
|
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: "Background family" }),
|
|
15765
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-
|
|
15765
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1 sm:grid-cols-5", children: selectableFamilies.map((family) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15766
15766
|
FamilyButton,
|
|
15767
15767
|
{
|
|
15768
15768
|
family,
|
|
@@ -15774,7 +15774,7 @@ function ColorPairingToolContent({ visibleFormats }) {
|
|
|
15774
15774
|
] }),
|
|
15775
15775
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-3", children: [
|
|
15776
15776
|
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: "Background shade" }),
|
|
15777
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[20.5rem]
|
|
15777
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1 sm:max-h-[20.5rem] sm:overflow-y-auto sm:pr-1", children: backgroundShadeOptions.map((shade) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15778
15778
|
ShadeButton,
|
|
15779
15779
|
{
|
|
15780
15780
|
shade,
|
|
@@ -15787,7 +15787,7 @@ function ColorPairingToolContent({ visibleFormats }) {
|
|
|
15787
15787
|
] }),
|
|
15788
15788
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-3", children: [
|
|
15789
15789
|
/* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: "Accent family" }),
|
|
15790
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-
|
|
15790
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1 sm:grid-cols-5", children: selectableAccentFamilies.map((family) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15791
15791
|
FamilyButton,
|
|
15792
15792
|
{
|
|
15793
15793
|
family,
|
|
@@ -15798,8 +15798,8 @@ function ColorPairingToolContent({ visibleFormats }) {
|
|
|
15798
15798
|
)) })
|
|
15799
15799
|
] })
|
|
15800
15800
|
] }) }),
|
|
15801
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-col", children: [
|
|
15802
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col gap-5
|
|
15801
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 min-w-0 flex-col px-4 sm:px-6 xl:px-0", children: [
|
|
15802
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-5 py-5 sm:py-6 xl:overflow-y-auto", children: [
|
|
15803
15803
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(Button2, { variant: "soft", color: "primary", onClick: handleCopyUrl, className: "mr-1", children: copiedKey === "share-url" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15804
15804
|
/* @__PURE__ */ jsxRuntime.jsx(Icons.check, { "data-slot": "icon", className: "size-4" }),
|
|
15805
15805
|
"Copied URL!"
|
|
@@ -18719,7 +18719,7 @@ function FormatToggle({ format, setFormat }) {
|
|
|
18719
18719
|
|
|
18720
18720
|
// package.json
|
|
18721
18721
|
var package_default = {
|
|
18722
|
-
version: "1.108.
|
|
18722
|
+
version: "1.108.2"};
|
|
18723
18723
|
var SluggerContext = React5__namespace.default.createContext(null);
|
|
18724
18724
|
function flattenText(nodes) {
|
|
18725
18725
|
if (nodes == null || typeof nodes === "boolean") return "";
|
|
@@ -20549,8 +20549,8 @@ function MobileSearch({ navigation: navigation$1 }) {
|
|
|
20549
20549
|
] })
|
|
20550
20550
|
] });
|
|
20551
20551
|
}
|
|
20552
|
-
function
|
|
20553
|
-
return `level-${
|
|
20552
|
+
function buildLevelId(path) {
|
|
20553
|
+
return `level-${path.length > 0 ? path.join("--") : "root"}`;
|
|
20554
20554
|
}
|
|
20555
20555
|
function generateBreadcrumb(levels, maxLength = 50) {
|
|
20556
20556
|
if (levels.length <= 1) return levels[0]?.title || "Menu";
|
|
@@ -20581,7 +20581,7 @@ function MultiLevelPushMenu({
|
|
|
20581
20581
|
}) {
|
|
20582
20582
|
const pathname = navigation.usePathname();
|
|
20583
20583
|
const [navigationHistory, setNavigationHistory] = React5.useState([
|
|
20584
|
-
{ items: navigation$1 || [], title: initialTitle, depth: 1, id:
|
|
20584
|
+
{ items: navigation$1 || [], title: initialTitle, depth: 1, id: buildLevelId([]) }
|
|
20585
20585
|
]);
|
|
20586
20586
|
const [animationState, setAnimationState] = React5.useState("idle");
|
|
20587
20587
|
const [isAnimationStarted, setIsAnimationStarted] = React5.useState(false);
|
|
@@ -20593,12 +20593,16 @@ function MultiLevelPushMenu({
|
|
|
20593
20593
|
const navigateToSubmenu = React5.useCallback(
|
|
20594
20594
|
(item) => {
|
|
20595
20595
|
if (item.links && item.links.length > 0 && animationState === "idle") {
|
|
20596
|
+
const levelPath = [
|
|
20597
|
+
...navigationHistory.flatMap((level) => level.parentItem ? [level.parentItem.id] : []),
|
|
20598
|
+
item.id
|
|
20599
|
+
];
|
|
20596
20600
|
const newLevel = {
|
|
20597
20601
|
items: item.links,
|
|
20598
20602
|
title: item.title,
|
|
20599
20603
|
parentItem: item,
|
|
20600
20604
|
depth: navigationHistory[navigationHistory.length - 1].depth + 1,
|
|
20601
|
-
id:
|
|
20605
|
+
id: buildLevelId(levelPath)
|
|
20602
20606
|
};
|
|
20603
20607
|
const newHistory = [...navigationHistory, newLevel];
|
|
20604
20608
|
setNavigationHistory(newHistory);
|