@nswds/app 1.102.0 → 1.103.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 +102 -0
- package/dist/index.cjs +946 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +941 -138
- package/dist/index.js.map +1 -1
- package/dist/styles.css +99 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var
|
|
5
|
+
var clsx13 = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
8
|
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
|
@@ -89,7 +89,7 @@ function _interopNamespace(e) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
92
|
-
var
|
|
92
|
+
var clsx13__default = /*#__PURE__*/_interopDefault(clsx13);
|
|
93
93
|
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
|
|
94
94
|
var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
|
|
95
95
|
var Headless4__namespace = /*#__PURE__*/_interopNamespace(Headless4);
|
|
@@ -4054,7 +4054,7 @@ var Icons = {
|
|
|
4054
4054
|
zoom_out_map: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", "data-slot": "icon", viewBox: "0 -960 960 960", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M256-200h64q17 0 28.5 11.5T360-160q0 17-11.5 28.5T320-120H160q-17 0-28.5-11.5T120-160v-160q0-17 11.5-28.5T160-360q17 0 28.5 11.5T200-320v64l96-96q11-11 28-11t28 11q11 11 11 28t-11 28l-96 96Zm448 0-96-96q-11-11-11-28t11-28q11-11 28-11t28 11l96 96v-64q0-17 11.5-28.5T800-360q17 0 28.5 11.5T840-320v160q0 17-11.5 28.5T800-120H640q-17 0-28.5-11.5T600-160q0-17 11.5-28.5T640-200h64ZM200-704v64q0 17-11.5 28.5T160-600q-17 0-28.5-11.5T120-640v-160q0-17 11.5-28.5T160-840h160q17 0 28.5 11.5T360-800q0 17-11.5 28.5T320-760h-64l96 96q11 11 11 28t-11 28q-11 11-28 11t-28-11l-96-96Zm560 0-96 96q-11 11-28 11t-28-11q-11-11-11-28t11-28l96-96h-64q-17 0-28.5-11.5T600-800q0-17 11.5-28.5T640-840h160q17 0 28.5 11.5T840-800v160q0 17-11.5 28.5T800-600q-17 0-28.5-11.5T760-640v-64Z" }) })
|
|
4055
4055
|
};
|
|
4056
4056
|
function cn(...inputs) {
|
|
4057
|
-
return tailwindMerge.twMerge(
|
|
4057
|
+
return tailwindMerge.twMerge(clsx13.clsx(inputs));
|
|
4058
4058
|
}
|
|
4059
4059
|
function truncate(text, maxLength) {
|
|
4060
4060
|
if (text.length <= maxLength) {
|
|
@@ -4553,7 +4553,7 @@ var Button2 = React5.forwardRef(function Button3({ className, variant, color: co
|
|
|
4553
4553
|
{
|
|
4554
4554
|
"data-variant": variant,
|
|
4555
4555
|
...props,
|
|
4556
|
-
className:
|
|
4556
|
+
className: clsx13__default.default(classes, "cursor-pointer"),
|
|
4557
4557
|
ref,
|
|
4558
4558
|
children: /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, { children })
|
|
4559
4559
|
}
|
|
@@ -6012,7 +6012,7 @@ var BadgeButton = React5.forwardRef(function BadgeButton2({
|
|
|
6012
6012
|
children,
|
|
6013
6013
|
...props
|
|
6014
6014
|
}, ref) {
|
|
6015
|
-
const classes =
|
|
6015
|
+
const classes = clsx13__default.default(className, focusOutline[color2], [
|
|
6016
6016
|
// Base
|
|
6017
6017
|
"group relative inline-flex rounded-sm",
|
|
6018
6018
|
// Focus
|
|
@@ -6034,7 +6034,7 @@ var BadgeButton = React5.forwardRef(function BadgeButton2({
|
|
|
6034
6034
|
{
|
|
6035
6035
|
"data-variant": variant,
|
|
6036
6036
|
...props,
|
|
6037
|
-
className:
|
|
6037
|
+
className: clsx13__default.default(classes, "cursor-pointer"),
|
|
6038
6038
|
ref,
|
|
6039
6039
|
children: /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, { children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant, color: color2, size, children }) })
|
|
6040
6040
|
}
|
|
@@ -14676,7 +14676,7 @@ function CodePreview({
|
|
|
14676
14676
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14677
14677
|
"div",
|
|
14678
14678
|
{
|
|
14679
|
-
className:
|
|
14679
|
+
className: clsx13.clsx(
|
|
14680
14680
|
"group mx-auto bg-white bg-gradient-to-r dark:bg-grey-900",
|
|
14681
14681
|
view === "desktop" && "w-full",
|
|
14682
14682
|
view === "tablet" && "max-w-lg",
|
|
@@ -14944,7 +14944,7 @@ function ColorCard({ name, token, hex: hex2, rgb: rgb2, hsl, oklch: oklch2, form
|
|
|
14944
14944
|
{
|
|
14945
14945
|
className: "flex h-24 w-full items-center justify-center",
|
|
14946
14946
|
style: { backgroundColor: hex2 },
|
|
14947
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className:
|
|
14947
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: clsx13.clsx("font-medium", isLightColor(hex2) ? "text-primary-950" : "text-white"), children: name })
|
|
14948
14948
|
}
|
|
14949
14949
|
),
|
|
14950
14950
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -15277,7 +15277,7 @@ function Heading({
|
|
|
15277
15277
|
...props,
|
|
15278
15278
|
id: computedId,
|
|
15279
15279
|
"data-anchor": true,
|
|
15280
|
-
className:
|
|
15280
|
+
className: clsx13__default.default(
|
|
15281
15281
|
className,
|
|
15282
15282
|
trimClasses[trim],
|
|
15283
15283
|
"m-0",
|
|
@@ -16357,6 +16357,877 @@ function ColorPairingTool({
|
|
|
16357
16357
|
const normalizedVisibleFormats = [...new Set(visibleFormats)];
|
|
16358
16358
|
return /* @__PURE__ */ jsxRuntime.jsx(React5.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(ColorPairingToolLoading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(ColorPairingToolContent, { visibleFormats: normalizedVisibleFormats }) });
|
|
16359
16359
|
}
|
|
16360
|
+
function Text({ className, trim = "normal", size = 2, label = false, ...props }) {
|
|
16361
|
+
const textSizeClasses = {
|
|
16362
|
+
1: "text-[length:var(--font-size-1)] leading-[var(--line-height-28)] tracking-[var(--letter-spacing-0)]",
|
|
16363
|
+
2: "text-[length:var(--font-size-2)] leading-[var(--line-height-24)] tracking-[var(--letter-spacing-0)]",
|
|
16364
|
+
3: "text-[length:var(--font-size-3)] leading-[var(--line-height-20)] tracking-[var(--letter-spacing-0)]",
|
|
16365
|
+
4: "text-[length:var(--font-size-4)] leading-[var(--line-height-20)] tracking-[var(--letter-spacing-0)]"
|
|
16366
|
+
};
|
|
16367
|
+
const labelSizeClasses = {
|
|
16368
|
+
1: "text-[length:var(--font-size-1)] leading-[var(--line-height-24)] tracking-[var(--letter-spacing-0)]",
|
|
16369
|
+
2: "text-[length:var(--font-size-2)] leading-[var(--line-height-20)] tracking-[var(--letter-spacing-0)]",
|
|
16370
|
+
3: "text-[length:var(--font-size-3)] leading-[var(--line-height-16)] tracking-[var(--letter-spacing-0)]",
|
|
16371
|
+
4: "text-[length:var(--font-size-4)] leading-[var(--line-height-16)] tracking-[var(--letter-spacing-0)]"
|
|
16372
|
+
};
|
|
16373
|
+
const sizeClass = label ? labelSizeClasses[size] : textSizeClasses[size];
|
|
16374
|
+
const trimClasses = {
|
|
16375
|
+
normal: ["before:content-none after:content-none"],
|
|
16376
|
+
start: [
|
|
16377
|
+
'before:content-[""] before:table after:content-none',
|
|
16378
|
+
"before:mb-[calc(var(--leading-trim-start,var(--default-leading-trim-start))-var(--line-height,calc(1em*var(--default-line-height)))/2)]"
|
|
16379
|
+
],
|
|
16380
|
+
end: [
|
|
16381
|
+
'before:content-none after:content-[""] after:table',
|
|
16382
|
+
"after:mt-[calc(var(--leading-trim-end,var(--default-leading-trim-end))-var(--line-height,calc(1em*var(--default-line-height)))/2)]"
|
|
16383
|
+
],
|
|
16384
|
+
both: [
|
|
16385
|
+
'before:content-[""] before:table after:content-[""] after:table',
|
|
16386
|
+
"before:mb-[calc(var(--leading-trim-start,var(--default-leading-trim-start))-var(--line-height,calc(1em*var(--default-line-height)))/2)]",
|
|
16387
|
+
"after:mt-[calc(var(--leading-trim-end,var(--default-leading-trim-end))-var(--line-height,calc(1em*var(--default-line-height)))/2)]"
|
|
16388
|
+
]
|
|
16389
|
+
};
|
|
16390
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16391
|
+
"p",
|
|
16392
|
+
{
|
|
16393
|
+
"data-slot": "text",
|
|
16394
|
+
...props,
|
|
16395
|
+
className: clsx13__default.default(className, trimClasses[trim], "text-grey-800 dark:text-grey-400", sizeClass)
|
|
16396
|
+
}
|
|
16397
|
+
);
|
|
16398
|
+
}
|
|
16399
|
+
function TextLink({ className, ...props }) {
|
|
16400
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16401
|
+
Link,
|
|
16402
|
+
{
|
|
16403
|
+
...props,
|
|
16404
|
+
className: clsx13__default.default(
|
|
16405
|
+
className,
|
|
16406
|
+
"text-primary-800 underline decoration-primary-800/50 data-hover:decoration-primary-800 dark:text-white dark:decoration-white/50 dark:data-hover:decoration-white"
|
|
16407
|
+
)
|
|
16408
|
+
}
|
|
16409
|
+
);
|
|
16410
|
+
}
|
|
16411
|
+
function Strong({ className, ...props }) {
|
|
16412
|
+
return /* @__PURE__ */ jsxRuntime.jsx("strong", { ...props, className: clsx13__default.default(className, "font-medium text-grey-950 dark:text-white") });
|
|
16413
|
+
}
|
|
16414
|
+
function Code({ className, ...props }) {
|
|
16415
|
+
const hasLanguageClass = typeof className === "string" && className.includes("language-");
|
|
16416
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16417
|
+
"code",
|
|
16418
|
+
{
|
|
16419
|
+
...props,
|
|
16420
|
+
className: clsx13__default.default(
|
|
16421
|
+
className,
|
|
16422
|
+
!hasLanguageClass && "language-plaintext",
|
|
16423
|
+
"text-sm sm:text-[0.8125rem]"
|
|
16424
|
+
)
|
|
16425
|
+
}
|
|
16426
|
+
);
|
|
16427
|
+
}
|
|
16428
|
+
var PREFERRED_BACKGROUND_TONES2 = [400, 600, 200, 800, 100, 50];
|
|
16429
|
+
var DEFAULT_VISIBLE_FORMATS2 = ["hex", "rgb", "hsl", "oklch"];
|
|
16430
|
+
var DEFAULT_INITIAL_BACKGROUND_TOKEN2 = "nsw-blue-800";
|
|
16431
|
+
var DEFAULT_INITIAL_PAIR_ID2 = "nsw-blue-800:nsw-blue-200";
|
|
16432
|
+
function getToneFromToken2(token) {
|
|
16433
|
+
if (!token) return null;
|
|
16434
|
+
const match = token.match(/-(\d+)$/);
|
|
16435
|
+
return match ? Number.parseInt(match[1], 10) : null;
|
|
16436
|
+
}
|
|
16437
|
+
function getFamilySwatchColor2(family, preferredTone = 600) {
|
|
16438
|
+
const exactMatch = family.colors.find((color2) => color2.tone === preferredTone);
|
|
16439
|
+
if (exactMatch) {
|
|
16440
|
+
return exactMatch.hex;
|
|
16441
|
+
}
|
|
16442
|
+
const closestMatch = [...family.colors].sort(
|
|
16443
|
+
(left, right) => Math.abs(left.tone - preferredTone) - Math.abs(right.tone - preferredTone)
|
|
16444
|
+
)[0];
|
|
16445
|
+
return closestMatch?.hex ?? "transparent";
|
|
16446
|
+
}
|
|
16447
|
+
function getFamilySelectorLabel2(family, themeCategory, selectionRole) {
|
|
16448
|
+
if (themeCategory !== "aboriginal") {
|
|
16449
|
+
return family.label;
|
|
16450
|
+
}
|
|
16451
|
+
const preferredTone = selectionRole === "primary colour" ? 800 : 600;
|
|
16452
|
+
return family.colors.find((color2) => color2.tone === preferredTone)?.name ?? family.label;
|
|
16453
|
+
}
|
|
16454
|
+
function getPairingColorDisplayName2(color2) {
|
|
16455
|
+
return color2.name ?? color2.token;
|
|
16456
|
+
}
|
|
16457
|
+
function isWhiteForegroundPair2(pair) {
|
|
16458
|
+
return pair.foreground.token === "white";
|
|
16459
|
+
}
|
|
16460
|
+
function getWhiteForegroundGuidance2(pair) {
|
|
16461
|
+
if (pair.passes.aaaText) {
|
|
16462
|
+
return "White is approved for headings, body copy, and calls to action on this background.";
|
|
16463
|
+
}
|
|
16464
|
+
if (pair.passes.aaaLarge) {
|
|
16465
|
+
return "Use white only for WCAG large text on this background, such as headings at 24px+ or bold text at 18.5px+. Keep sentence-case body copy at 16px+ and use a darker recommended foreground instead.";
|
|
16466
|
+
}
|
|
16467
|
+
return "Do not use white on this background. Choose one of the recommended foregrounds below instead.";
|
|
16468
|
+
}
|
|
16469
|
+
function getPreviewGuidance2(pair, isRecommended) {
|
|
16470
|
+
if (!isWhiteForegroundPair2(pair)) {
|
|
16471
|
+
return "Use only AAA-recommended combinations across your selected primary, accent, and grey families.";
|
|
16472
|
+
}
|
|
16473
|
+
if (isRecommended) {
|
|
16474
|
+
return "Use white text on dark colour only when it meets AAA for headings, body copy, and calls to action.";
|
|
16475
|
+
}
|
|
16476
|
+
return getWhiteForegroundGuidance2(pair);
|
|
16477
|
+
}
|
|
16478
|
+
function getReadableTextColor(tone) {
|
|
16479
|
+
return tone >= 600 ? "#ffffff" : "#002664";
|
|
16480
|
+
}
|
|
16481
|
+
function getPreferredPairForBackground2(pairs, preferredPairId) {
|
|
16482
|
+
if (preferredPairId) {
|
|
16483
|
+
const preferredPair = pairs.find((pair) => pair.id === preferredPairId);
|
|
16484
|
+
if (preferredPair) {
|
|
16485
|
+
return preferredPair;
|
|
16486
|
+
}
|
|
16487
|
+
}
|
|
16488
|
+
return pairs.find((pair) => !isWhiteForegroundPair2(pair)) ?? pairs[0] ?? null;
|
|
16489
|
+
}
|
|
16490
|
+
function getDefaultBackgroundToken2(context) {
|
|
16491
|
+
for (const tone of PREFERRED_BACKGROUND_TONES2) {
|
|
16492
|
+
for (const group of context.backgroundGroups) {
|
|
16493
|
+
const match = group.backgrounds.find(
|
|
16494
|
+
(background) => background.tone === tone && (context.pairsByBackground[background.token]?.length ?? 0) > 0
|
|
16495
|
+
);
|
|
16496
|
+
if (match) {
|
|
16497
|
+
return match.token;
|
|
16498
|
+
}
|
|
16499
|
+
}
|
|
16500
|
+
}
|
|
16501
|
+
for (const tone of PREFERRED_BACKGROUND_TONES2) {
|
|
16502
|
+
for (const group of context.backgroundGroups) {
|
|
16503
|
+
const match = group.backgrounds.find((background) => background.tone === tone);
|
|
16504
|
+
if (match) {
|
|
16505
|
+
return match.token;
|
|
16506
|
+
}
|
|
16507
|
+
}
|
|
16508
|
+
}
|
|
16509
|
+
return context.backgrounds[0]?.token ?? "";
|
|
16510
|
+
}
|
|
16511
|
+
function resolveBackgroundToken2(context, preferredToken, preferredTone) {
|
|
16512
|
+
if (preferredToken && context.backgrounds.some((background) => background.token === preferredToken)) {
|
|
16513
|
+
return preferredToken;
|
|
16514
|
+
}
|
|
16515
|
+
if (preferredTone !== null && preferredTone !== void 0) {
|
|
16516
|
+
for (const group of context.backgroundGroups) {
|
|
16517
|
+
const match = group.backgrounds.find((background) => background.tone === preferredTone);
|
|
16518
|
+
if (match) {
|
|
16519
|
+
return match.token;
|
|
16520
|
+
}
|
|
16521
|
+
}
|
|
16522
|
+
}
|
|
16523
|
+
return getDefaultBackgroundToken2(context);
|
|
16524
|
+
}
|
|
16525
|
+
function getInitialPairingState2(searchParams) {
|
|
16526
|
+
const paletteParam = searchParams.get("palette");
|
|
16527
|
+
const primaryParam = searchParams.get("primary");
|
|
16528
|
+
const accentParam = searchParams.get("accent");
|
|
16529
|
+
const pairParam = searchParams.get("pair");
|
|
16530
|
+
const backgroundParam = searchParams.get("background");
|
|
16531
|
+
const themeCategory = paletteParam === "brand" || paletteParam === "aboriginal" ? paletteParam : "brand";
|
|
16532
|
+
const context = getPairingContext(themeCategory, primaryParam, accentParam);
|
|
16533
|
+
const shouldUseDefaultBrandExample = !backgroundParam && !pairParam && themeCategory === "brand" && context.primary.key === "blue" && context.accent.key === "red";
|
|
16534
|
+
const defaultBackgroundToken = shouldUseDefaultBrandExample ? context.backgrounds.some(
|
|
16535
|
+
(background) => background.token === DEFAULT_INITIAL_BACKGROUND_TOKEN2
|
|
16536
|
+
) ? DEFAULT_INITIAL_BACKGROUND_TOKEN2 : null : null;
|
|
16537
|
+
const defaultPairId = shouldUseDefaultBrandExample && defaultBackgroundToken && context.pairsByBackground[defaultBackgroundToken]?.some(
|
|
16538
|
+
(pair) => pair.id === DEFAULT_INITIAL_PAIR_ID2
|
|
16539
|
+
) ? DEFAULT_INITIAL_PAIR_ID2 : null;
|
|
16540
|
+
const pairBackgroundToken = context.recommendedPairs.find((pair) => pair.id === pairParam)?.background.token ?? null;
|
|
16541
|
+
const selectedBackgroundToken = resolveBackgroundToken2(
|
|
16542
|
+
context,
|
|
16543
|
+
backgroundParam ?? pairBackgroundToken ?? defaultBackgroundToken,
|
|
16544
|
+
getToneFromToken2(backgroundParam ?? pairBackgroundToken ?? defaultBackgroundToken)
|
|
16545
|
+
);
|
|
16546
|
+
const selectedPairId = getPreferredPairForBackground2(
|
|
16547
|
+
context.pairsByBackground[selectedBackgroundToken] ?? [],
|
|
16548
|
+
pairParam ?? defaultPairId
|
|
16549
|
+
)?.id ?? "";
|
|
16550
|
+
return {
|
|
16551
|
+
accentKey: context.accent.key,
|
|
16552
|
+
primaryKey: context.primary.key,
|
|
16553
|
+
selectedBackgroundToken,
|
|
16554
|
+
selectedPairId,
|
|
16555
|
+
themeCategory
|
|
16556
|
+
};
|
|
16557
|
+
}
|
|
16558
|
+
function ColorPairingToolV2Loading() {
|
|
16559
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-8 lg:grid-cols-[18rem_minmax(0,1fr)]", children: [
|
|
16560
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 bg-grey-50/70 p-6", children: [
|
|
16561
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 rounded-sm bg-grey-100" }),
|
|
16562
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-40 rounded-sm bg-grey-100" }),
|
|
16563
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-52 rounded-sm bg-grey-100" })
|
|
16564
|
+
] }),
|
|
16565
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
16566
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 rounded-sm bg-grey-100" }),
|
|
16567
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-64 rounded-sm bg-grey-100" }),
|
|
16568
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-40 rounded-sm bg-grey-100" }),
|
|
16569
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4 md:grid-cols-2 xl:grid-cols-3", children: [
|
|
16570
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-44 rounded-sm bg-grey-100" }),
|
|
16571
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-44 rounded-sm bg-grey-100" }),
|
|
16572
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-44 rounded-sm bg-grey-100" })
|
|
16573
|
+
] })
|
|
16574
|
+
] })
|
|
16575
|
+
] });
|
|
16576
|
+
}
|
|
16577
|
+
function SidebarStep({
|
|
16578
|
+
children,
|
|
16579
|
+
description,
|
|
16580
|
+
step,
|
|
16581
|
+
title
|
|
16582
|
+
}) {
|
|
16583
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-4", children: [
|
|
16584
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
16585
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[0.72rem] font-semibold tracking-[0.12em] text-muted-foreground uppercase", children: [
|
|
16586
|
+
"Step ",
|
|
16587
|
+
step
|
|
16588
|
+
] }),
|
|
16589
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 3, size: 6, className: "text-foreground", trim: "normal", children: title }),
|
|
16590
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm/6 text-muted-foreground", children: description }) : null
|
|
16591
|
+
] }),
|
|
16592
|
+
children
|
|
16593
|
+
] });
|
|
16594
|
+
}
|
|
16595
|
+
function PreviewHeroCard({
|
|
16596
|
+
familySummary,
|
|
16597
|
+
isRecommended,
|
|
16598
|
+
pair
|
|
16599
|
+
}) {
|
|
16600
|
+
const whiteForeground = isWhiteForegroundPair2(pair);
|
|
16601
|
+
const statusLabel = isRecommended ? "Pass" : pair.passes.aaaLarge ? "Large text only" : "Example only";
|
|
16602
|
+
const StatusIcon = isRecommended ? Icons.check : Icons.info;
|
|
16603
|
+
const fauxButtonStyle = {
|
|
16604
|
+
"--btn-bg": pair.foreground.hex,
|
|
16605
|
+
"--btn-border": pair.foreground.hex,
|
|
16606
|
+
"--btn-text": pair.background.hex,
|
|
16607
|
+
"--btn-icon": pair.background.hex,
|
|
16608
|
+
"--btn-hover-overlay": pair.background.hex
|
|
16609
|
+
};
|
|
16610
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16611
|
+
"div",
|
|
16612
|
+
{
|
|
16613
|
+
className: "p-6 sm:min-h-[26rem] sm:p-8",
|
|
16614
|
+
style: {
|
|
16615
|
+
backgroundColor: pair.background.hex,
|
|
16616
|
+
color: pair.foreground.hex
|
|
16617
|
+
},
|
|
16618
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-[22rem] flex-col justify-between gap-8", children: [
|
|
16619
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
16620
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16621
|
+
"span",
|
|
16622
|
+
{
|
|
16623
|
+
className: "inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[0.72rem] font-semibold tracking-[0.16em] uppercase",
|
|
16624
|
+
style: {
|
|
16625
|
+
borderColor: pair.foreground.hex,
|
|
16626
|
+
backgroundColor: pair.foreground.hex,
|
|
16627
|
+
color: pair.background.hex
|
|
16628
|
+
},
|
|
16629
|
+
children: [
|
|
16630
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.palette, { "data-slot": "icon", className: "size-4" }),
|
|
16631
|
+
familySummary
|
|
16632
|
+
]
|
|
16633
|
+
}
|
|
16634
|
+
),
|
|
16635
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16636
|
+
"span",
|
|
16637
|
+
{
|
|
16638
|
+
className: "inline-flex rounded-full border px-3 py-1 text-[0.72rem] font-semibold tracking-[0.16em] uppercase",
|
|
16639
|
+
style: {
|
|
16640
|
+
borderColor: pair.foreground.hex
|
|
16641
|
+
},
|
|
16642
|
+
children: [
|
|
16643
|
+
pair.rating,
|
|
16644
|
+
" ",
|
|
16645
|
+
pair.contrastRatio.toFixed(2),
|
|
16646
|
+
":1"
|
|
16647
|
+
]
|
|
16648
|
+
}
|
|
16649
|
+
)
|
|
16650
|
+
] }),
|
|
16651
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-xl space-y-4 pb-12 sm:pb-16", children: [
|
|
16652
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: whiteForeground && !isRecommended ? "White on colour example" : whiteForeground ? "White on colour" : "Colour on colour" }),
|
|
16653
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
16654
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "max-w-lg text-4xl leading-none font-bold text-current sm:text-5xl", children: "Pair colour with confidence." }),
|
|
16655
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-base/6 sm:text-base/7", children: getPreviewGuidance2(pair, isRecommended) }),
|
|
16656
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16657
|
+
"span",
|
|
16658
|
+
{
|
|
16659
|
+
"aria-hidden": "true",
|
|
16660
|
+
"data-variant": "solid",
|
|
16661
|
+
className: cn(
|
|
16662
|
+
buttonVariants({ variant: "solid", size: "default" }),
|
|
16663
|
+
"pointer-events-none cursor-default px-6 text-[16px] font-[700] select-none sm:px-6 sm:text-[16px] sm:font-[700]"
|
|
16664
|
+
),
|
|
16665
|
+
style: fauxButtonStyle,
|
|
16666
|
+
children: "Get started"
|
|
16667
|
+
}
|
|
16668
|
+
)
|
|
16669
|
+
] })
|
|
16670
|
+
] }),
|
|
16671
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
16672
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16673
|
+
"span",
|
|
16674
|
+
{
|
|
16675
|
+
className: "inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-semibold",
|
|
16676
|
+
style: {
|
|
16677
|
+
backgroundColor: pair.foreground.hex,
|
|
16678
|
+
color: pair.background.hex
|
|
16679
|
+
},
|
|
16680
|
+
children: [
|
|
16681
|
+
statusLabel,
|
|
16682
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { "data-slot": "icon", className: "size-4" })
|
|
16683
|
+
]
|
|
16684
|
+
}
|
|
16685
|
+
),
|
|
16686
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16687
|
+
"span",
|
|
16688
|
+
{
|
|
16689
|
+
className: "inline-flex rounded-full border px-4 py-2 text-sm",
|
|
16690
|
+
style: {
|
|
16691
|
+
borderColor: pair.foreground.hex
|
|
16692
|
+
},
|
|
16693
|
+
children: [
|
|
16694
|
+
pair.background.token,
|
|
16695
|
+
" / ",
|
|
16696
|
+
pair.foreground.token
|
|
16697
|
+
]
|
|
16698
|
+
}
|
|
16699
|
+
)
|
|
16700
|
+
] })
|
|
16701
|
+
] })
|
|
16702
|
+
}
|
|
16703
|
+
) });
|
|
16704
|
+
}
|
|
16705
|
+
function PreviewFallbackCard2({ background }) {
|
|
16706
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16707
|
+
"div",
|
|
16708
|
+
{
|
|
16709
|
+
className: "space-y-6 px-6 py-7 sm:px-8 sm:py-8",
|
|
16710
|
+
style: {
|
|
16711
|
+
backgroundColor: background.hex,
|
|
16712
|
+
color: getReadableTextColor(background.tone)
|
|
16713
|
+
},
|
|
16714
|
+
children: [
|
|
16715
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold", children: "Hero preview" }),
|
|
16716
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-xl space-y-4", children: [
|
|
16717
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "max-w-lg text-3xl leading-tight font-bold sm:text-4xl", children: "No AAA combination available." }),
|
|
16718
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-lg text-base/7", children: "This background tone is approved, but there are no recommended AAA foreground pairings available for it in the current tool." })
|
|
16719
|
+
] })
|
|
16720
|
+
]
|
|
16721
|
+
}
|
|
16722
|
+
) });
|
|
16723
|
+
}
|
|
16724
|
+
function PairDetailCard2({
|
|
16725
|
+
color: color2,
|
|
16726
|
+
role,
|
|
16727
|
+
visibleFormats
|
|
16728
|
+
}) {
|
|
16729
|
+
const [, copyToClipboardRaw] = usehooks.useCopyToClipboard();
|
|
16730
|
+
const [copiedField, setCopiedField] = React5.useState(null);
|
|
16731
|
+
const copiedFieldTimeoutRef = React5.useRef(null);
|
|
16732
|
+
const hasDisplayTone = color2.token !== "white";
|
|
16733
|
+
const formatRows = visibleFormats.map((format) => ({
|
|
16734
|
+
key: format,
|
|
16735
|
+
label: format.toUpperCase(),
|
|
16736
|
+
value: color2[format],
|
|
16737
|
+
mono: true,
|
|
16738
|
+
copyable: true
|
|
16739
|
+
}));
|
|
16740
|
+
const valueRows = [
|
|
16741
|
+
{ key: "token", label: "Token", value: color2.token, mono: true, copyable: true },
|
|
16742
|
+
{
|
|
16743
|
+
key: "tone",
|
|
16744
|
+
label: "Tone",
|
|
16745
|
+
value: hasDisplayTone ? String(color2.tone) : "Not applicable",
|
|
16746
|
+
mono: false,
|
|
16747
|
+
copyable: hasDisplayTone
|
|
16748
|
+
},
|
|
16749
|
+
...formatRows
|
|
16750
|
+
];
|
|
16751
|
+
React5.useEffect(() => {
|
|
16752
|
+
return () => {
|
|
16753
|
+
if (copiedFieldTimeoutRef.current) {
|
|
16754
|
+
clearTimeout(copiedFieldTimeoutRef.current);
|
|
16755
|
+
}
|
|
16756
|
+
};
|
|
16757
|
+
}, []);
|
|
16758
|
+
const copyField = (field) => {
|
|
16759
|
+
if (field === "tone" && !hasDisplayTone) {
|
|
16760
|
+
return;
|
|
16761
|
+
}
|
|
16762
|
+
const fieldValue = valueRows.find((row) => row.key === field)?.value;
|
|
16763
|
+
if (!fieldValue) return;
|
|
16764
|
+
copyToClipboardRaw(fieldValue);
|
|
16765
|
+
setCopiedField(field);
|
|
16766
|
+
const toastLabel = valueRows.find((row) => row.key === field)?.label ?? "Value";
|
|
16767
|
+
sonner.toast(`${toastLabel} copied to clipboard`, {
|
|
16768
|
+
duration: 2e3
|
|
16769
|
+
});
|
|
16770
|
+
if (copiedFieldTimeoutRef.current) {
|
|
16771
|
+
clearTimeout(copiedFieldTimeoutRef.current);
|
|
16772
|
+
}
|
|
16773
|
+
copiedFieldTimeoutRef.current = setTimeout(() => {
|
|
16774
|
+
setCopiedField(null);
|
|
16775
|
+
copiedFieldTimeoutRef.current = null;
|
|
16776
|
+
}, 2e3);
|
|
16777
|
+
};
|
|
16778
|
+
const renderCopyButton = (field, srLabel, className) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16779
|
+
Button2,
|
|
16780
|
+
{
|
|
16781
|
+
variant: "ghost",
|
|
16782
|
+
size: "icon",
|
|
16783
|
+
className: cn("shrink-0", className),
|
|
16784
|
+
onClick: () => copyField(field),
|
|
16785
|
+
children: [
|
|
16786
|
+
copiedField === field ? /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { "data-slot": "icon", className: "size-5" }) : /* @__PURE__ */ jsxRuntime.jsx(Icons.content_copy, { "data-slot": "icon", className: "size-5" }),
|
|
16787
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: srLabel })
|
|
16788
|
+
]
|
|
16789
|
+
}
|
|
16790
|
+
);
|
|
16791
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "gap-0 pb-0", children: [
|
|
16792
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-4 border-b", children: [
|
|
16793
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
16794
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: role }),
|
|
16795
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: color2.name ?? color2.token })
|
|
16796
|
+
] }),
|
|
16797
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16798
|
+
"div",
|
|
16799
|
+
{
|
|
16800
|
+
className: "h-14 w-full rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
|
|
16801
|
+
style: { backgroundColor: color2.hex }
|
|
16802
|
+
}
|
|
16803
|
+
)
|
|
16804
|
+
] }),
|
|
16805
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "px-0 pb-3", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-grey-100 dark:divide-grey-800", children: valueRows.map((row) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4 px-6 py-3", children: [
|
|
16806
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
16807
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: row.label }),
|
|
16808
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16809
|
+
"p",
|
|
16810
|
+
{
|
|
16811
|
+
className: cn(
|
|
16812
|
+
"mt-2 min-w-0 text-base text-foreground",
|
|
16813
|
+
row.mono && "font-mono text-sm break-all sm:text-base"
|
|
16814
|
+
),
|
|
16815
|
+
children: row.value
|
|
16816
|
+
}
|
|
16817
|
+
)
|
|
16818
|
+
] }),
|
|
16819
|
+
row.copyable ? renderCopyButton(
|
|
16820
|
+
row.key,
|
|
16821
|
+
`Copy ${role.toLowerCase()} ${row.label.toLowerCase()}`,
|
|
16822
|
+
"mt-0.5"
|
|
16823
|
+
) : null
|
|
16824
|
+
] }, row.key)) }) })
|
|
16825
|
+
] });
|
|
16826
|
+
}
|
|
16827
|
+
function AccessibilityScoreCard({ pair }) {
|
|
16828
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "gap-0 py-0", children: [
|
|
16829
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5 px-6 py-6 sm:flex-row sm:items-end sm:justify-between", children: [
|
|
16830
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
16831
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground", children: "Accessibility score" }),
|
|
16832
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
16833
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-5xl leading-none font-bold text-foreground", children: pair ? `${pair.contrastRatio.toFixed(2)}:1` : "N/A" }),
|
|
16834
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-muted-foreground", children: "Contrast ratio" })
|
|
16835
|
+
] })
|
|
16836
|
+
] }),
|
|
16837
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16838
|
+
"span",
|
|
16839
|
+
{
|
|
16840
|
+
className: cn(
|
|
16841
|
+
"inline-flex items-center gap-2 rounded-full px-4 py-2 text-base font-semibold",
|
|
16842
|
+
pair ? "bg-success-700 text-white" : "border border-grey-300 bg-background text-foreground"
|
|
16843
|
+
),
|
|
16844
|
+
children: pair ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16845
|
+
"Pass AAA",
|
|
16846
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.check, { "data-slot": "icon", className: "size-5" })
|
|
16847
|
+
] }) : "No AAA result"
|
|
16848
|
+
}
|
|
16849
|
+
)
|
|
16850
|
+
] }),
|
|
16851
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-grey-200 px-6 py-4 dark:border-grey-700", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: pair ? "Meets WCAG 2.1 AAA standards for large and normal text." : "Choose a different approved background tone to review recommended AAA pairings." }) })
|
|
16852
|
+
] });
|
|
16853
|
+
}
|
|
16854
|
+
function RecommendedPairCard({
|
|
16855
|
+
isSelected,
|
|
16856
|
+
onSelect,
|
|
16857
|
+
pair
|
|
16858
|
+
}) {
|
|
16859
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16860
|
+
"button",
|
|
16861
|
+
{
|
|
16862
|
+
type: "button",
|
|
16863
|
+
"aria-label": `Use ${getPairingColorDisplayName2(pair.foreground)} on ${getPairingColorDisplayName2(pair.background)}`,
|
|
16864
|
+
"aria-pressed": isSelected,
|
|
16865
|
+
onClick: onSelect,
|
|
16866
|
+
className: cn(
|
|
16867
|
+
"overflow-hidden rounded-sm border bg-background text-left transition-colors",
|
|
16868
|
+
isSelected ? "border-primary-700 ring-2 ring-primary-700 ring-offset-2 ring-offset-background" : "border-grey-200 hover:border-grey-400 dark:border-grey-700 dark:hover:border-grey-500"
|
|
16869
|
+
),
|
|
16870
|
+
children: [
|
|
16871
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16872
|
+
"div",
|
|
16873
|
+
{
|
|
16874
|
+
className: "min-h-32 space-y-3 px-4 py-4",
|
|
16875
|
+
style: {
|
|
16876
|
+
backgroundColor: pair.background.hex,
|
|
16877
|
+
color: pair.foreground.hex
|
|
16878
|
+
},
|
|
16879
|
+
children: [
|
|
16880
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[0.68rem] font-semibold tracking-[0.12em] uppercase opacity-90", children: [
|
|
16881
|
+
pair.background.token,
|
|
16882
|
+
" / ",
|
|
16883
|
+
pair.foreground.token
|
|
16884
|
+
] }),
|
|
16885
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
16886
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-2xl leading-tight font-bold", children: getPairingColorDisplayName2(pair.foreground) }),
|
|
16887
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm/6 opacity-90", children: [
|
|
16888
|
+
pair.foreground.familyLabel,
|
|
16889
|
+
" on ",
|
|
16890
|
+
pair.background.familyLabel
|
|
16891
|
+
] })
|
|
16892
|
+
] })
|
|
16893
|
+
]
|
|
16894
|
+
}
|
|
16895
|
+
),
|
|
16896
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 px-4 py-3", children: [
|
|
16897
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-semibold text-foreground", children: [
|
|
16898
|
+
pair.contrastRatio.toFixed(2),
|
|
16899
|
+
":1"
|
|
16900
|
+
] }),
|
|
16901
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center gap-1 rounded-full bg-success-50 px-2.5 py-1 text-xs font-semibold text-success-800 dark:bg-success-950/30 dark:text-success-200", children: "AAA" })
|
|
16902
|
+
] })
|
|
16903
|
+
]
|
|
16904
|
+
}
|
|
16905
|
+
);
|
|
16906
|
+
}
|
|
16907
|
+
function ColorPairingToolV2Content({ visibleFormats }) {
|
|
16908
|
+
const searchParams = navigation.useSearchParams();
|
|
16909
|
+
const [initialState] = React5.useState(() => getInitialPairingState2(searchParams));
|
|
16910
|
+
const [themeCategory, setThemeCategory] = React5.useState(initialState.themeCategory);
|
|
16911
|
+
const [primaryFamilyKey, setPrimaryFamilyKey] = React5.useState(initialState.primaryKey);
|
|
16912
|
+
const [accentFamilyKey, setAccentFamilyKey] = React5.useState(initialState.accentKey);
|
|
16913
|
+
const [selectedBackgroundToken, setSelectedBackgroundToken] = React5.useState(
|
|
16914
|
+
initialState.selectedBackgroundToken
|
|
16915
|
+
);
|
|
16916
|
+
const [selectedPairId, setSelectedPairId] = React5.useState(initialState.selectedPairId);
|
|
16917
|
+
const themeFamilies = getPairingFamilies(themeCategory);
|
|
16918
|
+
const context = getPairingContext(themeCategory, primaryFamilyKey, accentFamilyKey);
|
|
16919
|
+
const selectableFamilies = themeFamilies.filter((family) => family.key !== context.grey.key);
|
|
16920
|
+
const selectableAccentFamilies = selectableFamilies.filter(
|
|
16921
|
+
(family) => family.key !== context.primary.key
|
|
16922
|
+
);
|
|
16923
|
+
const selectedBackground = context.backgrounds.find((background) => background.token === selectedBackgroundToken) ?? context.backgrounds[0] ?? null;
|
|
16924
|
+
const selectedBackgroundPairs = selectedBackground ? context.pairsByBackground[selectedBackground.token] ?? [] : [];
|
|
16925
|
+
const selectedPair = getPreferredPairForBackground2(selectedBackgroundPairs, selectedPairId);
|
|
16926
|
+
const detailForeground = selectedPair?.foreground ?? null;
|
|
16927
|
+
const familySummary = [context.primary.label, context.accent.label, context.grey.label].join(
|
|
16928
|
+
" + "
|
|
16929
|
+
);
|
|
16930
|
+
const updateUrlParams = (nextThemeCategory, nextPrimaryKey, nextAccentKey, nextSelectedBackgroundToken, nextSelectedPairId) => {
|
|
16931
|
+
const params = new URLSearchParams(window.location.search);
|
|
16932
|
+
params.delete("family");
|
|
16933
|
+
params.set("palette", nextThemeCategory);
|
|
16934
|
+
params.set("primary", nextPrimaryKey);
|
|
16935
|
+
params.set("accent", nextAccentKey);
|
|
16936
|
+
params.set("background", nextSelectedBackgroundToken);
|
|
16937
|
+
if (nextSelectedPairId) {
|
|
16938
|
+
params.set("pair", nextSelectedPairId);
|
|
16939
|
+
} else {
|
|
16940
|
+
params.delete("pair");
|
|
16941
|
+
}
|
|
16942
|
+
window.history.replaceState(
|
|
16943
|
+
null,
|
|
16944
|
+
"",
|
|
16945
|
+
`${window.location.pathname}?${params.toString()}${window.location.hash}`
|
|
16946
|
+
);
|
|
16947
|
+
};
|
|
16948
|
+
const syncSelection = (nextThemeCategory, nextPrimaryKey, nextAccentKey, preferredBackgroundToken, preferredPairId) => {
|
|
16949
|
+
const nextContext = getPairingContext(nextThemeCategory, nextPrimaryKey, nextAccentKey);
|
|
16950
|
+
const nextSelectedBackgroundToken = resolveBackgroundToken2(
|
|
16951
|
+
nextContext,
|
|
16952
|
+
preferredBackgroundToken,
|
|
16953
|
+
getToneFromToken2(preferredBackgroundToken)
|
|
16954
|
+
);
|
|
16955
|
+
const nextSelectedPairId = getPreferredPairForBackground2(
|
|
16956
|
+
nextContext.pairsByBackground[nextSelectedBackgroundToken] ?? [],
|
|
16957
|
+
preferredPairId
|
|
16958
|
+
)?.id ?? "";
|
|
16959
|
+
setThemeCategory(nextThemeCategory);
|
|
16960
|
+
setPrimaryFamilyKey(nextContext.primary.key);
|
|
16961
|
+
setAccentFamilyKey(nextContext.accent.key);
|
|
16962
|
+
setSelectedBackgroundToken(nextSelectedBackgroundToken);
|
|
16963
|
+
setSelectedPairId(nextSelectedPairId);
|
|
16964
|
+
updateUrlParams(
|
|
16965
|
+
nextThemeCategory,
|
|
16966
|
+
nextContext.primary.key,
|
|
16967
|
+
nextContext.accent.key,
|
|
16968
|
+
nextSelectedBackgroundToken,
|
|
16969
|
+
nextSelectedPairId
|
|
16970
|
+
);
|
|
16971
|
+
};
|
|
16972
|
+
const handleThemeCategoryChange = (nextThemeCategory) => {
|
|
16973
|
+
syncSelection(
|
|
16974
|
+
nextThemeCategory,
|
|
16975
|
+
primaryFamilyKey,
|
|
16976
|
+
accentFamilyKey,
|
|
16977
|
+
selectedBackgroundToken,
|
|
16978
|
+
selectedPairId
|
|
16979
|
+
);
|
|
16980
|
+
};
|
|
16981
|
+
const handlePrimaryColorChange = (nextPrimaryKey) => {
|
|
16982
|
+
const nextAccentKey = nextPrimaryKey === accentFamilyKey ? getDefaultAccentFamilyKey(themeCategory, nextPrimaryKey) : accentFamilyKey;
|
|
16983
|
+
syncSelection(
|
|
16984
|
+
themeCategory,
|
|
16985
|
+
nextPrimaryKey,
|
|
16986
|
+
nextAccentKey,
|
|
16987
|
+
selectedBackgroundToken,
|
|
16988
|
+
selectedPairId
|
|
16989
|
+
);
|
|
16990
|
+
};
|
|
16991
|
+
const handleAccentColorChange = (nextAccentKey) => {
|
|
16992
|
+
if (nextAccentKey === primaryFamilyKey) return;
|
|
16993
|
+
syncSelection(
|
|
16994
|
+
themeCategory,
|
|
16995
|
+
primaryFamilyKey,
|
|
16996
|
+
nextAccentKey,
|
|
16997
|
+
selectedBackgroundToken,
|
|
16998
|
+
selectedPairId
|
|
16999
|
+
);
|
|
17000
|
+
};
|
|
17001
|
+
const handleBackgroundChange = (nextSelectedBackgroundToken) => {
|
|
17002
|
+
const nextSelectedPairId = getPreferredPairForBackground2(
|
|
17003
|
+
context.pairsByBackground[nextSelectedBackgroundToken] ?? [],
|
|
17004
|
+
selectedPairId
|
|
17005
|
+
)?.id ?? "";
|
|
17006
|
+
setSelectedBackgroundToken(nextSelectedBackgroundToken);
|
|
17007
|
+
setSelectedPairId(nextSelectedPairId);
|
|
17008
|
+
updateUrlParams(
|
|
17009
|
+
themeCategory,
|
|
17010
|
+
context.primary.key,
|
|
17011
|
+
context.accent.key,
|
|
17012
|
+
nextSelectedBackgroundToken,
|
|
17013
|
+
nextSelectedPairId
|
|
17014
|
+
);
|
|
17015
|
+
};
|
|
17016
|
+
const handlePairChange = (nextSelectedPairId) => {
|
|
17017
|
+
if (!selectedBackground) return;
|
|
17018
|
+
setSelectedPairId(nextSelectedPairId);
|
|
17019
|
+
updateUrlParams(
|
|
17020
|
+
themeCategory,
|
|
17021
|
+
context.primary.key,
|
|
17022
|
+
context.accent.key,
|
|
17023
|
+
selectedBackground.token,
|
|
17024
|
+
nextSelectedPairId
|
|
17025
|
+
);
|
|
17026
|
+
};
|
|
17027
|
+
if (!selectedBackground) {
|
|
17028
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6", children: [
|
|
17029
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 3, size: 5, className: "text-foreground", trim: "normal", children: "No approved background tones available" }),
|
|
17030
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-muted-foreground", children: "No approved tones are available for the current palette." })
|
|
17031
|
+
] }) });
|
|
17032
|
+
}
|
|
17033
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-8 lg:grid-cols-[18rem_minmax(0,1fr)]", children: [
|
|
17034
|
+
/* @__PURE__ */ jsxRuntime.jsx("aside", { className: "bg-grey-50/60 p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-8", children: [
|
|
17035
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
17036
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 3, size: 5, className: "text-foreground", trim: "normal", children: "Configuration" }),
|
|
17037
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { size: 2, children: "Choose a palette, set your primary and accent families, then select an approved background." })
|
|
17038
|
+
] }),
|
|
17039
|
+
/* @__PURE__ */ jsxRuntime.jsx(SidebarStep, { step: 1, title: "Select your palette", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-2", children: ["brand", "aboriginal"].map((palette) => {
|
|
17040
|
+
const isSelected = themeCategory === palette;
|
|
17041
|
+
const label = palette === "brand" ? "Brand palette" : "Aboriginal palette";
|
|
17042
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17043
|
+
"button",
|
|
17044
|
+
{
|
|
17045
|
+
type: "button",
|
|
17046
|
+
"aria-label": `Select ${label}`,
|
|
17047
|
+
"aria-pressed": isSelected,
|
|
17048
|
+
onClick: () => handleThemeCategoryChange(palette),
|
|
17049
|
+
className: cn(
|
|
17050
|
+
"rounded-sm border px-3 py-2.5 text-left text-sm font-semibold transition-colors",
|
|
17051
|
+
isSelected ? "border-primary-800 bg-primary-800 text-white" : "border-grey-300 bg-background text-foreground hover:border-primary-800 hover:bg-primary-50"
|
|
17052
|
+
),
|
|
17053
|
+
children: label
|
|
17054
|
+
},
|
|
17055
|
+
palette
|
|
17056
|
+
);
|
|
17057
|
+
}) }) }),
|
|
17058
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17059
|
+
SidebarStep,
|
|
17060
|
+
{
|
|
17061
|
+
step: 2,
|
|
17062
|
+
title: "Choose your colours",
|
|
17063
|
+
description: "Grey is added automatically from the selected palette.",
|
|
17064
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
17065
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
17066
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground", children: "Primary colour" }),
|
|
17067
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-2", children: selectableFamilies.map((family) => {
|
|
17068
|
+
const swatchTone = 800;
|
|
17069
|
+
const isSelected = family.key === context.primary.key;
|
|
17070
|
+
const label = getFamilySelectorLabel2(family, themeCategory, "primary colour");
|
|
17071
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17072
|
+
"button",
|
|
17073
|
+
{
|
|
17074
|
+
type: "button",
|
|
17075
|
+
"aria-label": `Select ${label} as primary colour`,
|
|
17076
|
+
"aria-pressed": isSelected,
|
|
17077
|
+
onClick: () => handlePrimaryColorChange(family.key),
|
|
17078
|
+
className: cn(
|
|
17079
|
+
"min-h-11 rounded-sm border px-2 py-2 text-center text-[0.8rem] leading-5 font-semibold transition-transform",
|
|
17080
|
+
isSelected ? "ring-2 ring-primary-700 ring-offset-2 ring-offset-grey-50/60" : "hover:-translate-y-px"
|
|
17081
|
+
),
|
|
17082
|
+
style: {
|
|
17083
|
+
backgroundColor: getFamilySwatchColor2(family, swatchTone),
|
|
17084
|
+
color: getReadableTextColor(swatchTone),
|
|
17085
|
+
borderColor: "rgba(0, 0, 0, 0.12)"
|
|
17086
|
+
},
|
|
17087
|
+
title: label,
|
|
17088
|
+
children: label
|
|
17089
|
+
},
|
|
17090
|
+
family.key
|
|
17091
|
+
);
|
|
17092
|
+
}) })
|
|
17093
|
+
] }),
|
|
17094
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
17095
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground", children: "Accent colour" }),
|
|
17096
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-2", children: selectableAccentFamilies.map((family) => {
|
|
17097
|
+
const swatchTone = 600;
|
|
17098
|
+
const isSelected = family.key === context.accent.key;
|
|
17099
|
+
const label = getFamilySelectorLabel2(family, themeCategory, "accent colour");
|
|
17100
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17101
|
+
"button",
|
|
17102
|
+
{
|
|
17103
|
+
type: "button",
|
|
17104
|
+
"aria-label": `Select ${label} as accent colour`,
|
|
17105
|
+
"aria-pressed": isSelected,
|
|
17106
|
+
onClick: () => handleAccentColorChange(family.key),
|
|
17107
|
+
className: cn(
|
|
17108
|
+
"min-h-11 rounded-sm border px-2 py-2 text-center text-[0.8rem] leading-5 font-semibold transition-transform",
|
|
17109
|
+
isSelected ? "ring-2 ring-primary-700 ring-offset-2 ring-offset-grey-50/60" : "hover:-translate-y-px"
|
|
17110
|
+
),
|
|
17111
|
+
style: {
|
|
17112
|
+
backgroundColor: getFamilySwatchColor2(family, swatchTone),
|
|
17113
|
+
color: getReadableTextColor(swatchTone),
|
|
17114
|
+
borderColor: "rgba(0, 0, 0, 0.12)"
|
|
17115
|
+
},
|
|
17116
|
+
title: label,
|
|
17117
|
+
children: label
|
|
17118
|
+
},
|
|
17119
|
+
family.key
|
|
17120
|
+
);
|
|
17121
|
+
}) })
|
|
17122
|
+
] })
|
|
17123
|
+
] })
|
|
17124
|
+
}
|
|
17125
|
+
),
|
|
17126
|
+
/* @__PURE__ */ jsxRuntime.jsx(SidebarStep, { step: 3, title: "Pick a background", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
17127
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
17128
|
+
"Selected:",
|
|
17129
|
+
" ",
|
|
17130
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: selectedBackground.token })
|
|
17131
|
+
] }),
|
|
17132
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-2", children: context.backgrounds.map((background) => {
|
|
17133
|
+
const hasPairs = (context.pairsByBackground[background.token]?.length ?? 0) > 0;
|
|
17134
|
+
const isSelected = selectedBackground.token === background.token;
|
|
17135
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17136
|
+
"button",
|
|
17137
|
+
{
|
|
17138
|
+
type: "button",
|
|
17139
|
+
"aria-label": hasPairs ? `Select ${background.token} background` : `Select ${background.token} background with no AAA pairings`,
|
|
17140
|
+
"aria-pressed": isSelected,
|
|
17141
|
+
onClick: () => handleBackgroundChange(background.token),
|
|
17142
|
+
className: cn(
|
|
17143
|
+
"relative aspect-square rounded-sm border transition-transform",
|
|
17144
|
+
isSelected ? "ring-2 ring-primary-700 ring-offset-2 ring-offset-grey-50/60" : "hover:-translate-y-px",
|
|
17145
|
+
!hasPairs && "opacity-80"
|
|
17146
|
+
),
|
|
17147
|
+
style: {
|
|
17148
|
+
backgroundColor: background.hex,
|
|
17149
|
+
borderColor: "rgba(0, 0, 0, 0.14)"
|
|
17150
|
+
},
|
|
17151
|
+
title: background.token,
|
|
17152
|
+
children: !hasPairs ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute top-1/2 left-1/2 h-0.5 w-5 -translate-x-1/2 -translate-y-1/2 rotate-45 rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.28)]" }) : null
|
|
17153
|
+
},
|
|
17154
|
+
background.token
|
|
17155
|
+
);
|
|
17156
|
+
}) })
|
|
17157
|
+
] }) })
|
|
17158
|
+
] }) }),
|
|
17159
|
+
/* @__PURE__ */ jsxRuntime.jsxs("main", { className: "space-y-8", children: [
|
|
17160
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
17161
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 3, size: 5, className: "text-foreground", trim: "normal", children: "Live Preview & Results" }),
|
|
17162
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { size: 2, children: "Review the selected pairing in context, then compare the available AAA combinations for your chosen background." })
|
|
17163
|
+
] }),
|
|
17164
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
17165
|
+
selectedPair ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17166
|
+
PreviewHeroCard,
|
|
17167
|
+
{
|
|
17168
|
+
familySummary,
|
|
17169
|
+
isRecommended: Boolean(selectedPair),
|
|
17170
|
+
pair: selectedPair
|
|
17171
|
+
}
|
|
17172
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(PreviewFallbackCard2, { background: selectedBackground }),
|
|
17173
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccessibilityScoreCard, { pair: selectedPair })
|
|
17174
|
+
] }),
|
|
17175
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "space-y-4", children: [
|
|
17176
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
17177
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 3, size: 5, className: "text-foreground", trim: "normal", children: "Recommended Combinations" }),
|
|
17178
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-base text-muted-foreground", children: [
|
|
17179
|
+
"AAA-recommended foregrounds for",
|
|
17180
|
+
" ",
|
|
17181
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: selectedBackground.token }),
|
|
17182
|
+
"."
|
|
17183
|
+
] })
|
|
17184
|
+
] }),
|
|
17185
|
+
selectedBackgroundPairs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4 md:grid-cols-2 xl:grid-cols-3", children: selectedBackgroundPairs.map((pair) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17186
|
+
RecommendedPairCard,
|
|
17187
|
+
{
|
|
17188
|
+
pair,
|
|
17189
|
+
isSelected: selectedPair?.id === pair.id,
|
|
17190
|
+
onSelect: () => handlePairChange(pair.id)
|
|
17191
|
+
},
|
|
17192
|
+
pair.id
|
|
17193
|
+
)) }) : /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "gap-0 py-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 py-6", children: [
|
|
17194
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { level: 4, size: 6, className: "text-foreground", trim: "normal", children: "No recommended combinations" }),
|
|
17195
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-muted-foreground", children: "Choose another approved background tone to review available AAA pairings." })
|
|
17196
|
+
] }) })
|
|
17197
|
+
] }),
|
|
17198
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
17199
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17200
|
+
PairDetailCard2,
|
|
17201
|
+
{
|
|
17202
|
+
color: selectedBackground,
|
|
17203
|
+
role: "Background",
|
|
17204
|
+
visibleFormats
|
|
17205
|
+
}
|
|
17206
|
+
),
|
|
17207
|
+
detailForeground ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17208
|
+
PairDetailCard2,
|
|
17209
|
+
{
|
|
17210
|
+
color: detailForeground,
|
|
17211
|
+
role: "Foreground",
|
|
17212
|
+
visibleFormats
|
|
17213
|
+
}
|
|
17214
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "gap-4", children: [
|
|
17215
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { className: "gap-3 border-b", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
17216
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Foreground" }),
|
|
17217
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "No recommended foreground available" })
|
|
17218
|
+
] }) }),
|
|
17219
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Choose another approved tone or review the recommended foregrounds for the same background." }) })
|
|
17220
|
+
] })
|
|
17221
|
+
] })
|
|
17222
|
+
] })
|
|
17223
|
+
] });
|
|
17224
|
+
}
|
|
17225
|
+
function ColorPairingToolV2({
|
|
17226
|
+
visibleFormats = DEFAULT_VISIBLE_FORMATS2
|
|
17227
|
+
} = {}) {
|
|
17228
|
+
const normalizedVisibleFormats = [...new Set(visibleFormats)];
|
|
17229
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React5.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(ColorPairingToolV2Loading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(ColorPairingToolV2Content, { visibleFormats: normalizedVisibleFormats }) });
|
|
17230
|
+
}
|
|
16360
17231
|
function ColorSwatches({ theme: theme2, format, viewMode }) {
|
|
16361
17232
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16362
17233
|
"div",
|
|
@@ -18132,7 +19003,7 @@ function DescriptionList({ className, ...props }) {
|
|
|
18132
19003
|
"dl",
|
|
18133
19004
|
{
|
|
18134
19005
|
...props,
|
|
18135
|
-
className:
|
|
19006
|
+
className: clsx13__default.default(
|
|
18136
19007
|
className,
|
|
18137
19008
|
"grid grid-cols-1 text-base/6 sm:grid-cols-[min(50%,--spacing(80))_auto] sm:text-sm/6"
|
|
18138
19009
|
)
|
|
@@ -18144,7 +19015,7 @@ function DescriptionTerm({ className, ...props }) {
|
|
|
18144
19015
|
"dt",
|
|
18145
19016
|
{
|
|
18146
19017
|
...props,
|
|
18147
|
-
className:
|
|
19018
|
+
className: clsx13__default.default(
|
|
18148
19019
|
className,
|
|
18149
19020
|
"col-start-1 border-t border-grey-950/5 pt-3 text-grey-600 first:border-none sm:border-t sm:border-grey-950/5 sm:py-3 dark:border-white/5 dark:text-grey-400 sm:dark:border-white/5"
|
|
18150
19021
|
)
|
|
@@ -18156,7 +19027,7 @@ function DescriptionDetails({ className, ...props }) {
|
|
|
18156
19027
|
"dd",
|
|
18157
19028
|
{
|
|
18158
19029
|
...props,
|
|
18159
|
-
className:
|
|
19030
|
+
className: clsx13__default.default(
|
|
18160
19031
|
className,
|
|
18161
19032
|
"pt-1 pb-3 text-grey-950 sm:border-t sm:border-grey-950/5 sm:py-3 sm:nth-2:border-none dark:text-white dark:sm:border-white/5"
|
|
18162
19033
|
)
|
|
@@ -18570,7 +19441,7 @@ function Fieldset2({
|
|
|
18570
19441
|
Headless4__namespace.Fieldset,
|
|
18571
19442
|
{
|
|
18572
19443
|
...props,
|
|
18573
|
-
className:
|
|
19444
|
+
className: clsx13__default.default(className, "*:data-[slot=text]:mt-1 [&>*+[data-slot=control]]:mt-6")
|
|
18574
19445
|
}
|
|
18575
19446
|
);
|
|
18576
19447
|
}
|
|
@@ -18583,7 +19454,7 @@ function Legend6({
|
|
|
18583
19454
|
{
|
|
18584
19455
|
"data-slot": "legend",
|
|
18585
19456
|
...props,
|
|
18586
|
-
className:
|
|
19457
|
+
className: clsx13__default.default(
|
|
18587
19458
|
className,
|
|
18588
19459
|
"text-base/6 font-semibold text-zinc-950 data-disabled:opacity-50 sm:text-sm/6 dark:text-white"
|
|
18589
19460
|
)
|
|
@@ -18591,7 +19462,7 @@ function Legend6({
|
|
|
18591
19462
|
);
|
|
18592
19463
|
}
|
|
18593
19464
|
function FieldGroup({ className, ...props }) {
|
|
18594
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "control", ...props, className:
|
|
19465
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "control", ...props, className: clsx13__default.default(className, "space-y-8") });
|
|
18595
19466
|
}
|
|
18596
19467
|
function Field2({
|
|
18597
19468
|
className,
|
|
@@ -18601,7 +19472,7 @@ function Field2({
|
|
|
18601
19472
|
Headless4__namespace.Field,
|
|
18602
19473
|
{
|
|
18603
19474
|
...props,
|
|
18604
|
-
className:
|
|
19475
|
+
className: clsx13__default.default(
|
|
18605
19476
|
className,
|
|
18606
19477
|
"[&>[data-slot=label]+[data-slot=control]]:mt-3",
|
|
18607
19478
|
"[&>[data-slot=label]+[data-slot=description]]:mt-1",
|
|
@@ -18622,7 +19493,7 @@ function FieldLabel({
|
|
|
18622
19493
|
{
|
|
18623
19494
|
"data-slot": "label",
|
|
18624
19495
|
...props,
|
|
18625
|
-
className:
|
|
19496
|
+
className: clsx13__default.default(
|
|
18626
19497
|
className,
|
|
18627
19498
|
"text-base/6 text-zinc-950 select-none data-disabled:opacity-50 sm:text-sm/6 dark:text-white"
|
|
18628
19499
|
)
|
|
@@ -18638,7 +19509,7 @@ function Description4({
|
|
|
18638
19509
|
{
|
|
18639
19510
|
"data-slot": "description",
|
|
18640
19511
|
...props,
|
|
18641
|
-
className:
|
|
19512
|
+
className: clsx13__default.default(
|
|
18642
19513
|
className,
|
|
18643
19514
|
"text-base/6 text-zinc-500 data-disabled:opacity-50 sm:text-sm/6 dark:text-zinc-400"
|
|
18644
19515
|
)
|
|
@@ -18654,7 +19525,7 @@ function ErrorMessage({
|
|
|
18654
19525
|
{
|
|
18655
19526
|
"data-slot": "error",
|
|
18656
19527
|
...props,
|
|
18657
|
-
className:
|
|
19528
|
+
className: clsx13__default.default(
|
|
18658
19529
|
className,
|
|
18659
19530
|
"text-base/6 text-red-600 data-disabled:opacity-50 sm:text-sm/6 dark:text-red-500"
|
|
18660
19531
|
)
|
|
@@ -18878,7 +19749,7 @@ var toggleVariants = classVarianceAuthority.cva(styles3.base, {
|
|
|
18878
19749
|
variants: {
|
|
18879
19750
|
variant: {
|
|
18880
19751
|
ghost: "",
|
|
18881
|
-
outline:
|
|
19752
|
+
outline: clsx13__default.default(styles3.outline)
|
|
18882
19753
|
},
|
|
18883
19754
|
size: {
|
|
18884
19755
|
default: "h-9 px-2 min-w-9",
|
|
@@ -18981,7 +19852,7 @@ function FormatToggle({ format, setFormat }) {
|
|
|
18981
19852
|
|
|
18982
19853
|
// package.json
|
|
18983
19854
|
var package_default = {
|
|
18984
|
-
version: "1.
|
|
19855
|
+
version: "1.102.0"};
|
|
18985
19856
|
function Logo(props) {
|
|
18986
19857
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18987
19858
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "NSW Government" }),
|
|
@@ -19131,7 +20002,7 @@ function Header2({
|
|
|
19131
20002
|
"data-slot": "header",
|
|
19132
20003
|
"data-scrolled": isScrolled,
|
|
19133
20004
|
id: "nsw-header",
|
|
19134
|
-
className:
|
|
20005
|
+
className: clsx13__default.default(
|
|
19135
20006
|
"sticky top-0 z-50 hidden bg-white px-4 py-5 transition duration-500 sm:px-6 lg:flex lg:flex-none lg:flex-wrap lg:items-center lg:justify-between lg:px-12",
|
|
19136
20007
|
!hideShadow && "shadow-md shadow-slate-900/5 dark:shadow-none",
|
|
19137
20008
|
isScrolled ? "dark:bg-slate-900/95 dark:backdrop-blur-sm dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75" : "dark:bg-transparent"
|
|
@@ -19985,7 +20856,7 @@ var LineChart = React5__namespace.default.forwardRef((props, ref) => {
|
|
|
19985
20856
|
});
|
|
19986
20857
|
LineChart.displayName = "LineChart";
|
|
19987
20858
|
function cn2(...inputs) {
|
|
19988
|
-
return tailwindMerge.twMerge(
|
|
20859
|
+
return tailwindMerge.twMerge(clsx13.clsx(inputs));
|
|
19989
20860
|
}
|
|
19990
20861
|
var sizeStyles = {
|
|
19991
20862
|
sm: "text-sm",
|
|
@@ -20047,7 +20918,7 @@ function Listbox2({
|
|
|
20047
20918
|
autoFocus,
|
|
20048
20919
|
"data-slot": "control",
|
|
20049
20920
|
"aria-label": ariaLabel,
|
|
20050
|
-
className:
|
|
20921
|
+
className: clsx13__default.default([
|
|
20051
20922
|
className,
|
|
20052
20923
|
// Basic layout
|
|
20053
20924
|
"group relative block w-full",
|
|
@@ -20071,7 +20942,7 @@ function Listbox2({
|
|
|
20071
20942
|
as: "span",
|
|
20072
20943
|
options,
|
|
20073
20944
|
placeholder: placeholder && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-grey-500", children: placeholder }),
|
|
20074
|
-
className:
|
|
20945
|
+
className: clsx13__default.default([
|
|
20075
20946
|
"cursor-pointer",
|
|
20076
20947
|
// Basic layout
|
|
20077
20948
|
"relative block w-full appearance-none rounded-sm py-[calc(--spacing(4.5)-1px)] sm:py-[calc(--spacing(3.5)-1px)]",
|
|
@@ -20101,7 +20972,7 @@ function Listbox2({
|
|
|
20101
20972
|
{
|
|
20102
20973
|
transition: true,
|
|
20103
20974
|
anchor: "selection start",
|
|
20104
|
-
className:
|
|
20975
|
+
className: clsx13__default.default(
|
|
20105
20976
|
// Anchor positioning
|
|
20106
20977
|
"[--anchor-offset:-1.625rem] [--anchor-padding:--spacing(4)] sm:[--anchor-offset:-1.375rem]",
|
|
20107
20978
|
// Base styles
|
|
@@ -20127,7 +20998,7 @@ function ListboxOption2({
|
|
|
20127
20998
|
className,
|
|
20128
20999
|
...props
|
|
20129
21000
|
}) {
|
|
20130
|
-
const sharedClasses =
|
|
21001
|
+
const sharedClasses = clsx13__default.default(
|
|
20131
21002
|
// Base
|
|
20132
21003
|
"flex min-w-0 items-center",
|
|
20133
21004
|
// Icons
|
|
@@ -20139,12 +21010,12 @@ function ListboxOption2({
|
|
|
20139
21010
|
);
|
|
20140
21011
|
return /* @__PURE__ */ jsxRuntime.jsx(Headless4__namespace.ListboxOption, { as: React5.Fragment, ...props, children: ({ selectedOption }) => {
|
|
20141
21012
|
if (selectedOption) {
|
|
20142
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
21013
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx13__default.default(className, sharedClasses), children });
|
|
20143
21014
|
}
|
|
20144
21015
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20145
21016
|
"div",
|
|
20146
21017
|
{
|
|
20147
|
-
className:
|
|
21018
|
+
className: clsx13__default.default(
|
|
20148
21019
|
// Basic layout
|
|
20149
21020
|
"group/option grid cursor-pointer grid-cols-[--spacing(5)_1fr] items-baseline gap-x-2 rounded-sm py-2.5 pr-3.5 pl-2 sm:grid-cols-[--spacing(4)_1fr] sm:py-1.5 sm:pr-3 sm:pl-1.5",
|
|
20150
21021
|
// Typography
|
|
@@ -20175,7 +21046,7 @@ function ListboxOption2({
|
|
|
20175
21046
|
)
|
|
20176
21047
|
}
|
|
20177
21048
|
),
|
|
20178
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
21049
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx13__default.default(className, sharedClasses, "col-start-2"), children })
|
|
20179
21050
|
]
|
|
20180
21051
|
}
|
|
20181
21052
|
);
|
|
@@ -20186,7 +21057,7 @@ function ListboxLabel({ className, ...props }) {
|
|
|
20186
21057
|
"span",
|
|
20187
21058
|
{
|
|
20188
21059
|
...props,
|
|
20189
|
-
className:
|
|
21060
|
+
className: clsx13__default.default(className, "ml-2.5 truncate first:ml-0 sm:ml-2 sm:first:ml-0")
|
|
20190
21061
|
}
|
|
20191
21062
|
);
|
|
20192
21063
|
}
|
|
@@ -20199,7 +21070,7 @@ function ListboxDescription({
|
|
|
20199
21070
|
"span",
|
|
20200
21071
|
{
|
|
20201
21072
|
...props,
|
|
20202
|
-
className:
|
|
21073
|
+
className: clsx13__default.default(
|
|
20203
21074
|
className,
|
|
20204
21075
|
"flex flex-1 overflow-hidden text-grey-500 group-data-focus/option:text-white before:w-2 before:min-w-0 before:shrink dark:text-grey-400"
|
|
20205
21076
|
),
|
|
@@ -20247,74 +21118,6 @@ function Spinner({ className, size = "md", ...props }) {
|
|
|
20247
21118
|
}
|
|
20248
21119
|
) });
|
|
20249
21120
|
}
|
|
20250
|
-
function Text({ className, trim = "normal", size = 2, label = false, ...props }) {
|
|
20251
|
-
const textSizeClasses = {
|
|
20252
|
-
1: "text-[length:var(--font-size-1)] leading-[var(--line-height-28)] tracking-[var(--letter-spacing-0)]",
|
|
20253
|
-
2: "text-[length:var(--font-size-2)] leading-[var(--line-height-24)] tracking-[var(--letter-spacing-0)]",
|
|
20254
|
-
3: "text-[length:var(--font-size-3)] leading-[var(--line-height-20)] tracking-[var(--letter-spacing-0)]",
|
|
20255
|
-
4: "text-[length:var(--font-size-4)] leading-[var(--line-height-20)] tracking-[var(--letter-spacing-0)]"
|
|
20256
|
-
};
|
|
20257
|
-
const labelSizeClasses = {
|
|
20258
|
-
1: "text-[length:var(--font-size-1)] leading-[var(--line-height-24)] tracking-[var(--letter-spacing-0)]",
|
|
20259
|
-
2: "text-[length:var(--font-size-2)] leading-[var(--line-height-20)] tracking-[var(--letter-spacing-0)]",
|
|
20260
|
-
3: "text-[length:var(--font-size-3)] leading-[var(--line-height-16)] tracking-[var(--letter-spacing-0)]",
|
|
20261
|
-
4: "text-[length:var(--font-size-4)] leading-[var(--line-height-16)] tracking-[var(--letter-spacing-0)]"
|
|
20262
|
-
};
|
|
20263
|
-
const sizeClass = label ? labelSizeClasses[size] : textSizeClasses[size];
|
|
20264
|
-
const trimClasses = {
|
|
20265
|
-
normal: ["before:content-none after:content-none"],
|
|
20266
|
-
start: [
|
|
20267
|
-
'before:content-[""] before:table after:content-none',
|
|
20268
|
-
"before:mb-[calc(var(--leading-trim-start,var(--default-leading-trim-start))-var(--line-height,calc(1em*var(--default-line-height)))/2)]"
|
|
20269
|
-
],
|
|
20270
|
-
end: [
|
|
20271
|
-
'before:content-none after:content-[""] after:table',
|
|
20272
|
-
"after:mt-[calc(var(--leading-trim-end,var(--default-leading-trim-end))-var(--line-height,calc(1em*var(--default-line-height)))/2)]"
|
|
20273
|
-
],
|
|
20274
|
-
both: [
|
|
20275
|
-
'before:content-[""] before:table after:content-[""] after:table',
|
|
20276
|
-
"before:mb-[calc(var(--leading-trim-start,var(--default-leading-trim-start))-var(--line-height,calc(1em*var(--default-line-height)))/2)]",
|
|
20277
|
-
"after:mt-[calc(var(--leading-trim-end,var(--default-leading-trim-end))-var(--line-height,calc(1em*var(--default-line-height)))/2)]"
|
|
20278
|
-
]
|
|
20279
|
-
};
|
|
20280
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20281
|
-
"p",
|
|
20282
|
-
{
|
|
20283
|
-
"data-slot": "text",
|
|
20284
|
-
...props,
|
|
20285
|
-
className: clsx12__default.default(className, trimClasses[trim], "text-grey-800 dark:text-grey-400", sizeClass)
|
|
20286
|
-
}
|
|
20287
|
-
);
|
|
20288
|
-
}
|
|
20289
|
-
function TextLink({ className, ...props }) {
|
|
20290
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20291
|
-
Link,
|
|
20292
|
-
{
|
|
20293
|
-
...props,
|
|
20294
|
-
className: clsx12__default.default(
|
|
20295
|
-
className,
|
|
20296
|
-
"text-primary-800 underline decoration-primary-800/50 data-hover:decoration-primary-800 dark:text-white dark:decoration-white/50 dark:data-hover:decoration-white"
|
|
20297
|
-
)
|
|
20298
|
-
}
|
|
20299
|
-
);
|
|
20300
|
-
}
|
|
20301
|
-
function Strong({ className, ...props }) {
|
|
20302
|
-
return /* @__PURE__ */ jsxRuntime.jsx("strong", { ...props, className: clsx12__default.default(className, "font-medium text-grey-950 dark:text-white") });
|
|
20303
|
-
}
|
|
20304
|
-
function Code({ className, ...props }) {
|
|
20305
|
-
const hasLanguageClass = typeof className === "string" && className.includes("language-");
|
|
20306
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20307
|
-
"code",
|
|
20308
|
-
{
|
|
20309
|
-
...props,
|
|
20310
|
-
className: clsx12__default.default(
|
|
20311
|
-
className,
|
|
20312
|
-
!hasLanguageClass && "language-plaintext",
|
|
20313
|
-
"text-sm sm:text-[0.8125rem]"
|
|
20314
|
-
)
|
|
20315
|
-
}
|
|
20316
|
-
);
|
|
20317
|
-
}
|
|
20318
21121
|
function Loading() {
|
|
20319
21122
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-screen items-center justify-center gap-4 bg-grey-50 dark:bg-grey-900", children: [
|
|
20320
21123
|
/* @__PURE__ */ jsxRuntime.jsx(Spinner, { "aria-label": "Loading...", size: "lg" }),
|
|
@@ -20874,7 +21677,7 @@ function MultiLevelPushMenu({
|
|
|
20874
21677
|
{
|
|
20875
21678
|
href: item.href,
|
|
20876
21679
|
onClick: (e) => handleItemClick(item, e),
|
|
20877
|
-
className:
|
|
21680
|
+
className: clsx13__default.default(
|
|
20878
21681
|
"relative flex w-full cursor-pointer items-center justify-between gap-x-6 border-l p-4 transition-colors hover:border-primary-800 hover:bg-primary-800/10",
|
|
20879
21682
|
pathname === item.href ? "border-primary-800 bg-primary-800/10 font-semibold text-primary-800" : "border-transparent text-grey-800",
|
|
20880
21683
|
isAnimating && "pointer-events-none"
|
|
@@ -20886,7 +21689,7 @@ function MultiLevelPushMenu({
|
|
|
20886
21689
|
{
|
|
20887
21690
|
onClick: (e) => handleItemClick(item, e),
|
|
20888
21691
|
disabled: isAnimating,
|
|
20889
|
-
className:
|
|
21692
|
+
className: clsx13__default.default(
|
|
20890
21693
|
"relative flex w-full cursor-pointer items-center justify-between gap-x-6 border-l p-4 transition-colors hover:border-primary-800 hover:bg-primary-800/10",
|
|
20891
21694
|
pathname === item.href ? "border-primary-800 bg-primary-800/10 font-semibold text-primary-800" : "border-transparent text-grey-800",
|
|
20892
21695
|
isAnimating && "pointer-events-none"
|
|
@@ -20953,7 +21756,7 @@ function MobileHeader({
|
|
|
20953
21756
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
20954
21757
|
"div",
|
|
20955
21758
|
{
|
|
20956
|
-
className:
|
|
21759
|
+
className: clsx13__default.default(
|
|
20957
21760
|
"relative flex w-full items-center py-4",
|
|
20958
21761
|
menu && !search && "justify-start",
|
|
20959
21762
|
search && "justify-between",
|
|
@@ -20969,7 +21772,7 @@ function MobileHeader({
|
|
|
20969
21772
|
{
|
|
20970
21773
|
href: "/",
|
|
20971
21774
|
"aria-label": "Home page",
|
|
20972
|
-
className:
|
|
21775
|
+
className: clsx13__default.default(
|
|
20973
21776
|
"flex items-center",
|
|
20974
21777
|
menu && !search && "justify-start",
|
|
20975
21778
|
search && !menu && "flex-row justify-between",
|
|
@@ -20980,7 +21783,7 @@ function MobileHeader({
|
|
|
20980
21783
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
20981
21784
|
"div",
|
|
20982
21785
|
{
|
|
20983
|
-
className:
|
|
21786
|
+
className: clsx13__default.default(
|
|
20984
21787
|
"flex flex-wrap items-center",
|
|
20985
21788
|
menu && !search && "justify-center text-left",
|
|
20986
21789
|
search && !menu && "justify-center text-left",
|
|
@@ -28991,7 +29794,7 @@ var featureBundle = {
|
|
|
28991
29794
|
// node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs
|
|
28992
29795
|
var motion = /* @__PURE__ */ createMotionProxy(featureBundle, createDomVisualElement);
|
|
28993
29796
|
function Navbar({ className, ...props }) {
|
|
28994
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { ...props, className:
|
|
29797
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { ...props, className: clsx13__default.default(className, "flex flex-1 items-center gap-4 py-2.5") });
|
|
28995
29798
|
}
|
|
28996
29799
|
function NavbarDivider({ className, ...props }) {
|
|
28997
29800
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -28999,16 +29802,16 @@ function NavbarDivider({ className, ...props }) {
|
|
|
28999
29802
|
{
|
|
29000
29803
|
"aria-hidden": "true",
|
|
29001
29804
|
...props,
|
|
29002
|
-
className:
|
|
29805
|
+
className: clsx13__default.default(className, "h-6 w-px bg-zinc-950/10 dark:bg-white/10")
|
|
29003
29806
|
}
|
|
29004
29807
|
);
|
|
29005
29808
|
}
|
|
29006
29809
|
function NavbarSection({ className, ...props }) {
|
|
29007
29810
|
const id3 = React5.useId();
|
|
29008
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LayoutGroup, { id: id3, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className:
|
|
29811
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LayoutGroup, { id: id3, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: clsx13__default.default(className, "flex items-center gap-3") }) });
|
|
29009
29812
|
}
|
|
29010
29813
|
function NavbarSpacer({ className, ...props }) {
|
|
29011
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", ...props, className:
|
|
29814
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", ...props, className: clsx13__default.default(className, "-ml-4 flex-1") });
|
|
29012
29815
|
}
|
|
29013
29816
|
var NavbarItem = React5.forwardRef(function NavbarItem2({
|
|
29014
29817
|
current,
|
|
@@ -29016,7 +29819,7 @@ var NavbarItem = React5.forwardRef(function NavbarItem2({
|
|
|
29016
29819
|
children,
|
|
29017
29820
|
...props
|
|
29018
29821
|
}, ref) {
|
|
29019
|
-
const classes =
|
|
29822
|
+
const classes = clsx13__default.default(
|
|
29020
29823
|
// Base
|
|
29021
29824
|
"relative flex min-w-0 items-center gap-3 rounded-lg p-2 text-left text-base/6 font-medium text-zinc-950 sm:text-sm/5",
|
|
29022
29825
|
// Leading icon/icon-only
|
|
@@ -29034,7 +29837,7 @@ var NavbarItem = React5.forwardRef(function NavbarItem2({
|
|
|
29034
29837
|
"dark:data-hover:bg-white/5 dark:data-hover:*:data-[slot=icon]:fill-white",
|
|
29035
29838
|
"dark:data-active:bg-white/5 dark:data-active:*:data-[slot=icon]:fill-white"
|
|
29036
29839
|
);
|
|
29037
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className:
|
|
29840
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx13__default.default(className, "relative"), children: [
|
|
29038
29841
|
current && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29039
29842
|
motion.span,
|
|
29040
29843
|
{
|
|
@@ -29055,7 +29858,7 @@ var NavbarItem = React5.forwardRef(function NavbarItem2({
|
|
|
29055
29858
|
Headless4__namespace.Button,
|
|
29056
29859
|
{
|
|
29057
29860
|
...props,
|
|
29058
|
-
className:
|
|
29861
|
+
className: clsx13__default.default("cursor-default", classes),
|
|
29059
29862
|
"data-current": current ? "true" : void 0,
|
|
29060
29863
|
ref,
|
|
29061
29864
|
children: /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, { children })
|
|
@@ -29064,14 +29867,14 @@ var NavbarItem = React5.forwardRef(function NavbarItem2({
|
|
|
29064
29867
|
] });
|
|
29065
29868
|
});
|
|
29066
29869
|
function NavbarLabel({ className, ...props }) {
|
|
29067
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props, className:
|
|
29870
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ...props, className: clsx13__default.default(className, "truncate") });
|
|
29068
29871
|
}
|
|
29069
29872
|
function Navigation({
|
|
29070
29873
|
className,
|
|
29071
29874
|
onLinkClick,
|
|
29072
29875
|
navigation
|
|
29073
29876
|
}) {
|
|
29074
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className:
|
|
29877
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: clsx13__default.default("text-base lg:text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "flex flex-col gap-9", children: navigation.map((section, index) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
29075
29878
|
section.links ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-display font-medium text-grey-800 dark:text-white", children: section.title }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "mt-2 flex flex-col gap-2 border-l lg:mt-4", children: /* @__PURE__ */ jsxRuntime.jsx("li", { className: "-ml-px flex flex-col items-start gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29076
29879
|
NavigationLink,
|
|
29077
29880
|
{
|
|
@@ -29094,7 +29897,7 @@ function NavigationLink({
|
|
|
29094
29897
|
{
|
|
29095
29898
|
href,
|
|
29096
29899
|
onClick,
|
|
29097
|
-
className:
|
|
29900
|
+
className: clsx13__default.default(
|
|
29098
29901
|
"inline-block w-full cursor-pointer rounded-r-sm border-l py-1 pr-2 pl-4 text-left text-base/8 sm:text-sm/6",
|
|
29099
29902
|
"hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
|
|
29100
29903
|
"dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
|
|
@@ -29567,7 +30370,7 @@ function Wrapper({
|
|
|
29567
30370
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29568
30371
|
"div",
|
|
29569
30372
|
{
|
|
29570
|
-
className:
|
|
30373
|
+
className: clsx13__default.default("max-w-8xl mx-auto space-y-8 px-4 py-6 sm:px-6 lg:px-12", className),
|
|
29571
30374
|
...props,
|
|
29572
30375
|
children
|
|
29573
30376
|
}
|
|
@@ -29581,7 +30384,7 @@ function PageHeading({
|
|
|
29581
30384
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29582
30385
|
"header",
|
|
29583
30386
|
{
|
|
29584
|
-
className:
|
|
30387
|
+
className: clsx13__default.default(
|
|
29585
30388
|
"border-b border-grey-300 bg-white dark:border-grey-700 dark:bg-grey-900",
|
|
29586
30389
|
className
|
|
29587
30390
|
),
|
|
@@ -29608,7 +30411,7 @@ function Pagination({
|
|
|
29608
30411
|
children,
|
|
29609
30412
|
...props
|
|
29610
30413
|
}) {
|
|
29611
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className:
|
|
30414
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className: clsx13__default.default(containerStyles[variant], className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(PaginationVariantContext.Provider, { value: variant, children }) });
|
|
29612
30415
|
}
|
|
29613
30416
|
function PaginationPrevious({ href = null, className, children = "Previous" }) {
|
|
29614
30417
|
const variant = React5__namespace.useContext(PaginationVariantContext);
|
|
@@ -29631,7 +30434,7 @@ function PaginationPrevious({ href = null, className, children = "Previous" }) {
|
|
|
29631
30434
|
}
|
|
29632
30435
|
) });
|
|
29633
30436
|
}
|
|
29634
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
30437
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx13__default.default(className, "grow basis-0"), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29635
30438
|
Button2,
|
|
29636
30439
|
{
|
|
29637
30440
|
...href === null ? { disabled: true } : { href },
|
|
@@ -29665,7 +30468,7 @@ function PaginationNext({ href = null, className, children = "Next" }) {
|
|
|
29665
30468
|
}
|
|
29666
30469
|
) });
|
|
29667
30470
|
}
|
|
29668
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
30471
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx13__default.default(className, "flex grow basis-0 justify-end"), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29669
30472
|
Button2,
|
|
29670
30473
|
{
|
|
29671
30474
|
...href === null ? { disabled: true } : { href },
|
|
@@ -29681,9 +30484,9 @@ function PaginationNext({ href = null, className, children = "Next" }) {
|
|
|
29681
30484
|
function PaginationList({ className, ...props }) {
|
|
29682
30485
|
const variant = React5__namespace.useContext(PaginationVariantContext);
|
|
29683
30486
|
if (variant === "line") {
|
|
29684
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
30487
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx13__default.default(listStyles.line, className), ...props });
|
|
29685
30488
|
}
|
|
29686
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
30489
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx13__default.default(listStyles.default, className), ...props });
|
|
29687
30490
|
}
|
|
29688
30491
|
function PaginationPage({
|
|
29689
30492
|
href,
|
|
@@ -29715,7 +30518,7 @@ function PaginationPage({
|
|
|
29715
30518
|
"aria-current": current ? "page" : void 0,
|
|
29716
30519
|
variant: current ? "solid" : "ghost",
|
|
29717
30520
|
color: current ? "accent" : "light",
|
|
29718
|
-
className:
|
|
30521
|
+
className: clsx13__default.default(
|
|
29719
30522
|
className,
|
|
29720
30523
|
"leading-none before:absolute before:-inset-px before:rounded-sm",
|
|
29721
30524
|
"min-h-8 min-w-8 sm:px-[calc(--spacing(4))] sm:py-[calc(--spacing(3))]",
|
|
@@ -29736,7 +30539,7 @@ function PaginationGap({
|
|
|
29736
30539
|
"span",
|
|
29737
30540
|
{
|
|
29738
30541
|
"aria-hidden": "true",
|
|
29739
|
-
className:
|
|
30542
|
+
className: clsx13__default.default(
|
|
29740
30543
|
"inline-flex items-center border-t-2 border-transparent px-4 pt-4 text-sm font-medium text-grey-800 select-none",
|
|
29741
30544
|
className
|
|
29742
30545
|
),
|
|
@@ -29750,7 +30553,7 @@ function PaginationGap({
|
|
|
29750
30553
|
{
|
|
29751
30554
|
"aria-hidden": "true",
|
|
29752
30555
|
...props,
|
|
29753
|
-
className:
|
|
30556
|
+
className: clsx13__default.default(
|
|
29754
30557
|
className,
|
|
29755
30558
|
"w-9 text-center text-sm/6 font-semibold text-grey-950 select-none dark:text-white"
|
|
29756
30559
|
),
|
|
@@ -29770,7 +30573,7 @@ function PrevNextLinksPageLink({
|
|
|
29770
30573
|
Link13__default.default,
|
|
29771
30574
|
{
|
|
29772
30575
|
href,
|
|
29773
|
-
className:
|
|
30576
|
+
className: clsx13__default.default(
|
|
29774
30577
|
"flex items-center gap-x-1 text-base font-semibold text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300",
|
|
29775
30578
|
dir === "previous" && "flex-row-reverse"
|
|
29776
30579
|
),
|
|
@@ -29779,7 +30582,7 @@ function PrevNextLinksPageLink({
|
|
|
29779
30582
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29780
30583
|
Icons.east,
|
|
29781
30584
|
{
|
|
29782
|
-
className:
|
|
30585
|
+
className: clsx13__default.default("size-5 flex-none fill-current", dir === "previous" && "-scale-x-100")
|
|
29783
30586
|
}
|
|
29784
30587
|
)
|
|
29785
30588
|
]
|
|
@@ -30053,7 +30856,7 @@ function Prose({
|
|
|
30053
30856
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30054
30857
|
Component2,
|
|
30055
30858
|
{
|
|
30056
|
-
className:
|
|
30859
|
+
className: clsx13__default.default(
|
|
30057
30860
|
className,
|
|
30058
30861
|
"prose max-w-none dark:!prose-invert",
|
|
30059
30862
|
// headings
|
|
@@ -30825,7 +31628,7 @@ function SidebarNavigation({
|
|
|
30825
31628
|
navigation: navigation$1
|
|
30826
31629
|
}) {
|
|
30827
31630
|
const pathname = navigation.usePathname();
|
|
30828
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className:
|
|
31631
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: clsx13__default.default("text-base lg:text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "flex flex-col gap-9", children: navigation$1.map((section, sectionIndex) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
30829
31632
|
section.links ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-display font-medium text-foreground dark:text-white", children: section.title }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
30830
31633
|
"ul",
|
|
30831
31634
|
{
|
|
@@ -30860,7 +31663,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
|
|
|
30860
31663
|
const hasChildren = Array.isArray(link.links) && link.links.length > 0;
|
|
30861
31664
|
const isActive = pathname === link.href;
|
|
30862
31665
|
const isActiveOrHasActiveDescendant = isLinkOrDescendantActive(link, pathname);
|
|
30863
|
-
const baseLinkClasses =
|
|
31666
|
+
const baseLinkClasses = clsx13__default.default(
|
|
30864
31667
|
"w-full cursor-pointer rounded-r-sm border-l py-1 pr-2 pl-4 text-left text-base/8 sm:text-sm/6",
|
|
30865
31668
|
"hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
|
|
30866
31669
|
"dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
|
|
@@ -30870,13 +31673,13 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
|
|
|
30870
31673
|
/* @__PURE__ */ jsxRuntime.jsx(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30871
31674
|
"button",
|
|
30872
31675
|
{
|
|
30873
|
-
className:
|
|
31676
|
+
className: clsx13__default.default(baseLinkClasses, "group flex items-center justify-between gap-1"),
|
|
30874
31677
|
children: [
|
|
30875
31678
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: link.title }),
|
|
30876
31679
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30877
31680
|
Icons.chevron_right,
|
|
30878
31681
|
{
|
|
30879
|
-
className:
|
|
31682
|
+
className: clsx13__default.default(
|
|
30880
31683
|
"ml-2 size-5 transition-transform duration-200",
|
|
30881
31684
|
"group-data-[state=open]:rotate-90"
|
|
30882
31685
|
)
|
|
@@ -30885,7 +31688,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
|
|
|
30885
31688
|
]
|
|
30886
31689
|
}
|
|
30887
31690
|
) }),
|
|
30888
|
-
/* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className:
|
|
31691
|
+
/* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: clsx13__default.default("mt-2 ml-5 flex flex-col gap-1 border-l pl-0"), children: link.links && link.links.map((childLink) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30889
31692
|
SidebarLink,
|
|
30890
31693
|
{
|
|
30891
31694
|
link: childLink,
|
|
@@ -31214,7 +32017,7 @@ var StepIndicator = React5__namespace.forwardRef(
|
|
|
31214
32017
|
return /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", ref, className: cn("w-full", className), ...props, children: array.map((step, stepIdx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
31215
32018
|
"li",
|
|
31216
32019
|
{
|
|
31217
|
-
className:
|
|
32020
|
+
className: clsx13__default.default(stepIdx !== array.length - 1 ? "pb-3" : "", "relative"),
|
|
31218
32021
|
children: step.href === pathname && !(step.status === "completed" || step.status === "error" || step.status === "saved" || step.status === "cannot-start") ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: step.status === "in-progress" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31219
32022
|
stepIdx !== array.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
31220
32023
|
"div",
|
|
@@ -31460,7 +32263,7 @@ function StepNavigation({
|
|
|
31460
32263
|
})),
|
|
31461
32264
|
[navigation, formStatus, getStatus]
|
|
31462
32265
|
);
|
|
31463
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className:
|
|
32266
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: clsx13__default.default("text-base lg:text-sm", className), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { role: "list", className: "space-y-9", children: navigationWithStatus.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
|
|
31464
32267
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-display font-medium text-slate-900 dark:text-white", children: section.title }),
|
|
31465
32268
|
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { className: "mt-2 lg:mt-4", array: section.links })
|
|
31466
32269
|
] }, section.title)) }) });
|
|
@@ -31488,7 +32291,7 @@ function SwitchGroup({ className, ...props }) {
|
|
|
31488
32291
|
{
|
|
31489
32292
|
"data-slot": "control",
|
|
31490
32293
|
...props,
|
|
31491
|
-
className:
|
|
32294
|
+
className: clsx13__default.default(
|
|
31492
32295
|
className,
|
|
31493
32296
|
// Basic groups
|
|
31494
32297
|
"space-y-3 **:data-[slot=label]:font-normal",
|
|
@@ -31507,7 +32310,7 @@ function SwitchField({
|
|
|
31507
32310
|
{
|
|
31508
32311
|
"data-slot": "field",
|
|
31509
32312
|
...props,
|
|
31510
|
-
className:
|
|
32313
|
+
className: clsx13__default.default(
|
|
31511
32314
|
className,
|
|
31512
32315
|
// Base layout
|
|
31513
32316
|
"grid grid-cols-[1fr_auto] gap-x-8 gap-y-1 sm:grid-cols-[1fr_auto]",
|
|
@@ -31571,7 +32374,7 @@ function Switch2({
|
|
|
31571
32374
|
{
|
|
31572
32375
|
"data-slot": "control",
|
|
31573
32376
|
...props,
|
|
31574
|
-
className:
|
|
32377
|
+
className: clsx13__default.default(
|
|
31575
32378
|
className,
|
|
31576
32379
|
// Base styles
|
|
31577
32380
|
"group relative isolate inline-flex h-6 w-10 cursor-default rounded-full p-[3px] sm:h-5 sm:w-8",
|
|
@@ -31598,7 +32401,7 @@ function Switch2({
|
|
|
31598
32401
|
"span",
|
|
31599
32402
|
{
|
|
31600
32403
|
"aria-hidden": "true",
|
|
31601
|
-
className:
|
|
32404
|
+
className: clsx13__default.default(
|
|
31602
32405
|
// Basic layout
|
|
31603
32406
|
"pointer-events-none relative inline-block size-4.5 rounded-full sm:size-3.5",
|
|
31604
32407
|
// Transition
|
|
@@ -31707,7 +32510,7 @@ function TableOfContents({ tableOfContents }) {
|
|
|
31707
32510
|
"ol",
|
|
31708
32511
|
{
|
|
31709
32512
|
role: "list",
|
|
31710
|
-
className:
|
|
32513
|
+
className: clsx13__default.default(
|
|
31711
32514
|
"mt-3 flex flex-col gap-2",
|
|
31712
32515
|
"border-l border-grey-900/10 dark:border-white/10",
|
|
31713
32516
|
"text-sm/6 text-grey-700 dark:text-grey-400"
|
|
@@ -31718,7 +32521,7 @@ function TableOfContents({ tableOfContents }) {
|
|
|
31718
32521
|
{
|
|
31719
32522
|
href: `#${section.id}`,
|
|
31720
32523
|
prefetch: false,
|
|
31721
|
-
className:
|
|
32524
|
+
className: clsx13__default.default(
|
|
31722
32525
|
"-ml-px inline-block border-l pl-4",
|
|
31723
32526
|
"hover:border-primary-800 dark:hover:border-white",
|
|
31724
32527
|
isActive(section) ? "border-primary-800 font-semibold text-primary-800 dark:border-white dark:text-white" : "border-transparent"
|
|
@@ -31731,7 +32534,7 @@ function TableOfContents({ tableOfContents }) {
|
|
|
31731
32534
|
{
|
|
31732
32535
|
href: `#${subSection.id}`,
|
|
31733
32536
|
prefetch: false,
|
|
31734
|
-
className:
|
|
32537
|
+
className: clsx13__default.default(
|
|
31735
32538
|
"-ml-px inline-block border-l pl-8",
|
|
31736
32539
|
"hover:border-primary-800 dark:hover:border-white",
|
|
31737
32540
|
isActive(subSection) ? "border-primary-800 font-semibold text-primary-800 dark:border-white dark:text-white" : "border-transparent"
|
|
@@ -35141,6 +35944,7 @@ exports.CollapsibleContent = CollapsibleContent2;
|
|
|
35141
35944
|
exports.CollapsibleTrigger = CollapsibleTrigger2;
|
|
35142
35945
|
exports.ColorCard = ColorCard;
|
|
35143
35946
|
exports.ColorPairingTool = ColorPairingTool;
|
|
35947
|
+
exports.ColorPairingToolV2 = ColorPairingToolV2;
|
|
35144
35948
|
exports.ColorSwatches = ColorSwatches;
|
|
35145
35949
|
exports.ColourScale = ColourScale;
|
|
35146
35950
|
exports.ComboChart = ComboChart;
|