@fluidattacks/design 3.16.15-pr → 3.16.15-pr-02
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/accordion/types.d.ts +0 -2
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/card-header/index.js +1 -1
- package/dist/components/card/card-with-image/index.js +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-options/index.js +1 -1
- package/dist/components/card/card-with-selector/index.js +1 -1
- package/dist/components/card/card-with-switch/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-array/field/index.js +1 -1
- package/dist/components/inputs/fields/input-array/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/layout/categories/buttons/index.js +1 -1
- package/dist/components/layout/categories/column/index.js +1 -1
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/lottie/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/modal/columns-modal/index.js +1 -1
- package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
- package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
- package/dist/components/modal/filters-modal/index.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/fixed-tabs/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tab/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle-buttons/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +1 -1
- package/dist/components/typography/heading/index.js +1 -1
- package/dist/components/typography/index.js +1 -1
- package/dist/components/typography/span/index.js +1 -1
- package/dist/components/typography/text/index.js +1 -1
- package/dist/{components-BDVdJaUe.js → components-CliLlinD.js} +67 -67
- package/dist/{components--s3hPWaA.mjs → components-VpkqvEWD.mjs} +622 -630
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),f=require("react"),s=require("./vendor-Dh2BdSxp.js"),ie=require("react-dom"),De=require("react-router-dom"),K=e=>({getVariant:(n,i)=>e(n)[i]}),dt=["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"],bn={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},$n={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},yn={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},mn={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},wn={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),f=require("react"),s=require("./vendor-Dh2BdSxp.js"),ie=require("react-dom"),De=require("react-router-dom"),K=e=>({getVariant:(n,i)=>e(n)[i]}),dt=["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"],bn={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},$n={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},yn={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},mn={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},wn={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},jn={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},vn={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},kn={"01":"linear-gradient(45deg, #f32637 0%, #b8075d 100%)","02":"linear-gradient(45deg, #fcfcfd 0%, #667085 100%)"},Cn={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"}},Sn={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)"},zn={mobile:"480px",tablet:"960px",sm:"1024px",md:"1440px",lg:"1920px"},In={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"},Tn=["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"],Fn=[["fal","arrow-down"],["fal","arrow-left"],["fal","arrow-right"],["fal","arrow-up"],["fal","plus"],["fal","minus"],["fas","check"],["fas","circle-question"]],z={typography:Cn,shadows:Sn,breakpoints:zn,spacing:In,palette:{primary:$n,complementary:yn,error:mn,info:vn,warning:wn,success:jn,black:"#0c111d",white:"#ffffff",gray:bn,gradients:kn}},Nn=({children:e})=>t.jsx(s.ot,{theme:z,children:e}),F=(e,n)=>n===void 0?"":`${e}: ${n};`,de=e=>{const n=e.py??e.pt??0,i=e.px??e.pr??0,a=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[o,l,c,d]=e.padding;return`padding: ${z.spacing[o]} ${z.spacing[l]} ${z.spacing[c]} ${z.spacing[d]};`}return`padding: ${z.spacing[n]} ${z.spacing[i]} ${z.spacing[a]} ${z.spacing[r]};`},pe=e=>{const n=e.my??e.mt??0,i=e.mx??e.mr??0,a=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[o,l,c,d]=e.margin;return`margin: ${z.spacing[o]} ${z.spacing[l]} ${z.spacing[c]} ${z.spacing[d]};`}return`margin: ${z.spacing[n]} ${z.spacing[i]} ${z.spacing[a]} ${z.spacing[r]};`},ge=e=>{const n=F("position",e.position),i=F("top",e.top),a=F("right",e.right),r=F("bottom",e.bottom),o=F("left",e.left),l=F("z-index",e.zIndex);return`
|
|
2
2
|
${n}
|
|
3
3
|
${i}
|
|
4
4
|
${a}
|
|
5
5
|
${r}
|
|
6
6
|
${o}
|
|
7
7
|
${l}
|
|
8
|
-
`},ue=e=>{const n=
|
|
8
|
+
`},ue=e=>{const n=F("border",e.border),i=F("border-top",e.borderTop),a=F("border-right",e.borderRight),r=F("border-bottom",e.borderBottom),o=F("border-left",e.borderLeft),l=F("border-color",e.borderColor),c=F("border-radius",e.borderRadius);return`
|
|
9
9
|
${n}
|
|
10
10
|
${i}
|
|
11
11
|
${a}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`},En=e=>e.includes("x")?"overflow-x: auto;":"",Rn=e=>e.includes("y")?"overflow-y: auto;":"",xe=e=>{const n=e.scroll?`
|
|
17
17
|
${En(e.scroll)}
|
|
18
18
|
${Rn(e.scroll)}
|
|
19
|
-
`:"",i=
|
|
19
|
+
`:"",i=F("visibility",e.visibility),a=F("display",e.display),r=F("height",e.height),o=F("width",e.width),l=F("max-height",e.maxHeight),c=F("max-width",e.maxWidth),d=F("min-height",e.minHeight),p=F("min-width",e.minWidth),g=F("box-shadow",e.shadow?z.shadows[e.shadow]:void 0),x=F("gap",e.gap===void 0?void 0:z.spacing[e.gap]),u=F("background-color",e.bgColor),h=F("background",e.bgGradient),b=F("flex-direction",e.flexDirection),m=F("flex-grow",e.flexGrow),w=F("justify-content",e.justify),y=F("justify-self",e.justifySelf),j=F("align-items",e.alignItems),v=F("align-self",e.alignSelf),k=F("flex-wrap",e.wrap);return`
|
|
20
20
|
${n}
|
|
21
21
|
${i}
|
|
22
22
|
${a}
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
${d}
|
|
28
28
|
${p}
|
|
29
29
|
${g}
|
|
30
|
-
${x}
|
|
31
|
-
${h}
|
|
32
30
|
${u}
|
|
31
|
+
${h}
|
|
32
|
+
${x}
|
|
33
33
|
${b}
|
|
34
34
|
${m}
|
|
35
35
|
${w}
|
|
36
36
|
${y}
|
|
37
|
-
${v}
|
|
38
37
|
${j}
|
|
38
|
+
${v}
|
|
39
39
|
${k}
|
|
40
|
-
`},fe=e=>{const n=
|
|
40
|
+
`},fe=e=>{const n=F("color",e.color),i=F("font-family",e.fontFamily),a=F("font-size",e.fontSize),r=F("font-weight",e.fontWeight),o=F("line-spacing",e.letterSpacing),l=F("line-height",e.lineSpacing),c=F("text-align",e.textAlign),d=F("text-decoration",e.textDecoration),p=F("text-overflow",e.textOverflow),g=F("white-space",e.whiteSpace),x=F("word-break",e.wordBreak),u=F("word-wrap",e.wordWrap);return`
|
|
41
41
|
${n}
|
|
42
42
|
${i}
|
|
43
43
|
${a}
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
${d}
|
|
49
49
|
${p}
|
|
50
50
|
${g}
|
|
51
|
-
${u}
|
|
52
51
|
${x}
|
|
53
|
-
|
|
52
|
+
${u}
|
|
53
|
+
`},he=e=>{const n=F("cursor",e.cursor),i=F("border-color",e.borderColorHover),a=F("background-color",e.bgColorHover),r=F("box-shadow",e.shadowHover===void 0?void 0:z.shadows[e.shadowHover]),o=F("transition",e.transition);return`
|
|
54
54
|
${n}
|
|
55
55
|
|
|
56
56
|
&:hover {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
111
|
`,$=f.forwardRef(function({as:n="div",center:i,children:a,id:r,onHover:o,onLeave:l,styleMd:c,styleSm:d,...p},g){return t.jsx(Dn,{$center:i,$styleMd:c,$styleSm:d,as:n,id:r,onMouseLeave:l,onMouseOver:o,ref:g,...p,children:a})}),Ln=s.dt(Ve)`
|
|
112
|
-
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$overflow:p,$size:g,$sizeMd:
|
|
112
|
+
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$overflow:p,$size:g,$sizeMd:x,$sizeSm:u,$textFill:h="unset",$whiteSpace:b="pre-line",$wordBreak:m="normal"})=>`
|
|
113
113
|
background: ${n};
|
|
114
114
|
color: ${i};
|
|
115
115
|
display: ${a};
|
|
@@ -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[
|
|
133
|
+
font-size: ${e.typography.heading[x??g]};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
137
|
-
font-size: ${e.typography.heading[
|
|
137
|
+
font-size: ${e.typography.heading[u??g]};
|
|
138
138
|
line-height: ${e.spacing[d??c]};
|
|
139
139
|
}
|
|
140
140
|
`}
|
|
141
141
|
`,pt=s.dt(Ve)`
|
|
142
|
-
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$letterSpacing:l=0,$lineSpacing:c=1.25,$lineSpacingSm:d,$overflow:p,$size:g,$sizeMd:
|
|
142
|
+
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$letterSpacing:l=0,$lineSpacing:c=1.25,$lineSpacingSm:d,$overflow:p,$size:g,$sizeMd:x,$sizeSm:u,$textFill:h="unset",$whiteSpace:b="pre-line",$wordBreak:m="normal"})=>`
|
|
143
143
|
background: ${n};
|
|
144
144
|
color: ${i};
|
|
145
145
|
display: ${a};
|
|
@@ -160,11 +160,11 @@
|
|
|
160
160
|
and (min-width: ${e.breakpoints.mobile})
|
|
161
161
|
and (max-width: ${e.breakpoints.tablet})
|
|
162
162
|
{
|
|
163
|
-
font-size: ${e.typography.text[
|
|
163
|
+
font-size: ${e.typography.text[x??g]};
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
167
|
-
font-size: ${e.typography.text[
|
|
167
|
+
font-size: ${e.typography.text[u??g]};
|
|
168
168
|
line-height: ${e.spacing[d??c]};
|
|
169
169
|
}
|
|
170
170
|
`}
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
|
|
182
182
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
183
183
|
`}
|
|
184
|
-
`,V=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:
|
|
184
|
+
`,V=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:x,size:u,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:w,wordBreak:y,...j},v){return t.jsx(Ln,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:x,$size:u,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:w,$wordBreak:y,className:a,ref:v,...j,children:i})}),se=f.forwardRef(function({children:n,color:i,content:a,display:r,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:x,sizeSm:u,...h},b){return t.jsx(Pn,{$color:i,$content:a,$display:r,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:x,$sizeSm:u,ref:b,...h,children:n})}),S=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:x,size:u,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:w,wordBreak:y,...j},v){return t.jsx(pt,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:x,$size:u,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:w,$wordBreak:y,className:a,ref:v,...j,children:i})}),gt=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(S,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[n,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},An={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Wn=s.dt(Ue)`
|
|
185
185
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:a,$rotation:r,$size:o,$secondaryColor:l})=>{const c=a?"":"brightness(50%)",d=a??"";return`
|
|
186
186
|
color: ${n};
|
|
187
187
|
cursor: ${e?"pointer":"inherit"};
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
&:hover:not([disabled]) {
|
|
218
218
|
transform: scale(1.2);
|
|
219
219
|
}
|
|
220
|
-
`;const I=f.forwardRef(function({clickable:n,disabled:i,hoverColor:a,icon:r,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:
|
|
220
|
+
`;const I=f.forwardRef(function({clickable:n,disabled:i,hoverColor:a,icon:r,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:x,rotation:u,spanClass:h,secondaryColor:b,...m},w){return t.jsx(Wn,{$clickable:n,$color:l,$disabled:i,$hoverColor:a,$rotation:u,$secondaryColor:b,$size:d,className:h,"data-testid":`${r}-icon`,onClick:x,ref:w,...m,children:t.jsx("i",{className:`${g} fa-${r} ${o}`,...c!==void 0?{"data-fa-mask":c}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${r}`)}),Bn=f.forwardRef(function({aligned:n="end",items:i,bgColor:a},r){const o=s.nt(),[l,c]=f.useState(!1),[d,p]=f.useState(-1),g=f.useCallback(x=>()=>{p(x),c(x===d?u=>!u:!0)},[d]);return t.jsx($,{ref:r,children:i.map((x,u)=>{const h=u===d&&l;return t.jsxs($,{bgColor:a??o.palette.white,children:[t.jsx($,{"aria-controls":`panel-${x.title}`,"aria-expanded":l,"aria-label":x.title,as:"button",bgColor:a??o.palette.white,bgColorHover:o.palette.gray[100],borderBottom:h||u===i.length-1?"1px solid":void 0,borderColor:o.palette.gray[200],borderTop:"1px solid",cursor:"pointer",display:"flex",onClick:g(u),padding:[.75,.75,.75,.75],width:"100%",children:t.jsxs($,{as:"summary",display:"flex",flexDirection:n==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[t.jsx(S,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:x.title}),t.jsx(I,{icon:h?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),h&&t.jsx(gt,{item:x})]},x.title)})})}),Mn=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:On}=K(e=>({error:`
|
|
221
221
|
background: ${e.palette.error[50]};
|
|
222
222
|
border: 1px solid ${e.palette.error[500]};
|
|
223
223
|
color: ${e.palette.error[700]};
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
color: ${e.palette.warning[700]};
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
`})),
|
|
272
|
+
`})),Hn=s.dt.div`
|
|
273
273
|
${({theme:e,$variant:n})=>`
|
|
274
274
|
background: transparent;
|
|
275
275
|
align-items: center;
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
background-color: transparent;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
${
|
|
292
|
+
${On(e,n??"error")}
|
|
293
293
|
`}
|
|
294
294
|
`,_n=s.dt.div`
|
|
295
295
|
padding-right: 4px;
|
|
@@ -417,7 +417,7 @@
|
|
|
417
417
|
width: max-content;
|
|
418
418
|
z-index: 999999;
|
|
419
419
|
`}
|
|
420
|
-
`,Y=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:
|
|
420
|
+
`,Y=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:x="",title:u="",hide:h=x===""&&u===""&&p===void 0,width:b})=>{const m=s.nt(),[w,y]=f.useState(!1),{refs:j,floatingStyles:v,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:y,open:w,placement:g,whileElementsMounted:s.autoUpdate}),T=s.useHover(k,{delay:{close:0,open:500},move:!1}),R=s.useFocus(k),C=s.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:N,getFloatingProps:L}=s.useInteractions([T,R,C]);return n?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Gn,{...N(),display:i,height:a,id:c,ref:j.setReference,width:b,children:r?t.jsx(I,{clickable:!0,disabled:n,icon:r,iconColor:o,iconSize:l??"xxs",iconType:w?"fa-solid":"fa-light"}):e}),w&&!h&&ie.createPortal(t.jsxs(Yn,{...L(),$maxWidth:d,id:`floating-${c}`,ref:j.setFloating,style:v,children:[s.lodashExports.isEmpty(u)?void 0:t.jsx(S,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(x)?void 0:t.jsx(S,{color:m.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},B=f.forwardRef(function({borderRadius:n,disabled:i,icon:a,iconColor:r,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:x,py:u,type:h="button",tooltip:b,tooltipPlace:m,value:w,variant:y="primary",...j},v){const k=t.jsx(Un,{$borderRadius:n,$px:x,$py:u,$variant:y,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:p,onClick:g,ref:v,type:h,value:w,...j,children:t.jsx(I,{clickable:!1,icon:a,iconColor:r,iconSize:o,iconTransform:l,iconType:c})}),R=(h+(y??"")+(d??a)).replace(/ /u,"_");return b===void 0?k:t.jsx(Y,{id:`${R}-tooltip`,place:m,tip:b,children:k})}),qn=f.forwardRef(function({autoHide:n=!1,children:i,closable:a=!1,onTimeOut:r,show:o=!0,time:l=8,variant:c="error",id:d,...p},g){const[x,u]=f.useState(o),h=f.useCallback(()=>{u(!1)},[]);return f.useEffect(()=>{const b=setTimeout(()=>{r==null||r(!0),n&&h()},l*1e3);return()=>{clearTimeout(b)}},[n,h,l,r]),f.useEffect(()=>{u(o)},[o,u]),t.jsx($,{display:x?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(Hn,{$variant:c,id:d,children:[t.jsx(I,{clickable:!1,icon:Mn(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(_n,{children:i}),a?t.jsx(B,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),et=s.dt.div`
|
|
421
421
|
${({theme:e})=>`
|
|
422
422
|
align-items: center;
|
|
423
423
|
background-color: ${e.palette.gray[200]};
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
${xt}
|
|
636
636
|
`,ei=s.dt(De.Link)`
|
|
637
637
|
${xt}
|
|
638
|
-
`,Q=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(I,{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(Qn,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(ei,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},X=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:
|
|
638
|
+
`,Q=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(I,{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(Qn,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(ei,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},X=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:x="",tagLabel:u,variant:h="default"})=>{const b=u.length>25&&s.lodashExports.isEmpty(x+o),m=`${u.slice(0,25)}...`;return t.jsxs(se,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(Jn,{$fontSize:l,$variant:h,className:g,children:[n&&t.jsx(I,{icon:n,iconColor:i,iconSize:"xxs",iconType:a}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:x}),t.jsx("span",{children:b?m:u}),t.jsx("strong",{className:"w-full",children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(Q,{href:c,children:d})]})},ti=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},P=f.forwardRef(function({children:n,disabled:i=!1,external:a=!1,fontSize:r,href:o,id:l,icon:c,name:d,onClick:p,showArrow:g=!1,tag:x,type:u="button",tooltip:h,tooltipPlace:b="bottom",underline:m=!1,value:w,variant:y="primary",width:j,...v},k){const T=h!==void 0,R=`${l}-tooltip`,C=f.useCallback(()=>{o&&ti(o,a)},[a,o]),N=t.jsxs(ut,{$size:r,$variant:y,"aria-disabled":i,className:m?"underline":void 0,disabled:i,id:l,name:d,onClick:y==="link"?C:p,ref:k,type:u,value:w,width:j,...T?{"data-tooltip-id":R}:{},...v,children:[c!==void 0&&t.jsx(I,{icon:c,iconSize:"xs",iconType:"fa-light"}),n,(g||y==="link")&&t.jsx(I,{icon:"arrow-right",iconSize:"xs",iconType:"fa-light"}),x===void 0?null:t.jsx(X,{tagLabel:x,variant:"default"})]});return T?t.jsx(Y,{disabled:!T,id:R,place:b,tip:h,width:j,children:N}):N}),ni=f.forwardRef(function({children:n,onClick:i,userName:a,showIcon:r=!1,showUsername:o=!1},l){const c=!!i;return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(P,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(et,{children:a[0].toUpperCase()}),o?t.jsx(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:a.split(" ")[0]}):void 0,r?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(et,{children:a[0].toUpperCase()}),o?t.jsxs(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",a.split(" ")[0],"!"]}):void 0,r?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(Kn,{children:n})]})})}),Se=({authorEmail:e,date:n,description:i,descriptionColor:a,id:r,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs($,{width:"100%",children:[typeof o=="string"?t.jsx(S,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:c,wordBreak:"break-word",children:o}):o,t.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(S,{color:a??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:i}),n&&t.jsx(S,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(S,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(Y,{icon:"circle-info",id:r,tip:p})]})]})},tt=s.dt($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
639
639
|
& img {
|
|
640
640
|
display: block;
|
|
641
641
|
}
|
|
@@ -650,7 +650,7 @@
|
|
|
650
650
|
pointer-events: none;
|
|
651
651
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
652
652
|
}
|
|
653
|
-
`,ii=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},ri=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,ii(n)),ft=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const
|
|
653
|
+
`,ii=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},ri=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,ii(n)),ft=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const x=g.target,u=x.currentTime/x.duration*100;u>5&&u<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):u>=50&&u<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):u>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return n==="video"||ri(["webm"],r)?t.jsx(tt,{$opacity:a,children:t.jsx(Q,{href:r,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:o,width:i},children:[t.jsx("source",{src:r,type:"video/webm"}),r]})})}):t.jsx(tt,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:i}})})},ai=({alt:e,authorEmail:n,date:i,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:x=!0,videoViewStatus:u})=>{const h=s.nt(),[b,m]=f.useState(!1),w=f.useCallback(()=>{m(!0)},[]),y=f.useCallback(()=>{m(!1)},[]);return t.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:w,onLeave:y,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(f.Fragment,{children:[t.jsx(ft,{alt:e,fileType:g,height:"147px",opacity:b?.3:0,src:r,videoViewStatus:u,width:"100%"}),x?t.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(B,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),p?null:t.jsx(Se,{authorEmail:n,date:i,description:a,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},oi=s.dt.div`
|
|
654
654
|
${({theme:e,$align:n="center",$minWidth:i="auto",$minHeight:a="auto"})=>`
|
|
655
655
|
display: flex;
|
|
656
656
|
background-color: ${e.palette.white};
|
|
@@ -812,7 +812,7 @@
|
|
|
812
812
|
border: 1px solid ${e.palette.gray[600]};
|
|
813
813
|
}
|
|
814
814
|
`}
|
|
815
|
-
`,
|
|
815
|
+
`,H=({children:e,error:n,helpLink:i,helpLinkText:a="Link here",helpText:r,htmlFor:o,label:l,linkPosition:c="down",maxLength:d,required:p,tooltip:g,value:x,weight:u})=>{const h=s.nt(),b=x?x.length:0;return t.jsxs(si,{children:[l===void 0?void 0:t.jsx(Ge,{htmlFor:o,label:l,link:c==="up"?i:void 0,required:p,tooltip:g,weight:u}),e,n||d?t.jsxs($,{display:"flex",justify:n===void 0?"end":"space-between",width:"100%",children:[n&&t.jsx(S,{className:"error-msg",color:h.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:n}),d&&t.jsx(X,{priority:"low",tagLabel:`${b}/${d}`,variant:"error"})]}):void 0,r||i?t.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[r&&t.jsxs(t.Fragment,{children:[t.jsx(I,{icon:"circle-info",iconColor:h.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(S,{color:h.palette.gray[400],display:"inline-block",size:"sm",children:r})]}),i&&c==="down"?t.jsx(Q,{href:i,children:a}):void 0]}):void 0]})},ye=({className:e,children:n,isFilter:i=!1,popoverRef:a,state:r,triggerRef:o,...l})=>{var x;const c=f.useRef(null),d=(x=o==null?void 0:o.current)==null?void 0:x.getBoundingClientRect(),{popoverProps:p}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:a??c,triggerRef:o,isNonModal:a?!0:void 0},r),g=f.useCallback(u=>{u.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,id:"popover",onPointerDown:i?g:void 0,ref:a??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:n})})},li=s.dt.ul`
|
|
816
816
|
${({theme:e})=>`
|
|
817
817
|
align-self: center;
|
|
818
818
|
background: ${e.palette.white};
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
`}
|
|
865
|
-
`,ht=({item:e,state:n})=>{const i=s.nt(),a=f.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(ci,{...r,className:d,ref:a,children:[t.jsx(S,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(I,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Le=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:
|
|
865
|
+
`,ht=({item:e,state:n})=>{const i=s.nt(),a=f.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(ci,{...r,className:d,ref:a,children:[t.jsx(S,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(I,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Le=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:x,placeholder:u,required:h,tooltip:b,value:m,weight:w})=>{var Qe;const y=s.nt(),j=n?void 0:i,v=(e==null?void 0:e.value)??m,[k,T]=f.useState(((Qe=p.find(D=>D.value===v))==null?void 0:Qe.name)??""),[R,C]=f.useState(v),[N,L]=f.useState(p),[E,A]=f.useState(!1),{contains:U}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),G=f.useRef(null),J=f.useRef(null),W=f.useRef(null),O=f.useRef(null),M=f.useRef(null),Re=f.useMemo(()=>p.map(D=>U(D.name,k)||E?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:D.name},D.value):null),[U,k,p,E]),cn=f.useCallback(D=>{T(D),D===""?A(!0):(A(!1),C(_=>{const q=D===""?"":_;return e&&e.onChange(q),x&&x(D),q}),L(p.filter(_=>U(_.name,D))))},[U,p,e,x]),dn=f.useCallback(D=>{var _;T(((_=p.find(q=>q.value===D))==null?void 0:_.name)??""),C(D?String(D):""),e&&e.onChange(D),x&&x(D?String(D):""),L(p)},[p,e,x]),Ze=f.useCallback(D=>{D.key==="Enter"&&D.preventDefault(),A(!1)},[]),pn=f.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),Z=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:k,items:N,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:R,onBlur:pn,onInputChange:cn,onKeyDown:Ze,onKeyUp:()=>{A(!0)},onOpenChange(D,_){A(D&&(_==="manual"||_==="focus")),D&&setTimeout(()=>{var q;return(q=G.current)==null?void 0:q.focus()},50)},onSelectionChange:dn,children:Re}),{buttonProps:gn,inputProps:un,listBoxProps:xn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:k,buttonRef:J,id:d,inputRef:G,label:l??d,listBoxRef:W,name:d,placeholder:u,popoverRef:M},Z),{listBoxProps:fn}=s.$c132121280ec012d$export$50eacbbf140a3141(xn,Z,W),{buttonProps:hn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(gn,J);return f.useEffect(()=>{var D;if(c===!1||!v){const _=((D=p.find(q=>q.value===v))==null?void 0:D.name)??"";T(_),C(_)}},[v,p,c]),t.jsxs(H,{error:j,helpLink:a,helpLinkText:r,helpText:o,htmlFor:d,label:l,required:h,tooltip:b,weight:w,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${j?"error":""}`,ref:O,children:[t.jsx("input",{...un,"aria-invalid":j?"true":"false","aria-label":d,disabled:n,onKeyDown:Ze,ref:G}),j?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}):void 0,t.jsx(B,{...hn,className:"action",disabled:n,icon:Z.isOpen&&!n?"chevron-up":"chevron-down",iconColor:y.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:J,type:"button",variant:"ghost"})]}),Z.isOpen&&Z.collection.size>0&&!n?t.jsx(ye,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:M,state:Z,triggerRef:O,children:t.jsx(li,{...fn,ref:W,children:[...Z.collection].map(D=>t.jsx(ht,{item:D,state:Z},D.key))})}):null]})},bt=({control:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:x,placeholder:u,required:h,tooltip:b,value:m,weight:w})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:y,fieldState:j})=>{var v;return t.jsx(Le,{disabled:n,error:(v=j.error)==null?void 0:v.message,field:y,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:x,placeholder:u,required:h,tooltip:b,value:m,weight:w})},rules:{required:h}}):t.jsx(Le,{disabled:n,error:i,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:x,placeholder:u,required:h,tooltip:b,value:m,weight:w}),di=s.dt.div`
|
|
866
866
|
${({theme:e})=>`
|
|
867
867
|
align-items: center;
|
|
868
868
|
color: ${e.palette.gray[800]};
|
|
@@ -994,9 +994,9 @@
|
|
|
994
994
|
padding: 0 ${e.spacing[.25]};
|
|
995
995
|
width: 100%;
|
|
996
996
|
`}
|
|
997
|
-
`,yt=({state:e,date:n})=>{const i=f.useRef(null),a=s.$14e0f24ef4ac5c92$export$629b0a497aa65267(n,s.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:o,isSelected:l,isDisabled:c,formattedDate:d}=s.$36a0ac60f04457c5$export$136073280381448e({date:n},e,i),p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,
|
|
997
|
+
`,yt=({state:e,date:n})=>{const i=f.useRef(null),a=s.$14e0f24ef4ac5c92$export$629b0a497aa65267(n,s.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:o,isSelected:l,isDisabled:c,formattedDate:d}=s.$36a0ac60f04457c5$export$136073280381448e({date:n},e,i),p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,x=l&&!c&&!(p||g)?"range":"";return t.jsx(ui,{id:x,...r,children:t.jsxs("div",{...o,className:`cell ${p||g?"selected":""}
|
|
998
998
|
${c?"disabled":""} ${a?"today":""}
|
|
999
|
-
${!e.isFocused&&!a?"focused":""} ${
|
|
999
|
+
${!e.isFocused&&!a?"focused":""} ${x}`,ref:i,children:[d,a?t.jsx(xi,{children:t.jsx(I,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},ze=({state:e,...n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{weekDays:a}=s.$e3031d1f8c9d64eb$export$cb95147730a423f5(n,e),r=s.$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(e.visibleRange.start,i);return t.jsxs("table",{children:[t.jsx("thead",{children:t.jsx(nt,{children:a.map((o,l)=>{const c=`key_${l}`;return t.jsx(gi,{children:o},c)})})}),t.jsx("tbody",{children:[...new Array(r).keys()].map(o=>t.jsx(nt,{children:e.getDatesInWeek(o).map((l,c)=>{const d=`key_${c}`;return l?t.jsx(yt,{date:l,state:e},d):t.jsx("td",{},d)})},o))})]})},fi=s.dt(_e)`
|
|
1000
1000
|
align-items: center;
|
|
1001
1001
|
background-color: inherit;
|
|
1002
1002
|
border-color: inherit;
|
|
@@ -1094,7 +1094,7 @@
|
|
|
1094
1094
|
font-weight: ${e.typography.weight.bold};
|
|
1095
1095
|
}
|
|
1096
1096
|
`}
|
|
1097
|
-
`,
|
|
1097
|
+
`,ve=({disabled:e=!1,icon:n,props:i})=>{const a=f.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,a);return t.jsx(bi,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(I,{icon:n,iconColor:z.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:n,nextButtonProps:i,title:a})=>{const r=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=f.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:n}),t.jsxs(di,{children:[a,t.jsxs(pi,{children:[t.jsx(it,{"aria-label":"top",onClick:o,children:t.jsx(I,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(it,{"aria-label":"bottom",onClick:l,children:t.jsx(I,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(ve,{icon:"chevron-right",props:i})]})},mt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(ze,{state:a}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wt=({segment:e,state:n})=>{const i=s.nt(),a=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,a),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},jt=({disabled:e,error:n=!1,props:i})=>{const a=s.nt(),r=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,r),c=f.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(x=>x.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs($i,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:a.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(wt,{segment:{...d,isEditable:!e},state:o},g)})}),n?t.jsx(I,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},vt=e=>{const n=f.useRef(null),i=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=i,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=f.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=f.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(a)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[o,i,a]);return t.jsxs(yi,{children:[t.jsx(rt,{...c,ref:n,children:i.segments.slice(0,-2).map((p,g)=>{const x=`key_${g}`;return t.jsx(wt,{segment:p,state:i},x)})}),t.jsxs(rt,{children:[t.jsx(at,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(at,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",mi=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",ot=(e,n)=>s.dayjs(String(e).replace(/-/gu,"/")).hour(n.hour).minute(n.minute).second(n.second).format("YYYY/MM/DD hh:mm A"),le=({error:e,buttonProps:n,datePickerRef:i,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:x})=>{const u=f.useCallback(h=>{const b=r==="day"?ke(String(h)):mi(String(h));o.onChange&&o.onChange(h??null),g&&g(c,b)},[o,r,c,g]);return t.jsxs(ee,{...l,className:`${a?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(jt,{disabled:a,error:e!=null,props:{...o,autoFocus:!1,granularity:r,onChange:u,shouldForceLeadingZeros:!0}}),t.jsx(ve,{disabled:a,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:a,id:c,name:c,type:"text",value:x??""})]})},Te=({children:e,...n})=>{const i=f.useRef(null),{dialogProps:a}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(hi,{...a,ref:i,children:e})},kt=({disabled:e=!1,error:n,helpLink:i,helpLinkText:a,helpText:r,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:x,...u})=>{const h=f.useRef(null),b=x==null?void 0:x(c),m=f.useCallback(C=>{p&&C&&p(c,ke(String(C)))},[c,p]),w=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...u,onChange(C){m(C)},value:s._.isNil(b)||s._.isEmpty(b)||b==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}),{close:y}=w,{groupProps:j,fieldProps:v,buttonProps:k,dialogProps:T,calendarProps:R}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...u,"aria-label":l??c,name:c},w,h);return t.jsxs(H,{error:n,helpLink:i,helpLinkText:a,helpText:r,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(le,{buttonProps:k,datePickerRef:h,disabled:e,error:n,fieldProps:v,groupProps:j,name:c,register:d,required:o,setValue:p,value:b}),w.isOpen&&!e?t.jsx(ye,{offset:8,placement:"bottom start",state:w,triggerRef:h,children:t.jsx(Te,{...T,children:t.jsx(mt,{onClose:y,props:R})})}):null]})},Ct=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=f.useRef(null),r=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(n,r,a);return t.jsxs("div",{className:"calendar-range",ref:a,children:[t.jsx(Ie,{nextButtonProps:l,prevButtonProps:o,state:r,title:c}),t.jsx(ze,{state:r}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wi=s.dt.div`
|
|
1098
1098
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1099
1099
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1100
1100
|
display: flex;
|
|
@@ -1105,7 +1105,7 @@
|
|
|
1105
1105
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1106
1106
|
}
|
|
1107
1107
|
`}
|
|
1108
|
-
`,St=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...
|
|
1108
|
+
`,St=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...x})=>{const u=`${a}Max`,h=`${a}Min`,b=f.useRef(null),m=f.useCallback(N=>{c&&N&&(c((d==null?void 0:d.name)??u,ke(String(N.end))),c((p==null?void 0:p.name)??h,ke(String(N.start))))},[u,h,c,d,p]),w=s.$93c38a5e28be6249$export$e50a61c1de9f574({...x,endName:(d==null?void 0:d.name)??u,startName:(p==null?void 0:p.name)??h,onChange(N){m(N)}}),{close:y}=w,{groupProps:j,startFieldProps:v,endFieldProps:k,buttonProps:T,dialogProps:R,calendarProps:C}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...x,"aria-label":i??a},w,b);return t.jsxs(H,{error:n,htmlFor:a,label:i,required:r,tooltip:o,children:[t.jsxs(wi,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(le,{buttonProps:T,datePickerRef:b,disabled:e,error:n,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${a}`,validate:N=>k.value&&N>k.value?"Start date must be less than or equal to end date":null},groupProps:j,name:(p==null?void 0:p.name)??h,register:l,setValue:c,value:p==null?void 0:p.value}),t.jsx(le,{buttonProps:T,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${a}`,validate:N=>v.value&&N<v.value?"End date must be greater than or equal to start date":null},groupProps:j,name:(d==null?void 0:d.name)??u,register:l,setValue:c,value:d==null?void 0:d.value})]}),w.isOpen&&!e?t.jsx(ye,{offset:8,placement:"bottom start",state:w,triggerRef:b,children:t.jsx(Te,{...R,children:t.jsx(Ct,{onClose:y,props:C})})}):null]})},ji=s.dt.div`
|
|
1109
1109
|
${({theme:e})=>`
|
|
1110
1110
|
align-items: center;
|
|
1111
1111
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1114,19 +1114,19 @@
|
|
|
1114
1114
|
justify-content: center;
|
|
1115
1115
|
padding: ${e.spacing[.5]} ${e.spacing[1.25]};
|
|
1116
1116
|
`}
|
|
1117
|
-
`,
|
|
1117
|
+
`,vi=s.dt.div`
|
|
1118
1118
|
align-items: center;
|
|
1119
1119
|
display: flex;
|
|
1120
1120
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1121
1121
|
justify-content: flex-end;
|
|
1122
1122
|
flex: 1 0 0;
|
|
1123
|
-
`,zt=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(
|
|
1123
|
+
`,zt=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(ji,{children:[t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(vi,{children:t.jsx(vt,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ye,{children:t.jsx(P,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ki=e=>{const{disabled:n=!1,error:i,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),x=f.useRef(null),u=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"||s.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=u,{groupProps:b,fieldProps:m,buttonProps:w,dialogProps:y,calendarProps:j}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,u,x),v=f.useCallback(T=>{if(j.onChange&&j.onChange(T),u.timeValue){const R=ot(T,u.timeValue);d==null||d(o,R,{shouldDirty:!0})}else u.setDateValue(T)},[j,o,d,u]),k=f.useCallback(T=>{if(T){u.setTimeValue(T);const R=u.dateValue;if(R){const C=ot(R,T);d==null||d(o,C,{shouldDirty:!0})}}},[u,d,o]);return t.jsxs(H,{error:i,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(le,{buttonProps:w,datePickerRef:x,disabled:n,error:i,fieldProps:m,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:g}),u.isOpen&&!n?t.jsx(ye,{offset:8,placement:"bottom start",state:u,triggerRef:x,children:t.jsx(Te,{...y,children:t.jsx(zt,{handleTimeChange:k,onClose:h,props:{...j,onChange:v},timeState:u})})}):null]})},Ci=({children:e,currentValue:n,externalLink:i,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs($,{children:[t.jsx(Ge,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Q,{href:d,children:c}):t.jsx(S,{size:"md",children:c})]})},Fe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:a,helpText:r,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:x,name:u,maskValue:h=!1,onPaste:b,placeholder:m,removeItemArray:w,register:y,suggestions:j,tooltip:v,type:k="text",weight:T,...R})=>{const{required:C,onBlur:N,onChange:L}=R,E=s.nt(),A=e?void 0:o,[U,G]=f.useState(""),J=f.useCallback(M=>{G(M.target.value),L==null||L(M)},[L]),W=d&&p&&!e&&U.trim()!=="",O=f.useCallback(M=>{M.key==="Enter"&&M.preventDefault()},[]);return t.jsxs(H,{error:A,helpLink:i,helpLinkText:a,helpText:r,htmlFor:u,label:g,linkPosition:x,required:C,tooltip:v,weight:T,children:[t.jsxs(ee,{className:`
|
|
1124
1124
|
${e?"disabled":""} ${A?"error":""} ${W?"success":""}
|
|
1125
|
-
`,children:[n?t.jsx(I,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":A?"true":"false","aria-label":
|
|
1125
|
+
`,children:[n?t.jsx(I,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":A?"true":"false","aria-label":u,"aria-required":C,autoComplete:"off",className:h?"sr-block":"","data-testid":`${u}-input`,disabled:e,id:u,list:j?`list_${u}`:void 0,onKeyDown:O,onPaste:b,placeholder:m,type:k,...y?y(u,{required:C,onBlur:N,onChange:J}):{...R,onChange:J}}),A?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"xs"}):void 0,W?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:E.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&c>0?t.jsx(B,{color:E.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:w?w(c):void 0,variant:"ghost"}):void 0]}),j?t.jsx("datalist",{id:`list_${u}`,children:j.map(M=>t.jsx("option",{value:M},M))}):void 0]})},Si=s.dt.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,zi=s.dt.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1126
1126
|
gap: 12px;
|
|
1127
1127
|
`,Ii=s.dt.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1128
1128
|
gap: 8px;
|
|
1129
|
-
`,
|
|
1129
|
+
`,je=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,Ti=s.dt.div.attrs({className:"comp-col"})`
|
|
1130
1130
|
word-wrap: break-word;
|
|
1131
1131
|
|
|
1132
1132
|
${({$width:e=null})=>e===null?"":`width: ${e}`};
|
|
@@ -1134,18 +1134,18 @@
|
|
|
1134
1134
|
${({$paddingTop:e})=>`padding-top: ${e??0}px;`}
|
|
1135
1135
|
|
|
1136
1136
|
@media (width <= 768px) {
|
|
1137
|
-
${({$sm:e})=>
|
|
1137
|
+
${({$sm:e})=>je(e)}
|
|
1138
1138
|
}
|
|
1139
1139
|
|
|
1140
1140
|
@media (width >= 768px) and (width <= 992px) {
|
|
1141
|
-
${({$md:e})=>
|
|
1141
|
+
${({$md:e})=>je(e)}
|
|
1142
1142
|
}
|
|
1143
1143
|
|
|
1144
1144
|
@media (width >= 992px) {
|
|
1145
|
-
${({$lg:e})=>
|
|
1145
|
+
${({$lg:e})=>je(e)}
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
1148
|
-
${({$xl:e})=>s.isNumber(e)?`@media (min-width: 1200px) { ${
|
|
1148
|
+
${({$xl:e})=>s.isNumber(e)?`@media (min-width: 1200px) { ${je(e)} }`:""}
|
|
1149
1149
|
|
|
1150
1150
|
> .comp-card {
|
|
1151
1151
|
height: 100%;
|
|
@@ -1178,7 +1178,7 @@
|
|
|
1178
1178
|
padding: ${i}px;
|
|
1179
1179
|
}
|
|
1180
1180
|
`}
|
|
1181
|
-
`,It=({align:e,children:n,cols:i,colsPadding:a,justify:r})=>t.jsx(Ei,{$align:e,$cols:i,$colsPadding:a,$justify:r,children:n}),Ae=({addText:e,append:n,disabled:i=!1,fields:a,fieldState:r,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:
|
|
1181
|
+
`,It=({align:e,children:n,cols:i,colsPadding:a,justify:r})=>t.jsx(Ei,{$align:e,$cols:i,$colsPadding:a,$justify:r,children:n}),Ae=({addText:e,append:n,disabled:i=!1,fields:a,fieldState:r,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:x,onChange:u,placeholder:h,tooltip:b,remove:m,value:w})=>{var v;const y=f.useCallback(()=>{n==null||n(o)},[n,o]),j=f.useCallback(k=>()=>{m==null||m(k)},[m]);return t.jsxs(It,{align:"start",children:[t.jsx(Pe,{lg:75,md:75,sm:75,children:t.jsx(Fe,{disabled:i,error:r?(v=r.error)==null?void 0:v.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:d,name:g,onBlur:x,onChange:u,placeholder:h,removeItemArray:j,required:c,tooltip:b,value:w})}),l<p-1&&l+1===(a==null?void 0:a.length)?t.jsx(Pe,{lg:25,md:25,sm:25,children:t.jsx(P,{disabled:i,icon:"plus",onClick:y,variant:"ghost",width:"100%",children:e??"Add"})}):void 0]})},Ri=({addText:e,append:n,control:i,disabled:a,fields:r,initValue:o="",required:l,label:c,max:d=void 0,name:p="array-field",onChange:g,placeholder:x,remove:u,tooltip:h})=>i&&r?t.jsx(f.Fragment,{children:r.map((b,m)=>t.jsx(s.Controller,{control:i,name:`${p}.${m}`,render:({field:w,fieldState:y})=>t.jsx(Ae,{addText:e,append:n,disabled:a,fieldState:y,fields:r,index:m,initValue:o,label:c,max:d,name:w.name,onBlur:w.onBlur,onChange:g??w.onChange,placeholder:x,remove:u,required:l,tooltip:h,value:typeof w.value=="object"?w.value.value:w.value}),index:m},b.id))}):t.jsx(Ae,{addText:e,disabled:a,initValue:o,label:c,max:d,name:p,onChange:g,placeholder:x,required:l,tooltip:h}),Di=s.dt(pt)`
|
|
1182
1182
|
white-space: nowrap;
|
|
1183
1183
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1184
1184
|
text-overflow: ellipsis;
|
|
@@ -1189,13 +1189,13 @@
|
|
|
1189
1189
|
position: absolute;
|
|
1190
1190
|
visibility: hidden;
|
|
1191
1191
|
width: 0;
|
|
1192
|
-
`,Tt=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Pi=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Ai=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:
|
|
1192
|
+
`,Tt=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Pi=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Ai=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:x,setValue:u,tooltip:h,watch:b,weight:m})=>{const w=s.nt(),y=n?void 0:i,j=f.useRef(null),v=x==null?void 0:x(d,{required:g}),k=b==null?void 0:b(d),T=Pi(k),R=f.useCallback(()=>{const L=Tt("change",d,void 0);u&&u(d,void 0),v&&v.onChange(L)},[v,d,u]),C=f.useCallback(L=>{const{files:E}=L.currentTarget;E&&E.length>0&&(p==null||p(L),u&&u(d,E),v&&v.onChange(L))},[v,d,p,u]),N=f.useCallback(L=>{n?L.preventDefault():j.current&&j.current.click()},[n]);return t.jsxs(H,{error:y,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:g,tooltip:h,weight:m,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${y?"error":""}`,children:[t.jsx(Di,{$size:"xs",children:T}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(T)?void 0:t.jsx(B,{color:w.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:R,variant:"ghost",width:"20px"}),y&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}),t.jsxs(P,{border:n?`1px solid ${w.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:N,variant:"primary",width:"96px",children:[t.jsx(I,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Li,{...v,accept:e,"aria-label":d,"data-testid":d,disabled:n,id:l??d,multiple:c,name:d,onChange:C,ref:j,type:"file"})]})},Wi=s.dt.input`
|
|
1193
1193
|
border: none;
|
|
1194
1194
|
background: transparent;
|
|
1195
1195
|
min-width: 15rem;
|
|
1196
1196
|
padding: 0;
|
|
1197
1197
|
flex: 1;
|
|
1198
|
-
`,We=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:
|
|
1198
|
+
`,We=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b})=>{const m=s.nt(),w=e?void 0:n,[y,j]=f.useState(""),v=d?h:i==null?void 0:i.value,k=f.useMemo(()=>v&&typeof v=="string"?v.split(",").filter(Boolean):[],[v]),T=f.useCallback(E=>{const U=[...new Set(E.filter(Boolean))].join(","),G=Tt("change",c,U);i&&i.onChange(G),d&&d(G)},[i,c,d]),R=f.useCallback(E=>{j(E.target.value)},[]),C=f.useCallback(E=>{const A=y.trim();A.length&&!k.includes(A)&&(E.preventDefault(),T([...k,A]),j("")),i&&i.onBlur()},[y,i,T,k]),N=f.useCallback(E=>{const A=y.trim();E.key==="Enter"&&A.length===0&&E.preventDefault(),["Enter",","].includes(E.key)&&A.length>0&&!k.includes(A)?(E.preventDefault(),T([...k,A]),j("")):E.key==="Backspace"&&!A.length&&k.length&&(E.preventDefault(),p==null||p(k[k.length-1]),T(k.slice(0,-1)))},[y,p,T,k]),L=f.useCallback(E=>()=>{p==null||p(E),T(k.filter(A=>A!==E))},[p,T,k]);return t.jsx(H,{error:w,helpLink:a,helpLinkText:r,helpText:o,htmlFor:c,label:l,required:x,tooltip:u,weight:b,children:t.jsxs(ee,{$overflowX:"auto",className:`${e?"disabled":""} ${w?"error":""}`,children:[k.map(E=>t.jsx(X,{disabled:e,onClose:L(E),tagLabel:E},E)),t.jsx(Wi,{"aria-hidden":!1,"aria-invalid":w?"true":"false","aria-label":c,"aria-required":x,autoComplete:"off",id:c,onBlur:C,onChange:R,onKeyDown:N,placeholder:k.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:y}),w?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}):void 0]})})},Bi=({disabled:e=!1,control:n,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b})=>n?t.jsx(s.Controller,{control:n,name:c,render:({field:m})=>t.jsx(We,{disabled:e,error:i,field:m,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:x,tooltip:u,weight:b}),rules:{required:x}}):t.jsx(We,{disabled:e,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b}),Be=f.forwardRef(function({disabled:n,icon:i,margin:a,onClick:r,...o},l){return t.jsx(fi,{$margin:a,"aria-label":i,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...o,children:t.jsx(I,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Ce=({error:e,decimalPlaces:n=0,disabled:i=!1,id:a,maxLength:r,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:x,setValue:u,value:h})=>{const b=s.nt(),m=i?void 0:e,w=n<0?0:n,[y,j]=f.useState(h?s._.toNumber(h):0),v=f.useCallback(()=>{const C=(y-10**-w).toFixed(w),N=Math.max(Number(l),Number(C));u&&u(c,N,{shouldDirty:!0}),j(N)},[w,y,l,c,u]),k=f.useCallback(()=>{const C=(y+10**-w).toFixed(w),N=Math.min(Number(o),Number(C)>Number(l)?Number(C):Number(l));u&&u(c,N,{shouldDirty:!0}),j(N)},[w,y,o,l,c,u]),T=f.useCallback(C=>{const{value:N}=C.target,L=/\d+/u.test(N)&&!s._.isEmpty(N);u&&u(c,L?N:void 0),d&&d(C),j(Number(N))},[c,d,u]),R=f.useCallback(C=>{C.key==="Enter"&&C.preventDefault()},[]);return t.jsxs(ee,{className:`${i?"disabled":""} ${m?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":x,autoComplete:"off",disabled:i,id:a??c,max:o,min:l,onKeyDown:R,placeholder:p,required:x,step:10**-w,type:"number",...g==null?void 0:g(c,{maxLength:r,max:o,min:l,onChange:T,value:h,valueAsNumber:!0})}),m&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsx(Be,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:v,px:.75,py:.75}),t.jsx(Be,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:k,px:.75,py:.75})]})},Ft=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:a,helpText:r,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:x,onChange:u,placeholder:h,register:b,required:m,setValue:w,tooltip:y,value:j,watch:v,weight:k})=>t.jsx(H,{error:n?void 0:i,helpLink:a,helpText:r,htmlFor:x,label:l,linkPosition:c,maxLength:d,required:m,tooltip:y,weight:k,children:t.jsx(Ce,{decimalPlaces:e,disabled:n,error:i,id:o,max:p,maxLength:d,min:g,name:x,onChange:u,placeholder:h,register:b,required:m,setValue:w,value:u?j:v==null?void 0:v(x)})}),Nt=({disabled:e=!1,error:n,name:i,label:a,propsMax:r,propsMin:o,required:l,tooltip:c,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return t.jsx(H,{error:n,htmlFor:i,label:a,required:l,tooltip:c,children:t.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Ce,{...o,disabled:e,error:n,name:o.name??g}),t.jsx(Ce,{...r,disabled:e,error:n,name:r.name??p})]})})},Mi=s.dt.div`
|
|
1199
1199
|
${({theme:e})=>`
|
|
1200
1200
|
align-items: flex-start;
|
|
1201
1201
|
align-self: stretch;
|
|
@@ -1235,7 +1235,7 @@
|
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
`}
|
|
1238
|
-
`,
|
|
1238
|
+
`,Oi=s.dt.button`
|
|
1239
1239
|
${({theme:e})=>`
|
|
1240
1240
|
align-items: center;
|
|
1241
1241
|
background: inherit;
|
|
@@ -1251,7 +1251,7 @@
|
|
|
1251
1251
|
cursor: not-allowed;
|
|
1252
1252
|
}
|
|
1253
1253
|
`}
|
|
1254
|
-
`,
|
|
1254
|
+
`,Hi=s.dt.ul`
|
|
1255
1255
|
${({theme:e})=>`
|
|
1256
1256
|
align-items: flex-start;
|
|
1257
1257
|
box-shadow: ${e.shadows.md};
|
|
@@ -1289,9 +1289,9 @@
|
|
|
1289
1289
|
overflow: hidden;
|
|
1290
1290
|
text-overflow: ellipsis;
|
|
1291
1291
|
white-space: nowrap;
|
|
1292
|
-
`,me=(e,n,i=!1)=>{f.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",a,!0),()=>{document.removeEventListener("mousedown",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("mousedown",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",a,!0)})},[i,e,n])},Ui=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const
|
|
1293
|
-
${e?"disabled":""} ${R?"error":""} ${
|
|
1294
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":R?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:
|
|
1292
|
+
`,me=(e,n,i=!1)=>{f.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",a,!0),()=>{document.removeEventListener("mousedown",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("mousedown",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",a,!0)})},[i,e,n])},Ui=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const x=s.nt(),u=f.useRef(null),h=e?void 0:n,b=(p==null?void 0:p(a))??d,[m,w]=f.useState(!1),[y,j]=f.useState(""),{refs:v,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:T,inputValue:R,handlePhoneValueChange:C,country:N,setCountry:L}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),E=f.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),A=f.useCallback(W=>{W.preventDefault(),w(O=>!O),m||j("")},[m]),U=f.useCallback(W=>()=>{L(W),w(!1),j("")},[L,w]),G=f.useCallback(W=>{W.key.length===1?j(O=>O+W.key):W.key==="Backspace"&&j(O=>O.slice(0,-1))},[]),J=s.R.filter(W=>{const{name:O}=s.M(W);return O.toLowerCase().includes(y.toLowerCase())});return me(v.floating.current,()=>{w(!1),j("")},!0),t.jsx(H,{error:h,htmlFor:a,label:i,required:o,tooltip:c,weight:g,children:t.jsxs(Mi,{className:`${e?"disabled":""} ${h?"error":""}`,ref:u,children:[t.jsxs(Oi,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:A,onKeyDown:G,ref:v.setReference,children:[t.jsx(s.q,{iso2:N.iso2,size:"16px"}),t.jsx(I,{icon:"angle-down",iconColor:x.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":a,"aria-required":o,autoComplete:"off","data-testid":`${a}-input`,disabled:e,id:a,name:a,onKeyDown:E,placeholder:r,ref:T,type:"tel",value:R,...l==null?void 0:l(a,{required:o,onChange:C})}),h?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:x.palette.error[500],iconSize:"xs"}):void 0]}),m&&ie.createPortal(t.jsx(Hi,{ref:v.setFloating,style:k,children:J.map(W=>{const{dialCode:O,iso2:M,name:Re}=s.M(W);return t.jsxs(_i,{onClick:U(M),value:M,children:[t.jsx(s.q,{iso2:M,size:"16px"}),t.jsx(Vi,{children:Re}),t.jsx(S,{color:x.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+O})]},M)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Gi=({disabled:e=!1,error:n,helpLink:i,helpText:a,isTouched:r,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:x,register:u,required:h,rows:b,tooltip:m,watch:w,weight:y,value:j})=>{const v=s.nt(),k=(w==null?void 0:w(c))??j,T=o&&r&&!e,R=e?void 0:n;return t.jsx(H,{error:R,helpLink:i,helpText:a,htmlFor:c,label:l,maxLength:g,required:h,tooltip:m,value:k?String(k):void 0,weight:y,children:t.jsxs(ee,{className:`
|
|
1293
|
+
${e?"disabled":""} ${R?"error":""} ${T?"success":""}
|
|
1294
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":R?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:x,rows:b,value:k,...u==null?void 0:u(c,{required:h})}),R?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:v.palette.error[500],iconSize:"xs"}):void 0,T?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:v.palette.success[500],iconSize:"xs"}):void 0]})})},Yi=({description:e,disabled:n,id:i,align:a,inputType:r="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:x})=>{const u=f.useMemo(()=>{if(r==="text")return t.jsx(Fe,{disabled:n,name:d,placeholder:p});if(r==="date")return t.jsx(kt,{disabled:n,name:d});const{decimalPlaces:h,max:b,min:m}=o??{};return t.jsx(Ft,{decimalPlaces:h,disabled:n,max:b,min:m,name:d,placeholder:p})},[n,o,r,d,p]);return t.jsxs(oi,{$align:a,$minHeight:l,$minWidth:c,children:[t.jsx(Se,{description:e,id:i,title:x,tooltip:g}),u]})},Et=(e,n)=>{const[a,r]=f.useState(0),[o,l]=f.useState(0);return f.useEffect(()=>{o===100&&(()=>{r(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:a,progress:o,setCycle:r,setProgress:l}},Rt=({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])},Ne=e=>{const[n,i]=f.useState(!1),a=f.useCallback(()=>{i(!0)},[]),r=f.useCallback(()=>{i(!1)},[]),o=f.useCallback(()=>{i(l=>!l)},[]);return{close:r,isOpen:n,name:e,open:a,setIsOpen:i,toggle:o}},qi=({name:e,items:n,columnOrder:i,setColumnOrder:a})=>{const r=f.useMemo(()=>[...n.filter(({locked:g})=>g).map(({locked:g,...x})=>({...x,visible:!0,locked:g})),...n.filter(({locked:g})=>!g)],[n]),[o,l]=f.useState(r),c=f.useCallback(g=>{const x=g.filter(({locked:m})=>!m),h=[...g.filter(({locked:m})=>m),...x],b=h.map(({name:m})=>m);l(m=>[...h,...m.filter(({name:w})=>!b.includes(w))]),a&&a(h.map(({id:m})=>m))},[a]),d=f.useCallback(()=>{const g=o.map(x=>{var h;const u=(i==null?void 0:i.includes(x.id))??!1;return(h=x.toggleVisibility)==null||h.call(x,u),{...x,visible:u}}).toSorted((x,u)=>{const h=(i==null?void 0:i.indexOf(x.id))??0,b=(i==null?void 0:i.indexOf(u.id))??0;return Number(u.visible)!==Number(x.visible)?Number(u.visible)-Number(x.visible):h-b});l(g),a==null||a(i)},[o,i,a]),p=f.useMemo(()=>s.some(o,g=>((i==null?void 0:i.includes(g.id))??!1)!==g.visible),[o,i]);return{setColumns:c,resetToDefault:d,columns:o,...Ne(e),hasChanged:p}},Dt=(e,n)=>f.useMemo(()=>s._.debounce(e,n),[e,n]),Ki=e=>{const[n,i]=f.useState(),a=Dt(r=>{i(r)},(e==null?void 0:e.debounceWait)??300);return[n,a]},Xi=({alt:e="img",height:n="",width:i="",plugins:a=[s.lazyload(),s.placeholder()],publicId:r})=>{const o=Rt({publicId:r});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:n,plugins:a,width:i})},te=f.memo(Xi),Ji=s.dt.label`
|
|
1295
1295
|
${({theme:e})=>`
|
|
1296
1296
|
align-items: center;
|
|
1297
1297
|
display: flex;
|
|
@@ -1420,7 +1420,7 @@
|
|
|
1420
1420
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1421
1421
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1422
1422
|
}
|
|
1423
|
-
`,Lt=f.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:a,name:r,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},p){const g=n===!0?"on":"off",
|
|
1423
|
+
`,Lt=f.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:a,name:r,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},p){const g=n===!0?"on":"off",x=typeof o=="object"&&o.on&&o.off?o[g]:o,u=f.useCallback(h=>{h.stopPropagation()},[]);return t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:a,children:[t.jsx($,{minWidth:l,children:x}),t.jsxs(tr,{onClick:u,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":i,"aria-label":r,checked:n===!0,disabled:i,name:r,ref:p,type:"checkbox"}),t.jsx(re,{"aria-label":"Toggle Switch",id:`${r}Toggle`,children:t.jsx(er,{})})]}),c]})}),nr=({id:e,title:n,toggles:i,minWidth:a="auto",height:r="auto"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColor:o.palette.white,border:`1px solid ${o.palette.gray[200]}`,borderRadius:o.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:r,justify:"center",minHeight:"100px",minWidth:a,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Se,{id:e,title:n}),t.jsx($,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:i.map(l=>t.jsx(Lt,{...l},`$card-toggle-${l.name}`))})]})},ir=s.dt.div`
|
|
1424
1424
|
position: relative;
|
|
1425
1425
|
margin: auto;
|
|
1426
1426
|
overflow: hidden;
|
|
@@ -1522,7 +1522,7 @@
|
|
|
1522
1522
|
fill: ${e.palette.white};
|
|
1523
1523
|
}
|
|
1524
1524
|
`}
|
|
1525
|
-
`,Ee=f.forwardRef(function({checked:n,disabled:i=!1,label:a,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...
|
|
1525
|
+
`,Ee=f.forwardRef(function({checked:n,disabled:i=!1,label:a,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...x},u){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(cr,{"aria-disabled":i,children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-hidden":!1,"aria-label":r,checked:n,disabled:i,id:r,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:u,type:"checkbox",value:g,...x}),t.jsx(I,{disabled:i,icon:"check",iconSize:"sm"}),a??g]}),p===void 0?void 0:t.jsx(Y,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Pt=s.dt.div`
|
|
1526
1526
|
${({theme:e})=>`
|
|
1527
1527
|
background-color: ${e.palette.gray[100]};
|
|
1528
1528
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1595,7 +1595,7 @@
|
|
|
1595
1595
|
`,At=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(f.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Pt,{"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})})})),pr=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i,variant:a="normal"})=>{const r=s.nt(),[o,l]=f.useState(!1),[c,d]=f.useState(!0),p=f.useCallback(()=>{l(h=>!h)},[l]),g=f.useCallback(()=>{if(s._.isNil(n)||s._.isEmpty(n)||!s._.isString(n))return d(!1),e;const h=n.split(`
|
|
1596
1596
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1597
1597
|
`)}
|
|
1598
|
-
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),
|
|
1598
|
+
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(async()=>{await navigator.clipboard.writeText(x)},[x]);return a==="location"?t.jsx(At,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs($,{bgColor:r.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:x})})}),t.jsxs(dr,{children:[t.jsx(B,{height:r.spacing[2.5],icon:"copy",iconColor:r.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:u,variant:"ghost",width:r.spacing[2.5]}),c?t.jsxs(P,{onClick:p,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(I,{icon:o?"chevron-up":"chevron-down",iconColor:r.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:u})]}):!1]})]})},{getVariant:gr}=K(e=>({fixed:`
|
|
1599
1599
|
height: auto;
|
|
1600
1600
|
min-width: 300px;
|
|
1601
1601
|
padding: ${e.spacing[1.25]};
|
|
@@ -1745,7 +1745,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1745
1745
|
height: ${e.spacing[3]};
|
|
1746
1746
|
width: max-content;
|
|
1747
1747
|
`}
|
|
1748
|
-
`,wr=(e,n,i)=>i?n==="secondary"?`3px solid ${e.palette.primary[100]}`:`3px solid ${e.palette.primary[500]}`:"unset",
|
|
1748
|
+
`,wr=(e,n,i)=>i?n==="secondary"?`3px solid ${e.palette.primary[100]}`:`3px solid ${e.palette.primary[500]}`:"unset",jr=s.dt.div`
|
|
1749
1749
|
display: flex;
|
|
1750
1750
|
flex-direction: row;
|
|
1751
1751
|
gap: ${({theme:e})=>e.spacing[.25]};
|
|
@@ -1788,7 +1788,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
|
-
`,
|
|
1791
|
+
`,vr=s.dt($e)`
|
|
1792
1792
|
${({theme:e,$variant:n})=>`
|
|
1793
1793
|
align-items: center;
|
|
1794
1794
|
background: ${n==="error"?e.palette.primary[400]:e.palette.warning[500]};
|
|
@@ -1808,7 +1808,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1808
1808
|
font-size: 6px;
|
|
1809
1809
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1810
1810
|
justify-content: center;
|
|
1811
|
-
`,
|
|
1811
|
+
`,Ot=f.forwardRef(function({numberIndicator:n,show:i,variant:a="error",...r},o){return t.jsx(vr,{$variant:a,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...r,children:n&&t.jsx(kr,{children:n<=9?n:9})})}),Ht=({end:e=!1,label:n,id:i,isActive:a=!1,link:r,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:p})=>{const{pathname:g}=De.useLocation(),x=a||(d==="primary"?g.includes(r):g.endsWith(r));return t.jsx(Y,{display:"flex",id:`${i}-tooltip`,tip:c,children:t.jsxs(jr,{$borderButton:x,$variant:d,children:[t.jsxs(De.NavLink,{end:e,id:i,onClick:l,to:r,children:[n,t.jsx(Ot,{left:o==null?void 0:o.left,numberIndicator:o==null?void 0:o.numberIndicator,show:o==null?void 0:o.show,top:o==null?void 0:o.top,variant:o==null?void 0:o.variant})]}),p===void 0?null:t.jsx(X,{tagLabel:`${p}`,variant:"default"})]})})},Xe=({items:e,borders:n=!0,box:i=!1,variant:a="primary"})=>{const r=s.nt();return t.jsx($,{alignItems:"center",bgColor:r.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:i?r.palette.gray[200]:void 0,borderRadius:i?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:p,notificationSign:g,onClick:x,tag:u,tooltip:h})=>t.jsx(Ht,{end:o,id:l,isActive:c,label:p,link:d,notificationSign:g,onClick:x,tag:u,tooltip:h,variant:a},l))})},ne=f.forwardRef(function({color:n=z.palette.gray[100],mt:i=.5,mb:a=.5,width:r,...o},l){return t.jsx($,{as:"hr",borderTop:`1px solid ${n}`,mb:a,mt:i,ref:l,width:r??"100%",...o})}),Cr=s.dt.li`
|
|
1812
1812
|
${({theme:e})=>`
|
|
1813
1813
|
align-items: center;
|
|
1814
1814
|
background-color: ${e.palette.white};
|
|
@@ -1866,7 +1866,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1866
1866
|
min-width: 240px;
|
|
1867
1867
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1868
1868
|
`}
|
|
1869
|
-
`,we=({children:e,disabled:n=!1,icon:i,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...
|
|
1869
|
+
`,we=({children:e,disabled:n=!1,icon:i,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...x})=>{const h=s.nt().palette.gray[n?300:800],b=n?f.Children.map(e,m=>f.isValidElement(m)?f.cloneElement(m,{disabled:n,...m.props}):m):e;return t.jsxs(Cr,{"aria-disabled":n,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...x,children:[i!==void 0||g!==void 0?t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[i?t.jsx(I,{disabled:n,icon:i,iconColor:h,iconSize:"xxs",iconType:a}):null,r===void 0?b:t.jsx(Q,{href:r,children:b})]}):null,p||d?t.jsx(I,{disabled:n,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:a,onClick:l}):null]})},Sr=s.dt(we)`
|
|
1870
1870
|
margin-top: 10px;
|
|
1871
1871
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1872
1872
|
border-radius: 4px;
|
|
@@ -1956,7 +1956,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1956
1956
|
border-radius: ${e.spacing[.5]};
|
|
1957
1957
|
width: 250px;
|
|
1958
1958
|
`}
|
|
1959
|
-
`,ce=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:
|
|
1959
|
+
`,ce=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:x}=s.useFloating$1(),u=f.useCallback(()=>{p(m=>!m)},[]),h=f.useCallback(m=>{m.key==="Enter"&&m.preventDefault()},[]);me(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(Tr,{children:[t.jsx(I,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ir,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(B,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:a,px:.25,py:.25,type:"reset",variant:"ghost"})]});return i?t.jsxs(f.Fragment,{children:[t.jsx(B,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:u,ref:g.setReference,variant:"ghost"}),d?t.jsx(Fr,{ref:g.setFloating,style:x,children:b}):void 0]}):b}),Yt=({columns:e,formId:n,onChangeHandler:i,variant:a})=>{const r=f.useRef(null),[o,l]=f.useState([]),[c,d]=f.useState(""),p=f.useCallback(x=>{const{value:u}=x.target;d(u)},[]),g=f.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return f.useEffect(()=>{l(e.filter(x=>{var u;return a==="grouped"?x.name.toLowerCase().includes(c.toLowerCase())||((u=x.group)==null?void 0:u.includes(c.toLowerCase())):x.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,a]),a==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(Gt(o)).map(([x,u],h)=>{const b=`li-checkbox${x}`;return t.jsx(Ut,{checkboxesName:x,defaultCollapsed:h===0,onChange:i,options:u,title:x},b)})})]}):t.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(x=>{const u=`li-checkbox-${x.name}`;return t.jsx(zr,{selected:x.visible,value:u,width:"content",children:t.jsx(Ee,{checked:x.visible,disabled:x.locked,label:x.name,name:x.name,onChange:i,value:x.name})},u)})})]})},Nr=({_containerId:e="portals",title:n,modalRef:i,variant:a})=>{const r=s.nt(),o=f.useRef(null),[l,c]=f.useState(void 0),d=f.useCallback(x=>{const{checked:u,value:h}=x.target,b=i.columns.map(m=>{var w;return m.name===h?((w=m.toggleVisibility)==null||w.call(m,u),{...m,visible:u}):m});i.setColumns(b)},[i]),p=f.useCallback(x=>{const u=i.columns.map(h=>{var b;return h.id===x?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});i.setColumns(u)},[i]),g=f.useCallback(()=>{var u;const x=(u=o.current)==null?void 0:u.scrollHeight;l!==x&&c(x)},[l]);return i.isOpen?ie.createPortal(t.jsx(Wt,{"aria-label":i.name,"aria-modal":"true",children:t.jsxs(Ke,{$size:"md",flexDirection:"column",children:[t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(V,{size:"sm",children:n}),t.jsx(B,{icon:"close",iconColor:r.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(ne,{mb:0,mt:0}),t.jsxs($,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:o,scroll:"y",width:"100%",children:[t.jsx(Yt,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:a}),t.jsx($,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Vt,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),t.jsx(ne,{mb:0,mt:0}),t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(P,{disabled:!i.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:i.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),t.jsx(P,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Er=s.dt(we)`
|
|
1960
1960
|
padding: 8px;
|
|
1961
1961
|
min-height: 36px;
|
|
1962
1962
|
min-width: unset;
|
|
@@ -1973,7 +1973,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1973
1973
|
svg.fa-check {
|
|
1974
1974
|
border-radius: 2px;
|
|
1975
1975
|
}
|
|
1976
|
-
`,qt=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Ee,{...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(st,{value:g.value,width:"content",children:t.jsx(qe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(bt,{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(Fe,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Nt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(St,{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:a,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Xt=e=>{var c,d,p,g,u;const[n,i]=f.useState([...e]),{control:a,register:r,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:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Dr=(e,n)=>{var i,a,r,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",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.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)},Lr=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=Xt(e),p=e.some(x=>x.type==="checkboxes"&&x.hideSearch!==!0),g=f.useCallback(x=>{const{value:h}=x.target,b=Lr(e,h);o(b)},[e,o]),u=f.useCallback(x=>{n&&n(x)},[n]);return f.useEffect(()=>{o(e),Dr(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(ce,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(u),children:[t.jsx(Kt,{control:a,items:r,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Jt=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,u]=f.useState({}),[x,h]=f.useState(""),b=f.useCallback(y=>()=>{const v=l.find(k=>k.label===y),j=!(v!=null&&v.filterOptions.some(k=>k.type==="dateRange"||k.type==="select"));r==null||r(j??!0),h(y),p((v==null?void 0:v.filterOptions)??[])},[l,r]),m=f.useCallback(y=>{const v=[...y.checkbox,...Object.values(y.text??{}),...y.radio?[y.radio]:[],...y.minValue?[String(y.minValue)]:[],...y.maxValue?[String(y.maxValue)]:[]];u(C=>v.length>0?{...C,[x]:v}:C);const j=C=>{var N,L;return{...C,options:(N=C.options)==null?void 0:N.map(E=>({...E,checked:y.checkbox.includes(E.value)||y.radio===E.value})),value:["text","select"].includes(C.type)?((L=y.text)==null?void 0:L[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?y.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?y.maxValue:C.maxValue}},k=C=>C.label===x?{...C,filterOptions:C.filterOptions.map(j)}:C,F=l.map(k);c(C=>C.map(k));const R=F.flatMap(({filterOptions:C})=>C);i(R),p([])},[l,i,x]),w=f.useCallback((y,v)=>{const j=`li-filter-option-${y}`;return t.jsxs(Er,{icon:v,onClick:b(y),style:{minWidth:"180px"},value:j,width:"100%",children:[y,g[y]===void 0?void 0:t.jsx(X,{tagLabel:g[y].length.toString()})]},j)},[g,b]);return f.useEffect(()=>{const y=e.reduce((v,{label:j,filterOptions:k})=>{const F=k.flatMap(({value:N,minValue:L,maxValue:E})=>[L,E,N]).filter(Boolean),R=k.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),C=[...F,...R];return C.length===0?v:{...v,[j]:C}},{});u(y),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):Object.entries(Gt(e)).map(([y,v])=>t.jsxs($,{children:[t.jsx(S,{color:o.palette.gray[400],mb:.25,size:"sm",children:y}),v.map(({label:j,icon:k="filter-list"})=>w(j,k))]},y))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):e.map(({label:y,icon:v="filter-list"})=>w(y,v))})},Zt=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(B,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const u=x=>{const h=p.current;h&&!h.contains(x.target)&&i.close()};if(l)return document.addEventListener("mousedown",u,!0),()=>{document.removeEventListener("mousedown",u,!0)}},[p,l,i]),t.jsx(Rr,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[r==="column"?g:void 0,t.jsx(Jt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Pr(e){if(e)return e}function Qt(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function Ar(e,n,i){const a=i??"",r=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(r)&&!s._.isUndefined(o))return`${r}${a} - ${o}${a}`;if(!s._.isUndefined(r))return`Min ${r}${a}`;if(!s._.isUndefined(o))return`Max ${o}${a}`}function Wr(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 Br(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(X,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),Mr=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=r;switch(c){case"numberRange":{const x=Ar(g,u,a.placeholder);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const x=Wr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=Qt(p);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Pr(d),h=Br(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Hr=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue: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 a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},lt=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,Or=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},_r=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,onReset:o,variant:l="ungrouped"})=>{const c=Ne("filters-modal"),[d,p]=f.useState([]),[g,u]=f.useState(lt(d)),x=i.map(y=>({...y,filterOptions:y.filterOptions.map(v=>d.find(k=>k.key===v.key&&k.type===v.type&&k.filterFn===v.filterFn)??{...v})})),h=f.useCallback(y=>{p([...y]),localStorage.setItem(n,JSON.stringify(y))},[p,n]),b=f.useCallback(()=>{o&&o(),c.toggle()},[c,o]),m=f.useCallback(y=>()=>{o&&o();const v=d.map(j=>j.key===y.key&&j.type===y.type&&j.filterFn===y.filterFn?Or(j):j);p(v),localStorage.setItem(n,JSON.stringify(v))},[d,n,o]);return f.useEffect(()=>{const y=localStorage.getItem(n),v=i.flatMap(k=>k.filterOptions),j=y?JSON.parse(y):v;v.flatMap(k=>k.value).filter(Boolean).length>0||v.flatMap(k=>k.options).filter(k=>(k==null?void 0:k.checked)===void 0).length>0&&e!==void 0?(p(v),localStorage.setItem(n,JSON.stringify(v))):p(j)},[e,n,i,p]),f.useEffect(()=>{a&&e!==void 0&&a(Hr(e,d)),u(lt(d)),r==null||r(d)},[e,d,a,u,r]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:b,tag:g.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(Zt,{modalRef:c,onApplyFilters:h,options:x,variant:l})]}),options:x,removeFilter:m}},en=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:x,id:h="modal-container"})=>{const b=s.nt(),m=t.jsx(Wt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ke,{$size:x,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ur,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(br,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(S,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?ie.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Vr=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Ne("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(u=>{r.current=u})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(en,{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}},He=({buttonProps:e,variant:n})=>t.jsx(P,{onClick:e.onClick,variant:n,children:e.text}),Ur=s.dt.div`
|
|
1976
|
+
`,qt=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Ee,{...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(st,{value:g.value,width:"content",children:t.jsx(qe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(bt,{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(Fe,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Nt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(St,{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:a,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Xt=e=>{var c,d,p,g,x;const[n,i]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(u=>u.type==="checkboxes").flatMap(u=>{var h;return((h=u.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(u=>u.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:u})=>u))==null?void 0:p.value)??"",text:e.filter(u=>["text","select"].includes(u.type)).reduce((u,h)=>({...u,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(u=>["numberRange","dateRange"].includes(u.type)))==null?void 0:g.minValue,maxValue:(x=e.find(u=>["numberRange","dateRange"].includes(u.type)))==null?void 0:x.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Dr=(e,n)=>{var i,a,r,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",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.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)},Lr=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=Xt(e),p=e.some(u=>u.type==="checkboxes"&&u.hideSearch!==!0),g=f.useCallback(u=>{const{value:h}=u.target,b=Lr(e,h);o(b)},[e,o]),x=f.useCallback(u=>{n&&n(u)},[n]);return f.useEffect(()=>{o(e),Dr(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(ce,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(x),children:[t.jsx(Kt,{control:a,items:r,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Jt=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,x]=f.useState({}),[u,h]=f.useState(""),b=f.useCallback(y=>()=>{const j=l.find(k=>k.label===y),v=!(j!=null&&j.filterOptions.some(k=>k.type==="dateRange"||k.type==="select"));r==null||r(v??!0),h(y),p((j==null?void 0:j.filterOptions)??[])},[l,r]),m=f.useCallback(y=>{const j=[...y.checkbox,...Object.values(y.text??{}),...y.radio?[y.radio]:[],...y.minValue?[String(y.minValue)]:[],...y.maxValue?[String(y.maxValue)]:[]];x(C=>j.length>0?{...C,[u]:j}:C);const v=C=>{var N,L;return{...C,options:(N=C.options)==null?void 0:N.map(E=>({...E,checked:y.checkbox.includes(E.value)||y.radio===E.value})),value:["text","select"].includes(C.type)?((L=y.text)==null?void 0:L[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?y.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?y.maxValue:C.maxValue}},k=C=>C.label===u?{...C,filterOptions:C.filterOptions.map(v)}:C,T=l.map(k);c(C=>C.map(k));const R=T.flatMap(({filterOptions:C})=>C);i(R),p([])},[l,i,u]),w=f.useCallback((y,j)=>{const v=`li-filter-option-${y}`;return t.jsxs(Er,{icon:j,onClick:b(y),style:{minWidth:"180px"},value:v,width:"100%",children:[y,g[y]===void 0?void 0:t.jsx(X,{tagLabel:g[y].length.toString()})]},v)},[g,b]);return f.useEffect(()=>{const y=e.reduce((j,{label:v,filterOptions:k})=>{const T=k.flatMap(({value:N,minValue:L,maxValue:E})=>[L,E,N]).filter(Boolean),R=k.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),C=[...T,...R];return C.length===0?j:{...j,[v]:C}},{});x(y),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):Object.entries(Gt(e)).map(([y,j])=>t.jsxs($,{children:[t.jsx(S,{color:o.palette.gray[400],mb:.25,size:"sm",children:y}),j.map(({label:v,icon:k="filter-list"})=>w(v,k))]},y))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):e.map(({label:y,icon:j="filter-list"})=>w(y,j))})},Zt=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(B,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const x=u=>{const h=p.current;h&&!h.contains(u.target)&&i.close()};if(l)return document.addEventListener("mousedown",x,!0),()=>{document.removeEventListener("mousedown",x,!0)}},[p,l,i]),t.jsx(Rr,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[r==="column"?g:void 0,t.jsx(Jt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Pr(e){if(e)return e}function Qt(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function Ar(e,n,i){const a=i??"",r=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(r)&&!s._.isUndefined(o))return`${r}${a} - ${o}${a}`;if(!s._.isUndefined(r))return`Min ${r}${a}`;if(!s._.isUndefined(o))return`Max ${o}${a}`}function Wr(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 Br(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(X,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),Mr=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:x}=r;switch(c){case"numberRange":{const u=Ar(g,x,a.placeholder);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const u=Wr(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const u=Qt(p);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const u=Pr(d),h=Br(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Or=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:x}=c,u=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(x)&&typeof x!="number"?void 0:d(String(x));return s._.isUndefined(u)&&s._.isUndefined(h)?!0:(u??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},lt=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,Hr=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},_r=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,onReset:o,variant:l="ungrouped"})=>{const c=Ne("filters-modal"),[d,p]=f.useState([]),[g,x]=f.useState(lt(d)),u=f.useMemo(()=>i.map(y=>({...y,filterOptions:y.filterOptions.map(j=>d.find(k=>k.key===j.key&&k.type===j.type&&k.filterFn===j.filterFn)??{...j})})),[i,d]),h=f.useCallback(y=>{p(j=>{const v=j.map(k=>y.find(T=>T.key===k.key)??k);return localStorage.setItem(n,JSON.stringify(v)),v})},[n]),b=f.useCallback(()=>{o&&o(),c.toggle()},[c,o]),m=f.useCallback(y=>()=>{o&&o();const j=d.map(v=>v.key===y.key&&v.type===y.type&&v.filterFn===y.filterFn?Hr(v):v);p(j),localStorage.setItem(n,JSON.stringify(j))},[d,n,o]);return f.useEffect(()=>{const y=localStorage.getItem(n);if(y)p(JSON.parse(y));else{const j=i.flatMap(v=>v.filterOptions);p(j),localStorage.setItem(n,JSON.stringify(j))}},[n,i]),f.useEffect(()=>{a&&e!==void 0&&a(Or(e,d)),x(lt(d)),r==null||r(d)},[e,d,a,x,r]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:b,tag:g.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(Zt,{modalRef:c,onApplyFilters:h,options:u,variant:l})]}),options:u,removeFilter:m}},en=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:x=void 0,size:u,id:h="modal-container"})=>{const b=s.nt(),m=t.jsx(Wt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ke,{$size:u,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(x)&&!s._.isNil(x)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:x}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ur,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(br,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(S,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?ie.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Vr=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Ne("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(x=>{r.current=x})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:x})=>t.jsxs(en,{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,x]}),confirm:l}},Oe=({buttonProps:e,variant:n})=>t.jsx(P,{onClick:e.onClick,variant:n,children:e.text}),Ur=s.dt.div`
|
|
1977
1977
|
display: flex;
|
|
1978
1978
|
flex-direction: column;
|
|
1979
1979
|
align-items: center;
|
|
@@ -2007,7 +2007,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2007
2007
|
> *:last-child {
|
|
2008
2008
|
margin-right: 0;
|
|
2009
2009
|
}
|
|
2010
|
-
`,ct={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},qr=({cancelButton:e=void 0,confirmButton:n=void 0,description:i,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(n??e)!==void 0;return t.jsxs(Ur,{$padding:r,children:[t.jsx(Gr,{children:t.jsx(te,{alt:"empty-icon",publicId:a})}),t.jsx(V,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:ct[l].title,textAlign:"center",children:o}),t.jsx(S,{mb:c?2:void 0,size:ct[l].description,textAlign:"center",children:i}),c?t.jsxs(Yr,{children:[e&&t.jsx(
|
|
2010
|
+
`,ct={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},qr=({cancelButton:e=void 0,confirmButton:n=void 0,description:i,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(n??e)!==void 0;return t.jsxs(Ur,{$padding:r,children:[t.jsx(Gr,{children:t.jsx(te,{alt:"empty-icon",publicId:a})}),t.jsx(V,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:ct[l].title,textAlign:"center",children:o}),t.jsx(S,{mb:c?2:void 0,size:ct[l].description,textAlign:"center",children:i}),c?t.jsxs(Yr,{children:[e&&t.jsx(Oe,{buttonProps:e,variant:"tertiary"}),n&&t.jsx(Oe,{buttonProps:n,variant:"primary"})]}):void 0]})},Kr=({children:e})=>{const n=s.useFormContext();return e({...n})},Xr=s.dt.form`
|
|
2011
2011
|
${({theme:e})=>`
|
|
2012
2012
|
align-items: flex-start;
|
|
2013
2013
|
align-self: stretch;
|
|
@@ -2017,7 +2017,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2017
2017
|
overflow: hidden auto;
|
|
2018
2018
|
width: 100%;
|
|
2019
2019
|
`}
|
|
2020
|
-
`,Jr=({alert:e,buttonAlignment:n,cancelButton:i,children:a,confirmButton:r,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,showButtons:g=!0,yupSchema:u
|
|
2020
|
+
`,Jr=({alert:e,buttonAlignment:n,cancelButton:i,children:a,confirmButton:r,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,showButtons:g=!0,yupSchema:x,...u})=>{const h=s.nt(),b=s.useForm({...u,mode:d??"all",resolver:x?s.o(x):void 0});return t.jsx(s.FormProvider,{...b,children:t.jsx(Xr,{onSubmit:b.handleSubmit(p),children:t.jsxs($,{scroll:"y",width:"100%",children:[t.jsx($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:a}),g&&t.jsxs($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,borderTop:`1px solid ${h.palette.gray[200]}`,display:"flex",flexDirection:n?"unset":"column",gap:.625,justify:n??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,maxWidth:c,children:[i?t.jsx(P,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,t.jsx(P,{disabled:((r==null?void 0:r.disabled)??!1)||b.formState.isSubmitting||o&&!b.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},Zr=s.dt($e)`
|
|
2021
2021
|
display: grid;
|
|
2022
2022
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2023
2023
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2071,7 +2071,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2071
2071
|
background-color: ${e.palette.gray[100]};
|
|
2072
2072
|
}
|
|
2073
2073
|
`}
|
|
2074
|
-
`,tn=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:r,children:[e?t.jsx(I,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ta=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=f.useState(n),[u
|
|
2074
|
+
`,tn=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:r,children:[e?t.jsx(I,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ta=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=f.useState(n),[x,u]=f.useState(""),h=f.useCallback(w=>{g(y=>y.filter(j=>String(j.name).toLowerCase().includes(w.toLocaleLowerCase())))},[g]),b=f.useCallback(w=>{w.currentTarget&&(u(w.currentTarget.value),h(w.currentTarget.value))},[u,h]);f.useEffect(()=>{g(n),h(x)},[n,h,x]);const m=t.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(ea,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(B,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(ce,{onInput:b,placeholder:"Search"})}),t.jsx(ne,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(Je,{onClick:i,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(I,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(S,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(w=>t.jsx(tn,{isSelected:o.toLowerCase()===w.name,label:w.name.charAt(0).toUpperCase()+w.name.slice(1),onSelect:a},w.name))]})]})})});return e?ie.createPortal(m,document.body):t.jsx("div",{})},na=({description:e,height:n="auto",leftIconName:i,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const x=s.nt(),u=p==="centered",h=l&&t.jsx(Y,{icon:r??i,iconColor:x.palette.gray[800],id:l,place:d,tip:c});return t.jsxs($,{alignItems:u?"center":"flex-start",bgColor:x.palette.gray[50],border:`1px solid ${x.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:u?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[u||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(S,{color:u?x.palette.gray[800]:x.palette.gray[400],size:"md",textAlign:u?"center":"start",children:e}),u||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[u&&!s.lodashExports.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(V,{fontWeight:"bold",size:"md",children:o}),a]}),u&&!s.lodashExports.isUndefined(r)?h:void 0]})]})},ia=({actions:e,children:n,header:i,title:a,tabs:r,footer:o})=>{const l=s.nt();return t.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:a}),i]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(B,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx($,{display:"flex",pt:.25,width:"100%",children:t.jsx(Xe,{items:r})}),t.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},g)=>t.jsx(P,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},ra=s.dt.span`
|
|
2075
2075
|
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2076
2076
|
background-color: ${n};
|
|
2077
2077
|
border-radius: 5px;
|
|
@@ -2154,7 +2154,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2154
2154
|
&:hover span {
|
|
2155
2155
|
color: ${z.palette.primary[200]};
|
|
2156
2156
|
}
|
|
2157
|
-
`,ma=({message:e,onClickButton:n,buttonText:i,buttonFontWeight:a="regular",icon:r,onClose:o,buttonSide:l="end"})=>{const c=s.nt(),[d,p]=f.useState(!0),g=f.useCallback(()=>{p(!1),o==null||o()},[o]),
|
|
2157
|
+
`,ma=({message:e,onClickButton:n,buttonText:i,buttonFontWeight:a="regular",icon:r,onClose:o,buttonSide:l="end"})=>{const c=s.nt(),[d,p]=f.useState(!0),g=f.useCallback(()=>{p(!1),o==null||o()},[o]),x=t.jsxs(ya,{onClick:n,children:[t.jsx(S,{color:c.palette.white,fontWeight:a,size:"sm",textDecoration:"underline",children:i}),t.jsx(I,{icon:r??"arrow-right",iconColor:c.palette.white,iconSize:"xs",iconType:a==="bold"?"fa-regular":"fa-light"})]});return t.jsxs($,{alignItems:"center",bgGradient:c.palette.gradients["01"],display:d?"flex":"none",id:"message-banner",justify:"space-between",padding:[.75,.75,.75,.75],children:[t.jsxs($,{display:"flex",gap:.5,justify:"center",width:"100%",children:[l==="start"&&n?x:void 0,t.jsx($,{children:typeof e=="string"?t.jsx(S,{color:c.palette.white,display:"inline",size:"sm",children:e}):e}),l==="end"&&n?x:void 0]}),t.jsx(I,{clickable:!0,hoverColor:c.palette.primary[200],icon:"close",iconColor:c.palette.white,iconSize:"xs",iconType:"fa-light",onClick:g})]})},wa=s.dt.div`
|
|
2158
2158
|
${({theme:e,$variant:n})=>`
|
|
2159
2159
|
background: ${e.palette.white};
|
|
2160
2160
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2173,7 +2173,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2173
2173
|
right: 16px;
|
|
2174
2174
|
}
|
|
2175
2175
|
`}
|
|
2176
|
-
`,
|
|
2176
|
+
`,ja=s.dt.div`
|
|
2177
2177
|
${({theme:e,$variant:n})=>`
|
|
2178
2178
|
height: ${e.spacing[2.5]};
|
|
2179
2179
|
width: ${e.spacing[2.5]};
|
|
@@ -2204,7 +2204,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2204
2204
|
color: ${e.palette[n][500]};
|
|
2205
2205
|
}
|
|
2206
2206
|
`}
|
|
2207
|
-
`,
|
|
2207
|
+
`,va=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",ka=({description:e,onClose:n,title:i,variant:a})=>{const r=s.nt(),o=f.useCallback(()=>{n==null||n()},[n]);return t.jsxs(wa,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(ja,{$variant:a,children:[t.jsx(I,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(I,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(I,{icon:va(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(V,{fontWeight:"bold",size:"xs",children:i}),t.jsx(S,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(B,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Ca=s.dt.div`
|
|
2208
2208
|
width: fit-content;
|
|
2209
2209
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2210
2210
|
border-radius: 4px;
|
|
@@ -2237,7 +2237,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2237
2237
|
&::-webkit-inner-spin-button {
|
|
2238
2238
|
opacity: 1;
|
|
2239
2239
|
}
|
|
2240
|
-
`,za=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const
|
|
2240
|
+
`,za=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const x=i<0?0:i,[u,h]=f.useState(Number(a).toFixed(x)),b=f.useCallback(y=>{const j=s.lodashExports.toNumber(y.target.value);y.target.value.endsWith(".")?h(y.target.value):j>=Number(o)&&j<=Number(r)&&(h(String(j)),n&&c(s.lodashExports.toNumber(j.toFixed(x)))),y.stopPropagation()},[n,x,r,o,c]),m=f.useCallback(y=>{y.currentTarget.contains(y.relatedTarget)||h(Number(a).toFixed(x)),y.stopPropagation()},[x,a]),w=f.useCallback(y=>{y.stopPropagation(),y.key==="Enter"&&!s.lodashExports.isEmpty(y.currentTarget.value)&&c(s.lodashExports.toNumber(y.currentTarget.value))},[c]);return t.jsx(Ca,{onBlur:m,tabIndex:-1,children:t.jsx(Y,{id:"numberInputTooltip",tip:d,children:t.jsx(Sa,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(u),max:r,min:o,name:l,onChange:b,onKeyUp:w,ref:g,step:10**-x,type:"number",value:u})})})}),Ia={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},He=({icon:e,label:n,onClick:i,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(te,{alt:`${r} Logo`,height:"100%",publicId:Ia[r],width:"100%"}):t.jsx(I,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(S,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:n??r})})]})},Ta=({align:e="end",buttonLabel:n="Add Credential",children:i,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=f.useState(!1),p=f.useRef(null);me(p.current,()=>{d(!1)},!0);const g=f.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),x=f.useCallback(()=>{d(h=>!h)},[d]),u=f.useCallback(h=>b=>{var m;(m=o[h])==null||m.onClick(b),d(!1)},[o]);return t.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(P,{icon:"plus",onClick:x,variant:"primary",children:n}),t.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:a,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(He,{onClick:u(h),provider:h},h)),r===void 0?void 0:t.jsx(He,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),i]})]})},Fa=s.dt.div`
|
|
2241
2241
|
${({theme:e})=>`
|
|
2242
2242
|
height: ${e.spacing[1]};
|
|
2243
2243
|
width: ${e.spacing[1]};
|
|
@@ -2348,12 +2348,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2348
2348
|
border-start-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2349
2349
|
background-color: ${a==="compliance"?Ra(e,n):"inherit"};
|
|
2350
2350
|
`}
|
|
2351
|
-
`,Pa=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:a=!1,orientation:r="horizontal",rounded:o=!0,variant:l="default"})=>{const c=a&&i==="left",d=a?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(S,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(Da,{$minWidth:e,$orientation:r,$rounded:o,$variant:l,className:r,children:t.jsx(La,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},rn=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),a=typeof n=="string",r=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(S,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(f.Fragment,{children:[t.jsx(se,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(r).map((o,l)=>n.includes(o)?t.jsx(se,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(S,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Aa=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:
|
|
2351
|
+
`,Pa=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:a=!1,orientation:r="horizontal",rounded:o=!0,variant:l="default"})=>{const c=a&&i==="left",d=a?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(S,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(Da,{$minWidth:e,$orientation:r,$rounded:o,$variant:l,className:r,children:t.jsx(La,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},rn=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),a=typeof n=="string",r=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(S,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(f.Fragment,{children:[t.jsx(se,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(r).map((o,l)=>n.includes(o)?t.jsx(se,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(S,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Aa=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:x})=>{const u=s.nt(),{alt:h,src:b,width:m="77px",height:w="77px"}=d,y=f.useCallback(()=>{n==null||n.onClick()},[n]),j=f.useCallback(()=>{r==null||r.onClick()},[r]),v=t.jsx($,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs($,{bgColor:u.palette.white,border:`1px solid ${u.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,pb:2.5,pl:2.5,pr:2.5,pt:2.5,shadow:"lg",width:"100%",zIndex:11,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx($,{children:t.jsx(te,{alt:h,height:w,publicId:b,width:m})}),t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(V,{color:x,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(rn,{description:l,highlightDescription:c})]})]}),a&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:a})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(r)?t.jsx(P,{onClick:j,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,s.lodashExports.isObject(n)?t.jsx(P,{onClick:y,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?ie.createPortal(v,o??document.body):v},Wa=s.dt.div.attrs({className:"comp-scroll-up"})`
|
|
2352
2352
|
bottom: 15px;
|
|
2353
2353
|
position: fixed;
|
|
2354
2354
|
right: 140px;
|
|
2355
2355
|
z-index: 100;
|
|
2356
|
-
`,Ba=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,a]=f.useState(!1),[r,o]=f.useState(null);f.useEffect(()=>{o(document.getElementById(e)),r==null||r.addEventListener("scroll",()=>{a(r.scrollTop>n)})},[r,e,n]);const l=f.useCallback(()=>{r==null||r.scrollTo({behavior:"smooth",top:0})},[r]);return i?t.jsx(Wa,{children:t.jsx(B,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},Ma={critical:{bgColor:z.palette.primary[700],colorL:z.palette.gray[800],colorR:z.palette.white},disable:{bgColor:z.palette.gray[200],colorL:z.palette.gray[400],colorR:z.palette.gray[400]},high:{bgColor:z.palette.error[500],colorL:z.palette.gray[800],colorR:z.palette.white},low:{bgColor:z.palette.warning[200],colorL:z.palette.gray[800],colorR:z.palette.gray[800]},medium:{bgColor:z.palette.warning[500],colorL:z.palette.gray[800],colorR:z.palette.gray[800]}},
|
|
2356
|
+
`,Ba=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,a]=f.useState(!1),[r,o]=f.useState(null);f.useEffect(()=>{o(document.getElementById(e)),r==null||r.addEventListener("scroll",()=>{a(r.scrollTop>n)})},[r,e,n]);const l=f.useCallback(()=>{r==null||r.scrollTo({behavior:"smooth",top:0})},[r]);return i?t.jsx(Wa,{children:t.jsx(B,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},Ma={critical:{bgColor:z.palette.primary[700],colorL:z.palette.gray[800],colorR:z.palette.white},disable:{bgColor:z.palette.gray[200],colorL:z.palette.gray[400],colorR:z.palette.gray[400]},high:{bgColor:z.palette.error[500],colorL:z.palette.gray[800],colorR:z.palette.white},low:{bgColor:z.palette.warning[200],colorL:z.palette.gray[800],colorR:z.palette.gray[800]},medium:{bgColor:z.palette.warning[500],colorL:z.palette.gray[800],colorR:z.palette.gray[800]}},Oa=({textL:e,textR:n,variant:i})=>{const a=s.nt(),{bgColor:r,colorL:o,colorR:l}=Ma[i];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${r}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(S,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:r,border:`1px solid ${r}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(S,{color:l,size:"xs",children:n})})]})},Ha=(e,n)=>{const i={critical:z.palette.primary[700],high:z.palette.error[500],low:z.palette.warning[200],medium:z.palette.warning[500],none:z.palette.gray[200]},a={disabled:z.palette.gray[400],enabled:z.palette.gray[800]},r={critical:z.palette.white,high:z.palette.white,low:z.palette.gray[800],medium:z.palette.gray[800],none:z.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?r.none:r[e],textColor:n<1?a.disabled:a.enabled}},oe=({variant:e,value:n})=>{const{iconColor:i,iconText:a,iconTextColor:r,textColor:o}=Ha(e,n),l=s.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(Y,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(S,{color:r,size:"sm",textAlign:"center",children:a})})}),t.jsx(S,{color:o,size:"sm",children:n})]})},_a=({critical:e,high:n,medium:i,low:a})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(oe,{value:e,variant:"critical"}),t.jsx(oe,{value:n,variant:"high"}),t.jsx(oe,{value:i,variant:"medium"}),t.jsx(oe,{value:a,variant:"low"})]}),Va=s.dt.div`
|
|
2357
2357
|
${({theme:e})=>`
|
|
2358
2358
|
border-radius: ${e.spacing[.25]};
|
|
2359
2359
|
cursor: pointer;
|
|
@@ -2394,7 +2394,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2394
2394
|
height: auto;
|
|
2395
2395
|
}
|
|
2396
2396
|
`}
|
|
2397
|
-
`,Ya=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),
|
|
2397
|
+
`,Ya=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),x=f.useRef(null),u=f.useCallback(h=>()=>{h(),r()},[r]);return f.useEffect(()=>{const h=["mousedown","touchstart"],b=m=>{var k;const w=m.target,y=document.getElementById("helpBtn"),j=document.getElementById("filterBtn"),v=(w===y||((y==null?void 0:y.contains(w))??!1)||w===j||(j==null?void 0:j.contains(w)))??!1;i&&!v&&!(((k=x.current)==null?void 0:k.contains(w))??!1)&&r()};return h.forEach(m=>{document.addEventListener(m,b,{passive:!0})}),()=>{h.forEach(m=>{document.removeEventListener(m,b)})}},[i,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(Ga,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:x,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs($,{height:"100%",position:"relative",children:[t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(S,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(B,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs($,{py:1.25,children:[(a??[]).map(({customBadge:h,description:b,icon:m,onClick:w,requiresUpgrade:y,title:j})=>t.jsx(an,{customBadge:h,description:b,icon:m,onClick:u(w),requiresUpgrade:y,title:j},j)),e&&t.jsx($,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderColor:g.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(P,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(P,{onClick:l,type:"submit",children:o})]})]})]})})})},qa=(e,n)=>n>=50?`
|
|
2398
2398
|
${e.palette.gray[200]} 50%,
|
|
2399
2399
|
${e.palette.primary[500]} 50.05%,
|
|
2400
2400
|
${e.palette.primary[500]} ${n}%,
|
|
@@ -2470,7 +2470,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2470
2470
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2471
2471
|
width: 59px;
|
|
2472
2472
|
`}
|
|
2473
|
-
`,on=({state:e,trackRef:n,index:i,name:a})=>{const r=f.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:n,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},Za=(e,n,i)=>Math.round((i-e)/(n-e)*100),Qa=e=>{const n=s.nt(),i=f.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),
|
|
2473
|
+
`,on=({state:e,trackRef:n,index:i,name:a})=>{const r=f.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:n,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},Za=(e,n,i)=>Math.round((i-e)/(n-e)*100),Qa=e=>{const n=s.nt(),i=f.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),x=Za(r,o,g.getThumbValue(0)),{groupProps:u,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,i);return t.jsx(H,{htmlFor:l,label:a,children:t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(Ka,{...u,$min:r??0,$value:x,className:"slider",children:[t.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:i,children:t.jsx(on,{index:0,name:l,state:g,trackRef:i})}),t.jsxs(Xa,{children:[t.jsx("p",{children:`${p.format(r)} (Low)`}),r<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${p.format(o)} (High)`})]})]}),t.jsx(Ja,{children:t.jsx(S,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:eo}=K(e=>({completed:`
|
|
2474
2474
|
background-color: ${e.palette.primary[500]};
|
|
2475
2475
|
color: ${e.palette.white};
|
|
2476
2476
|
|
|
@@ -2548,7 +2548,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2548
2548
|
|
|
2549
2549
|
${eo(e,n)}
|
|
2550
2550
|
`}
|
|
2551
|
-
`,ao=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=f.useState(1),c=f.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(to,{children:r.map((d,p)=>{const{content:g,title:
|
|
2551
|
+
`,ao=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=f.useState(1),c=f.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(to,{children:r.map((d,p)=>{const{content:g,title:x,nextAction:u,previousAction:h}=d,b=p+1,m=b===o?"current":"disabled",w=b<o?"completed":m;return t.jsxs(no,{children:[t.jsx($,{maxWidth:"40px",position:"relative",children:t.jsx(ro,{$variant:w,children:w==="completed"?t.jsx(I,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs($,{ml:1.5,width:"100%",children:[t.jsx(V,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:x}),w==="current"&&t.jsxs($,{children:[g,t.jsxs(io,{children:[o>1&&t.jsx(P,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<r.length?t.jsx(P,{disabled:d.isDisabledNext??!1,onClick:c(1,u),variant:"primary",children:"Next step"}):t.jsx(P,{disabled:e,onClick:a,type:i,variant:"primary",children:n})]})]})]})]},d.title)})})},oo=s.dt.button`
|
|
2552
2552
|
${({theme:e})=>`
|
|
2553
2553
|
align-items: center;
|
|
2554
2554
|
background-color: ${e.palette.white};
|
|
@@ -2722,7 +2722,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2722
2722
|
color: ${e.palette.white};
|
|
2723
2723
|
}
|
|
2724
2724
|
`}
|
|
2725
|
-
`,fo=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{r(l),i(l)},[i]);return t.jsx(uo,{children:n.map((l,c)=>t.jsx(xo,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(S,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},ho={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:""},bo=({run:e,steps:n,onFinish:i})=>{const[a,r]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:p,index:g,status:
|
|
2725
|
+
`,fo=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{r(l),i(l)},[i]);return t.jsx(uo,{children:n.map((l,c)=>t.jsx(xo,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(S,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},ho={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:""},bo=({run:e,steps:n,onFinish:i})=>{const[a,r]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:p,index:g,status:x,type:u}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(u)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(x)||p==="close")&&(r(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})},$o=({items:e})=>t.jsx(mr,{children:e.map(({isActive:n,label:i,onClick:a},r)=>t.jsx(yr,{className:n?"active":"",onClick:a,type:"button",children:t.jsx(V,{color:"inherit",fontWeight:"semibold",size:"sm",sizeSm:"xs",children:i})},`${i}-${r}`))}),ln=t.jsx($,{alignItems:"center",bgColor:z.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(S,{bgGradient:z.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),yo=s.dt.div`
|
|
2726
2726
|
${({className:e,theme:n})=>`
|
|
2727
2727
|
align-items: flex-start;
|
|
2728
2728
|
border-radius: ${n.spacing[1]};
|
|
@@ -2788,4 +2788,4 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2788
2788
|
}
|
|
2789
2789
|
`}
|
|
2790
2790
|
`;const mo={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
|
|
2791
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},wo=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=mo[i],c=e??r;return t.jsxs(yo,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&ln,t.jsx(V,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(S,{color:z.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(S,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(P,{onClick:n,variant:"primary",children:l})]})};exports.Accordion=Bn;exports.AccordionContent=gt;exports.ActionButton=Be;exports.Alert=qn;exports.AppliedFilter=ae;exports.AppliedFilters=Mr;exports.ArrayField=Ae;exports.Avatar=ni;exports.BaseButtonComponent=_e;exports.BaseComponent=$e;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=Ve;exports.Button=P;exports.Button$1=
|
|
2791
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},wo=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=mo[i],c=e??r;return t.jsxs(yo,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&ln,t.jsx(V,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(S,{color:z.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(S,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(P,{onClick:n,variant:"primary",children:l})]})};exports.Accordion=Bn;exports.AccordionContent=gt;exports.ActionButton=Be;exports.Alert=qn;exports.AppliedFilter=ae;exports.AppliedFilters=Mr;exports.ArrayField=Ae;exports.Avatar=ni;exports.BaseButtonComponent=_e;exports.BaseComponent=$e;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=Ve;exports.Button=P;exports.Button$1=ve;exports.ButtonToolbarCenter=Si;exports.ButtonToolbarRow=Ii;exports.ButtonToolbarStartRow=zi;exports.Calendar=mt;exports.Calendar$1=Ct;exports.Calendar$2=zt;exports.CalendarCell=yt;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=ai;exports.CardWithInput=Yi;exports.CardWithOptions=Ut;exports.CardWithSelector=Qi;exports.CardWithSwitch=nr;exports.Carousel=lr;exports.Checkbox=Ee;exports.CodeSnippet=pr;exports.Col=Pe;exports.ColumFilters=Zt;exports.ColumnsModal=Nr;exports.ComboBox=bt;exports.ComboBoxField=Le;exports.Container=$;exports.CustomThemeProvider=Nn;exports.DateField=jt;exports.DateSelector=le;exports.Description=rn;exports.Dialog=Te;exports.Divider=ne;exports.Editable=Ci;exports.EmptyButton=Oe;exports.EmptyState=qr;exports.FilePreview=ft;exports.FilterControl=qt;exports.FilterForm=Me;exports.FilterFormContent=Kt;exports.FiltersList=Jt;exports.FixedTabs=$o;exports.Form=Jr;exports.Gap=Ni;exports.GridContainer=Qr;exports.GroupSelector=ta;exports.Header=Ie;exports.Header$1=Mt;exports.Heading=V;exports.Icon=I;exports.IconButton=B;exports.IndicatorCard=na;exports.InfoSidebar=ia;exports.InnerForm=Kr;exports.Input=Fe;exports.InputArray=Ri;exports.InputDate=kt;exports.InputDateRange=St;exports.InputDateTime=ki;exports.InputFile=Ai;exports.InputNumber=Ft;exports.InputNumberRange=Nt;exports.InputTags=Bi;exports.Label=Ge;exports.Link=Q;exports.ListItem=we;exports.ListItemsWrapper=_t;exports.LittleFlag=aa;exports.Loading=ua;exports.LocationCode=At;exports.Logo=fa;exports.Lottie=ba;exports.MemoizedImage=te;exports.Menu=$a;exports.MenuItem=an;exports.MessageBanner=ma;exports.Modal=en;exports.ModalConfirm=$r;exports.ModalFooter=Bt;exports.Notification=ka;exports.NotificationSign=Ot;exports.NumberField=Ce;exports.NumberInput=za;exports.OAuthSelector=Ta;exports.Option=ht;exports.OptionBoxContainer=Je;exports.OptionContainer=He;exports.OptionContainer$1=tn;exports.OutlineContainer=H;exports.PhoneInput=Ui;exports.PlanCard=wo;exports.PopUp=Aa;exports.Popover=ye;exports.PremiumFeature=nn;exports.PreviewPanel=Vt;exports.PriorityScore=Na;exports.ProgressBar=Pa;exports.RadioButton=qe;exports.RecommendedTag=ln;exports.Row=It;exports.ScrollUpButton=Ba;exports.Search=ce;exports.SearchPanel=Yt;exports.SeverityBadge=Oa;exports.SeverityOverview=_a;exports.SeverityOverviewBadge=oe;exports.ShowOnHover=Ua;exports.SlideOutMenu=Ya;exports.Slider=Qa;exports.Span=se;exports.StepLapse=ao;exports.Tab=Ht;exports.TableButton=lo;exports.Tabs=Xe;exports.Tag=X;exports.TagsField=We;exports.Text=S;exports.TextArea=Gi;exports.Thumb=on;exports.TimeField=vt;exports.TimeLine=go;exports.TimeLineCard=sn;exports.Toggle=Lt;exports.ToggleButton=fo;exports.Tooltip=Y;exports.Tour=bo;exports.baseStep=ho;exports.formatCheckValues=Qt;exports.getStyledConfig=be;exports.hiddenProps=dt;exports.icons=Tn;exports.setBorder=ue;exports.setDisplay=xe;exports.setInteraction=he;exports.setMargin=pe;exports.setPadding=de;exports.setPosition=ge;exports.setText=fe;exports.theme=z;exports.uniqueIcons=Fn;exports.useCarousel=Et;exports.useClickOutside=me;exports.useCloudinaryImage=Rt;exports.useColumnsModal=qi;exports.useConfirmDialog=Vr;exports.useDebouncedCallback=Dt;exports.useFilterForm=Xt;exports.useFilters=_r;exports.useModal=Ne;exports.useSearch=Ki;exports.variantBuilder=K;
|