@fluidattacks/design 3.11.3 → 3.12.0-pr
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/@core/index.js +1 -1
- package/dist/components/accordion/accordion-content/index.js +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/card-header/index.js +1 -1
- package/dist/components/card/card-with-image/index.js +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-options/index.js +1 -1
- package/dist/components/card/card-with-selector/index.js +1 -1
- package/dist/components/card/card-with-switch/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/content-card/category-tag/index.js +1 -1
- package/dist/components/content-card/event-date/index.js +1 -1
- package/dist/components/content-card/index.js +1 -1
- package/dist/components/content-card-carousel/index.js +1 -1
- package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/interactive-card/icon/index.js +1 -1
- package/dist/components/interactive-card/index.js +1 -1
- package/dist/components/language-selector/index.js +1 -1
- package/dist/components/language-selector/item-list/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/logo-carousel/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/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/filters-modal/single-column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/two-columns-filters/index.js +1 -1
- package/dist/components/modal/footer/index.js +1 -1
- package/dist/components/modal/header/index.js +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/modal/modal-confirm/index.js +1 -1
- package/dist/components/notification/index.js +1 -1
- package/dist/components/notification-sign/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/oauth-selector/index.js +1 -1
- package/dist/components/oauth-selector/option-container/index.js +1 -1
- package/dist/components/plan-card/index.js +1 -1
- package/dist/components/plan-card/recommended-tag/index.js +1 -1
- package/dist/components/pop-up/description/index.js +1 -1
- package/dist/components/pop-up/index.js +1 -1
- package/dist/components/premium-feature/index.js +1 -1
- package/dist/components/priority-score/index.js +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress-bar/index.js +1 -1
- package/dist/components/radio-button/index.js +1 -1
- package/dist/components/scroll-button/index.js +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-bar/item-searching/index.js +1 -1
- package/dist/components/severity-badge/index.js +1 -1
- package/dist/components/severity-overview/badge/index.js +1 -1
- package/dist/components/severity-overview/index.js +1 -1
- package/dist/components/show-on-hover/index.js +1 -1
- package/dist/components/slide-out-menu/index.js +1 -1
- package/dist/components/slide-out-menu/menu-item/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/thumb/index.js +1 -1
- package/dist/components/step-lapse/index.js +1 -1
- package/dist/components/table-button/index.js +1 -1
- package/dist/components/tabs/fixed-tabs/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tab/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle-buttons/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +1 -1
- package/dist/components/typography/heading/index.js +1 -1
- package/dist/components/typography/index.js +1 -1
- package/dist/components/typography/span/index.js +1 -1
- package/dist/components/typography/text/index.js +1 -1
- package/dist/components/web-form/index.js +1 -1
- package/dist/{components-Du5Z27yt.js → components-BubXIzE3.js} +110 -110
- package/dist/{components-B9vg1gCW.mjs → components-Cpk5M9dJ.mjs} +844 -842
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),x=require("react"),s=require("./vendor-DX1twqiV.js"),G=require("react-dom"),De=require("react-router-dom"),U=e=>({getVariant:(n,i)=>e(n)[i]}),xt=["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"],jn={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},kn={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},vn={25:"",50:"",100:"#ffe6ff",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},Cn={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},Sn={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#dc6803",700:"#b54708",800:"",900:""},zn={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},In={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},Tn={"01":"linear-gradient(45deg, #f32637 0%, #b8075d 100%)","02":"linear-gradient(45deg, #fcfcfd 0%, #667085 100%)"},Fn={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"}},Nn={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)"},En={mobile:"480px",tablet:"960px",sm:"1024px",md:"1440px",lg:"1920px"},Rn={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"},Dn=["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"],Pn=[["fal","arrow-down"],["fal","arrow-left"],["fal","arrow-right"],["fal","arrow-up"],["fal","plus"],["fal","minus"],["fas","check"],["fas","circle-question"]],S={typography:Fn,shadows:Nn,breakpoints:En,spacing:Rn,palette:{primary:kn,complementary:vn,error:Cn,info:In,warning:Sn,success:zn,black:"#0c111d",white:"#ffffff",gray:jn,gradients:Tn}},Ln=({children:e})=>t.jsx(s.ot,{theme:S,children:e}),T=(e,n)=>n===void 0?"":`${e}: ${n};`,se=e=>{const n=e.py??e.pt??0,i=e.px??e.pr??0,a=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[o,l,c,d]=e.padding;return`padding: ${S.spacing[o]} ${S.spacing[l]} ${S.spacing[c]} ${S.spacing[d]};`}return`padding: ${S.spacing[n]} ${S.spacing[i]} ${S.spacing[a]} ${S.spacing[r]};`},le=e=>{const n=e.my??e.mt??0,i=e.mx??e.mr??0,a=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[o,l,c,d]=e.margin;return`margin: ${S.spacing[o]} ${S.spacing[l]} ${S.spacing[c]} ${S.spacing[d]};`}return`margin: ${S.spacing[n]} ${S.spacing[i]} ${S.spacing[a]} ${S.spacing[r]};`},ce=e=>{const n=T("position",e.position),i=T("top",e.top),a=T("right",e.right),r=T("bottom",e.bottom),o=T("left",e.left),l=T("z-index",e.zIndex);return`
|
|
2
2
|
${n}
|
|
3
3
|
${i}
|
|
4
4
|
${a}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`},Wn=e=>e.includes("x")?"overflow-x: auto;":"",An=e=>e.includes("y")?"overflow-y: auto;":"",pe=e=>{const n=e.scroll?`
|
|
17
17
|
${Wn(e.scroll)}
|
|
18
18
|
${An(e.scroll)}
|
|
19
|
-
`:"",i=T("visibility",e.visibility),a=T("display",e.display),r=T("height",e.height),o=T("width",e.width),l=T("max-height",e.maxHeight),c=T("max-width",e.maxWidth),d=T("min-height",e.minHeight),p=T("min-width",e.minWidth),
|
|
19
|
+
`:"",i=T("visibility",e.visibility),a=T("display",e.display),r=T("height",e.height),o=T("width",e.width),l=T("max-height",e.maxHeight),c=T("max-width",e.maxWidth),d=T("min-height",e.minHeight),p=T("min-width",e.minWidth),g=T("box-shadow",e.shadow?S.shadows[e.shadow]:void 0),u=T("gap",e.gap===void 0?void 0:S.spacing[e.gap]),f=T("background-color",e.bgColor),h=T("background",e.bgGradient),y=T("flex-direction",e.flexDirection),$=T("flex-grow",e.flexGrow),m=T("justify-content",e.justify),w=T("justify-self",e.justifySelf),j=T("align-items",e.alignItems),I=T("align-self",e.alignSelf),z=T("flex-wrap",e.wrap);return`
|
|
20
20
|
${n}
|
|
21
21
|
${i}
|
|
22
22
|
${a}
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
${c}
|
|
27
27
|
${d}
|
|
28
28
|
${p}
|
|
29
|
-
${
|
|
29
|
+
${g}
|
|
30
30
|
${f}
|
|
31
31
|
${h}
|
|
32
|
-
${
|
|
32
|
+
${u}
|
|
33
33
|
${y}
|
|
34
|
-
${
|
|
34
|
+
${$}
|
|
35
35
|
${m}
|
|
36
36
|
${w}
|
|
37
|
-
${
|
|
37
|
+
${j}
|
|
38
38
|
${I}
|
|
39
39
|
${z}
|
|
40
|
-
`},ge=e=>{const n=T("color",e.color),i=T("font-family",e.fontFamily),a=T("font-size",e.fontSize),r=T("font-weight",e.fontWeight),o=T("line-spacing",e.letterSpacing),l=T("line-height",e.lineSpacing),c=T("text-align",e.textAlign),d=T("text-decoration",e.textDecoration),p=T("text-overflow",e.textOverflow),
|
|
40
|
+
`},ge=e=>{const n=T("color",e.color),i=T("font-family",e.fontFamily),a=T("font-size",e.fontSize),r=T("font-weight",e.fontWeight),o=T("line-spacing",e.letterSpacing),l=T("line-height",e.lineSpacing),c=T("text-align",e.textAlign),d=T("text-decoration",e.textDecoration),p=T("text-overflow",e.textOverflow),g=T("white-space",e.whiteSpace),u=T("word-break",e.wordBreak),f=T("word-wrap",e.wordWrap);return`
|
|
41
41
|
${n}
|
|
42
42
|
${i}
|
|
43
43
|
${a}
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
${c}
|
|
48
48
|
${d}
|
|
49
49
|
${p}
|
|
50
|
+
${g}
|
|
50
51
|
${u}
|
|
51
|
-
${x}
|
|
52
52
|
${f}
|
|
53
53
|
`},ue=e=>{const n=T("cursor",e.cursor),i=T("border-color",e.borderColorHover),a=T("background-color",e.bgColorHover),r=T("box-shadow",e.shadowHover===void 0?void 0:S.shadows[e.shadowHover]),o=T("transition",e.transition);return`
|
|
54
54
|
${n}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
${a}
|
|
60
60
|
${r}
|
|
61
61
|
}
|
|
62
|
-
`},xe=()=>({shouldForwardProp:e=>!
|
|
62
|
+
`},xe=()=>({shouldForwardProp:e=>!xt.includes(e)}),Q=s.dt.div.withConfig(xe())`
|
|
63
63
|
${se}
|
|
64
64
|
${le}
|
|
65
65
|
${ce}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
${ge}
|
|
68
68
|
${de}
|
|
69
69
|
${ue}
|
|
70
|
-
`,
|
|
70
|
+
`,_e=s.dt.button.withConfig(xe())`
|
|
71
71
|
${se}
|
|
72
72
|
${le}
|
|
73
73
|
${ce}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
${ge}
|
|
76
76
|
${de}
|
|
77
77
|
${ue}
|
|
78
|
-
`,
|
|
78
|
+
`,Ge=s.dt.p.withConfig(xe())`
|
|
79
79
|
${se}
|
|
80
80
|
${le}
|
|
81
81
|
${ce}
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
${ge}
|
|
84
84
|
${de}
|
|
85
85
|
${ue}
|
|
86
|
-
`,
|
|
86
|
+
`,Ue=s.dt.span.withConfig(xe())`
|
|
87
87
|
${se}
|
|
88
88
|
${le}
|
|
89
89
|
${ce}
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
${ge}
|
|
92
92
|
${de}
|
|
93
93
|
${ue}
|
|
94
|
-
`,
|
|
94
|
+
`,Bn=s.dt(Q)`
|
|
95
95
|
${({theme:e,$center:n=!1,$styleMd:i,$styleSm:a})=>`
|
|
96
96
|
${n?"margin: auto;":""}
|
|
97
97
|
scrollbar-color: ${e.palette.gray[600]} ${e.palette.gray[100]};
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
${a};
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
|
-
|
|
112
|
-
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$size:p,$sizeMd:
|
|
111
|
+
`,b=x.forwardRef(function({as:n="div",center:i,children:a,id:r,onHover:o,onLeave:l,styleMd:c,styleSm:d,...p},g){return t.jsx(Bn,{$center:i,$styleMd:c,$styleSm:d,as:n,id:r,onMouseLeave:l,onMouseOver:o,ref:g,...p,children:a})}),Mn=s.dt(Ge)`
|
|
112
|
+
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:u,$textFill:f="unset",$whiteSpace:h="pre-line",$wordBreak:y="normal"})=>`
|
|
113
113
|
background: ${n};
|
|
114
114
|
color: ${i};
|
|
115
115
|
display: ${a};
|
|
@@ -129,16 +129,16 @@
|
|
|
129
129
|
and (min-width: ${e.breakpoints.mobile})
|
|
130
130
|
and (max-width: ${e.breakpoints.tablet})
|
|
131
131
|
{
|
|
132
|
-
font-size: ${e.typography.heading[
|
|
132
|
+
font-size: ${e.typography.heading[g??p]};
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
136
|
-
font-size: ${e.typography.heading[
|
|
136
|
+
font-size: ${e.typography.heading[u??p]};
|
|
137
137
|
line-height: ${e.spacing[d??c]};
|
|
138
138
|
}
|
|
139
139
|
`}
|
|
140
|
-
`,
|
|
141
|
-
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$letterSpacing:l=0,$lineSpacing:c=1.25,$lineSpacingSm:d,$size:p,$sizeMd:
|
|
140
|
+
`,ft=s.dt(Ge)`
|
|
141
|
+
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$letterSpacing:l=0,$lineSpacing:c=1.25,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:u,$textFill:f="unset",$whiteSpace:h="pre-line",$wordBreak:y="normal"})=>`
|
|
142
142
|
background: ${n};
|
|
143
143
|
color: ${i};
|
|
144
144
|
display: ${a};
|
|
@@ -158,15 +158,15 @@
|
|
|
158
158
|
and (min-width: ${e.breakpoints.mobile})
|
|
159
159
|
and (max-width: ${e.breakpoints.tablet})
|
|
160
160
|
{
|
|
161
|
-
font-size: ${e.typography.text[
|
|
161
|
+
font-size: ${e.typography.text[g??p]};
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
165
|
-
font-size: ${e.typography.text[
|
|
165
|
+
font-size: ${e.typography.text[u??p]};
|
|
166
166
|
line-height: ${e.spacing[d??c]};
|
|
167
167
|
}
|
|
168
168
|
`}
|
|
169
|
-
`,
|
|
169
|
+
`,Hn=s.dt(Ue)`
|
|
170
170
|
${({theme:e,$color:n=e.palette.gray[600],$content:i=void 0,$display:a="inline",$fontWeight:r="regular",$size:o,$lineSpacing:l=1.25})=>`
|
|
171
171
|
color: ${n};
|
|
172
172
|
display: ${a};
|
|
@@ -178,11 +178,11 @@
|
|
|
178
178
|
|
|
179
179
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
180
180
|
`}
|
|
181
|
-
`,A=
|
|
181
|
+
`,A=x.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:f,sizeSm:h,textFill:y,whiteSpace:$,wordBreak:m,...w},j){return t.jsx(Mn,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:u,$sizeMd:f,$sizeSm:h,$textFill:y,$whiteSpace:$,$wordBreak:m,className:a,ref:j,...w,children:i})}),ae=x.forwardRef(function({children:n,color:i,content:a,display:r,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:f,...h},y){return t.jsx(Hn,{$color:i,$content:a,$display:r,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:f,ref:y,...h,children:n})}),v=x.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,size:u,sizeMd:f,sizeSm:h,textFill:y,whiteSpace:$,wordBreak:m,...w},j){return t.jsx(ft,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$size:u,$sizeMd:f,$sizeSm:h,$textFill:y,$whiteSpace:$,$wordBreak:m,className:a,ref:j,...w,children:i})}),ht=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(v,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs(b,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[n,e.extraElement?t.jsx(b,{children:e.extraElement}):void 0]})},On={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Vn=s.dt(Ue)`
|
|
182
182
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:a,$rotation:r,$size:o,$secondaryColor:l})=>{const c=a?"":"brightness(50%)",d=a??"";return`
|
|
183
183
|
color: ${n};
|
|
184
184
|
cursor: ${e?"pointer":"inherit"};
|
|
185
|
-
font-size: ${
|
|
185
|
+
font-size: ${On[o]};
|
|
186
186
|
line-height: 0;
|
|
187
187
|
vertical-align: middle;
|
|
188
188
|
pointer-events: inherit;
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
&:hover:not([disabled]) {
|
|
215
215
|
transform: scale(1.2);
|
|
216
216
|
}
|
|
217
|
-
`;const C=
|
|
217
|
+
`;const C=x.forwardRef(function({clickable:n,disabled:i,hoverColor:a,icon:r,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:u,rotation:f,spanClass:h,secondaryColor:y,...$},m){return t.jsx(Vn,{$clickable:n,$color:l,$disabled:i,$hoverColor:a,$rotation:f,$secondaryColor:y,$size:d,className:h,"data-testid":`${r}-icon`,onClick:u,ref:m,...$,children:t.jsx("i",{className:`${g} fa-${r} ${o}`,...c!==void 0?{"data-fa-mask":c}:{},...p!==void 0?{"data-fa-transform":p}:{}})},`${g}-${r}`)}),_n=x.forwardRef(function({aligned:n="end",items:i,bgColor:a},r){const o=s.nt(),[l,c]=x.useState(!1),[d,p]=x.useState(-1),g=x.useCallback(u=>()=>{p(u),c(u===d?f=>!f:!0)},[d]);return t.jsx(b,{ref:r,children:i.map((u,f)=>{const h=f===d&&l;return t.jsxs(b,{bgColor:a??o.palette.white,children:[t.jsx(b,{"aria-controls":`panel-${u.title}`,"aria-expanded":l,"aria-label":u.title,as:"button",bgColor:a??o.palette.white,bgColorHover:o.palette.gray[100],borderBottom:h||f===i.length-1?"1px solid":void 0,borderColor:o.palette.gray[200],borderTop:"1px solid",cursor:"pointer",display:"flex",onClick:g(f),padding:[.75,.75,.75,.75],width:"100%",children:t.jsxs(b,{as:"summary",display:"flex",flexDirection:n==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[t.jsx(v,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:u.title}),t.jsx(C,{icon:h?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),h&&t.jsx(ht,{item:u})]},u.title)})})}),Gn=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:Un}=U(e=>({error:`
|
|
218
218
|
background: ${e.palette.error[50]};
|
|
219
219
|
border: 1px solid ${e.palette.error[500]};
|
|
220
220
|
color: ${e.palette.error[700]};
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
background-color: ${e.palette.primary[500]};
|
|
366
366
|
color: ${e.palette.white};
|
|
367
367
|
}
|
|
368
|
-
`})),
|
|
368
|
+
`})),bt=s.dt(_e)`
|
|
369
369
|
${({theme:e,$size:n,$variant:i})=>`
|
|
370
370
|
align-items: center;
|
|
371
371
|
border-radius: var(--btn-spacing);
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
|
|
390
390
|
${qn(e,i??"primary")}
|
|
391
391
|
`}
|
|
392
|
-
`,Xn=s.dt(
|
|
392
|
+
`,Xn=s.dt(bt)`
|
|
393
393
|
${({theme:e,$borderRadius:n="4px",$px:i=.5,$py:a=.5})=>`
|
|
394
394
|
--btn-spacing: ${n};
|
|
395
395
|
--btn-padding-x: ${e.spacing[i]};
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
width: max-content;
|
|
415
415
|
z-index: 999999;
|
|
416
416
|
`}
|
|
417
|
-
`,Y=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:
|
|
417
|
+
`,Y=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:f="",hide:h=u===""&&f===""&&p===void 0,width:y})=>{const $=s.nt(),[m,w]=x.useState(!1),{refs:j,floatingStyles:I,context:z}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:w,open:m,placement:g,whileElementsMounted:s.autoUpdate}),k=s.useHover(z,{delay:{close:0,open:500},move:!1}),N=s.useFocus(z),F=s.useRole(z,{role:r?"label":"tooltip"}),{getReferenceProps:L,getFloatingProps:W}=s.useInteractions([k,N,F]);return n?t.jsx(x.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Zn,{...L(),display:i,height:a,id:c,ref:j.setReference,width:y,children:r?t.jsx(C,{clickable:!0,disabled:n,icon:r,iconColor:o,iconSize:l??"xxs",iconType:m?"fa-solid":"fa-light"}):e}),m&&!h&&G.createPortal(t.jsxs(Jn,{...W(),$maxWidth:d,id:`floating-${c}`,ref:j.setFloating,style:I,children:[s.lodashExports.isEmpty(f)?void 0:t.jsx(v,{color:$.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:f}),s.lodashExports.isEmpty(u)?void 0:t.jsx(v,{color:$.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},B=x.forwardRef(function({borderRadius:n,disabled:i,icon:a,iconColor:r,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:u,py:f,type:h="button",tooltip:y,tooltipPlace:$,value:m,variant:w="primary",...j},I){const z=t.jsx(Xn,{$borderRadius:n,$px:u,$py:f,$variant:w,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:p,onClick:g,ref:I,type:h,value:m,...j,children:t.jsx(C,{clickable:!1,icon:a,iconColor:r,iconSize:o,iconTransform:l,iconType:c})}),N=(h+(w??"")+(d??a)).replace(/ /u,"_");return y===void 0?z:t.jsx(Y,{id:`${N}-tooltip`,place:$,tip:y,children:z})}),Qn=x.forwardRef(function({autoHide:n=!1,children:i,closable:a=!1,onTimeOut:r,show:o=!0,time:l=8,variant:c="error",id:d,...p},g){const[u,f]=x.useState(o),h=x.useCallback(()=>{f(!1)},[]);return x.useEffect(()=>{const y=setTimeout(()=>{r==null||r(!0),n&&h()},l*1e3);return()=>{clearTimeout(y)}},[n,h,l,r]),x.useEffect(()=>{f(o)},[o,f]),t.jsx(b,{display:u?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(Yn,{$variant:c,id:d,children:[t.jsx(C,{clickable:!1,icon:Gn(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(Kn,{children:i}),a?t.jsx(B,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),it=s.dt.div`
|
|
418
418
|
${({theme:e})=>`
|
|
419
419
|
align-items: center;
|
|
420
420
|
background-color: ${e.palette.gray[200]};
|
|
@@ -604,7 +604,7 @@
|
|
|
604
604
|
&:hover:not([disabled]) {
|
|
605
605
|
color: ${e.palette.gray[500]};
|
|
606
606
|
}
|
|
607
|
-
`}))
|
|
607
|
+
`})),$t=s.lt`
|
|
608
608
|
${({theme:e,$color:n,$variant:i})=>`
|
|
609
609
|
align-items: center;
|
|
610
610
|
cursor: pointer;
|
|
@@ -629,10 +629,10 @@
|
|
|
629
629
|
${n?`color: ${n}`:ii(e,i)}
|
|
630
630
|
`}
|
|
631
631
|
`,ai=s.dt.a`
|
|
632
|
-
${
|
|
633
|
-
`,ri=s.dt(
|
|
634
|
-
${
|
|
635
|
-
`,X=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(C,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(ai,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(ri,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},K=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:
|
|
632
|
+
${$t}
|
|
633
|
+
`,ri=s.dt(De.Link)`
|
|
634
|
+
${$t}
|
|
635
|
+
`,X=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(C,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(ai,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(ri,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},K=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:f,variant:h="default"})=>{const y=f.length>25&&s.lodashExports.isEmpty(u+o),$=`${f.slice(0,25)}...`;return t.jsxs(ae,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(ni,{$fontSize:l,$variant:h,className:g,children:[n&&t.jsx(C,{icon:n,iconColor:i,iconSize:"xxs",iconType:a}),t.jsxs("span",{children:[t.jsx("strong",{children:u}),t.jsx("span",{children:y?$:f}),t.jsx("strong",{children:o})]}),p?t.jsx(B,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(X,{href:c,children:d})]})},oi=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},R=x.forwardRef(function({children:n,disabled:i=!1,external:a=!1,fontSize:r,href:o,id:l,icon:c,name:d,onClick:p,showArrow:g=!1,tag:u,type:f="button",tooltip:h,tooltipPlace:y="bottom",underline:$=!1,value:m,variant:w="primary",...j},I){const z=h!==void 0,k=`${l}-tooltip`,N=x.useCallback(()=>{o&&oi(o,a)},[a,o]);return t.jsx(Y,{disabled:!z,id:k,place:y,tip:h,children:t.jsxs(bt,{$size:r,$variant:w,"aria-disabled":i,className:$?"underline":void 0,disabled:i,id:l,name:d,onClick:w==="link"?N:p,ref:I,type:f,value:m,...z?{"data-tooltip-id":k}:{},...j,children:[c!==void 0&&t.jsx(C,{icon:c,iconSize:"xs",iconType:"fa-light"}),n,(g||w==="link")&&t.jsx(C,{icon:"arrow-right",iconSize:"xs",iconType:"fa-light"}),u===void 0?null:t.jsx(K,{tagLabel:u,variant:"inactive"})]})})}),si=x.forwardRef(function({children:n,onClick:i,userName:a,showIcon:r=!1,showUsername:o=!1},l){const c=!!i;return t.jsx(b,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs(b,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(R,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(it,{children:a[0].toUpperCase()}),o?t.jsx(v,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:a.split(" ")[0]}):void 0,r?t.jsx(C,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs(b,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(it,{children:a[0].toUpperCase()}),o?t.jsxs(v,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",a.split(" ")[0],"!"]}):void 0,r?t.jsx(C,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(ei,{children:n})]})})}),Se=({authorEmail:e,date:n,description:i,descriptionColor:a,id:r,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs(b,{width:"100%",children:[typeof o=="string"?t.jsx(v,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:c,wordBreak:"break-word",children:o}):o,t.jsxs(b,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(v,{color:a??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:i}),n&&t.jsx(v,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(v,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(Y,{icon:"circle-info",id:r,tip:p})]})]})},at=s.dt(b).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
636
636
|
& img {
|
|
637
637
|
display: block;
|
|
638
638
|
}
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
pointer-events: none;
|
|
648
648
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
649
649
|
}
|
|
650
|
-
`,li=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},ci=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,li(n))
|
|
650
|
+
`,li=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},ci=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,li(n)),yt=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto"})=>n==="video"||ci(["webm"],r)?t.jsx(at,{$opacity:a,children:t.jsxs("video",{controls:!0,muted:!0,style:{height:o,width:i},children:[t.jsx("source",{src:r,type:"video/webm"}),t.jsx(X,{href:r,iconPosition:"hidden",children:r})]})}):t.jsx(at,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:i}})}),di=({alt:e,authorEmail:n,date:i,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0})=>{const f=s.nt(),[h,y]=x.useState(!1),$=x.useCallback(()=>{y(!0)},[]),m=x.useCallback(()=>{y(!1)},[]);return t.jsxs(b,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:f.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:$,onLeave:m,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx(b,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(x.Fragment,{children:[t.jsx(yt,{alt:e,fileType:g,height:"147px",opacity:h?.3:0,src:r,width:"100%"}),u?t.jsx(b,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(B,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),p?null:t.jsx(Se,{authorEmail:n,date:i,description:a,descriptionColor:f.palette.gray[600],id:`${e}-card-header`,title:d})]})},pi=s.dt.div`
|
|
651
651
|
${({theme:e,$align:n="center",$minWidth:i="auto",$minHeight:a="auto"})=>`
|
|
652
652
|
display: flex;
|
|
653
653
|
background-color: ${e.palette.white};
|
|
@@ -666,7 +666,7 @@
|
|
|
666
666
|
text-align: ${n};
|
|
667
667
|
}
|
|
668
668
|
`}
|
|
669
|
-
`,
|
|
669
|
+
`,Ye=({htmlFor:e,label:n,link:i,required:a,tooltip:r,weight:o="normal"})=>{const l=s.nt(),c=`${e}-tooltip`,d=r!==void 0&&!s.lodashExports.isEmpty(r);return t.jsxs("label",{className:`flex font-${o} gap-1 w-full`,htmlFor:e,children:[n,a&&t.jsx(C,{icon:"asterisk",iconColor:l.palette.error[500],iconSize:"xxss"}),i?t.jsx(X,{href:i,target:"_blank"}):null,d?t.jsx(Y,{display:"inline-flex",icon:"circle-info",id:c,place:"top",tip:r}):null]})},gi=s.dt.div`
|
|
670
670
|
${({theme:e})=>`
|
|
671
671
|
align-items: flex-start;
|
|
672
672
|
display: inline-flex;
|
|
@@ -805,7 +805,7 @@
|
|
|
805
805
|
border: 1px solid ${e.palette.gray[600]};
|
|
806
806
|
}
|
|
807
807
|
`}
|
|
808
|
-
`,
|
|
808
|
+
`,H=({children:e,error:n,helpLink:i,helpLinkText:a="Link here",helpText:r,htmlFor:o,label:l,linkPosition:c="down",maxLength:d,required:p,tooltip:g,value:u,weight:f})=>{const h=s.nt(),y=u?u.length:0;return t.jsxs(gi,{children:[l===void 0?void 0:t.jsx(Ye,{htmlFor:o,label:l,link:c==="up"?i:void 0,required:p,tooltip:g,weight:f}),e,n||d?t.jsxs(b,{display:"flex",justify:n===void 0?"end":"space-between",width:"100%",children:[n&&t.jsx(v,{className:"error-msg",color:h.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:n}),d&&t.jsx(K,{priority:"low",tagLabel:`${y}/${d}`,variant:"error"})]}):void 0,r||i?t.jsxs(b,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[r&&t.jsxs(t.Fragment,{children:[t.jsx(C,{icon:"circle-info",iconColor:h.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(v,{color:h.palette.gray[400],display:"inline-block",size:"sm",children:r})]}),i&&c==="down"?t.jsx(X,{href:i,children:a}):void 0]}):void 0]})},fe=({className:e,children:n,isFilter:i=!1,popoverRef:a,state:r,triggerRef:o,...l})=>{var u;const c=x.useRef(null),d=(u=o==null?void 0:o.current)==null?void 0:u.getBoundingClientRect(),{popoverProps:p}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:a??c,triggerRef:o,isNonModal:a?!0:void 0},r),g=x.useCallback(f=>{f.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,onPointerDown:i?g:void 0,ref:a??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:n})})},ui=s.dt.ul`
|
|
809
809
|
${({theme:e})=>`
|
|
810
810
|
align-self: center;
|
|
811
811
|
background: ${e.palette.white};
|
|
@@ -855,7 +855,7 @@
|
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
`}
|
|
858
|
-
`,
|
|
858
|
+
`,mt=({item:e,state:n})=>{const i=s.nt(),a=x.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(xi,{...r,className:d,ref:a,children:[t.jsx(v,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(C,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Pe=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value:$,weight:m})=>{var nt;const w=s.nt(),j=n?void 0:i,I=(e==null?void 0:e.value)??$,[z,k]=x.useState(((nt=p.find(P=>P.value===I))==null?void 0:nt.name)??""),[N,F]=x.useState(I),[L,W]=x.useState(p),[D,E]=x.useState(!1),{contains:M}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),V=x.useRef(null),te=x.useRef(null),Ee=x.useRef(null),Qe=x.useRef(null),et=x.useRef(null),un=x.useMemo(()=>p.map(P=>M(P.name,z)||D?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:P.name},P.value):null),[M,z,p,D]),xn=x.useCallback(P=>{k(P),P===""?E(!0):(E(!1),F(O=>{const ye=P===""?"":O;return e&&e.onChange(ye),u&&u(P),ye}),W(p.filter(O=>M(O.name,P))))},[M,p,e,u]),fn=x.useCallback(P=>{var O;k(((O=p.find(ye=>ye.value===P))==null?void 0:O.name)??""),F(P?String(P):""),e&&e.onChange(P),u&&u(P?String(P):""),W(p)},[p,e,u]),tt=x.useCallback(P=>{P.key==="Enter"&&P.preventDefault(),E(!1)},[]),hn=x.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),q=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:z,items:L,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:N,onBlur:hn,onInputChange:xn,onKeyDown:tt,onKeyUp:()=>{E(!0)},onOpenChange(P,O){E(P&&(O==="manual"||O==="focus"))},onSelectionChange:fn,children:un}),{buttonProps:bn,inputProps:$n,listBoxProps:yn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:z,buttonRef:te,id:d,inputRef:V,label:l??d,listBoxRef:Ee,name:d,placeholder:f,popoverRef:et},q),{listBoxProps:mn}=s.$c132121280ec012d$export$50eacbbf140a3141(yn,q,Ee),{buttonProps:wn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(bn,te);return x.useEffect(()=>{var P;(c===!1||!I)&&k(((P=p.find(O=>O.value===I))==null?void 0:P.name)??"")},[I,p,c]),t.jsxs(H,{error:j,helpLink:a,helpLinkText:r,helpText:o,htmlFor:d,label:l,required:h,tooltip:y,weight:m,children:[t.jsxs(Z,{className:`${n?"disabled":""} ${j?"error":""}`,ref:Qe,children:[t.jsx("input",{...$n,"aria-invalid":j?"true":"false","aria-label":d,onKeyDown:tt,ref:V}),j?t.jsx(C,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}):void 0,t.jsx(B,{...wn,className:"action",icon:q.isOpen?"chevron-up":"chevron-down",iconColor:w.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:te,type:"button",variant:"ghost"})]}),q.isOpen&&q.collection.size>0&&!n?t.jsx(fe,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:et,state:q,triggerRef:Qe,children:t.jsx(ui,{...mn,ref:Ee,children:[...q.collection].map(P=>t.jsx(mt,{item:P,state:q},P.key))})}):null]})},fi=({control:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value:$,weight:m})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:w})=>t.jsx(Pe,{disabled:n,error:i,field:w,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value:$,weight:m}),rules:{required:h}}):t.jsx(Pe,{disabled:n,error:i,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:u,placeholder:f,required:h,tooltip:y,value:$,weight:m}),hi=s.dt.div`
|
|
859
859
|
${({theme:e})=>`
|
|
860
860
|
align-items: center;
|
|
861
861
|
color: ${e.palette.gray[800]};
|
|
@@ -887,12 +887,12 @@
|
|
|
887
887
|
padding: 0 0.5px;
|
|
888
888
|
position: relative;
|
|
889
889
|
width: 8px;
|
|
890
|
-
`,
|
|
890
|
+
`,rt=s.dt.tr`
|
|
891
891
|
align-items: flex-start;
|
|
892
892
|
display: flex;
|
|
893
893
|
padding: ${({theme:e})=>e.spacing[.25]} 0;
|
|
894
894
|
width: 100%;
|
|
895
|
-
`,
|
|
895
|
+
`,wt=s.lt`
|
|
896
896
|
${({theme:e})=>`
|
|
897
897
|
align-items: center;
|
|
898
898
|
color: ${e.palette.gray[800]};
|
|
@@ -909,10 +909,10 @@
|
|
|
909
909
|
width: ${e.spacing[2.5]};
|
|
910
910
|
`}
|
|
911
911
|
`,$i=s.dt.th`
|
|
912
|
-
${
|
|
912
|
+
${wt}
|
|
913
913
|
`,yi=s.dt.td`
|
|
914
914
|
${({theme:e})=>`
|
|
915
|
-
${
|
|
915
|
+
${wt}
|
|
916
916
|
height: ${e.spacing[2.5]};
|
|
917
917
|
width: ${e.spacing[2.5]};
|
|
918
918
|
|
|
@@ -967,7 +967,7 @@
|
|
|
967
967
|
> span {
|
|
968
968
|
font-size: 4px;
|
|
969
969
|
}
|
|
970
|
-
`,
|
|
970
|
+
`,ot=s.dt.button`
|
|
971
971
|
cursor: pointer;
|
|
972
972
|
display: flex;
|
|
973
973
|
|
|
@@ -975,7 +975,7 @@
|
|
|
975
975
|
height: 3.5px;
|
|
976
976
|
width: 7px;
|
|
977
977
|
}
|
|
978
|
-
`,
|
|
978
|
+
`,Ke=s.dt.div`
|
|
979
979
|
${({theme:e})=>`
|
|
980
980
|
align-items: end;
|
|
981
981
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -987,9 +987,9 @@
|
|
|
987
987
|
padding: 0 ${e.spacing[.25]};
|
|
988
988
|
width: 100%;
|
|
989
989
|
`}
|
|
990
|
-
`,
|
|
990
|
+
`,jt=({state:e,date:n})=>{const i=x.useRef(null),a=s.$14e0f24ef4ac5c92$export$629b0a497aa65267(n,s.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:o,isSelected:l,isDisabled:c,formattedDate:d}=s.$36a0ac60f04457c5$export$136073280381448e({date:n},e,i),p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,u=l&&!c&&!(p||g)?"range":"";return t.jsx(yi,{id:u,...r,children:t.jsxs("div",{...o,className:`cell ${p||g?"selected":""}
|
|
991
991
|
${c?"disabled":""} ${a?"today":""}
|
|
992
|
-
${!e.isFocused&&!a?"focused":""} ${
|
|
992
|
+
${!e.isFocused&&!a?"focused":""} ${u}`,ref:i,children:[d,a?t.jsx(mi,{children:t.jsx(C,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},ze=({state:e,...n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{weekDays:a}=s.$e3031d1f8c9d64eb$export$cb95147730a423f5(n,e),r=s.$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(e.visibleRange.start,i);return t.jsxs("table",{children:[t.jsx("thead",{children:t.jsx(rt,{children:a.map((o,l)=>{const c=`key_${l}`;return t.jsx($i,{children:o},c)})})}),t.jsx("tbody",{children:[...new Array(r).keys()].map(o=>t.jsx(rt,{children:e.getDatesInWeek(o).map((l,c)=>{const d=`key_${c}`;return l?t.jsx(jt,{date:l,state:e},d):t.jsx("td",{},d)})},o))})]})},wi=s.dt(_e)`
|
|
993
993
|
align-items: center;
|
|
994
994
|
background-color: inherit;
|
|
995
995
|
border-color: inherit;
|
|
@@ -1055,7 +1055,7 @@
|
|
|
1055
1055
|
justify-content: flex-end;
|
|
1056
1056
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1057
1057
|
flex: 1 0 0;
|
|
1058
|
-
`,
|
|
1058
|
+
`,st=s.dt.div`
|
|
1059
1059
|
${({theme:e})=>`
|
|
1060
1060
|
align-items: center;
|
|
1061
1061
|
align-self: stretch;
|
|
@@ -1067,7 +1067,7 @@
|
|
|
1067
1067
|
line-height: ${e.spacing[1.5]};
|
|
1068
1068
|
padding: 2px ${e.spacing[.25]};
|
|
1069
1069
|
`}
|
|
1070
|
-
`,
|
|
1070
|
+
`,lt=s.dt.button`
|
|
1071
1071
|
${({theme:e})=>`
|
|
1072
1072
|
align-items: center;
|
|
1073
1073
|
background-color: inherit;
|
|
@@ -1087,7 +1087,7 @@
|
|
|
1087
1087
|
font-weight: ${e.typography.weight.bold};
|
|
1088
1088
|
}
|
|
1089
1089
|
`}
|
|
1090
|
-
`,je=({disabled:e=!1,icon:n,props:i})=>{const a=
|
|
1090
|
+
`,je=({disabled:e=!1,icon:n,props:i})=>{const a=x.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,a);return t.jsx(ki,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(C,{icon:n,iconColor:S.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ie=({state:e,prevButtonProps:n,nextButtonProps:i,title:a})=>{const r=e.focusedDate,o=x.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=x.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(je,{icon:"chevron-left",props:n}),t.jsxs(hi,{children:[a,t.jsxs(bi,{children:[t.jsx(ot,{"aria-label":"top",onClick:o,children:t.jsx(C,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(ot,{"aria-label":"bottom",onClick:l,children:t.jsx(C,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(je,{icon:"chevron-right",props:i})]})},kt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:o,title:l}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(n,a);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(ze,{state:a}),t.jsx(Ke,{children:t.jsx(R,{onClick:e,variant:"ghost",children:"Cancel"})})]})},vt=({segment:e,state:n})=>{const i=s.nt(),a=x.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,a),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},Ct=({disabled:e,error:n=!1,props:i})=>{const a=s.nt(),r=x.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,r),c=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 t.jsxs(vi,{...l,onClick:c,children:[t.jsx("div",{className:"flex flex-row",style:{color:a.palette.gray[s.lodashExports.isNil(o.value)?400:800]},tabIndex:-1,children:o.segments.map((d,p)=>{const g=`key_${p}`;return t.jsx(vt,{segment:{...d,isEditable:!e},state:o},g)})}),n?t.jsx(C,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},St=e=>{const n=x.useRef(null),i=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=i,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=x.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=x.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(a)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[o,i,a]);return t.jsxs(Ci,{children:[t.jsx(st,{...c,ref:n,children:i.segments.slice(0,-2).map((p,g)=>{const u=`key_${g}`;return t.jsx(vt,{segment:p,state:i},u)})}),t.jsxs(st,{children:[t.jsx(lt,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(lt,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ke=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",Si=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",zi=e=>e&&e!=="-"?s.dayjs(e).format("YYYY/MM/DD hh:mm A"):"-",re=({error:e,buttonProps:n,datePickerRef:i,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:u})=>{const f=x.useCallback(h=>{const y=r==="day"?ke(String(h)):Si(String(h));o.onChange&&o.onChange(h??null),g&&g(c,y)},[o,r,c,g]);return t.jsxs(Z,{...l,className:`${a?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(Ct,{disabled:a,error:e!=null,props:{...o,autoFocus:!1,granularity:r,onChange:f,shouldForceLeadingZeros:!0}}),t.jsx(je,{disabled:a,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:a,id:c,name:c,type:"text",value:u??""})]})},Te=({children:e,...n})=>{const i=x.useRef(null),{dialogProps:a}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(ji,{...a,ref:i,children:e})},zt=({disabled:e=!1,error:n,helpLink:i,helpLinkText:a,helpText:r,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:u,...f})=>{const h=x.useRef(null),y=u==null?void 0:u(c),$=x.useCallback(F=>{p&&F&&p(c,ke(String(F)))},[c,p]),m=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...f,onChange(F){$(F)},value:s._.isNil(y)||s._.isEmpty(y)||y==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(y.replace(/\//gu,"-"))}),{close:w}=m,{groupProps:j,fieldProps:I,buttonProps:z,dialogProps:k,calendarProps:N}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...f,"aria-label":l??c,name:c},m,h);return t.jsxs(H,{error:n,helpLink:i,helpLinkText:a,helpText:r,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(re,{buttonProps:z,datePickerRef:h,disabled:e,error:n,fieldProps:I,groupProps:j,name:c,register:d,required:o,setValue:p,value:y}),m.isOpen&&!e?t.jsx(fe,{offset:8,placement:"bottom start",state:m,triggerRef:h,children:t.jsx(Te,{...k,children:t.jsx(kt,{onClose:w,props:N})})}):null]})},It=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=x.useRef(null),r=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(n,r,a);return t.jsxs("div",{className:"calendar-range",ref:a,children:[t.jsx(Ie,{nextButtonProps:l,prevButtonProps:o,state:r,title:c}),t.jsx(ze,{state:r}),t.jsx(Ke,{children:t.jsx(R,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Ii=s.dt.div`
|
|
1091
1091
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1092
1092
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1093
1093
|
display: flex;
|
|
@@ -1098,7 +1098,7 @@
|
|
|
1098
1098
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1099
1099
|
}
|
|
1100
1100
|
`}
|
|
1101
|
-
`,Tt=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,...
|
|
1101
|
+
`,Tt=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,...g})=>{const u=`${a}Max`,f=`${a}Min`,h=x.useRef(null),y=x.useCallback(F=>{c&&F&&(c((d==null?void 0:d.name)??u,ke(String(F.end))),c((p==null?void 0:p.name)??f,ke(String(F.start))))},[u,f,c,d,p]),$=s.$93c38a5e28be6249$export$e50a61c1de9f574({...g,endName:(d==null?void 0:d.name)??u,startName:(p==null?void 0:p.name)??f,onChange(F){y(F)}}),{close:m}=$,{groupProps:w,startFieldProps:j,endFieldProps:I,buttonProps:z,dialogProps:k,calendarProps:N}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...g,"aria-label":i??a},$,h);return t.jsxs(H,{error:n,htmlFor:a,label:i,required:r,tooltip:o,children:[t.jsxs(Ii,{$disabled:e,$show:n!==void 0,ref:h,style:{flexDirection:"column"},children:[t.jsx(re,{buttonProps:z,datePickerRef:h,disabled:e,error:n,fieldProps:{...j,"aria-label":`${j["aria-label"]} ${a}`,validate:F=>I.value&&F>I.value?"Start date must be less than or equal to end date":null},groupProps:w,name:(p==null?void 0:p.name)??f,register:l,setValue:c,value:p==null?void 0:p.value}),t.jsx(re,{buttonProps:z,datePickerRef:h,disabled:e,error:n,fieldProps:{...I,"aria-label":`${I["aria-label"]} ${a}`,validate:F=>j.value&&F<j.value?"End date must be greater than or equal to start date":null},groupProps:w,name:(d==null?void 0:d.name)??u,register:l,setValue:c,value:d==null?void 0:d.value})]}),$.isOpen&&!e?t.jsx(fe,{offset:8,placement:"bottom start",state:$,triggerRef:h,children:t.jsx(Te,{...k,children:t.jsx(It,{onClose:m,props:N})})}):null]})},Ti=s.dt.div`
|
|
1102
1102
|
${({theme:e})=>`
|
|
1103
1103
|
align-items: center;
|
|
1104
1104
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1113,9 +1113,9 @@
|
|
|
1113
1113
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1114
1114
|
justify-content: flex-end;
|
|
1115
1115
|
flex: 1 0 0;
|
|
1116
|
-
`,Ft=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(
|
|
1116
|
+
`,Ft=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(Ti,{children:[t.jsx(v,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Fi,{children:t.jsx(St,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ke,{children:t.jsx(R,{onClick:n,variant:"ghost",children:"Cancel"})})]})},Ni=e=>{const{disabled:n=!1,error:i,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),u=x.useRef(null),f=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"?null:s.$fae977aafc393c5c$export$588937bcd60ade55(g.replace(/\//gu,"-"))}),{close:h}=f,{groupProps:y,fieldProps:$,buttonProps:m,dialogProps:w,calendarProps:j}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,f,u),I=x.useCallback(k=>{j.onChange&&j.onChange(k),d==null||d(o,zi(String(k).replace(/-/gu,"/")))},[j,o,d]),z=x.useCallback(k=>{k&&f.setTimeValue(k)},[f]);return t.jsxs(H,{error:i,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(re,{buttonProps:m,datePickerRef:u,disabled:n,error:i,fieldProps:$,granularity:"minute",groupProps:y,name:o,register:c,setValue:d,value:g}),f.isOpen&&!n?t.jsx(fe,{offset:8,placement:"bottom start",state:f,triggerRef:u,children:t.jsx(Te,{...w,children:t.jsx(Ft,{handleTimeChange:z,onClose:h,props:{...j,onChange:I},timeState:f})})}):null]})},Ei=({children:e,currentValue:n,externalLink:i,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs(b,{children:[t.jsx(Ye,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(X,{href:d,children:c}):t.jsx(v,{size:"md",children:c})]})},qe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:a,helpText:r,error:o,isValid:l,isTouched:c,label:d,linkPosition:p,name:g,maskValue:u=!1,onPaste:f,placeholder:h,register:y,tooltip:$,type:m="text",weight:w,...j})=>{const{required:I,onBlur:z,onChange:k}=j,N=s.nt(),F=e?void 0:o,L=l&&c&&!e,W=x.useCallback(D=>{D.key==="Enter"&&D.preventDefault()},[]);return t.jsx(H,{error:F,helpLink:i,helpLinkText:a,helpText:r,htmlFor:g,label:d,linkPosition:p,required:I,tooltip:$,weight:w,children:t.jsxs(Z,{className:`
|
|
1117
1117
|
${e?"disabled":""} ${F?"error":""} ${L?"success":""}
|
|
1118
|
-
`,children:[n?t.jsx(C,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":F?"true":"false","aria-label":
|
|
1118
|
+
`,children:[n?t.jsx(C,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":F?"true":"false","aria-label":g,"aria-required":I,autoComplete:"off",className:u?"sr-block":"","data-testid":`${g}-input`,disabled:e,id:g,onKeyDown:W,onPaste:f,placeholder:h,type:m,...y?y(g,{required:I,onBlur:z,onChange:k}):{...j}}),F?t.jsx(C,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:N.palette.error[500],iconSize:"xs"}):void 0,L?t.jsx(C,{icon:"check-circle",iconClass:"success-icon",iconColor:N.palette.success[500],iconSize:"xs"}):void 0]})})},Ri=s.dt(ft)`
|
|
1119
1119
|
white-space: nowrap;
|
|
1120
1120
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1121
1121
|
text-overflow: ellipsis;
|
|
@@ -1126,13 +1126,13 @@
|
|
|
1126
1126
|
position: absolute;
|
|
1127
1127
|
visibility: hidden;
|
|
1128
1128
|
width: 0;
|
|
1129
|
-
`,
|
|
1129
|
+
`,Le=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Pi=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Li=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:u,setValue:f,tooltip:h,watch:y,weight:$})=>{const m=s.nt(),w=n?void 0:i,j=x.useRef(null),I=y==null?void 0:y(d),z=Pi(I),k=u==null?void 0:u(d,{required:g}),N=x.useCallback(()=>{const W=Le("change",d,void 0);f&&f(d,""),k&&k.onChange(W)},[k,d,f]),F=x.useCallback(W=>{const{files:D}=W.currentTarget,E=Le("change",d,D&&D.length>0?D:void 0);p==null||p(E),k&&k.onChange(E)},[k,d,p]),L=x.useCallback(W=>{n?W.preventDefault():j.current&&j.current.click()},[n]);return t.jsxs(H,{error:w,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:g,tooltip:h,weight:$,children:[t.jsxs(Z,{className:`${n?"disabled":""} ${w?"error":""}`,children:[t.jsx(Ri,{$size:"xs",children:z}),t.jsxs(b,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(z)?void 0:t.jsx(B,{color:m.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:N,variant:"ghost",width:"20px"}),w&&t.jsx(C,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}),t.jsxs(R,{border:n?`1px solid ${m.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:L,variant:"primary",width:"96px",children:[t.jsx(C,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Di,{...k&&{ref:k.ref,onBlur:k.onBlur},accept:e,"aria-label":d,"data-testid":d,disabled:n,id:l??d,multiple:c,name:d,onChange:F,onClick:N,ref:j,required:void 0,type:"file",value:void 0})]})},Wi=s.dt.input`
|
|
1130
1130
|
border: none;
|
|
1131
1131
|
background: transparent;
|
|
1132
1132
|
min-width: 15rem;
|
|
1133
1133
|
padding: 0;
|
|
1134
1134
|
flex: 1;
|
|
1135
|
-
`,
|
|
1135
|
+
`,We=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>{const $=s.nt(),m=e?void 0:n,[w,j]=x.useState(""),I=d?h:i==null?void 0:i.value,z=x.useMemo(()=>I&&typeof I=="string"?I.split(",").filter(Boolean):[],[I]),k=x.useCallback(D=>{const M=[...new Set(D.filter(Boolean))].join(","),V=Le("change",c,M);i&&i.onChange(V),d&&d(V)},[i,c,d]),N=x.useCallback(D=>{j(D.target.value)},[]),F=x.useCallback(D=>{const E=w.trim();E.length&&!z.includes(E)&&(D.preventDefault(),k([...z,E]),j("")),i&&i.onBlur()},[w,i,k,z]),L=x.useCallback(D=>{const E=w.trim();D.key==="Enter"&&E.length===0&&D.preventDefault(),["Enter",","].includes(D.key)&&E.length>0&&!z.includes(E)?(D.preventDefault(),k([...z,E]),j("")):D.key==="Backspace"&&!E.length&&z.length&&(D.preventDefault(),p==null||p(z[z.length-1]),k(z.slice(0,-1)))},[w,p,k,z]),W=x.useCallback(D=>()=>{p==null||p(D),k(z.filter(E=>E!==D))},[p,k,z]);return t.jsx(H,{error:m,helpLink:a,helpLinkText:r,helpText:o,htmlFor:c,label:l,required:u,tooltip:f,weight:y,children:t.jsxs(Z,{$overflowX:"auto",className:`${e?"disabled":""} ${m?"error":""}`,children:[z.map(D=>t.jsx(K,{disabled:e,onClose:W(D),tagLabel:D},D)),t.jsx(Wi,{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",id:c,onBlur:F,onChange:N,onKeyDown:L,placeholder:z.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:w}),m?t.jsx(C,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:$.palette.error[500],iconSize:"xs"}):void 0]})})},Ai=({disabled:e=!1,control:n,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y})=>n?t.jsx(s.Controller,{control:n,name:c,render:({field:$})=>t.jsx(We,{disabled:e,error:i,field:$,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:u,tooltip:f,weight:y}),rules:{required:u}}):t.jsx(We,{disabled:e,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:f,value:h,weight:y}),Ae=x.forwardRef(function({disabled:n,icon:i,margin:a,onClick:r,...o},l){return t.jsx(wi,{$margin:a,"aria-label":i,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...o,children:t.jsx(C,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),ve=({error:e,decimalPlaces:n=0,disabled:i=!1,id:a,maxLength:r,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:u,setValue:f,value:h})=>{const y=s.nt(),$=i?void 0:e,m=x.useMemo(()=>n<0?0:n,[n]),[w,j]=x.useState(h?s._.toNumber(h):0),I=x.useCallback(()=>{const F=(w-10**-m).toFixed(m),L=Math.max(Number(l),Number(F));f&&f(c,L),j(L)},[m,w,l,c,f]),z=x.useCallback(()=>{const F=(w+10**-m).toFixed(m),L=Math.min(Number(o),Number(F)>Number(l)?Number(F):Number(l));f&&f(c,L),j(L)},[m,w,o,l,c,f]),k=x.useCallback(F=>{const{value:L}=F.target,W=/\d+/u.test(L)&&!s._.isEmpty(L);f&&f(c,W?Number(L):void 0),d&&d(F)},[c,d,f]),N=x.useCallback(F=>{F.key==="Enter"&&F.preventDefault()},[]);return t.jsxs(Z,{className:`${i?"disabled":""} ${$?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":$?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",disabled:i,id:a??c,max:o,min:l,onKeyDown:N,placeholder:p,required:u,step:10**-m,type:"number",...g==null?void 0:g(c,{required:u,maxLength:r,max:o,min:l,onChange:k})}),$&&t.jsx(C,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}),t.jsx(Ae,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:I,px:.75,py:.75}),t.jsx(Ae,{borderRadius:`0 ${y.spacing[.5]} ${y.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:z,px:.75,py:.75})]})},Nt=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:a,helpText:r,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:u,onChange:f,placeholder:h,register:y,required:$,setValue:m,tooltip:w,value:j,watch:I,weight:z})=>t.jsx(H,{error:n?void 0:i,helpLink:a,helpText:r,htmlFor:u,label:l,linkPosition:c,maxLength:d,required:$,tooltip:w,weight:z,children:t.jsx(ve,{decimalPlaces:e,disabled:n,error:i,id:o,max:p,maxLength:d,min:g,name:u,onChange:f,placeholder:h,register:y,required:$,setValue:m,value:f?j:I==null?void 0:I(u)})}),Et=({disabled:e=!1,error:n,name:i,label:a,propsMax:r,propsMin:o,required:l,tooltip:c})=>{const d=`${i}Max`,p=`${i}Min`;return t.jsx(H,{error:n,htmlFor:i,label:a,required:l,tooltip:c,children:t.jsxs(b,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(ve,{...o,disabled:e,error:n,name:o.name??p}),t.jsx(ve,{...r,disabled:e,error:n,name:r.name??d})]})})},Bi=s.dt.div`
|
|
1136
1136
|
${({theme:e})=>`
|
|
1137
1137
|
align-items: flex-start;
|
|
1138
1138
|
align-self: stretch;
|
|
@@ -1172,7 +1172,7 @@
|
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
1174
|
`}
|
|
1175
|
-
`,
|
|
1175
|
+
`,Mi=s.dt.button`
|
|
1176
1176
|
${({theme:e})=>`
|
|
1177
1177
|
align-items: center;
|
|
1178
1178
|
background: inherit;
|
|
@@ -1188,7 +1188,7 @@
|
|
|
1188
1188
|
cursor: not-allowed;
|
|
1189
1189
|
}
|
|
1190
1190
|
`}
|
|
1191
|
-
`,
|
|
1191
|
+
`,Hi=s.dt.ul`
|
|
1192
1192
|
${({theme:e})=>`
|
|
1193
1193
|
align-items: flex-start;
|
|
1194
1194
|
box-shadow: ${e.shadows.md};
|
|
@@ -1201,7 +1201,7 @@
|
|
|
1201
1201
|
scrollbar-width: thin;
|
|
1202
1202
|
width: max-content;
|
|
1203
1203
|
`}
|
|
1204
|
-
`,
|
|
1204
|
+
`,Oi=s.dt.li`
|
|
1205
1205
|
${({theme:e})=>`
|
|
1206
1206
|
align-items: center;
|
|
1207
1207
|
background: ${e.palette.white};
|
|
@@ -1218,16 +1218,16 @@
|
|
|
1218
1218
|
background: ${e.palette.gray[100]};
|
|
1219
1219
|
}
|
|
1220
1220
|
`}
|
|
1221
|
-
`,
|
|
1221
|
+
`,Vi=s.dt.p`
|
|
1222
1222
|
color: ${({theme:e})=>e.palette.gray[800]};
|
|
1223
1223
|
font-size: inherit;
|
|
1224
1224
|
min-width: 55%;
|
|
1225
1225
|
overflow: hidden;
|
|
1226
1226
|
text-overflow: ellipsis;
|
|
1227
1227
|
white-space: nowrap;
|
|
1228
|
-
`,ee=(e,n,i=!1)=>{
|
|
1229
|
-
${e?"disabled":""} ${
|
|
1230
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":
|
|
1228
|
+
`,ee=(e,n,i=!1)=>{x.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("click",a,!0),()=>{document.removeEventListener("click",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("click",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("click",a,!0)})},[i,e,n])},_i=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,weight:p})=>{const g=s.nt(),u=x.useRef(null),f=e?void 0:n,[h,y]=x.useState(!1),[$,m]=x.useState(""),{refs:w,floatingStyles:j}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputValue:I,handlePhoneValueChange:z,country:k,setCountry:N}=s.ee({countries:s.R,defaultCountry:"us",forceDialCode:!0,value:d?String(d):void 0}),F=x.useCallback(()=>{y(E=>!E),h||m("")},[h]),L=x.useCallback(E=>()=>{N(E),y(!1),m("")},[N,y]),W=x.useCallback(E=>{E.key.length===1?m(M=>M+E.key):E.key==="Backspace"&&m(M=>M.slice(0,-1))},[]),D=s.R.filter(E=>{const{name:M}=s.M(E);return M.toLowerCase().includes($.toLowerCase())});return ee(w.floating.current,()=>{y(!1),m("")},!0),t.jsx(H,{error:f,htmlFor:a,label:i,required:o,tooltip:c,weight:p,children:t.jsxs(Bi,{className:`${e?"disabled":""} ${f?"error":""}`,ref:u,children:[t.jsxs(Mi,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:F,onKeyDown:W,ref:w.setReference,children:[t.jsx(s.q,{iso2:k.iso2,size:"16px"}),t.jsx(C,{icon:"angle-down",iconColor:g.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(Z,{className:`${e?"disabled":""} ${f?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":f?"true":"false","aria-label":a,"aria-required":o,autoComplete:"off","data-testid":`${a}-input`,disabled:e,id:a,name:a,placeholder:r,type:"tel",value:I,...l==null?void 0:l(a,{required:o,onChange:z})}),f?t.jsx(C,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:g.palette.error[500],iconSize:"xs"}):void 0]}),h&&G.createPortal(t.jsx(Hi,{ref:w.setFloating,style:j,children:D.map(E=>{const{dialCode:M,iso2:V,name:te}=s.M(E);return t.jsxs(Oi,{onClick:L(V),value:V,children:[t.jsx(s.q,{iso2:V,size:"16px"}),t.jsx(Vi,{children:te}),t.jsx(v,{color:g.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+M})]},V)})}),document.getElementById("root")??document.body)]})})},Gi=({disabled:e=!1,error:n,helpLink:i,helpText:a,isTouched:r,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:u,register:f,required:h,rows:y,tooltip:$,watch:m,weight:w})=>{const j=s.nt(),I=m==null?void 0:m(c),z=o&&r&&!e,k=e?void 0:n;return t.jsx(H,{error:k,helpLink:i,helpText:a,htmlFor:c,label:l,maxLength:g,required:h,tooltip:$,value:I?String(I):void 0,weight:w,children:t.jsxs(Z,{className:`
|
|
1229
|
+
${e?"disabled":""} ${k?"error":""} ${z?"success":""}
|
|
1230
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":k?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:u,rows:y,...f==null?void 0:f(c,{required:h})}),k?t.jsx(C,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"xs"}):void 0,z?t.jsx(C,{icon:"check-circle",iconClass:"success-icon",iconColor:j.palette.success[500],iconSize:"xs"}):void 0]})})},Ui=({description:e,disabled:n,id:i,align:a,inputType:r="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:u})=>{const f=x.useMemo(()=>{if(r==="text")return t.jsx(qe,{disabled:n,name:d,placeholder:p});if(r==="date")return t.jsx(zt,{disabled:n,name:d});const{decimalPlaces:h,max:y,min:$}=o??{};return t.jsx(Nt,{decimalPlaces:h,disabled:n,max:y,min:$,name:d,placeholder:p})},[n,o,r,d,p]);return t.jsxs(pi,{$align:a,$minHeight:l,$minWidth:c,children:[t.jsx(Se,{description:e,id:i,title:u,tooltip:g}),f]})},Yi=s.dt.label`
|
|
1231
1231
|
${({theme:e})=>`
|
|
1232
1232
|
align-items: center;
|
|
1233
1233
|
color: ${e.palette.gray[600]};
|
|
@@ -1299,7 +1299,7 @@
|
|
|
1299
1299
|
fill: ${e.palette.white};
|
|
1300
1300
|
}
|
|
1301
1301
|
`}
|
|
1302
|
-
`,
|
|
1302
|
+
`,Fe=x.forwardRef(function({checked:n,disabled:i=!1,label:a,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,value:p,...g},u){return t.jsxs(Yi,{"aria-disabled":i,children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-hidden":!1,"aria-label":r,checked:n,disabled:i,id:r,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:u,type:"checkbox",value:p,...g}),t.jsx(C,{disabled:i,icon:"check",iconSize:"sm"}),a??p]})}),Rt=({options:e,title:n,checkboxesName:i,defaultCollapsed:a,onChange:r})=>{const o=s.nt(),[l,c]=x.useState(a??!1),d=x.useCallback(()=>{c(p=>!p)},[]);return t.jsxs(b,{"aria-label":n,bgColor:l?o.palette.gray[50]:o.palette.white,border:"1px solid"+o.palette.gray[300],borderRadius:"8px",display:"inline-flex",flexDirection:"column",gap:.625,px:.75,py:.625,role:"region",width:"100%",children:[t.jsxs(b,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[t.jsx(v,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:n}),t.jsx(C,{icon:l?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs"})]}),l?t.jsx(b,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx(b,{border:"1px solid",borderColor:o.palette.gray[300],borderRadius:"4px",px:.5,py:.5,children:t.jsx(Fe,{checked:p.visible,disabled:p.locked,label:p.name,name:`${i}-${p.name}`,onChange:r,value:p.name})},p.name))}):void 0]})},Dt=(e,n)=>{const[a,r]=x.useState(0),[o,l]=x.useState(0);return x.useEffect(()=>{o===100&&(()=>{r(d=>d===n-1?0:d+1)})()},[o,n]),x.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:a,progress:o,setCycle:r,setProgress:l}},Pt=({publicId:e,format:n="webp"})=>{const i=x.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return x.useMemo(()=>i.image(e).format(n),[i,e,n])},Ne=e=>{const[n,i]=x.useState(!1),a=x.useCallback(()=>{i(!0)},[]),r=x.useCallback(()=>{i(!1)},[]),o=x.useCallback(()=>{i(l=>!l)},[]);return{close:r,isOpen:n,name:e,open:a,setIsOpen:i,toggle:o}},Ki=({name:e,items:n,columnOrder:i,setColumnOrder:a})=>{const r=x.useMemo(()=>[...n.filter(({locked:g})=>g).map(({locked:g,...u})=>({...u,visible:!0,locked:g})),...n.filter(({locked:g})=>!g)],[n]),[o,l]=x.useState(r),c=x.useCallback(g=>{const u=g.filter(({locked:$})=>!$),h=[...g.filter(({locked:$})=>$),...u],y=h.map(({name:$})=>$);l($=>[...h,...$.filter(({name:m})=>!y.includes(m))]),a&&a(h.map(({id:$})=>$))},[a]),d=x.useCallback(()=>{const g=o.map(u=>{var h;const f=(i==null?void 0:i.includes(u.id))??!1;return(h=u.toggleVisibility)==null||h.call(u,f),{...u,visible:f}}).toSorted((u,f)=>{const h=(i==null?void 0:i.indexOf(u.id))??0,y=(i==null?void 0:i.indexOf(f.id))??0;return Number(f.visible)!==Number(u.visible)?Number(f.visible)-Number(u.visible):h-y});l(g),a==null||a(i)},[o,i,a]),p=x.useMemo(()=>s.some(o,g=>((i==null?void 0:i.includes(g.id))??!1)!==g.visible),[o,i]);return{setColumns:c,resetToDefault:d,columns:o,...Ne(e),hasChanged:p}},Lt=(e,n)=>x.useMemo(()=>s._.debounce(e,n),[e,n]),qi=e=>{const[n,i]=x.useState(),a=Lt(r=>{i(r)},(e==null?void 0:e.debounceWait)??300);return[n,a]},Xi=({alt:e="img",height:n="",width:i="",plugins:a=[s.lazyload(),s.placeholder()],publicId:r})=>{const o=Pt({publicId:r});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:n,plugins:a,width:i})},_=x.memo(Xi),Zi=s.dt.label`
|
|
1303
1303
|
${({theme:e})=>`
|
|
1304
1304
|
align-items: center;
|
|
1305
1305
|
display: flex;
|
|
@@ -1378,7 +1378,7 @@
|
|
|
1378
1378
|
}
|
|
1379
1379
|
|
|
1380
1380
|
`}
|
|
1381
|
-
`,Ji=s.dt.span.attrs({className:"checkmark"})``,
|
|
1381
|
+
`,Ji=s.dt.span.attrs({className:"checkmark"})``,Xe=x.forwardRef(function({defaultChecked:n=!1,disabled:i=!1,label:a,name:r,onChange:o,onClick:l,value:c,...d},p){return t.jsxs(Zi,{"aria-disabled":i,"aria-label":r,role:"radiogroup",children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-label":r,defaultChecked:n,disabled:i,name:r,onChange:o,onClick:l,ref:p,type:"radio",value:c,...d}),t.jsx(Ji,{}),a??null]})}),Qi=({alt:e,imageId:n,icon:i,selectorProps:a,onClick:r,title:o,width:l="fit-content"})=>{const c=s.nt();return t.jsxs(b,{alignItems:"center",border:`1px solid ${c.palette.gray[200]}`,borderColorHover:c.palette.gray[600],borderRadius:c.spacing[.25],display:"inline-flex",padding:[1,1,1,1],shadowHover:"md",width:l,children:[t.jsx(b,{alignSelf:"start",display:"flex",width:"fit-content",children:t.jsx(Xe,{name:a.name,onClick:r,value:a.value})}),t.jsxs(b,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[n===void 0?void 0:t.jsx(_,{alt:e??"card image",height:"32px",publicId:n,width:"32px"}),i===void 0?void 0:t.jsx(C,{icon:i,iconSize:"sm",iconType:"fa-light"}),t.jsx(A,{fontWeight:"bold",lineSpacing:1.75,size:"xs",children:o})]})]})},ne=s.dt.div`
|
|
1382
1382
|
${({theme:e})=>`
|
|
1383
1383
|
align-items: center;
|
|
1384
1384
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1428,7 +1428,7 @@
|
|
|
1428
1428
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1429
1429
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1430
1430
|
}
|
|
1431
|
-
`,Wt=
|
|
1431
|
+
`,Wt=x.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:a,name:r,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},p){const g=n===!0?"on":"off",u=typeof o=="object"&&o.on&&o.off?o[g]:o,f=x.useCallback(h=>{h.stopPropagation()},[]);return t.jsxs(b,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:a,children:[t.jsx(b,{minWidth:l,children:u}),t.jsxs(ta,{onClick:f,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":i,"aria-label":r,checked:n===!0,disabled:i,name:r,ref:p,type:"checkbox"}),t.jsx(ne,{"aria-label":"Toggle Switch",id:`${r}Toggle`,children:t.jsx(ea,{})})]}),c]})}),na=({id:e,title:n,toggles:i,minWidth:a="auto",height:r="auto"})=>{const o=s.nt();return t.jsxs(b,{alignItems:"center",bgColor:o.palette.white,border:`1px solid ${o.palette.gray[200]}`,borderRadius:o.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:r,justify:"center",minHeight:"100px",minWidth:a,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Se,{id:e,title:n}),t.jsx(b,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:i.map(l=>t.jsx(Wt,{...l},`$card-toggle-${l.name}`))})]})},ia=s.dt.div`
|
|
1432
1432
|
position: relative;
|
|
1433
1433
|
margin: auto;
|
|
1434
1434
|
overflow: hidden;
|
|
@@ -1458,7 +1458,7 @@
|
|
|
1458
1458
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1459
1459
|
justify-content: center;
|
|
1460
1460
|
margin-top: ${({theme:e})=>e.spacing[2]};
|
|
1461
|
-
`,la=({slides:e,interval:n=300})=>{const{cycle:i,setCycle:a,setProgress:r}=Dt(n,e.length),o=
|
|
1461
|
+
`,la=({slides:e,interval:n=300})=>{const{cycle:i,setCycle:a,setProgress:r}=Dt(n,e.length),o=x.useCallback(l=>()=>{a(l),r(0)},[a,r]);return t.jsxs(ia,{"aria-roledescription":"carousel",children:[t.jsx(aa,{$currentIndex:i,children:e.map((l,c)=>{const d=`slide-${c}`;return t.jsx(ra,{"aria-label":d,"aria-roledescription":"slide",children:l.content},d)})}),t.jsx(sa,{children:e.map((l,c)=>{const d=`nav-button-${c}`;return t.jsx(oa,{$isActive:c===i,"aria-label":`Go to slide ${c+1}`,"data-testid":c===i?"active":"inactive",onClick:o(c)},d)})})]})},At=s.dt.div`
|
|
1462
1462
|
${({theme:e})=>`
|
|
1463
1463
|
background-color: ${e.palette.gray[100]};
|
|
1464
1464
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1528,10 +1528,10 @@
|
|
|
1528
1528
|
background-color: ${e.palette.gray[200]};
|
|
1529
1529
|
}
|
|
1530
1530
|
`}
|
|
1531
|
-
`,
|
|
1531
|
+
`,Bt=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(x.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(At,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":s._.isNil(n)||s._.isString(n)?0:n.offset+.7,...i!==void 0?{"data-line":String(Number(i))}:{},children:s._.isNil(n)||s._.isString(n)||s._.isEmpty(n.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:n.content})})})),da=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i,variant:a="normal"})=>{const r=s.nt(),[o,l]=x.useState(!1),[c,d]=x.useState(!0),p=x.useCallback(()=>{l(h=>!h)},[l]),g=x.useCallback(()=>{if(s._.isNil(n)||s._.isEmpty(n)||!s._.isString(n))return d(!1),e;const h=n.split(`
|
|
1532
1532
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1533
1533
|
`)}
|
|
1534
|
-
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x
|
|
1534
|
+
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=x.useMemo(g,[g]),f=x.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return a==="location"?t.jsx(Bt,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs(b,{bgColor:r.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(At,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:u})})}),t.jsxs(ca,{children:[t.jsx(B,{height:r.spacing[2.5],icon:"copy",iconColor:r.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:f,variant:"ghost",width:r.spacing[2.5]}),c?t.jsxs(R,{onClick:p,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(C,{icon:o?"chevron-up":"chevron-down",iconColor:r.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:f})]}):!1]})]})},{getVariant:pa}=U(e=>({fixed:`
|
|
1535
1535
|
width: 300px;
|
|
1536
1536
|
padding: ${e.spacing[1.25]};
|
|
1537
1537
|
overflow: hidden auto;
|
|
@@ -1559,7 +1559,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
1559
1559
|
display: flex;
|
|
1560
1560
|
justify-content: center;
|
|
1561
1561
|
z-index: 99999;
|
|
1562
|
-
`,be=s.dt(
|
|
1562
|
+
`,be=s.dt(b)`
|
|
1563
1563
|
${({theme:e,$size:n})=>`
|
|
1564
1564
|
background-color: ${e.palette.white};
|
|
1565
1565
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -1661,7 +1661,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
1661
1661
|
margin-right: 0;
|
|
1662
1662
|
`:""}
|
|
1663
1663
|
}
|
|
1664
|
-
`,
|
|
1664
|
+
`,Mt=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:a=void 0})=>{const{close:r}=n,o=x.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=x.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]);return[i,a].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs(b,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(fa,{children:t.jsxs("div",{children:[a&&t.jsx(R,{onClick:o,variant:"tertiary",width:"100%",children:a.text}),i&&t.jsx(R,{onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},Ht=({title:e,description:n,modalRef:i,otherActions:a,onClose:r})=>{const o=s.nt(),l=x.useCallback(()=>{r==null||r(),i.close()},[i,r]);return x.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(ua,{children:[t.jsxs(xa,{children:[typeof e=="string"?t.jsx(A,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[a,t.jsx(B,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),n&&s.lodashExports.isString(n)&&!s.lodashExports.isEmpty(n)?t.jsx(v,{mt:.5,size:"sm",children:n}):t.jsx(ae,{display:"block",mt:.5,size:"sm",children:n})]})},Ot=({disabled:e,id:n="modal-confirm",onCancel:i,onConfirm:a="submit",txtCancel:r,txtConfirm:o})=>{const l=a==="submit";return t.jsxs(b,{display:"flex",gap:.75,maxWidth:i?"392px":"190px",mt:1.5,children:[i?t.jsx(R,{id:`${n}-cancel`,justify:"center",onClick:i,variant:"tertiary",width:"100%",children:r??"Cancel"}):void 0,t.jsx(R,{disabled:e,id:n,justify:"center",onClick:l?void 0:a,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},ba=s.dt.button`
|
|
1665
1665
|
${({theme:e})=>`
|
|
1666
1666
|
align-items: center;
|
|
1667
1667
|
color: ${e.palette.gray[500]};
|
|
@@ -1753,7 +1753,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
1753
1753
|
font-size: 6px;
|
|
1754
1754
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1755
1755
|
justify-content: center;
|
|
1756
|
-
`,
|
|
1756
|
+
`,Vt=x.forwardRef(function({numberIndicator:n,show:i,variant:a="error",...r},o){return t.jsx(wa,{$variant:a,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...r,children:n&&t.jsx(ja,{children:n<=9?n:9})})}),_t=({end:e=!1,label:n,id:i,isActive:a=!1,link:r,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:p})=>{const{pathname:g}=De.useLocation(),u=a||(d==="primary"?g.includes(r):g.endsWith(r));return t.jsx(Y,{display:"flex",id:`${i}-tooltip`,tip:c,children:t.jsxs(ma,{$borderButton:u,$variant:d,children:[t.jsxs(De.NavLink,{end:e,id:i,onClick:l,to:r,children:[n,t.jsx(Vt,{left:o==null?void 0:o.left,numberIndicator:o==null?void 0:o.numberIndicator,show:o==null?void 0:o.show,top:o==null?void 0:o.top,variant:o==null?void 0:o.variant})]}),p===void 0?null:t.jsx(K,{tagLabel:`${p}`,variant:"default"})]})})},Ze=({items:e,borders:n=!0,box:i=!1,variant:a="primary"})=>{const r=s.nt();return t.jsx(b,{alignItems:"center",bgColor:r.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:i?r.palette.gray[200]:void 0,borderRadius:i?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:p,notificationSign:g,onClick:u,tag:f,tooltip:h})=>t.jsx(_t,{end:o,id:l,isActive:c,label:p,link:d,notificationSign:g,onClick:u,tag:f,tooltip:h,variant:a},l))})},J=x.forwardRef(function({color:n=S.palette.gray[100],mt:i=.5,mb:a=.5,width:r,...o},l){return t.jsx(b,{as:"hr",borderTop:`1px solid ${n}`,mb:a,mt:i,ref:l,width:r??"100%",...o})}),ka=s.dt.li`
|
|
1757
1757
|
${({theme:e})=>`
|
|
1758
1758
|
align-items: center;
|
|
1759
1759
|
background-color: ${e.palette.white};
|
|
@@ -1811,7 +1811,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
1811
1811
|
min-width: 240px;
|
|
1812
1812
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1813
1813
|
`}
|
|
1814
|
-
`,$e=({children:e,disabled:n=!1,icon:i,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:u
|
|
1814
|
+
`,$e=({children:e,disabled:n=!1,icon:i,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...u})=>{const h=s.nt().palette.gray[n?300:800],y=n?x.Children.map(e,$=>x.isValidElement($)?x.cloneElement($,{disabled:n,...$.props}):$):e;return t.jsxs(ka,{"aria-disabled":n,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...u,children:[i!==void 0||g!==void 0?t.jsxs(b,{alignItems:"center",display:"flex",gap:.625,children:[i?t.jsx(C,{disabled:n,icon:i,iconColor:h,iconSize:"xxs",iconType:a}):null,r===void 0?y:t.jsx(X,{href:r,children:y})]}):null,p||d?t.jsx(C,{disabled:n,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:a,onClick:l}):null]})},va=s.dt($e)`
|
|
1815
1815
|
margin-top: 10px;
|
|
1816
1816
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1817
1817
|
border-radius: 4px;
|
|
@@ -1829,7 +1829,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
1829
1829
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1830
1830
|
background-color: unset;
|
|
1831
1831
|
}
|
|
1832
|
-
`,Ut=({items:e,onReorder:n,title:i,description:a,onClickClose:r})=>{const o=
|
|
1832
|
+
`,Ut=({items:e,onReorder:n,title:i,description:a,onClickClose:r})=>{const o=x.useCallback(l=>()=>{r(l)},[r]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs(b,{display:"flex",gap:.25,children:[t.jsx(A,{display:"flex",size:"xs",children:i}),t.jsx(K,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(v,{size:"sm",children:a}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(va,{disabled:l.locked,icon:"grid-2",label:l.name,onClickIcon:l.locked?void 0:o(l.id),rightIcon:l.locked?"lock":"close",selected:l.visible,value:l.name,children:l.name})},l.name):void 0)]})},Ca=s.dt($e)`
|
|
1833
1833
|
padding: 7px 8px;
|
|
1834
1834
|
|
|
1835
1835
|
&[aria-selected="true"] {
|
|
@@ -1901,20 +1901,20 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
1901
1901
|
border-radius: ${e.spacing[.5]};
|
|
1902
1902
|
width: 250px;
|
|
1903
1903
|
`}
|
|
1904
|
-
`,oe=
|
|
1904
|
+
`,oe=x.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=x.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),f=x.useCallback(()=>{p($=>!$)},[]),h=x.useCallback($=>{$.key==="Enter"&&$.preventDefault()},[]);ee(g.floating.current,()=>{p(!1)},!0);const y=t.jsxs(za,{children:[t.jsx(C,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Sa,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(B,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:a,px:.25,py:.25,type:"reset",variant:"ghost"})]});return i?t.jsxs(x.Fragment,{children:[t.jsx(B,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:f,ref:g.setReference,variant:"ghost"}),d?t.jsx(Ia,{ref:g.setFloating,style:u,children:y}):void 0]}):y}),Kt=({columns:e,formId:n,onChangeHandler:i,variant:a})=>{const r=x.useRef(null),[o,l]=x.useState([]),[c,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 a==="grouped"?u.name.toLowerCase().includes(c.toLowerCase())||((f=u.group)==null?void 0:f.includes(c.toLowerCase())):u.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,a]),a==="grouped"?t.jsxs(b,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(oe,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(Yt(o)).map(([u,f],h)=>{const y=`li-checkbox${u}`;return t.jsx(Rt,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:f,title:u},y)})})]}):t.jsxs(b,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(oe,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(u=>{const f=`li-checkbox-${u.name}`;return t.jsx(Ca,{selected:u.visible,value:f,width:"content",children:t.jsx(Fe,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},f)})})]})},Ta=({_containerId:e="portals",title:n,modalRef:i,variant:a})=>{const r=s.nt(),o=x.useRef(null),[l,c]=x.useState(void 0),d=x.useCallback(u=>{const{checked:f,value:h}=u.target,y=i.columns.map($=>{var m;return $.name===h?((m=$.toggleVisibility)==null||m.call($,f),{...$,visible:f}):$});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=o.current)==null?void 0:f.scrollHeight;l!==u&&c(u)},[l]);return i.isOpen?G.createPortal(t.jsx(he,{"aria-label":i.name,"aria-modal":"true",children:t.jsxs(be,{$size:"md",flexDirection:"column",children:[t.jsxs(b,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(A,{size:"sm",children:n}),t.jsx(B,{icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(J,{mb:0,mt:0}),t.jsxs(b,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:o,scroll:"y",width:"100%",children:[t.jsx(Kt,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:a}),t.jsx(b,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Ut,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),t.jsx(J,{mb:0,mt:0}),t.jsxs(b,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(R,{disabled:!i.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:i.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),t.jsx(R,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Fa=s.dt($e)`
|
|
1905
1905
|
padding: 8px;
|
|
1906
1906
|
min-width: unset;
|
|
1907
|
-
`,
|
|
1907
|
+
`,ct=s.dt($e)`
|
|
1908
1908
|
padding: 7px 8px;
|
|
1909
1909
|
word-break: break-word;
|
|
1910
1910
|
|
|
1911
1911
|
svg.fa-check {
|
|
1912
1912
|
border-radius: 2px;
|
|
1913
1913
|
}
|
|
1914
|
-
`,qt=s.dt(
|
|
1914
|
+
`,qt=s.dt(B)`
|
|
1915
1915
|
background-color: ${({theme:e})=>e.palette.white};
|
|
1916
1916
|
color: ${({theme:e})=>e.palette.gray[400]};
|
|
1917
|
-
`,Xt=({option:e,register:n,setValue:i})=>{var a,r,o,l;switch(e.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=e.options)==null?void 0:a.map(d=>t.jsx(lt,{value:d.value,width:"content",children:t.jsx(Te,{...n("checkbox"),label:d.label,value:d.value})},`li-checkbox-${d.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=e.options)==null?void 0:r.map(d=>t.jsx(lt,{value:d.value,width:"content",children:t.jsx(qe,{...n("radio"),label:d.label,value:d.value})},`li-radio-${d.value}`))});case"text":const c=`text.${String(e.key)}-${e.filterFn??"caseInsensitive"}`;return t.jsx(Ke,{label:e.label,name:c,register:n,value:e.value});case"numberRange":return t.jsx(Et,{label:e.label,name:String(e.key),propsMax:{placeholder:"Max",register:n,name:"maxValue",value:e.maxValue,setValue:i},propsMin:{placeholder:"Min",register:n,name:"minValue",value:e.minValue,setValue:i}});case"dateRange":return t.jsx(Tt,{label:e.label,name:String(e.key),propsMax:{name:"maxValue",value:(o=e.maxValue)==null?void 0:o.toString()},propsMin:{name:"minValue",value:(l=e.minValue)==null?void 0:l.toString()},register:n,setValue:i});default:return t.jsx("div",{})}},Zt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Xt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Jt=e=>{var c,d,p,u,x;const[n,i]=g.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.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=(c=e.find(f=>f.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>f.type==="text").reduce((f,h)=>({...f,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(u=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:u.minValue,maxValue:(x=e.find(f=>["numberRange","dateRange"].includes(f.type)))==null?void 0:x.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Na=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>c.type==="text").reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Ea=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Ae=({options:e,onSubmit:n,id:i,open:a})=>{const{control:r,items:o,setItems:l,register:c,handleSubmit:d,setValue:p}=Jt(e),u=e.some(y=>y.type==="checkboxes"),x=g.useCallback(y=>{const{value:b}=y.target,m=Ea(e,b);l(m)},[e,l]),f=g.useCallback(y=>{n&&n(y)},[n]);g.useEffect(()=>{l(e),Na(e,p)},[e,l,p]);const h=t.jsx(he,{$bgColor:"transparent",children:t.jsxs(be,{$size:"fixed",flexDirection:"column",gap:1.25,style:{overflow:"hidden"},children:[u&&t.jsx(oe,{onChange:x}),t.jsxs("form",{id:i,onSubmit:d(f),children:[t.jsx(Zt,{control:r,items:o,register:c,setValue:p}),t.jsx(R,{mt:1,type:"submit",children:"Apply"})]})]})});return a?G.createPortal(h,document.getElementById("portals")??document.body):t.jsx("div",{})},ve=({options:e,variant:n,onApplyFilters:i})=>{const a=s.nt(),[r,o]=g.useState(e),[l,c]=g.useState([]),[d,p]=g.useState({}),[u,x]=g.useState(""),f=g.useCallback(b=>()=>{const m=r.find(w=>w.label===b);x(b),c((m==null?void 0:m.filterOptions)??[])},[r]),h=g.useCallback(b=>{const m=[...b.checkbox,...Object.values(b.text??{}),...b.radio?[b.radio]:[],...b.minValue?[String(b.minValue)]:[],...b.maxValue?[String(b.maxValue)]:[]];p(j=>m.length>0?{...j,[u]:m}:j);const w=j=>{var N,F;return{...j,options:(N=j.options)==null?void 0:N.map(L=>({...L,checked:b.checkbox.includes(L.value)||b.radio===L.value})),value:j.type==="text"?((F=b.text)==null?void 0:F[`${String(j.key)}-${j.filterFn??"caseInsensitive"}`])??j.value:j.value,minValue:j.type==="numberRange"?b.minValue:j.minValue,maxValue:j.type==="numberRange"?b.maxValue:j.maxValue}},k=j=>j.label===u?{...j,filterOptions:j.filterOptions.map(w)}:j,I=r.map(k);o(j=>j.map(k));const z=I.flatMap(({filterOptions:j})=>j);i(z),c([])},[r,i,u]),y=g.useCallback((b,m)=>{const w=`li-filter-option-${b}`;return t.jsxs(Fa,{icon:m,onClick:f(b),value:w,width:"100%",children:[b,d[b]===void 0?void 0:t.jsx(K,{tagLabel:d[b].length.toString()})]},w)},[d,f]);return g.useEffect(()=>{const b=e.reduce((m,{label:w,filterOptions:k})=>{const I=k.flatMap(({value:N,minValue:F,maxValue:L})=>[F,L,N]).filter(Boolean),z=k.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),j=[...I,...z];return j.length===0?m:{...m,[w]:j}},{});p(b)},[e]),n==="grouped"?t.jsxs($,{flexGrow:1,position:"relative",zIndex:80,children:[Object.entries(Yt(e)).map(([b,m])=>t.jsxs($,{width:"100%",children:[t.jsx(v,{color:a.palette.gray[400],mb:.25,size:"sm",children:b}),m.map(({label:w,icon:k="filter-list"})=>y(w,k))]},b)),t.jsx(Ae,{id:"filters-options",onSubmit:h,open:l.length>0,options:l})]}):t.jsxs($,{flexGrow:1,children:[e.map(({label:b,icon:m="filter-list"})=>y(b,m)),t.jsx(Ae,{id:"filters-options",onSubmit:h,open:l.length>0,options:l})]})},Qt=({_containerId:e="portals",options:n,onApplyFilters:i,modalRef:a})=>a.isOpen?G.createPortal(t.jsx(he,{$bgColor:"transparent","aria-label":a.name,"aria-modal":"true",children:t.jsxs(be,{$size:"fixed",alignItems:"start",display:"flex",flexDirection:"row",gap:.5,position:"relative",children:[t.jsx(ve,{onApplyFilters:i,options:n,variant:"ungrouped"}),t.jsx(qt,{icon:"close",iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:a.close,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{}),Ra=({_containerId:e="portals",rightColumnOptions:n,leftColumnOptions:i,variant:a,onApplyFilters:r,modalRef:o})=>o.isOpen?G.createPortal(t.jsx(he,{$bgColor:"transparent","aria-label":o.name,"aria-modal":"true",children:t.jsxs(be,{$size:"lg",alignItems:"start",flexDirection:"row",gap:1,position:"relative",px:1.25,py:1.25,children:[t.jsxs($,{display:"flex",flexGrow:1,gap:1,justify:"space-between",children:[t.jsx(ve,{onApplyFilters:r,options:i,variant:a}),t.jsx(ve,{onApplyFilters:r,options:n,variant:a})]}),t.jsx(qt,{icon:"close",iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{}),Da=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:u,maxValue:x}=c,f=s._.isEmpty(u)?void 0:d(String(u)),h=s._.isEmpty(x)?void 0:d(String(x));return f===void 0&&h===void 0?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"text":default:return i(l,c)}})}return e.filter(o)},ct=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.filter(({value:i,maxValue:a,minValue:r})=>i??a??r)].length,Pa=({dataset:e,key:n,options:i,setFilteredDataset:a})=>{const r=Fe("filters-modal"),[o,l]=g.useState([]),[c,d]=g.useState(ct(o));g.useEffect(()=>{const x=localStorage.getItem(n);if(x)l(JSON.parse(x));else{const f=i.flatMap(h=>h.filterOptions);l(f)}},[n,i]);const p=i.map(x=>({...x,filterOptions:x.filterOptions.map(f=>o.find(y=>y.key===f.key&&y.type===f.type&&y.filterFn===f.filterFn)??{...f})})),u=g.useCallback(x=>{l([...x]),localStorage.setItem(n,JSON.stringify(x))},[l,n]);return g.useEffect(()=>{a(Da(e,o)),d(ct(o))},[e,o,a]),t.jsxs(g.Fragment,{children:[t.jsx($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",wrap:"wrap",children:t.jsx($,{pr:.25,children:t.jsx(R,{icon:"filter",id:"filterBtn",onClick:r.toggle,tag:c.toString(),variant:"ghost"})})}),t.jsx(Qt,{modalRef:r,onApplyFilters:u,options:p})]})},en=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:u=void 0,title:x=void 0,size:f,id:h="modal-container"})=>{const y=s.nt(),b=()=>t.jsx(he,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(be,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(x)&&t.jsx(Vt,{description:l,modalRef:c,onClose:p,otherActions:d,title:x}),u&&t.jsx($,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:u})}),(s._.isObject(o)||a)&&t.jsxs(ga,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(ha,{$framed:o.imageFramed,children:t.jsx(_,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(v,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?G.createPortal(b(),document.getElementById("portals")??document.body):c.isOpen?b():null},La=()=>{const[e,n]=g.useState(!1),[i,a]=g.useState(),r=g.useRef(null),o=Fe("confirm-dialog-modal"),l=g.useCallback(async u=>(a(u),n(!0),new Promise(x=>{r.current=x})),[]),c=g.useCallback(()=>{var u;n(!1),a(void 0),(u=r.current)==null||u.call(r,!0)},[]),d=g.useCallback(()=>{var u;n(!1),a(void 0),(u=r.current)==null||u.call(r,!1)},[]);return g.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:u="confirm-dialog-modal",children:x})=>t.jsx(en,{description:i==null?void 0:i.message,id:u,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:t.jsxs($,{display:"flex",flexDirection:"column",children:[x,t.jsx(Ht,{id:i==null?void 0:i.id,onCancel:d,onConfirm:c})]})}),confirm:l}},Wa=s.dt.button`
|
|
1917
|
+
`,Xt=({option:e,register:n,setValue:i})=>{var a,r,o,l;switch(e.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(a=e.options)==null?void 0:a.map(d=>t.jsx(ct,{value:d.value,width:"content",children:t.jsx(Fe,{...n("checkbox"),label:d.label,value:d.value})},`li-checkbox-${d.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=e.options)==null?void 0:r.map(d=>t.jsx(ct,{value:d.value,width:"content",children:t.jsx(Xe,{...n("radio"),label:d.label,value:d.value})},`li-radio-${d.value}`))});case"text":const c=`text.${String(e.key)}-${e.filterFn??"caseInsensitive"}`;return t.jsx(qe,{label:e.label,name:c,register:n,value:e.value});case"numberRange":return t.jsx(Et,{label:e.label,name:String(e.key),propsMax:{placeholder:"Max",register:n,name:"maxValue",value:e.maxValue,setValue:i},propsMin:{placeholder:"Min",register:n,name:"minValue",value:e.minValue,setValue:i}});case"dateRange":return t.jsx(Tt,{label:e.label,name:String(e.key),propsMax:{name:"maxValue",value:(o=e.maxValue)==null?void 0:o.toString()},propsMin:{name:"minValue",value:(l=e.minValue)==null?void 0:l.toString()},register:n,setValue:i});default:return t.jsx("div",{})}},Zt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Xt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Jt=e=>{var c,d,p,g,u;const[n,i]=x.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.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=(c=e.find(f=>f.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:f})=>f))==null?void 0:p.value)??"",text:e.filter(f=>f.type==="text").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:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Na=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>c.type==="text").reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Ea=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Be=({options:e,onSubmit:n,id:i,open:a})=>{const{control:r,items:o,setItems:l,register:c,handleSubmit:d,setValue:p}=Jt(e),g=e.some(y=>y.type==="checkboxes"),u=x.useCallback(y=>{const{value:$}=y.target,m=Ea(e,$);l(m)},[e,l]),f=x.useCallback(y=>{n&&n(y)},[n]);x.useEffect(()=>{l(e),Na(e,p)},[e,l,p]);const h=t.jsx(he,{$bgColor:"transparent",children:t.jsxs(be,{$size:"fixed",flexDirection:"column",gap:1.25,style:{overflow:"hidden"},children:[g&&t.jsx(oe,{onChange:u}),t.jsxs("form",{id:i,onSubmit:d(f),children:[t.jsx(Zt,{control:r,items:o,register:c,setValue:p}),t.jsx(R,{mt:1,type:"submit",children:"Apply"})]})]})});return a?G.createPortal(h,document.getElementById("portals")??document.body):t.jsx("div",{})},Ce=({options:e,variant:n,onApplyFilters:i})=>{const a=s.nt(),[r,o]=x.useState(e),[l,c]=x.useState([]),[d,p]=x.useState({}),[g,u]=x.useState(""),f=x.useCallback($=>()=>{const m=r.find(w=>w.label===$);u($),c((m==null?void 0:m.filterOptions)??[])},[r]),h=x.useCallback($=>{const m=[...$.checkbox,...Object.values($.text??{}),...$.radio?[$.radio]:[],...$.minValue?[String($.minValue)]:[],...$.maxValue?[String($.maxValue)]:[]];p(k=>m.length>0?{...k,[g]:m}:k);const w=k=>{var N,F;return{...k,options:(N=k.options)==null?void 0:N.map(L=>({...L,checked:$.checkbox.includes(L.value)||$.radio===L.value})),value:k.type==="text"?((F=$.text)==null?void 0:F[`${String(k.key)}-${k.filterFn??"caseInsensitive"}`])??k.value:k.value,minValue:k.type==="numberRange"?$.minValue:k.minValue,maxValue:k.type==="numberRange"?$.maxValue:k.maxValue}},j=k=>k.label===g?{...k,filterOptions:k.filterOptions.map(w)}:k,I=r.map(j);o(k=>k.map(j));const z=I.flatMap(({filterOptions:k})=>k);i(z),c([])},[r,i,g]),y=x.useCallback(($,m)=>{const w=`li-filter-option-${$}`;return t.jsxs(Fa,{icon:m,onClick:f($),value:w,width:"100%",children:[$,d[$]===void 0?void 0:t.jsx(K,{tagLabel:d[$].length.toString()})]},w)},[d,f]);return x.useEffect(()=>{const $=e.reduce((m,{label:w,filterOptions:j})=>{const I=j.flatMap(({value:N,minValue:F,maxValue:L})=>[F,L,N]).filter(Boolean),z=j.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),k=[...I,...z];return k.length===0?m:{...m,[w]:k}},{});p($)},[e]),n==="grouped"?t.jsxs(b,{flexGrow:1,position:"relative",zIndex:80,children:[Object.entries(Yt(e)).map(([$,m])=>t.jsxs(b,{width:"100%",children:[t.jsx(v,{color:a.palette.gray[400],mb:.25,size:"sm",children:$}),m.map(({label:w,icon:j="filter-list"})=>y(w,j))]},$)),t.jsx(Be,{id:"filters-options",onSubmit:h,open:l.length>0,options:l})]}):t.jsxs(b,{flexGrow:1,children:[e.map(({label:$,icon:m="filter-list"})=>y($,m)),t.jsx(Be,{id:"filters-options",onSubmit:h,open:l.length>0,options:l})]})},Qt=({_containerId:e="portals",options:n,onApplyFilters:i,modalRef:a})=>a.isOpen?G.createPortal(t.jsx(he,{$bgColor:"transparent","aria-label":a.name,"aria-modal":"true",children:t.jsxs(be,{$size:"fixed",alignItems:"start",display:"flex",flexDirection:"row",gap:.5,position:"relative",children:[t.jsx(Ce,{onApplyFilters:i,options:n,variant:"ungrouped"}),t.jsx(qt,{icon:"close",iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:a.close,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{}),Ra=({_containerId:e="portals",rightColumnOptions:n,leftColumnOptions:i,variant:a,onApplyFilters:r,modalRef:o})=>o.isOpen?G.createPortal(t.jsx(he,{$bgColor:"transparent","aria-label":o.name,"aria-modal":"true",children:t.jsxs(be,{$size:"lg",alignItems:"start",flexDirection:"row",gap:1,position:"relative",px:1.25,py:1.25,children:[t.jsxs(b,{display:"flex",flexGrow:1,gap:1,justify:"space-between",children:[t.jsx(Ce,{onApplyFilters:r,options:i,variant:a}),t.jsx(Ce,{onApplyFilters:r,options:n,variant:a})]}),t.jsx(qt,{icon:"close",iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,variant:"ghost"})]})}),document.getElementById(e)??document.body):t.jsx("div",{}),Da=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,f=s._.isEmpty(g)?void 0:d(String(g)),h=s._.isEmpty(u)?void 0:d(String(u));return f===void 0&&h===void 0?!0:(f??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"text":default:return i(l,c)}})}return e.filter(o)},dt=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.filter(({value:i,maxValue:a,minValue:r})=>i??a??r)].length,Pa=({dataset:e,key:n,options:i,setFilteredDataset:a})=>{const r=Ne("filters-modal"),[o,l]=x.useState([]),[c,d]=x.useState(dt(o));x.useEffect(()=>{const u=localStorage.getItem(n);if(u)l(JSON.parse(u));else{const f=i.flatMap(h=>h.filterOptions);l(f)}},[n,i]);const p=i.map(u=>({...u,filterOptions:u.filterOptions.map(f=>o.find(y=>y.key===f.key&&y.type===f.type&&y.filterFn===f.filterFn)??{...f})})),g=x.useCallback(u=>{l([...u]),localStorage.setItem(n,JSON.stringify(u))},[l,n]);return x.useEffect(()=>{a(Da(e,o)),d(dt(o))},[e,o,a]),t.jsxs(x.Fragment,{children:[t.jsx(b,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",wrap:"wrap",children:t.jsx(b,{pr:.25,children:t.jsx(R,{icon:"filter",id:"filterBtn",onClick:r.toggle,tag:c.toString(),variant:"ghost"})})}),t.jsx(Qt,{modalRef:r,onApplyFilters:g,options:p})]})},en=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:f,id:h="modal-container"})=>{const y=s.nt(),$=()=>t.jsx(he,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(be,{$size:f,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&t.jsx(Ht,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx(b,{borderTop:`1px solid ${y.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Ze,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ga,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(ha,{$framed:o.imageFramed,children:t.jsx(_,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(v,{size:"sm",children:o.imageText})]}),t.jsx(Mt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?G.createPortal($(),document.getElementById("portals")??document.body):c.isOpen?$():null},La=()=>{const[e,n]=x.useState(!1),[i,a]=x.useState(),r=x.useRef(null),o=Ne("confirm-dialog-modal"),l=x.useCallback(async g=>(a(g),n(!0),new Promise(u=>{r.current=u})),[]),c=x.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=x.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return x.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsx(en,{description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:t.jsxs(b,{display:"flex",flexDirection:"column",children:[u,t.jsx(Ot,{id:i==null?void 0:i.id,onCancel:d,onConfirm:c})]})}),confirm:l}},Wa=s.dt.button`
|
|
1918
1918
|
display: flex;
|
|
1919
1919
|
position: relative;
|
|
1920
1920
|
height: 32px;
|
|
@@ -1978,7 +1978,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
1978
1978
|
}
|
|
1979
1979
|
}
|
|
1980
1980
|
`}
|
|
1981
|
-
`,Me=({containerRef:e,id:n})=>{const i=s.nt(),a=n==="desktop"?380:342,r=
|
|
1981
|
+
`,Me=({containerRef:e,id:n})=>{const i=s.nt(),a=n==="desktop"?380:342,r=x.useCallback(l=>()=>{if(e!=null&&e.current){const{current:c}=e;c.scrollBy({left:l==="right"?a:-a,behavior:"smooth"})}},[e,a]),o=x.useCallback(l=>t.jsxs(Wa,{onClick:r(l),children:[t.jsx(C,{clickable:!0,icon:`circle-arrow-${l}`,iconClass:"hovered",iconColor:i.palette.gray[800],iconSize:"md",iconType:"fa-solid"}),t.jsx(C,{clickable:!0,icon:`circle-arrow-${l}`,iconClass:"uncover",iconColor:i.palette.gray[800],iconSize:"md",iconType:"fa-light"})]}),[r,i]);return t.jsxs(b,{alignItems:"center",display:"flex",gap:1,id:n,width:"max-content",children:[o("left"),o("right")]})},He=({tag:e,tagPosition:n})=>{const i=s.nt();return e?t.jsx(b,{alignItems:"center",bgColor:i.palette.white,borderRadius:"8px",display:"flex",justify:"center",margin:n==="top"?[.75,.75,.75,.75]:void 0,padding:[.25,.5,.25,.5],position:n==="top"?"absolute":"relative",top:"0",width:"max-content",children:t.jsx(v,{color:i.palette.gray[900],lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",textAlign:"center",children:e})}):null},tn=({eventDate:e})=>{const n=s.nt(),i=s.lodashExports.isEmpty(e)?null:e==null?void 0:e.split("-");if(i){const[a,r]=i;return t.jsxs(b,{alignItems:"center",bgColor:n.palette.white,borderRadius:"8px",display:"flex",flexDirection:"column",margin:[.75,.75,.75,.75],padding:[.75,1.5,.75,1.5],position:"absolute",right:"0",shadow:"md",top:"0",children:[t.jsx(A,{fontWeight:"semibold",lineSpacingSm:1.25,size:"md",sizeSm:"sm",textAlign:"center",children:a}),t.jsx(v,{color:n.palette.gray[800],fontWeight:"semibold",lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",textAlign:"center",children:r.toUpperCase()})]})}return null},Ba=s.dt.div`
|
|
1982
1982
|
${({theme:e})=>`
|
|
1983
1983
|
align-items: flex-start;
|
|
1984
1984
|
display: flex;
|
|
@@ -2023,7 +2023,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2023
2023
|
}
|
|
2024
2024
|
}
|
|
2025
2025
|
`}
|
|
2026
|
-
`,nn=({author:e,buttonText:n,description:i,eventDate:a,href:r,imageId:o,mode:l="light",publishDate:c,readingTime:d,tag:p,tagPosition:
|
|
2026
|
+
`,nn=({author:e,buttonText:n,description:i,eventDate:a,href:r,imageId:o,mode:l="light",publishDate:c,readingTime:d,tag:p,tagPosition:g="top",title:u})=>{const f=s.nt(),h=c==null?void 0:c.split("-"),y=l==="dark",$=t.jsxs(Ba,{"data-testid":`content-card-${u}`,children:[o||a||p&&g==="top"?t.jsxs(b,{id:"card-image",position:"relative",children:[o&&t.jsx(_,{publicId:o}),g==="top"&&t.jsx(He,{tag:p,tagPosition:g}),t.jsx(tn,{eventDate:a})]}):void 0,t.jsxs(b,{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:.5,id:"card-content",children:[g==="bottom"&&t.jsx(He,{tag:p,tagPosition:g}),e||h||d?t.jsxs(b,{display:"flex",justify:"space-between",width:"100%",children:[e&&h&&t.jsx(v,{color:f.palette.gray[y?300:400],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:e+` • ${h[0]} ${h[1]}, ${h[2]}`}),d&&t.jsxs(b,{alignItems:"center",display:"flex",gap:.25,justify:"center",minWidth:"60px",children:[t.jsx(C,{icon:"eye",iconColor:f.palette.gray[y?300:400],iconSize:"xs",iconType:"fa-light"}),t.jsx(v,{color:f.palette.gray[y?300:400],size:"sm",sizeSm:"xs",textAlign:"right",children:d})]})]}):void 0,t.jsx(A,{className:`title-${l}`,color:y?f.palette.white:f.palette.gray[800],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:u}),i&&t.jsx(v,{color:f.palette.gray[y?100:600],size:"md",sizeSm:"sm",children:i}),n&&r&&t.jsx(R,{href:r,variant:"link",children:n})]})]});return r?t.jsx("a",{className:"flex w-fit",href:r,rel:"noopener noreferrer",target:"_self",children:$}):$},Ma=({description:e,items:n,title:i,titleHighlighted:a})=>{const r=x.useRef(null);return t.jsxs(Aa,{"data-testid":"content-card-carousel",children:[t.jsxs(b,{alignItems:"flex-start",display:"flex",justify:"space-between",children:[t.jsxs(b,{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:.625,maxWidth:"800px",children:[t.jsxs(A,{display:"inline",fontWeight:"semibold",lineSpacing:2.25,lineSpacingSm:1.75,size:"lg",sizeSm:"md",children:[i+" "," ",t.jsx("span",{className:"inline",children:a})]}),t.jsx(v,{lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",children:e})]}),t.jsx(Me,{containerRef:r,id:"desktop"})]}),t.jsx(b,{alignSelf:"stretch",display:"flex",id:"carousel",pb:1,pr:2.25,ref:r,scroll:"x",children:t.jsx(b,{alignItems:"flex-start",display:"flex",gap:1.5,width:"max-content",children:n.map((o,l)=>t.jsx(nn,{...o},`${l}-${o.title}`))})}),t.jsx(Me,{containerRef:r,id:"mobile"})]})},Oe=({buttonProps:e,variant:n})=>t.jsx(R,{onClick:e.onClick,variant:n,children:e.text}),Ha=s.dt.div`
|
|
2027
2027
|
display: flex;
|
|
2028
2028
|
flex-direction: column;
|
|
2029
2029
|
align-items: center;
|
|
@@ -2031,7 +2031,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2031
2031
|
max-width: 900px;
|
|
2032
2032
|
white-space: pre-line;
|
|
2033
2033
|
margin: 0 auto;
|
|
2034
|
-
`,
|
|
2034
|
+
`,Oa=s.dt.div`
|
|
2035
2035
|
display: flex;
|
|
2036
2036
|
flex-direction: row;
|
|
2037
2037
|
justify-content: center;
|
|
@@ -2044,7 +2044,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2044
2044
|
> img {
|
|
2045
2045
|
width: 100%;
|
|
2046
2046
|
}
|
|
2047
|
-
`,
|
|
2047
|
+
`,Va=s.dt.div`
|
|
2048
2048
|
display: flex;
|
|
2049
2049
|
flex-direction: row;
|
|
2050
2050
|
margin: 0;
|
|
@@ -2057,7 +2057,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2057
2057
|
> *:last-child {
|
|
2058
2058
|
margin-right: 0;
|
|
2059
2059
|
}
|
|
2060
|
-
`,
|
|
2060
|
+
`,pt={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},_a=({cancelButton:e=void 0,confirmButton:n=void 0,description:i,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(n??e)!==void 0;return t.jsxs(Ha,{$padding:r,children:[t.jsx(Oa,{children:t.jsx(_,{alt:"empty-icon",publicId:a})}),t.jsx(A,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:pt[l].title,textAlign:"center",children:o}),t.jsx(v,{mb:c?2:void 0,size:pt[l].description,textAlign:"center",children:i}),c?t.jsxs(Va,{children:[e&&t.jsx(Oe,{buttonProps:e,variant:"tertiary"}),n&&t.jsx(Oe,{buttonProps:n,variant:"primary"})]}):void 0]})},Ga=({children:e})=>{const n=s.useFormContext();return e({...n})},Ua=s.dt.form`
|
|
2061
2061
|
${({theme:e})=>`
|
|
2062
2062
|
align-items: flex-start;
|
|
2063
2063
|
align-self: stretch;
|
|
@@ -2067,7 +2067,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2067
2067
|
overflow: hidden auto;
|
|
2068
2068
|
width: 100%;
|
|
2069
2069
|
`}
|
|
2070
|
-
`,Ya=({alert:e,cancelButton:n,children:i,confirmButton:a,defaultDisabled:r=!0,id:o="modal-confirm",maxButtonWidth:l="392px",mode:c,onSubmit:d,showButtons:p=!0,yupSchema:u
|
|
2070
|
+
`,Ya=({alert:e,cancelButton:n,children:i,confirmButton:a,defaultDisabled:r=!0,id:o="modal-confirm",maxButtonWidth:l="392px",mode:c,onSubmit:d,showButtons:p=!0,yupSchema:g,...u})=>{const f=s.nt(),h=s.useForm({...u,mode:c??"all",resolver:g?s.o(g):void 0});return t.jsx(s.FormProvider,{...h,children:t.jsx(Ua,{onSubmit:h.handleSubmit(d),children:t.jsxs(b,{scroll:"y",width:"100%",children:[t.jsx(b,{borderRadius:`0 0 ${f.spacing[.25]} ${f.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:i}),p&&t.jsxs(b,{borderRadius:`0 0 ${f.spacing[.25]} ${f.spacing[.25]}`,borderTop:`1px solid ${f.palette.gray[200]}`,display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs(b,{display:"flex",gap:.75,maxWidth:l,children:[n?t.jsx(R,{icon:n.icon,id:`${o}-cancel`,justify:"center",onClick:n.onClick,type:"reset",variant:"tertiary",width:"100%",children:n.label??"Cancel"}):void 0,t.jsx(R,{disabled:((a==null?void 0:a.disabled)??!1)||r&&!h.formState.isDirty,icon:a==null?void 0:a.icon,id:o,justify:"center",type:"submit",width:"100%",children:(a==null?void 0:a.label)??"Confirm"})]})]})]})})})},Ka=s.dt(Q)`
|
|
2071
2071
|
display: grid;
|
|
2072
2072
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2073
2073
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2085,7 +2085,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2085
2085
|
grid-template-columns: repeat(${n}, 1fr);
|
|
2086
2086
|
}
|
|
2087
2087
|
`}
|
|
2088
|
-
`,qa=
|
|
2088
|
+
`,qa=x.forwardRef(function({children:n,md:i,sm:a,lg:r,xl:o,gap:l,...c},d){return t.jsx(Ka,{$gap:l,$lg:r,$md:i,$sm:a,$xl:o,ref:d,...c,children:n})}),Xa=s.dt.div`
|
|
2089
2089
|
${({theme:e,$itemsLength:n})=>`
|
|
2090
2090
|
display: flex;
|
|
2091
2091
|
background-color: ${e.palette.white};
|
|
@@ -2104,7 +2104,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2104
2104
|
width: 507px;
|
|
2105
2105
|
}
|
|
2106
2106
|
`}
|
|
2107
|
-
`,
|
|
2107
|
+
`,Je=s.dt.div`
|
|
2108
2108
|
${({theme:e,$isSelected:n})=>`
|
|
2109
2109
|
align-items: center;
|
|
2110
2110
|
background-color: ${n?e.palette.gray[100]:e.palette.white};
|
|
@@ -2121,7 +2121,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2121
2121
|
background-color: ${e.palette.gray[100]};
|
|
2122
2122
|
}
|
|
2123
2123
|
`}
|
|
2124
|
-
`,an=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=
|
|
2124
|
+
`,an=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=x.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:r,children:[e?t.jsx(C,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(v,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},Za=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=x.useState(n),[u,f]=x.useState(""),h=x.useCallback(m=>{g(w=>w.filter(j=>String(j.name).toLowerCase().includes(m.toLocaleLowerCase())))},[g]),y=x.useCallback(m=>{m.currentTarget&&(f(m.currentTarget.value),h(m.currentTarget.value))},[f,h]);x.useEffect(()=>{g(n),h(u)},[n,h,u]);const $=()=>t.jsx(b,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx(b,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(Xa,{$itemsLength:p.length,children:[t.jsxs(b,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(v,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(B,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx(b,{mt:1,children:t.jsx(oe,{onInput:y,placeholder:"Search"})}),t.jsx(J,{mb:1,mt:1}),t.jsxs(b,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(Je,{onClick:i,children:t.jsxs(b,{alignItems:"center",display:"flex",children:[t.jsx(C,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(v,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(m=>t.jsx(an,{isSelected:o.toLowerCase()===m.name,label:m.name.charAt(0).toUpperCase()+m.name.slice(1),onSelect:a},m.name))]})]})})});return e?G.createPortal($(),document.body):t.jsx("div",{})},Ja=({description:e,height:n="auto",leftIconName:i,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=s.nt(),f=p==="centered",h=l&&t.jsx(Y,{icon:r??i,iconColor:u.palette.gray[800],id:l,place:d,tip:c});return t.jsxs(b,{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:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[t.jsxs(b,{alignItems:"center",display:"flex",gap:.5,children:[f||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(v,{color:f?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:f?"center":"start",children:e}),f||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs(b,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[f&&!s.lodashExports.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(A,{fontWeight:"bold",size:"md",children:o}),a]}),f&&!s.lodashExports.isUndefined(r)?h:void 0]})]})},Qa=({actions:e,children:n,header:i,title:a,tabs:r,footer:o})=>{const l=s.nt();return t.jsxs(b,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs(b,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs(b,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(v,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:a}),i]}),e&&t.jsx(b,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(B,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx(b,{display:"flex",pt:.25,width:"100%",children:t.jsx(Ze,{items:r})}),t.jsx(b,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx(b,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},g)=>t.jsx(R,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},er=s.dt.div`
|
|
2125
2125
|
${({theme:e})=>`
|
|
2126
2126
|
align-items: flex-start;
|
|
2127
2127
|
backdrop-filter: blur(3.15px);
|
|
@@ -2187,7 +2187,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2187
2187
|
height: 260px;
|
|
2188
2188
|
width: 260px;
|
|
2189
2189
|
}
|
|
2190
|
-
`,rn=({icon:e})=>t.jsx(tr,{children:t.jsx(C,{icon:e,iconColor:S.palette.white,iconSize:"xs",iconTransform:"shrink-2",iconType:"fa-light"})}),nr=({category:e,description:n,href:i,icon:a,location:r,title:o})=>{const l=s.nt();return t.jsxs(er,{children:[t.jsxs(
|
|
2190
|
+
`,rn=({icon:e})=>t.jsx(tr,{children:t.jsx(C,{icon:e,iconColor:S.palette.white,iconSize:"xs",iconTransform:"shrink-2",iconType:"fa-light"})}),nr=({category:e,description:n,href:i,icon:a,location:r,title:o})=>{const l=s.nt();return t.jsxs(er,{children:[t.jsxs(b,{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:1.5,height:"100%",id:"uncover",justify:"space-between",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx(v,{color:l.palette.white,size:"sm",sizeSm:"xs",children:e}),t.jsx(A,{color:l.palette.white,fontWeight:"bold",lineSpacing:2.25,lineSpacingSm:1.75,size:"lg",sizeSm:"md",children:o})]}),t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx(v,{color:l.palette.white,size:"sm",sizeSm:"xs",children:"Location"}),t.jsx(v,{color:l.palette.white,fontWeight:"bold",lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",children:r})]})]}),t.jsxs(b,{alignItems:"self-start",display:"flex",flexDirection:"column",gap:2,height:"100%",id:"hovered",justify:"space-between",pt:1,children:[t.jsx(A,{color:l.palette.white,fontWeight:"bold",lineSpacing:1.75,lineSpacingSm:1.5,size:"md",sizeSm:"sm",children:o}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsx(v,{color:l.palette.gray[100],lineSpacing:1.5,lineSpacingSm:1.25,size:"md",sizeSm:"sm",children:n}),t.jsx(R,{external:!0,href:i,variant:"link",width:"max-content",children:"Download now"})]})]}),t.jsx(rn,{icon:a})]})},ir=s.dt.button`
|
|
2191
2191
|
${({theme:e})=>`
|
|
2192
2192
|
align-items: center;
|
|
2193
2193
|
border-left: 3px solid transparent;
|
|
@@ -2297,7 +2297,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2297
2297
|
}
|
|
2298
2298
|
}
|
|
2299
2299
|
`}
|
|
2300
|
-
`,on=({disabled:e=!1,mode:n,onClick:i,text:a})=>t.jsx(ir,{className:`${e&&"disabled"} ${n}`,disabled:e,onClick:i,children:t.jsx(v,{color:"inherit",size:"sm",sizeSm:"xs",children:a})}),sr=[{text:"EN"},{text:"ES"}],lr=({items:e,handleClick:n,mode:i="light"})=>{const a=e??sr,[r,o]=
|
|
2300
|
+
`,on=({disabled:e=!1,mode:n,onClick:i,text:a})=>t.jsx(ir,{className:`${e&&"disabled"} ${n}`,disabled:e,onClick:i,children:t.jsx(v,{color:"inherit",size:"sm",sizeSm:"xs",children:a})}),sr=[{text:"EN"},{text:"ES"}],lr=({items:e,handleClick:n,mode:i="light"})=>{const a=e??sr,[r,o]=x.useState(a[0].text),l=x.useCallback(c=>()=>{n(c.text),o(c.text)},[n]);return t.jsxs(or,{children:[t.jsxs(ar,{className:i,children:[t.jsx(C,{icon:"globe",iconSize:"xs",iconType:"fa-light"}),r]}),t.jsx(rr,{children:a.map((c,d)=>t.jsx(on,{disabled:c.disabled,mode:i,onClick:l(c),text:c.text},`${c.text}_${d}`))})]})},cr=s.dt.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,dr=s.dt.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
2301
2301
|
gap: 12px;
|
|
2302
2302
|
`,pr=s.dt.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
2303
2303
|
gap: 8px;
|
|
@@ -2414,13 +2414,13 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2414
2414
|
stroke-width: 10px;
|
|
2415
2415
|
transform-origin: 50% 50%;
|
|
2416
2416
|
opacity: ${({$color:e})=>e==="white"?"20%":"unset"};
|
|
2417
|
-
`,zr=({color:e="red",label:n,size:i})=>{const a=s.nt();return t.jsxs(
|
|
2417
|
+
`,zr=({color:e="red",label:n,size:i})=>{const a=s.nt();return t.jsxs(b,{alignItems:"center",display:"flex",children:[t.jsxs(vr,{$size:i,viewBox:"0 0 100 100",children:[t.jsx(Sr,{$color:e,cx:"50",cy:"50",r:"45"}),t.jsx(Cr,{$color:e,cx:"50",cy:"50",r:"45"})]}),n&&t.jsx(v,{color:e==="red"?a.palette.gray[700]:a.palette.white,ml:.5,size:"sm",children:n})]})},Ir=s.dt.div`
|
|
2418
2418
|
display: flex;
|
|
2419
2419
|
height: 80px;
|
|
2420
2420
|
max-width: 1440px;
|
|
2421
2421
|
overflow: hidden;
|
|
2422
2422
|
position: relative;
|
|
2423
|
-
`,
|
|
2423
|
+
`,gt=s.dt.div`
|
|
2424
2424
|
height: 79px;
|
|
2425
2425
|
width: 64px;
|
|
2426
2426
|
flex-shrink: 0;
|
|
@@ -2459,7 +2459,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2459
2459
|
transform: translateX(calc(-180px * 15));
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
|
-
`,Fr=["airs/clients-carousel/color/bancolombia","airs/clients-carousel/color/itau_colombia","airs/clients-carousel/color/lulo_bank","airs/clients-carousel/color/oxxo_international","airs/clients-carousel/color/interbank","airs/clients-carousel/color/global_bank","airs/clients-carousel/color/gesa","airs/clients-carousel/color/copa_airlines","airs/clients-carousel/color/consubanco","airs/clients-carousel/color/bantrab","airs/clients-carousel/color/banistmo","airs/clients-carousel/color/banco_internacional","airs/clients-carousel/color/banco_general","airs/clients-carousel/color/banbif","airs/clients-carousel/color/avianca"],Nr=({fusion:e=!1,logos:n=Fr})=>t.jsxs(Ir,{children:[e&&t.jsx(
|
|
2462
|
+
`,Fr=["airs/clients-carousel/color/bancolombia","airs/clients-carousel/color/itau_colombia","airs/clients-carousel/color/lulo_bank","airs/clients-carousel/color/oxxo_international","airs/clients-carousel/color/interbank","airs/clients-carousel/color/global_bank","airs/clients-carousel/color/gesa","airs/clients-carousel/color/copa_airlines","airs/clients-carousel/color/consubanco","airs/clients-carousel/color/bantrab","airs/clients-carousel/color/banistmo","airs/clients-carousel/color/banco_internacional","airs/clients-carousel/color/banco_general","airs/clients-carousel/color/banbif","airs/clients-carousel/color/avianca"],Nr=({fusion:e=!1,logos:n=Fr})=>t.jsxs(Ir,{children:[e&&t.jsx(gt,{className:"left"}),t.jsx(Tr,{children:[...n,...n].map((i,a)=>t.jsx(_,{alt:`${i}-${a}`,height:"80px",plugins:[s.placeholder()],publicId:i,width:"140px"},`${i}-${a}`))}),e&&t.jsx(gt,{className:"right"})]}),Er={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},Rr=({publicId:e,variant:n})=>t.jsx(b,{...Er[n],children:t.jsx(_,{alt:"logo",publicId:e})}),Dr=({children:e,commitSha:n,commitShortSha:i,parentElement:a,userInfo:r,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=r;return ee(a,()=>{o(!1)}),t.jsxs(Gt,{children:[t.jsx("li",{className:"user-info",children:t.jsxs(b,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs(b,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(v,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(v,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(v,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx(b,{children:t.jsx(K,{tagLabel:g,variant:"role"})})]})}),t.jsx(J,{}),e,t.jsx(J,{}),t.jsx("li",{className:"commit-info",children:t.jsx(X,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${n}`,iconPosition:"hidden",children:t.jsx(v,{color:l.palette.gray[400],size:"xs",children:`commit : ${i}`})})})]})},Pr=s.dt.button`
|
|
2463
2463
|
align-items: center;
|
|
2464
2464
|
background-color: transparent;
|
|
2465
2465
|
border: unset;
|
|
@@ -2476,7 +2476,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2476
2476
|
&:hover span {
|
|
2477
2477
|
color: ${S.palette.primary[200]};
|
|
2478
2478
|
}
|
|
2479
|
-
`,Lr=({message:e,onClickButton:n,buttonText:i,buttonFontWeight:a="regular",icon:r,onClose:o,buttonSide:l="end"})=>{const c=s.nt(),[d,p]=
|
|
2479
|
+
`,Lr=({message:e,onClickButton:n,buttonText:i,buttonFontWeight:a="regular",icon:r,onClose:o,buttonSide:l="end"})=>{const c=s.nt(),[d,p]=x.useState(!0),g=x.useCallback(()=>{p(!1),o==null||o()},[o]),u=t.jsxs(Pr,{onClick:n,children:[t.jsx(v,{color:c.palette.white,fontWeight:a,size:"sm",textDecoration:"underline",children:i}),t.jsx(C,{icon:r??"arrow-right",iconColor:c.palette.white,iconSize:"xs",iconType:a==="bold"?"fa-regular":"fa-light"})]});return t.jsxs(b,{alignItems:"center",bgGradient:c.palette.gradients["01"],display:d?"flex":"none",id:"message-banner",justify:"space-between",padding:[.75,.75,.75,.75],children:[t.jsxs(b,{display:"flex",gap:.5,justify:"center",width:"100%",children:[l==="start"&&n?u:void 0,t.jsx(b,{children:typeof e=="string"?t.jsx(v,{color:c.palette.white,display:"inline",size:"sm",children:e}):e}),l==="end"&&n?u:void 0]}),t.jsx(C,{clickable:!0,hoverColor:c.palette.primary[200],icon:"close",iconColor:c.palette.white,iconSize:"xs",iconType:"fa-light",onClick:g})]})},Wr=({filter:e,label:n,onClose:i,filterValue:a})=>s._.isNil(a)||s._.isEmpty(String(a))?null:t.jsx(b,{pr:.25,children:t.jsx(K,{filterValues:a,icon:"filter-list",id:"remove-filter",onClose:i(e),tagLabel:`${n} `})},n),Ar=s.dt.div`
|
|
2480
2480
|
${({theme:e,$variant:n})=>`
|
|
2481
2481
|
background: ${e.palette.white};
|
|
2482
2482
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2495,7 +2495,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2495
2495
|
right: 16px;
|
|
2496
2496
|
}
|
|
2497
2497
|
`}
|
|
2498
|
-
`,
|
|
2498
|
+
`,Br=s.dt.div`
|
|
2499
2499
|
${({theme:e,$variant:n})=>`
|
|
2500
2500
|
height: ${e.spacing[2.5]};
|
|
2501
2501
|
width: ${e.spacing[2.5]};
|
|
@@ -2526,7 +2526,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2526
2526
|
color: ${e.palette[n][500]};
|
|
2527
2527
|
}
|
|
2528
2528
|
`}
|
|
2529
|
-
`,
|
|
2529
|
+
`,Mr=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",Hr=({description:e,onClose:n,title:i,variant:a})=>{const r=s.nt(),o=x.useCallback(()=>{n==null||n()},[n]);return t.jsxs(Ar,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(Br,{$variant:a,children:[t.jsx(C,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(C,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(C,{icon:Mr(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(b,{pr:1.5,children:[t.jsx(A,{fontWeight:"bold",size:"xs",children:i}),t.jsx(v,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(B,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Or=s.dt.div`
|
|
2530
2530
|
width: fit-content;
|
|
2531
2531
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2532
2532
|
border-radius: 4px;
|
|
@@ -2539,7 +2539,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2539
2539
|
align-items: center;
|
|
2540
2540
|
justify-content: center;
|
|
2541
2541
|
padding: 0.5em;
|
|
2542
|
-
`,
|
|
2542
|
+
`,Vr=s.dt.input`
|
|
2543
2543
|
width: 4em;
|
|
2544
2544
|
appearance: textfield;
|
|
2545
2545
|
border-style: none;
|
|
@@ -2559,7 +2559,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2559
2559
|
&::-webkit-inner-spin-button {
|
|
2560
2560
|
opacity: 1;
|
|
2561
2561
|
}
|
|
2562
|
-
`,_r=
|
|
2562
|
+
`,_r=x.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const u=i<0?0:i,[f,h]=x.useState(Number(a).toFixed(u)),y=x.useCallback(w=>{const j=s.lodashExports.toNumber(w.target.value);w.target.value.endsWith(".")?h(w.target.value):j>=Number(o)&&j<=Number(r)&&(h(String(j)),n&&c(s.lodashExports.toNumber(j.toFixed(u)))),w.stopPropagation()},[n,u,r,o,c]),$=x.useCallback(w=>{w.currentTarget.contains(w.relatedTarget)||h(Number(a).toFixed(u)),w.stopPropagation()},[u,a]),m=x.useCallback(w=>{w.stopPropagation(),w.key==="Enter"&&!s.lodashExports.isEmpty(w.currentTarget.value)&&c(s.lodashExports.toNumber(w.currentTarget.value))},[c]);return t.jsx(Or,{onBlur:$,tabIndex:-1,children:t.jsx(Y,{id:"numberInputTooltip",tip:d,children:t.jsx(Vr,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(f),max:r,min:o,name:l,onChange:y,onKeyUp:m,ref:g,step:10**-u,type:"number",value:f})})})}),Gr={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},Ve=({icon:e,label:n,onClick:i,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs(b,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx(b,{height:"24px",width:"24px",children:e===void 0?t.jsx(_,{alt:`${r} Logo`,height:"100%",publicId:Gr[r],width:"100%"}):t.jsx(C,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx(b,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(v,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:n??r})})]})},Ur=({align:e="end",buttonLabel:n="Add Credential",children:i,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=x.useState(!1),p=x.useRef(null);ee(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 $;($=o[h])==null||$.onClick(y),d(!1)},[o]);return t.jsxs(b,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(R,{icon:"plus",onClick:u,variant:"primary",children:n}),t.jsxs(b,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:a,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(Ve,{onClick:f(h),provider:h},h)),r===void 0?void 0:t.jsx(Ve,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),i]})]})},sn=()=>t.jsx(b,{alignItems:"center",bgColor:S.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(v,{bgGradient:S.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),Yr=s.dt.div`
|
|
2563
2563
|
${({className:e,theme:n})=>`
|
|
2564
2564
|
align-items: flex-start;
|
|
2565
2565
|
border-radius: ${n.spacing[1]};
|
|
@@ -2625,7 +2625,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2625
2625
|
}
|
|
2626
2626
|
`}
|
|
2627
2627
|
`;const Kr={advanced:{title:"Advanced plan",benefits:"Leverage vulnerability scanning + AI + expert intelligence",buttonText:"Contact sales",description:"For teams that want to discover risk exposure with speed and accuracy.",priceGroup:"$1,579"},essential:{title:"Essential plan",benefits:"Leverage vulnerability scanning",buttonText:"Start a 21-day free trial",description:`For teams that want to discover risk exposure quickly
|
|
2628
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},qr=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=Kr[i],c=e??r;return t.jsxs(Yr,{className:i,children:[t.jsxs(
|
|
2628
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},qr=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=Kr[i],c=e??r;return t.jsxs(Yr,{className:i,children:[t.jsxs(b,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&t.jsx(sn,{}),t.jsx(A,{color:S.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(v,{color:S.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(v,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(R,{onClick:n,variant:"primary",children:l})]})},ln=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),a=typeof n=="string",r=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(v,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(x.Fragment,{children:[t.jsx(ae,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(r).map((o,l)=>n.includes(o)?t.jsx(ae,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(v,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Xr=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:u})=>{const f=s.nt(),{alt:h,src:y,width:$="77px",height:m="77px"}=d,w=x.useCallback(()=>{n==null||n.onClick()},[n]),j=x.useCallback(()=>{r==null||r.onClick()},[r]),I=t.jsx(b,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs(b,{bgColor:f.palette.white,border:`1px solid ${f.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,pb:2.5,pl:2.5,pr:2.5,pt:2.5,shadow:"lg",width:"100%",zIndex:11,children:[t.jsxs(b,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx(b,{children:t.jsx(_,{alt:h,height:m,publicId:y,width:$})}),t.jsxs(b,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(A,{color:u,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(ln,{description:l,highlightDescription:c})]})]}),a&&t.jsx(b,{mb:1,scroll:"y",children:t.jsx(b,{height:"100%",children:a})}),t.jsxs(b,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(r)?t.jsx(R,{onClick:j,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,s.lodashExports.isObject(n)?t.jsx(R,{onClick:w,variant:(n==null?void 0:n.variant)??"tertiary",children:n==null?void 0:n.text},n==null?void 0:n.key):void 0]})]})});return e?G.createPortal(I,o??document.body):I},Zr=s.dt.div`
|
|
2629
2629
|
${({theme:e})=>`
|
|
2630
2630
|
height: ${e.spacing[1]};
|
|
2631
2631
|
width: ${e.spacing[1]};
|
|
@@ -2656,7 +2656,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2656
2656
|
font-size: ${e.spacing[.5]};
|
|
2657
2657
|
}
|
|
2658
2658
|
`}
|
|
2659
|
-
`,cn=({margin:e,onClick:n,text:i})=>{const a=s.nt(),r=t.jsxs(Zr,{children:[t.jsx(C,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(C,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(C,{icon:"crown",iconClass:"icon",iconSize:"xs"})]});return i!==void 0?t.jsx(
|
|
2659
|
+
`,cn=({margin:e,onClick:n,text:i})=>{const a=s.nt(),r=t.jsxs(Zr,{children:[t.jsx(C,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(C,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(C,{icon:"crown",iconClass:"icon",iconSize:"xs"})]});return i!==void 0?t.jsx(b,{cursor:"pointer",display:"inline-block",mr:e,onClick:n,children:t.jsxs(b,{alignItems:"center",bgColor:a.palette.warning[50],borderRadius:"4px",display:"flex",padding:[.25,.25,.25,.25],width:"fit-content",children:[r,t.jsx(v,{color:a.palette.warning[500],display:"inline",ml:.25,size:"xs",children:i})]})}):t.jsx(b,{display:"inline-block",mr:e,onClick:n,children:r})},Jr=({score:e})=>{const n=s.nt(),i=e<=33?"priority-bars-low":"priority-bars-medium",a=e>66||e===0?"priority-bars-high":i;return t.jsxs(b,{alignItems:"center",display:"inline-flex",gap:.25,children:[t.jsx(C,{icon:a,iconClass:e<=66?"fa-kit-duotone":"",iconColor:e>0?n.palette.primary[500]:n.palette.gray[200],iconSize:"xs",iconType:"fa-kit",secondaryColor:n.palette.gray[200]}),t.jsx(v,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:e+"%"})]})},{getVariant:Qr}=U(e=>({compliance:`
|
|
2660
2660
|
display: inline-flex;
|
|
2661
2661
|
|
|
2662
2662
|
&.horizontal {
|
|
@@ -2736,7 +2736,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2736
2736
|
border-start-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2737
2737
|
background-color: ${a==="compliance"?eo(e,n):"inherit"};
|
|
2738
2738
|
`}
|
|
2739
|
-
`,io=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:a=!1,orientation:r="horizontal",rounded:o=!0,variant:l="default"})=>{const c=a&&i==="left",d=a?t.jsx(
|
|
2739
|
+
`,io=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:a=!1,orientation:r="horizontal",rounded:o=!0,variant:l="default"})=>{const c=a&&i==="left",d=a?t.jsx(b,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(v,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(to,{$minWidth:e,$orientation:r,$rounded:o,$variant:l,className:r,children:t.jsx(no,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs(b,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},ao=s.dt(Q)`
|
|
2740
2740
|
animation: ${({$animationTime:e})=>`progress-bar ${e}s ease-in-out`};
|
|
2741
2741
|
animation-fill-mode: both;
|
|
2742
2742
|
|
|
@@ -2749,12 +2749,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2749
2749
|
width: 100%;
|
|
2750
2750
|
}
|
|
2751
2751
|
}
|
|
2752
|
-
`,ro=e=>e*1e3/100,oo=({progressTime:e=10,onComplete:n})=>{const i=s.nt(),a=100,[r,o]=
|
|
2752
|
+
`,ro=e=>e*1e3/100,oo=({progressTime:e=10,onComplete:n})=>{const i=s.nt(),a=100,[r,o]=x.useState(0);return x.useEffect(()=>{r===a&&(n==null||n())},[r,n]),x.useEffect(()=>{const l=setInterval(()=>{o(c=>c===a?0:c+1)},ro(e));return()=>{clearInterval(l)}},[r,e]),t.jsx(b,{bgColor:i.palette.gray[200],height:"4px",children:t.jsx(ao,{$animationTime:e,bgGradient:i.palette.gradients["01"],height:"100%",width:`${r}%`})})},so=s.dt.div.attrs({className:"comp-scroll-up"})`
|
|
2753
2753
|
bottom: 15px;
|
|
2754
2754
|
position: fixed;
|
|
2755
2755
|
right: 140px;
|
|
2756
2756
|
z-index: 100;
|
|
2757
|
-
`,lo=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,a]=
|
|
2757
|
+
`,lo=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,a]=x.useState(!1),[r,o]=x.useState(null);x.useEffect(()=>{o(document.getElementById(e)),r==null||r.addEventListener("scroll",()=>{a(r.scrollTop>n)})},[r,e,n]);const l=x.useCallback(()=>{r==null||r.scrollTo({behavior:"smooth",top:0})},[r]);return i?t.jsx(so,{children:t.jsx(B,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},co=s.dt.a`
|
|
2758
2758
|
${({theme:e})=>`
|
|
2759
2759
|
align-items: center;
|
|
2760
2760
|
display: flex;
|
|
@@ -2901,7 +2901,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2901
2901
|
background-color: ${e.palette.gray[100]};
|
|
2902
2902
|
}
|
|
2903
2903
|
`}
|
|
2904
|
-
`,
|
|
2904
|
+
`,Re=s.dt.div.attrs({className:"dropdown"})`
|
|
2905
2905
|
${({theme:e,$empty:n=!1,$showHits:i=!1})=>`
|
|
2906
2906
|
align-items: flex-start;
|
|
2907
2907
|
align-self: stretch;
|
|
@@ -2944,7 +2944,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2944
2944
|
height: ${e.spacing[.5]};
|
|
2945
2945
|
}
|
|
2946
2946
|
`}
|
|
2947
|
-
`,we=({hit:e,icon:n="infinity",showIcon:i=!1})=>{const{slug:a,title:r}=e,o=String(a).startsWith("/pages/")?String(a).replace("/pages/","/"):String(a);return t.jsxs(co,{href:o,rel:"nofollow noopener noreferrer",children:[i&&t.jsx(po,{children:t.jsx(C,{icon:n,iconClass:"fill-gradient-01",iconSize:"sm",iconType:"fa-light"})}),t.jsx(v,{color:S.palette.gray[800],lineSpacing:1.5,size:"md",sizeSm:"sm",whiteSpace:"wrap",children:String(r)})]})},ho=[{hit:{slug:"/services/continuous-hacking/",title:"Continuous Hacking"},icon:"infinity"},{hit:{slug:"/platform/",title:"Platform"},icon:"sidebar"},{hit:{slug:"/plans/",title:"Plans"},icon:"star-christmas"},{hit:{slug:"/blog/",title:"Blog"},icon:"pen-line"}],
|
|
2947
|
+
`,we=({hit:e,icon:n="infinity",showIcon:i=!1})=>{const{slug:a,title:r}=e,o=String(a).startsWith("/pages/")?String(a).replace("/pages/","/"):String(a);return t.jsxs(co,{href:o,rel:"nofollow noopener noreferrer",children:[i&&t.jsx(po,{children:t.jsx(C,{icon:n,iconClass:"fill-gradient-01",iconSize:"sm",iconType:"fa-light"})}),t.jsx(v,{color:S.palette.gray[800],lineSpacing:1.5,size:"md",sizeSm:"sm",whiteSpace:"wrap",children:String(r)})]})},ho=[{hit:{slug:"/services/continuous-hacking/",title:"Continuous Hacking"},icon:"infinity"},{hit:{slug:"/platform/",title:"Platform"},icon:"sidebar"},{hit:{slug:"/plans/",title:"Plans"},icon:"star-christmas"},{hit:{slug:"/blog/",title:"Blog"},icon:"pen-line"}],ut={hit:{slug:"/contact-us/",title:"Contact Support"},icon:"envelope"},bo=({items:e,placeholder:n="Search",refine:i,query:a})=>{const[r,o]=x.useState(a),[l,c]=x.useState(!1),d=x.useRef(null),p=x.useRef(null),g=r.length>=2,u=x.useCallback(w=>{o(w),i(w)},[i]),f=x.useCallback(()=>{u("")},[u]),h=x.useCallback(()=>{c(!0)},[]),y=x.useCallback(w=>{u(w.currentTarget.value)},[u]),$=x.useCallback(w=>{w.preventDefault(),w.stopPropagation(),f(),p.current&&p.current.focus()},[f]),m=x.useCallback(w=>{w.preventDefault(),w.stopPropagation(),p.current&&p.current.blur()},[]);return ee(d.current,()=>{f(),c(!1)},!0),t.jsxs(go,{ref:d,children:[t.jsxs(uo,{action:"",noValidate:!0,onReset:$,onSubmit:m,role:"search",children:[t.jsxs("div",{className:"flex gap-2 w-full",children:[t.jsx("div",{className:"h-10 p-2",children:t.jsx(C,{icon:"magnifying-glass",iconSize:"sm",iconType:"fa-light"})}),t.jsx(xo,{autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",maxLength:512,onChange:y,onFocus:h,placeholder:n,ref:p,spellCheck:!1,type:"search",value:r})]}),g&&t.jsx(fo,{type:"reset",children:t.jsx(C,{icon:"xmark",iconSize:"sm",iconType:"fa-light"})})]}),l&&r.length<2&&t.jsxs(Re,{children:[t.jsx(v,{color:S.palette.gray[400],fontWeight:"bold",lineSpacing:1.5,size:"md",sizeSm:"sm",children:"Suggested"}),t.jsx("div",{className:"flex flex-col items-start self-stretch",children:ho.map(({hit:w,icon:j},I)=>t.jsx(we,{hit:w,icon:j,showIcon:!0},`${j}-${I}`))}),t.jsx(v,{color:S.palette.gray[400],fontWeight:"bold",lineSpacing:1.5,size:"md",sizeSm:"sm",children:"Can’t find what you’re looking for?"}),t.jsx(we,{hit:ut.hit,icon:ut.icon,showIcon:!0})]}),g&&e.length>0&&t.jsxs(Re,{$showHits:g,children:[t.jsx(v,{color:S.palette.gray[400],fontWeight:"bold",lineSpacing:1.5,size:"md",sizeSm:"sm",children:"Results"}),t.jsx("div",{className:"flex flex-col items-start self-stretch",children:e.map(w=>t.jsx(we,{hit:w},w.objectID))})]}),g&&e.length===0&&t.jsx(Re,{$empty:e.length===0,children:t.jsxs("div",{className:"items-center flex flex-col gap-4 py-[90px] w-full",children:[t.jsx(_,{height:96,publicId:"airs/search-bar/empty-state-icon",width:96}),t.jsx(A,{display:"flex",size:"sm",sizeSm:"xs",textAlign:"center",children:"No results found"}),t.jsxs(v,{display:"flex",lineSpacing:1.5,size:"md",sizeSm:"sm",textAlign:"center",children:[`“${r}” did not match.`,t.jsx("br",{}),"Please try again."]}),t.jsx(R,{onClick:f,variant:"secondary",children:"Clear search"})]})})]})},$o={critical:{bgColor:S.palette.primary[700],colorL:S.palette.gray[800],colorR:S.palette.white},disable:{bgColor:S.palette.gray[200],colorL:S.palette.gray[400],colorR:S.palette.gray[400]},high:{bgColor:S.palette.error[500],colorL:S.palette.gray[800],colorR:S.palette.white},low:{bgColor:S.palette.warning[200],colorL:S.palette.gray[800],colorR:S.palette.gray[800]},medium:{bgColor:S.palette.warning[500],colorL:S.palette.gray[800],colorR:S.palette.gray[800]}},yo=({textL:e,textR:n,variant:i})=>{const a=s.nt(),{bgColor:r,colorL:o,colorR:l}=$o[i];return t.jsxs(b,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx(b,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${r}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(v,{color:o,size:"xs",children:e})}):void 0,t.jsx(b,{alignItems:"center",bgColor:r,border:`1px solid ${r}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(v,{color:l,size:"xs",children:n})})]})},mo=(e,n)=>{const i={critical:S.palette.primary[700],high:S.palette.error[500],low:S.palette.warning[200],medium:S.palette.warning[500],none:S.palette.gray[200]},a={disabled:S.palette.gray[400],enabled:S.palette.gray[800]},r={critical:S.palette.white,high:S.palette.white,low:S.palette.gray[800],medium:S.palette.gray[800],none:S.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?r.none:r[e],textColor:n<1?a.disabled:a.enabled}},ie=({variant:e,value:n})=>{const{iconColor:i,iconText:a,iconTextColor:r,textColor:o}=mo(e,n),l=s.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs(b,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(Y,{id:l,place:"top",tip:l,children:t.jsx(b,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(v,{color:r,size:"sm",textAlign:"center",children:a})})}),t.jsx(v,{color:o,size:"sm",children:n})]})},wo=({critical:e,high:n,medium:i,low:a})=>t.jsxs(b,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(ie,{value:e,variant:"critical"}),t.jsx(ie,{value:n,variant:"high"}),t.jsx(ie,{value:i,variant:"medium"}),t.jsx(ie,{value:a,variant:"low"})]}),jo=s.dt.div`
|
|
2948
2948
|
${({theme:e})=>`
|
|
2949
2949
|
border-radius: ${e.spacing[.25]};
|
|
2950
2950
|
cursor: pointer;
|
|
@@ -2962,7 +2962,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2962
2962
|
display: block;
|
|
2963
2963
|
}
|
|
2964
2964
|
`}
|
|
2965
|
-
`,ko=({visibleElement:e,hiddenElement:n})=>t.jsxs(jo,{children:[e,t.jsx(
|
|
2965
|
+
`,ko=({visibleElement:e,hiddenElement:n})=>t.jsxs(jo,{children:[e,t.jsx(b,{display:"none",position:"absolute",top:"100%",zIndex:10,children:n})]}),dn=({customBadge:e=void 0,description:n,icon:i,onClick:a,requiresUpgrade:r=!1,title:o})=>{const l=s.nt();return t.jsxs(b,{bgColor:l.palette.white,bgColorHover:l.palette.gray[100],cursor:"pointer",display:"flex",gap:.5,onClick:a,px:1.25,py:1,width:"100%",children:[t.jsx(b,{alignItems:"center",bgColor:l.palette.gray[300],borderRadius:l.spacing[.25],display:"flex",height:"24px",justify:"center",width:"24px",children:t.jsx(C,{icon:i,iconColor:l.palette.gray[800],iconSize:"xxs",ml:.5,mr:.5})}),t.jsxs(b,{children:[t.jsxs(b,{alignItems:"center",display:"inline-flex",gap:.5,children:[t.jsx(v,{color:l.palette.gray[800],size:"sm",children:o}),r?t.jsx(cn,{text:"Upgrade"}):void 0,e]}),t.jsx(v,{color:l.palette.gray[400],size:"xs",children:n})]})]})},vo=s.dt(s.m.div)`
|
|
2966
2966
|
${({theme:e})=>`
|
|
2967
2967
|
background-color: ${e.palette.white};
|
|
2968
2968
|
box-shadow: ${e.shadows.lg};
|
|
@@ -2985,7 +2985,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
2985
2985
|
height: auto;
|
|
2986
2986
|
}
|
|
2987
2987
|
`}
|
|
2988
|
-
`,Co=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const
|
|
2988
|
+
`,Co=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),u=x.useRef(null),f=x.useCallback(h=>()=>{h(),r()},[r]);return x.useEffect(()=>{const h=["mousedown","touchstart"],y=$=>{var z;const m=$.target,w=document.getElementById("helpBtn"),j=document.getElementById("filterBtn"),I=(m===w||((w==null?void 0:w.contains(m))??!1)||m===j||(j==null?void 0:j.contains(m)))??!1;i&&!I&&!(((z=u.current)==null?void 0:z.contains(m))??!1)&&r()};return h.forEach($=>{document.addEventListener($,y,{passive:!0})}),()=>{h.forEach($=>{document.removeEventListener($,y)})}},[i,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(vo,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:u,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs(b,{height:"100%",position:"relative",children:[t.jsxs(b,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(v,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(B,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs(b,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs(b,{py:1.25,children:[(a??[]).map(({customBadge:h,description:y,icon:$,onClick:m,requiresUpgrade:w,title:j})=>t.jsx(dn,{customBadge:h,description:y,icon:$,onClick:f(m),requiresUpgrade:w,title:j},j)),e&&t.jsx(b,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs(b,{alignItems:"center",bgColor:g.palette.white,borderColor:g.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(R,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(R,{onClick:l,type:"submit",children:o})]})]})]})})})},So=(e,n)=>n>=50?`
|
|
2989
2989
|
${e.palette.gray[200]} 50%,
|
|
2990
2990
|
${e.palette.primary[500]} 50.05%,
|
|
2991
2991
|
${e.palette.primary[500]} ${n}%,
|
|
@@ -3061,7 +3061,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
3061
3061
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
3062
3062
|
width: 59px;
|
|
3063
3063
|
`}
|
|
3064
|
-
`,pn=({state:e,trackRef:n,index:i,name:a})=>{const r=
|
|
3064
|
+
`,pn=({state:e,trackRef:n,index:i,name:a})=>{const r=x.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:n,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},Fo=(e,n,i)=>Math.round((i-e)/(n-e)*100),No=e=>{const n=s.nt(),i=x.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(y){c==null||c(l,y)},value:d==null?void 0:d(l)}),u=Fo(r,o,g.getThumbValue(0)),{groupProps:f,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,i);return t.jsx(H,{htmlFor:l,label:a,children:t.jsxs(b,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(zo,{...f,$min:r??0,$value:u,className:"slider",children:[t.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:i,children:t.jsx(pn,{index:0,name:l,state:g,trackRef:i})}),t.jsxs(Io,{children:[t.jsx("p",{children:`${p.format(r)} (Low)`}),r<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${p.format(o)} (High)`})]})]}),t.jsx(To,{children:t.jsx(v,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:Eo}=U(e=>({completed:`
|
|
3065
3065
|
background-color: ${e.palette.primary[500]};
|
|
3066
3066
|
color: ${e.palette.white};
|
|
3067
3067
|
|
|
@@ -3139,7 +3139,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
3139
3139
|
|
|
3140
3140
|
${Eo(e,n)}
|
|
3141
3141
|
`}
|
|
3142
|
-
`,Wo=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=
|
|
3142
|
+
`,Wo=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=x.useState(1),c=x.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(Ro,{children:r.map((d,p)=>{const{content:g,title:u,nextAction:f,previousAction:h}=d,y=p+1,$=y===o?"current":"disabled",m=y<o?"completed":$;return t.jsxs(Do,{children:[t.jsx(b,{maxWidth:"40px",position:"relative",children:t.jsx(Lo,{$variant:m,children:m==="completed"?t.jsx(C,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):y})}),t.jsxs(b,{ml:1.5,width:"100%",children:[t.jsx(A,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:u}),m==="current"&&t.jsxs(b,{children:[g,t.jsxs(Po,{children:[o>1&&t.jsx(R,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<r.length?t.jsx(R,{disabled:d.isDisabledNext??!1,onClick:c(1,f),variant:"primary",children:"Next step"}):t.jsx(R,{disabled:e,onClick:a,type:i,variant:"primary",children:n})]})]})]})]},d.title)})})},Ao=s.dt.button`
|
|
3143
3143
|
${({theme:e})=>`
|
|
3144
3144
|
align-items: center;
|
|
3145
3145
|
background-color: ${e.palette.white};
|
|
@@ -3181,7 +3181,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
3181
3181
|
background-color: ${e.palette.gray[100]};
|
|
3182
3182
|
}
|
|
3183
3183
|
`}
|
|
3184
|
-
`,
|
|
3184
|
+
`,Bo={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},Mo=({disabled:e=!1,icon:n,id:i,label:a,name:r,onClick:o,type:l="button",variant:c})=>{const d=s.nt(),p=t.jsxs(Ao,{"aria-label":r??void 0,className:c,disabled:e,id:i,onClick:o,type:l,children:[t.jsx(C,{clickable:!1,icon:n??Bo[c].icon,iconSize:r===void 0?"xxs":"xs",iconType:"fa-light"}),r??void 0]});return t.jsxs(b,{alignItems:"center",display:"flex",children:[p,a&&t.jsx(v,{color:d.palette.gray[800],ml:.5,size:"sm",children:a})]})},Ho=({items:e})=>t.jsx($a,{children:e.map(({isActive:n,label:i,onClick:a},r)=>t.jsx(ba,{className:n?"active":"",onClick:a,type:"button",children:t.jsx(A,{color:"inherit",fontWeight:"semibold",size:"sm",sizeSm:"xs",children:i})},`${i}-${r}`))}),Oo=s.dt.div`
|
|
3185
3185
|
${({theme:e})=>`
|
|
3186
3186
|
align-items: center;
|
|
3187
3187
|
background-color: ${e.palette.white};
|
|
@@ -3203,7 +3203,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
3203
3203
|
border: 1px solid ${e.palette.gray[600]};
|
|
3204
3204
|
}
|
|
3205
3205
|
`}
|
|
3206
|
-
`,
|
|
3206
|
+
`,Vo=s.dt.div`
|
|
3207
3207
|
${({theme:e})=>`
|
|
3208
3208
|
display: flex;
|
|
3209
3209
|
flex-direction: column;
|
|
@@ -3274,7 +3274,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
3274
3274
|
}
|
|
3275
3275
|
}
|
|
3276
3276
|
`}
|
|
3277
|
-
`,gn=({date:e,description:n,title:i})=>{const a=s.nt();return t.jsxs(
|
|
3277
|
+
`,gn=({date:e,description:n,title:i})=>{const a=s.nt();return t.jsxs(Oo,{className:"timeline-card",children:[t.jsx(v,{color:a.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:e}),t.jsx(v,{color:a.palette.gray[800],fontWeight:"bold",lineSpacing:1.5,mb:.5,size:"md",textAlign:"center",children:i}),t.jsx("div",{children:n.map((r,o)=>{const l=`${r}#${o}`;return t.jsx(v,{size:"sm",textAlign:"center",wordBreak:"break-word",children:r},l)})})]})},_o=({items:e})=>t.jsx(Vo,{children:e.map((n,i)=>t.jsx(gn,{date:n.date,description:n.description,title:n.title},`${n.title}-${i}`))}),Go=s.dt.div`
|
|
3278
3278
|
${({theme:e})=>`
|
|
3279
3279
|
align-items: center;
|
|
3280
3280
|
display: flex;
|
|
@@ -3333,7 +3333,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
3333
3333
|
color: ${e.palette.white};
|
|
3334
3334
|
}
|
|
3335
3335
|
`}
|
|
3336
|
-
`,Yo=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=
|
|
3336
|
+
`,Yo=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=x.useState(e??n[0]),o=x.useCallback(l=>()=>{r(l),i(l)},[i]);return t.jsx(Go,{children:n.map((l,c)=>t.jsx(Uo,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(v,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},Ko={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:""},qo=({run:e,steps:n,onFinish:i})=>{const[a,r]=x.useState(e),[o,l]=x.useState(0),c=x.useCallback(d=>{const{action:p,index:g,status:u,type:f}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(f)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(r(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})},Xo=s.dt.form`
|
|
3337
3337
|
${({theme:e})=>`
|
|
3338
3338
|
align-items: center;
|
|
3339
3339
|
background: ${e.palette.gray[50]};
|
|
@@ -3396,4 +3396,4 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=g.useMemo(u,[u]),f=g.useCallback(a
|
|
|
3396
3396
|
flex-direction: column;
|
|
3397
3397
|
}
|
|
3398
3398
|
`}
|
|
3399
|
-
`,Qo=({children:e,name:n,onSubmit:i,submitDisabled:a,submitLabel:r="Submit"})=>t.jsx(Xo,{"aria-label":n,name:n,onSubmit:i,children:t.jsxs(Zo,{children:[e,t.jsx(R,{disabled:a,type:"submit",children:r})]})});exports.Accordion=_n;exports.AccordionContent=
|
|
3399
|
+
`,Qo=({children:e,name:n,onSubmit:i,submitDisabled:a,submitLabel:r="Submit"})=>t.jsx(Xo,{"aria-label":n,name:n,onSubmit:i,children:t.jsxs(Zo,{children:[e,t.jsx(R,{disabled:a,type:"submit",children:r})]})});exports.Accordion=_n;exports.AccordionContent=ht;exports.ActionButton=Ae;exports.Alert=Qn;exports.AppliedFilter=Wr;exports.Avatar=si;exports.BaseButtonComponent=_e;exports.BaseComponent=Q;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=Ge;exports.Button=R;exports.Button$1=je;exports.ButtonToolbarCenter=cr;exports.ButtonToolbarRow=pr;exports.ButtonToolbarStartRow=dr;exports.Calendar=kt;exports.Calendar$1=It;exports.Calendar$2=Ft;exports.CalendarCell=jt;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=di;exports.CardWithInput=Ui;exports.CardWithOptions=Rt;exports.CardWithSelector=Qi;exports.CardWithSwitch=na;exports.Carousel=la;exports.CategoryTag=He;exports.Checkbox=Fe;exports.CodeSnippet=da;exports.Col=ur;exports.ColumnsModal=Ta;exports.ComboBox=fi;exports.ComboBoxField=Pe;exports.Container=b;exports.ContentCard=nn;exports.ContentCardCarousel=Ma;exports.CustomThemeProvider=Ln;exports.DateField=Ct;exports.DateSelector=re;exports.Description=ln;exports.Dialog=Te;exports.Divider=J;exports.Editable=Ei;exports.EmptyButton=Oe;exports.EmptyState=_a;exports.EventDate=tn;exports.FilePreview=yt;exports.FilterControl=Xt;exports.FilterForm=Be;exports.FilterFormContent=Zt;exports.Filters=Pa;exports.FiltersList=Ce;exports.FixedTabs=Ho;exports.Form=Ya;exports.FormItem=Jo;exports.Gap=fr;exports.GridContainer=qa;exports.GroupSelector=Za;exports.Header=Ie;exports.Header$1=Ht;exports.Heading=A;exports.Icon=C;exports.IconButton=B;exports.IndicatorCard=Ja;exports.InfoSidebar=Qa;exports.InnerForm=Ga;exports.Input=qe;exports.InputDate=zt;exports.InputDateRange=Tt;exports.InputDateTime=Ni;exports.InputFile=Li;exports.InputNumber=Nt;exports.InputNumberRange=Et;exports.InputTags=Ai;exports.InteractiveCard=nr;exports.InteractiveIcon=rn;exports.ItemList=on;exports.ItemSearching=we;exports.Label=Ye;exports.LanguageSelector=lr;exports.Link=X;exports.ListItem=$e;exports.ListItemsWrapper=Gt;exports.LittleFlag=yr;exports.Loading=zr;exports.LocationCode=Bt;exports.Logo=Rr;exports.LogoCarousel=Nr;exports.MemoizedImage=_;exports.Menu=Dr;exports.MenuItem=dn;exports.MessageBanner=Lr;exports.Modal=en;exports.ModalConfirm=Ot;exports.ModalFooter=Mt;exports.Notification=Hr;exports.NotificationSign=Vt;exports.NumberField=ve;exports.NumberInput=_r;exports.OAuthSelector=Ur;exports.Option=mt;exports.OptionBoxContainer=Je;exports.OptionContainer=Ve;exports.OptionContainer$1=an;exports.OutlineContainer=H;exports.PhoneInput=_i;exports.PlanCard=qr;exports.PopUp=Xr;exports.Popover=fe;exports.PremiumFeature=cn;exports.PreviewPanel=Ut;exports.PriorityScore=Jr;exports.Progress=oo;exports.ProgressBar=io;exports.RadioButton=Xe;exports.RecommendedTag=sn;exports.Row=br;exports.ScrollButtons=Me;exports.ScrollUpButton=lo;exports.Search=oe;exports.SearchBar=bo;exports.SearchPanel=Kt;exports.SeverityBadge=yo;exports.SeverityOverview=wo;exports.SeverityOverviewBadge=ie;exports.ShowOnHover=ko;exports.SingleColumFilters=Qt;exports.SlideOutMenu=Co;exports.Slider=No;exports.Span=ae;exports.StepLapse=Wo;exports.Tab=_t;exports.TableButton=Mo;exports.Tabs=Ze;exports.Tag=K;exports.TagsField=We;exports.Text=v;exports.TextArea=Gi;exports.Thumb=pn;exports.TimeField=St;exports.TimeLine=_o;exports.TimeLineCard=gn;exports.Toggle=Wt;exports.ToggleButton=Yo;exports.Tooltip=Y;exports.Tour=qo;exports.TwoColumnsFilters=Ra;exports.WebForm=Qo;exports.baseStep=Ko;exports.getStyledConfig=xe;exports.hiddenProps=xt;exports.icons=Dn;exports.setBorder=de;exports.setDisplay=pe;exports.setInteraction=ue;exports.setMargin=le;exports.setPadding=se;exports.setPosition=ce;exports.setText=ge;exports.theme=S;exports.uniqueIcons=Pn;exports.useCarousel=Dt;exports.useClickOutside=ee;exports.useCloudinaryImage=Pt;exports.useColumnsModal=Ki;exports.useConfirmDialog=La;exports.useDebouncedCallback=Lt;exports.useFilterForm=Jt;exports.useModal=Ne;exports.useSearch=qi;exports.variantBuilder=U;
|