@mw-kit/mw-ui 1.8.11 → 1.8.13
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.
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
$percent: number;
|
|
3
|
-
}
|
|
4
|
-
declare const SelectedArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SelectedAreaProps>> & string;
|
|
1
|
+
declare const SelectedArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
2
|
export default SelectedArea;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { InputProps } from '../Input/interfaces';
|
|
2
|
-
export interface TimeProps extends Omit<InputProps, 'type' | 'mask'> {
|
|
2
|
+
export interface TimeProps extends Omit<InputProps, 'type' | 'mask' | 'min' | 'max'> {
|
|
3
3
|
type: 'time';
|
|
4
4
|
seconds?: boolean;
|
|
5
5
|
value: string;
|
|
6
|
+
min?: string;
|
|
7
|
+
max?: string;
|
|
6
8
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -925,10 +925,12 @@ interface ButtonProps extends Omit<Partial<CommonProps>, 'loading'> {
|
|
|
925
925
|
|
|
926
926
|
declare const Button: (props: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
927
927
|
|
|
928
|
-
interface TimeProps extends Omit<InputProps$1, 'type' | 'mask'> {
|
|
928
|
+
interface TimeProps extends Omit<InputProps$1, 'type' | 'mask' | 'min' | 'max'> {
|
|
929
929
|
type: 'time';
|
|
930
930
|
seconds?: boolean;
|
|
931
931
|
value: string;
|
|
932
|
+
min?: string;
|
|
933
|
+
max?: string;
|
|
932
934
|
}
|
|
933
935
|
|
|
934
936
|
type Types = 'default' | 'info' | 'danger' | 'success' | 'warning' | 'temporary';
|
package/dist/index.js
CHANGED
|
@@ -212,12 +212,23 @@ var keys = (value) => {
|
|
|
212
212
|
var notEmptyString = (value) => {
|
|
213
213
|
return typeof value === "string" && value.trim() !== "";
|
|
214
214
|
};
|
|
215
|
+
var isNumber = (value) => {
|
|
216
|
+
return typeof value === "number" && isFinite(value);
|
|
217
|
+
};
|
|
215
218
|
var isString = (value) => {
|
|
216
219
|
return typeof value === "string";
|
|
217
220
|
};
|
|
221
|
+
var isNumeric = (value) => {
|
|
222
|
+
if (isNumber(value)) return true;
|
|
223
|
+
if (!isString(value)) return false;
|
|
224
|
+
return !isNaN(parseFloat(value));
|
|
225
|
+
};
|
|
218
226
|
var isBoolean = (value) => {
|
|
219
227
|
return typeof value === "boolean";
|
|
220
228
|
};
|
|
229
|
+
var isNumericString = (value) => {
|
|
230
|
+
return notEmptyString(value) && isNumeric(value);
|
|
231
|
+
};
|
|
221
232
|
var isDateInstance = (value) => {
|
|
222
233
|
return value instanceof Date && !isNaN(value.valueOf());
|
|
223
234
|
};
|
|
@@ -310,6 +321,11 @@ var filterObject = (object, remove, inital = {}) => {
|
|
|
310
321
|
);
|
|
311
322
|
return r;
|
|
312
323
|
};
|
|
324
|
+
var numberOrDefault = (value, defaultValue2) => {
|
|
325
|
+
if (isNumber(value)) return value;
|
|
326
|
+
if (isNumericString(value)) return parseFloat(value);
|
|
327
|
+
return defaultValue2;
|
|
328
|
+
};
|
|
313
329
|
var isoStringToDate = (value) => {
|
|
314
330
|
const [d, t = "00:00:00"] = value.split(" ");
|
|
315
331
|
const date = /* @__PURE__ */ new Date(
|
|
@@ -10060,6 +10076,15 @@ var mask = (v, seconds) => {
|
|
|
10060
10076
|
else if (v.length < 5) return v.substring(0, 2) + ":" + v.substring(2);
|
|
10061
10077
|
else return v.substring(0, 2) + ":" + v.substring(2, 4) + ":" + v.substring(4);
|
|
10062
10078
|
};
|
|
10079
|
+
var getDate = (value) => {
|
|
10080
|
+
const v = value.replace(/[^0-9\s]/g, "");
|
|
10081
|
+
const h = numberOrDefault(v.substring(0, 2), 0);
|
|
10082
|
+
const m = numberOrDefault(v.substring(2, 4), 0);
|
|
10083
|
+
const s = numberOrDefault(v.substring(4, 6), 0);
|
|
10084
|
+
const date = /* @__PURE__ */ new Date();
|
|
10085
|
+
date.setHours(h, m, s, 0);
|
|
10086
|
+
return date;
|
|
10087
|
+
};
|
|
10063
10088
|
var Time = import_react15.default.forwardRef(
|
|
10064
10089
|
(props, ref) => {
|
|
10065
10090
|
const { value, seconds } = props;
|
|
@@ -10075,65 +10100,70 @@ var Time = import_react15.default.forwardRef(
|
|
|
10075
10100
|
const curS = todayDate.getSeconds();
|
|
10076
10101
|
const value2 = target.value.replace(/[^0-9\s]/g, "");
|
|
10077
10102
|
let tmp = value2.substring(0, 2);
|
|
10078
|
-
|
|
10103
|
+
const h = tmp.length === 0 ? curH : parseInt(tmp.padEnd(2, "0"));
|
|
10079
10104
|
tmp = value2.substring(2, 4);
|
|
10080
|
-
|
|
10105
|
+
const m = tmp.length === 0 ? curM : parseInt(tmp.padEnd(2, "0"));
|
|
10081
10106
|
tmp = value2.substring(4, 6);
|
|
10082
|
-
|
|
10107
|
+
const s = tmp.length === 0 ? curS : parseInt(tmp.padEnd(2, "0"));
|
|
10108
|
+
const date = /* @__PURE__ */ new Date();
|
|
10109
|
+
date.setHours(h);
|
|
10110
|
+
date.setMinutes(m);
|
|
10111
|
+
date.setSeconds(s);
|
|
10112
|
+
const getReference = (date2) => {
|
|
10113
|
+
if (props.min) {
|
|
10114
|
+
const min = getDate(props.min);
|
|
10115
|
+
if (min.getTime() > date2.getTime()) {
|
|
10116
|
+
return min;
|
|
10117
|
+
}
|
|
10118
|
+
}
|
|
10119
|
+
if (props.max) {
|
|
10120
|
+
const max = getDate(props.max);
|
|
10121
|
+
if (max.getTime() < date2.getTime()) {
|
|
10122
|
+
return max;
|
|
10123
|
+
}
|
|
10124
|
+
}
|
|
10125
|
+
return date2;
|
|
10126
|
+
};
|
|
10083
10127
|
if (event.key === "ArrowUp") {
|
|
10084
|
-
const date = /* @__PURE__ */ new Date();
|
|
10085
|
-
date.setHours(h);
|
|
10086
|
-
date.setMinutes(m);
|
|
10087
|
-
date.setSeconds(s);
|
|
10088
10128
|
if (seconds) {
|
|
10089
10129
|
date.setSeconds(s + 1);
|
|
10090
|
-
|
|
10091
|
-
m = date.getMinutes();
|
|
10092
|
-
s = date.getSeconds();
|
|
10130
|
+
const reference = getReference(date);
|
|
10093
10131
|
setValue(
|
|
10094
10132
|
[
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10133
|
+
reference.getHours().toString().padStart(2, "0"),
|
|
10134
|
+
reference.getMinutes().toString().padStart(2, "0"),
|
|
10135
|
+
reference.getSeconds().toString().padStart(2, "0")
|
|
10098
10136
|
].join(":")
|
|
10099
10137
|
);
|
|
10100
10138
|
} else {
|
|
10101
10139
|
date.setMinutes(m + 1);
|
|
10102
|
-
|
|
10103
|
-
m = date.getMinutes();
|
|
10104
|
-
s = date.getSeconds();
|
|
10140
|
+
const reference = getReference(date);
|
|
10105
10141
|
setValue(
|
|
10106
|
-
[
|
|
10107
|
-
"
|
|
10108
|
-
|
|
10142
|
+
[
|
|
10143
|
+
reference.getHours().toString().padStart(2, "0"),
|
|
10144
|
+
reference.getMinutes().toString().padStart(2, "0")
|
|
10145
|
+
].join(":")
|
|
10109
10146
|
);
|
|
10110
10147
|
}
|
|
10111
10148
|
} else if (event.key === "ArrowDown") {
|
|
10112
|
-
const date = /* @__PURE__ */ new Date();
|
|
10113
|
-
date.setHours(h);
|
|
10114
|
-
date.setMinutes(m);
|
|
10115
|
-
date.setSeconds(s);
|
|
10116
10149
|
if (seconds) {
|
|
10117
10150
|
date.setSeconds(s - 1);
|
|
10118
|
-
|
|
10119
|
-
m = date.getMinutes();
|
|
10120
|
-
s = date.getSeconds();
|
|
10151
|
+
const reference = getReference(date);
|
|
10121
10152
|
setValue(
|
|
10122
10153
|
[
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10154
|
+
reference.getHours().toString().padStart(2, "0"),
|
|
10155
|
+
reference.getMinutes().toString().padStart(2, "0"),
|
|
10156
|
+
reference.getSeconds().toString().padStart(2, "0")
|
|
10126
10157
|
].join(":")
|
|
10127
10158
|
);
|
|
10128
10159
|
} else {
|
|
10129
10160
|
date.setMinutes(m - 1);
|
|
10130
|
-
|
|
10131
|
-
m = date.getMinutes();
|
|
10132
|
-
s = date.getSeconds();
|
|
10161
|
+
const reference = getReference(date);
|
|
10133
10162
|
setValue(
|
|
10134
|
-
[
|
|
10135
|
-
"
|
|
10136
|
-
|
|
10163
|
+
[
|
|
10164
|
+
reference.getHours().toString().padStart(2, "0"),
|
|
10165
|
+
reference.getMinutes().toString().padStart(2, "0")
|
|
10166
|
+
].join(":")
|
|
10137
10167
|
);
|
|
10138
10168
|
}
|
|
10139
10169
|
}
|
|
@@ -10302,17 +10332,25 @@ var Button3 = (props) => {
|
|
|
10302
10332
|
};
|
|
10303
10333
|
const htmlProps = filterObject(props, ["size", "appearance", "color", "loading", "content"]);
|
|
10304
10334
|
const loaderSize = sizes[defaultValues.$size].lineHeight;
|
|
10305
|
-
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)(
|
|
10336
|
+
Button2,
|
|
10337
|
+
{
|
|
10338
|
+
...defaultValues,
|
|
10339
|
+
...htmlProps,
|
|
10340
|
+
formNoValidate: "formNoValidate" in props ? props.formNoValidate : props.type === "submit",
|
|
10341
|
+
children: [
|
|
10342
|
+
children || content,
|
|
10343
|
+
props.loading && /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
10344
|
+
Loader_default2,
|
|
10345
|
+
{
|
|
10346
|
+
color: defaultValues.$appearance === "solid" ? "white" : "blue",
|
|
10347
|
+
size: loaderSize,
|
|
10348
|
+
borderSize: `calc(${loaderSize} * 0.0757)`
|
|
10349
|
+
}
|
|
10350
|
+
)
|
|
10351
|
+
]
|
|
10352
|
+
}
|
|
10353
|
+
);
|
|
10316
10354
|
};
|
|
10317
10355
|
var Button_default2 = Button3;
|
|
10318
10356
|
|
|
@@ -12542,9 +12580,7 @@ var SelectedArea = import_styled_components30.default.div`
|
|
|
12542
12580
|
z-index: 1;
|
|
12543
12581
|
|
|
12544
12582
|
> span {
|
|
12545
|
-
|
|
12546
|
-
display: block;
|
|
12547
|
-
box-sizing: border-box;
|
|
12583
|
+
background-color: ${({ theme: theme4 }) => theme4.colors.blue};
|
|
12548
12584
|
height: 100%;
|
|
12549
12585
|
}
|
|
12550
12586
|
`;
|
|
@@ -12935,8 +12971,7 @@ var Range = import_react27.default.forwardRef(
|
|
|
12935
12971
|
const viewMode = isViewMode() || props.viewMode;
|
|
12936
12972
|
const { min, max, strict, markers, step, position, value } = getMarkers(props);
|
|
12937
12973
|
const range = max - min;
|
|
12938
|
-
const percent = 100 / range;
|
|
12939
|
-
const spans = value - min;
|
|
12974
|
+
const percent = (value - min) * 100 / range;
|
|
12940
12975
|
if (value < min || value > max) {
|
|
12941
12976
|
throw new Error(
|
|
12942
12977
|
`Value must be between "${min}" and "${max}". "${value}" given`
|
|
@@ -13113,7 +13148,14 @@ var Range = import_react27.default.forwardRef(
|
|
|
13113
13148
|
}
|
|
13114
13149
|
)
|
|
13115
13150
|
] }),
|
|
13116
|
-
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(SelectedArea_default, {
|
|
13151
|
+
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(SelectedArea_default, { children: /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
13152
|
+
"span",
|
|
13153
|
+
{
|
|
13154
|
+
style: {
|
|
13155
|
+
width: `calc(${percent}% - (${bulletSize * percent / 100}px)`
|
|
13156
|
+
}
|
|
13157
|
+
}
|
|
13158
|
+
) })
|
|
13117
13159
|
] })
|
|
13118
13160
|
] }),
|
|
13119
13161
|
maxLabel && /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(MinMaxLabelContainer_default, { children: maxLabel })
|
package/dist/index.mjs
CHANGED
|
@@ -155,12 +155,23 @@ var keys = (value) => {
|
|
|
155
155
|
var notEmptyString = (value) => {
|
|
156
156
|
return typeof value === "string" && value.trim() !== "";
|
|
157
157
|
};
|
|
158
|
+
var isNumber = (value) => {
|
|
159
|
+
return typeof value === "number" && isFinite(value);
|
|
160
|
+
};
|
|
158
161
|
var isString = (value) => {
|
|
159
162
|
return typeof value === "string";
|
|
160
163
|
};
|
|
164
|
+
var isNumeric = (value) => {
|
|
165
|
+
if (isNumber(value)) return true;
|
|
166
|
+
if (!isString(value)) return false;
|
|
167
|
+
return !isNaN(parseFloat(value));
|
|
168
|
+
};
|
|
161
169
|
var isBoolean = (value) => {
|
|
162
170
|
return typeof value === "boolean";
|
|
163
171
|
};
|
|
172
|
+
var isNumericString = (value) => {
|
|
173
|
+
return notEmptyString(value) && isNumeric(value);
|
|
174
|
+
};
|
|
164
175
|
var isDateInstance = (value) => {
|
|
165
176
|
return value instanceof Date && !isNaN(value.valueOf());
|
|
166
177
|
};
|
|
@@ -253,6 +264,11 @@ var filterObject = (object, remove, inital = {}) => {
|
|
|
253
264
|
);
|
|
254
265
|
return r;
|
|
255
266
|
};
|
|
267
|
+
var numberOrDefault = (value, defaultValue2) => {
|
|
268
|
+
if (isNumber(value)) return value;
|
|
269
|
+
if (isNumericString(value)) return parseFloat(value);
|
|
270
|
+
return defaultValue2;
|
|
271
|
+
};
|
|
256
272
|
var isoStringToDate = (value) => {
|
|
257
273
|
const [d, t = "00:00:00"] = value.split(" ");
|
|
258
274
|
const date = /* @__PURE__ */ new Date(
|
|
@@ -10003,6 +10019,15 @@ var mask = (v, seconds) => {
|
|
|
10003
10019
|
else if (v.length < 5) return v.substring(0, 2) + ":" + v.substring(2);
|
|
10004
10020
|
else return v.substring(0, 2) + ":" + v.substring(2, 4) + ":" + v.substring(4);
|
|
10005
10021
|
};
|
|
10022
|
+
var getDate = (value) => {
|
|
10023
|
+
const v = value.replace(/[^0-9\s]/g, "");
|
|
10024
|
+
const h = numberOrDefault(v.substring(0, 2), 0);
|
|
10025
|
+
const m = numberOrDefault(v.substring(2, 4), 0);
|
|
10026
|
+
const s = numberOrDefault(v.substring(4, 6), 0);
|
|
10027
|
+
const date = /* @__PURE__ */ new Date();
|
|
10028
|
+
date.setHours(h, m, s, 0);
|
|
10029
|
+
return date;
|
|
10030
|
+
};
|
|
10006
10031
|
var Time = React13.forwardRef(
|
|
10007
10032
|
(props, ref) => {
|
|
10008
10033
|
const { value, seconds } = props;
|
|
@@ -10018,65 +10043,70 @@ var Time = React13.forwardRef(
|
|
|
10018
10043
|
const curS = todayDate.getSeconds();
|
|
10019
10044
|
const value2 = target.value.replace(/[^0-9\s]/g, "");
|
|
10020
10045
|
let tmp = value2.substring(0, 2);
|
|
10021
|
-
|
|
10046
|
+
const h = tmp.length === 0 ? curH : parseInt(tmp.padEnd(2, "0"));
|
|
10022
10047
|
tmp = value2.substring(2, 4);
|
|
10023
|
-
|
|
10048
|
+
const m = tmp.length === 0 ? curM : parseInt(tmp.padEnd(2, "0"));
|
|
10024
10049
|
tmp = value2.substring(4, 6);
|
|
10025
|
-
|
|
10050
|
+
const s = tmp.length === 0 ? curS : parseInt(tmp.padEnd(2, "0"));
|
|
10051
|
+
const date = /* @__PURE__ */ new Date();
|
|
10052
|
+
date.setHours(h);
|
|
10053
|
+
date.setMinutes(m);
|
|
10054
|
+
date.setSeconds(s);
|
|
10055
|
+
const getReference = (date2) => {
|
|
10056
|
+
if (props.min) {
|
|
10057
|
+
const min = getDate(props.min);
|
|
10058
|
+
if (min.getTime() > date2.getTime()) {
|
|
10059
|
+
return min;
|
|
10060
|
+
}
|
|
10061
|
+
}
|
|
10062
|
+
if (props.max) {
|
|
10063
|
+
const max = getDate(props.max);
|
|
10064
|
+
if (max.getTime() < date2.getTime()) {
|
|
10065
|
+
return max;
|
|
10066
|
+
}
|
|
10067
|
+
}
|
|
10068
|
+
return date2;
|
|
10069
|
+
};
|
|
10026
10070
|
if (event.key === "ArrowUp") {
|
|
10027
|
-
const date = /* @__PURE__ */ new Date();
|
|
10028
|
-
date.setHours(h);
|
|
10029
|
-
date.setMinutes(m);
|
|
10030
|
-
date.setSeconds(s);
|
|
10031
10071
|
if (seconds) {
|
|
10032
10072
|
date.setSeconds(s + 1);
|
|
10033
|
-
|
|
10034
|
-
m = date.getMinutes();
|
|
10035
|
-
s = date.getSeconds();
|
|
10073
|
+
const reference = getReference(date);
|
|
10036
10074
|
setValue(
|
|
10037
10075
|
[
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10076
|
+
reference.getHours().toString().padStart(2, "0"),
|
|
10077
|
+
reference.getMinutes().toString().padStart(2, "0"),
|
|
10078
|
+
reference.getSeconds().toString().padStart(2, "0")
|
|
10041
10079
|
].join(":")
|
|
10042
10080
|
);
|
|
10043
10081
|
} else {
|
|
10044
10082
|
date.setMinutes(m + 1);
|
|
10045
|
-
|
|
10046
|
-
m = date.getMinutes();
|
|
10047
|
-
s = date.getSeconds();
|
|
10083
|
+
const reference = getReference(date);
|
|
10048
10084
|
setValue(
|
|
10049
|
-
[
|
|
10050
|
-
"
|
|
10051
|
-
|
|
10085
|
+
[
|
|
10086
|
+
reference.getHours().toString().padStart(2, "0"),
|
|
10087
|
+
reference.getMinutes().toString().padStart(2, "0")
|
|
10088
|
+
].join(":")
|
|
10052
10089
|
);
|
|
10053
10090
|
}
|
|
10054
10091
|
} else if (event.key === "ArrowDown") {
|
|
10055
|
-
const date = /* @__PURE__ */ new Date();
|
|
10056
|
-
date.setHours(h);
|
|
10057
|
-
date.setMinutes(m);
|
|
10058
|
-
date.setSeconds(s);
|
|
10059
10092
|
if (seconds) {
|
|
10060
10093
|
date.setSeconds(s - 1);
|
|
10061
|
-
|
|
10062
|
-
m = date.getMinutes();
|
|
10063
|
-
s = date.getSeconds();
|
|
10094
|
+
const reference = getReference(date);
|
|
10064
10095
|
setValue(
|
|
10065
10096
|
[
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10097
|
+
reference.getHours().toString().padStart(2, "0"),
|
|
10098
|
+
reference.getMinutes().toString().padStart(2, "0"),
|
|
10099
|
+
reference.getSeconds().toString().padStart(2, "0")
|
|
10069
10100
|
].join(":")
|
|
10070
10101
|
);
|
|
10071
10102
|
} else {
|
|
10072
10103
|
date.setMinutes(m - 1);
|
|
10073
|
-
|
|
10074
|
-
m = date.getMinutes();
|
|
10075
|
-
s = date.getSeconds();
|
|
10104
|
+
const reference = getReference(date);
|
|
10076
10105
|
setValue(
|
|
10077
|
-
[
|
|
10078
|
-
"
|
|
10079
|
-
|
|
10106
|
+
[
|
|
10107
|
+
reference.getHours().toString().padStart(2, "0"),
|
|
10108
|
+
reference.getMinutes().toString().padStart(2, "0")
|
|
10109
|
+
].join(":")
|
|
10080
10110
|
);
|
|
10081
10111
|
}
|
|
10082
10112
|
}
|
|
@@ -10245,17 +10275,25 @@ var Button3 = (props) => {
|
|
|
10245
10275
|
};
|
|
10246
10276
|
const htmlProps = filterObject(props, ["size", "appearance", "color", "loading", "content"]);
|
|
10247
10277
|
const loaderSize = sizes[defaultValues.$size].lineHeight;
|
|
10248
|
-
return /* @__PURE__ */ jsxs148(
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10278
|
+
return /* @__PURE__ */ jsxs148(
|
|
10279
|
+
Button2,
|
|
10280
|
+
{
|
|
10281
|
+
...defaultValues,
|
|
10282
|
+
...htmlProps,
|
|
10283
|
+
formNoValidate: "formNoValidate" in props ? props.formNoValidate : props.type === "submit",
|
|
10284
|
+
children: [
|
|
10285
|
+
children || content,
|
|
10286
|
+
props.loading && /* @__PURE__ */ jsx306(
|
|
10287
|
+
Loader_default2,
|
|
10288
|
+
{
|
|
10289
|
+
color: defaultValues.$appearance === "solid" ? "white" : "blue",
|
|
10290
|
+
size: loaderSize,
|
|
10291
|
+
borderSize: `calc(${loaderSize} * 0.0757)`
|
|
10292
|
+
}
|
|
10293
|
+
)
|
|
10294
|
+
]
|
|
10295
|
+
}
|
|
10296
|
+
);
|
|
10259
10297
|
};
|
|
10260
10298
|
var Button_default2 = Button3;
|
|
10261
10299
|
|
|
@@ -12485,9 +12523,7 @@ var SelectedArea = styled27.div`
|
|
|
12485
12523
|
z-index: 1;
|
|
12486
12524
|
|
|
12487
12525
|
> span {
|
|
12488
|
-
|
|
12489
|
-
display: block;
|
|
12490
|
-
box-sizing: border-box;
|
|
12526
|
+
background-color: ${({ theme: theme4 }) => theme4.colors.blue};
|
|
12491
12527
|
height: 100%;
|
|
12492
12528
|
}
|
|
12493
12529
|
`;
|
|
@@ -12878,8 +12914,7 @@ var Range = React25.forwardRef(
|
|
|
12878
12914
|
const viewMode = isViewMode() || props.viewMode;
|
|
12879
12915
|
const { min, max, strict, markers, step, position, value } = getMarkers(props);
|
|
12880
12916
|
const range = max - min;
|
|
12881
|
-
const percent = 100 / range;
|
|
12882
|
-
const spans = value - min;
|
|
12917
|
+
const percent = (value - min) * 100 / range;
|
|
12883
12918
|
if (value < min || value > max) {
|
|
12884
12919
|
throw new Error(
|
|
12885
12920
|
`Value must be between "${min}" and "${max}". "${value}" given`
|
|
@@ -13056,7 +13091,14 @@ var Range = React25.forwardRef(
|
|
|
13056
13091
|
}
|
|
13057
13092
|
)
|
|
13058
13093
|
] }),
|
|
13059
|
-
/* @__PURE__ */ jsx319(SelectedArea_default, {
|
|
13094
|
+
/* @__PURE__ */ jsx319(SelectedArea_default, { children: /* @__PURE__ */ jsx319(
|
|
13095
|
+
"span",
|
|
13096
|
+
{
|
|
13097
|
+
style: {
|
|
13098
|
+
width: `calc(${percent}% - (${bulletSize * percent / 100}px)`
|
|
13099
|
+
}
|
|
13100
|
+
}
|
|
13101
|
+
) })
|
|
13060
13102
|
] })
|
|
13061
13103
|
] }),
|
|
13062
13104
|
maxLabel && /* @__PURE__ */ jsx319(MinMaxLabelContainer_default, { children: maxLabel })
|