profinansy-ui-lib 3.8.91 → 3.8.92
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/components/uikit/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/uikit/Checkbox/Checkbox.typed.d.ts +2 -0
- package/dist/profinansy-ui-lib.cjs.js +2 -2
- package/dist/profinansy-ui-lib.cjs.js.map +1 -1
- package/dist/profinansy-ui-lib.es.js +32 -31
- package/dist/profinansy-ui-lib.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ICheckbox } from './Checkbox.typed';
|
|
2
|
-
declare const Checkbox: ({ checked, text, htmlText, name, onChange, size, form, color, verticalAlign, horizontalAlign, value, isTextLeft, readonly, className, classNameText }: ICheckbox) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const Checkbox: ({ checked, text, htmlText, name, onChange, onMouseDown, size, form, color, verticalAlign, horizontalAlign, value, isTextLeft, readonly, className, classNameText }: ICheckbox) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export { Checkbox };
|
|
@@ -32,4 +32,6 @@ export interface ICheckbox {
|
|
|
32
32
|
className?: string;
|
|
33
33
|
/** Действие при нажатии на контроллер. */
|
|
34
34
|
onChange?: (value: boolean, e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
35
|
+
/** Действие при нажатии мышкой. */
|
|
36
|
+
onMouseDown?: (e: React.MouseEvent<HTMLInputElement>) => void;
|
|
35
37
|
}
|
|
@@ -2747,7 +2747,7 @@ Check the top-level render call using <`+q+">.")}return G}}function e2(L,G){{if(
|
|
|
2747
2747
|
color: ${e=>e.color||e.theme.text.primary};
|
|
2748
2748
|
overflow: hidden;
|
|
2749
2749
|
text-overflow: ellipsis;
|
|
2750
|
-
`,qr=({checked:e=!1,text:t,htmlText:n,name:r,onChange:o,size:
|
|
2750
|
+
`,qr=({checked:e=!1,text:t,htmlText:n,name:r,onChange:o,onMouseDown:i,size:a="L",form:l="square",color:c,verticalAlign:u="center",horizontalAlign:f="start",value:p,isTextLeft:C,readonly:g=!1,className:v,classNameText:b})=>{const{mode:x}=te(),y=k=>{o&&!g&&o(k.target.checked,k)};return s.jsx(h.ThemeProvider,{theme:X[x],children:s.jsxs(Sb,{$verticalAlign:u,$horizontalAlign:f,$readonly:g,className:Be(v,"checkbox-container"),children:[s.jsx(x6,{onClick:k=>k.stopPropagation(),value:p,type:"checkbox",readOnly:g,checked:e,name:r,onChange:y,onMouseDown:i}),s.jsx(x1,{className:"checkbox-element",size:a,form:l}),n?s.jsx($b,{isTextLeft:C,children:n}):null,!!t&&s.jsx(Db,{className:Be(b,"checkbox-text"),color:c,isTextLeft:C,variant:a==="S"?"description-Medium":a==="M"?"text-Medium":"controls-Medium",tag:"span",children:t})]})})},qa=e=>d.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d.createElement("path",{d:"M9.99984 18.9583C5.05817 18.9583 1.0415 14.9417 1.0415 9.99999C1.0415 5.05832 5.05817 1.04166 9.99984 1.04166C14.9415 1.04166 18.9582 5.05832 18.9582 9.99999C18.9582 14.9417 14.9415 18.9583 9.99984 18.9583ZM9.99984 2.29166C5.74984 2.29166 2.2915 5.74999 2.2915 9.99999C2.2915 14.25 5.74984 17.7083 9.99984 17.7083C14.2498 17.7083 17.7082 14.25 17.7082 9.99999C17.7082 5.74999 14.2498 2.29166 9.99984 2.29166Z",fill:"#3038F5"}),d.createElement("path",{d:"M10 11.4583C9.65833 11.4583 9.375 11.175 9.375 10.8333V6.66666C9.375 6.32499 9.65833 6.04166 10 6.04166C10.3417 6.04166 10.625 6.32499 10.625 6.66666V10.8333C10.625 11.175 10.3417 11.4583 10 11.4583Z",fill:"#3038F5"}),d.createElement("path",{d:"M9.99984 14.1667C9.8915 14.1667 9.78317 14.1417 9.68317 14.1C9.58317 14.0583 9.4915 14 9.40817 13.925C9.33317 13.8417 9.27484 13.7583 9.23317 13.65C9.1915 13.55 9.1665 13.4417 9.1665 13.3333C9.1665 13.225 9.1915 13.1167 9.23317 13.0167C9.27484 12.9167 9.33317 12.825 9.40817 12.7417C9.4915 12.6667 9.58317 12.6083 9.68317 12.5667C9.88317 12.4833 10.1165 12.4833 10.3165 12.5667C10.4165 12.6083 10.5082 12.6667 10.5915 12.7417C10.6665 12.825 10.7248 12.9167 10.7665 13.0167C10.8082 13.1167 10.8332 13.225 10.8332 13.3333C10.8332 13.4417 10.8082 13.55 10.7665 13.65C10.7248 13.7583 10.6665 13.8417 10.5915 13.925C10.5082 14 10.4165 14.0583 10.3165 14.1C10.2165 14.1417 10.1082 14.1667 9.99984 14.1667Z",fill:"#3038F5"})),_b=({openCreateList:e})=>{const[t,n]=m.useState(!0),{groups:r,selectedGroups:o,loader:i,onSave:a,onCheckboxClick:l}=Li(),{locale:c}=ce(),u=f=>{l(f),n(!1)};return r.length===0?s.jsxs(oc,{children:[s.jsxs(wb,{children:[s.jsx(kb,{children:s.jsx(qa,{})}),s.jsx(O,{variant:"text-Medium",colorName:"primary",children:Bt[c].notGroupsTitle})]}),s.jsx(O,{variant:"text-Regular",colorName:"fourth",marginBottom:"16px",children:Bt[c].notGroupsMessage}),s.jsx(Ka,{children:s.jsx(dt,{onClick:()=>e(!0),mode:"primary",text:Bt[c].createList})})]}):s.jsxs(s.Fragment,{children:[s.jsx(oc,{children:r?.map(f=>s.jsxs(Eb,{onClick:()=>u(f.id),children:[s.jsx(qr,{checked:o.includes(f.id),text:f.name}),s.jsxs(Ib,{children:[f.instruments?.length||0,Bt[c].amount]})]},f.id))}),s.jsxs(Ka,{children:[s.jsx(dt,{onClick:()=>e(!0),mode:"secondary",text:Bt[c].createList}),s.jsx(dt,{width:"156px",disabled:t,loading:i,mode:"primary",text:Bt[c].save,onClick:a})]})]})},Tb=({onClose:e})=>{const[t,n]=m.useState(""),[r,o]=m.useState(!1),{locale:i}=ce(),{submitNewList:a}=Li(),l=async()=>{o(!0),await a(t),o(!1),e()};return s.jsxs("div",{children:[s.jsx(el,{label:Bt[i].nameList,children:s.jsx(Cr,{name:"groupName",placeholder:Bt[i].input,value:t,onChange:c=>n(c)})}),s.jsxs(Ka,{children:[s.jsx(dt,{onClick:e,mode:"secondary",text:Bt[i].cancel}),s.jsx(dt,{disabled:!t||r,mode:"primary",text:Bt[i].save,onClick:l})]})]})},Ab=()=>{const[e,t]=m.useState(!1),{instrumentId:n,handleClose:r}=Li(),{locale:o}=ce();return s.jsx(zt,{open:n!==null,onClose:r,title:e?Bt[o].titleCreate:Bt[o].title,maxWidth:"564px",children:e?s.jsx(Tb,{onClose:()=>t(!1)}):s.jsx(_b,{openCreateList:()=>t(!0)})})},hl=({onClose:e,isWithoutTitle:t,category:n})=>{const{data:r,searchText:o,isLoading:i}=Cb(n),{listItems:a,tabs:l,bubbles:c,selectedTab:u,setSelectedTab:f,setSelectedBubble:p,selectedBubble:C}=lC(r),g=!!o&&!l&&r!==null,v=!r&&(!n||n===Mt.invest);return s.jsxs(Dv,{children:[s.jsxs(iC,{children:[s.jsx(GC,{isWithoutTitle:t,bubbles:c,tabs:l,category:n,selectedTab:u,setSelectedTab:f,selectedBubble:C,setSelectedBubble:p}),s.jsxs(aC,{children:[n!==Mt.club&&s.jsx(_v,{isRenderSelections:v,onClose:e}),!!a?.length&&s.jsx(mb,{searchText:o,listItems:a,onClose:e}),s.jsx(yb,{isEmpty:g,isLoading:i,category:n})]})]}),s.jsx(Ab,{})]})},Rb="modal-search",Pb=e=>{const{animation:t,showModal:n,content:r,handleClose:o}=Ii({isOpen:e.isOpen,children:e.children,onClose:e.onClose});return n?s.jsx(jb,{...e,onClose:o,animation:t,children:r}):null},jb=({onClose:e,animation:t,height:n,position:r,category:o})=>{const{locale:i}=ce(),{mode:a}=te(),l=()=>{e&&e()};Ei(e);const{isShowNonTradable:c}=a6();return s.jsx(Kr,{id:Rb,children:s.jsxs(_g,{$isOpen:t,children:[s.jsx(Tg,{onClick:l}),s.jsx(Ag,{mode:a,height:n,top:r.top,left:r.left,children:s.jsxs(Hg,{children:[s.jsxs(Rg,{children:[s.jsxs(Pg,{children:[s.jsxs(jg,{children:[s.jsx("span",{children:Ye[i].search_header}),s.jsx(i6,{isShow:c})]}),s.jsx(Bg,{onClick:e,children:s.jsx(J3,{})})]}),s.jsx(q3,{locale:i,category:o})]}),s.jsx(Fg,{children:s.jsx(hl,{isWithoutTitle:!0,category:o,onClose:e})})]})})]})})},y6=({isOpenMode:e,height:t,category:n})=>{const r=m.useRef(null),[o,i]=m.useState(!1),[a,l]=m.useState({left:0,top:0}),{locale:c}=ce(),{mode:u}=te(),f=g=>{p(),i(g)},p=()=>{const g=document.querySelector("#side-menu");if(g){const{x:v,y:b}=g.getBoundingClientRect();l({top:b,left:v})}},C=n===Mt.club?Ye[c].search_club:Ye[c].search;return s.jsxs(h.ThemeProvider,{theme:X[u],children:[s.jsxs(Dg,{ref:r,$isOpenMode:e,onClick:()=>f(!0),children:[s.jsx($g,{children:s.jsx(rl,{})}),e&&s.jsx("span",{children:C})]}),s.jsx(Pb,{category:n,isOpen:o,onClose:()=>f(!1),position:a,height:t})]})},Hb=e=>{const t=zr&&document.getElementById("header-bottom-line")?.offsetHeight||0,n=we+24+t,r=e*140+e*20+20;return{heightContent:n+r,heightSide:n}},Bb=h.styled.div`
|
|
2751
2751
|
border-top: ${e=>`1px dashed ${e.theme.stroke.primary}`};
|
|
2752
2752
|
margin: 12px 12px 0 12px;
|
|
2753
2753
|
padding-top: 12px;
|
|
@@ -7125,7 +7125,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7125
7125
|
max-width: 20px;
|
|
7126
7126
|
max-height: 20px;
|
|
7127
7127
|
}
|
|
7128
|
-
`,eB=e=>s.jsx(ft.Option,{...e,children:s.jsxs(KH,{children:[s.jsxs(qH,{children:[s.jsx("img",{src:e.data.image,alt:"logo"}),s.jsx(O,{variant:"text-Medium",colorName:"primary",children:e.label})]}),s.jsx(qr,{checked:e.isSelected,onChange:(
|
|
7128
|
+
`,eB=e=>s.jsx(ft.Option,{...e,children:s.jsxs(KH,{children:[s.jsxs(qH,{children:[s.jsx("img",{src:e.data.image,alt:"logo"}),s.jsx(O,{variant:"text-Medium",colorName:"primary",children:e.label})]}),s.jsx(qr,{checked:e.isSelected,onChange:()=>e.selectOption(e.data),onMouseDown:t=>t.stopPropagation()})]})}),tB=h.styled.span`
|
|
7129
7129
|
font-family: 'Manrope', sans-serif;
|
|
7130
7130
|
font-size: 15px;
|
|
7131
7131
|
line-height: 24px;
|