@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.cjs CHANGED
@@ -4192,7 +4192,7 @@ function Select({
4192
4192
  ] }, getKey(opt))) }),
4193
4193
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "max-h-48 overflow-y-auto p-1", children: options.map((option) => {
4194
4194
  const checked = selectedValues.includes(getKey(option));
4195
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("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: [
4195
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("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: [
4196
4196
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("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__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react11.Check, { className: "h-3 w-3" }) }),
4197
4197
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4198
4198
  "input",
@@ -4230,7 +4230,7 @@ function Select({
4230
4230
  "aria-required": required,
4231
4231
  "aria-invalid": !!error,
4232
4232
  className: cn(
4233
- "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",
4233
+ "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",
4234
4234
  error && "border-destructive focus:ring-destructive"
4235
4235
  ),
4236
4236
  children: [
@@ -4325,8 +4325,8 @@ function Select({
4325
4325
  "div",
4326
4326
  {
4327
4327
  className: cn(
4328
- "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",
4329
- (multiple ? selectedValues.includes(getKey(option)) : value === getKey(option)) && "bg-accent text-accent-foreground"
4328
+ "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",
4329
+ (multiple ? selectedValues.includes(getKey(option)) : value === getKey(option)) && "bg-primary/80 text-primary-foreground"
4330
4330
  ),
4331
4331
  onClick: () => handleSelect(getKey(option)),
4332
4332
  children: [
@@ -6494,6 +6494,23 @@ function ModalShell({ title, onClose, children, footer }) {
6494
6494
  document.body
6495
6495
  );
6496
6496
  }
6497
+ var BUILT_IN_PATTERNS = {
6498
+ email: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
6499
+ url: /^https?:\/\/.+/,
6500
+ numeric: /^\d+(\.\d+)?$/,
6501
+ alpha: /^[a-zA-Z]+$/,
6502
+ alphanumeric: /^[a-zA-Z0-9]+$/
6503
+ };
6504
+ function validateField(field, value) {
6505
+ if (field.required && (value === "" || value === null || value === void 0))
6506
+ return `${field.label} is required`;
6507
+ if (field.validation && value !== "" && value !== null && value !== void 0) {
6508
+ const pattern = field.validation instanceof RegExp ? field.validation : BUILT_IN_PATTERNS[field.validation];
6509
+ if (pattern && !pattern.test(String(value)))
6510
+ return field.validationMessage ?? `${field.label} is invalid`;
6511
+ }
6512
+ return null;
6513
+ }
6497
6514
  function FieldRenderer({ field, value, onChange }) {
6498
6515
  if (field.render) return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: field.render(value, onChange) });
6499
6516
  const strOptions = (field.options ?? []).map(
@@ -6651,7 +6668,8 @@ function EditModal({
6651
6668
  itemId,
6652
6669
  onClose,
6653
6670
  onSuccess,
6654
- notif
6671
+ notif,
6672
+ grid
6655
6673
  }) {
6656
6674
  const [form, setForm] = React28.useState(() => {
6657
6675
  const init = {};
@@ -6660,11 +6678,22 @@ function EditModal({
6660
6678
  });
6661
6679
  return init;
6662
6680
  });
6681
+ const [fieldErrors, setFieldErrors] = React28.useState({});
6663
6682
  const [loading, setLoading] = React28.useState(false);
6664
6683
  const [error, setError] = React28.useState(null);
6665
6684
  const [banner, setBanner] = React28.useState(false);
6666
6685
  const handleSubmit = async (e) => {
6667
6686
  e.preventDefault();
6687
+ const errs = {};
6688
+ fields.forEach((f) => {
6689
+ const msg = validateField(f, form[f.key]);
6690
+ if (msg) errs[f.key] = msg;
6691
+ });
6692
+ if (Object.keys(errs).length) {
6693
+ setFieldErrors(errs);
6694
+ return;
6695
+ }
6696
+ setFieldErrors({});
6668
6697
  setLoading(true);
6669
6698
  setError(null);
6670
6699
  try {
@@ -6695,8 +6724,8 @@ function EditModal({
6695
6724
  loading ? "Saving\u2026" : "Save Changes"
6696
6725
  ] })
6697
6726
  ] }),
6698
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
6699
- banner && notif && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "space-y-2", children: [
6727
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("form", { onSubmit: handleSubmit, className: grid ? `grid gap-4` : "space-y-4", style: grid ? { gridTemplateColumns: `repeat(${grid}, minmax(0, 1fr))` } : void 0, children: [
6728
+ banner && notif && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "space-y-2", style: grid ? { gridColumn: `1 / -1` } : void 0, children: [
6700
6729
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6701
6730
  NotificationBanner,
6702
6731
  {
@@ -6708,21 +6737,38 @@ function EditModal({
6708
6737
  ),
6709
6738
  notif.action && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: notif.action })
6710
6739
  ] }),
6711
- fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
6712
- f.type !== "checkbox" && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
6713
- f.label,
6714
- f.required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-danger ml-0.5", children: "*" })
6715
- ] }),
6716
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6717
- FieldRenderer,
6718
- {
6719
- field: f,
6720
- value: form[f.key],
6721
- onChange: (v) => setForm((prev) => ({ ...prev, [f.key]: v }))
6722
- }
6723
- )
6724
- ] }, f.key)),
6725
- error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-danger", children: error })
6740
+ fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
6741
+ "div",
6742
+ {
6743
+ style: {
6744
+ ...f.colSpan ? { gridColumn: `span ${f.colSpan}` } : {},
6745
+ ...f.rowSpan ? { gridRow: `span ${f.rowSpan}` } : {}
6746
+ },
6747
+ children: [
6748
+ f.type !== "checkbox" && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
6749
+ f.label,
6750
+ f.required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-danger ml-0.5", children: "*" })
6751
+ ] }),
6752
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6753
+ FieldRenderer,
6754
+ {
6755
+ field: f,
6756
+ value: form[f.key],
6757
+ onChange: (v) => {
6758
+ setForm((prev) => ({ ...prev, [f.key]: v }));
6759
+ if (fieldErrors[f.key]) {
6760
+ const msg = validateField(f, v);
6761
+ setFieldErrors((prev) => ({ ...prev, [f.key]: msg ?? "" }));
6762
+ }
6763
+ }
6764
+ }
6765
+ ),
6766
+ fieldErrors[f.key] && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-danger mt-1", children: fieldErrors[f.key] })
6767
+ ]
6768
+ },
6769
+ f.key
6770
+ )),
6771
+ error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-danger", style: grid ? { gridColumn: `1 / -1` } : void 0, children: error })
6726
6772
  ] })
