@nswds/app 1.98.0 → 1.100.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,23 @@ 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
+ var recommendedForegroundTones = [50, 200, 400, 600, 800];
14922
14923
  var AAA_NORMAL_TEXT_RATIO = 7;
14924
+ var DEFAULT_PRIMARY_FAMILY_KEY = "blue";
14925
+ var DEFAULT_ACCENT_FAMILY_KEY = "red";
14926
+ var MIN_DARK_BACKGROUND_TONE_FOR_WHITE = 600;
14927
+ var WHITE_FOREGROUND = {
14928
+ token: "white",
14929
+ name: "White",
14930
+ hex: "#ffffff",
14931
+ rgb: "rgb(255, 255, 255)",
14932
+ hsl: "hsl(0, 0%, 100%)",
14933
+ oklch: "oklch(1 0 0)",
14934
+ familyKey: "white",
14935
+ familyLabel: "White",
14936
+ tone: 0
14937
+ };
14923
14938
  function extractTone(token) {
14924
14939
  const match = token.match(/-(\d+)$/);
14925
14940
  return match ? Number.parseInt(match[1], 10) : 0;
@@ -14928,23 +14943,48 @@ function formatFamilyLabel(name, key) {
14928
14943
  if (key === "grey") return "Grey";
14929
14944
  return name.replace(/^NSW Aboriginal\s+/i, "").replace(/^NSW\s+/i, "").trim();
14930
14945
  }
14931
- function toPairingColor(color2) {
14946
+ function toPairingColor(color2, familyKey, familyLabel) {
14932
14947
  return {
14933
14948
  ...color2,
14949
+ familyKey,
14950
+ familyLabel,
14934
14951
  tone: extractTone(color2.token)
14935
14952
  };
14936
14953
  }
14937
- function getPreferredForegroundTone(backgroundTone) {
14938
- if (backgroundTone <= 200) return 800;
14939
- if (backgroundTone <= 500) return 700;
14940
- if (backgroundTone <= 650) return 250;
14941
- return 200;
14954
+ function buildPairingCollections() {
14955
+ return {
14956
+ brand: Object.entries(colors.brand).map(([key, palette]) => {
14957
+ const familyLabel = formatFamilyLabel(palette.name, key);
14958
+ return {
14959
+ key,
14960
+ label: familyLabel,
14961
+ paletteName: palette.name,
14962
+ colors: palette.colors.map((color2) => toPairingColor(color2, key, familyLabel))
14963
+ };
14964
+ }),
14965
+ aboriginal: Object.entries(colors.aboriginal).map(([key, palette]) => {
14966
+ const familyLabel = formatFamilyLabel(palette.name, key);
14967
+ return {
14968
+ key,
14969
+ label: familyLabel,
14970
+ paletteName: palette.name,
14971
+ colors: palette.colors.map((color2) => toPairingColor(color2, key, familyLabel))
14972
+ };
14973
+ })
14974
+ };
14942
14975
  }
14976
+ var pairingFamilyCollections = buildPairingCollections();
14943
14977
  function getPairRating(contrastRatio) {
14944
14978
  if (contrastRatio >= 7) return "AAA";
14945
14979
  if (contrastRatio >= 4.5) return "AA";
14946
14980
  return "AA Large";
14947
14981
  }
14982
+ function getPreferredForegroundTone(backgroundTone) {
14983
+ if (backgroundTone <= 200) return 800;
14984
+ if (backgroundTone <= 500) return 700;
14985
+ if (backgroundTone <= 650) return 250;
14986
+ return 200;
14987
+ }
14948
14988
  function isPreferredDirection(backgroundTone, foregroundTone, preferredForegroundTone) {
14949
14989
  if (preferredForegroundTone < backgroundTone) {
14950
14990
  return foregroundTone < backgroundTone;
@@ -14967,15 +15007,27 @@ function buildPair(background, foreground) {
14967
15007
  rating: getPairRating(contrastRatio)
14968
15008
  };
14969
15009
  }
14970
- function pickForeground(colorsToPair, background, minimumRatio) {
15010
+ function sortRecommendedPairs(background, pairs) {
14971
15011
  const preferredForegroundTone = getPreferredForegroundTone(background.tone);
14972
- const passingCandidates = colorsToPair.filter((color2) => color2.token !== background.token).map((color2) => buildPair(background, color2)).filter((pair) => pair.contrastRatio >= minimumRatio);
14973
- if (passingCandidates.length === 0) return null;
14974
- const preferredCandidates = passingCandidates.filter(
14975
- (pair) => isPreferredDirection(background.tone, pair.foreground.tone, preferredForegroundTone)
14976
- );
14977
- const candidates = preferredCandidates.length > 0 ? preferredCandidates : passingCandidates;
14978
- return candidates.sort((left, right) => {
15012
+ return [...pairs].sort((left, right) => {
15013
+ const leftPreferred = isPreferredDirection(
15014
+ background.tone,
15015
+ left.foreground.tone,
15016
+ preferredForegroundTone
15017
+ ) ? 0 : 1;
15018
+ const rightPreferred = isPreferredDirection(
15019
+ background.tone,
15020
+ right.foreground.tone,
15021
+ preferredForegroundTone
15022
+ ) ? 0 : 1;
15023
+ if (leftPreferred !== rightPreferred) {
15024
+ return leftPreferred - rightPreferred;
15025
+ }
15026
+ const leftWhitePenalty = left.foreground.token === WHITE_FOREGROUND.token ? 1 : 0;
15027
+ const rightWhitePenalty = right.foreground.token === WHITE_FOREGROUND.token ? 1 : 0;
15028
+ if (leftWhitePenalty !== rightWhitePenalty) {
15029
+ return leftWhitePenalty - rightWhitePenalty;
15030
+ }
14979
15031
  const leftTargetDelta = Math.abs(left.foreground.tone - preferredForegroundTone);
14980
15032
  const rightTargetDelta = Math.abs(right.foreground.tone - preferredForegroundTone);
14981
15033
  if (leftTargetDelta !== rightTargetDelta) {
@@ -14986,46 +15038,122 @@ function pickForeground(colorsToPair, background, minimumRatio) {
14986
15038
  if (leftToneGap !== rightToneGap) {
14987
15039
  return rightToneGap - leftToneGap;
14988
15040
  }
15041
+ if (left.foreground.familyKey === background.familyKey && right.foreground.familyKey !== background.familyKey) {
15042
+ return -1;
15043
+ }
15044
+ if (right.foreground.familyKey === background.familyKey && left.foreground.familyKey !== background.familyKey) {
15045
+ return 1;
15046
+ }
14989
15047
  return right.contrastRatio - left.contrastRatio;
14990
- })[0];
15048
+ });
14991
15049
  }
14992
- function buildRecommendedPairs(colorsToPair, minimumRatio) {
14993
- const backgrounds = recommendedBackgroundTones.map((tone) => colorsToPair.find((color2) => color2.tone === tone)).filter((color2) => Boolean(color2));
14994
- const recommendedPairs = [];
14995
- for (const background of backgrounds) {
14996
- const pair = pickForeground(colorsToPair, background, minimumRatio);
14997
- if (!pair || recommendedPairs.some((item) => item.id === pair.id)) {
14998
- continue;
14999
- }
15000
- recommendedPairs.push(pair);
15050
+ function dedupeColors(colorsToDedupe) {
15051
+ return Array.from(new Map(colorsToDedupe.map((color2) => [color2.token, color2])).values());
15052
+ }
15053
+ function buildRecommendedPairsForBackground(background, foregrounds, minimumRatio) {
15054
+ const candidatePairs = foregrounds.filter((foreground) => foreground.token !== background.token).map((foreground) => buildPair(background, foreground)).filter((pair) => pair.contrastRatio >= minimumRatio);
15055
+ const whitePair = background.tone >= MIN_DARK_BACKGROUND_TONE_FOR_WHITE ? buildPair(background, WHITE_FOREGROUND) : null;
15056
+ if (whitePair && whitePair.contrastRatio >= minimumRatio) {
15057
+ candidatePairs.push(whitePair);
15001
15058
  }
15002
- return recommendedPairs;
15059
+ const dedupedPairs = Array.from(new Map(candidatePairs.map((pair) => [pair.id, pair])).values());
15060
+ return sortRecommendedPairs(background, dedupedPairs);
15061
+ }
15062
+ function findGreyFamily(families) {
15063
+ return families.find((family) => family.key.toLowerCase().includes("grey")) ?? families[0];
15064
+ }
15065
+ function getNonGreyFamilies(families) {
15066
+ const greyFamily = findGreyFamily(families);
15067
+ return families.filter((family) => family.key !== greyFamily.key);
15068
+ }
15069
+ function findFamilyByKey(families, key) {
15070
+ return key ? families.find((family) => family.key === key) : void 0;
15071
+ }
15072
+ function getDefaultPrimaryFamily(families) {
15073
+ const nonGreyFamilies = getNonGreyFamilies(families);
15074
+ return findFamilyByKey(nonGreyFamilies, DEFAULT_PRIMARY_FAMILY_KEY) ?? findFamilyByKey(nonGreyFamilies, "green") ?? nonGreyFamilies[0] ?? families[0];
15003
15075
  }
15004
- function buildRecommendedCollections(minimumRatio) {
15076
+ function getDefaultAccentFamily(families, primaryKey) {
15077
+ const nonGreyFamilies = getNonGreyFamilies(families).filter((family) => family.key !== primaryKey);
15078
+ return findFamilyByKey(nonGreyFamilies, DEFAULT_ACCENT_FAMILY_KEY) ?? nonGreyFamilies[0] ?? getDefaultPrimaryFamily(families);
15079
+ }
15080
+ function isApprovedBackgroundTone(color2) {
15081
+ return recommendedBackgroundTones.includes(
15082
+ color2.tone
15083
+ );
15084
+ }
15085
+ function isApprovedForegroundTone(color2) {
15086
+ return recommendedForegroundTones.includes(
15087
+ color2.tone
15088
+ );
15089
+ }
15090
+ function getPairingFamilies(themeCategory) {
15091
+ return pairingFamilyCollections[themeCategory];
15092
+ }
15093
+ function getDefaultAccentFamilyKey(themeCategory, primaryKey) {
15094
+ return getDefaultAccentFamily(getPairingFamilies(themeCategory), primaryKey).key;
15095
+ }
15096
+ function getPairingContext(themeCategory, primaryKey, accentKey) {
15097
+ const families = getPairingFamilies(themeCategory);
15098
+ const primary = findFamilyByKey(getNonGreyFamilies(families), primaryKey) ?? getDefaultPrimaryFamily(families);
15099
+ const accent = findFamilyByKey(
15100
+ getNonGreyFamilies(families).filter((family) => family.key !== primary.key),
15101
+ accentKey
15102
+ ) ?? getDefaultAccentFamily(families, primary.key);
15103
+ const grey = findGreyFamily(families);
15104
+ const allFamilies = [primary, accent, grey];
15105
+ const backgroundGroups = [
15106
+ {
15107
+ key: "primary",
15108
+ label: "Primary backgrounds",
15109
+ family: primary,
15110
+ backgrounds: primary.colors.filter(isApprovedBackgroundTone)
15111
+ },
15112
+ {
15113
+ key: "accent",
15114
+ label: "Accent backgrounds",
15115
+ family: accent,
15116
+ backgrounds: accent.colors.filter(isApprovedBackgroundTone)
15117
+ },
15118
+ {
15119
+ key: "grey",
15120
+ label: "Grey backgrounds",
15121
+ family: grey,
15122
+ backgrounds: grey.colors.filter(isApprovedBackgroundTone)
15123
+ }
15124
+ ];
15125
+ const backgrounds = backgroundGroups.flatMap((group) => group.backgrounds);
15126
+ const candidateForegrounds = dedupeColors(
15127
+ allFamilies.flatMap((family) => family.colors.filter(isApprovedForegroundTone))
15128
+ );
15129
+ const pairsByBackground = {};
15130
+ for (const background of backgrounds) {
15131
+ pairsByBackground[background.token] = buildRecommendedPairsForBackground(
15132
+ background,
15133
+ candidateForegrounds,
15134
+ AAA_NORMAL_TEXT_RATIO
15135
+ );
15136
+ }
15005
15137
  return {
15006
- brand: Object.entries(colors.brand).map(([key, palette]) => {
15007
- const scale2 = palette.colors.map(toPairingColor);
15008
- return {
15009
- key,
15010
- label: formatFamilyLabel(palette.name, key),
15011
- paletteName: palette.name,
15012
- colors: scale2,
15013
- recommendedPairs: buildRecommendedPairs(scale2, minimumRatio)
15014
- };
15015
- }),
15016
- aboriginal: Object.entries(colors.aboriginal).map(([key, palette]) => {
15017
- const scale2 = palette.colors.map(toPairingColor);
15018
- return {
15019
- key,
15020
- label: formatFamilyLabel(palette.name, key),
15021
- paletteName: palette.name,
15022
- colors: scale2,
15023
- recommendedPairs: buildRecommendedPairs(scale2, minimumRatio)
15024
- };
15025
- })
15138
+ accent,
15139
+ allFamilies,
15140
+ backgroundGroups,
15141
+ backgrounds,
15142
+ grey,
15143
+ pairsByBackground,
15144
+ primary,
15145
+ recommendedPairs: backgrounds.flatMap(
15146
+ (background) => pairsByBackground[background.token] ?? []
15147
+ ),
15148
+ themeCategory
15026
15149
  };
15027
15150
  }
15028
- var recommendedAaaPairingCollections = buildRecommendedCollections(AAA_NORMAL_TEXT_RATIO);
15151
+ function getWhiteForegroundPair(background) {
15152
+ return buildPair(background, WHITE_FOREGROUND);
15153
+ }
15154
+ function supportsWhiteForegroundPreview(background) {
15155
+ return background.tone >= MIN_DARK_BACKGROUND_TONE_FOR_WHITE;
15156
+ }
15029
15157
  function getPairingColorValue(color2, format) {
15030
15158
  return getColorValue(color2, format);
15031
15159
  }
@@ -15171,42 +15299,125 @@ function FormatToggle({ format, setFormat }) {
15171
15299
  )
15172
15300
  ] });
15173
15301
  }
15174
- function getPreferredFamilyKey(families) {
15175
- return families.find((family) => family.key === "green")?.key ?? families[0]?.key ?? "";
15302
+ var AAA_NORMAL_TEXT_THRESHOLD = "7.0:1 or higher for text below 18pt, or below 14pt bold";
15303
+ var AAA_LARGE_TEXT_THRESHOLD = "4.5:1 or higher for text at 18pt and above, or 14pt and above bold";
15304
+ var PREFERRED_BACKGROUND_TONES = [400, 600, 200, 800, 100, 50];
15305
+ function getToneFromToken(token) {
15306
+ if (!token) return null;
15307
+ const match = token.match(/-(\d+)$/);
15308
+ return match ? Number.parseInt(match[1], 10) : null;
15309
+ }
15310
+ function getFamilySwatchColor(family, preferredTone = 600) {
15311
+ const exactMatch = family.colors.find((color2) => color2.tone === preferredTone);
15312
+ if (exactMatch) {
15313
+ return exactMatch.hex;
15314
+ }
15315
+ const closestMatch = [...family.colors].sort(
15316
+ (left, right) => Math.abs(left.tone - preferredTone) - Math.abs(right.tone - preferredTone)
15317
+ )[0];
15318
+ return closestMatch?.hex ?? "transparent";
15319
+ }
15320
+ function getFamilySelectorLabel(family, themeCategory, selectionRole) {
15321
+ if (themeCategory !== "aboriginal") {
15322
+ return family.label;
15323
+ }
15324
+ const preferredTone = selectionRole === "primary colour" ? 800 : 600;
15325
+ return family.colors.find((color2) => color2.tone === preferredTone)?.name ?? family.label;
15176
15326
  }
15177
- function getDefaultPair(family) {
15178
- if (!family || family.recommendedPairs.length === 0) return null;
15179
- return family.recommendedPairs.reduce((bestPair, pair) => {
15180
- const bestDelta = Math.abs(bestPair.background.tone - 600);
15181
- const currentDelta = Math.abs(pair.background.tone - 600);
15182
- return currentDelta < bestDelta ? pair : bestPair;
15183
- }, family.recommendedPairs[0]);
15327
+ function isWhiteForegroundPair(pair) {
15328
+ return pair.foreground.token === "white";
15184
15329
  }
15185
- function getFamilySwatchColor(family) {
15186
- 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";
15330
+ function getPreferredPairForBackground(pairs, preferredPairId) {
15331
+ if (preferredPairId) {
15332
+ const preferredPair = pairs.find((pair) => pair.id === preferredPairId);
15333
+ if (preferredPair) {
15334
+ return preferredPair;
15335
+ }
15336
+ }
15337
+ return pairs.find((pair) => !isWhiteForegroundPair(pair)) ?? pairs[0] ?? null;
15338
+ }
15339
+ function getDefaultBackgroundToken(context) {
15340
+ for (const tone of PREFERRED_BACKGROUND_TONES) {
15341
+ for (const group of context.backgroundGroups) {
15342
+ const match = group.backgrounds.find(
15343
+ (background) => background.tone === tone && (context.pairsByBackground[background.token]?.length ?? 0) > 0
15344
+ );
15345
+ if (match) {
15346
+ return match.token;
15347
+ }
15348
+ }
15349
+ }
15350
+ for (const tone of PREFERRED_BACKGROUND_TONES) {
15351
+ for (const group of context.backgroundGroups) {
15352
+ const match = group.backgrounds.find((background) => background.tone === tone);
15353
+ if (match) {
15354
+ return match.token;
15355
+ }
15356
+ }
15357
+ }
15358
+ return context.backgrounds[0]?.token ?? "";
15359
+ }
15360
+ function resolveBackgroundToken(context, preferredToken, preferredTone) {
15361
+ if (preferredToken && context.backgrounds.some((background) => background.token === preferredToken)) {
15362
+ return preferredToken;
15363
+ }
15364
+ if (preferredTone !== null && preferredTone !== void 0) {
15365
+ for (const group of context.backgroundGroups) {
15366
+ const match = group.backgrounds.find((background) => background.tone === preferredTone);
15367
+ if (match) {
15368
+ return match.token;
15369
+ }
15370
+ }
15371
+ }
15372
+ return getDefaultBackgroundToken(context);
15187
15373
  }
15188
15374
  function ColorPairingToolLoading() {
15189
15375
  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" }),
15191
- /* @__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" })
15376
+ /* @__PURE__ */ jsx("div", { className: "h-32 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15377
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-6 lg:grid-cols-2", children: [
15378
+ /* @__PURE__ */ jsx("div", { className: "h-48 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15379
+ /* @__PURE__ */ jsx("div", { className: "h-48 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" })
15380
+ ] }),
15381
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(18rem,0.72fr)]", children: [
15382
+ /* @__PURE__ */ jsx("div", { className: "h-96 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15383
+ /* @__PURE__ */ jsx("div", { className: "h-96 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" })
15194
15384
  ] })
15195
15385
  ] });
15196
15386
  }
15197
15387
  function getInitialPairingState(searchParams) {
15198
15388
  const paletteParam = searchParams.get("palette");
15199
- const familyParam = searchParams.get("family");
15389
+ const primaryParam = searchParams.get("primary");
15390
+ const accentParam = searchParams.get("accent");
15200
15391
  const pairParam = searchParams.get("pair");
15392
+ const backgroundParam = searchParams.get("background");
15201
15393
  const themeCategory = paletteParam === "brand" || paletteParam === "aboriginal" ? paletteParam : "brand";
15202
- const families = recommendedAaaPairingCollections[themeCategory];
15203
- const familyKey = families.some((family) => family.key === familyParam) ? familyParam : getPreferredFamilyKey(families);
15204
- 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 }) {
15394
+ const context = getPairingContext(themeCategory, primaryParam, accentParam);
15395
+ const pairBackgroundToken = context.recommendedPairs.find((pair) => pair.id === pairParam)?.background.token ?? null;
15396
+ const selectedBackgroundToken = resolveBackgroundToken(
15397
+ context,
15398
+ backgroundParam ?? pairBackgroundToken,
15399
+ getToneFromToken(backgroundParam ?? pairBackgroundToken)
15400
+ );
15401
+ const selectedPairId = getPreferredPairForBackground(
15402
+ context.pairsByBackground[selectedBackgroundToken] ?? [],
15403
+ pairParam
15404
+ )?.id ?? "";
15405
+ return {
15406
+ accentKey: context.accent.key,
15407
+ primaryKey: context.primary.key,
15408
+ selectedBackgroundToken,
15409
+ selectedPairId,
15410
+ themeCategory
15411
+ };
15412
+ }
15413
+ function PairPreview({
15414
+ familySummary,
15415
+ isRecommended,
15416
+ pair
15417
+ }) {
15418
+ const whiteForeground = isWhiteForegroundPair(pair);
15419
+ const statusLabel = isRecommended ? "Pass" : pair.passes.aaaLarge ? "Large text only" : "Example only";
15420
+ const StatusIcon = isRecommended ? Icons.check : Icons.info;
15210
15421
  return /* @__PURE__ */ jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsx(
15211
15422
  "div",
15212
15423
  {
@@ -15228,7 +15439,7 @@ function PairPreview({ family, pair }) {
15228
15439
  },
15229
15440
  children: [
15230
15441
  /* @__PURE__ */ jsx(Icons.palette, { "data-slot": "icon", className: "size-4" }),
15231
- family.label
15442
+ familySummary
15232
15443
  ]
15233
15444
  }
15234
15445
  ),
@@ -15249,10 +15460,10 @@ function PairPreview({ family, pair }) {
15249
15460
  )
15250
15461
  ] }),
15251
15462
  /* @__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" }),
15463
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: whiteForeground && !isRecommended ? "White on colour example" : whiteForeground ? "White on colour" : "Colour on colour" }),
15253
15464
  /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
15254
15465
  /* @__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." })
15466
+ /* @__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 combinations across your selected primary, accent, and grey families." })
15256
15467
  ] })
15257
15468
  ] }),
15258
15469
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
@@ -15265,8 +15476,8 @@ function PairPreview({ family, pair }) {
15265
15476
  color: pair.background.hex
15266
15477
  },
15267
15478
  children: [
15268
- "Pass",
15269
- /* @__PURE__ */ jsx(Icons.check, { "data-slot": "icon", className: "size-4" })
15479
+ statusLabel,
15480
+ /* @__PURE__ */ jsx(StatusIcon, { "data-slot": "icon", className: "size-4" })
15270
15481
  ]
15271
15482
  }
