akeneo-design-system 4.0.83 → 4.0.85
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/lib/components/Input/MetricInput/MetricInput.js +3 -3
- package/lib/components/Input/MultiSelectInput/ChipInput.js +11 -11
- package/lib/components/Input/MultiSelectInput/MultiSelectInput.js +8 -8
- package/lib/components/Input/NumberInput/NumberInput.js +18 -17
- package/lib/components/Input/SelectInput/SelectInput.js +16 -16
- package/lib/components/Modal/Modal.js +18 -18
- package/lib/index.d.ts +4 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";var a=require("react/jsx-runtime"),M=require("react"),N=require("../NumberInput/NumberInput.js"),s=require("../SelectInput/SelectInput.js"),S=require("styled-components"),r=require("../../../theme/theme.js");function k(e){return e&&e.__esModule?e:{default:e}}var n=k(S);const R=n.default(N.NumberInput)`
|
|
2
2
|
border-right: none;
|
|
3
3
|
border-top-right-radius: 0;
|
|
4
4
|
border-bottom-right-radius: 0;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
span {
|
|
34
34
|
color: ${r.getColor("grey",100)};
|
|
35
35
|
}
|
|
36
|
-
`,
|
|
36
|
+
`,D=n.default.div`
|
|
37
37
|
display: flex;
|
|
38
38
|
> *:nth-child(2) {
|
|
39
39
|
width: auto;
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
&:focus-within ${c}::after {
|
|
42
42
|
display: none;
|
|
43
43
|
}
|
|
44
|
-
`,
|
|
44
|
+
`,L=({amount:e,onAmountChange:p,unit:b,onUnitChange:f,unitOptions:o,openLabel:h,emptyResultLabel:g="No result found",amountPlaceholder:v,unitPlaceholder:x,min:m,max:I,invalid:u=!1,readOnly:i=!1,id:y,"aria-labelledby":C,amountAriaLabel:w,unitAriaLabel:q,highlightable:$=!1})=>{const d=M.useCallback((t,j)=>{const l=o.find(_=>_.value===t);return l?typeof l.label=="string"?l.label:l.label(j):""},[o]);return a.jsxs(D,{children:[a.jsx(R,{value:e,onChange:p,withIncrementIcons:!1,placeholder:v,min:m,max:I,invalid:u,"data-testid":"value","aria-label":w,readOnly:i,id:y,highlightable:$}),a.jsx(c,{onChange:f,value:b||null,clearable:!1,openLabel:h,emptyResultLabel:g,placeholder:x,invalid:u,$invalid:u,"data-testid":"currency",readOnly:i,"aria-labelledby":C,"aria-label":q,children:o.map(t=>a.jsx(s.SelectInput.Option,{value:t.value,title:d(t.value,e),children:d(t.value,e)},t.value))})]})};exports.MetricInput=L;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var n=require("react/jsx-runtime"),f=require("react"),_=require("styled-components"),R=require("../../../icons/CloseIcon.js"),C=require("../../../icons/LockIcon.js"),e=require("../../../theme/theme.js"),E=require("../../IconButton/IconButton.js"),T=require("../../../hooks/useBooleanState.js"),D=require("../../../hooks/useShortcut.js"),F=require("../../../hooks/useTheme.js"),K=require("../../../shared/key.js");function b(r){return r&&r.__esModule?r:{default:r}}var M=b(f),l=b(_);const A=l.default.ul`
|
|
2
2
|
border: 1px solid ${({$invalid:r})=>r?e.getColor("red",100):e.getColor("grey",80)};
|
|
3
3
|
border-radius: 2px;
|
|
4
4
|
padding: 4px 30px 4px 4px;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
&:focus-within {
|
|
16
16
|
box-shadow: 0 0 0 2px ${e.getColor("blue",40)};
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,G=l.default.li`
|
|
19
19
|
list-style-type: none;
|
|
20
20
|
padding: 3px;
|
|
21
21
|
border: 1px ${({$isErrored:r})=>r?e.getColor("red",80):e.getColor("grey",80)} solid;
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
height: 30px;
|
|
26
26
|
max-width: 100%;
|
|
27
27
|
box-sizing: border-box;
|
|
28
|
-
color: ${({$readOnly:r,$isErrored:t,$isLocked:
|
|
29
|
-
`,
|
|
28
|
+
color: ${({$readOnly:r,$isErrored:t,$isLocked:s})=>t?e.getColor("red",100):r||s?e.getColor("grey",100):e.getColor("grey",140)};
|
|
29
|
+
`,H=l.default.span`
|
|
30
30
|
min-width: 0;
|
|
31
31
|
overflow: hidden;
|
|
32
32
|
text-overflow: ellipsis;
|
|
33
33
|
white-space: nowrap;
|
|
34
|
-
`,
|
|
34
|
+
`,y=l.default.input`
|
|
35
35
|
width: 100%;
|
|
36
36
|
height: 100%;
|
|
37
37
|
border: 0;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
opacity: 1;
|
|
45
45
|
color: ${e.getColor("grey",100)};
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,J=l.default.li`
|
|
48
48
|
list-style-type: none;
|
|
49
49
|
color: ${e.getColor("grey",120)};
|
|
50
50
|
border: 0;
|
|
@@ -53,20 +53,20 @@
|
|
|
53
53
|
align-items: center;
|
|
54
54
|
display: flex;
|
|
55
55
|
|
|
56
|
-
:first-child > ${
|
|
56
|
+
:first-child > ${y} {
|
|
57
57
|
padding-left: 11px;
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,N=l.default(C.LockIcon)`
|
|
60
60
|
position: absolute;
|
|
61
61
|
right: 0;
|
|
62
62
|
top: 0;
|
|
63
63
|
margin: 11px;
|
|
64
64
|
color: ${e.getColor("grey",100)};
|
|
65
|
-
`,
|
|
65
|
+
`,P=l.default(C.LockIcon)`
|
|
66
66
|
padding-right: 5px;
|
|
67
|
-
`,
|
|
67
|
+
`,Q=l.default(E.IconButton)`
|
|
68
68
|
background-color: transparent;
|
|
69
69
|
margin-left: -3px;
|
|
70
70
|
margin-right: 1px;
|
|
71
71
|
color: ${({$isErrored:r})=>r?e.getColor("red",100):e.getColor("grey",100)};
|
|
72
|
-
`,
|
|
72
|
+
`,U=M.default.forwardRef(({id:r,value:t,invalidValue:s,invalid:g,readOnly:a,placeholder:$,searchValue:d,removeLabel:m,onRemove:c,onSearchChange:v,onPaste:w,onFocus:I,lockedValues:i,"aria-labelledby":q,"aria-label":j},p)=>{const u=F.useTheme(),[x,L,h]=T.useBooleanState(),B=o=>v(o.target.value),z=()=>{d!==""||t.length===0||(x?c(t[t.length-1].code):L())};return f.useEffect(()=>{h()},[t,d]),D.useShortcut(K.Key.Backspace,z,p),n.jsxs(A,{$invalid:g,$readOnly:a,children:[t.map((o,S)=>n.jsxs(G,{title:o.label,$readOnly:a,$isLocked:i==null?void 0:i.includes(o.code),$isErrored:s.includes(o.code),$isSelected:S===t.length-1&&x,children:[!a&&!(i!=null&&i.includes(o.code))&&n.jsx(Q,{title:m,ghost:"borderless",size:"small",level:"tertiary",icon:n.jsx(R.CloseIcon,{color:s.includes(o.code)?u.color.red100:u.color.grey100}),onClick:()=>c(o.code),$isErrored:s.includes(o.code)}),(i==null?void 0:i.includes(o.code))&&n.jsx(P,{size:16}),n.jsx(H,{children:o.label})]},o.code)),n.jsxs(J,{children:[n.jsx(y,{type:"text",id:r,value:d,ref:p,placeholder:t.length===0?$:void 0,onChange:B,onPaste:w,onBlur:h,"aria-invalid":g,"aria-labelledby":q,"aria-label":j,readOnly:a,disabled:a,onFocus:I}),a&&n.jsx(N,{size:16})]})]})});exports.ChipInput=U;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Kt=Object.defineProperty,Nt=Object.defineProperties;var zt=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var vt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable;var dt=(e,s,u)=>s in e?Kt(e,s,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[s]=u,G=(e,s)=>{for(var u in s||(s={}))vt.call(s,u)&&dt(e,u,s[u]);if(B)for(var u of B(s))wt.call(s,u)&&dt(e,u,s[u]);return e},_=(e,s)=>Nt(e,zt(s));var V=(e,s)=>{var u={};for(var o in e)vt.call(e,o)&&s.indexOf(o)<0&&(u[o]=e[o]);if(e!=null&&B)for(var o of B(e))s.indexOf(o)<0&&wt.call(e,o)&&(u[o]=e[o]);return u};var p=require("react/jsx-runtime"),a=require("react"),Ft=require("styled-components"),H=require("../../../shared/array.js"),h=require("../../../shared/key.js"),Tt=require("../common/Overlay.js"),Wt=require("../../IconButton/IconButton.js"),Ht=require("../../../hooks/useBooleanState.js"),U=require("../../../hooks/useShortcut.js"),f=require("../../../theme/theme.js"),Jt=require("../../../icons/ArrowDownIcon.js"),Qt=require("./ChipInput.js"),Xt=require("../../../hooks/usePagination.js"),Yt=require("../../Locale/Locale.js");function yt(e){return e&&e.__esModule?e:{default:e}}var J=yt(a),g=yt(Ft);const Zt=["\\r","\\n","\\t",",",";"],St=g.default.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
|
|
4
4
|
& input[type='text'] {
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
z-index: 2;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,Ct=g.default.div`
|
|
13
13
|
position: relative;
|
|
14
|
-
`,
|
|
14
|
+
`,te=g.default.div`
|
|
15
15
|
position: absolute;
|
|
16
16
|
right: 8px;
|
|
17
17
|
top: 0;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
gap: 10px;
|
|
22
|
-
`,
|
|
22
|
+
`,ee=g.default.div`
|
|
23
23
|
background: ${({$highlighted:e})=>e?f.getColor("grey",20):f.getColor("white")};
|
|
24
24
|
height: 34px;
|
|
25
25
|
padding: 0 20px;
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
&:disabled {
|
|
47
47
|
color: ${f.getColor("grey",100)};
|
|
48
48
|
}
|
|
49
|
-
`,
|
|
49
|
+
`,re=g.default.div`
|
|
50
50
|
background: ${f.getColor("white")};
|
|
51
51
|
height: 34px;
|
|
52
52
|
padding: 0 20px 0 0;
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
color: ${f.getColor("grey",100)};
|
|
59
59
|
line-height: 34px;
|
|
60
60
|
text-transform: uppercase;
|
|
61
|
-
`,
|
|
61
|
+
`,oe=g.default.div`
|
|
62
62
|
background: ${f.getColor("white")};
|
|
63
63
|
height: 20px;
|
|
64
64
|
padding: 0 20px;
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
color: ${f.getColor("grey",100)};
|
|
70
70
|
line-height: 20px;
|
|
71
71
|
text-align: center;
|
|
72
|
-
`,
|
|
72
|
+
`,se=g.default.div`
|
|
73
73
|
max-height: 320px;
|
|
74
74
|
overflow-y: auto;
|
|
75
75
|
padding-left: ${({$withGroups:e})=>e?"20px":"0"};
|
|
76
|
-
`,xt=X=>{var A=X,{children:e,enableLocaleRender:s,pasteAliases:u}=A,o=V(A,["children","enableLocaleRender","pasteAliases"]);return p.jsx("span",_(G({},o),{children:s?p.jsx(
|
|
76
|
+
`,xt=X=>{var A=X,{children:e,enableLocaleRender:s,pasteAliases:u}=A,o=V(A,["children","enableLocaleRender","pasteAliases"]);return p.jsx("span",_(G({},o),{children:s?p.jsx(Yt.Locale,{code:o.value,languageLabel:e}):e}))},bt=u=>{var o=u,{children:e}=o,s=V(o,["children"]);return p.jsx("span",_(G({},s),{children:e}))},R=e=>(e==null?void 0:e.type.displayName)==="MultiSelectInput.OptionGroup",q=e=>(e==null?void 0:e.type.displayName)==="MultiSelectInput.Option",Q=ie=>{var C=ie,{id:e,placeholder:s,invalid:u,value:o=[],invalidValue:X=[],emptyResultLabel:A,children:Y=[],onChange:d,removeLabel:gt,onSubmit:K,openLabel:mt,readOnly:$=!1,verticalPosition:le,dropdownMinWidth:It,separators:$t=Zt,onNextPage:jt,onSearchChange:n,optionsFilteredExternally:N=!1,disableAutoSelect:Z=!1,keepDropdownOnSelect:S=!1,resolvePastedLabels:Et=!1,lockedValues:Mt=[],"aria-labelledby":Ot,"aria-label":Rt,onOpenChange:x}=C,qt=V(C,["id","placeholder","invalid","value","invalidValue","emptyResultLabel","children","onChange","removeLabel","onSubmit","openLabel","readOnly","verticalPosition","dropdownMinWidth","separators","onNextPage","onSearchChange","optionsFilteredExternally","disableAutoSelect","keepDropdownOnSelect","resolvePastedLabels","lockedValues","aria-labelledby","aria-label","onOpenChange"]);const tt=new RegExp(`[${$t.join("")}]+`,"g"),[D,j]=a.useState(""),[At,Dt]=a.useState(!1),[m,et]=a.useState(0),[v,rt,ot]=Ht.useBooleanState(),b=a.useRef(null),st=a.useRef(null),z=a.useRef(null),F=a.useRef(null),I=a.useCallback(()=>{rt(),v||x==null||x(!0)},[v,rt,x]),T=a.useCallback(()=>{ot(),v&&(x==null||x(!1))},[v,ot,x]),E=a.useMemo(()=>J.default.Children.toArray(Y).filter(t=>a.isValidElement(t)),[Y]),lt=a.useMemo(()=>E.reduce((t,r)=>{if(R(r))return t;const i=r.props.children,y=r.props.value;if(typeof i!="string")throw new Error("Multi select only accepts string as Option");if(Object.prototype.hasOwnProperty.call(t,y))throw new Error(`Duplicate option value ${y}`);return t[y]={code:y,label:i},t},{}),[E]),c=a.useMemo(()=>E.filter(t=>{const r=t.props.value,i=r+t.props.children;return R(t)||!o.includes(r)&&(N||i.toLowerCase().includes(D.toLowerCase()))}),[N,E,D,o]),kt=a.useMemo(()=>c.some(t=>q(t)),[c]),it=c.findIndex(t=>q(t)),k=c.reduce((t,r,i)=>(q(r)&&t.push(i),t),[]),ut=t=>{if(k.length===0)return;const r=k.indexOf(m),i=Math.min(Math.max(r+t,0),k.length-1);et(k[i])},Lt=t=>{if(t.preventDefault(),!v){I();return}ut(1)},Pt=t=>{if(t.preventDefault(),!v){I();return}ut(-1)},Bt=()=>{var t;if(c.length>0&&v&&q(c[m])){const r=c[m].props.value;d==null||d(H.arrayUnique([...o,r])),j(""),n==null||n(""),S||T(),(t=b.current)==null||t.focus()}else!$&&(K==null||K())},at=(t,r)=>{const i=t.split(tt).map(l=>l.trim()).filter(l=>l!==""),y=Object.values(lt),L=new Map,M=new Map,O=new Map;y.forEach(({code:l})=>{L.set(l,l)}),E.forEach(l=>{var w;R(l)||(w=l.props.pasteAliases)==null||w.forEach(P=>M.set(P,l.props.value))}),Et&&y.forEach(({code:l,label:w})=>{O.set(w.toLowerCase(),l)});const nt=l=>{var w,P;return(P=(w=L.get(l))!=null?w:M.get(l))!=null?P:O.get(l.toLowerCase())},ct=N&&r&&i.length>1,pt=i.flatMap(l=>{const w=nt(l);return w!==void 0?[w]:ct?[l]:[]});d==null||d(H.arrayUnique([...o,...pt]));const ft=pt.length===0?t:ct?"":i.filter(l=>nt(l)===void 0).join(",");j(ft),n==null||n(ft),I()},Gt=t=>{if(Z||t.match(tt)===null){j(t),n==null||n(t),I();return}at(t,!1)},_t=t=>{var M,O;if(Z||!t.clipboardData)return;t.preventDefault();const r=t.currentTarget,i=(M=r.selectionStart)!=null?M:r.value.length,y=(O=r.selectionEnd)!=null?O:r.value.length,L=r.value.slice(0,i)+t.clipboardData.getData("text")+r.value.slice(y);at(L,!0)},Vt=t=>{d==null||d(o.filter(r=>r!==t))},ht=t=>()=>{var r;d==null||d(H.arrayUnique([...o,t])),j(""),n==null||n(""),S||T(),(r=b.current)==null||r.focus()},W=()=>{var t;j(""),n==null||n(""),T(),(t=b.current)==null||t.blur()};Xt.usePagination(z,F,jt,v,c);const Ut=()=>I();return U.useShortcut(h.Key.Enter,Bt,b),U.useShortcut(h.Key.Escape,W,b),U.useShortcut(h.Key.ArrowDown,Lt,b),U.useShortcut(h.Key.ArrowUp,Pt,b),a.useEffect(()=>{et(it)},[v,D,c.length,it]),a.useEffect(()=>{var t,r,i;(i=(r=(t=z.current)==null?void 0:t.querySelector('[data-active="true"]'))==null?void 0:r.scrollIntoView)==null||i.call(r,{block:"nearest"})},[m]),a.useEffect(()=>{c.some(t=>R(t))&&Dt(!0)},[c]),p.jsxs(St,_(G({ref:st,$readOnly:$,$value:o},qt),{children:[p.jsxs(Ct,{children:[p.jsx(Qt.ChipInput,{ref:b,id:e,placeholder:s,value:o.map(t=>{var r;return(r=lt[t])!=null?r:{code:t,label:t}}),invalidValue:X,searchValue:D,removeLabel:gt,readOnly:$,invalid:u,onSearchChange:Gt,onPaste:_t,onRemove:Vt,onFocus:Ut,lockedValues:Mt,"aria-labelledby":Ot,"aria-label":Rt}),!$&&p.jsx(te,{children:p.jsx(Wt.IconButton,{ghost:"borderless",level:"tertiary",size:"small",icon:p.jsx(Jt.ArrowDownIcon,{}),title:mt,onClick:I,onFocus:W,tabIndex:0})})]}),v&&!$&&p.jsx(Tt.Overlay,{parentRef:st,minWidth:It,onClose:W,children:p.jsx(se,{ref:z,$withGroups:At,children:kt?c.map((t,r)=>{var i;return R(t)?q(c[r+1])?p.jsx(re,{role:"option-group",ref:r===c.length-1?F:void 0,children:J.default.cloneElement(t)},(i=t.props)==null?void 0:i.title):null:p.jsx(ee,{onClick:ht(t.props.value),ref:r===c.length-1?F:void 0,"data-active":r===m,$highlighted:r===m,children:J.default.cloneElement(t)},t.props.value)}):p.jsx(oe,{children:A})})})]}))};xt.displayName="MultiSelectInput.Option";bt.displayName="MultiSelectInput.OptionGroup";Q.Option=xt;Q.OptionGroup=bt;exports.MultiSelectInput=Q;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var W=Object.defineProperty,F=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var m=(e,o,t)=>o in e?W(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,k=(e,o)=>{for(var t in o||(o={}))w.call(o,t)&&m(e,t,o[t]);if(g)for(var t of g(o))$.call(o,t)&&m(e,t,o[t]);return e},C=(e,o)=>F(e,H(o));var D=(e,o)=>{var t={};for(var n in e)w.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&g)for(var n of g(e))o.indexOf(n)<0&&$.call(e,n)&&(t[n]=e[n]);return t};var s=require("react/jsx-runtime"),c=require("react"),j=require("styled-components"),G=require("../../../icons/ArrowDownIcon.js"),J=require("../../../icons/ArrowUpIcon.js"),P=require("../../../icons/LockIcon.js"),Q=require("../../../shared/key.js"),l=require("../../../theme/theme.js"),S=require("../../../hooks/useShortcut.js");function q(e){return e&&e.__esModule?e:{default:e}}var X=q(c),p=q(j);const _=p.default.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
width: 100%;
|
|
6
|
-
`,
|
|
6
|
+
`,z=p.default.input`
|
|
7
7
|
width: 100%;
|
|
8
8
|
height: 40px;
|
|
9
|
-
border: 1px solid ${({$invalid:
|
|
9
|
+
border: 1px solid ${({$invalid:e})=>e?l.getColor("red",100):l.getColor("grey",80)};
|
|
10
10
|
border-radius: 2px;
|
|
11
|
-
background: ${({$readOnly:
|
|
12
|
-
color: ${({$readOnly:
|
|
13
|
-
font-size: ${
|
|
11
|
+
background: ${({$readOnly:e})=>e?l.getColor("grey",20):l.getColor("white")};
|
|
12
|
+
color: ${({$readOnly:e})=>e?l.getColor("grey",100):l.getColor("grey",140)};
|
|
13
|
+
font-size: ${l.getFontSize("default")};
|
|
14
14
|
line-height: 40px;
|
|
15
|
-
padding: 0 ${({$readOnly:
|
|
15
|
+
padding: 0 ${({$readOnly:e})=>e?"35px":"15px"} 0 15px;
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
outline-style: none;
|
|
18
18
|
appearance: textfield;
|
|
19
|
-
${({$readOnly:
|
|
19
|
+
${({$readOnly:e})=>e&&j.css`
|
|
20
20
|
overflow: hidden;
|
|
21
21
|
text-overflow: ellipsis;
|
|
22
22
|
`}
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&:focus {
|
|
30
|
-
box-shadow: 0 0 0 2px ${
|
|
30
|
+
box-shadow: 0 0 0 2px ${l.getColor("blue",40)};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&::placeholder {
|
|
34
34
|
opacity: 1;
|
|
35
|
-
color: ${
|
|
35
|
+
color: ${l.getColor("grey",100)};
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`,Y=p.default(z).attrs({as:"div",inert:""})`
|
|
38
38
|
&& {
|
|
39
39
|
position: absolute;
|
|
40
40
|
top: 0;
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
mix-blend-mode: multiply;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
${
|
|
54
|
+
${_}:focus-within & {
|
|
55
55
|
display: none;
|
|
56
56
|
}
|
|
57
|
-
`,
|
|
57
|
+
`,Z=p.default(P.LockIcon)`
|
|
58
58
|
position: absolute;
|
|
59
59
|
right: 0;
|
|
60
60
|
top: 0;
|
|
61
61
|
margin: 12px;
|
|
62
|
-
color: ${
|
|
63
|
-
`,
|
|
62
|
+
color: ${l.getColor("grey",100)};
|
|
63
|
+
`,V=p.default.div`
|
|
64
64
|
position: absolute;
|
|
65
65
|
right: 0;
|
|
66
66
|
top: 0;
|
|
@@ -70,5 +70,6 @@
|
|
|
70
70
|
height: 100%;
|
|
71
71
|
justify-content: center;
|
|
72
72
|
cursor: pointer;
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
user-select: none;
|
|
74
|
+
color: ${l.getColor("grey",100)};
|
|
75
|
+
`,R=X.default.forwardRef((O,i)=>{var b=O,{invalid:e,onChange:o,readOnly:t,step:n,value:d,emptyValue:h,onSubmit:x,withIncrementIcons:A=!0,highlightable:N=!1}=b,a=D(b,["invalid","onChange","readOnly","step","value","emptyValue","onSubmit","withIncrementIcons","highlightable"]);const K=c.useRef(null);i=i!=null?i:K;const[T,U]=c.useState(!1),B=r=>{r.currentTarget.blur()},E=c.useCallback(r=>{U(r.currentTarget.validity.badInput),!t&&o&&o(r.currentTarget.value)},[t,o]),L=()=>{!t&&(x==null||x())};S.useShortcut(Q.Key.Enter,L,i);const v=c.useCallback(r=>{if(!i||typeof i=="function"||!i.current||t||!o||n==="any")return!1;const u=i.current;return u.value===""&&h!==void 0&&(u.value=`${h}`),r==="up"?u.stepUp(n):u.stepDown(n),o(u.value),!0},[i,n,t,o,h]),f=()=>v("up"),I=()=>v("down"),M=r=>{var u;h!==void 0&&r.currentTarget.value===""&&(r.key==="ArrowUp"&&f()&&r.preventDefault(),r.key==="ArrowDown"&&I()&&r.preventDefault()),(u=a.onKeyDown)==null||u.call(a,r)},y=e||T&&d==="";return s.jsxs(_,{children:[s.jsx(z,C(k({ref:i,onChange:E,type:"number",readOnly:t,disabled:t,"aria-invalid":y,$invalid:y,$readOnly:t,autoComplete:"off",value:d,title:d,step:n},a),{onKeyDown:M,onWheel:B})),N&&s.jsx(Y,{"aria-hidden":!0,className:a.className,$readOnly:t,children:d}),t&&s.jsx(Z,{size:16}),!t&&A&&n!=="any"&&s.jsxs(V,{children:[s.jsx(J.ArrowUpIcon,{size:16,"data-testid":"increment-number-input",onClick:f}),s.jsx(G.ArrowDownIcon,{size:16,"data-testid":"decrement-number-input",onClick:I})]})]})});exports.NumberInput=R;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Ge=Object.defineProperty,Me=Object.defineProperties;var _e=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var ue=(t,r,i)=>r in t?Ge(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,L=(t,r)=>{for(var i in r||(r={}))ae.call(r,i)&&ue(t,i,r[i]);if(O)for(var i of O(r))ce.call(r,i)&&ue(t,i,r[i]);return t},N=(t,r)=>Me(t,_e(r));var F=(t,r)=>{var i={};for(var s in t)ae.call(t,s)&&r.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&O)for(var s of O(t))r.indexOf(s)<0&&ce.call(t,s)&&(i[s]=t[s]);return i};var u=require("react/jsx-runtime"),l=require("react"),U=require("styled-components"),c=require("../../../shared/key.js"),Be=require("../common/Overlay.js"),pe=require("../../IconButton/IconButton.js"),Ve=require("../TextInput/TextInput.js"),Ce=require("../../../hooks/useBooleanState.js"),Le=require("../../../hooks/useShortcut.js"),n=require("../../../theme/theme.js"),Ne=require("../../../icons/ArrowDownIcon.js"),Fe=require("../../../icons/CloseIcon.js"),Pe=require("../../../icons/LockIcon.js"),Ue=require("../../../hooks/usePagination.js");function de(t){return t&&t.__esModule?t:{default:t}}var P=de(l),a=de(U);const We=t=>t.length>0&&t.every(r=>{var i,s;return(s=(i=r.props)==null?void 0:i.disabled)!=null?s:!1}),He={default:34,big:44},Je=a.default.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
|
|
4
4
|
& input[type='text'] {
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
z-index: 2;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,Qe=a.default.div`
|
|
13
13
|
position: relative;
|
|
14
14
|
background: ${n.getColor("white")};
|
|
15
|
-
`,
|
|
15
|
+
`,Xe=a.default(Ve.TextInput)`
|
|
16
16
|
&::placeholder {
|
|
17
17
|
opacity: ${({$isPlaceholderVisible:t})=>t?1:0};
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`,Ye=a.default.div`
|
|
20
20
|
position: absolute;
|
|
21
21
|
right: 8px;
|
|
22
22
|
top: 0;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
align-items: center;
|
|
26
26
|
gap: 10px;
|
|
27
27
|
z-index: 2;
|
|
28
|
-
`,
|
|
28
|
+
`,Ze=a.default.div`
|
|
29
29
|
position: relative;
|
|
30
30
|
margin-bottom: -34px;
|
|
31
31
|
top: 3px;
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
background: ${({readOnly:t})=>t?n.getColor("grey",20):n.getColor("white")};
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
color: ${({readOnly:t})=>t?n.getColor("grey",100):n.getColor("grey",140)};
|
|
40
|
-
`,
|
|
40
|
+
`,et=a.default.span`
|
|
41
41
|
display: block;
|
|
42
42
|
flex: 1;
|
|
43
43
|
min-width: 0;
|
|
44
44
|
overflow: hidden;
|
|
45
45
|
text-overflow: ellipsis;
|
|
46
46
|
white-space: nowrap;
|
|
47
|
-
`,
|
|
47
|
+
`,tt=a.default.div`
|
|
48
48
|
background: ${({$highlighted:t})=>t?n.getColor("grey",20):n.getColor("white")};
|
|
49
|
-
min-height: ${({$size:t})=>
|
|
49
|
+
min-height: ${({$size:t})=>He[t]}px;
|
|
50
50
|
padding: 0 20px;
|
|
51
51
|
align-items: center;
|
|
52
52
|
gap: 10px;
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
font-weight: 700;
|
|
75
75
|
}
|
|
76
76
|
`}
|
|
77
|
-
`,
|
|
77
|
+
`,rt=a.default(Pe.LockIcon)`
|
|
78
78
|
flex-shrink: 0;
|
|
79
|
-
`,
|
|
79
|
+
`,ot=a.default.div`
|
|
80
80
|
background: ${n.getColor("white")};
|
|
81
81
|
height: 20px;
|
|
82
82
|
padding: 0 20px;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
color: ${n.getColor("grey",100)};
|
|
88
88
|
line-height: 20px;
|
|
89
89
|
text-align: center;
|
|
90
|
-
`,
|
|
90
|
+
`,lt=a.default.div`
|
|
91
91
|
max-height: 320px;
|
|
92
92
|
overflow-y: auto;
|
|
93
93
|
padding-left: ${({$withGroups:t})=>t?"20px":"0"};
|
|
@@ -102,24 +102,24 @@
|
|
|
102
102
|
${fe};
|
|
103
103
|
`,ye=a.default.span`
|
|
104
104
|
${fe};
|
|
105
|
-
`,
|
|
105
|
+
`,it=a.default.div`
|
|
106
106
|
display: flex;
|
|
107
107
|
flex-direction: column;
|
|
108
108
|
justify-content: center;
|
|
109
109
|
flex-grow: 1;
|
|
110
110
|
line-height: normal;
|
|
111
111
|
overflow: hidden;
|
|
112
|
-
`,
|
|
112
|
+
`,st=a.default.span`
|
|
113
113
|
color: ${n.getColor("grey",100)};
|
|
114
114
|
font-size: 10px;
|
|
115
115
|
overflow: hidden;
|
|
116
116
|
text-overflow: ellipsis;
|
|
117
|
-
`,
|
|
117
|
+
`,nt=a.default.span`
|
|
118
118
|
white-space: nowrap;
|
|
119
119
|
overflow: hidden;
|
|
120
120
|
text-overflow: ellipsis;
|
|
121
121
|
flex: 1;
|
|
122
|
-
`,
|
|
122
|
+
`,ut=s=>{var E=s,{label:t,children:r}=E,i=F(E,["label","children"]);return u.jsxs(it,N(L({},i),{children:[u.jsx(st,{title:t,children:t}),u.jsx(nt,{children:r})]}))},at=a.default.div`
|
|
123
123
|
background: ${n.getColor("white")};
|
|
124
124
|
height: 34px;
|
|
125
125
|
padding: 0 20px 0 0;
|
|
@@ -133,4 +133,4 @@
|
|
|
133
133
|
display: flex;
|
|
134
134
|
justify-content: space-between;
|
|
135
135
|
text-transform: uppercase;
|
|
136
|
-
`,R=t=>(t==null?void 0:t.type.displayName)==="SelectInput.OptionGroup",q=t=>(t==null?void 0:t.type.displayName)==="SelectInput.Option",A=
|
|
136
|
+
`,R=t=>(t==null?void 0:t.type.displayName)==="SelectInput.OptionGroup",q=t=>(t==null?void 0:t.type.displayName)==="SelectInput.Option",A=ct=>{var Q=ct,{id:t,placeholder:r,invalid:i,value:s,emptyResultLabel:E,children:W,onChange:f,clearable:H=!0,clearLabel:we="",openLabel:ve,readOnly:b=!1,verticalPosition:ge,onNextPage:be,onSearchChange:I,optionsFilteredExternally:J=!1,"aria-labelledby":he,"aria-label":ke,selectedValueComponent:z,onOpenChange:v,title:T,keepDropdownOnSelect:Ie=!1,size:$e="default"}=Q,me=F(Q,["id","placeholder","invalid","value","emptyResultLabel","children","onChange","clearable","clearLabel","openLabel","readOnly","verticalPosition","onNextPage","onSearchChange","optionsFilteredExternally","aria-labelledby","aria-label","selectedValueComponent","onOpenChange","title","keepDropdownOnSelect","size"]);var oe,le;const[y,X]=l.useState(""),[je,Y]=l.useState(!1),[Se,De]=l.useState(!1),[h,Z,ee]=Ce.useBooleanState(),k=l.useRef(null),te=l.useRef(null),G=l.useRef(null),re=l.useRef(null),M=l.useRef(null),$=l.useCallback(()=>{Z(),v==null||v(!0)},[Z,v]),_=l.useCallback(()=>{ee(),v==null||v(!1)},[ee,v]),m=l.useMemo(()=>P.default.Children.toArray(W).filter(e=>l.isValidElement(e)),[W]);b=b||We(m),m.reduce((e,o)=>{if(R(o))return e;if(e.includes(o.props.value))throw new Error(`Duplicate option value ${o.props.value}`);return e.push(o.props.value),e},[]);const p=l.useMemo(()=>J?m:m.filter(e=>{var S;const o=typeof e.props.children=="string"?e.props.children:"",x=(S=e.props.title)!=null?S:"",d=e.props.value+o+x;return R(e)||d.toLowerCase().includes(y.toLowerCase())}),[J,m,y]),Ee=l.useMemo(()=>p.some(e=>q(e)),[p]),Ke=l.useMemo(()=>p.findIndex(e=>q(e)),[p]),B=l.useMemo(()=>p.findIndex(e=>{var o,x;return q(e)&&!((x=(o=e.props)==null?void 0:o.disabled)!=null&&x)}),[p]),w=(oe=m.find(e=>{const o=e.props.value;return s===o}))!=null?oe:s,V=typeof w=="string"?w:l.isValidElement(w)?(le=w.props.title)!=null?le:typeof w.props.children=="string"?w.props.children:void 0:void 0,Oe=l.isValidElement(w)?l.cloneElement(w,{title:void 0}):w,Re=e=>{I==null||I(e),X(e),$()},K=()=>{y!==""&&(X(""),I==null||I(""))},qe=(e,o)=>()=>{o||(f==null||f(e),C())},Ae=e=>{var o;f==null||f(null),e.preventDefault(),(o=k.current)==null||o.focus()},j=()=>{var e;K(),_(),(e=k.current)==null||e.focus()},C=()=>{var e;Ie?(K(),(e=k.current)==null||e.focus()):j()};Le.useShortcut(c.Key.Escape,j,k);const ze=e=>{var o;e.currentTarget!==null&&(e.key===c.Key.Tab&&(K(),_()),e.key===c.Key.ArrowDown?(e.preventDefault(),h?(o=G.current||M.current)==null||o.focus():$()):e.key===c.Key.ArrowUp?(e.preventDefault(),$()):e.key===c.Key.Enter&&(e.preventDefault(),h?y!==""&&B!==-1&&(f==null||f(p[B].props.value),C()):$()))};l.useEffect(()=>{var e;h&&y===""&&((e=M.current||G.current)==null||e.focus())},[h]),l.useEffect(()=>{p.some(e=>R(e))&&De(!0)},[p]);const Te=(e,o)=>{var x,g;if(e.currentTarget!==null)if(e.key===c.Key.Tab&&(K(),_()),[c.Key.ArrowDown,c.Key.ArrowUp,c.Key.Enter,c.Key.Escape].includes(e.key)){if(e.key===c.Key.ArrowDown){const d=e.currentTarget.nextSibling;d==null||d.focus(),e.preventDefault()}if(e.key===c.Key.ArrowUp){const d=e.currentTarget.previousSibling;d==null||d.focus(),e.preventDefault()}if(e.key===c.Key.Enter&&!o){const d=(x=e.currentTarget.firstChild)==null?void 0:x.getAttribute("value");f==null||f(d),C()}e.key===c.Key.Escape&&j()}else(g=k.current)==null||g.focus()};return Ue.usePagination(te,re,be,h,p),u.jsxs(Je,N(L({readOnly:b,value:s},me),{children:[u.jsxs(Qe,{children:[s!==null&&y===""&&(z!=null?z:u.jsx(Ze,{readOnly:b,$clearable:H,children:u.jsx(et,{children:Oe})})),u.jsx(Xe,{id:t,ref:k,value:y,title:T!=null?T:y===""&&V!=null?V:y,readOnly:b,invalid:i,placeholder:r,$isPlaceholderVisible:s===null,onChange:Re,onClick:e=>{$(),e.preventDefault()},onFocus:()=>Y(!0),onBlur:()=>Y(!1),"aria-labelledby":he,"aria-label":ke,onKeyDown:ze,"data-form-type":"other",size:1}),!b&&u.jsxs(Ye,{children:[!h&&s!==null&&H&&u.jsx(pe.IconButton,{ghost:"borderless",level:"tertiary",size:"small",icon:u.jsx(Fe.CloseIcon,{}),title:we,onClick:Ae,tabIndex:0}),u.jsx(pe.IconButton,{ghost:"borderless",level:"tertiary",size:"small",icon:u.jsx(Ne.ArrowDownIcon,{}),title:ve,onClick:$,onFocus:j,tabIndex:-1})]})]}),h&&!b&&u.jsx(Be.Overlay,{parentRef:k,verticalPosition:ge,onClose:j,children:u.jsx(lt,{ref:te,$withGroups:Se,children:Ee?p.map((e,o)=>{var S,ie,se,ne;const x=e.props.value,g=(ie=(S=e.props)==null?void 0:S.disabled)!=null?ie:!1,d=o===B&&y!==""&&je;return R(e)?q(p[o+1])?u.jsx(at,{role:"option-group","data-testid":(se=e.props)==null?void 0:se.title,children:P.default.cloneElement(e)},(ne=e.props)==null?void 0:ne.title):null:u.jsxs(tt,{role:"option","data-testid":x,$size:$e,onClick:qe(x,g),onKeyDown:D=>Te(D,g),tabIndex:0,ref:D=>{switch(o){case Ke:G.current=D;break;case p.length-1:re.current=D;break}s===x&&(M.current=D)},disabled:g,$highlighted:d,children:[P.default.cloneElement(e),g&&u.jsx(rt,{size:18})]},x)}):u.jsx(ot,{children:E})})})]}))};xe.displayName="SelectInput.Option";ye.displayName="SelectInput.OptionGroup";A.Option=xe;A.OptionGroup=ye;A.Surtitle=ut;exports.SelectInput=A;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
${
|
|
1
|
+
"use strict";var I=Object.defineProperty,R=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var b=(e,t,o)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,x=(e,t)=>{for(var o in t||(t={}))M.call(t,o)&&b(e,o,t[o]);if(u)for(var o of u(t))j.call(t,o)&&b(e,o,t[o]);return e},g=(e,t)=>R(e,_(t));var h=(e,t)=>{var o={};for(var n in e)M.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&u)for(var n of u(e))t.indexOf(n)<0&&j.call(e,n)&&(o[n]=e[n]);return o};var r=require("react/jsx-runtime"),c=require("react"),w=require("react-dom"),k=require("styled-components"),d=require("../../theme/theme.js"),z=require("../../theme/common.js"),E=require("../IconButton/IconButton.js"),P=require("../../icons/CloseIcon.js"),N=require("../../hooks/useShortcut.js"),D=require("../../shared/key.js"),q=require("./ModalContext.js");function B(e){return e&&e.__esModule?e:{default:e}}var F=B(c),i=B(k);const s=[],L=i.default.div`
|
|
2
|
+
${z.CommonStyle}
|
|
3
3
|
position: fixed;
|
|
4
4
|
width: 100vw;
|
|
5
5
|
height: 100vh;
|
|
6
6
|
top: 0;
|
|
7
7
|
left: 0;
|
|
8
|
-
background-color: ${
|
|
8
|
+
background-color: ${d.getColor("white")};
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: center;
|
|
@@ -14,52 +14,52 @@
|
|
|
14
14
|
overflow: hidden;
|
|
15
15
|
padding: 20px 80px;
|
|
16
16
|
box-sizing: border-box;
|
|
17
|
-
`,
|
|
17
|
+
`,O=i.default(E.IconButton)`
|
|
18
18
|
position: fixed;
|
|
19
19
|
top: 40px;
|
|
20
20
|
left: 40px;
|
|
21
21
|
z-index: 200;
|
|
22
|
-
`,A=
|
|
22
|
+
`,A=i.default.div`
|
|
23
23
|
display: grid;
|
|
24
24
|
grid-template-columns: 1fr 2fr;
|
|
25
25
|
height: 100%;
|
|
26
26
|
align-items: center;
|
|
27
|
-
`,K=
|
|
27
|
+
`,K=i.default.div`
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
30
|
padding: 20px 40px;
|
|
31
31
|
min-width: 480px;
|
|
32
|
-
border-left: 1px solid ${
|
|
32
|
+
border-left: 1px solid ${d.getColor("brand",100)};
|
|
33
33
|
max-height: 100%;
|
|
34
34
|
overflow: auto;
|
|
35
|
-
`,
|
|
35
|
+
`,W=i.default.div`
|
|
36
36
|
display: flex;
|
|
37
37
|
justify-content: flex-end;
|
|
38
38
|
padding-right: 40px;
|
|
39
|
-
`,$=
|
|
39
|
+
`,$=i.default.div`
|
|
40
40
|
height: 20px;
|
|
41
|
-
color: ${({$color:e})=>
|
|
42
|
-
font-size: ${({$size:e})=>
|
|
41
|
+
color: ${({$color:e})=>d.getColor(e!=null?e:"grey",120)};
|
|
42
|
+
font-size: ${({$size:e})=>d.getFontSize(e!=null?e:"default")};
|
|
43
43
|
text-transform: uppercase;
|
|
44
|
-
`,G=
|
|
44
|
+
`,G=v=>{var p=v,{size:e,color:t,children:o}=p,n=h(p,["size","color","children"]);return r.jsx($,g(x({$size:e,$color:t},n),{children:o}))},H=i.default.div`
|
|
45
45
|
display: flex;
|
|
46
46
|
align-items: center;
|
|
47
47
|
height: 40px;
|
|
48
|
-
color: ${
|
|
49
|
-
font-size: ${
|
|
48
|
+
color: ${d.getColor("grey",140)};
|
|
49
|
+
font-size: ${d.getFontSize("title")};
|
|
50
50
|
margin-bottom: 10px;
|
|
51
|
-
`,
|
|
51
|
+
`,m=i.default.div`
|
|
52
52
|
display: flex;
|
|
53
53
|
gap: 10px;
|
|
54
54
|
margin-top: 20px;
|
|
55
|
-
`,J=
|
|
55
|
+
`,J=i.default(m)`
|
|
56
56
|
position: fixed;
|
|
57
57
|
top: 40px;
|
|
58
58
|
right: 40px;
|
|
59
59
|
margin: 0;
|
|
60
|
-
`,
|
|
60
|
+
`,Q=i.default(m)`
|
|
61
61
|
position: fixed;
|
|
62
62
|
top: 40px;
|
|
63
63
|
left: 82px;
|
|
64
64
|
margin: 0;
|
|
65
|
-
`,
|
|
65
|
+
`,a=p=>{var y=p,{onClose:e,illustration:t,closeTitle:o,children:n}=y,v=h(y,["onClose","illustration","closeTitle","children"]);const C=document.createElement("div");C.setAttribute("id","modal-root");const f=c.useRef(C),T=c.useCallback(()=>{s[s.length-1]===f.current&&e()},[e]);N.useShortcut(D.Key.Escape,T),c.useEffect(()=>{const l=f.current;return document.body.appendChild(l),s.push(l),()=>{s.splice(s.indexOf(l),1),document.body.removeChild(l)}},[]);const S=l=>{l.stopPropagation()};return w.createPortal(r.jsx(q.ModalContext.Provider,{value:!0,children:r.jsxs(L,g(x({onClick:S,role:"dialog"},v),{children:[r.jsx(O,{title:o,level:"tertiary",ghost:"borderless",icon:r.jsx(P.CloseIcon,{}),onClick:e}),t===void 0?n:r.jsxs(A,{children:[r.jsx(W,{children:F.default.cloneElement(t,{size:220})}),r.jsx(K,{children:n})]})]}))}),f.current)};a.BottomButtons=m;a.TopRightButtons=J;a.TopLeftButtons=Q;a.Title=H;a.SectionTitle=G;exports.useInModal=q.useInModal;exports.Modal=a;
|
package/lib/index.d.ts
CHANGED
|
@@ -1046,6 +1046,7 @@ declare type MetricInputProps = {
|
|
|
1046
1046
|
readOnly?: boolean;
|
|
1047
1047
|
id?: string;
|
|
1048
1048
|
'aria-labelledby'?: string;
|
|
1049
|
+
amountAriaLabel?: string;
|
|
1049
1050
|
unitAriaLabel?: string;
|
|
1050
1051
|
highlightable?: boolean;
|
|
1051
1052
|
};
|
|
@@ -1113,7 +1114,7 @@ declare type MultiMultiSelectInputProps = Override<Override<default_2.InputHTMLA
|
|
|
1113
1114
|
}>;
|
|
1114
1115
|
|
|
1115
1116
|
export declare const MultiSelectInput: {
|
|
1116
|
-
({ id, placeholder, invalid, value, invalidValue, emptyResultLabel, children, onChange, removeLabel, onSubmit, openLabel, readOnly, verticalPosition, dropdownMinWidth, separators, onNextPage, onSearchChange, optionsFilteredExternally, disableAutoSelect, keepDropdownOnSelect, resolvePastedLabels, lockedValues, "aria-labelledby": ariaLabelledby, onOpenChange, ...rest }: MultiMultiSelectInputProps): default_2.JSX.Element;
|
|
1117
|
+
({ id, placeholder, invalid, value, invalidValue, emptyResultLabel, children, onChange, removeLabel, onSubmit, openLabel, readOnly, verticalPosition, dropdownMinWidth, separators, onNextPage, onSearchChange, optionsFilteredExternally, disableAutoSelect, keepDropdownOnSelect, resolvePastedLabels, lockedValues, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, onOpenChange, ...rest }: MultiMultiSelectInputProps): default_2.JSX.Element;
|
|
1117
1118
|
Option: {
|
|
1118
1119
|
({ children, enableLocaleRender, pasteAliases: _pasteAliases, ...rest }: OptionProps): default_2.JSX.Element;
|
|
1119
1120
|
displayName: string;
|
|
@@ -1143,6 +1144,7 @@ export declare type NumberInputProps = Override<Override<Omit<default_2.InputHTM
|
|
|
1143
1144
|
min?: number;
|
|
1144
1145
|
max?: number;
|
|
1145
1146
|
step?: number | 'any';
|
|
1147
|
+
emptyValue?: number;
|
|
1146
1148
|
invalid?: boolean;
|
|
1147
1149
|
onSubmit?: () => void;
|
|
1148
1150
|
withIncrementIcons?: boolean;
|
|
@@ -1371,7 +1373,7 @@ declare type SectionTitleProps = Override<HTMLAttributes<HTMLDivElement>, {
|
|
|
1371
1373
|
}>;
|
|
1372
1374
|
|
|
1373
1375
|
export declare const SelectInput: {
|
|
1374
|
-
({ id, placeholder, invalid, value, emptyResultLabel, children, onChange, clearable, clearLabel, openLabel, readOnly, verticalPosition, onNextPage, onSearchChange, optionsFilteredExternally, "aria-labelledby": ariaLabelledby, selectedValueComponent, onOpenChange, title, keepDropdownOnSelect, size, ...rest }: SelectInputProps): default_2.JSX.Element;
|
|
1376
|
+
({ id, placeholder, invalid, value, emptyResultLabel, children, onChange, clearable, clearLabel, openLabel, readOnly, verticalPosition, onNextPage, onSearchChange, optionsFilteredExternally, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, selectedValueComponent, onOpenChange, title, keepDropdownOnSelect, size, ...rest }: SelectInputProps): default_2.JSX.Element;
|
|
1375
1377
|
Option: StyledComponent<"span", DefaultTheme, Omit<default_2.HTMLAttributes<HTMLSpanElement>, "disabled" | "value"> & {
|
|
1376
1378
|
value: string;
|
|
1377
1379
|
disabled?: boolean | undefined;
|