@oliasoft-open-source/react-ui-library 5.13.3 → 5.13.4

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.d.ts CHANGED
@@ -55,7 +55,7 @@ export declare type AuditLogOperation = 'Created' | 'Cloned' | 'Reverted' | 'Imp
55
55
 
56
56
  export declare type AuditLogSource = 'System' | 'Application' | 'API';
57
57
 
58
- export declare const Badge: ({ children, color, title, dot, margin, small, }: IBadgeProps) => JSX_2.Element;
58
+ export declare const Badge: ({ children, color, textColor: textColorProp, title, dot, margin, small, }: IBadgeProps) => JSX_2.Element;
59
59
 
60
60
  export declare const Breadcrumb: ({ links, small }: IBreadcrumbProps) => JSX_2.Element;
61
61
 
@@ -215,6 +215,7 @@ declare interface IAuditLogProps {
215
215
  export declare interface IBadgeProps {
216
216
  children?: ReactNode;
217
217
  color?: string;
218
+ textColor?: string;
218
219
  title?: TStringOrNumber | ReactNode | null;
219
220
  dot?: boolean;
220
221
  margin?: TStringOrNumber | null;
package/dist/index.js CHANGED
@@ -827,29 +827,28 @@ const Section$1 = ({ section: e, closeOnOptionClick: t, close: n, tree: r, path:
827
827
  placement: e || (t ? "right-start" : "bottom-start")
828
828
  }), isStringNumberOrNode = (e) => isString(e) || isNumber(e) || isValidElement(e), getType = (e) => Array.isArray(e) ? "array" : typeof e;
829
829
  var badge_module_default = {
830
- wrapper: "_wrapper_nwprz_1",
831
- badge: "_badge_nwprz_5",
832
- label: "_label_nwprz_11",
833
- dark: "_dark_nwprz_23",
834
- light: "_light_nwprz_26",
835
- small: "_small_nwprz_29",
836
- dot: "_dot_nwprz_33",
837
- hasChildren: "_hasChildren_nwprz_39"
830
+ wrapper: "_wrapper_14vly_1",
831
+ badge: "_badge_14vly_5",
832
+ label: "_label_14vly_11",
833
+ small: "_small_14vly_23",
834
+ dot: "_dot_14vly_27",
835
+ hasChildren: "_hasChildren_14vly_33"
838
836
  }, isDark = (e) => {
839
837
  let t = e.substring(1), n = parseInt(t, 16), r = n >> 16 & 255, i = n >> 8 & 255, a = n >> 0 & 255;
840
838
  return .2126 * r + .7152 * i + .0722 * a < 128;
841
839
  };
842
- const Badge = ({ children: e, color: t = "", title: n = null, dot: r = !1, margin: i = null, small: a = !1 }) => {
843
- let o = !(n === null && r === !1);
840
+ const Badge = ({ children: e, color: t = "", textColor: n = "", title: r = null, dot: i = !1, margin: a = null, small: o = !1 }) => {
841
+ let s = !(r === null && i === !1), c = n || (isDark(t) ? "#fff" : "rgba(0, 0, 0, 0.6)");
844
842
  return /* @__PURE__ */ jsxs("div", {
845
843
  className: badge_module_default.wrapper,
846
- children: [o && /* @__PURE__ */ jsx("sup", {
847
- className: cx(badge_module_default.badge, isDark(t) ? badge_module_default.dark : badge_module_default.light, n === null ? badge_module_default.dot : badge_module_default.label, a ? badge_module_default.small : "", e ? badge_module_default.hasChildren : ""),
844
+ children: [s && /* @__PURE__ */ jsx("sup", {
845
+ className: cx(badge_module_default.badge, r === null ? badge_module_default.dot : badge_module_default.label, o ? badge_module_default.small : "", e ? badge_module_default.hasChildren : ""),
848
846
  style: {
849
847
  background: t || void 0,
850
- margin: i || void 0
848
+ margin: a || void 0,
849
+ color: c
851
850
  },
852
- children: n
851
+ children: r
853
852
  }), e]
854
853
  });
855
854
  }, Button$1 = ({ trigger: e, label: t, colored: n, small: r, width: i, disabled: a, groupOrder: o, loading: c, error: l, warning: u, active: d, tabIndex: f }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "5.13.3",
3
+ "version": "5.13.4",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {