@fluidattacks/design 3.15.6-pr → 3.15.6-pr-01
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/content-card/category-tag/index.js +1 -1
- package/dist/components/content-card/event-date/index.js +1 -1
- package/dist/components/content-card/index.js +1 -1
- package/dist/components/content-card-carousel/index.js +1 -1
- package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/form/types.d.ts +2 -0
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/interactive-card/icon/index.js +1 -1
- package/dist/components/interactive-card/index.js +1 -1
- package/dist/components/language-selector/index.js +1 -1
- package/dist/components/language-selector/item-list/index.js +1 -1
- package/dist/components/layout/categories/buttons/index.js +1 -1
- package/dist/components/layout/categories/column/index.js +1 -1
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/logo-carousel/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/modal/columns-modal/index.js +1 -1
- package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/filters-modal/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.js +1 -1
- package/dist/components/modal/footer/index.js +1 -1
- package/dist/components/modal/header/index.js +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/modal/modal-confirm/index.js +1 -1
- package/dist/components/modal/types.d.ts +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/web-form/index.js +1 -1
- package/dist/{components-Cnu-l9m7.mjs → components--09QFgdl.mjs} +430 -420
- package/dist/{components-B9ryhnfc.js → components-M1NGuUJH.js} +48 -48
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`},Li=e=>e.includes("x")?"overflow-x: auto;":"",Ai=e=>e.includes("y")?"overflow-y: auto;":"",xe=e=>{const i=e.scroll?`
|
|
17
17
|
${Li(e.scroll)}
|
|
18
18
|
${Ai(e.scroll)}
|
|
19
|
-
`:"",n=F("visibility",e.visibility),a=F("display",e.display),r=F("height",e.height),o=F("width",e.width),l=F("max-height",e.maxHeight),c=F("max-width",e.maxWidth),d=F("min-height",e.minHeight),p=F("min-width",e.minWidth),g=F("box-shadow",e.shadow?z.shadows[e.shadow]:void 0),x=F("gap",e.gap===void 0?void 0:z.spacing[e.gap]),f=F("background-color",e.bgColor),h=F("background",e.bgGradient),
|
|
19
|
+
`:"",n=F("visibility",e.visibility),a=F("display",e.display),r=F("height",e.height),o=F("width",e.width),l=F("max-height",e.maxHeight),c=F("max-width",e.maxWidth),d=F("min-height",e.minHeight),p=F("min-width",e.minWidth),g=F("box-shadow",e.shadow?z.shadows[e.shadow]:void 0),x=F("gap",e.gap===void 0?void 0:z.spacing[e.gap]),f=F("background-color",e.bgColor),h=F("background",e.bgGradient),b=F("flex-direction",e.flexDirection),m=F("flex-grow",e.flexGrow),y=F("justify-content",e.justify),w=F("justify-self",e.justifySelf),j=F("align-items",e.alignItems),C=F("align-self",e.alignSelf),k=F("flex-wrap",e.wrap);return`
|
|
20
20
|
${i}
|
|
21
21
|
${n}
|
|
22
22
|
${a}
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
${f}
|
|
31
31
|
${h}
|
|
32
32
|
${x}
|
|
33
|
-
${y}
|
|
34
|
-
${m}
|
|
35
33
|
${b}
|
|
34
|
+
${m}
|
|
35
|
+
${y}
|
|
36
36
|
${w}
|
|
37
37
|
${j}
|
|
38
38
|
${C}
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
111
|
`,$=u.forwardRef(function({as:i="div",center:n,children:a,id:r,onHover:o,onLeave:l,styleMd:c,styleSm:d,...p},g){return t.jsx(Pi,{$center:n,$styleMd:c,$styleSm:d,as:i,id:r,onMouseLeave:l,onMouseOver:o,ref:g,...p,children:a})}),Wi=s.dt(Ue)`
|
|
112
|
-
${({theme:e,$bgGradient:i="unset",$color:n=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:x,$textFill:f="unset",$whiteSpace:h="pre-line",$wordBreak:
|
|
112
|
+
${({theme:e,$bgGradient:i="unset",$color:n=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:x,$textFill:f="unset",$whiteSpace:h="pre-line",$wordBreak:b="normal"})=>`
|
|
113
113
|
background: ${i};
|
|
114
114
|
color: ${n};
|
|
115
115
|
display: ${a};
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
line-height: ${e.spacing[c]};
|
|
121
121
|
width: ${a==="block"?"100%":"auto"};
|
|
122
122
|
white-space: ${h};
|
|
123
|
-
word-break: ${
|
|
123
|
+
word-break: ${b};
|
|
124
124
|
background-clip: text;
|
|
125
125
|
-webkit-background-clip: text;
|
|
126
126
|
-webkit-text-fill-color: ${f};
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
}
|
|
139
139
|
`}
|
|
140
140
|
`,ut=s.dt(Ue)`
|
|
141
|
-
${({theme:e,$bgGradient:i="unset",$color:n=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$letterSpacing:l=0,$lineSpacing:c=1.25,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:x,$textFill:f="unset",$whiteSpace:h="pre-line",$wordBreak:
|
|
141
|
+
${({theme:e,$bgGradient:i="unset",$color:n=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$letterSpacing:l=0,$lineSpacing:c=1.25,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:x,$textFill:f="unset",$whiteSpace:h="pre-line",$wordBreak:b="normal"})=>`
|
|
142
142
|
background: ${i};
|
|
143
143
|
color: ${n};
|
|
144
144
|
display: ${a};
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
line-height: ${e.spacing[c]};
|
|
150
150
|
width: ${a==="block"?"100%":"auto"};
|
|
151
151
|
white-space: ${h};
|
|
152
|
-
word-break: ${
|
|
152
|
+
word-break: ${b};
|
|
153
153
|
background-clip: text;
|
|
154
154
|
-webkit-background-clip: text;
|
|
155
155
|
-webkit-text-fill-color: ${f};
|
|
@@ -178,11 +178,11 @@
|
|
|
178
178
|
|
|
179
179
|
${n===void 0?"":`&::after { content: "${n}"; }`}
|
|
180
180
|
`}
|
|
181
|
-
`,
|
|
181
|
+
`,_=u.forwardRef(function({bgGradient:i,children:n,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:x,sizeMd:f,sizeSm:h,textFill:b,whiteSpace:m,wordBreak:y,...w},j){return t.jsx(Wi,{$bgGradient:i,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:x,$sizeMd:f,$sizeSm:h,$textFill:b,$whiteSpace:m,$wordBreak:y,className:a,ref:j,...w,children:n})}),oe=u.forwardRef(function({children:i,color:n,content:a,display:r,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:x,sizeSm:f,...h},b){return t.jsx(Bi,{$color:n,$content:a,$display:r,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:x,$sizeSm:f,ref:b,...h,children:i})}),v=u.forwardRef(function({bgGradient:i,children:n,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:x,sizeMd:f,sizeSm:h,textFill:b,whiteSpace:m,wordBreak:y,...w},j){return t.jsx(ut,{$bgGradient:i,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:x,$sizeMd:f,$sizeSm:h,$textFill:b,$whiteSpace:m,$wordBreak:y,className:a,ref:j,...w,children:n})}),ft=({item:e})=>{const i=e.description&&typeof e.description=="string"?t.jsx(v,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[i,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},_i={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Oi=s.dt(Ge)`
|
|
182
182
|
${({$clickable:e,$color:i="inherit",$disabled:n=!1,$hoverColor:a,$rotation:r,$size:o,$secondaryColor:l})=>{const c=a?"":"brightness(50%)",d=a??"";return`
|
|
183
183
|
color: ${i};
|
|
184
184
|
cursor: ${e?"pointer":"inherit"};
|
|
185
|
-
font-size: ${
|
|
185
|
+
font-size: ${_i[o]};
|
|
186
186
|
line-height: 0;
|
|
187
187
|
vertical-align: middle;
|
|
188
188
|
pointer-events: inherit;
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
&:hover:not([disabled]) {
|
|
215
215
|
transform: scale(1.2);
|
|
216
216
|
}
|
|
217
|
-
`;const S=u.forwardRef(function({clickable:i,disabled:n,hoverColor:a,icon:r,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:x,rotation:f,spanClass:h,secondaryColor:
|
|
217
|
+
`;const S=u.forwardRef(function({clickable:i,disabled:n,hoverColor:a,icon:r,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:x,rotation:f,spanClass:h,secondaryColor:b,...m},y){return t.jsx(Oi,{$clickable:i,$color:l,$disabled:n,$hoverColor:a,$rotation:f,$secondaryColor:b,$size:d,className:h,"data-testid":`${r}-icon`,onClick:x,ref:y,...m,children:t.jsx("i",{className:`${g} fa-${r} ${o}`,...c!==void 0?{"data-fa-mask":c}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${r}`)}),Mi=u.forwardRef(function({aligned:i="end",items:n,bgColor:a},r){const o=s.nt(),[l,c]=u.useState(!1),[d,p]=u.useState(-1),g=u.useCallback(x=>()=>{p(x),c(x===d?f=>!f:!0)},[d]);return t.jsx($,{ref:r,children:n.map((x,f)=>{const h=f===d&&l;return t.jsxs($,{bgColor:a??o.palette.white,children:[t.jsx($,{"aria-controls":`panel-${x.title}`,"aria-expanded":l,"aria-label":x.title,as:"button",bgColor:a??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(v,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:x.title}),t.jsx(S,{icon:h?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),h&&t.jsx(ft,{item:x})]},x.title)})})}),Hi=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:Vi}=U(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]};
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
width: max-content;
|
|
415
415
|
z-index: 999999;
|
|
416
416
|
`}
|
|
417
|
-
`,V=({children:e,disabled:i=!1,display:n="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:x="",title:f="",hide:h=x===""&&f===""&&p===void 0,width:
|
|
417
|
+
`,V=({children:e,disabled:i=!1,display:n="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:x="",title:f="",hide:h=x===""&&f===""&&p===void 0,width:b})=>{const m=s.nt(),[y,w]=u.useState(!1),{refs:j,floatingStyles:C,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:w,open:y,placement:g,whileElementsMounted:s.autoUpdate}),T=s.useHover(k,{delay:{close:0,open:500},move:!1}),I=s.useFocus(k),N=s.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:E,getFloatingProps:P}=s.useInteractions([T,I,N]);return i?t.jsx(u.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Ki,{...E(),display:n,height:a,id:c,ref:j.setReference,width:b,children:r?t.jsx(S,{clickable:!0,disabled:i,icon:r,iconColor:o,iconSize:l??"xxs",iconType:y?"fa-solid":"fa-light"}):e}),y&&!h&&X.createPortal(t.jsxs(Xi,{...P(),$maxWidth:d,id:`floating-${c}`,ref:j.setFloating,style:C,children:[s.lodashExports.isEmpty(f)?void 0:t.jsx(v,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),s.lodashExports.isEmpty(x)?void 0:t.jsx(v,{color:m.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},B=u.forwardRef(function({borderRadius:i,disabled:n,icon:a,iconColor:r,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:x,py:f,type:h="button",tooltip:b,tooltipPlace:m,value:y,variant:w="primary",...j},C){const k=t.jsx(qi,{$borderRadius:i,$px:x,$py:f,$variant:w,"aria-disabled":n,"aria-label":d,borderRadius:i,disabled:n,id:d,justify:p,onClick:g,ref:C,type:h,value:y,...j,children:t.jsx(S,{clickable:!1,icon:a,iconColor:r,iconSize:o,iconTransform:l,iconType:c})}),I=(h+(w??"")+(d??a)).replace(/ /u,"_");return b===void 0?k:t.jsx(V,{id:`${I}-tooltip`,place:m,tip:b,children:k})}),Zi=u.forwardRef(function({autoHide:i=!1,children:n,closable:a=!1,onTimeOut:r,show:o=!0,time:l=8,variant:c="error",id:d,...p},g){const[x,f]=u.useState(o),h=u.useCallback(()=>{f(!1)},[]);return u.useEffect(()=>{const b=setTimeout(()=>{r==null||r(!0),i&&h()},l*1e3);return()=>{clearTimeout(b)}},[i,h,l,r]),u.useEffect(()=>{f(o)},[o,f]),t.jsx($,{display:x?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(Ui,{$variant:c,id:d,children:[t.jsx(S,{clickable:!1,icon:Hi(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(Gi,{children:n}),a?t.jsx(B,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),it=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
|
${bt}
|
|
633
633
|
`,an=s.dt(De.Link)`
|
|
634
634
|
${bt}
|
|
635
|
-
`,Z=({children:e,color:i,download:n,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(S,{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(nn,{$color:i,$variant:c,download:n,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(an,{$variant:c,download:n,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},G=({disabled:e,icon:i,iconColor:n="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:x="",tagLabel:f,variant:h="default"})=>{const
|
|
635
|
+
`,Z=({children:e,color:i,download:n,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(S,{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(nn,{$color:i,$variant:c,download:n,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(an,{$variant:c,download:n,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},G=({disabled:e,icon:i,iconColor:n="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:x="",tagLabel:f,variant:h="default"})=>{const b=f.length>25&&s.lodashExports.isEmpty(x+o),m=`${f.slice(0,25)}...`;return t.jsxs(oe,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(en,{$fontSize:l,$variant:h,className:g,children:[i&&t.jsx(S,{icon:i,iconColor:n,iconSize:"xxs",iconType:a}),t.jsxs("span",{children:[t.jsx("strong",{children:x}),t.jsx("span",{children:b?m:f}),t.jsx("strong",{children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(Z,{href:c,children:d})]})},rn=(e,i=!0)=>{const n=window.open(e,i?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(n)&&(n.opener=null)},R=u.forwardRef(function({children:i,disabled:n=!1,external:a=!1,fontSize:r,href:o,id:l,icon:c,name:d,onClick:p,showArrow:g=!1,tag:x,type:f="button",tooltip:h,tooltipPlace:b="bottom",underline:m=!1,value:y,variant:w="primary",width:j,...C},k){const T=h!==void 0,I=`${l}-tooltip`,N=u.useCallback(()=>{o&&rn(o,a)},[a,o]),E=t.jsxs(ht,{$size:r,$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:y,width:j,...T?{"data-tooltip-id":I}:{},...C,children:[c!==void 0&&t.jsx(S,{icon:c,iconSize:"xs",iconType:"fa-light"}),i,(g||w==="link")&&t.jsx(S,{icon:"arrow-right",iconSize:"xs",iconType:"fa-light"}),x===void 0?null:t.jsx(G,{tagLabel:x,variant:"inactive"})]});return T?t.jsx(V,{disabled:!T,id:I,place:b,tip:h,width:j,children:E}):E}),on=u.forwardRef(function({children:i,onClick:n,userName:a,showIcon:r=!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(R,{onClick:n,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(it,{children:a[0].toUpperCase()}),o?t.jsx(v,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:a.split(" ")[0]}):void 0,r?t.jsx(S,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(it,{children:a[0].toUpperCase()}),o?t.jsxs(v,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",a.split(" ")[0],"!"]}):void 0,r?t.jsx(S,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(Ji,{children:i})]})})}),Se=({authorEmail:e,date:i,description:n,descriptionColor:a,id:r,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(v,{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(v,{color:a??g.palette.gray[800],fontWeight:n===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:n}),i&&t.jsx(v,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${i.split(" ")[0]}`}),e&&t.jsx(v,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(V,{icon:"circle-info",id:r,tip:p})]})]})},nt=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
|
-
`,sn=e=>{if(s._.isNil(e))return"";const i=e.split(".");return(i.length>1?s._.last(i):"").toLowerCase()},ln=(e,i)=>s._.isUndefined(i)?!1:s._.includes(e,sn(i)),yt=({alt:e,fileType:i,width:n="100%",opacity:a=0,src:r,height:o="auto"})=>i==="video"||ln(["webm"],r)?t.jsx(nt,{$opacity:a,children:t.jsxs("video",{controls:!0,muted:!0,style:{height:o,width:n},children:[t.jsx("source",{src:r,type:"video/webm"}),t.jsx(Z,{href:r,iconPosition:"hidden",children:r})]})}):t.jsx(nt,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:n}})}),cn=({alt:e,authorEmail:i,date:n,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:x=!0})=>{const f=s.nt(),[h,
|
|
650
|
+
`,sn=e=>{if(s._.isNil(e))return"";const i=e.split(".");return(i.length>1?s._.last(i):"").toLowerCase()},ln=(e,i)=>s._.isUndefined(i)?!1:s._.includes(e,sn(i)),yt=({alt:e,fileType:i,width:n="100%",opacity:a=0,src:r,height:o="auto"})=>i==="video"||ln(["webm"],r)?t.jsx(nt,{$opacity:a,children:t.jsxs("video",{controls:!0,muted:!0,style:{height:o,width:n},children:[t.jsx("source",{src:r,type:"video/webm"}),t.jsx(Z,{href:r,iconPosition:"hidden",children:r})]})}):t.jsx(nt,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:n}})}),cn=({alt:e,authorEmail:i,date:n,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:x=!0})=>{const f=s.nt(),[h,b]=u.useState(!1),m=u.useCallback(()=>{b(!0)},[]),y=u.useCallback(()=>{b(!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:y,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(u.Fragment,{children:[t.jsx(yt,{alt:e,fileType:g,height:"147px",opacity:h?.3:0,src:r,width:"100%"}),x?t.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(B,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),p?null:t.jsx(Se,{authorEmail:i,date:n,description:a,descriptionColor:f.palette.gray[600],id:`${e}-card-header`,title:d})]})},dn=s.dt.div`
|
|
651
651
|
${({theme:e,$align:i="center",$minWidth:n="auto",$minHeight:a="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:a="Link here",helpText:r,htmlFor:o,label:l,linkPosition:c="down",maxLength:d,required:p,tooltip:g,value:x,weight:f})=>{const h=s.nt(),b=x?x.length:0;return t.jsxs(pn,{children:[l===void 0?void 0:t.jsx(Ye,{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(v,{className:"error-msg",color:h.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:i}),d&&t.jsx(G,{priority:"low",tagLabel:`${b}/${d}`,variant:"error"})]}):void 0,r||n?t.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[r&&t.jsxs(t.Fragment,{children:[t.jsx(S,{icon:"circle-info",iconColor:h.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(v,{color:h.palette.gray[400],display:"inline-block",size:"sm",children:r})]}),n&&c==="down"?t.jsx(Z,{href:n,children:a}):void 0]}):void 0]})},ye=({className:e,children:i,isFilter:n=!1,popoverRef:a,state:r,triggerRef:o,...l})=>{var x;const c=u.useRef(null),d=(x=o==null?void 0:o.current)==null?void 0:x.getBoundingClientRect(),{popoverProps:p}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:a??c,triggerRef:o,isNonModal:a?!0:void 0},r),g=u.useCallback(f=>{f.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,onPointerDown:n?g:void 0,ref:a??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:i})})},gn=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
|
-
`,$t=({item:e,state:i})=>{const n=s.nt(),a=u.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},i,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(xn,{...r,className:d,ref:a,children:[t.jsx(v,{color:n.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(S,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Le=({field:e,disabled:i=!1,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:x,placeholder:f,required:h,tooltip:
|
|
862
|
+
`,$t=({item:e,state:i})=>{const n=s.nt(),a=u.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},i,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(xn,{...r,className:d,ref:a,children:[t.jsx(v,{color:n.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(S,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Le=({field:e,disabled:i=!1,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:x,placeholder:f,required:h,tooltip:b,value:m,weight:y})=>{var tt;const w=s.nt(),j=i?void 0:n,C=(e==null?void 0:e.value)??m,[k,T]=u.useState(((tt=p.find(A=>A.value===C))==null?void 0:tt.name)??""),[I,N]=u.useState(C),[E,P]=u.useState(p),[D,L]=u.useState(!1),{contains:q}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),Q=u.useRef(null),ie=u.useRef(null),W=u.useRef(null),M=u.useRef(null),ee=u.useRef(null),Re=u.useMemo(()=>p.map(A=>q(A.name,k)||D?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:A.name},A.value):null),[q,k,p,D]),gi=u.useCallback(A=>{T(A),A===""?L(!0):(L(!1),N(H=>{const we=A===""?"":H;return e&&e.onChange(we),x&&x(A),we}),P(p.filter(H=>q(H.name,A))))},[q,p,e,x]),xi=u.useCallback(A=>{var H;T(((H=p.find(we=>we.value===A))==null?void 0:H.name)??""),N(A?String(A):""),e&&e.onChange(A),x&&x(A?String(A):""),P(p)},[p,e,x]),et=u.useCallback(A=>{A.key==="Enter"&&A.preventDefault(),L(!1)},[]),ui=u.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),K=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:k,items:E,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:I,onBlur:ui,onInputChange:gi,onKeyDown:et,onKeyUp:()=>{L(!0)},onOpenChange(A,H){L(A&&(H==="manual"||H==="focus"))},onSelectionChange:xi,children:Re}),{buttonProps:fi,inputProps:hi,listBoxProps:bi}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:k,buttonRef:ie,id:d,inputRef:Q,label:l??d,listBoxRef:W,name:d,placeholder:f,popoverRef:ee},K),{listBoxProps:yi}=s.$c132121280ec012d$export$50eacbbf140a3141(bi,K,W),{buttonProps:$i}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(fi,ie);return u.useEffect(()=>{var A;(c===!1||!C)&&T(((A=p.find(H=>H.value===C))==null?void 0:A.name)??"")},[C,p,c]),t.jsxs(O,{error:j,helpLink:a,helpLinkText:r,helpText:o,htmlFor:d,label:l,required:h,tooltip:b,weight:y,children:[t.jsxs(J,{className:`${i?"disabled":""} ${j?"error":""}`,ref:M,children:[t.jsx("input",{...hi,"aria-invalid":j?"true":"false","aria-label":d,onKeyDown:et,ref:Q}),j?t.jsx(S,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}):void 0,t.jsx(B,{...$i,className:"action",icon:K.isOpen?"chevron-up":"chevron-down",iconColor:w.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:ie,type:"button",variant:"ghost"})]}),K.isOpen&&K.collection.size>0&&!i?t.jsx(ye,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:ee,state:K,triggerRef:M,children:t.jsx(gn,{...yi,ref:W,children:[...K.collection].map(A=>t.jsx($t,{item:A,state:K},A.key))})}):null]})},mt=({control:e,disabled:i=!1,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:x,placeholder:f,required:h,tooltip:b,value:m,weight:y})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:w,fieldState:j})=>{var C;return t.jsx(Le,{disabled:i,error:(C=j.error)==null?void 0:C.message,field:w,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:x,placeholder:f,required:h,tooltip:b,value:m,weight:y})},rules:{required:h}}):t.jsx(Le,{disabled:i,error:n,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:x,placeholder:f,required:h,tooltip:b,value:m,weight:y}),un=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 a=u.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(n,a);return t.jsx(wn,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:i==="calendar"||i==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(S,{icon:i,iconColor:z.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:i,nextButtonProps:n,title:a})=>{const r=e.focusedDate,o=u.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=u.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:i}),t.jsxs(un,{children:[a,t.jsxs(fn,{children:[t.jsx(rt,{"aria-label":"top",onClick:o,children:t.jsx(S,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(rt,{"aria-label":"bottom",onClick:l,children:t.jsx(S,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(ve,{icon:"chevron-right",props:n})]})},vt=({onClose:e,props:i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:n}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(ze,{state:a}),t.jsx(qe,{children:t.jsx(R,{onClick:e,variant:"ghost",children:"Cancel"})})]})},kt=({segment:e,state:i})=>{const n=s.nt(),a=u.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,i,a),c=n.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?n.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},Ct=({disabled:e,error:i=!1,props:n})=>{const a=s.nt(),r=u.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(n,o,r),c=u.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(x=>x.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs(jn,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:a.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(kt,{segment:{...d,isEditable:!e},state:o},g)})}),i?t.jsx(S,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},St=e=>{const i=u.useRef(null),n=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=n,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=u.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,n,i),d=u.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(a)||(g==="AM"?n.setSegment("dayPeriod",0):g==="PM"&&n.setSegment("dayPeriod",12))),l(g)},[o,n,a]);return t.jsxs(vn,{children:[t.jsx(ot,{...c,ref:i,children:n.segments.slice(0,-2).map((p,g)=>{const x=`key_${g}`;return t.jsx(kt,{segment:p,state:n},x)})}),t.jsxs(ot,{children:[t.jsx(st,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(st,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",kn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",Cn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",se=({error:e,buttonProps:i,datePickerRef:n,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:x})=>{const f=u.useCallback(h=>{const
|
|
1094
|
+
`,ve=({disabled:e=!1,icon:i,props:n})=>{const a=u.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(n,a);return t.jsx(wn,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:i==="calendar"||i==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(S,{icon:i,iconColor:z.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:i,nextButtonProps:n,title:a})=>{const r=e.focusedDate,o=u.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=u.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:i}),t.jsxs(un,{children:[a,t.jsxs(fn,{children:[t.jsx(rt,{"aria-label":"top",onClick:o,children:t.jsx(S,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(rt,{"aria-label":"bottom",onClick:l,children:t.jsx(S,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(ve,{icon:"chevron-right",props:n})]})},vt=({onClose:e,props:i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:n}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(ze,{state:a}),t.jsx(qe,{children:t.jsx(R,{onClick:e,variant:"ghost",children:"Cancel"})})]})},kt=({segment:e,state:i})=>{const n=s.nt(),a=u.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,i,a),c=n.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?n.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},Ct=({disabled:e,error:i=!1,props:n})=>{const a=s.nt(),r=u.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(n,o,r),c=u.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(x=>x.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs(jn,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:a.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(kt,{segment:{...d,isEditable:!e},state:o},g)})}),i?t.jsx(S,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},St=e=>{const i=u.useRef(null),n=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=n,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=u.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,n,i),d=u.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(a)||(g==="AM"?n.setSegment("dayPeriod",0):g==="PM"&&n.setSegment("dayPeriod",12))),l(g)},[o,n,a]);return t.jsxs(vn,{children:[t.jsx(ot,{...c,ref:i,children:n.segments.slice(0,-2).map((p,g)=>{const x=`key_${g}`;return t.jsx(kt,{segment:p,state:n},x)})}),t.jsxs(ot,{children:[t.jsx(st,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(st,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",kn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",Cn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",se=({error:e,buttonProps:i,datePickerRef:n,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:x})=>{const f=u.useCallback(h=>{const b=r==="day"?ke(String(h)):kn(String(h));o.onChange&&o.onChange(h??null),g&&g(c,b)},[o,r,c,g]);return t.jsxs(J,{...l,className:`${a?"disabled":""} ${e?"error":""}`,ref:n,children:[t.jsx(Ct,{disabled:a,error:e!=null,props:{...o,autoFocus:!1,granularity:r,onChange:f,shouldForceLeadingZeros:!0}}),t.jsx(ve,{disabled:a,icon:r==="minute"?"calendar-clock":"calendar",props:i}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:a,id:c,name:c,type:"text",value:x??""})]})},Te=({children:e,...i})=>{const n=u.useRef(null),{dialogProps:a}=s.$40df3f8667284809$export$d55e7ee900f34e93(i,n);return t.jsx(mn,{...a,ref:n,children:e})},zt=({disabled:e=!1,error:i,helpLink:n,helpLinkText:a,helpText:r,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:x,...f})=>{const h=u.useRef(null),b=x==null?void 0:x(c),m=u.useCallback(N=>{p&&N&&p(c,ke(String(N)))},[c,p]),y=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,onChange(N){m(N)},value:s._.isNil(b)||s._.isEmpty(b)||b==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}),{close:w}=y,{groupProps:j,fieldProps:C,buttonProps:k,dialogProps:T,calendarProps:I}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":l??c,name:c},y,h);return t.jsxs(O,{error:i,helpLink:n,helpLinkText:a,helpText:r,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(se,{buttonProps:k,datePickerRef:h,disabled:e,error:i,fieldProps:C,groupProps:j,name:c,register:d,required:o,setValue:p,value:b}),y.isOpen&&!e?t.jsx(ye,{offset:8,placement:"bottom start",state:y,triggerRef:h,children:t.jsx(Te,{...T,children:t.jsx(vt,{onClose:w,props:I})})}):null]})},It=({onClose:e,props:i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=u.useRef(null),r=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:n}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(i,r,a);return t.jsxs("div",{className:"calendar-range",ref:a,children:[t.jsx(Ie,{nextButtonProps:l,prevButtonProps:o,state:r,title:c}),t.jsx(ze,{state:r}),t.jsx(qe,{children:t.jsx(R,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Sn=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
|
-
`,Tt=({disabled:e=!1,error:i,label:n,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...x})=>{const f=`${a}Max`,h=`${a}Min`,
|
|
1105
|
+
`,Tt=({disabled:e=!1,error:i,label:n,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...x})=>{const f=`${a}Max`,h=`${a}Min`,b=u.useRef(null),m=u.useCallback(E=>{c&&E&&(c((d==null?void 0:d.name)??f,ke(String(E.end))),c((p==null?void 0:p.name)??h,ke(String(E.start))))},[f,h,c,d,p]),y=s.$93c38a5e28be6249$export$e50a61c1de9f574({...x,endName:(d==null?void 0:d.name)??f,startName:(p==null?void 0:p.name)??h,onChange(E){m(E)}}),{close:w}=y,{groupProps:j,startFieldProps:C,endFieldProps:k,buttonProps:T,dialogProps:I,calendarProps:N}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...x,"aria-label":n??a},y,b);return t.jsxs(O,{error:i,htmlFor:a,label:n,required:r,tooltip:o,children:[t.jsxs(Sn,{$disabled:e,$show:i!==void 0,ref:b,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(se,{buttonProps:T,datePickerRef:b,disabled:e,error:i,fieldProps:{...C,"aria-label":`${C["aria-label"]} ${a}`,validate:E=>k.value&&E>k.value?"Start date must be less than or equal to end date":null},groupProps:j,name:(p==null?void 0:p.name)??h,register:l,setValue:c,value:p==null?void 0:p.value}),t.jsx(se,{buttonProps:T,datePickerRef:b,disabled:e,error:i,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${a}`,validate:E=>C.value&&E<C.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})]}),y.isOpen&&!e?t.jsx(ye,{offset:8,placement:"bottom start",state:y,triggerRef:b,children:t.jsx(Te,{...I,children:t.jsx(It,{onClose:w,props:N})})}):null]})},zn=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
|
-
`,Ft=({handleTimeChange:e,onClose:i,props:n,timeState:a})=>{const r=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(zn,{children:[t.jsx(v,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(In,{children:t.jsx(St,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(qe,{children:t.jsx(R,{onClick:i,variant:"ghost",children:"Cancel"})})]})},Tn=e=>{const{disabled:i=!1,error:n,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),x=u.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:i,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(g.replace(/\//gu,"-"))}),{close:h}=f,{groupProps:
|
|
1120
|
+
`,Ft=({handleTimeChange:e,onClose:i,props:n,timeState:a})=>{const r=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(zn,{children:[t.jsx(v,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(In,{children:t.jsx(St,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(qe,{children:t.jsx(R,{onClick:i,variant:"ghost",children:"Cancel"})})]})},Tn=e=>{const{disabled:i=!1,error:n,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),x=u.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:i,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(g.replace(/\//gu,"-"))}),{close:h}=f,{groupProps:b,fieldProps:m,buttonProps:y,dialogProps:w,calendarProps:j}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,x),C=u.useCallback(T=>{j.onChange&&j.onChange(T),d==null||d(o,Cn(String(T).replace(/-/gu,"/")))},[j,o,d]),k=u.useCallback(T=>{T&&f.setTimeValue(T)},[f]);return t.jsxs(O,{error:n,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(se,{buttonProps:y,datePickerRef:x,disabled:i,error:n,fieldProps:m,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:g}),f.isOpen&&!i?t.jsx(ye,{offset:8,placement:"bottom start",state:f,triggerRef:x,children:t.jsx(Te,{...w,children:t.jsx(Ft,{handleTimeChange:k,onClose:h,props:{...j,onChange:C},timeState:f})})}):null]})},Fn=({children:e,currentValue:i,externalLink:n,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(i)?"":i,d=String(n??c);return t.jsxs($,{children:[t.jsx(Ye,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Z,{href:d,children:c}):t.jsx(v,{size:"md",children:c})]})},Ke=({disabled:e=!1,hasIcon:i=!1,helpLink:n,helpLinkText:a,helpText:r,error:o,isValid:l,isTouched:c,label:d,linkPosition:p,name:g,maskValue:x=!1,onPaste:f,placeholder:h,register:b,suggestions:m,tooltip:y,type:w="text",weight:j,...C})=>{const{required:k,onBlur:T,onChange:I}=C,N=s.nt(),E=e?void 0:o,P=l&&c&&!e,D=u.useCallback(L=>{L.key==="Enter"&&L.preventDefault()},[]);return t.jsxs(O,{error:E,helpLink:n,helpLinkText:a,helpText:r,htmlFor:g,label:d,linkPosition:p,required:k,tooltip:y,weight:j,children:[t.jsxs(J,{className:`
|
|
1121
1121
|
${e?"disabled":""} ${E?"error":""} ${P?"success":""}
|
|
1122
|
-
`,children:[i?t.jsx(S,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":E?"true":"false","aria-label":g,"aria-required":k,autoComplete:"off",className:x?"sr-block":"","data-testid":`${g}-input`,disabled:e,id:g,list:m?`list_${g}`:void 0,onKeyDown:D,onPaste:f,placeholder:h,type:w,...
|
|
1122
|
+
`,children:[i?t.jsx(S,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":E?"true":"false","aria-label":g,"aria-required":k,autoComplete:"off",className:x?"sr-block":"","data-testid":`${g}-input`,disabled:e,id:g,list:m?`list_${g}`:void 0,onKeyDown:D,onPaste:f,placeholder:h,type:w,...b?b(g,{required:k,onBlur:T,onChange:I}):{...C}}),E?t.jsx(S,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:N.palette.error[500],iconSize:"xs"}):void 0,P?t.jsx(S,{icon:"check-circle",iconClass:"success-icon",iconColor:N.palette.success[500],iconSize:"xs"}):void 0]}),m?t.jsx("datalist",{id:`list_${g}`,children:m.map(L=>t.jsx("option",{value:L},L))}):void 0]})},Nn=s.dt(ut)`
|
|
1123
1123
|
white-space: nowrap;
|
|
1124
1124
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1125
1125
|
text-overflow: ellipsis;
|
|
@@ -1130,13 +1130,13 @@
|
|
|
1130
1130
|
position: absolute;
|
|
1131
1131
|
visibility: hidden;
|
|
1132
1132
|
width: 0;
|
|
1133
|
-
`,Ae=(e,i,n)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:i,value:n}}),a},Rn=e=>{const i=e;return i?Array.from(i).map(n=>n.name).join(", "):""},Dn=({accept:e,disabled:i=!1,error:n,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:x,setValue:f,tooltip:h,watch:
|
|
1133
|
+
`,Ae=(e,i,n)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:i,value:n}}),a},Rn=e=>{const i=e;return i?Array.from(i).map(n=>n.name).join(", "):""},Dn=({accept:e,disabled:i=!1,error:n,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:x,setValue:f,tooltip:h,watch:b,weight:m})=>{const y=s.nt(),w=i?void 0:n,j=u.useRef(null),C=b==null?void 0:b(d),k=Rn(C),T=x==null?void 0:x(d,{required:g}),I=u.useCallback(()=>{const P=Ae("change",d,void 0);f&&f(d,""),T&&T.onChange(P)},[T,d,f]),N=u.useCallback(P=>{const{files:D}=P.currentTarget,L=Ae("change",d,D&&D.length>0?D:void 0);p==null||p(L),T&&T.onChange(L)},[T,d,p]),E=u.useCallback(P=>{i?P.preventDefault():j.current&&j.current.click()},[i]);return t.jsxs(O,{error:w,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:g,tooltip:h,weight:m,children:[t.jsxs(J,{className:`${i?"disabled":""} ${w?"error":""}`,children:[t.jsx(Nn,{$size:"xs",children:k}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(k)?void 0:t.jsx(B,{color:y.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:I,variant:"ghost",width:"20px"}),w&&t.jsx(S,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}),t.jsxs(R,{border:i?`1px solid ${y.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:i,height:"40px",onClick:E,variant:"primary",width:"96px",children:[t.jsx(S,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(En,{...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:I,ref:j,required:void 0,type:"file",value:void 0})]})},Ln=s.dt.input`
|
|
1134
1134
|
border: none;
|
|
1135
1135
|
background: transparent;
|
|
1136
1136
|
min-width: 15rem;
|
|
1137
1137
|
padding: 0;
|
|
1138
1138
|
flex: 1;
|
|
1139
|
-
`,Pe=({disabled:e=!1,error:i,field:n,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:f,value:h,weight:
|
|
1139
|
+
`,Pe=({disabled:e=!1,error:i,field:n,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:f,value:h,weight:b})=>{const m=s.nt(),y=e?void 0:i,[w,j]=u.useState(""),C=d?h:n==null?void 0:n.value,k=u.useMemo(()=>C&&typeof C=="string"?C.split(",").filter(Boolean):[],[C]),T=u.useCallback(D=>{const q=[...new Set(D.filter(Boolean))].join(","),Q=Ae("change",c,q);n&&n.onChange(Q),d&&d(Q)},[n,c,d]),I=u.useCallback(D=>{j(D.target.value)},[]),N=u.useCallback(D=>{const L=w.trim();L.length&&!k.includes(L)&&(D.preventDefault(),T([...k,L]),j("")),n&&n.onBlur()},[w,n,T,k]),E=u.useCallback(D=>{const L=w.trim();D.key==="Enter"&&L.length===0&&D.preventDefault(),["Enter",","].includes(D.key)&&L.length>0&&!k.includes(L)?(D.preventDefault(),T([...k,L]),j("")):D.key==="Backspace"&&!L.length&&k.length&&(D.preventDefault(),p==null||p(k[k.length-1]),T(k.slice(0,-1)))},[w,p,T,k]),P=u.useCallback(D=>()=>{p==null||p(D),T(k.filter(L=>L!==D))},[p,T,k]);return t.jsx(O,{error:y,helpLink:a,helpLinkText:r,helpText:o,htmlFor:c,label:l,required:x,tooltip:f,weight:b,children:t.jsxs(J,{$overflowX:"auto",className:`${e?"disabled":""} ${y?"error":""}`,children:[k.map(D=>t.jsx(G,{disabled:e,onClose:P(D),tagLabel:D},D)),t.jsx(Ln,{"aria-hidden":!1,"aria-invalid":y?"true":"false","aria-label":c,"aria-required":x,autoComplete:"off",id:c,onBlur:N,onChange:I,onKeyDown:E,placeholder:k.length===0?g:void 0,ref:n==null?void 0:n.ref,type:"text",value:w}),y?t.jsx(S,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}):void 0]})})},An=({disabled:e=!1,control:i,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:f,value:h,weight:b})=>i?t.jsx(s.Controller,{control:i,name:c,render:({field:m})=>t.jsx(Pe,{disabled:e,error:n,field:m,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:x,tooltip:f,weight:b}),rules:{required:x}}):t.jsx(Pe,{disabled:e,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:x,tooltip:f,value:h,weight:b}),We=u.forwardRef(function({disabled:i,icon:n,margin:a,onClick:r,...o},l){return t.jsx($n,{$margin:a,"aria-label":n,className:"action-btn",disabled:i,onClick:r,ref:l,type:"button",...o,children:t.jsx(S,{icon:n,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Ce=({error:e,decimalPlaces:i=0,disabled:n=!1,id:a,maxLength:r,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:x,setValue:f,value:h})=>{const b=s.nt(),m=n?void 0:e,y=i<0?0:i,[w,j]=u.useState(h?s._.toNumber(h):0),C=u.useCallback(()=>{const N=(w-10**-y).toFixed(y),E=Math.max(Number(l),Number(N));f&&f(c,E,{shouldDirty:!0}),j(E)},[y,w,l,c,f]),k=u.useCallback(()=>{const N=(w+10**-y).toFixed(y),E=Math.min(Number(o),Number(N)>Number(l)?Number(N):Number(l));f&&f(c,E,{shouldDirty:!0}),j(E)},[y,w,o,l,c,f]),T=u.useCallback(N=>{const{value:E}=N.target,P=/\d+/u.test(E)&&!s._.isEmpty(E);f&&f(c,P?E:void 0),d&&d(N),j(Number(E))},[c,d,f]),I=u.useCallback(N=>{N.key==="Enter"&&N.preventDefault()},[]);return t.jsxs(J,{className:`${n?"disabled":""} ${m?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":x,autoComplete:"off",disabled:n,id:a??c,max:o,min:l,onKeyDown:I,placeholder:p,required:x,step:10**-y,type:"number",...g==null?void 0:g(c,{maxLength:r,max:o,min:l,onChange:T,value:h,valueAsNumber:!0})}),m&&t.jsx(S,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsx(We,{borderLeft:"inherit",borderRight:"inherit",disabled:n,icon:"minus",margin:"0 -0.625rem 0 0",onClick:C,px:.75,py:.75}),t.jsx(We,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:n,icon:"plus",onClick:k,px:.75,py:.75})]})},Nt=({decimalPlaces:e,disabled:i=!1,error:n,helpLink:a,helpText:r,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:x,onChange:f,placeholder:h,register:b,required:m,setValue:y,tooltip:w,value:j,watch:C,weight:k})=>t.jsx(O,{error:i?void 0:n,helpLink:a,helpText:r,htmlFor:x,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:x,onChange:f,placeholder:h,register:b,required:m,setValue:y,value:f?j:C==null?void 0:C(x)})}),Et=({disabled:e=!1,error:i,name:n,label:a,propsMax:r,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:a,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,{...r,disabled:e,error:i,name:r.name??p})]})})},Pn=s.dt.div`
|
|
1140
1140
|
${({theme:e})=>`
|
|
1141
1141
|
align-items: flex-start;
|
|
1142
1142
|
align-self: stretch;
|
|
@@ -1206,7 +1206,7 @@
|
|
|
1206
1206
|
scrollbar-width: thin;
|
|
1207
1207
|
width: max-content;
|
|
1208
1208
|
`}
|
|
1209
|
-
`,
|
|
1209
|
+
`,_n=s.dt.li`
|
|
1210
1210
|
${({theme:e})=>`
|
|
1211
1211
|
align-items: center;
|
|
1212
1212
|
background: ${e.palette.white};
|
|
@@ -1223,16 +1223,16 @@
|
|
|
1223
1223
|
background: ${e.palette.gray[100]};
|
|
1224
1224
|
}
|
|
1225
1225
|
`}
|
|
1226
|
-
`,
|
|
1226
|
+
`,On=s.dt.p`
|
|
1227
1227
|
color: ${({theme:e})=>e.palette.gray[800]};
|
|
1228
1228
|
font-size: inherit;
|
|
1229
1229
|
min-width: 55%;
|
|
1230
1230
|
overflow: hidden;
|
|
1231
1231
|
text-overflow: ellipsis;
|
|
1232
1232
|
white-space: nowrap;
|
|
1233
|
-
`,$e=(e,i,n=!1)=>{u.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&i()};return n?(document.addEventListener("click",a,!0),()=>{document.removeEventListener("click",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("click",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("click",a,!0)})},[n,e,i])},Mn=({disabled:e,error:i,label:n,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const x=s.nt(),f=u.useRef(null),h=e?void 0:i,
|
|
1233
|
+
`,$e=(e,i,n=!1)=>{u.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&i()};return n?(document.addEventListener("click",a,!0),()=>{document.removeEventListener("click",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("click",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("click",a,!0)})},[n,e,i])},Mn=({disabled:e,error:i,label:n,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const x=s.nt(),f=u.useRef(null),h=e?void 0:i,b=(p==null?void 0:p(a))??d,[m,y]=u.useState(!1),[w,j]=u.useState(""),{refs:C,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:T,inputValue:I,handlePhoneValueChange:N,country:E,setCountry:P}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),D=u.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),L=u.useCallback(W=>{W.preventDefault(),y(M=>!M),m||j("")},[m]),q=u.useCallback(W=>()=>{P(W),y(!1),j("")},[P,y]),Q=u.useCallback(W=>{W.key.length===1?j(M=>M+W.key):W.key==="Backspace"&&j(M=>M.slice(0,-1))},[]),ie=s.R.filter(W=>{const{name:M}=s.M(W);return M.toLowerCase().includes(w.toLowerCase())});return $e(C.floating.current,()=>{y(!1),j("")},!0),t.jsx(O,{error:h,htmlFor:a,label:n,required:o,tooltip:c,weight:g,children:t.jsxs(Pn,{className:`${e?"disabled":""} ${h?"error":""}`,ref:f,children:[t.jsxs(Wn,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:L,onKeyDown:Q,ref:C.setReference,children:[t.jsx(s.q,{iso2:E.iso2,size:"16px"}),t.jsx(S,{icon:"angle-down",iconColor:x.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(J,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":a,"aria-required":o,autoComplete:"off","data-testid":`${a}-input`,disabled:e,id:a,name:a,onKeyDown:D,placeholder:r,ref:T,type:"tel",value:I,...l==null?void 0:l(a,{required:o,onChange:N})}),h?t.jsx(S,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:x.palette.error[500],iconSize:"xs"}):void 0]}),m&&X.createPortal(t.jsx(Bn,{ref:C.setFloating,style:k,children:ie.map(W=>{const{dialCode:M,iso2:ee,name:Re}=s.M(W);return t.jsxs(_n,{onClick:q(ee),value:ee,children:[t.jsx(s.q,{iso2:ee,size:"16px"}),t.jsx(On,{children:Re}),t.jsx(v,{color:x.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+M})]},ee)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Hn=({disabled:e=!1,error:i,helpLink:n,helpText:a,isTouched:r,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:x,register:f,required:h,rows:b,tooltip:m,watch:y,weight:w,value:j})=>{const C=s.nt(),k=(y==null?void 0:y(c))??j,T=o&&r&&!e,I=e?void 0:i;return t.jsx(O,{error:I,helpLink:n,helpText:a,htmlFor:c,label:l,maxLength:g,required:h,tooltip:m,value:k?String(k):void 0,weight:w,children:t.jsxs(J,{className:`
|
|
1234
1234
|
${e?"disabled":""} ${I?"error":""} ${T?"success":""}
|
|
1235
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":I?"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:x,rows:
|
|
1235
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":I?"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:x,rows:b,value:k,...f==null?void 0:f(c,{required:h})}),I?t.jsx(S,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:C.palette.error[500],iconSize:"xs"}):void 0,T?t.jsx(S,{icon:"check-circle",iconClass:"success-icon",iconColor:C.palette.success[500],iconSize:"xs"}):void 0]})})},Vn=({description:e,disabled:i,id:n,align:a,inputType:r="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:x})=>{const f=u.useMemo(()=>{if(r==="text")return t.jsx(Ke,{disabled:i,name:d,placeholder:p});if(r==="date")return t.jsx(zt,{disabled:i,name:d});const{decimalPlaces:h,max:b,min:m}=o??{};return t.jsx(Nt,{decimalPlaces:h,disabled:i,max:b,min:m,name:d,placeholder:p})},[i,o,r,d,p]);return t.jsxs(dn,{$align:a,$minHeight:l,$minWidth:c,children:[t.jsx(Se,{description:e,id:n,title:x,tooltip:g}),f]})},Un=s.dt.label`
|
|
1236
1236
|
${({theme:e})=>`
|
|
1237
1237
|
align-items: center;
|
|
1238
1238
|
color: ${e.palette.gray[600]};
|
|
@@ -1304,7 +1304,7 @@
|
|
|
1304
1304
|
fill: ${e.palette.white};
|
|
1305
1305
|
}
|
|
1306
1306
|
`}
|
|
1307
|
-
`,Fe=u.forwardRef(function({checked:i,disabled:n=!1,label:a,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...x},f){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(Un,{"aria-disabled":n,children:[t.jsx("input",{"aria-checked":i,"aria-disabled":n,"aria-hidden":!1,"aria-label":r,checked:i,disabled:n,id:r,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:f,type:"checkbox",value:g,...x}),t.jsx(S,{disabled:n,icon:"check",iconSize:"sm"}),a??g]}),p===void 0?void 0:t.jsx(V,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Rt=({options:e,title:i,checkboxesName:n,defaultCollapsed:a,onChange:r})=>{const o=s.nt(),[l,c]=u.useState(a??!1),d=u.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(v,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:i}),t.jsx(S,{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(Fe,{checked:p.visible,disabled:p.locked,label:p.name,name:`${n}-${p.name}`,onChange:r,value:p.name})},p.name))}):void 0]})},Dt=(e,i)=>{const[a,r]=u.useState(0),[o,l]=u.useState(0);return u.useEffect(()=>{o===100&&(()=>{r(d=>d===i-1?0:d+1)})()},[o,i]),u.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:a,progress:o,setCycle:r,setProgress:l}},Lt=({publicId:e,format:i="webp"})=>{const n=u.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return u.useMemo(()=>n.image(e).format(i),[n,e,i])},Ne=e=>{const[i,n]=u.useState(!1),a=u.useCallback(()=>{n(!0)},[]),r=u.useCallback(()=>{n(!1)},[]),o=u.useCallback(()=>{n(l=>!l)},[]);return{close:r,isOpen:i,name:e,open:a,setIsOpen:n,toggle:o}},Gn=({name:e,items:i,columnOrder:n,setColumnOrder:a})=>{const r=u.useMemo(()=>[...i.filter(({locked:g})=>g).map(({locked:g,...x})=>({...x,visible:!0,locked:g})),...i.filter(({locked:g})=>!g)],[i]),[o,l]=u.useState(r),c=u.useCallback(g=>{const x=g.filter(({locked:m})=>!m),h=[...g.filter(({locked:m})=>m),...x],
|
|
1307
|
+
`,Fe=u.forwardRef(function({checked:i,disabled:n=!1,label:a,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...x},f){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(Un,{"aria-disabled":n,children:[t.jsx("input",{"aria-checked":i,"aria-disabled":n,"aria-hidden":!1,"aria-label":r,checked:i,disabled:n,id:r,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:f,type:"checkbox",value:g,...x}),t.jsx(S,{disabled:n,icon:"check",iconSize:"sm"}),a??g]}),p===void 0?void 0:t.jsx(V,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Rt=({options:e,title:i,checkboxesName:n,defaultCollapsed:a,onChange:r})=>{const o=s.nt(),[l,c]=u.useState(a??!1),d=u.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(v,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:i}),t.jsx(S,{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(Fe,{checked:p.visible,disabled:p.locked,label:p.name,name:`${n}-${p.name}`,onChange:r,value:p.name})},p.name))}):void 0]})},Dt=(e,i)=>{const[a,r]=u.useState(0),[o,l]=u.useState(0);return u.useEffect(()=>{o===100&&(()=>{r(d=>d===i-1?0:d+1)})()},[o,i]),u.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:a,progress:o,setCycle:r,setProgress:l}},Lt=({publicId:e,format:i="webp"})=>{const n=u.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return u.useMemo(()=>n.image(e).format(i),[n,e,i])},Ne=e=>{const[i,n]=u.useState(!1),a=u.useCallback(()=>{n(!0)},[]),r=u.useCallback(()=>{n(!1)},[]),o=u.useCallback(()=>{n(l=>!l)},[]);return{close:r,isOpen:i,name:e,open:a,setIsOpen:n,toggle:o}},Gn=({name:e,items:i,columnOrder:n,setColumnOrder:a})=>{const r=u.useMemo(()=>[...i.filter(({locked:g})=>g).map(({locked:g,...x})=>({...x,visible:!0,locked:g})),...i.filter(({locked:g})=>!g)],[i]),[o,l]=u.useState(r),c=u.useCallback(g=>{const x=g.filter(({locked:m})=>!m),h=[...g.filter(({locked:m})=>m),...x],b=h.map(({name:m})=>m);l(m=>[...h,...m.filter(({name:y})=>!b.includes(y))]),a&&a(h.map(({id:m})=>m))},[a]),d=u.useCallback(()=>{const g=o.map(x=>{var h;const f=(n==null?void 0:n.includes(x.id))??!1;return(h=x.toggleVisibility)==null||h.call(x,f),{...x,visible:f}}).toSorted((x,f)=>{const h=(n==null?void 0:n.indexOf(x.id))??0,b=(n==null?void 0:n.indexOf(f.id))??0;return Number(f.visible)!==Number(x.visible)?Number(f.visible)-Number(x.visible):h-b});l(g),a==null||a(n)},[o,n,a]),p=u.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,...Ne(e),hasChanged:p}},At=(e,i)=>u.useMemo(()=>s._.debounce(e,i),[e,i]),Yn=e=>{const[i,n]=u.useState(),a=At(r=>{n(r)},(e==null?void 0:e.debounceWait)??300);return[i,a]},qn=({alt:e="img",height:i="",width:n="",plugins:a=[s.lazyload(),s.placeholder()],publicId:r})=>{const o=Lt({publicId:r});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:i,plugins:a,width:n})},Y=u.memo(qn),Kn=s.dt.label`
|
|
1308
1308
|
${({theme:e})=>`
|
|
1309
1309
|
align-items: center;
|
|
1310
1310
|
display: flex;
|
|
@@ -1656,7 +1656,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
1656
1656
|
margin-right: 0;
|
|
1657
1657
|
`:""}
|
|
1658
1658
|
}
|
|
1659
|
-
`,
|
|
1659
|
+
`,_t=({alert:e,modalRef:i,confirmButton:n=void 0,cancelButton:a=void 0})=>{const{close:r}=i,o=u.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=u.useCallback(()=>{n!=null&&n.onClick&&n.onClick(),r()},[n,r]);return[n,a].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(xa,{children:t.jsxs("div",{children:[a&&t.jsx(R,{id:a.id,onClick:o,variant:"tertiary",width:"100%",children:a.text}),n&&t.jsx(R,{id:n.id,onClick:l,variant:"primary",width:"100%",children:n.text})]})})]}):null},Ot=({title:e,description:i,modalRef:n,otherActions:a,onClose:r})=>{const o=s.nt(),l=u.useCallback(()=>{r==null||r(),n.close()},[n,r]);return u.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(pa,{children:[t.jsxs(ga,{children:[typeof e=="string"?t.jsx(_,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[a,t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),i&&s.lodashExports.isString(i)&&!s.lodashExports.isEmpty(i)?t.jsx(v,{mt:.5,size:"sm",children:i}):void 0,i&&!s.lodashExports.isString(i)&&t.jsx(oe,{display:"block",mt:.5,size:"sm",children:i})]})},fa=({disabled:e,id:i="modal-confirm",onCancel:n,onConfirm:a="submit",txtCancel:r,txtConfirm:o})=>{const l=a==="submit";return t.jsxs($,{display:"flex",gap:.75,maxWidth:n?"392px":"190px",mt:1.5,children:[n?t.jsx(R,{id:`${i}-cancel`,justify:"center",onClick:n,variant:"tertiary",width:"100%",children:r??"Cancel"}):void 0,t.jsx(R,{disabled:e,id:i,justify:"center",onClick:l?void 0:a,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},ha=s.dt.button`
|
|
1660
1660
|
${({theme:e})=>`
|
|
1661
1661
|
align-items: center;
|
|
1662
1662
|
color: ${e.palette.gray[500]};
|
|
@@ -1806,7 +1806,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
1806
1806
|
min-width: 240px;
|
|
1807
1807
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1808
1808
|
`}
|
|
1809
|
-
`,me=({children:e,disabled:i=!1,icon:n,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...x})=>{const h=s.nt().palette.gray[i?300:800],
|
|
1809
|
+
`,me=({children:e,disabled:i=!1,icon:n,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...x})=>{const h=s.nt().palette.gray[i?300:800],b=i?u.Children.map(e,m=>u.isValidElement(m)?u.cloneElement(m,{disabled:i,...m.props}):m):e;return t.jsxs(ja,{"aria-disabled":i,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...x,children:[n!==void 0||g!==void 0?t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[n?t.jsx(S,{disabled:i,icon:n,iconColor:h,iconSize:"xxs",iconType:a}):null,r===void 0?b:t.jsx(Z,{href:r,children:b})]}):null,p||d?t.jsx(S,{disabled:i,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:a,onClick:l}):null]})},va=s.dt(me)`
|
|
1810
1810
|
margin-top: 10px;
|
|
1811
1811
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1812
1812
|
border-radius: 4px;
|
|
@@ -1824,7 +1824,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
1824
1824
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1825
1825
|
background-color: unset;
|
|
1826
1826
|
}
|
|
1827
|
-
`,Ut=({items:e,onReorder:i,title:n,description:a,onClickClose:r})=>{const o=u.useCallback(l=>()=>{r(l)},[r]);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(
|
|
1827
|
+
`,Ut=({items:e,onReorder:i,title:n,description:a,onClickClose:r})=>{const o=u.useCallback(l=>()=>{r(l)},[r]);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(_,{display:"flex",size:"xs",children:n}),t.jsx(G,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(v,{size:"sm",children:a}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(va,{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)]})},ka=s.dt(me)`
|
|
1828
1828
|
padding: 7px 8px;
|
|
1829
1829
|
|
|
1830
1830
|
&[aria-selected="true"] {
|
|
@@ -1896,7 +1896,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
1896
1896
|
border-radius: ${e.spacing[.5]};
|
|
1897
1897
|
width: 250px;
|
|
1898
1898
|
`}
|
|
1899
|
-
`,le=u.forwardRef(function({name:i,smallSearch:n=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=u.useState(!1),{refs:g,floatingStyles:x}=s.useFloating$1(),f=u.useCallback(()=>{p(m=>!m)},[]),h=u.useCallback(m=>{m.key==="Enter"&&m.preventDefault()},[]);$e(g.floating.current,()=>{p(!1)},!0);const
|
|
1899
|
+
`,le=u.forwardRef(function({name:i,smallSearch:n=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=u.useState(!1),{refs:g,floatingStyles:x}=s.useFloating$1(),f=u.useCallback(()=>{p(m=>!m)},[]),h=u.useCallback(m=>{m.key==="Enter"&&m.preventDefault()},[]);$e(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(Sa,{children:[t.jsx(S,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ca,{...o,id:i,name:i,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(B,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:a,px:.25,py:.25,type:"reset",variant:"ghost"})]});return n?t.jsxs(u.Fragment,{children:[t.jsx(B,{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(za,{ref:g.setFloating,style:x,children:b}):void 0]}):b}),Yt=({columns:e,formId:i,onChangeHandler:n,variant:a})=>{const r=u.useRef(null),[o,l]=u.useState([]),[c,d]=u.useState(""),p=u.useCallback(x=>{const{value:f}=x.target;d(f)},[]),g=u.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return u.useEffect(()=>{l(e.filter(x=>{var f;return a==="grouped"?x.name.toLowerCase().includes(c.toLowerCase())||((f=x.group)==null?void 0:f.includes(c.toLowerCase())):x.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,a]),a==="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:r,children:t.jsx(le,{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(Gt(o)).map(([x,f],h)=>{const b=`li-checkbox${x}`;return t.jsx(Rt,{checkboxesName:x,defaultCollapsed:h===0,onChange:n,options:f,title:x},b)})})]}):t.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(le,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":i,id:i,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(x=>{const f=`li-checkbox-${x.name}`;return t.jsx(ka,{selected:x.visible,value:f,width:"content",children:t.jsx(Fe,{checked:x.visible,disabled:x.locked,label:x.name,name:x.name,onChange:n,value:x.name})},f)})})]})},Ia=({_containerId:e="portals",title:i,modalRef:n,variant:a})=>{const r=s.nt(),o=u.useRef(null),[l,c]=u.useState(void 0),d=u.useCallback(x=>{const{checked:f,value:h}=x.target,b=n.columns.map(m=>{var y;return m.name===h?((y=m.toggleVisibility)==null||y.call(m,f),{...m,visible:f}):m});n.setColumns(b)},[n]),p=u.useCallback(x=>{const f=n.columns.map(h=>{var b;return h.id===x?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});n.setColumns(f)},[n]),g=u.useCallback(()=>{var f;const x=(f=o.current)==null?void 0:f.scrollHeight;l!==x&&c(x)},[l]);return n.isOpen?X.createPortal(t.jsx(Ze,{"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(_,{size:"sm",children:i}),t.jsx(B,{icon:"close",iconColor:r.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(te,{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:a}),t.jsx($,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Ut,{description:"Click and drag to reorder the columns",items:n.columns,onClickClose:p,onReorder:n.setColumns,title:"Reorder columns"})]}),t.jsx(te,{mb:0,mt:0}),t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(R,{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(R,{id:"columns-modal-submit",justify:"center",onClick:n.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Ta=s.dt(me)`
|
|
1900
1900
|
padding: 8px;
|
|
1901
1901
|
min-width: unset;
|
|
1902
1902
|
`,Fa=s.dt.div.attrs({className:"comp-modal absolute top-[55px] overflow-auto"})`
|
|
@@ -1912,7 +1912,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
1912
1912
|
svg.fa-check {
|
|
1913
1913
|
border-radius: 2px;
|
|
1914
1914
|
}
|
|
1915
|
-
`,qt=({control:e,option:i,register:n,setValue:a})=>{var r,o,l,c,d;switch(i.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=i.options)==null?void 0:r.map(g=>t.jsx(lt,{value:g.value,width:"content",children:t.jsx(Fe,{...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(lt,{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(mt,{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(Ke,{label:i.label,name:p,register:n,value:i.value});case"numberRange":return t.jsx(Et,{label:i.label,name:String(i.key),propsMax:{placeholder:"Max",register:n,name:"maxValue",value:i.maxValue,setValue:a},propsMin:{placeholder:"Min",register:n,name:"minValue",value:i.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(Tt,{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:a,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:i,register:n,setValue:a})=>t.jsx(t.Fragment,{children:i.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:r,register:n,setValue:a}),o<i.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Xt=e=>{var c,d,p,g,x;const[i,n]=u.useState([...e]),{control:a,register:r,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:(x=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:x.maxValue}});return{control:a,items:i,setItems:n,register:r,handleSubmit:o,setValue:l}},Na=(e,i)=>{var n,a,r,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",((r=(a=(n=e.find(c=>c.type==="radioButton"))==null?void 0:n.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.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)},Ea=(e,i)=>e.map(n=>{var a;return n.type==="checkboxes"?{...n,options:(a=n.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(i.toLowerCase()))??r.value.toLowerCase().includes(i.toLowerCase())})}:n}),Be=({options:e,onSubmit:i,id:n,open:a,onClose:r})=>{const{control:o,items:l,setItems:c,register:d,handleSubmit:p,setValue:g}=Xt(e),x=e.some(b=>b.type==="checkboxes"),f=u.useCallback(b=>{const{value:w}=b.target,j=Ea(e,w);c(j)},[e,c]),h=u.useCallback(b=>{i&&i(b)},[i]),y=u.useCallback(b=>{var w;b.target===b.currentTarget&&((w=window.getSelection())==null?void 0:w.toString())===""&&r()},[r]);u.useEffect(()=>{c(e),Na(e,g)},[e,c,g]);const m=t.jsx(Ze,{$bgColor:"transparent",onClick:y,children:t.jsxs(Ee,{$size:"fixed",flexDirection:"column",gap:1.25,style:{overflow:"hidden"},children:[x&&t.jsx(le,{onChange:f}),t.jsxs("form",{id:n,onSubmit:p(h),children:[t.jsx(Kt,{control:o,items:l,register:d,setValue:g}),t.jsx(R,{mt:1,type:"submit",children:"Apply"})]})]})});return a?X.createPortal(m,document.getElementById("portals")??document.body):t.jsx("div",{})},Zt=({options:e,variant:i,onApplyFilters:n})=>{const a=s.nt(),[r,o]=u.useState(e),[l,c]=u.useState([]),[d,p]=u.useState({}),[g,x]=u.useState(""),f=u.useCallback(b=>()=>{const w=r.find(j=>j.label===b);x(b),c((w==null?void 0:w.filterOptions)??[])},[r]),h=u.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(I=>w.length>0?{...I,[g]:w}:I);const j=I=>{var N,E;return{...I,options:(N=I.options)==null?void 0:N.map(P=>({...P,checked:b.checkbox.includes(P.value)||b.radio===P.value})),value:["text","select"].includes(I.type)?((E=b.text)==null?void 0:E[`${String(I.key)}-${I.filterFn??"caseInsensitive"}`])??I.value:I.value,minValue:["numberRange","dateRange"].includes(I.type)?b.minValue:I.minValue,maxValue:["numberRange","dateRange"].includes(I.type)?b.maxValue:I.maxValue}},C=I=>I.label===g?{...I,filterOptions:I.filterOptions.map(j)}:I,k=r.map(C);o(I=>I.map(C));const T=k.flatMap(({filterOptions:I})=>I);n(T),c([])},[r,n,g]),y=u.useCallback(()=>{c([])},[]),m=u.useCallback((b,w)=>{const j=`li-filter-option-${b}`;return t.jsxs(Ta,{icon:w,onClick:f(b),style:{minWidth:"180px"},value:j,width:"100%",children:[b,d[b]===void 0?void 0:t.jsx(G,{tagLabel:d[b].length.toString()})]},j)},[d,f]);return u.useEffect(()=>{const b=e.reduce((w,{label:j,filterOptions:C})=>{const k=C.flatMap(({value:N,minValue:E,maxValue:P})=>[E,P,N]).filter(Boolean),T=C.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),I=[...k,...T];return I.length===0?w:{...w,[j]:I}},{});p(b)},[e]),i==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"360px",position:"relative",style:{columnGap:"10px"},wrap:"wrap",children:[Object.entries(Gt(e)).map(([b,w])=>t.jsxs($,{children:[t.jsx(v,{color:a.palette.gray[400],mb:.25,size:"sm",children:b}),w.map(({label:j,icon:C="filter-list"})=>m(j,C))]},b)),t.jsx(Be,{id:"filters-options",onClose:y,onSubmit:h,open:l.length>0,options:l})]}):t.jsxs($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"200px",style:{columnGap:"10px"},wrap:"wrap",children:[e.map(({label:b,icon:w="filter-list"})=>m(b,w)),t.jsx(Be,{id:"filters-options",onClose:y,onSubmit:h,open:l.length>0,options:l})]})},Jt=({_containerId:e="portals",options:i,onApplyFilters:n,modalRef:a,variant:r})=>{const o=s.nt();return a.isOpen?X.createPortal(t.jsx(Fa,{$bgColor:"transparent","aria-label":a.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(Zt,{onApplyFilters:n,options:i,variant:r}),t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:a.close,px:.25,py:.25,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{})};function Ra(e){if(e)return e}function Da(e){if(!e||e.length===0)return;const i=e.filter(a=>a.checked).map(a=>a.label??a.value);return i.length===0?void 0:i.join(", ")}function La(e,i){const n=s._.isEmpty(e)&&typeof e!="number"?void 0:Number(e),a=s._.isEmpty(i)&&typeof i!="number"?void 0:Number(String(i));if(!s._.isUndefined(n)&&!s._.isUndefined(a))return`${n} - ${a}`;if(!s._.isUndefined(n))return`Min ${n}`;if(!s._.isUndefined(a))return`Max ${a}`}function Aa(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 Pa(e,i,n){return e==="select"?i:`${i} ${n==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:i="filter-list",label:n,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx($,{pr:.25,children:t.jsx(G,{filterValues:r,icon:i,id:"remove-filter",onClose:a(e),tagLabel:`${n} `})},n),Qt=({options:e,onClose:i})=>{const n=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:x}=r;switch(c){case"numberRange":{const f=La(g,x);return t.jsx(ae,{filter:r,filterValue:f,icon:a.icon,label:a.label,onClose:i},l)}case"dateRange":{const f=Aa(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(ae,{filter:r,filterValue:f,icon:a.icon,label:a.label,onClose:i},l)}case"radioButton":case"checkboxes":{const f=Da(p);return t.jsx(ae,{filter:r,filterValue:f,icon:a.icon,label:a.label,onClose:i},l)}case void 0:case"select":case"text":default:{const f=Ra(d),h=Pa(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:f,icon:a.icon,label:h,onClose:i},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return t.jsx($,{display:"flex",wrap:"wrap",children:n})},Wa=(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 a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:x}=c,f=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(x)&&typeof x!="number"?void 0:d(String(x));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 a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return n(l,c)}})}return e.filter(o)},ct=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,Ba=e=>{var n;const i=((n=e.options)==null?void 0:n.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:i}},dt="portals",Oa=({dataset:e,localStorageKey:i,options:n,setFilteredDataset:a,onFiltersChange:r,variant:o="ungrouped"})=>{const l=Ne("filters-modal"),[c,d]=u.useState([]),[p,g]=u.useState(ct(c)),x=n.map(y=>({...y,filterOptions:y.filterOptions.map(m=>c.find(w=>w.key===m.key&&w.type===m.type&&w.filterFn===m.filterFn)??{...m})})),f=u.useCallback(y=>{d([...y]),localStorage.setItem(i,JSON.stringify(y))},[d,i]),h=u.useCallback(y=>()=>{const m=c.map(b=>b.key===y.key&&b.type===y.type&&b.filterFn===y.filterFn?Ba(b):b);d(m),localStorage.setItem(i,JSON.stringify(m))},[c,i]);return u.useEffect(()=>{const y=localStorage.getItem(i),m=y?JSON.parse(y):n.flatMap(b=>b.filterOptions);d(m)},[i,n,d]),u.useEffect(()=>{a&&e!==void 0&&a(Wa(e,c)),g(ct(c)),r==null||r(c)},[e,c,a,g,r]),t.jsx(u.Fragment,{children:t.jsxs($,{alignItems:"center",display:"flex",gap:.25,id:dt,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsxs($,{pr:.25,children:[t.jsx(R,{icon:"filter",id:"filterBtn",onClick:l.toggle,tag:p.toString(),variant:"ghost"}),t.jsx(Qt,{onClose:h,options:x})]}),t.jsx(Jt,{_containerId:dt,modalRef:l,onApplyFilters:f,options:x,variant:o})]})})},ei=({_portal:e=!0,alert:i,cancelButton:n=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:x=void 0,size:f,id:h="modal-container"})=>{const y=s.nt(),m=t.jsx(Ze,{"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(x)&&t.jsx(_t,{description:l,modalRef:c,onClose:p,otherActions:d,title:x}),g&&t.jsx($,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Je,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(da,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(ua,{$framed:o.imageFramed,children:t.jsx(Y,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(v,{size:"sm",children:o.imageText})]}),t.jsx(Ot,{alert:i,cancelButton:n,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?X.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},_a=()=>{const[e,i]=u.useState(!1),[n,a]=u.useState(),r=u.useRef(null),o=Ne("confirm-dialog-modal"),l=u.useCallback(async g=>(a(g),i(!0),new Promise(x=>{r.current=x})),[]),c=u.useCallback(()=>{var g;i(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=u.useCallback(()=>{var g;i(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return u.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:x})=>t.jsxs(ei,{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,x]}),confirm:l}},Ma=s.dt.button`
|
|
1915
|
+
`,qt=({control:e,option:i,register:n,setValue:a})=>{var r,o,l,c,d;switch(i.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=i.options)==null?void 0:r.map(g=>t.jsx(lt,{value:g.value,width:"content",children:t.jsx(Fe,{...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(lt,{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(mt,{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(Ke,{label:i.label,name:p,register:n,value:i.value});case"numberRange":return t.jsx(Et,{label:i.label,name:String(i.key),propsMax:{placeholder:"Max",register:n,name:"maxValue",value:i.maxValue,setValue:a},propsMin:{placeholder:"Min",register:n,name:"minValue",value:i.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(Tt,{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:a,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:i,register:n,setValue:a})=>t.jsx(t.Fragment,{children:i.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:r,register:n,setValue:a}),o<i.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Xt=e=>{var c,d,p,g,x;const[i,n]=u.useState([...e]),{control:a,register:r,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(b=>b.checked).map(b=>b.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:(x=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:x.maxValue}});return{control:a,items:i,setItems:n,register:r,handleSubmit:o,setValue:l}},Na=(e,i)=>{var n,a,r,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",((r=(a=(n=e.find(c=>c.type==="radioButton"))==null?void 0:n.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.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)},Ea=(e,i)=>e.map(n=>{var a;return n.type==="checkboxes"?{...n,options:(a=n.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(i.toLowerCase()))??r.value.toLowerCase().includes(i.toLowerCase())})}:n}),Be=({options:e,onSubmit:i,id:n,open:a,onClose:r})=>{const{control:o,items:l,setItems:c,register:d,handleSubmit:p,setValue:g}=Xt(e),x=e.some(y=>y.type==="checkboxes"),f=u.useCallback(y=>{const{value:w}=y.target,j=Ea(e,w);c(j)},[e,c]),h=u.useCallback(y=>{i&&i(y)},[i]),b=u.useCallback(y=>{var w;y.target===y.currentTarget&&((w=window.getSelection())==null?void 0:w.toString())===""&&r()},[r]);u.useEffect(()=>{c(e),Na(e,g)},[e,c,g]);const m=t.jsx(Ze,{$bgColor:"transparent",onClick:b,children:t.jsxs(Ee,{$size:"fixed",flexDirection:"column",gap:1.25,style:{overflow:"hidden"},children:[x&&t.jsx(le,{onChange:f}),t.jsxs("form",{id:n,onSubmit:p(h),children:[t.jsx(Kt,{control:o,items:l,register:d,setValue:g}),t.jsx(R,{mt:1,type:"submit",children:"Apply"})]})]})});return a?X.createPortal(m,document.getElementById("portals")??document.body):t.jsx("div",{})},Zt=({options:e,variant:i,onApplyFilters:n})=>{const a=s.nt(),[r,o]=u.useState(e),[l,c]=u.useState([]),[d,p]=u.useState({}),[g,x]=u.useState(""),f=u.useCallback(y=>()=>{const w=r.find(j=>j.label===y);x(y),c((w==null?void 0:w.filterOptions)??[])},[r]),h=u.useCallback(y=>{const w=[...y.checkbox,...Object.values(y.text??{}),...y.radio?[y.radio]:[],...y.minValue?[String(y.minValue)]:[],...y.maxValue?[String(y.maxValue)]:[]];p(I=>w.length>0?{...I,[g]:w}:I);const j=I=>{var N,E;return{...I,options:(N=I.options)==null?void 0:N.map(P=>({...P,checked:y.checkbox.includes(P.value)||y.radio===P.value})),value:["text","select"].includes(I.type)?((E=y.text)==null?void 0:E[`${String(I.key)}-${I.filterFn??"caseInsensitive"}`])??I.value:I.value,minValue:["numberRange","dateRange"].includes(I.type)?y.minValue:I.minValue,maxValue:["numberRange","dateRange"].includes(I.type)?y.maxValue:I.maxValue}},C=I=>I.label===g?{...I,filterOptions:I.filterOptions.map(j)}:I,k=r.map(C);o(I=>I.map(C));const T=k.flatMap(({filterOptions:I})=>I);n(T),c([])},[r,n,g]),b=u.useCallback(()=>{c([])},[]),m=u.useCallback((y,w)=>{const j=`li-filter-option-${y}`;return t.jsxs(Ta,{icon:w,onClick:f(y),style:{minWidth:"180px"},value:j,width:"100%",children:[y,d[y]===void 0?void 0:t.jsx(G,{tagLabel:d[y].length.toString()})]},j)},[d,f]);return u.useEffect(()=>{const y=e.reduce((w,{label:j,filterOptions:C})=>{const k=C.flatMap(({value:N,minValue:E,maxValue:P})=>[E,P,N]).filter(Boolean),T=C.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),I=[...k,...T];return I.length===0?w:{...w,[j]:I}},{});p(y)},[e]),i==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"360px",position:"relative",style:{columnGap:"10px"},wrap:"wrap",children:[Object.entries(Gt(e)).map(([y,w])=>t.jsxs($,{children:[t.jsx(v,{color:a.palette.gray[400],mb:.25,size:"sm",children:y}),w.map(({label:j,icon:C="filter-list"})=>m(j,C))]},y)),t.jsx(Be,{id:"filters-options",onClose:b,onSubmit:h,open:l.length>0,options:l})]}):t.jsxs($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:"200px",style:{columnGap:"10px"},wrap:"wrap",children:[e.map(({label:y,icon:w="filter-list"})=>m(y,w)),t.jsx(Be,{id:"filters-options",onClose:b,onSubmit:h,open:l.length>0,options:l})]})},Jt=({_containerId:e="portals",options:i,onApplyFilters:n,modalRef:a,variant:r})=>{const o=s.nt();return a.isOpen?X.createPortal(t.jsx(Fa,{$bgColor:"transparent","aria-label":a.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(Zt,{onApplyFilters:n,options:i,variant:r}),t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:a.close,px:.25,py:.25,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{})};function Ra(e){if(e)return e}function Da(e){if(!e||e.length===0)return;const i=e.filter(a=>a.checked).map(a=>a.label??a.value);return i.length===0?void 0:i.join(", ")}function La(e,i){const n=s._.isEmpty(e)&&typeof e!="number"?void 0:Number(e),a=s._.isEmpty(i)&&typeof i!="number"?void 0:Number(String(i));if(!s._.isUndefined(n)&&!s._.isUndefined(a))return`${n} - ${a}`;if(!s._.isUndefined(n))return`Min ${n}`;if(!s._.isUndefined(a))return`Max ${a}`}function Aa(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 Pa(e,i,n){return e==="select"?i:`${i} ${n==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:i="filter-list",label:n,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx($,{pr:.25,children:t.jsx(G,{filterValues:r,icon:i,id:"remove-filter",onClose:a(e),tagLabel:`${n} `})},n),Qt=({options:e,onClose:i})=>{const n=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:x}=r;switch(c){case"numberRange":{const f=La(g,x);return t.jsx(ae,{filter:r,filterValue:f,icon:a.icon,label:a.label,onClose:i},l)}case"dateRange":{const f=Aa(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(ae,{filter:r,filterValue:f,icon:a.icon,label:a.label,onClose:i},l)}case"radioButton":case"checkboxes":{const f=Da(p);return t.jsx(ae,{filter:r,filterValue:f,icon:a.icon,label:a.label,onClose:i},l)}case void 0:case"select":case"text":default:{const f=Ra(d),h=Pa(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:f,icon:a.icon,label:h,onClose:i},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return t.jsx($,{display:"flex",wrap:"wrap",children:n})},Wa=(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 a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:x}=c,f=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(x)&&typeof x!="number"?void 0:d(String(x));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 a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return n(l,c)}})}return e.filter(o)},ct=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,Ba=e=>{var n;const i=((n=e.options)==null?void 0:n.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:i}},dt="portals",_a=({dataset:e,localStorageKey:i,options:n,setFilteredDataset:a,onFiltersChange:r,variant:o="ungrouped"})=>{const l=Ne("filters-modal"),[c,d]=u.useState([]),[p,g]=u.useState(ct(c)),x=n.map(b=>({...b,filterOptions:b.filterOptions.map(m=>c.find(w=>w.key===m.key&&w.type===m.type&&w.filterFn===m.filterFn)??{...m})})),f=u.useCallback(b=>{d([...b]),localStorage.setItem(i,JSON.stringify(b))},[d,i]),h=u.useCallback(b=>()=>{const m=c.map(y=>y.key===b.key&&y.type===b.type&&y.filterFn===b.filterFn?Ba(y):y);d(m),localStorage.setItem(i,JSON.stringify(m))},[c,i]);return u.useEffect(()=>{const b=localStorage.getItem(i),m=b?JSON.parse(b):n.flatMap(y=>y.filterOptions);d(m)},[i,n,d]),u.useEffect(()=>{a&&e!==void 0&&a(Wa(e,c)),g(ct(c)),r==null||r(c)},[e,c,a,g,r]),t.jsx(u.Fragment,{children:t.jsxs($,{alignItems:"center",display:"flex",gap:.25,id:dt,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsxs($,{pr:.25,children:[t.jsx(R,{icon:"filter",id:"filterBtn",onClick:l.toggle,tag:p.toString(),variant:"ghost"}),t.jsx(Qt,{onClose:h,options:x})]}),t.jsx(Jt,{_containerId:dt,modalRef:l,onApplyFilters:f,options:x,variant:o})]})})},ei=({_portal:e=!0,alert:i,cancelButton:n=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:x=void 0,size:f,id:h="modal-container"})=>{const b=s.nt(),m=t.jsx(Ze,{"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(x)&&!s._.isNil(x)&&t.jsx(Ot,{description:l,modalRef:c,onClose:p,otherActions:d,title:x}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Je,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(da,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(ua,{$framed:o.imageFramed,children:t.jsx(Y,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(v,{size:"sm",children:o.imageText})]}),t.jsx(_t,{alert:i,cancelButton:n,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?X.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Oa=()=>{const[e,i]=u.useState(!1),[n,a]=u.useState(),r=u.useRef(null),o=Ne("confirm-dialog-modal"),l=u.useCallback(async g=>(a(g),i(!0),new Promise(x=>{r.current=x})),[]),c=u.useCallback(()=>{var g;i(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=u.useCallback(()=>{var g;i(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return u.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:x})=>t.jsxs(ei,{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,x]}),confirm:l}},Ma=s.dt.button`
|
|
1916
1916
|
display: flex;
|
|
1917
1917
|
position: relative;
|
|
1918
1918
|
height: 32px;
|
|
@@ -1976,7 +1976,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
1978
1978
|
`}
|
|
1979
|
-
`,
|
|
1979
|
+
`,_e=({containerRef:e,id:i})=>{const n=s.nt(),a=i==="desktop"?380:342,r=u.useCallback(l=>()=>{if(e!=null&&e.current){const{current:c}=e;c.scrollBy({left:l==="right"?a:-a,behavior:"smooth"})}},[e,a]),o=u.useCallback(l=>t.jsxs(Ma,{onClick:r(l),children:[t.jsx(S,{clickable:!0,icon:`circle-arrow-${l}`,iconClass:"hovered",iconColor:n.palette.gray[800],iconSize:"md",iconType:"fa-solid"}),t.jsx(S,{clickable:!0,icon:`circle-arrow-${l}`,iconClass:"uncover",iconColor:n.palette.gray[800],iconSize:"md",iconType:"fa-light"})]}),[r,n]);return t.jsxs($,{alignItems:"center",display:"flex",gap:1,id:i,width:"max-content",children:[o("left"),o("right")]})},Oe=({tag:e,tagPosition:i})=>{const n=s.nt();return e?t.jsx($,{alignItems:"center",bgColor:n.palette.white,borderRadius:"8px",display:"flex",justify:"center",margin:i==="top"?[.75,.75,.75,.75]:void 0,padding:[.25,.5,.25,.5],position:i==="top"?"absolute":"relative",top:"0",width:"max-content",children:t.jsx(v,{color:n.palette.gray[900],lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",textAlign:"center",children:e})}):null},ti=({eventDate:e})=>{const i=s.nt(),n=s.lodashExports.isEmpty(e)?null:e==null?void 0:e.split("-");if(n){const[a,r]=n;return t.jsxs($,{alignItems:"center",bgColor:i.palette.white,borderRadius:"8px",display:"flex",flexDirection:"column",margin:[.75,.75,.75,.75],padding:[.75,1.5,.75,1.5],position:"absolute",right:"0",shadow:"md",top:"0",children:[t.jsx(_,{fontWeight:"semibold",lineSpacingSm:1.25,size:"md",sizeSm:"sm",textAlign:"center",children:a}),t.jsx(v,{color:i.palette.gray[800],fontWeight:"semibold",lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",textAlign:"center",children:r.toUpperCase()})]})}return null},Va=s.dt.div`
|
|
1980
1980
|
${({theme:e})=>`
|
|
1981
1981
|
align-items: flex-start;
|
|
1982
1982
|
display: flex;
|
|
@@ -2021,7 +2021,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
2023
|
`}
|
|
2024
|
-
`,ii=({author:e,buttonText:i,description:n,eventDate:a,href:r,imageId:o,mode:l="light",publishDate:c,readingTime:d,tag:p,tagPosition:g="top",title:x})=>{const f=s.nt(),h=c==null?void 0:c.split("-"),
|
|
2024
|
+
`,ii=({author:e,buttonText:i,description:n,eventDate:a,href:r,imageId:o,mode:l="light",publishDate:c,readingTime:d,tag:p,tagPosition:g="top",title:x})=>{const f=s.nt(),h=c==null?void 0:c.split("-"),b=l==="dark",m=t.jsxs(Va,{"data-testid":`content-card-${x}`,children:[o||a||p&&g==="top"?t.jsxs($,{id:"card-image",position:"relative",children:[o&&t.jsx(Y,{publicId:o}),g==="top"&&t.jsx(Oe,{tag:p,tagPosition:g}),t.jsx(ti,{eventDate:a})]}):void 0,t.jsxs($,{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:.5,id:"card-content",children:[g==="bottom"&&t.jsx(Oe,{tag:p,tagPosition:g}),e||h||d?t.jsxs($,{display:"flex",justify:"space-between",width:"100%",children:[e&&h&&t.jsx(v,{color:f.palette.gray[b?300:400],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:e+` • ${h[0]} ${h[1]}, ${h[2]}`}),d&&t.jsxs($,{alignItems:"center",display:"flex",gap:.25,justify:"center",minWidth:"60px",children:[t.jsx(S,{icon:"eye",iconColor:f.palette.gray[b?300:400],iconSize:"xs",iconType:"fa-light"}),t.jsx(v,{color:f.palette.gray[b?300:400],size:"sm",sizeSm:"xs",textAlign:"right",children:d})]})]}):void 0,t.jsx(_,{className:`title-${l}`,color:b?f.palette.white:f.palette.gray[800],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:x}),n&&t.jsx(v,{color:f.palette.gray[b?100:600],size:"md",sizeSm:"sm",children:n}),i&&r&&t.jsx(R,{href:r,variant:"link",children:i})]})]});return r?t.jsx("a",{className:"flex w-fit",href:r,rel:"noopener noreferrer",target:"_self",children:m}):m},Ua=({description:e,items:i,title:n,titleHighlighted:a})=>{const r=u.useRef(null);return t.jsxs(Ha,{"data-testid":"content-card-carousel",children:[t.jsxs($,{alignItems:"flex-start",display:"flex",justify:"space-between",children:[t.jsxs($,{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:.625,maxWidth:"800px",children:[t.jsxs(_,{display:"inline",fontWeight:"semibold",lineSpacing:2.25,lineSpacingSm:1.75,size:"lg",sizeSm:"md",children:[n+" "," ",t.jsx("span",{className:"inline",children:a})]}),t.jsx(v,{lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",children:e})]}),t.jsx(_e,{containerRef:r,id:"desktop"})]}),t.jsx($,{alignSelf:"stretch",display:"flex",id:"carousel",pb:1,pr:2.25,ref:r,scroll:"x",children:t.jsx($,{alignItems:"flex-start",display:"flex",gap:1.5,width:"max-content",children:i.map((o,l)=>t.jsx(ii,{...o},`${l}-${o.title}`))})}),t.jsx(_e,{containerRef:r,id:"mobile"})]})},Me=({buttonProps:e,variant:i})=>t.jsx(R,{onClick:e.onClick,variant:i,children:e.text}),Ga=s.dt.div`
|
|
2025
2025
|
display: flex;
|
|
2026
2026
|
flex-direction: column;
|
|
2027
2027
|
align-items: center;
|
|
@@ -2055,7 +2055,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2055
2055
|
> *:last-child {
|
|
2056
2056
|
margin-right: 0;
|
|
2057
2057
|
}
|
|
2058
|
-
`,pt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},Ka=({cancelButton:e=void 0,confirmButton:i=void 0,description:n,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(i??e)!==void 0;return t.jsxs(Ga,{$padding:r,children:[t.jsx(Ya,{children:t.jsx(Y,{alt:"empty-icon",publicId:a})}),t.jsx(
|
|
2058
|
+
`,pt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},Ka=({cancelButton:e=void 0,confirmButton:i=void 0,description:n,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(i??e)!==void 0;return t.jsxs(Ga,{$padding:r,children:[t.jsx(Ya,{children:t.jsx(Y,{alt:"empty-icon",publicId:a})}),t.jsx(_,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:pt[l].title,textAlign:"center",children:o}),t.jsx(v,{mb:c?2:void 0,size:pt[l].description,textAlign:"center",children:n}),c?t.jsxs(qa,{children:[e&&t.jsx(Me,{buttonProps:e,variant:"tertiary"}),i&&t.jsx(Me,{buttonProps:i,variant:"primary"})]}):void 0]})},Xa=({children:e})=>{const i=s.useFormContext();return e({...i})},Za=s.dt.form`
|
|
2059
2059
|
${({theme:e})=>`
|
|
2060
2060
|
align-items: flex-start;
|
|
2061
2061
|
align-self: stretch;
|
|
@@ -2065,7 +2065,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2065
2065
|
overflow: hidden auto;
|
|
2066
2066
|
width: 100%;
|
|
2067
2067
|
`}
|
|
2068
|
-
`,Ja=({alert:e,
|
|
2068
|
+
`,Ja=({alert:e,buttonAlignment:i,cancelButton:n,children:a,confirmButton:r,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,showButtons:g=!0,yupSchema:x,...f})=>{const h=s.nt(),b=s.useForm({...f,mode:d??"all",resolver:x?s.o(x):void 0});return t.jsx(s.FormProvider,{...b,children:t.jsx(Za,{onSubmit:b.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:a}),g&&t.jsxs($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,borderTop:`1px solid ${h.palette.gray[200]}`,display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,justify:i??"stretch",maxWidth:c,children:[n?t.jsx(R,{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(R,{disabled:((r==null?void 0:r.disabled)??!1)||b.formState.isSubmitting||o&&!b.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},Qa=s.dt(be)`
|
|
2069
2069
|
display: grid;
|
|
2070
2070
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2071
2071
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2119,7 +2119,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2119
2119
|
background-color: ${e.palette.gray[100]};
|
|
2120
2120
|
}
|
|
2121
2121
|
`}
|
|
2122
|
-
`,ni=({isSelected:e=!1,label:i,onSelect:n})=>{const a=s.nt(),r=u.useCallback(()=>{n&&n(i)},[n,i]);return t.jsxs(Qe,{$isSelected:e,onClick:r,children:[e?t.jsx(S,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(v,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:i})]})},ir=({isOpen:e=!0,items:i,handleNewOrganization:n,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=u.useState(i),[x,f]=u.useState(""),h=u.useCallback(
|
|
2122
|
+
`,ni=({isSelected:e=!1,label:i,onSelect:n})=>{const a=s.nt(),r=u.useCallback(()=>{n&&n(i)},[n,i]);return t.jsxs(Qe,{$isSelected:e,onClick:r,children:[e?t.jsx(S,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(v,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:i})]})},ir=({isOpen:e=!0,items:i,handleNewOrganization:n,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=u.useState(i),[x,f]=u.useState(""),h=u.useCallback(y=>{g(w=>w.filter(j=>String(j.name).toLowerCase().includes(y.toLocaleLowerCase())))},[g]),b=u.useCallback(y=>{y.currentTarget&&(f(y.currentTarget.value),h(y.currentTarget.value))},[f,h]);u.useEffect(()=>{g(i),h(x)},[i,h,x]);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(tr,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(v,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(B,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(le,{onInput:b,placeholder:"Search"})}),t.jsx(te,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(Qe,{onClick:n,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(S,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(v,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(y=>t.jsx(ni,{isSelected:o.toLowerCase()===y.name,label:y.name.charAt(0).toUpperCase()+y.name.slice(1),onSelect:a},y.name))]})]})})});return e?X.createPortal(m,document.body):t.jsx("div",{})},nr=({description:e,height:i="auto",leftIconName:n,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const x=s.nt(),f=p==="centered",h=l&&t.jsx(V,{icon:r??n,iconColor:x.palette.gray[800],id:l,place:d,tip:c});return t.jsxs($,{alignItems:f?"center":"flex-start",bgColor:x.palette.gray[50],border:`1px solid ${x.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(v,{color:f?x.palette.gray[800]:x.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[f&&!s.lodashExports.isUndefined(n)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(_,{fontWeight:"bold",size:"md",children:o}),a]}),f&&!s.lodashExports.isUndefined(r)?h:void 0]})]})},ar=({actions:e,children:i,header:n,title:a,tabs:r,footer:o})=>{const l=s.nt();return t.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(v,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:a}),n]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(B,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx($,{display:"flex",pt:.25,width:"100%",children:t.jsx(Je,{items:r})}),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(R,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},rr=s.dt.div`
|
|
2123
2123
|
${({theme:e})=>`
|
|
2124
2124
|
align-items: flex-start;
|
|
2125
2125
|
backdrop-filter: blur(3.15px);
|
|
@@ -2185,7 +2185,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2185
2185
|
height: 260px;
|
|
2186
2186
|
width: 260px;
|
|
2187
2187
|
}
|
|
2188
|
-
`,ai=({icon:e})=>t.jsx(or,{children:t.jsx(S,{icon:e,iconColor:z.palette.white,iconSize:"xs",iconTransform:"shrink-2",iconType:"fa-light"})}),sr=({category:e,description:i,href:n,icon:a,location:r,title:o})=>{const l=s.nt();return t.jsxs(rr,{children:[t.jsxs($,{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:1.5,height:"100%",id:"uncover",justify:"space-between",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx(v,{color:l.palette.white,size:"sm",sizeSm:"xs",children:e}),t.jsx(
|
|
2188
|
+
`,ai=({icon:e})=>t.jsx(or,{children:t.jsx(S,{icon:e,iconColor:z.palette.white,iconSize:"xs",iconTransform:"shrink-2",iconType:"fa-light"})}),sr=({category:e,description:i,href:n,icon:a,location:r,title:o})=>{const l=s.nt();return t.jsxs(rr,{children:[t.jsxs($,{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:1.5,height:"100%",id:"uncover",justify:"space-between",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx(v,{color:l.palette.white,size:"sm",sizeSm:"xs",children:e}),t.jsx(_,{color:l.palette.white,fontWeight:"bold",lineSpacing:2.25,lineSpacingSm:1.75,size:"lg",sizeSm:"md",children:o})]}),t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx(v,{color:l.palette.white,size:"sm",sizeSm:"xs",children:"Location"}),t.jsx(v,{color:l.palette.white,fontWeight:"bold",lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",children:r})]})]}),t.jsxs($,{alignItems:"self-start",display:"flex",flexDirection:"column",gap:2,height:"100%",id:"hovered",justify:"space-between",pt:1,children:[t.jsx(_,{color:l.palette.white,fontWeight:"bold",lineSpacing:1.75,lineSpacingSm:1.5,size:"md",sizeSm:"sm",children:o}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsx(v,{color:l.palette.gray[100],lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",children:i}),t.jsx(R,{external:!0,href:n,variant:"link",width:"max-content",children:"Download now"})]})]}),t.jsx(ai,{icon:a})]})},lr=s.dt.button`
|
|
2189
2189
|
${({theme:e})=>`
|
|
2190
2190
|
align-items: center;
|
|
2191
2191
|
border-left: 3px solid transparent;
|
|
@@ -2457,7 +2457,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2457
2457
|
transform: translateX(calc(-180px * 15));
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
|
-
`,Lr=["airs/clients-carousel/color/bancolombia","airs/clients-carousel/color/itau_colombia","airs/clients-carousel/color/lulo_bank","airs/clients-carousel/color/oxxo_international","airs/clients-carousel/color/interbank","airs/clients-carousel/color/global_bank","airs/clients-carousel/color/gesa","airs/clients-carousel/color/copa_airlines","airs/clients-carousel/color/consubanco","airs/clients-carousel/color/bantrab","airs/clients-carousel/color/banistmo","airs/clients-carousel/color/banco_internacional","airs/clients-carousel/color/banco_general","airs/clients-carousel/color/banbif","airs/clients-carousel/color/avianca"],Ar=({fusion:e=!1,logos:i=Lr})=>t.jsxs(Rr,{children:[e&&t.jsx(gt,{className:"left"}),t.jsx(Dr,{children:[...i,...i].map((n,a)=>t.jsx(Y,{alt:`${n}-${a}`,height:"80px",plugins:[s.placeholder()],publicId:n,width:"140px"},`${n}-${a}`))}),e&&t.jsx(gt,{className:"right"})]}),Pr={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},Wr=({publicId:e,variant:i})=>t.jsx($,{...Pr[i],children:t.jsx(Y,{alt:"logo",publicId:e})}),Br=({children:e,commitSha:i,commitShortSha:n,parentElement:a,userInfo:r,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=r;return $e(a,()=>{o(!1)}),t.jsxs(Vt,{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(v,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(v,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(v,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx($,{children:t.jsx(G,{tagLabel:g,variant:"role"})})]})}),t.jsx(te,{}),e,t.jsx(te,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Z,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${i}`,iconPosition:"hidden",children:t.jsx(v,{color:l.palette.gray[400],size:"xs",children:`commit : ${n}`})})})]})},
|
|
2460
|
+
`,Lr=["airs/clients-carousel/color/bancolombia","airs/clients-carousel/color/itau_colombia","airs/clients-carousel/color/lulo_bank","airs/clients-carousel/color/oxxo_international","airs/clients-carousel/color/interbank","airs/clients-carousel/color/global_bank","airs/clients-carousel/color/gesa","airs/clients-carousel/color/copa_airlines","airs/clients-carousel/color/consubanco","airs/clients-carousel/color/bantrab","airs/clients-carousel/color/banistmo","airs/clients-carousel/color/banco_internacional","airs/clients-carousel/color/banco_general","airs/clients-carousel/color/banbif","airs/clients-carousel/color/avianca"],Ar=({fusion:e=!1,logos:i=Lr})=>t.jsxs(Rr,{children:[e&&t.jsx(gt,{className:"left"}),t.jsx(Dr,{children:[...i,...i].map((n,a)=>t.jsx(Y,{alt:`${n}-${a}`,height:"80px",plugins:[s.placeholder()],publicId:n,width:"140px"},`${n}-${a}`))}),e&&t.jsx(gt,{className:"right"})]}),Pr={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},Wr=({publicId:e,variant:i})=>t.jsx($,{...Pr[i],children:t.jsx(Y,{alt:"logo",publicId:e})}),Br=({children:e,commitSha:i,commitShortSha:n,parentElement:a,userInfo:r,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=r;return $e(a,()=>{o(!1)}),t.jsxs(Vt,{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(v,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(v,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(v,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx($,{children:t.jsx(G,{tagLabel:g,variant:"role"})})]})}),t.jsx(te,{}),e,t.jsx(te,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Z,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${i}`,iconPosition:"hidden",children:t.jsx(v,{color:l.palette.gray[400],size:"xs",children:`commit : ${n}`})})})]})},_r=s.dt.button`
|
|
2461
2461
|
align-items: center;
|
|
2462
2462
|
background-color: transparent;
|
|
2463
2463
|
border: unset;
|
|
@@ -2474,7 +2474,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2474
2474
|
&:hover span {
|
|
2475
2475
|
color: ${z.palette.primary[200]};
|
|
2476
2476
|
}
|
|
2477
|
-
`,
|
|
2477
|
+
`,Or=({message:e,onClickButton:i,buttonText:n,buttonFontWeight:a="regular",icon:r,onClose:o,buttonSide:l="end"})=>{const c=s.nt(),[d,p]=u.useState(!0),g=u.useCallback(()=>{p(!1),o==null||o()},[o]),x=t.jsxs(_r,{onClick:i,children:[t.jsx(v,{color:c.palette.white,fontWeight:a,size:"sm",textDecoration:"underline",children:n}),t.jsx(S,{icon:r??"arrow-right",iconColor:c.palette.white,iconSize:"xs",iconType:a==="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?x:void 0,t.jsx($,{children:typeof e=="string"?t.jsx(v,{color:c.palette.white,display:"inline",size:"sm",children:e}):e}),l==="end"&&i?x:void 0]}),t.jsx(S,{clickable:!0,hoverColor:c.palette.primary[200],icon:"close",iconColor:c.palette.white,iconSize:"xs",iconType:"fa-light",onClick:g})]})},Mr=s.dt.div`
|
|
2478
2478
|
${({theme:e,$variant:i})=>`
|
|
2479
2479
|
background: ${e.palette.white};
|
|
2480
2480
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2524,7 +2524,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2524
2524
|
color: ${e.palette[i][500]};
|
|
2525
2525
|
}
|
|
2526
2526
|
`}
|
|
2527
|
-
`,Vr=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",Ur=({description:e,onClose:i,title:n,variant:a})=>{const r=s.nt(),o=u.useCallback(()=>{i==null||i()},[i]);return t.jsxs(Mr,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(Hr,{$variant:a,children:[t.jsx(S,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(S,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(S,{icon:Vr(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(
|
|
2527
|
+
`,Vr=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",Ur=({description:e,onClose:i,title:n,variant:a})=>{const r=s.nt(),o=u.useCallback(()=>{i==null||i()},[i]);return t.jsxs(Mr,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(Hr,{$variant:a,children:[t.jsx(S,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(S,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(S,{icon:Vr(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(_,{fontWeight:"bold",size:"xs",children:n}),t.jsx(v,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(B,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Gr=s.dt.div`
|
|
2528
2528
|
width: fit-content;
|
|
2529
2529
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2530
2530
|
border-radius: 4px;
|
|
@@ -2557,7 +2557,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2557
2557
|
&::-webkit-inner-spin-button {
|
|
2558
2558
|
opacity: 1;
|
|
2559
2559
|
}
|
|
2560
|
-
`,qr=u.forwardRef(function({autoUpdate:i=!1,decimalPlaces:n=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const x=n<0?0:n,[f,h]=u.useState(Number(a).toFixed(x)),
|
|
2560
|
+
`,qr=u.forwardRef(function({autoUpdate:i=!1,decimalPlaces:n=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const x=n<0?0:n,[f,h]=u.useState(Number(a).toFixed(x)),b=u.useCallback(w=>{const j=s.lodashExports.toNumber(w.target.value);w.target.value.endsWith(".")?h(w.target.value):j>=Number(o)&&j<=Number(r)&&(h(String(j)),i&&c(s.lodashExports.toNumber(j.toFixed(x)))),w.stopPropagation()},[i,x,r,o,c]),m=u.useCallback(w=>{w.currentTarget.contains(w.relatedTarget)||h(Number(a).toFixed(x)),w.stopPropagation()},[x,a]),y=u.useCallback(w=>{w.stopPropagation(),w.key==="Enter"&&!s.lodashExports.isEmpty(w.currentTarget.value)&&c(s.lodashExports.toNumber(w.currentTarget.value))},[c]);return t.jsx(Gr,{onBlur:m,tabIndex:-1,children:t.jsx(V,{id:"numberInputTooltip",tip:d,children:t.jsx(Yr,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(f),max:r,min:o,name:l,onChange:b,onKeyUp:y,ref:g,step:10**-x,type:"number",value:f})})})}),Kr={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},He=({icon:e,label:i,onClick:n,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:n,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(Y,{alt:`${r} Logo`,height:"100%",publicId:Kr[r],width:"100%"}):t.jsx(S,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(v,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:i??r})})]})},Xr=({align:e="end",buttonLabel:i="Add Credential",children:n,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=u.useState(!1),p=u.useRef(null);$e(p.current,()=>{d(!1)},!0);const g=u.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),x=u.useCallback(()=>{d(h=>!h)},[d]),f=u.useCallback(h=>b=>{var m;(m=o[h])==null||m.onClick(b),d(!1)},[o]);return t.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(R,{icon:"plus",onClick:x,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:a,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(He,{onClick:f(h),provider:h},h)),r===void 0?void 0:t.jsx(He,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),n]})]})},oi=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(v,{bgGradient:z.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),Zr=s.dt.div`
|
|
2561
2561
|
${({className:e,theme:i})=>`
|
|
2562
2562
|
align-items: flex-start;
|
|
2563
2563
|
border-radius: ${i.spacing[1]};
|
|
@@ -2623,7 +2623,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2623
2623
|
}
|
|
2624
2624
|
`}
|
|
2625
2625
|
`;const Jr={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
|
|
2626
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Qr=({description:e,onClick:i,plan:n})=>{const{title:a,description:r,benefits:o,buttonText:l}=Jr[n],c=e??r;return t.jsxs(Zr,{className:n,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:n==="essential"?1.75:0,children:[n==="advanced"&&oi,t.jsx(
|
|
2626
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Qr=({description:e,onClick:i,plan:n})=>{const{title:a,description:r,benefits:o,buttonText:l}=Jr[n],c=e??r;return t.jsxs(Zr,{className:n,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:n==="essential"?1.75:0,children:[n==="advanced"&&oi,t.jsx(_,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(v,{color:z.palette.gray[400],fontWeight:"semibold",pb:n==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(v,{lineSpacing:1.5,lineSpacingSm:1.25,pb:n==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(R,{onClick:i,variant:"primary",children:l})]})},si=({description:e="",highlightDescription:i=""})=>{const n=s.nt(),a=typeof i=="string",r=a?"":new RegExp(`(${i.join("|")})`,"u");return i.length>0?t.jsx(v,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(u.Fragment,{children:[t.jsx(oe,{color:n.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:i}),e]}):e.split(r).map((o,l)=>i.includes(o)?t.jsx(oe,{color:n.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(v,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},eo=({_portal:e=!1,cancelButton:i,darkBackground:n=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:x})=>{const f=s.nt(),{alt:h,src:b,width:m="77px",height:y="77px"}=d,w=u.useCallback(()=>{i==null||i.onClick()},[i]),j=u.useCallback(()=>{r==null||r.onClick()},[r]),C=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(Y,{alt:h,height:y,publicId:b,width:m})}),t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(_,{color:x,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(si,{description:l,highlightDescription:c})]})]}),a&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:a})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(r)?t.jsx(R,{onClick:j,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,s.lodashExports.isObject(i)?t.jsx(R,{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?X.createPortal(C,o??document.body):C},to=s.dt.div`
|
|
2627
2627
|
${({theme:e})=>`
|
|
2628
2628
|
height: ${e.spacing[1]};
|
|
2629
2629
|
width: ${e.spacing[1]};
|
|
@@ -2780,7 +2780,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2780
2780
|
height: auto;
|
|
2781
2781
|
}
|
|
2782
2782
|
`}
|
|
2783
|
-
`,yo=({children:e,closeIconId:i="close-menu",isOpen:n,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),x=u.useRef(null),f=u.useCallback(h=>()=>{h(),r()},[r]);return u.useEffect(()=>{const h=["mousedown","touchstart"],
|
|
2783
|
+
`,yo=({children:e,closeIconId:i="close-menu",isOpen:n,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),x=u.useRef(null),f=u.useCallback(h=>()=>{h(),r()},[r]);return u.useEffect(()=>{const h=["mousedown","touchstart"],b=m=>{var k;const y=m.target,w=document.getElementById("helpBtn"),j=document.getElementById("filterBtn"),C=(y===w||((w==null?void 0:w.contains(y))??!1)||y===j||(j==null?void 0:j.contains(y)))??!1;n&&!C&&!(((k=x.current)==null?void 0:k.contains(y))??!1)&&r()};return h.forEach(m=>{document.addEventListener(m,b,{passive:!0})}),()=>{h.forEach(m=>{document.removeEventListener(m,b)})}},[n,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(bo,{animate:n?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:x,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(v,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(B,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:i,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs($,{py:1.25,children:[(a??[]).map(({customBadge:h,description:b,icon:m,onClick:y,requiresUpgrade:w,title:j})=>t.jsx(ci,{customBadge:h,description:b,icon:m,onClick:f(y),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(R,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(R,{onClick:l,type:"submit",children:o})]})]})]})})})},$o=(e,i)=>i>=50?`
|
|
2784
2784
|
${e.palette.gray[200]} 50%,
|
|
2785
2785
|
${e.palette.primary[500]} 50.05%,
|
|
2786
2786
|
${e.palette.primary[500]} ${i}%,
|
|
@@ -2856,7 +2856,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2856
2856
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2857
2857
|
width: 59px;
|
|
2858
2858
|
`}
|
|
2859
|
-
`,di=({state:e,trackRef:i,index:n,name:a})=>{const r=u.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:n,trackRef:i,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},vo=(e,i,n)=>Math.round((n-e)/(i-e)*100),ko=e=>{const i=s.nt(),n=u.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(
|
|
2859
|
+
`,di=({state:e,trackRef:i,index:n,name:a})=>{const r=u.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:n,trackRef:i,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},vo=(e,i,n)=>Math.round((n-e)/(i-e)*100),ko=e=>{const i=s.nt(),n=u.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),x=vo(r,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:a,children:t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(mo,{...f,$min:r??0,$value:x,className:"slider",children:[t.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:n,children:t.jsx(di,{index:0,name:l,state:g,trackRef:n})}),t.jsxs(wo,{children:[t.jsx("p",{children:`${p.format(r)} (Low)`}),r<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${p.format(o)} (High)`})]})]}),t.jsx(jo,{children:t.jsx(v,{color:i.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:Co}=U(e=>({completed:`
|
|
2860
2860
|
background-color: ${e.palette.primary[500]};
|
|
2861
2861
|
color: ${e.palette.white};
|
|
2862
2862
|
|
|
@@ -2934,7 +2934,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2934
2934
|
|
|
2935
2935
|
${Co(e,i)}
|
|
2936
2936
|
`}
|
|
2937
|
-
`,Fo=({button:{disabled:e=!1,text:i,type:n="button",onClick:a},steps:r})=>{const[o,l]=u.useState(1),c=u.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(So,{children:r.map((d,p)=>{const{content:g,title:x,nextAction:f,previousAction:h}=d,
|
|
2937
|
+
`,Fo=({button:{disabled:e=!1,text:i,type:n="button",onClick:a},steps:r})=>{const[o,l]=u.useState(1),c=u.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(So,{children:r.map((d,p)=>{const{content:g,title:x,nextAction:f,previousAction:h}=d,b=p+1,m=b===o?"current":"disabled",y=b<o?"completed":m;return t.jsxs(zo,{children:[t.jsx($,{maxWidth:"40px",position:"relative",children:t.jsx(To,{$variant:y,children:y==="completed"?t.jsx(S,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs($,{ml:1.5,width:"100%",children:[t.jsx(_,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:x}),y==="current"&&t.jsxs($,{children:[g,t.jsxs(Io,{children:[o>1&&t.jsx(R,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<r.length?t.jsx(R,{disabled:d.isDisabledNext??!1,onClick:c(1,f),variant:"primary",children:"Next step"}):t.jsx(R,{disabled:e,onClick:a,type:n,variant:"primary",children:i})]})]})]})]},d.title)})})},No=s.dt.button`
|
|
2938
2938
|
${({theme:e})=>`
|
|
2939
2939
|
align-items: center;
|
|
2940
2940
|
background-color: ${e.palette.white};
|
|
@@ -2976,7 +2976,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
2976
2976
|
background-color: ${e.palette.gray[100]};
|
|
2977
2977
|
}
|
|
2978
2978
|
`}
|
|
2979
|
-
`,Eo={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},Ro=({disabled:e=!1,icon:i,id:n,label:a,name:r,onClick:o,type:l="button",variant:c})=>{const d=s.nt(),p=t.jsxs(No,{"aria-label":r??void 0,className:c,disabled:e,id:n,onClick:o,type:l,children:[t.jsx(S,{clickable:!1,icon:i??Eo[c].icon,iconSize:r===void 0?"xxs":"xs",iconType:"fa-light"}),r??void 0]});return t.jsxs($,{alignItems:"center",display:"flex",children:[p,a&&t.jsx(v,{color:d.palette.gray[800],ml:.5,size:"sm",children:a})]})},Do=({items:e})=>t.jsx(ba,{children:e.map(({isActive:i,label:n,onClick:a},r)=>t.jsx(ha,{className:i?"active":"",onClick:a,type:"button",children:t.jsx(
|
|
2979
|
+
`,Eo={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},Ro=({disabled:e=!1,icon:i,id:n,label:a,name:r,onClick:o,type:l="button",variant:c})=>{const d=s.nt(),p=t.jsxs(No,{"aria-label":r??void 0,className:c,disabled:e,id:n,onClick:o,type:l,children:[t.jsx(S,{clickable:!1,icon:i??Eo[c].icon,iconSize:r===void 0?"xxs":"xs",iconType:"fa-light"}),r??void 0]});return t.jsxs($,{alignItems:"center",display:"flex",children:[p,a&&t.jsx(v,{color:d.palette.gray[800],ml:.5,size:"sm",children:a})]})},Do=({items:e})=>t.jsx(ba,{children:e.map(({isActive:i,label:n,onClick:a},r)=>t.jsx(ha,{className:i?"active":"",onClick:a,type:"button",children:t.jsx(_,{color:"inherit",fontWeight:"semibold",size:"sm",sizeSm:"xs",children:n})},`${n}-${r}`))}),Lo=s.dt.div`
|
|
2980
2980
|
${({theme:e})=>`
|
|
2981
2981
|
align-items: center;
|
|
2982
2982
|
background-color: ${e.palette.white};
|
|
@@ -3128,7 +3128,7 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
3128
3128
|
color: ${e.palette.white};
|
|
3129
3129
|
}
|
|
3130
3130
|
`}
|
|
3131
|
-
`,
|
|
3131
|
+
`,_o=({defaultSelection:e,options:i,handleClick:n})=>{const[a,r]=u.useState(e??i[0]),o=u.useCallback(l=>()=>{r(l),n(l)},[n]);return t.jsx(Wo,{children:i.map((l,c)=>t.jsx(Bo,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(v,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},Oo={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:""},Mo=({run:e,steps:i,onFinish:n})=>{const[a,r]=u.useState(e),[o,l]=u.useState(0),c=u.useCallback(d=>{const{action:p,index:g,status:x,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(x)||p==="close")&&(r(!1),s.lodashExports.isUndefined(n)||n())},[n]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:i,styles:{buttonNext:{display:o===i.length-1?"none":"block"},options:{zIndex:9999}}})},Ho=s.dt.form`
|
|
3132
3132
|
${({theme:e})=>`
|
|
3133
3133
|
align-items: center;
|
|
3134
3134
|
background: ${e.palette.gray[50]};
|
|
@@ -3191,4 +3191,4 @@ ${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=u.useMemo(g,[g]),f=u.useCallback(a
|
|
|
3191
3191
|
flex-direction: column;
|
|
3192
3192
|
}
|
|
3193
3193
|
`}
|
|
3194
|
-
`,Go=({children:e,name:i,onSubmit:n,submitDisabled:a,submitLabel:r="Submit"})=>t.jsx(Ho,{"aria-label":i,name:i,onSubmit:n,children:t.jsxs(Vo,{children:[e,t.jsx(R,{disabled:a,type:"submit",children:r})]})});exports.Accordion=Mi;exports.AccordionContent=ft;exports.ActionButton=We;exports.Alert=Zi;exports.AppliedFilter=ae;exports.AppliedFilters=Qt;exports.Avatar=on;exports.BaseButtonComponent=Ve;exports.BaseComponent=be;exports.BaseSpanComponent=Ge;exports.BaseTextComponent=Ue;exports.Button=R;exports.Button$1=ve;exports.ButtonToolbarCenter=ur;exports.ButtonToolbarRow=hr;exports.ButtonToolbarStartRow=fr;exports.Calendar=vt;exports.Calendar$1=It;exports.Calendar$2=Ft;exports.CalendarCell=jt;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=cn;exports.CardWithInput=Vn;exports.CardWithOptions=Rt;exports.CardWithSelector=Zn;exports.CardWithSwitch=ea;exports.Carousel=oa;exports.CategoryTag=
|
|
3194
|
+
`,Go=({children:e,name:i,onSubmit:n,submitDisabled:a,submitLabel:r="Submit"})=>t.jsx(Ho,{"aria-label":i,name:i,onSubmit:n,children:t.jsxs(Vo,{children:[e,t.jsx(R,{disabled:a,type:"submit",children:r})]})});exports.Accordion=Mi;exports.AccordionContent=ft;exports.ActionButton=We;exports.Alert=Zi;exports.AppliedFilter=ae;exports.AppliedFilters=Qt;exports.Avatar=on;exports.BaseButtonComponent=Ve;exports.BaseComponent=be;exports.BaseSpanComponent=Ge;exports.BaseTextComponent=Ue;exports.Button=R;exports.Button$1=ve;exports.ButtonToolbarCenter=ur;exports.ButtonToolbarRow=hr;exports.ButtonToolbarStartRow=fr;exports.Calendar=vt;exports.Calendar$1=It;exports.Calendar$2=Ft;exports.CalendarCell=jt;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=cn;exports.CardWithInput=Vn;exports.CardWithOptions=Rt;exports.CardWithSelector=Zn;exports.CardWithSwitch=ea;exports.Carousel=oa;exports.CategoryTag=Oe;exports.Checkbox=Fe;exports.CodeSnippet=la;exports.Col=yr;exports.ColumFilters=Jt;exports.ColumnsModal=Ia;exports.ComboBox=mt;exports.ComboBoxField=Le;exports.Container=$;exports.ContentCard=ii;exports.ContentCardCarousel=Ua;exports.CustomThemeProvider=Di;exports.DateField=Ct;exports.DateSelector=se;exports.Description=si;exports.Dialog=Te;exports.Divider=te;exports.Editable=Fn;exports.EmptyButton=Me;exports.EmptyState=Ka;exports.EventDate=ti;exports.FilePreview=yt;exports.FilterControl=qt;exports.FilterForm=Be;exports.FilterFormContent=Kt;exports.Filters=_a;exports.FiltersList=Zt;exports.FixedTabs=Do;exports.Form=Ja;exports.FormItem=Uo;exports.Gap=mr;exports.GridContainer=er;exports.GroupSelector=ir;exports.Header=Ie;exports.Header$1=Ot;exports.Heading=_;exports.Icon=S;exports.IconButton=B;exports.IndicatorCard=nr;exports.InfoSidebar=ar;exports.InnerForm=Xa;exports.Input=Ke;exports.InputDate=zt;exports.InputDateRange=Tt;exports.InputDateTime=Tn;exports.InputFile=Dn;exports.InputNumber=Nt;exports.InputNumberRange=Et;exports.InputTags=An;exports.InteractiveCard=sr;exports.InteractiveIcon=ai;exports.ItemList=ri;exports.Label=Ye;exports.LanguageSelector=xr;exports.Link=Z;exports.ListItem=me;exports.ListItemsWrapper=Vt;exports.LittleFlag=kr;exports.Loading=Er;exports.LocationCode=Bt;exports.Logo=Wr;exports.LogoCarousel=Ar;exports.MemoizedImage=Y;exports.Menu=Br;exports.MenuItem=ci;exports.MessageBanner=Or;exports.Modal=ei;exports.ModalConfirm=fa;exports.ModalFooter=_t;exports.Notification=Ur;exports.NotificationSign=Mt;exports.NumberField=Ce;exports.NumberInput=qr;exports.OAuthSelector=Xr;exports.Option=$t;exports.OptionBoxContainer=Qe;exports.OptionContainer=He;exports.OptionContainer$1=ni;exports.OutlineContainer=O;exports.PhoneInput=Mn;exports.PlanCard=Qr;exports.PopUp=eo;exports.Popover=ye;exports.PremiumFeature=li;exports.PreviewPanel=Ut;exports.PriorityScore=io;exports.ProgressBar=so;exports.RadioButton=Xe;exports.RecommendedTag=oi;exports.Row=jr;exports.ScrollButtons=_e;exports.ScrollUpButton=co;exports.Search=le;exports.SearchPanel=Yt;exports.SeverityBadge=go;exports.SeverityOverview=uo;exports.SeverityOverviewBadge=re;exports.ShowOnHover=ho;exports.SlideOutMenu=yo;exports.Slider=ko;exports.Span=oe;exports.StepLapse=Fo;exports.Tab=Ht;exports.TableButton=Ro;exports.Tabs=Je;exports.Tag=G;exports.TagsField=Pe;exports.Text=v;exports.TextArea=Hn;exports.Thumb=di;exports.TimeField=St;exports.TimeLine=Po;exports.TimeLineCard=pi;exports.Toggle=Pt;exports.ToggleButton=_o;exports.Tooltip=V;exports.Tour=Mo;exports.WebForm=Go;exports.baseStep=Oo;exports.getStyledConfig=he;exports.hiddenProps=xt;exports.icons=Ei;exports.setBorder=ge;exports.setDisplay=xe;exports.setInteraction=fe;exports.setMargin=de;exports.setPadding=ce;exports.setPosition=pe;exports.setText=ue;exports.theme=z;exports.uniqueIcons=Ri;exports.useCarousel=Dt;exports.useClickOutside=$e;exports.useCloudinaryImage=Lt;exports.useColumnsModal=Gn;exports.useConfirmDialog=Oa;exports.useDebouncedCallback=At;exports.useFilterForm=Xt;exports.useModal=Ne;exports.useSearch=Yn;exports.variantBuilder=U;
|