@juv/codego-react-ui 3.2.4 → 3.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4074,7 +4074,7 @@ function Select({
4074
4074
  ] }, getKey(opt))) }),
4075
4075
  /* @__PURE__ */ jsx21("div", { className: "max-h-48 overflow-y-auto p-1", children: options.map((option) => {
4076
4076
  const checked = selectedValues.includes(getKey(option));
4077
- return /* @__PURE__ */ jsxs19("label", { className: cn("flex items-center gap-3 rounded-lg px-3 py-2 text-sm cursor-pointer transition-colors hover:bg-accent", checked && "bg-primary/8 text-primary"), children: [
4077
+ return /* @__PURE__ */ jsxs19("label", { className: cn("flex items-center gap-3 rounded-lg px-3 py-2 text-sm cursor-pointer transition-colors hover:bg-primary", checked && "bg-primary/8 text-primary"), children: [
4078
4078
  /* @__PURE__ */ jsx21("span", { className: cn("flex h-4 w-4 shrink-0 items-center justify-center rounded border transition-colors", checked ? "bg-primary border-primary text-primary-foreground" : "border-slate-900/30 bg-background/50"), children: checked && /* @__PURE__ */ jsx21(Check3, { className: "h-3 w-3" }) }),
4079
4079
  /* @__PURE__ */ jsx21(
4080
4080
  "input",
@@ -4112,7 +4112,7 @@ function Select({
4112
4112
  "aria-required": required,
4113
4113
  "aria-invalid": !!error,
4114
4114
  className: cn(
4115
- "w-full appearance-none rounded-xl border border-slate-900/30 bg-background/50 backdrop-blur-sm px-4 py-2 pr-10 h-10 text-sm text-foreground transition-colors hover:bg-background/80 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
4115
+ "w-full appearance-none rounded-xl border border-slate-900/30 bg-background/50 backdrop-blur-sm px-4 py-2 pr-10 h-10 text-sm text-foreground transition-colors hover:bg-primary/80 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
4116
4116
  error && "border-destructive focus:ring-destructive"
4117
4117
  ),
4118
4118
  children: [
@@ -4207,8 +4207,8 @@ function Select({
4207
4207
  "div",
4208
4208
  {
4209
4209
  className: cn(
4210
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",
4211
- (multiple ? selectedValues.includes(getKey(option)) : value === getKey(option)) && "bg-accent text-accent-foreground"
4210
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-primary/10 hover:text-primary",
4211
+ (multiple ? selectedValues.includes(getKey(option)) : value === getKey(option)) && "bg-primary/80 text-primary-foreground"
4212
4212
  ),
4213
4213
  onClick: () => handleSelect(getKey(option)),
4214
4214
  children: [
@@ -6376,6 +6376,23 @@ function ModalShell({ title, onClose, children, footer }) {
6376
6376
  document.body
6377
6377
  );
6378
6378
  }
6379
+ var BUILT_IN_PATTERNS = {
6380
+ email: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
6381
+ url: /^https?:\/\/.+/,
6382
+ numeric: /^\d+(\.\d+)?$/,
6383
+ alpha: /^[a-zA-Z]+$/,
6384
+ alphanumeric: /^[a-zA-Z0-9]+$/
6385
+ };
6386
+ function validateField(field, value) {
6387
+ if (field.required && (value === "" || value === null || value === void 0))
6388
+ return `${field.label} is required`;
6389
+ if (field.validation && value !== "" && value !== null && value !== void 0) {
6390
+ const pattern = field.validation instanceof RegExp ? field.validation : BUILT_IN_PATTERNS[field.validation];
6391
+ if (pattern && !pattern.test(String(value)))
6392
+ return field.validationMessage ?? `${field.label} is invalid`;
6393
+ }
6394
+ return null;
6395
+ }
6379
6396
  function FieldRenderer({ field, value, onChange }) {
6380
6397
  if (field.render) return /* @__PURE__ */ jsx32(Fragment11, { children: field.render(value, onChange) });
6381
6398
  const strOptions = (field.options ?? []).map(
@@ -6533,7 +6550,8 @@ function EditModal({
6533
6550
  itemId,
6534
6551
  onClose,
6535
6552
  onSuccess,
6536
- notif
6553
+ notif,
6554
+ grid
6537
6555
  }) {
6538
6556
  const [form, setForm] = React28.useState(() => {
6539
6557
  const init = {};
@@ -6542,11 +6560,22 @@ function EditModal({
6542
6560
  });
6543
6561
  return init;
6544
6562
  });
6563
+ const [fieldErrors, setFieldErrors] = React28.useState({});
6545
6564
  const [loading, setLoading] = React28.useState(false);
6546
6565
  const [error, setError] = React28.useState(null);
6547
6566
  const [banner, setBanner] = React28.useState(false);
6548
6567
  const handleSubmit = async (e) => {
6549
6568
  e.preventDefault();
6569
+ const errs = {};
6570
+ fields.forEach((f) => {
6571
+ const msg = validateField(f, form[f.key]);
6572
+ if (msg) errs[f.key] = msg;
6573
+ });
6574
+ if (Object.keys(errs).length) {
6575
+ setFieldErrors(errs);
6576
+ return;
6577
+ }
6578
+ setFieldErrors({});
6550
6579
  setLoading(true);
6551
6580
  setError(null);
6552
6581
  try {
@@ -6577,8 +6606,8 @@ function EditModal({
6577
6606
  loading ? "Saving\u2026" : "Save Changes"
6578
6607
  ] })
6579
6608
  ] }),
6580
- children: /* @__PURE__ */ jsxs30("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
6581
- banner && notif && /* @__PURE__ */ jsxs30("div", { className: "space-y-2", children: [
6609
+ children: /* @__PURE__ */ jsxs30("form", { onSubmit: handleSubmit, className: grid ? `grid gap-4` : "space-y-4", style: grid ? { gridTemplateColumns: `repeat(${grid}, minmax(0, 1fr))` } : void 0, children: [
6610
+ banner && notif && /* @__PURE__ */ jsxs30("div", { className: "space-y-2", style: grid ? { gridColumn: `1 / -1` } : void 0, children: [
6582
6611
  /* @__PURE__ */ jsx32(
6583
6612
  NotificationBanner,
6584
6613
  {
@@ -6590,21 +6619,38 @@ function EditModal({
6590
6619
  ),
6591
6620
  notif.action && /* @__PURE__ */ jsx32("div", { children: notif.action })
6592
6621
  ] }),
6593
- fields.map((f) => /* @__PURE__ */ jsxs30("div", { children: [
6594
- f.type !== "checkbox" && /* @__PURE__ */ jsxs30("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
6595
- f.label,
6596
- f.required && /* @__PURE__ */ jsx32("span", { className: "text-danger ml-0.5", children: "*" })
6597
- ] }),
6598
- /* @__PURE__ */ jsx32(
6599
- FieldRenderer,
6600
- {
6601
- field: f,
6602
- value: form[f.key],
6603
- onChange: (v) => setForm((prev) => ({ ...prev, [f.key]: v }))
6604
- }
6605
- )
6606
- ] }, f.key)),
6607
- error && /* @__PURE__ */ jsx32("p", { className: "text-xs text-danger", children: error })
6622
+ fields.map((f) => /* @__PURE__ */ jsxs30(
6623
+ "div",
6624
+ {
6625
+ style: {
6626
+ ...f.colSpan ? { gridColumn: `span ${f.colSpan}` } : {},
6627
+ ...f.rowSpan ? { gridRow: `span ${f.rowSpan}` } : {}
6628
+ },
6629
+ children: [
6630
+ f.type !== "checkbox" && /* @__PURE__ */ jsxs30("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
6631
+ f.label,
6632
+ f.required && /* @__PURE__ */ jsx32("span", { className: "text-danger ml-0.5", children: "*" })
6633
+ ] }),
6634
+ /* @__PURE__ */ jsx32(
6635
+ FieldRenderer,
6636
+ {
6637
+ field: f,
6638
+ value: form[f.key],
6639
+ onChange: (v) => {
6640
+ setForm((prev) => ({ ...prev, [f.key]: v }));
6641
+ if (fieldErrors[f.key]) {
6642
+ const msg = validateField(f, v);
6643
+ setFieldErrors((prev) => ({ ...prev, [f.key]: msg ?? "" }));
6644
+ }
6645
+ }
6646
+ }
6647
+ ),
6648
+ fieldErrors[f.key] && /* @__PURE__ */ jsx32("p", { className: "text-xs text-danger mt-1", children: fieldErrors[f.key] })
6649
+ ]
6650
+ },
6651
+ f.key
6652
+ )),
6653
+ error && /* @__PURE__ */ jsx32("p", { className: "text-xs text-danger", style: grid ? { gridColumn: `1 / -1` } : void 0, children: error })
6608
6654
  ] })
6609
6655
  }
6610
6656
  );
@@ -7125,6 +7171,7 @@ function Table({
7125
7171
  baseUrl: defaultActions.baseUrl,
7126
7172
  itemId: String(editItem[actionIdKey] ?? ""),
7127
7173
  notif: defaultActions.onSuccessNotif,
7174
+ grid: defaultActions.editFormGrid,
7128
7175
  onClose: () => setEditItem(null),
7129
7176
  onSuccess: (updated) => {
7130
7177
  setTableData(
@@ -7240,6 +7287,40 @@ function useServerDataGrid({ url, params, encrypt, key, decryptPayloadLog, colum
7240
7287
  reload: () => setTick((t) => t + 1)
7241
7288
  };
7242
7289
  }
7290
+ function ActionBtn2({
7291
+ cfg,
7292
+ defaultIcon,
7293
+ defaultLabel,
7294
+ defaultVariant,
7295
+ onClick
7296
+ }) {
7297
+ const mode = cfg?.displayMode ?? "icon";
7298
+ const icon = cfg?.icon ?? defaultIcon;
7299
+ const label = cfg?.label ?? defaultLabel;
7300
+ return /* @__PURE__ */ jsx33(
7301
+ Button,
7302
+ {
7303
+ type: "button",
7304
+ title: label,
7305
+ size: cfg?.size ?? "xs",
7306
+ variant: cfg?.variant ?? defaultVariant,
7307
+ rounded: cfg?.rounded ?? "lg",
7308
+ gradientFrom: cfg?.gradientFrom,
7309
+ gradientTo: cfg?.gradientTo,
7310
+ gradientDirection: cfg?.gradientDirection,
7311
+ bgColor: cfg?.bgColor,
7312
+ textColor: cfg?.textColor,
7313
+ borderColor: cfg?.borderColor,
7314
+ borderWidth: cfg?.borderWidth,
7315
+ shadow: cfg?.shadow,
7316
+ iconOnly: mode === "icon",
7317
+ leftIcon: mode !== "text" ? icon : void 0,
7318
+ className: cfg?.className,
7319
+ onClick,
7320
+ children: mode !== "icon" ? label : void 0
7321
+ }
7322
+ );
7323
+ }
7243
7324
  function DGModalShell({ title, onClose, children, footer }) {
7244
7325
  return createPortal4(
7245
7326
  /* @__PURE__ */ jsx33(
@@ -7355,7 +7436,8 @@ function DGEditModal({
7355
7436
  itemId,
7356
7437
  onClose,
7357
7438
  onSuccess,
7358
- notif
7439
+ notif,
7440
+ grid
7359
7441
  }) {
7360
7442
  const [form, setForm] = React29.useState(() => {
7361
7443
  const init = {};
@@ -7364,11 +7446,22 @@ function DGEditModal({
7364
7446
  });
7365
7447
  return init;
7366
7448
  });
7449
+ const [fieldErrors, setFieldErrors] = React29.useState({});
7367
7450
  const [loading, setLoading] = React29.useState(false);
7368
7451
  const [error, setError] = React29.useState(null);
7369
7452
  const [banner, setBanner] = React29.useState(false);
7370
7453
  const handleSubmit = async (e) => {
7371
7454
  e.preventDefault();
7455
+ const errs = {};
7456
+ fields.forEach((f) => {
7457
+ const msg = validateField(f, form[f.key]);
7458
+ if (msg) errs[f.key] = msg;
7459
+ });
7460
+ if (Object.keys(errs).length) {
7461
+ setFieldErrors(errs);
7462
+ return;
7463
+ }
7464
+ setFieldErrors({});
7372
7465
  setLoading(true);
7373
7466
  setError(null);
7374
7467
  try {
@@ -7399,27 +7492,26 @@ function DGEditModal({
7399
7492
  loading ? "Saving\u2026" : "Save Changes"
7400
7493
  ] })
7401
7494
  ] }),
7402
- children: /* @__PURE__ */ jsxs31("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
7403
- banner && notif && /* @__PURE__ */ jsxs31("div", { className: "space-y-2", children: [
7404
- /* @__PURE__ */ jsx33(
7405
- NotificationBanner,
7406
- {
7407
- variant: notif.editVariant ?? "success",
7408
- title: notif.editTitle ?? "Record updated",
7409
- description: notif.editBody,
7410
- onClose: () => setBanner(false)
7411
- }
7412
- ),
7495
+ children: /* @__PURE__ */ jsxs31("form", { onSubmit: handleSubmit, className: grid ? "grid gap-4" : "space-y-4", style: grid ? { gridTemplateColumns: `repeat(${grid}, minmax(0, 1fr))` } : void 0, children: [
7496
+ banner && notif && /* @__PURE__ */ jsxs31("div", { className: "space-y-2", style: grid ? { gridColumn: "1 / -1" } : void 0, children: [
7497
+ /* @__PURE__ */ jsx33(NotificationBanner, { variant: notif.editVariant ?? "success", title: notif.editTitle ?? "Record updated", description: notif.editBody, onClose: () => setBanner(false) }),
7413
7498
  notif.action && /* @__PURE__ */ jsx33("div", { children: notif.action })
7414
7499
  ] }),
7415
- fields.map((f) => /* @__PURE__ */ jsxs31("div", { children: [
7500
+ fields.map((f) => /* @__PURE__ */ jsxs31("div", { style: { ...f.colSpan ? { gridColumn: `span ${f.colSpan}` } : {}, ...f.rowSpan ? { gridRow: `span ${f.rowSpan}` } : {} }, children: [
7416
7501
  f.type !== "checkbox" && /* @__PURE__ */ jsxs31("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
7417
7502
  f.label,
7418
7503
  f.required && /* @__PURE__ */ jsx33("span", { className: "text-danger ml-0.5", children: "*" })
7419
7504
  ] }),
7420
- /* @__PURE__ */ jsx33(DGFieldRenderer, { field: f, value: form[f.key], onChange: (v) => setForm((p) => ({ ...p, [f.key]: v })) })
7505
+ /* @__PURE__ */ jsx33(DGFieldRenderer, { field: f, value: form[f.key], onChange: (v) => {
7506
+ setForm((p) => ({ ...p, [f.key]: v }));
7507
+ if (fieldErrors[f.key]) {
7508
+ const msg = validateField(f, v);
7509
+ setFieldErrors((p) => ({ ...p, [f.key]: msg ?? "" }));
7510
+ }
7511
+ } }),
7512
+ fieldErrors[f.key] && /* @__PURE__ */ jsx33("p", { className: "text-xs text-danger mt-1", children: fieldErrors[f.key] })
7421
7513
  ] }, f.key)),
7422
- error && /* @__PURE__ */ jsx33("p", { className: "text-xs text-danger", children: error })
7514
+ error && /* @__PURE__ */ jsx33("p", { className: "text-xs text-danger", style: grid ? { gridColumn: "1 / -1" } : void 0, children: error })
7423
7515
  ] })
7424
7516
  }
7425
7517
  );
@@ -7470,6 +7562,7 @@ function DataGrid({
7470
7562
  columns,
7471
7563
  data,
7472
7564
  rowKey,
7565
+ filterable,
7473
7566
  selectable = false,
7474
7567
  selected: controlledSelected,
7475
7568
  onSelectChange,
@@ -7565,7 +7658,7 @@ function DataGrid({
7565
7658
  header: "Actions",
7566
7659
  render: (row) => /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-1", children: [
7567
7660
  /* @__PURE__ */ jsx33(
7568
- ActionBtn,
7661
+ ActionBtn2,
7569
7662
  {
7570
7663
  cfg: defaultActions.viewButton,
7571
7664
  defaultIcon: /* @__PURE__ */ jsx33(Eye3, { className: "h-3.5 w-3.5" }),
@@ -7575,7 +7668,7 @@ function DataGrid({
7575
7668
  }
7576
7669
  ),
7577
7670
  /* @__PURE__ */ jsx33(
7578
- ActionBtn,
7671
+ ActionBtn2,
7579
7672
  {
7580
7673
  cfg: defaultActions.editButton,
7581
7674
  defaultIcon: /* @__PURE__ */ jsx33(Pencil3, { className: "h-3.5 w-3.5" }),
@@ -7585,7 +7678,7 @@ function DataGrid({
7585
7678
  }
7586
7679
  ),
7587
7680
  /* @__PURE__ */ jsx33(
7588
- ActionBtn,
7681
+ ActionBtn2,
7589
7682
  {
7590
7683
  cfg: defaultActions.deleteButton,
7591
7684
  defaultIcon: /* @__PURE__ */ jsx33(Trash4, { className: "h-3.5 w-3.5" }),
@@ -7595,7 +7688,7 @@ function DataGrid({
7595
7688
  }
7596
7689
  ),
7597
7690
  defaultActions.extraActions?.map((extra) => /* @__PURE__ */ jsx33(
7598
- ActionBtn,
7691
+ ActionBtn2,
7599
7692
  {
7600
7693
  cfg: extra,
7601
7694
  defaultIcon: extra.icon,
@@ -7677,9 +7770,9 @@ function DataGrid({
7677
7770
  `${String(col.key)}-${ci}`
7678
7771
  ))
7679
7772
  ] }),
7680
- visibleCols.some((c) => c.filterable) && /* @__PURE__ */ jsxs31("tr", { className: "border-b border-border bg-muted/10", children: [
7773
+ filterable && filterable.length > 0 && /* @__PURE__ */ jsxs31("tr", { className: "border-b border-border bg-muted/10", children: [
7681
7774
  selectable && /* @__PURE__ */ jsx33("th", {}),
7682
- visibleCols.map((col, ci) => /* @__PURE__ */ jsx33("th", { className: "px-3 py-1.5", children: col.filterable && /* @__PURE__ */ jsxs31("div", { className: "relative", children: [
7775
+ visibleCols.map((col, ci) => /* @__PURE__ */ jsx33("th", { className: "px-3 py-1.5", children: filterable.includes(String(col.key)) && /* @__PURE__ */ jsxs31("div", { className: "relative", children: [
7683
7776
  /* @__PURE__ */ jsx33(Search6, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground" }),
7684
7777
  /* @__PURE__ */ jsx33(
7685
7778
  "input",
@@ -7814,6 +7907,7 @@ function DataGrid({
7814
7907
  baseUrl: defaultActions.baseUrl,
7815
7908
  itemId: String(editItem[actionIdKey] ?? ""),
7816
7909
  notif: defaultActions.onSuccessNotif,
7910
+ grid: defaultActions.editFormGrid,
7817
7911
  onClose: () => setEditItem(null),
7818
7912
  onSuccess: (updated) => {
7819
7913
  setTableData((prev) => prev.map((r) => String(r[actionIdKey]) === String(updated[actionIdKey]) ? updated : r));
@@ -10114,12 +10208,14 @@ var settingConfig_default = {
10114
10208
  primaryHover: "#73F3E2",
10115
10209
  secondary: "#171717",
10116
10210
  secondaryHover: "#262626",
10117
- info: "#3b82f6",
10118
- infoHover: "#2563eb",
10211
+ info: "#F59E0B",
10212
+ infoHover: "#D97706",
10119
10213
  warning: "#f59e0b",
10120
10214
  warningHover: "#d97706",
10121
10215
  danger: "#ef4444",
10122
- dangerHover: "#dc2626"
10216
+ dangerHover: "#dc2626",
10217
+ accent: "#F59E0B",
10218
+ accentHover: "#D97706"
10123
10219
  }
10124
10220
  },
10125
10221
  themeOptions: [
@@ -10129,9 +10225,15 @@ var settingConfig_default = {
10129
10225
  ],
10130
10226
  fontSizes: [
10131
10227
  { "14px": "Small (14px)" },
10228
+ { "15px": "Small (15px)" },
10132
10229
  { "16px": "Medium (16px)" },
10230
+ { "17px": "Medium (17px)" },
10133
10231
  { "18px": "Large (18px)" },
10134
- { "20px": "Extra Large (20px)" }
10232
+ { "19px": "Large (19px)" },
10233
+ { "20px": "Extra Large (20px)" },
10234
+ { "21px": "Extra Large (21px)" },
10235
+ { "22px": "Extra Large (22px)" },
10236
+ { "24px": "2X Extra Large (24px)" }
10135
10237
  ],
10136
10238
  fontFamilies: [
10137
10239
  { '"Space Grotesk", "Inter", sans-serif': "Space Grotesk" },
@@ -10144,296 +10246,393 @@ var settingConfig_default = {
10144
10246
  { base: "secondary", hover: "secondaryHover", label: "Secondary" },
10145
10247
  { base: "info", hover: "infoHover", label: "Info" },
10146
10248
  { base: "warning", hover: "warningHover", label: "Warning" },
10147
- { base: "danger", hover: "dangerHover", label: "Danger" }
10249
+ { base: "danger", hover: "dangerHover", label: "Danger" },
10250
+ { base: "accent", hover: "accentHover", label: "accent" }
10148
10251
  ],
10149
10252
  colorPalette: [
10150
10253
  {
10151
10254
  base: "#6366F1",
10152
10255
  hover: "#4F46E5",
10153
10256
  info: "#F59E0B",
10154
- infoHover: "#D97706"
10257
+ infoHover: "#D97706",
10258
+ accent: "#F59E0B",
10259
+ accentHover: "#D97706"
10155
10260
  },
10156
10261
  {
10157
10262
  base: "#818CF8",
10158
10263
  hover: "#6366F1",
10159
10264
  info: "#FBBF24",
10160
- infoHover: "#F59E0B"
10265
+ infoHover: "#F59E0B",
10266
+ accent: "#FBBF24",
10267
+ accentHover: "#F59E0B"
10161
10268
  },
10162
10269
  {
10163
10270
  base: "#4F46E5",
10164
10271
  hover: "#4338CA",
10165
10272
  info: "#F59E0B",
10166
- infoHover: "#D97706"
10273
+ infoHover: "#D97706",
10274
+ accent: "#F59E0B",
10275
+ accentHover: "#D97706"
10167
10276
  },
10168
10277
  {
10169
10278
  base: "#3730A3",
10170
10279
  hover: "#312E81",
10171
10280
  info: "#D97706",
10172
- infoHover: "#B45309"
10281
+ infoHover: "#B45309",
10282
+ accent: "#D97706",
10283
+ accentHover: "#B45309"
10173
10284
  },
10174
10285
  {
10175
10286
  base: "#7C3AED",
10176
10287
  hover: "#6D28D9",
10177
10288
  info: "#F97316",
10178
- infoHover: "#EA580C"
10289
+ infoHover: "#EA580C",
10290
+ accent: "#F97316",
10291
+ accentHover: "#EA580C"
10179
10292
  },
10180
10293
  {
10181
10294
  base: "#A78BFA",
10182
10295
  hover: "#8B5CF6",
10183
10296
  info: "#FB923C",
10184
- infoHover: "#F97316"
10297
+ infoHover: "#F97316",
10298
+ accent: "#FB923C",
10299
+ accentHover: "#F97316"
10185
10300
  },
10186
10301
  {
10187
10302
  base: "#8B5CF6",
10188
10303
  hover: "#7C3AED",
10189
10304
  info: "#F97316",
10190
- infoHover: "#EA580C"
10305
+ infoHover: "#EA580C",
10306
+ accent: "#F97316",
10307
+ accentHover: "#EA580C"
10191
10308
  },
10192
10309
  {
10193
10310
  base: "#6D28D9",
10194
10311
  hover: "#5B21B6",
10195
10312
  info: "#EA580C",
10196
- infoHover: "#C2410C"
10313
+ infoHover: "#C2410C",
10314
+ accent: "#EA580C",
10315
+ accentHover: "#C2410C"
10197
10316
  },
10198
10317
  {
10199
10318
  base: "#0EA5E9",
10200
10319
  hover: "#0284C7",
10201
10320
  info: "#F97316",
10202
- infoHover: "#EA580C"
10321
+ infoHover: "#EA580C",
10322
+ accent: "#F97316",
10323
+ accentHover: "#EA580C"
10203
10324
  },
10204
10325
  {
10205
10326
  base: "#38BDF8",
10206
10327
  hover: "#0EA5E9",
10207
10328
  info: "#FB923C",
10208
- infoHover: "#F97316"
10329
+ infoHover: "#F97316",
10330
+ accent: "#FB923C",
10331
+ accentHover: "#F97316"
10209
10332
  },
10210
10333
  {
10211
10334
  base: "#3B82F6",
10212
10335
  hover: "#2563EB",
10213
10336
  info: "#F59E0B",
10214
- infoHover: "#D97706"
10337
+ infoHover: "#D97706",
10338
+ accent: "#F59E0B",
10339
+ accentHover: "#D97706"
10215
10340
  },
10216
10341
  {
10217
10342
  base: "#1D4ED8",
10218
10343
  hover: "#1E40AF",
10219
10344
  info: "#D97706",
10220
- infoHover: "#B45309"
10345
+ infoHover: "#B45309",
10346
+ accent: "#D97706",
10347
+ accentHover: "#B45309"
10221
10348
  },
10222
10349
  {
10223
10350
  base: "#06B6D4",
10224
10351
  hover: "#0891B2",
10225
10352
  info: "#A855F7",
10226
- infoHover: "#9333EA"
10353
+ infoHover: "#9333EA",
10354
+ accent: "#A855F7",
10355
+ accentHover: "#9333EA"
10227
10356
  },
10228
10357
  {
10229
10358
  base: "#22D3EE",
10230
10359
  hover: "#06B6D4",
10231
10360
  info: "#C084FC",
10232
- infoHover: "#A855F7"
10361
+ infoHover: "#A855F7",
10362
+ accent: "#C084FC",
10363
+ accentHover: "#A855F7"
10233
10364
  },
10234
10365
  {
10235
10366
  base: "#14B8A6",
10236
10367
  hover: "#0F766E",
10237
10368
  info: "#8B5CF6",
10238
- infoHover: "#7C3AED"
10369
+ infoHover: "#7C3AED",
10370
+ accent: "#8B5CF6",
10371
+ accentHover: "#7C3AED"
10239
10372
  },
10240
10373
  {
10241
10374
  base: "#0D9488",
10242
10375
  hover: "#0F766E",
10243
10376
  info: "#7C3AED",
10244
- infoHover: "#6D28D9"
10377
+ infoHover: "#6D28D9",
10378
+ accent: "#7C3AED",
10379
+ accentHover: "#6D28D9"
10245
10380
  },
10246
10381
  {
10247
10382
  base: "#10B981",
10248
10383
  hover: "#059669",
10249
10384
  info: "#8B5CF6",
10250
- infoHover: "#7C3AED"
10385
+ infoHover: "#7C3AED",
10386
+ accent: "#8B5CF6",
10387
+ accentHover: "#7C3AED"
10251
10388
  },
10252
10389
  {
10253
10390
  base: "#34D399",
10254
10391
  hover: "#10B981",
10255
10392
  info: "#A855F7",
10256
- infoHover: "#9333EA"
10393
+ infoHover: "#9333EA",
10394
+ accent: "#A855F7",
10395
+ accentHover: "#9333EA"
10257
10396
  },
10258
10397
  {
10259
10398
  base: "#22C55E",
10260
10399
  hover: "#16A34A",
10261
10400
  info: "#7C3AED",
10262
- infoHover: "#6D28D9"
10401
+ infoHover: "#6D28D9",
10402
+ accent: "#7C3AED",
10403
+ accentHover: "#6D28D9"
10263
10404
  },
10264
10405
  {
10265
10406
  base: "#16A34A",
10266
10407
  hover: "#15803D",
10267
10408
  info: "#6D28D9",
10268
- infoHover: "#5B21B6"
10409
+ infoHover: "#5B21B6",
10410
+ accent: "#6D28D9",
10411
+ accentHover: "#5B21B6"
10269
10412
  },
10270
10413
  {
10271
10414
  base: "#84CC16",
10272
10415
  hover: "#65A30D",
10273
10416
  info: "#6366F1",
10274
- infoHover: "#4F46E5"
10417
+ infoHover: "#4F46E5",
10418
+ accent: "#6366F1",
10419
+ accentHover: "#4F46E5"
10275
10420
  },
10276
10421
  {
10277
10422
  base: "#A3E635",
10278
10423
  hover: "#84CC16",
10279
10424
  info: "#818CF8",
10280
- infoHover: "#6366F1"
10425
+ infoHover: "#6366F1",
10426
+ accent: "#818CF8",
10427
+ accentHover: "#6366F1"
10281
10428
  },
10282
10429
  {
10283
10430
  base: "#65A30D",
10284
10431
  hover: "#4D7C0F",
10285
10432
  info: "#4F46E5",
10286
- infoHover: "#4338CA"
10433
+ infoHover: "#4338CA",
10434
+ accent: "#4F46E5",
10435
+ accentHover: "#4338CA"
10287
10436
  },
10288
10437
  {
10289
10438
  base: "#4D7C0F",
10290
10439
  hover: "#3F6212",
10291
10440
  info: "#3730A3",
10292
- infoHover: "#312E81"
10441
+ infoHover: "#312E81",
10442
+ accent: "#3730A3",
10443
+ accentHover: "#312E81"
10293
10444
  },
10294
10445
  {
10295
10446
  base: "#EAB308",
10296
10447
  hover: "#CA8A04",
10297
10448
  info: "#3B82F6",
10298
- infoHover: "#2563EB"
10449
+ infoHover: "#2563EB",
10450
+ accent: "#3B82F6",
10451
+ accentHover: "#2563EB"
10299
10452
  },
10300
10453
  {
10301
10454
  base: "#FACC15",
10302
10455
  hover: "#EAB308",
10303
10456
  info: "#60A5FA",
10304
- infoHover: "#3B82F6"
10457
+ infoHover: "#3B82F6",
10458
+ accent: "#60A5FA",
10459
+ accentHover: "#3B82F6"
10305
10460
  },
10306
10461
  {
10307
10462
  base: "#F59E0B",
10308
10463
  hover: "#D97706",
10309
10464
  info: "#2563EB",
10310
- infoHover: "#1D4ED8"
10465
+ infoHover: "#1D4ED8",
10466
+ accent: "#2563EB",
10467
+ accentHover: "#1D4ED8"
10311
10468
  },
10312
10469
  {
10313
10470
  base: "#D97706",
10314
10471
  hover: "#B45309",
10315
10472
  info: "#1D4ED8",
10316
- infoHover: "#1E40AF"
10473
+ infoHover: "#1E40AF",
10474
+ accent: "#1D4ED8",
10475
+ accentHover: "#1E40AF"
10317
10476
  },
10318
10477
  {
10319
10478
  base: "#F97316",
10320
10479
  hover: "#EA580C",
10321
10480
  info: "#0EA5E9",
10322
- infoHover: "#0284C7"
10481
+ infoHover: "#0284C7",
10482
+ accent: "#0EA5E9",
10483
+ accentHover: "#0284C7"
10323
10484
  },
10324
10485
  {
10325
10486
  base: "#FB923C",
10326
10487
  hover: "#F97316",
10327
10488
  info: "#38BDF8",
10328
- infoHover: "#0EA5E9"
10489
+ infoHover: "#0EA5E9",
10490
+ accent: "#38BDF8",
10491
+ accentHover: "#0EA5E9"
10329
10492
  },
10330
10493
  {
10331
10494
  base: "#EA580C",
10332
10495
  hover: "#C2410C",
10333
10496
  info: "#0284C7",
10334
- infoHover: "#0369A1"
10497
+ infoHover: "#0369A1",
10498
+ accent: "#0284C7",
10499
+ accentHover: "#0369A1"
10335
10500
  },
10336
10501
  {
10337
10502
  base: "#C2410C",
10338
10503
  hover: "#9A3412",
10339
10504
  info: "#0369A1",
10340
- infoHover: "#075985"
10505
+ infoHover: "#075985",
10506
+ accent: "#0369A1",
10507
+ accentHover: "#075985"
10341
10508
  },
10342
10509
  {
10343
10510
  base: "#EF4444",
10344
10511
  hover: "#DC2626",
10345
10512
  info: "#0EA5E9",
10346
- infoHover: "#0284C7"
10513
+ infoHover: "#0284C7",
10514
+ accent: "#0EA5E9",
10515
+ accentHover: "#0284C7"
10347
10516
  },
10348
10517
  {
10349
10518
  base: "#F87171",
10350
10519
  hover: "#EF4444",
10351
10520
  info: "#38BDF8",
10352
- infoHover: "#0EA5E9"
10521
+ infoHover: "#0EA5E9",
10522
+ accent: "#38BDF8",
10523
+ accentHover: "#0EA5E9"
10353
10524
  },
10354
10525
  {
10355
10526
  base: "#DC2626",
10356
10527
  hover: "#B91C1C",
10357
10528
  info: "#0284C7",
10358
- infoHover: "#0369A1"
10529
+ infoHover: "#0369A1",
10530
+ accent: "#0284C7",
10531
+ accentHover: "#0369A1"
10359
10532
  },
10360
10533
  {
10361
10534
  base: "#B91C1C",
10362
10535
  hover: "#991B1B",
10363
10536
  info: "#0369A1",
10364
- infoHover: "#075985"
10537
+ infoHover: "#075985",
10538
+ accent: "#0369A1",
10539
+ accentHover: "#075985"
10365
10540
  },
10366
10541
  {
10367
10542
  base: "#F43F5E",
10368
10543
  hover: "#E11D48",
10369
10544
  info: "#0EA5E9",
10370
- infoHover: "#0284C7"
10545
+ infoHover: "#0284C7",
10546
+ accent: "#0EA5E9",
10547
+ accentHover: "#0284C7"
10371
10548
  },
10372
10549
  {
10373
10550
  base: "#FB7185",
10374
10551
  hover: "#F43F5E",
10375
10552
  info: "#38BDF8",
10376
- infoHover: "#0EA5E9"
10553
+ infoHover: "#0EA5E9",
10554
+ accent: "#38BDF8",
10555
+ accentHover: "#0EA5E9"
10377
10556
  },
10378
10557
  {
10379
10558
  base: "#E11D48",
10380
10559
  hover: "#BE123C",
10381
10560
  info: "#0284C7",
10382
- infoHover: "#0369A1"
10561
+ infoHover: "#0369A1",
10562
+ accent: "#0284C7",
10563
+ accentHover: "#0369A1"
10383
10564
  },
10384
10565
  {
10385
10566
  base: "#BE123C",
10386
10567
  hover: "#9F1239",
10387
10568
  info: "#0369A1",
10388
- infoHover: "#075985"
10569
+ infoHover: "#075985",
10570
+ accent: "#0369A1",
10571
+ accentHover: "#075985"
10389
10572
  },
10390
10573
  {
10391
10574
  base: "#EC4899",
10392
10575
  hover: "#DB2777",
10393
10576
  info: "#06B6D4",
10394
- infoHover: "#0891B2"
10577
+ infoHover: "#0891B2",
10578
+ accent: "#06B6D4",
10579
+ accentHover: "#0891B2"
10395
10580
  },
10396
10581
  {
10397
10582
  base: "#F472B6",
10398
10583
  hover: "#EC4899",
10399
10584
  info: "#22D3EE",
10400
- infoHover: "#06B6D4"
10585
+ infoHover: "#06B6D4",
10586
+ accent: "#22D3EE",
10587
+ accentHover: "#06B6D4"
10401
10588
  },
10402
10589
  {
10403
10590
  base: "#DB2777",
10404
10591
  hover: "#BE185D",
10405
10592
  info: "#0891B2",
10406
- infoHover: "#0E7490"
10593
+ infoHover: "#0E7490",
10594
+ accent: "#0891B2",
10595
+ accentHover: "#0E7490"
10407
10596
  },
10408
10597
  {
10409
10598
  base: "#BE185D",
10410
10599
  hover: "#9D174D",
10411
10600
  info: "#0E7490",
10412
- infoHover: "#155E75"
10601
+ infoHover: "#155E75",
10602
+ accent: "#0E7490",
10603
+ accentHover: "#155E75"
10413
10604
  },
10414
10605
  {
10415
10606
  base: "#D946EF",
10416
10607
  hover: "#C026D3",
10417
10608
  info: "#F59E0B",
10418
- infoHover: "#D97706"
10609
+ infoHover: "#D97706",
10610
+ accent: "#F59E0B",
10611
+ accentHover: "#D97706"
10419
10612
  },
10420
10613
  {
10421
10614
  base: "#E879F9",
10422
10615
  hover: "#D946EF",
10423
10616
  info: "#FBBF24",
10424
- infoHover: "#F59E0B"
10617
+ infoHover: "#F59E0B",
10618
+ accent: "#FBBF24",
10619
+ accentHover: "#F59E0B"
10425
10620
  },
10426
10621
  {
10427
10622
  base: "#C026D3",
10428
10623
  hover: "#A21CAF",
10429
10624
  info: "#D97706",
10430
- infoHover: "#B45309"
10625
+ infoHover: "#B45309",
10626
+ accent: "#D97706",
10627
+ accentHover: "#B45309"
10431
10628
  },
10432
10629
  {
10433
10630
  base: "#A21CAF",
10434
10631
  hover: "#86198F",
10435
10632
  info: "#B45309",
10436
- infoHover: "#92400E"
10633
+ infoHover: "#92400E",
10634
+ accent: "#B45309",
10635
+ accentHover: "#92400E"
10437
10636
  }
10438
10637
  ]
10439
10638
  };
@@ -11223,8 +11422,8 @@ function ColorsPanel({ onColorsChange }) {
11223
11422
  type: "button",
11224
11423
  title: c.base,
11225
11424
  onClick: () => {
11226
- setColors({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover });
11227
- onColorsChange?.({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover });
11425
+ setColors({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover, accent: c.accent, accentHover: c.accentHover });
11426
+ onColorsChange?.({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover, accent: c.accent, accentHover: c.accentHover });
11228
11427
  },
11229
11428
  className: cn(
11230
11429
  "h-7 w-full rounded-md border border-white/10 transition-transform hover:scale-110 focus:outline-none focus:ring-2 focus:ring-ring",