@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.
@@ -67345,7 +67345,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
67345
67345
  ] }, getKey(opt))) }),
67346
67346
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "max-h-48 overflow-y-auto p-1", children: options.map((option) => {
67347
67347
  const checked = selectedValues.includes(getKey(option));
67348
- 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: [
67348
+ 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: [
67349
67349
  /* @__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)(Check, { className: "h-3 w-3" }) }),
67350
67350
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
67351
67351
  "input",
@@ -67383,7 +67383,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
67383
67383
  "aria-required": required,
67384
67384
  "aria-invalid": !!error,
67385
67385
  className: cn(
67386
- "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",
67386
+ "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",
67387
67387
  error && "border-destructive focus:ring-destructive"
67388
67388
  ),
67389
67389
  children: [
@@ -67478,8 +67478,8 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
67478
67478
  "div",
67479
67479
  {
67480
67480
  className: cn(
67481
- "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",
67482
- (multiple ? selectedValues.includes(getKey(option)) : value === getKey(option)) && "bg-accent text-accent-foreground"
67481
+ "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",
67482
+ (multiple ? selectedValues.includes(getKey(option)) : value === getKey(option)) && "bg-primary/80 text-primary-foreground"
67483
67483
  ),
67484
67484
  onClick: () => handleSelect(getKey(option)),
67485
67485
  children: [
@@ -69640,6 +69640,23 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
69640
69640
  document.body
69641
69641
  );
69642
69642
  }
69643
+ var BUILT_IN_PATTERNS = {
69644
+ email: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
69645
+ url: /^https?:\/\/.+/,
69646
+ numeric: /^\d+(\.\d+)?$/,
69647
+ alpha: /^[a-zA-Z]+$/,
69648
+ alphanumeric: /^[a-zA-Z0-9]+$/
69649
+ };
69650
+ function validateField(field, value) {
69651
+ if (field.required && (value === "" || value === null || value === void 0))
69652
+ return `${field.label} is required`;
69653
+ if (field.validation && value !== "" && value !== null && value !== void 0) {
69654
+ const pattern = field.validation instanceof RegExp ? field.validation : BUILT_IN_PATTERNS[field.validation];
69655
+ if (pattern && !pattern.test(String(value)))
69656
+ return field.validationMessage ?? `${field.label} is invalid`;
69657
+ }
69658
+ return null;
69659
+ }
69643
69660
  function FieldRenderer({ field, value, onChange }) {
69644
69661
  if (field.render) return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: field.render(value, onChange) });
69645
69662
  const strOptions = (field.options ?? []).map(
@@ -69797,7 +69814,8 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
69797
69814
  itemId,
69798
69815
  onClose,
69799
69816
  onSuccess,
69800
- notif
69817
+ notif,
69818
+ grid
69801
69819
  }) {
69802
69820
  const [form, setForm] = React28.useState(() => {
69803
69821
  const init = {};
@@ -69806,11 +69824,22 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
69806
69824
  });
69807
69825
  return init;
69808
69826
  });
69827
+ const [fieldErrors, setFieldErrors] = React28.useState({});
69809
69828
  const [loading, setLoading] = React28.useState(false);
69810
69829
  const [error, setError] = React28.useState(null);
69811
69830
  const [banner, setBanner] = React28.useState(false);
69812
69831
  const handleSubmit = async (e) => {
69813
69832
  e.preventDefault();
69833
+ const errs = {};
69834
+ fields.forEach((f) => {
69835
+ const msg = validateField(f, form[f.key]);
69836
+ if (msg) errs[f.key] = msg;
69837
+ });
69838
+ if (Object.keys(errs).length) {
69839
+ setFieldErrors(errs);
69840
+ return;
69841
+ }
69842
+ setFieldErrors({});
69814
69843
  setLoading(true);
69815
69844
  setError(null);
69816
69845
  try {
@@ -69841,8 +69870,8 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
69841
69870
  loading ? "Saving\u2026" : "Save Changes"
69842
69871
  ] })
69843
69872
  ] }),
69844
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
69845
- banner && notif && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "space-y-2", children: [
69873
+ 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: [
69874
+ banner && notif && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "space-y-2", style: grid ? { gridColumn: `1 / -1` } : void 0, children: [
69846
69875
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
69847
69876
  NotificationBanner,
69848
69877
  {
@@ -69854,21 +69883,38 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
69854
69883
  ),
69855
69884
  notif.action && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: notif.action })
69856
69885
  ] }),
69857
- fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
69858
- f.type !== "checkbox" && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
69859
- f.label,
69860
- f.required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-danger ml-0.5", children: "*" })
69861
- ] }),
69862
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
69863
- FieldRenderer,
69864
- {
69865
- field: f,
69866
- value: form[f.key],
69867
- onChange: (v) => setForm((prev) => ({ ...prev, [f.key]: v }))
69868
- }
69869
- )
69870
- ] }, f.key)),
69871
- error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-danger", children: error })
69886
+ fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
69887
+ "div",
69888
+ {
69889
+ style: {
69890
+ ...f.colSpan ? { gridColumn: `span ${f.colSpan}` } : {},
69891
+ ...f.rowSpan ? { gridRow: `span ${f.rowSpan}` } : {}
69892
+ },
69893
+ children: [
69894
+ f.type !== "checkbox" && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
69895
+ f.label,
69896
+ f.required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-danger ml-0.5", children: "*" })
69897
+ ] }),
69898
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
69899
+ FieldRenderer,
69900
+ {
69901
+ field: f,
69902
+ value: form[f.key],
69903
+ onChange: (v) => {
69904
+ setForm((prev) => ({ ...prev, [f.key]: v }));
69905
+ if (fieldErrors[f.key]) {
69906
+ const msg = validateField(f, v);
69907
+ setFieldErrors((prev) => ({ ...prev, [f.key]: msg ?? "" }));
69908
+ }
69909
+ }
69910
+ }
69911
+ ),
69912
+ fieldErrors[f.key] && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-danger mt-1", children: fieldErrors[f.key] })
69913
+ ]
69914
+ },
69915
+ f.key
69916
+ )),
69917
+ error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-danger", style: grid ? { gridColumn: `1 / -1` } : void 0, children: error })
69872
69918
  ] })
69873
69919
  }
69874
69920
  );
@@ -70389,6 +70435,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70389
70435
  baseUrl: defaultActions.baseUrl,
70390
70436
  itemId: String(editItem[actionIdKey] ?? ""),
70391
70437
  notif: defaultActions.onSuccessNotif,
70438
+ grid: defaultActions.editFormGrid,
70392
70439
  onClose: () => setEditItem(null),
70393
70440
  onSuccess: (updated) => {
70394
70441
  setTableData(
@@ -70504,6 +70551,40 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70504
70551
  reload: () => setTick((t) => t + 1)
70505
70552
  };
70506
70553
  }
70554
+ function ActionBtn2({
70555
+ cfg,
70556
+ defaultIcon,
70557
+ defaultLabel,
70558
+ defaultVariant,
70559
+ onClick
70560
+ }) {
70561
+ const mode = cfg?.displayMode ?? "icon";
70562
+ const icon = cfg?.icon ?? defaultIcon;
70563
+ const label = cfg?.label ?? defaultLabel;
70564
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
70565
+ Button,
70566
+ {
70567
+ type: "button",
70568
+ title: label,
70569
+ size: cfg?.size ?? "xs",
70570
+ variant: cfg?.variant ?? defaultVariant,
70571
+ rounded: cfg?.rounded ?? "lg",
70572
+ gradientFrom: cfg?.gradientFrom,
70573
+ gradientTo: cfg?.gradientTo,
70574
+ gradientDirection: cfg?.gradientDirection,
70575
+ bgColor: cfg?.bgColor,
70576
+ textColor: cfg?.textColor,
70577
+ borderColor: cfg?.borderColor,
70578
+ borderWidth: cfg?.borderWidth,
70579
+ shadow: cfg?.shadow,
70580
+ iconOnly: mode === "icon",
70581
+ leftIcon: mode !== "text" ? icon : void 0,
70582
+ className: cfg?.className,
70583
+ onClick,
70584
+ children: mode !== "icon" ? label : void 0
70585
+ }
70586
+ );
70587
+ }
70507
70588
  function DGModalShell({ title, onClose, children, footer }) {
70508
70589
  return (0, import_react_dom3.createPortal)(
70509
70590
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
@@ -70619,7 +70700,8 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70619
70700
  itemId,
70620
70701
  onClose,
70621
70702
  onSuccess,
70622
- notif
70703
+ notif,
70704
+ grid
70623
70705
  }) {
70624
70706
  const [form, setForm] = React29.useState(() => {
70625
70707
  const init = {};
@@ -70628,11 +70710,22 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70628
70710
  });
70629
70711
  return init;
70630
70712
  });
70713
+ const [fieldErrors, setFieldErrors] = React29.useState({});
70631
70714
  const [loading, setLoading] = React29.useState(false);
70632
70715
  const [error, setError] = React29.useState(null);
70633
70716
  const [banner, setBanner] = React29.useState(false);
70634
70717
  const handleSubmit = async (e) => {
70635
70718
  e.preventDefault();
70719
+ const errs = {};
70720
+ fields.forEach((f) => {
70721
+ const msg = validateField(f, form[f.key]);
70722
+ if (msg) errs[f.key] = msg;
70723
+ });
70724
+ if (Object.keys(errs).length) {
70725
+ setFieldErrors(errs);
70726
+ return;
70727
+ }
70728
+ setFieldErrors({});
70636
70729
  setLoading(true);
70637
70730
  setError(null);
70638
70731
  try {
@@ -70663,27 +70756,26 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70663
70756
  loading ? "Saving\u2026" : "Save Changes"
70664
70757
  ] })
70665
70758
  ] }),
70666
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
70667
- banner && notif && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-2", children: [
70668
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
70669
- NotificationBanner,
70670
- {
70671
- variant: notif.editVariant ?? "success",
70672
- title: notif.editTitle ?? "Record updated",
70673
- description: notif.editBody,
70674
- onClose: () => setBanner(false)
70675
- }
70676
- ),
70759
+ 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: [
70760
+ banner && notif && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-2", style: grid ? { gridColumn: "1 / -1" } : void 0, children: [
70761
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NotificationBanner, { variant: notif.editVariant ?? "success", title: notif.editTitle ?? "Record updated", description: notif.editBody, onClose: () => setBanner(false) }),
70677
70762
  notif.action && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: notif.action })
70678
70763
  ] }),
70679
- fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
70764
+ fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { ...f.colSpan ? { gridColumn: `span ${f.colSpan}` } : {}, ...f.rowSpan ? { gridRow: `span ${f.rowSpan}` } : {} }, children: [
70680
70765
  f.type !== "checkbox" && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { className: "block text-xs font-semibold text-muted-foreground mb-1", children: [
70681
70766
  f.label,
70682
70767
  f.required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-danger ml-0.5", children: "*" })
70683
70768
  ] }),
70684
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DGFieldRenderer, { field: f, value: form[f.key], onChange: (v) => setForm((p) => ({ ...p, [f.key]: v })) })
70769
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DGFieldRenderer, { field: f, value: form[f.key], onChange: (v) => {
70770
+ setForm((p) => ({ ...p, [f.key]: v }));
70771
+ if (fieldErrors[f.key]) {
70772
+ const msg = validateField(f, v);
70773
+ setFieldErrors((p) => ({ ...p, [f.key]: msg ?? "" }));
70774
+ }
70775
+ } }),
70776
+ fieldErrors[f.key] && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xs text-danger mt-1", children: fieldErrors[f.key] })
70685
70777
  ] }, f.key)),
70686
- error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xs text-danger", children: error })
70778
+ error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xs text-danger", style: grid ? { gridColumn: "1 / -1" } : void 0, children: error })
70687
70779
  ] })
70688
70780
  }
70689
70781
  );
@@ -70734,6 +70826,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70734
70826
  columns,
70735
70827
  data,
70736
70828
  rowKey,
70829
+ filterable,
70737
70830
  selectable = false,
70738
70831
  selected: controlledSelected,
70739
70832
  onSelectChange,
@@ -70829,7 +70922,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70829
70922
  header: "Actions",
70830
70923
  render: (row) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1", children: [
70831
70924
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
70832
- ActionBtn,
70925
+ ActionBtn2,
70833
70926
  {
70834
70927
  cfg: defaultActions.viewButton,
70835
70928
  defaultIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Eye, { className: "h-3.5 w-3.5" }),
@@ -70839,7 +70932,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70839
70932
  }
70840
70933
  ),
70841
70934
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
70842
- ActionBtn,
70935
+ ActionBtn2,
70843
70936
  {
70844
70937
  cfg: defaultActions.editButton,
70845
70938
  defaultIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Pencil, { className: "h-3.5 w-3.5" }),
@@ -70849,7 +70942,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70849
70942
  }
70850
70943
  ),
70851
70944
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
70852
- ActionBtn,
70945
+ ActionBtn2,
70853
70946
  {
70854
70947
  cfg: defaultActions.deleteButton,
70855
70948
  defaultIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Trash, { className: "h-3.5 w-3.5" }),
@@ -70859,7 +70952,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70859
70952
  }
70860
70953
  ),
70861
70954
  defaultActions.extraActions?.map((extra) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
70862
- ActionBtn,
70955
+ ActionBtn2,
70863
70956
  {
70864
70957
  cfg: extra,
70865
70958
  defaultIcon: extra.icon,
@@ -70941,9 +71034,9 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
70941
71034
  `${String(col.key)}-${ci}`
70942
71035
  ))
70943
71036
  ] }),
70944
- visibleCols.some((c) => c.filterable) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("tr", { className: "border-b border-border bg-muted/10", children: [
71037
+ filterable && filterable.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("tr", { className: "border-b border-border bg-muted/10", children: [
70945
71038
  selectable && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("th", {}),
70946
- 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: [
71039
+ 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: [
70947
71040
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Search, { className: "absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground" }),
70948
71041
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
70949
71042
  "input",
@@ -71078,6 +71171,7 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
71078
71171
  baseUrl: defaultActions.baseUrl,
71079
71172
  itemId: String(editItem[actionIdKey] ?? ""),
71080
71173
  notif: defaultActions.onSuccessNotif,
71174
+ grid: defaultActions.editFormGrid,
71081
71175
  onClose: () => setEditItem(null),
71082
71176
  onSuccess: (updated) => {
71083
71177
  setTableData((prev) => prev.map((r2) => String(r2[actionIdKey]) === String(updated[actionIdKey]) ? updated : r2));
@@ -73796,12 +73890,14 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
73796
73890
  primaryHover: "#73F3E2",
73797
73891
  secondary: "#171717",
73798
73892
  secondaryHover: "#262626",
73799
- info: "#3b82f6",
73800
- infoHover: "#2563eb",
73893
+ info: "#F59E0B",
73894
+ infoHover: "#D97706",
73801
73895
  warning: "#f59e0b",
73802
73896
  warningHover: "#d97706",
73803
73897
  danger: "#ef4444",
73804
- dangerHover: "#dc2626"
73898
+ dangerHover: "#dc2626",
73899
+ accent: "#F59E0B",
73900
+ accentHover: "#D97706"
73805
73901
  }
73806
73902
  },
73807
73903
  themeOptions: [
@@ -73811,9 +73907,15 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
73811
73907
  ],
73812
73908
  fontSizes: [
73813
73909
  { "14px": "Small (14px)" },
73910
+ { "15px": "Small (15px)" },
73814
73911
  { "16px": "Medium (16px)" },
73912
+ { "17px": "Medium (17px)" },
73815
73913
  { "18px": "Large (18px)" },
73816
- { "20px": "Extra Large (20px)" }
73914
+ { "19px": "Large (19px)" },
73915
+ { "20px": "Extra Large (20px)" },
73916
+ { "21px": "Extra Large (21px)" },
73917
+ { "22px": "Extra Large (22px)" },
73918
+ { "24px": "2X Extra Large (24px)" }
73817
73919
  ],
73818
73920
  fontFamilies: [
73819
73921
  { '"Space Grotesk", "Inter", sans-serif': "Space Grotesk" },
@@ -73826,296 +73928,393 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
73826
73928
  { base: "secondary", hover: "secondaryHover", label: "Secondary" },
73827
73929
  { base: "info", hover: "infoHover", label: "Info" },
73828
73930
  { base: "warning", hover: "warningHover", label: "Warning" },
73829
- { base: "danger", hover: "dangerHover", label: "Danger" }
73931
+ { base: "danger", hover: "dangerHover", label: "Danger" },
73932
+ { base: "accent", hover: "accentHover", label: "accent" }
73830
73933
  ],
73831
73934
  colorPalette: [
73832
73935
  {
73833
73936
  base: "#6366F1",
73834
73937
  hover: "#4F46E5",
73835
73938
  info: "#F59E0B",
73836
- infoHover: "#D97706"
73939
+ infoHover: "#D97706",
73940
+ accent: "#F59E0B",
73941
+ accentHover: "#D97706"
73837
73942
  },
73838
73943
  {
73839
73944
  base: "#818CF8",
73840
73945
  hover: "#6366F1",
73841
73946
  info: "#FBBF24",
73842
- infoHover: "#F59E0B"
73947
+ infoHover: "#F59E0B",
73948
+ accent: "#FBBF24",
73949
+ accentHover: "#F59E0B"
73843
73950
  },
73844
73951
  {
73845
73952
  base: "#4F46E5",
73846
73953
  hover: "#4338CA",
73847
73954
  info: "#F59E0B",
73848
- infoHover: "#D97706"
73955
+ infoHover: "#D97706",
73956
+ accent: "#F59E0B",
73957
+ accentHover: "#D97706"
73849
73958
  },
73850
73959
  {
73851
73960
  base: "#3730A3",
73852
73961
  hover: "#312E81",
73853
73962
  info: "#D97706",
73854
- infoHover: "#B45309"
73963
+ infoHover: "#B45309",
73964
+ accent: "#D97706",
73965
+ accentHover: "#B45309"
73855
73966
  },
73856
73967
  {
73857
73968
  base: "#7C3AED",
73858
73969
  hover: "#6D28D9",
73859
73970
  info: "#F97316",
73860
- infoHover: "#EA580C"
73971
+ infoHover: "#EA580C",
73972
+ accent: "#F97316",
73973
+ accentHover: "#EA580C"
73861
73974
  },
73862
73975
  {
73863
73976
  base: "#A78BFA",
73864
73977
  hover: "#8B5CF6",
73865
73978
  info: "#FB923C",
73866
- infoHover: "#F97316"
73979
+ infoHover: "#F97316",
73980
+ accent: "#FB923C",
73981
+ accentHover: "#F97316"
73867
73982
  },
73868
73983
  {
73869
73984
  base: "#8B5CF6",
73870
73985
  hover: "#7C3AED",
73871
73986
  info: "#F97316",
73872
- infoHover: "#EA580C"
73987
+ infoHover: "#EA580C",
73988
+ accent: "#F97316",
73989
+ accentHover: "#EA580C"
73873
73990
  },
73874
73991
  {
73875
73992
  base: "#6D28D9",
73876
73993
  hover: "#5B21B6",
73877
73994
  info: "#EA580C",
73878
- infoHover: "#C2410C"
73995
+ infoHover: "#C2410C",
73996
+ accent: "#EA580C",
73997
+ accentHover: "#C2410C"
73879
73998
  },
73880
73999
  {
73881
74000
  base: "#0EA5E9",
73882
74001
  hover: "#0284C7",
73883
74002
  info: "#F97316",
73884
- infoHover: "#EA580C"
74003
+ infoHover: "#EA580C",
74004
+ accent: "#F97316",
74005
+ accentHover: "#EA580C"
73885
74006
  },
73886
74007
  {
73887
74008
  base: "#38BDF8",
73888
74009
  hover: "#0EA5E9",
73889
74010
  info: "#FB923C",
73890
- infoHover: "#F97316"
74011
+ infoHover: "#F97316",
74012
+ accent: "#FB923C",
74013
+ accentHover: "#F97316"
73891
74014
  },
73892
74015
  {
73893
74016
  base: "#3B82F6",
73894
74017
  hover: "#2563EB",
73895
74018
  info: "#F59E0B",
73896
- infoHover: "#D97706"
74019
+ infoHover: "#D97706",
74020
+ accent: "#F59E0B",
74021
+ accentHover: "#D97706"
73897
74022
  },
73898
74023
  {
73899
74024
  base: "#1D4ED8",
73900
74025
  hover: "#1E40AF",
73901
74026
  info: "#D97706",
73902
- infoHover: "#B45309"
74027
+ infoHover: "#B45309",
74028
+ accent: "#D97706",
74029
+ accentHover: "#B45309"
73903
74030
  },
73904
74031
  {
73905
74032
  base: "#06B6D4",
73906
74033
  hover: "#0891B2",
73907
74034
  info: "#A855F7",
73908
- infoHover: "#9333EA"
74035
+ infoHover: "#9333EA",
74036
+ accent: "#A855F7",
74037
+ accentHover: "#9333EA"
73909
74038
  },
73910
74039
  {
73911
74040
  base: "#22D3EE",
73912
74041
  hover: "#06B6D4",
73913
74042
  info: "#C084FC",
73914
- infoHover: "#A855F7"
74043
+ infoHover: "#A855F7",
74044
+ accent: "#C084FC",
74045
+ accentHover: "#A855F7"
73915
74046
  },
73916
74047
  {
73917
74048
  base: "#14B8A6",
73918
74049
  hover: "#0F766E",
73919
74050
  info: "#8B5CF6",
73920
- infoHover: "#7C3AED"
74051
+ infoHover: "#7C3AED",
74052
+ accent: "#8B5CF6",
74053
+ accentHover: "#7C3AED"
73921
74054
  },
73922
74055
  {
73923
74056
  base: "#0D9488",
73924
74057
  hover: "#0F766E",
73925
74058
  info: "#7C3AED",
73926
- infoHover: "#6D28D9"
74059
+ infoHover: "#6D28D9",
74060
+ accent: "#7C3AED",
74061
+ accentHover: "#6D28D9"
73927
74062
  },
73928
74063
  {
73929
74064
  base: "#10B981",
73930
74065
  hover: "#059669",
73931
74066
  info: "#8B5CF6",
73932
- infoHover: "#7C3AED"
74067
+ infoHover: "#7C3AED",
74068
+ accent: "#8B5CF6",
74069
+ accentHover: "#7C3AED"
73933
74070
  },
73934
74071
  {
73935
74072
  base: "#34D399",
73936
74073
  hover: "#10B981",
73937
74074
  info: "#A855F7",
73938
- infoHover: "#9333EA"
74075
+ infoHover: "#9333EA",
74076
+ accent: "#A855F7",
74077
+ accentHover: "#9333EA"
73939
74078
  },
73940
74079
  {
73941
74080
  base: "#22C55E",
73942
74081
  hover: "#16A34A",
73943
74082
  info: "#7C3AED",
73944
- infoHover: "#6D28D9"
74083
+ infoHover: "#6D28D9",
74084
+ accent: "#7C3AED",
74085
+ accentHover: "#6D28D9"
73945
74086
  },
73946
74087
  {
73947
74088
  base: "#16A34A",
73948
74089
  hover: "#15803D",
73949
74090
  info: "#6D28D9",
73950
- infoHover: "#5B21B6"
74091
+ infoHover: "#5B21B6",
74092
+ accent: "#6D28D9",
74093
+ accentHover: "#5B21B6"
73951
74094
  },
73952
74095
  {
73953
74096
  base: "#84CC16",
73954
74097
  hover: "#65A30D",
73955
74098
  info: "#6366F1",
73956
- infoHover: "#4F46E5"
74099
+ infoHover: "#4F46E5",
74100
+ accent: "#6366F1",
74101
+ accentHover: "#4F46E5"
73957
74102
  },
73958
74103
  {
73959
74104
  base: "#A3E635",
73960
74105
  hover: "#84CC16",
73961
74106
  info: "#818CF8",
73962
- infoHover: "#6366F1"
74107
+ infoHover: "#6366F1",
74108
+ accent: "#818CF8",
74109
+ accentHover: "#6366F1"
73963
74110
  },
73964
74111
  {
73965
74112
  base: "#65A30D",
73966
74113
  hover: "#4D7C0F",
73967
74114
  info: "#4F46E5",
73968
- infoHover: "#4338CA"
74115
+ infoHover: "#4338CA",
74116
+ accent: "#4F46E5",
74117
+ accentHover: "#4338CA"
73969
74118
  },
73970
74119
  {
73971
74120
  base: "#4D7C0F",
73972
74121
  hover: "#3F6212",
73973
74122
  info: "#3730A3",
73974
- infoHover: "#312E81"
74123
+ infoHover: "#312E81",
74124
+ accent: "#3730A3",
74125
+ accentHover: "#312E81"
73975
74126
  },
73976
74127
  {
73977
74128
  base: "#EAB308",
73978
74129
  hover: "#CA8A04",
73979
74130
  info: "#3B82F6",
73980
- infoHover: "#2563EB"
74131
+ infoHover: "#2563EB",
74132
+ accent: "#3B82F6",
74133
+ accentHover: "#2563EB"
73981
74134
  },
73982
74135
  {
73983
74136
  base: "#FACC15",
73984
74137
  hover: "#EAB308",
73985
74138
  info: "#60A5FA",
73986
- infoHover: "#3B82F6"
74139
+ infoHover: "#3B82F6",
74140
+ accent: "#60A5FA",
74141
+ accentHover: "#3B82F6"
73987
74142
  },
73988
74143
  {
73989
74144
  base: "#F59E0B",
73990
74145
  hover: "#D97706",
73991
74146
  info: "#2563EB",
73992
- infoHover: "#1D4ED8"
74147
+ infoHover: "#1D4ED8",
74148
+ accent: "#2563EB",
74149
+ accentHover: "#1D4ED8"
73993
74150
  },
73994
74151
  {
73995
74152
  base: "#D97706",
73996
74153
  hover: "#B45309",
73997
74154
  info: "#1D4ED8",
73998
- infoHover: "#1E40AF"
74155
+ infoHover: "#1E40AF",
74156
+ accent: "#1D4ED8",
74157
+ accentHover: "#1E40AF"
73999
74158
  },
74000
74159
  {
74001
74160
  base: "#F97316",
74002
74161
  hover: "#EA580C",
74003
74162
  info: "#0EA5E9",
74004
- infoHover: "#0284C7"
74163
+ infoHover: "#0284C7",
74164
+ accent: "#0EA5E9",
74165
+ accentHover: "#0284C7"
74005
74166
  },
74006
74167
  {
74007
74168
  base: "#FB923C",
74008
74169
  hover: "#F97316",
74009
74170
  info: "#38BDF8",
74010
- infoHover: "#0EA5E9"
74171
+ infoHover: "#0EA5E9",
74172
+ accent: "#38BDF8",
74173
+ accentHover: "#0EA5E9"
74011
74174
  },
74012
74175
  {
74013
74176
  base: "#EA580C",
74014
74177
  hover: "#C2410C",
74015
74178
  info: "#0284C7",
74016
- infoHover: "#0369A1"
74179
+ infoHover: "#0369A1",
74180
+ accent: "#0284C7",
74181
+ accentHover: "#0369A1"
74017
74182
  },
74018
74183
  {
74019
74184
  base: "#C2410C",
74020
74185
  hover: "#9A3412",
74021
74186
  info: "#0369A1",
74022
- infoHover: "#075985"
74187
+ infoHover: "#075985",
74188
+ accent: "#0369A1",
74189
+ accentHover: "#075985"
74023
74190
  },
74024
74191
  {
74025
74192
  base: "#EF4444",
74026
74193
  hover: "#DC2626",
74027
74194
  info: "#0EA5E9",
74028
- infoHover: "#0284C7"
74195
+ infoHover: "#0284C7",
74196
+ accent: "#0EA5E9",
74197
+ accentHover: "#0284C7"
74029
74198
  },
74030
74199
  {
74031
74200
  base: "#F87171",
74032
74201
  hover: "#EF4444",
74033
74202
  info: "#38BDF8",
74034
- infoHover: "#0EA5E9"
74203
+ infoHover: "#0EA5E9",
74204
+ accent: "#38BDF8",
74205
+ accentHover: "#0EA5E9"
74035
74206
  },
74036
74207
  {
74037
74208
  base: "#DC2626",
74038
74209
  hover: "#B91C1C",
74039
74210
  info: "#0284C7",
74040
- infoHover: "#0369A1"
74211
+ infoHover: "#0369A1",
74212
+ accent: "#0284C7",
74213
+ accentHover: "#0369A1"
74041
74214
  },
74042
74215
  {
74043
74216
  base: "#B91C1C",
74044
74217
  hover: "#991B1B",
74045
74218
  info: "#0369A1",
74046
- infoHover: "#075985"
74219
+ infoHover: "#075985",
74220
+ accent: "#0369A1",
74221
+ accentHover: "#075985"
74047
74222
  },
74048
74223
  {
74049
74224
  base: "#F43F5E",
74050
74225
  hover: "#E11D48",
74051
74226
  info: "#0EA5E9",
74052
- infoHover: "#0284C7"
74227
+ infoHover: "#0284C7",
74228
+ accent: "#0EA5E9",
74229
+ accentHover: "#0284C7"
74053
74230
  },
74054
74231
  {
74055
74232
  base: "#FB7185",
74056
74233
  hover: "#F43F5E",
74057
74234
  info: "#38BDF8",
74058
- infoHover: "#0EA5E9"
74235
+ infoHover: "#0EA5E9",
74236
+ accent: "#38BDF8",
74237
+ accentHover: "#0EA5E9"
74059
74238
  },
74060
74239
  {
74061
74240
  base: "#E11D48",
74062
74241
  hover: "#BE123C",
74063
74242
  info: "#0284C7",
74064
- infoHover: "#0369A1"
74243
+ infoHover: "#0369A1",
74244
+ accent: "#0284C7",
74245
+ accentHover: "#0369A1"
74065
74246
  },
74066
74247
  {
74067
74248
  base: "#BE123C",
74068
74249
  hover: "#9F1239",
74069
74250
  info: "#0369A1",
74070
- infoHover: "#075985"
74251
+ infoHover: "#075985",
74252
+ accent: "#0369A1",
74253
+ accentHover: "#075985"
74071
74254
  },
74072
74255
  {
74073
74256
  base: "#EC4899",
74074
74257
  hover: "#DB2777",
74075
74258
  info: "#06B6D4",
74076
- infoHover: "#0891B2"
74259
+ infoHover: "#0891B2",
74260
+ accent: "#06B6D4",
74261
+ accentHover: "#0891B2"
74077
74262
  },
74078
74263
  {
74079
74264
  base: "#F472B6",
74080
74265
  hover: "#EC4899",
74081
74266
  info: "#22D3EE",
74082
- infoHover: "#06B6D4"
74267
+ infoHover: "#06B6D4",
74268
+ accent: "#22D3EE",
74269
+ accentHover: "#06B6D4"
74083
74270
  },
74084
74271
  {
74085
74272
  base: "#DB2777",
74086
74273
  hover: "#BE185D",
74087
74274
  info: "#0891B2",
74088
- infoHover: "#0E7490"
74275
+ infoHover: "#0E7490",
74276
+ accent: "#0891B2",
74277
+ accentHover: "#0E7490"
74089
74278
  },
74090
74279
  {
74091
74280
  base: "#BE185D",
74092
74281
  hover: "#9D174D",
74093
74282
  info: "#0E7490",
74094
- infoHover: "#155E75"
74283
+ infoHover: "#155E75",
74284
+ accent: "#0E7490",
74285
+ accentHover: "#155E75"
74095
74286
  },
74096
74287
  {
74097
74288
  base: "#D946EF",
74098
74289
  hover: "#C026D3",
74099
74290
  info: "#F59E0B",
74100
- infoHover: "#D97706"
74291
+ infoHover: "#D97706",
74292
+ accent: "#F59E0B",
74293
+ accentHover: "#D97706"
74101
74294
  },
74102
74295
  {
74103
74296
  base: "#E879F9",
74104
74297
  hover: "#D946EF",
74105
74298
  info: "#FBBF24",
74106
- infoHover: "#F59E0B"
74299
+ infoHover: "#F59E0B",
74300
+ accent: "#FBBF24",
74301
+ accentHover: "#F59E0B"
74107
74302
  },
74108
74303
  {
74109
74304
  base: "#C026D3",
74110
74305
  hover: "#A21CAF",
74111
74306
  info: "#D97706",
74112
- infoHover: "#B45309"
74307
+ infoHover: "#B45309",
74308
+ accent: "#D97706",
74309
+ accentHover: "#B45309"
74113
74310
  },
74114
74311
  {
74115
74312
  base: "#A21CAF",
74116
74313
  hover: "#86198F",
74117
74314
  info: "#B45309",
74118
- infoHover: "#92400E"
74315
+ infoHover: "#92400E",
74316
+ accent: "#B45309",
74317
+ accentHover: "#92400E"
74119
74318
  }
74120
74319
  ]
74121
74320
  };
@@ -74903,8 +75102,8 @@ ${n2.shaderPreludeCode.vertexSource}`, define: n2.shaderDefine }, defaultProject
74903
75102
  type: "button",
74904
75103
  title: c.base,
74905
75104
  onClick: () => {
74906
- setColors({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover });
74907
- onColorsChange?.({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover });
75105
+ setColors({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover, accent: c.accent, accentHover: c.accentHover });
75106
+ onColorsChange?.({ primary: c.base, primaryHover: c.hover, info: c.info, infoHover: c.infoHover, accent: c.accent, accentHover: c.accentHover });
74908
75107
  },
74909
75108
  className: cn(
74910
75109
  "h-7 w-full rounded-md border border-white/10 transition-transform hover:scale-110 focus:outline-none focus:ring-2 focus:ring-ring",