@tap-payments/os-micro-frontend-shared 0.3.306 → 0.3.307
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/build/_chunks/{chunk-GSPSUKZC.js → chunk-EEONDBAL.js} +1 -1
- package/build/_chunks/chunk-JBE2LXDH.js +1 -0
- package/build/_chunks/chunk-JYVB2MAR.js +1 -0
- package/build/_chunks/chunk-LKYA6XFU.js +9 -0
- package/build/_chunks/{chunk-6UI52RXI.js → chunk-R2J57DPG.js} +1 -1
- package/build/_chunks/{chunk-H6IWML5L.js → chunk-TJMY7Q26.js} +1 -1
- package/build/_chunks/chunk-YG4CT6O4.js +1 -0
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/GroupedSelect/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/MultiLevelSelect/index.js +1 -1
- package/build/components/Select/SelectField.d.ts +1 -1
- package/build/components/Select/constants.d.ts +24 -0
- package/build/components/Select/index.d.ts +1 -1
- package/build/components/Select/index.js +1 -1
- package/build/components/Select/style.d.ts +12 -0
- package/build/components/Select/type.d.ts +11 -2
- package/build/components/Select/utils.d.ts +11 -2
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/index.d.ts +1 -2
- package/build/components/index.js +1 -1
- package/build/datetime/components/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-2JFMUHGQ.js +0 -9
- package/build/_chunks/chunk-2LO4STE5.js +0 -1
- package/build/_chunks/chunk-B2NOP2A5.js +0 -1
- package/build/_chunks/chunk-KBXWH3SO.js +0 -1
- package/build/_chunks/chunk-MLOWKQDW.js +0 -1
- package/build/components/CurrenciesMenu/CountryFlag.d.ts +0 -10
- package/build/components/CurrenciesMenu/CurrenciesMenu.d.ts +0 -4
- package/build/components/CurrenciesMenu/OptionContent.d.ts +0 -5
- package/build/components/CurrenciesMenu/OptionRow.d.ts +0 -5
- package/build/components/CurrenciesMenu/constants.d.ts +0 -15
- package/build/components/CurrenciesMenu/icons.d.ts +0 -3
- package/build/components/CurrenciesMenu/index.d.ts +0 -4
- package/build/components/CurrenciesMenu/index.js +0 -1
- package/build/components/CurrenciesMenu/style.d.ts +0 -32
- package/build/components/CurrenciesMenu/type.d.ts +0 -64
- package/build/components/CurrenciesMenu/utils.d.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {h,g,f,j,c as c$1,d,i,E as E$1,a,e}from'./chunk-YG4CT6O4.js';import {Db,Eb}from'./chunk-XBJ4RS2B.js';function c(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(c).join(""):typeof e=="object"&&"props"in e?c(e.props.children):""}function E(e){return typeof e.label=="string"||typeof e.label=="number"?String(e.label):c(e.label).trim()||(e.value!=null?String(e.value):"")}function N(e){let t=e?.currentTarget??e?.target;return t instanceof Element?(t.closest(".MuiInputBase-root")??t).getBoundingClientRect():null}function w(e,t,n){let o=e?.PaperProps?.style?.maxHeight;if(typeof o=="number"&&Number.isFinite(o))return o;if(typeof o=="string"){let r=Number.parseFloat(o);if(Number.isFinite(r))return r}return t&&n?h:t?g:f}function R({preferred:e,anchorRect:t,menuMaxHeight:n,gapPx:o}){if(e===j.top||t==null)return e;let r=window.innerHeight-t.bottom-o,p=t.top-o;return r>=n?j.bottom:p>r?j.top:j.bottom}function F(e$1,t,n){let o=e$1?.PaperProps,r=t===j.top,f$1={marginTop:`${r?-c$1:c$1}px`,marginBottom:0},g=n!=null&&Number.isFinite(n)&&n>0,h=g?{width:n,minWidth:n,maxWidth:n}:{};return {...e$1,autoFocus:false,disableAutoFocus:true,disableAutoFocusItem:true,disableEnforceFocus:true,variant:"menu",marginThreshold:0,anchorOrigin:{vertical:r?"top":"bottom",horizontal:"left"},transformOrigin:{vertical:r?"bottom":"top",horizontal:"left"},MenuListProps:{...e$1?.MenuListProps,autoFocus:false,autoFocusItem:false,sx:Db({padding:0,display:"flex",flexDirection:"column",gap:`${e}px`,flex:1,minHeight:0,overflowX:"hidden",overflowY:"auto"},e$1?.MenuListProps?.sx??{})},PaperProps:{...o,className:Eb(a.menu,o?.className),style:{...o?.style,...f$1,...h,maxHeight:o?.style?.maxHeight??f},sx:Db({...f$1,...E$1,borderRadius:`${i}px`,boxSizing:"border-box",display:"flex",flexDirection:"column",padding:`${d}px`,overflow:"hidden",overflowX:"hidden",overflowY:"hidden",...g&&{width:`${n}px`,minWidth:`${n}px`,maxWidth:`${n}px`,boxSizing:"border-box"}},o?.sx??{})}}}function T(e){e.stopPropagation();}var I=e=>"options"in e,s=e=>({...e,id:String(e.value)});function H(e){let t=[];for(let n of e){if(I(n)){n.options.length&&t.push({key:`group-${t.length}`,label:n.label,isGroup:true,options:n.options.map(s)});continue}let o=t[t.length-1];o&&!o.isGroup?o.options.push(s(n)):t.push({key:`flat-${t.length}`,isGroup:false,options:[s(n)]});}return t}function B(e,t){return t==null?null:e.find(n=>n.value===t||String(n.value)===String(t))??null}function D(e){return e==null?"":String(e.value)}function A(e){let t=e?.target;return t instanceof Element&&t.closest("[data-select-menu-search], [data-select-menu-keep-open]")!=null}function G(e){if(e==null||typeof e!="object")return false;let t=e;if(t.key==="Escape"||t.type==="keydown")return false;let n=t.target;return n instanceof Element&&n.closest('[role="option"], .MuiMenuItem-root')!=null}function $(e){let t=e?.target;return t instanceof Element&&t.closest(".Select-clearIconButton, [data-select-clear]")!=null}function L(e){return e==null?false:Array.isArray(e)?e.length>0:typeof e=="object"?String(e.value??"")!=="":String(e)!==""}export{c as a,E as b,N as c,w as d,R as e,F as f,T as g,H as h,B as i,D as j,A as k,G as l,$ as m,L as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {n,j,k,l,h,f,b,g,i,m as m$1,c,e,d}from'./chunk-JBE2LXDH.js';import {Y,W,X,a,Z,k as k$1,O,R,b as b$1,$,P,S,T,U,V,F,m,aa,L,M,ca,ba as ba$1,c as c$1,Q,N,I,G,H,_,J,K}from'./chunk-YG4CT6O4.js';import {ba}from'./chunk-F7I3KDV5.js';import {Ub,Eb,Db}from'./chunk-XBJ4RS2B.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import me from'@mui/material/Box';import Rt from'@mui/material/InputLabel';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function Dt({endAdornmentProp:h,isLoading:a$1,showClear:S,showMenuArrow:u,menuOpen:b,ClearIconComponent:c=aa,ChevronIconComponent:d=ba$1,onClear:m,onClearDefault:R}){if(!h&&!S&&!a$1&&!u)return null;let y=g=>{g.preventDefault(),g.stopPropagation(),m?m():R();};return jsxs(me,{className:Eb("Select-endAdornmentRoot",a$1&&"Select-endAdornmentRoot--loading",a.endAdornment),component:"span",children:[h,a$1?jsx(me,{component:"span",className:Eb("Select-menuTriggerIcon Select-menuTriggerIcon--loading",a.loading),"aria-hidden":true,children:jsx(ca,{})}):null,!a$1&&S?jsx(me,{component:"button",className:"Select-clearIconButton","data-select-clear":"",type:"button",tabIndex:0,"aria-label":"Clear selection",onMouseDown:y,onClick:y,children:jsx(c,{})}):null,!a$1&&u?jsx(me,{component:"span",className:Eb("Select-menuTriggerIcon",b&&"Select-menuTriggerIcon-open",a.chevron),"aria-hidden":true,children:jsx(d,{})}):null]})}var Tt=forwardRef(function({isMultiple:a$1=false,options:S,value:u,onChange:b,label:c="",disabled:d,required:m,hasError:R=false,helperText:y,feedback:g,showClearIcon:K=false,ClearIconComponent:fe,ChevronIconComponent:q,onClear:Q,isLoading:P,MenuProps:j$1,children:he,id:z="Select",className:J,open:I,onOpen:X$1,onClose:D,name:Y$1,inputProps:F,endAdornment:Z$1,renderValue:T,valueAlignment:_},C){let[be,ee]=useState(false),O=I??be,x=!!(d||P),{isProvided:te,isVisible:L,type:le}=Ub(g),B=`${z}-label`,$=Array.isArray(u)?u:u!=null?[u]:[],A=useCallback((t,G)=>{G?X$1?.(t):D?.(t),I===void 0&&ee(G);},[X$1,D,I]),ne=t=>{t.button===0&&(m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||x||(t.preventDefault(),t.stopPropagation(),A(t,!O)));},oe=t=>{m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||(t.preventDefault(),t.stopPropagation());},ae=t=>{let se=t.target.value.map(k=>S.find(U=>j(U)===k||String(U.value)===String(k))).filter(k=>k!=null);b?.(se);},re=jsx(Dt,{endAdornmentProp:Z$1,isLoading:!!P,showClear:K&&n(u)&&!x,showMenuArrow:!P,menuOpen:O,ClearIconComponent:fe,ChevronIconComponent:q,onClear:Q,onClearDefault:()=>b?.(a$1?[]:null)}),H=a$1?$.map(j):j($[0]??null);return jsxs(Y,{$hasFeedback:L,onMouseDown:ne,onClick:oe,children:[jsxs(W,{variant:"filled",required:m,className:J,children:[jsx(Rt,{id:B,children:c}),jsx(X,{multiple:a$1,ref:C,value:H,error:R&&!L,feedbackType:le,hasFeedback:L,valueAlignment:_,disableUnderline:true,required:m,hasLabel:!!c.trim(),labelId:B,id:z,name:Y$1,open:O,onOpen:t=>A(t,true),onClose:t=>{k(t)||a$1&&l(t)||A(t,false);},onChange:a$1?ae:void 0,renderValue:T,className:a.input,SelectDisplayProps:{className:a.display},displayEmpty:!c.trim(),inputProps:F,disabled:x,IconComponent:()=>null,autoWidth:false,endAdornment:re,MenuProps:j$1,children:he})]}),te?jsx(ba,{...g}):y!=null&&y!==""?jsx(Z,{children:y}):null]})}),ke=Tt;function Lt({options:h,maxVisibleValues:a$1,valueAlignment:S=m}){let b$1=typeof a$1=="number"&&Number.isFinite(a$1)?Math.max(0,Math.floor(a$1)):h.length,c=h.slice(0,b$1),d=h.length-c.length,m=c.map(b).join(", ");return jsxs(L,{className:a.values,$valueAlignment:S,children:[jsx(M,{className:a.value,children:m}),d>0?jsxs(N,{className:a.valueOverflow,children:["+",d," more"]}):null]})}var It=Lt;var Vt=forwardRef(function({options:a$1,isMultiple:S$1=false,hasCheckbox:u,maxVisibleValues:b$2,value:c$2,onChange:d$1,label:m$1,placeholder:R$1,disabled:y,required:g$1,error:K$1=false,helperText:fe,feedback:q,hasClearIcon:Q$1=false,ClearIconComponent:P$1,ChevronIconComponent:j,SearchIconComponent:he,onClear:z,isLoading:J$1,isSearchable:I$1=false,searchPlaceholder:X,hasSelectionSummary:D=false,hasSelectedCheckmark:Y=false,valueAlignment:F$1=m,menuDirection:Z=k$1,MenuProps:T$1,children:_$1,id:C="Select",className:be,sx:ee,selectClassNames:O$1,inputRef:x,open:te,onOpen:L$1,onClose:le,name:B,inputProps:$$1,endAdornment:A,renderValue:ne,renderOption:oe},ae){let[re,H$1]=useState(""),[t,G$1]=useState(Z),[se,k]=useState(void 0),U$1=m$1??"",Re=R$1??"",De=fe??void 0,Te=X??b$1,Nt=he??$,Le=u??S$1,ge=useMemo(()=>h(a$1),[a$1]),V$1=useMemo(()=>ge.flatMap(e=>e.options),[ge]),Be=Eb(a.root,O$1?.root,be),$e=useMemo(()=>f(T$1,t,se),[T$1,t,se]),He=e$1=>{let s=c(e$1);s?.width&&k(s.width),G$1(e({preferred:Z,anchorRect:s,menuMaxHeight:d(T$1,I$1,D),gapPx:c$1})),L$1?.(e$1);},E=I$1?re.toLowerCase().trim():"",Ce=e=>!E||b(e).toLowerCase().includes(E),Ge=e=>oe?jsx(J,{className:a.option,$customLayout:true,children:oe(e)}):jsx(J,{className:a.option,children:jsx(K,{title:b(e),children:b(e)})}),Pt=useMemo(()=>E?V$1.filter(e=>b(e).toLowerCase().includes(E)):V$1,[V$1,E]),Ft=!!E&&Pt.length===0,Ue=e=>{let s=false;return ge.flatMap(i=>{let ve=i.options.some(Ce),ie=i.label!=null||s?jsx(Q,{className:a.groupLabel,disableGutters:true,disableSticky:true,$divider:s,$hidden:!ve,onMouseDown:g,onClick:g,children:i.label},`${i.key}-label`):null;return s||(s=ve),ie?[ie,...i.options.map(e)]:i.options.map(e)})},ce=()=>{d$1?.(S$1?[]:null),z?.();},We=I$1?jsx(O,{className:a.search,disableGutters:true,"data-select-menu-search":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsx(R,{placeholder:Te,value:re,onChange:e=>H$1(e.target.value),onMouseDown:g,onClick:g,onKeyDown:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":Te,onMouseDown:g,onClick:g},endAdornment:jsx(Nt,{})})}):null,Ke=Ft?jsx(P,{disableGutters:true,onMouseDown:g,onClick:g,children:"No results found"}):null;if(S$1){let e=Array.isArray(c$2)?c$2:[],s=V$1.filter(n=>e.some(f=>f===n.value||String(f)===String(n.value))),i=s.length,ie=D&&i>0?jsx(S,{className:a.summary,disableGutters:true,disableSticky:true,"data-select-menu-keep-open":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsxs(T,{children:[jsxs(U,{children:[i," selected"]}),jsx(V,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:n=>{n.preventDefault(),n.stopPropagation(),ce();},onClick:n=>{n.preventDefault(),n.stopPropagation(),ce();},children:"Clear"})]})}):null;return jsx(F,{id:C,"data-testid":C??"Select",className:Be,sx:Db(ee??{}),children:jsxs(ke,{ref:x??ae,isMultiple:true,id:C,className:Eb(a.field,O$1?.field),options:V$1,value:s,onChange:n=>{d$1?.(Array.isArray(n)?n.map(f=>f.value):[]);},label:U$1,disabled:y,required:g$1,hasError:K$1,helperText:De,feedback:q,showClearIcon:Q$1,ClearIconComponent:P$1??aa,ChevronIconComponent:j,onClear:ce,isLoading:J$1,MenuProps:$e,open:te,onOpen:He,onClose:n=>{H$1(""),le?.(n);},name:B,inputProps:$$1,endAdornment:A,valueAlignment:F$1,renderValue:()=>s.length>0?jsx(It,{options:s,maxVisibleValues:b$2,valueAlignment:F$1}):Re,children:[_$1,We,ie,Ke,Ue(n=>{let f=e.some(Qe=>Qe===n.value||String(Qe)===String(n.value)),qe=Ge(n);return jsx(I,{value:String(n.value),disabled:n.disabled,$selected:f,$hidden:!Ce(n),className:a.option,onMouseDown:g,onClick:g,children:Le?jsxs(G,{children:[jsx(H,{checked:f,$mutedRect:f&&n.disabled,tabIndex:-1,disableRipple:true}),qe]}):jsxs(Fragment,{children:[qe,Y&&f?jsx(_,{}):null]})},n.id)})]})})}let xt=Array.isArray(c$2)?c$2[0]??null:c$2??null,N=i(V$1,xt);return jsx(F,{id:C,"data-testid":C??"Select",className:Be,sx:Db(ee??{}),children:jsxs(ke,{ref:x??ae,id:C,className:Eb(a.field,O$1?.field),options:V$1,value:N,onChange:e=>{d$1?.(e==null||Array.isArray(e)?null:e.value);},label:U$1,disabled:y,required:g$1,hasError:K$1,helperText:De,feedback:q,showClearIcon:Q$1,ClearIconComponent:P$1??aa,ChevronIconComponent:j,onClear:ce,isLoading:J$1,MenuProps:$e,open:te,onOpen:He,onClose:e=>{H$1(""),le?.(e);},name:B,inputProps:$$1,endAdornment:A,valueAlignment:F$1,renderValue:()=>{if(!N)return Re;if(ne)return ne(N);let e=b(N);return jsx(L,{className:a.values,$valueAlignment:F$1,children:jsx(M,{className:a.value,title:e,children:e})})},children:[_$1,We,Ke,Ue(e=>{let s=N!=null&&(N.value===e.value||String(N.value)===String(e.value)),i=Ge(e);return jsx(I,{value:String(e.value),disabled:e.disabled,$selected:s,$hidden:!Ce(e),onMouseDown:g,onClick:()=>d$1?.(e.value),className:a.option,children:Le?jsxs(G,{children:[jsx(H,{checked:s,tabIndex:-1,disableRipple:true}),i]}):jsxs(Fragment,{children:[i,Y&&s?jsx(_,{}):null]})},e.id)})]})})});Vt.displayName="Select";var Gt=memo(Vt);export{Gt as a};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {b,a}from'./chunk-JBE2LXDH.js';import {y,x,B as B$1,aa as aa$1}from'./chunk-YG4CT6O4.js';import {aa,ba}from'./chunk-F7I3KDV5.js';import {Ub,Eb,Db}from'./chunk-XBJ4RS2B.js';import {Sc,A}from'./chunk-EYLBXWXJ.js';import {memo,useCallback,useMemo}from'react';import No,{autocompleteClasses}from'@mui/material/Autocomplete';import W from'@mui/material/Box';import ko from'@mui/material/Popper';import wo from'@mui/material/TextField';import {keyframes,styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var m="os-shared-Autocomplete",u={root:`${m}-root`,input:`${m}-input`,popper:`${m}-popper`,option:`${m}-option`,clear:`${m}-clear`,popupIndicator:`${m}-popupIndicator`,feedback:`${m}-feedback`},k={bottom:"bottom",top:"top"},ye=k.bottom,V=false,Pe="No results found",Se="Loading\u2026",B="",Ce=8,z=4,w=24,Me=4,Ae=4,So=8,Co={disableRipple:true},Mo={elevation:0},Ao={name:"offset",options:{offset:[0,So]}};function Io(e){return {name:"flip",enabled:e!==k.top,options:{fallbackPlacements:["top-start"]}}}function Oo(e){return e===k.top?"top-start":"bottom-start"}function Ie(e){let{menuDirection:o,slotProps:n,popperClassName:r}=e;return {...n,clearIndicator:{...Co,...n?.clearIndicator},paper:{...Mo,...n?.paper},popper:{...n?.popper,placement:n?.popper?.placement??Oo(o),modifiers:[Ao,Io(o),...n?.popper?.modifiers??[]],className:r}}}var ke=e=>({[`& .${autocompleteClasses.clearIndicator}`]:{visibility:"visible",padding:0,width:12,height:12,margin:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}),To=keyframes`
|
|
2
|
+
0% {
|
|
3
|
+
transform: rotate(-90deg);
|
|
4
|
+
}
|
|
5
|
+
100% {
|
|
6
|
+
transform: rotate(270deg);
|
|
7
|
+
}
|
|
8
|
+
`,we=styled(W)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${To} 2s linear infinite`}),ve=styled(wo,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:o,feedbackType:n,hasFeedback:r,hasLabel:l})=>{let{borderColor:x$1}=n?aa(e,n):{borderColor:void 0},T=r?"4px 4px 0 0":"4px",d=o?`1px solid ${e.palette.error.main}`:n&&x$1?`1px solid ${x$1}`:"1px solid transparent";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:T,borderBottomLeftRadius:r?0:"4px",borderBottomRightRadius:r?0:"4px",backgroundColor:e.palette.grey[400],border:d,borderBottom:r?"none":d,paddingTop:l?"11px":"0px",paddingBottom:l?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:l?"stretch":"center",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400],border:r?`1px solid ${n?x$1:"transparent"}`:o?d:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:r?"none":void 0,boxShadow:r||o?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:l?"flex-end":"center",alignSelf:l?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:l?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:`${B$1}px`,top:"50%",transform:"translateY(-50%)",right:x},"& .MuiAutocomplete-popupIndicator":{transform:"none",width:y,minWidth:y,height:y,padding:0,marginRight:0,marginLeft:0,display:"inline-flex",alignItems:"center",justifyContent:"center"},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:0,width:12,height:12,marginRight:0,marginLeft:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}}),Te=styled(W,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:o})=>({display:"flex",alignItems:"stretch",flexDirection:"column",width:"100%",borderRadius:4,overflow:"visible",textAlign:"start",...o&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}})),Ro=e=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:4,padding:`${Me}px 8px`,minHeight:w,height:w,maxHeight:w,boxSizing:"border-box",width:"auto",margin:Ae,borderRadius:z,fontSize:"10px",fontWeight:500,lineHeight:"12px",cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:e.v2.palette.grey[500]}),G="#F8F8F8",Lo=e=>({fontSize:"12px",fontWeight:500,lineHeight:"14px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,height:"auto",flexShrink:0,flexGrow:0,padding:8,boxSizing:"border-box",borderRadius:z,backgroundColor:e.palette.common.white,'&.Mui-focused, &[aria-selected="true"], &.Mui-focusVisible, &[aria-selected="true"].Mui-focused':{backgroundColor:G},'&[aria-disabled="true"]':{opacity:.38,pointerEvents:"none"}}),Fo={padding:8,maxHeight:320,minHeight:0,display:"flex",flexDirection:"column",gap:4,overflowY:"auto"},Re=styled(ko,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$hideEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:o,$suppressAutocompleteNoOptions:n,$hideEmptyMenuSurface:r})=>({"& .MuiPaper-root":{borderRadius:Ce,overflow:"hidden",boxShadow:e.shadows[8],border:`1px solid ${e.v2.palette.grey[100]}`,backgroundColor:e.palette.common.white,...r&&{display:"none"}},[`& .${autocompleteClasses.listbox}`]:Fo,[`& .${autocompleteClasses.option}`]:Lo(e),[`& .${autocompleteClasses.noOptions}, & .${autocompleteClasses.loading}`]:Ro(e),[`& .${autocompleteClasses.loading} .MuiCircularProgress-root`]:{width:12,height:12},...n?{[`& .${autocompleteClasses.noOptions}`]:{display:"none !important"}}:{},...o===false?{[`& .${autocompleteClasses.loading}`]:{display:"none"}}:{}}));styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.v2.palette.grey[500]}));var Le=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:o,$optionDisabled:n})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,padding:8,boxSizing:"border-box",borderRadius:4,backgroundColor:o?G:e.palette.common.white,"&.Mui-focused":{backgroundColor:G},...n&&{opacity:.38,pointerEvents:"none"}})),Fe=styled("span")({flex:1,minWidth:0}),$e=styled("img")({width:10,height:7.5,flexShrink:0}),De=styled(W)({position:"relative",width:14,height:14,transform:"rotate(0deg)",display:"flex",alignItems:"center",justifyContent:"center","& img, & svg":{width:14,height:14,display:"block"}});styled("ul")({listStyle:"none",margin:0,padding:0});var Ne=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));var He=aa$1;function Ve(){return jsx(De,{children:jsx(W,{component:"img",src:A,alt:"",sx:{width:14,height:14,display:"block"}})})}function Be(){return jsx($e,{src:Sc,alt:""})}function ze(e){return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("path",{d:"M6.66683 12.8333C3.26058 12.8333 0.500163 10.0729 0.500163 6.66667C0.500163 3.26042 3.26058 0.5 6.66683 0.5C10.0731 0.5 12.8335 3.26042 12.8335 6.66667C12.8335 10.0729 10.0731 12.8333 6.66683 12.8333Z",stroke:"url(#paint0_linear_1010_1334)",strokeMiterlimit:"10"}),jsx("defs",{children:jsxs("linearGradient",{id:"paint0_linear_1010_1334",x1:"12.8335",y1:"6.66667",x2:"0.500163",y2:"6.66667",gradientUnits:"userSpaceOnUse",children:[jsx("stop",{stopOpacity:"0.619608"}),jsx("stop",{offset:"1",stopOpacity:"0"})]})})]})}function j(e){return e===null||e===""}function S(e){if(e==null||typeof e!="object"||!("value"in e)||!("label"in e))return false;let o=e.value;return typeof o=="string"||typeof o=="number"}function v(e){if(e==null)return "";if(typeof e=="string"||typeof e=="number")return String(e);if(S(e))return b(e);if(typeof e=="object"&&"label"in e){let o=e.label;if(typeof o=="string"||typeof o=="number")return String(o);let n=a(o).trim();if(n)return n}return ""}function Ge(e,o){return S(e)&&S(o)?e.value===o.value||String(e.value)===String(o.value):e===o}function We(e){return !!e?.disabled}function je(e){if(S(e))return String(e.value);if(e!=null&&typeof e=="object"&&"id"in e){let o=e.id;if(o!=null)return String(o)}return v(e)}function qe(e){return S(e)?e.label:typeof e=="string"||typeof e=="number"?String(e):e!=null&&typeof e=="object"&&"label"in e?e.label:v(e)}function Ue(e){let{options:o,value:n,onChange:r,label:l,placeholder:x,renderInput:T,slotProps:d,textFieldProps:C,loading:Ye,isLoading:Ze,popupIcon:Je,error:Qe=false,helperText:R,feedback:q,required:K,disabled:Xe,id:_="Autocomplete",className:eo,autocompleteClassNames:M,PopperComponent:U,hasClearIcon:oo=true,hasSelectedCheckmark:Y=false,ClearIconComponent:to,onClear:no,disableClearable:po,clearIcon:ro,menuDirection:Z=ye,openOnFocus:L=V,getOptionLabel:F,renderOption:lo,isOptionEqualToValue:$,getOptionDisabled:D,getOptionKey:N,noOptionsText:J,loadingText:Q,sx:ao,...io}=e,E=!!(Ze||Ye),b=j(Q),so=j(J),X=b&&E,ee=E&&!b,A=so||X,oe=o.length===0&&(X||!ee&&A),uo=b?B:Q??Se,co=A?B:J??Pe,{isProvided:te,isVisible:I,type:ne}=Ub(q),pe=Qe&&!I,re=l!=null&&l!=="",mo=to??He,fo=useCallback(t=>F?F(t):v(t),[F]),xo=useCallback((t,p)=>$?$(t,p):Ge(t,p),[$]),H=useCallback(t=>D?D(t):We(t),[D]),go=useCallback(t=>N?N(t):je(t),[N]),bo=useCallback((t,p,s)=>{let{key:h,...y}=t;return jsxs(Le,{...y,className:Eb(u.option,y.className),$selected:s.selected,$optionDisabled:H(p),children:[jsx(Fe,{children:qe(p)}),Y&&s.selected?jsx(Be,{}):null]},h)},[H,Y]),ho=useMemo(()=>{let t=U;return t||function(s){return jsx(Re,{...s,$menuHasLoadingText:!b,$suppressAutocompleteNoOptions:A,$hideEmptyMenuSurface:oe})}},[U,b,A,oe]),le=Eb(u.popper,M?.popper,d?.popper?.className),yo=useMemo(()=>Ie({menuDirection:Z,slotProps:d,popperClassName:le}),[Z,d,le]),Po=useCallback(t=>{let p=typeof C=="function"?C(t):C,s=t.inputProps?.onMouseDown,h=p?.inputProps?.onMouseDown;return jsx(ve,{...t,...p,variant:"filled",fullWidth:true,label:l??void 0,placeholder:x??p?.placeholder??void 0,required:K,error:pe,helperText:null,feedbackType:ne,hasFeedback:I,hasLabel:re,className:Eb(u.input,M?.input,p?.className),InputProps:{...t.InputProps,...p?.InputProps,disableUnderline:true},inputProps:{...t.inputProps,...p?.inputProps,onMouseDown:y=>{h?.(y),L&&s?.(y);}}})},[C,l,x,K,pe,ne,I,re,M?.input,L]),ae=jsx(No,{...io,id:_,"data-testid":_??"Autocomplete",fullWidth:true,className:Eb(u.root,M?.root,eo),options:o,value:n,disabled:!!Xe,onChange:(t,p,s,h)=>{r?.(t,p,s,h),s==="clear"&&no?.();},loading:ee,forcePopupIcon:true,popupIcon:E?jsx(we,{"aria-hidden":true,children:jsx(ze,{})}):Je??jsx(Ve,{}),getOptionLabel:fo,isOptionEqualToValue:xo,getOptionDisabled:H,getOptionKey:go,renderOption:lo??bo,renderInput:T||Po,PopperComponent:ho,openOnFocus:L,noOptionsText:co,loadingText:uo,disableClearable:po??!oo,clearIcon:ro??jsx(mo,{className:u.clear}),sx:Db(ke,ao),slotProps:yo});return !te&&(R==null||R==="")?ae:jsxs(Te,{$hasFeedback:I,children:[ae,te?jsx(ba,{className:u.feedback,...q}):jsx(Ne,{children:R})]})}Ue.displayName="Autocomplete";var Eo=memo(Ue);
|
|
9
|
+
export{u as a,k as b,V as c,Eo as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {z,o,C,w,n,t,r,q,p,s,u,v,M as M$1,A as A$1,ba,aa}from'./chunk-MLOWKQDW.js';import {d,R,L,V as V$1,Q as Q$1}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {Gb,A as A$2,Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useState,useEffect,useMemo,memo,useRef,useLayoutEffect,useId}from'react';import y from'@mui/material/Box';import Tt from'@mui/material/ClickAwayListener';import ht from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var M="os-shared-MultiLevelSelect",a={root:`${M}-root`,open:`${M}-open`,label:`${M}-label`,fieldBody:`${M}-fieldBody`,placeholder:`${M}-placeholder`,arrow:`${M}-arrow`,menu:`${M}-menu`,search:`${M}-search`,selectedBadge:`${M}-selectedBadge`,fieldRow:`${M}-fieldRow`},ye=40,k="data-nested-submenu",$="data-nested-submenu-anchor",Ce={strategy:"fixed"},we=.7,Ne=100,Ie={width:10,height:7.5,flexShrink:0},Be={width:9,height:9,flexShrink:0};var gt={overflow:"hidden",flex:"0 0 auto",width:"max-content",maxWidth:"100%",minWidth:0},St=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),Oe=styled(y,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t$1=false})=>{let{base:n$1}=e.v2.palette;return {width:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:t,minHeight:n,padding:`0 ${C}px 0 ${w}px`,textAlign:"left",border:`${o}px solid ${t$1?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t$1?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t$1?"not-allowed":"pointer",...t$1&&{color:alpha(n$1.black,.6),[`& .${a.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${a.placeholder}`]:{color:alpha(n$1.black,.6)},"& .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},[`& .${a.fieldRow}`]:{opacity:.7},[`& .${a.fieldRow} *`]:{cursor:"not-allowed"}},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"& .Select-menuTriggerIcon--loading":{width:z,minWidth:z,height:z,cursor:"default"},[`&.${a.open}, &:focus-within`]:{border:`1px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}}),Pe=styled(ht)(({theme:e})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,margin:0,paddingTop:p,cursor:"pointer",fontSize:q,fontWeight:500,lineHeight:`${r}px`,color:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none",flexShrink:0})),Re=styled(y)({display:"flex",alignItems:"flex-start",width:"100%",minWidth:0,minHeight:v+u,paddingBottom:u,boxSizing:"border-box",flex:"0 0 auto"}),Ee=styled(M$1)({margin:0,padding:0,width:"100%",alignSelf:"center"}),Fe=styled(y)({position:"absolute",right:A$1,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,pointerEvents:"none"}),Te=styled(y)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),bt={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},vt={display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",gap:"4px",width:"100%",minWidth:0},We=styled(y,{shouldForwardProp:e=>e!=="$field"})(({$field:e})=>({...vt,...e?{padding:0,minHeight:v,boxSizing:"border-box",alignItems:"flex-start",alignContent:"flex-start"}:{marginBottom:"8px","&:empty":{display:"none"}}})),J=styled(y,{shouldForwardProp:e=>e!=="$field"})(({theme:e,$field:t})=>({...St(`${e.palette.info.dark}1a`),...gt,...t&&{cursor:"inherit"}})),ke=styled("span")(()=>bt),$e=styled(y)(()=>({position:"relative",width:"100%",minWidth:0})),Ae=styled(y)(()=>({flex:1,maxWidth:"220px",minWidth:"89px",fontWeight:500})),He=styled(y)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:"89px",fontWeight:500}));var O=e=>!e.options&&typeof e.value=="string";function Ve(e,t,n){if(e===void 0)return O(n);if(typeof e=="boolean")return e;if(typeof e=="function")return e(t,n);let o=e[t];return typeof o=="boolean"?o:O(n)}var A=e=>e.value??e.label,H=(e,t)=>t?.some(n=>n.value===e.value)??false,ze=(e,t,n)=>{if(H(e,t)){n(t?.filter(o=>o.value!==e.value)||[]);return}n([...t||[],e]);},Q=e=>O(e)?[e]:(e.options??[]).flatMap(Q),U=(e,t)=>{let n=e.filter(o=>H(o,t)).length;return {allSelected:e.length>0&&n===e.length,someSelected:n>0&&n<e.length}},je=(e,t,n)=>{let o=new Set(e.map(i=>i.value));if(U(e,t).allSelected){n((t??[]).filter(i=>!o.has(i.value)));return}let l=new Set((t??[]).map(i=>i.value)),r=e.filter(i=>!l.has(i.value));n([...t??[],...r]);},xt=(e,t)=>{let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):""},Lt=(e,t,n)=>n.some(o=>xt(e,o).toLowerCase().includes(t)),Ge=(e,t,n)=>{let o=t.toLowerCase().trim();if(!o)return e.map(i=>({node:i,depth:0}));let l=[],r=(i,d)=>{for(let s of i){if(O(s)){Lt(s,o,n)&&l.push({node:s,depth:d});continue}r(s.options??[],d+1);}};return r(e,0),l},Mt=(e,t="right")=>{let n=e?.closest(`.${Q$1.panel}`);if(!e||!n)return 0;let o=e.getBoundingClientRect(),l=n.getBoundingClientRect(),r=t.startsWith("left")?o.left-l.left:l.right-o.right;return Math.max(0,r)},Ke=e=>[{name:"flip",enabled:true,options:{rootBoundary:"viewport",padding:8,fallbackPlacements:["left-start","right-end","left-end"]}},{name:"preventOverflow",enabled:true,options:{rootBoundary:"viewport",altAxis:true,padding:8}},{name:"offset",options:{offset:({placement:t})=>[0,Mt(e.current,t)]}}],Xe=(e,t)=>e.length===t.length&&e.every((n,o)=>n===t[o]);function qe(e,t,n){let o=[],l=0;for(let r of e){if(t<=0){o.push(void 0);continue}if(l===0&&r>=t){o.push(Math.floor(t));continue}let i=l===0?0:n;if(l+i+r<=t+.5){o.push(void 0),l+=i+r;continue}let d=Math.floor(t-l-i);if(d>=Ne&&d>=r*we){o.push(d),l=0;continue}o.push(void 0),l=r;}return o}var De=(e,t)=>t instanceof Node&&!!e?.contains(t),Ye=(e,t,n)=>{if(De(t,e)||De(n,e))return true;if(!(e instanceof Element)||!n)return false;let o=e.closest(`[${k}]`)?.getAttribute($),l=o?document.getElementById(o):null;return !!(l&&n.contains(l))};function wt({options:e,variant:t,hiddenCount:n=0,onRemove:o}){let l=useRef(null),r=useRef([]),[i,d$1]=useState([]),s=e.length+(n>0?1:0),C=e.map(c=>c.label).join("\0");useLayoutEffect(()=>{let c=l.current;if(!c||s===0)return;let f=()=>{let L=r.current.slice(0,s).filter(u=>u!=null);if(L.length!==s)return;let S=L.map(u=>u.style.maxWidth);L.forEach(u=>{u.style.maxWidth="none";});let h=L.map(u=>u.getBoundingClientRect().width);L.forEach((u,G)=>{u.style.maxWidth=S[G];});let b=getComputedStyle(c),R=c.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight),j=parseFloat(b.columnGap||b.gap||"0")||0,E=qe(h,R,j);d$1(u=>Xe(u,E)?u:E);};f();let N=new ResizeObserver(f);return N.observe(c),()=>N.disconnect()},[s,C,t]);let m=t==="field",x=c=>f=>{f.stopPropagation(),f.preventDefault(),o?.(c);},w=c=>f=>{r.current[c]=f;};return jsxs(We,{ref:l,$field:m,className:m?a.fieldRow:void 0,children:[e.map((c,f)=>jsxs(J,{ref:w(f),$field:m,className:m?void 0:a.selectedBadge,style:i[f]!=null?{maxWidth:i[f]}:void 0,onClick:m?void 0:x(c),children:[m?null:jsx(d,{src:Sc,alt:"",sx:Ie}),jsx(ke,{children:c.label}),m?null:jsx(d,{src:Gb,alt:"",sx:Be})]},`${f}-${c.value}`)),n>0?jsx(J,{ref:w(e.length),$field:m,style:i[e.length]!=null?{maxWidth:i[e.length]}:void 0,children:jsxs("span",{children:["+",n]})}):null]})}var V=wt;function Nt({options:e,maxVisibleValues:t}){let o=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.floor(t)):e.length,l=e.slice(0,o),r=e.length-l.length;return jsx($e,{children:jsx(V,{options:l,variant:"field",hiddenCount:r})})}var Qe=Nt;var _e=()=>jsx("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{display:"block",flexShrink:0},children:jsx("path",{d:"M0.117188 0.504028C0.115307 0.426166 0.138248 0.350264 0.182617 0.286255C0.227088 0.222214 0.290458 0.173028 0.363281 0.144653C0.436073 0.116302 0.516047 0.109152 0.592773 0.124146C0.668745 0.138995 0.738375 0.176073 0.793945 0.229614L4.43164 3.63391C4.50662 3.70421 4.55078 3.80153 4.55078 3.90442C4.55064 4.00712 4.5065 4.10376 4.43164 4.17395L0.794922 7.57922L0.793945 7.57825C0.738766 7.63096 0.669812 7.66692 0.594727 7.68176C0.519097 7.69665 0.440194 7.69049 0.368164 7.66321C0.296002 7.63581 0.232474 7.58801 0.1875 7.52551C0.14262 7.463 0.11821 7.3886 0.118164 7.31165C0.118166 7.25986 0.12907 7.20846 0.150391 7.16125C0.171346 7.11493 0.201824 7.07367 0.239258 7.03918L3.58691 3.90442L0.239258 0.769653C0.164191 0.701295 0.119752 0.605686 0.117188 0.504028Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.233333"})});function ot({label:e,itemCount:t,isSelected:n,isIndeterminate:o,onToggle:l,children:r,isSelectable:i=false}){let d=useId(),s=useRef(null),C=useRef(null),m=useRef(null),x=useRef(null),[w,c]=useState(false),f=useMemo(()=>Ke(s),[]),N=()=>{x.current!=null&&(window.clearTimeout(x.current),x.current=null);},L=()=>{t!==0&&(N(),c(true));},S=h=>{Ye(h.relatedTarget,s.current,C.current)||(N(),x.current=window.setTimeout(()=>{x.current=null,c(false);},ye));};return useEffect(()=>()=>{x.current!=null&&window.clearTimeout(x.current);},[]),useEffect(()=>{if(!w)return;let h=()=>m.current?.update();return document.addEventListener("scroll",h,true),window.addEventListener("resize",h),()=>{document.removeEventListener("scroll",h,true),window.removeEventListener("resize",h);}},[w]),jsxs(V$1,{id:d,ref:s,isSelected:n,isIndeterminate:o,startAdornment:i?void 0:null,onClick:h=>{if(h.stopPropagation(),h.preventDefault(),!i){L();return}l();},onMouseEnter:L,onMouseLeave:S,children:[jsxs(He,{children:[e,jsx(_e,{})]}),jsx(R,{ref:C,popperRef:m,[k]:"",[$]:d,sx:{maxHeight:"min(450px, calc(100dvh - 16px))",overflow:"auto"},open:w,anchorEl:s.current,placement:"right-start",modifiers:f,popperOptions:Ce,onMouseEnter:L,onMouseLeave:S,children:r})]})}function it({option:e,value:t,onChange:n,isSelectable:o=true}){let l=H(e,t);return jsx(V$1,{isSelected:l,onClick:i=>{i.stopPropagation(),i.preventDefault(),o&&ze(e,t,n);},startAdornment:o?void 0:null,children:jsx(Ae,{children:e.label})})}function te({node:e,depth:t,value:n,onChange:o,isSelectable:l}){let r=Ve(l,t,e);if(O(e))return jsx(it,{option:e,value:n,onChange:o,isSelectable:r});if(!e.options)return null;let i=e.options,d=Q(e),{allSelected:s,someSelected:C}=U(d,n);return jsx(ot,{label:e.label,itemCount:i.length,isSelected:s,isIndeterminate:C,isSelectable:r,onToggle:()=>je(d,n,o),children:i.map(m=>jsx(te,{node:m,depth:t+1,value:n,onChange:o,isSelectable:l},A(m)))})}var Wt=["label"],st=forwardRef(({options:e,onChange:t,value:n,maxVisibleValues:o,placeholder:l,label:r,isLoading:i,isSelectable:d$1,disabled:s,className:C,sx:m,isSearchable:x=true,searchPlaceholder:w,searchBy:c=Wt,onOpen:f,onClose:N},L$1)=>{let[S,h]=useState(null),[b,R$1]=useState(""),[j,E]=useState(void 0),u=!!S,G=r??l,ct=r?l??"Please Select":"Please Select";useEffect(()=>{if(!S)return;let p=()=>{let K=S.clientWidth;K>0&&E(ie=>ie===K?ie:K);};if(p(),typeof ResizeObserver>"u")return;let I=new ResizeObserver(p);return I.observe(S),()=>I.disconnect()},[S]);let at=S?.clientWidth||j,ut=p=>{if(u){h(null),N?.();return}h(p.currentTarget),f?.();},pt=()=>{h(null),N?.();},dt=()=>{b&&R$1("");},mt=useMemo(()=>Ge(e,b,c),[e,b,c]),le=n?.length??0,ft=i?jsx(ba,{}):jsx(d,{src:b?Gb:A$2,alt:b?"close":"search",onClick:dt,sx:{width:12,height:12,cursor:b?"pointer":"default"}});return jsx(Tt,{onClickAway:()=>{u&&pt();},children:jsxs(Oe,{ref:L$1,id:"FieldWrapper","data-testid":"MultiLevelSelect",$disabled:s,"aria-disabled":s||void 0,className:Eb(a.root,u&&a.open,C),sx:m,onClick:p=>!s&&ut(p),children:[jsx(Pe,{className:a.label,component:"label",children:G}),jsxs(Re,{className:a.fieldBody,children:[le===0?jsx(Ee,{className:a.placeholder,component:"p",children:ct}):null,le>0&&n?jsx(Qe,{options:n,maxVisibleValues:o}):null]}),jsx(Fe,{className:a.arrow,"aria-hidden":true,children:i?jsx(y,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ba,{})}):jsx(y,{component:"span",className:`Select-menuTriggerIcon${u?" Select-menuTriggerIcon-open":""}`,children:jsx(aa,{})})}),jsx(R,{open:u,anchorEl:S,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",width:at},panelProps:{className:a.menu},children:jsxs(Te,{children:[x?jsx(L,{className:a.search,fullWidth:true,size:"md",placeholder:w??l??"Select",endAdornment:ft,value:b,onClick:p=>{p.stopPropagation();},onMouseDown:p=>{p.stopPropagation();},onChange:p=>{R$1(p.target.value);},sx:{mb:"8px"}}):null,jsx(V,{options:n??[],variant:"menu",onRemove:p=>{t(n?.filter(I=>I.value!==p.value)||[]);}}),mt.map(({node:p,depth:I})=>jsx(te,{node:p,depth:I,value:n,onChange:t,isSelectable:d$1},A(p)))]})})]})})});st.displayName="MultiLevelSelect";var kt=memo(st);
|
|
1
|
+
import {z,o,C,w,n,t,r,q,p,s,u,v,M as M$1,A as A$1,ca,ba}from'./chunk-YG4CT6O4.js';import {d,R,L,V as V$1,Q as Q$1}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {Gb,A as A$2,Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useState,useEffect,useMemo,memo,useRef,useLayoutEffect,useId}from'react';import y from'@mui/material/Box';import Tt from'@mui/material/ClickAwayListener';import ht from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var M="os-shared-MultiLevelSelect",a={root:`${M}-root`,open:`${M}-open`,label:`${M}-label`,fieldBody:`${M}-fieldBody`,placeholder:`${M}-placeholder`,arrow:`${M}-arrow`,menu:`${M}-menu`,search:`${M}-search`,selectedBadge:`${M}-selectedBadge`,fieldRow:`${M}-fieldRow`},ye=40,k="data-nested-submenu",$="data-nested-submenu-anchor",Ce={strategy:"fixed"},we=.7,Ne=100,Ie={width:10,height:7.5,flexShrink:0},Be={width:9,height:9,flexShrink:0};var gt={overflow:"hidden",flex:"0 0 auto",width:"max-content",maxWidth:"100%",minWidth:0},St=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),Oe=styled(y,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t$1=false})=>{let{base:n$1}=e.v2.palette;return {width:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:t,minHeight:n,padding:`0 ${C}px 0 ${w}px`,textAlign:"left",border:`${o}px solid ${t$1?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t$1?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t$1?"not-allowed":"pointer",...t$1&&{color:alpha(n$1.black,.6),[`& .${a.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${a.placeholder}`]:{color:alpha(n$1.black,.6)},"& .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},[`& .${a.fieldRow}`]:{opacity:.7},[`& .${a.fieldRow} *`]:{cursor:"not-allowed"}},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"& .Select-menuTriggerIcon--loading":{width:z,minWidth:z,height:z,cursor:"default"},[`&.${a.open}, &:focus-within`]:{border:`1px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}}),Pe=styled(ht)(({theme:e})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,margin:0,paddingTop:p,cursor:"pointer",fontSize:q,fontWeight:500,lineHeight:`${r}px`,color:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",pointerEvents:"none",flexShrink:0})),Re=styled(y)({display:"flex",alignItems:"flex-start",width:"100%",minWidth:0,minHeight:v+u,paddingBottom:u,boxSizing:"border-box",flex:"0 0 auto"}),Ee=styled(M$1)({margin:0,padding:0,width:"100%",alignSelf:"center"}),Fe=styled(y)({position:"absolute",right:A$1,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,pointerEvents:"none"}),Te=styled(y)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),bt={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},vt={display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",gap:"4px",width:"100%",minWidth:0},We=styled(y,{shouldForwardProp:e=>e!=="$field"})(({$field:e})=>({...vt,...e?{padding:0,minHeight:v,boxSizing:"border-box",alignItems:"flex-start",alignContent:"flex-start"}:{marginBottom:"8px","&:empty":{display:"none"}}})),J=styled(y,{shouldForwardProp:e=>e!=="$field"})(({theme:e,$field:t})=>({...St(`${e.palette.info.dark}1a`),...gt,...t&&{cursor:"inherit"}})),ke=styled("span")(()=>bt),$e=styled(y)(()=>({position:"relative",width:"100%",minWidth:0})),Ae=styled(y)(()=>({flex:1,maxWidth:"220px",minWidth:"89px",fontWeight:500})),He=styled(y)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:"89px",fontWeight:500}));var O=e=>!e.options&&typeof e.value=="string";function Ve(e,t,n){if(e===void 0)return O(n);if(typeof e=="boolean")return e;if(typeof e=="function")return e(t,n);let o=e[t];return typeof o=="boolean"?o:O(n)}var A=e=>e.value??e.label,H=(e,t)=>t?.some(n=>n.value===e.value)??false,ze=(e,t,n)=>{if(H(e,t)){n(t?.filter(o=>o.value!==e.value)||[]);return}n([...t||[],e]);},Q=e=>O(e)?[e]:(e.options??[]).flatMap(Q),U=(e,t)=>{let n=e.filter(o=>H(o,t)).length;return {allSelected:e.length>0&&n===e.length,someSelected:n>0&&n<e.length}},je=(e,t,n)=>{let o=new Set(e.map(i=>i.value));if(U(e,t).allSelected){n((t??[]).filter(i=>!o.has(i.value)));return}let l=new Set((t??[]).map(i=>i.value)),r=e.filter(i=>!l.has(i.value));n([...t??[],...r]);},xt=(e,t)=>{let n=e[t];return typeof n=="string"?n:typeof n=="number"&&Number.isFinite(n)?String(n):""},Lt=(e,t,n)=>n.some(o=>xt(e,o).toLowerCase().includes(t)),Ge=(e,t,n)=>{let o=t.toLowerCase().trim();if(!o)return e.map(i=>({node:i,depth:0}));let l=[],r=(i,d)=>{for(let s of i){if(O(s)){Lt(s,o,n)&&l.push({node:s,depth:d});continue}r(s.options??[],d+1);}};return r(e,0),l},Mt=(e,t="right")=>{let n=e?.closest(`.${Q$1.panel}`);if(!e||!n)return 0;let o=e.getBoundingClientRect(),l=n.getBoundingClientRect(),r=t.startsWith("left")?o.left-l.left:l.right-o.right;return Math.max(0,r)},Ke=e=>[{name:"flip",enabled:true,options:{rootBoundary:"viewport",padding:8,fallbackPlacements:["left-start","right-end","left-end"]}},{name:"preventOverflow",enabled:true,options:{rootBoundary:"viewport",altAxis:true,padding:8}},{name:"offset",options:{offset:({placement:t})=>[0,Mt(e.current,t)]}}],Xe=(e,t)=>e.length===t.length&&e.every((n,o)=>n===t[o]);function qe(e,t,n){let o=[],l=0;for(let r of e){if(t<=0){o.push(void 0);continue}if(l===0&&r>=t){o.push(Math.floor(t));continue}let i=l===0?0:n;if(l+i+r<=t+.5){o.push(void 0),l+=i+r;continue}let d=Math.floor(t-l-i);if(d>=Ne&&d>=r*we){o.push(d),l=0;continue}o.push(void 0),l=r;}return o}var De=(e,t)=>t instanceof Node&&!!e?.contains(t),Ye=(e,t,n)=>{if(De(t,e)||De(n,e))return true;if(!(e instanceof Element)||!n)return false;let o=e.closest(`[${k}]`)?.getAttribute($),l=o?document.getElementById(o):null;return !!(l&&n.contains(l))};function wt({options:e,variant:t,hiddenCount:n=0,onRemove:o}){let l=useRef(null),r=useRef([]),[i,d$1]=useState([]),s=e.length+(n>0?1:0),C=e.map(c=>c.label).join("\0");useLayoutEffect(()=>{let c=l.current;if(!c||s===0)return;let f=()=>{let L=r.current.slice(0,s).filter(u=>u!=null);if(L.length!==s)return;let S=L.map(u=>u.style.maxWidth);L.forEach(u=>{u.style.maxWidth="none";});let h=L.map(u=>u.getBoundingClientRect().width);L.forEach((u,G)=>{u.style.maxWidth=S[G];});let b=getComputedStyle(c),R=c.clientWidth-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight),j=parseFloat(b.columnGap||b.gap||"0")||0,E=qe(h,R,j);d$1(u=>Xe(u,E)?u:E);};f();let N=new ResizeObserver(f);return N.observe(c),()=>N.disconnect()},[s,C,t]);let m=t==="field",x=c=>f=>{f.stopPropagation(),f.preventDefault(),o?.(c);},w=c=>f=>{r.current[c]=f;};return jsxs(We,{ref:l,$field:m,className:m?a.fieldRow:void 0,children:[e.map((c,f)=>jsxs(J,{ref:w(f),$field:m,className:m?void 0:a.selectedBadge,style:i[f]!=null?{maxWidth:i[f]}:void 0,onClick:m?void 0:x(c),children:[m?null:jsx(d,{src:Sc,alt:"",sx:Ie}),jsx(ke,{children:c.label}),m?null:jsx(d,{src:Gb,alt:"",sx:Be})]},`${f}-${c.value}`)),n>0?jsx(J,{ref:w(e.length),$field:m,style:i[e.length]!=null?{maxWidth:i[e.length]}:void 0,children:jsxs("span",{children:["+",n]})}):null]})}var V=wt;function Nt({options:e,maxVisibleValues:t}){let o=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.floor(t)):e.length,l=e.slice(0,o),r=e.length-l.length;return jsx($e,{children:jsx(V,{options:l,variant:"field",hiddenCount:r})})}var Qe=Nt;var _e=()=>jsx("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{display:"block",flexShrink:0},children:jsx("path",{d:"M0.117188 0.504028C0.115307 0.426166 0.138248 0.350264 0.182617 0.286255C0.227088 0.222214 0.290458 0.173028 0.363281 0.144653C0.436073 0.116302 0.516047 0.109152 0.592773 0.124146C0.668745 0.138995 0.738375 0.176073 0.793945 0.229614L4.43164 3.63391C4.50662 3.70421 4.55078 3.80153 4.55078 3.90442C4.55064 4.00712 4.5065 4.10376 4.43164 4.17395L0.794922 7.57922L0.793945 7.57825C0.738766 7.63096 0.669812 7.66692 0.594727 7.68176C0.519097 7.69665 0.440194 7.69049 0.368164 7.66321C0.296002 7.63581 0.232474 7.58801 0.1875 7.52551C0.14262 7.463 0.11821 7.3886 0.118164 7.31165C0.118166 7.25986 0.12907 7.20846 0.150391 7.16125C0.171346 7.11493 0.201824 7.07367 0.239258 7.03918L3.58691 3.90442L0.239258 0.769653C0.164191 0.701295 0.119752 0.605686 0.117188 0.504028Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.233333"})});function ot({label:e,itemCount:t,isSelected:n,isIndeterminate:o,onToggle:l,children:r,isSelectable:i=false}){let d=useId(),s=useRef(null),C=useRef(null),m=useRef(null),x=useRef(null),[w,c]=useState(false),f=useMemo(()=>Ke(s),[]),N=()=>{x.current!=null&&(window.clearTimeout(x.current),x.current=null);},L=()=>{t!==0&&(N(),c(true));},S=h=>{Ye(h.relatedTarget,s.current,C.current)||(N(),x.current=window.setTimeout(()=>{x.current=null,c(false);},ye));};return useEffect(()=>()=>{x.current!=null&&window.clearTimeout(x.current);},[]),useEffect(()=>{if(!w)return;let h=()=>m.current?.update();return document.addEventListener("scroll",h,true),window.addEventListener("resize",h),()=>{document.removeEventListener("scroll",h,true),window.removeEventListener("resize",h);}},[w]),jsxs(V$1,{id:d,ref:s,isSelected:n,isIndeterminate:o,startAdornment:i?void 0:null,onClick:h=>{if(h.stopPropagation(),h.preventDefault(),!i){L();return}l();},onMouseEnter:L,onMouseLeave:S,children:[jsxs(He,{children:[e,jsx(_e,{})]}),jsx(R,{ref:C,popperRef:m,[k]:"",[$]:d,sx:{maxHeight:"min(450px, calc(100dvh - 16px))",overflow:"auto"},open:w,anchorEl:s.current,placement:"right-start",modifiers:f,popperOptions:Ce,onMouseEnter:L,onMouseLeave:S,children:r})]})}function it({option:e,value:t,onChange:n,isSelectable:o=true}){let l=H(e,t);return jsx(V$1,{isSelected:l,onClick:i=>{i.stopPropagation(),i.preventDefault(),o&&ze(e,t,n);},startAdornment:o?void 0:null,children:jsx(Ae,{children:e.label})})}function te({node:e,depth:t,value:n,onChange:o,isSelectable:l}){let r=Ve(l,t,e);if(O(e))return jsx(it,{option:e,value:n,onChange:o,isSelectable:r});if(!e.options)return null;let i=e.options,d=Q(e),{allSelected:s,someSelected:C}=U(d,n);return jsx(ot,{label:e.label,itemCount:i.length,isSelected:s,isIndeterminate:C,isSelectable:r,onToggle:()=>je(d,n,o),children:i.map(m=>jsx(te,{node:m,depth:t+1,value:n,onChange:o,isSelectable:l},A(m)))})}var Wt=["label"],st=forwardRef(({options:e,onChange:t,value:n,maxVisibleValues:o,placeholder:l,label:r,isLoading:i,isSelectable:d$1,disabled:s,className:C,sx:m,isSearchable:x=true,searchPlaceholder:w,searchBy:c=Wt,onOpen:f,onClose:N},L$1)=>{let[S,h]=useState(null),[b,R$1]=useState(""),[j,E]=useState(void 0),u=!!S,G=r??l,ct=r?l??"Please Select":"Please Select";useEffect(()=>{if(!S)return;let p=()=>{let K=S.clientWidth;K>0&&E(ie=>ie===K?ie:K);};if(p(),typeof ResizeObserver>"u")return;let I=new ResizeObserver(p);return I.observe(S),()=>I.disconnect()},[S]);let at=S?.clientWidth||j,ut=p=>{if(u){h(null),N?.();return}h(p.currentTarget),f?.();},pt=()=>{h(null),N?.();},dt=()=>{b&&R$1("");},mt=useMemo(()=>Ge(e,b,c),[e,b,c]),le=n?.length??0,ft=i?jsx(ca,{}):jsx(d,{src:b?Gb:A$2,alt:b?"close":"search",onClick:dt,sx:{width:12,height:12,cursor:b?"pointer":"default"}});return jsx(Tt,{onClickAway:()=>{u&&pt();},children:jsxs(Oe,{ref:L$1,id:"FieldWrapper","data-testid":"MultiLevelSelect",$disabled:s,"aria-disabled":s||void 0,className:Eb(a.root,u&&a.open,C),sx:m,onClick:p=>!s&&ut(p),children:[jsx(Pe,{className:a.label,component:"label",children:G}),jsxs(Re,{className:a.fieldBody,children:[le===0?jsx(Ee,{className:a.placeholder,component:"p",children:ct}):null,le>0&&n?jsx(Qe,{options:n,maxVisibleValues:o}):null]}),jsx(Fe,{className:a.arrow,"aria-hidden":true,children:i?jsx(y,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ca,{})}):jsx(y,{component:"span",className:`Select-menuTriggerIcon${u?" Select-menuTriggerIcon-open":""}`,children:jsx(ba,{})})}),jsx(R,{open:u,anchorEl:S,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",width:at},panelProps:{className:a.menu},children:jsxs(Te,{children:[x?jsx(L,{className:a.search,fullWidth:true,size:"md",placeholder:w??l??"Select",endAdornment:ft,value:b,onClick:p=>{p.stopPropagation();},onMouseDown:p=>{p.stopPropagation();},onChange:p=>{R$1(p.target.value);},sx:{mb:"8px"}}):null,jsx(V,{options:n??[],variant:"menu",onRemove:p=>{t(n?.filter(I=>I.value!==p.value)||[]);}}),mt.map(({node:p,depth:I})=>jsx(te,{node:p,depth:I,value:n,onChange:t,isSelectable:d$1},A(p)))]})})]})})});st.displayName="MultiLevelSelect";var kt=memo(st);
|
|
2
2
|
export{a,kt as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {o,v,u,t as t$1,n,C,w,r,q,p,s,m,l,z,A,
|
|
1
|
+
import {o,v,u,t as t$1,n,C,w,r,q,p,s,m,l,z,A,ca}from'./chunk-YG4CT6O4.js';import {j,P,O,V,R,d}from'./chunk-F7I3KDV5.js';import {Eb,Db}from'./chunk-XBJ4RS2B.js';import {Sc}from'./chunk-EYLBXWXJ.js';import {forwardRef,useRef,useState,memo}from'react';import ze from'@mui/material/ClickAwayListener';import Ve from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';var i="os-shared-GroupedSelect",t={root:`${i}-root`,trigger:`${i}-trigger`,triggerBody:`${i}-triggerBody`,hasLabel:`${i}-hasLabel`,triggerIcon:`${i}-triggerIcon`,menu:`${i}-menu`,groups:`${i}-groups`,group:`${i}-group`,groupLabel:`${i}-groupLabel`,option:`${i}-option`,optionCheck:`${i}-optionCheck`};function _({open:e}){return jsx(Ve,{viewBox:"0 0 8 5",sx:{width:8,height:5,transform:e?"rotate(180deg)":"none",transition:"transform 0.2s ease, color 0.2s ease"},children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:.233333})})}var te=styled(g,{shouldForwardProp:e=>e!=="open"&&e!=="disabled"})(({theme:e,open:o$1,disabled:c})=>{let u={border:`${o}px solid ${e.v2.palette.brand[500]}`,boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`};return {display:"flex",alignItems:"center",cursor:c?"not-allowed":"pointer",position:"relative",maxWidth:"100%",outline:"none",[`& .${t.trigger}`]:{border:`${o}px solid transparent`,boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter})},...!c&&{[`&:focus-within .${t.trigger}`]:u,...o$1&&{[`& .${t.trigger}`]:u},[`&:focus-within .${t.triggerIcon} .MuiSvgIcon-root`]:{color:e.v2.palette.brand[500]},...o$1&&{[`& .${t.triggerIcon} .MuiSvgIcon-root`]:{color:e.v2.palette.brand[500]}}}}}),oe=styled(g,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({flex:1,minWidth:0,height:32,maxHeight:32,borderRadius:"4px",overflow:"hidden",backgroundColor:e.palette.grey[400],cursor:o?"default":"pointer",position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",padding:`0 ${C}px 0 ${w}px`,textAlign:"start",[`&:where(.${t.hasLabel})`]:{height:n,maxHeight:n,gap:t$1,justifyContent:"flex-end",[`& .${t.triggerBody}`]:{flex:"0 0 auto",alignItems:"flex-start",minHeight:v+u,paddingBottom:u,boxSizing:"border-box","& > *":{height:"auto",minHeight:v}}}})),re=styled(j,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>({alignSelf:"stretch",width:"100%",boxSizing:"border-box",height:s,flexShrink:0,margin:0,paddingTop:p,fontSize:q,fontWeight:500,lineHeight:`${r}px`,textAlign:"start",color:o?e.palette.text.disabled:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})),le=styled(g)(()=>({display:"flex",alignItems:"center",width:"100%",minWidth:0,flex:1})),ne=styled(g,{shouldForwardProp:e=>e!=="$placeholder"&&e!=="$disabled"&&e!=="$valueAlignment"})(({theme:e,$placeholder:o,$disabled:c,$valueAlignment:u=m})=>{let m=u===l.end;return {fontSize:"11px",lineHeight:"11px",color:c?e.palette.text.disabled:o?e.palette.text.secondary:e.v2.palette.base.black,height:22,flex:"1 1 0%",minWidth:0,display:"flex",alignItems:"center",justifyContent:m?"flex-end":"flex-start",textAlign:m?"end":"start",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingInlineEnd:m?0:void 0}}),ie=styled(g,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>({position:"absolute",right:A,top:"50%",transform:"translateY(-50%)",width:z,height:z,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",lineHeight:0,color:o?e.palette.text.disabled:e.v2.palette.base.black,opacity:o?e.palette.action.disabledOpacity:1})),ae=styled(g)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),de=styled(P)(({theme:e})=>{let o=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:o},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:o},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:o,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}}),se=styled(j)(({theme:e})=>({fontSize:q,color:e.v2.palette.grey[500],fontWeight:600,lineHeight:`${r}px`})),pe=styled(V)(()=>({fontSize:"10px",fontWeight:500,textTransform:"none",justifyContent:"space-between",padding:"8px 20px"}));function je(e,o){return e?.id===o?.id}var ge=forwardRef(({id:e,label:o,placeholder:c,renderValue:u,IconComponent:m$1,isLoading:me=false,valueAlignment:Se=m,options:xe,value:h,onChange:be,isOptionEqualToValue:fe=je,renderOption:he,renderGroupLabel:ye,open:Ge,onOpenChange:Ce,expandedGroupIndex:P,defaultExpandedGroupIndex:$e=0,onExpandedGroupChange:Le,disabled:p=false,sx:we,menuSx:Te,className:ve},Ee)=>{let k=useRef(null),[F,Ie]=useState(null),[Pe,ke]=useState($e),s=Ge??F!==null,S=F??k.current,Fe=P??Pe,N=useRef(void 0);s&&S&&S.clientWidth>0&&(N.current=S.clientWidth);let Ne=N.current,y=(r,n)=>{Ie(n),Ce?.(r);},Ae=r=>{if(p)return;let n=!s;y(n,n?r.currentTarget:null);},A=()=>{s&&y(false,null);},He=r=>{r.key==="Escape"&&A();},Me=(r,n)=>{let a=n?r:null;P===void 0&&ke(a),Le?.(a);},Be=r=>{r.disabled||(be?.(r),y(false,null));},H=u?.(h)??h?.label??null,M=m$1,B=!!o;return jsx(ze,{onClickAway:A,children:jsxs(te,{ref:Ee,id:e,"data-testid":"GroupedSelect",className:Eb(t.root,ve),sx:we,open:s,disabled:p,tabIndex:p?-1:0,role:"combobox","aria-expanded":s,"aria-haspopup":"listbox",onClick:Ae,onKeyDown:He,children:[jsxs(oe,{ref:k,className:Eb(t.trigger,B&&t.hasLabel),disabled:p,children:[B&&jsx(re,{$disabled:p,children:o}),jsx(le,{className:t.triggerBody,children:jsx(ne,{$placeholder:H==null,$disabled:p,$valueAlignment:Se,children:H??c??""})}),jsx(ie,{className:t.triggerIcon,$disabled:p,children:me?jsx(ca,{}):M?jsx(M,{className:Eb(s&&"MuiSelect-iconOpen")}):jsx(_,{open:s})})]}),jsx(R,{open:s,anchorEl:S,placement:"bottom-start",className:t.menu,sx:Db({width:Ne??S?.clientWidth,marginTop:"4px"},Te),children:jsx(ae,{className:t.groups,onClick:r=>r.stopPropagation(),onMouseDown:r=>r.stopPropagation(),children:(xe??[]).map((r,n)=>jsx(de,{className:t.group,expanded:Fe===n,onChange:a=>Me(n,a),slotProps:{root:{square:true}},label:ye?.(r.group,n)??jsx(se,{variant:"caption",className:t.groupLabel,children:r.group}),content:(r?.options||[]).map((a,We)=>{let Oe=fe(a,h);return jsxs(pe,{className:t.option,startAdornment:null,isDisabled:a.disabled,onClick:()=>Be(a),children:[he?.(a)??a.label,Oe&&jsx(d,{src:Sc,alt:"selected",sx:{width:14,height:10},className:t.optionCheck})]},`${n}-${We}`)})},`${n}`))})})]})})});ge.displayName="GroupedSelect";var Ke=memo(ge);export{t as a,Ke as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {f as f$1,aa}from'./chunk-F7I3KDV5.js';import {Sc,A as A$1}from'./chunk-EYLBXWXJ.js';import {forwardRef}from'react';import r from'@mui/material/Box';import ne from'@mui/material/CircularProgress';import ie from'@mui/material/SvgIcon';import J from'@mui/material/Button';import K from'@mui/material/FormControl';import Q from'@mui/material/Input';import m from'@mui/material/ListSubheader';import U from'@mui/material/MenuItem';import X from'@mui/material/Select';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-Select",u={root:`${o}-root`,field:`${o}-field`,input:`${o}-input`,display:`${o}-display`,endAdornment:`${o}-endAdornment`,chevron:`${o}-chevron`,loading:`${o}-loading`,menu:`${o}-menu`,option:`${o}-option`,clear:`${o}-clear`,feedback:`${o}-feedback`,values:`${o}-values`,value:`${o}-value`,valueOverflow:`${o}-valueOverflow`,search:`${o}-search`,summary:`${o}-summary`,groupLabel:`${o}-groupLabel`},ae="Search",de=8,pe=8,a=28,d=36,n=17,se=4,z=256,W=272,A=293,ce=8,E={bottom:"bottom",top:"top"},xe=E.bottom,h={start:"start",end:"end"},ge=h.start,R=48,O=1,G=R-2*O,D=8,ue=10,j=13,N=D+j,Z=4,q=6,he=G-N-Z-q,b=8,f=4,y=f,c=8,x=16,v=8,g=4,me=g+x+v,Se=g+c+y;var Fe={maxHeight:z,[`&:has(.${u.search})`]:{maxHeight:`${W}px !important`},[`&:has(.${u.search}):has(.${u.summary})`]:{maxHeight:`${A}px !important`}},$e=styled(r)({width:"100%",display:"flex",flexDirection:"column"}),Le=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",minWidth:0})),ze=styled(f$1,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>({padding:0,pointerEvents:"none",...e&&{opacity:.5}})),B="#F8F8F8",We=styled(U,{shouldForwardProp:e=>e!=="$selected"&&e!=="$hidden"})(({theme:e,$selected:i,$hidden:l})=>({fontSize:"12px",fontWeight:500,lineHeight:"16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1),minHeight:a,height:"auto",flexShrink:0,padding:"6px 8px",overflow:"hidden",[e.breakpoints.up("sm")]:{minHeight:a},boxSizing:"border-box",borderRadius:4,backgroundColor:i?B:e.palette.common.white,"&.Mui-selected, &.Mui-focusVisible, &:hover, &.Mui-selected:hover":{backgroundColor:B},"&.Mui-disabled":{opacity:.38},...l&&{display:"none !important"}})),Ae=styled(r,{shouldForwardProp:e=>e!=="$customLayout"})(({$customLayout:e})=>({flex:1,minWidth:0,display:"flex",alignItems:e?"flex-start":"center",alignSelf:e?"stretch":void 0,height:e?"auto":void 0,overflow:e?"visible":"hidden",lineHeight:"16px"})),Be=styled("span")({display:"block",minWidth:0,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",fontWeight:500,lineHeight:"16px"}),Te=styled(r,{shouldForwardProp:e=>e!=="$valueAlignment"})(({$valueAlignment:e})=>{let i=e===h.end;return {display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:i?"flex-end":"flex-start",width:"100%",minWidth:0,maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",pointerEvents:"none",textAlign:i?"end":"start"}}),Ve=styled(r)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto",maxWidth:"100%",fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:e.v2.palette.base.black,textAlign:"start"})),Ee=styled(r)({flex:"0 0 auto",whiteSpace:"nowrap",marginLeft:4,fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:"var(--fg-brand, rgba(31, 136, 208, 1))"}),Y=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:d,minHeight:d,maxHeight:d,padding:0,lineHeight:1,overflow:"hidden",flexShrink:0,position:"sticky",top:0,zIndex:1,"&.MuiListSubheader-root":{height:d,minHeight:d,padding:0,lineHeight:1}}));Y.muiSkipListHighlight=true;var _=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:a,minHeight:a,padding:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:500,lineHeight:"14px",color:e.v2.palette.grey[500],flexShrink:0,"&.MuiListSubheader-root":{height:a,minHeight:a,padding:0,lineHeight:"14px"}}));_.muiSkipListHighlight=true;var ee=styled(m,{shouldForwardProp:e=>e!=="$divider"&&e!=="$hidden"})(({theme:e,$divider:i,$hidden:l})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",flexShrink:0,padding:"8px 8px 4px",fontSize:10,fontWeight:500,lineHeight:"100%",color:e.v2.palette.grey[500],borderTop:i?`1px solid ${e.v2.palette.border.default}`:"none","&.MuiListSubheader-root":{position:"static",lineHeight:"100%"},"&:empty":{padding:0},...l&&{display:"none !important"}})),Re=Object.assign(ee,{muiSkipListHighlight:true}),Oe=styled(Q)(({theme:e})=>({width:"100%",height:d,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:`1px solid ${e.v2.palette.grey[100]}`,boxSizing:"border-box","&:hover":{borderColor:e.v2.palette.grey[100]},"&.Mui-focused":{borderColor:e.v2.palette.brand[500],boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}})),T=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),Ge=styled(m)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",display:"flex",alignItems:"center",height:n,minHeight:n,maxHeight:n,padding:0,lineHeight:`${n}px`,overflow:"hidden",flexShrink:0,"&.MuiListSubheader-root":{height:n,minHeight:n,padding:0,lineHeight:`${n}px`}})),De=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",width:"100%",height:n,minHeight:n,gap:e.spacing(1)})),je=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:`${n}px`,letterSpacing:0,color:e.v2.palette.grey[500]})),Ne=styled(J)(({theme:e})=>({minWidth:0,minHeight:0,height:n,padding:0,fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:`${n}px`,letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:e.v2.palette.brand[500],"&.MuiButton-root":{minWidth:0,minHeight:0,height:n,padding:0,lineHeight:`${n}px`}})),Ze=styled(K)(({theme:e})=>({minWidth:52,height:"40px !important",maxHeight:"40px !important",backgroundColor:"transparent",width:"100%",cursor:"pointer","& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-root.Mui-disabled":{cursor:"default"},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,height:"100%",pointerEvents:"none"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}})),qe=styled(X,{shouldForwardProp:e=>!["feedbackType","hasFeedback","valueAlignment","hasLabel"].includes(e)})(({theme:e,error:i,feedbackType:l,hasFeedback:s,valueAlignment:V,hasLabel:w})=>{let{borderColor:I}=aa(e,l),C=s?"4px 4px 0 0":"4px",S=V===h.end,P=S?g:f,H=w?`18px ${P}px 6px ${b}px !important`:`0 ${P}px 0 ${b}px !important`;return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:C,overflow:"hidden",backgroundColor:e.palette.grey[400],border:"1px solid transparent",boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&.Mui-focused":{border:s?`1px solid ${l?I:"transparent"}`:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:s?"none":void 0,boxShadow:s?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"},".MuiSelect-select":{padding:H,height:"40px !important",maxHeight:"40px !important",display:"flex !important",alignItems:w?"flex-end !important":"center !important",justifyContent:S?"flex-end !important":"flex-start !important",textAlign:S?"end !important":"start !important",boxSizing:"border-box",overflow:"hidden",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:C,fontSize:"11px",lineHeight:"11px",cursor:"pointer",position:"relative",zIndex:0,"&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:H},"&.MuiInputBase-adornedEnd":{display:"inline-flex",alignItems:"center",backgroundColor:e.palette.grey[400],gap:0},"&&.MuiInputBase-adornedEnd .MuiInputBase-input":{flex:"1 1 0%",minWidth:0,width:"auto",maxWidth:"100%"},"& .Select-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,marginRight:y,gap:g,position:"relative",zIndex:2,pointerEvents:"auto","&.Select-endAdornmentRoot--loading":{marginRight:v}},"& .Select-clearIconButton":{display:"inline-flex",alignItems:"center",justifyContent:"center",width:12,height:12,padding:0,border:"none",appearance:"none",background:"transparent",color:e.v2.palette.base.black,cursor:"pointer",flexShrink:0,lineHeight:0,position:"relative",zIndex:2,pointerEvents:"auto","& svg":{display:"block",width:8,height:8,fontSize:8},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:1}},"&.Mui-disabled .Select-clearIconButton":{opacity:"0 !important",pointerEvents:"none"},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c,minWidth:c,height:c,cursor:"pointer",color:e.v2.palette.base.black,lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create(["transform","color"],{duration:e.transitions.duration.shorter})},"&.Select-menuTriggerIcon--loading":{width:x,minWidth:x,height:x,cursor:"default"}},"&.Mui-focused .Select-menuTriggerIcon, & .Select-menuTriggerIcon-open":{color:e.v2.palette.brand[500]},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},...l&&{border:`1px solid ${I}`},...s&&{borderBottom:"none"},...i&&{border:`1px solid ${e.palette.error.main}`,boxShadow:"none"}}}),Je=styled(r,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:i})=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,width:"100%",cursor:"pointer",borderRadius:4,overflow:"visible",textAlign:"start",...i&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}},"&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}})),Ke=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));function ot(){return jsx(r,{component:"img",src:Sc,alt:"",sx:{width:10,height:7.5,flexShrink:0}})}function nt(){return jsx(T,{src:A$1,alt:""})}function it(){return jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":true,children:[jsx("path",{d:"M1.795 1.739L6.316 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"}),jsx("path",{d:"M6.316 1.739L1.795 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"})]})}var re=forwardRef((e,i)=>jsx(ie,{ref:i,viewBox:"0 0 8 5",fill:"none",fontSize:"small",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:.233333})}));re.displayName="SelectChevronIcon";function rt(){return jsx(ne,{size:14,sx:{color:"text.secondary"}})}export{nt as $,v as A,g as B,me as C,Se as D,Fe as E,$e as F,Le as G,ze as H,We as I,Ae as J,Be as K,Te as L,Ve as M,Ee as N,Y as O,_ as P,Re as Q,Oe as R,Ge as S,De as T,je as U,Ne as V,Ze as W,qe as X,Je as Y,Ke as Z,ot as _,u as a,it as aa,ae as b,re as ba,de as c,rt as ca,pe as d,se as e,z as f,W as g,A as h,ce as i,E as j,xe as k,h as l,ge as m,R as n,O as o,D as p,ue as q,j as r,N as s,Z as t,q as u,he as v,b as w,y as x,c as y,x as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as Autocomplete,a as autocompleteClassNames,c as autocompleteDefaultOpenOnFocus,b as autocompleteMenuDirection}from'../../_chunks/chunk-
|
|
1
|
+
export{d as Autocomplete,a as autocompleteClassNames,c as autocompleteDefaultOpenOnFocus,b as autocompleteMenuDirection}from'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{lc as ColumnViewsPicker,nc as CreateViewDialog,jc as CustomViews,kc as DefaultViews,mc as ViewsDropdown,Fb as areAllColumnsSelected,Lb as areAllCurrentColumnsSelected,Ob as areColumnsEqual,Gb as areSomeColumnsSelected,Mb as areSomeCurrentColumnsSelected,ec as buildFullTemplateLayouts,cc as buildRequiredColumnView,mb as convertColumnsToLayoutSection,Xb as convertTemplateToColumnsView,Yb as convertTemplatesToColumnsView,ub as countCustomTemplates,vb as countCustomViewMenuItems,ob as createCustomViewMenuItem,Ib as deepCloneColumns,Bb as getColumnCheckState,Ub as getColumnOrder,lb as getColumnsByMode,ac as getLayoutCodesForMode,nb as getLayoutDataFromTemplates,bc as getOtherModeSectionCode,Tb as getSubmenuFromTemplateLayout,yb as getSubmenuItems,Ab as getSubmenuItemsForDisplay,qb as getTemplateRole,Vb as handleTemplateUpdate,dc as hasLayoutSectionForMode,zb as hasSubmenu,Rb as initializeCreateColumns,Sb as initializeCreateColumnsWithCurrentState,Qb as initializeEditingColumns,$b as isCheckboxInteractionTarget,tb as isCustomTemplate,sb as isCustomView,ib as isDateColumn,jb as isIndexColumn,rb as isPresetView,Hb as isValidTemplateName,xb as mapTemplatesToMenuItems,Nb as normalizeColumnsSelected,Zb as replaceTemplateInList,Pb as resetColumnsToDefault,pb as setViewAsDefault,Wb as templateToViewMenuItem,Eb as toggleAllColumns,Kb as toggleAllCurrentColumns,Cb as toggleColumn,Jb as toggleSingleColumn,Db as toggleSubItem,kb as transformLayoutToColumns,wb as transformTemplatesToViewMenuItems,_b as updateCurrentTemplate,ic as useCustomTableViews,hc as useSubmenuHover,fc as useViewsManager,gc as useViewsMenu}from'../../_chunks/chunk-
|
|
1
|
+
export{lc as ColumnViewsPicker,nc as CreateViewDialog,jc as CustomViews,kc as DefaultViews,mc as ViewsDropdown,Fb as areAllColumnsSelected,Lb as areAllCurrentColumnsSelected,Ob as areColumnsEqual,Gb as areSomeColumnsSelected,Mb as areSomeCurrentColumnsSelected,ec as buildFullTemplateLayouts,cc as buildRequiredColumnView,mb as convertColumnsToLayoutSection,Xb as convertTemplateToColumnsView,Yb as convertTemplatesToColumnsView,ub as countCustomTemplates,vb as countCustomViewMenuItems,ob as createCustomViewMenuItem,Ib as deepCloneColumns,Bb as getColumnCheckState,Ub as getColumnOrder,lb as getColumnsByMode,ac as getLayoutCodesForMode,nb as getLayoutDataFromTemplates,bc as getOtherModeSectionCode,Tb as getSubmenuFromTemplateLayout,yb as getSubmenuItems,Ab as getSubmenuItemsForDisplay,qb as getTemplateRole,Vb as handleTemplateUpdate,dc as hasLayoutSectionForMode,zb as hasSubmenu,Rb as initializeCreateColumns,Sb as initializeCreateColumnsWithCurrentState,Qb as initializeEditingColumns,$b as isCheckboxInteractionTarget,tb as isCustomTemplate,sb as isCustomView,ib as isDateColumn,jb as isIndexColumn,rb as isPresetView,Hb as isValidTemplateName,xb as mapTemplatesToMenuItems,Nb as normalizeColumnsSelected,Zb as replaceTemplateInList,Pb as resetColumnsToDefault,pb as setViewAsDefault,Wb as templateToViewMenuItem,Eb as toggleAllColumns,Kb as toggleAllCurrentColumns,Cb as toggleColumn,Jb as toggleSingleColumn,Db as toggleSubItem,kb as transformLayoutToColumns,wb as transformTemplatesToViewMenuItems,_b as updateCurrentTemplate,ic as useCustomTableViews,hc as useSubmenuHover,fc as useViewsManager,gc as useViewsMenu}from'../../_chunks/chunk-EEONDBAL.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-OAPCRKFH.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-EWENP3LB.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-QKEB3XTE.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-LFCRVEVB.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-GQZXKKCE.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';export{Ua as CUSTOM_VIEW,Pa as DATE_COLUMN_CONFIG,Ta as DEFAULT_VIEW,Va as DEFAULT_VIEW_OPTIONS,Ka as DIALOG_HEIGHT,Ja as DIALOG_WIDTH,Oa as INDEX_COLUMN_CONFIG,La as MAX_CUSTOM_VIEWS,Ma as TEMPLATE_NAME_MAX_LENGTH,Na as TableViewColumnNames}from'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as default,a as groupedSelectClassNames}from'../../_chunks/chunk-
|
|
1
|
+
export{b as default,a as groupedSelectClassNames}from'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{pc as ListHeader}from'../../_chunks/chunk-
|
|
1
|
+
export{pc as ListHeader}from'../../_chunks/chunk-EEONDBAL.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-OAPCRKFH.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-EWENP3LB.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-QKEB3XTE.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-LFCRVEVB.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-GQZXKKCE.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as default,a as multiLevelSelectClassNames}from'../../_chunks/chunk-
|
|
1
|
+
export{b as default,a as multiLevelSelectClassNames}from'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ElementType, type ReactNode } from 'react';
|
|
2
2
|
import type { SelectProps as MuiSelectProps } from '@mui/material/Select';
|
|
3
3
|
import { type FieldFeedbackProps } from '../primitives';
|
|
4
|
-
import type
|
|
4
|
+
import { type SelectValueAlignment } from './constants';
|
|
5
5
|
import { type InternalOption } from './utils';
|
|
6
6
|
export type SelectFieldProps = {
|
|
7
7
|
isMultiple?: boolean;
|
|
@@ -1,16 +1,40 @@
|
|
|
1
1
|
export declare const selectClassNamePrefix: "os-shared-Select";
|
|
2
|
+
/** BEM slot classes for restyling `Select` from a parent (`styled(Select)` / `sx`). Menu slots live in the portalled menu, so style them via `MenuProps`. */
|
|
2
3
|
export declare const selectClassNames: {
|
|
4
|
+
/** Outer wrapper; the `className` / `sx` props land here. */
|
|
3
5
|
readonly root: "os-shared-Select-root";
|
|
6
|
+
/** Form control around the field (floating label + field box). */
|
|
4
7
|
readonly field: "os-shared-Select-field";
|
|
8
|
+
/** Field box (border, fill, height). Combine with MUI state classes `.Mui-focused` / `.Mui-disabled`. */
|
|
9
|
+
readonly input: "os-shared-Select-input";
|
|
10
|
+
/** Value area inside the field box (holds the selected value or placeholder). */
|
|
11
|
+
readonly display: "os-shared-Select-display";
|
|
12
|
+
/** End area of the field box: `endAdornment`, loading spinner, clear button and chevron. */
|
|
13
|
+
readonly endAdornment: "os-shared-Select-endAdornment";
|
|
14
|
+
/** Chevron slot in the field (colour via `color`; the icon uses `currentColor`). */
|
|
15
|
+
readonly chevron: "os-shared-Select-chevron";
|
|
16
|
+
/** Loading spinner slot in the field (rendered while `isLoading`). */
|
|
17
|
+
readonly loading: "os-shared-Select-loading";
|
|
18
|
+
/** Menu paper (the open dropdown panel). */
|
|
5
19
|
readonly menu: "os-shared-Select-menu";
|
|
20
|
+
/** Option row (`li`) and its inner label — target `li.<option>` for the row only. */
|
|
6
21
|
readonly option: "os-shared-Select-option";
|
|
22
|
+
/** Reserved for the clear control; not applied to an element yet (the button uses `Select-clearIconButton`). */
|
|
7
23
|
readonly clear: "os-shared-Select-clear";
|
|
24
|
+
/** Reserved for the helper / feedback text; not applied to an element yet. */
|
|
8
25
|
readonly feedback: "os-shared-Select-feedback";
|
|
26
|
+
/** Closed-field value row (single label, or comma-separated labels in `isMultiple`). */
|
|
9
27
|
readonly values: "os-shared-Select-values";
|
|
28
|
+
/** Value text inside the closed field. */
|
|
10
29
|
readonly value: "os-shared-Select-value";
|
|
30
|
+
/** `+N more` suffix in the closed field (`isMultiple` with `maxVisibleValues`). */
|
|
11
31
|
readonly valueOverflow: "os-shared-Select-valueOverflow";
|
|
32
|
+
/** In-menu search row (`isSearchable`). */
|
|
12
33
|
readonly search: "os-shared-Select-search";
|
|
34
|
+
/** `N selected · Clear` row in the menu (`isMultiple` with `hasSelectionSummary`). */
|
|
13
35
|
readonly summary: "os-shared-Select-summary";
|
|
36
|
+
/** Group heading row in the menu (`{ label, options }` items). */
|
|
37
|
+
readonly groupLabel: "os-shared-Select-groupLabel";
|
|
14
38
|
};
|
|
15
39
|
export declare const selectDefaultSearchPlaceholder = "Search";
|
|
16
40
|
/** Gap between the field and the menu paper (Tap DS; matches Autocomplete). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Select } from './Select';
|
|
2
|
-
export type { SelectProps, SelectOption, SelectOptionValue, SelectSingleValue, SelectMultipleValue, SelectClassNames, SelectSlotClassNames, } from './type';
|
|
2
|
+
export type { SelectProps, SelectOption, SelectOptionGroup, SelectItem, SelectOptionValue, SelectSingleValue, SelectMultipleValue, SelectClassNames, SelectSlotClassNames, } from './type';
|
|
3
3
|
export { selectClassNames, selectFieldEndAlignedPaddingInlineEndPx, selectMenuDirection, selectValueAlignment } from './constants';
|
|
4
4
|
export type { SelectMenuDirection, SelectValueAlignment } from './constants';
|
|
5
5
|
export { SelectChevronIcon } from './icons';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Select}from'../../_chunks/chunk-
|
|
1
|
+
export{a as Select}from'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-JBE2LXDH.js';export{ba as SelectChevronIcon,a as selectClassNames,D as selectFieldEndAlignedPaddingInlineEndPx,j as selectMenuDirection,l as selectValueAlignment}from'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -60,6 +60,18 @@ export declare const SelectMenuSearchListSubheaderStyled: import("@mui/material/
|
|
|
60
60
|
export declare const SelectMenuEmptySubheaderStyled: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material/ListSubheader").ListSubheaderTypeMap<{}, "li">> & {
|
|
61
61
|
muiSkipListHighlight?: boolean | undefined;
|
|
62
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Group heading row; `$divider` adds the rule that separates it from the block above.
|
|
65
|
+
* `muiSkipListHighlight` keeps MUI's `MenuList` from treating the heading as an option / the initial active row.
|
|
66
|
+
*/
|
|
67
|
+
export declare const SelectMenuGroupLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/material/ListSubheader").ListSubheaderOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
68
|
+
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
69
|
+
}, "color" | "inset" | "classes" | "className" | "style" | "children" | "sx" | "disableGutters" | "disableSticky"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
70
|
+
$divider?: boolean | undefined;
|
|
71
|
+
$hidden?: boolean | undefined;
|
|
72
|
+
}, {}, {}> & {
|
|
73
|
+
muiSkipListHighlight: boolean;
|
|
74
|
+
};
|
|
63
75
|
/** In-menu search field. */
|
|
64
76
|
export declare const SelectMenuSearchInputStyled: import("@emotion/styled").StyledComponent<import("@mui/material/Input").InputProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
65
77
|
export declare const SelectMenuSearchEndIconStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -19,12 +19,21 @@ export interface SelectOption {
|
|
|
19
19
|
/** When true, the option cannot be selected. */
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
}
|
|
22
|
+
/** Headed group of options. Omit `label` to separate the rows without a heading. */
|
|
23
|
+
export interface SelectOptionGroup {
|
|
24
|
+
/** Group heading (string or React node). */
|
|
25
|
+
label?: ReactNode;
|
|
26
|
+
/** Options under this heading, in display order. */
|
|
27
|
+
options: SelectOption[];
|
|
28
|
+
}
|
|
29
|
+
/** Entry in `options` — a flat option or a headed group; flat options and groups can be mixed. */
|
|
30
|
+
export type SelectItem = SelectOption | SelectOptionGroup;
|
|
22
31
|
export type SelectSingleValue = SelectOptionValue | null;
|
|
23
32
|
export type SelectMultipleValue = SelectOptionValue[];
|
|
24
33
|
/** Tier-2 Select — single or multi (`isMultiple`) over `{ label, value }` options. No react-hook-form. */
|
|
25
34
|
export interface SelectProps {
|
|
26
|
-
/** Options
|
|
27
|
-
options:
|
|
35
|
+
/** Options and/or headed groups (`{ label, options }`), rendered in array order; selection state uses each option’s `value`. */
|
|
36
|
+
options: SelectItem[];
|
|
28
37
|
/** Multi Select (Tap DS): comma-separated field values (+N more) + menu checkboxes by default. @default false */
|
|
29
38
|
isMultiple?: boolean;
|
|
30
39
|
/** Checkbox on each option row; defaults to `true` when `isMultiple`. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { SelectMenuDirection } from './constants';
|
|
3
|
-
import type { SelectOption, SelectOptionValue, SelectProps } from './type';
|
|
3
|
+
import type { SelectItem, SelectOption, SelectOptionGroup, SelectOptionValue, SelectProps } from './type';
|
|
4
4
|
export type InternalOption = SelectOption & {
|
|
5
5
|
id: string;
|
|
6
6
|
};
|
|
@@ -25,7 +25,16 @@ export declare function mergeSelectMenuProps(MenuProps: SelectProps['MenuProps']
|
|
|
25
25
|
export declare function stopSelectMenuEvent(e: {
|
|
26
26
|
stopPropagation: () => void;
|
|
27
27
|
}): void;
|
|
28
|
-
export declare
|
|
28
|
+
export declare const isSelectOptionGroup: (item: SelectItem) => item is SelectOptionGroup;
|
|
29
|
+
/** Run of menu rows: a headed group, or consecutive flat options (no `label`). */
|
|
30
|
+
export interface InternalOptionBlock {
|
|
31
|
+
key: string;
|
|
32
|
+
label?: ReactNode;
|
|
33
|
+
isGroup: boolean;
|
|
34
|
+
options: InternalOption[];
|
|
35
|
+
}
|
|
36
|
+
/** Consecutive flat options share one block; each non-empty group is its own block. */
|
|
37
|
+
export declare function toInternalOptionBlocks(items: SelectItem[]): InternalOptionBlock[];
|
|
29
38
|
export declare function findOption(options: InternalOption[], value: SelectOptionValue | null | undefined): InternalOption | null;
|
|
30
39
|
export declare function getOptionValue(option: InternalOption | null | undefined): string;
|
|
31
40
|
/** True when a menu close came from in-menu search or the selection-summary Clear. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as AgreementIcon,R as AuthIcons,Q as AuthSourceAnimation,T as AuthorizationAutoIcons,U as AuthorizedIcon,V as ChargeStatusIcon,W as CustomerInitiatedIcon,ea as DestinationIcon,Y as DeviceIconChip,Z as DisputeIcon,X as GeographyIcon,_ as IssuerIcon,$ as PayoutIcon,aa as RefundIcon,ca as SourceIcon,da as SourceIcons,S as VoidAutoIcon,ba as getPaymentMethodKey}from'../../_chunks/chunk-
|
|
1
|
+
export{P as AgreementIcon,R as AuthIcons,Q as AuthSourceAnimation,T as AuthorizationAutoIcons,U as AuthorizedIcon,V as ChargeStatusIcon,W as CustomerInitiatedIcon,ea as DestinationIcon,Y as DeviceIconChip,Z as DisputeIcon,X as GeographyIcon,_ as IssuerIcon,$ as PayoutIcon,aa as RefundIcon,ca as SourceIcon,da as SourceIcons,S as VoidAutoIcon,ba as getPaymentMethodKey}from'../../_chunks/chunk-EEONDBAL.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-OAPCRKFH.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-EWENP3LB.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-QKEB3XTE.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-LFCRVEVB.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-GQZXKKCE.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{M as ActionCell,O as ActionIconColumn,K as ActionIconsVariants,N as ActionsColumn,sa as AgreementCell,E as AmountCell,w as AmountCellContainer,G as AmountCellSheet,F as AmountCellText,B as AmountConversionTooltipLabel,ta as AuthCell,La as AuthenticationCell,ra as AuthenticationModeBadge,Da as AuthenticationStatusCell,Ea as AuthenticationTypeCell,k as AvatarStyled,f as BadgeWrapper,ka as BalanceCell,la as BalanceCellSheet,ya as BankCell,Ja as BankReferenceCell,Ta as BrandCell,ab as BrandsCell,m as CaptureTextLabel,Fa as ChannelsCell,Ra as ChargeStatus,Ma as CheckoutStatusCell,x as ConversionBadge,z as ConversionTooltip,A as ConversionTooltipRow,C as ConversionTypeLabel,i as CountBadge,Ia as CurrencyCell,D as CurrencyInfo,y as CurrencySpan,u as CustomerCell,v as CustomerCellSheet,ga as DestinationCell,ha as DestinationCellSheet,ia as DestinationCellText,Ba as DestinationStatusCell,fa as DeviceCell,Za as EntityCell,d as GeographyBox,L as IDButton,j as IdButtonContainer,t as ImageWrapper,$a as IndividualsCell,Na as IntentsStatusCell,Pa as InvoiceStatusCell,gb as LinkCell,_a as MarketPlaceCell,Ua as MetadataCell,b as OrderCell,c as OrderCellSheet,hb as OrdersCellSheet,db as PaymentAgreementCellSheet,na as PaymentCardNumberSource,oa as PaymentMethodSource,qa as PaymentSchemeSource,pa as PaymentTypeSource,Va as PayoutReportCell,za as PayoutStatusCell,s as PiePercentage,Ga as ProductsCell,eb as ProviderCell,fb as PurposeCell,Wa as ReceiptCell,Xa as ReceiptCellSheet,Ya as ReceiptCellText,Ka as ReferenceCell,Oa as RefundChargeCell,va as RefundStateIcon,wa as RefundStatusCell,ua as RefundStatusIcon,Aa as RefundTooltipView,bb as SalesChannelCell,cb as SalesChannelCellSheet,ma as SourceCell,h as StarBadgeWrapper,H as StatusCell,p as StatusCellContainer,I as StatusCellSheet,J as StatusCellText,r as StatusIcon,q as StatusIconWrapper,o as StyledTextTableCell,a as TableCell,l as TextLabel,Ha as TextTableCell,Qa as TextWithBadgeCell,g as TimeZone,Sa as TokenStatusCell,e as TransparentButton,n as VoidTextLabel,xa as WalletCell,Ca as authenticationStatusIcons,ja as generateDestinationTooltip}from'../../_chunks/chunk-
|
|
1
|
+
export{M as ActionCell,O as ActionIconColumn,K as ActionIconsVariants,N as ActionsColumn,sa as AgreementCell,E as AmountCell,w as AmountCellContainer,G as AmountCellSheet,F as AmountCellText,B as AmountConversionTooltipLabel,ta as AuthCell,La as AuthenticationCell,ra as AuthenticationModeBadge,Da as AuthenticationStatusCell,Ea as AuthenticationTypeCell,k as AvatarStyled,f as BadgeWrapper,ka as BalanceCell,la as BalanceCellSheet,ya as BankCell,Ja as BankReferenceCell,Ta as BrandCell,ab as BrandsCell,m as CaptureTextLabel,Fa as ChannelsCell,Ra as ChargeStatus,Ma as CheckoutStatusCell,x as ConversionBadge,z as ConversionTooltip,A as ConversionTooltipRow,C as ConversionTypeLabel,i as CountBadge,Ia as CurrencyCell,D as CurrencyInfo,y as CurrencySpan,u as CustomerCell,v as CustomerCellSheet,ga as DestinationCell,ha as DestinationCellSheet,ia as DestinationCellText,Ba as DestinationStatusCell,fa as DeviceCell,Za as EntityCell,d as GeographyBox,L as IDButton,j as IdButtonContainer,t as ImageWrapper,$a as IndividualsCell,Na as IntentsStatusCell,Pa as InvoiceStatusCell,gb as LinkCell,_a as MarketPlaceCell,Ua as MetadataCell,b as OrderCell,c as OrderCellSheet,hb as OrdersCellSheet,db as PaymentAgreementCellSheet,na as PaymentCardNumberSource,oa as PaymentMethodSource,qa as PaymentSchemeSource,pa as PaymentTypeSource,Va as PayoutReportCell,za as PayoutStatusCell,s as PiePercentage,Ga as ProductsCell,eb as ProviderCell,fb as PurposeCell,Wa as ReceiptCell,Xa as ReceiptCellSheet,Ya as ReceiptCellText,Ka as ReferenceCell,Oa as RefundChargeCell,va as RefundStateIcon,wa as RefundStatusCell,ua as RefundStatusIcon,Aa as RefundTooltipView,bb as SalesChannelCell,cb as SalesChannelCellSheet,ma as SourceCell,h as StarBadgeWrapper,H as StatusCell,p as StatusCellContainer,I as StatusCellSheet,J as StatusCellText,r as StatusIcon,q as StatusIconWrapper,o as StyledTextTableCell,a as TableCell,l as TextLabel,Ha as TextTableCell,Qa as TextWithBadgeCell,g as TimeZone,Sa as TokenStatusCell,e as TransparentButton,n as VoidTextLabel,xa as WalletCell,Ca as authenticationStatusIcons,ja as generateDestinationTooltip}from'../../_chunks/chunk-EEONDBAL.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-ZPYQLESN.js';import'../../_chunks/chunk-XK5TVDKR.js';import'../../_chunks/chunk-D7Q6GITS.js';import'../../_chunks/chunk-OAPCRKFH.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-EWENP3LB.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-5FR3LFXC.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-7H5HCDY6.js';import'../../_chunks/chunk-JYVB2MAR.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-QKEB3XTE.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-ALG4KR24.js';import'../../_chunks/chunk-R2J57DPG.js';import'../../_chunks/chunk-3TZY3PB4.js';import'../../_chunks/chunk-4SDKOPUI.js';import'../../_chunks/chunk-UXDNAGHP.js';import'../../_chunks/chunk-YIVUI2NW.js';import'../../_chunks/chunk-PYVM4SKE.js';import'../../_chunks/chunk-XVIGXV43.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-LFCRVEVB.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-TJMY7Q26.js';import'../../_chunks/chunk-LTTRVHN5.js';import'../../_chunks/chunk-L2CUT2AZ.js';import'../../_chunks/chunk-K5QISMYX.js';import'../../_chunks/chunk-XKEBWPJM.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-D4FXMX5O.js';import'../../_chunks/chunk-RW26DPMJ.js';import'../../_chunks/chunk-RGQ5AGHK.js';import'../../_chunks/chunk-DIN6W5Q6.js';import'../../_chunks/chunk-JBDIMDMZ.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-247ZI55C.js';import'../../_chunks/chunk-EM7XGO3A.js';import'../../_chunks/chunk-ODDV623H.js';import'../../_chunks/chunk-OJO5GAN7.js';import'../../_chunks/chunk-EKOQHUCL.js';import'../../_chunks/chunk-SSK26DK7.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-GQZXKKCE.js';import'../../_chunks/chunk-DHSYX6K2.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-LKYA6XFU.js';import'../../_chunks/chunk-JBE2LXDH.js';import'../../_chunks/chunk-YG4CT6O4.js';import'../../_chunks/chunk-M3TZIB3C.js';import'../../_chunks/chunk-W2FF6EIY.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-AGNZUPPF.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-IXFXTDH7.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -2,7 +2,7 @@ export * from './primitives';
|
|
|
2
2
|
export { default as AreaChart, type AreaChartProps, type AreaChartDataPoint, type AreaChartSeries, type AreaChartCurve, type AreaChartFormatValue, type AreaChartFormatTitle, areaChartClassNames, type AreaChartClassNames, } from './AreaChart';
|
|
3
3
|
export { default as Window, WindowContent, WindowFooter, WindowFooterActions, WindowProvider, WindowContext, useWindow, windowClassNames, windowDragHandleClass, windowDragHandleId, resolveWindowBounds, resolveWindowDimension, type WindowClassNames, type WindowContentProps, type WindowFooterActionsProps, type WindowFooterProps, type WindowProviderProps, type WindowProps, type WindowContextValue, type WindowPosition, type WindowDimensions, type WindowDimensionScope, type WindowDimensionValue, type WindowSectionState, type WindowSize, type WindowSizeInput, } from './Window';
|
|
4
4
|
export { default as EmptyState, type EmptyStateProps, type EmptyStateClassNames, emptyStateClassNames } from './EmptyState';
|
|
5
|
-
export { Select, SelectChevronIcon, selectClassNames, selectMenuDirection, selectValueAlignment, type SelectProps, type SelectOption, type SelectOptionValue, type SelectSingleValue, type SelectMultipleValue, type SelectClassNames, type SelectMenuDirection, type SelectValueAlignment, } from './Select';
|
|
5
|
+
export { Select, SelectChevronIcon, selectClassNames, selectMenuDirection, selectValueAlignment, type SelectProps, type SelectOption, type SelectOptionGroup, type SelectItem, type SelectOptionValue, type SelectSingleValue, type SelectMultipleValue, type SelectClassNames, type SelectMenuDirection, type SelectValueAlignment, } from './Select';
|
|
6
6
|
export { default as PhoneInput, type PhoneInputProps, CountriesList } from './PhoneInput';
|
|
7
7
|
export { VirtualTable, TableRowLoading, TableHeader as VirtualTableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, TableFooter, TableError, } from './modules/VirtualTables';
|
|
8
8
|
export { default as SheetViewVirtualTable } from './modules/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable';
|
|
@@ -70,5 +70,4 @@ export * from './ActionsDropdownMenu';
|
|
|
70
70
|
export { default as AvatarStack, AvatarStackItem, AVATAR_STACK_VARIANTS, avatarStackClassNames, DEFAULT_AVATAR_STACK_VARIANT } from './AvatarStack';
|
|
71
71
|
export type { AvatarStackItemRenderContext, AvatarStackOverflowRenderArgs } from './AvatarStack';
|
|
72
72
|
export { Timeline, timelineClassNames, type TimelineProps, type TimelineClassNames, type TimelineItem, type TimelineStatus, type TimelineOrientation, type TimelineVariant, type TimelineAlignment, type TimelineSize, } from './Timeline';
|
|
73
|
-
export { default as CurrenciesMenu, currenciesMenuClassNames, type CurrenciesMenuClassNames, type CurrenciesMenuGroupOption, type CurrenciesMenuMenuProps, type CurrenciesMenuOption, type CurrenciesMenuProps, } from './CurrenciesMenu';
|
|
74
73
|
export { default as WindowShell, windowShellClassNames, type WindowShellAnimationConfig, type WindowShellClassNames, type WindowShellContentConfig, type WindowShellExpandConfig, type WindowShellExpandResize, type WindowShellFooterConfig, type WindowShellPanelConfig, type WindowShellProps, type WindowShellServicesConfig, type WindowShellSidebarConfig, type WindowShellToolbarConfig, type WindowShellWindowConfig, } from './modules/WindowShell';
|