@keboola/design 6.1.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -295,7 +295,7 @@ var require_react_is_development = __commonJS({
295
295
  var ContextProvider = REACT_PROVIDER_TYPE;
296
296
  var Element = REACT_ELEMENT_TYPE;
297
297
  var ForwardRef = REACT_FORWARD_REF_TYPE;
298
- var Fragment16 = REACT_FRAGMENT_TYPE;
298
+ var Fragment17 = REACT_FRAGMENT_TYPE;
299
299
  var Lazy = REACT_LAZY_TYPE;
300
300
  var Memo = REACT_MEMO_TYPE;
301
301
  var Portal10 = REACT_PORTAL_TYPE;
@@ -354,7 +354,7 @@ var require_react_is_development = __commonJS({
354
354
  exports$1.ContextProvider = ContextProvider;
355
355
  exports$1.Element = Element;
356
356
  exports$1.ForwardRef = ForwardRef;
357
- exports$1.Fragment = Fragment16;
357
+ exports$1.Fragment = Fragment17;
358
358
  exports$1.Lazy = Lazy;
359
359
  exports$1.Memo = Memo;
360
360
  exports$1.Portal = Portal10;
@@ -1079,6 +1079,7 @@ var require_es = __commonJS({
1079
1079
  // src/icons/index.ts
1080
1080
  var icons_exports = {};
1081
1081
  __export(icons_exports, {
1082
+ Google: () => Google,
1082
1083
  Keboola: () => Keboola
1083
1084
  });
1084
1085
  __reExport(icons_exports, lucide_react_star__namespace);
@@ -1439,6 +1440,53 @@ var useSHA256 = (text) => {
1439
1440
  }, [text]);
1440
1441
  return text ? hash : "";
1441
1442
  };
1443
+ var Google = React26.forwardRef(
1444
+ ({ size = 24, className, children, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1445
+ "svg",
1446
+ {
1447
+ ref,
1448
+ xmlns: "http://www.w3.org/2000/svg",
1449
+ width: size,
1450
+ height: size,
1451
+ viewBox: "12 10 20 20",
1452
+ fill: "none",
1453
+ className: cn("lucide", className),
1454
+ ...rest,
1455
+ children: [
1456
+ /* @__PURE__ */ jsxRuntime.jsx(
1457
+ "path",
1458
+ {
1459
+ d: "M31.6 20.2273C31.6 19.5182 31.5364 18.8364 31.4182 18.1818H22V22.05H27.3818C27.15 23.3 26.4455 24.3591 25.3864 25.0682V27.5773H28.6182C30.5091 25.8364 31.6 23.2727 31.6 20.2273Z",
1460
+ fill: "#4285F4"
1461
+ }
1462
+ ),
1463
+ /* @__PURE__ */ jsxRuntime.jsx(
1464
+ "path",
1465
+ {
1466
+ d: "M22 30C24.7 30 26.9636 29.1045 28.6181 27.5773L25.3863 25.0682C24.4909 25.6682 23.3454 26.0227 22 26.0227C19.3954 26.0227 17.1909 24.2636 16.4045 21.9H13.0636V24.4909C14.7091 27.7591 18.0909 30 22 30Z",
1467
+ fill: "#34A853"
1468
+ }
1469
+ ),
1470
+ /* @__PURE__ */ jsxRuntime.jsx(
1471
+ "path",
1472
+ {
1473
+ d: "M16.4045 21.9C16.2045 21.3 16.0909 20.6591 16.0909 20C16.0909 19.3409 16.2045 18.7 16.4045 18.1V15.5091H13.0636C12.3864 16.8591 12 18.3864 12 20C12 21.6136 12.3864 23.1409 13.0636 24.4909L16.4045 21.9Z",
1474
+ fill: "#FBBC04"
1475
+ }
1476
+ ),
1477
+ /* @__PURE__ */ jsxRuntime.jsx(
1478
+ "path",
1479
+ {
1480
+ d: "M22 13.9773C23.4681 13.9773 24.7863 14.4818 25.8227 15.4727L28.6909 12.6045C26.9591 10.9909 24.6954 10 22 10C18.0909 10 14.7091 12.2409 13.0636 15.5091L16.4045 18.1C17.1909 15.7364 19.3954 13.9773 22 13.9773Z",
1481
+ fill: "#EA4335"
1482
+ }
1483
+ ),
1484
+ children
1485
+ ]
1486
+ }
1487
+ )
1488
+ );
1489
+ Google.displayName = "Google";
1442
1490
  var Keboola = React26.forwardRef(
1443
1491
  ({ size = 24, color = "currentColor", className, children, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1444
1492
  "svg",
@@ -3112,6 +3160,115 @@ var CopyField = {
3112
3160
  /** Small helper text below the box. */
3113
3161
  Footer: CopyFooter
3114
3162
  };
3163
+ var LABELS = {
3164
+ signin: "Sign in with Google",
3165
+ signup: "Sign up with Google",
3166
+ continue: "Continue with Google",
3167
+ "signin-short": "Sign in"
3168
+ };
3169
+ var GOOGLE_FONT_STACK = "'Roboto', arial, sans-serif";
3170
+ var variants3 = classVarianceAuthority.cva(
3171
+ [
3172
+ "tailwindcss-preflight",
3173
+ "tw-inline-flex",
3174
+ "tw-items-center",
3175
+ "tw-justify-center",
3176
+ "tw-h-10",
3177
+ "tw-border",
3178
+ "tw-text-sm",
3179
+ "tw-font-medium",
3180
+ "tw-leading-none",
3181
+ "tw-whitespace-nowrap",
3182
+ "tw-select-none",
3183
+ "tw-cursor-pointer",
3184
+ "tw-transition-shadow",
3185
+ "[&_svg]:tw-shrink-0",
3186
+ // focus — a neutral Google-blue ring, independent of the active brand.
3187
+ "focus-visible:tw-outline-none",
3188
+ "focus-visible:tw-ring-2",
3189
+ "focus-visible:tw-ring-[#4285f4]/60",
3190
+ // disabled
3191
+ "disabled:tw-cursor-not-allowed",
3192
+ "disabled:tw-opacity-60",
3193
+ // dark treatment — auto-applied under html[data-theme=dark], overriding
3194
+ // whichever `variant` is active (the ancestor selector out-specifies the
3195
+ // variant's plain color classes).
3196
+ "[[data-theme=dark]_&]:tw-bg-[#131314]",
3197
+ "[[data-theme=dark]_&]:tw-text-[#e3e3e3]",
3198
+ "[[data-theme=dark]_&]:tw-border-[#8e918f]",
3199
+ "[[data-theme=dark]_&]:hover:not-disabled:tw-bg-[#1e1f20]",
3200
+ "[[data-theme=dark]_&]:hover:not-disabled:tw-shadow-none"
3201
+ ],
3202
+ {
3203
+ defaultVariants: {
3204
+ variant: "default",
3205
+ shape: "rectangular",
3206
+ size: "default"
3207
+ },
3208
+ variants: {
3209
+ // Google's approved light-scheme treatments; dark (above) overrides both.
3210
+ variant: {
3211
+ default: [
3212
+ "tw-bg-white",
3213
+ "tw-text-[#1f1f1f]",
3214
+ "tw-border-[#747775]",
3215
+ "hover:not-disabled:tw-bg-[#f7f8f8]",
3216
+ "hover:not-disabled:tw-shadow-[0_1px_2px_0_rgba(60,64,67,0.30),0_1px_3px_1px_rgba(60,64,67,0.15)]"
3217
+ ],
3218
+ neutral: [
3219
+ "tw-bg-[#f2f2f2]",
3220
+ "tw-text-[#1f1f1f]",
3221
+ "tw-border-transparent",
3222
+ "hover:not-disabled:tw-bg-[#e8eaed]"
3223
+ ]
3224
+ },
3225
+ shape: {
3226
+ rectangular: ["tw-rounded"],
3227
+ circle: ["tw-rounded-full"]
3228
+ },
3229
+ size: {
3230
+ default: ["tw-gap-2.5", "tw-px-3"],
3231
+ icon: ["tw-w-10", "tw-p-0"]
3232
+ }
3233
+ }
3234
+ }
3235
+ );
3236
+ var GoogleButton = ({
3237
+ ref,
3238
+ variant = "default",
3239
+ shape = "rectangular",
3240
+ size = "default",
3241
+ label = "signin",
3242
+ isLoading = false,
3243
+ disabled = false,
3244
+ type = "button",
3245
+ className,
3246
+ children,
3247
+ style,
3248
+ ...buttonProps
3249
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(
3250
+ "button",
3251
+ {
3252
+ ...buttonProps,
3253
+ ref,
3254
+ type,
3255
+ disabled,
3256
+ style: { ...style, fontFamily: GOOGLE_FONT_STACK },
3257
+ className: cn(variants3({ variant, shape, size }), className),
3258
+ children: [
3259
+ isLoading ? /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Loader2, { className: "tw-size-5 tw-shrink-0 tw-animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(Google, { className: "tw-size-5" }),
3260
+ /* @__PURE__ */ jsxRuntime.jsx(
3261
+ "span",
3262
+ {
3263
+ className: cn({
3264
+ "tw-sr-only": size === "icon"
3265
+ }),
3266
+ children: children ?? LABELS[label]
3267
+ }
3268
+ )
3269
+ ]
3270
+ }
3271
+ );
3115
3272
  var Link = ({
3116
3273
  ref,
3117
3274
  children,
@@ -4068,8 +4225,8 @@ var FullScreenModalHeader = ({
4068
4225
  {
4069
4226
  text: previousTitle,
4070
4227
  className: cn(
4071
- "tw-relative tw-top-0 tw-cursor-pointer tw-text-base tw-font-normal tw-text-neutral-400 tw-underline",
4072
- "hover:tw-text-neutral-800 hover:tw-no-underline",
4228
+ "tw-relative tw-top-0 tw-cursor-pointer tw-text-base tw-font-normal tw-text-muted-foreground tw-underline",
4229
+ "hover:tw-text-foreground hover:tw-no-underline",
4073
4230
  isTitleWithIcon && "tw-ml-14"
4074
4231
  )
4075
4232
  }
@@ -4317,7 +4474,7 @@ Sheet.Title = SheetTitle;
4317
4474
  Sheet.Header = SheetHeader;
4318
4475
  Sheet.Footer = SheetFooter;
4319
4476
  Sheet.Body = SheetBody;
4320
- var variants3 = classVarianceAuthority.cva(
4477
+ var variants4 = classVarianceAuthority.cva(
4321
4478
  [
4322
4479
  "tailwindcss-preflight",
4323
4480
  "tw-group/popover-content",
@@ -4389,7 +4546,7 @@ var PopoverContent = ({
4389
4546
  ref,
4390
4547
  align: matchTriggerWidth ? "start" : align,
4391
4548
  sideOffset,
4392
- className: cn(variants3({ className, matchTriggerWidth, variant: effectiveVariant })),
4549
+ className: cn(variants4({ className, matchTriggerWidth, variant: effectiveVariant })),
4393
4550
  onEscapeKeyDown: (event) => {
4394
4551
  event.stopPropagation();
4395
4552
  onEscapeKeyDown?.(event);
@@ -11022,8 +11179,8 @@ var ClearButton = ({ onClick, testId }) => {
11022
11179
  "tw-flex",
11023
11180
  "tw-items-center",
11024
11181
  "tw-cursor-pointer",
11025
- "tw-text-neutral-300",
11026
- "hover:tw-text-neutral-800"
11182
+ "tw-text-muted-foreground",
11183
+ "hover:tw-text-foreground"
11027
11184
  ),
11028
11185
  "data-testid": testId,
11029
11186
  children: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.X, { className: "tw-size-4" })
@@ -11405,7 +11562,7 @@ var SelectSeparator = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.js
11405
11562
  className: cn("tw-mx-2 tw-my-1 tw-h-px tw-bg-border", className)
11406
11563
  }
11407
11564
  );
11408
- var variants4 = classVarianceAuthority.cva(
11565
+ var variants5 = classVarianceAuthority.cva(
11409
11566
  [
11410
11567
  "tailwindcss-preflight",
11411
11568
  "tw-group",
@@ -11568,7 +11725,7 @@ var SelectTrigger = ({
11568
11725
  SelectPrimitive__namespace.Trigger,
11569
11726
  {
11570
11727
  ref,
11571
- className: cn(variants4({ variant: effectiveVariant, state, sizing }), className),
11728
+ className: cn(variants5({ variant: effectiveVariant, state, sizing }), className),
11572
11729
  ...props,
11573
11730
  children: [
11574
11731
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { placeholder }),
@@ -11864,23 +12021,23 @@ var BadgeLabel = ({
11864
12021
  var badgeColors = {
11865
12022
  gray: "tw-bg-neutral-400 tw-text-white tw-decoration-neutral-400",
11866
12023
  "gray-darker": "tw-bg-neutral-500 tw-text-white tw-decoration-neutral-500",
11867
- "gray-inverse": "tw-bg-neutral-100 tw-text-neutral-400 tw-decoration-neutral-100",
12024
+ "gray-inverse": "tw-bg-neutral-100 tw-text-neutral-500 tw-decoration-neutral-100 [[data-theme=dark]_&]:tw-bg-neutral-800 [[data-theme=dark]_&]:tw-text-neutral-300 [[data-theme=dark]_&]:tw-decoration-neutral-800",
11868
12025
  green: "tw-bg-green-500 tw-text-white tw-decoration-green-500",
11869
12026
  "green-darker": "tw-bg-green-600 tw-text-white tw-decoration-green-600",
11870
- "green-inverse": "tw-bg-green-100 tw-text-green-900 tw-decoration-green-100",
12027
+ "green-inverse": "tw-bg-green-100 tw-text-green-900 tw-decoration-green-100 [[data-theme=dark]_&]:tw-bg-green-900 [[data-theme=dark]_&]:tw-text-green-200 [[data-theme=dark]_&]:tw-decoration-green-900",
11871
12028
  blue: "tw-bg-blue-500 tw-text-white tw-decoration-blue-500",
11872
- "blue-inverse": "tw-bg-blue-100 tw-text-blue-600 tw-decoration-blue-100",
12029
+ "blue-inverse": "tw-bg-blue-100 tw-text-blue-600 tw-decoration-blue-100 [[data-theme=dark]_&]:tw-bg-blue-900 [[data-theme=dark]_&]:tw-text-blue-200 [[data-theme=dark]_&]:tw-decoration-blue-900",
11873
12030
  red: "tw-bg-error-500 tw-text-white tw-decoration-error-500",
11874
12031
  orange: "tw-bg-warning-500 tw-text-white tw-decoration-warning-500",
11875
- "orange-inverse": "tw-bg-warning-100 tw-text-warning-500 tw-decoration-warning-100",
12032
+ "orange-inverse": "tw-bg-warning-100 tw-text-warning-500 tw-decoration-warning-100 [[data-theme=dark]_&]:tw-bg-warning-900 [[data-theme=dark]_&]:tw-text-warning-200 [[data-theme=dark]_&]:tw-decoration-warning-900",
11876
12033
  amber: "tw-bg-warning-300 tw-text-warning-800 tw-decoration-warning-300",
11877
12034
  "amber-inverse": "tw-bg-warning-100 tw-text-warning-700 tw-decoration-warning-100",
11878
12035
  teal: "tw-bg-teal-500 tw-text-white tw-decoration-teal-500",
11879
- "teal-inverse": "tw-bg-teal-100 tw-text-teal-800 tw-decoration-teal-100",
12036
+ "teal-inverse": "tw-bg-teal-100 tw-text-teal-800 tw-decoration-teal-100 [[data-theme=dark]_&]:tw-bg-teal-900 [[data-theme=dark]_&]:tw-text-teal-200 [[data-theme=dark]_&]:tw-decoration-teal-900",
11880
12037
  purple: "tw-bg-purple-500 tw-text-white tw-decoration-purple-500",
11881
- "purple-inverse": "tw-bg-purple-100 tw-text-purple-800 tw-decoration-purple-100",
12038
+ "purple-inverse": "tw-bg-purple-100 tw-text-purple-800 tw-decoration-purple-100 [[data-theme=dark]_&]:tw-bg-purple-900 [[data-theme=dark]_&]:tw-text-purple-200 [[data-theme=dark]_&]:tw-decoration-purple-900",
11882
12039
  cyan: "tw-bg-cyan-500 tw-text-white tw-decoration-cyan-500",
11883
- "cyan-inverse": "tw-bg-cyan-100 tw-text-cyan-800 tw-decoration-cyan-100",
12040
+ "cyan-inverse": "tw-bg-cyan-100 tw-text-cyan-800 tw-decoration-cyan-100 [[data-theme=dark]_&]:tw-bg-cyan-900 [[data-theme=dark]_&]:tw-text-cyan-200 [[data-theme=dark]_&]:tw-decoration-cyan-900",
11884
12041
  "sidebar-primary": "tw-bg-sidebar-primary tw-text-white tw-decoration-sidebar-primary",
11885
12042
  white: "tw-bg-white/90 tw-text-neutral-600 tw-decoration-white/90"
11886
12043
  };
@@ -15648,7 +15805,7 @@ var TableHeader = ({
15648
15805
  "thead",
15649
15806
  {
15650
15807
  className: cn(
15651
- "tw-sticky tw-top-0 tw-z-10 [&_tr]:tw-bg-muted [&_tr]:tw-border-b [&_tr]:tw-border-border",
15808
+ "tw-sticky tw-top-0 tw-z-10 [&_tr]:tw-bg-table-header [&_tr]:tw-border-b [&_tr]:tw-border-border",
15652
15809
  { "tw-shadow-table": withShadow },
15653
15810
  className
15654
15811
  ),
@@ -16873,7 +17030,7 @@ var PromptInput = ({
16873
17030
  ) : formEl });
16874
17031
  };
16875
17032
  PromptInput.Action = PromptInputAction;
16876
- var variants5 = classVarianceAuthority.cva(
17033
+ var variants6 = classVarianceAuthority.cva(
16877
17034
  ["tw-relative", "tw-flex", "tw-items-center", "tw-z-0", "tw-overflow-x-hidden", "tw-w-full"],
16878
17035
  {
16879
17036
  defaultVariants: {
@@ -16899,7 +17056,7 @@ var Progress = ({
16899
17056
  variant,
16900
17057
  size,
16901
17058
  ...props
16902
- }) => /* @__PURE__ */ jsxRuntime.jsx(reactProgress.Root, { ...props, ref, className: cn(variants5({ variant, size, className })), value, children: /* @__PURE__ */ jsxRuntime.jsx(
17059
+ }) => /* @__PURE__ */ jsxRuntime.jsx(reactProgress.Root, { ...props, ref, className: cn(variants6({ variant, size, className })), value, children: /* @__PURE__ */ jsxRuntime.jsx(
16903
17060
  reactProgress.Indicator,
16904
17061
  {
16905
17062
  "data-slot": "progress-indicator",
@@ -17892,7 +18049,7 @@ var ToastTitle = ({
17892
18049
  children
17893
18050
  }
17894
18051
  );
17895
- var variants6 = classVarianceAuthority.cva(
18052
+ var variants7 = classVarianceAuthority.cva(
17896
18053
  [
17897
18054
  "tailwindcss-preflight",
17898
18055
  "tw-group/toast",
@@ -17962,7 +18119,7 @@ var ToastRoot = ({
17962
18119
  "data-variant": variant,
17963
18120
  "data-argo": renderArgo,
17964
18121
  className: cn(
17965
- variants6({ variant }),
18122
+ variants7({ variant }),
17966
18123
  "data-[variant=default]:data-[argo=true]:tw-bg-background"
17967
18124
  ),
17968
18125
  children: [
@@ -18453,9 +18610,7 @@ var headerVariants = classVarianceAuthority.cva(
18453
18610
  variants: {
18454
18611
  variant: {
18455
18612
  default: "tw-bg-muted",
18456
- // White surface kept literal until a `card` token exists (UT-4396);
18457
- // `background` is the page base, not an elevated panel surface.
18458
- white: "tw-bg-white"
18613
+ white: "tw-bg-card"
18459
18614
  },
18460
18615
  isDisabled: {
18461
18616
  true: "tw-cursor-not-allowed tw-opacity-50",
@@ -18520,7 +18675,7 @@ var CollapsiblePanel = ({
18520
18675
  {
18521
18676
  open,
18522
18677
  className: cn(
18523
- "tw-rounded !tw-border !tw-border-solid !tw-border-border tw-bg-white",
18678
+ "tw-rounded !tw-border !tw-border-solid !tw-border-border tw-bg-card",
18524
18679
  className
18525
18680
  ),
18526
18681
  header: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -18728,6 +18883,18 @@ var tokensToCssVars = ({
18728
18883
  vars.set("--font-weight-semibold", typography?.weight?.semibold);
18729
18884
  vars.set("--font-weight-bold", typography?.weight?.bold);
18730
18885
  vars.set("--letter-spacing-chrome", typography?.letterSpacing?.chrome);
18886
+ vars.set("--type-display-size", typography?.typeScale?.display?.size);
18887
+ vars.set("--type-display-weight", typography?.typeScale?.display?.weight);
18888
+ vars.set("--type-display-leading", typography?.typeScale?.display?.leading);
18889
+ vars.set("--type-display-tracking", typography?.typeScale?.display?.tracking);
18890
+ vars.set("--type-heading-size", typography?.typeScale?.heading?.size);
18891
+ vars.set("--type-heading-weight", typography?.typeScale?.heading?.weight);
18892
+ vars.set("--type-heading-leading", typography?.typeScale?.heading?.leading);
18893
+ vars.set("--type-heading-tracking", typography?.typeScale?.heading?.tracking);
18894
+ vars.set("--type-body-size", typography?.typeScale?.body?.size);
18895
+ vars.set("--type-body-weight", typography?.typeScale?.body?.weight);
18896
+ vars.set("--type-body-leading", typography?.typeScale?.body?.leading);
18897
+ vars.set("--type-body-tracking", typography?.typeScale?.body?.tracking);
18731
18898
  vars.set("--radius-sm", radii?.sm);
18732
18899
  vars.set("--radius-md", radii?.md);
18733
18900
  vars.set("--radius-lg", radii?.lg);
@@ -20845,7 +21012,7 @@ var NavbarHeader = ({ children, className, ...rest }) => (
20845
21012
  // renders null when the active brand ships no logo, so no provider gate needed.
20846
21013
  /* @__PURE__ */ jsxRuntime.jsx("div", { ...rest, className: cn("tw-overflow-hidden", "tw-py-1.5", className), children: children ?? /* @__PURE__ */ jsxRuntime.jsx(BrandLogo, { variant: "wordmark", className: "tw-h-7" }) })
20847
21014
  );
20848
- var variants7 = classVarianceAuthority.cva(["tw-p-0", "tw-flex", "tw-items-center", "tw-justify-center", "tw-gap-2"], {
21015
+ var variants8 = classVarianceAuthority.cva(["tw-p-0", "tw-flex", "tw-items-center", "tw-justify-center", "tw-gap-2"], {
20849
21016
  variants: {
20850
21017
  marker: {
20851
21018
  none: [],
@@ -20865,7 +21032,7 @@ var variants7 = classVarianceAuthority.cva(["tw-p-0", "tw-flex", "tw-items-cente
20865
21032
  marker: "none"
20866
21033
  }
20867
21034
  });
20868
- var NavbarMenu = ({ className, marker, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("ul", { ...rest, className: variants7({ marker, className }) });
21035
+ var NavbarMenu = ({ className, marker, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("ul", { ...rest, className: variants8({ marker, className }) });
20869
21036
  var NavbarMenuAvatar = ({
20870
21037
  ref,
20871
21038
  className,
@@ -20917,7 +21084,7 @@ var NavbarMenuAvatar = ({
20917
21084
  }
20918
21085
  );
20919
21086
  };
20920
- var variants8 = classVarianceAuthority.cva(
21087
+ var variants9 = classVarianceAuthority.cva(
20921
21088
  [
20922
21089
  "tw-flex",
20923
21090
  "tw-justify-center",
@@ -20968,9 +21135,9 @@ var NavbarMenuItemAdornment = ({
20968
21135
  ...props
20969
21136
  }) => {
20970
21137
  const Comp = asChild ? reactSlot.Slot : "span";
20971
- return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...props, ref, className: variants8({ variant, className }) });
21138
+ return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...props, ref, className: variants9({ variant, className }) });
20972
21139
  };
20973
- var variants9 = classVarianceAuthority.cva(
21140
+ var variants10 = classVarianceAuthority.cva(
20974
21141
  [
20975
21142
  "tw-group/navbar-menu-button",
20976
21143
  "tw-box-border",
@@ -21068,7 +21235,7 @@ var NavbarMenuButton = ({
21068
21235
  ref,
21069
21236
  type,
21070
21237
  "data-variant": variant,
21071
- className: cn(variants9({ className, variant })),
21238
+ className: cn(variants10({ className, variant })),
21072
21239
  children: [
21073
21240
  adornment && /* @__PURE__ */ jsxRuntime.jsx(NavbarMenuItemAdornment, { variant: adornmentVariant, children: adornment }),
21074
21241
  /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children })
@@ -22332,7 +22499,7 @@ Pagination.Button = PaginationButton;
22332
22499
  Pagination.Previous = PaginationPrevious;
22333
22500
  Pagination.Next = PaginationNext;
22334
22501
  Pagination.Ellipsis = PaginationEllipsis;
22335
- var variants10 = classVarianceAuthority.cva(["tw-p-0.5", "tw-text-inherit", "tw-inline-flex"], {
22502
+ var variants11 = classVarianceAuthority.cva(["tw-p-0.5", "tw-text-inherit", "tw-inline-flex"], {
22336
22503
  variants: {
22337
22504
  diff: {
22338
22505
  added: ["tw-bg-green-200"],
@@ -22340,8 +22507,8 @@ var variants10 = classVarianceAuthority.cva(["tw-p-0.5", "tw-text-inherit", "tw-
22340
22507
  }
22341
22508
  }
22342
22509
  });
22343
- var DiffViewMark = ({ diff, children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("mark", { ...props, className: cn(variants10({ diff, className })), children });
22344
- var variants11 = classVarianceAuthority.cva(
22510
+ var DiffViewMark = ({ diff, children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("mark", { ...props, className: cn(variants11({ diff, className })), children });
22511
+ var variants12 = classVarianceAuthority.cva(
22345
22512
  [
22346
22513
  // reset global styles
22347
22514
  "[&_pre]:tw-p-0",
@@ -22409,7 +22576,7 @@ var variants11 = classVarianceAuthority.cva(
22409
22576
  );
22410
22577
  var DiffViewTd = ({ diff, variant = "default", children, className, ...props }) => {
22411
22578
  const needsCodeFormatting = variant === "code" || variant === "gutter";
22412
- return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props, className: cn(variants11({ variant, className, diff })), children: needsCodeFormatting ? /* @__PURE__ */ jsxRuntime.jsx("pre", { children }) : children });
22579
+ return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props, className: cn(variants12({ variant, className, diff })), children: needsCodeFormatting ? /* @__PURE__ */ jsxRuntime.jsx("pre", { children }) : children });
22413
22580
  };
22414
22581
  var DiffViewTh = ({ variant = "default", children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
22415
22582
  "th",
@@ -23233,6 +23400,150 @@ var pairChunksIntoConflicts = (chunks) => {
23233
23400
  }
23234
23401
  return conflicts;
23235
23402
  };
23403
+ var DashboardHeroRoot = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
23404
+ "section",
23405
+ {
23406
+ className: cn(
23407
+ "tw-flex tw-flex-col tw-gap-6 tw-rounded-lg tw-border tw-border-solid tw-border-border tw-bg-card tw-p-8 tw-text-card-foreground",
23408
+ "md:tw-flex-row md:tw-items-center md:tw-justify-between",
23409
+ className
23410
+ ),
23411
+ ...rest,
23412
+ children
23413
+ }
23414
+ );
23415
+ var DashboardHeroBody = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("tw-flex tw-flex-col tw-gap-3", className), ...rest, children });
23416
+ var DashboardHeroEyebrow = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
23417
+ "p",
23418
+ {
23419
+ className: cn(
23420
+ "tw-m-0 tw-text-sm tw-font-semibold tw-uppercase tw-tracking-wide tw-text-primary",
23421
+ className
23422
+ ),
23423
+ ...rest,
23424
+ children
23425
+ }
23426
+ );
23427
+ var DashboardHeroTitle = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
23428
+ "h1",
23429
+ {
23430
+ className: cn(
23431
+ "tw-m-0 tw-text-3xl tw-font-semibold tw-leading-tight tw-tracking-tight tw-text-foreground",
23432
+ className
23433
+ ),
23434
+ ...rest,
23435
+ children
23436
+ }
23437
+ );
23438
+ var DashboardHeroDescription = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
23439
+ "p",
23440
+ {
23441
+ className: cn("tw-m-0 tw-max-w-prose tw-text-base tw-text-muted-foreground", className),
23442
+ ...rest,
23443
+ children
23444
+ }
23445
+ );
23446
+ var DashboardHeroActions = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("tw-mt-2 tw-flex tw-flex-wrap tw-items-center tw-gap-3", className), ...rest, children });
23447
+ var DashboardHeroAside = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("tw-flex tw-shrink-0 tw-flex-col tw-gap-2", className), ...rest, children });
23448
+ var DashboardHero = DashboardHeroRoot;
23449
+ DashboardHero.Body = DashboardHeroBody;
23450
+ DashboardHero.Eyebrow = DashboardHeroEyebrow;
23451
+ DashboardHero.Title = DashboardHeroTitle;
23452
+ DashboardHero.Description = DashboardHeroDescription;
23453
+ DashboardHero.Actions = DashboardHeroActions;
23454
+ DashboardHero.Aside = DashboardHeroAside;
23455
+ var trendClassnames = classVarianceAuthority.cva(
23456
+ ["tw-inline-flex", "tw-items-center", "tw-gap-1", "tw-text-sm", "tw-font-medium"],
23457
+ {
23458
+ variants: {
23459
+ direction: {
23460
+ up: "tw-text-success",
23461
+ down: "tw-text-destructive",
23462
+ flat: "tw-text-muted-foreground"
23463
+ }
23464
+ },
23465
+ defaultVariants: {
23466
+ direction: "flat"
23467
+ }
23468
+ }
23469
+ );
23470
+ var StatCardRoot = ({ className, children, bordered = true, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(Card, { bordered, className: cn("tw-gap-2", className), role: "group", ...rest, children });
23471
+ var StatCardIcon = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
23472
+ "div",
23473
+ {
23474
+ className: cn(
23475
+ "tw-flex tw-size-9 tw-items-center tw-justify-center tw-rounded-md tw-bg-accent tw-text-accent-foreground",
23476
+ '[&_svg:not([class*="tw-size-"])]:tw-size-5',
23477
+ className
23478
+ ),
23479
+ ...rest,
23480
+ children
23481
+ }
23482
+ );
23483
+ var StatCardLabel = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
23484
+ "p",
23485
+ {
23486
+ className: cn("tw-m-0 tw-text-sm tw-font-medium tw-text-muted-foreground", className),
23487
+ ...rest,
23488
+ children
23489
+ }
23490
+ );
23491
+ var StatCardValue = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
23492
+ "p",
23493
+ {
23494
+ className: cn(
23495
+ "tw-m-0 tw-text-3xl tw-font-semibold tw-leading-tight tw-tracking-tight tw-text-foreground",
23496
+ className
23497
+ ),
23498
+ ...rest,
23499
+ children
23500
+ }
23501
+ );
23502
+ var StatCardTrend = ({ className, direction = "flat", icon, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: trendClassnames({ direction, className }), ...rest, children: [
23503
+ icon,
23504
+ children
23505
+ ] });
23506
+ var StatCardFootnote = ({ className, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("tw-m-0 tw-text-xs tw-text-muted-foreground", className), ...rest, children });
23507
+ var StatCard = StatCardRoot;
23508
+ StatCard.Icon = StatCardIcon;
23509
+ StatCard.Label = StatCardLabel;
23510
+ StatCard.Value = StatCardValue;
23511
+ StatCard.Trend = StatCardTrend;
23512
+ StatCard.Footnote = StatCardFootnote;
23513
+ var gridClassnames = classVarianceAuthority.cva(["tw-grid", "tw-gap-4"], {
23514
+ variants: {
23515
+ columns: {
23516
+ 2: "tw-grid-cols-1 sm:tw-grid-cols-2",
23517
+ 3: "tw-grid-cols-1 sm:tw-grid-cols-2 lg:tw-grid-cols-3",
23518
+ 4: "tw-grid-cols-1 sm:tw-grid-cols-2 lg:tw-grid-cols-4"
23519
+ }
23520
+ },
23521
+ defaultVariants: {
23522
+ columns: 4
23523
+ }
23524
+ });
23525
+ var StatCardGrid = ({ className, columns = 4, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: gridClassnames({ columns, className }), ...rest, children });
23526
+ var ChartPanel = ({
23527
+ title,
23528
+ description,
23529
+ titleAs = "h3",
23530
+ toolbar,
23531
+ footer,
23532
+ className,
23533
+ bordered = true,
23534
+ children,
23535
+ ...rest
23536
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(Card, { bordered, className: cn("tw-gap-4", className), ...rest, children: [
23537
+ /* @__PURE__ */ jsxRuntime.jsxs(Card.Header, { className: "tw-flex tw-items-start tw-justify-between tw-gap-4", children: [
23538
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
23539
+ /* @__PURE__ */ jsxRuntime.jsx(Card.Title, { as: titleAs, children: title }),
23540
+ description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tw-m-0 tw-text-sm tw-text-muted-foreground", children: description }) : null
23541
+ ] }),
23542
+ toolbar ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: toolbar }) : null
23543
+ ] }),
23544
+ /* @__PURE__ */ jsxRuntime.jsx(Card.Content, { children }),
23545
+ footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-border-0 tw-border-t tw-border-solid tw-border-border tw-pt-3 tw-text-sm tw-text-muted-foreground", children: footer }) : null
23546
+ ] });
23236
23547
  var { fieldContext, useFieldContext, formContext, useFormContext } = reactForm.createFormHookContexts();
23237
23548
  var FormBody = ({ children, className, ...formProps }) => {
23238
23549
  const form = useFormContext();
@@ -23672,6 +23983,686 @@ function useAutosizeInput({
23672
23983
  ] });
23673
23984
  return { inputRef, inputStyle, sizerElement };
23674
23985
  }
23986
+
23987
+ // src/blocks/BrandEditor/color.ts
23988
+ var hexToChannels = (hex) => {
23989
+ let h = hex.trim().replace(/^#/, "");
23990
+ if (h.length === 3 || h.length === 4) {
23991
+ h = h.slice(0, 3).split("").map((c) => c + c).join("");
23992
+ } else if (h.length === 8) {
23993
+ h = h.slice(0, 6);
23994
+ }
23995
+ if (!/^[0-9a-fA-F]{6}$/.test(h)) return "0 0 0";
23996
+ const n = parseInt(h, 16);
23997
+ return `${n >> 16 & 255} ${n >> 8 & 255} ${n & 255}`;
23998
+ };
23999
+ var channelsToHex = (channels) => {
24000
+ const [r = 0, g = 0, b = 0] = channels.trim().split(/\s+/).map((n) => Number(n) || 0);
24001
+ const to2 = (v) => Math.max(0, Math.min(255, v)).toString(16).padStart(2, "0");
24002
+ return `#${to2(r)}${to2(g)}${to2(b)}`;
24003
+ };
24004
+ var COMPLETE_HEX = /^([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
24005
+ var ColorField = ({ id, label, channels, onChange }) => {
24006
+ const hex = channelsToHex(channels);
24007
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-justify-between tw-gap-2", children: [
24008
+ /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: id, className: "tw-text-xs tw-font-normal tw-text-foreground", children: label }),
24009
+ /* @__PURE__ */ jsxRuntime.jsx(
24010
+ ColorInput,
24011
+ {
24012
+ id,
24013
+ sizing: "medium",
24014
+ value: hex,
24015
+ className: "tw-w-36",
24016
+ onValueChange: (next) => {
24017
+ const clean = next.trim().replace(/^#/, "");
24018
+ if (COMPLETE_HEX.test(clean)) onChange(hexToChannels(`#${clean}`));
24019
+ }
24020
+ }
24021
+ )
24022
+ ] });
24023
+ };
24024
+
24025
+ // src/blocks/BrandEditor/contrast.ts
24026
+ var clampChannel = (n) => Number.isFinite(n) ? Math.min(255, Math.max(0, n)) : 0;
24027
+ var parseChannels = (channels) => {
24028
+ const [r = 0, g = 0, b = 0] = channels.trim().split(/\s+/).map((n) => clampChannel(Number(n)));
24029
+ return [r, g, b];
24030
+ };
24031
+ var relativeLuminance = (channels) => {
24032
+ const [r = 0, g = 0, b = 0] = parseChannels(channels).map((c) => {
24033
+ const s = c / 255;
24034
+ return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
24035
+ });
24036
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
24037
+ };
24038
+ var contrastRatio = (fg, bg) => {
24039
+ const l1 = relativeLuminance(fg);
24040
+ const l2 = relativeLuminance(bg);
24041
+ const [lighter, darker] = l1 >= l2 ? [l1, l2] : [l2, l1];
24042
+ return (lighter + 0.05) / (darker + 0.05);
24043
+ };
24044
+ var wcagLevel = (ratio) => ratio >= 7 ? "AAA" : ratio >= 4.5 ? "AA" : "fail";
24045
+ var ControlSection = ({ title, children }) => /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "tw-flex tw-flex-col tw-gap-3 tw-border-b tw-border-border tw-p-4", children: [
24046
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "tw-m-0 tw-text-xs tw-font-semibold tw-uppercase tw-tracking-wide tw-text-muted-foreground", children: title }),
24047
+ children
24048
+ ] });
24049
+ var LogoField = ({ id, label, value, onChange }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24050
+ /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: id, className: "tw-text-xs tw-font-normal tw-text-foreground", children: label }),
24051
+ /* @__PURE__ */ jsxRuntime.jsx(
24052
+ Textarea,
24053
+ {
24054
+ id,
24055
+ value,
24056
+ onValueChange: onChange,
24057
+ maxRows: 4,
24058
+ placeholder: "<svg\u2026>, a data: URI, or an https:// URL",
24059
+ className: "tw-font-mono tw-text-xs"
24060
+ }
24061
+ )
24062
+ ] });
24063
+ var TextField2 = ({ id, label, value, onChange, placeholder }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24064
+ /* @__PURE__ */ jsxRuntime.jsx(Label2, { htmlFor: id, className: "tw-text-xs tw-font-normal tw-text-foreground", children: label }),
24065
+ /* @__PURE__ */ jsxRuntime.jsx(
24066
+ TextInput,
24067
+ {
24068
+ id,
24069
+ sizing: "small",
24070
+ value,
24071
+ onValueChange: onChange,
24072
+ placeholder,
24073
+ className: "tw-font-mono tw-text-xs"
24074
+ }
24075
+ )
24076
+ ] });
24077
+ var DEFAULT_FALLBACK_FONT = "'Inter', system-ui, sans-serif";
24078
+ var DEFAULT_FONT_OPTIONS = [
24079
+ { value: DEFAULT_FALLBACK_FONT, label: "Inter (default)" },
24080
+ { value: "'Space Grotesk', system-ui, sans-serif", label: "Space Grotesk" },
24081
+ { value: "'Poppins', system-ui, sans-serif", label: "Poppins" },
24082
+ { value: "'Manrope', system-ui, sans-serif", label: "Manrope" },
24083
+ { value: "'Quicksand', system-ui, sans-serif", label: "Quicksand" },
24084
+ { value: "'Baloo 2', system-ui, sans-serif", label: "Baloo 2" },
24085
+ { value: "'Fraunces', Georgia, serif", label: "Fraunces (serif)" },
24086
+ { value: "Georgia, 'Times New Roman', serif", label: "Georgia (serif)" },
24087
+ { value: "'JetBrains Mono', ui-monospace, monospace", label: "JetBrains Mono" },
24088
+ { value: "system-ui, sans-serif", label: "System UI" }
24089
+ ];
24090
+ var COLOR_LABELS = {
24091
+ primary: "Primary",
24092
+ primaryForeground: "Primary foreground",
24093
+ background: "Background",
24094
+ foreground: "Foreground",
24095
+ card: "Card",
24096
+ cardForeground: "Card foreground",
24097
+ popover: "Popover",
24098
+ popoverForeground: "Popover foreground",
24099
+ secondary: "Secondary",
24100
+ secondaryForeground: "Secondary foreground",
24101
+ muted: "Muted",
24102
+ mutedForeground: "Muted foreground",
24103
+ accent: "Accent",
24104
+ accentForeground: "Accent foreground",
24105
+ border: "Border",
24106
+ input: "Input",
24107
+ ring: "Ring",
24108
+ ringOffset: "Ring offset",
24109
+ destructive: "Destructive",
24110
+ destructiveForeground: "Destructive foreground",
24111
+ success: "Success",
24112
+ successForeground: "Success foreground",
24113
+ warning: "Warning",
24114
+ warningForeground: "Warning foreground",
24115
+ info: "Info",
24116
+ infoForeground: "Info foreground"
24117
+ };
24118
+ var SIDEBAR_LABELS = {
24119
+ sidebar: "Sidebar",
24120
+ sidebarForeground: "Foreground",
24121
+ sidebarPrimary: "Primary",
24122
+ sidebarPrimaryForeground: "Primary foreground",
24123
+ sidebarAccent: "Accent",
24124
+ sidebarAccentForeground: "Accent foreground",
24125
+ sidebarBorder: "Border",
24126
+ sidebarRing: "Ring"
24127
+ };
24128
+ var CHART_LABELS = {
24129
+ chart1: "Chart 1",
24130
+ chart2: "Chart 2",
24131
+ chart3: "Chart 3",
24132
+ chart4: "Chart 4",
24133
+ chart5: "Chart 5"
24134
+ };
24135
+ var WEIGHT_LABELS = {
24136
+ normal: "Normal",
24137
+ medium: "Medium",
24138
+ semibold: "Semibold",
24139
+ bold: "Bold"
24140
+ };
24141
+ var SHADOW_LABELS = {
24142
+ sm: "Small",
24143
+ md: "Medium",
24144
+ lg: "Large",
24145
+ lift: "Lift (raised)"
24146
+ };
24147
+ var SPACING_LABELS = {
24148
+ gutter: "Gutter (between sections)",
24149
+ inset: "Inset (in-container)"
24150
+ };
24151
+ var MOTION_LABELS = {
24152
+ duration: "Duration",
24153
+ easing: "Easing"
24154
+ };
24155
+ var COLOR_SLOTS = Object.keys(COLOR_LABELS);
24156
+ var SIDEBAR_SLOTS = Object.keys(SIDEBAR_LABELS);
24157
+ var CHART_SLOTS = Object.keys(CHART_LABELS);
24158
+ var WEIGHT_SLOTS = Object.keys(WEIGHT_LABELS);
24159
+ var SHADOW_SLOTS = Object.keys(SHADOW_LABELS);
24160
+ var SPACING_SLOTS = Object.keys(SPACING_LABELS);
24161
+ var MOTION_SLOTS = Object.keys(MOTION_LABELS);
24162
+ var RADIUS_SIZES = ["sm", "md", "lg"];
24163
+ var A11Y_PAIRS = [
24164
+ { label: "Text on background", fg: "foreground", bg: "background" },
24165
+ { label: "Text on card", fg: "cardForeground", bg: "card" },
24166
+ { label: "Primary button", fg: "primaryForeground", bg: "primary" },
24167
+ { label: "Muted text", fg: "mutedForeground", bg: "muted" },
24168
+ { label: "Accent", fg: "accentForeground", bg: "accent" }
24169
+ ];
24170
+ var DEFAULT_SIDEBAR = {
24171
+ light: {
24172
+ sidebar: "255 255 255",
24173
+ sidebarForeground: "30 41 59",
24174
+ sidebarPrimary: "31 143 255",
24175
+ sidebarPrimaryForeground: "255 255 255",
24176
+ sidebarAccent: "219 234 254",
24177
+ sidebarAccentForeground: "30 41 59",
24178
+ sidebarBorder: "229 231 235",
24179
+ sidebarRing: "31 143 255"
24180
+ },
24181
+ dark: {
24182
+ sidebar: "14 14 18",
24183
+ sidebarForeground: "229 230 236",
24184
+ sidebarPrimary: "31 143 255",
24185
+ sidebarPrimaryForeground: "255 255 255",
24186
+ sidebarAccent: "38 38 45",
24187
+ sidebarAccentForeground: "229 230 236",
24188
+ sidebarBorder: "48 49 57",
24189
+ sidebarRing: "31 143 255"
24190
+ }
24191
+ };
24192
+ var DEFAULT_RADII = {
24193
+ sm: "0.25rem",
24194
+ md: "0.375rem",
24195
+ lg: "0.5rem"
24196
+ };
24197
+ var DEFAULT_CHART = {
24198
+ light: {
24199
+ chart1: "31 143 255",
24200
+ chart2: "0 194 135",
24201
+ chart3: "146 92 255",
24202
+ chart4: "245 147 0",
24203
+ chart5: "237 94 223"
24204
+ },
24205
+ dark: {
24206
+ chart1: "92 173 255",
24207
+ chart2: "0 230 161",
24208
+ chart3: "173 133 255",
24209
+ chart4: "255 190 92",
24210
+ chart5: "242 140 232"
24211
+ }
24212
+ };
24213
+ var DEFAULT_FONT_WEIGHTS = {
24214
+ normal: "400",
24215
+ medium: "500",
24216
+ semibold: "600",
24217
+ bold: "700"
24218
+ };
24219
+ var DEFAULT_LETTER_SPACING = "1px";
24220
+ var MONO_FALLBACK = "'JetBrains Mono', ui-monospace, monospace";
24221
+ var DEFAULT_SHADOWS = {
24222
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
24223
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
24224
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
24225
+ lift: "0 10px 30px -12px rgb(0 0 0 / 0.28), 0 2px 6px rgb(0 0 0 / 0.06)"
24226
+ };
24227
+ var DEFAULT_SPACING = {
24228
+ gutter: "1.5rem",
24229
+ inset: "1.5rem"
24230
+ };
24231
+ var DEFAULT_MOTION = {
24232
+ duration: "200ms",
24233
+ easing: "cubic-bezier(0.2, 0.7, 0.2, 1)"
24234
+ };
24235
+ var DEFAULT_GRADIENT = "linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-accent, var(--color-primary))))";
24236
+ var numOf = (value, fallback) => {
24237
+ const n = Number.parseFloat(value);
24238
+ return Number.isFinite(n) ? n : fallback;
24239
+ };
24240
+ var letterSpacingToPx = (value) => {
24241
+ const n = Number.parseFloat(value);
24242
+ if (!Number.isFinite(n)) return 0;
24243
+ return value.trim().endsWith("em") ? n * 16 : n;
24244
+ };
24245
+ var pxToLetterSpacing = (px, currentValue) => currentValue.trim().endsWith("em") ? `${Number((px / 16).toFixed(3))}em` : `${px}px`;
24246
+ var lengthToPx = (value) => {
24247
+ const n = Number.parseFloat(value);
24248
+ if (!Number.isFinite(n)) return 0;
24249
+ return Math.round(value.trim().endsWith("rem") ? n * 16 : n);
24250
+ };
24251
+ var pxToLength = (px, currentValue) => {
24252
+ const trimmed = currentValue.trim();
24253
+ if (trimmed.endsWith("rem")) return `${px / 16}rem`;
24254
+ if (/^-?\d*\.?\d+$/.test(trimmed)) return `${px}`;
24255
+ return `${px}px`;
24256
+ };
24257
+ var isSvgMarkup = (source) => source.trimStart().startsWith("<");
24258
+ var isImageSource = (source) => /^(data:|https?:\/\/)/.test(source.trim());
24259
+ var LogoPreviewImage = ({ source, className }) => {
24260
+ const safeSvg = React26.useMemo(
24261
+ () => isSvgMarkup(source) ? DOMPurify__default.default.sanitize(source, { USE_PROFILES: { svg: true, svgFilters: true } }) : null,
24262
+ [source]
24263
+ );
24264
+ if (safeSvg !== null) {
24265
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className, dangerouslySetInnerHTML: { __html: safeSvg } });
24266
+ }
24267
+ if (isImageSource(source)) {
24268
+ return /* @__PURE__ */ jsxRuntime.jsx("img", { src: source, alt: "", className });
24269
+ }
24270
+ return null;
24271
+ };
24272
+ var BrandEditor = ({
24273
+ value,
24274
+ onChange,
24275
+ colorScheme = "light",
24276
+ onColorSchemeChange,
24277
+ fontOptions = DEFAULT_FONT_OPTIONS
24278
+ }) => {
24279
+ const baseId = React26.useId();
24280
+ const { theme } = value;
24281
+ const coreColors = colorScheme === "light" ? theme.colors : theme.colorsDark;
24282
+ const sidebarColors = colorScheme === "light" ? theme.colors?.sidebar : theme.colorsDark?.sidebar;
24283
+ const chartColors = colorScheme === "light" ? theme.colors?.chart : theme.colorsDark?.chart;
24284
+ const defaultColors = colorScheme === "light" ? brandRegistry.keboola.theme.colors : brandRegistry.keboola.theme.colorsDark;
24285
+ const radii = theme.radii ?? DEFAULT_RADII;
24286
+ const typography = theme.typography;
24287
+ const setColor = (slot, channels) => {
24288
+ if (colorScheme === "light") {
24289
+ onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, [slot]: channels } } });
24290
+ return;
24291
+ }
24292
+ onChange({
24293
+ ...value,
24294
+ theme: { ...theme, colorsDark: { ...theme.colorsDark, [slot]: channels } }
24295
+ });
24296
+ };
24297
+ const setSidebarColor = (slot, channels) => {
24298
+ if (colorScheme === "light") {
24299
+ const base = theme.colors?.sidebar ?? DEFAULT_SIDEBAR.light;
24300
+ onChange({
24301
+ ...value,
24302
+ theme: { ...theme, colors: { ...theme.colors, sidebar: { ...base, [slot]: channels } } }
24303
+ });
24304
+ return;
24305
+ }
24306
+ const sidebarBase = theme.colorsDark?.sidebar ?? DEFAULT_SIDEBAR.dark;
24307
+ onChange({
24308
+ ...value,
24309
+ theme: {
24310
+ ...theme,
24311
+ colorsDark: { ...theme.colorsDark, sidebar: { ...sidebarBase, [slot]: channels } }
24312
+ }
24313
+ });
24314
+ };
24315
+ const setChart = (slot, channels) => {
24316
+ const base = chartColors ?? DEFAULT_CHART[colorScheme];
24317
+ const chart = { ...base, [slot]: channels };
24318
+ if (colorScheme === "light") {
24319
+ onChange({ ...value, theme: { ...theme, colors: { ...theme.colors, chart } } });
24320
+ return;
24321
+ }
24322
+ onChange({ ...value, theme: { ...theme, colorsDark: { ...theme.colorsDark, chart } } });
24323
+ };
24324
+ const setRadius = (size, radius) => onChange({
24325
+ ...value,
24326
+ theme: { ...theme, radii: { ...theme.radii ?? DEFAULT_RADII, [size]: radius } }
24327
+ });
24328
+ const patchTypography = (patch) => onChange({ ...value, theme: { ...theme, typography: { ...theme.typography, ...patch } } });
24329
+ const setFontFace = (face, font) => patchTypography({ [face]: font.trim() || void 0 });
24330
+ const setFontWeight = (slot, weight) => patchTypography({ weight: { ...theme.typography?.weight, [slot]: weight || void 0 } });
24331
+ const setLetterSpacing = (chrome) => patchTypography({ letterSpacing: { chrome: chrome.trim() || void 0 } });
24332
+ const setShadow = (slot, shadow) => onChange({
24333
+ ...value,
24334
+ theme: { ...theme, shadows: { ...theme.shadows, [slot]: shadow.trim() || void 0 } }
24335
+ });
24336
+ const setSpacing = (slot, length) => onChange({
24337
+ ...value,
24338
+ theme: { ...theme, spacing: { ...theme.spacing, [slot]: length.trim() || void 0 } }
24339
+ });
24340
+ const setMotion = (slot, token) => onChange({
24341
+ ...value,
24342
+ theme: { ...theme, motion: { ...theme.motion, [slot]: token.trim() || void 0 } }
24343
+ });
24344
+ const setGradient = (gradient) => onChange({
24345
+ ...value,
24346
+ theme: { ...theme, gradient: { brand: gradient.trim() || void 0 } }
24347
+ });
24348
+ const setLogo = (slot, source) => {
24349
+ const trimmed = source.trim();
24350
+ const nextLogo = { ...value.logo };
24351
+ if (trimmed) nextLogo[slot] = trimmed;
24352
+ else delete nextLogo[slot];
24353
+ const { logo: _drop, ...rest } = value;
24354
+ onChange(Object.keys(nextLogo).length > 0 ? { ...value, logo: nextLogo } : rest);
24355
+ };
24356
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col", children: [
24357
+ /* @__PURE__ */ jsxRuntime.jsxs(ControlSection, { title: "Colors", children: [
24358
+ onColorSchemeChange ? /* @__PURE__ */ jsxRuntime.jsxs(
24359
+ ToggleGroup,
24360
+ {
24361
+ type: "single",
24362
+ value: colorScheme,
24363
+ onValueChange: (next) => {
24364
+ if (next === "light" || next === "dark") onColorSchemeChange(next);
24365
+ },
24366
+ "aria-label": "Color scheme",
24367
+ className: "tw-w-full",
24368
+ children: [
24369
+ /* @__PURE__ */ jsxRuntime.jsx(ToggleGroup.Item, { value: "light", className: "tw-flex-1", children: "Light" }),
24370
+ /* @__PURE__ */ jsxRuntime.jsx(ToggleGroup.Item, { value: "dark", className: "tw-flex-1", children: "Dark" })
24371
+ ]
24372
+ }
24373
+ ) : null,
24374
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-2", children: COLOR_SLOTS.map((slot) => /* @__PURE__ */ jsxRuntime.jsx(
24375
+ ColorField,
24376
+ {
24377
+ id: `${baseId}color-${colorScheme}-${slot}`,
24378
+ label: COLOR_LABELS[slot],
24379
+ channels: coreColors?.[slot] ?? defaultColors?.[slot] ?? "0 0 0",
24380
+ onChange: (channels) => setColor(slot, channels)
24381
+ },
24382
+ slot
24383
+ )) })
24384
+ ] }),
24385
+ /* @__PURE__ */ jsxRuntime.jsxs(ControlSection, { title: "Accessibility", children: [
24386
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "tw-m-0 tw-text-xs tw-text-muted-foreground", children: [
24387
+ "WCAG contrast for the ",
24388
+ colorScheme,
24389
+ " palette (AA needs 4.5:1)."
24390
+ ] }),
24391
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-1.5", children: A11Y_PAIRS.map((pair) => {
24392
+ const fg = coreColors?.[pair.fg] ?? defaultColors?.[pair.fg] ?? "0 0 0";
24393
+ const bg = coreColors?.[pair.bg] ?? defaultColors?.[pair.bg] ?? "255 255 255";
24394
+ const ratio = contrastRatio(fg, bg);
24395
+ const level = wcagLevel(ratio);
24396
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-justify-between tw-gap-2", children: [
24397
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-text-xs tw-text-foreground", children: pair.label }),
24398
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-1.5", children: [
24399
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "tw-text-xs tw-tabular-nums tw-text-muted-foreground", children: [
24400
+ ratio.toFixed(1),
24401
+ ":1"
24402
+ ] }),
24403
+ /* @__PURE__ */ jsxRuntime.jsx(Badge, { color: level === "fail" ? "red" : "green", children: level === "fail" ? "Fail" : level })
24404
+ ] })
24405
+ ] }, pair.label);
24406
+ }) })
24407
+ ] }),
24408
+ /* @__PURE__ */ jsxRuntime.jsx(ControlSection, { title: "Sidebar colors", children: /* @__PURE__ */ jsxRuntime.jsxs(Collapsible, { className: "tw-flex tw-flex-col tw-gap-2", children: [
24409
+ /* @__PURE__ */ jsxRuntime.jsx(Collapsible.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "small", className: "tw-w-full", children: [
24410
+ "Toggle sidebar tokens (",
24411
+ colorScheme,
24412
+ ")"
24413
+ ] }) }),
24414
+ /* @__PURE__ */ jsxRuntime.jsx(Collapsible.Content, { className: "tw-flex tw-flex-col tw-gap-2", children: SIDEBAR_SLOTS.map((slot) => /* @__PURE__ */ jsxRuntime.jsx(
24415
+ ColorField,
24416
+ {
24417
+ id: `${baseId}sidebar-${colorScheme}-${slot}`,
24418
+ label: SIDEBAR_LABELS[slot],
24419
+ channels: sidebarColors?.[slot] ?? DEFAULT_SIDEBAR[colorScheme][slot],
24420
+ onChange: (channels) => setSidebarColor(slot, channels)
24421
+ },
24422
+ slot
24423
+ )) })
24424
+ ] }) }),
24425
+ /* @__PURE__ */ jsxRuntime.jsxs(ControlSection, { title: "Chart palette", children: [
24426
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "tw-m-0 tw-text-xs tw-text-muted-foreground", children: [
24427
+ "Categorical series colours for the ",
24428
+ colorScheme,
24429
+ " palette (`--color-chart-1\u20265`)."
24430
+ ] }),
24431
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-2", children: CHART_SLOTS.map((slot) => /* @__PURE__ */ jsxRuntime.jsx(
24432
+ ColorField,
24433
+ {
24434
+ id: `${baseId}chart-${colorScheme}-${slot}`,
24435
+ label: CHART_LABELS[slot],
24436
+ channels: chartColors?.[slot] ?? DEFAULT_CHART[colorScheme][slot],
24437
+ onChange: (channels) => setChart(slot, channels)
24438
+ },
24439
+ slot
24440
+ )) })
24441
+ ] }),
24442
+ /* @__PURE__ */ jsxRuntime.jsx(ControlSection, { title: "Radius", children: RADIUS_SIZES.map((size) => {
24443
+ const current = radii[size];
24444
+ const px = lengthToPx(current);
24445
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24446
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-justify-between", children: [
24447
+ /* @__PURE__ */ jsxRuntime.jsx(Label2, { className: "tw-text-xs tw-font-normal tw-uppercase tw-text-foreground", children: size }),
24448
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-text-xs tw-tabular-nums tw-text-muted-foreground", children: radii[size] })
24449
+ ] }),
24450
+ /* @__PURE__ */ jsxRuntime.jsx(
24451
+ Slider,
24452
+ {
24453
+ min: 0,
24454
+ max: 24,
24455
+ step: 1,
24456
+ value: [px],
24457
+ onValueChange: (values) => setRadius(size, pxToLength(values[0] ?? 0, current))
24458
+ }
24459
+ )
24460
+ ] }, size);
24461
+ }) }),
24462
+ /* @__PURE__ */ jsxRuntime.jsxs(ControlSection, { title: "Typography", children: [
24463
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24464
+ /* @__PURE__ */ jsxRuntime.jsx(
24465
+ Label2,
24466
+ {
24467
+ htmlFor: `${baseId}font-family`,
24468
+ className: "tw-text-xs tw-font-normal tw-text-foreground",
24469
+ children: "Font family"
24470
+ }
24471
+ ),
24472
+ /* @__PURE__ */ jsxRuntime.jsx(
24473
+ Select2,
24474
+ {
24475
+ id: `${baseId}font-family`,
24476
+ value: typography?.fontFamily ?? DEFAULT_FALLBACK_FONT,
24477
+ onValueChange: (font) => setFontFace("fontFamily", font),
24478
+ items: fontOptions
24479
+ }
24480
+ )
24481
+ ] }),
24482
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24483
+ /* @__PURE__ */ jsxRuntime.jsx(
24484
+ Label2,
24485
+ {
24486
+ htmlFor: `${baseId}font-display`,
24487
+ className: "tw-text-xs tw-font-normal tw-text-foreground",
24488
+ children: "Display font (headings)"
24489
+ }
24490
+ ),
24491
+ /* @__PURE__ */ jsxRuntime.jsx(
24492
+ Select2,
24493
+ {
24494
+ id: `${baseId}font-display`,
24495
+ value: typography?.fontDisplay ?? typography?.fontFamily ?? DEFAULT_FALLBACK_FONT,
24496
+ onValueChange: (font) => setFontFace("fontDisplay", font),
24497
+ items: fontOptions
24498
+ }
24499
+ )
24500
+ ] }),
24501
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24502
+ /* @__PURE__ */ jsxRuntime.jsx(
24503
+ Label2,
24504
+ {
24505
+ htmlFor: `${baseId}font-mono`,
24506
+ className: "tw-text-xs tw-font-normal tw-text-foreground",
24507
+ children: "Monospace font"
24508
+ }
24509
+ ),
24510
+ /* @__PURE__ */ jsxRuntime.jsx(
24511
+ Select2,
24512
+ {
24513
+ id: `${baseId}font-mono`,
24514
+ value: typography?.fontMono ?? MONO_FALLBACK,
24515
+ onValueChange: (font) => setFontFace("fontMono", font),
24516
+ items: fontOptions
24517
+ }
24518
+ )
24519
+ ] }),
24520
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-text-xs tw-text-muted-foreground", children: "Chrome font weights" }),
24521
+ WEIGHT_SLOTS.map((slot) => {
24522
+ const current = typography?.weight?.[slot] ?? DEFAULT_FONT_WEIGHTS[slot];
24523
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24524
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-justify-between", children: [
24525
+ /* @__PURE__ */ jsxRuntime.jsx(Label2, { className: "tw-text-xs tw-font-normal tw-text-foreground", children: WEIGHT_LABELS[slot] }),
24526
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-text-xs tw-tabular-nums tw-text-muted-foreground", children: current })
24527
+ ] }),
24528
+ /* @__PURE__ */ jsxRuntime.jsx(
24529
+ Slider,
24530
+ {
24531
+ min: 100,
24532
+ max: 900,
24533
+ step: 25,
24534
+ value: [numOf(current, 400)],
24535
+ onValueChange: (values) => setFontWeight(slot, String(values[0] ?? 400))
24536
+ }
24537
+ )
24538
+ ] }, slot);
24539
+ }),
24540
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24541
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-justify-between", children: [
24542
+ /* @__PURE__ */ jsxRuntime.jsx(Label2, { className: "tw-text-xs tw-font-normal tw-text-foreground", children: "Chrome letter spacing" }),
24543
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-text-xs tw-tabular-nums tw-text-muted-foreground", children: typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING })
24544
+ ] }),
24545
+ /* @__PURE__ */ jsxRuntime.jsx(
24546
+ Slider,
24547
+ {
24548
+ min: -2,
24549
+ max: 4,
24550
+ step: 0.25,
24551
+ value: [letterSpacingToPx(typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING)],
24552
+ onValueChange: (values) => setLetterSpacing(
24553
+ pxToLetterSpacing(
24554
+ values[0] ?? 0,
24555
+ typography?.letterSpacing?.chrome ?? DEFAULT_LETTER_SPACING
24556
+ )
24557
+ )
24558
+ }
24559
+ )
24560
+ ] })
24561
+ ] }),
24562
+ /* @__PURE__ */ jsxRuntime.jsxs(ControlSection, { title: "Elevation", children: [
24563
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tw-m-0 tw-text-xs tw-text-muted-foreground", children: "Box-shadow scale (`--shadow-*`), shared across light & dark. Empty inherits the default." }),
24564
+ SHADOW_SLOTS.map((slot) => /* @__PURE__ */ jsxRuntime.jsx(
24565
+ TextField2,
24566
+ {
24567
+ id: `${baseId}shadow-${slot}`,
24568
+ label: SHADOW_LABELS[slot],
24569
+ value: theme.shadows?.[slot] ?? "",
24570
+ placeholder: DEFAULT_SHADOWS[slot],
24571
+ onChange: (next) => setShadow(slot, next)
24572
+ },
24573
+ slot
24574
+ ))
24575
+ ] }),
24576
+ /* @__PURE__ */ jsxRuntime.jsxs(ControlSection, { title: "Density", children: [
24577
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tw-m-0 tw-text-xs tw-text-muted-foreground", children: "Semantic spacing (`--space-*`), as CSS lengths." }),
24578
+ SPACING_SLOTS.map((slot) => /* @__PURE__ */ jsxRuntime.jsx(
24579
+ TextField2,
24580
+ {
24581
+ id: `${baseId}spacing-${slot}`,
24582
+ label: SPACING_LABELS[slot],
24583
+ value: theme.spacing?.[slot] ?? "",
24584
+ placeholder: DEFAULT_SPACING[slot],
24585
+ onChange: (next) => setSpacing(slot, next)
24586
+ },
24587
+ slot
24588
+ ))
24589
+ ] }),
24590
+ /* @__PURE__ */ jsxRuntime.jsxs(ControlSection, { title: "Motion", children: [
24591
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "tw-m-0 tw-text-xs tw-text-muted-foreground", children: "Base transition `duration` + `easing` (`--motion-*`)." }),
24592
+ MOTION_SLOTS.map((slot) => /* @__PURE__ */ jsxRuntime.jsx(
24593
+ TextField2,
24594
+ {
24595
+ id: `${baseId}motion-${slot}`,
24596
+ label: MOTION_LABELS[slot],
24597
+ value: theme.motion?.[slot] ?? "",
24598
+ placeholder: DEFAULT_MOTION[slot],
24599
+ onChange: (next) => setMotion(slot, next)
24600
+ },
24601
+ slot
24602
+ ))
24603
+ ] }),
24604
+ /* @__PURE__ */ jsxRuntime.jsx(ControlSection, { title: "Gradient", children: /* @__PURE__ */ jsxRuntime.jsx(
24605
+ TextField2,
24606
+ {
24607
+ id: `${baseId}gradient-brand`,
24608
+ label: "Brand gradient",
24609
+ value: theme.gradient?.brand ?? "",
24610
+ placeholder: DEFAULT_GRADIENT,
24611
+ onChange: setGradient
24612
+ }
24613
+ ) }),
24614
+ /* @__PURE__ */ jsxRuntime.jsxs(ControlSection, { title: "Logo", children: [
24615
+ /* @__PURE__ */ jsxRuntime.jsx(
24616
+ LogoField,
24617
+ {
24618
+ id: `${baseId}logo-mark`,
24619
+ label: "Mark (icon)",
24620
+ value: value.logo?.mark ?? "",
24621
+ onChange: (source) => setLogo("mark", source)
24622
+ }
24623
+ ),
24624
+ /* @__PURE__ */ jsxRuntime.jsx(
24625
+ LogoField,
24626
+ {
24627
+ id: `${baseId}logo-wordmark`,
24628
+ label: "Wordmark (full)",
24629
+ value: value.logo?.wordmark ?? "",
24630
+ onChange: (source) => setLogo("wordmark", source)
24631
+ }
24632
+ ),
24633
+ /* @__PURE__ */ jsxRuntime.jsxs(Collapsible, { className: "tw-flex tw-flex-col tw-gap-2", children: [
24634
+ /* @__PURE__ */ jsxRuntime.jsx(Collapsible.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "small", className: "tw-w-full", children: "Toggle dark-mode logos" }) }),
24635
+ /* @__PURE__ */ jsxRuntime.jsxs(Collapsible.Content, { className: "tw-flex tw-flex-col tw-gap-2", children: [
24636
+ /* @__PURE__ */ jsxRuntime.jsx(
24637
+ LogoField,
24638
+ {
24639
+ id: `${baseId}logo-mark-dark`,
24640
+ label: "Mark (dark)",
24641
+ value: value.logo?.markDark ?? "",
24642
+ onChange: (source) => setLogo("markDark", source)
24643
+ }
24644
+ ),
24645
+ /* @__PURE__ */ jsxRuntime.jsx(
24646
+ LogoField,
24647
+ {
24648
+ id: `${baseId}logo-wordmark-dark`,
24649
+ label: "Wordmark (dark)",
24650
+ value: value.logo?.wordmarkDark ?? "",
24651
+ onChange: (source) => setLogo("wordmarkDark", source)
24652
+ }
24653
+ )
24654
+ ] })
24655
+ ] }),
24656
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-1", children: [
24657
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-text-xs tw-text-muted-foreground", children: "Preview" }),
24658
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-12 tw-items-center tw-gap-4 tw-rounded-md tw-border tw-border-border tw-bg-background tw-p-3", children: value.logo?.mark || value.logo?.wordmark ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
24659
+ value.logo.mark ? /* @__PURE__ */ jsxRuntime.jsx(LogoPreviewImage, { source: value.logo.mark, className: "tw-h-8" }) : null,
24660
+ value.logo.wordmark ? /* @__PURE__ */ jsxRuntime.jsx(LogoPreviewImage, { source: value.logo.wordmark, className: "tw-h-8" }) : null
24661
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tw-text-xs tw-text-muted-foreground", children: "No logo set" }) })
24662
+ ] })
24663
+ ] })
24664
+ ] });
24665
+ };
23675
24666
  /*! Bundled license information:
23676
24667
 
23677
24668
  react-is/cjs/react-is.production.min.js:
@@ -23762,6 +24753,7 @@ exports.ArgoDesignContext = ArgoDesignContext;
23762
24753
  exports.AutoSaveTextarea = AutoSaveTextarea;
23763
24754
  exports.Avatar = Avatar;
23764
24755
  exports.Badge = Badge;
24756
+ exports.BrandEditor = BrandEditor;
23765
24757
  exports.BrandLogo = BrandLogo;
23766
24758
  exports.Breadcrumb = Breadcrumb;
23767
24759
  exports.Button = Button;
@@ -23769,6 +24761,7 @@ exports.ButtonGroup = ButtonGroup;
23769
24761
  exports.ButtonInline = ButtonInline;
23770
24762
  exports.Calendar = Calendar;
23771
24763
  exports.Card = Card;
24764
+ exports.ChartPanel = ChartPanel;
23772
24765
  exports.Checkbox = Checkbox;
23773
24766
  exports.Clipboard = Clipboard;
23774
24767
  exports.ClipboardButton = ClipboardButton;
@@ -23788,7 +24781,10 @@ exports.CommandList = CommandList;
23788
24781
  exports.ConflictStatusIndicator = ConflictStatusIndicator;
23789
24782
  exports.CopyField = CopyField;
23790
24783
  exports.DEFAULT_COLOR_SCHEME = DEFAULT_COLOR_SCHEME;
24784
+ exports.DEFAULT_FALLBACK_FONT = DEFAULT_FALLBACK_FONT;
24785
+ exports.DEFAULT_FONT_OPTIONS = DEFAULT_FONT_OPTIONS;
23791
24786
  exports.DEFAULT_KEBOOLA_BRAND_ID = DEFAULT_BRAND_ID;
24787
+ exports.DashboardHero = DashboardHero;
23792
24788
  exports.DateInput = DateInput;
23793
24789
  exports.DatePicker = DatePicker;
23794
24790
  exports.DateRangeInput = DateRangeInput;
@@ -23806,6 +24802,7 @@ exports.FormGroup = FormGroup;
23806
24802
  exports.FullScreenModal = FullScreenModal;
23807
24803
  exports.FullScreenModalBody = FullScreenModalBody;
23808
24804
  exports.FullScreenModalHeader = FullScreenModalHeader;
24805
+ exports.GoogleButton = GoogleButton;
23809
24806
  exports.HelpBlock = HelpBlock;
23810
24807
  exports.HoverCard = HoverCard;
23811
24808
  exports.InlineStepDetail = InlineStepDetail;
@@ -23857,6 +24854,8 @@ exports.SkeletonList = SkeletonList;
23857
24854
  exports.Slider = Slider;
23858
24855
  exports.SplitButton = SplitButton;
23859
24856
  exports.SpotlightBackdrop = SpotlightBackdrop;
24857
+ exports.StatCard = StatCard;
24858
+ exports.StatCardGrid = StatCardGrid;
23860
24859
  exports.Stepper = Stepper;
23861
24860
  exports.SuggestedPrompt = SuggestedPrompt;
23862
24861
  exports.Switch = Switch;
@@ -23883,10 +24882,13 @@ exports.UsageStats = UsageStats;
23883
24882
  exports.UsageStatsRing = UsageStatsRing;
23884
24883
  exports.ZoomableSvg = ZoomableSvg;
23885
24884
  exports.argoVariants = argoVariants;
24885
+ exports.channelsToHex = channelsToHex;
23886
24886
  exports.cn = cn;
23887
24887
  exports.computeDiffRows = computeDiffRows;
23888
24888
  exports.computeLineInformation = computeLineInformation;
24889
+ exports.contrastRatio = contrastRatio;
23889
24890
  exports.copyToClipboard = copyToClipboard;
24891
+ exports.hexToChannels = hexToChannels;
23890
24892
  exports.isMac = isMac;
23891
24893
  exports.kbdVariants = kbdVariants;
23892
24894
  exports.keys = keys;
@@ -23902,6 +24904,7 @@ exports.useScrollbarPosition = useScrollbarPosition;
23902
24904
  exports.useSidebar = useSidebar;
23903
24905
  exports.useTargetRect = useTargetRect;
23904
24906
  exports.useTheme = useTheme;
24907
+ exports.wcagLevel = wcagLevel;
23905
24908
  exports.withForm = withForm;
23906
24909
  //# sourceMappingURL=index.cjs.map
23907
24910
  //# sourceMappingURL=index.cjs.map