@fluidattacks/design 3.16.2 → 3.16.3-pr
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/@core/index.js +1 -1
- package/dist/components/accordion/accordion-content/index.js +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/card-header/index.js +1 -1
- package/dist/components/card/card-with-image/index.js +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-options/index.js +1 -1
- package/dist/components/card/card-with-selector/index.js +1 -1
- package/dist/components/card/card-with-switch/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-array/field/index.js +1 -1
- package/dist/components/inputs/fields/input-array/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/layout/categories/buttons/index.js +1 -1
- package/dist/components/layout/categories/column/index.js +1 -1
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/lottie/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/modal/columns-modal/index.js +1 -1
- package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
- package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
- package/dist/components/modal/filters-modal/index.d.ts +2 -2
- package/dist/components/modal/filters-modal/index.js +1 -1
- package/dist/components/modal/footer/index.js +1 -1
- package/dist/components/modal/header/index.js +1 -1
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/modal/modal-confirm/index.js +1 -1
- package/dist/components/notification/index.js +1 -1
- package/dist/components/notification-sign/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/oauth-selector/index.js +1 -1
- package/dist/components/oauth-selector/option-container/index.js +1 -1
- package/dist/components/plan-card/index.js +1 -1
- package/dist/components/plan-card/recommended-tag/index.js +1 -1
- package/dist/components/pop-up/description/index.js +1 -1
- package/dist/components/pop-up/index.js +1 -1
- package/dist/components/premium-feature/index.js +1 -1
- package/dist/components/priority-score/index.js +1 -1
- package/dist/components/progress-bar/index.js +1 -1
- package/dist/components/radio-button/index.js +1 -1
- package/dist/components/scroll-button/index.js +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/severity-badge/index.js +1 -1
- package/dist/components/severity-overview/badge/index.js +1 -1
- package/dist/components/severity-overview/index.js +1 -1
- package/dist/components/show-on-hover/index.js +1 -1
- package/dist/components/slide-out-menu/index.js +1 -1
- package/dist/components/slide-out-menu/menu-item/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/thumb/index.js +1 -1
- package/dist/components/step-lapse/index.js +1 -1
- package/dist/components/table-button/index.js +1 -1
- package/dist/components/tabs/fixed-tabs/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tab/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle-buttons/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +1 -1
- package/dist/components/typography/heading/index.js +1 -1
- package/dist/components/typography/index.js +1 -1
- package/dist/components/typography/span/index.js +1 -1
- package/dist/components/typography/text/index.js +1 -1
- package/dist/{components-BrLeCHi-.mjs → components-3G2ZcBCV.mjs} +255 -250
- package/dist/{components-Bx9BpYBx.js → components-_JbpXhe6.js} +35 -35
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
|
|
180
180
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
181
181
|
`}
|
|
182
|
-
`,
|
|
182
|
+
`,_=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:x,sizeSm:h,textFill:b,whiteSpace:$,wordBreak:m,...w},j){return t.jsx(Dn,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:u,$sizeMd:x,$sizeSm:h,$textFill:b,$whiteSpace:$,$wordBreak:m,className:a,ref:j,...w,children:i})}),oe=f.forwardRef(function({children:n,color:i,content:a,display:r,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:x,...h},b){return t.jsx(Ln,{$color:i,$content:a,$display:r,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:x,ref:b,...h,children:n})}),S=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:x,sizeSm:h,textFill:b,whiteSpace:$,wordBreak:m,...w},j){return t.jsx(dt,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:u,$sizeMd:x,$sizeSm:h,$textFill:b,$whiteSpace:$,$wordBreak:m,className:a,ref:j,...w,children:i})}),pt=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(S,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs(y,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[n,e.extraElement?t.jsx(y,{children:e.extraElement}):void 0]})},Pn={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},An=s.dt(Ue)`
|
|
183
183
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:a,$rotation:r,$size:o,$secondaryColor:l})=>{const c=a?"":"brightness(50%)",d=a??"";return`
|
|
184
184
|
color: ${n};
|
|
185
185
|
cursor: ${e?"pointer":"inherit"};
|
|
@@ -415,7 +415,7 @@
|
|
|
415
415
|
width: max-content;
|
|
416
416
|
z-index: 999999;
|
|
417
417
|
`}
|
|
418
|
-
`,G=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:x="",hide:h=u===""&&x===""&&p===void 0,width:b})=>{const $=s.nt(),[m,w]=f.useState(!1),{refs:j,floatingStyles:v,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:w,open:m,placement:g,whileElementsMounted:s.autoUpdate}),N=s.useHover(k,{delay:{close:0,open:500},move:!1}),E=s.useFocus(k),C=s.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:F,getFloatingProps:
|
|
418
|
+
`,G=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:x="",hide:h=u===""&&x===""&&p===void 0,width:b})=>{const $=s.nt(),[m,w]=f.useState(!1),{refs:j,floatingStyles:v,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:w,open:m,placement:g,whileElementsMounted:s.autoUpdate}),N=s.useHover(k,{delay:{close:0,open:500},move:!1}),E=s.useFocus(k),C=s.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:F,getFloatingProps:D}=s.useInteractions([N,E,C]);return n?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Un,{...F(),display:i,height:a,id:c,ref:j.setReference,width:b,children:r?t.jsx(I,{clickable:!0,disabled:n,icon:r,iconColor:o,iconSize:l??"xxs",iconType:m?"fa-solid":"fa-light"}):e}),m&&!h&&ne.createPortal(t.jsxs(Gn,{...D(),$maxWidth:d,id:`floating-${c}`,ref:j.setFloating,style:v,children:[s.lodashExports.isEmpty(x)?void 0:t.jsx(S,{color:$.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),s.lodashExports.isEmpty(u)?void 0:t.jsx(S,{color:$.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},B=f.forwardRef(function({borderRadius:n,disabled:i,icon:a,iconColor:r,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:u,py:x,type:h="button",tooltip:b,tooltipPlace:$,value:m,variant:w="primary",...j},v){const k=t.jsx(_n,{$borderRadius:n,$px:u,$py:x,$variant:w,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:p,onClick:g,ref:v,type:h,value:m,...j,children:t.jsx(I,{clickable:!1,icon:a,iconColor:r,iconSize:o,iconTransform:l,iconType:c})}),E=(h+(w??"")+(d??a)).replace(/ /u,"_");return b===void 0?k:t.jsx(G,{id:`${E}-tooltip`,place:$,tip:b,children:k})}),Yn=f.forwardRef(function({autoHide:n=!1,children:i,closable:a=!1,onTimeOut:r,show:o=!0,time:l=8,variant:c="error",id:d,...p},g){const[u,x]=f.useState(o),h=f.useCallback(()=>{x(!1)},[]);return f.useEffect(()=>{const b=setTimeout(()=>{r==null||r(!0),n&&h()},l*1e3);return()=>{clearTimeout(b)}},[n,h,l,r]),f.useEffect(()=>{x(o)},[o,x]),t.jsx(y,{display:u?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(On,{$variant:c,id:d,children:[t.jsx(I,{clickable:!1,icon:Bn(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(Hn,{children:i}),a?t.jsx(B,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),et=s.dt.div`
|
|
419
419
|
${({theme:e})=>`
|
|
420
420
|
align-items: center;
|
|
421
421
|
background-color: ${e.palette.gray[200]};
|
|
@@ -633,7 +633,7 @@
|
|
|
633
633
|
${ut}
|
|
634
634
|
`,Qn=s.dt(De.Link)`
|
|
635
635
|
${ut}
|
|
636
|
-
`,
|
|
636
|
+
`,Z=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(I,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(Zn,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(Qn,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},K=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:x,variant:h="default"})=>{const b=x.length>25&&s.lodashExports.isEmpty(u+o),$=`${x.slice(0,25)}...`;return t.jsxs(oe,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(Xn,{$fontSize:l,$variant:h,className:g,children:[n&&t.jsx(I,{icon:n,iconColor:i,iconSize:"xxs",iconType:a}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:u}),t.jsx("span",{children:b?$:x}),t.jsx("strong",{className:"w-full",children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(Z,{href:c,children:d})]})},ei=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},P=f.forwardRef(function({children:n,disabled:i=!1,external:a=!1,fontSize:r,href:o,id:l,icon:c,name:d,onClick:p,showArrow:g=!1,tag:u,type:x="button",tooltip:h,tooltipPlace:b="bottom",underline:$=!1,value:m,variant:w="primary",width:j,...v},k){const N=h!==void 0,E=`${l}-tooltip`,C=f.useCallback(()=>{o&&ei(o,a)},[a,o]),F=t.jsxs(gt,{$size:r,$variant:w,"aria-disabled":i,className:$?"underline":void 0,disabled:i,id:l,name:d,onClick:w==="link"?C:p,ref:k,type:x,value:m,width:j,...N?{"data-tooltip-id":E}:{},...v,children:[c!==void 0&&t.jsx(I,{icon:c,iconSize:"xs",iconType:"fa-light"}),n,(g||w==="link")&&t.jsx(I,{icon:"arrow-right",iconSize:"xs",iconType:"fa-light"}),u===void 0?null:t.jsx(K,{tagLabel:u,variant:"default"})]});return N?t.jsx(G,{disabled:!N,id:E,place:b,tip:h,width:j,children:F}):F}),ti=f.forwardRef(function({children:n,onClick:i,userName:a,showIcon:r=!1,showUsername:o=!1},l){const c=!!i;return t.jsx(y,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs(y,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(P,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(et,{children:a[0].toUpperCase()}),o?t.jsx(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:a.split(" ")[0]}):void 0,r?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs(y,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(et,{children:a[0].toUpperCase()}),o?t.jsxs(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",a.split(" ")[0],"!"]}):void 0,r?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(qn,{children:n})]})})}),Se=({authorEmail:e,date:n,description:i,descriptionColor:a,id:r,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs(y,{width:"100%",children:[typeof o=="string"?t.jsx(S,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:c,wordBreak:"break-word",children:o}):o,t.jsxs(y,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(S,{color:a??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:i}),n&&t.jsx(S,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(S,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(G,{icon:"circle-info",id:r,tip:p})]})]})},tt=s.dt(y).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
637
637
|
& img {
|
|
638
638
|
display: block;
|
|
639
639
|
}
|
|
@@ -648,7 +648,7 @@
|
|
|
648
648
|
pointer-events: none;
|
|
649
649
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
650
650
|
}
|
|
651
|
-
`,ni=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},ii=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,ni(n)),xt=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const u=g.target,x=u.currentTime/u.duration*100;x>5&&x<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):x>=50&&x<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):x>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return n==="video"||ii(["webm"],r)?t.jsx(tt,{$opacity:a,children:t.jsx(
|
|
651
|
+
`,ni=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},ii=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,ni(n)),xt=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const u=g.target,x=u.currentTime/u.duration*100;x>5&&x<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):x>=50&&x<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):x>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return n==="video"||ii(["webm"],r)?t.jsx(tt,{$opacity:a,children:t.jsx(Z,{href:r,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:o,width:i},children:[t.jsx("source",{src:r,type:"video/webm"}),r]})})}):t.jsx(tt,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:i}})})},ai=({alt:e,authorEmail:n,date:i,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0,videoViewStatus:x})=>{const h=s.nt(),[b,$]=f.useState(!1),m=f.useCallback(()=>{$(!0)},[]),w=f.useCallback(()=>{$(!1)},[]);return t.jsxs(y,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:m,onLeave:w,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx(y,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(f.Fragment,{children:[t.jsx(xt,{alt:e,fileType:g,height:"147px",opacity:b?.3:0,src:r,videoViewStatus:x,width:"100%"}),u?t.jsx(y,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(B,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),p?null:t.jsx(Se,{authorEmail:n,date:i,description:a,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},ri=s.dt.div`
|
|
652
652
|
${({theme:e,$align:n="center",$minWidth:i="auto",$minHeight:a="auto"})=>`
|
|
653
653
|
display: flex;
|
|
654
654
|
background-color: ${e.palette.white};
|
|
@@ -667,7 +667,7 @@
|
|
|
667
667
|
text-align: ${n};
|
|
668
668
|
}
|
|
669
669
|
`}
|
|
670
|
-
`,Ge=({htmlFor:e,label:n,link:i,required:a,tooltip:r,weight:o="normal"})=>{const l=s.nt(),c=`${e}-tooltip`,d=r!==void 0&&!s.lodashExports.isEmpty(r);return t.jsxs("label",{className:`flex font-${o} gap-1 w-full`,htmlFor:e,children:[n,a&&t.jsx(I,{icon:"asterisk",iconColor:l.palette.error[500],iconSize:"xxss"}),i?t.jsx(
|
|
670
|
+
`,Ge=({htmlFor:e,label:n,link:i,required:a,tooltip:r,weight:o="normal"})=>{const l=s.nt(),c=`${e}-tooltip`,d=r!==void 0&&!s.lodashExports.isEmpty(r);return t.jsxs("label",{className:`flex font-${o} gap-1 w-full`,htmlFor:e,children:[n,a&&t.jsx(I,{icon:"asterisk",iconColor:l.palette.error[500],iconSize:"xxss"}),i?t.jsx(Z,{href:i,target:"_blank"}):null,d?t.jsx(G,{display:"inline-flex",icon:"circle-info",id:c,place:"top",tip:r}):null]})},oi=s.dt.div`
|
|
671
671
|
${({theme:e})=>`
|
|
672
672
|
align-items: flex-start;
|
|
673
673
|
display: inline-flex;
|
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
line-height: ${e.spacing[1.25]};
|
|
706
706
|
}
|
|
707
707
|
`}
|
|
708
|
-
`,
|
|
708
|
+
`,Q=s.dt.div`
|
|
709
709
|
${({theme:e,$overflowX:n})=>`
|
|
710
710
|
align-items: center;
|
|
711
711
|
display: flex;
|
|
@@ -810,7 +810,7 @@
|
|
|
810
810
|
border: 1px solid ${e.palette.gray[600]};
|
|
811
811
|
}
|
|
812
812
|
`}
|
|
813
|
-
`,
|
|
813
|
+
`,H=({children:e,error:n,helpLink:i,helpLinkText:a="Link here",helpText:r,htmlFor:o,label:l,linkPosition:c="down",maxLength:d,required:p,tooltip:g,value:u,weight:x})=>{const h=s.nt(),b=u?u.length:0;return t.jsxs(oi,{children:[l===void 0?void 0:t.jsx(Ge,{htmlFor:o,label:l,link:c==="up"?i:void 0,required:p,tooltip:g,weight:x}),e,n||d?t.jsxs(y,{display:"flex",justify:n===void 0?"end":"space-between",width:"100%",children:[n&&t.jsx(S,{className:"error-msg",color:h.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:n}),d&&t.jsx(K,{priority:"low",tagLabel:`${b}/${d}`,variant:"error"})]}):void 0,r||i?t.jsxs(y,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[r&&t.jsxs(t.Fragment,{children:[t.jsx(I,{icon:"circle-info",iconColor:h.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(S,{color:h.palette.gray[400],display:"inline-block",size:"sm",children:r})]}),i&&c==="down"?t.jsx(Z,{href:i,children:a}):void 0]}):void 0]})},$e=({className:e,children:n,isFilter:i=!1,popoverRef:a,state:r,triggerRef:o,...l})=>{var u;const c=f.useRef(null),d=(u=o==null?void 0:o.current)==null?void 0:u.getBoundingClientRect(),{popoverProps:p}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:a??c,triggerRef:o,isNonModal:a?!0:void 0},r),g=f.useCallback(x=>{x.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,id:"popover",onPointerDown:i?g:void 0,ref:a??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:n})})},si=s.dt.ul`
|
|
814
814
|
${({theme:e})=>`
|
|
815
815
|
align-self: center;
|
|
816
816
|
background: ${e.palette.white};
|
|
@@ -860,7 +860,7 @@
|
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
`}
|
|
863
|
-
`,ft=({item:e,state:n})=>{const i=s.nt(),a=f.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(li,{...r,className:d,ref:a,children:[t.jsx(S,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(I,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Le=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:$,weight:m})=>{var Qe;const w=s.nt(),j=n?void 0:i,v=(e==null?void 0:e.value)??$,[k,N]=f.useState(((Qe=p.find(
|
|
863
|
+
`,ft=({item:e,state:n})=>{const i=s.nt(),a=f.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(li,{...r,className:d,ref:a,children:[t.jsx(S,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(I,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Le=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:$,weight:m})=>{var Qe;const w=s.nt(),j=n?void 0:i,v=(e==null?void 0:e.value)??$,[k,N]=f.useState(((Qe=p.find(L=>L.value===v))==null?void 0:Qe.name)??""),[E,C]=f.useState(v),[F,D]=f.useState(p),[R,A]=f.useState(!1),{contains:U}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),Y=f.useRef(null),X=f.useRef(null),W=f.useRef(null),O=f.useRef(null),M=f.useRef(null),Ee=f.useMemo(()=>p.map(L=>U(L.name,k)||R?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:L.name},L.value):null),[U,k,p,R]),ln=f.useCallback(L=>{N(L),L===""?A(!0):(A(!1),C(V=>{const we=L===""?"":V;return e&&e.onChange(we),u&&u(L),we}),D(p.filter(V=>U(V.name,L))))},[U,p,e,u]),cn=f.useCallback(L=>{var V;N(((V=p.find(we=>we.value===L))==null?void 0:V.name)??""),C(L?String(L):""),e&&e.onChange(L),u&&u(L?String(L):""),D(p)},[p,e,u]),Ze=f.useCallback(L=>{L.key==="Enter"&&L.preventDefault(),A(!1)},[]),dn=f.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),J=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:k,items:F,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:E,onBlur:dn,onInputChange:ln,onKeyDown:Ze,onKeyUp:()=>{A(!0)},onOpenChange(L,V){A(L&&(V==="manual"||V==="focus"))},onSelectionChange:cn,children:Ee}),{buttonProps:pn,inputProps:gn,listBoxProps:un}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:k,buttonRef:X,id:d,inputRef:Y,label:l??d,listBoxRef:W,name:d,placeholder:x,popoverRef:M},J),{listBoxProps:xn}=s.$c132121280ec012d$export$50eacbbf140a3141(un,J,W),{buttonProps:fn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(pn,X);return f.useEffect(()=>{var L;(c===!1||!v)&&N(((L=p.find(V=>V.value===v))==null?void 0:L.name)??"")},[v,p,c]),t.jsxs(H,{error:j,helpLink:a,helpLinkText:r,helpText:o,htmlFor:d,label:l,required:h,tooltip:b,weight:m,children:[t.jsxs(Q,{className:`${n?"disabled":""} ${j?"error":""}`,ref:O,children:[t.jsx("input",{...gn,"aria-invalid":j?"true":"false","aria-label":d,onKeyDown:Ze,ref:Y}),j?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}):void 0,t.jsx(B,{...fn,className:"action",icon:J.isOpen?"chevron-up":"chevron-down",iconColor:w.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:X,type:"button",variant:"ghost"})]}),J.isOpen&&J.collection.size>0&&!n?t.jsx($e,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:M,state:J,triggerRef:O,children:t.jsx(si,{...xn,ref:W,children:[...J.collection].map(L=>t.jsx(ft,{item:L,state:J},L.key))})}):null]})},ht=({control:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:$,weight:m})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:w,fieldState:j})=>{var v;return t.jsx(Le,{disabled:n,error:(v=j.error)==null?void 0:v.message,field:w,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:$,weight:m})},rules:{required:h}}):t.jsx(Le,{disabled:n,error:i,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:$,weight:m}),ci=s.dt.div`
|
|
864
864
|
${({theme:e})=>`
|
|
865
865
|
align-items: center;
|
|
866
866
|
color: ${e.palette.gray[800]};
|
|
@@ -1092,7 +1092,7 @@
|
|
|
1092
1092
|
font-weight: ${e.typography.weight.bold};
|
|
1093
1093
|
}
|
|
1094
1094
|
`}
|
|
1095
|
-
`,ve=({disabled:e=!1,icon:n,props:i})=>{const a=f.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,a);return t.jsx(hi,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(I,{icon:n,iconColor:z.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:n,nextButtonProps:i,title:a})=>{const r=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=f.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:n}),t.jsxs(ci,{children:[a,t.jsxs(di,{children:[t.jsx(it,{"aria-label":"top",onClick:o,children:t.jsx(I,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(it,{"aria-label":"bottom",onClick:l,children:t.jsx(I,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(ve,{icon:"chevron-right",props:i})]})},yt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(ze,{state:a}),t.jsx(Ye,{children:t.jsx(
|
|
1095
|
+
`,ve=({disabled:e=!1,icon:n,props:i})=>{const a=f.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,a);return t.jsx(hi,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(I,{icon:n,iconColor:z.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:n,nextButtonProps:i,title:a})=>{const r=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=f.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:n}),t.jsxs(ci,{children:[a,t.jsxs(di,{children:[t.jsx(it,{"aria-label":"top",onClick:o,children:t.jsx(I,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(it,{"aria-label":"bottom",onClick:l,children:t.jsx(I,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(ve,{icon:"chevron-right",props:i})]})},yt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(ze,{state:a}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},mt=({segment:e,state:n})=>{const i=s.nt(),a=f.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,a),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},wt=({disabled:e,error:n=!1,props:i})=>{const a=s.nt(),r=f.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,r),c=f.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(u=>u.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs(bi,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:a.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(mt,{segment:{...d,isEditable:!e},state:o},g)})}),n?t.jsx(I,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},jt=e=>{const n=f.useRef(null),i=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=i,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=f.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=f.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(a)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[o,i,a]);return t.jsxs($i,{children:[t.jsx(at,{...c,ref:n,children:i.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return t.jsx(mt,{segment:p,state:i},u)})}),t.jsxs(at,{children:[t.jsx(rt,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(rt,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",yi=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",mi=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",se=({error:e,buttonProps:n,datePickerRef:i,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:u})=>{const x=f.useCallback(h=>{const b=r==="day"?ke(String(h)):yi(String(h));o.onChange&&o.onChange(h??null),g&&g(c,b)},[o,r,c,g]);return t.jsxs(Q,{...l,className:`${a?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(wt,{disabled:a,error:e!=null,props:{...o,autoFocus:!1,granularity:r,onChange:x,shouldForceLeadingZeros:!0}}),t.jsx(ve,{disabled:a,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:a,id:c,name:c,type:"text",value:u??""})]})},Te=({children:e,...n})=>{const i=f.useRef(null),{dialogProps:a}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(fi,{...a,ref:i,children:e})},vt=({disabled:e=!1,error:n,helpLink:i,helpLinkText:a,helpText:r,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:u,...x})=>{const h=f.useRef(null),b=u==null?void 0:u(c),$=f.useCallback(C=>{p&&C&&p(c,ke(String(C)))},[c,p]),m=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...x,onChange(C){$(C)},value:s._.isNil(b)||s._.isEmpty(b)||b==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}),{close:w}=m,{groupProps:j,fieldProps:v,buttonProps:k,dialogProps:N,calendarProps:E}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...x,"aria-label":l??c,name:c},m,h);return t.jsxs(H,{error:n,helpLink:i,helpLinkText:a,helpText:r,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(se,{buttonProps:k,datePickerRef:h,disabled:e,error:n,fieldProps:v,groupProps:j,name:c,register:d,required:o,setValue:p,value:b}),m.isOpen&&!e?t.jsx($e,{offset:8,placement:"bottom start",state:m,triggerRef:h,children:t.jsx(Te,{...N,children:t.jsx(yt,{onClose:w,props:E})})}):null]})},kt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=f.useRef(null),r=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(n,r,a);return t.jsxs("div",{className:"calendar-range",ref:a,children:[t.jsx(Ie,{nextButtonProps:l,prevButtonProps:o,state:r,title:c}),t.jsx(ze,{state:r}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wi=s.dt.div`
|
|
1096
1096
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1097
1097
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1098
1098
|
display: flex;
|
|
@@ -1103,7 +1103,7 @@
|
|
|
1103
1103
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1104
1104
|
}
|
|
1105
1105
|
`}
|
|
1106
|
-
`,Ct=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...u})=>{const x=`${a}Max`,h=`${a}Min`,b=f.useRef(null),$=f.useCallback(F=>{c&&F&&(c((d==null?void 0:d.name)??x,ke(String(F.end))),c((p==null?void 0:p.name)??h,ke(String(F.start))))},[x,h,c,d,p]),m=s.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??x,startName:(p==null?void 0:p.name)??h,onChange(F){$(F)}}),{close:w}=m,{groupProps:j,startFieldProps:v,endFieldProps:k,buttonProps:N,dialogProps:E,calendarProps:C}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":i??a},m,b);return t.jsxs(
|
|
1106
|
+
`,Ct=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...u})=>{const x=`${a}Max`,h=`${a}Min`,b=f.useRef(null),$=f.useCallback(F=>{c&&F&&(c((d==null?void 0:d.name)??x,ke(String(F.end))),c((p==null?void 0:p.name)??h,ke(String(F.start))))},[x,h,c,d,p]),m=s.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??x,startName:(p==null?void 0:p.name)??h,onChange(F){$(F)}}),{close:w}=m,{groupProps:j,startFieldProps:v,endFieldProps:k,buttonProps:N,dialogProps:E,calendarProps:C}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":i??a},m,b);return t.jsxs(H,{error:n,htmlFor:a,label:i,required:r,tooltip:o,children:[t.jsxs(wi,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(se,{buttonProps:N,datePickerRef:b,disabled:e,error:n,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${a}`,validate:F=>k.value&&F>k.value?"Start date must be less than or equal to end date":null},groupProps:j,name:(p==null?void 0:p.name)??h,register:l,setValue:c,value:p==null?void 0:p.value}),t.jsx(se,{buttonProps:N,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${a}`,validate:F=>v.value&&F<v.value?"End date must be greater than or equal to start date":null},groupProps:j,name:(d==null?void 0:d.name)??x,register:l,setValue:c,value:d==null?void 0:d.value})]}),m.isOpen&&!e?t.jsx($e,{offset:8,placement:"bottom start",state:m,triggerRef:b,children:t.jsx(Te,{...E,children:t.jsx(kt,{onClose:w,props:C})})}):null]})},ji=s.dt.div`
|
|
1107
1107
|
${({theme:e})=>`
|
|
1108
1108
|
align-items: center;
|
|
1109
1109
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1118,9 +1118,9 @@
|
|
|
1118
1118
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1119
1119
|
justify-content: flex-end;
|
|
1120
1120
|
flex: 1 0 0;
|
|
1121
|
-
`,St=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(ji,{children:[t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(vi,{children:t.jsx(jt,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ye,{children:t.jsx(
|
|
1122
|
-
${e?"disabled":""} ${A?"error":""} ${
|
|
1123
|
-
`,children:[n?t.jsx(I,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":A?"true":"false","aria-label":x,"aria-required":C,autoComplete:"off",className:h?"sr-block":"","data-testid":`${x}-input`,disabled:e,id:x,list:j?`list_${x}`:void 0,onKeyDown:
|
|
1121
|
+
`,St=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(ji,{children:[t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(vi,{children:t.jsx(jt,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ye,{children:t.jsx(P,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ki=e=>{const{disabled:n=!1,error:i,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),u=f.useRef(null),x=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(g.replace(/\//gu,"-"))}),{close:h}=x,{groupProps:b,fieldProps:$,buttonProps:m,dialogProps:w,calendarProps:j}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,x,u),v=f.useCallback(N=>{j.onChange&&j.onChange(N),d==null||d(o,mi(String(N).replace(/-/gu,"/")))},[j,o,d]),k=f.useCallback(N=>{N&&x.setTimeValue(N)},[x]);return t.jsxs(H,{error:i,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(se,{buttonProps:m,datePickerRef:u,disabled:n,error:i,fieldProps:$,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:g}),x.isOpen&&!n?t.jsx($e,{offset:8,placement:"bottom start",state:x,triggerRef:u,children:t.jsx(Te,{...w,children:t.jsx(St,{handleTimeChange:k,onClose:h,props:{...j,onChange:v},timeState:x})})}):null]})},Ci=({children:e,currentValue:n,externalLink:i,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs(y,{children:[t.jsx(Ge,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Z,{href:d,children:c}):t.jsx(S,{size:"md",children:c})]})},Fe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:a,helpText:r,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:u,name:x,maskValue:h=!1,onPaste:b,placeholder:$,removeItemArray:m,register:w,suggestions:j,tooltip:v,type:k="text",weight:N,...E})=>{const{required:C,onBlur:F,onChange:D}=E,R=s.nt(),A=e?void 0:o,[U,Y]=f.useState(""),X=f.useCallback(M=>{Y(M.target.value),D==null||D(M)},[D]),W=d&&p&&!e&&U.trim()!=="",O=f.useCallback(M=>{M.key==="Enter"&&M.preventDefault()},[]);return t.jsxs(H,{error:A,helpLink:i,helpLinkText:a,helpText:r,htmlFor:x,label:g,linkPosition:u,required:C,tooltip:v,weight:N,children:[t.jsxs(Q,{className:`
|
|
1122
|
+
${e?"disabled":""} ${A?"error":""} ${W?"success":""}
|
|
1123
|
+
`,children:[n?t.jsx(I,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":A?"true":"false","aria-label":x,"aria-required":C,autoComplete:"off",className:h?"sr-block":"","data-testid":`${x}-input`,disabled:e,id:x,list:j?`list_${x}`:void 0,onKeyDown:O,onPaste:b,placeholder:$,type:k,...w?w(x,{required:C,onBlur:F,onChange:X}):{...E,onChange:X}}),A?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:R.palette.error[500],iconSize:"xs"}):void 0,W?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:R.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&c>0?t.jsx(B,{color:R.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:m?m(c):void 0,variant:"ghost"}):void 0]}),j?t.jsx("datalist",{id:`list_${x}`,children:j.map(M=>t.jsx("option",{value:M},M))}):void 0]})},Si=s.dt.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,zi=s.dt.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1124
1124
|
gap: 12px;
|
|
1125
1125
|
`,Ii=s.dt.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1126
1126
|
gap: 8px;
|
|
@@ -1176,7 +1176,7 @@
|
|
|
1176
1176
|
padding: ${i}px;
|
|
1177
1177
|
}
|
|
1178
1178
|
`}
|
|
1179
|
-
`,zt=({align:e,children:n,cols:i,colsPadding:a,justify:r})=>t.jsx(Ri,{$align:e,$cols:i,$colsPadding:a,$justify:r,children:n}),Ae=({addText:e,append:n,disabled:i=!1,fields:a,fieldState:r,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:u,onChange:x,placeholder:h,tooltip:b,remove:$,value:m})=>{var v;const w=f.useCallback(()=>{n==null||n(o)},[n,o]),j=f.useCallback(k=>()=>{$==null||$(k)},[$]);return t.jsxs(zt,{align:"start",children:[t.jsx(Pe,{lg:75,md:75,sm:75,children:t.jsx(Fe,{disabled:i,error:r?(v=r.error)==null?void 0:v.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:d,name:g,onBlur:u,onChange:x,placeholder:h,removeItemArray:j,required:c,tooltip:b,value:m})}),l<p-1&&l+1===(a==null?void 0:a.length)?t.jsx(Pe,{lg:25,md:25,sm:25,children:t.jsx(
|
|
1179
|
+
`,zt=({align:e,children:n,cols:i,colsPadding:a,justify:r})=>t.jsx(Ri,{$align:e,$cols:i,$colsPadding:a,$justify:r,children:n}),Ae=({addText:e,append:n,disabled:i=!1,fields:a,fieldState:r,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:u,onChange:x,placeholder:h,tooltip:b,remove:$,value:m})=>{var v;const w=f.useCallback(()=>{n==null||n(o)},[n,o]),j=f.useCallback(k=>()=>{$==null||$(k)},[$]);return t.jsxs(zt,{align:"start",children:[t.jsx(Pe,{lg:75,md:75,sm:75,children:t.jsx(Fe,{disabled:i,error:r?(v=r.error)==null?void 0:v.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:d,name:g,onBlur:u,onChange:x,placeholder:h,removeItemArray:j,required:c,tooltip:b,value:m})}),l<p-1&&l+1===(a==null?void 0:a.length)?t.jsx(Pe,{lg:25,md:25,sm:25,children:t.jsx(P,{disabled:i,icon:"plus",onClick:w,variant:"ghost",width:"100%",children:e??"Add"})}):void 0]})},Ei=({addText:e,append:n,control:i,disabled:a,fields:r,initValue:o="",required:l,label:c,max:d=void 0,name:p="array-field",onChange:g,placeholder:u,remove:x,tooltip:h})=>i&&r?t.jsx(f.Fragment,{children:r.map((b,$)=>t.jsx(s.Controller,{control:i,name:`${p}.${$}`,render:({field:m,fieldState:w})=>t.jsx(Ae,{addText:e,append:n,disabled:a,fieldState:w,fields:r,index:$,initValue:o,label:c,max:d,name:m.name,onBlur:m.onBlur,onChange:g??m.onChange,placeholder:u,remove:x,required:l,tooltip:h,value:m.value.value}),index:$,fieldProp:b},b.id))}):t.jsx(Ae,{addText:e,disabled:a,initValue:o,label:c,max:d,name:p,onChange:g,placeholder:u,required:l,tooltip:h}),Di=s.dt(dt)`
|
|
1180
1180
|
white-space: nowrap;
|
|
1181
1181
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1182
1182
|
text-overflow: ellipsis;
|
|
@@ -1187,13 +1187,13 @@
|
|
|
1187
1187
|
position: absolute;
|
|
1188
1188
|
visibility: hidden;
|
|
1189
1189
|
width: 0;
|
|
1190
|
-
`,It=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Pi=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Ai=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:u,setValue:x,tooltip:h,watch:b,weight:$})=>{const m=s.nt(),w=n?void 0:i,j=f.useRef(null),v=u==null?void 0:u(d,{required:g}),k=b==null?void 0:b(d),N=Pi(k),E=f.useCallback(()=>{const
|
|
1190
|
+
`,It=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Pi=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Ai=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:u,setValue:x,tooltip:h,watch:b,weight:$})=>{const m=s.nt(),w=n?void 0:i,j=f.useRef(null),v=u==null?void 0:u(d,{required:g}),k=b==null?void 0:b(d),N=Pi(k),E=f.useCallback(()=>{const D=It("change",d,void 0);x&&x(d,void 0),v&&v.onChange(D)},[v,d,x]),C=f.useCallback(D=>{const{files:R}=D.currentTarget;R&&R.length>0&&(p==null||p(D),x&&x(d,R),v&&v.onChange(D))},[v,d,p,x]),F=f.useCallback(D=>{n?D.preventDefault():j.current&&j.current.click()},[n]);return t.jsxs(H,{error:w,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:g,tooltip:h,weight:$,children:[t.jsxs(Q,{className:`${n?"disabled":""} ${w?"error":""}`,children:[t.jsx(Di,{$size:"xs",children:N}),t.jsxs(y,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(N)?void 0:t.jsx(B,{color:m.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:E,variant:"ghost",width:"20px"}),w&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}),t.jsxs(P,{border:n?`1px solid ${m.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:F,variant:"primary",width:"96px",children:[t.jsx(I,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Li,{...v,accept:e,"aria-label":d,"data-testid":d,disabled:n,id:l??d,multiple:c,name:d,onChange:C,ref:j,type:"file"})]})},Wi=s.dt.input`
|
|
1191
1191
|
border: none;
|
|
1192
1192
|
background: transparent;
|
|
1193
1193
|
min-width: 15rem;
|
|
1194
1194
|
padding: 0;
|
|
1195
1195
|
flex: 1;
|
|
1196
|
-
`,We=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:x,value:h,weight:b})=>{const $=s.nt(),m=e?void 0:n,[w,j]=f.useState(""),v=d?h:i==null?void 0:i.value,k=f.useMemo(()=>v&&typeof v=="string"?v.split(",").filter(Boolean):[],[v]),N=f.useCallback(R=>{const
|
|
1196
|
+
`,We=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:x,value:h,weight:b})=>{const $=s.nt(),m=e?void 0:n,[w,j]=f.useState(""),v=d?h:i==null?void 0:i.value,k=f.useMemo(()=>v&&typeof v=="string"?v.split(",").filter(Boolean):[],[v]),N=f.useCallback(R=>{const U=[...new Set(R.filter(Boolean))].join(","),Y=It("change",c,U);i&&i.onChange(Y),d&&d(Y)},[i,c,d]),E=f.useCallback(R=>{j(R.target.value)},[]),C=f.useCallback(R=>{const A=w.trim();A.length&&!k.includes(A)&&(R.preventDefault(),N([...k,A]),j("")),i&&i.onBlur()},[w,i,N,k]),F=f.useCallback(R=>{const A=w.trim();R.key==="Enter"&&A.length===0&&R.preventDefault(),["Enter",","].includes(R.key)&&A.length>0&&!k.includes(A)?(R.preventDefault(),N([...k,A]),j("")):R.key==="Backspace"&&!A.length&&k.length&&(R.preventDefault(),p==null||p(k[k.length-1]),N(k.slice(0,-1)))},[w,p,N,k]),D=f.useCallback(R=>()=>{p==null||p(R),N(k.filter(A=>A!==R))},[p,N,k]);return t.jsx(H,{error:m,helpLink:a,helpLinkText:r,helpText:o,htmlFor:c,label:l,required:u,tooltip:x,weight:b,children:t.jsxs(Q,{$overflowX:"auto",className:`${e?"disabled":""} ${m?"error":""}`,children:[k.map(R=>t.jsx(K,{disabled:e,onClose:D(R),tagLabel:R},R)),t.jsx(Wi,{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",id:c,onBlur:C,onChange:E,onKeyDown:F,placeholder:k.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:w}),m?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:$.palette.error[500],iconSize:"xs"}):void 0]})})},Bi=({disabled:e=!1,control:n,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:x,value:h,weight:b})=>n?t.jsx(s.Controller,{control:n,name:c,render:({field:$})=>t.jsx(We,{disabled:e,error:i,field:$,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:u,tooltip:x,weight:b}),rules:{required:u}}):t.jsx(We,{disabled:e,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:x,value:h,weight:b}),Be=f.forwardRef(function({disabled:n,icon:i,margin:a,onClick:r,...o},l){return t.jsx(xi,{$margin:a,"aria-label":i,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...o,children:t.jsx(I,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Ce=({error:e,decimalPlaces:n=0,disabled:i=!1,id:a,maxLength:r,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:u,setValue:x,value:h})=>{const b=s.nt(),$=i?void 0:e,m=n<0?0:n,[w,j]=f.useState(h?s._.toNumber(h):0),v=f.useCallback(()=>{const C=(w-10**-m).toFixed(m),F=Math.max(Number(l),Number(C));x&&x(c,F,{shouldDirty:!0}),j(F)},[m,w,l,c,x]),k=f.useCallback(()=>{const C=(w+10**-m).toFixed(m),F=Math.min(Number(o),Number(C)>Number(l)?Number(C):Number(l));x&&x(c,F,{shouldDirty:!0}),j(F)},[m,w,o,l,c,x]),N=f.useCallback(C=>{const{value:F}=C.target,D=/\d+/u.test(F)&&!s._.isEmpty(F);x&&x(c,D?F:void 0),d&&d(C),j(Number(F))},[c,d,x]),E=f.useCallback(C=>{C.key==="Enter"&&C.preventDefault()},[]);return t.jsxs(Q,{className:`${i?"disabled":""} ${$?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":$?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",disabled:i,id:a??c,max:o,min:l,onKeyDown:E,placeholder:p,required:u,step:10**-m,type:"number",...g==null?void 0:g(c,{maxLength:r,max:o,min:l,onChange:N,value:h,valueAsNumber:!0})}),$&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsx(Be,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:v,px:.75,py:.75}),t.jsx(Be,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:k,px:.75,py:.75})]})},Tt=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:a,helpText:r,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:u,onChange:x,placeholder:h,register:b,required:$,setValue:m,tooltip:w,value:j,watch:v,weight:k})=>t.jsx(H,{error:n?void 0:i,helpLink:a,helpText:r,htmlFor:u,label:l,linkPosition:c,maxLength:d,required:$,tooltip:w,weight:k,children:t.jsx(Ce,{decimalPlaces:e,disabled:n,error:i,id:o,max:p,maxLength:d,min:g,name:u,onChange:x,placeholder:h,register:b,required:$,setValue:m,value:x?j:v==null?void 0:v(u)})}),Ft=({disabled:e=!1,error:n,name:i,label:a,propsMax:r,propsMin:o,required:l,tooltip:c,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return t.jsx(H,{error:n,htmlFor:i,label:a,required:l,tooltip:c,children:t.jsxs(y,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Ce,{...o,disabled:e,error:n,name:o.name??g}),t.jsx(Ce,{...r,disabled:e,error:n,name:r.name??p})]})})},Mi=s.dt.div`
|
|
1197
1197
|
${({theme:e})=>`
|
|
1198
1198
|
align-items: flex-start;
|
|
1199
1199
|
align-self: stretch;
|
|
@@ -1287,7 +1287,7 @@
|
|
|
1287
1287
|
overflow: hidden;
|
|
1288
1288
|
text-overflow: ellipsis;
|
|
1289
1289
|
white-space: nowrap;
|
|
1290
|
-
`,ye=(e,n,i=!1)=>{f.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",a,!0),()=>{document.removeEventListener("mousedown",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("mousedown",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",a,!0)})},[i,e,n])},Ui=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const u=s.nt(),x=f.useRef(null),h=e?void 0:n,b=(p==null?void 0:p(a))??d,[$,m]=f.useState(!1),[w,j]=f.useState(""),{refs:v,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:N,inputValue:E,handlePhoneValueChange:C,country:F,setCountry:
|
|
1290
|
+
`,ye=(e,n,i=!1)=>{f.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",a,!0),()=>{document.removeEventListener("mousedown",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("mousedown",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",a,!0)})},[i,e,n])},Ui=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const u=s.nt(),x=f.useRef(null),h=e?void 0:n,b=(p==null?void 0:p(a))??d,[$,m]=f.useState(!1),[w,j]=f.useState(""),{refs:v,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:N,inputValue:E,handlePhoneValueChange:C,country:F,setCountry:D}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),R=f.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),A=f.useCallback(W=>{W.preventDefault(),m(O=>!O),$||j("")},[$]),U=f.useCallback(W=>()=>{D(W),m(!1),j("")},[D,m]),Y=f.useCallback(W=>{W.key.length===1?j(O=>O+W.key):W.key==="Backspace"&&j(O=>O.slice(0,-1))},[]),X=s.R.filter(W=>{const{name:O}=s.M(W);return O.toLowerCase().includes(w.toLowerCase())});return ye(v.floating.current,()=>{m(!1),j("")},!0),t.jsx(H,{error:h,htmlFor:a,label:i,required:o,tooltip:c,weight:g,children:t.jsxs(Mi,{className:`${e?"disabled":""} ${h?"error":""}`,ref:x,children:[t.jsxs(Oi,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:A,onKeyDown:Y,ref:v.setReference,children:[t.jsx(s.q,{iso2:F.iso2,size:"16px"}),t.jsx(I,{icon:"angle-down",iconColor:u.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(Q,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":a,"aria-required":o,autoComplete:"off","data-testid":`${a}-input`,disabled:e,id:a,name:a,onKeyDown:R,placeholder:r,ref:N,type:"tel",value:E,...l==null?void 0:l(a,{required:o,onChange:C})}),h?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"xs"}):void 0]}),$&&ne.createPortal(t.jsx(Hi,{ref:v.setFloating,style:k,children:X.map(W=>{const{dialCode:O,iso2:M,name:Ee}=s.M(W);return t.jsxs(Vi,{onClick:U(M),value:M,children:[t.jsx(s.q,{iso2:M,size:"16px"}),t.jsx(_i,{children:Ee}),t.jsx(S,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+O})]},M)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Gi=({disabled:e=!1,error:n,helpLink:i,helpText:a,isTouched:r,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:u,register:x,required:h,rows:b,tooltip:$,watch:m,weight:w,value:j})=>{const v=s.nt(),k=(m==null?void 0:m(c))??j,N=o&&r&&!e,E=e?void 0:n;return t.jsx(H,{error:E,helpLink:i,helpText:a,htmlFor:c,label:l,maxLength:g,required:h,tooltip:$,value:k?String(k):void 0,weight:w,children:t.jsxs(Q,{className:`
|
|
1291
1291
|
${e?"disabled":""} ${E?"error":""} ${N?"success":""}
|
|
1292
1292
|
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":E?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:u,rows:b,value:k,...x==null?void 0:x(c,{required:h})}),E?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:v.palette.error[500],iconSize:"xs"}):void 0,N?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:v.palette.success[500],iconSize:"xs"}):void 0]})})},Yi=({description:e,disabled:n,id:i,align:a,inputType:r="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:u})=>{const x=f.useMemo(()=>{if(r==="text")return t.jsx(Fe,{disabled:n,name:d,placeholder:p});if(r==="date")return t.jsx(vt,{disabled:n,name:d});const{decimalPlaces:h,max:b,min:$}=o??{};return t.jsx(Tt,{decimalPlaces:h,disabled:n,max:b,min:$,name:d,placeholder:p})},[n,o,r,d,p]);return t.jsxs(ri,{$align:a,$minHeight:l,$minWidth:c,children:[t.jsx(Se,{description:e,id:i,title:u,tooltip:g}),x]})},qi=s.dt.label`
|
|
1293
1293
|
${({theme:e})=>`
|
|
@@ -1593,7 +1593,7 @@
|
|
|
1593
1593
|
`,At=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(f.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":s._.isNil(n)||s._.isString(n)?0:n.offset+.7,...i!==void 0?{"data-line":String(Number(i))}:{},children:s._.isNil(n)||s._.isString(n)||s._.isEmpty(n.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:n.content})})})),pa=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i,variant:a="normal"})=>{const r=s.nt(),[o,l]=f.useState(!1),[c,d]=f.useState(!0),p=f.useCallback(()=>{l(h=>!h)},[l]),g=f.useCallback(()=>{if(s._.isNil(n)||s._.isEmpty(n)||!s._.isString(n))return d(!1),e;const h=n.split(`
|
|
1594
1594
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1595
1595
|
`)}
|
|
1596
|
-
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return a==="location"?t.jsx(At,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs(y,{bgColor:r.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:u})})}),t.jsxs(da,{children:[t.jsx(B,{height:r.spacing[2.5],icon:"copy",iconColor:r.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:x,variant:"ghost",width:r.spacing[2.5]}),c?t.jsxs(
|
|
1596
|
+
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return a==="location"?t.jsx(At,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs(y,{bgColor:r.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:u})})}),t.jsxs(da,{children:[t.jsx(B,{height:r.spacing[2.5],icon:"copy",iconColor:r.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:x,variant:"ghost",width:r.spacing[2.5]}),c?t.jsxs(P,{onClick:p,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(I,{icon:o?"chevron-up":"chevron-down",iconColor:r.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:x})]}):!1]})]})},{getVariant:ga}=q(e=>({fixed:`
|
|
1597
1597
|
height: auto;
|
|
1598
1598
|
min-width: 300px;
|
|
1599
1599
|
padding: ${e.spacing[1.25]};
|
|
@@ -1714,7 +1714,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1714
1714
|
margin-right: 0;
|
|
1715
1715
|
`:""}
|
|
1716
1716
|
}
|
|
1717
|
-
`,Bt=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:a=void 0})=>{const{close:r}=n,o=f.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=f.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]);return[i,a].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs(y,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(ha,{children:t.jsxs("div",{children:[a&&t.jsx(
|
|
1717
|
+
`,Bt=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:a=void 0})=>{const{close:r}=n,o=f.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=f.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]);return[i,a].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs(y,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(ha,{children:t.jsxs("div",{children:[a&&t.jsx(P,{id:a.id,onClick:o,variant:"tertiary",width:"100%",children:a.text}),i&&t.jsx(P,{id:i.id,onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},Mt=({title:e,description:n,modalRef:i,otherActions:a,onClose:r})=>{const o=s.nt(),l=f.useCallback(()=>{r==null||r(),i.close()},[i,r]);return f.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(xa,{children:[t.jsxs(fa,{children:[typeof e=="string"?t.jsx(_,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",wordBreak:"break-word",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[a,t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),n&&s.lodashExports.isString(n)&&!s.lodashExports.isEmpty(n)?t.jsx(S,{mt:.5,size:"sm",children:n}):void 0,n&&!s.lodashExports.isString(n)&&t.jsx(oe,{display:"block",mt:.5,size:"sm",children:n})]})},$a=({disabled:e,id:n="modal-confirm",onCancel:i,onConfirm:a="submit",txtCancel:r,txtConfirm:o})=>{const l=a==="submit";return t.jsxs(y,{display:"flex",gap:.75,maxWidth:i?"392px":"190px",mt:1.5,children:[i?t.jsx(P,{id:`${n}-cancel`,justify:"center",onClick:i,variant:"tertiary",width:"100%",children:r??"Cancel"}):void 0,t.jsx(P,{disabled:e,id:n,justify:"center",onClick:l?void 0:a,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},ya=s.dt.button`
|
|
1718
1718
|
${({theme:e})=>`
|
|
1719
1719
|
align-items: center;
|
|
1720
1720
|
color: ${e.palette.gray[500]};
|
|
@@ -1864,7 +1864,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1864
1864
|
min-width: 240px;
|
|
1865
1865
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1866
1866
|
`}
|
|
1867
|
-
`,me=({children:e,disabled:n=!1,icon:i,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...u})=>{const h=s.nt().palette.gray[n?300:800],b=n?f.Children.map(e,$=>f.isValidElement($)?f.cloneElement($,{disabled:n,...$.props}):$):e;return t.jsxs(Ca,{"aria-disabled":n,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...u,children:[i!==void 0||g!==void 0?t.jsxs(y,{alignItems:"center",display:"flex",gap:.625,children:[i?t.jsx(I,{disabled:n,icon:i,iconColor:h,iconSize:"xxs",iconType:a}):null,r===void 0?b:t.jsx(
|
|
1867
|
+
`,me=({children:e,disabled:n=!1,icon:i,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...u})=>{const h=s.nt().palette.gray[n?300:800],b=n?f.Children.map(e,$=>f.isValidElement($)?f.cloneElement($,{disabled:n,...$.props}):$):e;return t.jsxs(Ca,{"aria-disabled":n,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...u,children:[i!==void 0||g!==void 0?t.jsxs(y,{alignItems:"center",display:"flex",gap:.625,children:[i?t.jsx(I,{disabled:n,icon:i,iconColor:h,iconSize:"xxs",iconType:a}):null,r===void 0?b:t.jsx(Z,{href:r,children:b})]}):null,p||d?t.jsx(I,{disabled:n,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:a,onClick:l}):null]})},Sa=s.dt(me)`
|
|
1868
1868
|
margin-top: 10px;
|
|
1869
1869
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1870
1870
|
border-radius: 4px;
|
|
@@ -1882,7 +1882,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1882
1882
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1883
1883
|
background-color: unset;
|
|
1884
1884
|
}
|
|
1885
|
-
`,_t=({items:e,onReorder:n,title:i,description:a,onClickClose:r})=>{const o=f.useCallback(l=>()=>{r(l)},[r]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs(y,{display:"flex",gap:.25,children:[t.jsx(
|
|
1885
|
+
`,_t=({items:e,onReorder:n,title:i,description:a,onClickClose:r})=>{const o=f.useCallback(l=>()=>{r(l)},[r]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs(y,{display:"flex",gap:.25,children:[t.jsx(_,{display:"flex",size:"xs",children:i}),t.jsx(K,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(S,{size:"sm",children:a}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(Sa,{disabled:l.locked,icon:"grid-2",label:l.name,onClickIcon:l.locked?void 0:o(l.id),rightIcon:l.locked?"lock":"close",selected:l.visible,value:l.name,children:l.name})},l.name):void 0)]})},za=s.dt(me)`
|
|
1886
1886
|
padding: 7px 8px;
|
|
1887
1887
|
|
|
1888
1888
|
&[aria-selected="true"] {
|
|
@@ -1954,7 +1954,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1954
1954
|
border-radius: ${e.spacing[.5]};
|
|
1955
1955
|
width: 250px;
|
|
1956
1956
|
`}
|
|
1957
|
-
`,le=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),x=f.useCallback(()=>{p($=>!$)},[]),h=f.useCallback($=>{$.key==="Enter"&&$.preventDefault()},[]);ye(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(Ta,{children:[t.jsx(I,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ia,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(B,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:a,px:.25,py:.25,type:"reset",variant:"ghost"})]});return i?t.jsxs(f.Fragment,{children:[t.jsx(B,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:x,ref:g.setReference,variant:"ghost"}),d?t.jsx(Fa,{ref:g.setFloating,style:u,children:b}):void 0]}):b}),Gt=({columns:e,formId:n,onChangeHandler:i,variant:a})=>{const r=f.useRef(null),[o,l]=f.useState([]),[c,d]=f.useState(""),p=f.useCallback(u=>{const{value:x}=u.target;d(x)},[]),g=f.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return f.useEffect(()=>{l(e.filter(u=>{var x;return a==="grouped"?u.name.toLowerCase().includes(c.toLowerCase())||((x=u.group)==null?void 0:x.includes(c.toLowerCase())):u.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,a]),a==="grouped"?t.jsxs(y,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(le,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(Ut(o)).map(([u,x],h)=>{const b=`li-checkbox${u}`;return t.jsx(Nt,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:x,title:u},b)})})]}):t.jsxs(y,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(le,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(u=>{const x=`li-checkbox-${u.name}`;return t.jsx(za,{selected:u.visible,value:x,width:"content",children:t.jsx(Ne,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},x)})})]})},Na=({_containerId:e="portals",title:n,modalRef:i,variant:a})=>{const r=s.nt(),o=f.useRef(null),[l,c]=f.useState(void 0),d=f.useCallback(u=>{const{checked:x,value:h}=u.target,b=i.columns.map($=>{var m;return $.name===h?((m=$.toggleVisibility)==null||m.call($,x),{...$,visible:x}):$});i.setColumns(b)},[i]),p=f.useCallback(u=>{const x=i.columns.map(h=>{var b;return h.id===u?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});i.setColumns(x)},[i]),g=f.useCallback(()=>{var x;const u=(x=o.current)==null?void 0:x.scrollHeight;l!==u&&c(u)},[l]);return i.isOpen?ne.createPortal(t.jsx(Wt,{"aria-label":i.name,"aria-modal":"true",children:t.jsxs(Ke,{$size:"md",flexDirection:"column",children:[t.jsxs(y,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(
|
|
1957
|
+
`,le=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),x=f.useCallback(()=>{p($=>!$)},[]),h=f.useCallback($=>{$.key==="Enter"&&$.preventDefault()},[]);ye(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(Ta,{children:[t.jsx(I,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ia,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(B,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:a,px:.25,py:.25,type:"reset",variant:"ghost"})]});return i?t.jsxs(f.Fragment,{children:[t.jsx(B,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:x,ref:g.setReference,variant:"ghost"}),d?t.jsx(Fa,{ref:g.setFloating,style:u,children:b}):void 0]}):b}),Gt=({columns:e,formId:n,onChangeHandler:i,variant:a})=>{const r=f.useRef(null),[o,l]=f.useState([]),[c,d]=f.useState(""),p=f.useCallback(u=>{const{value:x}=u.target;d(x)},[]),g=f.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return f.useEffect(()=>{l(e.filter(u=>{var x;return a==="grouped"?u.name.toLowerCase().includes(c.toLowerCase())||((x=u.group)==null?void 0:x.includes(c.toLowerCase())):u.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,a]),a==="grouped"?t.jsxs(y,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(le,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(Ut(o)).map(([u,x],h)=>{const b=`li-checkbox${u}`;return t.jsx(Nt,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:x,title:u},b)})})]}):t.jsxs(y,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(le,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(u=>{const x=`li-checkbox-${u.name}`;return t.jsx(za,{selected:u.visible,value:x,width:"content",children:t.jsx(Ne,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},x)})})]})},Na=({_containerId:e="portals",title:n,modalRef:i,variant:a})=>{const r=s.nt(),o=f.useRef(null),[l,c]=f.useState(void 0),d=f.useCallback(u=>{const{checked:x,value:h}=u.target,b=i.columns.map($=>{var m;return $.name===h?((m=$.toggleVisibility)==null||m.call($,x),{...$,visible:x}):$});i.setColumns(b)},[i]),p=f.useCallback(u=>{const x=i.columns.map(h=>{var b;return h.id===u?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});i.setColumns(x)},[i]),g=f.useCallback(()=>{var x;const u=(x=o.current)==null?void 0:x.scrollHeight;l!==u&&c(u)},[l]);return i.isOpen?ne.createPortal(t.jsx(Wt,{"aria-label":i.name,"aria-modal":"true",children:t.jsxs(Ke,{$size:"md",flexDirection:"column",children:[t.jsxs(y,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(_,{size:"sm",children:n}),t.jsx(B,{icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(te,{mb:0,mt:0}),t.jsxs(y,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:o,scroll:"y",width:"100%",children:[t.jsx(Gt,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:a}),t.jsx(y,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(_t,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),t.jsx(te,{mb:0,mt:0}),t.jsxs(y,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(P,{disabled:!i.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:i.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),t.jsx(P,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Ra=s.dt(me)`
|
|
1958
1958
|
padding: 8px;
|
|
1959
1959
|
min-width: unset;
|
|
1960
1960
|
`,Ea=s.dt.div.attrs({className:"comp-modal absolute top-[55px] overflow-auto"})`
|
|
@@ -1970,7 +1970,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1970
1970
|
svg.fa-check {
|
|
1971
1971
|
border-radius: 2px;
|
|
1972
1972
|
}
|
|
1973
|
-
`,Yt=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(ot,{value:g.value,width:"content",children:t.jsx(Ne,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(g=>t.jsx(ot,{value:g.value,width:"content",children:t.jsx(qe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(ht,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Fe,{label:n.label,name:p,register:i,value:n.value});case"numberRange":return t.jsx(Ft,{label:n.label,name:String(n.key),propsMax:{placeholder:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(Ct,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:a,variant:"filters"});default:return t.jsx("div",{})}},qt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Yt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Kt=e=>{var c,d,p,g,u;const[n,i]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(x=>x.type==="checkboxes").flatMap(x=>{var h;return((h=x.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(x=>x.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:x})=>x))==null?void 0:p.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:g.minValue,maxValue:(u=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:u.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Da=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},La=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=Kt(e),p=e.some(x=>x.type==="checkboxes"),g=f.useCallback(x=>{const{value:h}=x.target,b=La(e,h);o(b)},[e,o]),u=f.useCallback(x=>{n&&n(x)},[n]);return f.useEffect(()=>{o(e),Da(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(le,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(u),children:[t.jsx(qt,{control:a,items:r,register:l,setValue:d}),t.jsx(L,{mt:1,type:"submit",children:"Apply"})]})]})},Xt=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,u]=f.useState({}),[x,h]=f.useState(""),b=f.useCallback(w=>()=>{const j=l.find(k=>k.label===w),v=!(j!=null&&j.filterOptions.some(k=>k.type==="dateRange"||k.type==="select"));r==null||r(v??!0),h(w),p((j==null?void 0:j.filterOptions)??[])},[l,r]),$=f.useCallback(w=>{const j=[...w.checkbox,...Object.values(w.text??{}),...w.radio?[w.radio]:[],...w.minValue?[String(w.minValue)]:[],...w.maxValue?[String(w.maxValue)]:[]];u(C=>j.length>0?{...C,[x]:j}:C);const v=C=>{var F,P;return{...C,options:(F=C.options)==null?void 0:F.map(R=>({...R,checked:w.checkbox.includes(R.value)||w.radio===R.value})),value:["text","select"].includes(C.type)?((P=w.text)==null?void 0:P[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?w.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?w.maxValue:C.maxValue}},k=C=>C.label===x?{...C,filterOptions:C.filterOptions.map(v)}:C,N=l.map(k);c(C=>C.map(k));const E=N.flatMap(({filterOptions:C})=>C);i(E),p([])},[l,i,x]),m=f.useCallback((w,j)=>{const v=`li-filter-option-${w}`;return t.jsxs(Ra,{icon:j,onClick:b(w),style:{minWidth:"180px"},value:v,width:"100%",children:[w,g[w]===void 0?void 0:t.jsx(K,{tagLabel:g[w].length.toString()})]},v)},[g,b]);return f.useEffect(()=>{const w=e.reduce((j,{label:v,filterOptions:k})=>{const N=k.flatMap(({value:F,minValue:P,maxValue:R})=>[P,R,F]).filter(Boolean),E=k.flatMap(({options:F})=>F??[]).filter(({checked:F=!1})=>F).map(({value:F})=>F),C=[...N,...E];return C.length===0?j:{...j,[v]:C}},{});u(w),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:$,options:d}):Object.entries(Ut(e)).map(([w,j])=>t.jsxs(y,{children:[t.jsx(S,{color:o.palette.gray[400],mb:.25,size:"sm",children:w}),j.map(({label:v,icon:k="filter-list"})=>m(v,k))]},w))}):t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"auto":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:$,options:d}):e.map(({label:w,icon:j="filter-list"})=>m(w,j))})},Jt=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(B,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const u=x=>{const h=p.current;h&&!h.contains(x.target)&&i.close()};if(l)return document.addEventListener("mousedown",u,!0),()=>{document.removeEventListener("mousedown",u,!0)}},[p,l,i]),t.jsx(Ea,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{width:"max-content"},children:[r==="column"?g:void 0,t.jsx(Xt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Pa(e){if(e)return e}function Zt(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function Aa(e,n){const i=s._.isEmpty(e)&&typeof e!="number"?void 0:Number(e),a=s._.isEmpty(n)&&typeof n!="number"?void 0:Number(String(n));if(!s._.isUndefined(i)&&!s._.isUndefined(a))return`${i} - ${a}`;if(!s._.isUndefined(i))return`Min ${i}`;if(!s._.isUndefined(a))return`Max ${a}`}function Wa(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)||s._.isUndefined(n))){if(e!==""&&n!=="")return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!=="")return`From ${s.dayjs(e).format("LL")}`;if(n!=="")return`To ${s.dayjs(n).format("LL")}`}}function Ba(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(K,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),Ma=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=r;switch(c){case"numberRange":{const x=Aa(g,u);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const x=Wa(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=Zt(p);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Pa(d),h=Ba(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx(y,{alignItems:"center",display:"flex",gap:.25,pb:1,width:"100%",wrap:"wrap",children:i}):null},Oa=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,x=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(x)&&s._.isUndefined(h)?!0:(x??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},st=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Ha=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Va=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,variant:o="ungrouped"})=>{const l=Re("filters-modal"),[c,d]=f.useState([]),[p,g]=f.useState(st(c)),u=i.map($=>({...$,filterOptions:$.filterOptions.map(m=>c.find(j=>j.key===m.key&&j.type===m.type&&j.filterFn===m.filterFn)??{...m})})),x=f.useCallback($=>{d([...$]),localStorage.setItem(n,JSON.stringify($))},[d,n]),h=f.useCallback($=>()=>{const m=c.map(w=>w.key===$.key&&w.type===$.type&&w.filterFn===$.filterFn?Ha(w):w);d(m),localStorage.setItem(n,JSON.stringify(m))},[c,n]);return f.useEffect(()=>{const $=localStorage.getItem(n),m=i.flatMap(j=>j.filterOptions),w=$?JSON.parse($):m;m.flatMap(j=>j.value).filter(Boolean).length>0||m.flatMap(j=>j.options).filter(j=>(j==null?void 0:j.checked)===void 0).length>0?(localStorage.setItem(n,JSON.stringify(m)),d(m)):d(w)},[n,i,d]),f.useEffect(()=>{a&&e!==void 0&&a(Oa(e,c)),g(st(c)),r==null||r(c)},[e,c,a,g,r]),{Filters:()=>t.jsxs(y,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx(y,{pr:.25,children:t.jsx(L,{icon:"filter",id:"filterBtn",onClick:l.toggle,tag:p.toString(),variant:"ghost"})}),l.isOpen&&t.jsx(Jt,{modalRef:l,onApplyFilters:x,options:u,variant:o})]}),options:u,removeFilter:h}},Qt=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:x,id:h="modal-container"})=>{const b=s.nt(),$=t.jsx(Wt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ke,{$size:x,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx(y,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ua,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(ba,{$framed:o.imageFramed,children:t.jsx(ee,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(S,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?ne.createPortal($,document.getElementById("portals")??document.body):c.isOpen?$:null},_a=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Re("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(u=>{r.current=u})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(Qt,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},Oe=({buttonProps:e,variant:n})=>t.jsx(L,{onClick:e.onClick,variant:n,children:e.text}),Ua=s.dt.div`
|
|
1973
|
+
`,Yt=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(ot,{value:g.value,width:"content",children:t.jsx(Ne,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(g=>t.jsx(ot,{value:g.value,width:"content",children:t.jsx(qe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(ht,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Fe,{label:n.label,name:p,register:i,value:n.value});case"numberRange":return t.jsx(Ft,{label:n.label,name:String(n.key),propsMax:{placeholder:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(Ct,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:a,variant:"filters"});default:return t.jsx("div",{})}},qt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Yt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Kt=e=>{var c,d,p,g,u;const[n,i]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(x=>x.type==="checkboxes").flatMap(x=>{var h;return((h=x.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(x=>x.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:x})=>x))==null?void 0:p.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:g.minValue,maxValue:(u=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:u.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Da=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},La=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=Kt(e),p=e.some(x=>x.type==="checkboxes"),g=f.useCallback(x=>{const{value:h}=x.target,b=La(e,h);o(b)},[e,o]),u=f.useCallback(x=>{n&&n(x)},[n]);return f.useEffect(()=>{o(e),Da(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(le,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(u),children:[t.jsx(qt,{control:a,items:r,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Xt=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,u]=f.useState({}),[x,h]=f.useState(""),b=f.useCallback(w=>()=>{const j=l.find(k=>k.label===w),v=!(j!=null&&j.filterOptions.some(k=>k.type==="dateRange"||k.type==="select"));r==null||r(v??!0),h(w),p((j==null?void 0:j.filterOptions)??[])},[l,r]),$=f.useCallback(w=>{const j=[...w.checkbox,...Object.values(w.text??{}),...w.radio?[w.radio]:[],...w.minValue?[String(w.minValue)]:[],...w.maxValue?[String(w.maxValue)]:[]];u(C=>j.length>0?{...C,[x]:j}:C);const v=C=>{var F,D;return{...C,options:(F=C.options)==null?void 0:F.map(R=>({...R,checked:w.checkbox.includes(R.value)||w.radio===R.value})),value:["text","select"].includes(C.type)?((D=w.text)==null?void 0:D[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?w.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?w.maxValue:C.maxValue}},k=C=>C.label===x?{...C,filterOptions:C.filterOptions.map(v)}:C,N=l.map(k);c(C=>C.map(k));const E=N.flatMap(({filterOptions:C})=>C);i(E),p([])},[l,i,x]),m=f.useCallback((w,j)=>{const v=`li-filter-option-${w}`;return t.jsxs(Ra,{icon:j,onClick:b(w),style:{minWidth:"180px"},value:v,width:"100%",children:[w,g[w]===void 0?void 0:t.jsx(K,{tagLabel:g[w].length.toString()})]},v)},[g,b]);return f.useEffect(()=>{const w=e.reduce((j,{label:v,filterOptions:k})=>{const N=k.flatMap(({value:F,minValue:D,maxValue:R})=>[D,R,F]).filter(Boolean),E=k.flatMap(({options:F})=>F??[]).filter(({checked:F=!1})=>F).map(({value:F})=>F),C=[...N,...E];return C.length===0?j:{...j,[v]:C}},{});u(w),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:$,options:d}):Object.entries(Ut(e)).map(([w,j])=>t.jsxs(y,{children:[t.jsx(S,{color:o.palette.gray[400],mb:.25,size:"sm",children:w}),j.map(({label:v,icon:k="filter-list"})=>m(v,k))]},w))}):t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"auto":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:$,options:d}):e.map(({label:w,icon:j="filter-list"})=>m(w,j))})},Jt=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(B,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const u=x=>{const h=p.current;h&&!h.contains(x.target)&&i.close()};if(l)return document.addEventListener("mousedown",u,!0),()=>{document.removeEventListener("mousedown",u,!0)}},[p,l,i]),t.jsx(Ea,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{width:"max-content"},children:[r==="column"?g:void 0,t.jsx(Xt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Pa(e){if(e)return e}function Zt(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function Aa(e,n){const i=s._.isEmpty(e)&&typeof e!="number"?void 0:Number(e),a=s._.isEmpty(n)&&typeof n!="number"?void 0:Number(String(n));if(!s._.isUndefined(i)&&!s._.isUndefined(a))return`${i} - ${a}`;if(!s._.isUndefined(i))return`Min ${i}`;if(!s._.isUndefined(a))return`Max ${a}`}function Wa(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)||s._.isUndefined(n))){if(e!==""&&n!=="")return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!=="")return`From ${s.dayjs(e).format("LL")}`;if(n!=="")return`To ${s.dayjs(n).format("LL")}`}}function Ba(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(K,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),Ma=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=r;switch(c){case"numberRange":{const x=Aa(g,u);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const x=Wa(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=Zt(p);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Pa(d),h=Ba(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx(y,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Oa=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,x=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(x)&&s._.isUndefined(h)?!0:(x??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},st=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Ha=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Va=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,variant:o="ungrouped"})=>{const l=Re("filters-modal"),[c,d]=f.useState([]),[p,g]=f.useState(st(c)),u=i.map($=>({...$,filterOptions:$.filterOptions.map(m=>c.find(j=>j.key===m.key&&j.type===m.type&&j.filterFn===m.filterFn)??{...m})})),x=f.useCallback($=>{d([...$]),localStorage.setItem(n,JSON.stringify($))},[d,n]),h=f.useCallback($=>()=>{const m=c.map(w=>w.key===$.key&&w.type===$.type&&w.filterFn===$.filterFn?Ha(w):w);d(m),localStorage.setItem(n,JSON.stringify(m))},[c,n]);return f.useEffect(()=>{const $=localStorage.getItem(n),m=i.flatMap(j=>j.filterOptions),w=$?JSON.parse($):m;m.flatMap(j=>j.value).filter(Boolean).length>0||m.flatMap(j=>j.options).filter(j=>(j==null?void 0:j.checked)===void 0).length>0?(d(m),localStorage.setItem(n,JSON.stringify(m))):d(w)},[n,i,d]),f.useEffect(()=>{a&&e!==void 0&&a(Oa(e,c)),g(st(c)),r==null||r(c)},[e,c,a,g,r]),{Filters:()=>t.jsxs(y,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx(y,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:l.toggle,tag:p.toString(),variant:"ghost"})}),l.isOpen&&t.jsx(Jt,{modalRef:l,onApplyFilters:x,options:u,variant:o})]}),options:u,removeFilter:h}},Qt=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:x,id:h="modal-container"})=>{const b=s.nt(),$=t.jsx(Wt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ke,{$size:x,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx(y,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ua,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(ba,{$framed:o.imageFramed,children:t.jsx(ee,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(S,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?ne.createPortal($,document.getElementById("portals")??document.body):c.isOpen?$:null},_a=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Re("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(u=>{r.current=u})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(Qt,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},Oe=({buttonProps:e,variant:n})=>t.jsx(P,{onClick:e.onClick,variant:n,children:e.text}),Ua=s.dt.div`
|
|
1974
1974
|
display: flex;
|
|
1975
1975
|
flex-direction: column;
|
|
1976
1976
|
align-items: center;
|
|
@@ -2004,7 +2004,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2004
2004
|
> *:last-child {
|
|
2005
2005
|
margin-right: 0;
|
|
2006
2006
|
}
|
|
2007
|
-
`,lt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},qa=({cancelButton:e=void 0,confirmButton:n=void 0,description:i,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(n??e)!==void 0;return t.jsxs(Ua,{$padding:r,children:[t.jsx(Ga,{children:t.jsx(ee,{alt:"empty-icon",publicId:a})}),t.jsx(
|
|
2007
|
+
`,lt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},qa=({cancelButton:e=void 0,confirmButton:n=void 0,description:i,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(n??e)!==void 0;return t.jsxs(Ua,{$padding:r,children:[t.jsx(Ga,{children:t.jsx(ee,{alt:"empty-icon",publicId:a})}),t.jsx(_,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:lt[l].title,textAlign:"center",children:o}),t.jsx(S,{mb:c?2:void 0,size:lt[l].description,textAlign:"center",children:i}),c?t.jsxs(Ya,{children:[e&&t.jsx(Oe,{buttonProps:e,variant:"tertiary"}),n&&t.jsx(Oe,{buttonProps:n,variant:"primary"})]}):void 0]})},Ka=({children:e})=>{const n=s.useFormContext();return e({...n})},Xa=s.dt.form`
|
|
2008
2008
|
${({theme:e})=>`
|
|
2009
2009
|
align-items: flex-start;
|
|
2010
2010
|
align-self: stretch;
|
|
@@ -2014,7 +2014,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2014
2014
|
overflow: hidden auto;
|
|
2015
2015
|
width: 100%;
|
|
2016
2016
|
`}
|
|
2017
|
-
`,Ja=({alert:e,buttonAlignment:n,cancelButton:i,children:a,confirmButton:r,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,showButtons:g=!0,yupSchema:u,...x})=>{const h=s.nt(),b=s.useForm({...x,mode:d??"all",resolver:u?s.o(u):void 0});return t.jsx(s.FormProvider,{...b,children:t.jsx(Xa,{onSubmit:b.handleSubmit(p),children:t.jsxs(y,{scroll:"y",width:"100%",children:[t.jsx(y,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:a}),g&&t.jsxs(y,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,borderTop:`1px solid ${h.palette.gray[200]}`,display:"flex",flexDirection:n?"unset":"column",gap:.625,justify:n??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs(y,{display:"flex",gap:.75,maxWidth:c,children:[i?t.jsx(
|
|
2017
|
+
`,Ja=({alert:e,buttonAlignment:n,cancelButton:i,children:a,confirmButton:r,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,showButtons:g=!0,yupSchema:u,...x})=>{const h=s.nt(),b=s.useForm({...x,mode:d??"all",resolver:u?s.o(u):void 0});return t.jsx(s.FormProvider,{...b,children:t.jsx(Xa,{onSubmit:b.handleSubmit(p),children:t.jsxs(y,{scroll:"y",width:"100%",children:[t.jsx(y,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:a}),g&&t.jsxs(y,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,borderTop:`1px solid ${h.palette.gray[200]}`,display:"flex",flexDirection:n?"unset":"column",gap:.625,justify:n??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs(y,{display:"flex",gap:.75,maxWidth:c,children:[i?t.jsx(P,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,t.jsx(P,{disabled:((r==null?void 0:r.disabled)??!1)||b.formState.isSubmitting||o&&!b.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},Za=s.dt(be)`
|
|
2018
2018
|
display: grid;
|
|
2019
2019
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2020
2020
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2068,7 +2068,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2068
2068
|
background-color: ${e.palette.gray[100]};
|
|
2069
2069
|
}
|
|
2070
2070
|
`}
|
|
2071
|
-
`,en=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:r,children:[e?t.jsx(I,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},tr=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=f.useState(n),[u,x]=f.useState(""),h=f.useCallback(m=>{g(w=>w.filter(j=>String(j.name).toLowerCase().includes(m.toLocaleLowerCase())))},[g]),b=f.useCallback(m=>{m.currentTarget&&(x(m.currentTarget.value),h(m.currentTarget.value))},[x,h]);f.useEffect(()=>{g(n),h(u)},[n,h,u]);const $=t.jsx(y,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx(y,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(er,{$itemsLength:p.length,children:[t.jsxs(y,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(B,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx(y,{mt:1,children:t.jsx(le,{onInput:b,placeholder:"Search"})}),t.jsx(te,{mb:1,mt:1}),t.jsxs(y,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(Je,{onClick:i,children:t.jsxs(y,{alignItems:"center",display:"flex",children:[t.jsx(I,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(S,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(m=>t.jsx(en,{isSelected:o.toLowerCase()===m.name,label:m.name.charAt(0).toUpperCase()+m.name.slice(1),onSelect:a},m.name))]})]})})});return e?ne.createPortal($,document.body):t.jsx("div",{})},nr=({description:e,height:n="auto",leftIconName:i,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=s.nt(),x=p==="centered",h=l&&t.jsx(G,{icon:r??i,iconColor:u.palette.gray[800],id:l,place:d,tip:c});return t.jsxs(y,{alignItems:x?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:x?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[t.jsxs(y,{alignItems:"center",display:"flex",gap:.5,children:[x||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(S,{color:x?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:x?"center":"start",children:e}),x||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs(y,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[x&&!s.lodashExports.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(
|
|
2071
|
+
`,en=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:r,children:[e?t.jsx(I,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},tr=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=f.useState(n),[u,x]=f.useState(""),h=f.useCallback(m=>{g(w=>w.filter(j=>String(j.name).toLowerCase().includes(m.toLocaleLowerCase())))},[g]),b=f.useCallback(m=>{m.currentTarget&&(x(m.currentTarget.value),h(m.currentTarget.value))},[x,h]);f.useEffect(()=>{g(n),h(u)},[n,h,u]);const $=t.jsx(y,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx(y,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(er,{$itemsLength:p.length,children:[t.jsxs(y,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(B,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx(y,{mt:1,children:t.jsx(le,{onInput:b,placeholder:"Search"})}),t.jsx(te,{mb:1,mt:1}),t.jsxs(y,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(Je,{onClick:i,children:t.jsxs(y,{alignItems:"center",display:"flex",children:[t.jsx(I,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(S,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(m=>t.jsx(en,{isSelected:o.toLowerCase()===m.name,label:m.name.charAt(0).toUpperCase()+m.name.slice(1),onSelect:a},m.name))]})]})})});return e?ne.createPortal($,document.body):t.jsx("div",{})},nr=({description:e,height:n="auto",leftIconName:i,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=s.nt(),x=p==="centered",h=l&&t.jsx(G,{icon:r??i,iconColor:u.palette.gray[800],id:l,place:d,tip:c});return t.jsxs(y,{alignItems:x?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:x?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[t.jsxs(y,{alignItems:"center",display:"flex",gap:.5,children:[x||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(S,{color:x?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:x?"center":"start",children:e}),x||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs(y,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[x&&!s.lodashExports.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(_,{fontWeight:"bold",size:"md",children:o}),a]}),x&&!s.lodashExports.isUndefined(r)?h:void 0]})]})},ir=({actions:e,children:n,header:i,title:a,tabs:r,footer:o})=>{const l=s.nt();return t.jsxs(y,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs(y,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:a}),i]}),e&&t.jsx(y,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(B,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx(y,{display:"flex",pt:.25,width:"100%",children:t.jsx(Xe,{items:r})}),t.jsx(y,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx(y,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},g)=>t.jsx(P,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},ar=s.dt.span`
|
|
2072
2072
|
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2073
2073
|
background-color: ${n};
|
|
2074
2074
|
border-radius: 5px;
|
|
@@ -2134,7 +2134,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2134
2134
|
height: ${e}px;
|
|
2135
2135
|
width: ${e}px;
|
|
2136
2136
|
`}
|
|
2137
|
-
`,br=e=>{const{size:n}=e;return t.jsx(hr,{$size:n,...e})},$r=({children:e,commitSha:n,commitShortSha:i,parentElement:a,userInfo:r,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=r;return ye(a,()=>{o(!1)}),t.jsxs(Vt,{children:[t.jsx("li",{className:"user-info",children:t.jsxs(y,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(S,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(S,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx(y,{children:t.jsx(K,{tagLabel:g,variant:"role"})})]})}),t.jsx(te,{}),e,t.jsx(te,{}),t.jsx("li",{className:"commit-info",children:t.jsx(
|
|
2137
|
+
`,br=e=>{const{size:n}=e;return t.jsx(hr,{$size:n,...e})},$r=({children:e,commitSha:n,commitShortSha:i,parentElement:a,userInfo:r,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=r;return ye(a,()=>{o(!1)}),t.jsxs(Vt,{children:[t.jsx("li",{className:"user-info",children:t.jsxs(y,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(S,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(S,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx(y,{children:t.jsx(K,{tagLabel:g,variant:"role"})})]})}),t.jsx(te,{}),e,t.jsx(te,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Z,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${n}`,iconPosition:"hidden",children:t.jsx(S,{color:l.palette.gray[400],size:"xs",children:`commit : ${i}`})})})]})},yr=s.dt.button`
|
|
2138
2138
|
align-items: center;
|
|
2139
2139
|
background-color: transparent;
|
|
2140
2140
|
border: unset;
|
|
@@ -2201,7 +2201,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2201
2201
|
color: ${e.palette[n][500]};
|
|
2202
2202
|
}
|
|
2203
2203
|
`}
|
|
2204
|
-
`,vr=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",kr=({description:e,onClose:n,title:i,variant:a})=>{const r=s.nt(),o=f.useCallback(()=>{n==null||n()},[n]);return t.jsxs(wr,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(jr,{$variant:a,children:[t.jsx(I,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(I,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(I,{icon:vr(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(y,{pr:1.5,children:[t.jsx(
|
|
2204
|
+
`,vr=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",kr=({description:e,onClose:n,title:i,variant:a})=>{const r=s.nt(),o=f.useCallback(()=>{n==null||n()},[n]);return t.jsxs(wr,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(jr,{$variant:a,children:[t.jsx(I,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(I,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(I,{icon:vr(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(y,{pr:1.5,children:[t.jsx(_,{fontWeight:"bold",size:"xs",children:i}),t.jsx(S,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(B,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Cr=s.dt.div`
|
|
2205
2205
|
width: fit-content;
|
|
2206
2206
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2207
2207
|
border-radius: 4px;
|
|
@@ -2234,7 +2234,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2234
2234
|
&::-webkit-inner-spin-button {
|
|
2235
2235
|
opacity: 1;
|
|
2236
2236
|
}
|
|
2237
|
-
`,zr=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const u=i<0?0:i,[x,h]=f.useState(Number(a).toFixed(u)),b=f.useCallback(w=>{const j=s.lodashExports.toNumber(w.target.value);w.target.value.endsWith(".")?h(w.target.value):j>=Number(o)&&j<=Number(r)&&(h(String(j)),n&&c(s.lodashExports.toNumber(j.toFixed(u)))),w.stopPropagation()},[n,u,r,o,c]),$=f.useCallback(w=>{w.currentTarget.contains(w.relatedTarget)||h(Number(a).toFixed(u)),w.stopPropagation()},[u,a]),m=f.useCallback(w=>{w.stopPropagation(),w.key==="Enter"&&!s.lodashExports.isEmpty(w.currentTarget.value)&&c(s.lodashExports.toNumber(w.currentTarget.value))},[c]);return t.jsx(Cr,{onBlur:$,tabIndex:-1,children:t.jsx(G,{id:"numberInputTooltip",tip:d,children:t.jsx(Sr,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(x),max:r,min:o,name:l,onChange:b,onKeyUp:m,ref:g,step:10**-u,type:"number",value:x})})})}),Ir={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},He=({icon:e,label:n,onClick:i,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs(y,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx(y,{height:"24px",width:"24px",children:e===void 0?t.jsx(ee,{alt:`${r} Logo`,height:"100%",publicId:Ir[r],width:"100%"}):t.jsx(I,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx(y,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(S,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:n??r})})]})},Tr=({align:e="end",buttonLabel:n="Add Credential",children:i,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=f.useState(!1),p=f.useRef(null);ye(p.current,()=>{d(!1)},!0);const g=f.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),u=f.useCallback(()=>{d(h=>!h)},[d]),x=f.useCallback(h=>b=>{var $;($=o[h])==null||$.onClick(b),d(!1)},[o]);return t.jsxs(y,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(
|
|
2237
|
+
`,zr=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const u=i<0?0:i,[x,h]=f.useState(Number(a).toFixed(u)),b=f.useCallback(w=>{const j=s.lodashExports.toNumber(w.target.value);w.target.value.endsWith(".")?h(w.target.value):j>=Number(o)&&j<=Number(r)&&(h(String(j)),n&&c(s.lodashExports.toNumber(j.toFixed(u)))),w.stopPropagation()},[n,u,r,o,c]),$=f.useCallback(w=>{w.currentTarget.contains(w.relatedTarget)||h(Number(a).toFixed(u)),w.stopPropagation()},[u,a]),m=f.useCallback(w=>{w.stopPropagation(),w.key==="Enter"&&!s.lodashExports.isEmpty(w.currentTarget.value)&&c(s.lodashExports.toNumber(w.currentTarget.value))},[c]);return t.jsx(Cr,{onBlur:$,tabIndex:-1,children:t.jsx(G,{id:"numberInputTooltip",tip:d,children:t.jsx(Sr,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(x),max:r,min:o,name:l,onChange:b,onKeyUp:m,ref:g,step:10**-u,type:"number",value:x})})})}),Ir={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},He=({icon:e,label:n,onClick:i,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs(y,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx(y,{height:"24px",width:"24px",children:e===void 0?t.jsx(ee,{alt:`${r} Logo`,height:"100%",publicId:Ir[r],width:"100%"}):t.jsx(I,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx(y,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(S,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:n??r})})]})},Tr=({align:e="end",buttonLabel:n="Add Credential",children:i,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=f.useState(!1),p=f.useRef(null);ye(p.current,()=>{d(!1)},!0);const g=f.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),u=f.useCallback(()=>{d(h=>!h)},[d]),x=f.useCallback(h=>b=>{var $;($=o[h])==null||$.onClick(b),d(!1)},[o]);return t.jsxs(y,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(P,{icon:"plus",onClick:u,variant:"primary",children:n}),t.jsxs(y,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:a,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(He,{onClick:x(h),provider:h},h)),r===void 0?void 0:t.jsx(He,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),i]})]})},tn=t.jsx(y,{alignItems:"center",bgColor:z.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(S,{bgGradient:z.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),Fr=s.dt.div`
|
|
2238
2238
|
${({className:e,theme:n})=>`
|
|
2239
2239
|
align-items: flex-start;
|
|
2240
2240
|
border-radius: ${n.spacing[1]};
|
|
@@ -2300,7 +2300,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2300
2300
|
}
|
|
2301
2301
|
`}
|
|
2302
2302
|
`;const Nr={advanced:{title:"Advanced plan",benefits:"Leverage vulnerability scanning + AI + expert intelligence",buttonText:"Contact sales",description:"For teams that want to discover risk exposure with speed and accuracy.",priceGroup:"$1,579"},essential:{title:"Essential plan",benefits:"Leverage vulnerability scanning",buttonText:"Start a 21-day free trial",description:`For teams that want to discover risk exposure quickly
|
|
2303
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Rr=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=Nr[i],c=e??r;return t.jsxs(Fr,{className:i,children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&tn,t.jsx(
|
|
2303
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Rr=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=Nr[i],c=e??r;return t.jsxs(Fr,{className:i,children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&tn,t.jsx(_,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(S,{color:z.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(S,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(P,{onClick:n,variant:"primary",children:l})]})},nn=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),a=typeof n=="string",r=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(S,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(f.Fragment,{children:[t.jsx(oe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(r).map((o,l)=>n.includes(o)?t.jsx(oe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(S,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Er=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:u})=>{const x=s.nt(),{alt:h,src:b,width:$="77px",height:m="77px"}=d,w=f.useCallback(()=>{n==null||n.onClick()},[n]),j=f.useCallback(()=>{r==null||r.onClick()},[r]),v=t.jsx(y,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs(y,{bgColor:x.palette.white,border:`1px solid ${x.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,pb:2.5,pl:2.5,pr:2.5,pt:2.5,shadow:"lg",width:"100%",zIndex:11,children:[t.jsxs(y,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx(y,{children:t.jsx(ee,{alt:h,height:m,publicId:b,width:$})}),t.jsxs(y,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(_,{color:u,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(nn,{description:l,highlightDescription:c})]})]}),a&&t.jsx(y,{mb:1,scroll:"y",children:t.jsx(y,{height:"100%",children:a})}),t.jsxs(y,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(r)?t.jsx(P,{onClick:j,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,s.lodashExports.isObject(n)?t.jsx(P,{onClick:w,variant:(n==null?void 0:n.variant)??"tertiary",children:n==null?void 0:n.text},n==null?void 0:n.key):void 0]})]})});return e?ne.createPortal(v,o??document.body):v},Dr=s.dt.div`
|
|
2304
2304
|
${({theme:e})=>`
|
|
2305
2305
|
height: ${e.spacing[1]};
|
|
2306
2306
|
width: ${e.spacing[1]};
|
|
@@ -2457,7 +2457,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2457
2457
|
height: auto;
|
|
2458
2458
|
}
|
|
2459
2459
|
`}
|
|
2460
|
-
`,Xr=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),u=f.useRef(null),x=f.useCallback(h=>()=>{h(),r()},[r]);return f.useEffect(()=>{const h=["mousedown","touchstart"],b=$=>{var k;const m=$.target,w=document.getElementById("helpBtn"),j=document.getElementById("filterBtn"),v=(m===w||((w==null?void 0:w.contains(m))??!1)||m===j||(j==null?void 0:j.contains(m)))??!1;i&&!v&&!(((k=u.current)==null?void 0:k.contains(m))??!1)&&r()};return h.forEach($=>{document.addEventListener($,b,{passive:!0})}),()=>{h.forEach($=>{document.removeEventListener($,b)})}},[i,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(Kr,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:u,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs(y,{height:"100%",position:"relative",children:[t.jsxs(y,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(S,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(B,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs(y,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs(y,{py:1.25,children:[(a??[]).map(({customBadge:h,description:b,icon:$,onClick:m,requiresUpgrade:w,title:j})=>t.jsx(rn,{customBadge:h,description:b,icon:$,onClick:x(m),requiresUpgrade:w,title:j},j)),e&&t.jsx(y,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs(y,{alignItems:"center",bgColor:g.palette.white,borderColor:g.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(
|
|
2460
|
+
`,Xr=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),u=f.useRef(null),x=f.useCallback(h=>()=>{h(),r()},[r]);return f.useEffect(()=>{const h=["mousedown","touchstart"],b=$=>{var k;const m=$.target,w=document.getElementById("helpBtn"),j=document.getElementById("filterBtn"),v=(m===w||((w==null?void 0:w.contains(m))??!1)||m===j||(j==null?void 0:j.contains(m)))??!1;i&&!v&&!(((k=u.current)==null?void 0:k.contains(m))??!1)&&r()};return h.forEach($=>{document.addEventListener($,b,{passive:!0})}),()=>{h.forEach($=>{document.removeEventListener($,b)})}},[i,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(Kr,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:u,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs(y,{height:"100%",position:"relative",children:[t.jsxs(y,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(S,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(B,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs(y,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs(y,{py:1.25,children:[(a??[]).map(({customBadge:h,description:b,icon:$,onClick:m,requiresUpgrade:w,title:j})=>t.jsx(rn,{customBadge:h,description:b,icon:$,onClick:x(m),requiresUpgrade:w,title:j},j)),e&&t.jsx(y,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs(y,{alignItems:"center",bgColor:g.palette.white,borderColor:g.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(P,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(P,{onClick:l,type:"submit",children:o})]})]})]})})})},Jr=(e,n)=>n>=50?`
|
|
2461
2461
|
${e.palette.gray[200]} 50%,
|
|
2462
2462
|
${e.palette.primary[500]} 50.05%,
|
|
2463
2463
|
${e.palette.primary[500]} ${n}%,
|
|
@@ -2533,7 +2533,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2533
2533
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2534
2534
|
width: 59px;
|
|
2535
2535
|
`}
|
|
2536
|
-
`,on=({state:e,trackRef:n,index:i,name:a})=>{const r=f.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:n,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},to=(e,n,i)=>Math.round((i-e)/(n-e)*100),no=e=>{const n=s.nt(),i=f.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),u=to(r,o,g.getThumbValue(0)),{groupProps:x,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,i);return t.jsx(
|
|
2536
|
+
`,on=({state:e,trackRef:n,index:i,name:a})=>{const r=f.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:n,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},to=(e,n,i)=>Math.round((i-e)/(n-e)*100),no=e=>{const n=s.nt(),i=f.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),u=to(r,o,g.getThumbValue(0)),{groupProps:x,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,i);return t.jsx(H,{htmlFor:l,label:a,children:t.jsxs(y,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(Zr,{...x,$min:r??0,$value:u,className:"slider",children:[t.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:i,children:t.jsx(on,{index:0,name:l,state:g,trackRef:i})}),t.jsxs(Qr,{children:[t.jsx("p",{children:`${p.format(r)} (Low)`}),r<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${p.format(o)} (High)`})]})]}),t.jsx(eo,{children:t.jsx(S,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:io}=q(e=>({completed:`
|
|
2537
2537
|
background-color: ${e.palette.primary[500]};
|
|
2538
2538
|
color: ${e.palette.white};
|
|
2539
2539
|
|
|
@@ -2611,7 +2611,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2611
2611
|
|
|
2612
2612
|
${io(e,n)}
|
|
2613
2613
|
`}
|
|
2614
|
-
`,lo=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=f.useState(1),c=f.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(ao,{children:r.map((d,p)=>{const{content:g,title:u,nextAction:x,previousAction:h}=d,b=p+1,$=b===o?"current":"disabled",m=b<o?"completed":$;return t.jsxs(ro,{children:[t.jsx(y,{maxWidth:"40px",position:"relative",children:t.jsx(so,{$variant:m,children:m==="completed"?t.jsx(I,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs(y,{ml:1.5,width:"100%",children:[t.jsx(
|
|
2614
|
+
`,lo=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=f.useState(1),c=f.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(ao,{children:r.map((d,p)=>{const{content:g,title:u,nextAction:x,previousAction:h}=d,b=p+1,$=b===o?"current":"disabled",m=b<o?"completed":$;return t.jsxs(ro,{children:[t.jsx(y,{maxWidth:"40px",position:"relative",children:t.jsx(so,{$variant:m,children:m==="completed"?t.jsx(I,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs(y,{ml:1.5,width:"100%",children:[t.jsx(_,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:u}),m==="current"&&t.jsxs(y,{children:[g,t.jsxs(oo,{children:[o>1&&t.jsx(P,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<r.length?t.jsx(P,{disabled:d.isDisabledNext??!1,onClick:c(1,x),variant:"primary",children:"Next step"}):t.jsx(P,{disabled:e,onClick:a,type:i,variant:"primary",children:n})]})]})]})]},d.title)})})},co=s.dt.button`
|
|
2615
2615
|
${({theme:e})=>`
|
|
2616
2616
|
align-items: center;
|
|
2617
2617
|
background-color: ${e.palette.white};
|
|
@@ -2653,7 +2653,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2653
2653
|
background-color: ${e.palette.gray[100]};
|
|
2654
2654
|
}
|
|
2655
2655
|
`}
|
|
2656
|
-
`,po={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},go=({disabled:e=!1,icon:n,id:i,label:a,name:r,onClick:o,type:l="button",variant:c})=>{const d=s.nt(),p=t.jsxs(co,{"aria-label":r??void 0,className:c,disabled:e,id:i,onClick:o,type:l,children:[t.jsx(I,{clickable:!1,icon:n??po[c].icon,iconSize:r===void 0?"xxs":"xs",iconType:"fa-light"}),r??void 0]});return t.jsxs(y,{alignItems:"center",display:"flex",children:[p,a&&t.jsx(S,{color:d.palette.gray[800],ml:.5,size:"sm",children:a})]})},uo=({items:e})=>t.jsx(ma,{children:e.map(({isActive:n,label:i,onClick:a},r)=>t.jsx(ya,{className:n?"active":"",onClick:a,type:"button",children:t.jsx(
|
|
2656
|
+
`,po={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},go=({disabled:e=!1,icon:n,id:i,label:a,name:r,onClick:o,type:l="button",variant:c})=>{const d=s.nt(),p=t.jsxs(co,{"aria-label":r??void 0,className:c,disabled:e,id:i,onClick:o,type:l,children:[t.jsx(I,{clickable:!1,icon:n??po[c].icon,iconSize:r===void 0?"xxs":"xs",iconType:"fa-light"}),r??void 0]});return t.jsxs(y,{alignItems:"center",display:"flex",children:[p,a&&t.jsx(S,{color:d.palette.gray[800],ml:.5,size:"sm",children:a})]})},uo=({items:e})=>t.jsx(ma,{children:e.map(({isActive:n,label:i,onClick:a},r)=>t.jsx(ya,{className:n?"active":"",onClick:a,type:"button",children:t.jsx(_,{color:"inherit",fontWeight:"semibold",size:"sm",sizeSm:"xs",children:i})},`${i}-${r}`))}),xo=s.dt.div`
|
|
2657
2657
|
${({theme:e,$size:n})=>`
|
|
2658
2658
|
align-items: center;
|
|
2659
2659
|
background-color: ${e.palette.white};
|
|
@@ -2785,4 +2785,4 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2785
2785
|
color: ${e.palette.white};
|
|
2786
2786
|
}
|
|
2787
2787
|
`}
|
|
2788
|
-
`,yo=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{r(l),i(l)},[i]);return t.jsx(bo,{children:n.map((l,c)=>t.jsx($o,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(S,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},mo={content:"",disableBeacon:!0,hideCloseButton:!1,locale:{back:"Back",close:"Close",last:"Close",next:"Next",open:"Open the dialog",skip:"Skip"},showSkipButton:!0,styles:{buttonBack:{fontFamily:"roboto"},buttonNext:{fontFamily:"roboto"},buttonSkip:{fontFamily:"roboto"},options:{zIndex:9999},tooltipContainer:{fontFamily:"roboto",textAlign:"left"}},target:""},wo=({run:e,steps:n,onFinish:i})=>{const[a,r]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:p,index:g,status:u,type:x}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(x)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(r(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})};exports.Accordion=Wn;exports.AccordionContent=pt;exports.ActionButton=Be;exports.Alert=Yn;exports.AppliedFilter=ae;exports.AppliedFilters=Ma;exports.ArrayField=Ae;exports.Avatar=ti;exports.BaseButtonComponent=Ve;exports.BaseComponent=be;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=_e;exports.Button=
|
|
2788
|
+
`,yo=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{r(l),i(l)},[i]);return t.jsx(bo,{children:n.map((l,c)=>t.jsx($o,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(S,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},mo={content:"",disableBeacon:!0,hideCloseButton:!1,locale:{back:"Back",close:"Close",last:"Close",next:"Next",open:"Open the dialog",skip:"Skip"},showSkipButton:!0,styles:{buttonBack:{fontFamily:"roboto"},buttonNext:{fontFamily:"roboto"},buttonSkip:{fontFamily:"roboto"},options:{zIndex:9999},tooltipContainer:{fontFamily:"roboto",textAlign:"left"}},target:""},wo=({run:e,steps:n,onFinish:i})=>{const[a,r]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:p,index:g,status:u,type:x}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(x)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(r(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})};exports.Accordion=Wn;exports.AccordionContent=pt;exports.ActionButton=Be;exports.Alert=Yn;exports.AppliedFilter=ae;exports.AppliedFilters=Ma;exports.ArrayField=Ae;exports.Avatar=ti;exports.BaseButtonComponent=Ve;exports.BaseComponent=be;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=_e;exports.Button=P;exports.Button$1=ve;exports.ButtonToolbarCenter=Si;exports.ButtonToolbarRow=Ii;exports.ButtonToolbarStartRow=zi;exports.Calendar=yt;exports.Calendar$1=kt;exports.Calendar$2=St;exports.CalendarCell=$t;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=ai;exports.CardWithInput=Yi;exports.CardWithOptions=Nt;exports.CardWithSelector=ea;exports.CardWithSwitch=ia;exports.Carousel=ca;exports.Checkbox=Ne;exports.CodeSnippet=pa;exports.Col=Pe;exports.ColumFilters=Jt;exports.ColumnsModal=Na;exports.ComboBox=ht;exports.ComboBoxField=Le;exports.Container=y;exports.CustomThemeProvider=Fn;exports.DateField=wt;exports.DateSelector=se;exports.Description=nn;exports.Dialog=Te;exports.Divider=te;exports.Editable=Ci;exports.EmptyButton=Oe;exports.EmptyState=qa;exports.FilePreview=xt;exports.FilterControl=Yt;exports.FilterForm=Me;exports.FilterFormContent=qt;exports.FiltersList=Xt;exports.FixedTabs=uo;exports.Form=Ja;exports.Gap=Ni;exports.GridContainer=Qa;exports.GroupSelector=tr;exports.Header=Ie;exports.Header$1=Mt;exports.Heading=_;exports.Icon=I;exports.IconButton=B;exports.IndicatorCard=nr;exports.InfoSidebar=ir;exports.InnerForm=Ka;exports.Input=Fe;exports.InputArray=Ei;exports.InputDate=vt;exports.InputDateRange=Ct;exports.InputDateTime=ki;exports.InputFile=Ai;exports.InputNumber=Tt;exports.InputNumberRange=Ft;exports.InputTags=Bi;exports.Label=Ge;exports.Link=Z;exports.ListItem=me;exports.ListItemsWrapper=Vt;exports.LittleFlag=rr;exports.Loading=ur;exports.LocationCode=At;exports.Logo=fr;exports.Lottie=br;exports.MemoizedImage=ee;exports.Menu=$r;exports.MenuItem=rn;exports.MessageBanner=mr;exports.Modal=Qt;exports.ModalConfirm=$a;exports.ModalFooter=Bt;exports.Notification=kr;exports.NotificationSign=Ot;exports.NumberField=Ce;exports.NumberInput=zr;exports.OAuthSelector=Tr;exports.Option=ft;exports.OptionBoxContainer=Je;exports.OptionContainer=He;exports.OptionContainer$1=en;exports.OutlineContainer=H;exports.PhoneInput=Ui;exports.PlanCard=Rr;exports.PopUp=Er;exports.Popover=$e;exports.PremiumFeature=an;exports.PreviewPanel=_t;exports.PriorityScore=Lr;exports.ProgressBar=Mr;exports.RadioButton=qe;exports.RecommendedTag=tn;exports.Row=zt;exports.ScrollUpButton=Hr;exports.Search=le;exports.SearchPanel=Gt;exports.SeverityBadge=_r;exports.SeverityOverview=Gr;exports.SeverityOverviewBadge=re;exports.ShowOnHover=qr;exports.SlideOutMenu=Xr;exports.Slider=no;exports.Span=oe;exports.StepLapse=lo;exports.Tab=Ht;exports.TableButton=go;exports.Tabs=Xe;exports.Tag=K;exports.TagsField=We;exports.Text=S;exports.TextArea=Gi;exports.Thumb=on;exports.TimeField=jt;exports.TimeLine=ho;exports.TimeLineCard=sn;exports.Toggle=Lt;exports.ToggleButton=yo;exports.Tooltip=G;exports.Tour=wo;exports.baseStep=mo;exports.formatCheckValues=Zt;exports.getStyledConfig=he;exports.hiddenProps=ct;exports.icons=In;exports.setBorder=ge;exports.setDisplay=ue;exports.setInteraction=fe;exports.setMargin=de;exports.setPadding=ce;exports.setPosition=pe;exports.setText=xe;exports.theme=z;exports.uniqueIcons=Tn;exports.useCarousel=Rt;exports.useClickOutside=ye;exports.useCloudinaryImage=Et;exports.useColumnsModal=Ki;exports.useConfirmDialog=_a;exports.useDebouncedCallback=Dt;exports.useFilterForm=Kt;exports.useFilters=Va;exports.useModal=Re;exports.useSearch=Xi;exports.variantBuilder=q;
|