@nswds/app 1.105.0 → 1.106.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.js CHANGED
@@ -18949,6 +18949,7 @@ var DEFAULT_INITIAL_PAIR_ID4 = "nsw-blue-800:nsw-blue-200";
18949
18949
  var COLOR_PAIRING_TOOL_V4_PATH = "/core/colour/colour-pairing-tool-4";
18950
18950
  var MOBILE_RESULT_SCROLL_QUERY2 = "(max-width: 1023px)";
18951
18951
  var PERSISTENT_DRAWER_MIN_WIDTH_QUERY2 = "(min-width: 1280px)";
18952
+ var INITIAL_VISIBLE_ALTERNATIVES = 6;
18952
18953
  var COLOR_PAIRING_TOOL_DRAWER_STEPS2 = [
18953
18954
  {
18954
18955
  id: "colours",
@@ -19012,10 +19013,10 @@ function getWhiteForegroundGuidance4(pair) {
19012
19013
  }
19013
19014
  function getPreviewGuidance4(pair, isRecommended) {
19014
19015
  if (!isWhiteForegroundPair4(pair)) {
19015
- return "Use only AAA-recommended combinations across your selected primary, accent, and grey families.";
19016
+ return isRecommended ? "Use this pairing for headings, body copy, and actions on the selected background." : "Use this approved alternative when you need a different tone or stronger emphasis.";
19016
19017
  }
19017
19018
  if (isRecommended) {
19018
- return "Use white text on dark colour only when it meets AAA for headings, body copy, and calls to action.";
19019
+ return "Use white text on this background for headings, body copy, and actions only while it maintains AAA contrast.";
19019
19020
  }
19020
19021
  return getWhiteForegroundGuidance4(pair);
19021
19022
  }
@@ -19159,37 +19160,19 @@ function getRecommendationCategory2(pair, bestPair, context) {
19159
19160
  if (pair.foreground.familyKey === context.primary.key) return "primary-family";
19160
19161
  return "approved";
19161
19162
  }
19162
- function getRecommendationCategoryLabel2(category) {
19163
- switch (category) {
19164
- case "best":
19165
- return "Best recommended";
19166
- case "same-family":
19167
- return "Same family";
19168
- case "accent-family":
19169
- return "Accent family";
19170
- case "grey-option":
19171
- return "Grey option";
19172
- case "primary-family":
19173
- return "Primary family";
19174
- case "white":
19175
- return "White";
19176
- default:
19177
- return "Approved option";
19178
- }
19179
- }
19180
19163
  function getRecommendationSortRank2(category) {
19181
19164
  switch (category) {
19182
19165
  case "best":
19183
19166
  return 0;
19184
19167
  case "same-family":
19185
19168
  return 1;
19186
- case "accent-family":
19169
+ case "primary-family":
19187
19170
  return 2;
19188
- case "grey-option":
19171
+ case "accent-family":
19189
19172
  return 3;
19190
- case "white":
19173
+ case "grey-option":
19191
19174
  return 4;
19192
- case "primary-family":
19175
+ case "white":
19193
19176
  return 5;
19194
19177
  default:
19195
19178
  return 6;
@@ -19199,13 +19182,14 @@ function getRecommendationGroupId(category) {
19199
19182
  switch (category) {
19200
19183
  case "best":
19201
19184
  case "same-family":
19202
- case "accent-family":
19203
- case "grey-option":
19204
19185
  case "primary-family":
19205
- return "good-alternatives";
19186
+ return "closest";
19187
+ case "accent-family":
19206
19188
  case "white":
19207
19189
  case "approved":
19208
- return "edge-options";
19190
+ return "expressive";
19191
+ case "grey-option":
19192
+ return "neutral";
19209
19193
  default:
19210
19194
  return null;
19211
19195
  }
@@ -19221,22 +19205,29 @@ function buildRecommendationGroups(items) {
19221
19205
  return accumulator;
19222
19206
  },
19223
19207
  {
19224
- "edge-options": [],
19225
- "good-alternatives": []
19208
+ closest: [],
19209
+ expressive: [],
19210
+ neutral: []
19226
19211
  }
19227
19212
  );
19228
19213
  const groups = [
19229
19214
  {
19230
- id: "good-alternatives",
19231
- title: "Good alternatives",
19232
- description: "These pairings still meet AAA and stay close to the NSW recommendation in tone, neutrality, or emphasis.",
19233
- items: groupedItems["good-alternatives"]
19215
+ id: "closest",
19216
+ title: "Closest to default",
19217
+ description: "Stays closest to the NSW default in tone and overall treatment.",
19218
+ items: groupedItems.closest
19234
19219
  },
19235
19220
  {
19236
- id: "edge-options",
19237
- title: "Edge and less common options",
19238
- description: "These are valid AAA pairings, but they are less typical NSW defaults and should be used more deliberately.",
19239
- items: groupedItems["edge-options"]
19221
+ id: "expressive",
19222
+ title: "More expressive (accent)",
19223
+ description: "Brings more accent or emphasis into the foreground treatment.",
19224
+ items: groupedItems.expressive
19225
+ },
19226
+ {
19227
+ id: "neutral",
19228
+ title: "Neutral/system",
19229
+ description: "Uses quieter neutral contrast for system or utility treatments.",
19230
+ items: groupedItems.neutral
19240
19231
  }
19241
19232
  ];
19242
19233
  return groups.filter((group) => group.items.length > 0);
@@ -19282,6 +19273,18 @@ function getPairingCopyText2(pair) {
19282
19273
  accessibilityLine
19283
19274
  ].join("\n");
19284
19275
  }
19276
+ function getAccessibilitySummaryLine(pair) {
19277
+ if (!pair) {
19278
+ return "Contrast unavailable";
19279
+ }
19280
+ if (pair.passes.aaaText) {
19281
+ return `${pair.contrastRatio.toFixed(2)}:1 \u2014 AAA compliant (normal + large text)`;
19282
+ }
19283
+ if (pair.passes.aaaLarge) {
19284
+ return `${pair.contrastRatio.toFixed(2)}:1 \u2014 AAA compliant (large text only)`;
19285
+ }
19286
+ return `${pair.contrastRatio.toFixed(2)}:1 \u2014 Not AAA compliant`;
19287
+ }
19285
19288
  function getLiveAnnouncement2(pair, background) {
19286
19289
  if (!background) {
19287
19290
  return "No approved background tones available.";
@@ -19396,65 +19399,6 @@ function BackgroundSwatchButton2({
19396
19399
  }
19397
19400
  );
19398
19401
  }
19399
- function CompactAccessibilityStatus({ label, passes }) {
19400
- const status = passes === null ? "unavailable" : passes ? "pass" : "fail";
19401
- return /* @__PURE__ */ jsxs(
19402
- "div",
19403
- {
19404
- className: cn(
19405
- "flex items-center justify-between gap-3 rounded-sm border px-4 py-3",
19406
- status === "pass" && "border-success-200 bg-success-50",
19407
- status === "fail" && "border-danger-200 bg-danger-50",
19408
- status === "unavailable" && "border-grey-200 bg-white"
19409
- ),
19410
- children: [
19411
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground", children: label }),
19412
- /* @__PURE__ */ jsxs(
19413
- "span",
19414
- {
19415
- className: cn(
19416
- "inline-flex items-center gap-1 rounded-sm px-2.5 py-1 text-[0.72rem] font-semibold tracking-[0.12em] uppercase",
19417
- status === "pass" && "bg-success-700 text-white",
19418
- status === "fail" && "bg-danger-700 text-white",
19419
- status === "unavailable" && "bg-grey-100 text-foreground"
19420
- ),
19421
- children: [
19422
- status === "pass" ? /* @__PURE__ */ jsx(Icons.check, { "data-slot": "icon", className: "size-4" }) : status === "fail" ? /* @__PURE__ */ jsx(Icons.close, { "data-slot": "icon", className: "size-4" }) : /* @__PURE__ */ jsx(Icons.info, { "data-slot": "icon", className: "size-4" }),
19423
- status === "pass" ? "Pass" : status === "fail" ? "Fail" : "Unavailable"
19424
- ]
19425
- }
19426
- )
19427
- ]
19428
- }
19429
- );
19430
- }
19431
- function AccessibilitySummaryCard({ pair }) {
19432
- return /* @__PURE__ */ jsx(Card, { className: "gap-4 px-5 py-5", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5 lg:flex-row lg:items-start lg:justify-between", children: [
19433
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
19434
- /* @__PURE__ */ jsx(Heading, { level: 2, size: 6, className: "text-foreground", trim: "normal", children: "Accessibility summary" }),
19435
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
19436
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-grey-700", children: "Contrast ratio" }),
19437
- /* @__PURE__ */ jsx("p", { className: "text-4xl leading-none font-bold text-foreground", children: pair ? `${pair.contrastRatio.toFixed(2)}:1` : "N/A" })
19438
- ] })
19439
- ] }),
19440
- /* @__PURE__ */ jsxs("div", { className: "grid gap-3 lg:max-w-[26rem] lg:min-w-[22rem]", children: [
19441
- /* @__PURE__ */ jsx(
19442
- CompactAccessibilityStatus,
19443
- {
19444
- label: "AAA normal text",
19445
- passes: pair ? pair.passes.aaaText : null
19446
- }
19447
- ),
19448
- /* @__PURE__ */ jsx(
19449
- CompactAccessibilityStatus,
19450
- {
19451
- label: "AAA large text",
19452
- passes: pair ? pair.passes.aaaLarge : null
19453
- }
19454
- )
19455
- ] })
19456
- ] }) });
19457
- }
19458
19402
  function CurrentResultCard2({
19459
19403
  bestPair,
19460
19404
  copiedKey,
@@ -19465,8 +19409,8 @@ function CurrentResultCard2({
19465
19409
  }) {
19466
19410
  const previewForeground = pair?.foreground.hex ?? getReadableTextColor3(selectedBackground.tone);
19467
19411
  const isRecommended = pair ? pair.id === bestPair?.id : false;
19468
- const whiteForeground = pair ? isWhiteForegroundPair4(pair) : false;
19469
19412
  const pairingLabel = getMainPairingLabel(pair, bestPair);
19413
+ const accessibilitySummary = getAccessibilitySummaryLine(pair);
19470
19414
  const fauxButtonStyle = pair ? {
19471
19415
  "--btn-bg": pair.foreground.hex,
19472
19416
  "--btn-border": pair.foreground.hex,
@@ -19474,74 +19418,79 @@ function CurrentResultCard2({
19474
19418
  "--btn-icon": pair.background.hex,
19475
19419
  "--btn-hover-overlay": pair.background.hex
19476
19420
  } : null;
19477
- return /* @__PURE__ */ jsxs(Card, { className: cn("gap-0 overflow-hidden py-0", isRecommended && "border-primary-200"), children: [
19478
- /* @__PURE__ */ jsx("div", { className: "border-b border-grey-200 px-4 py-4 sm:px-6 sm:py-5", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between", children: [
19479
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-3", children: [
19480
- /* @__PURE__ */ jsxs(
19481
- "span",
19482
- {
19483
- className: cn(
19484
- "inline-flex items-center gap-2 rounded-sm px-3 py-1 text-[0.72rem] font-semibold tracking-[0.12em] uppercase",
19485
- isRecommended ? "bg-primary-800 text-white" : "border border-grey-300 bg-grey-50 text-foreground"
19486
- ),
19487
- children: [
19488
- isRecommended ? /* @__PURE__ */ jsx(Icons.check_circle, { "data-slot": "icon", className: "size-4" }) : /* @__PURE__ */ jsx(Icons.info, { "data-slot": "icon", className: "size-4" }),
19489
- pairingLabel
19490
- ]
19491
- }
19492
- ),
19493
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
19494
- /* @__PURE__ */ jsx(Heading, { level: 2, size: 4, className: "text-foreground", trim: "normal", children: pair ? `${getPairingColorDisplayName4(pair.foreground)} on ${getPairingColorDisplayName4(pair.background)}` : `${getPairingColorDisplayName4(selectedBackground)} selected` }),
19495
- /* @__PURE__ */ jsx(Text, { size: 2, className: "max-w-3xl text-grey-700", children: supportText })
19496
- ] })
19497
- ] }),
19498
- pair ? /* @__PURE__ */ jsx(
19499
- Button2,
19500
- {
19501
- color: "primary",
19502
- className: "w-full justify-center lg:w-auto lg:min-w-48",
19503
- onClick: onCopyPairing,
19504
- children: copiedKey === "current-pairing" ? /* @__PURE__ */ jsxs(Fragment, { children: [
19505
- /* @__PURE__ */ jsx(Icons.check, { "data-slot": "icon", className: "size-5" }),
19506
- "Pairing copied"
19507
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
19508
- /* @__PURE__ */ jsx(Icons.content_copy, { "data-slot": "icon", className: "size-5" }),
19509
- "Copy pairing"
19510
- ] })
19511
- }
19512
- ) : null
19513
- ] }) }),
19514
- /* @__PURE__ */ jsx(
19515
- "div",
19516
- {
19517
- className: "p-4 sm:min-h-[26rem] sm:p-8",
19518
- style: {
19519
- backgroundColor: selectedBackground.hex,
19520
- color: previewForeground
19521
- },
19522
- children: /* @__PURE__ */ jsx("div", { className: "flex min-h-[18rem] flex-col justify-center gap-6 sm:min-h-[22rem]", children: /* @__PURE__ */ jsxs("div", { className: "max-w-xl space-y-4", children: [
19523
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: pair ? whiteForeground && !isRecommended ? "White on colour example" : whiteForeground ? "White on colour" : "Colour on colour" : "Approved background" }),
19524
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
19525
- /* @__PURE__ */ jsx("h3", { className: "max-w-lg text-3xl leading-tight font-bold text-current sm:text-5xl sm:leading-none", children: "Pair colour with confidence." }),
19526
- /* @__PURE__ */ jsx("p", { className: "max-w-full text-base/6 sm:max-w-md sm:text-base/7", children: pair ? getPreviewGuidance4(pair, isRecommended) : "This approved background tone does not currently have a recommended AAA foreground in this tool. Choose another approved background tone to continue." }),
19527
- pair && fauxButtonStyle ? /* @__PURE__ */ jsx(
19421
+ return /* @__PURE__ */ jsx(Card, { className: cn("gap-0 overflow-hidden py-0", isRecommended && "border-primary-200"), children: /* @__PURE__ */ jsx(
19422
+ "div",
19423
+ {
19424
+ className: "p-4 sm:min-h-[24rem] sm:p-8",
19425
+ style: {
19426
+ backgroundColor: selectedBackground.hex,
19427
+ color: previewForeground
19428
+ },
19429
+ children: /* @__PURE__ */ jsxs("div", { className: "flex min-h-[18rem] flex-col justify-between gap-8 sm:min-h-[20rem]", children: [
19430
+ /* @__PURE__ */ jsx("div", { className: "max-w-3xl rounded-sm bg-white px-4 py-4 text-foreground sm:px-6 sm:py-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5 lg:flex-row lg:items-start lg:justify-between", children: [
19431
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-4", children: [
19432
+ /* @__PURE__ */ jsxs(
19528
19433
  "span",
19529
19434
  {
19530
- "aria-hidden": "true",
19531
- "data-variant": "solid",
19532
19435
  className: cn(
19533
- buttonVariants({ variant: "solid", size: "default" }),
19534
- "pointer-events-none cursor-default px-6 text-[16px] font-[700] select-none sm:px-6 sm:text-[16px] sm:font-[700]"
19436
+ "inline-flex items-center gap-2 rounded-sm px-3 py-1 text-[0.72rem] font-semibold tracking-[0.12em] uppercase",
19437
+ isRecommended ? "bg-primary-800 text-white" : "border border-grey-300 bg-grey-50 text-foreground"
19535
19438
  ),
19536
- style: fauxButtonStyle,
19537
- children: "Get started"
19439
+ children: [
19440
+ isRecommended ? /* @__PURE__ */ jsx(Icons.check_circle, { "data-slot": "icon", className: "size-4" }) : /* @__PURE__ */ jsx(Icons.info, { "data-slot": "icon", className: "size-4" }),
19441
+ pairingLabel
19442
+ ]
19538
19443
  }
19539
- ) : null
19540
- ] })
19541
- ] }) })
19542
- }
19543
- )
19544
- ] });
19444
+ ),
19445
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
19446
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: 4, className: "text-foreground", trim: "normal", children: pair ? `${getPairingColorDisplayName4(pair.foreground)} on ${getPairingColorDisplayName4(pair.background)}` : `${getPairingColorDisplayName4(selectedBackground)} selected` }),
19447
+ pair ? /* @__PURE__ */ jsxs("p", { className: "font-mono text-[0.74rem] break-all text-muted-foreground", children: [
19448
+ pair.foreground.token,
19449
+ " on ",
19450
+ pair.background.token
19451
+ ] }) : /* @__PURE__ */ jsx("p", { className: "font-mono text-[0.74rem] break-all text-muted-foreground", children: selectedBackground.token }),
19452
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground", children: accessibilitySummary }),
19453
+ /* @__PURE__ */ jsx(Text, { size: 2, className: "max-w-3xl text-grey-700", children: supportText })
19454
+ ] })
19455
+ ] }),
19456
+ pair ? /* @__PURE__ */ jsx(
19457
+ Button2,
19458
+ {
19459
+ color: "primary",
19460
+ className: "w-full justify-center lg:w-auto lg:min-w-48",
19461
+ onClick: onCopyPairing,
19462
+ children: copiedKey === "current-pairing" ? /* @__PURE__ */ jsxs(Fragment, { children: [
19463
+ /* @__PURE__ */ jsx(Icons.check, { "data-slot": "icon", className: "size-5" }),
19464
+ "Pairing copied"
19465
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
19466
+ /* @__PURE__ */ jsx(Icons.content_copy, { "data-slot": "icon", className: "size-5" }),
19467
+ "Copy pairing"
19468
+ ] })
19469
+ }
19470
+ ) : null
19471
+ ] }) }),
19472
+ /* @__PURE__ */ jsxs("div", { className: "max-w-xl space-y-4", children: [
19473
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
19474
+ /* @__PURE__ */ jsx("h3", { className: "max-w-lg text-3xl leading-tight font-bold text-current sm:text-4xl", children: "Example heading" }),
19475
+ /* @__PURE__ */ jsx("p", { className: "max-w-md text-base/7", children: pair ? getPreviewGuidance4(pair, isRecommended) : "This approved background does not currently have an AAA foreground in this tool. Choose another approved background to continue." })
19476
+ ] }),
19477
+ pair && fauxButtonStyle ? /* @__PURE__ */ jsx(
19478
+ "span",
19479
+ {
19480
+ "aria-hidden": "true",
19481
+ "data-variant": "solid",
19482
+ className: cn(
19483
+ buttonVariants({ variant: "solid", size: "default" }),
19484
+ "pointer-events-none cursor-default self-start px-6 text-[16px] font-[700] select-none sm:px-6 sm:text-[16px] sm:font-[700]"
19485
+ ),
19486
+ style: fauxButtonStyle,
19487
+ children: "Primary action"
19488
+ }
19489
+ ) : null
19490
+ ] })
19491
+ ] })
19492
+ }
19493
+ ) });
19545
19494
  }
