@nswds/app 1.98.0 → 1.99.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
@@ -4105,7 +4105,7 @@ function AccordionContent({
4105
4105
  );
4106
4106
  }
4107
4107
  var alertVariants = cva(
4108
- "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
4108
+ "relative w-full rounded-sm border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
4109
4109
  {
4110
4110
  variants: {
4111
4111
  variant: {
@@ -4551,7 +4551,7 @@ var AlertDialogContent = React5.forwardRef(function AlertDialogContent2({ classN
4551
4551
  ref,
4552
4552
  "data-slot": "alert-dialog-content",
4553
4553
  className: cn(
4554
- "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 sm:max-w-lg",
4554
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-sm border bg-background p-6 shadow-lg duration-200 sm:max-w-lg",
4555
4555
  "data-[state=closed]:animate-out data-[state=open]:animate-in",
4556
4556
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
4557
4557
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
@@ -5017,7 +5017,7 @@ var ChartTooltip = ({ active, payload, label, valueFormatter }) => {
5017
5017
  {
5018
5018
  className: cn(
5019
5019
  // base
5020
- "rounded-md border text-sm shadow-md",
5020
+ "rounded-sm border text-sm shadow-md",
5021
5021
  // border color
5022
5022
  "border-gray-200 dark:border-gray-800",
5023
5023
  // background color
@@ -6292,7 +6292,7 @@ var ChartTooltip2 = ({ active, payload, label, valueFormatter }) => {
6292
6292
  {
6293
6293
  className: cn(
6294
6294
  // base
6295
- "rounded-md border text-sm shadow-md",
6295
+ "rounded-sm border text-sm shadow-md",
6296
6296
  // border color
6297
6297
  "border-gray-200 dark:border-gray-800",
6298
6298
  // background color
@@ -7386,7 +7386,7 @@ function DropdownMenuSubContent({
7386
7386
  // Base
7387
7387
  ""
7388
7388
  ],
7389
- "z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
7389
+ "z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-sm border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
7390
7390
  className
7391
7391
  ),
7392
7392
  ...props
@@ -7478,7 +7478,7 @@ function Breadcrumbs({
7478
7478
  ] }) });
7479
7479
  }
7480
7480
  var buttonVariants2 = cva(
7481
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",
7481
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",
7482
7482
  {
7483
7483
  variants: {
7484
7484
  variant: {
@@ -7572,7 +7572,7 @@ function Calendar({
7572
7572
  defaultClassNames.dropdowns
7573
7573
  ),
7574
7574
  dropdown_root: cn(
7575
- "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
7575
+ "relative rounded-sm border border-input shadow-xs has-focus:border-ring has-focus:ring-ring/50 has-focus:ring-[3px]",
7576
7576
  defaultClassNames.dropdown_root
7577
7577
  ),
7578
7578
  dropdown: cn("absolute inset-0 opacity-0", defaultClassNames.dropdown),
@@ -7658,7 +7658,7 @@ function CalendarDayButton({
7658
7658
  "data-range-end": modifiers.range_end,
7659
7659
  "data-range-middle": modifiers.range_middle,
7660
7660
  className: cn(
7661
- "flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary-800 data-[selected-single=true]:text-white dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
7661
+ "flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-sm data-[range-end=true]:rounded-r-sm data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-sm data-[range-start=true]:rounded-l-sm data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary-800 data-[selected-single=true]:text-white dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",
7662
7662
  defaultClassNames.day,
7663
7663
  className
7664
7664
  ),
@@ -7672,7 +7672,7 @@ function Card({ className, ...props }) {
7672
7672
  {
7673
7673
  "data-slot": "card",
7674
7674
  className: cn(
7675
- "flex flex-col gap-6 rounded-md border border-grey-200 bg-card py-6 text-card-foreground dark:border-grey-700",
7675
+ "flex flex-col gap-6 rounded-sm border border-grey-200 bg-card py-6 text-card-foreground dark:border-grey-700",
7676
7676
  className
7677
7677
  ),
7678
7678
  ...props
@@ -8235,7 +8235,7 @@ function ChartTooltipContent({
8235
8235
  "div",
8236
8236
  {
8237
8237
  className: cn(
8238
- "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
8238
+ "grid min-w-[8rem] items-start gap-1.5 rounded-sm border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
8239
8239
  className
8240
8240
  ),
8241
8241
  children: [
@@ -8256,7 +8256,7 @@ function ChartTooltipContent({
8256
8256
  "div",
8257
8257
  {
8258
8258
  className: cn(
8259
- "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
8259
+ "shrink-0 rounded-sm border-(--color-border) bg-(--color-bg)",
8260
8260
  {
8261
8261
  "h-2.5 w-2.5": indicator === "dot",
8262
8262
  "w-1": indicator === "line",
@@ -8363,7 +8363,7 @@ function Checkbox({ className, ...props }) {
8363
8363
  "data-slot": "checkbox",
8364
8364
  className: cn(
8365
8365
  // Base styles
8366
- "peer flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-[4px] border border-primary-800 shadow-xs ring-offset-white transition-shadow outline-none",
8366
+ "peer flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-primary-800 shadow-xs ring-offset-white transition-shadow outline-none",
8367
8367
  // Dark mode styles
8368
8368
  "dark:bg-input/30",
8369
8369
  // Checked styles
@@ -13525,7 +13525,7 @@ function PreWithCopy(props) {
13525
13525
  /* @__PURE__ */ jsxs(
13526
13526
  "button",
13527
13527
  {
13528
- className: "absolute top-2 right-2 m-0.5 inline-flex h-8 items-center justify-center rounded-lg border border-gray-200 bg-white px-2.5 py-2 text-gray-900 opacity-0 transition-opacity group-hover:opacity-100 hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700",
13528
+ className: "absolute top-2 right-2 m-0.5 inline-flex h-8 items-center justify-center rounded-sm border border-gray-200 bg-white px-2.5 py-2 text-gray-900 opacity-0 transition-opacity group-hover:opacity-100 hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700",
13529
13529
  "aria-label": "Copy code to clipboard",
13530
13530
  onClick: handleCopy,
13531
13531
  children: [
@@ -13591,7 +13591,7 @@ function PopoverContent({
13591
13591
  className: cn(
13592
13592
  [
13593
13593
  // Base
13594
- "z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-background p-4 text-foreground shadow-md outline-hidden",
13594
+ "z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-sm border bg-background p-4 text-foreground shadow-md outline-hidden",
13595
13595
  // Open
13596
13596
  "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
13597
13597
  // Closed
@@ -13968,7 +13968,7 @@ function SegmentedControlTrigger({
13968
13968
  {
13969
13969
  "data-slot": "segmented-control-trigger",
13970
13970
  className: cn(
13971
- "inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:shadow-sm dark:text-muted-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
13971
+ "inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-sm border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:shadow-sm dark:text-muted-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
13972
13972
  className
13973
13973
  ),
13974
13974
  ...props
@@ -13994,7 +13994,7 @@ function ThemeSelectorLoading() {
13994
13994
  ] }),
13995
13995
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
13996
13996
  /* @__PURE__ */ jsx("div", { className: "h-5 w-20 rounded bg-grey-200" }),
13997
- /* @__PURE__ */ jsxs("div", { className: "gap-3 rounded-md border border-muted bg-muted/30 p-3", children: [
13997
+ /* @__PURE__ */ jsxs("div", { className: "gap-3 rounded-sm border border-muted bg-muted/30 p-3", children: [
13998
13998
  /* @__PURE__ */ jsxs("div", { className: "mb-2 flex min-w-0 items-center justify-between", children: [
13999
13999
  /* @__PURE__ */ jsx("div", { className: "h-4 w-48 rounded bg-grey-200" }),
14000
14000
  /* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded bg-grey-200" })
@@ -14174,7 +14174,7 @@ function ThemeSelectorContent({
14174
14174
  ] }),
14175
14175
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
14176
14176
  /* @__PURE__ */ jsx("h3", { className: "font-medium", children: "Share Theme" }),
14177
- /* @__PURE__ */ jsxs("div", { className: "gap-3 rounded-md border border-muted bg-muted/30 p-3", children: [
14177
+ /* @__PURE__ */ jsxs("div", { className: "gap-3 rounded-sm border border-muted bg-muted/30 p-3", children: [
14178
14178
  /* @__PURE__ */ jsxs("div", { className: "mb-2 flex min-w-0 items-center justify-between", children: [
14179
14179
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Copy this URL to share your theme selection:" }),
14180
14180
  /* @__PURE__ */ jsxs(
@@ -14192,7 +14192,7 @@ function ThemeSelectorContent({
14192
14192
  }
14193
14193
  )
14194
14194
  ] }),
14195
- /* @__PURE__ */ jsx("code", { className: "block w-full rounded border bg-background px-2 py-1.5 font-mono text-xs break-all text-foreground", children: themeUrl })
14195
+ /* @__PURE__ */ jsx("code", { className: "block w-full rounded-sm border bg-background px-2 py-1.5 font-mono text-xs break-all text-foreground", children: themeUrl })
14196
14196
  ] })
14197
14197
  ] })
14198
14198
  ] });
@@ -14244,7 +14244,7 @@ function TooltipContent({
14244
14244
  }
14245
14245
  function CodeDemoLoading() {
14246
14246
  return /* @__PURE__ */ jsxs("div", { className: "mt-8 animate-pulse", children: [
14247
- /* @__PURE__ */ jsx("div", { className: "w-full rounded-t-xl border border-grey-200 bg-grey-50 p-4 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3", children: [
14247
+ /* @__PURE__ */ jsx("div", { className: "w-full rounded-t-sm border border-grey-200 bg-grey-50 p-4 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3", children: [
14248
14248
  /* @__PURE__ */ jsx("div", { className: "h-10 w-32 rounded bg-grey-200 dark:bg-grey-600" }),
14249
14249
  /* @__PURE__ */ jsx("div", { className: "h-10 w-32 rounded bg-grey-200 dark:bg-grey-600" }),
14250
14250
  /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-3", children: [
@@ -14255,7 +14255,7 @@ function CodeDemoLoading() {
14255
14255
  ] }) }),
14256
14256
  /* @__PURE__ */ jsx("div", { className: "flex border-x border-grey-200 bg-white bg-gradient-to-r p-5 dark:border-grey-600 dark:bg-grey-900", children: /* @__PURE__ */ jsx("div", { className: "h-64 w-full rounded bg-grey-200 dark:bg-grey-600" }) }),
14257
14257
  /* @__PURE__ */ jsxs("div", { className: "border border-grey-200 dark:border-grey-600", children: [
14258
- /* @__PURE__ */ jsx("div", { className: "flex w-full rounded-t-md border-b border-grey-200 bg-grey-50 p-2 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsx("div", { className: "h-8 w-24 rounded bg-grey-200 dark:bg-grey-600" }) }),
14258
+ /* @__PURE__ */ jsx("div", { className: "flex w-full rounded-t-sm border-b border-grey-200 bg-grey-50 p-2 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsx("div", { className: "h-8 w-24 rounded bg-grey-200 dark:bg-grey-600" }) }),
14259
14259
  /* @__PURE__ */ jsx("div", { className: "h-48 bg-grey-100 dark:bg-grey-800" })
14260
14260
  ] })
14261
14261
  ] });
@@ -14439,7 +14439,7 @@ function CodeDemoContent({ data, showCode = true, controls = defaultControls })
14439
14439
  }
14440
14440
  }, [themeCategory, primaryColor, accentColor, greyColor, isThemeInitialized]);
14441
14441
  return /* @__PURE__ */ jsxs("div", { className: "mt-8", children: [
14442
- /* @__PURE__ */ jsx("div", { className: "w-full rounded-t-xl border border-grey-200 bg-grey-50 p-4 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsxs("div", { className: "relative flex w-full items-center", children: [
14442
+ /* @__PURE__ */ jsx("div", { className: "w-full rounded-t-sm border border-grey-200 bg-grey-50 p-4 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsxs("div", { className: "relative flex w-full items-center", children: [
14443
14443
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
14444
14444
  data.githubSlug && /* @__PURE__ */ jsx(EditOnGithubButton, { githubSlug: data.githubSlug }),
14445
14445
  data.figmaSlug && /* @__PURE__ */ jsx(OpenInFigmaButton, { figmaSlug: data.figmaSlug })
@@ -14498,7 +14498,7 @@ function CodeDemoContent({ data, showCode = true, controls = defaultControls })
14498
14498
  shouldExpand && "pb-[41px]"
14499
14499
  ),
14500
14500
  children: [
14501
- /* @__PURE__ */ jsxs("div", { className: "flex w-full rounded-t-md border-b border-grey-200 bg-grey-50 dark:border-grey-600 dark:bg-grey-700", children: [
14501
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full rounded-t-sm border-b border-grey-200 bg-grey-50 dark:border-grey-600 dark:bg-grey-700", children: [
14502
14502
  /* @__PURE__ */ jsx(Tabs, { tabIndex, items: codeItems, onSelect: setTabIndex }),
14503
14503
  variants.length > 0 && /* @__PURE__ */ jsxs(Select, { onValueChange: (value) => handleSelectVariant(value), children: [
14504
14504
  /* @__PURE__ */ jsx(SelectTrigger, { size: "sm", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a variant" }) }),
@@ -14918,8 +14918,18 @@ function ColorCard({ name, token, hex: hex2, rgb: rgb2, hsl, oklch: oklch2, form
14918
14918
  ] })
14919
14919
  ] }) });
14920
14920
  }
14921
- var recommendedBackgroundTones = [100, 200, 400, 500, 600, 700, 800];
14921
+ var recommendedBackgroundTones = [50, 100, 200, 400, 600, 800];
14922
14922
  var AAA_NORMAL_TEXT_RATIO = 7;
14923
+ var MIN_DARK_BACKGROUND_TONE_FOR_WHITE = 600;
14924
+ var WHITE_FOREGROUND = {
14925
+ token: "white",
14926
+ name: "White",
14927
+ hex: "#ffffff",
14928
+ rgb: "rgb(255, 255, 255)",
14929
+ hsl: "hsl(0, 0%, 100%)",
14930
+ oklch: "oklch(1 0 0)",
14931
+ tone: 0
14932
+ };
14923
14933
  function extractTone(token) {
14924
14934
  const match = token.match(/-(\d+)$/);
14925
14935
  return match ? Number.parseInt(match[1], 10) : 0;
@@ -14994,10 +15004,13 @@ function buildRecommendedPairs(colorsToPair, minimumRatio) {
14994
15004
  const recommendedPairs = [];
14995
15005
  for (const background of backgrounds) {
14996
15006
  const pair = pickForeground(colorsToPair, background, minimumRatio);
14997
- if (!pair || recommendedPairs.some((item) => item.id === pair.id)) {
14998
- continue;
15007
+ const whitePair = background.tone >= MIN_DARK_BACKGROUND_TONE_FOR_WHITE ? buildPair(background, WHITE_FOREGROUND) : null;
15008
+ if (pair && !recommendedPairs.some((item) => item.id === pair.id)) {
15009
+ recommendedPairs.push(pair);
15010
+ }
15011
+ if (whitePair && whitePair.contrastRatio >= minimumRatio && !recommendedPairs.some((item) => item.id === whitePair.id)) {
15012
+ recommendedPairs.push(whitePair);
14999
15013
  }
15000
- recommendedPairs.push(pair);
15001
15014
  }
15002
15015
  return recommendedPairs;
15003
15016
  }
@@ -15026,6 +15039,12 @@ function buildRecommendedCollections(minimumRatio) {
15026
15039
  };
15027
15040
  }
15028
15041
  var recommendedAaaPairingCollections = buildRecommendedCollections(AAA_NORMAL_TEXT_RATIO);
15042
+ function getWhiteForegroundPair(background) {
15043
+ return buildPair(background, WHITE_FOREGROUND);
15044
+ }
15045
+ function supportsWhiteForegroundPreview(background) {
15046
+ return background.tone >= MIN_DARK_BACKGROUND_TONE_FOR_WHITE;
15047
+ }
15029
15048
  function getPairingColorValue(color2, format) {
15030
15049
  return getColorValue(color2, format);
15031
15050
  }
@@ -15185,12 +15204,52 @@ function getDefaultPair(family) {
15185
15204
  function getFamilySwatchColor(family) {
15186
15205
  return family.colors.find((color2) => color2.tone === 500)?.hex ?? family.colors.find((color2) => color2.tone === 400)?.hex ?? family.colors[Math.min(3, family.colors.length - 1)]?.hex ?? "transparent";
15187
15206
  }
15207
+ function getToneFromToken(token) {
15208
+ if (!token) return null;
15209
+ const match = token.match(/-(\d+)$/);
15210
+ return match ? Number.parseInt(match[1], 10) : null;
15211
+ }
15212
+ function isApprovedBackgroundTone(color2) {
15213
+ return recommendedBackgroundTones.includes(
15214
+ color2.tone
15215
+ );
15216
+ }
15217
+ function getBackgroundOptions(family) {
15218
+ return family?.colors.filter(isApprovedBackgroundTone) ?? [];
15219
+ }
15220
+ function isWhiteForegroundPair(pair) {
15221
+ return pair.foreground.token === "white";
15222
+ }
15223
+ function getRecommendedPairForBackground(family, backgroundToken, preferredPairId) {
15224
+ if (!family) return null;
15225
+ const backgroundPairs = family.recommendedPairs.filter(
15226
+ (pair) => pair.background.token === backgroundToken
15227
+ );
15228
+ if (backgroundPairs.length === 0) return null;
15229
+ if (preferredPairId) {
15230
+ const preferredPair = backgroundPairs.find((pair) => pair.id === preferredPairId);
15231
+ if (preferredPair) {
15232
+ return preferredPair;
15233
+ }
15234
+ }
15235
+ return backgroundPairs.find((pair) => !isWhiteForegroundPair(pair)) ?? backgroundPairs[0];
15236
+ }
15237
+ function getFallbackBackgroundToken(family, preferredTone) {
15238
+ const backgroundOptions = getBackgroundOptions(family);
15239
+ if (preferredTone) {
15240
+ const preferredBackground = backgroundOptions.find((color2) => color2.tone === preferredTone);
15241
+ if (preferredBackground) {
15242
+ return preferredBackground.token;
15243
+ }
15244
+ }
15245
+ return getDefaultPair(family)?.background.token ?? backgroundOptions[0]?.token ?? "";
15246
+ }
15188
15247
  function ColorPairingToolLoading() {
15189
15248
  return /* @__PURE__ */ jsxs("div", { className: "animate-pulse space-y-6", children: [
15190
- /* @__PURE__ */ jsx("div", { className: "h-40 rounded-md border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15249
+ /* @__PURE__ */ jsx("div", { className: "h-40 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15191
15250
  /* @__PURE__ */ jsxs("div", { className: "grid gap-6 xl:grid-cols-[minmax(0,1.3fr)_minmax(20rem,0.9fr)]", children: [
15192
- /* @__PURE__ */ jsx("div", { className: "h-96 rounded-md border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15193
- /* @__PURE__ */ jsx("div", { className: "h-96 rounded-md border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" })
15251
+ /* @__PURE__ */ jsx("div", { className: "h-96 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15252
+ /* @__PURE__ */ jsx("div", { className: "h-96 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" })
15194
15253
  ] })
15195
15254
  ] });
15196
15255
  }
@@ -15198,15 +15257,28 @@ function getInitialPairingState(searchParams) {
15198
15257
  const paletteParam = searchParams.get("palette");
15199
15258
  const familyParam = searchParams.get("family");
15200
15259
  const pairParam = searchParams.get("pair");
15260
+ const backgroundParam = searchParams.get("background");
15201
15261
  const themeCategory = paletteParam === "brand" || paletteParam === "aboriginal" ? paletteParam : "brand";
15202
15262
  const families = recommendedAaaPairingCollections[themeCategory];
15203
15263
  const familyKey = families.some((family) => family.key === familyParam) ? familyParam : getPreferredFamilyKey(families);
15204
15264
  const activeFamily = families.find((family) => family.key === familyKey) ?? families[0];
15205
- const defaultPair = getDefaultPair(activeFamily);
15206
- const selectedPairId = activeFamily?.recommendedPairs.some((pair) => pair.id === pairParam) ? pairParam : defaultPair?.id ?? "";
15207
- return { familyKey, selectedPairId, themeCategory };
15208
- }
15209
- function PairPreview({ family, pair }) {
15265
+ const backgroundOptions = getBackgroundOptions(activeFamily);
15266
+ const pairBackgroundToken = activeFamily?.recommendedPairs.find((pair) => pair.id === pairParam)?.background.token ?? null;
15267
+ const selectedBackgroundToken = backgroundOptions.some((color2) => color2.token === backgroundParam) ? backgroundParam : getFallbackBackgroundToken(
15268
+ activeFamily,
15269
+ getToneFromToken(backgroundParam ?? pairBackgroundToken)
15270
+ );
15271
+ const selectedPairId = getRecommendedPairForBackground(activeFamily, selectedBackgroundToken, pairParam)?.id ?? "";
15272
+ return { familyKey, selectedBackgroundToken, selectedPairId, themeCategory };
15273
+ }
15274
+ function PairPreview({
15275
+ family,
15276
+ isRecommended,
15277
+ pair
15278
+ }) {
15279
+ const whiteForeground = isWhiteForegroundPair(pair);
15280
+ const statusLabel = isRecommended ? "Pass" : pair.passes.aaaLarge ? "Large text only" : "Example only";
15281
+ const StatusIcon = isRecommended ? Icons.check : Icons.info;
15210
15282
  return /* @__PURE__ */ jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsx(
15211
15283
  "div",
15212
15284
  {
@@ -15249,10 +15321,10 @@ function PairPreview({ family, pair }) {
15249
15321
  )
15250
15322
  ] }),
15251
15323
  /* @__PURE__ */ jsxs("div", { className: "max-w-xl space-y-4 pb-12 sm:pb-16", children: [
15252
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: "Tone on tone" }),
15324
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: whiteForeground && !isRecommended ? "White on colour example" : whiteForeground ? "White on colour" : "Tone on tone" }),
15253
15325
  /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
15254
15326
  /* @__PURE__ */ jsx("h3", { className: "max-w-lg text-4xl leading-none font-bold text-current sm:text-5xl", children: "Pair colour with confidence." }),
15255
- /* @__PURE__ */ jsx("p", { className: "max-w-md text-sm/6 sm:text-base/7", children: "Use only AAA-approved tone-on-tone combinations for headings, body copy, and calls to action on colour." })
15327
+ /* @__PURE__ */ jsx("p", { className: "max-w-md text-sm/6 sm:text-base/7", children: whiteForeground ? isRecommended ? "Use white text on dark colour only when it meets AAA for headings, body copy, and calls to action." : "This white text example is included for reference on approved dark backgrounds. Check the result card below before using it for normal or large text." : "Use only AAA-recommended tone-on-tone combinations for headings, body copy, and calls to action on colour." })
15256
15328
  ] })
15257
15329
  ] }),
15258
15330
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
@@ -15265,8 +15337,8 @@ function PairPreview({ family, pair }) {
15265
15337
  color: pair.background.hex
15266
15338
  },
15267
15339
  children: [
15268
- "Pass",
15269
- /* @__PURE__ */ jsx(Icons.check, { "data-slot": "icon", className: "size-4" })
15340
+ statusLabel,
15341
+ /* @__PURE__ */ jsx(StatusIcon, { "data-slot": "icon", className: "size-4" })
15270
15342
  ]
15271
15343
  }
15272
15344
  ),
@@ -15326,7 +15398,7 @@ function PairDetailCard({
15326
15398
  /* @__PURE__ */ jsx(
15327
15399
  "div",
15328
15400
  {
15329
- className: "size-14 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15401
+ className: "size-14 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
15330
15402
  style: { backgroundColor: color2.hex }
15331
15403
  }
15332
15404
  ),
@@ -15365,7 +15437,7 @@ function ComplianceRow({
15365
15437
  passes,
15366
15438
  threshold
15367
15439
  }) {
15368
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 rounded-xl border border-grey-200 px-4 py-3 dark:border-grey-700", children: [
15440
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 rounded-sm border border-grey-200 px-4 py-3 dark:border-grey-700", children: [
15369
15441
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
15370
15442
  /* @__PURE__ */ jsx("p", { className: "font-medium", children: label }),
15371
15443
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: threshold })
@@ -15392,7 +15464,7 @@ function PairComplianceCard({ pair }) {
15392
15464
  /* @__PURE__ */ jsx(CardDescription, { children: "Only pairs that pass AAA normal-text contrast are suggested here. Evaluation uses the raw contrast ratio, not the rounded display value." })
15393
15465
  ] }),
15394
15466
  /* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
15395
- /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-grey-200 bg-grey-50 px-4 py-3 dark:border-grey-700 dark:bg-grey-900/60", children: [
15467
+ /* @__PURE__ */ jsxs("div", { className: "rounded-sm border border-grey-200 bg-grey-50 px-4 py-3 dark:border-grey-700 dark:bg-grey-900/60", children: [
15396
15468
  /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Contrast ratio" }),
15397
15469
  /* @__PURE__ */ jsxs("p", { className: "mt-1 text-2xl font-semibold", children: [
15398
15470
  pair.contrastRatio.toFixed(2),
@@ -15418,25 +15490,100 @@ function PairComplianceCard({ pair }) {
15418
15490
  ] })
15419
15491
  ] });
15420
15492
  }
15493
+ function WhiteTextExampleCard({ pair }) {
15494
+ return /* @__PURE__ */ jsxs(Card, { children: [
15495
+ /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 border-b", children: [
15496
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: "White text example" }),
15497
+ /* @__PURE__ */ jsx(CardDescription, { children: "For approved dark backgrounds, white text may be suitable for large text. It is only recommended in this tool when it also passes AAA normal text." })
15498
+ ] }),
15499
+ /* @__PURE__ */ jsxs(CardContent, { className: "grid gap-6 xl:grid-cols-[minmax(0,1.1fr)_minmax(18rem,0.9fr)]", children: [
15500
+ /* @__PURE__ */ jsx(
15501
+ "div",
15502
+ {
15503
+ className: "rounded-sm border border-grey-200 p-6 dark:border-grey-700",
15504
+ style: {
15505
+ backgroundColor: pair.background.hex,
15506
+ color: pair.foreground.hex
15507
+ },
15508
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
15509
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
15510
+ /* @__PURE__ */ jsx("p", { className: "text-lg leading-tight font-semibold", children: "Large text example" }),
15511
+ /* @__PURE__ */ jsxs("p", { className: "text-sm/6", children: [
15512
+ "White text on ",
15513
+ pair.background.token
15514
+ ] })
15515
+ ] }),
15516
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1 text-sm/6", children: [
15517
+ /* @__PURE__ */ jsxs("p", { children: [
15518
+ "AAA normal text: ",
15519
+ /* @__PURE__ */ jsx("strong", { children: pair.passes.aaaText ? "pass" : "fail" })
15520
+ ] }),
15521
+ /* @__PURE__ */ jsxs("p", { children: [
15522
+ "AAA large text: ",
15523
+ /* @__PURE__ */ jsx("strong", { children: pair.passes.aaaLarge ? "pass" : "fail" })
15524
+ ] })
15525
+ ] })
15526
+ ] })
15527
+ }
15528
+ ),
15529
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
15530
+ /* @__PURE__ */ jsxs("div", { className: "rounded-sm border border-grey-200 bg-grey-50 px-4 py-3 dark:border-grey-700 dark:bg-grey-900/60", children: [
15531
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Contrast ratio" }),
15532
+ /* @__PURE__ */ jsxs("p", { className: "mt-1 text-2xl font-semibold", children: [
15533
+ pair.contrastRatio.toFixed(2),
15534
+ ":1"
15535
+ ] })
15536
+ ] }),
15537
+ /* @__PURE__ */ jsx(
15538
+ ComplianceRow,
15539
+ {
15540
+ label: "AAA normal text",
15541
+ passes: pair.passes.aaaText,
15542
+ threshold: "7.0:1 or higher"
15543
+ }
15544
+ ),
15545
+ /* @__PURE__ */ jsx(
15546
+ ComplianceRow,
15547
+ {
15548
+ label: "AAA large text",
15549
+ passes: pair.passes.aaaLarge,
15550
+ threshold: "4.5:1 or higher"
15551
+ }
15552
+ )
15553
+ ] })
15554
+ ] })
15555
+ ] });
15556
+ }
15421
15557
  function ColorPairingToolContent() {
15422
15558
  const searchParams = useSearchParams();
15423
15559
  const {
15424
15560
  familyKey: initialFamilyKey,
15561
+ selectedBackgroundToken: initialSelectedBackgroundToken,
15425
15562
  selectedPairId: initialSelectedPairId,
15426
15563
  themeCategory: initialThemeCategory
15427
15564
  } = getInitialPairingState(searchParams);
15428
15565
  const [themeCategory, setThemeCategory] = useState(initialThemeCategory);
15429
15566
  const [format, setFormat] = useState("hex");
15430
15567
  const [activeFamilyKey, setActiveFamilyKey] = useState(initialFamilyKey);
15568
+ const [selectedBackgroundToken, setSelectedBackgroundToken] = useState(
15569
+ initialSelectedBackgroundToken
15570
+ );
15431
15571
  const [selectedPairId, setSelectedPairId] = useState(initialSelectedPairId);
15432
15572
  const families = recommendedAaaPairingCollections[themeCategory];
15433
15573
  const resolvedActiveFamilyKey = families.some((family) => family.key === activeFamilyKey) ? activeFamilyKey : getPreferredFamilyKey(families);
15434
15574
  const activeFamily = families.find((family) => family.key === resolvedActiveFamilyKey) ?? families[0];
15435
- const selectedPair = activeFamily?.recommendedPairs.find((pair) => pair.id === selectedPairId) ?? getDefaultPair(activeFamily);
15436
- const updateUrlParams = (nextThemeCategory, nextFamilyKey, nextSelectedPairId) => {
15575
+ const backgroundOptions = getBackgroundOptions(activeFamily);
15576
+ const selectedBackground = backgroundOptions.find((color2) => color2.token === selectedBackgroundToken) ?? backgroundOptions[0] ?? activeFamily?.colors[0] ?? null;
15577
+ const selectedPair = selectedBackground ? getRecommendedPairForBackground(activeFamily, selectedBackground.token, selectedPairId) : null;
15578
+ const whiteForegroundExample = selectedBackground && supportsWhiteForegroundPreview(selectedBackground) ? getWhiteForegroundPair(selectedBackground) : null;
15579
+ const previewPair = selectedPair ?? whiteForegroundExample;
15580
+ const showWhiteForegroundExample = Boolean(whiteForegroundExample) && (!selectedPair || selectedPair.foreground.token !== "white");
15581
+ const detailForeground = selectedPair?.foreground ?? whiteForegroundExample?.foreground ?? null;
15582
+ const updateUrlParams = (nextThemeCategory, nextFamilyKey, nextSelectedBackgroundToken, nextSelectedPairId) => {
15437
15583
  const params = new URLSearchParams(window.location.search);
15438
15584
  params.set("palette", nextThemeCategory);
15439
15585
  params.set("family", nextFamilyKey);
15586
+ params.set("background", nextSelectedBackgroundToken);
15440
15587
  if (nextSelectedPairId) {
15441
15588
  params.set("pair", nextSelectedPairId);
15442
15589
  } else {
@@ -15452,27 +15599,78 @@ function ColorPairingToolContent() {
15452
15599
  const nextFamilies = recommendedAaaPairingCollections[nextThemeCategory];
15453
15600
  const nextFamilyKey = nextFamilies.some((family) => family.key === activeFamilyKey) ? activeFamilyKey : getPreferredFamilyKey(nextFamilies);
15454
15601
  const nextActiveFamily = nextFamilies.find((family) => family.key === nextFamilyKey) ?? nextFamilies[0];
15455
- const nextSelectedPair = nextActiveFamily?.recommendedPairs.find((pair) => pair.id === selectedPairId) ?? getDefaultPair(nextActiveFamily);
15602
+ const nextSelectedBackgroundToken = getFallbackBackgroundToken(
15603
+ nextActiveFamily,
15604
+ getToneFromToken(selectedBackgroundToken)
15605
+ );
15606
+ const nextSelectedPair = getRecommendedPairForBackground(
15607
+ nextActiveFamily,
15608
+ nextSelectedBackgroundToken,
15609
+ selectedPairId
15610
+ );
15456
15611
  setThemeCategory(nextThemeCategory);
15457
15612
  setActiveFamilyKey(nextFamilyKey);
15613
+ setSelectedBackgroundToken(nextSelectedBackgroundToken);
15458
15614
  setSelectedPairId(nextSelectedPair?.id ?? "");
15459
- updateUrlParams(nextThemeCategory, nextFamilyKey, nextSelectedPair?.id ?? "");
15615
+ updateUrlParams(
15616
+ nextThemeCategory,
15617
+ nextFamilyKey,
15618
+ nextSelectedBackgroundToken,
15619
+ nextSelectedPair?.id ?? ""
15620
+ );
15460
15621
  };
15461
15622
  const handleFamilyChange = (nextFamilyKey) => {
15462
15623
  const nextActiveFamily = families.find((family) => family.key === nextFamilyKey);
15463
- const nextSelectedPair = nextActiveFamily?.recommendedPairs.find((pair) => pair.id === selectedPairId) ?? getDefaultPair(nextActiveFamily);
15624
+ const nextSelectedBackgroundToken = getFallbackBackgroundToken(
15625
+ nextActiveFamily,
15626
+ getToneFromToken(selectedBackgroundToken)
15627
+ );
15628
+ const nextSelectedPair = getRecommendedPairForBackground(
15629
+ nextActiveFamily,
15630
+ nextSelectedBackgroundToken,
15631
+ selectedPairId
15632
+ );
15464
15633
  setActiveFamilyKey(nextFamilyKey);
15634
+ setSelectedBackgroundToken(nextSelectedBackgroundToken);
15465
15635
  setSelectedPairId(nextSelectedPair?.id ?? "");
15466
- updateUrlParams(themeCategory, nextFamilyKey, nextSelectedPair?.id ?? "");
15636
+ updateUrlParams(
15637
+ themeCategory,
15638
+ nextFamilyKey,
15639
+ nextSelectedBackgroundToken,
15640
+ nextSelectedPair?.id ?? ""
15641
+ );
15642
+ };
15643
+ const handleBackgroundChange = (nextSelectedBackgroundToken) => {
15644
+ const nextSelectedPair = getRecommendedPairForBackground(
15645
+ activeFamily,
15646
+ nextSelectedBackgroundToken,
15647
+ selectedPairId
15648
+ );
15649
+ setSelectedBackgroundToken(nextSelectedBackgroundToken);
15650
+ setSelectedPairId(nextSelectedPair?.id ?? "");
15651
+ updateUrlParams(
15652
+ themeCategory,
15653
+ resolvedActiveFamilyKey,
15654
+ nextSelectedBackgroundToken,
15655
+ nextSelectedPair?.id ?? ""
15656
+ );
15467
15657
  };
15468
15658
  const handlePairChange = (nextSelectedPairId) => {
15659
+ const nextSelectedPair = activeFamily?.recommendedPairs.find((pair) => pair.id === nextSelectedPairId) ?? null;
15660
+ if (!nextSelectedPair) return;
15661
+ setSelectedBackgroundToken(nextSelectedPair.background.token);
15469
15662
  setSelectedPairId(nextSelectedPairId);
15470
- updateUrlParams(themeCategory, resolvedActiveFamilyKey, nextSelectedPairId);
15663
+ updateUrlParams(
15664
+ themeCategory,
15665
+ resolvedActiveFamilyKey,
15666
+ nextSelectedPair.background.token,
15667
+ nextSelectedPairId
15668
+ );
15471
15669
  };
15472
- if (!activeFamily || !selectedPair) {
15670
+ if (!activeFamily || !selectedBackground) {
15473
15671
  return /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardHeader, { children: [
15474
- /* @__PURE__ */ jsx(CardTitle, { children: "No recommended AAA pairs available" }),
15475
- /* @__PURE__ */ jsx(CardDescription, { children: "No recommended pairs are available for the current palette." })
15672
+ /* @__PURE__ */ jsx(CardTitle, { children: "No approved background tones available" }),
15673
+ /* @__PURE__ */ jsx(CardDescription, { children: "No approved tones are available for the current palette." })
15476
15674
  ] }) });
15477
15675
  }
15478
15676
  return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
@@ -15522,41 +15720,74 @@ function ColorPairingToolContent() {
15522
15720
  /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
15523
15721
  /* @__PURE__ */ jsxs("div", { className: "grid items-start gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(17rem,0.68fr)]", children: [
15524
15722
  /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
15525
- /* @__PURE__ */ jsx(PairPreview, { family: activeFamily, pair: selectedPair }),
15723
+ previewPair ? /* @__PURE__ */ jsx(
15724
+ PairPreview,
15725
+ {
15726
+ family: activeFamily,
15727
+ isRecommended: Boolean(selectedPair),
15728
+ pair: previewPair
15729
+ }
15730
+ ) : /* @__PURE__ */ jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsx(
15731
+ "div",
15732
+ {
15733
+ className: "p-6 sm:min-h-[26rem] sm:p-8",
15734
+ style: {
15735
+ backgroundColor: selectedBackground.hex,
15736
+ color: selectedBackground.tone >= 600 ? "#ffffff" : "#002664"
15737
+ },
15738
+ children: /* @__PURE__ */ jsxs("div", { className: "flex min-h-[22rem] flex-col justify-between gap-8", children: [
15739
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 rounded-full border border-current bg-transparent px-3 py-1 text-[0.72rem] font-semibold tracking-[0.16em] uppercase", children: [
15740
+ /* @__PURE__ */ jsx(Icons.palette, { "data-slot": "icon", className: "size-4" }),
15741
+ activeFamily.label
15742
+ ] }) }),
15743
+ /* @__PURE__ */ jsxs("div", { className: "max-w-xl space-y-4 pb-12 sm:pb-16", children: [
15744
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: "Approved background" }),
15745
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
15746
+ /* @__PURE__ */ jsx("h3", { className: "max-w-lg text-4xl leading-none font-bold text-current sm:text-5xl", children: "Pair colour with confidence." }),
15747
+ /* @__PURE__ */ jsx("p", { className: "max-w-md text-sm/6 sm:text-base/7", children: "This approved background tone does not currently have a recommended AAA foreground in this tool." })
15748
+ ] })
15749
+ ] }),
15750
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
15751
+ /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 rounded-full bg-current/10 px-4 py-2 text-sm font-semibold", children: [
15752
+ "No recommendation",
15753
+ /* @__PURE__ */ jsx(Icons.info, { "data-slot": "icon", className: "size-4" })
15754
+ ] }),
15755
+ /* @__PURE__ */ jsx("span", { className: "inline-flex rounded-full border border-current px-4 py-2 text-sm", children: selectedBackground.token })
15756
+ ] })
15757
+ ] })
15758
+ }
15759
+ ) }),
15526
15760
  /* @__PURE__ */ jsxs(Card, { children: [
15527
15761
  /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 border-b", children: [
15528
15762
  /* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: "Background tone strip" }),
15529
- /* @__PURE__ */ jsx(CardDescription, { children: "Filled chips have a recommended AAA foreground pair. Select one to update the preview." })
15763
+ /* @__PURE__ */ jsx(CardDescription, { children: "Only approved background tones are shown. Filled chips have a recommended AAA foreground pair, and dark backgrounds may also offer white text where it passes AAA." })
15530
15764
  ] }),
15531
15765
  /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
15532
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-5 gap-2 sm:grid-cols-7 lg:grid-cols-10 xl:grid-cols-[repeat(19,minmax(0,1fr))]", children: activeFamily.colors.map((color2) => {
15533
- const pair = activeFamily.recommendedPairs.find(
15534
- (item) => item.background.token === color2.token
15535
- );
15536
- const isSelected = selectedPair.background.token === color2.token;
15766
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-5 gap-2 sm:grid-cols-7 lg:grid-cols-10 xl:grid-cols-[repeat(19,minmax(0,1fr))]", children: backgroundOptions.map((color2) => {
15767
+ const pair = getRecommendedPairForBackground(activeFamily, color2.token);
15768
+ const hasWhiteExample = supportsWhiteForegroundPreview(color2);
15769
+ const isSelected = selectedBackground.token === color2.token;
15537
15770
  return /* @__PURE__ */ jsxs(
15538
15771
  "button",
15539
15772
  {
15540
15773
  type: "button",
15541
- disabled: !pair,
15542
- onClick: () => pair && handlePairChange(pair.id),
15774
+ onClick: () => handleBackgroundChange(color2.token),
15543
15775
  className: cn(
15544
- "group relative h-12 rounded-xl border transition-transform",
15545
- pair ? "cursor-pointer border-grey-200 hover:scale-[1.03] dark:border-grey-700" : "cursor-not-allowed border-grey-100 dark:border-grey-800",
15776
+ "group relative h-12 rounded-sm border border-grey-200 transition-transform hover:scale-[1.03] dark:border-grey-700",
15546
15777
  isSelected && "ring-2 ring-primary-500 ring-offset-2 ring-offset-background"
15547
15778
  ),
15548
15779
  style: { backgroundColor: color2.hex },
15549
15780
  children: [
15550
- pair && /* @__PURE__ */ jsx(
15781
+ pair ? /* @__PURE__ */ jsx(
15551
15782
  "span",
15552
15783
  {
15553
15784
  className: "absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border border-white/30 shadow-sm",
15554
15785
  style: { backgroundColor: pair.foreground.hex }
15555
15786
  }
15556
- ),
15787
+ ) : null,
15557
15788
  /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
15558
15789
  color2.token,
15559
- pair ? ` paired with ${pair.foreground.token}` : " has no recommended pair in this tool"
15790
+ pair ? ` paired with ${pair.foreground.token}` : hasWhiteExample ? " has a white text example in this tool" : " has no recommended pair in this tool"
15560
15791
  ] })
15561
15792
  ]
15562
15793
  },
@@ -15567,35 +15798,41 @@ function ColorPairingToolContent() {
15567
15798
  /* @__PURE__ */ jsxs("span", { children: [
15568
15799
  "Selected background:",
15569
15800
  " ",
15570
- /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: selectedPair.background.token })
15801
+ /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: selectedBackground.token })
15571
15802
  ] }),
15572
15803
  /* @__PURE__ */ jsxs("span", { children: [
15573
- "Recommended foreground:",
15804
+ selectedPair ? "Recommended foreground:" : "White text example:",
15574
15805
  " ",
15575
- /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: selectedPair.foreground.token })
15806
+ /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: selectedPair?.foreground.token ?? whiteForegroundExample?.foreground.token ?? "None" })
15576
15807
  ] })
15577
15808
  ] })
15578
15809
  ] })
15579
15810
  ] }),
15580
15811
  /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
15581
- /* @__PURE__ */ jsx(PairDetailCard, { color: selectedPair.background, format, role: "Background" }),
15582
- /* @__PURE__ */ jsx(PairDetailCard, { color: selectedPair.foreground, format, role: "Foreground" })
15812
+ /* @__PURE__ */ jsx(PairDetailCard, { color: selectedBackground, format, role: "Background" }),
15813
+ detailForeground ? /* @__PURE__ */ jsx(PairDetailCard, { color: detailForeground, format, role: "Foreground" }) : /* @__PURE__ */ jsxs(Card, { className: "gap-4", children: [
15814
+ /* @__PURE__ */ jsx(CardHeader, { className: "gap-3 border-b", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
15815
+ /* @__PURE__ */ jsx(CardTitle, { children: "Foreground" }),
15816
+ /* @__PURE__ */ jsx(CardDescription, { children: "No recommended foreground available" })
15817
+ ] }) }),
15818
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Select another approved tone or review the recommended pairs list for the same family." }) })
15819
+ ] })
15583
15820
  ] })
15584
15821
  ] }),
15585
15822
  /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs(Card, { className: "h-fit", children: [
15586
15823
  /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 border-b", children: [
15587
15824
  /* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: "Recommended pairs" }),
15588
- /* @__PURE__ */ jsx(CardDescription, { children: "Recommended same-family combinations that meet AAA normal-text contrast." })
15825
+ /* @__PURE__ */ jsx(CardDescription, { children: "Recommended AAA combinations for this family, including white on eligible dark backgrounds." })
15589
15826
  ] }),
15590
15827
  /* @__PURE__ */ jsx(CardContent, { className: "grid gap-3", children: activeFamily.recommendedPairs.map((pair) => {
15591
- const isActive = selectedPair.id === pair.id;
15828
+ const isActive = selectedPair?.id === pair.id;
15592
15829
  return /* @__PURE__ */ jsxs(
15593
15830
  "button",
15594
15831
  {
15595
15832
  type: "button",
15596
15833
  onClick: () => handlePairChange(pair.id),
15597
15834
  className: cn(
15598
- "rounded-2xl border p-4 text-left transition-colors",
15835
+ "rounded-sm border p-4 text-left transition-colors",
15599
15836
  isActive ? "border-primary-500 bg-primary-50/70 dark:bg-primary-950/30" : "border-grey-200 hover:border-grey-400 hover:bg-grey-50 dark:border-grey-700 dark:hover:border-grey-500 dark:hover:bg-grey-900/70"
15600
15837
  ),
15601
15838
  children: [
@@ -15604,14 +15841,14 @@ function ColorPairingToolContent() {
15604
15841
  /* @__PURE__ */ jsx(
15605
15842
  "div",
15606
15843
  {
15607
- className: "size-11 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15844
+ className: "size-11 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
15608
15845
  style: { backgroundColor: pair.background.hex }
15609
15846
  }
15610
15847
  ),
15611
15848
  /* @__PURE__ */ jsx(
15612
15849
  "div",
15613
15850
  {
15614
- className: "size-11 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15851
+ className: "size-11 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
15615
15852
  style: { backgroundColor: pair.foreground.hex }
15616
15853
  }
15617
15854
  )
@@ -15639,7 +15876,8 @@ function ColorPairingToolContent() {
15639
15876
  }) })
15640
15877
  ] }) })
15641
15878
  ] }),
