@lanaco/lnc-react-ui 4.0.104 → 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 +17 -15
- package/dist/Button.js +149 -136
- 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 +10 -10
- package/dist/IconButton.js +125 -121
- 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/DecimalInputV2.cjs
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const m=require("react/jsx-runtime"),l=require("./index-BPVoEhTF.cjs"),y=require("react"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),a=require("./utils-CZynEOC_.cjs"),M=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),Q=k.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=>a.getSizeValueWithUnits(e.theme,e.size)};
|
|
6
|
+
max-height: ${e=>a.getSizeValueWithUnits(e.theme,e.size)};
|
|
7
|
+
background-color: ${e=>a.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
|
|
8
8
|
border: 1px solid
|
|
9
|
-
${e=>
|
|
10
|
-
border-radius: ${e=>
|
|
9
|
+
${e=>a.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","border")};
|
|
10
|
+
border-radius: ${e=>a.getBorderRadiusValueWithUnits(e.theme,"regular")};
|
|
11
11
|
|
|
12
|
-
${e=>e.focused===!0&&e.readOnly!==!0?
|
|
13
|
-
${e=>e.isDisabled===!0?
|
|
14
|
-
${e=>e.isDisabled===!0
|
|
12
|
+
${e=>e.focused===!0&&e.readOnly!==!0?a.getOutlineCss(e.theme):""}
|
|
13
|
+
/* ${e=>e.isDisabled===!0?a.getDisabledStateCss(e.theme):""} */
|
|
14
|
+
${e=>e.isDisabled===!0&&`background-color: ${a.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
|
|
15
|
+
color: ${u=>a.getColorRgbaValue(u.theme,"Input",u.color,"disabled","text")};`}
|
|
16
|
+
${e=>e.isDisabled===!0?"border: 1px solid "+a.getColorRgbaValue(e.theme,"Input",e.color,"disabled","border"):""}
|
|
15
17
|
|
|
16
18
|
& input {
|
|
17
19
|
background: none;
|
|
@@ -21,17 +23,19 @@
|
|
|
21
23
|
padding-bottom: 0.625rem;
|
|
22
24
|
width: 100%;
|
|
23
25
|
|
|
24
|
-
${e=>
|
|
25
|
-
min-height: ${e=>
|
|
26
|
-
max-height: ${e=>
|
|
27
|
-
color: ${e=>
|
|
28
|
-
caret-color: ${e=>
|
|
26
|
+
${e=>a.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")}
|
|
27
|
+
min-height: ${e=>a.getSizeValueWithUnits(e.theme,e.size)};
|
|
28
|
+
max-height: ${e=>a.getSizeValueWithUnits(e.theme,e.size)};
|
|
29
|
+
color: ${e=>a.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","text")};
|
|
30
|
+
caret-color: ${e=>a.getColorRgbaValue(e.theme,"Input",e.color,"enabled","caret")};
|
|
29
31
|
padding-right: ${e=>e.suffix?"0":"0.75rem"};
|
|
30
32
|
padding-left: ${e=>e.prefix?"0":"0.75rem"};
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
& input:disabled {
|
|
34
|
-
${e=>
|
|
36
|
+
/* ${e=>a.getDisabledStateCss(e.theme)} */
|
|
37
|
+
${e=>`background-color: ${a.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
|
|
38
|
+
color: ${u=>a.getColorRgbaValue(u.theme,"Input",u.color,"disabled","text")};`}
|
|
35
39
|
background: none;
|
|
36
40
|
}
|
|
37
41
|
|
|
@@ -40,9 +44,9 @@
|
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
& input::placeholder {
|
|
43
|
-
color: ${e=>
|
|
47
|
+
color: ${e=>a.getColorRgbaValue(e.theme,"Input",e.color,"enabled","placeholder")};
|
|
44
48
|
}
|
|
45
|
-
`,S=
|
|
49
|
+
`,S=k.styled.span`
|
|
46
50
|
padding: 0 12px;
|
|
47
|
-
color: ${e=>
|
|
48
|
-
`,X=
|
|
51
|
+
color: ${e=>a.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","prefix")};
|
|
52
|
+
`,X=k.styled(S)``,W=y.forwardRef((e,u)=>{const{disabled:w,readOnly:I,prefix:b,suffix:f,decimalSeparator:c=",",decimalScale:s=2,allowNegative:U=!0,onKeyDown:B=()=>{},onBlur:T=()=>{},onFocus:x=()=>{},onChange:j=()=>{},value:P,className:F="",style:K={},size:_="small",color:$="primary",onInputChange:N=()=>{},allowNull:O=!0,...E}=e,C=M.useTheme(),[V,z]=y.useState(!1),D=o=>{var t,d;if(isNaN(+o)){if(O===!0&&(o==null||o===""))return""}else{const i=(t=o==null?void 0:o.toString())==null?void 0:t.split(".");if(!(i!=null&&i.length)>0)return"0"+c+new Array(s+1).join("0");if((i==null?void 0:i.length)===1)return i.at(0)+c+new Array(s+1).join("0");if((i==null?void 0:i.length)>1){let n=(d=i==null?void 0:i.at(1))==null?void 0:d.toString();if((n==null?void 0:n.length)===s)return i.at(0)+c+n;if((n==null?void 0:n.length)<s)return i.at(0)+c+i.at(1)+new Array(s-n.length+1).join("0");if((n==null?void 0:n.length)>s)return i.at(0)+c+n.slice(0,s)}}return"0"+c+new Array(s+1).join("0")},R=D(P),[G,h]=y.useState(R),r=y.useRef(R);y.useEffect(()=>{const o=D(P);r.current=o,h(r.current)},[P]);const H=o=>{z(!0),x==null||x(o)},J=o=>{z(!1),T==null||T(o)},L=o=>{var d,i;let t=(d=r.current)==null?void 0:d.replace(c,"");if(o.key==="Delete"||o.key==="Backspace")if(+t!=0){t=t.slice(0,(t==null?void 0:t.length)-1);let n=t.slice(0,(t==null?void 0:t.length)-s),g=t.slice((t==null?void 0:t.length)-s);(n==null?void 0:n.length)===0?n="0":n==="-"&&+t!=0?n="-0":n==="-"&&+t==0&&(n="0");let p=[n,c,g].join("");r.current=p,h(r.current)}else+t==0&&O===!0&&(r==null?void 0:r.current)!==""&&(r.current="",h(r.current),q(o));else if(o.key==="-"&&U===!0&&+t!=0)((i=r==null?void 0:r.current)==null?void 0:i.slice(1))==="-"?r.current=r.current.slice(1,r.current.length):r.current="-"+r.current,h(r.current);else if(!isNaN(o.key)){(t==null?void 0:t.length)===0?t="0"+new Array(s).join("0")+o.key:t=t+o.key;let n=t.slice(0,(t==null?void 0:t.length)-s),g=t.slice((t==null?void 0:t.length)-s);(n==null?void 0:n.length)>1&&(n=n.replace(/^0+/,""),(n==null?void 0:n.length)===0&&(n="0"));let p=[n,c,g].join("");r.current=p,h(r.current)}B(o)},q=o=>{var g,p;if((r==null?void 0:r.current)===""){o.target.value="",N(o,null),j(o,null);return}let t=(g=r==null?void 0:r.current)==null?void 0:g.split(c),d=+(t==null?void 0:t.at(0)),i=((p=t==null?void 0:t.at(1))==null?void 0:p.length)>0?`0.${t==null?void 0:t.at(1)}`:0,n=d+ +i;o.target.value=n,N(o,n),j(o,n)};return m.jsxs(Q,{style:K,className:F,theme:C,color:$,size:_,prefix:b,suffix:f,focused:V,disabled:w,readOnly:I,children:[b&&m.jsx(S,{theme:C,color:$,focused:V,className:"lnc-input-prefix",children:b}),m.jsx("input",{ref:u,type:"text",...E,onKeyDown:L,onBlur:J,value:G,className:"lnc-ui-decimal-v2-input",onFocus:H,disabled:w||I,onChange:o=>{q(o)}}),f&&m.jsx(X,{theme:C,color:$,focused:V,className:"lnc-input-suffix",children:f})]})});W.propTypes={id:l.PropTypes.any,value:l.PropTypes.any,defaultValue:l.PropTypes.any,disabled:l.PropTypes.bool,readOnly:l.PropTypes.bool,debounceTime:l.PropTypes.number,prefix:l.PropTypes.oneOfType([l.PropTypes.string,l.PropTypes.element]),suffix:l.PropTypes.oneOfType([l.PropTypes.string,l.PropTypes.element]),thousandSeparator:l.PropTypes.oneOf([".",","," "]),decimalSeparator:l.PropTypes.oneOf([".",","]),decimalScale:l.PropTypes.number,fixedDecimalScale:l.PropTypes.bool,allowNegative:l.PropTypes.bool,onChange:l.PropTypes.func,onInputChange:l.PropTypes.func,onBlur:l.PropTypes.func,onFocus:l.PropTypes.func,onKeyDown:l.PropTypes.func,className:l.PropTypes.string,style:l.PropTypes.object,size:l.PropTypes.oneOf(["small","medium","large"]),color:l.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=W;
|
package/dist/DecimalInputV2.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as Y, jsx as
|
|
1
|
+
import { jsxs as Y, jsx as N } from "react/jsx-runtime";
|
|
2
2
|
import { P as l } from "./index-S5Cd7WrG.js";
|
|
3
|
-
import { forwardRef as Z, useState as
|
|
4
|
-
import { s as
|
|
5
|
-
import { d as
|
|
3
|
+
import { forwardRef as Z, useState as P, useRef as _, useEffect as v } from "react";
|
|
4
|
+
import { s as O } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
|
+
import { d as f, b as c, a as R, e as A, h as W, c as ee } from "./utils-BbgAIA9N.js";
|
|
6
6
|
import { u as te } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
|
-
const ne =
|
|
7
|
+
const ne = O.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
|
|
11
|
-
min-height: ${(e) =>
|
|
12
|
-
max-height: ${(e) =>
|
|
13
|
-
background-color: ${(e) =>
|
|
11
|
+
min-height: ${(e) => f(e.theme, e.size)};
|
|
12
|
+
max-height: ${(e) => f(e.theme, e.size)};
|
|
13
|
+
background-color: ${(e) => c(
|
|
14
14
|
e.theme,
|
|
15
15
|
"Input",
|
|
16
16
|
e.color,
|
|
@@ -18,7 +18,7 @@ const ne = C.div`
|
|
|
18
18
|
"background"
|
|
19
19
|
)};
|
|
20
20
|
border: 1px solid
|
|
21
|
-
${(e) =>
|
|
21
|
+
${(e) => c(
|
|
22
22
|
e.theme,
|
|
23
23
|
"Input",
|
|
24
24
|
e.focused === !0 ? "primary" : e.color,
|
|
@@ -28,8 +28,23 @@ const ne = C.div`
|
|
|
28
28
|
border-radius: ${(e) => R(e.theme, "regular")};
|
|
29
29
|
|
|
30
30
|
${(e) => e.focused === !0 && e.readOnly !== !0 ? A(e.theme) : ""}
|
|
31
|
-
${(e) => e.isDisabled === !0 ?
|
|
32
|
-
${(e) => e.isDisabled === !0
|
|
31
|
+
/* ${(e) => e.isDisabled === !0 ? W(e.theme) : ""} */
|
|
32
|
+
${(e) => e.isDisabled === !0 && `background-color: ${c(
|
|
33
|
+
e.theme,
|
|
34
|
+
"Input",
|
|
35
|
+
e.color,
|
|
36
|
+
"disabled",
|
|
37
|
+
"background",
|
|
38
|
+
"backgroundOpacity"
|
|
39
|
+
)};
|
|
40
|
+
color: ${(u) => c(
|
|
41
|
+
u.theme,
|
|
42
|
+
"Input",
|
|
43
|
+
u.color,
|
|
44
|
+
"disabled",
|
|
45
|
+
"text"
|
|
46
|
+
)};`}
|
|
47
|
+
${(e) => e.isDisabled === !0 ? "border: 1px solid " + c(
|
|
33
48
|
e.theme,
|
|
34
49
|
"Input",
|
|
35
50
|
e.color,
|
|
@@ -46,22 +61,37 @@ const ne = C.div`
|
|
|
46
61
|
width: 100%;
|
|
47
62
|
|
|
48
63
|
${(e) => ee(e.theme, "Input", e.size, "enabled")}
|
|
49
|
-
min-height: ${(e) =>
|
|
50
|
-
max-height: ${(e) =>
|
|
51
|
-
color: ${(e) =>
|
|
64
|
+
min-height: ${(e) => f(e.theme, e.size)};
|
|
65
|
+
max-height: ${(e) => f(e.theme, e.size)};
|
|
66
|
+
color: ${(e) => c(
|
|
52
67
|
e.theme,
|
|
53
68
|
"Input",
|
|
54
69
|
e.focused === !0 ? "primary" : e.color,
|
|
55
70
|
"enabled",
|
|
56
71
|
"text"
|
|
57
72
|
)};
|
|
58
|
-
caret-color: ${(e) =>
|
|
73
|
+
caret-color: ${(e) => c(e.theme, "Input", e.color, "enabled", "caret")};
|
|
59
74
|
padding-right: ${(e) => e.suffix ? "0" : "0.75rem"};
|
|
60
75
|
padding-left: ${(e) => e.prefix ? "0" : "0.75rem"};
|
|
61
76
|
}
|
|
62
77
|
|
|
63
78
|
& input:disabled {
|
|
64
|
-
${(e) =>
|
|
79
|
+
/* ${(e) => W(e.theme)} */
|
|
80
|
+
${(e) => `background-color: ${c(
|
|
81
|
+
e.theme,
|
|
82
|
+
"Input",
|
|
83
|
+
e.color,
|
|
84
|
+
"disabled",
|
|
85
|
+
"background",
|
|
86
|
+
"backgroundOpacity"
|
|
87
|
+
)};
|
|
88
|
+
color: ${(u) => c(
|
|
89
|
+
u.theme,
|
|
90
|
+
"Input",
|
|
91
|
+
u.color,
|
|
92
|
+
"disabled",
|
|
93
|
+
"text"
|
|
94
|
+
)};`}
|
|
65
95
|
background: none;
|
|
66
96
|
}
|
|
67
97
|
|
|
@@ -70,7 +100,7 @@ const ne = C.div`
|
|
|
70
100
|
}
|
|
71
101
|
|
|
72
102
|
& input::placeholder {
|
|
73
|
-
color: ${(e) =>
|
|
103
|
+
color: ${(e) => c(
|
|
74
104
|
e.theme,
|
|
75
105
|
"Input",
|
|
76
106
|
e.color,
|
|
@@ -78,115 +108,115 @@ const ne = C.div`
|
|
|
78
108
|
"placeholder"
|
|
79
109
|
)};
|
|
80
110
|
}
|
|
81
|
-
`,
|
|
111
|
+
`, U = O.span`
|
|
82
112
|
padding: 0 12px;
|
|
83
|
-
color: ${(e) =>
|
|
113
|
+
color: ${(e) => c(
|
|
84
114
|
e.theme,
|
|
85
115
|
"Input",
|
|
86
116
|
e.focused === !0 ? "primary" : e.color,
|
|
87
117
|
"enabled",
|
|
88
118
|
"prefix"
|
|
89
119
|
)};
|
|
90
|
-
`,
|
|
120
|
+
`, oe = O(U)``, ie = Z((e, u) => {
|
|
91
121
|
const {
|
|
92
|
-
disabled:
|
|
122
|
+
disabled: C,
|
|
93
123
|
readOnly: j,
|
|
94
124
|
// debounceTime = 0,
|
|
95
|
-
prefix:
|
|
96
|
-
suffix:
|
|
97
|
-
decimalSeparator:
|
|
125
|
+
prefix: b,
|
|
126
|
+
suffix: y,
|
|
127
|
+
decimalSeparator: d = ",",
|
|
98
128
|
decimalScale: a = 2,
|
|
99
129
|
allowNegative: E = !0,
|
|
100
130
|
// //----------------
|
|
101
131
|
onKeyDown: q = () => {
|
|
102
132
|
},
|
|
103
|
-
onBlur:
|
|
133
|
+
onBlur: p = () => {
|
|
104
134
|
},
|
|
105
|
-
onFocus:
|
|
135
|
+
onFocus: x = () => {
|
|
106
136
|
},
|
|
107
|
-
onChange:
|
|
137
|
+
onChange: D = () => {
|
|
108
138
|
},
|
|
109
|
-
value:
|
|
139
|
+
value: $,
|
|
110
140
|
//----------------
|
|
111
141
|
className: G = "",
|
|
112
142
|
style: H = {},
|
|
113
143
|
size: J = "small",
|
|
114
|
-
color:
|
|
144
|
+
color: k = "primary",
|
|
115
145
|
onInputChange: V = () => {
|
|
116
146
|
},
|
|
117
147
|
allowNull: z = !0,
|
|
118
148
|
...L
|
|
119
|
-
} = e, w = te(), [
|
|
149
|
+
} = e, w = te(), [I, T] = P(!1), B = (o) => {
|
|
120
150
|
var t, s;
|
|
121
|
-
if (isNaN(+
|
|
122
|
-
if (z === !0 && (
|
|
151
|
+
if (isNaN(+o)) {
|
|
152
|
+
if (z === !0 && (o == null || o === ""))
|
|
123
153
|
return "";
|
|
124
154
|
} else {
|
|
125
|
-
const r = (t =
|
|
155
|
+
const r = (t = o == null ? void 0 : o.toString()) == null ? void 0 : t.split(".");
|
|
126
156
|
if (!(r != null && r.length) > 0)
|
|
127
|
-
return "0" +
|
|
157
|
+
return "0" + d + new Array(a + 1).join("0");
|
|
128
158
|
if ((r == null ? void 0 : r.length) === 1)
|
|
129
|
-
return r.at(0) +
|
|
159
|
+
return r.at(0) + d + new Array(a + 1).join("0");
|
|
130
160
|
if ((r == null ? void 0 : r.length) > 1) {
|
|
131
161
|
let n = (s = r == null ? void 0 : r.at(1)) == null ? void 0 : s.toString();
|
|
132
162
|
if ((n == null ? void 0 : n.length) === a)
|
|
133
|
-
return r.at(0) +
|
|
163
|
+
return r.at(0) + d + n;
|
|
134
164
|
if ((n == null ? void 0 : n.length) < a)
|
|
135
|
-
return r.at(0) +
|
|
165
|
+
return r.at(0) + d + r.at(1) + new Array(a - n.length + 1).join("0");
|
|
136
166
|
if ((n == null ? void 0 : n.length) > a)
|
|
137
|
-
return r.at(0) +
|
|
167
|
+
return r.at(0) + d + n.slice(0, a);
|
|
138
168
|
}
|
|
139
169
|
}
|
|
140
|
-
return "0" +
|
|
141
|
-
},
|
|
170
|
+
return "0" + d + new Array(a + 1).join("0");
|
|
171
|
+
}, K = B($), [M, m] = P(K), i = _(K);
|
|
142
172
|
v(() => {
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
}, [
|
|
146
|
-
const Q = (
|
|
147
|
-
|
|
148
|
-
}, S = (
|
|
149
|
-
|
|
150
|
-
}, X = (
|
|
173
|
+
const o = B($);
|
|
174
|
+
i.current = o, m(i.current);
|
|
175
|
+
}, [$]);
|
|
176
|
+
const Q = (o) => {
|
|
177
|
+
T(!0), x == null || x(o);
|
|
178
|
+
}, S = (o) => {
|
|
179
|
+
T(!1), p == null || p(o);
|
|
180
|
+
}, X = (o) => {
|
|
151
181
|
var s, r;
|
|
152
|
-
let t = (s =
|
|
153
|
-
if (
|
|
182
|
+
let t = (s = i.current) == null ? void 0 : s.replace(d, "");
|
|
183
|
+
if (o.key === "Delete" || o.key === "Backspace")
|
|
154
184
|
if (+t != 0) {
|
|
155
185
|
t = t.slice(0, (t == null ? void 0 : t.length) - 1);
|
|
156
186
|
let n = t.slice(
|
|
157
187
|
0,
|
|
158
188
|
(t == null ? void 0 : t.length) - a
|
|
159
|
-
),
|
|
189
|
+
), h = t.slice((t == null ? void 0 : t.length) - a);
|
|
160
190
|
(n == null ? void 0 : n.length) === 0 ? n = "0" : n === "-" && +t != 0 ? n = "-0" : n === "-" && +t == 0 && (n = "0");
|
|
161
|
-
let
|
|
191
|
+
let g = [
|
|
162
192
|
n,
|
|
163
|
-
|
|
164
|
-
|
|
193
|
+
d,
|
|
194
|
+
h
|
|
165
195
|
].join("");
|
|
166
|
-
|
|
167
|
-
} else +t == 0 && z === !0 && (
|
|
168
|
-
else if (
|
|
169
|
-
((r =
|
|
170
|
-
else if (!isNaN(
|
|
171
|
-
(t == null ? void 0 : t.length) === 0 ? t = "0" + new Array(a).join("0") +
|
|
172
|
-
let n = t.slice(0, (t == null ? void 0 : t.length) - a),
|
|
196
|
+
i.current = g, m(i.current);
|
|
197
|
+
} else +t == 0 && z === !0 && (i == null ? void 0 : i.current) !== "" && (i.current = "", m(i.current), F(o));
|
|
198
|
+
else if (o.key === "-" && E === !0 && +t != 0)
|
|
199
|
+
((r = i == null ? void 0 : i.current) == null ? void 0 : r.slice(1)) === "-" ? i.current = i.current.slice(1, i.current.length) : i.current = "-" + i.current, m(i.current);
|
|
200
|
+
else if (!isNaN(o.key)) {
|
|
201
|
+
(t == null ? void 0 : t.length) === 0 ? t = "0" + new Array(a).join("0") + o.key : t = t + o.key;
|
|
202
|
+
let n = t.slice(0, (t == null ? void 0 : t.length) - a), h = t.slice((t == null ? void 0 : t.length) - a);
|
|
173
203
|
(n == null ? void 0 : n.length) > 1 && (n = n.replace(/^0+/, ""), (n == null ? void 0 : n.length) === 0 && (n = "0"));
|
|
174
|
-
let
|
|
204
|
+
let g = [
|
|
175
205
|
n,
|
|
176
|
-
|
|
177
|
-
|
|
206
|
+
d,
|
|
207
|
+
h
|
|
178
208
|
].join("");
|
|
179
|
-
|
|
209
|
+
i.current = g, m(i.current);
|
|
180
210
|
}
|
|
181
|
-
q(
|
|
182
|
-
},
|
|
183
|
-
var
|
|
184
|
-
if ((
|
|
185
|
-
|
|
211
|
+
q(o);
|
|
212
|
+
}, F = (o) => {
|
|
213
|
+
var h, g;
|
|
214
|
+
if ((i == null ? void 0 : i.current) === "") {
|
|
215
|
+
o.target.value = "", V(o, null), D(o, null);
|
|
186
216
|
return;
|
|
187
217
|
}
|
|
188
|
-
let t = (
|
|
189
|
-
|
|
218
|
+
let t = (h = i == null ? void 0 : i.current) == null ? void 0 : h.split(d), s = +(t == null ? void 0 : t.at(0)), r = ((g = t == null ? void 0 : t.at(1)) == null ? void 0 : g.length) > 0 ? `0.${t == null ? void 0 : t.at(1)}` : 0, n = s + +r;
|
|
219
|
+
o.target.value = n, V(o, n), D(o, n);
|
|
190
220
|
};
|
|
191
221
|
return /* @__PURE__ */ Y(
|
|
192
222
|
ne,
|
|
@@ -194,28 +224,28 @@ const ne = C.div`
|
|
|
194
224
|
style: H,
|
|
195
225
|
className: G,
|
|
196
226
|
theme: w,
|
|
197
|
-
color:
|
|
227
|
+
color: k,
|
|
198
228
|
size: J,
|
|
199
|
-
prefix:
|
|
200
|
-
suffix:
|
|
201
|
-
focused:
|
|
202
|
-
disabled:
|
|
229
|
+
prefix: b,
|
|
230
|
+
suffix: y,
|
|
231
|
+
focused: I,
|
|
232
|
+
disabled: C,
|
|
203
233
|
readOnly: j,
|
|
204
234
|
children: [
|
|
205
|
-
|
|
206
|
-
|
|
235
|
+
b && /* @__PURE__ */ N(
|
|
236
|
+
U,
|
|
207
237
|
{
|
|
208
238
|
theme: w,
|
|
209
|
-
color:
|
|
210
|
-
focused:
|
|
239
|
+
color: k,
|
|
240
|
+
focused: I,
|
|
211
241
|
className: "lnc-input-prefix",
|
|
212
|
-
children:
|
|
242
|
+
children: b
|
|
213
243
|
}
|
|
214
244
|
),
|
|
215
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ N(
|
|
216
246
|
"input",
|
|
217
247
|
{
|
|
218
|
-
ref:
|
|
248
|
+
ref: u,
|
|
219
249
|
type: "text",
|
|
220
250
|
...L,
|
|
221
251
|
onKeyDown: X,
|
|
@@ -223,27 +253,27 @@ const ne = C.div`
|
|
|
223
253
|
value: M,
|
|
224
254
|
className: "lnc-ui-decimal-v2-input",
|
|
225
255
|
onFocus: Q,
|
|
226
|
-
disabled:
|
|
227
|
-
onChange: (
|
|
228
|
-
|
|
256
|
+
disabled: C || j,
|
|
257
|
+
onChange: (o) => {
|
|
258
|
+
F(o);
|
|
229
259
|
}
|
|
230
260
|
}
|
|
231
261
|
),
|
|
232
|
-
|
|
233
|
-
|
|
262
|
+
y && /* @__PURE__ */ N(
|
|
263
|
+
oe,
|
|
234
264
|
{
|
|
235
265
|
theme: w,
|
|
236
|
-
color:
|
|
237
|
-
focused:
|
|
266
|
+
color: k,
|
|
267
|
+
focused: I,
|
|
238
268
|
className: "lnc-input-suffix",
|
|
239
|
-
children:
|
|
269
|
+
children: y
|
|
240
270
|
}
|
|
241
271
|
)
|
|
242
272
|
]
|
|
243
273
|
}
|
|
244
274
|
);
|
|
245
275
|
});
|
|
246
|
-
|
|
276
|
+
ie.propTypes = {
|
|
247
277
|
id: l.any,
|
|
248
278
|
value: l.any,
|
|
249
279
|
defaultValue: l.any,
|
|
@@ -300,5 +330,5 @@ oe.propTypes = {
|
|
|
300
330
|
])
|
|
301
331
|
};
|
|
302
332
|
export {
|
|
303
|
-
|
|
333
|
+
ie as default
|
|
304
334
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),s=require("react"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),D=require("./Button.cjs"),y=require("./utils-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),s=require("react"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),v=require("./consts-goSZX3xP.cjs"),D=require("./Button.cjs"),y=require("./utils-CZynEOC_.cjs"),U=require("./useDetectMobile-zkbzoOGV.cjs"),M=require("./style-JqDQj4jh.cjs"),h=require("./suspense-product-card-detailed-DXwya4fQ.cjs"),F=require("./index-C1DkD2ug.cjs"),T=k.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${l=>`repeat(${l.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -3,11 +3,11 @@ import { memo as U, forwardRef as M, useMemo as T } from "react";
|
|
|
3
3
|
import { s as D } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as F } from "./consts-BuFChS64.js";
|
|
5
5
|
import B from "./Button.js";
|
|
6
|
-
import { k as f } from "./utils-
|
|
6
|
+
import { k as f } from "./utils-BbgAIA9N.js";
|
|
7
7
|
import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
|
-
import { T as I } from "./style-
|
|
9
|
-
import { D as L, S as O } from "./suspense-product-card-detailed-
|
|
10
|
-
import { S as R } from "./index-
|
|
8
|
+
import { T as I } from "./style-08foMKSd.js";
|
|
9
|
+
import { D as L, S as O } from "./suspense-product-card-detailed-bYBpLiXc.js";
|
|
10
|
+
import { S as R } from "./index-CQLF61YV.js";
|
|
11
11
|
const W = D.div`
|
|
12
12
|
display: grid;
|
|
13
13
|
grid-template-columns: ${(n) => `repeat(${n.limit}, minmax(0, 1fr))`};
|
package/dist/DetailsView.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),k=require("react"),e=require("./index-BPVoEhTF.cjs"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./FlexGrid.cjs"),L=require("./FlexGridItem.cjs"),n=require("./utils-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),k=require("react"),e=require("./index-BPVoEhTF.cjs"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./FlexGrid.cjs"),L=require("./FlexGridItem.cjs"),n=require("./utils-CZynEOC_.cjs"),_=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),W=require("./Button.cjs"),c=require("./IconButton.cjs"),A=T.styled.label`
|
|
2
2
|
display: block;
|
|
3
3
|
margin-bottom: 4px;
|
|
4
4
|
${o=>n.getComponentTypographyCss(o.theme,"FormField",o.size,"enabled")}
|
package/dist/DetailsView.js
CHANGED
|
@@ -4,7 +4,7 @@ import { P as e } from "./index-S5Cd7WrG.js";
|
|
|
4
4
|
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
5
|
import W from "./FlexGrid.js";
|
|
6
6
|
import A from "./FlexGridItem.js";
|
|
7
|
-
import { c as Y, b as B, g as U, a as q } from "./utils-
|
|
7
|
+
import { c as Y, b as B, g as U, a as q } from "./utils-BbgAIA9N.js";
|
|
8
8
|
import { u as E } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
9
9
|
import H from "./Button.js";
|
|
10
10
|
import c from "./IconButton.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),s=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),i=require("./index-BPVoEhTF.cjs"),o=require("./utils-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("react"),v=require("./emotion-styled.browser.esm-BtEseadx.cjs"),i=require("./index-BPVoEhTF.cjs"),o=require("./utils-CZynEOC_.cjs"),C=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),N=({theme:e,size:y})=>{var u=o.getSizeValueWithUnits(e,y);return`
|
|
2
2
|
min-height: ${u};
|
|
3
3
|
max-height: ${u};
|
|
4
4
|
`},b={small:"0.875rem",medium:"1.125rem",large:"1.375rem"},S=v.styled.div`
|
|
@@ -2,7 +2,7 @@ import { jsxs as f, jsx as r, Fragment as V } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as F, useState as w, useEffect as x, useRef as T, useCallback as j } from "react";
|
|
3
3
|
import { s as $ } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { P as i } from "./index-S5Cd7WrG.js";
|
|
5
|
-
import { b as u, a as R, c as E, d as O } from "./utils-
|
|
5
|
+
import { b as u, a as R, c as E, d as O } from "./utils-BbgAIA9N.js";
|
|
6
6
|
import { u as D } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
7
|
const L = ({ theme: e, size: k }) => {
|
|
8
8
|
var s = O(e, k);
|