@lobehub/ui 1.141.0 → 1.141.2
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/es/TokenTag/index.js +5 -1
- package/es/TokenTag/style.js +1 -1
- package/package.json +3 -1
package/es/TokenTag/index.js
CHANGED
|
@@ -4,12 +4,16 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["className", "displayMode", "maxValue", "value", "text", "shape", "unoptimized"];
|
|
6
6
|
import { useResponsive } from 'antd-style';
|
|
7
|
+
import numeral from 'numeral';
|
|
7
8
|
import { forwardRef } from 'react';
|
|
8
9
|
import { Flexbox } from 'react-layout-kit';
|
|
9
10
|
import FluentEmoji from "../FluentEmoji";
|
|
10
11
|
import { ICON_SIZE, useStyles } from "./style";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
var format = function format(number) {
|
|
15
|
+
return numeral(number).format('0,0');
|
|
16
|
+
};
|
|
13
17
|
var TokenTag = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
18
|
var className = _ref.className,
|
|
15
19
|
_ref$displayMode = _ref.displayMode,
|
|
@@ -55,7 +59,7 @@ var TokenTag = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
55
59
|
emoji: emoji,
|
|
56
60
|
size: ICON_SIZE,
|
|
57
61
|
unoptimized: unoptimized
|
|
58
|
-
}), valueLeft > 0 ? [mobile ? '' : displayMode === 'remained' ? (text === null || text === void 0 ? void 0 : text.remained) || 'Remained' : (text === null || text === void 0 ? void 0 : text.used) || 'Used', displayMode === 'remained' ? valueLeft : value].join(' ') : (text === null || text === void 0 ? void 0 : text.overload) || 'Overload']
|
|
62
|
+
}), valueLeft > 0 ? [mobile ? '' : displayMode === 'remained' ? (text === null || text === void 0 ? void 0 : text.remained) || 'Remained' : (text === null || text === void 0 ? void 0 : text.used) || 'Used', displayMode === 'remained' ? format(valueLeft) : format(value)].join(' ') : (text === null || text === void 0 ? void 0 : text.overload) || 'Overload']
|
|
59
63
|
}));
|
|
60
64
|
});
|
|
61
65
|
export default TokenTag;
|
package/es/TokenTag/style.js
CHANGED
|
@@ -31,6 +31,6 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
31
31
|
var roundStylish = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-block: 0;\n padding-inline: ", "px ", "px;\n background: ", ";\n border-radius: ", "px;\n "])), (HEIGHT - ICON_SIZE) / 2, (HEIGHT - ICON_SIZE) * 1.2, isDarkMode ? token.colorFillSecondary : token.colorFillTertiary, HEIGHT / 2);
|
|
32
32
|
var squareStylish = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n "])), token.borderRadiusSM);
|
|
33
33
|
return {
|
|
34
|
-
container: cx(percentStyle, shape === 'round' ? roundStylish : squareStylish, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n user-select: none;\n\n overflow: hidden;\n\n min-width: fit-content;\n height: ", "px;\n\n font-
|
|
34
|
+
container: cx(percentStyle, shape === 'round' ? roundStylish : squareStylish, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n user-select: none;\n\n overflow: hidden;\n\n min-width: fit-content;\n height: ", "px;\n\n font-size: 13px;\n line-height: 1;\n "])), HEIGHT))
|
|
35
35
|
};
|
|
36
36
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.141.
|
|
3
|
+
"version": "1.141.2",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"leva": "^0.9.35",
|
|
99
99
|
"lodash-es": "^4.17.21",
|
|
100
100
|
"lucide-react": "latest",
|
|
101
|
+
"numeral": "^2.0.6",
|
|
101
102
|
"polished": "^4.3.1",
|
|
102
103
|
"prism-react-renderer": "^2.3.1",
|
|
103
104
|
"query-string": "^9.0.0",
|
|
@@ -130,6 +131,7 @@
|
|
|
130
131
|
"@types/chroma-js": "^2.4.4",
|
|
131
132
|
"@types/lodash-es": "^4.17.12",
|
|
132
133
|
"@types/mdx": "^2.0.13",
|
|
134
|
+
"@types/numeral": "^2.0.5",
|
|
133
135
|
"@types/pangu": "^4.0.2",
|
|
134
136
|
"@types/query-string": "^6.3.0",
|
|
135
137
|
"@types/react": "18.2.40",
|