@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.cjs CHANGED
@@ -4159,7 +4159,7 @@ function AccordionContent({
4159
4159
  );
4160
4160
  }
4161
4161
  var alertVariants = classVarianceAuthority.cva(
4162
- "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",
4162
+ "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",
4163
4163
  {
4164
4164
  variants: {
4165
4165
  variant: {
@@ -4605,7 +4605,7 @@ var AlertDialogContent = React5__namespace.forwardRef(function AlertDialogConten
4605
4605
  ref,
4606
4606
  "data-slot": "alert-dialog-content",
4607
4607
  className: cn(
4608
- "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",
4608
+ "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",
4609
4609
  "data-[state=closed]:animate-out data-[state=open]:animate-in",
4610
4610
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
4611
4611
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
@@ -5071,7 +5071,7 @@ var ChartTooltip = ({ active, payload, label, valueFormatter }) => {
5071
5071
  {
5072
5072
  className: cn(
5073
5073
  // base
5074
- "rounded-md border text-sm shadow-md",
5074
+ "rounded-sm border text-sm shadow-md",
5075
5075
  // border color
5076
5076
  "border-gray-200 dark:border-gray-800",
5077
5077
  // background color
@@ -6346,7 +6346,7 @@ var ChartTooltip2 = ({ active, payload, label, valueFormatter }) => {
6346
6346
  {
6347
6347
  className: cn(
6348
6348
  // base
6349
- "rounded-md border text-sm shadow-md",
6349
+ "rounded-sm border text-sm shadow-md",
6350
6350
  // border color
6351
6351
  "border-gray-200 dark:border-gray-800",
6352
6352
  // background color
@@ -7440,7 +7440,7 @@ function DropdownMenuSubContent({
7440
7440
  // Base
7441
7441
  ""
7442
7442
  ],
7443
- "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",
7443
+ "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",
7444
7444
  className
7445
7445
  ),
7446
7446
  ...props
@@ -7532,7 +7532,7 @@ function Breadcrumbs({
7532
7532
  ] }) });
7533
7533
  }
7534
7534
  var buttonVariants2 = classVarianceAuthority.cva(
7535
- "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",
7535
+ "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",
7536
7536
  {
7537
7537
  variants: {
7538
7538
  variant: {
@@ -7626,7 +7626,7 @@ function Calendar({
7626
7626
  defaultClassNames.dropdowns
7627
7627
  ),
7628
7628
  dropdown_root: cn(
7629
- "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
7629
+ "relative rounded-sm border border-input shadow-xs has-focus:border-ring has-focus:ring-ring/50 has-focus:ring-[3px]",
7630
7630
  defaultClassNames.dropdown_root
7631
7631
  ),
7632
7632
  dropdown: cn("absolute inset-0 opacity-0", defaultClassNames.dropdown),
@@ -7712,7 +7712,7 @@ function CalendarDayButton({
7712
7712
  "data-range-end": modifiers.range_end,
7713
7713
  "data-range-middle": modifiers.range_middle,
7714
7714
  className: cn(
7715
- "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",
7715
+ "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",
7716
7716
  defaultClassNames.day,
7717
7717
  className
7718
7718
  ),
@@ -7726,7 +7726,7 @@ function Card({ className, ...props }) {
7726
7726
  {
7727
7727
  "data-slot": "card",
7728
7728
  className: cn(
7729
- "flex flex-col gap-6 rounded-md border border-grey-200 bg-card py-6 text-card-foreground dark:border-grey-700",
7729
+ "flex flex-col gap-6 rounded-sm border border-grey-200 bg-card py-6 text-card-foreground dark:border-grey-700",
7730
7730
  className
7731
7731
  ),
7732
7732
  ...props
@@ -8289,7 +8289,7 @@ function ChartTooltipContent({
8289
8289
  "div",
8290
8290
  {
8291
8291
  className: cn(
8292
- "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",
8292
+ "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",
8293
8293
  className
8294
8294
  ),
8295
8295
  children: [
@@ -8310,7 +8310,7 @@ function ChartTooltipContent({
8310
8310
  "div",
8311
8311
  {
8312
8312
  className: cn(
8313
- "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
8313
+ "shrink-0 rounded-sm border-(--color-border) bg-(--color-bg)",
8314
8314
  {
8315
8315
  "h-2.5 w-2.5": indicator === "dot",
8316
8316
  "w-1": indicator === "line",
@@ -8417,7 +8417,7 @@ function Checkbox({ className, ...props }) {
8417
8417
  "data-slot": "checkbox",
8418
8418
  className: cn(
8419
8419
  // Base styles
8420
- "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",
8420
+ "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",
8421
8421
  // Dark mode styles
8422
8422
  "dark:bg-input/30",
8423
8423
  // Checked styles
@@ -13579,7 +13579,7 @@ function PreWithCopy(props) {
13579
13579
  /* @__PURE__ */ jsxRuntime.jsxs(
13580
13580
  "button",
13581
13581
  {
13582
- 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",
13582
+ 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",
13583
13583
  "aria-label": "Copy code to clipboard",
13584
13584
  onClick: handleCopy,
13585
13585
  children: [
@@ -13645,7 +13645,7 @@ function PopoverContent({
13645
13645
  className: cn(
13646
13646
  [
13647
13647
  // Base
13648
- "z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-background p-4 text-foreground shadow-md outline-hidden",
13648
+ "z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-sm border bg-background p-4 text-foreground shadow-md outline-hidden",
13649
13649
  // Open
13650
13650
  "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
13651
13651
  // Closed
@@ -14022,7 +14022,7 @@ function SegmentedControlTrigger({
14022
14022
  {
14023
14023
  "data-slot": "segmented-control-trigger",
14024
14024
  className: cn(
14025
- "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",
14025
+ "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",
14026
14026
  className
14027
14027
  ),
14028
14028
  ...props
@@ -14048,7 +14048,7 @@ function ThemeSelectorLoading() {
14048
14048
  ] }),
14049
14049
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
14050
14050
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-5 w-20 rounded bg-grey-200" }),
14051
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "gap-3 rounded-md border border-muted bg-muted/30 p-3", children: [
14051
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "gap-3 rounded-sm border border-muted bg-muted/30 p-3", children: [
14052
14052
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex min-w-0 items-center justify-between", children: [
14053
14053
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-48 rounded bg-grey-200" }),
14054
14054
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 rounded bg-grey-200" })
@@ -14228,7 +14228,7 @@ function ThemeSelectorContent({
14228
14228
  ] }),
14229
14229
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
14230
14230
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-medium", children: "Share Theme" }),
14231
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "gap-3 rounded-md border border-muted bg-muted/30 p-3", children: [
14231
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "gap-3 rounded-sm border border-muted bg-muted/30 p-3", children: [
14232
14232
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex min-w-0 items-center justify-between", children: [
14233
14233
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Copy this URL to share your theme selection:" }),
14234
14234
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -14246,7 +14246,7 @@ function ThemeSelectorContent({
14246
14246
  }
14247
14247
  )
14248
14248
  ] }),
14249
- /* @__PURE__ */ jsxRuntime.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 })
14249
+ /* @__PURE__ */ jsxRuntime.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 })
14250
14250
  ] })
14251
14251
  ] })
14252
14252
  ] });
@@ -14298,7 +14298,7 @@ function TooltipContent({
14298
14298
  }
14299
14299
  function CodeDemoLoading() {
14300
14300
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 animate-pulse", children: [
14301
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full rounded-t-xl border border-grey-200 bg-grey-50 p-4 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3", children: [
14301
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3", children: [
14302
14302
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 w-32 rounded bg-grey-200 dark:bg-grey-600" }),
14303
14303
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 w-32 rounded bg-grey-200 dark:bg-grey-600" }),
14304
14304
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-3", children: [
@@ -14309,7 +14309,7 @@ function CodeDemoLoading() {
14309
14309
  ] }) }),
14310
14310
  /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "h-64 w-full rounded bg-grey-200 dark:bg-grey-600" }) }),
14311
14311
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border border-grey-200 dark:border-grey-600", children: [
14312
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "h-8 w-24 rounded bg-grey-200 dark:bg-grey-600" }) }),
14312
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "h-8 w-24 rounded bg-grey-200 dark:bg-grey-600" }) }),
14313
14313
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-48 bg-grey-100 dark:bg-grey-800" })
14314
14314
  ] })
14315
14315
  ] });
@@ -14493,7 +14493,7 @@ function CodeDemoContent({ data, showCode = true, controls = defaultControls })
14493
14493
  }
14494
14494
  }, [themeCategory, primaryColor, accentColor, greyColor, isThemeInitialized]);
14495
14495
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8", children: [
14496
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full rounded-t-xl border border-grey-200 bg-grey-50 p-4 dark:border-grey-600 dark:bg-grey-700", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex w-full items-center", children: [
14496
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "relative flex w-full items-center", children: [
14497
14497
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
14498
14498
  data.githubSlug && /* @__PURE__ */ jsxRuntime.jsx(EditOnGithubButton, { githubSlug: data.githubSlug }),
14499
14499
  data.figmaSlug && /* @__PURE__ */ jsxRuntime.jsx(OpenInFigmaButton, { figmaSlug: data.figmaSlug })
@@ -14552,7 +14552,7 @@ function CodeDemoContent({ data, showCode = true, controls = defaultControls })
14552
14552
  shouldExpand && "pb-[41px]"
14553
14553
  ),
14554
14554
  children: [
14555
- /* @__PURE__ */ jsxRuntime.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: [
14555
+ /* @__PURE__ */ jsxRuntime.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: [
14556
14556
  /* @__PURE__ */ jsxRuntime.jsx(Tabs, { tabIndex, items: codeItems, onSelect: setTabIndex }),
14557
14557
  variants.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Select, { onValueChange: (value) => handleSelectVariant(value), children: [
14558
14558
  /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select a variant" }) }),
@@ -14972,8 +14972,23 @@ function ColorCard({ name, token, hex: hex2, rgb: rgb2, hsl, oklch: oklch2, form
14972
14972
  ] })
14973
14973
  ] }) });
14974
14974
  }
