@fluidattacks/design 3.16.13 → 3.16.14-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/accordion/types.d.ts +8 -0
- 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-Dtu93qFu.js → components-DYrtR8fV.js} +228 -228
- package/dist/{components-BAiQlxB0.mjs → components-DZt_ujqK.mjs} +175 -149
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),f=require("react"),s=require("./vendor-Dh2BdSxp.js"),
|
|
2
|
-
${n}
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),f=require("react"),s=require("./vendor-Dh2BdSxp.js"),ne=require("react-dom"),De=require("react-router-dom"),K=e=>({getVariant:(i,n)=>e(i)[n]}),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"],hi={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},bi={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},$i={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},yi={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},mi={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},wi={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},vi={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},ji={"01":"linear-gradient(45deg, #f32637 0%, #b8075d 100%)","02":"linear-gradient(45deg, #fcfcfd 0%, #667085 100%)"},ki={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"}},Ci={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)"},Si={mobile:"480px",tablet:"960px",sm:"1024px",md:"1440px",lg:"1920px"},zi={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"},Ii=["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"],Ti=[["fal","arrow-down"],["fal","arrow-left"],["fal","arrow-right"],["fal","arrow-up"],["fal","plus"],["fal","minus"],["fas","check"],["fas","circle-question"]],z={typography:ki,shadows:Ci,breakpoints:Si,spacing:zi,palette:{primary:bi,complementary:$i,error:yi,info:vi,warning:mi,success:wi,black:"#0c111d",white:"#ffffff",gray:hi,gradients:ji}},Fi=({children:e})=>t.jsx(s.ot,{theme:z,children:e}),T=(e,i)=>i===void 0?"":`${e}: ${i};`,de=e=>{const i=e.py??e.pt??0,n=e.px??e.pr??0,a=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[o,l,c,d]=e.padding;return`padding: ${z.spacing[o]} ${z.spacing[l]} ${z.spacing[c]} ${z.spacing[d]};`}return`padding: ${z.spacing[i]} ${z.spacing[n]} ${z.spacing[a]} ${z.spacing[r]};`},pe=e=>{const i=e.my??e.mt??0,n=e.mx??e.mr??0,a=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[o,l,c,d]=e.margin;return`margin: ${z.spacing[o]} ${z.spacing[l]} ${z.spacing[c]} ${z.spacing[d]};`}return`margin: ${z.spacing[i]} ${z.spacing[n]} ${z.spacing[a]} ${z.spacing[r]};`},ge=e=>{const i=T("position",e.position),n=T("top",e.top),a=T("right",e.right),r=T("bottom",e.bottom),o=T("left",e.left),l=T("z-index",e.zIndex);return`
|
|
3
2
|
${i}
|
|
3
|
+
${n}
|
|
4
4
|
${a}
|
|
5
5
|
${r}
|
|
6
6
|
${o}
|
|
7
7
|
${l}
|
|
8
|
-
`},ue=e=>{const
|
|
9
|
-
${n}
|
|
8
|
+
`},ue=e=>{const i=T("border",e.border),n=T("border-top",e.borderTop),a=T("border-right",e.borderRight),r=T("border-bottom",e.borderBottom),o=T("border-left",e.borderLeft),l=T("border-color",e.borderColor),c=T("border-radius",e.borderRadius);return`
|
|
10
9
|
${i}
|
|
10
|
+
${n}
|
|
11
11
|
${a}
|
|
12
12
|
${r}
|
|
13
13
|
${o}
|
|
14
14
|
${l}
|
|
15
15
|
${c}
|
|
16
|
-
`},
|
|
17
|
-
${
|
|
18
|
-
${
|
|
19
|
-
`:"",
|
|
20
|
-
${n}
|
|
16
|
+
`},Ni=e=>e.includes("x")?"overflow-x: auto;":"",Ei=e=>e.includes("y")?"overflow-y: auto;":"",xe=e=>{const i=e.scroll?`
|
|
17
|
+
${Ni(e.scroll)}
|
|
18
|
+
${Ei(e.scroll)}
|
|
19
|
+
`:"",n=T("visibility",e.visibility),a=T("display",e.display),r=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),v=T("align-items",e.alignItems),j=T("align-self",e.alignSelf),k=T("flex-wrap",e.wrap);return`
|
|
21
20
|
${i}
|
|
21
|
+
${n}
|
|
22
22
|
${a}
|
|
23
23
|
${r}
|
|
24
24
|
${o}
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
${v}
|
|
38
38
|
${j}
|
|
39
39
|
${k}
|
|
40
|
-
`},fe=e=>{const
|
|
41
|
-
${n}
|
|
40
|
+
`},fe=e=>{const i=T("color",e.color),n=T("font-family",e.fontFamily),a=T("font-size",e.fontSize),r=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`
|
|
42
41
|
${i}
|
|
42
|
+
${n}
|
|
43
43
|
${a}
|
|
44
44
|
${r}
|
|
45
45
|
${o}
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
${g}
|
|
51
51
|
${x}
|
|
52
52
|
${u}
|
|
53
|
-
`},he=e=>{const
|
|
54
|
-
${
|
|
53
|
+
`},he=e=>{const i=T("cursor",e.cursor),n=T("border-color",e.borderColorHover),a=T("background-color",e.bgColorHover),r=T("box-shadow",e.shadowHover===void 0?void 0:z.shadows[e.shadowHover]),o=T("transition",e.transition);return`
|
|
54
|
+
${i}
|
|
55
55
|
|
|
56
56
|
&:hover {
|
|
57
57
|
${o||"transition: all 0.2s;"}
|
|
58
|
-
${
|
|
58
|
+
${n}
|
|
59
59
|
${a}
|
|
60
60
|
${r}
|
|
61
61
|
}
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
${fe}
|
|
92
92
|
${ue}
|
|
93
93
|
${he}
|
|
94
|
-
`,
|
|
95
|
-
${({theme:e,$center:
|
|
96
|
-
${
|
|
94
|
+
`,Ri=s.dt($e)`
|
|
95
|
+
${({theme:e,$center:i=!1,$styleMd:n,$styleSm:a})=>`
|
|
96
|
+
${i?"margin: auto;":""}
|
|
97
97
|
scrollbar-color: ${e.palette.gray[600]} ${e.palette.gray[100]};
|
|
98
98
|
scroll-padding: ${e.spacing[.5]};
|
|
99
99
|
|
|
@@ -101,17 +101,17 @@
|
|
|
101
101
|
and (min-width: ${e.breakpoints.mobile})
|
|
102
102
|
and (max-width: ${e.breakpoints.tablet})
|
|
103
103
|
{
|
|
104
|
-
${
|
|
104
|
+
${n};
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
108
108
|
${a};
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
|
-
`,$=f.forwardRef(function({as:
|
|
112
|
-
${({theme:e,$bgGradient:
|
|
113
|
-
background: ${
|
|
114
|
-
color: ${
|
|
111
|
+
`,$=f.forwardRef(function({as:i="div",center:n,children:a,id:r,onHover:o,onLeave:l,styleMd:c,styleSm:d,...p},g){return t.jsx(Ri,{$center:n,$styleMd:c,$styleSm:d,as:i,id:r,onMouseLeave:l,onMouseOver:o,ref:g,...p,children:a})}),Di=s.dt(Ve)`
|
|
112
|
+
${({theme:e,$bgGradient:i="unset",$color:n=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$overflow:p,$size:g,$sizeMd:x,$sizeSm:u,$textFill:h="unset",$whiteSpace:b="pre-line",$wordBreak:m="normal"})=>`
|
|
113
|
+
background: ${i};
|
|
114
|
+
color: ${n};
|
|
115
115
|
display: ${a};
|
|
116
116
|
font-family: ${r};
|
|
117
117
|
font-size: ${e.typography.heading[g]};
|
|
@@ -139,9 +139,9 @@
|
|
|
139
139
|
}
|
|
140
140
|
`}
|
|
141
141
|
`,pt=s.dt(Ve)`
|
|
142
|
-
${({theme:e,$bgGradient:
|
|
143
|
-
background: ${
|
|
144
|
-
color: ${
|
|
142
|
+
${({theme:e,$bgGradient:i="unset",$color:n=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$letterSpacing:l=0,$lineSpacing:c=1.25,$lineSpacingSm:d,$overflow:p,$size:g,$sizeMd:x,$sizeSm:u,$textFill:h="unset",$whiteSpace:b="pre-line",$wordBreak:m="normal"})=>`
|
|
143
|
+
background: ${i};
|
|
144
|
+
color: ${n};
|
|
145
145
|
display: ${a};
|
|
146
146
|
font-family: ${r};
|
|
147
147
|
font-size: ${e.typography.text[g]};
|
|
@@ -168,9 +168,9 @@
|
|
|
168
168
|
line-height: ${e.spacing[d??c]};
|
|
169
169
|
}
|
|
170
170
|
`}
|
|
171
|
-
`,
|
|
172
|
-
${({theme:e,$color:
|
|
173
|
-
color: ${
|
|
171
|
+
`,Li=s.dt(Ue)`
|
|
172
|
+
${({theme:e,$color:i=e.palette.gray[600],$content:n=void 0,$display:a="inline",$fontWeight:r="regular",$size:o,$lineSpacing:l=1.25})=>`
|
|
173
|
+
color: ${i};
|
|
174
174
|
display: ${a};
|
|
175
175
|
font-family: ${e.typography.type.primary};
|
|
176
176
|
font-size: ${e.typography.text[o]};
|
|
@@ -179,17 +179,17 @@
|
|
|
179
179
|
max-width: 100%;
|
|
180
180
|
width: ${a==="block"?"100%":"auto"};
|
|
181
181
|
|
|
182
|
-
${
|
|
182
|
+
${n===void 0?"":`&::after { content: "${n}"; }`}
|
|
183
183
|
`}
|
|
184
|
-
`,V=f.forwardRef(function({bgGradient:
|
|
185
|
-
${({$clickable:e,$color:
|
|
186
|
-
color: ${
|
|
184
|
+
`,V=f.forwardRef(function({bgGradient:i,children:n,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:x,size:u,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:w,wordBreak:y,...v},j){return t.jsx(Di,{$bgGradient:i,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:x,$size:u,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:w,$wordBreak:y,className:a,ref:j,...v,children:n})}),se=f.forwardRef(function({children:i,color:n,content:a,display:r,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:x,sizeSm:u,...h},b){return t.jsx(Li,{$color:n,$content:a,$display:r,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:x,$sizeSm:u,ref:b,...h,children:i})}),S=f.forwardRef(function({bgGradient:i,children:n,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:x,size:u,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:w,wordBreak:y,...v},j){return t.jsx(pt,{$bgGradient:i,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:x,$size:u,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:w,$wordBreak:y,className:a,ref:j,...v,children:n})}),gt=({item:e})=>{const i=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:[i,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},Pi={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Ai=s.dt(Ue)`
|
|
185
|
+
${({$clickable:e,$color:i="inherit",$disabled:n=!1,$hoverColor:a,$rotation:r,$size:o,$secondaryColor:l})=>{const c=a?"":"brightness(50%)",d=a??"";return`
|
|
186
|
+
color: ${i};
|
|
187
187
|
cursor: ${e?"pointer":"inherit"};
|
|
188
|
-
font-size: ${
|
|
188
|
+
font-size: ${Pi[o]};
|
|
189
189
|
line-height: 0;
|
|
190
190
|
vertical-align: middle;
|
|
191
191
|
pointer-events: inherit;
|
|
192
|
-
opacity: ${
|
|
192
|
+
opacity: ${n?"0.5":"1"};
|
|
193
193
|
|
|
194
194
|
> svg {
|
|
195
195
|
--fa-secondary-color: ${l};
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
&:hover:not([disabled]) {
|
|
218
218
|
transform: scale(1.2);
|
|
219
219
|
}
|
|
220
|
-
`;const I=f.forwardRef(function({clickable:
|
|
220
|
+
`;const I=f.forwardRef(function({clickable:i,disabled:n,hoverColor:a,icon:r,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:x,rotation:u,spanClass:h,secondaryColor:b,...m},w){return t.jsx(Ai,{$clickable:i,$color:l,$disabled:n,$hoverColor:a,$rotation:u,$secondaryColor:b,$size:d,className:h,"data-testid":`${r}-icon`,onClick:x,ref:w,...m,children:t.jsx("i",{className:`${g} fa-${r} ${o}`,...c!==void 0?{"data-fa-mask":c}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${r}`)}),Wi=f.forwardRef(function({aligned:i="end",items:n,bgColor:a,expandAll:r=!1,initialExpandedIndex:o=-1},l){const c=s.nt(),[d,p]=f.useState([]);f.useEffect(()=>{r?p(n.map((x,u)=>u)):o>=0?p([o]):p([])},[r,n,o]);const g=f.useCallback(x=>()=>{p(r?u=>u.includes(x)?u.filter(h=>h!==x):[...u,x]:u=>u.includes(x)?[]:[x])},[r]);return t.jsx($,{borderColor:c.palette.gray[200],borderTop:"1px solid",ref:l,children:n.map((x,u)=>{const h=d.includes(u);return t.jsxs($,{bgColor:a??c.palette.white,borderBottom:"1px solid",borderColor:c.palette.gray[200],children:[t.jsx($,{"aria-controls":`panel-${x.title}`,"aria-expanded":h,"aria-label":x.title,as:"button",bgColor:a??c.palette.white,bgColorHover:c.palette.gray[100],cursor:"pointer",display:"flex",onClick:g(u),padding:[.75,.75,.75,.75],width:"100%",children:t.jsxs($,{as:"summary",display:"flex",flexDirection:i==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[t.jsx(S,{color:c.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:x.title}),t.jsx(I,{icon:h?"chevron-up":"chevron-down",iconColor:c.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),h&&t.jsx(gt,{item:x})]},x.title)})})}),Bi=e=>{switch(e){case"warning":return"triangle-exclamation";case"info":return"circle-info";case"success":return"circle-check";case"error":default:return"circle-exclamation"}},{getVariant:Mi}=K(e=>({error:`
|
|
221
221
|
background: ${e.palette.error[50]};
|
|
222
222
|
border: 1px solid ${e.palette.error[500]};
|
|
223
223
|
color: ${e.palette.error[700]};
|
|
@@ -269,8 +269,8 @@
|
|
|
269
269
|
color: ${e.palette.warning[700]};
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
`})),
|
|
273
|
-
${({theme:e,$variant:
|
|
272
|
+
`})),Hi=s.dt.div`
|
|
273
|
+
${({theme:e,$variant:i})=>`
|
|
274
274
|
background: transparent;
|
|
275
275
|
align-items: center;
|
|
276
276
|
border-radius: ${e.spacing[.25]};
|
|
@@ -289,12 +289,12 @@
|
|
|
289
289
|
background-color: transparent;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
${
|
|
292
|
+
${Mi(e,i??"error")}
|
|
293
293
|
`}
|
|
294
|
-
`,
|
|
294
|
+
`,Oi=s.dt.div`
|
|
295
295
|
padding-right: 4px;
|
|
296
296
|
width: 100%;
|
|
297
|
-
`,{getVariant:
|
|
297
|
+
`,{getVariant:_i}=K(e=>({ghost:`
|
|
298
298
|
background: transparent;
|
|
299
299
|
border: none;
|
|
300
300
|
color: ${e.palette.gray[800]};
|
|
@@ -369,16 +369,16 @@
|
|
|
369
369
|
color: ${e.palette.white};
|
|
370
370
|
}
|
|
371
371
|
`})),ut=s.dt(_e)`
|
|
372
|
-
${({theme:e,justify:
|
|
372
|
+
${({theme:e,justify:i,$size:n,$variant:a})=>`
|
|
373
373
|
align-items: center;
|
|
374
374
|
border-radius: var(--btn-spacing);
|
|
375
375
|
cursor: pointer;
|
|
376
376
|
display: inline-flex;
|
|
377
377
|
font-family: ${e.typography.type.primary};
|
|
378
|
-
font-size: ${
|
|
378
|
+
font-size: ${n??e.typography.text.sm};
|
|
379
379
|
font-weight: ${e.typography.weight.regular};
|
|
380
380
|
gap: var(--btn-spacing);
|
|
381
|
-
justify-content: ${
|
|
381
|
+
justify-content: ${i??"center"};
|
|
382
382
|
line-height: ${e.spacing[1.25]};
|
|
383
383
|
padding: var(--btn-padding-y) var(--btn-padding-x);
|
|
384
384
|
position: relative;
|
|
@@ -390,12 +390,12 @@
|
|
|
390
390
|
${a!=="link"?`--btn-padding-y: ${e.spacing[1]}`:""};
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
${
|
|
393
|
+
${_i(e,a??"primary")}
|
|
394
394
|
`}
|
|
395
|
-
`,
|
|
396
|
-
${({theme:e,$borderRadius:
|
|
397
|
-
--btn-spacing: ${
|
|
398
|
-
--btn-padding-x: ${e.spacing[
|
|
395
|
+
`,Vi=s.dt(ut)`
|
|
396
|
+
${({theme:e,$borderRadius:i="4px",$px:n=.5,$py:a=.5})=>`
|
|
397
|
+
--btn-spacing: ${i};
|
|
398
|
+
--btn-padding-x: ${e.spacing[n]};
|
|
399
399
|
--btn-padding-y: ${e.spacing[a]};
|
|
400
400
|
|
|
401
401
|
align-items: center;
|
|
@@ -406,18 +406,18 @@
|
|
|
406
406
|
margin: 0 !important;
|
|
407
407
|
}
|
|
408
408
|
`}
|
|
409
|
-
`,
|
|
410
|
-
${({theme:e,$maxWidth:
|
|
409
|
+
`,Ui=s.dt($e)``,Gi=s.dt.div`
|
|
410
|
+
${({theme:e,$maxWidth:i="320px"})=>`
|
|
411
411
|
background-color: ${e.palette.gray[700]};
|
|
412
412
|
border-radius: 8px;
|
|
413
413
|
color: ${e.palette.white};
|
|
414
414
|
font-size: ${e.typography.text.xs};
|
|
415
|
-
max-width: ${
|
|
415
|
+
max-width: ${i};
|
|
416
416
|
padding: ${e.spacing[.75]};
|
|
417
417
|
width: max-content;
|
|
418
418
|
z-index: 999999;
|
|
419
419
|
`}
|
|
420
|
-
`,Y=({children:e,disabled:
|
|
420
|
+
`,Y=({children:e,disabled:i=!1,display:n="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:x="",title:u="",hide:h=x===""&&u===""&&p===void 0,width:b})=>{const m=s.nt(),[w,y]=f.useState(!1),{refs:v,floatingStyles:j,context:k}=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(k,{delay:{close:0,open:500},move:!1}),R=s.useFocus(k),C=s.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:N,getFloatingProps:L}=s.useInteractions([F,R,C]);return i?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Ui,{...N(),display:n,height:a,id:c,ref:v.setReference,width:b,children:r?t.jsx(I,{clickable:!0,disabled:i,icon:r,iconColor:o,iconSize:l??"xxs",iconType:w?"fa-solid":"fa-light"}):e}),w&&!h&&ne.createPortal(t.jsxs(Gi,{...L(),$maxWidth:d,id:`floating-${c}`,ref:v.setFloating,style:j,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:i,disabled:n,icon:a,iconColor:r,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:x,py:u,type:h="button",tooltip:b,tooltipPlace:m,value:w,variant:y="primary",...v},j){const k=t.jsx(Vi,{$borderRadius:i,$px:x,$py:u,$variant:y,"aria-disabled":n,"aria-label":d,borderRadius:i,disabled:n,id:d,justify:p,onClick:g,ref:j,type:h,value:w,...v,children:t.jsx(I,{clickable:!1,icon:a,iconColor:r,iconSize:o,iconTransform:l,iconType:c})}),R=(h+(y??"")+(d??a)).replace(/ /u,"_");return b===void 0?k:t.jsx(Y,{id:`${R}-tooltip`,place:m,tip:b,children:k})}),Yi=f.forwardRef(function({autoHide:i=!1,children:n,closable:a=!1,onTimeOut:r,show:o=!0,time:l=8,variant:c="error",id:d,...p},g){const[x,u]=f.useState(o),h=f.useCallback(()=>{u(!1)},[]);return f.useEffect(()=>{const b=setTimeout(()=>{r==null||r(!0),i&&h()},l*1e3);return()=>{clearTimeout(b)}},[i,h,l,r]),f.useEffect(()=>{u(o)},[o,u]),t.jsx($,{display:x?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(Hi,{$variant:c,id:d,children:[t.jsx(I,{clickable:!1,icon:Bi(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(Oi,{children:n}),a?t.jsx(B,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),et=s.dt.div`
|
|
421
421
|
${({theme:e})=>`
|
|
422
422
|
align-items: center;
|
|
423
423
|
background-color: ${e.palette.gray[200]};
|
|
@@ -433,7 +433,7 @@
|
|
|
433
433
|
width: ${e.spacing[1.25]};
|
|
434
434
|
height: ${e.spacing[1.25]};
|
|
435
435
|
`}
|
|
436
|
-
`,
|
|
436
|
+
`,qi=s.dt.div`
|
|
437
437
|
ul,
|
|
438
438
|
ol {
|
|
439
439
|
padding-top: 6px;
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
#menu-profile-container li div {
|
|
498
498
|
min-width: unset;
|
|
499
499
|
}
|
|
500
|
-
`,{getVariant:
|
|
500
|
+
`,{getVariant:Ki}=K(e=>({default:`
|
|
501
501
|
background-color: ${e.palette.gray[200]};
|
|
502
502
|
color: ${e.palette.gray[800]};
|
|
503
503
|
`,error:`
|
|
@@ -572,14 +572,14 @@
|
|
|
572
572
|
background-color: ${e.palette.warning[400]};
|
|
573
573
|
color: ${e.palette.warning[700]};
|
|
574
574
|
}
|
|
575
|
-
`})),
|
|
576
|
-
${({theme:e,$fontSize:
|
|
575
|
+
`})),Xi=s.dt.span`
|
|
576
|
+
${({theme:e,$fontSize:i=e.typography.text.xs,$variant:n})=>`
|
|
577
577
|
align-items: center;
|
|
578
|
-
border-radius: ${e.spacing[
|
|
578
|
+
border-radius: ${e.spacing[n==="technique"?1:.25]};
|
|
579
579
|
display: inline-flex;
|
|
580
580
|
gap: ${e.spacing[.25]};
|
|
581
581
|
font-family: ${e.typography.type.primary};
|
|
582
|
-
font-size: ${
|
|
582
|
+
font-size: ${i};
|
|
583
583
|
font-style: normal;
|
|
584
584
|
font-weight: ${e.typography.weight.regular};
|
|
585
585
|
justify-content: center;
|
|
@@ -593,9 +593,9 @@
|
|
|
593
593
|
display: flex;
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
${
|
|
596
|
+
${Ki(e,n)}
|
|
597
597
|
`}
|
|
598
|
-
`,{getVariant:
|
|
598
|
+
`,{getVariant:Ji}=K(e=>({highRelevance:`
|
|
599
599
|
color: ${e.palette.primary[500]};
|
|
600
600
|
|
|
601
601
|
&:hover:not([disabled]) {
|
|
@@ -608,7 +608,7 @@
|
|
|
608
608
|
color: ${e.palette.gray[500]};
|
|
609
609
|
}
|
|
610
610
|
`})),xt=s.lt`
|
|
611
|
-
${({theme:e,$color:
|
|
611
|
+
${({theme:e,$color:i,$variant:n})=>`
|
|
612
612
|
align-items: center;
|
|
613
613
|
cursor: pointer;
|
|
614
614
|
font-family: ${e.typography.type.primary};
|
|
@@ -629,13 +629,13 @@
|
|
|
629
629
|
text-decoration: none;
|
|
630
630
|
}
|
|
631
631
|
|
|
632
|
-
${
|
|
632
|
+
${i?`color: ${i}`:Ji(e,n)}
|
|
633
633
|
`}
|
|
634
|
-
`,
|
|
634
|
+
`,Zi=s.dt.a`
|
|
635
635
|
${xt}
|
|
636
|
-
`,
|
|
636
|
+
`,Qi=s.dt(De.Link)`
|
|
637
637
|
${xt}
|
|
638
|
-
`,Q=({children:e,color:
|
|
638
|
+
`,Q=({children:e,color:i,download:n,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(I,{icon:n===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(Zi,{$color:i,$variant:c,download:n,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(Qi,{$variant:c,download:n,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},X=({disabled:e,icon:i,iconColor:n="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:x="",tagLabel: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(Xi,{$fontSize:l,$variant:h,className:g,children:[i&&t.jsx(I,{icon:i,iconColor:n,iconSize:"xxs",iconType:a}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:x}),t.jsx("span",{children:b?m:u}),t.jsx("strong",{className:"w-full",children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(Q,{href:c,children:d})]})},en=(e,i=!0)=>{const n=window.open(e,i?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(n)&&(n.opener=null)},P=f.forwardRef(function({children:i,disabled:n=!1,external:a=!1,fontSize:r,href:o,id:l,icon:c,name:d,onClick:p,showArrow:g=!1,tag:x,type:u="button",tooltip:h,tooltipPlace:b="bottom",underline:m=!1,value:w,variant:y="primary",width:v,...j},k){const F=h!==void 0,R=`${l}-tooltip`,C=f.useCallback(()=>{o&&en(o,a)},[a,o]),N=t.jsxs(ut,{$size:r,$variant:y,"aria-disabled":n,className:m?"underline":void 0,disabled:n,id:l,name:d,onClick:y==="link"?C:p,ref:k,type:u,value:w,width:v,...F?{"data-tooltip-id":R}:{},...j,children:[c!==void 0&&t.jsx(I,{icon:c,iconSize:"xs",iconType:"fa-light"}),i,(g||y==="link")&&t.jsx(I,{icon:"arrow-right",iconSize:"xs",iconType:"fa-light"}),x===void 0?null:t.jsx(X,{tagLabel:x,variant:"default"})]});return F?t.jsx(Y,{disabled:!F,id:R,place:b,tip:h,width:v,children:N}):N}),tn=f.forwardRef(function({children:i,onClick:n,userName:a,showIcon:r=!1,showUsername:o=!1},l){const c=!!n;return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(P,{onClick:n,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(et,{children:a[0].toUpperCase()}),o?t.jsx(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:a.split(" ")[0]}):void 0,r?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(et,{children:a[0].toUpperCase()}),o?t.jsxs(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",a.split(" ")[0],"!"]}):void 0,r?t.jsx(I,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(qi,{children:i})]})})}),Se=({authorEmail:e,date:i,description:n,descriptionColor:a,id:r,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs($,{width:"100%",children:[typeof o=="string"?t.jsx(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:[n&&t.jsx(S,{color:a??g.palette.gray[800],fontWeight:n===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:n}),i&&t.jsx(S,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${i.split(" ")[0]}`}),e&&t.jsx(S,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(Y,{icon:"circle-info",id:r,tip:p})]})]})},tt=s.dt($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
639
639
|
& img {
|
|
640
640
|
display: block;
|
|
641
641
|
}
|
|
@@ -650,8 +650,8 @@
|
|
|
650
650
|
pointer-events: none;
|
|
651
651
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
652
652
|
}
|
|
653
|
-
`,
|
|
654
|
-
${({theme:e,$align:
|
|
653
|
+
`,nn=e=>{if(s._.isNil(e))return"";const i=e.split(".");return(i.length>1?s._.last(i):"").toLowerCase()},rn=(e,i)=>s._.isUndefined(i)?!1:s._.includes(e,nn(i)),ft=({alt:e,fileType:i,width:n="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const x=g.target,u=x.currentTime/x.duration*100;u>5&&u<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):u>=50&&u<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):u>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return i==="video"||rn(["webm"],r)?t.jsx(tt,{$opacity:a,children:t.jsx(Q,{href:r,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:o,width:n},children:[t.jsx("source",{src:r,type:"video/webm"}),r]})})}):t.jsx(tt,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:n}})})},an=({alt:e,authorEmail:i,date:n,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:x=!0,videoViewStatus:u})=>{const h=s.nt(),[b,m]=f.useState(!1),w=f.useCallback(()=>{m(!0)},[]),y=f.useCallback(()=>{m(!1)},[]);return t.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:w,onLeave:y,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(f.Fragment,{children:[t.jsx(ft,{alt:e,fileType:g,height:"147px",opacity:b?.3:0,src:r,videoViewStatus:u,width:"100%"}),x?t.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(B,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),p?null:t.jsx(Se,{authorEmail:i,date:n,description:a,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},on=s.dt.div`
|
|
654
|
+
${({theme:e,$align:i="center",$minWidth:n="auto",$minHeight:a="auto"})=>`
|
|
655
655
|
display: flex;
|
|
656
656
|
background-color: ${e.palette.white};
|
|
657
657
|
border-radius: ${e.spacing[.25]};
|
|
@@ -659,17 +659,17 @@
|
|
|
659
659
|
flex-direction: column;
|
|
660
660
|
justify-content: center;
|
|
661
661
|
gap: ${e.spacing[.5]};
|
|
662
|
-
min-width: ${
|
|
662
|
+
min-width: ${n};
|
|
663
663
|
min-height: ${a};
|
|
664
664
|
padding: ${e.spacing[1]};
|
|
665
665
|
|
|
666
666
|
input {
|
|
667
667
|
color: ${e.palette.gray[800]};
|
|
668
668
|
line-height: ${e.spacing[1.5]};
|
|
669
|
-
text-align: ${
|
|
669
|
+
text-align: ${i};
|
|
670
670
|
}
|
|
671
671
|
`}
|
|
672
|
-
`,Ge=({htmlFor:e,label:
|
|
672
|
+
`,Ge=({htmlFor:e,label:i,link:n,required:a,tooltip:r,weight:o="normal"})=>{const l=s.nt(),c=`${e}-tooltip`,d=r!==void 0&&!s.lodashExports.isEmpty(r);return t.jsxs("label",{className:`flex font-${o} gap-1 w-full`,htmlFor:e,children:[i,a&&t.jsx(I,{icon:"asterisk",iconColor:l.palette.error[500],iconSize:"xxss"}),n?t.jsx(Q,{href:n,target:"_blank"}):null,d?t.jsx(Y,{display:"inline-flex",icon:"circle-info",id:c,place:"top",tip:r}):null]})},sn=s.dt.div`
|
|
673
673
|
${({theme:e})=>`
|
|
674
674
|
align-items: flex-start;
|
|
675
675
|
display: inline-flex;
|
|
@@ -708,7 +708,7 @@
|
|
|
708
708
|
}
|
|
709
709
|
`}
|
|
710
710
|
`,ee=s.dt.div`
|
|
711
|
-
${({theme:e,$overflowX:
|
|
711
|
+
${({theme:e,$overflowX:i})=>`
|
|
712
712
|
align-items: center;
|
|
713
713
|
display: flex;
|
|
714
714
|
border-radius: ${e.spacing[.5]};
|
|
@@ -718,8 +718,8 @@
|
|
|
718
718
|
gap: ${e.spacing[.625]};
|
|
719
719
|
justify-content: space-between;
|
|
720
720
|
height: 40px;
|
|
721
|
-
overflow-x: ${
|
|
722
|
-
padding: ${
|
|
721
|
+
overflow-x: ${i??"unset"};
|
|
722
|
+
padding: ${i===void 0?`${e.spacing[.625]} ${e.spacing[.75]}`:`${e.spacing[.25]} ${e.spacing[.75]}`};
|
|
723
723
|
width: 100%;
|
|
724
724
|
white-space: nowrap;
|
|
725
725
|
|
|
@@ -812,7 +812,7 @@
|
|
|
812
812
|
border: 1px solid ${e.palette.gray[600]};
|
|
813
813
|
}
|
|
814
814
|
`}
|
|
815
|
-
`,
|
|
815
|
+
`,O=({children:e,error:i,helpLink:n,helpLinkText:a="Link here",helpText:r,htmlFor:o,label:l,linkPosition:c="down",maxLength:d,required:p,tooltip:g,value:x,weight:u})=>{const h=s.nt(),b=x?x.length:0;return t.jsxs(sn,{children:[l===void 0?void 0:t.jsx(Ge,{htmlFor:o,label:l,link:c==="up"?n:void 0,required:p,tooltip:g,weight:u}),e,i||d?t.jsxs($,{display:"flex",justify:i===void 0?"end":"space-between",width:"100%",children:[i&&t.jsx(S,{className:"error-msg",color:h.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:i}),d&&t.jsx(X,{priority:"low",tagLabel:`${b}/${d}`,variant:"error"})]}):void 0,r||n?t.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[r&&t.jsxs(t.Fragment,{children:[t.jsx(I,{icon:"circle-info",iconColor:h.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(S,{color:h.palette.gray[400],display:"inline-block",size:"sm",children:r})]}),n&&c==="down"?t.jsx(Q,{href:n,children:a}):void 0]}):void 0]})},ye=({className:e,children:i,isFilter:n=!1,popoverRef:a,state:r,triggerRef:o,...l})=>{var x;const c=f.useRef(null),d=(x=o==null?void 0:o.current)==null?void 0:x.getBoundingClientRect(),{popoverProps:p}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:a??c,triggerRef:o,isNonModal:a?!0:void 0},r),g=f.useCallback(u=>{u.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,id:"popover",onPointerDown:n?g:void 0,ref:a??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:i})})},ln=s.dt.ul`
|
|
816
816
|
${({theme:e})=>`
|
|
817
817
|
align-self: center;
|
|
818
818
|
background: ${e.palette.white};
|
|
@@ -827,7 +827,7 @@
|
|
|
827
827
|
scroll-padding: ${e.spacing[.5]};
|
|
828
828
|
width: 95%;
|
|
829
829
|
`}
|
|
830
|
-
`,
|
|
830
|
+
`,cn=s.dt.li`
|
|
831
831
|
${({theme:e})=>`
|
|
832
832
|
align-items: center;
|
|
833
833
|
color: ${e.palette.gray[800]};
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
`}
|
|
865
|
-
`,ht=({item:e,state:
|
|
865
|
+
`,ht=({item:e,state:i})=>{const n=s.nt(),a=f.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},i,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(cn,{...r,className:d,ref:a,children:[t.jsx(S,{color:n.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:i=!1,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:x,placeholder:u,required:h,tooltip:b,value:m,weight:w})=>{var Qe;const y=s.nt(),v=i?void 0:n,j=(e==null?void 0:e.value)??m,[k,F]=f.useState(((Qe=p.find(D=>D.value===j))==null?void 0:Qe.name)??""),[R,C]=f.useState(j),[N,L]=f.useState(p),[E,A]=f.useState(!1),{contains:U}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),G=f.useRef(null),J=f.useRef(null),W=f.useRef(null),H=f.useRef(null),M=f.useRef(null),Re=f.useMemo(()=>p.map(D=>U(D.name,k)||E?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:D.name},D.value):null),[U,k,p,E]),li=f.useCallback(D=>{F(D),D===""?A(!0):(A(!1),C(_=>{const q=D===""?"":_;return e&&e.onChange(q),x&&x(D),q}),L(p.filter(_=>U(_.name,D))))},[U,p,e,x]),ci=f.useCallback(D=>{var _;F(((_=p.find(q=>q.value===D))==null?void 0:_.name)??""),C(D?String(D):""),e&&e.onChange(D),x&&x(D?String(D):""),L(p)},[p,e,x]),Ze=f.useCallback(D=>{D.key==="Enter"&&D.preventDefault(),A(!1)},[]),di=f.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),Z=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:k,items:N,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:R,onBlur:di,onInputChange:li,onKeyDown:Ze,onKeyUp:()=>{A(!0)},onOpenChange(D,_){A(D&&(_==="manual"||_==="focus")),D&&setTimeout(()=>{var q;return(q=G.current)==null?void 0:q.focus()},50)},onSelectionChange:ci,children:Re}),{buttonProps:pi,inputProps:gi,listBoxProps:ui}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:k,buttonRef:J,id:d,inputRef:G,label:l??d,listBoxRef:W,name:d,placeholder:u,popoverRef:M},Z),{listBoxProps:xi}=s.$c132121280ec012d$export$50eacbbf140a3141(ui,Z,W),{buttonProps:fi}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(pi,J);return f.useEffect(()=>{var D;if(c===!1||!j){const _=((D=p.find(q=>q.value===j))==null?void 0:D.name)??"";F(_),C(_)}},[j,p,c]),t.jsxs(O,{error:v,helpLink:a,helpLinkText:r,helpText:o,htmlFor:d,label:l,required:h,tooltip:b,weight:w,children:[t.jsxs(ee,{className:`${i?"disabled":""} ${v?"error":""}`,ref:H,children:[t.jsx("input",{...gi,"aria-invalid":v?"true":"false","aria-label":d,disabled:i,onKeyDown:Ze,ref:G}),v?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}):void 0,t.jsx(B,{...fi,className:"action",disabled:i,icon:Z.isOpen&&!i?"chevron-up":"chevron-down",iconColor:y.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:J,type:"button",variant:"ghost"})]}),Z.isOpen&&Z.collection.size>0&&!i?t.jsx(ye,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:M,state:Z,triggerRef:H,children:t.jsx(ln,{...xi,ref:W,children:[...Z.collection].map(D=>t.jsx(ht,{item:D,state:Z},D.key))})}):null]})},bt=({control:e,disabled:i=!1,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:x,placeholder:u,required:h,tooltip:b,value:m,weight:w})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:y,fieldState:v})=>{var j;return t.jsx(Le,{disabled:i,error:(j=v.error)==null?void 0:j.message,field:y,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:x,placeholder:u,required:h,tooltip:b,value:m,weight:w})},rules:{required:h}}):t.jsx(Le,{disabled:i,error:n,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:x,placeholder:u,required:h,tooltip:b,value:m,weight:w}),dn=s.dt.div`
|
|
866
866
|
${({theme:e})=>`
|
|
867
867
|
align-items: center;
|
|
868
868
|
color: ${e.palette.gray[800]};
|
|
@@ -883,7 +883,7 @@
|
|
|
883
883
|
display: none;
|
|
884
884
|
}
|
|
885
885
|
`}
|
|
886
|
-
`,
|
|
886
|
+
`,pn=s.dt.div.attrs({className:"year-selection"})`
|
|
887
887
|
align-items: flex-start;
|
|
888
888
|
display: flex;
|
|
889
889
|
flex-direction: column;
|
|
@@ -894,7 +894,7 @@
|
|
|
894
894
|
padding: 0 0.5px;
|
|
895
895
|
position: relative;
|
|
896
896
|
width: 8px;
|
|
897
|
-
`,
|
|
897
|
+
`,it=s.dt.tr`
|
|
898
898
|
align-items: flex-start;
|
|
899
899
|
display: flex;
|
|
900
900
|
padding: ${({theme:e})=>e.spacing[.25]} 0;
|
|
@@ -915,9 +915,9 @@
|
|
|
915
915
|
text-align: center;
|
|
916
916
|
width: ${e.spacing[2.5]};
|
|
917
917
|
`}
|
|
918
|
-
`,
|
|
918
|
+
`,gn=s.dt.th`
|
|
919
919
|
${$t}
|
|
920
|
-
`,
|
|
920
|
+
`,un=s.dt.td`
|
|
921
921
|
${({theme:e})=>`
|
|
922
922
|
${$t}
|
|
923
923
|
height: ${e.spacing[2.5]};
|
|
@@ -967,14 +967,14 @@
|
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
`}
|
|
970
|
-
`,
|
|
970
|
+
`,xn=s.dt.div.attrs({className:"dot"})`
|
|
971
971
|
position: absolute;
|
|
972
972
|
top: 48%;
|
|
973
973
|
|
|
974
974
|
> span {
|
|
975
975
|
font-size: 4px;
|
|
976
976
|
}
|
|
977
|
-
`,
|
|
977
|
+
`,nt=s.dt.button`
|
|
978
978
|
cursor: pointer;
|
|
979
979
|
display: flex;
|
|
980
980
|
|
|
@@ -994,9 +994,9 @@
|
|
|
994
994
|
padding: 0 ${e.spacing[.25]};
|
|
995
995
|
width: 100%;
|
|
996
996
|
`}
|
|
997
|
-
`,yt=({state:e,date:
|
|
997
|
+
`,yt=({state:e,date:i})=>{const n=f.useRef(null),a=s.$14e0f24ef4ac5c92$export$629b0a497aa65267(i,s.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:o,isSelected:l,isDisabled:c,formattedDate:d}=s.$36a0ac60f04457c5$export$136073280381448e({date:i},e,n),p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(i,e.highlightedRange.start):l,g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(i,e.highlightedRange.end):l,x=l&&!c&&!(p||g)?"range":"";return t.jsx(un,{id:x,...r,children:t.jsxs("div",{...o,className:`cell ${p||g?"selected":""}
|
|
998
998
|
${c?"disabled":""} ${a?"today":""}
|
|
999
|
-
${!e.isFocused&&!a?"focused":""} ${x}`,ref:
|
|
999
|
+
${!e.isFocused&&!a?"focused":""} ${x}`,ref:n,children:[d,a?t.jsx(xn,{children:t.jsx(I,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},ze=({state:e,...i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{weekDays:a}=s.$e3031d1f8c9d64eb$export$cb95147730a423f5(i,e),r=s.$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(e.visibleRange.start,n);return t.jsxs("table",{children:[t.jsx("thead",{children:t.jsx(it,{children:a.map((o,l)=>{const c=`key_${l}`;return t.jsx(gn,{children:o},c)})})}),t.jsx("tbody",{children:[...new Array(r).keys()].map(o=>t.jsx(it,{children:e.getDatesInWeek(o).map((l,c)=>{const d=`key_${c}`;return l?t.jsx(yt,{date:l,state:e},d):t.jsx("td",{},d)})},o))})]})},fn=s.dt(_e)`
|
|
1000
1000
|
align-items: center;
|
|
1001
1001
|
background-color: inherit;
|
|
1002
1002
|
border-color: inherit;
|
|
@@ -1016,7 +1016,7 @@
|
|
|
1016
1016
|
background-color: ${({theme:e})=>e.palette.gray[100]};
|
|
1017
1017
|
cursor: pointer;
|
|
1018
1018
|
}
|
|
1019
|
-
`,
|
|
1019
|
+
`,hn=s.dt.div`
|
|
1020
1020
|
${({theme:e})=>`
|
|
1021
1021
|
align-items: flex-start;
|
|
1022
1022
|
background: ${e.palette.white};
|
|
@@ -1030,8 +1030,8 @@
|
|
|
1030
1030
|
padding: ${e.spacing[.25]};
|
|
1031
1031
|
width: 292px;
|
|
1032
1032
|
`}
|
|
1033
|
-
`,
|
|
1034
|
-
${({theme:e,$disabled:
|
|
1033
|
+
`,bn=s.dt.button`
|
|
1034
|
+
${({theme:e,$disabled:i,$focus:n,$header:a})=>{const r=n?"34px":"40px";return`
|
|
1035
1035
|
align-items: center;
|
|
1036
1036
|
border-radius: ${a?`0 ${e.spacing[.5]} ${e.spacing[.5]} 0`:"4px"};
|
|
1037
1037
|
border-left: inherit;
|
|
@@ -1042,10 +1042,10 @@
|
|
|
1042
1042
|
width: ${a?"38px":"40px"};
|
|
1043
1043
|
|
|
1044
1044
|
&:hover {
|
|
1045
|
-
background-color: ${e.palette.gray[
|
|
1045
|
+
background-color: ${e.palette.gray[i?500:100]};
|
|
1046
1046
|
}
|
|
1047
1047
|
`}}
|
|
1048
|
-
`,$
|
|
1048
|
+
`,$n=s.dt.div`
|
|
1049
1049
|
${({theme:e})=>`
|
|
1050
1050
|
align-items: center;
|
|
1051
1051
|
background: transparent;
|
|
@@ -1056,7 +1056,7 @@
|
|
|
1056
1056
|
justify-content: space-between;
|
|
1057
1057
|
width: calc(100% - 40px);
|
|
1058
1058
|
`}
|
|
1059
|
-
`,
|
|
1059
|
+
`,yn=s.dt.div`
|
|
1060
1060
|
align-items: center;
|
|
1061
1061
|
display: flex;
|
|
1062
1062
|
justify-content: flex-end;
|
|
@@ -1094,18 +1094,18 @@
|
|
|
1094
1094
|
font-weight: ${e.typography.weight.bold};
|
|
1095
1095
|
}
|
|
1096
1096
|
`}
|
|
1097
|
-
`,je=({disabled:e=!1,icon:
|
|
1098
|
-
${({theme:e,$disabled:
|
|
1099
|
-
border-color: ${
|
|
1097
|
+
`,je=({disabled:e=!1,icon:i,props:n})=>{const a=f.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(n,a);return t.jsx(bn,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:i==="calendar"||i==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(I,{icon:i,iconColor:z.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:i,nextButtonProps:n,title:a})=>{const r=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=f.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(je,{icon:"chevron-left",props:i}),t.jsxs(dn,{children:[a,t.jsxs(pn,{children:[t.jsx(nt,{"aria-label":"top",onClick:o,children:t.jsx(I,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(nt,{"aria-label":"bottom",onClick:l,children:t.jsx(I,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(je,{icon:"chevron-right",props:n})]})},mt=({onClose:e,props:i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:n}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(ze,{state:a}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wt=({segment:e,state:i})=>{const n=s.nt(),a=f.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,i,a),c=n.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?n.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},vt=({disabled:e,error:i=!1,props:n})=>{const a=s.nt(),r=f.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(n,o,r),c=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($n,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:a.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(wt,{segment:{...d,isEditable:!e},state:o},g)})}),i?t.jsx(I,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},jt=e=>{const i=f.useRef(null),n=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=n,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=f.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,n,i),d=f.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(a)||(g==="AM"?n.setSegment("dayPeriod",0):g==="PM"&&n.setSegment("dayPeriod",12))),l(g)},[o,n,a]);return t.jsxs(yn,{children:[t.jsx(rt,{...c,ref:i,children:n.segments.slice(0,-2).map((p,g)=>{const x=`key_${g}`;return t.jsx(wt,{segment:p,state:n},x)})}),t.jsxs(rt,{children:[t.jsx(at,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(at,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",mn=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",ot=(e,i)=>s.dayjs(String(e).replace(/-/gu,"/")).hour(i.hour).minute(i.minute).second(i.second).format("YYYY/MM/DD hh:mm A"),le=({error:e,buttonProps:i,datePickerRef:n,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:x})=>{const u=f.useCallback(h=>{const b=r==="day"?ke(String(h)):mn(String(h));o.onChange&&o.onChange(h??null),g&&g(c,b)},[o,r,c,g]);return t.jsxs(ee,{...l,className:`${a?"disabled":""} ${e?"error":""}`,ref:n,children:[t.jsx(vt,{disabled:a,error:e!=null,props:{...o,autoFocus:!1,granularity:r,onChange:u,shouldForceLeadingZeros:!0}}),t.jsx(je,{disabled:a,icon:r==="minute"?"calendar-clock":"calendar",props:i}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:a,id:c,name:c,type:"text",value:x??""})]})},Te=({children:e,...i})=>{const n=f.useRef(null),{dialogProps:a}=s.$40df3f8667284809$export$d55e7ee900f34e93(i,n);return t.jsx(hn,{...a,ref:n,children:e})},kt=({disabled:e=!1,error:i,helpLink:n,helpLinkText:a,helpText:r,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:x,...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:v,fieldProps:j,buttonProps:k,dialogProps:F,calendarProps:R}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...u,"aria-label":l??c,name:c},w,h);return t.jsxs(O,{error:i,helpLink:n,helpLinkText:a,helpText:r,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(le,{buttonProps:k,datePickerRef:h,disabled:e,error:i,fieldProps:j,groupProps:v,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:i})=>{const{locale:n}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=f.useRef(null),r=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:n}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(i,r,a);return t.jsxs("div",{className:"calendar-range",ref:a,children:[t.jsx(Ie,{nextButtonProps:l,prevButtonProps:o,state:r,title:c}),t.jsx(ze,{state:r}),t.jsx(Ye,{children:t.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wn=s.dt.div`
|
|
1098
|
+
${({theme:e,$disabled:i,$show:n})=>`
|
|
1099
|
+
border-color: ${n?e.palette.error[500]:e.palette.gray[300]};
|
|
1100
1100
|
display: flex;
|
|
1101
1101
|
gap: ${e.spacing[.25]};
|
|
1102
1102
|
width: 100%;
|
|
1103
1103
|
|
|
1104
1104
|
~ div {
|
|
1105
|
-
background: ${
|
|
1105
|
+
background: ${i?e.palette.gray[200]:e.palette.white};
|
|
1106
1106
|
}
|
|
1107
1107
|
`}
|
|
1108
|
-
`,St=({disabled:e=!1,error:
|
|
1108
|
+
`,St=({disabled:e=!1,error:i,label:n,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...x})=>{const u=`${a}Max`,h=`${a}Min`,b=f.useRef(null),m=f.useCallback(N=>{c&&N&&(c((d==null?void 0:d.name)??u,ke(String(N.end))),c((p==null?void 0:p.name)??h,ke(String(N.start))))},[u,h,c,d,p]),w=s.$93c38a5e28be6249$export$e50a61c1de9f574({...x,endName:(d==null?void 0:d.name)??u,startName:(p==null?void 0:p.name)??h,onChange(N){m(N)}}),{close:y}=w,{groupProps:v,startFieldProps:j,endFieldProps:k,buttonProps:F,dialogProps:R,calendarProps:C}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...x,"aria-label":n??a},w,b);return t.jsxs(O,{error:i,htmlFor:a,label:n,required:r,tooltip:o,children:[t.jsxs(wn,{$disabled:e,$show:i!==void 0,ref:b,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(le,{buttonProps:F,datePickerRef:b,disabled:e,error:i,fieldProps:{...j,"aria-label":`${j["aria-label"]} ${a}`,validate:N=>k.value&&N>k.value?"Start date must be less than or equal to end date":null},groupProps:v,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:i,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${a}`,validate:N=>j.value&&N<j.value?"End date must be greater than or equal to start date":null},groupProps:v,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]})},vn=s.dt.div`
|
|
1109
1109
|
${({theme:e})=>`
|
|
1110
1110
|
align-items: center;
|
|
1111
1111
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1114,19 +1114,19 @@
|
|
|
1114
1114
|
justify-content: center;
|
|
1115
1115
|
padding: ${e.spacing[.5]} ${e.spacing[1.25]};
|
|
1116
1116
|
`}
|
|
1117
|
-
`,
|
|
1117
|
+
`,jn=s.dt.div`
|
|
1118
1118
|
align-items: center;
|
|
1119
1119
|
display: flex;
|
|
1120
1120
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1121
1121
|
justify-content: flex-end;
|
|
1122
1122
|
flex: 1 0 0;
|
|
1123
|
-
`,zt=({handleTimeChange:e,onClose:
|
|
1123
|
+
`,zt=({handleTimeChange:e,onClose:i,props:n,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(vn,{children:[t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(jn,{children:t.jsx(jt,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ye,{children:t.jsx(P,{onClick:i,variant:"ghost",children:"Cancel"})})]})},kn=e=>{const{disabled:i=!1,error:n,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),x=f.useRef(null),u=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:i,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"||s.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=u,{groupProps:b,fieldProps:m,buttonProps:w,dialogProps:y,calendarProps:v}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,u,x),j=f.useCallback(F=>{if(v.onChange&&v.onChange(F),u.timeValue){const R=ot(F,u.timeValue);d==null||d(o,R,{shouldDirty:!0})}else u.setDateValue(F)},[v,o,d,u]),k=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(O,{error:n,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(le,{buttonProps:w,datePickerRef:x,disabled:i,error:n,fieldProps:m,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:g}),u.isOpen&&!i?t.jsx(ye,{offset:8,placement:"bottom start",state:u,triggerRef:x,children:t.jsx(Te,{...y,children:t.jsx(zt,{handleTimeChange:k,onClose:h,props:{...v,onChange:j},timeState:u})})}):null]})},Cn=({children:e,currentValue:i,externalLink:n,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(i)?"":i,d=String(n??c);return t.jsxs($,{children:[t.jsx(Ge,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Q,{href:d,children:c}):t.jsx(S,{size:"md",children:c})]})},Fe=({disabled:e=!1,hasIcon:i=!1,helpLink:n,helpLinkText:a,helpText:r,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:x,name:u,maskValue:h=!1,onPaste:b,placeholder:m,removeItemArray:w,register:y,suggestions:v,tooltip:j,type:k="text",weight:F,...R})=>{const{required:C,onBlur:N,onChange:L}=R,E=s.nt(),A=e?void 0:o,[U,G]=f.useState(""),J=f.useCallback(M=>{G(M.target.value),L==null||L(M)},[L]),W=d&&p&&!e&&U.trim()!=="",H=f.useCallback(M=>{M.key==="Enter"&&M.preventDefault()},[]);return t.jsxs(O,{error:A,helpLink:n,helpLinkText:a,helpText:r,htmlFor:u,label:g,linkPosition:x,required:C,tooltip:j,weight:F,children:[t.jsxs(ee,{className:`
|
|
1124
1124
|
${e?"disabled":""} ${A?"error":""} ${W?"success":""}
|
|
1125
|
-
`,children:[
|
|
1125
|
+
`,children:[i?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:v?`list_${u}`:void 0,onKeyDown:H,onPaste:b,placeholder:m,type:k,...y?y(u,{required:C,onBlur:N,onChange:J}):{...R,onChange:J}}),A?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"xs"}):void 0,W?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:E.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&c>0?t.jsx(B,{color:E.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:w?w(c):void 0,variant:"ghost"}):void 0]}),v?t.jsx("datalist",{id:`list_${u}`,children:v.map(M=>t.jsx("option",{value:M},M))}):void 0]})},Sn=s.dt.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,zn=s.dt.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1126
1126
|
gap: 12px;
|
|
1127
|
-
`,
|
|
1127
|
+
`,In=s.dt.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1128
1128
|
gap: 8px;
|
|
1129
|
-
`,ve=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,
|
|
1129
|
+
`,ve=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,Tn=s.dt.div.attrs({className:"comp-col"})`
|
|
1130
1130
|
word-wrap: break-word;
|
|
1131
1131
|
|
|
1132
1132
|
${({$width:e=null})=>e===null?"":`width: ${e}`};
|
|
@@ -1150,24 +1150,24 @@
|
|
|
1150
1150
|
> .comp-card {
|
|
1151
1151
|
height: 100%;
|
|
1152
1152
|
}
|
|
1153
|
-
`,Pe=({children:e,xl:
|
|
1154
|
-
${({$disp:e="flex",$mh:
|
|
1153
|
+
`,Pe=({children:e,xl:i,lg:n,md:a,sm:r,paddingTop:o,width:l})=>t.jsx(Tn,{$lg:n,$md:a,$paddingTop:o,$sm:r,$width:l,$xl:i,children:e}),Fn=s.dt.div.attrs({className:"comp-gap"})`
|
|
1154
|
+
${({$disp:e="flex",$mh:i=4,$mv:n=4})=>`
|
|
1155
1155
|
align-items: center;
|
|
1156
1156
|
display: ${e};
|
|
1157
|
-
margin: ${-
|
|
1157
|
+
margin: ${-n}px ${-i}px;
|
|
1158
1158
|
|
|
1159
1159
|
> * {
|
|
1160
|
-
margin: ${
|
|
1160
|
+
margin: ${n}px ${i}px;
|
|
1161
1161
|
}
|
|
1162
1162
|
`}
|
|
1163
|
-
`,
|
|
1164
|
-
${({$align:e="stretch",$cols:
|
|
1163
|
+
`,Nn=({children:e,disp:i,mh:n,mv:a})=>t.jsx(Fn,{$disp:i,$mh:n,$mv:a,children:e}),En=s.dt.div.attrs({className:"comp-row flex flex-row flex-wrap"})`
|
|
1164
|
+
${({$align:e="stretch",$cols:i=100,$colsPadding:n=6,$justify:a="start"})=>`
|
|
1165
1165
|
align-items: ${e};
|
|
1166
1166
|
justify-content: ${a};
|
|
1167
1167
|
margin: -6px;
|
|
1168
1168
|
text-align: ${a};
|
|
1169
1169
|
|
|
1170
|
-
--cols: ${
|
|
1170
|
+
--cols: ${i};
|
|
1171
1171
|
|
|
1172
1172
|
> *:not(.comp-col) {
|
|
1173
1173
|
width: 100%;
|
|
@@ -1175,27 +1175,27 @@
|
|
|
1175
1175
|
}
|
|
1176
1176
|
|
|
1177
1177
|
> .comp-col {
|
|
1178
|
-
padding: ${
|
|
1178
|
+
padding: ${n}px;
|
|
1179
1179
|
}
|
|
1180
1180
|
`}
|
|
1181
|
-
`,It=({align:e,children:
|
|
1181
|
+
`,It=({align:e,children:i,cols:n,colsPadding:a,justify:r})=>t.jsx(En,{$align:e,$cols:n,$colsPadding:a,$justify:r,children:i}),Ae=({addText:e,append:i,disabled:n=!1,fields:a,fieldState:r,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:x,onChange:u,placeholder:h,tooltip:b,remove:m,value:w})=>{var j;const y=f.useCallback(()=>{i==null||i(o)},[i,o]),v=f.useCallback(k=>()=>{m==null||m(k)},[m]);return t.jsxs(It,{align:"start",children:[t.jsx(Pe,{lg:75,md:75,sm:75,children:t.jsx(Fe,{disabled:n,error:r?(j=r.error)==null?void 0:j.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:d,name:g,onBlur:x,onChange:u,placeholder:h,removeItemArray:v,required:c,tooltip:b,value:w})}),l<p-1&&l+1===(a==null?void 0:a.length)?t.jsx(Pe,{lg:25,md:25,sm:25,children:t.jsx(P,{disabled:n,icon:"plus",onClick:y,variant:"ghost",width:"100%",children:e??"Add"})}):void 0]})},Rn=({addText:e,append:i,control:n,disabled:a,fields:r,initValue:o="",required:l,label:c,max:d=void 0,name:p="array-field",onChange:g,placeholder:x,remove:u,tooltip:h})=>n&&r?t.jsx(f.Fragment,{children:r.map((b,m)=>t.jsx(s.Controller,{control:n,name:`${p}.${m}`,render:({field:w,fieldState:y})=>t.jsx(Ae,{addText:e,append:i,disabled:a,fieldState:y,fields:r,index:m,initValue:o,label:c,max:d,name:w.name,onBlur:w.onBlur,onChange:g??w.onChange,placeholder:x,remove:u,required:l,tooltip:h,value:typeof w.value=="object"?w.value.value:w.value}),index:m},b.id))}):t.jsx(Ae,{addText:e,disabled:a,initValue:o,label:c,max:d,name:p,onChange:g,placeholder:x,required:l,tooltip:h}),Dn=s.dt(pt)`
|
|
1182
1182
|
white-space: nowrap;
|
|
1183
1183
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1184
1184
|
text-overflow: ellipsis;
|
|
1185
1185
|
overflow: hidden;
|
|
1186
1186
|
max-width: 80%;
|
|
1187
|
-
`,
|
|
1187
|
+
`,Ln=s.dt.input`
|
|
1188
1188
|
opacity: 0;
|
|
1189
1189
|
position: absolute;
|
|
1190
1190
|
visibility: hidden;
|
|
1191
1191
|
width: 0;
|
|
1192
|
-
`,Tt=(e,n
|
|
1192
|
+
`,Tt=(e,i,n)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:i,value:n}}),a},Pn=e=>{const i=e;return i?Array.from(i).map(n=>n.name).join(", "):""},An=({accept:e,disabled:i=!1,error:n,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:x,setValue:u,tooltip:h,watch:b,weight:m})=>{const w=s.nt(),y=i?void 0:n,v=f.useRef(null),j=x==null?void 0:x(d,{required:g}),k=b==null?void 0:b(d),F=Pn(k),R=f.useCallback(()=>{const L=Tt("change",d,void 0);u&&u(d,void 0),j&&j.onChange(L)},[j,d,u]),C=f.useCallback(L=>{const{files:E}=L.currentTarget;E&&E.length>0&&(p==null||p(L),u&&u(d,E),j&&j.onChange(L))},[j,d,p,u]),N=f.useCallback(L=>{i?L.preventDefault():v.current&&v.current.click()},[i]);return t.jsxs(O,{error:y,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:g,tooltip:h,weight:m,children:[t.jsxs(ee,{className:`${i?"disabled":""} ${y?"error":""}`,children:[t.jsx(Dn,{$size:"xs",children:F}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(F)?void 0:t.jsx(B,{color:w.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:R,variant:"ghost",width:"20px"}),y&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}),t.jsxs(P,{border:i?`1px solid ${w.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:i,height:"40px",onClick:N,variant:"primary",width:"96px",children:[t.jsx(I,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Ln,{...j,accept:e,"aria-label":d,"data-testid":d,disabled:i,id:l??d,multiple:c,name:d,onChange:C,ref:v,type:"file"})]})},Wn=s.dt.input`
|
|
1193
1193
|
border: none;
|
|
1194
1194
|
background: transparent;
|
|
1195
1195
|
min-width: 15rem;
|
|
1196
1196
|
padding: 0;
|
|
1197
1197
|
flex: 1;
|
|
1198
|
-
`,We=({disabled:e=!1,error:
|
|
1198
|
+
`,We=({disabled:e=!1,error:i,field:n,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b})=>{const m=s.nt(),w=e?void 0:i,[y,v]=f.useState(""),j=d?h:n==null?void 0:n.value,k=f.useMemo(()=>j&&typeof j=="string"?j.split(",").filter(Boolean):[],[j]),F=f.useCallback(E=>{const U=[...new Set(E.filter(Boolean))].join(","),G=Tt("change",c,U);n&&n.onChange(G),d&&d(G)},[n,c,d]),R=f.useCallback(E=>{v(E.target.value)},[]),C=f.useCallback(E=>{const A=y.trim();A.length&&!k.includes(A)&&(E.preventDefault(),F([...k,A]),v("")),n&&n.onBlur()},[y,n,F,k]),N=f.useCallback(E=>{const A=y.trim();E.key==="Enter"&&A.length===0&&E.preventDefault(),["Enter",","].includes(E.key)&&A.length>0&&!k.includes(A)?(E.preventDefault(),F([...k,A]),v("")):E.key==="Backspace"&&!A.length&&k.length&&(E.preventDefault(),p==null||p(k[k.length-1]),F(k.slice(0,-1)))},[y,p,F,k]),L=f.useCallback(E=>()=>{p==null||p(E),F(k.filter(A=>A!==E))},[p,F,k]);return t.jsx(O,{error:w,helpLink:a,helpLinkText:r,helpText:o,htmlFor:c,label:l,required:x,tooltip:u,weight:b,children:t.jsxs(ee,{$overflowX:"auto",className:`${e?"disabled":""} ${w?"error":""}`,children:[k.map(E=>t.jsx(X,{disabled:e,onClose:L(E),tagLabel:E},E)),t.jsx(Wn,{"aria-hidden":!1,"aria-invalid":w?"true":"false","aria-label":c,"aria-required":x,autoComplete:"off",id:c,onBlur:C,onChange:R,onKeyDown:N,placeholder:k.length===0?g:void 0,ref:n==null?void 0:n.ref,type:"text",value:y}),w?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}):void 0]})})},Bn=({disabled:e=!1,control:i,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b})=>i?t.jsx(s.Controller,{control:i,name:c,render:({field:m})=>t.jsx(We,{disabled:e,error:n,field:m,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:x,tooltip:u,weight:b}),rules:{required:x}}):t.jsx(We,{disabled:e,error:n,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b}),Be=f.forwardRef(function({disabled:i,icon:n,margin:a,onClick:r,...o},l){return t.jsx(fn,{$margin:a,"aria-label":n,className:"action-btn",disabled:i,onClick:r,ref:l,type:"button",...o,children:t.jsx(I,{icon:n,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Ce=({error:e,decimalPlaces:i=0,disabled:n=!1,id:a,maxLength:r,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:x,setValue:u,value:h})=>{const b=s.nt(),m=n?void 0:e,w=i<0?0:i,[y,v]=f.useState(h?s._.toNumber(h):0),j=f.useCallback(()=>{const C=(y-10**-w).toFixed(w),N=Math.max(Number(l),Number(C));u&&u(c,N,{shouldDirty:!0}),v(N)},[w,y,l,c,u]),k=f.useCallback(()=>{const C=(y+10**-w).toFixed(w),N=Math.min(Number(o),Number(C)>Number(l)?Number(C):Number(l));u&&u(c,N,{shouldDirty:!0}),v(N)},[w,y,o,l,c,u]),F=f.useCallback(C=>{const{value:N}=C.target,L=/\d+/u.test(N)&&!s._.isEmpty(N);u&&u(c,L?N:void 0),d&&d(C),v(Number(N))},[c,d,u]),R=f.useCallback(C=>{C.key==="Enter"&&C.preventDefault()},[]);return t.jsxs(ee,{className:`${n?"disabled":""} ${m?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":x,autoComplete:"off",disabled:n,id:a??c,max:o,min:l,onKeyDown:R,placeholder:p,required:x,step:10**-w,type:"number",...g==null?void 0:g(c,{maxLength:r,max:o,min:l,onChange:F,value:h,valueAsNumber:!0})}),m&&t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsx(Be,{borderLeft:"inherit",borderRight:"inherit",disabled:n,icon:"minus",margin:"0 -0.625rem 0 0",onClick:j,px:.75,py:.75}),t.jsx(Be,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:n,icon:"plus",onClick:k,px:.75,py:.75})]})},Ft=({decimalPlaces:e,disabled:i=!1,error:n,helpLink:a,helpText:r,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:x,onChange:u,placeholder:h,register:b,required:m,setValue:w,tooltip:y,value:v,watch:j,weight:k})=>t.jsx(O,{error:i?void 0:n,helpLink:a,helpText:r,htmlFor:x,label:l,linkPosition:c,maxLength:d,required:m,tooltip:y,weight:k,children:t.jsx(Ce,{decimalPlaces:e,disabled:i,error:n,id:o,max:p,maxLength:d,min:g,name:x,onChange:u,placeholder:h,register:b,required:m,setValue:w,value:u?v:j==null?void 0:j(x)})}),Nt=({disabled:e=!1,error:i,name:n,label:a,propsMax:r,propsMin:o,required:l,tooltip:c,variant:d="default"})=>{const p=`${n}Max`,g=`${n}Min`;return t.jsx(O,{error:i,htmlFor:n,label:a,required:l,tooltip:c,children:t.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Ce,{...o,disabled:e,error:i,name:o.name??g}),t.jsx(Ce,{...r,disabled:e,error:i,name:r.name??p})]})})},Mn=s.dt.div`
|
|
1199
1199
|
${({theme:e})=>`
|
|
1200
1200
|
align-items: flex-start;
|
|
1201
1201
|
align-self: stretch;
|
|
@@ -1235,7 +1235,7 @@
|
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
`}
|
|
1238
|
-
`,
|
|
1238
|
+
`,Hn=s.dt.button`
|
|
1239
1239
|
${({theme:e})=>`
|
|
1240
1240
|
align-items: center;
|
|
1241
1241
|
background: inherit;
|
|
@@ -1251,7 +1251,7 @@
|
|
|
1251
1251
|
cursor: not-allowed;
|
|
1252
1252
|
}
|
|
1253
1253
|
`}
|
|
1254
|
-
`,
|
|
1254
|
+
`,On=s.dt.ul`
|
|
1255
1255
|
${({theme:e})=>`
|
|
1256
1256
|
align-items: flex-start;
|
|
1257
1257
|
box-shadow: ${e.shadows.md};
|
|
@@ -1265,7 +1265,7 @@
|
|
|
1265
1265
|
scrollbar-width: thin;
|
|
1266
1266
|
width: max-content;
|
|
1267
1267
|
`}
|
|
1268
|
-
`,
|
|
1268
|
+
`,_n=s.dt.li`
|
|
1269
1269
|
${({theme:e})=>`
|
|
1270
1270
|
align-items: center;
|
|
1271
1271
|
background: ${e.palette.white};
|
|
@@ -1282,16 +1282,16 @@
|
|
|
1282
1282
|
background: ${e.palette.gray[100]};
|
|
1283
1283
|
}
|
|
1284
1284
|
`}
|
|
1285
|
-
`,
|
|
1285
|
+
`,Vn=s.dt.p`
|
|
1286
1286
|
color: ${({theme:e})=>e.palette.gray[800]};
|
|
1287
1287
|
font-size: inherit;
|
|
1288
1288
|
min-width: 55%;
|
|
1289
1289
|
overflow: hidden;
|
|
1290
1290
|
text-overflow: ellipsis;
|
|
1291
1291
|
white-space: nowrap;
|
|
1292
|
-
`,me=(e,n
|
|
1292
|
+
`,me=(e,i,n=!1)=>{f.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&i()};return n?(document.addEventListener("mousedown",a,!0),()=>{document.removeEventListener("mousedown",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("mousedown",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",a,!0)})},[n,e,i])},Un=({disabled:e,error:i,label:n,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const x=s.nt(),u=f.useRef(null),h=e?void 0:i,b=(p==null?void 0:p(a))??d,[m,w]=f.useState(!1),[y,v]=f.useState(""),{refs:j,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:F,inputValue:R,handlePhoneValueChange:C,country:N,setCountry:L}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),E=f.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),A=f.useCallback(W=>{W.preventDefault(),w(H=>!H),m||v("")},[m]),U=f.useCallback(W=>()=>{L(W),w(!1),v("")},[L,w]),G=f.useCallback(W=>{W.key.length===1?v(H=>H+W.key):W.key==="Backspace"&&v(H=>H.slice(0,-1))},[]),J=s.R.filter(W=>{const{name:H}=s.M(W);return H.toLowerCase().includes(y.toLowerCase())});return me(j.floating.current,()=>{w(!1),v("")},!0),t.jsx(O,{error:h,htmlFor:a,label:n,required:o,tooltip:c,weight:g,children:t.jsxs(Mn,{className:`${e?"disabled":""} ${h?"error":""}`,ref:u,children:[t.jsxs(Hn,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:A,onKeyDown:G,ref:j.setReference,children:[t.jsx(s.q,{iso2:N.iso2,size:"16px"}),t.jsx(I,{icon:"angle-down",iconColor:x.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(ee,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":a,"aria-required":o,autoComplete:"off","data-testid":`${a}-input`,disabled:e,id:a,name:a,onKeyDown:E,placeholder:r,ref:F,type:"tel",value:R,...l==null?void 0:l(a,{required:o,onChange:C})}),h?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:x.palette.error[500],iconSize:"xs"}):void 0]}),m&&ne.createPortal(t.jsx(On,{ref:j.setFloating,style:k,children:J.map(W=>{const{dialCode:H,iso2:M,name:Re}=s.M(W);return t.jsxs(_n,{onClick:U(M),value:M,children:[t.jsx(s.q,{iso2:M,size:"16px"}),t.jsx(Vn,{children:Re}),t.jsx(S,{color:x.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+H})]},M)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Gn=({disabled:e=!1,error:i,helpLink:n,helpText:a,isTouched:r,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:x,register:u,required:h,rows:b,tooltip:m,watch:w,weight:y,value:v})=>{const j=s.nt(),k=(w==null?void 0:w(c))??v,F=o&&r&&!e,R=e?void 0:i;return t.jsx(O,{error:R,helpLink:n,helpText:a,htmlFor:c,label:l,maxLength:g,required:h,tooltip:m,value:k?String(k):void 0,weight:y,children:t.jsxs(ee,{className:`
|
|
1293
1293
|
${e?"disabled":""} ${R?"error":""} ${F?"success":""}
|
|
1294
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":R?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:x,rows:b,value:k,...u==null?void 0:u(c,{required:h})}),R?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"xs"}):void 0,F?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:j.palette.success[500],iconSize:"xs"}):void 0]})})},
|
|
1294
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":R?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:x,rows:b,value:k,...u==null?void 0:u(c,{required:h})}),R?t.jsx(I,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"xs"}):void 0,F?t.jsx(I,{icon:"check-circle",iconClass:"success-icon",iconColor:j.palette.success[500],iconSize:"xs"}):void 0]})})},Yn=({description:e,disabled:i,id:n,align:a,inputType:r="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:x})=>{const u=f.useMemo(()=>{if(r==="text")return t.jsx(Fe,{disabled:i,name:d,placeholder:p});if(r==="date")return t.jsx(kt,{disabled:i,name:d});const{decimalPlaces:h,max:b,min:m}=o??{};return t.jsx(Ft,{decimalPlaces:h,disabled:i,max:b,min:m,name:d,placeholder:p})},[i,o,r,d,p]);return t.jsxs(on,{$align:a,$minHeight:l,$minWidth:c,children:[t.jsx(Se,{description:e,id:n,title:x,tooltip:g}),u]})},Et=(e,i)=>{const[a,r]=f.useState(0),[o,l]=f.useState(0);return f.useEffect(()=>{o===100&&(()=>{r(d=>d===i-1?0:d+1)})()},[o,i]),f.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:a,progress:o,setCycle:r,setProgress:l}},Rt=({publicId:e,format:i="webp"})=>{const n=f.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return f.useMemo(()=>n.image(e).format(i),[n,e,i])},Ne=e=>{const[i,n]=f.useState(!1),a=f.useCallback(()=>{n(!0)},[]),r=f.useCallback(()=>{n(!1)},[]),o=f.useCallback(()=>{n(l=>!l)},[]);return{close:r,isOpen:i,name:e,open:a,setIsOpen:n,toggle:o}},qn=({name:e,items:i,columnOrder:n,setColumnOrder:a})=>{const r=f.useMemo(()=>[...i.filter(({locked:g})=>g).map(({locked:g,...x})=>({...x,visible:!0,locked:g})),...i.filter(({locked:g})=>!g)],[i]),[o,l]=f.useState(r),c=f.useCallback(g=>{const x=g.filter(({locked:m})=>!m),h=[...g.filter(({locked:m})=>m),...x],b=h.map(({name:m})=>m);l(m=>[...h,...m.filter(({name:w})=>!b.includes(w))]),a&&a(h.map(({id:m})=>m))},[a]),d=f.useCallback(()=>{const g=o.map(x=>{var h;const u=(n==null?void 0:n.includes(x.id))??!1;return(h=x.toggleVisibility)==null||h.call(x,u),{...x,visible:u}}).toSorted((x,u)=>{const h=(n==null?void 0:n.indexOf(x.id))??0,b=(n==null?void 0:n.indexOf(u.id))??0;return Number(u.visible)!==Number(x.visible)?Number(u.visible)-Number(x.visible):h-b});l(g),a==null||a(n)},[o,n,a]),p=f.useMemo(()=>s.some(o,g=>((n==null?void 0:n.includes(g.id))??!1)!==g.visible),[o,n]);return{setColumns:c,resetToDefault:d,columns:o,...Ne(e),hasChanged:p}},Dt=(e,i)=>f.useMemo(()=>s._.debounce(e,i),[e,i]),Kn=e=>{const[i,n]=f.useState(),a=Dt(r=>{n(r)},(e==null?void 0:e.debounceWait)??300);return[i,a]},Xn=({alt:e="img",height:i="",width:n="",plugins:a=[s.lazyload(),s.placeholder()],publicId:r})=>{const o=Rt({publicId:r});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:i,plugins:a,width:n})},te=f.memo(Xn),Jn=s.dt.label`
|
|
1295
1295
|
${({theme:e})=>`
|
|
1296
1296
|
align-items: center;
|
|
1297
1297
|
display: flex;
|
|
@@ -1370,7 +1370,7 @@
|
|
|
1370
1370
|
}
|
|
1371
1371
|
|
|
1372
1372
|
`}
|
|
1373
|
-
`,
|
|
1373
|
+
`,Zn=s.dt.span.attrs({className:"checkmark"})``,qe=f.forwardRef(function({defaultChecked:i=!1,disabled:n=!1,label:a,name:r,onChange:o,onClick:l,value:c,...d},p){return t.jsxs(Jn,{"aria-disabled":n,"aria-label":a??r,role:"radiogroup",children:[t.jsx("input",{"aria-checked":i,"aria-disabled":n,"aria-label":a??r,defaultChecked:i,disabled:n,name:r,onChange:o,onClick:l,ref:p,type:"radio",value:c,...d}),t.jsx(Zn,{}),a??null]})}),Qn=({alt:e,imageId:i,icon:n,selectorProps:a,onClick:r,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:a.name,onClick:r,value:a.value,...o==null?void 0:o(a.name)})}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[i===void 0?void 0:t.jsx(te,{alt:e??"card image",height:"32px",publicId:i,width:"32px"}),n===void 0?void 0:t.jsx(I,{icon:n,iconSize:"sm",iconType:"fa-light"}),t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"sm",children:l})]})]})},re=s.dt.div`
|
|
1374
1374
|
${({theme:e})=>`
|
|
1375
1375
|
align-items: center;
|
|
1376
1376
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1420,7 +1420,7 @@
|
|
|
1420
1420
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1421
1421
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1422
1422
|
}
|
|
1423
|
-
`,Lt=f.forwardRef(function({defaultChecked:
|
|
1423
|
+
`,Lt=f.forwardRef(function({defaultChecked:i,disabled:n=!1,justify:a,name:r,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},p){const g=i===!0?"on":"off",x=typeof o=="object"&&o.on&&o.off?o[g]:o,u=f.useCallback(h=>{h.stopPropagation()},[]);return t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:a,children:[t.jsx($,{minWidth:l,children:x}),t.jsxs(tr,{onClick:u,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":n,"aria-label":r,checked:i===!0,disabled:n,name:r,ref:p,type:"checkbox"}),t.jsx(re,{"aria-label":"Toggle Switch",id:`${r}Toggle`,children:t.jsx(er,{})})]}),c]})}),ir=({id:e,title:i,toggles:n,minWidth:a="auto",height:r="auto"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColor:o.palette.white,border:`1px solid ${o.palette.gray[200]}`,borderRadius:o.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:r,justify:"center",minHeight:"100px",minWidth:a,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Se,{id:e,title:i}),t.jsx($,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:n.map(l=>t.jsx(Lt,{...l},`$card-toggle-${l.name}`))})]})},nr=s.dt.div`
|
|
1424
1424
|
position: relative;
|
|
1425
1425
|
margin: auto;
|
|
1426
1426
|
overflow: hidden;
|
|
@@ -1436,8 +1436,8 @@
|
|
|
1436
1436
|
justify-content: center;
|
|
1437
1437
|
min-width: 100%;
|
|
1438
1438
|
`,or=s.dt.button`
|
|
1439
|
-
${({theme:e,$isActive:
|
|
1440
|
-
background-color: ${
|
|
1439
|
+
${({theme:e,$isActive:i})=>`
|
|
1440
|
+
background-color: ${i?e.palette.primary[400]:e.palette.white};
|
|
1441
1441
|
border: none;
|
|
1442
1442
|
border-radius: 50%;
|
|
1443
1443
|
cursor: pointer;
|
|
@@ -1450,7 +1450,7 @@
|
|
|
1450
1450
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1451
1451
|
justify-content: center;
|
|
1452
1452
|
margin-top: ${({theme:e})=>e.spacing[2]};
|
|
1453
|
-
`,lr=({slides:e,interval:
|
|
1453
|
+
`,lr=({slides:e,interval:i=300})=>{const{cycle:n,setCycle:a,setProgress:r}=Et(i,e.length),o=f.useCallback(l=>()=>{a(l),r(0)},[a,r]);return t.jsxs(nr,{"aria-roledescription":"carousel",children:[t.jsx(rr,{$currentIndex:n,children:e.map((l,c)=>{const d=`slide-${c}`;return t.jsx(ar,{"aria-label":d,"aria-roledescription":"slide",children:l.content},d)})}),t.jsx(sr,{children:e.map((l,c)=>{const d=`nav-button-${c}`;return t.jsx(or,{$isActive:c===n,"aria-label":`Go to slide ${c+1}`,"data-testid":c===n?"active":"inactive",onClick:o(c)},d)})})]})},cr=s.dt.label`
|
|
1454
1454
|
${({theme:e})=>`
|
|
1455
1455
|
align-items: center;
|
|
1456
1456
|
color: ${e.palette.gray[600]};
|
|
@@ -1522,7 +1522,7 @@
|
|
|
1522
1522
|
fill: ${e.palette.white};
|
|
1523
1523
|
}
|
|
1524
1524
|
`}
|
|
1525
|
-
`,Ee=f.forwardRef(function({checked:
|
|
1525
|
+
`,Ee=f.forwardRef(function({checked:i,disabled:n=!1,label:a,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...x},u){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(cr,{"aria-disabled":n,children:[t.jsx("input",{"aria-checked":i,"aria-disabled":n,"aria-hidden":!1,"aria-label":r,checked:i,disabled:n,id:r,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:u,type:"checkbox",value:g,...x}),t.jsx(I,{disabled:n,icon:"check",iconSize:"sm"}),a??g]}),p===void 0?void 0:t.jsx(Y,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Pt=s.dt.div`
|
|
1526
1526
|
${({theme:e})=>`
|
|
1527
1527
|
background-color: ${e.palette.gray[100]};
|
|
1528
1528
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1592,10 +1592,10 @@
|
|
|
1592
1592
|
background-color: ${e.palette.gray[200]};
|
|
1593
1593
|
}
|
|
1594
1594
|
`}
|
|
1595
|
-
`,At=({noCodeMessage:e="Code snippet not available",snippet:
|
|
1595
|
+
`,At=({noCodeMessage:e="Code snippet not available",snippet:i,specific:n})=>(f.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":s._.isNil(i)||s._.isString(i)?0:i.offset+.7,...n!==void 0?{"data-line":String(Number(n))}:{},children:s._.isNil(i)||s._.isString(i)||s._.isEmpty(i.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:i.content})})})),pr=({noCodeMessage:e="Code snippet not available",snippet:i,specific:n,variant:a="normal"})=>{const r=s.nt(),[o,l]=f.useState(!1),[c,d]=f.useState(!0),p=f.useCallback(()=>{l(h=>!h)},[l]),g=f.useCallback(()=>{if(s._.isNil(i)||s._.isEmpty(i)||!s._.isString(i))return d(!1),e;const h=i.split(`
|
|
1596
1596
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1597
1597
|
`)}
|
|
1598
|
-
${h[8]}...`:(h.length<8&&d(!1),
|
|
1598
|
+
${h[8]}...`:(h.length<8&&d(!1),i)},[o,i,e]),x=f.useMemo(g,[g]),u=f.useCallback(async()=>{await navigator.clipboard.writeText(x)},[x]);return a==="location"?t.jsx(At,{noCodeMessage:e,snippet:i,specific:n}):t.jsxs($,{bgColor:r.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:x})})}),t.jsxs(dr,{children:[t.jsx(B,{height:r.spacing[2.5],icon:"copy",iconColor:r.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:u,variant:"ghost",width:r.spacing[2.5]}),c?t.jsxs(P,{onClick:p,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(I,{icon:o?"chevron-up":"chevron-down",iconColor:r.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:u})]}):!1]})]})},{getVariant:gr}=K(e=>({fixed:`
|
|
1599
1599
|
height: auto;
|
|
1600
1600
|
min-width: 300px;
|
|
1601
1601
|
padding: ${e.spacing[1.25]};
|
|
@@ -1625,7 +1625,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1625
1625
|
justify-content: center;
|
|
1626
1626
|
z-index: 99999;
|
|
1627
1627
|
`,Ke=s.dt($)`
|
|
1628
|
-
${({theme:e,$size:
|
|
1628
|
+
${({theme:e,$size:i})=>`
|
|
1629
1629
|
background-color: ${e.palette.white};
|
|
1630
1630
|
border: 1px solid ${e.palette.gray[200]};
|
|
1631
1631
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1639,7 +1639,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1639
1639
|
margin: auto;
|
|
1640
1640
|
white-space: pre-line;
|
|
1641
1641
|
|
|
1642
|
-
${gr(e,
|
|
1642
|
+
${gr(e,i)}
|
|
1643
1643
|
`}
|
|
1644
1644
|
`,ur=s.dt.div`
|
|
1645
1645
|
${({theme:e})=>`
|
|
@@ -1716,7 +1716,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1716
1716
|
margin-right: 0;
|
|
1717
1717
|
`:""}
|
|
1718
1718
|
}
|
|
1719
|
-
`,Bt=({alert:e,modalRef:
|
|
1719
|
+
`,Bt=({alert:e,modalRef:i,confirmButton:n=void 0,cancelButton:a=void 0})=>{const{close:r}=i,o=f.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=f.useCallback(()=>{n!=null&&n.onClick&&n.onClick(),r()},[n,r]);return[n,a].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(hr,{children:t.jsxs("div",{children:[a&&t.jsx(P,{id:a.id,onClick:o,variant:"tertiary",width:"100%",children:a.text}),n&&t.jsx(P,{id:n.id,onClick:l,variant:"primary",width:"100%",children:n.text})]})})]}):null},Mt=({title:e,description:i,modalRef:n,otherActions:a,onClose:r})=>{const o=s.nt(),l=f.useCallback(()=>{r==null||r(),n.close()},[n,r]);return f.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(xr,{children:[t.jsxs(fr,{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:[a,t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),i&&s.lodashExports.isString(i)&&!s.lodashExports.isEmpty(i)?t.jsx(S,{mt:.5,size:"sm",children:i}):void 0,i&&!s.lodashExports.isString(i)&&t.jsx(se,{display:"block",mt:.5,size:"sm",children:i})]})},$r=({disabled:e,id:i="modal-confirm",onCancel:n,onConfirm:a="submit",txtCancel:r,txtConfirm:o})=>{const l=a==="submit";return t.jsxs($,{display:"flex",gap:.75,maxWidth:n?"392px":"190px",mt:1.5,children:[n?t.jsx(P,{id:`${i}-cancel`,justify:"center",onClick:n,variant:"tertiary",width:"100%",children:r??"Cancel"}):void 0,t.jsx(P,{disabled:e,id:i,justify:"center",onClick:l?void 0:a,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},yr=s.dt.button`
|
|
1720
1720
|
${({theme:e})=>`
|
|
1721
1721
|
align-items: center;
|
|
1722
1722
|
color: ${e.palette.gray[500]};
|
|
@@ -1745,15 +1745,15 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1745
1745
|
height: ${e.spacing[3]};
|
|
1746
1746
|
width: max-content;
|
|
1747
1747
|
`}
|
|
1748
|
-
`,wr=(e,n
|
|
1748
|
+
`,wr=(e,i,n)=>n?i==="secondary"?`3px solid ${e.palette.primary[100]}`:`3px solid ${e.palette.primary[500]}`:"unset",vr=s.dt.div`
|
|
1749
1749
|
display: flex;
|
|
1750
1750
|
flex-direction: row;
|
|
1751
1751
|
gap: ${({theme:e})=>e.spacing[.25]};
|
|
1752
|
-
border-bottom: ${({theme:e,$borderButton:
|
|
1752
|
+
border-bottom: ${({theme:e,$borderButton:i,$variant:n})=>wr(e,n,i)};
|
|
1753
1753
|
align-items: center;
|
|
1754
1754
|
padding: ${({theme:e})=>e.spacing[.625]}
|
|
1755
1755
|
${({theme:e})=>e.spacing[.5]};
|
|
1756
|
-
padding-bottom: ${({theme:e,$borderButton:
|
|
1756
|
+
padding-bottom: ${({theme:e,$borderButton:i})=>i?`calc(${e.spacing[.625]} - 2px)`:e.spacing[.625]};
|
|
1757
1757
|
|
|
1758
1758
|
&:hover:not([disabled]) {
|
|
1759
1759
|
background-color: ${({theme:e})=>e.palette.gray[100]};
|
|
@@ -1789,9 +1789,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
`,jr=s.dt($e)`
|
|
1792
|
-
${({theme:e,$variant:
|
|
1792
|
+
${({theme:e,$variant:i})=>`
|
|
1793
1793
|
align-items: center;
|
|
1794
|
-
background: ${
|
|
1794
|
+
background: ${i==="error"?e.palette.primary[400]:e.palette.warning[500]};
|
|
1795
1795
|
border-radius: 100%;
|
|
1796
1796
|
font-family: ${e.typography.type.primary};
|
|
1797
1797
|
justify-content: center;
|
|
@@ -1808,7 +1808,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1808
1808
|
font-size: 6px;
|
|
1809
1809
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1810
1810
|
justify-content: center;
|
|
1811
|
-
`,
|
|
1811
|
+
`,Ht=f.forwardRef(function({numberIndicator:i,show:n,variant:a="error",...r},o){return t.jsx(jr,{$variant:a,className:n?"flex":"hidden","data-testid":"notification-sign",ref:o,...r,children:i&&t.jsx(kr,{children:i<=9?i:9})})}),Ot=({end:e=!1,label:i,id:n,isActive:a=!1,link:r,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:p})=>{const{pathname:g}=De.useLocation(),x=a||(d==="primary"?g.includes(r):g.endsWith(r));return t.jsx(Y,{display:"flex",id:`${n}-tooltip`,tip:c,children:t.jsxs(vr,{$borderButton:x,$variant:d,children:[t.jsxs(De.NavLink,{end:e,id:n,onClick:l,to:r,children:[i,t.jsx(Ht,{left:o==null?void 0:o.left,numberIndicator:o==null?void 0:o.numberIndicator,show:o==null?void 0:o.show,top:o==null?void 0:o.top,variant:o==null?void 0:o.variant})]}),p===void 0?null:t.jsx(X,{tagLabel:`${p}`,variant:"default"})]})})},Xe=({items:e,borders:i=!0,box:n=!1,variant:a="primary"})=>{const r=s.nt();return t.jsx($,{alignItems:"center",bgColor:r.palette.white,border:n?"1px solid":void 0,borderBottom:i?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:n?r.palette.gray[200]:void 0,borderRadius:n?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:n?[0,0,0,0]:void 0,pl:i?1.25:void 0,pr:i?1.25:void 0,role:"tablist",width:n?"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(Ot,{end:o,id:l,isActive:c,label:p,link:d,notificationSign:g,onClick:x,tag:u,tooltip:h,variant:a},l))})},ie=f.forwardRef(function({color:i=z.palette.gray[100],mt:n=.5,mb:a=.5,width:r,...o},l){return t.jsx($,{as:"hr",borderTop:`1px solid ${i}`,mb:a,mt:n,ref:l,width:r??"100%",...o})}),Cr=s.dt.li`
|
|
1812
1812
|
${({theme:e})=>`
|
|
1813
1813
|
align-items: center;
|
|
1814
1814
|
background-color: ${e.palette.white};
|
|
@@ -1866,7 +1866,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1866
1866
|
min-width: 240px;
|
|
1867
1867
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1868
1868
|
`}
|
|
1869
|
-
`,we=({children:e,disabled:
|
|
1869
|
+
`,we=({children:e,disabled:i=!1,icon:n,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...x})=>{const h=s.nt().palette.gray[i?300:800],b=i?f.Children.map(e,m=>f.isValidElement(m)?f.cloneElement(m,{disabled:i,...m.props}):m):e;return t.jsxs(Cr,{"aria-disabled":i,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...x,children:[n!==void 0||g!==void 0?t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[n?t.jsx(I,{disabled:i,icon:n,iconColor:h,iconSize:"xxs",iconType:a}):null,r===void 0?b:t.jsx(Q,{href:r,children:b})]}):null,p||d?t.jsx(I,{disabled:i,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:a,onClick:l}):null]})},Sr=s.dt(we)`
|
|
1870
1870
|
margin-top: 10px;
|
|
1871
1871
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1872
1872
|
border-radius: 4px;
|
|
@@ -1884,7 +1884,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1884
1884
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1885
1885
|
background-color: unset;
|
|
1886
1886
|
}
|
|
1887
|
-
`,Vt=({items:e,onReorder:
|
|
1887
|
+
`,Vt=({items:e,onReorder:i,title:n,description:a,onClickClose:r})=>{const o=f.useCallback(l=>()=>{r(l)},[r]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:i,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs($,{display:"flex",gap:.25,children:[t.jsx(V,{display:"flex",size:"xs",children:n}),t.jsx(X,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(S,{size:"sm",children:a}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(Sr,{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)]})},zr=s.dt(we)`
|
|
1888
1888
|
padding: 7px 8px;
|
|
1889
1889
|
|
|
1890
1890
|
&[aria-selected="true"] {
|
|
@@ -1900,7 +1900,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1900
1900
|
display: none;
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
|
-
`,Ut=({options:e,title:
|
|
1903
|
+
`,Ut=({options:e,title:i,checkboxesName:n,defaultCollapsed:a,onChange:r})=>{const o=s.nt(),[l,c]=f.useState(a??!1),d=f.useCallback(()=>{c(p=>!p)},[]);return t.jsxs($,{"aria-label":i,bgColor:l?o.palette.gray[50]:o.palette.white,border:"1px solid"+o.palette.gray[300],borderRadius:"8px",display:"inline-flex",flexDirection:"column",gap:.625,px:.75,py:.625,role:"region",width:"100%",children:[t.jsxs($,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[t.jsx(S,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:i}),t.jsx(I,{icon:l?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs"})]}),l?t.jsx($,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx($,{border:"1px solid",borderColor:o.palette.gray[300],borderRadius:"4px",px:.5,py:.5,children:t.jsx(Ee,{checked:p.visible,disabled:p.locked,label:p.name,name:`${n}-${p.name}`,onChange:r,value:p.name})},p.name))}):void 0]})},Gt=e=>e.reduce((n,a)=>a.group?n[a.group]?{...n,[a.group]:[...n[a.group],a]}:{...n,[a.group]:[a]}:n,{}),Ir=s.dt.input`
|
|
1904
1904
|
${({theme:e})=>`
|
|
1905
1905
|
background: none;
|
|
1906
1906
|
border: none !important;
|
|
@@ -1956,7 +1956,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1956
1956
|
border-radius: ${e.spacing[.5]};
|
|
1957
1957
|
width: 250px;
|
|
1958
1958
|
`}
|
|
1959
|
-
`,ce=f.forwardRef(function({name:
|
|
1959
|
+
`,ce=f.forwardRef(function({name:i,smallSearch:n=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:x}=s.useFloating$1(),u=f.useCallback(()=>{p(m=>!m)},[]),h=f.useCallback(m=>{m.key==="Enter"&&m.preventDefault()},[]);me(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(Tr,{children:[t.jsx(I,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ir,{...o,id:i,name:i,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(B,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:a,px:.25,py:.25,type:"reset",variant:"ghost"})]});return n?t.jsxs(f.Fragment,{children:[t.jsx(B,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:u,ref:g.setReference,variant:"ghost"}),d?t.jsx(Fr,{ref:g.setFloating,style:x,children:b}):void 0]}):b}),Yt=({columns:e,formId:i,onChangeHandler:n,variant:a})=>{const r=f.useRef(null),[o,l]=f.useState([]),[c,d]=f.useState(""),p=f.useCallback(x=>{const{value:u}=x.target;d(u)},[]),g=f.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return f.useEffect(()=>{l(e.filter(x=>{var u;return a==="grouped"?x.name.toLowerCase().includes(c.toLowerCase())||((u=x.group)==null?void 0:u.includes(c.toLowerCase())):x.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,a]),a==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":i,id:i,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:n,options:u,title:x},b)})})]}):t.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":i,id:i,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(x=>{const u=`li-checkbox-${x.name}`;return t.jsx(zr,{selected:x.visible,value:u,width:"content",children:t.jsx(Ee,{checked:x.visible,disabled:x.locked,label:x.name,name:x.name,onChange:n,value:x.name})},u)})})]})},Nr=({_containerId:e="portals",title:i,modalRef:n,variant:a})=>{const r=s.nt(),o=f.useRef(null),[l,c]=f.useState(void 0),d=f.useCallback(x=>{const{checked:u,value:h}=x.target,b=n.columns.map(m=>{var w;return m.name===h?((w=m.toggleVisibility)==null||w.call(m,u),{...m,visible:u}):m});n.setColumns(b)},[n]),p=f.useCallback(x=>{const u=n.columns.map(h=>{var b;return h.id===x?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});n.setColumns(u)},[n]),g=f.useCallback(()=>{var u;const x=(u=o.current)==null?void 0:u.scrollHeight;l!==x&&c(x)},[l]);return n.isOpen?ne.createPortal(t.jsx(Wt,{"aria-label":n.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:i}),t.jsx(B,{icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:n.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(ie,{mb:0,mt:0}),t.jsxs($,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:o,scroll:"y",width:"100%",children:[t.jsx(Yt,{columns:n.columns,formId:"columns-visibility",onChangeHandler:d,variant:a}),t.jsx($,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Vt,{description:"Click and drag to reorder the columns",items:n.columns,onClickClose:p,onReorder:n.setColumns,title:"Reorder columns"})]}),t.jsx(ie,{mb:0,mt:0}),t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(P,{disabled:!n.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:n.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),t.jsx(P,{id:"columns-modal-submit",justify:"center",onClick:n.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Er=s.dt(we)`
|
|
1960
1960
|
padding: 8px;
|
|
1961
1961
|
min-height: 36px;
|
|
1962
1962
|
min-width: unset;
|
|
@@ -1973,11 +1973,11 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
1973
1973
|
svg.fa-check {
|
|
1974
1974
|
border-radius: 2px;
|
|
1975
1975
|
}
|
|
1976
|
-
`,qt=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Ee,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(qe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(bt,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Fe,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Nt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(St,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:a,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Xt=e=>{var c,d,p,g,x;const[n,i]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(u=>u.type==="checkboxes").flatMap(u=>{var h;return((h=u.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(u=>u.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:u})=>u))==null?void 0:p.value)??"",text:e.filter(u=>["text","select"].includes(u.type)).reduce((u,h)=>({...u,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(u=>["numberRange","dateRange"].includes(u.type)))==null?void 0:g.minValue,maxValue:(x=e.find(u=>["numberRange","dateRange"].includes(u.type)))==null?void 0:x.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Dr=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Lr=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=Xt(e),p=e.some(u=>u.type==="checkboxes"&&u.hideSearch!==!0),g=f.useCallback(u=>{const{value:h}=u.target,b=Lr(e,h);o(b)},[e,o]),x=f.useCallback(u=>{n&&n(u)},[n]);return f.useEffect(()=>{o(e),Dr(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(ce,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(x),children:[t.jsx(Kt,{control:a,items:r,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Jt=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,x]=f.useState({}),[u,h]=f.useState(""),b=f.useCallback(y=>()=>{const v=l.find(k=>k.label===y),j=!(v!=null&&v.filterOptions.some(k=>k.type==="dateRange"||k.type==="select"));r==null||r(j??!0),h(y),p((v==null?void 0:v.filterOptions)??[])},[l,r]),m=f.useCallback(y=>{const v=[...y.checkbox,...Object.values(y.text??{}),...y.radio?[y.radio]:[],...y.minValue?[String(y.minValue)]:[],...y.maxValue?[String(y.maxValue)]:[]];x(C=>v.length>0?{...C,[u]:v}:C);const j=C=>{var N,L;return{...C,options:(N=C.options)==null?void 0:N.map(E=>({...E,checked:y.checkbox.includes(E.value)||y.radio===E.value})),value:["text","select"].includes(C.type)?((L=y.text)==null?void 0:L[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?y.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?y.maxValue:C.maxValue}},k=C=>C.label===u?{...C,filterOptions:C.filterOptions.map(j)}:C,F=l.map(k);c(C=>C.map(k));const R=F.flatMap(({filterOptions:C})=>C);i(R),p([])},[l,i,u]),w=f.useCallback((y,v)=>{const j=`li-filter-option-${y}`;return t.jsxs(Er,{icon:v,onClick:b(y),style:{minWidth:"180px"},value:j,width:"100%",children:[y,g[y]===void 0?void 0:t.jsx(X,{tagLabel:g[y].length.toString()})]},j)},[g,b]);return f.useEffect(()=>{const y=e.reduce((v,{label:j,filterOptions:k})=>{const F=k.flatMap(({value:N,minValue:L,maxValue:E})=>[L,E,N]).filter(Boolean),R=k.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),C=[...F,...R];return C.length===0?v:{...v,[j]:C}},{});x(y),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):Object.entries(Gt(e)).map(([y,v])=>t.jsxs($,{children:[t.jsx(S,{color:o.palette.gray[400],mb:.25,size:"sm",children:y}),v.map(({label:j,icon:k="filter-list"})=>w(j,k))]},y))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):e.map(({label:y,icon:v="filter-list"})=>w(y,v))})},Zt=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(B,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const x=u=>{const h=p.current;h&&!h.contains(u.target)&&i.close()};if(l)return document.addEventListener("mousedown",x,!0),()=>{document.removeEventListener("mousedown",x,!0)}},[p,l,i]),t.jsx(Rr,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[r==="column"?g:void 0,t.jsx(Jt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Pr(e){if(e)return e}function Qt(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function Ar(e,n,i){const a=i??"",r=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(r)&&!s._.isUndefined(o))return`${r}${a} - ${o}${a}`;if(!s._.isUndefined(r))return`Min ${r}${a}`;if(!s._.isUndefined(o))return`Max ${o}${a}`}function Wr(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)&&s._.isUndefined(n))){if(e!==""&&n!==""&&!s._.isUndefined(e)&&!s._.isUndefined(n))return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!==""&&!s._.isUndefined(e))return`From ${s.dayjs(e).format("LL")}`;if(n!==""&&!s._.isUndefined(n))return`To ${s.dayjs(n).format("LL")}`}}function Br(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(X,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),Mr=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:x}=r;switch(c){case"numberRange":{const u=Ar(g,x,a.placeholder);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const u=Wr(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const u=Qt(p);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const u=Pr(d),h=Br(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Or=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:x}=c,u=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(x)&&typeof x!="number"?void 0:d(String(x));return s._.isUndefined(u)&&s._.isUndefined(h)?!0:(u??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},lt=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Hr=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},_r=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,onReset:o,variant:l="ungrouped"})=>{const c=Ne("filters-modal"),[d,p]=f.useState([]),[g,x]=f.useState(lt(d)),u=i.map(y=>({...y,filterOptions:y.filterOptions.map(v=>d.find(k=>k.key===v.key&&k.type===v.type&&k.filterFn===v.filterFn)??{...v})})),h=f.useCallback(y=>{p([...y]),localStorage.setItem(n,JSON.stringify(y))},[p,n]),b=f.useCallback(()=>{o&&o(),c.toggle()},[c,o]),m=f.useCallback(y=>()=>{o&&o();const v=d.map(j=>j.key===y.key&&j.type===y.type&&j.filterFn===y.filterFn?Hr(j):j);p(v),localStorage.setItem(n,JSON.stringify(v))},[d,n,o]);return f.useEffect(()=>{const y=localStorage.getItem(n),v=i.flatMap(k=>k.filterOptions),j=y?JSON.parse(y):v;v.flatMap(k=>k.value).filter(Boolean).length>0||v.flatMap(k=>k.options).filter(k=>(k==null?void 0:k.checked)===void 0).length>0?(p(v),localStorage.setItem(n,JSON.stringify(v))):p(j)},[n,i,p]),f.useEffect(()=>{a&&e!==void 0&&a(Or(e,d)),x(lt(d)),r==null||r(d)},[e,d,a,x,r]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:b,tag:g.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(Zt,{modalRef:c,onApplyFilters:h,options:u,variant:l})]}),options:u,removeFilter:m}},en=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:x=void 0,size:u,id:h="modal-container"})=>{const b=s.nt(),m=t.jsx(Wt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ke,{$size:u,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(x)&&!s._.isNil(x)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:x}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ur,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(br,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(S,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?ie.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Vr=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Ne("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(x=>{r.current=x})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:x})=>t.jsxs(en,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,x]}),confirm:l}},Oe=({buttonProps:e,variant:n})=>t.jsx(P,{onClick:e.onClick,variant:n,children:e.text}),Ur=s.dt.div`
|
|
1976
|
+
`,qt=({control:e,option:i,register:n,setValue:a})=>{var r,o,l,c,d;switch(i.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=i.options)==null?void 0:r.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Ee,{...n("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=i.options)==null?void 0:o.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(qe,{...n("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(bt,{control:e,items:((l=i.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:i.label,name:`text.${String(i.key)}-${i.filterFn??"caseInsensitive"}`,placeholder:i.placeholder,value:i.value});case"text":const p=`text.${String(i.key)}-${i.filterFn??"caseInsensitive"}`;return t.jsx(Fe,{label:i.label,name:p,placeholder:i.placeholder,register:n,value:i.value});case"numberRange":return t.jsx(Nt,{label:i.label,name:String(i.key),propsMax:{placeholder:i.placeholder?`${i.placeholder} Max`:"Max",register:n,name:"maxValue",value:i.maxValue,setValue:a},propsMin:{placeholder:i.placeholder?`${i.placeholder} Min`:"Min",register:n,name:"minValue",value:i.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(St,{label:i.label,name:String(i.key),propsMax:{name:"maxValue",value:(c=i.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=i.minValue)==null?void 0:d.toString()},register:n,setValue:a,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:i,register:n,setValue:a})=>t.jsx(t.Fragment,{children:i.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:r,register:n,setValue:a}),o<i.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Xt=e=>{var c,d,p,g,x;const[i,n]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(u=>u.type==="checkboxes").flatMap(u=>{var h;return((h=u.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(u=>u.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:u})=>u))==null?void 0:p.value)??"",text:e.filter(u=>["text","select"].includes(u.type)).reduce((u,h)=>({...u,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(u=>["numberRange","dateRange"].includes(u.type)))==null?void 0:g.minValue,maxValue:(x=e.find(u=>["numberRange","dateRange"].includes(u.type)))==null?void 0:x.maxValue}});return{control:a,items:i,setItems:n,register:r,handleSubmit:o,setValue:l}},Dr=(e,i)=>{var n,a,r,o,l;i("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),i("radio",((r=(a=(n=e.find(c=>c.type==="radioButton"))==null?void 0:n.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),i("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),i("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),i("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Lr=(e,i)=>e.map(n=>{var a;return n.type==="checkboxes"?{...n,options:(a=n.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(i.toLowerCase()))??r.value.toLowerCase().includes(i.toLowerCase())})}:n}),Me=({options:e,onSubmit:i,id:n})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=Xt(e),p=e.some(u=>u.type==="checkboxes"&&u.hideSearch!==!0),g=f.useCallback(u=>{const{value:h}=u.target,b=Lr(e,h);o(b)},[e,o]),x=f.useCallback(u=>{i&&i(u)},[i]);return f.useEffect(()=>{o(e),Dr(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:n,children:[p&&t.jsx(ce,{onChange:g}),t.jsxs("form",{id:n,onSubmit:c(x),children:[t.jsx(Kt,{control:a,items:r,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Jt=({options:e,variant:i,onApplyFilters:n,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,x]=f.useState({}),[u,h]=f.useState(""),b=f.useCallback(y=>()=>{const v=l.find(k=>k.label===y),j=!(v!=null&&v.filterOptions.some(k=>k.type==="dateRange"||k.type==="select"));r==null||r(j??!0),h(y),p((v==null?void 0:v.filterOptions)??[])},[l,r]),m=f.useCallback(y=>{const v=[...y.checkbox,...Object.values(y.text??{}),...y.radio?[y.radio]:[],...y.minValue?[String(y.minValue)]:[],...y.maxValue?[String(y.maxValue)]:[]];x(C=>v.length>0?{...C,[u]:v}:C);const j=C=>{var N,L;return{...C,options:(N=C.options)==null?void 0:N.map(E=>({...E,checked:y.checkbox.includes(E.value)||y.radio===E.value})),value:["text","select"].includes(C.type)?((L=y.text)==null?void 0:L[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?y.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?y.maxValue:C.maxValue}},k=C=>C.label===u?{...C,filterOptions:C.filterOptions.map(j)}:C,F=l.map(k);c(C=>C.map(k));const R=F.flatMap(({filterOptions:C})=>C);n(R),p([])},[l,n,u]),w=f.useCallback((y,v)=>{const j=`li-filter-option-${y}`;return t.jsxs(Er,{icon:v,onClick:b(y),style:{minWidth:"180px"},value:j,width:"100%",children:[y,g[y]===void 0?void 0:t.jsx(X,{tagLabel:g[y].length.toString()})]},j)},[g,b]);return f.useEffect(()=>{const y=e.reduce((v,{label:j,filterOptions:k})=>{const F=k.flatMap(({value:N,minValue:L,maxValue:E})=>[L,E,N]).filter(Boolean),R=k.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),C=[...F,...R];return C.length===0?v:{...v,[j]:C}},{});x(y),d.length>0&&a&&a("column")},[d,e,a]),i==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):Object.entries(Gt(e)).map(([y,v])=>t.jsxs($,{children:[t.jsx(S,{color:o.palette.gray[400],mb:.25,size:"sm",children:y}),v.map(({label:j,icon:k="filter-list"})=>w(j,k))]},y))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):e.map(({label:y,icon:v="filter-list"})=>w(y,v))})},Zt=({options:e,onApplyFilters:i,modalRef:n,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(B,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:n.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const x=u=>{const h=p.current;h&&!h.contains(u.target)&&n.close()};if(l)return document.addEventListener("mousedown",x,!0),()=>{document.removeEventListener("mousedown",x,!0)}},[p,l,n]),t.jsx(Rr,{$bgColor:"transparent","aria-label":n.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[r==="column"?g:void 0,t.jsx(Jt,{onApplyFilters:i,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Pr(e){if(e)return e}function Qt(e){if(!e||e.length===0)return;const i=e.filter(a=>a.checked).map(a=>a.label??a.value);return i.length===0?void 0:i.join(", ")}function Ar(e,i,n){const a=n??"",r=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(i)&&typeof i!="number"||Number.isNaN(i)?void 0:Number(String(i));if(!s._.isUndefined(r)&&!s._.isUndefined(o))return`${r}${a} - ${o}${a}`;if(!s._.isUndefined(r))return`Min ${r}${a}`;if(!s._.isUndefined(o))return`Max ${o}${a}`}function Wr(e,i){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)&&s._.isUndefined(i))){if(e!==""&&i!==""&&!s._.isUndefined(e)&&!s._.isUndefined(i))return`${s.dayjs(e).format("LL")} - ${s.dayjs(i).format("LL")}`;if(e!==""&&!s._.isUndefined(e))return`From ${s.dayjs(e).format("LL")}`;if(i!==""&&!s._.isUndefined(i))return`To ${s.dayjs(i).format("LL")}`}}function Br(e,i,n){return e==="select"?i:`${i} ${n==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:i="filter-list",label:n,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(X,{filterValues:r,icon:i,id:"remove-filter",onClose:a(e),tagLabel:`${n} `}),Mr=({options:e,onClose:i})=>{const n=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:x}=r;switch(c){case"numberRange":{const u=Ar(g,x,a.placeholder);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:i},l)}case"dateRange":{const u=Wr(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:i},l)}case"radioButton":case"checkboxes":{const u=Qt(p);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:i},l)}case void 0:case"select":case"text":default:{const u=Pr(d),h=Br(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:u,icon:a.icon,label:h,onClose:i},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return n.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:n}):null},Hr=(e,i)=>{function n(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:x}=c,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 i.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return n(l,c)}})}return e.filter(o)},lt=e=>[...e.flatMap(({options:n})=>n).filter(n=>n==null?void 0:n.checked),...e.flatMap(n=>[n.value,n.maxValue,n.minValue]).filter(Boolean)].length,Or=e=>{var n;const i=((n=e.options)==null?void 0:n.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:i}},_r=({dataset:e,localStorageKey:i,options:n,setFilteredDataset:a,onFiltersChange:r,onReset:o,variant:l="ungrouped"})=>{const c=Ne("filters-modal"),[d,p]=f.useState([]),[g,x]=f.useState(lt(d)),u=n.map(y=>({...y,filterOptions:y.filterOptions.map(v=>d.find(k=>k.key===v.key&&k.type===v.type&&k.filterFn===v.filterFn)??{...v})})),h=f.useCallback(y=>{p([...y]),localStorage.setItem(i,JSON.stringify(y))},[p,i]),b=f.useCallback(()=>{o&&o(),c.toggle()},[c,o]),m=f.useCallback(y=>()=>{o&&o();const v=d.map(j=>j.key===y.key&&j.type===y.type&&j.filterFn===y.filterFn?Or(j):j);p(v),localStorage.setItem(i,JSON.stringify(v))},[d,i,o]);return f.useEffect(()=>{const y=localStorage.getItem(i),v=n.flatMap(k=>k.filterOptions),j=y?JSON.parse(y):v;v.flatMap(k=>k.value).filter(Boolean).length>0||v.flatMap(k=>k.options).filter(k=>(k==null?void 0:k.checked)===void 0).length>0?(p(v),localStorage.setItem(i,JSON.stringify(v))):p(j)},[i,n,p]),f.useEffect(()=>{a&&e!==void 0&&a(Hr(e,d)),x(lt(d)),r==null||r(d)},[e,d,a,x,r]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:b,tag:g.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(Zt,{modalRef:c,onApplyFilters:h,options:u,variant:l})]}),options:u,removeFilter:m}},ei=({_portal:e=!0,alert:i,cancelButton:n=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:x=void 0,size:u,id:h="modal-container"})=>{const b=s.nt(),m=t.jsx(Wt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ke,{$size:u,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(x)&&!s._.isNil(x)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:x}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ur,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(br,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(S,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:i,cancelButton:n,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?ne.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Vr=()=>{const[e,i]=f.useState(!1),[n,a]=f.useState(),r=f.useRef(null),o=Ne("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),i(!0),new Promise(x=>{r.current=x})),[]),c=f.useCallback(()=>{var g;i(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;i(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:x})=>t.jsxs(ei,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(n==null?void 0:n.id)??"modal-confirm",onClick:c,text:"Confirm"},description:n==null?void 0:n.message,id:g,modalRef:{...o,close:d},size:"sm",title:n==null?void 0:n.title,children:[n==null?void 0:n.content,x]}),confirm:l}},He=({buttonProps:e,variant:i})=>t.jsx(P,{onClick:e.onClick,variant:i,children:e.text}),Ur=s.dt.div`
|
|
1977
1977
|
display: flex;
|
|
1978
1978
|
flex-direction: column;
|
|
1979
1979
|
align-items: center;
|
|
1980
|
-
padding: ${({theme:e,$padding:
|
|
1980
|
+
padding: ${({theme:e,$padding:i})=>e.spacing[i]};
|
|
1981
1981
|
max-width: 900px;
|
|
1982
1982
|
white-space: pre-line;
|
|
1983
1983
|
margin: 0 auto;
|
|
@@ -2007,7 +2007,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2007
2007
|
> *:last-child {
|
|
2008
2008
|
margin-right: 0;
|
|
2009
2009
|
}
|
|
2010
|
-
`,ct={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},qr=({cancelButton:e=void 0,confirmButton:
|
|
2010
|
+
`,ct={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},qr=({cancelButton:e=void 0,confirmButton:i=void 0,description:n,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(i??e)!==void 0;return t.jsxs(Ur,{$padding:r,children:[t.jsx(Gr,{children:t.jsx(te,{alt:"empty-icon",publicId:a})}),t.jsx(V,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:ct[l].title,textAlign:"center",children:o}),t.jsx(S,{mb:c?2:void 0,size:ct[l].description,textAlign:"center",children:n}),c?t.jsxs(Yr,{children:[e&&t.jsx(He,{buttonProps:e,variant:"tertiary"}),i&&t.jsx(He,{buttonProps:i,variant:"primary"})]}):void 0]})},Kr=({children:e})=>{const i=s.useFormContext();return e({...i})},Xr=s.dt.form`
|
|
2011
2011
|
${({theme:e})=>`
|
|
2012
2012
|
align-items: flex-start;
|
|
2013
2013
|
align-self: stretch;
|
|
@@ -2017,26 +2017,26 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2017
2017
|
overflow: hidden auto;
|
|
2018
2018
|
width: 100%;
|
|
2019
2019
|
`}
|
|
2020
|
-
`,Jr=({alert:e,buttonAlignment:
|
|
2020
|
+
`,Jr=({alert:e,buttonAlignment:i,cancelButton:n,children:a,confirmButton:r,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,showButtons:g=!0,yupSchema:x,...u})=>{const h=s.nt(),b=s.useForm({...u,mode:d??"all",resolver:x?s.o(x):void 0});return t.jsx(s.FormProvider,{...b,children:t.jsx(Xr,{onSubmit:b.handleSubmit(p),children:t.jsxs($,{scroll:"y",width:"100%",children:[t.jsx($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:a}),g&&t.jsxs($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,borderTop:`1px solid ${h.palette.gray[200]}`,display:"flex",flexDirection:i?"unset":"column",gap:.625,justify:i??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,maxWidth:c,children:[n?t.jsx(P,{icon:n.icon,id:`${l}-cancel`,justify:"center",onClick:n.onClick,type:"reset",variant:"tertiary",width:"100%",children:n.label??"Cancel"}):void 0,t.jsx(P,{disabled:((r==null?void 0:r.disabled)??!1)||b.formState.isSubmitting||o&&!b.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},Zr=s.dt($e)`
|
|
2021
2021
|
display: grid;
|
|
2022
2022
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2023
2023
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
2024
2024
|
|
|
2025
|
-
${({theme:e,$xl:
|
|
2025
|
+
${({theme:e,$xl:i,$lg:n,$md:a})=>`
|
|
2026
2026
|
@media (width >= ${e.breakpoints.sm}) {
|
|
2027
2027
|
grid-template-columns: repeat(${a}, 1fr);
|
|
2028
2028
|
}
|
|
2029
2029
|
|
|
2030
2030
|
@media (width >= ${e.breakpoints.md}) {
|
|
2031
|
-
grid-template-columns: repeat(${
|
|
2031
|
+
grid-template-columns: repeat(${n}, 1fr);
|
|
2032
2032
|
}
|
|
2033
2033
|
|
|
2034
2034
|
@media (width >= ${e.breakpoints.lg}) {
|
|
2035
|
-
grid-template-columns: repeat(${
|
|
2035
|
+
grid-template-columns: repeat(${i}, 1fr);
|
|
2036
2036
|
}
|
|
2037
2037
|
`}
|
|
2038
|
-
`,Qr=f.forwardRef(function({children:
|
|
2039
|
-
${({theme:e,$itemsLength:
|
|
2038
|
+
`,Qr=f.forwardRef(function({children:i,md:n,sm:a,lg:r,xl:o,gap:l,...c},d){return t.jsx(Zr,{$gap:l,$lg:r,$md:n,$sm:a,$xl:o,ref:d,...c,children:i})}),ea=s.dt.div`
|
|
2039
|
+
${({theme:e,$itemsLength:i})=>`
|
|
2040
2040
|
display: flex;
|
|
2041
2041
|
background-color: ${e.palette.white};
|
|
2042
2042
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2044,7 +2044,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2044
2044
|
box-shadow: ${e.shadows.lg};
|
|
2045
2045
|
flex-direction: column;
|
|
2046
2046
|
min-width: 507px;
|
|
2047
|
-
max-width: ${
|
|
2047
|
+
max-width: ${i<=4?"507px":"980px"};
|
|
2048
2048
|
padding: ${e.spacing[1.5]};
|
|
2049
2049
|
|
|
2050
2050
|
@media screen and (max-width: 980px) and (min-width: 742px) {
|
|
@@ -2055,14 +2055,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2055
2055
|
}
|
|
2056
2056
|
`}
|
|
2057
2057
|
`,Je=s.dt.div`
|
|
2058
|
-
${({theme:e,$isSelected:
|
|
2058
|
+
${({theme:e,$isSelected:i})=>`
|
|
2059
2059
|
align-items: center;
|
|
2060
|
-
background-color: ${
|
|
2060
|
+
background-color: ${i?e.palette.gray[100]:e.palette.white};
|
|
2061
2061
|
border: 1px solid ${e.palette.gray[200]};
|
|
2062
2062
|
border-radius: ${e.spacing[.25]};
|
|
2063
2063
|
cursor: pointer;
|
|
2064
2064
|
display: flex;
|
|
2065
|
-
flex-direction: ${
|
|
2065
|
+
flex-direction: ${i?"row-reverse":"row"};
|
|
2066
2066
|
min-height: 50px;
|
|
2067
2067
|
padding: ${e.spacing[1]} ${e.spacing[.625]};
|
|
2068
2068
|
width: 215px;
|
|
@@ -2071,16 +2071,16 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2071
2071
|
background-color: ${e.palette.gray[100]};
|
|
2072
2072
|
}
|
|
2073
2073
|
`}
|
|
2074
|
-
`,
|
|
2075
|
-
${({theme:e,$bgColor:
|
|
2076
|
-
background-color: ${
|
|
2074
|
+
`,ti=({isSelected:e=!1,label:i,onSelect:n})=>{const a=s.nt(),r=f.useCallback(()=>{n&&n(i)},[n,i]);return t.jsxs(Je,{$isSelected:e,onClick:r,children:[e?t.jsx(I,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:i})]})},ta=({isOpen:e=!0,items:i,handleNewOrganization:n,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=f.useState(i),[x,u]=f.useState(""),h=f.useCallback(w=>{g(y=>y.filter(v=>String(v.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(i),h(x)},[i,h,x]);const m=t.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(ea,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(B,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(ce,{onInput:b,placeholder:"Search"})}),t.jsx(ie,{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:n,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(ti,{isSelected:o.toLowerCase()===w.name,label:w.name.charAt(0).toUpperCase()+w.name.slice(1),onSelect:a},w.name))]})]})})});return e?ne.createPortal(m,document.body):t.jsx("div",{})},ia=({description:e,height:i="auto",leftIconName:n,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const x=s.nt(),u=p==="centered",h=l&&t.jsx(Y,{icon:r??n,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:i,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(n)?void 0:h,t.jsx(S,{color:u?x.palette.gray[800]:x.palette.gray[400],size:"md",textAlign:u?"center":"start",children:e}),u||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[u&&!s.lodashExports.isUndefined(n)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(V,{fontWeight:"bold",size:"md",children:o}),a]}),u&&!s.lodashExports.isUndefined(r)?h:void 0]})]})},na=({actions:e,children:i,header:n,title:a,tabs:r,footer:o})=>{const l=s.nt();return t.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:a}),n]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(B,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx($,{display:"flex",pt:.25,width:"100%",children:t.jsx(Xe,{items:r})}),t.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:i}),o&&t.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},g)=>t.jsx(P,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},ra=s.dt.span`
|
|
2075
|
+
${({theme:e,$bgColor:i=e.palette.secondary[500],$txtDecoration:n="none"})=>`
|
|
2076
|
+
background-color: ${i};
|
|
2077
2077
|
border-radius: 5px;
|
|
2078
2078
|
color: ${e.palette.white};
|
|
2079
2079
|
font-size: 10px;
|
|
2080
2080
|
padding: ${e.spacing[.125]} ${e.spacing[.25]} ${e.spacing[.125]} ${e.spacing[.25]};
|
|
2081
|
-
text-decoration: ${
|
|
2081
|
+
text-decoration: ${n}
|
|
2082
2082
|
`}
|
|
2083
|
-
`,aa=({bgColor:e,children:
|
|
2083
|
+
`,aa=({bgColor:e,children:i,txtDecoration:n,ml:a=1})=>t.jsx(ra,{$bgColor:e,$txtDecoration:n,className:`ml-${a}`,children:i}),oa={lg:"56",md:"30",sm:"12"},{getVariant:sa}=K(e=>({red:`stroke: ${e.palette.primary[500]};`,white:`stroke: ${e.palette.white};`})),la=s.mt`
|
|
2084
2084
|
0% {
|
|
2085
2085
|
transform: rotateZ(0deg);
|
|
2086
2086
|
}
|
|
@@ -2112,7 +2112,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2112
2112
|
width: ${oa[e]}px;
|
|
2113
2113
|
`}
|
|
2114
2114
|
`,pa=s.dt.circle`
|
|
2115
|
-
${({theme:e,$color:
|
|
2115
|
+
${({theme:e,$color:i="red"})=>s.lt`
|
|
2116
2116
|
animation: 1.4s ease-in-out infinite both ${ca};
|
|
2117
2117
|
display: block;
|
|
2118
2118
|
fill: transparent;
|
|
@@ -2122,7 +2122,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2122
2122
|
stroke-width: 10px;
|
|
2123
2123
|
transform-origin: 50% 50%;
|
|
2124
2124
|
|
|
2125
|
-
${sa(e,
|
|
2125
|
+
${sa(e,i)}
|
|
2126
2126
|
`}
|
|
2127
2127
|
`,ga=s.dt.circle`
|
|
2128
2128
|
display: block;
|
|
@@ -2132,12 +2132,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2132
2132
|
stroke-width: 10px;
|
|
2133
2133
|
transform-origin: 50% 50%;
|
|
2134
2134
|
opacity: ${({$color:e})=>e==="white"?"20%":"unset"};
|
|
2135
|
-
`,ua=({color:e="red",label:
|
|
2135
|
+
`,ua=({color:e="red",label:i,size:n})=>{const a=s.nt();return t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsxs(da,{$size:n,viewBox:"0 0 100 100",children:[t.jsx(ga,{$color:e,cx:"50",cy:"50",r:"45"}),t.jsx(pa,{$color:e,cx:"50",cy:"50",r:"45"})]}),i&&t.jsx(S,{color:e==="red"?a.palette.gray[700]:a.palette.white,ml:.5,size:"sm",children:i})]})},xa={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},fa=({publicId:e,variant:i})=>t.jsx($,{...xa[i],children:t.jsx(te,{alt:"logo",publicId:e})}),ha=s.dt(s.Lottie).attrs(({autoplay:e=!0})=>({autoplay:e,className:"comp-lottie"}))`
|
|
2136
2136
|
${({$size:e=16})=>`
|
|
2137
2137
|
height: ${e}px;
|
|
2138
2138
|
width: ${e}px;
|
|
2139
2139
|
`}
|
|
2140
|
-
`,ba=e=>{const{size:
|
|
2140
|
+
`,ba=e=>{const{size:i}=e;return t.jsx(ha,{$size:i,...e})},$a=({children:e,commitSha:i,commitShortSha:n,parentElement:a,userInfo:r,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=r;return me(a,()=>{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(X,{tagLabel:g,variant:"role"})})]})}),t.jsx(ie,{}),e,t.jsx(ie,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Q,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${i}`,iconPosition:"hidden",children:t.jsx(S,{color:l.palette.gray[400],size:"xs",children:`commit : ${n}`})})})]})},ya=s.dt.button`
|
|
2141
2141
|
align-items: center;
|
|
2142
2142
|
background-color: transparent;
|
|
2143
2143
|
border: unset;
|
|
@@ -2154,12 +2154,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2154
2154
|
&:hover span {
|
|
2155
2155
|
color: ${z.palette.primary[200]};
|
|
2156
2156
|
}
|
|
2157
|
-
`,ma=({message:e,onClickButton:
|
|
2158
|
-
${({theme:e,$variant:
|
|
2157
|
+
`,ma=({message:e,onClickButton:i,buttonText:n,buttonFontWeight:a="regular",icon:r,onClose:o,buttonSide:l="end"})=>{const c=s.nt(),[d,p]=f.useState(!0),g=f.useCallback(()=>{p(!1),o==null||o()},[o]),x=t.jsxs(ya,{onClick:i,children:[t.jsx(S,{color:c.palette.white,fontWeight:a,size:"sm",textDecoration:"underline",children:n}),t.jsx(I,{icon:r??"arrow-right",iconColor:c.palette.white,iconSize:"xs",iconType:a==="bold"?"fa-regular":"fa-light"})]});return t.jsxs($,{alignItems:"center",bgGradient:c.palette.gradients["01"],display:d?"flex":"none",id:"message-banner",justify:"space-between",padding:[.75,.75,.75,.75],children:[t.jsxs($,{display:"flex",gap:.5,justify:"center",width:"100%",children:[l==="start"&&i?x:void 0,t.jsx($,{children:typeof e=="string"?t.jsx(S,{color:c.palette.white,display:"inline",size:"sm",children:e}):e}),l==="end"&&i?x:void 0]}),t.jsx(I,{clickable:!0,hoverColor:c.palette.primary[200],icon:"close",iconColor:c.palette.white,iconSize:"xs",iconType:"fa-light",onClick:g})]})},wa=s.dt.div`
|
|
2158
|
+
${({theme:e,$variant:i})=>`
|
|
2159
2159
|
background: ${e.palette.white};
|
|
2160
2160
|
border: 1px solid ${e.palette.gray[200]};
|
|
2161
2161
|
border-radius: ${e.spacing[.25]};
|
|
2162
|
-
border-left: 4px solid ${e.palette[
|
|
2162
|
+
border-left: 4px solid ${e.palette[i][500]};
|
|
2163
2163
|
box-shadow: ${e.shadows.md};
|
|
2164
2164
|
position: relative;
|
|
2165
2165
|
display: flex;
|
|
@@ -2174,7 +2174,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2174
2174
|
}
|
|
2175
2175
|
`}
|
|
2176
2176
|
`,va=s.dt.div`
|
|
2177
|
-
${({theme:e,$variant:
|
|
2177
|
+
${({theme:e,$variant:i})=>`
|
|
2178
2178
|
height: ${e.spacing[2.5]};
|
|
2179
2179
|
width: ${e.spacing[2.5]};
|
|
2180
2180
|
position: relative;
|
|
@@ -2191,20 +2191,20 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2191
2191
|
|
|
2192
2192
|
& .ellipse-1 {
|
|
2193
2193
|
transform: scale(2.5) translate(-20%, -20%);
|
|
2194
|
-
color: ${e.palette[
|
|
2194
|
+
color: ${e.palette[i][50]};
|
|
2195
2195
|
position: absolute;
|
|
2196
2196
|
}
|
|
2197
2197
|
|
|
2198
2198
|
& .ellipse-2 {
|
|
2199
2199
|
transform: scale(2) translate(-25%, -25%);
|
|
2200
|
-
color: ${e.palette[
|
|
2200
|
+
color: ${e.palette[i][200]};
|
|
2201
2201
|
}
|
|
2202
2202
|
|
|
2203
2203
|
& .icon {
|
|
2204
|
-
color: ${e.palette[
|
|
2204
|
+
color: ${e.palette[i][500]};
|
|
2205
2205
|
}
|
|
2206
2206
|
`}
|
|
2207
|
-
`,ja=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",ka=({description:e,onClose:
|
|
2207
|
+
`,ja=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",ka=({description:e,onClose:i,title:n,variant:a})=>{const r=s.nt(),o=f.useCallback(()=>{i==null||i()},[i]);return t.jsxs(wa,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(va,{$variant:a,children:[t.jsx(I,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(I,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(I,{icon:ja(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(V,{fontWeight:"bold",size:"xs",children:n}),t.jsx(S,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(B,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Ca=s.dt.div`
|
|
2208
2208
|
width: fit-content;
|
|
2209
2209
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2210
2210
|
border-radius: 4px;
|
|
@@ -2237,7 +2237,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2237
2237
|
&::-webkit-inner-spin-button {
|
|
2238
2238
|
opacity: 1;
|
|
2239
2239
|
}
|
|
2240
|
-
`,za=f.forwardRef(function({autoUpdate:
|
|
2240
|
+
`,za=f.forwardRef(function({autoUpdate:i=!1,decimalPlaces:n=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const x=n<0?0:n,[u,h]=f.useState(Number(a).toFixed(x)),b=f.useCallback(y=>{const v=s.lodashExports.toNumber(y.target.value);y.target.value.endsWith(".")?h(y.target.value):v>=Number(o)&&v<=Number(r)&&(h(String(v)),i&&c(s.lodashExports.toNumber(v.toFixed(x)))),y.stopPropagation()},[i,x,r,o,c]),m=f.useCallback(y=>{y.currentTarget.contains(y.relatedTarget)||h(Number(a).toFixed(x)),y.stopPropagation()},[x,a]),w=f.useCallback(y=>{y.stopPropagation(),y.key==="Enter"&&!s.lodashExports.isEmpty(y.currentTarget.value)&&c(s.lodashExports.toNumber(y.currentTarget.value))},[c]);return t.jsx(Ca,{onBlur:m,tabIndex:-1,children:t.jsx(Y,{id:"numberInputTooltip",tip:d,children:t.jsx(Sa,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(u),max:r,min:o,name:l,onChange:b,onKeyUp:w,ref:g,step:10**-x,type:"number",value:u})})})}),Ia={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},Oe=({icon:e,label:i,onClick:n,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:n,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(te,{alt:`${r} Logo`,height:"100%",publicId:Ia[r],width:"100%"}):t.jsx(I,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(S,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:i??r})})]})},Ta=({align:e="end",buttonLabel:i="Add Credential",children:n,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=f.useState(!1),p=f.useRef(null);me(p.current,()=>{d(!1)},!0);const g=f.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),x=f.useCallback(()=>{d(h=>!h)},[d]),u=f.useCallback(h=>b=>{var m;(m=o[h])==null||m.onClick(b),d(!1)},[o]);return t.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(P,{icon:"plus",onClick:x,variant:"primary",children:i}),t.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:a,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(Oe,{onClick:u(h),provider:h},h)),r===void 0?void 0:t.jsx(Oe,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),n]})]})},Fa=s.dt.div`
|
|
2241
2241
|
${({theme:e})=>`
|
|
2242
2242
|
height: ${e.spacing[1]};
|
|
2243
2243
|
width: ${e.spacing[1]};
|
|
@@ -2268,7 +2268,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2268
2268
|
font-size: ${e.spacing[.5]};
|
|
2269
2269
|
}
|
|
2270
2270
|
`}
|
|
2271
|
-
`,
|
|
2271
|
+
`,ii=({margin:e,onClick:i,text:n})=>{const a=s.nt(),r=t.jsxs(Fa,{children:[t.jsx(I,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(I,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(I,{icon:"crown",iconClass:"icon",iconSize:"xs"})]});return n!==void 0?t.jsx($,{cursor:"pointer",display:"inline-block",mr:e,onClick:i,children:t.jsxs($,{alignItems:"center",bgColor:a.palette.warning[50],borderRadius:"4px",display:"flex",padding:[.25,.25,.25,.25],width:"fit-content",children:[r,t.jsx(S,{color:a.palette.warning[500],display:"inline",ml:.25,size:"xs",children:n})]})}):t.jsx($,{display:"inline-block",mr:e,onClick:i,children:r})},Na=({score:e})=>{const i=s.nt(),n=e<=33?"priority-bars-low":"priority-bars-medium",a=e>66||e===0?"priority-bars-high":n;return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.25,children:[t.jsx(I,{icon:a,iconClass:e<=66?"fa-kit-duotone":"",iconColor:e>0?i.palette.primary[500]:i.palette.gray[200],iconSize:"xs",iconType:"fa-kit",secondaryColor:i.palette.gray[200]}),t.jsx(S,{color:i.palette.gray[800],size:"sm",textAlign:"right",children:e+"%"})]})},{getVariant:Ea}=K(e=>({compliance:`
|
|
2272
2272
|
display: inline-flex;
|
|
2273
2273
|
|
|
2274
2274
|
&.horizontal {
|
|
@@ -2326,34 +2326,34 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2326
2326
|
.progress-bar {
|
|
2327
2327
|
background-color: ${e.palette.primary[500]};
|
|
2328
2328
|
}
|
|
2329
|
-
`})),Ra=(e,
|
|
2330
|
-
${({theme:e,$minWidth:
|
|
2329
|
+
`})),Ra=(e,i)=>i<50?e.palette.error[500]:i<80?e.palette.warning[500]:e.palette.success[500],Da=s.dt.div`
|
|
2330
|
+
${({theme:e,$minWidth:i,$orientation:n,$rounded:a,$variant:r})=>`
|
|
2331
2331
|
background-color: ${e.palette.gray[100]};
|
|
2332
2332
|
border-radius: ${a?"100px":"unset"};
|
|
2333
|
-
${
|
|
2334
|
-
${
|
|
2333
|
+
${n==="horizontal"?"min-width":"min-height"}: ${i}px;
|
|
2334
|
+
${n==="horizontal"?"":"height: 100%;"}
|
|
2335
2335
|
|
|
2336
2336
|
${Ea(e,r)}
|
|
2337
2337
|
|
|
2338
2338
|
`}
|
|
2339
2339
|
`,La=s.dt.div`
|
|
2340
|
-
${({theme:e,$percentage:
|
|
2340
|
+
${({theme:e,$percentage:i,$rounded:n,$variant:a})=>`
|
|
2341
2341
|
display: inline-flex;
|
|
2342
|
-
width: ${
|
|
2342
|
+
width: ${i}%;
|
|
2343
2343
|
max-width: 100%;
|
|
2344
2344
|
min-width: 0%;
|
|
2345
2345
|
height: 100%;
|
|
2346
|
-
border-radius: ${
|
|
2347
|
-
border-end-end-radius: ${i
|
|
2348
|
-
border-start-end-radius: ${i
|
|
2349
|
-
background-color: ${a==="compliance"?Ra(e,
|
|
2346
|
+
border-radius: ${n?"100px":"unset"};
|
|
2347
|
+
border-end-end-radius: ${n&&i<100?"0":"inherit"};
|
|
2348
|
+
border-start-end-radius: ${n&&i<100?"0":"inherit"};
|
|
2349
|
+
background-color: ${a==="compliance"?Ra(e,i):"inherit"};
|
|
2350
2350
|
`}
|
|
2351
|
-
`,Pa=({minWidth:e=100,percentage:
|
|
2351
|
+
`,Pa=({minWidth:e=100,percentage:i,percentageLocation:n="right",showPercentage:a=!1,orientation:r="horizontal",rounded:o=!0,variant:l="default"})=>{const c=a&&n==="left",d=a?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(S,{ml:.5,mr:c?.5:0,size:"sm",children:`${i}%`})}):null,p=t.jsx(Da,{$minWidth:e,$orientation:r,$rounded:o,$variant:l,className:r,children:t.jsx(La,{$percentage:i,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},ni=({description:e="",highlightDescription:i=""})=>{const n=s.nt(),a=typeof i=="string",r=a?"":new RegExp(`(${i.join("|")})`,"u");return i.length>0?t.jsx(S,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(f.Fragment,{children:[t.jsx(se,{color:n.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:i}),e]}):e.split(r).map((o,l)=>i.includes(o)?t.jsx(se,{color:n.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(S,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Aa=({_portal:e=!1,cancelButton:i,darkBackground:n=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:x})=>{const u=s.nt(),{alt:h,src:b,width:m="77px",height:w="77px"}=d,y=f.useCallback(()=>{i==null||i.onClick()},[i]),v=f.useCallback(()=>{r==null||r.onClick()},[r]),j=t.jsx($,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:n?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs($,{bgColor:u.palette.white,border:`1px solid ${u.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,pb:2.5,pl:2.5,pr:2.5,pt:2.5,shadow:"lg",width:"100%",zIndex:11,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx($,{children:t.jsx(te,{alt:h,height:w,publicId:b,width:m})}),t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(V,{color:x,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(ni,{description:l,highlightDescription:c})]})]}),a&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:a})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(r)?t.jsx(P,{onClick:v,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,s.lodashExports.isObject(i)?t.jsx(P,{onClick:y,variant:(i==null?void 0:i.variant)??"tertiary",children:i==null?void 0:i.text},i==null?void 0:i.key):void 0]})]})});return e?ne.createPortal(j,o??document.body):j},Wa=s.dt.div.attrs({className:"comp-scroll-up"})`
|
|
2352
2352
|
bottom: 15px;
|
|
2353
2353
|
position: fixed;
|
|
2354
2354
|
right: 140px;
|
|
2355
2355
|
z-index: 100;
|
|
2356
|
-
`,Ba=({scrollerId:e="dashboard",visibleAt:
|
|
2356
|
+
`,Ba=({scrollerId:e="dashboard",visibleAt:i=500})=>{const[n,a]=f.useState(!1),[r,o]=f.useState(null);f.useEffect(()=>{o(document.getElementById(e)),r==null||r.addEventListener("scroll",()=>{a(r.scrollTop>i)})},[r,e,i]);const l=f.useCallback(()=>{r==null||r.scrollTo({behavior:"smooth",top:0})},[r]);return n?t.jsx(Wa,{children:t.jsx(B,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},Ma={critical:{bgColor:z.palette.primary[700],colorL:z.palette.gray[800],colorR:z.palette.white},disable:{bgColor:z.palette.gray[200],colorL:z.palette.gray[400],colorR:z.palette.gray[400]},high:{bgColor:z.palette.error[500],colorL:z.palette.gray[800],colorR:z.palette.white},low:{bgColor:z.palette.warning[200],colorL:z.palette.gray[800],colorR:z.palette.gray[800]},medium:{bgColor:z.palette.warning[500],colorL:z.palette.gray[800],colorR:z.palette.gray[800]}},Ha=({textL:e,textR:i,variant:n})=>{const a=s.nt(),{bgColor:r,colorL:o,colorR:l}=Ma[n];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${r}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(S,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:r,border:`1px solid ${r}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(S,{color:l,size:"xs",children:i})})]})},Oa=(e,i)=>{const n={critical:z.palette.primary[700],high:z.palette.error[500],low:z.palette.warning[200],medium:z.palette.warning[500],none:z.palette.gray[200]},a={disabled:z.palette.gray[400],enabled:z.palette.gray[800]},r={critical:z.palette.white,high:z.palette.white,low:z.palette.gray[800],medium:z.palette.gray[800],none:z.palette.gray[400]};return{iconColor:i<1?n.none:n[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:i<1?r.none:r[e],textColor:i<1?a.disabled:a.enabled}},oe=({variant:e,value:i})=>{const{iconColor:n,iconText:a,iconTextColor:r,textColor:o}=Oa(e,i),l=s.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(Y,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:n,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(S,{color:r,size:"sm",textAlign:"center",children:a})})}),t.jsx(S,{color:o,size:"sm",children:i})]})},_a=({critical:e,high:i,medium:n,low:a})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(oe,{value:e,variant:"critical"}),t.jsx(oe,{value:i,variant:"high"}),t.jsx(oe,{value:n,variant:"medium"}),t.jsx(oe,{value:a,variant:"low"})]}),Va=s.dt.div`
|
|
2357
2357
|
${({theme:e})=>`
|
|
2358
2358
|
border-radius: ${e.spacing[.25]};
|
|
2359
2359
|
cursor: pointer;
|
|
@@ -2371,7 +2371,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2371
2371
|
display: block;
|
|
2372
2372
|
}
|
|
2373
2373
|
`}
|
|
2374
|
-
`,Ua=({visibleElement:e,hiddenElement:
|
|
2374
|
+
`,Ua=({visibleElement:e,hiddenElement:i})=>t.jsxs(Va,{children:[e,t.jsx($,{display:"none",position:"absolute",top:"100%",zIndex:10,children:i})]}),ri=({customBadge:e=void 0,description:i,icon:n,onClick:a,requiresUpgrade:r=!1,title:o})=>{const l=s.nt();return t.jsxs($,{bgColor:l.palette.white,bgColorHover:l.palette.gray[100],cursor:"pointer",display:"flex",gap:.5,onClick:a,px:1.25,py:1,width:"100%",children:[t.jsx($,{alignItems:"center",bgColor:l.palette.gray[300],borderRadius:l.spacing[.25],display:"flex",height:"24px",justify:"center",width:"24px",children:t.jsx(I,{icon:n,iconColor:l.palette.gray[800],iconSize:"xxs",ml:.5,mr:.5})}),t.jsxs($,{children:[t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,children:[t.jsx(S,{color:l.palette.gray[800],size:"sm",children:o}),r?t.jsx(ii,{text:"Upgrade"}):void 0,e]}),t.jsx(S,{color:l.palette.gray[400],size:"xs",children:i})]})]})},Ga=s.dt(s.m.div)`
|
|
2375
2375
|
${({theme:e})=>`
|
|
2376
2376
|
background-color: ${e.palette.white};
|
|
2377
2377
|
box-shadow: ${e.shadows.lg};
|
|
@@ -2394,19 +2394,19 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2394
2394
|
height: auto;
|
|
2395
2395
|
}
|
|
2396
2396
|
`}
|
|
2397
|
-
`,Ya=({children:e,closeIconId:
|
|
2397
|
+
`,Ya=({children:e,closeIconId:i="close-menu",isOpen:n,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),x=f.useRef(null),u=f.useCallback(h=>()=>{h(),r()},[r]);return f.useEffect(()=>{const h=["mousedown","touchstart"],b=m=>{var k;const w=m.target,y=document.getElementById("helpBtn"),v=document.getElementById("filterBtn"),j=(w===y||((y==null?void 0:y.contains(w))??!1)||w===v||(v==null?void 0:v.contains(w)))??!1;n&&!j&&!(((k=x.current)==null?void 0:k.contains(w))??!1)&&r()};return h.forEach(m=>{document.addEventListener(m,b,{passive:!0})}),()=>{h.forEach(m=>{document.removeEventListener(m,b)})}},[n,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(Ga,{animate:n?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:x,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs($,{height:"100%",position:"relative",children:[t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(S,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(B,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:i,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs($,{py:1.25,children:[(a??[]).map(({customBadge:h,description:b,icon:m,onClick:w,requiresUpgrade:y,title:v})=>t.jsx(ri,{customBadge:h,description:b,icon:m,onClick:u(w),requiresUpgrade:y,title:v},v)),e&&t.jsx($,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderColor:g.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(P,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(P,{onClick:l,type:"submit",children:o})]})]})]})})})},qa=(e,i)=>i>=50?`
|
|
2398
2398
|
${e.palette.gray[200]} 50%,
|
|
2399
2399
|
${e.palette.primary[500]} 50.05%,
|
|
2400
|
-
${e.palette.primary[500]} ${
|
|
2401
|
-
${e.palette.gray[200]} ${
|
|
2400
|
+
${e.palette.primary[500]} ${i}%,
|
|
2401
|
+
${e.palette.gray[200]} ${i}%
|
|
2402
2402
|
`:`
|
|
2403
|
-
${e.palette.gray[200]} ${
|
|
2404
|
-
${e.palette.primary[500]} ${
|
|
2403
|
+
${e.palette.gray[200]} ${i}%,
|
|
2404
|
+
${e.palette.primary[500]} ${i}%,
|
|
2405
2405
|
${e.palette.primary[500]} 50%,
|
|
2406
2406
|
${e.palette.gray[200]} 50.05%,
|
|
2407
2407
|
${e.palette.gray[200]} 100%
|
|
2408
2408
|
`,Ka=s.dt.div`
|
|
2409
|
-
${({theme:e,$min:
|
|
2409
|
+
${({theme:e,$min:i,$value:n})=>`
|
|
2410
2410
|
align-items: center;
|
|
2411
2411
|
align-self: stretch;
|
|
2412
2412
|
display: flex;
|
|
@@ -2418,10 +2418,10 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2418
2418
|
.track {
|
|
2419
2419
|
background: linear-gradient(
|
|
2420
2420
|
to right,
|
|
2421
|
-
${
|
|
2422
|
-
${e.palette.primary[500]} ${
|
|
2423
|
-
${e.palette.gray[200]} ${
|
|
2424
|
-
`:qa(e,
|
|
2421
|
+
${i>=0?`
|
|
2422
|
+
${e.palette.primary[500]} ${n}%,
|
|
2423
|
+
${e.palette.gray[200]} ${n}%
|
|
2424
|
+
`:qa(e,n)}
|
|
2425
2425
|
);
|
|
2426
2426
|
border-radius: ${e.spacing[.125]};
|
|
2427
2427
|
height: ${e.spacing[.25]};
|
|
@@ -2470,7 +2470,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2470
2470
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2471
2471
|
width: 59px;
|
|
2472
2472
|
`}
|
|
2473
|
-
`,
|
|
2473
|
+
`,ai=({state:e,trackRef:i,index:n,name:a})=>{const r=f.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:n,trackRef:i,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},Za=(e,i,n)=>Math.round((n-e)/(i-e)*100),Qa=e=>{const i=s.nt(),n=f.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),x=Za(r,o,g.getThumbValue(0)),{groupProps:u,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,n);return t.jsx(O,{htmlFor:l,label:a,children:t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(Ka,{...u,$min:r??0,$value:x,className:"slider",children:[t.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:n,children:t.jsx(ai,{index:0,name:l,state:g,trackRef:n})}),t.jsxs(Xa,{children:[t.jsx("p",{children:`${p.format(r)} (Low)`}),r<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${p.format(o)} (High)`})]})]}),t.jsx(Ja,{children:t.jsx(S,{color:i.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:eo}=K(e=>({completed:`
|
|
2474
2474
|
background-color: ${e.palette.primary[500]};
|
|
2475
2475
|
color: ${e.palette.white};
|
|
2476
2476
|
|
|
@@ -2503,7 +2503,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2503
2503
|
padding: ${`${e.spacing[1]} ${e.spacing[1]}`};
|
|
2504
2504
|
scroll-behavior: unset;
|
|
2505
2505
|
`}
|
|
2506
|
-
`,
|
|
2506
|
+
`,io=s.dt.div`
|
|
2507
2507
|
display: flex;
|
|
2508
2508
|
flex-direction: row;
|
|
2509
2509
|
margin-bottom: ${({theme:e})=>e.spacing[2]};
|
|
@@ -2511,7 +2511,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2511
2511
|
&:last-child > div:first-child > span::after {
|
|
2512
2512
|
display: none;
|
|
2513
2513
|
}
|
|
2514
|
-
`,
|
|
2514
|
+
`,no=s.dt.div`
|
|
2515
2515
|
${({theme:e})=>`
|
|
2516
2516
|
display: inline-flex;
|
|
2517
2517
|
font-family: ${e.typography.type.primary};
|
|
@@ -2524,7 +2524,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2524
2524
|
}
|
|
2525
2525
|
`}
|
|
2526
2526
|
`,ro=s.dt.span`
|
|
2527
|
-
${({theme:e,$variant:
|
|
2527
|
+
${({theme:e,$variant:i})=>`
|
|
2528
2528
|
border-radius: 6px;
|
|
2529
2529
|
display: inline-block;
|
|
2530
2530
|
text-align: center;
|
|
@@ -2546,9 +2546,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2546
2546
|
height: calc(100% - ${e.spacing[1]});
|
|
2547
2547
|
}
|
|
2548
2548
|
|
|
2549
|
-
${eo(e,
|
|
2549
|
+
${eo(e,i)}
|
|
2550
2550
|
`}
|
|
2551
|
-
`,ao=({button:{disabled:e=!1,text:
|
|
2551
|
+
`,ao=({button:{disabled:e=!1,text:i,type:n="button",onClick:a},steps:r})=>{const[o,l]=f.useState(1),c=f.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(to,{children:r.map((d,p)=>{const{content:g,title:x,nextAction:u,previousAction:h}=d,b=p+1,m=b===o?"current":"disabled",w=b<o?"completed":m;return t.jsxs(io,{children:[t.jsx($,{maxWidth:"40px",position:"relative",children:t.jsx(ro,{$variant:w,children:w==="completed"?t.jsx(I,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs($,{ml:1.5,width:"100%",children:[t.jsx(V,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:x}),w==="current"&&t.jsxs($,{children:[g,t.jsxs(no,{children:[o>1&&t.jsx(P,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<r.length?t.jsx(P,{disabled:d.isDisabledNext??!1,onClick:c(1,u),variant:"primary",children:"Next step"}):t.jsx(P,{disabled:e,onClick:a,type:n,variant:"primary",children:i})]})]})]})]},d.title)})})},oo=s.dt.button`
|
|
2552
2552
|
${({theme:e})=>`
|
|
2553
2553
|
align-items: center;
|
|
2554
2554
|
background-color: ${e.palette.white};
|
|
@@ -2590,8 +2590,8 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2590
2590
|
background-color: ${e.palette.gray[100]};
|
|
2591
2591
|
}
|
|
2592
2592
|
`}
|
|
2593
|
-
`,so={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},lo=({disabled:e=!1,icon:
|
|
2594
|
-
${({theme:e,$size:
|
|
2593
|
+
`,so={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},lo=({disabled:e=!1,icon:i,id:n,label:a,name:r,onClick:o,type:l="button",variant:c})=>{const d=s.nt(),p=t.jsxs(oo,{"aria-label":r??void 0,className:c,disabled:e,id:n,onClick:o,type:l,children:[t.jsx(I,{clickable:!1,icon:i??so[c].icon,iconSize:r===void 0?"xxs":"xs",iconType:"fa-light"}),r??void 0]});return t.jsxs($,{alignItems:"center",display:"flex",children:[p,a&&t.jsx(S,{color:d.palette.gray[800],ml:.5,size:"sm",children:a})]})},co=s.dt.div`
|
|
2594
|
+
${({theme:e,$size:i})=>`
|
|
2595
2595
|
align-items: center;
|
|
2596
2596
|
background-color: ${e.palette.white};
|
|
2597
2597
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2606,7 +2606,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2606
2606
|
p {
|
|
2607
2607
|
font-style: normal;
|
|
2608
2608
|
line-height: ${e.spacing[1.25]};
|
|
2609
|
-
text-align: ${
|
|
2609
|
+
text-align: ${i==="long"?"":"center"};
|
|
2610
2610
|
}
|
|
2611
2611
|
|
|
2612
2612
|
&:hover {
|
|
@@ -2614,8 +2614,8 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2614
2614
|
}
|
|
2615
2615
|
`}
|
|
2616
2616
|
`,po=s.dt.div`
|
|
2617
|
-
${({theme:e,$size:
|
|
2618
|
-
display: ${
|
|
2617
|
+
${({theme:e,$size:i})=>`
|
|
2618
|
+
display: ${i==="long"?"flex":"block"};
|
|
2619
2619
|
flex-direction: column;
|
|
2620
2620
|
gap: ${e.spacing[1.5]};
|
|
2621
2621
|
position: relative;
|
|
@@ -2623,9 +2623,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2623
2623
|
margin: 0 auto 0 auto;
|
|
2624
2624
|
|
|
2625
2625
|
div.timeline-card {
|
|
2626
|
-
width: ${
|
|
2627
|
-
margin-left: ${
|
|
2628
|
-
margin-bottom: ${
|
|
2626
|
+
width: ${i==="long"?"510px":"auto"};
|
|
2627
|
+
margin-left: ${i==="long"?"0px":"30px"};
|
|
2628
|
+
margin-bottom: ${i==="long"?"0px":e.spacing[.5]};
|
|
2629
2629
|
}
|
|
2630
2630
|
|
|
2631
2631
|
&::before {
|
|
@@ -2658,12 +2658,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2658
2658
|
&::before,
|
|
2659
2659
|
> *::before {
|
|
2660
2660
|
content: "";
|
|
2661
|
-
left: ${
|
|
2661
|
+
left: ${i==="long"?"50%":"0px"};
|
|
2662
2662
|
position: absolute;
|
|
2663
2663
|
transform: translateX(-50%);
|
|
2664
2664
|
}
|
|
2665
2665
|
`}
|
|
2666
|
-
`,
|
|
2666
|
+
`,oi=({date:e,description:i,title:n,size:a="long"})=>{const r=s.nt();return t.jsxs(co,{$size:a,className:"timeline-card",children:[t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:e}),t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",lineSpacing:1.5,mb:.5,size:"md",textAlign:"center",children:n}),t.jsx("div",{children:i.map((o,l)=>{const c=`${o}#${l}`;return t.jsx(S,{size:"sm",textAlign:"center",wordBreak:"break-word",children:o},c)})})]})},go=({items:e})=>{const i=f.useRef(null),[n,a]=f.useState("long");return f.useEffect(()=>{i.current&&a(i.current.offsetWidth<=1100?"small":"long")},[]),t.jsx($,{ref:i,width:"100%",children:t.jsx(po,{$size:n,children:e.map((r,o)=>t.jsx(oi,{date:r.date,description:r.description,size:n,title:r.title},`${r.title}-${o}`))})})},uo=s.dt.div`
|
|
2667
2667
|
${({theme:e})=>`
|
|
2668
2668
|
align-items: center;
|
|
2669
2669
|
display: flex;
|
|
@@ -2722,15 +2722,15 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2722
2722
|
color: ${e.palette.white};
|
|
2723
2723
|
}
|
|
2724
2724
|
`}
|
|
2725
|
-
`,fo=({defaultSelection:e,options:
|
|
2726
|
-
${({className:e,theme:
|
|
2725
|
+
`,fo=({defaultSelection:e,options:i,handleClick:n})=>{const[a,r]=f.useState(e??i[0]),o=f.useCallback(l=>()=>{r(l),n(l)},[n]);return t.jsx(uo,{children:i.map((l,c)=>t.jsx(xo,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(S,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},ho={content:"",disableBeacon:!0,hideCloseButton:!1,locale:{back:"Back",close:"Close",last:"Close",next:"Next",open:"Open the dialog",skip:"Skip"},showSkipButton:!0,styles:{buttonBack:{fontFamily:"roboto"},buttonNext:{fontFamily:"roboto"},buttonSkip:{fontFamily:"roboto"},options:{zIndex:9999},tooltipContainer:{fontFamily:"roboto",textAlign:"left"}},target:""},bo=({run:e,steps:i,onFinish:n})=>{const[a,r]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:p,index:g,status:x,type:u}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(u)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(x)||p==="close")&&(r(!1),s.lodashExports.isUndefined(n)||n())},[n]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:i,styles:{buttonNext:{display:o===i.length-1?"none":"block"},options:{zIndex:9999}}})},$o=({items:e})=>t.jsx(mr,{children:e.map(({isActive:i,label:n,onClick:a},r)=>t.jsx(yr,{className:i?"active":"",onClick:a,type:"button",children:t.jsx(V,{color:"inherit",fontWeight:"semibold",size:"sm",sizeSm:"xs",children:n})},`${n}-${r}`))}),si=t.jsx($,{alignItems:"center",bgColor:z.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(S,{bgGradient:z.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),yo=s.dt.div`
|
|
2726
|
+
${({className:e,theme:i})=>`
|
|
2727
2727
|
align-items: flex-start;
|
|
2728
|
-
border-radius: ${
|
|
2729
|
-
background: ${
|
|
2728
|
+
border-radius: ${i.spacing[1]};
|
|
2729
|
+
background: ${i.palette.white};
|
|
2730
2730
|
display: flex;
|
|
2731
2731
|
flex-direction: column;
|
|
2732
|
-
gap: ${
|
|
2733
|
-
padding: ${
|
|
2732
|
+
gap: ${i.spacing[1]};
|
|
2733
|
+
padding: ${i.spacing[1.5]};
|
|
2734
2734
|
position: relative;
|
|
2735
2735
|
width: 320px;
|
|
2736
2736
|
|
|
@@ -2739,13 +2739,13 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2739
2739
|
width: 100%;
|
|
2740
2740
|
}
|
|
2741
2741
|
|
|
2742
|
-
${e==="essential"?`border: 2px solid ${
|
|
2742
|
+
${e==="essential"?`border: 2px solid ${i.palette.gray[300]};`:`
|
|
2743
2743
|
box-shadow: 0px 9px 18px 0px rgba(243, 38, 55, 0.06),
|
|
2744
2744
|
0px 18px 27px 0px rgba(243, 38, 55, 0.10);
|
|
2745
2745
|
|
|
2746
2746
|
&::before {
|
|
2747
|
-
background: ${
|
|
2748
|
-
border-radius: ${
|
|
2747
|
+
background: ${i.palette.gradients["01"]} border-box;
|
|
2748
|
+
border-radius: ${i.spacing[1]};
|
|
2749
2749
|
content: "";
|
|
2750
2750
|
position: absolute;
|
|
2751
2751
|
inset: 0;
|
|
@@ -2757,14 +2757,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2757
2757
|
`}
|
|
2758
2758
|
`}
|
|
2759
2759
|
`;s.dt.div`
|
|
2760
|
-
${({className:e,theme:
|
|
2760
|
+
${({className:e,theme:i})=>`
|
|
2761
2761
|
align-items: flex-start;
|
|
2762
|
-
border-radius: ${
|
|
2762
|
+
border-radius: ${i.spacing[1]};
|
|
2763
2763
|
display: flex;
|
|
2764
2764
|
flex-direction: column;
|
|
2765
2765
|
justify-content: center;
|
|
2766
|
-
gap: ${
|
|
2767
|
-
padding: ${
|
|
2766
|
+
gap: ${i.spacing[1.5]};
|
|
2767
|
+
padding: ${i.spacing[1.5]};
|
|
2768
2768
|
width: 466px;
|
|
2769
2769
|
|
|
2770
2770
|
button {
|
|
@@ -2775,17 +2775,17 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(a
|
|
|
2775
2775
|
${e==="essential"?`
|
|
2776
2776
|
background: linear-gradient(
|
|
2777
2777
|
180deg,
|
|
2778
|
-
${
|
|
2779
|
-
${
|
|
2778
|
+
${i.palette.primary[400]} 0%,
|
|
2779
|
+
${i.palette.black} 100%
|
|
2780
2780
|
);`:`
|
|
2781
|
-
background: ${
|
|
2781
|
+
background: ${i.palette.white};
|
|
2782
2782
|
box-shadow: 0px 9px 18px 0px rgba(243, 38, 55, 0.06),
|
|
2783
2783
|
0px 18px 27px 0px rgba(243, 38, 55, 0.10);
|
|
2784
2784
|
`}
|
|
2785
2785
|
|
|
2786
|
-
@media screen and (max-width: ${
|
|
2786
|
+
@media screen and (max-width: ${i.breakpoints.mobile}) {
|
|
2787
2787
|
width: 320px;
|
|
2788
2788
|
}
|
|
2789
2789
|
`}
|
|
2790
2790
|
`;const mo={advanced:{title:"Advanced plan",benefits:"Leverage vulnerability scanning + AI + expert intelligence",buttonText:"Contact sales",description:"For teams that want to discover risk exposure with speed and accuracy.",priceGroup:"$1,579"},essential:{title:"Essential plan",benefits:"Leverage vulnerability scanning",buttonText:"Start a 21-day free trial",description:`For teams that want to discover risk exposure quickly
|
|
2791
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},wo=({description:e,onClick:
|
|
2791
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},wo=({description:e,onClick:i,plan:n})=>{const{title:a,description:r,benefits:o,buttonText:l}=mo[n],c=e??r;return t.jsxs(yo,{className:n,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:n==="essential"?1.75:0,children:[n==="advanced"&&si,t.jsx(V,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(S,{color:z.palette.gray[400],fontWeight:"semibold",pb:n==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(S,{lineSpacing:1.5,lineSpacingSm:1.25,pb:n==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(P,{onClick:i,variant:"primary",children:l})]})};exports.Accordion=Wi;exports.AccordionContent=gt;exports.ActionButton=Be;exports.Alert=Yi;exports.AppliedFilter=ae;exports.AppliedFilters=Mr;exports.ArrayField=Ae;exports.Avatar=tn;exports.BaseButtonComponent=_e;exports.BaseComponent=$e;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=Ve;exports.Button=P;exports.Button$1=je;exports.ButtonToolbarCenter=Sn;exports.ButtonToolbarRow=In;exports.ButtonToolbarStartRow=zn;exports.Calendar=mt;exports.Calendar$1=Ct;exports.Calendar$2=zt;exports.CalendarCell=yt;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=an;exports.CardWithInput=Yn;exports.CardWithOptions=Ut;exports.CardWithSelector=Qn;exports.CardWithSwitch=ir;exports.Carousel=lr;exports.Checkbox=Ee;exports.CodeSnippet=pr;exports.Col=Pe;exports.ColumFilters=Zt;exports.ColumnsModal=Nr;exports.ComboBox=bt;exports.ComboBoxField=Le;exports.Container=$;exports.CustomThemeProvider=Fi;exports.DateField=vt;exports.DateSelector=le;exports.Description=ni;exports.Dialog=Te;exports.Divider=ie;exports.Editable=Cn;exports.EmptyButton=He;exports.EmptyState=qr;exports.FilePreview=ft;exports.FilterControl=qt;exports.FilterForm=Me;exports.FilterFormContent=Kt;exports.FiltersList=Jt;exports.FixedTabs=$o;exports.Form=Jr;exports.Gap=Nn;exports.GridContainer=Qr;exports.GroupSelector=ta;exports.Header=Ie;exports.Header$1=Mt;exports.Heading=V;exports.Icon=I;exports.IconButton=B;exports.IndicatorCard=ia;exports.InfoSidebar=na;exports.InnerForm=Kr;exports.Input=Fe;exports.InputArray=Rn;exports.InputDate=kt;exports.InputDateRange=St;exports.InputDateTime=kn;exports.InputFile=An;exports.InputNumber=Ft;exports.InputNumberRange=Nt;exports.InputTags=Bn;exports.Label=Ge;exports.Link=Q;exports.ListItem=we;exports.ListItemsWrapper=_t;exports.LittleFlag=aa;exports.Loading=ua;exports.LocationCode=At;exports.Logo=fa;exports.Lottie=ba;exports.MemoizedImage=te;exports.Menu=$a;exports.MenuItem=ri;exports.MessageBanner=ma;exports.Modal=ei;exports.ModalConfirm=$r;exports.ModalFooter=Bt;exports.Notification=ka;exports.NotificationSign=Ht;exports.NumberField=Ce;exports.NumberInput=za;exports.OAuthSelector=Ta;exports.Option=ht;exports.OptionBoxContainer=Je;exports.OptionContainer=Oe;exports.OptionContainer$1=ti;exports.OutlineContainer=O;exports.PhoneInput=Un;exports.PlanCard=wo;exports.PopUp=Aa;exports.Popover=ye;exports.PremiumFeature=ii;exports.PreviewPanel=Vt;exports.PriorityScore=Na;exports.ProgressBar=Pa;exports.RadioButton=qe;exports.RecommendedTag=si;exports.Row=It;exports.ScrollUpButton=Ba;exports.Search=ce;exports.SearchPanel=Yt;exports.SeverityBadge=Ha;exports.SeverityOverview=_a;exports.SeverityOverviewBadge=oe;exports.ShowOnHover=Ua;exports.SlideOutMenu=Ya;exports.Slider=Qa;exports.Span=se;exports.StepLapse=ao;exports.Tab=Ot;exports.TableButton=lo;exports.Tabs=Xe;exports.Tag=X;exports.TagsField=We;exports.Text=S;exports.TextArea=Gn;exports.Thumb=ai;exports.TimeField=jt;exports.TimeLine=go;exports.TimeLineCard=oi;exports.Toggle=Lt;exports.ToggleButton=fo;exports.Tooltip=Y;exports.Tour=bo;exports.baseStep=ho;exports.formatCheckValues=Qt;exports.getStyledConfig=be;exports.hiddenProps=dt;exports.icons=Ii;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=Ti;exports.useCarousel=Et;exports.useClickOutside=me;exports.useCloudinaryImage=Rt;exports.useColumnsModal=qn;exports.useConfirmDialog=Vr;exports.useDebouncedCallback=Dt;exports.useFilterForm=Xt;exports.useFilters=_r;exports.useModal=Ne;exports.useSearch=Kn;exports.variantBuilder=K;
|