6727
6773
  }
6728
6774
  );
@@ -7243,6 +7289,7 @@ function Table({
7243
7289
  baseUrl: defaultActions.baseUrl,
7244
7290
  itemId: String(editItem[actionIdKey] ?? ""),
7245
7291
  notif: defaultActions.onSuccessNotif,
7292
+ grid: defaultActions.editFormGrid,
7246
7293
  onClose: () => setEditItem(null),
7247
7294
  onSuccess: (updated) => {
7248
7295
  setTableData(
@@ -7358,6 +7405,40 @@ function useServerDataGrid({ url, params, encrypt, key, decryptPayloadLog, colum
7358
7405
  reload: () => setTick((t) => t + 1)
7359
7406
  };
7360
7407
  }
7408
+ function ActionBtn2({
7409
+ cfg,
7410
+ defaultIcon,
7411
+ defaultLabel,
7412
+ defaultVariant,
7413
+ onClick
7414
+ }) {
7415
+ const mode = cfg?.displayMode ?? "icon";
7416
+ const icon = cfg?.icon ?? defaultIcon;
7417
+ const label = cfg?.label ?? defaultLabel;
7418
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7419
+ Button,
7420
+ {
7421
+ type: "button",
7422
+ title: label,
7423
+ size: cfg?.size ?? "xs",
7424
+ variant: cfg?.variant ?? defaultVariant,
7425
+ rounded: cfg?.rounded ?? "lg",
7426
+ gradientFrom: cfg?.gradientFrom,
7427
+ gradientTo: cfg?.gradientTo,
7428
+ gradientDirection: cfg?.gradientDirection,
7429
+ bgColor: cfg?.bgColor,
7430
+ textColor: cfg?.textColor,
7431
+ borderColor: cfg?.borderColor,
7432
+ borderWidth: cfg?.borderWidth,
7433
+ shadow: cfg?.shadow,
7434
+ iconOnly: mode === "icon",
7435
+ leftIcon: mode !== "text" ? icon : void 0,
7436
+ className: cfg?.className,
7437
+ onClick,
7438
+ children: mode !== "icon" ? label : void 0
7439
+ }
7440
+ );
7441
+ }
7361
7442
  function DGModalShell({ title, onClose, children, footer }) {
7362
7443
  return (0, import_react_dom3.createPortal)(
7363
7444
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
@@ -7473,7 +7554,8 @@ function DGEditModal({
7473
7554
  itemId,
7474
7555
  onClose,
7475
7556
  onSuccess,
7476
- notif
7557
+ notif,
7558
+ grid
7477
7559
  }) {
7478
7560
  const [form, setForm] = React29.useState(() => {
7479
7561
  const init = {};
@@ -7482,11 +7564,22 @@ function DGEditModal({
7482
7564
  });
7483
7565
  return init;
7484
7566
  });
7567
+ const [fieldErrors, setFieldErrors] = React29.useState({});
7485
7568
  const [loading, setLoading] = React29.useState(false);
7486
7569
  const [error, setError] = React29.useState(null);
7487
7570
  const [banner, setBanner] = React29.useState(false);
7488
7571
  const handleSubmit = async (e) => {
7489
7572
  e.preventDefault();
7573
+ const errs = {};
7574
+ fields.forEach((f) => {
7575
+ const msg = validateField(f, form[f.key]);
7576
+ if (msg) errs[f.key] = msg;
7577
+ });
7578
+ if (Object.keys(errs).length) {
7579
+ setFieldErrors(errs);
7580
+ return;
7581
+ }
7582
+ setFieldErrors({});
7490
7583
  setLoading(true);
7491
7584
  setError(null);
7492
7585
  try {
@@ -7517,27 +7610,26 @@ function DGEditModal({
7517
7610
  loading ? "Saving\u2026" : "Save Changes"
7518
7611
  ] })
7519
7612
  ] }),
7520
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
7521
- banner && notif && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-2", children: [
7522
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7523
- NotificationBanner,
7524
- {
7525
- variant: notif.editVariant ?? "success",
7526
- title: notif.editTitle ?? "Record updated",
7527
- description: notif.editBody,
7528
- onClose: () => setBanner(false)
7529
- }
7530
- ),
7613
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("form", { onSubmit: handleSubmit, className: grid ? "grid gap-4" : "space-y-4", style: grid ? { gridTemplateColumns: `repeat(${grid}, minmax(0, 1fr))` } : void 0, children: [
7614
+ banner && notif && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-2", style: grid ? { gridColumn: "1 / -1" } : void 0, children: [
7615
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NotificationBanner, { variant: notif.editVariant ?? "success", title: notif.editTitle ?? "Record updated", description: notif.editBody, onClose: () => setBanner(false) }),
7531
7616
  notif.action && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: notif.action })
7532
7617
  ] }),
