@fluidattacks/design 3.26.0 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/components/@core/index.js +1 -1
- package/dist/components/accordion/accordion-content/index.js +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/styles.d.ts +273 -4
- package/dist/components/button/types.d.ts +4 -3
- 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/card-container/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/conditions-dialog/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/copy-button/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dropdown/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.stories.d.ts +1 -2
- 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/input-tags/index.stories.d.ts +1 -2
- package/dist/components/inputs/fields/number/index.d.ts +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number/index.stories.d.ts +1 -3
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.stories.d.ts +1 -2
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.d.ts +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.stories.d.ts +5 -3
- package/dist/components/inputs/fields/text-input/index.js +1 -1
- package/dist/components/inputs/fields/text-input/index.stories.d.ts +5 -3
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.d.ts +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/types.d.ts +1 -0
- 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/pop-up/description/index.js +1 -1
- package/dist/components/pop-up/index.js +1 -1
- package/dist/components/premium-feature/index.js +1 -1
- package/dist/components/priority-score/index.js +1 -1
- package/dist/components/progress-bar/index.js +1 -1
- package/dist/components/progress-indicator/in-progress-icon/index.js +1 -1
- package/dist/components/progress-indicator/index.js +1 -1
- package/dist/components/progress-indicator/step/index.js +1 -1
- package/dist/components/radio-button/index.js +1 -1
- package/dist/components/scroll-button/index.js +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/severity-badge/index.js +1 -1
- package/dist/components/severity-overview/badge/index.js +1 -1
- package/dist/components/severity-overview/index.js +1 -1
- package/dist/components/show-on-hover/index.js +1 -1
- package/dist/components/slide-out-menu/index.d.ts +1 -1
- package/dist/components/slide-out-menu/index.js +1 -1
- package/dist/components/slide-out-menu/index.stories.d.ts +2 -3
- package/dist/components/slide-out-menu/menu-item/index.js +1 -1
- package/dist/components/slide-out-menu/types.d.ts +0 -8
- 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/context/index.js +1 -1
- package/dist/components/table/export-csv/index.js +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/table/pagination/pagination-control/index.js +1 -1
- package/dist/components/table/pagination/pagination-dropdown/index.js +1 -1
- package/dist/components/table/pagination/pagination-size/index.js +1 -1
- package/dist/components/table/sort-icon/index.js +1 -1
- package/dist/components/table/table-body/index.js +1 -1
- package/dist/components/table/table-column-toggle/index.js +1 -1
- package/dist/components/table/table-content/head/index.js +1 -1
- package/dist/components/table/table-content/index.js +1 -1
- package/dist/components/table/table-footer/footer-content/index.js +1 -1
- package/dist/components/table/table-footer/index.js +1 -1
- package/dist/components/table/table-options/caption-content/index.js +1 -1
- package/dist/components/table/table-options/controls-content/index.js +1 -1
- package/dist/components/table/table-options/highlighted-content/index.js +1 -1
- package/dist/components/table/table-options/index.js +1 -1
- package/dist/components/table/wrapper/index.js +1 -1
- package/dist/components/table-button/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tab/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +1 -1
- package/dist/components/typography/heading/index.js +1 -1
- package/dist/components/typography/index.js +1 -1
- package/dist/components/typography/span/index.js +1 -1
- package/dist/components/typography/text/index.js +1 -1
- package/dist/{components-CtOycXzf.js → components-BGRokx1b.js} +301 -272
- package/dist/{components-C6hF8tg6.mjs → components-avIN2OQS.mjs} +2042 -2042
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";const
|
|
2
|
-
${
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),x=require("react"),c=require("./vendor-aX2fiAjI.js"),se=require("react-dom"),Be=require("react-router-dom"),q=e=>({getVariant:(t,i)=>e(t)[i]}),St=["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"],Qn={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},ei={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},ti={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},ni={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},ii={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},oi={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},ri={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},ai={"01":"linear-gradient(45deg, #f32637 0%, #b8075d 100%)","02":"linear-gradient(45deg, #fcfcfd 0%, #667085 100%)"},si={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"}},li={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)"},ci={mobile:"480px",tablet:"960px",sm:"1024px",md:"1440px",lg:"1920px"},di={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"},pi=["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"],gi=[["fal","arrow-down"],["fal","arrow-left"],["fal","arrow-right"],["fal","arrow-up"],["fal","plus"],["fal","minus"],["fas","check"],["fas","circle-question"]],D={typography:si,shadows:li,breakpoints:ci,spacing:di,palette:{primary:ei,complementary:ti,error:ni,info:ri,warning:ii,success:oi,black:"#0c111d",white:"#ffffff",gray:Qn,gradients:ai}},ui=({children:e})=>n.jsx(c.Xe,{theme:D,children:e}),N=(e,t)=>t===void 0?"":`${e}: ${t};`,he=e=>{const t=e.py??e.pt??0,i=e.px??e.pr??0,o=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[a,l,s,d]=e.padding;return`padding: ${D.spacing[a]} ${D.spacing[l]} ${D.spacing[s]} ${D.spacing[d]};`}return`padding: ${D.spacing[t]} ${D.spacing[i]} ${D.spacing[o]} ${D.spacing[r]};`},ye=e=>{const t=e.my??e.mt??0,i=e.mx??e.mr??0,o=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[a,l,s,d]=e.margin;return`margin: ${D.spacing[a]} ${D.spacing[l]} ${D.spacing[s]} ${D.spacing[d]};`}return`margin: ${D.spacing[t]} ${D.spacing[i]} ${D.spacing[o]} ${D.spacing[r]};`},be=e=>{const t=N("position",e.position),i=N("top",e.top),o=N("right",e.right),r=N("bottom",e.bottom),a=N("left",e.left),l=N("z-index",e.zIndex);return`
|
|
2
|
+
${t}
|
|
3
3
|
${i}
|
|
4
4
|
${o}
|
|
5
5
|
${r}
|
|
6
6
|
${a}
|
|
7
7
|
${l}
|
|
8
|
-
`},$e=e=>{const
|
|
9
|
-
${
|
|
8
|
+
`},$e=e=>{const t=N("border",e.border),i=N("border-top",e.borderTop),o=N("border-right",e.borderRight),r=N("border-bottom",e.borderBottom),a=N("border-left",e.borderLeft),l=N("border-color",e.borderColor),s=N("border-radius",e.borderRadius);return`
|
|
9
|
+
${t}
|
|
10
10
|
${i}
|
|
11
11
|
${o}
|
|
12
12
|
${r}
|
|
13
13
|
${a}
|
|
14
14
|
${l}
|
|
15
15
|
${s}
|
|
16
|
-
`},xi=e=>e.includes("x")?"overflow-x: auto;":"",fi=e=>e.includes("y")?"overflow-y: auto;":"",me=e=>{const
|
|
16
|
+
`},xi=e=>e.includes("x")?"overflow-x: auto;":"",fi=e=>e.includes("y")?"overflow-y: auto;":"",me=e=>{const t=e.scroll?`
|
|
17
17
|
${xi(e.scroll)}
|
|
18
18
|
${fi(e.scroll)}
|
|
19
|
-
`:"",i=N("visibility",e.visibility),o=N("display",e.display),r=N("height",e.height),a=N("width",e.width),l=N("max-height",e.maxHeight),s=N("max-width",e.maxWidth),d=N("min-height",e.minHeight),p=N("min-width",e.minWidth),g=N("box-shadow",e.shadow?D.shadows[e.shadow]:void 0),
|
|
20
|
-
${
|
|
19
|
+
`:"",i=N("visibility",e.visibility),o=N("display",e.display),r=N("height",e.height),a=N("width",e.width),l=N("max-height",e.maxHeight),s=N("max-width",e.maxWidth),d=N("min-height",e.minHeight),p=N("min-width",e.minWidth),g=N("box-shadow",e.shadow?D.shadows[e.shadow]:void 0),u=N("gap",e.gap===void 0?void 0:D.spacing[e.gap]),f=N("background-color",e.bgColor),h=N("background",e.bgGradient),y=N("flex-direction",e.flexDirection),m=N("flex-grow",e.flexGrow),b=N("justify-content",e.justify),k=N("justify-self",e.justifySelf),w=N("align-items",e.alignItems),v=N("align-self",e.alignSelf),j=N("flex-wrap",e.wrap);return`
|
|
20
|
+
${t}
|
|
21
21
|
${i}
|
|
22
22
|
${o}
|
|
23
23
|
${r}
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
${g}
|
|
30
30
|
${f}
|
|
31
31
|
${h}
|
|
32
|
-
${
|
|
32
|
+
${u}
|
|
33
33
|
${y}
|
|
34
34
|
${m}
|
|
35
35
|
${b}
|
|
36
|
-
${j}
|
|
37
|
-
${w}
|
|
38
36
|
${k}
|
|
37
|
+
${w}
|
|
39
38
|
${v}
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
${j}
|
|
40
|
+
`},we=e=>{const t=N("color",e.color),i=N("font-family",e.fontFamily),o=N("font-size",e.fontSize),r=N("font-weight",e.fontWeight),a=N("line-spacing",e.letterSpacing),l=N("line-height",e.lineSpacing),s=N("text-align",e.textAlign),d=N("text-decoration",e.textDecoration),p=N("text-overflow",e.textOverflow),g=N("white-space",e.whiteSpace),u=N("word-break",e.wordBreak),f=N("word-wrap",e.wordWrap);return`
|
|
41
|
+
${t}
|
|
42
42
|
${i}
|
|
43
43
|
${o}
|
|
44
44
|
${r}
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
${d}
|
|
49
49
|
${p}
|
|
50
50
|
${g}
|
|
51
|
-
${
|
|
51
|
+
${u}
|
|
52
52
|
${f}
|
|
53
|
-
`},
|
|
54
|
-
${
|
|
53
|
+
`},ve=e=>{const t=N("cursor",e.cursor),i=N("border-color",e.borderColorHover),o=N("background-color",e.bgColorHover),r=N("box-shadow",e.shadowHover===void 0?void 0:D.shadows[e.shadowHover]),a=N("transition",e.transition);return`
|
|
54
|
+
${t}
|
|
55
55
|
|
|
56
56
|
&:hover {
|
|
57
57
|
${a||"transition: all 0.2s;"}
|
|
@@ -59,41 +59,41 @@
|
|
|
59
59
|
${o}
|
|
60
60
|
${r}
|
|
61
61
|
}
|
|
62
|
-
`},
|
|
62
|
+
`},je={shouldForwardProp:e=>!St.includes(e)},ke=c.st.div.withConfig(je)`
|
|
63
63
|
${he}
|
|
64
64
|
${ye}
|
|
65
65
|
${be}
|
|
66
66
|
${me}
|
|
67
67
|
${we}
|
|
68
68
|
${$e}
|
|
69
|
-
${
|
|
70
|
-
`,Xe=c.st.button.withConfig(
|
|
69
|
+
${ve}
|
|
70
|
+
`,Xe=c.st.button.withConfig(je)`
|
|
71
71
|
${he}
|
|
72
72
|
${ye}
|
|
73
73
|
${be}
|
|
74
74
|
${me}
|
|
75
75
|
${we}
|
|
76
76
|
${$e}
|
|
77
|
-
${
|
|
78
|
-
`,Qe=c.st.p.withConfig(
|
|
77
|
+
${ve}
|
|
78
|
+
`,Qe=c.st.p.withConfig(je)`
|
|
79
79
|
${he}
|
|
80
80
|
${ye}
|
|
81
81
|
${be}
|
|
82
82
|
${me}
|
|
83
83
|
${we}
|
|
84
84
|
${$e}
|
|
85
|
-
${
|
|
86
|
-
`,et=c.st.span.withConfig(
|
|
85
|
+
${ve}
|
|
86
|
+
`,et=c.st.span.withConfig(je)`
|
|
87
87
|
${he}
|
|
88
88
|
${ye}
|
|
89
89
|
${be}
|
|
90
90
|
${me}
|
|
91
91
|
${we}
|
|
92
92
|
${$e}
|
|
93
|
-
${
|
|
93
|
+
${ve}
|
|
94
94
|
`,hi=c.st(ke)`
|
|
95
|
-
${({theme:e,$center:
|
|
96
|
-
${
|
|
95
|
+
${({theme:e,$center:t=!1,$styleMd:i,$styleSm:o})=>`
|
|
96
|
+
${t?"margin: auto;":""}
|
|
97
97
|
scrollbar-color: ${e.palette.gray[600]} ${e.palette.gray[100]};
|
|
98
98
|
scroll-padding: ${e.spacing[.5]};
|
|
99
99
|
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
${o};
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
|
-
`,$=
|
|
112
|
-
${({theme:e,$bgGradient:
|
|
113
|
-
background: ${
|
|
111
|
+
`,$=x.forwardRef(function({as:t="div",center:i,children:o,id:r,onHover:a,onLeave:l,styleMd:s,styleSm:d,...p},g){return n.jsx(hi,{$center:i,$styleMd:s,$styleSm:d,as:t,id:r,onMouseLeave:l,onMouseOver:a,ref:g,...p,children:o})}),yi=c.st(Qe)`
|
|
112
|
+
${({theme:e,$bgGradient:t="unset",$color:i=e.palette.gray[800],$display:o="block",$fontFamily:r=e.typography.type.primary,$fontWeight:a="bold",$letterSpacing:l=0,$lineSpacing:s=1.5,$lineSpacingSm:d,$overflow:p="unset",$size:g,$sizeMd:u,$sizeSm:f,$textFill:h="unset",$whiteSpace:y="pre-line",$wordBreak:m="normal"})=>`
|
|
113
|
+
background: ${t};
|
|
114
114
|
color: ${i};
|
|
115
115
|
display: ${o};
|
|
116
116
|
font-family: ${r};
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
and (min-width: ${e.breakpoints.mobile})
|
|
131
131
|
and (max-width: ${e.breakpoints.tablet})
|
|
132
132
|
{
|
|
133
|
-
font-size: ${e.typography.heading[
|
|
133
|
+
font-size: ${e.typography.heading[u??g]};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
@@ -139,12 +139,12 @@
|
|
|
139
139
|
}
|
|
140
140
|
`}
|
|
141
141
|
`,zt=c.st(Qe)`
|
|
142
|
-
${({theme:e,$bgGradient:
|
|
143
|
-
background: ${
|
|
142
|
+
${({theme:e,$bgGradient:t="unset",$color:i=e.palette.gray[600],$display:o="block",$fontFamily:r=e.typography.type.primary,$fontWeight:a="regular",$fontStyle:l="normal",$letterSpacing:s=0,$lineSpacing:d=1.25,$lineSpacingSm:p,$overflow:g="unset",$size:u,$sizeMd:f,$sizeSm:h,$textFill:y="unset",$whiteSpace:m="pre-line",$wordBreak:b="normal"})=>`
|
|
143
|
+
background: ${t};
|
|
144
144
|
color: ${i};
|
|
145
145
|
display: ${o};
|
|
146
146
|
font-family: ${r};
|
|
147
|
-
font-size: ${e.typography.text[
|
|
147
|
+
font-size: ${e.typography.text[u]};
|
|
148
148
|
font-style: ${l};
|
|
149
149
|
font-weight: ${e.typography.weight[a]};
|
|
150
150
|
letter-spacing: ${s};
|
|
@@ -161,17 +161,17 @@
|
|
|
161
161
|
and (min-width: ${e.breakpoints.mobile})
|
|
162
162
|
and (max-width: ${e.breakpoints.tablet})
|
|
163
163
|
{
|
|
164
|
-
font-size: ${e.typography.text[f??
|
|
164
|
+
font-size: ${e.typography.text[f??u]};
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
168
|
-
font-size: ${e.typography.text[h??
|
|
168
|
+
font-size: ${e.typography.text[h??u]};
|
|
169
169
|
line-height: ${e.spacing[p??d]};
|
|
170
170
|
}
|
|
171
171
|
`}
|
|
172
172
|
`,bi=c.st(et)`
|
|
173
|
-
${({theme:e,$color:
|
|
174
|
-
color: ${
|
|
173
|
+
${({theme:e,$color:t=e.palette.gray[600],$content:i=void 0,$display:o="inline",$fontWeight:r="regular",$size:a,$lineSpacing:l=1.25})=>`
|
|
174
|
+
color: ${t};
|
|
175
175
|
display: ${o};
|
|
176
176
|
font-family: ${e.typography.type.primary};
|
|
177
177
|
font-size: ${e.typography.text[a]};
|
|
@@ -182,9 +182,9 @@
|
|
|
182
182
|
|
|
183
183
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
184
184
|
`}
|
|
185
|
-
`,Z=
|
|
186
|
-
${({$clickable:e,$color:
|
|
187
|
-
color: ${
|
|
185
|
+
`,Z=x.forwardRef(function({bgGradient:t,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:y,textFill:m,whiteSpace:b,wordBreak:k,...w},v){return n.jsx(yi,{$bgGradient:t,$color:r,$display:a,$fontFamily:l,$fontWeight:s,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:f,$sizeMd:h,$sizeSm:y,$textFill:m,$whiteSpace:b,$wordBreak:k,className:o,ref:v,...w,children:i})}),ue=x.forwardRef(function({children:t,color:i,content:o,display:r,fontFamily:a,fontWeight:l,letterSpacing:s,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:f,...h},y){return n.jsx(bi,{$color:i,$content:o,$display:r,$fontFamily:a,$fontWeight:l,$letterSpacing:s,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:f,ref:y,...h,children:t})}),I=x.forwardRef(function({bgGradient:t,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:f,sizeMd:h,sizeSm:y,textFill:m,whiteSpace:b,wordBreak:k,fontStyle:w,...v},j){return n.jsx(zt,{$bgGradient:t,$color:r,$display:a,$fontFamily:l,$fontStyle:w,$fontWeight:s,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:f,$sizeMd:h,$sizeSm:y,$textFill:m,$whiteSpace:b,$wordBreak:k,className:o,ref:j,...v,children:i})}),It=({item:e})=>{const t=e.description&&typeof e.description=="string"?n.jsx(I,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return n.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[t,e.extraElement?n.jsx($,{children:e.extraElement}):void 0]})},$i={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},mi=c.st(et)`
|
|
186
|
+
${({$clickable:e,$color:t="inherit",$disabled:i=!1,$hoverColor:o,$rotation:r,$size:a,$secondaryColor:l})=>{const s=o?"":"brightness(50%)",d=o??"";return`
|
|
187
|
+
color: ${t};
|
|
188
188
|
cursor: ${e?"pointer":"inherit"};
|
|
189
189
|
font-size: ${$i[a]};
|
|
190
190
|
line-height: 0;
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
&:hover:not([disabled]) {
|
|
219
219
|
transform: scale(1.2);
|
|
220
220
|
}
|
|
221
|
-
`;const
|
|
221
|
+
`;const R=x.forwardRef(function({clickable:t,disabled:i,hoverColor:o,icon:r,iconClass:a="",iconColor:l,iconMask:s,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:u,rotation:f,spanClass:h,secondaryColor:y,...m},b){return n.jsx(mi,{$clickable:t,$color:l,$disabled:i,$hoverColor:o,$rotation:f,$secondaryColor:y,$size:d,className:h,"data-testid":`${r}-icon`,onClick:u,ref:b,...m,children:n.jsx("i",{className:`${g} fa-${r} ${a}`,...s!==void 0?{"data-fa-mask":s}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${r}`)}),wi=x.forwardRef(function({aligned:t="end",items:i,bgColor:o},r){const a=c.Je(),[l,s]=x.useState(i.map(p=>p.expanded??!1)),d=x.useCallback(p=>g=>{g.preventDefault(),s(u=>u.map((f,h)=>h===p?!f:f))},[]);return n.jsx($,{borderColor:a.palette.gray[200],borderTop:"1px solid",ref:r,children:i.map((p,g)=>{const u=l[g];return n.jsxs($,{bgColor:o??a.palette.white,borderBottom:"1px solid",borderColor:a.palette.gray[200],children:[n.jsx($,{"aria-controls":`panel-${p.title}`,"aria-expanded":u,"aria-label":p.title,as:"button",bgColor:o??a.palette.white,bgColorHover:a.palette.gray[100],cursor:"pointer",display:"flex",onClick:d(g),padding:[.75,.75,.75,.75],width:"100%",children:n.jsxs($,{as:"summary",display:"flex",flexDirection:t==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[n.jsx(I,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:p.title}),n.jsx(R,{icon:u?"chevron-up":"chevron-down",iconColor:a.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),u&&n.jsx(It,{item:p})]},p.title)})})}),vi=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:ji}=q(e=>({error:`
|
|
222
222
|
background: ${e.palette.error[50]};
|
|
223
223
|
border: 1px solid ${e.palette.error[500]};
|
|
224
224
|
color: ${e.palette.error[700]};
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
`})),ki=c.st.div`
|
|
274
|
-
${({theme:e,$variant:
|
|
274
|
+
${({theme:e,$variant:t})=>`
|
|
275
275
|
background: transparent;
|
|
276
276
|
align-items: center;
|
|
277
277
|
border-radius: ${e.spacing[.25]};
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
background-color: transparent;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
${
|
|
293
|
+
${ji(e,t??"error")}
|
|
294
294
|
`}
|
|
295
295
|
`,Ci=c.st.div`
|
|
296
296
|
padding-right: 4px;
|
|
@@ -370,16 +370,16 @@
|
|
|
370
370
|
color: ${e.palette.white};
|
|
371
371
|
}
|
|
372
372
|
`})),Tt=c.st(Xe)`
|
|
373
|
-
${({theme:e,justify:
|
|
373
|
+
${({theme:e,justify:t,$variant:i,$notification:o,$icon:r})=>`
|
|
374
374
|
align-items: center;
|
|
375
375
|
border-radius: var(--btn-spacing);
|
|
376
376
|
cursor: pointer;
|
|
377
377
|
display: inline-flex;
|
|
378
378
|
font-family: ${e.typography.type.primary};
|
|
379
|
-
font-size: ${
|
|
379
|
+
font-size: ${e.typography.text.sm};
|
|
380
380
|
font-weight: ${e.typography.weight.regular};
|
|
381
381
|
gap: var(--btn-spacing);
|
|
382
|
-
justify-content: ${
|
|
382
|
+
justify-content: ${t??"center"};
|
|
383
383
|
line-height: ${e.spacing[1.25]};
|
|
384
384
|
padding: var(--btn-padding-y) var(--btn-padding-x);
|
|
385
385
|
position: relative;
|
|
@@ -388,14 +388,42 @@
|
|
|
388
388
|
white-space: nowrap;
|
|
389
389
|
|
|
390
390
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
391
|
-
${
|
|
391
|
+
${i!=="link"?`--btn-padding-y: ${e.spacing[1]}`:""};
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
${Si(e,
|
|
394
|
+
${Si(e,i??"primary")}
|
|
395
|
+
|
|
396
|
+
${o?`
|
|
397
|
+
::before {
|
|
398
|
+
content: "";
|
|
399
|
+
position: absolute;
|
|
400
|
+
top: 20%;
|
|
401
|
+
left: ${r?"10%":"1%"};
|
|
402
|
+
width: ${e.spacing[.5]};
|
|
403
|
+
height: ${e.spacing[.5]};
|
|
404
|
+
background-color: ${e.palette.primary[400]};
|
|
405
|
+
border-radius: 50%;
|
|
406
|
+
}
|
|
407
|
+
`:""}
|
|
408
|
+
`}
|
|
409
|
+
`,zi=c.st.div`
|
|
410
|
+
${({theme:e})=>`
|
|
411
|
+
align-items: center;
|
|
412
|
+
background-color: ${e.palette.primary[400]};
|
|
413
|
+
border-radius: 100px;
|
|
414
|
+
display: flex;
|
|
415
|
+
color: ${e.palette.white};
|
|
416
|
+
font-family: ${e.typography.type.primary};
|
|
417
|
+
font-size: ${e.typography.text.xs};
|
|
418
|
+
font-weight: ${e.typography.weight.regular};
|
|
419
|
+
height: 14px;
|
|
420
|
+
justify-content: center;
|
|
421
|
+
line-height: 18px;
|
|
422
|
+
padding: ${e.spacing[.125]} 7px;
|
|
395
423
|
`}
|
|
396
|
-
`,
|
|
397
|
-
${({theme:e,borderRadius:
|
|
398
|
-
--btn-spacing: ${
|
|
424
|
+
`,Ii=c.st(Tt)`
|
|
425
|
+
${({theme:e,borderRadius:t="4px",px:i=.5,py:o=.5})=>`
|
|
426
|
+
--btn-spacing: ${t};
|
|
399
427
|
--btn-padding-x: ${e.spacing[i]};
|
|
400
428
|
--btn-padding-y: ${e.spacing[o]};
|
|
401
429
|
|
|
@@ -407,18 +435,18 @@
|
|
|
407
435
|
margin: 0 !important;
|
|
408
436
|
}
|
|
409
437
|
`}
|
|
410
|
-
`,
|
|
411
|
-
${({theme:e,$maxWidth:
|
|
438
|
+
`,Ti=c.st(ke)``,Ei=c.st.div`
|
|
439
|
+
${({theme:e,$maxWidth:t="320px"})=>`
|
|
412
440
|
background-color: ${e.palette.gray[700]};
|
|
413
441
|
border-radius: 8px;
|
|
414
442
|
color: ${e.palette.white};
|
|
415
443
|
font-size: ${e.typography.text.xs};
|
|
416
|
-
max-width: ${
|
|
444
|
+
max-width: ${t};
|
|
417
445
|
padding: ${e.spacing[.75]};
|
|
418
446
|
width: max-content;
|
|
419
447
|
z-index: 999999;
|
|
420
448
|
`}
|
|
421
|
-
`,J=({children:e,disabled:
|
|
449
|
+
`,J=({children:e,disabled:t=!1,display:i="inline-block",height:o,icon:r,iconColor:a,iconSize:l,id:s,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:y})=>{const m=c.Je(),[b,k]=x.useState(!1),{refs:w,floatingStyles:v,context:j}=c.useFloating({middleware:[c.flip({fallbackAxisSideDirection:"start"}),c.offset({mainAxis:10}),c.shift()],onOpenChange:k,open:b,placement:g,whileElementsMounted:c.autoUpdate}),S=c.useHover(j,{delay:{close:0,open:500},move:!1}),E=c.useFocus(j),z=c.useRole(j,{role:r?"label":"tooltip"}),{getReferenceProps:C,getFloatingProps:F}=c.useInteractions([S,E,z]);return t?n.jsx(x.StrictMode,{children:e}):n.jsxs(n.Fragment,{children:[n.jsx(Ti,{...C(),display:i,height:o,id:s,ref:w.setReference,width:y,children:r?n.jsx(R,{clickable:!0,disabled:t,icon:r,iconColor:a,iconSize:l??"xxs",iconType:b?"fa-solid":"fa-light"}):e}),b&&!h&&se.createPortal(n.jsxs(Ei,{...F(),$maxWidth:d,id:`floating-${s}`,ref:w.setFloating,style:v,children:[c.lodashExports.isEmpty(f)?void 0:n.jsx(I,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),c.lodashExports.isEmpty(u)?void 0:n.jsx(I,{color:m.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),c.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},M=x.forwardRef(function({borderRadius:t,disabled:i,icon:o,iconColor:r,iconSize:a="xxs",iconTransform:l,iconType:s,id:d,justify:p="center",onClick:g,px:u,py:f,type:h="button",tooltip:y,tooltipPlace:m,value:b,variant:k="primary",...w},v){const j=n.jsx(Ii,{$variant:k,"aria-disabled":i,"aria-label":d,borderRadius:t,disabled:i,id:d,justify:p,onClick:g,px:u,py:f,ref:v,type:h,value:b,...w,children:n.jsx(R,{clickable:!1,icon:o,iconColor:r,iconSize:a,iconTransform:l,iconType:s})}),E=(h+(k??"")+(d??o)).replace(/ /u,"_");return y===void 0?j:n.jsx(J,{id:`${E}-tooltip`,place:m,tip:y,children:j})}),Ri=x.forwardRef(function({autoHide:t=!1,children:i,closable:o=!1,iconEnabled:r=!0,onTimeOut:a,show:l=!0,time:s=8,variant:d="error",id:p,...g},u){const[f,h]=x.useState(l),y=x.useCallback(()=>{h(!1)},[]);return x.useEffect(()=>{const m=setTimeout(()=>{a==null||a(!0),t&&y()},s*1e3);return()=>{clearTimeout(m)}},[t,y,s,a]),x.useEffect(()=>{h(l)},[l,h]),n.jsx($,{display:f?"block":"none",ref:u,role:"alert",...g,children:n.jsxs(ki,{$variant:d,id:p,children:[r?n.jsx(R,{clickable:!1,icon:vi(d),iconSize:"xs",iconType:"fa-light"}):void 0,n.jsx(Ci,{children:i}),o?n.jsx(M,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:y,px:.125,py:.125,variant:"ghost"}):void 0]})})}),ut=c.st.div`
|
|
422
450
|
${({theme:e})=>`
|
|
423
451
|
align-items: center;
|
|
424
452
|
background-color: ${e.palette.gray[200]};
|
|
@@ -434,7 +462,7 @@
|
|
|
434
462
|
width: ${e.spacing[1.25]};
|
|
435
463
|
height: ${e.spacing[1.25]};
|
|
436
464
|
`}
|
|
437
|
-
`,
|
|
465
|
+
`,Di=c.st.div`
|
|
438
466
|
ul,
|
|
439
467
|
ol {
|
|
440
468
|
padding-top: 6px;
|
|
@@ -498,7 +526,7 @@
|
|
|
498
526
|
#menu-profile-container li div {
|
|
499
527
|
min-width: unset;
|
|
500
528
|
}
|
|
501
|
-
`,{getVariant:
|
|
529
|
+
`,{getVariant:Ni}=q(e=>({default:`
|
|
502
530
|
background-color: ${e.palette.gray[200]};
|
|
503
531
|
color: ${e.palette.gray[800]};
|
|
504
532
|
`,error:`
|
|
@@ -573,14 +601,14 @@
|
|
|
573
601
|
background-color: ${e.palette.warning[400]};
|
|
574
602
|
color: ${e.palette.warning[700]};
|
|
575
603
|
}
|
|
576
|
-
`})),
|
|
577
|
-
${({theme:e,$fontSize:
|
|
604
|
+
`})),Fi=c.st.span`
|
|
605
|
+
${({theme:e,$fontSize:t=e.typography.text.xs,$variant:i})=>`
|
|
578
606
|
align-items: center;
|
|
579
607
|
border-radius: ${e.spacing[i==="technique"?1:.25]};
|
|
580
608
|
display: inline-flex;
|
|
581
609
|
gap: ${e.spacing[.25]};
|
|
582
610
|
font-family: ${e.typography.type.primary};
|
|
583
|
-
font-size: ${
|
|
611
|
+
font-size: ${t};
|
|
584
612
|
font-style: normal;
|
|
585
613
|
font-weight: ${e.typography.weight.regular};
|
|
586
614
|
justify-content: center;
|
|
@@ -594,9 +622,9 @@
|
|
|
594
622
|
display: flex;
|
|
595
623
|
}
|
|
596
624
|
|
|
597
|
-
${
|
|
625
|
+
${Ni(e,i)}
|
|
598
626
|
`}
|
|
599
|
-
`,{getVariant:
|
|
627
|
+
`,{getVariant:Ai}=q(e=>({highRelevance:`
|
|
600
628
|
color: ${e.palette.primary[500]};
|
|
601
629
|
|
|
602
630
|
&:hover:not([disabled]) {
|
|
@@ -609,7 +637,7 @@
|
|
|
609
637
|
color: ${e.palette.gray[500]};
|
|
610
638
|
}
|
|
611
639
|
`})),Et=c.nt`
|
|
612
|
-
${({theme:e,$color:
|
|
640
|
+
${({theme:e,$color:t,$variant:i})=>`
|
|
613
641
|
align-items: center;
|
|
614
642
|
cursor: pointer;
|
|
615
643
|
font-family: ${e.typography.type.primary};
|
|
@@ -630,13 +658,13 @@
|
|
|
630
658
|
text-decoration: none;
|
|
631
659
|
}
|
|
632
660
|
|
|
633
|
-
${
|
|
661
|
+
${t?`color: ${t}`:Ai(e,i)}
|
|
634
662
|
`}
|
|
635
|
-
`,
|
|
663
|
+
`,Li=c.st.a`
|
|
636
664
|
${Et}
|
|
637
|
-
`,
|
|
665
|
+
`,Pi=c.st(Be.Link)`
|
|
638
666
|
${Et}
|
|
639
|
-
`,X=({children:e,color:
|
|
667
|
+
`,X=({children:e,color:t,download:i,href:o,iconPosition:r="right",onClick:a,target:l,variant:s="lowRelevance"})=>{const d=o.startsWith("https://"),p=n.jsx(R,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-light",ml:.25,mr:.25});return d?n.jsxs(Li,{$color:t,$variant:s,download:i,href:o,onClick:a,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):n.jsxs(Pi,{$variant:s,download:i,onClick:a,rel:"nofollow noopener noreferrer",target:l,to:o,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},U=({disabled:e,icon:t,iconColor:i="inherit",iconType:o="fa-light",id:r="close-tag",filterValues:a="",fontSize:l,href:s,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const y=f.length>25&&c.lodashExports.isEmpty(u+a),m=`${f.slice(0,25)}...`;return n.jsxs(ue,{className:"gap-0.5",display:s===void 0?"initial":"flex",size:"sm",children:[n.jsxs(Fi,{$fontSize:l,$variant:h,className:g,children:[t&&n.jsx(R,{icon:t,iconColor:i,iconSize:"xxs",iconType:o}),n.jsxs("span",{className:"w-full",children:[n.jsx("strong",{children:u}),n.jsx("span",{children:y?m:f}),n.jsx("strong",{className:"w-full",children:a})]}),p?n.jsx(M,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),s===void 0?void 0:n.jsx(X,{href:s,children:d})]})},Rt=(e,t=!0)=>{const i=window.open(e,t?void 0:"_self","noopener,noreferrer,");c.lodashExports.isObject(i)&&(i.opener=null)},P=x.forwardRef(function({children:t,disabled:i=!1,external:o=!1,href:r,id:a,icon:l,iconColor:s,iconType:d,name:p,notification:g,onClick:u,rightIcon:f,tag:h,type:y="button",tooltip:m,tooltipPlace:b="bottom",underline:k=!1,value:w,variant:v="primary",width:j,...S},E){const z=m!==void 0,C=`${a}-tooltip`,F=x.useCallback(()=>{r&&Rt(r,o)},[o,r]),T=n.jsxs(Tt,{$icon:l!==void 0,$notification:g!==void 0&&v==="ghost"&&!i,$variant:v,"aria-disabled":i,className:k?"underline":void 0,disabled:i,id:a,name:p,onClick:v==="link"?F:u,ref:E,type:y,value:w,width:j,...z?{"data-tooltip-id":C}:{},...S,children:[l!==void 0&&n.jsx(R,{icon:l,iconColor:s??void 0,iconSize:"xs",iconType:d??"fa-light"}),t,f||v==="link"?n.jsx(R,{icon:f??"arrow-right",iconSize:"xs",iconType:"fa-light"}):void 0,h===void 0||i?null:n.jsx(U,{tagLabel:h,variant:"default"}),g!==void 0&&v==="ghost"&&!i?n.jsx(zi,{children:g}):void 0]});return z?n.jsx(J,{disabled:!z,id:C,place:b,tip:m,width:j,children:T}):T}),Oi=x.forwardRef(function({children:t,onClick:i,userName:o,showIcon:r=!1,showUsername:a=!1},l){const s=!!i;return n.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:n.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[s?n.jsxs(P,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[n.jsx(ut,{children:o[0].toUpperCase()}),a?n.jsx(I,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:o.split(" ")[0]}):void 0,r?n.jsx(R,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):n.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[n.jsx(ut,{children:o[0].toUpperCase()}),a?n.jsxs(I,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",o.split(" ")[0],"!"]}):void 0,r?n.jsx(R,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),n.jsx(Di,{children:t})]})})}),De=({authorEmail:e,date:t,description:i,descriptionColor:o,id:r,title:a,titleColor:l,textAlign:s,textSpacing:d=0,tooltip:p})=>{const g=c.Je();return n.jsxs($,{width:"100%",children:[typeof a=="string"||p?n.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,width:"100%",children:[typeof a=="string"?n.jsx(I,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:s,wordBreak:"break-word",children:a}):a,p&&n.jsx(J,{icon:"circle-info",id:r,place:"top",tip:p})]}):void 0,n.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&n.jsx(I,{color:o??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:s,wordBreak:"break-word",children:i}),t&&n.jsx(I,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:s,wordBreak:"break-word",children:`Date: ${t.split(" ")[0]}`}),e&&n.jsx(I,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:s,wordBreak:"break-word",children:`Author: ${e}`})]})]})},xt=c.st($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
640
668
|
& img {
|
|
641
669
|
display: block;
|
|
642
670
|
}
|
|
@@ -651,8 +679,8 @@
|
|
|
651
679
|
pointer-events: none;
|
|
652
680
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
653
681
|
}
|
|
654
|
-
`,
|
|
655
|
-
${({theme:e,$align:
|
|
682
|
+
`,Mi=e=>{if(c._.isNil(e))return"";const t=e.split(".");return(t.length>1?c._.last(t):"").toLowerCase()},Hi=(e,t)=>c._.isUndefined(t)?!1:c._.includes(e,Mi(t)),Dt=({alt:e,fileType:t,width:i="100%",opacity:o=0,src:r,height:a="auto",videoViewStatus:l})=>{const[s,d]=x.useState({start:!1,half:!1,end:!1}),p=x.useCallback(g=>{if(!l)return;const u=g.target,f=u.currentTime/u.duration*100;f>5&&f<50?(s.start||l("start"),d({start:!0,half:!1,end:!1})):f>=50&&f<99?(s.half||l("half"),d({start:!0,half:!0,end:!1})):f>=99?(s.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,s]);return t==="video"||Hi(["webm"],r)?n.jsx(xt,{$opacity:o,children:n.jsx(X,{href:r,iconPosition:"hidden",children:n.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:a,width:i},children:[n.jsx("source",{src:r,type:"video/webm"}),r]})})}):n.jsx(xt,{$opacity:o,children:n.jsx("img",{alt:e,src:r,style:{height:a,width:i}})})},Wi=({alt:e,authorEmail:t,date:i,description:o,src:r,children:a,isEditing:l,onClick:s,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0,videoViewStatus:f})=>{const h=c.Je(),[y,m]=x.useState(!1),b=x.useCallback(()=>{m(!0)},[]),k=x.useCallback(()=>{m(!1)},[]);return n.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:b,onLeave:k,padding:[.5,.5,.5,.5],width:"100%",children:[n.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:s,position:"relative",width:"100%",children:a===void 0?n.jsxs(x.Fragment,{children:[n.jsx(Dt,{alt:e,fileType:g,height:"147px",opacity:y?.3:0,src:r,videoViewStatus:f,width:"100%"}),u?n.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:n.jsx(M,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):a}),p?null:n.jsx(De,{authorEmail:t,date:i,description:o,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},Bi=c.st.div`
|
|
683
|
+
${({theme:e,$align:t="center",$minWidth:i="auto",$minHeight:o="auto"})=>`
|
|
656
684
|
display: flex;
|
|
657
685
|
background-color: ${e.palette.white};
|
|
658
686
|
border-radius: ${e.spacing[.25]};
|
|
@@ -667,10 +695,10 @@
|
|
|
667
695
|
input {
|
|
668
696
|
color: ${e.palette.gray[800]};
|
|
669
697
|
line-height: ${e.spacing[1.5]};
|
|
670
|
-
text-align: ${
|
|
698
|
+
text-align: ${t};
|
|
671
699
|
}
|
|
672
700
|
`}
|
|
673
|
-
`,tt=({htmlFor:e,label:
|
|
701
|
+
`,tt=({htmlFor:e,label:t,link:i,required:o,tooltip:r,weight:a="normal"})=>{const l=c.Je(),s=`${e}-tooltip`,d=r!==void 0&&!c.lodashExports.isEmpty(r);return n.jsxs("label",{className:"flex gap-1 w-full",htmlFor:e,style:{fontWeight:l.typography.weight[a]},children:[t,o&&n.jsx(R,{icon:"asterisk",iconColor:l.palette.error[500],iconSize:"xxss",spanClass:"required-icon"}),d?n.jsx(J,{display:"inline-flex",icon:"circle-info",id:s,place:"top",tip:r}):null,i?n.jsx(X,{href:i,target:"_blank"}):null]})},_i=c.st.div`
|
|
674
702
|
${({theme:e})=>`
|
|
675
703
|
align-items: flex-start;
|
|
676
704
|
display: inline-flex;
|
|
@@ -718,7 +746,7 @@
|
|
|
718
746
|
}
|
|
719
747
|
`}
|
|
720
748
|
`,ne=c.st.div`
|
|
721
|
-
${({theme:e,$overflowX:
|
|
749
|
+
${({theme:e,$overflowX:t})=>`
|
|
722
750
|
align-items: center;
|
|
723
751
|
display: flex;
|
|
724
752
|
border-radius: ${e.spacing[.5]};
|
|
@@ -728,8 +756,8 @@
|
|
|
728
756
|
gap: ${e.spacing[.625]};
|
|
729
757
|
justify-content: space-between;
|
|
730
758
|
height: 40px;
|
|
731
|
-
overflow-x: ${
|
|
732
|
-
padding: ${
|
|
759
|
+
overflow-x: ${t??"unset"};
|
|
760
|
+
padding: ${t===void 0?`${e.spacing[.625]} ${e.spacing[.75]}`:`${e.spacing[.25]} ${e.spacing[.75]}`};
|
|
733
761
|
width: 100%;
|
|
734
762
|
white-space: nowrap;
|
|
735
763
|
|
|
@@ -788,10 +816,11 @@
|
|
|
788
816
|
|
|
789
817
|
&.disabled {
|
|
790
818
|
background: ${e.palette.gray[100]};
|
|
819
|
+
border-color: ${e.palette.gray[300]};
|
|
791
820
|
cursor: not-allowed;
|
|
792
821
|
|
|
793
822
|
> * {
|
|
794
|
-
color: ${e.palette.gray[
|
|
823
|
+
color: ${e.palette.gray[500]};
|
|
795
824
|
}
|
|
796
825
|
}
|
|
797
826
|
|
|
@@ -822,12 +851,12 @@
|
|
|
822
851
|
border: 1px solid ${e.palette.gray[600]};
|
|
823
852
|
}
|
|
824
853
|
`}
|
|
825
|
-
`,
|
|
826
|
-
${({theme:e,$show:
|
|
854
|
+
`,Ji=c.st.div`
|
|
855
|
+
${({theme:e,$show:t})=>`
|
|
827
856
|
align-items: center;
|
|
828
857
|
align-self: stretch;
|
|
829
858
|
color: ${e.palette.error[500]};
|
|
830
|
-
display: ${
|
|
859
|
+
display: ${t?"flex":"none"};
|
|
831
860
|
font-family: ${e.typography.type.primary};
|
|
832
861
|
font-size: ${e.typography.text.xs};
|
|
833
862
|
font-weight: ${e.typography.weight.regular};
|
|
@@ -835,8 +864,8 @@
|
|
|
835
864
|
line-height: 18px;
|
|
836
865
|
text-align: left;
|
|
837
866
|
`}
|
|
838
|
-
`,_=({children:e,id:
|
|
839
|
-
${({theme:e,$multiSelection:
|
|
867
|
+
`,_=({children:e,disabled:t,id:i,error:o,helpLink:r,helpLinkText:a="Link here",helpText:l,htmlFor:s,label:d,linkPosition:p="down",maxLength:g,required:u,tooltip:f,value:h,weight:y})=>{const m=c.Je(),b=h?h.length:0;return n.jsxs(_i,{id:i,children:[d===void 0?void 0:n.jsx(tt,{htmlFor:s,label:d,link:p==="up"?r:void 0,required:u,tooltip:f,weight:y}),e,o||g?n.jsxs($,{display:"flex",justify:o===void 0?"end":"space-between",width:"100%",children:[o&&n.jsx(I,{className:"error-msg",color:m.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:o}),g&&n.jsx(U,{priority:"low",tagLabel:`${b}/${g}`,variant:t?"inactive":"error"})]}):void 0,l||r?n.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[l&&n.jsxs(n.Fragment,{children:[n.jsx(R,{icon:"circle-info",iconColor:m.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),n.jsx(I,{color:m.palette.gray[400],display:"inline-block",size:"sm",children:l})]}),r&&p==="down"?n.jsx(X,{href:r,children:a}):void 0]}):void 0]})},Ce=({className:e,children:t,isFilter:i=!1,popoverRef:o,state:r,triggerRef:a,...l})=>{var f;const s=c.Je(),d=x.useRef(null),p=(f=a==null?void 0:a.current)==null?void 0:f.getBoundingClientRect(),{popoverProps:g}=c.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:o??d,triggerRef:a,isNonModal:o?!0:void 0,shouldFlip:e==="dropdown"},r),u=x.useCallback(h=>{h.preventDefault()},[]);return n.jsx(c.$337b884510726a0d$export$c6fdb837b070b4ff,{children:n.jsx("div",{...g,className:e,id:"popover",onPointerDown:i?u:void 0,ref:o??d,style:{...g.style,maxHeight:300,overflowY:"auto",scrollbarColor:`${s.palette.gray[600]} ${s.palette.gray[100]}`,scrollPadding:s.spacing[.5],...e==="dropdown"?{display:"flex",justifyContent:"center",width:p==null?void 0:p.width}:{}},children:t})})},Vi=c.st.ul`
|
|
868
|
+
${({theme:e,$multiSelection:t})=>`
|
|
840
869
|
align-self: center;
|
|
841
870
|
background: ${e.palette.white};
|
|
842
871
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -852,11 +881,11 @@
|
|
|
852
881
|
width: 95%;
|
|
853
882
|
|
|
854
883
|
> li:first-child {
|
|
855
|
-
border-bottom: ${
|
|
884
|
+
border-bottom: ${t?`1px solid ${e.palette.gray[200]}`:"unset"};
|
|
856
885
|
}
|
|
857
886
|
`}
|
|
858
|
-
`,
|
|
859
|
-
${({theme:e,$multiSelection:
|
|
887
|
+
`,Ui=c.st.li`
|
|
888
|
+
${({theme:e,$multiSelection:t})=>`
|
|
860
889
|
align-items: center;
|
|
861
890
|
color: ${e.palette.gray[800]};
|
|
862
891
|
cursor: pointer;
|
|
@@ -864,12 +893,12 @@
|
|
|
864
893
|
gap: ${e.spacing[.5]};
|
|
865
894
|
justify-content: space-between;
|
|
866
895
|
line-height: ${e.spacing[1.25]};
|
|
867
|
-
padding: ${
|
|
896
|
+
padding: ${t?`${e.spacing[.125]} ${e.spacing[.75]}`:`${e.spacing[.25]} ${e.spacing[1]}`};
|
|
868
897
|
|
|
869
898
|
a, p, label {
|
|
870
899
|
display: inline-flex;
|
|
871
900
|
overflow: hidden;
|
|
872
|
-
padding: ${
|
|
901
|
+
padding: ${t?e.spacing[.25]:"0"};
|
|
873
902
|
width: 100%;
|
|
874
903
|
}
|
|
875
904
|
|
|
@@ -886,7 +915,7 @@
|
|
|
886
915
|
}
|
|
887
916
|
|
|
888
917
|
&.selected {
|
|
889
|
-
background: ${
|
|
918
|
+
background: ${t?"unset":e.palette.gray[200]};
|
|
890
919
|
}
|
|
891
920
|
|
|
892
921
|
&.disabled {
|
|
@@ -898,7 +927,7 @@
|
|
|
898
927
|
}
|
|
899
928
|
}
|
|
900
929
|
`}
|
|
901
|
-
`,
|
|
930
|
+
`,Gi=c.st.label`
|
|
902
931
|
${({theme:e})=>`
|
|
903
932
|
align-items: center;
|
|
904
933
|
color: ${e.palette.gray[600]};
|
|
@@ -970,7 +999,7 @@
|
|
|
970
999
|
fill: ${e.palette.white};
|
|
971
1000
|
}
|
|
972
1001
|
`}
|
|
973
|
-
`,oe=
|
|
1002
|
+
`,oe=x.forwardRef(function({checked:t,disabled:i=!1,label:o,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:d,tooltip:p,value:g,...u},f){return n.jsxs("div",{className:"gap-1 inline-flex items-start",children:[n.jsxs(Gi,{"aria-disabled":i,children:[n.jsx("input",{"aria-checked":t,"aria-disabled":i,"aria-hidden":!1,"aria-label":r,checked:t,"data-testid":o??g,disabled:i,id:r,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:d,ref:f,type:"checkbox",value:g,...u}),n.jsx(R,{disabled:i,icon:"check",iconSize:"sm"}),o??g]}),p===void 0?void 0:n.jsx(J,{icon:"circle-info",id:p,place:"right",tip:p})]})}),Q=(e,t,i=!1,o)=>{x.useEffect(()=>{var a;const r=l=>{e&&!e.contains(l.target)&&!(o!=null&&o.contains(l.target))&&t()};return i?(document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("mousedown",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("mousedown",r,!0),()=>{var l;(l=document.getElementById("root"))==null||l.removeEventListener("mousedown",r,!0)})},[i,e,o,t])},Nt=({item:e,multiSelection:t,name:i,register:o,setInputValue:r,setValue:a,state:l,watch:s})=>{var z,C,F;const d=c.Je(),p=x.useRef(null),g=e.props.hrefLang,u=l.disabledKeys,f=Array.from(l.collection.getKeys()).filter(T=>!Array.from(u).includes(T)&&T!=="All"),{optionProps:h,isSelected:y,isFocused:m,isDisabled:b}=c.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,p),k=[y?"selected":"",m?"focused":"",b?"disabled":""].join(" "),w=x.useCallback(T=>{r(""),a==null||a(`${i}Options`,""),T.currentTarget.checked&&(r(T.currentTarget.value),a==null||a(`${i}Options`,f))},[f,i,r,a]),v=x.useCallback(()=>{const T=s==null?void 0:s(`${i}Options`),A=typeof T=="string"?[T]:T;c.isEqual(f,A)&&!Array.from(u).includes("All")?(a==null||a("checkAll","All vulnerability types"),r("All vulnerability types")):(a==null||a("checkAll",""),r((A==null?void 0:A.length)<=2?A.join(", "):`${A.slice(0,2).join(", ")+`, +${A.length-2} more`}`))},[u,f,i,r,a,s]),j=e.key==="All"?n.jsx(oe,{...o==null?void 0:o("checkAll",{onChange:w}),label:(z=e.rendered)==null?void 0:z.toString(),name:"checkAll",value:(C=e.rendered)==null?void 0:C.toString()}):n.jsx(oe,{...o==null?void 0:o(`${i}Options`,{onChange:v}),label:(F=e.rendered)==null?void 0:F.toString(),name:`${i}Options`,value:e.key.toString()}),S=t&&!b?j:n.jsx(I,{color:d.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),E=x.useCallback(T=>{var A;T.preventDefault(),r(((A=e.rendered)==null?void 0:A.toString())??""),l.setSelectedKey(e.key),setTimeout(()=>{l.setOpen(!1)},50),Rt(g)},[g,e.key,e.rendered,l,r]);return Q(document.getElementsByClassName("dropdown")[0],()=>{t&&l.close()},!0,document.getElementById("combobox")),n.jsxs(Ui,{...!t&&!g?h:{},$multiSelection:t,className:k,ref:p,children:[g?n.jsx(X,{href:g,onClick:E,children:S}):S,y&&!b&&!t?n.jsx(R,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:n.jsx(U,{tagLabel:e.textValue,variant:"inactive"})]})},_e=({field:e,disabled:t=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:d,name:p,multiSelection:g=!1,items:u,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,tooltip:w,value:v,watch:j,weight:S})=>{var pt;const E=c.Je(),z=t?void 0:o,C=(e==null?void 0:e.value)??v,[F,T]=x.useState(((pt=u.find(L=>L.value===C))==null?void 0:pt.name)??""),[A,G]=x.useState(C),[Y,ie]=x.useState(u),[H,O]=x.useState(!1),{contains:K}=c.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),le=x.useRef(null),Pe=x.useRef(null),Oe=x.useRef(null),Me=x.useRef(null),He=x.useRef(null),_n=x.useMemo(()=>u.toSorted((L,W)=>{const B=Array.from(i??[]),ce=B.includes(L.value),gt=B.includes(W.value);return ce&&!gt?1:!ce&>?-1:0}).map(L=>K(L.name,F)||H?n.jsx(c.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":L.value,hrefLang:L.href,textValue:L.tag,children:L.name},L.value):null),[K,i,F,u,H]),Jn=x.useCallback(L=>{const W=L.split(/,|\s/u).slice(-1)[0].trim();T(g?W:L),L===""||L.endsWith(",")?O(!0):(O(!1),G(B=>{const ce=L===""?"":B;return e&&e.onChange(ce),h&&h(L),ce}),ie(u.filter(B=>K(B.name,g?W:L))))},[K,u,e,g,h]),Vn=x.useCallback(L=>{var W;T(((W=u.find(B=>B.value===L))==null?void 0:W.name)??""),G(L?String(L):""),e&&e.onChange(L),h&&h(L?String(L):""),ie(u)},[u,e,h]),dt=x.useCallback(L=>{L.key==="Enter"&&L.preventDefault(),O(!1)},[]),Un=x.useCallback(()=>{f&&f(),e&&e.onBlur()},[e,f]),Gn=x.useCallback(()=>{O(!0)},[]),V=c.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:g,allowsEmptyCollection:!0,disabledKeys:i,inputValue:F,items:Y,menuTrigger:"focus",shouldCloseOnBlur:!g,selectedKey:A,onBlur:Un,onInputChange:Jn,onKeyDown:dt,onKeyUp:Gn,onOpenChange(L,W){O(L&&(W==="manual"||W==="focus")),L&&setTimeout(()=>{var B;return(B=le.current)==null?void 0:B.focus()},50)},onSelectionChange:g?void 0:Vn,children:_n}),{buttonProps:Yn,inputProps:Kn,listBoxProps:qn}=c.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:F,buttonRef:Pe,id:p,inputRef:le,label:s??p,listBoxRef:Oe,name:p,placeholder:y,popoverRef:He},V),{listBoxProps:Zn}=c.$c132121280ec012d$export$50eacbbf140a3141(qn,V,Oe),{buttonProps:Xn}=c.$701a24aa0da5b062$export$ea18c227d4417cc3(Yn,Pe);return Q(Me.current,()=>{V.isOpen&&!g&&V.close()},!0,He.current),x.useEffect(()=>{var L;if((d===!1||!C)&&!g){const W=((L=u.find(B=>B.value===C))==null?void 0:L.name)??"";T(W),G(W)}},[C,u,d,g]),n.jsxs(_,{error:z,helpLink:r,helpLinkText:a,helpText:l,htmlFor:p,id:"combobox",label:s,required:b,tooltip:w,weight:S,children:[n.jsxs(ne,{className:`${t?"disabled":""} ${z?"error":""}`,ref:Me,children:[n.jsx("input",{...Kn,"aria-invalid":z?"true":"false","aria-label":p,disabled:t,onKeyDown:dt,ref:le}),z?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"xs"}):void 0,n.jsx(M,{...Xn,className:"action",disabled:t,icon:V.isOpen&&!t?"chevron-up":"chevron-down",iconColor:E.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:Pe,type:"button",variant:"ghost"})]}),V.isOpen&&V.collection.size>0&&!t?n.jsx(Ce,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:He,state:V,triggerRef:Me,children:n.jsx(Vi,{...Zn,$multiSelection:g&&!Array.from(i??[]).includes("All"),ref:Oe,children:[...V.collection].map(L=>n.jsx(Nt,{item:L,multiSelection:g,name:p,register:m,setInputValue:T,setValue:k,state:V,watch:j},L.key))})}):null]})},nt=({control:e,disabled:t=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:d,name:p,multiSelection:g,items:u,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,tooltip:w,value:v,watch:j,weight:S})=>e?n.jsx(c.Controller,{control:e,name:p,render:({field:E,fieldState:z})=>{var C;return n.jsx(_e,{disabled:t,disabledKeys:i,error:(C=z.error)==null?void 0:C.message,field:E,helpLink:r,helpLinkText:a,helpText:l,items:u,label:s,loadingItems:d,multiSelection:g,name:p,onBlur:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,tooltip:w,value:v,watch:j,weight:S})},rules:{required:b}}):n.jsx(_e,{disabled:t,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,items:u,label:s,loadingItems:d,multiSelection:g,name:p,onBlur:f,onChange:h,placeholder:y,required:b,tooltip:w,value:v,weight:S}),Yi=c.st.div`
|
|
974
1003
|
${({theme:e})=>`
|
|
975
1004
|
align-items: center;
|
|
976
1005
|
color: ${e.palette.gray[800]};
|
|
@@ -991,7 +1020,7 @@
|
|
|
991
1020
|
display: none;
|
|
992
1021
|
}
|
|
993
1022
|
`}
|
|
994
|
-
`,
|
|
1023
|
+
`,Ki=c.st.div.attrs({className:"year-selection"})`
|
|
995
1024
|
align-items: flex-start;
|
|
996
1025
|
display: flex;
|
|
997
1026
|
flex-direction: column;
|
|
@@ -1023,9 +1052,9 @@
|
|
|
1023
1052
|
text-align: center;
|
|
1024
1053
|
width: ${e.spacing[2.5]};
|
|
1025
1054
|
`}
|
|
1026
|
-
`,
|
|
1055
|
+
`,qi=c.st.th`
|
|
1027
1056
|
${Ft}
|
|
1028
|
-
`,
|
|
1057
|
+
`,Zi=c.st.td`
|
|
1029
1058
|
${({theme:e})=>`
|
|
1030
1059
|
${Ft}
|
|
1031
1060
|
height: ${e.spacing[2.5]};
|
|
@@ -1075,7 +1104,7 @@
|
|
|
1075
1104
|
}
|
|
1076
1105
|
}
|
|
1077
1106
|
`}
|
|
1078
|
-
`,
|
|
1107
|
+
`,Xi=c.st.div.attrs({className:"dot"})`
|
|
1079
1108
|
position: absolute;
|
|
1080
1109
|
top: 48%;
|
|
1081
1110
|
|
|
@@ -1102,9 +1131,9 @@
|
|
|
1102
1131
|
padding: 0 ${e.spacing[.25]};
|
|
1103
1132
|
width: 100%;
|
|
1104
1133
|
`}
|
|
1105
|
-
`,At=({state:e,date:
|
|
1134
|
+
`,At=({state:e,date:t})=>{const i=x.useRef(null),o=c.$14e0f24ef4ac5c92$export$629b0a497aa65267(t,c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:a,isSelected:l,isDisabled:s,formattedDate:d}=c.$36a0ac60f04457c5$export$136073280381448e({date:t},e,i),p="highlightedRange"in e&&!c.lodashExports.isNull(e.highlightedRange)?c.$14e0f24ef4ac5c92$export$ea39ec197993aef0(t,e.highlightedRange.start):l,g="highlightedRange"in e&&!c.lodashExports.isNull(e.highlightedRange)?c.$14e0f24ef4ac5c92$export$ea39ec197993aef0(t,e.highlightedRange.end):l,u=l&&!s&&!(p||g)?"range":"";return n.jsx(Zi,{id:u,...r,children:n.jsxs("div",{...a,className:`cell ${p||g?"selected":""}
|
|
1106
1135
|
${s?"disabled":""} ${o?"today":""}
|
|
1107
|
-
${!e.isFocused&&!o?"focused":""} ${
|
|
1136
|
+
${!e.isFocused&&!o?"focused":""} ${u}`,ref:i,children:[d,o?n.jsx(Xi,{children:n.jsx(R,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},Ne=({state:e,...t})=>{const{locale:i}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{weekDays:o}=c.$e3031d1f8c9d64eb$export$cb95147730a423f5(t,e),r=c.$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(e.visibleRange.start,i);return n.jsxs("table",{children:[n.jsx("thead",{children:n.jsx(ft,{children:o.map((a,l)=>{const s=`key_${l}`;return n.jsx(qi,{children:a},s)})})}),n.jsx("tbody",{children:[...new Array(r).keys()].map(a=>n.jsx(ft,{children:e.getDatesInWeek(a).map((l,s)=>{const d=`key_${s}`;return l?n.jsx(At,{date:l,state:e},d):n.jsx("td",{},d)})},a))})]})},Qi=c.st(Xe)`
|
|
1108
1137
|
align-items: center;
|
|
1109
1138
|
background-color: inherit;
|
|
1110
1139
|
border-color: inherit;
|
|
@@ -1124,7 +1153,7 @@
|
|
|
1124
1153
|
background-color: ${({theme:e})=>e.palette.gray[100]};
|
|
1125
1154
|
cursor: pointer;
|
|
1126
1155
|
}
|
|
1127
|
-
`,
|
|
1156
|
+
`,eo=c.st.div`
|
|
1128
1157
|
${({theme:e})=>`
|
|
1129
1158
|
align-items: flex-start;
|
|
1130
1159
|
background: ${e.palette.white};
|
|
@@ -1138,8 +1167,8 @@
|
|
|
1138
1167
|
padding: ${e.spacing[.25]};
|
|
1139
1168
|
width: 292px;
|
|
1140
1169
|
`}
|
|
1141
|
-
`,
|
|
1142
|
-
${({theme:e,$disabled:
|
|
1170
|
+
`,to=c.st.button`
|
|
1171
|
+
${({theme:e,$disabled:t,$focus:i,$header:o})=>{const r=i?"34px":"40px";return`
|
|
1143
1172
|
align-items: center;
|
|
1144
1173
|
border-radius: ${o?`0 ${e.spacing[.5]} ${e.spacing[.5]} 0`:"4px"};
|
|
1145
1174
|
border-left: inherit;
|
|
@@ -1150,10 +1179,10 @@
|
|
|
1150
1179
|
width: ${o?"38px":"40px"};
|
|
1151
1180
|
|
|
1152
1181
|
&:hover {
|
|
1153
|
-
background-color: ${e.palette.gray[
|
|
1182
|
+
background-color: ${e.palette.gray[t?500:100]};
|
|
1154
1183
|
}
|
|
1155
1184
|
`}}
|
|
1156
|
-
`,
|
|
1185
|
+
`,no=c.st.div`
|
|
1157
1186
|
${({theme:e})=>`
|
|
1158
1187
|
align-items: center;
|
|
1159
1188
|
background: transparent;
|
|
@@ -1164,7 +1193,7 @@
|
|
|
1164
1193
|
justify-content: space-between;
|
|
1165
1194
|
width: calc(100% - 40px);
|
|
1166
1195
|
`}
|
|
1167
|
-
`,
|
|
1196
|
+
`,io=c.st.div`
|
|
1168
1197
|
align-items: center;
|
|
1169
1198
|
display: flex;
|
|
1170
1199
|
justify-content: flex-end;
|
|
@@ -1202,18 +1231,18 @@
|
|
|
1202
1231
|
font-weight: ${e.typography.weight.bold};
|
|
1203
1232
|
}
|
|
1204
1233
|
`}
|
|
1205
|
-
`,Te=({disabled:e=!1,icon:
|
|
1206
|
-
${({theme:e,$disabled:
|
|
1234
|
+
`,Te=({disabled:e=!1,icon:t,props:i})=>{const o=x.useRef(null),{buttonProps:r}=c.$701a24aa0da5b062$export$ea18c227d4417cc3(i,o);return n.jsx(to,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:t==="calendar"||t==="calendar-clock",disabled:e,ref:o,type:"button",children:n.jsx(R,{icon:t,iconColor:D.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Fe=({state:e,prevButtonProps:t,nextButtonProps:i,title:o})=>{const r=e.focusedDate,a=c.Je(),l=x.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),s=x.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return n.jsxs("div",{className:"header flex items-start",style:{position:"sticky",top:0,zIndex:2,background:a.palette.white},children:[n.jsx(Te,{icon:"chevron-left",props:t}),n.jsxs(Yi,{children:[o,n.jsxs(Ki,{children:[n.jsx(ht,{"aria-label":"top",onClick:l,children:n.jsx(R,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),n.jsx(ht,{"aria-label":"bottom",onClick:s,children:n.jsx(R,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),n.jsx(Te,{icon:"chevron-right",props:i})]})},Lt=({onClose:e,props:t})=>{const{locale:i}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=c.$131cf43a05231e1e$export$6d095e787d2b5e1f({...t,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:a,title:l}=c.$9942cad8a072a530$export$3ee915f8151bd4f1(t,o);return n.jsxs("div",{className:"calendar",children:[n.jsx(Fe,{nextButtonProps:a,prevButtonProps:r,state:o,title:l}),n.jsx(Ne,{state:o}),n.jsx(it,{children:n.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Pt=({segment:e,state:t})=>{const i=c.Je(),o=x.useRef(null),a={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=c.$32489daedd52963e$export$1315d136e6f7581(a,t,o),s=i.palette.gray[a.isEditable?800:500];return n.jsx("div",{...a.type!=="literal"&&{...l,className:"segment-cell"},ref:o,style:a.type==="literal"?void 0:{color:a.isPlaceholder?i.palette.gray[400]:s},children:a.isPlaceholder?a.placeholder:a.text})},Ot=({disabled:e,error:t=!1,props:i})=>{const o=c.Je(),r=x.useRef(null),a=c.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=c.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,a,r),s=x.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(u=>u.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return n.jsxs(no,{...l,onClick:s,children:[n.jsx("div",{className:"flex flex-row",style:{color:o.palette.gray[c.lodashExports.isNil(a.value)?400:800]},tabIndex:-1,children:a.segments.map((d,p)=>{const g=`key_${p}`;return n.jsx(Pt,{segment:{...d,isEditable:!e},state:a},g)})}),t?n.jsx(R,{icon:"exclamation-circle",iconColor:o.palette.error[500],iconSize:"xs"}):void 0]})},Mt=e=>{const t=x.useRef(null),i=c.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:o}=i,r=!c.lodashExports.isNil(o)&&o.hour<12?"AM":"PM",[a,l]=x.useState(c.lodashExports.isNil(o)?"AM":r),{fieldProps:s}=c.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,t),d=x.useCallback(p=>{const g=p.currentTarget.name;g!==a&&(c.lodashExports.isNil(o)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[a,i,o]);return n.jsxs(io,{children:[n.jsx(yt,{...s,ref:t,children:i.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return n.jsx(Pt,{segment:p,state:i},u)})}),n.jsxs(yt,{children:[n.jsx(bt,{id:a==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),n.jsx(bt,{id:a==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},Ee=e=>e&&e!=="-"?c.dayjs(e).format("YYYY-MM-DD"):"-",oo=e=>e&&e!=="-"?c.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",$t=(e,t)=>c.dayjs(String(e).replace(/-/gu,"/")).hour(t.hour).minute(t.minute).second(t.second).format("YYYY/MM/DD hh:mm A"),xe=({error:e,buttonProps:t,datePickerRef:i,disabled:o=!1,granularity:r="day",fieldProps:a,groupProps:l,name:s,register:d,required:p,setValue:g,value:u})=>{const f=x.useCallback(h=>{if(!h)return;const y=r==="day"?Ee(String(h)):oo(String(h));a.onChange&&a.onChange(h??null),g&&g(s,y,{shouldDirty:!0})},[a,r,s,g]);return n.jsxs(ne,{...l,className:`${o?"disabled":""} ${e?"error":""}`,ref:i,children:[n.jsx(Ot,{disabled:o,error:e!=null,props:{...a,autoFocus:!1,granularity:r,onChange:f,shouldForceLeadingZeros:!0}}),n.jsx(Te,{disabled:o,icon:r==="minute"?"calendar-clock":"calendar",props:t}),n.jsx("input",{...d==null?void 0:d(s,{required:p}),"aria-label":s,className:"date-input",disabled:o,id:s,name:s,type:"text",value:u??""})]})},Ae=({children:e,...t})=>{const i=x.useRef(null),{dialogProps:o}=c.$40df3f8667284809$export$d55e7ee900f34e93(t,i);return n.jsx(eo,{...o,ref:i,children:e})},Ht=({disabled:e=!1,error:t,helpLink:i,helpLinkText:o,helpText:r,required:a,label:l,name:s,register:d,setValue:p,tooltip:g,watch:u,...f})=>{const h=x.useRef(null),y=u==null?void 0:u(s),m=x.useCallback(z=>{p&&z&&p(s,Ee(String(z)),{shouldDirty:!0})},[s,p]),b=c.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,onChange(z){m(z)},...!c._.isNil(y)&&!c._.isEmpty(y)&&c.dayjs(y).isValid()?{defaultValue:c.$fae977aafc393c5c$export$6b862160d295c8e(y.replace(/\//gu,"-"))}:{}}),{close:k}=b,{groupProps:w,fieldProps:v,buttonProps:j,dialogProps:S,calendarProps:E}=c.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":l??s,name:s},b,h);return n.jsxs(_,{error:e?void 0:t,helpLink:i,helpLinkText:o,helpText:r,htmlFor:s,label:l,required:a,tooltip:g,children:[n.jsx(xe,{buttonProps:j,datePickerRef:h,disabled:e,error:t,fieldProps:v,groupProps:w,name:s,register:d,required:a,setValue:p,value:y}),b.isOpen&&!e?n.jsx(Ce,{offset:8,placement:"bottom start",state:b,triggerRef:h,children:n.jsx(Ae,{...S,children:n.jsx(Lt,{onClose:k,props:E})})}):null]})},Wt=({onClose:e,props:t})=>{const{locale:i}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=x.useRef(null),r=c.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...t,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:l,title:s}=c.$46a4342aab3d8076$export$87e0539f600c24e5(t,r,o);return n.jsxs("div",{className:"calendar-range",ref:o,children:[n.jsx(Fe,{nextButtonProps:l,prevButtonProps:a,state:r,title:s}),n.jsx(Ne,{state:r}),n.jsx(it,{children:n.jsx(P,{onClick:e,variant:"ghost",children:"Cancel"})})]})},ro=c.st.div`
|
|
1235
|
+
${({theme:e,$disabled:t,$show:i})=>`
|
|
1207
1236
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1208
1237
|
display: flex;
|
|
1209
1238
|
gap: ${e.spacing[.25]};
|
|
1210
1239
|
width: 100%;
|
|
1211
1240
|
|
|
1212
1241
|
~ div {
|
|
1213
|
-
background: ${
|
|
1242
|
+
background: ${t?e.palette.gray[200]:e.palette.white};
|
|
1214
1243
|
}
|
|
1215
1244
|
`}
|
|
1216
|
-
`,Bt=({disabled:e=!1,error:
|
|
1245
|
+
`,Bt=({disabled:e=!1,error:t,label:i,name:o,required:r,tooltip:a,register:l,setValue:s,propsMax:d,propsMin:p,variant:g="default",...u})=>{const f=`${o}Max`,h=`${o}Min`,y=x.useRef(null),m=x.useCallback(C=>{s&&C&&(s((d==null?void 0:d.name)??f,Ee(String(C.end))),s((p==null?void 0:p.name)??h,Ee(String(C.start))))},[f,h,s,d,p]),b=c.$93c38a5e28be6249$export$e50a61c1de9f574({...u,endName:(d==null?void 0:d.name)??f,startName:(p==null?void 0:p.name)??h,onChange(C){m(C)}}),{close:k}=b,{groupProps:w,startFieldProps:v,endFieldProps:j,buttonProps:S,dialogProps:E,calendarProps:z}=c.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...u,"aria-label":i??o},b,y);return n.jsxs(_,{error:e?void 0:t,htmlFor:o,label:i,required:r,tooltip:a,children:[n.jsxs(ro,{$disabled:e,$show:t!==void 0,ref:y,style:{flexDirection:g==="filters"?"column":"row"},children:[n.jsx(xe,{buttonProps:S,datePickerRef:y,disabled:e,error:t,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${o}`,validate:C=>j.value&&C>j.value?"Start date must be less than or equal to end date":null},groupProps:w,name:(p==null?void 0:p.name)??h,register:l,setValue:s,value:p==null?void 0:p.value}),n.jsx(xe,{buttonProps:S,datePickerRef:y,disabled:e,error:t,fieldProps:{...j,"aria-label":`${j["aria-label"]} ${o}`,validate:C=>v.value&&C<v.value?"End date must be greater than or equal to start date":null},groupProps:w,name:(d==null?void 0:d.name)??f,register:l,setValue:s,value:d==null?void 0:d.value})]}),b.isOpen&&!e?n.jsx(Ce,{offset:8,placement:"bottom start",state:b,triggerRef:y,children:n.jsx(Ae,{...E,children:n.jsx(Wt,{onClose:k,props:z})})}):null]})},ao=c.st.div`
|
|
1217
1246
|
${({theme:e})=>`
|
|
1218
1247
|
align-items: center;
|
|
1219
1248
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1222,19 +1251,19 @@
|
|
|
1222
1251
|
justify-content: center;
|
|
1223
1252
|
padding: ${e.spacing[.5]} ${e.spacing[1.25]};
|
|
1224
1253
|
`}
|
|
1225
|
-
`,
|
|
1254
|
+
`,so=c.st.div`
|
|
1226
1255
|
align-items: center;
|
|
1227
1256
|
display: flex;
|
|
1228
1257
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1229
1258
|
justify-content: flex-end;
|
|
1230
1259
|
flex: 1 0 0;
|
|
1231
|
-
`,_t=({handleTimeChange:e,onClose:
|
|
1260
|
+
`,_t=({handleTimeChange:e,onClose:t,props:i,timeState:o})=>{const r=c.Je(),{locale:a}=c.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=c.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:c.$64244302c3013299$export$dd0bbc9b26defe37,locale:a}),{prevButtonProps:s,nextButtonProps:d,title:p}=c.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return n.jsxs("div",{className:"calendar",children:[n.jsx(Fe,{nextButtonProps:d,prevButtonProps:s,state:l,title:p}),n.jsx(Ne,{state:l}),n.jsxs(ao,{children:[n.jsx(I,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),n.jsx(so,{children:n.jsx(Mt,{hourCycle:12,label:"time-field",onChange:e,value:o.timeValue})})]}),n.jsx(it,{children:n.jsx(P,{onClick:t,variant:"ghost",children:"Cancel"})})]})},lo=e=>{const{disabled:t=!1,error:i,required:o,label:r,name:a,tooltip:l,register:s,setValue:d,watch:p}=e,g=p==null?void 0:p(a),u=x.useRef(null),f=c.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:t,isRequired:o,shouldCloseOnSelect:!1,value:c._.isNil(g)||c._.isEmpty(g)||g==="-"||c.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:c.$fae977aafc393c5c$export$588937bcd60ade55(c.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=f,{groupProps:y,fieldProps:m,buttonProps:b,dialogProps:k,calendarProps:w}=c.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,u),v=x.useCallback(S=>{if(w.onChange&&w.onChange(S),f.timeValue){const E=$t(S,f.timeValue);d==null||d(a,E,{shouldDirty:!0})}else f.setDateValue(S)},[w,a,d,f]),j=x.useCallback(S=>{if(S){f.setTimeValue(S);const E=f.dateValue;if(E){const z=$t(E,S);d==null||d(a,z,{shouldDirty:!0})}}},[f,d,a]);return n.jsxs(_,{error:t?void 0:i,htmlFor:a,label:r,required:o,tooltip:l,children:[n.jsx(xe,{buttonProps:b,datePickerRef:u,disabled:t,error:i,fieldProps:m,granularity:"minute",groupProps:y,name:a,register:s,setValue:d,value:g}),f.isOpen&&!t?n.jsx(Ce,{offset:8,placement:"bottom start",state:f,triggerRef:u,children:n.jsx(Ae,{...k,children:n.jsx(_t,{handleTimeChange:j,onClose:h,props:{...w,onChange:v},timeState:f})})}):null]})},co=({children:e,currentValue:t,externalLink:i,isEditing:o,label:r,name:a,tooltip:l})=>{if(o)return n.jsx("div",{children:e});const s=c.lodashExports.isNil(t)?"":t,d=String(i??s);return n.jsxs($,{children:[n.jsx(tt,{htmlFor:a,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?n.jsx(X,{href:d,children:s}):n.jsx(I,{size:"md",children:s})]})},Le=({disabled:e=!1,hasIcon:t=!1,helpLink:i,helpLinkText:o,helpText:r,error:a,id:l,indexArray:s=0,isValid:d,isTouched:p,label:g,name:u,maskValue:f=!1,onPaste:h,placeholder:y,removeItemArray:m,register:b,suggestions:k,tooltip:w,type:v="text",weight:j,...S})=>{const{required:E,onBlur:z,onChange:C}=S,F=c.Je(),T=e?void 0:a,[A,G]=x.useState(""),Y=x.useCallback(O=>{G(O.target.value),C==null||C(O)},[C]),ie=d&&p&&!e&&A.trim()!=="",H=x.useCallback(O=>{O.key==="Enter"&&O.preventDefault()},[]);return n.jsxs(_,{error:T,helpLink:i,helpLinkText:o,helpText:r,htmlFor:u,label:g,required:E,tooltip:w,weight:j,children:[n.jsxs(ne,{className:`
|
|
1232
1261
|
${e?"disabled":""} ${T?"error":""} ${ie?"success":""}
|
|
1233
|
-
`,children:[n
|
|
1262
|
+
`,children:[t?n.jsx(R,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,n.jsx("input",{"aria-hidden":!1,"aria-invalid":T?"true":"false","aria-label":u,"aria-required":E,autoComplete:"off",className:f?"sr-block":"","data-testid":`${u}-input`,disabled:e,id:u,list:k?`list_${u}`:void 0,onKeyDown:H,onPaste:h,placeholder:y,type:v,...b?b(u,{required:E,onBlur:z,onChange:Y}):{...S,onChange:Y}}),T?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:F.palette.error[500],iconSize:"xs"}):void 0,ie?n.jsx(R,{icon:"check-circle",iconClass:"success-icon",iconColor:F.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&s>0?n.jsx(M,{color:F.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:m?m(s):void 0,variant:"ghost"}):void 0]}),k?n.jsx("datalist",{id:`list_${u}`,children:k.map(O=>n.jsx("option",{value:O},O))}):void 0]})},po=c.st.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,go=c.st.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1234
1263
|
gap: 12px;
|
|
1235
|
-
`,
|
|
1264
|
+
`,uo=c.st.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1236
1265
|
gap: 8px;
|
|
1237
|
-
`,Ie=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,
|
|
1266
|
+
`,Ie=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,xo=c.st.div.attrs({className:"comp-col"})`
|
|
1238
1267
|
word-wrap: break-word;
|
|
1239
1268
|
|
|
1240
1269
|
${({$width:e=null})=>e===null?"":`width: ${e}`};
|
|
@@ -1258,24 +1287,24 @@
|
|
|
1258
1287
|
> .comp-card {
|
|
1259
1288
|
height: 100%;
|
|
1260
1289
|
}
|
|
1261
|
-
`,Je=({children:e,xl:
|
|
1262
|
-
${({$disp:e="flex",$mh:
|
|
1290
|
+
`,Je=({children:e,xl:t,lg:i,md:o,sm:r,paddingTop:a,width:l})=>n.jsx(xo,{$lg:i,$md:o,$paddingTop:a,$sm:r,$width:l,$xl:t,children:e}),fo=c.st.div.attrs({className:"comp-gap"})`
|
|
1291
|
+
${({$disp:e="flex",$mh:t=4,$mv:i=4})=>`
|
|
1263
1292
|
align-items: center;
|
|
1264
1293
|
display: ${e};
|
|
1265
|
-
margin: ${-i}px ${-
|
|
1294
|
+
margin: ${-i}px ${-t}px;
|
|
1266
1295
|
|
|
1267
1296
|
> * {
|
|
1268
|
-
margin: ${i}px ${
|
|
1297
|
+
margin: ${i}px ${t}px;
|
|
1269
1298
|
}
|
|
1270
1299
|
`}
|
|
1271
|
-
`,
|
|
1272
|
-
${({$align:e="stretch",$cols:
|
|
1300
|
+
`,ho=({children:e,disp:t,mh:i,mv:o})=>n.jsx(fo,{$disp:t,$mh:i,$mv:o,children:e}),yo=c.st.div.attrs({className:"comp-row flex flex-row flex-wrap"})`
|
|
1301
|
+
${({$align:e="stretch",$cols:t=100,$colsPadding:i=6,$justify:o="start"})=>`
|
|
1273
1302
|
align-items: ${e};
|
|
1274
1303
|
justify-content: ${o};
|
|
1275
1304
|
margin: -6px;
|
|
1276
1305
|
text-align: ${o};
|
|
1277
1306
|
|
|
1278
|
-
--cols: ${
|
|
1307
|
+
--cols: ${t};
|
|
1279
1308
|
|
|
1280
1309
|
> *:not(.comp-col) {
|
|
1281
1310
|
width: 100%;
|
|
@@ -1286,24 +1315,24 @@
|
|
|
1286
1315
|
padding: ${i}px;
|
|
1287
1316
|
}
|
|
1288
1317
|
`}
|
|
1289
|
-
`,Jt=({align:e,children:
|
|
1318
|
+
`,Jt=({align:e,children:t,cols:i,colsPadding:o,justify:r})=>n.jsx(yo,{$align:e,$cols:i,$colsPadding:o,$justify:r,children:t}),Ve=({addText:e,append:t,disabled:i=!1,fields:o,fieldState:r,initValue:a="",index:l=0,required:s,label:d,max:p=100,name:g,onBlur:u,onChange:f,placeholder:h,tooltip:y,remove:m,value:b})=>{var v;const k=x.useCallback(()=>{t==null||t(a)},[t,a]),w=x.useCallback(j=>()=>{m==null||m(j)},[m]);return n.jsxs(Jt,{align:"start",children:[n.jsx(Je,{lg:75,md:75,sm:75,children:n.jsx(Le,{disabled:i,error:r?(v=r.error)==null?void 0:v.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:d,name:g,onBlur:u,onChange:f,placeholder:h,removeItemArray:w,required:s,tooltip:y,value:b})}),l<p-1&&l+1===(o==null?void 0:o.length)?n.jsx(Je,{lg:25,md:25,sm:25,children:n.jsx(P,{disabled:i,icon:"plus",onClick:k,variant:"ghost",width:"max-content",children:e??"Add"})}):void 0]})},bo=({addText:e,append:t,control:i,disabled:o,fields:r,initValue:a="",required:l,label:s,max:d=void 0,name:p="array-field",onChange:g,placeholder:u,remove:f,tooltip:h})=>i&&r?n.jsx(x.Fragment,{children:r.map((y,m)=>n.jsx(c.Controller,{control:i,name:`${p}.${m}`,render:({field:b,fieldState:k})=>n.jsx(Ve,{addText:e,append:t,disabled:o,fieldState:k,fields:r,index:m,initValue:a,label:s,max:d,name:b.name,onBlur:b.onBlur,onChange:g??b.onChange,placeholder:u,remove:f,required:l,tooltip:h,value:typeof b.value=="object"?b.value.value:b.value}),index:m},y.id))}):n.jsx(Ve,{addText:e,disabled:o,initValue:a,label:s,max:d,name:p,onChange:g,placeholder:u,required:l,tooltip:h}),$o=c.st(zt)`
|
|
1290
1319
|
white-space: nowrap;
|
|
1291
1320
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1292
1321
|
text-overflow: ellipsis;
|
|
1293
1322
|
overflow: hidden;
|
|
1294
1323
|
max-width: 80%;
|
|
1295
|
-
|
|
1324
|
+
`,mo=c.st.input`
|
|
1296
1325
|
opacity: 0;
|
|
1297
1326
|
position: absolute;
|
|
1298
1327
|
visibility: hidden;
|
|
1299
1328
|
width: 0;
|
|
1300
|
-
`,fe=(e,
|
|
1329
|
+
`,fe=(e,t,i)=>{const o=new Event(e);return Object.defineProperty(o,"target",{value:{name:t,value:i}}),o},wo=e=>{const t=e;return t?Array.from(t).map(i=>i.name).join(", "):""},vo=({accept:e,disabled:t=!1,error:i,label:o,helpLink:r,helpText:a,id:l,multiple:s,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:y,weight:m})=>{const b=c.Je(),k=t?void 0:i,w=x.useRef(null),v=u==null?void 0:u(d,{required:g}),j=y==null?void 0:y(d),S=wo(j),E=x.useCallback(()=>{const F=fe("change",d,void 0);f&&f(d,void 0),v&&v.onChange(F)},[v,d,f]),z=x.useCallback(F=>{const{files:T}=F.currentTarget,A=fe("change",d,T&&T.length>0?T:void 0);T&&T.length>0&&(p==null||p(A),f&&f(d,T),v&&v.onChange(A))},[v,d,p,f]),C=x.useCallback(F=>{t?F.preventDefault():w.current&&w.current.click()},[t]);return n.jsxs(_,{error:k,helpLink:r,helpText:a,htmlFor:l??d,label:o,required:g,tooltip:h,weight:m,children:[n.jsxs(ne,{className:`${t?"disabled":""} ${k?"error":""}`,children:[n.jsx($o,{$size:"xs",children:S}),n.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[c.lodashExports.isEmpty(S)||t?void 0:n.jsx(M,{color:b.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:E,variant:"ghost",width:"20px"}),k&&n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),n.jsxs(P,{border:t?`1px solid ${b.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:t,height:"40px",onClick:C,variant:"primary",width:"96px",children:[n.jsx(R,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),n.jsx(mo,{...v,accept:e,"aria-label":d,"data-testid":d,disabled:t,id:l??d,multiple:s,name:d,onChange:z,ref:w,type:"file"})]})},jo=c.st.input`
|
|
1301
1330
|
border: none;
|
|
1302
1331
|
background: transparent;
|
|
1303
1332
|
min-width: 15rem;
|
|
1304
1333
|
padding: 0;
|
|
1305
1334
|
flex: 1;
|
|
1306
|
-
`,Ue=({disabled:e=!1,error:
|
|
1335
|
+
`,Ue=({disabled:e=!1,error:t,field:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>{const m=c.Je(),b=e?void 0:t,[k,w]=x.useState(""),v=d?h:i==null?void 0:i.value,j=x.useMemo(()=>v&&typeof v=="string"?v.split(",").filter(Boolean):[],[v]),S=x.useCallback(T=>{const G=[...new Set(T.filter(Boolean))].join(","),Y=fe("change",s,G);i&&i.onChange(Y),d&&d(Y)},[i,s,d]),E=x.useCallback(T=>{w(T.target.value)},[]),z=x.useCallback(T=>{const A=k.trim();A.length&&!j.includes(A)&&(T.preventDefault(),S([...j,A]),w("")),i&&i.onBlur()},[k,i,S,j]),C=x.useCallback(T=>{const A=k.trim();T.key==="Enter"&&A.length===0&&T.preventDefault(),["Enter",","].includes(T.key)&&A.length>0&&!j.includes(A)?(T.preventDefault(),S([...j,A]),w("")):T.key==="Backspace"&&!A.length&&j.length&&(T.preventDefault(),p==null||p(j[j.length-1]),S(j.slice(0,-1)))},[k,p,S,j]),F=x.useCallback(T=>()=>{p==null||p(T),S(j.filter(A=>A!==T))},[p,S,j]);return n.jsx(_,{error:b,helpLink:o,helpLinkText:r,helpText:a,htmlFor:s,label:l,required:u,tooltip:f,weight:y,children:n.jsxs(ne,{$overflowX:"auto",className:`${e?"disabled":""} ${b?"error":""}`,children:[j.map(T=>n.jsx(U,{disabled:e,onClose:F(T),tagLabel:T},T)),n.jsx(jo,{"aria-hidden":!1,"aria-invalid":b?"true":"false","aria-label":s,"aria-required":u,autoComplete:"off",id:s,onBlur:z,onChange:E,onKeyDown:C,placeholder:j.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:k}),b?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}):void 0]})})},ko=({disabled:e=!1,control:t,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>t?n.jsx(c.Controller,{control:t,name:s,render:({field:m})=>n.jsx(Ue,{disabled:e,error:i,field:m,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onRemove:p,placeholder:g,required:u,tooltip:f,weight:y}),rules:{required:u}}):n.jsx(Ue,{disabled:e,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y}),Ge=x.forwardRef(function({disabled:t,icon:i,margin:o,onClick:r,...a},l){return n.jsx(Qi,{$margin:o,"aria-label":i,className:"action-btn",disabled:t,onClick:r,ref:l,type:"button",...a,children:n.jsx(R,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Re=({error:e,decimalPlaces:t=0,disabled:i=!1,id:o,maxLength:r,max:a=1/0,min:l=0,name:s,onChange:d,placeholder:p,register:g,required:u,setValue:f,value:h})=>{const y=c.Je(),m=i?void 0:e,b=t<0?0:t,[k,w]=x.useState(h?c._.toNumber(h):0),v=x.useCallback(()=>{const z=(k-10**-b).toFixed(b),C=Math.max(Number(l),Number(z));f&&f(s,C,{shouldDirty:!0}),w(C);const F=fe("change",s,z);d&&d(F)},[k,b,l,f,s,d]),j=x.useCallback(()=>{const z=(k+10**-b).toFixed(b),C=Math.min(Number(a),Number(z)>Number(l)?Number(z):Number(l));f&&f(s,C,{shouldDirty:!0}),w(C);const F=fe("change",s,z);d&&d(F)},[k,b,a,l,f,s,d]),S=x.useCallback(z=>{const{value:C}=z.target,F=/\d+/u.test(C)&&!c._.isEmpty(C);f&&f(s,F?C:void 0),d&&d(z),w(Number(C))},[s,d,f]),E=x.useCallback(z=>{z.key==="Enter"&&z.preventDefault()},[]);return n.jsxs(ne,{className:`${i?"disabled":""} ${m?"error":""}`,children:[n.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":s,"aria-required":u,autoComplete:"off",disabled:i,id:o??s,max:a,min:l,onChange:S,onKeyDown:E,placeholder:p,required:u,step:10**-b,type:"number",value:k,...g==null?void 0:g(s,{maxLength:r,max:a,min:l,onChange:S,value:h,valueAsNumber:!0})}),m&&n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}),n.jsx(Ge,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:v,px:.75,py:.75}),n.jsx(Ge,{borderRadius:`0 ${y.spacing[.5]} ${y.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:j,px:.75,py:.75})]})},Vt=({decimalPlaces:e,disabled:t=!1,error:i,helpLink:o,helpLinkText:r,helpText:a,id:l,label:s,linkPosition:d,maxLength:p,max:g,min:u,name:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,tooltip:w,value:v,watch:j,weight:S})=>n.jsx(_,{error:t?void 0:i,helpLink:o,helpLinkText:r,helpText:a,htmlFor:f,label:s,linkPosition:d,maxLength:p,required:b,tooltip:w,weight:S,children:n.jsx(Re,{decimalPlaces:e,disabled:t,error:i,id:l,max:g,maxLength:p,min:u,name:f,onChange:h,placeholder:y,register:m,required:b,setValue:k,value:j?j(f):v})}),Ut=({disabled:e=!1,error:t,name:i,label:o,propsMax:r,propsMin:a,required:l,tooltip:s,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return n.jsx(_,{error:e?void 0:t,htmlFor:i,label:o,required:l,tooltip:s,children:n.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[n.jsx(Re,{...a,disabled:e,error:t,name:(a==null?void 0:a.name)??g}),n.jsx(Re,{...r,disabled:e,error:t,name:(r==null?void 0:r.name)??p})]})})},Co=c.st.div`
|
|
1307
1336
|
${({theme:e})=>`
|
|
1308
1337
|
align-items: flex-start;
|
|
1309
1338
|
align-self: stretch;
|
|
@@ -1343,7 +1372,7 @@
|
|
|
1343
1372
|
}
|
|
1344
1373
|
}
|
|
1345
1374
|
`}
|
|
1346
|
-
`,
|
|
1375
|
+
`,So=c.st.button`
|
|
1347
1376
|
${({theme:e})=>`
|
|
1348
1377
|
align-items: center;
|
|
1349
1378
|
background: inherit;
|
|
@@ -1359,7 +1388,7 @@
|
|
|
1359
1388
|
cursor: not-allowed;
|
|
1360
1389
|
}
|
|
1361
1390
|
`}
|
|
1362
|
-
`,
|
|
1391
|
+
`,zo=c.st.ul`
|
|
1363
1392
|
${({theme:e})=>`
|
|
1364
1393
|
align-items: flex-start;
|
|
1365
1394
|
box-shadow: ${e.shadows.md};
|
|
@@ -1373,7 +1402,7 @@
|
|
|
1373
1402
|
scrollbar-width: thin;
|
|
1374
1403
|
width: max-content;
|
|
1375
1404
|
`}
|
|
1376
|
-
`,
|
|
1405
|
+
`,Io=c.st.li`
|
|
1377
1406
|
${({theme:e})=>`
|
|
1378
1407
|
align-items: center;
|
|
1379
1408
|
background: ${e.palette.white};
|
|
@@ -1390,22 +1419,22 @@
|
|
|
1390
1419
|
background: ${e.palette.gray[100]};
|
|
1391
1420
|
}
|
|
1392
1421
|
`}
|
|
1393
|
-
`,
|
|
1422
|
+
`,To=c.st.p`
|
|
1394
1423
|
color: ${({theme:e})=>e.palette.gray[800]};
|
|
1395
1424
|
font-size: inherit;
|
|
1396
1425
|
min-width: 55%;
|
|
1397
1426
|
overflow: hidden;
|
|
1398
1427
|
text-overflow: ellipsis;
|
|
1399
1428
|
white-space: nowrap;
|
|
1400
|
-
`,
|
|
1401
|
-
${e?"disabled":""} ${
|
|
1402
|
-
`,children:[
|
|
1429
|
+
`,Eo=({disabled:e,error:t,label:i,name:o,placeholder:r,required:a,register:l,tooltip:s,value:d,watch:p,weight:g})=>{const u=c.Je(),f=x.useRef(null),h=e?void 0:t,y=(p==null?void 0:p(o))??d,[m,b]=x.useState(!1),[k,w]=x.useState(""),{refs:v,floatingStyles:j}=c.useFloating$1({placement:"bottom-start",whileElementsMounted:c.autoUpdate}),{inputRef:S,inputValue:E,handlePhoneValueChange:z,country:C,setCountry:F}=c.ee({countries:c.R,defaultCountry:"co",forceDialCode:!0,value:y?String(y):""}),T=x.useCallback(H=>{H.key==="Enter"&&H.preventDefault()},[]),A=x.useCallback(H=>{H.preventDefault(),b(O=>!O),m||w("")},[m]),G=x.useCallback(H=>()=>{F(H),b(!1),w("")},[F,b]),Y=x.useCallback(H=>{H.key.length===1?w(O=>O+H.key):H.key==="Backspace"&&w(O=>O.slice(0,-1))},[]),ie=c.R.filter(H=>{const{name:O}=c.M(H);return O.toLowerCase().includes(k.toLowerCase())});return Q(v.floating.current,()=>{b(!1),w("")},!0),n.jsx(_,{error:h,htmlFor:o,label:i,required:a,tooltip:s,weight:g,children:n.jsxs(Co,{className:`${e?"disabled":""} ${h?"error":""}`,ref:f,children:[n.jsxs(So,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:A,onKeyDown:Y,ref:v.setReference,children:[n.jsx(c.q,{iso2:C.iso2,size:"16px"}),n.jsx(R,{icon:"angle-down",iconColor:u.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),n.jsxs(ne,{className:`${e?"disabled":""} ${h?"error":""}`,children:[n.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":o,"aria-required":a,autoComplete:"off","data-testid":`${o}-input`,disabled:e,id:o,name:o,onKeyDown:T,placeholder:r,ref:S,type:"tel",value:E,...l==null?void 0:l(o,{required:a,onChange:z})}),h?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"xs"}):void 0]}),m&&se.createPortal(n.jsx(zo,{ref:v.setFloating,style:j,children:ie.map(H=>{const{dialCode:O,iso2:K,name:le}=c.M(H);return n.jsxs(Io,{onClick:G(K),value:K,children:[n.jsx(c.q,{iso2:K,size:"16px"}),n.jsx(To,{children:le}),n.jsx(I,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+O})]},K)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Ro=({disabled:e=!1,error:t,helpLink:i,helpLinkText:o,helpText:r,isTouched:a,isValid:l,label:s,name:d="input-text",id:p,maskValue:g=!1,maxLength:u,onBlur:f,placeholder:h,register:y,required:m,rows:b,tooltip:k,watch:w,weight:v,value:j})=>{const S=c.Je(),E=(w==null?void 0:w(d))??j,z=l&&a&&!e,C=e?void 0:t;return n.jsx(_,{disabled:e,error:C,helpLink:i,helpLinkText:o,helpText:r,htmlFor:d,label:s,maxLength:u,required:m,tooltip:k,value:E?String(E):void 0,weight:v,children:n.jsxs(ne,{className:`
|
|
1430
|
+
${e?"disabled":""} ${C?"error":""} ${z?"success":""}
|
|
1431
|
+
`,children:[n.jsx("textarea",{"aria-hidden":!1,"aria-invalid":C?"true":"false","aria-label":d,"aria-required":m,className:g?"sr-block":"","data-testid":`${d}-text-area`,disabled:e,id:p??d,maxLength:u,placeholder:h,rows:b,value:E,...y==null?void 0:y(d,{required:m,onBlur:f})}),C?n.jsx(R,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:S.palette.error[500],iconSize:"xs"}):void 0,z?n.jsx(R,{icon:"check-circle",iconClass:"success-icon",iconColor:S.palette.success[500],iconSize:"xs"}):void 0]})})},Do=({control:e,description:t,disabled:i,id:o,items:r,align:a,inputType:l="text",inputNumberProps:s,minHeight:d,minWidth:p,name:g,placeholder:u,textAlign:f,tooltip:h,title:y,value:m,isTouched:b,isValid:k,error:w,onChange:v,register:j,setValue:S,watch:E})=>{const z=x.useMemo(()=>{if(l==="text")return n.jsx(Le,{disabled:i,error:w,isTouched:b,isValid:k,name:g,placeholder:u,register:j});if(l==="date")return n.jsx(Ht,{disabled:i,error:w,name:g,register:j,setValue:S,watch:E});if(l==="select"&&r)return n.jsx(nt,{control:e,disabled:i,items:r,name:g,placeholder:u,value:m});const{decimalPlaces:C,max:F,min:T}=s??{};return n.jsx(Vt,{decimalPlaces:C,disabled:i,error:w,max:F,min:T,name:g,onChange:v,placeholder:u,register:j,setValue:S,value:m,watch:E})},[e,i,w,s,l,b,k,r,g,v,u,j,S,m,E]);return n.jsxs(Bi,{$align:a,$minHeight:d,$minWidth:p,children:[n.jsx(De,{description:t,id:o,textAlign:f,title:y,tooltip:h}),z]})},No=c.st.div`
|
|
1403
1432
|
display: flex;
|
|
1404
1433
|
align-self: flex-start;
|
|
1405
1434
|
margin-left: auto;
|
|
1406
1435
|
width: 40px;
|
|
1407
1436
|
height: auto;
|
|
1408
|
-
`,Gt=(e,
|
|
1437
|
+
`,Gt=(e,t)=>{const[o,r]=x.useState(0),[a,l]=x.useState(0);return x.useEffect(()=>{a===100&&(()=>{r(d=>d===t-1?0:d+1)})()},[a,t]),x.useEffect(()=>{const s=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(s)}},[e]),{cycle:o,progress:a,setCycle:r,setProgress:l}},Yt=({publicId:e,format:t="webp"})=>{const i=x.useMemo(()=>new c.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return x.useMemo(()=>i.image(e).format(t),[i,e,t])},Se=e=>{const[t,i]=x.useState(!1),o=x.useCallback(()=>{i(!0)},[]),r=x.useCallback(()=>{i(!1)},[]),a=x.useCallback(()=>{i(l=>!l)},[]);return{close:r,isOpen:t,name:e,open:o,setIsOpen:i,toggle:a}},Fo=e=>e.reduce((t,i)=>({...t,[i.id]:i.visible}),{}),Kt=({name:e,items:t,columnOrder:i,setColumnOrder:o,setColumnVisibility:r})=>{const a=x.useMemo(()=>[...t.filter(({locked:u})=>u).map(({locked:u,...f})=>({...f,visible:!0,locked:u})),...t.filter(({locked:u})=>!u)],[t]),[l,s]=x.useState(a),d=x.useCallback(u=>{const f=u.filter(({locked:b})=>!b),y=[...u.filter(({locked:b})=>b),...f],m=y.map(({name:b})=>b);s(b=>[...y,...b.filter(({name:k})=>!m.includes(k))]),o&&o(y.map(({id:b})=>b))},[o]),p=x.useCallback(()=>{const u=l.map(f=>({...f,visible:f.locked||((i==null?void 0:i.includes(f.id))??!1)})).toSorted((f,h)=>{if(f.locked&&!h.locked)return-1;if(!f.locked&&h.locked)return 1;if(Number(h.visible)!==Number(f.visible))return Number(h.visible)-Number(f.visible);const y=(i==null?void 0:i.indexOf(f.id))??0,m=(i==null?void 0:i.indexOf(h.id))??0;return y-m});r==null||r(Fo(u)),d(u)},[l,i,d,r]),g=x.useMemo(()=>c.some(l,u=>((i==null?void 0:i.includes(u.id))??!1)!==u.visible),[l,i]);return{setColumns:d,resetToDefault:p,columns:l,...Se(e),hasChanged:g}},ot=(e,t)=>x.useMemo(()=>c._.debounce(e,t),[e,t]),Ao=e=>{const[t,i]=x.useState(),o=ot(r=>{i(r)},(e==null?void 0:e.debounceWait)??300);return[t,o]},Lo=({alt:e="img",height:t="",width:i="",plugins:o=[c.lazyload(),c.placeholder()],publicId:r})=>{const a=Yt({publicId:r});return n.jsx(c.AdvancedImage,{alt:e,cldImg:a,height:t,plugins:o,width:i})},te=x.memo(Lo),Po=c.st.label`
|
|
1409
1438
|
${({theme:e})=>`
|
|
1410
1439
|
align-items: center;
|
|
1411
1440
|
display: flex;
|
|
@@ -1484,7 +1513,7 @@
|
|
|
1484
1513
|
}
|
|
1485
1514
|
|
|
1486
1515
|
`}
|
|
1487
|
-
`,
|
|
1516
|
+
`,Oo=c.st.span.attrs({className:"checkmark"})``,rt=x.forwardRef(function({checked:t,disabled:i=!1,label:o,name:r,onChange:a,onClick:l,value:s,...d},p){return n.jsxs(Po,{"aria-disabled":i,"aria-label":o??r,role:"radiogroup",children:[n.jsx("input",{"aria-checked":t,"aria-disabled":i,"aria-label":o??r,checked:t,disabled:i,name:r,onChange:a,onClick:l,ref:p,type:"radio",value:s,...d}),n.jsx(Oo,{}),o??null]})}),Mo=({alt:e,customDescription:t,imageId:i,icon:o,selectorProps:r,onClick:a,register:l,bgColor:s,title:d,isATag:p=!1,width:g="fit-content"})=>{const u=c.Je();return n.jsxs($,{alignItems:"center",bgColor:s??"",border:`1px solid ${u.palette.gray[200]}`,borderColorHover:u.palette.gray[600],borderRadius:u.spacing[.25],display:"inline-flex",pr:p?1:0,shadowHover:"md",width:g,children:[n.jsxs($,{display:"inline-flex",padding:[1,1,1,1],children:[n.jsx($,{alignSelf:"start",display:"flex",width:"fit-content",children:n.jsx(rt,{defaultChecked:r.defaultChecked,name:r.name,onClick:a,value:r.value,...l==null?void 0:l(r.name)})}),n.jsxs($,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[!p&&i!==void 0&&n.jsx(te,{alt:e??"card image",height:"32px",publicId:i,width:"32px"}),o===void 0?void 0:n.jsx(R,{icon:o,iconSize:"sm",iconType:"fa-light"}),n.jsxs($,{display:"flex",flexDirection:"column",width:"100%",children:[n.jsx(I,{color:u.palette.gray[800],fontWeight:"bold",size:"sm",children:d}),t===void 0?void 0:n.jsx($,{children:t})]})]})]}),p&&n.jsx(No,{children:n.jsx(te,{alt:e??"tag image",height:"40px",publicId:i??"tag image",width:"40px"})})]})},de=c.st.div`
|
|
1488
1517
|
${({theme:e})=>`
|
|
1489
1518
|
align-items: center;
|
|
1490
1519
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1496,7 +1525,7 @@
|
|
|
1496
1525
|
transition: 0.2s;
|
|
1497
1526
|
width: 36px;
|
|
1498
1527
|
`}
|
|
1499
|
-
`,
|
|
1528
|
+
`,Ho=c.st.div`
|
|
1500
1529
|
${({theme:e})=>`
|
|
1501
1530
|
background-color: ${e.palette.white};
|
|
1502
1531
|
border-radius: 50%;
|
|
@@ -1507,7 +1536,7 @@
|
|
|
1507
1536
|
width: ${e.spacing[1]};
|
|
1508
1537
|
z-index: 1;
|
|
1509
1538
|
`}
|
|
1510
|
-
`,
|
|
1539
|
+
`,Wo=c.st.label`
|
|
1511
1540
|
display: inline-block;
|
|
1512
1541
|
|
|
1513
1542
|
input {
|
|
@@ -1534,37 +1563,37 @@
|
|
|
1534
1563
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1535
1564
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1536
1565
|
}
|
|
1537
|
-
`,qt=
|
|
1566
|
+
`,qt=x.forwardRef(function({defaultChecked:t,disabled:i=!1,justify:o,name:r,leftDescription:a,leftDescriptionMinWidth:l,rightDescription:s,onChange:d,...p},g){const u=t===!0?"on":"off",f=typeof a=="object"&&a.on&&a.off?a[u]:a,h=x.useCallback(y=>{y.stopPropagation()},[]);return n.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:o,children:[n.jsx($,{minWidth:l,children:f}),n.jsxs(Wo,{onClick:h,role:"switch",children:[n.jsx("input",{...p,"aria-disabled":i,"aria-label":r,checked:t===!0,disabled:i,name:r,onChange:d,ref:g,type:"checkbox"}),n.jsx(de,{"aria-label":"Toggle Switch",id:`${r}Toggle`,children:n.jsx(Ho,{})})]}),s]})}),Bo=({id:e,title:t,toggles:i,minWidth:o="auto",height:r="auto"})=>{const a=c.Je();return n.jsxs($,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${a.palette.gray[200]}`,borderRadius:a.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:r,justify:"center",minHeight:"100px",minWidth:o,padding:[1.25,1.25,1.25,1.25],children:[n.jsx(De,{id:e,title:t}),n.jsx($,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:i.map(l=>n.jsx(qt,{...l},`$card-toggle-${l.name}`))})]})},_o=.5,mt=1.25,Jo=({children:e,bgColor:t,border:i,gap:o=_o,px:r=mt,py:a=mt,...l})=>{const s=c.Je();return n.jsx($,{bgColor:t??s.palette.white,border:i??`1px solid ${s.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:"column",gap:o,px:r,py:a,...l,children:e})},Vo=c.st.div`
|
|
1538
1567
|
position: relative;
|
|
1539
1568
|
margin: auto;
|
|
1540
1569
|
overflow: hidden;
|
|
1541
|
-
`,
|
|
1570
|
+
`,Uo=c.st.div`
|
|
1542
1571
|
display: flex;
|
|
1543
1572
|
transition: transform 0.5s ease-in-out;
|
|
1544
1573
|
transform: translateX(
|
|
1545
1574
|
${({$currentIndex:e})=>-e*100}%
|
|
1546
1575
|
);
|
|
1547
|
-
`,
|
|
1576
|
+
`,Go=c.st.div`
|
|
1548
1577
|
align-items: center;
|
|
1549
1578
|
display: flex;
|
|
1550
1579
|
justify-content: center;
|
|
1551
1580
|
min-width: 100%;
|
|
1552
|
-
`,
|
|
1553
|
-
${({theme:e,$isActive:
|
|
1554
|
-
background-color: ${
|
|
1581
|
+
`,Yo=c.st.button`
|
|
1582
|
+
${({theme:e,$isActive:t})=>`
|
|
1583
|
+
background-color: ${t?e.palette.primary[400]:e.palette.white};
|
|
1555
1584
|
border: none;
|
|
1556
1585
|
border-radius: 50%;
|
|
1557
1586
|
cursor: pointer;
|
|
1558
1587
|
height: ${e.spacing[.75]};
|
|
1559
1588
|
width: ${e.spacing[.75]};
|
|
1560
1589
|
`}
|
|
1561
|
-
`,
|
|
1590
|
+
`,Ko=c.st.div`
|
|
1562
1591
|
align-items: center;
|
|
1563
1592
|
display: flex;
|
|
1564
1593
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1565
1594
|
justify-content: center;
|
|
1566
1595
|
margin-top: ${({theme:e})=>e.spacing[2]};
|
|
1567
|
-
`,
|
|
1596
|
+
`,qo=({slides:e,interval:t=300})=>{const{cycle:i,setCycle:o,setProgress:r}=Gt(t,e.length),a=x.useCallback(l=>()=>{o(l),r(0)},[o,r]);return n.jsxs(Vo,{"aria-roledescription":"carousel",children:[n.jsx(Uo,{$currentIndex:i,children:e.map((l,s)=>{const d=`slide-${s}`;return n.jsx(Go,{"aria-label":d,"aria-roledescription":"slide",children:l.content},d)})}),n.jsx(Ko,{children:e.map((l,s)=>{const d=`nav-button-${s}`;return n.jsx(Yo,{$isActive:s===i,"aria-label":`Go to slide ${s+1}`,"data-testid":s===i?"active":"inactive",onClick:a(s)},d)})})]})},Zt=c.st.div`
|
|
1568
1597
|
${({theme:e})=>`
|
|
1569
1598
|
background-color: ${e.palette.gray[100]};
|
|
1570
1599
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1616,7 +1645,7 @@
|
|
|
1616
1645
|
padding-bottom: unset;
|
|
1617
1646
|
}
|
|
1618
1647
|
`}
|
|
1619
|
-
`,
|
|
1648
|
+
`,Zo=c.st.div`
|
|
1620
1649
|
${({theme:e})=>`
|
|
1621
1650
|
align-items: end;
|
|
1622
1651
|
background-color: ${e.palette.gray[100]};
|
|
@@ -1634,10 +1663,10 @@
|
|
|
1634
1663
|
background-color: ${e.palette.gray[200]};
|
|
1635
1664
|
}
|
|
1636
1665
|
`}
|
|
1637
|
-
`,Xt=({noCodeMessage:e="Code snippet not available",snippet:
|
|
1666
|
+
`,Xt=({noCodeMessage:e="Code snippet not available",snippet:t,specific:i})=>(x.useEffect(()=>{c.prismExports.highlightAll()},[]),n.jsx(Zt,{"data-private":!0,children:n.jsx("pre",{className:"line-highlight","data-line-offset":c._.isNil(t)||c._.isString(t)?0:t.offset+.7,...i!==void 0?{"data-line":String(Number(i))}:{},children:c._.isNil(t)||c._.isString(t)||c._.isEmpty(t.content)?n.jsx("div",{className:"no-data",children:n.jsx("p",{children:e})}):n.jsx("code",{className:"language-none",children:t.content})})})),Xo=({noCodeMessage:e="Code snippet not available",snippet:t,specific:i,variant:o="normal",expanded:r=!1})=>{const a=c.Je(),[l,s]=x.useState(!1),[d,p]=x.useState(!0),g=x.useCallback(()=>{s(y=>!y)},[s]),u=x.useCallback(()=>{if(c._.isNil(t)||c._.isEmpty(t)||!c._.isString(t))return p(!1),e;const y=t.split(`
|
|
1638
1667
|
`);return y.length>8&&!l?`${[...y].splice(0,7).join(`
|
|
1639
1668
|
`)}
|
|
1640
|
-
${y[8]}...`:(y.length<8&&p(!1),
|
|
1669
|
+
${y[8]}...`:(y.length<8&&p(!1),t)},[l,t,e]),f=x.useMemo(u,[u]),h=x.useCallback(async()=>{await navigator.clipboard.writeText(f)},[f]);return o==="location"?n.jsx(Xt,{noCodeMessage:e,snippet:t,specific:i}):n.jsxs($,{bgColor:a.palette.gray[100],borderRadius:"4px",display:"inline-flex",justify:r?"space-between":"center",minWidth:"565px",position:"relative",width:r?"100%":"565px",children:[n.jsx(Zt,{"data-private":!0,children:n.jsx("pre",{children:n.jsx("code",{className:"language-none",children:f})})}),n.jsxs(Zo,{children:[n.jsx(M,{height:a.spacing[2.5],icon:"copy",iconColor:a.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:h,variant:"ghost",width:a.spacing[2.5]}),d?n.jsxs(P,{onClick:g,variant:"ghost",children:[l?"Show Less":"Show more",n.jsx(R,{icon:l?"chevron-up":"chevron-down",iconColor:a.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:h})]}):!1]})]})},{getVariant:Qo}=q(e=>({fixed:`
|
|
1641
1670
|
height: auto;
|
|
1642
1671
|
min-width: 300px;
|
|
1643
1672
|
padding: ${e.spacing[1.25]};
|
|
@@ -1667,7 +1696,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1667
1696
|
justify-content: center;
|
|
1668
1697
|
z-index: 99999;
|
|
1669
1698
|
`,at=c.st($)`
|
|
1670
|
-
${({theme:e,$size:
|
|
1699
|
+
${({theme:e,$size:t})=>`
|
|
1671
1700
|
background-color: ${e.palette.white};
|
|
1672
1701
|
border: 1px solid ${e.palette.gray[200]};
|
|
1673
1702
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1681,9 +1710,9 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1681
1710
|
margin: auto;
|
|
1682
1711
|
white-space: pre-line;
|
|
1683
1712
|
|
|
1684
|
-
${
|
|
1713
|
+
${Qo(e,t)}
|
|
1685
1714
|
`}
|
|
1686
|
-
`,
|
|
1715
|
+
`,er=c.st.div`
|
|
1687
1716
|
${({theme:e})=>`
|
|
1688
1717
|
background-color: ${e.palette.white};
|
|
1689
1718
|
border-radius: 0 0 ${e.spacing[.25]} ${e.spacing[.25]};
|
|
@@ -1711,7 +1740,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1711
1740
|
}
|
|
1712
1741
|
}
|
|
1713
1742
|
`}
|
|
1714
|
-
`,
|
|
1743
|
+
`,tr=c.st.div`
|
|
1715
1744
|
border-radius: ${({theme:e})=>`${e.spacing[.25]} ${e.spacing[.25]} 0 0`};
|
|
1716
1745
|
display: block;
|
|
1717
1746
|
overflow: unset;
|
|
@@ -1721,7 +1750,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1721
1750
|
padding: ${({theme:e})=>`${e.spacing[1.25]}`};
|
|
1722
1751
|
padding-bottom: ${({theme:e})=>`${e.spacing[1.5]}`};
|
|
1723
1752
|
position: sticky;
|
|
1724
|
-
`,
|
|
1753
|
+
`,nr=c.st.div.attrs({className:"flex items-center justify-between"})``,ir=c.st.div`
|
|
1725
1754
|
${({theme:e})=>`
|
|
1726
1755
|
border-radius: 0 0 ${e.spacing[.25]} ${e.spacing[.25]};
|
|
1727
1756
|
display: flex;
|
|
@@ -1752,7 +1781,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1752
1781
|
margin-right: 0;
|
|
1753
1782
|
}
|
|
1754
1783
|
`}
|
|
1755
|
-
`,
|
|
1784
|
+
`,or=c.st.div`
|
|
1756
1785
|
img {
|
|
1757
1786
|
margin: 0 calc(-${({theme:e})=>e.spacing[1.25]} - 1px)
|
|
1758
1787
|
${({theme:e})=>e.spacing[1.25]};
|
|
@@ -1768,15 +1797,15 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1768
1797
|
margin-right: 0;
|
|
1769
1798
|
`:""}
|
|
1770
1799
|
}
|
|
1771
|
-
`,en=({alert:e,modalRef:
|
|
1800
|
+
`,en=({alert:e,modalRef:t,confirmButton:i=void 0,cancelButton:o=void 0})=>{const{close:r}=t,a=x.useCallback(()=>{o!=null&&o.onClick&&o.onClick(),r()},[o,r]),l=x.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]);return[i,o].some(d=>!c.lodashExports.isEmpty(d))?n.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,n.jsx(ir,{children:n.jsxs("div",{children:[o&&n.jsx(P,{id:o.id,onClick:a,variant:"tertiary",width:"100%",children:o.text}),i&&n.jsx(P,{id:i.id,onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},tn=({title:e,description:t,modalRef:i,otherActions:o,onClose:r})=>{const a=c.Je(),l=x.useCallback(()=>{r==null||r(),i.close()},[i,r]);return x.useEffect(()=>{const s=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[l]),n.jsxs(tr,{children:[n.jsxs(nr,{children:[typeof e=="string"?n.jsx(Z,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",wordBreak:"break-word",children:e}):e,n.jsxs("div",{className:"items-center flex gap-3",children:[o,n.jsx(M,{icon:"close",iconColor:a.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),t&&c.lodashExports.isString(t)&&!c.lodashExports.isEmpty(t)?n.jsx(I,{mt:.5,size:"sm",children:t}):void 0,t&&!c.lodashExports.isString(t)&&n.jsx(ue,{display:"block",mt:.5,size:"sm",children:t})]})},nn=({disabled:e,id:t="modal-confirm",onCancel:i,onConfirm:o="submit",txtCancel:r,txtConfirm:a})=>{const l=o==="submit";return n.jsxs($,{display:"flex",gap:.75,id:"footer",maxWidth:i?"392px":"190px",mt:1.5,children:[i?n.jsx(P,{id:`${t}-cancel`,justify:"center",onClick:i,variant:"tertiary",width:"100%",children:r??"Cancel"}):void 0,n.jsx(P,{disabled:e,id:t,justify:"center",onClick:l?void 0:o,type:l?"submit":"button",variant:"primary",width:"100%",children:a??"Confirm"})]})},rr=(e,t,i)=>i?t==="secondary"?`3px solid ${e.palette.primary[100]}`:`3px solid ${e.palette.primary[500]}`:"unset",ar=c.st.div`
|
|
1772
1801
|
display: flex;
|
|
1773
1802
|
flex-direction: row;
|
|
1774
1803
|
gap: ${({theme:e})=>e.spacing[.25]};
|
|
1775
|
-
border-bottom: ${({theme:e,$borderButton:
|
|
1804
|
+
border-bottom: ${({theme:e,$borderButton:t,$variant:i})=>rr(e,i,t)};
|
|
1776
1805
|
align-items: center;
|
|
1777
1806
|
padding: ${({theme:e})=>e.spacing[.625]}
|
|
1778
1807
|
${({theme:e})=>e.spacing[.5]};
|
|
1779
|
-
padding-bottom: ${({theme:e,$borderButton:
|
|
1808
|
+
padding-bottom: ${({theme:e,$borderButton:t})=>t?`calc(${e.spacing[.625]} - 2px)`:e.spacing[.625]};
|
|
1780
1809
|
|
|
1781
1810
|
&:hover:not([disabled]) {
|
|
1782
1811
|
background-color: ${({theme:e})=>e.palette.gray[100]};
|
|
@@ -1811,10 +1840,10 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1811
1840
|
}
|
|
1812
1841
|
}
|
|
1813
1842
|
}
|
|
1814
|
-
`,
|
|
1815
|
-
${({theme:e,$variant:
|
|
1843
|
+
`,sr=c.st(ke)`
|
|
1844
|
+
${({theme:e,$variant:t})=>`
|
|
1816
1845
|
align-items: center;
|
|
1817
|
-
background: ${
|
|
1846
|
+
background: ${t==="error"?e.palette.primary[400]:e.palette.warning[500]};
|
|
1818
1847
|
border-radius: 100%;
|
|
1819
1848
|
font-family: ${e.typography.type.primary};
|
|
1820
1849
|
justify-content: center;
|
|
@@ -1824,14 +1853,14 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1824
1853
|
width: ${e.spacing[.5]};
|
|
1825
1854
|
height: ${e.spacing[.5]};
|
|
1826
1855
|
`}
|
|
1827
|
-
`,
|
|
1856
|
+
`,lr=c.st.div`
|
|
1828
1857
|
align-items: center;
|
|
1829
1858
|
color: ${({theme:e})=>e.palette.white};
|
|
1830
1859
|
display: flex;
|
|
1831
1860
|
font-size: 6px;
|
|
1832
1861
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1833
1862
|
justify-content: center;
|
|
1834
|
-
`,on=
|
|
1863
|
+
`,on=x.forwardRef(function({numberIndicator:t,show:i,variant:o="error",...r},a){return n.jsx(sr,{$variant:o,className:i?"flex":"hidden","data-testid":"notification-sign",ref:a,...r,children:t&&n.jsx(lr,{children:t<=9?t:9})})}),rn=({end:e=!1,label:t,id:i,isActive:o=!1,link:r,notificationSign:a,onClick:l,tooltip:s="",variant:d="primary",tag:p})=>{const{pathname:g}=Be.useLocation(),u=o||(d==="primary"?g.includes(r):g.endsWith(r));return n.jsx(J,{display:"flex",id:`${i}-tooltip`,tip:s,children:n.jsxs(ar,{$borderButton:u,$variant:d,children:[n.jsxs(Be.NavLink,{end:e,id:i,onClick:l,to:r,children:[t,n.jsx(on,{left:a==null?void 0:a.left,numberIndicator:a==null?void 0:a.numberIndicator,show:a==null?void 0:a.show,top:a==null?void 0:a.top,variant:a==null?void 0:a.variant})]}),p===void 0?null:n.jsx(U,{tagLabel:`${p}`,variant:"default"})]})})},st=({items:e,borders:t=!0,box:i=!1,variant:o="primary"})=>{const r=c.Je();return n.jsx($,{alignItems:"center",bgColor:r.palette.white,border:i?"1px solid":void 0,borderBottom:t?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:i?r.palette.gray[200]:void 0,borderRadius:i?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:t?1.25:void 0,pr:t?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:a,id:l,isActive:s,link:d,label:p,notificationSign:g,onClick:u,tag:f,tooltip:h})=>n.jsx(rn,{end:a,id:l,isActive:s,label:p,link:d,notificationSign:g,onClick:u,tag:f,tooltip:h,variant:o},l))})},re=x.forwardRef(function({color:t=D.palette.gray[100],mt:i=.5,mb:o=.5,width:r,...a},l){return n.jsx($,{as:"hr",borderTop:`1px solid ${t}`,mb:o,mt:i,ref:l,width:r??"100%",...a})}),cr=c.st.li`
|
|
1835
1864
|
${({theme:e})=>`
|
|
1836
1865
|
align-items: center;
|
|
1837
1866
|
background-color: ${e.palette.white};
|
|
@@ -1889,7 +1918,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1889
1918
|
min-width: 240px;
|
|
1890
1919
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1891
1920
|
`}
|
|
1892
|
-
`,ze=({children:e,disabled:
|
|
1921
|
+
`,ze=({children:e,disabled:t=!1,icon:i,iconType:o="fa-light",href:r,onClick:a,onClickIcon:l,onKeyDown:s,rightIcon:d,selected:p=!1,value:g,...u})=>{const h=c.Je().palette.gray[t?300:800],y=t?x.Children.map(e,m=>x.isValidElement(m)?x.cloneElement(m,{disabled:t,...m.props}):m):e;return n.jsxs(cr,{"aria-disabled":t,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:a,onKeyDown:s,value:g,...u,children:[i!==void 0||g!==void 0?n.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[i?n.jsx(R,{disabled:t,icon:i,iconColor:h,iconSize:"xxs",iconType:o}):null,r===void 0?y:n.jsx(X,{href:r,children:y})]}):null,p||d?n.jsx(R,{disabled:t,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:o,onClick:l}):null]})},dr=c.st(ze)`
|
|
1893
1922
|
margin-top: 10px;
|
|
1894
1923
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1895
1924
|
border-radius: 4px;
|
|
@@ -1907,7 +1936,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1907
1936
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1908
1937
|
background-color: unset;
|
|
1909
1938
|
}
|
|
1910
|
-
`,sn=({items:e,onReorder:
|
|
1939
|
+
`,sn=({items:e,onReorder:t,title:i,description:o,onClickClose:r})=>{const a=x.useCallback(l=>()=>{r(l)},[r]);return n.jsxs(c.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:t,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[n.jsxs($,{display:"flex",gap:.25,children:[n.jsx(Z,{display:"flex",size:"xs",children:i}),n.jsx(U,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),n.jsx(I,{size:"sm",children:o}),e.map(l=>l.visible?n.jsx(c.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:n.jsx(dr,{disabled:l.locked,icon:"grid-2",label:l.name,onClickIcon:l.locked?void 0:a(l.id),rightIcon:l.locked?"lock":"close",selected:l.visible,value:l.name,children:l.name})},l.name):void 0)]})},pr=c.st(ze)`
|
|
1911
1940
|
padding: 7px 8px;
|
|
1912
1941
|
|
|
1913
1942
|
&[aria-selected="true"] {
|
|
@@ -1923,7 +1952,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1923
1952
|
display: none;
|
|
1924
1953
|
}
|
|
1925
1954
|
}
|
|
1926
|
-
`,ln=({options:e,title:
|
|
1955
|
+
`,ln=({options:e,title:t,checkboxesName:i,defaultCollapsed:o,onChange:r})=>{const a=c.Je(),[l,s]=x.useState(o??!1),d=x.useCallback(()=>{s(p=>!p)},[]);return n.jsxs($,{"aria-label":t,bgColor:l?a.palette.gray[50]:a.palette.white,border:"1px solid"+a.palette.gray[300],borderRadius:"8px",display:"inline-flex",flexDirection:"column",gap:.625,px:.75,py:.625,role:"region",width:"100%",children:[n.jsxs($,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[n.jsx(I,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:t}),n.jsx(R,{icon:l?"chevron-up":"chevron-down",iconColor:a.palette.gray[400],iconSize:"xs"})]}),l?n.jsx($,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>n.jsx($,{border:"1px solid",borderColor:a.palette.gray[300],borderRadius:"4px",px:.5,py:.5,children:n.jsx(oe,{checked:p.visible,disabled:p.locked,label:p.name,name:`${i}-${p.name}`,onChange:r,value:p.name})},p.name))}):void 0]})},cn=e=>e.reduce((i,o)=>o.group?i[o.group]?{...i,[o.group]:[...i[o.group],o]}:{...i,[o.group]:[o]}:i,{}),gr=c.st.input`
|
|
1927
1956
|
${({theme:e})=>`
|
|
1928
1957
|
background: none;
|
|
1929
1958
|
border: none !important;
|
|
@@ -1953,7 +1982,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1953
1982
|
display:none;
|
|
1954
1983
|
}
|
|
1955
1984
|
`}
|
|
1956
|
-
`,
|
|
1985
|
+
`,ur=c.st.div`
|
|
1957
1986
|
${({theme:e})=>`
|
|
1958
1987
|
align-items: center;
|
|
1959
1988
|
background-color: ${e.palette.white};
|
|
@@ -1973,17 +2002,17 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1973
2002
|
border: 2px solid ${e.palette.black};
|
|
1974
2003
|
}
|
|
1975
2004
|
`}
|
|
1976
|
-
`,
|
|
2005
|
+
`,xr=c.st.div`
|
|
1977
2006
|
${({theme:e})=>`
|
|
1978
2007
|
background-color: ${e.palette.white};
|
|
1979
2008
|
border-radius: ${e.spacing[.5]};
|
|
1980
2009
|
width: 250px;
|
|
1981
2010
|
`}
|
|
1982
|
-
`,ae=({name:e,smallSearch:
|
|
2011
|
+
`,ae=({name:e,smallSearch:t=!1,onClear:i,onChange:o,value:r,...a})=>{const l=x.useRef(null),s=c.Je(),[d,p]=x.useState(!1),[g,u]=x.useState(r??""),{refs:f,floatingStyles:h}=c.useFloating$1(),y=x.useCallback(()=>{p(v=>!v)},[]),m=x.useCallback(v=>{v.key==="Enter"&&v.preventDefault()},[]),b=x.useCallback(v=>{u(v.target.value),o==null||o(v)},[o]),k=x.useCallback(()=>{u(""),i==null||i()},[i]);Q(f.floating.current,()=>{p(!1)},!0);const w=n.jsxs(ur,{children:[n.jsx(R,{icon:"magnifying-glass",iconColor:s.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),n.jsx(gr,{id:e,name:e,onChange:b,onKeyDown:m,ref:l,type:"search",value:g,...a}),!c.lodashExports.isEmpty(g)&&n.jsx(M,{icon:"xmark",iconColor:s.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:k,px:.25,py:.25,type:"reset",variant:"ghost"})]});return t?n.jsxs(x.Fragment,{children:[n.jsx(M,{border:`1px solid ${s.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:y,ref:f.setReference,variant:"ghost"}),d?n.jsx(xr,{ref:f.setFloating,style:h,children:w}):void 0]}):w},dn=({columns:e,formId:t,onChangeHandler:i,variant:o})=>{const r=x.useRef(null),[a,l]=x.useState([]),[s,d]=x.useState(""),p=x.useCallback(u=>{const{value:f}=u.target;d(f)},[]),g=x.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return x.useEffect(()=>{l(e.filter(u=>{var f;return o==="grouped"?u.name.toLowerCase().includes(s.toLowerCase())||((f=u.group)==null?void 0:f.includes(s.toLowerCase())):u.name.toLowerCase().includes(s.toLowerCase())}))},[e,s,o]),o==="grouped"?n.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[n.jsx("form",{id:"search-form",ref:r,children:n.jsx(ae,{name:"search",onChange:p,onClear:g,value:s})}),n.jsx("form",{"data-testid":t,id:t,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(cn(a)).map(([u,f],h)=>{const y=`li-checkbox${u}`;return n.jsx(ln,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:f,title:u},y)})})]}):n.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[n.jsx("form",{id:"search-form",ref:r,children:n.jsx(ae,{name:"search",onChange:p,onClear:g,value:s})}),n.jsx("form",{"data-testid":t,id:t,onReset:g,style:{paddingTop:"0.625rem"},children:a.map(u=>{const f=`li-checkbox-${u.name}`;return n.jsx(pr,{selected:u.visible,value:f,width:"content",children:n.jsx(oe,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},f)})})]})},pn=({_containerId:e="portals",title:t,modalRef:i,variant:o})=>{const r=c.Je(),a=x.useRef(null),[l,s]=x.useState(void 0),d=x.useCallback(u=>{const{checked:f,value:h}=u.target,y=i.columns.map(m=>{var b;return m.name===h?((b=m.toggleVisibility)==null||b.call(m,f),{...m,visible:f}):m});i.setColumns(y)},[i]),p=x.useCallback(u=>{const f=i.columns.map(h=>{var y;return h.id===u?((y=h.toggleVisibility)==null||y.call(h,!1),{...h,visible:!1}):h});i.setColumns(f)},[i]),g=x.useCallback(()=>{var f;const u=(f=a.current)==null?void 0:f.scrollHeight;l!==u&&s(u)},[l]);return i.isOpen?se.createPortal(n.jsx(Qt,{"aria-label":i.name,"aria-modal":"true",children:n.jsxs(at,{$size:"md",flexDirection:"column",children:[n.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[n.jsx(Z,{size:"sm",children:t}),n.jsx(M,{icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),n.jsx(re,{mb:0,mt:0}),n.jsxs($,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:a,scroll:"y",width:"100%",children:[n.jsx(dn,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:o}),n.jsx($,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),n.jsx(sn,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),n.jsx(re,{mb:0,mt:0}),n.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[n.jsx(P,{disabled:!i.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:i.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),n.jsx(P,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):n.jsx("div",{})},fr=c.st(ze)`
|
|
1983
2012
|
padding: 8px;
|
|
1984
2013
|
min-height: 36px;
|
|
1985
2014
|
min-width: unset;
|
|
1986
|
-
`,
|
|
2015
|
+
`,hr=c.st.div.attrs({className:"comp-modal absolute top-[55px] overflow-auto"})`
|
|
1987
2016
|
align-items: center;
|
|
1988
2017
|
background-color: ${({$bgColor:e="rgb(52 64 84 / 70%)"})=>e};
|
|
1989
2018
|
display: flex;
|
|
@@ -1996,7 +2025,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
1996
2025
|
svg.fa-check {
|
|
1997
2026
|
border-radius: 2px;
|
|
1998
2027
|
}
|
|
1999
|
-
`,gn=({control:e,option:n,register:i,setValue:o})=>{var r,a,l,s,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(wt,{value:g.value,width:"content",children:t.jsx(oe,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[n.label,(a=n.options)==null?void 0:a.map(g=>t.jsx(wt,{value:g.value,width:"content",children:t.jsx(rt,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))]});case"select":return t.jsx(nt,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Le,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Ut,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:o},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:o},variant:"filters"});case"dateRange":return t.jsx(Bt,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(s=n.maxValue)==null?void 0:s.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:o,variant:"filters"});default:return t.jsx("div",{})}},un=({control:e,items:n,register:i,setValue:o})=>t.jsx(t.Fragment,{children:n.map((r,a)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(gn,{control:e,option:r,register:i,setValue:o}),a<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),xn=e=>{var s,d,p,g,x;const[n,i]=u.useState([...e]),{control:o,register:r,handleSubmit:a,setValue:l}=c.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter(y=>y.checked).map(y=>y.value))??[]}),radio:((p=(d=(s=e.find(f=>f.type==="radioButton"))==null?void 0:s.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>["text","select"].includes(f.type)).reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:g.minValue,maxValue:(x=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:x.maxValue}});return{control:o,items:n,setItems:i,register:r,handleSubmit:a,setValue:l}},hr=(e,n)=>{var i,o,r,a,l;n("checkbox",e.filter(s=>s.type==="checkboxes").flatMap(s=>{var d;return((d=s.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(o=(i=e.find(s=>s.type==="radioButton"))==null?void 0:i.options)==null?void 0:o.find(({checked:s})=>s))==null?void 0:r.value)??""),n("text",e.filter(s=>["text","select"].includes(s.type)).reduce((s,d)=>({...s,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(a=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:a.minValue),n("maxValue",(l=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:l.maxValue)},yr=(e,n)=>(e==null?void 0:e.filter(i=>{var o;return((o=i.label)==null?void 0:o.toLowerCase().includes((n==null?void 0:n.toLowerCase())??""))??i.value.toLowerCase().includes((n==null?void 0:n.toLowerCase())??"")}))??[],br=async(e,n)=>await Promise.all(e.map(async i=>{if(i.type==="checkboxes"){const r=(i.filterOptions?await i.filterOptions(i.options??[],n):yr(i.options??[],n)).filter((a,l,s)=>s.findIndex(d=>d.value===a.value)===l);return{...i,options:r}}return i})),Ye=({options:e,onSearch:n,onSubmit:i,id:o,selectedFilter:r})=>{const{control:a,items:l,setItems:s,register:d,handleSubmit:p,setValue:g}=xn(e),x=e.some(y=>y.type==="checkboxes"&&y.hideSearch!==!0),f=u.useCallback(async y=>{const{value:m}=y.target;n&&n(m);const b=await br(e,m);s(b)},[e,n,s]),h=u.useCallback(y=>{i&&i(y)},[i]);return u.useEffect(()=>{s(e),hr(e,g)},[e,s,g]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:o,style:{writingMode:"horizontal-tb",maxWidth:"300px",width:"100%"},children:[x&&t.jsxs("div",{children:[r,t.jsx(ae,{onChange:f})]}),t.jsxs("form",{id:o,onSubmit:p(h),children:[t.jsx(un,{control:a,items:l,register:d,setValue:g}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},fn=({options:e,variant:n,onApplyFilters:i,onSearch:o,setDirection:r,setHandler:a})=>{const l=c.Je(),[s,d]=u.useState(e),[p,g]=u.useState([]),[x,f]=u.useState({}),[h,y]=u.useState(""),m=u.useCallback(w=>()=>{const k=s.find(S=>S.label===w),v=!(k!=null&&k.filterOptions.some(S=>S.type==="dateRange"||S.type==="select"));a==null||a(v??!0),y(w),g((k==null?void 0:k.filterOptions)??[])},[s,a]),b=u.useCallback(w=>{const k=[...w.checkbox,...Object.values(w.text??{}),...w.radio?[w.radio]:[],...w.minValue?[String(w.minValue)]:[],...w.maxValue?[String(w.maxValue)]:[]];f(C=>k.length>0?{...C,[h]:k}:C);const v=C=>{var F,T;return{...C,options:(F=C.options)==null?void 0:F.map(A=>({...A,checked:w.checkbox.includes(A.value)||w.radio===A.value})),value:["text","select"].includes(C.type)?((T=w.text)==null?void 0:T[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?w.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?w.maxValue:C.maxValue}},S=C=>C.label===h?{...C,filterOptions:C.filterOptions.map(v)}:C,R=s.map(S);d(C=>C.map(S));const z=R.flatMap(({filterOptions:C})=>C);i(z),g([])},[s,i,h]),j=u.useCallback((w,k)=>{const v=`li-filter-option-${w}`;return t.jsxs(xr,{icon:k,onClick:m(w),style:{minWidth:"180px",writingMode:"horizontal-tb"},value:v,width:"100%",children:[w,x[w]===void 0?void 0:t.jsx(U,{tagLabel:x[w].length.toString()})]},v)},[x,m]);return u.useEffect(()=>{const w=e.reduce((k,{label:v,filterOptions:S})=>{const R=S.flatMap(({value:F,minValue:T,maxValue:A})=>[T,A,F]).filter(Boolean),z=S.flatMap(({options:F})=>F??[]).filter(({checked:F=!1})=>F).map(({value:F})=>F),C=[...R,...z];return C.length===0?k:{...k,[v]:C}},{});f(w),p.length>0&&r&&r("column")},[p,e,r]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"row",maxHeight:p.length>0?"unset":"360px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?t.jsx(Ye,{id:"filters-options",onSearch:o,onSubmit:b,options:p,selectedFilter:h}):Object.entries(cn(e)).map(([w,k])=>t.jsxs($,{style:{writingMode:"horizontal-tb"},children:[t.jsx(I,{color:l.palette.gray[400],mb:.25,size:"sm",children:w}),k.map(({label:v,icon:S="filter-list"})=>j(v,S))]},w))}):t.jsx($,{display:"flex",flexDirection:"row",maxHeight:p.length>0?"unset":"200px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?t.jsx(Ye,{id:"filters-options",onSearch:o,onSubmit:b,options:p,selectedFilter:h}):e.map(({label:w,icon:k="filter-list"})=>j(w,k))})},hn=({options:e,onApplyFilters:n,onSearch:i,modalRef:o,variant:r})=>{const[a,l]=u.useState("row"),[s,d]=u.useState(!0),p=c.Je(),g=u.useRef(null),x=t.jsx(M,{icon:"close",iconColor:p.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,px:.25,py:.25,variant:"ghost"});return u.useEffect(()=>{const f=h=>{const y=g.current;y&&!y.contains(h.target)&&o.close()};if(s)return document.addEventListener("mousedown",f,!0),()=>{document.removeEventListener("mousedown",f,!0)}},[g,s,o]),t.jsx(fr,{$bgColor:"transparent","aria-label":o.name,children:t.jsxs(at,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",justify:"space-between",position:"relative",px:1.25,py:1.25,ref:g,style:{maxWidth:"620px",overflow:"hidden",width:"fit-content"},children:[a==="column"?x:void 0,t.jsx(fn,{onApplyFilters:n,onSearch:i,options:e,setDirection:l,setHandler:d,variant:r}),a==="row"?x:void 0]})})};function $r(e){if(e)return e}function yn(e){if(!e||e.length===0)return;const n=e.filter(o=>o.checked).map(o=>o.label??o.value);return n.length===0?void 0:n.join(", ")}function mr(e,n,i){const o=i??"",r=c._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),a=c._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!c._.isUndefined(r)&&!c._.isUndefined(a))return`${r}${o} - ${a}${o}`;if(!c._.isUndefined(r))return`Min ${r}${o}`;if(!c._.isUndefined(a))return`Max ${a}${o}`}function wr(e,n){if(c.dayjs_minExports.extend(c.localizedFormat),!(c._.isUndefined(e)&&c._.isUndefined(n))){if(e!==""&&n!==""&&!c._.isUndefined(e)&&!c._.isUndefined(n))return`${c.dayjs(e).format("LL")} - ${c.dayjs(n).format("LL")}`;if(e!==""&&!c._.isUndefined(e))return`From ${c.dayjs(e).format("LL")}`;if(n!==""&&!c._.isUndefined(n))return`To ${c.dayjs(n).format("LL")}`}}function jr(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const pe=({filter:e,icon:n="filter-list",label:i,onClose:o,filterValue:r})=>c._.isNil(r)||c._.isEmpty(String(r))?null:t.jsx(U,{filterValues:r,icon:n,id:"remove-filter",onClose:o(e),tagLabel:`${i} `}),vr=({options:e,onClose:n})=>{const i=e.flatMap(o=>o.filterOptions.map(r=>{const{filterFn:a,label:l,type:s,value:d,options:p,minValue:g,maxValue:x}=r;switch(s){case"numberRange":{const f=mr(g,x,o.placeholder);return t.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:n},l)}case"dateRange":{const f=wr(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:n},l)}case"radioButton":case"checkboxes":{const f=yn(p);return t.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:n},l)}case void 0:case"select":case"text":default:{const f=$r(d),h=jr(s,o.label,a);return t.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:h,onClose:n},l)}}})).filter(o=>{if(o===null)return!1;const{filterValue:r}=o.props;return!c._.isNil(r)&&!c._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},kr=e=>e.map(n=>{const i={key:String(n.key),type:n.type},o=(()=>{let r={...i};if(n.filterFn&&(r={...r,filterFn:n.filterFn}),n.value&&(r={...r,value:n.value}),n.minValue!==void 0&&n.minValue!==null&&(r={...r,minValue:n.minValue}),n.maxValue!==void 0&&n.maxValue!==null&&(r={...r,maxValue:n.maxValue}),n.options&&n.options.length>0){const a=n.options.filter(l=>l.checked).map(l=>l.value);a.length>0&&(r={...r,selectedValues:a})}return r})();return Object.keys(o).length>2?o:null}).filter(Boolean),Cr=(e,n)=>n.map(i=>{const o=e.find(a=>a.key===String(i.key)&&a.type===i.type);return o?(()=>{let a={...i};return o.filterFn&&(a={...a,filterFn:o.filterFn}),o.value!==void 0&&o.value!==null&&(a={...a,value:o.value}),o.minValue!==void 0&&o.minValue!==null&&(a={...a,minValue:o.minValue}),o.maxValue!==void 0&&o.maxValue!==null&&(a={...a,maxValue:o.maxValue}),o.selectedValues&&i.options&&(a={...a,options:i.options.map(l=>{var s;return{...l,checked:((s=o.selectedValues)==null?void 0:s.includes(l.value))??!1}})}),a})():i}),We=(e,n)=>{const i=kr(e);n(JSON.stringify(i))},Sr=(e,n)=>{const i=e();if(!i)return n;try{const o=JSON.parse(i);return Cr(o,n)}catch{return n}},zr=(e,n)=>{function i(l,s){if(s.value===""||s.value===void 0||c._.defaultTo(s.isBackFilter,!1))return!0;switch(s.filterFn){case"includesInsensitive":return String(l[s.key]).toLowerCase().includes(s.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[s.key]).toLowerCase()===s.value.toLowerCase()}}function o(l,s){if(!s.options||s.options.length===0)return!0;const d=s.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[s.key]))}function r(l,s,d){const p=d(String(l[s.key])),{minValue:g,maxValue:x}=s,f=c._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=c._.isEmpty(x)&&typeof x!="number"?void 0:d(String(x));return c._.isUndefined(f)&&c._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function a(l){return n.every(s=>{if(typeof s.key=="function")return s.key(l,s.value);switch(s.type){case"radioButton":case"checkboxes":return o(l,s);case"numberRange":return r(l,s,Number);case"dateRange":return r(l,s,d=>new Date(d));case"select":case"text":default:return i(l,s)}})}return e.filter(a)},Ir=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,Tr=e=>{var i;const n=((i=e.options)==null?void 0:i.map(o=>({...o,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Er=({dataset:e,setValues:n,getValues:i,options:o,setFilteredDataset:r,onFiltersChange:a,onReset:l,onSearch:s,variant:d="ungrouped"})=>{const p=Se("filters-modal"),[g,x]=u.useState(!1),[f,h]=u.useState([]),y=Ir(f),m=o.map(v=>({...v,filterOptions:v.filterOptions.map(S=>f.find(z=>z.key===S.key&&z.type===S.type&&z.filterFn===S.filterFn)??{...S})})),b=u.useCallback(v=>{h([...v]),We(v,n)},[h,n]),j=u.useCallback(()=>{l&&l(),p.isOpen||x(!0),p.toggle()},[p,l]),w=u.useCallback(v=>()=>{l&&l();const S=f.map(R=>R.key===v.key&&R.type===v.type&&R.filterFn===v.filterFn?Tr(R):R);h(S),We(S,n)},[f,l,n]);return u.useEffect(()=>{const v=o.flatMap(z=>z.filterOptions),S=i();if((()=>{if(!S)return!1;try{const z=JSON.parse(S);return Array.isArray(z)&&z.length>0}catch{return!1}})()){const z=Sr(i,v);h(z)}else v.flatMap(C=>C.value).filter(Boolean).length>0||v.flatMap(C=>C.options).filter(C=>(C==null?void 0:C.checked)===!0).length>0?(h(v),g&&We(v,n)):h(v)},[o,h,n,i,g]),u.useEffect(()=>{r&&e!==void 0&&r(zr(e,f)),a==null||a(f)},[e,f,r,a]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filter-btn",onClick:j,tag:y.toString(),variant:"ghost"})}),p.isOpen&&t.jsx(hn,{modalRef:p,onApplyFilters:b,onSearch:s,options:m,variant:d})]}),options:m,removeFilter:w}},lt=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:o=void 0,confirmButton:r=void 0,content:a=void 0,description:l=void 0,modalRef:s,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:x=void 0,size:f,id:h="modal-container"})=>{const y=c.Je(),[m,b]=u.useState(void 0),j=u.useRef(null),w=u.useRef(!1),k=Array.isArray(g)&&g.length>0,v=i??r;u.useEffect(()=>{if(k&&!w.current&&j.current){const R=j.current.getBoundingClientRect().height;R>50&&(b(R),w.current=!0)}s.isOpen||(b(void 0),w.current=!1)},[k,s.isOpen]);const S=t.jsx(Qt,{"aria-label":s.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(at,{$size:f,"data-testid":h,flexDirection:"column",id:h,ref:k?j:void 0,style:k&&m?{height:m}:void 0,children:[!c._.isEmpty(x)&&!c._.isNil(x)&&t.jsx(tn,{description:l,modalRef:s,onClose:p,otherActions:d,title:x}),g&&t.jsx($,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(st,{items:g})}),(c._.isObject(a)||o)&&t.jsxs(Qo,{style:v?{borderBottom:`1px solid ${y.palette.gray[200]}`}:void 0,children:[o,c._.isObject(a)&&c._.isString(a.imageSrc)&&t.jsx(ir,{$framed:a.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:a.imageSrc})}),c._.isObject(a)&&c._.isString(a.imageText)&&t.jsx(I,{size:"sm",children:a.imageText})]}),t.jsx(en,{alert:n,cancelButton:i,confirmButton:r,modalRef:s})]})});return e&&s.isOpen?se.createPortal(S,document.getElementById("portals")??document.body):s.isOpen?S:null},Rr=(e,n,i)=>{const o=Se("confirm-dialog-modal"),r=u.useRef(null),a=u.useCallback(async()=>(o.open(),new Promise(p=>{r.current=p})),[o]),l=u.useCallback(()=>{var p;o.close(),(p=r.current)==null||p.call(r,!0)},[o]),s=u.useCallback(()=>{var p;o.close(),(p=r.current)==null||p.call(r,!1)},[o]);return[a,({children:p})=>{const[g,x]=u.useState(i),f=u.useCallback(()=>{x({...i})},[]),h=u.useCallback(b=>()=>{x(j=>({...j,[b]:{...j[b],state:!j[b].state}}))},[]),y=!Object.values(g).every(({state:b})=>b),m=Object.entries(g).map(([b,{state:j,label:w}])=>t.jsx(oe,{defaultChecked:j,label:w,name:b,onChange:h(b)},b));return t.jsxs(lt,{"data-testid":e,id:e,modalRef:{...o,close:s},onClose:f,size:"sm",title:n,children:[p,t.jsx($,{display:"flex",flexDirection:"column",gap:.5,children:m}),t.jsx(nn,{disabled:y,id:e,onConfirm:l})]})}]},Dr=()=>{const[e,n]=u.useState(!1),[i,o]=u.useState(),r=u.useRef(null),a=Se("confirm-dialog-modal"),l=u.useCallback(async g=>(o(g),n(!0),new Promise(x=>{r.current=x})),[]),s=u.useCallback(()=>{var g;n(!1),o(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=u.useCallback(()=>{var g;n(!1),o(void 0),(g=r.current)==null||g.call(r,!1)},[]);return u.useEffect(()=>{a.setIsOpen(e)},[e,a]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:x})=>t.jsxs(lt,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:s,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...a,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,x]}),confirm:l}},Nr=2e3,Fr=({content:e})=>{const[n,i]=u.useState("Copy"),o=u.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{i("Copied"),setTimeout(()=>{i("Copy")},Nr)}).catch(()=>{i("Failed to copy")})},[e]);return t.jsx(M,{icon:"copy",iconSize:"xs",iconType:"fa-light",onClick:o,tooltip:n,variant:"ghost"})},Ar=c.st.ul`
|
|
2028
|
+
`,gn=({control:e,option:t,register:i,setValue:o})=>{var r,a,l,s,d;switch(t.type){case"checkboxes":return n.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=t.options)==null?void 0:r.map(g=>n.jsx(wt,{value:g.value,width:"content",children:n.jsx(oe,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return n.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[t.label,(a=t.options)==null?void 0:a.map(g=>n.jsx(wt,{value:g.value,width:"content",children:n.jsx(rt,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))]});case"select":return n.jsx(nt,{control:e,items:((l=t.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:t.label,name:`text.${String(t.key)}-${t.filterFn??"caseInsensitive"}`,placeholder:t.placeholder,value:t.value});case"text":const p=`text.${String(t.key)}-${t.filterFn??"caseInsensitive"}`;return n.jsx(Le,{label:t.label,name:p,placeholder:t.placeholder,register:i,value:t.value});case"numberRange":return n.jsx(Ut,{label:t.label,name:String(t.key),propsMax:{placeholder:t.placeholder?`${t.placeholder} Max`:"Max",register:i,name:"maxValue",value:t.maxValue,setValue:o},propsMin:{placeholder:t.placeholder?`${t.placeholder} Min`:"Min",register:i,name:"minValue",value:t.minValue,setValue:o},variant:"filters"});case"dateRange":return n.jsx(Bt,{label:t.label,name:String(t.key),propsMax:{name:"maxValue",value:(s=t.maxValue)==null?void 0:s.toString()},propsMin:{name:"minValue",value:(d=t.minValue)==null?void 0:d.toString()},register:i,setValue:o,variant:"filters"});default:return n.jsx("div",{})}},un=({control:e,items:t,register:i,setValue:o})=>n.jsx(n.Fragment,{children:t.map((r,a)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return n.jsxs("div",{children:[n.jsx(gn,{control:e,option:r,register:i,setValue:o}),a<t.length-1&&n.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),xn=e=>{var s,d,p,g,u;const[t,i]=x.useState([...e]),{control:o,register:r,handleSubmit:a,setValue:l}=c.useForm({defaultValues:{checkbox:e.filter(f=>f.type==="checkboxes").flatMap(f=>{var h;return((h=f.options)==null?void 0:h.filter(y=>y.checked).map(y=>y.value))??[]}),radio:((p=(d=(s=e.find(f=>f.type==="radioButton"))==null?void 0:s.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>["text","select"].includes(f.type)).reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:g.minValue,maxValue:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.maxValue}});return{control:o,items:t,setItems:i,register:r,handleSubmit:a,setValue:l}},yr=(e,t)=>{var i,o,r,a,l;t("checkbox",e.filter(s=>s.type==="checkboxes").flatMap(s=>{var d;return((d=s.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),t("radio",((r=(o=(i=e.find(s=>s.type==="radioButton"))==null?void 0:i.options)==null?void 0:o.find(({checked:s})=>s))==null?void 0:r.value)??""),t("text",e.filter(s=>["text","select"].includes(s.type)).reduce((s,d)=>({...s,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),t("minValue",(a=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:a.minValue),t("maxValue",(l=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:l.maxValue)},br=(e,t)=>(e==null?void 0:e.filter(i=>{var o;return((o=i.label)==null?void 0:o.toLowerCase().includes((t==null?void 0:t.toLowerCase())??""))??i.value.toLowerCase().includes((t==null?void 0:t.toLowerCase())??"")}))??[],$r=async(e,t)=>await Promise.all(e.map(async i=>{if(i.type==="checkboxes"){const r=(i.filterOptions?await i.filterOptions(i.options??[],t):br(i.options??[],t)).filter((a,l,s)=>s.findIndex(d=>d.value===a.value)===l);return{...i,options:r}}return i})),Ye=({options:e,onSearch:t,onSubmit:i,id:o,selectedFilter:r})=>{const{control:a,items:l,setItems:s,register:d,handleSubmit:p,setValue:g}=xn(e),u=e.some(y=>y.type==="checkboxes"&&y.hideSearch!==!0),f=x.useCallback(async y=>{const{value:m}=y.target;t&&t(m);const b=await $r(e,m);s(b)},[e,t,s]),h=x.useCallback(y=>{i&&i(y)},[i]);return x.useEffect(()=>{s(e),yr(e,g)},[e,s,g]),n.jsxs("div",{className:"flex flex-col gap-[8px]",id:o,style:{writingMode:"horizontal-tb",maxWidth:"300px",width:"100%"},children:[u&&n.jsxs("div",{children:[r,n.jsx(ae,{onChange:f})]}),n.jsxs("form",{id:o,onSubmit:p(h),children:[n.jsx(un,{control:a,items:l,register:d,setValue:g}),n.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},fn=({options:e,variant:t,onApplyFilters:i,onSearch:o,setDirection:r,setHandler:a})=>{const l=c.Je(),[s,d]=x.useState(e),[p,g]=x.useState([]),[u,f]=x.useState({}),[h,y]=x.useState(""),m=x.useCallback(w=>()=>{const v=s.find(S=>S.label===w),j=!(v!=null&&v.filterOptions.some(S=>S.type==="dateRange"||S.type==="select"));a==null||a(j??!0),y(w),g((v==null?void 0:v.filterOptions)??[])},[s,a]),b=x.useCallback(w=>{const v=[...w.checkbox,...Object.values(w.text??{}),...w.radio?[w.radio]:[],...w.minValue?[String(w.minValue)]:[],...w.maxValue?[String(w.maxValue)]:[]];f(C=>v.length>0?{...C,[h]:v}:C);const j=C=>{var F,T;return{...C,options:(F=C.options)==null?void 0:F.map(A=>({...A,checked:w.checkbox.includes(A.value)||w.radio===A.value})),value:["text","select"].includes(C.type)?((T=w.text)==null?void 0:T[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?w.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?w.maxValue:C.maxValue}},S=C=>C.label===h?{...C,filterOptions:C.filterOptions.map(j)}:C,E=s.map(S);d(C=>C.map(S));const z=E.flatMap(({filterOptions:C})=>C);i(z),g([])},[s,i,h]),k=x.useCallback((w,v)=>{const j=`li-filter-option-${w}`;return n.jsxs(fr,{icon:v,onClick:m(w),style:{minWidth:"180px",writingMode:"horizontal-tb"},value:j,width:"100%",children:[w,u[w]===void 0?void 0:n.jsx(U,{tagLabel:u[w].length.toString()})]},j)},[u,m]);return x.useEffect(()=>{const w=e.reduce((v,{label:j,filterOptions:S})=>{const E=S.flatMap(({value:F,minValue:T,maxValue:A})=>[T,A,F]).filter(Boolean),z=S.flatMap(({options:F})=>F??[]).filter(({checked:F=!1})=>F).map(({value:F})=>F),C=[...E,...z];return C.length===0?v:{...v,[j]:C}},{});f(w),p.length>0&&r&&r("column")},[p,e,r]),t==="grouped"?n.jsx($,{display:"flex",flexDirection:"row",maxHeight:p.length>0?"unset":"360px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?n.jsx(Ye,{id:"filters-options",onSearch:o,onSubmit:b,options:p,selectedFilter:h}):Object.entries(cn(e)).map(([w,v])=>n.jsxs($,{style:{writingMode:"horizontal-tb"},children:[n.jsx(I,{color:l.palette.gray[400],mb:.25,size:"sm",children:w}),v.map(({label:j,icon:S="filter-list"})=>k(j,S))]},w))}):n.jsx($,{display:"flex",flexDirection:"row",maxHeight:p.length>0?"unset":"200px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?n.jsx(Ye,{id:"filters-options",onSearch:o,onSubmit:b,options:p,selectedFilter:h}):e.map(({label:w,icon:v="filter-list"})=>k(w,v))})},hn=({options:e,onApplyFilters:t,onSearch:i,modalRef:o,variant:r})=>{const[a,l]=x.useState("row"),[s,d]=x.useState(!0),p=c.Je(),g=x.useRef(null),u=n.jsx(M,{icon:"close",iconColor:p.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,px:.25,py:.25,variant:"ghost"});return x.useEffect(()=>{const f=h=>{const y=g.current;y&&!y.contains(h.target)&&o.close()};if(s)return document.addEventListener("mousedown",f,!0),()=>{document.removeEventListener("mousedown",f,!0)}},[g,s,o]),n.jsx(hr,{$bgColor:"transparent","aria-label":o.name,children:n.jsxs(at,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",justify:"space-between",position:"relative",px:1.25,py:1.25,ref:g,style:{maxWidth:"620px",overflow:"hidden",width:"fit-content"},children:[a==="column"?u:void 0,n.jsx(fn,{onApplyFilters:t,onSearch:i,options:e,setDirection:l,setHandler:d,variant:r}),a==="row"?u:void 0]})})};function mr(e){if(e)return e}function yn(e){if(!e||e.length===0)return;const t=e.filter(o=>o.checked).map(o=>o.label??o.value);return t.length===0?void 0:t.join(", ")}function wr(e,t,i){const o=i??"",r=c._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),a=c._.isEmpty(t)&&typeof t!="number"||Number.isNaN(t)?void 0:Number(String(t));if(!c._.isUndefined(r)&&!c._.isUndefined(a))return`${r}${o} - ${a}${o}`;if(!c._.isUndefined(r))return`Min ${r}${o}`;if(!c._.isUndefined(a))return`Max ${a}${o}`}function vr(e,t){if(c.dayjs_minExports.extend(c.localizedFormat),!(c._.isUndefined(e)&&c._.isUndefined(t))){if(e!==""&&t!==""&&!c._.isUndefined(e)&&!c._.isUndefined(t))return`${c.dayjs(e).format("LL")} - ${c.dayjs(t).format("LL")}`;if(e!==""&&!c._.isUndefined(e))return`From ${c.dayjs(e).format("LL")}`;if(t!==""&&!c._.isUndefined(t))return`To ${c.dayjs(t).format("LL")}`}}function jr(e,t,i){return e==="select"?t:`${t} ${i==="includesInsensitive"?"contains":"is"}`}const pe=({filter:e,icon:t="filter-list",label:i,onClose:o,filterValue:r})=>c._.isNil(r)||c._.isEmpty(String(r))?null:n.jsx(U,{filterValues:r,icon:t,id:"remove-filter",onClose:o(e),tagLabel:`${i} `}),kr=({options:e,onClose:t})=>{const i=e.flatMap(o=>o.filterOptions.map(r=>{const{filterFn:a,label:l,type:s,value:d,options:p,minValue:g,maxValue:u}=r;switch(s){case"numberRange":{const f=wr(g,u,o.placeholder);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case"dateRange":{const f=vr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case"radioButton":case"checkboxes":{const f=yn(p);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:o.label,onClose:t},l)}case void 0:case"select":case"text":default:{const f=mr(d),h=jr(s,o.label,a);return n.jsx(pe,{filter:r,filterValue:f,icon:o.icon,label:h,onClose:t},l)}}})).filter(o=>{if(o===null)return!1;const{filterValue:r}=o.props;return!c._.isNil(r)&&!c._.isEmpty(String(r))});return i.length>0?n.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Cr=e=>e.map(t=>{const i={key:String(t.key),type:t.type},o=(()=>{let r={...i};if(t.filterFn&&(r={...r,filterFn:t.filterFn}),t.value&&(r={...r,value:t.value}),t.minValue!==void 0&&t.minValue!==null&&(r={...r,minValue:t.minValue}),t.maxValue!==void 0&&t.maxValue!==null&&(r={...r,maxValue:t.maxValue}),t.options&&t.options.length>0){const a=t.options.filter(l=>l.checked).map(l=>l.value);a.length>0&&(r={...r,selectedValues:a})}return r})();return Object.keys(o).length>2?o:null}).filter(Boolean),Sr=(e,t)=>t.map(i=>{const o=e.find(a=>a.key===String(i.key)&&a.type===i.type);return o?(()=>{let a={...i};return o.filterFn&&(a={...a,filterFn:o.filterFn}),o.value!==void 0&&o.value!==null&&(a={...a,value:o.value}),o.minValue!==void 0&&o.minValue!==null&&(a={...a,minValue:o.minValue}),o.maxValue!==void 0&&o.maxValue!==null&&(a={...a,maxValue:o.maxValue}),o.selectedValues&&i.options&&(a={...a,options:i.options.map(l=>{var s;return{...l,checked:((s=o.selectedValues)==null?void 0:s.includes(l.value))??!1}})}),a})():i}),We=(e,t)=>{const i=Cr(e);t(JSON.stringify(i))},zr=(e,t)=>{const i=e();if(!i)return t;try{const o=JSON.parse(i);return Sr(o,t)}catch{return t}},Ir=(e,t)=>{function i(l,s){if(s.value===""||s.value===void 0||c._.defaultTo(s.isBackFilter,!1))return!0;switch(s.filterFn){case"includesInsensitive":return String(l[s.key]).toLowerCase().includes(s.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[s.key]).toLowerCase()===s.value.toLowerCase()}}function o(l,s){if(!s.options||s.options.length===0)return!0;const d=s.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[s.key]))}function r(l,s,d){const p=d(String(l[s.key])),{minValue:g,maxValue:u}=s,f=c._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=c._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return c._.isUndefined(f)&&c._.isUndefined(h)?!0:(f??-1/0)<=p&&p<=(h??1/0)}function a(l){return t.every(s=>{if(typeof s.key=="function")return s.key(l,s.value);switch(s.type){case"radioButton":case"checkboxes":return o(l,s);case"numberRange":return r(l,s,Number);case"dateRange":return r(l,s,d=>new Date(d));case"select":case"text":default:return i(l,s)}})}return e.filter(a)},Tr=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,Er=e=>{var i;const t=((i=e.options)==null?void 0:i.map(o=>({...o,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:t}},Rr=({dataset:e,setValues:t,getValues:i,options:o,setFilteredDataset:r,onFiltersChange:a,onReset:l,onSearch:s,variant:d="ungrouped"})=>{const p=Se("filters-modal"),[g,u]=x.useState(!1),[f,h]=x.useState([]),y=Tr(f),m=o.map(j=>({...j,filterOptions:j.filterOptions.map(S=>f.find(z=>z.key===S.key&&z.type===S.type&&z.filterFn===S.filterFn)??{...S})})),b=x.useCallback(j=>{h([...j]),We(j,t)},[h,t]),k=x.useCallback(()=>{l&&l(),p.isOpen||u(!0),p.toggle()},[p,l]),w=x.useCallback(j=>()=>{l&&l();const S=f.map(E=>E.key===j.key&&E.type===j.type&&E.filterFn===j.filterFn?Er(E):E);h(S),We(S,t)},[f,l,t]);return x.useEffect(()=>{const j=o.flatMap(z=>z.filterOptions),S=i();if((()=>{if(!S)return!1;try{const z=JSON.parse(S);return Array.isArray(z)&&z.length>0}catch{return!1}})()){const z=zr(i,j);h(z)}else j.flatMap(C=>C.value).filter(Boolean).length>0||j.flatMap(C=>C.options).filter(C=>(C==null?void 0:C.checked)===!0).length>0?(h(j),g&&We(j,t)):h(j)},[o,h,t,i,g]),x.useEffect(()=>{r&&e!==void 0&&r(Ir(e,f)),a==null||a(f)},[e,f,r,a]),{Filters:()=>n.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[n.jsx($,{pr:.25,children:n.jsx(P,{icon:"filter",id:"filter-btn",onClick:k,tag:y.toString(),variant:"ghost"})}),p.isOpen&&n.jsx(hn,{modalRef:p,onApplyFilters:b,onSearch:s,options:m,variant:d})]}),options:m,removeFilter:w}},lt=({_portal:e=!0,alert:t,cancelButton:i=void 0,children:o=void 0,confirmButton:r=void 0,content:a=void 0,description:l=void 0,modalRef:s,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const y=c.Je(),[m,b]=x.useState(void 0),k=x.useRef(null),w=x.useRef(!1),v=Array.isArray(g)&&g.length>0,j=i??r;x.useEffect(()=>{if(v&&!w.current&&k.current){const E=k.current.getBoundingClientRect().height;E>50&&(b(E),w.current=!0)}s.isOpen||(b(void 0),w.current=!1)},[v,s.isOpen]);const S=n.jsx(Qt,{"aria-label":s.name,"aria-modal":"true",id:"modal-wrapper",children:n.jsxs(at,{$size:f,"data-testid":h,flexDirection:"column",id:h,ref:v?k:void 0,style:v&&m?{height:m}:void 0,children:[!c._.isEmpty(u)&&!c._.isNil(u)&&n.jsx(tn,{description:l,modalRef:s,onClose:p,otherActions:d,title:u}),g&&n.jsx($,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:n.jsx(st,{items:g})}),(c._.isObject(a)||o)&&n.jsxs(er,{style:j?{borderBottom:`1px solid ${y.palette.gray[200]}`}:void 0,children:[o,c._.isObject(a)&&c._.isString(a.imageSrc)&&n.jsx(or,{$framed:a.imageFramed,children:n.jsx(te,{alt:"modal-img",publicId:a.imageSrc})}),c._.isObject(a)&&c._.isString(a.imageText)&&n.jsx(I,{size:"sm",children:a.imageText})]}),n.jsx(en,{alert:t,cancelButton:i,confirmButton:r,modalRef:s})]})});return e&&s.isOpen?se.createPortal(S,document.getElementById("portals")??document.body):s.isOpen?S:null},Dr=(e,t,i)=>{const o=Se("confirm-dialog-modal"),r=x.useRef(null),a=x.useCallback(async()=>(o.open(),new Promise(p=>{r.current=p})),[o]),l=x.useCallback(()=>{var p;o.close(),(p=r.current)==null||p.call(r,!0)},[o]),s=x.useCallback(()=>{var p;o.close(),(p=r.current)==null||p.call(r,!1)},[o]);return[a,({children:p})=>{const[g,u]=x.useState(i),f=x.useCallback(()=>{u({...i})},[]),h=x.useCallback(b=>()=>{u(k=>({...k,[b]:{...k[b],state:!k[b].state}}))},[]),y=!Object.values(g).every(({state:b})=>b),m=Object.entries(g).map(([b,{state:k,label:w}])=>n.jsx(oe,{defaultChecked:k,label:w,name:b,onChange:h(b)},b));return n.jsxs(lt,{"data-testid":e,id:e,modalRef:{...o,close:s},onClose:f,size:"sm",title:t,children:[p,n.jsx($,{display:"flex",flexDirection:"column",gap:.5,children:m}),n.jsx(nn,{disabled:y,id:e,onConfirm:l})]})}]},Nr=()=>{const[e,t]=x.useState(!1),[i,o]=x.useState(),r=x.useRef(null),a=Se("confirm-dialog-modal"),l=x.useCallback(async g=>(o(g),t(!0),new Promise(u=>{r.current=u})),[]),s=x.useCallback(()=>{var g;t(!1),o(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=x.useCallback(()=>{var g;t(!1),o(void 0),(g=r.current)==null||g.call(r,!1)},[]);return x.useEffect(()=>{a.setIsOpen(e)},[e,a]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>n.jsxs(lt,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:s,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...a,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},Fr=2e3,Ar=({content:e})=>{const[t,i]=x.useState("Copy"),o=x.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{i("Copied"),setTimeout(()=>{i("Copy")},Fr)}).catch(()=>{i("Failed to copy")})},[e]);return n.jsx(M,{icon:"copy",iconSize:"xs",iconType:"fa-light",onClick:o,tooltip:t,variant:"ghost"})},Lr=c.st.ul`
|
|
2000
2029
|
${({theme:e})=>`
|
|
2001
2030
|
align-items: flex-start;
|
|
2002
2031
|
border-radius: ${e.spacing[.25]};
|
|
@@ -2009,7 +2038,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2009
2038
|
width: 166px;
|
|
2010
2039
|
z-index: 9999;
|
|
2011
2040
|
`}
|
|
2012
|
-
`,
|
|
2041
|
+
`,Pr=c.st.li`
|
|
2013
2042
|
${({theme:e})=>`
|
|
2014
2043
|
align-items: center;
|
|
2015
2044
|
background: ${e.palette.white}
|
|
@@ -2035,15 +2064,15 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2035
2064
|
cursor: not-allowed;
|
|
2036
2065
|
}
|
|
2037
2066
|
`}
|
|
2038
|
-
`,
|
|
2067
|
+
`,Or=({icon:e,iconColor:t,id:i,showChevron:o,options:r,title:a})=>{const l=c.Je(),[s,d]=x.useState(!1),p=s?"chevron-up":"chevron-down",{refs:g,floatingStyles:u}=c.useFloating({middleware:[c.offset({mainAxis:4})],placement:"bottom-start"}),f=x.useCallback(()=>{d(h=>!h)},[]);return Q(s?g.floating.current:null,()=>{d(!1)},!0,document.getElementById(`dropdown-toggle-${i}`)),n.jsxs(x.Fragment,{children:[n.jsx(P,{"aria-label":a,icon:e,iconColor:t,iconType:"fa-solid",id:`dropdown-toggle-${i}`,onClick:f,ref:g.setReference,rightIcon:o?p:void 0,variant:"ghost",children:a}),s?n.jsx(Lr,{ref:g.setFloating,style:u,children:r.map(h=>{const y=({})=>{h.onClick(),d(!1)};return n.jsxs(Pr,{"aria-disabled":h.disabled,"aria-label":h.label,onClick:h.disabled?void 0:y,children:[n.jsx(R,{icon:h.icon,iconColor:h.iconColor??l.palette.gray[300],iconSize:"xxs",iconType:"fa-light"}),h.label]},h.label)})}):void 0]})},Ke=({buttonProps:e,variant:t})=>n.jsx(P,{onClick:e.onClick,variant:t,children:e.text}),Mr=c.st.div`
|
|
2039
2068
|
display: flex;
|
|
2040
2069
|
flex-direction: column;
|
|
2041
2070
|
align-items: center;
|
|
2042
|
-
padding: ${({theme:e,$padding:
|
|
2071
|
+
padding: ${({theme:e,$padding:t})=>e.spacing[t]};
|
|
2043
2072
|
max-width: 900px;
|
|
2044
2073
|
white-space: pre-line;
|
|
2045
2074
|
margin: 0 auto;
|
|
2046
|
-
`,
|
|
2075
|
+
`,Hr=c.st.div`
|
|
2047
2076
|
display: flex;
|
|
2048
2077
|
flex-direction: row;
|
|
2049
2078
|
justify-content: center;
|
|
@@ -2056,7 +2085,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2056
2085
|
> img {
|
|
2057
2086
|
width: 100%;
|
|
2058
2087
|
}
|
|
2059
|
-
`,
|
|
2088
|
+
`,Wr=c.st.div`
|
|
2060
2089
|
display: flex;
|
|
2061
2090
|
flex-direction: row;
|
|
2062
2091
|
margin: 0;
|
|
@@ -2069,7 +2098,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2069
2098
|
> *:last-child {
|
|
2070
2099
|
margin-right: 0;
|
|
2071
2100
|
}
|
|
2072
|
-
`,
|
|
2101
|
+
`,vt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},Br=({cancelButton:e=void 0,confirmButton:t=void 0,description:i,imageSrc:o="integrates/empty/addRoot",padding:r=1.25,title:a,size:l="md"})=>{const s=(t??e)!==void 0;return n.jsxs(Mr,{$padding:r,children:[n.jsx(Hr,{children:n.jsx(te,{alt:"empty-icon",publicId:o})}),n.jsx(Z,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:vt[l].title,textAlign:"center",children:a}),n.jsx(I,{mb:s?2:void 0,size:vt[l].description,textAlign:"center",children:i}),s?n.jsxs(Wr,{children:[e&&n.jsx(Ke,{buttonProps:e,variant:"tertiary"}),t&&n.jsx(Ke,{buttonProps:t,variant:"primary"})]}):void 0]})},_r=({children:e})=>{const t=c.useFormContext();return e({...t})},Jr=c.st.form`
|
|
2073
2102
|
${({theme:e})=>`
|
|
2074
2103
|
align-items: flex-start;
|
|
2075
2104
|
align-self: stretch;
|
|
@@ -2079,12 +2108,12 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2079
2108
|
overflow: hidden auto;
|
|
2080
2109
|
width: 100%;
|
|
2081
2110
|
`}
|
|
2082
|
-
`,
|
|
2111
|
+
`,Vr=({alert:e,buttonAlignment:t,cancelButton:i,children:o,confirmButton:r,defaultDisabled:a=!0,id:l="modal-confirm",maxButtonWidth:s="392px",mode:d,onSubmit:p,padding:g=!0,showButtons:u=!0,yupSchema:f,...h})=>{const y=c.Je(),m=c.useForm({...h,mode:d??"all",resolver:f?c.o(f):void 0});function b(j){j.stopPropagation(),m.handleSubmit(p)(j)}const w=u?`calc(100% - ${e?"139px":"83px"})`:"100%",v=g?1.5:0;return n.jsx(c.FormProvider,{...m,children:n.jsx(Jr,{onSubmit:b,children:n.jsxs($,{scroll:"y",width:"100%",children:[n.jsx($,{borderRadius:`0 0 ${y.spacing[.25]} ${y.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:w,pb:v,pt:0,px:v,scroll:"y",children:o}),u&&n.jsxs($,{borderRadius:`0 0 ${y.spacing[.25]} ${y.spacing[.25]}`,borderTop:`1px solid ${y.palette.gray[200]}`,display:"flex",flexDirection:t?"unset":"column",gap:.625,justify:t??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,n.jsxs($,{display:"flex",gap:.75,maxWidth:s,children:[i?n.jsx(P,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,n.jsx(P,{disabled:((r==null?void 0:r.disabled)??!1)||m.formState.isSubmitting||a&&!m.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"})]})]})]})})})},Ur=c.st(ke)`
|
|
2083
2112
|
display: grid;
|
|
2084
2113
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2085
2114
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
2086
2115
|
|
|
2087
|
-
${({theme:e,$xl:
|
|
2116
|
+
${({theme:e,$xl:t,$lg:i,$md:o})=>`
|
|
2088
2117
|
@media (width >= ${e.breakpoints.sm}) {
|
|
2089
2118
|
grid-template-columns: repeat(${o}, 1fr);
|
|
2090
2119
|
}
|
|
@@ -2094,11 +2123,11 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2094
2123
|
}
|
|
2095
2124
|
|
|
2096
2125
|
@media (width >= ${e.breakpoints.lg}) {
|
|
2097
|
-
grid-template-columns: repeat(${
|
|
2126
|
+
grid-template-columns: repeat(${t}, 1fr);
|
|
2098
2127
|
}
|
|
2099
2128
|
`}
|
|
2100
|
-
`,
|
|
2101
|
-
${({theme:e,$itemsLength:
|
|
2129
|
+
`,Gr=x.forwardRef(function({children:t,md:i,sm:o,lg:r,xl:a,gap:l,...s},d){return n.jsx(Ur,{$gap:l,$lg:r,$md:i,$sm:o,$xl:a,ref:d,...s,children:t})}),Yr=c.st.div`
|
|
2130
|
+
${({theme:e,$itemsLength:t})=>`
|
|
2102
2131
|
display: flex;
|
|
2103
2132
|
background-color: ${e.palette.white};
|
|
2104
2133
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2106,7 +2135,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2106
2135
|
box-shadow: ${e.shadows.lg};
|
|
2107
2136
|
flex-direction: column;
|
|
2108
2137
|
min-width: 507px;
|
|
2109
|
-
max-width: ${
|
|
2138
|
+
max-width: ${t<=4?"507px":"980px"};
|
|
2110
2139
|
padding: ${e.spacing[1.5]};
|
|
2111
2140
|
|
|
2112
2141
|
@media screen and (max-width: 980px) and (min-width: 742px) {
|
|
@@ -2117,14 +2146,14 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2117
2146
|
}
|
|
2118
2147
|
`}
|
|
2119
2148
|
`,ct=c.st.div`
|
|
2120
|
-
${({theme:e,$isSelected:
|
|
2149
|
+
${({theme:e,$isSelected:t})=>`
|
|
2121
2150
|
align-items: center;
|
|
2122
|
-
background-color: ${
|
|
2151
|
+
background-color: ${t?e.palette.gray[100]:e.palette.white};
|
|
2123
2152
|
border: 1px solid ${e.palette.gray[200]};
|
|
2124
2153
|
border-radius: ${e.spacing[.25]};
|
|
2125
2154
|
cursor: pointer;
|
|
2126
2155
|
display: flex;
|
|
2127
|
-
flex-direction: ${
|
|
2156
|
+
flex-direction: ${t?"row-reverse":"row"};
|
|
2128
2157
|
min-height: 50px;
|
|
2129
2158
|
padding: ${e.spacing[1]} ${e.spacing[.625]};
|
|
2130
2159
|
width: 215px;
|
|
@@ -2133,23 +2162,23 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2133
2162
|
background-color: ${e.palette.gray[100]};
|
|
2134
2163
|
}
|
|
2135
2164
|
`}
|
|
2136
|
-
`,bn=({isSelected:e=!1,label:
|
|
2137
|
-
${({theme:e,$bgColor:
|
|
2138
|
-
background-color: ${
|
|
2165
|
+
`,bn=({isSelected:e=!1,label:t,onSelect:i})=>{const o=c.Je(),r=x.useCallback(()=>{i&&i(t)},[i,t]);return n.jsxs(ct,{$isSelected:e,onClick:r,children:[e?n.jsx(R,{icon:"check",iconColor:o.palette.gray[800],iconSize:"xs"}):null,n.jsx(I,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:t})]})},Kr=({isOpen:e=!0,items:t,handleNewOrganization:i,onSelect:o,onClose:r,selectedItem:a,title:l,variant:s})=>{const d=c.Je(),[p,g]=x.useState(t),[u,f]=x.useState(""),h=x.useCallback(b=>{g(k=>k.filter(w=>String(w.name).toLowerCase().includes(b.toLocaleLowerCase())))},[g]),y=x.useCallback(b=>{b.currentTarget&&(f(b.currentTarget.value),h(b.currentTarget.value))},[f,h]);x.useEffect(()=>{g(t),h(u)},[t,h,u]);const m=n.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:n.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:n.jsxs(Yr,{$itemsLength:p.length,children:[n.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[n.jsx(I,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),n.jsx(M,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),n.jsx($,{mt:1,children:n.jsx(ae,{onInput:y,placeholder:"Search"})}),n.jsx(re,{mb:1,mt:1}),n.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[s==="organization-selector"?n.jsx(ct,{onClick:i,children:n.jsxs($,{alignItems:"center",display:"flex",children:[n.jsx(R,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),n.jsx(I,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(b=>n.jsx(bn,{isSelected:a.toLowerCase()===b.name,label:b.name.charAt(0).toUpperCase()+b.name.slice(1),onSelect:o},b.name))]})]})})});return e?se.createPortal(m,document.body):n.jsx("div",{})},qr=({description:e,height:t="auto",leftIconName:i,children:o,rightIconName:r,title:a,tooltipId:l,tooltipTip:s,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=c.Je(),f=p==="centered",h=l&&n.jsx(J,{icon:r??i,iconColor:u.palette.gray[800],id:l,place:d,tip:s});return n.jsxs($,{alignItems:f?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:f?"column":"column-reverse",gap:.5,height:t,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[n.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[f||c.lodashExports.isUndefined(i)?void 0:h,n.jsx(I,{color:f?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||c.lodashExports.isUndefined(r)?void 0:h]}),n.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[f&&!c.lodashExports.isUndefined(i)?h:void 0,n.jsxs("div",{style:{display:"flex",gap:"12px"},children:[c.lodashExports.isUndefined(a)?void 0:n.jsx(Z,{fontWeight:"bold",size:"md",children:a}),o]}),f&&!c.lodashExports.isUndefined(r)?h:void 0]})]})},Zr=({actions:e,children:t,header:i,title:o,tabs:r,footer:a})=>{const l=c.Je();return n.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[n.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:[n.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[n.jsx(I,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:o}),i]}),e&&n.jsx($,{display:"flex",gap:.25,children:e.map(({icon:s,onClick:d},p)=>n.jsx(M,{icon:s??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${s}`))})]}),n.jsx($,{display:"flex",pt:.25,width:"100%",children:n.jsx(st,{items:r})}),n.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:t}),a&&n.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:a.map(({icon:s,text:d,onClick:p},g)=>n.jsx(P,{icon:s,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},Xr=c.st.span`
|
|
2166
|
+
${({theme:e,$bgColor:t=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2167
|
+
background-color: ${t};
|
|
2139
2168
|
border-radius: 5px;
|
|
2140
2169
|
color: ${e.palette.white};
|
|
2141
2170
|
font-size: 10px;
|
|
2142
2171
|
padding: ${e.spacing[.125]} ${e.spacing[.25]} ${e.spacing[.125]} ${e.spacing[.25]};
|
|
2143
2172
|
text-decoration: ${i}
|
|
2144
2173
|
`}
|
|
2145
|
-
`,
|
|
2174
|
+
`,Qr=({bgColor:e,children:t,txtDecoration:i,ml:o=1})=>n.jsx(Xr,{$bgColor:e,$txtDecoration:i,className:`ml-${o}`,children:t}),ea={lg:"56",md:"30",sm:"12"},{getVariant:ta}=q(e=>({blue:`stroke: ${e.palette.info[500]};`,red:`stroke: ${e.palette.primary[500]};`,white:`stroke: ${e.palette.white};`})),na=c.ct`
|
|
2146
2175
|
0% {
|
|
2147
2176
|
transform: rotateZ(0deg);
|
|
2148
2177
|
}
|
|
2149
2178
|
100% {
|
|
2150
2179
|
transform: rotateZ(360deg)
|
|
2151
2180
|
}
|
|
2152
|
-
`,
|
|
2181
|
+
`,ia=c.ct`
|
|
2153
2182
|
0%,
|
|
2154
2183
|
25% {
|
|
2155
2184
|
stroke-dashoffset: 280;
|
|
@@ -2166,16 +2195,16 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2166
2195
|
stroke-dashoffset: 280;
|
|
2167
2196
|
transform: rotate(360deg);
|
|
2168
2197
|
}
|
|
2169
|
-
`,
|
|
2198
|
+
`,oa=c.st.svg`
|
|
2170
2199
|
${({$size:e="md"})=>c.nt`
|
|
2171
|
-
animation: ${
|
|
2200
|
+
animation: ${na} 2s linear infinite;
|
|
2172
2201
|
animation-timing-function: linear;
|
|
2173
2202
|
display: inline-block;
|
|
2174
|
-
width: ${
|
|
2203
|
+
width: ${ea[e]}px;
|
|
2175
2204
|
`}
|
|
2176
|
-
`,
|
|
2177
|
-
${({theme:e,$color:
|
|
2178
|
-
animation: 1.4s ease-in-out infinite both ${
|
|
2205
|
+
`,ra=c.st.circle`
|
|
2206
|
+
${({theme:e,$color:t="red"})=>c.nt`
|
|
2207
|
+
animation: 1.4s ease-in-out infinite both ${ia};
|
|
2179
2208
|
display: block;
|
|
2180
2209
|
fill: transparent;
|
|
2181
2210
|
stroke-linecap: round;
|
|
@@ -2184,9 +2213,9 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2184
2213
|
stroke-width: 10px;
|
|
2185
2214
|
transform-origin: 50% 50%;
|
|
2186
2215
|
|
|
2187
|
-
${
|
|
2216
|
+
${ta(e,t)}
|
|
2188
2217
|
`}
|
|
2189
|
-
`,
|
|
2218
|
+
`,aa=c.st.circle`
|
|
2190
2219
|
display: block;
|
|
2191
2220
|
fill: transparent;
|
|
2192
2221
|
stroke: ${({theme:e})=>e.palette.gray[200]};
|
|
@@ -2194,12 +2223,12 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2194
2223
|
stroke-width: 10px;
|
|
2195
2224
|
transform-origin: 50% 50%;
|
|
2196
2225
|
opacity: ${({$color:e})=>e==="white"?"20%":"unset"};
|
|
2197
|
-
`,$n=({color:e="red",label:
|
|
2226
|
+
`,$n=({color:e="red",label:t,size:i})=>{const o=c.Je();return n.jsxs($,{alignItems:"center",display:"flex",children:[n.jsxs(oa,{$size:i,viewBox:"0 0 100 100",children:[n.jsx(aa,{$color:e,cx:"50",cy:"50",r:"45"}),n.jsx(ra,{$color:e,cx:"50",cy:"50",r:"45"})]}),t&&n.jsx(I,{color:e==="red"||e==="blue"?o.palette.gray[700]:o.palette.white,ml:.5,size:"sm",children:t})]})},sa={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},la=({publicId:e,variant:t})=>n.jsx($,{...sa[t],children:n.jsx(te,{alt:"logo",publicId:e})}),ca=c.st(c.Lottie).attrs(({autoplay:e=!0})=>({autoplay:e,className:"comp-lottie"}))`
|
|
2198
2227
|
${({$size:e=16})=>`
|
|
2199
2228
|
height: ${e}px;
|
|
2200
2229
|
width: ${e}px;
|
|
2201
2230
|
`}
|
|
2202
|
-
`,
|
|
2231
|
+
`,da=e=>{const{size:t}=e;return n.jsx(ca,{$size:t,...e})},pa=({children:e,commitSha:t,commitShortSha:i,parentElement:o,userInfo:r,setVisibility:a})=>{const l=c.Je(),{userName:s,email:d,phone:p,userRole:g}=r;return Q(o,()=>{a(!1)}),n.jsxs(an,{children:[n.jsx("li",{className:"user-info",children:n.jsxs($,{display:"inline-flex",gap:.25,width:"100%",children:[n.jsxs($,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[n.jsx(I,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:s}),n.jsx(I,{color:l.palette.gray[400],size:"sm",children:d}),c.lodashExports.isUndefined(p)?void 0:n.jsx(I,{color:l.palette.gray[400],size:"sm",children:p})]}),n.jsx($,{children:n.jsx(U,{tagLabel:g,variant:"role"})})]})}),n.jsx(re,{}),e,n.jsx(re,{}),n.jsx("li",{className:"commit-info",children:n.jsx(X,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${t}`,iconPosition:"hidden",children:n.jsx(I,{color:l.palette.gray[400],size:"xs",children:`commit : ${i}`})})})]})},ga=c.st.button`
|
|
2203
2232
|
align-items: center;
|
|
2204
2233
|
background-color: transparent;
|
|
2205
2234
|
border: unset;
|
|
@@ -2216,12 +2245,12 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2216
2245
|
&:hover span {
|
|
2217
2246
|
color: ${D.palette.primary[200]};
|
|
2218
2247
|
}
|
|
2219
|
-
`,
|
|
2220
|
-
${({theme:e,$variant:
|
|
2248
|
+
`,ua=({message:e,onClickButton:t,buttonText:i,buttonFontWeight:o="regular",show:r=!0,icon:a,onClose:l,buttonSide:s="end"})=>{const d=c.Je(),[p,g]=x.useState(r),u=x.useCallback(()=>{g(!1),l==null||l()},[l]);x.useEffect(()=>{g(r)},[r,g]);const f=n.jsxs(ga,{onClick:t,children:[n.jsx(I,{color:d.palette.white,fontWeight:o,size:"sm",textDecoration:"underline",children:i}),n.jsx(R,{icon:a??"arrow-right",iconColor:d.palette.white,iconSize:"xs",iconType:o==="bold"?"fa-regular":"fa-light"})]});return n.jsxs($,{alignItems:"center",bgGradient:d.palette.gradients["01"],display:p?"flex":"none",id:"message-banner",justify:"space-between",padding:[.75,.75,.75,.75],children:[n.jsxs($,{display:"flex",gap:.5,justify:"center",width:"100%",children:[s==="start"&&t?f:void 0,n.jsx($,{children:typeof e=="string"?n.jsx(I,{color:d.palette.white,display:"inline",size:"sm",children:e}):e}),s==="end"&&t?f:void 0]}),n.jsx(R,{clickable:!0,hoverColor:d.palette.primary[200],icon:"close",iconColor:d.palette.white,iconSize:"xs",iconType:"fa-light",onClick:u})]})},xa=c.st.div`
|
|
2249
|
+
${({theme:e,$variant:t})=>`
|
|
2221
2250
|
background: ${e.palette.white};
|
|
2222
2251
|
border: 1px solid ${e.palette.gray[200]};
|
|
2223
2252
|
border-radius: ${e.spacing[.25]};
|
|
2224
|
-
border-left: 4px solid ${e.palette[
|
|
2253
|
+
border-left: 4px solid ${e.palette[t][500]};
|
|
2225
2254
|
box-shadow: ${e.shadows.md};
|
|
2226
2255
|
position: relative;
|
|
2227
2256
|
display: flex;
|
|
@@ -2235,8 +2264,8 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2235
2264
|
right: 16px;
|
|
2236
2265
|
}
|
|
2237
2266
|
`}
|
|
2238
|
-
`,
|
|
2239
|
-
${({theme:e,$variant:
|
|
2267
|
+
`,fa=c.st.div`
|
|
2268
|
+
${({theme:e,$variant:t})=>`
|
|
2240
2269
|
height: ${e.spacing[2.5]};
|
|
2241
2270
|
width: ${e.spacing[2.5]};
|
|
2242
2271
|
position: relative;
|
|
@@ -2253,20 +2282,20 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2253
2282
|
|
|
2254
2283
|
& .ellipse-1 {
|
|
2255
2284
|
transform: scale(2.5) translate(-20%, -20%);
|
|
2256
|
-
color: ${e.palette[
|
|
2285
|
+
color: ${e.palette[t][50]};
|
|
2257
2286
|
position: absolute;
|
|
2258
2287
|
}
|
|
2259
2288
|
|
|
2260
2289
|
& .ellipse-2 {
|
|
2261
2290
|
transform: scale(2) translate(-25%, -25%);
|
|
2262
|
-
color: ${e.palette[
|
|
2291
|
+
color: ${e.palette[t][200]};
|
|
2263
2292
|
}
|
|
2264
2293
|
|
|
2265
2294
|
& .icon {
|
|
2266
|
-
color: ${e.palette[
|
|
2295
|
+
color: ${e.palette[t][500]};
|
|
2267
2296
|
}
|
|
2268
2297
|
`}
|
|
2269
|
-
`,
|
|
2298
|
+
`,ha=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",ya=({description:e,onClose:t,title:i,variant:o})=>{const r=c.Je(),a=x.useCallback(()=>{t==null||t()},[t]);return n.jsxs(xa,{$variant:o,className:`notification notification__${o}`,role:"alertdialog",children:[n.jsxs(fa,{$variant:o,children:[n.jsx(R,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),n.jsx(R,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),n.jsx(R,{icon:ha(o),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),n.jsxs($,{pr:1.5,children:[n.jsx(Z,{fontWeight:"bold",size:"xs",children:i}),n.jsx(I,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),n.jsx(M,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:a,px:.125,py:.125,variant:"ghost"})]})},ba=c.st.div`
|
|
2270
2299
|
width: fit-content;
|
|
2271
2300
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2272
2301
|
border-radius: 4px;
|
|
@@ -2279,7 +2308,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2279
2308
|
align-items: center;
|
|
2280
2309
|
justify-content: center;
|
|
2281
2310
|
padding: 0.5em;
|
|
2282
|
-
|
|
2311
|
+
`,$a=c.st.input`
|
|
2283
2312
|
width: 4em;
|
|
2284
2313
|
appearance: textfield;
|
|
2285
2314
|
border-style: none;
|
|
@@ -2299,7 +2328,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2299
2328
|
&::-webkit-inner-spin-button {
|
|
2300
2329
|
opacity: 1;
|
|
2301
2330
|
}
|
|
2302
|
-
|
|
2331
|
+
`,ma=x.forwardRef(function({autoUpdate:t=!1,decimalPlaces:i=0,defaultValue:o=0,max:r,min:a,name:l,onEnter:s,tooltipMessage:d,...p},g){const u=i<0?0:i,[f,h]=x.useState(Number(o).toFixed(u)),y=x.useCallback(k=>{const w=c.lodashExports.toNumber(k.target.value);k.target.value.endsWith(".")?h(k.target.value):w>=Number(a)&&w<=Number(r)&&(h(String(w)),t&&s(c.lodashExports.toNumber(w.toFixed(u)))),k.stopPropagation()},[t,u,r,a,s]),m=x.useCallback(k=>{k.currentTarget.contains(k.relatedTarget)||h(Number(o).toFixed(u)),k.stopPropagation()},[u,o]),b=x.useCallback(k=>{k.stopPropagation(),k.key==="Enter"&&!c.lodashExports.isEmpty(k.currentTarget.value)&&s(c.lodashExports.toNumber(k.currentTarget.value))},[s]);return n.jsx(ba,{onBlur:m,tabIndex:-1,children:n.jsx(J,{id:"numberInputTooltip",tip:d,children:n.jsx($a,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(a),"aria-valuenow":Number(f),max:r,min:a,name:l,onChange:y,onKeyUp:b,ref:g,step:10**-u,type:"number",value:f})})})}),wa={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},qe=({icon:e,label:t,onClick:i,onlyLabel:o=!1,provider:r="GitLab"})=>{const a=c.Je();return n.jsxs($,{alignItems:"center",bgColorHover:a.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[o?!1:n.jsx($,{height:"24px",width:"24px",children:e===void 0?n.jsx(te,{alt:`${r} Logo`,height:"100%",publicId:wa[r],width:"100%"}):n.jsx(R,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),n.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:n.jsx(I,{color:a.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:o?"break-spaces":"nowrap",wordWrap:"unset",children:t??r})})]})},va=({align:e="end",buttonLabel:t="Add Credential",children:i,id:o,manualOption:r,providers:a})=>{const l=c.Je(),[s,d]=x.useState(!1),p=x.useRef(null);Q(p.current,()=>{d(!1)},!0);const g=x.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),u=x.useCallback(()=>{d(h=>!h)},[d]),f=x.useCallback(h=>y=>{var m;(m=a[h])==null||m.onClick(y),d(!1)},[a]);return n.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[n.jsx(P,{icon:"plus",onClick:u,variant:"primary",children:t}),n.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:o,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:s?"visible":"hidden",zIndex:10,children:[Object.keys(a).map(h=>n.jsx(qe,{onClick:f(h),provider:h},h)),r===void 0?void 0:n.jsx(qe,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),i]})]})},ja=c.st.div`
|
|
2303
2332
|
${({theme:e})=>`
|
|
2304
2333
|
height: ${e.spacing[1]};
|
|
2305
2334
|
width: ${e.spacing[1]};
|
|
@@ -2330,7 +2359,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2330
2359
|
font-size: ${e.spacing[.5]};
|
|
2331
2360
|
}
|
|
2332
2361
|
`}
|
|
2333
|
-
`,mn=({margin:e,onClick:
|
|
2362
|
+
`,mn=({margin:e,onClick:t,text:i})=>{const o=c.Je(),r=n.jsxs(ja,{children:[n.jsx(R,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),n.jsx(R,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),n.jsx(R,{icon:"crown",iconClass:"icon",iconSize:"xs"})]});return i!==void 0?n.jsx($,{cursor:"pointer",display:"inline-block",mr:e,onClick:t,children:n.jsxs($,{alignItems:"center",bgColor:o.palette.warning[50],borderRadius:"4px",display:"flex",padding:[.25,.25,.25,.25],width:"fit-content",children:[r,n.jsx(I,{color:o.palette.warning[500],display:"inline",ml:.25,size:"xs",children:i})]})}):n.jsx($,{display:"inline-block",mr:e,onClick:t,children:r})},ka=({score:e})=>{const t=c.Je(),i=e<=33?"priority-bars-low":"priority-bars-medium",o=e>66||e===0?"priority-bars-high":i;return n.jsxs($,{alignItems:"center",display:"inline-flex",gap:.25,children:[n.jsx(R,{icon:o,iconClass:e<=66?"fa-kit-duotone":"",iconColor:e>0?t.palette.primary[500]:t.palette.gray[200],iconSize:"xs",iconType:"fa-kit",secondaryColor:t.palette.gray[200]}),n.jsx(I,{color:t.palette.gray[800],size:"sm",textAlign:"right",children:e+"%"})]})},{getVariant:Ca}=q(e=>({compliance:`
|
|
2334
2363
|
display: inline-flex;
|
|
2335
2364
|
|
|
2336
2365
|
&.horizontal {
|
|
@@ -2388,50 +2417,50 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2388
2417
|
.progress-bar {
|
|
2389
2418
|
background-color: ${e.palette.primary[500]};
|
|
2390
2419
|
}
|
|
2391
|
-
`})),
|
|
2392
|
-
${({theme:e,$minWidth:
|
|
2420
|
+
`})),Sa=(e,t)=>t<50?e.palette.error[500]:t<80?e.palette.warning[500]:e.palette.success[500],za=c.st.div`
|
|
2421
|
+
${({theme:e,$minWidth:t,$orientation:i,$rounded:o,$variant:r})=>`
|
|
2393
2422
|
background-color: ${e.palette.gray[100]};
|
|
2394
2423
|
border-radius: ${o?"100px":"unset"};
|
|
2395
|
-
${i==="horizontal"?"min-width":"min-height"}: ${
|
|
2424
|
+
${i==="horizontal"?"min-width":"min-height"}: ${t}px;
|
|
2396
2425
|
${i==="horizontal"?"":"height: 100%;"}
|
|
2397
2426
|
|
|
2398
|
-
${
|
|
2427
|
+
${Ca(e,r)}
|
|
2399
2428
|
|
|
2400
2429
|
`}
|
|
2401
|
-
`,
|
|
2402
|
-
${({theme:e,$percentage:
|
|
2430
|
+
`,Ia=c.st.div`
|
|
2431
|
+
${({theme:e,$percentage:t,$rounded:i,$variant:o})=>`
|
|
2403
2432
|
display: inline-flex;
|
|
2404
|
-
width: ${
|
|
2433
|
+
width: ${t}%;
|
|
2405
2434
|
max-width: 100%;
|
|
2406
2435
|
min-width: 0%;
|
|
2407
2436
|
height: 100%;
|
|
2408
2437
|
border-radius: ${i?"100px":"unset"};
|
|
2409
|
-
border-end-end-radius: ${i&&
|
|
2410
|
-
border-start-end-radius: ${i&&
|
|
2411
|
-
background-color: ${o==="compliance"?
|
|
2438
|
+
border-end-end-radius: ${i&&t<100?"0":"inherit"};
|
|
2439
|
+
border-start-end-radius: ${i&&t<100?"0":"inherit"};
|
|
2440
|
+
background-color: ${o==="compliance"?Sa(e,t):"inherit"};
|
|
2412
2441
|
`}
|
|
2413
|
-
`,wn=({minWidth:e=100,percentage:
|
|
2442
|
+
`,wn=({minWidth:e=100,percentage:t,percentageLocation:i="right",showPercentage:o=!1,orientation:r="horizontal",rounded:a=!0,variant:l="default"})=>{const s=o&&i==="left",d=o?n.jsx($,{alignItems:"center",display:"flex",justify:s?"flex-end":"flex-start",width:"40px",children:n.jsx(I,{ml:.5,mr:s?.5:0,size:"sm",children:`${t}%`})}):null,p=n.jsx(za,{$minWidth:e,$orientation:r,$rounded:a,$variant:l,className:r,children:n.jsx(Ia,{$percentage:t,$rounded:a,$variant:l,className:"progress-bar"})});return n.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:s?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:s?`${e+43}px`:void 0,minWidth:s?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},vn=({onClick:e})=>n.jsx("svg",{className:"in-progress-icon",fill:"none",height:"13",onClick:e,viewBox:"0 0 12 13",width:"12",xmlns:"http://www.w3.org/2000/svg",children:n.jsxs("g",{id:"Group 8",children:[n.jsx("path",{d:"M9.40199 3.00342L9.95715 2.34182C9.42087 1.88791 8.80949 1.53109 8.15051 1.28741L7.8552 2.09852C8.41952 2.30786 8.94298 2.61408 9.40199 3.00342Z",fill:"#1D2939"}),n.jsx("path",{d:"M11.1498 6.08815L11.9998 5.90982C11.8803 5.21957 11.6409 4.55558 11.2923 3.94793L10.5444 4.36018C10.8429 4.89758 11.0476 5.48194 11.1498 6.08815Z",fill:"#1D2939"}),n.jsx("path",{d:"M7.8552 11.8057L8.15051 12.6168C8.80949 12.3731 9.42087 12.0163 9.95715 11.5624L9.40199 10.9008C8.94298 11.2901 8.41952 11.5963 7.8552 11.8057Z",fill:"#1D2939"}),n.jsx("path",{d:"M10.5444 9.54409L11.2923 9.97608C11.6411 9.36144 11.8805 8.69095 12 7.99444L11.1498 7.84459C11.0476 8.44177 10.8427 9.01676 10.5444 9.54409Z",fill:"#1D2939"}),n.jsx("path",{d:"M6.04789 13V0.904236C4.44389 0.904236 2.90559 1.54142 1.77139 2.67562C0.637187 3.80982 0 5.34813 0 6.95213C0 8.55613 0.637187 10.0944 1.77139 11.2286C2.90559 12.3628 4.44389 13 6.04789 13Z",fill:"#1D2939"})]})}),jn=(e,t)=>{switch(e){case"completed":return t.palette.success[500];case"disabled":return t.palette.gray[300];case"error":return t.palette.error[500];case"in progress":return t.palette.gray[800];case"not completed":default:return t.palette.gray[800]}},Ta=c.st(R)`
|
|
2414
2443
|
box-sizing: border-box;
|
|
2415
2444
|
|
|
2416
|
-
border-right: ${({theme:e,$variant:
|
|
2445
|
+
border-right: ${({theme:e,$variant:t})=>t==="in progress"?`1px dashed ${jn("in progress",e)}`:"unset"};
|
|
2417
2446
|
border-radius: 50%;
|
|
2418
|
-
`,
|
|
2419
|
-
${({$minWidth:e,$orientation:
|
|
2447
|
+
`,Ea=c.st.div`
|
|
2448
|
+
${({$minWidth:e,$orientation:t})=>`
|
|
2420
2449
|
display: flex;
|
|
2421
|
-
flex-direction: ${
|
|
2450
|
+
flex-direction: ${t==="horizontal"?"row":"column"};
|
|
2422
2451
|
|
|
2423
2452
|
@media (width <= ${e}) {
|
|
2424
2453
|
display: flex;
|
|
2425
2454
|
flex-flow: row wrap;
|
|
2426
2455
|
}
|
|
2427
2456
|
`}
|
|
2428
|
-
`,
|
|
2457
|
+
`,Ra=150,Da=({label:e,minWidth:t=Ra,state:i="not completed",stepNumber:o=1,title:r,onClick:a,orientation:l="horizontal"})=>{const s=c.Je(),d={completed:"circle-check",disabled:"circle-dashed",error:"circle-exclamation","in progress":"circle-half","not completed":"circle-dashed"},p=i==="disabled";return n.jsxs($,{display:"inline-flex",flexDirection:l==="horizontal"?"column":"row",minWidth:`${t}px`,children:[n.jsx(wn,{minWidth:t,orientation:l,percentage:p||i==="not completed"?0:100,rounded:!1,variant:i==="error"?"progressIndicatorError":"progressIndicator"}),n.jsxs($,{display:"flex",gap:.5,px:.5,py:.5,width:"100%",children:[i==="in progress"?n.jsx(vn,{onClick:a}):n.jsx(Ta,{$variant:i,clickable:!p,disabled:p,icon:d[i],iconColor:jn(i,s),iconSize:"xs",iconType:"fa-light",onClick:p?void 0:a}),n.jsxs($,{children:[n.jsx(I,{color:s.palette.gray[p?300:800],fontWeight:"bold",size:"sm",children:`${o}.${r}`}),e===void 0?null:n.jsx(I,{color:s.palette.gray[p?300:600],size:"xs",children:e})]})]})]})},Na=150,Fa=({children:e,orientation:t="horizontal",minWidth:i=Na})=>{const o=x.Children.toArray(e),r=x.useMemo(()=>x.Children.count(e),[e]),a=x.useMemo(()=>r*i,[r,i]);return n.jsx(Ea,{$minWidth:`${a}px`,$orientation:t,children:o.map(l=>x.cloneElement(l,{minWidth:i,orientation:t}))})},kn=({description:e="",highlightDescription:t="",mobile:i})=>{const o=c.Je(),r=i?"md":"lg",a=typeof t=="string",l=a?"":new RegExp(`(${t.join("|")})`,"u");return t.length>0?n.jsx(I,{display:"inline",lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:a?n.jsxs(x.Fragment,{children:[n.jsx(ue,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:t}),e]}):e.split(l).map((s,d)=>t.includes(s)?n.jsx(ue,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:s},`${d+1}-bold`):s)}):n.jsx(I,{lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:e})},Aa=({_portal:e=!1,cancelButton:t,darkBackground:i=!1,children:o,confirmButton:r,container:a,description:l,highlightDescription:s="",image:d,maxWidth:p,mobile:g=!1,title:u,titleColor:f})=>{const h=c.Je(),{alt:y,src:m,width:b="77px",height:k="77px"}=d,w=x.useCallback(()=>{t==null||t.onClick()},[t]),v=x.useCallback(()=>{r==null||r.onClick()},[r]),j=n.jsx(Z,{color:f,fontWeight:"bold",lineSpacing:g?1.5:2.5,mb:g?1.5:0,size:g?"sm":"lg",textAlign:g?"start":"center",children:u}),S=n.jsx(te,{alt:y,height:k,publicId:m,width:b}),E=n.jsx($,{alignItems:"center","aria-label":u,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:n.jsxs($,{bgColor:h.palette.white,border:`1px solid ${h.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,position:"relative",px:g?1.5:2.5,py:g?1.5:2.5,shadow:"lg",width:g?"335px":"100%",zIndex:11,children:[n.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[g?j:void 0,g?n.jsx($,{alignItems:"center",height:k,justify:"center",mr:0,children:n.jsx($,{bgColor:h.palette.gray[100],left:"0",position:"absolute",textAlign:"center",width:"100%",children:S})}):S,n.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[g?void 0:j,n.jsx(kn,{description:l,highlightDescription:s,mobile:g})]})]}),o&&n.jsx($,{mb:1,scroll:"y",children:n.jsx($,{height:"100%",children:o})}),n.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:g?"start":"center",children:[c.lodashExports.isObject(r)?n.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,c.lodashExports.isObject(t)?n.jsx(P,{onClick:w,variant:(t==null?void 0:t.variant)??"tertiary",children:t==null?void 0:t.text},t==null?void 0:t.key):void 0]})]})});return e?se.createPortal(E,a??document.body):E},La=c.st.div.attrs({className:"comp-scroll-up"})`
|
|
2429
2458
|
position: fixed;
|
|
2430
2459
|
bottom: ${({bottom:e})=>e??"unset"};
|
|
2431
2460
|
right: ${({right:e})=>e??"unset"};
|
|
2432
2461
|
z-index: ${({zIndex:e})=>e??"unset"};
|
|
2433
2462
|
left: ${({left:e})=>e??"unset"};
|
|
2434
|
-
`,
|
|
2463
|
+
`,Pa=({scrollerId:e="dashboard",left:t,visibleAt:i=500,bottom:o,right:r,zIndex:a=100})=>{const[l,s]=x.useState(!1),[d,p]=x.useState(null),g=c.Je();x.useEffect(()=>{p(document.getElementById(e)),d==null||d.addEventListener("scroll",()=>{s(d.scrollTop>i)})},[d,e,i]);const u=x.useCallback(()=>{d==null||d.scrollTo({behavior:"smooth",top:0})},[d]);return l?n.jsx(La,{bottom:o,left:t,right:r,zIndex:a,children:n.jsx(M,{borderRadius:"50%",height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:u,style:{backgroundColor:g.palette.black,borderRadius:"50%",color:g.palette.white},width:"40px"})}):null},Oa={critical:{bgColor:D.palette.primary[700],colorL:D.palette.gray[800],colorR:D.palette.white},disable:{bgColor:D.palette.gray[200],colorL:D.palette.gray[400],colorR:D.palette.gray[400]},high:{bgColor:D.palette.error[500],colorL:D.palette.gray[800],colorR:D.palette.white},low:{bgColor:D.palette.warning[200],colorL:D.palette.gray[800],colorR:D.palette.gray[800]},medium:{bgColor:D.palette.warning[500],colorL:D.palette.gray[800],colorR:D.palette.gray[800]}},Ma=({textL:e,textR:t,variant:i})=>{const o=c.Je(),{bgColor:r,colorL:a,colorR:l}=Oa[i];return n.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?n.jsx($,{alignItems:"center",bgColor:o.palette.white,border:`1px solid ${r}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:n.jsx(I,{color:a,size:"xs",children:e})}):void 0,n.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:n.jsx(I,{color:l,size:"xs",children:t})})]})},Ha=(e,t)=>{const i={critical:D.palette.primary[700],high:D.palette.error[500],low:D.palette.warning[200],medium:D.palette.warning[500],none:D.palette.gray[200]},o={disabled:D.palette.gray[400],enabled:D.palette.gray[800]},r={critical:D.palette.white,high:D.palette.white,low:D.palette.gray[800],medium:D.palette.gray[800],none:D.palette.gray[400]};return{iconColor:t<1?i.none:i[e],iconText:c.lodashExports.capitalize(e.charAt(0)),iconTextColor:t<1?r.none:r[e],textColor:t<1?o.disabled:o.enabled}},ge=({variant:e,value:t})=>{const{iconColor:i,iconText:o,iconTextColor:r,textColor:a}=Ha(e,t),l=c.lodashExports.capitalize(e.charAt(0))+e.slice(1);return n.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[n.jsx(J,{id:l,place:"top",tip:l,children:n.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:n.jsx(I,{color:r,size:"sm",textAlign:"center",children:o})})}),n.jsx(I,{color:a,size:"sm",children:t})]})},Wa=({critical:e,high:t,medium:i,low:o})=>n.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[n.jsx(ge,{value:e,variant:"critical"}),n.jsx(ge,{value:t,variant:"high"}),n.jsx(ge,{value:i,variant:"medium"}),n.jsx(ge,{value:o,variant:"low"})]}),Ba=c.st.div`
|
|
2435
2464
|
${({theme:e})=>`
|
|
2436
2465
|
border-radius: ${e.spacing[.25]};
|
|
2437
2466
|
cursor: pointer;
|
|
@@ -2449,7 +2478,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2449
2478
|
display: block;
|
|
2450
2479
|
}
|
|
2451
2480
|
`}
|
|
2452
|
-
`,
|
|
2481
|
+
`,_a=({visibleElement:e,hiddenElement:t})=>n.jsxs(Ba,{children:[e,n.jsx($,{display:"none",position:"absolute",top:"100%",zIndex:10,children:t})]}),Cn=({customBadge:e=void 0,description:t,icon:i,onClick:o,requiresUpgrade:r=!1,title:a})=>{const l=c.Je();return n.jsxs($,{bgColor:l.palette.white,bgColorHover:l.palette.gray[100],cursor:"pointer",display:"flex",gap:.5,onClick:o,px:1.25,py:1,width:"100%",children:[n.jsx($,{alignItems:"center",bgColor:l.palette.gray[300],borderRadius:l.spacing[.25],display:"flex",height:"24px",justify:"center",width:"24px",children:n.jsx(R,{icon:i,iconColor:l.palette.gray[800],iconSize:"xxs",ml:.5,mr:.5})}),n.jsxs($,{children:[n.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,children:[n.jsx(I,{color:l.palette.gray[800],size:"sm",children:a}),r?n.jsx(mn,{text:"Upgrade"}):void 0,e]}),n.jsx(I,{color:l.palette.gray[400],size:"xs",children:t})]})]})},Ja=c.st(c.m.div)`
|
|
2453
2482
|
${({theme:e})=>`
|
|
2454
2483
|
background-color: ${e.palette.white};
|
|
2455
2484
|
box-shadow: ${e.shadows.lg};
|
|
@@ -2472,19 +2501,19 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2472
2501
|
height: auto;
|
|
2473
2502
|
}
|
|
2474
2503
|
`}
|
|
2475
|
-
`,
|
|
2504
|
+
`,Va=({children:e,closeIconId:t="close-menu",isOpen:i,items:o,onClose:r,title:a})=>{const l=c.Je(),s=x.useRef(null),d=x.useCallback(p=>()=>{p(),r()},[r]);return x.useEffect(()=>{const p=["mousedown","touchstart"],g=u=>{var b;const f=u.target,h=document.getElementById("helpBtn"),y=document.getElementById("filter-btn"),m=(f===h||((h==null?void 0:h.contains(f))??!1)||f===y||(y==null?void 0:y.contains(f)))??!1;i&&!m&&!(((b=s.current)==null?void 0:b.contains(f))??!1)&&r()};return p.forEach(u=>{document.addEventListener(u,g,{passive:!0})}),()=>{p.forEach(u=>{document.removeEventListener(u,g)})}},[i,r]),n.jsx(c.LazyMotion,{features:c.domAnimation,children:n.jsx(Ja,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:s,transition:{bounce:0,duration:.6,type:"spring"},children:n.jsxs($,{height:"100%",position:"relative",children:[n.jsxs($,{alignItems:"center",bgColor:l.palette.white,borderBottom:"1px solid",borderColor:l.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:[n.jsx(I,{color:l.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:a}),n.jsx(M,{icon:"close",iconColor:l.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:t,onClick:r,px:.25,py:.25,variant:"ghost"})]}),n.jsx($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:n.jsxs($,{py:1.25,children:[(o??[]).map(({customBadge:p,description:g,icon:u,onClick:f,requiresUpgrade:h,title:y})=>n.jsx(Cn,{customBadge:p,description:g,icon:u,onClick:d(f),requiresUpgrade:h,title:y},y)),e&&n.jsx($,{px:1.25,children:e})]})})]})})})},Ua=(e,t)=>t>=50?`
|
|
2476
2505
|
${e.palette.gray[200]} 50%,
|
|
2477
2506
|
${e.palette.primary[500]} 50.05%,
|
|
2478
|
-
${e.palette.primary[500]} ${
|
|
2479
|
-
${e.palette.gray[200]} ${
|
|
2507
|
+
${e.palette.primary[500]} ${t}%,
|
|
2508
|
+
${e.palette.gray[200]} ${t}%
|
|
2480
2509
|
`:`
|
|
2481
|
-
${e.palette.gray[200]} ${
|
|
2482
|
-
${e.palette.primary[500]} ${
|
|
2510
|
+
${e.palette.gray[200]} ${t}%,
|
|
2511
|
+
${e.palette.primary[500]} ${t}%,
|
|
2483
2512
|
${e.palette.primary[500]} 50%,
|
|
2484
2513
|
${e.palette.gray[200]} 50.05%,
|
|
2485
2514
|
${e.palette.gray[200]} 100%
|
|
2486
|
-
`,
|
|
2487
|
-
${({theme:e,$min:
|
|
2515
|
+
`,Ga=c.st.div`
|
|
2516
|
+
${({theme:e,$min:t,$value:i})=>`
|
|
2488
2517
|
align-items: center;
|
|
2489
2518
|
align-self: stretch;
|
|
2490
2519
|
display: flex;
|
|
@@ -2496,10 +2525,10 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2496
2525
|
.track {
|
|
2497
2526
|
background: linear-gradient(
|
|
2498
2527
|
to right,
|
|
2499
|
-
${
|
|
2528
|
+
${t>=0?`
|
|
2500
2529
|
${e.palette.primary[500]} ${i}%,
|
|
2501
2530
|
${e.palette.gray[200]} ${i}%
|
|
2502
|
-
`:
|
|
2531
|
+
`:Ua(e,i)}
|
|
2503
2532
|
);
|
|
2504
2533
|
border-radius: ${e.spacing[.125]};
|
|
2505
2534
|
height: ${e.spacing[.25]};
|
|
@@ -2523,7 +2552,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2523
2552
|
border: 1px solid ${e.palette.primary[500]};
|
|
2524
2553
|
}
|
|
2525
2554
|
`}
|
|
2526
|
-
`,
|
|
2555
|
+
`,Ya=c.st.div`
|
|
2527
2556
|
${({theme:e})=>`
|
|
2528
2557
|
align-items: center;
|
|
2529
2558
|
display: flex;
|
|
@@ -2537,7 +2566,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2537
2566
|
font-size: ${e.spacing[.5]};
|
|
2538
2567
|
}
|
|
2539
2568
|
`}
|
|
2540
|
-
`,
|
|
2569
|
+
`,Ka=c.st.output`
|
|
2541
2570
|
${({theme:e})=>`
|
|
2542
2571
|
align-items: flex-end;
|
|
2543
2572
|
border-radius: ${e.spacing[.5]};
|
|
@@ -2548,7 +2577,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2548
2577
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2549
2578
|
width: 59px;
|
|
2550
2579
|
`}
|
|
2551
|
-
`,Sn=({state:e,trackRef:
|
|
2580
|
+
`,Sn=({state:e,trackRef:t,index:i,name:o})=>{const r=x.useRef(null),{thumbProps:a,inputProps:l,isDragging:s}=c.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:t,inputRef:r},e);return n.jsx("div",{...a,className:`thumb ${s?"dragging":""}`,children:n.jsx(c.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:n.jsx("input",{...l,"aria-label":o,ref:r})})})},qa=(e,t,i)=>Math.round((i-e)/(t-e)*100),Za=e=>{const t=c.Je(),i=x.useRef(null),{label:o,minValue:r=0,maxValue:a=100,name:l,setValue:s,watch:d}=e,p=c.$a916eb452884faea$export$b7a616150fdb9f44(),g=c.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(y){s==null||s(l,y)},value:d==null?void 0:d(l)}),u=qa(r,a,g.getThumbValue(0)),{groupProps:f,trackProps:h}=c.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,i);return n.jsx(_,{htmlFor:l,label:o,children:n.jsxs($,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[n.jsxs(Ga,{...f,$min:r??0,$value:u,className:"slider",children:[n.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:i,children:n.jsx(Sn,{index:0,name:l,state:g,trackRef:i})}),n.jsxs(Ya,{children:[n.jsx("p",{children:`${p.format(r)} (Low)`}),r<0&&n.jsx("p",{children:"0"}),n.jsx("p",{children:`${p.format(a)} (High)`})]})]}),n.jsx(Ka,{children:n.jsx(I,{color:t.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:Xa}=q(e=>({completed:`
|
|
2552
2581
|
background-color: ${e.palette.primary[500]};
|
|
2553
2582
|
color: ${e.palette.white};
|
|
2554
2583
|
|
|
@@ -2571,7 +2600,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2571
2600
|
&::after {
|
|
2572
2601
|
background-color: ${e.palette.gray[200]};
|
|
2573
2602
|
}
|
|
2574
|
-
`})),
|
|
2603
|
+
`})),Qa=c.st.div`
|
|
2575
2604
|
${({theme:e})=>`
|
|
2576
2605
|
align-items: stretch;
|
|
2577
2606
|
background-color: ${e.palette.white};
|
|
@@ -2581,7 +2610,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2581
2610
|
padding: ${`${e.spacing[1]} ${e.spacing[1]}`};
|
|
2582
2611
|
scroll-behavior: unset;
|
|
2583
2612
|
`}
|
|
2584
|
-
`,
|
|
2613
|
+
`,es=c.st.div`
|
|
2585
2614
|
display: flex;
|
|
2586
2615
|
flex-direction: row;
|
|
2587
2616
|
margin-bottom: ${({theme:e})=>e.spacing[2]};
|
|
@@ -2589,7 +2618,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2589
2618
|
&:last-child > div:first-child > span::after {
|
|
2590
2619
|
display: none;
|
|
2591
2620
|
}
|
|
2592
|
-
`,
|
|
2621
|
+
`,ts=c.st.div`
|
|
2593
2622
|
${({theme:e})=>`
|
|
2594
2623
|
display: inline-flex;
|
|
2595
2624
|
font-family: ${e.typography.type.primary};
|
|
@@ -2601,8 +2630,8 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2601
2630
|
margin-right: ${e.spacing[.5]};
|
|
2602
2631
|
}
|
|
2603
2632
|
`}
|
|
2604
|
-
`,
|
|
2605
|
-
${({theme:e,$variant:
|
|
2633
|
+
`,ns=c.st.span`
|
|
2634
|
+
${({theme:e,$variant:t})=>`
|
|
2606
2635
|
border-radius: 6px;
|
|
2607
2636
|
display: inline-block;
|
|
2608
2637
|
text-align: center;
|
|
@@ -2624,9 +2653,9 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2624
2653
|
height: calc(100% - ${e.spacing[1]});
|
|
2625
2654
|
}
|
|
2626
2655
|
|
|
2627
|
-
${
|
|
2656
|
+
${Xa(e,t)}
|
|
2628
2657
|
`}
|
|
2629
|
-
`,
|
|
2658
|
+
`,is=({button:{disabled:e=!1,text:t,type:i="button",onClick:o},steps:r})=>{const[a,l]=x.useState(1),s=x.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return n.jsx(Qa,{children:r.map((d,p)=>{const{content:g,title:u,nextAction:f,previousAction:h}=d,y=p+1,m=y===a?"current":"disabled",b=y<a?"completed":m;return n.jsxs(es,{children:[n.jsx($,{maxWidth:"40px",position:"relative",children:n.jsx(ns,{$variant:b,children:b==="completed"?n.jsx(R,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):y})}),n.jsxs($,{ml:1.5,width:"100%",children:[n.jsx(Z,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:u}),b==="current"&&n.jsxs($,{children:[g,n.jsxs(ts,{children:[a>1&&n.jsx(P,{disabled:d.isDisabledPrevious??!1,onClick:s(-1,h),variant:"tertiary",children:"Previous"}),a<r.length?n.jsx(P,{disabled:d.isDisabledNext??!1,onClick:s(1,f),variant:"primary",children:"Next step"}):n.jsx(P,{disabled:e,onClick:o,type:i,variant:"primary",children:t})]})]})]})]},d.title)})})},os=e=>{const t=(r,a)=>a.reduce((s,[d,p])=>{if(x.isValidElement(p)||d==="__typename")return s.concat([["",""]]);if(typeof p=="object"&&p){const u=Object.entries(p);return s.concat(t(d,u))}const g=r===""?"":`${r}.`;return s.concat([[g+d,p]])},[]),i=Object.entries(e),o=t("",i).filter(([r])=>r!=="");return Object.fromEntries(o)},jt=e=>e.map(os),zn=({csvConfig:e={},data:t,children:i})=>{const{columns:o=void 0,export:r=!1,headers:a={},name:l="Report"}=e,s=x.useMemo(()=>c._.isUndefined(o)?jt(t):jt(t).map(g=>c._.pick(g,o)),[t,o]),d=x.useMemo(()=>s.length>0&&!c._.isEmpty(a),[s.length,a]),p=x.useMemo(()=>(d?Object.keys(s[0]):[]).map(g=>c._.includes(Object.keys(a),g)?{key:g,label:a[g]}:{key:g,label:g}),[d,s,a]);return r?n.jsx(c.CSVLink,{data:s,filename:l,headers:d?p:void 0,children:i}):n.jsx(x.Fragment,{children:i})},In=e=>{const{table:t}=e,{meta:i}=t.options,[o,r]=x.useState(0),[,a]=t.getHeaderGroups(),l=t.getState(),s=x.useMemo(()=>t.getAllLeafColumns().filter(u=>u.id!=="selection"),[t]),d=x.useMemo(()=>s.map(u=>{var f;return{group:(f=u.parent)==null?void 0:f.id,id:u.id,locked:u.getIsPinned()==="left",name:u.columnDef.header,toggleVisibility:u.toggleVisibility,visible:u.getIsVisible()}}),[s]),p=Kt({columnOrder:(i==null?void 0:i.defaultColumnOrder)??[],items:d,name:"table-column-management",setColumnOrder:t.setColumnOrder,setColumnVisibility:t.setColumnVisibility}),g=x.useCallback(()=>{p.toggle()},[p]);return x.useEffect(()=>{r(t.getVisibleLeafColumns().filter(u=>u.id!=="selection").length)},[t,l]),n.jsxs("div",{id:"columns-filter",children:[n.jsx(P,{icon:"columns",id:"columns-toggle-btn",onClick:g,variant:"ghost",children:n.jsx("p",{children:o})}),n.jsx(pn,{modalRef:p,title:"Manage columns",variant:c.isNil(a)?"ungrouped":"grouped"})]})},ee=x.createContext({containerRef:void 0,elementName:"",handleUnselectAll:void 0,hidden:!1,onKeyDown:void 0,selected:0,tableSize:0,tableRef:void 0,table:void 0}),rs=c.st.span`
|
|
2630
2659
|
transition: all 150ms;
|
|
2631
2660
|
width: 5px;
|
|
2632
2661
|
height: 10px;
|
|
@@ -2651,7 +2680,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2651
2680
|
transition: opacity 150ms;
|
|
2652
2681
|
opacity: ${({$variant:e})=>e==="asc"?0:1};
|
|
2653
2682
|
}
|
|
2654
|
-
`,Ze=e=>{const
|
|
2683
|
+
`,Ze=e=>{const t=c.Je(),{variant:i}=e;return n.jsxs(rs,{$variant:i,children:[n.jsx(R,{icon:"caret-up",iconColor:t.palette.gray[700],iconSize:"xxss",iconType:"fa-solid"}),n.jsx(R,{icon:"caret-down",iconColor:t.palette.gray[700],iconSize:"xxss",iconType:"fa-solid"})]})},as=c.st.div`
|
|
2655
2684
|
position: relative;
|
|
2656
2685
|
|
|
2657
2686
|
div:has(table) {
|
|
@@ -2814,8 +2843,8 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2814
2843
|
}
|
|
2815
2844
|
}
|
|
2816
2845
|
}
|
|
2817
|
-
`,
|
|
2818
|
-
${({$width:e,theme:
|
|
2846
|
+
`,ss=c.st.div`
|
|
2847
|
+
${({$width:e,theme:t})=>`
|
|
2819
2848
|
display: flex;
|
|
2820
2849
|
flex-direction: column;
|
|
2821
2850
|
align-items: stretch;
|
|
@@ -2826,15 +2855,15 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2826
2855
|
div {
|
|
2827
2856
|
position: relative;
|
|
2828
2857
|
font-weight: 400;
|
|
2829
|
-
font-size: ${
|
|
2858
|
+
font-size: ${t.typography.text.sm};
|
|
2830
2859
|
text-align: left;
|
|
2831
2860
|
|
|
2832
|
-
color: ${
|
|
2833
|
-
background-color: ${
|
|
2834
|
-
border-radius: ${
|
|
2835
|
-
padding: ${
|
|
2836
|
-
margin: ${
|
|
2837
|
-
height: ${
|
|
2861
|
+
color: ${t.palette.gray[600]};
|
|
2862
|
+
background-color: ${t.palette.gray[100]};
|
|
2863
|
+
border-radius: ${t.spacing[.25]};
|
|
2864
|
+
padding: ${t.spacing[.5]} ${t.spacing[.75]};
|
|
2865
|
+
margin: ${t.spacing[.5]} 0;
|
|
2866
|
+
height: ${t.spacing[2.25]};
|
|
2838
2867
|
|
|
2839
2868
|
span {
|
|
2840
2869
|
text-decoration: underline;
|
|
@@ -2842,7 +2871,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2842
2871
|
}
|
|
2843
2872
|
}
|
|
2844
2873
|
`}
|
|
2845
|
-
`,
|
|
2874
|
+
`,ls=c.st.div`
|
|
2846
2875
|
align-items: center;
|
|
2847
2876
|
background-color: transparent;
|
|
2848
2877
|
display: flex;
|
|
@@ -2890,16 +2919,16 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2890
2919
|
transition: all 150ms;
|
|
2891
2920
|
border-right: 1px solid ${({theme:e})=>e.palette.black};
|
|
2892
2921
|
}
|
|
2893
|
-
`,Tn=()=>{const e=c.Je(),{table:
|
|
2922
|
+
`,Tn=()=>{const e=c.Je(),{table:t}=x.useContext(ee),{groupHeaders:i,tooltips:o}=(t==null?void 0:t.options.meta)??{},r=x.useCallback(p=>()=>{p.column.getCanSort()&&(t==null||t.setPageIndex(0),p.column.toggleSorting())},[t]),a=p=>g=>{p.getResizeHandler()(g)};if(i)return n.jsx("thead",{children:t==null?void 0:t.getHeaderGroups().map(p=>n.jsx("tr",{"data-testid":"row-headers",children:p.headers.map(g=>{var y;const{isPlaceholder:u}=g,f=u?g.subHeaders[0]:g;return c._.isUndefined(g.column.parent)&&g.depth>1?null:n.jsxs("th",{colSpan:f.colSpan,id:`header-${f.id}`,rowSpan:u?0:1,style:{borderRight:g.headerGroup.headers.indexOf(g)!==g.headerGroup.headers.length-1?"1px solid white":void 0,position:"relative",width:g.getSize()},children:[n.jsxs($,{alignItems:"center",bgColor:e.palette.gray[200],borderBottom:u?void 0:`1px solid${e.palette.white}`,display:"flex",gap:.25,height:u?"6rem":"3rem",lineSpacing:0,onClick:r(f),pl:.5,pt:u?3:0,whiteSpace:"nowrap",width:"100%",children:[c.flexRender(f.column.columnDef.header,f.getContext()),f.column.getCanSort()?n.jsx(Ze,{variant:f.column.getIsSorted()}):void 0,(o==null?void 0:o.map(m=>m.columnId).includes(f.id))??!1?n.jsx(J,{icon:"circle-info",id:f.id,place:"right",tip:((y=o==null?void 0:o.find(m=>m.columnId===f.id))==null?void 0:y.tip)??""}):void 0]}),f.column.getCanResize()&&n.jsx(kt,{onMouseDown:a(g)})]},f.id)})},p.id))});const[l,s]=(t==null?void 0:t.getHeaderGroups())??[],d=c.lodashExports.isNil(s)?l:s;return n.jsx("thead",{children:n.jsx("tr",{"data-testid":"row-headers",children:d.headers.map(p=>{var g;return n.jsxs("th",{id:`header-${p.id}`,style:{position:"relative",width:p.getSize()},children:[n.jsxs($,{alignItems:"center",bgColor:e.palette.gray[200],display:"flex",gap:.25,height:"3rem",lineSpacing:0,onClick:r(p),px:.5,whiteSpace:"nowrap",width:"100%",children:[c.flexRender(p.column.columnDef.header,p.getContext()),p.column.getCanSort()?n.jsx(Ze,{variant:p.column.getIsSorted()}):void 0,(o==null?void 0:o.map(u=>u.columnId).includes(p.id))??!1?n.jsx(J,{icon:"circle-info",id:p.id,place:"right",tip:((g=o==null?void 0:o.find(u=>u.columnId===p.id))==null?void 0:g.tip)??""}):void 0]}),p.column.getCanResize()&&n.jsx(kt,{onMouseDown:a(p)})]},p.id)})})})},cs=c.st.div`
|
|
2894
2923
|
align-items: center;
|
|
2895
2924
|
display: flex;
|
|
2896
2925
|
width: 100%;
|
|
2897
|
-
`,En=()=>{const e=c.Je(),{table:
|
|
2898
|
-
${({theme:e,$padding:
|
|
2926
|
+
`,En=()=>{const e=c.Je(),{table:t}=x.useContext(ee),{loading:i}=(t==null?void 0:t.options.meta)??{},o=x.useMemo(()=>{const{enableRowSelection:s,enableMultiRowSelection:d}=(t==null?void 0:t.options)??{};return s||d?1:0},[t==null?void 0:t.options]),r=x.useCallback((s,d)=>{if(d===o)return p=>{var g,u;p.stopPropagation(),(u=(g=t==null?void 0:t.options)==null?void 0:g.onRowClick)==null||u.call(g,s)}},[o,t]),a=x.useCallback(s=>d=>{d.stopPropagation(),s.toggleExpanded()},[]),l=x.useCallback(s=>{const{meta:d}=(t==null?void 0:t.options)??{},{onExpand:p=void 0}=d??{};return p?p(s):null},[t]);return i?n.jsx("tbody",{children:n.jsx("tr",{className:"row-loading","data-testid":"row-loading",children:n.jsx("td",{colSpan:(t==null?void 0:t.getVisibleLeafColumns().length)??0,children:n.jsx($,{alignItems:"center",display:"flex",justify:"center",width:"100%",children:n.jsx($n,{size:"md"})})})})}):(t==null?void 0:t.getRowModel().rows.length)===0?n.jsx("tbody",{children:n.jsx("tr",{className:"row-no-data","data-testid":"row-no-data",children:n.jsx("td",{colSpan:t.getVisibleLeafColumns().length+1,children:n.jsx(I,{color:e.palette.gray[800],size:"sm",textAlign:"center",children:"No data to display"})})})}):n.jsx("tbody",{children:t==null?void 0:t.getRowModel().rows.map(s=>n.jsxs(x.Fragment,{children:[n.jsx("tr",{"aria-expanded":s.getIsExpanded(),"data-testid":`row-${s.id}`,children:s.getVisibleCells().map((d,p)=>n.jsx("td",{className:p===o&&t.options.onRowClick?"clickable":"","data-testid":`cell-${d.id}`,onClick:r(s,p),children:n.jsxs(cs,{children:[p===o&&s.getCanExpand()?n.jsx("button",{onClick:a(s),style:{cursor:"pointer",marginRight:"1rem"},children:n.jsx(R,{icon:s.getIsExpanded()?"angle-up":"angle-down",iconSize:"xs",iconType:"fa-light"})}):void 0,c.flexRender(d.column.columnDef.cell,d.getContext())]})},d.id))}),s.getIsExpanded()?n.jsx("tr",{"data-testid":`row-${s.id}-expand`,id:"description",children:n.jsx("td",{colSpan:100,children:l(s)})}):void 0]},s.id))})},Rn=()=>{const{containerRef:e,hidden:t,elementName:i,handleUnselectAll:o,onKeyDown:r,selected:a,tableSize:l,tableRef:s}=x.useContext(ee);return n.jsxs("div",{ref:e,children:[t?void 0:n.jsx(ss,{$width:l,children:n.jsxs("div",{children:[n.jsx("b",{children:`${a} ${i} `}),`${a===1?"has":"have"} been selected. `,n.jsx("span",{onClick:o,onKeyDown:r,role:"link",tabIndex:0,children:"Unselect all"})]})}),n.jsxs("table",{ref:s,children:[n.jsx(Tn,{}),n.jsx(En,{})]})]})},Ct=c.st(M)`
|
|
2927
|
+
${({theme:e,$padding:t})=>`
|
|
2899
2928
|
background-color: ${e.palette.white};
|
|
2900
2929
|
border: 1px solid ${e.palette.gray[200]};
|
|
2901
2930
|
border-radius: 2px;
|
|
2902
|
-
padding: ${
|
|
2931
|
+
padding: ${t??e.spacing[.25]};
|
|
2903
2932
|
|
|
2904
2933
|
path {
|
|
2905
2934
|
fill: ${e.palette.gray[700]};
|
|
@@ -2920,7 +2949,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2920
2949
|
background-color: ${e.palette.gray[100]};
|
|
2921
2950
|
}
|
|
2922
2951
|
`}
|
|
2923
|
-
`,Dn=()=>{const{table:e}=
|
|
2952
|
+
`,Dn=()=>{const{table:e}=x.useContext(ee),{pagination:{pageIndex:t}={pageIndex:0}}=(e==null?void 0:e.getState())??{},i=(e==null?void 0:e.getPageCount())??0,o=x.useCallback(()=>{e==null||e.setPageIndex(t+1)},[t,e]),r=x.useCallback(()=>{e==null||e.previousPage()},[e]);return n.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[n.jsx(Ct,{$padding:"4px 6px",disabled:!(e!=null&&e.getCanPreviousPage()),icon:"chevron-left",iconSize:"xxs",id:"go-previous",onClick:r,variant:"ghost"}),n.jsx(Ct,{$padding:"4px 6px",disabled:t>i-2,icon:"chevron-right",iconSize:"xxs",id:"go-next",onClick:o,variant:"ghost"})]})},ds=10,ps=20,gs=50,us=100,Nn=()=>{const e=c.Je(),{table:t}=x.useContext(ee),i=(t==null?void 0:t.getRowCount())??0,[o,r]=x.useState(!1),[a,l]=x.useState((t==null?void 0:t.getState().pagination.pageSize)??10),{refs:s,floatingStyles:d}=c.useFloating$1({middleware:[c.offset({mainAxis:4})],open:o,placement:"top-end",whileElementsMounted:c.autoUpdate}),p=x.useMemo(()=>c.transform([ds,ps,gs,us],(h,y)=>(h.push(y),y<=i),[]),[i]),g=x.useCallback(()=>{o&&r(!1)},[o]),u=x.useCallback(()=>{r(h=>!h)},[]),f=x.useCallback(h=>()=>{l(h),t==null||t.setPageSize(h),r(!1)},[t,l]);return Q(s.reference.current,()=>{r(!1)},!0,s.floating.current),x.useEffect(()=>(window.addEventListener("scrollend",g,!0),()=>{window.removeEventListener("scrollend",g,!0)}),[g]),n.jsxs(x.Fragment,{children:[n.jsxs($,{alignItems:"center",bgColor:e.palette.white,border:"1px solid",borderColor:e.palette.gray[200],borderRadius:"4px",display:"flex",minHeight:"24px",px:.25,children:[n.jsx(I,{pr:.25,size:"sm",children:a}),n.jsx(M,{color:e.palette.gray[400],icon:o?"chevron-up":"chevron-down",iconSize:"xxs",id:"paginator-dropdown",onClick:u,ref:s.setReference,variant:"ghost"})]}),o?n.jsx($,{bgColor:e.palette.white,border:`1px solid ${e.palette.gray[200]}`,borderRadius:e.spacing[.5],display:"flex",flexDirection:"column",px:.25,py:.25,ref:s.setFloating,shadow:"md",style:d,children:p.map(h=>{const y=f(h);return n.jsx($,{bgColor:a===h?e.palette.gray[800]:"transparent",bgColorHover:e.palette.gray[a===h?800:100],borderRadius:e.spacing["0.25"],cursor:"pointer",maxWidth:"40px",minWidth:"40px",onClick:y,px:.25,py:.25,children:n.jsx(I,{color:a===h?e.palette.white:e.palette.gray[600],size:"sm",textAlign:"center",children:h})},h)})}):void 0]})},Fn=()=>{const{table:e}=x.useContext(ee),{pagination:{pageIndex:t,pageSize:i}={pageIndex:0,pageSize:10}}=(e==null?void 0:e.getState())??{},o=(e==null?void 0:e.getRowCount())??0,r=x.useCallback((a,l,s)=>{if(s===0)return"0 of 0";if(l*a>=s)return`${s} of ${s}`;const d=l*a+1,p=Math.min(l*(a+1),s);return`${d}-${p} of ${s}`},[]);return n.jsx(I,{display:"inline-block",fontWeight:"bold",size:"sm",children:r(t,i,o)})},An=({children:e})=>n.jsxs(ls,{children:[n.jsxs("div",{className:"pagination-container",children:[n.jsx(Fn,{}),n.jsx(Nn,{}),n.jsx(Dn,{})]}),e]}),Ln=({children:e})=>n.jsx("div",{className:"footer-container",children:e}),xs=c.st.div.attrs({className:"search-container"})`
|
|
2924
2953
|
${({theme:e})=>`
|
|
2925
2954
|
display: flex;
|
|
2926
2955
|
flex-direction: column;
|
|
@@ -2967,7 +2996,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2967
2996
|
}
|
|
2968
2997
|
}
|
|
2969
2998
|
`}
|
|
2970
|
-
`,
|
|
2999
|
+
`,fs=c.st.div.attrs({className:"controls-container"})`
|
|
2971
3000
|
display: flex;
|
|
2972
3001
|
flex: 1 0 50%;
|
|
2973
3002
|
|
|
@@ -2983,7 +3012,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2983
3012
|
justify-content: flex-end;
|
|
2984
3013
|
width: 100%;
|
|
2985
3014
|
}
|
|
2986
|
-
`,
|
|
3015
|
+
`,hs=c.st.div`
|
|
2987
3016
|
display: flex;
|
|
2988
3017
|
flex-wrap: wrap;
|
|
2989
3018
|
width: 100%;
|
|
@@ -2998,7 +3027,7 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
2998
3027
|
.highlight-container ~ .controls-container {
|
|
2999
3028
|
flex: 1 0 100%;
|
|
3000
3029
|
}
|
|
3001
|
-
`,
|
|
3030
|
+
`,ys=500,Pn=({children:e})=>{const{table:t}=x.useContext(ee),{onSearch:i,search:o,searchPlaceholder:r="Search"}=(t==null?void 0:t.options.meta)??{},a=ot(s=>{i==null||i(s.target.value)},ys),l=x.useCallback(()=>{i==null||i("")},[i]);return n.jsxs(hs,{children:[i===void 0?void 0:n.jsx(xs,{children:n.jsx(ae,{name:"search",onChange:a,onClear:l,placeholder:r,value:o})}),e]})},On=({children:e})=>n.jsx($,{display:"flex",flexDirection:"column",children:n.jsx("div",{className:"caption-container",children:e})}),Mn=({children:e})=>n.jsx(fs,{children:e}),Hn=({children:e})=>n.jsx("div",{className:"highlight-container",children:e}),bs=160,Wn=({children:e,table:t})=>{var f;const i=x.useRef(null),o=x.useRef(null),{id:r}=t.options.meta??{},{enableMultiRowSelection:a}=(t==null?void 0:t.options)??{},l=Object.keys(t.getState().rowSelection).length,s=l===1?"item":"items",d=l===0||!a,p=Math.max(((f=i.current)==null?void 0:f.clientWidth)??0,t.getTotalSize()+bs),g=x.useCallback(()=>{t.resetRowSelection()},[t]),u=x.useCallback(h=>{h.key==="Enter"&&g()},[g]);return x.useEffect(()=>{t.setPageIndex(0)},[t]),n.jsx(ee.Provider,{value:{containerRef:i,elementName:s,handleUnselectAll:g,hidden:d,onKeyDown:u,selected:l,tableSize:p,tableRef:o,table:t},children:n.jsx(as,{id:r,children:e})})},$s=Object.assign(Wn,{Caption:On,Columns:In,Content:Rn,Controls:Mn,Export:zn,Footer:An,FooterContent:Ln,Highlighted:Hn,Options:Pn}),ms=c.st.button`
|
|
3002
3031
|
${({theme:e})=>`
|
|
3003
3032
|
align-items: center;
|
|
3004
3033
|
background-color: ${e.palette.white};
|
|
@@ -3040,8 +3069,8 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
3040
3069
|
background-color: ${e.palette.gray[100]};
|
|
3041
3070
|
}
|
|
3042
3071
|
`}
|
|
3043
|
-
`,
|
|
3044
|
-
${({theme:e,$size:
|
|
3072
|
+
`,ws={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},vs=({disabled:e=!1,icon:t,id:i,label:o,name:r,onClick:a,type:l="button",variant:s})=>{const d=c.Je(),p=n.jsxs(ms,{"aria-label":r??void 0,className:s,disabled:e,id:i,onClick:a,type:l,children:[n.jsx(R,{clickable:!1,icon:t??ws[s].icon,iconSize:r===void 0?"xxs":"xs",iconType:"fa-light"}),r??void 0]});return n.jsxs($,{alignItems:"center",display:"flex",children:[p,o&&n.jsx(I,{color:d.palette.gray[800],ml:.5,size:"sm",children:o})]})},js=c.st.div`
|
|
3073
|
+
${({theme:e,$size:t})=>`
|
|
3045
3074
|
align-items: center;
|
|
3046
3075
|
background-color: ${e.palette.white};
|
|
3047
3076
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -3056,16 +3085,16 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
3056
3085
|
p {
|
|
3057
3086
|
font-style: normal;
|
|
3058
3087
|
line-height: ${e.spacing[1.25]};
|
|
3059
|
-
text-align: ${
|
|
3088
|
+
text-align: ${t==="long"?"":"center"};
|
|
3060
3089
|
}
|
|
3061
3090
|
|
|
3062
3091
|
&:hover {
|
|
3063
3092
|
border: 1px solid ${e.palette.gray[600]};
|
|
3064
3093
|
}
|
|
3065
3094
|
`}
|
|
3066
|
-
`,
|
|
3067
|
-
${({theme:e,$size:
|
|
3068
|
-
display: ${
|
|
3095
|
+
`,ks=c.st.div`
|
|
3096
|
+
${({theme:e,$size:t})=>`
|
|
3097
|
+
display: ${t==="long"?"flex":"block"};
|
|
3069
3098
|
flex-direction: column;
|
|
3070
3099
|
gap: ${e.spacing[1.5]};
|
|
3071
3100
|
position: relative;
|
|
@@ -3073,9 +3102,9 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
3073
3102
|
margin: 0 auto 0 auto;
|
|
3074
3103
|
|
|
3075
3104
|
div.timeline-card {
|
|
3076
|
-
width: ${
|
|
3077
|
-
margin-left: ${
|
|
3078
|
-
margin-bottom: ${
|
|
3105
|
+
width: ${t==="long"?"510px":"auto"};
|
|
3106
|
+
margin-left: ${t==="long"?"0px":"30px"};
|
|
3107
|
+
margin-bottom: ${t==="long"?"0px":e.spacing[.5]};
|
|
3079
3108
|
}
|
|
3080
3109
|
|
|
3081
3110
|
&::before {
|
|
@@ -3108,9 +3137,9 @@ ${y[8]}...`:(y.length<8&&p(!1),n)},[l,n,e]),f=u.useMemo(x,[x]),h=u.useCallback(a
|
|
|
3108
3137
|
&::before,
|
|
3109
3138
|
> *::before {
|
|
3110
3139
|
content: "";
|
|
3111
|
-
left: ${
|
|
3140
|
+
left: ${t==="long"?"50%":"0px"};
|
|
3112
3141
|
position: absolute;
|
|
3113
3142
|
transform: translateX(-50%);
|
|
3114
3143
|
}
|
|
3115
3144
|
`}
|
|
3116
|
-
`,Bn=({date:e,description:
|
|
3145
|
+
`,Bn=({date:e,description:t,title:i,size:o="long"})=>{const r=c.Je();return n.jsxs(js,{$size:o,className:"timeline-card",children:[n.jsx(I,{color:r.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:e}),n.jsx(I,{color:r.palette.gray[800],fontWeight:"bold",lineSpacing:1.5,mb:.5,size:"md",textAlign:"center",children:i}),n.jsx("div",{children:t.map((a,l)=>{const s=`${a}#${l}`;return n.jsx(I,{size:"sm",textAlign:"center",wordBreak:"break-word",children:a},s)})})]})},Cs=({items:e})=>{const t=x.useRef(null),[i,o]=x.useState("long");return x.useEffect(()=>{t.current&&o(t.current.offsetWidth<=1100?"small":"long")},[]),n.jsx($,{ref:t,width:"100%",children:n.jsx(ks,{$size:i,children:e.map((r,a)=>n.jsx(Bn,{date:r.date,description:r.description,size:i,title:r.title},`${r.title}-${a}`))})})},Ss={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:""},zs=({run:e,steps:t,onFinish:i})=>{const[o,r]=x.useState(e),[a,l]=x.useState(0),s=x.useCallback(d=>{const{action:p,index:g,status:u,type:f}=d;[c.EVENTS.STEP_AFTER,c.EVENTS.TARGET_NOT_FOUND].includes(f)?l(g+(p===c.ACTIONS.PREV?-1:1)):([c.STATUS.FINISHED,c.STATUS.SKIPPED].includes(u)||p==="close")&&(r(!1),c.lodashExports.isUndefined(i)||i())},[i]);return n.jsx(c.components_default,{callback:s,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:o,spotlightClicks:!0,stepIndex:a,steps:t,styles:{buttonNext:{display:a===t.length-1?"none":"block"},options:{zIndex:9999}}})};exports.Accordion=wi;exports.AccordionContent=It;exports.ActionButton=Ge;exports.Alert=Ri;exports.AppliedFilter=pe;exports.AppliedFilters=kr;exports.ArrayField=Ve;exports.Avatar=Oi;exports.BaseButtonComponent=Xe;exports.BaseComponent=ke;exports.BaseSpanComponent=et;exports.BaseTextComponent=Qe;exports.Body=En;exports.Button=P;exports.Button$1=Te;exports.ButtonToolbarCenter=po;exports.ButtonToolbarRow=uo;exports.ButtonToolbarStartRow=go;exports.Calendar=Lt;exports.Calendar$1=Wt;exports.Calendar$2=_t;exports.CalendarCell=At;exports.CalendarGrid=Ne;exports.CaptionContent=On;exports.CardContainer=Jo;exports.CardHeader=De;exports.CardWithImage=Wi;exports.CardWithInput=Do;exports.CardWithOptions=ln;exports.CardWithSelector=Mo;exports.CardWithSwitch=Bo;exports.Carousel=qo;exports.Checkbox=oe;exports.CodeSnippet=Xo;exports.Col=Je;exports.ColumFilters=hn;exports.ColumnToggle=In;exports.ColumnsModal=pn;exports.ComboBox=nt;exports.ComboBoxField=_e;exports.Container=$;exports.ControlsContent=Mn;exports.CopyButton=Ar;exports.CustomThemeProvider=ui;exports.DateField=Ot;exports.DateSelector=xe;exports.Description=kn;exports.Dialog=Ae;exports.Divider=re;exports.Dropdown=Or;exports.Editable=co;exports.EmptyButton=Ke;exports.EmptyState=Br;exports.ErrorMessage=Ji;exports.ExportCsv=zn;exports.FilePreview=Dt;exports.FilterControl=gn;exports.FilterForm=Ye;exports.FilterFormContent=un;exports.FiltersList=fn;exports.FooterContent=Ln;exports.Form=Vr;exports.Gap=ho;exports.GridContainer=Gr;exports.GroupSelector=Kr;exports.Head=Tn;exports.Header=Fe;exports.Header$1=tn;exports.Heading=Z;exports.HighlightedContent=Hn;exports.Icon=R;exports.IconButton=M;exports.InProgressIcon=vn;exports.IndicatorCard=qr;exports.InfoSidebar=Zr;exports.InnerForm=_r;exports.InputArray=bo;exports.InputDate=Ht;exports.InputDateRange=Bt;exports.InputDateTime=lo;exports.InputFile=vo;exports.InputNumber=Vt;exports.InputNumberRange=Ut;exports.InputTags=ko;exports.Label=tt;exports.Link=X;exports.ListItem=ze;exports.ListItemsWrapper=an;exports.LittleFlag=Qr;exports.Loading=$n;exports.LocationCode=Xt;exports.Logo=la;exports.Lottie=da;exports.MemoizedImage=te;exports.Menu=pa;exports.MenuItem=Cn;exports.MessageBanner=ua;exports.Modal=lt;exports.ModalConfirm=nn;exports.ModalFooter=en;exports.Notification=ya;exports.NotificationSign=on;exports.NumberField=Re;exports.NumberInput=ma;exports.OAuthSelector=va;exports.Option=Nt;exports.OptionBoxContainer=ct;exports.OptionContainer=qe;exports.OptionContainer$1=bn;exports.OutlineContainer=_;exports.PaginationControl=Dn;exports.PaginationDropdown=Nn;exports.PaginationSize=Fn;exports.PhoneInput=Eo;exports.PopUp=Aa;exports.Popover=Ce;exports.PremiumFeature=mn;exports.PreviewPanel=sn;exports.PriorityScore=ka;exports.ProgressBar=wn;exports.ProgressIndicator=Fa;exports.ProgressStep=Da;exports.RadioButton=rt;exports.Row=Jt;exports.ScrollUpButton=Pa;exports.Search=ae;exports.SearchPanel=dn;exports.SeverityBadge=Ma;exports.SeverityOverview=Wa;exports.SeverityOverviewBadge=ge;exports.ShowOnHover=_a;exports.SlideOutMenu=Va;exports.Slider=Za;exports.SortIcon=Ze;exports.Span=ue;exports.StepLapse=is;exports.Tab=rn;exports.Table=$s;exports.Table$1=Wn;exports.TableButton=vs;exports.TableContent=Rn;exports.TableContext=ee;exports.TableFooter=An;exports.TableOptions=Pn;exports.Tabs=st;exports.Tag=U;exports.TagsField=Ue;exports.Text=I;exports.TextArea=Ro;exports.TextInput=Le;exports.Thumb=Sn;exports.TimeField=Mt;exports.TimeLine=Cs;exports.TimeLineCard=Bn;exports.Toggle=qt;exports.Tooltip=J;exports.Tour=zs;exports.baseStep=Ss;exports.formatCheckValues=yn;exports.getStyledConfig=je;exports.hiddenProps=St;exports.icons=pi;exports.setBorder=$e;exports.setDisplay=me;exports.setInteraction=ve;exports.setMargin=ye;exports.setPadding=he;exports.setPosition=be;exports.setText=we;exports.theme=D;exports.uniqueIcons=gi;exports.useCarousel=Gt;exports.useClickOutside=Q;exports.useCloudinaryImage=Yt;exports.useColumnsModal=Kt;exports.useConditionsDialog=Dr;exports.useConfirmDialog=Nr;exports.useDebouncedCallback=ot;exports.useFilterForm=xn;exports.useFilters=Rr;exports.useModal=Se;exports.useSearch=Ao;exports.variantBuilder=q;
|