@fluidattacks/design 3.11.0 → 3.11.1-pr
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/@core/index.js +1 -1
- package/dist/components/accordion/accordion-content/index.js +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/styles.d.ts +3 -1
- package/dist/components/button/types.d.ts +3 -2
- 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/content-card/category-tag/index.js +1 -1
- package/dist/components/content-card/event-date/index.js +1 -1
- package/dist/components/content-card/index.js +1 -1
- package/dist/components/content-card-carousel/index.js +1 -1
- package/dist/components/content-card-carousel/scroll-buttons/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.d.ts +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/form/types.d.ts +2 -0
- 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/icon-button/styles.d.ts +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-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/interactive-card/icon/index.js +1 -1
- package/dist/components/interactive-card/index.js +1 -1
- package/dist/components/language-selector/index.js +1 -1
- package/dist/components/language-selector/item-list/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/logo-carousel/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/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/filters-modal/single-column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/two-columns-filters/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/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/search-bar/index.js +1 -1
- package/dist/components/search-bar/item-searching/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/web-form/index.js +1 -1
- package/dist/{components-BVCpVBz5.js → components-BCaT1VeN.js} +27 -27
- package/dist/{components-G0LfJsQQ.mjs → components-BzIZD9W_.mjs} +271 -268
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`},Pn=e=>e.includes("x")?"overflow-x: auto;":"",Ln=e=>e.includes("y")?"overflow-y: auto;":"",de=e=>{const n=e.scroll?`
|
|
17
17
|
${Pn(e.scroll)}
|
|
18
18
|
${Ln(e.scroll)}
|
|
19
|
-
`:"",i=F("visibility",e.visibility),a=F("display",e.display),r=F("height",e.height),o=F("width",e.width),l=F("max-height",e.maxHeight),c=F("max-width",e.maxWidth),d=F("min-height",e.minHeight),p=F("min-width",e.minWidth),x=F("box-shadow",e.shadow?I.shadows[e.shadow]:void 0),g=F("gap",e.gap===void 0?void 0:I.spacing[e.gap]),f=F("background-color",e.bgColor),h=F("background",e.bgGradient),y=F("flex-direction",e.flexDirection),b=F("flex-grow",e.flexGrow),m=F("justify-content",e.justify),
|
|
19
|
+
`:"",i=F("visibility",e.visibility),a=F("display",e.display),r=F("height",e.height),o=F("width",e.width),l=F("max-height",e.maxHeight),c=F("max-width",e.maxWidth),d=F("min-height",e.minHeight),p=F("min-width",e.minWidth),x=F("box-shadow",e.shadow?I.shadows[e.shadow]:void 0),g=F("gap",e.gap===void 0?void 0:I.spacing[e.gap]),f=F("background-color",e.bgColor),h=F("background",e.bgGradient),y=F("flex-direction",e.flexDirection),b=F("flex-grow",e.flexGrow),m=F("justify-content",e.justify),w=F("justify-self",e.justifySelf),j=F("align-items",e.alignItems),S=F("align-self",e.alignSelf),C=F("flex-wrap",e.wrap);return`
|
|
20
20
|
${n}
|
|
21
21
|
${i}
|
|
22
22
|
${a}
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
${y}
|
|
34
34
|
${b}
|
|
35
35
|
${m}
|
|
36
|
-
${j}
|
|
37
36
|
${w}
|
|
38
|
-
${
|
|
37
|
+
${j}
|
|
39
38
|
${S}
|
|
39
|
+
${C}
|
|
40
40
|
`},pe=e=>{const n=F("color",e.color),i=F("font-family",e.fontFamily),a=F("font-size",e.fontSize),r=F("font-weight",e.fontWeight),o=F("line-spacing",e.letterSpacing),l=F("line-height",e.lineSpacing),c=F("text-align",e.textAlign),d=F("text-decoration",e.textDecoration),p=F("text-overflow",e.textOverflow),x=F("white-space",e.whiteSpace),g=F("word-break",e.wordBreak),f=F("word-wrap",e.wordWrap);return`
|
|
41
41
|
${n}
|
|
42
42
|
${i}
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
|
|
179
179
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
180
180
|
`}
|
|
181
|
-
`,A=u.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:x,size:g,sizeMd:f,sizeSm:h,textFill:y,whiteSpace:b,wordBreak:m,...
|
|
181
|
+
`,A=u.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:x,size:g,sizeMd:f,sizeSm:h,textFill:y,whiteSpace:b,wordBreak:m,...w},j){return t.jsx(An,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:x,$size:g,$sizeMd:f,$sizeSm:h,$textFill:y,$whiteSpace:b,$wordBreak:m,className:a,ref:j,...w,children:i})}),we=u.forwardRef(function({children:n,color:i,content:a,display:r,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:x,sizeMd:g,sizeSm:f,...h},y){return t.jsx(Bn,{$color:i,$content:a,$display:r,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:x,$sizeMd:g,$sizeSm:f,ref:y,...h,children:n})}),v=u.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:x,size:g,sizeMd:f,sizeSm:h,textFill:y,whiteSpace:b,wordBreak:m,...w},j){return t.jsx(ft,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:x,$size:g,$sizeMd:f,$sizeSm:h,$textFill:y,$whiteSpace:b,$wordBreak:m,className:a,ref:j,...w,children:i})}),ht=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(v,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[n,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},Mn={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Vn=s.dt(xt)`
|
|
182
182
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:a,$rotation:r,$size:o,$secondaryColor:l})=>{const c=a?"":"brightness(50%)",d=a??"";return`
|
|
183
183
|
color: ${n};
|
|
184
184
|
cursor: ${e?"pointer":"inherit"};
|
|
@@ -366,13 +366,13 @@
|
|
|
366
366
|
color: ${e.palette.white};
|
|
367
367
|
}
|
|
368
368
|
`})),bt=s.dt(Oe)`
|
|
369
|
-
${({theme:e,$variant:
|
|
369
|
+
${({theme:e,$size:n,$variant:i})=>`
|
|
370
370
|
align-items: center;
|
|
371
371
|
border-radius: var(--btn-spacing);
|
|
372
372
|
cursor: pointer;
|
|
373
373
|
display: inline-flex;
|
|
374
374
|
font-family: ${e.typography.type.primary};
|
|
375
|
-
font-size: ${e.typography.text.sm};
|
|
375
|
+
font-size: ${n??e.typography.text.sm};
|
|
376
376
|
font-weight: ${e.typography.weight.regular};
|
|
377
377
|
gap: var(--btn-spacing);
|
|
378
378
|
justify-content: center;
|
|
@@ -384,10 +384,10 @@
|
|
|
384
384
|
white-space: nowrap;
|
|
385
385
|
|
|
386
386
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
387
|
-
${
|
|
387
|
+
${i!=="link"?`--btn-padding-y: ${e.spacing[1]}`:""};
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
${Yn(e,
|
|
390
|
+
${Yn(e,i??"primary")}
|
|
391
391
|
`}
|
|
392
392
|
`,Kn=s.dt(bt)`
|
|
393
393
|
${({theme:e,$borderRadius:n="4px",$px:i=.5,$py:a=.5})=>`
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
width: max-content;
|
|
415
415
|
z-index: 999999;
|
|
416
416
|
`}
|
|
417
|
-
`,Y=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:x="bottom",tip:g="",title:f="",hide:h=g===""&&f===""&&p===void 0,width:y})=>{const b=s.nt(),[m,
|
|
417
|
+
`,Y=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:x="bottom",tip:g="",title:f="",hide:h=g===""&&f===""&&p===void 0,width:y})=>{const b=s.nt(),[m,w]=u.useState(!1),{refs:j,floatingStyles:S,context:C}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:w,open:m,placement:x,whileElementsMounted:s.autoUpdate}),k=s.useHover(C,{delay:{close:0,open:500},move:!1}),N=s.useFocus(C),T=s.useRole(C,{role:r?"label":"tooltip"}),{getReferenceProps:R,getFloatingProps:W}=s.useInteractions([k,N,T]);return n?t.jsx(u.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(qn,{...R(),display:i,height:a,id:c,ref:j.setReference,width:y,children:r?t.jsx(z,{clickable:!0,disabled:n,icon:r,iconColor:o,iconSize:l??"xxs",iconType:m?"fa-solid":"fa-light"}):e}),m&&!h&&G.createPortal(t.jsxs(Xn,{...W(),$maxWidth:d,id:`floating-${c}`,ref:j.setFloating,style:S,children:[s.lodashExports.isEmpty(f)?void 0:t.jsx(v,{color:b.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),s.lodashExports.isEmpty(g)?void 0:t.jsx(v,{color:b.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:g}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},B=u.forwardRef(function({borderRadius:n,disabled:i,icon:a,iconColor:r,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:x,px:g,py:f,type:h="button",tooltip:y,tooltipPlace:b,value:m,variant:w="primary",...j},S){const C=t.jsx(Kn,{$borderRadius:n,$px:g,$py:f,$variant:w,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:p,onClick:x,ref:S,type:h,value:m,...j,children:t.jsx(z,{clickable:!1,icon:a,iconColor:r,iconSize:o,iconTransform:l,iconType:c})}),N=(h+(w??"")+(d??a)).replace(/ /u,"_");return y===void 0?C:t.jsx(Y,{id:`${N}-tooltip`,place:b,tip:y,children:C})}),Zn=u.forwardRef(function({autoHide:n=!1,children:i,closable:a=!1,onTimeOut:r,show:o=!0,time:l=8,variant:c="error",id:d,...p},x){const[g,f]=u.useState(o),h=u.useCallback(()=>{f(!1)},[]);return u.useEffect(()=>{const y=setTimeout(()=>{r==null||r(!0),n&&h()},l*1e3);return()=>{clearTimeout(y)}},[n,h,l,r]),u.useEffect(()=>{f(o)},[o,f]),t.jsx($,{display:g?"block":"none",ref:x,role:"alert",...p,children:t.jsxs(Gn,{$variant:c,id:d,children:[t.jsx(z,{clickable:!1,icon:On(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(Un,{children:i}),a?t.jsx(B,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),nt=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
|
${$t}
|
|
633
633
|
`,ii=s.dt(Ee.Link)`
|
|
634
634
|
${$t}
|
|
635
|
-
`,q=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(z,{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(ni,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(ii,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},X=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:x="default",tagTitle:g="",tagLabel:f,variant:h="default"})=>{const y=f.length>25&&s.lodashExports.isEmpty(g+o),b=`${f.slice(0,25)}...`;return t.jsxs(we,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(ei,{$fontSize:l,$variant:h,className:x,children:[n&&t.jsx(z,{icon:n,iconColor:i,iconSize:"xxs",iconType:a}),t.jsxs("span",{children:[t.jsx("strong",{children:g}),t.jsx("span",{children:y?b:f}),t.jsx("strong",{children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(q,{href:c,children:d})]})},ai=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},D=u.forwardRef(function({children:n,disabled:i=!1,external:a=!1,
|
|
635
|
+
`,q=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(z,{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(ni,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(ii,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},X=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:x="default",tagTitle:g="",tagLabel:f,variant:h="default"})=>{const y=f.length>25&&s.lodashExports.isEmpty(g+o),b=`${f.slice(0,25)}...`;return t.jsxs(we,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(ei,{$fontSize:l,$variant:h,className:x,children:[n&&t.jsx(z,{icon:n,iconColor:i,iconSize:"xxs",iconType:a}),t.jsxs("span",{children:[t.jsx("strong",{children:g}),t.jsx("span",{children:y?b:f}),t.jsx("strong",{children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(q,{href:c,children:d})]})},ai=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},D=u.forwardRef(function({children:n,disabled:i=!1,external:a=!1,fontSize:r,href:o,id:l,icon:c,name:d,onClick:p,showArrow:x=!1,tag:g,type:f="button",tooltip:h,tooltipPlace:y="bottom",underline:b=!1,value:m,variant:w="primary",...j},S){const C=h!==void 0,k=`${l}-tooltip`,N=u.useCallback(()=>{o&&ai(o,a)},[a,o]);return t.jsx(Y,{disabled:!C,id:k,place:y,tip:h,children:t.jsxs(bt,{$size:r,$variant:w,"aria-disabled":i,className:b?"underline":void 0,disabled:i,id:l,name:d,onClick:w==="link"?N:p,ref:S,type:f,value:m,...C?{"data-tooltip-id":k}:{},...j,children:[c!==void 0&&t.jsx(z,{icon:c,iconSize:"xs",iconType:"fa-light"}),n,(x||w==="link")&&t.jsx(z,{icon:"arrow-right",iconSize:"xs",iconType:"fa-light"}),g===void 0?null:t.jsx(X,{tagLabel:g,variant:"inactive"})]})})}),ri=u.forwardRef(function({children:n,onClick:i,userName:a,showIcon:r=!1,showUsername:o=!1},l){const c=!!i;return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(D,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(nt,{children:a[0].toUpperCase()}),o?t.jsx(v,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:a.split(" ")[0]}):void 0,r?t.jsx(z,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(nt,{children:a[0].toUpperCase()}),o?t.jsxs(v,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",a.split(" ")[0],"!"]}):void 0,r?t.jsx(z,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(Jn,{children:n})]})})}),Ce=({authorEmail:e,date:n,description:i,descriptionColor:a,id:r,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const x=s.nt();return t.jsxs($,{width:"100%",children:[typeof o=="string"?t.jsx(v,{color:l??x.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:c,wordBreak:"break-word",children:o}):o,t.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(v,{color:a??x.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:i}),n&&t.jsx(v,{color:x.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(v,{color:x.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(Y,{icon:"circle-info",id:r,tip:p})]})]})},it=s.dt($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
636
636
|
& img {
|
|
637
637
|
display: block;
|
|
638
638
|
}
|
|
@@ -855,7 +855,7 @@
|
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
`}
|
|
858
|
-
`,mt=({item:e,state:n})=>{const i=s.nt(),a=u.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(gi,{...r,className:d,ref:a,children:[t.jsx(v,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(z,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},De=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:x,onChange:g,placeholder:f,required:h,tooltip:y,value:b,weight:m})=>{var tt;const
|
|
858
|
+
`,mt=({item:e,state:n})=>{const i=s.nt(),a=u.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(gi,{...r,className:d,ref:a,children:[t.jsx(v,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(z,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},De=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:x,onChange:g,placeholder:f,required:h,tooltip:y,value:b,weight:m})=>{var tt;const w=s.nt(),j=n?void 0:i,S=(e==null?void 0:e.value)??b,[C,k]=u.useState(((tt=p.find(L=>L.value===S))==null?void 0:tt.name)??""),[N,T]=u.useState(S),[R,W]=u.useState(p),[P,E]=u.useState(!1),{contains:M}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),O=u.useRef(null),te=u.useRef(null),Ne=u.useRef(null),Je=u.useRef(null),Qe=u.useRef(null),pn=u.useMemo(()=>p.map(L=>M(L.name,C)||P?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:L.name},L.value):null),[M,C,p,P]),gn=u.useCallback(L=>{k(L),L===""?E(!0):(E(!1),T(H=>{const $e=L===""?"":H;return e&&e.onChange($e),g&&g(L),$e}),W(p.filter(H=>M(H.name,L))))},[M,p,e,g]),un=u.useCallback(L=>{var H;k(((H=p.find($e=>$e.value===L))==null?void 0:H.name)??""),T(L?String(L):""),e&&e.onChange(L),g&&g(L?String(L):""),W(p)},[p,e,g]),et=u.useCallback(L=>{L.key==="Enter"&&L.preventDefault(),E(!1)},[]),xn=u.useCallback(()=>{x&&x(),e&&e.onBlur()},[e,x]),K=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:C,items:R,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:N,onBlur:xn,onInputChange:gn,onKeyDown:et,onKeyUp:()=>{E(!0)},onOpenChange(L,H){E(L&&(H==="manual"||H==="focus"))},onSelectionChange:un,children:pn}),{buttonProps:fn,inputProps:hn,listBoxProps:bn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:C,buttonRef:te,id:d,inputRef:O,label:l??d,listBoxRef:Ne,name:d,placeholder:f,popoverRef:Qe},K),{listBoxProps:$n}=s.$c132121280ec012d$export$50eacbbf140a3141(bn,K,Ne),{buttonProps:yn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(fn,te);return u.useEffect(()=>{var L;(c===!1||!S)&&k(((L=p.find(H=>H.value===S))==null?void 0:L.name)??"")},[S,p,c]),t.jsxs(V,{error:j,helpLink:a,helpLinkText:r,helpText:o,htmlFor:d,label:l,required:h,tooltip:y,weight:m,children:[t.jsxs(Z,{className:`${n?"disabled":""} ${j?"error":""}`,ref:Je,children:[t.jsx("input",{...hn,"aria-invalid":j?"true":"false","aria-label":d,onKeyDown:et,ref:O}),j?t.jsx(z,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}):void 0,t.jsx(B,{...yn,className:"action",icon:K.isOpen?"chevron-up":"chevron-down",iconColor:w.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:te,type:"button",variant:"ghost"})]}),K.isOpen&&K.collection.size>0&&!n?t.jsx(xe,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:Qe,state:K,triggerRef:Je,children:t.jsx(pi,{...$n,ref:Ne,children:[...K.collection].map(L=>t.jsx(mt,{item:L,state:K},L.key))})}):null]})},ui=({control:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:x,onChange:g,placeholder:f,required:h,tooltip:y,value:b,weight:m})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:w})=>t.jsx(De,{disabled:n,error:i,field:w,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:x,onChange:g,placeholder:f,required:h,tooltip:y,value:b,weight:m}),rules:{required:h}}):t.jsx(De,{disabled:n,error:i,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:x,onChange:g,placeholder:f,required:h,tooltip:y,value:b,weight:m}),xi=s.dt.div`
|
|
859
859
|
${({theme:e})=>`
|
|
860
860
|
align-items: center;
|
|
861
861
|
color: ${e.palette.gray[800]};
|
|
@@ -1087,7 +1087,7 @@
|
|
|
1087
1087
|
font-weight: ${e.typography.weight.bold};
|
|
1088
1088
|
}
|
|
1089
1089
|
`}
|
|
1090
|
-
`,je=({disabled:e=!1,icon:n,props:i})=>{const a=u.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,a);return t.jsx(wi,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(z,{icon:n,iconColor:I.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},ze=({state:e,prevButtonProps:n,nextButtonProps:i,title:a})=>{const r=e.focusedDate,o=u.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=u.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(je,{icon:"chevron-left",props:n}),t.jsxs(xi,{children:[a,t.jsxs(fi,{children:[t.jsx(rt,{"aria-label":"top",onClick:o,children:t.jsx(z,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(rt,{"aria-label":"bottom",onClick:l,children:t.jsx(z,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(je,{icon:"chevron-right",props:i})]})},kt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(ze,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(Se,{state:a}),t.jsx(Ue,{children:t.jsx(D,{onClick:e,variant:"ghost",children:"Cancel"})})]})},vt=({segment:e,state:n})=>{const i=s.nt(),a=u.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,a),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},Ct=({disabled:e,error:n=!1,props:i})=>{const a=s.nt(),r=u.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,r),c=u.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),x=d.currentTarget;Object.values(p).some(g=>g.contains(x))||(d.preventDefault(),d.stopPropagation())},[]);return u.useEffect(()=>{i.onChange&&o.value&&i.onChange(o.value)},[o.value]),t.jsxs(ji,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:a.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const x=`key_${p}`;return t.jsx(vt,{segment:{...d,isEditable:!e},state:o},x)})}),n?t.jsx(z,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},St=e=>{const n=u.useRef(null),i=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=i,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=u.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=u.useCallback(p=>{const x=p.currentTarget.name;x!==o&&(s.lodashExports.isNil(a)||(x==="AM"?i.setSegment("dayPeriod",0):x==="PM"&&i.setSegment("dayPeriod",12))),l(x)},[o,i,a]);return t.jsxs(ki,{children:[t.jsx(ot,{...c,ref:n,children:i.segments.slice(0,-2).map((p,x)=>{const g=`key_${x}`;return t.jsx(vt,{segment:p,state:i},g)})}),t.jsxs(ot,{children:[t.jsx(st,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(st,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},zt=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",vi=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",Ci=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",ae=({error:e,buttonProps:n,datePickerRef:i,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:x,value:g})=>{const[f,h]=u.useState(g??""),y=u.useCallback(b=>{const m=r==="day"?zt(String(b)):vi(String(b));o.onChange&&o.onChange(b??null),x&&x(c,m),h(m)},[o,r,c,x]);return t.jsxs(Z,{...l,className:`${a?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(Ct,{disabled:a,error:e!=null,props:{...o,autoFocus:!1,granularity:r,onChange:y,shouldForceLeadingZeros:!0}}),t.jsx(je,{disabled:a,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:a,id:c,name:c,type:"text",value:f})]})},Ie=({children:e,...n})=>{const i=u.useRef(null),{dialogProps:a}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(mi,{...a,ref:i,children:e})},It=({disabled:e=!1,error:n,helpLink:i,helpLinkText:a,helpText:r,required:o,label:l,name:c,register:d,setValue:p,tooltip:x,watch:g,...f})=>{const h=u.useRef(null),y=g==null?void 0:g(c),b=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,value:s._.isNil(y)||s._.isEmpty(y)||y==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(y.replace(/\//gu,"-"))}),{close:m}=b,{groupProps:
|
|
1090
|
+
`,je=({disabled:e=!1,icon:n,props:i})=>{const a=u.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,a);return t.jsx(wi,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(z,{icon:n,iconColor:I.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},ze=({state:e,prevButtonProps:n,nextButtonProps:i,title:a})=>{const r=e.focusedDate,o=u.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=u.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(je,{icon:"chevron-left",props:n}),t.jsxs(xi,{children:[a,t.jsxs(fi,{children:[t.jsx(rt,{"aria-label":"top",onClick:o,children:t.jsx(z,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(rt,{"aria-label":"bottom",onClick:l,children:t.jsx(z,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(je,{icon:"chevron-right",props:i})]})},kt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(ze,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(Se,{state:a}),t.jsx(Ue,{children:t.jsx(D,{onClick:e,variant:"ghost",children:"Cancel"})})]})},vt=({segment:e,state:n})=>{const i=s.nt(),a=u.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,a),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},Ct=({disabled:e,error:n=!1,props:i})=>{const a=s.nt(),r=u.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,r),c=u.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),x=d.currentTarget;Object.values(p).some(g=>g.contains(x))||(d.preventDefault(),d.stopPropagation())},[]);return u.useEffect(()=>{i.onChange&&o.value&&i.onChange(o.value)},[o.value]),t.jsxs(ji,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:a.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const x=`key_${p}`;return t.jsx(vt,{segment:{...d,isEditable:!e},state:o},x)})}),n?t.jsx(z,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},St=e=>{const n=u.useRef(null),i=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=i,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=u.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=u.useCallback(p=>{const x=p.currentTarget.name;x!==o&&(s.lodashExports.isNil(a)||(x==="AM"?i.setSegment("dayPeriod",0):x==="PM"&&i.setSegment("dayPeriod",12))),l(x)},[o,i,a]);return t.jsxs(ki,{children:[t.jsx(ot,{...c,ref:n,children:i.segments.slice(0,-2).map((p,x)=>{const g=`key_${x}`;return t.jsx(vt,{segment:p,state:i},g)})}),t.jsxs(ot,{children:[t.jsx(st,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(st,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},zt=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",vi=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",Ci=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",ae=({error:e,buttonProps:n,datePickerRef:i,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:x,value:g})=>{const[f,h]=u.useState(g??""),y=u.useCallback(b=>{const m=r==="day"?zt(String(b)):vi(String(b));o.onChange&&o.onChange(b??null),x&&x(c,m),h(m)},[o,r,c,x]);return t.jsxs(Z,{...l,className:`${a?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(Ct,{disabled:a,error:e!=null,props:{...o,autoFocus:!1,granularity:r,onChange:y,shouldForceLeadingZeros:!0}}),t.jsx(je,{disabled:a,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:a,id:c,name:c,type:"text",value:f})]})},Ie=({children:e,...n})=>{const i=u.useRef(null),{dialogProps:a}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(mi,{...a,ref:i,children:e})},It=({disabled:e=!1,error:n,helpLink:i,helpLinkText:a,helpText:r,required:o,label:l,name:c,register:d,setValue:p,tooltip:x,watch:g,...f})=>{const h=u.useRef(null),y=g==null?void 0:g(c),b=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,value:s._.isNil(y)||s._.isEmpty(y)||y==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(y.replace(/\//gu,"-"))}),{close:m}=b,{groupProps:w,fieldProps:j,buttonProps:S,dialogProps:C,calendarProps:k}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":l??c,name:c},b,h),N=u.useCallback(T=>{k.onChange&&k.onChange(T),p&&p(c,zt(T.toString()))},[k,c,p]);return t.jsxs(V,{error:n,helpLink:i,helpLinkText:a,helpText:r,htmlFor:c,label:l,required:o,tooltip:x,children:[t.jsx(ae,{buttonProps:S,datePickerRef:h,disabled:e,error:n,fieldProps:j,groupProps:w,name:c,register:d,required:o,setValue:p,value:y}),b.isOpen&&!e?t.jsx(xe,{offset:8,placement:"bottom start",state:b,triggerRef:h,children:t.jsx(Ie,{...C,children:t.jsx(kt,{onClose:m,props:{...k,onChange:N}})})}):null]})},Tt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=u.useRef(null),r=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(n,r,a);return t.jsxs("div",{className:"calendar-range",ref:a,children:[t.jsx(ze,{nextButtonProps:l,prevButtonProps:o,state:r,title:c}),t.jsx(Se,{state:r}),t.jsx(Ue,{children:t.jsx(D,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Si=s.dt.div`
|
|
1091
1091
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1092
1092
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1093
1093
|
display: flex;
|
|
@@ -1098,7 +1098,7 @@
|
|
|
1098
1098
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1099
1099
|
}
|
|
1100
1100
|
`}
|
|
1101
|
-
`,Ft=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,...x})=>{const g=`${a}Max`,f=`${a}Min`,h=u.useRef(null),y=s.$93c38a5e28be6249$export$e50a61c1de9f574(x),{close:b}=y,{groupProps:m,startFieldProps:
|
|
1101
|
+
`,Ft=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,...x})=>{const g=`${a}Max`,f=`${a}Min`,h=u.useRef(null),y=s.$93c38a5e28be6249$export$e50a61c1de9f574(x),{close:b}=y,{groupProps:m,startFieldProps:w,endFieldProps:j,buttonProps:S,dialogProps:C,calendarProps:k}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...x,"aria-label":i??a},y,h),N=u.useCallback(T=>{T&&k.onChange&&k.onChange(T)},[k]);return t.jsxs(V,{error:n,htmlFor:a,label:i,required:r,tooltip:o,children:[t.jsxs(Si,{$disabled:e,$show:n!==void 0,ref:h,style:{flexDirection:"column"},children:[t.jsx(ae,{buttonProps:S,datePickerRef:h,disabled:e,error:n,fieldProps:{...w,"aria-label":`${w["aria-label"]} ${a}`,validate:T=>j.value&&T>j.value?"Start date must be less than or equal to end date":null},groupProps:m,name:(p==null?void 0:p.name)??f,register:(p==null?void 0:p.register)??l,setValue:c,value:p==null?void 0:p.value}),t.jsx(ae,{buttonProps:S,datePickerRef:h,disabled:e,error:n,fieldProps:{...j,"aria-label":`${j["aria-label"]} ${a}`,validate:T=>w.value&&T<w.value?"End date must be greater than or equal to start date":null},groupProps:m,name:(d==null?void 0:d.name)??g,register:(d==null?void 0:d.register)??l,setValue:c,value:d==null?void 0:d.value})]}),y.isOpen&&!e?t.jsx(xe,{offset:8,placement:"bottom start",state:y,triggerRef:h,children:t.jsx(Ie,{...C,children:t.jsx(Tt,{onClose:b,props:{...k,onChange:N}})})}):null]})},zi=s.dt.div`
|
|
1102
1102
|
${({theme:e})=>`
|
|
1103
1103
|
align-items: center;
|
|
1104
1104
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1113,9 +1113,9 @@
|
|
|
1113
1113
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1114
1114
|
justify-content: flex-end;
|
|
1115
1115
|
flex: 1 0 0;
|
|
1116
|
-
`,Nt=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(ze,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(Se,{state:l}),t.jsxs(zi,{children:[t.jsx(v,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Ii,{children:t.jsx(St,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ue,{children:t.jsx(D,{onClick:n,variant:"ghost",children:"Cancel"})})]})},Ti=e=>{const{disabled:n=!1,error:i,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,x=p==null?void 0:p(o),g=u.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(x)||s._.isEmpty(x)||x==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(x.replace(/\//gu,"-"))}),{close:h}=f,{groupProps:y,fieldProps:b,buttonProps:m,dialogProps:
|
|
1116
|
+
`,Nt=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(ze,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(Se,{state:l}),t.jsxs(zi,{children:[t.jsx(v,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Ii,{children:t.jsx(St,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ue,{children:t.jsx(D,{onClick:n,variant:"ghost",children:"Cancel"})})]})},Ti=e=>{const{disabled:n=!1,error:i,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,x=p==null?void 0:p(o),g=u.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(x)||s._.isEmpty(x)||x==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(x.replace(/\//gu,"-"))}),{close:h}=f,{groupProps:y,fieldProps:b,buttonProps:m,dialogProps:w,calendarProps:j}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,g),S=u.useCallback(k=>{j.onChange&&j.onChange(k),d==null||d(o,Ci(String(k).replace(/-/gu,"/")))},[j,o,d]),C=u.useCallback(k=>{k&&f.setTimeValue(k)},[f]);return t.jsxs(V,{error:i,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(ae,{buttonProps:m,datePickerRef:g,disabled:n,error:i,fieldProps:b,granularity:"minute",groupProps:y,name:o,register:c,setValue:d,value:x}),f.isOpen&&!n?t.jsx(xe,{offset:8,placement:"bottom start",state:f,triggerRef:g,children:t.jsx(Ie,{...w,children:t.jsx(Nt,{handleTimeChange:C,onClose:h,props:{...j,onChange:S},timeState:f})})}):null]})},Fi=({children:e,currentValue:n,externalLink:i,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs($,{children:[t.jsx(Ge,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(q,{href:d,children:c}):t.jsx(v,{size:"md",children:c})]})},Ye=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:a,helpText:r,error:o,isValid:l,isTouched:c,label:d,linkPosition:p,name:x,maskValue:g=!1,onPaste:f,placeholder:h,register:y,tooltip:b,type:m="text",weight:w,...j})=>{const{required:S,onBlur:C,onChange:k}=j,N=s.nt(),T=e?void 0:o,R=l&&c&&!e,W=u.useCallback(P=>{P.key==="Enter"&&P.preventDefault()},[]);return t.jsx(V,{error:T,helpLink:i,helpLinkText:a,helpText:r,htmlFor:x,label:d,linkPosition:p,required:S,tooltip:b,weight:w,children:t.jsxs(Z,{className:`
|
|
1117
1117
|
${e?"disabled":""} ${T?"error":""} ${R?"success":""}
|
|
1118
|
-
`,children:[n?t.jsx(z,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":T?"true":"false","aria-label":x,"aria-required":
|
|
1118
|
+
`,children:[n?t.jsx(z,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":T?"true":"false","aria-label":x,"aria-required":S,autoComplete:"off",className:g?"sr-block":"","data-testid":`${x}-input`,disabled:e,id:x,onKeyDown:W,onPaste:f,placeholder:h,type:m,...y?y(x,{required:S,onBlur:C,onChange:k}):{...j}}),T?t.jsx(z,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:N.palette.error[500],iconSize:"xs"}):void 0,R?t.jsx(z,{icon:"check-circle",iconClass:"success-icon",iconColor:N.palette.success[500],iconSize:"xs"}):void 0]})})},Ni=s.dt(ft)`
|
|
1119
1119
|
white-space: nowrap;
|
|
1120
1120
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1121
1121
|
text-overflow: ellipsis;
|
|
@@ -1126,13 +1126,13 @@
|
|
|
1126
1126
|
position: absolute;
|
|
1127
1127
|
visibility: hidden;
|
|
1128
1128
|
width: 0;
|
|
1129
|
-
`,Pe=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Ei=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Di=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:x,register:g,setValue:f,tooltip:h,watch:y,weight:b})=>{const m=s.nt(),
|
|
1129
|
+
`,Pe=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Ei=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Di=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:x,register:g,setValue:f,tooltip:h,watch:y,weight:b})=>{const m=s.nt(),w=n?void 0:i,j=u.useRef(null),S=y==null?void 0:y(d),C=Ei(S),k=g==null?void 0:g(d,{required:x}),N=u.useCallback(()=>{const W=Pe("change",d,void 0);f&&f(d,""),k&&k.onChange(W)},[k,d,f]),T=u.useCallback(W=>{const{files:P}=W.currentTarget,E=Pe("change",d,P&&P.length>0?P:void 0);p==null||p(E),k&&k.onChange(E)},[k,d,p]),R=u.useCallback(W=>{n?W.preventDefault():j.current&&j.current.click()},[n]);return t.jsxs(V,{error:w,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:x,tooltip:h,weight:b,children:[t.jsxs(Z,{className:`${n?"disabled":""} ${w?"error":""}`,children:[t.jsx(Ni,{$size:"xs",children:C}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(C)?void 0:t.jsx(B,{color:m.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:N,variant:"ghost",width:"20px"}),w&&t.jsx(z,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}),t.jsxs(D,{border:n?`1px solid ${m.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:R,variant:"primary",width:"96px",children:[t.jsx(z,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Ri,{...k&&{ref:k.ref,onBlur:k.onBlur},accept:e,"aria-label":d,"data-testid":d,disabled:n,id:l??d,multiple:c,name:d,onChange:T,onClick:N,ref:j,required:void 0,type:"file",value:void 0})]})},Pi=s.dt.input`
|
|
1130
1130
|
border: none;
|
|
1131
1131
|
background: transparent;
|
|
1132
1132
|
min-width: 15rem;
|
|
1133
1133
|
padding: 0;
|
|
1134
1134
|
flex: 1;
|
|
1135
|
-
`,Le=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:x,required:g,tooltip:f,value:h,weight:y})=>{const b=s.nt(),m=e?void 0:n,[j
|
|
1135
|
+
`,Le=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:x,required:g,tooltip:f,value:h,weight:y})=>{const b=s.nt(),m=e?void 0:n,[w,j]=u.useState(""),S=d?h:i==null?void 0:i.value,C=u.useMemo(()=>S&&typeof S=="string"?S.split(",").filter(Boolean):[],[S]),k=u.useCallback(P=>{const M=[...new Set(P.filter(Boolean))].join(","),O=Pe("change",c,M);i&&i.onChange(O),d&&d(O)},[i,c,d]),N=u.useCallback(P=>{j(P.target.value)},[]),T=u.useCallback(P=>{const E=w.trim();E.length&&!C.includes(E)&&(P.preventDefault(),k([...C,E]),j("")),i&&i.onBlur()},[w,i,k,C]),R=u.useCallback(P=>{const E=w.trim();P.key==="Enter"&&E.length===0&&P.preventDefault(),["Enter",","].includes(P.key)&&E.length>0&&!C.includes(E)?(P.preventDefault(),k([...C,E]),j("")):P.key==="Backspace"&&!E.length&&C.length&&(P.preventDefault(),p==null||p(C[C.length-1]),k(C.slice(0,-1)))},[w,p,k,C]),W=u.useCallback(P=>()=>{p==null||p(P),k(C.filter(E=>E!==P))},[p,k,C]);return t.jsx(V,{error:m,helpLink:a,helpLinkText:r,helpText:o,htmlFor:c,label:l,required:g,tooltip:f,weight:y,children:t.jsxs(Z,{$overflowX:"auto",className:`${e?"disabled":""} ${m?"error":""}`,children:[C.map(P=>t.jsx(X,{disabled:e,onClose:W(P),tagLabel:P},P)),t.jsx(Pi,{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":g,autoComplete:"off",id:c,onBlur:T,onChange:N,onKeyDown:R,placeholder:C.length===0?x:void 0,ref:i==null?void 0:i.ref,type:"text",value:w}),m?t.jsx(z,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}):void 0]})})},Li=({disabled:e=!1,control:n,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:x,required:g,tooltip:f,value:h,weight:y})=>n?t.jsx(s.Controller,{control:n,name:c,render:({field:b})=>t.jsx(Le,{disabled:e,error:i,field:b,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onRemove:p,placeholder:x,required:g,tooltip:f,weight:y}),rules:{required:g}}):t.jsx(Le,{disabled:e,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:x,required:g,tooltip:f,value:h,weight:y}),We=u.forwardRef(function({disabled:n,icon:i,margin:a,onClick:r,...o},l){return t.jsx(yi,{$margin:a,"aria-label":i,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...o,children:t.jsx(z,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),ke=({error:e,decimalPlaces:n=0,disabled:i=!1,id:a,maxLength:r,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:x,required:g,setValue:f,value:h})=>{const y=s.nt(),b=i?void 0:e,m=u.useMemo(()=>n<0?0:n,[n]),[w,j]=u.useState(h?s._.toNumber(h):0),S=u.useCallback(()=>{const T=(w-10**-m).toFixed(m),R=Math.max(Number(l),Number(T));f&&f(c,R),j(R)},[m,w,l,c,f]),C=u.useCallback(()=>{const T=(w+10**-m).toFixed(m),R=Math.min(Number(o),Number(T)>Number(l)?Number(T):Number(l));f&&f(c,R),j(R)},[m,w,o,l,c,f]),k=u.useCallback(T=>{const{value:R}=T.target,W=/\d+/u.test(R)&&!s._.isEmpty(R);f&&f(c,W?Number(R):void 0),d&&d(T)},[c,d,f]),N=u.useCallback(T=>{T.key==="Enter"&&T.preventDefault()},[]);return t.jsxs(Z,{className:`${i?"disabled":""} ${b?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":b?"true":"false","aria-label":c,"aria-required":g,autoComplete:"off",disabled:i,id:a??c,max:o,min:l,onKeyDown:N,placeholder:p,required:g,step:10**-m,type:"number",...x==null?void 0:x(c,{required:g,maxLength:r,max:o,min:l,onChange:k})}),b&&t.jsx(z,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}),t.jsx(We,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:S,px:.75,py:.75}),t.jsx(We,{borderRadius:`0 ${y.spacing[.5]} ${y.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:C,px:.75,py:.75})]})},Rt=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:a,helpText:r,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:x,name:g,onChange:f,placeholder:h,register:y,required:b,setValue:m,tooltip:w,value:j,watch:S,weight:C})=>t.jsx(V,{error:n?void 0:i,helpLink:a,helpText:r,htmlFor:g,label:l,linkPosition:c,maxLength:d,required:b,tooltip:w,weight:C,children:t.jsx(ke,{decimalPlaces:e,disabled:n,error:i,id:o,max:p,maxLength:d,min:x,name:g,onChange:f,placeholder:h,register:y,required:b,setValue:m,value:f?j:S==null?void 0:S(g)})}),Et=({disabled:e=!1,error:n,name:i,label:a,propsMax:r,propsMin:o,required:l,tooltip:c})=>{const d=`${i}Max`,p=`${i}Min`;return t.jsx(V,{error:n,htmlFor:i,label:a,required:l,tooltip:c,children:t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(ke,{...o,disabled:e,error:n,name:o.name??p}),t.jsx(ke,{...r,disabled:e,error:n,name:r.name??d})]})})},Wi=s.dt.div`
|
|
1136
1136
|
${({theme:e})=>`
|
|
1137
1137
|
align-items: flex-start;
|
|
1138
1138
|
align-self: stretch;
|
|
@@ -1225,9 +1225,9 @@
|
|
|
1225
1225
|
overflow: hidden;
|
|
1226
1226
|
text-overflow: ellipsis;
|
|
1227
1227
|
white-space: nowrap;
|
|
1228
|
-
`,ee=(e,n,i=!1)=>{u.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("click",a,!0),()=>{document.removeEventListener("click",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("click",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("click",a,!0)})},[i,e,n])},Hi=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,weight:p})=>{const x=s.nt(),g=u.useRef(null),f=e?void 0:n,[h,y]=u.useState(!1),[b,m]=u.useState(""),{refs:
|
|
1229
|
-
${e?"disabled":""} ${k?"error":""} ${
|
|
1230
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":k?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:x,placeholder:g,rows:y,...f==null?void 0:f(c,{required:h})}),k?t.jsx(z,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:
|
|
1228
|
+
`,ee=(e,n,i=!1)=>{u.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("click",a,!0),()=>{document.removeEventListener("click",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("click",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("click",a,!0)})},[i,e,n])},Hi=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,weight:p})=>{const x=s.nt(),g=u.useRef(null),f=e?void 0:n,[h,y]=u.useState(!1),[b,m]=u.useState(""),{refs:w,floatingStyles:j}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputValue:S,handlePhoneValueChange:C,country:k,setCountry:N}=s.ee({countries:s.R,defaultCountry:"us",forceDialCode:!0,value:d?String(d):void 0}),T=u.useCallback(()=>{y(E=>!E),h||m("")},[h]),R=u.useCallback(E=>()=>{N(E),y(!1),m("")},[N,y]),W=u.useCallback(E=>{E.key.length===1?m(M=>M+E.key):E.key==="Backspace"&&m(M=>M.slice(0,-1))},[]),P=s.R.filter(E=>{const{name:M}=s.M(E);return M.toLowerCase().includes(b.toLowerCase())});return ee(w.floating.current,()=>{y(!1),m("")},!0),t.jsx(V,{error:f,htmlFor:a,label:i,required:o,tooltip:c,weight:p,children:t.jsxs(Wi,{className:`${e?"disabled":""} ${f?"error":""}`,ref:g,children:[t.jsxs(Ai,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:T,onKeyDown:W,ref:w.setReference,children:[t.jsx(s.q,{iso2:k.iso2,size:"16px"}),t.jsx(z,{icon:"angle-down",iconColor:x.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(Z,{className:`${e?"disabled":""} ${f?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":f?"true":"false","aria-label":a,"aria-required":o,autoComplete:"off","data-testid":`${a}-input`,disabled:e,id:a,name:a,placeholder:r,type:"tel",value:S,...l==null?void 0:l(a,{required:o,onChange:C})}),f?t.jsx(z,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:x.palette.error[500],iconSize:"xs"}):void 0]}),h&&G.createPortal(t.jsx(Bi,{ref:w.setFloating,style:j,children:P.map(E=>{const{dialCode:M,iso2:O,name:te}=s.M(E);return t.jsxs(Mi,{onClick:R(O),value:O,children:[t.jsx(s.q,{iso2:O,size:"16px"}),t.jsx(Vi,{children:te}),t.jsx(v,{color:x.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+M})]},O)})}),document.getElementById("root")??document.body)]})})},Oi=({disabled:e=!1,error:n,helpLink:i,helpText:a,isTouched:r,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:x,placeholder:g,register:f,required:h,rows:y,tooltip:b,watch:m,weight:w})=>{const j=s.nt(),S=m==null?void 0:m(c),C=o&&r&&!e,k=e?void 0:n;return t.jsx(V,{error:k,helpLink:i,helpText:a,htmlFor:c,label:l,maxLength:x,required:h,tooltip:b,value:S?String(S):void 0,weight:w,children:t.jsxs(Z,{className:`
|
|
1229
|
+
${e?"disabled":""} ${k?"error":""} ${C?"success":""}
|
|
1230
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":k?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:x,placeholder:g,rows:y,...f==null?void 0:f(c,{required:h})}),k?t.jsx(z,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"xs"}):void 0,C?t.jsx(z,{icon:"check-circle",iconClass:"success-icon",iconColor:j.palette.success[500],iconSize:"xs"}):void 0]})})},_i=({description:e,disabled:n,id:i,align:a,inputType:r="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:x,title:g})=>{const f=u.useMemo(()=>{if(r==="text")return t.jsx(Ye,{disabled:n,name:d,placeholder:p});if(r==="date")return t.jsx(It,{disabled:n,name:d});const{decimalPlaces:h,max:y,min:b}=o??{};return t.jsx(Rt,{decimalPlaces:h,disabled:n,max:y,min:b,name:d,placeholder:p})},[n,o,r,d,p]);return t.jsxs(ci,{$align:a,$minHeight:l,$minWidth:c,children:[t.jsx(Ce,{description:e,id:i,title:g,tooltip:x}),f]})},Gi=s.dt.label`
|
|
1231
1231
|
${({theme:e})=>`
|
|
1232
1232
|
align-items: center;
|
|
1233
1233
|
color: ${e.palette.gray[600]};
|
|
@@ -1914,7 +1914,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),g=u.useMemo(x,[x]),f=u.useCallback(a
|
|
|
1914
1914
|
`,Xt=s.dt(B)`
|
|
1915
1915
|
background-color: ${({theme:e})=>e.palette.white};
|
|
1916
1916
|
color: ${({theme:e})=>e.palette.gray[400]};
|
|
1917
|
-
`,Xe=({option:e,register:n,setValue:i})=>{var a,r,o,l;switch(e.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=e.options)==null?void 0:a.map(d=>t.jsx(lt,{value:d.value,width:"content",children:t.jsx(Te,{...n("checkbox"),label:d.label,value:d.value})},`li-checkbox-${d.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=e.options)==null?void 0:r.map(d=>t.jsx(lt,{value:d.value,width:"content",children:t.jsx(Ke,{...n("radio"),label:d.label,value:d.value})},`li-radio-${d.value}`))});case"text":const c=`text.${String(e.key)}-${e.filterFn??"caseInsensitive"}`;return t.jsx(Ye,{label:e.label,name:c,register:n,value:e.value});case"numberRange":return t.jsx(Et,{label:e.label,name:String(e.key),propsMax:{placeholder:"Max",register:n,name:"maxValue",value:e.maxValue,setValue:i},propsMin:{placeholder:"Min",register:n,name:"minValue",value:e.minValue,setValue:i}});case"dateRange":return t.jsx(Ft,{endName:"maxValue",label:e.label,name:String(e.key),propsMax:{register:n,name:"maxValue",value:(o=e.maxValue)==null?void 0:o.toString()},propsMin:{register:n,name:"minValue",value:(l=e.minValue)==null?void 0:l.toString()},register:n,setValue:i,startName:"minValue"});default:return t.jsx("div",{})}},Ae=({options:e,onSubmit:n,id:i,open:a})=>{var h,y,b,m,j;const[r,o]=u.useState(e),{register:l,handleSubmit:c,setValue:d}=s.useForm({defaultValues:{checkbox:e.filter(w=>w.type==="checkboxes").flatMap(w=>{var C;return((C=w.options)==null?void 0:C.filter(S=>S.checked).map(S=>S.value))??[]}),radio:((b=(y=(h=e.find(w=>w.type==="radioButton"))==null?void 0:h.options)==null?void 0:y.find(({checked:w})=>w))==null?void 0:b.value)??"",text:e.filter(w=>w.type==="text").reduce((w,C)=>({...w,[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`]:C.value??""}),{}),minValue:(m=e.find(w=>["numberRange","dateRange"].includes(w.type)))==null?void 0:m.minValue,maxValue:(j=e.find(w=>["numberRange","dateRange"].includes(w.type)))==null?void 0:j.maxValue}}),p=e.some(w=>w.type==="checkboxes"),x=u.useCallback(w=>{const{value:C}=w.target,S=e.map(k=>{var N;return k.type==="checkboxes"?{...k,options:(N=k.options)==null?void 0:N.filter(T=>{var R;return((R=T.label)==null?void 0:R.toLowerCase().includes(C.toLowerCase()))??T.value.toLowerCase().includes(C.toLowerCase())})}:k});o(S)},[e]),g=u.useCallback(w=>{n&&n(w)},[n]);u.useEffect(()=>{var w,C,S,k,N;o(e),d("checkbox",e.filter(T=>T.type==="checkboxes").flatMap(T=>{var R;return((R=T.options)==null?void 0:R.filter(W=>W.checked).map(W=>W.value))??[]})),d("radio",((S=(C=(w=e.find(T=>T.type==="radioButton"))==null?void 0:w.options)==null?void 0:C.find(({checked:T})=>T))==null?void 0:S.value)??""),d("text",e.filter(T=>T.type==="text").reduce((T,R)=>({...T,[`${String(R.key)}-${R.filterFn??"caseInsensitive"}`]:R.value??""}),{})),d("minValue",(k=e.find(T=>["numberRange","dateRange"].includes(T.type)))==null?void 0:k.minValue),d("maxValue",(N=e.find(T=>["numberRange","dateRange"].includes(T.type)))==null?void 0:N.maxValue)},[e,d]);const f=t.jsx(fe,{$bgColor:"transparent",children:t.jsxs(he,{$size:"fixed",flexDirection:"column",gap:1.25,children:[p&&t.jsx(re,{onChange:x}),t.jsxs("form",{id:i,onSubmit:c(g),children:[r.map((w,C)=>{const S=`${w.type}-${w.value}-${w.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Xe,{option:w,register:l}),C<r.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},S)}),t.jsx(D,{mt:1,type:"submit",children:"Apply"})]})]})});return a?G.createPortal(f,document.getElementById("portals")??document.body):t.jsx("div",{})},ve=({options:e,variant:n,onApplyFilters:i})=>{const a=s.nt(),[r,o]=u.useState(e),[l,c]=u.useState([]),[d,p]=u.useState({}),[x,g]=u.useState(""),f=u.useCallback(b=>()=>{const m=r.find(j=>j.label===b);g(b),c((m==null?void 0:m.filterOptions)??[])},[r]),h=u.useCallback(b=>{const m=[...b.checkbox,...Object.values(b.text??{}),...b.radio?[b.radio]:[],...b.minValue?[String(b.minValue)]:[],...b.maxValue?[String(b.maxValue)]:[]];p(k=>m.length>0?{...k,[x]:m}:k);const j=k=>{var N,T;return{...k,options:(N=k.options)==null?void 0:N.map(R=>({...R,checked:b.checkbox.includes(R.value)||b.radio===R.value})),value:k.type==="text"?((T=b.text)==null?void 0:T[`${String(k.key)}-${k.filterFn??"caseInsensitive"}`])??k.value:k.value,minValue:k.type==="numberRange"?b.minValue:k.minValue,maxValue:k.type==="numberRange"?b.maxValue:k.maxValue}},w=k=>k.label===x?{...k,filterOptions:k.filterOptions.map(j)}:k,C=r.map(w);o(k=>k.map(w));const S=C.flatMap(({filterOptions:k})=>k);i(S),c([])},[r,i,x]),y=u.useCallback((b,m)=>{const j=`li-filter-option-${b}`;return t.jsxs(Ia,{icon:m,onClick:f(b),value:j,width:"100%",children:[b,d[b]===void 0?void 0:t.jsx(X,{tagLabel:d[b].length.toString()})]},j)},[d,f]);return u.useEffect(()=>{const b=e.reduce((m,{label:j,filterOptions:w})=>{const C=w.flatMap(({value:N,minValue:T,maxValue:R})=>[T,R,N]).filter(Boolean),S=w.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),k=[...C,...S];return k.length===0?m:{...m,[j]:k}},{});p(b)},[e]),n==="grouped"?t.jsxs($,{flexGrow:1,position:"relative",zIndex:80,children:[Object.entries(Kt(e)).map(([b,m])=>t.jsxs($,{width:"100%",children:[t.jsx(v,{color:a.palette.gray[400],mb:.25,size:"sm",children:b}),m.map(({label:j,icon:w="filter-list"})=>y(j,w))]},b)),t.jsx(Ae,{id:"filters-options",onSubmit:h,open:l.length>0,options:l})]}):t.jsxs($,{flexGrow:1,children:[e.map(({label:b,icon:m="filter-list"})=>y(b,m)),t.jsx(Ae,{id:"filters-options",onSubmit:h,open:l.length>0,options:l})]})},Zt=({_containerId:e="portals",options:n,onApplyFilters:i,modalRef:a})=>a.isOpen?G.createPortal(t.jsx(fe,{$bgColor:"transparent","aria-label":a.name,"aria-modal":"true",children:t.jsxs(he,{$size:"fixed",alignItems:"start",display:"flex",flexDirection:"row",gap:.5,position:"relative",children:[t.jsx(ve,{onApplyFilters:i,options:n,variant:"ungrouped"}),t.jsx(Xt,{icon:"close",iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:a.close,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{}),Ta=({_containerId:e="portals",rightColumnOptions:n,leftColumnOptions:i,variant:a,onApplyFilters:r,modalRef:o})=>o.isOpen?G.createPortal(t.jsx(fe,{$bgColor:"transparent","aria-label":o.name,"aria-modal":"true",children:t.jsxs(he,{$size:"lg",alignItems:"start",flexDirection:"row",gap:1,position:"relative",px:1.25,py:1.25,children:[t.jsxs($,{display:"flex",flexGrow:1,gap:1,justify:"space-between",children:[t.jsx(ve,{onApplyFilters:r,options:i,variant:a}),t.jsx(ve,{onApplyFilters:r,options:n,variant:a})]}),t.jsx(Xt,{icon:"close",iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{}),Fa=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:x,maxValue:g}=c,f=s._.isEmpty(x)?void 0:d(String(x)),h=s._.isEmpty(g)?void 0:d(String(g));return f===void 0&&h===void 0?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"text":default:return i(l,c)}})}return e.filter(o)},ct=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.filter(({value:i,maxValue:a,minValue:r})=>i??a??r)].length,Na=({dataset:e,key:n,options:i,setFilteredDataset:a})=>{const r=Fe("filters-modal"),[o,l]=u.useState([]),[c,d]=u.useState(ct(o));u.useEffect(()=>{const g=localStorage.getItem(n);if(g)l(JSON.parse(g));else{const f=i.flatMap(h=>h.filterOptions);l(f)}},[n,i]);const p=i.map(g=>({...g,filterOptions:g.filterOptions.map(f=>o.find(y=>y.key===f.key&&y.type===f.type&&y.filterFn===f.filterFn)??{...f})})),x=u.useCallback(g=>{l([...g]),localStorage.setItem(n,JSON.stringify(g))},[l,n]);return u.useEffect(()=>{a(Fa(e,o)),d(ct(o))},[e,o,a]),t.jsxs(u.Fragment,{children:[t.jsx($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",wrap:"wrap",children:t.jsx($,{pr:.25,children:t.jsx(D,{icon:"filter",id:"filterBtn",onClick:r.toggle,tag:c.toString(),variant:"ghost"})})}),t.jsx(Zt,{modalRef:r,onApplyFilters:x,options:p})]})},Jt=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l="",modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:x,title:g="",size:f,id:h="modal-container"})=>{const y=()=>t.jsx(fe,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(he,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(g)&&t.jsx(_t,{description:l,modalRef:c,onClose:p,otherActions:d,tabItems:x,title:g}),(s._.isObject(o)||a)&&t.jsxs(da,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(xa,{$framed:o.imageFramed,children:t.jsx(_,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(v,{size:"sm",children:o.imageText})]}),t.jsx(Vt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?G.createPortal(y(),document.getElementById("portals")??document.body):c.isOpen?y():null},Ra=()=>{const[e,n]=u.useState(!1),[i,a]=u.useState(),r=u.useRef(null),o=Fe("confirm-dialog-modal"),l=u.useCallback(async x=>(a(x),n(!0),new Promise(g=>{r.current=g})),[]),c=u.useCallback(()=>{var x;n(!1),a(void 0),(x=r.current)==null||x.call(r,!0)},[]),d=u.useCallback(()=>{var x;n(!1),a(void 0),(x=r.current)==null||x.call(r,!1)},[]);return u.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:x="confirm-dialog-modal",children:g})=>t.jsx(Jt,{id:x,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:t.jsxs($,{display:"flex",flexDirection:"column",children:[g,i==null?void 0:i.message,t.jsx(Gt,{id:i==null?void 0:i.id,onCancel:d,onConfirm:c})]})}),confirm:l}},Ea=s.dt.button`
|
|
1917
|
+
`,Xe=({option:e,register:n,setValue:i})=>{var a,r,o,l;switch(e.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=e.options)==null?void 0:a.map(d=>t.jsx(lt,{value:d.value,width:"content",children:t.jsx(Te,{...n("checkbox"),label:d.label,value:d.value})},`li-checkbox-${d.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=e.options)==null?void 0:r.map(d=>t.jsx(lt,{value:d.value,width:"content",children:t.jsx(Ke,{...n("radio"),label:d.label,value:d.value})},`li-radio-${d.value}`))});case"text":const c=`text.${String(e.key)}-${e.filterFn??"caseInsensitive"}`;return t.jsx(Ye,{label:e.label,name:c,register:n,value:e.value});case"numberRange":return t.jsx(Et,{label:e.label,name:String(e.key),propsMax:{placeholder:"Max",register:n,name:"maxValue",value:e.maxValue,setValue:i},propsMin:{placeholder:"Min",register:n,name:"minValue",value:e.minValue,setValue:i}});case"dateRange":return t.jsx(Ft,{endName:"maxValue",label:e.label,name:String(e.key),propsMax:{register:n,name:"maxValue",value:(o=e.maxValue)==null?void 0:o.toString()},propsMin:{register:n,name:"minValue",value:(l=e.minValue)==null?void 0:l.toString()},register:n,setValue:i,startName:"minValue"});default:return t.jsx("div",{})}},Ae=({options:e,onSubmit:n,id:i,open:a})=>{var h,y,b,m,w;const[r,o]=u.useState(e),{register:l,handleSubmit:c,setValue:d}=s.useForm({defaultValues:{checkbox:e.filter(j=>j.type==="checkboxes").flatMap(j=>{var S;return((S=j.options)==null?void 0:S.filter(C=>C.checked).map(C=>C.value))??[]}),radio:((b=(y=(h=e.find(j=>j.type==="radioButton"))==null?void 0:h.options)==null?void 0:y.find(({checked:j})=>j))==null?void 0:b.value)??"",text:e.filter(j=>j.type==="text").reduce((j,S)=>({...j,[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`]:S.value??""}),{}),minValue:(m=e.find(j=>["numberRange","dateRange"].includes(j.type)))==null?void 0:m.minValue,maxValue:(w=e.find(j=>["numberRange","dateRange"].includes(j.type)))==null?void 0:w.maxValue}}),p=e.some(j=>j.type==="checkboxes"),x=u.useCallback(j=>{const{value:S}=j.target,C=e.map(k=>{var N;return k.type==="checkboxes"?{...k,options:(N=k.options)==null?void 0:N.filter(T=>{var R;return((R=T.label)==null?void 0:R.toLowerCase().includes(S.toLowerCase()))??T.value.toLowerCase().includes(S.toLowerCase())})}:k});o(C)},[e]),g=u.useCallback(j=>{n&&n(j)},[n]);u.useEffect(()=>{var j,S,C,k,N;o(e),d("checkbox",e.filter(T=>T.type==="checkboxes").flatMap(T=>{var R;return((R=T.options)==null?void 0:R.filter(W=>W.checked).map(W=>W.value))??[]})),d("radio",((C=(S=(j=e.find(T=>T.type==="radioButton"))==null?void 0:j.options)==null?void 0:S.find(({checked:T})=>T))==null?void 0:C.value)??""),d("text",e.filter(T=>T.type==="text").reduce((T,R)=>({...T,[`${String(R.key)}-${R.filterFn??"caseInsensitive"}`]:R.value??""}),{})),d("minValue",(k=e.find(T=>["numberRange","dateRange"].includes(T.type)))==null?void 0:k.minValue),d("maxValue",(N=e.find(T=>["numberRange","dateRange"].includes(T.type)))==null?void 0:N.maxValue)},[e,d]);const f=t.jsx(fe,{$bgColor:"transparent",children:t.jsxs(he,{$size:"fixed",flexDirection:"column",gap:1.25,children:[p&&t.jsx(re,{onChange:x}),t.jsxs("form",{id:i,onSubmit:c(g),children:[r.map((j,S)=>{const C=`${j.type}-${j.value}-${j.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Xe,{option:j,register:l}),S<r.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},C)}),t.jsx(D,{mt:1,type:"submit",children:"Apply"})]})]})});return a?G.createPortal(f,document.getElementById("portals")??document.body):t.jsx("div",{})},ve=({options:e,variant:n,onApplyFilters:i})=>{const a=s.nt(),[r,o]=u.useState(e),[l,c]=u.useState([]),[d,p]=u.useState({}),[x,g]=u.useState(""),f=u.useCallback(b=>()=>{const m=r.find(w=>w.label===b);g(b),c((m==null?void 0:m.filterOptions)??[])},[r]),h=u.useCallback(b=>{const m=[...b.checkbox,...Object.values(b.text??{}),...b.radio?[b.radio]:[],...b.minValue?[String(b.minValue)]:[],...b.maxValue?[String(b.maxValue)]:[]];p(k=>m.length>0?{...k,[x]:m}:k);const w=k=>{var N,T;return{...k,options:(N=k.options)==null?void 0:N.map(R=>({...R,checked:b.checkbox.includes(R.value)||b.radio===R.value})),value:k.type==="text"?((T=b.text)==null?void 0:T[`${String(k.key)}-${k.filterFn??"caseInsensitive"}`])??k.value:k.value,minValue:k.type==="numberRange"?b.minValue:k.minValue,maxValue:k.type==="numberRange"?b.maxValue:k.maxValue}},j=k=>k.label===x?{...k,filterOptions:k.filterOptions.map(w)}:k,S=r.map(j);o(k=>k.map(j));const C=S.flatMap(({filterOptions:k})=>k);i(C),c([])},[r,i,x]),y=u.useCallback((b,m)=>{const w=`li-filter-option-${b}`;return t.jsxs(Ia,{icon:m,onClick:f(b),value:w,width:"100%",children:[b,d[b]===void 0?void 0:t.jsx(X,{tagLabel:d[b].length.toString()})]},w)},[d,f]);return u.useEffect(()=>{const b=e.reduce((m,{label:w,filterOptions:j})=>{const S=j.flatMap(({value:N,minValue:T,maxValue:R})=>[T,R,N]).filter(Boolean),C=j.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),k=[...S,...C];return k.length===0?m:{...m,[w]:k}},{});p(b)},[e]),n==="grouped"?t.jsxs($,{flexGrow:1,position:"relative",zIndex:80,children:[Object.entries(Kt(e)).map(([b,m])=>t.jsxs($,{width:"100%",children:[t.jsx(v,{color:a.palette.gray[400],mb:.25,size:"sm",children:b}),m.map(({label:w,icon:j="filter-list"})=>y(w,j))]},b)),t.jsx(Ae,{id:"filters-options",onSubmit:h,open:l.length>0,options:l})]}):t.jsxs($,{flexGrow:1,children:[e.map(({label:b,icon:m="filter-list"})=>y(b,m)),t.jsx(Ae,{id:"filters-options",onSubmit:h,open:l.length>0,options:l})]})},Zt=({_containerId:e="portals",options:n,onApplyFilters:i,modalRef:a})=>a.isOpen?G.createPortal(t.jsx(fe,{$bgColor:"transparent","aria-label":a.name,"aria-modal":"true",children:t.jsxs(he,{$size:"fixed",alignItems:"start",display:"flex",flexDirection:"row",gap:.5,position:"relative",children:[t.jsx(ve,{onApplyFilters:i,options:n,variant:"ungrouped"}),t.jsx(Xt,{icon:"close",iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:a.close,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{}),Ta=({_containerId:e="portals",rightColumnOptions:n,leftColumnOptions:i,variant:a,onApplyFilters:r,modalRef:o})=>o.isOpen?G.createPortal(t.jsx(fe,{$bgColor:"transparent","aria-label":o.name,"aria-modal":"true",children:t.jsxs(he,{$size:"lg",alignItems:"start",flexDirection:"row",gap:1,position:"relative",px:1.25,py:1.25,children:[t.jsxs($,{display:"flex",flexGrow:1,gap:1,justify:"space-between",children:[t.jsx(ve,{onApplyFilters:r,options:i,variant:a}),t.jsx(ve,{onApplyFilters:r,options:n,variant:a})]}),t.jsx(Xt,{icon:"close",iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{}),Fa=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:x,maxValue:g}=c,f=s._.isEmpty(x)?void 0:d(String(x)),h=s._.isEmpty(g)?void 0:d(String(g));return f===void 0&&h===void 0?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"text":default:return i(l,c)}})}return e.filter(o)},ct=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.filter(({value:i,maxValue:a,minValue:r})=>i??a??r)].length,Na=({dataset:e,key:n,options:i,setFilteredDataset:a})=>{const r=Fe("filters-modal"),[o,l]=u.useState([]),[c,d]=u.useState(ct(o));u.useEffect(()=>{const g=localStorage.getItem(n);if(g)l(JSON.parse(g));else{const f=i.flatMap(h=>h.filterOptions);l(f)}},[n,i]);const p=i.map(g=>({...g,filterOptions:g.filterOptions.map(f=>o.find(y=>y.key===f.key&&y.type===f.type&&y.filterFn===f.filterFn)??{...f})})),x=u.useCallback(g=>{l([...g]),localStorage.setItem(n,JSON.stringify(g))},[l,n]);return u.useEffect(()=>{a(Fa(e,o)),d(ct(o))},[e,o,a]),t.jsxs(u.Fragment,{children:[t.jsx($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",wrap:"wrap",children:t.jsx($,{pr:.25,children:t.jsx(D,{icon:"filter",id:"filterBtn",onClick:r.toggle,tag:c.toString(),variant:"ghost"})})}),t.jsx(Zt,{modalRef:r,onApplyFilters:x,options:p})]})},Jt=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l="",modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:x,title:g="",size:f,id:h="modal-container"})=>{const y=()=>t.jsx(fe,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(he,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(g)&&t.jsx(_t,{description:l,modalRef:c,onClose:p,otherActions:d,tabItems:x,title:g}),(s._.isObject(o)||a)&&t.jsxs(da,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(xa,{$framed:o.imageFramed,children:t.jsx(_,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(v,{size:"sm",children:o.imageText})]}),t.jsx(Vt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?G.createPortal(y(),document.getElementById("portals")??document.body):c.isOpen?y():null},Ra=()=>{const[e,n]=u.useState(!1),[i,a]=u.useState(),r=u.useRef(null),o=Fe("confirm-dialog-modal"),l=u.useCallback(async x=>(a(x),n(!0),new Promise(g=>{r.current=g})),[]),c=u.useCallback(()=>{var x;n(!1),a(void 0),(x=r.current)==null||x.call(r,!0)},[]),d=u.useCallback(()=>{var x;n(!1),a(void 0),(x=r.current)==null||x.call(r,!1)},[]);return u.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:x="confirm-dialog-modal",children:g})=>t.jsx(Jt,{id:x,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:t.jsxs($,{display:"flex",flexDirection:"column",children:[g,i==null?void 0:i.message,t.jsx(Gt,{id:i==null?void 0:i.id,onCancel:d,onConfirm:c})]})}),confirm:l}},Ea=s.dt.button`
|
|
1918
1918
|
display: flex;
|
|
1919
1919
|
position: relative;
|
|
1920
1920
|
height: 32px;
|
|
@@ -2067,7 +2067,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),g=u.useMemo(x,[x]),f=u.useCallback(a
|
|
|
2067
2067
|
overflow: hidden auto;
|
|
2068
2068
|
width: 100%;
|
|
2069
2069
|
`}
|
|
2070
|
-
`,Oa=({alert:e,cancelButton:n,children:i,confirmButton:a,id:
|
|
2070
|
+
`,Oa=({alert:e,cancelButton:n,children:i,confirmButton:a,defaultDisabled:r=!0,id:o="modal-confirm",maxButtonWidth:l="392px",mode:c,onSubmit:d,showButtons:p=!0,yupSchema:x,...g})=>{const f=s.nt(),h=s.useForm({...g,mode:c??"all",resolver:x?s.o(x):void 0});return t.jsx(s.FormProvider,{...h,children:t.jsx(Ha,{onSubmit:h.handleSubmit(d),children:t.jsxs($,{scroll:"y",width:"100%",children:[t.jsx($,{borderRadius:`0 0 ${f.spacing[.25]} ${f.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:i}),p&&t.jsxs($,{borderRadius:`0 0 ${f.spacing[.25]} ${f.spacing[.25]}`,borderTop:`1px solid ${f.palette.gray[200]}`,display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,maxWidth:l,children:[n?t.jsx(D,{icon:n.icon,id:`${o}-cancel`,justify:"center",onClick:n.onClick,type:"reset",variant:"tertiary",width:"100%",children:n.label??"Cancel"}):void 0,t.jsx(D,{disabled:((a==null?void 0:a.disabled)??!1)||r&&!h.formState.isDirty,icon:a==null?void 0:a.icon,id:o,justify:"center",type:"submit",width:"100%",children:(a==null?void 0:a.label)??"Confirm"})]})]})]})})})},_a=s.dt(Q)`
|
|
2071
2071
|
display: grid;
|
|
2072
2072
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2073
2073
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2121,7 +2121,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),g=u.useMemo(x,[x]),f=u.useCallback(a
|
|
|
2121
2121
|
background-color: ${e.palette.gray[100]};
|
|
2122
2122
|
}
|
|
2123
2123
|
`}
|
|
2124
|
-
`,tn=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=u.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Ze,{$isSelected:e,onClick:r,children:[e?t.jsx(z,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(v,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},Ya=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,x]=u.useState(n),[g,f]=u.useState(""),h=u.useCallback(m=>{x(
|
|
2124
|
+
`,tn=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=u.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Ze,{$isSelected:e,onClick:r,children:[e?t.jsx(z,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(v,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},Ya=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,x]=u.useState(n),[g,f]=u.useState(""),h=u.useCallback(m=>{x(w=>w.filter(j=>String(j.name).toLowerCase().includes(m.toLocaleLowerCase())))},[x]),y=u.useCallback(m=>{m.currentTarget&&(f(m.currentTarget.value),h(m.currentTarget.value))},[f,h]);u.useEffect(()=>{x(n),h(g)},[n,h,g]);const b=()=>t.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(Ua,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(v,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(B,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(re,{onInput:y,placeholder:"Search"})}),t.jsx(J,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(Ze,{onClick:i,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(z,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(v,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(m=>t.jsx(tn,{isSelected:o.toLowerCase()===m.name,label:m.name.charAt(0).toUpperCase()+m.name.slice(1),onSelect:a},m.name))]})]})})});return e?G.createPortal(b(),document.body):t.jsx("div",{})},Ka=({description:e,height:n="auto",leftIconName:i,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:x="318px"})=>{const g=s.nt(),f=p==="centered",h=l&&t.jsx(Y,{icon:r??i,iconColor:g.palette.gray[800],id:l,place:d,tip:c});return t.jsxs($,{alignItems:f?"center":"flex-start",bgColor:g.palette.gray[50],border:`1px solid ${g.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:x,children:[t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[f||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(v,{color:f?g.palette.gray[800]:g.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs($,{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(A,{fontWeight:"bold",size:"md",children:o}),a]}),f&&!s.lodashExports.isUndefined(r)?h:void 0]})]})},qa=({actions:e,children:n,header:i,title:a,tabs:r,footer:o})=>{const l=s.nt();return t.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(v,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:a}),i]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(B,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx($,{display:"flex",pt:.25,width:"100%",children:t.jsx(qe,{items:r})}),t.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},x)=>t.jsx(D,{icon:c,onClick:p,variant:x===0?"primary":"tertiary",width:"100%",children:d},`${x}-${d}`))})]})},Xa=s.dt.div`
|
|
2125
2125
|
${({theme:e})=>`
|
|
2126
2126
|
align-items: flex-start;
|
|
2127
2127
|
backdrop-filter: blur(3.15px);
|
|
@@ -2559,7 +2559,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),g=u.useMemo(x,[x]),f=u.useCallback(a
|
|
|
2559
2559
|
&::-webkit-inner-spin-button {
|
|
2560
2560
|
opacity: 1;
|
|
2561
2561
|
}
|
|
2562
|
-
`,Vr=u.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},x){const g=i<0?0:i,[f,h]=u.useState(Number(a).toFixed(g)),y=u.useCallback(
|
|
2562
|
+
`,Vr=u.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},x){const g=i<0?0:i,[f,h]=u.useState(Number(a).toFixed(g)),y=u.useCallback(w=>{const j=s.lodashExports.toNumber(w.target.value);w.target.value.endsWith(".")?h(w.target.value):j>=Number(o)&&j<=Number(r)&&(h(String(j)),n&&c(s.lodashExports.toNumber(j.toFixed(g)))),w.stopPropagation()},[n,g,r,o,c]),b=u.useCallback(w=>{w.currentTarget.contains(w.relatedTarget)||h(Number(a).toFixed(g)),w.stopPropagation()},[g,a]),m=u.useCallback(w=>{w.stopPropagation(),w.key==="Enter"&&!s.lodashExports.isEmpty(w.currentTarget.value)&&c(s.lodashExports.toNumber(w.currentTarget.value))},[c]);return t.jsx(Br,{onBlur:b,tabIndex:-1,children:t.jsx(Y,{id:"numberInputTooltip",tip:d,children:t.jsx(Mr,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(f),max:r,min:o,name:l,onChange:y,onKeyUp:m,ref:x,step:10**-g,type:"number",value:f})})})}),Hr={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},He=({icon:e,label:n,onClick:i,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(_,{alt:`${r} Logo`,height:"100%",publicId:Hr[r],width:"100%"}):t.jsx(z,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(v,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:n??r})})]})},Or=({align:e="end",buttonLabel:n="Add Credential",children:i,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=u.useState(!1),p=u.useRef(null);ee(p.current,()=>{d(!1)},!0);const x=u.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),g=u.useCallback(()=>{d(h=>!h)},[d]),f=u.useCallback(h=>y=>{var b;(b=o[h])==null||b.onClick(y),d(!1)},[o]);return t.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(D,{icon:"plus",onClick:g,variant:"primary",children:n}),t.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:a,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(He,{onClick:f(h),provider:h},h)),r===void 0?void 0:t.jsx(He,{icon:"square-plus",label:r.label??"Add manually",onClick:x}),i]})]})},rn=()=>t.jsx($,{alignItems:"center",bgColor:I.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(v,{bgGradient:I.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),_r=s.dt.div`
|
|
2563
2563
|
${({className:e,theme:n})=>`
|
|
2564
2564
|
align-items: flex-start;
|
|
2565
2565
|
border-radius: ${n.spacing[1]};
|
|
@@ -2625,7 +2625,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),g=u.useMemo(x,[x]),f=u.useCallback(a
|
|
|
2625
2625
|
}
|
|
2626
2626
|
`}
|
|
2627
2627
|
`;const Gr={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
|
|
2628
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Ur=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=Gr[i],c=e??r;return t.jsxs(_r,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&t.jsx(rn,{}),t.jsx(A,{color:I.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(v,{color:I.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(v,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(D,{onClick:n,variant:"primary",children:l})]})},on=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),a=typeof n=="string",r=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(v,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(u.Fragment,{children:[t.jsx(we,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(r).map((o,l)=>n.includes(o)?t.jsx(we,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(v,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Yr=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:x,titleColor:g})=>{const f=s.nt(),{alt:h,src:y,width:b="77px",height:m="77px"}=d,
|
|
2628
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Ur=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=Gr[i],c=e??r;return t.jsxs(_r,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&t.jsx(rn,{}),t.jsx(A,{color:I.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(v,{color:I.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(v,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(D,{onClick:n,variant:"primary",children:l})]})},on=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),a=typeof n=="string",r=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(v,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(u.Fragment,{children:[t.jsx(we,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(r).map((o,l)=>n.includes(o)?t.jsx(we,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(v,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Yr=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:x,titleColor:g})=>{const f=s.nt(),{alt:h,src:y,width:b="77px",height:m="77px"}=d,w=u.useCallback(()=>{n==null||n.onClick()},[n]),j=u.useCallback(()=>{r==null||r.onClick()},[r]),S=t.jsx($,{alignItems:"center","aria-label":x,"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($,{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($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx($,{children:t.jsx(_,{alt:h,height:m,publicId:y,width:b})}),t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(A,{color:g,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:x}),t.jsx(on,{description:l,highlightDescription:c})]})]}),a&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:a})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(r)?t.jsx(D,{onClick:j,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,s.lodashExports.isObject(n)?t.jsx(D,{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?G.createPortal(S,o??document.body):S},Kr=s.dt.div`
|
|
2629
2629
|
${({theme:e})=>`
|
|
2630
2630
|
height: ${e.spacing[1]};
|
|
2631
2631
|
width: ${e.spacing[1]};
|
|
@@ -2944,7 +2944,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),g=u.useMemo(x,[x]),f=u.useCallback(a
|
|
|
2944
2944
|
height: ${e.spacing[.5]};
|
|
2945
2945
|
}
|
|
2946
2946
|
`}
|
|
2947
|
-
`,me=({hit:e,icon:n="infinity",showIcon:i=!1})=>{const{slug:a,title:r}=e,o=String(a).startsWith("/pages/")?String(a).replace("/pages/","/"):String(a);return t.jsxs(oo,{href:o,rel:"nofollow noopener noreferrer",children:[i&&t.jsx(so,{children:t.jsx(z,{icon:n,iconClass:"fill-gradient-01",iconSize:"sm",iconType:"fa-light"})}),t.jsx(v,{color:I.palette.gray[800],lineSpacing:1.5,size:"md",sizeSm:"sm",whiteSpace:"wrap",children:String(r)})]})},uo=[{hit:{slug:"/services/continuous-hacking/",title:"Continuous Hacking"},icon:"infinity"},{hit:{slug:"/platform/",title:"Platform"},icon:"sidebar"},{hit:{slug:"/plans/",title:"Plans"},icon:"star-christmas"},{hit:{slug:"/blog/",title:"Blog"},icon:"pen-line"}],gt={hit:{slug:"/contact-us/",title:"Contact Support"},icon:"envelope"},xo=({items:e,placeholder:n="Search",refine:i,query:a})=>{const[r,o]=u.useState(a),[l,c]=u.useState(!1),d=u.useRef(null),p=u.useRef(null),x=r.length>=2,g=u.useCallback(
|
|
2947
|
+
`,me=({hit:e,icon:n="infinity",showIcon:i=!1})=>{const{slug:a,title:r}=e,o=String(a).startsWith("/pages/")?String(a).replace("/pages/","/"):String(a);return t.jsxs(oo,{href:o,rel:"nofollow noopener noreferrer",children:[i&&t.jsx(so,{children:t.jsx(z,{icon:n,iconClass:"fill-gradient-01",iconSize:"sm",iconType:"fa-light"})}),t.jsx(v,{color:I.palette.gray[800],lineSpacing:1.5,size:"md",sizeSm:"sm",whiteSpace:"wrap",children:String(r)})]})},uo=[{hit:{slug:"/services/continuous-hacking/",title:"Continuous Hacking"},icon:"infinity"},{hit:{slug:"/platform/",title:"Platform"},icon:"sidebar"},{hit:{slug:"/plans/",title:"Plans"},icon:"star-christmas"},{hit:{slug:"/blog/",title:"Blog"},icon:"pen-line"}],gt={hit:{slug:"/contact-us/",title:"Contact Support"},icon:"envelope"},xo=({items:e,placeholder:n="Search",refine:i,query:a})=>{const[r,o]=u.useState(a),[l,c]=u.useState(!1),d=u.useRef(null),p=u.useRef(null),x=r.length>=2,g=u.useCallback(w=>{o(w),i(w)},[i]),f=u.useCallback(()=>{g("")},[g]),h=u.useCallback(()=>{c(!0)},[]),y=u.useCallback(w=>{g(w.currentTarget.value)},[g]),b=u.useCallback(w=>{w.preventDefault(),w.stopPropagation(),f(),p.current&&p.current.focus()},[f]),m=u.useCallback(w=>{w.preventDefault(),w.stopPropagation(),p.current&&p.current.blur()},[]);return ee(d.current,()=>{f(),c(!1)},!0),t.jsxs(lo,{ref:d,children:[t.jsxs(co,{action:"",noValidate:!0,onReset:b,onSubmit:m,role:"search",children:[t.jsxs("div",{className:"flex gap-2 w-full",children:[t.jsx("div",{className:"h-10 p-2",children:t.jsx(z,{icon:"magnifying-glass",iconSize:"sm",iconType:"fa-light"})}),t.jsx(po,{autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",maxLength:512,onChange:y,onFocus:h,placeholder:n,ref:p,spellCheck:!1,type:"search",value:r})]}),x&&t.jsx(go,{type:"reset",children:t.jsx(z,{icon:"xmark",iconSize:"sm",iconType:"fa-light"})})]}),l&&r.length<2&&t.jsxs(Re,{children:[t.jsx(v,{color:I.palette.gray[400],fontWeight:"bold",lineSpacing:1.5,size:"md",sizeSm:"sm",children:"Suggested"}),t.jsx("div",{className:"flex flex-col items-start self-stretch",children:uo.map(({hit:w,icon:j},S)=>t.jsx(me,{hit:w,icon:j,showIcon:!0},`${j}-${S}`))}),t.jsx(v,{color:I.palette.gray[400],fontWeight:"bold",lineSpacing:1.5,size:"md",sizeSm:"sm",children:"Can’t find what you’re looking for?"}),t.jsx(me,{hit:gt.hit,icon:gt.icon,showIcon:!0})]}),x&&e.length>0&&t.jsxs(Re,{$showHits:x,children:[t.jsx(v,{color:I.palette.gray[400],fontWeight:"bold",lineSpacing:1.5,size:"md",sizeSm:"sm",children:"Results"}),t.jsx("div",{className:"flex flex-col items-start self-stretch",children:e.map(w=>t.jsx(me,{hit:w},w.objectID))})]}),x&&e.length===0&&t.jsx(Re,{$empty:e.length===0,children:t.jsxs("div",{className:"items-center flex flex-col gap-4 py-[90px] w-full",children:[t.jsx(_,{height:96,publicId:"airs/search-bar/empty-state-icon",width:96}),t.jsx(A,{display:"flex",size:"sm",sizeSm:"xs",textAlign:"center",children:"No results found"}),t.jsxs(v,{display:"flex",lineSpacing:1.5,size:"md",sizeSm:"sm",textAlign:"center",children:[`“${r}” did not match.`,t.jsx("br",{}),"Please try again."]}),t.jsx(D,{onClick:f,variant:"secondary",children:"Clear search"})]})})]})},fo={critical:{bgColor:I.palette.primary[700],colorL:I.palette.gray[800],colorR:I.palette.white},disable:{bgColor:I.palette.gray[200],colorL:I.palette.gray[400],colorR:I.palette.gray[400]},high:{bgColor:I.palette.error[500],colorL:I.palette.gray[800],colorR:I.palette.white},low:{bgColor:I.palette.warning[200],colorL:I.palette.gray[800],colorR:I.palette.gray[800]},medium:{bgColor:I.palette.warning[500],colorL:I.palette.gray[800],colorR:I.palette.gray[800]}},ho=({textL:e,textR:n,variant:i})=>{const a=s.nt(),{bgColor:r,colorL:o,colorR:l}=fo[i];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${r}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(v,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:r,border:`1px solid ${r}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(v,{color:l,size:"xs",children:n})})]})},bo=(e,n)=>{const i={critical:I.palette.primary[700],high:I.palette.error[500],low:I.palette.warning[200],medium:I.palette.warning[500],none:I.palette.gray[200]},a={disabled:I.palette.gray[400],enabled:I.palette.gray[800]},r={critical:I.palette.white,high:I.palette.white,low:I.palette.gray[800],medium:I.palette.gray[800],none:I.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?r.none:r[e],textColor:n<1?a.disabled:a.enabled}},ie=({variant:e,value:n})=>{const{iconColor:i,iconText:a,iconTextColor:r,textColor:o}=bo(e,n),l=s.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(Y,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(v,{color:r,size:"sm",textAlign:"center",children:a})})}),t.jsx(v,{color:o,size:"sm",children:n})]})},$o=({critical:e,high:n,medium:i,low:a})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(ie,{value:e,variant:"critical"}),t.jsx(ie,{value:n,variant:"high"}),t.jsx(ie,{value:i,variant:"medium"}),t.jsx(ie,{value:a,variant:"low"})]}),yo=s.dt.div`
|
|
2948
2948
|
${({theme:e})=>`
|
|
2949
2949
|
border-radius: ${e.spacing[.25]};
|
|
2950
2950
|
cursor: pointer;
|
|
@@ -2985,7 +2985,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),g=u.useMemo(x,[x]),f=u.useCallback(a
|
|
|
2985
2985
|
height: auto;
|
|
2986
2986
|
}
|
|
2987
2987
|
`}
|
|
2988
|
-
`,jo=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const x=s.nt(),g=u.useRef(null),f=u.useCallback(h=>()=>{h(),r()},[r]);return u.useEffect(()=>{const h=["mousedown","touchstart"],y=b=>{var
|
|
2988
|
+
`,jo=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const x=s.nt(),g=u.useRef(null),f=u.useCallback(h=>()=>{h(),r()},[r]);return u.useEffect(()=>{const h=["mousedown","touchstart"],y=b=>{var C;const m=b.target,w=document.getElementById("helpBtn"),j=document.getElementById("filterBtn"),S=(m===w||((w==null?void 0:w.contains(m))??!1)||m===j||(j==null?void 0:j.contains(m)))??!1;i&&!S&&!(((C=g.current)==null?void 0:C.contains(m))??!1)&&r()};return h.forEach(b=>{document.addEventListener(b,y,{passive:!0})}),()=>{h.forEach(b=>{document.removeEventListener(b,y)})}},[i,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(wo,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:g,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs($,{height:"100%",position:"relative",children:[t.jsxs($,{alignItems:"center",bgColor:x.palette.white,borderBottom:"1px solid",borderColor:x.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(v,{color:x.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(B,{icon:"close",iconColor:x.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs($,{py:1.25,children:[(a??[]).map(({customBadge:h,description:y,icon:b,onClick:m,requiresUpgrade:w,title:j})=>t.jsx(ln,{customBadge:h,description:y,icon:b,onClick:f(m),requiresUpgrade:w,title:j},j)),e&&t.jsx($,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs($,{alignItems:"center",bgColor:x.palette.white,borderColor:x.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(D,{color:`${x.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(D,{onClick:l,type:"submit",children:o})]})]})]})})})},ko=(e,n)=>n>=50?`
|
|
2989
2989
|
${e.palette.gray[200]} 50%,
|
|
2990
2990
|
${e.palette.primary[500]} 50.05%,
|
|
2991
2991
|
${e.palette.primary[500]} ${n}%,
|