@nswds/app 1.76.1 → 1.77.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/index.cjs +25 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +25 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14229,7 +14229,14 @@ function CodeDemoLoading() {
|
|
|
14229
14229
|
function CodeDemoContent({ data, hide = {} }) {
|
|
14230
14230
|
const { resolvedTheme } = nextThemes.useTheme();
|
|
14231
14231
|
const searchParams = navigation.useSearchParams();
|
|
14232
|
-
const {
|
|
14232
|
+
const {
|
|
14233
|
+
rtl = false,
|
|
14234
|
+
darkMode = false,
|
|
14235
|
+
themeSelector = false,
|
|
14236
|
+
displayCode = true,
|
|
14237
|
+
viewToggle = true,
|
|
14238
|
+
copyButton = true
|
|
14239
|
+
} = hide;
|
|
14233
14240
|
const [tabIndex, setTabIndex] = React5.useState(0);
|
|
14234
14241
|
const [variant, setVariant] = React5.useState(getInitialVariant(data));
|
|
14235
14242
|
const [view, setView] = React5.useState("desktop");
|
|
@@ -14399,9 +14406,9 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
14399
14406
|
}, [themeCategory, primaryColor, accentColor, greyColor, isThemeInitialized]);
|
|
14400
14407
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8", children: [
|
|
14401
14408
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full rounded-t-xl border border-grey-200 bg-grey-50 p-4 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3", children: [
|
|
14402
|
-
/* @__PURE__ */ jsxRuntime.jsx(EditOnGithubButton, { githubSlug: data.githubSlug }),
|
|
14409
|
+
data.githubSlug && /* @__PURE__ */ jsxRuntime.jsx(EditOnGithubButton, { githubSlug: data.githubSlug }),
|
|
14403
14410
|
data.figmaSlug && /* @__PURE__ */ jsxRuntime.jsx(OpenInFigmaButton, { figmaSlug: data.figmaSlug }),
|
|
14404
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToggleViewButtons, { onSelect: setView }),
|
|
14411
|
+
viewToggle && /* @__PURE__ */ jsxRuntime.jsx(ToggleViewButtons, { onSelect: setView }),
|
|
14405
14412
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-1 flex justify-end gap-3", children: [
|
|
14406
14413
|
!themeSelector && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14407
14414
|
ThemeSelectorDropDown,
|
|
@@ -14447,7 +14454,7 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
14447
14454
|
) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: data.component })
|
|
14448
14455
|
}
|
|
14449
14456
|
),
|
|
14450
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "code-syntax-wrapper", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14457
|
+
displayCode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "code-syntax-wrapper", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14451
14458
|
"div",
|
|
14452
14459
|
{
|
|
14453
14460
|
className: tailwindMerge.twMerge(
|
|
@@ -14461,7 +14468,7 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
14461
14468
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select a variant" }) }),
|
|
14462
14469
|
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: variants.map((v) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: v, children: variantLabels[v] }, v)) })
|
|
14463
14470
|
] }),
|
|
14464
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14471
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: copyButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14465
14472
|
CopyToClipboardButton,
|
|
14466
14473
|
{
|
|
14467
14474
|
isJustCopied,
|
|
@@ -14469,14 +14476,20 @@ function CodeDemoContent({ data, hide = {} }) {
|
|
|
14469
14476
|
}
|
|
14470
14477
|
) })
|
|
14471
14478
|
] }),
|
|
14472
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14473
|
-
|
|
14479
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14480
|
+
"div",
|
|
14474
14481
|
{
|
|
14475
|
-
className: "!
|
|
14476
|
-
|
|
14477
|
-
|
|
14482
|
+
className: tailwindMerge.twMerge("!overflow-y-hidden", shouldExpand && !isExpanded && "max-h-72"),
|
|
14483
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14484
|
+
CodeHighlight,
|
|
14485
|
+
{
|
|
14486
|
+
className: "!mb-0 !rounded-none",
|
|
14487
|
+
code: current.code,
|
|
14488
|
+
language: current.language
|
|
14489
|
+
}
|
|
14490
|
+
)
|
|
14478
14491
|
}
|
|
14479
|
-
)
|
|
14492
|
+
),
|
|
14480
14493
|
shouldExpand && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14481
14494
|
CollapseExpandButton,
|
|
14482
14495
|
{
|
|
@@ -17465,7 +17478,7 @@ function FormatToggle({ format, setFormat }) {
|
|
|
17465
17478
|
|
|
17466
17479
|
// package.json
|
|
17467
17480
|
var package_default = {
|
|
17468
|
-
version: "1.
|
|
17481
|
+
version: "1.76.0"};
|
|
17469
17482
|
var SluggerContext = React5__namespace.default.createContext(null);
|
|
17470
17483
|
function flattenText(nodes) {
|
|
17471
17484
|
if (nodes == null || typeof nodes === "boolean") return "";
|