@fluidattacks/design 3.16.10 → 3.16.11-pr
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/@core/index.js +1 -1
- package/dist/components/accordion/accordion-content/index.js +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/card-header/index.js +1 -1
- package/dist/components/card/card-with-image/index.js +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-options/index.js +1 -1
- package/dist/components/card/card-with-selector/index.js +1 -1
- package/dist/components/card/card-with-switch/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-array/field/index.js +1 -1
- package/dist/components/inputs/fields/input-array/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/layout/categories/buttons/index.js +1 -1
- package/dist/components/layout/categories/column/index.js +1 -1
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/lottie/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/modal/columns-modal/index.js +1 -1
- package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
- package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
- package/dist/components/modal/filters-modal/index.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-DAUQDJ-6.mjs → components-BtE-ejxa.mjs} +60 -59
- package/dist/{components-BgXAvnBU.js → components-FZBJdgdd.js} +53 -53
- 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"),
|
|
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"),q=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}),T=(e,n)=>n===void 0?"":`${e}: ${n};`,de=e=>{const n=e.py??e.pt??0,i=e.px??e.pr??0,r=e.py??e.pb??0,a=e.px??e.pl??0;if(e.padding){const[o,l,c,d]=e.padding;return`padding: ${z.spacing[o]} ${z.spacing[l]} ${z.spacing[c]} ${z.spacing[d]};`}return`padding: ${z.spacing[n]} ${z.spacing[i]} ${z.spacing[r]} ${z.spacing[a]};`},pe=e=>{const n=e.my??e.mt??0,i=e.mx??e.mr??0,r=e.my??e.mb??0,a=e.mx??e.ml??0;if(e.margin){const[o,l,c,d]=e.margin;return`margin: ${z.spacing[o]} ${z.spacing[l]} ${z.spacing[c]} ${z.spacing[d]};`}return`margin: ${z.spacing[n]} ${z.spacing[i]} ${z.spacing[r]} ${z.spacing[a]};`},ge=e=>{const n=T("position",e.position),i=T("top",e.top),r=T("right",e.right),a=T("bottom",e.bottom),o=T("left",e.left),l=T("z-index",e.zIndex);return`
|
|
2
2
|
${n}
|
|
3
3
|
${i}
|
|
4
4
|
${r}
|
|
5
5
|
${a}
|
|
6
6
|
${o}
|
|
7
7
|
${l}
|
|
8
|
-
`},
|
|
8
|
+
`},ue=e=>{const n=T("border",e.border),i=T("border-top",e.borderTop),r=T("border-right",e.borderRight),a=T("border-bottom",e.borderBottom),o=T("border-left",e.borderLeft),l=T("border-color",e.borderColor),c=T("border-radius",e.borderRadius);return`
|
|
9
9
|
${n}
|
|
10
10
|
${i}
|
|
11
11
|
${r}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
${o}
|
|
14
14
|
${l}
|
|
15
15
|
${c}
|
|
16
|
-
`},En=e=>e.includes("x")?"overflow-x: auto;":"",Rn=e=>e.includes("y")?"overflow-y: auto;":"",
|
|
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
19
|
`:"",i=T("visibility",e.visibility),r=T("display",e.display),a=T("height",e.height),o=T("width",e.width),l=T("max-height",e.maxHeight),c=T("max-width",e.maxWidth),d=T("min-height",e.minHeight),p=T("min-width",e.minWidth),g=T("box-shadow",e.shadow?z.shadows[e.shadow]:void 0),x=T("gap",e.gap===void 0?void 0:z.spacing[e.gap]),u=T("background-color",e.bgColor),h=T("background",e.bgGradient),b=T("flex-direction",e.flexDirection),m=T("flex-grow",e.flexGrow),w=T("justify-content",e.justify),y=T("justify-self",e.justifySelf),j=T("align-items",e.alignItems),k=T("align-self",e.alignSelf),v=T("flex-wrap",e.wrap);return`
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
${j}
|
|
38
38
|
${k}
|
|
39
39
|
${v}
|
|
40
|
-
`},
|
|
40
|
+
`},fe=e=>{const n=T("color",e.color),i=T("font-family",e.fontFamily),r=T("font-size",e.fontSize),a=T("font-weight",e.fontWeight),o=T("line-spacing",e.letterSpacing),l=T("line-height",e.lineSpacing),c=T("text-align",e.textAlign),d=T("text-decoration",e.textDecoration),p=T("text-overflow",e.textOverflow),g=T("white-space",e.whiteSpace),x=T("word-break",e.wordBreak),u=T("word-wrap",e.wordWrap);return`
|
|
41
41
|
${n}
|
|
42
42
|
${i}
|
|
43
43
|
${r}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
${g}
|
|
51
51
|
${x}
|
|
52
52
|
${u}
|
|
53
|
-
`},
|
|
53
|
+
`},he=e=>{const n=T("cursor",e.cursor),i=T("border-color",e.borderColorHover),r=T("background-color",e.bgColorHover),a=T("box-shadow",e.shadowHover===void 0?void 0:z.shadows[e.shadowHover]),o=T("transition",e.transition);return`
|
|
54
54
|
${n}
|
|
55
55
|
|
|
56
56
|
&:hover {
|
|
@@ -59,39 +59,39 @@
|
|
|
59
59
|
${r}
|
|
60
60
|
${a}
|
|
61
61
|
}
|
|
62
|
-
`},
|
|
63
|
-
${ce}
|
|
62
|
+
`},be={shouldForwardProp:e=>!dt.includes(e)},$e=s.dt.div.withConfig(be)`
|
|
64
63
|
${de}
|
|
65
64
|
${pe}
|
|
66
|
-
${ue}
|
|
67
|
-
${xe}
|
|
68
65
|
${ge}
|
|
66
|
+
${xe}
|
|
69
67
|
${fe}
|
|
70
|
-
|
|
71
|
-
${
|
|
68
|
+
${ue}
|
|
69
|
+
${he}
|
|
70
|
+
`,_e=s.dt.button.withConfig(be)`
|
|
72
71
|
${de}
|
|
73
72
|
${pe}
|
|
74
|
-
${ue}
|
|
75
|
-
${xe}
|
|
76
73
|
${ge}
|
|
74
|
+
${xe}
|
|
77
75
|
${fe}
|
|
78
|
-
|
|
79
|
-
${
|
|
76
|
+
${ue}
|
|
77
|
+
${he}
|
|
78
|
+
`,Ve=s.dt.p.withConfig(be)`
|
|
80
79
|
${de}
|
|
81
80
|
${pe}
|
|
82
|
-
${ue}
|
|
83
|
-
${xe}
|
|
84
81
|
${ge}
|
|
82
|
+
${xe}
|
|
85
83
|
${fe}
|
|
86
|
-
|
|
87
|
-
${
|
|
84
|
+
${ue}
|
|
85
|
+
${he}
|
|
86
|
+
`,Ue=s.dt.span.withConfig(be)`
|
|
88
87
|
${de}
|
|
89
88
|
${pe}
|
|
90
|
-
${ue}
|
|
91
|
-
${xe}
|
|
92
89
|
${ge}
|
|
90
|
+
${xe}
|
|
93
91
|
${fe}
|
|
94
|
-
|
|
92
|
+
${ue}
|
|
93
|
+
${he}
|
|
94
|
+
`,Dn=s.dt($e)`
|
|
95
95
|
${({theme:e,$center:n=!1,$styleMd:i,$styleSm:r})=>`
|
|
96
96
|
${n?"margin: auto;":""}
|
|
97
97
|
scrollbar-color: ${e.palette.gray[600]} ${e.palette.gray[100]};
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
|
|
180
180
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
181
181
|
`}
|
|
182
|
-
`,V=f.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:x,sizeMd:u,sizeSm:h,textFill:b,whiteSpace:m,wordBreak:w,...y},j){return t.jsx(Ln,{$bgGradient:n,$color:a,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:x,$sizeMd:u,$sizeSm:h,$textFill:b,$whiteSpace:m,$wordBreak:w,className:r,ref:j,...y,children:i})}),
|
|
182
|
+
`,V=f.forwardRef(function({bgGradient:n,children:i,className:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:x,sizeMd:u,sizeSm:h,textFill:b,whiteSpace:m,wordBreak:w,...y},j){return t.jsx(Ln,{$bgGradient:n,$color:a,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:x,$sizeMd:u,$sizeSm:h,$textFill:b,$whiteSpace:m,$wordBreak:w,className:r,ref:j,...y,children:i})}),se=f.forwardRef(function({children:n,color:i,content:r,display:a,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:r,$display:a,$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:r,color:a,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:x,sizeMd:u,sizeSm:h,textFill:b,whiteSpace:m,wordBreak:w,...y},j){return t.jsx(pt,{$bgGradient:n,$color:a,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:x,$sizeMd:u,$sizeSm:h,$textFill:b,$whiteSpace:m,$wordBreak:w,className:r,ref:j,...y,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)`
|
|
183
183
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:r,$rotation:a,$size:o,$secondaryColor:l})=>{const c=r?"":"brightness(50%)",d=r??"";return`
|
|
184
184
|
color: ${n};
|
|
185
185
|
cursor: ${e?"pointer":"inherit"};
|
|
@@ -404,7 +404,7 @@
|
|
|
404
404
|
margin: 0 !important;
|
|
405
405
|
}
|
|
406
406
|
`}
|
|
407
|
-
`,Gn=s.dt(
|
|
407
|
+
`,Gn=s.dt($e)``,Yn=s.dt.div`
|
|
408
408
|
${({theme:e,$maxWidth:n="320px"})=>`
|
|
409
409
|
background-color: ${e.palette.gray[700]};
|
|
410
410
|
border-radius: 8px;
|
|
@@ -415,7 +415,7 @@
|
|
|
415
415
|
width: max-content;
|
|
416
416
|
z-index: 999999;
|
|
417
417
|
`}
|
|
418
|
-
`,G=({children:e,disabled:n=!1,display:i="inline-block",height:r,icon:a,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:x="",title:u="",hide:h=x===""&&u===""&&p===void 0,width:b})=>{const m=s.nt(),[w,y]=f.useState(!1),{refs:j,floatingStyles:k,context:v}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:y,open:w,placement:g,whileElementsMounted:s.autoUpdate}),F=s.useHover(v,{delay:{close:0,open:500},move:!1}),R=s.useFocus(v),C=s.useRole(v,{role:a?"label":"tooltip"}),{getReferenceProps:N,getFloatingProps:D}=s.useInteractions([F,R,C]);return n?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Gn,{...N(),display:i,height:r,id:c,ref:j.setReference,width:b,children:a?t.jsx(I,{clickable:!0,disabled:n,icon:a,iconColor:o,iconSize:l??"xxs",iconType:w?"fa-solid":"fa-light"}):e}),w&&!h&&
|
|
418
|
+
`,G=({children:e,disabled:n=!1,display:i="inline-block",height:r,icon:a,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:x="",title:u="",hide:h=x===""&&u===""&&p===void 0,width:b})=>{const m=s.nt(),[w,y]=f.useState(!1),{refs:j,floatingStyles:k,context:v}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:y,open:w,placement:g,whileElementsMounted:s.autoUpdate}),F=s.useHover(v,{delay:{close:0,open:500},move:!1}),R=s.useFocus(v),C=s.useRole(v,{role:a?"label":"tooltip"}),{getReferenceProps:N,getFloatingProps:D}=s.useInteractions([F,R,C]);return n?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Gn,{...N(),display:i,height:r,id:c,ref:j.setReference,width:b,children:a?t.jsx(I,{clickable:!0,disabled:n,icon:a,iconColor:o,iconSize:l??"xxs",iconType:w?"fa-solid":"fa-light"}):e}),w&&!h&&ie.createPortal(t.jsxs(Yn,{...D(),$maxWidth:d,id:`floating-${c}`,ref:j.setFloating,style:k,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:r,iconColor:a,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},k){const v=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:k,type:h,value:w,...j,children:t.jsx(I,{clickable:!1,icon:r,iconColor:a,iconSize:o,iconTransform:l,iconType:c})}),R=(h+(y??"")+(d??r)).replace(/ /u,"_");return b===void 0?v:t.jsx(G,{id:`${R}-tooltip`,place:m,tip:b,children:v})}),qn=f.forwardRef(function({autoHide:n=!1,children:i,closable:r=!1,onTimeOut:a,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(()=>{a==null||a(!0),n&&h()},l*1e3);return()=>{clearTimeout(b)}},[n,h,l,a]),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}),r?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`
|
|
419
419
|
${({theme:e})=>`
|
|
420
420
|
align-items: center;
|
|
421
421
|
background-color: ${e.palette.gray[200]};
|
|
@@ -633,7 +633,7 @@
|
|
|
633
633
|
${xt}
|
|
634
634
|
`,ei=s.dt(De.Link)`
|
|
635
635
|
${xt}
|
|
636
|
-
`,Z=({children:e,color:n,download:i,href:r,iconPosition:a="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=r.startsWith("https://"),p=t.jsx(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:r,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[a==="left"?p:void 0,e,a==="right"?p:void 0]}):t.jsxs(ei,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:r,children:[l!==void 0&&a==="left"?p:void 0,e,l!==void 0&&a==="right"?p:void 0]})},K=({disabled:e,icon:n,iconColor:i="inherit",iconType:r="fa-light",id:a="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:x="",tagLabel:u,variant:h="default"})=>{const b=u.length>25&&s.lodashExports.isEmpty(x+o),m=`${u.slice(0,25)}...`;return t.jsxs(
|
|
636
|
+
`,Z=({children:e,color:n,download:i,href:r,iconPosition:a="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=r.startsWith("https://"),p=t.jsx(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:r,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[a==="left"?p:void 0,e,a==="right"?p:void 0]}):t.jsxs(ei,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:r,children:[l!==void 0&&a==="left"?p:void 0,e,l!==void 0&&a==="right"?p:void 0]})},K=({disabled:e,icon:n,iconColor:i="inherit",iconType:r="fa-light",id:a="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle: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:r}),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:a,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(Z,{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:r=!1,fontSize:a,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,...k},v){const F=h!==void 0,R=`${l}-tooltip`,C=f.useCallback(()=>{o&&ti(o,r)},[r,o]),N=t.jsxs(ut,{$size:a,$variant:y,"aria-disabled":i,className:m?"underline":void 0,disabled:i,id:l,name:d,onClick:y==="link"?C:p,ref:v,type:u,value:w,width:j,...F?{"data-tooltip-id":R}:{},...k,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(K,{tagLabel:x,variant:"default"})]});return F?t.jsx(G,{disabled:!F,id:R,place:b,tip:h,width:j,children:N}):N}),ni=f.forwardRef(function({children:n,onClick:i,userName:r,showIcon:a=!1,showUsername:o=!1},l){const c=!!i;return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(P,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(et,{children:r[0].toUpperCase()}),o?t.jsx(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:r.split(" ")[0]}):void 0,a?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(et,{children:r[0].toUpperCase()}),o?t.jsxs(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",r.split(" ")[0],"!"]}):void 0,a?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(Kn,{children:n})]})})}),Se=({authorEmail:e,date:n,description:i,descriptionColor:r,id:a,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs($,{width:"100%",children:[typeof o=="string"?t.jsx(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:r??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(G,{icon:"circle-info",id:a,tip:p})]})]})},tt=s.dt($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
637
637
|
& img {
|
|
638
638
|
display: block;
|
|
639
639
|
}
|
|
@@ -810,7 +810,7 @@
|
|
|
810
810
|
border: 1px solid ${e.palette.gray[600]};
|
|
811
811
|
}
|
|
812
812
|
`}
|
|
813
|
-
`,H=({children:e,error:n,helpLink:i,helpLinkText:r="Link here",helpText:a,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(K,{priority:"low",tagLabel:`${b}/${d}`,variant:"error"})]}):void 0,a||i?t.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[a&&t.jsxs(t.Fragment,{children:[t.jsx(I,{icon:"circle-info",iconColor:h.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(S,{color:h.palette.gray[400],display:"inline-block",size:"sm",children:a})]}),i&&c==="down"?t.jsx(Z,{href:i,children:r}):void 0]}):void 0]})}
|
|
813
|
+
`,H=({children:e,error:n,helpLink:i,helpLinkText:r="Link here",helpText:a,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(K,{priority:"low",tagLabel:`${b}/${d}`,variant:"error"})]}):void 0,a||i?t.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[a&&t.jsxs(t.Fragment,{children:[t.jsx(I,{icon:"circle-info",iconColor:h.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(S,{color:h.palette.gray[400],display:"inline-block",size:"sm",children:a})]}),i&&c==="down"?t.jsx(Z,{href:i,children:r}):void 0]}):void 0]})},ye=({className:e,children:n,isFilter:i=!1,popoverRef:r,state:a,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:r??c,triggerRef:o,isNonModal:r?!0:void 0},a),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:r??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:n})})},li=s.dt.ul`
|
|
814
814
|
${({theme:e})=>`
|
|
815
815
|
align-self: center;
|
|
816
816
|
background: ${e.palette.white};
|
|
@@ -860,7 +860,7 @@
|
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
`}
|
|
863
|
-
`,ht=({item:e,state:n})=>{const i=s.nt(),r=f.useRef(null),{optionProps:a,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,r),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(ci,{...a,className:d,ref:r,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:r,helpLinkText:a,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,k=(e==null?void 0:e.value)??m,[v,F]=f.useState(((Qe=p.find(L=>L.value===k))==null?void 0:Qe.name)??""),[R,C]=f.useState(k),[N,D]=f.useState(p),[E,A]=f.useState(!1),{contains:U}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),Y=f.useRef(null),X=f.useRef(null),W=f.useRef(null),O=f.useRef(null),M=f.useRef(null),Re=f.useMemo(()=>p.map(L=>U(L.name,v)||E?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:L.name},L.value):null),[U,v,p,E]),cn=f.useCallback(L=>{F(L),L===""?A(!0):(A(!1),C(_=>{const
|
|
863
|
+
`,ht=({item:e,state:n})=>{const i=s.nt(),r=f.useRef(null),{optionProps:a,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,r),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(ci,{...a,className:d,ref:r,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:r,helpLinkText:a,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,k=(e==null?void 0:e.value)??m,[v,F]=f.useState(((Qe=p.find(L=>L.value===k))==null?void 0:Qe.name)??""),[R,C]=f.useState(k),[N,D]=f.useState(p),[E,A]=f.useState(!1),{contains:U}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),Y=f.useRef(null),X=f.useRef(null),W=f.useRef(null),O=f.useRef(null),M=f.useRef(null),Re=f.useMemo(()=>p.map(L=>U(L.name,v)||E?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:L.name},L.value):null),[U,v,p,E]),cn=f.useCallback(L=>{F(L),L===""?A(!0):(A(!1),C(_=>{const te=L===""?"":_;return e&&e.onChange(te),x&&x(L),te}),D(p.filter(_=>U(_.name,L))))},[U,p,e,x]),dn=f.useCallback(L=>{var _;F(((_=p.find(te=>te.value===L))==null?void 0:_.name)??""),C(L?String(L):""),e&&e.onChange(L),x&&x(L?String(L):""),D(p)},[p,e,x]),Ze=f.useCallback(L=>{L.key==="Enter"&&L.preventDefault(),A(!1)},[]),pn=f.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),J=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:v,items:N,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:R,onBlur:pn,onInputChange:cn,onKeyDown:Ze,onKeyUp:()=>{A(!0)},onOpenChange(L,_){A(L&&(_==="manual"||_==="focus"))},onSelectionChange:dn,children:Re}),{buttonProps:gn,inputProps:un,listBoxProps:xn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:v,buttonRef:X,id:d,inputRef:Y,label:l??d,listBoxRef:W,name:d,placeholder:u,popoverRef:M},J),{listBoxProps:fn}=s.$c132121280ec012d$export$50eacbbf140a3141(xn,J,W),{buttonProps:hn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(gn,X);return f.useEffect(()=>{var L;if(c===!1||!k){const _=((L=p.find(te=>te.value===k))==null?void 0:L.name)??"";F(_),C(_)}},[k,p,c]),t.jsxs(H,{error:j,helpLink:r,helpLinkText:a,helpText:o,htmlFor:d,label:l,required:h,tooltip:b,weight:w,children:[t.jsxs(Q,{className:`${n?"disabled":""} ${j?"error":""}`,ref:O,children:[t.jsx("input",{...un,"aria-invalid":j?"true":"false","aria-label":d,onKeyDown:Ze,ref:Y}),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",icon:J.isOpen?"chevron-up":"chevron-down",iconColor:y.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:X,type:"button",variant:"ghost"})]}),J.isOpen&&J.collection.size>0&&!n?t.jsx(ye,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:M,state:J,triggerRef:O,children:t.jsx(li,{...fn,ref:W,children:[...J.collection].map(L=>t.jsx(ht,{item:L,state:J},L.key))})}):null]})},bt=({control:e,disabled:n=!1,error:i,helpLink:r,helpLinkText:a,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 k;return t.jsx(Le,{disabled:n,error:(k=j.error)==null?void 0:k.message,field:y,helpLink:r,helpLinkText:a,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:r,helpLinkText:a,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`
|
|
864
864
|
${({theme:e})=>`
|
|
865
865
|
align-items: center;
|
|
866
866
|
color: ${e.palette.gray[800]};
|
|
@@ -1092,7 +1092,7 @@
|
|
|
1092
1092
|
font-weight: ${e.typography.weight.bold};
|
|
1093
1093
|
}
|
|
1094
1094
|
`}
|
|
1095
|
-
`,ve=({disabled:e=!1,icon:n,props:i})=>{const r=f.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,r);return t.jsx(bi,{...a,$disabled:e,$focus:!!a["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:r,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:r})=>{const a=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(a.add({years:1}))},[a,e]),l=f.useCallback(()=>{e.setFocusedDate(a.subtract({years:1}))},[a,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:n}),t.jsxs(di,{children:[r,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(),r=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,r);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:a,state:r,title:l}),t.jsx(ze,{state:r}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wt=({segment:e,state:n})=>{const i=s.nt(),r=f.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,r),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:r,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},jt=({disabled:e,error:n=!1,props:i})=>{const r=s.nt(),a=f.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,a),c=f.useCallback(d=>{const 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:r.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(wt,{segment:{...d,isEditable:!e},state:o},g)})}),n?t.jsx(I,{icon:"exclamation-circle",iconColor:r.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:r}=i,a=!s.lodashExports.isNil(r)&&r.hour<12?"AM":"PM",[o,l]=f.useState(s.lodashExports.isNil(r)?"AM":a),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=f.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(r)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[o,i,r]);return t.jsxs(yi,{children:[t.jsx(at,{...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(at,{children:[t.jsx(rt,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(rt,{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"),
|
|
1095
|
+
`,ve=({disabled:e=!1,icon:n,props:i})=>{const r=f.useRef(null),{buttonProps:a}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,r);return t.jsx(bi,{...a,$disabled:e,$focus:!!a["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:r,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:r})=>{const a=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(a.add({years:1}))},[a,e]),l=f.useCallback(()=>{e.setFocusedDate(a.subtract({years:1}))},[a,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(ve,{icon:"chevron-left",props:n}),t.jsxs(di,{children:[r,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(),r=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,r);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:a,state:r,title:l}),t.jsx(ze,{state:r}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wt=({segment:e,state:n})=>{const i=s.nt(),r=f.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,r),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:r,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},jt=({disabled:e,error:n=!1,props:i})=>{const r=s.nt(),a=f.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,a),c=f.useCallback(d=>{const 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:r.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(wt,{segment:{...d,isEditable:!e},state:o},g)})}),n?t.jsx(I,{icon:"exclamation-circle",iconColor:r.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:r}=i,a=!s.lodashExports.isNil(r)&&r.hour<12?"AM":"PM",[o,l]=f.useState(s.lodashExports.isNil(r)?"AM":a),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=f.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(r)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[o,i,r]);return t.jsxs(yi,{children:[t.jsx(at,{...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(at,{children:[t.jsx(rt,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(rt,{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:r=!1,granularity:a="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:x})=>{const u=f.useCallback(h=>{const b=a==="day"?ke(String(h)):mi(String(h));o.onChange&&o.onChange(h??null),g&&g(c,b)},[o,a,c,g]);return t.jsxs(Q,{...l,className:`${r?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(jt,{disabled:r,error:e!=null,props:{...o,autoFocus:!1,granularity:a,onChange:u,shouldForceLeadingZeros:!0}}),t.jsx(ve,{disabled:r,icon:a==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:r,id:c,name:c,type:"text",value:x??""})]})},Te=({children:e,...n})=>{const i=f.useRef(null),{dialogProps:r}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(hi,{...r,ref:i,children:e})},kt=({disabled:e=!1,error:n,helpLink:i,helpLinkText:r,helpText:a,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:k,buttonProps:v,dialogProps:F,calendarProps:R}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...u,"aria-label":l??c,name:c},w,h);return t.jsxs(H,{error:n,helpLink:i,helpLinkText:r,helpText:a,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(le,{buttonProps:v,datePickerRef:h,disabled:e,error:n,fieldProps:k,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,{...F,children:t.jsx(mt,{onClose:y,props:R})})}):null]})},Ct=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),r=f.useRef(null),a=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(n,a,r);return t.jsxs("div",{className:"calendar-range",ref:r,children:[t.jsx(Ie,{nextButtonProps:l,prevButtonProps:o,state:a,title:c}),t.jsx(ze,{state:a}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wi=s.dt.div`
|
|
1096
1096
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1097
1097
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1098
1098
|
display: flex;
|
|
@@ -1103,7 +1103,7 @@
|
|
|
1103
1103
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1104
1104
|
}
|
|
1105
1105
|
`}
|
|
1106
|
-
`,St=({disabled:e=!1,error:n,label:i,name:r,required:a,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...x})=>{const u=`${r}Max`,h=`${r}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:k,endFieldProps:v,buttonProps:F,dialogProps:R,calendarProps:C}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...x,"aria-label":i??r},w,b);return t.jsxs(H,{error:n,htmlFor:r,label:i,required:a,tooltip:o,children:[t.jsxs(wi,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(
|
|
1106
|
+
`,St=({disabled:e=!1,error:n,label:i,name:r,required:a,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...x})=>{const u=`${r}Max`,h=`${r}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:k,endFieldProps:v,buttonProps:F,dialogProps:R,calendarProps:C}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...x,"aria-label":i??r},w,b);return t.jsxs(H,{error:n,htmlFor:r,label:i,required:a,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:F,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${r}`,validate:N=>v.value&&N>v.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:F,datePickerRef:b,disabled:e,error:n,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${r}`,validate:N=>k.value&&N<k.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`
|
|
1107
1107
|
${({theme:e})=>`
|
|
1108
1108
|
align-items: center;
|
|
1109
1109
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1118,7 +1118,7 @@
|
|
|
1118
1118
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1119
1119
|
justify-content: flex-end;
|
|
1120
1120
|
flex: 1 0 0;
|
|
1121
|
-
`,zt=({handleTimeChange:e,onClose:n,props:i,timeState:r})=>{const a=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:a.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(vi,{children:t.jsx(vt,{hourCycle:12,label:"time-field",onChange:e,value:r.timeValue})})]}),t.jsx(Ye,{children:t.jsx(P,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ki=e=>{const{disabled:n=!1,error:i,required:r,label:a,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),x=f.useRef(null),u=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:r,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"||s.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=u,{groupProps:b,fieldProps:m,buttonProps:w,dialogProps:y,calendarProps:j}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,u,x),k=f.useCallback(F=>{if(j.onChange&&j.onChange(F),u.timeValue){const R=ot(F,u.timeValue);d==null||d(o,R,{shouldDirty:!0})}else u.setDateValue(F)},[j,o,d,u]),v=f.useCallback(F=>{if(F){u.setTimeValue(F);const R=u.dateValue;if(R){const C=ot(R,F);d==null||d(o,C,{shouldDirty:!0})}}},[u,d,o]);return t.jsxs(H,{error:i,htmlFor:o,label:a,required:r,tooltip:l,children:[t.jsx(
|
|
1121
|
+
`,zt=({handleTimeChange:e,onClose:n,props:i,timeState:r})=>{const a=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:a.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(vi,{children:t.jsx(vt,{hourCycle:12,label:"time-field",onChange:e,value:r.timeValue})})]}),t.jsx(Ye,{children:t.jsx(P,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ki=e=>{const{disabled:n=!1,error:i,required:r,label:a,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),x=f.useRef(null),u=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:r,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"||s.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=u,{groupProps:b,fieldProps:m,buttonProps:w,dialogProps:y,calendarProps:j}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,u,x),k=f.useCallback(F=>{if(j.onChange&&j.onChange(F),u.timeValue){const R=ot(F,u.timeValue);d==null||d(o,R,{shouldDirty:!0})}else u.setDateValue(F)},[j,o,d,u]),v=f.useCallback(F=>{if(F){u.setTimeValue(F);const R=u.dateValue;if(R){const C=ot(R,F);d==null||d(o,C,{shouldDirty:!0})}}},[u,d,o]);return t.jsxs(H,{error:i,htmlFor:o,label:a,required:r,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:v,onClose:h,props:{...j,onChange:k},timeState:u})})}):null]})},Ci=({children:e,currentValue:n,externalLink:i,isEditing:r,label:a,name:o,tooltip:l})=>{if(r)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs($,{children:[t.jsx(Ge,{htmlFor:o,label:a,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Z,{href:d,children:c}):t.jsx(S,{size:"md",children:c})]})},Fe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:r,helpText:a,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:x,name:u,maskValue:h=!1,onPaste:b,placeholder:m,removeItemArray:w,register:y,suggestions:j,tooltip:k,type:v="text",weight:F,...R})=>{const{required:C,onBlur:N,onChange:D}=R,E=s.nt(),A=e?void 0:o,[U,Y]=f.useState(""),X=f.useCallback(M=>{Y(M.target.value),D==null||D(M)},[D]),W=d&&p&&!e&&U.trim()!=="",O=f.useCallback(M=>{M.key==="Enter"&&M.preventDefault()},[]);return t.jsxs(H,{error:A,helpLink:i,helpLinkText:r,helpText:a,htmlFor:u,label:g,linkPosition:x,required:C,tooltip:k,weight:F,children:[t.jsxs(Q,{className:`
|
|
1122
1122
|
${e?"disabled":""} ${A?"error":""} ${W?"success":""}
|
|
1123
1123
|
`,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:v,...y?y(u,{required:C,onBlur:N,onChange:X}):{...R,onChange:X}}),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"})`
|
|
1124
1124
|
gap: 12px;
|
|
@@ -1287,7 +1287,7 @@
|
|
|
1287
1287
|
overflow: hidden;
|
|
1288
1288
|
text-overflow: ellipsis;
|
|
1289
1289
|
white-space: nowrap;
|
|
1290
|
-
`,
|
|
1290
|
+
`,me=(e,n,i=!1)=>{f.useEffect(()=>{var a;const r=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("mousedown",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("mousedown",r,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",r,!0)})},[i,e,n])},Ui=({disabled:e,error:n,label:i,name:r,placeholder:a,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(r))??d,[m,w]=f.useState(!1),[y,j]=f.useState(""),{refs:k,floatingStyles:v}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:F,inputValue:R,handlePhoneValueChange:C,country:N,setCountry:D}=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=>()=>{D(W),w(!1),j("")},[D,w]),Y=f.useCallback(W=>{W.key.length===1?j(O=>O+W.key):W.key==="Backspace"&&j(O=>O.slice(0,-1))},[]),X=s.R.filter(W=>{const{name:O}=s.M(W);return O.toLowerCase().includes(y.toLowerCase())});return me(k.floating.current,()=>{w(!1),j("")},!0),t.jsx(H,{error:h,htmlFor:r,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:Y,ref:k.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(Q,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":r,"aria-required":o,autoComplete:"off","data-testid":`${r}-input`,disabled:e,id:r,name:r,onKeyDown:E,placeholder:a,ref:F,type:"tel",value:R,...l==null?void 0:l(r,{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:k.setFloating,style:v,children:X.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:r,isTouched:a,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 k=s.nt(),v=(w==null?void 0:w(c))??j,F=o&&a&&!e,R=e?void 0:n;return t.jsx(H,{error:R,helpLink:i,helpText:r,htmlFor:c,label:l,maxLength:g,required:h,tooltip:m,value:v?String(v):void 0,weight:y,children:t.jsxs(Q,{className:`
|
|
1291
1291
|
${e?"disabled":""} ${R?"error":""} ${F?"success":""}
|
|
1292
1292
|
`,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:v,...u==null?void 0:u(c,{required:h})}),R?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:k.palette.error[500],iconSize:"xs"}):void 0,F?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:k.palette.success[500],iconSize:"xs"}):void 0]})})},Yi=({description:e,disabled:n,id:i,align:r,inputType:a="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:x})=>{const u=f.useMemo(()=>{if(a==="text")return t.jsx(Fe,{disabled:n,name:d,placeholder:p});if(a==="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,a,d,p]);return t.jsxs(oi,{$align:r,$minHeight:l,$minWidth:c,children:[t.jsx(Se,{description:e,id:i,title:x,tooltip:g}),u]})},Et=(e,n)=>{const[r,a]=f.useState(0),[o,l]=f.useState(0);return f.useEffect(()=>{o===100&&(()=>{a(d=>d===n-1?0:d+1)})()},[o,n]),f.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:r,progress:o,setCycle:a,setProgress:l}},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),r=f.useCallback(()=>{i(!0)},[]),a=f.useCallback(()=>{i(!1)},[]),o=f.useCallback(()=>{i(l=>!l)},[]);return{close:a,isOpen:n,name:e,open:r,setIsOpen:i,toggle:o}},qi=({name:e,items:n,columnOrder:i,setColumnOrder:r})=>{const a=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(a),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))]),r&&r(h.map(({id:m})=>m))},[r]),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),r==null||r(i)},[o,i,r]),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(),r=Dt(a=>{i(a)},(e==null?void 0:e.debounceWait)??300);return[n,r]},Xi=({alt:e="img",height:n="",width:i="",plugins:r=[s.lazyload(),s.placeholder()],publicId:a})=>{const o=Rt({publicId:a});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:n,plugins:r,width:i})},ee=f.memo(Xi),Ji=s.dt.label`
|
|
1293
1293
|
${({theme:e})=>`
|
|
@@ -1368,7 +1368,7 @@
|
|
|
1368
1368
|
}
|
|
1369
1369
|
|
|
1370
1370
|
`}
|
|
1371
|
-
`,Zi=s.dt.span.attrs({className:"checkmark"})``,qe=f.forwardRef(function({defaultChecked:n=!1,disabled:i=!1,label:r,name:a,onChange:o,onClick:l,value:c,...d},p){return t.jsxs(Ji,{"aria-disabled":i,"aria-label":r??a,role:"radiogroup",children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-label":r??a,defaultChecked:n,disabled:i,name:a,onChange:o,onClick:l,ref:p,type:"radio",value:c,...d}),t.jsx(Zi,{}),r??null]})}),Qi=({alt:e,imageId:n,icon:i,selectorProps:r,onClick:a,register:o,title:l,width:c="fit-content"})=>{const d=s.nt();return t.jsxs($,{alignItems:"center",border:`1px solid ${d.palette.gray[200]}`,borderColorHover:d.palette.gray[600],borderRadius:d.spacing[.25],display:"inline-flex",padding:[1,1,1,1],shadowHover:"md",width:c,children:[t.jsx($,{alignSelf:"start",display:"flex",width:"fit-content",children:t.jsx(qe,{name:r.name,onClick:a,value:r.value,...o==null?void 0:o(r.name)})}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[n===void 0?void 0:t.jsx(ee,{alt:e??"card image",height:"32px",publicId:n,width:"32px"}),i===void 0?void 0:t.jsx(I,{icon:i,iconSize:"sm",iconType:"fa-light"}),t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"sm",children:l})]})]})},
|
|
1371
|
+
`,Zi=s.dt.span.attrs({className:"checkmark"})``,qe=f.forwardRef(function({defaultChecked:n=!1,disabled:i=!1,label:r,name:a,onChange:o,onClick:l,value:c,...d},p){return t.jsxs(Ji,{"aria-disabled":i,"aria-label":r??a,role:"radiogroup",children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-label":r??a,defaultChecked:n,disabled:i,name:a,onChange:o,onClick:l,ref:p,type:"radio",value:c,...d}),t.jsx(Zi,{}),r??null]})}),Qi=({alt:e,imageId:n,icon:i,selectorProps:r,onClick:a,register:o,title:l,width:c="fit-content"})=>{const d=s.nt();return t.jsxs($,{alignItems:"center",border:`1px solid ${d.palette.gray[200]}`,borderColorHover:d.palette.gray[600],borderRadius:d.spacing[.25],display:"inline-flex",padding:[1,1,1,1],shadowHover:"md",width:c,children:[t.jsx($,{alignSelf:"start",display:"flex",width:"fit-content",children:t.jsx(qe,{name:r.name,onClick:a,value:r.value,...o==null?void 0:o(r.name)})}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[n===void 0?void 0:t.jsx(ee,{alt:e??"card image",height:"32px",publicId:n,width:"32px"}),i===void 0?void 0:t.jsx(I,{icon:i,iconSize:"sm",iconType:"fa-light"}),t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"sm",children:l})]})]})},ae=s.dt.div`
|
|
1372
1372
|
${({theme:e})=>`
|
|
1373
1373
|
align-items: center;
|
|
1374
1374
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1401,24 +1401,24 @@
|
|
|
1401
1401
|
width: 0;
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
|
-
input:checked + ${
|
|
1404
|
+
input:checked + ${ae} {
|
|
1405
1405
|
background-color: ${({theme:e})=>e.palette.primary[500]};
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
|
-
input:checked + ${
|
|
1408
|
+
input:checked + ${ae} > div {
|
|
1409
1409
|
transform: translateX(100%);
|
|
1410
1410
|
}
|
|
1411
1411
|
|
|
1412
|
-
input:disabled + ${
|
|
1412
|
+
input:disabled + ${ae} {
|
|
1413
1413
|
cursor: not-allowed;
|
|
1414
1414
|
background-color: ${({theme:e})=>e.palette.gray[100]};
|
|
1415
1415
|
}
|
|
1416
1416
|
|
|
1417
|
-
input:disabled + ${
|
|
1417
|
+
input:disabled + ${ae} > div {
|
|
1418
1418
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1419
1419
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1420
1420
|
}
|
|
1421
|
-
`,Lt=f.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:r,name:a,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:r,children:[t.jsx($,{minWidth:l,children:x}),t.jsxs(ta,{onClick:u,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":i,"aria-label":a,checked:n===!0,disabled:i,name:a,ref:p,type:"checkbox"}),t.jsx(
|
|
1421
|
+
`,Lt=f.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:r,name:a,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:r,children:[t.jsx($,{minWidth:l,children:x}),t.jsxs(ta,{onClick:u,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":i,"aria-label":a,checked:n===!0,disabled:i,name:a,ref:p,type:"checkbox"}),t.jsx(ae,{"aria-label":"Toggle Switch",id:`${a}Toggle`,children:t.jsx(ea,{})})]}),c]})}),na=({id:e,title:n,toggles:i,minWidth:r="auto",height:a="auto"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColor:o.palette.white,border:`1px solid ${o.palette.gray[200]}`,borderRadius:o.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:a,justify:"center",minHeight:"100px",minWidth:r,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Se,{id:e,title: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}`))})]})},ia=s.dt.div`
|
|
1422
1422
|
position: relative;
|
|
1423
1423
|
margin: auto;
|
|
1424
1424
|
overflow: hidden;
|
|
@@ -1714,7 +1714,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1714
1714
|
margin-right: 0;
|
|
1715
1715
|
`:""}
|
|
1716
1716
|
}
|
|
1717
|
-
`,Bt=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:r=void 0})=>{const{close:a}=n,o=f.useCallback(()=>{r!=null&&r.onClick&&r.onClick(),a()},[r,a]),l=f.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),a()},[i,a]);return[i,r].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(ha,{children:t.jsxs("div",{children:[r&&t.jsx(P,{id:r.id,onClick:o,variant:"tertiary",width:"100%",children:r.text}),i&&t.jsx(P,{id:i.id,onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},Mt=({title:e,description:n,modalRef:i,otherActions:r,onClose:a})=>{const o=s.nt(),l=f.useCallback(()=>{a==null||a(),i.close()},[i,a]);return f.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(xa,{children:[t.jsxs(fa,{children:[typeof e=="string"?t.jsx(V,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",wordBreak:"break-word",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[r,t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),n&&s.lodashExports.isString(n)&&!s.lodashExports.isEmpty(n)?t.jsx(S,{mt:.5,size:"sm",children:n}):void 0,n&&!s.lodashExports.isString(n)&&t.jsx(
|
|
1717
|
+
`,Bt=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:r=void 0})=>{const{close:a}=n,o=f.useCallback(()=>{r!=null&&r.onClick&&r.onClick(),a()},[r,a]),l=f.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),a()},[i,a]);return[i,r].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(ha,{children:t.jsxs("div",{children:[r&&t.jsx(P,{id:r.id,onClick:o,variant:"tertiary",width:"100%",children:r.text}),i&&t.jsx(P,{id:i.id,onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},Mt=({title:e,description:n,modalRef:i,otherActions:r,onClose:a})=>{const o=s.nt(),l=f.useCallback(()=>{a==null||a(),i.close()},[i,a]);return f.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(xa,{children:[t.jsxs(fa,{children:[typeof e=="string"?t.jsx(V,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",wordBreak:"break-word",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[r,t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),n&&s.lodashExports.isString(n)&&!s.lodashExports.isEmpty(n)?t.jsx(S,{mt:.5,size:"sm",children:n}):void 0,n&&!s.lodashExports.isString(n)&&t.jsx(se,{display:"block",mt:.5,size:"sm",children:n})]})},$a=({disabled:e,id:n="modal-confirm",onCancel:i,onConfirm:r="submit",txtCancel:a,txtConfirm:o})=>{const l=r==="submit";return t.jsxs($,{display:"flex",gap:.75,maxWidth:i?"392px":"190px",mt:1.5,children:[i?t.jsx(P,{id:`${n}-cancel`,justify:"center",onClick:i,variant:"tertiary",width:"100%",children:a??"Cancel"}):void 0,t.jsx(P,{disabled:e,id:n,justify:"center",onClick:l?void 0:r,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},ya=s.dt.button`
|
|
1718
1718
|
${({theme:e})=>`
|
|
1719
1719
|
align-items: center;
|
|
1720
1720
|
color: ${e.palette.gray[500]};
|
|
@@ -1786,7 +1786,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
1788
|
}
|
|
1789
|
-
`,va=s.dt(
|
|
1789
|
+
`,va=s.dt($e)`
|
|
1790
1790
|
${({theme:e,$variant:n})=>`
|
|
1791
1791
|
align-items: center;
|
|
1792
1792
|
background: ${n==="error"?e.palette.primary[400]:e.palette.warning[500]};
|
|
@@ -1806,7 +1806,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1806
1806
|
font-size: 6px;
|
|
1807
1807
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1808
1808
|
justify-content: center;
|
|
1809
|
-
`,Ot=f.forwardRef(function({numberIndicator:n,show:i,variant:r="error",...a},o){return t.jsx(va,{$variant:r,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...a,children:n&&t.jsx(ka,{children:n<=9?n:9})})}),Ht=({end:e=!1,label:n,id:i,isActive:r=!1,link:a,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:p})=>{const{pathname:g}=De.useLocation(),x=r||(d==="primary"?g.includes(a):g.endsWith(a));return t.jsx(G,{display:"flex",id:`${i}-tooltip`,tip:c,children:t.jsxs(ja,{$borderButton:x,$variant:d,children:[t.jsxs(De.NavLink,{end:e,id:i,onClick:l,to:a,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(K,{tagLabel:`${p}`,variant:"default"})]})})},Xe=({items:e,borders:n=!0,box:i=!1,variant:r="primary"})=>{const a=s.nt();return t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${a.palette.gray[300]}`:void 0,borderColor:i?a.palette.gray[200]:void 0,borderRadius:i?a.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:p,notificationSign:g,onClick: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:r},l))})},
|
|
1809
|
+
`,Ot=f.forwardRef(function({numberIndicator:n,show:i,variant:r="error",...a},o){return t.jsx(va,{$variant:r,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...a,children:n&&t.jsx(ka,{children:n<=9?n:9})})}),Ht=({end:e=!1,label:n,id:i,isActive:r=!1,link:a,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:p})=>{const{pathname:g}=De.useLocation(),x=r||(d==="primary"?g.includes(a):g.endsWith(a));return t.jsx(G,{display:"flex",id:`${i}-tooltip`,tip:c,children:t.jsxs(ja,{$borderButton:x,$variant:d,children:[t.jsxs(De.NavLink,{end:e,id:i,onClick:l,to:a,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(K,{tagLabel:`${p}`,variant:"default"})]})})},Xe=({items:e,borders:n=!0,box:i=!1,variant:r="primary"})=>{const a=s.nt();return t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${a.palette.gray[300]}`:void 0,borderColor:i?a.palette.gray[200]:void 0,borderRadius:i?a.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:p,notificationSign:g,onClick: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:r},l))})},ne=f.forwardRef(function({color:n=z.palette.gray[100],mt:i=.5,mb:r=.5,width:a,...o},l){return t.jsx($,{as:"hr",borderTop:`1px solid ${n}`,mb:r,mt:i,ref:l,width:a??"100%",...o})}),Ca=s.dt.li`
|
|
1810
1810
|
${({theme:e})=>`
|
|
1811
1811
|
align-items: center;
|
|
1812
1812
|
background-color: ${e.palette.white};
|
|
@@ -1864,7 +1864,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1864
1864
|
min-width: 240px;
|
|
1865
1865
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1866
1866
|
`}
|
|
1867
|
-
`,
|
|
1867
|
+
`,we=({children:e,disabled:n=!1,icon:i,iconType:r="fa-light",href:a,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...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(Ca,{"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:r}):null,a===void 0?b:t.jsx(Z,{href:a,children:b})]}):null,p||d?t.jsx(I,{disabled:n,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:r,onClick:l}):null]})},Sa=s.dt(we)`
|
|
1868
1868
|
margin-top: 10px;
|
|
1869
1869
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1870
1870
|
border-radius: 4px;
|
|
@@ -1882,7 +1882,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1882
1882
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1883
1883
|
background-color: unset;
|
|
1884
1884
|
}
|
|
1885
|
-
`,Vt=({items:e,onReorder:n,title:i,description:r,onClickClose:a})=>{const o=f.useCallback(l=>()=>{a(l)},[a]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs($,{display:"flex",gap:.25,children:[t.jsx(V,{display:"flex",size:"xs",children:i}),t.jsx(K,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(S,{size:"sm",children:r}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(Sa,{disabled:l.locked,icon:"grid-2",label:l.name,onClickIcon:l.locked?void 0:o(l.id),rightIcon:l.locked?"lock":"close",selected:l.visible,value:l.name,children:l.name})},l.name):void 0)]})},za=s.dt(
|
|
1885
|
+
`,Vt=({items:e,onReorder:n,title:i,description:r,onClickClose:a})=>{const o=f.useCallback(l=>()=>{a(l)},[a]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs($,{display:"flex",gap:.25,children:[t.jsx(V,{display:"flex",size:"xs",children:i}),t.jsx(K,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(S,{size:"sm",children:r}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(Sa,{disabled:l.locked,icon:"grid-2",label:l.name,onClickIcon:l.locked?void 0:o(l.id),rightIcon:l.locked?"lock":"close",selected:l.visible,value:l.name,children:l.name})},l.name):void 0)]})},za=s.dt(we)`
|
|
1886
1886
|
padding: 7px 8px;
|
|
1887
1887
|
|
|
1888
1888
|
&[aria-selected="true"] {
|
|
@@ -1954,7 +1954,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1954
1954
|
border-radius: ${e.spacing[.5]};
|
|
1955
1955
|
width: 250px;
|
|
1956
1956
|
`}
|
|
1957
|
-
`,
|
|
1957
|
+
`,ce=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:r,value:a,...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(Ta,{children:[t.jsx(I,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ia,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:a}),!s.lodashExports.isEmpty(a)&&t.jsx(B,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:r,px:.25,py:.25,type:"reset",variant:"ghost"})]});return i?t.jsxs(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(Fa,{ref:g.setFloating,style:x,children:b}):void 0]}):b}),Yt=({columns:e,formId:n,onChangeHandler:i,variant:r})=>{const a=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(()=>{a.current&&(a.current.reset(),d(""))},[a]);return f.useEffect(()=>{l(e.filter(x=>{var u;return r==="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,r]),r==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:a,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":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:a,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(za,{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)})})]})},Na=({_containerId:e="portals",title:n,modalRef:i,variant:r})=>{const a=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:a.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(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:r}),t.jsx($,{borderLeft:`2px solid ${a.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",{})},Ea=s.dt(we)`
|
|
1958
1958
|
padding: 8px;
|
|
1959
1959
|
min-height: 36px;
|
|
1960
1960
|
min-width: unset;
|
|
@@ -1964,14 +1964,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1964
1964
|
display: flex;
|
|
1965
1965
|
justify-content: center;
|
|
1966
1966
|
z-index: 99999;
|
|
1967
|
-
`,st=s.dt(
|
|
1967
|
+
`,st=s.dt(we)`
|
|
1968
1968
|
padding: 7px 8px;
|
|
1969
1969
|
word-wrap: break-word;
|
|
1970
1970
|
|
|
1971
1971
|
svg.fa-check {
|
|
1972
1972
|
border-radius: 2px;
|
|
1973
1973
|
}
|
|
1974
|
-
`,qt=({control:e,option:n,register:i,setValue:r})=>{var a,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=n.options)==null?void 0:a.map(g=>t.jsx(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:r},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(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:r,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:n,register:i,setValue:r})=>t.jsx(t.Fragment,{children:n.map((a,o)=>{const l=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:a,register:i,setValue:r}),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:r,register:a,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:r,items:n,setItems:i,register:a,handleSubmit:o,setValue:l}},Da=(e,n)=>{var i,r,a,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((a=(r=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:r.find(({checked:c})=>c))==null?void 0:a.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},La=(e,n)=>e.map(i=>{var r;return i.type==="checkboxes"?{...i,options:(r=i.options)==null?void 0:r.filter(a=>{var o;return((o=a.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??a.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:r,items:a,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=La(e,h);o(b)},[e,o]),x=f.useCallback(u=>{n&&n(u)},[n]);return f.useEffect(()=>{o(e),Da(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(le,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(x),children:[t.jsx(Kt,{control:r,items:a,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Jt=({options:e,variant:n,onApplyFilters:i,setDirection:r,setHandler:a})=>{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(v=>v.label===y),k=!(j!=null&&j.filterOptions.some(v=>v.type==="dateRange"||v.type==="select"));a==null||a(k??!0),h(y),p((j==null?void 0:j.filterOptions)??[])},[l,a]),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 k=C=>{var N,D;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)?((D=y.text)==null?void 0:D[`${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}},v=C=>C.label===u?{...C,filterOptions:C.filterOptions.map(k)}:C,F=l.map(v);c(C=>C.map(v));const R=F.flatMap(({filterOptions:C})=>C);i(R),p([])},[l,i,u]),w=f.useCallback((y,j)=>{const k=`li-filter-option-${y}`;return t.jsxs(Ea,{icon:j,onClick:b(y),style:{minWidth:"180px"},value:k,width:"100%",children:[y,g[y]===void 0?void 0:t.jsx(K,{tagLabel:g[y].length.toString()})]},k)},[g,b]);return f.useEffect(()=>{const y=e.reduce((j,{label:k,filterOptions:v})=>{const F=v.flatMap(({value:N,minValue:D,maxValue:E})=>[D,E,N]).filter(Boolean),R=v.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),C=[...F,...R];return C.length===0?j:{...j,[k]:C}},{});x(y),d.length>0&&r&&r("column")},[d,e,r]),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:k,icon:v="filter-list"})=>w(k,v))]},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:r})=>{const[a,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(Ra,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[a==="column"?g:void 0,t.jsx(Jt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:r}),a==="row"?g:void 0]})})};function Pa(e){if(e)return e}function Qt(e){if(!e||e.length===0)return;const n=e.filter(r=>r.checked).map(r=>r.label??r.value);return n.length===0?void 0:n.join(", ")}function Aa(e,n,i){const r=i??"",a=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(a)&&!s._.isUndefined(o))return`${a}${r} - ${o}${r}`;if(!s._.isUndefined(a))return`Min ${a}${r}`;if(!s._.isUndefined(o))return`Max ${o}${r}`}function Wa(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 Ba(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:n="filter-list",label:i,onClose:r,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx(K,{filterValues:a,icon:n,id:"remove-filter",onClose:r(e),tagLabel:`${i} `}),Ma=({options:e,onClose:n})=>{const i=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:x}=a;switch(c){case"numberRange":{const u=Aa(g,x,r.placeholder);return t.jsx(ae,{filter:a,filterValue:u,icon:r.icon,label:r.label,onClose:n},l)}case"dateRange":{const u=Wa(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(ae,{filter:a,filterValue:u,icon:r.icon,label:r.label,onClose:n},l)}case"radioButton":case"checkboxes":{const u=Qt(p);return t.jsx(ae,{filter:a,filterValue:u,icon:r.icon,label:r.label,onClose:n},l)}case void 0:case"select":case"text":default:{const u=Pa(d),h=Ba(c,r.label,o);return t.jsx(ae,{filter:a,filterValue:u,icon:r.icon,label:h,onClose:n},l)}}})).filter(r=>{if(r===null)return!1;const{filterValue:a}=r.props;return!s._.isNil(a)&&!s._.isEmpty(String(a))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Oa=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function r(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function a(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue: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 r(l,c);case"numberRange":return a(l,c,Number);case"dateRange":return a(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},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,Ha=e=>{var i;const n=((i=e.options)==null?void 0:i.map(r=>({...r,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},_a=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:r,onFiltersChange:a,onReset:o,variant:l="ungrouped"})=>{const c=Ne("filters-modal"),[d,p]=f.useState([]),[g,x]=f.useState(lt(d)),u=i.map(y=>({...y,filterOptions:y.filterOptions.map(j=>d.find(v=>v.key===j.key&&v.type===j.type&&v.filterFn===j.filterFn)??{...j})})),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 j=d.map(k=>k.key===y.key&&k.type===y.type&&k.filterFn===y.filterFn?Ha(k):k);p(j),localStorage.setItem(n,JSON.stringify(j))},[d,n,o]);return f.useEffect(()=>{const y=localStorage.getItem(n),j=i.flatMap(v=>v.filterOptions),k=y?JSON.parse(y):j;j.flatMap(v=>v.value).filter(Boolean).length>0||j.flatMap(v=>v.options).filter(v=>(v==null?void 0:v.checked)===void 0).length>0?(p(j),localStorage.setItem(n,JSON.stringify(j))):p(k)},[n,i,p]),f.useEffect(()=>{r&&e!==void 0&&r(Oa(e,d)),x(lt(d)),a==null||a(d)},[e,d,r,x,a]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick: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:r=void 0,confirmButton:a=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title: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)||r)&&t.jsxs(ua,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(ba,{$framed:o.imageFramed,children:t.jsx(ee,{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:a,modalRef:c})]})});return e&&c.isOpen?ne.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Va=()=>{const[e,n]=f.useState(!1),[i,r]=f.useState(),a=f.useRef(null),o=Ne("confirm-dialog-modal"),l=f.useCallback(async g=>(r(g),n(!0),new Promise(x=>{a.current=x})),[]),c=f.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=f.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children: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}),Ua=s.dt.div`
|
|
1974
|
+
`,qt=({control:e,option:n,register:i,setValue:r})=>{var a,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=n.options)==null?void 0:a.map(g=>t.jsx(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:r},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(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:r,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:n,register:i,setValue:r})=>t.jsx(t.Fragment,{children:n.map((a,o)=>{const l=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:a,register:i,setValue:r}),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:r,register:a,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:r,items:n,setItems:i,register:a,handleSubmit:o,setValue:l}},Da=(e,n)=>{var i,r,a,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((a=(r=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:r.find(({checked:c})=>c))==null?void 0:a.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},La=(e,n)=>e.map(i=>{var r;return i.type==="checkboxes"?{...i,options:(r=i.options)==null?void 0:r.filter(a=>{var o;return((o=a.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??a.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:r,items:a,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=La(e,h);o(b)},[e,o]),x=f.useCallback(u=>{n&&n(u)},[n]);return f.useEffect(()=>{o(e),Da(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:r,items:a,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Jt=({options:e,variant:n,onApplyFilters:i,setDirection:r,setHandler:a})=>{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(v=>v.label===y),k=!(j!=null&&j.filterOptions.some(v=>v.type==="dateRange"||v.type==="select"));a==null||a(k??!0),h(y),p((j==null?void 0:j.filterOptions)??[])},[l,a]),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 k=C=>{var N,D;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)?((D=y.text)==null?void 0:D[`${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}},v=C=>C.label===u?{...C,filterOptions:C.filterOptions.map(k)}:C,F=l.map(v);c(C=>C.map(v));const R=F.flatMap(({filterOptions:C})=>C);i(R),p([])},[l,i,u]),w=f.useCallback((y,j)=>{const k=`li-filter-option-${y}`;return t.jsxs(Ea,{icon:j,onClick:b(y),style:{minWidth:"180px"},value:k,width:"100%",children:[y,g[y]===void 0?void 0:t.jsx(K,{tagLabel:g[y].length.toString()})]},k)},[g,b]);return f.useEffect(()=>{const y=e.reduce((j,{label:k,filterOptions:v})=>{const F=v.flatMap(({value:N,minValue:D,maxValue:E})=>[D,E,N]).filter(Boolean),R=v.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),C=[...F,...R];return C.length===0?j:{...j,[k]:C}},{});x(y),d.length>0&&r&&r("column")},[d,e,r]),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:k,icon:v="filter-list"})=>w(k,v))]},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:r})=>{const[a,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(Ra,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[a==="column"?g:void 0,t.jsx(Jt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:r}),a==="row"?g:void 0]})})};function Pa(e){if(e)return e}function Qt(e){if(!e||e.length===0)return;const n=e.filter(r=>r.checked).map(r=>r.label??r.value);return n.length===0?void 0:n.join(", ")}function Aa(e,n,i){const r=i??"",a=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(a)&&!s._.isUndefined(o))return`${a}${r} - ${o}${r}`;if(!s._.isUndefined(a))return`Min ${a}${r}`;if(!s._.isUndefined(o))return`Max ${o}${r}`}function Wa(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 Ba(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const re=({filter:e,icon:n="filter-list",label:i,onClose:r,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx(K,{filterValues:a,icon:n,id:"remove-filter",onClose:r(e),tagLabel:`${i} `}),Ma=({options:e,onClose:n})=>{const i=e.flatMap(r=>r.filterOptions.map(a=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:x}=a;switch(c){case"numberRange":{const u=Aa(g,x,r.placeholder);return t.jsx(re,{filter:a,filterValue:u,icon:r.icon,label:r.label,onClose:n},l)}case"dateRange":{const u=Wa(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(re,{filter:a,filterValue:u,icon:r.icon,label:r.label,onClose:n},l)}case"radioButton":case"checkboxes":{const u=Qt(p);return t.jsx(re,{filter:a,filterValue:u,icon:r.icon,label:r.label,onClose:n},l)}case void 0:case"select":case"text":default:{const u=Pa(d),h=Ba(c,r.label,o);return t.jsx(re,{filter:a,filterValue:u,icon:r.icon,label:h,onClose:n},l)}}})).filter(r=>{if(r===null)return!1;const{filterValue:a}=r.props;return!s._.isNil(a)&&!s._.isEmpty(String(a))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Oa=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function r(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function a(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue: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 r(l,c);case"numberRange":return a(l,c,Number);case"dateRange":return a(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},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,Ha=e=>{var i;const n=((i=e.options)==null?void 0:i.map(r=>({...r,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},_a=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:r,onFiltersChange:a,onReset:o,variant:l="ungrouped"})=>{const c=Ne("filters-modal"),[d,p]=f.useState([]),[g,x]=f.useState(lt(d)),u=i.map(y=>({...y,filterOptions:y.filterOptions.map(j=>d.find(v=>v.key===j.key&&v.type===j.type&&v.filterFn===j.filterFn)??{...j})})),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 j=d.map(k=>k.key===y.key&&k.type===y.type&&k.filterFn===y.filterFn?Ha(k):k);p(j),localStorage.setItem(n,JSON.stringify(j))},[d,n,o]);return f.useEffect(()=>{const y=localStorage.getItem(n),j=i.flatMap(v=>v.filterOptions),k=y?JSON.parse(y):j;j.flatMap(v=>v.value).filter(Boolean).length>0||j.flatMap(v=>v.options).filter(v=>(v==null?void 0:v.checked)===void 0).length>0?(p(j),localStorage.setItem(n,JSON.stringify(j))):p(k)},[n,i,p]),f.useEffect(()=>{r&&e!==void 0&&r(Oa(e,d)),x(lt(d)),a==null||a(d)},[e,d,r,x,a]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick: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:r=void 0,confirmButton:a=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title: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)||r)&&t.jsxs(ua,{children:[r,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(ba,{$framed:o.imageFramed,children:t.jsx(ee,{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:a,modalRef:c})]})});return e&&c.isOpen?ie.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Va=()=>{const[e,n]=f.useState(!1),[i,r]=f.useState(),a=f.useRef(null),o=Ne("confirm-dialog-modal"),l=f.useCallback(async g=>(r(g),n(!0),new Promise(x=>{a.current=x})),[]),c=f.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!0)},[]),d=f.useCallback(()=>{var g;n(!1),r(void 0),(g=a.current)==null||g.call(a,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children: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}),Ua=s.dt.div`
|
|
1975
1975
|
display: flex;
|
|
1976
1976
|
flex-direction: column;
|
|
1977
1977
|
align-items: center;
|
|
@@ -2015,7 +2015,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2015
2015
|
overflow: hidden auto;
|
|
2016
2016
|
width: 100%;
|
|
2017
2017
|
`}
|
|
2018
|
-
`,Ja=({alert:e,buttonAlignment:n,cancelButton:i,children:r,confirmButton:a,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(Xa,{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:r}),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:((a==null?void 0:a.disabled)??!1)||b.formState.isSubmitting||o&&!b.formState.isDirty,icon:a==null?void 0:a.icon,id:l,justify:"center",type:"submit",width:"100%",children:(a==null?void 0:a.label)??"Confirm"})]})]})]})})})},Za=s.dt(
|
|
2018
|
+
`,Ja=({alert:e,buttonAlignment:n,cancelButton:i,children:r,confirmButton:a,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(Xa,{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:r}),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:((a==null?void 0:a.disabled)??!1)||b.formState.isSubmitting||o&&!b.formState.isDirty,icon:a==null?void 0:a.icon,id:l,justify:"center",type:"submit",width:"100%",children:(a==null?void 0:a.label)??"Confirm"})]})]})]})})})},Za=s.dt($e)`
|
|
2019
2019
|
display: grid;
|
|
2020
2020
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2021
2021
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2069,7 +2069,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2069
2069
|
background-color: ${e.palette.gray[100]};
|
|
2070
2070
|
}
|
|
2071
2071
|
`}
|
|
2072
|
-
`,tn=({isSelected:e=!1,label:n,onSelect:i})=>{const r=s.nt(),a=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:a,children:[e?t.jsx(I,{icon:"check",iconColor:r.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},tr=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:r,onClose:a,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(er,{$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:a,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(
|
|
2072
|
+
`,tn=({isSelected:e=!1,label:n,onSelect:i})=>{const r=s.nt(),a=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:a,children:[e?t.jsx(I,{icon:"check",iconColor:r.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},tr=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:r,onClose:a,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(er,{$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:a,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:r},w.name))]})]})})});return e?ie.createPortal(m,document.body):t.jsx("div",{})},nr=({description:e,height:n="auto",leftIconName:i,children:r,rightIconName:a,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const x=s.nt(),u=p==="centered",h=l&&t.jsx(G,{icon:a??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(a)?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}),r]}),u&&!s.lodashExports.isUndefined(a)?h:void 0]})]})},ir=({actions:e,children:n,header:i,title:r,tabs:a,footer:o})=>{const l=s.nt();return t.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:r}),i]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(B,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx($,{display:"flex",pt:.25,width:"100%",children:t.jsx(Xe,{items:a})}),t.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},g)=>t.jsx(P,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},ar=s.dt.span`
|
|
2073
2073
|
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2074
2074
|
background-color: ${n};
|
|
2075
2075
|
border-radius: 5px;
|
|
@@ -2135,7 +2135,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2135
2135
|
height: ${e}px;
|
|
2136
2136
|
width: ${e}px;
|
|
2137
2137
|
`}
|
|
2138
|
-
`,br=e=>{const{size:n}=e;return t.jsx(hr,{$size:n,...e})},$r=({children:e,commitSha:n,commitShortSha:i,parentElement:r,userInfo:a,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=a;return
|
|
2138
|
+
`,br=e=>{const{size:n}=e;return t.jsx(hr,{$size:n,...e})},$r=({children:e,commitSha:n,commitShortSha:i,parentElement:r,userInfo:a,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=a;return me(r,()=>{o(!1)}),t.jsxs(_t,{children:[t.jsx("li",{className:"user-info",children:t.jsxs($,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(S,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(S,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx($,{children:t.jsx(K,{tagLabel:g,variant:"role"})})]})}),t.jsx(ne,{}),e,t.jsx(ne,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Z,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${n}`,iconPosition:"hidden",children:t.jsx(S,{color:l.palette.gray[400],size:"xs",children:`commit : ${i}`})})})]})},yr=s.dt.button`
|
|
2139
2139
|
align-items: center;
|
|
2140
2140
|
background-color: transparent;
|
|
2141
2141
|
border: unset;
|
|
@@ -2235,7 +2235,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2235
2235
|
&::-webkit-inner-spin-button {
|
|
2236
2236
|
opacity: 1;
|
|
2237
2237
|
}
|
|
2238
|
-
`,zr=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:r=0,max:a,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const x=i<0?0:i,[u,h]=f.useState(Number(r).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(a)&&(h(String(j)),n&&c(s.lodashExports.toNumber(j.toFixed(x)))),y.stopPropagation()},[n,x,a,o,c]),m=f.useCallback(y=>{y.currentTarget.contains(y.relatedTarget)||h(Number(r).toFixed(x)),y.stopPropagation()},[x,r]),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(Cr,{onBlur:m,tabIndex:-1,children:t.jsx(G,{id:"numberInputTooltip",tip:d,children:t.jsx(Sr,{...p,"aria-label":l,"aria-valuemax":Number(a),"aria-valuemin":Number(o),"aria-valuenow":Number(u),max:a,min:o,name:l,onChange:b,onKeyUp:w,ref:g,step:10**-x,type:"number",value:u})})})}),Ir={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},He=({icon:e,label:n,onClick:i,onlyLabel:r=!1,provider:a="GitLab"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[r?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(ee,{alt:`${a} Logo`,height:"100%",publicId:Ir[a],width:"100%"}):t.jsx(I,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(S,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:r?"break-spaces":"nowrap",wordWrap:"unset",children:n??a})})]})},Tr=({align:e="end",buttonLabel:n="Add Credential",children:i,id:r,manualOption:a,providers:o})=>{const l=s.nt(),[c,d]=f.useState(!1),p=f.useRef(null);
|
|
2238
|
+
`,zr=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:r=0,max:a,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const x=i<0?0:i,[u,h]=f.useState(Number(r).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(a)&&(h(String(j)),n&&c(s.lodashExports.toNumber(j.toFixed(x)))),y.stopPropagation()},[n,x,a,o,c]),m=f.useCallback(y=>{y.currentTarget.contains(y.relatedTarget)||h(Number(r).toFixed(x)),y.stopPropagation()},[x,r]),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(Cr,{onBlur:m,tabIndex:-1,children:t.jsx(G,{id:"numberInputTooltip",tip:d,children:t.jsx(Sr,{...p,"aria-label":l,"aria-valuemax":Number(a),"aria-valuemin":Number(o),"aria-valuenow":Number(u),max:a,min:o,name:l,onChange:b,onKeyUp:w,ref:g,step:10**-x,type:"number",value:u})})})}),Ir={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},He=({icon:e,label:n,onClick:i,onlyLabel:r=!1,provider:a="GitLab"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[r?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(ee,{alt:`${a} Logo`,height:"100%",publicId:Ir[a],width:"100%"}):t.jsx(I,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(S,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:r?"break-spaces":"nowrap",wordWrap:"unset",children:n??a})})]})},Tr=({align:e="end",buttonLabel:n="Add Credential",children:i,id:r,manualOption:a,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=>{a==null||a.onClick(h),d(!1)},[a]),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:r,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(He,{onClick:u(h),provider:h},h)),a===void 0?void 0:t.jsx(He,{icon:"square-plus",label:a.label??"Add manually",onClick:g}),i]})]})},Fr=s.dt.div`
|
|
2239
2239
|
${({theme:e})=>`
|
|
2240
2240
|
height: ${e.spacing[1]};
|
|
2241
2241
|
width: ${e.spacing[1]};
|
|
@@ -2346,12 +2346,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2346
2346
|
border-start-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2347
2347
|
background-color: ${r==="compliance"?Rr(e,n):"inherit"};
|
|
2348
2348
|
`}
|
|
2349
|
-
`,Pr=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:r=!1,orientation:a="horizontal",rounded:o=!0,variant:l="default"})=>{const c=r&&i==="left",d=r?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(S,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(Dr,{$minWidth:e,$orientation:a,$rounded:o,$variant:l,className:a,children:t.jsx(Lr,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:a==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},an=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),r=typeof n=="string",a=r?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(S,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:r?t.jsxs(f.Fragment,{children:[t.jsx(
|
|
2349
|
+
`,Pr=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:r=!1,orientation:a="horizontal",rounded:o=!0,variant:l="default"})=>{const c=r&&i==="left",d=r?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(S,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(Dr,{$minWidth:e,$orientation:a,$rounded:o,$variant:l,className:a,children:t.jsx(Lr,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:a==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},an=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),r=typeof n=="string",a=r?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(S,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:r?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(a).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})},Ar=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:r,confirmButton:a,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(()=>{a==null||a.onClick()},[a]),k=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(ee,{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(an,{description:l,highlightDescription:c})]})]}),r&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:r})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(a)?t.jsx(P,{onClick:j,variant:(a==null?void 0:a.variant)??"primary",children:a==null?void 0:a.text},a==null?void 0:a.key):void 0,s.lodashExports.isObject(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(k,o??document.body):k},Wr=s.dt.div.attrs({className:"comp-scroll-up"})`
|
|
2350
2350
|
bottom: 15px;
|
|
2351
2351
|
position: fixed;
|
|
2352
2352
|
right: 140px;
|
|
2353
2353
|
z-index: 100;
|
|
2354
|
-
`,Br=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,r]=f.useState(!1),[a,o]=f.useState(null);f.useEffect(()=>{o(document.getElementById(e)),a==null||a.addEventListener("scroll",()=>{r(a.scrollTop>n)})},[a,e,n]);const l=f.useCallback(()=>{a==null||a.scrollTo({behavior:"smooth",top:0})},[a]);return i?t.jsx(Wr,{children:t.jsx(B,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},Mr={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]}},Or=({textL:e,textR:n,variant:i})=>{const r=s.nt(),{bgColor:a,colorL:o,colorR:l}=Mr[i];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:r.palette.white,border:`1px solid ${a}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(S,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:a,border:`1px solid ${a}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(S,{color:l,size:"xs",children:n})})]})},Hr=(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]},r={disabled:z.palette.gray[400],enabled:z.palette.gray[800]},a={critical:z.palette.white,high:z.palette.white,low:z.palette.gray[800],medium:z.palette.gray[800],none:z.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?a.none:a[e],textColor:n<1?r.disabled:r.enabled}},
|
|
2354
|
+
`,Br=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,r]=f.useState(!1),[a,o]=f.useState(null);f.useEffect(()=>{o(document.getElementById(e)),a==null||a.addEventListener("scroll",()=>{r(a.scrollTop>n)})},[a,e,n]);const l=f.useCallback(()=>{a==null||a.scrollTo({behavior:"smooth",top:0})},[a]);return i?t.jsx(Wr,{children:t.jsx(B,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},Mr={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]}},Or=({textL:e,textR:n,variant:i})=>{const r=s.nt(),{bgColor:a,colorL:o,colorR:l}=Mr[i];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:r.palette.white,border:`1px solid ${a}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(S,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:a,border:`1px solid ${a}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(S,{color:l,size:"xs",children:n})})]})},Hr=(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]},r={disabled:z.palette.gray[400],enabled:z.palette.gray[800]},a={critical:z.palette.white,high:z.palette.white,low:z.palette.gray[800],medium:z.palette.gray[800],none:z.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?a.none:a[e],textColor:n<1?r.disabled:r.enabled}},oe=({variant:e,value:n})=>{const{iconColor:i,iconText:r,iconTextColor:a,textColor:o}=Hr(e,n),l=s.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(G,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(S,{color:a,size:"sm",textAlign:"center",children:r})})}),t.jsx(S,{color:o,size:"sm",children:n})]})},_r=({critical:e,high:n,medium:i,low:r})=>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:r,variant:"low"})]}),Vr=s.dt.div`
|
|
2355
2355
|
${({theme:e})=>`
|
|
2356
2356
|
border-radius: ${e.spacing[.25]};
|
|
2357
2357
|
cursor: pointer;
|
|
@@ -2786,4 +2786,4 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2786
2786
|
}
|
|
2787
2787
|
`}
|
|
2788
2788
|
`;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
|
|
2789
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},wo=({description:e,onClick:n,plan:i})=>{const{title:r,description:a,benefits:o,buttonText:l}=mo[i],c=e??a;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:r}),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=
|
|
2789
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},wo=({description:e,onClick:n,plan:i})=>{const{title:r,description:a,benefits:o,buttonText:l}=mo[i],c=e??a;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:r}),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=re;exports.AppliedFilters=Ma;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=ri;exports.CardWithInput=Yi;exports.CardWithOptions=Ut;exports.CardWithSelector=Qi;exports.CardWithSwitch=na;exports.Carousel=la;exports.Checkbox=Ee;exports.CodeSnippet=pa;exports.Col=Pe;exports.ColumFilters=Zt;exports.ColumnsModal=Na;exports.ComboBox=bt;exports.ComboBoxField=Le;exports.Container=$;exports.CustomThemeProvider=Nn;exports.DateField=jt;exports.DateSelector=le;exports.Description=an;exports.Dialog=Te;exports.Divider=ne;exports.Editable=Ci;exports.EmptyButton=Oe;exports.EmptyState=qa;exports.FilePreview=ft;exports.FilterControl=qt;exports.FilterForm=Me;exports.FilterFormContent=Kt;exports.FiltersList=Jt;exports.FixedTabs=$o;exports.Form=Ja;exports.Gap=Ni;exports.GridContainer=Qa;exports.GroupSelector=tr;exports.Header=Ie;exports.Header$1=Mt;exports.Heading=V;exports.Icon=I;exports.IconButton=B;exports.IndicatorCard=nr;exports.InfoSidebar=ir;exports.InnerForm=Ka;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=Z;exports.ListItem=we;exports.ListItemsWrapper=_t;exports.LittleFlag=rr;exports.Loading=ur;exports.LocationCode=At;exports.Logo=fr;exports.Lottie=br;exports.MemoizedImage=ee;exports.Menu=$r;exports.MenuItem=rn;exports.MessageBanner=mr;exports.Modal=en;exports.ModalConfirm=$a;exports.ModalFooter=Bt;exports.Notification=kr;exports.NotificationSign=Ot;exports.NumberField=Ce;exports.NumberInput=zr;exports.OAuthSelector=Tr;exports.Option=ht;exports.OptionBoxContainer=Je;exports.OptionContainer=He;exports.OptionContainer$1=tn;exports.OutlineContainer=H;exports.PhoneInput=Ui;exports.PlanCard=wo;exports.PopUp=Ar;exports.Popover=ye;exports.PremiumFeature=nn;exports.PreviewPanel=Vt;exports.PriorityScore=Nr;exports.ProgressBar=Pr;exports.RadioButton=qe;exports.RecommendedTag=ln;exports.Row=It;exports.ScrollUpButton=Br;exports.Search=ce;exports.SearchPanel=Yt;exports.SeverityBadge=Or;exports.SeverityOverview=_r;exports.SeverityOverviewBadge=oe;exports.ShowOnHover=Ur;exports.SlideOutMenu=Yr;exports.Slider=Qr;exports.Span=se;exports.StepLapse=ro;exports.Tab=Ht;exports.TableButton=lo;exports.Tabs=Xe;exports.Tag=K;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=G;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=Va;exports.useDebouncedCallback=Dt;exports.useFilterForm=Xt;exports.useFilters=_a;exports.useModal=Ne;exports.useSearch=Ki;exports.variantBuilder=q;
|