14975
- var recommendedBackgroundTones = [100, 200, 400, 500, 600, 700, 800];
14975
+ var recommendedBackgroundTones = [50, 100, 200, 400, 600, 800];
14976
+ var recommendedForegroundTones = [50, 200, 400, 600, 800];
14976
14977
  var AAA_NORMAL_TEXT_RATIO = 7;
14978
+ var DEFAULT_PRIMARY_FAMILY_KEY = "blue";
14979
+ var DEFAULT_ACCENT_FAMILY_KEY = "red";
14980
+ var MIN_DARK_BACKGROUND_TONE_FOR_WHITE = 600;
14981
+ var WHITE_FOREGROUND = {
14982
+ token: "white",
14983
+ name: "White",
14984
+ hex: "#ffffff",
14985
+ rgb: "rgb(255, 255, 255)",
14986
+ hsl: "hsl(0, 0%, 100%)",
14987
+ oklch: "oklch(1 0 0)",
14988
+ familyKey: "white",
14989
+ familyLabel: "White",
14990
+ tone: 0
14991
+ };
14977
14992
  function extractTone(token) {
14978
14993
  const match = token.match(/-(\d+)$/);
14979
14994
  return match ? Number.parseInt(match[1], 10) : 0;
@@ -14982,23 +14997,48 @@ function formatFamilyLabel(name, key) {
14982
14997
  if (key === "grey") return "Grey";
14983
14998
  return name.replace(/^NSW Aboriginal\s+/i, "").replace(/^NSW\s+/i, "").trim();
14984
14999
  }
14985
- function toPairingColor(color2) {
15000
+ function toPairingColor(color2, familyKey, familyLabel) {
14986
15001
  return {
14987
15002
  ...color2,
15003
+ familyKey,
15004
+ familyLabel,
14988
15005
  tone: extractTone(color2.token)
14989
15006
  };
14990
15007
  }
14991
- function getPreferredForegroundTone(backgroundTone) {
14992
- if (backgroundTone <= 200) return 800;
14993
- if (backgroundTone <= 500) return 700;
14994
- if (backgroundTone <= 650) return 250;
14995
- return 200;
15008
+ function buildPairingCollections() {
15009
+ return {
15010
+ brand: Object.entries(colors.brand).map(([key, palette]) => {
15011
+ const familyLabel = formatFamilyLabel(palette.name, key);
15012
+ return {
15013
+ key,
15014
+ label: familyLabel,
15015
+ paletteName: palette.name,
15016
+ colors: palette.colors.map((color2) => toPairingColor(color2, key, familyLabel))
15017
+ };
15018
+ }),
15019
+ aboriginal: Object.entries(colors.aboriginal).map(([key, palette]) => {
15020
+ const familyLabel = formatFamilyLabel(palette.name, key);
15021
+ return {
15022
+ key,
15023
+ label: familyLabel,
15024
+ paletteName: palette.name,
15025
+ colors: palette.colors.map((color2) => toPairingColor(color2, key, familyLabel))
15026
+ };
15027
+ })
15028
+ };
14996
15029
  }
15030
+ var pairingFamilyCollections = buildPairingCollections();
14997
15031
  function getPairRating(contrastRatio) {
14998
15032
  if (contrastRatio >= 7) return "AAA";
14999
15033
  if (contrastRatio >= 4.5) return "AA";
15000
15034
  return "AA Large";
15001
15035
  }
15036
+ function getPreferredForegroundTone(backgroundTone) {
15037
+ if (backgroundTone <= 200) return 800;
15038
+ if (backgroundTone <= 500) return 700;
15039
+ if (backgroundTone <= 650) return 250;
15040
+ return 200;
15041
+ }
15002
15042
  function isPreferredDirection(backgroundTone, foregroundTone, preferredForegroundTone) {
15003
15043
  if (preferredForegroundTone < backgroundTone) {
15004
15044
  return foregroundTone < backgroundTone;
@@ -15021,15 +15061,27 @@ function buildPair(background, foreground) {
15021
15061
  rating: getPairRating(contrastRatio)
15022
15062
  };
15023
15063
  }
15024
- function pickForeground(colorsToPair, background, minimumRatio) {
15064
+ function sortRecommendedPairs(background, pairs) {
15025
15065
  const preferredForegroundTone = getPreferredForegroundTone(background.tone);
15026
- const passingCandidates = colorsToPair.filter((color2) => color2.token !== background.token).map((color2) => buildPair(background, color2)).filter((pair) => pair.contrastRatio >= minimumRatio);
15027
- if (passingCandidates.length === 0) return null;
15028
- const preferredCandidates = passingCandidates.filter(
15029
- (pair) => isPreferredDirection(background.tone, pair.foreground.tone, preferredForegroundTone)
15030
- );
15031
- const candidates = preferredCandidates.length > 0 ? preferredCandidates : passingCandidates;
15032
- return candidates.sort((left, right) => {
15066
+ return [...pairs].sort((left, right) => {
15067
+ const leftPreferred = isPreferredDirection(
15068
+ background.tone,
15069
+ left.foreground.tone,
15070
+ preferredForegroundTone
15071
+ ) ? 0 : 1;
15072
+ const rightPreferred = isPreferredDirection(
15073
+ background.tone,
15074
+ right.foreground.tone,
15075
+ preferredForegroundTone
15076
+ ) ? 0 : 1;
15077
+ if (leftPreferred !== rightPreferred) {
15078
+ return leftPreferred - rightPreferred;
15079
+ }
15080
+ const leftWhitePenalty = left.foreground.token === WHITE_FOREGROUND.token ? 1 : 0;
15081
+ const rightWhitePenalty = right.foreground.token === WHITE_FOREGROUND.token ? 1 : 0;
15082
+ if (leftWhitePenalty !== rightWhitePenalty) {
15083
+ return leftWhitePenalty - rightWhitePenalty;
15084
+ }
15033
15085
  const leftTargetDelta = Math.abs(left.foreground.tone - preferredForegroundTone);
15034
15086
  const rightTargetDelta = Math.abs(right.foreground.tone - preferredForegroundTone);
15035
15087
  if (leftTargetDelta !== rightTargetDelta) {
@@ -15040,46 +15092,122 @@ function pickForeground(colorsToPair, background, minimumRatio) {
15040
15092
  if (leftToneGap !== rightToneGap) {
15041
15093
  return rightToneGap - leftToneGap;
15042
15094
  }
15095
+ if (left.foreground.familyKey === background.familyKey && right.foreground.familyKey !== background.familyKey) {
15096
+ return -1;
15097
+ }
15098
+ if (right.foreground.familyKey === background.familyKey && left.foreground.familyKey !== background.familyKey) {
15099
+ return 1;
15100
+ }
15043
15101
  return right.contrastRatio - left.contrastRatio;
15044
- })[0];
15102
+ });
15045
15103
  }
15046
- function buildRecommendedPairs(colorsToPair, minimumRatio) {
15047
- const backgrounds = recommendedBackgroundTones.map((tone) => colorsToPair.find((color2) => color2.tone === tone)).filter((color2) => Boolean(color2));
15048
- const recommendedPairs = [];
15049
- for (const background of backgrounds) {
15050
- const pair = pickForeground(colorsToPair, background, minimumRatio);
15051
- if (!pair || recommendedPairs.some((item) => item.id === pair.id)) {
15052
- continue;
15053
- }
15054
- recommendedPairs.push(pair);
15104
+ function dedupeColors(colorsToDedupe) {
15105
+ return Array.from(new Map(colorsToDedupe.map((color2) => [color2.token, color2])).values());
15106
+ }
15107
+ function buildRecommendedPairsForBackground(background, foregrounds, minimumRatio) {
15108
+ const candidatePairs = foregrounds.filter((foreground) => foreground.token !== background.token).map((foreground) => buildPair(background, foreground)).filter((pair) => pair.contrastRatio >= minimumRatio);
15109
+ const whitePair = background.tone >= MIN_DARK_BACKGROUND_TONE_FOR_WHITE ? buildPair(background, WHITE_FOREGROUND) : null;
15110
+ if (whitePair && whitePair.contrastRatio >= minimumRatio) {
15111
+ candidatePairs.push(whitePair);
15055
15112
  }
15056
- return recommendedPairs;
15113
+ const dedupedPairs = Array.from(new Map(candidatePairs.map((pair) => [pair.id, pair])).values());
15114
+ return sortRecommendedPairs(background, dedupedPairs);
15115
+ }
15116
+ function findGreyFamily(families) {
15117
+ return families.find((family) => family.key.toLowerCase().includes("grey")) ?? families[0];
15118
+ }
15119
+ function getNonGreyFamilies(families) {
15120
+ const greyFamily = findGreyFamily(families);
15121
+ return families.filter((family) => family.key !== greyFamily.key);
15122
+ }
15123
+ function findFamilyByKey(families, key) {
15124
+ return key ? families.find((family) => family.key === key) : void 0;
15125
+ }
15126
+ function getDefaultPrimaryFamily(families) {
15127
+ const nonGreyFamilies = getNonGreyFamilies(families);
15128
+ return findFamilyByKey(nonGreyFamilies, DEFAULT_PRIMARY_FAMILY_KEY) ?? findFamilyByKey(nonGreyFamilies, "green") ?? nonGreyFamilies[0] ?? families[0];
15057
15129
  }
15058
- function buildRecommendedCollections(minimumRatio) {
15130
+ function getDefaultAccentFamily(families, primaryKey) {
15131
+ const nonGreyFamilies = getNonGreyFamilies(families).filter((family) => family.key !== primaryKey);
15132
+ return findFamilyByKey(nonGreyFamilies, DEFAULT_ACCENT_FAMILY_KEY) ?? nonGreyFamilies[0] ?? getDefaultPrimaryFamily(families);
15133
+ }
15134
+ function isApprovedBackgroundTone(color2) {
15135
+ return recommendedBackgroundTones.includes(
15136
+ color2.tone
15137
+ );
15138
+ }
15139
+ function isApprovedForegroundTone(color2) {
15140
+ return recommendedForegroundTones.includes(
15141
+ color2.tone
15142
+ );
15143
+ }
15144
+ function getPairingFamilies(themeCategory) {
15145
+ return pairingFamilyCollections[themeCategory];
15146
+ }
15147
+ function getDefaultAccentFamilyKey(themeCategory, primaryKey) {
15148
+ return getDefaultAccentFamily(getPairingFamilies(themeCategory), primaryKey).key;
15149
+ }
15150
+ function getPairingContext(themeCategory, primaryKey, accentKey) {
15151
+ const families = getPairingFamilies(themeCategory);
15152
+ const primary = findFamilyByKey(getNonGreyFamilies(families), primaryKey) ?? getDefaultPrimaryFamily(families);
15153
+ const accent = findFamilyByKey(
15154
+ getNonGreyFamilies(families).filter((family) => family.key !== primary.key),
15155
+ accentKey
15156
+ ) ?? getDefaultAccentFamily(families, primary.key);
15157
+ const grey = findGreyFamily(families);
15158
+ const allFamilies = [primary, accent, grey];
15159
+ const backgroundGroups = [
15160
+ {
15161
+ key: "primary",
15162
+ label: "Primary backgrounds",
15163
+ family: primary,
15164
+ backgrounds: primary.colors.filter(isApprovedBackgroundTone)
15165
+ },
15166
+ {
15167
+ key: "accent",
15168
+ label: "Accent backgrounds",
15169
+ family: accent,
15170
+ backgrounds: accent.colors.filter(isApprovedBackgroundTone)
15171
+ },
15172
+ {
15173
+ key: "grey",
15174
+ label: "Grey backgrounds",
15175
+ family: grey,
15176
+ backgrounds: grey.colors.filter(isApprovedBackgroundTone)
15177
+ }
15178
+ ];
15179
+ const backgrounds = backgroundGroups.flatMap((group) => group.backgrounds);
15180
+ const candidateForegrounds = dedupeColors(
15181
+ allFamilies.flatMap((family) => family.colors.filter(isApprovedForegroundTone))
15182
+ );
15183
+ const pairsByBackground = {};
15184
+ for (const background of backgrounds) {
15185
+ pairsByBackground[background.token] = buildRecommendedPairsForBackground(
15186
+ background,
15187
+ candidateForegrounds,
15188
+ AAA_NORMAL_TEXT_RATIO
15189
+ );
15190
+ }
15059
15191
  return {
15060
- brand: Object.entries(colors.brand).map(([key, palette]) => {
15061
- const scale2 = palette.colors.map(toPairingColor);
15062
- return {
15063
- key,
15064
- label: formatFamilyLabel(palette.name, key),
15065
- paletteName: palette.name,
15066
- colors: scale2,
15067
- recommendedPairs: buildRecommendedPairs(scale2, minimumRatio)
15068
- };
15069
- }),
15070
- aboriginal: Object.entries(colors.aboriginal).map(([key, palette]) => {
15071
- const scale2 = palette.colors.map(toPairingColor);
15072
- return {
15073
- key,
15074
- label: formatFamilyLabel(palette.name, key),
15075
- paletteName: palette.name,
15076
- colors: scale2,
15077
- recommendedPairs: buildRecommendedPairs(scale2, minimumRatio)
15078
- };
15079
- })
15192
+ accent,
15193
+ allFamilies,
15194
+ backgroundGroups,
15195
+ backgrounds,
15196
+ grey,
15197
+ pairsByBackground,
15198
+ primary,
15199
+ recommendedPairs: backgrounds.flatMap(
15200
+ (background) => pairsByBackground[background.token] ?? []
15201
+ ),
15202
+ themeCategory
15080
15203
  };
15081
15204
  }
15082
- var recommendedAaaPairingCollections = buildRecommendedCollections(AAA_NORMAL_TEXT_RATIO);
15205
+ function getWhiteForegroundPair(background) {
15206
+ return buildPair(background, WHITE_FOREGROUND);
15207
+ }
15208
+ function supportsWhiteForegroundPreview(background) {
15209
+ return background.tone >= MIN_DARK_BACKGROUND_TONE_FOR_WHITE;
15210
+ }
15083
15211
  function getPairingColorValue(color2, format) {
15084
15212
  return getColorValue(color2, format);
15085
15213
  }
@@ -15225,42 +15353,125 @@ function FormatToggle({ format, setFormat }) {
15225
15353
  )
15226
15354
  ] });
15227
15355
  }
15228
- function getPreferredFamilyKey(families) {
15229
- return families.find((family) => family.key === "green")?.key ?? families[0]?.key ?? "";
15356
+ var AAA_NORMAL_TEXT_THRESHOLD = "7.0:1 or higher for text below 18pt, or below 14pt bold";
15357
+ var AAA_LARGE_TEXT_THRESHOLD = "4.5:1 or higher for text at 18pt and above, or 14pt and above bold";
15358
+ var PREFERRED_BACKGROUND_TONES = [400, 600, 200, 800, 100, 50];
15359
+ function getToneFromToken(token) {
15360
+ if (!token) return null;
15361
+ const match = token.match(/-(\d+)$/);
15362
+ return match ? Number.parseInt(match[1], 10) : null;
15363
+ }
15364
+ function getFamilySwatchColor(family, preferredTone = 600) {
15365
+ const exactMatch = family.colors.find((color2) => color2.tone === preferredTone);
15366
+ if (exactMatch) {
15367
+ return exactMatch.hex;
15368
+ }
15369
+ const closestMatch = [...family.colors].sort(
15370
+ (left, right) => Math.abs(left.tone - preferredTone) - Math.abs(right.tone - preferredTone)
15371
+ )[0];
15372
+ return closestMatch?.hex ?? "transparent";
15373
+ }
15374
+ function getFamilySelectorLabel(family, themeCategory, selectionRole) {
15375
+ if (themeCategory !== "aboriginal") {
15376
+ return family.label;
15377
+ }
15378
+ const preferredTone = selectionRole === "primary colour" ? 800 : 600;
15379
+ return family.colors.find((color2) => color2.tone === preferredTone)?.name ?? family.label;
15230
15380
  }
15231
- function getDefaultPair(family) {
15232
- if (!family || family.recommendedPairs.length === 0) return null;
15233
- return family.recommendedPairs.reduce((bestPair, pair) => {
15234
- const bestDelta = Math.abs(bestPair.background.tone - 600);
15235
- const currentDelta = Math.abs(pair.background.tone - 600);
15236
- return currentDelta < bestDelta ? pair : bestPair;
15237
- }, family.recommendedPairs[0]);
15381
+ function isWhiteForegroundPair(pair) {
15382
+ return pair.foreground.token === "white";
15238
15383
  }
15239
- function getFamilySwatchColor(family) {
15240
- 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";
15384
+ function getPreferredPairForBackground(pairs, preferredPairId) {
15385
+ if (preferredPairId) {
15386
+ const preferredPair = pairs.find((pair) => pair.id === preferredPairId);
15387
+ if (preferredPair) {
15388
+ return preferredPair;
15389
+ }
15390
+ }
15391
+ return pairs.find((pair) => !isWhiteForegroundPair(pair)) ?? pairs[0] ?? null;
15392
+ }
15393
+ function getDefaultBackgroundToken(context) {
15394
+ for (const tone of PREFERRED_BACKGROUND_TONES) {
15395
+ for (const group of context.backgroundGroups) {
15396
+ const match = group.backgrounds.find(
15397
+ (background) => background.tone === tone && (context.pairsByBackground[background.token]?.length ?? 0) > 0
15398
+ );
15399
+ if (match) {
15400
+ return match.token;
15401
+ }
15402
+ }
15403
+ }
15404
+ for (const tone of PREFERRED_BACKGROUND_TONES) {
15405
+ for (const group of context.backgroundGroups) {
15406
+ const match = group.backgrounds.find((background) => background.tone === tone);
15407
+ if (match) {
15408
+ return match.token;
15409
+ }
15410
+ }
15411
+ }
15412
+ return context.backgrounds[0]?.token ?? "";
15413
+ }
15414
+ function resolveBackgroundToken(context, preferredToken, preferredTone) {
15415
+ if (preferredToken && context.backgrounds.some((background) => background.token === preferredToken)) {
15416
+ return preferredToken;
15417
+ }
15418
+ if (preferredTone !== null && preferredTone !== void 0) {
15419
+ for (const group of context.backgroundGroups) {
15420
+ const match = group.backgrounds.find((background) => background.tone === preferredTone);
15421
+ if (match) {
15422
+ return match.token;
15423
+ }
15424
+ }
15425
+ }
15426
+ return getDefaultBackgroundToken(context);
15241
15427
  }
15242
15428
  function ColorPairingToolLoading() {
15243
15429
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "animate-pulse space-y-6", children: [
15244
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-40 rounded-md border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15245
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-6 xl:grid-cols-[minmax(0,1.3fr)_minmax(20rem,0.9fr)]", children: [
15246
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-96 rounded-md border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15247
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-96 rounded-md border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" })
15430
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-32 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15431
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-6 lg:grid-cols-2", children: [
15432
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-48 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15433
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-48 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" })
15434
+ ] }),
15435
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(18rem,0.72fr)]", children: [
15436
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-96 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
15437
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-96 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" })
15248
15438
  ] })
15249
15439
  ] });
15250
15440
  }
