@fluidattacks/design 3.16.0-pr-08 → 3.16.0-pr-09
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.d.ts +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.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.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-BhWkZTgc.js → components-D1ccInsP.js} +33 -33
- package/dist/{components-Uphkmbps.mjs → components-DTNk_OJb.mjs} +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),x=require("react"),s=require("./vendor-C1dWvaay.js"),ne=require("react-dom"),De=require("react-router-dom"),q=e=>({getVariant:(n,i)=>e(n)[i]}),dt=["padding","px","py","pl","pr","pt","pb","margin","mx","my","ml","mr","mt","mb","zIndex","position","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","scroll","visibility","display","height","width","maxHeight","maxWidth","minHeight","minWidth","shadow","bgColor","bgGradient","gap","flexDirection","flexGrow","justify","justifySelf","alignItems","alignSelf","wrap","color","fontFamily","fontSize","fontWeight","textAlign","whiteSpace","letterSpacing","lineSpacing","textDecoration","textOverflow","whiteSpace","wordBreak","wordWrap","cursor","transition","borderColorHover","bgColorHover","shadowHover"],fn={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},hn={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},bn={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},$n={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},yn={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},mn={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},wn={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),x=require("react"),s=require("./vendor-C1dWvaay.js"),ne=require("react-dom"),De=require("react-router-dom"),q=e=>({getVariant:(n,i)=>e(n)[i]}),dt=["padding","px","py","pl","pr","pt","pb","margin","mx","my","ml","mr","mt","mb","zIndex","position","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","scroll","visibility","display","height","width","maxHeight","maxWidth","minHeight","minWidth","shadow","bgColor","bgGradient","gap","flexDirection","flexGrow","justify","justifySelf","alignItems","alignSelf","wrap","color","fontFamily","fontSize","fontWeight","textAlign","whiteSpace","letterSpacing","lineSpacing","textDecoration","textOverflow","whiteSpace","wordBreak","wordWrap","cursor","transition","borderColorHover","bgColorHover","shadowHover"],fn={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},hn={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},bn={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},$n={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},yn={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},mn={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},wn={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},vn={"01":"linear-gradient(45deg, #f32637 0%, #b8075d 100%)","02":"linear-gradient(45deg, #fcfcfd 0%, #667085 100%)"},jn={type:{primary:"Roboto, sans-serif",poppins:"'Poppins', sans-serif",mono:"'Space Mono', monospace"},heading:{xxl:"64px",xl:"48px",lg:"32px",md:"24px",sm:"20px",xs:"16px"},text:{xl:"20px",lg:"18px",md:"16px",sm:"14px",xs:"12px"},weight:{bold:"700",semibold:"600",regular:"400"}},kn={none:"none",sm:"0px 1px 2px 0px rgba(16, 24, 40, 0.15)",md:"0px 4px 6px 0px rgba(16, 24, 40, 0.15)",lg:"0px 8px 24px 0px rgba(16, 24, 40, 0.15)"},Cn={mobile:"480px",tablet:"960px",sm:"1024px",md:"1440px",lg:"1920px"},Sn={0:"0rem",.125:"0.125rem",.188:"0.188rem",.25:"0.25rem",.5:"0.5rem",.625:"0.625rem",.75:"0.75rem",1:"1rem",1.25:"1.25rem",1.5:"1.5rem",1.75:"1.75rem",2:"2rem",2.25:"2.25rem",2.5:"2.5rem",3:"3rem",3.5:"3.5rem",4:"4rem",4.5:"4.5rem",5:"5rem",6:"6rem"},zn=["lock-keyhole","bars-sort","bolt","books","brain-circuit","briefcase","bug","buildings","bullseye-pointer","calendar-clock","calendar-xmark","chart-network","clipboard-check","comment","envelope","eye","file","flag","globe","hand-holding-dollar","hands-clapping","headset","hexagon-exclamation","light-emergency-on","magnifying-glass","pen-line","plane-departure","screwdriver-wrench","sensor-triangle-exclamation","shield-check","sidebar","skull","sliders","star-christmas","telescope","trash","unlock","user-group","user-hoodie","xmark"],In=[["fal","arrow-down"],["fal","arrow-left"],["fal","arrow-right"],["fal","arrow-up"],["fal","plus"],["fal","minus"],["fas","check"],["fas","circle-question"]],z={typography:jn,shadows:kn,breakpoints:Cn,spacing:Sn,palette:{primary:hn,complementary:bn,error:$n,info:wn,warning:yn,success:mn,black:"#0c111d",white:"#ffffff",gray:fn,gradients:vn}},Tn=({children:e})=>t.jsx(s.ot,{theme:z,children:e}),F=(e,n)=>n===void 0?"":`${e}: ${n};`,ce=e=>{const n=e.py??e.pt??0,i=e.px??e.pr??0,r=e.py??e.pb??0,a=e.px??e.pl??0;if(e.padding){const[o,c,l,d]=e.padding;return`padding: ${z.spacing[o]} ${z.spacing[c]} ${z.spacing[l]} ${z.spacing[d]};`}return`padding: ${z.spacing[n]} ${z.spacing[i]} ${z.spacing[r]} ${z.spacing[a]};`},de=e=>{const n=e.my??e.mt??0,i=e.mx??e.mr??0,r=e.my??e.mb??0,a=e.mx??e.ml??0;if(e.margin){const[o,c,l,d]=e.margin;return`margin: ${z.spacing[o]} ${z.spacing[c]} ${z.spacing[l]} ${z.spacing[d]};`}return`margin: ${z.spacing[n]} ${z.spacing[i]} ${z.spacing[r]} ${z.spacing[a]};`},pe=e=>{const n=F("position",e.position),i=F("top",e.top),r=F("right",e.right),a=F("bottom",e.bottom),o=F("left",e.left),c=F("z-index",e.zIndex);return`
|
|
2
2
|
${n}
|
|
3
3
|
${i}
|
|
4
4
|
${r}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`},Fn=e=>e.includes("x")?"overflow-x: auto;":"",Nn=e=>e.includes("y")?"overflow-y: auto;":"",ue=e=>{const n=e.scroll?`
|
|
17
17
|
${Fn(e.scroll)}
|
|
18
18
|
${Nn(e.scroll)}
|
|
19
|
-
`:"",i=F("visibility",e.visibility),r=F("display",e.display),a=F("height",e.height),o=F("width",e.width),c=F("max-height",e.maxHeight),l=F("max-width",e.maxWidth),d=F("min-height",e.minHeight),p=F("min-width",e.minWidth),g=F("box-shadow",e.shadow?z.shadows[e.shadow]:void 0),u=F("gap",e.gap===void 0?void 0:z.spacing[e.gap]),f=F("background-color",e.bgColor),h=F("background",e.bgGradient),$=F("flex-direction",e.flexDirection),m=F("flex-grow",e.flexGrow),b=F("justify-content",e.justify),w=F("justify-self",e.justifySelf),
|
|
19
|
+
`:"",i=F("visibility",e.visibility),r=F("display",e.display),a=F("height",e.height),o=F("width",e.width),c=F("max-height",e.maxHeight),l=F("max-width",e.maxWidth),d=F("min-height",e.minHeight),p=F("min-width",e.minWidth),g=F("box-shadow",e.shadow?z.shadows[e.shadow]:void 0),u=F("gap",e.gap===void 0?void 0:z.spacing[e.gap]),f=F("background-color",e.bgColor),h=F("background",e.bgGradient),$=F("flex-direction",e.flexDirection),m=F("flex-grow",e.flexGrow),b=F("justify-content",e.justify),w=F("justify-self",e.justifySelf),v=F("align-items",e.alignItems),j=F("align-self",e.alignSelf),k=F("flex-wrap",e.wrap);return`
|
|
20
20
|
${n}
|
|
21
21
|
${i}
|
|
22
22
|
${r}
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
${m}
|
|
35
35
|
${b}
|
|
36
36
|
${w}
|
|
37
|
-
${j}
|
|
38
37
|
${v}
|
|
38
|
+
${j}
|
|
39
39
|
${k}
|
|
40
40
|
`},xe=e=>{const n=F("color",e.color),i=F("font-family",e.fontFamily),r=F("font-size",e.fontSize),a=F("font-weight",e.fontWeight),o=F("line-spacing",e.letterSpacing),c=F("line-height",e.lineSpacing),l=F("text-align",e.textAlign),d=F("text-decoration",e.textDecoration),p=F("text-overflow",e.textOverflow),g=F("white-space",e.whiteSpace),u=F("word-break",e.wordBreak),f=F("word-wrap",e.wordWrap);return`
|
|
41
41
|
${n}
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
|
|
179
179
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
180
180
|
`}
|
|
181
|
-
`,G=x.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:c,fontWeight:l,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:f,sizeSm:h,textFill:$,whiteSpace:m,wordBreak:b,...w},
|
|
181
|
+
`,G=x.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:c,fontWeight:l,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:f,sizeSm:h,textFill:$,whiteSpace:m,wordBreak:b,...w},v){return t.jsx(Rn,{$bgGradient:n,$color:a,$display:o,$fontFamily:c,$fontWeight:l,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:u,$sizeMd:f,$sizeSm:h,$textFill:$,$whiteSpace:m,$wordBreak:b,className:r,ref:v,...w,children:i})}),oe=x.forwardRef(function({children:n,color:i,content:r,display:a,fontFamily:o,fontWeight:c,letterSpacing:l,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:f,...h},$){return t.jsx(Dn,{$color:i,$content:r,$display:a,$fontFamily:o,$fontWeight:c,$letterSpacing:l,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:f,ref:$,...h,children:n})}),C=x.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:c,fontWeight:l,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:f,sizeSm:h,textFill:$,whiteSpace:m,wordBreak:b,...w},v){return t.jsx(pt,{$bgGradient:n,$color:a,$display:o,$fontFamily:c,$fontWeight:l,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:u,$sizeMd:f,$sizeSm:h,$textFill:$,$whiteSpace:m,$wordBreak:b,className:r,ref:v,...w,children:i})}),gt=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(C,{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]})},Ln={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Pn=s.dt(Ue)`
|
|
182
182
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:r,$rotation:a,$size:o,$secondaryColor:c})=>{const l=r?"":"brightness(50%)",d=r??"";return`
|
|
183
183
|
color: ${n};
|
|
184
184
|
cursor: ${e?"pointer":"inherit"};
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
width: max-content;
|
|
415
415
|
z-index: 999999;
|
|
416
416
|
`}
|
|
417
|
-
`,U=({children:e,disabled:n=!1,display:i="inline-block",height:r,icon:a,iconColor:o,iconSize:c,id:l,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:$})=>{const m=s.nt(),[b,w]=x.useState(!1),{refs:
|
|
417
|
+
`,U=({children:e,disabled:n=!1,display:i="inline-block",height:r,icon:a,iconColor:o,iconSize:c,id:l,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:$})=>{const m=s.nt(),[b,w]=x.useState(!1),{refs:v,floatingStyles:j,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:w,open:b,placement:g,whileElementsMounted:s.autoUpdate}),T=s.useHover(k,{delay:{close:0,open:500},move:!1}),S=s.useFocus(k),N=s.useRole(k,{role:a?"label":"tooltip"}),{getReferenceProps:E,getFloatingProps:A}=s.useInteractions([T,S,N]);return n?t.jsx(x.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(_n,{...E(),display:i,height:r,id:l,ref:v.setReference,width:$,children:a?t.jsx(I,{clickable:!0,disabled:n,icon:a,iconColor:o,iconSize:c??"xxs",iconType:b?"fa-solid":"fa-light"}):e}),b&&!h&&ne.createPortal(t.jsxs(Gn,{...A(),$maxWidth:d,id:`floating-${l}`,ref:v.setFloating,style:j,children:[s.lodashExports.isEmpty(f)?void 0:t.jsx(C,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),s.lodashExports.isEmpty(u)?void 0:t.jsx(C,{color:m.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=x.forwardRef(function({borderRadius:n,disabled:i,icon:r,iconColor:a,iconSize:o="xxs",iconTransform:c,iconType:l,id:d,justify:p="center",onClick:g,px:u,py:f,type:h="button",tooltip:$,tooltipPlace:m,value:b,variant:w="primary",...v},j){const k=t.jsx(Vn,{$borderRadius:n,$px:u,$py:f,$variant:w,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:p,onClick:g,ref:j,type:h,value:b,...v,children:t.jsx(I,{clickable:!1,icon:r,iconColor:a,iconSize:o,iconTransform:c,iconType:l})}),S=(h+(w??"")+(d??r)).replace(/ /u,"_");return $===void 0?k:t.jsx(U,{id:`${S}-tooltip`,place:m,tip:$,children:k})}),Un=x.forwardRef(function({autoHide:n=!1,children:i,closable:r=!1,onTimeOut:a,show:o=!0,time:c=8,variant:l="error",id:d,...p},g){const[u,f]=x.useState(o),h=x.useCallback(()=>{f(!1)},[]);return x.useEffect(()=>{const $=setTimeout(()=>{a==null||a(!0),n&&h()},c*1e3);return()=>{clearTimeout($)}},[n,h,c,a]),x.useEffect(()=>{f(o)},[o,f]),t.jsx(y,{display:u?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(Hn,{$variant:l,id:d,children:[t.jsx(I,{clickable:!1,icon:Wn(l),iconSize:"xs",iconType:"fa-light"}),t.jsx(Mn,{children:i}),r?t.jsx(B,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),tt=s.dt.div`
|
|
418
418
|
${({theme:e})=>`
|
|
419
419
|
align-items: center;
|
|
420
420
|
background-color: ${e.palette.gray[200]};
|
|
@@ -632,7 +632,7 @@
|
|
|
632
632
|
${xt}
|
|
633
633
|
`,Jn=s.dt(De.Link)`
|
|
634
634
|
${xt}
|
|
635
|
-
`,Z=({children:e,color:n,download:i,href:r,iconPosition:a="right",onClick:o,target:c,variant:l="lowRelevance"})=>{const d=r.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:l,download:i,href:r,onClick:o,rel:"nofollow noopener noreferrer",target:c??"_blank",children:[a==="left"?p:void 0,e,a==="right"?p:void 0]}):t.jsxs(Jn,{$variant:l,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:c,to:r,children:[c!==void 0&&a==="left"?p:void 0,e,c!==void 0&&a==="right"?p:void 0]})},K=({disabled:e,icon:n,iconColor:i="inherit",iconType:r="fa-light",id:a="close-tag",filterValues:o="",fontSize:c,href:l,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const $=f.length>25&&s.lodashExports.isEmpty(u+o),m=`${f.slice(0,25)}...`;return t.jsxs(oe,{className:"gap-0.5",display:l===void 0?"initial":"flex",size:"sm",children:[t.jsxs(Kn,{$fontSize:c,$variant:h,className:g,children:[n&&t.jsx(I,{icon:n,iconColor:i,iconSize:"xxs",iconType:r}),t.jsxs("span",{children:[t.jsx("strong",{children:u}),t.jsx("span",{children:$?m:f}),t.jsx("strong",{children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:a,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),l===void 0?void 0:t.jsx(Z,{href:l,children:d})]})},Qn=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},L=x.forwardRef(function({children:n,disabled:i=!1,external:r=!1,fontSize:a,href:o,id:c,icon:l,name:d,onClick:p,showArrow:g=!1,tag:u,type:f="button",tooltip:h,tooltipPlace:$="bottom",underline:m=!1,value:b,variant:w="primary",width:j
|
|
635
|
+
`,Z=({children:e,color:n,download:i,href:r,iconPosition:a="right",onClick:o,target:c,variant:l="lowRelevance"})=>{const d=r.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:l,download:i,href:r,onClick:o,rel:"nofollow noopener noreferrer",target:c??"_blank",children:[a==="left"?p:void 0,e,a==="right"?p:void 0]}):t.jsxs(Jn,{$variant:l,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:c,to:r,children:[c!==void 0&&a==="left"?p:void 0,e,c!==void 0&&a==="right"?p:void 0]})},K=({disabled:e,icon:n,iconColor:i="inherit",iconType:r="fa-light",id:a="close-tag",filterValues:o="",fontSize:c,href:l,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const $=f.length>25&&s.lodashExports.isEmpty(u+o),m=`${f.slice(0,25)}...`;return t.jsxs(oe,{className:"gap-0.5",display:l===void 0?"initial":"flex",size:"sm",children:[t.jsxs(Kn,{$fontSize:c,$variant:h,className:g,children:[n&&t.jsx(I,{icon:n,iconColor:i,iconSize:"xxs",iconType:r}),t.jsxs("span",{children:[t.jsx("strong",{children:u}),t.jsx("span",{children:$?m:f}),t.jsx("strong",{children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:a,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),l===void 0?void 0:t.jsx(Z,{href:l,children:d})]})},Qn=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},L=x.forwardRef(function({children:n,disabled:i=!1,external:r=!1,fontSize:a,href:o,id:c,icon:l,name:d,onClick:p,showArrow:g=!1,tag:u,type:f="button",tooltip:h,tooltipPlace:$="bottom",underline:m=!1,value:b,variant:w="primary",width:v,...j},k){const T=h!==void 0,S=`${c}-tooltip`,N=x.useCallback(()=>{o&&Qn(o,r)},[r,o]),E=t.jsxs(ut,{$size:a,$variant:w,"aria-disabled":i,className:m?"underline":void 0,disabled:i,id:c,name:d,onClick:w==="link"?N:p,ref:k,type:f,value:b,width:v,...T?{"data-tooltip-id":S}:{},...j,children:[l!==void 0&&t.jsx(I,{icon:l,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 T?t.jsx(U,{disabled:!T,id:S,place:$,tip:h,width:v,children:E}):E}),ei=x.forwardRef(function({children:n,onClick:i,userName:r,showIcon:a=!1,showUsername:o=!1},c){const l=!!i;return t.jsx(y,{id:"navbar-user-profile",ref:c,zIndex:9999,children:t.jsxs(y,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[l?t.jsxs(L,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(tt,{children:r[0].toUpperCase()}),o?t.jsx(C,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:r.split(" ")[0]}):void 0,a?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(tt,{children:r[0].toUpperCase()}),o?t.jsxs(C,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",r.split(" ")[0],"!"]}):void 0,a?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(Yn,{children:n})]})})}),Se=({authorEmail:e,date:n,description:i,descriptionColor:r,id:a,title:o,titleColor:c,textAlign:l,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs(y,{width:"100%",children:[typeof o=="string"?t.jsx(C,{color:c??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:l,wordBreak:"break-word",children:o}):o,t.jsxs(y,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(C,{color:r??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:l,wordBreak:"break-word",children:i}),n&&t.jsx(C,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:l,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(C,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:l,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(U,{icon:"circle-info",id:a,tip:p})]})]})},nt=s.dt(y).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
636
636
|
& img {
|
|
637
637
|
display: block;
|
|
638
638
|
}
|
|
@@ -859,7 +859,7 @@
|
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
861
|
`}
|
|
862
|
-
`,ht=({item:e,state:n})=>{const i=s.nt(),r=x.useRef(null),{optionProps:a,isSelected:o,isFocused:c,isDisabled:l}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,r),d=[o?"selected":"",c?"focused":"",l?"disabled":""].join(" ");return t.jsxs(si,{...a,className:d,ref:r,children:[t.jsx(C,{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:r,helpLinkText:a,helpText:o,label:c,loadingItems:l,name:d,items:p,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:$,value:m,weight:b})=>{var et;const w=s.nt(),
|
|
862
|
+
`,ht=({item:e,state:n})=>{const i=s.nt(),r=x.useRef(null),{optionProps:a,isSelected:o,isFocused:c,isDisabled:l}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,r),d=[o?"selected":"",c?"focused":"",l?"disabled":""].join(" ");return t.jsxs(si,{...a,className:d,ref:r,children:[t.jsx(C,{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:r,helpLinkText:a,helpText:o,label:c,loadingItems:l,name:d,items:p,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:$,value:m,weight:b})=>{var et;const w=s.nt(),v=n?void 0:i,j=(e==null?void 0:e.value)??m,[k,T]=x.useState(((et=p.find(D=>D.value===j))==null?void 0:et.name)??""),[S,N]=x.useState(j),[E,A]=x.useState(p),[R,P]=x.useState(!1),{contains:O}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),Y=x.useRef(null),V=x.useRef(null),W=x.useRef(null),M=x.useRef(null),Q=x.useRef(null),Re=x.useMemo(()=>p.map(D=>O(D.name,k)||R?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:D.name},D.value):null),[O,k,p,R]),sn=x.useCallback(D=>{T(D),D===""?P(!0):(P(!1),N(_=>{const we=D===""?"":_;return e&&e.onChange(we),u&&u(D),we}),A(p.filter(_=>O(_.name,D))))},[O,p,e,u]),ln=x.useCallback(D=>{var _;T(((_=p.find(we=>we.value===D))==null?void 0:_.name)??""),N(D?String(D):""),e&&e.onChange(D),u&&u(D?String(D):""),A(p)},[p,e,u]),Qe=x.useCallback(D=>{D.key==="Enter"&&D.preventDefault(),P(!1)},[]),cn=x.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),X=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:k,items:E,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:S,onBlur:cn,onInputChange:sn,onKeyDown:Qe,onKeyUp:()=>{P(!0)},onOpenChange(D,_){P(D&&(_==="manual"||_==="focus"))},onSelectionChange:ln,children:Re}),{buttonProps:dn,inputProps:pn,listBoxProps:gn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:k,buttonRef:V,id:d,inputRef:Y,label:c??d,listBoxRef:W,name:d,placeholder:f,popoverRef:Q},X),{listBoxProps:un}=s.$c132121280ec012d$export$50eacbbf140a3141(gn,X,W),{buttonProps:xn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(dn,V);return x.useEffect(()=>{var D;(l===!1||!j)&&T(((D=p.find(_=>_.value===j))==null?void 0:D.name)??"")},[j,p,l]),t.jsxs(H,{error:v,helpLink:r,helpLinkText:a,helpText:o,htmlFor:d,label:c,required:h,tooltip:$,weight:b,children:[t.jsxs(J,{className:`${n?"disabled":""} ${v?"error":""}`,ref:M,children:[t.jsx("input",{...pn,"aria-invalid":v?"true":"false","aria-label":d,onKeyDown:Qe,ref:Y}),v?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}):void 0,t.jsx(B,{...xn,className:"action",icon:X.isOpen?"chevron-up":"chevron-down",iconColor:w.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:V,type:"button",variant:"ghost"})]}),X.isOpen&&X.collection.size>0&&!n?t.jsx($e,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:Q,state:X,triggerRef:M,children:t.jsx(oi,{...un,ref:W,children:[...X.collection].map(D=>t.jsx(ht,{item:D,state:X},D.key))})}):null]})},bt=({control:e,disabled:n=!1,error:i,helpLink:r,helpLinkText:a,helpText:o,label:c,loadingItems:l,name:d,items:p,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:$,value:m,weight:b})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:w,fieldState:v})=>{var j;return t.jsx(Le,{disabled:n,error:(j=v.error)==null?void 0:j.message,field:w,helpLink:r,helpLinkText:a,helpText:o,items:p,label:c,loadingItems:l,name:d,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:$,value:m,weight:b})},rules:{required:h}}):t.jsx(Le,{disabled:n,error:i,helpLink:r,helpLinkText:a,helpText:o,items:p,label:c,loadingItems:l,name:d,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:$,value:m,weight:b}),li=s.dt.div`
|
|
863
863
|
${({theme:e})=>`
|
|
864
864
|
align-items: center;
|
|
865
865
|
color: ${e.palette.gray[800]};
|
|
@@ -1091,7 +1091,7 @@
|
|
|
1091
1091
|
font-weight: ${e.typography.weight.bold};
|
|
1092
1092
|
}
|
|
1093
1093
|
`}
|
|
1094
|
-
`,
|
|
1094
|
+
`,je=({disabled:e=!1,icon:n,props:i})=>{const r=x.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,r);return t.jsx(fi,{...a,$disabled:e,$focus:!!a["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:r,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:r})=>{const a=e.focusedDate,o=x.useCallback(()=>{e.setFocusedDate(a.add({years:1}))},[a,e]),c=x.useCallback(()=>{e.setFocusedDate(a.subtract({years:1}))},[a,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(je,{icon:"chevron-left",props:n}),t.jsxs(li,{children:[r,t.jsxs(ci,{children:[t.jsx(rt,{"aria-label":"top",onClick:o,children:t.jsx(I,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(rt,{"aria-label":"bottom",onClick:c,children:t.jsx(I,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(je,{icon:"chevron-right",props:i})]})},mt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:o,title:c}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,r);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:a,state:r,title:c}),t.jsx(ze,{state:r}),t.jsx(qe,{children:t.jsx(L,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wt=({segment:e,state:n})=>{const i=s.nt(),r=x.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:c}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,r),l=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...c,className:"segment-cell"},ref:r,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:l},children:o.isPlaceholder?o.placeholder:o.text})},vt=({disabled:e,error:n=!1,props:i})=>{const r=s.nt(),a=x.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:c}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,a),l=x.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(hi,{...c,onClick:l,children:[t.jsx("div",{className:"flex flex-row",style:{color:r.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(wt,{segment:{...d,isEditable:!e},state:o},g)})}),n?t.jsx(I,{icon:"exclamation-circle",iconColor:r.palette.error[500],iconSize:"xs"}):void 0]})},jt=e=>{const n=x.useRef(null),i=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:r}=i,a=!s.lodashExports.isNil(r)&&r.hour<12?"AM":"PM",[o,c]=x.useState(s.lodashExports.isNil(r)?"AM":a),{fieldProps:l}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=x.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(r)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),c(g)},[o,i,r]);return t.jsxs(bi,{children:[t.jsx(at,{...l,ref:n,children:i.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return t.jsx(wt,{segment:p,state:i},u)})}),t.jsxs(at,{children:[t.jsx(ot,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(ot,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",$i=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",yi=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",se=({error:e,buttonProps:n,datePickerRef:i,disabled:r=!1,granularity:a="day",fieldProps:o,groupProps:c,name:l,register:d,required:p,setValue:g,value:u})=>{const f=x.useCallback(h=>{const $=a==="day"?ke(String(h)):$i(String(h));o.onChange&&o.onChange(h??null),g&&g(l,$)},[o,a,l,g]);return t.jsxs(J,{...c,className:`${r?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(vt,{disabled:r,error:e!=null,props:{...o,autoFocus:!1,granularity:a,onChange:f,shouldForceLeadingZeros:!0}}),t.jsx(je,{disabled:r,icon:a==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(l,{required:p}),"aria-label":l,className:"date-input",disabled:r,id:l,name:l,type:"text",value:u??""})]})},Te=({children:e,...n})=>{const i=x.useRef(null),{dialogProps:r}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(xi,{...r,ref:i,children:e})},kt=({disabled:e=!1,error:n,helpLink:i,helpLinkText:r,helpText:a,required:o,label:c,name:l,register:d,setValue:p,tooltip:g,watch:u,...f})=>{const h=x.useRef(null),$=u==null?void 0:u(l),m=x.useCallback(N=>{p&&N&&p(l,ke(String(N)))},[l,p]),b=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,onChange(N){m(N)},value:s._.isNil($)||s._.isEmpty($)||$==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e($.replace(/\//gu,"-"))}),{close:w}=b,{groupProps:v,fieldProps:j,buttonProps:k,dialogProps:T,calendarProps:S}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":c??l,name:l},b,h);return t.jsxs(H,{error:n,helpLink:i,helpLinkText:r,helpText:a,htmlFor:l,label:c,required:o,tooltip:g,children:[t.jsx(se,{buttonProps:k,datePickerRef:h,disabled:e,error:n,fieldProps:j,groupProps:v,name:l,register:d,required:o,setValue:p,value:$}),b.isOpen&&!e?t.jsx($e,{offset:8,placement:"bottom start",state:b,triggerRef:h,children:t.jsx(Te,{...T,children:t.jsx(mt,{onClose:w,props:S})})}):null]})},Ct=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=x.useRef(null),a=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:o,nextButtonProps:c,title:l}=s.$46a4342aab3d8076$export$87e0539f600c24e5(n,a,r);return t.jsxs("div",{className:"calendar-range",ref:r,children:[t.jsx(Ie,{nextButtonProps:c,prevButtonProps:o,state:a,title:l}),t.jsx(ze,{state:a}),t.jsx(qe,{children:t.jsx(L,{onClick:e,variant:"ghost",children:"Cancel"})})]})},mi=s.dt.div`
|
|
1095
1095
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1096
1096
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1097
1097
|
display: flex;
|
|
@@ -1102,7 +1102,7 @@
|
|
|
1102
1102
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1103
1103
|
}
|
|
1104
1104
|
`}
|
|
1105
|
-
`,St=({disabled:e=!1,error:n,label:i,name:r,required:a,tooltip:o,register:c,setValue:l,propsMax:d,propsMin:p,variant:g="default",...u})=>{const f=`${r}Max`,h=`${r}Min`,$=x.useRef(null),m=x.useCallback(E=>{l&&E&&(l((d==null?void 0:d.name)??f,ke(String(E.end))),l((p==null?void 0:p.name)??h,ke(String(E.start))))},[f,h,l,d,p]),b=s.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??f,startName:(p==null?void 0:p.name)??h,onChange(E){m(E)}}),{close:w}=b,{groupProps:
|
|
1105
|
+
`,St=({disabled:e=!1,error:n,label:i,name:r,required:a,tooltip:o,register:c,setValue:l,propsMax:d,propsMin:p,variant:g="default",...u})=>{const f=`${r}Max`,h=`${r}Min`,$=x.useRef(null),m=x.useCallback(E=>{l&&E&&(l((d==null?void 0:d.name)??f,ke(String(E.end))),l((p==null?void 0:p.name)??h,ke(String(E.start))))},[f,h,l,d,p]),b=s.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??f,startName:(p==null?void 0:p.name)??h,onChange(E){m(E)}}),{close:w}=b,{groupProps:v,startFieldProps:j,endFieldProps:k,buttonProps:T,dialogProps:S,calendarProps:N}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":i??r},b,$);return t.jsxs(H,{error:n,htmlFor:r,label:i,required:a,tooltip:o,children:[t.jsxs(mi,{$disabled:e,$show:n!==void 0,ref:$,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(se,{buttonProps:T,datePickerRef:$,disabled:e,error:n,fieldProps:{...j,"aria-label":`${j["aria-label"]} ${r}`,validate:E=>k.value&&E>k.value?"Start date must be less than or equal to end date":null},groupProps:v,name:(p==null?void 0:p.name)??h,register:c,setValue:l,value:p==null?void 0:p.value}),t.jsx(se,{buttonProps:T,datePickerRef:$,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${r}`,validate:E=>j.value&&E<j.value?"End date must be greater than or equal to start date":null},groupProps:v,name:(d==null?void 0:d.name)??f,register:c,setValue:l,value:d==null?void 0:d.value})]}),b.isOpen&&!e?t.jsx($e,{offset:8,placement:"bottom start",state:b,triggerRef:$,children:t.jsx(Te,{...S,children:t.jsx(Ct,{onClose:w,props:N})})}):null]})},wi=s.dt.div`
|
|
1106
1106
|
${({theme:e})=>`
|
|
1107
1107
|
align-items: center;
|
|
1108
1108
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1111,19 +1111,19 @@
|
|
|
1111
1111
|
justify-content: center;
|
|
1112
1112
|
padding: ${e.spacing[.5]} ${e.spacing[1.25]};
|
|
1113
1113
|
`}
|
|
1114
|
-
`,
|
|
1114
|
+
`,vi=s.dt.div`
|
|
1115
1115
|
align-items: center;
|
|
1116
1116
|
display: flex;
|
|
1117
1117
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1118
1118
|
justify-content: flex-end;
|
|
1119
1119
|
flex: 1 0 0;
|
|
1120
|
-
`,zt=({handleTimeChange:e,onClose:n,props:i,timeState:r})=>{const a=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),c=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:l,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,c);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:l,state:c,title:p}),t.jsx(ze,{state:c}),t.jsxs(wi,{children:[t.jsx(C,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(
|
|
1120
|
+
`,zt=({handleTimeChange:e,onClose:n,props:i,timeState:r})=>{const a=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),c=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:l,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,c);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:l,state:c,title:p}),t.jsx(ze,{state:c}),t.jsxs(wi,{children:[t.jsx(C,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(vi,{children:t.jsx(jt,{hourCycle:12,label:"time-field",onChange:e,value:r.timeValue})})]}),t.jsx(qe,{children:t.jsx(L,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ji=e=>{const{disabled:n=!1,error:i,required:r,label:a,name:o,tooltip:c,register:l,setValue:d,watch:p}=e,g=p==null?void 0:p(o),u=x.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:r,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(g.replace(/\//gu,"-"))}),{close:h}=f,{groupProps:$,fieldProps:m,buttonProps:b,dialogProps:w,calendarProps:v}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,u),j=x.useCallback(T=>{v.onChange&&v.onChange(T),d==null||d(o,yi(String(T).replace(/-/gu,"/")))},[v,o,d]),k=x.useCallback(T=>{T&&f.setTimeValue(T)},[f]);return t.jsxs(H,{error:i,htmlFor:o,label:a,required:r,tooltip:c,children:[t.jsx(se,{buttonProps:b,datePickerRef:u,disabled:n,error:i,fieldProps:m,granularity:"minute",groupProps:$,name:o,register:l,setValue:d,value:g}),f.isOpen&&!n?t.jsx($e,{offset:8,placement:"bottom start",state:f,triggerRef:u,children:t.jsx(Te,{...w,children:t.jsx(zt,{handleTimeChange:k,onClose:h,props:{...v,onChange:j},timeState:f})})}):null]})},ki=({children:e,currentValue:n,externalLink:i,isEditing:r,label:a,name:o,tooltip:c})=>{if(r)return t.jsx("div",{children:e});const l=s.lodashExports.isNil(n)?"":n,d=String(i??l);return t.jsxs(y,{children:[t.jsx(Ye,{htmlFor:o,label:a,tooltip:c,weight:"bold"}),d.startsWith("https://")?t.jsx(Z,{href:d,children:l}):t.jsx(C,{size:"md",children:l})]})},Fe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:r,helpText:a,error:o,id:c,indexArray:l=0,isValid:d,isTouched:p,label:g,linkPosition:u,name:f,maskValue:h=!1,onPaste:$,placeholder:m,removeItemArray:b,register:w,suggestions:v,tooltip:j,type:k="text",weight:T,...S})=>{const{required:N,onBlur:E,onChange:A}=S,R=s.nt(),P=e?void 0:o,O=d&&p&&!e,Y=x.useCallback(V=>{V.key==="Enter"&&V.preventDefault()},[]);return t.jsxs(H,{error:P,helpLink:i,helpLinkText:r,helpText:a,htmlFor:f,label:g,linkPosition:u,required:N,tooltip:j,weight:T,children:[t.jsxs(J,{className:`
|
|
1121
1121
|
${e?"disabled":""} ${P?"error":""} ${O?"success":""}
|
|
1122
|
-
`,children:[n?t.jsx(I,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":P?"true":"false","aria-label":f,"aria-required":N,autoComplete:"off",className:h?"sr-block":"","data-testid":`${f}-input`,disabled:e,id:f,list:
|
|
1122
|
+
`,children:[n?t.jsx(I,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":P?"true":"false","aria-label":f,"aria-required":N,autoComplete:"off",className:h?"sr-block":"","data-testid":`${f}-input`,disabled:e,id:f,list:v?`list_${f}`:void 0,onKeyDown:Y,onPaste:$,placeholder:m,type:k,...w?w(f,{required:N,onBlur:E,onChange:A}):{...S}}),P?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:R.palette.error[500],iconSize:"xs"}):void 0,O?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:R.palette.success[500],iconSize:"xs"}):void 0,c==="array"&&l>0?t.jsx(B,{color:R.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:b?b(l):void 0,variant:"ghost"}):void 0]}),v?t.jsx("datalist",{id:`list_${f}`,children:v.map(V=>t.jsx("option",{value:V},V))}):void 0]})},Ci=s.dt.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,Si=s.dt.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1123
1123
|
gap: 12px;
|
|
1124
1124
|
`,zi=s.dt.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1125
1125
|
gap: 8px;
|
|
1126
|
-
`,
|
|
1126
|
+
`,ve=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,Ii=s.dt.div.attrs({className:"comp-col"})`
|
|
1127
1127
|
word-wrap: break-word;
|
|
1128
1128
|
|
|
1129
1129
|
${({$width:e=null})=>e===null?"":`width: ${e}`};
|
|
@@ -1131,18 +1131,18 @@
|
|
|
1131
1131
|
${({$paddingTop:e})=>`padding-top: ${e??0}px;`}
|
|
1132
1132
|
|
|
1133
1133
|
@media (width <= 768px) {
|
|
1134
|
-
${({$sm:e})=>
|
|
1134
|
+
${({$sm:e})=>ve(e)}
|
|
1135
1135
|
}
|
|
1136
1136
|
|
|
1137
1137
|
@media (width >= 768px) and (width <= 992px) {
|
|
1138
|
-
${({$md:e})=>
|
|
1138
|
+
${({$md:e})=>ve(e)}
|
|
1139
1139
|
}
|
|
1140
1140
|
|
|
1141
1141
|
@media (width >= 992px) {
|
|
1142
|
-
${({$lg:e})=>
|
|
1142
|
+
${({$lg:e})=>ve(e)}
|
|
1143
1143
|
}
|
|
1144
1144
|
|
|
1145
|
-
${({$xl:e})=>s.isNumber(e)?`@media (min-width: 1200px) { ${
|
|
1145
|
+
${({$xl:e})=>s.isNumber(e)?`@media (min-width: 1200px) { ${ve(e)} }`:""}
|
|
1146
1146
|
|
|
1147
1147
|
> .comp-card {
|
|
1148
1148
|
height: 100%;
|
|
@@ -1175,7 +1175,7 @@
|
|
|
1175
1175
|
padding: ${i}px;
|
|
1176
1176
|
}
|
|
1177
1177
|
`}
|
|
1178
|
-
`,It=({align:e,children:n,cols:i,colsPadding:r,justify:a})=>t.jsx(Ni,{$align:e,$cols:i,$colsPadding:r,$justify:a,children:n}),Ae=({addText:e,append:n,disabled:i=!1,fields:r,fieldState:a,initValue:o="",index:c=0,required:l,label:d,max:p=100,name:g,onBlur:u,onChange:f,placeholder:h,tooltip:$,remove:m,value:b})=>{var
|
|
1178
|
+
`,It=({align:e,children:n,cols:i,colsPadding:r,justify:a})=>t.jsx(Ni,{$align:e,$cols:i,$colsPadding:r,$justify:a,children:n}),Ae=({addText:e,append:n,disabled:i=!1,fields:r,fieldState:a,initValue:o="",index:c=0,required:l,label:d,max:p=100,name:g,onBlur:u,onChange:f,placeholder:h,tooltip:$,remove:m,value:b})=>{var j;const w=x.useCallback(()=>{n==null||n(o)},[n,o]),v=x.useCallback(k=>()=>{m==null||m(k)},[m]);return t.jsxs(It,{align:"start",children:[t.jsx(Pe,{lg:75,md:75,sm:75,children:t.jsx(Fe,{disabled:i,error:a?(j=a.error)==null?void 0:j.message:void 0,id:"array",indexArray:c,isTouched:a?a.isTouched:void 0,isValid:a?!a.invalid:void 0,label:d,name:g,onBlur:u,onChange:f,placeholder:h,removeItemArray:v,required:l,tooltip:$,value:b})}),c<p-1&&c+1===(r==null?void 0:r.length)?t.jsx(Pe,{lg:25,md:25,sm:25,children:t.jsx(L,{disabled:i,icon:"plus",onClick:w,variant:"ghost",width:"100%",children:e??"Add"})}):void 0]})},Ei=({addText:e,append:n,control:i,disabled:r,fields:a,initValue:o="",required:c,label:l,max:d=void 0,name:p="array-field",onChange:g,placeholder:u,remove:f,tooltip:h})=>i&&a?t.jsx(x.Fragment,{children:a.map(($,m)=>t.jsx(s.Controller,{control:i,name:`${p}.${m}`,render:({field:b,fieldState:w})=>t.jsx(Ae,{addText:e,append:n,disabled:r,fieldState:w,fields:a,index:m,initValue:o,label:l,max:d,name:b.name,onBlur:b.onBlur,onChange:g??b.onChange,placeholder:u,remove:f,required:c,tooltip:h,value:b.value.value}),index:m,fieldProp:$},$.id))}):t.jsx(Ae,{addText:e,disabled:r,initValue:o,label:l,max:d,name:p,onChange:g,placeholder:u,required:c,tooltip:h}),Ri=s.dt(pt)`
|
|
1179
1179
|
white-space: nowrap;
|
|
1180
1180
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1181
1181
|
text-overflow: ellipsis;
|
|
@@ -1186,13 +1186,13 @@
|
|
|
1186
1186
|
position: absolute;
|
|
1187
1187
|
visibility: hidden;
|
|
1188
1188
|
width: 0;
|
|
1189
|
-
`,We=(e,n,i)=>{const r=new Event(e);return Object.defineProperty(r,"target",{value:{name:n,value:i}}),r},Li=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Pi=({accept:e,disabled:n=!1,error:i,label:r,helpLink:a,helpText:o,id:c,multiple:l,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:$,weight:m})=>{const b=s.nt(),w=n?void 0:i,
|
|
1189
|
+
`,We=(e,n,i)=>{const r=new Event(e);return Object.defineProperty(r,"target",{value:{name:n,value:i}}),r},Li=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Pi=({accept:e,disabled:n=!1,error:i,label:r,helpLink:a,helpText:o,id:c,multiple:l,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:$,weight:m})=>{const b=s.nt(),w=n?void 0:i,v=x.useRef(null),j=$==null?void 0:$(d),k=Li(j),T=u==null?void 0:u(d,{required:g}),S=x.useCallback(()=>{const A=We("change",d,void 0);f&&f(d,""),T&&T.onChange(A)},[T,d,f]),N=x.useCallback(A=>{const{files:R}=A.currentTarget,P=We("change",d,R&&R.length>0?R:void 0);p==null||p(P),T&&T.onChange(P)},[T,d,p]),E=x.useCallback(A=>{n?A.preventDefault():v.current&&v.current.click()},[n]);return t.jsxs(H,{error:w,helpLink:a,helpText:o,htmlFor:c??d,label:r,required:g,tooltip:h,weight:m,children:[t.jsxs(J,{className:`${n?"disabled":""} ${w?"error":""}`,children:[t.jsx(Ri,{$size:"xs",children:k}),t.jsxs(y,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(k)?void 0:t.jsx(B,{color:b.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:S,variant:"ghost",width:"20px"}),w&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsxs(L,{border:n?`1px solid ${b.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:E,variant:"primary",width:"96px",children:[t.jsx(I,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Di,{...T&&{ref:T.ref,onBlur:T.onBlur},accept:e,"aria-label":d,"data-testid":d,disabled:n,id:c??d,multiple:l,name:d,onChange:N,onClick:S,ref:v,required:void 0,type:"file",value:void 0})]})},Ai=s.dt.input`
|
|
1190
1190
|
border: none;
|
|
1191
1191
|
background: transparent;
|
|
1192
1192
|
min-width: 15rem;
|
|
1193
1193
|
padding: 0;
|
|
1194
1194
|
flex: 1;
|
|
1195
|
-
`,Be=({disabled:e=!1,error:n,field:i,helpLink:r,helpLinkText:a,helpText:o,label:c,name:l="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:$})=>{const m=s.nt(),b=e?void 0:n,[w,
|
|
1195
|
+
`,Be=({disabled:e=!1,error:n,field:i,helpLink:r,helpLinkText:a,helpText:o,label:c,name:l="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:$})=>{const m=s.nt(),b=e?void 0:n,[w,v]=x.useState(""),j=d?h:i==null?void 0:i.value,k=x.useMemo(()=>j&&typeof j=="string"?j.split(",").filter(Boolean):[],[j]),T=x.useCallback(R=>{const O=[...new Set(R.filter(Boolean))].join(","),Y=We("change",l,O);i&&i.onChange(Y),d&&d(Y)},[i,l,d]),S=x.useCallback(R=>{v(R.target.value)},[]),N=x.useCallback(R=>{const P=w.trim();P.length&&!k.includes(P)&&(R.preventDefault(),T([...k,P]),v("")),i&&i.onBlur()},[w,i,T,k]),E=x.useCallback(R=>{const P=w.trim();R.key==="Enter"&&P.length===0&&R.preventDefault(),["Enter",","].includes(R.key)&&P.length>0&&!k.includes(P)?(R.preventDefault(),T([...k,P]),v("")):R.key==="Backspace"&&!P.length&&k.length&&(R.preventDefault(),p==null||p(k[k.length-1]),T(k.slice(0,-1)))},[w,p,T,k]),A=x.useCallback(R=>()=>{p==null||p(R),T(k.filter(P=>P!==R))},[p,T,k]);return t.jsx(H,{error:b,helpLink:r,helpLinkText:a,helpText:o,htmlFor:l,label:c,required:u,tooltip:f,weight:$,children:t.jsxs(J,{$overflowX:"auto",className:`${e?"disabled":""} ${b?"error":""}`,children:[k.map(R=>t.jsx(K,{disabled:e,onClose:A(R),tagLabel:R},R)),t.jsx(Ai,{"aria-hidden":!1,"aria-invalid":b?"true":"false","aria-label":l,"aria-required":u,autoComplete:"off",id:l,onBlur:N,onChange:S,onKeyDown:E,placeholder:k.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:w}),b?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}):void 0]})})},Wi=({disabled:e=!1,control:n,error:i,helpLink:r,helpLinkText:a,helpText:o,label:c,name:l="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:$})=>n?t.jsx(s.Controller,{control:n,name:l,render:({field:m})=>t.jsx(Be,{disabled:e,error:i,field:m,helpLink:r,helpLinkText:a,helpText:o,label:c,name:l,onRemove:p,placeholder:g,required:u,tooltip:f,weight:$}),rules:{required:u}}):t.jsx(Be,{disabled:e,error:i,helpLink:r,helpLinkText:a,helpText:o,label:c,name:l,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:$}),He=x.forwardRef(function({disabled:n,icon:i,margin:r,onClick:a,...o},c){return t.jsx(ui,{$margin:r,"aria-label":i,className:"action-btn",disabled:n,onClick:a,ref:c,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:r,maxLength:a,max:o=1/0,min:c=0,name:l,onChange:d,placeholder:p,register:g,required:u,setValue:f,value:h})=>{const $=s.nt(),m=i?void 0:e,b=n<0?0:n,[w,v]=x.useState(h?s._.toNumber(h):0),j=x.useCallback(()=>{const N=(w-10**-b).toFixed(b),E=Math.max(Number(c),Number(N));f&&f(l,E,{shouldDirty:!0}),v(E)},[b,w,c,l,f]),k=x.useCallback(()=>{const N=(w+10**-b).toFixed(b),E=Math.min(Number(o),Number(N)>Number(c)?Number(N):Number(c));f&&f(l,E,{shouldDirty:!0}),v(E)},[b,w,o,c,l,f]),T=x.useCallback(N=>{const{value:E}=N.target,A=/\d+/u.test(E)&&!s._.isEmpty(E);f&&f(l,A?E:void 0),d&&d(N),v(Number(E))},[l,d,f]),S=x.useCallback(N=>{N.key==="Enter"&&N.preventDefault()},[]);return t.jsxs(J,{className:`${i?"disabled":""} ${m?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":l,"aria-required":u,autoComplete:"off",disabled:i,id:r??l,max:o,min:c,onKeyDown:S,placeholder:p,required:u,step:10**-b,type:"number",...g==null?void 0:g(l,{maxLength:a,max:o,min:c,onChange:T,value:h,valueAsNumber:!0})}),m&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:$.palette.error[500],iconSize:"xs"}),t.jsx(He,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:j,px:.75,py:.75}),t.jsx(He,{borderRadius:`0 ${$.spacing[.5]} ${$.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:k,px:.75,py:.75})]})},Tt=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:r,helpText:a,id:o,label:c,linkPosition:l,maxLength:d,max:p,min:g,name:u,onChange:f,placeholder:h,register:$,required:m,setValue:b,tooltip:w,value:v,watch:j,weight:k})=>t.jsx(H,{error:n?void 0:i,helpLink:r,helpText:a,htmlFor:u,label:c,linkPosition:l,maxLength:d,required:m,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:f,placeholder:h,register:$,required:m,setValue:b,value:f?v:j==null?void 0:j(u)})}),Ft=({disabled:e=!1,error:n,name:i,label:r,propsMax:a,propsMin:o,required:c,tooltip:l,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return t.jsx(H,{error:n,htmlFor:i,label:r,required:c,tooltip:l,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,{...a,disabled:e,error:n,name:a.name??p})]})})},Bi=s.dt.div`
|
|
1196
1196
|
${({theme:e})=>`
|
|
1197
1197
|
align-items: flex-start;
|
|
1198
1198
|
align-self: stretch;
|
|
@@ -1286,9 +1286,9 @@
|
|
|
1286
1286
|
overflow: hidden;
|
|
1287
1287
|
text-overflow: ellipsis;
|
|
1288
1288
|
white-space: nowrap;
|
|
1289
|
-
`,ye=(e,n,i=!1)=>{x.useEffect(()=>{var a;const r=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("mousedown",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("mousedown",r,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",r,!0)})},[i,e,n])},_i=({disabled:e,error:n,label:i,name:r,placeholder:a,required:o,register:c,tooltip:l,value:d,watch:p,weight:g})=>{const u=s.nt(),f=x.useRef(null),h=e?void 0:n,$=(p==null?void 0:p(r))??d,[m,b]=x.useState(!1),[w,
|
|
1289
|
+
`,ye=(e,n,i=!1)=>{x.useEffect(()=>{var a;const r=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("mousedown",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("mousedown",r,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",r,!0)})},[i,e,n])},_i=({disabled:e,error:n,label:i,name:r,placeholder:a,required:o,register:c,tooltip:l,value:d,watch:p,weight:g})=>{const u=s.nt(),f=x.useRef(null),h=e?void 0:n,$=(p==null?void 0:p(r))??d,[m,b]=x.useState(!1),[w,v]=x.useState(""),{refs:j,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:T,inputValue:S,handlePhoneValueChange:N,country:E,setCountry:A}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:$?String($):""}),R=x.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),P=x.useCallback(W=>{W.preventDefault(),b(M=>!M),m||v("")},[m]),O=x.useCallback(W=>()=>{A(W),b(!1),v("")},[A,b]),Y=x.useCallback(W=>{W.key.length===1?v(M=>M+W.key):W.key==="Backspace"&&v(M=>M.slice(0,-1))},[]),V=s.R.filter(W=>{const{name:M}=s.M(W);return M.toLowerCase().includes(w.toLowerCase())});return ye(j.floating.current,()=>{b(!1),v("")},!0),t.jsx(H,{error:h,htmlFor:r,label:i,required:o,tooltip:l,weight:g,children:t.jsxs(Bi,{className:`${e?"disabled":""} ${h?"error":""}`,ref:f,children:[t.jsxs(Hi,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:P,onKeyDown:Y,ref:j.setReference,children:[t.jsx(s.q,{iso2:E.iso2,size:"16px"}),t.jsx(I,{icon:"angle-down",iconColor:u.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(J,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":r,"aria-required":o,autoComplete:"off","data-testid":`${r}-input`,disabled:e,id:r,name:r,onKeyDown:R,placeholder:a,ref:T,type:"tel",value:S,...c==null?void 0:c(r,{required:o,onChange:N})}),h?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"xs"}):void 0]}),m&&ne.createPortal(t.jsx(Mi,{ref:j.setFloating,style:k,children:V.map(W=>{const{dialCode:M,iso2:Q,name:Re}=s.M(W);return t.jsxs(Oi,{onClick:O(Q),value:Q,children:[t.jsx(s.q,{iso2:Q,size:"16px"}),t.jsx(Vi,{children:Re}),t.jsx(C,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+M})]},Q)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Gi=({disabled:e=!1,error:n,helpLink:i,helpText:r,isTouched:a,isValid:o,label:c,name:l="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:u,register:f,required:h,rows:$,tooltip:m,watch:b,weight:w,value:v})=>{const j=s.nt(),k=(b==null?void 0:b(l))??v,T=o&&a&&!e,S=e?void 0:n;return t.jsx(H,{error:S,helpLink:i,helpText:r,htmlFor:l,label:c,maxLength:g,required:h,tooltip:m,value:k?String(k):void 0,weight:w,children:t.jsxs(J,{className:`
|
|
1290
1290
|
${e?"disabled":""} ${S?"error":""} ${T?"success":""}
|
|
1291
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":S?"true":"false","aria-label":l,"aria-required":h,className:p?"sr-block":"","data-testid":`${l}-text-area`,disabled:e,id:d??l,maxLength:g,placeholder:u,rows:$,value:k,...f==null?void 0:f(l,{required:h})}),S?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:
|
|
1291
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":S?"true":"false","aria-label":l,"aria-required":h,className:p?"sr-block":"","data-testid":`${l}-text-area`,disabled:e,id:d??l,maxLength:g,placeholder:u,rows:$,value:k,...f==null?void 0:f(l,{required:h})}),S?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"xs"}):void 0,T?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:j.palette.success[500],iconSize:"xs"}):void 0]})})},Ui=({description:e,disabled:n,id:i,align:r,inputType:a="text",inputNumberProps:o,minHeight:c,minWidth:l,name:d,placeholder:p,tooltip:g,title:u})=>{const f=x.useMemo(()=>{if(a==="text")return t.jsx(Fe,{disabled:n,name:d,placeholder:p});if(a==="date")return t.jsx(kt,{disabled:n,name:d});const{decimalPlaces:h,max:$,min:m}=o??{};return t.jsx(Tt,{decimalPlaces:h,disabled:n,max:$,min:m,name:d,placeholder:p})},[n,o,a,d,p]);return t.jsxs(ri,{$align:r,$minHeight:c,$minWidth:l,children:[t.jsx(Se,{description:e,id:i,title:u,tooltip:g}),f]})},Yi=s.dt.label`
|
|
1292
1292
|
${({theme:e})=>`
|
|
1293
1293
|
align-items: center;
|
|
1294
1294
|
color: ${e.palette.gray[600]};
|
|
@@ -1785,7 +1785,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
|
-
`,
|
|
1788
|
+
`,vr=s.dt(be)`
|
|
1789
1789
|
${({theme:e,$variant:n})=>`
|
|
1790
1790
|
align-items: center;
|
|
1791
1791
|
background: ${n==="error"?e.palette.primary[400]:e.palette.warning[500]};
|
|
@@ -1798,14 +1798,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1798
1798
|
width: ${e.spacing[.5]};
|
|
1799
1799
|
height: ${e.spacing[.5]};
|
|
1800
1800
|
`}
|
|
1801
|
-
`,
|
|
1801
|
+
`,jr=s.dt.div`
|
|
1802
1802
|
align-items: center;
|
|
1803
1803
|
color: ${({theme:e})=>e.palette.white};
|
|
1804
1804
|
display: flex;
|
|
1805
1805
|
font-size: 6px;
|
|
1806
1806
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1807
1807
|
justify-content: center;
|
|
1808
|
-
`,Mt=x.forwardRef(function({numberIndicator:n,show:i,variant:r="error",...a},o){return t.jsx(
|
|
1808
|
+
`,Mt=x.forwardRef(function({numberIndicator:n,show:i,variant:r="error",...a},o){return t.jsx(vr,{$variant:r,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...a,children:n&&t.jsx(jr,{children:n<=9?n:9})})}),Ot=({end:e=!1,label:n,id:i,isActive:r=!1,link:a,notificationSign:o,onClick:c,tooltip:l="",variant:d="primary",tag:p})=>{const{pathname:g}=De.useLocation(),u=r||(d==="primary"?g.includes(a):g.endsWith(a));return t.jsx(U,{display:"flex",id:`${i}-tooltip`,tip:l,children:t.jsxs(wr,{$borderButton:u,$variant:d,children:[t.jsxs(De.NavLink,{end:e,id:i,onClick:c,to:a,children:[n,t.jsx(Mt,{left:o==null?void 0:o.left,numberIndicator:o==null?void 0:o.numberIndicator,show:o==null?void 0:o.show,top:o==null?void 0:o.top,variant:o==null?void 0:o.variant})]}),p===void 0?null:t.jsx(K,{tagLabel:`${p}`,variant:"default"})]})})},Ze=({items:e,borders:n=!0,box:i=!1,variant:r="primary"})=>{const a=s.nt();return t.jsx(y,{alignItems:"center",bgColor:a.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${a.palette.gray[300]}`:void 0,borderColor:i?a.palette.gray[200]:void 0,borderRadius:i?a.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:c,isActive:l,link:d,label:p,notificationSign:g,onClick:u,tag:f,tooltip:h})=>t.jsx(Ot,{end:o,id:c,isActive:l,label:p,link:d,notificationSign:g,onClick:u,tag:f,tooltip:h,variant:r},c))})},te=x.forwardRef(function({color:n=z.palette.gray[100],mt:i=.5,mb:r=.5,width:a,...o},c){return t.jsx(y,{as:"hr",borderTop:`1px solid ${n}`,mb:r,mt:i,ref:c,width:a??"100%",...o})}),kr=s.dt.li`
|
|
1809
1809
|
${({theme:e})=>`
|
|
1810
1810
|
align-items: center;
|
|
1811
1811
|
background-color: ${e.palette.white};
|
|
@@ -1969,7 +1969,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1969
1969
|
svg.fa-check {
|
|
1970
1970
|
border-radius: 2px;
|
|
1971
1971
|
}
|
|
1972
|
-
`,Yt=({control:e,option:n,register:i,setValue:r})=>{var a,o,c,l,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=n.options)==null?void 0:a.map(g=>t.jsx(st,{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(st,{value:g.value,width:"content",children:t.jsx(Ke,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(bt,{control:e,items:((c=n.options)==null?void 0:c.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:r},propsMin:{placeholder:"Min",register:i,name:"minValue",value:n.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(St,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(l=n.maxValue)==null?void 0:l.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:r,variant:"filters"});default:return t.jsx("div",{})}},qt=({control:e,items:n,register:i,setValue:r})=>t.jsx(t.Fragment,{children:n.map((a,o)=>{const c=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Yt,{control:e,option:a,register:i,setValue:r}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},c)})}),Kt=e=>{var l,d,p,g,u;const[n,i]=x.useState([...e]),{control:r,register:a,handleSubmit:o,setValue:c}=s.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter($=>$.checked).map($=>$.value))??[]}),radio:((p=(d=(l=e.find(f=>f.type==="radioButton"))==null?void 0:l.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>["text","select"].includes(f.type)).reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:g.minValue,maxValue:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:r,items:n,setItems:i,register:a,handleSubmit:o,setValue:c}},Rr=(e,n)=>{var i,r,a,o,c;n("checkbox",e.filter(l=>l.type==="checkboxes").flatMap(l=>{var d;return((d=l.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((a=(r=(i=e.find(l=>l.type==="radioButton"))==null?void 0:i.options)==null?void 0:r.find(({checked:l})=>l))==null?void 0:a.value)??""),n("text",e.filter(l=>["text","select"].includes(l.type)).reduce((l,d)=>({...l,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(l=>["numberRange","dateRange"].includes(l.type)))==null?void 0:o.minValue),n("maxValue",(c=e.find(l=>["numberRange","dateRange"].includes(l.type)))==null?void 0:c.maxValue)},Dr=(e,n)=>e.map(i=>{var r;return i.type==="checkboxes"?{...i,options:(r=i.options)==null?void 0:r.filter(a=>{var o;return((o=a.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??a.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:r,items:a,setItems:o,register:c,handleSubmit:l,setValue:d}=Kt(e),p=e.some(f=>f.type==="checkboxes"),g=x.useCallback(f=>{const{value:h}=f.target,$=Dr(e,h);o($)},[e,o]),u=x.useCallback(f=>{n&&n(f)},[n]);return x.useEffect(()=>{o(e),Rr(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:l(u),children:[t.jsx(qt,{control:r,items:a,register:c,setValue:d}),t.jsx(L,{mt:1,type:"submit",children:"Apply"})]})]})},Xt=({options:e,variant:n,onApplyFilters:i,setDirection:r})=>{const a=s.nt(),[o,c]=x.useState(e),[l,d]=x.useState([]),[p,g]=x.useState({}),[u,f]=x.useState(""),h=x.useCallback(b=>()=>{const w=o.find(j=>j.label===b);f(b),d((w==null?void 0:w.filterOptions)??[])},[o]),$=x.useCallback(b=>{const w=[...b.checkbox,...Object.values(b.text??{}),...b.radio?[b.radio]:[],...b.minValue?[String(b.minValue)]:[],...b.maxValue?[String(b.maxValue)]:[]];g(S=>w.length>0?{...S,[u]:w}:S);const j=S=>{var N,E;return{...S,options:(N=S.options)==null?void 0:N.map(A=>({...A,checked:b.checkbox.includes(A.value)||b.radio===A.value})),value:["text","select"].includes(S.type)?((E=b.text)==null?void 0:E[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`])??S.value:S.value,minValue:["numberRange","dateRange"].includes(S.type)?b.minValue:S.minValue,maxValue:["numberRange","dateRange"].includes(S.type)?b.maxValue:S.maxValue}},v=S=>S.label===u?{...S,filterOptions:S.filterOptions.map(j)}:S,k=o.map(v);c(S=>S.map(v));const T=k.flatMap(({filterOptions:S})=>S);i(T),d([])},[o,i,u]),m=x.useCallback((b,w)=>{const j=`li-filter-option-${b}`;return t.jsxs(Nr,{icon:w,onClick:h(b),style:{minWidth:"180px"},value:j,width:"100%",children:[b,p[b]===void 0?void 0:t.jsx(K,{tagLabel:p[b].length.toString()})]},j)},[p,h]);return x.useEffect(()=>{const b=e.reduce((w,{label:j,filterOptions:v})=>{const k=v.flatMap(({value:N,minValue:E,maxValue:A})=>[E,A,N]).filter(Boolean),T=v.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),S=[...k,...T];return S.length===0?w:{...w,[j]:S}},{});g(b),l.length>0&&r&&r("column")},[l,e,r]),n==="grouped"?t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:l.length>0?t.jsx(Me,{id:"filters-options",onSubmit:$,options:l}):Object.entries(Gt(e)).map(([b,w])=>t.jsxs(y,{children:[t.jsx(C,{color:a.palette.gray[400],mb:.25,size:"sm",children:b}),w.map(({label:j,icon:v="filter-list"})=>m(j,v))]},b))}):t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:l.length>0?"auto":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:l.length>0?t.jsx(Me,{id:"filters-options",onSubmit:$,options:l}):e.map(({label:b,icon:w="filter-list"})=>m(b,w))})},Zt=({options:e,onApplyFilters:n,modalRef:i,variant:r})=>{const[a,o]=x.useState("row"),c=s.nt(),l=x.useRef(null),d=t.jsx(B,{icon:"close",iconColor:c.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return x.useEffect(()=>{const p=g=>{const u=l.current;u&&!u.contains(g.target)&&i.close()};return document.addEventListener("mousedown",p,!0),()=>{document.removeEventListener("mousedown",p,!0)}},[l,i]),t.jsx(Er,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Xe,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:l,style:{width:"max-content"},children:[a==="column"?d:void 0,t.jsx(Xt,{onApplyFilters:n,options:e,setDirection:o,variant:r}),a==="row"?d:void 0]})})};function Lr(e){if(e)return e}function Pr(e){if(!e||e.length===0)return;const n=e.filter(r=>r.checked).map(r=>r.label??r.value);return n.length===0?void 0:n.join(", ")}function Ar(e,n){const i=s._.isEmpty(e)&&typeof e!="number"?void 0:Number(e),r=s._.isEmpty(n)&&typeof n!="number"?void 0:Number(String(n));if(!s._.isUndefined(i)&&!s._.isUndefined(r))return`${i} - ${r}`;if(!s._.isUndefined(i))return`Min ${i}`;if(!s._.isUndefined(r))return`Max ${r}`}function Wr(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 Br(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const re=({filter:e,icon:n="filter-list",label:i,onClose:r,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx(y,{pr:.25,children:t.jsx(K,{filterValues:a,icon:n,id:"remove-filter",onClose:r(e),tagLabel:`${i} `})},i),Hr=({options:e,onClose:n})=>{const i=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:c,type:l,value:d,options:p,minValue:g,maxValue:u}=a;switch(l){case"numberRange":{const f=Ar(g,u);return t.jsx(re,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},c)}case"dateRange":{const f=Wr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(re,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},c)}case"radioButton":case"checkboxes":{const f=Pr(p);return t.jsx(re,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},c)}case void 0:case"select":case"text":default:{const f=Lr(d),h=Br(l,r.label,o);return t.jsx(re,{filter:a,filterValue:f,icon:r.icon,label:h,onClose:n},c)}}})).filter(r=>{if(r===null)return!1;const{filterValue:a}=r.props;return!s._.isNil(a)&&!s._.isEmpty(String(a))});return i.length>0?t.jsx(y,{display:"flex",wrap:"wrap",children:i}):null},Mr=(e,n)=>{function i(c,l){if(l.value===""||l.value===void 0||s._.defaultTo(l.isBackFilter,!1))return!0;switch(l.filterFn){case"includesInsensitive":return String(c[l.key]).toLowerCase().includes(l.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(c[l.key]).toLowerCase()===l.value.toLowerCase()}}function r(c,l){if(!l.options||l.options.length===0)return!0;const d=l.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(c[l.key]))}function a(c,l,d){const p=d(String(c[l.key])),{minValue:g,maxValue:u}=l,f=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(f)&&s._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(c){return n.every(l=>{if(typeof l.key=="function")return l.key(c,l.value);switch(l.type){case"radioButton":case"checkboxes":return r(c,l);case"numberRange":return a(c,l,Number);case"dateRange":return a(c,l,d=>new Date(d));case"select":case"text":default:return i(c,l)}})}return e.filter(o)},lt=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,Or=e=>{var i;const n=((i=e.options)==null?void 0:i.map(r=>({...r,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Vr=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:r,onFiltersChange:a,variant:o="ungrouped"})=>{const c=Ee("filters-modal"),[l,d]=x.useState([]),[p,g]=x.useState(lt(l)),u=i.map(m=>({...m,filterOptions:m.filterOptions.map(b=>l.find(j=>j.key===b.key&&j.type===b.type&&j.filterFn===b.filterFn)??{...b})})),f=x.useCallback(m=>{d([...m]),localStorage.setItem(n,JSON.stringify(m))},[d,n]),h=x.useCallback(m=>()=>{const b=l.map(w=>w.key===m.key&&w.type===m.type&&w.filterFn===m.filterFn?Or(w):w);d(b),localStorage.setItem(n,JSON.stringify(b))},[l,n]);return x.useEffect(()=>{const m=localStorage.getItem(n),b=m?JSON.parse(m):i.flatMap(w=>w.filterOptions);d(b)},[n,i,d]),x.useEffect(()=>{r&&e!==void 0&&r(Mr(e,l)),g(lt(l)),a==null||a(l)},[e,l,r,g,a]),{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:c.toggle,tag:p.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(Zt,{modalRef:c,onApplyFilters:f,options:u,variant:o})]}),options:u,removeFilter:h}},Jt=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:r=void 0,confirmButton:a=void 0,content:o=void 0,description:c=void 0,modalRef:l,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const $=s.nt(),m=t.jsx(Wt,{"aria-label":l.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Xe,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Ht,{description:c,modalRef:l,onClose:p,otherActions:d,title:u}),g&&t.jsx(y,{borderTop:`1px solid ${$.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Ze,{items:g})}),(s._.isObject(o)||r)&&t.jsxs(gr,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(hr,{$framed:o.imageFramed,children:t.jsx(ee,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(C,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:a,modalRef:l})]})});return e&&l.isOpen?ne.createPortal(m,document.getElementById("portals")??document.body):l.isOpen?m:null},_r=()=>{const[e,n]=x.useState(!1),[i,r]=x.useState(),a=x.useRef(null),o=Ee("confirm-dialog-modal"),c=x.useCallback(async g=>(r(g),n(!0),new Promise(u=>{a.current=u})),[]),l=x.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=x.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return x.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(Jt,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:l,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:c}},Oe=({buttonProps:e,variant:n})=>t.jsx(L,{onClick:e.onClick,variant:n,children:e.text}),Gr=s.dt.div`
|
|
1972
|
+
`,Yt=({control:e,option:n,register:i,setValue:r})=>{var a,o,c,l,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=n.options)==null?void 0:a.map(g=>t.jsx(st,{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(st,{value:g.value,width:"content",children:t.jsx(Ke,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(bt,{control:e,items:((c=n.options)==null?void 0:c.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:r},propsMin:{placeholder:"Min",register:i,name:"minValue",value:n.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(St,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(l=n.maxValue)==null?void 0:l.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:r,variant:"filters"});default:return t.jsx("div",{})}},qt=({control:e,items:n,register:i,setValue:r})=>t.jsx(t.Fragment,{children:n.map((a,o)=>{const c=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Yt,{control:e,option:a,register:i,setValue:r}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},c)})}),Kt=e=>{var l,d,p,g,u;const[n,i]=x.useState([...e]),{control:r,register:a,handleSubmit:o,setValue:c}=s.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter($=>$.checked).map($=>$.value))??[]}),radio:((p=(d=(l=e.find(f=>f.type==="radioButton"))==null?void 0:l.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>["text","select"].includes(f.type)).reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:g.minValue,maxValue:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:r,items:n,setItems:i,register:a,handleSubmit:o,setValue:c}},Rr=(e,n)=>{var i,r,a,o,c;n("checkbox",e.filter(l=>l.type==="checkboxes").flatMap(l=>{var d;return((d=l.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((a=(r=(i=e.find(l=>l.type==="radioButton"))==null?void 0:i.options)==null?void 0:r.find(({checked:l})=>l))==null?void 0:a.value)??""),n("text",e.filter(l=>["text","select"].includes(l.type)).reduce((l,d)=>({...l,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(l=>["numberRange","dateRange"].includes(l.type)))==null?void 0:o.minValue),n("maxValue",(c=e.find(l=>["numberRange","dateRange"].includes(l.type)))==null?void 0:c.maxValue)},Dr=(e,n)=>e.map(i=>{var r;return i.type==="checkboxes"?{...i,options:(r=i.options)==null?void 0:r.filter(a=>{var o;return((o=a.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??a.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:r,items:a,setItems:o,register:c,handleSubmit:l,setValue:d}=Kt(e),p=e.some(f=>f.type==="checkboxes"),g=x.useCallback(f=>{const{value:h}=f.target,$=Dr(e,h);o($)},[e,o]),u=x.useCallback(f=>{n&&n(f)},[n]);return x.useEffect(()=>{o(e),Rr(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:l(u),children:[t.jsx(qt,{control:r,items:a,register:c,setValue:d}),t.jsx(L,{mt:1,type:"submit",children:"Apply"})]})]})},Xt=({options:e,variant:n,onApplyFilters:i,setDirection:r})=>{const a=s.nt(),[o,c]=x.useState(e),[l,d]=x.useState([]),[p,g]=x.useState({}),[u,f]=x.useState(""),h=x.useCallback(b=>()=>{const w=o.find(v=>v.label===b);f(b),d((w==null?void 0:w.filterOptions)??[])},[o]),$=x.useCallback(b=>{const w=[...b.checkbox,...Object.values(b.text??{}),...b.radio?[b.radio]:[],...b.minValue?[String(b.minValue)]:[],...b.maxValue?[String(b.maxValue)]:[]];g(S=>w.length>0?{...S,[u]:w}:S);const v=S=>{var N,E;return{...S,options:(N=S.options)==null?void 0:N.map(A=>({...A,checked:b.checkbox.includes(A.value)||b.radio===A.value})),value:["text","select"].includes(S.type)?((E=b.text)==null?void 0:E[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`])??S.value:S.value,minValue:["numberRange","dateRange"].includes(S.type)?b.minValue:S.minValue,maxValue:["numberRange","dateRange"].includes(S.type)?b.maxValue:S.maxValue}},j=S=>S.label===u?{...S,filterOptions:S.filterOptions.map(v)}:S,k=o.map(j);c(S=>S.map(j));const T=k.flatMap(({filterOptions:S})=>S);i(T),d([])},[o,i,u]),m=x.useCallback((b,w)=>{const v=`li-filter-option-${b}`;return t.jsxs(Nr,{icon:w,onClick:h(b),style:{minWidth:"180px"},value:v,width:"100%",children:[b,p[b]===void 0?void 0:t.jsx(K,{tagLabel:p[b].length.toString()})]},v)},[p,h]);return x.useEffect(()=>{const b=e.reduce((w,{label:v,filterOptions:j})=>{const k=j.flatMap(({value:N,minValue:E,maxValue:A})=>[E,A,N]).filter(Boolean),T=j.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),S=[...k,...T];return S.length===0?w:{...w,[v]:S}},{});g(b),l.length>0&&r&&r("column")},[l,e,r]),n==="grouped"?t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:l.length>0?t.jsx(Me,{id:"filters-options",onSubmit:$,options:l}):Object.entries(Gt(e)).map(([b,w])=>t.jsxs(y,{children:[t.jsx(C,{color:a.palette.gray[400],mb:.25,size:"sm",children:b}),w.map(({label:v,icon:j="filter-list"})=>m(v,j))]},b))}):t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:l.length>0?"auto":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:l.length>0?t.jsx(Me,{id:"filters-options",onSubmit:$,options:l}):e.map(({label:b,icon:w="filter-list"})=>m(b,w))})},Zt=({options:e,onApplyFilters:n,modalRef:i,variant:r})=>{const[a,o]=x.useState("row"),c=s.nt(),l=x.useRef(null),d=t.jsx(B,{icon:"close",iconColor:c.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return x.useEffect(()=>{const p=g=>{const u=l.current;u&&!u.contains(g.target)&&i.close()};return document.addEventListener("mousedown",p,!0),()=>{document.removeEventListener("mousedown",p,!0)}},[l,i]),t.jsx(Er,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Xe,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:l,style:{width:"max-content"},children:[a==="column"?d:void 0,t.jsx(Xt,{onApplyFilters:n,options:e,setDirection:o,variant:r}),a==="row"?d:void 0]})})};function Lr(e){if(e)return e}function Pr(e){if(!e||e.length===0)return;const n=e.filter(r=>r.checked).map(r=>r.label??r.value);return n.length===0?void 0:n.join(", ")}function Ar(e,n){const i=s._.isEmpty(e)&&typeof e!="number"?void 0:Number(e),r=s._.isEmpty(n)&&typeof n!="number"?void 0:Number(String(n));if(!s._.isUndefined(i)&&!s._.isUndefined(r))return`${i} - ${r}`;if(!s._.isUndefined(i))return`Min ${i}`;if(!s._.isUndefined(r))return`Max ${r}`}function Wr(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 Br(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const re=({filter:e,icon:n="filter-list",label:i,onClose:r,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx(y,{pr:.25,children:t.jsx(K,{filterValues:a,icon:n,id:"remove-filter",onClose:r(e),tagLabel:`${i} `})},i),Hr=({options:e,onClose:n})=>{const i=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:c,type:l,value:d,options:p,minValue:g,maxValue:u}=a;switch(l){case"numberRange":{const f=Ar(g,u);return t.jsx(re,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},c)}case"dateRange":{const f=Wr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(re,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},c)}case"radioButton":case"checkboxes":{const f=Pr(p);return t.jsx(re,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},c)}case void 0:case"select":case"text":default:{const f=Lr(d),h=Br(l,r.label,o);return t.jsx(re,{filter:a,filterValue:f,icon:r.icon,label:h,onClose:n},c)}}})).filter(r=>{if(r===null)return!1;const{filterValue:a}=r.props;return!s._.isNil(a)&&!s._.isEmpty(String(a))});return i.length>0?t.jsx(y,{display:"flex",wrap:"wrap",children:i}):void 0},Mr=(e,n)=>{function i(c,l){if(l.value===""||l.value===void 0||s._.defaultTo(l.isBackFilter,!1))return!0;switch(l.filterFn){case"includesInsensitive":return String(c[l.key]).toLowerCase().includes(l.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(c[l.key]).toLowerCase()===l.value.toLowerCase()}}function r(c,l){if(!l.options||l.options.length===0)return!0;const d=l.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(c[l.key]))}function a(c,l,d){const p=d(String(c[l.key])),{minValue:g,maxValue:u}=l,f=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(f)&&s._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(c){return n.every(l=>{if(typeof l.key=="function")return l.key(c,l.value);switch(l.type){case"radioButton":case"checkboxes":return r(c,l);case"numberRange":return a(c,l,Number);case"dateRange":return a(c,l,d=>new Date(d));case"select":case"text":default:return i(c,l)}})}return e.filter(o)},lt=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,Or=e=>{var i;const n=((i=e.options)==null?void 0:i.map(r=>({...r,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Vr=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:r,onFiltersChange:a,variant:o="ungrouped"})=>{const c=Ee("filters-modal"),[l,d]=x.useState([]),[p,g]=x.useState(lt(l)),u=i.map(m=>({...m,filterOptions:m.filterOptions.map(b=>l.find(v=>v.key===b.key&&v.type===b.type&&v.filterFn===b.filterFn)??{...b})})),f=x.useCallback(m=>{d([...m]),localStorage.setItem(n,JSON.stringify(m))},[d,n]),h=x.useCallback(m=>()=>{const b=l.map(w=>w.key===m.key&&w.type===m.type&&w.filterFn===m.filterFn?Or(w):w);d(b),localStorage.setItem(n,JSON.stringify(b))},[l,n]);return x.useEffect(()=>{const m=localStorage.getItem(n),b=m?JSON.parse(m):i.flatMap(w=>w.filterOptions);d(b)},[n,i,d]),x.useEffect(()=>{r&&e!==void 0&&r(Mr(e,l)),g(lt(l)),a==null||a(l)},[e,l,r,g,a]),{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:c.toggle,tag:p.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(Zt,{modalRef:c,onApplyFilters:f,options:u,variant:o})]}),options:u,removeFilter:h}},Jt=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:r=void 0,confirmButton:a=void 0,content:o=void 0,description:c=void 0,modalRef:l,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const $=s.nt(),m=t.jsx(Wt,{"aria-label":l.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Xe,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Ht,{description:c,modalRef:l,onClose:p,otherActions:d,title:u}),g&&t.jsx(y,{borderTop:`1px solid ${$.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Ze,{items:g})}),(s._.isObject(o)||r)&&t.jsxs(gr,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(hr,{$framed:o.imageFramed,children:t.jsx(ee,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(C,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:a,modalRef:l})]})});return e&&l.isOpen?ne.createPortal(m,document.getElementById("portals")??document.body):l.isOpen?m:null},_r=()=>{const[e,n]=x.useState(!1),[i,r]=x.useState(),a=x.useRef(null),o=Ee("confirm-dialog-modal"),c=x.useCallback(async g=>(r(g),n(!0),new Promise(u=>{a.current=u})),[]),l=x.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=x.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return x.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(Jt,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:l,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:c}},Oe=({buttonProps:e,variant:n})=>t.jsx(L,{onClick:e.onClick,variant:n,children:e.text}),Gr=s.dt.div`
|
|
1973
1973
|
display: flex;
|
|
1974
1974
|
flex-direction: column;
|
|
1975
1975
|
align-items: center;
|
|
@@ -2067,7 +2067,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2067
2067
|
background-color: ${e.palette.gray[100]};
|
|
2068
2068
|
}
|
|
2069
2069
|
`}
|
|
2070
|
-
`,Qt=({isSelected:e=!1,label:n,onSelect:i})=>{const r=s.nt(),a=x.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:a,children:[e?t.jsx(I,{icon:"check",iconColor:r.palette.gray[800],iconSize:"xs"}):null,t.jsx(C,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ta=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:r,onClose:a,selectedItem:o,title:c,variant:l})=>{const d=s.nt(),[p,g]=x.useState(n),[u,f]=x.useState(""),h=x.useCallback(b=>{g(w=>w.filter(
|
|
2070
|
+
`,Qt=({isSelected:e=!1,label:n,onSelect:i})=>{const r=s.nt(),a=x.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:a,children:[e?t.jsx(I,{icon:"check",iconColor:r.palette.gray[800],iconSize:"xs"}):null,t.jsx(C,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ta=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:r,onClose:a,selectedItem:o,title:c,variant:l})=>{const d=s.nt(),[p,g]=x.useState(n),[u,f]=x.useState(""),h=x.useCallback(b=>{g(w=>w.filter(v=>String(v.name).toLowerCase().includes(b.toLocaleLowerCase())))},[g]),$=x.useCallback(b=>{b.currentTarget&&(f(b.currentTarget.value),h(b.currentTarget.value))},[f,h]);x.useEffect(()=>{g(n),h(u)},[n,h,u]);const m=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(ea,{$itemsLength:p.length,children:[t.jsxs(y,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(C,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:c}),t.jsx(B,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:a,variant:"ghost"})]}),t.jsx(y,{mt:1,children:t.jsx(le,{onInput:$,placeholder:"Search"})}),t.jsx(te,{mb:1,mt:1}),t.jsxs(y,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[l==="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(C,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(b=>t.jsx(Qt,{isSelected:o.toLowerCase()===b.name,label:b.name.charAt(0).toUpperCase()+b.name.slice(1),onSelect:r},b.name))]})]})})});return e?ne.createPortal(m,document.body):t.jsx("div",{})},na=({description:e,height:n="auto",leftIconName:i,children:r,rightIconName:a,title:o,tooltipId:c,tooltipTip:l,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=s.nt(),f=p==="centered",h=c&&t.jsx(U,{icon:a??i,iconColor:u.palette.gray[800],id:c,place:d,tip:l});return t.jsxs(y,{alignItems:f?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:f?"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:[f||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(C,{color:f?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||s.lodashExports.isUndefined(a)?void 0:h]}),t.jsxs(y,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[f&&!s.lodashExports.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(G,{fontWeight:"bold",size:"md",children:o}),r]}),f&&!s.lodashExports.isUndefined(a)?h:void 0]})]})},ia=({actions:e,children:n,header:i,title:r,tabs:a,footer:o})=>{const c=s.nt();return t.jsxs(y,{alignItems:"flex-start",bgColor:c.palette.white,borderLeft:`1px solid ${c.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs(y,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${c.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(C,{color:c.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:r}),i]}),e&&t.jsx(y,{display:"flex",gap:.25,children:e.map(({icon:l,onClick:d},p)=>t.jsx(B,{icon:l??"paper-plane",iconColor:c.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${l}`))})]}),t.jsx(y,{display:"flex",pt:.25,width:"100%",children:t.jsx(Ze,{items:a})}),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 ${c.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:l,text:d,onClick:p},g)=>t.jsx(L,{icon:l,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},ra=s.dt.span`
|
|
2071
2071
|
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2072
2072
|
background-color: ${n};
|
|
2073
2073
|
border-radius: 5px;
|
|
@@ -2169,7 +2169,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2169
2169
|
right: 16px;
|
|
2170
2170
|
}
|
|
2171
2171
|
`}
|
|
2172
|
-
`,
|
|
2172
|
+
`,va=s.dt.div`
|
|
2173
2173
|
${({theme:e,$variant:n})=>`
|
|
2174
2174
|
height: ${e.spacing[2.5]};
|
|
2175
2175
|
width: ${e.spacing[2.5]};
|
|
@@ -2200,7 +2200,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2200
2200
|
color: ${e.palette[n][500]};
|
|
2201
2201
|
}
|
|
2202
2202
|
`}
|
|
2203
|
-
`,
|
|
2203
|
+
`,ja=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",ka=({description:e,onClose:n,title:i,variant:r})=>{const a=s.nt(),o=x.useCallback(()=>{n==null||n()},[n]);return t.jsxs(wa,{$variant:r,className:`notification notification__${r}`,role:"alertdialog",children:[t.jsxs(va,{$variant:r,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:ja(r),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(y,{pr:1.5,children:[t.jsx(G,{fontWeight:"bold",size:"xs",children:i}),t.jsx(C,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(B,{height:"fit-content",icon:"close",iconColor:a.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Ca=s.dt.div`
|
|
2204
2204
|
width: fit-content;
|
|
2205
2205
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2206
2206
|
border-radius: 4px;
|
|
@@ -2233,7 +2233,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2233
2233
|
&::-webkit-inner-spin-button {
|
|
2234
2234
|
opacity: 1;
|
|
2235
2235
|
}
|
|
2236
|
-
`,za=x.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:r=0,max:a,min:o,name:c,onEnter:l,tooltipMessage:d,...p},g){const u=i<0?0:i,[f,h]=x.useState(Number(r).toFixed(u)),$=x.useCallback(w=>{const
|
|
2236
|
+
`,za=x.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:r=0,max:a,min:o,name:c,onEnter:l,tooltipMessage:d,...p},g){const u=i<0?0:i,[f,h]=x.useState(Number(r).toFixed(u)),$=x.useCallback(w=>{const v=s.lodashExports.toNumber(w.target.value);w.target.value.endsWith(".")?h(w.target.value):v>=Number(o)&&v<=Number(a)&&(h(String(v)),n&&l(s.lodashExports.toNumber(v.toFixed(u)))),w.stopPropagation()},[n,u,a,o,l]),m=x.useCallback(w=>{w.currentTarget.contains(w.relatedTarget)||h(Number(r).toFixed(u)),w.stopPropagation()},[u,r]),b=x.useCallback(w=>{w.stopPropagation(),w.key==="Enter"&&!s.lodashExports.isEmpty(w.currentTarget.value)&&l(s.lodashExports.toNumber(w.currentTarget.value))},[l]);return t.jsx(Ca,{onBlur:m,tabIndex:-1,children:t.jsx(U,{id:"numberInputTooltip",tip:d,children:t.jsx(Sa,{...p,"aria-label":c,"aria-valuemax":Number(a),"aria-valuemin":Number(o),"aria-valuenow":Number(f),max:a,min:o,name:c,onChange:$,onKeyUp:b,ref:g,step:10**-u,type:"number",value:f})})})}),Ia={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},Ve=({icon:e,label:n,onClick:i,onlyLabel:r=!1,provider:a="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:[r?!1:t.jsx(y,{height:"24px",width:"24px",children:e===void 0?t.jsx(ee,{alt:`${a} Logo`,height:"100%",publicId:Ia[a],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(C,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:r?"break-spaces":"nowrap",wordWrap:"unset",children:n??a})})]})},Ta=({align:e="end",buttonLabel:n="Add Credential",children:i,id:r,manualOption:a,providers:o})=>{const c=s.nt(),[l,d]=x.useState(!1),p=x.useRef(null);ye(p.current,()=>{d(!1)},!0);const g=x.useCallback(h=>{a==null||a.onClick(h),d(!1)},[a]),u=x.useCallback(()=>{d(h=>!h)},[d]),f=x.useCallback(h=>$=>{var m;(m=o[h])==null||m.onClick($),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(L,{icon:"plus",onClick:u,variant:"primary",children:n}),t.jsxs(y,{alignItems:"center",bgColor:"#fff",border:`1px solid ${c.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:r,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:l?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(Ve,{onClick:f(h),provider:h},h)),a===void 0?void 0:t.jsx(Ve,{icon:"square-plus",label:a.label??"Add manually",onClick:g}),i]})]})},en=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(C,{bgGradient:z.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),Fa=s.dt.div`
|
|
2237
2237
|
${({className:e,theme:n})=>`
|
|
2238
2238
|
align-items: flex-start;
|
|
2239
2239
|
border-radius: ${n.spacing[1]};
|
|
@@ -2299,7 +2299,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2299
2299
|
}
|
|
2300
2300
|
`}
|
|
2301
2301
|
`;const Na={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
|
|
2302
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Ea=({description:e,onClick:n,plan:i})=>{const{title:r,description:a,benefits:o,buttonText:c}=Na[i],l=e??a;return t.jsxs(Fa,{className:i,children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&en,t.jsx(G,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:r}),t.jsx(C,{color:z.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(C,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:l}),t.jsx(L,{onClick:n,variant:"primary",children:c})]})},tn=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),r=typeof n=="string",a=r?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(C,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:r?t.jsxs(x.Fragment,{children:[t.jsx(oe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(a).map((o,c)=>n.includes(o)?t.jsx(oe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${c+1}-bold`):o)}):t.jsx(C,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Ra=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:r,confirmButton:a,container:o,description:c,highlightDescription:l="",image:d,maxWidth:p,title:g,titleColor:u})=>{const f=s.nt(),{alt:h,src:$,width:m="77px",height:b="77px"}=d,w=x.useCallback(()=>{n==null||n.onClick()},[n]),
|
|
2302
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Ea=({description:e,onClick:n,plan:i})=>{const{title:r,description:a,benefits:o,buttonText:c}=Na[i],l=e??a;return t.jsxs(Fa,{className:i,children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&en,t.jsx(G,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:r}),t.jsx(C,{color:z.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(C,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:l}),t.jsx(L,{onClick:n,variant:"primary",children:c})]})},tn=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),r=typeof n=="string",a=r?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(C,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:r?t.jsxs(x.Fragment,{children:[t.jsx(oe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(a).map((o,c)=>n.includes(o)?t.jsx(oe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${c+1}-bold`):o)}):t.jsx(C,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Ra=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:r,confirmButton:a,container:o,description:c,highlightDescription:l="",image:d,maxWidth:p,title:g,titleColor:u})=>{const f=s.nt(),{alt:h,src:$,width:m="77px",height:b="77px"}=d,w=x.useCallback(()=>{n==null||n.onClick()},[n]),v=x.useCallback(()=>{a==null||a.onClick()},[a]),j=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:f.palette.white,border:`1px solid ${f.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:b,publicId:$,width:m})}),t.jsxs(y,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(G,{color:u,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(tn,{description:c,highlightDescription:l})]})]}),r&&t.jsx(y,{mb:1,scroll:"y",children:t.jsx(y,{height:"100%",children:r})}),t.jsxs(y,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(a)?t.jsx(L,{onClick:v,variant:(a==null?void 0:a.variant)??"primary",children:a==null?void 0:a.text},a==null?void 0:a.key):void 0,s.lodashExports.isObject(n)?t.jsx(L,{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(j,o??document.body):j},Da=s.dt.div`
|
|
2303
2303
|
${({theme:e})=>`
|
|
2304
2304
|
height: ${e.spacing[1]};
|
|
2305
2305
|
width: ${e.spacing[1]};
|
|
@@ -2456,7 +2456,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2456
2456
|
height: auto;
|
|
2457
2457
|
}
|
|
2458
2458
|
`}
|
|
2459
|
-
`,Xa=({children:e,closeIconId:n="close-menu",isOpen:i,items:r,onClose:a,primaryButtonText:o,primaryOnClick:c,secondaryButtonText:l,secondaryOnClick:d,title:p})=>{const g=s.nt(),u=x.useRef(null),f=x.useCallback(h=>()=>{h(),a()},[a]);return x.useEffect(()=>{const h=["mousedown","touchstart"],$=m=>{var k;const b=m.target,w=document.getElementById("helpBtn"),
|
|
2459
|
+
`,Xa=({children:e,closeIconId:n="close-menu",isOpen:i,items:r,onClose:a,primaryButtonText:o,primaryOnClick:c,secondaryButtonText:l,secondaryOnClick:d,title:p})=>{const g=s.nt(),u=x.useRef(null),f=x.useCallback(h=>()=>{h(),a()},[a]);return x.useEffect(()=>{const h=["mousedown","touchstart"],$=m=>{var k;const b=m.target,w=document.getElementById("helpBtn"),v=document.getElementById("filterBtn"),j=(b===w||((w==null?void 0:w.contains(b))??!1)||b===v||(v==null?void 0:v.contains(b)))??!1;i&&!j&&!(((k=u.current)==null?void 0:k.contains(b))??!1)&&a()};return h.forEach(m=>{document.addEventListener(m,$,{passive:!0})}),()=>{h.forEach(m=>{document.removeEventListener(m,$)})}},[i,a]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(Ka,{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(C,{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:a,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:[(r??[]).map(({customBadge:h,description:$,icon:m,onClick:b,requiresUpgrade:w,title:v})=>t.jsx(rn,{customBadge:h,description:$,icon:m,onClick:f(b),requiresUpgrade:w,title:v},v)),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:[l===void 0?void 0:t.jsx(L,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:l}),t.jsx(L,{onClick:c,type:"submit",children:o})]})]})]})})})},Za=(e,n)=>n>=50?`
|
|
2460
2460
|
${e.palette.gray[200]} 50%,
|
|
2461
2461
|
${e.palette.primary[500]} 50.05%,
|
|
2462
2462
|
${e.palette.primary[500]} ${n}%,
|
|
@@ -2784,4 +2784,4 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2784
2784
|
color: ${e.palette.white};
|
|
2785
2785
|
}
|
|
2786
2786
|
`}
|
|
2787
|
-
`,yo=({defaultSelection:e,options:n,handleClick:i})=>{const[r,a]=x.useState(e??n[0]),o=x.useCallback(c=>()=>{a(c),i(c)},[i]);return t.jsx(bo,{children:n.map((c,l)=>t.jsx($o,{className:`${c.includes(r)&&"selected"}`,onClick:o(c),children:t.jsx(C,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:c})},`${c}-${l}`))})},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[r,a]=x.useState(e),[o,c]=x.useState(0),l=x.useCallback(d=>{const{action:p,index:g,status:u,type:f}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(f)?c(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(a(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:l,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:r,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})};exports.Accordion=An;exports.AccordionContent=gt;exports.ActionButton=He;exports.Alert=Un;exports.AppliedFilter=re;exports.AppliedFilters=Hr;exports.ArrayField=Ae;exports.Avatar=ei;exports.BaseButtonComponent=_e;exports.BaseComponent=be;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=Ge;exports.Button=L;exports.Button$1=
|
|
2787
|
+
`,yo=({defaultSelection:e,options:n,handleClick:i})=>{const[r,a]=x.useState(e??n[0]),o=x.useCallback(c=>()=>{a(c),i(c)},[i]);return t.jsx(bo,{children:n.map((c,l)=>t.jsx($o,{className:`${c.includes(r)&&"selected"}`,onClick:o(c),children:t.jsx(C,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:c})},`${c}-${l}`))})},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[r,a]=x.useState(e),[o,c]=x.useState(0),l=x.useCallback(d=>{const{action:p,index:g,status:u,type:f}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(f)?c(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(a(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:l,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:r,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})};exports.Accordion=An;exports.AccordionContent=gt;exports.ActionButton=He;exports.Alert=Un;exports.AppliedFilter=re;exports.AppliedFilters=Hr;exports.ArrayField=Ae;exports.Avatar=ei;exports.BaseButtonComponent=_e;exports.BaseComponent=be;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=Ge;exports.Button=L;exports.Button$1=je;exports.ButtonToolbarCenter=Ci;exports.ButtonToolbarRow=zi;exports.ButtonToolbarStartRow=Si;exports.Calendar=mt;exports.Calendar$1=Ct;exports.Calendar$2=zt;exports.CalendarCell=yt;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=ii;exports.CardWithInput=Ui;exports.CardWithOptions=Nt;exports.CardWithSelector=Qi;exports.CardWithSwitch=nr;exports.Carousel=lr;exports.Checkbox=Ne;exports.CodeSnippet=dr;exports.Col=Pe;exports.ColumFilters=Zt;exports.ColumnsModal=Fr;exports.ComboBox=bt;exports.ComboBoxField=Le;exports.Container=y;exports.CustomThemeProvider=Tn;exports.DateField=vt;exports.DateSelector=se;exports.Description=tn;exports.Dialog=Te;exports.Divider=te;exports.Editable=ki;exports.EmptyButton=Oe;exports.EmptyState=qr;exports.FilePreview=ft;exports.FilterControl=Yt;exports.FilterForm=Me;exports.FilterFormContent=qt;exports.FiltersList=Xt;exports.FixedTabs=uo;exports.Form=Zr;exports.Gap=Fi;exports.GridContainer=Qr;exports.GroupSelector=ta;exports.Header=Ie;exports.Header$1=Ht;exports.Heading=G;exports.Icon=I;exports.IconButton=B;exports.IndicatorCard=na;exports.InfoSidebar=ia;exports.InnerForm=Kr;exports.Input=Fe;exports.InputArray=Ei;exports.InputDate=kt;exports.InputDateRange=St;exports.InputDateTime=ji;exports.InputFile=Pi;exports.InputNumber=Tt;exports.InputNumberRange=Ft;exports.InputTags=Wi;exports.Label=Ye;exports.Link=Z;exports.ListItem=me;exports.ListItemsWrapper=Vt;exports.LittleFlag=aa;exports.Loading=ua;exports.LocationCode=At;exports.Logo=fa;exports.Lottie=ba;exports.MemoizedImage=ee;exports.Menu=$a;exports.MenuItem=rn;exports.MessageBanner=ma;exports.Modal=Jt;exports.ModalConfirm=br;exports.ModalFooter=Bt;exports.Notification=ka;exports.NotificationSign=Mt;exports.NumberField=Ce;exports.NumberInput=za;exports.OAuthSelector=Ta;exports.Option=ht;exports.OptionBoxContainer=Je;exports.OptionContainer=Ve;exports.OptionContainer$1=Qt;exports.OutlineContainer=H;exports.PhoneInput=_i;exports.PlanCard=Ea;exports.PopUp=Ra;exports.Popover=$e;exports.PremiumFeature=nn;exports.PreviewPanel=_t;exports.PriorityScore=La;exports.ProgressBar=Ha;exports.RadioButton=Ke;exports.RecommendedTag=en;exports.Row=It;exports.ScrollUpButton=Oa;exports.Search=le;exports.SearchPanel=Ut;exports.SeverityBadge=_a;exports.SeverityOverview=Ua;exports.SeverityOverviewBadge=ae;exports.ShowOnHover=qa;exports.SlideOutMenu=Xa;exports.Slider=no;exports.Span=oe;exports.StepLapse=lo;exports.Tab=Ot;exports.TableButton=go;exports.Tabs=Ze;exports.Tag=K;exports.TagsField=Be;exports.Text=C;exports.TextArea=Gi;exports.Thumb=an;exports.TimeField=jt;exports.TimeLine=ho;exports.TimeLineCard=on;exports.Toggle=Lt;exports.ToggleButton=yo;exports.Tooltip=U;exports.Tour=wo;exports.baseStep=mo;exports.getStyledConfig=he;exports.hiddenProps=dt;exports.icons=zn;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=In;exports.useCarousel=Et;exports.useClickOutside=ye;exports.useCloudinaryImage=Rt;exports.useColumnsModal=qi;exports.useConfirmDialog=_r;exports.useDebouncedCallback=Dt;exports.useFilterForm=Kt;exports.useFilters=Vr;exports.useModal=Ee;exports.useSearch=Ki;exports.variantBuilder=q;
|