bj-web-components 0.2.26 → 0.2.28
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/favicon.ico +0 -0
- package/dist/file.svg +1 -0
- package/dist/globe.svg +1 -0
- package/dist/index.d.ts +1141 -0
- package/dist/index.js +51 -0
- package/dist/index.mjs +51 -0
- package/dist/miniapp.d.ts +1 -0
- package/dist/miniapp.js +1 -0
- package/dist/miniapp.mjs +1 -0
- package/dist/mobile.d.ts +1 -0
- package/dist/mobile.js +1 -0
- package/dist/mobile.mjs +1 -0
- package/dist/next.svg +1 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +1 -0
- package/dist/react.mjs +1 -0
- package/dist/shared.d.ts +1 -0
- package/dist/shared.js +1 -0
- package/dist/shared.mjs +1 -0
- package/dist/style.css +3744 -0
- package/dist/vercel.svg +1 -0
- package/dist/web/BasicInput/BInput.js +208 -0
- package/dist/web/BasicInput/BInput.mjs +209 -0
- package/dist/web/BasicInput/utils.js +47 -0
- package/dist/web/BasicInput/utils.mjs +47 -0
- package/dist/web/CategoryDropdown/CategoryDropdown.js +307 -0
- package/dist/web/CategoryDropdown/CategoryDropdown.mjs +308 -0
- package/dist/web/CheckBox/BCheckBox.js +116 -0
- package/dist/web/CheckBox/BCheckBox.mjs +117 -0
- package/dist/web/CheckBox/Group.js +73 -0
- package/dist/web/CheckBox/Group.mjs +74 -0
- package/dist/web/CheckBox/context.js +5 -0
- package/dist/web/CheckBox/context.mjs +5 -0
- package/dist/web/CheckBox/index.js +8 -0
- package/dist/web/CheckBox/index.mjs +8 -0
- package/dist/web/Dropdown/BDropdown.js +186 -0
- package/dist/web/Dropdown/BDropdown.mjs +186 -0
- package/dist/web/EmptyInputBox/EmptyInputBox.js +77 -0
- package/dist/web/EmptyInputBox/EmptyInputBox.mjs +78 -0
- package/dist/web/FileCard/FileCard.js +157 -0
- package/dist/web/FileCard/FileCard.mjs +158 -0
- package/dist/web/Icon/Icon.js +9 -0
- package/dist/web/Icon/Icon.mjs +10 -0
- package/dist/web/Input/Input.js +181 -0
- package/dist/web/Input/Input.mjs +182 -0
- package/dist/web/InputNumber/BInputNumber.js +311 -0
- package/dist/web/InputNumber/BInputNumber.mjs +312 -0
- package/dist/web/InputNumber/StepHandler.js +69 -0
- package/dist/web/InputNumber/StepHandler.mjs +70 -0
- package/dist/web/InputNumber/hooks/useCursor.js +40 -0
- package/dist/web/InputNumber/hooks/useCursor.mjs +41 -0
- package/dist/web/InputNumber/hooks/useFrame.js +12 -0
- package/dist/web/InputNumber/hooks/useFrame.mjs +13 -0
- package/dist/web/InputNumber/utils/decimal.js +147 -0
- package/dist/web/InputNumber/utils/decimal.mjs +147 -0
- package/dist/web/Modal/Modal.js +84 -0
- package/dist/web/Modal/Modal.mjs +85 -0
- package/dist/web/OverlayScrollbar/BOverlayScrollbar.js +232 -0
- package/dist/web/OverlayScrollbar/BOverlayScrollbar.mjs +233 -0
- package/dist/web/Pagination/Pagination.js +328 -0
- package/dist/web/Pagination/Pagination.mjs +329 -0
- package/dist/web/ProductField/ProductField.js +272 -0
- package/dist/web/ProductField/ProductField.mjs +273 -0
- package/dist/web/ProductField/arrow-up.svg.js +3 -0
- package/dist/web/ProductField/arrow-up.svg.mjs +4 -0
- package/dist/web/ProductField/checkbox-no.svg.js +3 -0
- package/dist/web/ProductField/checkbox-no.svg.mjs +4 -0
- package/dist/web/ProductField/checkbox-ok.svg.js +3 -0
- package/dist/web/ProductField/checkbox-ok.svg.mjs +4 -0
- package/dist/web/ProductField/no_data_light.svg.js +3 -0
- package/dist/web/ProductField/no_data_light.svg.mjs +4 -0
- package/dist/web/ProductField/search.svg.js +3 -0
- package/dist/web/ProductField/search.svg.mjs +4 -0
- package/dist/web/ProductField/sort.svg.js +3 -0
- package/dist/web/ProductField/sort.svg.mjs +4 -0
- package/dist/web/SkuInputCard/SkuInputCard.js +276 -0
- package/dist/web/SkuInputCard/SkuInputCard.mjs +277 -0
- package/dist/web/SkuInputCard/spin_loading_red.gif.js +3 -0
- package/dist/web/SkuInputCard/spin_loading_red.gif.mjs +4 -0
- package/dist/web/Switch/Switch.js +70 -0
- package/dist/web/Switch/Switch.mjs +71 -0
- package/dist/web/Table/BTable.js +950 -0
- package/dist/web/Table/BTable.mjs +950 -0
- package/dist/web/Table/Column.js +5 -0
- package/dist/web/Table/Column.mjs +6 -0
- package/dist/web/Table/ColumnGroup.js +5 -0
- package/dist/web/Table/ColumnGroup.mjs +6 -0
- package/dist/web/Table/utils/columns.js +48 -0
- package/dist/web/Table/utils/columns.mjs +48 -0
- package/dist/web/Table/utils/sortFilter.js +84 -0
- package/dist/web/Table/utils/sortFilter.mjs +84 -0
- package/dist/web/Tabs/BTabs.js +150 -0
- package/dist/web/Tabs/BTabs.mjs +150 -0
- package/dist/web/Tabs/TabPane.js +8 -0
- package/dist/web/Tabs/TabPane.mjs +8 -0
- package/dist/web/Tooltip/ConfirmTooltip.js +26 -0
- package/dist/web/Tooltip/ConfirmTooltip.mjs +27 -0
- package/dist/web/Tooltip/ContentTooltip.js +94 -0
- package/dist/web/Tooltip/ContentTooltip.mjs +95 -0
- package/dist/web/Tooltip/ProgressTooltip.js +36 -0
- package/dist/web/Tooltip/ProgressTooltip.mjs +37 -0
- package/dist/web/Tooltip/TooltipWrapper.js +12 -0
- package/dist/web/Tooltip/TooltipWrapper.mjs +13 -0
- package/dist/web/Tooltip/useAutoPlacement.js +41 -0
- package/dist/web/Tooltip/useAutoPlacement.mjs +41 -0
- package/dist/web.d.ts +1141 -0
- package/dist/web.js +51 -0
- package/dist/web.mjs +51 -0
- package/package.json +1 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const react = require("react");
|
|
4
|
+
;/* empty css */
|
|
5
|
+
const useCursor = require("./hooks/useCursor.js");
|
|
6
|
+
const useFrame = require("./hooks/useFrame.js");
|
|
7
|
+
const StepHandler = require("./StepHandler.js");
|
|
8
|
+
const decimal = require("./utils/decimal.js");
|
|
9
|
+
function getDecimalIfValid(value) {
|
|
10
|
+
if (value === void 0 || value === null) return null;
|
|
11
|
+
const decimal$1 = decimal.getDecimal(value);
|
|
12
|
+
return decimal$1.isInvalidate() ? null : decimal$1;
|
|
13
|
+
}
|
|
14
|
+
const BInputNumber = react.forwardRef(function BInputNumber2({
|
|
15
|
+
value,
|
|
16
|
+
defaultValue,
|
|
17
|
+
onChange,
|
|
18
|
+
min,
|
|
19
|
+
max,
|
|
20
|
+
step = 1,
|
|
21
|
+
precision,
|
|
22
|
+
disabled = false,
|
|
23
|
+
readOnly = false,
|
|
24
|
+
placeholder,
|
|
25
|
+
autoFocus,
|
|
26
|
+
size = "middle",
|
|
27
|
+
status,
|
|
28
|
+
bordered = true,
|
|
29
|
+
controls = true,
|
|
30
|
+
keyboard = true,
|
|
31
|
+
changeOnWheel = false,
|
|
32
|
+
changeOnBlur = true,
|
|
33
|
+
addonBefore,
|
|
34
|
+
addonAfter,
|
|
35
|
+
prefix,
|
|
36
|
+
suffix,
|
|
37
|
+
formatter,
|
|
38
|
+
parser,
|
|
39
|
+
decimalSeparator,
|
|
40
|
+
onStep,
|
|
41
|
+
onPressEnter,
|
|
42
|
+
onFocus,
|
|
43
|
+
onBlur,
|
|
44
|
+
id,
|
|
45
|
+
name,
|
|
46
|
+
className,
|
|
47
|
+
style
|
|
48
|
+
}, ref) {
|
|
49
|
+
const inputRef = react.useRef(null);
|
|
50
|
+
const [focused, setFocused] = react.useState(false);
|
|
51
|
+
const userTypingRef = react.useRef(false);
|
|
52
|
+
const compositionRef = react.useRef(false);
|
|
53
|
+
const shiftKeyRef = react.useRef(false);
|
|
54
|
+
const inputValueRef = react.useRef("");
|
|
55
|
+
const [decimalValue, setDecimalValue] = react.useState(() => decimal.getDecimal(value ?? defaultValue));
|
|
56
|
+
const setUncontrolledDecimalValue = (next) => {
|
|
57
|
+
if (value === void 0) setDecimalValue(next);
|
|
58
|
+
};
|
|
59
|
+
const getPrecision = react.useCallback(
|
|
60
|
+
(numStr, userTyping) => {
|
|
61
|
+
if (userTyping) return void 0;
|
|
62
|
+
if (precision !== void 0 && precision >= 0) return precision;
|
|
63
|
+
return Math.max(decimal.getNumberPrecision(numStr), decimal.getNumberPrecision(step));
|
|
64
|
+
},
|
|
65
|
+
[precision, step]
|
|
66
|
+
);
|
|
67
|
+
const mergedParser = react.useCallback(
|
|
68
|
+
(num) => {
|
|
69
|
+
if (parser) return parser(num);
|
|
70
|
+
let parsedStr = num;
|
|
71
|
+
if (decimalSeparator) parsedStr = parsedStr.replace(decimalSeparator, ".");
|
|
72
|
+
return parsedStr.replace(/[^\w.-]+/g, "");
|
|
73
|
+
},
|
|
74
|
+
[parser, decimalSeparator]
|
|
75
|
+
);
|
|
76
|
+
const mergedFormatter = react.useCallback(
|
|
77
|
+
(number, userTyping) => {
|
|
78
|
+
if (formatter) return formatter(number, { userTyping: !!userTyping, input: inputValueRef.current });
|
|
79
|
+
let str = number;
|
|
80
|
+
if (!userTyping) {
|
|
81
|
+
const mergedPrecision = getPrecision(str, userTyping);
|
|
82
|
+
if (decimal.validateNumber(str) && (decimalSeparator || (mergedPrecision ?? -1) >= 0)) {
|
|
83
|
+
str = decimal.toFixed(str, decimalSeparator || ".", mergedPrecision);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return str;
|
|
87
|
+
},
|
|
88
|
+
[formatter, getPrecision, decimalSeparator]
|
|
89
|
+
);
|
|
90
|
+
const [inputValue, setInternalInputValue] = react.useState(() => {
|
|
91
|
+
const initValue = defaultValue ?? value;
|
|
92
|
+
if (decimalValue.isInvalidate() && ["string", "number"].includes(typeof initValue)) {
|
|
93
|
+
return initValue === void 0 || initValue === null || Number.isNaN(initValue) ? "" : String(initValue);
|
|
94
|
+
}
|
|
95
|
+
return mergedFormatter(decimalValue.toString(), false);
|
|
96
|
+
});
|
|
97
|
+
inputValueRef.current = inputValue;
|
|
98
|
+
const setInputValue = (newValue, userTyping) => {
|
|
99
|
+
setInternalInputValue(
|
|
100
|
+
mergedFormatter(newValue.isInvalidate() ? newValue.toString(false) : newValue.toString(!userTyping), userTyping)
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
const maxDecimal = react.useMemo(() => getDecimalIfValid(max), [max]);
|
|
104
|
+
const minDecimal = react.useMemo(() => getDecimalIfValid(min), [min]);
|
|
105
|
+
const upDisabled = react.useMemo(() => {
|
|
106
|
+
if (!maxDecimal || decimalValue.isInvalidate()) return false;
|
|
107
|
+
return maxDecimal.lessEquals(decimalValue);
|
|
108
|
+
}, [maxDecimal, decimalValue]);
|
|
109
|
+
const downDisabled = react.useMemo(() => {
|
|
110
|
+
if (!minDecimal || decimalValue.isInvalidate()) return false;
|
|
111
|
+
return decimalValue.lessEquals(minDecimal);
|
|
112
|
+
}, [minDecimal, decimalValue]);
|
|
113
|
+
const [recordCursor] = useCursor(inputRef.current, focused);
|
|
114
|
+
const getRangeValue = (target) => {
|
|
115
|
+
if (maxDecimal && !target.lessEquals(maxDecimal)) return maxDecimal;
|
|
116
|
+
if (minDecimal && !minDecimal.lessEquals(target)) return minDecimal;
|
|
117
|
+
return null;
|
|
118
|
+
};
|
|
119
|
+
const isInRange = (target) => !getRangeValue(target);
|
|
120
|
+
const triggerValueUpdate = (newValue, userTyping) => {
|
|
121
|
+
let updateValue = newValue;
|
|
122
|
+
let isRangeValidate = isInRange(updateValue) || updateValue.isEmpty();
|
|
123
|
+
if (!updateValue.isEmpty() && !userTyping) {
|
|
124
|
+
updateValue = getRangeValue(updateValue) || updateValue;
|
|
125
|
+
isRangeValidate = true;
|
|
126
|
+
}
|
|
127
|
+
if (!readOnly && !disabled && isRangeValidate) {
|
|
128
|
+
const numStr = updateValue.toString();
|
|
129
|
+
const mergedPrecision = getPrecision(numStr, userTyping);
|
|
130
|
+
if (mergedPrecision !== void 0 && mergedPrecision >= 0) {
|
|
131
|
+
updateValue = decimal.getDecimal(decimal.toFixed(numStr, ".", mergedPrecision));
|
|
132
|
+
if (!isInRange(updateValue)) {
|
|
133
|
+
updateValue = decimal.getDecimal(decimal.toFixed(numStr, ".", mergedPrecision, true));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (!updateValue.equals(decimalValue)) {
|
|
137
|
+
setUncontrolledDecimalValue(updateValue);
|
|
138
|
+
onChange == null ? void 0 : onChange(updateValue.isEmpty() ? null : updateValue.toNumber());
|
|
139
|
+
if (value === void 0) setInputValue(updateValue, userTyping);
|
|
140
|
+
}
|
|
141
|
+
return updateValue;
|
|
142
|
+
}
|
|
143
|
+
return decimalValue;
|
|
144
|
+
};
|
|
145
|
+
const onNextFrame = useFrame();
|
|
146
|
+
const collectInputValue = (inputStr) => {
|
|
147
|
+
recordCursor();
|
|
148
|
+
inputValueRef.current = inputStr;
|
|
149
|
+
setInternalInputValue(inputStr);
|
|
150
|
+
if (!compositionRef.current) {
|
|
151
|
+
const finalValue = mergedParser(inputStr);
|
|
152
|
+
const finalDecimal = decimal.getDecimal(finalValue);
|
|
153
|
+
if (!finalDecimal.isNaN()) triggerValueUpdate(finalDecimal, true);
|
|
154
|
+
}
|
|
155
|
+
onNextFrame(() => {
|
|
156
|
+
const nextInputStr = parser ? inputStr : inputStr.replace(/。/g, ".");
|
|
157
|
+
if (nextInputStr !== inputStr) collectInputValue(nextInputStr);
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
const onCompositionStart = () => {
|
|
161
|
+
compositionRef.current = true;
|
|
162
|
+
};
|
|
163
|
+
const onCompositionEnd = (e) => {
|
|
164
|
+
compositionRef.current = false;
|
|
165
|
+
collectInputValue(e.target.value);
|
|
166
|
+
};
|
|
167
|
+
const onInternalInput = (e) => collectInputValue(e.target.value);
|
|
168
|
+
const onInternalStep = (up) => {
|
|
169
|
+
var _a;
|
|
170
|
+
if (up && upDisabled || !up && downDisabled) return;
|
|
171
|
+
userTypingRef.current = false;
|
|
172
|
+
let stepDecimal = decimal.getDecimal(shiftKeyRef.current ? decimal.getDecupleSteps(step) : step);
|
|
173
|
+
if (!up) stepDecimal = stepDecimal.negate();
|
|
174
|
+
const target = (decimalValue.isInvalidate() ? decimal.getDecimal(0) : decimalValue).add(stepDecimal.toString());
|
|
175
|
+
const updatedValue = triggerValueUpdate(target, false);
|
|
176
|
+
onStep == null ? void 0 : onStep(updatedValue.toNumber(), { offset: shiftKeyRef.current ? decimal.getDecupleSteps(step) : step, type: up ? "up" : "down" });
|
|
177
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
178
|
+
};
|
|
179
|
+
const flushInputValue = (userTyping) => {
|
|
180
|
+
const parsedValue = decimal.getDecimal(mergedParser(inputValue));
|
|
181
|
+
let formatValue;
|
|
182
|
+
if (!parsedValue.isNaN()) {
|
|
183
|
+
formatValue = triggerValueUpdate(parsedValue, userTyping);
|
|
184
|
+
} else {
|
|
185
|
+
formatValue = triggerValueUpdate(decimalValue, userTyping);
|
|
186
|
+
}
|
|
187
|
+
if (value !== void 0) {
|
|
188
|
+
setInputValue(decimalValue, false);
|
|
189
|
+
} else if (!formatValue.isNaN()) {
|
|
190
|
+
setInputValue(formatValue, false);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
const onKeyDown = (event) => {
|
|
194
|
+
const { key, shiftKey } = event;
|
|
195
|
+
userTypingRef.current = true;
|
|
196
|
+
shiftKeyRef.current = shiftKey;
|
|
197
|
+
if (key === "Enter") {
|
|
198
|
+
if (!compositionRef.current) userTypingRef.current = false;
|
|
199
|
+
flushInputValue(false);
|
|
200
|
+
onPressEnter == null ? void 0 : onPressEnter(event);
|
|
201
|
+
}
|
|
202
|
+
if (!keyboard) return;
|
|
203
|
+
if (!compositionRef.current && (key === "ArrowUp" || key === "ArrowDown")) {
|
|
204
|
+
onInternalStep(key === "ArrowUp");
|
|
205
|
+
event.preventDefault();
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const onKeyUp = () => {
|
|
209
|
+
userTypingRef.current = false;
|
|
210
|
+
shiftKeyRef.current = false;
|
|
211
|
+
};
|
|
212
|
+
const onInternalFocus = (e) => {
|
|
213
|
+
setFocused(true);
|
|
214
|
+
onFocus == null ? void 0 : onFocus(e);
|
|
215
|
+
};
|
|
216
|
+
const onInternalBlur = (e) => {
|
|
217
|
+
if (changeOnBlur) flushInputValue(false);
|
|
218
|
+
setFocused(false);
|
|
219
|
+
userTypingRef.current = false;
|
|
220
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
221
|
+
};
|
|
222
|
+
const prevValueRef = react.useRef(value);
|
|
223
|
+
if (prevValueRef.current !== value) {
|
|
224
|
+
prevValueRef.current = value;
|
|
225
|
+
const newValue = decimal.getDecimal(value);
|
|
226
|
+
if (!newValue.equals(decimalValue)) {
|
|
227
|
+
setDecimalValue(newValue);
|
|
228
|
+
const currentParsedValue = decimal.getDecimal(mergedParser(inputValue));
|
|
229
|
+
if (!newValue.equals(currentParsedValue) || !userTypingRef.current || formatter) {
|
|
230
|
+
setInputValue(newValue, userTypingRef.current);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
const setRefs = (node) => {
|
|
235
|
+
inputRef.current = node;
|
|
236
|
+
if (typeof ref === "function") ref(node);
|
|
237
|
+
else if (ref) ref.current = node;
|
|
238
|
+
};
|
|
239
|
+
const controlsEnabled = !!controls;
|
|
240
|
+
const controlsIcon = typeof controls === "object" ? controls.icon : void 0;
|
|
241
|
+
const outOfRange = !decimalValue.isInvalidate() && !isInRange(decimalValue);
|
|
242
|
+
const rootCls = [
|
|
243
|
+
"bj-input-number",
|
|
244
|
+
`bj-input-number--${size}`,
|
|
245
|
+
focused && "bj-input-number--focused",
|
|
246
|
+
disabled && "bj-input-number--disabled",
|
|
247
|
+
readOnly && "bj-input-number--readonly",
|
|
248
|
+
!bordered && "bj-input-number--borderless",
|
|
249
|
+
status && `bj-input-number--${status}`,
|
|
250
|
+
outOfRange && "bj-input-number--out-of-range",
|
|
251
|
+
controlsEnabled && "bj-input-number--with-controls",
|
|
252
|
+
addonBefore && "bj-input-number--group-left",
|
|
253
|
+
addonAfter && "bj-input-number--group-right"
|
|
254
|
+
].filter(Boolean).join(" ");
|
|
255
|
+
const numberBox = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
256
|
+
"div",
|
|
257
|
+
{
|
|
258
|
+
className: [rootCls, !(addonBefore || addonAfter || prefix || suffix) && className].filter(Boolean).join(" "),
|
|
259
|
+
style: !(addonBefore || addonAfter || prefix || suffix) ? style : void 0,
|
|
260
|
+
onKeyDown,
|
|
261
|
+
onKeyUp,
|
|
262
|
+
children: [
|
|
263
|
+
prefix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bj-input-number__prefix", children: prefix }),
|
|
264
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "bj-input-number__input-wrap", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
265
|
+
"input",
|
|
266
|
+
{
|
|
267
|
+
ref: setRefs,
|
|
268
|
+
id,
|
|
269
|
+
name,
|
|
270
|
+
className: "bj-input-number__input",
|
|
271
|
+
autoComplete: "off",
|
|
272
|
+
role: "spinbutton",
|
|
273
|
+
"aria-valuemin": min,
|
|
274
|
+
"aria-valuemax": max,
|
|
275
|
+
"aria-valuenow": decimalValue.isInvalidate() ? void 0 : decimalValue.toNumber(),
|
|
276
|
+
value: inputValue,
|
|
277
|
+
placeholder,
|
|
278
|
+
disabled,
|
|
279
|
+
readOnly,
|
|
280
|
+
autoFocus,
|
|
281
|
+
onChange: onInternalInput,
|
|
282
|
+
onFocus: onInternalFocus,
|
|
283
|
+
onBlur: onInternalBlur,
|
|
284
|
+
onCompositionStart,
|
|
285
|
+
onCompositionEnd,
|
|
286
|
+
onWheel: changeOnWheel ? (e) => {
|
|
287
|
+
if (!focused) return;
|
|
288
|
+
onInternalStep(e.deltaY < 0);
|
|
289
|
+
} : void 0
|
|
290
|
+
}
|
|
291
|
+
) }),
|
|
292
|
+
suffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bj-input-number__suffix", children: suffix }),
|
|
293
|
+
controlsEnabled && /* @__PURE__ */ jsxRuntime.jsx(StepHandler, { icon: controlsIcon, upDisabled, downDisabled, onStep: onInternalStep })
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
if (!addonBefore && !addonAfter) return numberBox;
|
|
298
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
299
|
+
"div",
|
|
300
|
+
{
|
|
301
|
+
className: ["bj-input-number-group", `bj-input-number-group--${size}`, className].filter(Boolean).join(" "),
|
|
302
|
+
style,
|
|
303
|
+
children: [
|
|
304
|
+
addonBefore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bj-input-number-group__addon", children: addonBefore }),
|
|
305
|
+
numberBox,
|
|
306
|
+
addonAfter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bj-input-number-group__addon", children: addonAfter })
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
});
|
|
311
|
+
module.exports = BInputNumber;
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useRef, useState, useCallback, useMemo } from "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import useCursor from "./hooks/useCursor.mjs";
|
|
5
|
+
import useFrame from "./hooks/useFrame.mjs";
|
|
6
|
+
import StepHandler from "./StepHandler.mjs";
|
|
7
|
+
import { getDecimal, getNumberPrecision, validateNumber, toFixed, getDecupleSteps } from "./utils/decimal.mjs";
|
|
8
|
+
function getDecimalIfValid(value) {
|
|
9
|
+
if (value === void 0 || value === null) return null;
|
|
10
|
+
const decimal = getDecimal(value);
|
|
11
|
+
return decimal.isInvalidate() ? null : decimal;
|
|
12
|
+
}
|
|
13
|
+
const BInputNumber = forwardRef(function BInputNumber2({
|
|
14
|
+
value,
|
|
15
|
+
defaultValue,
|
|
16
|
+
onChange,
|
|
17
|
+
min,
|
|
18
|
+
max,
|
|
19
|
+
step = 1,
|
|
20
|
+
precision,
|
|
21
|
+
disabled = false,
|
|
22
|
+
readOnly = false,
|
|
23
|
+
placeholder,
|
|
24
|
+
autoFocus,
|
|
25
|
+
size = "middle",
|
|
26
|
+
status,
|
|
27
|
+
bordered = true,
|
|
28
|
+
controls = true,
|
|
29
|
+
keyboard = true,
|
|
30
|
+
changeOnWheel = false,
|
|
31
|
+
changeOnBlur = true,
|
|
32
|
+
addonBefore,
|
|
33
|
+
addonAfter,
|
|
34
|
+
prefix,
|
|
35
|
+
suffix,
|
|
36
|
+
formatter,
|
|
37
|
+
parser,
|
|
38
|
+
decimalSeparator,
|
|
39
|
+
onStep,
|
|
40
|
+
onPressEnter,
|
|
41
|
+
onFocus,
|
|
42
|
+
onBlur,
|
|
43
|
+
id,
|
|
44
|
+
name,
|
|
45
|
+
className,
|
|
46
|
+
style
|
|
47
|
+
}, ref) {
|
|
48
|
+
const inputRef = useRef(null);
|
|
49
|
+
const [focused, setFocused] = useState(false);
|
|
50
|
+
const userTypingRef = useRef(false);
|
|
51
|
+
const compositionRef = useRef(false);
|
|
52
|
+
const shiftKeyRef = useRef(false);
|
|
53
|
+
const inputValueRef = useRef("");
|
|
54
|
+
const [decimalValue, setDecimalValue] = useState(() => getDecimal(value ?? defaultValue));
|
|
55
|
+
const setUncontrolledDecimalValue = (next) => {
|
|
56
|
+
if (value === void 0) setDecimalValue(next);
|
|
57
|
+
};
|
|
58
|
+
const getPrecision = useCallback(
|
|
59
|
+
(numStr, userTyping) => {
|
|
60
|
+
if (userTyping) return void 0;
|
|
61
|
+
if (precision !== void 0 && precision >= 0) return precision;
|
|
62
|
+
return Math.max(getNumberPrecision(numStr), getNumberPrecision(step));
|
|
63
|
+
},
|
|
64
|
+
[precision, step]
|
|
65
|
+
);
|
|
66
|
+
const mergedParser = useCallback(
|
|
67
|
+
(num) => {
|
|
68
|
+
if (parser) return parser(num);
|
|
69
|
+
let parsedStr = num;
|
|
70
|
+
if (decimalSeparator) parsedStr = parsedStr.replace(decimalSeparator, ".");
|
|
71
|
+
return parsedStr.replace(/[^\w.-]+/g, "");
|
|
72
|
+
},
|
|
73
|
+
[parser, decimalSeparator]
|
|
74
|
+
);
|
|
75
|
+
const mergedFormatter = useCallback(
|
|
76
|
+
(number, userTyping) => {
|
|
77
|
+
if (formatter) return formatter(number, { userTyping: !!userTyping, input: inputValueRef.current });
|
|
78
|
+
let str = number;
|
|
79
|
+
if (!userTyping) {
|
|
80
|
+
const mergedPrecision = getPrecision(str, userTyping);
|
|
81
|
+
if (validateNumber(str) && (decimalSeparator || (mergedPrecision ?? -1) >= 0)) {
|
|
82
|
+
str = toFixed(str, decimalSeparator || ".", mergedPrecision);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return str;
|
|
86
|
+
},
|
|
87
|
+
[formatter, getPrecision, decimalSeparator]
|
|
88
|
+
);
|
|
89
|
+
const [inputValue, setInternalInputValue] = useState(() => {
|
|
90
|
+
const initValue = defaultValue ?? value;
|
|
91
|
+
if (decimalValue.isInvalidate() && ["string", "number"].includes(typeof initValue)) {
|
|
92
|
+
return initValue === void 0 || initValue === null || Number.isNaN(initValue) ? "" : String(initValue);
|
|
93
|
+
}
|
|
94
|
+
return mergedFormatter(decimalValue.toString(), false);
|
|
95
|
+
});
|
|
96
|
+
inputValueRef.current = inputValue;
|
|
97
|
+
const setInputValue = (newValue, userTyping) => {
|
|
98
|
+
setInternalInputValue(
|
|
99
|
+
mergedFormatter(newValue.isInvalidate() ? newValue.toString(false) : newValue.toString(!userTyping), userTyping)
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
const maxDecimal = useMemo(() => getDecimalIfValid(max), [max]);
|
|
103
|
+
const minDecimal = useMemo(() => getDecimalIfValid(min), [min]);
|
|
104
|
+
const upDisabled = useMemo(() => {
|
|
105
|
+
if (!maxDecimal || decimalValue.isInvalidate()) return false;
|
|
106
|
+
return maxDecimal.lessEquals(decimalValue);
|
|
107
|
+
}, [maxDecimal, decimalValue]);
|
|
108
|
+
const downDisabled = useMemo(() => {
|
|
109
|
+
if (!minDecimal || decimalValue.isInvalidate()) return false;
|
|
110
|
+
return decimalValue.lessEquals(minDecimal);
|
|
111
|
+
}, [minDecimal, decimalValue]);
|
|
112
|
+
const [recordCursor] = useCursor(inputRef.current, focused);
|
|
113
|
+
const getRangeValue = (target) => {
|
|
114
|
+
if (maxDecimal && !target.lessEquals(maxDecimal)) return maxDecimal;
|
|
115
|
+
if (minDecimal && !minDecimal.lessEquals(target)) return minDecimal;
|
|
116
|
+
return null;
|
|
117
|
+
};
|
|
118
|
+
const isInRange = (target) => !getRangeValue(target);
|
|
119
|
+
const triggerValueUpdate = (newValue, userTyping) => {
|
|
120
|
+
let updateValue = newValue;
|
|
121
|
+
let isRangeValidate = isInRange(updateValue) || updateValue.isEmpty();
|
|
122
|
+
if (!updateValue.isEmpty() && !userTyping) {
|
|
123
|
+
updateValue = getRangeValue(updateValue) || updateValue;
|
|
124
|
+
isRangeValidate = true;
|
|
125
|
+
}
|
|
126
|
+
if (!readOnly && !disabled && isRangeValidate) {
|
|
127
|
+
const numStr = updateValue.toString();
|
|
128
|
+
const mergedPrecision = getPrecision(numStr, userTyping);
|
|
129
|
+
if (mergedPrecision !== void 0 && mergedPrecision >= 0) {
|
|
130
|
+
updateValue = getDecimal(toFixed(numStr, ".", mergedPrecision));
|
|
131
|
+
if (!isInRange(updateValue)) {
|
|
132
|
+
updateValue = getDecimal(toFixed(numStr, ".", mergedPrecision, true));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (!updateValue.equals(decimalValue)) {
|
|
136
|
+
setUncontrolledDecimalValue(updateValue);
|
|
137
|
+
onChange == null ? void 0 : onChange(updateValue.isEmpty() ? null : updateValue.toNumber());
|
|
138
|
+
if (value === void 0) setInputValue(updateValue, userTyping);
|
|
139
|
+
}
|
|
140
|
+
return updateValue;
|
|
141
|
+
}
|
|
142
|
+
return decimalValue;
|
|
143
|
+
};
|
|
144
|
+
const onNextFrame = useFrame();
|
|
145
|
+
const collectInputValue = (inputStr) => {
|
|
146
|
+
recordCursor();
|
|
147
|
+
inputValueRef.current = inputStr;
|
|
148
|
+
setInternalInputValue(inputStr);
|
|
149
|
+
if (!compositionRef.current) {
|
|
150
|
+
const finalValue = mergedParser(inputStr);
|
|
151
|
+
const finalDecimal = getDecimal(finalValue);
|
|
152
|
+
if (!finalDecimal.isNaN()) triggerValueUpdate(finalDecimal, true);
|
|
153
|
+
}
|
|
154
|
+
onNextFrame(() => {
|
|
155
|
+
const nextInputStr = parser ? inputStr : inputStr.replace(/。/g, ".");
|
|
156
|
+
if (nextInputStr !== inputStr) collectInputValue(nextInputStr);
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
const onCompositionStart = () => {
|
|
160
|
+
compositionRef.current = true;
|
|
161
|
+
};
|
|
162
|
+
const onCompositionEnd = (e) => {
|
|
163
|
+
compositionRef.current = false;
|
|
164
|
+
collectInputValue(e.target.value);
|
|
165
|
+
};
|
|
166
|
+
const onInternalInput = (e) => collectInputValue(e.target.value);
|
|
167
|
+
const onInternalStep = (up) => {
|
|
168
|
+
var _a;
|
|
169
|
+
if (up && upDisabled || !up && downDisabled) return;
|
|
170
|
+
userTypingRef.current = false;
|
|
171
|
+
let stepDecimal = getDecimal(shiftKeyRef.current ? getDecupleSteps(step) : step);
|
|
172
|
+
if (!up) stepDecimal = stepDecimal.negate();
|
|
173
|
+
const target = (decimalValue.isInvalidate() ? getDecimal(0) : decimalValue).add(stepDecimal.toString());
|
|
174
|
+
const updatedValue = triggerValueUpdate(target, false);
|
|
175
|
+
onStep == null ? void 0 : onStep(updatedValue.toNumber(), { offset: shiftKeyRef.current ? getDecupleSteps(step) : step, type: up ? "up" : "down" });
|
|
176
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
177
|
+
};
|
|
178
|
+
const flushInputValue = (userTyping) => {
|
|
179
|
+
const parsedValue = getDecimal(mergedParser(inputValue));
|
|
180
|
+
let formatValue;
|
|
181
|
+
if (!parsedValue.isNaN()) {
|
|
182
|
+
formatValue = triggerValueUpdate(parsedValue, userTyping);
|
|
183
|
+
} else {
|
|
184
|
+
formatValue = triggerValueUpdate(decimalValue, userTyping);
|
|
185
|
+
}
|
|
186
|
+
if (value !== void 0) {
|
|
187
|
+
setInputValue(decimalValue, false);
|
|
188
|
+
} else if (!formatValue.isNaN()) {
|
|
189
|
+
setInputValue(formatValue, false);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
const onKeyDown = (event) => {
|
|
193
|
+
const { key, shiftKey } = event;
|
|
194
|
+
userTypingRef.current = true;
|
|
195
|
+
shiftKeyRef.current = shiftKey;
|
|
196
|
+
if (key === "Enter") {
|
|
197
|
+
if (!compositionRef.current) userTypingRef.current = false;
|
|
198
|
+
flushInputValue(false);
|
|
199
|
+
onPressEnter == null ? void 0 : onPressEnter(event);
|
|
200
|
+
}
|
|
201
|
+
if (!keyboard) return;
|
|
202
|
+
if (!compositionRef.current && (key === "ArrowUp" || key === "ArrowDown")) {
|
|
203
|
+
onInternalStep(key === "ArrowUp");
|
|
204
|
+
event.preventDefault();
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const onKeyUp = () => {
|
|
208
|
+
userTypingRef.current = false;
|
|
209
|
+
shiftKeyRef.current = false;
|
|
210
|
+
};
|
|
211
|
+
const onInternalFocus = (e) => {
|
|
212
|
+
setFocused(true);
|
|
213
|
+
onFocus == null ? void 0 : onFocus(e);
|
|
214
|
+
};
|
|
215
|
+
const onInternalBlur = (e) => {
|
|
216
|
+
if (changeOnBlur) flushInputValue(false);
|
|
217
|
+
setFocused(false);
|
|
218
|
+
userTypingRef.current = false;
|
|
219
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
220
|
+
};
|
|
221
|
+
const prevValueRef = useRef(value);
|
|
222
|
+
if (prevValueRef.current !== value) {
|
|
223
|
+
prevValueRef.current = value;
|
|
224
|
+
const newValue = getDecimal(value);
|
|
225
|
+
if (!newValue.equals(decimalValue)) {
|
|
226
|
+
setDecimalValue(newValue);
|
|
227
|
+
const currentParsedValue = getDecimal(mergedParser(inputValue));
|
|
228
|
+
if (!newValue.equals(currentParsedValue) || !userTypingRef.current || formatter) {
|
|
229
|
+
setInputValue(newValue, userTypingRef.current);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const setRefs = (node) => {
|
|
234
|
+
inputRef.current = node;
|
|
235
|
+
if (typeof ref === "function") ref(node);
|
|
236
|
+
else if (ref) ref.current = node;
|
|
237
|
+
};
|
|
238
|
+
const controlsEnabled = !!controls;
|
|
239
|
+
const controlsIcon = typeof controls === "object" ? controls.icon : void 0;
|
|
240
|
+
const outOfRange = !decimalValue.isInvalidate() && !isInRange(decimalValue);
|
|
241
|
+
const rootCls = [
|
|
242
|
+
"bj-input-number",
|
|
243
|
+
`bj-input-number--${size}`,
|
|
244
|
+
focused && "bj-input-number--focused",
|
|
245
|
+
disabled && "bj-input-number--disabled",
|
|
246
|
+
readOnly && "bj-input-number--readonly",
|
|
247
|
+
!bordered && "bj-input-number--borderless",
|
|
248
|
+
status && `bj-input-number--${status}`,
|
|
249
|
+
outOfRange && "bj-input-number--out-of-range",
|
|
250
|
+
controlsEnabled && "bj-input-number--with-controls",
|
|
251
|
+
addonBefore && "bj-input-number--group-left",
|
|
252
|
+
addonAfter && "bj-input-number--group-right"
|
|
253
|
+
].filter(Boolean).join(" ");
|
|
254
|
+
const numberBox = /* @__PURE__ */ jsxs(
|
|
255
|
+
"div",
|
|
256
|
+
{
|
|
257
|
+
className: [rootCls, !(addonBefore || addonAfter || prefix || suffix) && className].filter(Boolean).join(" "),
|
|
258
|
+
style: !(addonBefore || addonAfter || prefix || suffix) ? style : void 0,
|
|
259
|
+
onKeyDown,
|
|
260
|
+
onKeyUp,
|
|
261
|
+
children: [
|
|
262
|
+
prefix && /* @__PURE__ */ jsx("span", { className: "bj-input-number__prefix", children: prefix }),
|
|
263
|
+
/* @__PURE__ */ jsx("div", { className: "bj-input-number__input-wrap", children: /* @__PURE__ */ jsx(
|
|
264
|
+
"input",
|
|
265
|
+
{
|
|
266
|
+
ref: setRefs,
|
|
267
|
+
id,
|
|
268
|
+
name,
|
|
269
|
+
className: "bj-input-number__input",
|
|
270
|
+
autoComplete: "off",
|
|
271
|
+
role: "spinbutton",
|
|
272
|
+
"aria-valuemin": min,
|
|
273
|
+
"aria-valuemax": max,
|
|
274
|
+
"aria-valuenow": decimalValue.isInvalidate() ? void 0 : decimalValue.toNumber(),
|
|
275
|
+
value: inputValue,
|
|
276
|
+
placeholder,
|
|
277
|
+
disabled,
|
|
278
|
+
readOnly,
|
|
279
|
+
autoFocus,
|
|
280
|
+
onChange: onInternalInput,
|
|
281
|
+
onFocus: onInternalFocus,
|
|
282
|
+
onBlur: onInternalBlur,
|
|
283
|
+
onCompositionStart,
|
|
284
|
+
onCompositionEnd,
|
|
285
|
+
onWheel: changeOnWheel ? (e) => {
|
|
286
|
+
if (!focused) return;
|
|
287
|
+
onInternalStep(e.deltaY < 0);
|
|
288
|
+
} : void 0
|
|
289
|
+
}
|
|
290
|
+
) }),
|
|
291
|
+
suffix && /* @__PURE__ */ jsx("span", { className: "bj-input-number__suffix", children: suffix }),
|
|
292
|
+
controlsEnabled && /* @__PURE__ */ jsx(StepHandler, { icon: controlsIcon, upDisabled, downDisabled, onStep: onInternalStep })
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
if (!addonBefore && !addonAfter) return numberBox;
|
|
297
|
+
return /* @__PURE__ */ jsxs(
|
|
298
|
+
"div",
|
|
299
|
+
{
|
|
300
|
+
className: ["bj-input-number-group", `bj-input-number-group--${size}`, className].filter(Boolean).join(" "),
|
|
301
|
+
style,
|
|
302
|
+
children: [
|
|
303
|
+
addonBefore && /* @__PURE__ */ jsx("div", { className: "bj-input-number-group__addon", children: addonBefore }),
|
|
304
|
+
numberBox,
|
|
305
|
+
addonAfter && /* @__PURE__ */ jsx("div", { className: "bj-input-number-group__addon", children: addonAfter })
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
});
|
|
310
|
+
export {
|
|
311
|
+
BInputNumber as default
|
|
312
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const react = require("react");
|
|
4
|
+
const STEP_DELAY = 600;
|
|
5
|
+
const STEP_INTERVAL = 200;
|
|
6
|
+
function SpinnerIcon({ className }) {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8
|
+
"path",
|
|
9
|
+
{
|
|
10
|
+
d: "M15.4573 13.6501C15.9047 13.6504 16.129 14.192 15.8128 14.5085L12.3352 17.9851C12.139 18.1811 11.8214 18.1811 11.6253 17.9851L8.14772 14.5085C7.83144 14.192 8.0558 13.6504 8.50319 13.6501H15.4573ZM11.6643 5.98311C11.8606 5.78688 12.179 5.78688 12.3753 5.98311L15.8518 9.45967C16.1683 9.77623 15.944 10.3171 15.4964 10.3171H8.54323C8.09567 10.3171 7.87154 9.77625 8.18776 9.45967L11.6643 5.98311Z",
|
|
11
|
+
fill: "currentColor"
|
|
12
|
+
}
|
|
13
|
+
) });
|
|
14
|
+
}
|
|
15
|
+
function StepHandler({ icon, upDisabled, downDisabled, onStep }) {
|
|
16
|
+
const stepTimeoutRef = react.useRef(void 0);
|
|
17
|
+
const onStepRef = react.useRef(onStep);
|
|
18
|
+
onStepRef.current = onStep;
|
|
19
|
+
const onStopStep = () => clearTimeout(stepTimeoutRef.current);
|
|
20
|
+
const onStepMouseDown = (e, up) => {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
onStopStep();
|
|
23
|
+
onStepRef.current(up);
|
|
24
|
+
function loopStep() {
|
|
25
|
+
onStepRef.current(up);
|
|
26
|
+
stepTimeoutRef.current = setTimeout(loopStep, STEP_INTERVAL);
|
|
27
|
+
}
|
|
28
|
+
stepTimeoutRef.current = setTimeout(loopStep, STEP_DELAY);
|
|
29
|
+
};
|
|
30
|
+
react.useEffect(() => onStopStep, []);
|
|
31
|
+
const sharedProps = {
|
|
32
|
+
unselectable: "on",
|
|
33
|
+
role: "button",
|
|
34
|
+
onMouseUp: onStopStep,
|
|
35
|
+
onMouseLeave: onStopStep
|
|
36
|
+
};
|
|
37
|
+
return (
|
|
38
|
+
// Click zones come before the icon(s) in DOM order so the icon halves
|
|
39
|
+
// can be dimmed via a `:hover ~`/`:active ~` sibling selector in CSS —
|
|
40
|
+
// the icon itself stays `pointer-events: none` and purely visual.
|
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bj-input-number__handler-wrap", children: [
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
+
"span",
|
|
44
|
+
{
|
|
45
|
+
...sharedProps,
|
|
46
|
+
"aria-label": "Increase Value",
|
|
47
|
+
"aria-disabled": upDisabled,
|
|
48
|
+
className: upDisabled ? "bj-input-number__handler bj-input-number__handler--up bj-input-number__handler--disabled" : "bj-input-number__handler bj-input-number__handler--up",
|
|
49
|
+
onMouseDown: (e) => onStepMouseDown(e, true)
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
53
|
+
"span",
|
|
54
|
+
{
|
|
55
|
+
...sharedProps,
|
|
56
|
+
"aria-label": "Decrease Value",
|
|
57
|
+
"aria-disabled": downDisabled,
|
|
58
|
+
className: downDisabled ? "bj-input-number__handler bj-input-number__handler--down bj-input-number__handler--disabled" : "bj-input-number__handler bj-input-number__handler--down",
|
|
59
|
+
onMouseDown: (e) => onStepMouseDown(e, false)
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
icon || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsx(SpinnerIcon, { className: "bj-input-number__handler-icon bj-input-number__handler-icon--up" }),
|
|
64
|
+
/* @__PURE__ */ jsxRuntime.jsx(SpinnerIcon, { className: "bj-input-number__handler-icon bj-input-number__handler-icon--down" })
|
|
65
|
+
] })
|
|
66
|
+
] })
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
module.exports = StepHandler;
|