@lanaco/lnc-react-ui 4.0.105 → 4.0.106
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 +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +1 -1
- package/dist/ActionsToolbar.cjs +1 -1
- package/dist/ActionsToolbar.js +1 -1
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Badge.cjs +1 -1
- package/dist/Badge.js +1 -1
- package/dist/BannerSectionCarousel.cjs +1 -1
- package/dist/BannerSectionCarousel.js +1 -1
- package/dist/BannerSectionWithList.cjs +1 -1
- package/dist/BannerSectionWithList.js +1 -1
- package/dist/BlogCardsSponsoredSection.cjs +1 -1
- package/dist/BlogCardsSponsoredSection.js +3 -3
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogListSection.cjs +1 -1
- package/dist/BlogListSection.js +3 -3
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +2 -2
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +2 -2
- package/dist/BlogsSectionDetailed.cjs +1 -1
- package/dist/BlogsSectionDetailed.js +3 -3
- package/dist/BlogsSectionLarge.cjs +1 -1
- package/dist/BlogsSectionLarge.js +2 -2
- package/dist/BlogsSectionSimple.cjs +1 -1
- package/dist/BlogsSectionSimple.js +3 -3
- package/dist/BlogsSectionSimpleCentered.cjs +1 -1
- package/dist/BlogsSectionSimpleCentered.js +2 -2
- package/dist/BlogsSectionWithFilters.cjs +1 -1
- package/dist/BlogsSectionWithFilters.js +4 -4
- package/dist/BrandHitsSection.cjs +1 -1
- package/dist/BrandHitsSection.js +1 -1
- package/dist/Breadcrumbs.cjs +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Button.cjs +6 -4
- package/dist/Button.js +12 -3
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/CalorieCalculatorSection.cjs +1 -1
- package/dist/CalorieCalculatorSection.js +1 -1
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +1 -1
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ColorInput.cjs +10 -6
- package/dist/ColorInput.js +117 -87
- package/dist/ConfirmationForm.cjs +1 -1
- package/dist/ConfirmationForm.js +1 -1
- package/dist/CustomLoanMapSection.cjs +1 -1
- package/dist/CustomLoanMapSection.js +1 -1
- package/dist/{CustomStyles-DYULk9y7.js → CustomStyles-Dd8IsVV6.js} +1 -1
- package/dist/{CustomStyles-Uqkz9jDo.cjs → CustomStyles-DtKDPOdk.cjs} +1 -1
- package/dist/DateInput.cjs +1 -1
- package/dist/DateInput.js +1 -1
- package/dist/DecimalInput.cjs +28 -24
- package/dist/DecimalInput.js +315 -285
- package/dist/DecimalInputV2.cjs +23 -19
- package/dist/DecimalInputV2.js +124 -94
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +4 -4
- package/dist/DetailsView.cjs +1 -1
- package/dist/DetailsView.js +1 -1
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +1 -1
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +1 -1
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +1 -1
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +2 -2
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +1 -1
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +1 -1
- package/dist/DropdownMenu.cjs +1 -1
- package/dist/DropdownMenu.js +1 -1
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +1 -1
- package/dist/FeedbackSection.cjs +1 -1
- package/dist/FeedbackSection.js +1 -1
- package/dist/FieldOfInterestsMasonrySection.cjs +1 -1
- package/dist/FieldOfInterestsMasonrySection.js +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +2 -2
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithTagsCardsSection.js +1 -1
- package/dist/FileInput.cjs +25 -20
- package/dist/FileInput.js +86 -55
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +1 -1
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +1 -1
- package/dist/FormView.cjs +1 -1
- package/dist/FormView.js +1 -1
- package/dist/GeneralWithTagsCardsSection.cjs +1 -1
- package/dist/GeneralWithTagsCardsSection.js +1 -1
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +2 -2
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +1 -1
- package/dist/IconButton.cjs +1 -1
- package/dist/IconButton.js +1 -1
- package/dist/Kanban.cjs +1 -1
- package/dist/Kanban.js +1 -1
- package/dist/KanbanActionsToolbar.cjs +1 -1
- package/dist/KanbanActionsToolbar.js +1 -1
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +1 -1
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +1 -1
- package/dist/LoanCalculatorSection.cjs +1 -1
- package/dist/LoanCalculatorSection.js +1 -1
- package/dist/LocationFinderSection.cjs +1 -1
- package/dist/LocationFinderSection.js +1 -1
- 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 +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +1 -1
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +1 -1
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +1 -1
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +1 -1
- package/dist/NestedMenuItem.cjs +1 -1
- package/dist/NestedMenuItem.js +1 -1
- package/dist/NotificationContainer.cjs +1 -1
- package/dist/NotificationContainer.js +1 -1
- package/dist/NotificationMessage.cjs +1 -1
- package/dist/NotificationMessage.js +1 -1
- package/dist/NumberInput.cjs +23 -19
- package/dist/NumberInput.js +116 -86
- package/dist/OverlayGeneralCardsSection.cjs +1 -1
- package/dist/OverlayGeneralCardsSection.js +2 -2
- package/dist/PasswordInput.cjs +23 -19
- package/dist/PasswordInput.js +94 -64
- package/dist/PopoverContent.cjs +1 -1
- package/dist/PopoverContent.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +1 -1
- package/dist/ProductsWithBannerSection.js +3 -3
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/QuattroCardsSection.cjs +1 -1
- package/dist/QuattroCardsSection.js +1 -1
- package/dist/QuizSection.cjs +1 -1
- package/dist/QuizSection.js +1 -1
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +1 -1
- package/dist/RangeSlider.cjs +8 -8
- package/dist/RangeSlider.js +19 -17
- package/dist/ReviewsSection.cjs +1 -1
- package/dist/ReviewsSection.js +2 -2
- package/dist/SalesCampaignsSection.cjs +1 -1
- package/dist/SalesCampaignsSection.js +1 -1
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +1 -1
- package/dist/ShopCardsSection.cjs +1 -1
- package/dist/ShopCardsSection.js +2 -2
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +3 -3
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +2 -2
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Surface.cjs +1 -1
- package/dist/Surface.js +1 -1
- package/dist/SwipeableDrawer.cjs +1 -1
- package/dist/SwipeableDrawer.js +1 -1
- package/dist/TabItem.cjs +1 -1
- package/dist/TabItem.js +1 -1
- package/dist/Table.cjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/TableView.cjs +1 -1
- package/dist/TableView.js +1 -1
- package/dist/TextAreaInput.cjs +15 -12
- package/dist/TextAreaInput.js +70 -54
- package/dist/TextInput.cjs +23 -19
- package/dist/TextInput.js +90 -60
- package/dist/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider.js +1 -1
- package/dist/TimeInput.cjs +7 -5
- package/dist/TimeInput.js +47 -32
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/TreeMenuSeparator.cjs +1 -1
- package/dist/TreeMenuSeparator.js +1 -1
- package/dist/UploadedFile.cjs +1 -1
- package/dist/UploadedFile.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{index-C4gGt12B.cjs → index-B30K8mkW.cjs} +1 -1
- package/dist/{index-Kx8irvHH.js → index-BBMleFo5.js} +1 -1
- package/dist/{index-BRgZcjpI.cjs → index-BvSNRLNa.cjs} +1 -1
- package/dist/{index-C_T-BQ5p.cjs → index-C1DkD2ug.cjs} +1 -1
- package/dist/{index-DMysapsB.cjs → index-C9GK00PM.cjs} +1 -1
- package/dist/{index-Dcw6ecHw.js → index-CEI_JOki.js} +2 -2
- package/dist/{index-BPgWhA1t.js → index-CQLF61YV.js} +1 -1
- package/dist/{index-Cru8Sd2q.js → index-CTJpJFtr.js} +2 -2
- package/dist/{index-DZDz9qZP.cjs → index-Cg4t3q_p.cjs} +1 -1
- package/dist/{index-D86vS9UF.js → index-YGcWbzeb.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{skeleton-BrUEdt6Z.js → skeleton-CkTNgaA3.js} +2 -2
- package/dist/{skeleton-BcaMeKFQ.cjs → skeleton-CoErfoMc.cjs} +1 -1
- package/dist/{skeleton-TrselJrj.js → skeleton-DWZNwK33.js} +1 -1
- package/dist/{skeleton-DwZzdFei.cjs → skeleton-DdlE-y3C.cjs} +1 -1
- package/dist/{style-LEmcTrN9.js → style-08foMKSd.js} +1 -1
- package/dist/{style-Bjk6yHcP.cjs → style-JqDQj4jh.cjs} +1 -1
- package/dist/{suspense-categories-card-simple-B2swGa6t.cjs → suspense-categories-card-simple-B5zd-nnm.cjs} +1 -1
- package/dist/{suspense-categories-card-simple-BCn3U1cz.js → suspense-categories-card-simple-Ds6hXZKt.js} +1 -1
- package/dist/{suspense-large-DgzTM-qh.js → suspense-large-BM9s_kZP.js} +1 -1
- package/dist/{suspense-large-DMhn-lIG.cjs → suspense-large-CtcwWswP.cjs} +1 -1
- package/dist/{suspense-product-card-detailed-BNOhu3Z4.cjs → suspense-product-card-detailed-DXwya4fQ.cjs} +1 -1
- package/dist/{suspense-product-card-detailed-BDkww9pS.js → suspense-product-card-detailed-bYBpLiXc.js} +2 -2
- package/dist/{suspense-product-card-simple-BxDjW7gR.cjs → suspense-product-card-simple-Ba1UPqgy.cjs} +1 -1
- package/dist/{suspense-product-card-simple-CQ1qPZOa.js → suspense-product-card-simple-ib6FLerL.js} +1 -1
- package/dist/{utils-BXCGNjIy.js → utils-BbgAIA9N.js} +51 -13
- package/dist/utils-CZynEOC_.cjs +51 -0
- package/package.json +1 -1
- package/dist/utils-BWzf4vLl.cjs +0 -51
package/dist/NumberInput.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as q, jsx as
|
|
2
|
-
import { P as
|
|
3
|
-
import { forwardRef as H, useRef as J, useState as
|
|
1
|
+
import { jsxs as q, jsx as $ } from "react/jsx-runtime";
|
|
2
|
+
import { P as t } from "./index-S5Cd7WrG.js";
|
|
3
|
+
import { forwardRef as H, useRef as J, useState as D, useEffect as L, useCallback as Q } from "react";
|
|
4
4
|
import { d as Y } from "./index-CkWvbrVT.js";
|
|
5
|
-
import { s as
|
|
6
|
-
import { d, b as
|
|
5
|
+
import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
6
|
+
import { d as s, b as l, a as Z, e as v, h as F, c as ee } from "./utils-BbgAIA9N.js";
|
|
7
7
|
import { u as ae } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
8
|
-
const
|
|
8
|
+
const te = m.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
|
|
12
|
-
min-height: ${(e) =>
|
|
13
|
-
max-height: ${(e) =>
|
|
14
|
-
background-color: ${(e) =>
|
|
12
|
+
min-height: ${(e) => s(e.theme, e.size)};
|
|
13
|
+
max-height: ${(e) => s(e.theme, e.size)};
|
|
14
|
+
background-color: ${(e) => l(
|
|
15
15
|
e.theme,
|
|
16
16
|
"Input",
|
|
17
17
|
e.color,
|
|
@@ -19,7 +19,7 @@ const re = c.div`
|
|
|
19
19
|
"background"
|
|
20
20
|
)};
|
|
21
21
|
border: 1px solid
|
|
22
|
-
${(e) =>
|
|
22
|
+
${(e) => l(
|
|
23
23
|
e.theme,
|
|
24
24
|
"Input",
|
|
25
25
|
e.focused === !0 ? "primary" : e.color,
|
|
@@ -29,17 +29,32 @@ const re = c.div`
|
|
|
29
29
|
border-radius: ${(e) => Z(e.theme, "regular")};
|
|
30
30
|
|
|
31
31
|
${(e) => e.focused && e.readOnly !== !0 ? v(e.theme) : ""}
|
|
32
|
-
${(e) => e.disabled === !0 ?
|
|
33
|
-
|
|
32
|
+
/* ${(e) => e.disabled === !0 ? F(e.theme) : ""} */
|
|
33
|
+
${(e) => e.disabled === !0 && `background-color: ${l(
|
|
34
|
+
e.theme,
|
|
35
|
+
"Input",
|
|
36
|
+
e.color,
|
|
37
|
+
"disabled",
|
|
38
|
+
"background",
|
|
39
|
+
"backgroundOpacity"
|
|
40
|
+
)};
|
|
41
|
+
color: ${(r) => l(
|
|
42
|
+
r.theme,
|
|
43
|
+
"Input",
|
|
44
|
+
r.color,
|
|
45
|
+
"disabled",
|
|
46
|
+
"text"
|
|
47
|
+
)};`}
|
|
48
|
+
`, w = m.span`
|
|
34
49
|
padding: 0 12px;
|
|
35
|
-
color: ${(e) =>
|
|
50
|
+
color: ${(e) => l(
|
|
36
51
|
e.theme,
|
|
37
52
|
"Input",
|
|
38
53
|
e.focused === !0 ? "primary" : e.color,
|
|
39
54
|
"enabled",
|
|
40
55
|
"prefix"
|
|
41
56
|
)};
|
|
42
|
-
`,
|
|
57
|
+
`, le = m(w)``, re = m.input`
|
|
43
58
|
background: none;
|
|
44
59
|
border: none;
|
|
45
60
|
outline: none;
|
|
@@ -48,21 +63,21 @@ const re = c.div`
|
|
|
48
63
|
width: 100%;
|
|
49
64
|
|
|
50
65
|
${(e) => ee(e.theme, "Input", e.size, "enabled")}
|
|
51
|
-
min-height: ${(e) =>
|
|
52
|
-
max-height: ${(e) =>
|
|
53
|
-
color: ${(e) =>
|
|
66
|
+
min-height: ${(e) => s(e.theme, e.size)};
|
|
67
|
+
max-height: ${(e) => s(e.theme, e.size)};
|
|
68
|
+
color: ${(e) => l(
|
|
54
69
|
e.theme,
|
|
55
70
|
"Input",
|
|
56
71
|
e.focused === !0 ? "primary" : e.color,
|
|
57
72
|
"enabled",
|
|
58
73
|
"text"
|
|
59
74
|
)};
|
|
60
|
-
caret-color: ${(e) =>
|
|
75
|
+
caret-color: ${(e) => l(e.theme, "Input", e.color, "enabled", "caret")};
|
|
61
76
|
padding-right: ${(e) => e.suffix ? "0" : "0.75rem"};
|
|
62
77
|
padding-left: ${(e) => e.prefix ? "0" : "0.75rem"};
|
|
63
78
|
|
|
64
79
|
&::placeholder {
|
|
65
|
-
color: ${(e) =>
|
|
80
|
+
color: ${(e) => l(
|
|
66
81
|
e.theme,
|
|
67
82
|
"Input",
|
|
68
83
|
e.color,
|
|
@@ -76,79 +91,94 @@ const re = c.div`
|
|
|
76
91
|
}
|
|
77
92
|
|
|
78
93
|
&:disabled {
|
|
79
|
-
${(e) =>
|
|
94
|
+
/* ${(e) => F(e.theme)} */
|
|
95
|
+
${(e) => `background-color: ${l(
|
|
96
|
+
e.theme,
|
|
97
|
+
"Input",
|
|
98
|
+
e.color,
|
|
99
|
+
"disabled",
|
|
100
|
+
"background",
|
|
101
|
+
"backgroundOpacity"
|
|
102
|
+
)};
|
|
103
|
+
color: ${(r) => l(
|
|
104
|
+
r.theme,
|
|
105
|
+
"Input",
|
|
106
|
+
r.color,
|
|
107
|
+
"disabled",
|
|
108
|
+
"text"
|
|
109
|
+
)};`}
|
|
80
110
|
background: none;
|
|
81
111
|
}
|
|
82
|
-
`, ne = H((e,
|
|
112
|
+
`, ne = H((e, r) => {
|
|
83
113
|
const {
|
|
84
|
-
disabled:
|
|
85
|
-
readOnly:
|
|
114
|
+
disabled: I,
|
|
115
|
+
readOnly: k,
|
|
86
116
|
debounceTime: B = 0,
|
|
87
117
|
step: P = 1,
|
|
88
118
|
min: _ = Number.MIN_SAFE_INTEGER,
|
|
89
119
|
max: j = Number.MAX_SAFE_INTEGER,
|
|
90
|
-
prefix:
|
|
91
|
-
suffix:
|
|
120
|
+
prefix: f,
|
|
121
|
+
suffix: h,
|
|
92
122
|
placeholder: A,
|
|
93
|
-
value:
|
|
123
|
+
value: n,
|
|
94
124
|
defaultValue: C,
|
|
95
125
|
//----------------
|
|
96
126
|
onChange: u,
|
|
97
|
-
onBlur:
|
|
127
|
+
onBlur: b,
|
|
98
128
|
onFocus: g,
|
|
99
|
-
onKeyDown:
|
|
100
|
-
maxDecimalPlaces:
|
|
129
|
+
onKeyDown: y,
|
|
130
|
+
maxDecimalPlaces: O,
|
|
101
131
|
//----------------
|
|
102
132
|
className: W = "",
|
|
103
133
|
style: G = {},
|
|
104
134
|
size: N = "small",
|
|
105
|
-
color:
|
|
135
|
+
color: d = "primary",
|
|
106
136
|
...K
|
|
107
|
-
} = e, i = ae(),
|
|
137
|
+
} = e, i = ae(), c = J(n || C || ""), [M, S] = D(n || C || ""), [x, T] = D(!1);
|
|
108
138
|
L(() => {
|
|
109
|
-
|
|
110
|
-
}, [
|
|
139
|
+
n != null && (c.current = n, S(c.current));
|
|
140
|
+
}, [n]);
|
|
111
141
|
const U = Q(
|
|
112
|
-
Y((a,
|
|
142
|
+
Y((a, o) => X(a, o), B),
|
|
113
143
|
[u]
|
|
114
|
-
), X = (a,
|
|
115
|
-
u && (u == null || u(a,
|
|
144
|
+
), X = (a, o) => {
|
|
145
|
+
u && (u == null || u(a, o));
|
|
116
146
|
};
|
|
117
147
|
return /* @__PURE__ */ q(
|
|
118
|
-
|
|
148
|
+
te,
|
|
119
149
|
{
|
|
120
150
|
style: G,
|
|
121
151
|
className: W,
|
|
122
152
|
theme: i,
|
|
123
|
-
color:
|
|
153
|
+
color: d,
|
|
124
154
|
size: N,
|
|
125
|
-
focused:
|
|
126
|
-
disabled:
|
|
127
|
-
readOnly:
|
|
155
|
+
focused: x,
|
|
156
|
+
disabled: I,
|
|
157
|
+
readOnly: k,
|
|
128
158
|
children: [
|
|
129
|
-
|
|
130
|
-
|
|
159
|
+
f && /* @__PURE__ */ $(
|
|
160
|
+
w,
|
|
131
161
|
{
|
|
132
162
|
theme: i,
|
|
133
|
-
color:
|
|
134
|
-
focused:
|
|
163
|
+
color: d,
|
|
164
|
+
focused: x,
|
|
135
165
|
className: "lnc-input-prefix",
|
|
136
|
-
children:
|
|
166
|
+
children: f
|
|
137
167
|
}
|
|
138
168
|
),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
169
|
+
/* @__PURE__ */ $(
|
|
170
|
+
re,
|
|
141
171
|
{
|
|
142
|
-
ref:
|
|
172
|
+
ref: r,
|
|
143
173
|
type: "number",
|
|
144
174
|
theme: i,
|
|
145
|
-
color:
|
|
175
|
+
color: d,
|
|
146
176
|
size: N,
|
|
147
177
|
placeholder: A,
|
|
148
|
-
prefix:
|
|
149
|
-
suffix:
|
|
150
|
-
disabled:
|
|
151
|
-
readOnly:
|
|
178
|
+
prefix: f,
|
|
179
|
+
suffix: h,
|
|
180
|
+
disabled: I,
|
|
181
|
+
readOnly: k,
|
|
152
182
|
step: P,
|
|
153
183
|
min: _,
|
|
154
184
|
max: j,
|
|
@@ -157,30 +187,30 @@ const re = c.div`
|
|
|
157
187
|
T(!0), g == null || g(a);
|
|
158
188
|
},
|
|
159
189
|
onBlur: (a) => {
|
|
160
|
-
T(!1),
|
|
190
|
+
T(!1), b == null || b(a);
|
|
161
191
|
},
|
|
162
192
|
onChange: (a) => {
|
|
163
|
-
|
|
193
|
+
c.current = a.target.value, S(c.current), U(a, a.target.value);
|
|
164
194
|
},
|
|
165
195
|
onKeyDown: (a) => {
|
|
166
|
-
var
|
|
167
|
-
if (((V = (
|
|
168
|
-
const p = (
|
|
169
|
-
(p == null ? void 0 : p.length) >=
|
|
196
|
+
var o, V, z, E, R;
|
|
197
|
+
if (((V = (o = a == null ? void 0 : a.target) == null ? void 0 : o.value) == null ? void 0 : V.length) > 0 && (a.key === "+" || a.key === "-") && a.preventDefault(), ((z = a == null ? void 0 : a.target) == null ? void 0 : z.value) === "" && (a.key === "+" || a.key === "-") && (a.target.value = a.key), (E = a == null ? void 0 : a.target) != null && E.value.includes(".") && O) {
|
|
198
|
+
const p = (R = a == null ? void 0 : a.target) == null ? void 0 : R.value.split(".")[1];
|
|
199
|
+
(p == null ? void 0 : p.length) >= O && a.preventDefault();
|
|
170
200
|
}
|
|
171
|
-
|
|
201
|
+
y == null || y(a);
|
|
172
202
|
},
|
|
173
203
|
...K
|
|
174
204
|
}
|
|
175
205
|
),
|
|
176
|
-
|
|
177
|
-
|
|
206
|
+
h && /* @__PURE__ */ $(
|
|
207
|
+
le,
|
|
178
208
|
{
|
|
179
209
|
theme: i,
|
|
180
|
-
color:
|
|
181
|
-
focused:
|
|
210
|
+
color: d,
|
|
211
|
+
focused: x,
|
|
182
212
|
className: "lnc-input-suffix",
|
|
183
|
-
children:
|
|
213
|
+
children: h
|
|
184
214
|
}
|
|
185
215
|
)
|
|
186
216
|
]
|
|
@@ -188,54 +218,54 @@ const re = c.div`
|
|
|
188
218
|
);
|
|
189
219
|
});
|
|
190
220
|
ne.propTypes = {
|
|
191
|
-
id:
|
|
192
|
-
value:
|
|
193
|
-
defaultValue:
|
|
194
|
-
disabled:
|
|
195
|
-
readOnly:
|
|
221
|
+
id: t.any,
|
|
222
|
+
value: t.any,
|
|
223
|
+
defaultValue: t.any,
|
|
224
|
+
disabled: t.bool,
|
|
225
|
+
readOnly: t.bool,
|
|
196
226
|
/**
|
|
197
227
|
* Time in miliseconds before onChange event fires after it has been triggered.
|
|
198
228
|
*/
|
|
199
|
-
debounceTime:
|
|
229
|
+
debounceTime: t.number,
|
|
200
230
|
/**
|
|
201
231
|
* The amount that is added to the current value in the input if its incremented using the arrows/spinners.
|
|
202
232
|
*/
|
|
203
|
-
step:
|
|
233
|
+
step: t.number,
|
|
204
234
|
/**
|
|
205
235
|
* Minimum number value user can input.
|
|
206
236
|
*/
|
|
207
|
-
min:
|
|
237
|
+
min: t.number,
|
|
208
238
|
/**
|
|
209
239
|
* Maximum number value user can input.
|
|
210
240
|
*/
|
|
211
|
-
max:
|
|
241
|
+
max: t.number,
|
|
212
242
|
/**
|
|
213
243
|
* Reserved space before input. Intented to be used with plain text or `Icon` component.
|
|
214
244
|
*/
|
|
215
|
-
prefix:
|
|
245
|
+
prefix: t.oneOfType([t.string, t.element]),
|
|
216
246
|
/**
|
|
217
247
|
* Reserved space after input. Intented to be used with plain text or `Icon` component.
|
|
218
248
|
*/
|
|
219
|
-
suffix:
|
|
220
|
-
placeholder:
|
|
221
|
-
tabIndex:
|
|
249
|
+
suffix: t.oneOfType([t.string, t.element]),
|
|
250
|
+
placeholder: t.string,
|
|
251
|
+
tabIndex: t.number,
|
|
222
252
|
/**
|
|
223
253
|
* `(event, value) => void`
|
|
224
254
|
*/
|
|
225
|
-
onChange:
|
|
255
|
+
onChange: t.func,
|
|
226
256
|
/**
|
|
227
257
|
* `(event) => void`
|
|
228
258
|
*/
|
|
229
|
-
onBlur:
|
|
259
|
+
onBlur: t.func,
|
|
230
260
|
/**
|
|
231
261
|
* `(event) => void`
|
|
232
262
|
*/
|
|
233
|
-
onFocus:
|
|
263
|
+
onFocus: t.func,
|
|
234
264
|
//----------------
|
|
235
|
-
className:
|
|
236
|
-
style:
|
|
237
|
-
size:
|
|
238
|
-
color:
|
|
265
|
+
className: t.string,
|
|
266
|
+
style: t.object,
|
|
267
|
+
size: t.oneOf(["small", "medium", "large"]),
|
|
268
|
+
color: t.oneOf([
|
|
239
269
|
"primary",
|
|
240
270
|
"secondary",
|
|
241
271
|
"success",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),l=require("react"),x=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),p=require("./style-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),l=require("react"),x=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),p=require("./style-JqDQj4jh.cjs"),u=require("./utils-CZynEOC_.cjs"),f=require("./Button.cjs"),v=require("./ThemeProvider.cjs"),j=x.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${n=>`repeat(${n.limit}, auto)`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -2,8 +2,8 @@ import { jsx as r, Fragment as p, jsxs as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as g, Suspense as m } from "react";
|
|
3
3
|
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as h } from "./consts-BuFChS64.js";
|
|
5
|
-
import { R as v } from "./style-
|
|
6
|
-
import { p as x, o as y, k } from "./utils-
|
|
5
|
+
import { R as v } from "./style-08foMKSd.js";
|
|
6
|
+
import { p as x, o as y, k } from "./utils-BbgAIA9N.js";
|
|
7
7
|
import w from "./Button.js";
|
|
8
8
|
import { useTheme as b } from "./ThemeProvider.js";
|
|
9
9
|
const $ = f.div`
|
package/dist/PasswordInput.cjs
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const u=require("react/jsx-runtime"),a=require("react"),r=require("./index-BPVoEhTF.cjs"),L=require("./index-DaiUAQVF.cjs"),D=require("./Icon.cjs"),h=require("./emotion-styled.browser.esm-BtEseadx.cjs"),o=require("./utils-CZynEOC_.cjs"),A=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),G=h.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
|
|
5
|
-
min-height: ${e=>
|
|
6
|
-
max-height: ${e=>
|
|
7
|
-
background-color: ${e=>
|
|
5
|
+
min-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
|
|
6
|
+
max-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
|
|
7
|
+
background-color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
|
|
8
8
|
border: 1px solid
|
|
9
|
-
${e=>
|
|
10
|
-
border-radius: ${e=>
|
|
9
|
+
${e=>o.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,e.disabled===!0?"disabled":"enabled","border")};
|
|
10
|
+
border-radius: ${e=>o.getBorderRadiusValueWithUnits(e.theme,"regular")};
|
|
11
11
|
|
|
12
|
-
${e=>e.focused&&e.readOnly!==!0?
|
|
13
|
-
${e=>e.disabled===!0?
|
|
14
|
-
|
|
12
|
+
${e=>e.focused&&e.readOnly!==!0?o.getOutlineCss(e.theme):""}
|
|
13
|
+
/* ${e=>e.disabled===!0?o.getDisabledStateCss(e.theme):""} */
|
|
14
|
+
${e=>e.disabled===!0&&`background-color: ${o.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
|
|
15
|
+
color: ${n=>o.getColorRgbaValue(n.theme,"Input",n.color,"disabled","text")};`}
|
|
16
|
+
`,$=h.styled.span`
|
|
15
17
|
padding: 0 12px;
|
|
16
|
-
color: ${e=>
|
|
17
|
-
`,H=h.styled(
|
|
18
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","prefix")};
|
|
19
|
+
`,H=h.styled($)``,J=h.styled($)`
|
|
18
20
|
cursor: pointer;
|
|
19
21
|
`,K=h.styled.input`
|
|
20
22
|
background: none;
|
|
@@ -24,16 +26,16 @@
|
|
|
24
26
|
padding-bottom: 0.625rem;
|
|
25
27
|
width: 100%;
|
|
26
28
|
|
|
27
|
-
${e=>
|
|
28
|
-
min-height: ${e=>
|
|
29
|
-
max-height: ${e=>
|
|
30
|
-
color: ${e=>
|
|
31
|
-
caret-color: ${e=>
|
|
29
|
+
${e=>o.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")}
|
|
30
|
+
min-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
|
|
31
|
+
max-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
|
|
32
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","text")};
|
|
33
|
+
caret-color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.color,"enabled","caret")};
|
|
32
34
|
padding-right: ${e=>e.suffix?"0":"0.75rem"};
|
|
33
35
|
padding-left: ${e=>e.prefix?"0":"0.75rem"};
|
|
34
36
|
|
|
35
37
|
&::placeholder {
|
|
36
|
-
color: ${e=>
|
|
38
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.color,"enabled","placeholder")};
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
&:read-only {
|
|
@@ -41,7 +43,9 @@
|
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
&:disabled {
|
|
44
|
-
${e=>
|
|
46
|
+
/* ${e=>o.getDisabledStateCss(e.theme)} */
|
|
47
|
+
${e=>`background-color: ${o.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
|
|
48
|
+
color: ${n=>o.getColorRgbaValue(n.theme,"Input",n.color,"disabled","text")};`}
|
|
45
49
|
background: none;
|
|
46
50
|
}
|
|
47
|
-
`,V=
|
|
51
|
+
`,V=a.forwardRef((e,n)=>{const{wrapperRef:k,disabled:C,readOnly:T,debounceTime:R=0,placeholder:z,prefix:y,suffix:f,value:c,defaultValue:v,onChange:d,onBlur:p,onFocus:x,className:O="",style:j={},size:I="small",color:i="primary",...q}=e,l=a.useRef(),g=A.useTheme(),[w,P]=a.useState(c||v||"");a.useEffect(()=>{c!=null&&P(c)},[c]);const[m,W]=a.useState(!0),[b,S]=a.useState(!1);a.useEffect(()=>{var s;const t=((s=l==null?void 0:l.current)==null?void 0:s.value)||"";l.current.selectionStart=t!=null&&t.length?t.length:0,l.current.selectionEnd=t!=null&&t.length?t.length:0},[m]),a.useEffect(()=>{n!=null&&(n.current=l.current)},[n,l]);const E=a.useCallback(L.debounce((t,s)=>U(t,s),R),[d]),U=(t,s)=>{d&&(d==null||d(t,s))},F=t=>{P(t.target.value),E(t,t.target.value)},N=()=>{W(!m),l.current.focus()},_=t=>{S(!0),x==null||x(t)},B=t=>{S(!1),p==null||p(t)};return u.jsxs(G,{ref:k,style:j,className:O,theme:g,color:i,size:I,focused:b,disabled:C,readOnly:T,children:[y&&u.jsx($,{theme:g,color:i,focused:b,className:"lnc-input-prefix",children:y}),u.jsx(K,{ref:l,type:m?"password":"text",theme:g,color:i,size:I,placeholder:z,prefix:y,suffix:f,disabled:C,readOnly:T,focused:b,onFocus:_,onBlur:B,onChange:F,value:w,...q}),u.jsx(J,{theme:g,color:i,focused:b,onClick:N,children:u.jsx(D,{icon:m?"eye-slash":"eye"})}),f&&u.jsx(H,{theme:g,color:i,focused:b,className:"lnc-input-suffix",children:f})]})});V.propTypes={id:r.PropTypes.any,value:r.PropTypes.string,defaultValue:r.PropTypes.string,disabled:r.PropTypes.bool,readOnly:r.PropTypes.bool,debounceTime:r.PropTypes.number,placeholder:r.PropTypes.string,tabIndex:r.PropTypes.number,onChange:r.PropTypes.func,onBlur:r.PropTypes.func,onFocus:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,size:r.PropTypes.oneOf(["small","medium","large"]),color:r.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=V;
|