@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/global.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13 -14
- package/package.json +1 -1
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: "
|
|
831
|
-
badge: "
|
|
832
|
-
label: "
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
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 = "",
|
|
843
|
-
let
|
|
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: [
|
|
847
|
-
className: cx(badge_module_default.badge,
|
|
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:
|
|
848
|
+
margin: a || void 0,
|
|
849
|
+
color: c
|
|
851
850
|
},
|
|
852
|
-
children:
|
|
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