7533
- fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
7618
+ fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { ...f.colSpan ? { gridColumn: `span ${f.colSpan}` } : {}, ...f.rowSpan ? { gridRow: `span ${f.rowSpan}` } : {} }, children: [
7534
7619
  f.type !== "checkbox" && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
7535
7620
  f.label,
7536
7621
  f.required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-danger ml-0.5", children: "*" })
7537
7622
  ] }),
7538
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DGFieldRenderer, { field: f, value: form[f.key], onChange: (v) => setForm((p) => ({ ...p, [f.key]: v })) })
7623
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DGFieldRenderer, { field: f, value: form[f.key], onChange: (v) => {
7624
+ setForm((p) => ({ ...p, [f.key]: v }));
7625
+ if (fieldErrors[f.key]) {
7626
+ const msg = validateField(f, v);
7627
+ setFieldErrors((p) => ({ ...p, [f.key]: msg ?? "" }));
7628
+ }
7629
+ } }),
7630
+ fieldErrors[f.key] && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xs text-danger mt-1", children: fieldErrors[f.key] })
7539
7631
  ] }, f.key)),
7540
- error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xs text-danger", children: error })
7632
+ error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xs text-danger", style: grid ? { gridColumn: "1 / -1" } : void 0, children: error })
7541
7633
  ] })
7542
7634
  }
7543
7635
  );
@@ -7588,6 +7680,7 @@ function DataGrid({
7588
7680
  columns,
7589
7681
  data,
7590
7682
  rowKey,
7683
+ filterable,
7591
7684
  selectable = false,
7592
7685
  selected: controlledSelected,
7593
7686
  onSelectChange,
@@ -7683,7 +7776,7 @@ function DataGrid({
7683
7776
  header: "Actions",
7684
7777
  render: (row) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1", children: [
7685
7778
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7686
- ActionBtn,
7779
+ ActionBtn2,
7687
7780
  {
7688
7781
  cfg: defaultActions.viewButton,
7689
7782
  defaultIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Eye, { className: "h-3.5 w-3.5" }),
@@ -7693,7 +7786,7 @@ function DataGrid({
7693
7786
  }
7694
7787
  ),
7695
7788
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7696
- ActionBtn,
7789
+ ActionBtn2,
7697
7790
  {
7698
7791
  cfg: defaultActions.editButton,
7699
7792
  defaultIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Pencil, { className: "h-3.5 w-3.5" }),
@@ -7703,7 +7796,7 @@ function DataGrid({
7703
7796
  }
7704
7797
  ),
7705
7798
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7706
- ActionBtn,
7799
+ ActionBtn2,
7707
7800
  {
7708
7801
  cfg: defaultActions.deleteButton,
7709
7802
  defaultIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Trash, { className: "h-3.5 w-3.5" }),
@@ -7713,7 +7806,7 @@ function DataGrid({
7713
7806
  }
7714
7807
  ),
7715
7808
  defaultActions.extraActions?.map((extra) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7716
- ActionBtn,
7809
+ ActionBtn2,
7717
7810
  {
7718
7811
  cfg: extra,
7719
7812
  defaultIcon: extra.icon,
@@ -7795,9 +7888,9 @@ function DataGrid({
7795
7888
  `${String(col.key)}-${ci}`
7796
7889
  ))
7797
7890
  ] }),
7798
- visibleCols.some((c) => c.filterable) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("tr", { className: "border-b border-border bg-muted/10", children: [
7891
+ filterable && filterable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("tr", { className: "border-b border-border bg-muted/10", children: [
7799
7892
  selectable && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("th", {}),
7800
- visibleCols.map((col, ci) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("th", { className: "px-3 py-1.5", children: col.filterable && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
7893
+ visibleCols.map((col, ci) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("th", { className: "px-3 py-1.5", children: filterable.includes(String(col.key)) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
7801
7894
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Search, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground" }),
7802
7895
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7803
7896
  "input",
@@ -7932,6 +8025,7 @@ function DataGrid({
7932
8025
  baseUrl: defaultActions.baseUrl,
7933
8026
  itemId: String(editItem[actionIdKey] ?? ""),
7934
8027
  notif: defaultActions.onSuccessNotif,
8028
+ grid: defaultActions.editFormGrid,
7935
8029
  onClose: () => setEditItem(null),
7936
8030
  onSuccess: (updated) => {
7937
8031
  setTableData((prev) => prev.map((r) => String(r[actionIdKey]) === String(updated[actionIdKey]) ? updated : r));
@@ -10232,12 +10326,14 @@ var settingConfig_default = {
10232
10326
  primaryHover: "#73F3E2",
10233
10327
  secondary: "#171717",
10234
10328
  secondaryHover: "#262626",
10235
- info: "#3b82f6",
10236
- infoHover: "#2563eb",
10329
+ info: "#F59E0B",
10330
+ infoHover: "#D97706",
10237
10331
  warning: "#f59e0b",
10238
10332
  warningHover: "#d97706",
10239
10333
  danger: "#ef4444",
10240
- dangerHover: "#dc2626"
10334
+ dangerHover: "#dc2626",
10335
+ accent: "#F59E0B",
10336
+ accentHover: "#D97706"
10241
10337
  }
10242
10338
  },
10243
10339
  themeOptions: [
@@ -10247,9 +10343,15 @@ var settingConfig_default = {
10247
10343
  ],
10248
10344
  fontSizes: [
10249
10345
  { "14px": "Small (14px)" },
10346
+ { "15px": "Small (15px)" },
10250
10347
  { "16px": "Medium (16px)" },
10348
+ { "17px": "Medium (17px)" },
10251
10349
  { "18px": "Large (18px)" },
10252
- { "20px": "Extra Large (20px)" }
10350
+ { "19px": "Large (19px)" },
10351
+ { "20px": "Extra Large (20px)" },
10352
+ { "21px": "Extra Large (21px)" },
10353
+ { "22px": "Extra Large (22px)" },
10354
+ { "24px": "2X Extra Large (24px)" }
10253
10355
  ],
10254
10356
  fontFamilies: [
10255
10357
  { '"Space Grotesk", "Inter", sans-serif': "Space Grotesk" },
@@ -10262,296 +10364,393 @@ var settingConfig_default = {
10262
10364
  { base: "secondary", hover: "secondaryHover", label: "Secondary" },
10263
10365
  { base: "info", hover: "infoHover", label: "Info" },
10264
10366
  { base: "warning", hover: "warningHover", label: "Warning" },
10265
- { base: "danger", hover: "dangerHover", label: "Danger" }
10367
+ { base: "danger", hover: "dangerHover", label: "Danger" },
10368
+ { base: "accent", hover: "accentHover", label: "accent" }
10266
10369
  ],
10267
10370
  colorPalette: [
10268
10371
  {
10269
10372
  base: "#6366F1",
10270
10373
  hover: "#4F46E5",
10271
10374
  info: "#F59E0B",
10272
- infoHover: "#D97706"
10375
+ infoHover: "#D97706",
10376
+ accent: "#F59E0B",
10377
+ accentHover: "#D97706"
10273
10378
  },
10274
10379
  {
10275
10380
  base: "#818CF8",
10276
10381
  hover: "#6366F1",
10277
10382
  info: "#FBBF24",
10278
- infoHover: "#F59E0B"
10383
+ infoHover: "#F59E0B",
10384
+ accent: "#FBBF24",
10385
+ accentHover: "#F59E0B"
10279
10386
  },
10280
10387
  {
10281
10388
  base: "#4F46E5",
10282
10389
  hover: "#4338CA",
10283
10390
  info: "#F59E0B",
10284
- infoHover: "#D97706"
10391
+ infoHover: "#D97706",
10392
+ accent: "#F59E0B",
10393
+ accentHover: "#D97706"
10285
10394
  },
10286
10395
  {
10287
10396
  base: "#3730A3",
10288
10397
  hover: "#312E81",
10289
10398
  info: "#D97706",
10290
- infoHover: "#B45309"
10399
+ infoHover: "#B45309",
10400
+ accent: "#D97706",
10401
+ accentHover: "#B45309"
10291
10402
  },
10292
10403
  {
10293
10404
  base: "#7C3AED",
10294
10405
  hover: "#6D28D9",
10295
10406
  info: "#F97316",
10296
- infoHover: "#EA580C"
10407
+ infoHover: "#EA580C",
10408
+ accent: "#F97316",
10409
+ accentHover: "#EA580C"
10297
10410
  },
10298
10411
  {
10299
10412
  base: "#A78BFA",
10300
10413
  hover: "#8B5CF6",
10301
10414
  info: "#FB923C",
10302
- infoHover: "#F97316"
10415
+ infoHover: "#F97316",
10416
+ accent: "#FB923C",
10417
+ accentHover: "#F97316"
10303
10418
  },
10304
10419
  {
10305
10420
  base: "#8B5CF6",
10306
10421
  hover: "#7C3AED",
10307
10422
  info: "#F97316",
10308
- infoHover: "#EA580C"
10423
+ infoHover: "#EA580C",
10424
+ accent: "#F97316",
10425
+ accentHover: "#EA580C"
10309
10426
  },
10310
10427
  {
10311
10428
  base: "#6D28D9",
10312
10429
  hover: "#5B21B6",
10313
10430
  info: "#EA580C",
10314
- infoHover: "#C2410C"
10431
+ infoHover: "#C2410C",
10432
+ accent: "#EA580C",
10433
+ accentHover: "#C2410C"
10315
10434
  },
10316
10435
  {
10317
10436
  base: "#0EA5E9",
10318
10437
  hover: "#0284C7",
10319
10438
  info: "#F97316",
10320
- infoHover: "#EA580C"
10439
+ infoHover: "#EA580C",
10440
+ accent: "#F97316",
10441
+ accentHover: "#EA580C"
10321
10442
  },
10322
10443
  {
10323
10444
  base: "#38BDF8",
10324
10445
  hover: "#0EA5E9",
10325
10446
  info: "#FB923C",
10326
- infoHover: "#F97316"
10447
+ infoHover: "#F97316",
10448
+ accent: "#FB923C",
10449
+ accentHover: "#F97316"
10327
10450
  },
10328
10451
  {
10329
10452
  base: "#3B82F6",
10330
10453
  hover: "#2563EB",
10331
10454
  info: "#F59E0B",
10332
- infoHover: "#D97706"
10455
+ infoHover: "#D97706",
10456
+ accent: "#F59E0B",
10457
+ accentHover: "#D97706"
10333
10458
  },
10334
10459
  {
10335
10460
  base: "#1D4ED8",
10336
10461
  hover: "#1E40AF",
10337
10462
  info: "#D97706",
10338
- infoHover: "#B45309"
10463
+ infoHover: "#B45309",
10464
+ accent: "#D97706",
10465
+ accentHover: "#B45309"
10339
10466
  },
10340
10467
  {
10341
10468
  base: "#06B6D4",
10342
10469
  hover: "#0891B2",
10343
10470
  info: "#A855F7",
10344
- infoHover: "#9333EA"
10471
+ infoHover: "#9333EA",
10472
+ accent: "#A855F7",
10473
+ accentHover: "#9333EA"
10345
10474
  },
10346
10475
  {
10347
10476
  base: "#22D3EE",
10348
10477
  hover: "#06B6D4",
10349
10478
  info: "#C084FC",
10350
- infoHover: "#A855F7"
10479
+ infoHover: "#A855F7",
10480
+ accent: "#C084FC",
10481
+ accentHover: "#A855F7"
10351
10482
  },
10352
10483
  {
10353
10484
  base: "#14B8A6",
10354
10485
  hover: "#0F766E",
10355
10486
  info: "#8B5CF6",
10356
- infoHover: "#7C3AED"
10487
+ infoHover: "#7C3AED",
10488
+ accent: "#8B5CF6",
10489
+ accentHover: "#7C3AED"
10357
10490
  },
10358
10491
  {
10359
10492
  base: "#0D9488",
10360
10493
  hover: "#0F766E",
10361
10494
  info: "#7C3AED",
10362
- infoHover: "#6D28D9"
10495
+ infoHover: "#6D28D9",
10496
+ accent: "#7C3AED",
10497
+ accentHover: "#6D28D9"
10363
10498
  },
10364
10499
  {
10365
10500
  base: "#10B981",
10366
10501
  hover: "#059669",
10367
10502
  info: "#8B5CF6",
10368
- infoHover: "#7C3AED"
10503
+ infoHover: "#7C3AED",
10504
+ accent: "#8B5CF6",
10505
+ accentHover: "#7C3AED"
10369
10506
  },
10370
10507
  {
10371
10508
  base: "#34D399",
10372
10509
  hover: "#10B981",
10373
10510
  info: "#A855F7",
10374
- infoHover: "#9333EA"
10511
+ infoHover: "#9333EA",
10512
+ accent: "#A855F7",
10513
+ accentHover: "#9333EA"
10375
10514
  },
10376
10515
  {
10377
10516
  base: "#22C55E",
10378
10517
  hover: "#16A34A",
10379
10518
  info: "#7C3AED",
10380
- infoHover: "#6D28D9"
10519
+ infoHover: "#6D28D9",
10520
+ accent: "#7C3AED",
10521
+ accentHover: "#6D28D9"
10381
10522
  },
10382
10523
  {
10383
10524
  base: "#16A34A",
10384
10525
  hover: "#15803D",
10385
10526
  info: "#6D28D9",
10386
- infoHover: "#5B21B6"
10527
+ infoHover: "#5B21B6",
10528
+ accent: "#6D28D9",
10529
+ accentHover: "#5B21B6"
10387
10530
  },
10388
10531
  {
10389
10532
  base: "#84CC16",
10390
10533
  hover: "#65A30D",
10391
10534
  info: "#6366F1",
10392
- infoHover: "#4F46E5"
10535
+ infoHover: "#4F46E5",
10536
+ accent: "#6366F1",
10537
+ accentHover: "#4F46E5"
10393
10538
  },
10394
10539
  {
10395
10540
  base: "#A3E635",
10396
10541
  hover: "#84CC16",
10397
10542
  info: "#818CF8",
10398
- infoHover: "#6366F1"
10543
+ infoHover: "#6366F1",
10544
+ accent: "#818CF8",
10545
+ accentHover: "#6366F1"
10399
10546
  },
10400
10547
  {
10401
10548
  base: "#65A30D",
10402
10549
  hover: "#4D7C0F",
10403
10550
  info: "#4F46E5",
10404
- infoHover: "#4338CA"
10551
+ infoHover: "#4338CA",
10552
+ accent: "#4F46E5",
10553
+ accentHover: "#4338CA"
10405
10554
  },
10406
10555
  {
10407
10556
  base: "#4D7C0F",
10408
10557
  hover: "#3F6212",
10409
10558
  info: "#3730A3",
10410
- infoHover: "#312E81"
10559
+ infoHover: "#312E81",
10560
+ accent: "#3730A3",
10561
+ accentHover: "#312E81"
10411
10562
  },
10412
10563
  {
10413
10564
  base: "#EAB308",
10414
10565
  hover: "#CA8A04",
10415
10566
  info: "#3B82F6",
10416
- infoHover: "#2563EB"
10567
+ infoHover: "#2563EB",
10568
+ accent: "#3B82F6",
10569
+ accentHover: "#2563EB"
10417
10570
  },
10418
10571
  {
10419
10572
  base: "#FACC15",
10420
10573
  hover: "#EAB308",
10421
10574
  info: "#60A5FA",
10422
- infoHover: "#3B82F6"
10575
+ infoHover: "#3B82F6",
10576
+ accent: "#60A5FA",
10577
+ accentHover: "#3B82F6"
10423
10578
  },
10424
10579
  {
10425
10580
  base: "#F59E0B",
10426
10581
  hover: "#D97706",
10427
10582
  info: "#2563EB",
10428
- infoHover: "#1D4ED8"
10583
+ infoHover: "#1D4ED8",
10584
+ accent: "#2563EB",
10585
+ accentHover: "#1D4ED8"
10429
10586
  },
10430
10587
  {
10431
10588
  base: "#D97706",
10432
10589
  hover: "#B45309",
10433
10590
  info: "#1D4ED8",
10434
- infoHover: "#1E40AF"
10591
+ infoHover: "#1E40AF",
10592
+ accent: "#1D4ED8",
10593
+ accentHover: "#1E40AF"
10435
10594
  },
10436
10595
  {
10437
10596
  base: "#F97316",
10438
10597
  hover: "#EA580C",
10439
10598
  info: "#0EA5E9",
10440
- infoHover: "#0284C7"
10599
+ infoHover: "#0284C7",
10600
+ accent: "#0EA5E9",
10601
+ accentHover: "#0284C7"
10441
10602
  },
10442
10603
  {
10443
10604
  base: "#FB923C",
10444
10605
  hover: "#F97316",
10445
10606
  info: "#38BDF8",
10446
- infoHover: "#0EA5E9"
10607
+ infoHover: "#0EA5E9",
10608
+ accent: "#38BDF8",
10609
+ accentHover: "#0EA5E9"
10447
10610
  },
10448
10611
  {
10449
10612
  base: "#EA580C",
10450
10613
  hover: "#C2410C",
10451
10614
  info: "#0284C7",
10452
- infoHover: "#0369A1"
10615
+ infoHover: "#0369A1",
10616
+ accent: "#0284C7",
10617
+ accentHover: "#0369A1"
10453
10618
  },
10454
10619
  {
10455
10620
  base: "#C2410C",
10456
10621
  hover: "#9A3412",
10457
10622
  info: "#0369A1",
10458
- infoHover: "#075985"
10623
+ infoHover: "#075985",
10624
+ accent: "#0369A1",
10625
+ accentHover: "#075985"
10459
10626
  },
10460
10627
  {
10461
10628
  base: "#EF4444",
10462
10629
  hover: "#DC2626",
10463
10630
  info: "#0EA5E9",
10464
- infoHover: "#0284C7"
10631
+ infoHover: "#0284C7",
10632
+ accent: "#0EA5E9",
10633
+ accentHover: "#0284C7"
10465
10634
  },
10466
10635
  {
10467
10636
  base: "#F87171",
10468
10637
  hover: "#EF4444",
10469
10638
  info: "#38BDF8",
10470
- infoHover: "#0EA5E9"
10639
+ infoHover: "#0EA5E9",
10640
+ accent: "#38BDF8",
10641
+ accentHover: "#0EA5E9"
10471
10642
  },
10472
10643
  {
10473
10644
  base: "#DC2626",
10474
10645
  hover: "#B91C1C",
10475
10646
  info: "#0284C7",
10476
- infoHover: "#0369A1"
10647
+ infoHover: "#0369A1",
10648
+ accent: "#0284C7",
10649
+ accentHover: "#0369A1"
10477
10650
  },
10478
10651
  {
10479
10652
  base: "#B91C1C",
10480
10653
  hover: "#991B1B",
10481
10654
  info: "#0369A1",
10482
- infoHover: "#075985"
10655
+ infoHover: "#075985",
10656
+ accent: "#0369A1",
10657
+ accentHover: "#075985"
10483
10658
  },
10484
10659
  {
10485
10660
  base: "#F43F5E",
10486
10661
  hover: "#E11D48",
10487
10662
  info: "#0EA5E9",
10488
- infoHover: "#0284C7"
10663
+ infoHover: "#0284C7",
10664
+ accent: "#0EA5E9",
10665
+ accentHover: "#0284C7"
10489
10666
  },
10490
10667
  {
10491
10668
  base: "#FB7185",
10492
10669
  hover: "#F43F5E",
10493
10670
  info: "#38BDF8",
10494
- infoHover: "#0EA5E9"
10671
+ infoHover: "#0EA5E9",
10672
+ accent: "#38BDF8",
10673
+ accentHover: "#0EA5E9"
10495
10674
  },
10496
10675
  {
10497
10676
  base: "#E11D48",
10498
10677
  hover: "#BE123C",
10499
10678
  info: "#0284C7",
10500
- infoHover: "#0369A1"
10679
+ infoHover: "#0369A1",
10680
+ accent: "#0284C7",
10681
+ accentHover: "#0369A1"
10501
10682
  },
10502
10683
  {
10503
10684
  base: "#BE123C",
10504
10685
  hover: "#9F1239",
10505
10686
  info: "#0369A1",
10506
- infoHover: "#075985"
10687
+ infoHover: "#075985",
10688
+ accent: "#0369A1",
10689
+ accentHover: "#075985"
10507
10690
  },
10508
10691
  {
10509
10692
  base: "#EC4899",
10510
10693
  hover: "#DB2777",
10511
10694
  info: "#06B6D4",
10512
- infoHover: "#0891B2"
10695
+ infoHover: "#0891B2",
10696
+ accent: "#06B6D4",
10697
+ accentHover: "#0891B2"
10513
10698
  },
10514
10699
  {
10515
10700
  base: "#F472B6",
10516
10701
  hover: "#EC4899",
10517
10702
  info: "#22D3EE",
10518
- infoHover: "#06B6D4"
10703
+ infoHover: "#06B6D4",
10704
+ accent: "#22D3EE",
10705
+ accentHover: "#06B6D4"
10519
10706
  },
10520
10707
  {
10521
10708
  base: "#DB2777",
10522
10709
  hover: "#BE185D",
10523
10710
  info: "#0891B2",
10524
- infoHover: "#0E7490"
10711
+ infoHover: "#0E7490",
10712
+ accent: "#0891B2",
10713
+ accentHover: "#0E7490"
10525
10714
  },
10526
10715
  {
10527
10716
  base: "#BE185D",
10528
10717
  hover: "#9D174D",
10529
10718
  info: "#0E7490",
10530
- infoHover: "#155E75"
10719
+ infoHover: "#155E75",
10720
+ accent: "#0E7490",
10721
+ accentHover: "#155E75"
10531
10722
  },
10532
10723
  {
10533
10724
  base: "#D946EF",
10534
10725
  hover: "#C026D3",
10535
10726
  info: "#F59E0B",
10536
- infoHover: "#D97706"
10727
+ infoHover: "#D97706",
10728
+ accent: "#F59E0B",
10729
+ accentHover: "#D97706"
10537
10730
  },
10538
10731
  {
10539
10732
  base: "#E879F9",
10540
10733
  hover: "#D946EF",
10541
10734
  info: "#FBBF24",
10542
- infoHover: "#F59E0B"
10735
+ infoHover: "#F59E0B",
10736
+ accent: "#FBBF24",
10737
+ accentHover: "#F59E0B"
10543
10738
  },
10544
10739
  {
10545
10740
  base: "#C026D3",
10546
10741
  hover: "#A21CAF",
10547
10742
  info: "#D97706",
10548
- infoHover: "#B45309"
10743
+ infoHover: "#B45309",
10744
+ accent: "#D97706",
10745
+ accentHover: "#B45309"
10549
10746
  },
10550
10747
  {
10551
10748
  base: "#A21CAF",
10552
10749
  hover: "#86198F",
10553
10750
  info: "#B45309",
10554
- infoHover: "#92400E"
10751
+ infoHover: "#92400E",
10752
+ accent: "#B45309",
10753
+ accentHover: "#92400E"
10555
10754
  }
10556
10755
  ]
10557
10756
  };
@@ -11341,8 +11540,8 @@ function ColorsPanel({ onColorsChange }) {
11341
11540
  type: "button",
11342
11541
  title: c.base,
11343
11542
  onClick: () => {
11344
- setColors({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover });
11345
- onColorsChange?.({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover });
11543
+ setColors({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover, accent: c.accent, accentHover: c.accentHover });
11544
+ onColorsChange?.({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover, accent: c.accent, accentHover: c.accentHover });
11346
11545
  },
11347
11546
  className: cn(
11348
11547
  "h-7 w-full rounded-md border border-white/10 transition-transform hover:scale-110 focus:outline-none focus:ring-2 focus:ring-ring",