@opencxh/ui-kit 3.55.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
  },
@@ -3412,25 +3411,25 @@ const rt = ({
3412
3411
  ] })
3413
3412
  ] });
3414
3413
  }, Er = {
3415
- default: "bg-secondary-100 text-secondary-800 dark:bg-secondary-800 dark:text-secondary-200",
3416
- primary: "bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-200",
3417
- secondary: "bg-secondary-100 text-secondary-800 dark:bg-secondary-800 dark:text-secondary-200",
3418
- success: "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",
3419
- warning: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",
3420
- error: "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",
3421
- 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"
3422
3421
  }, $r = {
3423
3422
  sm: "px-2 py-0.5 text-xs",
3424
3423
  md: "px-2.5 py-1 text-sm",
3425
3424
  lg: "px-3 py-1.5 text-base"
3426
3425
  }, zr = {
3427
- default: "bg-secondary-400",
3428
- primary: "bg-primary-500",
3429
- secondary: "bg-secondary-400",
3430
- success: "bg-green-500",
3431
- warning: "bg-yellow-500",
3432
- error: "bg-red-500",
3433
- 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"
3434
3433
  };
3435
3434
  function tt({
3436
3435
  variant: r = "default",
@@ -4114,7 +4113,7 @@ const ot = ({
4114
4113
  r.icon && /* @__PURE__ */ e("span", { className: "mr-2", children: r.icon }),
4115
4114
  /* @__PURE__ */ e("span", { className: "flex-1", children: r.label }),
4116
4115
  r.count !== void 0 && r.count > 0 && /* @__PURE__ */ e("span", { className: "ml-2 mr-1.5", children: r.count }),
4117
- 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" }) })
4118
4117
  ]
4119
4118
  }
4120
4119
  ),
@@ -4137,7 +4136,7 @@ const ot = ({
4137
4136
  preMenuItemsComponent: c
4138
4137
  }) => /* @__PURE__ */ d("div", { className: "flex flex-col h-screen mb-6", children: [
4139
4138
  /* @__PURE__ */ d("div", { className: "sidebar-menu-header", children: [
4140
- /* @__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 }),
4141
4140
  /* @__PURE__ */ e("div", { className: "sidebar-menu-actions", children: n?.map((h, b) => /* @__PURE__ */ e("span", { className: "sidebar-menu-action-icon", children: h }, b)) })
4142
4141
  ] }),
4143
4142
  c && /* @__PURE__ */ e("div", { className: "sidebar-menu-pre-items mb-4", children: c }),
@@ -4439,7 +4438,11 @@ const it = ({
4439
4438
  info: "bg-info",
4440
4439
  neutral: "bg-neutral",
4441
4440
  white: "bg-white",
4442
- 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"
4443
4446
  }, Or = {
4444
4447
  none: "rounded-none",
4445
4448
  sm: "rounded-sm",
@@ -4502,7 +4505,7 @@ const it = ({
4502
4505
  );
4503
4506
  Te.displayName = "Box";
4504
4507
  const mt = ({ children: r, title: n, ...t }) => /* @__PURE__ */ d(Te, { background: "module", radius: "xl", shadow: "sm", ...t, children: [
4505
- 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 }),
4506
4509
  r
4507
4510
  ] });
4508
4511
  function ht({