@lanaco/lnc-react-ui 4.0.199 → 4.0.201
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/Accordion.cjs +5 -5
- package/dist/Accordion.js +45 -56
- package/dist/AccordionDetails.cjs +3 -3
- package/dist/AccordionDetails.js +11 -25
- package/dist/AccordionSummary.cjs +4 -4
- package/dist/AccordionSummary.js +34 -44
- package/dist/ActionsToolbar.cjs +2 -3
- package/dist/ActionsToolbar.js +83 -135
- package/dist/Alert.cjs +10 -10
- package/dist/Alert.js +32 -64
- package/dist/Avatar.cjs +9 -9
- package/dist/Avatar.js +33 -72
- package/dist/Badge.cjs +6 -6
- package/dist/Badge.js +22 -47
- package/dist/BannerSectionCarousel.cjs +4 -4
- package/dist/BannerSectionCarousel.js +51 -542
- package/dist/BlogCardsSponsoredSection.cjs +1 -1
- package/dist/BlogCardsSponsoredSection.js +1 -1
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +12 -14
- package/dist/BlogExploreSection.cjs +1 -1
- package/dist/BlogExploreSection.js +1 -1
- package/dist/BlogListSection.cjs +1 -1
- package/dist/BlogListSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +1 -1
- package/dist/BlogsSectionDetailed.js +1 -1
- package/dist/BlogsSectionSimple.cjs +1 -1
- package/dist/BlogsSectionSimple.js +1 -1
- package/dist/BlogsSectionWithFilters.cjs +1 -1
- package/dist/BlogsSectionWithFilters.js +2 -2
- package/dist/Breadcrumbs.cjs +5 -5
- package/dist/Breadcrumbs.js +57 -87
- package/dist/Button.cjs +11 -11
- package/dist/Button.js +126 -173
- package/dist/ButtonGroup.cjs +8 -8
- package/dist/ButtonGroup.js +37 -49
- package/dist/CalorieCalculatorSection.cjs +8 -8
- package/dist/CalorieCalculatorSection.js +90 -97
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +2 -5
- package/dist/Chip.cjs +14 -14
- package/dist/Chip.js +73 -111
- package/dist/ConfirmationForm.cjs +6 -6
- package/dist/ConfirmationForm.js +67 -109
- package/dist/ContactSection.cjs +1 -0
- package/dist/ContactSection.js +1 -0
- package/dist/Content.cjs +1 -1
- package/dist/Content.js +7 -15
- package/dist/{DailyMotion-ByXblnua.js → DailyMotion-BBcJkMo_.js} +1 -1
- package/dist/{DailyMotion-BaFUcQKQ.cjs → DailyMotion-CpZExcrg.cjs} +1 -1
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +30 -50
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +1347 -1383
- package/dist/DecimalInput.cjs +6 -6
- package/dist/DecimalInput.js +210 -263
- package/dist/DecimalInputV2.cjs +23 -23
- package/dist/DecimalInputV2.js +119 -176
- package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
- package/dist/DetailedProductsInfinitiveSection.js +1 -1
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +2 -2
- package/dist/DetailsView.cjs +9 -9
- package/dist/DetailsView.js +111 -162
- package/dist/DoubleRangeSlider.cjs +22 -22
- package/dist/DoubleRangeSlider.js +70 -95
- package/dist/DragAndDropFile.cjs +10 -10
- package/dist/DragAndDropFile.js +347 -402
- package/dist/DragDropFiles.cjs +4 -4
- package/dist/DragDropFiles.js +70 -124
- package/dist/Drawer.cjs +5 -5
- package/dist/Drawer.js +97 -135
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +44 -213
- package/dist/DropdownItem.cjs +14 -14
- package/dist/DropdownItem.js +106 -142
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +61 -242
- package/dist/DropdownMenu.cjs +4 -4
- package/dist/DropdownMenu.js +87 -149
- package/dist/EditableTable.cjs +10 -10
- package/dist/EditableTable.js +165 -331
- package/dist/{Facebook-BCqiOWZO.js → Facebook-BSWPEXjA.js} +1 -1
- package/dist/{Facebook-D9wwecSW.cjs → Facebook-DoKw-XxT.cjs} +1 -1
- package/dist/FaqSection.cjs +3 -3
- package/dist/FaqSection.js +119 -153
- package/dist/FileInput.cjs +7 -7
- package/dist/FileInput.js +66 -94
- package/dist/{FilePlayer-ktaNhf3p.js → FilePlayer-BtGpIWnK.js} +1 -1
- package/dist/{FilePlayer-DB6jnpeC.cjs → FilePlayer-D9az_lc_.cjs} +1 -1
- package/dist/FlexBox.cjs +6 -6
- package/dist/FlexBox.js +28 -63
- package/dist/FlexGrid.cjs +1 -1
- package/dist/FlexGrid.js +27 -67
- package/dist/FlexGridItem.cjs +6 -6
- package/dist/FlexGridItem.js +34 -62
- package/dist/Footer.cjs +1 -1
- package/dist/Footer.js +7 -15
- package/dist/FormField.cjs +7 -7
- package/dist/FormField.js +22 -47
- package/dist/FormView.cjs +6 -6
- package/dist/FormView.js +148 -195
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +1 -1
- package/dist/Grid.cjs +2 -2
- package/dist/Grid.js +40 -65
- package/dist/GridItem.cjs +2 -2
- package/dist/GridItem.js +47 -80
- package/dist/Header.cjs +1 -1
- package/dist/Header.js +7 -15
- package/dist/HelpBannerSection.cjs +3 -3
- package/dist/HelpBannerSection.js +9 -15
- package/dist/Icon.cjs +4 -4
- package/dist/Icon.js +29 -55
- package/dist/IconButton.cjs +9 -9
- package/dist/IconButton.js +89 -127
- package/dist/{Kaltura-CvlN0HDg.js → Kaltura-BDqlEQpd.js} +1 -1
- package/dist/{Kaltura-CCdXLzOa.cjs → Kaltura-CK6JHUZC.cjs} +1 -1
- package/dist/Kanban.cjs +7 -7
- package/dist/Kanban.js +2033 -2098
- package/dist/KanbanActionsToolbar.cjs +4 -5
- package/dist/KanbanActionsToolbar.js +61 -96
- package/dist/KanbanCard-B9V9EjVE.js +137 -0
- package/dist/KanbanCard-DihrKn-I.cjs +30 -0
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +2 -3
- package/dist/KanbanFooter.cjs +3 -3
- package/dist/KanbanFooter.js +37 -55
- package/dist/KanbanHeader.cjs +4 -4
- package/dist/KanbanHeader.js +49 -81
- package/dist/KanbanView.cjs +2 -2
- package/dist/KanbanView.js +106 -173
- package/dist/Link.cjs +7 -7
- package/dist/Link.js +20 -37
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +1 -1
- package/dist/MasonryGeneralCardsSection.js +1 -1
- package/dist/MenuItem.cjs +13 -13
- package/dist/MenuItem.js +101 -139
- package/dist/{Mixcloud-nG_VyBNt.cjs → Mixcloud-C1Boh2Bm.cjs} +1 -1
- package/dist/{Mixcloud-Bb8MTclI.js → Mixcloud-zAh6j7Ha.js} +1 -1
- package/dist/Modal.cjs +18 -19
- package/dist/Modal.js +131 -166
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +25 -196
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +27 -209
- package/dist/{Mux-DfYpGTiP.js → Mux-BGTG_Tvc.js} +1 -1
- package/dist/{Mux-BgB2a8kM.cjs → Mux-C6TwZeaq.cjs} +1 -1
- package/dist/NestedDropdownItem.cjs +3 -3
- package/dist/NestedDropdownItem.js +45 -67
- package/dist/NestedMenuItem.cjs +5 -5
- package/dist/NestedMenuItem.js +51 -78
- package/dist/NotificationContainer.cjs +10 -10
- package/dist/NotificationContainer.js +46 -79
- package/dist/NotificationMessage.cjs +2 -2
- package/dist/NotificationMessage.js +47 -64
- package/dist/NumberInput.cjs +23 -23
- package/dist/NumberInput.js +89 -149
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +20 -28
- package/dist/Pagination.cjs +3 -3
- package/dist/Pagination.js +102 -185
- package/dist/PartnerBrandsSection.cjs +62 -0
- package/dist/PartnerBrandsSection.js +154 -0
- package/dist/PartnerStatsSection.cjs +100 -0
- package/dist/PartnerStatsSection.js +124 -0
- package/dist/PasswordInput.cjs +23 -23
- package/dist/PasswordInput.js +108 -137
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.js +7 -32
- package/dist/PopoverContent.cjs +5 -5
- package/dist/PopoverContent.js +22 -28
- package/dist/PopoverTrigger.cjs +1 -1
- package/dist/PopoverTrigger.js +7 -12
- package/dist/ProductsWithBannerSection.cjs +1 -1
- package/dist/ProductsWithBannerSection.js +1 -1
- package/dist/ProgressBar.cjs +8 -8
- package/dist/ProgressBar.js +32 -59
- package/dist/RadioGroup.cjs +3 -3
- package/dist/RadioGroup.js +41 -72
- package/dist/RadioInput.cjs +28 -28
- package/dist/RadioInput.js +78 -123
- package/dist/RangeSlider.cjs +19 -19
- package/dist/RangeSlider.js +92 -119
- package/dist/ReviewsSection.cjs +13 -13
- package/dist/ReviewsSection.js +81 -101
- package/dist/SalesCampaignsSection.cjs +38 -28
- package/dist/SalesCampaignsSection.js +297 -325
- package/dist/SearchBar.cjs +10 -10
- package/dist/SearchBar.js +168 -188
- package/dist/SearchSection-B94YN_6P.cjs +161 -0
- package/dist/{SearchSection-DDQ_K98T.js → SearchSection-DAaMecR4.js} +337 -359
- package/dist/SearchSection.cjs +1 -1
- package/dist/SearchSection.js +2 -3
- package/dist/Separator.cjs +3 -3
- package/dist/Separator.js +14 -19
- package/dist/Sidebar.cjs +4 -5
- package/dist/Sidebar.js +33 -56
- package/dist/SimpleCategoriesSection.cjs +2 -2
- package/dist/SimpleCategoriesSection.js +2 -2
- package/dist/{SoundCloud-C86xwUG6.cjs → SoundCloud-C6R6E6Zc.cjs} +1 -1
- package/dist/{SoundCloud-DG91z39R.js → SoundCloud-lO8wg_0s.js} +1 -1
- package/dist/Spinner.cjs +18 -18
- package/dist/Spinner.js +37 -54
- package/dist/StatsSection.cjs +6 -6
- package/dist/StatsSection.js +15 -25
- package/dist/{Streamable-4uAnb3WN.cjs → Streamable-DZO95CiT.cjs} +1 -1
- package/dist/{Streamable-BAIWLgyD.js → Streamable-Dwa5ZEK4.js} +1 -1
- package/dist/Surface.cjs +4 -4
- package/dist/Surface.js +19 -34
- package/dist/SwipeableDrawer.cjs +8 -8
- package/dist/SwipeableDrawer.js +84 -136
- package/dist/TabItem.cjs +11 -11
- package/dist/TabItem.js +83 -118
- package/dist/Table.cjs +65 -65
- package/dist/Table.js +786 -1167
- package/dist/TableView.cjs +2 -2
- package/dist/TableView.js +113 -197
- package/dist/Tabs.cjs +4 -4
- package/dist/Tabs.js +41 -60
- package/dist/TextAreaInput.cjs +14 -14
- package/dist/TextAreaInput.js +131 -181
- package/dist/TextInput.cjs +23 -23
- package/dist/TextInput.js +78 -126
- package/dist/ThemeProvider.cjs +5 -5
- package/dist/ThemeProvider.js +35 -39
- package/dist/TimeInput.cjs +7 -7
- package/dist/TimeInput.js +46 -72
- package/dist/Toggle.cjs +20 -20
- package/dist/Toggle.js +78 -109
- package/dist/ToggleSection.cjs +5 -5
- package/dist/ToggleSection.js +48 -55
- package/dist/TreeMenu.cjs +5 -5
- package/dist/TreeMenu.js +43 -67
- package/dist/TreeMenuSeparator.cjs +3 -3
- package/dist/TreeMenuSeparator.js +12 -20
- package/dist/{Twitch-CVAj24ti.cjs → Twitch-B17oKtD0.cjs} +1 -1
- package/dist/{Twitch-DfXeW5Xs.js → Twitch-C73-dwWo.js} +1 -1
- package/dist/UploadedFile.cjs +11 -11
- package/dist/UploadedFile.js +73 -99
- package/dist/{Vidyard-De3pges0.js → Vidyard-B6GdBHsM.js} +1 -1
- package/dist/{Vidyard-DaCcaaH4.cjs → Vidyard-s1MMcaRm.cjs} +1 -1
- package/dist/{Vimeo-8wXdCXGs.cjs → Vimeo-J1l_SU2E.cjs} +1 -1
- package/dist/{Vimeo-N6I2qi_h.js → Vimeo-kzHz4Gco.js} +1 -1
- package/dist/{Wistia-BrUzHQoq.cjs → Wistia-CudQyDHM.cjs} +1 -1
- package/dist/{Wistia-dlV6n6tO.js → Wistia-w4jnqd7y.js} +1 -1
- package/dist/{YouTube-Cfsj4ZaP.cjs → YouTube-BAYKouHS.cjs} +1 -1
- package/dist/{YouTube-DNJxWqRm.js → YouTube-BKyipPZx.js} +1 -1
- package/dist/index-BdKi2ogu.js +39 -0
- package/dist/index-BppfjY8h.js +497 -0
- package/dist/index-CRk3vcd4.cjs +95 -0
- package/dist/index-CX2A-q39.cjs +4 -0
- package/dist/{index-CWALXP1T.js → index-CwMCk9wV.js} +118 -145
- package/dist/index-DeS-oqJB.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +25 -21
- package/dist/{style-CkcozOY6.cjs → style-B4kAj6YU.cjs} +38 -8
- package/dist/{style-Cmlod7oq.js → style-neMbLWE6.js} +42 -11
- package/dist/{tag-BtS5lWJ0.js → tag-Dm8CW4TM.js} +21 -27
- package/dist/{tag-CmeZsPQt.cjs → tag-UQjq2_Ba.cjs} +7 -7
- package/package.json +4 -2
- package/vite.config.js +8 -0
- package/dist/KanbanCard-68kSAXL6.js +0 -175
- package/dist/KanbanCard-BDvoqTDS.cjs +0 -30
- package/dist/SearchSection-BcbHP6QF.cjs +0 -161
- package/dist/index-Be-_NM9Q.cjs +0 -4
- package/dist/index-C0LcDEqa.js +0 -47
- package/dist/index-CSNxZFTX.cjs +0 -95
package/dist/DecimalInput.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { d as fe } from "./index-Dt62UGku.js";
|
|
1
|
+
import { jsxs as ae, jsx as U } from "react/jsx-runtime";
|
|
2
|
+
import O, { forwardRef as ie, useState as oe, useCallback as ne } from "react";
|
|
3
|
+
import { d as se } from "./index-Dt62UGku.js";
|
|
5
4
|
import { s as G } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
6
|
-
import { d as
|
|
7
|
-
import { u as
|
|
8
|
-
function
|
|
5
|
+
import { d as k, b as N, a as fe, e as ue, h as W, c as le } from "./utils-DtEfC-TX.js";
|
|
6
|
+
import { u as ce } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
|
+
function R() {
|
|
9
8
|
}
|
|
10
|
-
function
|
|
9
|
+
function pe() {
|
|
11
10
|
return !0;
|
|
12
11
|
}
|
|
13
|
-
function
|
|
12
|
+
function V(r) {
|
|
14
13
|
return !!(r || "").match(/\d/);
|
|
15
14
|
}
|
|
16
|
-
function
|
|
15
|
+
function z(r) {
|
|
17
16
|
return r == null;
|
|
18
17
|
}
|
|
19
|
-
function
|
|
18
|
+
function Z(r) {
|
|
20
19
|
return r.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function de(r) {
|
|
23
22
|
switch (r) {
|
|
24
23
|
case "lakh":
|
|
25
24
|
return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
|
|
@@ -30,92 +29,92 @@ function me(r) {
|
|
|
30
29
|
return /(\d)(?=(\d{3})+(?!\d))/g;
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
function
|
|
34
|
-
var e =
|
|
32
|
+
function me(r, s, l) {
|
|
33
|
+
var e = de(l), t = r.search(/[1-9]/);
|
|
35
34
|
return t = t === -1 ? r.length : t, r.substring(0, t) + r.substring(t, r.length).replace(e, "$1" + s);
|
|
36
35
|
}
|
|
37
|
-
function
|
|
36
|
+
function K(r, s) {
|
|
38
37
|
s === void 0 && (s = !0);
|
|
39
|
-
var
|
|
38
|
+
var l = r[0] === "-", e = l && s;
|
|
40
39
|
r = r.replace("-", "");
|
|
41
40
|
var t = r.split("."), a = t[0], o = t[1] || "";
|
|
42
41
|
return {
|
|
43
42
|
beforeDecimal: a,
|
|
44
43
|
afterDecimal: o,
|
|
45
|
-
hasNagation:
|
|
44
|
+
hasNagation: l,
|
|
46
45
|
addNegation: e
|
|
47
46
|
};
|
|
48
47
|
}
|
|
49
|
-
function
|
|
48
|
+
function he(r) {
|
|
50
49
|
if (!r)
|
|
51
50
|
return r;
|
|
52
51
|
var s = r[0] === "-";
|
|
53
52
|
s && (r = r.substring(1, r.length));
|
|
54
|
-
var
|
|
53
|
+
var l = r.split("."), e = l[0].replace(/^0+/, "") || "0", t = l[1] || "";
|
|
55
54
|
return (s ? "-" : "") + e + (t ? "." + t : "");
|
|
56
55
|
}
|
|
57
|
-
function
|
|
58
|
-
for (var e = "", t =
|
|
56
|
+
function J(r, s, l) {
|
|
57
|
+
for (var e = "", t = l ? "0" : "", a = 0; a <= s - 1; a++)
|
|
59
58
|
e += r[a] || t;
|
|
60
59
|
return e;
|
|
61
60
|
}
|
|
62
|
-
function
|
|
61
|
+
function _(r, s) {
|
|
63
62
|
return Array(s + 1).join(r);
|
|
64
63
|
}
|
|
65
64
|
function ve(r) {
|
|
66
65
|
r += "";
|
|
67
66
|
var s = r[0] === "-" ? "-" : "";
|
|
68
67
|
s && (r = r.substring(1));
|
|
69
|
-
var
|
|
68
|
+
var l = r.split(/[eE]/g), e = l[0], t = l[1];
|
|
70
69
|
if (t = Number(t), !t)
|
|
71
70
|
return s + e;
|
|
72
71
|
e = e.replace(".", "");
|
|
73
72
|
var a = 1 + t, o = e.length;
|
|
74
|
-
return a < 0 ? e = "0." +
|
|
73
|
+
return a < 0 ? e = "0." + _("0", Math.abs(a)) + e : a >= o ? e = e + _("0", a - o) : e = (e.substring(0, a) || "0") + "." + e.substring(a), s + e;
|
|
75
74
|
}
|
|
76
|
-
function
|
|
75
|
+
function ge(r, s, l) {
|
|
77
76
|
if (["", "-"].indexOf(r) !== -1)
|
|
78
77
|
return r;
|
|
79
|
-
var e = r.indexOf(".") !== -1 && s, t =
|
|
80
|
-
return m.length > x ? (Number(m[0]) + Number(
|
|
81
|
-
},
|
|
82
|
-
|
|
78
|
+
var e = r.indexOf(".") !== -1 && s, t = K(r), a = t.beforeDecimal, o = t.afterDecimal, f = t.hasNagation, i = parseFloat("0." + (o || "0")), n = o.length <= s ? "0." + o : i.toFixed(s), u = n.split("."), p = a.split("").reverse().reduce(function(m, g, x) {
|
|
79
|
+
return m.length > x ? (Number(m[0]) + Number(g)).toString() + m.substring(1, m.length) : g + m;
|
|
80
|
+
}, u[0]), c = J(
|
|
81
|
+
u[1] || "",
|
|
83
82
|
Math.min(s, o.length),
|
|
84
|
-
|
|
83
|
+
l
|
|
85
84
|
), d = f ? "-" : "", h = e ? "." : "";
|
|
86
85
|
return "" + d + p + h + c;
|
|
87
86
|
}
|
|
88
|
-
function
|
|
87
|
+
function q(r, s) {
|
|
89
88
|
if (r.value = r.value, r !== null) {
|
|
90
89
|
if (r.createTextRange) {
|
|
91
|
-
var
|
|
92
|
-
return
|
|
90
|
+
var l = r.createTextRange();
|
|
91
|
+
return l.move("character", s), l.select(), !0;
|
|
93
92
|
}
|
|
94
93
|
return r.selectionStart || r.selectionStart === 0 ? (r.focus(), r.setSelectionRange(s, s), !0) : (r.focus(), !1);
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
|
-
function
|
|
98
|
-
for (var
|
|
99
|
-
|
|
100
|
-
for (; r[t - 1 - e] === s[a - 1 - e] && a - e >
|
|
96
|
+
function Se(r, s) {
|
|
97
|
+
for (var l = 0, e = 0, t = r.length, a = s.length; r[l] === s[l] && l < t; )
|
|
98
|
+
l++;
|
|
99
|
+
for (; r[t - 1 - e] === s[a - 1 - e] && a - e > l && t - e > l; )
|
|
101
100
|
e++;
|
|
102
|
-
return { start:
|
|
101
|
+
return { start: l, end: t - e };
|
|
103
102
|
}
|
|
104
|
-
function
|
|
105
|
-
return Math.min(Math.max(r, s),
|
|
103
|
+
function L(r, s, l) {
|
|
104
|
+
return Math.min(Math.max(r, s), l);
|
|
106
105
|
}
|
|
107
|
-
function
|
|
106
|
+
function H(r) {
|
|
108
107
|
return Math.max(r.selectionStart, r.selectionEnd);
|
|
109
108
|
}
|
|
110
109
|
function xe(r) {
|
|
111
110
|
return r || typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
|
|
112
111
|
}
|
|
113
|
-
function
|
|
114
|
-
var
|
|
115
|
-
for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && s.indexOf(e) === -1 && (
|
|
116
|
-
return
|
|
112
|
+
function ye(r, s) {
|
|
113
|
+
var l = {};
|
|
114
|
+
for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && s.indexOf(e) === -1 && (l[e] = r[e]);
|
|
115
|
+
return l;
|
|
117
116
|
}
|
|
118
|
-
var
|
|
117
|
+
var be = {
|
|
119
118
|
displayType: "input",
|
|
120
119
|
decimalSeparator: ".",
|
|
121
120
|
thousandsGroupStyle: "thousand",
|
|
@@ -127,17 +126,17 @@ var Ne = {
|
|
|
127
126
|
allowLeadingZeros: !1,
|
|
128
127
|
isNumericString: !1,
|
|
129
128
|
type: "text",
|
|
130
|
-
onValueChange:
|
|
131
|
-
onChange:
|
|
132
|
-
onKeyDown:
|
|
133
|
-
onMouseUp:
|
|
134
|
-
onFocus:
|
|
135
|
-
onBlur:
|
|
136
|
-
isAllowed:
|
|
137
|
-
},
|
|
138
|
-
function s(
|
|
139
|
-
r.call(this,
|
|
140
|
-
var e =
|
|
129
|
+
onValueChange: R,
|
|
130
|
+
onChange: R,
|
|
131
|
+
onKeyDown: R,
|
|
132
|
+
onMouseUp: R,
|
|
133
|
+
onFocus: R,
|
|
134
|
+
onBlur: R,
|
|
135
|
+
isAllowed: pe
|
|
136
|
+
}, Q = /* @__PURE__ */ function(r) {
|
|
137
|
+
function s(l) {
|
|
138
|
+
r.call(this, l);
|
|
139
|
+
var e = l.defaultValue;
|
|
141
140
|
this.validateProps();
|
|
142
141
|
var t = this.formatValueProp(e);
|
|
143
142
|
this.state = {
|
|
@@ -161,10 +160,10 @@ var Ne = {
|
|
|
161
160
|
var t = this, a = t.props, o = t.state, f = t.focusedElm, i = o.value, n = o.numAsString;
|
|
162
161
|
if (n === void 0 && (n = ""), e !== a) {
|
|
163
162
|
this.validateProps();
|
|
164
|
-
var
|
|
163
|
+
var u = this.formatNumString(n), p = z(a.value) ? u : this.formatValueProp(), c = this.removeFormatting(p), d = parseFloat(c), h = parseFloat(n);
|
|
165
164
|
//while typing set state only when float value changes
|
|
166
165
|
((!isNaN(d) || !isNaN(h)) && d !== h || //can also set state when float value is same and the format props changes
|
|
167
|
-
|
|
166
|
+
u !== i || //set state always when not in focus and formatted value is changed
|
|
168
167
|
f === null && p !== i) && this.updateValue({
|
|
169
168
|
formattedValue: p,
|
|
170
169
|
numAsString: c,
|
|
@@ -177,12 +176,12 @@ var Ne = {
|
|
|
177
176
|
e === void 0 && (e = "");
|
|
178
177
|
var t = this.props, a = t.decimalScale, o = this.getSeparators(), f = o.decimalSeparator, i = this.getNumberRegex(!0), n = e[0] === "-";
|
|
179
178
|
n && (e = e.replace("-", "")), f && a === 0 && (e = e.split(f)[0]), e = (e.match(i) || []).join("").replace(f, ".");
|
|
180
|
-
var
|
|
181
|
-
return
|
|
179
|
+
var u = e.indexOf(".");
|
|
180
|
+
return u !== -1 && (e = e.substring(0, u) + "." + e.substring(u + 1, e.length).replace(new RegExp(Z(f), "g"), "")), n && (e = "-" + e), e;
|
|
182
181
|
}, s.prototype.getNumberRegex = function(e, t) {
|
|
183
|
-
var a = this.props, o = a.format, f = a.decimalScale, i = a.customNumerals, n = this.getSeparators(),
|
|
182
|
+
var a = this.props, o = a.format, f = a.decimalScale, i = a.customNumerals, n = this.getSeparators(), u = n.decimalSeparator;
|
|
184
183
|
return new RegExp(
|
|
185
|
-
"[0-9" + (i ? i.join("") : "") + "]" + (
|
|
184
|
+
"[0-9" + (i ? i.join("") : "") + "]" + (u && f !== 0 && !t && !o ? "|" + Z(u) : ""),
|
|
186
185
|
e ? "g" : void 0
|
|
187
186
|
);
|
|
188
187
|
}, s.prototype.getSeparators = function() {
|
|
@@ -218,30 +217,30 @@ var Ne = {
|
|
|
218
217
|
`);
|
|
219
218
|
}
|
|
220
219
|
}, s.prototype.setPatchedCaretPosition = function(e, t, a) {
|
|
221
|
-
|
|
222
|
-
e.value === a &&
|
|
220
|
+
q(e, t), this.caretPositionTimeout = setTimeout(function() {
|
|
221
|
+
e.value === a && q(e, t);
|
|
223
222
|
}, 0);
|
|
224
223
|
}, s.prototype.correctCaretPosition = function(e, t, a) {
|
|
225
224
|
var o = this.props, f = o.prefix, i = o.suffix, n = o.format;
|
|
226
225
|
if (e === "")
|
|
227
226
|
return 0;
|
|
228
|
-
if (t =
|
|
229
|
-
var
|
|
230
|
-
return
|
|
227
|
+
if (t = L(t, 0, e.length), !n) {
|
|
228
|
+
var u = e[0] === "-";
|
|
229
|
+
return L(t, f.length + (u ? 1 : 0), e.length - i.length);
|
|
231
230
|
}
|
|
232
|
-
if (typeof n == "function" || n[t] === "#" &&
|
|
231
|
+
if (typeof n == "function" || n[t] === "#" && V(e[t]) || n[t - 1] === "#" && V(e[t - 1]))
|
|
233
232
|
return t;
|
|
234
233
|
var p = n.indexOf("#"), c = n.lastIndexOf("#");
|
|
235
|
-
t =
|
|
236
|
-
for (var d = n.substring(t, n.length).indexOf("#"), h = t, m = t + (d === -1 ? 0 : d); h > p && (n[h] !== "#" || !
|
|
234
|
+
t = L(t, p, c + 1);
|
|
235
|
+
for (var d = n.substring(t, n.length).indexOf("#"), h = t, m = t + (d === -1 ? 0 : d); h > p && (n[h] !== "#" || !V(e[h])); )
|
|
237
236
|
h -= 1;
|
|
238
|
-
var
|
|
239
|
-
return
|
|
237
|
+
var g = !V(e[m]) || a === "left" && t !== p || t - h < m - t;
|
|
238
|
+
return g ? V(e[h]) ? h + 1 : h : m;
|
|
240
239
|
}, s.prototype.getCaretPosition = function(e, t, a) {
|
|
241
|
-
var o = this.props, f = o.format, i = this.state.value, n = this.getNumberRegex(!0),
|
|
240
|
+
var o = this.props, f = o.format, i = this.state.value, n = this.getNumberRegex(!0), u = (e.match(n) || []).join(""), p = (t.match(n) || []).join(""), c, d;
|
|
242
241
|
for (c = 0, d = 0; d < a; d++) {
|
|
243
242
|
var h = e[d] || "", m = t[c] || "";
|
|
244
|
-
if (!(!h.match(n) && h !== m) && !(h === "0" && m.match(n) && m !== "0" &&
|
|
243
|
+
if (!(!h.match(n) && h !== m) && !(h === "0" && m.match(n) && m !== "0" && u.length !== p.length)) {
|
|
245
244
|
for (; h !== t[c] && c < t.length; )
|
|
246
245
|
c++;
|
|
247
246
|
c++;
|
|
@@ -260,8 +259,8 @@ var Ne = {
|
|
|
260
259
|
}, s.prototype.removePatternFormatting = function(e) {
|
|
261
260
|
for (var t = this.props, a = t.format, o = a.split("#").filter(function(d) {
|
|
262
261
|
return d !== "";
|
|
263
|
-
}), f = 0, i = "", n = 0,
|
|
264
|
-
var p = o[n] || "", c = n ===
|
|
262
|
+
}), f = 0, i = "", n = 0, u = o.length; n <= u; n++) {
|
|
263
|
+
var p = o[n] || "", c = n === u ? e.length : e.indexOf(p, f);
|
|
265
264
|
if (c === -1) {
|
|
266
265
|
i = e;
|
|
267
266
|
break;
|
|
@@ -277,8 +276,8 @@ var Ne = {
|
|
|
277
276
|
a[i] === "#" && (f[i] = e[o] || this.getMaskAtIndex(o), o += 1);
|
|
278
277
|
return f.join("");
|
|
279
278
|
}, s.prototype.formatAsNumber = function(e) {
|
|
280
|
-
var t = this.props, a = t.decimalScale, o = t.fixedDecimalScale, f = t.prefix, i = t.suffix, n = t.allowNegative,
|
|
281
|
-
return a !== void 0 && (x =
|
|
279
|
+
var t = this.props, a = t.decimalScale, o = t.fixedDecimalScale, f = t.prefix, i = t.suffix, n = t.allowNegative, u = t.thousandsGroupStyle, p = this.getSeparators(), c = p.thousandSeparator, d = p.decimalSeparator, h = e.indexOf(".") !== -1 || a && o, m = K(e, n), g = m.beforeDecimal, x = m.afterDecimal, y = m.addNegation;
|
|
280
|
+
return a !== void 0 && (x = J(x, a, o)), c && (g = me(g, c, u)), f && (g = f + g), i && (x = x + i), y && (g = "-" + g), e = g + (h && d || "") + x, e;
|
|
282
281
|
}, s.prototype.formatNumString = function(e) {
|
|
283
282
|
e === void 0 && (e = "");
|
|
284
283
|
var t = this.props, a = t.format, o = t.allowEmptyFormatting, f = t.customNumerals, i = e;
|
|
@@ -286,20 +285,20 @@ var Ne = {
|
|
|
286
285
|
var n = new RegExp("[" + f.join("") + "]", "g");
|
|
287
286
|
i = e.replace(
|
|
288
287
|
n,
|
|
289
|
-
function(
|
|
290
|
-
return f.indexOf(
|
|
288
|
+
function(u) {
|
|
289
|
+
return f.indexOf(u).toString();
|
|
291
290
|
}
|
|
292
291
|
);
|
|
293
292
|
}
|
|
294
293
|
return e === "" && !o ? i = "" : e === "-" && !a ? i = "-" : typeof a == "string" ? i = this.formatWithPattern(i) : typeof a == "function" ? i = a(i) : i = this.formatAsNumber(i), i;
|
|
295
294
|
}, s.prototype.formatValueProp = function(e) {
|
|
296
|
-
var t = this.props, a = t.format, o = t.decimalScale, f = t.fixedDecimalScale, i = t.allowEmptyFormatting, n = this.props,
|
|
297
|
-
|
|
298
|
-
var c = !
|
|
299
|
-
if (c && i && (
|
|
295
|
+
var t = this.props, a = t.format, o = t.decimalScale, f = t.fixedDecimalScale, i = t.allowEmptyFormatting, n = this.props, u = n.value, p = n.isNumericString;
|
|
296
|
+
u = z(u) ? e : u;
|
|
297
|
+
var c = !u && u !== 0;
|
|
298
|
+
if (c && i && (u = ""), c && !i)
|
|
300
299
|
return "";
|
|
301
|
-
typeof
|
|
302
|
-
var d = p ? this.formatNumString(
|
|
300
|
+
typeof u == "number" && (u = ve(u), p = !0), u === "Infinity" && p && (u = ""), p && !a && typeof o == "number" && (u = ge(u, o, f));
|
|
301
|
+
var d = p ? this.formatNumString(u) : this.formatInput(u);
|
|
303
302
|
return d;
|
|
304
303
|
}, s.prototype.formatNegation = function(e) {
|
|
305
304
|
e === void 0 && (e = "");
|
|
@@ -310,65 +309,65 @@ var Ne = {
|
|
|
310
309
|
var t = this.props, a = t.format;
|
|
311
310
|
return a || (e = this.removePrefixAndSuffix(e), e = this.formatNegation(e)), e = this.removeFormatting(e), this.formatNumString(e);
|
|
312
311
|
}, s.prototype.isCharacterAFormat = function(e, t) {
|
|
313
|
-
var a = this.props, o = a.format, f = a.prefix, i = a.suffix, n = a.decimalScale,
|
|
314
|
-
return !!(typeof o == "string" && o[e] !== "#" || !o && (e < f.length || e >= t.length - i.length || n &&
|
|
312
|
+
var a = this.props, o = a.format, f = a.prefix, i = a.suffix, n = a.decimalScale, u = a.fixedDecimalScale, p = this.getSeparators(), c = p.decimalSeparator;
|
|
313
|
+
return !!(typeof o == "string" && o[e] !== "#" || !o && (e < f.length || e >= t.length - i.length || n && u && t[e] === c));
|
|
315
314
|
}, s.prototype.correctInputValue = function(e, t, a) {
|
|
316
|
-
var o = this, f = this.props, i = f.format, n = f.allowNegative,
|
|
317
|
-
if (!i &&
|
|
318
|
-
var
|
|
319
|
-
return a.substr(0,
|
|
315
|
+
var o = this, f = this.props, i = f.format, n = f.allowNegative, u = f.prefix, p = f.suffix, c = f.decimalScale, d = this.getSeparators(), h = d.allowedDecimalSeparators, m = d.decimalSeparator, g = this.state.numAsString || "", x = this.selectionBeforeInput, y = x.selectionStart, w = x.selectionEnd, F = Se(t, a), v = F.start, b = F.end;
|
|
316
|
+
if (!i && v === b && h.indexOf(a[y]) !== -1) {
|
|
317
|
+
var P = c === 0 ? "" : m;
|
|
318
|
+
return a.substr(0, y) + P + a.substr(y + 1, a.length);
|
|
320
319
|
}
|
|
321
|
-
var
|
|
320
|
+
var A = i ? 0 : u.length, E = t.length - (i ? 0 : p.length);
|
|
322
321
|
if (
|
|
323
322
|
// don't do anything if something got added
|
|
324
323
|
a.length > t.length || // or if the new value is an empty string
|
|
325
324
|
!a.length || // or if nothing has changed, in which case start will be same as end
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
325
|
+
v === b || // or in case if whole input is selected and new value is typed
|
|
326
|
+
y === 0 && w === t.length || // or in case if the whole content is replaced by browser, example (autocomplete)
|
|
327
|
+
v === 0 && b === t.length || // or if charcters between prefix and suffix is selected.
|
|
329
328
|
// For numeric inputs we apply the format so, prefix and suffix can be ignored
|
|
330
|
-
|
|
329
|
+
y === A && w === E
|
|
331
330
|
)
|
|
332
331
|
return a;
|
|
333
|
-
var
|
|
334
|
-
function(
|
|
335
|
-
return o.isCharacterAFormat(
|
|
332
|
+
var T = t.substr(v, b - v), B = !![].concat(T).find(
|
|
333
|
+
function(C, I) {
|
|
334
|
+
return o.isCharacterAFormat(I + v, t);
|
|
336
335
|
}
|
|
337
336
|
);
|
|
338
|
-
if (
|
|
339
|
-
var
|
|
340
|
-
[].concat(
|
|
341
|
-
o.isCharacterAFormat(
|
|
342
|
-
}), Object.keys(
|
|
343
|
-
|
|
344
|
-
}), a = t.substr(0,
|
|
337
|
+
if (B) {
|
|
338
|
+
var M = t.substr(v), $ = {}, S = [];
|
|
339
|
+
[].concat(M).forEach(function(C, I) {
|
|
340
|
+
o.isCharacterAFormat(I + v, t) ? $[I] = C : I > T.length - 1 && S.push(C);
|
|
341
|
+
}), Object.keys($).forEach(function(C) {
|
|
342
|
+
S.length > C ? S.splice(C, 0, $[C]) : S.push($[C]);
|
|
343
|
+
}), a = t.substr(0, v) + S.join("");
|
|
345
344
|
}
|
|
346
345
|
if (!i) {
|
|
347
|
-
var
|
|
348
|
-
|
|
346
|
+
var D = this.removeFormatting(a), j = K(
|
|
347
|
+
D,
|
|
349
348
|
n
|
|
350
|
-
),
|
|
351
|
-
if (
|
|
352
|
-
return
|
|
349
|
+
), Y = j.beforeDecimal, ee = j.afterDecimal, te = j.addNegation, re = e < a.indexOf(m) + 1;
|
|
350
|
+
if (D.length < g.length && re && Y === "" && !parseFloat(ee))
|
|
351
|
+
return te ? "-" : "";
|
|
353
352
|
}
|
|
354
353
|
return a;
|
|
355
354
|
}, s.prototype.updateValue = function(e) {
|
|
356
355
|
var t = e.formattedValue, a = e.input, o = e.setCaretPosition;
|
|
357
356
|
o === void 0 && (o = !0);
|
|
358
|
-
var f = e.source, i = e.event, n = e.numAsString,
|
|
357
|
+
var f = e.source, i = e.event, n = e.numAsString, u = e.caretPos, p = this.props, c = p.onValueChange, d = this.state, h = d.value;
|
|
359
358
|
if (a) {
|
|
360
|
-
if (
|
|
361
|
-
var m = e.inputValue || a.value,
|
|
362
|
-
a.value = t,
|
|
359
|
+
if (u === void 0 && o) {
|
|
360
|
+
var m = e.inputValue || a.value, g = H(a);
|
|
361
|
+
a.value = t, u = this.getCaretPosition(m, t, g);
|
|
363
362
|
}
|
|
364
|
-
a.value = t, o && this.setPatchedCaretPosition(a,
|
|
363
|
+
a.value = t, o && this.setPatchedCaretPosition(a, u, t);
|
|
365
364
|
}
|
|
366
365
|
n === void 0 && (n = this.removeFormatting(t)), t !== h && (this.setState({ value: t, numAsString: n }), c(this.getValueObject(t, n), { event: i, source: f }));
|
|
367
366
|
}, s.prototype.onChange = function(e) {
|
|
368
|
-
var t = e.target, a = t.value, o = this, f = o.state, i = o.props, n = i.isAllowed,
|
|
369
|
-
a = this.correctInputValue(p,
|
|
367
|
+
var t = e.target, a = t.value, o = this, f = o.state, i = o.props, n = i.isAllowed, u = f.value || "", p = H(t);
|
|
368
|
+
a = this.correctInputValue(p, u, a);
|
|
370
369
|
var c = this.formatInput(a) || "", d = this.removeFormatting(c), h = this.getValueObject(c, d), m = n(h);
|
|
371
|
-
m || (c =
|
|
370
|
+
m || (c = u), this.updateValue({
|
|
372
371
|
formattedValue: c,
|
|
373
372
|
numAsString: d,
|
|
374
373
|
inputValue: a,
|
|
@@ -377,14 +376,14 @@ var Ne = {
|
|
|
377
376
|
source: "event"
|
|
378
377
|
}), m && i.onChange(e);
|
|
379
378
|
}, s.prototype.onBlur = function(e) {
|
|
380
|
-
var t = this, a = t.props, o = t.state, f = a.format, i = a.onBlur, n = a.allowLeadingZeros,
|
|
379
|
+
var t = this, a = t.props, o = t.state, f = a.format, i = a.onBlur, n = a.allowLeadingZeros, u = o.numAsString, p = o.value;
|
|
381
380
|
if (this.focusedElm = null, clearTimeout(this.focusTimeout), clearTimeout(this.caretPositionTimeout), !f) {
|
|
382
|
-
isNaN(parseFloat(
|
|
383
|
-
var c = this.formatNumString(
|
|
381
|
+
isNaN(parseFloat(u)) && (u = ""), n || (u = he(u));
|
|
382
|
+
var c = this.formatNumString(u);
|
|
384
383
|
if (c !== p) {
|
|
385
384
|
this.updateValue({
|
|
386
385
|
formattedValue: c,
|
|
387
|
-
numAsString:
|
|
386
|
+
numAsString: u,
|
|
388
387
|
input: e.target,
|
|
389
388
|
setCaretPosition: !1,
|
|
390
389
|
event: e,
|
|
@@ -397,38 +396,38 @@ var Ne = {
|
|
|
397
396
|
}, s.prototype.onKeyDown = function(e) {
|
|
398
397
|
var t = e.target, a = e.key, o = t.selectionStart, f = t.selectionEnd, i = t.value;
|
|
399
398
|
i === void 0 && (i = "");
|
|
400
|
-
var n,
|
|
399
|
+
var n, u = this.props, p = u.decimalScale, c = u.fixedDecimalScale, d = u.prefix, h = u.suffix, m = u.format, g = u.onKeyDown, x = p !== void 0 && c, y = this.getNumberRegex(!1, x), w = new RegExp("-"), F = typeof m == "string";
|
|
401
400
|
if (this.selectionBeforeInput = {
|
|
402
401
|
selectionStart: o,
|
|
403
402
|
selectionEnd: f
|
|
404
403
|
}, a === "ArrowLeft" || a === "Backspace" ? n = o - 1 : a === "ArrowRight" ? n = o + 1 : a === "Delete" && (n = o), n === void 0 || o !== f) {
|
|
405
|
-
|
|
404
|
+
g(e);
|
|
406
405
|
return;
|
|
407
406
|
}
|
|
408
|
-
var
|
|
407
|
+
var v = n, b = F ? m.indexOf("#") : d.length, P = F ? m.lastIndexOf("#") + 1 : i.length - h.length;
|
|
409
408
|
if (a === "ArrowLeft" || a === "ArrowRight") {
|
|
410
|
-
var
|
|
411
|
-
|
|
412
|
-
} else if (a === "Delete" && !
|
|
413
|
-
for (; !
|
|
414
|
-
|
|
415
|
-
else if (a === "Backspace" && !
|
|
416
|
-
if (o <=
|
|
417
|
-
var
|
|
409
|
+
var A = a === "ArrowLeft" ? "left" : "right";
|
|
410
|
+
v = this.correctCaretPosition(i, n, A);
|
|
411
|
+
} else if (a === "Delete" && !y.test(i[n]) && !w.test(i[n]))
|
|
412
|
+
for (; !y.test(i[v]) && v < P; )
|
|
413
|
+
v++;
|
|
414
|
+
else if (a === "Backspace" && !y.test(i[n])) {
|
|
415
|
+
if (o <= b + 1 && i[0] === "-" && typeof m > "u") {
|
|
416
|
+
var E = i.substring(1);
|
|
418
417
|
this.updateValue({
|
|
419
|
-
formattedValue:
|
|
420
|
-
caretPos:
|
|
418
|
+
formattedValue: E,
|
|
419
|
+
caretPos: v,
|
|
421
420
|
input: t,
|
|
422
421
|
event: e,
|
|
423
422
|
source: "event"
|
|
424
423
|
});
|
|
425
|
-
} else if (!
|
|
426
|
-
for (; !
|
|
427
|
-
|
|
428
|
-
|
|
424
|
+
} else if (!w.test(i[n])) {
|
|
425
|
+
for (; !y.test(i[v - 1]) && v > b; )
|
|
426
|
+
v--;
|
|
427
|
+
v = this.correctCaretPosition(i, v, "left");
|
|
429
428
|
}
|
|
430
429
|
}
|
|
431
|
-
(
|
|
430
|
+
(v !== n || n < b || n > P) && (e.preventDefault(), this.setPatchedCaretPosition(t, v, i)), e.isUnitTestRun && this.setPatchedCaretPosition(t, v, i), g(e);
|
|
432
431
|
}, s.prototype.onMouseUp = function(e) {
|
|
433
432
|
var t = e.target, a = t.selectionStart, o = t.selectionEnd, f = t.value;
|
|
434
433
|
if (f === void 0 && (f = ""), a === o) {
|
|
@@ -447,7 +446,7 @@ var Ne = {
|
|
|
447
446
|
}, s.prototype.render = function() {
|
|
448
447
|
var e = this.props, t = e.type, a = e.displayType, o = e.customInput, f = e.renderText, i = e.getInputRef, n = e.format;
|
|
449
448
|
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
|
|
449
|
+
var u = ye(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 = u, c = this.state, d = c.value, h = c.mounted, m = h && xe(n) ? "numeric" : void 0, g = Object.assign({ inputMode: m }, p, {
|
|
451
450
|
type: t,
|
|
452
451
|
value: d,
|
|
453
452
|
onChange: this.onChange,
|
|
@@ -457,26 +456,26 @@ var Ne = {
|
|
|
457
456
|
onBlur: this.onBlur
|
|
458
457
|
});
|
|
459
458
|
if (a === "text")
|
|
460
|
-
return f ? f(d, p) || null :
|
|
459
|
+
return f ? f(d, p) || null : O.createElement(
|
|
461
460
|
"span",
|
|
462
461
|
Object.assign({}, p, { ref: i }),
|
|
463
462
|
d
|
|
464
463
|
);
|
|
465
464
|
if (o) {
|
|
466
465
|
var x = o;
|
|
467
|
-
return
|
|
466
|
+
return O.createElement(x, Object.assign({}, g, { ref: i }));
|
|
468
467
|
}
|
|
469
|
-
return
|
|
468
|
+
return O.createElement("input", Object.assign({}, g, { ref: i }));
|
|
470
469
|
}, s;
|
|
471
|
-
}(
|
|
472
|
-
|
|
473
|
-
const
|
|
470
|
+
}(O.Component);
|
|
471
|
+
Q.defaultProps = be;
|
|
472
|
+
const Ne = G.div`
|
|
474
473
|
display: flex;
|
|
475
474
|
align-items: center;
|
|
476
475
|
|
|
477
|
-
min-height: ${(r) =>
|
|
478
|
-
max-height: ${(r) =>
|
|
479
|
-
background-color: ${(r) =>
|
|
476
|
+
min-height: ${(r) => k(r.theme, r.size)};
|
|
477
|
+
max-height: ${(r) => k(r.theme, r.size)};
|
|
478
|
+
background-color: ${(r) => N(
|
|
480
479
|
r.theme,
|
|
481
480
|
"Input",
|
|
482
481
|
r.color,
|
|
@@ -484,18 +483,18 @@ const we = G.div`
|
|
|
484
483
|
"background"
|
|
485
484
|
)};
|
|
486
485
|
border: 1px solid
|
|
487
|
-
${(r) =>
|
|
486
|
+
${(r) => N(
|
|
488
487
|
r.theme,
|
|
489
488
|
"Input",
|
|
490
489
|
r.focused === !0 ? "primary" : r.color,
|
|
491
490
|
"enabled",
|
|
492
491
|
"border"
|
|
493
492
|
)};
|
|
494
|
-
border-radius: ${(r) =>
|
|
493
|
+
border-radius: ${(r) => fe(r.theme, "regular")};
|
|
495
494
|
|
|
496
495
|
${(r) => r.focused === !0 && r.readOnly !== !0 ? ue(r.theme) : ""}
|
|
497
496
|
/* ${(r) => r.isDisabled === !0 ? W(r.theme) : ""} */
|
|
498
|
-
${(r) => r.isDisabled === !0 && `background-color: ${
|
|
497
|
+
${(r) => r.isDisabled === !0 && `background-color: ${N(
|
|
499
498
|
r.theme,
|
|
500
499
|
"Input",
|
|
501
500
|
r.color,
|
|
@@ -503,14 +502,14 @@ const we = G.div`
|
|
|
503
502
|
"background",
|
|
504
503
|
"backgroundOpacity"
|
|
505
504
|
)};
|
|
506
|
-
color: ${(s) =>
|
|
505
|
+
color: ${(s) => N(
|
|
507
506
|
s.theme,
|
|
508
507
|
"Input",
|
|
509
508
|
s.color,
|
|
510
509
|
"disabled",
|
|
511
510
|
"text"
|
|
512
511
|
)};`}
|
|
513
|
-
${(r) => r.isDisabled === !0 ? "border: 1px solid " +
|
|
512
|
+
${(r) => r.isDisabled === !0 ? "border: 1px solid " + N(
|
|
514
513
|
r.theme,
|
|
515
514
|
"Input",
|
|
516
515
|
r.color,
|
|
@@ -526,24 +525,24 @@ const we = G.div`
|
|
|
526
525
|
padding-bottom: 0.625rem;
|
|
527
526
|
width: 100%;
|
|
528
527
|
|
|
529
|
-
${(r) =>
|
|
530
|
-
min-height: ${(r) =>
|
|
531
|
-
max-height: ${(r) =>
|
|
532
|
-
color: ${(r) =>
|
|
528
|
+
${(r) => le(r.theme, "Input", r.size, "enabled")}
|
|
529
|
+
min-height: ${(r) => k(r.theme, r.size)};
|
|
530
|
+
max-height: ${(r) => k(r.theme, r.size)};
|
|
531
|
+
color: ${(r) => N(
|
|
533
532
|
r.theme,
|
|
534
533
|
"Input",
|
|
535
534
|
r.focused === !0 ? "primary" : r.color,
|
|
536
535
|
"enabled",
|
|
537
536
|
"text"
|
|
538
537
|
)};
|
|
539
|
-
caret-color: ${(r) =>
|
|
538
|
+
caret-color: ${(r) => N(r.theme, "Input", r.color, "enabled", "caret")};
|
|
540
539
|
padding-right: ${(r) => r.suffix ? "0" : "0.75rem"};
|
|
541
540
|
padding-left: ${(r) => r.prefix ? "0" : "0.75rem"};
|
|
542
541
|
}
|
|
543
542
|
|
|
544
543
|
& input:disabled {
|
|
545
544
|
/* ${(r) => W(r.theme)} */
|
|
546
|
-
${(r) => `background-color: ${
|
|
545
|
+
${(r) => `background-color: ${N(
|
|
547
546
|
r.theme,
|
|
548
547
|
"Input",
|
|
549
548
|
r.color,
|
|
@@ -551,7 +550,7 @@ const we = G.div`
|
|
|
551
550
|
"background",
|
|
552
551
|
"backgroundOpacity"
|
|
553
552
|
)};
|
|
554
|
-
color: ${(s) =>
|
|
553
|
+
color: ${(s) => N(
|
|
555
554
|
s.theme,
|
|
556
555
|
"Input",
|
|
557
556
|
s.color,
|
|
@@ -566,7 +565,7 @@ const we = G.div`
|
|
|
566
565
|
}
|
|
567
566
|
|
|
568
567
|
& input::placeholder {
|
|
569
|
-
color: ${(r) =>
|
|
568
|
+
color: ${(r) => N(
|
|
570
569
|
r.theme,
|
|
571
570
|
"Input",
|
|
572
571
|
r.color,
|
|
@@ -574,18 +573,18 @@ const we = G.div`
|
|
|
574
573
|
"placeholder"
|
|
575
574
|
)};
|
|
576
575
|
}
|
|
577
|
-
`,
|
|
576
|
+
`, X = G.span`
|
|
578
577
|
padding: 0 12px;
|
|
579
|
-
color: ${(r) =>
|
|
578
|
+
color: ${(r) => N(
|
|
580
579
|
r.theme,
|
|
581
580
|
"Input",
|
|
582
581
|
r.focused === !0 ? "primary" : r.color,
|
|
583
582
|
"enabled",
|
|
584
583
|
"prefix"
|
|
585
584
|
)};
|
|
586
|
-
`,
|
|
585
|
+
`, we = G(X)``, Ae = ie((r, s) => {
|
|
587
586
|
const {
|
|
588
|
-
disabled:
|
|
587
|
+
disabled: l,
|
|
589
588
|
readOnly: e,
|
|
590
589
|
debounceTime: t = 0,
|
|
591
590
|
prefix: a,
|
|
@@ -593,7 +592,7 @@ const we = G.div`
|
|
|
593
592
|
thousandSeparator: f = ".",
|
|
594
593
|
decimalSeparator: i = ",",
|
|
595
594
|
decimalScale: n = 2,
|
|
596
|
-
fixedDecimalScale:
|
|
595
|
+
fixedDecimalScale: u = !0,
|
|
597
596
|
allowNegative: p = !0,
|
|
598
597
|
//----------------
|
|
599
598
|
onChange: c,
|
|
@@ -601,71 +600,71 @@ const we = G.div`
|
|
|
601
600
|
onFocus: h,
|
|
602
601
|
onInputChange: m,
|
|
603
602
|
//----------------
|
|
604
|
-
className:
|
|
603
|
+
className: g = "",
|
|
605
604
|
style: x = {},
|
|
606
|
-
size:
|
|
607
|
-
color:
|
|
605
|
+
size: y = "small",
|
|
606
|
+
color: w = "primary",
|
|
608
607
|
...F
|
|
609
|
-
} = r,
|
|
610
|
-
|
|
608
|
+
} = r, v = ce(), [b, P] = oe(!1), A = ne(
|
|
609
|
+
se((S, D) => E(S, D), t),
|
|
611
610
|
[c]
|
|
612
|
-
),
|
|
613
|
-
c && (c == null || c(
|
|
614
|
-
},
|
|
615
|
-
|
|
616
|
-
},
|
|
617
|
-
|
|
618
|
-
},
|
|
619
|
-
|
|
611
|
+
), E = (S, D) => {
|
|
612
|
+
c && (c == null || c(S, D)), m == null || m(S, D);
|
|
613
|
+
}, T = (S, D) => {
|
|
614
|
+
A(D.event, S == null ? void 0 : S.floatValue);
|
|
615
|
+
}, B = () => n < 0 ? 0 : n > 17 ? 17 : n, M = (S) => {
|
|
616
|
+
P(!0), h == null || h(S);
|
|
617
|
+
}, $ = (S) => {
|
|
618
|
+
P(!1), d == null || d(S);
|
|
620
619
|
};
|
|
621
|
-
return /* @__PURE__ */
|
|
622
|
-
|
|
620
|
+
return /* @__PURE__ */ ae(
|
|
621
|
+
Ne,
|
|
623
622
|
{
|
|
624
623
|
style: x,
|
|
625
|
-
className:
|
|
626
|
-
theme:
|
|
627
|
-
color:
|
|
628
|
-
size:
|
|
624
|
+
className: g,
|
|
625
|
+
theme: v,
|
|
626
|
+
color: w,
|
|
627
|
+
size: y,
|
|
629
628
|
prefix: a,
|
|
630
629
|
suffix: o,
|
|
631
|
-
focused:
|
|
632
|
-
disabled:
|
|
630
|
+
focused: b,
|
|
631
|
+
disabled: l,
|
|
633
632
|
readOnly: e,
|
|
634
633
|
children: [
|
|
635
|
-
a && /* @__PURE__ */
|
|
636
|
-
|
|
634
|
+
a && /* @__PURE__ */ U(
|
|
635
|
+
X,
|
|
637
636
|
{
|
|
638
|
-
theme:
|
|
639
|
-
color:
|
|
640
|
-
focused:
|
|
637
|
+
theme: v,
|
|
638
|
+
color: w,
|
|
639
|
+
focused: b,
|
|
641
640
|
className: "lnc-input-prefix",
|
|
642
641
|
children: a
|
|
643
642
|
}
|
|
644
643
|
),
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
|
|
644
|
+
/* @__PURE__ */ U(
|
|
645
|
+
Q,
|
|
647
646
|
{
|
|
648
647
|
getInputRef: s,
|
|
649
648
|
className: "lnc-decimal-input",
|
|
650
|
-
disabled:
|
|
649
|
+
disabled: l,
|
|
651
650
|
readOnly: e,
|
|
652
651
|
thousandSeparator: f,
|
|
653
652
|
decimalSeparator: i,
|
|
654
|
-
decimalScale:
|
|
655
|
-
fixedDecimalScale:
|
|
653
|
+
decimalScale: B(),
|
|
654
|
+
fixedDecimalScale: u,
|
|
656
655
|
allowNegative: p,
|
|
657
|
-
onFocus:
|
|
658
|
-
onBlur:
|
|
659
|
-
onValueChange:
|
|
656
|
+
onFocus: M,
|
|
657
|
+
onBlur: $,
|
|
658
|
+
onValueChange: T,
|
|
660
659
|
...F
|
|
661
660
|
}
|
|
662
661
|
),
|
|
663
|
-
o && /* @__PURE__ */
|
|
664
|
-
|
|
662
|
+
o && /* @__PURE__ */ U(
|
|
663
|
+
we,
|
|
665
664
|
{
|
|
666
|
-
theme:
|
|
667
|
-
color:
|
|
668
|
-
focused:
|
|
665
|
+
theme: v,
|
|
666
|
+
color: w,
|
|
667
|
+
focused: b,
|
|
669
668
|
className: "lnc-input-suffix",
|
|
670
669
|
children: o
|
|
671
670
|
}
|
|
@@ -674,58 +673,6 @@ const we = G.div`
|
|
|
674
673
|
}
|
|
675
674
|
);
|
|
676
675
|
});
|
|
677
|
-
Ce.propTypes = {
|
|
678
|
-
id: v.any,
|
|
679
|
-
value: v.any,
|
|
680
|
-
defaultValue: v.any,
|
|
681
|
-
disabled: v.bool,
|
|
682
|
-
readOnly: v.bool,
|
|
683
|
-
debounceTime: v.number,
|
|
684
|
-
/**
|
|
685
|
-
* Reserved space before input. Intented to be used with plain text or `Icon` component.
|
|
686
|
-
*/
|
|
687
|
-
prefix: v.oneOfType([v.string, v.element]),
|
|
688
|
-
/**
|
|
689
|
-
* Reserved space after input. Intented to be used with plain text or `Icon` component.
|
|
690
|
-
*/
|
|
691
|
-
suffix: v.oneOfType([v.string, v.element]),
|
|
692
|
-
thousandSeparator: v.oneOf([".", ",", " "]),
|
|
693
|
-
decimalSeparator: v.oneOf([".", ","]),
|
|
694
|
-
decimalScale: v.number,
|
|
695
|
-
fixedDecimalScale: v.bool,
|
|
696
|
-
allowNegative: v.bool,
|
|
697
|
-
//----------------
|
|
698
|
-
/**
|
|
699
|
-
* `(event, value) => void`
|
|
700
|
-
*/
|
|
701
|
-
onChange: v.func,
|
|
702
|
-
/**
|
|
703
|
-
* `(event, value) => void`
|
|
704
|
-
*/
|
|
705
|
-
onInputChange: v.func,
|
|
706
|
-
/**
|
|
707
|
-
* `(event) => void`
|
|
708
|
-
*/
|
|
709
|
-
onBlur: v.func,
|
|
710
|
-
/**
|
|
711
|
-
* `(event) => void`
|
|
712
|
-
*/
|
|
713
|
-
onFocus: v.func,
|
|
714
|
-
//----------------
|
|
715
|
-
className: v.string,
|
|
716
|
-
style: v.object,
|
|
717
|
-
size: v.oneOf(["small", "medium", "large"]),
|
|
718
|
-
color: v.oneOf([
|
|
719
|
-
"primary",
|
|
720
|
-
"secondary",
|
|
721
|
-
"success",
|
|
722
|
-
"danger",
|
|
723
|
-
"warning",
|
|
724
|
-
"information",
|
|
725
|
-
"neutral",
|
|
726
|
-
"gray"
|
|
727
|
-
])
|
|
728
|
-
};
|
|
729
676
|
export {
|
|
730
|
-
|
|
677
|
+
Ae as default
|
|
731
678
|
};
|