19546
19495
  function RecommendationCard2({
19547
19496
  copiedKey,
@@ -19555,8 +19504,8 @@ function RecommendationCard2({
19555
19504
  "div",
19556
19505
  {
19557
19506
  className: cn(
19558
- "relative rounded-sm border bg-white p-4 text-left transition-colors focus-visible:ring-2 focus-visible:ring-primary-700 focus-visible:ring-offset-2 focus-visible:outline-hidden",
19559
- isSelected ? "border-primary-800 bg-primary-50/60 ring-1 ring-primary-700" : "border-grey-200 hover:border-primary-500 hover:bg-grey-50"
19507
+ "relative rounded-sm border bg-white px-3 py-2.5 text-left transition-colors focus-visible:ring-2 focus-visible:ring-primary-700 focus-visible:ring-offset-2 focus-visible:outline-hidden",
19508
+ isSelected ? "border-primary-800 bg-primary-50/40" : "border-grey-200 hover:border-grey-400"
19560
19509
  ),
19561
19510
  children: [
19562
19511
  /* @__PURE__ */ jsx(
@@ -19569,65 +19518,45 @@ function RecommendationCard2({
19569
19518
  className: "absolute inset-0 rounded-sm focus-visible:ring-2 focus-visible:ring-primary-700 focus-visible:ring-offset-2 focus-visible:outline-hidden"
19570
19519
  }
19571
19520
  ),
19572
- /* @__PURE__ */ jsxs("div", { className: "pointer-events-none relative z-10", children: [
19573
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
19574
- /* @__PURE__ */ jsxs(
19575
- "span",
19576
- {
19577
- className: cn(
19578
- "inline-flex items-center gap-2 rounded-sm px-2.5 py-1 text-[0.68rem] font-semibold tracking-[0.12em] uppercase",
19579
- item.category === "best" ? "bg-primary-800 text-white" : "border border-grey-300 bg-grey-50 text-foreground"
19580
- ),
19581
- children: [
19582
- item.category === "best" ? /* @__PURE__ */ jsx(Icons.check_circle, { "data-slot": "icon", className: "size-4" }) : /* @__PURE__ */ jsx(Icons.info, { "data-slot": "icon", className: "size-4" }),
19583
- item.categoryLabel
19584
- ]
19585
- }
19586
- ),
19587
- /* @__PURE__ */ jsx("div", { className: "pointer-events-auto shrink-0 self-start", children: /* @__PURE__ */ jsxs(
19588
- Button2,
19589
- {
19590
- variant: "ghost",
19591
- color: "grey",
19592
- size: "sm",
19593
- onClick: onCopyPairing,
19594
- "aria-label": `Copy pairing ${pair.background.token} and ${pair.foreground.token}`,
19595
- children: [
19596
- /* @__PURE__ */ jsx(Icons.content_copy, { "data-slot": "icon", className: "size-5" }),
19597
- copiedKey === `pair:${pair.id}` ? "Copied" : "Copy"
19598
- ]
19599
- }
19600
- ) })
19521
+ /* @__PURE__ */ jsxs("div", { className: "pointer-events-none relative z-10 flex items-start gap-3", children: [
19522
+ /* @__PURE__ */ jsxs("div", { className: "mt-0.5 w-12 shrink-0 overflow-hidden rounded-[2px] border border-black/10", children: [
19523
+ /* @__PURE__ */ jsx("div", { className: "h-9 w-full", style: { backgroundColor: pair.background.hex } }),
19524
+ /* @__PURE__ */ jsx("div", { className: "h-2.5 w-full", style: { backgroundColor: pair.foreground.hex } })
19601
19525
  ] }),
19602
- /* @__PURE__ */ jsxs("div", { className: "mt-4", children: [
19603
- /* @__PURE__ */ jsxs("div", { className: "grid gap-4 sm:grid-cols-[7.5rem_minmax(0,1fr)]", children: [
19604
- /* @__PURE__ */ jsxs("div", { className: "overflow-hidden rounded-[2px] border border-black/10", children: [
19605
- /* @__PURE__ */ jsx("div", { className: "h-20 w-full", style: { backgroundColor: pair.background.hex } }),
19606
- /* @__PURE__ */ jsx("div", { className: "h-6 w-full", style: { backgroundColor: pair.foreground.hex } })
19526
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
19527
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
19528
+ /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold text-foreground", children: [
19529
+ getPairingColorDisplayName4(pair.foreground),
19530
+ " on",
19531
+ " ",
19532
+ getPairingColorDisplayName4(pair.background)
19607
19533
  ] }),
19608
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-2", children: [
19609
- /* @__PURE__ */ jsxs("div", { children: [
19610
- /* @__PURE__ */ jsx("p", { className: "text-base font-semibold text-foreground", children: getPairingColorDisplayName4(pair.foreground) }),
19611
- /* @__PURE__ */ jsx("p", { className: "mt-1 font-mono text-[0.74rem] break-all text-muted-foreground", children: pair.foreground.token })
19612
- ] }),
19613
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
19614
- pair.foreground.familyLabel,
19615
- " on ",
19616
- pair.background.familyLabel
19617
- ] })
19618
- ] })
19534
+ item.category === "best" ? /* @__PURE__ */ jsx("span", { className: "inline-flex rounded-sm bg-primary-800 px-2 py-1 text-[0.68rem] font-semibold tracking-[0.12em] text-white uppercase", children: "Default" }) : null,
19535
+ isSelected ? /* @__PURE__ */ jsx("span", { className: "inline-flex rounded-sm border border-primary-800 px-2 py-1 text-[0.68rem] font-semibold tracking-[0.12em] text-primary-800 uppercase", children: "Current" }) : null
19619
19536
  ] }),
19620
- /* @__PURE__ */ jsxs("div", { className: "mt-4 flex flex-col items-start gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between", children: [
19621
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
19622
- /* @__PURE__ */ jsxs("span", { className: "inline-flex rounded-sm border border-grey-300 px-2.5 py-1 text-sm font-semibold text-foreground", children: [
19623
- pair.contrastRatio.toFixed(2),
19624
- ":1"
19625
- ] }),
19626
- /* @__PURE__ */ jsx("span", { className: "inline-flex rounded-sm bg-success-700 px-2.5 py-1 text-[0.72rem] font-semibold tracking-[0.12em] text-white uppercase", children: "AAA" })
19627
- ] }),
19628
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-primary-800", children: isSelected ? "Selected answer" : "Use pairing" })
19537
+ /* @__PURE__ */ jsxs("p", { className: "font-mono text-[0.72rem] break-all text-muted-foreground", children: [
19538
+ pair.foreground.token,
19539
+ " on ",
19540
+ pair.background.token
19541
+ ] }),
19542
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
19543
+ pair.contrastRatio.toFixed(2),
19544
+ ":1 contrast"
19629
19545
  ] })
19630
- ] })
19546
+ ] }),
19547
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-auto shrink-0 self-start", children: /* @__PURE__ */ jsx(
19548
+ Button2,
19549
+ {
19550
+ variant: "ghost",
19551
+ color: "grey",
19552
+ size: "icon",
19553
+ className: "size-8 text-muted-foreground hover:text-foreground",
19554
+ onClick: onCopyPairing,
19555
+ "aria-label": `Copy pairing ${pair.background.token} and ${pair.foreground.token}`,
19556
+ title: copiedKey === `pair:${pair.id}` ? "Copied" : "Copy pairing",
19557
+ children: copiedKey === `pair:${pair.id}` ? /* @__PURE__ */ jsx(Icons.check, { "data-slot": "icon", className: "size-4" }) : /* @__PURE__ */ jsx(Icons.content_copy, { "data-slot": "icon", className: "size-4" })
19558
+ }
19559
+ ) })
19631
19560
  ] })