15272
15483
  ),
@@ -15289,6 +15500,41 @@ function PairPreview({ family, pair }) {
15289
15500
  }
15290
15501
  ) });
15291
15502
  }
15503
+ function PreviewFallbackCard({
15504
+ familySummary,
15505
+ selectedBackground
15506
+ }) {
15507
+ return /* @__PURE__ */ jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsx(
15508
+ "div",
15509
+ {
15510
+ className: "p-6 sm:min-h-[26rem] sm:p-8",
15511
+ style: {
15512
+ backgroundColor: selectedBackground.hex,
15513
+ color: selectedBackground.tone >= 600 ? "#ffffff" : "#002664"
15514
+ },
15515
+ children: /* @__PURE__ */ jsxs("div", { className: "flex min-h-[22rem] flex-col justify-between gap-8", children: [
15516
+ /* @__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: [
15517
+ /* @__PURE__ */ jsx(Icons.palette, { "data-slot": "icon", className: "size-4" }),
15518
+ familySummary
15519
+ ] }) }),
15520
+ /* @__PURE__ */ jsxs("div", { className: "max-w-xl space-y-4 pb-12 sm:pb-16", children: [
15521
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: "Approved background" }),
15522
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
15523
+ /* @__PURE__ */ jsx("h3", { className: "max-w-lg text-4xl leading-none font-bold text-current sm:text-5xl", children: "Pair colour with confidence." }),
15524
+ /* @__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." })
15525
+ ] })
15526
+ ] }),
15527
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
15528
+ /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2 rounded-full bg-current/10 px-4 py-2 text-sm font-semibold", children: [
15529
+ "No recommendation",
15530
+ /* @__PURE__ */ jsx(Icons.info, { "data-slot": "icon", className: "size-4" })
15531
+ ] }),
15532
+ /* @__PURE__ */ jsx("span", { className: "inline-flex rounded-full border border-current px-4 py-2 text-sm", children: selectedBackground.token })
15533
+ ] })
15534
+ ] })
15535
+ }
15536
+ ) });
15537
+ }
15292
15538
  function PairDetailCard({
15293
15539
  color: color2,
15294
15540
  format,
@@ -15326,7 +15572,7 @@ function PairDetailCard({
15326
15572
  /* @__PURE__ */ jsx(
15327
15573
  "div",
15328
15574
  {
15329
- className: "size-14 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15575
+ className: "size-14 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
15330
15576
  style: { backgroundColor: color2.hex }
15331
15577
  }
15332
15578
  ),
@@ -15365,7 +15611,7 @@ function ComplianceRow({
15365
15611
  passes,
15366
15612
  threshold
15367
15613
  }) {
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: [
15614
+ 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
15615
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
15370
15616
  /* @__PURE__ */ jsx("p", { className: "font-medium", children: label }),
15371
15617
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: threshold })
@@ -15392,7 +15638,7 @@ function PairComplianceCard({ pair }) {
15392
15638
  /* @__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
15639
  ] }),
15394
15640
  /* @__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: [
15641
+ /* @__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
15642
  /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Contrast ratio" }),
15397
15643
  /* @__PURE__ */ jsxs("p", { className: "mt-1 text-2xl font-semibold", children: [
15398
15644
  pair.contrastRatio.toFixed(2),
@@ -15404,7 +15650,7 @@ function PairComplianceCard({ pair }) {
15404
15650
  {
15405
15651
  label: "AAA normal text",
15406
15652
  passes: pair.passes.aaaText,
15407
- threshold: "7.0:1 or higher"
15653
+ threshold: AAA_NORMAL_TEXT_THRESHOLD
15408
15654
  }
15409
15655
  ),
15410
15656
  /* @__PURE__ */ jsx(
@@ -15412,31 +15658,155 @@ function PairComplianceCard({ pair }) {
15412
15658
  {
15413
15659
  label: "AAA large text",
15414
15660
  passes: pair.passes.aaaLarge,
15415
- threshold: "4.5:1 or higher"
15661
+ threshold: AAA_LARGE_TEXT_THRESHOLD
15416
15662
  }
15417
15663
  )
15418
15664
  ] })
15419
15665
  ] });
15420
15666
  }
15667
+ function WhiteTextExampleCard({ pair }) {
15668
+ return /* @__PURE__ */ jsxs(Card, { children: [
15669
+ /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 border-b", children: [
15670
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: "White text example" }),
15671
+ /* @__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." })
15672
+ ] }),
15673
+ /* @__PURE__ */ jsxs(CardContent, { className: "grid gap-6 xl:grid-cols-[minmax(0,1.1fr)_minmax(18rem,0.9fr)]", children: [
15674
+ /* @__PURE__ */ jsx(
15675
+ "div",
15676
+ {
15677
+ className: "rounded-sm border border-grey-200 p-6 dark:border-grey-700",
15678
+ style: {
15679
+ backgroundColor: pair.background.hex,
15680
+ color: pair.foreground.hex
15681
+ },
15682
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
15683
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
15684
+ /* @__PURE__ */ jsx("p", { className: "text-lg leading-tight font-semibold", children: "Large text example" }),
15685
+ /* @__PURE__ */ jsxs("p", { className: "text-sm/6", children: [
15686
+ "White text on ",
15687
+ pair.background.token
15688
+ ] })
15689
+ ] }),
15690
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1 text-sm/6", children: [
15691
+ /* @__PURE__ */ jsxs("p", { children: [
15692
+ "AAA normal text: ",
15693
+ /* @__PURE__ */ jsx("strong", { children: pair.passes.aaaText ? "pass" : "fail" })
15694
+ ] }),
15695
+ /* @__PURE__ */ jsxs("p", { children: [
15696
+ "AAA large text: ",
15697
+ /* @__PURE__ */ jsx("strong", { children: pair.passes.aaaLarge ? "pass" : "fail" })
15698
+ ] })
15699
+ ] }),
15700
+ /* @__PURE__ */ jsx("p", { className: "text-sm/6", children: "Normal text means body text and smaller headings below 18pt, or below 14pt when bold. Large text means 18pt and above, or 14pt and above when bold." })
15701
+ ] })
15702
+ }
15703
+ ),
15704
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
15705
+ /* @__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: [
15706
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Contrast ratio" }),
15707
+ /* @__PURE__ */ jsxs("p", { className: "mt-1 text-2xl font-semibold", children: [
15708
+ pair.contrastRatio.toFixed(2),
15709
+ ":1"
15710
+ ] })
15711
+ ] }),
15712
+ /* @__PURE__ */ jsx(
15713
+ ComplianceRow,
15714
+ {
15715
+ label: "AAA normal text",
15716
+ passes: pair.passes.aaaText,
15717
+ threshold: AAA_NORMAL_TEXT_THRESHOLD
15718
+ }
15719
+ ),
15720
+ /* @__PURE__ */ jsx(
15721
+ ComplianceRow,
15722
+ {
15723
+ label: "AAA large text",
15724
+ passes: pair.passes.aaaLarge,
15725
+ threshold: AAA_LARGE_TEXT_THRESHOLD
15726
+ }
15727
+ )
15728
+ ] })
15729
+ ] })
15730
+ ] });
15731
+ }
15732
+ function ColorFamilySelector({
15733
+ families,
15734
+ label,
15735
+ selectedKey,
15736
+ selectionRole,
15737
+ themeCategory,
15738
+ onSelect
15739
+ }) {
15740
+ const swatchTone = selectionRole === "primary colour" ? 800 : 600;
15741
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
15742
+ /* @__PURE__ */ jsx("h3", { className: "font-medium", children: label }),
15743
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 lg:grid-cols-4 xl:grid-cols-5", children: families.map((family) => {
15744
+ const isSelected = family.key === selectedKey;
15745
+ const familySelectorLabel = getFamilySelectorLabel(family, themeCategory, selectionRole);
15746
+ return /* @__PURE__ */ jsxs(
15747
+ "button",
15748
+ {
15749
+ type: "button",
15750
+ "aria-label": `Select ${familySelectorLabel} as ${selectionRole}`,
15751
+ "aria-pressed": isSelected,
15752
+ onClick: () => onSelect(family.key),
15753
+ className: cn(
15754
+ "group relative flex w-full items-center gap-3 rounded-sm border px-3 py-2 text-left transition-colors",
15755
+ "border-grey-200 bg-background hover:bg-primary-800/10 hover:text-foreground dark:hover:bg-white/10",
15756
+ isSelected && "border-grey-800 dark:border-grey-400"
15757
+ ),
15758
+ children: [
15759
+ /* @__PURE__ */ jsx(
15760
+ "span",
15761
+ {
15762
+ className: "size-4 shrink-0 rounded-full",
15763
+ style: { backgroundColor: getFamilySwatchColor(family, swatchTone) }
15764
+ }
15765
+ ),
15766
+ /* @__PURE__ */ jsx("span", { className: "truncate font-medium", children: familySelectorLabel })
15767
+ ]
15768
+ },
15769
+ family.key
15770
+ );
15771
+ }) })
15772
+ ] });
15773
+ }
15421
15774
  function ColorPairingToolContent() {
15422
15775
  const searchParams = useSearchParams();
15423
15776
  const {
15424
- familyKey: initialFamilyKey,
15777
+ accentKey: initialAccentKey,
15778
+ primaryKey: initialPrimaryKey,
15779
+ selectedBackgroundToken: initialSelectedBackgroundToken,
15425
15780
  selectedPairId: initialSelectedPairId,
15426
15781
  themeCategory: initialThemeCategory
15427
15782
  } = getInitialPairingState(searchParams);
15428
15783
  const [themeCategory, setThemeCategory] = useState(initialThemeCategory);
15429
15784
  const [format, setFormat] = useState("hex");
15430
- const [activeFamilyKey, setActiveFamilyKey] = useState(initialFamilyKey);
15785
+ const [primaryFamilyKey, setPrimaryFamilyKey] = useState(initialPrimaryKey);
15786
+ const [accentFamilyKey, setAccentFamilyKey] = useState(initialAccentKey);
15787
+ const [selectedBackgroundToken, setSelectedBackgroundToken] = useState(
15788
+ initialSelectedBackgroundToken
15789
+ );
15431
15790
  const [selectedPairId, setSelectedPairId] = useState(initialSelectedPairId);
15432
- const families = recommendedAaaPairingCollections[themeCategory];
15433
- const resolvedActiveFamilyKey = families.some((family) => family.key === activeFamilyKey) ? activeFamilyKey : getPreferredFamilyKey(families);
15434
- 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) => {
15791
+ const themeFamilies = getPairingFamilies(themeCategory);
15792
+ const context = getPairingContext(themeCategory, primaryFamilyKey, accentFamilyKey);
15793
+ const selectableFamilies = themeFamilies.filter((family) => family.key !== context.grey.key);
15794
+ const selectedBackground = context.backgrounds.find((background) => background.token === selectedBackgroundToken) ?? context.backgrounds[0] ?? null;
15795
+ const selectedBackgroundPairs = selectedBackground ? context.pairsByBackground[selectedBackground.token] ?? [] : [];
15796
+ const selectedPair = getPreferredPairForBackground(selectedBackgroundPairs, selectedPairId);
15797
+ const whiteForegroundExample = selectedBackground && supportsWhiteForegroundPreview(selectedBackground) ? getWhiteForegroundPair(selectedBackground) : null;
15798
+ const previewPair = selectedPair ?? whiteForegroundExample ?? null;
15799
+ const showWhiteForegroundExample = Boolean(whiteForegroundExample) && (!selectedPair || selectedPair.foreground.token !== "white");
15800
+ const detailForeground = selectedPair?.foreground ?? whiteForegroundExample?.foreground ?? null;
15801
+ const familySummary = [context.primary.label, context.accent.label, context.grey.label].join(
15802
+ " + "
15803
+ );
15804
+ const updateUrlParams = (nextThemeCategory, nextPrimaryKey, nextAccentKey, nextSelectedBackgroundToken, nextSelectedPairId) => {
15437
15805
  const params = new URLSearchParams(window.location.search);
15438
15806
  params.set("palette", nextThemeCategory);
15439
- params.set("family", nextFamilyKey);
15807
+ params.set("primary", nextPrimaryKey);
15808
+ params.set("accent", nextAccentKey);
15809
+ params.set("background", nextSelectedBackgroundToken);
15440
15810
  if (nextSelectedPairId) {
15441
15811
  params.set("pair", nextSelectedPairId);
15442
15812
  } else {
@@ -15448,31 +15818,90 @@ function ColorPairingToolContent() {
15448
15818
  `${window.location.pathname}?${params.toString()}${window.location.hash}`
15449
15819
  );
15450
15820
  };
15451
- const handleThemeCategoryChange = (nextThemeCategory) => {
15452
- const nextFamilies = recommendedAaaPairingCollections[nextThemeCategory];
15453
- const nextFamilyKey = nextFamilies.some((family) => family.key === activeFamilyKey) ? activeFamilyKey : getPreferredFamilyKey(nextFamilies);
15454
- const nextActiveFamily = nextFamilies.find((family) => family.key === nextFamilyKey) ?? nextFamilies[0];
15455
- const nextSelectedPair = nextActiveFamily?.recommendedPairs.find((pair) => pair.id === selectedPairId) ?? getDefaultPair(nextActiveFamily);
15821
+ const syncSelection = (nextThemeCategory, nextPrimaryKey, nextAccentKey, preferredBackgroundToken, preferredPairId) => {
15822
+ const nextContext = getPairingContext(nextThemeCategory, nextPrimaryKey, nextAccentKey);
15823
+ const nextSelectedBackgroundToken = resolveBackgroundToken(
15824
+ nextContext,
15825
+ preferredBackgroundToken,
15826
+ getToneFromToken(preferredBackgroundToken)
15827
+ );
15828
+ const nextSelectedPairId = getPreferredPairForBackground(
15829
+ nextContext.pairsByBackground[nextSelectedBackgroundToken] ?? [],
15830
+ preferredPairId
15831
+ )?.id ?? "";
15456
15832
  setThemeCategory(nextThemeCategory);
15457
- setActiveFamilyKey(nextFamilyKey);
15458
- setSelectedPairId(nextSelectedPair?.id ?? "");
15459
- updateUrlParams(nextThemeCategory, nextFamilyKey, nextSelectedPair?.id ?? "");
15833
+ setPrimaryFamilyKey(nextContext.primary.key);
15834
+ setAccentFamilyKey(nextContext.accent.key);
15835
+ setSelectedBackgroundToken(nextSelectedBackgroundToken);
15836
+ setSelectedPairId(nextSelectedPairId);
15837
+ updateUrlParams(
15838
+ nextThemeCategory,
15839
+ nextContext.primary.key,
15840
+ nextContext.accent.key,
15841
+ nextSelectedBackgroundToken,
15842
+ nextSelectedPairId
15843
+ );
15460
15844
  };
15461
- const handleFamilyChange = (nextFamilyKey) => {
15462
- const nextActiveFamily = families.find((family) => family.key === nextFamilyKey);
15463
- const nextSelectedPair = nextActiveFamily?.recommendedPairs.find((pair) => pair.id === selectedPairId) ?? getDefaultPair(nextActiveFamily);
15464
- setActiveFamilyKey(nextFamilyKey);
15465
- setSelectedPairId(nextSelectedPair?.id ?? "");
15466
- updateUrlParams(themeCategory, nextFamilyKey, nextSelectedPair?.id ?? "");
15845
+ const handleThemeCategoryChange = (nextThemeCategory) => {
15846
+ syncSelection(
15847
+ nextThemeCategory,
15848
+ primaryFamilyKey,
15849
+ accentFamilyKey,
15850
+ selectedBackgroundToken,
15851
+ selectedPairId
15852
+ );
15853
+ };
15854
+ const handlePrimaryColorChange = (nextPrimaryKey) => {
15855
+ const nextAccentKey = nextPrimaryKey === accentFamilyKey ? getDefaultAccentFamilyKey(themeCategory, nextPrimaryKey) : accentFamilyKey;
15856
+ syncSelection(
15857
+ themeCategory,
15858
+ nextPrimaryKey,
15859
+ nextAccentKey,
15860
+ selectedBackgroundToken,
15861
+ selectedPairId
15862
+ );
15863
+ };
15864
+ const handleAccentColorChange = (nextAccentKey) => {
15865
+ if (nextAccentKey === primaryFamilyKey) return;
15866
+ syncSelection(
15867
+ themeCategory,
15868
+ primaryFamilyKey,
15869
+ nextAccentKey,
15870
+ selectedBackgroundToken,
15871
+ selectedPairId
15872
+ );
15873
+ };
15874
+ const handleBackgroundChange = (nextSelectedBackgroundToken) => {
15875
+ const nextSelectedPairId = getPreferredPairForBackground(
15876
+ context.pairsByBackground[nextSelectedBackgroundToken] ?? [],
15877
+ selectedPairId
15878
+ )?.id ?? "";
15879
+ setSelectedBackgroundToken(nextSelectedBackgroundToken);
15880
+ setSelectedPairId(nextSelectedPairId);
15881
+ updateUrlParams(
15882
+ themeCategory,
15883
+ context.primary.key,
15884
+ context.accent.key,
15885
+ nextSelectedBackgroundToken,
15886
+ nextSelectedPairId
15887
+ );
15467
15888
  };
15468
15889
  const handlePairChange = (nextSelectedPairId) => {
15890
+ const nextSelectedPair = selectedBackgroundPairs.find((pair) => pair.id === nextSelectedPairId);
15891
+ if (!nextSelectedPair || !selectedBackground) return;
15469
15892
  setSelectedPairId(nextSelectedPairId);
15470
- updateUrlParams(themeCategory, resolvedActiveFamilyKey, nextSelectedPairId);
15893
+ updateUrlParams(
15894
+ themeCategory,
15895
+ context.primary.key,
15896
+ context.accent.key,
15897
+ selectedBackground.token,
15898
+ nextSelectedPairId
15899
+ );
15471
15900
  };
15472
- if (!activeFamily || !selectedPair) {
15901
+ if (!selectedBackground) {
15473
15902
  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." })
15903
+ /* @__PURE__ */ jsx(CardTitle, { children: "No approved background tones available" }),
15904
+ /* @__PURE__ */ jsx(CardDescription, { children: "No approved tones are available for the current palette." })
15476
15905
  ] }) });
15477
15906
  }
