@nswds/app 1.97.15 → 1.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/globals.css +275 -39
- package/dist/index.cjs +1031 -206
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1029 -205
- package/dist/index.js.map +1 -1
- package/dist/styles.css +266 -39
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -40,6 +40,8 @@ var LabelPrimitive = require('@radix-ui/react-label');
|
|
|
40
40
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
41
41
|
var TabsPrimitives = require('@radix-ui/react-tabs');
|
|
42
42
|
var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
|
|
43
|
+
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
44
|
+
var TogglePrimitive = require('@radix-ui/react-toggle');
|
|
43
45
|
var cmdk = require('cmdk');
|
|
44
46
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
45
47
|
var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
|
|
@@ -47,8 +49,6 @@ var reactTable = require('@tanstack/react-table');
|
|
|
47
49
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
48
50
|
var vaul = require('vaul');
|
|
49
51
|
var reactHookForm = require('react-hook-form');
|
|
50
|
-
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
51
|
-
var TogglePrimitive = require('@radix-ui/react-toggle');
|
|
52
52
|
var Image2 = require('next/image');
|
|
53
53
|
var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
|
54
54
|
var inputOtp = require('input-otp');
|
|
@@ -110,11 +110,11 @@ var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
|
110
110
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
111
111
|
var TabsPrimitives__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitives);
|
|
112
112
|
var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(CollapsiblePrimitive);
|
|
113
|
+
var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
|
|
114
|
+
var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive);
|
|
113
115
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
114
116
|
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
|
|
115
117
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
116
|
-
var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
|
|
117
|
-
var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive);
|
|
118
118
|
var Image2__default = /*#__PURE__*/_interopDefault(Image2);
|
|
119
119
|
var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
|
|
120
120
|
var MenubarPrimitive__namespace = /*#__PURE__*/_interopNamespace(MenubarPrimitive);
|
|
@@ -4159,7 +4159,7 @@ function AccordionContent({
|
|
|
4159
4159
|
);
|
|
4160
4160
|
}
|
|
4161
4161
|
var alertVariants = classVarianceAuthority.cva(
|
|
4162
|
-
"relative w-full rounded-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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,6 +14972,972 @@ function ColorCard({ name, token, hex: hex2, rgb: rgb2, hsl, oklch: oklch2, form
|
|
|
14972
14972
|
] })
|
|
14973
14973
|
] }) });
|
|
14974
14974
|
}
|
|
14975
|
+
var recommendedBackgroundTones = [50, 100, 200, 400, 600, 800];
|
|
14976
|
+
var AAA_NORMAL_TEXT_RATIO = 7;
|
|
14977
|
+
var MIN_DARK_BACKGROUND_TONE_FOR_WHITE = 600;
|
|
14978
|
+
var WHITE_FOREGROUND = {
|
|
14979
|
+
token: "white",
|
|
14980
|
+
name: "White",
|
|
14981
|
+
hex: "#ffffff",
|
|
14982
|
+
rgb: "rgb(255, 255, 255)",
|
|
14983
|
+
hsl: "hsl(0, 0%, 100%)",
|
|
14984
|
+
oklch: "oklch(1 0 0)",
|
|
14985
|
+
tone: 0
|
|
14986
|
+
};
|
|
14987
|
+
function extractTone(token) {
|
|
14988
|
+
const match = token.match(/-(\d+)$/);
|
|
14989
|
+
return match ? Number.parseInt(match[1], 10) : 0;
|
|
14990
|
+
}
|
|
14991
|
+
function formatFamilyLabel(name, key) {
|
|
14992
|
+
if (key === "grey") return "Grey";
|
|
14993
|
+
return name.replace(/^NSW Aboriginal\s+/i, "").replace(/^NSW\s+/i, "").trim();
|
|
14994
|
+
}
|
|
14995
|
+
function toPairingColor(color2) {
|
|
14996
|
+
return {
|
|
14997
|
+
...color2,
|
|
14998
|
+
tone: extractTone(color2.token)
|
|
14999
|
+
};
|
|
15000
|
+
}
|
|
15001
|
+
function getPreferredForegroundTone(backgroundTone) {
|
|
15002
|
+
if (backgroundTone <= 200) return 800;
|
|
15003
|
+
if (backgroundTone <= 500) return 700;
|
|
15004
|
+
if (backgroundTone <= 650) return 250;
|
|
15005
|
+
return 200;
|
|
15006
|
+
}
|
|
15007
|
+
function getPairRating(contrastRatio) {
|
|
15008
|
+
if (contrastRatio >= 7) return "AAA";
|
|
15009
|
+
if (contrastRatio >= 4.5) return "AA";
|
|
15010
|
+
return "AA Large";
|
|
15011
|
+
}
|
|
15012
|
+
function isPreferredDirection(backgroundTone, foregroundTone, preferredForegroundTone) {
|
|
15013
|
+
if (preferredForegroundTone < backgroundTone) {
|
|
15014
|
+
return foregroundTone < backgroundTone;
|
|
15015
|
+
}
|
|
15016
|
+
return foregroundTone > backgroundTone;
|
|
15017
|
+
}
|
|
15018
|
+
function buildPair(background, foreground) {
|
|
15019
|
+
const contrastRatio = culori__namespace.wcagContrast(background.hex, foreground.hex);
|
|
15020
|
+
return {
|
|
15021
|
+
id: `${background.token}:${foreground.token}`,
|
|
15022
|
+
background,
|
|
15023
|
+
foreground,
|
|
15024
|
+
contrastRatio,
|
|
15025
|
+
passes: {
|
|
15026
|
+
aaLarge: contrastRatio >= 3,
|
|
15027
|
+
aaText: contrastRatio >= 4.5,
|
|
15028
|
+
aaaLarge: contrastRatio >= 4.5,
|
|
15029
|
+
aaaText: contrastRatio >= 7
|
|
15030
|
+
},
|
|
15031
|
+
rating: getPairRating(contrastRatio)
|
|
15032
|
+
};
|
|
15033
|
+
}
|
|
15034
|
+
function pickForeground(colorsToPair, background, minimumRatio) {
|
|
15035
|
+
const preferredForegroundTone = getPreferredForegroundTone(background.tone);
|
|
15036
|
+
const passingCandidates = colorsToPair.filter((color2) => color2.token !== background.token).map((color2) => buildPair(background, color2)).filter((pair) => pair.contrastRatio >= minimumRatio);
|
|
15037
|
+
if (passingCandidates.length === 0) return null;
|
|
15038
|
+
const preferredCandidates = passingCandidates.filter(
|
|
15039
|
+
(pair) => isPreferredDirection(background.tone, pair.foreground.tone, preferredForegroundTone)
|
|
15040
|
+
);
|
|
15041
|
+
const candidates = preferredCandidates.length > 0 ? preferredCandidates : passingCandidates;
|
|
15042
|
+
return candidates.sort((left, right) => {
|
|
15043
|
+
const leftTargetDelta = Math.abs(left.foreground.tone - preferredForegroundTone);
|
|
15044
|
+
const rightTargetDelta = Math.abs(right.foreground.tone - preferredForegroundTone);
|
|
15045
|
+
if (leftTargetDelta !== rightTargetDelta) {
|
|
15046
|
+
return leftTargetDelta - rightTargetDelta;
|
|
15047
|
+
}
|
|
15048
|
+
const leftToneGap = Math.abs(left.foreground.tone - background.tone);
|
|
15049
|
+
const rightToneGap = Math.abs(right.foreground.tone - background.tone);
|
|
15050
|
+
if (leftToneGap !== rightToneGap) {
|
|
15051
|
+
return rightToneGap - leftToneGap;
|
|
15052
|
+
}
|
|
15053
|
+
return right.contrastRatio - left.contrastRatio;
|
|
15054
|
+
})[0];
|
|
15055
|
+
}
|
|
15056
|
+
function buildRecommendedPairs(colorsToPair, minimumRatio) {
|
|
15057
|
+
const backgrounds = recommendedBackgroundTones.map((tone) => colorsToPair.find((color2) => color2.tone === tone)).filter((color2) => Boolean(color2));
|
|
15058
|
+
const recommendedPairs = [];
|
|
15059
|
+
for (const background of backgrounds) {
|
|
15060
|
+
const pair = pickForeground(colorsToPair, background, minimumRatio);
|
|
15061
|
+
const whitePair = background.tone >= MIN_DARK_BACKGROUND_TONE_FOR_WHITE ? buildPair(background, WHITE_FOREGROUND) : null;
|
|
15062
|
+
if (pair && !recommendedPairs.some((item) => item.id === pair.id)) {
|
|
15063
|
+
recommendedPairs.push(pair);
|
|
15064
|
+
}
|
|
15065
|
+
if (whitePair && whitePair.contrastRatio >= minimumRatio && !recommendedPairs.some((item) => item.id === whitePair.id)) {
|
|
15066
|
+
recommendedPairs.push(whitePair);
|
|
15067
|
+
}
|
|
15068
|
+
}
|
|
15069
|
+
return recommendedPairs;
|
|
15070
|
+
}
|
|
15071
|
+
function buildRecommendedCollections(minimumRatio) {
|
|
15072
|
+
return {
|
|
15073
|
+
brand: Object.entries(colors.brand).map(([key, palette]) => {
|
|
15074
|
+
const scale2 = palette.colors.map(toPairingColor);
|
|
15075
|
+
return {
|
|
15076
|
+
key,
|
|
15077
|
+
label: formatFamilyLabel(palette.name, key),
|
|
15078
|
+
paletteName: palette.name,
|
|
15079
|
+
colors: scale2,
|
|
15080
|
+
recommendedPairs: buildRecommendedPairs(scale2, minimumRatio)
|
|
15081
|
+
};
|
|
15082
|
+
}),
|
|
15083
|
+
aboriginal: Object.entries(colors.aboriginal).map(([key, palette]) => {
|
|
15084
|
+
const scale2 = palette.colors.map(toPairingColor);
|
|
15085
|
+
return {
|
|
15086
|
+
key,
|
|
15087
|
+
label: formatFamilyLabel(palette.name, key),
|
|
15088
|
+
paletteName: palette.name,
|
|
15089
|
+
colors: scale2,
|
|
15090
|
+
recommendedPairs: buildRecommendedPairs(scale2, minimumRatio)
|
|
15091
|
+
};
|
|
15092
|
+
})
|
|
15093
|
+
};
|
|
15094
|
+
}
|
|
15095
|
+
var recommendedAaaPairingCollections = buildRecommendedCollections(AAA_NORMAL_TEXT_RATIO);
|
|
15096
|
+
function getWhiteForegroundPair(background) {
|
|
15097
|
+
return buildPair(background, WHITE_FOREGROUND);
|
|
15098
|
+
}
|
|
15099
|
+
function supportsWhiteForegroundPreview(background) {
|
|
15100
|
+
return background.tone >= MIN_DARK_BACKGROUND_TONE_FOR_WHITE;
|
|
15101
|
+
}
|
|
15102
|
+
function getPairingColorValue(color2, format) {
|
|
15103
|
+
return getColorValue(color2, format);
|
|
15104
|
+
}
|
|
15105
|
+
var styles3 = {
|
|
15106
|
+
base: [
|
|
15107
|
+
// Base
|
|
15108
|
+
"inline-flex items-center justify-center gap-2 rounded-sm text-sm font-medium bg-transparent transition-all whitespace-nowrap cursor-pointer border-(--toggle-border) [--toggle-border:var(--color-grey-200)] text-grey-800",
|
|
15109
|
+
// States
|
|
15110
|
+
"data-[state=on]:bg-grey-100 data-[state=on]:text-grey-850",
|
|
15111
|
+
// Hover
|
|
15112
|
+
"hover:bg-grey-100 hover:text-grey-850",
|
|
15113
|
+
// Focus
|
|
15114
|
+
"focus:outline focus:outline-2 focus:outline-offset-0 focus:outline-(--toggle-border)",
|
|
15115
|
+
// Dark mode
|
|
15116
|
+
"dark:text-white",
|
|
15117
|
+
// Dark mode states
|
|
15118
|
+
"dark:data-[state=on]:bg-white/10 dark:data-[state=on]:text-white",
|
|
15119
|
+
// Dark mode hover
|
|
15120
|
+
"dark:hover:bg-white/10 dark:hover:text-white",
|
|
15121
|
+
// Disabled
|
|
15122
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
15123
|
+
// Icon
|
|
15124
|
+
'[&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 [&_svg]:shrink-0',
|
|
15125
|
+
// Aria invalid
|
|
15126
|
+
"aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
|
|
15127
|
+
// Aria invalid dark mode
|
|
15128
|
+
"dark:aria-invalid:ring-destructive/40"
|
|
15129
|
+
],
|
|
15130
|
+
outline: [
|
|
15131
|
+
// Base
|
|
15132
|
+
"text-grey-800 border [--toggle-border:var(--color-grey-300)]",
|
|
15133
|
+
// States
|
|
15134
|
+
"hover:[--toggle-border:var(--color-grey-400)]",
|
|
15135
|
+
// Dark mode
|
|
15136
|
+
"dark:[--toggle-border:white]/40",
|
|
15137
|
+
// Dark mode states
|
|
15138
|
+
"dark:hover:[--toggle-border:white]/50",
|
|
15139
|
+
// Data on
|
|
15140
|
+
"data-[state=on]:bg-primary-800/10"
|
|
15141
|
+
]
|
|
15142
|
+
};
|
|
15143
|
+
var toggleVariants = classVarianceAuthority.cva(styles3.base, {
|
|
15144
|
+
variants: {
|
|
15145
|
+
variant: {
|
|
15146
|
+
ghost: "",
|
|
15147
|
+
outline: clsx12__default.default(styles3.outline)
|
|
15148
|
+
},
|
|
15149
|
+
size: {
|
|
15150
|
+
default: "h-9 px-2 min-w-9",
|
|
15151
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
15152
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
15153
|
+
}
|
|
15154
|
+
},
|
|
15155
|
+
defaultVariants: {
|
|
15156
|
+
variant: "ghost",
|
|
15157
|
+
size: "default"
|
|
15158
|
+
}
|
|
15159
|
+
});
|
|
15160
|
+
function Toggle({
|
|
15161
|
+
className,
|
|
15162
|
+
variant,
|
|
15163
|
+
size,
|
|
15164
|
+
...props
|
|
15165
|
+
}) {
|
|
15166
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15167
|
+
TogglePrimitive__namespace.Root,
|
|
15168
|
+
{
|
|
15169
|
+
"data-slot": "toggle",
|
|
15170
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
15171
|
+
...props
|
|
15172
|
+
}
|
|
15173
|
+
);
|
|
15174
|
+
}
|
|
15175
|
+
var ToggleGroupContext = React5__namespace.createContext({
|
|
15176
|
+
size: "default",
|
|
15177
|
+
variant: "ghost"
|
|
15178
|
+
});
|
|
15179
|
+
function ToggleGroup({
|
|
15180
|
+
className,
|
|
15181
|
+
variant,
|
|
15182
|
+
size,
|
|
15183
|
+
children,
|
|
15184
|
+
...props
|
|
15185
|
+
}) {
|
|
15186
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15187
|
+
ToggleGroupPrimitive__namespace.Root,
|
|
15188
|
+
{
|
|
15189
|
+
"data-slot": "toggle-group",
|
|
15190
|
+
"data-variant": variant,
|
|
15191
|
+
"data-size": size,
|
|
15192
|
+
className: cn(
|
|
15193
|
+
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
15194
|
+
className
|
|
15195
|
+
),
|
|
15196
|
+
...props,
|
|
15197
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
15198
|
+
}
|
|
15199
|
+
);
|
|
15200
|
+
}
|
|
15201
|
+
function ToggleGroupItem({
|
|
15202
|
+
className,
|
|
15203
|
+
children,
|
|
15204
|
+
variant,
|
|
15205
|
+
size,
|
|
15206
|
+
...props
|
|
15207
|
+
}) {
|
|
15208
|
+
const context = React5__namespace.useContext(ToggleGroupContext);
|
|
15209
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15210
|
+
ToggleGroupPrimitive__namespace.Item,
|
|
15211
|
+
{
|
|
15212
|
+
"data-slot": "toggle-group-item",
|
|
15213
|
+
"data-variant": context.variant || variant,
|
|
15214
|
+
"data-size": context.size || size,
|
|
15215
|
+
className: cn(
|
|
15216
|
+
toggleVariants({
|
|
15217
|
+
variant: context.variant || variant,
|
|
15218
|
+
size: context.size || size
|
|
15219
|
+
}),
|
|
15220
|
+
"min-w-0 shrink-0 rounded-none shadow-none first:rounded-l-sm last:rounded-r-sm focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
15221
|
+
className
|
|
15222
|
+
),
|
|
15223
|
+
...props,
|
|
15224
|
+
children
|
|
15225
|
+
}
|
|
15226
|
+
);
|
|
15227
|
+
}
|
|
15228
|
+
function FormatToggle({ format, setFormat }) {
|
|
15229
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
15230
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Format:" }),
|
|
15231
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15232
|
+
ToggleGroup,
|
|
15233
|
+
{
|
|
15234
|
+
type: "single",
|
|
15235
|
+
value: format,
|
|
15236
|
+
onValueChange: (value) => value && setFormat(value),
|
|
15237
|
+
children: [
|
|
15238
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToggleGroupItem, { value: "hex", "aria-label": "HEX format", children: "HEX" }),
|
|
15239
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToggleGroupItem, { value: "rgb", "aria-label": "RGB format", children: "RGB" }),
|
|
15240
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToggleGroupItem, { value: "hsl", "aria-label": "HSL format", children: "HSL" }),
|
|
15241
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToggleGroupItem, { value: "oklch", "aria-label": "OKLCH format", children: "OKLCH" })
|
|
15242
|
+
]
|
|
15243
|
+
}
|
|
15244
|
+
)
|
|
15245
|
+
] });
|
|
15246
|
+
}
|
|
15247
|
+
function getPreferredFamilyKey(families) {
|
|
15248
|
+
return families.find((family) => family.key === "green")?.key ?? families[0]?.key ?? "";
|
|
15249
|
+
}
|
|
15250
|
+
function getDefaultPair(family) {
|
|
15251
|
+
if (!family || family.recommendedPairs.length === 0) return null;
|
|
15252
|
+
return family.recommendedPairs.reduce((bestPair, pair) => {
|
|
15253
|
+
const bestDelta = Math.abs(bestPair.background.tone - 600);
|
|
15254
|
+
const currentDelta = Math.abs(pair.background.tone - 600);
|
|
15255
|
+
return currentDelta < bestDelta ? pair : bestPair;
|
|
15256
|
+
}, family.recommendedPairs[0]);
|
|
15257
|
+
}
|
|
15258
|
+
function getFamilySwatchColor(family) {
|
|
15259
|
+
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";
|
|
15260
|
+
}
|
|
15261
|
+
function getToneFromToken(token) {
|
|
15262
|
+
if (!token) return null;
|
|
15263
|
+
const match = token.match(/-(\d+)$/);
|
|
15264
|
+
return match ? Number.parseInt(match[1], 10) : null;
|
|
15265
|
+
}
|
|
15266
|
+
function isApprovedBackgroundTone(color2) {
|
|
15267
|
+
return recommendedBackgroundTones.includes(
|
|
15268
|
+
color2.tone
|
|
15269
|
+
);
|
|
15270
|
+
}
|
|
15271
|
+
function getBackgroundOptions(family) {
|
|
15272
|
+
return family?.colors.filter(isApprovedBackgroundTone) ?? [];
|
|
15273
|
+
}
|
|
15274
|
+
function isWhiteForegroundPair(pair) {
|
|
15275
|
+
return pair.foreground.token === "white";
|
|
15276
|
+
}
|
|
15277
|
+
function getRecommendedPairForBackground(family, backgroundToken, preferredPairId) {
|
|
15278
|
+
if (!family) return null;
|
|
15279
|
+
const backgroundPairs = family.recommendedPairs.filter(
|
|
15280
|
+
(pair) => pair.background.token === backgroundToken
|
|
15281
|
+
);
|
|
15282
|
+
if (backgroundPairs.length === 0) return null;
|
|
15283
|
+
if (preferredPairId) {
|
|
15284
|
+
const preferredPair = backgroundPairs.find((pair) => pair.id === preferredPairId);
|
|
15285
|
+
if (preferredPair) {
|
|
15286
|
+
return preferredPair;
|
|
15287
|
+
}
|
|
15288
|
+
}
|
|
15289
|
+
return backgroundPairs.find((pair) => !isWhiteForegroundPair(pair)) ?? backgroundPairs[0];
|
|
15290
|
+
}
|
|
15291
|
+
function getFallbackBackgroundToken(family, preferredTone) {
|
|
15292
|
+
const backgroundOptions = getBackgroundOptions(family);
|
|
15293
|
+
if (preferredTone) {
|
|
15294
|
+
const preferredBackground = backgroundOptions.find((color2) => color2.tone === preferredTone);
|
|
15295
|
+
if (preferredBackground) {
|
|
15296
|
+
return preferredBackground.token;
|
|
15297
|
+
}
|
|
15298
|
+
}
|
|
15299
|
+
return getDefaultPair(family)?.background.token ?? backgroundOptions[0]?.token ?? "";
|
|
15300
|
+
}
|
|
15301
|
+
function ColorPairingToolLoading() {
|
|
15302
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "animate-pulse space-y-6", children: [
|
|
15303
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-40 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
|
|
15304
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-6 xl:grid-cols-[minmax(0,1.3fr)_minmax(20rem,0.9fr)]", children: [
|
|
15305
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-96 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" }),
|
|
15306
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-96 rounded-sm border border-grey-200 bg-grey-50 dark:border-grey-700 dark:bg-grey-900" })
|
|
15307
|
+
] })
|
|
15308
|
+
] });
|
|
15309
|
+
}
|
|
15310
|
+
function getInitialPairingState(searchParams) {
|
|
15311
|
+
const paletteParam = searchParams.get("palette");
|
|
15312
|
+
const familyParam = searchParams.get("family");
|
|
15313
|
+
const pairParam = searchParams.get("pair");
|
|
15314
|
+
const backgroundParam = searchParams.get("background");
|
|
15315
|
+
const themeCategory = paletteParam === "brand" || paletteParam === "aboriginal" ? paletteParam : "brand";
|
|
15316
|
+
const families = recommendedAaaPairingCollections[themeCategory];
|
|
15317
|
+
const familyKey = families.some((family) => family.key === familyParam) ? familyParam : getPreferredFamilyKey(families);
|
|
15318
|
+
const activeFamily = families.find((family) => family.key === familyKey) ?? families[0];
|
|
15319
|
+
const backgroundOptions = getBackgroundOptions(activeFamily);
|
|
15320
|
+
const pairBackgroundToken = activeFamily?.recommendedPairs.find((pair) => pair.id === pairParam)?.background.token ?? null;
|
|
15321
|
+
const selectedBackgroundToken = backgroundOptions.some((color2) => color2.token === backgroundParam) ? backgroundParam : getFallbackBackgroundToken(
|
|
15322
|
+
activeFamily,
|
|
15323
|
+
getToneFromToken(backgroundParam ?? pairBackgroundToken)
|
|
15324
|
+
);
|
|
15325
|
+
const selectedPairId = getRecommendedPairForBackground(activeFamily, selectedBackgroundToken, pairParam)?.id ?? "";
|
|
15326
|
+
return { familyKey, selectedBackgroundToken, selectedPairId, themeCategory };
|
|
15327
|
+
}
|
|
15328
|
+
function PairPreview({
|
|
15329
|
+
family,
|
|
15330
|
+
isRecommended,
|
|
15331
|
+
pair
|
|
15332
|
+
}) {
|
|
15333
|
+
const whiteForeground = isWhiteForegroundPair(pair);
|
|
15334
|
+
const statusLabel = isRecommended ? "Pass" : pair.passes.aaaLarge ? "Large text only" : "Example only";
|
|
15335
|
+
const StatusIcon = isRecommended ? Icons.check : Icons.info;
|
|
15336
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15337
|
+
"div",
|
|
15338
|
+
{
|
|
15339
|
+
className: "p-6 sm:min-h-[26rem] sm:p-8",
|
|
15340
|
+
style: {
|
|
15341
|
+
backgroundColor: pair.background.hex,
|
|
15342
|
+
color: pair.foreground.hex
|
|
15343
|
+
},
|
|
15344
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-[22rem] flex-col justify-between gap-8", children: [
|
|
15345
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
15346
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15347
|
+
"span",
|
|
15348
|
+
{
|
|
15349
|
+
className: "inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[0.72rem] font-semibold tracking-[0.16em] uppercase",
|
|
15350
|
+
style: {
|
|
15351
|
+
borderColor: pair.foreground.hex,
|
|
15352
|
+
backgroundColor: pair.foreground.hex,
|
|
15353
|
+
color: pair.background.hex
|
|
15354
|
+
},
|
|
15355
|
+
children: [
|
|
15356
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.palette, { "data-slot": "icon", className: "size-4" }),
|
|
15357
|
+
family.label
|
|
15358
|
+
]
|
|
15359
|
+
}
|
|
15360
|
+
),
|
|
15361
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15362
|
+
"span",
|
|
15363
|
+
{
|
|
15364
|
+
className: "inline-flex rounded-full border px-3 py-1 text-[0.72rem] font-semibold tracking-[0.16em] uppercase",
|
|
15365
|
+
style: {
|
|
15366
|
+
borderColor: pair.foreground.hex
|
|
15367
|
+
},
|
|
15368
|
+
children: [
|
|
15369
|
+
pair.rating,
|
|
15370
|
+
" ",
|
|
15371
|
+
pair.contrastRatio.toFixed(2),
|
|
15372
|
+
":1"
|
|
15373
|
+
]
|
|
15374
|
+
}
|
|
15375
|
+
)
|
|
15376
|
+
] }),
|
|
15377
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-xl space-y-4 pb-12 sm:pb-16", children: [
|
|
15378
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: whiteForeground && !isRecommended ? "White on colour example" : whiteForeground ? "White on colour" : "Tone on tone" }),
|
|
15379
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
15380
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "max-w-lg text-4xl leading-none font-bold text-current sm:text-5xl", children: "Pair colour with confidence." }),
|
|
15381
|
+
/* @__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 tone-on-tone combinations for headings, body copy, and calls to action on colour." })
|
|
15382
|
+
] })
|
|
15383
|
+
] }),
|
|
15384
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
15385
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15386
|
+
"span",
|
|
15387
|
+
{
|
|
15388
|
+
className: "inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-semibold",
|
|
15389
|
+
style: {
|
|
15390
|
+
backgroundColor: pair.foreground.hex,
|
|
15391
|
+
color: pair.background.hex
|
|
15392
|
+
},
|
|
15393
|
+
children: [
|
|
15394
|
+
statusLabel,
|
|
15395
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { "data-slot": "icon", className: "size-4" })
|
|
15396
|
+
]
|
|
15397
|
+
}
|
|
15398
|
+
),
|
|
15399
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15400
|
+
"span",
|
|
15401
|
+
{
|
|
15402
|
+
className: "inline-flex rounded-full border px-4 py-2 text-sm",
|
|
15403
|
+
style: {
|
|
15404
|
+
borderColor: pair.foreground.hex
|
|
15405
|
+
},
|
|
15406
|
+
children: [
|
|
15407
|
+
pair.background.token,
|
|
15408
|
+
" / ",
|
|
15409
|
+
pair.foreground.token
|
|
15410
|
+
]
|
|
15411
|
+
}
|
|
15412
|
+
)
|
|
15413
|
+
] })
|
|
15414
|
+
] })
|
|
15415
|
+
}
|
|
15416
|
+
) });
|
|
15417
|
+
}
|
|
15418
|
+
function PairDetailCard({
|
|
15419
|
+
color: color2,
|
|
15420
|
+
format,
|
|
15421
|
+
role
|
|
15422
|
+
}) {
|
|
15423
|
+
const [, copyToClipboardRaw] = usehooks.useCopyToClipboard();
|
|
15424
|
+
const [copiedField, setCopiedField] = React5.useState(null);
|
|
15425
|
+
const valueLabel = format.toUpperCase();
|
|
15426
|
+
const formattedValue = getPairingColorValue(color2, format);
|
|
15427
|
+
const copyField = (field) => {
|
|
15428
|
+
const fieldValue = field === "token" ? color2.token : field === "tone" ? String(color2.tone) : formattedValue;
|
|
15429
|
+
copyToClipboardRaw(fieldValue);
|
|
15430
|
+
setCopiedField(field);
|
|
15431
|
+
const toastLabel = field === "token" ? "Token" : field === "tone" ? "Tone" : `${valueLabel} value`;
|
|
15432
|
+
sonner.toast(`${toastLabel} copied to clipboard`, {
|
|
15433
|
+
duration: 2e3
|
|
15434
|
+
});
|
|
15435
|
+
setTimeout(() => setCopiedField(null), 2e3);
|
|
15436
|
+
};
|
|
15437
|
+
const renderCopyButton = (field, srLabel, className) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15438
|
+
Button2,
|
|
15439
|
+
{
|
|
15440
|
+
variant: "ghost",
|
|
15441
|
+
size: "icon",
|
|
15442
|
+
className: cn("shrink-0", className),
|
|
15443
|
+
onClick: () => copyField(field),
|
|
15444
|
+
children: [
|
|
15445
|
+
copiedField === field ? /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { "data-slot": "icon", className: "size-5" }) : /* @__PURE__ */ jsxRuntime.jsx(Icons.content_copy, { "data-slot": "icon", className: "size-5" }),
|
|
15446
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: srLabel })
|
|
15447
|
+
]
|
|
15448
|
+
}
|
|
15449
|
+
);
|
|
15450
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "gap-4", children: [
|
|
15451
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { className: "gap-3 border-b", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
15452
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15453
|
+
"div",
|
|
15454
|
+
{
|
|
15455
|
+
className: "size-14 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
|
|
15456
|
+
style: { backgroundColor: color2.hex }
|
|
15457
|
+
}
|
|
15458
|
+
),
|
|
15459
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
15460
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: role }),
|
|
15461
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: color2.name ?? color2.token })
|
|
15462
|
+
] })
|
|
15463
|
+
] }) }),
|
|
15464
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "grid gap-4", children: [
|
|
15465
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
15466
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
15467
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Token" }),
|
|
15468
|
+
renderCopyButton("token", `Copy ${role.toLowerCase()} token`)
|
|
15469
|
+
] }),
|
|
15470
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-mono text-base break-all", children: color2.token })
|
|
15471
|
+
] }),
|
|
15472
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
15473
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
15474
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Tone" }),
|
|
15475
|
+
renderCopyButton("tone", `Copy ${role.toLowerCase()} tone`)
|
|
15476
|
+
] }),
|
|
15477
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium", children: color2.tone })
|
|
15478
|
+
] }),
|
|
15479
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
15480
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
15481
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: valueLabel }),
|
|
15482
|
+
renderCopyButton("value", `Copy ${role.toLowerCase()} ${valueLabel} value`)
|
|
15483
|
+
] }),
|
|
15484
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-mono text-sm break-all", children: formattedValue })
|
|
15485
|
+
] })
|
|
15486
|
+
] })
|
|
15487
|
+
] });
|
|
15488
|
+
}
|
|
15489
|
+
function ComplianceRow({
|
|
15490
|
+
label,
|
|
15491
|
+
passes,
|
|
15492
|
+
threshold
|
|
15493
|
+
}) {
|
|
15494
|
+
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: [
|
|
15495
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
15496
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium", children: label }),
|
|
15497
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: threshold })
|
|
15498
|
+
] }),
|
|
15499
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15500
|
+
"span",
|
|
15501
|
+
{
|
|
15502
|
+
className: cn(
|
|
15503
|
+
"inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-semibold",
|
|
15504
|
+
passes ? "bg-success-50 text-success-800 dark:bg-success-950/30 dark:text-success-200" : "bg-danger-50 text-danger-800 dark:bg-danger-950/30 dark:text-danger-200"
|
|
15505
|
+
),
|
|
15506
|
+
children: [
|
|
15507
|
+
passes ? /* @__PURE__ */ jsxRuntime.jsx(Icons.check, { "data-slot": "icon", className: "size-4" }) : /* @__PURE__ */ jsxRuntime.jsx(Icons.close, { "data-slot": "icon", className: "size-4" }),
|
|
15508
|
+
passes ? "Pass" : "Fail"
|
|
15509
|
+
]
|
|
15510
|
+
}
|
|
15511
|
+
)
|
|
15512
|
+
] });
|
|
15513
|
+
}
|
|
15514
|
+
function PairComplianceCard({ pair }) {
|
|
15515
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
15516
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
|
|
15517
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "AAA compliance" }),
|
|
15518
|
+
/* @__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." })
|
|
15519
|
+
] }),
|
|
15520
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-3", children: [
|
|
15521
|
+
/* @__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: [
|
|
15522
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Contrast ratio" }),
|
|
15523
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-1 text-2xl font-semibold", children: [
|
|
15524
|
+
pair.contrastRatio.toFixed(2),
|
|
15525
|
+
":1"
|
|
15526
|
+
] })
|
|
15527
|
+
] }),
|
|
15528
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15529
|
+
ComplianceRow,
|
|
15530
|
+
{
|
|
15531
|
+
label: "AAA normal text",
|
|
15532
|
+
passes: pair.passes.aaaText,
|
|
15533
|
+
threshold: "7.0:1 or higher"
|
|
15534
|
+
}
|
|
15535
|
+
),
|
|
15536
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15537
|
+
ComplianceRow,
|
|
15538
|
+
{
|
|
15539
|
+
label: "AAA large text",
|
|
15540
|
+
passes: pair.passes.aaaLarge,
|
|
15541
|
+
threshold: "4.5:1 or higher"
|
|
15542
|
+
}
|
|
15543
|
+
)
|
|
15544
|
+
] })
|
|
15545
|
+
] });
|
|
15546
|
+
}
|
|
15547
|
+
function WhiteTextExampleCard({ pair }) {
|
|
15548
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
15549
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
|
|
15550
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "White text example" }),
|
|
15551
|
+
/* @__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." })
|
|
15552
|
+
] }),
|
|
15553
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "grid gap-6 xl:grid-cols-[minmax(0,1.1fr)_minmax(18rem,0.9fr)]", children: [
|
|
15554
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15555
|
+
"div",
|
|
15556
|
+
{
|
|
15557
|
+
className: "rounded-sm border border-grey-200 p-6 dark:border-grey-700",
|
|
15558
|
+
style: {
|
|
15559
|
+
backgroundColor: pair.background.hex,
|
|
15560
|
+
color: pair.foreground.hex
|
|
15561
|
+
},
|
|
15562
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
15563
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
15564
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg leading-tight font-semibold", children: "Large text example" }),
|
|
15565
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm/6", children: [
|
|
15566
|
+
"White text on ",
|
|
15567
|
+
pair.background.token
|
|
15568
|
+
] })
|
|
15569
|
+
] }),
|
|
15570
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-sm/6", children: [
|
|
15571
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
15572
|
+
"AAA normal text: ",
|
|
15573
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: pair.passes.aaaText ? "pass" : "fail" })
|
|
15574
|
+
] }),
|
|
15575
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
15576
|
+
"AAA large text: ",
|
|
15577
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: pair.passes.aaaLarge ? "pass" : "fail" })
|
|
15578
|
+
] })
|
|
15579
|
+
] })
|
|
15580
|
+
] })
|
|
15581
|
+
}
|
|
15582
|
+
),
|
|
15583
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
15584
|
+
/* @__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: [
|
|
15585
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold tracking-[0.16em] text-muted-foreground uppercase", children: "Contrast ratio" }),
|
|
15586
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-1 text-2xl font-semibold", children: [
|
|
15587
|
+
pair.contrastRatio.toFixed(2),
|
|
15588
|
+
":1"
|
|
15589
|
+
] })
|
|
15590
|
+
] }),
|
|
15591
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15592
|
+
ComplianceRow,
|
|
15593
|
+
{
|
|
15594
|
+
label: "AAA normal text",
|
|
15595
|
+
passes: pair.passes.aaaText,
|
|
15596
|
+
threshold: "7.0:1 or higher"
|
|
15597
|
+
}
|
|
15598
|
+
),
|
|
15599
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15600
|
+
ComplianceRow,
|
|
15601
|
+
{
|
|
15602
|
+
label: "AAA large text",
|
|
15603
|
+
passes: pair.passes.aaaLarge,
|
|
15604
|
+
threshold: "4.5:1 or higher"
|
|
15605
|
+
}
|
|
15606
|
+
)
|
|
15607
|
+
] })
|
|
15608
|
+
] })
|
|
15609
|
+
] });
|
|
15610
|
+
}
|
|
15611
|
+
function ColorPairingToolContent() {
|
|
15612
|
+
const searchParams = navigation.useSearchParams();
|
|
15613
|
+
const {
|
|
15614
|
+
familyKey: initialFamilyKey,
|
|
15615
|
+
selectedBackgroundToken: initialSelectedBackgroundToken,
|
|
15616
|
+
selectedPairId: initialSelectedPairId,
|
|
15617
|
+
themeCategory: initialThemeCategory
|
|
15618
|
+
} = getInitialPairingState(searchParams);
|
|
15619
|
+
const [themeCategory, setThemeCategory] = React5.useState(initialThemeCategory);
|
|
15620
|
+
const [format, setFormat] = React5.useState("hex");
|
|
15621
|
+
const [activeFamilyKey, setActiveFamilyKey] = React5.useState(initialFamilyKey);
|
|
15622
|
+
const [selectedBackgroundToken, setSelectedBackgroundToken] = React5.useState(
|
|
15623
|
+
initialSelectedBackgroundToken
|
|
15624
|
+
);
|
|
15625
|
+
const [selectedPairId, setSelectedPairId] = React5.useState(initialSelectedPairId);
|
|
15626
|
+
const families = recommendedAaaPairingCollections[themeCategory];
|
|
15627
|
+
const resolvedActiveFamilyKey = families.some((family) => family.key === activeFamilyKey) ? activeFamilyKey : getPreferredFamilyKey(families);
|
|
15628
|
+
const activeFamily = families.find((family) => family.key === resolvedActiveFamilyKey) ?? families[0];
|
|
15629
|
+
const backgroundOptions = getBackgroundOptions(activeFamily);
|
|
15630
|
+
const selectedBackground = backgroundOptions.find((color2) => color2.token === selectedBackgroundToken) ?? backgroundOptions[0] ?? activeFamily?.colors[0] ?? null;
|
|
15631
|
+
const selectedPair = selectedBackground ? getRecommendedPairForBackground(activeFamily, selectedBackground.token, selectedPairId) : null;
|
|
15632
|
+
const whiteForegroundExample = selectedBackground && supportsWhiteForegroundPreview(selectedBackground) ? getWhiteForegroundPair(selectedBackground) : null;
|
|
15633
|
+
const previewPair = selectedPair ?? whiteForegroundExample;
|
|
15634
|
+
const showWhiteForegroundExample = Boolean(whiteForegroundExample) && (!selectedPair || selectedPair.foreground.token !== "white");
|
|
15635
|
+
const detailForeground = selectedPair?.foreground ?? whiteForegroundExample?.foreground ?? null;
|
|
15636
|
+
const updateUrlParams = (nextThemeCategory, nextFamilyKey, nextSelectedBackgroundToken, nextSelectedPairId) => {
|
|
15637
|
+
const params = new URLSearchParams(window.location.search);
|
|
15638
|
+
params.set("palette", nextThemeCategory);
|
|
15639
|
+
params.set("family", nextFamilyKey);
|
|
15640
|
+
params.set("background", nextSelectedBackgroundToken);
|
|
15641
|
+
if (nextSelectedPairId) {
|
|
15642
|
+
params.set("pair", nextSelectedPairId);
|
|
15643
|
+
} else {
|
|
15644
|
+
params.delete("pair");
|
|
15645
|
+
}
|
|
15646
|
+
window.history.replaceState(
|
|
15647
|
+
null,
|
|
15648
|
+
"",
|
|
15649
|
+
`${window.location.pathname}?${params.toString()}${window.location.hash}`
|
|
15650
|
+
);
|
|
15651
|
+
};
|
|
15652
|
+
const handleThemeCategoryChange = (nextThemeCategory) => {
|
|
15653
|
+
const nextFamilies = recommendedAaaPairingCollections[nextThemeCategory];
|
|
15654
|
+
const nextFamilyKey = nextFamilies.some((family) => family.key === activeFamilyKey) ? activeFamilyKey : getPreferredFamilyKey(nextFamilies);
|
|
15655
|
+
const nextActiveFamily = nextFamilies.find((family) => family.key === nextFamilyKey) ?? nextFamilies[0];
|
|
15656
|
+
const nextSelectedBackgroundToken = getFallbackBackgroundToken(
|
|
15657
|
+
nextActiveFamily,
|
|
15658
|
+
getToneFromToken(selectedBackgroundToken)
|
|
15659
|
+
);
|
|
15660
|
+
const nextSelectedPair = getRecommendedPairForBackground(
|
|
15661
|
+
nextActiveFamily,
|
|
15662
|
+
nextSelectedBackgroundToken,
|
|
15663
|
+
selectedPairId
|
|
15664
|
+
);
|
|
15665
|
+
setThemeCategory(nextThemeCategory);
|
|
15666
|
+
setActiveFamilyKey(nextFamilyKey);
|
|
15667
|
+
setSelectedBackgroundToken(nextSelectedBackgroundToken);
|
|
15668
|
+
setSelectedPairId(nextSelectedPair?.id ?? "");
|
|
15669
|
+
updateUrlParams(
|
|
15670
|
+
nextThemeCategory,
|
|
15671
|
+
nextFamilyKey,
|
|
15672
|
+
nextSelectedBackgroundToken,
|
|
15673
|
+
nextSelectedPair?.id ?? ""
|
|
15674
|
+
);
|
|
15675
|
+
};
|
|
15676
|
+
const handleFamilyChange = (nextFamilyKey) => {
|
|
15677
|
+
const nextActiveFamily = families.find((family) => family.key === nextFamilyKey);
|
|
15678
|
+
const nextSelectedBackgroundToken = getFallbackBackgroundToken(
|
|
15679
|
+
nextActiveFamily,
|
|
15680
|
+
getToneFromToken(selectedBackgroundToken)
|
|
15681
|
+
);
|
|
15682
|
+
const nextSelectedPair = getRecommendedPairForBackground(
|
|
15683
|
+
nextActiveFamily,
|
|
15684
|
+
nextSelectedBackgroundToken,
|
|
15685
|
+
selectedPairId
|
|
15686
|
+
);
|
|
15687
|
+
setActiveFamilyKey(nextFamilyKey);
|
|
15688
|
+
setSelectedBackgroundToken(nextSelectedBackgroundToken);
|
|
15689
|
+
setSelectedPairId(nextSelectedPair?.id ?? "");
|
|
15690
|
+
updateUrlParams(
|
|
15691
|
+
themeCategory,
|
|
15692
|
+
nextFamilyKey,
|
|
15693
|
+
nextSelectedBackgroundToken,
|
|
15694
|
+
nextSelectedPair?.id ?? ""
|
|
15695
|
+
);
|
|
15696
|
+
};
|
|
15697
|
+
const handleBackgroundChange = (nextSelectedBackgroundToken) => {
|
|
15698
|
+
const nextSelectedPair = getRecommendedPairForBackground(
|
|
15699
|
+
activeFamily,
|
|
15700
|
+
nextSelectedBackgroundToken,
|
|
15701
|
+
selectedPairId
|
|
15702
|
+
);
|
|
15703
|
+
setSelectedBackgroundToken(nextSelectedBackgroundToken);
|
|
15704
|
+
setSelectedPairId(nextSelectedPair?.id ?? "");
|
|
15705
|
+
updateUrlParams(
|
|
15706
|
+
themeCategory,
|
|
15707
|
+
resolvedActiveFamilyKey,
|
|
15708
|
+
nextSelectedBackgroundToken,
|
|
15709
|
+
nextSelectedPair?.id ?? ""
|
|
15710
|
+
);
|
|
15711
|
+
};
|
|
15712
|
+
const handlePairChange = (nextSelectedPairId) => {
|
|
15713
|
+
const nextSelectedPair = activeFamily?.recommendedPairs.find((pair) => pair.id === nextSelectedPairId) ?? null;
|
|
15714
|
+
if (!nextSelectedPair) return;
|
|
15715
|
+
setSelectedBackgroundToken(nextSelectedPair.background.token);
|
|
15716
|
+
setSelectedPairId(nextSelectedPairId);
|
|
15717
|
+
updateUrlParams(
|
|
15718
|
+
themeCategory,
|
|
15719
|
+
resolvedActiveFamilyKey,
|
|
15720
|
+
nextSelectedPair.background.token,
|
|
15721
|
+
nextSelectedPairId
|
|
15722
|
+
);
|
|
15723
|
+
};
|
|
15724
|
+
if (!activeFamily || !selectedBackground) {
|
|
15725
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { children: [
|
|
15726
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "No approved background tones available" }),
|
|
15727
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "No approved tones are available for the current palette." })
|
|
15728
|
+
] }) });
|
|
15729
|
+
}
|
|
15730
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
15731
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
15732
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
15733
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Palette:" }),
|
|
15734
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15735
|
+
SegmentedControl,
|
|
15736
|
+
{
|
|
15737
|
+
value: themeCategory,
|
|
15738
|
+
onValueChange: (value) => handleThemeCategoryChange(value),
|
|
15739
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(SegmentedControlList, { className: "w-full sm:w-fit", children: [
|
|
15740
|
+
/* @__PURE__ */ jsxRuntime.jsx(SegmentedControlTrigger, { value: "brand", children: "Brand palette" }),
|
|
15741
|
+
/* @__PURE__ */ jsxRuntime.jsx(SegmentedControlTrigger, { value: "aboriginal", children: "Aboriginal palette" })
|
|
15742
|
+
] })
|
|
15743
|
+
}
|
|
15744
|
+
)
|
|
15745
|
+
] }),
|
|
15746
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormatToggle, { format, setFormat })
|
|
15747
|
+
] }),
|
|
15748
|
+
/* @__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) => {
|
|
15749
|
+
const isActive = family.key === resolvedActiveFamilyKey;
|
|
15750
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15751
|
+
"button",
|
|
15752
|
+
{
|
|
15753
|
+
type: "button",
|
|
15754
|
+
onClick: () => handleFamilyChange(family.key),
|
|
15755
|
+
className: cn(
|
|
15756
|
+
"group relative flex w-full items-center gap-3 rounded-sm border px-3 py-2 text-left transition-colors",
|
|
15757
|
+
"border-grey-200 bg-background hover:bg-primary-800/10 hover:text-foreground dark:hover:bg-white/10",
|
|
15758
|
+
isActive && "border-grey-800 dark:border-grey-400"
|
|
15759
|
+
),
|
|
15760
|
+
children: [
|
|
15761
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15762
|
+
"span",
|
|
15763
|
+
{
|
|
15764
|
+
className: "size-4 shrink-0 rounded-full",
|
|
15765
|
+
style: { backgroundColor: getFamilySwatchColor(family) }
|
|
15766
|
+
}
|
|
15767
|
+
),
|
|
15768
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", children: family.label })
|
|
15769
|
+
]
|
|
15770
|
+
},
|
|
15771
|
+
family.key
|
|
15772
|
+
);
|
|
15773
|
+
}) }) }),
|
|
15774
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
15775
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid items-start gap-6 xl:grid-cols-[minmax(0,1.5fr)_minmax(17rem,0.68fr)]", children: [
|
|
15776
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
|
|
15777
|
+
previewPair ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15778
|
+
PairPreview,
|
|
15779
|
+
{
|
|
15780
|
+
family: activeFamily,
|
|
15781
|
+
isRecommended: Boolean(selectedPair),
|
|
15782
|
+
pair: previewPair
|
|
15783
|
+
}
|
|
15784
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "gap-0 overflow-hidden py-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15785
|
+
"div",
|
|
15786
|
+
{
|
|
15787
|
+
className: "p-6 sm:min-h-[26rem] sm:p-8",
|
|
15788
|
+
style: {
|
|
15789
|
+
backgroundColor: selectedBackground.hex,
|
|
15790
|
+
color: selectedBackground.tone >= 600 ? "#ffffff" : "#002664"
|
|
15791
|
+
},
|
|
15792
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-[22rem] flex-col justify-between gap-8", children: [
|
|
15793
|
+
/* @__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: [
|
|
15794
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.palette, { "data-slot": "icon", className: "size-4" }),
|
|
15795
|
+
activeFamily.label
|
|
15796
|
+
] }) }),
|
|
15797
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-xl space-y-4 pb-12 sm:pb-16", children: [
|
|
15798
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold tracking-[0.22em] uppercase", children: "Approved background" }),
|
|
15799
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
15800
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "max-w-lg text-4xl leading-none font-bold text-current sm:text-5xl", children: "Pair colour with confidence." }),
|
|
15801
|
+
/* @__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." })
|
|
15802
|
+
] })
|
|
15803
|
+
] }),
|
|
15804
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
15805
|
+
/* @__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: [
|
|
15806
|
+
"No recommendation",
|
|
15807
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.info, { "data-slot": "icon", className: "size-4" })
|
|
15808
|
+
] }),
|
|
15809
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex rounded-full border border-current px-4 py-2 text-sm", children: selectedBackground.token })
|
|
15810
|
+
] })
|
|
15811
|
+
] })
|
|
15812
|
+
}
|
|
15813
|
+
) }),
|
|
15814
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
|
|
15815
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
|
|
15816
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "Background tone strip" }),
|
|
15817
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "Only approved background tones are shown. Filled chips have a recommended AAA foreground pair, and dark backgrounds may also offer white text where it passes AAA." })
|
|
15818
|
+
] }),
|
|
15819
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-4", children: [
|
|
15820
|
+
/* @__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: backgroundOptions.map((color2) => {
|
|
15821
|
+
const pair = getRecommendedPairForBackground(activeFamily, color2.token);
|
|
15822
|
+
const hasWhiteExample = supportsWhiteForegroundPreview(color2);
|
|
15823
|
+
const isSelected = selectedBackground.token === color2.token;
|
|
15824
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15825
|
+
"button",
|
|
15826
|
+
{
|
|
15827
|
+
type: "button",
|
|
15828
|
+
onClick: () => handleBackgroundChange(color2.token),
|
|
15829
|
+
className: cn(
|
|
15830
|
+
"group relative h-12 rounded-sm border border-grey-200 transition-transform hover:scale-[1.03] dark:border-grey-700",
|
|
15831
|
+
isSelected && "ring-2 ring-primary-500 ring-offset-2 ring-offset-background"
|
|
15832
|
+
),
|
|
15833
|
+
style: { backgroundColor: color2.hex },
|
|
15834
|
+
children: [
|
|
15835
|
+
pair ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15836
|
+
"span",
|
|
15837
|
+
{
|
|
15838
|
+
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",
|
|
15839
|
+
style: { backgroundColor: pair.foreground.hex }
|
|
15840
|
+
}
|
|
15841
|
+
) : null,
|
|
15842
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "sr-only", children: [
|
|
15843
|
+
color2.token,
|
|
15844
|
+
pair ? ` paired with ${pair.foreground.token}` : hasWhiteExample ? " has a white text example in this tool" : " has no recommended pair in this tool"
|
|
15845
|
+
] })
|
|
15846
|
+
]
|
|
15847
|
+
},
|
|
15848
|
+
color2.token
|
|
15849
|
+
);
|
|
15850
|
+
}) }),
|
|
15851
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4 text-sm text-muted-foreground", children: [
|
|
15852
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
15853
|
+
"Selected background:",
|
|
15854
|
+
" ",
|
|
15855
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-foreground", children: selectedBackground.token })
|
|
15856
|
+
] }),
|
|
15857
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
15858
|
+
selectedPair ? "Recommended foreground:" : "White text example:",
|
|
15859
|
+
" ",
|
|
15860
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-foreground", children: selectedPair?.foreground.token ?? whiteForegroundExample?.foreground.token ?? "None" })
|
|
15861
|
+
] })
|
|
15862
|
+
] })
|
|
15863
|
+
] })
|
|
15864
|
+
] }),
|
|
15865
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
15866
|
+
/* @__PURE__ */ jsxRuntime.jsx(PairDetailCard, { color: selectedBackground, format, role: "Background" }),
|
|
15867
|
+
detailForeground ? /* @__PURE__ */ jsxRuntime.jsx(PairDetailCard, { color: detailForeground, format, role: "Foreground" }) : /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "gap-4", children: [
|
|
15868
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardHeader, { className: "gap-3 border-b", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
15869
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { children: "Foreground" }),
|
|
15870
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "No recommended foreground available" })
|
|
15871
|
+
] }) }),
|
|
15872
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Select another approved tone or review the recommended pairs list for the same family." }) })
|
|
15873
|
+
] })
|
|
15874
|
+
] })
|
|
15875
|
+
] }),
|
|
15876
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "h-fit", children: [
|
|
15877
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-2 border-b", children: [
|
|
15878
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: "Recommended pairs" }),
|
|
15879
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: "Recommended AAA combinations for this family, including white on eligible dark backgrounds." })
|
|
15880
|
+
] }),
|
|
15881
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "grid gap-3", children: activeFamily.recommendedPairs.map((pair) => {
|
|
15882
|
+
const isActive = selectedPair?.id === pair.id;
|
|
15883
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15884
|
+
"button",
|
|
15885
|
+
{
|
|
15886
|
+
type: "button",
|
|
15887
|
+
onClick: () => handlePairChange(pair.id),
|
|
15888
|
+
className: cn(
|
|
15889
|
+
"rounded-sm border p-4 text-left transition-colors",
|
|
15890
|
+
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"
|
|
15891
|
+
),
|
|
15892
|
+
children: [
|
|
15893
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
15894
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
15895
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15896
|
+
"div",
|
|
15897
|
+
{
|
|
15898
|
+
className: "size-11 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
|
|
15899
|
+
style: { backgroundColor: pair.background.hex }
|
|
15900
|
+
}
|
|
15901
|
+
),
|
|
15902
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15903
|
+
"div",
|
|
15904
|
+
{
|
|
15905
|
+
className: "size-11 rounded-sm border border-grey-200 shadow-sm dark:border-grey-700",
|
|
15906
|
+
style: { backgroundColor: pair.foreground.hex }
|
|
15907
|
+
}
|
|
15908
|
+
)
|
|
15909
|
+
] }),
|
|
15910
|
+
/* @__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: [
|
|
15911
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icons.contrast, { "data-slot": "icon", className: "size-4" }),
|
|
15912
|
+
pair.rating
|
|
15913
|
+
] })
|
|
15914
|
+
] }),
|
|
15915
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 space-y-1", children: [
|
|
15916
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-medium text-foreground", children: [
|
|
15917
|
+
pair.background.token,
|
|
15918
|
+
" / ",
|
|
15919
|
+
pair.foreground.token
|
|
15920
|
+
] }),
|
|
15921
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
15922
|
+
pair.contrastRatio.toFixed(2),
|
|
15923
|
+
":1 contrast ratio"
|
|
15924
|
+
] })
|
|
15925
|
+
] })
|
|
15926
|
+
]
|
|
15927
|
+
},
|
|
15928
|
+
pair.id
|
|
15929
|
+
);
|
|
15930
|
+
}) })
|
|
15931
|
+
] }) })
|
|
15932
|
+
] }),
|
|
15933
|
+
selectedPair ? /* @__PURE__ */ jsxRuntime.jsx(PairComplianceCard, { pair: selectedPair }) : null,
|
|
15934
|
+
showWhiteForegroundExample && whiteForegroundExample ? /* @__PURE__ */ jsxRuntime.jsx(WhiteTextExampleCard, { pair: whiteForegroundExample }) : null
|
|
15935
|
+
] })
|
|
15936
|
+
] });
|
|
15937
|
+
}
|
|
15938
|
+
function ColorPairingTool() {
|
|
15939
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React5.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(ColorPairingToolLoading, {}), children: /* @__PURE__ */ jsxRuntime.jsx(ColorPairingToolContent, {}) });
|
|
15940
|
+
}
|
|
14975
15941
|
function ColorSwatches({ theme: theme2, format, viewMode }) {
|
|
14976
15942
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14977
15943
|
"div",
|
|
@@ -15333,7 +16299,7 @@ var ChartTooltip4 = ({
|
|
|
15333
16299
|
{
|
|
15334
16300
|
className: cn(
|
|
15335
16301
|
// base
|
|
15336
|
-
"rounded-
|
|
16302
|
+
"rounded-sm border text-sm shadow-md",
|
|
15337
16303
|
// border color
|
|
15338
16304
|
"border-gray-200 dark:border-gray-800",
|
|
15339
16305
|
// background color
|
|
@@ -15925,7 +16891,7 @@ function DialogContent({
|
|
|
15925
16891
|
{
|
|
15926
16892
|
"data-slot": "dialog-content",
|
|
15927
16893
|
className: cn(
|
|
15928
|
-
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-
|
|
16894
|
+
"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",
|
|
15929
16895
|
className
|
|
15930
16896
|
),
|
|
15931
16897
|
...props,
|
|
@@ -16155,7 +17121,7 @@ function ContextMenuSubContent({
|
|
|
16155
17121
|
{
|
|
16156
17122
|
"data-slot": "context-menu-sub-content",
|
|
16157
17123
|
className: cn(
|
|
16158
|
-
"z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-
|
|
17124
|
+
"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",
|
|
16159
17125
|
className
|
|
16160
17126
|
),
|
|
16161
17127
|
...props
|
|
@@ -16171,7 +17137,7 @@ function ContextMenuContent({
|
|
|
16171
17137
|
{
|
|
16172
17138
|
"data-slot": "context-menu-content",
|
|
16173
17139
|
className: cn(
|
|
16174
|
-
"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-
|
|
17140
|
+
"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",
|
|
16175
17141
|
className
|
|
16176
17142
|
),
|
|
16177
17143
|
...props
|
|
@@ -16678,7 +17644,7 @@ function DataTable({
|
|
|
16678
17644
|
});
|
|
16679
17645
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-1", children: [
|
|
16680
17646
|
/* @__PURE__ */ jsxRuntime.jsx(DataTableToolbar, { table, search, toolbar }),
|
|
16681
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-
|
|
17647
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-sm border", children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
|
|
16682
17648
|
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: headerGroup.headers.map((header) => {
|
|
16683
17649
|
return /* @__PURE__ */ jsxRuntime.jsx(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder ? null : reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
|
|
16684
17650
|
}) }, headerGroup.id)) }),
|
|
@@ -16796,7 +17762,7 @@ var ChartTooltip5 = ({ active, payload, valueFormatter }) => {
|
|
|
16796
17762
|
{
|
|
16797
17763
|
className: cn(
|
|
16798
17764
|
// base
|
|
16799
|
-
"rounded-
|
|
17765
|
+
"rounded-sm border text-sm shadow-md",
|
|
16800
17766
|
// border color
|
|
16801
17767
|
"border-gray-200 dark:border-gray-800",
|
|
16802
17768
|
// background color
|
|
@@ -17034,8 +18000,8 @@ function DrawerContent({
|
|
|
17034
18000
|
"data-slot": "drawer-content",
|
|
17035
18001
|
className: cn(
|
|
17036
18002
|
"group/drawer-content fixed z-50 flex h-auto flex-col bg-background",
|
|
17037
|
-
"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-
|
|
17038
|
-
"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-
|
|
18003
|
+
"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",
|
|
18004
|
+
"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",
|
|
17039
18005
|
"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",
|
|
17040
18006
|
"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",
|
|
17041
18007
|
className
|
|
@@ -17451,152 +18417,10 @@ function FormMessage({ className, ...props }) {
|
|
|
17451
18417
|
}
|
|
17452
18418
|
);
|
|
17453
18419
|
}
|
|
17454
|
-
var styles3 = {
|
|
17455
|
-
base: [
|
|
17456
|
-
// Base
|
|
17457
|
-
"inline-flex items-center justify-center gap-2 rounded-sm text-sm font-medium bg-transparent transition-all whitespace-nowrap cursor-pointer border-(--toggle-border) [--toggle-border:var(--color-grey-200)] text-grey-800",
|
|
17458
|
-
// States
|
|
17459
|
-
"data-[state=on]:bg-grey-100 data-[state=on]:text-grey-850",
|
|
17460
|
-
// Hover
|
|
17461
|
-
"hover:bg-grey-100 hover:text-grey-850",
|
|
17462
|
-
// Focus
|
|
17463
|
-
"focus:outline focus:outline-2 focus:outline-offset-0 focus:outline-(--toggle-border)",
|
|
17464
|
-
// Dark mode
|
|
17465
|
-
"dark:text-white",
|
|
17466
|
-
// Dark mode states
|
|
17467
|
-
"dark:data-[state=on]:bg-white/10 dark:data-[state=on]:text-white",
|
|
17468
|
-
// Dark mode hover
|
|
17469
|
-
"dark:hover:bg-white/10 dark:hover:text-white",
|
|
17470
|
-
// Disabled
|
|
17471
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
17472
|
-
// Icon
|
|
17473
|
-
'[&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 [&_svg]:shrink-0',
|
|
17474
|
-
// Aria invalid
|
|
17475
|
-
"aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
|
|
17476
|
-
// Aria invalid dark mode
|
|
17477
|
-
"dark:aria-invalid:ring-destructive/40"
|
|
17478
|
-
],
|
|
17479
|
-
outline: [
|
|
17480
|
-
// Base
|
|
17481
|
-
"text-grey-800 border [--toggle-border:var(--color-grey-300)]",
|
|
17482
|
-
// States
|
|
17483
|
-
"hover:[--toggle-border:var(--color-grey-400)]",
|
|
17484
|
-
// Dark mode
|
|
17485
|
-
"dark:[--toggle-border:white]/40",
|
|
17486
|
-
// Dark mode states
|
|
17487
|
-
"dark:hover:[--toggle-border:white]/50",
|
|
17488
|
-
// Data on
|
|
17489
|
-
"data-[state=on]:bg-primary-800/10"
|
|
17490
|
-
]
|
|
17491
|
-
};
|
|
17492
|
-
var toggleVariants = classVarianceAuthority.cva(styles3.base, {
|
|
17493
|
-
variants: {
|
|
17494
|
-
variant: {
|
|
17495
|
-
ghost: "",
|
|
17496
|
-
outline: clsx12__default.default(styles3.outline)
|
|
17497
|
-
},
|
|
17498
|
-
size: {
|
|
17499
|
-
default: "h-9 px-2 min-w-9",
|
|
17500
|
-
sm: "h-8 px-1.5 min-w-8",
|
|
17501
|
-
lg: "h-10 px-2.5 min-w-10"
|
|
17502
|
-
}
|
|
17503
|
-
},
|
|
17504
|
-
defaultVariants: {
|
|
17505
|
-
variant: "ghost",
|
|
17506
|
-
size: "default"
|
|
17507
|
-
}
|
|
17508
|
-
});
|
|
17509
|
-
function Toggle({
|
|
17510
|
-
className,
|
|
17511
|
-
variant,
|
|
17512
|
-
size,
|
|
17513
|
-
...props
|
|
17514
|
-
}) {
|
|
17515
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17516
|
-
TogglePrimitive__namespace.Root,
|
|
17517
|
-
{
|
|
17518
|
-
"data-slot": "toggle",
|
|
17519
|
-
className: cn(toggleVariants({ variant, size, className })),
|
|
17520
|
-
...props
|
|
17521
|
-
}
|
|
17522
|
-
);
|
|
17523
|
-
}
|
|
17524
|
-
var ToggleGroupContext = React5__namespace.createContext({
|
|
17525
|
-
size: "default",
|
|
17526
|
-
variant: "ghost"
|
|
17527
|
-
});
|
|
17528
|
-
function ToggleGroup({
|
|
17529
|
-
className,
|
|
17530
|
-
variant,
|
|
17531
|
-
size,
|
|
17532
|
-
children,
|
|
17533
|
-
...props
|
|
17534
|
-
}) {
|
|
17535
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17536
|
-
ToggleGroupPrimitive__namespace.Root,
|
|
17537
|
-
{
|
|
17538
|
-
"data-slot": "toggle-group",
|
|
17539
|
-
"data-variant": variant,
|
|
17540
|
-
"data-size": size,
|
|
17541
|
-
className: cn(
|
|
17542
|
-
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
17543
|
-
className
|
|
17544
|
-
),
|
|
17545
|
-
...props,
|
|
17546
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
17547
|
-
}
|
|
17548
|
-
);
|
|
17549
|
-
}
|
|
17550
|
-
function ToggleGroupItem({
|
|
17551
|
-
className,
|
|
17552
|
-
children,
|
|
17553
|
-
variant,
|
|
17554
|
-
size,
|
|
17555
|
-
...props
|
|
17556
|
-
}) {
|
|
17557
|
-
const context = React5__namespace.useContext(ToggleGroupContext);
|
|
17558
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17559
|
-
ToggleGroupPrimitive__namespace.Item,
|
|
17560
|
-
{
|
|
17561
|
-
"data-slot": "toggle-group-item",
|
|
17562
|
-
"data-variant": context.variant || variant,
|
|
17563
|
-
"data-size": context.size || size,
|
|
17564
|
-
className: cn(
|
|
17565
|
-
toggleVariants({
|
|
17566
|
-
variant: context.variant || variant,
|
|
17567
|
-
size: context.size || size
|
|
17568
|
-
}),
|
|
17569
|
-
"min-w-0 shrink-0 rounded-none shadow-none first:rounded-l-sm last:rounded-r-sm focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
17570
|
-
className
|
|
17571
|
-
),
|
|
17572
|
-
...props,
|
|
17573
|
-
children
|
|
17574
|
-
}
|
|
17575
|
-
);
|
|
17576
|
-
}
|
|
17577
|
-
function FormatToggle({ format, setFormat }) {
|
|
17578
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
17579
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Format:" }),
|
|
17580
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17581
|
-
ToggleGroup,
|
|
17582
|
-
{
|
|
17583
|
-
type: "single",
|
|
17584
|
-
value: format,
|
|
17585
|
-
onValueChange: (value) => value && setFormat(value),
|
|
17586
|
-
children: [
|
|
17587
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToggleGroupItem, { value: "hex", "aria-label": "HEX format", children: "HEX" }),
|
|
17588
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToggleGroupItem, { value: "rgb", "aria-label": "RGB format", children: "RGB" }),
|
|
17589
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToggleGroupItem, { value: "hsl", "aria-label": "HSL format", children: "HSL" }),
|
|
17590
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToggleGroupItem, { value: "oklch", "aria-label": "OKLCH format", children: "OKLCH" })
|
|
17591
|
-
]
|
|
17592
|
-
}
|
|
17593
|
-
)
|
|
17594
|
-
] });
|
|
17595
|
-
}
|
|
17596
18420
|
|
|
17597
18421
|
// package.json
|
|
17598
18422
|
var package_default = {
|
|
17599
|
-
version: "1.
|
|
18423
|
+
version: "1.98.0"};
|
|
17600
18424
|
var SluggerContext = React5__namespace.default.createContext(null);
|
|
17601
18425
|
function flattenText(nodes) {
|
|
17602
18426
|
if (nodes == null || typeof nodes === "boolean") return "";
|
|
@@ -17747,7 +18571,7 @@ function SiteSearch({ navigation: navigation$1 }) {
|
|
|
17747
18571
|
children: [
|
|
17748
18572
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden text-grey-600 lg:inline-flex dark:text-grey-200", children: "Search site..." }),
|
|
17749
18573
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex lg:hidden dark:text-grey-200", children: "Search..." }),
|
|
17750
|
-
/* @__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: [
|
|
18574
|
+
/* @__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: [
|
|
17751
18575
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: "\u2318" }),
|
|
17752
18576
|
"K"
|
|
17753
18577
|
] })
|
|
@@ -17962,7 +18786,7 @@ function HoverCardContent({
|
|
|
17962
18786
|
align,
|
|
17963
18787
|
sideOffset,
|
|
17964
18788
|
className: cn(
|
|
17965
|
-
"z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-
|
|
18789
|
+
"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",
|
|
17966
18790
|
className
|
|
17967
18791
|
),
|
|
17968
18792
|
...props
|
|
@@ -18000,7 +18824,7 @@ function InputOTPSlot({
|
|
|
18000
18824
|
"data-slot": "input-otp-slot",
|
|
18001
18825
|
"data-active": isActive,
|
|
18002
18826
|
className: cn(
|
|
18003
|
-
"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-
|
|
18827
|
+
"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",
|
|
18004
18828
|
className
|
|
18005
18829
|
),
|
|
18006
18830
|
...props,
|
|
@@ -18285,7 +19109,7 @@ var ChartTooltip6 = ({ active, payload, label, valueFormatter }) => {
|
|
|
18285
19109
|
{
|
|
18286
19110
|
className: cn(
|
|
18287
19111
|
// base
|
|
18288
|
-
"rounded-
|
|
19112
|
+
"rounded-sm border text-sm shadow-md",
|
|
18289
19113
|
// border color
|
|
18290
19114
|
"border-gray-200 dark:border-gray-800",
|
|
18291
19115
|
// background color
|
|
@@ -19180,7 +20004,7 @@ function Menubar({ className, ...props }) {
|
|
|
19180
20004
|
{
|
|
19181
20005
|
"data-slot": "menubar",
|
|
19182
20006
|
className: cn(
|
|
19183
|
-
"flex h-9 items-center gap-1 rounded-
|
|
20007
|
+
"flex h-9 items-center gap-1 rounded-sm border bg-background p-1 shadow-xs",
|
|
19184
20008
|
className
|
|
19185
20009
|
),
|
|
19186
20010
|
...props
|
|
@@ -19230,7 +20054,7 @@ function MenubarContent({
|
|
|
19230
20054
|
alignOffset,
|
|
19231
20055
|
sideOffset,
|
|
19232
20056
|
className: cn(
|
|
19233
|
-
"z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-
|
|
20057
|
+
"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",
|
|
19234
20058
|
className
|
|
19235
20059
|
),
|
|
19236
20060
|
...props
|
|
@@ -19374,7 +20198,7 @@ function MenubarSubContent({
|
|
|
19374
20198
|
{
|
|
19375
20199
|
"data-slot": "menubar-sub-content",
|
|
19376
20200
|
className: cn(
|
|
19377
|
-
"z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-
|
|
20201
|
+
"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",
|
|
19378
20202
|
className
|
|
19379
20203
|
),
|
|
19380
20204
|
...props
|
|
@@ -27793,7 +28617,7 @@ function NavigationLink({
|
|
|
27793
28617
|
href,
|
|
27794
28618
|
onClick,
|
|
27795
28619
|
className: clsx12__default.default(
|
|
27796
|
-
"inline-block w-full cursor-pointer rounded-r-
|
|
28620
|
+
"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",
|
|
27797
28621
|
"hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
|
|
27798
28622
|
"dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
|
|
27799
28623
|
href === pathname && "border-l border-primary-800 bg-primary-800/10 font-bold text-primary-800 dark:border-white dark:bg-white/20"
|
|
@@ -27895,7 +28719,7 @@ function NavigationMenuContent({
|
|
|
27895
28719
|
"data-slot": "navigation-menu-content",
|
|
27896
28720
|
className: cn(
|
|
27897
28721
|
"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",
|
|
27898
|
-
"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-
|
|
28722
|
+
"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",
|
|
27899
28723
|
className
|
|
27900
28724
|
),
|
|
27901
28725
|
...props
|
|
@@ -27911,7 +28735,7 @@ function NavigationMenuViewport({
|
|
|
27911
28735
|
{
|
|
27912
28736
|
"data-slot": "navigation-menu-viewport",
|
|
27913
28737
|
className: cn(
|
|
27914
|
-
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-
|
|
28738
|
+
"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)]",
|
|
27915
28739
|
className
|
|
27916
28740
|
),
|
|
27917
28741
|
...props
|
|
@@ -28234,7 +29058,7 @@ function NSWCard({
|
|
|
28234
29058
|
"div",
|
|
28235
29059
|
{
|
|
28236
29060
|
className: cn(
|
|
28237
|
-
"h-full rounded-
|
|
29061
|
+
"h-full rounded-sm border border-(--nsw-card-border)",
|
|
28238
29062
|
hasImage && "border-t-none rounded-t-none"
|
|
28239
29063
|
),
|
|
28240
29064
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full flex-col p-8", children: bodyChildren })
|
|
@@ -28246,7 +29070,7 @@ function NSWCard({
|
|
|
28246
29070
|
"div",
|
|
28247
29071
|
{
|
|
28248
29072
|
className: cn(
|
|
28249
|
-
"flex h-full flex-col rounded-
|
|
29073
|
+
"flex h-full flex-col rounded-sm border border-(--nsw-card-border) p-8",
|
|
28250
29074
|
hasImage && "border-t-none rounded-t-none"
|
|
28251
29075
|
),
|
|
28252
29076
|
children: bodyChildren
|
|
@@ -28801,7 +29625,7 @@ function ResizableHandle({
|
|
|
28801
29625
|
className
|
|
28802
29626
|
),
|
|
28803
29627
|
...props,
|
|
28804
|
-
children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-
|
|
29628
|
+
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" }) })
|
|
28805
29629
|
}
|
|
28806
29630
|
);
|
|
28807
29631
|
}
|
|
@@ -29100,7 +29924,7 @@ function Sidebar({
|
|
|
29100
29924
|
{
|
|
29101
29925
|
"data-sidebar": "sidebar",
|
|
29102
29926
|
"data-slot": "sidebar-inner",
|
|
29103
|
-
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-
|
|
29927
|
+
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",
|
|
29104
29928
|
children
|
|
29105
29929
|
}
|
|
29106
29930
|
)
|
|
@@ -29559,7 +30383,7 @@ function SidebarLink({ link, pathname, onLinkClick, depth }) {
|
|
|
29559
30383
|
const isActive = pathname === link.href;
|
|
29560
30384
|
const isActiveOrHasActiveDescendant = isLinkOrDescendantActive(link, pathname);
|
|
29561
30385
|
const baseLinkClasses = clsx12__default.default(
|
|
29562
|
-
"w-full cursor-pointer rounded-r-
|
|
30386
|
+
"w-full cursor-pointer rounded-r-sm border-l py-1 pr-2 pl-4 text-left text-base/8 sm:text-sm/6",
|
|
29563
30387
|
"hover:border-grey-950 hover:bg-primary-800/10 hover:font-semibold hover:text-grey-950",
|
|
29564
30388
|
"dark:text-grey-400 dark:hover:border-grey-400 dark:hover:text-white",
|
|
29565
30389
|
isActive && "border-l border-primary-800 bg-primary-800/10 font-bold text-primary-800 dark:border-white dark:bg-white/20"
|
|
@@ -30495,7 +31319,7 @@ var TabNavigation = React5__namespace.default.forwardRef(({ className, children,
|
|
|
30495
31319
|
motion.div,
|
|
30496
31320
|
{
|
|
30497
31321
|
layoutId: "hoverBackground",
|
|
30498
|
-
className: "absolute top-2 bottom-2 transform rounded-
|
|
31322
|
+
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",
|
|
30499
31323
|
transition: {
|
|
30500
31324
|
type: "spring",
|
|
30501
31325
|
stiffness: 500,
|
|
@@ -31031,7 +31855,7 @@ var Tracker = React5__namespace.default.forwardRef(
|
|
|
31031
31855
|
);
|
|
31032
31856
|
Tracker.displayName = "Tracker";
|
|
31033
31857
|
var buttonVariants4 = classVarianceAuthority.cva(
|
|
31034
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-
|
|
31858
|
+
"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",
|
|
31035
31859
|
{
|
|
31036
31860
|
variants: {
|
|
31037
31861
|
variant: {
|
|
@@ -31150,7 +31974,7 @@ var Artifact = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
31150
31974
|
"div",
|
|
31151
31975
|
{
|
|
31152
31976
|
className: cn(
|
|
31153
|
-
"flex flex-col overflow-hidden rounded-
|
|
31977
|
+
"flex flex-col overflow-hidden rounded-sm border bg-background shadow-sm",
|
|
31154
31978
|
className
|
|
31155
31979
|
),
|
|
31156
31980
|
...props
|
|
@@ -31396,7 +32220,7 @@ function isFunction(value) {
|
|
|
31396
32220
|
return typeof value === "function";
|
|
31397
32221
|
}
|
|
31398
32222
|
var badgeVariants2 = classVarianceAuthority.cva(
|
|
31399
|
-
"inline-flex items-center justify-center rounded-
|
|
32223
|
+
"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",
|
|
31400
32224
|
{
|
|
31401
32225
|
variants: {
|
|
31402
32226
|
variant: {
|
|
@@ -31581,7 +32405,7 @@ var CodeBlock = ({
|
|
|
31581
32405
|
"div",
|
|
31582
32406
|
{
|
|
31583
32407
|
className: cn(
|
|
31584
|
-
"relative w-full overflow-hidden rounded-
|
|
32408
|
+
"relative w-full overflow-hidden rounded-sm border bg-background text-foreground",
|
|
31585
32409
|
className
|
|
31586
32410
|
),
|
|
31587
32411
|
...props,
|
|
@@ -31696,7 +32520,7 @@ function HoverCardContent2({
|
|
|
31696
32520
|
align,
|
|
31697
32521
|
sideOffset,
|
|
31698
32522
|
className: cn(
|
|
31699
|
-
"z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-
|
|
32523
|
+
"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",
|
|
31700
32524
|
className
|
|
31701
32525
|
),
|
|
31702
32526
|
...props
|
|
@@ -32400,7 +33224,7 @@ function DropdownMenuContent2({
|
|
|
32400
33224
|
"data-slot": "dropdown-menu-content",
|
|
32401
33225
|
sideOffset,
|
|
32402
33226
|
className: cn(
|
|
32403
|
-
"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-
|
|
33227
|
+
"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",
|
|
32404
33228
|
className
|
|
32405
33229
|
),
|
|
32406
33230
|
...props
|
|
@@ -32687,7 +33511,7 @@ function Textarea2({ className, ...props }) {
|
|
|
32687
33511
|
{
|
|
32688
33512
|
"data-slot": "textarea",
|
|
32689
33513
|
className: cn(
|
|
32690
|
-
"flex field-sizing-content min-h-16 w-full rounded-
|
|
33514
|
+
"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",
|
|
32691
33515
|
className
|
|
32692
33516
|
),
|
|
32693
33517
|
...props
|
|
@@ -32707,7 +33531,7 @@ function PromptInputAttachment({ data, className, ...props }) {
|
|
|
32707
33531
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32708
33532
|
"div",
|
|
32709
33533
|
{
|
|
32710
|
-
className: cn("group relative h-14 w-14 rounded-
|
|
33534
|
+
className: cn("group relative h-14 w-14 rounded-sm border", className),
|
|
32711
33535
|
...props,
|
|
32712
33536
|
children: [
|
|
32713
33537
|
data.mediaType?.startsWith("image/") && data.url ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -32985,7 +33809,7 @@ var PromptInput = ({
|
|
|
32985
33809
|
"form",
|
|
32986
33810
|
{
|
|
32987
33811
|
className: cn(
|
|
32988
|
-
"w-full divide-y overflow-hidden rounded-
|
|
33812
|
+
"w-full divide-y overflow-hidden rounded-sm border bg-background shadow-sm",
|
|
32989
33813
|
className
|
|
32990
33814
|
),
|
|
32991
33815
|
onSubmit: handleSubmit,
|
|
@@ -33350,7 +34174,7 @@ var TaskItemFile = ({ children, className, ...props }) => /* @__PURE__ */ jsxRun
|
|
|
33350
34174
|
"div",
|
|
33351
34175
|
{
|
|
33352
34176
|
className: cn(
|
|
33353
|
-
"inline-flex items-center gap-1 rounded-
|
|
34177
|
+
"inline-flex items-center gap-1 rounded-sm border bg-secondary px-1.5 py-0.5 text-xs text-foreground",
|
|
33354
34178
|
className
|
|
33355
34179
|
),
|
|
33356
34180
|
...props,
|
|
@@ -33385,7 +34209,7 @@ var TaskContent = ({ children, className, ...props }) => /* @__PURE__ */ jsxRunt
|
|
|
33385
34209
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-2 border-l-2 border-muted pl-4", children })
|
|
33386
34210
|
}
|
|
33387
34211
|
);
|
|
33388
|
-
var Tool = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(Collapsible2, { className: cn("not-prose mb-4 w-full rounded-
|
|
34212
|
+
var Tool = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(Collapsible2, { className: cn("not-prose mb-4 w-full rounded-sm border", className), ...props });
|
|
33389
34213
|
var getStatusBadge = (status) => {
|
|
33390
34214
|
const labels = {
|
|
33391
34215
|
"input-streaming": "Pending",
|
|
@@ -33467,7 +34291,7 @@ function Input2({ className, type, ...props }) {
|
|
|
33467
34291
|
type,
|
|
33468
34292
|
"data-slot": "input",
|
|
33469
34293
|
className: cn(
|
|
33470
|
-
"h-9 w-full min-w-0 rounded-
|
|
34294
|
+
"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",
|
|
33471
34295
|
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
33472
34296
|
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
33473
34297
|
className
|
|
@@ -33506,7 +34330,7 @@ var WebPreview = ({
|
|
|
33506
34330
|
return /* @__PURE__ */ jsxRuntime.jsx(WebPreviewContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33507
34331
|
"div",
|
|
33508
34332
|
{
|
|
33509
|
-
className: cn("flex size-full flex-col rounded-
|
|
34333
|
+
className: cn("flex size-full flex-col rounded-sm border bg-card", className),
|
|
33510
34334
|
...props,
|
|
33511
34335
|
children
|
|
33512
34336
|
}
|
|
@@ -33838,6 +34662,7 @@ exports.Collapsible = Collapsible;
|
|
|
33838
34662
|
exports.CollapsibleContent = CollapsibleContent2;
|
|
33839
34663
|
exports.CollapsibleTrigger = CollapsibleTrigger2;
|
|
33840
34664
|
exports.ColorCard = ColorCard;
|
|
34665
|
+
exports.ColorPairingTool = ColorPairingTool;
|
|
33841
34666
|
exports.ColorSwatches = ColorSwatches;
|
|
33842
34667
|
exports.ColourScale = ColourScale;
|
|
33843
34668
|
exports.ComboChart = ComboChart;
|