@lanaco/lnc-react-ui 4.0.95 → 4.0.97
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/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +1 -1
- package/dist/DecimalInputV2.cjs +1 -1
- package/dist/DecimalInputV2.js +20 -20
- package/dist/DetailedProductsSection.cjs +4 -4
- package/dist/DetailedProductsSection.js +16 -14
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +1 -1
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +18 -18
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +14 -14
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +8 -8
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +6 -6
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +6 -6
- package/dist/NumberInput.cjs +19 -19
- package/dist/NumberInput.js +100 -95
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +1 -1
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/RadioGroup.cjs +3 -3
- package/dist/RadioGroup.js +22 -22
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +13 -13
- package/dist/Table.cjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +1 -1
- package/dist/TextInput.cjs +17 -17
- package/dist/TextInput.js +1 -1
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{suspense-product-card-detailed-Z0emIstD.js → suspense-product-card-detailed-Bez9UFMR.js} +61 -49
- package/dist/suspense-product-card-detailed-Yjo62f1v.cjs +124 -0
- package/package.json +1 -1
- package/dist/suspense-product-card-detailed-EXZJLtNh.cjs +0 -114
package/dist/DecimalInput.cjs
CHANGED
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
`,Q=K.styled.span`
|
|
52
52
|
padding: 0 12px;
|
|
53
53
|
color: ${a=>b.getColorRgbaValue(a.theme,"Input",a.focused===!0?"primary":a.color,"enabled","prefix")};
|
|
54
|
-
`,ge=K.styled(Q)``,X=R.forwardRef((a,f)=>{const{disabled:u,readOnly:e,debounceTime:t=0,prefix:r,suffix:o,thousandSeparator:s=".",decimalSeparator:i=",",decimalScale:n=2,fixedDecimalScale:l=!0,allowNegative:c=!0,onChange:p,onBlur:d,onFocus:h,onInputChange:m,className:y="",style:x={},size:N="small",color:P="primary",...C}=a,g=ie.useTheme(),[w,F]=R.useState(!1),E=R.useCallback(ae.debounce((S,D)=>$(S,D),t),[p]),$=(S,D)=>{p&&(p==null||p(S,D)),m==null||m(S,D)},j=(S,D)=>{E(D.event,S==null?void 0:S.floatValue)},M=()=>n<0?0:n>17?17:n,U=S=>{F(!0),h==null||h(S)},V=S=>{F(!1),d==null||d(S)};return B.jsxs(he,{style:x,className:y,theme:g,color:P,size:N,prefix:r,suffix:o,focused:w,disabled:u,readOnly:e,children:[r&&B.jsx(Q,{theme:g,color:P,focused:w,className:"lnc-input-prefix",children:r}),B.jsx(J,{getInputRef:f,className:"lnc-decimal-input",disabled:u,readOnly:e,thousandSeparator:s,decimalSeparator:i,decimalScale:M(),fixedDecimalScale:l,allowNegative:c,onFocus:U,onBlur:V,onValueChange:j,...C}),o&&B.jsx(ge,{theme:g,color:P,focused:w,className:"lnc-input-suffix",children:o})]})});X.propTypes={id:v.PropTypes.
|
|
54
|
+
`,ge=K.styled(Q)``,X=R.forwardRef((a,f)=>{const{disabled:u,readOnly:e,debounceTime:t=0,prefix:r,suffix:o,thousandSeparator:s=".",decimalSeparator:i=",",decimalScale:n=2,fixedDecimalScale:l=!0,allowNegative:c=!0,onChange:p,onBlur:d,onFocus:h,onInputChange:m,className:y="",style:x={},size:N="small",color:P="primary",...C}=a,g=ie.useTheme(),[w,F]=R.useState(!1),E=R.useCallback(ae.debounce((S,D)=>$(S,D),t),[p]),$=(S,D)=>{p&&(p==null||p(S,D)),m==null||m(S,D)},j=(S,D)=>{E(D.event,S==null?void 0:S.floatValue)},M=()=>n<0?0:n>17?17:n,U=S=>{F(!0),h==null||h(S)},V=S=>{F(!1),d==null||d(S)};return B.jsxs(he,{style:x,className:y,theme:g,color:P,size:N,prefix:r,suffix:o,focused:w,disabled:u,readOnly:e,children:[r&&B.jsx(Q,{theme:g,color:P,focused:w,className:"lnc-input-prefix",children:r}),B.jsx(J,{getInputRef:f,className:"lnc-decimal-input",disabled:u,readOnly:e,thousandSeparator:s,decimalSeparator:i,decimalScale:M(),fixedDecimalScale:l,allowNegative:c,onFocus:U,onBlur:V,onValueChange:j,...C}),o&&B.jsx(ge,{theme:g,color:P,focused:w,className:"lnc-input-suffix",children:o})]})});X.propTypes={id:v.PropTypes.any,value:v.PropTypes.any,defaultValue:v.PropTypes.any,disabled:v.PropTypes.bool,readOnly:v.PropTypes.bool,debounceTime:v.PropTypes.number,prefix:v.PropTypes.oneOfType([v.PropTypes.string,v.PropTypes.element]),suffix:v.PropTypes.oneOfType([v.PropTypes.string,v.PropTypes.element]),thousandSeparator:v.PropTypes.oneOf([".",","," "]),decimalSeparator:v.PropTypes.oneOf([".",","]),decimalScale:v.PropTypes.number,fixedDecimalScale:v.PropTypes.bool,allowNegative:v.PropTypes.bool,onChange:v.PropTypes.func,onInputChange:v.PropTypes.func,onBlur:v.PropTypes.func,onFocus:v.PropTypes.func,className:v.PropTypes.string,style:v.PropTypes.object,size:v.PropTypes.oneOf(["small","medium","large"]),color:v.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=X;
|
package/dist/DecimalInput.js
CHANGED
package/dist/DecimalInputV2.cjs
CHANGED
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
`,S=V.styled.span`
|
|
46
46
|
padding: 0 12px;
|
|
47
47
|
color: ${e=>s.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","prefix")};
|
|
48
|
-
`,X=V.styled(S)``,W=h.forwardRef((e,R)=>{const{disabled:w,readOnly:j,prefix:m,suffix:f,decimalSeparator:c=",",decimalScale:a=2,allowNegative:U=!0,onKeyDown:B=()=>{},onBlur:b=()=>{},onFocus:T=()=>{},onChange:N=()=>{},value:x,className:F="",style:K={},size:_="small",color:P="primary",onInputChange:k=()=>{},allowNull:z=!0,...E}=e
|
|
48
|
+
`,X=V.styled(S)``,W=h.forwardRef((e,R)=>{const{disabled:w,readOnly:j,prefix:m,suffix:f,decimalSeparator:c=",",decimalScale:a=2,allowNegative:U=!0,onKeyDown:B=()=>{},onBlur:b=()=>{},onFocus:T=()=>{},onChange:N=()=>{},value:x,className:F="",style:K={},size:_="small",color:P="primary",onInputChange:k=()=>{},allowNull:z=!0,...E}=e,$=M.useTheme(),[C,I]=h.useState(!1),O=o=>{var t,u;if(isNaN(+o)){if(z===!0&&(o==null||o===""))return""}else{const l=(t=o==null?void 0:o.toString())==null?void 0:t.split(".");if(!(l!=null&&l.length)>0)return"0"+c+new Array(a+1).join("0");if((l==null?void 0:l.length)===1)return l.at(0)+c+new Array(a+1).join("0");if((l==null?void 0:l.length)>1){let n=(u=l==null?void 0:l.at(1))==null?void 0:u.toString();if((n==null?void 0:n.length)===a)return l.at(0)+c+n;if((n==null?void 0:n.length)<a)return l.at(0)+c+l.at(1)+new Array(a-n.length+1).join("0");if((n==null?void 0:n.length)>a)return l.at(0)+c+n.slice(0,a)}}return"0"+c+new Array(a+1).join("0")},D=O(x),[G,p]=h.useState(D),r=h.useRef(D);h.useEffect(()=>{const o=O(x);r.current=o,p(r.current)},[x]);const H=o=>{I(!0),T==null||T(o)},J=o=>{I(!1),b==null||b(o)},L=o=>{var u,l;let t=(u=r.current)==null?void 0:u.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)-a),d=t.slice((t==null?void 0:t.length)-a);(n==null?void 0:n.length)===0?n="0":n==="-"&&+t!=0?n="-0":n==="-"&&+t==0&&(n="0");let g=[n,c,d].join("");r.current=g,p(r.current)}else+t==0&&z===!0&&(r==null?void 0:r.current)!==""&&(r.current="",p(r.current),q(o));else if(o.key==="-"&&U===!0&&+t!=0)((l=r==null?void 0:r.current)==null?void 0:l.slice(1))==="-"?r.current=r.current.slice(1,r.current.length):r.current="-"+r.current,p(r.current);else if(!isNaN(o.key)){(t==null?void 0:t.length)===0?t="0"+new Array(a).join("0")+o.key:t=t+o.key;let n=t.slice(0,(t==null?void 0:t.length)-a),d=t.slice((t==null?void 0:t.length)-a);(n==null?void 0:n.length)>1&&(n=n.replace(/^0+/,""),(n==null?void 0:n.length)===0&&(n="0"));let g=[n,c,d].join("");r.current=g,p(r.current)}B(o)},q=o=>{var d,g;if((r==null?void 0:r.current)===""){o.target.value="",k(o,null),N(o,null);return}let t=(d=r==null?void 0:r.current)==null?void 0:d.split(c),u=+(t==null?void 0:t.at(0)),l=((g=t==null?void 0:t.at(1))==null?void 0:g.length)>0?`0.${t==null?void 0:t.at(1)}`:0,n=u+ +l;o.target.value=n,k(o,n),N(o,n)};return y.jsxs(Q,{style:K,className:F,theme:$,color:P,size:_,prefix:m,suffix:f,focused:C,disabled:w,readOnly:j,children:[m&&y.jsx(S,{theme:$,color:P,focused:C,className:"lnc-input-prefix",children:m}),y.jsx("input",{ref:R,type:"text",...E,onKeyDown:L,onBlur:J,value:G,className:"lnc-ui-decimal-v2-input",onFocus:H,disabled:w||j,onChange:o=>{q(o)}}),f&&y.jsx(X,{theme:$,color:P,focused:C,className:"lnc-input-suffix",children:f})]})});W.propTypes={id:i.PropTypes.any,value:i.PropTypes.any,defaultValue:i.PropTypes.any,disabled:i.PropTypes.bool,readOnly:i.PropTypes.bool,debounceTime:i.PropTypes.number,prefix:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.element]),suffix:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.element]),thousandSeparator:i.PropTypes.oneOf([".",","," "]),decimalSeparator:i.PropTypes.oneOf([".",","]),decimalScale:i.PropTypes.number,fixedDecimalScale:i.PropTypes.bool,allowNegative:i.PropTypes.bool,onChange:i.PropTypes.func,onInputChange:i.PropTypes.func,onBlur:i.PropTypes.func,onFocus:i.PropTypes.func,onKeyDown:i.PropTypes.func,className:i.PropTypes.string,style:i.PropTypes.object,size:i.PropTypes.oneOf(["small","medium","large"]),color:i.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=W;
|
package/dist/DecimalInputV2.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as Y, jsx as
|
|
1
|
+
import { jsxs as Y, jsx as k } from "react/jsx-runtime";
|
|
2
2
|
import { P as l } from "./index-S5Cd7WrG.js";
|
|
3
3
|
import { forwardRef as Z, useState as F, useRef as _, useEffect as v } from "react";
|
|
4
|
-
import { s as
|
|
4
|
+
import { s as C } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
5
|
import { d as m, b as u, a as R, e as A, h as P, c as ee } from "./utils-WHYrEnYF.js";
|
|
6
6
|
import { u as te } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
7
|
-
const ne =
|
|
7
|
+
const ne = C.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
|
|
@@ -78,7 +78,7 @@ const ne = k.div`
|
|
|
78
78
|
"placeholder"
|
|
79
79
|
)};
|
|
80
80
|
}
|
|
81
|
-
`, W =
|
|
81
|
+
`, W = C.span`
|
|
82
82
|
padding: 0 12px;
|
|
83
83
|
color: ${(e) => u(
|
|
84
84
|
e.theme,
|
|
@@ -87,7 +87,7 @@ const ne = k.div`
|
|
|
87
87
|
"enabled",
|
|
88
88
|
"prefix"
|
|
89
89
|
)};
|
|
90
|
-
`, ie =
|
|
90
|
+
`, ie = C(W)``, oe = Z((e, U) => {
|
|
91
91
|
const {
|
|
92
92
|
disabled: I,
|
|
93
93
|
readOnly: j,
|
|
@@ -98,7 +98,7 @@ const ne = k.div`
|
|
|
98
98
|
decimalScale: a = 2,
|
|
99
99
|
allowNegative: E = !0,
|
|
100
100
|
// //----------------
|
|
101
|
-
onKeyDown:
|
|
101
|
+
onKeyDown: q = () => {
|
|
102
102
|
},
|
|
103
103
|
onBlur: y = () => {
|
|
104
104
|
},
|
|
@@ -108,15 +108,15 @@ const ne = k.div`
|
|
|
108
108
|
},
|
|
109
109
|
value: x,
|
|
110
110
|
//----------------
|
|
111
|
-
className:
|
|
112
|
-
style:
|
|
111
|
+
className: G = "",
|
|
112
|
+
style: H = {},
|
|
113
113
|
size: J = "small",
|
|
114
114
|
color: $ = "primary",
|
|
115
115
|
onInputChange: V = () => {
|
|
116
116
|
},
|
|
117
117
|
allowNull: z = !0,
|
|
118
118
|
...L
|
|
119
|
-
} = e, w = te(), [
|
|
119
|
+
} = e, w = te(), [N, D] = F(!1), T = (i) => {
|
|
120
120
|
var t, s;
|
|
121
121
|
if (isNaN(+i)) {
|
|
122
122
|
if (z === !0 && (i == null || i === ""))
|
|
@@ -178,7 +178,7 @@ const ne = k.div`
|
|
|
178
178
|
].join("");
|
|
179
179
|
o.current = h, g(o.current);
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
q(i);
|
|
182
182
|
}, K = (i) => {
|
|
183
183
|
var d, h;
|
|
184
184
|
if ((o == null ? void 0 : o.current) === "") {
|
|
@@ -191,28 +191,28 @@ const ne = k.div`
|
|
|
191
191
|
return /* @__PURE__ */ Y(
|
|
192
192
|
ne,
|
|
193
193
|
{
|
|
194
|
-
style:
|
|
195
|
-
className:
|
|
194
|
+
style: H,
|
|
195
|
+
className: G,
|
|
196
196
|
theme: w,
|
|
197
197
|
color: $,
|
|
198
198
|
size: J,
|
|
199
199
|
prefix: f,
|
|
200
200
|
suffix: p,
|
|
201
|
-
focused:
|
|
201
|
+
focused: N,
|
|
202
202
|
disabled: I,
|
|
203
203
|
readOnly: j,
|
|
204
204
|
children: [
|
|
205
|
-
f && /* @__PURE__ */
|
|
205
|
+
f && /* @__PURE__ */ k(
|
|
206
206
|
W,
|
|
207
207
|
{
|
|
208
208
|
theme: w,
|
|
209
209
|
color: $,
|
|
210
|
-
focused:
|
|
210
|
+
focused: N,
|
|
211
211
|
className: "lnc-input-prefix",
|
|
212
212
|
children: f
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ k(
|
|
216
216
|
"input",
|
|
217
217
|
{
|
|
218
218
|
ref: U,
|
|
@@ -225,16 +225,16 @@ const ne = k.div`
|
|
|
225
225
|
onFocus: Q,
|
|
226
226
|
disabled: I || j,
|
|
227
227
|
onChange: (i) => {
|
|
228
|
-
|
|
228
|
+
K(i);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
|
-
p && /* @__PURE__ */
|
|
232
|
+
p && /* @__PURE__ */ k(
|
|
233
233
|
ie,
|
|
234
234
|
{
|
|
235
235
|
theme: w,
|
|
236
236
|
color: $,
|
|
237
|
-
focused:
|
|
237
|
+
focused: N,
|
|
238
238
|
className: "lnc-input-suffix",
|
|
239
239
|
children: p
|
|
240
240
|
}
|
|
@@ -244,7 +244,7 @@ const ne = k.div`
|
|
|
244
244
|
);
|
|
245
245
|
});
|
|
246
246
|
oe.propTypes = {
|
|
247
|
-
id: l.
|
|
247
|
+
id: l.any,
|
|
248
248
|
value: l.any,
|
|
249
249
|
defaultValue: l.any,
|
|
250
250
|
disabled: l.bool,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),
|
|
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-BOtq2mcF.cjs"),U=require("./useDetectMobile-zkbzoOGV.cjs"),M=require("./style-Ce-JyTaX.cjs"),h=require("./suspense-product-card-detailed-Yjo62f1v.cjs"),F=require("./index-Ce6e4efi.cjs"),T=k.styled.div`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
3
|
+
grid-template-columns: ${l=>`repeat(${l.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
6
|
& .button-link {
|
|
7
7
|
white-space: nowrap;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
@media (max-width: ${
|
|
10
|
+
@media (max-width: ${v.MOBILE_SIZE_PX+"px"}) {
|
|
11
11
|
display: flex;
|
|
12
12
|
gap: 1rem;
|
|
13
13
|
overflow-x: auto;
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
/* Safari and Chrome */
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,S=
|
|
29
|
+
`,S=s.memo(h.DetailedProductCard),E=s.forwardRef((l,f)=>{const{icon:a,title:C,buttonLink:c,items:r,buttonText:j,limit:n=4,onSelectCard:u=()=>{},onButtonAction:w=()=>{},isLoading:P=!1,getImage:d=()=>{},negotiableText:m,freeText:p,options:o,onSelectOption:g=()=>{},productsToolbarName:N="All"}=l,b=U.useDetectMobile(),q=s.useMemo(()=>i.jsx(i.Fragment,{children:b===!0?r==null?void 0:r.map((e,t)=>i.jsx(S,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,isSponsored:e==null?void 0:e.isSponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>u(e==null?void 0:e.uuid),imageUrl:d(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:p},t)):r==null?void 0:r.slice(0,n).map((e,t)=>i.jsx(S,{title:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,isSponsored:e==null?void 0:e.isSponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>u(e==null?void 0:e.uuid),imageUrl:d(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:m,freeText:p},t))}),[r,b,n]);return i.jsxs(M.TitleWithOptionsSectionWrapper,{ref:f,children:[i.jsxs("div",{className:"regular-title",children:[i.jsxs("div",{className:"regular-title-text",children:[y.isDefinedNotEmptyString(a)&&i.jsx("i",{className:a}),i.jsx("span",{children:C})]}),y.isDefinedNotEmptyString(c)&&i.jsx(D,{type:"button",btnType:"tinted",color:"gray",onClick:e=>{var t;(t=e==null?void 0:e.target)==null||t.blur(),w(c)},borderRadius:"curved",className:"button-link",children:j})]}),(o==null?void 0:o.length)>0&&i.jsx(F.SelectBar,{items:o,onRemove:e=>{g(e)},onSelect:e=>{g(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:N}),i.jsx(T,{limit:n,children:i.jsx(h.SuspenseDetailedProductCard,{isLoading:P,itemsCount:n,keyPrefix:"explore-landing",children:q})})]})});module.exports=E;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsx as i, Fragment as v, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
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
6
|
import { k as f } from "./utils-WHYrEnYF.js";
|
|
7
7
|
import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
8
|
import { T as I } from "./style-DU0BlP5D.js";
|
|
9
|
-
import { D as L, S as O } from "./suspense-product-card-detailed-
|
|
9
|
+
import { D as L, S as O } from "./suspense-product-card-detailed-Bez9UFMR.js";
|
|
10
10
|
import { S as R } from "./index-BKeVVABC.js";
|
|
11
11
|
const W = D.div`
|
|
12
12
|
display: grid;
|
|
13
|
-
grid-template-columns: ${(
|
|
13
|
+
grid-template-columns: ${(n) => `repeat(${n.limit}, minmax(0, 1fr))`};
|
|
14
14
|
gap: 1.25rem;
|
|
15
15
|
|
|
16
16
|
& .button-link {
|
|
@@ -36,7 +36,7 @@ const W = D.div`
|
|
|
36
36
|
/* Safari and Chrome */
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`, S =
|
|
39
|
+
`, S = U(L), H = M((n, y) => {
|
|
40
40
|
const {
|
|
41
41
|
icon: s,
|
|
42
42
|
title: h,
|
|
@@ -48,7 +48,7 @@ const W = D.div`
|
|
|
48
48
|
},
|
|
49
49
|
onButtonAction: w = () => {
|
|
50
50
|
},
|
|
51
|
-
isLoading:
|
|
51
|
+
isLoading: P = !1,
|
|
52
52
|
getImage: c = () => {
|
|
53
53
|
},
|
|
54
54
|
negotiableText: u,
|
|
@@ -56,12 +56,13 @@ const W = D.div`
|
|
|
56
56
|
options: l,
|
|
57
57
|
onSelectOption: g = () => {
|
|
58
58
|
},
|
|
59
|
-
productsToolbarName:
|
|
60
|
-
} =
|
|
59
|
+
productsToolbarName: k = "All"
|
|
60
|
+
} = n, b = E(), N = T(() => /* @__PURE__ */ i(v, { children: b === !0 ? r == null ? void 0 : r.map((e, o) => /* @__PURE__ */ i(
|
|
61
61
|
S,
|
|
62
62
|
{
|
|
63
63
|
title: e == null ? void 0 : e.name,
|
|
64
64
|
price: e == null ? void 0 : e.price,
|
|
65
|
+
sellingPrice: e == null ? void 0 : e.sellingPrice,
|
|
65
66
|
currency: e == null ? void 0 : e.currency,
|
|
66
67
|
image: e == null ? void 0 : e.image,
|
|
67
68
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
@@ -81,6 +82,7 @@ const W = D.div`
|
|
|
81
82
|
{
|
|
82
83
|
title: e == null ? void 0 : e.name,
|
|
83
84
|
price: e == null ? void 0 : e.price,
|
|
85
|
+
sellingPrice: e == null ? void 0 : e.sellingPrice,
|
|
84
86
|
currency: e == null ? void 0 : e.currency,
|
|
85
87
|
image: e == null ? void 0 : e.image,
|
|
86
88
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
@@ -97,9 +99,9 @@ const W = D.div`
|
|
|
97
99
|
},
|
|
98
100
|
o
|
|
99
101
|
)) }), [r, b, t]);
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ a(I, { ref: y, children: [
|
|
103
|
+
/* @__PURE__ */ a("div", { className: "regular-title", children: [
|
|
104
|
+
/* @__PURE__ */ a("div", { className: "regular-title-text", children: [
|
|
103
105
|
f(s) && /* @__PURE__ */ i("i", { className: s }),
|
|
104
106
|
/* @__PURE__ */ i("span", { children: h })
|
|
105
107
|
] }),
|
|
@@ -132,16 +134,16 @@ const W = D.div`
|
|
|
132
134
|
labelKey: "name",
|
|
133
135
|
valueKey: "code",
|
|
134
136
|
noMargin: !0,
|
|
135
|
-
productsToolbarName:
|
|
137
|
+
productsToolbarName: k
|
|
136
138
|
}
|
|
137
139
|
),
|
|
138
140
|
/* @__PURE__ */ i(W, { limit: t, children: /* @__PURE__ */ i(
|
|
139
141
|
O,
|
|
140
142
|
{
|
|
141
|
-
isLoading:
|
|
143
|
+
isLoading: P,
|
|
142
144
|
itemsCount: t,
|
|
143
145
|
keyPrefix: "explore-landing",
|
|
144
|
-
children:
|
|
146
|
+
children: N
|
|
145
147
|
}
|
|
146
148
|
) })
|
|
147
149
|
] });
|
package/dist/DragAndDropFile.cjs
CHANGED
|
@@ -28,4 +28,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
28
28
|
`,vt=Ca.styled.span`
|
|
29
29
|
align-self: self-end;
|
|
30
30
|
cursor: pointer;
|
|
31
|
-
`,si=s.forwardRef((a,i)=>{const{inputRef:t,id:e="",disabled:n=!1,preventDefault:c,acceptDropzone:r={},acceptInput:d,multiple:b=!1,selectFileText:E="Select file",control:w,dndFileText:F="Drag and drop file here or",showFileSize:M=!1,showDnD:j=!0,className:A="",style:O={},onChange:P=()=>{},onFocus:V=()=>{},onBlur:J=()=>{},onDropAccepted:$=()=>{},onDrop:Q=()=>{},color:K="primary",size:_="small",inputProps:D,alwaysShowDropzone:B=!1,...C}=a,S=xi.useTheme(),[ta,H]=s.useState(!1),[q,v]=s.useState(j),g=s.useRef();s.useEffect(()=>{v(j)},[j]);var ea={theme:S,size:_,color:K,disabled:n,focused:ta};const na=s.useCallback((m,R)=>{Q&&Q(m,R),v(!1)},[]),X=s.useCallback(m=>{P&&!n&&P(m),$&&$(m),v(!1)},[]),h=m=>{P&&!n&&P(m),v(!1)},pa=m=>{var R,Z;i!=null&&i.current?(R=i.current)==null||R.click():(Z=g==null?void 0:g.current)==null||Z.click()},oa=()=>w?s.cloneElement(w,{onClick:m=>{pa(),w.onClick&&w.onClick(m)},disabled:n}):T.jsx(fi,{color:K,size:_,text:E,disabled:n,onClick:m=>{m.preventDefault(),pa()}}),{getRootProps:W,getInputProps:ca,isDragActive:z,open:ga}=ri({onDrop:na,accept:r,onDropAccepted:X,multiple:b,disabled:n,noClick:!0});return T.jsxs(mt,{...ea,className:A,style:O,...W(),...C,ref:i||g,children:[T.jsx(ut,{...ca(),...ea,multiple:b,ref:t,type:"file",action:"bla.html",accept:d,id:e,onFocus:m=>{n||H(!0),V&&!n&&V(m)},onBlur:m=>{n||H(!1),J&&!n&&J(m)},onChange:h,...D}),!z&&!q&&!B&&T.jsx(vt,{children:T.jsx($a,{icon:"plus",size:_})}),(z||q||B)&&T.jsxs(T.Fragment,{children:[T.jsx($a,{icon:"upload",size:_,className:"dnd-icon-lnc"}),F,oa()]})]})});si.propTypes={inputRef:o.PropTypes.any,id:o.PropTypes.
|
|
31
|
+
`,si=s.forwardRef((a,i)=>{const{inputRef:t,id:e="",disabled:n=!1,preventDefault:c,acceptDropzone:r={},acceptInput:d,multiple:b=!1,selectFileText:E="Select file",control:w,dndFileText:F="Drag and drop file here or",showFileSize:M=!1,showDnD:j=!0,className:A="",style:O={},onChange:P=()=>{},onFocus:V=()=>{},onBlur:J=()=>{},onDropAccepted:$=()=>{},onDrop:Q=()=>{},color:K="primary",size:_="small",inputProps:D,alwaysShowDropzone:B=!1,...C}=a,S=xi.useTheme(),[ta,H]=s.useState(!1),[q,v]=s.useState(j),g=s.useRef();s.useEffect(()=>{v(j)},[j]);var ea={theme:S,size:_,color:K,disabled:n,focused:ta};const na=s.useCallback((m,R)=>{Q&&Q(m,R),v(!1)},[]),X=s.useCallback(m=>{P&&!n&&P(m),$&&$(m),v(!1)},[]),h=m=>{P&&!n&&P(m),v(!1)},pa=m=>{var R,Z;i!=null&&i.current?(R=i.current)==null||R.click():(Z=g==null?void 0:g.current)==null||Z.click()},oa=()=>w?s.cloneElement(w,{onClick:m=>{pa(),w.onClick&&w.onClick(m)},disabled:n}):T.jsx(fi,{color:K,size:_,text:E,disabled:n,onClick:m=>{m.preventDefault(),pa()}}),{getRootProps:W,getInputProps:ca,isDragActive:z,open:ga}=ri({onDrop:na,accept:r,onDropAccepted:X,multiple:b,disabled:n,noClick:!0});return T.jsxs(mt,{...ea,className:A,style:O,...W(),...C,ref:i||g,children:[T.jsx(ut,{...ca(),...ea,multiple:b,ref:t,type:"file",action:"bla.html",accept:d,id:e,onFocus:m=>{n||H(!0),V&&!n&&V(m)},onBlur:m=>{n||H(!1),J&&!n&&J(m)},onChange:h,...D}),!z&&!q&&!B&&T.jsx(vt,{children:T.jsx($a,{icon:"plus",size:_})}),(z||q||B)&&T.jsxs(T.Fragment,{children:[T.jsx($a,{icon:"upload",size:_,className:"dnd-icon-lnc"}),F,oa()]})]})});si.propTypes={inputRef:o.PropTypes.any,id:o.PropTypes.any,disabled:o.PropTypes.bool,accept:o.PropTypes.object,multiple:o.PropTypes.bool,selectFileText:o.PropTypes.string,control:o.PropTypes.element,dndFileText:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.element]),showFileSize:o.PropTypes.bool,showDnD:o.PropTypes.bool,alwaysShowDropzone:o.PropTypes.bool,onChange:o.PropTypes.func,onFocus:o.PropTypes.func,onBlur:o.PropTypes.func,onDropAccepted:o.PropTypes.func,onDrop:o.PropTypes.func,className:o.PropTypes.string,style:o.PropTypes.object,size:o.PropTypes.oneOf(["small","medium","large"]),color:o.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"]),inputProps:o.PropTypes.any};module.exports=si;
|
package/dist/DragAndDropFile.js
CHANGED
package/dist/Dropdown.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react/jsx-runtime"),e=require("./index-BPVoEhTF.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react/jsx-runtime"),e=require("./index-BPVoEhTF.cjs"),s=require("react"),t=require("./CustomStyles-BoYYyJVV.cjs"),l=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs");require("./index-EeoArxOx.cjs");const O=require("./index-DaiUAQVF.cjs");function S(o){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(p,r,n.get?n:{enumerable:!0,get:()=>o[r]})}}return p.default=o,Object.freeze(p)}const M=S(s);var h=s.forwardRef(function(o,p){var r=t.useStateManager(o);return M.createElement(t.Select,l._extends({ref:p},r))}),j=h;const a=s.forwardRef((o,p)=>{const{styles:r,debounceTime:n=0,name:C,isSearchable:u=!0,isClearable:c=!0,size:y="small",color:i="primary",className:T="",style:P={},...b}=o,m=l.useTheme();return s.useCallback(O.debounce((f,d)=>{onInputChange==null||onInputChange(f,d)},n)),g.jsx(j,{ref:p,styles:r||t.customStyles,size:y,color:i,theme:m,isSearchable:u,isClearable:c,className:T,style:P,...b})});a.propTypes={options:e.PropTypes.array,styles:e.PropTypes.object,debounceTime:e.PropTypes.number,name:e.PropTypes.string,value:e.PropTypes.any,tabIndex:e.PropTypes.number,isSearchable:e.PropTypes.bool,isClearable:e.PropTypes.bool,isLoading:e.PropTypes.bool,isRtl:e.PropTypes.bool,isDisabled:e.PropTypes.bool,readOnly:e.PropTypes.bool,closeMenuOnSelect:e.PropTypes.bool,closeMenuOnScroll:e.PropTypes.oneOfType([e.PropTypes.bool,e.PropTypes.func]),escapeClearsValue:e.PropTypes.bool,filterOption:e.PropTypes.func,formatGroupLabel:e.PropTypes.func,formatOptionLabel:e.PropTypes.func,getOptionLabel:e.PropTypes.func,getOptionValue:e.PropTypes.func,hideSelectedOptions:e.PropTypes.bool,id:e.PropTypes.any,inputid:e.PropTypes.any,isOptionDisabled:e.PropTypes.func,isOptionSelected:e.PropTypes.func,loadingMessage:e.PropTypes.func,minMenuHeight:e.PropTypes.number,maxMenuHeight:e.PropTypes.number,menuPlacement:e.PropTypes.oneOf(["bottom","auto","top"]),menuPosition:e.PropTypes.oneOf(["absolute","fixed"]),menuShouldBlockScroll:e.PropTypes.bool,menuShouldScrollIntoView:e.PropTypes.bool,openMenuOnFocus:e.PropTypes.bool,openMenuOnClick:e.PropTypes.bool,autoFocus:e.PropTypes.bool,placeholder:e.PropTypes.any,noOptionsMessage:e.PropTypes.string,menuIsOpen:e.PropTypes.bool,components:e.PropTypes.object,defaultValue:e.PropTypes.any,defaultInputValue:e.PropTypes.string,defaultMenuIsOpen:e.PropTypes.bool,delimiter:e.PropTypes.string,onChange:e.PropTypes.func,onInputChange:e.PropTypes.func,onMenuOpen:e.PropTypes.func,onMenuClose:e.PropTypes.func,onFocus:e.PropTypes.func,onBlur:e.PropTypes.func,className:e.PropTypes.string,style:e.PropTypes.object,color:e.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:e.PropTypes.oneOf(["small","medium","large"])};exports.components=t.components;exports.default=a;
|
package/dist/Dropdown.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as g } from "react/jsx-runtime";
|
|
2
2
|
import { P as e } from "./index-S5Cd7WrG.js";
|
|
3
3
|
import * as O from "react";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { u as
|
|
4
|
+
import { forwardRef as t, useCallback as y } from "react";
|
|
5
|
+
import { u as S, S as M, a as h } from "./CustomStyles-9CHBrzIM.js";
|
|
6
6
|
import { c as H } from "./CustomStyles-9CHBrzIM.js";
|
|
7
|
-
import { _ as C, u as
|
|
7
|
+
import { _ as C, u as x } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
8
8
|
import "./index-64mXPFBC.js";
|
|
9
|
-
import { d as
|
|
10
|
-
var T = /* @__PURE__ */
|
|
11
|
-
var o =
|
|
9
|
+
import { d as I } from "./index-CkWvbrVT.js";
|
|
10
|
+
var T = /* @__PURE__ */ t(function(n, a) {
|
|
11
|
+
var o = S(n);
|
|
12
12
|
return /* @__PURE__ */ O.createElement(M, C({
|
|
13
|
-
ref:
|
|
13
|
+
ref: a
|
|
14
14
|
}, o));
|
|
15
15
|
}), P = T;
|
|
16
|
-
const V =
|
|
16
|
+
const V = t((n, a) => {
|
|
17
17
|
const {
|
|
18
18
|
// options,
|
|
19
19
|
styles: o,
|
|
@@ -65,27 +65,27 @@ const V = a((n, t) => {
|
|
|
65
65
|
// onBlur,
|
|
66
66
|
// onFocus,
|
|
67
67
|
size: u = "small",
|
|
68
|
-
color:
|
|
69
|
-
className:
|
|
68
|
+
color: c = "primary",
|
|
69
|
+
className: i = "",
|
|
70
70
|
style: m = {},
|
|
71
71
|
// children,
|
|
72
72
|
...p
|
|
73
|
-
} = n, b =
|
|
74
|
-
return
|
|
75
|
-
|
|
73
|
+
} = n, b = x();
|
|
74
|
+
return y(
|
|
75
|
+
I((f, d) => {
|
|
76
76
|
onInputChange == null || onInputChange(f, d);
|
|
77
77
|
}, l)
|
|
78
78
|
), /* @__PURE__ */ g(
|
|
79
79
|
P,
|
|
80
80
|
{
|
|
81
|
-
ref:
|
|
81
|
+
ref: a,
|
|
82
82
|
styles: o || h,
|
|
83
83
|
size: u,
|
|
84
|
-
color:
|
|
84
|
+
color: c,
|
|
85
85
|
theme: b,
|
|
86
86
|
isSearchable: s,
|
|
87
87
|
isClearable: r,
|
|
88
|
-
className:
|
|
88
|
+
className: i,
|
|
89
89
|
style: m,
|
|
90
90
|
...p
|
|
91
91
|
}
|
|
@@ -160,11 +160,11 @@ V.propTypes = {
|
|
|
160
160
|
/**
|
|
161
161
|
* The id to set on the SelectContainer component
|
|
162
162
|
*/
|
|
163
|
-
id: e.
|
|
163
|
+
id: e.any,
|
|
164
164
|
/**
|
|
165
165
|
* The id of the search input
|
|
166
166
|
*/
|
|
167
|
-
|
|
167
|
+
inputid: e.any,
|
|
168
168
|
/**
|
|
169
169
|
* Override the built-in logic to detect whether an option is disabled. `(...) => boolean`
|
|
170
170
|
*/
|
package/dist/DropdownLookup.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const le=require("react/jsx-runtime"),e=require("./index-BPVoEhTF.cjs"),t=require("react"),B=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),
|
|
1
|
+
"use strict";const le=require("react/jsx-runtime"),e=require("./index-BPVoEhTF.cjs"),t=require("react"),B=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),s=require("./CustomStyles-BoYYyJVV.cjs"),ce=require("./defineProperty-CqVRDJI8.cjs");require("./index-EeoArxOx.cjs");const fe=require("./index-DaiUAQVF.cjs");function de(o){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(p,n,a.get?a:{enumerable:!0,get:()=>o[n]})}}return p.default=o,Object.freeze(p)}const ye=de(t);var Te=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function Pe(o){var p=o.defaultOptions,n=p===void 0?!1:p,a=o.cacheOptions,i=a===void 0?!1:a,y=o.loadOptions;o.options;var l=o.isLoading,h=l===void 0?!1:l,S=o.onInputChange,m=o.filterOption,C=m===void 0?null:m,g=s._objectWithoutProperties(o,Te),_=g.inputValue,u=t.useRef(void 0),c=t.useRef(!1),T=t.useState(Array.isArray(n)?n:void 0),f=s._slicedToArray(T,2),G=f[0],x=f[1],W=t.useState(typeof _<"u"?_:""),q=s._slicedToArray(W,2),D=q[0],I=q[1],J=t.useState(n===!0),R=s._slicedToArray(J,2),K=R[0],P=R[1],Q=t.useState(void 0),w=s._slicedToArray(Q,2),A=w[0],L=w[1],U=t.useState([]),E=s._slicedToArray(U,2),X=E[0],j=E[1],Y=t.useState(!1),$=s._slicedToArray(Y,2),Z=$[0],v=$[1],ee=t.useState({}),k=s._slicedToArray(ee,2),O=k[0],F=k[1],te=t.useState(void 0),z=s._slicedToArray(te,2),oe=z[0],ne=z[1],se=t.useState(void 0),N=s._slicedToArray(se,2),re=N[0],pe=N[1];i!==re&&(F({}),pe(i)),n!==oe&&(x(Array.isArray(n)?n:void 0),ne(n)),t.useEffect(function(){return c.current=!0,function(){c.current=!1}},[]);var M=t.useCallback(function(b,d){if(!y)return d();var r=y(b,d);r&&typeof r.then=="function"&&r.then(d,function(){return d()})},[y]);t.useEffect(function(){n===!0&&M(D,function(b){c.current&&(x(b||[]),P(!!u.current))})},[]);var ae=t.useCallback(function(b,d){var r=s.handleInputChange(b,d,S);if(!r){u.current=void 0,I(""),L(""),j([]),P(!1),v(!1);return}if(i&&O[r])I(r),L(r),j(O[r]),P(!1),v(!1);else{var ie=u.current={};I(r),P(!0),v(!A),M(r,function(V){c&&ie===u.current&&(u.current=void 0,P(!1),L(r),j(V||[]),v(!1),F(V?s._objectSpread2(s._objectSpread2({},O),{},ce._defineProperty({},r,V)):O))})}},[i,M,A,O,S]),ue=Z?[]:D&&A?X:G||[];return s._objectSpread2(s._objectSpread2({},g),{},{options:ue,isLoading:K||h,onInputChange:ae,filterOption:C})}var Oe=t.forwardRef(function(o,p){var n=Pe(o),a=s.useStateManager(n);return ye.createElement(s.Select,B._extends({ref:p},a))}),be=Oe;const H=t.forwardRef((o,p)=>{const{styles:n,debounceTime:a=0,isSearchable:i=!0,isClearable:y=!0,onInputChange:l,size:h="small",color:S="primary",className:m="",style:C={},...g}=o,_=B.useTheme(),u=t.useCallback(fe.debounce((T,f)=>{l==null||l(T,f)},a)),c=(T,f)=>{u(T,f)};return le.jsx(be,{ref:p,styles:n||s.customStyles,size:h,color:S,theme:_,isSearchable:i,isClearable:y,onInputChange:c,className:m,style:C,...g})});H.propTypes={defaultOptions:e.PropTypes.oneOfType([e.PropTypes.bool,e.PropTypes.array]),cacheOptions:e.PropTypes.any,loadOptions:e.PropTypes.func,styles:e.PropTypes.object,debounceTime:e.PropTypes.number,name:e.PropTypes.string,value:e.PropTypes.any,tabIndex:e.PropTypes.number,isSearchable:e.PropTypes.bool,isClearable:e.PropTypes.bool,isLoading:e.PropTypes.bool,isRtl:e.PropTypes.bool,isDisabled:e.PropTypes.bool,readOnly:e.PropTypes.bool,closeMenuOnSelect:e.PropTypes.bool,closeMenuOnScroll:e.PropTypes.oneOfType([e.PropTypes.bool,e.PropTypes.func]),escapeClearsValue:e.PropTypes.bool,filterOption:e.PropTypes.func,formatGroupLabel:e.PropTypes.func,formatOptionLabel:e.PropTypes.func,getOptionLabel:e.PropTypes.func,getOptionValue:e.PropTypes.func,hideSelectedOptions:e.PropTypes.bool,id:e.PropTypes.any,inputid:e.PropTypes.any,isOptionDisabled:e.PropTypes.func,isOptionSelected:e.PropTypes.func,loadingMessage:e.PropTypes.func,minMenuHeight:e.PropTypes.number,maxMenuHeight:e.PropTypes.number,menuPlacement:e.PropTypes.oneOf(["bottom","auto","top"]),menuPosition:e.PropTypes.oneOf(["absolute","fixed"]),menuShouldBlockScroll:e.PropTypes.bool,menuShouldScrollIntoView:e.PropTypes.bool,openMenuOnFocus:e.PropTypes.bool,openMenuOnClick:e.PropTypes.bool,autoFocus:e.PropTypes.bool,placeholder:e.PropTypes.any,noOptionsMessage:e.PropTypes.string,menuIsOpen:e.PropTypes.bool,components:e.PropTypes.object,defaultValue:e.PropTypes.string,defaultInputValue:e.PropTypes.string,defaultMenuIsOpen:e.PropTypes.bool,delimiter:e.PropTypes.string,onChange:e.PropTypes.func,onInputChange:e.PropTypes.func,onMenuOpen:e.PropTypes.func,onMenuClose:e.PropTypes.func,onFocus:e.PropTypes.func,onBlur:e.PropTypes.func,className:e.PropTypes.string,style:e.PropTypes.object,color:e.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:e.PropTypes.oneOf(["small","medium","large"])};module.exports=H;
|
package/dist/DropdownLookup.js
CHANGED
|
@@ -3,7 +3,7 @@ import { P as e } from "./index-S5Cd7WrG.js";
|
|
|
3
3
|
import * as Oe from "react";
|
|
4
4
|
import { useRef as G, useState as a, useEffect as W, useCallback as j, forwardRef as J } from "react";
|
|
5
5
|
import { _ as me, u as be } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
6
|
-
import { _ as
|
|
6
|
+
import { _ as Se, b as s, h as ge, d as C, u as he, S as ve, a as ye } from "./CustomStyles-9CHBrzIM.js";
|
|
7
7
|
import { _ as _e } from "./defineProperty-DF3p0mVo.js";
|
|
8
8
|
import "./index-64mXPFBC.js";
|
|
9
9
|
import { d as Ie } from "./index-CkWvbrVT.js";
|
|
@@ -11,39 +11,39 @@ var Ce = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading
|
|
|
11
11
|
function Le(o) {
|
|
12
12
|
var r = o.defaultOptions, t = r === void 0 ? !1 : r, i = o.cacheOptions, l = i === void 0 ? !1 : i, d = o.loadOptions;
|
|
13
13
|
o.options;
|
|
14
|
-
var p = o.isLoading, L = p === void 0 ? !1 : p, h = o.onInputChange, v = o.filterOption, M = v === void 0 ? null : v, y =
|
|
14
|
+
var p = o.isLoading, L = p === void 0 ? !1 : p, h = o.onInputChange, v = o.filterOption, M = v === void 0 ? null : v, y = Se(o, Ce), _ = y.inputValue, u = G(void 0), O = G(!1), m = a(Array.isArray(t) ? t : void 0), f = s(m, 2), K = f[0], R = f[1], Q = a(typeof _ < "u" ? _ : ""), $ = s(Q, 2), w = $[0], P = $[1], U = a(t === !0), E = s(U, 2), X = E[0], b = E[1], Y = a(void 0), F = s(Y, 2), V = F[0], A = F[1], Z = a([]), z = s(Z, 2), ee = z[0], T = z[1], te = a(!1), B = s(te, 2), ne = B[0], I = B[1], oe = a({}), H = s(oe, 2), S = H[0], N = H[1], ae = a(void 0), k = s(ae, 2), se = k[0], ue = k[1], re = a(void 0), q = s(re, 2), ie = q[0], le = q[1];
|
|
15
15
|
l !== ie && (N({}), le(l)), t !== se && (R(Array.isArray(t) ? t : void 0), ue(t)), W(function() {
|
|
16
16
|
return O.current = !0, function() {
|
|
17
17
|
O.current = !1;
|
|
18
18
|
};
|
|
19
19
|
}, []);
|
|
20
|
-
var x = j(function(
|
|
20
|
+
var x = j(function(g, c) {
|
|
21
21
|
if (!d) return c();
|
|
22
|
-
var n = d(
|
|
22
|
+
var n = d(g, c);
|
|
23
23
|
n && typeof n.then == "function" && n.then(c, function() {
|
|
24
24
|
return c();
|
|
25
25
|
});
|
|
26
26
|
}, [d]);
|
|
27
27
|
W(function() {
|
|
28
|
-
t === !0 && x(w, function(
|
|
29
|
-
O.current && (R(
|
|
28
|
+
t === !0 && x(w, function(g) {
|
|
29
|
+
O.current && (R(g || []), b(!!u.current));
|
|
30
30
|
});
|
|
31
31
|
}, []);
|
|
32
|
-
var pe = j(function(
|
|
33
|
-
var n =
|
|
32
|
+
var pe = j(function(g, c) {
|
|
33
|
+
var n = ge(g, c, h);
|
|
34
34
|
if (!n) {
|
|
35
35
|
u.current = void 0, P(""), A(""), T([]), b(!1), I(!1);
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
if (l &&
|
|
39
|
-
P(n), A(n), T(
|
|
38
|
+
if (l && S[n])
|
|
39
|
+
P(n), A(n), T(S[n]), b(!1), I(!1);
|
|
40
40
|
else {
|
|
41
41
|
var ce = u.current = {};
|
|
42
42
|
P(n), b(!0), I(!V), x(n, function(D) {
|
|
43
|
-
O && ce === u.current && (u.current = void 0, b(!1), A(n), T(D || []), I(!1), N(D ? C(C({},
|
|
43
|
+
O && ce === u.current && (u.current = void 0, b(!1), A(n), T(D || []), I(!1), N(D ? C(C({}, S), {}, _e({}, n, D)) : S));
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
}, [l, x, V,
|
|
46
|
+
}, [l, x, V, S, h]), fe = ne ? [] : w && V ? ee : K || [];
|
|
47
47
|
return C(C({}, y), {}, {
|
|
48
48
|
options: fe,
|
|
49
49
|
isLoading: X || L,
|
|
@@ -220,11 +220,11 @@ Ve.propTypes = {
|
|
|
220
220
|
/**
|
|
221
221
|
* The id to set on the SelectContainer component
|
|
222
222
|
*/
|
|
223
|
-
id: e.
|
|
223
|
+
id: e.any,
|
|
224
224
|
/**
|
|
225
225
|
* The id of the search input
|
|
226
226
|
*/
|
|
227
|
-
|
|
227
|
+
inputid: e.any,
|
|
228
228
|
/**
|
|
229
229
|
* Override the built-in logic to detect whether an option is disabled. `(...) => boolean`
|
|
230
230
|
*/
|
package/dist/Icon.cjs
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
display: inline-flex;
|
|
6
6
|
justify-content: center;
|
|
7
7
|
align-items: center;
|
|
8
|
-
`,t=z.forwardRef((e,r)=>{const{id:h="",icon:i="",iconStyle:l="solid",tooltip:c="",sizeInUnits:a="",size:y="small",color:m,className:d="",style:u={},...p}=e,g={theme:b.useTheme(),size:y,color:m,sizeInUnits:a},f=()=>{var T=l==="solid"?"fas":"far";return`${T} fa-${i} fa-fw`};return n.jsx(I,{ref:r,...g,tooltip:c,className:d,style:u,...p,children:n.jsx("i",{"data-control":!!e["data-control"],className:f()})})});t.propTypes={id:s.PropTypes.
|
|
8
|
+
`,t=z.forwardRef((e,r)=>{const{id:h="",icon:i="",iconStyle:l="solid",tooltip:c="",sizeInUnits:a="",size:y="small",color:m,className:d="",style:u={},...p}=e,g={theme:b.useTheme(),size:y,color:m,sizeInUnits:a},f=()=>{var T=l==="solid"?"fas":"far";return`${T} fa-${i} fa-fw`};return n.jsx(I,{ref:r,...g,tooltip:c,className:d,style:u,...p,children:n.jsx("i",{"data-control":!!e["data-control"],className:f()})})});t.propTypes={id:s.PropTypes.any,icon:s.PropTypes.string,iconStyle:s.PropTypes.oneOf(["solid","regular"]),tooltip:s.PropTypes.string,className:s.PropTypes.string,style:s.PropTypes.object,size:s.PropTypes.oneOf(["small","medium","large"]),sizeInUnits:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=t;
|
package/dist/Icon.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as z } from "react";
|
|
3
3
|
import { P as o } from "./index-S5Cd7WrG.js";
|
|
4
4
|
import { s as I } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
@@ -17,10 +17,10 @@ const $ = I.span`
|
|
|
17
17
|
display: inline-flex;
|
|
18
18
|
justify-content: center;
|
|
19
19
|
align-items: center;
|
|
20
|
-
`, x = z((e,
|
|
20
|
+
`, x = z((e, s) => {
|
|
21
21
|
const {
|
|
22
22
|
id: U = "",
|
|
23
|
-
icon:
|
|
23
|
+
icon: t = "",
|
|
24
24
|
iconStyle: i = "solid",
|
|
25
25
|
tooltip: r = "",
|
|
26
26
|
sizeInUnits: a = "",
|
|
@@ -31,18 +31,18 @@ const $ = I.span`
|
|
|
31
31
|
...d
|
|
32
32
|
} = e, g = { theme: p(), size: l, color: c, sizeInUnits: a }, y = () => {
|
|
33
33
|
var u = i === "solid" ? "fas" : "far";
|
|
34
|
-
return `${u} fa-${
|
|
34
|
+
return `${u} fa-${t} fa-fw`;
|
|
35
35
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ n(
|
|
37
37
|
$,
|
|
38
38
|
{
|
|
39
|
-
ref:
|
|
39
|
+
ref: s,
|
|
40
40
|
...g,
|
|
41
41
|
tooltip: r,
|
|
42
42
|
className: m,
|
|
43
43
|
style: f,
|
|
44
44
|
...d,
|
|
45
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ n(
|
|
46
46
|
"i",
|
|
47
47
|
{
|
|
48
48
|
"data-control": !!e["data-control"],
|
|
@@ -53,7 +53,7 @@ const $ = I.span`
|
|
|
53
53
|
);
|
|
54
54
|
});
|
|
55
55
|
x.propTypes = {
|
|
56
|
-
id: o.
|
|
56
|
+
id: o.any,
|
|
57
57
|
icon: o.string,
|
|
58
58
|
iconStyle: o.oneOf(["solid", "regular"]),
|
|
59
59
|
tooltip: o.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const O=require("react/jsx-runtime"),e=require("./index-BPVoEhTF.cjs"),s=require("react"),g=require("./CustomStyles-BoYYyJVV.cjs"),h=require("./index-DaiUAQVF.cjs"),M=require("./Dropdown.cjs"),S=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),r=s.forwardRef((n,l)=>{const{styles:p,debounceTime:t=0,isSearchable:u=!0,isClearable:y=!0,onInputChange:o,size:i="small",color:a="primary",className:c="",style:T={},...P}=n,b=S.useTheme(),m=s.useCallback(h.debounce((d,f)=>{o==null||o(d,f)},t));return O.jsx(M.default,{isMulti:!0,ref:l,styles:p||g.customStyles,size:i,color:a,theme:b,isSearchable:u,isClearable:y,className:c,style:T,...P,onInputChange:m})});r.propTypes={options:e.PropTypes.array,styles:e.PropTypes.object,debounceTime:e.PropTypes.number,name:e.PropTypes.string,value:e.PropTypes.any,tabIndex:e.PropTypes.number,isSearchable:e.PropTypes.bool,isClearable:e.PropTypes.bool,isLoading:e.PropTypes.bool,isRtl:e.PropTypes.bool,isDisabled:e.PropTypes.bool,readOnly:e.PropTypes.bool,closeMenuOnSelect:e.PropTypes.bool,closeMenuOnScroll:e.PropTypes.oneOfType([e.PropTypes.bool,e.PropTypes.func]),escapeClearsValue:e.PropTypes.bool,filterOption:e.PropTypes.func,formatGroupLabel:e.PropTypes.func,formatOptionLabel:e.PropTypes.func,getOptionLabel:e.PropTypes.func,getOptionValue:e.PropTypes.func,hideSelectedOptions:e.PropTypes.bool,id:e.PropTypes.any,inputid:e.PropTypes.any,isOptionDisabled:e.PropTypes.func,isOptionSelected:e.PropTypes.func,loadingMessage:e.PropTypes.func,minMenuHeight:e.PropTypes.number,maxMenuHeight:e.PropTypes.number,menuPlacement:e.PropTypes.oneOf(["bottom","auto","top"]),menuPosition:e.PropTypes.oneOf(["absolute","fixed"]),menuShouldBlockScroll:e.PropTypes.bool,menuShouldScrollIntoView:e.PropTypes.bool,openMenuOnFocus:e.PropTypes.bool,openMenuOnClick:e.PropTypes.bool,autoFocus:e.PropTypes.bool,placeholder:e.PropTypes.any,noOptionsMessage:e.PropTypes.string,menuIsOpen:e.PropTypes.bool,components:e.PropTypes.object,defaultValue:e.PropTypes.string,defaultInputValue:e.PropTypes.string,defaultMenuIsOpen:e.PropTypes.bool,delimiter:e.PropTypes.string,onChange:e.PropTypes.func,onInputChange:e.PropTypes.func,onMenuOpen:e.PropTypes.func,onMenuClose:e.PropTypes.func,onFocus:e.PropTypes.func,onBlur:e.PropTypes.func,onKeyDown:e.PropTypes.func,className:e.PropTypes.string,style:e.PropTypes.object,color:e.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:e.PropTypes.oneOf(["small","medium","large"])};module.exports=r;
|