15478
15907
  return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
@@ -15493,154 +15922,207 @@ function ColorPairingToolContent() {
15493
15922
  ] }),
15494
15923
  /* @__PURE__ */ jsx(FormatToggle, { format, setFormat })
15495
15924
  ] }),
15496
- /* @__PURE__ */ jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 lg:grid-cols-4 xl:grid-cols-5", children: families.map((family) => {
15497
- const isActive = family.key === resolvedActiveFamilyKey;
15498
- return /* @__PURE__ */ jsxs(
15499
- "button",
15925
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-6", children: [
15926
+ /* @__PURE__ */ jsx(
15927
+ ColorFamilySelector,
15928
+ {
15929
+ label: "Primary colour",
15930
+ families: selectableFamilies,
15931
+ selectedKey: context.primary.key,
15932
+ selectionRole: "primary colour",
15933
+ themeCategory,
15934
+ onSelect: handlePrimaryColorChange
15935
+ }
15936
+ ),
15937
+ /* @__PURE__ */ jsx(
15938
+ ColorFamilySelector,
15939
+ {
15940
+ label: "Accent colour",
15941
+ families: selectableFamilies.filter((family) => family.key !== context.primary.key),
15942
+ selectedKey: context.accent.key,
15943
+ selectionRole: "accent colour",
15944
+ themeCategory,
15945
+ onSelect: handleAccentColorChange
15946
+ }
15947
+ )
15948
+ ] }),
15949
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [
15950
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: "Included families:" }),
15951
+ context.allFamilies.map((family) => /* @__PURE__ */ jsxs(
15952
+ "span",
15500
15953
  {
15501
- type: "button",
15502
- onClick: () => handleFamilyChange(family.key),
15503
- className: cn(
15504
- "group relative flex w-full items-center gap-3 rounded-sm border px-3 py-2 text-left transition-colors",
15505
- "border-grey-200 bg-background hover:bg-primary-800/10 hover:text-foreground dark:hover:bg-white/10",
15506
- isActive && "border-grey-800 dark:border-grey-400"
15507
- ),
15954
+ className: "inline-flex items-center gap-2 rounded-full border border-grey-200 px-3 py-1 text-muted-foreground dark:border-grey-700",
15508
15955
  children: [
15509
15956
  /* @__PURE__ */ jsx(
15510
15957
  "span",
15511
15958
  {
15512
- className: "size-4 shrink-0 rounded-full",
15959
+ className: "size-2.5 rounded-full",
15513
15960
  style: { backgroundColor: getFamilySwatchColor(family) }
15514
15961
  }
15515
15962
  ),
15516
- /* @__PURE__ */ jsx("span", { className: "truncate font-medium", children: family.label })
15963
+ family.label
15517
15964
  ]
15518
15965
  },
15519
15966
  family.key
15520
- );
15521
- }) }) }),
15522
- /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
15523
- /* @__PURE__ */ jsxs("div", { className: "grid items-start gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(17rem,0.68fr)]", children: [
15524
- /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
15525
- /* @__PURE__ */ jsx(PairPreview, { family: activeFamily, pair: selectedPair }),
15526
- /* @__PURE__ */ jsxs(Card, { children: [
15527
- /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 border-b", children: [
15528
- /* @__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." })
15530
- ] }),
15531
- /* @__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;
15537
- return /* @__PURE__ */ jsxs(
15967
+ ))
15968
+ ] }),
15969
+ /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs("div", { className: "grid items-start gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(18rem,0.72fr)]", children: [
15970
+ /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
15971
+ previewPair ? /* @__PURE__ */ jsx(
15972
+ PairPreview,
15973
+ {
15974
+ familySummary,
15975
+ isRecommended: Boolean(selectedPair),
15976
+ pair: previewPair
15977
+ }
15978
+ ) : /* @__PURE__ */ jsx(
15979
+ PreviewFallbackCard,
15980
+ {
15981
+ familySummary,
15982
+ selectedBackground
15983
+ }
15984
+ ),
15985
+ /* @__PURE__ */ jsxs(Card, { children: [
15986
+ /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 border-b", children: [
15987
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: "Approved backgrounds" }),
15988
+ /* @__PURE__ */ jsx(CardDescription, { children: "Choose from your selected primary, accent, and grey background tones. Filled chips have at least one recommended AAA foreground. Foregrounds are limited to white and tones 50, 200, 400, 600, and 800." })
15989
+ ] }),
15990
+ /* @__PURE__ */ jsxs(CardContent, { className: "space-y-5", children: [
15991
+ context.backgroundGroups.map((group) => /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
15992
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [
15993
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: group.label }),
15994
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: group.family.label })
15995
+ ] }),
15996
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-2 sm:grid-cols-6", children: group.backgrounds.map((background) => {
15997
+ const pairs = context.pairsByBackground[background.token] ?? [];
15998
+ const preferredPair = selectedBackground.token === background.token ? selectedPair ?? getPreferredPairForBackground(pairs) : getPreferredPairForBackground(pairs);
15999
+ const hasWhiteExample = supportsWhiteForegroundPreview(background);
16000
+ const isSelected = selectedBackground.token === background.token;
16001
+ const ariaLabel = pairs.length > 0 ? `Select ${background.token} background, recommended with ${preferredPair?.foreground.token ?? "an AAA foreground"}` : hasWhiteExample ? `Select ${background.token} background, white text example available` : `Select ${background.token} background, no recommended foreground in this tool`;
16002
+ return /* @__PURE__ */ jsx(
15538
16003
  "button",
15539
16004
  {
15540
16005
  type: "button",
15541
- disabled: !pair,
15542
- onClick: () => pair && handlePairChange(pair.id),
16006
+ "aria-label": ariaLabel,
16007
+ "aria-pressed": isSelected,
16008
+ onClick: () => handleBackgroundChange(background.token),
15543
16009
  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",
16010
+ "group relative h-12 rounded-sm border border-grey-200 transition-transform hover:scale-[1.03] dark:border-grey-700",
15546
16011
  isSelected && "ring-2 ring-primary-500 ring-offset-2 ring-offset-background"
15547
16012
  ),
15548
- style: { backgroundColor: color2.hex },
15549
- children: [
15550
- pair && /* @__PURE__ */ jsx(
15551
- "span",
15552
- {
15553
- 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
- style: { backgroundColor: pair.foreground.hex }
15555
- }
15556
- ),
15557
- /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
15558
- color2.token,
15559
- pair ? ` paired with ${pair.foreground.token}` : " has no recommended pair in this tool"
15560
- ] })
15561
- ]
16013
+ style: { backgroundColor: background.hex },
16014
+ children: preferredPair ? /* @__PURE__ */ jsx(
16015
+ "span",
16016
+ {
16017
+ 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",
16018
+ style: { backgroundColor: preferredPair.foreground.hex }
16019
+ }
16020
+ ) : null
15562
16021
  },