15642
- /* @__PURE__ */ jsx(PairComplianceCard, { pair: selectedPair })
15879
+ selectedPair ? /* @__PURE__ */ jsx(PairComplianceCard, { pair: selectedPair }) : null,
15880
+ showWhiteForegroundExample && whiteForegroundExample ? /* @__PURE__ */ jsx(WhiteTextExampleCard, { pair: whiteForegroundExample }) : null
15643
15881
  ] })
15644
15882
  ] });
15645
15883
  }
@@ -16007,7 +16245,7 @@ var ChartTooltip4 = ({
16007
16245
  {
16008
16246
  className: cn(
16009
16247
  // base
16010
- "rounded-md border text-sm shadow-md",
16248
+ "rounded-sm border text-sm shadow-md",
16011
16249
  // border color
16012
16250
  "border-gray-200 dark:border-gray-800",
16013
16251
  // background color
@@ -16599,7 +16837,7 @@ function DialogContent({
16599
16837
  {
16600
16838
  "data-slot": "dialog-content",
16601
16839
  className: cn(
16602
- "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
16840
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-sm border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
16603
16841
  className
16604
16842
  ),
16605
16843
  ...props,
@@ -16829,7 +17067,7 @@ function ContextMenuSubContent({
16829
17067
  {
16830
17068
  "data-slot": "context-menu-sub-content",
16831
17069
  className: cn(
16832
- "z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
17070
+ "z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-sm border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
16833
17071
  className
16834
17072
  ),
16835
17073
  ...props
@@ -16845,7 +17083,7 @@ function ContextMenuContent({
16845
17083
  {
16846
17084
  "data-slot": "context-menu-content",
16847
17085
  className: cn(
16848
- "z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
17086
+ "z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-sm border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
16849
17087
  className
16850
17088
  ),
16851
17089
  ...props
@@ -17352,7 +17590,7 @@ function DataTable({
17352
17590
  });
17353
17591
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4 p-1", children: [
17354
17592
  /* @__PURE__ */ jsx(DataTableToolbar, { table, search, toolbar }),
17355
- /* @__PURE__ */ jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs(Table, { children: [
17593
+ /* @__PURE__ */ jsx("div", { className: "rounded-sm border", children: /* @__PURE__ */ jsxs(Table, { children: [
17356
17594
  /* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header) => {
17357
17595
  return /* @__PURE__ */ jsx(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
17358
17596
  }) }, headerGroup.id)) }),
@@ -17470,7 +17708,7 @@ var ChartTooltip5 = ({ active, payload, valueFormatter }) => {
17470
17708
  {
17471
17709
  className: cn(
17472
17710
  // base
17473
- "rounded-md border text-sm shadow-md",
17711
+ "rounded-sm border text-sm shadow-md",
17474
17712
  // border color
17475
17713
  "border-gray-200 dark:border-gray-800",
17476
17714
  // background color
@@ -17708,8 +17946,8 @@ function DrawerContent({
17708
17946
  "data-slot": "drawer-content",
17709
17947
  className: cn(
17710
17948
  "group/drawer-content fixed z-50 flex h-auto flex-col bg-background",
17711
- "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
17712
- "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
17949
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-sm data-[vaul-drawer-direction=top]:border-b",
17950
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-sm data-[vaul-drawer-direction=bottom]:border-t",
17713
17951
  "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
17714
17952
  "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
17715
17953
  className
@@ -18128,7 +18366,7 @@ function FormMessage({ className, ...props }) {
18128
18366
 
18129
18367
  // package.json
18130
18368
  var package_default = {
18131
- version: "1.97.13"};
18369
+ version: "1.98.0"};
18132
18370
  var SluggerContext = React5__default.createContext(null);
18133
18371
  function flattenText(nodes) {
18134
18372
  if (nodes == null || typeof nodes === "boolean") return "";
@@ -18279,7 +18517,7 @@ function SiteSearch({ navigation }) {
18279
18517
  children: [
18280
18518
  /* @__PURE__ */ jsx("span", { className: "hidden text-grey-600 lg:inline-flex dark:text-grey-200", children: "Search site..." }),
18281
18519
  /* @__PURE__ */ jsx("span", { className: "inline-flex lg:hidden dark:text-grey-200", children: "Search..." }),
18282
- /* @__PURE__ */ jsxs("kbd", { className: "pointer-events-none absolute top-2 right-2 hidden h-5 items-center gap-1 rounded border bg-muted px-2 font-mono text-xs font-medium opacity-100 select-none sm:flex", children: [
18520
+ /* @__PURE__ */ jsxs("kbd", { className: "pointer-events-none absolute top-2 right-2 hidden h-5 items-center gap-1 rounded-sm border bg-muted px-2 font-mono text-xs font-medium opacity-100 select-none sm:flex", children: [
18283
18521
  /* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2318" }),
18284
18522
  "K"
18285
18523
  ] })
@@ -18494,7 +18732,7 @@ function HoverCardContent({
18494
18732
  align,
18495
18733
  sideOffset,
18496
18734
  className: cn(
18497
- "z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
18735
+ "z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-sm border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
18498
18736
  className
18499
18737
  ),
18500
18738
  ...props
@@ -18532,7 +18770,7 @@ function InputOTPSlot({
18532
18770
  "data-slot": "input-otp-slot",
18533
18771
  "data-active": isActive,
18534
18772
  className: cn(
18535
- "relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
18773
+ "relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all outline-none first:rounded-l-sm first:border-l last:rounded-r-sm aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-[3px] data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
18536
18774
  className
18537
18775
  ),
18538
18776
  ...props,
@@ -18817,7 +19055,7 @@ var ChartTooltip6 = ({ active, payload, label, valueFormatter }) => {
18817
19055
  {
18818
19056
  className: cn(
18819
19057
  // base
18820
- "rounded-md border text-sm shadow-md",
19058
+ "rounded-sm border text-sm shadow-md",
18821
19059
  // border color
18822
19060
  "border-gray-200 dark:border-gray-800",
18823
19061
  // background color
@@ -19712,7 +19950,7 @@ function Menubar({ className, ...props }) {
19712
19950
  {
19713
19951
  "data-slot": "menubar",
19714
19952
  className: cn(
19715
- "flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs",
19953
+ "flex h-9 items-center gap-1 rounded-sm border bg-background p-1 shadow-xs",
19716
19954
  className
19717
19955
  ),
19718
19956
  ...props
@@ -19762,7 +20000,7 @@ function MenubarContent({
19762
20000
  alignOffset,
19763
20001
  sideOffset,
19764
20002
  className: cn(
19765
- "z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
20003
+ "z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-sm border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
19766
20004
  className
19767
20005
  ),
19768
20006
  ...props
@@ -19906,7 +20144,7 @@ function MenubarSubContent({
19906
20144
  {
19907
20145
  "data-slot": "menubar-sub-content",
19908
20146
  className: cn(
19909
- "z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
20147
+ "z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-sm border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
19910
20148
  className
19911
20149
  ),
19912
20150
  ...props
@@ -28325,7 +28563,7 @@ function NavigationLink({
28325
28563
  href,
28326
28564
  onClick,
28327
28565
  className: clsx12(
28328
- "inline-block w-full cursor-pointer rounded-r-md border-l py-1 pr-2 pl-4 text-left text-base/8 sm:text-sm/6",
28566
+ "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",
28329
28567
  "hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
28330
28568
  "dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
28331
28569
  href === pathname && "border-l border-primary-800 bg-primary-800/10 font-bold text-primary-800 dark:border-white dark:bg-white/20"
@@ -28427,7 +28665,7 @@ function NavigationMenuContent({
28427
28665
  "data-slot": "navigation-menu-content",
28428
28666
  className: cn(
28429
28667
  "top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto",
28430
- "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95",
28668
+ "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-sm group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95",
28431
28669
  className
28432
28670
  ),
28433
28671
  ...props
@@ -28443,7 +28681,7 @@ function NavigationMenuViewport({
28443
28681
  {
28444
28682
  "data-slot": "navigation-menu-viewport",
28445
28683
  className: cn(
28446
- "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
28684
+ "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-sm border bg-popover text-popover-foreground shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
28447
28685
  className
28448
28686
  ),
28449
28687
  ...props
@@ -28766,7 +29004,7 @@ function NSWCard({
28766
29004
  "div",
28767
29005
  {
28768
29006
  className: cn(
28769
- "h-full rounded-md border border-(--nsw-card-border)",
29007
+ "h-full rounded-sm border border-(--nsw-card-border)",
28770
29008
  hasImage && "border-t-none rounded-t-none"
28771
29009
  ),
28772
29010
  children: /* @__PURE__ */ jsx("div", { className: "flex h-full flex-col p-8", children: bodyChildren })
@@ -28778,7 +29016,7 @@ function NSWCard({
28778
29016
  "div",
28779
29017
  {
28780
29018
  className: cn(
28781
- "flex h-full flex-col rounded-md border border-(--nsw-card-border) p-8",
29019
+ "flex h-full flex-col rounded-sm border border-(--nsw-card-border) p-8",
28782
29020
  hasImage && "border-t-none rounded-t-none"
28783
29021
  ),
28784
29022
  children: bodyChildren
@@ -29333,7 +29571,7 @@ function ResizableHandle({
29333
29571
  className
29334
29572
  ),
29335
29573
  ...props,
29336
- children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border", children: /* @__PURE__ */ jsx(Icons.drag_indicator, { className: "size-2.5" }) })
29574
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx(Icons.drag_indicator, { className: "size-2.5" }) })
29337
29575
  }
29338
29576
  );
29339
29577
  }
@@ -29632,7 +29870,7 @@ function Sidebar({
29632
29870
  {
29633
29871
  "data-sidebar": "sidebar",
29634
29872
  "data-slot": "sidebar-inner",
29635
- className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",
29873
+ className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",
29636
29874
  children
29637
29875
  }
29638
29876
  )
@@ -30091,7 +30329,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
30091
30329
  const isActive = pathname === link.href;
30092
30330
  const isActiveOrHasActiveDescendant = isLinkOrDescendantActive(link, pathname);
30093
30331
  const baseLinkClasses = clsx12(
30094
- "w-full cursor-pointer rounded-r-md border-l py-1 pr-2 pl-4 text-left text-base/8 sm:text-sm/6",
30332
+ "w-full cursor-pointer rounded-r-sm border-l py-1 pr-2 pl-4 text-left text-base/8 sm:text-sm/6",
30095
30333
  "hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
30096
30334
  "dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
30097
30335
  isActive && "border-l border-primary-800 bg-primary-800/10 font-bold text-primary-800 dark:border-white dark:bg-white/20"
@@ -31027,7 +31265,7 @@ var TabNavigation = React5__default.forwardRef(({ className, children, ...props
31027
31265
  motion.div,
31028
31266
  {
31029
31267
  layoutId: "hoverBackground",
31030
- className: "absolute top-2 bottom-2 transform rounded-md border border-grey-100 bg-grey-150 transition-all duration-200 ease-out dark:border-grey-700 dark:bg-grey-800",
31268
+ className: "absolute top-2 bottom-2 transform rounded-sm border border-grey-100 bg-grey-150 transition-all duration-200 ease-out dark:border-grey-700 dark:bg-grey-800",
31031
31269
  transition: {
31032
31270
  type: "spring",
31033
31271
  stiffness: 500,
@@ -31563,7 +31801,7 @@ var Tracker = React5__default.forwardRef(
31563
31801
  );
31564
31802
  Tracker.displayName = "Tracker";
31565
31803
  var buttonVariants4 = cva(
31566
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
31804
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
31567
31805
  {
31568
31806
  variants: {
31569
31807
  variant: {
@@ -31682,7 +31920,7 @@ var Artifact = ({ className, ...props }) => /* @__PURE__ */ jsx(
31682
31920
  "div",
31683
31921
  {
31684
31922
  className: cn(
31685
- "flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm",
31923
+ "flex flex-col overflow-hidden rounded-sm border bg-background shadow-sm",
31686
31924
  className
31687
31925
  ),
31688
31926
  ...props
@@ -31928,7 +32166,7 @@ function isFunction(value) {
31928
32166
  return typeof value === "function";
31929
32167
  }
31930
32168
  var badgeVariants2 = cva(
31931
- "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
32169
+ "inline-flex items-center justify-center rounded-sm border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
31932
32170
  {
31933
32171
  variants: {
31934
32172
  variant: {
@@ -32113,7 +32351,7 @@ var CodeBlock = ({
32113
32351
  "div",
32114
32352
  {
32115
32353
  className: cn(
32116
- "relative w-full overflow-hidden rounded-md border bg-background text-foreground",
32354
+ "relative w-full overflow-hidden rounded-sm border bg-background text-foreground",
32117
32355
  className
32118
32356
  ),
32119
32357
  ...props,
@@ -32228,7 +32466,7 @@ function HoverCardContent2({
32228
32466
  align,
32229
32467
  sideOffset,
32230
32468
  className: cn(
32231
- "z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
32469
+ "z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-sm border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
32232
32470
  className
32233
32471
  ),
32234
32472
  ...props
@@ -32932,7 +33170,7 @@ function DropdownMenuContent2({
32932
33170
  "data-slot": "dropdown-menu-content",
32933
33171
  sideOffset,
32934
33172
  className: cn(
32935
- "z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
33173
+ "z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-sm border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
32936
33174
  className
32937
33175
  ),
32938
33176
  ...props
@@ -33219,7 +33457,7 @@ function Textarea2({ className, ...props }) {
33219
33457
  {
33220
33458
  "data-slot": "textarea",
33221
33459
  className: cn(
33222
- "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
33460
+ "flex field-sizing-content min-h-16 w-full rounded-sm border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
33223
33461
  className
33224
33462
  ),
33225
33463
  ...props
@@ -33239,7 +33477,7 @@ function PromptInputAttachment({ data, className, ...props }) {
33239
33477
  return /* @__PURE__ */ jsxs(
33240
33478
  "div",
33241
33479
  {
33242
- className: cn("group relative h-14 w-14 rounded-md border", className),
33480
+ className: cn("group relative h-14 w-14 rounded-sm border", className),
33243
33481
  ...props,
33244
33482
  children: [
33245
33483
  data.mediaType?.startsWith("image/") && data.url ? /* @__PURE__ */ jsx(
@@ -33517,7 +33755,7 @@ var PromptInput = ({
33517
33755
  "form",
33518
33756
  {
33519
33757
  className: cn(
33520
- "w-full divide-y overflow-hidden rounded-xl border bg-background shadow-sm",
33758
+ "w-full divide-y overflow-hidden rounded-sm border bg-background shadow-sm",
33521
33759
  className
33522
33760
  ),
33523
33761
  onSubmit: handleSubmit,
@@ -33882,7 +34120,7 @@ var TaskItemFile = ({ children, className, ...props }) => /* @__PURE__ */ jsx(
33882
34120
  "div",
33883
34121
  {
33884
34122
  className: cn(
33885
- "inline-flex items-center gap-1 rounded-md border bg-secondary px-1.5 py-0.5 text-xs text-foreground",
34123
+ "inline-flex items-center gap-1 rounded-sm border bg-secondary px-1.5 py-0.5 text-xs text-foreground",
33886
34124
  className
33887
34125
  ),
33888
34126
  ...props,
@@ -33917,7 +34155,7 @@ var TaskContent = ({ children, className, ...props }) => /* @__PURE__ */ jsx(
33917
34155
  children: /* @__PURE__ */ jsx("div", { className: "mt-4 space-y-2 border-l-2 border-muted pl-4", children })
33918
34156
  }
33919
34157
  );
33920
- var Tool = ({ className, ...props }) => /* @__PURE__ */ jsx(Collapsible2, { className: cn("not-prose mb-4 w-full rounded-md border", className), ...props });
34158
+ var Tool = ({ className, ...props }) => /* @__PURE__ */ jsx(Collapsible2, { className: cn("not-prose mb-4 w-full rounded-sm border", className), ...props });
33921
34159
  var getStatusBadge = (status) => {
33922
34160
  const labels = {
33923
34161
  "input-streaming": "Pending",
@@ -33999,7 +34237,7 @@ function Input2({ className, type, ...props }) {
33999
34237
  type,
34000
34238
  "data-slot": "input",
34001
34239
  className: cn(
34002
- "h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
34240
+ "h-9 w-full min-w-0 rounded-sm border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
34003
34241
  "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
34004
34242
  "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
34005
34243
  className
@@ -34038,7 +34276,7 @@ var WebPreview = ({
34038
34276
  return /* @__PURE__ */ jsx(WebPreviewContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
34039
34277
  "div",
34040
34278
  {
34041
- className: cn("flex size-full flex-col rounded-lg border bg-card", className),
34279
+ className: cn("flex size-full flex-col rounded-sm border bg-card", className),
34042
34280
  ...props,
34043
34281
  children
34044
34282
  }