19632
19561
  ]
19633
19562
  }
@@ -19638,20 +19567,14 @@ function RecommendationGroupSection({
19638
19567
  description,
19639
19568
  title
19640
19569
  }) {
19641
- return /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
19642
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
19570
+ return /* @__PURE__ */ jsxs("section", { className: "space-y-2", children: [
19571
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
19643
19572
  /* @__PURE__ */ jsx(Heading, { level: 3, size: 6, className: "text-foreground", trim: "normal", children: title }),
19644
- /* @__PURE__ */ jsx(Text, { size: 2, children: description })
19573
+ /* @__PURE__ */ jsx(Text, { size: 2, className: "text-muted-foreground", children: description })
19645
19574
  ] }),
19646
19575
  children
19647
19576
  ] });
19648
19577
  }
19649
- function DrawerSummaryItem({ label, value }) {
19650
- return /* @__PURE__ */ jsxs("div", { className: "space-y-1 border-t border-grey-200 pt-3 first:border-t-0 first:pt-0", children: [
19651
- /* @__PURE__ */ jsx("p", { className: "text-[0.72rem] font-semibold tracking-[0.12em] text-muted-foreground uppercase", children: label }),
19652
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground", children: value })
19653
- ] });
19654
- }
19655
19578
  function TechnicalDetailsPanel2({
19656
19579
  color: color2,
19657
19580
  copiedKey,
@@ -19761,11 +19684,12 @@ function ColorPairingToolV4Content({
19761
19684
  const [selectedPairId, setSelectedPairId] = useState(initialState.selectedPairId);
19762
19685
  const [drawerStepIndex, setDrawerStepIndex] = useState(0);
19763
19686
  const [isCompactControlsOpen, setIsCompactControlsOpen] = useState(false);
19687
+ const [isShowingAllAlternatives, setIsShowingAllAlternatives] = useState(false);
19688
+ const [isTechnicalDetailsOpen, setIsTechnicalDetailsOpen] = useState(false);
19764
19689
  const [, copyToClipboardRaw] = useCopyToClipboard();
19765
19690
  const [copiedKey, setCopiedKey] = useState(null);
19766
19691
  const copiedKeyTimeoutRef = useRef(null);
19767
19692
  const resultSectionRef = useRef(null);
19768
- const technicalDetailsSectionRef = useRef(null);
19769
19693
  const noValidStateRef = useRef(/* @__PURE__ */ new Set());
19770
19694
  const technicalDetailsViewedRef = useRef(false);
19771
19695
  const emitAnalyticsEvent = useCallback(
@@ -19848,7 +19772,6 @@ function ColorPairingToolV4Content({
19848
19772
  const category = getRecommendationCategory2(pair, bestRecommendedPair, context);
19849
19773
  return {
19850
19774
  category,
19851
- categoryLabel: getRecommendationCategoryLabel2(category),
19852
19775
  pair
19853
19776
  };
19854
19777
  }).sort(
@@ -19861,6 +19784,37 @@ function ColorPairingToolV4Content({
19861
19784
  ),
19862
19785
  [recommendationItems, selectedPair?.id]
19863
19786
  );
19787
+ const visibleAlternativeRecommendationGroups = useMemo(() => {
19788
+ if (isShowingAllAlternatives) {
19789
+ return alternativeRecommendationGroups;
19790
+ }
19791
+ let remaining = INITIAL_VISIBLE_ALTERNATIVES;
19792
+ return alternativeRecommendationGroups.reduce((groups, group) => {
19793
+ if (remaining <= 0) {
19794
+ return groups;
19795
+ }
19796
+ const items = group.items.slice(0, remaining);
19797
+ if (items.length > 0) {
19798
+ groups.push({
19799
+ ...group,
19800
+ items
19801
+ });
19802
+ remaining -= items.length;
19803
+ }
19804
+ return groups;
19805
+ }, []);
19806
+ }, [alternativeRecommendationGroups, isShowingAllAlternatives]);
19807
+ const hiddenAlternativeCount = useMemo(() => {
19808
+ const totalAlternatives = alternativeRecommendationGroups.reduce(
19809
+ (count, group) => count + group.items.length,
19810
+ 0
19811
+ );
19812
+ const visibleAlternatives = visibleAlternativeRecommendationGroups.reduce(
19813
+ (count, group) => count + group.items.length,
19814
+ 0
19815
+ );
19816
+ return Math.max(0, totalAlternatives - visibleAlternatives);
19817
+ }, [alternativeRecommendationGroups, visibleAlternativeRecommendationGroups]);
19864
19818
  const liveAnnouncement = useMemo(
19865
19819
  () => getLiveAnnouncement2(previewPair, selectedBackground),
19866
19820
  [previewPair, selectedBackground]
@@ -19968,6 +19922,7 @@ function ColorPairingToolV4Content({
19968
19922
  selectedBackgroundToken,
19969
19923
  null
19970
19924
  );
19925
+ setIsShowingAllAlternatives(false);
19971
19926
  applyResolvedSelection(nextState);
19972
19927
  emitAnalyticsEvent({
19973
19928
  name: "palette_change",
@@ -19987,6 +19942,7 @@ function ColorPairingToolV4Content({
19987
19942
  selectedBackgroundToken,
19988
19943
  null
19989
19944
  );
19945
+ setIsShowingAllAlternatives(false);
19990
19946
  applyResolvedSelection(nextState);
19991
19947
  emitAnalyticsEvent({
19992
19948
  name: "primary_change",
@@ -20006,6 +19962,7 @@ function ColorPairingToolV4Content({
20006
19962
  selectedBackgroundToken,
20007
19963
  null
20008
19964
  );
19965
+ setIsShowingAllAlternatives(false);
20009
19966
  applyResolvedSelection(nextState);
20010
19967
  emitAnalyticsEvent({
20011
19968
  name: "accent_change",
@@ -20026,6 +19983,7 @@ function ColorPairingToolV4Content({
20026
19983
  selectedPairId: nextSelectedPairId,
20027
19984
  themeCategory
20028
19985
  };
19986
+ setIsShowingAllAlternatives(false);
20029
19987
  applyResolvedSelection(nextState);
20030
19988
  emitAnalyticsEvent({
20031
19989
  name: "background_selection",
@@ -20099,50 +20057,17 @@ function ColorPairingToolV4Content({
20099
20057
  themeCategory
20100
20058
  ]);
20101
20059
  useEffect(() => {
20102
- if (technicalDetailsViewedRef.current) {
20060
+ if (!isTechnicalDetailsOpen || technicalDetailsViewedRef.current) {
20103
20061
  return;
20104
20062
  }
20105
- const section = technicalDetailsSectionRef.current;
20106
- if (!section) {
20107
- return;
20108
- }
20109
- const emitViewedEvent = () => {
20110
- if (technicalDetailsViewedRef.current) {
20111
- return;
20112
- }
20113
- technicalDetailsViewedRef.current = true;
20114
- emitAnalyticsEvent({
20115
- name: "technical_details_viewed",
20116
- ...buildAnalyticsContext({
20117
- source: "details"
20118
- })
20119
- });
20120
- };
20121
- if (typeof IntersectionObserver === "undefined") {
20122
- const rect = section.getBoundingClientRect();
20123
- const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
20124
- if (rect.top < viewportHeight && rect.bottom > 0) {
20125
- emitViewedEvent();
20126
- }
20127
- return;
20128
- }
20129
- const observer = new IntersectionObserver(
20130
- (entries) => {
20131
- const [entry] = entries;
20132
- if (entry?.isIntersecting) {
20133
- emitViewedEvent();
20134
- observer.disconnect();
20135
- }
20136
- },
20137
- {
20138
- threshold: 0.2
20139
- }
20140
- );
20141
- observer.observe(section);
20142
- return () => {
20143
- observer.disconnect();
20144
- };
20145
- }, [buildAnalyticsContext, emitAnalyticsEvent]);
20063
+ technicalDetailsViewedRef.current = true;
20064
+ emitAnalyticsEvent({
20065
+ name: "technical_details_viewed",
20066
+ ...buildAnalyticsContext({
20067
+ source: "details"
20068
+ })
20069
+ });
20070
+ }, [buildAnalyticsContext, emitAnalyticsEvent, isTechnicalDetailsOpen]);
20146
20071
  if (!selectedBackground) {
20147
20072
  return /* @__PURE__ */ jsxs(Card, { className: "px-6 py-6", children: [
20148
20073
  /* @__PURE__ */ jsx(Heading, { level: 2, size: 5, className: "text-foreground", trim: "normal", children: "No approved background tones available" }),
@@ -20288,36 +20213,10 @@ function ColorPairingToolV4Content({
20288
20213
  },
20289
20214
  group.key
20290
20215
  )) }) }),
20291
- /* @__PURE__ */ jsx("section", { className: "h-full w-full shrink-0 overflow-y-auto px-5 py-5", children: /* @__PURE__ */ jsxs("div", { className: "space-y-6 pr-1", children: [
20292
- /* @__PURE__ */ jsxs("div", { className: "rounded-sm border border-grey-200 bg-white px-4 py-4", children: [
20293
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
20294
- /* @__PURE__ */ jsx(Heading, { level: 4, size: 6, className: "text-foreground", trim: "normal", children: "Current configuration" }),
20295
- /* @__PURE__ */ jsx(Text, { size: 2, children: "The drawer only sets the palette, families, and background. The result panel is where the pairing is shown and, if needed, overridden." })
20296
- ] }),
20297
- /* @__PURE__ */ jsxs("div", { className: "mt-5 space-y-3", children: [
20298
- /* @__PURE__ */ jsx(
20299
- DrawerSummaryItem,
20300
- {
20301
- label: "Palette",
20302
- value: themeCategory === "brand" ? "Brand palette" : "Aboriginal palette"
20303
- }
20304
- ),
20305
- /* @__PURE__ */ jsx(DrawerSummaryItem, { label: "Primary family", value: context.primary.label }),
20306
- /* @__PURE__ */ jsx(DrawerSummaryItem, { label: "Accent family", value: context.accent.label }),
20307
- /* @__PURE__ */ jsx(
20308
- DrawerSummaryItem,
20309
- {
20310
- label: "Background",
20311
- value: getPairingColorDisplayName4(selectedBackground)
20312
- }
20313
- )
20314
- ] })
20315
- ] }),
20316
- /* @__PURE__ */ jsx("div", { className: "rounded-sm border border-grey-200 bg-grey-50 px-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
20317
- /* @__PURE__ */ jsx(Heading, { level: 4, size: 6, className: "text-foreground", trim: "normal", children: "Review the result on the right" }),
20318
- /* @__PURE__ */ jsx(Text, { size: 2, children: "The right panel always shows the current NSW default pairing for this selection. Alternative AAA options stay there as a secondary override path." })
20319
- ] }) })
20320
- ] }) })
20216
+ /* @__PURE__ */ jsx("section", { className: "h-full w-full shrink-0 overflow-y-auto px-5 py-5", children: /* @__PURE__ */ jsx("div", { className: "space-y-4 pr-1", children: /* @__PURE__ */ jsx("div", { className: "rounded-sm border border-grey-200 bg-grey-50 px-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
20217
+ /* @__PURE__ */ jsx(Heading, { level: 4, size: 6, className: "text-foreground", trim: "normal", children: "Review the result on the right" }),
20218
+ /* @__PURE__ */ jsx(Text, { size: 2, children: "The right panel shows one recommended pairing first. Use approved alternatives there only when you need a different tone or emphasis." })
20219
+ ] }) }) }) })
20321
20220
  ]
20322
20221
  }
20323
20222
  ) }),
@@ -20355,7 +20254,7 @@ function ColorPairingToolV4Content({
20355
20254
  /* @__PURE__ */ jsx(Card, { className: "gap-4 px-5 py-5", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between", children: [
20356
20255
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
20357
20256
  /* @__PURE__ */ jsx(Heading, { level: 2, size: 5, className: "text-foreground", trim: "normal", children: "Configuration" }),
20358
- /* @__PURE__ */ jsx(Text, { size: 2, children: "Open the drawer to change palette, colour families, or background. The result panel always shows the current NSW pairing for this selection." }),
20257
+ /* @__PURE__ */ jsx(Text, { size: 2, children: "Open the drawer to set palette, colour families, and background. The result panel shows the NSW recommendation first." }),
20359
20258
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: compactControlsSummary })
20360
20259
  ] }),
20361
20260
  /* @__PURE__ */ jsxs(
@@ -20410,53 +20309,99 @@ function ColorPairingToolV4Content({
20410
20309
  }
20411
20310
  )
20412
20311
  ] }),
