kwant-ui 3.15.1-alpha.1 → 3.15.1-alpha.2
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/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3098,7 +3098,7 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import c,{css as r}from"styled
|
|
|
3098
3098
|
}
|
|
3099
3099
|
}
|
|
3100
3100
|
}
|
|
3101
|
-
`,Yn={collapseOnSelect:!1,width:"100%",offsetTop:"80px",searchable:!0,toggleOnTargetClick:!1},Un=e(Nt,{icon:"keyboard_arrow_down",width:20,height:20,fill:"#A1AFC0"}),Wn=e(Nt,{icon:"keyboard_arrow_up",width:20,height:20,fill:"#A1AFC0"});e(Nt,{icon:"close_circle",width:20,height:20,fill:"#A1AFC0"});const Kn=e(Nt,{icon:"check",width:16,height:12,fill:"#2DA170"}),Gn=({option:c,isSelected:r,variant:n,hasImage:a,avatarProps:s})=>{const{label:l="",image:i}=c;return t("div",{className:`multi-select-option ${r&&"active"}`,children:[a&&e(It,{src:i,alt:l,size:"xs",...s}),t("div",{className:"multi-select-option__head",children:["checkbox"===n&&e(ye,{checked:r}),l]}),"normal"===n&&r&&e("div",{className:"multi-select-option__tail",children:Kn})]})},qn=({filterLabel:t,onChipClose:c})=>e("div",{className:"selected",children:e(Rn,{size:"small",type:"secondary",label:`${t}`,showActionButton:!0,onClick:e=>{e.preventDefault(),e.stopPropagation()},onClose:e=>{e.preventDefault(),c(),e.stopPropagation()}})}),Jn=({width:c,options:r=[],activeOptions:n=[],setActiveOptions:a,placeholder:s,label:l,variant:i="normal",dropdownSelectProps:o,avatarProps:v})=>{const p=r.some((e=>e
|
|
3101
|
+
`,Yn={collapseOnSelect:!1,width:"100%",offsetTop:"80px",searchable:!0,toggleOnTargetClick:!1},Un=e(Nt,{icon:"keyboard_arrow_down",width:20,height:20,fill:"#A1AFC0"}),Wn=e(Nt,{icon:"keyboard_arrow_up",width:20,height:20,fill:"#A1AFC0"});e(Nt,{icon:"close_circle",width:20,height:20,fill:"#A1AFC0"});const Kn=e(Nt,{icon:"check",width:16,height:12,fill:"#2DA170"}),Gn=({option:c,isSelected:r,variant:n,hasImage:a,avatarProps:s})=>{const{label:l="",image:i}=c;return t("div",{className:`multi-select-option ${r&&"active"}`,children:[a&&e(It,{src:i,alt:l,size:"xs",...s}),t("div",{className:"multi-select-option__head",children:["checkbox"===n&&e(ye,{checked:r}),l]}),"normal"===n&&r&&e("div",{className:"multi-select-option__tail",children:Kn})]})},qn=({filterLabel:t,onChipClose:c})=>e("div",{className:"selected",children:e(Rn,{size:"small",type:"secondary",label:`${t}`,showActionButton:!0,onClick:e=>{e.preventDefault(),e.stopPropagation()},onClose:e=>{e.preventDefault(),c(),e.stopPropagation()}})}),Jn=({width:c,options:r=[],activeOptions:n=[],setActiveOptions:a,placeholder:s,label:l,variant:i="normal",dropdownSelectProps:o,avatarProps:v})=>{const p=r.some((e=>"image"in e)),[g,m]=h(!1),u=d((()=>{const t=n?.length;return(t>3?n.slice(0,3):n).map((t=>{let c=(e=>e&&e.length>12?e.slice(0,11)+"..":e)(t?.label);return e(qn,{filterLabel:c,onChipClose:()=>(e=>{let t=[...n].filter((t=>t.value!==e.value));a(t)})(t)})}))}),[n]),_=e=>n.some((t=>t.value===e));return e(Xn,{width:c,children:e(Wt,{...Yn,onSelect:e=>{if(n.find((t=>t.value===e.value))){let t=[...n].filter((t=>t.value!==e.value));a([...t])}else a([...n,e])},data:r,opened:g,onClose:()=>m(!1),itemComponent:({label:t,value:c,image:r})=>e(Gn,{option:{label:t,value:c,image:r},isSelected:_(c),variant:i,hasImage:p,avatarProps:v}),...o,children:t("div",{className:"select-container",children:[e("div",{className:"select-container__label",children:l}),e("div",{className:"select-container__body",children:t("div",{className:`select-input-container ${g&&"focus"}`,onClick:()=>{m(!0)},id:"select-input-container",children:[t("div",{className:"select-input-container__body",children:[u,n?.length>3&&e(Rn,{onClick:e=>{e.preventDefault(),e.stopPropogation()},size:"small",type:"secondary",label:"+"+(n.length-3)}),0===n?.length&&e("div",{className:"placeholder",children:s||"Select"})]}),e("div",{className:"select-input-container__icon",children:g?Wn:Un})]})})]})})})},$n=c.div`
|
|
3102
3102
|
position: relative;
|
|
3103
3103
|
|
|
3104
3104
|
.upload-avatar {
|