15563
- color2.token
16022
+ background.token
15564
16023
  );
15565
- }) }),
15566
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-4 text-sm text-muted-foreground", children: [
15567
- /* @__PURE__ */ jsxs("span", { children: [
15568
- "Selected background:",
15569
- " ",
15570
- /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: selectedPair.background.token })
15571
- ] }),
15572
- /* @__PURE__ */ jsxs("span", { children: [
15573
- "Recommended foreground:",
15574
- " ",
15575
- /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: selectedPair.foreground.token })
15576
- ] })
16024
+ }) })
16025
+ ] }, group.key)),
16026
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-4 text-sm text-muted-foreground", children: [
16027
+ /* @__PURE__ */ jsxs("span", { children: [
16028
+ "Selected background:",
16029
+ " ",
16030
+ /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: selectedBackground.token })
16031
+ ] }),
16032
+ /* @__PURE__ */ jsxs("span", { children: [
16033
+ selectedPair ? "Selected foreground:" : "White text example:",
16034
+ " ",
16035
+ /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: selectedPair?.foreground.token ?? whiteForegroundExample?.foreground.token ?? "None" })
15577
16036
  ] })
15578
16037
  ] })
15579
- ] }),
15580
- /* @__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" })
15583
16038
  ] })
15584
16039
  ] }),
15585
- /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs(Card, { className: "h-fit", children: [
15586
- /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 border-b", children: [
15587
- /* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: "Recommended pairs" }),
15588
- /* @__PURE__ */ jsx(CardDescription, { children: "Recommended same-family combinations that meet AAA normal-text contrast." })
15589
- ] }),
15590
- /* @__PURE__ */ jsx(CardContent, { className: "grid gap-3", children: activeFamily.recommendedPairs.map((pair) => {
15591
- const isActive = selectedPair.id === pair.id;
15592
- return /* @__PURE__ */ jsxs(
15593
- "button",
15594
- {
15595
- type: "button",
15596
- onClick: () => handlePairChange(pair.id),
15597
- className: cn(
15598
- "rounded-2xl border p-4 text-left transition-colors",
15599
- 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
- ),
15601
- children: [
15602
- /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
15603
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
15604
- /* @__PURE__ */ jsx(
15605
- "div",
15606
- {
15607
- className: "size-11 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15608
- style: { backgroundColor: pair.background.hex }
15609
- }
15610
- ),
15611
- /* @__PURE__ */ jsx(
15612
- "div",
15613
- {
15614
- className: "size-11 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15615
- style: { backgroundColor: pair.foreground.hex }
15616
- }
15617
- )
15618
- ] }),
15619
- /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 rounded-full border border-grey-200 px-2.5 py-1 text-xs font-semibold text-muted-foreground dark:border-grey-700", children: [
15620
- /* @__PURE__ */ jsx(Icons.contrast, { "data-slot": "icon", className: "size-4" }),
15621
- pair.rating
15622
- ] })
16040
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
16041
+ /* @__PURE__ */ jsx(PairDetailCard, { color: selectedBackground, format, role: "Background" }),
16042
+ detailForeground ? /* @__PURE__ */ jsx(PairDetailCard, { color: detailForeground, format, role: "Foreground" }) : /* @__PURE__ */ jsxs(Card, { className: "gap-4", children: [
16043
+ /* @__PURE__ */ jsx(CardHeader, { className: "gap-3 border-b", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
16044
+ /* @__PURE__ */ jsx(CardTitle, { children: "Foreground" }),
16045
+ /* @__PURE__ */ jsx(CardDescription, { children: "No recommended foreground available" })
16046
+ ] }) }),
16047
+ /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Select another approved tone or review the recommended foregrounds for the same background." }) })
16048
+ ] })
16049
+ ] }),
16050
+ selectedPair ? /* @__PURE__ */ jsx(PairComplianceCard, { pair: selectedPair }) : null,
16051
+ showWhiteForegroundExample && whiteForegroundExample ? /* @__PURE__ */ jsx(WhiteTextExampleCard, { pair: whiteForegroundExample }) : null
16052
+ ] }),
16053
+ /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs(Card, { className: "h-fit", children: [
16054
+ /* @__PURE__ */ jsxs(CardHeader, { className: "gap-2 border-b", children: [
16055
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-base", children: "Recommended foregrounds" }),
16056
+ /* @__PURE__ */ jsxs(CardDescription, { children: [
16057
+ "AAA combinations for ",
16058
+ selectedBackground.token,
16059
+ ", drawn from",
16060
+ " ",
16061
+ context.primary.label,
16062
+ ", ",
16063
+ context.accent.label,
16064
+ ", Grey, and white using only foreground tones 50, 200, 400, 600, and 800."
16065
+ ] })
16066
+ ] }),
16067
+ /* @__PURE__ */ jsx(CardContent, { className: "grid gap-3", children: selectedBackgroundPairs.length > 0 ? selectedBackgroundPairs.map((pair) => {
16068
+ const isActive = selectedPair?.id === pair.id;
16069
+ return /* @__PURE__ */ jsxs(
16070
+ "button",
16071
+ {
16072
+ type: "button",
16073
+ "aria-label": `Use ${pair.foreground.token} on ${pair.background.token}`,
16074
+ "aria-pressed": isActive,
16075
+ onClick: () => handlePairChange(pair.id),
16076
+ className: cn(
16077
+ "rounded-sm border p-4 text-left transition-colors",
16078
+ 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"
16079
+ ),
16080
+ children: [
16081
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
16082
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
16083
+ /* @__PURE__ */ jsx(
16084
+ "div",
16085
+ {
16086
+ className: "size-11 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
16087
+ style: { backgroundColor: pair.background.hex }
16088
+ }
16089
+ ),
16090
+ /* @__PURE__ */ jsx(
16091
+ "div",
16092
+ {
16093
+ className: "size-11 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
16094
+ style: { backgroundColor: pair.foreground.hex }
16095
+ }
16096
+ )
15623
16097
  ] }),
15624
- /* @__PURE__ */ jsxs("div", { className: "mt-4 space-y-1", children: [
15625
- /* @__PURE__ */ jsxs("p", { className: "font-medium text-foreground", children: [
15626
- pair.background.token,
15627
- " / ",
15628
- pair.foreground.token
15629
- ] }),
15630
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
15631
- pair.contrastRatio.toFixed(2),
15632
- ":1 contrast ratio"
15633
- ] })
16098
+ /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 rounded-full border border-grey-200 px-2.5 py-1 text-xs font-semibold text-muted-foreground dark:border-grey-700", children: [
16099
+ /* @__PURE__ */ jsx(Icons.contrast, { "data-slot": "icon", className: "size-4" }),
16100
+ pair.rating
15634
16101
  ] })
15635
- ]
15636
- },
15637
- pair.id
15638
- );
15639
- }) })
15640
- ] }) })
15641
- ] }),
15642
- /* @__PURE__ */ jsx(PairComplianceCard, { pair: selectedPair })
15643
- ] })
16102
+ ] }),
16103
+ /* @__PURE__ */ jsxs("div", { className: "mt-4 space-y-1", children: [
16104
+ /* @__PURE__ */ jsxs("p", { className: "font-medium text-foreground", children: [
16105
+ pair.background.token,
16106
+ " / ",
16107
+ pair.foreground.token
16108
+ ] }),
16109
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
16110
+ pair.foreground.familyLabel,
16111
+ " on ",
16112
+ pair.background.familyLabel
16113
+ ] }),
16114
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
16115
+ pair.contrastRatio.toFixed(2),
16116
+ ":1 contrast ratio"
16117
+ ] })
16118
+ ] })
16119
+ ]
16120
+ },
16121
+ pair.id
16122
+ );
16123
+ }) : /* @__PURE__ */ jsx("div", { className: "rounded-sm border border-grey-200 p-4 text-sm text-muted-foreground dark:border-grey-700", children: "No recommended AAA foregrounds are available for this background." }) })
16124
+ ] }) })
16125
+ ] }) })
15644
16126
  ] });