20413
- /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(AccessibilitySummaryCard, { pair: previewPair }) }),
20414
- bestRecommendedPair || alternativeRecommendationGroups.length > 0 ? /* @__PURE__ */ jsxs("section", { className: "space-y-6", children: [
20415
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
20416
- /* @__PURE__ */ jsx(Heading, { level: 2, size: 5, className: "text-foreground", trim: "normal", children: "Alternative AAA options" }),
20417
- /* @__PURE__ */ jsx(Text, { size: 2, children: "These approved alternatives can be used when a different tone, stronger emphasis, or a more neutral system treatment is needed." })
20312
+ bestRecommendedPair || alternativeRecommendationGroups.length > 0 ? /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
20313
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
20314
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: 5, className: "text-foreground", trim: "normal", children: "Approved alternatives" }),
20315
+ /* @__PURE__ */ jsx(Text, { size: 2, className: "text-muted-foreground", children: "These are approved alternatives for different tone or emphasis." })
20418
20316
  ] }),
20419
- alternativeRecommendationGroups.length > 0 ? alternativeRecommendationGroups.map((group) => /* @__PURE__ */ jsx(
20420
- RecommendationGroupSection,
20421
- {
20422
- title: group.title,
20423
- description: group.description,
20424
- children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: group.items.map((item) => /* @__PURE__ */ jsx(
20425
- RecommendationCard2,
20426
- {
20427
- copiedKey,
20428
- item,
20429
- isSelected: item.pair.id === selectedPair?.id,
20430
- onCopyPairing: () => copyValue(
20431
- `pair:${item.pair.id}`,
20432
- getPairingCopyText2(item.pair),
20433
- "Pairing copied",
20434
- item.pair.id === bestRecommendedPair?.id ? {
20435
- name: "best_recommendation_copied",
20436
- ...buildAnalyticsContext({
20437
- foregroundToken: item.pair.foreground.token,
20438
- pairId: item.pair.id,
20439
- source: "recommendations-list"
20440
- })
20441
- } : void 0
20442
- ),
20443
- onSelect: () => handlePairChange(item.pair.id, "recommendations-list")
20444
- },
20445
- item.pair.id
20446
- )) })
20447
- },
20448
- group.id
20449
- )) : /* @__PURE__ */ jsxs(Card, { className: "px-6 py-6", children: [
20317
+ alternativeRecommendationGroups.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
20318
+ visibleAlternativeRecommendationGroups.map((group) => /* @__PURE__ */ jsx(
20319
+ RecommendationGroupSection,
20320
+ {
20321
+ title: group.title,
20322
+ description: group.description,
20323
+ children: /* @__PURE__ */ jsx("div", { className: "space-y-2", children: group.items.map((item) => /* @__PURE__ */ jsx(
20324
+ RecommendationCard2,
20325
+ {
20326
+ copiedKey,
20327
+ item,
20328
+ isSelected: item.pair.id === selectedPair?.id,
20329
+ onCopyPairing: () => copyValue(
20330
+ `pair:${item.pair.id}`,
20331
+ getPairingCopyText2(item.pair),
20332
+ "Pairing copied",
20333
+ item.pair.id === bestRecommendedPair?.id ? {
20334
+ name: "best_recommendation_copied",
20335
+ ...buildAnalyticsContext({
20336
+ foregroundToken: item.pair.foreground.token,
20337
+ pairId: item.pair.id,
20338
+ source: "recommendations-list"
20339
+ })
20340
+ } : void 0
20341
+ ),
20342
+ onSelect: () => handlePairChange(item.pair.id, "recommendations-list")
20343
+ },
20344
+ item.pair.id
20345
+ )) })
20346
+ },
20347
+ group.id
20348
+ )),
20349
+ hiddenAlternativeCount > 0 ? /* @__PURE__ */ jsxs(
20350
+ Button2,
20351
+ {
20352
+ variant: "ghost",
20353
+ color: "grey",
20354
+ className: "w-full justify-center border border-grey-200 bg-white sm:w-auto",
20355
+ onClick: () => setIsShowingAllAlternatives(true),
20356
+ children: [
20357
+ "Show ",
20358
+ hiddenAlternativeCount,
20359
+ " more"
20360
+ ]
20361
+ }
20362
+ ) : null
20363
+ ] }) : /* @__PURE__ */ jsxs(Card, { className: "px-6 py-6", children: [
20450
20364
  /* @__PURE__ */ jsx(Heading, { level: 3, size: 6, className: "text-foreground", trim: "normal", children: "No other AAA alternatives" }),
20451
20365
  /* @__PURE__ */ jsx(Text, { size: 2, className: "mt-3", children: "The NSW recommended pairing is the only AAA-compliant foreground option for this background." })
20452
20366
  ] })
