@fluidattacks/design 3.15.9 → 3.16.0-pr
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/@core/index.js +1 -1
- package/dist/components/accordion/accordion-content/index.js +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/card-header/index.js +1 -1
- package/dist/components/card/card-with-image/index.js +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-options/index.js +1 -1
- package/dist/components/card/card-with-selector/index.js +1 -1
- package/dist/components/card/card-with-switch/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-array/field/index.js +1 -1
- package/dist/components/inputs/fields/input-array/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/layout/categories/buttons/index.js +1 -1
- package/dist/components/layout/categories/column/index.js +1 -1
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/lottie/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/modal/columns-modal/index.js +1 -1
- package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
- package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
- package/dist/components/modal/filters-modal/index.d.ts +3 -2
- package/dist/components/modal/filters-modal/index.js +1 -1
- package/dist/components/modal/filters-modal/types.d.ts +2 -0
- package/dist/components/modal/filters-modal/utils.d.ts +4 -1
- package/dist/components/modal/footer/index.js +1 -1
- package/dist/components/modal/header/index.js +1 -1
- package/dist/components/modal/index.d.ts +2 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/modal/modal-confirm/index.js +1 -1
- package/dist/components/notification/index.js +1 -1
- package/dist/components/notification-sign/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/oauth-selector/index.js +1 -1
- package/dist/components/oauth-selector/option-container/index.js +1 -1
- package/dist/components/plan-card/index.js +1 -1
- package/dist/components/plan-card/recommended-tag/index.js +1 -1
- package/dist/components/pop-up/description/index.js +1 -1
- package/dist/components/pop-up/index.js +1 -1
- package/dist/components/premium-feature/index.js +1 -1
- package/dist/components/priority-score/index.js +1 -1
- package/dist/components/progress-bar/index.js +1 -1
- package/dist/components/radio-button/index.js +1 -1
- package/dist/components/scroll-button/index.js +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/severity-badge/index.js +1 -1
- package/dist/components/severity-overview/badge/index.js +1 -1
- package/dist/components/severity-overview/index.js +1 -1
- package/dist/components/show-on-hover/index.js +1 -1
- package/dist/components/slide-out-menu/index.js +1 -1
- package/dist/components/slide-out-menu/menu-item/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/thumb/index.js +1 -1
- package/dist/components/step-lapse/index.js +1 -1
- package/dist/components/table-button/index.js +1 -1
- package/dist/components/tabs/fixed-tabs/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tab/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle-buttons/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +1 -1
- package/dist/components/typography/heading/index.js +1 -1
- package/dist/components/typography/index.js +1 -1
- package/dist/components/typography/span/index.js +1 -1
- package/dist/components/typography/text/index.js +1 -1
- package/dist/{components-C8PmsjMP.js → components-B0oFSI08.js} +82 -82
- package/dist/{components-D4QZDEj0.mjs → components-BZlyhh3F.mjs} +723 -731
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`},Ri=e=>e.includes("x")?"overflow-x: auto;":"",Ei=e=>e.includes("y")?"overflow-y: auto;":"",xe=e=>{const i=e.scroll?`
|
|
17
17
|
${Ri(e.scroll)}
|
|
18
18
|
${Ei(e.scroll)}
|
|
19
|
-
`:"",n=F("visibility",e.visibility),r=F("display",e.display),a=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),g=F("box-shadow",e.shadow?z.shadows[e.shadow]:void 0),u=F("gap",e.gap===void 0?void 0:z.spacing[e.gap]),f=F("background-color",e.bgColor),h=F("background",e.bgGradient),y=F("flex-direction",e.flexDirection)
|
|
19
|
+
`:"",n=F("visibility",e.visibility),r=F("display",e.display),a=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),g=F("box-shadow",e.shadow?z.shadows[e.shadow]:void 0),u=F("gap",e.gap===void 0?void 0:z.spacing[e.gap]),f=F("background-color",e.bgColor),h=F("background",e.bgGradient),y=F("flex-direction",e.flexDirection),m=F("flex-grow",e.flexGrow),b=F("justify-content",e.justify),w=F("justify-self",e.justifySelf),j=F("align-items",e.alignItems),v=F("align-self",e.alignSelf),k=F("flex-wrap",e.wrap);return`
|
|
20
20
|
${i}
|
|
21
21
|
${n}
|
|
22
22
|
${r}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
${h}
|
|
32
32
|
${u}
|
|
33
33
|
${y}
|
|
34
|
-
${
|
|
34
|
+
${m}
|
|
35
35
|
${b}
|
|
36
36
|
${w}
|
|
37
37
|
${j}
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
${r};
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
|
-
|
|
111
|
+
`,$=x.forwardRef(function({as:i="div",center:n,children:r,id:a,onHover:o,onLeave:l,styleMd:c,styleSm:d,...p},g){return t.jsx(Di,{$center:n,$styleMd:c,$styleSm:d,as:i,id:a,onMouseLeave:l,onMouseOver:o,ref:g,...p,children:r})}),Li=s.dt(Ue)`
|
|
112
112
|
${({theme:e,$bgGradient:i="unset",$color:n=e.palette.gray[800],$display:r="block",$fontFamily:a=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:u,$textFill:f="unset",$whiteSpace:h="pre-line",$wordBreak:y="normal"})=>`
|
|
113
113
|
background: ${i};
|
|
114
114
|
color: ${n};
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
|
|
179
179
|
${n===void 0?"":`&::after { content: "${n}"; }`}
|
|
180
180
|
`}
|
|
181
|
-
`,G=x.forwardRef(function({bgGradient:i,children:n,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:f,sizeSm:h,textFill:y,whiteSpace
|
|
181
|
+
`,G=x.forwardRef(function({bgGradient:i,children:n,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:f,sizeSm:h,textFill:y,whiteSpace:m,wordBreak:b,...w},j){return t.jsx(Li,{$bgGradient:i,$color:a,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:u,$sizeMd:f,$sizeSm:h,$textFill:y,$whiteSpace:m,$wordBreak:b,className:r,ref:j,...w,children:n})}),se=x.forwardRef(function({children:i,color:n,content:r,display:a,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:f,...h},y){return t.jsx(Pi,{$color:n,$content:r,$display:a,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:f,ref:y,...h,children:i})}),C=x.forwardRef(function({bgGradient:i,children:n,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:f,sizeSm:h,textFill:y,whiteSpace:m,wordBreak:b,...w},j){return t.jsx(gt,{$bgGradient:i,$color:a,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:u,$sizeMd:f,$sizeSm:h,$textFill:y,$whiteSpace:m,$wordBreak:b,className:r,ref:j,...w,children:n})}),ut=({item:e})=>{const i=e.description&&typeof e.description=="string"?t.jsx(C,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[i,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},Ai={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Wi=s.dt(Ye)`
|
|
182
182
|
${({$clickable:e,$color:i="inherit",$disabled:n=!1,$hoverColor:r,$rotation:a,$size:o,$secondaryColor:l})=>{const c=r?"":"brightness(50%)",d=r??"";return`
|
|
183
183
|
color: ${i};
|
|
184
184
|
cursor: ${e?"pointer":"inherit"};
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
&:hover:not([disabled]) {
|
|
215
215
|
transform: scale(1.2);
|
|
216
216
|
}
|
|
217
|
-
`;const I=x.forwardRef(function({clickable:i,disabled:n,hoverColor:r,icon:a,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:u,rotation:f,spanClass:h,secondaryColor:y
|
|
217
|
+
`;const I=x.forwardRef(function({clickable:i,disabled:n,hoverColor:r,icon:a,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:u,rotation:f,spanClass:h,secondaryColor:y,...m},b){return t.jsx(Wi,{$clickable:i,$color:l,$disabled:n,$hoverColor:r,$rotation:f,$secondaryColor:y,$size:d,className:h,"data-testid":`${a}-icon`,onClick:u,ref:b,...m,children:t.jsx("i",{className:`${g} fa-${a} ${o}`,...c!==void 0?{"data-fa-mask":c}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${a}`)}),Bi=x.forwardRef(function({aligned:i="end",items:n,bgColor:r},a){const o=s.nt(),[l,c]=x.useState(!1),[d,p]=x.useState(-1),g=x.useCallback(u=>()=>{p(u),c(u===d?f=>!f:!0)},[d]);return t.jsx($,{ref:a,children:n.map((u,f)=>{const h=f===d&&l;return t.jsxs($,{bgColor:r??o.palette.white,children:[t.jsx($,{"aria-controls":`panel-${u.title}`,"aria-expanded":l,"aria-label":u.title,as:"button",bgColor:r??o.palette.white,bgColorHover:o.palette.gray[100],borderBottom:h||f===n.length-1?"1px solid":void 0,borderColor:o.palette.gray[200],borderTop:"1px solid",cursor:"pointer",display:"flex",onClick:g(f),padding:[.75,.75,.75,.75],width:"100%",children:t.jsxs($,{as:"summary",display:"flex",flexDirection:i==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[t.jsx(C,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:u.title}),t.jsx(I,{icon:h?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),h&&t.jsx(ut,{item:u})]},u.title)})})}),Oi=e=>{switch(e){case"warning":return"triangle-exclamation";case"info":return"circle-info";case"success":return"circle-check";case"error":default:return"circle-exclamation"}},{getVariant:Hi}=q(e=>({error:`
|
|
218
218
|
background: ${e.palette.error[50]};
|
|
219
219
|
border: 1px solid ${e.palette.error[500]};
|
|
220
220
|
color: ${e.palette.error[700]};
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
color: ${e.palette.warning[700]};
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
`})),
|
|
269
|
+
`})),Mi=s.dt.div`
|
|
270
270
|
${({theme:e,$variant:i})=>`
|
|
271
271
|
background: transparent;
|
|
272
272
|
align-items: center;
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
background-color: transparent;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
${
|
|
289
|
+
${Hi(e,i??"error")}
|
|
290
290
|
`}
|
|
291
291
|
`,Vi=s.dt.div`
|
|
292
292
|
padding-right: 4px;
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
width: max-content;
|
|
415
415
|
z-index: 999999;
|
|
416
416
|
`}
|
|
417
|
-
`,U=({children:e,disabled:i=!1,display:n="inline-block",height:r,icon:a,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:y})=>{const
|
|
417
|
+
`,U=({children:e,disabled:i=!1,display:n="inline-block",height:r,icon:a,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:y})=>{const m=s.nt(),[b,w]=x.useState(!1),{refs:j,floatingStyles:v,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:w,open:b,placement:g,whileElementsMounted:s.autoUpdate}),T=s.useHover(k,{delay:{close:0,open:500},move:!1}),S=s.useFocus(k),N=s.useRole(k,{role:a?"label":"tooltip"}),{getReferenceProps:R,getFloatingProps:A}=s.useInteractions([T,S,N]);return i?t.jsx(x.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Ui,{...R(),display:n,height:r,id:c,ref:j.setReference,width:y,children:a?t.jsx(I,{clickable:!0,disabled:i,icon:a,iconColor:o,iconSize:l??"xxs",iconType:b?"fa-solid":"fa-light"}):e}),b&&!h&&Z.createPortal(t.jsxs(Yi,{...A(),$maxWidth:d,id:`floating-${c}`,ref:j.setFloating,style:v,children:[s.lodashExports.isEmpty(f)?void 0:t.jsx(C,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),s.lodashExports.isEmpty(u)?void 0:t.jsx(C,{color:m.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},W=x.forwardRef(function({borderRadius:i,disabled:n,icon:r,iconColor:a,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:u,py:f,type:h="button",tooltip:y,tooltipPlace:m,value:b,variant:w="primary",...j},v){const k=t.jsx(Gi,{$borderRadius:i,$px:u,$py:f,$variant:w,"aria-disabled":n,"aria-label":d,borderRadius:i,disabled:n,id:d,justify:p,onClick:g,ref:v,type:h,value:b,...j,children:t.jsx(I,{clickable:!1,icon:r,iconColor:a,iconSize:o,iconTransform:l,iconType:c})}),S=(h+(w??"")+(d??r)).replace(/ /u,"_");return y===void 0?k:t.jsx(U,{id:`${S}-tooltip`,place:m,tip:y,children:k})}),qi=x.forwardRef(function({autoHide:i=!1,children:n,closable:r=!1,onTimeOut:a,show:o=!0,time:l=8,variant:c="error",id:d,...p},g){const[u,f]=x.useState(o),h=x.useCallback(()=>{f(!1)},[]);return x.useEffect(()=>{const y=setTimeout(()=>{a==null||a(!0),i&&h()},l*1e3);return()=>{clearTimeout(y)}},[i,h,l,a]),x.useEffect(()=>{f(o)},[o,f]),t.jsx($,{display:u?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(Mi,{$variant:c,id:d,children:[t.jsx(I,{clickable:!1,icon:Oi(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(Vi,{children:n}),r?t.jsx(W,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),tt=s.dt.div`
|
|
418
418
|
${({theme:e})=>`
|
|
419
419
|
align-items: center;
|
|
420
420
|
background-color: ${e.palette.gray[200]};
|
|
@@ -632,7 +632,7 @@
|
|
|
632
632
|
${ft}
|
|
633
633
|
`,en=s.dt(Le.Link)`
|
|
634
634
|
${ft}
|
|
635
|
-
`,J=({children:e,color:i,download:n,href:r,iconPosition:a="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=r.startsWith("https://"),p=t.jsx(I,{icon:n===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(Qi,{$color:i,$variant:c,download:n,href:r,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[a==="left"?p:void 0,e,a==="right"?p:void 0]}):t.jsxs(en,{$variant:c,download:n,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:r,children:[l!==void 0&&a==="left"?p:void 0,e,l!==void 0&&a==="right"?p:void 0]})},K=({disabled:e,icon:i,iconColor:n="inherit",iconType:r="fa-light",id:a="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const y=f.length>25&&s.lodashExports.isEmpty(u+o)
|
|
635
|
+
`,J=({children:e,color:i,download:n,href:r,iconPosition:a="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=r.startsWith("https://"),p=t.jsx(I,{icon:n===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(Qi,{$color:i,$variant:c,download:n,href:r,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[a==="left"?p:void 0,e,a==="right"?p:void 0]}):t.jsxs(en,{$variant:c,download:n,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:r,children:[l!==void 0&&a==="left"?p:void 0,e,l!==void 0&&a==="right"?p:void 0]})},K=({disabled:e,icon:i,iconColor:n="inherit",iconType:r="fa-light",id:a="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const y=f.length>25&&s.lodashExports.isEmpty(u+o),m=`${f.slice(0,25)}...`;return t.jsxs(se,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(Zi,{$fontSize:l,$variant:h,className:g,children:[i&&t.jsx(I,{icon:i,iconColor:n,iconSize:"xxs",iconType:r}),t.jsxs("span",{children:[t.jsx("strong",{children:u}),t.jsx("span",{children:y?m:f}),t.jsx("strong",{children:o})]}),p?t.jsx(W,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:a,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(J,{href:c,children:d})]})},tn=(e,i=!0)=>{const n=window.open(e,i?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(n)&&(n.opener=null)},L=x.forwardRef(function({children:i,disabled:n=!1,external:r=!1,fontSize:a,href:o,id:l,icon:c,name:d,onClick:p,showArrow:g=!1,tag:u,type:f="button",tooltip:h,tooltipPlace:y="bottom",underline:m=!1,value:b,variant:w="primary",width:j,...v},k){const T=h!==void 0,S=`${l}-tooltip`,N=x.useCallback(()=>{o&&tn(o,r)},[r,o]),R=t.jsxs(xt,{$size:a,$variant:w,"aria-disabled":n,className:m?"underline":void 0,disabled:n,id:l,name:d,onClick:w==="link"?N:p,ref:k,type:f,value:b,width:j,...T?{"data-tooltip-id":S}:{},...v,children:[c!==void 0&&t.jsx(I,{icon:c,iconSize:"xs",iconType:"fa-light"}),i,(g||w==="link")&&t.jsx(I,{icon:"arrow-right",iconSize:"xs",iconType:"fa-light"}),u===void 0?null:t.jsx(K,{tagLabel:u,variant:"inactive"})]});return T?t.jsx(U,{disabled:!T,id:S,place:y,tip:h,width:j,children:R}):R}),nn=x.forwardRef(function({children:i,onClick:n,userName:r,showIcon:a=!1,showUsername:o=!1},l){const c=!!n;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(L,{onClick:n,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(tt,{children:r[0].toUpperCase()}),o?t.jsx(C,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:r.split(" ")[0]}):void 0,a?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(tt,{children:r[0].toUpperCase()}),o?t.jsxs(C,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",r.split(" ")[0],"!"]}):void 0,a?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(Ki,{children:i})]})})}),Se=({authorEmail:e,date:i,description:n,descriptionColor:r,id:a,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs($,{width:"100%",children:[typeof o=="string"?t.jsx(C,{color:l??g.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:[n&&t.jsx(C,{color:r??g.palette.gray[800],fontWeight:n===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:n}),i&&t.jsx(C,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${i.split(" ")[0]}`}),e&&t.jsx(C,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(U,{icon:"circle-info",id:a,tip:p})]})]})},it=s.dt($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
636
636
|
& img {
|
|
637
637
|
display: block;
|
|
638
638
|
}
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
pointer-events: none;
|
|
648
648
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
649
649
|
}
|
|
650
|
-
`,rn=e=>{if(s._.isNil(e))return"";const i=e.split(".");return(i.length>1?s._.last(i):"").toLowerCase()},an=(e,i)=>s._.isUndefined(i)?!1:s._.includes(e,rn(i)),ht=({alt:e,fileType:i,width:n="100%",opacity:r=0,src:a,height:o="auto"})=>i==="video"||an(["webm"],a)?t.jsx(it,{$opacity:r,children:t.jsxs("video",{controls:!0,muted:!0,style:{height:o,width:n},children:[t.jsx("source",{src:a,type:"video/webm"}),t.jsx(J,{href:a,iconPosition:"hidden",children:a})]})}):t.jsx(it,{$opacity:r,children:t.jsx("img",{alt:e,src:a,style:{height:o,width:n}})}),on=({alt:e,authorEmail:i,date:n,description:r,src:a,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0})=>{const f=s.nt(),[h,y]=x.useState(!1)
|
|
650
|
+
`,rn=e=>{if(s._.isNil(e))return"";const i=e.split(".");return(i.length>1?s._.last(i):"").toLowerCase()},an=(e,i)=>s._.isUndefined(i)?!1:s._.includes(e,rn(i)),ht=({alt:e,fileType:i,width:n="100%",opacity:r=0,src:a,height:o="auto"})=>i==="video"||an(["webm"],a)?t.jsx(it,{$opacity:r,children:t.jsxs("video",{controls:!0,muted:!0,style:{height:o,width:n},children:[t.jsx("source",{src:a,type:"video/webm"}),t.jsx(J,{href:a,iconPosition:"hidden",children:a})]})}):t.jsx(it,{$opacity:r,children:t.jsx("img",{alt:e,src:a,style:{height:o,width:n}})}),on=({alt:e,authorEmail:i,date:n,description:r,src:a,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0})=>{const f=s.nt(),[h,y]=x.useState(!1),m=x.useCallback(()=>{y(!0)},[]),b=x.useCallback(()=>{y(!1)},[]);return t.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:f.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:m,onLeave:b,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(x.Fragment,{children:[t.jsx(ht,{alt:e,fileType:g,height:"147px",opacity:h?.3:0,src:a,width:"100%"}),u?t.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(W,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),p?null:t.jsx(Se,{authorEmail:i,date:n,description:r,descriptionColor:f.palette.gray[600],id:`${e}-card-header`,title:d})]})},sn=s.dt.div`
|
|
651
651
|
${({theme:e,$align:i="center",$minWidth:n="auto",$minHeight:r="auto"})=>`
|
|
652
652
|
display: flex;
|
|
653
653
|
background-color: ${e.palette.white};
|
|
@@ -809,7 +809,7 @@
|
|
|
809
809
|
border: 1px solid ${e.palette.gray[600]};
|
|
810
810
|
}
|
|
811
811
|
`}
|
|
812
|
-
`,
|
|
812
|
+
`,O=({children:e,error:i,helpLink:n,helpLinkText:r="Link here",helpText:a,htmlFor:o,label:l,linkPosition:c="down",maxLength:d,required:p,tooltip:g,value:u,weight:f})=>{const h=s.nt(),y=u?u.length:0;return t.jsxs(ln,{children:[l===void 0?void 0:t.jsx(qe,{htmlFor:o,label:l,link:c==="up"?n:void 0,required:p,tooltip:g,weight:f}),e,i||d?t.jsxs($,{display:"flex",justify:i===void 0?"end":"space-between",width:"100%",children:[i&&t.jsx(C,{className:"error-msg",color:h.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:i}),d&&t.jsx(K,{priority:"low",tagLabel:`${y}/${d}`,variant:"error"})]}):void 0,a||n?t.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[a&&t.jsxs(t.Fragment,{children:[t.jsx(I,{icon:"circle-info",iconColor:h.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(C,{color:h.palette.gray[400],display:"inline-block",size:"sm",children:a})]}),n&&c==="down"?t.jsx(J,{href:n,children:r}):void 0]}):void 0]})},$e=({className:e,children:i,isFilter:n=!1,popoverRef:r,state:a,triggerRef:o,...l})=>{var u;const c=x.useRef(null),d=(u=o==null?void 0:o.current)==null?void 0:u.getBoundingClientRect(),{popoverProps:p}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:r??c,triggerRef:o,isNonModal:r?!0:void 0},a),g=x.useCallback(f=>{f.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,onPointerDown:n?g:void 0,ref:r??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:i})})},cn=s.dt.ul`
|
|
813
813
|
${({theme:e})=>`
|
|
814
814
|
align-self: center;
|
|
815
815
|
background: ${e.palette.white};
|
|
@@ -859,7 +859,7 @@
|
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
861
|
`}
|
|
862
|
-
`,bt=({item:e,state:i})=>{const n=s.nt(),r=x.useRef(null),{optionProps:a,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},i,r),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(dn,{...a,className:d,ref:r,children:[t.jsx(C,{color:n.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(I,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Pe=({field:e,disabled:i=!1,error:n,helpLink:r,helpLinkText:a,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value
|
|
862
|
+
`,bt=({item:e,state:i})=>{const n=s.nt(),r=x.useRef(null),{optionProps:a,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},i,r),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(dn,{...a,className:d,ref:r,children:[t.jsx(C,{color:n.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(I,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Pe=({field:e,disabled:i=!1,error:n,helpLink:r,helpLinkText:a,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value:m,weight:b})=>{var et;const w=s.nt(),j=i?void 0:n,v=(e==null?void 0:e.value)??m,[k,T]=x.useState(((et=p.find(D=>D.value===v))==null?void 0:et.name)??""),[S,N]=x.useState(v),[R,A]=x.useState(p),[E,P]=x.useState(!1),{contains:M}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),Y=x.useRef(null),V=x.useRef(null),B=x.useRef(null),H=x.useRef(null),ee=x.useRef(null),De=x.useMemo(()=>p.map(D=>M(D.name,k)||E?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:D.name},D.value):null),[M,k,p,E]),ci=x.useCallback(D=>{T(D),D===""?P(!0):(P(!1),N(_=>{const we=D===""?"":_;return e&&e.onChange(we),u&&u(D),we}),A(p.filter(_=>M(_.name,D))))},[M,p,e,u]),di=x.useCallback(D=>{var _;T(((_=p.find(we=>we.value===D))==null?void 0:_.name)??""),N(D?String(D):""),e&&e.onChange(D),u&&u(D?String(D):""),A(p)},[p,e,u]),Qe=x.useCallback(D=>{D.key==="Enter"&&D.preventDefault(),P(!1)},[]),pi=x.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),X=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:k,items:R,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:S,onBlur:pi,onInputChange:ci,onKeyDown:Qe,onKeyUp:()=>{P(!0)},onOpenChange(D,_){P(D&&(_==="manual"||_==="focus"))},onSelectionChange:di,children:De}),{buttonProps:gi,inputProps:ui,listBoxProps:xi}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:k,buttonRef:V,id:d,inputRef:Y,label:l??d,listBoxRef:B,name:d,placeholder:f,popoverRef:ee},X),{listBoxProps:fi}=s.$c132121280ec012d$export$50eacbbf140a3141(xi,X,B),{buttonProps:hi}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(gi,V);return x.useEffect(()=>{var D;(c===!1||!v)&&T(((D=p.find(_=>_.value===v))==null?void 0:D.name)??"")},[v,p,c]),t.jsxs(O,{error:j,helpLink:r,helpLinkText:a,helpText:o,htmlFor:d,label:l,required:h,tooltip:y,weight:b,children:[t.jsxs(Q,{className:`${i?"disabled":""} ${j?"error":""}`,ref:H,children:[t.jsx("input",{...ui,"aria-invalid":j?"true":"false","aria-label":d,onKeyDown:Qe,ref:Y}),j?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}):void 0,t.jsx(W,{...hi,className:"action",icon:X.isOpen?"chevron-up":"chevron-down",iconColor:w.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:V,type:"button",variant:"ghost"})]}),X.isOpen&&X.collection.size>0&&!i?t.jsx($e,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:ee,state:X,triggerRef:H,children:t.jsx(cn,{...fi,ref:B,children:[...X.collection].map(D=>t.jsx(bt,{item:D,state:X},D.key))})}):null]})},yt=({control:e,disabled:i=!1,error:n,helpLink:r,helpLinkText:a,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value:m,weight:b})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:w,fieldState:j})=>{var v;return t.jsx(Pe,{disabled:i,error:(v=j.error)==null?void 0:v.message,field:w,helpLink:r,helpLinkText:a,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value:m,weight:b})},rules:{required:h}}):t.jsx(Pe,{disabled:i,error:n,helpLink:r,helpLinkText:a,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value:m,weight:b}),pn=s.dt.div`
|
|
863
863
|
${({theme:e})=>`
|
|
864
864
|
align-items: center;
|
|
865
865
|
color: ${e.palette.gray[800]};
|
|
@@ -1091,7 +1091,7 @@
|
|
|
1091
1091
|
font-weight: ${e.typography.weight.bold};
|
|
1092
1092
|
}
|
|
1093
1093
|
`}
|
|
1094
|
-
`,ve=({disabled:e=!1,icon:i,props:n})=>{const r=x.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(n,r);return t.jsx(yn,{...a,$disabled:e,$focus:!!a["aria-expanded"],$header:i==="calendar"||i==="calendar-clock",disabled:e,ref:r,type:"button",children:t.jsx(I,{icon:i,iconColor:z.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:i,nextButtonProps:n,title:r})=>{const a=e.focusedDate,o=x.useCallback(()=>{e.setFocusedDate(a.add({years:1}))},[a,e]),l=x.useCallback(()=>{e.setFocusedDate(a.subtract({years:1}))},[a,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:i}),t.jsxs(pn,{children:[r,t.jsxs(gn,{children:[t.jsx(rt,{"aria-label":"top",onClick:o,children:t.jsx(I,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(rt,{"aria-label":"bottom",onClick:l,children:t.jsx(I,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(ve,{icon:"chevron-right",props:n})]})},wt=({onClose:e,props:i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:n}),{prevButtonProps:a,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,r);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:a,state:r,title:l}),t.jsx(ze,{state:r}),t.jsx(Ke,{children:t.jsx(L,{onClick:e,variant:"ghost",children:"Cancel"})})]})},jt=({segment:e,state:i})=>{const n=s.nt(),r=x.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,i,r),c=n.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:r,style:o.type==="literal"?void 0:{color:o.isPlaceholder?n.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},vt=({disabled:e,error:i=!1,props:n})=>{const r=s.nt(),a=x.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(n,o,a),c=x.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(u=>u.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs($n,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:r.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(jt,{segment:{...d,isEditable:!e},state:o},g)})}),i?t.jsx(I,{icon:"exclamation-circle",iconColor:r.palette.error[500],iconSize:"xs"}):void 0]})},kt=e=>{const i=x.useRef(null),n=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:r}=n,a=!s.lodashExports.isNil(r)&&r.hour<12?"AM":"PM",[o,l]=x.useState(s.lodashExports.isNil(r)?"AM":a),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,n,i),d=x.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(r)||(g==="AM"?n.setSegment("dayPeriod",0):g==="PM"&&n.setSegment("dayPeriod",12))),l(g)},[o,n,r]);return t.jsxs(mn,{children:[t.jsx(at,{...c,ref:i,children:n.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return t.jsx(jt,{segment:p,state:n},u)})}),t.jsxs(at,{children:[t.jsx(ot,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(ot,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",wn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",jn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",le=({error:e,buttonProps:i,datePickerRef:n,disabled:r=!1,granularity:a="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:u})=>{const f=x.useCallback(h=>{const y=a==="day"?ke(String(h)):wn(String(h));o.onChange&&o.onChange(h??null),g&&g(c,y)},[o,a,c,g]);return t.jsxs(Q,{...l,className:`${r?"disabled":""} ${e?"error":""}`,ref:n,children:[t.jsx(vt,{disabled:r,error:e!=null,props:{...o,autoFocus:!1,granularity:a,onChange:f,shouldForceLeadingZeros:!0}}),t.jsx(ve,{disabled:r,icon:a==="minute"?"calendar-clock":"calendar",props:i}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:r,id:c,name:c,type:"text",value:u??""})]})},Te=({children:e,...i})=>{const n=x.useRef(null),{dialogProps:r}=s.$40df3f8667284809$export$d55e7ee900f34e93(i,n);return t.jsx(bn,{...r,ref:n,children:e})},Ct=({disabled:e=!1,error:i,helpLink:n,helpLinkText:r,helpText:a,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:u,...f})=>{const h=x.useRef(null),y=u==null?void 0:u(c)
|
|
1094
|
+
`,ve=({disabled:e=!1,icon:i,props:n})=>{const r=x.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(n,r);return t.jsx(yn,{...a,$disabled:e,$focus:!!a["aria-expanded"],$header:i==="calendar"||i==="calendar-clock",disabled:e,ref:r,type:"button",children:t.jsx(I,{icon:i,iconColor:z.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:i,nextButtonProps:n,title:r})=>{const a=e.focusedDate,o=x.useCallback(()=>{e.setFocusedDate(a.add({years:1}))},[a,e]),l=x.useCallback(()=>{e.setFocusedDate(a.subtract({years:1}))},[a,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:i}),t.jsxs(pn,{children:[r,t.jsxs(gn,{children:[t.jsx(rt,{"aria-label":"top",onClick:o,children:t.jsx(I,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(rt,{"aria-label":"bottom",onClick:l,children:t.jsx(I,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(ve,{icon:"chevron-right",props:n})]})},wt=({onClose:e,props:i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:n}),{prevButtonProps:a,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,r);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:a,state:r,title:l}),t.jsx(ze,{state:r}),t.jsx(Ke,{children:t.jsx(L,{onClick:e,variant:"ghost",children:"Cancel"})})]})},jt=({segment:e,state:i})=>{const n=s.nt(),r=x.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,i,r),c=n.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:r,style:o.type==="literal"?void 0:{color:o.isPlaceholder?n.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},vt=({disabled:e,error:i=!1,props:n})=>{const r=s.nt(),a=x.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(n,o,a),c=x.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(u=>u.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs($n,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:r.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(jt,{segment:{...d,isEditable:!e},state:o},g)})}),i?t.jsx(I,{icon:"exclamation-circle",iconColor:r.palette.error[500],iconSize:"xs"}):void 0]})},kt=e=>{const i=x.useRef(null),n=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:r}=n,a=!s.lodashExports.isNil(r)&&r.hour<12?"AM":"PM",[o,l]=x.useState(s.lodashExports.isNil(r)?"AM":a),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,n,i),d=x.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(r)||(g==="AM"?n.setSegment("dayPeriod",0):g==="PM"&&n.setSegment("dayPeriod",12))),l(g)},[o,n,r]);return t.jsxs(mn,{children:[t.jsx(at,{...c,ref:i,children:n.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return t.jsx(jt,{segment:p,state:n},u)})}),t.jsxs(at,{children:[t.jsx(ot,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(ot,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",wn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",jn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",le=({error:e,buttonProps:i,datePickerRef:n,disabled:r=!1,granularity:a="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:u})=>{const f=x.useCallback(h=>{const y=a==="day"?ke(String(h)):wn(String(h));o.onChange&&o.onChange(h??null),g&&g(c,y)},[o,a,c,g]);return t.jsxs(Q,{...l,className:`${r?"disabled":""} ${e?"error":""}`,ref:n,children:[t.jsx(vt,{disabled:r,error:e!=null,props:{...o,autoFocus:!1,granularity:a,onChange:f,shouldForceLeadingZeros:!0}}),t.jsx(ve,{disabled:r,icon:a==="minute"?"calendar-clock":"calendar",props:i}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:r,id:c,name:c,type:"text",value:u??""})]})},Te=({children:e,...i})=>{const n=x.useRef(null),{dialogProps:r}=s.$40df3f8667284809$export$d55e7ee900f34e93(i,n);return t.jsx(bn,{...r,ref:n,children:e})},Ct=({disabled:e=!1,error:i,helpLink:n,helpLinkText:r,helpText:a,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:u,...f})=>{const h=x.useRef(null),y=u==null?void 0:u(c),m=x.useCallback(N=>{p&&N&&p(c,ke(String(N)))},[c,p]),b=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,onChange(N){m(N)},value:s._.isNil(y)||s._.isEmpty(y)||y==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(y.replace(/\//gu,"-"))}),{close:w}=b,{groupProps:j,fieldProps:v,buttonProps:k,dialogProps:T,calendarProps:S}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":l??c,name:c},b,h);return t.jsxs(O,{error:i,helpLink:n,helpLinkText:r,helpText:a,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(le,{buttonProps:k,datePickerRef:h,disabled:e,error:i,fieldProps:v,groupProps:j,name:c,register:d,required:o,setValue:p,value:y}),b.isOpen&&!e?t.jsx($e,{offset:8,placement:"bottom start",state:b,triggerRef:h,children:t.jsx(Te,{...T,children:t.jsx(wt,{onClose:w,props:S})})}):null]})},St=({onClose:e,props:i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=x.useRef(null),a=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:n}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(i,a,r);return t.jsxs("div",{className:"calendar-range",ref:r,children:[t.jsx(Ie,{nextButtonProps:l,prevButtonProps:o,state:a,title:c}),t.jsx(ze,{state:a}),t.jsx(Ke,{children:t.jsx(L,{onClick:e,variant:"ghost",children:"Cancel"})})]})},vn=s.dt.div`
|
|
1095
1095
|
${({theme:e,$disabled:i,$show:n})=>`
|
|
1096
1096
|
border-color: ${n?e.palette.error[500]:e.palette.gray[300]};
|
|
1097
1097
|
display: flex;
|
|
@@ -1102,7 +1102,7 @@
|
|
|
1102
1102
|
background: ${i?e.palette.gray[200]:e.palette.white};
|
|
1103
1103
|
}
|
|
1104
1104
|
`}
|
|
1105
|
-
`,zt=({disabled:e=!1,error:i,label:n,name:r,required:a,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...u})=>{const f=`${r}Max`,h=`${r}Min`,y=x.useRef(null)
|
|
1105
|
+
`,zt=({disabled:e=!1,error:i,label:n,name:r,required:a,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...u})=>{const f=`${r}Max`,h=`${r}Min`,y=x.useRef(null),m=x.useCallback(R=>{c&&R&&(c((d==null?void 0:d.name)??f,ke(String(R.end))),c((p==null?void 0:p.name)??h,ke(String(R.start))))},[f,h,c,d,p]),b=s.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??f,startName:(p==null?void 0:p.name)??h,onChange(R){m(R)}}),{close:w}=b,{groupProps:j,startFieldProps:v,endFieldProps:k,buttonProps:T,dialogProps:S,calendarProps:N}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":n??r},b,y);return t.jsxs(O,{error:i,htmlFor:r,label:n,required:a,tooltip:o,children:[t.jsxs(vn,{$disabled:e,$show:i!==void 0,ref:y,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(le,{buttonProps:T,datePickerRef:y,disabled:e,error:i,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${r}`,validate:R=>k.value&&R>k.value?"Start date must be less than or equal to end date":null},groupProps:j,name:(p==null?void 0:p.name)??h,register:l,setValue:c,value:p==null?void 0:p.value}),t.jsx(le,{buttonProps:T,datePickerRef:y,disabled:e,error:i,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${r}`,validate:R=>v.value&&R<v.value?"End date must be greater than or equal to start date":null},groupProps:j,name:(d==null?void 0:d.name)??f,register:l,setValue:c,value:d==null?void 0:d.value})]}),b.isOpen&&!e?t.jsx($e,{offset:8,placement:"bottom start",state:b,triggerRef:y,children:t.jsx(Te,{...S,children:t.jsx(St,{onClose:w,props:N})})}):null]})},kn=s.dt.div`
|
|
1106
1106
|
${({theme:e})=>`
|
|
1107
1107
|
align-items: center;
|
|
1108
1108
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1117,9 +1117,9 @@
|
|
|
1117
1117
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1118
1118
|
justify-content: flex-end;
|
|
1119
1119
|
flex: 1 0 0;
|
|
1120
|
-
`,It=({handleTimeChange:e,onClose:i,props:n,timeState:r})=>{const a=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(kn,{children:[t.jsx(C,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Cn,{children:t.jsx(kt,{hourCycle:12,label:"time-field",onChange:e,value:r.timeValue})})]}),t.jsx(Ke,{children:t.jsx(L,{onClick:i,variant:"ghost",children:"Cancel"})})]})},Sn=e=>{const{disabled:i=!1,error:n,required:r,label:a,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),u=x.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:i,isRequired:r,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(g.replace(/\//gu,"-"))}),{close:h}=f,{groupProps:y,fieldProps
|
|
1121
|
-
${e?"disabled":""} ${P?"error":""} ${
|
|
1122
|
-
`,children:[i?t.jsx(I,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":P?"true":"false","aria-label":f,"aria-required":N,autoComplete:"off",className:h?"sr-block":"","data-testid":`${f}-input`,disabled:e,id:f,list:j?`list_${f}`:void 0,onKeyDown:Y,onPaste:y,placeholder
|
|
1120
|
+
`,It=({handleTimeChange:e,onClose:i,props:n,timeState:r})=>{const a=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(kn,{children:[t.jsx(C,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Cn,{children:t.jsx(kt,{hourCycle:12,label:"time-field",onChange:e,value:r.timeValue})})]}),t.jsx(Ke,{children:t.jsx(L,{onClick:i,variant:"ghost",children:"Cancel"})})]})},Sn=e=>{const{disabled:i=!1,error:n,required:r,label:a,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),u=x.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:i,isRequired:r,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(g.replace(/\//gu,"-"))}),{close:h}=f,{groupProps:y,fieldProps:m,buttonProps:b,dialogProps:w,calendarProps:j}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,u),v=x.useCallback(T=>{j.onChange&&j.onChange(T),d==null||d(o,jn(String(T).replace(/-/gu,"/")))},[j,o,d]),k=x.useCallback(T=>{T&&f.setTimeValue(T)},[f]);return t.jsxs(O,{error:n,htmlFor:o,label:a,required:r,tooltip:l,children:[t.jsx(le,{buttonProps:b,datePickerRef:u,disabled:i,error:n,fieldProps:m,granularity:"minute",groupProps:y,name:o,register:c,setValue:d,value:g}),f.isOpen&&!i?t.jsx($e,{offset:8,placement:"bottom start",state:f,triggerRef:u,children:t.jsx(Te,{...w,children:t.jsx(It,{handleTimeChange:k,onClose:h,props:{...j,onChange:v},timeState:f})})}):null]})},zn=({children:e,currentValue:i,externalLink:n,isEditing:r,label:a,name:o,tooltip:l})=>{if(r)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(i)?"":i,d=String(n??c);return t.jsxs($,{children:[t.jsx(qe,{htmlFor:o,label:a,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(J,{href:d,children:c}):t.jsx(C,{size:"md",children:c})]})},Fe=({disabled:e=!1,hasIcon:i=!1,helpLink:n,helpLinkText:r,helpText:a,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:u,name:f,maskValue:h=!1,onPaste:y,placeholder:m,removeItemArray:b,register:w,suggestions:j,tooltip:v,type:k="text",weight:T,...S})=>{const{required:N,onBlur:R,onChange:A}=S,E=s.nt(),P=e?void 0:o,M=d&&p&&!e,Y=x.useCallback(V=>{V.key==="Enter"&&V.preventDefault()},[]);return t.jsxs(O,{error:P,helpLink:n,helpLinkText:r,helpText:a,htmlFor:f,label:g,linkPosition:u,required:N,tooltip:v,weight:T,children:[t.jsxs(Q,{className:`
|
|
1121
|
+
${e?"disabled":""} ${P?"error":""} ${M?"success":""}
|
|
1122
|
+
`,children:[i?t.jsx(I,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":P?"true":"false","aria-label":f,"aria-required":N,autoComplete:"off",className:h?"sr-block":"","data-testid":`${f}-input`,disabled:e,id:f,list:j?`list_${f}`:void 0,onKeyDown:Y,onPaste:y,placeholder:m,type:k,...w?w(f,{required:N,onBlur:R,onChange:A}):{...S}}),P?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"xs"}):void 0,M?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:E.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&c>0?t.jsx(W,{color:E.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:b?b(c):void 0,variant:"ghost"}):void 0]}),j?t.jsx("datalist",{id:`list_${f}`,children:j.map(V=>t.jsx("option",{value:V},V))}):void 0]})},In=s.dt.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,Tn=s.dt.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1123
1123
|
gap: 12px;
|
|
1124
1124
|
`,Fn=s.dt.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1125
1125
|
gap: 8px;
|
|
@@ -1175,7 +1175,7 @@
|
|
|
1175
1175
|
padding: ${n}px;
|
|
1176
1176
|
}
|
|
1177
1177
|
`}
|
|
1178
|
-
`,Tt=({align:e,children:i,cols:n,colsPadding:r,justify:a})=>t.jsx(Dn,{$align:e,$cols:n,$colsPadding:r,$justify:a,children:i}),We=({addText:e,append:i,disabled:n=!1,fields:r,fieldState:a,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:u,onChange:f,placeholder:h,tooltip:y,remove
|
|
1178
|
+
`,Tt=({align:e,children:i,cols:n,colsPadding:r,justify:a})=>t.jsx(Dn,{$align:e,$cols:n,$colsPadding:r,$justify:a,children:i}),We=({addText:e,append:i,disabled:n=!1,fields:r,fieldState:a,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:u,onChange:f,placeholder:h,tooltip:y,remove:m,value:b})=>{var v;const w=x.useCallback(()=>{i==null||i(o)},[i,o]),j=x.useCallback(k=>()=>{m==null||m(k)},[m]);return t.jsxs(Tt,{align:"start",children:[t.jsx(Ae,{lg:75,md:75,sm:75,children:t.jsx(Fe,{disabled:n,error:a?(v=a.error)==null?void 0:v.message:void 0,id:"array",indexArray:l,isTouched:a?a.isTouched:void 0,isValid:a?!a.invalid:void 0,label:d,name:g,onBlur:u,onChange:f,placeholder:h,removeItemArray:j,required:c,tooltip:y,value:b})}),l<p-1&&l+1===(r==null?void 0:r.length)?t.jsx(Ae,{lg:25,md:25,sm:25,children:t.jsx(L,{disabled:n,icon:"plus",onClick:w,variant:"ghost",width:"100%",children:e??"Add"})}):void 0]})},Ln=({addText:e,append:i,control:n,disabled:r,fields:a,initValue:o="",required:l,label:c,max:d=void 0,name:p="array-field",onChange:g,placeholder:u,remove:f,tooltip:h})=>n&&a?t.jsx(x.Fragment,{children:a.map((y,m)=>t.jsx(s.Controller,{control:n,name:`${p}.${m}`,render:({field:b,fieldState:w})=>t.jsx(We,{addText:e,append:i,disabled:r,fieldState:w,fields:a,index:m,initValue:o,label:c,max:d,name:b.name,onBlur:b.onBlur,onChange:g??b.onChange,placeholder:u,remove:f,required:l,tooltip:h,value:b.value.value}),index:m,fieldProp:y},y.id))}):t.jsx(We,{addText:e,disabled:r,initValue:o,label:c,max:d,name:p,onChange:g,placeholder:u,required:l,tooltip:h}),Pn=s.dt(gt)`
|
|
1179
1179
|
white-space: nowrap;
|
|
1180
1180
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1181
1181
|
text-overflow: ellipsis;
|
|
@@ -1186,13 +1186,13 @@
|
|
|
1186
1186
|
position: absolute;
|
|
1187
1187
|
visibility: hidden;
|
|
1188
1188
|
width: 0;
|
|
1189
|
-
`,Be=(e,i,n)=>{const r=new Event(e);return Object.defineProperty(r,"target",{value:{name:i,value:n}}),r},Wn=e=>{const i=e;return i?Array.from(i).map(n=>n.name).join(", "):""},Bn=({accept:e,disabled:i=!1,error:n,label:r,helpLink:a,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:y,weight
|
|
1189
|
+
`,Be=(e,i,n)=>{const r=new Event(e);return Object.defineProperty(r,"target",{value:{name:i,value:n}}),r},Wn=e=>{const i=e;return i?Array.from(i).map(n=>n.name).join(", "):""},Bn=({accept:e,disabled:i=!1,error:n,label:r,helpLink:a,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:y,weight:m})=>{const b=s.nt(),w=i?void 0:n,j=x.useRef(null),v=y==null?void 0:y(d),k=Wn(v),T=u==null?void 0:u(d,{required:g}),S=x.useCallback(()=>{const A=Be("change",d,void 0);f&&f(d,""),T&&T.onChange(A)},[T,d,f]),N=x.useCallback(A=>{const{files:E}=A.currentTarget,P=Be("change",d,E&&E.length>0?E:void 0);p==null||p(P),T&&T.onChange(P)},[T,d,p]),R=x.useCallback(A=>{i?A.preventDefault():j.current&&j.current.click()},[i]);return t.jsxs(O,{error:w,helpLink:a,helpText:o,htmlFor:l??d,label:r,required:g,tooltip:h,weight:m,children:[t.jsxs(Q,{className:`${i?"disabled":""} ${w?"error":""}`,children:[t.jsx(Pn,{$size:"xs",children:k}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(k)?void 0:t.jsx(W,{color:b.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:S,variant:"ghost",width:"20px"}),w&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsxs(L,{border:i?`1px solid ${b.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:i,height:"40px",onClick:R,variant:"primary",width:"96px",children:[t.jsx(I,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(An,{...T&&{ref:T.ref,onBlur:T.onBlur},accept:e,"aria-label":d,"data-testid":d,disabled:i,id:l??d,multiple:c,name:d,onChange:N,onClick:S,ref:j,required:void 0,type:"file",value:void 0})]})},On=s.dt.input`
|
|
1190
1190
|
border: none;
|
|
1191
1191
|
background: transparent;
|
|
1192
1192
|
min-width: 15rem;
|
|
1193
1193
|
padding: 0;
|
|
1194
1194
|
flex: 1;
|
|
1195
|
-
`,
|
|
1195
|
+
`,Oe=({disabled:e=!1,error:i,field:n,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>{const m=s.nt(),b=e?void 0:i,[w,j]=x.useState(""),v=d?h:n==null?void 0:n.value,k=x.useMemo(()=>v&&typeof v=="string"?v.split(",").filter(Boolean):[],[v]),T=x.useCallback(E=>{const M=[...new Set(E.filter(Boolean))].join(","),Y=Be("change",c,M);n&&n.onChange(Y),d&&d(Y)},[n,c,d]),S=x.useCallback(E=>{j(E.target.value)},[]),N=x.useCallback(E=>{const P=w.trim();P.length&&!k.includes(P)&&(E.preventDefault(),T([...k,P]),j("")),n&&n.onBlur()},[w,n,T,k]),R=x.useCallback(E=>{const P=w.trim();E.key==="Enter"&&P.length===0&&E.preventDefault(),["Enter",","].includes(E.key)&&P.length>0&&!k.includes(P)?(E.preventDefault(),T([...k,P]),j("")):E.key==="Backspace"&&!P.length&&k.length&&(E.preventDefault(),p==null||p(k[k.length-1]),T(k.slice(0,-1)))},[w,p,T,k]),A=x.useCallback(E=>()=>{p==null||p(E),T(k.filter(P=>P!==E))},[p,T,k]);return t.jsx(O,{error:b,helpLink:r,helpLinkText:a,helpText:o,htmlFor:c,label:l,required:u,tooltip:f,weight:y,children:t.jsxs(Q,{$overflowX:"auto",className:`${e?"disabled":""} ${b?"error":""}`,children:[k.map(E=>t.jsx(K,{disabled:e,onClose:A(E),tagLabel:E},E)),t.jsx(On,{"aria-hidden":!1,"aria-invalid":b?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",id:c,onBlur:N,onChange:S,onKeyDown:R,placeholder:k.length===0?g:void 0,ref:n==null?void 0:n.ref,type:"text",value:w}),b?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}):void 0]})})},Hn=({disabled:e=!1,control:i,error:n,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>i?t.jsx(s.Controller,{control:i,name:c,render:({field:m})=>t.jsx(Oe,{disabled:e,error:n,field:m,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:u,tooltip:f,weight:y}),rules:{required:u}}):t.jsx(Oe,{disabled:e,error:n,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y}),He=x.forwardRef(function({disabled:i,icon:n,margin:r,onClick:a,...o},l){return t.jsx(hn,{$margin:r,"aria-label":n,className:"action-btn",disabled:i,onClick:a,ref:l,type:"button",...o,children:t.jsx(I,{icon:n,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Ce=({error:e,decimalPlaces:i=0,disabled:n=!1,id:r,maxLength:a,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:u,setValue:f,value:h})=>{const y=s.nt(),m=n?void 0:e,b=i<0?0:i,[w,j]=x.useState(h?s._.toNumber(h):0),v=x.useCallback(()=>{const N=(w-10**-b).toFixed(b),R=Math.max(Number(l),Number(N));f&&f(c,R,{shouldDirty:!0}),j(R)},[b,w,l,c,f]),k=x.useCallback(()=>{const N=(w+10**-b).toFixed(b),R=Math.min(Number(o),Number(N)>Number(l)?Number(N):Number(l));f&&f(c,R,{shouldDirty:!0}),j(R)},[b,w,o,l,c,f]),T=x.useCallback(N=>{const{value:R}=N.target,A=/\d+/u.test(R)&&!s._.isEmpty(R);f&&f(c,A?R:void 0),d&&d(N),j(Number(R))},[c,d,f]),S=x.useCallback(N=>{N.key==="Enter"&&N.preventDefault()},[]);return t.jsxs(Q,{className:`${n?"disabled":""} ${m?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",disabled:n,id:r??c,max:o,min:l,onKeyDown:S,placeholder:p,required:u,step:10**-b,type:"number",...g==null?void 0:g(c,{maxLength:a,max:o,min:l,onChange:T,value:h,valueAsNumber:!0})}),m&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}),t.jsx(He,{borderLeft:"inherit",borderRight:"inherit",disabled:n,icon:"minus",margin:"0 -0.625rem 0 0",onClick:v,px:.75,py:.75}),t.jsx(He,{borderRadius:`0 ${y.spacing[.5]} ${y.spacing[.5]} 0`,disabled:n,icon:"plus",onClick:k,px:.75,py:.75})]})},Ft=({decimalPlaces:e,disabled:i=!1,error:n,helpLink:r,helpText:a,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:u,onChange:f,placeholder:h,register:y,required:m,setValue:b,tooltip:w,value:j,watch:v,weight:k})=>t.jsx(O,{error:i?void 0:n,helpLink:r,helpText:a,htmlFor:u,label:l,linkPosition:c,maxLength:d,required:m,tooltip:w,weight:k,children:t.jsx(Ce,{decimalPlaces:e,disabled:i,error:n,id:o,max:p,maxLength:d,min:g,name:u,onChange:f,placeholder:h,register:y,required:m,setValue:b,value:f?j:v==null?void 0:v(u)})}),Nt=({disabled:e=!1,error:i,name:n,label:r,propsMax:a,propsMin:o,required:l,tooltip:c,variant:d="default"})=>{const p=`${n}Max`,g=`${n}Min`;return t.jsx(O,{error:i,htmlFor:n,label:r,required:l,tooltip:c,children:t.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Ce,{...o,disabled:e,error:i,name:o.name??g}),t.jsx(Ce,{...a,disabled:e,error:i,name:a.name??p})]})})},Mn=s.dt.div`
|
|
1196
1196
|
${({theme:e})=>`
|
|
1197
1197
|
align-items: flex-start;
|
|
1198
1198
|
align-self: stretch;
|
|
@@ -1286,9 +1286,9 @@
|
|
|
1286
1286
|
overflow: hidden;
|
|
1287
1287
|
text-overflow: ellipsis;
|
|
1288
1288
|
white-space: nowrap;
|
|
1289
|
-
`,ne=(e,i,n=!1)=>{x.useEffect(()=>{var a;const r=o=>{e&&!e.contains(o.target)&&i()};return n?(document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("click",r,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("click",r,!0)})},[n,e,i])},Yn=({disabled:e,error:i,label:n,name:r,placeholder:a,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const u=s.nt(),f=x.useRef(null),h=e?void 0:i,y=(p==null?void 0:p(r))??d,[
|
|
1289
|
+
`,ne=(e,i,n=!1)=>{x.useEffect(()=>{var a;const r=o=>{e&&!e.contains(o.target)&&i()};return n?(document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("click",r,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("click",r,!0)})},[n,e,i])},Yn=({disabled:e,error:i,label:n,name:r,placeholder:a,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const u=s.nt(),f=x.useRef(null),h=e?void 0:i,y=(p==null?void 0:p(r))??d,[m,b]=x.useState(!1),[w,j]=x.useState(""),{refs:v,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:T,inputValue:S,handlePhoneValueChange:N,country:R,setCountry:A}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:y?String(y):""}),E=x.useCallback(B=>{B.key==="Enter"&&B.preventDefault()},[]),P=x.useCallback(B=>{B.preventDefault(),b(H=>!H),m||j("")},[m]),M=x.useCallback(B=>()=>{A(B),b(!1),j("")},[A,b]),Y=x.useCallback(B=>{B.key.length===1?j(H=>H+B.key):B.key==="Backspace"&&j(H=>H.slice(0,-1))},[]),V=s.R.filter(B=>{const{name:H}=s.M(B);return H.toLowerCase().includes(w.toLowerCase())});return ne(v.floating.current,()=>{b(!1),j("")},!0),t.jsx(O,{error:h,htmlFor:r,label:n,required:o,tooltip:c,weight:g,children:t.jsxs(Mn,{className:`${e?"disabled":""} ${h?"error":""}`,ref:f,children:[t.jsxs(Vn,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:P,onKeyDown:Y,ref:v.setReference,children:[t.jsx(s.q,{iso2:R.iso2,size:"16px"}),t.jsx(I,{icon:"angle-down",iconColor:u.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(Q,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":r,"aria-required":o,autoComplete:"off","data-testid":`${r}-input`,disabled:e,id:r,name:r,onKeyDown:E,placeholder:a,ref:T,type:"tel",value:S,...l==null?void 0:l(r,{required:o,onChange:N})}),h?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"xs"}):void 0]}),m&&Z.createPortal(t.jsx(_n,{ref:v.setFloating,style:k,children:V.map(B=>{const{dialCode:H,iso2:ee,name:De}=s.M(B);return t.jsxs(Gn,{onClick:M(ee),value:ee,children:[t.jsx(s.q,{iso2:ee,size:"16px"}),t.jsx(Un,{children:De}),t.jsx(C,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+H})]},ee)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},qn=({disabled:e=!1,error:i,helpLink:n,helpText:r,isTouched:a,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:u,register:f,required:h,rows:y,tooltip:m,watch:b,weight:w,value:j})=>{const v=s.nt(),k=(b==null?void 0:b(c))??j,T=o&&a&&!e,S=e?void 0:i;return t.jsx(O,{error:S,helpLink:n,helpText:r,htmlFor:c,label:l,maxLength:g,required:h,tooltip:m,value:k?String(k):void 0,weight:w,children:t.jsxs(Q,{className:`
|
|
1290
1290
|
${e?"disabled":""} ${S?"error":""} ${T?"success":""}
|
|
1291
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":S?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:u,rows:y,value:k,...f==null?void 0:f(c,{required:h})}),S?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:v.palette.error[500],iconSize:"xs"}):void 0,T?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:v.palette.success[500],iconSize:"xs"}):void 0]})})},Kn=({description:e,disabled:i,id:n,align:r,inputType:a="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:u})=>{const f=x.useMemo(()=>{if(a==="text")return t.jsx(Fe,{disabled:i,name:d,placeholder:p});if(a==="date")return t.jsx(Ct,{disabled:i,name:d});const{decimalPlaces:h,max:y,min
|
|
1291
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":S?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:u,rows:y,value:k,...f==null?void 0:f(c,{required:h})}),S?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:v.palette.error[500],iconSize:"xs"}):void 0,T?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:v.palette.success[500],iconSize:"xs"}):void 0]})})},Kn=({description:e,disabled:i,id:n,align:r,inputType:a="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:u})=>{const f=x.useMemo(()=>{if(a==="text")return t.jsx(Fe,{disabled:i,name:d,placeholder:p});if(a==="date")return t.jsx(Ct,{disabled:i,name:d});const{decimalPlaces:h,max:y,min:m}=o??{};return t.jsx(Ft,{decimalPlaces:h,disabled:i,max:y,min:m,name:d,placeholder:p})},[i,o,a,d,p]);return t.jsxs(sn,{$align:r,$minHeight:l,$minWidth:c,children:[t.jsx(Se,{description:e,id:n,title:u,tooltip:g}),f]})},Xn=s.dt.label`
|
|
1292
1292
|
${({theme:e})=>`
|
|
1293
1293
|
align-items: center;
|
|
1294
1294
|
color: ${e.palette.gray[600]};
|
|
@@ -1360,7 +1360,7 @@
|
|
|
1360
1360
|
fill: ${e.palette.white};
|
|
1361
1361
|
}
|
|
1362
1362
|
`}
|
|
1363
|
-
`,Ne=x.forwardRef(function({checked:i,disabled:n=!1,label:r,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...u},f){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(Xn,{"aria-disabled":n,children:[t.jsx("input",{"aria-checked":i,"aria-disabled":n,"aria-hidden":!1,"aria-label":a,checked:i,disabled:n,id:a,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:f,type:"checkbox",value:g,...u}),t.jsx(I,{disabled:n,icon:"check",iconSize:"sm"}),r??g]}),p===void 0?void 0:t.jsx(U,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Rt=({options:e,title:i,checkboxesName:n,defaultCollapsed:r,onChange:a})=>{const o=s.nt(),[l,c]=x.useState(r??!1),d=x.useCallback(()=>{c(p=>!p)},[]);return t.jsxs(
|
|
1363
|
+
`,Ne=x.forwardRef(function({checked:i,disabled:n=!1,label:r,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...u},f){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(Xn,{"aria-disabled":n,children:[t.jsx("input",{"aria-checked":i,"aria-disabled":n,"aria-hidden":!1,"aria-label":a,checked:i,disabled:n,id:a,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:f,type:"checkbox",value:g,...u}),t.jsx(I,{disabled:n,icon:"check",iconSize:"sm"}),r??g]}),p===void 0?void 0:t.jsx(U,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Rt=({options:e,title:i,checkboxesName:n,defaultCollapsed:r,onChange:a})=>{const o=s.nt(),[l,c]=x.useState(r??!1),d=x.useCallback(()=>{c(p=>!p)},[]);return t.jsxs($,{"aria-label":i,bgColor:l?o.palette.gray[50]:o.palette.white,border:"1px solid"+o.palette.gray[300],borderRadius:"8px",display:"inline-flex",flexDirection:"column",gap:.625,px:.75,py:.625,role:"region",width:"100%",children:[t.jsxs($,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[t.jsx(C,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:i}),t.jsx(I,{icon:l?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs"})]}),l?t.jsx($,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx($,{border:"1px solid",borderColor:o.palette.gray[300],borderRadius:"4px",px:.5,py:.5,children:t.jsx(Ne,{checked:p.visible,disabled:p.locked,label:p.name,name:`${n}-${p.name}`,onChange:a,value:p.name})},p.name))}):void 0]})},Et=(e,i)=>{const[r,a]=x.useState(0),[o,l]=x.useState(0);return x.useEffect(()=>{o===100&&(()=>{a(d=>d===i-1?0:d+1)})()},[o,i]),x.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:r,progress:o,setCycle:a,setProgress:l}},Dt=({publicId:e,format:i="webp"})=>{const n=x.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return x.useMemo(()=>n.image(e).format(i),[n,e,i])},Re=e=>{const[i,n]=x.useState(!1),r=x.useCallback(()=>{n(!0)},[]),a=x.useCallback(()=>{n(!1)},[]),o=x.useCallback(()=>{n(l=>!l)},[]);return{close:a,isOpen:i,name:e,open:r,setIsOpen:n,toggle:o}},Zn=({name:e,items:i,columnOrder:n,setColumnOrder:r})=>{const a=x.useMemo(()=>[...i.filter(({locked:g})=>g).map(({locked:g,...u})=>({...u,visible:!0,locked:g})),...i.filter(({locked:g})=>!g)],[i]),[o,l]=x.useState(a),c=x.useCallback(g=>{const u=g.filter(({locked:m})=>!m),h=[...g.filter(({locked:m})=>m),...u],y=h.map(({name:m})=>m);l(m=>[...h,...m.filter(({name:b})=>!y.includes(b))]),r&&r(h.map(({id:m})=>m))},[r]),d=x.useCallback(()=>{const g=o.map(u=>{var h;const f=(n==null?void 0:n.includes(u.id))??!1;return(h=u.toggleVisibility)==null||h.call(u,f),{...u,visible:f}}).toSorted((u,f)=>{const h=(n==null?void 0:n.indexOf(u.id))??0,y=(n==null?void 0:n.indexOf(f.id))??0;return Number(f.visible)!==Number(u.visible)?Number(f.visible)-Number(u.visible):h-y});l(g),r==null||r(n)},[o,n,r]),p=x.useMemo(()=>s.some(o,g=>((n==null?void 0:n.includes(g.id))??!1)!==g.visible),[o,n]);return{setColumns:c,resetToDefault:d,columns:o,...Re(e),hasChanged:p}},Lt=(e,i)=>x.useMemo(()=>s._.debounce(e,i),[e,i]),Jn=e=>{const[i,n]=x.useState(),r=Lt(a=>{n(a)},(e==null?void 0:e.debounceWait)??300);return[i,r]},Qn=({alt:e="img",height:i="",width:n="",plugins:r=[s.lazyload(),s.placeholder()],publicId:a})=>{const o=Dt({publicId:a});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:i,plugins:r,width:n})},te=x.memo(Qn),er=s.dt.label`
|
|
1364
1364
|
${({theme:e})=>`
|
|
1365
1365
|
align-items: center;
|
|
1366
1366
|
display: flex;
|
|
@@ -1439,7 +1439,7 @@
|
|
|
1439
1439
|
}
|
|
1440
1440
|
|
|
1441
1441
|
`}
|
|
1442
|
-
`,tr=s.dt.span.attrs({className:"checkmark"})``,Xe=x.forwardRef(function({defaultChecked:i=!1,disabled:n=!1,label:r,name:a,onChange:o,onClick:l,value:c,...d},p){return t.jsxs(er,{"aria-disabled":n,"aria-label":r??a,role:"radiogroup",children:[t.jsx("input",{"aria-checked":i,"aria-disabled":n,"aria-label":r??a,defaultChecked:i,disabled:n,name:a,onChange:o,onClick:l,ref:p,type:"radio",value:c,...d}),t.jsx(tr,{}),r??null]})}),ir=({alt:e,imageId:i,icon:n,selectorProps:r,onClick:a,register:o,title:l,width:c="fit-content"})=>{const d=s.nt();return t.jsxs(
|
|
1442
|
+
`,tr=s.dt.span.attrs({className:"checkmark"})``,Xe=x.forwardRef(function({defaultChecked:i=!1,disabled:n=!1,label:r,name:a,onChange:o,onClick:l,value:c,...d},p){return t.jsxs(er,{"aria-disabled":n,"aria-label":r??a,role:"radiogroup",children:[t.jsx("input",{"aria-checked":i,"aria-disabled":n,"aria-label":r??a,defaultChecked:i,disabled:n,name:a,onChange:o,onClick:l,ref:p,type:"radio",value:c,...d}),t.jsx(tr,{}),r??null]})}),ir=({alt:e,imageId:i,icon:n,selectorProps:r,onClick:a,register:o,title:l,width:c="fit-content"})=>{const d=s.nt();return t.jsxs($,{alignItems:"center",border:`1px solid ${d.palette.gray[200]}`,borderColorHover:d.palette.gray[600],borderRadius:d.spacing[.25],display:"inline-flex",padding:[1,1,1,1],shadowHover:"md",width:c,children:[t.jsx($,{alignSelf:"start",display:"flex",width:"fit-content",children:t.jsx(Xe,{name:r.name,onClick:a,value:r.value,...o==null?void 0:o(r.name)})}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[i===void 0?void 0:t.jsx(te,{alt:e??"card image",height:"32px",publicId:i,width:"32px"}),n===void 0?void 0:t.jsx(I,{icon:n,iconSize:"sm",iconType:"fa-light"}),t.jsx(C,{color:d.palette.gray[800],fontWeight:"bold",size:"sm",children:l})]})]})},re=s.dt.div`
|
|
1443
1443
|
${({theme:e})=>`
|
|
1444
1444
|
align-items: center;
|
|
1445
1445
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1489,7 +1489,7 @@
|
|
|
1489
1489
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1490
1490
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1491
1491
|
}
|
|
1492
|
-
`,Pt=x.forwardRef(function({defaultChecked:i,disabled:n=!1,justify:r,name:a,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},p){const g=i===!0?"on":"off",u=typeof o=="object"&&o.on&&o.off?o[g]:o,f=x.useCallback(h=>{h.stopPropagation()},[]);return t.jsxs(
|
|
1492
|
+
`,Pt=x.forwardRef(function({defaultChecked:i,disabled:n=!1,justify:r,name:a,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},p){const g=i===!0?"on":"off",u=typeof o=="object"&&o.on&&o.off?o[g]:o,f=x.useCallback(h=>{h.stopPropagation()},[]);return t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:r,children:[t.jsx($,{minWidth:l,children:u}),t.jsxs(rr,{onClick:f,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":n,"aria-label":a,checked:i===!0,disabled:n,name:a,ref:p,type:"checkbox"}),t.jsx(re,{"aria-label":"Toggle Switch",id:`${a}Toggle`,children:t.jsx(nr,{})})]}),c]})}),ar=({id:e,title:i,toggles:n,minWidth:r="auto",height:a="auto"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColor:o.palette.white,border:`1px solid ${o.palette.gray[200]}`,borderRadius:o.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:a,justify:"center",minHeight:"100px",minWidth:r,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Se,{id:e,title:i}),t.jsx($,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:n.map(l=>t.jsx(Pt,{...l},`$card-toggle-${l.name}`))})]})},or=s.dt.div`
|
|
1493
1493
|
position: relative;
|
|
1494
1494
|
margin: auto;
|
|
1495
1495
|
overflow: hidden;
|
|
@@ -1592,7 +1592,7 @@
|
|
|
1592
1592
|
`,Wt=({noCodeMessage:e="Code snippet not available",snippet:i,specific:n})=>(x.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(At,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":s._.isNil(i)||s._.isString(i)?0:i.offset+.7,...n!==void 0?{"data-line":String(Number(n))}:{},children:s._.isNil(i)||s._.isString(i)||s._.isEmpty(i.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:i.content})})})),ur=({noCodeMessage:e="Code snippet not available",snippet:i,specific:n,variant:r="normal"})=>{const a=s.nt(),[o,l]=x.useState(!1),[c,d]=x.useState(!0),p=x.useCallback(()=>{l(h=>!h)},[l]),g=x.useCallback(()=>{if(s._.isNil(i)||s._.isEmpty(i)||!s._.isString(i))return d(!1),e;const h=i.split(`
|
|
1593
1593
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1594
1594
|
`)}
|
|
1595
|
-
${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return r==="location"?t.jsx(Wt,{noCodeMessage:e,snippet:i,specific:n}):t.jsxs(
|
|
1595
|
+
${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return r==="location"?t.jsx(Wt,{noCodeMessage:e,snippet:i,specific:n}):t.jsxs($,{bgColor:a.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(At,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:u})})}),t.jsxs(gr,{children:[t.jsx(W,{height:a.spacing[2.5],icon:"copy",iconColor:a.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:f,variant:"ghost",width:a.spacing[2.5]}),c?t.jsxs(L,{onClick:p,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(I,{icon:o?"chevron-up":"chevron-down",iconColor:a.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:f})]}):!1]})]})},{getVariant:xr}=q(e=>({fixed:`
|
|
1596
1596
|
width: 300px;
|
|
1597
1597
|
padding: ${e.spacing[1.25]};
|
|
1598
1598
|
overflow: hidden auto;
|
|
@@ -1620,7 +1620,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1620
1620
|
display: flex;
|
|
1621
1621
|
justify-content: center;
|
|
1622
1622
|
z-index: 99999;
|
|
1623
|
-
`,Ee=s.dt(
|
|
1623
|
+
`,Ee=s.dt($)`
|
|
1624
1624
|
${({theme:e,$size:i})=>`
|
|
1625
1625
|
background-color: ${e.palette.white};
|
|
1626
1626
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -1712,7 +1712,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1712
1712
|
margin-right: 0;
|
|
1713
1713
|
`:""}
|
|
1714
1714
|
}
|
|
1715
|
-
`,
|
|
1715
|
+
`,Ot=({alert:e,modalRef:i,confirmButton:n=void 0,cancelButton:r=void 0})=>{const{close:a}=i,o=x.useCallback(()=>{r!=null&&r.onClick&&r.onClick(),a()},[r,a]),l=x.useCallback(()=>{n!=null&&n.onClick&&n.onClick(),a()},[n,a]);return[n,r].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(yr,{children:t.jsxs("div",{children:[r&&t.jsx(L,{id:r.id,onClick:o,variant:"tertiary",width:"100%",children:r.text}),n&&t.jsx(L,{id:n.id,onClick:l,variant:"primary",width:"100%",children:n.text})]})})]}):null},Ht=({title:e,description:i,modalRef:n,otherActions:r,onClose:a})=>{const o=s.nt(),l=x.useCallback(()=>{a==null||a(),n.close()},[n,a]);return x.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(hr,{children:[t.jsxs(br,{children:[typeof e=="string"?t.jsx(G,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",wordBreak:"break-word",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[r,t.jsx(W,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),i&&s.lodashExports.isString(i)&&!s.lodashExports.isEmpty(i)?t.jsx(C,{mt:.5,size:"sm",children:i}):void 0,i&&!s.lodashExports.isString(i)&&t.jsx(se,{display:"block",mt:.5,size:"sm",children:i})]})},mr=({disabled:e,id:i="modal-confirm",onCancel:n,onConfirm:r="submit",txtCancel:a,txtConfirm:o})=>{const l=r==="submit";return t.jsxs($,{display:"flex",gap:.75,maxWidth:n?"392px":"190px",mt:1.5,children:[n?t.jsx(L,{id:`${i}-cancel`,justify:"center",onClick:n,variant:"tertiary",width:"100%",children:a??"Cancel"}):void 0,t.jsx(L,{disabled:e,id:i,justify:"center",onClick:l?void 0:r,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},wr=s.dt.button`
|
|
1716
1716
|
${({theme:e})=>`
|
|
1717
1717
|
align-items: center;
|
|
1718
1718
|
color: ${e.palette.gray[500]};
|
|
@@ -1804,7 +1804,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1804
1804
|
font-size: 6px;
|
|
1805
1805
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1806
1806
|
justify-content: center;
|
|
1807
|
-
`,
|
|
1807
|
+
`,Mt=x.forwardRef(function({numberIndicator:i,show:n,variant:r="error",...a},o){return t.jsx(Cr,{$variant:r,className:n?"flex":"hidden","data-testid":"notification-sign",ref:o,...a,children:i&&t.jsx(Sr,{children:i<=9?i:9})})}),Vt=({end:e=!1,label:i,id:n,isActive:r=!1,link:a,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:p})=>{const{pathname:g}=Le.useLocation(),u=r||(d==="primary"?g.includes(a):g.endsWith(a));return t.jsx(U,{display:"flex",id:`${n}-tooltip`,tip:c,children:t.jsxs(kr,{$borderButton:u,$variant:d,children:[t.jsxs(Le.NavLink,{end:e,id:n,onClick:l,to:a,children:[i,t.jsx(Mt,{left:o==null?void 0:o.left,numberIndicator:o==null?void 0:o.numberIndicator,show:o==null?void 0:o.show,top:o==null?void 0:o.top,variant:o==null?void 0:o.variant})]}),p===void 0?null:t.jsx(K,{tagLabel:`${p}`,variant:"default"})]})})},Ze=({items:e,borders:i=!0,box:n=!1,variant:r="primary"})=>{const a=s.nt();return t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:n?"1px solid":void 0,borderBottom:i?`1px solid ${a.palette.gray[300]}`:void 0,borderColor:n?a.palette.gray[200]:void 0,borderRadius:n?a.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:n?[0,0,0,0]:void 0,pl:i?1.25:void 0,pr:i?1.25:void 0,role:"tablist",width:n?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:p,notificationSign:g,onClick:u,tag:f,tooltip:h})=>t.jsx(Vt,{end:o,id:l,isActive:c,label:p,link:d,notificationSign:g,onClick:u,tag:f,tooltip:h,variant:r},l))})},ie=x.forwardRef(function({color:i=z.palette.gray[100],mt:n=.5,mb:r=.5,width:a,...o},l){return t.jsx($,{as:"hr",borderTop:`1px solid ${i}`,mb:r,mt:n,ref:l,width:a??"100%",...o})}),zr=s.dt.li`
|
|
1808
1808
|
${({theme:e})=>`
|
|
1809
1809
|
align-items: center;
|
|
1810
1810
|
background-color: ${e.palette.white};
|
|
@@ -1862,7 +1862,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1862
1862
|
min-width: 240px;
|
|
1863
1863
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1864
1864
|
`}
|
|
1865
|
-
`,me=({children:e,disabled:i=!1,icon:n,iconType:r="fa-light",href:a,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...u})=>{const h=s.nt().palette.gray[i?300:800],y=i?x.Children.map(e
|
|
1865
|
+
`,me=({children:e,disabled:i=!1,icon:n,iconType:r="fa-light",href:a,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...u})=>{const h=s.nt().palette.gray[i?300:800],y=i?x.Children.map(e,m=>x.isValidElement(m)?x.cloneElement(m,{disabled:i,...m.props}):m):e;return t.jsxs(zr,{"aria-disabled":i,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...u,children:[n!==void 0||g!==void 0?t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[n?t.jsx(I,{disabled:i,icon:n,iconColor:h,iconSize:"xxs",iconType:r}):null,a===void 0?y:t.jsx(J,{href:a,children:y})]}):null,p||d?t.jsx(I,{disabled:i,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:r,onClick:l}):null]})},Ir=s.dt(me)`
|
|
1866
1866
|
margin-top: 10px;
|
|
1867
1867
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1868
1868
|
border-radius: 4px;
|
|
@@ -1880,7 +1880,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1880
1880
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1881
1881
|
background-color: unset;
|
|
1882
1882
|
}
|
|
1883
|
-
`,Gt=({items:e,onReorder:i,title:n,description:r,onClickClose:a})=>{const o=x.useCallback(l=>()=>{a(l)},[a]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:i,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs(
|
|
1883
|
+
`,Gt=({items:e,onReorder:i,title:n,description:r,onClickClose:a})=>{const o=x.useCallback(l=>()=>{a(l)},[a]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:i,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs($,{display:"flex",gap:.25,children:[t.jsx(G,{display:"flex",size:"xs",children:n}),t.jsx(K,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(C,{size:"sm",children:r}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(Ir,{disabled:l.locked,icon:"grid-2",label:l.name,onClickIcon:l.locked?void 0:o(l.id),rightIcon:l.locked?"lock":"close",selected:l.visible,value:l.name,children:l.name})},l.name):void 0)]})},Tr=s.dt(me)`
|
|
1884
1884
|
padding: 7px 8px;
|
|
1885
1885
|
|
|
1886
1886
|
&[aria-selected="true"] {
|
|
@@ -1952,7 +1952,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1952
1952
|
border-radius: ${e.spacing[.5]};
|
|
1953
1953
|
width: 250px;
|
|
1954
1954
|
`}
|
|
1955
|
-
`,ce=x.forwardRef(function({name:i,smallSearch:n=!1,onClear:r,value:a,...o},l){const c=s.nt(),[d,p]=x.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),f=x.useCallback(()=>{p(
|
|
1955
|
+
`,ce=x.forwardRef(function({name:i,smallSearch:n=!1,onClear:r,value:a,...o},l){const c=s.nt(),[d,p]=x.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),f=x.useCallback(()=>{p(m=>!m)},[]),h=x.useCallback(m=>{m.key==="Enter"&&m.preventDefault()},[]);ne(g.floating.current,()=>{p(!1)},!0);const y=t.jsxs(Nr,{children:[t.jsx(I,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Fr,{...o,id:i,name:i,onKeyDown:h,ref:l,type:"search",value:a}),!s.lodashExports.isEmpty(a)&&t.jsx(W,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:r,px:.25,py:.25,type:"reset",variant:"ghost"})]});return n?t.jsxs(x.Fragment,{children:[t.jsx(W,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:f,ref:g.setReference,variant:"ghost"}),d?t.jsx(Rr,{ref:g.setFloating,style:u,children:y}):void 0]}):y}),Yt=({columns:e,formId:i,onChangeHandler:n,variant:r})=>{const a=x.useRef(null),[o,l]=x.useState([]),[c,d]=x.useState(""),p=x.useCallback(u=>{const{value:f}=u.target;d(f)},[]),g=x.useCallback(()=>{a.current&&(a.current.reset(),d(""))},[a]);return x.useEffect(()=>{l(e.filter(u=>{var f;return r==="grouped"?u.name.toLowerCase().includes(c.toLowerCase())||((f=u.group)==null?void 0:f.includes(c.toLowerCase())):u.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,r]),r==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:a,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":i,id:i,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(Ut(o)).map(([u,f],h)=>{const y=`li-checkbox${u}`;return t.jsx(Rt,{checkboxesName:u,defaultCollapsed:h===0,onChange:n,options:f,title:u},y)})})]}):t.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:a,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":i,id:i,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(u=>{const f=`li-checkbox-${u.name}`;return t.jsx(Tr,{selected:u.visible,value:f,width:"content",children:t.jsx(Ne,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:n,value:u.name})},f)})})]})},Er=({_containerId:e="portals",title:i,modalRef:n,variant:r})=>{const a=s.nt(),o=x.useRef(null),[l,c]=x.useState(void 0),d=x.useCallback(u=>{const{checked:f,value:h}=u.target,y=n.columns.map(m=>{var b;return m.name===h?((b=m.toggleVisibility)==null||b.call(m,f),{...m,visible:f}):m});n.setColumns(y)},[n]),p=x.useCallback(u=>{const f=n.columns.map(h=>{var y;return h.id===u?((y=h.toggleVisibility)==null||y.call(h,!1),{...h,visible:!1}):h});n.setColumns(f)},[n]),g=x.useCallback(()=>{var f;const u=(f=o.current)==null?void 0:f.scrollHeight;l!==u&&c(u)},[l]);return n.isOpen?Z.createPortal(t.jsx(Bt,{"aria-label":n.name,"aria-modal":"true",children:t.jsxs(Ee,{$size:"md",flexDirection:"column",children:[t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(G,{size:"sm",children:i}),t.jsx(W,{icon:"close",iconColor:a.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:n.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(ie,{mb:0,mt:0}),t.jsxs($,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:o,scroll:"y",width:"100%",children:[t.jsx(Yt,{columns:n.columns,formId:"columns-visibility",onChangeHandler:d,variant:r}),t.jsx($,{borderLeft:`2px solid ${a.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Gt,{description:"Click and drag to reorder the columns",items:n.columns,onClickClose:p,onReorder:n.setColumns,title:"Reorder columns"})]}),t.jsx(ie,{mb:0,mt:0}),t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(L,{disabled:!n.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:n.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),t.jsx(L,{id:"columns-modal-submit",justify:"center",onClick:n.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Dr=s.dt(me)`
|
|
1956
1956
|
padding: 8px;
|
|
1957
1957
|
min-width: unset;
|
|
1958
1958
|
`,qt=s.dt.div.attrs({className:"comp-modal absolute top-[55px] overflow-auto"})`
|
|
@@ -1968,7 +1968,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1968
1968
|
svg.fa-check {
|
|
1969
1969
|
border-radius: 2px;
|
|
1970
1970
|
}
|
|
1971
|
-
`,Kt=({control:e,option:i,register:n,setValue:r})=>{var a,o,l,c,d;switch(i.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=i.options)==null?void 0:a.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Ne,{...n("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=i.options)==null?void 0:o.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Xe,{...n("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(yt,{control:e,items:((l=i.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:i.label,name:`text.${String(i.key)}-${i.filterFn??"caseInsensitive"}`,value:i.value});case"text":const p=`text.${String(i.key)}-${i.filterFn??"caseInsensitive"}`;return t.jsx(Fe,{label:i.label,name:p,register:n,value:i.value});case"numberRange":return t.jsx(Nt,{label:i.label,name:String(i.key),propsMax:{placeholder:"Max",register:n,name:"maxValue",value:i.maxValue,setValue:r},propsMin:{placeholder:"Min",register:n,name:"minValue",value:i.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(zt,{label:i.label,name:String(i.key),propsMax:{name:"maxValue",value:(c=i.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=i.minValue)==null?void 0:d.toString()},register:n,setValue:r,variant:"filters"});default:return t.jsx("div",{})}},Xt=({control:e,items:i,register:n,setValue:r})=>t.jsx(t.Fragment,{children:i.map((a,o)=>{const l=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Kt,{control:e,option:a,register:n,setValue:r}),o<i.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Zt=e=>{var c,d,p,g,u;const[i,n]=x.useState([...e]),{control:r,register:a,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter(y=>y.checked).map(y=>y.value))??[]}),radio:((p=(d=(c=e.find(f=>f.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>["text","select"].includes(f.type)).reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:g.minValue,maxValue:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:r,items:i,setItems:n,register:a,handleSubmit:o,setValue:l}},Lr=(e,i)=>{var n,r,a,o,l;i("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),i("radio",((a=(r=(n=e.find(c=>c.type==="radioButton"))==null?void 0:n.options)==null?void 0:r.find(({checked:c})=>c))==null?void 0:a.value)??""),i("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),i("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),i("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Pr=(e,i)=>e.map(n=>{var r;return n.type==="checkboxes"?{...n,options:(r=n.options)==null?void 0:r.filter(a=>{var o;return((o=a.label)==null?void 0:o.toLowerCase().includes(i.toLowerCase()))??a.value.toLowerCase().includes(i.toLowerCase())})}:n}),Oe=({options:e,onSubmit:i,id:n,onClose:r})=>{const a=s.nt(),{control:o,items:l,setItems:c,register:d,handleSubmit:p,setValue:g}=Zt(e),u=e.some($=>$.type==="checkboxes"),f=x.useCallback($=>{const{value:b}=$.target,w=Pr(e,b);c(w)},[e,c]),h=x.useCallback($=>{i&&i($)},[i]);x.useEffect(()=>{c(e),Lr(e,g)},[e,c,g]);const y=t.jsx(qt,{$bgColor:"transparent",children:t.jsxs(Ee,{$size:"fixed",flexDirection:"column",gap:1.25,style:{overflow:"hidden"},children:[t.jsx("div",{className:"flex justify-end mb-[-1rem]",children:t.jsx(W,{icon:"close",iconColor:a.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:r,px:.25,py:.25,variant:"ghost"})}),u&&t.jsx(ce,{onChange:f}),t.jsxs("form",{id:n,onSubmit:p(h),children:[t.jsx(Xt,{control:o,items:l,register:d,setValue:g}),t.jsx(L,{mt:1,type:"submit",children:"Apply"})]})]})});return Z.createPortal(y,document.getElementById("portals")??document.body)},Jt=({options:e,variant:i,onApplyFilters:n})=>{const r=s.nt(),[a,o]=x.useState(e),[l,c]=x.useState([]),[d,p]=x.useState({}),[g,u]=x.useState(""),f=x.useCallback(b=>()=>{const w=a.find(j=>j.label===b);u(b),c((w==null?void 0:w.filterOptions)??[])},[a]),h=x.useCallback(b=>{const w=[...b.checkbox,...Object.values(b.text??{}),...b.radio?[b.radio]:[],...b.minValue?[String(b.minValue)]:[],...b.maxValue?[String(b.maxValue)]:[]];p(S=>w.length>0?{...S,[g]:w}:S);const j=S=>{var N,R;return{...S,options:(N=S.options)==null?void 0:N.map(A=>({...A,checked:b.checkbox.includes(A.value)||b.radio===A.value})),value:["text","select"].includes(S.type)?((R=b.text)==null?void 0:R[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`])??S.value:S.value,minValue:["numberRange","dateRange"].includes(S.type)?b.minValue:S.minValue,maxValue:["numberRange","dateRange"].includes(S.type)?b.maxValue:S.maxValue}},v=S=>S.label===g?{...S,filterOptions:S.filterOptions.map(j)}:S,k=a.map(v);o(S=>S.map(v));const T=k.flatMap(({filterOptions:S})=>S);n(T),c([])},[a,n,g]),y=x.useCallback(()=>{c([])},[]),$=x.useCallback((b,w)=>{const j=`li-filter-option-${b}`;return t.jsxs(Dr,{icon:w,onClick:f(b),style:{minWidth:"180px"},value:j,width:"100%",children:[b,d[b]===void 0?void 0:t.jsx(K,{tagLabel:d[b].length.toString()})]},j)},[d,f]);return x.useEffect(()=>{const b=e.reduce((w,{label:j,filterOptions:v})=>{const k=v.flatMap(({value:N,minValue:R,maxValue:A})=>[R,A,N]).filter(Boolean),T=v.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),S=[...k,...T];return S.length===0?w:{...w,[j]:S}},{});p(b)},[e]),i==="grouped"?t.jsx(m,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"360px",position:"relative",style:{columnGap:"10px"},wrap:"wrap",children:l.length>0?t.jsx(Oe,{id:"filters-options",onClose:y,onSubmit:h,options:l}):Object.entries(Ut(e)).map(([b,w])=>t.jsxs(m,{children:[t.jsx(C,{color:r.palette.gray[400],mb:.25,size:"sm",children:b}),w.map(({label:j,icon:v="filter-list"})=>$(j,v))]},b))}):t.jsx(m,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"200px",style:{columnGap:"10px"},wrap:"wrap",children:l.length>0?t.jsx(Oe,{id:"filters-options",onClose:y,onSubmit:h,options:l}):e.map(({label:b,icon:w="filter-list"})=>$(b,w))})},Qt=({_containerId:e="portals",options:i,onApplyFilters:n,modalRef:r,variant:a})=>{const o=s.nt();return Z.createPortal(t.jsx(qt,{$bgColor:"transparent","aria-label":r.name,"aria-modal":"true",children:t.jsxs(Ee,{$size:"fixed",alignItems:"start",display:"flex",flexDirection:"row",gap:.5,position:"relative",px:1.25,py:1.25,style:{width:"max-content"},children:[t.jsx(Jt,{onApplyFilters:n,options:i,variant:a}),t.jsx(W,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:r.close,px:.25,py:.25,variant:"ghost"})]})}),document.getElementById(e)??document.body)};function Ar(e){if(e)return e}function Wr(e){if(!e||e.length===0)return;const i=e.filter(r=>r.checked).map(r=>r.label??r.value);return i.length===0?void 0:i.join(", ")}function Br(e,i){const n=s._.isEmpty(e)&&typeof e!="number"?void 0:Number(e),r=s._.isEmpty(i)&&typeof i!="number"?void 0:Number(String(i));if(!s._.isUndefined(n)&&!s._.isUndefined(r))return`${n} - ${r}`;if(!s._.isUndefined(n))return`Min ${n}`;if(!s._.isUndefined(r))return`Max ${r}`}function Hr(e,i){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)||s._.isUndefined(i))){if(e!==""&&i!=="")return`${s.dayjs(e).format("LL")} - ${s.dayjs(i).format("LL")}`;if(e!=="")return`From ${s.dayjs(e).format("LL")}`;if(i!=="")return`To ${s.dayjs(i).format("LL")}`}}function Mr(e,i,n){return e==="select"?i:`${i} ${n==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:i="filter-list",label:n,onClose:r,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx(m,{pr:.25,children:t.jsx(K,{filterValues:a,icon:i,id:"remove-filter",onClose:r(e),tagLabel:`${n} `})},n),ei=({options:e,onClose:i})=>{const n=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=a;switch(c){case"numberRange":{const f=Br(g,u);return t.jsx(ae,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:i},l)}case"dateRange":{const f=Hr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ae,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:i},l)}case"radioButton":case"checkboxes":{const f=Wr(p);return t.jsx(ae,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:i},l)}case void 0:case"select":case"text":default:{const f=Ar(d),h=Mr(c,r.label,o);return t.jsx(ae,{filter:a,filterValue:f,icon:r.icon,label:h,onClose:i},l)}}})).filter(r=>{if(r===null)return!1;const{filterValue:a}=r.props;return!s._.isNil(a)&&!s._.isEmpty(String(a))});return t.jsx(m,{display:"flex",wrap:"wrap",children:n})},Or=(e,i)=>{function n(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 r(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 a(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,f=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(f)&&s._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(l){return i.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return r(l,c);case"numberRange":return a(l,c,Number);case"dateRange":return a(l,c,d=>new Date(d));case"select":case"text":default:return n(l,c)}})}return e.filter(o)},lt=e=>[...e.flatMap(({options:n})=>n).filter(n=>n==null?void 0:n.checked),...e.flatMap(n=>[n.value,n.maxValue,n.minValue]).filter(Boolean)].length,Vr=e=>{var n;const i=((n=e.options)==null?void 0:n.map(r=>({...r,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:i}},ct="portals",_r=({dataset:e,localStorageKey:i,options:n,setFilteredDataset:r,onFiltersChange:a,variant:o="ungrouped"})=>{const l=Re("filters-modal"),c=x.useRef(null),[d,p]=x.useState([]),[g,u]=x.useState(lt(d)),f=n.map($=>({...$,filterOptions:$.filterOptions.map(b=>d.find(j=>j.key===b.key&&j.type===b.type&&j.filterFn===b.filterFn)??{...b})})),h=x.useCallback($=>{p([...$]),localStorage.setItem(i,JSON.stringify($))},[p,i]),y=x.useCallback($=>()=>{const b=d.map(w=>w.key===$.key&&w.type===$.type&&w.filterFn===$.filterFn?Vr(w):w);p(b),localStorage.setItem(i,JSON.stringify(b))},[d,i]);return x.useEffect(()=>{const $=localStorage.getItem(i),b=$?JSON.parse($):n.flatMap(w=>w.filterOptions);p(b)},[i,n,p]),ne(c.current,l.close,!0),x.useEffect(()=>{r&&e!==void 0&&r(Or(e,d)),u(lt(d)),a==null||a(d)},[e,d,r,u,a]),t.jsx(x.Fragment,{children:t.jsxs(m,{alignItems:"center",display:"flex",gap:.25,id:ct,maxWidth:"100%",position:"relative",ref:c,wrap:"wrap",children:[t.jsxs(m,{pr:.25,children:[t.jsx(L,{icon:"filter",id:"filterBtn",onClick:l.toggle,tag:g.toString(),variant:"ghost"}),t.jsx(ei,{onClose:y,options:f})]}),l.isOpen&&t.jsx(Qt,{_containerId:ct,modalRef:l,onApplyFilters:h,options:f,variant:o})]})})},ti=({_portal:e=!0,alert:i,cancelButton:n=void 0,children:r=void 0,confirmButton:a=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const y=s.nt(),$=t.jsx(Bt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ee,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx(m,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Ze,{items:g})}),(s._.isObject(o)||r)&&t.jsxs(fr,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx($r,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(C,{size:"sm",children:o.imageText})]}),t.jsx(Ht,{alert:i,cancelButton:n,confirmButton:a,modalRef:c})]})});return e&&c.isOpen?Z.createPortal($,document.getElementById("portals")??document.body):c.isOpen?$:null},Gr=()=>{const[e,i]=x.useState(!1),[n,r]=x.useState(),a=x.useRef(null),o=Re("confirm-dialog-modal"),l=x.useCallback(async g=>(r(g),i(!0),new Promise(u=>{a.current=u})),[]),c=x.useCallback(()=>{var g;i(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=x.useCallback(()=>{var g;i(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return x.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(ti,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(n==null?void 0:n.id)??"modal-confirm",onClick:c,text:"Confirm"},description:n==null?void 0:n.message,id:g,modalRef:{...o,close:d},size:"sm",title:n==null?void 0:n.title,children:[n==null?void 0:n.content,u]}),confirm:l}},Ve=({buttonProps:e,variant:i})=>t.jsx(L,{onClick:e.onClick,variant:i,children:e.text}),Ur=s.dt.div`
|
|
1971
|
+
`,Kt=({control:e,option:i,register:n,setValue:r})=>{var a,o,l,c,d;switch(i.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=i.options)==null?void 0:a.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Ne,{...n("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=i.options)==null?void 0:o.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Xe,{...n("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(yt,{control:e,items:((l=i.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:i.label,name:`text.${String(i.key)}-${i.filterFn??"caseInsensitive"}`,value:i.value});case"text":const p=`text.${String(i.key)}-${i.filterFn??"caseInsensitive"}`;return t.jsx(Fe,{label:i.label,name:p,register:n,value:i.value});case"numberRange":return t.jsx(Nt,{label:i.label,name:String(i.key),propsMax:{placeholder:"Max",register:n,name:"maxValue",value:i.maxValue,setValue:r},propsMin:{placeholder:"Min",register:n,name:"minValue",value:i.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(zt,{label:i.label,name:String(i.key),propsMax:{name:"maxValue",value:(c=i.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=i.minValue)==null?void 0:d.toString()},register:n,setValue:r,variant:"filters"});default:return t.jsx("div",{})}},Xt=({control:e,items:i,register:n,setValue:r})=>t.jsx(t.Fragment,{children:i.map((a,o)=>{const l=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Kt,{control:e,option:a,register:n,setValue:r}),o<i.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Zt=e=>{var c,d,p,g,u;const[i,n]=x.useState([...e]),{control:r,register:a,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter(y=>y.checked).map(y=>y.value))??[]}),radio:((p=(d=(c=e.find(f=>f.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>["text","select"].includes(f.type)).reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:g.minValue,maxValue:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:r,items:i,setItems:n,register:a,handleSubmit:o,setValue:l}},Lr=(e,i)=>{var n,r,a,o,l;i("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),i("radio",((a=(r=(n=e.find(c=>c.type==="radioButton"))==null?void 0:n.options)==null?void 0:r.find(({checked:c})=>c))==null?void 0:a.value)??""),i("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),i("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),i("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Pr=(e,i)=>e.map(n=>{var r;return n.type==="checkboxes"?{...n,options:(r=n.options)==null?void 0:r.filter(a=>{var o;return((o=a.label)==null?void 0:o.toLowerCase().includes(i.toLowerCase()))??a.value.toLowerCase().includes(i.toLowerCase())})}:n}),Me=({options:e,onSubmit:i,id:n,onClose:r})=>{const a=s.nt(),{control:o,items:l,setItems:c,register:d,handleSubmit:p,setValue:g}=Zt(e),u=e.some(m=>m.type==="checkboxes"),f=x.useCallback(m=>{const{value:b}=m.target,w=Pr(e,b);c(w)},[e,c]),h=x.useCallback(m=>{i&&i(m)},[i]);x.useEffect(()=>{c(e),Lr(e,g)},[e,c,g]);const y=t.jsx(qt,{$bgColor:"transparent",children:t.jsxs(Ee,{$size:"fixed",flexDirection:"column",gap:1.25,style:{overflow:"hidden"},children:[t.jsx("div",{className:"flex justify-end mb-[-1rem]",children:t.jsx(W,{icon:"close",iconColor:a.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:r,px:.25,py:.25,variant:"ghost"})}),u&&t.jsx(ce,{onChange:f}),t.jsxs("form",{id:n,onSubmit:p(h),children:[t.jsx(Xt,{control:o,items:l,register:d,setValue:g}),t.jsx(L,{mt:1,type:"submit",children:"Apply"})]})]})});return Z.createPortal(y,document.getElementById("portals")??document.body)},Jt=({options:e,variant:i,onApplyFilters:n})=>{const r=s.nt(),[a,o]=x.useState(e),[l,c]=x.useState([]),[d,p]=x.useState({}),[g,u]=x.useState(""),f=x.useCallback(b=>()=>{const w=a.find(j=>j.label===b);u(b),c((w==null?void 0:w.filterOptions)??[])},[a]),h=x.useCallback(b=>{const w=[...b.checkbox,...Object.values(b.text??{}),...b.radio?[b.radio]:[],...b.minValue?[String(b.minValue)]:[],...b.maxValue?[String(b.maxValue)]:[]];p(S=>w.length>0?{...S,[g]:w}:S);const j=S=>{var N,R;return{...S,options:(N=S.options)==null?void 0:N.map(A=>({...A,checked:b.checkbox.includes(A.value)||b.radio===A.value})),value:["text","select"].includes(S.type)?((R=b.text)==null?void 0:R[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`])??S.value:S.value,minValue:["numberRange","dateRange"].includes(S.type)?b.minValue:S.minValue,maxValue:["numberRange","dateRange"].includes(S.type)?b.maxValue:S.maxValue}},v=S=>S.label===g?{...S,filterOptions:S.filterOptions.map(j)}:S,k=a.map(v);o(S=>S.map(v));const T=k.flatMap(({filterOptions:S})=>S);n(T),c([])},[a,n,g]),y=x.useCallback(()=>{c([])},[]),m=x.useCallback((b,w)=>{const j=`li-filter-option-${b}`;return t.jsxs(Dr,{icon:w,onClick:f(b),style:{minWidth:"180px"},value:j,width:"100%",children:[b,d[b]===void 0?void 0:t.jsx(K,{tagLabel:d[b].length.toString()})]},j)},[d,f]);return x.useEffect(()=>{const b=e.reduce((w,{label:j,filterOptions:v})=>{const k=v.flatMap(({value:N,minValue:R,maxValue:A})=>[R,A,N]).filter(Boolean),T=v.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),S=[...k,...T];return S.length===0?w:{...w,[j]:S}},{});p(b)},[e]),i==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"360px",position:"relative",style:{columnGap:"10px"},wrap:"wrap",children:l.length>0?t.jsx(Me,{id:"filters-options",onClose:y,onSubmit:h,options:l}):Object.entries(Ut(e)).map(([b,w])=>t.jsxs($,{children:[t.jsx(C,{color:r.palette.gray[400],mb:.25,size:"sm",children:b}),w.map(({label:j,icon:v="filter-list"})=>m(j,v))]},b))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"200px",style:{columnGap:"10px"},wrap:"wrap",children:l.length>0?t.jsx(Me,{id:"filters-options",onClose:y,onSubmit:h,options:l}):e.map(({label:b,icon:w="filter-list"})=>m(b,w))})},Qt=({_containerId:e="portals",options:i,onApplyFilters:n,modalRef:r,variant:a})=>{const o=s.nt();return Z.createPortal(t.jsx(qt,{$bgColor:"transparent","aria-label":r.name,"aria-modal":"true",children:t.jsxs(Ee,{$size:"fixed",alignItems:"start",display:"flex",flexDirection:"row",gap:.5,position:"relative",px:1.25,py:1.25,style:{width:"max-content"},children:[t.jsx(Jt,{onApplyFilters:n,options:i,variant:a}),t.jsx(W,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:r.close,px:.25,py:.25,variant:"ghost"})]})}),document.getElementById(e)??document.body)};function Ar(e){if(e)return e}function Wr(e){if(!e||e.length===0)return;const i=e.filter(r=>r.checked).map(r=>r.label??r.value);return i.length===0?void 0:i.join(", ")}function Br(e,i){const n=s._.isEmpty(e)&&typeof e!="number"?void 0:Number(e),r=s._.isEmpty(i)&&typeof i!="number"?void 0:Number(String(i));if(!s._.isUndefined(n)&&!s._.isUndefined(r))return`${n} - ${r}`;if(!s._.isUndefined(n))return`Min ${n}`;if(!s._.isUndefined(r))return`Max ${r}`}function Or(e,i){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)||s._.isUndefined(i))){if(e!==""&&i!=="")return`${s.dayjs(e).format("LL")} - ${s.dayjs(i).format("LL")}`;if(e!=="")return`From ${s.dayjs(e).format("LL")}`;if(i!=="")return`To ${s.dayjs(i).format("LL")}`}}function Hr(e,i,n){return e==="select"?i:`${i} ${n==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:i="filter-list",label:n,onClose:r,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx($,{pr:.25,children:t.jsx(K,{filterValues:a,icon:i,id:"remove-filter",onClose:r(e),tagLabel:`${n} `})},n),Mr=({options:e,onClose:i})=>{const n=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=a;switch(c){case"numberRange":{const f=Br(g,u);return t.jsx(ae,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:i},l)}case"dateRange":{const f=Or(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ae,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:i},l)}case"radioButton":case"checkboxes":{const f=Wr(p);return t.jsx(ae,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:i},l)}case void 0:case"select":case"text":default:{const f=Ar(d),h=Hr(c,r.label,o);return t.jsx(ae,{filter:a,filterValue:f,icon:r.icon,label:h,onClose:i},l)}}})).filter(r=>{if(r===null)return!1;const{filterValue:a}=r.props;return!s._.isNil(a)&&!s._.isEmpty(String(a))});return t.jsx($,{display:"flex",wrap:"wrap",children:n})},Vr=(e,i)=>{function n(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 r(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 a(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,f=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(f)&&s._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(l){return i.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return r(l,c);case"numberRange":return a(l,c,Number);case"dateRange":return a(l,c,d=>new Date(d));case"select":case"text":default:return n(l,c)}})}return e.filter(o)},lt=e=>[...e.flatMap(({options:n})=>n).filter(n=>n==null?void 0:n.checked),...e.flatMap(n=>[n.value,n.maxValue,n.minValue]).filter(Boolean)].length,_r=e=>{var n;const i=((n=e.options)==null?void 0:n.map(r=>({...r,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:i}},ei=(e,i)=>e.map(n=>({...n,filterOptions:n.filterOptions.map(r=>i.find(o=>o.key===r.key&&o.type===r.type&&o.filterFn===r.filterFn)??{...r})})),Gr=(e,i,n,r)=>{const a=i.map(o=>o.key===e.key&&o.type===e.type&&o.filterFn===e.filterFn?_r(o):o);n(a),localStorage.setItem(r,JSON.stringify(a))},ct="portals",Ur=({dataset:e,filters:i,localStorageKey:n,options:r,setFilters:a,setFilteredDataset:o,onFiltersChange:l,variant:c="ungrouped"})=>{const d=Re("filters-modal"),p=x.useRef(null),[g,u]=x.useState(lt(i)),f=x.useCallback(h=>{a([...h]),localStorage.setItem(n,JSON.stringify(h))},[a,n]);return x.useEffect(()=>{const h=localStorage.getItem(n),y=h?JSON.parse(h):r.flatMap(m=>m.filterOptions);a(y)},[n,r,a]),ne(p.current,d.close,!0),x.useEffect(()=>{o&&e!==void 0&&o(Vr(e,i)),u(lt(i)),l==null||l(i)},[e,i,o,u,l]),t.jsx(x.Fragment,{children:t.jsxs($,{alignItems:"center",display:"flex",gap:.25,id:ct,maxWidth:"100%",position:"relative",ref:p,wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(L,{icon:"filter",id:"filterBtn",onClick:d.toggle,tag:g.toString(),variant:"ghost"})}),d.isOpen&&t.jsx(Qt,{_containerId:ct,modalRef:d,onApplyFilters:f,options:ei(r,i),variant:c})]})})},ti=({_portal:e=!0,alert:i,cancelButton:n=void 0,children:r=void 0,confirmButton:a=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const y=s.nt(),m=t.jsx(Bt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ee,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Ht,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx($,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Ze,{items:g})}),(s._.isObject(o)||r)&&t.jsxs(fr,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx($r,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(C,{size:"sm",children:o.imageText})]}),t.jsx(Ot,{alert:i,cancelButton:n,confirmButton:a,modalRef:c})]})});return e&&c.isOpen?Z.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Yr=()=>{const[e,i]=x.useState(!1),[n,r]=x.useState(),a=x.useRef(null),o=Re("confirm-dialog-modal"),l=x.useCallback(async g=>(r(g),i(!0),new Promise(u=>{a.current=u})),[]),c=x.useCallback(()=>{var g;i(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=x.useCallback(()=>{var g;i(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return x.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(ti,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(n==null?void 0:n.id)??"modal-confirm",onClick:c,text:"Confirm"},description:n==null?void 0:n.message,id:g,modalRef:{...o,close:d},size:"sm",title:n==null?void 0:n.title,children:[n==null?void 0:n.content,u]}),confirm:l}},Ve=({buttonProps:e,variant:i})=>t.jsx(L,{onClick:e.onClick,variant:i,children:e.text}),qr=s.dt.div`
|
|
1972
1972
|
display: flex;
|
|
1973
1973
|
flex-direction: column;
|
|
1974
1974
|
align-items: center;
|
|
@@ -1976,7 +1976,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1976
1976
|
max-width: 900px;
|
|
1977
1977
|
white-space: pre-line;
|
|
1978
1978
|
margin: 0 auto;
|
|
1979
|
-
`,
|
|
1979
|
+
`,Kr=s.dt.div`
|
|
1980
1980
|
display: flex;
|
|
1981
1981
|
flex-direction: row;
|
|
1982
1982
|
justify-content: center;
|
|
@@ -1989,7 +1989,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1989
1989
|
> img {
|
|
1990
1990
|
width: 100%;
|
|
1991
1991
|
}
|
|
1992
|
-
`,
|
|
1992
|
+
`,Xr=s.dt.div`
|
|
1993
1993
|
display: flex;
|
|
1994
1994
|
flex-direction: row;
|
|
1995
1995
|
margin: 0;
|
|
@@ -2002,7 +2002,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2002
2002
|
> *:last-child {
|
|
2003
2003
|
margin-right: 0;
|
|
2004
2004
|
}
|
|
2005
|
-
`,dt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},
|
|
2005
|
+
`,dt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},Zr=({cancelButton:e=void 0,confirmButton:i=void 0,description:n,imageSrc:r="integrates/empty/addRoot",padding:a=1.25,title:o,size:l="md"})=>{const c=(i??e)!==void 0;return t.jsxs(qr,{$padding:a,children:[t.jsx(Kr,{children:t.jsx(te,{alt:"empty-icon",publicId:r})}),t.jsx(G,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:dt[l].title,textAlign:"center",children:o}),t.jsx(C,{mb:c?2:void 0,size:dt[l].description,textAlign:"center",children:n}),c?t.jsxs(Xr,{children:[e&&t.jsx(Ve,{buttonProps:e,variant:"tertiary"}),i&&t.jsx(Ve,{buttonProps:i,variant:"primary"})]}):void 0]})},Jr=({children:e})=>{const i=s.useFormContext();return e({...i})},Qr=s.dt.form`
|
|
2006
2006
|
${({theme:e})=>`
|
|
2007
2007
|
align-items: flex-start;
|
|
2008
2008
|
align-self: stretch;
|
|
@@ -2012,7 +2012,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2012
2012
|
overflow: hidden auto;
|
|
2013
2013
|
width: 100%;
|
|
2014
2014
|
`}
|
|
2015
|
-
`,
|
|
2015
|
+
`,ea=({alert:e,buttonAlignment:i,cancelButton:n,children:r,confirmButton:a,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,showButtons:g=!0,yupSchema:u,...f})=>{const h=s.nt(),y=s.useForm({...f,mode:d??"all",resolver:u?s.o(u):void 0});return t.jsx(s.FormProvider,{...y,children:t.jsx(Qr,{onSubmit:y.handleSubmit(p),children:t.jsxs($,{scroll:"y",width:"100%",children:[t.jsx($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:r}),g&&t.jsxs($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,borderTop:`1px solid ${h.palette.gray[200]}`,display:"flex",flexDirection:i?"unset":"column",gap:.625,justify:i??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,maxWidth:c,children:[n?t.jsx(L,{icon:n.icon,id:`${l}-cancel`,justify:"center",onClick:n.onClick,type:"reset",variant:"tertiary",width:"100%",children:n.label??"Cancel"}):void 0,t.jsx(L,{disabled:((a==null?void 0:a.disabled)??!1)||y.formState.isSubmitting||o&&!y.formState.isDirty,icon:a==null?void 0:a.icon,id:l,justify:"center",type:"submit",width:"100%",children:(a==null?void 0:a.label)??"Confirm"})]})]})]})})})},ta=s.dt(ye)`
|
|
2016
2016
|
display: grid;
|
|
2017
2017
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2018
2018
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2030,7 +2030,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2030
2030
|
grid-template-columns: repeat(${i}, 1fr);
|
|
2031
2031
|
}
|
|
2032
2032
|
`}
|
|
2033
|
-
`,
|
|
2033
|
+
`,ia=x.forwardRef(function({children:i,md:n,sm:r,lg:a,xl:o,gap:l,...c},d){return t.jsx(ta,{$gap:l,$lg:a,$md:n,$sm:r,$xl:o,ref:d,...c,children:i})}),na=s.dt.div`
|
|
2034
2034
|
${({theme:e,$itemsLength:i})=>`
|
|
2035
2035
|
display: flex;
|
|
2036
2036
|
background-color: ${e.palette.white};
|
|
@@ -2066,7 +2066,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2066
2066
|
background-color: ${e.palette.gray[100]};
|
|
2067
2067
|
}
|
|
2068
2068
|
`}
|
|
2069
|
-
`,ii=({isSelected:e=!1,label:i,onSelect:n})=>{const r=s.nt(),a=x.useCallback(()=>{n&&n(i)},[n,i]);return t.jsxs(Je,{$isSelected:e,onClick:a,children:[e?t.jsx(I,{icon:"check",iconColor:r.palette.gray[800],iconSize:"xs"}):null,t.jsx(C,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:i})]})},
|
|
2069
|
+
`,ii=({isSelected:e=!1,label:i,onSelect:n})=>{const r=s.nt(),a=x.useCallback(()=>{n&&n(i)},[n,i]);return t.jsxs(Je,{$isSelected:e,onClick:a,children:[e?t.jsx(I,{icon:"check",iconColor:r.palette.gray[800],iconSize:"xs"}):null,t.jsx(C,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:i})]})},ra=({isOpen:e=!0,items:i,handleNewOrganization:n,onSelect:r,onClose:a,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=x.useState(i),[u,f]=x.useState(""),h=x.useCallback(b=>{g(w=>w.filter(j=>String(j.name).toLowerCase().includes(b.toLocaleLowerCase())))},[g]),y=x.useCallback(b=>{b.currentTarget&&(f(b.currentTarget.value),h(b.currentTarget.value))},[f,h]);x.useEffect(()=>{g(i),h(u)},[i,h,u]);const m=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(na,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(C,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(W,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:a,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(ce,{onInput:y,placeholder:"Search"})}),t.jsx(ie,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(Je,{onClick:n,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(I,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(C,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(b=>t.jsx(ii,{isSelected:o.toLowerCase()===b.name,label:b.name.charAt(0).toUpperCase()+b.name.slice(1),onSelect:r},b.name))]})]})})});return e?Z.createPortal(m,document.body):t.jsx("div",{})},aa=({description:e,height:i="auto",leftIconName:n,children:r,rightIconName:a,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=s.nt(),f=p==="centered",h=l&&t.jsx(U,{icon:a??n,iconColor:u.palette.gray[800],id:l,place:d,tip:c});return t.jsxs($,{alignItems:f?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:f?"column":"column-reverse",gap:.5,height:i,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[f||s.lodashExports.isUndefined(n)?void 0:h,t.jsx(C,{color:f?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||s.lodashExports.isUndefined(a)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[f&&!s.lodashExports.isUndefined(n)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(G,{fontWeight:"bold",size:"md",children:o}),r]}),f&&!s.lodashExports.isUndefined(a)?h:void 0]})]})},oa=({actions:e,children:i,header:n,title:r,tabs:a,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(C,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:r}),n]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(W,{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(Ze,{items:a})}),t.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:i}),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},g)=>t.jsx(L,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},sa=s.dt.span`
|
|
2070
2070
|
${({theme:e,$bgColor:i=e.palette.secondary[500],$txtDecoration:n="none"})=>`
|
|
2071
2071
|
background-color: ${i};
|
|
2072
2072
|
border-radius: 5px;
|
|
@@ -2075,14 +2075,14 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2075
2075
|
padding: ${e.spacing[.125]} ${e.spacing[.25]} ${e.spacing[.125]} ${e.spacing[.25]};
|
|
2076
2076
|
text-decoration: ${n}
|
|
2077
2077
|
`}
|
|
2078
|
-
`,
|
|
2078
|
+
`,la=({bgColor:e,children:i,txtDecoration:n,ml:r=1})=>t.jsx(sa,{$bgColor:e,$txtDecoration:n,className:`ml-${r}`,children:i}),ca={lg:"56",md:"30",sm:"12"},{getVariant:da}=q(e=>({red:`stroke: ${e.palette.primary[500]};`,white:`stroke: ${e.palette.white};`})),pa=s.mt`
|
|
2079
2079
|
0% {
|
|
2080
2080
|
transform: rotateZ(0deg);
|
|
2081
2081
|
}
|
|
2082
2082
|
100% {
|
|
2083
2083
|
transform: rotateZ(360deg)
|
|
2084
2084
|
}
|
|
2085
|
-
`,
|
|
2085
|
+
`,ga=s.mt`
|
|
2086
2086
|
0%,
|
|
2087
2087
|
25% {
|
|
2088
2088
|
stroke-dashoffset: 280;
|
|
@@ -2099,16 +2099,16 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2099
2099
|
stroke-dashoffset: 280;
|
|
2100
2100
|
transform: rotate(360deg);
|
|
2101
2101
|
}
|
|
2102
|
-
`,
|
|
2102
|
+
`,ua=s.dt.svg`
|
|
2103
2103
|
${({$size:e="md"})=>s.lt`
|
|
2104
|
-
animation: ${
|
|
2104
|
+
animation: ${pa} 2s linear infinite;
|
|
2105
2105
|
animation-timing-function: linear;
|
|
2106
2106
|
display: inline-block;
|
|
2107
|
-
width: ${
|
|
2107
|
+
width: ${ca[e]}px;
|
|
2108
2108
|
`}
|
|
2109
|
-
`,
|
|
2109
|
+
`,xa=s.dt.circle`
|
|
2110
2110
|
${({theme:e,$color:i="red"})=>s.lt`
|
|
2111
|
-
animation: 1.4s ease-in-out infinite both ${
|
|
2111
|
+
animation: 1.4s ease-in-out infinite both ${ga};
|
|
2112
2112
|
display: block;
|
|
2113
2113
|
fill: transparent;
|
|
2114
2114
|
stroke-linecap: round;
|
|
@@ -2117,9 +2117,9 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2117
2117
|
stroke-width: 10px;
|
|
2118
2118
|
transform-origin: 50% 50%;
|
|
2119
2119
|
|
|
2120
|
-
${
|
|
2120
|
+
${da(e,i)}
|
|
2121
2121
|
`}
|
|
2122
|
-
`,
|
|
2122
|
+
`,fa=s.dt.circle`
|
|
2123
2123
|
display: block;
|
|
2124
2124
|
fill: transparent;
|
|
2125
2125
|
stroke: ${({theme:e})=>e.palette.gray[200]};
|
|
@@ -2127,12 +2127,12 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2127
2127
|
stroke-width: 10px;
|
|
2128
2128
|
transform-origin: 50% 50%;
|
|
2129
2129
|
opacity: ${({$color:e})=>e==="white"?"20%":"unset"};
|
|
2130
|
-
`,
|
|
2130
|
+
`,ha=({color:e="red",label:i,size:n})=>{const r=s.nt();return t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsxs(ua,{$size:n,viewBox:"0 0 100 100",children:[t.jsx(fa,{$color:e,cx:"50",cy:"50",r:"45"}),t.jsx(xa,{$color:e,cx:"50",cy:"50",r:"45"})]}),i&&t.jsx(C,{color:e==="red"?r.palette.gray[700]:r.palette.white,ml:.5,size:"sm",children:i})]})},ba={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},ya=({publicId:e,variant:i})=>t.jsx($,{...ba[i],children:t.jsx(te,{alt:"logo",publicId:e})}),$a=s.dt(s.Lottie).attrs(({autoplay:e=!0})=>({autoplay:e,className:"comp-lottie"}))`
|
|
2131
2131
|
${({$size:e=16})=>`
|
|
2132
2132
|
height: ${e}px;
|
|
2133
2133
|
width: ${e}px;
|
|
2134
2134
|
`}
|
|
2135
|
-
`,
|
|
2135
|
+
`,ma=e=>{const{size:i}=e;return t.jsx($a,{$size:i,...e})},wa=({children:e,commitSha:i,commitShortSha:n,parentElement:r,userInfo:a,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=a;return ne(r,()=>{o(!1)}),t.jsxs(_t,{children:[t.jsx("li",{className:"user-info",children:t.jsxs($,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(C,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(C,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(C,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx($,{children:t.jsx(K,{tagLabel:g,variant:"role"})})]})}),t.jsx(ie,{}),e,t.jsx(ie,{}),t.jsx("li",{className:"commit-info",children:t.jsx(J,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${i}`,iconPosition:"hidden",children:t.jsx(C,{color:l.palette.gray[400],size:"xs",children:`commit : ${n}`})})})]})},ja=s.dt.button`
|
|
2136
2136
|
align-items: center;
|
|
2137
2137
|
background-color: transparent;
|
|
2138
2138
|
border: unset;
|
|
@@ -2149,7 +2149,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2149
2149
|
&:hover span {
|
|
2150
2150
|
color: ${z.palette.primary[200]};
|
|
2151
2151
|
}
|
|
2152
|
-
`,
|
|
2152
|
+
`,va=({message:e,onClickButton:i,buttonText:n,buttonFontWeight:r="regular",icon:a,onClose:o,buttonSide:l="end"})=>{const c=s.nt(),[d,p]=x.useState(!0),g=x.useCallback(()=>{p(!1),o==null||o()},[o]),u=t.jsxs(ja,{onClick:i,children:[t.jsx(C,{color:c.palette.white,fontWeight:r,size:"sm",textDecoration:"underline",children:n}),t.jsx(I,{icon:a??"arrow-right",iconColor:c.palette.white,iconSize:"xs",iconType:r==="bold"?"fa-regular":"fa-light"})]});return t.jsxs($,{alignItems:"center",bgGradient:c.palette.gradients["01"],display:d?"flex":"none",id:"message-banner",justify:"space-between",padding:[.75,.75,.75,.75],children:[t.jsxs($,{display:"flex",gap:.5,justify:"center",width:"100%",children:[l==="start"&&i?u:void 0,t.jsx($,{children:typeof e=="string"?t.jsx(C,{color:c.palette.white,display:"inline",size:"sm",children:e}):e}),l==="end"&&i?u:void 0]}),t.jsx(I,{clickable:!0,hoverColor:c.palette.primary[200],icon:"close",iconColor:c.palette.white,iconSize:"xs",iconType:"fa-light",onClick:g})]})},ka=s.dt.div`
|
|
2153
2153
|
${({theme:e,$variant:i})=>`
|
|
2154
2154
|
background: ${e.palette.white};
|
|
2155
2155
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2168,7 +2168,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2168
2168
|
right: 16px;
|
|
2169
2169
|
}
|
|
2170
2170
|
`}
|
|
2171
|
-
`,
|
|
2171
|
+
`,Ca=s.dt.div`
|
|
2172
2172
|
${({theme:e,$variant:i})=>`
|
|
2173
2173
|
height: ${e.spacing[2.5]};
|
|
2174
2174
|
width: ${e.spacing[2.5]};
|
|
@@ -2199,7 +2199,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2199
2199
|
color: ${e.palette[i][500]};
|
|
2200
2200
|
}
|
|
2201
2201
|
`}
|
|
2202
|
-
`,
|
|
2202
|
+
`,Sa=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",za=({description:e,onClose:i,title:n,variant:r})=>{const a=s.nt(),o=x.useCallback(()=>{i==null||i()},[i]);return t.jsxs(ka,{$variant:r,className:`notification notification__${r}`,role:"alertdialog",children:[t.jsxs(Ca,{$variant:r,children:[t.jsx(I,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(I,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(I,{icon:Sa(r),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(G,{fontWeight:"bold",size:"xs",children:n}),t.jsx(C,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(W,{height:"fit-content",icon:"close",iconColor:a.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Ia=s.dt.div`
|
|
2203
2203
|
width: fit-content;
|
|
2204
2204
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2205
2205
|
border-radius: 4px;
|
|
@@ -2212,7 +2212,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2212
2212
|
align-items: center;
|
|
2213
2213
|
justify-content: center;
|
|
2214
2214
|
padding: 0.5em;
|
|
2215
|
-
`,
|
|
2215
|
+
`,Ta=s.dt.input`
|
|
2216
2216
|
width: 4em;
|
|
2217
2217
|
appearance: textfield;
|
|
2218
2218
|
border-style: none;
|
|
@@ -2232,7 +2232,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2232
2232
|
&::-webkit-inner-spin-button {
|
|
2233
2233
|
opacity: 1;
|
|
2234
2234
|
}
|
|
2235
|
-
`,
|
|
2235
|
+
`,Fa=x.forwardRef(function({autoUpdate:i=!1,decimalPlaces:n=0,defaultValue:r=0,max:a,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const u=n<0?0:n,[f,h]=x.useState(Number(r).toFixed(u)),y=x.useCallback(w=>{const j=s.lodashExports.toNumber(w.target.value);w.target.value.endsWith(".")?h(w.target.value):j>=Number(o)&&j<=Number(a)&&(h(String(j)),i&&c(s.lodashExports.toNumber(j.toFixed(u)))),w.stopPropagation()},[i,u,a,o,c]),m=x.useCallback(w=>{w.currentTarget.contains(w.relatedTarget)||h(Number(r).toFixed(u)),w.stopPropagation()},[u,r]),b=x.useCallback(w=>{w.stopPropagation(),w.key==="Enter"&&!s.lodashExports.isEmpty(w.currentTarget.value)&&c(s.lodashExports.toNumber(w.currentTarget.value))},[c]);return t.jsx(Ia,{onBlur:m,tabIndex:-1,children:t.jsx(U,{id:"numberInputTooltip",tip:d,children:t.jsx(Ta,{...p,"aria-label":l,"aria-valuemax":Number(a),"aria-valuemin":Number(o),"aria-valuenow":Number(f),max:a,min:o,name:l,onChange:y,onKeyUp:b,ref:g,step:10**-u,type:"number",value:f})})})}),Na={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},_e=({icon:e,label:i,onClick:n,onlyLabel:r=!1,provider:a="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:n,pb:.5,pl:.25,pr:.25,pt:.5,children:[r?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(te,{alt:`${a} Logo`,height:"100%",publicId:Na[a],width:"100%"}):t.jsx(I,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(C,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:r?"break-spaces":"nowrap",wordWrap:"unset",children:i??a})})]})},Ra=({align:e="end",buttonLabel:i="Add Credential",children:n,id:r,manualOption:a,providers:o})=>{const l=s.nt(),[c,d]=x.useState(!1),p=x.useRef(null);ne(p.current,()=>{d(!1)},!0);const g=x.useCallback(h=>{a==null||a.onClick(h),d(!1)},[a]),u=x.useCallback(()=>{d(h=>!h)},[d]),f=x.useCallback(h=>y=>{var m;(m=o[h])==null||m.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(L,{icon:"plus",onClick:u,variant:"primary",children:i}),t.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:r,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(_e,{onClick:f(h),provider:h},h)),a===void 0?void 0:t.jsx(_e,{icon:"square-plus",label:a.label??"Add manually",onClick:g}),n]})]})},ni=t.jsx($,{alignItems:"center",bgColor:z.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(C,{bgGradient:z.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),Ea=s.dt.div`
|
|
2236
2236
|
${({className:e,theme:i})=>`
|
|
2237
2237
|
align-items: flex-start;
|
|
2238
2238
|
border-radius: ${i.spacing[1]};
|
|
@@ -2297,8 +2297,8 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2297
2297
|
width: 320px;
|
|
2298
2298
|
}
|
|
2299
2299
|
`}
|
|
2300
|
-
`;const
|
|
2301
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},
|
|
2300
|
+
`;const Da={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
|
|
2301
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},La=({description:e,onClick:i,plan:n})=>{const{title:r,description:a,benefits:o,buttonText:l}=Da[n],c=e??a;return t.jsxs(Ea,{className:n,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:n==="essential"?1.75:0,children:[n==="advanced"&&ni,t.jsx(G,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:r}),t.jsx(C,{color:z.palette.gray[400],fontWeight:"semibold",pb:n==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(C,{lineSpacing:1.5,lineSpacingSm:1.25,pb:n==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(L,{onClick:i,variant:"primary",children:l})]})},ri=({description:e="",highlightDescription:i=""})=>{const n=s.nt(),r=typeof i=="string",a=r?"":new RegExp(`(${i.join("|")})`,"u");return i.length>0?t.jsx(C,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:r?t.jsxs(x.Fragment,{children:[t.jsx(se,{color:n.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:i}),e]}):e.split(a).map((o,l)=>i.includes(o)?t.jsx(se,{color:n.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(C,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Pa=({_portal:e=!1,cancelButton:i,darkBackground:n=!1,children:r,confirmButton:a,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:u})=>{const f=s.nt(),{alt:h,src:y,width:m="77px",height:b="77px"}=d,w=x.useCallback(()=>{i==null||i.onClick()},[i]),j=x.useCallback(()=>{a==null||a.onClick()},[a]),v=t.jsx($,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:n?"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(te,{alt:h,height:b,publicId:y,width:m})}),t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(G,{color:u,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(ri,{description:l,highlightDescription:c})]})]}),r&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:r})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(a)?t.jsx(L,{onClick:j,variant:(a==null?void 0:a.variant)??"primary",children:a==null?void 0:a.text},a==null?void 0:a.key):void 0,s.lodashExports.isObject(i)?t.jsx(L,{onClick:w,variant:(i==null?void 0:i.variant)??"tertiary",children:i==null?void 0:i.text},i==null?void 0:i.key):void 0]})]})});return e?Z.createPortal(v,o??document.body):v},Aa=s.dt.div`
|
|
2302
2302
|
${({theme:e})=>`
|
|
2303
2303
|
height: ${e.spacing[1]};
|
|
2304
2304
|
width: ${e.spacing[1]};
|
|
@@ -2329,7 +2329,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2329
2329
|
font-size: ${e.spacing[.5]};
|
|
2330
2330
|
}
|
|
2331
2331
|
`}
|
|
2332
|
-
`,ai=({margin:e,onClick:i,text:n})=>{const r=s.nt(),a=t.jsxs(
|
|
2332
|
+
`,ai=({margin:e,onClick:i,text:n})=>{const r=s.nt(),a=t.jsxs(Aa,{children:[t.jsx(I,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(I,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(I,{icon:"crown",iconClass:"icon",iconSize:"xs"})]});return n!==void 0?t.jsx($,{cursor:"pointer",display:"inline-block",mr:e,onClick:i,children:t.jsxs($,{alignItems:"center",bgColor:r.palette.warning[50],borderRadius:"4px",display:"flex",padding:[.25,.25,.25,.25],width:"fit-content",children:[a,t.jsx(C,{color:r.palette.warning[500],display:"inline",ml:.25,size:"xs",children:n})]})}):t.jsx($,{display:"inline-block",mr:e,onClick:i,children:a})},Wa=({score:e})=>{const i=s.nt(),n=e<=33?"priority-bars-low":"priority-bars-medium",r=e>66||e===0?"priority-bars-high":n;return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.25,children:[t.jsx(I,{icon:r,iconClass:e<=66?"fa-kit-duotone":"",iconColor:e>0?i.palette.primary[500]:i.palette.gray[200],iconSize:"xs",iconType:"fa-kit",secondaryColor:i.palette.gray[200]}),t.jsx(C,{color:i.palette.gray[800],size:"sm",textAlign:"right",children:e+"%"})]})},{getVariant:Ba}=q(e=>({compliance:`
|
|
2333
2333
|
display: inline-flex;
|
|
2334
2334
|
|
|
2335
2335
|
&.horizontal {
|
|
@@ -2387,17 +2387,17 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2387
2387
|
.progress-bar {
|
|
2388
2388
|
background-color: ${e.palette.primary[500]};
|
|
2389
2389
|
}
|
|
2390
|
-
`})),
|
|
2390
|
+
`})),Oa=(e,i)=>i<50?e.palette.error[500]:i<80?e.palette.warning[500]:e.palette.success[500],Ha=s.dt.div`
|
|
2391
2391
|
${({theme:e,$minWidth:i,$orientation:n,$rounded:r,$variant:a})=>`
|
|
2392
2392
|
background-color: ${e.palette.gray[100]};
|
|
2393
2393
|
border-radius: ${r?"100px":"unset"};
|
|
2394
2394
|
${n==="horizontal"?"min-width":"min-height"}: ${i}px;
|
|
2395
2395
|
${n==="horizontal"?"":"height: 100%;"}
|
|
2396
2396
|
|
|
2397
|
-
${
|
|
2397
|
+
${Ba(e,a)}
|
|
2398
2398
|
|
|
2399
2399
|
`}
|
|
2400
|
-
`,
|
|
2400
|
+
`,Ma=s.dt.div`
|
|
2401
2401
|
${({theme:e,$percentage:i,$rounded:n,$variant:r})=>`
|
|
2402
2402
|
display: inline-flex;
|
|
2403
2403
|
width: ${i}%;
|
|
@@ -2407,14 +2407,14 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2407
2407
|
border-radius: ${n?"100px":"unset"};
|
|
2408
2408
|
border-end-end-radius: ${n&&i<100?"0":"inherit"};
|
|
2409
2409
|
border-start-end-radius: ${n&&i<100?"0":"inherit"};
|
|
2410
|
-
background-color: ${r==="compliance"?
|
|
2410
|
+
background-color: ${r==="compliance"?Oa(e,i):"inherit"};
|
|
2411
2411
|
`}
|
|
2412
|
-
`,
|
|
2412
|
+
`,Va=({minWidth:e=100,percentage:i,percentageLocation:n="right",showPercentage:r=!1,orientation:a="horizontal",rounded:o=!0,variant:l="default"})=>{const c=r&&n==="left",d=r?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(C,{ml:.5,mr:c?.5:0,size:"sm",children:`${i}%`})}):null,p=t.jsx(Ha,{$minWidth:e,$orientation:a,$rounded:o,$variant:l,className:a,children:t.jsx(Ma,{$percentage:i,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:a==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},_a=s.dt.div.attrs({className:"comp-scroll-up"})`
|
|
2413
2413
|
bottom: 15px;
|
|
2414
2414
|
position: fixed;
|
|
2415
2415
|
right: 140px;
|
|
2416
2416
|
z-index: 100;
|
|
2417
|
-
`,
|
|
2417
|
+
`,Ga=({scrollerId:e="dashboard",visibleAt:i=500})=>{const[n,r]=x.useState(!1),[a,o]=x.useState(null);x.useEffect(()=>{o(document.getElementById(e)),a==null||a.addEventListener("scroll",()=>{r(a.scrollTop>i)})},[a,e,i]);const l=x.useCallback(()=>{a==null||a.scrollTo({behavior:"smooth",top:0})},[a]);return n?t.jsx(_a,{children:t.jsx(W,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},Ua={critical:{bgColor:z.palette.primary[700],colorL:z.palette.gray[800],colorR:z.palette.white},disable:{bgColor:z.palette.gray[200],colorL:z.palette.gray[400],colorR:z.palette.gray[400]},high:{bgColor:z.palette.error[500],colorL:z.palette.gray[800],colorR:z.palette.white},low:{bgColor:z.palette.warning[200],colorL:z.palette.gray[800],colorR:z.palette.gray[800]},medium:{bgColor:z.palette.warning[500],colorL:z.palette.gray[800],colorR:z.palette.gray[800]}},Ya=({textL:e,textR:i,variant:n})=>{const r=s.nt(),{bgColor:a,colorL:o,colorR:l}=Ua[n];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:r.palette.white,border:`1px solid ${a}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(C,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:a,border:`1px solid ${a}`,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(C,{color:l,size:"xs",children:i})})]})},qa=(e,i)=>{const n={critical:z.palette.primary[700],high:z.palette.error[500],low:z.palette.warning[200],medium:z.palette.warning[500],none:z.palette.gray[200]},r={disabled:z.palette.gray[400],enabled:z.palette.gray[800]},a={critical:z.palette.white,high:z.palette.white,low:z.palette.gray[800],medium:z.palette.gray[800],none:z.palette.gray[400]};return{iconColor:i<1?n.none:n[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:i<1?a.none:a[e],textColor:i<1?r.disabled:r.enabled}},oe=({variant:e,value:i})=>{const{iconColor:n,iconText:r,iconTextColor:a,textColor:o}=qa(e,i),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(U,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:n,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(C,{color:a,size:"sm",textAlign:"center",children:r})})}),t.jsx(C,{color:o,size:"sm",children:i})]})},Ka=({critical:e,high:i,medium:n,low:r})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(oe,{value:e,variant:"critical"}),t.jsx(oe,{value:i,variant:"high"}),t.jsx(oe,{value:n,variant:"medium"}),t.jsx(oe,{value:r,variant:"low"})]}),Xa=s.dt.div`
|
|
2418
2418
|
${({theme:e})=>`
|
|
2419
2419
|
border-radius: ${e.spacing[.25]};
|
|
2420
2420
|
cursor: pointer;
|
|
@@ -2432,7 +2432,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2432
2432
|
display: block;
|
|
2433
2433
|
}
|
|
2434
2434
|
`}
|
|
2435
|
-
`,
|
|
2435
|
+
`,Za=({visibleElement:e,hiddenElement:i})=>t.jsxs(Xa,{children:[e,t.jsx($,{display:"none",position:"absolute",top:"100%",zIndex:10,children:i})]}),oi=({customBadge:e=void 0,description:i,icon:n,onClick:r,requiresUpgrade:a=!1,title:o})=>{const l=s.nt();return t.jsxs($,{bgColor:l.palette.white,bgColorHover:l.palette.gray[100],cursor:"pointer",display:"flex",gap:.5,onClick:r,px:1.25,py:1,width:"100%",children:[t.jsx($,{alignItems:"center",bgColor:l.palette.gray[300],borderRadius:l.spacing[.25],display:"flex",height:"24px",justify:"center",width:"24px",children:t.jsx(I,{icon:n,iconColor:l.palette.gray[800],iconSize:"xxs",ml:.5,mr:.5})}),t.jsxs($,{children:[t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,children:[t.jsx(C,{color:l.palette.gray[800],size:"sm",children:o}),a?t.jsx(ai,{text:"Upgrade"}):void 0,e]}),t.jsx(C,{color:l.palette.gray[400],size:"xs",children:i})]})]})},Ja=s.dt(s.m.div)`
|
|
2436
2436
|
${({theme:e})=>`
|
|
2437
2437
|
background-color: ${e.palette.white};
|
|
2438
2438
|
box-shadow: ${e.shadows.lg};
|
|
@@ -2455,7 +2455,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2455
2455
|
height: auto;
|
|
2456
2456
|
}
|
|
2457
2457
|
`}
|
|
2458
|
-
`,
|
|
2458
|
+
`,Qa=({children:e,closeIconId:i="close-menu",isOpen:n,items:r,onClose:a,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),u=x.useRef(null),f=x.useCallback(h=>()=>{h(),a()},[a]);return x.useEffect(()=>{const h=["mousedown","touchstart"],y=m=>{var k;const b=m.target,w=document.getElementById("helpBtn"),j=document.getElementById("filterBtn"),v=(b===w||((w==null?void 0:w.contains(b))??!1)||b===j||(j==null?void 0:j.contains(b)))??!1;n&&!v&&!(((k=u.current)==null?void 0:k.contains(b))??!1)&&a()};return h.forEach(m=>{document.addEventListener(m,y,{passive:!0})}),()=>{h.forEach(m=>{document.removeEventListener(m,y)})}},[n,a]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(Ja,{animate:n?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:u,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs($,{height:"100%",position:"relative",children:[t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(C,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(W,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:i,onClick:a,px:.25,py:.25,variant:"ghost"})]}),t.jsxs($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs($,{py:1.25,children:[(r??[]).map(({customBadge:h,description:y,icon:m,onClick:b,requiresUpgrade:w,title:j})=>t.jsx(oi,{customBadge:h,description:y,icon:m,onClick:f(b),requiresUpgrade:w,title:j},j)),e&&t.jsx($,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderColor:g.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(L,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(L,{onClick:l,type:"submit",children:o})]})]})]})})})},eo=(e,i)=>i>=50?`
|
|
2459
2459
|
${e.palette.gray[200]} 50%,
|
|
2460
2460
|
${e.palette.primary[500]} 50.05%,
|
|
2461
2461
|
${e.palette.primary[500]} ${i}%,
|
|
@@ -2466,7 +2466,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2466
2466
|
${e.palette.primary[500]} 50%,
|
|
2467
2467
|
${e.palette.gray[200]} 50.05%,
|
|
2468
2468
|
${e.palette.gray[200]} 100%
|
|
2469
|
-
`,
|
|
2469
|
+
`,to=s.dt.div`
|
|
2470
2470
|
${({theme:e,$min:i,$value:n})=>`
|
|
2471
2471
|
align-items: center;
|
|
2472
2472
|
align-self: stretch;
|
|
@@ -2482,7 +2482,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2482
2482
|
${i>=0?`
|
|
2483
2483
|
${e.palette.primary[500]} ${n}%,
|
|
2484
2484
|
${e.palette.gray[200]} ${n}%
|
|
2485
|
-
`:
|
|
2485
|
+
`:eo(e,n)}
|
|
2486
2486
|
);
|
|
2487
2487
|
border-radius: ${e.spacing[.125]};
|
|
2488
2488
|
height: ${e.spacing[.25]};
|
|
@@ -2506,7 +2506,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2506
2506
|
border: 1px solid ${e.palette.primary[500]};
|
|
2507
2507
|
}
|
|
2508
2508
|
`}
|
|
2509
|
-
`,
|
|
2509
|
+
`,io=s.dt.div`
|
|
2510
2510
|
${({theme:e})=>`
|
|
2511
2511
|
align-items: center;
|
|
2512
2512
|
display: flex;
|
|
@@ -2520,7 +2520,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2520
2520
|
font-size: ${e.spacing[.5]};
|
|
2521
2521
|
}
|
|
2522
2522
|
`}
|
|
2523
|
-
`,
|
|
2523
|
+
`,no=s.dt.output`
|
|
2524
2524
|
${({theme:e})=>`
|
|
2525
2525
|
align-items: flex-end;
|
|
2526
2526
|
border-radius: ${e.spacing[.5]};
|
|
@@ -2531,7 +2531,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2531
2531
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2532
2532
|
width: 59px;
|
|
2533
2533
|
`}
|
|
2534
|
-
`,si=({state:e,trackRef:i,index:n,name:r})=>{const a=x.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:n,trackRef:i,inputRef:a},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":r,ref:a})})})},
|
|
2534
|
+
`,si=({state:e,trackRef:i,index:n,name:r})=>{const a=x.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:n,trackRef:i,inputRef:a},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":r,ref:a})})})},ro=(e,i,n)=>Math.round((n-e)/(i-e)*100),ao=e=>{const i=s.nt(),n=x.useRef(null),{label:r,minValue:a=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(y){c==null||c(l,y)},value:d==null?void 0:d(l)}),u=ro(a,o,g.getThumbValue(0)),{groupProps:f,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,n);return t.jsx(O,{htmlFor:l,label:r,children:t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(to,{...f,$min:a??0,$value:u,className:"slider",children:[t.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:n,children:t.jsx(si,{index:0,name:l,state:g,trackRef:n})}),t.jsxs(io,{children:[t.jsx("p",{children:`${p.format(a)} (Low)`}),a<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${p.format(o)} (High)`})]})]}),t.jsx(no,{children:t.jsx(C,{color:i.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:oo}=q(e=>({completed:`
|
|
2535
2535
|
background-color: ${e.palette.primary[500]};
|
|
2536
2536
|
color: ${e.palette.white};
|
|
2537
2537
|
|
|
@@ -2554,7 +2554,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2554
2554
|
&::after {
|
|
2555
2555
|
background-color: ${e.palette.gray[200]};
|
|
2556
2556
|
}
|
|
2557
|
-
`})),
|
|
2557
|
+
`})),so=s.dt.div`
|
|
2558
2558
|
${({theme:e})=>`
|
|
2559
2559
|
align-items: stretch;
|
|
2560
2560
|
background-color: ${e.palette.white};
|
|
@@ -2564,7 +2564,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2564
2564
|
padding: ${`${e.spacing[1]} ${e.spacing[1]}`};
|
|
2565
2565
|
scroll-behavior: unset;
|
|
2566
2566
|
`}
|
|
2567
|
-
`,
|
|
2567
|
+
`,lo=s.dt.div`
|
|
2568
2568
|
display: flex;
|
|
2569
2569
|
flex-direction: row;
|
|
2570
2570
|
margin-bottom: ${({theme:e})=>e.spacing[2]};
|
|
@@ -2572,7 +2572,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2572
2572
|
&:last-child > div:first-child > span::after {
|
|
2573
2573
|
display: none;
|
|
2574
2574
|
}
|
|
2575
|
-
`,
|
|
2575
|
+
`,co=s.dt.div`
|
|
2576
2576
|
${({theme:e})=>`
|
|
2577
2577
|
display: inline-flex;
|
|
2578
2578
|
font-family: ${e.typography.type.primary};
|
|
@@ -2584,7 +2584,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2584
2584
|
margin-right: ${e.spacing[.5]};
|
|
2585
2585
|
}
|
|
2586
2586
|
`}
|
|
2587
|
-
`,
|
|
2587
|
+
`,po=s.dt.span`
|
|
2588
2588
|
${({theme:e,$variant:i})=>`
|
|
2589
2589
|
border-radius: 6px;
|
|
2590
2590
|
display: inline-block;
|
|
@@ -2607,9 +2607,9 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2607
2607
|
height: calc(100% - ${e.spacing[1]});
|
|
2608
2608
|
}
|
|
2609
2609
|
|
|
2610
|
-
${
|
|
2610
|
+
${oo(e,i)}
|
|
2611
2611
|
`}
|
|
2612
|
-
`,
|
|
2612
|
+
`,go=({button:{disabled:e=!1,text:i,type:n="button",onClick:r},steps:a})=>{const[o,l]=x.useState(1),c=x.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(so,{children:a.map((d,p)=>{const{content:g,title:u,nextAction:f,previousAction:h}=d,y=p+1,m=y===o?"current":"disabled",b=y<o?"completed":m;return t.jsxs(lo,{children:[t.jsx($,{maxWidth:"40px",position:"relative",children:t.jsx(po,{$variant:b,children:b==="completed"?t.jsx(I,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):y})}),t.jsxs($,{ml:1.5,width:"100%",children:[t.jsx(G,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:u}),b==="current"&&t.jsxs($,{children:[g,t.jsxs(co,{children:[o>1&&t.jsx(L,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<a.length?t.jsx(L,{disabled:d.isDisabledNext??!1,onClick:c(1,f),variant:"primary",children:"Next step"}):t.jsx(L,{disabled:e,onClick:r,type:n,variant:"primary",children:i})]})]})]})]},d.title)})})},uo=s.dt.button`
|
|
2613
2613
|
${({theme:e})=>`
|
|
2614
2614
|
align-items: center;
|
|
2615
2615
|
background-color: ${e.palette.white};
|
|
@@ -2651,7 +2651,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2651
2651
|
background-color: ${e.palette.gray[100]};
|
|
2652
2652
|
}
|
|
2653
2653
|
`}
|
|
2654
|
-
`,
|
|
2654
|
+
`,xo={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},fo=({disabled:e=!1,icon:i,id:n,label:r,name:a,onClick:o,type:l="button",variant:c})=>{const d=s.nt(),p=t.jsxs(uo,{"aria-label":a??void 0,className:c,disabled:e,id:n,onClick:o,type:l,children:[t.jsx(I,{clickable:!1,icon:i??xo[c].icon,iconSize:a===void 0?"xxs":"xs",iconType:"fa-light"}),a??void 0]});return t.jsxs($,{alignItems:"center",display:"flex",children:[p,r&&t.jsx(C,{color:d.palette.gray[800],ml:.5,size:"sm",children:r})]})},ho=({items:e})=>t.jsx(jr,{children:e.map(({isActive:i,label:n,onClick:r},a)=>t.jsx(wr,{className:i?"active":"",onClick:r,type:"button",children:t.jsx(G,{color:"inherit",fontWeight:"semibold",size:"sm",sizeSm:"xs",children:n})},`${n}-${a}`))}),bo=s.dt.div`
|
|
2655
2655
|
${({theme:e,$size:i})=>`
|
|
2656
2656
|
align-items: center;
|
|
2657
2657
|
background-color: ${e.palette.white};
|
|
@@ -2674,7 +2674,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2674
2674
|
border: 1px solid ${e.palette.gray[600]};
|
|
2675
2675
|
}
|
|
2676
2676
|
`}
|
|
2677
|
-
`,
|
|
2677
|
+
`,yo=s.dt.div`
|
|
2678
2678
|
${({theme:e,$size:i})=>`
|
|
2679
2679
|
display: ${i==="long"?"flex":"block"};
|
|
2680
2680
|
flex-direction: column;
|
|
@@ -2724,7 +2724,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2724
2724
|
transform: translateX(-50%);
|
|
2725
2725
|
}
|
|
2726
2726
|
`}
|
|
2727
|
-
`,li=({date:e,description:i,title:n,size:r="long"})=>{const a=s.nt();return t.jsxs(
|
|
2727
|
+
`,li=({date:e,description:i,title:n,size:r="long"})=>{const a=s.nt();return t.jsxs(bo,{$size:r,className:"timeline-card",children:[t.jsx(C,{color:a.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:e}),t.jsx(C,{color:a.palette.gray[800],fontWeight:"bold",lineSpacing:1.5,mb:.5,size:"md",textAlign:"center",children:n}),t.jsx("div",{children:i.map((o,l)=>{const c=`${o}#${l}`;return t.jsx(C,{size:"sm",textAlign:"center",wordBreak:"break-word",children:o},c)})})]})},$o=({items:e})=>{const i=x.useRef(null),[n,r]=x.useState("long");return x.useEffect(()=>{i.current&&r(i.current.offsetWidth<=1100?"small":"long")},[]),t.jsx($,{ref:i,width:"100%",children:t.jsx(yo,{$size:n,children:e.map((a,o)=>t.jsx(li,{date:a.date,description:a.description,size:n,title:a.title},`${a.title}-${o}`))})})},mo=s.dt.div`
|
|
2728
2728
|
${({theme:e})=>`
|
|
2729
2729
|
align-items: center;
|
|
2730
2730
|
display: flex;
|
|
@@ -2754,7 +2754,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2754
2754
|
width: 320px;
|
|
2755
2755
|
}
|
|
2756
2756
|
`}
|
|
2757
|
-
|
|
2757
|
+
`,wo=s.dt.button`
|
|
2758
2758
|
${({theme:e})=>`
|
|
2759
2759
|
align-items: center;
|
|
2760
2760
|
background: linear-gradient(
|
|
@@ -2783,4 +2783,4 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2783
2783
|
color: ${e.palette.white};
|
|
2784
2784
|
}
|
|
2785
2785
|
`}
|
|
2786
|
-
`,
|
|
2786
|
+
`,jo=({defaultSelection:e,options:i,handleClick:n})=>{const[r,a]=x.useState(e??i[0]),o=x.useCallback(l=>()=>{a(l),n(l)},[n]);return t.jsx(mo,{children:i.map((l,c)=>t.jsx(wo,{className:`${l.includes(r)&&"selected"}`,onClick:o(l),children:t.jsx(C,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},vo={content:"",disableBeacon:!0,hideCloseButton:!1,locale:{back:"Back",close:"Close",last:"Close",next:"Next",open:"Open the dialog",skip:"Skip"},showSkipButton:!0,styles:{buttonBack:{fontFamily:"roboto"},buttonNext:{fontFamily:"roboto"},buttonSkip:{fontFamily:"roboto"},options:{zIndex:9999},tooltipContainer:{fontFamily:"roboto",textAlign:"left"}},target:""},ko=({run:e,steps:i,onFinish:n})=>{const[r,a]=x.useState(e),[o,l]=x.useState(0),c=x.useCallback(d=>{const{action:p,index:g,status:u,type:f}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(f)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(a(!1),s.lodashExports.isUndefined(n)||n())},[n]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:r,spotlightClicks:!0,stepIndex:o,steps:i,styles:{buttonNext:{display:o===i.length-1?"none":"block"},options:{zIndex:9999}}})};exports.Accordion=Bi;exports.AccordionContent=ut;exports.ActionButton=He;exports.Alert=qi;exports.AppliedFilter=ae;exports.AppliedFilters=Mr;exports.ArrayField=We;exports.Avatar=nn;exports.BaseButtonComponent=Ge;exports.BaseComponent=ye;exports.BaseSpanComponent=Ye;exports.BaseTextComponent=Ue;exports.Button=L;exports.Button$1=ve;exports.ButtonToolbarCenter=In;exports.ButtonToolbarRow=Fn;exports.ButtonToolbarStartRow=Tn;exports.Calendar=wt;exports.Calendar$1=St;exports.Calendar$2=It;exports.CalendarCell=mt;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=on;exports.CardWithInput=Kn;exports.CardWithOptions=Rt;exports.CardWithSelector=ir;exports.CardWithSwitch=ar;exports.Carousel=pr;exports.Checkbox=Ne;exports.CodeSnippet=ur;exports.Col=Ae;exports.ColumFilters=Qt;exports.ColumnsModal=Er;exports.ComboBox=yt;exports.ComboBoxField=Pe;exports.Container=$;exports.CustomThemeProvider=Ni;exports.DateField=vt;exports.DateSelector=le;exports.Description=ri;exports.Dialog=Te;exports.Divider=ie;exports.Editable=zn;exports.EmptyButton=Ve;exports.EmptyState=Zr;exports.FilePreview=ht;exports.FilterControl=Kt;exports.FilterForm=Me;exports.FilterFormContent=Xt;exports.Filters=Ur;exports.FiltersList=Jt;exports.FixedTabs=ho;exports.Form=ea;exports.Gap=En;exports.GridContainer=ia;exports.GroupSelector=ra;exports.Header=Ie;exports.Header$1=Ht;exports.Heading=G;exports.Icon=I;exports.IconButton=W;exports.IndicatorCard=aa;exports.InfoSidebar=oa;exports.InnerForm=Jr;exports.Input=Fe;exports.InputArray=Ln;exports.InputDate=Ct;exports.InputDateRange=zt;exports.InputDateTime=Sn;exports.InputFile=Bn;exports.InputNumber=Ft;exports.InputNumberRange=Nt;exports.InputTags=Hn;exports.Label=qe;exports.Link=J;exports.ListItem=me;exports.ListItemsWrapper=_t;exports.LittleFlag=la;exports.Loading=ha;exports.LocationCode=Wt;exports.Logo=ya;exports.Lottie=ma;exports.MemoizedImage=te;exports.Menu=wa;exports.MenuItem=oi;exports.MessageBanner=va;exports.Modal=ti;exports.ModalConfirm=mr;exports.ModalFooter=Ot;exports.Notification=za;exports.NotificationSign=Mt;exports.NumberField=Ce;exports.NumberInput=Fa;exports.OAuthSelector=Ra;exports.Option=bt;exports.OptionBoxContainer=Je;exports.OptionContainer=_e;exports.OptionContainer$1=ii;exports.OutlineContainer=O;exports.PhoneInput=Yn;exports.PlanCard=La;exports.PopUp=Pa;exports.Popover=$e;exports.PremiumFeature=ai;exports.PreviewPanel=Gt;exports.PriorityScore=Wa;exports.ProgressBar=Va;exports.RadioButton=Xe;exports.RecommendedTag=ni;exports.Row=Tt;exports.ScrollUpButton=Ga;exports.Search=ce;exports.SearchPanel=Yt;exports.SeverityBadge=Ya;exports.SeverityOverview=Ka;exports.SeverityOverviewBadge=oe;exports.ShowOnHover=Za;exports.SlideOutMenu=Qa;exports.Slider=ao;exports.Span=se;exports.StepLapse=go;exports.Tab=Vt;exports.TableButton=fo;exports.Tabs=Ze;exports.Tag=K;exports.TagsField=Oe;exports.Text=C;exports.TextArea=qn;exports.Thumb=si;exports.TimeField=kt;exports.TimeLine=$o;exports.TimeLineCard=li;exports.Toggle=Pt;exports.ToggleButton=jo;exports.Tooltip=U;exports.Tour=ko;exports.baseStep=vo;exports.getOptions=ei;exports.getStyledConfig=be;exports.hiddenProps=pt;exports.icons=Ti;exports.removeFilter=Gr;exports.setBorder=ue;exports.setDisplay=xe;exports.setInteraction=he;exports.setMargin=pe;exports.setPadding=de;exports.setPosition=ge;exports.setText=fe;exports.theme=z;exports.uniqueIcons=Fi;exports.useCarousel=Et;exports.useClickOutside=ne;exports.useCloudinaryImage=Dt;exports.useColumnsModal=Zn;exports.useConfirmDialog=Yr;exports.useDebouncedCallback=Lt;exports.useFilterForm=Zt;exports.useModal=Re;exports.useSearch=Jn;exports.variantBuilder=q;
|