15645
16127
  }
15646
16128
  function ColorPairingTool() {
@@ -16007,7 +16489,7 @@ var ChartTooltip4 = ({
16007
16489
  {
16008
16490
  className: cn(
16009
16491
  // base
16010
- "rounded-md border text-sm shadow-md",
16492
+ "rounded-sm border text-sm shadow-md",
16011
16493
  // border color
16012
16494
  "border-gray-200 dark:border-gray-800",
16013
16495
  // background color
@@ -16599,7 +17081,7 @@ function DialogContent({
16599
17081
  {
16600
17082
  "data-slot": "dialog-content",
16601
17083
  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",
17084
+ "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
17085
  className
16604
17086
  ),
16605
17087
  ...props,
@@ -16829,7 +17311,7 @@ function ContextMenuSubContent({
16829
17311
  {
16830
17312
  "data-slot": "context-menu-sub-content",
16831
17313
  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",
17314
+ "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
17315
  className
16834
17316
  ),
16835
17317
  ...props
@@ -16845,7 +17327,7 @@ function ContextMenuContent({
16845
17327
  {
16846
17328
  "data-slot": "context-menu-content",
16847
17329
  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",
17330
+ "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
17331
  className
16850
17332
  ),
16851
17333
  ...props
@@ -17352,7 +17834,7 @@ function DataTable({
17352
17834
  });
17353
17835
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4 p-1", children: [
17354
17836
  /* @__PURE__ */ jsx(DataTableToolbar, { table, search, toolbar }),
17355
- /* @__PURE__ */ jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs(Table, { children: [
17837
+ /* @__PURE__ */ jsx("div", { className: "rounded-sm border", children: /* @__PURE__ */ jsxs(Table, { children: [
17356
17838
  /* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header) => {
17357
17839
  return /* @__PURE__ */ jsx(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
17358
17840
  }) }, headerGroup.id)) }),
@@ -17470,7 +17952,7 @@ var ChartTooltip5 = ({ active, payload, valueFormatter }) => {
17470
17952
  {
17471
17953
  className: cn(
17472
17954
  // base
17473
- "rounded-md border text-sm shadow-md",
17955
+ "rounded-sm border text-sm shadow-md",
17474
17956
  // border color
17475
17957
  "border-gray-200 dark:border-gray-800",
17476
17958
  // background color
@@ -17708,8 +18190,8 @@ function DrawerContent({
17708
18190
  "data-slot": "drawer-content",
17709
18191
  className: cn(
17710
18192
  "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",
18193
+ "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",
18194
+ "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
18195
  "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
18196
  "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
18197
  className
@@ -18128,7 +18610,7 @@ function FormMessage({ className, ...props }) {
18128
18610
 
18129
18611
  // package.json
18130
18612
  var package_default = {
18131
- version: "1.97.13"};
18613
+ version: "1.99.0"};
18132
18614
  var SluggerContext = React5__default.createContext(null);
18133
18615
  function flattenText(nodes) {
18134
18616
  if (nodes == null || typeof nodes === "boolean") return "";
@@ -18279,7 +18761,7 @@ function SiteSearch({ navigation }) {
18279
18761
  children: [
18280
18762
  /* @__PURE__ */ jsx("span", { className: "hidden text-grey-600 lg:inline-flex dark:text-grey-200", children: "Search site..." }),
18281
18763
  /* @__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: [
18764
+ /* @__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
18765
  /* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2318" }),
18284
18766
  "K"
18285
18767
  ] })
@@ -18494,7 +18976,7 @@ function HoverCardContent({
18494
18976
  align,
18495
18977
  sideOffset,
18496
18978
  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",
18979
+ "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
18980
  className
18499
18981
  ),
18500
18982
  ...props
@@ -18532,7 +19014,7 @@ function InputOTPSlot({
18532
19014
  "data-slot": "input-otp-slot",
18533
19015
  "data-active": isActive,
18534
19016
  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",
19017
+ "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
19018
  className
18537
19019
  ),
18538
19020
  ...props,
@@ -18817,7 +19299,7 @@ var ChartTooltip6 = ({ active, payload, label, valueFormatter }) => {
18817
19299
  {
18818
19300
  className: cn(
18819
19301
  // base
18820
- "rounded-md border text-sm shadow-md",
19302
+ "rounded-sm border text-sm shadow-md",
18821
19303
  // border color
18822
19304
  "border-gray-200 dark:border-gray-800",
18823
19305
  // background color
@@ -19712,7 +20194,7 @@ function Menubar({ className, ...props }) {
19712
20194
  {
19713
20195
  "data-slot": "menubar",
19714
20196
  className: cn(
19715
- "flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs",
20197
+ "flex h-9 items-center gap-1 rounded-sm border bg-background p-1 shadow-xs",
19716
20198
  className
19717
20199
  ),
19718
20200
  ...props
@@ -19762,7 +20244,7 @@ function MenubarContent({
19762
20244
  alignOffset,
19763
20245
  sideOffset,
19764
20246
  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",
20247
+ "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
20248
  className
19767
20249
  ),
19768
20250
  ...props
@@ -19906,7 +20388,7 @@ function MenubarSubContent({
19906
20388
  {
19907
20389
  "data-slot": "menubar-sub-content",
19908
20390
  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",
20391
+ "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
20392
  className
19911
20393
  ),
19912
20394
  ...props
@@ -28325,7 +28807,7 @@ function NavigationLink({
28325
28807
  href,
28326
28808
  onClick,
28327
28809
  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",
28810
+ "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
28811
  "hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
28330
28812
  "dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
28331
28813
  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 +28909,7 @@ function NavigationMenuContent({
28427
28909
  "data-slot": "navigation-menu-content",
28428
28910
  className: cn(
28429
28911
  "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",
28912
+ "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
28913
  className
28432
28914
  ),
28433
28915
  ...props
@@ -28443,7 +28925,7 @@ function NavigationMenuViewport({
28443
28925
  {
28444
28926
  "data-slot": "navigation-menu-viewport",
28445
28927
  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)]",
28928
+ "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
28929
  className
28448
28930
  ),
28449
28931
  ...props
@@ -28766,7 +29248,7 @@ function NSWCard({
28766
29248
  "div",
28767
29249
  {
28768
29250
  className: cn(
28769
- "h-full rounded-md border border-(--nsw-card-border)",
29251
+ "h-full rounded-sm border border-(--nsw-card-border)",
28770
29252
  hasImage && "border-t-none rounded-t-none"
28771
29253
  ),
28772
29254
  children: /* @__PURE__ */ jsx("div", { className: "flex h-full flex-col p-8", children: bodyChildren })
@@ -28778,7 +29260,7 @@ function NSWCard({
28778
29260
  "div",
28779
29261
  {
28780
29262
  className: cn(
28781
- "flex h-full flex-col rounded-md border border-(--nsw-card-border) p-8",
29263
+ "flex h-full flex-col rounded-sm border border-(--nsw-card-border) p-8",
28782
29264
  hasImage && "border-t-none rounded-t-none"
28783
29265
  ),
28784
29266
  children: bodyChildren
@@ -29333,7 +29815,7 @@ function ResizableHandle({
29333
29815
  className
29334
29816
  ),
29335
29817
  ...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" }) })
29818
+ 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
29819
  }
29338
29820
  );
29339
29821
  }
@@ -29632,7 +30114,7 @@ function Sidebar({
29632
30114
  {
29633
30115
  "data-sidebar": "sidebar",
29634
30116
  "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",
30117
+ 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
30118
  children
29637
30119
  }
29638
30120
  )
@@ -30091,7 +30573,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
30091
30573
  const isActive = pathname === link.href;
30092
30574
  const isActiveOrHasActiveDescendant = isLinkOrDescendantActive(link, pathname);
30093
30575
  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",
30576
+ "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
30577
  "hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
30096
30578
  "dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
30097
30579
  isActive && "border-l border-primary-800 bg-primary-800/10 font-bold text-primary-800 dark:border-white dark:bg-white/20"
@@ -31027,7 +31509,7 @@ var TabNavigation = React5__default.forwardRef(({ className, children, ...props
31027
31509
  motion.div,
31028
31510
  {
31029
31511
  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",
31512
+ 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
31513
  transition: {
31032
31514
  type: "spring",
31033
31515
  stiffness: 500,
@@ -31563,7 +32045,7 @@ var Tracker = React5__default.forwardRef(
31563
32045
  );
31564
32046
  Tracker.displayName = "Tracker";
31565
32047
  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",
32048
+ "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
32049
  {
31568
32050
  variants: {
31569
32051
  variant: {
@@ -31682,7 +32164,7 @@ var Artifact = ({ className, ...props }) => /* @__PURE__ */ jsx(
31682
32164
  "div",
31683
32165
  {
31684
32166
  className: cn(
31685
- "flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm",
32167
+ "flex flex-col overflow-hidden rounded-sm border bg-background shadow-sm",
31686
32168
  className
31687
32169
  ),
31688
32170
  ...props
@@ -31928,7 +32410,7 @@ function isFunction(value) {
31928
32410
  return typeof value === "function";
31929
32411
  }
31930
32412
  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",
32413
+ "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
32414
  {
31933
32415
  variants: {
31934
32416
  variant: {
@@ -32113,7 +32595,7 @@ var CodeBlock = ({
32113
32595
  "div",
32114
32596
  {
32115
32597
  className: cn(
32116
- "relative w-full overflow-hidden rounded-md border bg-background text-foreground",
32598
+ "relative w-full overflow-hidden rounded-sm border bg-background text-foreground",
32117
32599
  className
32118
32600
  ),
32119
32601
  ...props,
@@ -32228,7 +32710,7 @@ function HoverCardContent2({
32228
32710
  align,
32229
32711
  sideOffset,
32230
32712
  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",
32713
+ "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
32714
  className
32233
32715
  ),
32234
32716
  ...props
@@ -32932,7 +33414,7 @@ function DropdownMenuContent2({
32932
33414
  "data-slot": "dropdown-menu-content",
32933
33415
  sideOffset,
32934
33416
  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",
33417
+ "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
33418
  className
32937
33419
  ),
32938
33420
  ...props
@@ -33219,7 +33701,7 @@ function Textarea2({ className, ...props }) {
33219
33701
  {
33220
33702
  "data-slot": "textarea",
33221
33703
  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",
33704
+ "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
33705
  className
33224
33706
  ),
33225
33707
  ...props
@@ -33239,7 +33721,7 @@ function PromptInputAttachment({ data, className, ...props }) {
33239
33721
  return /* @__PURE__ */ jsxs(
33240
33722
  "div",
33241
33723
  {
33242
- className: cn("group relative h-14 w-14 rounded-md border", className),
33724
+ className: cn("group relative h-14 w-14 rounded-sm border", className),
33243
33725
  ...props,
33244
33726
  children: [
33245
33727
  data.mediaType?.startsWith("image/") && data.url ? /* @__PURE__ */ jsx(
@@ -33517,7 +33999,7 @@ var PromptInput = ({
33517
33999
  "form",
33518
34000
  {
33519
34001
  className: cn(
33520
- "w-full divide-y overflow-hidden rounded-xl border bg-background shadow-sm",
34002
+ "w-full divide-y overflow-hidden rounded-sm border bg-background shadow-sm",
33521
34003
  className
33522
34004
  ),
33523
34005
  onSubmit: handleSubmit,
@@ -33882,7 +34364,7 @@ var TaskItemFile = ({ children, className, ...props }) => /* @__PURE__ */ jsx(
33882
34364
  "div",
33883
34365
  {
33884
34366
  className: cn(
33885
- "inline-flex items-center gap-1 rounded-md border bg-secondary px-1.5 py-0.5 text-xs text-foreground",
34367
+ "inline-flex items-center gap-1 rounded-sm border bg-secondary px-1.5 py-0.5 text-xs text-foreground",
33886
34368
  className
33887
34369
  ),
33888
34370
  ...props,
@@ -33917,7 +34399,7 @@ var TaskContent = ({ children, className, ...props }) => /* @__PURE__ */ jsx(
33917
34399
  children: /* @__PURE__ */ jsx("div", { className: "mt-4 space-y-2 border-l-2 border-muted pl-4", children })
33918
34400
  }
33919
34401
  );
33920
- var Tool = ({ className, ...props }) => /* @__PURE__ */ jsx(Collapsible2, { className: cn("not-prose mb-4 w-full rounded-md border", className), ...props });
34402
+ var Tool = ({ className, ...props }) => /* @__PURE__ */ jsx(Collapsible2, { className: cn("not-prose mb-4 w-full rounded-sm border", className), ...props });
33921
34403
  var getStatusBadge = (status) => {
33922
34404
  const labels = {
33923
34405
  "input-streaming": "Pending",
@@ -33999,7 +34481,7 @@ function Input2({ className, type, ...props }) {
33999
34481
  type,
34000
34482
  "data-slot": "input",
34001
34483
  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",
34484
+ "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
34485
  "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
34004
34486
  "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
34005
34487
  className
@@ -34038,7 +34520,7 @@ var WebPreview = ({
34038
34520
  return /* @__PURE__ */ jsx(WebPreviewContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
34039
34521
  "div",
34040
34522
  {
34041
- className: cn("flex size-full flex-col rounded-lg border bg-card", className),
34523
+ className: cn("flex size-full flex-col rounded-sm border bg-card", className),
34042
34524
  ...props,
34043
34525
  children
34044
34526
  }