20453
20367
  ] }) : null,
20454
- /* @__PURE__ */ jsx("section", { ref: technicalDetailsSectionRef, className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "rounded-sm border border-grey-200 bg-white", children: [
20455
- /* @__PURE__ */ jsxs("div", { className: "space-y-2 border-b border-grey-200 px-4 py-4 sm:px-5", children: [
20456
- /* @__PURE__ */ jsx(Heading, { level: 2, size: 5, className: "text-foreground", trim: "normal", children: "Technical colour values" }),
20457
- /* @__PURE__ */ jsx(Text, { size: 2, children: "Token, tone, HEX, RGB, HSL, and OKLCH values for the current selection." })
20458
- ] }),
20459
- /* @__PURE__ */ jsx("div", { className: "px-4 py-4 sm:px-5", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
20368
+ /* @__PURE__ */ jsx("section", { className: "space-y-3", children: /* @__PURE__ */ jsx(Collapsible, { open: isTechnicalDetailsOpen, onOpenChange: setIsTechnicalDetailsOpen, children: /* @__PURE__ */ jsxs("div", { className: "rounded-sm border border-grey-200 bg-white", children: [
20369
+ /* @__PURE__ */ jsx(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs(
20370
+ "button",
20371
+ {
20372
+ type: "button",
20373
+ className: "flex w-full items-center justify-between gap-4 px-4 py-4 text-left transition-colors hover:bg-grey-50 focus-visible:ring-2 focus-visible:ring-primary-700 focus-visible:ring-offset-2 focus-visible:outline-hidden sm:px-5",
20374
+ children: [
20375
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
20376
+ /* @__PURE__ */ jsx(Heading, { level: 2, size: 6, className: "text-foreground", trim: "normal", children: "Technical colour values" }),
20377
+ /* @__PURE__ */ jsx(Text, { size: 2, className: "text-muted-foreground", children: "Token, tone, HEX, RGB, HSL, and OKLCH values for advanced use." })
20378
+ ] }),
20379
+ /* @__PURE__ */ jsxs(
20380
+ "span",
20381
+ {
20382
+ className: cn(
20383
+ "inline-flex items-center gap-2 text-sm font-semibold text-primary-800",
20384
+ isTechnicalDetailsOpen && "text-foreground"
20385
+ ),
20386
+ children: [
20387
+ isTechnicalDetailsOpen ? "Hide" : "Show",
20388
+ /* @__PURE__ */ jsx(
20389
+ Icons.keyboard_arrow_down,
20390
+ {
20391
+ "data-slot": "icon",
20392
+ className: cn(
20393
+ "size-5 transition-transform",
20394
+ isTechnicalDetailsOpen && "rotate-180"
20395
+ )
20396
+ }
20397
+ )
20398
+ ]
20399
+ }
20400
+ )
20401
+ ]
20402
+ }
20403
+ ) }),
20404
+ /* @__PURE__ */ jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsx("div", { className: "border-t border-grey-200 px-4 py-4 sm:px-5", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
20460
20405
  /* @__PURE__ */ jsx(
20461
20406
  TechnicalDetailsPanel2,
20462
20407
  {
@@ -20477,20 +20422,20 @@ function ColorPairingToolV4Content({
20477
20422
  onCopyValue: (copyKey, value, toastLabel) => copyValue(copyKey, value, toastLabel)
20478
20423
  }
20479
20424
  )
20480
- ] }) })
20481
- ] }) }),
20482
- /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
20483
- /* @__PURE__ */ jsx(Heading, { level: 3, size: 6, className: "mb-4 text-foreground", trim: "normal", children: "Share colour pairing" }),
20484
- /* @__PURE__ */ jsxs("div", { className: "rounded-sm border border-grey-200 bg-white p-4", children: [
20485
- /* @__PURE__ */ jsxs("div", { className: "flex flex-row items-center justify-between", children: [
20486
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Copy this URL to share your current colour pairing:" }),
20425
+ ] }) }) })
20426
+ ] }) }) }),
20427
+ /* @__PURE__ */ jsxs("section", { className: "space-y-2", children: [
20428
+ /* @__PURE__ */ jsx(Heading, { level: 3, size: 6, className: "text-foreground", trim: "normal", children: "Share colour pairing" }),
20429
+ /* @__PURE__ */ jsxs("div", { className: "rounded-sm border border-grey-200 bg-white px-4 py-4", children: [
20430
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
20431
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Copy a link to this current result." }),
20487
20432
  /* @__PURE__ */ jsx(
20488
20433
  Button2,
20489
20434
  {
20490
20435
  variant: "ghost",
20491
20436
  color: "grey",
20492
20437
  size: "sm",
20493
- className: "shrink-0 self-center",
20438
+ className: "shrink-0 self-start sm:self-center",
20494
20439
  onClick: () => copyValue(
20495
20440
  "share-url",
20496
20441
  typeof window === "undefined" ? shareUrl : new URL(shareUrl, window.location.origin).toString(),
@@ -23152,7 +23097,7 @@ function FormatToggle({ format, setFormat }) {
23152
23097
 
23153
23098
  // package.json
23154
23099
  var package_default = {
23155
- version: "1.104.0"};
23100
+ version: "1.105.0"};
23156
23101
  function Logo(props) {
23157
23102
  return /* @__PURE__ */ jsxs(Fragment, { children: [
23158
23103
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "NSW Government" }),