@lanaco/lnc-react-ui 4.0.3 → 4.0.6
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/Avatar.cjs +1 -1
- package/dist/Avatar.js +5 -6
- package/dist/Button.cjs +2 -2
- package/dist/Button.js +0 -1
- package/dist/CheckBoxInput.js +2 -2
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +10 -9
- package/dist/ColorInput.js +18 -18
- package/dist/ConfirmationForm.cjs +5 -5
- package/dist/ConfirmationForm.js +16 -16
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +35 -35
- package/dist/DecimalInput.js +41 -41
- package/dist/DoubleRangeSlider.js +30 -30
- package/dist/DragAndDropFile.js +162 -162
- package/dist/DragDropFiles.js +29 -29
- package/dist/Drawer.js +46 -46
- package/dist/Dropdown.js +36 -36
- package/dist/DropdownItem.js +19 -19
- package/dist/DropdownLookup.js +34 -34
- package/dist/DropdownMenu.js +43 -43
- package/dist/FileInput.js +21 -21
- package/dist/FlexGridItem.js +13 -13
- package/dist/Grid.cjs +1 -2
- package/dist/Grid.js +36 -8
- package/dist/GridItem.cjs +1 -1
- package/dist/GridItem.js +27 -7
- package/dist/Icon.cjs +2 -2
- package/dist/Icon.js +5 -6
- package/dist/IconButton.cjs +5 -5
- package/dist/IconButton.js +24 -25
- package/dist/Kanban.js +446 -446
- package/dist/MenuItem.cjs +2 -2
- package/dist/MenuItem.js +59 -58
- package/dist/Modal.js +38 -38
- package/dist/MultiSelectDropdown.js +2 -2
- package/dist/MultiSelectDropdownLookup.js +2 -2
- package/dist/NestedDropdownItem.js +43 -43
- package/dist/NestedMenuItem.js +44 -44
- package/dist/NotificationContainer.cjs +2 -2
- package/dist/NotificationContainer.js +24 -23
- package/dist/NumberInput.js +12 -12
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +18 -18
- package/dist/PasswordInput.js +40 -40
- package/dist/RadioGroup.js +11 -11
- package/dist/RadioInput.js +6 -6
- package/dist/RangeSlider.js +25 -25
- package/dist/SearchBar.js +73 -73
- package/dist/Sidebar.js +11 -11
- package/dist/SwipeableDrawer.js +16 -16
- package/dist/TabItem.js +25 -25
- package/dist/Tabs.js +32 -26
- package/dist/TextAreaInput.js +30 -30
- package/dist/TextInput.js +22 -22
- package/dist/ThemeProvider.js +83 -83
- package/dist/TimeInput.js +4 -4
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +0 -1
- package/dist/TreeMenu.js +56 -56
- package/dist/style.css +1 -5
- package/package.json +1 -1
- package/bundle-visualization.html +0 -4842
- package/custom-addons/ThemeSelector.js +0 -111
- package/custom-addons/register.js +0 -16
- package/custom-addons/theme-selector.css +0 -17
package/dist/DecimalInput.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as ie, jsx as K } from "react/jsx-runtime";
|
|
2
2
|
import { P as S } from "./index-BYnWp42a.js";
|
|
3
|
-
import
|
|
4
|
-
import { d as
|
|
3
|
+
import j, { forwardRef as oe, useState as ne, useCallback as se } from "react";
|
|
4
|
+
import { d as fe } from "./index-CNBqQrtK.js";
|
|
5
5
|
import { n as G } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
6
|
-
import { d as B, a as R, b as
|
|
7
|
-
import { u as
|
|
6
|
+
import { d as B, a as R, b as le, e as ue, h as W, g as ce } from "./utils-C52T57HO.js";
|
|
7
|
+
import { u as pe } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
8
8
|
function O() {
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function de() {
|
|
11
11
|
return !0;
|
|
12
12
|
}
|
|
13
13
|
function V(a) {
|
|
@@ -19,7 +19,7 @@ function _(a) {
|
|
|
19
19
|
function Z(a) {
|
|
20
20
|
return a.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function me(a) {
|
|
23
23
|
switch (a) {
|
|
24
24
|
case "lakh":
|
|
25
25
|
return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
|
|
@@ -30,8 +30,8 @@ function de(a) {
|
|
|
30
30
|
return /(\d)(?=(\d{3})+(?!\d))/g;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
var e =
|
|
33
|
+
function he(a, f, u) {
|
|
34
|
+
var e = me(u), t = a.search(/[1-9]/);
|
|
35
35
|
return t = t === -1 ? a.length : t, a.substring(0, t) + a.substring(t, a.length).replace(e, "$1" + f);
|
|
36
36
|
}
|
|
37
37
|
function z(a, f) {
|
|
@@ -46,7 +46,7 @@ function z(a, f) {
|
|
|
46
46
|
addNegation: e
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function ve(a) {
|
|
50
50
|
if (!a)
|
|
51
51
|
return a;
|
|
52
52
|
var f = a[0] === "-";
|
|
@@ -62,7 +62,7 @@ function Q(a, f, u) {
|
|
|
62
62
|
function q(a, f) {
|
|
63
63
|
return Array(f + 1).join(a);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function ge(a) {
|
|
66
66
|
a += "";
|
|
67
67
|
var f = a[0] === "-" ? "-" : "";
|
|
68
68
|
f && (a = a.substring(1));
|
|
@@ -73,7 +73,7 @@ function ve(a) {
|
|
|
73
73
|
var r = 1 + t, o = e.length;
|
|
74
74
|
return r < 0 ? e = "0." + q("0", Math.abs(r)) + e : r >= o ? e = e + q("0", r - o) : e = (e.substring(0, r) || "0") + "." + e.substring(r), f + e;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Se(a, f, u) {
|
|
77
77
|
if (["", "-"].indexOf(a) !== -1)
|
|
78
78
|
return a;
|
|
79
79
|
var e = a.indexOf(".") !== -1 && f, t = z(a), r = t.beforeDecimal, o = t.afterDecimal, s = t.hasNagation, i = parseFloat("0." + (o || "0")), n = o.length <= f ? "0." + o : i.toFixed(f), l = n.split("."), p = r.split("").reverse().reduce(function(d, g, y) {
|
|
@@ -94,7 +94,7 @@ function H(a, f) {
|
|
|
94
94
|
return a.selectionStart || a.selectionStart === 0 ? (a.focus(), a.setSelectionRange(f, f), !0) : (a.focus(), !1);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function ye(a, f) {
|
|
98
98
|
for (var u = 0, e = 0, t = a.length, r = f.length; a[u] === f[u] && u < t; )
|
|
99
99
|
u++;
|
|
100
100
|
for (; a[t - 1 - e] === f[r - 1 - e] && r - e > u && t - e > u; )
|
|
@@ -107,15 +107,15 @@ function L(a, f, u) {
|
|
|
107
107
|
function J(a) {
|
|
108
108
|
return Math.max(a.selectionStart, a.selectionEnd);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function xe(a) {
|
|
111
111
|
return a || typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function be(a, f) {
|
|
114
114
|
var u = {};
|
|
115
115
|
for (var e in a) Object.prototype.hasOwnProperty.call(a, e) && f.indexOf(e) === -1 && (u[e] = a[e]);
|
|
116
116
|
return u;
|
|
117
117
|
}
|
|
118
|
-
var
|
|
118
|
+
var Ne = {
|
|
119
119
|
displayType: "input",
|
|
120
120
|
decimalSeparator: ".",
|
|
121
121
|
thousandsGroupStyle: "thousand",
|
|
@@ -133,7 +133,7 @@ var be = {
|
|
|
133
133
|
onMouseUp: O,
|
|
134
134
|
onFocus: O,
|
|
135
135
|
onBlur: O,
|
|
136
|
-
isAllowed:
|
|
136
|
+
isAllowed: de
|
|
137
137
|
}, X = /* @__PURE__ */ function(a) {
|
|
138
138
|
function f(u) {
|
|
139
139
|
a.call(this, u);
|
|
@@ -278,7 +278,7 @@ var be = {
|
|
|
278
278
|
return s.join("");
|
|
279
279
|
}, f.prototype.formatAsNumber = function(e) {
|
|
280
280
|
var t = this.props, r = t.decimalScale, o = t.fixedDecimalScale, s = t.prefix, i = t.suffix, n = t.allowNegative, l = t.thousandsGroupStyle, p = this.getSeparators(), c = p.thousandSeparator, h = p.decimalSeparator, m = e.indexOf(".") !== -1 || r && o, d = z(e, n), g = d.beforeDecimal, y = d.afterDecimal, x = d.addNegation;
|
|
281
|
-
return r !== void 0 && (y = Q(y, r, o)), c && (g =
|
|
281
|
+
return r !== void 0 && (y = Q(y, r, o)), c && (g = he(g, c, l)), s && (g = s + g), i && (y = y + i), x && (g = "-" + g), e = g + (m && h || "") + y, e;
|
|
282
282
|
}, f.prototype.formatNumString = function(e) {
|
|
283
283
|
e === void 0 && (e = "");
|
|
284
284
|
var t = this.props, r = t.format, o = t.allowEmptyFormatting, s = t.customNumerals, i = e;
|
|
@@ -298,7 +298,7 @@ var be = {
|
|
|
298
298
|
var c = !l && l !== 0;
|
|
299
299
|
if (c && i && (l = ""), c && !i)
|
|
300
300
|
return "";
|
|
301
|
-
typeof l == "number" && (l =
|
|
301
|
+
typeof l == "number" && (l = ge(l), p = !0), l === "Infinity" && p && (l = ""), p && !r && typeof o == "number" && (l = Se(l, o, s));
|
|
302
302
|
var h = p ? this.formatNumString(l) : this.formatInput(l);
|
|
303
303
|
return h;
|
|
304
304
|
}, f.prototype.formatNegation = function(e) {
|
|
@@ -313,7 +313,7 @@ var be = {
|
|
|
313
313
|
var r = this.props, o = r.format, s = r.prefix, i = r.suffix, n = r.decimalScale, l = r.fixedDecimalScale, p = this.getSeparators(), c = p.decimalSeparator;
|
|
314
314
|
return !!(typeof o == "string" && o[e] !== "#" || !o && (e < s.length || e >= t.length - i.length || n && l && t[e] === c));
|
|
315
315
|
}, f.prototype.correctInputValue = function(e, t, r) {
|
|
316
|
-
var o = this, s = this.props, i = s.format, n = s.allowNegative, l = s.prefix, p = s.suffix, c = s.decimalScale, h = this.getSeparators(), m = h.allowedDecimalSeparators, d = h.decimalSeparator, g = this.state.numAsString || "", y = this.selectionBeforeInput, x = y.selectionStart, w = y.selectionEnd, P =
|
|
316
|
+
var o = this, s = this.props, i = s.format, n = s.allowNegative, l = s.prefix, p = s.suffix, c = s.decimalScale, h = this.getSeparators(), m = h.allowedDecimalSeparators, d = h.decimalSeparator, g = this.state.numAsString || "", y = this.selectionBeforeInput, x = y.selectionStart, w = y.selectionEnd, P = ye(t, r), v = P.start, N = P.end;
|
|
317
317
|
if (!i && v === N && m.indexOf(r[x]) !== -1) {
|
|
318
318
|
var F = c === 0 ? "" : d;
|
|
319
319
|
return r.substr(0, x) + F + r.substr(x + 1, r.length);
|
|
@@ -330,7 +330,7 @@ var be = {
|
|
|
330
330
|
x === E && w === T
|
|
331
331
|
)
|
|
332
332
|
return r;
|
|
333
|
-
var
|
|
333
|
+
var I = t.substr(v, N - v), M = !![].concat(I).find(
|
|
334
334
|
function(C, $) {
|
|
335
335
|
return o.isCharacterAFormat($ + v, t);
|
|
336
336
|
}
|
|
@@ -338,7 +338,7 @@ var be = {
|
|
|
338
338
|
if (M) {
|
|
339
339
|
var k = t.substr(v), A = {}, b = [];
|
|
340
340
|
[].concat(k).forEach(function(C, $) {
|
|
341
|
-
o.isCharacterAFormat($ + v, t) ? A[$] = C : $ >
|
|
341
|
+
o.isCharacterAFormat($ + v, t) ? A[$] = C : $ > I.length - 1 && b.push(C);
|
|
342
342
|
}), Object.keys(A).forEach(function(C) {
|
|
343
343
|
b.length > C ? b.splice(C, 0, A[C]) : b.push(A[C]);
|
|
344
344
|
}), r = t.substr(0, v) + b.join("");
|
|
@@ -379,7 +379,7 @@ var be = {
|
|
|
379
379
|
}, f.prototype.onBlur = function(e) {
|
|
380
380
|
var t = this, r = t.props, o = t.state, s = r.format, i = r.onBlur, n = r.allowLeadingZeros, l = o.numAsString, p = o.value;
|
|
381
381
|
if (this.focusedElm = null, clearTimeout(this.focusTimeout), clearTimeout(this.caretPositionTimeout), !s) {
|
|
382
|
-
isNaN(parseFloat(l)) && (l = ""), n || (l =
|
|
382
|
+
isNaN(parseFloat(l)) && (l = ""), n || (l = ve(l));
|
|
383
383
|
var c = this.formatNumString(l);
|
|
384
384
|
if (c !== p) {
|
|
385
385
|
this.updateValue({
|
|
@@ -447,7 +447,7 @@ var be = {
|
|
|
447
447
|
}, f.prototype.render = function() {
|
|
448
448
|
var e = this.props, t = e.type, r = e.displayType, o = e.customInput, s = e.renderText, i = e.getInputRef, n = e.format;
|
|
449
449
|
e.thousandSeparator, e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle, e.decimalScale, e.fixedDecimalScale, e.prefix, e.suffix, e.removeFormatting, e.mask, e.defaultValue, e.isNumericString, e.allowNegative, e.allowEmptyFormatting, e.allowLeadingZeros, e.onValueChange, e.isAllowed, e.customNumerals, e.onChange, e.onKeyDown, e.onMouseUp, e.onFocus, e.onBlur, e.value;
|
|
450
|
-
var l =
|
|
450
|
+
var l = be(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "thousandSeparator", "decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "decimalScale", "fixedDecimalScale", "prefix", "suffix", "removeFormatting", "mask", "defaultValue", "isNumericString", "allowNegative", "allowEmptyFormatting", "allowLeadingZeros", "onValueChange", "isAllowed", "customNumerals", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value"]), p = l, c = this.state, h = c.value, m = c.mounted, d = m && xe(n) ? "numeric" : void 0, g = Object.assign({ inputMode: d }, p, {
|
|
451
451
|
type: t,
|
|
452
452
|
value: h,
|
|
453
453
|
onChange: this.onChange,
|
|
@@ -457,20 +457,20 @@ var be = {
|
|
|
457
457
|
onBlur: this.onBlur
|
|
458
458
|
});
|
|
459
459
|
if (r === "text")
|
|
460
|
-
return s ? s(h, p) || null :
|
|
460
|
+
return s ? s(h, p) || null : j.createElement(
|
|
461
461
|
"span",
|
|
462
462
|
Object.assign({}, p, { ref: i }),
|
|
463
463
|
h
|
|
464
464
|
);
|
|
465
465
|
if (o) {
|
|
466
466
|
var y = o;
|
|
467
|
-
return
|
|
467
|
+
return j.createElement(y, Object.assign({}, g, { ref: i }));
|
|
468
468
|
}
|
|
469
|
-
return
|
|
469
|
+
return j.createElement("input", Object.assign({}, g, { ref: i }));
|
|
470
470
|
}, f;
|
|
471
|
-
}(
|
|
472
|
-
X.defaultProps =
|
|
473
|
-
const
|
|
471
|
+
}(j.Component);
|
|
472
|
+
X.defaultProps = Ne;
|
|
473
|
+
const we = G.div`
|
|
474
474
|
display: flex;
|
|
475
475
|
align-items: center;
|
|
476
476
|
|
|
@@ -491,9 +491,9 @@ const Ne = G.div`
|
|
|
491
491
|
"enabled",
|
|
492
492
|
"border"
|
|
493
493
|
)};
|
|
494
|
-
border-radius: ${(a) =>
|
|
494
|
+
border-radius: ${(a) => le(a.theme, "regular")};
|
|
495
495
|
|
|
496
|
-
${(a) => a.focused === !0 && a.readOnly !== !0 ?
|
|
496
|
+
${(a) => a.focused === !0 && a.readOnly !== !0 ? ue(a.theme) : ""}
|
|
497
497
|
${(a) => a.isDisabled === !0 ? W(a.theme) : ""}
|
|
498
498
|
${(a) => a.isDisabled === !0 ? "border: 1px solid " + R(
|
|
499
499
|
a.theme,
|
|
@@ -511,7 +511,7 @@ const Ne = G.div`
|
|
|
511
511
|
padding-bottom: 0.625rem;
|
|
512
512
|
width: 100%;
|
|
513
513
|
|
|
514
|
-
${(a) =>
|
|
514
|
+
${(a) => ce(a.theme, "Input", a.size, "enabled")}
|
|
515
515
|
min-height: ${(a) => B(a.theme, a.size)};
|
|
516
516
|
max-height: ${(a) => B(a.theme, a.size)};
|
|
517
517
|
color: ${(a) => R(
|
|
@@ -553,7 +553,7 @@ const Ne = G.div`
|
|
|
553
553
|
"enabled",
|
|
554
554
|
"prefix"
|
|
555
555
|
)};
|
|
556
|
-
`,
|
|
556
|
+
`, De = G(Y)``, Ce = oe((a, f) => {
|
|
557
557
|
const {
|
|
558
558
|
disabled: u,
|
|
559
559
|
readOnly: e,
|
|
@@ -576,12 +576,12 @@ const Ne = G.div`
|
|
|
576
576
|
size: x = "small",
|
|
577
577
|
color: w = "primary",
|
|
578
578
|
...P
|
|
579
|
-
} = a, v =
|
|
580
|
-
|
|
579
|
+
} = a, v = pe(), [N, F] = ne(!1), E = se(
|
|
580
|
+
fe((b, D) => T(b, D), t),
|
|
581
581
|
[c]
|
|
582
582
|
), T = (b, D) => {
|
|
583
583
|
c && (c == null || c(b, D));
|
|
584
|
-
},
|
|
584
|
+
}, I = (b, D) => {
|
|
585
585
|
E(D.event, _value);
|
|
586
586
|
}, M = () => n < 0 ? 0 : n > 17 ? 17 : n, k = (b) => {
|
|
587
587
|
F(!0), d == null || d(b);
|
|
@@ -589,7 +589,7 @@ const Ne = G.div`
|
|
|
589
589
|
F(!1), m == null || m(b);
|
|
590
590
|
};
|
|
591
591
|
return /* @__PURE__ */ ie(
|
|
592
|
-
|
|
592
|
+
we,
|
|
593
593
|
{
|
|
594
594
|
style: y,
|
|
595
595
|
className: g,
|
|
@@ -626,12 +626,12 @@ const Ne = G.div`
|
|
|
626
626
|
allowNegative: p,
|
|
627
627
|
onFocus: k,
|
|
628
628
|
onBlur: A,
|
|
629
|
-
onValueChange:
|
|
629
|
+
onValueChange: I,
|
|
630
630
|
...P
|
|
631
631
|
}
|
|
632
632
|
),
|
|
633
633
|
o && /* @__PURE__ */ K(
|
|
634
|
-
|
|
634
|
+
De,
|
|
635
635
|
{
|
|
636
636
|
theme: v,
|
|
637
637
|
color: w,
|
|
@@ -644,7 +644,7 @@ const Ne = G.div`
|
|
|
644
644
|
}
|
|
645
645
|
);
|
|
646
646
|
});
|
|
647
|
-
|
|
647
|
+
Ce.propTypes = {
|
|
648
648
|
id: S.string,
|
|
649
649
|
value: S.any,
|
|
650
650
|
defaultValue: S.any,
|
|
@@ -693,5 +693,5 @@ De.propTypes = {
|
|
|
693
693
|
])
|
|
694
694
|
};
|
|
695
695
|
export {
|
|
696
|
-
|
|
696
|
+
Ce as default
|
|
697
697
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import F,
|
|
1
|
+
import { jsxs as f, jsx as r, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as F, useState as w, useEffect as x, useRef as T, useCallback as j } from "react";
|
|
3
3
|
import { n as $ } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
4
4
|
import { P as i } from "./index-BYnWp42a.js";
|
|
5
|
-
import { a as u, b as
|
|
5
|
+
import { a as u, b as R, g as E, d as O } from "./utils-C52T57HO.js";
|
|
6
6
|
import { u as D } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
7
7
|
const L = ({ theme: e, size: k }) => {
|
|
8
8
|
var s = O(e, k);
|
|
@@ -101,11 +101,11 @@ const L = ({ theme: e, size: k }) => {
|
|
|
101
101
|
)};
|
|
102
102
|
width: 100%;
|
|
103
103
|
z-index: 1;
|
|
104
|
-
border-radius: ${(e) =>
|
|
104
|
+
border-radius: ${(e) => R(e.theme, "regular")};
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
& > .slider__range {
|
|
108
|
-
border-radius: ${(e) =>
|
|
108
|
+
border-radius: ${(e) => R(e.theme, "regular")};
|
|
109
109
|
background-color: ${(e) => u(
|
|
110
110
|
e.theme,
|
|
111
111
|
"Range",
|
|
@@ -160,40 +160,40 @@ const L = ({ theme: e, size: k }) => {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
`, B = F
|
|
163
|
+
`, B = F((e, k) => {
|
|
164
164
|
const {
|
|
165
165
|
minValue: s = null,
|
|
166
166
|
maxValue: v = null,
|
|
167
167
|
min: c = 0,
|
|
168
168
|
max: m = 100,
|
|
169
169
|
disabled: b = !1,
|
|
170
|
-
onChange:
|
|
170
|
+
onChange: y = () => {
|
|
171
171
|
},
|
|
172
172
|
color: C = "primary",
|
|
173
173
|
size: P = "small",
|
|
174
174
|
...M
|
|
175
|
-
} = e, g = { theme: D(), size: P, color: C }, [
|
|
175
|
+
} = e, g = { theme: D(), size: P, color: C }, [_, p] = w(), [t, z] = w(s), [a, N] = w(v);
|
|
176
176
|
x(() => {
|
|
177
177
|
z(s), N(v);
|
|
178
178
|
}, [s, v]);
|
|
179
|
-
const d = T(null),
|
|
179
|
+
const d = T(null), o = j(
|
|
180
180
|
(n) => Math.round((n - c) / (m - c) * 100),
|
|
181
181
|
[c, m]
|
|
182
182
|
);
|
|
183
183
|
return x(() => {
|
|
184
|
-
const n =
|
|
185
|
-
d.current && (d.current.style.left = `${n}%`, d.current.style.width = `${
|
|
186
|
-
}, [t,
|
|
187
|
-
const n =
|
|
188
|
-
d.current && (d.current.style.width = `${
|
|
189
|
-
}, [a,
|
|
190
|
-
|
|
191
|
-
}, [t, a,
|
|
192
|
-
|
|
184
|
+
const n = o(t), l = o(a);
|
|
185
|
+
d.current && (d.current.style.left = `${n}%`, d.current.style.width = `${l - n}%`);
|
|
186
|
+
}, [t, o]), x(() => {
|
|
187
|
+
const n = o(t), l = o(a);
|
|
188
|
+
d.current && (d.current.style.width = `${l - n}%`);
|
|
189
|
+
}, [a, o]), x(() => {
|
|
190
|
+
y({ min: t, max: a });
|
|
191
|
+
}, [t, a, y]), /* @__PURE__ */ f(U, { disabled: b, ...g, ...M, children: [
|
|
192
|
+
_ && t && /* @__PURE__ */ r(V, { children: /* @__PURE__ */ f(
|
|
193
193
|
S,
|
|
194
194
|
{
|
|
195
195
|
...g,
|
|
196
|
-
inputValue:
|
|
196
|
+
inputValue: o(t),
|
|
197
197
|
disabled: b,
|
|
198
198
|
children: [
|
|
199
199
|
/* @__PURE__ */ r("div", { className: "text-content", children: t }),
|
|
@@ -201,11 +201,11 @@ const L = ({ theme: e, size: k }) => {
|
|
|
201
201
|
]
|
|
202
202
|
}
|
|
203
203
|
) }),
|
|
204
|
-
|
|
204
|
+
_ && a && /* @__PURE__ */ r(V, { children: /* @__PURE__ */ f(
|
|
205
205
|
S,
|
|
206
206
|
{
|
|
207
207
|
...g,
|
|
208
|
-
inputValue:
|
|
208
|
+
inputValue: o(a),
|
|
209
209
|
disabled: b,
|
|
210
210
|
children: [
|
|
211
211
|
/* @__PURE__ */ r("div", { className: "text-content", children: a }),
|
|
@@ -221,16 +221,16 @@ const L = ({ theme: e, size: k }) => {
|
|
|
221
221
|
max: m,
|
|
222
222
|
value: t | "",
|
|
223
223
|
onChange: (n) => {
|
|
224
|
-
const
|
|
225
|
-
z(
|
|
224
|
+
const l = Math.min(Number(n.target.value), a - 1);
|
|
225
|
+
z(l);
|
|
226
226
|
},
|
|
227
227
|
className: "thumb thumb--left",
|
|
228
228
|
style: { zIndex: t > m - 100 && "5" },
|
|
229
229
|
onMouseEnter: () => {
|
|
230
|
-
|
|
230
|
+
p(!0);
|
|
231
231
|
},
|
|
232
232
|
onMouseLeave: () => {
|
|
233
|
-
|
|
233
|
+
p(!1);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
),
|
|
@@ -242,19 +242,19 @@ const L = ({ theme: e, size: k }) => {
|
|
|
242
242
|
max: m,
|
|
243
243
|
value: a | "",
|
|
244
244
|
onChange: (n) => {
|
|
245
|
-
const
|
|
246
|
-
N(
|
|
245
|
+
const l = Math.max(Number(n.target.value), t + 1);
|
|
246
|
+
N(l);
|
|
247
247
|
},
|
|
248
248
|
className: "thumb thumb--right",
|
|
249
249
|
onMouseEnter: () => {
|
|
250
|
-
|
|
250
|
+
p(!0);
|
|
251
251
|
},
|
|
252
252
|
onMouseLeave: () => {
|
|
253
|
-
|
|
253
|
+
p(!1);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
),
|
|
257
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ f(W, { ...g, disabled: b, children: [
|
|
258
258
|
/* @__PURE__ */ r("div", { className: "slider__track" }),
|
|
259
259
|
/* @__PURE__ */ r("div", { ref: d, className: "slider__range" })
|
|
260
260
|
] })
|