15251
15441
  function getInitialPairingState(searchParams) {
15252
15442
  const paletteParam = searchParams.get("palette");
15253
- const familyParam = searchParams.get("family");
15443
+ const primaryParam = searchParams.get("primary");
15444
+ const accentParam = searchParams.get("accent");
15254
15445
  const pairParam = searchParams.get("pair");
15446
+ const backgroundParam = searchParams.get("background");
15255
15447
  const themeCategory = paletteParam === "brand" || paletteParam === "aboriginal" ? paletteParam : "brand";
15256
- const families = recommendedAaaPairingCollections[themeCategory];
15257
- const familyKey = families.some((family) => family.key === familyParam) ? familyParam : getPreferredFamilyKey(families);
15258
- const activeFamily = families.find((family) => family.key === familyKey) ?? families[0];
15259
- const defaultPair = getDefaultPair(activeFamily);
15260
- const selectedPairId = activeFamily?.recommendedPairs.some((pair) => pair.id === pairParam) ? pairParam : defaultPair?.id ?? "";
15261
- return { familyKey, selectedPairId, themeCategory };
15262
- }
15263
- function PairPreview({ family, pair }) {
15448
+ const context = getPairingContext(themeCategory, primaryParam, accentParam);
15449
+ const pairBackgroundToken = context.recommendedPairs.find((pair) => pair.id === pairParam)?.background.token ?? null;
15450
+ const selectedBackgroundToken = resolveBackgroundToken(
15451
+ context,
15452
+ backgroundParam ?? pairBackgroundToken,
15453
+ getToneFromToken(backgroundParam ?? pairBackgroundToken)
15454
+ );
15455
+ const selectedPairId = getPreferredPairForBackground(
15456
+ context.pairsByBackground[selectedBackgroundToken] ?? [],
15457
+ pairParam
15458
+ )?.id ?? "";
15459
+ return {
15460
+ accentKey: context.accent.key,
15461
+ primaryKey: context.primary.key,
15462
+ selectedBackgroundToken,
15463
+ selectedPairId,
15464
+ themeCategory
15465
+ };
15466
+ }
15467
+ function PairPreview({
15468
+ familySummary,
15469
+ isRecommended,
15470
+ pair
15471
+ }) {
15472
+ const whiteForeground = isWhiteForegroundPair(pair);
15473
+ const statusLabel = isRecommended ? "Pass" : pair.passes.aaaLarge ? "Large text only" : "Example only";
15474
+ const StatusIcon = isRecommended ? Icons.check : Icons.info;
15264
15475
  return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsxRuntime.jsx(
15265
15476
  "div",
15266
15477
  {
@@ -15282,7 +15493,7 @@ function PairPreview({ family, pair }) {
15282
15493
  },
15283
15494
  children: [
15284
15495
  /* @__PURE__ */ jsxRuntime.jsx(Icons.palette, { "data-slot": "icon", className: "size-4" }),
15285
- family.label
15496
+ familySummary
15286
15497
  ]
15287
15498
  }
15288
15499
  ),
@@ -15303,10 +15514,10 @@ function PairPreview({ family, pair }) {
15303
15514
  )
15304
15515
  ] }),
