@lanaco/lnc-react-ui 4.0.198 → 4.0.200
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/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +12 -14
- package/dist/BlogExploreSection.cjs +1 -1
- package/dist/BlogExploreSection.js +1 -1
- package/dist/BlogsSectionWithFilters.cjs +1 -1
- package/dist/BlogsSectionWithFilters.js +1 -1
- 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 +1 -1
- 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/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/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/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 +19 -19
- package/dist/SalesCampaignsSection.js +283 -324
- 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 +1 -1
- package/dist/SimpleCategoriesSection.js +1 -1
- 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 +6 -5
- package/dist/ToggleSection.js +49 -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-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.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/{tag-BtS5lWJ0.js → tag-Dm8CW4TM.js} +21 -27
- package/dist/{tag-CmeZsPQt.cjs → tag-UQjq2_Ba.cjs} +7 -7
- package/package.json +1 -1
- 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/TextAreaInput.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { _ as te
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const oe = X.div`
|
|
1
|
+
import { jsx as k } from "react/jsx-runtime";
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import E, { forwardRef as U, useState as H, useEffect as I, useCallback as G } from "react";
|
|
4
|
+
import { d as Y } from "./index-Dt62UGku.js";
|
|
5
|
+
import { s as q } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
6
|
+
import { c as D, d as X, b as p, a as Z, e as J, h as K } from "./utils-DtEfC-TX.js";
|
|
7
|
+
import { _ as Q, u as ee } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
8
|
+
import { _ as te } from "./objectWithoutPropertiesLoose-DhwSMsjf.js";
|
|
9
|
+
import { i as re } from "./use-isomorphic-layout-effect.browser.esm-DERp5kr6.js";
|
|
10
|
+
const ne = q.div`
|
|
12
11
|
& textarea {
|
|
13
|
-
${(e) =>
|
|
14
|
-
min-height: ${(e) =>
|
|
15
|
-
background-color: ${(e) =>
|
|
12
|
+
${(e) => D(e.theme, "Input", e.size, "enabled")}
|
|
13
|
+
min-height: ${(e) => X(e.theme, e.size)};
|
|
14
|
+
background-color: ${(e) => p(
|
|
16
15
|
e.theme,
|
|
17
16
|
"Input",
|
|
18
17
|
e.color,
|
|
@@ -20,22 +19,22 @@ const oe = X.div`
|
|
|
20
19
|
"background"
|
|
21
20
|
)};
|
|
22
21
|
border: 1px solid
|
|
23
|
-
${(e) =>
|
|
22
|
+
${(e) => p(
|
|
24
23
|
e.theme,
|
|
25
24
|
"Input",
|
|
26
25
|
e.focused === !0 ? "primary" : e.color,
|
|
27
26
|
e.disabled === !0 ? "disabled" : "enabled",
|
|
28
27
|
"border"
|
|
29
28
|
)};
|
|
30
|
-
border-radius: ${(e) =>
|
|
31
|
-
color: ${(e) =>
|
|
29
|
+
border-radius: ${(e) => Z(e.theme, "regular")};
|
|
30
|
+
color: ${(e) => p(
|
|
32
31
|
e.theme,
|
|
33
32
|
"Input",
|
|
34
33
|
e.focused === !0 ? "primary" : e.color,
|
|
35
34
|
"enabled",
|
|
36
35
|
"text"
|
|
37
36
|
)};
|
|
38
|
-
caret-color: ${(e) =>
|
|
37
|
+
caret-color: ${(e) => p(e.theme, "Input", e.color, "enabled", "caret")};
|
|
39
38
|
overflow: ${(e) => e.collapseOnBlur && e.focused === !1 ? "hidden" : "auto"};
|
|
40
39
|
transition: height 0.2s ease-out;
|
|
41
40
|
padding: 0.563rem 0.75rem;
|
|
@@ -44,7 +43,7 @@ const oe = X.div`
|
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
& textarea::placeholder {
|
|
47
|
-
color: ${(e) =>
|
|
46
|
+
color: ${(e) => p(
|
|
48
47
|
e.theme,
|
|
49
48
|
"Input",
|
|
50
49
|
e.color,
|
|
@@ -58,13 +57,13 @@ const oe = X.div`
|
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
& textarea:focus {
|
|
61
|
-
${(e) => e.readOnly !== !0 ?
|
|
60
|
+
${(e) => e.readOnly !== !0 ? J(e.theme) : "outline: none"}
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
& textarea:disabled {
|
|
65
|
-
/* ${(e) =>
|
|
64
|
+
/* ${(e) => K(e.theme)}
|
|
66
65
|
*/
|
|
67
|
-
${(e) => `background-color: ${
|
|
66
|
+
${(e) => `background-color: ${p(
|
|
68
67
|
e.theme,
|
|
69
68
|
"Input",
|
|
70
69
|
e.color,
|
|
@@ -72,7 +71,7 @@ const oe = X.div`
|
|
|
72
71
|
"background",
|
|
73
72
|
"backgroundOpacity"
|
|
74
73
|
)};
|
|
75
|
-
color: ${(t) =>
|
|
74
|
+
color: ${(t) => p(
|
|
76
75
|
t.theme,
|
|
77
76
|
"Input",
|
|
78
77
|
t.color,
|
|
@@ -81,9 +80,9 @@ const oe = X.div`
|
|
|
81
80
|
)};`}
|
|
82
81
|
}
|
|
83
82
|
`;
|
|
84
|
-
var
|
|
85
|
-
var n =
|
|
86
|
-
return
|
|
83
|
+
var ae = function(t) {
|
|
84
|
+
var n = E.useRef(t);
|
|
85
|
+
return re(function() {
|
|
87
86
|
n.current = t;
|
|
88
87
|
}), n;
|
|
89
88
|
}, B = function(t, n) {
|
|
@@ -92,9 +91,9 @@ var ie = function(t) {
|
|
|
92
91
|
return;
|
|
93
92
|
}
|
|
94
93
|
t.current = n;
|
|
95
|
-
},
|
|
96
|
-
var r =
|
|
97
|
-
return
|
|
94
|
+
}, oe = function(t, n) {
|
|
95
|
+
var r = E.useRef();
|
|
96
|
+
return E.useCallback(function(a) {
|
|
98
97
|
t.current = a, r.current && B(r.current, null), r.current = n, n && B(n, a);
|
|
99
98
|
}, [n]);
|
|
100
99
|
}, M = {
|
|
@@ -108,34 +107,34 @@ var ie = function(t) {
|
|
|
108
107
|
top: "0",
|
|
109
108
|
right: "0",
|
|
110
109
|
display: "block"
|
|
111
|
-
},
|
|
110
|
+
}, ie = function(t) {
|
|
112
111
|
Object.keys(M).forEach(function(n) {
|
|
113
112
|
t.style.setProperty(n, M[n], "important");
|
|
114
113
|
});
|
|
115
|
-
},
|
|
114
|
+
}, O = ie, i = null, A = function(t, n) {
|
|
116
115
|
var r = t.scrollHeight;
|
|
117
116
|
return n.sizingStyle.boxSizing === "border-box" ? r + n.borderSize : r - n.paddingSize;
|
|
118
117
|
};
|
|
119
|
-
function
|
|
120
|
-
n === void 0 && (n = 1), r === void 0 && (r = 1 / 0),
|
|
121
|
-
var a = e.paddingSize, m = e.borderSize,
|
|
122
|
-
Object.keys(
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
}),
|
|
126
|
-
var
|
|
127
|
-
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
var
|
|
131
|
-
return
|
|
118
|
+
function de(e, t, n, r) {
|
|
119
|
+
n === void 0 && (n = 1), r === void 0 && (r = 1 / 0), i || (i = document.createElement("textarea"), i.setAttribute("tabindex", "-1"), i.setAttribute("aria-hidden", "true"), O(i)), i.parentNode === null && document.body.appendChild(i);
|
|
120
|
+
var a = e.paddingSize, m = e.borderSize, d = e.sizingStyle, u = d.boxSizing;
|
|
121
|
+
Object.keys(d).forEach(function(f) {
|
|
122
|
+
var S = f;
|
|
123
|
+
i.style[S] = d[S];
|
|
124
|
+
}), O(i), i.value = t;
|
|
125
|
+
var o = A(i, e);
|
|
126
|
+
i.value = t, o = A(i, e), i.value = "x";
|
|
127
|
+
var c = i.scrollHeight - a, s = c * n;
|
|
128
|
+
u === "border-box" && (s = s + a + m), o = Math.max(s, o);
|
|
129
|
+
var g = c * r;
|
|
130
|
+
return u === "border-box" && (g = g + a + m), o = Math.min(g, o), [o, c];
|
|
132
131
|
}
|
|
133
|
-
var
|
|
134
|
-
},
|
|
132
|
+
var V = function() {
|
|
133
|
+
}, ue = function(t, n) {
|
|
135
134
|
return t.reduce(function(r, a) {
|
|
136
135
|
return r[a] = n[a], r;
|
|
137
136
|
}, {});
|
|
138
|
-
},
|
|
137
|
+
}, se = [
|
|
139
138
|
"borderBottomWidth",
|
|
140
139
|
"borderLeftWidth",
|
|
141
140
|
"borderRightWidth",
|
|
@@ -161,26 +160,26 @@ var _ = function() {
|
|
|
161
160
|
"wordBreak",
|
|
162
161
|
"wordSpacing",
|
|
163
162
|
"scrollbarGutter"
|
|
164
|
-
],
|
|
163
|
+
], le = !!document.documentElement.currentStyle, ce = function(t) {
|
|
165
164
|
var n = window.getComputedStyle(t);
|
|
166
165
|
if (n === null)
|
|
167
166
|
return null;
|
|
168
|
-
var r =
|
|
167
|
+
var r = ue(se, n), a = r.boxSizing;
|
|
169
168
|
if (a === "")
|
|
170
169
|
return null;
|
|
171
|
-
|
|
172
|
-
var m = parseFloat(r.paddingBottom) + parseFloat(r.paddingTop),
|
|
170
|
+
le && a === "border-box" && (r.width = parseFloat(r.width) + parseFloat(r.borderRightWidth) + parseFloat(r.borderLeftWidth) + parseFloat(r.paddingRight) + parseFloat(r.paddingLeft) + "px");
|
|
171
|
+
var m = parseFloat(r.paddingBottom) + parseFloat(r.paddingTop), d = parseFloat(r.borderBottomWidth) + parseFloat(r.borderTopWidth);
|
|
173
172
|
return {
|
|
174
173
|
sizingStyle: r,
|
|
175
174
|
paddingSize: m,
|
|
176
|
-
borderSize:
|
|
175
|
+
borderSize: d
|
|
177
176
|
};
|
|
178
|
-
},
|
|
179
|
-
function
|
|
180
|
-
var r =
|
|
181
|
-
|
|
182
|
-
var a = function(
|
|
183
|
-
return r.current(
|
|
177
|
+
}, fe = ce;
|
|
178
|
+
function W(e, t, n) {
|
|
179
|
+
var r = ae(n);
|
|
180
|
+
x.useLayoutEffect(function() {
|
|
181
|
+
var a = function(d) {
|
|
182
|
+
return r.current(d);
|
|
184
183
|
};
|
|
185
184
|
if (e)
|
|
186
185
|
return e.addEventListener(t, a), function() {
|
|
@@ -188,161 +187,112 @@ function k(e, t, n) {
|
|
|
188
187
|
};
|
|
189
188
|
}, []);
|
|
190
189
|
}
|
|
191
|
-
var
|
|
192
|
-
|
|
190
|
+
var he = function(t, n) {
|
|
191
|
+
W(document.body, "reset", function(r) {
|
|
193
192
|
t.current.form === r.target && n(r);
|
|
194
193
|
});
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
},
|
|
200
|
-
var r = t.cacheMeasurements, a = t.maxRows, m = t.minRows,
|
|
201
|
-
var
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
var
|
|
205
|
-
L.current !==
|
|
206
|
-
rowHeight:
|
|
194
|
+
}, ge = function(t) {
|
|
195
|
+
W(window, "resize", t);
|
|
196
|
+
}, me = function(t) {
|
|
197
|
+
W(document.fonts, "loadingdone", t);
|
|
198
|
+
}, ve = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], be = function(t, n) {
|
|
199
|
+
var r = t.cacheMeasurements, a = t.maxRows, m = t.minRows, d = t.onChange, u = d === void 0 ? V : d, o = t.onHeightChange, c = o === void 0 ? V : o, s = te(t, ve), g = s.value !== void 0, f = x.useRef(null), S = oe(f, n), L = x.useRef(0), R = x.useRef(), v = function() {
|
|
200
|
+
var l = f.current, w = r && R.current ? R.current : fe(l);
|
|
201
|
+
if (w) {
|
|
202
|
+
R.current = w;
|
|
203
|
+
var y = de(w, l.value || l.placeholder || "x", m, a), b = y[0], $ = y[1];
|
|
204
|
+
L.current !== b && (L.current = b, l.style.setProperty("height", b + "px", "important"), c(b, {
|
|
205
|
+
rowHeight: $
|
|
207
206
|
}));
|
|
208
207
|
}
|
|
209
|
-
},
|
|
210
|
-
|
|
208
|
+
}, T = function(l) {
|
|
209
|
+
g || v(), u(l);
|
|
211
210
|
};
|
|
212
|
-
return
|
|
213
|
-
if (!
|
|
214
|
-
var
|
|
211
|
+
return x.useLayoutEffect(v), he(f, function() {
|
|
212
|
+
if (!g) {
|
|
213
|
+
var z = f.current.value;
|
|
215
214
|
requestAnimationFrame(function() {
|
|
216
|
-
var
|
|
217
|
-
|
|
215
|
+
var l = f.current;
|
|
216
|
+
l && z !== l.value && v();
|
|
218
217
|
});
|
|
219
218
|
}
|
|
220
|
-
}),
|
|
221
|
-
onChange:
|
|
222
|
-
ref:
|
|
219
|
+
}), ge(v), me(v), /* @__PURE__ */ x.createElement("textarea", Q({}, s, {
|
|
220
|
+
onChange: T,
|
|
221
|
+
ref: S
|
|
223
222
|
}));
|
|
224
|
-
},
|
|
225
|
-
const
|
|
223
|
+
}, pe = /* @__PURE__ */ x.forwardRef(be);
|
|
224
|
+
const Fe = U((e, t) => {
|
|
226
225
|
const {
|
|
227
226
|
disabled: n,
|
|
228
227
|
readOnly: r,
|
|
229
228
|
value: a,
|
|
230
229
|
defaultValue: m,
|
|
231
|
-
debounceTime:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
maxRows: l,
|
|
230
|
+
debounceTime: d = 0,
|
|
231
|
+
collapseOnBlur: u = !1,
|
|
232
|
+
minRows: o = 0,
|
|
233
|
+
maxRows: c,
|
|
236
234
|
//----------------
|
|
237
|
-
onChange:
|
|
238
|
-
onBlur:
|
|
239
|
-
onFocus:
|
|
235
|
+
onChange: s,
|
|
236
|
+
onBlur: g,
|
|
237
|
+
onFocus: f,
|
|
240
238
|
//----------------
|
|
241
|
-
className:
|
|
242
|
-
style:
|
|
243
|
-
size:
|
|
244
|
-
color:
|
|
245
|
-
...
|
|
246
|
-
} = e, [
|
|
247
|
-
|
|
239
|
+
className: S = "",
|
|
240
|
+
style: L = {},
|
|
241
|
+
size: R = "small",
|
|
242
|
+
color: v = "primary",
|
|
243
|
+
...T
|
|
244
|
+
} = e, [z, l] = H(a || m || ""), w = ee(), [y, b] = H(!1), [$, _] = H(o), [N, C] = H(
|
|
245
|
+
u ? o : c
|
|
248
246
|
);
|
|
249
|
-
|
|
250
|
-
a != null &&
|
|
251
|
-
}, [a]),
|
|
252
|
-
|
|
253
|
-
}, [
|
|
254
|
-
C(
|
|
255
|
-
}, [
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
[
|
|
259
|
-
),
|
|
260
|
-
|
|
247
|
+
I(() => {
|
|
248
|
+
a != null && l(a);
|
|
249
|
+
}, [a]), I(() => {
|
|
250
|
+
_(o), u && y === !1 && C(o);
|
|
251
|
+
}, [o, c]), I(() => {
|
|
252
|
+
C(u ? y === !0 ? c : o : c);
|
|
253
|
+
}, [u]);
|
|
254
|
+
const j = G(
|
|
255
|
+
Y((h, F) => P(h, F), d),
|
|
256
|
+
[s]
|
|
257
|
+
), P = (h, F) => {
|
|
258
|
+
s && (s == null || s(h, F));
|
|
261
259
|
};
|
|
262
|
-
return /* @__PURE__ */
|
|
263
|
-
|
|
260
|
+
return /* @__PURE__ */ k(
|
|
261
|
+
ne,
|
|
264
262
|
{
|
|
265
|
-
style:
|
|
266
|
-
className:
|
|
267
|
-
theme:
|
|
268
|
-
color:
|
|
269
|
-
size:
|
|
270
|
-
focused:
|
|
263
|
+
style: L,
|
|
264
|
+
className: S,
|
|
265
|
+
theme: w,
|
|
266
|
+
color: v,
|
|
267
|
+
size: R,
|
|
268
|
+
focused: y,
|
|
271
269
|
disabled: n,
|
|
272
270
|
readOnly: r,
|
|
273
|
-
collapseOnBlur:
|
|
274
|
-
children: /* @__PURE__ */
|
|
275
|
-
|
|
271
|
+
collapseOnBlur: u,
|
|
272
|
+
children: /* @__PURE__ */ k(
|
|
273
|
+
pe,
|
|
276
274
|
{
|
|
277
275
|
ref: t,
|
|
278
276
|
disabled: n,
|
|
279
|
-
value:
|
|
277
|
+
value: z,
|
|
280
278
|
readOnly: r,
|
|
281
|
-
minRows:
|
|
282
|
-
maxRows:
|
|
283
|
-
onChange: (
|
|
284
|
-
|
|
279
|
+
minRows: $,
|
|
280
|
+
maxRows: N,
|
|
281
|
+
onChange: (h) => {
|
|
282
|
+
l(h.target.value), j(h, h.target.value);
|
|
285
283
|
},
|
|
286
|
-
onFocus: (
|
|
287
|
-
|
|
284
|
+
onFocus: (h) => {
|
|
285
|
+
b(!0), u && C(c), f == null || f(h);
|
|
288
286
|
},
|
|
289
|
-
onBlur: (
|
|
290
|
-
|
|
287
|
+
onBlur: (h) => {
|
|
288
|
+
b(!1), u && C(o), g == null || g(h);
|
|
291
289
|
},
|
|
292
|
-
...
|
|
290
|
+
...T
|
|
293
291
|
}
|
|
294
292
|
)
|
|
295
293
|
}
|
|
296
294
|
);
|
|
297
295
|
});
|
|
298
|
-
Se.propTypes = {
|
|
299
|
-
id: o.any,
|
|
300
|
-
defaultValue: o.string,
|
|
301
|
-
value: o.string,
|
|
302
|
-
disabled: o.bool,
|
|
303
|
-
readOnly: o.bool,
|
|
304
|
-
debounceTime: o.number,
|
|
305
|
-
placeholder: o.string,
|
|
306
|
-
tabIndex: o.number,
|
|
307
|
-
/**
|
|
308
|
-
* Defines whether the textarea will collapse to its original size after it loses focus.
|
|
309
|
-
*/
|
|
310
|
-
collapseOnBlur: o.bool,
|
|
311
|
-
/**
|
|
312
|
-
* Minimum number of rows to show.
|
|
313
|
-
*/
|
|
314
|
-
minRows: o.number,
|
|
315
|
-
/**
|
|
316
|
-
* Maximum number of rows to be shown before scroller appears.
|
|
317
|
-
*/
|
|
318
|
-
maxRows: o.number,
|
|
319
|
-
/**
|
|
320
|
-
* `(event, value) => void`
|
|
321
|
-
*/
|
|
322
|
-
onChange: o.func,
|
|
323
|
-
/**
|
|
324
|
-
* `(event) => void`
|
|
325
|
-
*/
|
|
326
|
-
onBlur: o.func,
|
|
327
|
-
/**
|
|
328
|
-
* `(event) => void`
|
|
329
|
-
*/
|
|
330
|
-
onFocus: o.func,
|
|
331
|
-
//----------------
|
|
332
|
-
className: o.string,
|
|
333
|
-
style: o.object,
|
|
334
|
-
size: o.oneOf(["small", "medium", "large"]),
|
|
335
|
-
color: o.oneOf([
|
|
336
|
-
"primary",
|
|
337
|
-
"secondary",
|
|
338
|
-
"success",
|
|
339
|
-
"danger",
|
|
340
|
-
"warning",
|
|
341
|
-
"information",
|
|
342
|
-
"neutral",
|
|
343
|
-
"gray"
|
|
344
|
-
])
|
|
345
|
-
};
|
|
346
296
|
export {
|
|
347
|
-
|
|
297
|
+
Fe as default
|
|
348
298
|
};
|
package/dist/TextInput.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),o=require("react"),N=require("./index-Cp66dWMi.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-RnrgDDZP.cjs"),B=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),D=g.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=>t.getSizeValueWithUnits(e.theme,e.size)};
|
|
6
|
+
max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
|
|
7
|
+
background-color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
|
|
8
8
|
border: 1px solid
|
|
9
|
-
${e=>
|
|
10
|
-
border-radius: ${e=>
|
|
9
|
+
${e=>t.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,e.disabled===!0?"disabled":"enabled","border")};
|
|
10
|
+
border-radius: ${e=>t.getBorderRadiusValueWithUnits(e.theme,"regular")};
|
|
11
11
|
|
|
12
|
-
${e=>e.focused&&e.readOnly!==!0?
|
|
13
|
-
/* ${e=>e.disabled===!0?
|
|
14
|
-
${e=>e.disabled===!0?`background-color: ${
|
|
15
|
-
color: ${
|
|
16
|
-
`,
|
|
12
|
+
${e=>e.focused&&e.readOnly!==!0?t.getOutlineCss(e.theme):""}
|
|
13
|
+
/* ${e=>e.disabled===!0?t.getDisabledStateCss(e.theme):""} */
|
|
14
|
+
${e=>e.disabled===!0?`background-color: ${t.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
|
|
15
|
+
color: ${a=>t.getColorRgbaValue(a.theme,"Input",a.color,"disabled","text")};`:""}
|
|
16
|
+
`,S=g.styled.span`
|
|
17
17
|
padding: 0 12px;
|
|
18
|
-
color: ${e=>
|
|
19
|
-
`,
|
|
18
|
+
color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","prefix")};
|
|
19
|
+
`,E=g.styled(S)``,P=g.styled.input`
|
|
20
20
|
background: none;
|
|
21
21
|
border: none;
|
|
22
22
|
outline: none;
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
padding-bottom: 0.625rem;
|
|
25
25
|
width: 100%;
|
|
26
26
|
|
|
27
|
-
${e=>
|
|
28
|
-
min-height: ${e=>
|
|
29
|
-
max-height: ${e=>
|
|
30
|
-
color: ${e=>
|
|
31
|
-
caret-color: ${e=>
|
|
27
|
+
${e=>t.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")}
|
|
28
|
+
min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
|
|
29
|
+
max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
|
|
30
|
+
color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","text")};
|
|
31
|
+
caret-color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.color,"enabled","caret")};
|
|
32
32
|
padding-right: ${e=>e.suffix?"0":"0.75rem"};
|
|
33
33
|
padding-left: ${e=>e.prefix?"0":"0.75rem"};
|
|
34
34
|
|
|
35
35
|
&::placeholder {
|
|
36
|
-
color: ${e=>
|
|
36
|
+
color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.color,"enabled","placeholder")};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&:read-only {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&:disabled {
|
|
44
|
-
/* ${e=>
|
|
45
|
-
${e=>`background-color: ${
|
|
46
|
-
color: ${
|
|
44
|
+
/* ${e=>t.getDisabledStateCss(e.theme)} */
|
|
45
|
+
${e=>`background-color: ${t.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
|
|
46
|
+
color: ${a=>t.getColorRgbaValue(a.theme,"Input",a.color,"disabled","text")};`}
|
|
47
47
|
background: none;
|
|
48
48
|
}
|
|
49
|
-
`,
|
|
49
|
+
`,A=o.forwardRef((e,a)=>{const{disabled:y,readOnly:$,defaultValue:V,value:n,debounceTime:k=0,type:z="text",placeholder:q,tabIndex:v,prefix:b,suffix:h,onChange:r,onBlur:m,onFocus:f,className:O="",style:W={},size:C="small",color:u="primary",...j}=e,d=B.useTheme(),i=o.useRef(n||V||""),[U,R]=o.useState(n||V||""),[c,I]=o.useState(!1);o.useEffect(()=>{n!=null&&(i.current=n,R(i.current))},[n]);const w=o.useCallback(N.debounce((l,x)=>T(l,x),k),[r]),T=(l,x)=>{r&&(r==null||r(l,x))},_=l=>{i.current=l.target.value,R(i.current),w(l,l.target.value)},p=l=>{I(!0),f==null||f(l)},F=l=>{I(!1),m==null||m(l)};return s.jsxs(D,{style:W,className:O,theme:d,color:u,size:C,focused:c,disabled:y,readOnly:$,children:[b&&s.jsx(S,{theme:d,color:u,focused:c,className:"lnc-input-prefix",children:b}),s.jsx(P,{ref:a,type:z,theme:d,color:u,size:C,placeholder:q,prefix:b,suffix:h,disabled:y,readOnly:$,focused:c,onFocus:p,onBlur:F,onChange:_,tabIndex:v,value:U,...j}),h&&s.jsx(E,{theme:d,color:u,focused:c,className:"lnc-input-suffix",children:h})]})});module.exports=A;
|