@opencxh/ui-kit 3.49.0 → 3.57.1

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
@@ -71,7 +71,7 @@ const Ge = {
71
71
  primary: "btn o__primary",
72
72
  secondary: "btn o__secondary",
73
73
  outline: "btn o__secondary",
74
- ghost: "btn text-gray-700",
74
+ ghost: "btn o__tertiary",
75
75
  destructive: "btn o__destructive"
76
76
  }, Ke = {
77
77
  xs: "px-2 py-1 text-xs",
@@ -108,9 +108,8 @@ const Ge = {
108
108
  ref: l,
109
109
  type: "button",
110
110
  className: g(
111
- // Base styles
112
- "inline-flex items-center justify-center font-medium rounded-lg transition-colors duration-200",
113
- "focus:outline-none focus:ring-1 focus:ring-offset-1",
111
+ // Base styles — radius/focus/colors come from the token-driven `.btn o__*` CSS
112
+ "inline-flex items-center justify-center transition-colors duration-200",
114
113
  "disabled:opacity-50 disabled:cursor-not-allowed",
115
114
  // Variant styles
116
115
  Ge[r],
@@ -1732,18 +1731,18 @@ const ur = ({
1732
1731
  className: "min-w-[160px] btn btn o__secondary"
1733
1732
  }
1734
1733
  ) }) : /* @__PURE__ */ e("div", { className: "flex items-center space-x-1 max-w-[240px]", children: /* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ d("details", { className: "group", children: [
1735
- /* @__PURE__ */ d("summary", { className: "flex items-center space-x-2 cursor-pointer hover:bg-white rounded-full px-3 py-2 text-sm btn btn o__secondary", children: [
1734
+ /* @__PURE__ */ d("summary", { className: "flex items-center space-x-2 cursor-pointer rounded-full px-3 py-2 text-sm btn btn o__secondary", children: [
1736
1735
  /* @__PURE__ */ e("span", { children: r.label }),
1737
- /* @__PURE__ */ e("span", { className: "text-gray-800", children: r.multiSelect && Array.isArray(r.value) ? r.value?.map(
1736
+ /* @__PURE__ */ e("span", { className: "text-default", children: r.multiSelect && Array.isArray(r.value) ? r.value?.map(
1738
1737
  (a) => r.options?.find((s) => s.value === a)?.label
1739
1738
  ).join(", ") : r.options?.find((a) => a.value === r.value)?.label }),
1740
- /* @__PURE__ */ e("span", { className: "text-gray-500 text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(ze, {}) })
1739
+ /* @__PURE__ */ e("span", { className: "text-muted text-sm group-open:rotate-180 transition-transform", children: /* @__PURE__ */ e(ze, {}) })
1741
1740
  ] }),
1742
- /* @__PURE__ */ d("div", { className: "absolute z-10 left-0 mt-1 bg-white border border-gray-100 rounded-lg shadow-sm p-2 w-48", children: [
1741
+ /* @__PURE__ */ d("div", { className: "absolute z-10 left-0 mt-1 bg-module border border-neutral rounded-lg shadow-lvl-0 p-2 w-48", children: [
1743
1742
  r.options?.map((a) => /* @__PURE__ */ e(
1744
1743
  "button",
1745
1744
  {
1746
- className: "w-full text-left px-3 py-2 rounded-md hover:bg-gray-50 text-sm text-gray-700 flex items-center space-x-2",
1745
+ className: "w-full text-left px-3 py-2 rounded-md hover:bg-module-subtle text-sm text-default flex items-center space-x-2",
1747
1746
  onClick: () => t(a.value),
1748
1747
  children: /* @__PURE__ */ e(
1749
1748
  "span",
@@ -1758,9 +1757,9 @@ const ur = ({
1758
1757
  r.value && /* @__PURE__ */ e(
1759
1758
  "button",
1760
1759
  {
1761
- className: "w-full text-left px-3 py-2 rounded-md hover:bg-gray-50 text-sm text-gray-700 flex items-center space-x-2 mt-2",
1760
+ className: "w-full text-left px-3 py-2 rounded-md hover:bg-module-subtle text-sm text-default flex items-center space-x-2 mt-2",
1762
1761
  onClick: () => t(null),
1763
- children: /* @__PURE__ */ e("span", { className: "text-gray-400 dark:text-gray-600", children: "Clear filter" })
1762
+ children: /* @__PURE__ */ e("span", { className: "text-muted", children: "Clear filter" })
1764
1763
  }
1765
1764
  )
1766
1765
  ] })
@@ -1922,8 +1921,8 @@ const ur = ({
1922
1921
  "text-center": o.align === "center",
1923
1922
  "text-right": o.align === "right",
1924
1923
  "cursor-pointer select-none": o.sortable,
1925
- "sticky left-0 bg-white dark:bg-neutral-900": o.sticky === "left",
1926
- "sticky right-0 bg-white dark:bg-neutral-900": o.sticky === "right"
1924
+ "sticky left-0 bg-module": o.sticky === "left",
1925
+ "sticky right-0 bg-module": o.sticky === "right"
1927
1926
  }
1928
1927
  ),
1929
1928
  style: { width: o.width },
@@ -2005,8 +2004,8 @@ const ur = ({
2005
2004
  "text-left": j.align === "left" || !j.align,
2006
2005
  "text-center": j.align === "center",
2007
2006
  "text-right": j.align === "right",
2008
- "sticky left-0 bg-white dark:bg-neutral-900": j.sticky === "left",
2009
- "sticky right-0 bg-white dark:bg-neutral-900": j.sticky === "right"
2007
+ "sticky left-0 bg-module": j.sticky === "left",
2008
+ "sticky right-0 bg-module": j.sticky === "right"
2010
2009
  }),
2011
2010
  children: j.cell ? j.cell(Y, o, w) : String(Y || "")
2012
2011
  },
@@ -2358,18 +2357,21 @@ const Z = ({
2358
2357
  "font-semibold": t === "semibold",
2359
2358
  "font-bold": t === "bold"
2360
2359
  },
2361
- // Color variants
2360
+ // Color variants. Tekst-tonen lopen via de semantische `--text-*` tokens
2361
+ // (gedefinieerd voor light én dark in global.css) zodat ze matchen met de
2362
+ // rest van de interface (zelfde tokens als bv. Table). De `--text-*` vars
2363
+ // worden in `.dark` overschreven, dus geen aparte `dark:`-varianten nodig.
2362
2364
  {
2363
2365
  "text-primary": a === "primary",
2364
2366
  "text-secondary": a === "secondary",
2365
- "text-accent": a === "accent",
2366
- "text-success": a === "success",
2367
+ "text-[var(--text-accent)]": a === "accent",
2368
+ "text-[var(--text-success)]": a === "success",
2367
2369
  "text-warning": a === "warning",
2368
- "text-error": a === "error",
2370
+ "text-[var(--text-error)]": a === "error",
2369
2371
  "text-info": a === "info",
2370
- "text-neutral": a === "neutral",
2372
+ "text-[var(--text-default)]": a === "neutral",
2371
2373
  "text-current": a === "current",
2372
- "text-neutral-400 dark:text-neutral-500": a === "muted"
2374
+ "text-[var(--text-muted)]": a === "muted"
2373
2375
  },
2374
2376
  // Alignment
2375
2377
  {
@@ -3409,25 +3411,25 @@ const rt = ({
3409
3411
  ] })
3410
3412
  ] });
3411
3413
  }, Er = {
3412
- default: "bg-secondary-100 text-secondary-800 dark:bg-secondary-800 dark:text-secondary-200",
3413
- primary: "bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-200",
3414
- secondary: "bg-secondary-100 text-secondary-800 dark:bg-secondary-800 dark:text-secondary-200",
3415
- success: "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",
3416
- warning: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",
3417
- error: "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",
3418
- info: "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200"
3414
+ default: "bg-neutral-container text-default",
3415
+ primary: "bg-accent-container text-accent",
3416
+ secondary: "bg-neutral-container text-muted",
3417
+ success: "bg-success-container text-success",
3418
+ warning: "bg-notice-container text-on-notice",
3419
+ error: "bg-error-container text-error",
3420
+ info: "bg-beta-container text-link"
3419
3421
  }, $r = {
3420
3422
  sm: "px-2 py-0.5 text-xs",
3421
3423
  md: "px-2.5 py-1 text-sm",
3422
3424
  lg: "px-3 py-1.5 text-base"
3423
3425
  }, zr = {
3424
- default: "bg-secondary-400",
3425
- primary: "bg-primary-500",
3426
- secondary: "bg-secondary-400",
3427
- success: "bg-green-500",
3428
- warning: "bg-yellow-500",
3429
- error: "bg-red-500",
3430
- info: "bg-blue-500"
3426
+ default: "bg-neutral-fill",
3427
+ primary: "bg-accent-fill",
3428
+ secondary: "bg-neutral-fill",
3429
+ success: "bg-success-fill",
3430
+ warning: "bg-notice-fill",
3431
+ error: "bg-error-fill",
3432
+ info: "bg-beta-fill"
3431
3433
  };
3432
3434
  function tt({
3433
3435
  variant: r = "default",
@@ -4111,7 +4113,7 @@ const ot = ({
4111
4113
  r.icon && /* @__PURE__ */ e("span", { className: "mr-2", children: r.icon }),
4112
4114
  /* @__PURE__ */ e("span", { className: "flex-1", children: r.label }),
4113
4115
  r.count !== void 0 && r.count > 0 && /* @__PURE__ */ e("span", { className: "ml-2 mr-1.5", children: r.count }),
4114
- c && /* @__PURE__ */ e("span", { className: `${a ? "collapsed" : ""}`, children: /* @__PURE__ */ e(Re, { className: "w-4 h-4 text-gray-300" }) })
4116
+ c && /* @__PURE__ */ e("span", { className: `${a ? "collapsed" : ""}`, children: /* @__PURE__ */ e(Re, { className: "w-4 h-4 text-muted" }) })
4115
4117
  ]
4116
4118
  }
4117
4119
  ),
@@ -4134,7 +4136,7 @@ const ot = ({
4134
4136
  preMenuItemsComponent: c
4135
4137
  }) => /* @__PURE__ */ d("div", { className: "flex flex-col h-screen mb-6", children: [
4136
4138
  /* @__PURE__ */ d("div", { className: "sidebar-menu-header", children: [
4137
- /* @__PURE__ */ e("span", { className: "text-xl font-semibold text-gray-800 mb-2", children: r }),
4139
+ /* @__PURE__ */ e("span", { className: "text-xl font-semibold text-default mb-2", children: r }),
4138
4140
  /* @__PURE__ */ e("div", { className: "sidebar-menu-actions", children: n?.map((h, b) => /* @__PURE__ */ e("span", { className: "sidebar-menu-action-icon", children: h }, b)) })
4139
4141
  ] }),
4140
4142
  c && /* @__PURE__ */ e("div", { className: "sidebar-menu-pre-items mb-4", children: c }),
@@ -4181,16 +4183,16 @@ const ot = ({
4181
4183
  "font-semibold": t === "semibold",
4182
4184
  "font-bold": t === "bold"
4183
4185
  },
4184
- // Color variants
4186
+ // Color variants — semantische `--text-*` tokens (light+dark) net als Text/Table.
4185
4187
  {
4186
4188
  "text-primary": a === "primary",
4187
4189
  "text-secondary": a === "secondary",
4188
- "text-accent": a === "accent",
4189
- "text-success": a === "success",
4190
+ "text-[var(--text-accent)]": a === "accent",
4191
+ "text-[var(--text-success)]": a === "success",
4190
4192
  "text-warning": a === "warning",
4191
- "text-error": a === "error",
4193
+ "text-[var(--text-error)]": a === "error",
4192
4194
  "text-info": a === "info",
4193
- "text-neutral": a === "neutral",
4195
+ "text-[var(--text-default)]": a === "neutral",
4194
4196
  "text-current": a === "current"
4195
4197
  },
4196
4198
  // Alignment
@@ -4436,7 +4438,11 @@ const it = ({
4436
4438
  info: "bg-info",
4437
4439
  neutral: "bg-neutral",
4438
4440
  white: "bg-white",
4439
- module: "bg-module"
4441
+ module: "bg-module",
4442
+ "module-subtle": "bg-module-subtle",
4443
+ backdrop: "bg-backdrop",
4444
+ editor: "bg-editor",
4445
+ input: "bg-input"
4440
4446
  }, Or = {
4441
4447
  none: "rounded-none",
4442
4448
  sm: "rounded-sm",
@@ -4499,7 +4505,7 @@ const it = ({
4499
4505
  );
4500
4506
  Te.displayName = "Box";
4501
4507
  const mt = ({ children: r, title: n, ...t }) => /* @__PURE__ */ d(Te, { background: "module", radius: "xl", shadow: "sm", ...t, children: [
4502
- n && /* @__PURE__ */ e("span", { className: "text-base font-medium text-gray-800 mb-2", children: n }),
4508
+ n && /* @__PURE__ */ e("span", { className: "text-base font-medium text-default mb-2", children: n }),
4503
4509
  r
4504
4510
  ] });
4505
4511
  function ht({