@fluidattacks/design 3.18.3 → 3.18.4
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.d.ts +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-input/index.stories.d.ts +58 -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/card/types.d.ts +6 -2
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/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/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/toggle-buttons/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +1 -1
- package/dist/components/typography/heading/index.js +1 -1
- package/dist/components/typography/index.js +1 -1
- package/dist/components/typography/span/index.js +1 -1
- package/dist/components/typography/text/index.js +1 -1
- package/dist/{components-CJz3lviU.js → components-DDL_kWdH.js} +70 -70
- package/dist/{components-DCeE2HDp.mjs → components-DP6Dvp33.mjs} +681 -658
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),f=require("react"),s=require("./vendor-CJUQQyxF.js"),ae=require("react-dom"),Pe=require("react-router-dom"),q=e=>({getVariant:(n,i)=>e(n)[i]}),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),f=require("react"),s=require("./vendor-CJUQQyxF.js"),ae=require("react-dom"),Pe=require("react-router-dom"),q=e=>({getVariant:(n,i)=>e(n)[i]}),bt=["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"],Cn={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},Sn={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},zn={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},In={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},Tn={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},Fn={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},Nn={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},En={"01":"linear-gradient(45deg, #f32637 0%, #b8075d 100%)","02":"linear-gradient(45deg, #fcfcfd 0%, #667085 100%)"},Dn={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"}},Rn={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)"},An={mobile:"480px",tablet:"960px",sm:"1024px",md:"1440px",lg:"1920px"},Ln={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"},Pn=["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"],Wn=[["fal","arrow-down"],["fal","arrow-left"],["fal","arrow-right"],["fal","arrow-up"],["fal","plus"],["fal","minus"],["fas","check"],["fas","circle-question"]],I={typography:Dn,shadows:Rn,breakpoints:An,spacing:Ln,palette:{primary:Sn,complementary:zn,error:In,info:Nn,warning:Tn,success:Fn,black:"#0c111d",white:"#ffffff",gray:Cn,gradients:En}},Bn=({children:e})=>t.jsx(s.Xe,{theme:I,children:e}),N=(e,n)=>n===void 0?"":`${e}: ${n};`,xe=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: ${I.spacing[o]} ${I.spacing[l]} ${I.spacing[c]} ${I.spacing[d]};`}return`padding: ${I.spacing[n]} ${I.spacing[i]} ${I.spacing[r]} ${I.spacing[a]};`},fe=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: ${I.spacing[o]} ${I.spacing[l]} ${I.spacing[c]} ${I.spacing[d]};`}return`margin: ${I.spacing[n]} ${I.spacing[i]} ${I.spacing[r]} ${I.spacing[a]};`},he=e=>{const n=N("position",e.position),i=N("top",e.top),r=N("right",e.right),a=N("bottom",e.bottom),o=N("left",e.left),l=N("z-index",e.zIndex);return`
|
|
2
2
|
${n}
|
|
3
3
|
${i}
|
|
4
4
|
${r}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`},On=e=>e.includes("x")?"overflow-x: auto;":"",Mn=e=>e.includes("y")?"overflow-y: auto;":"",ye=e=>{const n=e.scroll?`
|
|
17
17
|
${On(e.scroll)}
|
|
18
18
|
${Mn(e.scroll)}
|
|
19
|
-
`:"",i=N("visibility",e.visibility),r=N("display",e.display),a=N("height",e.height),o=N("width",e.width),l=N("max-height",e.maxHeight),c=N("max-width",e.maxWidth),d=N("min-height",e.minHeight),
|
|
19
|
+
`:"",i=N("visibility",e.visibility),r=N("display",e.display),a=N("height",e.height),o=N("width",e.width),l=N("max-height",e.maxHeight),c=N("max-width",e.maxWidth),d=N("min-height",e.minHeight),g=N("min-width",e.minWidth),p=N("box-shadow",e.shadow?I.shadows[e.shadow]:void 0),u=N("gap",e.gap===void 0?void 0:I.spacing[e.gap]),x=N("background-color",e.bgColor),h=N("background",e.bgGradient),b=N("flex-direction",e.flexDirection),$=N("flex-grow",e.flexGrow),w=N("justify-content",e.justify),v=N("justify-self",e.justifySelf),m=N("align-items",e.alignItems),j=N("align-self",e.alignSelf),k=N("flex-wrap",e.wrap);return`
|
|
20
20
|
${n}
|
|
21
21
|
${i}
|
|
22
22
|
${r}
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
${l}
|
|
26
26
|
${c}
|
|
27
27
|
${d}
|
|
28
|
-
${p}
|
|
29
28
|
${g}
|
|
29
|
+
${p}
|
|
30
30
|
${x}
|
|
31
31
|
${h}
|
|
32
32
|
${u}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
${m}
|
|
38
38
|
${j}
|
|
39
39
|
${k}
|
|
40
|
-
`},$e=e=>{const n=N("color",e.color),i=N("font-family",e.fontFamily),r=N("font-size",e.fontSize),a=N("font-weight",e.fontWeight),o=N("line-spacing",e.letterSpacing),l=N("line-height",e.lineSpacing),c=N("text-align",e.textAlign),d=N("text-decoration",e.textDecoration),
|
|
40
|
+
`},$e=e=>{const n=N("color",e.color),i=N("font-family",e.fontFamily),r=N("font-size",e.fontSize),a=N("font-weight",e.fontWeight),o=N("line-spacing",e.letterSpacing),l=N("line-height",e.lineSpacing),c=N("text-align",e.textAlign),d=N("text-decoration",e.textDecoration),g=N("text-overflow",e.textOverflow),p=N("white-space",e.whiteSpace),u=N("word-break",e.wordBreak),x=N("word-wrap",e.wordWrap);return`
|
|
41
41
|
${n}
|
|
42
42
|
${i}
|
|
43
43
|
${r}
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
${l}
|
|
47
47
|
${c}
|
|
48
48
|
${d}
|
|
49
|
-
${p}
|
|
50
49
|
${g}
|
|
50
|
+
${p}
|
|
51
51
|
${u}
|
|
52
52
|
${x}
|
|
53
53
|
`},me=e=>{const n=N("cursor",e.cursor),i=N("border-color",e.borderColorHover),r=N("background-color",e.bgColorHover),a=N("box-shadow",e.shadowHover===void 0?void 0:I.shadows[e.shadowHover]),o=N("transition",e.transition);return`
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
${r}
|
|
60
60
|
${a}
|
|
61
61
|
}
|
|
62
|
-
`},we={shouldForwardProp:e=>!
|
|
62
|
+
`},we={shouldForwardProp:e=>!bt.includes(e)},je=s.st.div.withConfig(we)`
|
|
63
63
|
${xe}
|
|
64
64
|
${fe}
|
|
65
65
|
${he}
|
|
@@ -108,17 +108,17 @@
|
|
|
108
108
|
${r};
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
|
-
`,y=f.forwardRef(function({as:n="div",center:i,children:r,id:a,onHover:o,onLeave:l,styleMd:c,styleSm:d,...
|
|
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:
|
|
111
|
+
`,y=f.forwardRef(function({as:n="div",center:i,children:r,id:a,onHover:o,onLeave:l,styleMd:c,styleSm:d,...g},p){return t.jsx(Hn,{$center:i,$styleMd:c,$styleSm:d,as:n,id:a,onMouseLeave:l,onMouseOver:o,ref:p,...g,children:r})}),_n=s.st(Ge)`
|
|
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:g="unset",$size:p,$sizeMd:u,$sizeSm:x,$textFill:h="unset",$whiteSpace:b="pre-line",$wordBreak:$="normal"})=>`
|
|
113
113
|
background: ${n};
|
|
114
114
|
color: ${i};
|
|
115
115
|
display: ${r};
|
|
116
116
|
font-family: ${a};
|
|
117
|
-
font-size: ${e.typography.heading[
|
|
117
|
+
font-size: ${e.typography.heading[p]};
|
|
118
118
|
font-weight: ${e.typography.weight[o]};
|
|
119
119
|
letter-spacing: ${l};
|
|
120
120
|
line-height: ${e.spacing[c]};
|
|
121
|
-
overflow: ${
|
|
121
|
+
overflow: ${g};
|
|
122
122
|
width: ${r==="block"?"100%":"auto"};
|
|
123
123
|
white-space: ${b};
|
|
124
124
|
word-break: ${$};
|
|
@@ -130,16 +130,16 @@
|
|
|
130
130
|
and (min-width: ${e.breakpoints.mobile})
|
|
131
131
|
and (max-width: ${e.breakpoints.tablet})
|
|
132
132
|
{
|
|
133
|
-
font-size: ${e.typography.heading[u??
|
|
133
|
+
font-size: ${e.typography.heading[u??p]};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
137
|
-
font-size: ${e.typography.heading[x??
|
|
137
|
+
font-size: ${e.typography.heading[x??p]};
|
|
138
138
|
line-height: ${e.spacing[d??c]};
|
|
139
139
|
}
|
|
140
140
|
`}
|
|
141
|
-
`,
|
|
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:
|
|
141
|
+
`,yt=s.st(Ge)`
|
|
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:g,$overflow:p="unset",$size:u,$sizeMd:x,$sizeSm:h,$textFill:b="unset",$whiteSpace:$="pre-line",$wordBreak:w="normal"})=>`
|
|
143
143
|
background: ${n};
|
|
144
144
|
color: ${i};
|
|
145
145
|
display: ${r};
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
font-weight: ${e.typography.weight[o]};
|
|
150
150
|
letter-spacing: ${c};
|
|
151
151
|
line-height: ${e.spacing[d]};
|
|
152
|
-
overflow: ${
|
|
152
|
+
overflow: ${p};
|
|
153
153
|
width: ${r==="block"?"100%":"auto"};
|
|
154
154
|
white-space: ${$};
|
|
155
155
|
word-break: ${w};
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
|
|
167
167
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
168
168
|
font-size: ${e.typography.text[h??u]};
|
|
169
|
-
line-height: ${e.spacing[
|
|
169
|
+
line-height: ${e.spacing[g??d]};
|
|
170
170
|
}
|
|
171
171
|
`}
|
|
172
172
|
`,Jn=s.st(Ye)`
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
|
|
183
183
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
184
184
|
`}
|
|
185
|
-
`,U=f.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:
|
|
185
|
+
`,U=f.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:g,lineSpacingSm:p,overflow:u,size:x,sizeMd:h,sizeSm:b,textFill:$,whiteSpace:w,wordBreak:v,...m},j){return t.jsx(_n,{$bgGradient:n,$color:a,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:g,$lineSpacingSm:p,$overflow:u,$size:x,$sizeMd:h,$sizeSm:b,$textFill:$,$whiteSpace:w,$wordBreak:v,className:r,ref:j,...m,children:i})}),pe=f.forwardRef(function({children:n,color:i,content:r,display:a,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:g,size:p,sizeMd:u,sizeSm:x,...h},b){return t.jsx(Jn,{$color:i,$content:r,$display:a,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:g,$size:p,$sizeMd:u,$sizeSm:x,ref:b,...h,children:n})}),z=f.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:g,lineSpacingSm:p,overflow:u,size:x,sizeMd:h,sizeSm:b,textFill:$,whiteSpace:w,wordBreak:v,fontStyle:m,...j},k){return t.jsx(yt,{$bgGradient:n,$color:a,$display:o,$fontFamily:l,$fontStyle:m,$fontWeight:c,$letterSpacing:d,$lineSpacing:g,$lineSpacingSm:p,$overflow:u,$size:x,$sizeMd:h,$sizeSm:b,$textFill:$,$whiteSpace:w,$wordBreak:v,className:r,ref:k,...j,children:i})}),$t=({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(y,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[n,e.extraElement?t.jsx(y,{children:e.extraElement}):void 0]})},Un={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Vn=s.st(Ye)`
|
|
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"};
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
&:hover:not([disabled]) {
|
|
219
219
|
transform: scale(1.2);
|
|
220
220
|
}
|
|
221
|
-
`;const T=f.forwardRef(function({clickable:n,disabled:i,hoverColor:r,icon:a,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:
|
|
221
|
+
`;const T=f.forwardRef(function({clickable:n,disabled:i,hoverColor:r,icon:a,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:g,iconType:p="fa-solid",onClick:u,rotation:x,spanClass:h,secondaryColor:b,...$},w){return t.jsx(Vn,{$clickable:n,$color:l,$disabled:i,$hoverColor:r,$rotation:x,$secondaryColor:b,$size:d,className:h,"data-testid":`${a}-icon`,onClick:u,ref:w,...$,children:t.jsx("i",{className:`${p} fa-${a} ${o}`,...c!==void 0?{"data-fa-mask":c}:{},...g!==void 0?{"data-fa-transform":g}:{}})},`${p}-${a}`)}),Gn=f.forwardRef(function({aligned:n="end",items:i,bgColor:r},a){const o=s.Je(),[l,c]=f.useState(i.map(g=>g.expanded??!1)),d=f.useCallback(g=>p=>{p.preventDefault(),c(u=>u.map((x,h)=>h===g?!x:x))},[]);return t.jsx(y,{borderColor:o.palette.gray[200],borderTop:"1px solid",ref:a,children:i.map((g,p)=>{const u=l[p];return t.jsxs(y,{bgColor:r??o.palette.white,borderBottom:"1px solid",borderColor:o.palette.gray[200],children:[t.jsx(y,{"aria-controls":`panel-${g.title}`,"aria-expanded":u,"aria-label":g.title,as:"button",bgColor:r??o.palette.white,bgColorHover:o.palette.gray[100],cursor:"pointer",display:"flex",onClick:d(p),padding:[.75,.75,.75,.75],width:"100%",children:t.jsxs(y,{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:g.title}),t.jsx(T,{icon:u?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),u&&t.jsx($t,{item:g})]},g.title)})})}),Yn=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:qn}=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]};
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
background-color: ${e.palette.primary[500]};
|
|
370
370
|
color: ${e.palette.white};
|
|
371
371
|
}
|
|
372
|
-
`}))
|
|
372
|
+
`})),mt=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);
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
|
|
394
394
|
${Zn(e,r??"primary")}
|
|
395
395
|
`}
|
|
396
|
-
`,Qn=s.st(
|
|
396
|
+
`,Qn=s.st(mt)`
|
|
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]};
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
width: max-content;
|
|
419
419
|
z-index: 999999;
|
|
420
420
|
`}
|
|
421
|
-
`,V=({children:e,disabled:n=!1,display:i="inline-block",height:r,icon:a,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:
|
|
421
|
+
`,V=({children:e,disabled:n=!1,display:i="inline-block",height:r,icon:a,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:g,place:p="bottom",tip:u="",title:x="",hide:h=u===""&&x===""&&g===void 0,width:b})=>{const $=s.Je(),[w,v]=f.useState(!1),{refs:m,floatingStyles:j,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:v,open:w,placement:p,whileElementsMounted:s.autoUpdate}),S=s.useHover(k,{delay:{close:0,open:500},move:!1}),D=s.useFocus(k),F=s.useRole(k,{role:a?"label":"tooltip"}),{getReferenceProps:C,getFloatingProps:E}=s.useInteractions([S,D,F]);return n?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(ei,{...C(),display:i,height:r,id:c,ref:m.setReference,width:b,children:a?t.jsx(T,{clickable:!0,disabled:n,icon:a,iconColor:o,iconSize:l??"xxs",iconType:w?"fa-solid":"fa-light"}):e}),w&&!h&&ae.createPortal(t.jsxs(ti,{...E(),$maxWidth:d,id:`floating-${c}`,ref:m.setFloating,style:j,children:[s.lodashExports.isEmpty(x)?void 0:t.jsx(z,{color:$.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),s.lodashExports.isEmpty(u)?void 0:t.jsx(z,{color:$.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(g)?void 0:g]}),document.getElementById("root")??document.body)]})},O=f.forwardRef(function({borderRadius:n,disabled:i,icon:r,iconColor:a,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:g="center",onClick:p,px:u,py:x,type:h="button",tooltip:b,tooltipPlace:$,value:w,variant:v="primary",...m},j){const k=t.jsx(Qn,{$variant:v,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:g,onClick:p,px:u,py:x,ref:j,type:h,value:w,...m,children:t.jsx(T,{clickable:!1,icon:r,iconColor:a,iconSize:o,iconTransform:l,iconType:c})}),D=(h+(v??"")+(d??r)).replace(/ /u,"_");return b===void 0?k:t.jsx(V,{id:`${D}-tooltip`,place:$,tip:b,children:k})}),ni=f.forwardRef(function({autoHide:n=!1,children:i,closable:r=!1,onTimeOut:a,show:o=!0,time:l=8,variant:c="error",id:d,...g},p){const[u,x]=f.useState(o),h=f.useCallback(()=>{x(!1)},[]);return f.useEffect(()=>{const b=setTimeout(()=>{a==null||a(!0),n&&h()},l*1e3);return()=>{clearTimeout(b)}},[n,h,l,a]),f.useEffect(()=>{x(o)},[o,x]),t.jsx(y,{display:u?"block":"none",ref:p,role:"alert",...g,children:t.jsxs(Kn,{$variant:c,id:d,children:[t.jsx(T,{clickable:!1,icon:Yn(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(Xn,{children:i}),r?t.jsx(O,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),st=s.st.div`
|
|
422
422
|
${({theme:e})=>`
|
|
423
423
|
align-items: center;
|
|
424
424
|
background-color: ${e.palette.gray[200]};
|
|
@@ -608,7 +608,7 @@
|
|
|
608
608
|
&:hover:not([disabled]) {
|
|
609
609
|
color: ${e.palette.gray[500]};
|
|
610
610
|
}
|
|
611
|
-
`})),
|
|
611
|
+
`})),wt=s.nt`
|
|
612
612
|
${({theme:e,$color:n,$variant:i})=>`
|
|
613
613
|
align-items: center;
|
|
614
614
|
cursor: pointer;
|
|
@@ -633,10 +633,10 @@
|
|
|
633
633
|
${n?`color: ${n}`:oi(e,i)}
|
|
634
634
|
`}
|
|
635
635
|
`,si=s.st.a`
|
|
636
|
-
${
|
|
636
|
+
${wt}
|
|
637
637
|
`,li=s.st(Pe.Link)`
|
|
638
|
-
${
|
|
639
|
-
`,Q=({children:e,color:n,download:i,href:r,iconPosition:a="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=r.startsWith("https://"),
|
|
638
|
+
${wt}
|
|
639
|
+
`,Q=({children:e,color:n,download:i,href:r,iconPosition:a="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=r.startsWith("https://"),g=t.jsx(T,{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(si,{$color:n,$variant:c,download:i,href:r,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[a==="left"?g:void 0,e,a==="right"?g:void 0]}):t.jsxs(li,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:r,children:[l!==void 0&&a==="left"?g:void 0,e,l!==void 0&&a==="right"?g:void 0]})},G=({disabled:e,icon:n,iconColor:i="inherit",iconType:r="fa-light",id:a="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:g,priority:p="default",tagTitle:u="",tagLabel:x,variant:h="default"})=>{const b=x.length>25&&s.lodashExports.isEmpty(u+o),$=`${x.slice(0,25)}...`;return t.jsxs(pe,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(ai,{$fontSize:l,$variant:h,className:p,children:[n&&t.jsx(T,{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?$:x}),t.jsx("strong",{className:"w-full",children:o})]}),g?t.jsx(O,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:a,onClick:g,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(Q,{href:c,children:d})]})},ci=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},L=f.forwardRef(function({children:n,disabled:i=!1,external:r=!1,fontSize:a,href:o,id:l,icon:c,iconColor:d,iconType:g,name:p,onClick:u,rightIcon:x,tag:h,type:b="button",tooltip:$,tooltipPlace:w="bottom",underline:v=!1,value:m,variant:j="primary",width:k,...S},D){const F=$!==void 0,C=`${l}-tooltip`,E=f.useCallback(()=>{o&&ci(o,r)},[r,o]),R=t.jsxs(mt,{$size:a,$variant:j,"aria-disabled":i,className:v?"underline":void 0,disabled:i,id:l,name:p,onClick:j==="link"?E:u,ref:D,type:b,value:m,width:k,...F?{"data-tooltip-id":C}:{},...S,children:[c!==void 0&&t.jsx(T,{icon:c,iconColor:d??void 0,iconSize:"xs",iconType:g??"fa-light"}),n,x||j==="link"?t.jsx(T,{icon:x??"arrow-right",iconSize:"xs",iconType:"fa-light"}):void 0,h===void 0?null:t.jsx(G,{tagLabel:h,variant:"default"})]});return F?t.jsx(V,{disabled:!F,id:C,place:w,tip:$,width:k,children:R}):R}),di=f.forwardRef(function({children:n,onClick:i,userName:r,showIcon:a=!1,showUsername:o=!1},l){const c=!!i;return t.jsx(y,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs(y,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(L,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(st,{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(T,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs(y,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(st,{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(T,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(ii,{children:n})]})})}),Te=({authorEmail:e,date:n,description:i,descriptionColor:r,id:a,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:g})=>{const p=s.Je();return t.jsxs(y,{width:"100%",children:[typeof o=="string"?t.jsx(z,{color:l??p.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:c,wordBreak:"break-word",children:o}):o,t.jsxs(y,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(z,{color:r??p.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:i}),n&&t.jsx(z,{color:p.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(z,{color:p.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),g&&t.jsx(V,{icon:"circle-info",id:a,tip:g})]})]})},lt=s.st(y).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
|
-
`,pi=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},gi=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,pi(n)),
|
|
654
|
+
`,pi=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},gi=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,pi(n)),jt=({alt:e,fileType:n,width:i="100%",opacity:r=0,src:a,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),g=f.useCallback(p=>{if(!l)return;const u=p.target,x=u.currentTime/u.duration*100;x>5&&x<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):x>=50&&x<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):x>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return n==="video"||gi(["webm"],a)?t.jsx(lt,{$opacity:r,children:t.jsx(Q,{href:a,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:g,style:{height:o,width:i},children:[t.jsx("source",{src:a,type:"video/webm"}),a]})})}):t.jsx(lt,{$opacity:r,children:t.jsx("img",{alt:e,src:a,style:{height:o,width:i}})})},ui=({alt:e,authorEmail:n,date:i,description:r,src:a,children:o,isEditing:l,onClick:c,title:d,hideDescription:g=!1,headerType:p="image",showMaximize:u=!0,videoViewStatus:x})=>{const h=s.Je(),[b,$]=f.useState(!1),w=f.useCallback(()=>{$(!0)},[]),v=f.useCallback(()=>{$(!1)},[]);return t.jsxs(y,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:w,onLeave:v,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx(y,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(f.Fragment,{children:[t.jsx(jt,{alt:e,fileType:p,height:"147px",opacity:b?.3:0,src:a,videoViewStatus:x,width:"100%"}),u?t.jsx(y,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(O,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),g?null:t.jsx(Te,{authorEmail:n,date:i,description:r,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},xi=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};
|
|
@@ -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:
|
|
816
|
+
`,J=({children:e,id:n,error:i,helpLink:r,helpLinkText:a="Link here",helpText:o,htmlFor:l,label:c,linkPosition:d="down",maxLength:g,required:p,tooltip:u,value:x,weight:h})=>{const b=s.Je(),$=x?x.length:0;return t.jsxs(fi,{id:n,children:[c===void 0?void 0:t.jsx(qe,{htmlFor:l,label:c,link:d==="up"?r:void 0,required:p,tooltip:u,weight:h}),e,i||g?t.jsxs(y,{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}),g&&t.jsx(G,{priority:"low",tagLabel:`${$}/${g}`,variant:"error"})]}):void 0,o||r?t.jsxs(y,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[o&&t.jsxs(t.Fragment,{children:[t.jsx(T,{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(Q,{href:r,children:a}):void 0]}):void 0]})},ve=({className:e,children:n,isFilter:i=!1,popoverRef:r,state:a,triggerRef:o,...l})=>{var u;const c=f.useRef(null),d=(u=o==null?void 0:o.current)==null?void 0:u.getBoundingClientRect(),{popoverProps:g}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:r??c,triggerRef:o,isNonModal:r?!0:void 0},a),p=f.useCallback(x=>{x.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...g,className:e,id:"popover",onPointerDown:i?p:void 0,ref:r??c,style:{...g.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:n})})},hi=s.st.ul`
|
|
817
817
|
${({theme:e,$multiSelection:n})=>`
|
|
818
818
|
align-self: center;
|
|
819
819
|
background: ${e.palette.white};
|
|
@@ -947,7 +947,7 @@
|
|
|
947
947
|
fill: ${e.palette.white};
|
|
948
948
|
}
|
|
949
949
|
`}
|
|
950
|
-
`,ie=f.forwardRef(function({checked:n,disabled:i=!1,label:r,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:
|
|
950
|
+
`,ie=f.forwardRef(function({checked:n,disabled:i=!1,label:r,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:g,value:p,...u},x){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(yi,{"aria-disabled":i,children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-hidden":!1,"aria-label":a,checked:n,"data-testid":r??p,disabled:i,id:a,name:a,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:x,type:"checkbox",value:p,...u}),t.jsx(T,{disabled:i,icon:"check",iconSize:"sm"}),r??p]}),g===void 0?void 0:t.jsx(V,{icon:"circle-info",id:g,place:"right",tip:g})]})}),ne=(e,n,i=!1,r)=>{f.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])},vt=({item:e,multiSelection:n,name:i,register:r,setInputValue:a,setValue:o,state:l,watch:c})=>{var S,D,F;const d=s.Je(),g=f.useRef(null),p=l.disabledKeys,u=Array.from(l.collection.getKeys()).filter(C=>!Array.from(p).includes(C)&&C!=="All"),{optionProps:x,isSelected:h,isFocused:b,isDisabled:$}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,g),w=[h?"selected":"",b?"focused":"",$?"disabled":""].join(" "),v=f.useCallback(C=>{a(""),o==null||o(`${i}Options`,""),C.currentTarget.checked&&(a(C.currentTarget.value),o==null||o(`${i}Options`,u))},[u,i,a,o]),m=f.useCallback(()=>{const C=c==null?void 0:c(`${i}Options`),E=typeof C=="string"?[C]:C;s.isEqual(u,E)&&!Array.from(p).includes("All")?(o==null||o("checkAll","All vulnerability types"),a("All vulnerability types")):(o==null||o("checkAll",""),a((E==null?void 0:E.length)<=2?E.join(", "):`${E.slice(0,2).join(", ")+`, +${E.length-2} more`}`))},[p,u,i,a,o,c]),j=e.key==="All"?t.jsx(ie,{...r==null?void 0:r("checkAll",{onChange:v}),label:(S=e.rendered)==null?void 0:S.toString(),name:"checkAll",value:(D=e.rendered)==null?void 0:D.toString()}):t.jsx(ie,{...r==null?void 0:r(`${i}Options`,{onChange:m}),label:(F=e.rendered)==null?void 0:F.toString(),name:`${i}Options`,value:e.key.toString()}),k=n&&!$?j:t.jsx(z,{color:d.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered});return ne(document.getElementsByClassName("dropdown")[0],()=>{n&&l.close()},!0,document.getElementById("combobox")),t.jsxs(bi,{...n?{}:x,$multiSelection:n,className:w,ref:g,children:[k,h&&!$&&!n?t.jsx(T,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:t.jsx(G,{tagLabel:e.textValue,variant:"inactive"})]})},We=({field:e,disabled:n=!1,disabledKeys:i,error:r,helpLink:a,helpLinkText:o,helpText:l,label:c,loadingItems:d,name:g,multiSelection:p=!1,items:u,onBlur:x,onChange:h,placeholder:b,register:$,required:w,setValue:v,tooltip:m,value:j,watch:k,weight:S})=>{var at;const D=s.Je(),F=n?void 0:r,C=(e==null?void 0:e.value)??j,[E,R]=f.useState(((at=u.find(A=>A.value===C))==null?void 0:at.name)??""),[P,Y]=f.useState(C),[K,te]=f.useState(u),[W,M]=f.useState(!1),{contains:B}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),oe=f.useRef(null),Ae=f.useRef(null),Le=f.useRef(null),nt=f.useRef(null),it=f.useRef(null),fn=f.useMemo(()=>u.toSorted((A,H)=>{const _=Array.from(i??[]),se=_.includes(A.value),ot=_.includes(H.value);return se&&!ot?1:!se&&ot?-1:0}).map(A=>B(A.name,E)||W?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":A.value,textValue:A.tag,children:A.name},A.value):null),[B,i,E,u,W]),hn=f.useCallback(A=>{const H=A.split(/,|\s/u).slice(-1)[0].trim();R(p?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(_=>B(_.name,p?H:A))))},[B,u,e,p,h]),bn=f.useCallback(A=>{var H;R(((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]),rt=f.useCallback(A=>{A.key==="Enter"&&A.preventDefault(),M(!1)},[]),yn=f.useCallback(()=>{x&&x(),e&&e.onBlur()},[e,x]),$n=f.useCallback(()=>{M(!0)},[]),X=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:p,allowsEmptyCollection:!0,disabledKeys:i,inputValue:E,items:K,menuTrigger:"focus",shouldCloseOnBlur:!p,selectedKey:P,onBlur:yn,onInputChange:hn,onKeyDown:rt,onKeyUp:$n,onOpenChange(A,H){M(A&&(H==="manual"||H==="focus")),A&&setTimeout(()=>{var _;return(_=oe.current)==null?void 0:_.focus()},50)},onSelectionChange:p?void 0:bn,children:fn}),{buttonProps:mn,inputProps:wn,listBoxProps:jn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:E,buttonRef:Ae,id:g,inputRef:oe,label:c??g,listBoxRef:Le,name:g,placeholder:b,popoverRef:it},X),{listBoxProps:vn}=s.$c132121280ec012d$export$50eacbbf140a3141(jn,X,Le),{buttonProps:kn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(mn,Ae);return f.useEffect(()=>{var A;if((d===!1||!C)&&!p){const H=((A=u.find(_=>_.value===C))==null?void 0:A.name)??"";R(H),Y(H)}},[C,u,d,p]),t.jsxs(J,{error:F,helpLink:a,helpLinkText:o,helpText:l,htmlFor:g,id:"combobox",label:c,required:w,tooltip:m,weight:S,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${F?"error":""}`,ref:nt,children:[t.jsx("input",{...wn,"aria-invalid":F?"true":"false","aria-label":g,disabled:n,onKeyDown:rt,ref:oe}),F?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:D.palette.error[500],iconSize:"xs"}):void 0,t.jsx(O,{...kn,className:"action",disabled:n,icon:X.isOpen&&!n?"chevron-up":"chevron-down",iconColor:D.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(ve,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:it,state:X,triggerRef:nt,children:t.jsx(hi,{...vn,$multiSelection:p&&!Array.from(i??[]).includes("All"),ref:Le,children:[...X.collection].map(A=>t.jsx(vt,{item:A,multiSelection:p,name:g,register:$,setInputValue:R,setValue:v,state:X,watch:k},A.key))})}):null]})},Ke=({control:e,disabled:n=!1,disabledKeys:i,error:r,helpLink:a,helpLinkText:o,helpText:l,label:c,loadingItems:d,name:g,multiSelection:p,items:u,onBlur:x,onChange:h,placeholder:b,register:$,required:w,setValue:v,tooltip:m,value:j,watch:k,weight:S})=>e?t.jsx(s.Controller,{control:e,name:g,render:({field:D,fieldState:F})=>{var C;return t.jsx(We,{disabled:n,disabledKeys:i,error:(C=F.error)==null?void 0:C.message,field:D,helpLink:a,helpLinkText:o,helpText:l,items:u,label:c,loadingItems:d,multiSelection:p,name:g,onBlur:x,onChange:h,placeholder:b,register:$,required:w,setValue:v,tooltip:m,value:j,watch:k,weight:S})},rules:{required:w}}):t.jsx(We,{disabled:n,disabledKeys:i,error:r,helpLink:a,helpLinkText:o,helpText:l,items:u,label:c,loadingItems:d,multiSelection:p,name:g,onBlur:x,onChange:h,placeholder:b,required:w,tooltip:m,value:j,weight:S}),$i=s.st.div`
|
|
951
951
|
${({theme:e})=>`
|
|
952
952
|
align-items: center;
|
|
953
953
|
color: ${e.palette.gray[800]};
|
|
@@ -979,7 +979,7 @@
|
|
|
979
979
|
padding: 0 0.5px;
|
|
980
980
|
position: relative;
|
|
981
981
|
width: 8px;
|
|
982
|
-
`,
|
|
982
|
+
`,ct=s.st.tr`
|
|
983
983
|
align-items: flex-start;
|
|
984
984
|
display: flex;
|
|
985
985
|
padding: ${({theme:e})=>e.spacing[.25]} 0;
|
|
@@ -1059,7 +1059,7 @@
|
|
|
1059
1059
|
> span {
|
|
1060
1060
|
font-size: 4px;
|
|
1061
1061
|
}
|
|
1062
|
-
`,
|
|
1062
|
+
`,dt=s.st.button`
|
|
1063
1063
|
cursor: pointer;
|
|
1064
1064
|
display: flex;
|
|
1065
1065
|
|
|
@@ -1067,7 +1067,7 @@
|
|
|
1067
1067
|
height: 3.5px;
|
|
1068
1068
|
width: 7px;
|
|
1069
1069
|
}
|
|
1070
|
-
`,
|
|
1070
|
+
`,Xe=s.st.div`
|
|
1071
1071
|
${({theme:e})=>`
|
|
1072
1072
|
align-items: end;
|
|
1073
1073
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1079,9 +1079,9 @@
|
|
|
1079
1079
|
padding: 0 ${e.spacing[.25]};
|
|
1080
1080
|
width: 100%;
|
|
1081
1081
|
`}
|
|
1082
|
-
`,Ct=({state:e,date:n})=>{const i=f.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),
|
|
1082
|
+
`,Ct=({state:e,date:n})=>{const i=f.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),g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,u=l&&!c&&!(g||p)?"range":"";return t.jsx(ji,{id:u,...a,children:t.jsxs("div",{...o,className:`cell ${g||p?"selected":""}
|
|
1083
1083
|
${c?"disabled":""} ${r?"today":""}
|
|
1084
|
-
${!e.isFocused&&!r?"focused":""} ${u}`,ref:i,children:[d,r?t.jsx(vi,{children:t.jsx(T,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},Fe=({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(
|
|
1084
|
+
${!e.isFocused&&!r?"focused":""} ${u}`,ref:i,children:[d,r?t.jsx(vi,{children:t.jsx(T,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},Fe=({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(ct,{children:r.map((o,l)=>{const c=`key_${l}`;return t.jsx(wi,{children:o},c)})})}),t.jsx("tbody",{children:[...new Array(a).keys()].map(o=>t.jsx(ct,{children:e.getDatesInWeek(o).map((l,c)=>{const d=`key_${c}`;return l?t.jsx(Ct,{date:l,state:e},d):t.jsx("td",{},d)})},o))})]})},ki=s.st(Ve)`
|
|
1085
1085
|
align-items: center;
|
|
1086
1086
|
background-color: inherit;
|
|
1087
1087
|
border-color: inherit;
|
|
@@ -1147,7 +1147,7 @@
|
|
|
1147
1147
|
justify-content: flex-end;
|
|
1148
1148
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1149
1149
|
flex: 1 0 0;
|
|
1150
|
-
`,
|
|
1150
|
+
`,pt=s.st.div`
|
|
1151
1151
|
${({theme:e})=>`
|
|
1152
1152
|
align-items: center;
|
|
1153
1153
|
align-self: stretch;
|
|
@@ -1159,7 +1159,7 @@
|
|
|
1159
1159
|
line-height: ${e.spacing[1.5]};
|
|
1160
1160
|
padding: 2px ${e.spacing[.25]};
|
|
1161
1161
|
`}
|
|
1162
|
-
`,
|
|
1162
|
+
`,gt=s.st.button`
|
|
1163
1163
|
${({theme:e})=>`
|
|
1164
1164
|
align-items: center;
|
|
1165
1165
|
background-color: inherit;
|
|
@@ -1179,7 +1179,7 @@
|
|
|
1179
1179
|
font-weight: ${e.typography.weight.bold};
|
|
1180
1180
|
}
|
|
1181
1181
|
`}
|
|
1182
|
-
`,Se=({disabled:e=!1,icon:n,props:i})=>{const r=f.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,r);return t.jsx(Si,{...a,$disabled:e,$focus:!!a["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:r,type:"button",children:t.jsx(T,{icon:n,iconColor:I.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ne=({state:e,prevButtonProps:n,nextButtonProps:i,title:r})=>{const a=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(a.add({years:1}))},[a,e]),l=f.useCallback(()=>{e.setFocusedDate(a.subtract({years:1}))},[a,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(Se,{icon:"chevron-left",props:n}),t.jsxs($i,{children:[r,t.jsxs(mi,{children:[t.jsx(
|
|
1182
|
+
`,Se=({disabled:e=!1,icon:n,props:i})=>{const r=f.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,r);return t.jsx(Si,{...a,$disabled:e,$focus:!!a["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:r,type:"button",children:t.jsx(T,{icon:n,iconColor:I.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ne=({state:e,prevButtonProps:n,nextButtonProps:i,title:r})=>{const a=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(a.add({years:1}))},[a,e]),l=f.useCallback(()=>{e.setFocusedDate(a.subtract({years:1}))},[a,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(Se,{icon:"chevron-left",props:n}),t.jsxs($i,{children:[r,t.jsxs(mi,{children:[t.jsx(dt,{"aria-label":"top",onClick:o,children:t.jsx(T,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(dt,{"aria-label":"bottom",onClick:l,children:t.jsx(T,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(Se,{icon:"chevron-right",props:i})]})},St=({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(Ne,{nextButtonProps:o,prevButtonProps:a,state:r,title:l}),t.jsx(Fe,{state:r}),t.jsx(Xe,{children:t.jsx(L,{onClick:e,variant:"ghost",children:"Cancel"})})]})},zt=({segment:e,state:n})=>{const i=s.Je(),r=f.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})},It=({disabled:e,error:n=!1,props:i})=>{const r=s.Je(),a=f.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=f.useCallback(d=>{const g=document.getElementsByClassName("segment-cell"),p=d.currentTarget;Object.values(g).some(u=>u.contains(p))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs(zi,{...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,g)=>{const p=`key_${g}`;return t.jsx(zt,{segment:{...d,isEditable:!e},state:o},p)})}),n?t.jsx(T,{icon:"exclamation-circle",iconColor:r.palette.error[500],iconSize:"xs"}):void 0]})},Tt=e=>{const n=f.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]=f.useState(s.lodashExports.isNil(r)?"AM":a),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=f.useCallback(g=>{const p=g.currentTarget.name;p!==o&&(s.lodashExports.isNil(r)||(p==="AM"?i.setSegment("dayPeriod",0):p==="PM"&&i.setSegment("dayPeriod",12))),l(p)},[o,i,r]);return t.jsxs(Ii,{children:[t.jsx(pt,{...c,ref:n,children:i.segments.slice(0,-2).map((g,p)=>{const u=`key_${p}`;return t.jsx(zt,{segment:g,state:i},u)})}),t.jsxs(pt,{children:[t.jsx(gt,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(gt,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ze=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",Ti=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",ut=(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:g,setValue:p,value:u})=>{const x=f.useCallback(h=>{const b=a==="day"?ze(String(h)):Ti(String(h));o.onChange&&o.onChange(h??null),p&&p(c,b)},[o,a,c,p]);return t.jsxs(ee,{...l,className:`${r?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(It,{disabled:r,error:e!=null,props:{...o,autoFocus:!1,granularity:a,onChange:x,shouldForceLeadingZeros:!0}}),t.jsx(Se,{disabled:r,icon:a==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:g}),"aria-label":c,className:"date-input",disabled:r,id:c,name:c,type:"text",value:u??""})]})},Ee=({children:e,...n})=>{const i=f.useRef(null),{dialogProps:r}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(Ci,{...r,ref:i,children:e})},Ft=({disabled:e=!1,error:n,helpLink:i,helpLinkText:r,helpText:a,required:o,label:l,name:c,register:d,setValue:g,tooltip:p,watch:u,...x})=>{const h=f.useRef(null),b=u==null?void 0:u(c),$=f.useCallback(F=>{g&&F&&g(c,ze(String(F)))},[c,g]),w=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...x,onChange(F){$(F)},value:s._.isNil(b)||s._.isEmpty(b)||b==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}),{close:v}=w,{groupProps:m,fieldProps:j,buttonProps:k,dialogProps:S,calendarProps:D}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...x,"aria-label":l??c,name:c},w,h);return t.jsxs(J,{error:n,helpLink:i,helpLinkText:r,helpText:a,htmlFor:c,label:l,required:o,tooltip:p,children:[t.jsx(ge,{buttonProps:k,datePickerRef:h,disabled:e,error:n,fieldProps:j,groupProps:m,name:c,register:d,required:o,setValue:g,value:b}),w.isOpen&&!e?t.jsx(ve,{offset:8,placement:"bottom start",state:w,triggerRef:h,children:t.jsx(Ee,{...S,children:t.jsx(St,{onClose:v,props:D})})}):null]})},Nt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=f.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(Ne,{nextButtonProps:l,prevButtonProps:o,state:a,title:c}),t.jsx(Fe,{state:a}),t.jsx(Xe,{children:t.jsx(L,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Fi=s.st.div`
|
|
1183
1183
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1184
1184
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1185
1185
|
display: flex;
|
|
@@ -1190,7 +1190,7 @@
|
|
|
1190
1190
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1191
1191
|
}
|
|
1192
1192
|
`}
|
|
1193
|
-
`,Et=({disabled:e=!1,error:n,label:i,name:r,required:a,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:
|
|
1193
|
+
`,Et=({disabled:e=!1,error:n,label:i,name:r,required:a,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:g,variant:p="default",...u})=>{const x=`${r}Max`,h=`${r}Min`,b=f.useRef(null),$=f.useCallback(C=>{c&&C&&(c((d==null?void 0:d.name)??x,ze(String(C.end))),c((g==null?void 0:g.name)??h,ze(String(C.start))))},[x,h,c,d,g]),w=s.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??x,startName:(g==null?void 0:g.name)??h,onChange(C){$(C)}}),{close:v}=w,{groupProps:m,startFieldProps:j,endFieldProps:k,buttonProps:S,dialogProps:D,calendarProps:F}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":i??r},w,b);return t.jsxs(J,{error:n,htmlFor:r,label:i,required:a,tooltip:o,children:[t.jsxs(Fi,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:p==="filters"?"column":"row"},children:[t.jsx(ge,{buttonProps:S,datePickerRef:b,disabled:e,error:n,fieldProps:{...j,"aria-label":`${j["aria-label"]} ${r}`,validate:C=>k.value&&C>k.value?"Start date must be less than or equal to end date":null},groupProps:m,name:(g==null?void 0:g.name)??h,register:l,setValue:c,value:g==null?void 0:g.value}),t.jsx(ge,{buttonProps:S,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${r}`,validate:C=>j.value&&C<j.value?"End date must be greater than or equal to start date":null},groupProps:m,name:(d==null?void 0:d.name)??x,register:l,setValue:c,value:d==null?void 0:d.value})]}),w.isOpen&&!e?t.jsx(ve,{offset:8,placement:"bottom start",state:w,triggerRef:b,children:t.jsx(Ee,{...D,children:t.jsx(Nt,{onClose:v,props:F})})}):null]})},Ni=s.st.div`
|
|
1194
1194
|
${({theme:e})=>`
|
|
1195
1195
|
align-items: center;
|
|
1196
1196
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1205,7 +1205,7 @@
|
|
|
1205
1205
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1206
1206
|
justify-content: flex-end;
|
|
1207
1207
|
flex: 1 0 0;
|
|
1208
|
-
`,Dt=({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:
|
|
1208
|
+
`,Dt=({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:g}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ne,{nextButtonProps:d,prevButtonProps:c,state:l,title:g}),t.jsx(Fe,{state:l}),t.jsxs(Ni,{children:[t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Ei,{children:t.jsx(Tt,{hourCycle:12,label:"time-field",onChange:e,value:r.timeValue})})]}),t.jsx(Xe,{children:t.jsx(L,{onClick:n,variant:"ghost",children:"Cancel"})})]})},Di=e=>{const{disabled:n=!1,error:i,required:r,label:a,name:o,tooltip:l,register:c,setValue:d,watch:g}=e,p=g==null?void 0:g(o),u=f.useRef(null),x=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:r,shouldCloseOnSelect:!1,value:s._.isNil(p)||s._.isEmpty(p)||p==="-"||s.dayjs(p,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(p,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=x,{groupProps:b,fieldProps:$,buttonProps:w,dialogProps:v,calendarProps:m}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,x,u),j=f.useCallback(S=>{if(m.onChange&&m.onChange(S),x.timeValue){const D=ut(S,x.timeValue);d==null||d(o,D,{shouldDirty:!0})}else x.setDateValue(S)},[m,o,d,x]),k=f.useCallback(S=>{if(S){x.setTimeValue(S);const D=x.dateValue;if(D){const F=ut(D,S);d==null||d(o,F,{shouldDirty:!0})}}},[x,d,o]);return t.jsxs(J,{error:i,htmlFor:o,label:a,required:r,tooltip:l,children:[t.jsx(ge,{buttonProps:w,datePickerRef:u,disabled:n,error:i,fieldProps:$,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:p}),x.isOpen&&!n?t.jsx(ve,{offset:8,placement:"bottom start",state:x,triggerRef:u,children:t.jsx(Ee,{...v,children:t.jsx(Dt,{handleTimeChange:k,onClose:h,props:{...m,onChange:j},timeState:x})})}):null]})},Ri=({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(y,{children:[t.jsx(qe,{htmlFor:o,label:a,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Q,{href:d,children:c}):t.jsx(z,{size:"md",children:c})]})},De=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:r,helpText:a,error:o,id:l,indexArray:c=0,isValid:d,isTouched:g,label:p,linkPosition:u,name:x,maskValue:h=!1,onPaste:b,placeholder:$,removeItemArray:w,register:v,suggestions:m,tooltip:j,type:k="text",weight:S,...D})=>{const{required:F,onBlur:C,onChange:E}=D,R=s.Je(),P=e?void 0:o,[Y,K]=f.useState(""),te=f.useCallback(B=>{K(B.target.value),E==null||E(B)},[E]),W=d&&g&&!e&&Y.trim()!=="",M=f.useCallback(B=>{B.key==="Enter"&&B.preventDefault()},[]);return t.jsxs(J,{error:P,helpLink:i,helpLinkText:r,helpText:a,htmlFor:x,label:p,linkPosition:u,required:F,tooltip:j,weight:S,children:[t.jsxs(ee,{className:`
|
|
1209
1209
|
${e?"disabled":""} ${P?"error":""} ${W?"success":""}
|
|
1210
1210
|
`,children:[n?t.jsx(T,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":P?"true":"false","aria-label":x,"aria-required":F,autoComplete:"off",className:h?"sr-block":"","data-testid":`${x}-input`,disabled:e,id:x,list:m?`list_${x}`:void 0,onKeyDown:M,onPaste:b,placeholder:$,type:k,...v?v(x,{required:F,onBlur:C,onChange:te}):{...D,onChange:te}}),P?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:R.palette.error[500],iconSize:"xs"}):void 0,W?t.jsx(T,{icon:"check-circle",iconClass:"success-icon",iconColor:R.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&c>0?t.jsx(O,{color:R.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:w?w(c):void 0,variant:"ghost"}):void 0]}),m?t.jsx("datalist",{id:`list_${x}`,children:m.map(B=>t.jsx("option",{value:B},B))}):void 0]})},Ai=s.st.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,Li=s.st.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1211
1211
|
gap: 12px;
|
|
@@ -1263,7 +1263,7 @@
|
|
|
1263
1263
|
padding: ${i}px;
|
|
1264
1264
|
}
|
|
1265
1265
|
`}
|
|
1266
|
-
`,Rt=({align:e,children:n,cols:i,colsPadding:r,justify:a})=>t.jsx(Mi,{$align:e,$cols:i,$colsPadding:r,$justify:a,children:n}),Oe=({addText:e,append:n,disabled:i=!1,fields:r,fieldState:a,initValue:o="",index:l=0,required:c,label:d,max:
|
|
1266
|
+
`,Rt=({align:e,children:n,cols:i,colsPadding:r,justify:a})=>t.jsx(Mi,{$align:e,$cols:i,$colsPadding:r,$justify:a,children:n}),Oe=({addText:e,append:n,disabled:i=!1,fields:r,fieldState:a,initValue:o="",index:l=0,required:c,label:d,max:g=100,name:p,onBlur:u,onChange:x,placeholder:h,tooltip:b,remove:$,value:w})=>{var j;const v=f.useCallback(()=>{n==null||n(o)},[n,o]),m=f.useCallback(k=>()=>{$==null||$(k)},[$]);return t.jsxs(Rt,{align:"start",children:[t.jsx(Be,{lg:75,md:75,sm:75,children:t.jsx(De,{disabled:i,error:a?(j=a.error)==null?void 0:j.message:void 0,id:"array",indexArray:l,isTouched:a?a.isTouched:void 0,isValid:a?!a.invalid:void 0,label:d,name:p,onBlur:u,onChange:x,placeholder:h,removeItemArray:m,required:c,tooltip:b,value:w})}),l<g-1&&l+1===(r==null?void 0:r.length)?t.jsx(Be,{lg:25,md:25,sm:25,children:t.jsx(L,{disabled:i,icon:"plus",onClick:v,variant:"ghost",width:"100%",children:e??"Add"})}):void 0]})},Hi=({addText:e,append:n,control:i,disabled:r,fields:a,initValue:o="",required:l,label:c,max:d=void 0,name:g="array-field",onChange:p,placeholder:u,remove:x,tooltip:h})=>i&&a?t.jsx(f.Fragment,{children:a.map((b,$)=>t.jsx(s.Controller,{control:i,name:`${g}.${$}`,render:({field:w,fieldState:v})=>t.jsx(Oe,{addText:e,append:n,disabled:r,fieldState:v,fields:a,index:$,initValue:o,label:c,max:d,name:w.name,onBlur:w.onBlur,onChange:p??w.onChange,placeholder:u,remove:x,required:l,tooltip:h,value:typeof w.value=="object"?w.value.value:w.value}),index:$},b.id))}):t.jsx(Oe,{addText:e,disabled:r,initValue:o,label:c,max:d,name:g,onChange:p,placeholder:u,required:l,tooltip:h}),_i=s.st(yt)`
|
|
1267
1267
|
white-space: nowrap;
|
|
1268
1268
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1269
1269
|
text-overflow: ellipsis;
|
|
@@ -1274,13 +1274,13 @@
|
|
|
1274
1274
|
position: absolute;
|
|
1275
1275
|
visibility: hidden;
|
|
1276
1276
|
width: 0;
|
|
1277
|
-
`,At=(e,n,i)=>{const r=new Event(e);return Object.defineProperty(r,"target",{value:{name:n,value:i}}),r},Ui=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Vi=({accept:e,disabled:n=!1,error:i,label:r,helpLink:a,helpText:o,id:l,multiple:c,name:d,onChange:
|
|
1277
|
+
`,At=(e,n,i)=>{const r=new Event(e);return Object.defineProperty(r,"target",{value:{name:n,value:i}}),r},Ui=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Vi=({accept:e,disabled:n=!1,error:i,label:r,helpLink:a,helpText:o,id:l,multiple:c,name:d,onChange:g,required:p,register:u,setValue:x,tooltip:h,watch:b,weight:$})=>{const w=s.Je(),v=n?void 0:i,m=f.useRef(null),j=u==null?void 0:u(d,{required:p}),k=b==null?void 0:b(d),S=Ui(k),D=f.useCallback(()=>{const E=At("change",d,void 0);x&&x(d,void 0),j&&j.onChange(E)},[j,d,x]),F=f.useCallback(E=>{const{files:R}=E.currentTarget;R&&R.length>0&&(g==null||g(E),x&&x(d,R),j&&j.onChange(E))},[j,d,g,x]),C=f.useCallback(E=>{n?E.preventDefault():m.current&&m.current.click()},[n]);return t.jsxs(J,{error:v,helpLink:a,helpText:o,htmlFor:l??d,label:r,required:p,tooltip:h,weight:$,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${v?"error":""}`,children:[t.jsx(_i,{$size:"xs",children:S}),t.jsxs(y,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(S)?void 0:t.jsx(O,{color:w.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:D,variant:"ghost",width:"20px"}),v&&t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}),t.jsxs(L,{border:n?`1px solid ${w.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:C,variant:"primary",width:"96px",children:[t.jsx(T,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Ji,{...j,accept:e,"aria-label":d,"data-testid":d,disabled:n,id:l??d,multiple:c,name:d,onChange:F,ref:m,type:"file"})]})},Gi=s.st.input`
|
|
1278
1278
|
border: none;
|
|
1279
1279
|
background: transparent;
|
|
1280
1280
|
min-width: 15rem;
|
|
1281
1281
|
padding: 0;
|
|
1282
1282
|
flex: 1;
|
|
1283
|
-
`,Me=({disabled:e=!1,error:n,field:i,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:
|
|
1283
|
+
`,Me=({disabled:e=!1,error:n,field:i,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:g,placeholder:p,required:u,tooltip:x,value:h,weight:b})=>{const $=s.Je(),w=e?void 0:n,[v,m]=f.useState(""),j=d?h:i==null?void 0:i.value,k=f.useMemo(()=>j&&typeof j=="string"?j.split(",").filter(Boolean):[],[j]),S=f.useCallback(R=>{const Y=[...new Set(R.filter(Boolean))].join(","),K=At("change",c,Y);i&&i.onChange(K),d&&d(K)},[i,c,d]),D=f.useCallback(R=>{m(R.target.value)},[]),F=f.useCallback(R=>{const P=v.trim();P.length&&!k.includes(P)&&(R.preventDefault(),S([...k,P]),m("")),i&&i.onBlur()},[v,i,S,k]),C=f.useCallback(R=>{const P=v.trim();R.key==="Enter"&&P.length===0&&R.preventDefault(),["Enter",","].includes(R.key)&&P.length>0&&!k.includes(P)?(R.preventDefault(),S([...k,P]),m("")):R.key==="Backspace"&&!P.length&&k.length&&(R.preventDefault(),g==null||g(k[k.length-1]),S(k.slice(0,-1)))},[v,g,S,k]),E=f.useCallback(R=>()=>{g==null||g(R),S(k.filter(P=>P!==R))},[g,S,k]);return t.jsx(J,{error:w,helpLink:r,helpLinkText:a,helpText:o,htmlFor:c,label:l,required:u,tooltip:x,weight:b,children:t.jsxs(ee,{$overflowX:"auto",className:`${e?"disabled":""} ${w?"error":""}`,children:[k.map(R=>t.jsx(G,{disabled:e,onClose:E(R),tagLabel:R},R)),t.jsx(Gi,{"aria-hidden":!1,"aria-invalid":w?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",id:c,onBlur:F,onChange:D,onKeyDown:C,placeholder:k.length===0?p:void 0,ref:i==null?void 0:i.ref,type:"text",value:v}),w?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:$.palette.error[500],iconSize:"xs"}):void 0]})})},Yi=({disabled:e=!1,control:n,error:i,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:g,placeholder:p,required:u,tooltip:x,value:h,weight:b})=>n?t.jsx(s.Controller,{control:n,name:c,render:({field:$})=>t.jsx(Me,{disabled:e,error:i,field:$,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c,onRemove:g,placeholder:p,required:u,tooltip:x,weight:b}),rules:{required:u}}):t.jsx(Me,{disabled:e,error:i,helpLink:r,helpLinkText:a,helpText:o,label:l,name:c,onChange:d,onRemove:g,placeholder:p,required:u,tooltip:x,value:h,weight:b}),He=f.forwardRef(function({disabled:n,icon:i,margin:r,onClick:a,...o},l){return t.jsx(ki,{$margin:r,"aria-label":i,className:"action-btn",disabled:n,onClick:a,ref:l,type:"button",...o,children:t.jsx(T,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Ie=({error:e,decimalPlaces:n=0,disabled:i=!1,id:r,maxLength:a,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:g,register:p,required:u,setValue:x,value:h})=>{const b=s.Je(),$=i?void 0:e,w=n<0?0:n,[v,m]=f.useState(h?s._.toNumber(h):0),j=f.useCallback(()=>{const F=(v-10**-w).toFixed(w),C=Math.max(Number(l),Number(F));x&&x(c,C,{shouldDirty:!0}),m(C)},[w,v,l,c,x]),k=f.useCallback(()=>{const F=(v+10**-w).toFixed(w),C=Math.min(Number(o),Number(F)>Number(l)?Number(F):Number(l));x&&x(c,C,{shouldDirty:!0}),m(C)},[w,v,o,l,c,x]),S=f.useCallback(F=>{const{value:C}=F.target,E=/\d+/u.test(C)&&!s._.isEmpty(C);x&&x(c,E?C:void 0),d&&d(F),m(Number(C))},[c,d,x]),D=f.useCallback(F=>{F.key==="Enter"&&F.preventDefault()},[]);return t.jsxs(ee,{className:`${i?"disabled":""} ${$?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":$?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",disabled:i,id:r??c,max:o,min:l,onKeyDown:D,placeholder:g,required:u,step:10**-w,type:"number",...p==null?void 0:p(c,{maxLength:a,max:o,min:l,onChange:S,value:h,valueAsNumber:!0})}),$&&t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsx(He,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:j,px:.75,py:.75}),t.jsx(He,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:k,px:.75,py:.75})]})},Lt=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:r,helpText:a,id:o,label:l,linkPosition:c,maxLength:d,max:g,min:p,name:u,onChange:x,placeholder:h,register:b,required:$,setValue:w,tooltip:v,value:m,watch:j,weight:k})=>t.jsx(J,{error:n?void 0:i,helpLink:r,helpText:a,htmlFor:u,label:l,linkPosition:c,maxLength:d,required:$,tooltip:v,weight:k,children:t.jsx(Ie,{decimalPlaces:e,disabled:n,error:i,id:o,max:g,maxLength:d,min:p,name:u,onChange:x,placeholder:h,register:b,required:$,setValue:w,value:x?m:j==null?void 0:j(u)})}),Pt=({disabled:e=!1,error:n,name:i,label:r,propsMax:a,propsMin:o,required:l,tooltip:c,variant:d="default"})=>{const g=`${i}Max`,p=`${i}Min`;return t.jsx(J,{error:n,htmlFor:i,label:r,required:l,tooltip:c,children:t.jsxs(y,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Ie,{...o,disabled:e,error:n,name:o.name??p}),t.jsx(Ie,{...a,disabled:e,error:n,name:a.name??g})]})})},qi=s.st.div`
|
|
1284
1284
|
${({theme:e})=>`
|
|
1285
1285
|
align-items: flex-start;
|
|
1286
1286
|
align-self: stretch;
|
|
@@ -1374,15 +1374,15 @@
|
|
|
1374
1374
|
overflow: hidden;
|
|
1375
1375
|
text-overflow: ellipsis;
|
|
1376
1376
|
white-space: nowrap;
|
|
1377
|
-
`,er=({disabled:e,error:n,label:i,name:r,placeholder:a,required:o,register:l,tooltip:c,value:d,watch:
|
|
1377
|
+
`,er=({disabled:e,error:n,label:i,name:r,placeholder:a,required:o,register:l,tooltip:c,value:d,watch:g,weight:p})=>{const u=s.Je(),x=f.useRef(null),h=e?void 0:n,b=(g==null?void 0:g(r))??d,[$,w]=f.useState(!1),[v,m]=f.useState(""),{refs:j,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:S,inputValue:D,handlePhoneValueChange:F,country:C,setCountry:E}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),R=f.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),P=f.useCallback(W=>{W.preventDefault(),w(M=>!M),$||m("")},[$]),Y=f.useCallback(W=>()=>{E(W),w(!1),m("")},[E,w]),K=f.useCallback(W=>{W.key.length===1?m(M=>M+W.key):W.key==="Backspace"&&m(M=>M.slice(0,-1))},[]),te=s.R.filter(W=>{const{name:M}=s.M(W);return M.toLowerCase().includes(v.toLowerCase())});return ne(j.floating.current,()=>{w(!1),m("")},!0),t.jsx(J,{error:h,htmlFor:r,label:i,required:o,tooltip:c,weight:p,children:t.jsxs(qi,{className:`${e?"disabled":""} ${h?"error":""}`,ref:x,children:[t.jsxs(Ki,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:P,onKeyDown:K,ref:j.setReference,children:[t.jsx(s.q,{iso2:C.iso2,size:"16px"}),t.jsx(T,{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:R,placeholder:a,ref:S,type:"tel",value:D,...l==null?void 0:l(r,{required:o,onChange:F})}),h?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"xs"}):void 0]}),$&&ae.createPortal(t.jsx(Xi,{ref:j.setFloating,style:k,children:te.map(W=>{const{dialCode:M,iso2:B,name:oe}=s.M(W);return t.jsxs(Zi,{onClick:Y(B),value:B,children:[t.jsx(s.q,{iso2:B,size:"16px"}),t.jsx(Qi,{children:oe}),t.jsx(z,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+M})]},B)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},tr=({disabled:e=!1,error:n,helpLink:i,helpText:r,isTouched:a,isValid:o,label:l,name:c="input-text",id:d,maskValue:g=!1,maxLength:p,placeholder:u,register:x,required:h,rows:b,tooltip:$,watch:w,weight:v,value:m})=>{const j=s.Je(),k=(w==null?void 0:w(c))??m,S=o&&a&&!e,D=e?void 0:n;return t.jsx(J,{error:D,helpLink:i,helpText:r,htmlFor:c,label:l,maxLength:p,required:h,tooltip:$,value:k?String(k):void 0,weight:v,children:t.jsxs(ee,{className:`
|
|
1378
1378
|
${e?"disabled":""} ${D?"error":""} ${S?"success":""}
|
|
1379
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":D?"true":"false","aria-label":c,"aria-required":h,className:
|
|
1379
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":D?"true":"false","aria-label":c,"aria-required":h,className:g?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:p,placeholder:u,rows:b,value:k,...x==null?void 0:x(c,{required:h})}),D?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"xs"}):void 0,S?t.jsx(T,{icon:"check-circle",iconClass:"success-icon",iconColor:j.palette.success[500],iconSize:"xs"}):void 0]})})},nr=({control:e,description:n,disabled:i,id:r,items:a,align:o,inputType:l="text",inputNumberProps:c,minHeight:d,minWidth:g,name:p,placeholder:u,tooltip:x,title:h,value:b})=>{const $=f.useMemo(()=>{if(l==="text")return t.jsx(De,{disabled:i,name:p,placeholder:u});if(l==="date")return t.jsx(Ft,{disabled:i,name:p});if(l==="select")return t.jsx(Ke,{control:e,items:a,name:p,placeholder:u,value:b});const{decimalPlaces:w,max:v,min:m}=c??{};return t.jsx(Lt,{decimalPlaces:w,disabled:i,max:v,min:m,name:p,placeholder:u})},[e,i,c,l,a,p,u,b]);return t.jsxs(xi,{$align:o,$minHeight:d,$minWidth:g,children:[t.jsx(Te,{description:n,id:r,title:h,tooltip:x}),$]})},ir=s.st.div`
|
|
1380
1380
|
display: flex;
|
|
1381
1381
|
align-self: flex-start;
|
|
1382
1382
|
margin-left: auto;
|
|
1383
1383
|
width: 40px;
|
|
1384
1384
|
height: auto;
|
|
1385
|
-
`,Wt=(e,n)=>{const[r,a]=f.useState(0),[o,l]=f.useState(0);return f.useEffect(()=>{o===100&&(()=>{a(d=>d===n-1?0:d+1)})()},[o,n]),f.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:r,progress:o,setCycle:a,setProgress:l}},Bt=({publicId:e,format:n="webp"})=>{const i=f.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return f.useMemo(()=>i.image(e).format(n),[i,e,n])},Re=e=>{const[n,i]=f.useState(!1),r=f.useCallback(()=>{i(!0)},[]),a=f.useCallback(()=>{i(!1)},[]),o=f.useCallback(()=>{i(l=>!l)},[]);return{close:a,isOpen:n,name:e,open:r,setIsOpen:i,toggle:o}},rr=({name:e,items:n,columnOrder:i,setColumnOrder:r})=>{const a=f.useMemo(()=>[...n.filter(({locked:
|
|
1385
|
+
`,Wt=(e,n)=>{const[r,a]=f.useState(0),[o,l]=f.useState(0);return f.useEffect(()=>{o===100&&(()=>{a(d=>d===n-1?0:d+1)})()},[o,n]),f.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:r,progress:o,setCycle:a,setProgress:l}},Bt=({publicId:e,format:n="webp"})=>{const i=f.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return f.useMemo(()=>i.image(e).format(n),[i,e,n])},Re=e=>{const[n,i]=f.useState(!1),r=f.useCallback(()=>{i(!0)},[]),a=f.useCallback(()=>{i(!1)},[]),o=f.useCallback(()=>{i(l=>!l)},[]);return{close:a,isOpen:n,name:e,open:r,setIsOpen:i,toggle:o}},rr=({name:e,items:n,columnOrder:i,setColumnOrder:r})=>{const a=f.useMemo(()=>[...n.filter(({locked:p})=>p).map(({locked:p,...u})=>({...u,visible:!0,locked:p})),...n.filter(({locked:p})=>!p)],[n]),[o,l]=f.useState(a),c=f.useCallback(p=>{const u=p.filter(({locked:$})=>!$),h=[...p.filter(({locked:$})=>$),...u],b=h.map(({name:$})=>$);l($=>[...h,...$.filter(({name:w})=>!b.includes(w))]),r&&r(h.map(({id:$})=>$))},[r]),d=f.useCallback(()=>{const p=o.map(u=>{var h;const x=(i==null?void 0:i.includes(u.id))??!1;return(h=u.toggleVisibility)==null||h.call(u,x),{...u,visible:x}}).toSorted((u,x)=>{const h=(i==null?void 0:i.indexOf(u.id))??0,b=(i==null?void 0:i.indexOf(x.id))??0;return Number(x.visible)!==Number(u.visible)?Number(x.visible)-Number(u.visible):h-b});l(p),r==null||r(i)},[o,i,r]),g=f.useMemo(()=>s.some(o,p=>((i==null?void 0:i.includes(p.id))??!1)!==p.visible),[o,i]);return{setColumns:c,resetToDefault:d,columns:o,...Re(e),hasChanged:g}},Ot=(e,n)=>f.useMemo(()=>s._.debounce(e,n),[e,n]),ar=e=>{const[n,i]=f.useState(),r=Ot(a=>{i(a)},(e==null?void 0:e.debounceWait)??300);return[n,r]},or=({alt:e="img",height:n="",width:i="",plugins:r=[s.lazyload(),s.placeholder()],publicId:a})=>{const o=Bt({publicId:a});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:n,plugins:r,width:i})},Z=f.memo(or),sr=s.st.label`
|
|
1386
1386
|
${({theme:e})=>`
|
|
1387
1387
|
align-items: center;
|
|
1388
1388
|
display: flex;
|
|
@@ -1461,7 +1461,7 @@
|
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
1463
|
`}
|
|
1464
|
-
`,lr=s.st.span.attrs({className:"checkmark"})``,
|
|
1464
|
+
`,lr=s.st.span.attrs({className:"checkmark"})``,Ze=f.forwardRef(function({defaultChecked:n=!1,disabled:i=!1,label:r,name:a,onChange:o,onClick:l,value:c,...d},g){return t.jsxs(sr,{"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:g,type:"radio",value:c,...d}),t.jsx(lr,{}),r??null]})}),cr=({alt:e,customDescription:n,imageId:i,icon:r,selectorProps:a,onClick:o,register:l,title:c,isATag:d=!1,width:g="fit-content"})=>{const p=s.Je();return t.jsxs(y,{alignItems:"center",border:`1px solid ${p.palette.gray[200]}`,borderColorHover:p.palette.gray[600],borderRadius:p.spacing[.25],display:"inline-flex",pr:d?1:0,shadowHover:"md",width:g,children:[t.jsxs(y,{display:"inline-flex",padding:[1,1,1,1],children:[t.jsx(y,{alignSelf:"start",display:"flex",width:"fit-content",children:t.jsx(Ze,{name:a.name,onClick:o,value:a.value,...l==null?void 0:l(a.name)})}),t.jsxs(y,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[!d&&i!==void 0&&t.jsx(Z,{alt:e??"card image",height:"32px",publicId:i,width:"32px"}),r===void 0?void 0:t.jsx(T,{icon:r,iconSize:"sm",iconType:"fa-light"}),t.jsxs(y,{display:"flex",flexDirection:"column",width:"100%",children:[t.jsx(z,{color:p.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),n===void 0?void 0:t.jsx(y,{children:n})]})]})]}),d&&t.jsx(ir,{children:t.jsx(Z,{alt:e??"tag image",height:"40px",publicId:i??"tag image",width:"40px"})})]})},le=s.st.div`
|
|
1465
1465
|
${({theme:e})=>`
|
|
1466
1466
|
align-items: center;
|
|
1467
1467
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1511,7 +1511,7 @@
|
|
|
1511
1511
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1512
1512
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1513
1513
|
}
|
|
1514
|
-
`,Mt=f.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:r,name:a,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},
|
|
1514
|
+
`,Mt=f.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:r,name:a,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},g){const p=n===!0?"on":"off",u=typeof o=="object"&&o.on&&o.off?o[p]:o,x=f.useCallback(h=>{h.stopPropagation()},[]);return t.jsxs(y,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:r,children:[t.jsx(y,{minWidth:l,children:u}),t.jsxs(pr,{onClick:x,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":i,"aria-label":a,checked:n===!0,disabled:i,name:a,ref:g,type:"checkbox"}),t.jsx(le,{"aria-label":"Toggle Switch",id:`${a}Toggle`,children:t.jsx(dr,{})})]}),c]})}),gr=({id:e,title:n,toggles:i,minWidth:r="auto",height:a="auto"})=>{const o=s.Je();return t.jsxs(y,{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(Te,{id:e,title:n}),t.jsx(y,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:i.map(l=>t.jsx(Mt,{...l},`$card-toggle-${l.name}`))})]})},ur=s.st.div`
|
|
1515
1515
|
position: relative;
|
|
1516
1516
|
margin: auto;
|
|
1517
1517
|
overflow: hidden;
|
|
@@ -1611,10 +1611,10 @@
|
|
|
1611
1611
|
background-color: ${e.palette.gray[200]};
|
|
1612
1612
|
}
|
|
1613
1613
|
`}
|
|
1614
|
-
`,_t=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(f.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Ht,{"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})})})),mr=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i,variant:r="normal"})=>{const a=s.Je(),[o,l]=f.useState(!1),[c,d]=f.useState(!0),
|
|
1614
|
+
`,_t=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(f.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Ht,{"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})})})),mr=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i,variant:r="normal"})=>{const a=s.Je(),[o,l]=f.useState(!1),[c,d]=f.useState(!0),g=f.useCallback(()=>{l(h=>!h)},[l]),p=f.useCallback(()=>{if(s._.isNil(n)||s._.isEmpty(n)||!s._.isString(n))return d(!1),e;const h=n.split(`
|
|
1615
1615
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1616
1616
|
`)}
|
|
1617
|
-
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(
|
|
1617
|
+
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(p,[p]),x=f.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return r==="location"?t.jsx(_t,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs(y,{bgColor:a.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Ht,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:u})})}),t.jsxs($r,{children:[t.jsx(O,{height:a.spacing[2.5],icon:"copy",iconColor:a.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:x,variant:"ghost",width:a.spacing[2.5]}),c?t.jsxs(L,{onClick:g,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(T,{icon:o?"chevron-up":"chevron-down",iconColor:a.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:x})]}):!1]})]})},{getVariant:wr}=q(e=>({fixed:`
|
|
1618
1618
|
height: auto;
|
|
1619
1619
|
min-width: 300px;
|
|
1620
1620
|
padding: ${e.spacing[1.25]};
|
|
@@ -1643,7 +1643,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1643
1643
|
display: flex;
|
|
1644
1644
|
justify-content: center;
|
|
1645
1645
|
z-index: 99999;
|
|
1646
|
-
`,
|
|
1646
|
+
`,Qe=s.st(y)`
|
|
1647
1647
|
${({theme:e,$size:n})=>`
|
|
1648
1648
|
background-color: ${e.palette.white};
|
|
1649
1649
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -1798,7 +1798,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1798
1798
|
font-size: 6px;
|
|
1799
1799
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1800
1800
|
justify-content: center;
|
|
1801
|
-
`,Gt=f.forwardRef(function({numberIndicator:n,show:i,variant:r="error",...a},o){return t.jsx(Fr,{$variant:r,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...a,children:n&&t.jsx(Nr,{children:n<=9?n:9})})}),Yt=({end:e=!1,label:n,id:i,isActive:r=!1,link:a,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:
|
|
1801
|
+
`,Gt=f.forwardRef(function({numberIndicator:n,show:i,variant:r="error",...a},o){return t.jsx(Fr,{$variant:r,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...a,children:n&&t.jsx(Nr,{children:n<=9?n:9})})}),Yt=({end:e=!1,label:n,id:i,isActive:r=!1,link:a,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:g})=>{const{pathname:p}=Pe.useLocation(),u=r||(d==="primary"?p.includes(a):p.endsWith(a));return t.jsx(V,{display:"flex",id:`${i}-tooltip`,tip:c,children:t.jsxs(Tr,{$borderButton:u,$variant:d,children:[t.jsxs(Pe.NavLink,{end:e,id:i,onClick:l,to:a,children:[n,t.jsx(Gt,{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})]}),g===void 0?null:t.jsx(G,{tagLabel:`${g}`,variant:"default"})]})})},et=({items:e,borders:n=!0,box:i=!1,variant:r="primary"})=>{const a=s.Je();return t.jsx(y,{alignItems:"center",bgColor:a.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${a.palette.gray[300]}`:void 0,borderColor:i?a.palette.gray[200]:void 0,borderRadius:i?a.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:g,notificationSign:p,onClick:u,tag:x,tooltip:h})=>t.jsx(Yt,{end:o,id:l,isActive:c,label:g,link:d,notificationSign:p,onClick:u,tag:x,tooltip:h,variant:r},l))})},re=f.forwardRef(function({color:n=I.palette.gray[100],mt:i=.5,mb:r=.5,width:a,...o},l){return t.jsx(y,{as:"hr",borderTop:`1px solid ${n}`,mb:r,mt:i,ref:l,width:a??"100%",...o})}),Er=s.st.li`
|
|
1802
1802
|
${({theme:e})=>`
|
|
1803
1803
|
align-items: center;
|
|
1804
1804
|
background-color: ${e.palette.white};
|
|
@@ -1856,7 +1856,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1856
1856
|
min-width: 240px;
|
|
1857
1857
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1858
1858
|
`}
|
|
1859
|
-
`,ke=({children:e,disabled:n=!1,icon:i,iconType:r="fa-light",href:a,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:
|
|
1859
|
+
`,ke=({children:e,disabled:n=!1,icon:i,iconType:r="fa-light",href:a,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:g=!1,value:p,...u})=>{const h=s.Je().palette.gray[n?300:800],b=n?f.Children.map(e,$=>f.isValidElement($)?f.cloneElement($,{disabled:n,...$.props}):$):e;return t.jsxs(Er,{"aria-disabled":n,"aria-label":p,"aria-selected":g,"data-testid":p,onClick:o,onKeyDown:c,value:p,...u,children:[i!==void 0||p!==void 0?t.jsxs(y,{alignItems:"center",display:"flex",gap:.625,children:[i?t.jsx(T,{disabled:n,icon:i,iconColor:h,iconSize:"xxs",iconType:r}):null,a===void 0?b:t.jsx(Q,{href:a,children:b})]}):null,g||d?t.jsx(T,{disabled:n,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:r,onClick:l}):null]})},Dr=s.st(ke)`
|
|
1860
1860
|
margin-top: 10px;
|
|
1861
1861
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1862
1862
|
border-radius: 4px;
|
|
@@ -1890,7 +1890,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1890
1890
|
display: none;
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
|
-
`,Xt=({options:e,title:n,checkboxesName:i,defaultCollapsed:r,onChange:a})=>{const o=s.Je(),[l,c]=f.useState(r??!1),d=f.useCallback(()=>{c(
|
|
1893
|
+
`,Xt=({options:e,title:n,checkboxesName:i,defaultCollapsed:r,onChange:a})=>{const o=s.Je(),[l,c]=f.useState(r??!1),d=f.useCallback(()=>{c(g=>!g)},[]);return t.jsxs(y,{"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(y,{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(T,{icon:l?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs"})]}),l?t.jsx(y,{display:"flex",gap:.75,wrap:"wrap",children:e.map(g=>t.jsx(y,{border:"1px solid",borderColor:o.palette.gray[300],borderRadius:"4px",px:.5,py:.5,children:t.jsx(ie,{checked:g.visible,disabled:g.locked,label:g.name,name:`${i}-${g.name}`,onChange:a,value:g.name})},g.name))}):void 0]})},Zt=e=>e.reduce((i,r)=>r.group?i[r.group]?{...i,[r.group]:[...i[r.group],r]}:{...i,[r.group]:[r]}:i,{}),Ar=s.st.input`
|
|
1894
1894
|
${({theme:e})=>`
|
|
1895
1895
|
background: none;
|
|
1896
1896
|
border: none !important;
|
|
@@ -1946,7 +1946,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1946
1946
|
border-radius: ${e.spacing[.5]};
|
|
1947
1947
|
width: 250px;
|
|
1948
1948
|
`}
|
|
1949
|
-
`,ue=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:r,value:a,...o},l){const c=s.Je(),[d,
|
|
1949
|
+
`,ue=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:r,value:a,...o},l){const c=s.Je(),[d,g]=f.useState(!1),{refs:p,floatingStyles:u}=s.useFloating$1(),x=f.useCallback(()=>{g($=>!$)},[]),h=f.useCallback($=>{$.key==="Enter"&&$.preventDefault()},[]);ne(p.floating.current,()=>{g(!1)},!0);const b=t.jsxs(Lr,{children:[t.jsx(T,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ar,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:a}),!s.lodashExports.isEmpty(a)&&t.jsx(O,{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(f.Fragment,{children:[t.jsx(O,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:x,ref:p.setReference,variant:"ghost"}),d?t.jsx(Pr,{ref:p.setFloating,style:u,children:b}):void 0]}):b}),Qt=({columns:e,formId:n,onChangeHandler:i,variant:r})=>{const a=f.useRef(null),[o,l]=f.useState([]),[c,d]=f.useState(""),g=f.useCallback(u=>{const{value:x}=u.target;d(x)},[]),p=f.useCallback(()=>{a.current&&(a.current.reset(),d(""))},[a]);return f.useEffect(()=>{l(e.filter(u=>{var x;return r==="grouped"?u.name.toLowerCase().includes(c.toLowerCase())||((x=u.group)==null?void 0:x.includes(c.toLowerCase())):u.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,r]),r==="grouped"?t.jsxs(y,{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(ue,{name:"search",onChange:g,onClear:p,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:p,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(Zt(o)).map(([u,x],h)=>{const b=`li-checkbox${u}`;return t.jsx(Xt,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:x,title:u},b)})})]}):t.jsxs(y,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:a,children:t.jsx(ue,{name:"search",onChange:g,onClear:p,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:p,style:{paddingTop:"0.625rem"},children:o.map(u=>{const x=`li-checkbox-${u.name}`;return t.jsx(Rr,{selected:u.visible,value:x,width:"content",children:t.jsx(ie,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},x)})})]})},Wr=({_containerId:e="portals",title:n,modalRef:i,variant:r})=>{const a=s.Je(),o=f.useRef(null),[l,c]=f.useState(void 0),d=f.useCallback(u=>{const{checked:x,value:h}=u.target,b=i.columns.map($=>{var w;return $.name===h?((w=$.toggleVisibility)==null||w.call($,x),{...$,visible:x}):$});i.setColumns(b)},[i]),g=f.useCallback(u=>{const x=i.columns.map(h=>{var b;return h.id===u?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});i.setColumns(x)},[i]),p=f.useCallback(()=>{var x;const u=(x=o.current)==null?void 0:x.scrollHeight;l!==u&&c(u)},[l]);return i.isOpen?ae.createPortal(t.jsx(Jt,{"aria-label":i.name,"aria-modal":"true",children:t.jsxs(Qe,{$size:"md",flexDirection:"column",children:[t.jsxs(y,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(U,{size:"sm",children:n}),t.jsx(O,{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(y,{display:"flex",gap:1.25,onScroll:p,px:1.25,ref:o,scroll:"y",width:"100%",children:[t.jsx(Qt,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:r}),t.jsx(y,{borderLeft:`2px solid ${a.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Kt,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:g,onReorder:i.setColumns,title:"Reorder columns"})]}),t.jsx(re,{mb:0,mt:0}),t.jsxs(y,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(L,{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(L,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Br=s.st(ke)`
|
|
1950
1950
|
padding: 8px;
|
|
1951
1951
|
min-height: 36px;
|
|
1952
1952
|
min-width: unset;
|
|
@@ -1956,14 +1956,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1956
1956
|
display: flex;
|
|
1957
1957
|
justify-content: center;
|
|
1958
1958
|
z-index: 99999;
|
|
1959
|
-
`,
|
|
1959
|
+
`,xt=s.st(ke)`
|
|
1960
1960
|
padding: 7px 8px;
|
|
1961
1961
|
word-wrap: break-word;
|
|
1962
1962
|
|
|
1963
1963
|
svg.fa-check {
|
|
1964
1964
|
border-radius: 2px;
|
|
1965
1965
|
}
|
|
1966
|
-
`,en=({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(ut,{value:g.value,width:"content",children:t.jsx(ie,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(g=>t.jsx(ut,{value:g.value,width:"content",children:t.jsx(Xe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(vt,{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(De,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Pt,{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(Et,{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",{})}},tn=({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(en,{control:e,option:a,register:i,setValue:r}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),nn=e=>{var c,d,p,g,u;const[n,i]=f.useState([...e]),{control:r,register:a,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(x=>x.type==="checkboxes").flatMap(x=>{var h;return((h=x.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(x=>x.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:x})=>x))==null?void 0:p.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:g.minValue,maxValue:(u=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:u.maxValue}});return{control:r,items:n,setItems:i,register:a,handleSubmit:o,setValue:l}},Mr=(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)},Hr=(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())??"")}))??[],_r=async(e,n)=>await Promise.all(e.map(async i=>i.type==="checkboxes"?{...i,options:i.filterOptions?await i.filterOptions(i.options??[],n):Hr(i.options??[],n)}:i)),_e=({options:e,onSearch:n,onSubmit:i,id:r})=>{const{control:a,items:o,setItems:l,register:c,handleSubmit:d,setValue:p}=nn(e),g=e.some(h=>h.type==="checkboxes"&&h.hideSearch!==!0),u=f.useCallback(async h=>{const{value:b}=h.target;n&&n(b);const $=await _r(e,b);l($)},[e,n,l]),x=f.useCallback(h=>{i&&i(h)},[i]);return f.useEffect(()=>{l(e),Mr(e,p)},[e,l,p]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:r,children:[g&&t.jsx(ue,{onChange:u}),t.jsxs("form",{id:r,onSubmit:d(x),children:[t.jsx(tn,{control:a,items:o,register:c,setValue:p}),t.jsx(L,{mt:1,type:"submit",children:"Apply"})]})]})},rn=({options:e,variant:n,onApplyFilters:i,onSearch:r,setDirection:a,setHandler:o})=>{const l=s.Je(),[c,d]=f.useState(e),[p,g]=f.useState([]),[u,x]=f.useState({}),[h,b]=f.useState(""),$=f.useCallback(m=>()=>{const j=c.find(S=>S.label===m),k=!(j!=null&&j.filterOptions.some(S=>S.type==="dateRange"||S.type==="select"));o==null||o(k??!0),b(m),g((j==null?void 0:j.filterOptions)??[])},[c,o]),w=f.useCallback(m=>{const j=[...m.checkbox,...Object.values(m.text??{}),...m.radio?[m.radio]:[],...m.minValue?[String(m.minValue)]:[],...m.maxValue?[String(m.maxValue)]:[]];x(C=>j.length>0?{...C,[h]:j}:C);const k=C=>{var E,R;return{...C,options:(E=C.options)==null?void 0:E.map(P=>({...P,checked:m.checkbox.includes(P.value)||m.radio===P.value})),value:["text","select"].includes(C.type)?((R=m.text)==null?void 0:R[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?m.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?m.maxValue:C.maxValue}},S=C=>C.label===h?{...C,filterOptions:C.filterOptions.map(k)}:C,D=c.map(S);d(C=>C.map(S));const F=D.flatMap(({filterOptions:C})=>C);i(F),g([])},[c,i,h]),v=f.useCallback((m,j)=>{const k=`li-filter-option-${m}`;return t.jsxs(Br,{icon:j,onClick:$(m),style:{minWidth:"180px"},value:k,width:"100%",children:[m,u[m]===void 0?void 0:t.jsx(G,{tagLabel:u[m].length.toString()})]},k)},[u,$]);return f.useEffect(()=>{const m=e.reduce((j,{label:k,filterOptions:S})=>{const D=S.flatMap(({value:E,minValue:R,maxValue:P})=>[R,P,E]).filter(Boolean),F=S.flatMap(({options:E})=>E??[]).filter(({checked:E=!1})=>E).map(({value:E})=>E),C=[...D,...F];return C.length===0?j:{...j,[k]:C}},{});x(m),p.length>0&&a&&a("column")},[p,e,a]),n==="grouped"?t.jsx(y,{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(_e,{id:"filters-options",onSearch:r,onSubmit:w,options:p}):Object.entries(Zt(e)).map(([m,j])=>t.jsxs(y,{children:[t.jsx(z,{color:l.palette.gray[400],mb:.25,size:"sm",children:m}),j.map(({label:k,icon:S="filter-list"})=>v(k,S))]},m))}):t.jsx(y,{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(_e,{id:"filters-options",onSearch:r,onSubmit:w,options:p}):e.map(({label:m,icon:j="filter-list"})=>v(m,j))})},an=({options:e,onApplyFilters:n,onSearch:i,modalRef:r,variant:a})=>{const[o,l]=f.useState("row"),[c,d]=f.useState(!0),p=s.Je(),g=f.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 f.useEffect(()=>{const x=h=>{const b=g.current;b&&!b.contains(h.target)&&r.close()};if(c)return document.addEventListener("mousedown",x,!0),()=>{document.removeEventListener("mousedown",x,!0)}},[g,c,r]),t.jsx(Or,{$bgColor:"transparent","aria-label":r.name,children:t.jsxs(Ze,{$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(rn,{onApplyFilters:n,onSearch:i,options:e,setDirection:l,setHandler:d,variant:a}),o==="row"?u:void 0]})})};function Jr(e){if(e)return e}function on(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 Ur(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 Vr(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 Gr(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(G,{filterValues:a,icon:n,id:"remove-filter",onClose:r(e),tagLabel:`${i} `}),Yr=({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 x=Ur(g,u,r.placeholder);return t.jsx(ce,{filter:a,filterValue:x,icon:r.icon,label:r.label,onClose:n},l)}case"dateRange":{const x=Vr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ce,{filter:a,filterValue:x,icon:r.icon,label:r.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=on(p);return t.jsx(ce,{filter:a,filterValue:x,icon:r.icon,label:r.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Jr(d),h=Gr(c,r.label,o);return t.jsx(ce,{filter:a,filterValue:x,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(y,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},qr=(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,x=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(x)&&s._.isUndefined(h)?!0:(x??-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)},xt=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,Kr=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}},Xr=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:r,onFiltersChange:a,onReset:o,onSearch:l,variant:c="ungrouped"})=>{const d=Re("filters-modal"),[p,g]=f.useState([]),[u,x]=f.useState(xt(p)),h=i.map(m=>({...m,filterOptions:m.filterOptions.map(j=>p.find(S=>S.key===j.key&&S.type===j.type&&S.filterFn===j.filterFn)??{...j})})),b=f.useCallback(m=>{g([...m]),localStorage.setItem(n,JSON.stringify(m))},[g,n]),$=f.useCallback(()=>{o&&o(),d.toggle()},[d,o]),w=f.useCallback(m=>()=>{o&&o();const j=p.map(k=>k.key===m.key&&k.type===m.type&&k.filterFn===m.filterFn?Kr(k):k);g(j),localStorage.setItem(n,JSON.stringify(j))},[p,n,o]);return f.useEffect(()=>{const m=localStorage.getItem(n),j=i.flatMap(S=>S.filterOptions),k=m?JSON.parse(m):j;j.flatMap(S=>S.value).filter(Boolean).length>0||j.flatMap(S=>S.options).filter(S=>(S==null?void 0:S.checked)===void 0).length>0?(g(j),localStorage.setItem(n,JSON.stringify(j))):g(k)},[n,i,g]),f.useEffect(()=>{r&&e!==void 0&&r(qr(e,p)),x(xt(p)),a==null||a(p)},[e,p,r,x,a]),{Filters:()=>t.jsxs(y,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx(y,{pr:.25,children:t.jsx(L,{icon:"filter",id:"filterBtn",onClick:$,tag:u.toString(),variant:"ghost"})}),d.isOpen&&t.jsx(an,{modalRef:d,onApplyFilters:b,onSearch:l,options:h,variant:c})]}),options:h,removeFilter:w}},sn=({_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:x,id:h="modal-container"})=>{const b=s.Je(),$=t.jsx(Jt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ze,{$size:x,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Vt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx(y,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Qe,{items:g})}),(s._.isObject(o)||r)&&t.jsxs(jr,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(Sr,{$framed:o.imageFramed,children:t.jsx(Z,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(z,{size:"sm",children:o.imageText})]}),t.jsx(Ut,{alert:n,cancelButton:i,confirmButton:a,modalRef:c})]})});return e&&c.isOpen?ae.createPortal($,document.getElementById("portals")??document.body):c.isOpen?$:null},Zr=()=>{const[e,n]=f.useState(!1),[i,r]=f.useState(),a=f.useRef(null),o=Re("confirm-dialog-modal"),l=f.useCallback(async g=>(r(g),n(!0),new Promise(u=>{a.current=u})),[]),c=f.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=f.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(sn,{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}},Qr=s.st.ul`
|
|
1966
|
+
`,en=({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(p=>t.jsx(xt,{value:p.value,width:"content",children:t.jsx(ie,{...i("checkbox"),label:p.label,value:p.value})},`li-checkbox-${p.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(p=>t.jsx(xt,{value:p.value,width:"content",children:t.jsx(Ze,{...i("radio"),label:p.label,value:p.value})},`li-radio-${p.value}`))});case"select":return t.jsx(Ke,{control:e,items:((l=n.options)==null?void 0:l.map(p=>({name:p.label??"",value:p.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const g=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(De,{label:n.label,name:g,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Pt,{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(Et,{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",{})}},tn=({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(en,{control:e,option:a,register:i,setValue:r}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),nn=e=>{var c,d,g,p,u;const[n,i]=f.useState([...e]),{control:r,register:a,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(x=>x.type==="checkboxes").flatMap(x=>{var h;return((h=x.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((g=(d=(c=e.find(x=>x.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:x})=>x))==null?void 0:g.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(p=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:p.minValue,maxValue:(u=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:u.maxValue}});return{control:r,items:n,setItems:i,register:a,handleSubmit:o,setValue:l}},Mr=(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(g=>g.checked).map(g=>g.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)},Hr=(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())??"")}))??[],_r=async(e,n)=>await Promise.all(e.map(async i=>i.type==="checkboxes"?{...i,options:i.filterOptions?await i.filterOptions(i.options??[],n):Hr(i.options??[],n)}:i)),_e=({options:e,onSearch:n,onSubmit:i,id:r})=>{const{control:a,items:o,setItems:l,register:c,handleSubmit:d,setValue:g}=nn(e),p=e.some(h=>h.type==="checkboxes"&&h.hideSearch!==!0),u=f.useCallback(async h=>{const{value:b}=h.target;n&&n(b);const $=await _r(e,b);l($)},[e,n,l]),x=f.useCallback(h=>{i&&i(h)},[i]);return f.useEffect(()=>{l(e),Mr(e,g)},[e,l,g]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:r,children:[p&&t.jsx(ue,{onChange:u}),t.jsxs("form",{id:r,onSubmit:d(x),children:[t.jsx(tn,{control:a,items:o,register:c,setValue:g}),t.jsx(L,{mt:1,type:"submit",children:"Apply"})]})]})},rn=({options:e,variant:n,onApplyFilters:i,onSearch:r,setDirection:a,setHandler:o})=>{const l=s.Je(),[c,d]=f.useState(e),[g,p]=f.useState([]),[u,x]=f.useState({}),[h,b]=f.useState(""),$=f.useCallback(m=>()=>{const j=c.find(S=>S.label===m),k=!(j!=null&&j.filterOptions.some(S=>S.type==="dateRange"||S.type==="select"));o==null||o(k??!0),b(m),p((j==null?void 0:j.filterOptions)??[])},[c,o]),w=f.useCallback(m=>{const j=[...m.checkbox,...Object.values(m.text??{}),...m.radio?[m.radio]:[],...m.minValue?[String(m.minValue)]:[],...m.maxValue?[String(m.maxValue)]:[]];x(C=>j.length>0?{...C,[h]:j}:C);const k=C=>{var E,R;return{...C,options:(E=C.options)==null?void 0:E.map(P=>({...P,checked:m.checkbox.includes(P.value)||m.radio===P.value})),value:["text","select"].includes(C.type)?((R=m.text)==null?void 0:R[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?m.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?m.maxValue:C.maxValue}},S=C=>C.label===h?{...C,filterOptions:C.filterOptions.map(k)}:C,D=c.map(S);d(C=>C.map(S));const F=D.flatMap(({filterOptions:C})=>C);i(F),p([])},[c,i,h]),v=f.useCallback((m,j)=>{const k=`li-filter-option-${m}`;return t.jsxs(Br,{icon:j,onClick:$(m),style:{minWidth:"180px"},value:k,width:"100%",children:[m,u[m]===void 0?void 0:t.jsx(G,{tagLabel:u[m].length.toString()})]},k)},[u,$]);return f.useEffect(()=>{const m=e.reduce((j,{label:k,filterOptions:S})=>{const D=S.flatMap(({value:E,minValue:R,maxValue:P})=>[R,P,E]).filter(Boolean),F=S.flatMap(({options:E})=>E??[]).filter(({checked:E=!1})=>E).map(({value:E})=>E),C=[...D,...F];return C.length===0?j:{...j,[k]:C}},{});x(m),g.length>0&&a&&a("column")},[g,e,a]),n==="grouped"?t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:g.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:g.length>0?t.jsx(_e,{id:"filters-options",onSearch:r,onSubmit:w,options:g}):Object.entries(Zt(e)).map(([m,j])=>t.jsxs(y,{children:[t.jsx(z,{color:l.palette.gray[400],mb:.25,size:"sm",children:m}),j.map(({label:k,icon:S="filter-list"})=>v(k,S))]},m))}):t.jsx(y,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:g.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:g.length>0?t.jsx(_e,{id:"filters-options",onSearch:r,onSubmit:w,options:g}):e.map(({label:m,icon:j="filter-list"})=>v(m,j))})},an=({options:e,onApplyFilters:n,onSearch:i,modalRef:r,variant:a})=>{const[o,l]=f.useState("row"),[c,d]=f.useState(!0),g=s.Je(),p=f.useRef(null),u=t.jsx(O,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:r.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const x=h=>{const b=p.current;b&&!b.contains(h.target)&&r.close()};if(c)return document.addEventListener("mousedown",x,!0),()=>{document.removeEventListener("mousedown",x,!0)}},[p,c,r]),t.jsx(Or,{$bgColor:"transparent","aria-label":r.name,children:t.jsxs(Qe,{$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:p,style:{overflow:"hidden",width:"max-content"},children:[o==="column"?u:void 0,t.jsx(rn,{onApplyFilters:n,onSearch:i,options:e,setDirection:l,setHandler:d,variant:a}),o==="row"?u:void 0]})})};function Jr(e){if(e)return e}function on(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 Ur(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 Vr(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 Gr(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(G,{filterValues:a,icon:n,id:"remove-filter",onClose:r(e),tagLabel:`${i} `}),Yr=({options:e,onClose:n})=>{const i=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:l,type:c,value:d,options:g,minValue:p,maxValue:u}=a;switch(c){case"numberRange":{const x=Ur(p,u,r.placeholder);return t.jsx(ce,{filter:a,filterValue:x,icon:r.icon,label:r.label,onClose:n},l)}case"dateRange":{const x=Vr(p==null?void 0:p.toString(),u==null?void 0:u.toString());return t.jsx(ce,{filter:a,filterValue:x,icon:r.icon,label:r.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=on(g);return t.jsx(ce,{filter:a,filterValue:x,icon:r.icon,label:r.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Jr(d),h=Gr(c,r.label,o);return t.jsx(ce,{filter:a,filterValue:x,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(y,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},qr=(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(g=>g.checked).map(g=>g.value);return d.length===0?!0:d.includes(String(l[c.key]))}function a(l,c,d){const g=d(String(l[c.key])),{minValue:p,maxValue:u}=c,x=s._.isEmpty(p)&&typeof p!="number"?void 0:d(String(p)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(x)&&s._.isUndefined(h)?!0:(x??-1/0)<=g&&g<=(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)},ft=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,Kr=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}},Xr=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:r,onFiltersChange:a,onReset:o,onSearch:l,variant:c="ungrouped"})=>{const d=Re("filters-modal"),[g,p]=f.useState([]),[u,x]=f.useState(ft(g)),h=i.map(m=>({...m,filterOptions:m.filterOptions.map(j=>g.find(S=>S.key===j.key&&S.type===j.type&&S.filterFn===j.filterFn)??{...j})})),b=f.useCallback(m=>{p([...m]),localStorage.setItem(n,JSON.stringify(m))},[p,n]),$=f.useCallback(()=>{o&&o(),d.toggle()},[d,o]),w=f.useCallback(m=>()=>{o&&o();const j=g.map(k=>k.key===m.key&&k.type===m.type&&k.filterFn===m.filterFn?Kr(k):k);p(j),localStorage.setItem(n,JSON.stringify(j))},[g,n,o]);return f.useEffect(()=>{const m=localStorage.getItem(n),j=i.flatMap(S=>S.filterOptions),k=m?JSON.parse(m):j;j.flatMap(S=>S.value).filter(Boolean).length>0||j.flatMap(S=>S.options).filter(S=>(S==null?void 0:S.checked)===void 0).length>0?(p(j),localStorage.setItem(n,JSON.stringify(j))):p(k)},[n,i,p]),f.useEffect(()=>{r&&e!==void 0&&r(qr(e,g)),x(ft(g)),a==null||a(g)},[e,g,r,x,a]),{Filters:()=>t.jsxs(y,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx(y,{pr:.25,children:t.jsx(L,{icon:"filter",id:"filterBtn",onClick:$,tag:u.toString(),variant:"ghost"})}),d.isOpen&&t.jsx(an,{modalRef:d,onApplyFilters:b,onSearch:l,options:h,variant:c})]}),options:h,removeFilter:w}},sn=({_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:g=void 0,tabItems:p=void 0,title:u=void 0,size:x,id:h="modal-container"})=>{const b=s.Je(),$=t.jsx(Jt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Qe,{$size:x,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Vt,{description:l,modalRef:c,onClose:g,otherActions:d,title:u}),p&&t.jsx(y,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(et,{items:p})}),(s._.isObject(o)||r)&&t.jsxs(jr,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(Sr,{$framed:o.imageFramed,children:t.jsx(Z,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(z,{size:"sm",children:o.imageText})]}),t.jsx(Ut,{alert:n,cancelButton:i,confirmButton:a,modalRef:c})]})});return e&&c.isOpen?ae.createPortal($,document.getElementById("portals")??document.body):c.isOpen?$:null},Zr=()=>{const[e,n]=f.useState(!1),[i,r]=f.useState(),a=f.useRef(null),o=Re("confirm-dialog-modal"),l=f.useCallback(async p=>(r(p),n(!0),new Promise(u=>{a.current=u})),[]),c=f.useCallback(()=>{var p;n(!1),r(void 0),(p=a.current)==null||p.call(a,!0)},[]),d=f.useCallback(()=>{var p;n(!1),r(void 0),(p=a.current)==null||p.call(a,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:p="confirm-dialog-modal",children:u})=>t.jsxs(sn,{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:p,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},Qr=s.st.ul`
|
|
1967
1967
|
${({theme:e})=>`
|
|
1968
1968
|
align-items: flex-start;
|
|
1969
1969
|
border-radius: ${e.spacing[.25]};
|
|
@@ -2002,7 +2002,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2002
2002
|
cursor: not-allowed;
|
|
2003
2003
|
}
|
|
2004
2004
|
`}
|
|
2005
|
-
`,ta=({icon:e,iconColor:n,id:i,showChevron:r,options:a,title:o})=>{const l=s.Je(),[c,d]=f.useState(!1),
|
|
2005
|
+
`,ta=({icon:e,iconColor:n,id:i,showChevron:r,options:a,title:o})=>{const l=s.Je(),[c,d]=f.useState(!1),g=c?"chevron-up":"chevron-down",{refs:p,floatingStyles:u}=s.useFloating({middleware:[s.offset({mainAxis:4})],placement:"bottom-start"}),x=f.useCallback(()=>{d(h=>!h)},[]);return ne(p.floating.current,()=>{d(!1)},!0,document.getElementById("dropdown-toggle")),t.jsxs(f.Fragment,{children:[t.jsx(L,{"aria-label":o,icon:e,iconColor:n,iconType:"fa-solid",id:`dropdown-toggle-${i}`,onClick:x,ref:p.setReference,rightIcon:r?g:void 0,variant:"ghost",children:o}),c?t.jsx(Qr,{ref:p.setFloating,style:u,children:a.map(h=>{const b=({})=>{h.onClick(),d(!1)};return t.jsxs(ea,{"aria-disabled":h.disabled,"aria-label":h.label,onClick:h.disabled?void 0:b,children:[t.jsx(T,{icon:h.icon,iconColor:h.iconColor??l.palette.gray[300],iconSize:"xxs",iconType:"fa-light"}),h.label]},h.label)})}):void 0]})},Je=({buttonProps:e,variant:n})=>t.jsx(L,{onClick:e.onClick,variant:n,children:e.text}),na=s.st.div`
|
|
2006
2006
|
display: flex;
|
|
2007
2007
|
flex-direction: column;
|
|
2008
2008
|
align-items: center;
|
|
@@ -2036,7 +2036,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2036
2036
|
> *:last-child {
|
|
2037
2037
|
margin-right: 0;
|
|
2038
2038
|
}
|
|
2039
|
-
`,
|
|
2039
|
+
`,ht={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},aa=({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(na,{$padding:a,children:[t.jsx(ia,{children:t.jsx(Z,{alt:"empty-icon",publicId:r})}),t.jsx(U,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:ht[l].title,textAlign:"center",children:o}),t.jsx(z,{mb:c?2:void 0,size:ht[l].description,textAlign:"center",children:i}),c?t.jsxs(ra,{children:[e&&t.jsx(Je,{buttonProps:e,variant:"tertiary"}),n&&t.jsx(Je,{buttonProps:n,variant:"primary"})]}):void 0]})},oa=({children:e})=>{const n=s.useFormContext();return e({...n})},sa=s.st.form`
|
|
2040
2040
|
${({theme:e})=>`
|
|
2041
2041
|
align-items: flex-start;
|
|
2042
2042
|
align-self: stretch;
|
|
@@ -2046,7 +2046,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2046
2046
|
overflow: hidden auto;
|
|
2047
2047
|
width: 100%;
|
|
2048
2048
|
`}
|
|
2049
|
-
`,la=({alert:e,buttonAlignment:n,cancelButton:i,children:r,confirmButton:a,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:
|
|
2049
|
+
`,la=({alert:e,buttonAlignment:n,cancelButton:i,children:r,confirmButton:a,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:g,showButtons:p=!0,yupSchema:u,...x})=>{const h=s.Je(),b=s.useForm({...x,mode:d??"all",resolver:u?s.o(u):void 0});return t.jsx(s.FormProvider,{...b,children:t.jsx(sa,{onSubmit:b.handleSubmit(g),children:t.jsxs(y,{scroll:"y",width:"100%",children:[t.jsx(y,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:r}),p&&t.jsxs(y,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,borderTop:`1px solid ${h.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(y,{display:"flex",gap:.75,maxWidth:c,children:[i?t.jsx(L,{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(L,{disabled:((a==null?void 0:a.disabled)??!1)||b.formState.isSubmitting||o&&!b.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"})]})]})]})})})},ca=s.st(je)`
|
|
2050
2050
|
display: grid;
|
|
2051
2051
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2052
2052
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2083,7 +2083,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2083
2083
|
width: 507px;
|
|
2084
2084
|
}
|
|
2085
2085
|
`}
|
|
2086
|
-
`,
|
|
2086
|
+
`,tt=s.st.div`
|
|
2087
2087
|
${({theme:e,$isSelected:n})=>`
|
|
2088
2088
|
align-items: center;
|
|
2089
2089
|
background-color: ${n?e.palette.gray[100]:e.palette.white};
|
|
@@ -2100,7 +2100,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2100
2100
|
background-color: ${e.palette.gray[100]};
|
|
2101
2101
|
}
|
|
2102
2102
|
`}
|
|
2103
|
-
`,ln=({isSelected:e=!1,label:n,onSelect:i})=>{const r=s.Je(),a=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(
|
|
2103
|
+
`,ln=({isSelected:e=!1,label:n,onSelect:i})=>{const r=s.Je(),a=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(tt,{$isSelected:e,onClick:a,children:[e?t.jsx(T,{icon:"check",iconColor:r.palette.gray[800],iconSize:"xs"}):null,t.jsx(z,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ga=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:r,onClose:a,selectedItem:o,title:l,variant:c})=>{const d=s.Je(),[g,p]=f.useState(n),[u,x]=f.useState(""),h=f.useCallback(w=>{p(v=>v.filter(m=>String(m.name).toLowerCase().includes(w.toLocaleLowerCase())))},[p]),b=f.useCallback(w=>{w.currentTarget&&(x(w.currentTarget.value),h(w.currentTarget.value))},[x,h]);f.useEffect(()=>{p(n),h(u)},[n,h,u]);const $=t.jsx(y,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx(y,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(pa,{$itemsLength:g.length,children:[t.jsxs(y,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(z,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(O,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:a,variant:"ghost"})]}),t.jsx(y,{mt:1,children:t.jsx(ue,{onInput:b,placeholder:"Search"})}),t.jsx(re,{mb:1,mt:1}),t.jsxs(y,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(tt,{onClick:i,children:t.jsxs(y,{alignItems:"center",display:"flex",children:[t.jsx(T,{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,g.map(w=>t.jsx(ln,{isSelected:o.toLowerCase()===w.name,label:w.name.charAt(0).toUpperCase()+w.name.slice(1),onSelect:r},w.name))]})]})})});return e?ae.createPortal($,document.body):t.jsx("div",{})},ua=({description:e,height:n="auto",leftIconName:i,children:r,rightIconName:a,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:g="centered",width:p="318px"})=>{const u=s.Je(),x=g==="centered",h=l&&t.jsx(V,{icon:a??i,iconColor:u.palette.gray[800],id:l,place:d,tip:c});return t.jsxs(y,{alignItems:x?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:x?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:p,children:[t.jsxs(y,{alignItems:"center",display:"flex",gap:.5,children:[x||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(z,{color:x?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:x?"center":"start",children:e}),x||s.lodashExports.isUndefined(a)?void 0:h]}),t.jsxs(y,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[x&&!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]}),x&&!s.lodashExports.isUndefined(a)?h:void 0]})]})},xa=({actions:e,children:n,header:i,title:r,tabs:a,footer:o})=>{const l=s.Je();return t.jsxs(y,{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(y,{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(y,{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(y,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},g)=>t.jsx(O,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${g}-${c}`))})]}),t.jsx(y,{display:"flex",pt:.25,width:"100%",children:t.jsx(et,{items:a})}),t.jsx(y,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx(y,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:g},p)=>t.jsx(L,{icon:c,onClick:g,variant:p===0?"primary":"tertiary",width:"100%",children:d},`${p}-${d}`))})]})},fa=s.st.span`
|
|
2104
2104
|
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2105
2105
|
background-color: ${n};
|
|
2106
2106
|
border-radius: 5px;
|
|
@@ -2166,7 +2166,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2166
2166
|
height: ${e}px;
|
|
2167
2167
|
width: ${e}px;
|
|
2168
2168
|
`}
|
|
2169
|
-
`,Ia=e=>{const{size:n}=e;return t.jsx(za,{$size:n,...e})},Ta=({children:e,commitSha:n,commitShortSha:i,parentElement:r,userInfo:a,setVisibility:o})=>{const l=s.Je(),{userName:c,email:d,phone:
|
|
2169
|
+
`,Ia=e=>{const{size:n}=e;return t.jsx(za,{$size:n,...e})},Ta=({children:e,commitSha:n,commitShortSha:i,parentElement:r,userInfo:a,setVisibility:o})=>{const l=s.Je(),{userName:c,email:d,phone:g,userRole:p}=a;return ne(r,()=>{o(!1)}),t.jsxs(qt,{children:[t.jsx("li",{className:"user-info",children:t.jsxs(y,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs(y,{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(g)?void 0:t.jsx(z,{color:l.palette.gray[400],size:"sm",children:g})]}),t.jsx(y,{children:t.jsx(G,{tagLabel:p,variant:"role"})})]})}),t.jsx(re,{}),e,t.jsx(re,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Q,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${n}`,iconPosition:"hidden",children:t.jsx(z,{color:l.palette.gray[400],size:"xs",children:`commit : ${i}`})})})]})},Fa=s.st.button`
|
|
2170
2170
|
align-items: center;
|
|
2171
2171
|
background-color: transparent;
|
|
2172
2172
|
border: unset;
|
|
@@ -2183,7 +2183,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2183
2183
|
&:hover span {
|
|
2184
2184
|
color: ${I.palette.primary[200]};
|
|
2185
2185
|
}
|
|
2186
|
-
`,Na=({message:e,onClickButton:n,buttonText:i,buttonFontWeight:r="regular",show:a=!0,icon:o,onClose:l,buttonSide:c="end"})=>{const d=s.Je(),[p
|
|
2186
|
+
`,Na=({message:e,onClickButton:n,buttonText:i,buttonFontWeight:r="regular",show:a=!0,icon:o,onClose:l,buttonSide:c="end"})=>{const d=s.Je(),[g,p]=f.useState(a),u=f.useCallback(()=>{p(!1),l==null||l()},[l]);f.useEffect(()=>{p(a)},[a,p]);const x=t.jsxs(Fa,{onClick:n,children:[t.jsx(z,{color:d.palette.white,fontWeight:r,size:"sm",textDecoration:"underline",children:i}),t.jsx(T,{icon:o??"arrow-right",iconColor:d.palette.white,iconSize:"xs",iconType:r==="bold"?"fa-regular":"fa-light"})]});return t.jsxs(y,{alignItems:"center",bgGradient:d.palette.gradients["01"],display:g?"flex":"none",id:"message-banner",justify:"space-between",padding:[.75,.75,.75,.75],children:[t.jsxs(y,{display:"flex",gap:.5,justify:"center",width:"100%",children:[c==="start"&&n?x:void 0,t.jsx(y,{children:typeof e=="string"?t.jsx(z,{color:d.palette.white,display:"inline",size:"sm",children:e}):e}),c==="end"&&n?x:void 0]}),t.jsx(T,{clickable:!0,hoverColor:d.palette.primary[200],icon:"close",iconColor:d.palette.white,iconSize:"xs",iconType:"fa-light",onClick:u})]})},Ea=s.st.div`
|
|
2187
2187
|
${({theme:e,$variant:n})=>`
|
|
2188
2188
|
background: ${e.palette.white};
|
|
2189
2189
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2266,7 +2266,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2266
2266
|
&::-webkit-inner-spin-button {
|
|
2267
2267
|
opacity: 1;
|
|
2268
2268
|
}
|
|
2269
|
-
`,Wa=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:r=0,max:a,min:o,name:l,onEnter:c,tooltipMessage:d,...
|
|
2269
|
+
`,Wa=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:r=0,max:a,min:o,name:l,onEnter:c,tooltipMessage:d,...g},p){const u=i<0?0:i,[x,h]=f.useState(Number(r).toFixed(u)),b=f.useCallback(v=>{const m=s.lodashExports.toNumber(v.target.value);v.target.value.endsWith(".")?h(v.target.value):m>=Number(o)&&m<=Number(a)&&(h(String(m)),n&&c(s.lodashExports.toNumber(m.toFixed(u)))),v.stopPropagation()},[n,u,a,o,c]),$=f.useCallback(v=>{v.currentTarget.contains(v.relatedTarget)||h(Number(r).toFixed(u)),v.stopPropagation()},[u,r]),w=f.useCallback(v=>{v.stopPropagation(),v.key==="Enter"&&!s.lodashExports.isEmpty(v.currentTarget.value)&&c(s.lodashExports.toNumber(v.currentTarget.value))},[c]);return t.jsx(La,{onBlur:$,tabIndex:-1,children:t.jsx(V,{id:"numberInputTooltip",tip:d,children:t.jsx(Pa,{...g,"aria-label":l,"aria-valuemax":Number(a),"aria-valuemin":Number(o),"aria-valuenow":Number(x),max:a,min:o,name:l,onChange:b,onKeyUp:w,ref:p,step:10**-u,type:"number",value:x})})})}),Ba={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},Ue=({icon:e,label:n,onClick:i,onlyLabel:r=!1,provider:a="GitLab"})=>{const o=s.Je();return t.jsxs(y,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[r?!1:t.jsx(y,{height:"24px",width:"24px",children:e===void 0?t.jsx(Z,{alt:`${a} Logo`,height:"100%",publicId:Ba[a],width:"100%"}):t.jsx(T,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx(y,{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})})]})},Oa=({align:e="end",buttonLabel:n="Add Credential",children:i,id:r,manualOption:a,providers:o})=>{const l=s.Je(),[c,d]=f.useState(!1),g=f.useRef(null);ne(g.current,()=>{d(!1)},!0);const p=f.useCallback(h=>{a==null||a.onClick(h),d(!1)},[a]),u=f.useCallback(()=>{d(h=>!h)},[d]),x=f.useCallback(h=>b=>{var $;($=o[h])==null||$.onClick(b),d(!1)},[o]);return t.jsxs(y,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:g,width:"max-content",zIndex:10,children:[t.jsx(L,{icon:"plus",onClick:u,variant:"primary",children:n}),t.jsxs(y,{alignItems:"center",bgColor:"#fff",border:`1px solid ${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(Ue,{onClick:x(h),provider:h},h)),a===void 0?void 0:t.jsx(Ue,{icon:"square-plus",label:a.label??"Add manually",onClick:p}),i]})]})},Ma=s.st.div`
|
|
2270
2270
|
${({theme:e})=>`
|
|
2271
2271
|
height: ${e.spacing[1]};
|
|
2272
2272
|
width: ${e.spacing[1]};
|
|
@@ -2377,7 +2377,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2377
2377
|
border-start-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2378
2378
|
background-color: ${r==="compliance"?Ja(e,n):"inherit"};
|
|
2379
2379
|
`}
|
|
2380
|
-
`,Ga=({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(y,{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,
|
|
2380
|
+
`,Ga=({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(y,{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,g=t.jsx(Ua,{$minWidth:e,$orientation:a,$rounded:o,$variant:l,className:a,children:t.jsx(Va,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs(y,{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:[g,d]})},dn=({description:e="",highlightDescription:n=""})=>{const i=s.Je(),r=typeof n=="string",a=r?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(z,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:r?t.jsxs(f.Fragment,{children:[t.jsx(pe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(a).map((o,l)=>n.includes(o)?t.jsx(pe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(z,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Ya=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:r,confirmButton:a,container:o,description:l,highlightDescription:c="",image:d,maxWidth:g,title:p,titleColor:u})=>{const x=s.Je(),{alt:h,src:b,width:$="77px",height:w="77px"}=d,v=f.useCallback(()=>{n==null||n.onClick()},[n]),m=f.useCallback(()=>{a==null||a.onClick()},[a]),j=t.jsx(y,{alignItems:"center","aria-label":p,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs(y,{bgColor:x.palette.white,border:`1px solid ${x.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:g,pb:2.5,pl:2.5,pr:2.5,pt:2.5,shadow:"lg",width:"100%",zIndex:11,children:[t.jsxs(y,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx(y,{children:t.jsx(Z,{alt:h,height:w,publicId:b,width:$})}),t.jsxs(y,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(U,{color:u,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:p}),t.jsx(dn,{description:l,highlightDescription:c})]})]}),r&&t.jsx(y,{mb:1,scroll:"y",children:t.jsx(y,{height:"100%",children:r})}),t.jsxs(y,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(a)?t.jsx(L,{onClick:m,variant:(a==null?void 0:a.variant)??"primary",children:a==null?void 0:a.text},a==null?void 0:a.key):void 0,s.lodashExports.isObject(n)?t.jsx(L,{onClick:v,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(j,o??document.body):j},qa=s.st.div.attrs({className:"comp-scroll-up"})`
|
|
2381
2381
|
bottom: 15px;
|
|
2382
2382
|
position: fixed;
|
|
2383
2383
|
right: 140px;
|
|
@@ -2423,7 +2423,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2423
2423
|
height: auto;
|
|
2424
2424
|
}
|
|
2425
2425
|
`}
|
|
2426
|
-
`,ro=({children:e,closeIconId:n="close-menu",isOpen:i,items:r,onClose:a,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:
|
|
2426
|
+
`,ro=({children:e,closeIconId:n="close-menu",isOpen:i,items:r,onClose:a,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:g})=>{const p=s.Je(),u=f.useRef(null),x=f.useCallback(h=>()=>{h(),a()},[a]);return f.useEffect(()=>{const h=["mousedown","touchstart"],b=$=>{var k;const w=$.target,v=document.getElementById("helpBtn"),m=document.getElementById("filterBtn"),j=(w===v||((v==null?void 0:v.contains(w))??!1)||w===m||(m==null?void 0:m.contains(w)))??!1;i&&!j&&!(((k=u.current)==null?void 0:k.contains(w))??!1)&&a()};return h.forEach($=>{document.addEventListener($,b,{passive:!0})}),()=>{h.forEach($=>{document.removeEventListener($,b)})}},[i,a]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(io,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:u,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs(y,{height:"100%",position:"relative",children:[t.jsxs(y,{alignItems:"center",bgColor:p.palette.white,borderBottom:"1px solid",borderColor:p.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:p.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:g}),t.jsx(O,{icon:"close",iconColor:p.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:a,px:.25,py:.25,variant:"ghost"})]}),t.jsxs(y,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs(y,{py:1.25,children:[(r??[]).map(({customBadge:h,description:b,icon:$,onClick:w,requiresUpgrade:v,title:m})=>t.jsx(pn,{customBadge:h,description:b,icon:$,onClick:x(w),requiresUpgrade:v,title:m},m)),e&&t.jsx(y,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs(y,{alignItems:"center",bgColor:p.palette.white,borderColor:p.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(L,{color:`${p.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(L,{onClick:l,type:"submit",children:o})]})]})]})})})},ao=(e,n)=>n>=50?`
|
|
2427
2427
|
${e.palette.gray[200]} 50%,
|
|
2428
2428
|
${e.palette.primary[500]} 50.05%,
|
|
2429
2429
|
${e.palette.primary[500]} ${n}%,
|
|
@@ -2499,7 +2499,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2499
2499
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2500
2500
|
width: 59px;
|
|
2501
2501
|
`}
|
|
2502
|
-
`,gn=({state:e,trackRef:n,index:i,name:r})=>{const a=f.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})})})},co=(e,n,i)=>Math.round((i-e)/(n-e)*100),po=e=>{const n=s.Je(),i=f.useRef(null),{label:r,minValue:a=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,
|
|
2502
|
+
`,gn=({state:e,trackRef:n,index:i,name:r})=>{const a=f.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})})})},co=(e,n,i)=>Math.round((i-e)/(n-e)*100),po=e=>{const n=s.Je(),i=f.useRef(null),{label:r,minValue:a=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,g=s.$a916eb452884faea$export$b7a616150fdb9f44(),p=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:g,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),u=co(a,o,p.getThumbValue(0)),{groupProps:x,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},p,i);return t.jsx(J,{htmlFor:l,label:r,children:t.jsxs(y,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(oo,{...x,$min:a??0,$value:u,className:"slider",children:[t.jsx("div",{...h,className:`track ${p.isDisabled?"disabled":""}`,ref:i,children:t.jsx(gn,{index:0,name:l,state:p,trackRef:i})}),t.jsxs(so,{children:[t.jsx("p",{children:`${g.format(a)} (Low)`}),a<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${g.format(o)} (High)`})]})]}),t.jsx(lo,{children:t.jsx(z,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:p.getThumbValueLabel(0)})})]})})},{getVariant:go}=q(e=>({completed:`
|
|
2503
2503
|
background-color: ${e.palette.primary[500]};
|
|
2504
2504
|
color: ${e.palette.white};
|
|
2505
2505
|
|
|
@@ -2577,7 +2577,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2577
2577
|
|
|
2578
2578
|
${go(e,n)}
|
|
2579
2579
|
`}
|
|
2580
|
-
`,bo=({button:{disabled:e=!1,text:n,type:i="button",onClick:r},steps:a})=>{const[o,l]=f.useState(1),c=f.useCallback((d,
|
|
2580
|
+
`,bo=({button:{disabled:e=!1,text:n,type:i="button",onClick:r},steps:a})=>{const[o,l]=f.useState(1),c=f.useCallback((d,g)=>()=>{l(p=>p+d),g==null||g()},[]);return t.jsx(uo,{children:a.map((d,g)=>{const{content:p,title:u,nextAction:x,previousAction:h}=d,b=g+1,$=b===o?"current":"disabled",w=b<o?"completed":$;return t.jsxs(xo,{children:[t.jsx(y,{maxWidth:"40px",position:"relative",children:t.jsx(ho,{$variant:w,children:w==="completed"?t.jsx(T,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs(y,{ml:1.5,width:"100%",children:[t.jsx(U,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:u}),w==="current"&&t.jsxs(y,{children:[p,t.jsxs(fo,{children:[o>1&&t.jsx(L,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<a.length?t.jsx(L,{disabled:d.isDisabledNext??!1,onClick:c(1,x),variant:"primary",children:"Next step"}):t.jsx(L,{disabled:e,onClick:r,type:i,variant:"primary",children:n})]})]})]})]},d.title)})})},yo=s.st.button`
|
|
2581
2581
|
${({theme:e})=>`
|
|
2582
2582
|
align-items: center;
|
|
2583
2583
|
background-color: ${e.palette.white};
|
|
@@ -2619,7 +2619,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2619
2619
|
background-color: ${e.palette.gray[100]};
|
|
2620
2620
|
}
|
|
2621
2621
|
`}
|
|
2622
|
-
`,$o={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},mo=({disabled:e=!1,icon:n,id:i,label:r,name:a,onClick:o,type:l="button",variant:c})=>{const d=s.Je(),
|
|
2622
|
+
`,$o={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},mo=({disabled:e=!1,icon:n,id:i,label:r,name:a,onClick:o,type:l="button",variant:c})=>{const d=s.Je(),g=t.jsxs(yo,{"aria-label":a??void 0,className:c,disabled:e,id:i,onClick:o,type:l,children:[t.jsx(T,{clickable:!1,icon:n??$o[c].icon,iconSize:a===void 0?"xxs":"xs",iconType:"fa-light"}),a??void 0]});return t.jsxs(y,{alignItems:"center",display:"flex",children:[g,r&&t.jsx(z,{color:d.palette.gray[800],ml:.5,size:"sm",children:r})]})},wo=s.st.div`
|
|
2623
2623
|
${({theme:e,$size:n})=>`
|
|
2624
2624
|
align-items: center;
|
|
2625
2625
|
background-color: ${e.palette.white};
|
|
@@ -2751,7 +2751,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2751
2751
|
color: ${e.palette.white};
|
|
2752
2752
|
}
|
|
2753
2753
|
`}
|
|
2754
|
-
`,So=({defaultSelection:e,options:n,handleClick:i})=>{const[r,a]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{a(l),i(l)},[i]);return t.jsx(ko,{children:n.map((l,c)=>t.jsx(Co,{className:`${l.includes(r)&&"selected"}`,onClick:o(l),children:t.jsx(z,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},zo={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:""},Io=({run:e,steps:n,onFinish:i})=>{const[r,a]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:
|
|
2754
|
+
`,So=({defaultSelection:e,options:n,handleClick:i})=>{const[r,a]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{a(l),i(l)},[i]);return t.jsx(ko,{children:n.map((l,c)=>t.jsx(Co,{className:`${l.includes(r)&&"selected"}`,onClick:o(l),children:t.jsx(z,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},zo={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:""},Io=({run:e,steps:n,onFinish:i})=>{const[r,a]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:g,index:p,status:u,type:x}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(x)?l(p+(g===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||g==="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}}})},xn=t.jsx(y,{alignItems:"center",bgColor:I.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(z,{bgGradient:I.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),To=s.st.div`
|
|
2755
2755
|
${({className:e,theme:n})=>`
|
|
2756
2756
|
align-items: flex-start;
|
|
2757
2757
|
border-radius: ${n.spacing[1]};
|
|
@@ -2817,4 +2817,4 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2817
2817
|
}
|
|
2818
2818
|
`}
|
|
2819
2819
|
`;const Fo={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
|
|
2820
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},No=({description:e,onClick:n,plan:i})=>{const{title:r,description:a,benefits:o,buttonText:l}=Fo[i],c=e??a;return t.jsxs(To,{className:i,children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&xn,t.jsx(U,{color:I.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:r}),t.jsx(z,{color:I.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(L,{onClick:n,variant:"primary",children:l})]})};exports.Accordion=Gn;exports.AccordionContent
|
|
2820
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},No=({description:e,onClick:n,plan:i})=>{const{title:r,description:a,benefits:o,buttonText:l}=Fo[i],c=e??a;return t.jsxs(To,{className:i,children:[t.jsxs(y,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&xn,t.jsx(U,{color:I.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:r}),t.jsx(z,{color:I.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(L,{onClick:n,variant:"primary",children:l})]})};exports.Accordion=Gn;exports.AccordionContent=$t;exports.ActionButton=He;exports.Alert=ni;exports.AppliedFilter=ce;exports.AppliedFilters=Yr;exports.ArrayField=Oe;exports.Avatar=di;exports.BaseButtonComponent=Ve;exports.BaseComponent=je;exports.BaseSpanComponent=Ye;exports.BaseTextComponent=Ge;exports.Button=L;exports.Button$1=Se;exports.ButtonToolbarCenter=Ai;exports.ButtonToolbarRow=Pi;exports.ButtonToolbarStartRow=Li;exports.Calendar=St;exports.Calendar$1=Nt;exports.Calendar$2=Dt;exports.CalendarCell=Ct;exports.CalendarGrid=Fe;exports.CardHeader=Te;exports.CardWithImage=ui;exports.CardWithInput=nr;exports.CardWithOptions=Xt;exports.CardWithSelector=cr;exports.CardWithSwitch=gr;exports.Carousel=yr;exports.Checkbox=ie;exports.CodeSnippet=mr;exports.Col=Be;exports.ColumFilters=an;exports.ColumnsModal=Wr;exports.ComboBox=Ke;exports.ComboBoxField=We;exports.Container=y;exports.CustomThemeProvider=Bn;exports.DateField=It;exports.DateSelector=ge;exports.Description=dn;exports.Dialog=Ee;exports.Divider=re;exports.Dropdown=ta;exports.Editable=Ri;exports.EmptyButton=Je;exports.EmptyState=aa;exports.FilePreview=jt;exports.FilterControl=en;exports.FilterForm=_e;exports.FilterFormContent=tn;exports.FiltersList=rn;exports.Form=la;exports.Gap=Oi;exports.GridContainer=da;exports.GroupSelector=ga;exports.Header=Ne;exports.Header$1=Vt;exports.Heading=U;exports.Icon=T;exports.IconButton=O;exports.IndicatorCard=ua;exports.InfoSidebar=xa;exports.InnerForm=oa;exports.Input=De;exports.InputArray=Hi;exports.InputDate=Ft;exports.InputDateRange=Et;exports.InputDateTime=Di;exports.InputFile=Vi;exports.InputNumber=Lt;exports.InputNumberRange=Pt;exports.InputTags=Yi;exports.Label=qe;exports.Link=Q;exports.ListItem=ke;exports.ListItemsWrapper=qt;exports.LittleFlag=ha;exports.Loading=ka;exports.LocationCode=_t;exports.Logo=Sa;exports.Lottie=Ia;exports.MemoizedImage=Z;exports.Menu=Ta;exports.MenuItem=pn;exports.MessageBanner=Na;exports.Modal=sn;exports.ModalConfirm=zr;exports.ModalFooter=Ut;exports.Notification=Aa;exports.NotificationSign=Gt;exports.NumberField=Ie;exports.NumberInput=Wa;exports.OAuthSelector=Oa;exports.Option=vt;exports.OptionBoxContainer=tt;exports.OptionContainer=Ue;exports.OptionContainer$1=ln;exports.OutlineContainer=J;exports.PhoneInput=er;exports.PlanCard=No;exports.PopUp=Ya;exports.Popover=ve;exports.PremiumFeature=cn;exports.PreviewPanel=Kt;exports.PriorityScore=Ha;exports.ProgressBar=Ga;exports.RadioButton=Ze;exports.RecommendedTag=xn;exports.Row=Rt;exports.ScrollUpButton=Ka;exports.Search=ue;exports.SearchPanel=Qt;exports.SeverityBadge=Za;exports.SeverityOverview=eo;exports.SeverityOverviewBadge=de;exports.ShowOnHover=no;exports.SlideOutMenu=ro;exports.Slider=po;exports.Span=pe;exports.StepLapse=bo;exports.Tab=Yt;exports.TableButton=mo;exports.Tabs=et;exports.Tag=G;exports.TagsField=Me;exports.Text=z;exports.TextArea=tr;exports.Thumb=gn;exports.TimeField=Tt;exports.TimeLine=vo;exports.TimeLineCard=un;exports.Toggle=Mt;exports.ToggleButton=So;exports.Tooltip=V;exports.Tour=Io;exports.baseStep=zo;exports.formatCheckValues=on;exports.getStyledConfig=we;exports.hiddenProps=bt;exports.icons=Pn;exports.setBorder=be;exports.setDisplay=ye;exports.setInteraction=me;exports.setMargin=fe;exports.setPadding=xe;exports.setPosition=he;exports.setText=$e;exports.theme=I;exports.uniqueIcons=Wn;exports.useCarousel=Wt;exports.useClickOutside=ne;exports.useCloudinaryImage=Bt;exports.useColumnsModal=rr;exports.useConfirmDialog=Zr;exports.useDebouncedCallback=Ot;exports.useFilterForm=nn;exports.useFilters=Xr;exports.useModal=Re;exports.useSearch=ar;exports.variantBuilder=q;
|