namirasoft-site-react 1.4.437 → 1.4.438
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.
|
@@ -5,6 +5,7 @@ export interface NSGaugeNumberProps extends IBaseComponentProps {
|
|
|
5
5
|
total: number;
|
|
6
6
|
current: number;
|
|
7
7
|
colors: NSGaugeColorProps;
|
|
8
|
+
description?: string;
|
|
8
9
|
formatter?: (value: number) => string;
|
|
9
10
|
}
|
|
10
11
|
export declare function NSGaugeNumber(props: NSGaugeNumberProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,8 +3,8 @@ import { NSPanel } from "../main";
|
|
|
3
3
|
import { NSGauge } from "./NSGauge";
|
|
4
4
|
import Styles from "./NSGaugeNumber.module.css";
|
|
5
5
|
export function NSGaugeNumber(props) {
|
|
6
|
-
var _a;
|
|
6
|
+
var _a, _b;
|
|
7
7
|
let formatter = (_a = props === null || props === void 0 ? void 0 : props.formatter) !== null && _a !== void 0 ? _a : (value => value + "");
|
|
8
|
-
return (_jsxs(NSPanel, { style: { margin: 0, padding: 0, width: "20rem" }, children: [_jsx("div", { className: Styles.ns_gauge_header, children: _jsx("span", { className: Styles.title, children: props.title }) }), _jsxs("div", { className: Styles.ns_gauge_body, children: [_jsx(NSGauge, { total: props.total, current: props.current, showPercent: true, colors: props.colors }), _jsxs("div", { className: Styles.ns_title_wrapper, children: [_jsx("span", { className: Styles.title, children: formatter(props.current) }), _jsx("span", { className: Styles.subtitle, children: `Out of ${formatter(props.total)}` })] })] })] }));
|
|
8
|
+
return (_jsxs(NSPanel, { style: { margin: 0, padding: 0, width: "20rem" }, children: [_jsx("div", { className: Styles.ns_gauge_header, children: _jsx("span", { className: Styles.title, children: props.title }) }), _jsxs("div", { className: Styles.ns_gauge_body, children: [_jsx(NSGauge, { total: props.total, current: props.current, showPercent: true, colors: props.colors }), _jsxs("div", { className: Styles.ns_title_wrapper, children: [_jsx("span", { className: Styles.title, children: formatter(props.current) }), _jsx("span", { className: Styles.subtitle, children: (`Out of ${formatter(props.total)} ` + ((_b = props.description) !== null && _b !== void 0 ? _b : "")).trim() })] })] })] }));
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=NSGaugeNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSGaugeNumber.js","sourceRoot":"","sources":["../../src/components/NSGaugeNumber.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,OAAO,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,EAAqB,MAAM,WAAW,CAAC;AACvD,OAAO,MAAM,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"NSGaugeNumber.js","sourceRoot":"","sources":["../../src/components/NSGaugeNumber.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,OAAO,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,EAAqB,MAAM,WAAW,CAAC;AACvD,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAYhD,MAAM,UAAU,aAAa,CAAC,KAAyB;;IAEnD,IAAI,SAAS,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,mCAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;IAC1D,OAAO,CACH,MAAC,OAAO,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,aACrD,cAAK,SAAS,EAAE,MAAM,CAAC,eAAe,YAClC,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,KAAK,CAAC,KAAK,GAAQ,GACjD,EACN,eAAK,SAAS,EAAE,MAAM,CAAC,aAAa,aAChC,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,WAAW,QAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAI,EACzF,eAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,aACnC,eAAM,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,GAAQ,EAChE,eAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,YAAG,CAAC,UAAU,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,MAAA,KAAK,CAAC,WAAW,mCAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,GAAQ,IACjH,IACJ,IACA,CACb,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ export interface NSGaugeNumberProps extends IBaseComponentProps
|
|
|
8
8
|
total: number;
|
|
9
9
|
current: number;
|
|
10
10
|
colors: NSGaugeColorProps;
|
|
11
|
+
description?: string;
|
|
11
12
|
formatter?: (value: number) => string;
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -23,7 +24,7 @@ export function NSGaugeNumber(props: NSGaugeNumberProps)
|
|
|
23
24
|
<NSGauge total={props.total} current={props.current} showPercent colors={props.colors} />
|
|
24
25
|
<div className={Styles.ns_title_wrapper}>
|
|
25
26
|
<span className={Styles.title}>{formatter(props.current)}</span>
|
|
26
|
-
<span className={Styles.subtitle}>{`Out of ${formatter(props.total)}`}</span>
|
|
27
|
+
<span className={Styles.subtitle}>{(`Out of ${formatter(props.total)} ` + (props.description ?? "")).trim()}</span>
|
|
27
28
|
</div>
|
|
28
29
|
</div>
|
|
29
30
|
</NSPanel>
|