15305
15516
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-xl space-y-4 pb-12 sm:pb-16", children: [
15306
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: "Tone on tone" }),
15517
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: whiteForeground && !isRecommended ? "White on colour example" : whiteForeground ? "White on colour" : "Colour on colour" }),
15307
15518
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
15308
15519
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "max-w-lg text-4xl leading-none font-bold text-current sm:text-5xl", children: "Pair colour with confidence." }),
15309
- /* @__PURE__ */ jsxRuntime.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." })
15520
+ /* @__PURE__ */ jsxRuntime.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." })
15310
15521
  ] })
15311
15522
  ] }),
15312
15523
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
@@ -15319,8 +15530,8 @@ function PairPreview({ family, pair }) {
15319
15530
  color: pair.background.hex
15320
15531
  },
15321
15532
  children: [
15322
- "Pass",
15323
- /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { "data-slot": "icon", className: "size-4" })
15533
+ statusLabel,
15534
+ /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { "data-slot": "icon", className: "size-4" })
15324
15535
  ]
15325
15536
  }
15326
15537
  ),
@@ -15343,6 +15554,41 @@ function PairPreview({ family, pair }) {
15343
15554
  }
15344
15555
  ) });
15345
15556
  }
15557
+ function PreviewFallbackCard({
15558
+ familySummary,
15559
+ selectedBackground
15560
+ }) {
15561
+ return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsxRuntime.jsx(
15562
+ "div",
15563
+ {
15564
+ className: "p-6 sm:min-h-[26rem] sm:p-8",
15565
+ style: {
15566
+ backgroundColor: selectedBackground.hex,
15567
+ color: selectedBackground.tone >= 600 ? "#ffffff" : "#002664"
15568
+ },
15569
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-[22rem] flex-col justify-between gap-8", children: [
15570
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsxRuntime.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: [
15571
+ /* @__PURE__ */ jsxRuntime.jsx(Icons.palette, { "data-slot": "icon", className: "size-4" }),
15572
+ familySummary
15573
+ ] }) }),
15574
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-xl space-y-4 pb-12 sm:pb-16", children: [
15575
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: "Approved background" }),
15576
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
15577
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "max-w-lg text-4xl leading-none font-bold text-current sm:text-5xl", children: "Pair colour with confidence." }),
15578
+ /* @__PURE__ */ jsxRuntime.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." })
15579
+ ] })
15580
+ ] }),
15581
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
15582
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-2 rounded-full bg-current/10 px-4 py-2 text-sm font-semibold", children: [
15583
+ "No recommendation",
15584
+ /* @__PURE__ */ jsxRuntime.jsx(Icons.info, { "data-slot": "icon", className: "size-4" })
15585
+ ] }),
15586
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex rounded-full border border-current px-4 py-2 text-sm", children: selectedBackground.token })
15587
+ ] })
15588
+ ] })
15589
+ }
15590
+ ) });
15591
+ }
15346
15592
  function PairDetailCard({
15347
15593
  color: color2,
15348
15594
  format,
@@ -15380,7 +15626,7 @@ function PairDetailCard({
15380
15626
  /* @__PURE__ */ jsxRuntime.jsx(
15381
15627
  "div",
15382
15628
  {
15383
- className: "size-14 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15629
+ className: "size-14 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
15384
15630
  style: { backgroundColor: color2.hex }
15385
15631
  }
15386
15632
  ),
@@ -15419,7 +15665,7 @@ function ComplianceRow({
15419
15665
  passes,
15420
15666
  threshold
15421
15667
  }) {
15422
- return /* @__PURE__ */ jsxRuntime.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: [
15668
+ return /* @__PURE__ */ jsxRuntime.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: [
15423
15669
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
15424
15670
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium", children: label }),
15425
15671
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: threshold })
@@ -15446,7 +15692,7 @@ function PairComplianceCard({ pair }) {
15446
15692
  /* @__PURE__ */ jsxRuntime.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." })
15447
15693
  ] }),
15448
15694
  /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
15449
- /* @__PURE__ */ jsxRuntime.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: [
15695
+ /* @__PURE__ */ jsxRuntime.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: [
15450
15696
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Contrast ratio" }),
15451
15697
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-1 text-2xl font-semibold", children: [
15452
15698
  pair.contrastRatio.toFixed(2),
@@ -15458,7 +15704,7 @@ function PairComplianceCard({ pair }) {
15458
15704
  {
15459
15705
  label: "AAA normal text",
15460
15706
  passes: pair.passes.aaaText,
15461
- threshold: "7.0:1 or higher"
15707
+ threshold: AAA_NORMAL_TEXT_THRESHOLD
15462
15708
  }
15463
15709
  ),
15464
15710
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -15466,31 +15712,155 @@ function PairComplianceCard({ pair }) {
15466
15712
  {
15467
15713
  label: "AAA large text",
15468
15714
  passes: pair.passes.aaaLarge,
15469
- threshold: "4.5:1 or higher"
15715
+ threshold: AAA_LARGE_TEXT_THRESHOLD
15470
15716
  }
15471
15717
  )
15472
15718
  ] })
15473
15719
  ] });
15474
15720
  }
