@lanaco/lnc-react-ui 4.0.35 → 4.0.37
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 +11 -11
- package/dist/AccordionDetails.cjs +1 -1
- package/dist/AccordionDetails.js +1 -1
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +3 -3
- package/dist/ActionsToolbar.cjs +1 -1
- package/dist/ActionsToolbar.js +2 -2
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +2 -2
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.js +3 -3
- package/dist/Badge.cjs +2 -2
- package/dist/Badge.js +3 -3
- package/dist/BannerSectionBasic.cjs +1 -1
- package/dist/BannerSectionBasic.js +1 -1
- package/dist/BannerSectionCarousel.cjs +2 -2
- package/dist/BannerSectionCarousel.js +63 -63
- package/dist/BannerSectionGrid.cjs +3 -3
- package/dist/BannerSectionGrid.js +43 -39
- package/dist/BannerSectionSimple.cjs +1 -1
- package/dist/BannerSectionSimple.js +1 -1
- package/dist/BannerSectionWithList.cjs +1 -1
- package/dist/BannerSectionWithList.js +2 -2
- package/dist/BannerSectionWithListImage.cjs +1 -1
- package/dist/BannerSectionWithListImage.js +1 -1
- 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 +11 -108
- package/dist/BlogsSectionWithFilters.js +59 -437
- package/dist/BrandHitsSection.cjs +1 -1
- package/dist/BrandHitsSection.js +2 -2
- package/dist/Breadcrumbs.cjs +3 -3
- package/dist/Breadcrumbs.js +12 -12
- package/dist/Button.cjs +1 -1
- package/dist/Button.js +4 -4
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +3 -3
- package/dist/CalorieCalculatorSection.cjs +333 -0
- package/dist/CalorieCalculatorSection.js +851 -0
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +3 -3
- package/dist/Chip.cjs +2 -2
- package/dist/Chip.js +3 -3
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +4 -4
- package/dist/ConfirmationForm.cjs +2 -2
- package/dist/ConfirmationForm.js +3 -3
- package/dist/CustomLoanMapSection.cjs +1 -1
- package/dist/CustomLoanMapSection.js +2 -2
- package/dist/{CustomStyles-BMY2-z7P.js → CustomStyles-BwnfUVvi.js} +8 -8
- package/dist/{CustomStyles-zroEcINq.cjs → CustomStyles-DUDHRSkh.cjs} +2 -2
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +1 -1
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +76 -80
- package/dist/DecimalInput.cjs +3 -3
- package/dist/DecimalInput.js +4 -4
- package/dist/DecimalInputV2.cjs +2 -2
- package/dist/DecimalInputV2.js +3 -3
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +4 -4
- package/dist/DetailsView.cjs +2 -2
- package/dist/DetailsView.js +3 -3
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +3 -3
- package/dist/DragAndDropFile.cjs +6 -6
- package/dist/DragAndDropFile.js +4 -4
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +3 -3
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +12 -12
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +5 -5
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +10 -10
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +5 -5
- package/dist/DropdownMenu.cjs +1 -1
- package/dist/DropdownMenu.js +6 -6
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +3 -3
- package/dist/FieldOfInterestsMasonrySection.cjs +6 -6
- package/dist/FieldOfInterestsMasonrySection.js +43 -42
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +3 -3
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +3 -3
- package/dist/FieldOfInterestsWithTagsCardsSection.js +3 -3
- package/dist/FileInput.cjs +2 -2
- package/dist/FileInput.js +3 -3
- package/dist/FlexBox.cjs +1 -1
- package/dist/FlexBox.js +1 -1
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +2 -2
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +7 -7
- package/dist/FormView.cjs +2 -2
- package/dist/FormView.js +15 -15
- package/dist/GeneralWithTagsCardsSection.cjs +1 -1
- package/dist/GeneralWithTagsCardsSection.js +3 -3
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +2 -2
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.js +1 -1
- package/dist/GridItem.cjs +1 -1
- package/dist/GridItem.js +1 -1
- package/dist/Icon.cjs +2 -2
- package/dist/Icon.js +6 -6
- package/dist/IconButton.cjs +1 -1
- package/dist/IconButton.js +3 -3
- package/dist/Kanban.cjs +7 -7
- package/dist/Kanban.js +37 -41
- package/dist/KanbanActionsToolbar.cjs +1 -1
- package/dist/KanbanActionsToolbar.js +2 -2
- package/dist/{KanbanCard-BDyFaKYd.js → KanbanCard-BDRSqfVD.js} +2 -2
- package/dist/{KanbanCard-CofqdTrO.cjs → KanbanCard-CLOKZFYP.cjs} +1 -1
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +3 -3
- package/dist/KanbanFooter.cjs +1 -1
- package/dist/KanbanFooter.js +2 -2
- package/dist/KanbanHeader.cjs +2 -2
- package/dist/KanbanHeader.js +2 -2
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +3 -3
- package/dist/Link.cjs +2 -2
- package/dist/Link.js +6 -6
- package/dist/LocationSearchSection.cjs +53 -0
- package/dist/LocationSearchSection.js +108 -0
- package/dist/MasonryGeneralCardsSection.cjs +1 -1
- package/dist/MasonryGeneralCardsSection.js +3 -3
- package/dist/MenuItem.cjs +2 -2
- package/dist/MenuItem.js +3 -3
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +6 -6
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +3 -3
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +3 -3
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +9 -9
- package/dist/NestedMenuItem.cjs +2 -2
- package/dist/NestedMenuItem.js +8 -8
- package/dist/Notification.cjs +1 -1
- package/dist/Notification.js +1 -1
- package/dist/NotificationContainer.cjs +1 -1
- package/dist/NotificationContainer.js +3 -3
- package/dist/NotificationMessage.cjs +1 -1
- package/dist/NotificationMessage.js +3 -3
- package/dist/NumberInput.cjs +2 -2
- package/dist/NumberInput.js +4 -4
- package/dist/OverlayGeneralCardsSection.cjs +1 -1
- package/dist/OverlayGeneralCardsSection.js +3 -3
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +2 -2
- package/dist/Pagination.cjs +2 -2
- package/dist/Pagination.js +2 -2
- package/dist/PasswordInput.cjs +2 -2
- package/dist/PasswordInput.js +4 -4
- package/dist/PopoverContent.cjs +1 -1
- package/dist/PopoverContent.js +5 -5
- package/dist/PopoverDescription.cjs +1 -1
- package/dist/PopoverDescription.js +1 -1
- package/dist/PopoverHeading.cjs +1 -1
- package/dist/PopoverHeading.js +1 -1
- package/dist/PopoverTrigger.cjs +1 -1
- package/dist/PopoverTrigger.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 +8 -8
- package/dist/QuizSection.cjs +1 -1
- package/dist/QuizSection.js +2 -2
- package/dist/RadioGroup.cjs +1 -1
- package/dist/RadioGroup.js +2 -2
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +3 -3
- package/dist/RangeSlider.cjs +2 -2
- package/dist/RangeSlider.js +3 -3
- package/dist/SalesCampaignsSection.cjs +423 -0
- package/dist/SalesCampaignsSection.js +967 -0
- package/dist/SearchBar.cjs +1 -1
- package/dist/SearchBar.js +6 -6
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +3 -3
- package/dist/ShopCardsSection.cjs +1 -1
- package/dist/ShopCardsSection.js +2 -2
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +3 -3
- package/dist/SimpleCategoriesSection.cjs +9 -9
- package/dist/SimpleCategoriesSection.js +48 -44
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +3 -3
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +12 -12
- package/dist/Surface.cjs +2 -2
- package/dist/Surface.js +3 -3
- package/dist/SwipeableDrawer.cjs +2 -2
- package/dist/SwipeableDrawer.js +3 -3
- package/dist/TabItem.cjs +1 -1
- package/dist/TabItem.js +11 -11
- package/dist/Table.cjs +7 -7
- package/dist/Table.js +4 -4
- package/dist/TableView.cjs +1 -1
- package/dist/TableView.js +2 -2
- package/dist/Tabs.cjs +2 -2
- package/dist/Tabs.js +2 -2
- package/dist/TextAreaInput.cjs +12 -12
- package/dist/TextAreaInput.js +124 -112
- package/dist/TextInput.cjs +2 -2
- package/dist/TextInput.js +4 -4
- package/dist/ThemeProvider.cjs +10 -10
- package/dist/ThemeProvider.js +189 -187
- package/dist/TimeInput.cjs +2 -2
- package/dist/TimeInput.js +4 -4
- package/dist/Toggle.cjs +15 -15
- package/dist/Toggle.js +40 -50
- package/dist/TreeMenu.cjs +1 -1
- package/dist/TreeMenu.js +1 -1
- package/dist/TreeMenuSeparator.cjs +1 -1
- package/dist/TreeMenuSeparator.js +3 -3
- package/dist/UploadedFile.cjs +2 -2
- package/dist/UploadedFile.js +16 -16
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +2 -2
- package/dist/{defineProperty-DHvxLH8G.cjs → defineProperty-CqVRDJI8.cjs} +1 -1
- package/dist/{defineProperty-B5pLF6px.js → defineProperty-DF3p0mVo.js} +5 -5
- package/dist/emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs +1 -0
- package/dist/emotion-element-f0de968e.browser.esm-CkCiQliQ.js +877 -0
- package/dist/{emotion-is-prop-valid.esm-CMrshNb7.cjs → emotion-is-prop-valid.esm-BNsx9k19.cjs} +1 -1
- package/dist/{emotion-is-prop-valid.esm-DkbeH1Xy.js → emotion-is-prop-valid.esm-CbWxtx4i.js} +1 -1
- package/dist/emotion-react.browser.esm-1R69UXoj.cjs +1 -0
- package/dist/emotion-react.browser.esm-C6iWxXPG.js +95 -0
- package/dist/{emotion-styled.browser.esm-BiK8DcgW.js → emotion-styled.browser.esm-CjCaF13H.js} +55 -53
- package/dist/emotion-styled.browser.esm-Cle7tAM9.cjs +1 -0
- package/dist/floating-ui.dom-CFbLeFcw.cjs +1 -0
- package/dist/floating-ui.dom-vNhdy5RI.js +947 -0
- package/dist/{floating-ui.react.esm-C4vrBVJU.cjs → floating-ui.react.esm-7Yt4LHw6.cjs} +1 -1
- package/dist/{floating-ui.react.esm-72DKnou_.js → floating-ui.react.esm-umB-tMXa.js} +3 -3
- package/dist/{index--Kmch3aI.js → index-64mXPFBC.js} +6724 -6724
- package/dist/{index-CvebWhtp.js → index-BlxaTV-D.js} +1 -1
- package/dist/{index-CkPex_K5.js → index-CHkb_Sj6.js} +2 -2
- package/dist/index-CT6_7UFb.js +350 -0
- package/dist/index-Cb_AeN9A.cjs +4 -0
- package/dist/{index-CNBqQrtK.js → index-CkWvbrVT.js} +1 -1
- package/dist/{index-BUChtubz.js → index-D-c5IxDk.js} +1 -1
- package/dist/{index-DKztZfzw.js → index-D6g5ZqyJ.js} +2 -2
- package/dist/{index-BP5r5zGN.cjs → index-DZoWlChs.cjs} +1 -1
- package/dist/{index-B67WqHGh.cjs → index-Dit169OA.cjs} +1 -1
- package/dist/{index-BmobrEkT.cjs → index-Dj5wZCVs.cjs} +1 -1
- package/dist/{index-CTJZaJ_S.js → index-DxdBg_r_.js} +1 -1
- package/dist/index-EeoArxOx.cjs +174 -0
- package/dist/index-Q_i-aqsF.cjs +95 -0
- package/dist/{index-C5vAqIS6.cjs → index-vXmvgZ2Y.cjs} +1 -1
- package/dist/index-wy-PXQR9.js +47 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +96 -92
- package/dist/{motion-Oud-wpUz.cjs → motion-B_VPZaJq.cjs} +1 -1
- package/dist/{motion-ecIGZGwI.js → motion-Ckekul_K.js} +1 -1
- package/dist/objectWithoutPropertiesLoose-BLga_MQA.cjs +1 -0
- package/dist/{objectWithoutPropertiesLoose-DwEN6RBQ.js → objectWithoutPropertiesLoose-DhwSMsjf.js} +1 -1
- package/dist/{react-toastify.esm-CkXGwKXL.js → react-toastify.esm--2awuizG.js} +1 -1
- package/dist/{react-toastify.esm-Dqcb4SQT.cjs → react-toastify.esm-Dq1k28O7.cjs} +1 -1
- package/dist/{style-BGQ1B_dp.js → style-6tSw9aqK.js} +1 -1
- package/dist/{style-BEUISPP7.cjs → style-BR3tIhP1.cjs} +1 -1
- package/dist/usePopover.cjs +1 -1
- package/dist/usePopover.js +6 -6
- package/dist/{utils-jiuifwtJ.js → utils-DtRLzzTZ.js} +224 -73
- package/dist/utils-NZLCh-J5.cjs +51 -0
- package/package.json +5 -2
- package/vite.config.js +12 -1
- package/dist/emotion-element-5486c51c.browser.esm-Bb4VkP8U.js +0 -886
- package/dist/emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs +0 -1
- package/dist/emotion-react.browser.esm-CN-s34fZ.js +0 -94
- package/dist/emotion-react.browser.esm-D7h2t2Bz.cjs +0 -1
- package/dist/emotion-styled.browser.esm-Cbp_XsK4.cjs +0 -1
- package/dist/floating-ui.dom-1F2mTXOe.cjs +0 -1
- package/dist/floating-ui.dom-BdUovkEr.js +0 -938
- package/dist/index-Ct1N7fF4.cjs +0 -174
- package/dist/objectWithoutPropertiesLoose-Bz3hwpmU.cjs +0 -1
- package/dist/utils-scuIeOqU.cjs +0 -51
package/dist/TextAreaInput.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as O } from "react/jsx-runtime";
|
|
2
2
|
import { P as o } from "./index-S5Cd7WrG.js";
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import { d as
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import { _ as te, u as re } from "./emotion-element-
|
|
9
|
-
import { _ as ne } from "./objectWithoutPropertiesLoose-
|
|
3
|
+
import * as x from "react";
|
|
4
|
+
import W, { forwardRef as Y, useState as F, useEffect as $, useCallback as q } from "react";
|
|
5
|
+
import { d as D } from "./index-CkWvbrVT.js";
|
|
6
|
+
import { n as X } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
7
|
+
import { c as Z, d as J, b as C, a as K, e as Q, h as ee } from "./utils-DtRLzzTZ.js";
|
|
8
|
+
import { _ as te, u as re } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
9
|
+
import { _ as ne } from "./objectWithoutPropertiesLoose-DhwSMsjf.js";
|
|
10
10
|
import { i as ae } from "./use-isomorphic-layout-effect.browser.esm-DERp5kr6.js";
|
|
11
|
-
const oe =
|
|
11
|
+
const oe = X.div`
|
|
12
12
|
& textarea {
|
|
13
|
-
${(e) =>
|
|
13
|
+
${(e) => Z(e.theme, "Input", e.size, "enabled")}
|
|
14
14
|
min-height: ${(e) => J(e.theme, e.size)};
|
|
15
|
-
background-color: ${(e) =>
|
|
15
|
+
background-color: ${(e) => C(
|
|
16
16
|
e.theme,
|
|
17
17
|
"Input",
|
|
18
18
|
e.color,
|
|
@@ -20,7 +20,7 @@ const oe = Z.div`
|
|
|
20
20
|
"background"
|
|
21
21
|
)};
|
|
22
22
|
border: 1px solid
|
|
23
|
-
${(e) =>
|
|
23
|
+
${(e) => C(
|
|
24
24
|
e.theme,
|
|
25
25
|
"Input",
|
|
26
26
|
e.focused === !0 ? "primary" : e.color,
|
|
@@ -28,14 +28,14 @@ const oe = Z.div`
|
|
|
28
28
|
"border"
|
|
29
29
|
)};
|
|
30
30
|
border-radius: ${(e) => K(e.theme, "regular")};
|
|
31
|
-
color: ${(e) =>
|
|
31
|
+
color: ${(e) => C(
|
|
32
32
|
e.theme,
|
|
33
33
|
"Input",
|
|
34
34
|
e.focused === !0 ? "primary" : e.color,
|
|
35
35
|
"enabled",
|
|
36
36
|
"text"
|
|
37
37
|
)};
|
|
38
|
-
caret-color: ${(e) =>
|
|
38
|
+
caret-color: ${(e) => C(e.theme, "Input", e.color, "enabled", "caret")};
|
|
39
39
|
overflow: ${(e) => e.collapseOnBlur && e.focused === !1 ? "hidden" : "auto"};
|
|
40
40
|
transition: height 0.2s ease-out;
|
|
41
41
|
padding: 0.563rem 0.75rem;
|
|
@@ -44,7 +44,7 @@ const oe = Z.div`
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
& textarea::placeholder {
|
|
47
|
-
color: ${(e) =>
|
|
47
|
+
color: ${(e) => C(
|
|
48
48
|
e.theme,
|
|
49
49
|
"Input",
|
|
50
50
|
e.color,
|
|
@@ -66,22 +66,22 @@ const oe = Z.div`
|
|
|
66
66
|
}
|
|
67
67
|
`;
|
|
68
68
|
var ie = function(t) {
|
|
69
|
-
var
|
|
69
|
+
var n = W.useRef(t);
|
|
70
70
|
return ae(function() {
|
|
71
|
-
|
|
72
|
-
}),
|
|
73
|
-
},
|
|
71
|
+
n.current = t;
|
|
72
|
+
}), n;
|
|
73
|
+
}, k = function(t, n) {
|
|
74
74
|
if (typeof t == "function") {
|
|
75
|
-
t(
|
|
75
|
+
t(n);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
t.current =
|
|
79
|
-
}, de = function(t,
|
|
80
|
-
var
|
|
81
|
-
return
|
|
82
|
-
t.current = a,
|
|
83
|
-
}, [
|
|
84
|
-
},
|
|
78
|
+
t.current = n;
|
|
79
|
+
}, de = function(t, n) {
|
|
80
|
+
var r = W.useRef();
|
|
81
|
+
return W.useCallback(function(a) {
|
|
82
|
+
t.current = a, r.current && k(r.current, null), r.current = n, n && k(n, a);
|
|
83
|
+
}, [n]);
|
|
84
|
+
}, M = {
|
|
85
85
|
"min-height": "0",
|
|
86
86
|
"max-height": "none",
|
|
87
87
|
height: "0",
|
|
@@ -93,31 +93,31 @@ var ie = function(t) {
|
|
|
93
93
|
right: "0",
|
|
94
94
|
display: "block"
|
|
95
95
|
}, ue = function(t) {
|
|
96
|
-
Object.keys(
|
|
97
|
-
t.style.setProperty(
|
|
96
|
+
Object.keys(M).forEach(function(n) {
|
|
97
|
+
t.style.setProperty(n, M[n], "important");
|
|
98
98
|
});
|
|
99
|
-
},
|
|
100
|
-
var
|
|
101
|
-
return
|
|
99
|
+
}, V = ue, d = null, A = function(t, n) {
|
|
100
|
+
var r = t.scrollHeight;
|
|
101
|
+
return n.sizingStyle.boxSizing === "border-box" ? r + n.borderSize : r - n.paddingSize;
|
|
102
102
|
};
|
|
103
|
-
function se(e, t,
|
|
104
|
-
|
|
105
|
-
var a = e.paddingSize,
|
|
106
|
-
Object.keys(s).forEach(function(
|
|
107
|
-
var
|
|
108
|
-
d.style[
|
|
109
|
-
}),
|
|
110
|
-
var i =
|
|
111
|
-
d.value = t, i =
|
|
112
|
-
var u = d.scrollHeight - a, l = u *
|
|
113
|
-
S === "border-box" && (l = l + a +
|
|
114
|
-
var c = u *
|
|
115
|
-
return S === "border-box" && (c = c + a +
|
|
103
|
+
function se(e, t, n, r) {
|
|
104
|
+
n === void 0 && (n = 1), r === void 0 && (r = 1 / 0), d || (d = document.createElement("textarea"), d.setAttribute("tabindex", "-1"), d.setAttribute("aria-hidden", "true"), V(d)), d.parentNode === null && document.body.appendChild(d);
|
|
105
|
+
var a = e.paddingSize, m = e.borderSize, s = e.sizingStyle, S = s.boxSizing;
|
|
106
|
+
Object.keys(s).forEach(function(f) {
|
|
107
|
+
var b = f;
|
|
108
|
+
d.style[b] = s[b];
|
|
109
|
+
}), V(d), d.value = t;
|
|
110
|
+
var i = A(d, e);
|
|
111
|
+
d.value = t, i = A(d, e), d.value = "x";
|
|
112
|
+
var u = d.scrollHeight - a, l = u * n;
|
|
113
|
+
S === "border-box" && (l = l + a + m), i = Math.max(l, i);
|
|
114
|
+
var c = u * r;
|
|
115
|
+
return S === "border-box" && (c = c + a + m), i = Math.min(c, i), [i, u];
|
|
116
116
|
}
|
|
117
|
-
var
|
|
118
|
-
}, le = function(t,
|
|
119
|
-
return t.reduce(function(
|
|
120
|
-
return
|
|
117
|
+
var _ = function() {
|
|
118
|
+
}, le = function(t, n) {
|
|
119
|
+
return t.reduce(function(r, a) {
|
|
120
|
+
return r[a] = n[a], r;
|
|
121
121
|
}, {});
|
|
122
122
|
}, ce = [
|
|
123
123
|
"borderBottomWidth",
|
|
@@ -145,26 +145,26 @@ var V = function() {
|
|
|
145
145
|
"wordBreak",
|
|
146
146
|
"wordSpacing",
|
|
147
147
|
"scrollbarGutter"
|
|
148
|
-
],
|
|
149
|
-
var
|
|
150
|
-
if (
|
|
148
|
+
], fe = !!document.documentElement.currentStyle, he = function(t) {
|
|
149
|
+
var n = window.getComputedStyle(t);
|
|
150
|
+
if (n === null)
|
|
151
151
|
return null;
|
|
152
|
-
var
|
|
152
|
+
var r = le(ce, n), a = r.boxSizing;
|
|
153
153
|
if (a === "")
|
|
154
154
|
return null;
|
|
155
|
-
|
|
156
|
-
var
|
|
155
|
+
fe && a === "border-box" && (r.width = parseFloat(r.width) + parseFloat(r.borderRightWidth) + parseFloat(r.borderLeftWidth) + parseFloat(r.paddingRight) + parseFloat(r.paddingLeft) + "px");
|
|
156
|
+
var m = parseFloat(r.paddingBottom) + parseFloat(r.paddingTop), s = parseFloat(r.borderBottomWidth) + parseFloat(r.borderTopWidth);
|
|
157
157
|
return {
|
|
158
|
-
sizingStyle:
|
|
159
|
-
paddingSize:
|
|
158
|
+
sizingStyle: r,
|
|
159
|
+
paddingSize: m,
|
|
160
160
|
borderSize: s
|
|
161
161
|
};
|
|
162
|
-
}, ge =
|
|
163
|
-
function
|
|
164
|
-
var
|
|
165
|
-
|
|
162
|
+
}, ge = he;
|
|
163
|
+
function B(e, t, n) {
|
|
164
|
+
var r = ie(n);
|
|
165
|
+
x.useLayoutEffect(function() {
|
|
166
166
|
var a = function(s) {
|
|
167
|
-
return
|
|
167
|
+
return r.current(s);
|
|
168
168
|
};
|
|
169
169
|
if (e)
|
|
170
170
|
return e.addEventListener(t, a), function() {
|
|
@@ -172,34 +172,46 @@ function N(e, t, r) {
|
|
|
172
172
|
};
|
|
173
173
|
}, []);
|
|
174
174
|
}
|
|
175
|
-
var me = function(t) {
|
|
176
|
-
|
|
175
|
+
var me = function(t, n) {
|
|
176
|
+
B(document.body, "reset", function(r) {
|
|
177
|
+
t.current.form === r.target && n(r);
|
|
178
|
+
});
|
|
177
179
|
}, be = function(t) {
|
|
178
|
-
|
|
179
|
-
}, pe =
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
B(window, "resize", t);
|
|
181
|
+
}, pe = function(t) {
|
|
182
|
+
B(document.fonts, "loadingdone", t);
|
|
183
|
+
}, ve = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], xe = function(t, n) {
|
|
184
|
+
var r = t.cacheMeasurements, a = t.maxRows, m = t.minRows, s = t.onChange, S = s === void 0 ? _ : s, i = t.onHeightChange, u = i === void 0 ? _ : i, l = ne(t, ve), c = l.value !== void 0, f = x.useRef(null), b = de(f, n), L = x.useRef(0), R = x.useRef(), v = function() {
|
|
185
|
+
var h = f.current, y = r && R.current ? R.current : ge(h);
|
|
182
186
|
if (y) {
|
|
183
187
|
R.current = y;
|
|
184
|
-
var T = se(y,
|
|
185
|
-
|
|
186
|
-
rowHeight:
|
|
188
|
+
var T = se(y, h.value || h.placeholder || "x", m, a), p = T[0], H = T[1];
|
|
189
|
+
L.current !== p && (L.current = p, h.style.setProperty("height", p + "px", "important"), u(p, {
|
|
190
|
+
rowHeight: H
|
|
187
191
|
}));
|
|
188
192
|
}
|
|
189
|
-
}, I = function(
|
|
190
|
-
c ||
|
|
193
|
+
}, I = function(h) {
|
|
194
|
+
c || v(), S(h);
|
|
191
195
|
};
|
|
192
|
-
return
|
|
196
|
+
return x.useLayoutEffect(v), me(f, function() {
|
|
197
|
+
if (!c) {
|
|
198
|
+
var w = f.current.value;
|
|
199
|
+
requestAnimationFrame(function() {
|
|
200
|
+
var h = f.current;
|
|
201
|
+
h && w !== h.value && v();
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}), be(v), pe(v), /* @__PURE__ */ x.createElement("textarea", te({}, l, {
|
|
193
205
|
onChange: I,
|
|
194
|
-
ref:
|
|
206
|
+
ref: b
|
|
195
207
|
}));
|
|
196
|
-
},
|
|
197
|
-
const
|
|
208
|
+
}, ye = /* @__PURE__ */ x.forwardRef(xe);
|
|
209
|
+
const Se = Y((e, t) => {
|
|
198
210
|
const {
|
|
199
|
-
disabled:
|
|
200
|
-
readOnly:
|
|
211
|
+
disabled: n,
|
|
212
|
+
readOnly: r,
|
|
201
213
|
value: a,
|
|
202
|
-
defaultValue:
|
|
214
|
+
defaultValue: m,
|
|
203
215
|
debounceTime: s = 0,
|
|
204
216
|
type: S = "textarea",
|
|
205
217
|
collapseOnBlur: i = !1,
|
|
@@ -207,67 +219,67 @@ const ye = D((e, t) => {
|
|
|
207
219
|
maxRows: l,
|
|
208
220
|
//----------------
|
|
209
221
|
onChange: c,
|
|
210
|
-
onBlur:
|
|
211
|
-
onFocus:
|
|
222
|
+
onBlur: f,
|
|
223
|
+
onFocus: b,
|
|
212
224
|
//----------------
|
|
213
|
-
className:
|
|
225
|
+
className: L = "",
|
|
214
226
|
style: R = {},
|
|
215
|
-
size:
|
|
227
|
+
size: v = "small",
|
|
216
228
|
color: I = "primary",
|
|
217
|
-
...
|
|
218
|
-
} = e, [
|
|
229
|
+
...w
|
|
230
|
+
} = e, [h, y] = F(a || m || ""), T = re(), [p, H] = F(!1), [N, j] = F(u), [P, z] = F(
|
|
219
231
|
i ? u : l
|
|
220
232
|
);
|
|
221
233
|
$(() => {
|
|
222
234
|
a != null && y(a);
|
|
223
235
|
}, [a]), $(() => {
|
|
224
|
-
j(u), i && p === !1 &&
|
|
236
|
+
j(u), i && p === !1 && z(u);
|
|
225
237
|
}, [u, l]), $(() => {
|
|
226
|
-
|
|
238
|
+
z(i ? p === !0 ? l : u : l);
|
|
227
239
|
}, [i]);
|
|
228
|
-
const U =
|
|
229
|
-
|
|
240
|
+
const U = q(
|
|
241
|
+
D((g, E) => G(g, E), s),
|
|
230
242
|
[c]
|
|
231
|
-
), G = (
|
|
232
|
-
c && (c == null || c(
|
|
243
|
+
), G = (g, E) => {
|
|
244
|
+
c && (c == null || c(g, E));
|
|
233
245
|
};
|
|
234
|
-
return /* @__PURE__ */
|
|
246
|
+
return /* @__PURE__ */ O(
|
|
235
247
|
oe,
|
|
236
248
|
{
|
|
237
249
|
style: R,
|
|
238
|
-
className:
|
|
250
|
+
className: L,
|
|
239
251
|
theme: T,
|
|
240
252
|
color: I,
|
|
241
|
-
size:
|
|
253
|
+
size: v,
|
|
242
254
|
focused: p,
|
|
243
|
-
disabled:
|
|
244
|
-
readOnly:
|
|
255
|
+
disabled: n,
|
|
256
|
+
readOnly: r,
|
|
245
257
|
collapseOnBlur: i,
|
|
246
|
-
children: /* @__PURE__ */
|
|
247
|
-
|
|
258
|
+
children: /* @__PURE__ */ O(
|
|
259
|
+
ye,
|
|
248
260
|
{
|
|
249
261
|
ref: t,
|
|
250
|
-
disabled:
|
|
251
|
-
value:
|
|
252
|
-
readOnly:
|
|
253
|
-
minRows:
|
|
262
|
+
disabled: n,
|
|
263
|
+
value: h,
|
|
264
|
+
readOnly: r,
|
|
265
|
+
minRows: N,
|
|
254
266
|
maxRows: P,
|
|
255
|
-
onChange: (
|
|
256
|
-
y(
|
|
267
|
+
onChange: (g) => {
|
|
268
|
+
y(g.target.value), U(g, g.target.value);
|
|
257
269
|
},
|
|
258
|
-
onFocus: (
|
|
259
|
-
|
|
270
|
+
onFocus: (g) => {
|
|
271
|
+
H(!0), i && z(l), b == null || b(g);
|
|
260
272
|
},
|
|
261
|
-
onBlur: (
|
|
262
|
-
|
|
273
|
+
onBlur: (g) => {
|
|
274
|
+
H(!1), i && z(u), f == null || f(g);
|
|
263
275
|
},
|
|
264
|
-
...
|
|
276
|
+
...w
|
|
265
277
|
}
|
|
266
278
|
)
|
|
267
279
|
}
|
|
268
280
|
);
|
|
269
281
|
});
|
|
270
|
-
|
|
282
|
+
Se.propTypes = {
|
|
271
283
|
id: o.string,
|
|
272
284
|
defaultValue: o.string,
|
|
273
285
|
value: o.string,
|
|
@@ -316,5 +328,5 @@ ye.propTypes = {
|
|
|
316
328
|
])
|
|
317
329
|
};
|
|
318
330
|
export {
|
|
319
|
-
|
|
331
|
+
Se as default
|
|
320
332
|
};
|
package/dist/TextInput.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("react/jsx-runtime"),t=require("./index-BPVoEhTF.cjs"),s=require("react"),
|
|
1
|
+
"use strict";const d=require("react/jsx-runtime"),t=require("./index-BPVoEhTF.cjs"),s=require("react"),_=require("./index-DaiUAQVF.cjs"),c=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),n=require("./utils-NZLCh-J5.cjs"),B=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),D=c.newStyled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
${e=>n.getDisabledStateCss(e.theme)}
|
|
43
43
|
background: none;
|
|
44
44
|
}
|
|
45
|
-
`,$=s.forwardRef((e,C)=>{const{disabled:b,readOnly:f,defaultValue:V,value:o,debounceTime:I=0,type:z="text",placeholder:O,tabIndex:R,prefix:p,suffix:g,onChange:l,onBlur:m,onFocus:y,className:w="",style:q={},size:x="small",color:a="primary",...v}=e,i=
|
|
45
|
+
`,$=s.forwardRef((e,C)=>{const{disabled:b,readOnly:f,defaultValue:V,value:o,debounceTime:I=0,type:z="text",placeholder:O,tabIndex:R,prefix:p,suffix:g,onChange:l,onBlur:m,onFocus:y,className:w="",style:q={},size:x="small",color:a="primary",...v}=e,i=B.useTheme(),[j,T]=s.useState(o||V||""),[u,P]=s.useState(!1);s.useEffect(()=>{o!=null&&T(o)},[o]);const W=s.useCallback(_.debounce((r,h)=>k(r,h),I),[l]),k=(r,h)=>{l&&(l==null||l(r,h))},U=r=>{T(r.target.value),W(r,r.target.value)},F=r=>{P(!0),y==null||y(r)},N=r=>{P(!1),m==null||m(r)};return d.jsxs(D,{style:q,className:w,theme:i,color:a,size:x,focused:u,disabled:b,readOnly:f,children:[p&&d.jsx(S,{theme:i,color:a,focused:u,className:"lnc-input-prefix",children:p}),d.jsx(A,{ref:C,type:z,theme:i,color:a,size:x,placeholder:O,prefix:p,suffix:g,disabled:b,readOnly:f,focused:u,onFocus:F,onBlur:N,onChange:U,tabIndex:R,value:j,...v}),g&&d.jsx(E,{theme:i,color:a,focused:u,className:"lnc-input-suffix",children:g})]})});$.propTypes={id:t.PropTypes.string,defaultValue:t.PropTypes.string,value:t.PropTypes.string,disabled:t.PropTypes.bool,readOnly:t.PropTypes.bool,debounceTime:t.PropTypes.number,placeholder:t.PropTypes.string,type:t.PropTypes.oneOf(["text","email"]),tabIndex:t.PropTypes.number,prefix:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),suffix:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),onChange:t.PropTypes.func,onBlur:t.PropTypes.func,onFocus:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=$;
|
package/dist/TextInput.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as W, jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import { P as t } from "./index-S5Cd7WrG.js";
|
|
3
3
|
import { forwardRef as U, useState as C, useEffect as D, useCallback as E } from "react";
|
|
4
|
-
import { d as q } from "./index-
|
|
5
|
-
import { n as u } from "./emotion-styled.browser.esm-
|
|
6
|
-
import { d as s, a,
|
|
7
|
-
import { u as J } from "./emotion-element-
|
|
4
|
+
import { d as q } from "./index-CkWvbrVT.js";
|
|
5
|
+
import { n as u } from "./emotion-styled.browser.esm-CjCaF13H.js";
|
|
6
|
+
import { d as s, b as a, a as A, e as G, h as O, c as H } from "./utils-DtRLzzTZ.js";
|
|
7
|
+
import { u as J } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
8
8
|
const K = u.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|