@fluidattacks/design 3.21.1-pr → 3.21.1
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/conditions-dialog/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/copy-button/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dropdown/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-array/field/index.js +1 -1
- package/dist/components/inputs/fields/input-array/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/layout/categories/buttons/index.js +1 -1
- package/dist/components/layout/categories/column/index.js +1 -1
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/lottie/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/modal/columns-modal/index.js +1 -1
- package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
- package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
- package/dist/components/modal/filters-modal/index.js +1 -1
- package/dist/components/modal/footer/index.js +1 -1
- package/dist/components/modal/header/index.js +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/modal/modal-confirm/index.js +1 -1
- package/dist/components/notification/index.js +1 -1
- package/dist/components/notification-sign/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/oauth-selector/index.js +1 -1
- package/dist/components/oauth-selector/option-container/index.js +1 -1
- package/dist/components/plan-card/index.js +1 -1
- package/dist/components/plan-card/recommended-tag/index.js +1 -1
- package/dist/components/pop-up/description/index.js +1 -1
- package/dist/components/pop-up/index.js +1 -1
- package/dist/components/premium-feature/index.js +1 -1
- package/dist/components/priority-score/index.js +1 -1
- package/dist/components/progress-bar/index.js +1 -1
- package/dist/components/progress-indicator/in-progress-icon/index.js +1 -1
- package/dist/components/progress-indicator/index.js +1 -1
- package/dist/components/progress-indicator/step/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/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/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-Bj2ZQKWf.js → components-Dg0Mde-r.js} +163 -163
- package/dist/{components-Ddqqxepf.mjs → components-pLXxo5wI.mjs} +1059 -1054
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{vendor-CVQRJXco.mjs → vendor-BzUP-0MT.mjs} +8039 -8040
- package/dist/{vendor-DVd_bed9.js → vendor-CCqkJyOz.js} +28 -28
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),x=require("react"),s=require("./vendor-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),x=require("react"),s=require("./vendor-CCqkJyOz.js"),ae=require("react-dom"),We=require("react-router-dom"),q=e=>({getVariant:(n,i)=>e(n)[i]}),$t=["padding","px","py","pl","pr","pt","pb","margin","mx","my","ml","mr","mt","mb","zIndex","position","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","scroll","visibility","display","height","width","maxHeight","maxWidth","minHeight","minWidth","shadow","bgColor","bgGradient","gap","flexDirection","flexGrow","justify","justifySelf","alignItems","alignSelf","wrap","color","fontFamily","fontSize","fontWeight","textAlign","whiteSpace","letterSpacing","lineSpacing","textDecoration","textOverflow","whiteSpace","wordBreak","wordWrap","cursor","transition","borderColorHover","bgColorHover","shadowHover"],Fn={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},Nn={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},Dn={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},En={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},Rn={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},Ln={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},An={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},Pn={"01":"linear-gradient(45deg, #f32637 0%, #b8075d 100%)","02":"linear-gradient(45deg, #fcfcfd 0%, #667085 100%)"},Wn={type:{primary:"Roboto, sans-serif",poppins:"'Poppins', sans-serif",mono:"'Space Mono', monospace"},heading:{xxl:"64px",xl:"48px",lg:"32px",md:"24px",sm:"20px",xs:"16px"},text:{xl:"20px",lg:"18px",md:"16px",sm:"14px",xs:"12px"},weight:{bold:"700",semibold:"600",regular:"400"}},Bn={none:"none",sm:"0px 1px 2px 0px rgba(16, 24, 40, 0.15)",md:"0px 4px 6px 0px rgba(16, 24, 40, 0.15)",lg:"0px 8px 24px 0px rgba(16, 24, 40, 0.15)"},On={mobile:"480px",tablet:"960px",sm:"1024px",md:"1440px",lg:"1920px"},Mn={0:"0rem",.125:"0.125rem",.188:"0.188rem",.25:"0.25rem",.5:"0.5rem",.625:"0.625rem",.75:"0.75rem",1:"1rem",1.25:"1.25rem",1.5:"1.5rem",1.75:"1.75rem",2:"2rem",2.25:"2.25rem",2.5:"2.5rem",3:"3rem",3.5:"3.5rem",4:"4rem",4.5:"4.5rem",5:"5rem",6:"6rem"},Hn=["lock-keyhole","bars-sort","bolt","books","brain-circuit","briefcase","bug","buildings","bullseye-pointer","calendar-clock","calendar-xmark","chart-network","clipboard-check","comment","envelope","eye","file","flag","globe","hand-holding-dollar","hands-clapping","headset","hexagon-exclamation","light-emergency-on","magnifying-glass","pen-line","plane-departure","screwdriver-wrench","sensor-triangle-exclamation","shield-check","sidebar","skull","sliders","star-christmas","telescope","trash","unlock","user-group","user-hoodie","xmark"],_n=[["fal","arrow-down"],["fal","arrow-left"],["fal","arrow-right"],["fal","arrow-up"],["fal","plus"],["fal","minus"],["fas","check"],["fas","circle-question"]],F={typography:Wn,shadows:Bn,breakpoints:On,spacing:Mn,palette:{primary:Nn,complementary:Dn,error:En,info:An,warning:Rn,success:Ln,black:"#0c111d",white:"#ffffff",gray:Fn,gradients:Pn}},Jn=({children:e})=>t.jsx(s.Xe,{theme:F,children:e}),D=(e,n)=>n===void 0?"":`${e}: ${n};`,fe=e=>{const n=e.py??e.pt??0,i=e.px??e.pr??0,r=e.py??e.pb??0,a=e.px??e.pl??0;if(e.padding){const[o,l,c,d]=e.padding;return`padding: ${F.spacing[o]} ${F.spacing[l]} ${F.spacing[c]} ${F.spacing[d]};`}return`padding: ${F.spacing[n]} ${F.spacing[i]} ${F.spacing[r]} ${F.spacing[a]};`},he=e=>{const n=e.my??e.mt??0,i=e.mx??e.mr??0,r=e.my??e.mb??0,a=e.mx??e.ml??0;if(e.margin){const[o,l,c,d]=e.margin;return`margin: ${F.spacing[o]} ${F.spacing[l]} ${F.spacing[c]} ${F.spacing[d]};`}return`margin: ${F.spacing[n]} ${F.spacing[i]} ${F.spacing[r]} ${F.spacing[a]};`},be=e=>{const n=D("position",e.position),i=D("top",e.top),r=D("right",e.right),a=D("bottom",e.bottom),o=D("left",e.left),l=D("z-index",e.zIndex);return`
|
|
2
2
|
${n}
|
|
3
3
|
${i}
|
|
4
4
|
${r}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
${o}
|
|
14
14
|
${l}
|
|
15
15
|
${c}
|
|
16
|
-
`},
|
|
16
|
+
`},Un=e=>e.includes("x")?"overflow-x: auto;":"",Gn=e=>e.includes("y")?"overflow-y: auto;":"",$e=e=>{const n=e.scroll?`
|
|
17
|
+
${Un(e.scroll)}
|
|
17
18
|
${Gn(e.scroll)}
|
|
18
|
-
${Vn(e.scroll)}
|
|
19
19
|
`:"",i=D("visibility",e.visibility),r=D("display",e.display),a=D("height",e.height),o=D("width",e.width),l=D("max-height",e.maxHeight),c=D("max-width",e.maxWidth),d=D("min-height",e.minHeight),p=D("min-width",e.minWidth),g=D("box-shadow",e.shadow?F.shadows[e.shadow]:void 0),u=D("gap",e.gap===void 0?void 0:F.spacing[e.gap]),f=D("background-color",e.bgColor),h=D("background",e.bgGradient),b=D("flex-direction",e.flexDirection),y=D("flex-grow",e.flexGrow),m=D("justify-content",e.justify),j=D("justify-self",e.justifySelf),w=D("align-items",e.alignItems),v=D("align-self",e.alignSelf),k=D("flex-wrap",e.wrap);return`
|
|
20
20
|
${n}
|
|
21
21
|
${i}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
${r}
|
|
60
60
|
${a}
|
|
61
61
|
}
|
|
62
|
-
`},je={shouldForwardProp:e
|
|
62
|
+
`},je={shouldForwardProp:e=>!$t.includes(e)},ve=s.st.div.withConfig(je)`
|
|
63
63
|
${fe}
|
|
64
64
|
${he}
|
|
65
65
|
${be}
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
${me}
|
|
92
92
|
${ye}
|
|
93
93
|
${we}
|
|
94
|
-
`,
|
|
94
|
+
`,Vn=s.st(ve)`
|
|
95
95
|
${({theme:e,$center:n=!1,$styleMd:i,$styleSm:r})=>`
|
|
96
96
|
${n?"margin: auto;":""}
|
|
97
97
|
scrollbar-color: ${e.palette.gray[600]} ${e.palette.gray[100]};
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
${r};
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
|
-
`,$=x.forwardRef(function({as:n="div",center:i,children:r,id:a,onHover:o,onLeave:l,styleMd:c,styleSm:d,...p},g){return t.jsx(
|
|
111
|
+
`,$=x.forwardRef(function({as:n="div",center:i,children:r,id:a,onHover:o,onLeave:l,styleMd:c,styleSm:d,...p},g){return t.jsx(Vn,{$center:i,$styleMd:c,$styleSm:d,as:n,id:a,onMouseLeave:l,onMouseOver:o,ref:g,...p,children:r})}),Yn=s.st(Ye)`
|
|
112
112
|
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[800],$display:r="block",$fontFamily:a=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$overflow:p="unset",$size:g,$sizeMd:u,$sizeSm:f,$textFill:h="unset",$whiteSpace:b="pre-line",$wordBreak:y="normal"})=>`
|
|
113
113
|
background: ${n};
|
|
114
114
|
color: ${i};
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
line-height: ${e.spacing[d??c]};
|
|
139
139
|
}
|
|
140
140
|
`}
|
|
141
|
-
`,
|
|
141
|
+
`,mt=s.st(Ye)`
|
|
142
142
|
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[600],$display:r="block",$fontFamily:a=e.typography.type.primary,$fontWeight:o="regular",$fontStyle:l="normal",$letterSpacing:c=0,$lineSpacing:d=1.25,$lineSpacingSm:p,$overflow:g="unset",$size:u,$sizeMd:f,$sizeSm:h,$textFill:b="unset",$whiteSpace:y="pre-line",$wordBreak:m="normal"})=>`
|
|
143
143
|
background: ${n};
|
|
144
144
|
color: ${i};
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
line-height: ${e.spacing[p??d]};
|
|
170
170
|
}
|
|
171
171
|
`}
|
|
172
|
-
`,
|
|
172
|
+
`,qn=s.st(qe)`
|
|
173
173
|
${({theme:e,$color:n=e.palette.gray[600],$content:i=void 0,$display:r="inline",$fontWeight:a="regular",$size:o,$lineSpacing:l=1.25})=>`
|
|
174
174
|
color: ${n};
|
|
175
175
|
display: ${r};
|
|
@@ -182,11 +182,11 @@
|
|
|
182
182
|
|
|
183
183
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
184
184
|
`}
|
|
185
|
-
`,U=x.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:b,textFill:y,whiteSpace:m,wordBreak:j,...w},v){return t.jsx(
|
|
185
|
+
`,U=x.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:b,textFill:y,whiteSpace:m,wordBreak:j,...w},v){return t.jsx(Yn,{$bgGradient:n,$color:a,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:f,$sizeMd:h,$sizeSm:b,$textFill:y,$whiteSpace:m,$wordBreak:j,className:r,ref:v,...w,children:i})}),pe=x.forwardRef(function({children:n,color:i,content:r,display:a,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:f,...h},b){return t.jsx(qn,{$color:i,$content:r,$display:a,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:f,ref:b,...h,children:n})}),z=x.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:b,textFill:y,whiteSpace:m,wordBreak:j,fontStyle:w,...v},k){return t.jsx(mt,{$bgGradient:n,$color:a,$display:o,$fontFamily:l,$fontStyle:w,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:f,$sizeMd:h,$sizeSm:b,$textFill:y,$whiteSpace:m,$wordBreak:j,className:r,ref:k,...v,children:i})}),wt=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(z,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[n,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},Kn={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Zn=s.st(qe)`
|
|
186
186
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:r,$rotation:a,$size:o,$secondaryColor:l})=>{const c=r?"":"brightness(50%)",d=r??"";return`
|
|
187
187
|
color: ${n};
|
|
188
188
|
cursor: ${e?"pointer":"inherit"};
|
|
189
|
-
font-size: ${
|
|
189
|
+
font-size: ${Kn[o]};
|
|
190
190
|
line-height: 0;
|
|
191
191
|
vertical-align: middle;
|
|
192
192
|
pointer-events: inherit;
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
&:hover:not([disabled]) {
|
|
219
219
|
transform: scale(1.2);
|
|
220
220
|
}
|
|
221
|
-
`;const N=x.forwardRef(function({clickable:n,disabled:i,hoverColor:r,icon:a,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:u,rotation:f,spanClass:h,secondaryColor:b,...y},m){return t.jsx(
|
|
221
|
+
`;const N=x.forwardRef(function({clickable:n,disabled:i,hoverColor:r,icon:a,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:u,rotation:f,spanClass:h,secondaryColor:b,...y},m){return t.jsx(Zn,{$clickable:n,$color:l,$disabled:i,$hoverColor:r,$rotation:f,$secondaryColor:b,$size:d,className:h,"data-testid":`${a}-icon`,onClick:u,ref:m,...y,children:t.jsx("i",{className:`${g} fa-${a} ${o}`,...c!==void 0?{"data-fa-mask":c}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${a}`)}),Xn=x.forwardRef(function({aligned:n="end",items:i,bgColor:r},a){const o=s.Je(),[l,c]=x.useState(i.map(p=>p.expanded??!1)),d=x.useCallback(p=>g=>{g.preventDefault(),c(u=>u.map((f,h)=>h===p?!f:f))},[]);return t.jsx($,{borderColor:o.palette.gray[200],borderTop:"1px solid",ref:a,children:i.map((p,g)=>{const u=l[g];return t.jsxs($,{bgColor:r??o.palette.white,borderBottom:"1px solid",borderColor:o.palette.gray[200],children:[t.jsx($,{"aria-controls":`panel-${p.title}`,"aria-expanded":u,"aria-label":p.title,as:"button",bgColor:r??o.palette.white,bgColorHover:o.palette.gray[100],cursor:"pointer",display:"flex",onClick:d(g),padding:[.75,.75,.75,.75],width:"100%",children:t.jsxs($,{as:"summary",display:"flex",flexDirection:n==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:p.title}),t.jsx(N,{icon:u?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),u&&t.jsx(wt,{item:p})]},p.title)})})}),Qn=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:ei}=q(e=>({error:`
|
|
222
222
|
background: ${e.palette.error[50]};
|
|
223
223
|
border: 1px solid ${e.palette.error[500]};
|
|
224
224
|
color: ${e.palette.error[700]};
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
color: ${e.palette.warning[700]};
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`})),
|
|
273
|
+
`})),ti=s.st.div`
|
|
274
274
|
${({theme:e,$variant:n})=>`
|
|
275
275
|
background: transparent;
|
|
276
276
|
align-items: center;
|
|
@@ -290,12 +290,12 @@
|
|
|
290
290
|
background-color: transparent;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
${
|
|
293
|
+
${ei(e,n??"error")}
|
|
294
294
|
`}
|
|
295
|
-
`,
|
|
295
|
+
`,ni=s.st.div`
|
|
296
296
|
padding-right: 4px;
|
|
297
297
|
width: 100%;
|
|
298
|
-
`,{getVariant:
|
|
298
|
+
`,{getVariant:ii}=q(e=>({ghost:`
|
|
299
299
|
background: transparent;
|
|
300
300
|
border: none;
|
|
301
301
|
color: ${e.palette.gray[800]};
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
background-color: ${e.palette.primary[500]};
|
|
370
370
|
color: ${e.palette.white};
|
|
371
371
|
}
|
|
372
|
-
`})),
|
|
372
|
+
`})),jt=s.st(Ve)`
|
|
373
373
|
${({theme:e,justify:n,$size:i,$variant:r})=>`
|
|
374
374
|
align-items: center;
|
|
375
375
|
border-radius: var(--btn-spacing);
|
|
@@ -391,9 +391,9 @@
|
|
|
391
391
|
${r!=="link"?`--btn-padding-y: ${e.spacing[1]}`:""};
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
${
|
|
394
|
+
${ii(e,r??"primary")}
|
|
395
395
|
`}
|
|
396
|
-
`,
|
|
396
|
+
`,ri=s.st(jt)`
|
|
397
397
|
${({theme:e,borderRadius:n="4px",px:i=.5,py:r=.5})=>`
|
|
398
398
|
--btn-spacing: ${n};
|
|
399
399
|
--btn-padding-x: ${e.spacing[i]};
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
margin: 0 !important;
|
|
408
408
|
}
|
|
409
409
|
`}
|
|
410
|
-
`,
|
|
410
|
+
`,ai=s.st(ve)``,oi=s.st.div`
|
|
411
411
|
${({theme:e,$maxWidth:n="320px"})=>`
|
|
412
412
|
background-color: ${e.palette.gray[700]};
|
|
413
413
|
border-radius: 8px;
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
width: max-content;
|
|
419
419
|
z-index: 999999;
|
|
420
420
|
`}
|
|
421
|
-
`,G=({children:e,disabled:n=!1,display:i="inline-block",height:r,icon:a,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:b})=>{const y=s.Je(),[m,j]=x.useState(!1),{refs:w,floatingStyles:v,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:j,open:m,placement:g,whileElementsMounted:s.autoUpdate}),C=s.useHover(k,{delay:{close:0,open:500},move:!1}),E=s.useFocus(k),T=s.useRole(k,{role:a?"label":"tooltip"}),{getReferenceProps:S,getFloatingProps:R}=s.useInteractions([C,E,T]);return n?t.jsx(x.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(
|
|
421
|
+
`,G=({children:e,disabled:n=!1,display:i="inline-block",height:r,icon:a,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:b})=>{const y=s.Je(),[m,j]=x.useState(!1),{refs:w,floatingStyles:v,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:j,open:m,placement:g,whileElementsMounted:s.autoUpdate}),C=s.useHover(k,{delay:{close:0,open:500},move:!1}),E=s.useFocus(k),T=s.useRole(k,{role:a?"label":"tooltip"}),{getReferenceProps:S,getFloatingProps:R}=s.useInteractions([C,E,T]);return n?t.jsx(x.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(ai,{...S(),display:i,height:r,id:c,ref:w.setReference,width:b,children:a?t.jsx(N,{clickable:!0,disabled:n,icon:a,iconColor:o,iconSize:l??"xxs",iconType:m?"fa-solid":"fa-light"}):e}),m&&!h&&ae.createPortal(t.jsxs(oi,{...R(),$maxWidth:d,id:`floating-${c}`,ref:w.setFloating,style:v,children:[s.lodashExports.isEmpty(f)?void 0:t.jsx(z,{color:y.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),s.lodashExports.isEmpty(u)?void 0:t.jsx(z,{color:y.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},B=x.forwardRef(function({borderRadius:n,disabled:i,icon:r,iconColor:a,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:u,py:f,type:h="button",tooltip:b,tooltipPlace:y,value:m,variant:j="primary",...w},v){const k=t.jsx(ri,{$variant:j,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:p,onClick:g,px:u,py:f,ref:v,type:h,value:m,...w,children:t.jsx(N,{clickable:!1,icon:r,iconColor:a,iconSize:o,iconTransform:l,iconType:c})}),E=(h+(j??"")+(d??r)).replace(/ /u,"_");return b===void 0?k:t.jsx(G,{id:`${E}-tooltip`,place:y,tip:b,children:k})}),si=x.forwardRef(function({autoHide:n=!1,children:i,closable:r=!1,iconEnabled:a=!0,onTimeOut:o,show:l=!0,time:c=8,variant:d="error",id:p,...g},u){const[f,h]=x.useState(l),b=x.useCallback(()=>{h(!1)},[]);return x.useEffect(()=>{const y=setTimeout(()=>{o==null||o(!0),n&&b()},c*1e3);return()=>{clearTimeout(y)}},[n,b,c,o]),x.useEffect(()=>{h(l)},[l,h]),t.jsx($,{display:f?"block":"none",ref:u,role:"alert",...g,children:t.jsxs(ti,{$variant:d,id:p,children:[a?t.jsx(N,{clickable:!1,icon:Qn(d),iconSize:"xs",iconType:"fa-light"}):void 0,t.jsx(ni,{children:i}),r?t.jsx(B,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:b,px:.125,py:.125,variant:"ghost"}):void 0]})})}),ct=s.st.div`
|
|
422
422
|
${({theme:e})=>`
|
|
423
423
|
align-items: center;
|
|
424
424
|
background-color: ${e.palette.gray[200]};
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
width: ${e.spacing[1.25]};
|
|
435
435
|
height: ${e.spacing[1.25]};
|
|
436
436
|
`}
|
|
437
|
-
`,
|
|
437
|
+
`,li=s.st.div`
|
|
438
438
|
ul,
|
|
439
439
|
ol {
|
|
440
440
|
padding-top: 6px;
|
|
@@ -498,7 +498,7 @@
|
|
|
498
498
|
#menu-profile-container li div {
|
|
499
499
|
min-width: unset;
|
|
500
500
|
}
|
|
501
|
-
`,{getVariant:
|
|
501
|
+
`,{getVariant:ci}=q(e=>({default:`
|
|
502
502
|
background-color: ${e.palette.gray[200]};
|
|
503
503
|
color: ${e.palette.gray[800]};
|
|
504
504
|
`,error:`
|
|
@@ -573,7 +573,7 @@
|
|
|
573
573
|
background-color: ${e.palette.warning[400]};
|
|
574
574
|
color: ${e.palette.warning[700]};
|
|
575
575
|
}
|
|
576
|
-
`})),
|
|
576
|
+
`})),di=s.st.span`
|
|
577
577
|
${({theme:e,$fontSize:n=e.typography.text.xs,$variant:i})=>`
|
|
578
578
|
align-items: center;
|
|
579
579
|
border-radius: ${e.spacing[i==="technique"?1:.25]};
|
|
@@ -594,9 +594,9 @@
|
|
|
594
594
|
display: flex;
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
-
${
|
|
597
|
+
${ci(e,i)}
|
|
598
598
|
`}
|
|
599
|
-
`,{getVariant:
|
|
599
|
+
`,{getVariant:pi}=q(e=>({highRelevance:`
|
|
600
600
|
color: ${e.palette.primary[500]};
|
|
601
601
|
|
|
602
602
|
&:hover:not([disabled]) {
|
|
@@ -608,7 +608,7 @@
|
|
|
608
608
|
&:hover:not([disabled]) {
|
|
609
609
|
color: ${e.palette.gray[500]};
|
|
610
610
|
}
|
|
611
|
-
`})),
|
|
611
|
+
`})),vt=s.nt`
|
|
612
612
|
${({theme:e,$color:n,$variant:i})=>`
|
|
613
613
|
align-items: center;
|
|
614
614
|
cursor: pointer;
|
|
@@ -630,13 +630,13 @@
|
|
|
630
630
|
text-decoration: none;
|
|
631
631
|
}
|
|
632
632
|
|
|
633
|
-
${n?`color: ${n}`:
|
|
633
|
+
${n?`color: ${n}`:pi(e,i)}
|
|
634
634
|
`}
|
|
635
|
-
`,
|
|
636
|
-
${
|
|
637
|
-
`,
|
|
638
|
-
${
|
|
639
|
-
`,K=({children:e,color:n,download:i,href:r,iconPosition:a="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=r.startsWith("https://"),p=t.jsx(N,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(
|
|
635
|
+
`,gi=s.st.a`
|
|
636
|
+
${vt}
|
|
637
|
+
`,ui=s.st(We.Link)`
|
|
638
|
+
${vt}
|
|
639
|
+
`,K=({children:e,color:n,download:i,href:r,iconPosition:a="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=r.startsWith("https://"),p=t.jsx(N,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(gi,{$color:n,$variant:c,download:i,href:r,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[a==="left"?p:void 0,e,a==="right"?p:void 0]}):t.jsxs(ui,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:r,children:[l!==void 0&&a==="left"?p:void 0,e,l!==void 0&&a==="right"?p:void 0]})},V=({disabled:e,icon:n,iconColor:i="inherit",iconType:r="fa-light",id:a="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const b=f.length>25&&s.lodashExports.isEmpty(u+o),y=`${f.slice(0,25)}...`;return t.jsxs(pe,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(di,{$fontSize:l,$variant:h,className:g,children:[n&&t.jsx(N,{icon:n,iconColor:i,iconSize:"xxs",iconType:r}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:u}),t.jsx("span",{children:b?y:f}),t.jsx("strong",{className:"w-full",children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:a,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(K,{href:c,children:d})]})},kt=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},P=x.forwardRef(function({children:n,disabled:i=!1,external:r=!1,fontSize:a,href:o,id:l,icon:c,iconColor:d,iconType:p,name:g,onClick:u,rightIcon:f,tag:h,type:b="button",tooltip:y,tooltipPlace:m="bottom",underline:j=!1,value:w,variant:v="primary",width:k,...C},E){const T=y!==void 0,S=`${l}-tooltip`,R=x.useCallback(()=>{o&&kt(o,r)},[r,o]),I=t.jsxs(jt,{$size:a,$variant:v,"aria-disabled":i,className:j?"underline":void 0,disabled:i,id:l,name:g,onClick:v==="link"?R:u,ref:E,type:b,value:w,width:k,...T?{"data-tooltip-id":S}:{},...C,children:[c!==void 0&&t.jsx(N,{icon:c,iconColor:d??void 0,iconSize:"xs",iconType:p??"fa-light"}),n,f||v==="link"?t.jsx(N,{icon:f??"arrow-right",iconSize:"xs",iconType:"fa-light"}):void 0,h===void 0?null:t.jsx(V,{tagLabel:h,variant:"default"})]});return T?t.jsx(G,{disabled:!T,id:S,place:m,tip:y,width:k,children:I}):I}),xi=x.forwardRef(function({children:n,onClick:i,userName:r,showIcon:a=!1,showUsername:o=!1},l){const c=!!i;return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(P,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(ct,{children:r[0].toUpperCase()}),o?t.jsx(z,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:r.split(" ")[0]}):void 0,a?t.jsx(N,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(ct,{children:r[0].toUpperCase()}),o?t.jsxs(z,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",r.split(" ")[0],"!"]}):void 0,a?t.jsx(N,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(li,{children:n})]})})}),Ne=({authorEmail:e,date:n,description:i,descriptionColor:r,id:a,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.Je();return t.jsxs($,{width:"100%",children:[typeof o=="string"||p?t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,width:"100%",children:[typeof o=="string"?t.jsx(z,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:c,wordBreak:"break-word",children:o}):o,p&&t.jsx(G,{icon:"circle-info",id:a,place:"top",tip:p})]}):void 0,t.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(z,{color:r??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:i}),n&&t.jsx(z,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(z,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`})]})]})},dt=s.st($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
640
640
|
& img {
|
|
641
641
|
display: block;
|
|
642
642
|
}
|
|
@@ -651,7 +651,7 @@
|
|
|
651
651
|
pointer-events: none;
|
|
652
652
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
653
653
|
}
|
|
654
|
-
`,
|
|
654
|
+
`,fi=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},hi=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,fi(n)),Ct=({alt:e,fileType:n,width:i="100%",opacity:r=0,src:a,height:o="auto",videoViewStatus:l})=>{const[c,d]=x.useState({start:!1,half:!1,end:!1}),p=x.useCallback(g=>{if(!l)return;const u=g.target,f=u.currentTime/u.duration*100;f>5&&f<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):f>=50&&f<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):f>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return n==="video"||hi(["webm"],a)?t.jsx(dt,{$opacity:r,children:t.jsx(K,{href:a,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:o,width:i},children:[t.jsx("source",{src:a,type:"video/webm"}),a]})})}):t.jsx(dt,{$opacity:r,children:t.jsx("img",{alt:e,src:a,style:{height:o,width:i}})})},bi=({alt:e,authorEmail:n,date:i,description:r,src:a,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0,videoViewStatus:f})=>{const h=s.Je(),[b,y]=x.useState(!1),m=x.useCallback(()=>{y(!0)},[]),j=x.useCallback(()=>{y(!1)},[]);return t.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:m,onLeave:j,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(x.Fragment,{children:[t.jsx(Ct,{alt:e,fileType:g,height:"147px",opacity:b?.3:0,src:a,videoViewStatus:f,width:"100%"}),u?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(Ne,{authorEmail:n,date:i,description:r,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},yi=s.st.div`
|
|
655
655
|
${({theme:e,$align:n="center",$minWidth:i="auto",$minHeight:r="auto"})=>`
|
|
656
656
|
display: flex;
|
|
657
657
|
background-color: ${e.palette.white};
|
|
@@ -670,7 +670,7 @@
|
|
|
670
670
|
text-align: ${n};
|
|
671
671
|
}
|
|
672
672
|
`}
|
|
673
|
-
`,Ke=({htmlFor:e,label:n,link:i,required:r,tooltip:a,weight:o="normal"})=>{const l=s.Je(),c=`${e}-tooltip`,d=a!==void 0&&!s.lodashExports.isEmpty(a);return t.jsxs("label",{className
|
|
673
|
+
`,Ke=({htmlFor:e,label:n,link:i,required:r,tooltip:a,weight:o="normal"})=>{const l=s.Je(),c=`${e}-tooltip`,d=a!==void 0&&!s.lodashExports.isEmpty(a);return t.jsxs("label",{className:"flex gap-1 w-full",htmlFor:e,style:{fontWeight:l.typography.weight[o]},children:[n,r&&t.jsx(N,{icon:"asterisk",iconColor:l.palette.error[500],iconSize:"xxss"}),i?t.jsx(K,{href:i,target:"_blank"}):null,d?t.jsx(G,{display:"inline-flex",icon:"circle-info",id:c,place:"top",tip:a}):null]})},$i=s.st.div`
|
|
674
674
|
${({theme:e})=>`
|
|
675
675
|
align-items: flex-start;
|
|
676
676
|
display: inline-flex;
|
|
@@ -813,7 +813,7 @@
|
|
|
813
813
|
border: 1px solid ${e.palette.gray[600]};
|
|
814
814
|
}
|
|
815
815
|
`}
|
|
816
|
-
`,J=({children:e,id:n,error:i,helpLink:r,helpLinkText:a="Link here",helpText:o,htmlFor:l,label:c,linkPosition:d="down",maxLength:p,required:g,tooltip:u,value:f,weight:h})=>{const b=s.Je(),y=f?f.length:0;return t.jsxs(
|
|
816
|
+
`,J=({children:e,id:n,error:i,helpLink:r,helpLinkText:a="Link here",helpText:o,htmlFor:l,label:c,linkPosition:d="down",maxLength:p,required:g,tooltip:u,value:f,weight:h})=>{const b=s.Je(),y=f?f.length:0;return t.jsxs($i,{id:n,children:[c===void 0?void 0:t.jsx(Ke,{htmlFor:l,label:c,link:d==="up"?r:void 0,required:g,tooltip:u,weight:h}),e,i||p?t.jsxs($,{display:"flex",justify:i===void 0?"end":"space-between",width:"100%",children:[i&&t.jsx(z,{className:"error-msg",color:b.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:i}),p&&t.jsx(V,{priority:"low",tagLabel:`${y}/${p}`,variant:"error"})]}):void 0,o||r?t.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[o&&t.jsxs(t.Fragment,{children:[t.jsx(N,{icon:"circle-info",iconColor:b.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(z,{color:b.palette.gray[400],display:"inline-block",size:"sm",children:o})]}),r&&d==="down"?t.jsx(K,{href:r,children:a}):void 0]}):void 0]})},ke=({className:e,children:n,isFilter:i=!1,popoverRef:r,state:a,triggerRef:o,...l})=>{var u;const c=x.useRef(null),d=(u=o==null?void 0:o.current)==null?void 0:u.getBoundingClientRect(),{popoverProps:p}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:r??c,triggerRef:o,isNonModal:r?!0:void 0},a),g=x.useCallback(f=>{f.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,id:"popover",onPointerDown:i?g:void 0,ref:r??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:n})})},mi=s.st.ul`
|
|
817
817
|
${({theme:e,$multiSelection:n})=>`
|
|
818
818
|
align-self: center;
|
|
819
819
|
background: ${e.palette.white};
|
|
@@ -833,7 +833,7 @@
|
|
|
833
833
|
border-bottom: ${n?`1px solid ${e.palette.gray[200]}`:"unset"};
|
|
834
834
|
}
|
|
835
835
|
`}
|
|
836
|
-
`,
|
|
836
|
+
`,wi=s.st.li`
|
|
837
837
|
${({theme:e,$multiSelection:n})=>`
|
|
838
838
|
align-items: center;
|
|
839
839
|
color: ${e.palette.gray[800]};
|
|
@@ -876,7 +876,7 @@
|
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
878
|
`}
|
|
879
|
-
`,
|
|
879
|
+
`,ji=s.st.label`
|
|
880
880
|
${({theme:e})=>`
|
|
881
881
|
align-items: center;
|
|
882
882
|
color: ${e.palette.gray[600]};
|
|
@@ -948,7 +948,7 @@
|
|
|
948
948
|
fill: ${e.palette.white};
|
|
949
949
|
}
|
|
950
950
|
`}
|
|
951
|
-
`,ne=x.forwardRef(function({checked:n,disabled:i=!1,label:r,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...u},f){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(
|
|
951
|
+
`,ne=x.forwardRef(function({checked:n,disabled:i=!1,label:r,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...u},f){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(ji,{"aria-disabled":i,children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-hidden":!1,"aria-label":a,checked:n,"data-testid":r??g,disabled:i,id:a,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:f,type:"checkbox",value:g,...u}),t.jsx(N,{disabled:i,icon:"check",iconSize:"sm"}),r??g]}),p===void 0?void 0:t.jsx(G,{icon:"circle-info",id:p,place:"right",tip:p})]})}),ie=(e,n,i=!1,r)=>{x.useEffect(()=>{var o;const a=l=>{e&&!e.contains(l.target)&&!(r!=null&&r.contains(l.target))&&n()};return i?(document.addEventListener("mousedown",a,!0),()=>{document.removeEventListener("mousedown",a,!0)}):((o=document.getElementById("root"))==null||o.addEventListener("mousedown",a,!0),()=>{var l;(l=document.getElementById("root"))==null||l.removeEventListener("mousedown",a,!0)})},[i,e,r,n])},St=({item:e,multiSelection:n,name:i,register:r,setInputValue:a,setValue:o,state:l,watch:c})=>{var T,S,R;const d=s.Je(),p=x.useRef(null),g=e.props.hrefLang,u=l.disabledKeys,f=Array.from(l.collection.getKeys()).filter(I=>!Array.from(u).includes(I)&&I!=="All"),{optionProps:h,isSelected:b,isFocused:y,isDisabled:m}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,p),j=[b?"selected":"",y?"focused":"",m?"disabled":""].join(" "),w=x.useCallback(I=>{a(""),o==null||o(`${i}Options`,""),I.currentTarget.checked&&(a(I.currentTarget.value),o==null||o(`${i}Options`,f))},[f,i,a,o]),v=x.useCallback(()=>{const I=c==null?void 0:c(`${i}Options`),L=typeof I=="string"?[I]:I;s.isEqual(f,L)&&!Array.from(u).includes("All")?(o==null||o("checkAll","All vulnerability types"),a("All vulnerability types")):(o==null||o("checkAll",""),a((L==null?void 0:L.length)<=2?L.join(", "):`${L.slice(0,2).join(", ")+`, +${L.length-2} more`}`))},[u,f,i,a,o,c]),k=e.key==="All"?t.jsx(ne,{...r==null?void 0:r("checkAll",{onChange:w}),label:(T=e.rendered)==null?void 0:T.toString(),name:"checkAll",value:(S=e.rendered)==null?void 0:S.toString()}):t.jsx(ne,{...r==null?void 0:r(`${i}Options`,{onChange:v}),label:(R=e.rendered)==null?void 0:R.toString(),name:`${i}Options`,value:e.key.toString()}),C=n&&!m?k:t.jsx(z,{color:d.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),E=x.useCallback(I=>{var L;I.preventDefault(),a(((L=e.rendered)==null?void 0:L.toString())??""),l.setSelectedKey(e.key),setTimeout(()=>{l.setOpen(!1)},50),kt(g)},[g,e.key,e.rendered,l,a]);return ie(document.getElementsByClassName("dropdown")[0],()=>{n&&l.close()},!0,document.getElementById("combobox")),t.jsxs(wi,{...!n&&!g?h:{},$multiSelection:n,className:j,ref:p,children:[g?t.jsx(K,{href:g,onClick:E,children:C}):C,b&&!m&&!n?t.jsx(N,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:t.jsx(V,{tagLabel:e.textValue,variant:"inactive"})]})},Be=({field:e,disabled:n=!1,disabledKeys:i,error:r,helpLink:a,helpLinkText:o,helpText:l,label:c,loadingItems:d,name:p,multiSelection:g=!1,items:u,onBlur:f,onChange:h,placeholder:b,register:y,required:m,setValue:j,tooltip:w,value:v,watch:k,weight:C})=>{var st;const E=s.Je(),T=n?void 0:r,S=(e==null?void 0:e.value)??v,[R,I]=x.useState(((st=u.find(A=>A.value===S))==null?void 0:st.name)??""),[L,Y]=x.useState(S),[Z,te]=x.useState(u),[W,M]=x.useState(!1),{contains:O}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),oe=x.useRef(null),Ae=x.useRef(null),Pe=x.useRef(null),rt=x.useRef(null),at=x.useRef(null),mn=x.useMemo(()=>u.toSorted((A,H)=>{const _=Array.from(i??[]),se=_.includes(A.value),lt=_.includes(H.value);return se&&!lt?1:!se&<?-1:0}).map(A=>O(A.name,R)||W?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":A.value,hrefLang:A.href,textValue:A.tag,children:A.name},A.value):null),[O,i,R,u,W]),wn=x.useCallback(A=>{const H=A.split(/,|\s/u).slice(-1)[0].trim();I(g?H:A),A===""||A.endsWith(",")?M(!0):(M(!1),Y(_=>{const se=A===""?"":_;return e&&e.onChange(se),h&&h(A),se}),te(u.filter(_=>O(_.name,g?H:A))))},[O,u,e,g,h]),jn=x.useCallback(A=>{var H;I(((H=u.find(_=>_.value===A))==null?void 0:H.name)??""),Y(A?String(A):""),e&&e.onChange(A),h&&h(A?String(A):""),te(u)},[u,e,h]),ot=x.useCallback(A=>{A.key==="Enter"&&A.preventDefault(),M(!1)},[]),vn=x.useCallback(()=>{f&&f(),e&&e.onBlur()},[e,f]),kn=x.useCallback(()=>{M(!0)},[]),X=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:g,allowsEmptyCollection:!0,disabledKeys:i,inputValue:R,items:Z,menuTrigger:"focus",shouldCloseOnBlur:!g,selectedKey:L,onBlur:vn,onInputChange:wn,onKeyDown:ot,onKeyUp:kn,onOpenChange(A,H){M(A&&(H==="manual"||H==="focus")),A&&setTimeout(()=>{var _;return(_=oe.current)==null?void 0:_.focus()},50)},onSelectionChange:g?void 0:jn,children:mn}),{buttonProps:Cn,inputProps:Sn,listBoxProps:zn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:R,buttonRef:Ae,id:p,inputRef:oe,label:c??p,listBoxRef:Pe,name:p,placeholder:b,popoverRef:at},X),{listBoxProps:In}=s.$c132121280ec012d$export$50eacbbf140a3141(zn,X,Pe),{buttonProps:Tn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(Cn,Ae);return x.useEffect(()=>{var A;if((d===!1||!S)&&!g){const H=((A=u.find(_=>_.value===S))==null?void 0:A.name)??"";I(H),Y(H)}},[S,u,d,g]),t.jsxs(J,{error:T,helpLink:a,helpLinkText:o,helpText:l,htmlFor:p,id:"combobox",label:c,required:m,tooltip:w,weight:C,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${T?"error":""}`,ref:rt,children:[t.jsx("input",{...Sn,"aria-invalid":T?"true":"false","aria-label":p,disabled:n,onKeyDown:ot,ref:oe}),T?t.jsx(N,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"xs"}):void 0,t.jsx(B,{...Tn,className:"action",disabled:n,icon:X.isOpen&&!n?"chevron-up":"chevron-down",iconColor:E.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:Ae,type:"button",variant:"ghost"})]}),X.isOpen&&X.collection.size>0&&!n?t.jsx(ke,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:at,state:X,triggerRef:rt,children:t.jsx(mi,{...In,$multiSelection:g&&!Array.from(i??[]).includes("All"),ref:Pe,children:[...X.collection].map(A=>t.jsx(St,{item:A,multiSelection:g,name:p,register:y,setInputValue:I,setValue:j,state:X,watch:k},A.key))})}):null]})},Ze=({control:e,disabled:n=!1,disabledKeys:i,error:r,helpLink:a,helpLinkText:o,helpText:l,label:c,loadingItems:d,name:p,multiSelection:g,items:u,onBlur:f,onChange:h,placeholder:b,register:y,required:m,setValue:j,tooltip:w,value:v,watch:k,weight:C})=>e?t.jsx(s.Controller,{control:e,name:p,render:({field:E,fieldState:T})=>{var S;return t.jsx(Be,{disabled:n,disabledKeys:i,error:(S=T.error)==null?void 0:S.message,field:E,helpLink:a,helpLinkText:o,helpText:l,items:u,label:c,loadingItems:d,multiSelection:g,name:p,onBlur:f,onChange:h,placeholder:b,register:y,required:m,setValue:j,tooltip:w,value:v,watch:k,weight:C})},rules:{required:m}}):t.jsx(Be,{disabled:n,disabledKeys:i,error:r,helpLink:a,helpLinkText:o,helpText:l,items:u,label:c,loadingItems:d,multiSelection:g,name:p,onBlur:f,onChange:h,placeholder:b,required:m,tooltip:w,value:v,weight:C}),vi=s.st.div`
|
|
952
952
|
${({theme:e})=>`
|
|
953
953
|
align-items: center;
|
|
954
954
|
color: ${e.palette.gray[800]};
|
|
@@ -969,7 +969,7 @@
|
|
|
969
969
|
display: none;
|
|
970
970
|
}
|
|
971
971
|
`}
|
|
972
|
-
`,
|
|
972
|
+
`,ki=s.st.div.attrs({className:"year-selection"})`
|
|
973
973
|
align-items: flex-start;
|
|
974
974
|
display: flex;
|
|
975
975
|
flex-direction: column;
|
|
@@ -980,12 +980,12 @@
|
|
|
980
980
|
padding: 0 0.5px;
|
|
981
981
|
position: relative;
|
|
982
982
|
width: 8px;
|
|
983
|
-
`,
|
|
983
|
+
`,pt=s.st.tr`
|
|
984
984
|
align-items: flex-start;
|
|
985
985
|
display: flex;
|
|
986
986
|
padding: ${({theme:e})=>e.spacing[.25]} 0;
|
|
987
987
|
width: 100%;
|
|
988
|
-
`,
|
|
988
|
+
`,zt=s.nt`
|
|
989
989
|
${({theme:e})=>`
|
|
990
990
|
align-items: center;
|
|
991
991
|
color: ${e.palette.gray[800]};
|
|
@@ -1001,11 +1001,11 @@
|
|
|
1001
1001
|
text-align: center;
|
|
1002
1002
|
width: ${e.spacing[2.5]};
|
|
1003
1003
|
`}
|
|
1004
|
-
`,
|
|
1005
|
-
${
|
|
1006
|
-
`,
|
|
1004
|
+
`,Ci=s.st.th`
|
|
1005
|
+
${zt}
|
|
1006
|
+
`,Si=s.st.td`
|
|
1007
1007
|
${({theme:e})=>`
|
|
1008
|
-
${
|
|
1008
|
+
${zt}
|
|
1009
1009
|
height: ${e.spacing[2.5]};
|
|
1010
1010
|
width: ${e.spacing[2.5]};
|
|
1011
1011
|
|
|
@@ -1053,14 +1053,14 @@
|
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
1055
|
`}
|
|
1056
|
-
`,
|
|
1056
|
+
`,zi=s.st.div.attrs({className:"dot"})`
|
|
1057
1057
|
position: absolute;
|
|
1058
1058
|
top: 48%;
|
|
1059
1059
|
|
|
1060
1060
|
> span {
|
|
1061
1061
|
font-size: 4px;
|
|
1062
1062
|
}
|
|
1063
|
-
`,
|
|
1063
|
+
`,gt=s.st.button`
|
|
1064
1064
|
cursor: pointer;
|
|
1065
1065
|
display: flex;
|
|
1066
1066
|
|
|
@@ -1068,7 +1068,7 @@
|
|
|
1068
1068
|
height: 3.5px;
|
|
1069
1069
|
width: 7px;
|
|
1070
1070
|
}
|
|
1071
|
-
`,
|
|
1071
|
+
`,Xe=s.st.div`
|
|
1072
1072
|
${({theme:e})=>`
|
|
1073
1073
|
align-items: end;
|
|
1074
1074
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1080,9 +1080,9 @@
|
|
|
1080
1080
|
padding: 0 ${e.spacing[.25]};
|
|
1081
1081
|
width: 100%;
|
|
1082
1082
|
`}
|
|
1083
|
-
`,
|
|
1083
|
+
`,It=({state:e,date:n})=>{const i=x.useRef(null),r=s.$14e0f24ef4ac5c92$export$629b0a497aa65267(n,s.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:a,buttonProps:o,isSelected:l,isDisabled:c,formattedDate:d}=s.$36a0ac60f04457c5$export$136073280381448e({date:n},e,i),p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,u=l&&!c&&!(p||g)?"range":"";return t.jsx(Si,{id:u,...a,children:t.jsxs("div",{...o,className:`cell ${p||g?"selected":""}
|
|
1084
1084
|
${c?"disabled":""} ${r?"today":""}
|
|
1085
|
-
${!e.isFocused&&!r?"focused":""} ${u}`,ref:i,children:[d,r?t.jsx(
|
|
1085
|
+
${!e.isFocused&&!r?"focused":""} ${u}`,ref:i,children:[d,r?t.jsx(zi,{children:t.jsx(N,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},De=({state:e,...n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{weekDays:r}=s.$e3031d1f8c9d64eb$export$cb95147730a423f5(n,e),a=s.$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(e.visibleRange.start,i);return t.jsxs("table",{children:[t.jsx("thead",{children:t.jsx(pt,{children:r.map((o,l)=>{const c=`key_${l}`;return t.jsx(Ci,{children:o},c)})})}),t.jsx("tbody",{children:[...new Array(a).keys()].map(o=>t.jsx(pt,{children:e.getDatesInWeek(o).map((l,c)=>{const d=`key_${c}`;return l?t.jsx(It,{date:l,state:e},d):t.jsx("td",{},d)})},o))})]})},Ii=s.st(Ve)`
|
|
1086
1086
|
align-items: center;
|
|
1087
1087
|
background-color: inherit;
|
|
1088
1088
|
border-color: inherit;
|
|
@@ -1102,7 +1102,7 @@
|
|
|
1102
1102
|
background-color: ${({theme:e})=>e.palette.gray[100]};
|
|
1103
1103
|
cursor: pointer;
|
|
1104
1104
|
}
|
|
1105
|
-
`,
|
|
1105
|
+
`,Ti=s.st.div`
|
|
1106
1106
|
${({theme:e})=>`
|
|
1107
1107
|
align-items: flex-start;
|
|
1108
1108
|
background: ${e.palette.white};
|
|
@@ -1116,7 +1116,7 @@
|
|
|
1116
1116
|
padding: ${e.spacing[.25]};
|
|
1117
1117
|
width: 292px;
|
|
1118
1118
|
`}
|
|
1119
|
-
`,
|
|
1119
|
+
`,Fi=s.st.button`
|
|
1120
1120
|
${({theme:e,$disabled:n,$focus:i,$header:r})=>{const a=i?"34px":"40px";return`
|
|
1121
1121
|
align-items: center;
|
|
1122
1122
|
border-radius: ${r?`0 ${e.spacing[.5]} ${e.spacing[.5]} 0`:"4px"};
|
|
@@ -1131,7 +1131,7 @@
|
|
|
1131
1131
|
background-color: ${e.palette.gray[n?500:100]};
|
|
1132
1132
|
}
|
|
1133
1133
|
`}}
|
|
1134
|
-
`,
|
|
1134
|
+
`,Ni=s.st.div`
|
|
1135
1135
|
${({theme:e})=>`
|
|
1136
1136
|
align-items: center;
|
|
1137
1137
|
background: transparent;
|
|
@@ -1142,13 +1142,13 @@
|
|
|
1142
1142
|
justify-content: space-between;
|
|
1143
1143
|
width: calc(100% - 40px);
|
|
1144
1144
|
`}
|
|
1145
|
-
`,
|
|
1145
|
+
`,Di=s.st.div`
|
|
1146
1146
|
align-items: center;
|
|
1147
1147
|
display: flex;
|
|
1148
1148
|
justify-content: flex-end;
|
|
1149
1149
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1150
1150
|
flex: 1 0 0;
|
|
1151
|
-
`,
|
|
1151
|
+
`,ut=s.st.div`
|
|
1152
1152
|
${({theme:e})=>`
|
|
1153
1153
|
align-items: center;
|
|
1154
1154
|
align-self: stretch;
|
|
@@ -1160,7 +1160,7 @@
|
|
|
1160
1160
|
line-height: ${e.spacing[1.5]};
|
|
1161
1161
|
padding: 2px ${e.spacing[.25]};
|
|
1162
1162
|
`}
|
|
1163
|
-
`,
|
|
1163
|
+
`,xt=s.st.button`
|
|
1164
1164
|
${({theme:e})=>`
|
|
1165
1165
|
align-items: center;
|
|
1166
1166
|
background-color: inherit;
|
|
@@ -1180,7 +1180,7 @@
|
|
|
1180
1180
|
font-weight: ${e.typography.weight.bold};
|
|
1181
1181
|
}
|
|
1182
1182
|
`}
|
|
1183
|
-
`,Ie=({disabled:e=!1,icon:n,props:i})=>{const r=x.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,r);return t.jsx(
|
|
1183
|
+
`,Ie=({disabled:e=!1,icon:n,props:i})=>{const r=x.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,r);return t.jsx(Fi,{...a,$disabled:e,$focus:!!a["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:r,type:"button",children:t.jsx(N,{icon:n,iconColor:F.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ee=({state:e,prevButtonProps:n,nextButtonProps:i,title:r})=>{const a=e.focusedDate,o=x.useCallback(()=>{e.setFocusedDate(a.add({years:1}))},[a,e]),l=x.useCallback(()=>{e.setFocusedDate(a.subtract({years:1}))},[a,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(Ie,{icon:"chevron-left",props:n}),t.jsxs(vi,{children:[r,t.jsxs(ki,{children:[t.jsx(gt,{"aria-label":"top",onClick:o,children:t.jsx(N,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(gt,{"aria-label":"bottom",onClick:l,children:t.jsx(N,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(Ie,{icon:"chevron-right",props:i})]})},Tt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,r);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ee,{nextButtonProps:o,prevButtonProps:a,state:r,title:l}),t.jsx(De,{state:r}),t.jsx(Xe,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Ft=({segment:e,state:n})=>{const i=s.Je(),r=x.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,r),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:r,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},Nt=({disabled:e,error:n=!1,props:i})=>{const r=s.Je(),a=x.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,a),c=x.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(u=>u.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs(Ni,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:r.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(Ft,{segment:{...d,isEditable:!e},state:o},g)})}),n?t.jsx(N,{icon:"exclamation-circle",iconColor:r.palette.error[500],iconSize:"xs"}):void 0]})},Dt=e=>{const n=x.useRef(null),i=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:r}=i,a=!s.lodashExports.isNil(r)&&r.hour<12?"AM":"PM",[o,l]=x.useState(s.lodashExports.isNil(r)?"AM":a),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=x.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(r)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[o,i,r]);return t.jsxs(Di,{children:[t.jsx(ut,{...c,ref:n,children:i.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return t.jsx(Ft,{segment:p,state:i},u)})}),t.jsxs(ut,{children:[t.jsx(xt,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(xt,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},Te=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",Ei=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",ft=(e,n)=>s.dayjs(String(e).replace(/-/gu,"/")).hour(n.hour).minute(n.minute).second(n.second).format("YYYY/MM/DD hh:mm A"),ge=({error:e,buttonProps:n,datePickerRef:i,disabled:r=!1,granularity:a="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:u})=>{const f=x.useCallback(h=>{if(!h)return;const b=a==="day"?Te(String(h)):Ei(String(h));o.onChange&&o.onChange(h??null),g&&g(c,b,{shouldDirty:!0})},[o,a,c,g]);return t.jsxs(ee,{...l,className:`${r?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(Nt,{disabled:r,error:e!=null,props:{...o,autoFocus:!1,granularity:a,onChange:f,shouldForceLeadingZeros:!0}}),t.jsx(Ie,{disabled:r,icon:a==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:r,id:c,name:c,type:"text",value:u??""})]})},Re=({children:e,...n})=>{const i=x.useRef(null),{dialogProps:r}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(Ti,{...r,ref:i,children:e})},Et=({disabled:e=!1,error:n,helpLink:i,helpLinkText:r,helpText:a,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:u,...f})=>{const h=x.useRef(null),b=u==null?void 0:u(c),y=x.useCallback(T=>{p&&T&&p(c,Te(String(T)),{shouldDirty:!0})},[c,p]),m=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,onChange(T){y(T)},...!s._.isNil(b)&&!s._.isEmpty(b)&&s.dayjs(b).isValid()?{defaultValue:s.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}:{}}),{close:j}=m,{groupProps:w,fieldProps:v,buttonProps:k,dialogProps:C,calendarProps:E}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":l??c,name:c},m,h);return t.jsxs(J,{error:n,helpLink:i,helpLinkText:r,helpText:a,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(ge,{buttonProps:k,datePickerRef:h,disabled:e,error:n,fieldProps:v,groupProps:w,name:c,register:d,required:o,setValue:p,value:b}),m.isOpen&&!e?t.jsx(ke,{offset:8,placement:"bottom start",state:m,triggerRef:h,children:t.jsx(Re,{...C,children:t.jsx(Tt,{onClose:j,props:E})})}):null]})},Rt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=x.useRef(null),a=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(n,a,r);return t.jsxs("div",{className:"calendar-range",ref:r,children:[t.jsx(Ee,{nextButtonProps:l,prevButtonProps:o,state:a,title:c}),t.jsx(De,{state:a}),t.jsx(Xe,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Ri=s.st.div`
|
|
1184
1184
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1185
1185
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1186
1186
|
display: flex;
|
|
@@ -1191,7 +1191,7 @@
|
|
|
1191
1191
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1192
1192
|
}
|
|
1193
1193
|
`}
|
|
1194
|
-
`,
|
|
1194
|
+
`,Lt=({disabled:e=!1,error:n,label:i,name:r,required:a,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...u})=>{const f=`${r}Max`,h=`${r}Min`,b=x.useRef(null),y=x.useCallback(S=>{c&&S&&(c((d==null?void 0:d.name)??f,Te(String(S.end))),c((p==null?void 0:p.name)??h,Te(String(S.start))))},[f,h,c,d,p]),m=s.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??f,startName:(p==null?void 0:p.name)??h,onChange(S){y(S)}}),{close:j}=m,{groupProps:w,startFieldProps:v,endFieldProps:k,buttonProps:C,dialogProps:E,calendarProps:T}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":i??r},m,b);return t.jsxs(J,{error:n,htmlFor:r,label:i,required:a,tooltip:o,children:[t.jsxs(Ri,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(ge,{buttonProps:C,datePickerRef:b,disabled:e,error:n,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${r}`,validate:S=>k.value&&S>k.value?"Start date must be less than or equal to end date":null},groupProps:w,name:(p==null?void 0:p.name)??h,register:l,setValue:c,value:p==null?void 0:p.value}),t.jsx(ge,{buttonProps:C,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${r}`,validate:S=>v.value&&S<v.value?"End date must be greater than or equal to start date":null},groupProps:w,name:(d==null?void 0:d.name)??f,register:l,setValue:c,value:d==null?void 0:d.value})]}),m.isOpen&&!e?t.jsx(ke,{offset:8,placement:"bottom start",state:m,triggerRef:b,children:t.jsx(Re,{...E,children:t.jsx(Rt,{onClose:j,props:T})})}):null]})},Li=s.st.div`
|
|
1195
1195
|
${({theme:e})=>`
|
|
1196
1196
|
align-items: center;
|
|
1197
1197
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1200,19 +1200,19 @@
|
|
|
1200
1200
|
justify-content: center;
|
|
1201
1201
|
padding: ${e.spacing[.5]} ${e.spacing[1.25]};
|
|
1202
1202
|
`}
|
|
1203
|
-
`,
|
|
1203
|
+
`,Ai=s.st.div`
|
|
1204
1204
|
align-items: center;
|
|
1205
1205
|
display: flex;
|
|
1206
1206
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1207
1207
|
justify-content: flex-end;
|
|
1208
1208
|
flex: 1 0 0;
|
|
1209
|
-
`,
|
|
1209
|
+
`,At=({handleTimeChange:e,onClose:n,props:i,timeState:r})=>{const a=s.Je(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ee,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(De,{state:l}),t.jsxs(Li,{children:[t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Ai,{children:t.jsx(Dt,{hourCycle:12,label:"time-field",onChange:e,value:r.timeValue})})]}),t.jsx(Xe,{children:t.jsx(P,{onClick:n,variant:"ghost",children:"Cancel"})})]})},Pi=e=>{const{disabled:n=!1,error:i,required:r,label:a,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),u=x.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:r,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"||s.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=f,{groupProps:b,fieldProps:y,buttonProps:m,dialogProps:j,calendarProps:w}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,u),v=x.useCallback(C=>{if(w.onChange&&w.onChange(C),f.timeValue){const E=ft(C,f.timeValue);d==null||d(o,E,{shouldDirty:!0})}else f.setDateValue(C)},[w,o,d,f]),k=x.useCallback(C=>{if(C){f.setTimeValue(C);const E=f.dateValue;if(E){const T=ft(E,C);d==null||d(o,T,{shouldDirty:!0})}}},[f,d,o]);return t.jsxs(J,{error:i,htmlFor:o,label:a,required:r,tooltip:l,children:[t.jsx(ge,{buttonProps:m,datePickerRef:u,disabled:n,error:i,fieldProps:y,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:g}),f.isOpen&&!n?t.jsx(ke,{offset:8,placement:"bottom start",state:f,triggerRef:u,children:t.jsx(Re,{...j,children:t.jsx(At,{handleTimeChange:k,onClose:h,props:{...w,onChange:v},timeState:f})})}):null]})},Wi=({children:e,currentValue:n,externalLink:i,isEditing:r,label:a,name:o,tooltip:l})=>{if(r)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs($,{children:[t.jsx(Ke,{htmlFor:o,label:a,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(K,{href:d,children:c}):t.jsx(z,{size:"md",children:c})]})},Le=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:r,helpText:a,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:u,name:f,maskValue:h=!1,onPaste:b,placeholder:y,removeItemArray:m,register:j,suggestions:w,tooltip:v,type:k="text",weight:C,...E})=>{const{required:T,onBlur:S,onChange:R}=E,I=s.Je(),L=e?void 0:o,[Y,Z]=x.useState(""),te=x.useCallback(O=>{Z(O.target.value),R==null||R(O)},[R]),W=d&&p&&!e&&Y.trim()!=="",M=x.useCallback(O=>{O.key==="Enter"&&O.preventDefault()},[]);return t.jsxs(J,{error:L,helpLink:i,helpLinkText:r,helpText:a,htmlFor:f,label:g,linkPosition:u,required:T,tooltip:v,weight:C,children:[t.jsxs(ee,{className:`
|
|
1210
1210
|
${e?"disabled":""} ${L?"error":""} ${W?"success":""}
|
|
1211
|
-
`,children:[n?t.jsx(N,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":L?"true":"false","aria-label":f,"aria-required":T,autoComplete:"off",className:h?"sr-block":"","data-testid":`${f}-input`,disabled:e,id:f,list:w?`list_${f}`:void 0,onKeyDown:
|
|
1211
|
+
`,children:[n?t.jsx(N,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":L?"true":"false","aria-label":f,"aria-required":T,autoComplete:"off",className:h?"sr-block":"","data-testid":`${f}-input`,disabled:e,id:f,list:w?`list_${f}`:void 0,onKeyDown:M,onPaste:b,placeholder:y,type:k,...j?j(f,{required:T,onBlur:S,onChange:te}):{...E,onChange:te}}),L?t.jsx(N,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:I.palette.error[500],iconSize:"xs"}):void 0,W?t.jsx(N,{icon:"check-circle",iconClass:"success-icon",iconColor:I.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&c>0?t.jsx(B,{color:I.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:m?m(c):void 0,variant:"ghost"}):void 0]}),w?t.jsx("datalist",{id:`list_${f}`,children:w.map(O=>t.jsx("option",{value:O},O))}):void 0]})},Bi=s.st.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,Oi=s.st.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1212
1212
|
gap: 12px;
|
|
1213
|
-
`,
|
|
1213
|
+
`,Mi=s.st.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1214
1214
|
gap: 8px;
|
|
1215
|
-
`,ze=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,
|
|
1215
|
+
`,ze=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,Hi=s.st.div.attrs({className:"comp-col"})`
|
|
1216
1216
|
word-wrap: break-word;
|
|
1217
1217
|
|
|
1218
1218
|
${({$width:e=null})=>e===null?"":`width: ${e}`};
|
|
@@ -1236,7 +1236,7 @@
|
|
|
1236
1236
|
> .comp-card {
|
|
1237
1237
|
height: 100%;
|
|
1238
1238
|
}
|
|
1239
|
-
`,
|
|
1239
|
+
`,Oe=({children:e,xl:n,lg:i,md:r,sm:a,paddingTop:o,width:l})=>t.jsx(Hi,{$lg:i,$md:r,$paddingTop:o,$sm:a,$width:l,$xl:n,children:e}),_i=s.st.div.attrs({className:"comp-gap"})`
|
|
1240
1240
|
${({$disp:e="flex",$mh:n=4,$mv:i=4})=>`
|
|
1241
1241
|
align-items: center;
|
|
1242
1242
|
display: ${e};
|
|
@@ -1246,7 +1246,7 @@
|
|
|
1246
1246
|
margin: ${i}px ${n}px;
|
|
1247
1247
|
}
|
|
1248
1248
|
`}
|
|
1249
|
-
`,
|
|
1249
|
+
`,Ji=({children:e,disp:n,mh:i,mv:r})=>t.jsx(_i,{$disp:n,$mh:i,$mv:r,children:e}),Ui=s.st.div.attrs({className:"comp-row flex flex-row flex-wrap"})`
|
|
1250
1250
|
${({$align:e="stretch",$cols:n=100,$colsPadding:i=6,$justify:r="start"})=>`
|
|
1251
1251
|
align-items: ${e};
|
|
1252
1252
|
justify-content: ${r};
|
|
@@ -1264,24 +1264,24 @@
|
|
|
1264
1264
|
padding: ${i}px;
|
|
1265
1265
|
}
|
|
1266
1266
|
`}
|
|
1267
|
-
`,
|
|
1267
|
+
`,Pt=({align:e,children:n,cols:i,colsPadding:r,justify:a})=>t.jsx(Ui,{$align:e,$cols:i,$colsPadding:r,$justify:a,children:n}),Me=({addText:e,append:n,disabled:i=!1,fields:r,fieldState:a,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:u,onChange:f,placeholder:h,tooltip:b,remove:y,value:m})=>{var v;const j=x.useCallback(()=>{n==null||n(o)},[n,o]),w=x.useCallback(k=>()=>{y==null||y(k)},[y]);return t.jsxs(Pt,{align:"start",children:[t.jsx(Oe,{lg:75,md:75,sm:75,children:t.jsx(Le,{disabled:i,error:a?(v=a.error)==null?void 0:v.message:void 0,id:"array",indexArray:l,isTouched:a?a.isTouched:void 0,isValid:a?!a.invalid:void 0,label:d,name:g,onBlur:u,onChange:f,placeholder:h,removeItemArray:w,required:c,tooltip:b,value:m})}),l<p-1&&l+1===(r==null?void 0:r.length)?t.jsx(Oe,{lg:25,md:25,sm:25,children:t.jsx(P,{disabled:i,icon:"plus",onClick:j,variant:"ghost",width:"100%",children:e??"Add"})}):void 0]})},Gi=({addText:e,append:n,control:i,disabled:r,fields:a,initValue:o="",required:l,label:c,max:d=void 0,name:p="array-field",onChange:g,placeholder:u,remove:f,tooltip:h})=>i&&a?t.jsx(x.Fragment,{children:a.map((b,y)=>t.jsx(s.Controller,{control:i,name:`${p}.${y}`,render:({field:m,fieldState:j})=>t.jsx(Me,{addText:e,append:n,disabled:r,fieldState:j,fields:a,index:y,initValue:o,label:c,max:d,name:m.name,onBlur:m.onBlur,onChange:g??m.onChange,placeholder:u,remove:f,required:l,tooltip:h,value:typeof m.value=="object"?m.value.value:m.value}),index:y},b.id))}):t.jsx(Me,{addText:e,disabled:r,initValue:o,label:c,max:d,name:p,onChange:g,placeholder:u,required:l,tooltip:h}),Vi=s.st(mt)`
|
|
1268
1268
|
white-space: nowrap;
|
|
1269
1269
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1270
1270
|
text-overflow: ellipsis;
|
|
1271
1271
|
overflow: hidden;
|
|
1272
1272
|
max-width: 80%;
|
|
1273
|
-
`,
|
|
1273
|
+
`,Yi=s.st.input`
|
|
1274
1274
|
opacity: 0;
|
|
1275
1275
|
position: absolute;
|
|
1276
1276
|
visibility: hidden;
|
|
1277
1277
|
width: 0;
|
|
1278
|
-
`,ue=(e,n,i)=>{const r=new Event(e);return Object.defineProperty(r,"target",{value:{name:n,value:i}}),r},
|
|
1278
|
+
`,ue=(e,n,i)=>{const r=new Event(e);return Object.defineProperty(r,"target",{value:{name:n,value:i}}),r},qi=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Ki=({accept:e,disabled:n=!1,error:i,label:r,helpLink:a,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:b,weight:y})=>{const m=s.Je(),j=n?void 0:i,w=x.useRef(null),v=u==null?void 0:u(d,{required:g}),k=b==null?void 0:b(d),C=qi(k),E=x.useCallback(()=>{const R=ue("change",d,void 0);f&&f(d,void 0),v&&v.onChange(R)},[v,d,f]),T=x.useCallback(R=>{const{files:I}=R.currentTarget,L=ue("change",d,I&&I.length>0?I:void 0);I&&I.length>0&&(p==null||p(L),f&&f(d,I),v&&v.onChange(L))},[v,d,p,f]),S=x.useCallback(R=>{n?R.preventDefault():w.current&&w.current.click()},[n]);return t.jsxs(J,{error:j,helpLink:a,helpText:o,htmlFor:l??d,label:r,required:g,tooltip:h,weight:y,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${j?"error":""}`,children:[t.jsx(Vi,{$size:"xs",children:C}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(C)?void 0:t.jsx(B,{color:m.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:E,variant:"ghost",width:"20px"}),j&&t.jsx(N,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}),t.jsxs(P,{border:n?`1px solid ${m.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:S,variant:"primary",width:"96px",children:[t.jsx(N,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Yi,{...v,accept:e,"aria-label":d,"data-testid":d,disabled:n,id:l??d,multiple:c,name:d,onChange:T,ref:w,type:"file"})]})},Zi=s.st.input`
|
|
1279
1279
|
border: none;
|
|
1280
1280
|
background: transparent;
|
|
1281
1281
|
min-width: 15rem;
|
|
1282
1282
|
padding: 0;
|
|
1283
1283
|
flex: 1;
|
|
1284
|
-
`,
|
|
1284
|
+
`,He=({disabled:e=!1,error:n,field:i,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:b})=>{const y=s.Je(),m=e?void 0:n,[j,w]=x.useState(""),v=d?h:i==null?void 0:i.value,k=x.useMemo(()=>v&&typeof v=="string"?v.split(",").filter(Boolean):[],[v]),C=x.useCallback(I=>{const Y=[...new Set(I.filter(Boolean))].join(","),Z=ue("change",c,Y);i&&i.onChange(Z),d&&d(Z)},[i,c,d]),E=x.useCallback(I=>{w(I.target.value)},[]),T=x.useCallback(I=>{const L=j.trim();L.length&&!k.includes(L)&&(I.preventDefault(),C([...k,L]),w("")),i&&i.onBlur()},[j,i,C,k]),S=x.useCallback(I=>{const L=j.trim();I.key==="Enter"&&L.length===0&&I.preventDefault(),["Enter",","].includes(I.key)&&L.length>0&&!k.includes(L)?(I.preventDefault(),C([...k,L]),w("")):I.key==="Backspace"&&!L.length&&k.length&&(I.preventDefault(),p==null||p(k[k.length-1]),C(k.slice(0,-1)))},[j,p,C,k]),R=x.useCallback(I=>()=>{p==null||p(I),C(k.filter(L=>L!==I))},[p,C,k]);return t.jsx(J,{error:m,helpLink:r,helpLinkText:a,helpText:o,htmlFor:c,label:l,required:u,tooltip:f,weight:b,children:t.jsxs(ee,{$overflowX:"auto",className:`${e?"disabled":""} ${m?"error":""}`,children:[k.map(I=>t.jsx(V,{disabled:e,onClose:R(I),tagLabel:I},I)),t.jsx(Zi,{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",id:c,onBlur:T,onChange:E,onKeyDown:S,placeholder:k.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:j}),m?t.jsx(N,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}):void 0]})})},Xi=({disabled:e=!1,control:n,error:i,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:b})=>n?t.jsx(s.Controller,{control:n,name:c,render:({field:y})=>t.jsx(He,{disabled:e,error:i,field:y,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:u,tooltip:f,weight:b}),rules:{required:u}}):t.jsx(He,{disabled:e,error:i,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:b}),_e=x.forwardRef(function({disabled:n,icon:i,margin:r,onClick:a,...o},l){return t.jsx(Ii,{$margin:r,"aria-label":i,className:"action-btn",disabled:n,onClick:a,ref:l,type:"button",...o,children:t.jsx(N,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Fe=({error:e,decimalPlaces:n=0,disabled:i=!1,id:r,maxLength:a,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:u,setValue:f,value:h})=>{const b=s.Je(),y=i?void 0:e,m=n<0?0:n,[j,w]=x.useState(h?s._.toNumber(h):0),v=x.useCallback(()=>{const T=(j-10**-m).toFixed(m),S=Math.max(Number(l),Number(T));f&&f(c,S,{shouldDirty:!0}),w(S);const R=ue("change",c,T);d&&d(R)},[j,m,l,f,c,d]),k=x.useCallback(()=>{const T=(j+10**-m).toFixed(m),S=Math.min(Number(o),Number(T)>Number(l)?Number(T):Number(l));f&&f(c,S,{shouldDirty:!0}),w(S);const R=ue("change",c,T);d&&d(R)},[j,m,o,l,f,c,d]),C=x.useCallback(T=>{const{value:S}=T.target,R=/\d+/u.test(S)&&!s._.isEmpty(S);f&&f(c,R?S:void 0),d&&d(T),w(Number(S))},[c,d,f]),E=x.useCallback(T=>{T.key==="Enter"&&T.preventDefault()},[]);return t.jsxs(ee,{className:`${i?"disabled":""} ${y?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":y?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",disabled:i,id:r??c,max:o,min:l,onChange:C,onKeyDown:E,placeholder:p,required:u,step:10**-m,type:"number",value:j,...g==null?void 0:g(c,{maxLength:a,max:o,min:l,onChange:C,value:h,valueAsNumber:!0})}),y&&t.jsx(N,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsx(_e,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:v,px:.75,py:.75}),t.jsx(_e,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:k,px:.75,py:.75})]})},Wt=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:r,helpText:a,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:u,onChange:f,placeholder:h,register:b,required:y,setValue:m,tooltip:j,value:w,watch:v,weight:k})=>t.jsx(J,{error:n?void 0:i,helpLink:r,helpText:a,htmlFor:u,label:l,linkPosition:c,maxLength:d,required:y,tooltip:j,weight:k,children:t.jsx(Fe,{decimalPlaces:e,disabled:n,error:i,id:o,max:p,maxLength:d,min:g,name:u,onChange:f,placeholder:h,register:b,required:y,setValue:m,value:v?v(u):w})}),Bt=({disabled:e=!1,error:n,name:i,label:r,propsMax:a,propsMin:o,required:l,tooltip:c,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return t.jsx(J,{error:n,htmlFor:i,label:r,required:l,tooltip:c,children:t.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Fe,{...o,disabled:e,error:n,name:(o==null?void 0:o.name)??g}),t.jsx(Fe,{...a,disabled:e,error:n,name:(a==null?void 0:a.name)??p})]})})},Qi=s.st.div`
|
|
1285
1285
|
${({theme:e})=>`
|
|
1286
1286
|
align-items: flex-start;
|
|
1287
1287
|
align-self: stretch;
|
|
@@ -1321,7 +1321,7 @@
|
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
1323
|
`}
|
|
1324
|
-
`,
|
|
1324
|
+
`,er=s.st.button`
|
|
1325
1325
|
${({theme:e})=>`
|
|
1326
1326
|
align-items: center;
|
|
1327
1327
|
background: inherit;
|
|
@@ -1337,7 +1337,7 @@
|
|
|
1337
1337
|
cursor: not-allowed;
|
|
1338
1338
|
}
|
|
1339
1339
|
`}
|
|
1340
|
-
`,
|
|
1340
|
+
`,tr=s.st.ul`
|
|
1341
1341
|
${({theme:e})=>`
|
|
1342
1342
|
align-items: flex-start;
|
|
1343
1343
|
box-shadow: ${e.shadows.md};
|
|
@@ -1351,7 +1351,7 @@
|
|
|
1351
1351
|
scrollbar-width: thin;
|
|
1352
1352
|
width: max-content;
|
|
1353
1353
|
`}
|
|
1354
|
-
`,
|
|
1354
|
+
`,nr=s.st.li`
|
|
1355
1355
|
${({theme:e})=>`
|
|
1356
1356
|
align-items: center;
|
|
1357
1357
|
background: ${e.palette.white};
|
|
@@ -1368,22 +1368,22 @@
|
|
|
1368
1368
|
background: ${e.palette.gray[100]};
|
|
1369
1369
|
}
|
|
1370
1370
|
`}
|
|
1371
|
-
`,
|
|
1371
|
+
`,ir=s.st.p`
|
|
1372
1372
|
color: ${({theme:e})=>e.palette.gray[800]};
|
|
1373
1373
|
font-size: inherit;
|
|
1374
1374
|
min-width: 55%;
|
|
1375
1375
|
overflow: hidden;
|
|
1376
1376
|
text-overflow: ellipsis;
|
|
1377
1377
|
white-space: nowrap;
|
|
1378
|
-
`,
|
|
1378
|
+
`,rr=({disabled:e,error:n,label:i,name:r,placeholder:a,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const u=s.Je(),f=x.useRef(null),h=e?void 0:n,b=(p==null?void 0:p(r))??d,[y,m]=x.useState(!1),[j,w]=x.useState(""),{refs:v,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:C,inputValue:E,handlePhoneValueChange:T,country:S,setCountry:R}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),I=x.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),L=x.useCallback(W=>{W.preventDefault(),m(M=>!M),y||w("")},[y]),Y=x.useCallback(W=>()=>{R(W),m(!1),w("")},[R,m]),Z=x.useCallback(W=>{W.key.length===1?w(M=>M+W.key):W.key==="Backspace"&&w(M=>M.slice(0,-1))},[]),te=s.R.filter(W=>{const{name:M}=s.M(W);return M.toLowerCase().includes(j.toLowerCase())});return ie(v.floating.current,()=>{m(!1),w("")},!0),t.jsx(J,{error:h,htmlFor:r,label:i,required:o,tooltip:c,weight:g,children:t.jsxs(Qi,{className:`${e?"disabled":""} ${h?"error":""}`,ref:f,children:[t.jsxs(er,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:L,onKeyDown:Z,ref:v.setReference,children:[t.jsx(s.q,{iso2:S.iso2,size:"16px"}),t.jsx(N,{icon:"angle-down",iconColor:u.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(ee,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":r,"aria-required":o,autoComplete:"off","data-testid":`${r}-input`,disabled:e,id:r,name:r,onKeyDown:I,placeholder:a,ref:C,type:"tel",value:E,...l==null?void 0:l(r,{required:o,onChange:T})}),h?t.jsx(N,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"xs"}):void 0]}),y&&ae.createPortal(t.jsx(tr,{ref:v.setFloating,style:k,children:te.map(W=>{const{dialCode:M,iso2:O,name:oe}=s.M(W);return t.jsxs(nr,{onClick:Y(O),value:O,children:[t.jsx(s.q,{iso2:O,size:"16px"}),t.jsx(ir,{children:oe}),t.jsx(z,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+M})]},O)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},ar=({disabled:e=!1,error:n,helpLink:i,helpText:r,isTouched:a,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,onBlur:u,placeholder:f,register:h,required:b,rows:y,tooltip:m,watch:j,weight:w,value:v})=>{const k=s.Je(),C=(j==null?void 0:j(c))??v,E=o&&a&&!e,T=e?void 0:n;return t.jsx(J,{error:T,helpLink:i,helpText:r,htmlFor:c,label:l,maxLength:g,required:b,tooltip:m,value:C?String(C):void 0,weight:w,children:t.jsxs(ee,{className:`
|
|
1379
1379
|
${e?"disabled":""} ${T?"error":""} ${E?"success":""}
|
|
1380
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":T?"true":"false","aria-label":c,"aria-required":b,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:f,rows:y,value:C,...h==null?void 0:h(c,{required:b,onBlur:u})}),T?t.jsx(N,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:k.palette.error[500],iconSize:"xs"}):void 0,E?t.jsx(N,{icon:"check-circle",iconClass:"success-icon",iconColor:k.palette.success[500],iconSize:"xs"}):void 0]})})},
|
|
1380
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":T?"true":"false","aria-label":c,"aria-required":b,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:f,rows:y,value:C,...h==null?void 0:h(c,{required:b,onBlur:u})}),T?t.jsx(N,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:k.palette.error[500],iconSize:"xs"}):void 0,E?t.jsx(N,{icon:"check-circle",iconClass:"success-icon",iconColor:k.palette.success[500],iconSize:"xs"}):void 0]})})},or=({control:e,description:n,disabled:i,id:r,items:a,align:o,inputType:l="text",inputNumberProps:c,minHeight:d,minWidth:p,name:g,placeholder:u,textAlign:f,tooltip:h,title:b,value:y,isTouched:m,isValid:j,error:w,onChange:v,register:k,setValue:C,watch:E})=>{const T=x.useMemo(()=>{if(l==="text")return t.jsx(Le,{disabled:i,error:w,isTouched:m,isValid:j,name:g,placeholder:u,register:k});if(l==="date")return t.jsx(Et,{disabled:i,error:w,name:g,register:k,setValue:C,watch:E});if(l==="select"&&a)return t.jsx(Ze,{control:e,disabled:i,items:a,name:g,placeholder:u,value:y});const{decimalPlaces:S,max:R,min:I}=c??{};return t.jsx(Wt,{decimalPlaces:S,disabled:i,error:w,max:R,min:I,name:g,onChange:v,placeholder:u,register:k,setValue:C,value:y,watch:E})},[e,i,w,c,l,m,j,a,g,v,u,k,C,y,E]);return t.jsxs(yi,{$align:o,$minHeight:d,$minWidth:p,children:[t.jsx(Ne,{description:n,id:r,textAlign:f,title:b,tooltip:h}),T]})},sr=s.st.div`
|
|
1381
1381
|
display: flex;
|
|
1382
1382
|
align-self: flex-start;
|
|
1383
1383
|
margin-left: auto;
|
|
1384
1384
|
width: 40px;
|
|
1385
1385
|
height: auto;
|
|
1386
|
-
`,
|
|
1386
|
+
`,Ot=(e,n)=>{const[r,a]=x.useState(0),[o,l]=x.useState(0);return x.useEffect(()=>{o===100&&(()=>{a(d=>d===n-1?0:d+1)})()},[o,n]),x.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:r,progress:o,setCycle:a,setProgress:l}},Mt=({publicId:e,format:n="webp"})=>{const i=x.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return x.useMemo(()=>i.image(e).format(n),[i,e,n])},Ce=e=>{const[n,i]=x.useState(!1),r=x.useCallback(()=>{i(!0)},[]),a=x.useCallback(()=>{i(!1)},[]),o=x.useCallback(()=>{i(l=>!l)},[]);return{close:a,isOpen:n,name:e,open:r,setIsOpen:i,toggle:o}},lr=({name:e,items:n,columnOrder:i,setColumnOrder:r})=>{const a=x.useMemo(()=>[...n.filter(({locked:g})=>g).map(({locked:g,...u})=>({...u,visible:!0,locked:g})),...n.filter(({locked:g})=>!g)],[n]),[o,l]=x.useState(a),c=x.useCallback(g=>{const u=g.filter(({locked:y})=>!y),h=[...g.filter(({locked:y})=>y),...u],b=h.map(({name:y})=>y);l(y=>[...h,...y.filter(({name:m})=>!b.includes(m))]),r&&r(h.map(({id:y})=>y))},[r]),d=x.useCallback(()=>{const g=o.map(u=>{var h;const f=(i==null?void 0:i.includes(u.id))??!1;return(h=u.toggleVisibility)==null||h.call(u,f),{...u,visible:f}}).toSorted((u,f)=>{const h=(i==null?void 0:i.indexOf(u.id))??0,b=(i==null?void 0:i.indexOf(f.id))??0;return Number(f.visible)!==Number(u.visible)?Number(f.visible)-Number(u.visible):h-b});l(g),r==null||r(i)},[o,i,r]),p=x.useMemo(()=>s.some(o,g=>((i==null?void 0:i.includes(g.id))??!1)!==g.visible),[o,i]);return{setColumns:c,resetToDefault:d,columns:o,...Ce(e),hasChanged:p}},Ht=(e,n)=>x.useMemo(()=>s._.debounce(e,n),[e,n]),cr=e=>{const[n,i]=x.useState(),r=Ht(a=>{i(a)},(e==null?void 0:e.debounceWait)??300);return[n,r]},dr=({alt:e="img",height:n="",width:i="",plugins:r=[s.lazyload(),s.placeholder()],publicId:a})=>{const o=Mt({publicId:a});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:n,plugins:r,width:i})},Q=x.memo(dr),pr=s.st.label`
|
|
1387
1387
|
${({theme:e})=>`
|
|
1388
1388
|
align-items: center;
|
|
1389
1389
|
display: flex;
|
|
@@ -1462,7 +1462,7 @@
|
|
|
1462
1462
|
}
|
|
1463
1463
|
|
|
1464
1464
|
`}
|
|
1465
|
-
`,
|
|
1465
|
+
`,gr=s.st.span.attrs({className:"checkmark"})``,Qe=x.forwardRef(function({defaultChecked:n=!1,disabled:i=!1,label:r,name:a,onChange:o,onClick:l,value:c,...d},p){return t.jsxs(pr,{"aria-disabled":i,"aria-label":r??a,role:"radiogroup",children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-label":r??a,defaultChecked:n,disabled:i,name:a,onChange:o,onClick:l,ref:p,type:"radio",value:c,...d}),t.jsx(gr,{}),r??null]})}),ur=({alt:e,customDescription:n,imageId:i,icon:r,selectorProps:a,onClick:o,register:l,bgColor:c,title:d,isATag:p=!1,width:g="fit-content"})=>{const u=s.Je();return t.jsxs($,{alignItems:"center",bgColor:c??"",border:`1px solid ${u.palette.gray[200]}`,borderColorHover:u.palette.gray[600],borderRadius:u.spacing[.25],display:"inline-flex",pr:p?1:0,shadowHover:"md",width:g,children:[t.jsxs($,{display:"inline-flex",padding:[1,1,1,1],children:[t.jsx($,{alignSelf:"start",display:"flex",width:"fit-content",children:t.jsx(Qe,{defaultChecked:a.defaultChecked,name:a.name,onClick:o,value:a.value,...l==null?void 0:l(a.name)})}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[!p&&i!==void 0&&t.jsx(Q,{alt:e??"card image",height:"32px",publicId:i,width:"32px"}),r===void 0?void 0:t.jsx(N,{icon:r,iconSize:"sm",iconType:"fa-light"}),t.jsxs($,{display:"flex",flexDirection:"column",width:"100%",children:[t.jsx(z,{color:u.palette.gray[800],fontWeight:"bold",size:"sm",children:d}),n===void 0?void 0:t.jsx($,{children:n})]})]})]}),p&&t.jsx(sr,{children:t.jsx(Q,{alt:e??"tag image",height:"40px",publicId:i??"tag image",width:"40px"})})]})},le=s.st.div`
|
|
1466
1466
|
${({theme:e})=>`
|
|
1467
1467
|
align-items: center;
|
|
1468
1468
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1474,7 +1474,7 @@
|
|
|
1474
1474
|
transition: 0.2s;
|
|
1475
1475
|
width: 36px;
|
|
1476
1476
|
`}
|
|
1477
|
-
`,
|
|
1477
|
+
`,xr=s.st.div`
|
|
1478
1478
|
${({theme:e})=>`
|
|
1479
1479
|
background-color: ${e.palette.white};
|
|
1480
1480
|
border-radius: 50%;
|
|
@@ -1485,7 +1485,7 @@
|
|
|
1485
1485
|
width: ${e.spacing[1]};
|
|
1486
1486
|
z-index: 1;
|
|
1487
1487
|
`}
|
|
1488
|
-
`,
|
|
1488
|
+
`,fr=s.st.label`
|
|
1489
1489
|
display: inline-block;
|
|
1490
1490
|
|
|
1491
1491
|
input {
|
|
@@ -1512,22 +1512,22 @@
|
|
|
1512
1512
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1513
1513
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1514
1514
|
}
|
|
1515
|
-
`,
|
|
1515
|
+
`,_t=x.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:r,name:a,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,onChange:d,...p},g){const u=n===!0?"on":"off",f=typeof o=="object"&&o.on&&o.off?o[u]:o,h=x.useCallback(b=>{b.stopPropagation()},[]);return t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:r,children:[t.jsx($,{minWidth:l,children:f}),t.jsxs(fr,{onClick:h,role:"switch",children:[t.jsx("input",{...p,"aria-disabled":i,"aria-label":a,checked:n===!0,disabled:i,name:a,onChange:d,ref:g,type:"checkbox"}),t.jsx(le,{"aria-label":"Toggle Switch",id:`${a}Toggle`,children:t.jsx(xr,{})})]}),c]})}),hr=({id:e,title:n,toggles:i,minWidth:r="auto",height:a="auto"})=>{const o=s.Je();return t.jsxs($,{alignItems:"center",bgColor:o.palette.white,border:`1px solid ${o.palette.gray[200]}`,borderRadius:o.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:a,justify:"center",minHeight:"100px",minWidth:r,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Ne,{id:e,title:n}),t.jsx($,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:i.map(l=>t.jsx(_t,{...l},`$card-toggle-${l.name}`))})]})},br=s.st.div`
|
|
1516
1516
|
position: relative;
|
|
1517
1517
|
margin: auto;
|
|
1518
1518
|
overflow: hidden;
|
|
1519
|
-
`,
|
|
1519
|
+
`,yr=s.st.div`
|
|
1520
1520
|
display: flex;
|
|
1521
1521
|
transition: transform 0.5s ease-in-out;
|
|
1522
1522
|
transform: translateX(
|
|
1523
1523
|
${({$currentIndex:e})=>-e*100}%
|
|
1524
1524
|
);
|
|
1525
|
-
|
|
1525
|
+
`,$r=s.st.div`
|
|
1526
1526
|
align-items: center;
|
|
1527
1527
|
display: flex;
|
|
1528
1528
|
justify-content: center;
|
|
1529
1529
|
min-width: 100%;
|
|
1530
|
-
`,
|
|
1530
|
+
`,mr=s.st.button`
|
|
1531
1531
|
${({theme:e,$isActive:n})=>`
|
|
1532
1532
|
background-color: ${n?e.palette.primary[400]:e.palette.white};
|
|
1533
1533
|
border: none;
|
|
@@ -1536,13 +1536,13 @@
|
|
|
1536
1536
|
height: ${e.spacing[.75]};
|
|
1537
1537
|
width: ${e.spacing[.75]};
|
|
1538
1538
|
`}
|
|
1539
|
-
`,
|
|
1539
|
+
`,wr=s.st.div`
|
|
1540
1540
|
align-items: center;
|
|
1541
1541
|
display: flex;
|
|
1542
1542
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1543
1543
|
justify-content: center;
|
|
1544
1544
|
margin-top: ${({theme:e})=>e.spacing[2]};
|
|
1545
|
-
`,
|
|
1545
|
+
`,jr=({slides:e,interval:n=300})=>{const{cycle:i,setCycle:r,setProgress:a}=Ot(n,e.length),o=x.useCallback(l=>()=>{r(l),a(0)},[r,a]);return t.jsxs(br,{"aria-roledescription":"carousel",children:[t.jsx(yr,{$currentIndex:i,children:e.map((l,c)=>{const d=`slide-${c}`;return t.jsx($r,{"aria-label":d,"aria-roledescription":"slide",children:l.content},d)})}),t.jsx(wr,{children:e.map((l,c)=>{const d=`nav-button-${c}`;return t.jsx(mr,{$isActive:c===i,"aria-label":`Go to slide ${c+1}`,"data-testid":c===i?"active":"inactive",onClick:o(c)},d)})})]})},Jt=s.st.div`
|
|
1546
1546
|
${({theme:e})=>`
|
|
1547
1547
|
background-color: ${e.palette.gray[100]};
|
|
1548
1548
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1594,7 +1594,7 @@
|
|
|
1594
1594
|
padding-bottom: unset;
|
|
1595
1595
|
}
|
|
1596
1596
|
`}
|
|
1597
|
-
`,
|
|
1597
|
+
`,vr=s.st.div`
|
|
1598
1598
|
${({theme:e})=>`
|
|
1599
1599
|
align-items: end;
|
|
1600
1600
|
background-color: ${e.palette.gray[100]};
|
|
@@ -1612,10 +1612,10 @@
|
|
|
1612
1612
|
background-color: ${e.palette.gray[200]};
|
|
1613
1613
|
}
|
|
1614
1614
|
`}
|
|
1615
|
-
`,
|
|
1615
|
+
`,Ut=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(x.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Jt,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":s._.isNil(n)||s._.isString(n)?0:n.offset+.7,...i!==void 0?{"data-line":String(Number(i))}:{},children:s._.isNil(n)||s._.isString(n)||s._.isEmpty(n.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:n.content})})})),kr=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i,variant:r="normal"})=>{const a=s.Je(),[o,l]=x.useState(!1),[c,d]=x.useState(!0),p=x.useCallback(()=>{l(h=>!h)},[l]),g=x.useCallback(()=>{if(s._.isNil(n)||s._.isEmpty(n)||!s._.isString(n))return d(!1),e;const h=n.split(`
|
|
1616
1616
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1617
1617
|
`)}
|
|
1618
|
-
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return r==="location"?t.jsx(
|
|
1618
|
+
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return r==="location"?t.jsx(Ut,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs($,{bgColor:a.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Jt,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:u})})}),t.jsxs(vr,{children:[t.jsx(B,{height:a.spacing[2.5],icon:"copy",iconColor:a.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:f,variant:"ghost",width:a.spacing[2.5]}),c?t.jsxs(P,{onClick:p,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(N,{icon:o?"chevron-up":"chevron-down",iconColor:a.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:f})]}):!1]})]})},{getVariant:Cr}=q(e=>({fixed:`
|
|
1619
1619
|
height: auto;
|
|
1620
1620
|
min-width: 300px;
|
|
1621
1621
|
padding: ${e.spacing[1.25]};
|
|
@@ -1638,13 +1638,13 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1638
1638
|
@media screen and (min-width: ${e.breakpoints.sm}) {
|
|
1639
1639
|
width: 32%;
|
|
1640
1640
|
}
|
|
1641
|
-
`})),
|
|
1641
|
+
`})),Gt=s.st.div.attrs({className:"comp-modal fixed inset-0 overflow-auto"})`
|
|
1642
1642
|
align-items: center;
|
|
1643
1643
|
background-color: ${({$bgColor:e="rgb(52 64 84 / 70%)"})=>e};
|
|
1644
1644
|
display: flex;
|
|
1645
1645
|
justify-content: center;
|
|
1646
1646
|
z-index: 99999;
|
|
1647
|
-
`,
|
|
1647
|
+
`,et=s.st($)`
|
|
1648
1648
|
${({theme:e,$size:n})=>`
|
|
1649
1649
|
background-color: ${e.palette.white};
|
|
1650
1650
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -1659,9 +1659,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1659
1659
|
margin: auto;
|
|
1660
1660
|
white-space: pre-line;
|
|
1661
1661
|
|
|
1662
|
-
${
|
|
1662
|
+
${Cr(e,n)}
|
|
1663
1663
|
`}
|
|
1664
|
-
`,
|
|
1664
|
+
`,Sr=s.st.div`
|
|
1665
1665
|
${({theme:e})=>`
|
|
1666
1666
|
background-color: ${e.palette.white};
|
|
1667
1667
|
border-bottom: 1px solid ${e.palette.gray[200]};
|
|
@@ -1679,7 +1679,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1679
1679
|
padding: 0;
|
|
1680
1680
|
}
|
|
1681
1681
|
`}
|
|
1682
|
-
`,
|
|
1682
|
+
`,zr=s.st.div`
|
|
1683
1683
|
border-radius: ${({theme:e})=>`${e.spacing[.25]} ${e.spacing[.25]} 0 0`};
|
|
1684
1684
|
display: block;
|
|
1685
1685
|
overflow: unset;
|
|
@@ -1689,7 +1689,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1689
1689
|
padding: ${({theme:e})=>`${e.spacing[1.25]}`};
|
|
1690
1690
|
padding-bottom: ${({theme:e})=>`${e.spacing[1.5]}`};
|
|
1691
1691
|
position: sticky;
|
|
1692
|
-
`,
|
|
1692
|
+
`,Ir=s.st.div.attrs({className:"flex items-center justify-between"})``,Tr=s.st.div`
|
|
1693
1693
|
${({theme:e})=>`
|
|
1694
1694
|
border-radius: 0 0 ${e.spacing[.25]} ${e.spacing[.25]};
|
|
1695
1695
|
display: flex;
|
|
@@ -1720,7 +1720,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1720
1720
|
margin-right: 0;
|
|
1721
1721
|
}
|
|
1722
1722
|
`}
|
|
1723
|
-
`,
|
|
1723
|
+
`,Fr=s.st.div`
|
|
1724
1724
|
img {
|
|
1725
1725
|
margin: 0 calc(-${({theme:e})=>e.spacing[1.25]} - 1px)
|
|
1726
1726
|
${({theme:e})=>e.spacing[1.25]};
|
|
@@ -1736,11 +1736,11 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1736
1736
|
margin-right: 0;
|
|
1737
1737
|
`:""}
|
|
1738
1738
|
}
|
|
1739
|
-
`,
|
|
1739
|
+
`,Vt=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:r=void 0})=>{const{close:a}=n,o=x.useCallback(()=>{r!=null&&r.onClick&&r.onClick(),a()},[r,a]),l=x.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),a()},[i,a]);return[i,r].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(Tr,{children:t.jsxs("div",{children:[r&&t.jsx(P,{id:r.id,onClick:o,variant:"tertiary",width:"100%",children:r.text}),i&&t.jsx(P,{id:i.id,onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},Yt=({title:e,description:n,modalRef:i,otherActions:r,onClose:a})=>{const o=s.Je(),l=x.useCallback(()=>{a==null||a(),i.close()},[i,a]);return x.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(zr,{children:[t.jsxs(Ir,{children:[typeof e=="string"?t.jsx(U,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",wordBreak:"break-word",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[r,t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),n&&s.lodashExports.isString(n)&&!s.lodashExports.isEmpty(n)?t.jsx(z,{mt:.5,size:"sm",children:n}):void 0,n&&!s.lodashExports.isString(n)&&t.jsx(pe,{display:"block",mt:.5,size:"sm",children:n})]})},qt=({disabled:e,id:n="modal-confirm",onCancel:i,onConfirm:r="submit",txtCancel:a,txtConfirm:o})=>{const l=r==="submit";return t.jsxs($,{display:"flex",gap:.75,maxWidth:i?"392px":"190px",mt:1.5,children:[i?t.jsx(P,{id:`${n}-cancel`,justify:"center",onClick:i,variant:"tertiary",width:"100%",children:a??"Cancel"}):void 0,t.jsx(P,{disabled:e,id:n,justify:"center",onClick:l?void 0:r,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},Nr=(e,n,i)=>i?n==="secondary"?`3px solid ${e.palette.primary[100]}`:`3px solid ${e.palette.primary[500]}`:"unset",Dr=s.st.div`
|
|
1740
1740
|
display: flex;
|
|
1741
1741
|
flex-direction: row;
|
|
1742
1742
|
gap: ${({theme:e})=>e.spacing[.25]};
|
|
1743
|
-
border-bottom: ${({theme:e,$borderButton:n,$variant:i})=>
|
|
1743
|
+
border-bottom: ${({theme:e,$borderButton:n,$variant:i})=>Nr(e,i,n)};
|
|
1744
1744
|
align-items: center;
|
|
1745
1745
|
padding: ${({theme:e})=>e.spacing[.625]}
|
|
1746
1746
|
${({theme:e})=>e.spacing[.5]};
|
|
@@ -1779,7 +1779,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
|
-
`,
|
|
1782
|
+
`,Er=s.st(ve)`
|
|
1783
1783
|
${({theme:e,$variant:n})=>`
|
|
1784
1784
|
align-items: center;
|
|
1785
1785
|
background: ${n==="error"?e.palette.primary[400]:e.palette.warning[500]};
|
|
@@ -1792,14 +1792,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1792
1792
|
width: ${e.spacing[.5]};
|
|
1793
1793
|
height: ${e.spacing[.5]};
|
|
1794
1794
|
`}
|
|
1795
|
-
`,
|
|
1795
|
+
`,Rr=s.st.div`
|
|
1796
1796
|
align-items: center;
|
|
1797
1797
|
color: ${({theme:e})=>e.palette.white};
|
|
1798
1798
|
display: flex;
|
|
1799
1799
|
font-size: 6px;
|
|
1800
1800
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1801
1801
|
justify-content: center;
|
|
1802
|
-
`,
|
|
1802
|
+
`,Kt=x.forwardRef(function({numberIndicator:n,show:i,variant:r="error",...a},o){return t.jsx(Er,{$variant:r,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...a,children:n&&t.jsx(Rr,{children:n<=9?n:9})})}),Zt=({end:e=!1,label:n,id:i,isActive:r=!1,link:a,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:p})=>{const{pathname:g}=We.useLocation(),u=r||(d==="primary"?g.includes(a):g.endsWith(a));return t.jsx(G,{display:"flex",id:`${i}-tooltip`,tip:c,children:t.jsxs(Dr,{$borderButton:u,$variant:d,children:[t.jsxs(We.NavLink,{end:e,id:i,onClick:l,to:a,children:[n,t.jsx(Kt,{left:o==null?void 0:o.left,numberIndicator:o==null?void 0:o.numberIndicator,show:o==null?void 0:o.show,top:o==null?void 0:o.top,variant:o==null?void 0:o.variant})]}),p===void 0?null:t.jsx(V,{tagLabel:`${p}`,variant:"default"})]})})},tt=({items:e,borders:n=!0,box:i=!1,variant:r="primary"})=>{const a=s.Je();return t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${a.palette.gray[300]}`:void 0,borderColor:i?a.palette.gray[200]:void 0,borderRadius:i?a.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:p,notificationSign:g,onClick:u,tag:f,tooltip:h})=>t.jsx(Zt,{end:o,id:l,isActive:c,label:p,link:d,notificationSign:g,onClick:u,tag:f,tooltip:h,variant:r},l))})},re=x.forwardRef(function({color:n=F.palette.gray[100],mt:i=.5,mb:r=.5,width:a,...o},l){return t.jsx($,{as:"hr",borderTop:`1px solid ${n}`,mb:r,mt:i,ref:l,width:a??"100%",...o})}),Lr=s.st.li`
|
|
1803
1803
|
${({theme:e})=>`
|
|
1804
1804
|
align-items: center;
|
|
1805
1805
|
background-color: ${e.palette.white};
|
|
@@ -1846,7 +1846,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1846
1846
|
background-color: ${e.palette.gray[100]};
|
|
1847
1847
|
}
|
|
1848
1848
|
`}
|
|
1849
|
-
`,
|
|
1849
|
+
`,Xt=s.st.ul`
|
|
1850
1850
|
${({theme:e})=>`
|
|
1851
1851
|
background-color: ${e.palette.white};
|
|
1852
1852
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -1857,7 +1857,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1857
1857
|
min-width: 240px;
|
|
1858
1858
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1859
1859
|
`}
|
|
1860
|
-
`,Se=({children:e,disabled:n=!1,icon:i,iconType:r="fa-light",href:a,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...u})=>{const h=s.Je().palette.gray[n?300:800],b=n?x.Children.map(e,y=>x.isValidElement(y)?x.cloneElement(y,{disabled:n,...y.props}):y):e;return t.jsxs(
|
|
1860
|
+
`,Se=({children:e,disabled:n=!1,icon:i,iconType:r="fa-light",href:a,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...u})=>{const h=s.Je().palette.gray[n?300:800],b=n?x.Children.map(e,y=>x.isValidElement(y)?x.cloneElement(y,{disabled:n,...y.props}):y):e;return t.jsxs(Lr,{"aria-disabled":n,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...u,children:[i!==void 0||g!==void 0?t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[i?t.jsx(N,{disabled:n,icon:i,iconColor:h,iconSize:"xxs",iconType:r}):null,a===void 0?b:t.jsx(K,{href:a,children:b})]}):null,p||d?t.jsx(N,{disabled:n,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:r,onClick:l}):null]})},Ar=s.st(Se)`
|
|
1861
1861
|
margin-top: 10px;
|
|
1862
1862
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1863
1863
|
border-radius: 4px;
|
|
@@ -1875,7 +1875,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1875
1875
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1876
1876
|
background-color: unset;
|
|
1877
1877
|
}
|
|
1878
|
-
`,
|
|
1878
|
+
`,Qt=({items:e,onReorder:n,title:i,description:r,onClickClose:a})=>{const o=x.useCallback(l=>()=>{a(l)},[a]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs($,{display:"flex",gap:.25,children:[t.jsx(U,{display:"flex",size:"xs",children:i}),t.jsx(V,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(z,{size:"sm",children:r}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(Ar,{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)]})},Pr=s.st(Se)`
|
|
1879
1879
|
padding: 7px 8px;
|
|
1880
1880
|
|
|
1881
1881
|
&[aria-selected="true"] {
|
|
@@ -1891,7 +1891,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1891
1891
|
display: none;
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
|
-
`,
|
|
1894
|
+
`,en=({options:e,title:n,checkboxesName:i,defaultCollapsed:r,onChange:a})=>{const o=s.Je(),[l,c]=x.useState(r??!1),d=x.useCallback(()=>{c(p=>!p)},[]);return t.jsxs($,{"aria-label":n,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(z,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:n}),t.jsx(N,{icon:l?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs"})]}),l?t.jsx($,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx($,{border:"1px solid",borderColor:o.palette.gray[300],borderRadius:"4px",px:.5,py:.5,children:t.jsx(ne,{checked:p.visible,disabled:p.locked,label:p.name,name:`${i}-${p.name}`,onChange:a,value:p.name})},p.name))}):void 0]})},tn=e=>e.reduce((i,r)=>r.group?i[r.group]?{...i,[r.group]:[...i[r.group],r]}:{...i,[r.group]:[r]}:i,{}),Wr=s.st.input`
|
|
1895
1895
|
${({theme:e})=>`
|
|
1896
1896
|
background: none;
|
|
1897
1897
|
border: none !important;
|
|
@@ -1921,7 +1921,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1921
1921
|
display:none;
|
|
1922
1922
|
}
|
|
1923
1923
|
`}
|
|
1924
|
-
`,
|
|
1924
|
+
`,Br=s.st.div`
|
|
1925
1925
|
${({theme:e})=>`
|
|
1926
1926
|
align-items: center;
|
|
1927
1927
|
background-color: ${e.palette.white};
|
|
@@ -1941,30 +1941,30 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1941
1941
|
border: 2px solid ${e.palette.black};
|
|
1942
1942
|
}
|
|
1943
1943
|
`}
|
|
1944
|
-
`,
|
|
1944
|
+
`,Or=s.st.div`
|
|
1945
1945
|
${({theme:e})=>`
|
|
1946
1946
|
background-color: ${e.palette.white};
|
|
1947
1947
|
border-radius: ${e.spacing[.5]};
|
|
1948
1948
|
width: 250px;
|
|
1949
1949
|
`}
|
|
1950
|
-
`,xe=x.forwardRef(function({name:n,smallSearch:i=!1,onClear:r,value:a,...o},l){const c=s.Je(),[d,p]=x.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),f=x.useCallback(()=>{p(y=>!y)},[]),h=x.useCallback(y=>{y.key==="Enter"&&y.preventDefault()},[]);ie(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(
|
|
1950
|
+
`,xe=x.forwardRef(function({name:n,smallSearch:i=!1,onClear:r,value:a,...o},l){const c=s.Je(),[d,p]=x.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),f=x.useCallback(()=>{p(y=>!y)},[]),h=x.useCallback(y=>{y.key==="Enter"&&y.preventDefault()},[]);ie(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(Br,{children:[t.jsx(N,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Wr,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:a}),!s.lodashExports.isEmpty(a)&&t.jsx(B,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:r,px:.25,py:.25,type:"reset",variant:"ghost"})]});return i?t.jsxs(x.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(Or,{ref:g.setFloating,style:u,children:b}):void 0]}):b}),nn=({columns:e,formId:n,onChangeHandler:i,variant:r})=>{const a=x.useRef(null),[o,l]=x.useState([]),[c,d]=x.useState(""),p=x.useCallback(u=>{const{value:f}=u.target;d(f)},[]),g=x.useCallback(()=>{a.current&&(a.current.reset(),d(""))},[a]);return x.useEffect(()=>{l(e.filter(u=>{var f;return r==="grouped"?u.name.toLowerCase().includes(c.toLowerCase())||((f=u.group)==null?void 0:f.includes(c.toLowerCase())):u.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,r]),r==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:a,children:t.jsx(xe,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(tn(o)).map(([u,f],h)=>{const b=`li-checkbox${u}`;return t.jsx(en,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:f,title:u},b)})})]}):t.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:a,children:t.jsx(xe,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(u=>{const f=`li-checkbox-${u.name}`;return t.jsx(Pr,{selected:u.visible,value:f,width:"content",children:t.jsx(ne,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},f)})})]})},Mr=({_containerId:e="portals",title:n,modalRef:i,variant:r})=>{const a=s.Je(),o=x.useRef(null),[l,c]=x.useState(void 0),d=x.useCallback(u=>{const{checked:f,value:h}=u.target,b=i.columns.map(y=>{var m;return y.name===h?((m=y.toggleVisibility)==null||m.call(y,f),{...y,visible:f}):y});i.setColumns(b)},[i]),p=x.useCallback(u=>{const f=i.columns.map(h=>{var b;return h.id===u?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});i.setColumns(f)},[i]),g=x.useCallback(()=>{var f;const u=(f=o.current)==null?void 0:f.scrollHeight;l!==u&&c(u)},[l]);return i.isOpen?ae.createPortal(t.jsx(Gt,{"aria-label":i.name,"aria-modal":"true",children:t.jsxs(et,{$size:"md",flexDirection:"column",children:[t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(U,{size:"sm",children:n}),t.jsx(B,{icon:"close",iconColor:a.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(re,{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(nn,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:r}),t.jsx($,{borderLeft:`2px solid ${a.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Qt,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),t.jsx(re,{mb:0,mt:0}),t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(P,{disabled:!i.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:i.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),t.jsx(P,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Hr=s.st(Se)`
|
|
1951
1951
|
padding: 8px;
|
|
1952
1952
|
min-height: 36px;
|
|
1953
1953
|
min-width: unset;
|
|
1954
|
-
`,
|
|
1954
|
+
`,_r=s.st.div.attrs({className:"comp-modal absolute top-[55px] overflow-auto"})`
|
|
1955
1955
|
align-items: center;
|
|
1956
1956
|
background-color: ${({$bgColor:e="rgb(52 64 84 / 70%)"})=>e};
|
|
1957
1957
|
display: flex;
|
|
1958
1958
|
justify-content: center;
|
|
1959
1959
|
z-index: 99999;
|
|
1960
|
-
`,
|
|
1960
|
+
`,ht=s.st(Se)`
|
|
1961
1961
|
padding: 7px 8px;
|
|
1962
1962
|
word-wrap: break-word;
|
|
1963
1963
|
|
|
1964
1964
|
svg.fa-check {
|
|
1965
1965
|
border-radius: 2px;
|
|
1966
1966
|
}
|
|
1967
|
-
`,an=({control:e,option:n,register:i,setValue:r})=>{var a,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=n.options)==null?void 0:a.map(g=>t.jsx(yt,{value:g.value,width:"content",children:t.jsx(ne,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[n.label,(o=n.options)==null?void 0:o.map(g=>t.jsx(yt,{value:g.value,width:"content",children:t.jsx(et,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))]});case"select":return t.jsx(Xe,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Le,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Ht,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:r},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(Ot,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:r,variant:"filters"});default:return t.jsx("div",{})}},on=({control:e,items:n,register:i,setValue:r})=>t.jsx(t.Fragment,{children:n.map((a,o)=>{const l=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(an,{control:e,option:a,register:i,setValue:r}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),sn=e=>{var c,d,p,g,u;const[n,i]=x.useState([...e]),{control:r,register:a,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter(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:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:r,items:n,setItems:i,register:a,handleSubmit:o,setValue:l}},Gr=(e,n)=>{var i,r,a,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((a=(r=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:r.find(({checked:c})=>c))==null?void 0:a.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Vr=(e,n)=>(e==null?void 0:e.filter(i=>{var r;return((r=i.label)==null?void 0:r.toLowerCase().includes((n==null?void 0:n.toLowerCase())??""))??i.value.toLowerCase().includes((n==null?void 0:n.toLowerCase())??"")}))??[],Yr=async(e,n)=>await Promise.all(e.map(async i=>i.type==="checkboxes"?{...i,options:i.filterOptions?await i.filterOptions(i.options??[],n):Vr(i.options??[],n)}:i)),Je=({options:e,onSearch:n,onSubmit:i,id:r,selectedFilter:a})=>{const{control:o,items:l,setItems:c,register:d,handleSubmit:p,setValue:g}=sn(e),u=e.some(b=>b.type==="checkboxes"&&b.hideSearch!==!0),f=x.useCallback(async b=>{const{value:y}=b.target;n&&n(y);const m=await Yr(e,y);c(m)},[e,n,c]),h=x.useCallback(b=>{i&&i(b)},[i]);return x.useEffect(()=>{c(e),Gr(e,g)},[e,c,g]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:r,children:[u&&t.jsxs("div",{children:[a,t.jsx(xe,{onChange:f})]}),t.jsxs("form",{id:r,onSubmit:p(h),children:[t.jsx(on,{control:o,items:l,register:d,setValue:g}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},ln=({options:e,variant:n,onApplyFilters:i,onSearch:r,setDirection:a,setHandler:o})=>{const l=s.Je(),[c,d]=x.useState(e),[p,g]=x.useState([]),[u,f]=x.useState({}),[h,b]=x.useState(""),y=x.useCallback(w=>()=>{const v=c.find(C=>C.label===w),k=!(v!=null&&v.filterOptions.some(C=>C.type==="dateRange"||C.type==="select"));o==null||o(k??!0),b(w),g((v==null?void 0:v.filterOptions)??[])},[c,o]),m=x.useCallback(w=>{const v=[...w.checkbox,...Object.values(w.text??{}),...w.radio?[w.radio]:[],...w.minValue?[String(w.minValue)]:[],...w.maxValue?[String(w.maxValue)]:[]];f(S=>v.length>0?{...S,[h]:v}:S);const k=S=>{var R,I;return{...S,options:(R=S.options)==null?void 0:R.map(L=>({...L,checked:w.checkbox.includes(L.value)||w.radio===L.value})),value:["text","select"].includes(S.type)?((I=w.text)==null?void 0:I[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`])??S.value:S.value,minValue:["numberRange","dateRange"].includes(S.type)?w.minValue:S.minValue,maxValue:["numberRange","dateRange"].includes(S.type)?w.maxValue:S.maxValue}},C=S=>S.label===h?{...S,filterOptions:S.filterOptions.map(k)}:S,E=c.map(C);d(S=>S.map(C));const T=E.flatMap(({filterOptions:S})=>S);i(T),g([])},[c,i,h]),j=x.useCallback((w,v)=>{const k=`li-filter-option-${w}`;return t.jsxs(Jr,{icon:v,onClick:y(w),style:{minWidth:"180px"},value:k,width:"100%",children:[w,u[w]===void 0?void 0:t.jsx(V,{tagLabel:u[w].length.toString()})]},k)},[u,y]);return x.useEffect(()=>{const w=e.reduce((v,{label:k,filterOptions:C})=>{const E=C.flatMap(({value:R,minValue:I,maxValue:L})=>[I,L,R]).filter(Boolean),T=C.flatMap(({options:R})=>R??[]).filter(({checked:R=!1})=>R).map(({value:R})=>R),S=[...E,...T];return S.length===0?v:{...v,[k]:S}},{});f(w),p.length>0&&a&&a("column")},[p,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:p.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:p.length>0?t.jsx(Je,{id:"filters-options",onSearch:r,onSubmit:m,options:p,selectedFilter:h}):Object.entries(nn(e)).map(([w,v])=>t.jsxs($,{children:[t.jsx(z,{color:l.palette.gray[400],mb:.25,size:"sm",children:w}),v.map(({label:k,icon:C="filter-list"})=>j(k,C))]},w))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:p.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:p.length>0?t.jsx(Je,{id:"filters-options",onSearch:r,onSubmit:m,options:p,selectedFilter:h}):e.map(({label:w,icon:v="filter-list"})=>j(w,v))})},cn=({options:e,onApplyFilters:n,onSearch:i,modalRef:r,variant:a})=>{const[o,l]=x.useState("row"),[c,d]=x.useState(!0),p=s.Je(),g=x.useRef(null),u=t.jsx(O,{icon:"close",iconColor:p.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:r.close,px:.25,py:.25,variant:"ghost"});return x.useEffect(()=>{const f=h=>{const b=g.current;b&&!b.contains(h.target)&&r.close()};if(c)return document.addEventListener("mousedown",f,!0),()=>{document.removeEventListener("mousedown",f,!0)}},[g,c,r]),t.jsx(Ur,{$bgColor:"transparent","aria-label":r.name,children:t.jsxs(tt,{$size:"fixed",alignItems:o==="row"?"start":"end",display:"flex",flexDirection:o,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:g,style:{overflow:"hidden",width:"max-content"},children:[o==="column"?u:void 0,t.jsx(ln,{onApplyFilters:n,onSearch:i,options:e,setDirection:l,setHandler:d,variant:a}),o==="row"?u:void 0]})})};function qr(e){if(e)return e}function dn(e){if(!e||e.length===0)return;const n=e.filter(r=>r.checked).map(r=>r.label??r.value);return n.length===0?void 0:n.join(", ")}function Kr(e,n,i){const r=i??"",a=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(a)&&!s._.isUndefined(o))return`${a}${r} - ${o}${r}`;if(!s._.isUndefined(a))return`Min ${a}${r}`;if(!s._.isUndefined(o))return`Max ${o}${r}`}function Zr(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)&&s._.isUndefined(n))){if(e!==""&&n!==""&&!s._.isUndefined(e)&&!s._.isUndefined(n))return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!==""&&!s._.isUndefined(e))return`From ${s.dayjs(e).format("LL")}`;if(n!==""&&!s._.isUndefined(n))return`To ${s.dayjs(n).format("LL")}`}}function Xr(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ce=({filter:e,icon:n="filter-list",label:i,onClose:r,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx(V,{filterValues:a,icon:n,id:"remove-filter",onClose:r(e),tagLabel:`${i} `}),Qr=({options:e,onClose:n})=>{const i=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=a;switch(c){case"numberRange":{const f=Kr(g,u,r.placeholder);return t.jsx(ce,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},l)}case"dateRange":{const f=Zr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ce,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},l)}case"radioButton":case"checkboxes":{const f=dn(p);return t.jsx(ce,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},l)}case void 0:case"select":case"text":default:{const f=qr(d),h=Xr(c,r.label,o);return t.jsx(ce,{filter:a,filterValue:f,icon:r.icon,label:h,onClose:n},l)}}})).filter(r=>{if(r===null)return!1;const{filterValue:a}=r.props;return!s._.isNil(a)&&!s._.isEmpty(String(a))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},ea=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function r(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function a(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,f=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(f)&&s._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return r(l,c);case"numberRange":return a(l,c,Number);case"dateRange":return a(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},$t=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,ta=e=>{var i;const n=((i=e.options)==null?void 0:i.map(r=>({...r,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},na=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:r,onFiltersChange:a,onReset:o,onSearch:l,variant:c="ungrouped"})=>{const d=Ce("filters-modal"),[p,g]=x.useState([]),[u,f]=x.useState($t(p)),h=i.map(w=>({...w,filterOptions:w.filterOptions.map(v=>p.find(C=>C.key===v.key&&C.type===v.type&&C.filterFn===v.filterFn)??{...v})})),b=x.useCallback(w=>{g([...w]),localStorage.setItem(n,JSON.stringify(w))},[g,n]),y=x.useCallback(()=>{o&&o(),d.toggle()},[d,o]),m=x.useCallback(w=>()=>{o&&o();const v=p.map(k=>k.key===w.key&&k.type===w.type&&k.filterFn===w.filterFn?ta(k):k);g(v),localStorage.setItem(n,JSON.stringify(v))},[p,n,o]);return x.useEffect(()=>{const w=localStorage.getItem(n),v=i.flatMap(C=>C.filterOptions),k=w?JSON.parse(w):v;v.flatMap(C=>C.value).filter(Boolean).length>0||v.flatMap(C=>C.options).filter(C=>(C==null?void 0:C.checked)===void 0).length>0?(g(v),localStorage.setItem(n,JSON.stringify(v))):g(k)},[n,i,g]),x.useEffect(()=>{r&&e!==void 0&&r(ea(e,p)),f($t(p)),a==null||a(p)},[e,p,r,f,a]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:y,tag:u.toString(),variant:"ghost"})}),d.isOpen&&t.jsx(cn,{modalRef:d,onApplyFilters:b,onSearch:l,options:h,variant:c})]}),options:h,removeFilter:m}},it=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:r=void 0,confirmButton:a=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const b=s.Je(),y=t.jsx(Vt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(tt,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(qt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(nt,{items:g})}),(s._.isObject(o)||r)&&t.jsxs(Ir,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(Dr,{$framed:o.imageFramed,children:t.jsx(Q,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(z,{size:"sm",children:o.imageText})]}),t.jsx(Yt,{alert:n,cancelButton:i,confirmButton:a,modalRef:c})]})});return e&&c.isOpen?ae.createPortal(y,document.getElementById("portals")??document.body):c.isOpen?y:null},ia=(e,n,i)=>{const r=Ce("confirm-dialog-modal"),a=x.useRef(null),o=x.useCallback(async()=>(r.open(),new Promise(p=>{a.current=p})),[r]),l=x.useCallback(()=>{var p;r.close(),(p=a.current)==null||p.call(a,!0)},[r]),c=x.useCallback(()=>{var p;r.close(),(p=a.current)==null||p.call(a,!1)},[r]);return[o,({children:p})=>{const[g,u]=x.useState(i),f=x.useCallback(()=>{u({...i})},[]),h=x.useCallback(m=>()=>{u(j=>({...j,[m]:{...j[m],state:!j[m].state}}))},[]),b=!Object.values(g).every(({state:m})=>m),y=Object.entries(g).map(([m,{state:j,label:w}])=>t.jsx(ne,{defaultChecked:j,label:w,name:m,onChange:h(m)},m));return t.jsxs(it,{"data-testid":e,id:e,modalRef:{...r,close:c},onClose:f,size:"sm",title:n,children:[p,t.jsx($,{display:"flex",flexDirection:"column",gap:.5,children:y}),t.jsx(Kt,{disabled:b,id:e,onConfirm:l})]})}]},ra=()=>{const[e,n]=x.useState(!1),[i,r]=x.useState(),a=x.useRef(null),o=Ce("confirm-dialog-modal"),l=x.useCallback(async g=>(r(g),n(!0),new Promise(u=>{a.current=u})),[]),c=x.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=x.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return x.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(it,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},aa=2e3,oa=({content:e})=>{const[n,i]=x.useState("Copy"),r=x.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{i("Copied"),setTimeout(()=>{i("Copy")},aa)}).catch(()=>{i("Failed to copy")})},[e]);return t.jsx(O,{icon:"copy",iconSize:"xs",iconType:"fa-light",onClick:r,tooltip:n,variant:"ghost"})},sa=s.st.ul`
|
|
1967
|
+
`,rn=({control:e,option:n,register:i,setValue:r})=>{var a,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=n.options)==null?void 0:a.map(g=>t.jsx(ht,{value:g.value,width:"content",children:t.jsx(ne,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[n.label,(o=n.options)==null?void 0:o.map(g=>t.jsx(ht,{value:g.value,width:"content",children:t.jsx(Qe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))]});case"select":return t.jsx(Ze,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Le,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Bt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:r},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(Lt,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:r,variant:"filters"});default:return t.jsx("div",{})}},an=({control:e,items:n,register:i,setValue:r})=>t.jsx(t.Fragment,{children:n.map((a,o)=>{const l=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(rn,{control:e,option:a,register:i,setValue:r}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),on=e=>{var c,d,p,g,u;const[n,i]=x.useState([...e]),{control:r,register:a,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter(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:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:r,items:n,setItems:i,register:a,handleSubmit:o,setValue:l}},Jr=(e,n)=>{var i,r,a,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((a=(r=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:r.find(({checked:c})=>c))==null?void 0:a.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Ur=(e,n)=>(e==null?void 0:e.filter(i=>{var r;return((r=i.label)==null?void 0:r.toLowerCase().includes((n==null?void 0:n.toLowerCase())??""))??i.value.toLowerCase().includes((n==null?void 0:n.toLowerCase())??"")}))??[],Gr=async(e,n)=>await Promise.all(e.map(async i=>i.type==="checkboxes"?{...i,options:i.filterOptions?await i.filterOptions(i.options??[],n):Ur(i.options??[],n)}:i)),Je=({options:e,onSearch:n,onSubmit:i,id:r,selectedFilter:a})=>{const{control:o,items:l,setItems:c,register:d,handleSubmit:p,setValue:g}=on(e),u=e.some(b=>b.type==="checkboxes"&&b.hideSearch!==!0),f=x.useCallback(async b=>{const{value:y}=b.target;n&&n(y);const m=await Gr(e,y);c(m)},[e,n,c]),h=x.useCallback(b=>{i&&i(b)},[i]);return x.useEffect(()=>{c(e),Jr(e,g)},[e,c,g]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:r,children:[u&&t.jsxs("div",{children:[a,t.jsx(xe,{onChange:f})]}),t.jsxs("form",{id:r,onSubmit:p(h),children:[t.jsx(an,{control:o,items:l,register:d,setValue:g}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},sn=({options:e,variant:n,onApplyFilters:i,onSearch:r,setDirection:a,setHandler:o})=>{const l=s.Je(),[c,d]=x.useState(e),[p,g]=x.useState([]),[u,f]=x.useState({}),[h,b]=x.useState(""),y=x.useCallback(w=>()=>{const v=c.find(C=>C.label===w),k=!(v!=null&&v.filterOptions.some(C=>C.type==="dateRange"||C.type==="select"));o==null||o(k??!0),b(w),g((v==null?void 0:v.filterOptions)??[])},[c,o]),m=x.useCallback(w=>{const v=[...w.checkbox,...Object.values(w.text??{}),...w.radio?[w.radio]:[],...w.minValue?[String(w.minValue)]:[],...w.maxValue?[String(w.maxValue)]:[]];f(S=>v.length>0?{...S,[h]:v}:S);const k=S=>{var R,I;return{...S,options:(R=S.options)==null?void 0:R.map(L=>({...L,checked:w.checkbox.includes(L.value)||w.radio===L.value})),value:["text","select"].includes(S.type)?((I=w.text)==null?void 0:I[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`])??S.value:S.value,minValue:["numberRange","dateRange"].includes(S.type)?w.minValue:S.minValue,maxValue:["numberRange","dateRange"].includes(S.type)?w.maxValue:S.maxValue}},C=S=>S.label===h?{...S,filterOptions:S.filterOptions.map(k)}:S,E=c.map(C);d(S=>S.map(C));const T=E.flatMap(({filterOptions:S})=>S);i(T),g([])},[c,i,h]),j=x.useCallback((w,v)=>{const k=`li-filter-option-${w}`;return t.jsxs(Hr,{icon:v,onClick:y(w),style:{minWidth:"180px"},value:k,width:"100%",children:[w,u[w]===void 0?void 0:t.jsx(V,{tagLabel:u[w].length.toString()})]},k)},[u,y]);return x.useEffect(()=>{const w=e.reduce((v,{label:k,filterOptions:C})=>{const E=C.flatMap(({value:R,minValue:I,maxValue:L})=>[I,L,R]).filter(Boolean),T=C.flatMap(({options:R})=>R??[]).filter(({checked:R=!1})=>R).map(({value:R})=>R),S=[...E,...T];return S.length===0?v:{...v,[k]:S}},{});f(w),p.length>0&&a&&a("column")},[p,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:p.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:p.length>0?t.jsx(Je,{id:"filters-options",onSearch:r,onSubmit:m,options:p,selectedFilter:h}):Object.entries(tn(e)).map(([w,v])=>t.jsxs($,{children:[t.jsx(z,{color:l.palette.gray[400],mb:.25,size:"sm",children:w}),v.map(({label:k,icon:C="filter-list"})=>j(k,C))]},w))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:p.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:p.length>0?t.jsx(Je,{id:"filters-options",onSearch:r,onSubmit:m,options:p,selectedFilter:h}):e.map(({label:w,icon:v="filter-list"})=>j(w,v))})},ln=({options:e,onApplyFilters:n,onSearch:i,modalRef:r,variant:a})=>{const[o,l]=x.useState("row"),[c,d]=x.useState(!0),p=s.Je(),g=x.useRef(null),u=t.jsx(B,{icon:"close",iconColor:p.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:r.close,px:.25,py:.25,variant:"ghost"});return x.useEffect(()=>{const f=h=>{const b=g.current;b&&!b.contains(h.target)&&r.close()};if(c)return document.addEventListener("mousedown",f,!0),()=>{document.removeEventListener("mousedown",f,!0)}},[g,c,r]),t.jsx(_r,{$bgColor:"transparent","aria-label":r.name,children:t.jsxs(et,{$size:"fixed",alignItems:o==="row"?"start":"end",display:"flex",flexDirection:o,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:g,style:{overflow:"hidden",width:"max-content"},children:[o==="column"?u:void 0,t.jsx(sn,{onApplyFilters:n,onSearch:i,options:e,setDirection:l,setHandler:d,variant:a}),o==="row"?u:void 0]})})};function Vr(e){if(e)return e}function cn(e){if(!e||e.length===0)return;const n=e.filter(r=>r.checked).map(r=>r.label??r.value);return n.length===0?void 0:n.join(", ")}function Yr(e,n,i){const r=i??"",a=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(a)&&!s._.isUndefined(o))return`${a}${r} - ${o}${r}`;if(!s._.isUndefined(a))return`Min ${a}${r}`;if(!s._.isUndefined(o))return`Max ${o}${r}`}function qr(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)&&s._.isUndefined(n))){if(e!==""&&n!==""&&!s._.isUndefined(e)&&!s._.isUndefined(n))return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!==""&&!s._.isUndefined(e))return`From ${s.dayjs(e).format("LL")}`;if(n!==""&&!s._.isUndefined(n))return`To ${s.dayjs(n).format("LL")}`}}function Kr(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ce=({filter:e,icon:n="filter-list",label:i,onClose:r,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx(V,{filterValues:a,icon:n,id:"remove-filter",onClose:r(e),tagLabel:`${i} `}),Zr=({options:e,onClose:n})=>{const i=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=a;switch(c){case"numberRange":{const f=Yr(g,u,r.placeholder);return t.jsx(ce,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},l)}case"dateRange":{const f=qr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ce,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},l)}case"radioButton":case"checkboxes":{const f=cn(p);return t.jsx(ce,{filter:a,filterValue:f,icon:r.icon,label:r.label,onClose:n},l)}case void 0:case"select":case"text":default:{const f=Vr(d),h=Kr(c,r.label,o);return t.jsx(ce,{filter:a,filterValue:f,icon:r.icon,label:h,onClose:n},l)}}})).filter(r=>{if(r===null)return!1;const{filterValue:a}=r.props;return!s._.isNil(a)&&!s._.isEmpty(String(a))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Xr=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function r(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function a(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,f=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(f)&&s._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return r(l,c);case"numberRange":return a(l,c,Number);case"dateRange":return a(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},bt=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Qr=e=>{var i;const n=((i=e.options)==null?void 0:i.map(r=>({...r,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},ea=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:r,onFiltersChange:a,onReset:o,onSearch:l,variant:c="ungrouped"})=>{const d=Ce("filters-modal"),[p,g]=x.useState([]),[u,f]=x.useState(bt(p)),h=i.map(w=>({...w,filterOptions:w.filterOptions.map(v=>p.find(C=>C.key===v.key&&C.type===v.type&&C.filterFn===v.filterFn)??{...v})})),b=x.useCallback(w=>{g([...w]),localStorage.setItem(n,JSON.stringify(w))},[g,n]),y=x.useCallback(()=>{o&&o(),d.toggle()},[d,o]),m=x.useCallback(w=>()=>{o&&o();const v=p.map(k=>k.key===w.key&&k.type===w.type&&k.filterFn===w.filterFn?Qr(k):k);g(v),localStorage.setItem(n,JSON.stringify(v))},[p,n,o]);return x.useEffect(()=>{const w=localStorage.getItem(n),v=i.flatMap(C=>C.filterOptions),k=w?JSON.parse(w):v;v.flatMap(C=>C.value).filter(Boolean).length>0||v.flatMap(C=>C.options).filter(C=>(C==null?void 0:C.checked)===void 0).length>0?(g(v),localStorage.setItem(n,JSON.stringify(v))):g(k)},[n,i,g]),x.useEffect(()=>{r&&e!==void 0&&r(Xr(e,p)),f(bt(p)),a==null||a(p)},[e,p,r,f,a]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:y,tag:u.toString(),variant:"ghost"})}),d.isOpen&&t.jsx(ln,{modalRef:d,onApplyFilters:b,onSearch:l,options:h,variant:c})]}),options:h,removeFilter:m}},nt=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:r=void 0,confirmButton:a=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const b=s.Je(),y=t.jsx(Gt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(et,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Yt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(tt,{items:g})}),(s._.isObject(o)||r)&&t.jsxs(Sr,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(Fr,{$framed:o.imageFramed,children:t.jsx(Q,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(z,{size:"sm",children:o.imageText})]}),t.jsx(Vt,{alert:n,cancelButton:i,confirmButton:a,modalRef:c})]})});return e&&c.isOpen?ae.createPortal(y,document.getElementById("portals")??document.body):c.isOpen?y:null},ta=(e,n,i)=>{const r=Ce("confirm-dialog-modal"),a=x.useRef(null),o=x.useCallback(async()=>(r.open(),new Promise(p=>{a.current=p})),[r]),l=x.useCallback(()=>{var p;r.close(),(p=a.current)==null||p.call(a,!0)},[r]),c=x.useCallback(()=>{var p;r.close(),(p=a.current)==null||p.call(a,!1)},[r]);return[o,({children:p})=>{const[g,u]=x.useState(i),f=x.useCallback(()=>{u({...i})},[]),h=x.useCallback(m=>()=>{u(j=>({...j,[m]:{...j[m],state:!j[m].state}}))},[]),b=!Object.values(g).every(({state:m})=>m),y=Object.entries(g).map(([m,{state:j,label:w}])=>t.jsx(ne,{defaultChecked:j,label:w,name:m,onChange:h(m)},m));return t.jsxs(nt,{"data-testid":e,id:e,modalRef:{...r,close:c},onClose:f,size:"sm",title:n,children:[p,t.jsx($,{display:"flex",flexDirection:"column",gap:.5,children:y}),t.jsx(qt,{disabled:b,id:e,onConfirm:l})]})}]},na=()=>{const[e,n]=x.useState(!1),[i,r]=x.useState(),a=x.useRef(null),o=Ce("confirm-dialog-modal"),l=x.useCallback(async g=>(r(g),n(!0),new Promise(u=>{a.current=u})),[]),c=x.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=x.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return x.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(nt,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},ia=2e3,ra=({content:e})=>{const[n,i]=x.useState("Copy"),r=x.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{i("Copied"),setTimeout(()=>{i("Copy")},ia)}).catch(()=>{i("Failed to copy")})},[e]);return t.jsx(B,{icon:"copy",iconSize:"xs",iconType:"fa-light",onClick:r,tooltip:n,variant:"ghost"})},aa=s.st.ul`
|
|
1968
1968
|
${({theme:e})=>`
|
|
1969
1969
|
align-items: flex-start;
|
|
1970
1970
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1977,7 +1977,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
1977
1977
|
width: 166px;
|
|
1978
1978
|
z-index: 9999;
|
|
1979
1979
|
`}
|
|
1980
|
-
`,
|
|
1980
|
+
`,oa=s.st.li`
|
|
1981
1981
|
${({theme:e})=>`
|
|
1982
1982
|
align-items: center;
|
|
1983
1983
|
background: ${e.palette.white}
|
|
@@ -2003,7 +2003,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2003
2003
|
cursor: not-allowed;
|
|
2004
2004
|
}
|
|
2005
2005
|
`}
|
|
2006
|
-
`,
|
|
2006
|
+
`,sa=({icon:e,iconColor:n,id:i,showChevron:r,options:a,title:o})=>{const l=s.Je(),[c,d]=x.useState(!1),p=c?"chevron-up":"chevron-down",{refs:g,floatingStyles:u}=s.useFloating({middleware:[s.offset({mainAxis:4})],placement:"bottom-start"}),f=x.useCallback(()=>{d(h=>!h)},[]);return ie(g.floating.current,()=>{d(!1)},!0,document.getElementById("dropdown-toggle")),t.jsxs(x.Fragment,{children:[t.jsx(P,{"aria-label":o,icon:e,iconColor:n,iconType:"fa-solid",id:`dropdown-toggle-${i}`,onClick:f,ref:g.setReference,rightIcon:r?p:void 0,variant:"ghost",children:o}),c?t.jsx(aa,{ref:g.setFloating,style:u,children:a.map(h=>{const b=({})=>{h.onClick(),d(!1)};return t.jsxs(oa,{"aria-disabled":h.disabled,"aria-label":h.label,onClick:h.disabled?void 0:b,children:[t.jsx(N,{icon:h.icon,iconColor:h.iconColor??l.palette.gray[300],iconSize:"xxs",iconType:"fa-light"}),h.label]},h.label)})}):void 0]})},Ue=({buttonProps:e,variant:n})=>t.jsx(P,{onClick:e.onClick,variant:n,children:e.text}),la=s.st.div`
|
|
2007
2007
|
display: flex;
|
|
2008
2008
|
flex-direction: column;
|
|
2009
2009
|
align-items: center;
|
|
@@ -2011,7 +2011,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2011
2011
|
max-width: 900px;
|
|
2012
2012
|
white-space: pre-line;
|
|
2013
2013
|
margin: 0 auto;
|
|
2014
|
-
`,
|
|
2014
|
+
`,ca=s.st.div`
|
|
2015
2015
|
display: flex;
|
|
2016
2016
|
flex-direction: row;
|
|
2017
2017
|
justify-content: center;
|
|
@@ -2024,7 +2024,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2024
2024
|
> img {
|
|
2025
2025
|
width: 100%;
|
|
2026
2026
|
}
|
|
2027
|
-
`,
|
|
2027
|
+
`,da=s.st.div`
|
|
2028
2028
|
display: flex;
|
|
2029
2029
|
flex-direction: row;
|
|
2030
2030
|
margin: 0;
|
|
@@ -2037,7 +2037,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2037
2037
|
> *:last-child {
|
|
2038
2038
|
margin-right: 0;
|
|
2039
2039
|
}
|
|
2040
|
-
`,
|
|
2040
|
+
`,yt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},pa=({cancelButton:e=void 0,confirmButton:n=void 0,description:i,imageSrc:r="integrates/empty/addRoot",padding:a=1.25,title:o,size:l="md"})=>{const c=(n??e)!==void 0;return t.jsxs(la,{$padding:a,children:[t.jsx(ca,{children:t.jsx(Q,{alt:"empty-icon",publicId:r})}),t.jsx(U,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:yt[l].title,textAlign:"center",children:o}),t.jsx(z,{mb:c?2:void 0,size:yt[l].description,textAlign:"center",children:i}),c?t.jsxs(da,{children:[e&&t.jsx(Ue,{buttonProps:e,variant:"tertiary"}),n&&t.jsx(Ue,{buttonProps:n,variant:"primary"})]}):void 0]})},ga=({children:e})=>{const n=s.useFormContext();return e({...n})},ua=s.st.form`
|
|
2041
2041
|
${({theme:e})=>`
|
|
2042
2042
|
align-items: flex-start;
|
|
2043
2043
|
align-self: stretch;
|
|
@@ -2047,7 +2047,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2047
2047
|
overflow: hidden auto;
|
|
2048
2048
|
width: 100%;
|
|
2049
2049
|
`}
|
|
2050
|
-
`,
|
|
2050
|
+
`,xa=({alert:e,buttonAlignment:n,cancelButton:i,children:r,confirmButton:a,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,padding:g=!0,showButtons:u=!0,yupSchema:f,...h})=>{const b=s.Je(),y=s.useForm({...h,mode:d??"all",resolver:f?s.o(f):void 0}),j=u?`calc(100% - ${e?"139px":"83px"})`:"100%",w=g?1.5:0;return t.jsx(s.FormProvider,{...y,children:t.jsx(ua,{onSubmit:y.handleSubmit(p),children:t.jsxs($,{scroll:"y",width:"100%",children:[t.jsx($,{borderRadius:`0 0 ${b.spacing[.25]} ${b.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:j,pb:w,pt:0,px:w,scroll:"y",children:r}),u&&t.jsxs($,{borderRadius:`0 0 ${b.spacing[.25]} ${b.spacing[.25]}`,borderTop:`1px solid ${b.palette.gray[200]}`,display:"flex",flexDirection:n?"unset":"column",gap:.625,justify:n??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,maxWidth:c,children:[i?t.jsx(P,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,t.jsx(P,{disabled:((a==null?void 0:a.disabled)??!1)||y.formState.isSubmitting||o&&!y.formState.isDirty,icon:a==null?void 0:a.icon,id:l,justify:"center",type:"submit",width:"100%",children:(a==null?void 0:a.label)??"Confirm"})]})]})]})})})},fa=s.st(ve)`
|
|
2051
2051
|
display: grid;
|
|
2052
2052
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2053
2053
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2065,7 +2065,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2065
2065
|
grid-template-columns: repeat(${n}, 1fr);
|
|
2066
2066
|
}
|
|
2067
2067
|
`}
|
|
2068
|
-
`,
|
|
2068
|
+
`,ha=x.forwardRef(function({children:n,md:i,sm:r,lg:a,xl:o,gap:l,...c},d){return t.jsx(fa,{$gap:l,$lg:a,$md:i,$sm:r,$xl:o,ref:d,...c,children:n})}),ba=s.st.div`
|
|
2069
2069
|
${({theme:e,$itemsLength:n})=>`
|
|
2070
2070
|
display: flex;
|
|
2071
2071
|
background-color: ${e.palette.white};
|
|
@@ -2084,7 +2084,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2084
2084
|
width: 507px;
|
|
2085
2085
|
}
|
|
2086
2086
|
`}
|
|
2087
|
-
`,
|
|
2087
|
+
`,it=s.st.div`
|
|
2088
2088
|
${({theme:e,$isSelected:n})=>`
|
|
2089
2089
|
align-items: center;
|
|
2090
2090
|
background-color: ${n?e.palette.gray[100]:e.palette.white};
|
|
@@ -2101,7 +2101,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2101
2101
|
background-color: ${e.palette.gray[100]};
|
|
2102
2102
|
}
|
|
2103
2103
|
`}
|
|
2104
|
-
`,
|
|
2104
|
+
`,dn=({isSelected:e=!1,label:n,onSelect:i})=>{const r=s.Je(),a=x.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(it,{$isSelected:e,onClick:a,children:[e?t.jsx(N,{icon:"check",iconColor:r.palette.gray[800],iconSize:"xs"}):null,t.jsx(z,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ya=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:r,onClose:a,selectedItem:o,title:l,variant:c})=>{const d=s.Je(),[p,g]=x.useState(n),[u,f]=x.useState(""),h=x.useCallback(m=>{g(j=>j.filter(w=>String(w.name).toLowerCase().includes(m.toLocaleLowerCase())))},[g]),b=x.useCallback(m=>{m.currentTarget&&(f(m.currentTarget.value),h(m.currentTarget.value))},[f,h]);x.useEffect(()=>{g(n),h(u)},[n,h,u]);const y=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(ba,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(z,{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:a,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(xe,{onInput:b,placeholder:"Search"})}),t.jsx(re,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(it,{onClick:i,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(N,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(z,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(m=>t.jsx(dn,{isSelected:o.toLowerCase()===m.name,label:m.name.charAt(0).toUpperCase()+m.name.slice(1),onSelect:r},m.name))]})]})})});return e?ae.createPortal(y,document.body):t.jsx("div",{})},$a=({description:e,height:n="auto",leftIconName:i,children:r,rightIconName:a,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=s.Je(),f=p==="centered",h=l&&t.jsx(G,{icon:a??i,iconColor:u.palette.gray[800],id:l,place:d,tip:c});return t.jsxs($,{alignItems:f?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:f?"column":"column-reverse",gap:.5,height:n,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(i)?void 0:h,t.jsx(z,{color:f?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||s.lodashExports.isUndefined(a)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[f&&!s.lodashExports.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(U,{fontWeight:"bold",size:"md",children:o}),r]}),f&&!s.lodashExports.isUndefined(a)?h:void 0]})]})},ma=({actions:e,children:n,header:i,title:r,tabs:a,footer:o})=>{const l=s.Je();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(z,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:r}),i]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(B,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx($,{display:"flex",pt:.25,width:"100%",children:t.jsx(tt,{items:a})}),t.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},g)=>t.jsx(P,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},wa=s.st.span`
|
|
2105
2105
|
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2106
2106
|
background-color: ${n};
|
|
2107
2107
|
border-radius: 5px;
|
|
@@ -2110,14 +2110,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2110
2110
|
padding: ${e.spacing[.125]} ${e.spacing[.25]} ${e.spacing[.125]} ${e.spacing[.25]};
|
|
2111
2111
|
text-decoration: ${i}
|
|
2112
2112
|
`}
|
|
2113
|
-
`,
|
|
2113
|
+
`,ja=({bgColor:e,children:n,txtDecoration:i,ml:r=1})=>t.jsx(wa,{$bgColor:e,$txtDecoration:i,className:`ml-${r}`,children:n}),va={lg:"56",md:"30",sm:"12"},{getVariant:ka}=q(e=>({blue:`stroke: ${e.palette.info[500]};`,red:`stroke: ${e.palette.primary[500]};`,white:`stroke: ${e.palette.white};`})),Ca=s.ct`
|
|
2114
2114
|
0% {
|
|
2115
2115
|
transform: rotateZ(0deg);
|
|
2116
2116
|
}
|
|
2117
2117
|
100% {
|
|
2118
2118
|
transform: rotateZ(360deg)
|
|
2119
2119
|
}
|
|
2120
|
-
`,
|
|
2120
|
+
`,Sa=s.ct`
|
|
2121
2121
|
0%,
|
|
2122
2122
|
25% {
|
|
2123
2123
|
stroke-dashoffset: 280;
|
|
@@ -2134,16 +2134,16 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2134
2134
|
stroke-dashoffset: 280;
|
|
2135
2135
|
transform: rotate(360deg);
|
|
2136
2136
|
}
|
|
2137
|
-
`,
|
|
2137
|
+
`,za=s.st.svg`
|
|
2138
2138
|
${({$size:e="md"})=>s.nt`
|
|
2139
|
-
animation: ${
|
|
2139
|
+
animation: ${Ca} 2s linear infinite;
|
|
2140
2140
|
animation-timing-function: linear;
|
|
2141
2141
|
display: inline-block;
|
|
2142
|
-
width: ${
|
|
2142
|
+
width: ${va[e]}px;
|
|
2143
2143
|
`}
|
|
2144
|
-
`,
|
|
2144
|
+
`,Ia=s.st.circle`
|
|
2145
2145
|
${({theme:e,$color:n="red"})=>s.nt`
|
|
2146
|
-
animation: 1.4s ease-in-out infinite both ${
|
|
2146
|
+
animation: 1.4s ease-in-out infinite both ${Sa};
|
|
2147
2147
|
display: block;
|
|
2148
2148
|
fill: transparent;
|
|
2149
2149
|
stroke-linecap: round;
|
|
@@ -2152,9 +2152,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2152
2152
|
stroke-width: 10px;
|
|
2153
2153
|
transform-origin: 50% 50%;
|
|
2154
2154
|
|
|
2155
|
-
${
|
|
2155
|
+
${ka(e,n)}
|
|
2156
2156
|
`}
|
|
2157
|
-
`,
|
|
2157
|
+
`,Ta=s.st.circle`
|
|
2158
2158
|
display: block;
|
|
2159
2159
|
fill: transparent;
|
|
2160
2160
|
stroke: ${({theme:e})=>e.palette.gray[200]};
|
|
@@ -2162,12 +2162,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2162
2162
|
stroke-width: 10px;
|
|
2163
2163
|
transform-origin: 50% 50%;
|
|
2164
2164
|
opacity: ${({$color:e})=>e==="white"?"20%":"unset"};
|
|
2165
|
-
`,
|
|
2165
|
+
`,Fa=({color:e="red",label:n,size:i})=>{const r=s.Je();return t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsxs(za,{$size:i,viewBox:"0 0 100 100",children:[t.jsx(Ta,{$color:e,cx:"50",cy:"50",r:"45"}),t.jsx(Ia,{$color:e,cx:"50",cy:"50",r:"45"})]}),n&&t.jsx(z,{color:e==="red"||e==="blue"?r.palette.gray[700]:r.palette.white,ml:.5,size:"sm",children:n})]})},Na={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},Da=({publicId:e,variant:n})=>t.jsx($,{...Na[n],children:t.jsx(Q,{alt:"logo",publicId:e})}),Ea=s.st(s.Lottie).attrs(({autoplay:e=!0})=>({autoplay:e,className:"comp-lottie"}))`
|
|
2166
2166
|
${({$size:e=16})=>`
|
|
2167
2167
|
height: ${e}px;
|
|
2168
2168
|
width: ${e}px;
|
|
2169
2169
|
`}
|
|
2170
|
-
`,
|
|
2170
|
+
`,Ra=e=>{const{size:n}=e;return t.jsx(Ea,{$size:n,...e})},La=({children:e,commitSha:n,commitShortSha:i,parentElement:r,userInfo:a,setVisibility:o})=>{const l=s.Je(),{userName:c,email:d,phone:p,userRole:g}=a;return ie(r,()=>{o(!1)}),t.jsxs(Xt,{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(z,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(z,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(z,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx($,{children:t.jsx(V,{tagLabel:g,variant:"role"})})]})}),t.jsx(re,{}),e,t.jsx(re,{}),t.jsx("li",{className:"commit-info",children:t.jsx(K,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${n}`,iconPosition:"hidden",children:t.jsx(z,{color:l.palette.gray[400],size:"xs",children:`commit : ${i}`})})})]})},Aa=s.st.button`
|
|
2171
2171
|
align-items: center;
|
|
2172
2172
|
background-color: transparent;
|
|
2173
2173
|
border: unset;
|
|
@@ -2184,7 +2184,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2184
2184
|
&:hover span {
|
|
2185
2185
|
color: ${F.palette.primary[200]};
|
|
2186
2186
|
}
|
|
2187
|
-
`,
|
|
2187
|
+
`,Pa=({message:e,onClickButton:n,buttonText:i,buttonFontWeight:r="regular",show:a=!0,icon:o,onClose:l,buttonSide:c="end"})=>{const d=s.Je(),[p,g]=x.useState(a),u=x.useCallback(()=>{g(!1),l==null||l()},[l]);x.useEffect(()=>{g(a)},[a,g]);const f=t.jsxs(Aa,{onClick:n,children:[t.jsx(z,{color:d.palette.white,fontWeight:r,size:"sm",textDecoration:"underline",children:i}),t.jsx(N,{icon:o??"arrow-right",iconColor:d.palette.white,iconSize:"xs",iconType:r==="bold"?"fa-regular":"fa-light"})]});return t.jsxs($,{alignItems:"center",bgGradient:d.palette.gradients["01"],display:p?"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:[c==="start"&&n?f:void 0,t.jsx($,{children:typeof e=="string"?t.jsx(z,{color:d.palette.white,display:"inline",size:"sm",children:e}):e}),c==="end"&&n?f:void 0]}),t.jsx(N,{clickable:!0,hoverColor:d.palette.primary[200],icon:"close",iconColor:d.palette.white,iconSize:"xs",iconType:"fa-light",onClick:u})]})},Wa=s.st.div`
|
|
2188
2188
|
${({theme:e,$variant:n})=>`
|
|
2189
2189
|
background: ${e.palette.white};
|
|
2190
2190
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2203,7 +2203,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2203
2203
|
right: 16px;
|
|
2204
2204
|
}
|
|
2205
2205
|
`}
|
|
2206
|
-
`,
|
|
2206
|
+
`,Ba=s.st.div`
|
|
2207
2207
|
${({theme:e,$variant:n})=>`
|
|
2208
2208
|
height: ${e.spacing[2.5]};
|
|
2209
2209
|
width: ${e.spacing[2.5]};
|
|
@@ -2234,7 +2234,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2234
2234
|
color: ${e.palette[n][500]};
|
|
2235
2235
|
}
|
|
2236
2236
|
`}
|
|
2237
|
-
`,
|
|
2237
|
+
`,Oa=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",Ma=({description:e,onClose:n,title:i,variant:r})=>{const a=s.Je(),o=x.useCallback(()=>{n==null||n()},[n]);return t.jsxs(Wa,{$variant:r,className:`notification notification__${r}`,role:"alertdialog",children:[t.jsxs(Ba,{$variant:r,children:[t.jsx(N,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(N,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(N,{icon:Oa(r),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(U,{fontWeight:"bold",size:"xs",children:i}),t.jsx(z,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(B,{height:"fit-content",icon:"close",iconColor:a.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Ha=s.st.div`
|
|
2238
2238
|
width: fit-content;
|
|
2239
2239
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2240
2240
|
border-radius: 4px;
|
|
@@ -2247,7 +2247,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2247
2247
|
align-items: center;
|
|
2248
2248
|
justify-content: center;
|
|
2249
2249
|
padding: 0.5em;
|
|
2250
|
-
`,
|
|
2250
|
+
`,_a=s.st.input`
|
|
2251
2251
|
width: 4em;
|
|
2252
2252
|
appearance: textfield;
|
|
2253
2253
|
border-style: none;
|
|
@@ -2267,7 +2267,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2267
2267
|
&::-webkit-inner-spin-button {
|
|
2268
2268
|
opacity: 1;
|
|
2269
2269
|
}
|
|
2270
|
-
`,
|
|
2270
|
+
`,Ja=x.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:r=0,max:a,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const u=i<0?0:i,[f,h]=x.useState(Number(r).toFixed(u)),b=x.useCallback(j=>{const w=s.lodashExports.toNumber(j.target.value);j.target.value.endsWith(".")?h(j.target.value):w>=Number(o)&&w<=Number(a)&&(h(String(w)),n&&c(s.lodashExports.toNumber(w.toFixed(u)))),j.stopPropagation()},[n,u,a,o,c]),y=x.useCallback(j=>{j.currentTarget.contains(j.relatedTarget)||h(Number(r).toFixed(u)),j.stopPropagation()},[u,r]),m=x.useCallback(j=>{j.stopPropagation(),j.key==="Enter"&&!s.lodashExports.isEmpty(j.currentTarget.value)&&c(s.lodashExports.toNumber(j.currentTarget.value))},[c]);return t.jsx(Ha,{onBlur:y,tabIndex:-1,children:t.jsx(G,{id:"numberInputTooltip",tip:d,children:t.jsx(_a,{...p,"aria-label":l,"aria-valuemax":Number(a),"aria-valuemin":Number(o),"aria-valuenow":Number(f),max:a,min:o,name:l,onChange:b,onKeyUp:m,ref:g,step:10**-u,type:"number",value:f})})})}),Ua={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},Ge=({icon:e,label:n,onClick:i,onlyLabel:r=!1,provider:a="GitLab"})=>{const o=s.Je();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[r?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(Q,{alt:`${a} Logo`,height:"100%",publicId:Ua[a],width:"100%"}):t.jsx(N,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(z,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:r?"break-spaces":"nowrap",wordWrap:"unset",children:n??a})})]})},Ga=({align:e="end",buttonLabel:n="Add Credential",children:i,id:r,manualOption:a,providers:o})=>{const l=s.Je(),[c,d]=x.useState(!1),p=x.useRef(null);ie(p.current,()=>{d(!1)},!0);const g=x.useCallback(h=>{a==null||a.onClick(h),d(!1)},[a]),u=x.useCallback(()=>{d(h=>!h)},[d]),f=x.useCallback(h=>b=>{var y;(y=o[h])==null||y.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(P,{icon:"plus",onClick:u,variant:"primary",children:n}),t.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:r,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(Ge,{onClick:f(h),provider:h},h)),a===void 0?void 0:t.jsx(Ge,{icon:"square-plus",label:a.label??"Add manually",onClick:g}),i]})]})},Va=s.st.div`
|
|
2271
2271
|
${({theme:e})=>`
|
|
2272
2272
|
height: ${e.spacing[1]};
|
|
2273
2273
|
width: ${e.spacing[1]};
|
|
@@ -2298,7 +2298,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2298
2298
|
font-size: ${e.spacing[.5]};
|
|
2299
2299
|
}
|
|
2300
2300
|
`}
|
|
2301
|
-
`,
|
|
2301
|
+
`,pn=({margin:e,onClick:n,text:i})=>{const r=s.Je(),a=t.jsxs(Va,{children:[t.jsx(N,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(N,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(N,{icon:"crown",iconClass:"icon",iconSize:"xs"})]});return i!==void 0?t.jsx($,{cursor:"pointer",display:"inline-block",mr:e,onClick:n,children:t.jsxs($,{alignItems:"center",bgColor:r.palette.warning[50],borderRadius:"4px",display:"flex",padding:[.25,.25,.25,.25],width:"fit-content",children:[a,t.jsx(z,{color:r.palette.warning[500],display:"inline",ml:.25,size:"xs",children:i})]})}):t.jsx($,{display:"inline-block",mr:e,onClick:n,children:a})},Ya=({score:e})=>{const n=s.Je(),i=e<=33?"priority-bars-low":"priority-bars-medium",r=e>66||e===0?"priority-bars-high":i;return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.25,children:[t.jsx(N,{icon:r,iconClass:e<=66?"fa-kit-duotone":"",iconColor:e>0?n.palette.primary[500]:n.palette.gray[200],iconSize:"xs",iconType:"fa-kit",secondaryColor:n.palette.gray[200]}),t.jsx(z,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:e+"%"})]})},{getVariant:qa}=q(e=>({compliance:`
|
|
2302
2302
|
display: inline-flex;
|
|
2303
2303
|
|
|
2304
2304
|
&.horizontal {
|
|
@@ -2356,17 +2356,17 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2356
2356
|
.progress-bar {
|
|
2357
2357
|
background-color: ${e.palette.primary[500]};
|
|
2358
2358
|
}
|
|
2359
|
-
`})),
|
|
2359
|
+
`})),Ka=(e,n)=>n<50?e.palette.error[500]:n<80?e.palette.warning[500]:e.palette.success[500],Za=s.st.div`
|
|
2360
2360
|
${({theme:e,$minWidth:n,$orientation:i,$rounded:r,$variant:a})=>`
|
|
2361
2361
|
background-color: ${e.palette.gray[100]};
|
|
2362
2362
|
border-radius: ${r?"100px":"unset"};
|
|
2363
2363
|
${i==="horizontal"?"min-width":"min-height"}: ${n}px;
|
|
2364
2364
|
${i==="horizontal"?"":"height: 100%;"}
|
|
2365
2365
|
|
|
2366
|
-
${
|
|
2366
|
+
${qa(e,a)}
|
|
2367
2367
|
|
|
2368
2368
|
`}
|
|
2369
|
-
`,
|
|
2369
|
+
`,Xa=s.st.div`
|
|
2370
2370
|
${({theme:e,$percentage:n,$rounded:i,$variant:r})=>`
|
|
2371
2371
|
display: inline-flex;
|
|
2372
2372
|
width: ${n}%;
|
|
@@ -2376,14 +2376,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2376
2376
|
border-radius: ${i?"100px":"unset"};
|
|
2377
2377
|
border-end-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2378
2378
|
border-start-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2379
|
-
background-color: ${r==="compliance"?
|
|
2379
|
+
background-color: ${r==="compliance"?Ka(e,n):"inherit"};
|
|
2380
2380
|
`}
|
|
2381
|
-
`,
|
|
2381
|
+
`,gn=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:r=!1,orientation:a="horizontal",rounded:o=!0,variant:l="default"})=>{const c=r&&i==="left",d=r?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(z,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(Za,{$minWidth:e,$orientation:a,$rounded:o,$variant:l,className:a,children:t.jsx(Xa,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:a==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},un=({onClick:e})=>t.jsx("svg",{className:"in-progress-icon",fill:"none",height:"13",onClick:e,viewBox:"0 0 12 13",width:"12",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Group 8",children:[t.jsx("path",{d:"M9.40199 3.00342L9.95715 2.34182C9.42087 1.88791 8.80949 1.53109 8.15051 1.28741L7.8552 2.09852C8.41952 2.30786 8.94298 2.61408 9.40199 3.00342Z",fill:"#1D2939"}),t.jsx("path",{d:"M11.1498 6.08815L11.9998 5.90982C11.8803 5.21957 11.6409 4.55558 11.2923 3.94793L10.5444 4.36018C10.8429 4.89758 11.0476 5.48194 11.1498 6.08815Z",fill:"#1D2939"}),t.jsx("path",{d:"M7.8552 11.8057L8.15051 12.6168C8.80949 12.3731 9.42087 12.0163 9.95715 11.5624L9.40199 10.9008C8.94298 11.2901 8.41952 11.5963 7.8552 11.8057Z",fill:"#1D2939"}),t.jsx("path",{d:"M10.5444 9.54409L11.2923 9.97608C11.6411 9.36144 11.8805 8.69095 12 7.99444L11.1498 7.84459C11.0476 8.44177 10.8427 9.01676 10.5444 9.54409Z",fill:"#1D2939"}),t.jsx("path",{d:"M6.04789 13V0.904236C4.44389 0.904236 2.90559 1.54142 1.77139 2.67562C0.637187 3.80982 0 5.34813 0 6.95213C0 8.55613 0.637187 10.0944 1.77139 11.2286C2.90559 12.3628 4.44389 13 6.04789 13Z",fill:"#1D2939"})]})}),xn=(e,n)=>{switch(e){case"completed":return n.palette.success[500];case"disabled":return n.palette.gray[300];case"error":return n.palette.error[500];case"in progress":return n.palette.gray[800];case"not completed":default:return n.palette.gray[800]}},Qa=s.st(N)`
|
|
2382
2382
|
box-sizing: border-box;
|
|
2383
2383
|
|
|
2384
|
-
border-right: ${({theme:e,$variant:n})=>n==="in progress"?`1px dashed ${
|
|
2384
|
+
border-right: ${({theme:e,$variant:n})=>n==="in progress"?`1px dashed ${xn("in progress",e)}`:"unset"};
|
|
2385
2385
|
border-radius: 50%;
|
|
2386
|
-
`,
|
|
2386
|
+
`,eo=s.st.div`
|
|
2387
2387
|
${({$minWidth:e,$orientation:n})=>`
|
|
2388
2388
|
display: flex;
|
|
2389
2389
|
flex-direction: ${n==="horizontal"?"row":"column"};
|
|
@@ -2393,12 +2393,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2393
2393
|
flex-flow: row wrap;
|
|
2394
2394
|
}
|
|
2395
2395
|
`}
|
|
2396
|
-
`,
|
|
2396
|
+
`,to=150,no=({label:e,minWidth:n=to,state:i="not completed",stepNumber:r=1,title:a,onClick:o,orientation:l="horizontal"})=>{const c=s.Je(),d={completed:"circle-check",disabled:"circle-dashed",error:"circle-exclamation","in progress":"circle-half","not completed":"circle-dashed"},p=i==="disabled";return t.jsxs($,{display:"inline-flex",flexDirection:l==="horizontal"?"column":"row",minWidth:`${n}px`,children:[t.jsx(gn,{minWidth:n,orientation:l,percentage:p||i==="not completed"?0:100,rounded:!1,variant:i==="error"?"progressIndicatorError":"progressIndicator"}),t.jsxs($,{display:"flex",gap:.5,px:.5,py:.5,width:"100%",children:[i==="in progress"?t.jsx(un,{onClick:o}):t.jsx(Qa,{$variant:i,clickable:!p,disabled:p,icon:d[i],iconColor:xn(i,c),iconSize:"xs",iconType:"fa-light",onClick:p?void 0:o}),t.jsxs($,{children:[t.jsx(z,{color:c.palette.gray[p?300:800],fontWeight:"bold",size:"sm",children:`${r}.${a}`}),e===void 0?null:t.jsx(z,{color:c.palette.gray[p?300:600],size:"xs",children:e})]})]})]})},io=150,ro=({children:e,orientation:n="horizontal",minWidth:i=io})=>{const r=x.Children.toArray(e),a=x.useMemo(()=>x.Children.count(e),[e]),o=x.useMemo(()=>a*i,[a,i]);return t.jsx(eo,{$minWidth:`${o}px`,$orientation:n,children:r.map(l=>x.cloneElement(l,{minWidth:i,orientation:n}))})},fn=({description:e="",highlightDescription:n="",mobile:i})=>{const r=s.Je(),a=i?"md":"lg",o=typeof n=="string",l=o?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(z,{display:"inline",lineSpacing:1.5,size:a,textAlign:i?"start":"center",children:o?t.jsxs(x.Fragment,{children:[t.jsx(pe,{color:r.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:a,children:n}),e]}):e.split(l).map((c,d)=>n.includes(c)?t.jsx(pe,{color:r.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:a,children:c},`${d+1}-bold`):c)}):t.jsx(z,{lineSpacing:1.5,size:a,textAlign:i?"start":"center",children:e})},ao=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:r,confirmButton:a,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,mobile:g=!1,title:u,titleColor:f})=>{const h=s.Je(),{alt:b,src:y,width:m="77px",height:j="77px"}=d,w=x.useCallback(()=>{n==null||n.onClick()},[n]),v=x.useCallback(()=>{a==null||a.onClick()},[a]),k=t.jsx(U,{color:f,fontWeight:"bold",lineSpacing:g?1.5:2.5,mb:g?1.5:0,size:g?"sm":"lg",textAlign:g?"start":"center",children:u}),C=t.jsx(Q,{alt:b,height:j,publicId:y,width:m}),E=t.jsx($,{alignItems:"center","aria-label":u,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs($,{bgColor:h.palette.white,border:`1px solid ${h.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,position:"relative",px:g?1.5:2.5,py:g?1.5:2.5,shadow:"lg",width:g?"335px":"100%",zIndex:11,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[g?k:void 0,g?t.jsx($,{alignItems:"center",height:j,justify:"center",mr:0,children:t.jsx($,{bgColor:h.palette.gray[100],left:"0",position:"absolute",textAlign:"center",width:"100%",children:C})}):C,t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[g?void 0:k,t.jsx(fn,{description:l,highlightDescription:c,mobile:g})]})]}),r&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:r})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:g?"start":"center",children:[s.lodashExports.isObject(a)?t.jsx(P,{onClick:v,variant:(a==null?void 0:a.variant)??"primary",children:a==null?void 0:a.text},a==null?void 0:a.key):void 0,s.lodashExports.isObject(n)?t.jsx(P,{onClick:w,variant:(n==null?void 0:n.variant)??"tertiary",children:n==null?void 0:n.text},n==null?void 0:n.key):void 0]})]})});return e?ae.createPortal(E,o??document.body):E},oo=s.st.div.attrs({className:"comp-scroll-up"})`
|
|
2397
2397
|
bottom: 15px;
|
|
2398
2398
|
position: fixed;
|
|
2399
2399
|
right: 140px;
|
|
2400
2400
|
z-index: 100;
|
|
2401
|
-
`,
|
|
2401
|
+
`,so=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,r]=x.useState(!1),[a,o]=x.useState(null);x.useEffect(()=>{o(document.getElementById(e)),a==null||a.addEventListener("scroll",()=>{r(a.scrollTop>n)})},[a,e,n]);const l=x.useCallback(()=>{a==null||a.scrollTo({behavior:"smooth",top:0})},[a]);return i?t.jsx(oo,{children:t.jsx(B,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},lo={critical:{bgColor:F.palette.primary[700],colorL:F.palette.gray[800],colorR:F.palette.white},disable:{bgColor:F.palette.gray[200],colorL:F.palette.gray[400],colorR:F.palette.gray[400]},high:{bgColor:F.palette.error[500],colorL:F.palette.gray[800],colorR:F.palette.white},low:{bgColor:F.palette.warning[200],colorL:F.palette.gray[800],colorR:F.palette.gray[800]},medium:{bgColor:F.palette.warning[500],colorL:F.palette.gray[800],colorR:F.palette.gray[800]}},co=({textL:e,textR:n,variant:i})=>{const r=s.Je(),{bgColor:a,colorL:o,colorR:l}=lo[i];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:r.palette.white,border:`1px solid ${a}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(z,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:a,border:`1px solid ${a}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(z,{color:l,size:"xs",children:n})})]})},po=(e,n)=>{const i={critical:F.palette.primary[700],high:F.palette.error[500],low:F.palette.warning[200],medium:F.palette.warning[500],none:F.palette.gray[200]},r={disabled:F.palette.gray[400],enabled:F.palette.gray[800]},a={critical:F.palette.white,high:F.palette.white,low:F.palette.gray[800],medium:F.palette.gray[800],none:F.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?a.none:a[e],textColor:n<1?r.disabled:r.enabled}},de=({variant:e,value:n})=>{const{iconColor:i,iconText:r,iconTextColor:a,textColor:o}=po(e,n),l=s.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(G,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(z,{color:a,size:"sm",textAlign:"center",children:r})})}),t.jsx(z,{color:o,size:"sm",children:n})]})},go=({critical:e,high:n,medium:i,low:r})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(de,{value:e,variant:"critical"}),t.jsx(de,{value:n,variant:"high"}),t.jsx(de,{value:i,variant:"medium"}),t.jsx(de,{value:r,variant:"low"})]}),uo=s.st.div`
|
|
2402
2402
|
${({theme:e})=>`
|
|
2403
2403
|
border-radius: ${e.spacing[.25]};
|
|
2404
2404
|
cursor: pointer;
|
|
@@ -2416,7 +2416,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2416
2416
|
display: block;
|
|
2417
2417
|
}
|
|
2418
2418
|
`}
|
|
2419
|
-
`,
|
|
2419
|
+
`,xo=({visibleElement:e,hiddenElement:n})=>t.jsxs(uo,{children:[e,t.jsx($,{display:"none",position:"absolute",top:"100%",zIndex:10,children:n})]}),hn=({customBadge:e=void 0,description:n,icon:i,onClick:r,requiresUpgrade:a=!1,title:o})=>{const l=s.Je();return t.jsxs($,{bgColor:l.palette.white,bgColorHover:l.palette.gray[100],cursor:"pointer",display:"flex",gap:.5,onClick:r,px:1.25,py:1,width:"100%",children:[t.jsx($,{alignItems:"center",bgColor:l.palette.gray[300],borderRadius:l.spacing[.25],display:"flex",height:"24px",justify:"center",width:"24px",children:t.jsx(N,{icon:i,iconColor:l.palette.gray[800],iconSize:"xxs",ml:.5,mr:.5})}),t.jsxs($,{children:[t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,children:[t.jsx(z,{color:l.palette.gray[800],size:"sm",children:o}),a?t.jsx(pn,{text:"Upgrade"}):void 0,e]}),t.jsx(z,{color:l.palette.gray[400],size:"xs",children:n})]})]})},fo=s.st(s.m.div)`
|
|
2420
2420
|
${({theme:e})=>`
|
|
2421
2421
|
background-color: ${e.palette.white};
|
|
2422
2422
|
box-shadow: ${e.shadows.lg};
|
|
@@ -2439,7 +2439,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2439
2439
|
height: auto;
|
|
2440
2440
|
}
|
|
2441
2441
|
`}
|
|
2442
|
-
`,
|
|
2442
|
+
`,ho=({children:e,closeIconId:n="close-menu",isOpen:i,items:r,onClose:a,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.Je(),u=x.useRef(null),f=x.useCallback(h=>()=>{h(),a()},[a]);return x.useEffect(()=>{const h=["mousedown","touchstart"],b=y=>{var k;const m=y.target,j=document.getElementById("helpBtn"),w=document.getElementById("filterBtn"),v=(m===j||((j==null?void 0:j.contains(m))??!1)||m===w||(w==null?void 0:w.contains(m)))??!1;i&&!v&&!(((k=u.current)==null?void 0:k.contains(m))??!1)&&a()};return h.forEach(y=>{document.addEventListener(y,b,{passive:!0})}),()=>{h.forEach(y=>{document.removeEventListener(y,b)})}},[i,a]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(fo,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:u,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs($,{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(z,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(B,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:a,px:.25,py:.25,variant:"ghost"})]}),t.jsxs($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs($,{py:1.25,children:[(r??[]).map(({customBadge:h,description:b,icon:y,onClick:m,requiresUpgrade:j,title:w})=>t.jsx(hn,{customBadge:h,description:b,icon:y,onClick:f(m),requiresUpgrade:j,title:w},w)),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(P,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(P,{onClick:l,type:"submit",children:o})]})]})]})})})},bo=(e,n)=>n>=50?`
|
|
2443
2443
|
${e.palette.gray[200]} 50%,
|
|
2444
2444
|
${e.palette.primary[500]} 50.05%,
|
|
2445
2445
|
${e.palette.primary[500]} ${n}%,
|
|
@@ -2450,7 +2450,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2450
2450
|
${e.palette.primary[500]} 50%,
|
|
2451
2451
|
${e.palette.gray[200]} 50.05%,
|
|
2452
2452
|
${e.palette.gray[200]} 100%
|
|
2453
|
-
`,
|
|
2453
|
+
`,yo=s.st.div`
|
|
2454
2454
|
${({theme:e,$min:n,$value:i})=>`
|
|
2455
2455
|
align-items: center;
|
|
2456
2456
|
align-self: stretch;
|
|
@@ -2466,7 +2466,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2466
2466
|
${n>=0?`
|
|
2467
2467
|
${e.palette.primary[500]} ${i}%,
|
|
2468
2468
|
${e.palette.gray[200]} ${i}%
|
|
2469
|
-
|
|
2469
|
+
`:bo(e,i)}
|
|
2470
2470
|
);
|
|
2471
2471
|
border-radius: ${e.spacing[.125]};
|
|
2472
2472
|
height: ${e.spacing[.25]};
|
|
@@ -2490,7 +2490,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2490
2490
|
border: 1px solid ${e.palette.primary[500]};
|
|
2491
2491
|
}
|
|
2492
2492
|
`}
|
|
2493
|
-
|
|
2493
|
+
`,$o=s.st.div`
|
|
2494
2494
|
${({theme:e})=>`
|
|
2495
2495
|
align-items: center;
|
|
2496
2496
|
display: flex;
|
|
@@ -2504,7 +2504,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2504
2504
|
font-size: ${e.spacing[.5]};
|
|
2505
2505
|
}
|
|
2506
2506
|
`}
|
|
2507
|
-
`,
|
|
2507
|
+
`,mo=s.st.output`
|
|
2508
2508
|
${({theme:e})=>`
|
|
2509
2509
|
align-items: flex-end;
|
|
2510
2510
|
border-radius: ${e.spacing[.5]};
|
|
@@ -2515,7 +2515,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2515
2515
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2516
2516
|
width: 59px;
|
|
2517
2517
|
`}
|
|
2518
|
-
`,
|
|
2518
|
+
`,bn=({state:e,trackRef:n,index:i,name:r})=>{const a=x.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:n,inputRef:a},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":r,ref:a})})})},wo=(e,n,i)=>Math.round((i-e)/(n-e)*100),jo=e=>{const n=s.Je(),i=x.useRef(null),{label:r,minValue:a=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),u=wo(a,o,g.getThumbValue(0)),{groupProps:f,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,i);return t.jsx(J,{htmlFor:l,label:r,children:t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(yo,{...f,$min:a??0,$value:u,className:"slider",children:[t.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:i,children:t.jsx(bn,{index:0,name:l,state:g,trackRef:i})}),t.jsxs($o,{children:[t.jsx("p",{children:`${p.format(a)} (Low)`}),a<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${p.format(o)} (High)`})]})]}),t.jsx(mo,{children:t.jsx(z,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:vo}=q(e=>({completed:`
|
|
2519
2519
|
background-color: ${e.palette.primary[500]};
|
|
2520
2520
|
color: ${e.palette.white};
|
|
2521
2521
|
|
|
@@ -2538,7 +2538,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2538
2538
|
&::after {
|
|
2539
2539
|
background-color: ${e.palette.gray[200]};
|
|
2540
2540
|
}
|
|
2541
|
-
`})),
|
|
2541
|
+
`})),ko=s.st.div`
|
|
2542
2542
|
${({theme:e})=>`
|
|
2543
2543
|
align-items: stretch;
|
|
2544
2544
|
background-color: ${e.palette.white};
|
|
@@ -2548,7 +2548,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2548
2548
|
padding: ${`${e.spacing[1]} ${e.spacing[1]}`};
|
|
2549
2549
|
scroll-behavior: unset;
|
|
2550
2550
|
`}
|
|
2551
|
-
`,
|
|
2551
|
+
`,Co=s.st.div`
|
|
2552
2552
|
display: flex;
|
|
2553
2553
|
flex-direction: row;
|
|
2554
2554
|
margin-bottom: ${({theme:e})=>e.spacing[2]};
|
|
@@ -2556,7 +2556,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2556
2556
|
&:last-child > div:first-child > span::after {
|
|
2557
2557
|
display: none;
|
|
2558
2558
|
}
|
|
2559
|
-
`,
|
|
2559
|
+
`,So=s.st.div`
|
|
2560
2560
|
${({theme:e})=>`
|
|
2561
2561
|
display: inline-flex;
|
|
2562
2562
|
font-family: ${e.typography.type.primary};
|
|
@@ -2568,7 +2568,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2568
2568
|
margin-right: ${e.spacing[.5]};
|
|
2569
2569
|
}
|
|
2570
2570
|
`}
|
|
2571
|
-
`,
|
|
2571
|
+
`,zo=s.st.span`
|
|
2572
2572
|
${({theme:e,$variant:n})=>`
|
|
2573
2573
|
border-radius: 6px;
|
|
2574
2574
|
display: inline-block;
|
|
@@ -2591,9 +2591,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2591
2591
|
height: calc(100% - ${e.spacing[1]});
|
|
2592
2592
|
}
|
|
2593
2593
|
|
|
2594
|
-
${
|
|
2594
|
+
${vo(e,n)}
|
|
2595
2595
|
`}
|
|
2596
|
-
`,
|
|
2596
|
+
`,Io=({button:{disabled:e=!1,text:n,type:i="button",onClick:r},steps:a})=>{const[o,l]=x.useState(1),c=x.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(ko,{children:a.map((d,p)=>{const{content:g,title:u,nextAction:f,previousAction:h}=d,b=p+1,y=b===o?"current":"disabled",m=b<o?"completed":y;return t.jsxs(Co,{children:[t.jsx($,{maxWidth:"40px",position:"relative",children:t.jsx(zo,{$variant:m,children:m==="completed"?t.jsx(N,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs($,{ml:1.5,width:"100%",children:[t.jsx(U,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:u}),m==="current"&&t.jsxs($,{children:[g,t.jsxs(So,{children:[o>1&&t.jsx(P,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<a.length?t.jsx(P,{disabled:d.isDisabledNext??!1,onClick:c(1,f),variant:"primary",children:"Next step"}):t.jsx(P,{disabled:e,onClick:r,type:i,variant:"primary",children:n})]})]})]})]},d.title)})})},To=s.st.button`
|
|
2597
2597
|
${({theme:e})=>`
|
|
2598
2598
|
align-items: center;
|
|
2599
2599
|
background-color: ${e.palette.white};
|
|
@@ -2635,7 +2635,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2635
2635
|
background-color: ${e.palette.gray[100]};
|
|
2636
2636
|
}
|
|
2637
2637
|
`}
|
|
2638
|
-
`,
|
|
2638
|
+
`,Fo={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},No=({disabled:e=!1,icon:n,id:i,label:r,name:a,onClick:o,type:l="button",variant:c})=>{const d=s.Je(),p=t.jsxs(To,{"aria-label":a??void 0,className:c,disabled:e,id:i,onClick:o,type:l,children:[t.jsx(N,{clickable:!1,icon:n??Fo[c].icon,iconSize:a===void 0?"xxs":"xs",iconType:"fa-light"}),a??void 0]});return t.jsxs($,{alignItems:"center",display:"flex",children:[p,r&&t.jsx(z,{color:d.palette.gray[800],ml:.5,size:"sm",children:r})]})},Do=s.st.div`
|
|
2639
2639
|
${({theme:e,$size:n})=>`
|
|
2640
2640
|
align-items: center;
|
|
2641
2641
|
background-color: ${e.palette.white};
|
|
@@ -2658,7 +2658,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2658
2658
|
border: 1px solid ${e.palette.gray[600]};
|
|
2659
2659
|
}
|
|
2660
2660
|
`}
|
|
2661
|
-
`,
|
|
2661
|
+
`,Eo=s.st.div`
|
|
2662
2662
|
${({theme:e,$size:n})=>`
|
|
2663
2663
|
display: ${n==="long"?"flex":"block"};
|
|
2664
2664
|
flex-direction: column;
|
|
@@ -2708,7 +2708,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2708
2708
|
transform: translateX(-50%);
|
|
2709
2709
|
}
|
|
2710
2710
|
`}
|
|
2711
|
-
|
|
2711
|
+
`,yn=({date:e,description:n,title:i,size:r="long"})=>{const a=s.Je();return t.jsxs(Do,{$size:r,className:"timeline-card",children:[t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:e}),t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",lineSpacing:1.5,mb:.5,size:"md",textAlign:"center",children:i}),t.jsx("div",{children:n.map((o,l)=>{const c=`${o}#${l}`;return t.jsx(z,{size:"sm",textAlign:"center",wordBreak:"break-word",children:o},c)})})]})},Ro=({items:e})=>{const n=x.useRef(null),[i,r]=x.useState("long");return x.useEffect(()=>{n.current&&r(n.current.offsetWidth<=1100?"small":"long")},[]),t.jsx($,{ref:n,width:"100%",children:t.jsx(Eo,{$size:i,children:e.map((a,o)=>t.jsx(yn,{date:a.date,description:a.description,size:i,title:a.title},`${a.title}-${o}`))})})},Lo={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:""},Ao=({run:e,steps:n,onFinish:i})=>{const[r,a]=x.useState(e),[o,l]=x.useState(0),c=x.useCallback(d=>{const{action:p,index:g,status:u,type:f}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(f)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(a(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:r,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})},$n=t.jsx($,{alignItems:"center",bgColor:F.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(z,{bgGradient:F.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),Po=s.st.div`
|
|
2712
2712
|
${({className:e,theme:n})=>`
|
|
2713
2713
|
align-items: flex-start;
|
|
2714
2714
|
border-radius: ${n.spacing[1]};
|
|
@@ -2773,5 +2773,5 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(a
|
|
|
2773
2773
|
width: 320px;
|
|
2774
2774
|
}
|
|
2775
2775
|
`}
|
|
2776
|
-
`;const
|
|
2777
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},
|
|
2776
|
+
`;const Wo={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
|
|
2777
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},Bo=({description:e,onClick:n,plan:i})=>{const{title:r,description:a,benefits:o,buttonText:l}=Wo[i],c=e??a;return t.jsxs(Po,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&$n,t.jsx(U,{color:F.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:r}),t.jsx(z,{color:F.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(z,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(P,{onClick:n,variant:"primary",children:l})]})};exports.Accordion=Xn;exports.AccordionContent=wt;exports.ActionButton=_e;exports.Alert=si;exports.AppliedFilter=ce;exports.AppliedFilters=Zr;exports.ArrayField=Me;exports.Avatar=xi;exports.BaseButtonComponent=Ve;exports.BaseComponent=ve;exports.BaseSpanComponent=qe;exports.BaseTextComponent=Ye;exports.Button=P;exports.Button$1=Ie;exports.ButtonToolbarCenter=Bi;exports.ButtonToolbarRow=Mi;exports.ButtonToolbarStartRow=Oi;exports.Calendar=Tt;exports.Calendar$1=Rt;exports.Calendar$2=At;exports.CalendarCell=It;exports.CalendarGrid=De;exports.CardHeader=Ne;exports.CardWithImage=bi;exports.CardWithInput=or;exports.CardWithOptions=en;exports.CardWithSelector=ur;exports.CardWithSwitch=hr;exports.Carousel=jr;exports.Checkbox=ne;exports.CodeSnippet=kr;exports.Col=Oe;exports.ColumFilters=ln;exports.ColumnsModal=Mr;exports.ComboBox=Ze;exports.ComboBoxField=Be;exports.Container=$;exports.CopyButton=ra;exports.CustomThemeProvider=Jn;exports.DateField=Nt;exports.DateSelector=ge;exports.Description=fn;exports.Dialog=Re;exports.Divider=re;exports.Dropdown=sa;exports.Editable=Wi;exports.EmptyButton=Ue;exports.EmptyState=pa;exports.FilePreview=Ct;exports.FilterControl=rn;exports.FilterForm=Je;exports.FilterFormContent=an;exports.FiltersList=sn;exports.Form=xa;exports.Gap=Ji;exports.GridContainer=ha;exports.GroupSelector=ya;exports.Header=Ee;exports.Header$1=Yt;exports.Heading=U;exports.Icon=N;exports.IconButton=B;exports.InProgressIcon=un;exports.IndicatorCard=$a;exports.InfoSidebar=ma;exports.InnerForm=ga;exports.Input=Le;exports.InputArray=Gi;exports.InputDate=Et;exports.InputDateRange=Lt;exports.InputDateTime=Pi;exports.InputFile=Ki;exports.InputNumber=Wt;exports.InputNumberRange=Bt;exports.InputTags=Xi;exports.Label=Ke;exports.Link=K;exports.ListItem=Se;exports.ListItemsWrapper=Xt;exports.LittleFlag=ja;exports.Loading=Fa;exports.LocationCode=Ut;exports.Logo=Da;exports.Lottie=Ra;exports.MemoizedImage=Q;exports.Menu=La;exports.MenuItem=hn;exports.MessageBanner=Pa;exports.Modal=nt;exports.ModalConfirm=qt;exports.ModalFooter=Vt;exports.Notification=Ma;exports.NotificationSign=Kt;exports.NumberField=Fe;exports.NumberInput=Ja;exports.OAuthSelector=Ga;exports.Option=St;exports.OptionBoxContainer=it;exports.OptionContainer=Ge;exports.OptionContainer$1=dn;exports.OutlineContainer=J;exports.PhoneInput=rr;exports.PlanCard=Bo;exports.PopUp=ao;exports.Popover=ke;exports.PremiumFeature=pn;exports.PreviewPanel=Qt;exports.PriorityScore=Ya;exports.ProgressBar=gn;exports.ProgressIndicator=ro;exports.ProgressStep=no;exports.RadioButton=Qe;exports.RecommendedTag=$n;exports.Row=Pt;exports.ScrollUpButton=so;exports.Search=xe;exports.SearchPanel=nn;exports.SeverityBadge=co;exports.SeverityOverview=go;exports.SeverityOverviewBadge=de;exports.ShowOnHover=xo;exports.SlideOutMenu=ho;exports.Slider=jo;exports.Span=pe;exports.StepLapse=Io;exports.Tab=Zt;exports.TableButton=No;exports.Tabs=tt;exports.Tag=V;exports.TagsField=He;exports.Text=z;exports.TextArea=ar;exports.Thumb=bn;exports.TimeField=Dt;exports.TimeLine=Ro;exports.TimeLineCard=yn;exports.Toggle=_t;exports.Tooltip=G;exports.Tour=Ao;exports.baseStep=Lo;exports.formatCheckValues=cn;exports.getStyledConfig=je;exports.hiddenProps=$t;exports.icons=Hn;exports.setBorder=ye;exports.setDisplay=$e;exports.setInteraction=we;exports.setMargin=he;exports.setPadding=fe;exports.setPosition=be;exports.setText=me;exports.theme=F;exports.uniqueIcons=_n;exports.useCarousel=Ot;exports.useClickOutside=ie;exports.useCloudinaryImage=Mt;exports.useColumnsModal=lr;exports.useConditionsDialog=ta;exports.useConfirmDialog=na;exports.useDebouncedCallback=Ht;exports.useFilterForm=on;exports.useFilters=ea;exports.useModal=Ce;exports.useSearch=cr;exports.variantBuilder=q;
|