15721
+ function WhiteTextExampleCard({ pair }) {
15722
+ return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
15723
+ /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
15724
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "White text example" }),
15725
+ /* @__PURE__ */ jsxRuntime.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." })
15726
+ ] }),
15727
+ /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "grid gap-6 xl:grid-cols-[minmax(0,1.1fr)_minmax(18rem,0.9fr)]", children: [
15728
+ /* @__PURE__ */ jsxRuntime.jsx(
15729
+ "div",
15730
+ {
15731
+ className: "rounded-sm border border-grey-200 p-6 dark:border-grey-700",
15732
+ style: {
15733
+ backgroundColor: pair.background.hex,
15734
+ color: pair.foreground.hex
15735
+ },
15736
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
15737
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
15738
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg leading-tight font-semibold", children: "Large text example" }),
15739
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm/6", children: [
15740
+ "White text on ",
15741
+ pair.background.token
15742
+ ] })
15743
+ ] }),
15744
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-sm/6", children: [
15745
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
15746
+ "AAA normal text: ",
15747
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: pair.passes.aaaText ? "pass" : "fail" })
15748
+ ] }),
15749
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
15750
+ "AAA large text: ",
15751
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: pair.passes.aaaLarge ? "pass" : "fail" })
15752
+ ] })
15753
+ ] }),
15754
+ /* @__PURE__ */ jsxRuntime.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." })
15755
+ ] })
15756
+ }
15757
+ ),
15758
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
15759
+ /* @__PURE__ */ jsxRuntime.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: [
15760
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Contrast ratio" }),
15761
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-1 text-2xl font-semibold", children: [
15762
+ pair.contrastRatio.toFixed(2),
15763
+ ":1"
15764
+ ] })
15765
+ ] }),
15766
+ /* @__PURE__ */ jsxRuntime.jsx(
15767
+ ComplianceRow,
15768
+ {
15769
+ label: "AAA normal text",
15770
+ passes: pair.passes.aaaText,
15771
+ threshold: AAA_NORMAL_TEXT_THRESHOLD
15772
+ }
15773
+ ),
15774
+ /* @__PURE__ */ jsxRuntime.jsx(
15775
+ ComplianceRow,
15776
+ {
15777
+ label: "AAA large text",
15778
+ passes: pair.passes.aaaLarge,
15779
+ threshold: AAA_LARGE_TEXT_THRESHOLD
15780
+ }
15781
+ )
15782
+ ] })
15783
+ ] })
15784
+ ] });
15785
+ }
15786
+ function ColorFamilySelector({
15787
+ families,
15788
+ label,
15789
+ selectedKey,
15790
+ selectionRole,
15791
+ themeCategory,
15792
+ onSelect
15793
+ }) {
15794
+ const swatchTone = selectionRole === "primary colour" ? 800 : 600;
15795
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
15796
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-medium", children: label }),
15797
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2 lg:grid-cols-4 xl:grid-cols-5", children: families.map((family) => {
15798
+ const isSelected = family.key === selectedKey;
15799
+ const familySelectorLabel = getFamilySelectorLabel(family, themeCategory, selectionRole);
15800
+ return /* @__PURE__ */ jsxRuntime.jsxs(
15801
+ "button",
15802
+ {
15803
+ type: "button",
15804
+ "aria-label": `Select ${familySelectorLabel} as ${selectionRole}`,
15805
+ "aria-pressed": isSelected,
15806
+ onClick: () => onSelect(family.key),
15807
+ className: cn(
15808
+ "group relative flex w-full items-center gap-3 rounded-sm border px-3 py-2 text-left transition-colors",
15809
+ "border-grey-200 bg-background hover:bg-primary-800/10 hover:text-foreground dark:hover:bg-white/10",
15810
+ isSelected && "border-grey-800 dark:border-grey-400"
15811
+ ),
15812
+ children: [
15813
+ /* @__PURE__ */ jsxRuntime.jsx(
15814
+ "span",
15815
+ {
15816
+ className: "size-4 shrink-0 rounded-full",
15817
+ style: { backgroundColor: getFamilySwatchColor(family, swatchTone) }
15818
+ }
15819
+ ),
15820
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", children: familySelectorLabel })
15821
+ ]
15822
+ },
15823
+ family.key
15824
+ );
15825
+ }) })
15826
+ ] });
15827
+ }
15475
15828
  function ColorPairingToolContent() {
15476
15829
  const searchParams = navigation.useSearchParams();
15477
15830
  const {
15478
- familyKey: initialFamilyKey,
15831
+ accentKey: initialAccentKey,
15832
+ primaryKey: initialPrimaryKey,
15833
+ selectedBackgroundToken: initialSelectedBackgroundToken,
15479
15834
  selectedPairId: initialSelectedPairId,
15480
15835
  themeCategory: initialThemeCategory
15481
15836
  } = getInitialPairingState(searchParams);
15482
15837
  const [themeCategory, setThemeCategory] = React5.useState(initialThemeCategory);
15483
15838
  const [format, setFormat] = React5.useState("hex");
15484
- const [activeFamilyKey, setActiveFamilyKey] = React5.useState(initialFamilyKey);
15839
+ const [primaryFamilyKey, setPrimaryFamilyKey] = React5.useState(initialPrimaryKey);
15840
+ const [accentFamilyKey, setAccentFamilyKey] = React5.useState(initialAccentKey);
15841
+ const [selectedBackgroundToken, setSelectedBackgroundToken] = React5.useState(
15842
+ initialSelectedBackgroundToken
15843
+ );
15485
15844
  const [selectedPairId, setSelectedPairId] = React5.useState(initialSelectedPairId);
15486
- const families = recommendedAaaPairingCollections[themeCategory];
15487
- const resolvedActiveFamilyKey = families.some((family) => family.key === activeFamilyKey) ? activeFamilyKey : getPreferredFamilyKey(families);
15488
- const activeFamily = families.find((family) => family.key === resolvedActiveFamilyKey) ?? families[0];
15489
- const selectedPair = activeFamily?.recommendedPairs.find((pair) => pair.id === selectedPairId) ?? getDefaultPair(activeFamily);
15490
- const updateUrlParams = (nextThemeCategory, nextFamilyKey, nextSelectedPairId) => {
15845
+ const themeFamilies = getPairingFamilies(themeCategory);
15846
+ const context = getPairingContext(themeCategory, primaryFamilyKey, accentFamilyKey);
15847
+ const selectableFamilies = themeFamilies.filter((family) => family.key !== context.grey.key);
15848
+ const selectedBackground = context.backgrounds.find((background) => background.token === selectedBackgroundToken) ?? context.backgrounds[0] ?? null;
15849
+ const selectedBackgroundPairs = selectedBackground ? context.pairsByBackground[selectedBackground.token] ?? [] : [];
15850
+ const selectedPair = getPreferredPairForBackground(selectedBackgroundPairs, selectedPairId);
15851
+ const whiteForegroundExample = selectedBackground && supportsWhiteForegroundPreview(selectedBackground) ? getWhiteForegroundPair(selectedBackground) : null;
15852
+ const previewPair = selectedPair ?? whiteForegroundExample ?? null;
15853
+ const showWhiteForegroundExample = Boolean(whiteForegroundExample) && (!selectedPair || selectedPair.foreground.token !== "white");
15854
+ const detailForeground = selectedPair?.foreground ?? whiteForegroundExample?.foreground ?? null;
15855
+ const familySummary = [context.primary.label, context.accent.label, context.grey.label].join(
15856
+ " + "
15857
+ );
15858
+ const updateUrlParams = (nextThemeCategory, nextPrimaryKey, nextAccentKey, nextSelectedBackgroundToken, nextSelectedPairId) => {
15491
15859
  const params = new URLSearchParams(window.location.search);
15492
15860
  params.set("palette", nextThemeCategory);
15493
- params.set("family", nextFamilyKey);
15861
+ params.set("primary", nextPrimaryKey);
15862
+ params.set("accent", nextAccentKey);
15863
+ params.set("background", nextSelectedBackgroundToken);
15494
15864
  if (nextSelectedPairId) {
15495
15865
  params.set("pair", nextSelectedPairId);
15496
15866
  } else {
@@ -15502,31 +15872,90 @@ function ColorPairingToolContent() {
15502
15872
  `${window.location.pathname}?${params.toString()}${window.location.hash}`
15503
15873
  );
15504
15874
  };
15505
- const handleThemeCategoryChange = (nextThemeCategory) => {
15506
- const nextFamilies = recommendedAaaPairingCollections[nextThemeCategory];
15507
- const nextFamilyKey = nextFamilies.some((family) => family.key === activeFamilyKey) ? activeFamilyKey : getPreferredFamilyKey(nextFamilies);
15508
- const nextActiveFamily = nextFamilies.find((family) => family.key === nextFamilyKey) ?? nextFamilies[0];
15509
- const nextSelectedPair = nextActiveFamily?.recommendedPairs.find((pair) => pair.id === selectedPairId) ?? getDefaultPair(nextActiveFamily);
15875
+ const syncSelection = (nextThemeCategory, nextPrimaryKey, nextAccentKey, preferredBackgroundToken, preferredPairId) => {
15876
+ const nextContext = getPairingContext(nextThemeCategory, nextPrimaryKey, nextAccentKey);
15877
+ const nextSelectedBackgroundToken = resolveBackgroundToken(
15878
+ nextContext,
15879
+ preferredBackgroundToken,
15880
+ getToneFromToken(preferredBackgroundToken)
15881
+ );
15882
+ const nextSelectedPairId = getPreferredPairForBackground(
15883
+ nextContext.pairsByBackground[nextSelectedBackgroundToken] ?? [],
15884
+ preferredPairId
15885
+ )?.id ?? "";
15510
15886
  setThemeCategory(nextThemeCategory);
15511
- setActiveFamilyKey(nextFamilyKey);
15512
- setSelectedPairId(nextSelectedPair?.id ?? "");
15513
- updateUrlParams(nextThemeCategory, nextFamilyKey, nextSelectedPair?.id ?? "");
15887
+ setPrimaryFamilyKey(nextContext.primary.key);
15888
+ setAccentFamilyKey(nextContext.accent.key);
15889
+ setSelectedBackgroundToken(nextSelectedBackgroundToken);
15890
+ setSelectedPairId(nextSelectedPairId);
15891
+ updateUrlParams(
15892
+ nextThemeCategory,
15893
+ nextContext.primary.key,
15894
+ nextContext.accent.key,
15895
+ nextSelectedBackgroundToken,
15896
+ nextSelectedPairId
15897
+ );
15514
15898
  };
15515
- const handleFamilyChange = (nextFamilyKey) => {
15516
- const nextActiveFamily = families.find((family) => family.key === nextFamilyKey);
15517
- const nextSelectedPair = nextActiveFamily?.recommendedPairs.find((pair) => pair.id === selectedPairId) ?? getDefaultPair(nextActiveFamily);
15518
- setActiveFamilyKey(nextFamilyKey);
15519
- setSelectedPairId(nextSelectedPair?.id ?? "");
15520
- updateUrlParams(themeCategory, nextFamilyKey, nextSelectedPair?.id ?? "");
15899
+ const handleThemeCategoryChange = (nextThemeCategory) => {
15900
+ syncSelection(
15901
+ nextThemeCategory,
15902
+ primaryFamilyKey,
15903
+ accentFamilyKey,
15904
+ selectedBackgroundToken,
15905
+ selectedPairId
15906
+ );
15907
+ };
15908
+ const handlePrimaryColorChange = (nextPrimaryKey) => {
15909
+ const nextAccentKey = nextPrimaryKey === accentFamilyKey ? getDefaultAccentFamilyKey(themeCategory, nextPrimaryKey) : accentFamilyKey;
15910
+ syncSelection(
15911
+ themeCategory,
15912
+ nextPrimaryKey,
15913
+ nextAccentKey,
15914
+ selectedBackgroundToken,
15915
+ selectedPairId
15916
+ );
15917
+ };
15918
+ const handleAccentColorChange = (nextAccentKey) => {
15919
+ if (nextAccentKey === primaryFamilyKey) return;
15920
+ syncSelection(
15921
+ themeCategory,
15922
+ primaryFamilyKey,
15923
+ nextAccentKey,
15924
+ selectedBackgroundToken,
15925
+ selectedPairId
15926
+ );
15927
+ };
15928
+ const handleBackgroundChange = (nextSelectedBackgroundToken) => {
15929
+ const nextSelectedPairId = getPreferredPairForBackground(
15930
+ context.pairsByBackground[nextSelectedBackgroundToken] ?? [],
15931
+ selectedPairId
15932
+ )?.id ?? "";
15933
+ setSelectedBackgroundToken(nextSelectedBackgroundToken);
15934
+ setSelectedPairId(nextSelectedPairId);
15935
+ updateUrlParams(
15936
+ themeCategory,
15937
+ context.primary.key,
15938
+ context.accent.key,
15939
+ nextSelectedBackgroundToken,
15940
+ nextSelectedPairId
15941
+ );
15521
15942
  };
15522
15943
  const handlePairChange = (nextSelectedPairId) => {
15944
+ const nextSelectedPair = selectedBackgroundPairs.find((pair) => pair.id === nextSelectedPairId);
15945
+ if (!nextSelectedPair || !selectedBackground) return;
15523
15946
  setSelectedPairId(nextSelectedPairId);
15524
- updateUrlParams(themeCategory, resolvedActiveFamilyKey, nextSelectedPairId);
15947
+ updateUrlParams(
15948
+ themeCategory,
15949
+ context.primary.key,
15950
+ context.accent.key,
15951
+ selectedBackground.token,
15952
+ nextSelectedPairId
15953
+ );
15525
15954
  };
15526
- if (!activeFamily || !selectedPair) {
15955
+ if (!selectedBackground) {
15527
15956
  return /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { children: [
15528
- /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "No recommended AAA pairs available" }),
15529
- /* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "No recommended pairs are available for the current palette." })
15957
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "No approved background tones available" }),
15958
+ /* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "No approved tones are available for the current palette." })
15530
15959
  ] }) });
15531
15960
  }
15532
15961
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
@@ -15547,154 +15976,207 @@ function ColorPairingToolContent() {
15547
15976
  ] }),
15548
15977
  /* @__PURE__ */ jsxRuntime.jsx(FormatToggle, { format, setFormat })
15549
15978
  ] }),
15550
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2 lg:grid-cols-4 xl:grid-cols-5", children: families.map((family) => {
15551
- const isActive = family.key === resolvedActiveFamilyKey;
15552
- return /* @__PURE__ */ jsxRuntime.jsxs(
15553
- "button",
15979
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-6", children: [
15980
+ /* @__PURE__ */ jsxRuntime.jsx(
15981
+ ColorFamilySelector,
15982
+ {
15983
+ label: "Primary colour",
15984
+ families: selectableFamilies,
15985
+ selectedKey: context.primary.key,
15986
+ selectionRole: "primary colour",
15987
+ themeCategory,
15988
+ onSelect: handlePrimaryColorChange
15989
+ }
15990
+ ),
15991
+ /* @__PURE__ */ jsxRuntime.jsx(
15992
+ ColorFamilySelector,
15993
+ {
15994
+ label: "Accent colour",
15995
+ families: selectableFamilies.filter((family) => family.key !== context.primary.key),
15996
+ selectedKey: context.accent.key,
15997
+ selectionRole: "accent colour",
15998
+ themeCategory,
15999
+ onSelect: handleAccentColorChange
16000
+ }
16001
+ )
16002
+ ] }),
16003
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [
16004
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Included families:" }),
16005
+ context.allFamilies.map((family) => /* @__PURE__ */ jsxRuntime.jsxs(
16006
+ "span",
15554
16007
  {
15555
- type: "button",
15556
- onClick: () => handleFamilyChange(family.key),
15557
- className: cn(
15558
- "group relative flex w-full items-center gap-3 rounded-sm border px-3 py-2 text-left transition-colors",
15559
- "border-grey-200 bg-background hover:bg-primary-800/10 hover:text-foreground dark:hover:bg-white/10",
15560
- isActive && "border-grey-800 dark:border-grey-400"
15561
- ),
16008
+ className: "inline-flex items-center gap-2 rounded-full border border-grey-200 px-3 py-1 text-muted-foreground dark:border-grey-700",
15562
16009
  children: [
15563
16010
  /* @__PURE__ */ jsxRuntime.jsx(
15564
16011
  "span",
15565
16012
  {
15566
- className: "size-4 shrink-0 rounded-full",
16013
+ className: "size-2.5 rounded-full",
15567
16014
  style: { backgroundColor: getFamilySwatchColor(family) }
15568
16015
  }
15569
16016
  ),
15570
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", children: family.label })
16017
+ family.label
15571
16018
  ]
15572
16019
  },
15573
16020
  family.key
15574
- );
15575
- }) }) }),
15576
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
15577
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid items-start gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(17rem,0.68fr)]", children: [
15578
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
15579
- /* @__PURE__ */ jsxRuntime.jsx(PairPreview, { family: activeFamily, pair: selectedPair }),
15580
- /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
15581
- /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
15582
- /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "Background tone strip" }),
15583
- /* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "Filled chips have a recommended AAA foreground pair. Select one to update the preview." })
15584
- ] }),
15585
- /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-4", children: [
15586
- /* @__PURE__ */ jsxRuntime.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) => {
15587
- const pair = activeFamily.recommendedPairs.find(
15588
- (item) => item.background.token === color2.token
15589
- );
15590
- const isSelected = selectedPair.background.token === color2.token;
15591
- return /* @__PURE__ */ jsxRuntime.jsxs(
16021
+ ))
16022
+ ] }),
16023
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid items-start gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(18rem,0.72fr)]", children: [
16024
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
16025
+ previewPair ? /* @__PURE__ */ jsxRuntime.jsx(
16026
+ PairPreview,
16027
+ {
16028
+ familySummary,
16029
+ isRecommended: Boolean(selectedPair),
16030
+ pair: previewPair
16031
+ }
16032
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
16033
+ PreviewFallbackCard,
16034
+ {
16035
+ familySummary,
16036
+ selectedBackground
16037
+ }
16038
+ ),
16039
+ /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
16040
+ /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
16041
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "Approved backgrounds" }),
16042
+ /* @__PURE__ */ jsxRuntime.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." })
16043
+ ] }),
16044
+ /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-5", children: [
16045
+ context.backgroundGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
16046
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [
16047
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: group.label }),
16048
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: group.family.label })
16049
+ ] }),
16050
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-2 sm:grid-cols-6", children: group.backgrounds.map((background) => {
16051
+ const pairs = context.pairsByBackground[background.token] ?? [];
16052
+ const preferredPair = selectedBackground.token === background.token ? selectedPair ?? getPreferredPairForBackground(pairs) : getPreferredPairForBackground(pairs);
16053
+ const hasWhiteExample = supportsWhiteForegroundPreview(background);
16054
+ const isSelected = selectedBackground.token === background.token;
16055
+ 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`;
16056
+ return /* @__PURE__ */ jsxRuntime.jsx(
15592
16057
  "button",
15593
16058
  {
15594
16059
  type: "button",
15595
- disabled: !pair,
15596
- onClick: () => pair && handlePairChange(pair.id),
16060
+ "aria-label": ariaLabel,
16061
+ "aria-pressed": isSelected,
16062
+ onClick: () => handleBackgroundChange(background.token),
15597
16063
  className: cn(
15598
- "group relative h-12 rounded-xl border transition-transform",
15599
- pair ? "cursor-pointer border-grey-200 hover:scale-[1.03] dark:border-grey-700" : "cursor-not-allowed border-grey-100 dark:border-grey-800",
16064
+ "group relative h-12 rounded-sm border border-grey-200 transition-transform hover:scale-[1.03] dark:border-grey-700",
15600
16065
  isSelected && "ring-2 ring-primary-500 ring-offset-2 ring-offset-background"
15601
16066
  ),
15602
- style: { backgroundColor: color2.hex },
15603
- children: [
15604
- pair && /* @__PURE__ */ jsxRuntime.jsx(
15605
- "span",
15606
- {
15607
- 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",
15608
- style: { backgroundColor: pair.foreground.hex }
15609
- }
15610
- ),
15611
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sr-only", children: [
15612
- color2.token,
15613
- pair ? ` paired with ${pair.foreground.token}` : " has no recommended pair in this tool"
15614
- ] })
15615
- ]
16067
+ style: { backgroundColor: background.hex },
16068
+ children: preferredPair ? /* @__PURE__ */ jsxRuntime.jsx(
16069
+ "span",
16070
+ {
16071
+ 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",
16072
+ style: { backgroundColor: preferredPair.foreground.hex }
16073
+ }
16074
+ ) : null
15616
16075
  },
15617
- color2.token
16076
+ background.token
15618
16077
  );
15619
- }) }),
15620
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4 text-sm text-muted-foreground", children: [
15621
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
15622
- "Selected background:",
15623
- " ",
15624
- /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-foreground", children: selectedPair.background.token })
15625
- ] }),
15626
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
15627
- "Recommended foreground:",
15628
- " ",
15629
- /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-foreground", children: selectedPair.foreground.token })
15630
- ] })
16078
+ }) })
16079
+ ] }, group.key)),
16080
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4 text-sm text-muted-foreground", children: [
16081
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
16082
+ "Selected background:",
16083
+ " ",
16084
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-foreground", children: selectedBackground.token })
16085
+ ] }),
16086
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
16087
+ selectedPair ? "Selected foreground:" : "White text example:",
16088
+ " ",
16089
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-foreground", children: selectedPair?.foreground.token ?? whiteForegroundExample?.foreground.token ?? "None" })
15631
16090
  ] })
15632
16091
  ] })
15633
- ] }),
15634
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
15635
- /* @__PURE__ */ jsxRuntime.jsx(PairDetailCard, { color: selectedPair.background, format, role: "Background" }),
15636
- /* @__PURE__ */ jsxRuntime.jsx(PairDetailCard, { color: selectedPair.foreground, format, role: "Foreground" })
15637
16092
  ] })
15638
16093
  ] }),
15639
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "h-fit", children: [
15640
- /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
15641
- /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "Recommended pairs" }),
15642
- /* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "Recommended same-family combinations that meet AAA normal-text contrast." })
15643
- ] }),
15644
- /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "grid gap-3", children: activeFamily.recommendedPairs.map((pair) => {
15645
- const isActive = selectedPair.id === pair.id;
15646
- return /* @__PURE__ */ jsxRuntime.jsxs(
15647
- "button",
15648
- {
15649
- type: "button",
15650
- onClick: () => handlePairChange(pair.id),
15651
- className: cn(
15652
- "rounded-2xl border p-4 text-left transition-colors",
15653
- 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"
15654
- ),
15655
- children: [
15656
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
15657
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
15658
- /* @__PURE__ */ jsxRuntime.jsx(
15659
- "div",
15660
- {
15661
- className: "size-11 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15662
- style: { backgroundColor: pair.background.hex }
15663
- }
15664
- ),
15665
- /* @__PURE__ */ jsxRuntime.jsx(
15666
- "div",
15667
- {
15668
- className: "size-11 rounded-2xl border border-grey-200 shadow-sm dark:border-grey-700",
15669
- style: { backgroundColor: pair.foreground.hex }
15670
- }
15671
- )
15672
- ] }),
15673
- /* @__PURE__ */ jsxRuntime.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: [
15674
- /* @__PURE__ */ jsxRuntime.jsx(Icons.contrast, { "data-slot": "icon", className: "size-4" }),
15675
- pair.rating
15676
- ] })
16094
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
16095
+ /* @__PURE__ */ jsxRuntime.jsx(PairDetailCard, { color: selectedBackground, format, role: "Background" }),
16096
+ detailForeground ? /* @__PURE__ */ jsxRuntime.jsx(PairDetailCard, { color: detailForeground, format, role: "Foreground" }) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "gap-4", children: [
16097
+ /* @__PURE__ */ jsxRuntime.jsx(CardHeader, { className: "gap-3 border-b", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
16098
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Foreground" }),
16099
+ /* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "No recommended foreground available" })
16100
+ ] }) }),
16101
+ /* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Select another approved tone or review the recommended foregrounds for the same background." }) })
16102
+ ] })
16103
+ ] }),
16104
+ selectedPair ? /* @__PURE__ */ jsxRuntime.jsx(PairComplianceCard, { pair: selectedPair }) : null,
16105
+ showWhiteForegroundExample && whiteForegroundExample ? /* @__PURE__ */ jsxRuntime.jsx(WhiteTextExampleCard, { pair: whiteForegroundExample }) : null
16106
+ ] }),
16107
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "h-fit", children: [
16108
+ /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
16109
+ /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "Recommended foregrounds" }),
16110
+ /* @__PURE__ */ jsxRuntime.jsxs(CardDescription, { children: [
16111
+ "AAA combinations for ",
16112
+ selectedBackground.token,
16113
+ ", drawn from",
16114
+ " ",
16115
+ context.primary.label,
16116
+ ", ",
16117
+ context.accent.label,
16118
+ ", Grey, and white using only foreground tones 50, 200, 400, 600, and 800."
16119
+ ] })
16120
+ ] }),
16121
+ /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "grid gap-3", children: selectedBackgroundPairs.length > 0 ? selectedBackgroundPairs.map((pair) => {
16122
+ const isActive = selectedPair?.id === pair.id;
16123
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16124
+ "button",
16125
+ {
16126
+ type: "button",
16127
+ "aria-label": `Use ${pair.foreground.token} on ${pair.background.token}`,
16128
+ "aria-pressed": isActive,
16129
+ onClick: () => handlePairChange(pair.id),
16130
+ className: cn(
16131
+ "rounded-sm border p-4 text-left transition-colors",
16132
+ 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"
16133
+ ),
16134
+ children: [
16135
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
16136
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
16137
+ /* @__PURE__ */ jsxRuntime.jsx(
16138
+ "div",
16139
+ {
16140
+ className: "size-11 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
16141
+ style: { backgroundColor: pair.background.hex }
16142
+ }
16143
+ ),
16144
+ /* @__PURE__ */ jsxRuntime.jsx(
16145
+ "div",
16146
+ {
16147
+ className: "size-11 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
16148
+ style: { backgroundColor: pair.foreground.hex }
16149
+ }
16150
+ )
15677
16151
  ] }),
15678
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 space-y-1", children: [
15679
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-medium text-foreground", children: [
15680
- pair.background.token,
15681
- " / ",
15682
- pair.foreground.token
15683
- ] }),
15684
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
15685
- pair.contrastRatio.toFixed(2),
15686
- ":1 contrast ratio"
15687
- ] })
16152
+ /* @__PURE__ */ jsxRuntime.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: [
16153
+ /* @__PURE__ */ jsxRuntime.jsx(Icons.contrast, { "data-slot": "icon", className: "size-4" }),
16154
+ pair.rating
15688
16155
  ] })
15689
- ]
15690
- },
15691
- pair.id
15692
- );
15693
- }) })
15694
- ] }) })
15695
- ] }),
15696
- /* @__PURE__ */ jsxRuntime.jsx(PairComplianceCard, { pair: selectedPair })
15697
- ] })
16156
+ ] }),
16157
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 space-y-1", children: [
16158
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-medium text-foreground", children: [
16159
+ pair.background.token,
16160
+ " / ",
16161
+ pair.foreground.token
16162
+ ] }),
16163
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
16164
+ pair.foreground.familyLabel,
16165
+ " on ",
16166
+ pair.background.familyLabel
16167
+ ] }),
16168
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
16169
+ pair.contrastRatio.toFixed(2),
16170
+ ":1 contrast ratio"
16171
+ ] })
16172
+ ] })
16173
+ ]
16174
+ },
16175
+ pair.id
16176
+ );
16177
+ }) : /* @__PURE__ */ jsxRuntime.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." }) })
16178
+ ] }) })
16179
+ ] }) })
15698
16180
  ] });
15699
16181
  }
15700
16182
  function ColorPairingTool() {
@@ -16061,7 +16543,7 @@ var ChartTooltip4 = ({
16061
16543
  {
16062
16544
  className: cn(
16063
16545
  // base
16064
- "rounded-md border text-sm shadow-md",
16546
+ "rounded-sm border text-sm shadow-md",
16065
16547
  // border color
16066
16548
  "border-gray-200 dark:border-gray-800",
16067
16549
  // background color
@@ -16653,7 +17135,7 @@ function DialogContent({
16653
17135
  {
16654
17136
  "data-slot": "dialog-content",
16655
17137
  className: cn(
16656
- "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",
17138
+ "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",
16657
17139
  className
16658
17140
  ),
16659
17141
  ...props,
@@ -16883,7 +17365,7 @@ function ContextMenuSubContent({
16883
17365
  {
16884
17366
  "data-slot": "context-menu-sub-content",
16885
17367
  className: cn(
16886
- "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",
17368
+ "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",
16887
17369
  className
16888
17370
  ),
16889
17371
  ...props
@@ -16899,7 +17381,7 @@ function ContextMenuContent({
16899
17381
  {
16900
17382
  "data-slot": "context-menu-content",
16901
17383
  className: cn(
16902
- "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",
17384
+ "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",
16903
17385
  className
16904
17386
  ),
16905
17387
  ...props
@@ -17406,7 +17888,7 @@ function DataTable({
17406
17888
  });
17407
17889
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-1", children: [
17408
17890
  /* @__PURE__ */ jsxRuntime.jsx(DataTableToolbar, { table, search, toolbar }),
17409
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
17891
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-sm border", children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
17410
17892
  /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: headerGroup.headers.map((header) => {
17411
17893
  return /* @__PURE__ */ jsxRuntime.jsx(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder ? null : reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
17412
17894
  }) }, headerGroup.id)) }),
@@ -17524,7 +18006,7 @@ var ChartTooltip5 = ({ active, payload, valueFormatter }) => {
17524
18006
  {
17525
18007
  className: cn(
17526
18008
  // base
17527
- "rounded-md border text-sm shadow-md",
18009
+ "rounded-sm border text-sm shadow-md",
17528
18010
  // border color
17529
18011
  "border-gray-200 dark:border-gray-800",
17530
18012
  // background color
@@ -17762,8 +18244,8 @@ function DrawerContent({
17762
18244
  "data-slot": "drawer-content",
17763
18245
  className: cn(
17764
18246
  "group/drawer-content fixed z-50 flex h-auto flex-col bg-background",
17765
- "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",
17766
- "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",
18247
+ "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",
18248
+ "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",
17767
18249
  "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",
17768
18250
  "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",
17769
18251
  className
@@ -18182,7 +18664,7 @@ function FormMessage({ className, ...props }) {
18182
18664
 
18183
18665
  // package.json
18184
18666
  var package_default = {
18185
- version: "1.97.13"};
18667
+ version: "1.99.0"};
18186
18668
  var SluggerContext = React5__namespace.default.createContext(null);
18187
18669
  function flattenText(nodes) {
18188
18670
  if (nodes == null || typeof nodes === "boolean") return "";
@@ -18333,7 +18815,7 @@ function SiteSearch({ navigation: navigation$1 }) {
18333
18815
  children: [
18334
18816
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden text-grey-600 lg:inline-flex dark:text-grey-200", children: "Search site..." }),
18335
18817
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex lg:hidden dark:text-grey-200", children: "Search..." }),
18336
- /* @__PURE__ */ jsxRuntime.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: [
18818
+ /* @__PURE__ */ jsxRuntime.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: [
18337
18819
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: "\u2318" }),
18338
18820
  "K"
18339
18821
  ] })
@@ -18548,7 +19030,7 @@ function HoverCardContent({
18548
19030
  align,
18549
19031
  sideOffset,
18550
19032
  className: cn(
18551
- "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",
19033
+ "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",
18552
19034
  className
18553
19035
  ),
18554
19036
  ...props
@@ -18586,7 +19068,7 @@ function InputOTPSlot({
18586
19068
  "data-slot": "input-otp-slot",
18587
19069
  "data-active": isActive,
18588
19070
  className: cn(
18589
- "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",
19071
+ "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",
18590
19072
  className
18591
19073
  ),
18592
19074
  ...props,
@@ -18871,7 +19353,7 @@ var ChartTooltip6 = ({ active, payload, label, valueFormatter }) => {
18871
19353
  {
18872
19354
  className: cn(
18873
19355
  // base
18874
- "rounded-md border text-sm shadow-md",
19356
+ "rounded-sm border text-sm shadow-md",
18875
19357
  // border color
18876
19358
  "border-gray-200 dark:border-gray-800",
18877
19359
  // background color
@@ -19766,7 +20248,7 @@ function Menubar({ className, ...props }) {
19766
20248
  {
19767
20249
  "data-slot": "menubar",
19768
20250
  className: cn(
19769
- "flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs",
20251
+ "flex h-9 items-center gap-1 rounded-sm border bg-background p-1 shadow-xs",
19770
20252
  className
19771
20253
  ),
19772
20254
  ...props
@@ -19816,7 +20298,7 @@ function MenubarContent({
19816
20298
  alignOffset,
19817
20299
  sideOffset,
19818
20300
  className: cn(
19819
- "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",
20301
+ "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",
19820
20302
  className
19821
20303
  ),
19822
20304
  ...props
@@ -19960,7 +20442,7 @@ function MenubarSubContent({
19960
20442
  {
19961
20443
  "data-slot": "menubar-sub-content",
19962
20444
  className: cn(
19963
- "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",
20445
+ "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",
19964
20446
  className
19965
20447
  ),
19966
20448
  ...props
@@ -28379,7 +28861,7 @@ function NavigationLink({
28379
28861
  href,
28380
28862
  onClick,
28381
28863
  className: clsx12__default.default(
28382
- "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",
28864
+ "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",
28383
28865
  "hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
28384
28866
  "dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
28385
28867
  href === pathname && "border-l border-primary-800 bg-primary-800/10 font-bold text-primary-800 dark:border-white dark:bg-white/20"
@@ -28481,7 +28963,7 @@ function NavigationMenuContent({
28481
28963
  "data-slot": "navigation-menu-content",
28482
28964
  className: cn(
28483
28965
  "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",
28484
- "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",
28966
+ "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",
28485
28967
  className
28486
28968
  ),
28487
28969
  ...props
@@ -28497,7 +28979,7 @@ function NavigationMenuViewport({
28497
28979
  {
28498
28980
  "data-slot": "navigation-menu-viewport",
28499
28981
  className: cn(
28500
- "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)]",
28982
+ "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)]",
28501
28983
  className
28502
28984
  ),
28503
28985
  ...props
@@ -28820,7 +29302,7 @@ function NSWCard({
28820
29302
  "div",
28821
29303
  {
28822
29304
  className: cn(
28823
- "h-full rounded-md border border-(--nsw-card-border)",
29305
+ "h-full rounded-sm border border-(--nsw-card-border)",
28824
29306
  hasImage && "border-t-none rounded-t-none"
28825
29307
  ),
28826
29308
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full flex-col p-8", children: bodyChildren })
@@ -28832,7 +29314,7 @@ function NSWCard({
28832
29314
  "div",
28833
29315
  {
28834
29316
  className: cn(
28835
- "flex h-full flex-col rounded-md border border-(--nsw-card-border) p-8",
29317
+ "flex h-full flex-col rounded-sm border border-(--nsw-card-border) p-8",
28836
29318
  hasImage && "border-t-none rounded-t-none"
28837
29319
  ),
28838
29320
  children: bodyChildren
@@ -29387,7 +29869,7 @@ function ResizableHandle({
29387
29869
  className
29388
29870
  ),
29389
29871
  ...props,
29390
- children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.drag_indicator, { className: "size-2.5" }) })
29872
+ children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsxRuntime.jsx(Icons.drag_indicator, { className: "size-2.5" }) })
29391
29873
  }
29392
29874
  );
29393
29875
  }
@@ -29686,7 +30168,7 @@ function Sidebar({
29686
30168
  {
29687
30169
  "data-sidebar": "sidebar",
29688
30170
  "data-slot": "sidebar-inner",
29689
- 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",
30171
+ 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",
29690
30172
  children
29691
30173
  }
29692
30174
  )
@@ -30145,7 +30627,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
30145
30627
  const isActive = pathname === link.href;
30146
30628
  const isActiveOrHasActiveDescendant = isLinkOrDescendantActive(link, pathname);
30147
30629
  const baseLinkClasses = clsx12__default.default(
30148
- "w-full cursor-pointer rounded-r-md border-l py-1 pr-2 pl-4 text-left text-base/8 sm:text-sm/6",
30630
+ "w-full cursor-pointer rounded-r-sm border-l py-1 pr-2 pl-4 text-left text-base/8 sm:text-sm/6",
30149
30631
  "hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
30150
30632
  "dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
30151
30633
  isActive && "border-l border-primary-800 bg-primary-800/10 font-bold text-primary-800 dark:border-white dark:bg-white/20"
@@ -31081,7 +31563,7 @@ var TabNavigation = React5__namespace.default.forwardRef(({ className, children,
31081
31563
  motion.div,
31082
31564
  {
31083
31565
  layoutId: "hoverBackground",
31084
- 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",
31566
+ 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",
31085
31567
  transition: {
31086
31568
  type: "spring",
31087
31569
  stiffness: 500,
@@ -31617,7 +32099,7 @@ var Tracker = React5__namespace.default.forwardRef(
31617
32099
  );
31618
32100
  Tracker.displayName = "Tracker";
31619
32101
  var buttonVariants4 = classVarianceAuthority.cva(
31620
- "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",
32102
+ "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",
31621
32103
  {
31622
32104
  variants: {
31623
32105
  variant: {
@@ -31736,7 +32218,7 @@ var Artifact = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
31736
32218
  "div",
31737
32219
  {
31738
32220
  className: cn(
31739
- "flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm",
32221
+ "flex flex-col overflow-hidden rounded-sm border bg-background shadow-sm",
31740
32222
  className
31741
32223
  ),
31742
32224
  ...props
@@ -31982,7 +32464,7 @@ function isFunction(value) {
31982
32464
  return typeof value === "function";
31983
32465
  }
31984
32466
  var badgeVariants2 = classVarianceAuthority.cva(
31985
- "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",
32467
+ "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",
31986
32468
  {
31987
32469
  variants: {
31988
32470
  variant: {
@@ -32167,7 +32649,7 @@ var CodeBlock = ({
32167
32649
  "div",
32168
32650
  {
32169
32651
  className: cn(
32170
- "relative w-full overflow-hidden rounded-md border bg-background text-foreground",
32652
+ "relative w-full overflow-hidden rounded-sm border bg-background text-foreground",
32171
32653
  className
32172
32654
  ),
32173
32655
  ...props,
@@ -32282,7 +32764,7 @@ function HoverCardContent2({
32282
32764
  align,
32283
32765
  sideOffset,
32284
32766
  className: cn(
32285
- "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",
32767
+ "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",
32286
32768
  className
32287
32769
  ),
32288
32770
  ...props
@@ -32986,7 +33468,7 @@ function DropdownMenuContent2({
32986
33468
  "data-slot": "dropdown-menu-content",
32987
33469
  sideOffset,
32988
33470
  className: cn(
32989
- "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",
33471
+ "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",
32990
33472
  className
32991
33473
  ),
32992
33474
  ...props
@@ -33273,7 +33755,7 @@ function Textarea2({ className, ...props }) {
33273
33755
  {
33274
33756
  "data-slot": "textarea",
33275
33757
  className: cn(
33276
- "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",
33758
+ "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",
33277
33759
  className
33278
33760
  ),
33279
33761
  ...props
@@ -33293,7 +33775,7 @@ function PromptInputAttachment({ data, className, ...props }) {
33293
33775
  return /* @__PURE__ */ jsxRuntime.jsxs(
33294
33776
  "div",
33295
33777
  {
33296
- className: cn("group relative h-14 w-14 rounded-md border", className),
33778
+ className: cn("group relative h-14 w-14 rounded-sm border", className),
33297
33779
  ...props,
33298
33780
  children: [
33299
33781
  data.mediaType?.startsWith("image/") && data.url ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -33571,7 +34053,7 @@ var PromptInput = ({
33571
34053
  "form",
33572
34054
  {
33573
34055
  className: cn(
33574
- "w-full divide-y overflow-hidden rounded-xl border bg-background shadow-sm",
34056
+ "w-full divide-y overflow-hidden rounded-sm border bg-background shadow-sm",
33575
34057
  className
33576
34058
  ),
33577
34059
  onSubmit: handleSubmit,
@@ -33936,7 +34418,7 @@ var TaskItemFile = ({ children, className, ...props }) => /* @__PURE__ */ jsxRun
33936
34418
  "div",
33937
34419
  {
33938
34420
  className: cn(
33939
- "inline-flex items-center gap-1 rounded-md border bg-secondary px-1.5 py-0.5 text-xs text-foreground",
34421
+ "inline-flex items-center gap-1 rounded-sm border bg-secondary px-1.5 py-0.5 text-xs text-foreground",
33940
34422
  className
33941
34423
  ),
33942
34424
  ...props,
@@ -33971,7 +34453,7 @@ var TaskContent = ({ children, className, ...props }) => /* @__PURE__ */ jsxRunt
33971
34453
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-2 border-l-2 border-muted pl-4", children })
33972
34454
  }
33973
34455
  );
33974
- var Tool = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(Collapsible2, { className: cn("not-prose mb-4 w-full rounded-md border", className), ...props });
34456
+ var Tool = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(Collapsible2, { className: cn("not-prose mb-4 w-full rounded-sm border", className), ...props });
33975
34457
  var getStatusBadge = (status) => {
33976
34458
  const labels = {
33977
34459
  "input-streaming": "Pending",
@@ -34053,7 +34535,7 @@ function Input2({ className, type, ...props }) {
34053
34535
  type,
34054
34536
  "data-slot": "input",
34055
34537
  className: cn(
34056
- "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",
34538
+ "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",
34057
34539
  "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
34058
34540
  "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
34059
34541
  className
@@ -34092,7 +34574,7 @@ var WebPreview = ({
34092
34574
  return /* @__PURE__ */ jsxRuntime.jsx(WebPreviewContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
34093
34575
  "div",
34094
34576
  {
34095
- className: cn("flex size-full flex-col rounded-lg border bg-card", className),
34577
+ className: cn("flex size-full flex-col rounded-sm border bg-card", className),
34096
34578
  ...props,
34097
34579
  children
34098
34580
  }