@fluidattacks/design 3.16.15 → 3.16.16
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/button/types.d.ts +9 -9
- package/dist/components/card/card-header/index.js +1 -1
- package/dist/components/card/card-with-image/index.js +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-options/index.js +1 -1
- package/dist/components/card/card-with-selector/index.js +1 -1
- package/dist/components/card/card-with-switch/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dropdown/index.d.ts +4 -0
- package/dist/components/dropdown/index.js +1 -0
- package/dist/components/dropdown/index.stories.d.ts +7 -0
- package/dist/components/dropdown/styles.d.ts +3 -0
- package/dist/components/dropdown/types.d.ts +18 -0
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-array/field/index.js +1 -1
- package/dist/components/inputs/fields/input-array/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/layout/categories/buttons/index.js +1 -1
- package/dist/components/layout/categories/column/index.js +1 -1
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/lottie/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/modal/columns-modal/index.js +1 -1
- package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
- package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
- package/dist/components/modal/filters-modal/index.js +1 -1
- package/dist/components/modal/footer/index.js +1 -1
- package/dist/components/modal/header/index.js +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/modal/modal-confirm/index.js +1 -1
- package/dist/components/notification/index.js +1 -1
- package/dist/components/notification-sign/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/oauth-selector/index.js +1 -1
- package/dist/components/oauth-selector/option-container/index.js +1 -1
- package/dist/components/plan-card/index.js +1 -1
- package/dist/components/plan-card/recommended-tag/index.js +1 -1
- package/dist/components/pop-up/description/index.js +1 -1
- package/dist/components/pop-up/index.js +1 -1
- package/dist/components/premium-feature/index.js +1 -1
- package/dist/components/priority-score/index.js +1 -1
- package/dist/components/progress-bar/index.js +1 -1
- package/dist/components/radio-button/index.js +1 -1
- package/dist/components/scroll-button/index.js +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/severity-badge/index.js +1 -1
- package/dist/components/severity-overview/badge/index.js +1 -1
- package/dist/components/severity-overview/index.js +1 -1
- package/dist/components/show-on-hover/index.js +1 -1
- package/dist/components/slide-out-menu/index.js +1 -1
- package/dist/components/slide-out-menu/menu-item/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/thumb/index.js +1 -1
- package/dist/components/step-lapse/index.js +1 -1
- package/dist/components/table-button/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/styles.d.ts +1 -3
- 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-BdSGcWGf.js → components-B4hNk_ms.js} +149 -140
- package/dist/{components-BmvBhnsU.mjs → components-FDgS5wwK.mjs} +2116 -2048
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/components/tabs/fixed-tabs/index.d.ts +0 -3
- package/dist/components/tabs/fixed-tabs/index.js +0 -1
- package/dist/components/tabs/fixed-tabs/index.stories.d.ts +0 -6
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`},Mn=e=>e.includes("x")?"overflow-x: auto;":"",On=e=>e.includes("y")?"overflow-y: auto;":"",$e=e=>{const n=e.scroll?`
|
|
17
17
|
${Mn(e.scroll)}
|
|
18
18
|
${On(e.scroll)}
|
|
19
|
-
`:"",i=N("visibility",e.visibility),a=N("display",e.display),r=N("height",e.height),o=N("width",e.width),l=N("max-height",e.maxHeight),c=N("max-width",e.maxWidth),d=N("min-height",e.minHeight),p=N("min-width",e.minWidth),g=N("box-shadow",e.shadow?I.shadows[e.shadow]:void 0),
|
|
19
|
+
`:"",i=N("visibility",e.visibility),a=N("display",e.display),r=N("height",e.height),o=N("width",e.width),l=N("max-height",e.maxHeight),c=N("max-width",e.maxWidth),d=N("min-height",e.minHeight),p=N("min-width",e.minWidth),g=N("box-shadow",e.shadow?I.shadows[e.shadow]:void 0),x=N("gap",e.gap===void 0?void 0:I.spacing[e.gap]),u=N("background-color",e.bgColor),h=N("background",e.bgGradient),b=N("flex-direction",e.flexDirection),y=N("flex-grow",e.flexGrow),w=N("justify-content",e.justify),m=N("justify-self",e.justifySelf),v=N("align-items",e.alignItems),k=N("align-self",e.alignSelf),j=N("flex-wrap",e.wrap);return`
|
|
20
20
|
${n}
|
|
21
21
|
${i}
|
|
22
22
|
${a}
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
${d}
|
|
28
28
|
${p}
|
|
29
29
|
${g}
|
|
30
|
-
${x}
|
|
31
|
-
${h}
|
|
32
30
|
${u}
|
|
31
|
+
${h}
|
|
32
|
+
${x}
|
|
33
33
|
${b}
|
|
34
34
|
${y}
|
|
35
35
|
${w}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
${v}
|
|
38
38
|
${k}
|
|
39
39
|
${j}
|
|
40
|
-
`},ye=e=>{const n=N("color",e.color),i=N("font-family",e.fontFamily),a=N("font-size",e.fontSize),r=N("font-weight",e.fontWeight),o=N("line-spacing",e.letterSpacing),l=N("line-height",e.lineSpacing),c=N("text-align",e.textAlign),d=N("text-decoration",e.textDecoration),p=N("text-overflow",e.textOverflow),g=N("white-space",e.whiteSpace),
|
|
40
|
+
`},ye=e=>{const n=N("color",e.color),i=N("font-family",e.fontFamily),a=N("font-size",e.fontSize),r=N("font-weight",e.fontWeight),o=N("line-spacing",e.letterSpacing),l=N("line-height",e.lineSpacing),c=N("text-align",e.textAlign),d=N("text-decoration",e.textDecoration),p=N("text-overflow",e.textOverflow),g=N("white-space",e.whiteSpace),x=N("word-break",e.wordBreak),u=N("word-wrap",e.wordWrap);return`
|
|
41
41
|
${n}
|
|
42
42
|
${i}
|
|
43
43
|
${a}
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
${d}
|
|
49
49
|
${p}
|
|
50
50
|
${g}
|
|
51
|
-
${u}
|
|
52
51
|
${x}
|
|
52
|
+
${u}
|
|
53
53
|
`},me=e=>{const n=N("cursor",e.cursor),i=N("border-color",e.borderColorHover),a=N("background-color",e.bgColorHover),r=N("box-shadow",e.shadowHover===void 0?void 0:I.shadows[e.shadowHover]),o=N("transition",e.transition);return`
|
|
54
54
|
${n}
|
|
55
55
|
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
111
|
`,$=f.forwardRef(function({as:n="div",center:i,children:a,id:r,onHover:o,onLeave:l,styleMd:c,styleSm:d,...p},g){return t.jsx(Hn,{$center:i,$styleMd:c,$styleSm:d,as:n,id:r,onMouseLeave:l,onMouseOver:o,ref:g,...p,children:a})}),_n=s.dt(Ye)`
|
|
112
|
-
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$overflow:p,$size:g,$sizeMd:
|
|
112
|
+
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[800],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="bold",$letterSpacing:l=0,$lineSpacing:c=1.5,$lineSpacingSm:d,$overflow:p,$size:g,$sizeMd:x,$sizeSm:u,$textFill:h="unset",$whiteSpace:b="pre-line",$wordBreak:y="normal"})=>`
|
|
113
113
|
background: ${n};
|
|
114
114
|
color: ${i};
|
|
115
115
|
display: ${a};
|
|
@@ -130,21 +130,21 @@
|
|
|
130
130
|
and (min-width: ${e.breakpoints.mobile})
|
|
131
131
|
and (max-width: ${e.breakpoints.tablet})
|
|
132
132
|
{
|
|
133
|
-
font-size: ${e.typography.heading[
|
|
133
|
+
font-size: ${e.typography.heading[x??g]};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
137
|
-
font-size: ${e.typography.heading[
|
|
137
|
+
font-size: ${e.typography.heading[u??g]};
|
|
138
138
|
line-height: ${e.spacing[d??c]};
|
|
139
139
|
}
|
|
140
140
|
`}
|
|
141
141
|
`,bt=s.dt(Ye)`
|
|
142
|
-
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$fontStyle:l="normal",$letterSpacing:c=0,$lineSpacing:d=1.25,$lineSpacingSm:p,$overflow:g,$size:
|
|
142
|
+
${({theme:e,$bgGradient:n="unset",$color:i=e.palette.gray[600],$display:a="block",$fontFamily:r=e.typography.type.primary,$fontWeight:o="regular",$fontStyle:l="normal",$letterSpacing:c=0,$lineSpacing:d=1.25,$lineSpacingSm:p,$overflow:g,$size:x,$sizeMd:u,$sizeSm:h,$textFill:b="unset",$whiteSpace:y="pre-line",$wordBreak:w="normal"})=>`
|
|
143
143
|
background: ${n};
|
|
144
144
|
color: ${i};
|
|
145
145
|
display: ${a};
|
|
146
146
|
font-family: ${r};
|
|
147
|
-
font-size: ${e.typography.text[
|
|
147
|
+
font-size: ${e.typography.text[x]};
|
|
148
148
|
font-style: ${l};
|
|
149
149
|
font-weight: ${e.typography.weight[o]};
|
|
150
150
|
letter-spacing: ${c};
|
|
@@ -161,11 +161,11 @@
|
|
|
161
161
|
and (min-width: ${e.breakpoints.mobile})
|
|
162
162
|
and (max-width: ${e.breakpoints.tablet})
|
|
163
163
|
{
|
|
164
|
-
font-size: ${e.typography.text[x
|
|
164
|
+
font-size: ${e.typography.text[u??x]};
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
@media screen and (max-width: ${e.breakpoints.mobile}) {
|
|
168
|
-
font-size: ${e.typography.text[h??
|
|
168
|
+
font-size: ${e.typography.text[h??x]};
|
|
169
169
|
line-height: ${e.spacing[p??d]};
|
|
170
170
|
}
|
|
171
171
|
`}
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
|
|
183
183
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
184
184
|
`}
|
|
185
|
-
`,U=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:
|
|
185
|
+
`,U=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:x,size:u,sizeMd:h,sizeSm:b,textFill:y,whiteSpace:w,wordBreak:m,...v},k){return t.jsx(_n,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:x,$size:u,$sizeMd:h,$sizeSm:b,$textFill:y,$whiteSpace:w,$wordBreak:m,className:a,ref:k,...v,children:i})}),pe=f.forwardRef(function({children:n,color:i,content:a,display:r,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:x,sizeSm:u,...h},b){return t.jsx(Vn,{$color:i,$content:a,$display:r,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:x,$sizeSm:u,ref:b,...h,children:n})}),z=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:x,size:u,sizeMd:h,sizeSm:b,textFill:y,whiteSpace:w,wordBreak:m,fontStyle:v,...k},j){return t.jsx(bt,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontStyle:v,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:x,$size:u,$sizeMd:h,$sizeSm:b,$textFill:y,$whiteSpace:w,$wordBreak:m,className:a,ref:j,...k,children:i})}),$t=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(z,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[n,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},Un={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Gn=s.dt(qe)`
|
|
186
186
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:a,$rotation:r,$size:o,$secondaryColor:l})=>{const c=a?"":"brightness(50%)",d=a??"";return`
|
|
187
187
|
color: ${n};
|
|
188
188
|
cursor: ${e?"pointer":"inherit"};
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
&:hover:not([disabled]) {
|
|
219
219
|
transform: scale(1.2);
|
|
220
220
|
}
|
|
221
|
-
`;const T=f.forwardRef(function({clickable:n,disabled:i,hoverColor:a,icon:r,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:
|
|
221
|
+
`;const T=f.forwardRef(function({clickable:n,disabled:i,hoverColor:a,icon:r,iconClass:o="",iconColor:l,iconMask:c,iconSize:d,iconTransform:p,iconType:g="fa-solid",onClick:x,rotation:u,spanClass:h,secondaryColor:b,...y},w){return t.jsx(Gn,{$clickable:n,$color:l,$disabled:i,$hoverColor:a,$rotation:u,$secondaryColor:b,$size:d,className:h,"data-testid":`${r}-icon`,onClick:x,ref:w,...y,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}`)}),Yn=f.forwardRef(function({aligned:n="end",items:i,bgColor:a},r){const o=s.nt(),[l,c]=f.useState(i.map(p=>p.expanded??!1)),d=f.useCallback(p=>()=>{c(l.map((g,x)=>p===x?!g:g))},[l]);return t.jsx($,{borderColor:o.palette.gray[200],borderTop:"1px solid",ref:r,children:i.map((p,g)=>{const x=l[g];return t.jsxs($,{bgColor:a??o.palette.white,borderBottom:"1px solid",borderColor:o.palette.gray[200],children:[t.jsx($,{"aria-controls":`panel-${p.title}`,"aria-expanded":x,"aria-label":p.title,as:"button",bgColor:a??o.palette.white,bgColorHover:o.palette.gray[100],cursor:"pointer",display:"flex",onClick:d(g),padding:[.75,.75,.75,.75],width:"100%",children:t.jsxs($,{as:"summary",display:"flex",flexDirection:n==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:p.title}),t.jsx(T,{icon:x?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),x&&t.jsx($t,{item:p})]},p.title)})})}),qn=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:Kn}=K(e=>({error:`
|
|
222
222
|
background: ${e.palette.error[50]};
|
|
223
223
|
border: 1px solid ${e.palette.error[500]};
|
|
224
224
|
color: ${e.palette.error[700]};
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
width: max-content;
|
|
419
419
|
z-index: 999999;
|
|
420
420
|
`}
|
|
421
|
-
`,G=({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:
|
|
421
|
+
`,G=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:x="",title:u="",hide:h=x===""&&u===""&&p===void 0,width:b})=>{const y=s.nt(),[w,m]=f.useState(!1),{refs:v,floatingStyles:k,context:j}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:m,open:w,placement:g,whileElementsMounted:s.autoUpdate}),F=s.useHover(j,{delay:{close:0,open:500},move:!1}),D=s.useFocus(j),C=s.useRole(j,{role:r?"label":"tooltip"}),{getReferenceProps:S,getFloatingProps:L}=s.useInteractions([F,D,C]);return n?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(ei,{...S(),display:i,height:a,id:c,ref:v.setReference,width:b,children:r?t.jsx(T,{clickable:!0,disabled:n,icon:r,iconColor:o,iconSize:l??"xxs",iconType:w?"fa-solid":"fa-light"}):e}),w&&!h&&re.createPortal(t.jsxs(ti,{...L(),$maxWidth:d,id:`floating-${c}`,ref:v.setFloating,style:k,children:[s.lodashExports.isEmpty(u)?void 0:t.jsx(z,{color:y.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(x)?void 0:t.jsx(z,{color:y.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},M=f.forwardRef(function({borderRadius:n,disabled:i,icon:a,iconColor:r,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:x,py:u,type:h="button",tooltip:b,tooltipPlace:y,value:w,variant:m="primary",...v},k){const j=t.jsx(Qn,{$borderRadius:n,$px:x,$py:u,$variant:m,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:p,onClick:g,ref:k,type:h,value:w,...v,children:t.jsx(T,{clickable:!1,icon:a,iconColor:r,iconSize:o,iconTransform:l,iconType:c})}),D=(h+(m??"")+(d??a)).replace(/ /u,"_");return b===void 0?j:t.jsx(G,{id:`${D}-tooltip`,place:y,tip:b,children:j})}),ni=f.forwardRef(function({autoHide:n=!1,children:i,closable:a=!1,onTimeOut:r,show:o=!0,time:l=8,variant:c="error",id:d,...p},g){const[x,u]=f.useState(o),h=f.useCallback(()=>{u(!1)},[]);return f.useEffect(()=>{const b=setTimeout(()=>{r==null||r(!0),n&&h()},l*1e3);return()=>{clearTimeout(b)}},[n,h,l,r]),f.useEffect(()=>{u(o)},[o,u]),t.jsx($,{display:x?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(Xn,{$variant:c,id:d,children:[t.jsx(T,{clickable:!1,icon:qn(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(Jn,{children:i}),a?t.jsx(M,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),ot=s.dt.div`
|
|
422
422
|
${({theme:e})=>`
|
|
423
423
|
align-items: center;
|
|
424
424
|
background-color: ${e.palette.gray[200]};
|
|
@@ -498,7 +498,7 @@
|
|
|
498
498
|
#menu-profile-container li div {
|
|
499
499
|
min-width: unset;
|
|
500
500
|
}
|
|
501
|
-
`,{getVariant:
|
|
501
|
+
`,{getVariant:ai}=K(e=>({default:`
|
|
502
502
|
background-color: ${e.palette.gray[200]};
|
|
503
503
|
color: ${e.palette.gray[800]};
|
|
504
504
|
`,error:`
|
|
@@ -573,7 +573,7 @@
|
|
|
573
573
|
background-color: ${e.palette.warning[400]};
|
|
574
574
|
color: ${e.palette.warning[700]};
|
|
575
575
|
}
|
|
576
|
-
`})),
|
|
576
|
+
`})),ri=s.dt.span`
|
|
577
577
|
${({theme:e,$fontSize:n=e.typography.text.xs,$variant:i})=>`
|
|
578
578
|
align-items: center;
|
|
579
579
|
border-radius: ${e.spacing[i==="technique"?1:.25]};
|
|
@@ -594,7 +594,7 @@
|
|
|
594
594
|
display: flex;
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
-
${
|
|
597
|
+
${ai(e,i)}
|
|
598
598
|
`}
|
|
599
599
|
`,{getVariant:oi}=K(e=>({highRelevance:`
|
|
600
600
|
color: ${e.palette.primary[500]};
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
${mt}
|
|
637
637
|
`,li=s.dt(Pe.Link)`
|
|
638
638
|
${mt}
|
|
639
|
-
`,Z=({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(T,{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(si,{$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(li,{$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]})},Y=({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:
|
|
639
|
+
`,Z=({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(T,{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(si,{$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(li,{$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]})},Y=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:x="",tagLabel:u,variant:h="default"})=>{const b=u.length>25&&s.lodashExports.isEmpty(x+o),y=`${u.slice(0,25)}...`;return t.jsxs(pe,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(ri,{$fontSize:l,$variant:h,className:g,children:[n&&t.jsx(T,{icon:n,iconColor:i,iconSize:"xxs",iconType:a}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:x}),t.jsx("span",{children:b?y:u}),t.jsx("strong",{className:"w-full",children:o})]}),p?t.jsx(M,{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(Z,{href:c,children:d})]})},ci=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},A=f.forwardRef(function({children:n,disabled:i=!1,external:a=!1,fontSize:r,href:o,id:l,icon:c,iconColor:d,iconType:p,name:g,onClick:x,rightIcon:u,tag:h,type:b="button",tooltip:y,tooltipPlace:w="bottom",underline:m=!1,value:v,variant:k="primary",width:j,...F},D){const C=y!==void 0,S=`${l}-tooltip`,L=f.useCallback(()=>{o&&ci(o,a)},[a,o]),E=t.jsxs(yt,{$size:r,$variant:k,"aria-disabled":i,className:m?"underline":void 0,disabled:i,id:l,name:g,onClick:k==="link"?L:x,ref:D,type:b,value:v,width:j,...C?{"data-tooltip-id":S}:{},...F,children:[c!==void 0&&t.jsx(T,{icon:c,iconColor:d??void 0,iconSize:"xs",iconType:p??"fa-light"}),n,u||k==="link"?t.jsx(T,{icon:u??"arrow-right",iconSize:"xs",iconType:"fa-light"}):void 0,h===void 0?null:t.jsx(Y,{tagLabel:h,variant:"default"})]});return C?t.jsx(G,{disabled:!C,id:S,place:w,tip:y,width:j,children:E}):E}),di=f.forwardRef(function({children:n,onClick:i,userName:a,showIcon:r=!1,showUsername:o=!1},l){const c=!!i;return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(A,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(ot,{children:a[0].toUpperCase()}),o?t.jsx(z,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:a.split(" ")[0]}):void 0,r?t.jsx(T,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(ot,{children:a[0].toUpperCase()}),o?t.jsxs(z,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",a.split(" ")[0],"!"]}):void 0,r?t.jsx(T,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(ii,{children:n})]})})}),Te=({authorEmail:e,date:n,description:i,descriptionColor:a,id:r,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs($,{width:"100%",children:[typeof o=="string"?t.jsx(z,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:c,wordBreak:"break-word",children:o}):o,t.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(z,{color:a??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:i}),n&&t.jsx(z,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(z,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(G,{icon:"circle-info",id:r,tip:p})]})]})},st=s.dt($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
640
640
|
& img {
|
|
641
641
|
display: block;
|
|
642
642
|
}
|
|
@@ -651,7 +651,7 @@
|
|
|
651
651
|
pointer-events: none;
|
|
652
652
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
653
653
|
}
|
|
654
|
-
`,pi=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},gi=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,pi(n)),wt=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const
|
|
654
|
+
`,pi=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},gi=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,pi(n)),wt=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const x=g.target,u=x.currentTime/x.duration*100;u>5&&u<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):u>=50&&u<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):u>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return n==="video"||gi(["webm"],r)?t.jsx(st,{$opacity:a,children:t.jsx(Z,{href:r,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:o,width:i},children:[t.jsx("source",{src:r,type:"video/webm"}),r]})})}):t.jsx(st,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:i}})})},ui=({alt:e,authorEmail:n,date:i,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:x=!0,videoViewStatus:u})=>{const h=s.nt(),[b,y]=f.useState(!1),w=f.useCallback(()=>{y(!0)},[]),m=f.useCallback(()=>{y(!1)},[]);return t.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:w,onLeave:m,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(f.Fragment,{children:[t.jsx(wt,{alt:e,fileType:g,height:"147px",opacity:b?.3:0,src:r,videoViewStatus:u,width:"100%"}),x?t.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(M,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),p?null:t.jsx(Te,{authorEmail:n,date:i,description:a,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},xi=s.dt.div`
|
|
655
655
|
${({theme:e,$align:n="center",$minWidth:i="auto",$minHeight:a="auto"})=>`
|
|
656
656
|
display: flex;
|
|
657
657
|
background-color: ${e.palette.white};
|
|
@@ -813,7 +813,7 @@
|
|
|
813
813
|
border: 1px solid ${e.palette.gray[600]};
|
|
814
814
|
}
|
|
815
815
|
`}
|
|
816
|
-
`,V=({children:e,id:n,error:i,helpLink:a,helpLinkText:r="Link here",helpText:o,htmlFor:l,label:c,linkPosition:d="down",maxLength:p,required:g,tooltip:
|
|
816
|
+
`,V=({children:e,id:n,error:i,helpLink:a,helpLinkText:r="Link here",helpText:o,htmlFor:l,label:c,linkPosition:d="down",maxLength:p,required:g,tooltip:x,value:u,weight:h})=>{const b=s.nt(),y=u?u.length:0;return t.jsxs(fi,{id:n,children:[c===void 0?void 0:t.jsx(Ke,{htmlFor:l,label:c,link:d==="up"?a:void 0,required:g,tooltip:x,weight:h}),e,i||p?t.jsxs($,{display:"flex",justify:i===void 0?"end":"space-between",width:"100%",children:[i&&t.jsx(z,{className:"error-msg",color:b.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:i}),p&&t.jsx(Y,{priority:"low",tagLabel:`${y}/${p}`,variant:"error"})]}):void 0,o||a?t.jsxs($,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[o&&t.jsxs(t.Fragment,{children:[t.jsx(T,{icon:"circle-info",iconColor:b.palette.gray[400],iconSize:"xxs",iconType:"fa-light"}),t.jsx(z,{color:b.palette.gray[400],display:"inline-block",size:"sm",children:o})]}),a&&d==="down"?t.jsx(Z,{href:a,children:r}):void 0]}):void 0]})},je=({className:e,children:n,isFilter:i=!1,popoverRef:a,state:r,triggerRef:o,...l})=>{var x;const c=f.useRef(null),d=(x=o==null?void 0:o.current)==null?void 0:x.getBoundingClientRect(),{popoverProps:p}=s.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:a??c,triggerRef:o,isNonModal:a?!0:void 0},r),g=f.useCallback(u=>{u.preventDefault()},[]);return t.jsx(s.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,id:"popover",onPointerDown:i?g:void 0,ref:a??c,style:{...p.style,...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:n})})},hi=s.dt.ul`
|
|
817
817
|
${({theme:e,$multiSelection:n})=>`
|
|
818
818
|
align-self: center;
|
|
819
819
|
background: ${e.palette.white};
|
|
@@ -947,7 +947,7 @@
|
|
|
947
947
|
fill: ${e.palette.white};
|
|
948
948
|
}
|
|
949
949
|
`}
|
|
950
|
-
`,
|
|
950
|
+
`,ie=f.forwardRef(function({checked:n,disabled:i=!1,label:a,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,tooltip:p,value:g,...x},u){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs($i,{"aria-disabled":i,children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-hidden":!1,"aria-label":r,checked:n,"data-testid":a??g,disabled:i,id:r,name:r,onChange:o,onClick:l,onFocus:c,onKeyDown:d,ref:u,type:"checkbox",value:g,...x}),t.jsx(T,{disabled:i,icon:"check",iconSize:"sm"}),a??g]}),p===void 0?void 0:t.jsx(G,{icon:"circle-info",id:p,place:"right",tip:p})]})}),te=(e,n,i=!1,a)=>{f.useEffect(()=>{var o;const r=l=>{e&&!e.contains(l.target)&&!(a!=null&&a.contains(l.target))&&n()};return i?(document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("mousedown",r,!0)}):((o=document.getElementById("root"))==null||o.addEventListener("mousedown",r,!0),()=>{var l;(l=document.getElementById("root"))==null||l.removeEventListener("mousedown",r,!0)})},[i,e,a,n])},vt=({item:e,multiSelection:n,name:i,register:a,setInputValue:r,setValue:o,state:l,watch:c})=>{var F,D,C;const d=s.nt(),p=f.useRef(null),g=l.disabledKeys,x=Array.from(l.collection.getKeys()).filter(S=>!Array.from(g).includes(S)&&S!=="All"),{optionProps:u,isSelected:h,isFocused:b,isDisabled:y}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,p),w=[h?"selected":"",b?"focused":"",y?"disabled":""].join(" "),m=f.useCallback(S=>{r(""),o==null||o(`${i}Options`,""),S.currentTarget.checked&&(r(S.currentTarget.value),o==null||o(`${i}Options`,x))},[x,i,r,o]),v=f.useCallback(()=>{const S=c==null?void 0:c(`${i}Options`);o==null||o("checkAll",""),r((S==null?void 0:S.length)<=2?S.join(", "):`${S.slice(0,2).join(", ")+`, +${S.length-2} more`}`)},[i,r,o,c]),k=e.key==="All"?t.jsx(ie,{...a==null?void 0:a("checkAll",{onChange:m}),label:(F=e.rendered)==null?void 0:F.toString(),name:"checkAll",value:(D=e.rendered)==null?void 0:D.toString()}):t.jsx(ie,{...a==null?void 0:a(`${i}Options`,{onChange:v}),label:(C=e.rendered)==null?void 0:C.toString(),name:`${i}Options`,value:e.key.toString()}),j=n&&!y?k:t.jsx(z,{color:d.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered});return te(document.getElementsByClassName("dropdown")[0],()=>{n&&l.close()},!0,document.getElementById("combobox")),t.jsxs(bi,{...n?{}:u,$multiSelection:n,className:w,ref:p,children:[j,h&&!y&&!n?t.jsx(T,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:t.jsx(Y,{tagLabel:e.textValue,variant:"inactive"})]})},We=({field:e,disabled:n=!1,disabledKeys:i,error:a,helpLink:r,helpLinkText:o,helpText:l,label:c,loadingItems:d,name:p,multiSelection:g=!1,items:x,onBlur:u,onChange:h,placeholder:b,register:y,required:w,setValue:m,tooltip:v,value:k,watch:j,weight:F})=>{var at;const D=s.nt(),C=n?void 0:a,S=(e==null?void 0:e.value)??k,[L,E]=f.useState(((at=x.find(R=>R.value===S))==null?void 0:at.name)??""),[P,q]=f.useState(S),[X,ee]=f.useState(x),[W,O]=f.useState(!1),{contains:B}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),oe=f.useRef(null),Le=f.useRef(null),Ae=f.useRef(null),tt=f.useRef(null),nt=f.useRef(null),fn=f.useMemo(()=>x.toSorted((R,H)=>{const _=Array.from(i??[]),se=_.includes(R.value),rt=_.includes(H.value);return se&&!rt?1:!se&&rt?-1:0}).map(R=>B(R.name,L)||W?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":R.value,textValue:R.tag,children:R.name},R.value):null),[B,i,L,x,W]),hn=f.useCallback(R=>{const H=R.split(/,|\s/u).slice(-1)[0].trim();E(g?H:R),R===""||R.endsWith(",")?O(!0):(O(!1),q(_=>{const se=R===""?"":_;return e&&e.onChange(se),h&&h(R),se}),ee(x.filter(_=>B(_.name,g?H:R))))},[B,x,e,g,h]),bn=f.useCallback(R=>{var H;E(((H=x.find(_=>_.value===R))==null?void 0:H.name)??""),q(R?String(R):""),e&&e.onChange(R),h&&h(R?String(R):""),ee(x)},[x,e,h]),it=f.useCallback(R=>{R.key==="Enter"&&R.preventDefault(),O(!1)},[]),$n=f.useCallback(()=>{u&&u(),e&&e.onBlur()},[e,u]),yn=f.useCallback(()=>{O(!0)},[]),J=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:g,allowsEmptyCollection:!0,disabledKeys:i,inputValue:L,items:X,menuTrigger:"focus",shouldCloseOnBlur:!g,selectedKey:P,onBlur:$n,onInputChange:hn,onKeyDown:it,onKeyUp:yn,onOpenChange(R,H){O(R&&(H==="manual"||H==="focus")),R&&setTimeout(()=>{var _;return(_=oe.current)==null?void 0:_.focus()},50)},onSelectionChange:g?void 0:bn,children:fn,validationBehavior:void 0}),{buttonProps:mn,inputProps:wn,listBoxProps:vn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:L,buttonRef:Le,id:p,inputRef:oe,label:c??p,listBoxRef:Ae,name:p,placeholder:b,popoverRef:nt},J),{listBoxProps:jn}=s.$c132121280ec012d$export$50eacbbf140a3141(vn,J,Ae),{buttonProps:kn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(mn,Le);return f.useEffect(()=>{var R;if(d===!1||!S){const H=((R=x.find(_=>_.value===S))==null?void 0:R.name)??"";E(H),q(H)}},[S,x,d,g]),t.jsxs(V,{error:C,helpLink:r,helpLinkText:o,helpText:l,htmlFor:p,id:"combobox",label:c,required:w,tooltip:v,weight:F,children:[t.jsxs(Q,{className:`${n?"disabled":""} ${C?"error":""}`,ref:tt,children:[t.jsx("input",{...wn,"aria-invalid":C?"true":"false","aria-label":p,disabled:n,onKeyDown:it,ref:oe}),C?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:D.palette.error[500],iconSize:"xs"}):void 0,t.jsx(M,{...kn,className:"action",disabled:n,icon:J.isOpen&&!n?"chevron-up":"chevron-down",iconColor:D.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:Le,type:"button",variant:"ghost"})]}),J.isOpen&&J.collection.size>0&&!n?t.jsx(je,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:nt,state:J,triggerRef:tt,children:t.jsx(hi,{...jn,$multiSelection:g,ref:Ae,children:[...J.collection].map(R=>t.jsx(vt,{item:R,multiSelection:g,name:p,register:y,setInputValue:E,setValue:m,state:J,watch:j},R.key))})}):null]})},jt=({control:e,disabled:n=!1,disabledKeys:i,error:a,helpLink:r,helpLinkText:o,helpText:l,label:c,loadingItems:d,name:p,multiSelection:g,items:x,onBlur:u,onChange:h,placeholder:b,register:y,required:w,setValue:m,tooltip:v,value:k,watch:j,weight:F})=>e?t.jsx(s.Controller,{control:e,name:p,render:({field:D,fieldState:C})=>{var S;return t.jsx(We,{disabled:n,disabledKeys:i,error:(S=C.error)==null?void 0:S.message,field:D,helpLink:r,helpLinkText:o,helpText:l,items:x,label:c,loadingItems:d,multiSelection:g,name:p,onBlur:u,onChange:h,placeholder:b,register:y,required:w,setValue:m,tooltip:v,value:k,watch:j,weight:F})},rules:{required:w}}):t.jsx(We,{disabled:n,disabledKeys:i,error:a,helpLink:r,helpLinkText:o,helpText:l,items:x,label:c,loadingItems:d,multiSelection:g,name:p,onBlur:u,onChange:h,placeholder:b,required:w,tooltip:v,value:k,weight:F}),yi=s.dt.div`
|
|
951
951
|
${({theme:e})=>`
|
|
952
952
|
align-items: center;
|
|
953
953
|
color: ${e.palette.gray[800]};
|
|
@@ -1079,9 +1079,9 @@
|
|
|
1079
1079
|
padding: 0 ${e.spacing[.25]};
|
|
1080
1080
|
width: 100%;
|
|
1081
1081
|
`}
|
|
1082
|
-
`,Ct=({state:e,date:n})=>{const i=f.useRef(null),a=s.$14e0f24ef4ac5c92$export$629b0a497aa65267(n,s.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:o,isSelected:l,isDisabled:c,formattedDate:d}=s.$36a0ac60f04457c5$export$136073280381448e({date:n},e,i),p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,
|
|
1082
|
+
`,Ct=({state:e,date:n})=>{const i=f.useRef(null),a=s.$14e0f24ef4ac5c92$export$629b0a497aa65267(n,s.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:o,isSelected:l,isDisabled:c,formattedDate:d}=s.$36a0ac60f04457c5$export$136073280381448e({date:n},e,i),p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,x=l&&!c&&!(p||g)?"range":"";return t.jsx(vi,{id:x,...r,children:t.jsxs("div",{...o,className:`cell ${p||g?"selected":""}
|
|
1083
1083
|
${c?"disabled":""} ${a?"today":""}
|
|
1084
|
-
${!e.isFocused&&!a?"focused":""} ${
|
|
1084
|
+
${!e.isFocused&&!a?"focused":""} ${x}`,ref:i,children:[d,a?t.jsx(ji,{children:t.jsx(T,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},Fe=({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(lt,{children:a.map((o,l)=>{const c=`key_${l}`;return t.jsx(wi,{children:o},c)})})}),t.jsx("tbody",{children:[...new Array(r).keys()].map(o=>t.jsx(lt,{children:e.getDatesInWeek(o).map((l,c)=>{const d=`key_${c}`;return l?t.jsx(Ct,{date:l,state:e},d):t.jsx("td",{},d)})},o))})]})},ki=s.dt(Ge)`
|
|
1085
1085
|
align-items: center;
|
|
1086
1086
|
background-color: inherit;
|
|
1087
1087
|
border-color: inherit;
|
|
@@ -1179,7 +1179,7 @@
|
|
|
1179
1179
|
font-weight: ${e.typography.weight.bold};
|
|
1180
1180
|
}
|
|
1181
1181
|
`}
|
|
1182
|
-
`,Se=({disabled:e=!1,icon:n,props:i})=>{const a=f.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,a);return t.jsx(Si,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(T,{icon:n,iconColor:I.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ne=({state:e,prevButtonProps:n,nextButtonProps:i,title:a})=>{const r=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=f.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(Se,{icon:"chevron-left",props:n}),t.jsxs(yi,{children:[a,t.jsxs(mi,{children:[t.jsx(ct,{"aria-label":"top",onClick:o,children:t.jsx(T,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(ct,{"aria-label":"bottom",onClick:l,children:t.jsx(T,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(Se,{icon:"chevron-right",props:i})]})},St=({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(Ne,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(Fe,{state:a}),t.jsx(Xe,{children:t.jsx(A,{onClick:e,variant:"ghost",children:"Cancel"})})]})},zt=({segment:e,state:n})=>{const i=s.nt(),a=f.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,a),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},It=({disabled:e,error:n=!1,props:i})=>{const a=s.nt(),r=f.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,r),c=f.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(
|
|
1182
|
+
`,Se=({disabled:e=!1,icon:n,props:i})=>{const a=f.useRef(null),{buttonProps:r}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(i,a);return t.jsx(Si,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:a,type:"button",children:t.jsx(T,{icon:n,iconColor:I.palette.gray[e?400:700],iconSize:"xs",iconType:"fa-light"})})},Ne=({state:e,prevButtonProps:n,nextButtonProps:i,title:a})=>{const r=e.focusedDate,o=f.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),l=f.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",children:[t.jsx(Se,{icon:"chevron-left",props:n}),t.jsxs(yi,{children:[a,t.jsxs(mi,{children:[t.jsx(ct,{"aria-label":"top",onClick:o,children:t.jsx(T,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xxss"})}),t.jsx(ct,{"aria-label":"bottom",onClick:l,children:t.jsx(T,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xxss"})})]})]}),t.jsx(Se,{icon:"chevron-right",props:i})]})},St=({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(Ne,{nextButtonProps:o,prevButtonProps:r,state:a,title:l}),t.jsx(Fe,{state:a}),t.jsx(Xe,{children:t.jsx(A,{onClick:e,variant:"ghost",children:"Cancel"})})]})},zt=({segment:e,state:n})=>{const i=s.nt(),a=f.useRef(null),o={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=s.$32489daedd52963e$export$1315d136e6f7581(o,n,a),c=i.palette.gray[o.isEditable?800:500];return t.jsx("div",{...o.type!=="literal"&&{...l,className:"segment-cell"},ref:a,style:o.type==="literal"?void 0:{color:o.isPlaceholder?i.palette.gray[400]:c},children:o.isPlaceholder?o.placeholder:o.text})},It=({disabled:e,error:n=!1,props:i})=>{const a=s.nt(),r=f.useRef(null),o=s.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=s.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,o,r),c=f.useCallback(d=>{const p=document.getElementsByClassName("segment-cell"),g=d.currentTarget;Object.values(p).some(x=>x.contains(g))||(d.preventDefault(),d.stopPropagation())},[]);return t.jsxs(zi,{...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(zt,{segment:{...d,isEditable:!e},state:o},g)})}),n?t.jsx(T,{icon:"exclamation-circle",iconColor:a.palette.error[500],iconSize:"xs"}):void 0]})},Tt=e=>{const n=f.useRef(null),i=s.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:a}=i,r=!s.lodashExports.isNil(a)&&a.hour<12?"AM":"PM",[o,l]=f.useState(s.lodashExports.isNil(a)?"AM":r),{fieldProps:c}=s.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),d=f.useCallback(p=>{const g=p.currentTarget.name;g!==o&&(s.lodashExports.isNil(a)||(g==="AM"?i.setSegment("dayPeriod",0):g==="PM"&&i.setSegment("dayPeriod",12))),l(g)},[o,i,a]);return t.jsxs(Ii,{children:[t.jsx(dt,{...c,ref:n,children:i.segments.slice(0,-2).map((p,g)=>{const x=`key_${g}`;return t.jsx(zt,{segment:p,state:i},x)})}),t.jsxs(dt,{children:[t.jsx(pt,{id:o==="AM"?"active":"",name:"AM",onClick:d,type:"button",children:"AM"}),t.jsx(pt,{id:o==="PM"?"active":"",name:"PM",onClick:d,type:"button",children:"PM"})]})]})},ze=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD"):"-",Ti=e=>e&&e!=="-"?s.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",gt=(e,n)=>s.dayjs(String(e).replace(/-/gu,"/")).hour(n.hour).minute(n.minute).second(n.second).format("YYYY/MM/DD hh:mm A"),ge=({error:e,buttonProps:n,datePickerRef:i,disabled:a=!1,granularity:r="day",fieldProps:o,groupProps:l,name:c,register:d,required:p,setValue:g,value:x})=>{const u=f.useCallback(h=>{const b=r==="day"?ze(String(h)):Ti(String(h));o.onChange&&o.onChange(h??null),g&&g(c,b)},[o,r,c,g]);return t.jsxs(Q,{...l,className:`${a?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(It,{disabled:a,error:e!=null,props:{...o,autoFocus:!1,granularity:r,onChange:u,shouldForceLeadingZeros:!0}}),t.jsx(Se,{disabled:a,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...d==null?void 0:d(c,{required:p}),"aria-label":c,className:"date-input",disabled:a,id:c,name:c,type:"text",value:x??""})]})},Ee=({children:e,...n})=>{const i=f.useRef(null),{dialogProps:a}=s.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(Ci,{...a,ref:i,children:e})},Ft=({disabled:e=!1,error:n,helpLink:i,helpLinkText:a,helpText:r,required:o,label:l,name:c,register:d,setValue:p,tooltip:g,watch:x,...u})=>{const h=f.useRef(null),b=x==null?void 0:x(c),y=f.useCallback(C=>{p&&C&&p(c,ze(String(C)))},[c,p]),w=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...u,onChange(C){y(C)},value:s._.isNil(b)||s._.isEmpty(b)||b==="-"?null:s.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}),{close:m}=w,{groupProps:v,fieldProps:k,buttonProps:j,dialogProps:F,calendarProps:D}=s.$6057a3d2a53a12fd$export$42df105a73306d51({...u,"aria-label":l??c,name:c},w,h);return t.jsxs(V,{error:n,helpLink:i,helpLinkText:a,helpText:r,htmlFor:c,label:l,required:o,tooltip:g,children:[t.jsx(ge,{buttonProps:j,datePickerRef:h,disabled:e,error:n,fieldProps:k,groupProps:v,name:c,register:d,required:o,setValue:p,value:b}),w.isOpen&&!e?t.jsx(je,{offset:8,placement:"bottom start",state:w,triggerRef:h,children:t.jsx(Ee,{...F,children:t.jsx(St,{onClose:m,props:D})})}):null]})},Nt=({onClose:e,props:n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),a=f.useRef(null),r=s.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:o,nextButtonProps:l,title:c}=s.$46a4342aab3d8076$export$87e0539f600c24e5(n,r,a);return t.jsxs("div",{className:"calendar-range",ref:a,children:[t.jsx(Ne,{nextButtonProps:l,prevButtonProps:o,state:r,title:c}),t.jsx(Fe,{state:r}),t.jsx(Xe,{children:t.jsx(A,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Fi=s.dt.div`
|
|
1183
1183
|
${({theme:e,$disabled:n,$show:i})=>`
|
|
1184
1184
|
border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
|
|
1185
1185
|
display: flex;
|
|
@@ -1190,7 +1190,7 @@
|
|
|
1190
1190
|
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1191
1191
|
}
|
|
1192
1192
|
`}
|
|
1193
|
-
`,Et=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...
|
|
1193
|
+
`,Et=({disabled:e=!1,error:n,label:i,name:a,required:r,tooltip:o,register:l,setValue:c,propsMax:d,propsMin:p,variant:g="default",...x})=>{const u=`${a}Max`,h=`${a}Min`,b=f.useRef(null),y=f.useCallback(S=>{c&&S&&(c((d==null?void 0:d.name)??u,ze(String(S.end))),c((p==null?void 0:p.name)??h,ze(String(S.start))))},[u,h,c,d,p]),w=s.$93c38a5e28be6249$export$e50a61c1de9f574({...x,endName:(d==null?void 0:d.name)??u,startName:(p==null?void 0:p.name)??h,onChange(S){y(S)}}),{close:m}=w,{groupProps:v,startFieldProps:k,endFieldProps:j,buttonProps:F,dialogProps:D,calendarProps:C}=s.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...x,"aria-label":i??a},w,b);return t.jsxs(V,{error:n,htmlFor:a,label:i,required:r,tooltip:o,children:[t.jsxs(Fi,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:g==="filters"?"column":"row"},children:[t.jsx(ge,{buttonProps:F,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${a}`,validate:S=>j.value&&S>j.value?"Start date must be less than or equal to end date":null},groupProps:v,name:(p==null?void 0:p.name)??h,register:l,setValue:c,value:p==null?void 0:p.value}),t.jsx(ge,{buttonProps:F,datePickerRef:b,disabled:e,error:n,fieldProps:{...j,"aria-label":`${j["aria-label"]} ${a}`,validate:S=>k.value&&S<k.value?"End date must be greater than or equal to start date":null},groupProps:v,name:(d==null?void 0:d.name)??u,register:l,setValue:c,value:d==null?void 0:d.value})]}),w.isOpen&&!e?t.jsx(je,{offset:8,placement:"bottom start",state:w,triggerRef:b,children:t.jsx(Ee,{...D,children:t.jsx(Nt,{onClose:m,props:C})})}):null]})},Ni=s.dt.div`
|
|
1194
1194
|
${({theme:e})=>`
|
|
1195
1195
|
align-items: center;
|
|
1196
1196
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1205,9 +1205,9 @@
|
|
|
1205
1205
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1206
1206
|
justify-content: flex-end;
|
|
1207
1207
|
flex: 1 0 0;
|
|
1208
|
-
`,Dt=({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(Ne,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(Fe,{state:l}),t.jsxs(Ni,{children:[t.jsx(z,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Ei,{children:t.jsx(Tt,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Xe,{children:t.jsx(A,{onClick:n,variant:"ghost",children:"Cancel"})})]})},Di=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),
|
|
1208
|
+
`,Dt=({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(Ne,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(Fe,{state:l}),t.jsxs(Ni,{children:[t.jsx(z,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(Ei,{children:t.jsx(Tt,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Xe,{children:t.jsx(A,{onClick:n,variant:"ghost",children:"Cancel"})})]})},Di=e=>{const{disabled:n=!1,error:i,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),x=f.useRef(null),u=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"||s.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=u,{groupProps:b,fieldProps:y,buttonProps:w,dialogProps:m,calendarProps:v}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,u,x),k=f.useCallback(F=>{if(v.onChange&&v.onChange(F),u.timeValue){const D=gt(F,u.timeValue);d==null||d(o,D,{shouldDirty:!0})}else u.setDateValue(F)},[v,o,d,u]),j=f.useCallback(F=>{if(F){u.setTimeValue(F);const D=u.dateValue;if(D){const C=gt(D,F);d==null||d(o,C,{shouldDirty:!0})}}},[u,d,o]);return t.jsxs(V,{error:i,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(ge,{buttonProps:w,datePickerRef:x,disabled:n,error:i,fieldProps:y,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:g}),u.isOpen&&!n?t.jsx(je,{offset:8,placement:"bottom start",state:u,triggerRef:x,children:t.jsx(Ee,{...m,children:t.jsx(Dt,{handleTimeChange:j,onClose:h,props:{...v,onChange:k},timeState:u})})}):null]})},Ri=({children:e,currentValue:n,externalLink:i,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs($,{children:[t.jsx(Ke,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Z,{href:d,children:c}):t.jsx(z,{size:"md",children:c})]})},De=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:a,helpText:r,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:x,name:u,maskValue:h=!1,onPaste:b,placeholder:y,removeItemArray:w,register:m,suggestions:v,tooltip:k,type:j="text",weight:F,...D})=>{const{required:C,onBlur:S,onChange:L}=D,E=s.nt(),P=e?void 0:o,[q,X]=f.useState(""),ee=f.useCallback(B=>{X(B.target.value),L==null||L(B)},[L]),W=d&&p&&!e&&q.trim()!=="",O=f.useCallback(B=>{B.key==="Enter"&&B.preventDefault()},[]);return t.jsxs(V,{error:P,helpLink:i,helpLinkText:a,helpText:r,htmlFor:u,label:g,linkPosition:x,required:C,tooltip:k,weight:F,children:[t.jsxs(Q,{className:`
|
|
1209
1209
|
${e?"disabled":""} ${P?"error":""} ${W?"success":""}
|
|
1210
|
-
`,children:[n?t.jsx(T,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":P?"true":"false","aria-label":
|
|
1210
|
+
`,children:[n?t.jsx(T,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":P?"true":"false","aria-label":u,"aria-required":C,autoComplete:"off",className:h?"sr-block":"","data-testid":`${u}-input`,disabled:e,id:u,list:v?`list_${u}`:void 0,onKeyDown:O,onPaste:b,placeholder:y,type:j,...m?m(u,{required:C,onBlur:S,onChange:ee}):{...D,onChange:ee}}),P?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"xs"}):void 0,W?t.jsx(T,{icon:"check-circle",iconClass:"success-icon",iconColor:E.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&c>0?t.jsx(M,{color:E.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:w?w(c):void 0,variant:"ghost"}):void 0]}),v?t.jsx("datalist",{id:`list_${u}`,children:v.map(B=>t.jsx("option",{value:B},B))}):void 0]})},Li=s.dt.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,Ai=s.dt.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1211
1211
|
gap: 12px;
|
|
1212
1212
|
`,Pi=s.dt.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1213
1213
|
gap: 8px;
|
|
@@ -1263,7 +1263,7 @@
|
|
|
1263
1263
|
padding: ${i}px;
|
|
1264
1264
|
}
|
|
1265
1265
|
`}
|
|
1266
|
-
`,Rt=({align:e,children:n,cols:i,colsPadding:a,justify:r})=>t.jsx(Oi,{$align:e,$cols:i,$colsPadding:a,$justify:r,children:n}),Me=({addText:e,append:n,disabled:i=!1,fields:a,fieldState:r,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:
|
|
1266
|
+
`,Rt=({align:e,children:n,cols:i,colsPadding:a,justify:r})=>t.jsx(Oi,{$align:e,$cols:i,$colsPadding:a,$justify:r,children:n}),Me=({addText:e,append:n,disabled:i=!1,fields:a,fieldState:r,initValue:o="",index:l=0,required:c,label:d,max:p=100,name:g,onBlur:x,onChange:u,placeholder:h,tooltip:b,remove:y,value:w})=>{var k;const m=f.useCallback(()=>{n==null||n(o)},[n,o]),v=f.useCallback(j=>()=>{y==null||y(j)},[y]);return t.jsxs(Rt,{align:"start",children:[t.jsx(Be,{lg:75,md:75,sm:75,children:t.jsx(De,{disabled:i,error:r?(k=r.error)==null?void 0:k.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:d,name:g,onBlur:x,onChange:u,placeholder:h,removeItemArray:v,required:c,tooltip:b,value:w})}),l<p-1&&l+1===(a==null?void 0:a.length)?t.jsx(Be,{lg:25,md:25,sm:25,children:t.jsx(A,{disabled:i,icon:"plus",onClick:m,variant:"ghost",width:"100%",children:e??"Add"})}):void 0]})},Hi=({addText:e,append:n,control:i,disabled:a,fields:r,initValue:o="",required:l,label:c,max:d=void 0,name:p="array-field",onChange:g,placeholder:x,remove:u,tooltip:h})=>i&&r?t.jsx(f.Fragment,{children:r.map((b,y)=>t.jsx(s.Controller,{control:i,name:`${p}.${y}`,render:({field:w,fieldState:m})=>t.jsx(Me,{addText:e,append:n,disabled:a,fieldState:m,fields:r,index:y,initValue:o,label:c,max:d,name:w.name,onBlur:w.onBlur,onChange:g??w.onChange,placeholder:x,remove:u,required:l,tooltip:h,value:typeof w.value=="object"?w.value.value:w.value}),index:y},b.id))}):t.jsx(Me,{addText:e,disabled:a,initValue:o,label:c,max:d,name:p,onChange:g,placeholder:x,required:l,tooltip:h}),_i=s.dt(bt)`
|
|
1267
1267
|
white-space: nowrap;
|
|
1268
1268
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1269
1269
|
text-overflow: ellipsis;
|
|
@@ -1274,13 +1274,13 @@
|
|
|
1274
1274
|
position: absolute;
|
|
1275
1275
|
visibility: hidden;
|
|
1276
1276
|
width: 0;
|
|
1277
|
-
`,Lt=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Ui=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Gi=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:
|
|
1277
|
+
`,Lt=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Ui=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Gi=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:x,setValue:u,tooltip:h,watch:b,weight:y})=>{const w=s.nt(),m=n?void 0:i,v=f.useRef(null),k=x==null?void 0:x(d,{required:g}),j=b==null?void 0:b(d),F=Ui(j),D=f.useCallback(()=>{const L=Lt("change",d,void 0);u&&u(d,void 0),k&&k.onChange(L)},[k,d,u]),C=f.useCallback(L=>{const{files:E}=L.currentTarget;E&&E.length>0&&(p==null||p(L),u&&u(d,E),k&&k.onChange(L))},[k,d,p,u]),S=f.useCallback(L=>{n?L.preventDefault():v.current&&v.current.click()},[n]);return t.jsxs(V,{error:m,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:g,tooltip:h,weight:y,children:[t.jsxs(Q,{className:`${n?"disabled":""} ${m?"error":""}`,children:[t.jsx(_i,{$size:"xs",children:F}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(F)?void 0:t.jsx(M,{color:w.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:D,variant:"ghost",width:"20px"}),m&&t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}),t.jsxs(A,{border:n?`1px solid ${w.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:S,variant:"primary",width:"96px",children:[t.jsx(T,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Vi,{...k,accept:e,"aria-label":d,"data-testid":d,disabled:n,id:l??d,multiple:c,name:d,onChange:C,ref:v,type:"file"})]})},Yi=s.dt.input`
|
|
1278
1278
|
border: none;
|
|
1279
1279
|
background: transparent;
|
|
1280
1280
|
min-width: 15rem;
|
|
1281
1281
|
padding: 0;
|
|
1282
1282
|
flex: 1;
|
|
1283
|
-
`,Oe=({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:
|
|
1283
|
+
`,Oe=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b})=>{const y=s.nt(),w=e?void 0:n,[m,v]=f.useState(""),k=d?h:i==null?void 0:i.value,j=f.useMemo(()=>k&&typeof k=="string"?k.split(",").filter(Boolean):[],[k]),F=f.useCallback(E=>{const q=[...new Set(E.filter(Boolean))].join(","),X=Lt("change",c,q);i&&i.onChange(X),d&&d(X)},[i,c,d]),D=f.useCallback(E=>{v(E.target.value)},[]),C=f.useCallback(E=>{const P=m.trim();P.length&&!j.includes(P)&&(E.preventDefault(),F([...j,P]),v("")),i&&i.onBlur()},[m,i,F,j]),S=f.useCallback(E=>{const P=m.trim();E.key==="Enter"&&P.length===0&&E.preventDefault(),["Enter",","].includes(E.key)&&P.length>0&&!j.includes(P)?(E.preventDefault(),F([...j,P]),v("")):E.key==="Backspace"&&!P.length&&j.length&&(E.preventDefault(),p==null||p(j[j.length-1]),F(j.slice(0,-1)))},[m,p,F,j]),L=f.useCallback(E=>()=>{p==null||p(E),F(j.filter(P=>P!==E))},[p,F,j]);return t.jsx(V,{error:w,helpLink:a,helpLinkText:r,helpText:o,htmlFor:c,label:l,required:x,tooltip:u,weight:b,children:t.jsxs(Q,{$overflowX:"auto",className:`${e?"disabled":""} ${w?"error":""}`,children:[j.map(E=>t.jsx(Y,{disabled:e,onClose:L(E),tagLabel:E},E)),t.jsx(Yi,{"aria-hidden":!1,"aria-invalid":w?"true":"false","aria-label":c,"aria-required":x,autoComplete:"off",id:c,onBlur:C,onChange:D,onKeyDown:S,placeholder:j.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:m}),w?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}):void 0]})})},qi=({disabled:e=!1,control:n,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b})=>n?t.jsx(s.Controller,{control:n,name:c,render:({field:y})=>t.jsx(Oe,{disabled:e,error:i,field:y,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:x,tooltip:u,weight:b}),rules:{required:x}}):t.jsx(Oe,{disabled:e,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:x,tooltip:u,value:h,weight:b}),He=f.forwardRef(function({disabled:n,icon:i,margin:a,onClick:r,...o},l){return t.jsx(ki,{$margin:a,"aria-label":i,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...o,children:t.jsx(T,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Ie=({error:e,decimalPlaces:n=0,disabled:i=!1,id:a,maxLength:r,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:x,setValue:u,value:h})=>{const b=s.nt(),y=i?void 0:e,w=n<0?0:n,[m,v]=f.useState(h?s._.toNumber(h):0),k=f.useCallback(()=>{const C=(m-10**-w).toFixed(w),S=Math.max(Number(l),Number(C));u&&u(c,S,{shouldDirty:!0}),v(S)},[w,m,l,c,u]),j=f.useCallback(()=>{const C=(m+10**-w).toFixed(w),S=Math.min(Number(o),Number(C)>Number(l)?Number(C):Number(l));u&&u(c,S,{shouldDirty:!0}),v(S)},[w,m,o,l,c,u]),F=f.useCallback(C=>{const{value:S}=C.target,L=/\d+/u.test(S)&&!s._.isEmpty(S);u&&u(c,L?S:void 0),d&&d(C),v(Number(S))},[c,d,u]),D=f.useCallback(C=>{C.key==="Enter"&&C.preventDefault()},[]);return t.jsxs(Q,{className:`${i?"disabled":""} ${y?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":y?"true":"false","aria-label":c,"aria-required":x,autoComplete:"off",disabled:i,id:a??c,max:o,min:l,onKeyDown:D,placeholder:p,required:x,step:10**-w,type:"number",...g==null?void 0:g(c,{maxLength:r,max:o,min:l,onChange:F,value:h,valueAsNumber:!0})}),y&&t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsx(He,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:k,px:.75,py:.75}),t.jsx(He,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:j,px:.75,py:.75})]})},At=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:a,helpText:r,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:x,onChange:u,placeholder:h,register:b,required:y,setValue:w,tooltip:m,value:v,watch:k,weight:j})=>t.jsx(V,{error:n?void 0:i,helpLink:a,helpText:r,htmlFor:x,label:l,linkPosition:c,maxLength:d,required:y,tooltip:m,weight:j,children:t.jsx(Ie,{decimalPlaces:e,disabled:n,error:i,id:o,max:p,maxLength:d,min:g,name:x,onChange:u,placeholder:h,register:b,required:y,setValue:w,value:u?v:k==null?void 0:k(x)})}),Pt=({disabled:e=!1,error:n,name:i,label:a,propsMax:r,propsMin:o,required:l,tooltip:c,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return t.jsx(V,{error:n,htmlFor:i,label:a,required:l,tooltip:c,children:t.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Ie,{...o,disabled:e,error:n,name:o.name??g}),t.jsx(Ie,{...r,disabled:e,error:n,name:r.name??p})]})})},Ki=s.dt.div`
|
|
1284
1284
|
${({theme:e})=>`
|
|
1285
1285
|
align-items: flex-start;
|
|
1286
1286
|
align-self: stretch;
|
|
@@ -1374,9 +1374,9 @@
|
|
|
1374
1374
|
overflow: hidden;
|
|
1375
1375
|
text-overflow: ellipsis;
|
|
1376
1376
|
white-space: nowrap;
|
|
1377
|
-
`,
|
|
1378
|
-
${e?"disabled":""} ${
|
|
1379
|
-
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":
|
|
1377
|
+
`,ea=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const x=s.nt(),u=f.useRef(null),h=e?void 0:n,b=(p==null?void 0:p(a))??d,[y,w]=f.useState(!1),[m,v]=f.useState(""),{refs:k,floatingStyles:j}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:F,inputValue:D,handlePhoneValueChange:C,country:S,setCountry:L}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),E=f.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),P=f.useCallback(W=>{W.preventDefault(),w(O=>!O),y||v("")},[y]),q=f.useCallback(W=>()=>{L(W),w(!1),v("")},[L,w]),X=f.useCallback(W=>{W.key.length===1?v(O=>O+W.key):W.key==="Backspace"&&v(O=>O.slice(0,-1))},[]),ee=s.R.filter(W=>{const{name:O}=s.M(W);return O.toLowerCase().includes(m.toLowerCase())});return te(k.floating.current,()=>{w(!1),v("")},!0),t.jsx(V,{error:h,htmlFor:a,label:i,required:o,tooltip:c,weight:g,children:t.jsxs(Ki,{className:`${e?"disabled":""} ${h?"error":""}`,ref:u,children:[t.jsxs(Xi,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:P,onKeyDown:X,ref:k.setReference,children:[t.jsx(s.q,{iso2:S.iso2,size:"16px"}),t.jsx(T,{icon:"angle-down",iconColor:x.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(Q,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":a,"aria-required":o,autoComplete:"off","data-testid":`${a}-input`,disabled:e,id:a,name:a,onKeyDown:E,placeholder:r,ref:F,type:"tel",value:D,...l==null?void 0:l(a,{required:o,onChange:C})}),h?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:x.palette.error[500],iconSize:"xs"}):void 0]}),y&&re.createPortal(t.jsx(Ji,{ref:k.setFloating,style:j,children:ee.map(W=>{const{dialCode:O,iso2:B,name:oe}=s.M(W);return t.jsxs(Zi,{onClick:q(B),value:B,children:[t.jsx(s.q,{iso2:B,size:"16px"}),t.jsx(Qi,{children:oe}),t.jsx(z,{color:x.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+O})]},B)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},ta=({disabled:e=!1,error:n,helpLink:i,helpText:a,isTouched:r,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:x,register:u,required:h,rows:b,tooltip:y,watch:w,weight:m,value:v})=>{const k=s.nt(),j=(w==null?void 0:w(c))??v,F=o&&r&&!e,D=e?void 0:n;return t.jsx(V,{error:D,helpLink:i,helpText:a,htmlFor:c,label:l,maxLength:g,required:h,tooltip:y,value:j?String(j):void 0,weight:m,children:t.jsxs(Q,{className:`
|
|
1378
|
+
${e?"disabled":""} ${D?"error":""} ${F?"success":""}
|
|
1379
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":D?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:x,rows:b,value:j,...u==null?void 0:u(c,{required:h})}),D?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:k.palette.error[500],iconSize:"xs"}):void 0,F?t.jsx(T,{icon:"check-circle",iconClass:"success-icon",iconColor:k.palette.success[500],iconSize:"xs"}):void 0]})})},na=({description:e,disabled:n,id:i,align:a,inputType:r="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:x})=>{const u=f.useMemo(()=>{if(r==="text")return t.jsx(De,{disabled:n,name:d,placeholder:p});if(r==="date")return t.jsx(Ft,{disabled:n,name:d});const{decimalPlaces:h,max:b,min:y}=o??{};return t.jsx(At,{decimalPlaces:h,disabled:n,max:b,min:y,name:d,placeholder:p})},[n,o,r,d,p]);return t.jsxs(xi,{$align:a,$minHeight:l,$minWidth:c,children:[t.jsx(Te,{description:e,id:i,title:x,tooltip:g}),u]})},Wt=(e,n)=>{const[a,r]=f.useState(0),[o,l]=f.useState(0);return f.useEffect(()=>{o===100&&(()=>{r(d=>d===n-1?0:d+1)})()},[o,n]),f.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:a,progress:o,setCycle:r,setProgress:l}},Bt=({publicId:e,format:n="webp"})=>{const i=f.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return f.useMemo(()=>i.image(e).format(n),[i,e,n])},Re=e=>{const[n,i]=f.useState(!1),a=f.useCallback(()=>{i(!0)},[]),r=f.useCallback(()=>{i(!1)},[]),o=f.useCallback(()=>{i(l=>!l)},[]);return{close:r,isOpen:n,name:e,open:a,setIsOpen:i,toggle:o}},ia=({name:e,items:n,columnOrder:i,setColumnOrder:a})=>{const r=f.useMemo(()=>[...n.filter(({locked:g})=>g).map(({locked:g,...x})=>({...x,visible:!0,locked:g})),...n.filter(({locked:g})=>!g)],[n]),[o,l]=f.useState(r),c=f.useCallback(g=>{const x=g.filter(({locked:y})=>!y),h=[...g.filter(({locked:y})=>y),...x],b=h.map(({name:y})=>y);l(y=>[...h,...y.filter(({name:w})=>!b.includes(w))]),a&&a(h.map(({id:y})=>y))},[a]),d=f.useCallback(()=>{const g=o.map(x=>{var h;const u=(i==null?void 0:i.includes(x.id))??!1;return(h=x.toggleVisibility)==null||h.call(x,u),{...x,visible:u}}).toSorted((x,u)=>{const h=(i==null?void 0:i.indexOf(x.id))??0,b=(i==null?void 0:i.indexOf(u.id))??0;return Number(u.visible)!==Number(x.visible)?Number(u.visible)-Number(x.visible):h-b});l(g),a==null||a(i)},[o,i,a]),p=f.useMemo(()=>s.some(o,g=>((i==null?void 0:i.includes(g.id))??!1)!==g.visible),[o,i]);return{setColumns:c,resetToDefault:d,columns:o,...Re(e),hasChanged:p}},Mt=(e,n)=>f.useMemo(()=>s._.debounce(e,n),[e,n]),aa=e=>{const[n,i]=f.useState(),a=Mt(r=>{i(r)},(e==null?void 0:e.debounceWait)??300);return[n,a]},ra=({alt:e="img",height:n="",width:i="",plugins:a=[s.lazyload(),s.placeholder()],publicId:r})=>{const o=Bt({publicId:r});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:n,plugins:a,width:i})},ne=f.memo(ra),oa=s.dt.label`
|
|
1380
1380
|
${({theme:e})=>`
|
|
1381
1381
|
align-items: center;
|
|
1382
1382
|
display: flex;
|
|
@@ -1455,7 +1455,7 @@
|
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
1457
|
`}
|
|
1458
|
-
`,
|
|
1458
|
+
`,sa=s.dt.span.attrs({className:"checkmark"})``,Je=f.forwardRef(function({defaultChecked:n=!1,disabled:i=!1,label:a,name:r,onChange:o,onClick:l,value:c,...d},p){return t.jsxs(oa,{"aria-disabled":i,"aria-label":a??r,role:"radiogroup",children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-label":a??r,defaultChecked:n,disabled:i,name:r,onChange:o,onClick:l,ref:p,type:"radio",value:c,...d}),t.jsx(sa,{}),a??null]})}),la=({alt:e,imageId:n,icon:i,selectorProps:a,onClick:r,register:o,title:l,width:c="fit-content"})=>{const d=s.nt();return t.jsxs($,{alignItems:"center",border:`1px solid ${d.palette.gray[200]}`,borderColorHover:d.palette.gray[600],borderRadius:d.spacing[.25],display:"inline-flex",padding:[1,1,1,1],shadowHover:"md",width:c,children:[t.jsx($,{alignSelf:"start",display:"flex",width:"fit-content",children:t.jsx(Je,{name:a.name,onClick:r,value:a.value,...o==null?void 0:o(a.name)})}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[n===void 0?void 0:t.jsx(ne,{alt:e??"card image",height:"32px",publicId:n,width:"32px"}),i===void 0?void 0:t.jsx(T,{icon:i,iconSize:"sm",iconType:"fa-light"}),t.jsx(z,{color:d.palette.gray[800],fontWeight:"bold",size:"sm",children:l})]})]})},le=s.dt.div`
|
|
1459
1459
|
${({theme:e})=>`
|
|
1460
1460
|
align-items: center;
|
|
1461
1461
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1467,7 +1467,7 @@
|
|
|
1467
1467
|
transition: 0.2s;
|
|
1468
1468
|
width: 36px;
|
|
1469
1469
|
`}
|
|
1470
|
-
`,
|
|
1470
|
+
`,ca=s.dt.div`
|
|
1471
1471
|
${({theme:e})=>`
|
|
1472
1472
|
background-color: ${e.palette.white};
|
|
1473
1473
|
border-radius: 50%;
|
|
@@ -1478,7 +1478,7 @@
|
|
|
1478
1478
|
width: ${e.spacing[1]};
|
|
1479
1479
|
z-index: 1;
|
|
1480
1480
|
`}
|
|
1481
|
-
`,
|
|
1481
|
+
`,da=s.dt.label`
|
|
1482
1482
|
display: inline-block;
|
|
1483
1483
|
|
|
1484
1484
|
input {
|
|
@@ -1505,22 +1505,22 @@
|
|
|
1505
1505
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1506
1506
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1507
1507
|
}
|
|
1508
|
-
`,Ot=f.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:a,name:r,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},p){const g=n===!0?"on":"off",
|
|
1508
|
+
`,Ot=f.forwardRef(function({defaultChecked:n,disabled:i=!1,justify:a,name:r,leftDescription:o,leftDescriptionMinWidth:l,rightDescription:c,...d},p){const g=n===!0?"on":"off",x=typeof o=="object"&&o.on&&o.off?o[g]:o,u=f.useCallback(h=>{h.stopPropagation()},[]);return t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:a,children:[t.jsx($,{minWidth:l,children:x}),t.jsxs(da,{onClick:u,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":i,"aria-label":r,checked:n===!0,disabled:i,name:r,ref:p,type:"checkbox"}),t.jsx(le,{"aria-label":"Toggle Switch",id:`${r}Toggle`,children:t.jsx(ca,{})})]}),c]})}),pa=({id:e,title:n,toggles:i,minWidth:a="auto",height:r="auto"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColor:o.palette.white,border:`1px solid ${o.palette.gray[200]}`,borderRadius:o.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:r,justify:"center",minHeight:"100px",minWidth:a,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Te,{id:e,title:n}),t.jsx($,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:i.map(l=>t.jsx(Ot,{...l},`$card-toggle-${l.name}`))})]})},ga=s.dt.div`
|
|
1509
1509
|
position: relative;
|
|
1510
1510
|
margin: auto;
|
|
1511
1511
|
overflow: hidden;
|
|
1512
|
-
`,
|
|
1512
|
+
`,ua=s.dt.div`
|
|
1513
1513
|
display: flex;
|
|
1514
1514
|
transition: transform 0.5s ease-in-out;
|
|
1515
1515
|
transform: translateX(
|
|
1516
1516
|
${({$currentIndex:e})=>-e*100}%
|
|
1517
1517
|
);
|
|
1518
|
-
`,
|
|
1518
|
+
`,xa=s.dt.div`
|
|
1519
1519
|
align-items: center;
|
|
1520
1520
|
display: flex;
|
|
1521
1521
|
justify-content: center;
|
|
1522
1522
|
min-width: 100%;
|
|
1523
|
-
`,
|
|
1523
|
+
`,fa=s.dt.button`
|
|
1524
1524
|
${({theme:e,$isActive:n})=>`
|
|
1525
1525
|
background-color: ${n?e.palette.primary[400]:e.palette.white};
|
|
1526
1526
|
border: none;
|
|
@@ -1529,13 +1529,13 @@
|
|
|
1529
1529
|
height: ${e.spacing[.75]};
|
|
1530
1530
|
width: ${e.spacing[.75]};
|
|
1531
1531
|
`}
|
|
1532
|
-
`,
|
|
1532
|
+
`,ha=s.dt.div`
|
|
1533
1533
|
align-items: center;
|
|
1534
1534
|
display: flex;
|
|
1535
1535
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1536
1536
|
justify-content: center;
|
|
1537
1537
|
margin-top: ${({theme:e})=>e.spacing[2]};
|
|
1538
|
-
`,
|
|
1538
|
+
`,ba=({slides:e,interval:n=300})=>{const{cycle:i,setCycle:a,setProgress:r}=Wt(n,e.length),o=f.useCallback(l=>()=>{a(l),r(0)},[a,r]);return t.jsxs(ga,{"aria-roledescription":"carousel",children:[t.jsx(ua,{$currentIndex:i,children:e.map((l,c)=>{const d=`slide-${c}`;return t.jsx(xa,{"aria-label":d,"aria-roledescription":"slide",children:l.content},d)})}),t.jsx(ha,{children:e.map((l,c)=>{const d=`nav-button-${c}`;return t.jsx(fa,{$isActive:c===i,"aria-label":`Go to slide ${c+1}`,"data-testid":c===i?"active":"inactive",onClick:o(c)},d)})})]})},Ht=s.dt.div`
|
|
1539
1539
|
${({theme:e})=>`
|
|
1540
1540
|
background-color: ${e.palette.gray[100]};
|
|
1541
1541
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1587,7 +1587,7 @@
|
|
|
1587
1587
|
padding-bottom: unset;
|
|
1588
1588
|
}
|
|
1589
1589
|
`}
|
|
1590
|
-
`,$
|
|
1590
|
+
`,$a=s.dt.div`
|
|
1591
1591
|
${({theme:e})=>`
|
|
1592
1592
|
align-items: end;
|
|
1593
1593
|
background-color: ${e.palette.gray[100]};
|
|
@@ -1605,10 +1605,10 @@
|
|
|
1605
1605
|
background-color: ${e.palette.gray[200]};
|
|
1606
1606
|
}
|
|
1607
1607
|
`}
|
|
1608
|
-
`,_t=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(f.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Ht,{"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})})})),
|
|
1608
|
+
`,_t=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(f.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Ht,{"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})})})),ya=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i,variant:a="normal"})=>{const r=s.nt(),[o,l]=f.useState(!1),[c,d]=f.useState(!0),p=f.useCallback(()=>{l(h=>!h)},[l]),g=f.useCallback(()=>{if(s._.isNil(n)||s._.isEmpty(n)||!s._.isString(n))return d(!1),e;const h=n.split(`
|
|
1609
1609
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1610
1610
|
`)}
|
|
1611
|
-
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),
|
|
1611
|
+
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),x=f.useMemo(g,[g]),u=f.useCallback(async()=>{await navigator.clipboard.writeText(x)},[x]);return a==="location"?t.jsx(_t,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs($,{bgColor:r.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Ht,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:x})})}),t.jsxs($a,{children:[t.jsx(M,{height:r.spacing[2.5],icon:"copy",iconColor:r.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:u,variant:"ghost",width:r.spacing[2.5]}),c?t.jsxs(A,{onClick:p,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(T,{icon:o?"chevron-up":"chevron-down",iconColor:r.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:u})]}):!1]})]})},{getVariant:ma}=K(e=>({fixed:`
|
|
1612
1612
|
height: auto;
|
|
1613
1613
|
min-width: 300px;
|
|
1614
1614
|
padding: ${e.spacing[1.25]};
|
|
@@ -1652,9 +1652,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1652
1652
|
margin: auto;
|
|
1653
1653
|
white-space: pre-line;
|
|
1654
1654
|
|
|
1655
|
-
${
|
|
1655
|
+
${ma(e,n)}
|
|
1656
1656
|
`}
|
|
1657
|
-
`,
|
|
1657
|
+
`,wa=s.dt.div`
|
|
1658
1658
|
${({theme:e})=>`
|
|
1659
1659
|
background-color: ${e.palette.white};
|
|
1660
1660
|
border-bottom: 1px solid ${e.palette.gray[200]};
|
|
@@ -1672,7 +1672,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1672
1672
|
padding: 0;
|
|
1673
1673
|
}
|
|
1674
1674
|
`}
|
|
1675
|
-
`,
|
|
1675
|
+
`,va=s.dt.div`
|
|
1676
1676
|
border-radius: ${({theme:e})=>`${e.spacing[.25]} ${e.spacing[.25]} 0 0`};
|
|
1677
1677
|
display: block;
|
|
1678
1678
|
overflow: unset;
|
|
@@ -1682,7 +1682,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1682
1682
|
padding: ${({theme:e})=>`${e.spacing[1.25]}`};
|
|
1683
1683
|
padding-bottom: ${({theme:e})=>`${e.spacing[1.5]}`};
|
|
1684
1684
|
position: sticky;
|
|
1685
|
-
`,
|
|
1685
|
+
`,ja=s.dt.div.attrs({className:"flex items-center justify-between"})``,ka=s.dt.div`
|
|
1686
1686
|
${({theme:e})=>`
|
|
1687
1687
|
border-radius: 0 0 ${e.spacing[.25]} ${e.spacing[.25]};
|
|
1688
1688
|
display: flex;
|
|
@@ -1713,7 +1713,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1713
1713
|
margin-right: 0;
|
|
1714
1714
|
}
|
|
1715
1715
|
`}
|
|
1716
|
-
`,
|
|
1716
|
+
`,Ca=s.dt.div`
|
|
1717
1717
|
img {
|
|
1718
1718
|
margin: 0 calc(-${({theme:e})=>e.spacing[1.25]} - 1px)
|
|
1719
1719
|
${({theme:e})=>e.spacing[1.25]};
|
|
@@ -1729,40 +1729,11 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1729
1729
|
margin-right: 0;
|
|
1730
1730
|
`:""}
|
|
1731
1731
|
}
|
|
1732
|
-
`,Ut=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:a=void 0})=>{const{close:r}=n,o=f.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=f.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]);return[i,a].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(
|
|
1733
|
-
${({theme:e})=>`
|
|
1734
|
-
align-items: center;
|
|
1735
|
-
color: ${e.palette.gray[500]};
|
|
1736
|
-
display: flex;
|
|
1737
|
-
gap: ${e.spacing[.625]};
|
|
1738
|
-
justify-content: center;
|
|
1739
|
-
padding: ${e.spacing[.75]};
|
|
1740
|
-
text-align: center;
|
|
1741
|
-
width: 151px;
|
|
1742
|
-
|
|
1743
|
-
&.active {
|
|
1744
|
-
color: ${e.palette.gray[800]};
|
|
1745
|
-
border-bottom: 3px solid ${e.palette.primary[400]};
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
&:hover {
|
|
1749
|
-
color: ${e.palette.gray[800]};
|
|
1750
|
-
}
|
|
1751
|
-
`}
|
|
1752
|
-
`,Ir=s.dt.div`
|
|
1753
|
-
${({theme:e})=>`
|
|
1754
|
-
align-items: center;
|
|
1755
|
-
border-bottom: 2px solid ${e.palette.gray[200]};
|
|
1756
|
-
display: flex;
|
|
1757
|
-
gap: ${e.spacing[3]};
|
|
1758
|
-
height: ${e.spacing[3]};
|
|
1759
|
-
width: max-content;
|
|
1760
|
-
`}
|
|
1761
|
-
`,Tr=(e,n,i)=>i?n==="secondary"?`3px solid ${e.palette.primary[100]}`:`3px solid ${e.palette.primary[500]}`:"unset",Fr=s.dt.div`
|
|
1732
|
+
`,Ut=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:a=void 0})=>{const{close:r}=n,o=f.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=f.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]);return[i,a].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(ka,{children:t.jsxs("div",{children:[a&&t.jsx(A,{id:a.id,onClick:o,variant:"tertiary",width:"100%",children:a.text}),i&&t.jsx(A,{id:i.id,onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},Gt=({title:e,description:n,modalRef:i,otherActions:a,onClose:r})=>{const o=s.nt(),l=f.useCallback(()=>{r==null||r(),i.close()},[i,r]);return f.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(va,{children:[t.jsxs(ja,{children:[typeof e=="string"?t.jsx(U,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",wordBreak:"break-word",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[a,t.jsx(M,{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(z,{mt:.5,size:"sm",children:n}):void 0,n&&!s.lodashExports.isString(n)&&t.jsx(pe,{display:"block",mt:.5,size:"sm",children:n})]})},Sa=({disabled:e,id:n="modal-confirm",onCancel:i,onConfirm:a="submit",txtCancel:r,txtConfirm:o})=>{const l=a==="submit";return t.jsxs($,{display:"flex",gap:.75,maxWidth:i?"392px":"190px",mt:1.5,children:[i?t.jsx(A,{id:`${n}-cancel`,justify:"center",onClick:i,variant:"tertiary",width:"100%",children:r??"Cancel"}):void 0,t.jsx(A,{disabled:e,id:n,justify:"center",onClick:l?void 0:a,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},za=(e,n,i)=>i?n==="secondary"?`3px solid ${e.palette.primary[100]}`:`3px solid ${e.palette.primary[500]}`:"unset",Ia=s.dt.div`
|
|
1762
1733
|
display: flex;
|
|
1763
1734
|
flex-direction: row;
|
|
1764
1735
|
gap: ${({theme:e})=>e.spacing[.25]};
|
|
1765
|
-
border-bottom: ${({theme:e,$borderButton:n,$variant:i})=>
|
|
1736
|
+
border-bottom: ${({theme:e,$borderButton:n,$variant:i})=>za(e,i,n)};
|
|
1766
1737
|
align-items: center;
|
|
1767
1738
|
padding: ${({theme:e})=>e.spacing[.625]}
|
|
1768
1739
|
${({theme:e})=>e.spacing[.5]};
|
|
@@ -1801,7 +1772,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1801
1772
|
}
|
|
1802
1773
|
}
|
|
1803
1774
|
}
|
|
1804
|
-
`,
|
|
1775
|
+
`,Ta=s.dt(ve)`
|
|
1805
1776
|
${({theme:e,$variant:n})=>`
|
|
1806
1777
|
align-items: center;
|
|
1807
1778
|
background: ${n==="error"?e.palette.primary[400]:e.palette.warning[500]};
|
|
@@ -1814,14 +1785,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1814
1785
|
width: ${e.spacing[.5]};
|
|
1815
1786
|
height: ${e.spacing[.5]};
|
|
1816
1787
|
`}
|
|
1817
|
-
`,
|
|
1788
|
+
`,Fa=s.dt.div`
|
|
1818
1789
|
align-items: center;
|
|
1819
1790
|
color: ${({theme:e})=>e.palette.white};
|
|
1820
1791
|
display: flex;
|
|
1821
1792
|
font-size: 6px;
|
|
1822
1793
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1823
1794
|
justify-content: center;
|
|
1824
|
-
`,Yt=f.forwardRef(function({numberIndicator:n,show:i,variant:a="error",...r},o){return t.jsx(
|
|
1795
|
+
`,Yt=f.forwardRef(function({numberIndicator:n,show:i,variant:a="error",...r},o){return t.jsx(Ta,{$variant:a,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...r,children:n&&t.jsx(Fa,{children:n<=9?n:9})})}),qt=({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}=Pe.useLocation(),x=a||(d==="primary"?g.includes(r):g.endsWith(r));return t.jsx(G,{display:"flex",id:`${i}-tooltip`,tip:c,children:t.jsxs(Ia,{$borderButton:x,$variant:d,children:[t.jsxs(Pe.NavLink,{end:e,id:i,onClick:l,to:r,children:[n,t.jsx(Yt,{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(Y,{tagLabel:`${p}`,variant:"default"})]})})},Qe=({items:e,borders:n=!0,box:i=!1,variant:a="primary"})=>{const r=s.nt();return t.jsx($,{alignItems:"center",bgColor:r.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:i?r.palette.gray[200]:void 0,borderRadius:i?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:p,notificationSign:g,onClick:x,tag:u,tooltip:h})=>t.jsx(qt,{end:o,id:l,isActive:c,label:p,link:d,notificationSign:g,onClick:x,tag:u,tooltip:h,variant:a},l))})},ae=f.forwardRef(function({color:n=I.palette.gray[100],mt:i=.5,mb:a=.5,width:r,...o},l){return t.jsx($,{as:"hr",borderTop:`1px solid ${n}`,mb:a,mt:i,ref:l,width:r??"100%",...o})}),Na=s.dt.li`
|
|
1825
1796
|
${({theme:e})=>`
|
|
1826
1797
|
align-items: center;
|
|
1827
1798
|
background-color: ${e.palette.white};
|
|
@@ -1879,7 +1850,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1879
1850
|
min-width: 240px;
|
|
1880
1851
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
1881
1852
|
`}
|
|
1882
|
-
`,ke=({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,...
|
|
1853
|
+
`,ke=({children:e,disabled:n=!1,icon:i,iconType:a="fa-light",href:r,onClick:o,onClickIcon:l,onKeyDown:c,rightIcon:d,selected:p=!1,value:g,...x})=>{const h=s.nt().palette.gray[n?300:800],b=n?f.Children.map(e,y=>f.isValidElement(y)?f.cloneElement(y,{disabled:n,...y.props}):y):e;return t.jsxs(Na,{"aria-disabled":n,"aria-label":g,"aria-selected":p,"data-testid":g,onClick:o,onKeyDown:c,value:g,...x,children:[i!==void 0||g!==void 0?t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[i?t.jsx(T,{disabled:n,icon:i,iconColor:h,iconSize:"xxs",iconType:a}):null,r===void 0?b:t.jsx(Z,{href:r,children:b})]}):null,p||d?t.jsx(T,{disabled:n,icon:d??"check",iconClass:"selected",iconColor:h,iconSize:"xs",iconType:a,onClick:l}):null]})},Ea=s.dt(ke)`
|
|
1883
1854
|
margin-top: 10px;
|
|
1884
1855
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
1885
1856
|
border-radius: 4px;
|
|
@@ -1897,7 +1868,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1897
1868
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1898
1869
|
background-color: unset;
|
|
1899
1870
|
}
|
|
1900
|
-
`,Xt=({items:e,onReorder:n,title:i,description:a,onClickClose:r})=>{const o=f.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($,{display:"flex",gap:.25,children:[t.jsx(U,{display:"flex",size:"xs",children:i}),t.jsx(Y,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(z,{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(
|
|
1871
|
+
`,Xt=({items:e,onReorder:n,title:i,description:a,onClickClose:r})=>{const o=f.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($,{display:"flex",gap:.25,children:[t.jsx(U,{display:"flex",size:"xs",children:i}),t.jsx(Y,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(z,{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(Ea,{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)]})},Da=s.dt(ke)`
|
|
1901
1872
|
padding: 7px 8px;
|
|
1902
1873
|
|
|
1903
1874
|
&[aria-selected="true"] {
|
|
@@ -1913,7 +1884,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1913
1884
|
display: none;
|
|
1914
1885
|
}
|
|
1915
1886
|
}
|
|
1916
|
-
`,Jt=({options:e,title:n,checkboxesName:i,defaultCollapsed:a,onChange:r})=>{const o=s.nt(),[l,c]=f.useState(a??!1),d=f.useCallback(()=>{c(p=>!p)},[]);return t.jsxs($,{"aria-label":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($,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:n}),t.jsx(T,{icon:l?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs"})]}),l?t.jsx($,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx($,{border:"1px solid",borderColor:o.palette.gray[300],borderRadius:"4px",px:.5,py:.5,children:t.jsx(
|
|
1887
|
+
`,Jt=({options:e,title:n,checkboxesName:i,defaultCollapsed:a,onChange:r})=>{const o=s.nt(),[l,c]=f.useState(a??!1),d=f.useCallback(()=>{c(p=>!p)},[]);return t.jsxs($,{"aria-label":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($,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",size:"sm",children:n}),t.jsx(T,{icon:l?"chevron-up":"chevron-down",iconColor:o.palette.gray[400],iconSize:"xs"})]}),l?t.jsx($,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx($,{border:"1px solid",borderColor:o.palette.gray[300],borderRadius:"4px",px:.5,py:.5,children:t.jsx(ie,{checked:p.visible,disabled:p.locked,label:p.name,name:`${i}-${p.name}`,onChange:r,value:p.name})},p.name))}):void 0]})},Zt=e=>e.reduce((i,a)=>a.group?i[a.group]?{...i,[a.group]:[...i[a.group],a]}:{...i,[a.group]:[a]}:i,{}),Ra=s.dt.input`
|
|
1917
1888
|
${({theme:e})=>`
|
|
1918
1889
|
background: none;
|
|
1919
1890
|
border: none !important;
|
|
@@ -1943,7 +1914,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1943
1914
|
display:none;
|
|
1944
1915
|
}
|
|
1945
1916
|
`}
|
|
1946
|
-
`,
|
|
1917
|
+
`,La=s.dt.div`
|
|
1947
1918
|
${({theme:e})=>`
|
|
1948
1919
|
align-items: center;
|
|
1949
1920
|
background-color: ${e.palette.white};
|
|
@@ -1963,17 +1934,17 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1963
1934
|
border: 2px solid ${e.palette.black};
|
|
1964
1935
|
}
|
|
1965
1936
|
`}
|
|
1966
|
-
`,
|
|
1937
|
+
`,Aa=s.dt.div`
|
|
1967
1938
|
${({theme:e})=>`
|
|
1968
1939
|
background-color: ${e.palette.white};
|
|
1969
1940
|
border-radius: ${e.spacing[.5]};
|
|
1970
1941
|
width: 250px;
|
|
1971
1942
|
`}
|
|
1972
|
-
`,ue=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:
|
|
1943
|
+
`,ue=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:x}=s.useFloating$1(),u=f.useCallback(()=>{p(y=>!y)},[]),h=f.useCallback(y=>{y.key==="Enter"&&y.preventDefault()},[]);te(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(La,{children:[t.jsx(T,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ra,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(M,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:a,px:.25,py:.25,type:"reset",variant:"ghost"})]});return i?t.jsxs(f.Fragment,{children:[t.jsx(M,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:u,ref:g.setReference,variant:"ghost"}),d?t.jsx(Aa,{ref:g.setFloating,style:x,children:b}):void 0]}):b}),Qt=({columns:e,formId:n,onChangeHandler:i,variant:a})=>{const r=f.useRef(null),[o,l]=f.useState([]),[c,d]=f.useState(""),p=f.useCallback(x=>{const{value:u}=x.target;d(u)},[]),g=f.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return f.useEffect(()=>{l(e.filter(x=>{var u;return a==="grouped"?x.name.toLowerCase().includes(c.toLowerCase())||((u=x.group)==null?void 0:u.includes(c.toLowerCase())):x.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,a]),a==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(ue,{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(Zt(o)).map(([x,u],h)=>{const b=`li-checkbox${x}`;return t.jsx(Jt,{checkboxesName:x,defaultCollapsed:h===0,onChange:i,options:u,title:x},b)})})]}):t.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(ue,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(x=>{const u=`li-checkbox-${x.name}`;return t.jsx(Da,{selected:x.visible,value:u,width:"content",children:t.jsx(ie,{checked:x.visible,disabled:x.locked,label:x.name,name:x.name,onChange:i,value:x.name})},u)})})]})},Pa=({_containerId:e="portals",title:n,modalRef:i,variant:a})=>{const r=s.nt(),o=f.useRef(null),[l,c]=f.useState(void 0),d=f.useCallback(x=>{const{checked:u,value:h}=x.target,b=i.columns.map(y=>{var w;return y.name===h?((w=y.toggleVisibility)==null||w.call(y,u),{...y,visible:u}):y});i.setColumns(b)},[i]),p=f.useCallback(x=>{const u=i.columns.map(h=>{var b;return h.id===x?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});i.setColumns(u)},[i]),g=f.useCallback(()=>{var u;const x=(u=o.current)==null?void 0:u.scrollHeight;l!==x&&c(x)},[l]);return i.isOpen?re.createPortal(t.jsx(Vt,{"aria-label":i.name,"aria-modal":"true",children:t.jsxs(Ze,{$size:"md",flexDirection:"column",children:[t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(U,{size:"sm",children:n}),t.jsx(M,{icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(ae,{mb:0,mt:0}),t.jsxs($,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:o,scroll:"y",width:"100%",children:[t.jsx(Qt,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:a}),t.jsx($,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Xt,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),t.jsx(ae,{mb:0,mt:0}),t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(A,{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(A,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Wa=s.dt(ke)`
|
|
1973
1944
|
padding: 8px;
|
|
1974
1945
|
min-height: 36px;
|
|
1975
1946
|
min-width: unset;
|
|
1976
|
-
`,
|
|
1947
|
+
`,Ba=s.dt.div.attrs({className:"comp-modal absolute top-[55px] overflow-auto"})`
|
|
1977
1948
|
align-items: center;
|
|
1978
1949
|
background-color: ${({$bgColor:e="rgb(52 64 84 / 70%)"})=>e};
|
|
1979
1950
|
display: flex;
|
|
@@ -1986,7 +1957,45 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1986
1957
|
svg.fa-check {
|
|
1987
1958
|
border-radius: 2px;
|
|
1988
1959
|
}
|
|
1989
|
-
`,en=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(ut,{value:g.value,width:"content",children:t.jsx(ne,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(g=>t.jsx(ut,{value:g.value,width:"content",children:t.jsx(Je,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(jt,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(De,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Pt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(Et,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:a,variant:"filters"});default:return t.jsx("div",{})}},tn=({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(en,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),nn=e=>{var c,d,p,g,u;const[n,i]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(x=>x.type==="checkboxes").flatMap(x=>{var h;return((h=x.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(x=>x.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:x})=>x))==null?void 0:p.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:g.minValue,maxValue:(u=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:u.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Hr=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},_r=(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}),_e=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=nn(e),p=e.some(x=>x.type==="checkboxes"&&x.hideSearch!==!0),g=f.useCallback(x=>{const{value:h}=x.target,b=_r(e,h);o(b)},[e,o]),u=f.useCallback(x=>{n&&n(x)},[n]);return f.useEffect(()=>{o(e),Hr(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(ue,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(u),children:[t.jsx(tn,{control:a,items:r,register:l,setValue:d}),t.jsx(A,{mt:1,type:"submit",children:"Apply"})]})]})},rn=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,u]=f.useState({}),[x,h]=f.useState(""),b=f.useCallback(m=>()=>{const v=l.find(j=>j.label===m),k=!(v!=null&&v.filterOptions.some(j=>j.type==="dateRange"||j.type==="select"));r==null||r(k??!0),h(m),p((v==null?void 0:v.filterOptions)??[])},[l,r]),y=f.useCallback(m=>{const v=[...m.checkbox,...Object.values(m.text??{}),...m.radio?[m.radio]:[],...m.minValue?[String(m.minValue)]:[],...m.maxValue?[String(m.maxValue)]:[]];u(C=>v.length>0?{...C,[x]:v}:C);const k=C=>{var S,L;return{...C,options:(S=C.options)==null?void 0:S.map(D=>({...D,checked:m.checkbox.includes(D.value)||m.radio===D.value})),value:["text","select"].includes(C.type)?((L=m.text)==null?void 0:L[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?m.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?m.maxValue:C.maxValue}},j=C=>C.label===x?{...C,filterOptions:C.filterOptions.map(k)}:C,F=l.map(j);c(C=>C.map(j));const E=F.flatMap(({filterOptions:C})=>C);i(E),p([])},[l,i,x]),w=f.useCallback((m,v)=>{const k=`li-filter-option-${m}`;return t.jsxs(Mr,{icon:v,onClick:b(m),style:{minWidth:"180px"},value:k,width:"100%",children:[m,g[m]===void 0?void 0:t.jsx(Y,{tagLabel:g[m].length.toString()})]},k)},[g,b]);return f.useEffect(()=>{const m=e.reduce((v,{label:k,filterOptions:j})=>{const F=j.flatMap(({value:S,minValue:L,maxValue:D})=>[L,D,S]).filter(Boolean),E=j.flatMap(({options:S})=>S??[]).filter(({checked:S=!1})=>S).map(({value:S})=>S),C=[...F,...E];return C.length===0?v:{...v,[k]:C}},{});u(m),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(_e,{id:"filters-options",onSubmit:y,options:d}):Object.entries(Zt(e)).map(([m,v])=>t.jsxs($,{children:[t.jsx(z,{color:o.palette.gray[400],mb:.25,size:"sm",children:m}),v.map(({label:k,icon:j="filter-list"})=>w(k,j))]},m))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(_e,{id:"filters-options",onSubmit:y,options:d}):e.map(({label:m,icon:v="filter-list"})=>w(m,v))})},an=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(M,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const u=x=>{const h=p.current;h&&!h.contains(x.target)&&i.close()};if(l)return document.addEventListener("mousedown",u,!0),()=>{document.removeEventListener("mousedown",u,!0)}},[p,l,i]),t.jsx(Or,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ze,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[r==="column"?g:void 0,t.jsx(rn,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Vr(e){if(e)return e}function on(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function Ur(e,n,i){const a=i??"",r=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(r)&&!s._.isUndefined(o))return`${r}${a} - ${o}${a}`;if(!s._.isUndefined(r))return`Min ${r}${a}`;if(!s._.isUndefined(o))return`Max ${o}${a}`}function Gr(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)&&s._.isUndefined(n))){if(e!==""&&n!==""&&!s._.isUndefined(e)&&!s._.isUndefined(n))return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!==""&&!s._.isUndefined(e))return`From ${s.dayjs(e).format("LL")}`;if(n!==""&&!s._.isUndefined(n))return`To ${s.dayjs(n).format("LL")}`}}function Yr(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ce=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(Y,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),qr=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=r;switch(c){case"numberRange":{const x=Ur(g,u,a.placeholder);return t.jsx(ce,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const x=Gr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ce,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=on(p);return t.jsx(ce,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Vr(d),h=Yr(c,a.label,o);return t.jsx(ce,{filter:r,filterValue:x,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Kr=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,x=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(x)&&s._.isUndefined(h)?!0:(x??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},xt=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Xr=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Jr=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,onReset:o,variant:l="ungrouped"})=>{const c=Re("filters-modal"),[d,p]=f.useState([]),[g,u]=f.useState(xt(d)),x=i.map(m=>({...m,filterOptions:m.filterOptions.map(v=>d.find(j=>j.key===v.key&&j.type===v.type&&j.filterFn===v.filterFn)??{...v})})),h=f.useCallback(m=>{p([...m]),localStorage.setItem(n,JSON.stringify(m))},[p,n]),b=f.useCallback(()=>{o&&o(),c.toggle()},[c,o]),y=f.useCallback(m=>()=>{o&&o();const v=d.map(k=>k.key===m.key&&k.type===m.type&&k.filterFn===m.filterFn?Xr(k):k);p(v),localStorage.setItem(n,JSON.stringify(v))},[d,n,o]);return f.useEffect(()=>{const m=localStorage.getItem(n),v=i.flatMap(j=>j.filterOptions),k=m?JSON.parse(m):v;v.flatMap(j=>j.value).filter(Boolean).length>0||v.flatMap(j=>j.options).filter(j=>(j==null?void 0:j.checked)===void 0).length>0?(p(v),localStorage.setItem(n,JSON.stringify(v))):p(k)},[n,i,p]),f.useEffect(()=>{a&&e!==void 0&&a(Kr(e,d)),u(xt(d)),r==null||r(d)},[e,d,a,u,r]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(A,{icon:"filter",id:"filterBtn",onClick:b,tag:g.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(an,{modalRef:c,onApplyFilters:h,options:x,variant:l})]}),options:x,removeFilter:y}},sn=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:x,id:h="modal-container"})=>{const b=s.nt(),y=t.jsx(Vt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ze,{$size:x,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Gt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Qe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(wr,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(Cr,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(z,{size:"sm",children:o.imageText})]}),t.jsx(Ut,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?re.createPortal(y,document.getElementById("portals")??document.body):c.isOpen?y:null},Zr=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Re("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(u=>{r.current=u})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(sn,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},Ve=({buttonProps:e,variant:n})=>t.jsx(A,{onClick:e.onClick,variant:n,children:e.text}),Qr=s.dt.div`
|
|
1960
|
+
`,en=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(ut,{value:g.value,width:"content",children:t.jsx(ie,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(g=>t.jsx(ut,{value:g.value,width:"content",children:t.jsx(Je,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(jt,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(De,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Pt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(Et,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:a,variant:"filters"});default:return t.jsx("div",{})}},tn=({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(en,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),nn=e=>{var c,d,p,g,x;const[n,i]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(u=>u.type==="checkboxes").flatMap(u=>{var h;return((h=u.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(u=>u.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:u})=>u))==null?void 0:p.value)??"",text:e.filter(u=>["text","select"].includes(u.type)).reduce((u,h)=>({...u,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(u=>["numberRange","dateRange"].includes(u.type)))==null?void 0:g.minValue,maxValue:(x=e.find(u=>["numberRange","dateRange"].includes(u.type)))==null?void 0:x.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Ma=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Oa=(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}),_e=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=nn(e),p=e.some(u=>u.type==="checkboxes"&&u.hideSearch!==!0),g=f.useCallback(u=>{const{value:h}=u.target,b=Oa(e,h);o(b)},[e,o]),x=f.useCallback(u=>{n&&n(u)},[n]);return f.useEffect(()=>{o(e),Ma(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(ue,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(x),children:[t.jsx(tn,{control:a,items:r,register:l,setValue:d}),t.jsx(A,{mt:1,type:"submit",children:"Apply"})]})]})},an=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,x]=f.useState({}),[u,h]=f.useState(""),b=f.useCallback(m=>()=>{const v=l.find(j=>j.label===m),k=!(v!=null&&v.filterOptions.some(j=>j.type==="dateRange"||j.type==="select"));r==null||r(k??!0),h(m),p((v==null?void 0:v.filterOptions)??[])},[l,r]),y=f.useCallback(m=>{const v=[...m.checkbox,...Object.values(m.text??{}),...m.radio?[m.radio]:[],...m.minValue?[String(m.minValue)]:[],...m.maxValue?[String(m.maxValue)]:[]];x(C=>v.length>0?{...C,[u]:v}:C);const k=C=>{var S,L;return{...C,options:(S=C.options)==null?void 0:S.map(E=>({...E,checked:m.checkbox.includes(E.value)||m.radio===E.value})),value:["text","select"].includes(C.type)?((L=m.text)==null?void 0:L[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?m.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?m.maxValue:C.maxValue}},j=C=>C.label===u?{...C,filterOptions:C.filterOptions.map(k)}:C,F=l.map(j);c(C=>C.map(j));const D=F.flatMap(({filterOptions:C})=>C);i(D),p([])},[l,i,u]),w=f.useCallback((m,v)=>{const k=`li-filter-option-${m}`;return t.jsxs(Wa,{icon:v,onClick:b(m),style:{minWidth:"180px"},value:k,width:"100%",children:[m,g[m]===void 0?void 0:t.jsx(Y,{tagLabel:g[m].length.toString()})]},k)},[g,b]);return f.useEffect(()=>{const m=e.reduce((v,{label:k,filterOptions:j})=>{const F=j.flatMap(({value:S,minValue:L,maxValue:E})=>[L,E,S]).filter(Boolean),D=j.flatMap(({options:S})=>S??[]).filter(({checked:S=!1})=>S).map(({value:S})=>S),C=[...F,...D];return C.length===0?v:{...v,[k]:C}},{});x(m),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(_e,{id:"filters-options",onSubmit:y,options:d}):Object.entries(Zt(e)).map(([m,v])=>t.jsxs($,{children:[t.jsx(z,{color:o.palette.gray[400],mb:.25,size:"sm",children:m}),v.map(({label:k,icon:j="filter-list"})=>w(k,j))]},m))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(_e,{id:"filters-options",onSubmit:y,options:d}):e.map(({label:m,icon:v="filter-list"})=>w(m,v))})},rn=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(M,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const x=u=>{const h=p.current;h&&!h.contains(u.target)&&i.close()};if(l)return document.addEventListener("mousedown",x,!0),()=>{document.removeEventListener("mousedown",x,!0)}},[p,l,i]),t.jsx(Ba,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ze,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[r==="column"?g:void 0,t.jsx(an,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Ha(e){if(e)return e}function on(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function _a(e,n,i){const a=i??"",r=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(r)&&!s._.isUndefined(o))return`${r}${a} - ${o}${a}`;if(!s._.isUndefined(r))return`Min ${r}${a}`;if(!s._.isUndefined(o))return`Max ${o}${a}`}function Va(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)&&s._.isUndefined(n))){if(e!==""&&n!==""&&!s._.isUndefined(e)&&!s._.isUndefined(n))return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!==""&&!s._.isUndefined(e))return`From ${s.dayjs(e).format("LL")}`;if(n!==""&&!s._.isUndefined(n))return`To ${s.dayjs(n).format("LL")}`}}function Ua(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ce=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(Y,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),Ga=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:x}=r;switch(c){case"numberRange":{const u=_a(g,x,a.placeholder);return t.jsx(ce,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const u=Va(g==null?void 0:g.toString(),x==null?void 0:x.toString());return t.jsx(ce,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const u=on(p);return t.jsx(ce,{filter:r,filterValue:u,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const u=Ha(d),h=Ua(c,a.label,o);return t.jsx(ce,{filter:r,filterValue:u,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Ya=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:x}=c,u=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(x)&&typeof x!="number"?void 0:d(String(x));return s._.isUndefined(u)&&s._.isUndefined(h)?!0:(u??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},xt=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,qa=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Ka=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,onReset:o,variant:l="ungrouped"})=>{const c=Re("filters-modal"),[d,p]=f.useState([]),[g,x]=f.useState(xt(d)),u=i.map(m=>({...m,filterOptions:m.filterOptions.map(v=>d.find(j=>j.key===v.key&&j.type===v.type&&j.filterFn===v.filterFn)??{...v})})),h=f.useCallback(m=>{p([...m]),localStorage.setItem(n,JSON.stringify(m))},[p,n]),b=f.useCallback(()=>{o&&o(),c.toggle()},[c,o]),y=f.useCallback(m=>()=>{o&&o();const v=d.map(k=>k.key===m.key&&k.type===m.type&&k.filterFn===m.filterFn?qa(k):k);p(v),localStorage.setItem(n,JSON.stringify(v))},[d,n,o]);return f.useEffect(()=>{const m=localStorage.getItem(n),v=i.flatMap(j=>j.filterOptions),k=m?JSON.parse(m):v;v.flatMap(j=>j.value).filter(Boolean).length>0||v.flatMap(j=>j.options).filter(j=>(j==null?void 0:j.checked)===void 0).length>0?(p(v),localStorage.setItem(n,JSON.stringify(v))):p(k)},[n,i,p]),f.useEffect(()=>{a&&e!==void 0&&a(Ya(e,d)),x(xt(d)),r==null||r(d)},[e,d,a,x,r]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(A,{icon:"filter",id:"filterBtn",onClick:b,tag:g.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(rn,{modalRef:c,onApplyFilters:h,options:u,variant:l})]}),options:u,removeFilter:y}},sn=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:x=void 0,size:u,id:h="modal-container"})=>{const b=s.nt(),y=t.jsx(Vt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ze,{$size:u,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(x)&&!s._.isNil(x)&&t.jsx(Gt,{description:l,modalRef:c,onClose:p,otherActions:d,title:x}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Qe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(wa,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(Ca,{$framed:o.imageFramed,children:t.jsx(ne,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(z,{size:"sm",children:o.imageText})]}),t.jsx(Ut,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?re.createPortal(y,document.getElementById("portals")??document.body):c.isOpen?y:null},Xa=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Re("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(x=>{r.current=x})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:x})=>t.jsxs(sn,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,x]}),confirm:l}},Ja=s.dt.ul`
|
|
1961
|
+
${({theme:e})=>`
|
|
1962
|
+
align-items: flex-start;
|
|
1963
|
+
border-radius: ${e.spacing[.25]};
|
|
1964
|
+
border: 1px solid ${e.palette.gray[200]};
|
|
1965
|
+
background: ${e.palette.white};
|
|
1966
|
+
box-shadow: ${e.shadows.md};
|
|
1967
|
+
display: flex;
|
|
1968
|
+
flex-direction: column;
|
|
1969
|
+
padding: ${e.spacing[.25]} 0;
|
|
1970
|
+
width: 166px;
|
|
1971
|
+
`}
|
|
1972
|
+
`,Za=s.dt.li`
|
|
1973
|
+
${({theme:e})=>`
|
|
1974
|
+
align-items: center;
|
|
1975
|
+
background: ${e.palette.white}
|
|
1976
|
+
color: ${e.palette.gray[800]};
|
|
1977
|
+
cursor: pointer;
|
|
1978
|
+
display: flex;
|
|
1979
|
+
font-family: ${e.typography.type.primary};
|
|
1980
|
+
font-size: ${e.typography.text.sm};
|
|
1981
|
+
font-style: normal;
|
|
1982
|
+
font-weight: ${e.typography.weight.regular};
|
|
1983
|
+
gap: ${e.spacing[.5]};
|
|
1984
|
+
line-height: ${e.spacing[1.25]};
|
|
1985
|
+
padding: ${e.spacing[.25]} ${e.spacing[1]};
|
|
1986
|
+
width: 100%;
|
|
1987
|
+
|
|
1988
|
+
&:hover:not([aria-disabled="true"]) {
|
|
1989
|
+
background: ${e.palette.gray[100]};
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
&[aria-disabled="true"] {
|
|
1993
|
+
background: ${e.palette.gray[100]};
|
|
1994
|
+
color: ${e.palette.gray[500]};
|
|
1995
|
+
cursor: not-allowed;
|
|
1996
|
+
}
|
|
1997
|
+
`}
|
|
1998
|
+
`,Qa=({icon:e,iconColor:n,showChevron:i,options:a,title:r})=>{const o=s.nt(),[l,c]=f.useState(!1),d=l?"chevron-up":"chevron-down",{refs:p,floatingStyles:g}=s.useFloating({middleware:[s.offset({mainAxis:4})],placement:"bottom-start"}),x=f.useCallback(()=>{c(u=>!u)},[]);return te(p.floating.current,()=>{c(!1)},!0,document.getElementById("dropdown-toggle")),t.jsxs(f.Fragment,{children:[t.jsx(A,{icon:e,iconColor:n,iconType:"fa-solid",id:"dropdown-toggle",onClick:x,ref:p.setReference,rightIcon:i?d:void 0,variant:"ghost",children:r}),l?t.jsx(Ja,{ref:p.setFloating,style:g,children:a.map(u=>{const h=({})=>{u.onClick(),c(!1)};return t.jsxs(Za,{"aria-disabled":u.disabled,onClick:u.disabled?void 0:h,children:[t.jsx(T,{icon:u.icon,iconColor:u.iconColor??o.palette.gray[300],iconSize:"xxs",iconType:"fa-light"}),u.label]},u.label)})}):void 0]})},Ve=({buttonProps:e,variant:n})=>t.jsx(A,{onClick:e.onClick,variant:n,children:e.text}),er=s.dt.div`
|
|
1990
1999
|
display: flex;
|
|
1991
2000
|
flex-direction: column;
|
|
1992
2001
|
align-items: center;
|
|
@@ -1994,7 +2003,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1994
2003
|
max-width: 900px;
|
|
1995
2004
|
white-space: pre-line;
|
|
1996
2005
|
margin: 0 auto;
|
|
1997
|
-
`,
|
|
2006
|
+
`,tr=s.dt.div`
|
|
1998
2007
|
display: flex;
|
|
1999
2008
|
flex-direction: row;
|
|
2000
2009
|
justify-content: center;
|
|
@@ -2007,7 +2016,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2007
2016
|
> img {
|
|
2008
2017
|
width: 100%;
|
|
2009
2018
|
}
|
|
2010
|
-
`,
|
|
2019
|
+
`,nr=s.dt.div`
|
|
2011
2020
|
display: flex;
|
|
2012
2021
|
flex-direction: row;
|
|
2013
2022
|
margin: 0;
|
|
@@ -2020,7 +2029,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2020
2029
|
> *:last-child {
|
|
2021
2030
|
margin-right: 0;
|
|
2022
2031
|
}
|
|
2023
|
-
`,ft={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},
|
|
2032
|
+
`,ft={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},ir=({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(er,{$padding:r,children:[t.jsx(tr,{children:t.jsx(ne,{alt:"empty-icon",publicId:a})}),t.jsx(U,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:ft[l].title,textAlign:"center",children:o}),t.jsx(z,{mb:c?2:void 0,size:ft[l].description,textAlign:"center",children:i}),c?t.jsxs(nr,{children:[e&&t.jsx(Ve,{buttonProps:e,variant:"tertiary"}),n&&t.jsx(Ve,{buttonProps:n,variant:"primary"})]}):void 0]})},ar=({children:e})=>{const n=s.useFormContext();return e({...n})},rr=s.dt.form`
|
|
2024
2033
|
${({theme:e})=>`
|
|
2025
2034
|
align-items: flex-start;
|
|
2026
2035
|
align-self: stretch;
|
|
@@ -2030,7 +2039,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2030
2039
|
overflow: hidden auto;
|
|
2031
2040
|
width: 100%;
|
|
2032
2041
|
`}
|
|
2033
|
-
`,
|
|
2042
|
+
`,or=({alert:e,buttonAlignment:n,cancelButton:i,children:a,confirmButton:r,defaultDisabled:o=!0,id:l="modal-confirm",maxButtonWidth:c="392px",mode:d,onSubmit:p,showButtons:g=!0,yupSchema:x,...u})=>{const h=s.nt(),b=s.useForm({...u,mode:d??"all",resolver:x?s.o(x):void 0});return t.jsx(s.FormProvider,{...b,children:t.jsx(rr,{onSubmit:b.handleSubmit(p),children:t.jsxs($,{scroll:"y",width:"100%",children:[t.jsx($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:e?"calc(100% - 139px)":"calc(100% - 83px)",pb:1.5,pt:0,px:1.5,scroll:"y",children:a}),g&&t.jsxs($,{borderRadius:`0 0 ${h.spacing[.25]} ${h.spacing[.25]}`,borderTop:`1px solid ${h.palette.gray[200]}`,display:"flex",flexDirection:n?"unset":"column",gap:.625,justify:n??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,maxWidth:c,children:[i?t.jsx(A,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,t.jsx(A,{disabled:((r==null?void 0:r.disabled)??!1)||b.formState.isSubmitting||o&&!b.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},sr=s.dt(ve)`
|
|
2034
2043
|
display: grid;
|
|
2035
2044
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2036
2045
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
@@ -2048,7 +2057,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2048
2057
|
grid-template-columns: repeat(${n}, 1fr);
|
|
2049
2058
|
}
|
|
2050
2059
|
`}
|
|
2051
|
-
`,
|
|
2060
|
+
`,lr=f.forwardRef(function({children:n,md:i,sm:a,lg:r,xl:o,gap:l,...c},d){return t.jsx(sr,{$gap:l,$lg:r,$md:i,$sm:a,$xl:o,ref:d,...c,children:n})}),cr=s.dt.div`
|
|
2052
2061
|
${({theme:e,$itemsLength:n})=>`
|
|
2053
2062
|
display: flex;
|
|
2054
2063
|
background-color: ${e.palette.white};
|
|
@@ -2084,7 +2093,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2084
2093
|
background-color: ${e.palette.gray[100]};
|
|
2085
2094
|
}
|
|
2086
2095
|
`}
|
|
2087
|
-
`,ln=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(et,{$isSelected:e,onClick:r,children:[e?t.jsx(T,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},
|
|
2096
|
+
`,ln=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(et,{$isSelected:e,onClick:r,children:[e?t.jsx(T,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},dr=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=f.useState(n),[x,u]=f.useState(""),h=f.useCallback(w=>{g(m=>m.filter(v=>String(v.name).toLowerCase().includes(w.toLocaleLowerCase())))},[g]),b=f.useCallback(w=>{w.currentTarget&&(u(w.currentTarget.value),h(w.currentTarget.value))},[u,h]);f.useEffect(()=>{g(n),h(x)},[n,h,x]);const y=t.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(cr,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(z,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(M,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(ue,{onInput:b,placeholder:"Search"})}),t.jsx(ae,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(et,{onClick:i,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(T,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(z,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(w=>t.jsx(ln,{isSelected:o.toLowerCase()===w.name,label:w.name.charAt(0).toUpperCase()+w.name.slice(1),onSelect:a},w.name))]})]})})});return e?re.createPortal(y,document.body):t.jsx("div",{})},pr=({description:e,height:n="auto",leftIconName:i,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const x=s.nt(),u=p==="centered",h=l&&t.jsx(G,{icon:r??i,iconColor:x.palette.gray[800],id:l,place:d,tip:c});return t.jsxs($,{alignItems:u?"center":"flex-start",bgColor:x.palette.gray[50],border:`1px solid ${x.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:u?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[u||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(z,{color:u?x.palette.gray[800]:x.palette.gray[400],size:"md",textAlign:u?"center":"start",children:e}),u||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[u&&!s.lodashExports.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(U,{fontWeight:"bold",size:"md",children:o}),a]}),u&&!s.lodashExports.isUndefined(r)?h:void 0]})]})},gr=({actions:e,children:n,header:i,title:a,tabs:r,footer:o})=>{const l=s.nt();return t.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(z,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:a}),i]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(M,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx($,{display:"flex",pt:.25,width:"100%",children:t.jsx(Qe,{items:r})}),t.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},g)=>t.jsx(A,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},ur=s.dt.span`
|
|
2088
2097
|
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2089
2098
|
background-color: ${n};
|
|
2090
2099
|
border-radius: 5px;
|
|
@@ -2093,14 +2102,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2093
2102
|
padding: ${e.spacing[.125]} ${e.spacing[.25]} ${e.spacing[.125]} ${e.spacing[.25]};
|
|
2094
2103
|
text-decoration: ${i}
|
|
2095
2104
|
`}
|
|
2096
|
-
`,
|
|
2105
|
+
`,xr=({bgColor:e,children:n,txtDecoration:i,ml:a=1})=>t.jsx(ur,{$bgColor:e,$txtDecoration:i,className:`ml-${a}`,children:n}),fr={lg:"56",md:"30",sm:"12"},{getVariant:hr}=K(e=>({red:`stroke: ${e.palette.primary[500]};`,white:`stroke: ${e.palette.white};`})),br=s.mt`
|
|
2097
2106
|
0% {
|
|
2098
2107
|
transform: rotateZ(0deg);
|
|
2099
2108
|
}
|
|
2100
2109
|
100% {
|
|
2101
2110
|
transform: rotateZ(360deg)
|
|
2102
2111
|
}
|
|
2103
|
-
|
|
2112
|
+
`,$r=s.mt`
|
|
2104
2113
|
0%,
|
|
2105
2114
|
25% {
|
|
2106
2115
|
stroke-dashoffset: 280;
|
|
@@ -2117,16 +2126,16 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2117
2126
|
stroke-dashoffset: 280;
|
|
2118
2127
|
transform: rotate(360deg);
|
|
2119
2128
|
}
|
|
2120
|
-
|
|
2129
|
+
`,yr=s.dt.svg`
|
|
2121
2130
|
${({$size:e="md"})=>s.lt`
|
|
2122
|
-
animation: ${
|
|
2131
|
+
animation: ${br} 2s linear infinite;
|
|
2123
2132
|
animation-timing-function: linear;
|
|
2124
2133
|
display: inline-block;
|
|
2125
|
-
width: ${
|
|
2134
|
+
width: ${fr[e]}px;
|
|
2126
2135
|
`}
|
|
2127
|
-
`,
|
|
2136
|
+
`,mr=s.dt.circle`
|
|
2128
2137
|
${({theme:e,$color:n="red"})=>s.lt`
|
|
2129
|
-
animation: 1.4s ease-in-out infinite both ${
|
|
2138
|
+
animation: 1.4s ease-in-out infinite both ${$r};
|
|
2130
2139
|
display: block;
|
|
2131
2140
|
fill: transparent;
|
|
2132
2141
|
stroke-linecap: round;
|
|
@@ -2135,9 +2144,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2135
2144
|
stroke-width: 10px;
|
|
2136
2145
|
transform-origin: 50% 50%;
|
|
2137
2146
|
|
|
2138
|
-
${
|
|
2147
|
+
${hr(e,n)}
|
|
2139
2148
|
`}
|
|
2140
|
-
`,
|
|
2149
|
+
`,wr=s.dt.circle`
|
|
2141
2150
|
display: block;
|
|
2142
2151
|
fill: transparent;
|
|
2143
2152
|
stroke: ${({theme:e})=>e.palette.gray[200]};
|
|
@@ -2145,12 +2154,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2145
2154
|
stroke-width: 10px;
|
|
2146
2155
|
transform-origin: 50% 50%;
|
|
2147
2156
|
opacity: ${({$color:e})=>e==="white"?"20%":"unset"};
|
|
2148
|
-
`,
|
|
2157
|
+
`,vr=({color:e="red",label:n,size:i})=>{const a=s.nt();return t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsxs(yr,{$size:i,viewBox:"0 0 100 100",children:[t.jsx(wr,{$color:e,cx:"50",cy:"50",r:"45"}),t.jsx(mr,{$color:e,cx:"50",cy:"50",r:"45"})]}),n&&t.jsx(z,{color:e==="red"?a.palette.gray[700]:a.palette.white,ml:.5,size:"sm",children:n})]})},jr={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},kr=({publicId:e,variant:n})=>t.jsx($,{...jr[n],children:t.jsx(ne,{alt:"logo",publicId:e})}),Cr=s.dt(s.Lottie).attrs(({autoplay:e=!0})=>({autoplay:e,className:"comp-lottie"}))`
|
|
2149
2158
|
${({$size:e=16})=>`
|
|
2150
2159
|
height: ${e}px;
|
|
2151
2160
|
width: ${e}px;
|
|
2152
2161
|
`}
|
|
2153
|
-
`,
|
|
2162
|
+
`,Sr=e=>{const{size:n}=e;return t.jsx(Cr,{$size:n,...e})},zr=({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 te(a,()=>{o(!1)}),t.jsxs(Kt,{children:[t.jsx("li",{className:"user-info",children:t.jsxs($,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(z,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(z,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(z,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx($,{children:t.jsx(Y,{tagLabel:g,variant:"role"})})]})}),t.jsx(ae,{}),e,t.jsx(ae,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Z,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${n}`,iconPosition:"hidden",children:t.jsx(z,{color:l.palette.gray[400],size:"xs",children:`commit : ${i}`})})})]})},Ir=s.dt.button`
|
|
2154
2163
|
align-items: center;
|
|
2155
2164
|
background-color: transparent;
|
|
2156
2165
|
border: unset;
|
|
@@ -2167,7 +2176,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2167
2176
|
&:hover span {
|
|
2168
2177
|
color: ${I.palette.primary[200]};
|
|
2169
2178
|
}
|
|
2170
|
-
`,
|
|
2179
|
+
`,Tr=({message:e,onClickButton:n,buttonText:i,buttonFontWeight:a="regular",icon:r,onClose:o,buttonSide:l="end"})=>{const c=s.nt(),[d,p]=f.useState(!0),g=f.useCallback(()=>{p(!1),o==null||o()},[o]),x=t.jsxs(Ir,{onClick:n,children:[t.jsx(z,{color:c.palette.white,fontWeight:a,size:"sm",textDecoration:"underline",children:i}),t.jsx(T,{icon:r??"arrow-right",iconColor:c.palette.white,iconSize:"xs",iconType:a==="bold"?"fa-regular":"fa-light"})]});return t.jsxs($,{alignItems:"center",bgGradient:c.palette.gradients["01"],display:d?"flex":"none",id:"message-banner",justify:"space-between",padding:[.75,.75,.75,.75],children:[t.jsxs($,{display:"flex",gap:.5,justify:"center",width:"100%",children:[l==="start"&&n?x:void 0,t.jsx($,{children:typeof e=="string"?t.jsx(z,{color:c.palette.white,display:"inline",size:"sm",children:e}):e}),l==="end"&&n?x:void 0]}),t.jsx(T,{clickable:!0,hoverColor:c.palette.primary[200],icon:"close",iconColor:c.palette.white,iconSize:"xs",iconType:"fa-light",onClick:g})]})},Fr=s.dt.div`
|
|
2171
2180
|
${({theme:e,$variant:n})=>`
|
|
2172
2181
|
background: ${e.palette.white};
|
|
2173
2182
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2186,7 +2195,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2186
2195
|
right: 16px;
|
|
2187
2196
|
}
|
|
2188
2197
|
`}
|
|
2189
|
-
`,
|
|
2198
|
+
`,Nr=s.dt.div`
|
|
2190
2199
|
${({theme:e,$variant:n})=>`
|
|
2191
2200
|
height: ${e.spacing[2.5]};
|
|
2192
2201
|
width: ${e.spacing[2.5]};
|
|
@@ -2217,7 +2226,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2217
2226
|
color: ${e.palette[n][500]};
|
|
2218
2227
|
}
|
|
2219
2228
|
`}
|
|
2220
|
-
`,
|
|
2229
|
+
`,Er=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",Dr=({description:e,onClose:n,title:i,variant:a})=>{const r=s.nt(),o=f.useCallback(()=>{n==null||n()},[n]);return t.jsxs(Fr,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(Nr,{$variant:a,children:[t.jsx(T,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(T,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(T,{icon:Er(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(U,{fontWeight:"bold",size:"xs",children:i}),t.jsx(z,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(M,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Rr=s.dt.div`
|
|
2221
2230
|
width: fit-content;
|
|
2222
2231
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2223
2232
|
border-radius: 4px;
|
|
@@ -2230,7 +2239,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2230
2239
|
align-items: center;
|
|
2231
2240
|
justify-content: center;
|
|
2232
2241
|
padding: 0.5em;
|
|
2233
|
-
`,
|
|
2242
|
+
`,Lr=s.dt.input`
|
|
2234
2243
|
width: 4em;
|
|
2235
2244
|
appearance: textfield;
|
|
2236
2245
|
border-style: none;
|
|
@@ -2250,7 +2259,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2250
2259
|
&::-webkit-inner-spin-button {
|
|
2251
2260
|
opacity: 1;
|
|
2252
2261
|
}
|
|
2253
|
-
`,
|
|
2262
|
+
`,Ar=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const x=i<0?0:i,[u,h]=f.useState(Number(a).toFixed(x)),b=f.useCallback(m=>{const v=s.lodashExports.toNumber(m.target.value);m.target.value.endsWith(".")?h(m.target.value):v>=Number(o)&&v<=Number(r)&&(h(String(v)),n&&c(s.lodashExports.toNumber(v.toFixed(x)))),m.stopPropagation()},[n,x,r,o,c]),y=f.useCallback(m=>{m.currentTarget.contains(m.relatedTarget)||h(Number(a).toFixed(x)),m.stopPropagation()},[x,a]),w=f.useCallback(m=>{m.stopPropagation(),m.key==="Enter"&&!s.lodashExports.isEmpty(m.currentTarget.value)&&c(s.lodashExports.toNumber(m.currentTarget.value))},[c]);return t.jsx(Rr,{onBlur:y,tabIndex:-1,children:t.jsx(G,{id:"numberInputTooltip",tip:d,children:t.jsx(Lr,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(u),max:r,min:o,name:l,onChange:b,onKeyUp:w,ref:g,step:10**-x,type:"number",value:u})})})}),Pr={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},Ue=({icon:e,label:n,onClick:i,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(ne,{alt:`${r} Logo`,height:"100%",publicId:Pr[r],width:"100%"}):t.jsx(T,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(z,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:n??r})})]})},Wr=({align:e="end",buttonLabel:n="Add Credential",children:i,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=f.useState(!1),p=f.useRef(null);te(p.current,()=>{d(!1)},!0);const g=f.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),x=f.useCallback(()=>{d(h=>!h)},[d]),u=f.useCallback(h=>b=>{var y;(y=o[h])==null||y.onClick(b),d(!1)},[o]);return t.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(A,{icon:"plus",onClick:x,variant:"primary",children:n}),t.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:a,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(Ue,{onClick:u(h),provider:h},h)),r===void 0?void 0:t.jsx(Ue,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),i]})]})},Br=s.dt.div`
|
|
2254
2263
|
${({theme:e})=>`
|
|
2255
2264
|
height: ${e.spacing[1]};
|
|
2256
2265
|
width: ${e.spacing[1]};
|
|
@@ -2281,7 +2290,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2281
2290
|
font-size: ${e.spacing[.5]};
|
|
2282
2291
|
}
|
|
2283
2292
|
`}
|
|
2284
|
-
`,cn=({margin:e,onClick:n,text:i})=>{const a=s.nt(),r=t.jsxs(
|
|
2293
|
+
`,cn=({margin:e,onClick:n,text:i})=>{const a=s.nt(),r=t.jsxs(Br,{children:[t.jsx(T,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(T,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(T,{icon:"crown",iconClass:"icon",iconSize:"xs"})]});return i!==void 0?t.jsx($,{cursor:"pointer",display:"inline-block",mr:e,onClick:n,children:t.jsxs($,{alignItems:"center",bgColor:a.palette.warning[50],borderRadius:"4px",display:"flex",padding:[.25,.25,.25,.25],width:"fit-content",children:[r,t.jsx(z,{color:a.palette.warning[500],display:"inline",ml:.25,size:"xs",children:i})]})}):t.jsx($,{display:"inline-block",mr:e,onClick:n,children:r})},Mr=({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($,{alignItems:"center",display:"inline-flex",gap:.25,children:[t.jsx(T,{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(z,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:e+"%"})]})},{getVariant:Or}=K(e=>({compliance:`
|
|
2285
2294
|
display: inline-flex;
|
|
2286
2295
|
|
|
2287
2296
|
&.horizontal {
|
|
@@ -2339,17 +2348,17 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2339
2348
|
.progress-bar {
|
|
2340
2349
|
background-color: ${e.palette.primary[500]};
|
|
2341
2350
|
}
|
|
2342
|
-
`})),
|
|
2351
|
+
`})),Hr=(e,n)=>n<50?e.palette.error[500]:n<80?e.palette.warning[500]:e.palette.success[500],_r=s.dt.div`
|
|
2343
2352
|
${({theme:e,$minWidth:n,$orientation:i,$rounded:a,$variant:r})=>`
|
|
2344
2353
|
background-color: ${e.palette.gray[100]};
|
|
2345
2354
|
border-radius: ${a?"100px":"unset"};
|
|
2346
2355
|
${i==="horizontal"?"min-width":"min-height"}: ${n}px;
|
|
2347
2356
|
${i==="horizontal"?"":"height: 100%;"}
|
|
2348
2357
|
|
|
2349
|
-
${
|
|
2358
|
+
${Or(e,r)}
|
|
2350
2359
|
|
|
2351
2360
|
`}
|
|
2352
|
-
`,
|
|
2361
|
+
`,Vr=s.dt.div`
|
|
2353
2362
|
${({theme:e,$percentage:n,$rounded:i,$variant:a})=>`
|
|
2354
2363
|
display: inline-flex;
|
|
2355
2364
|
width: ${n}%;
|
|
@@ -2359,14 +2368,14 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2359
2368
|
border-radius: ${i?"100px":"unset"};
|
|
2360
2369
|
border-end-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2361
2370
|
border-start-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2362
|
-
background-color: ${a==="compliance"?
|
|
2371
|
+
background-color: ${a==="compliance"?Hr(e,n):"inherit"};
|
|
2363
2372
|
`}
|
|
2364
|
-
`,
|
|
2373
|
+
`,Ur=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:a=!1,orientation:r="horizontal",rounded:o=!0,variant:l="default"})=>{const c=a&&i==="left",d=a?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(z,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(_r,{$minWidth:e,$orientation:r,$rounded:o,$variant:l,className:r,children:t.jsx(Vr,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},dn=({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(z,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(f.Fragment,{children:[t.jsx(pe,{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(pe,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(z,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Gr=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:x})=>{const u=s.nt(),{alt:h,src:b,width:y="77px",height:w="77px"}=d,m=f.useCallback(()=>{n==null||n.onClick()},[n]),v=f.useCallback(()=>{r==null||r.onClick()},[r]),k=t.jsx($,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs($,{bgColor:u.palette.white,border:`1px solid ${u.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,pb:2.5,pl:2.5,pr:2.5,pt:2.5,shadow:"lg",width:"100%",zIndex:11,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx($,{children:t.jsx(ne,{alt:h,height:w,publicId:b,width:y})}),t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(U,{color:x,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(dn,{description:l,highlightDescription:c})]})]}),a&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:a})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(r)?t.jsx(A,{onClick:v,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,s.lodashExports.isObject(n)?t.jsx(A,{onClick:m,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?re.createPortal(k,o??document.body):k},Yr=s.dt.div.attrs({className:"comp-scroll-up"})`
|
|
2365
2374
|
bottom: 15px;
|
|
2366
2375
|
position: fixed;
|
|
2367
2376
|
right: 140px;
|
|
2368
2377
|
z-index: 100;
|
|
2369
|
-
`,
|
|
2378
|
+
`,qr=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,a]=f.useState(!1),[r,o]=f.useState(null);f.useEffect(()=>{o(document.getElementById(e)),r==null||r.addEventListener("scroll",()=>{a(r.scrollTop>n)})},[r,e,n]);const l=f.useCallback(()=>{r==null||r.scrollTo({behavior:"smooth",top:0})},[r]);return i?t.jsx(Yr,{children:t.jsx(M,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},Kr={critical:{bgColor:I.palette.primary[700],colorL:I.palette.gray[800],colorR:I.palette.white},disable:{bgColor:I.palette.gray[200],colorL:I.palette.gray[400],colorR:I.palette.gray[400]},high:{bgColor:I.palette.error[500],colorL:I.palette.gray[800],colorR:I.palette.white},low:{bgColor:I.palette.warning[200],colorL:I.palette.gray[800],colorR:I.palette.gray[800]},medium:{bgColor:I.palette.warning[500],colorL:I.palette.gray[800],colorR:I.palette.gray[800]}},Xr=({textL:e,textR:n,variant:i})=>{const a=s.nt(),{bgColor:r,colorL:o,colorR:l}=Kr[i];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${r}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(z,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:r,border:`1px solid ${r}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(z,{color:l,size:"xs",children:n})})]})},Jr=(e,n)=>{const i={critical:I.palette.primary[700],high:I.palette.error[500],low:I.palette.warning[200],medium:I.palette.warning[500],none:I.palette.gray[200]},a={disabled:I.palette.gray[400],enabled:I.palette.gray[800]},r={critical:I.palette.white,high:I.palette.white,low:I.palette.gray[800],medium:I.palette.gray[800],none:I.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}},de=({variant:e,value:n})=>{const{iconColor:i,iconText:a,iconTextColor:r,textColor:o}=Jr(e,n),l=s.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(G,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(z,{color:r,size:"sm",textAlign:"center",children:a})})}),t.jsx(z,{color:o,size:"sm",children:n})]})},Zr=({critical:e,high:n,medium:i,low:a})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(de,{value:e,variant:"critical"}),t.jsx(de,{value:n,variant:"high"}),t.jsx(de,{value:i,variant:"medium"}),t.jsx(de,{value:a,variant:"low"})]}),Qr=s.dt.div`
|
|
2370
2379
|
${({theme:e})=>`
|
|
2371
2380
|
border-radius: ${e.spacing[.25]};
|
|
2372
2381
|
cursor: pointer;
|
|
@@ -2384,7 +2393,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2384
2393
|
display: block;
|
|
2385
2394
|
}
|
|
2386
2395
|
`}
|
|
2387
|
-
`,
|
|
2396
|
+
`,eo=({visibleElement:e,hiddenElement:n})=>t.jsxs(Qr,{children:[e,t.jsx($,{display:"none",position:"absolute",top:"100%",zIndex:10,children:n})]}),pn=({customBadge:e=void 0,description:n,icon:i,onClick:a,requiresUpgrade:r=!1,title:o})=>{const l=s.nt();return t.jsxs($,{bgColor:l.palette.white,bgColorHover:l.palette.gray[100],cursor:"pointer",display:"flex",gap:.5,onClick:a,px:1.25,py:1,width:"100%",children:[t.jsx($,{alignItems:"center",bgColor:l.palette.gray[300],borderRadius:l.spacing[.25],display:"flex",height:"24px",justify:"center",width:"24px",children:t.jsx(T,{icon:i,iconColor:l.palette.gray[800],iconSize:"xxs",ml:.5,mr:.5})}),t.jsxs($,{children:[t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,children:[t.jsx(z,{color:l.palette.gray[800],size:"sm",children:o}),r?t.jsx(cn,{text:"Upgrade"}):void 0,e]}),t.jsx(z,{color:l.palette.gray[400],size:"xs",children:n})]})]})},to=s.dt(s.m.div)`
|
|
2388
2397
|
${({theme:e})=>`
|
|
2389
2398
|
background-color: ${e.palette.white};
|
|
2390
2399
|
box-shadow: ${e.shadows.lg};
|
|
@@ -2407,7 +2416,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2407
2416
|
height: auto;
|
|
2408
2417
|
}
|
|
2409
2418
|
`}
|
|
2410
|
-
`,
|
|
2419
|
+
`,no=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),x=f.useRef(null),u=f.useCallback(h=>()=>{h(),r()},[r]);return f.useEffect(()=>{const h=["mousedown","touchstart"],b=y=>{var j;const w=y.target,m=document.getElementById("helpBtn"),v=document.getElementById("filterBtn"),k=(w===m||((m==null?void 0:m.contains(w))??!1)||w===v||(v==null?void 0:v.contains(w)))??!1;i&&!k&&!(((j=x.current)==null?void 0:j.contains(w))??!1)&&r()};return h.forEach(y=>{document.addEventListener(y,b,{passive:!0})}),()=>{h.forEach(y=>{document.removeEventListener(y,b)})}},[i,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(to,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:x,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs($,{height:"100%",position:"relative",children:[t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(z,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(M,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs($,{py:1.25,children:[(a??[]).map(({customBadge:h,description:b,icon:y,onClick:w,requiresUpgrade:m,title:v})=>t.jsx(pn,{customBadge:h,description:b,icon:y,onClick:u(w),requiresUpgrade:m,title:v},v)),e&&t.jsx($,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderColor:g.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(A,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(A,{onClick:l,type:"submit",children:o})]})]})]})})})},io=(e,n)=>n>=50?`
|
|
2411
2420
|
${e.palette.gray[200]} 50%,
|
|
2412
2421
|
${e.palette.primary[500]} 50.05%,
|
|
2413
2422
|
${e.palette.primary[500]} ${n}%,
|
|
@@ -2418,7 +2427,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2418
2427
|
${e.palette.primary[500]} 50%,
|
|
2419
2428
|
${e.palette.gray[200]} 50.05%,
|
|
2420
2429
|
${e.palette.gray[200]} 100%
|
|
2421
|
-
`,
|
|
2430
|
+
`,ao=s.dt.div`
|
|
2422
2431
|
${({theme:e,$min:n,$value:i})=>`
|
|
2423
2432
|
align-items: center;
|
|
2424
2433
|
align-self: stretch;
|
|
@@ -2434,7 +2443,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2434
2443
|
${n>=0?`
|
|
2435
2444
|
${e.palette.primary[500]} ${i}%,
|
|
2436
2445
|
${e.palette.gray[200]} ${i}%
|
|
2437
|
-
`:
|
|
2446
|
+
`:io(e,i)}
|
|
2438
2447
|
);
|
|
2439
2448
|
border-radius: ${e.spacing[.125]};
|
|
2440
2449
|
height: ${e.spacing[.25]};
|
|
@@ -2472,7 +2481,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2472
2481
|
font-size: ${e.spacing[.5]};
|
|
2473
2482
|
}
|
|
2474
2483
|
`}
|
|
2475
|
-
`,
|
|
2484
|
+
`,oo=s.dt.output`
|
|
2476
2485
|
${({theme:e})=>`
|
|
2477
2486
|
align-items: flex-end;
|
|
2478
2487
|
border-radius: ${e.spacing[.5]};
|
|
@@ -2483,7 +2492,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2483
2492
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2484
2493
|
width: 59px;
|
|
2485
2494
|
`}
|
|
2486
|
-
`,gn=({state:e,trackRef:n,index:i,name:a})=>{const r=f.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:n,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},
|
|
2495
|
+
`,gn=({state:e,trackRef:n,index:i,name:a})=>{const r=f.useRef(null),{thumbProps:o,inputProps:l,isDragging:c}=s.$47b897dc8cdb026b$export$8d15029008292ae({index:i,trackRef:n,inputRef:r},e);return t.jsx("div",{...o,className:`thumb ${c?"dragging":""}`,children:t.jsx(s.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":a,ref:r})})})},so=(e,n,i)=>Math.round((i-e)/(n-e)*100),lo=e=>{const n=s.nt(),i=f.useRef(null),{label:a,minValue:r=0,maxValue:o=100,name:l,setValue:c,watch:d}=e,p=s.$a916eb452884faea$export$b7a616150fdb9f44(),g=s.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:p,onChange(b){c==null||c(l,b)},value:d==null?void 0:d(l)}),x=so(r,o,g.getThumbValue(0)),{groupProps:u,trackProps:h}=s.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},g,i);return t.jsx(V,{htmlFor:l,label:a,children:t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(ao,{...u,$min:r??0,$value:x,className:"slider",children:[t.jsx("div",{...h,className:`track ${g.isDisabled?"disabled":""}`,ref:i,children:t.jsx(gn,{index:0,name:l,state:g,trackRef:i})}),t.jsxs(ro,{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(oo,{children:t.jsx(z,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:g.getThumbValueLabel(0)})})]})})},{getVariant:co}=K(e=>({completed:`
|
|
2487
2496
|
background-color: ${e.palette.primary[500]};
|
|
2488
2497
|
color: ${e.palette.white};
|
|
2489
2498
|
|
|
@@ -2506,7 +2515,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2506
2515
|
&::after {
|
|
2507
2516
|
background-color: ${e.palette.gray[200]};
|
|
2508
2517
|
}
|
|
2509
|
-
`})),
|
|
2518
|
+
`})),po=s.dt.div`
|
|
2510
2519
|
${({theme:e})=>`
|
|
2511
2520
|
align-items: stretch;
|
|
2512
2521
|
background-color: ${e.palette.white};
|
|
@@ -2516,7 +2525,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2516
2525
|
padding: ${`${e.spacing[1]} ${e.spacing[1]}`};
|
|
2517
2526
|
scroll-behavior: unset;
|
|
2518
2527
|
`}
|
|
2519
|
-
`,
|
|
2528
|
+
`,go=s.dt.div`
|
|
2520
2529
|
display: flex;
|
|
2521
2530
|
flex-direction: row;
|
|
2522
2531
|
margin-bottom: ${({theme:e})=>e.spacing[2]};
|
|
@@ -2524,7 +2533,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2524
2533
|
&:last-child > div:first-child > span::after {
|
|
2525
2534
|
display: none;
|
|
2526
2535
|
}
|
|
2527
|
-
`,
|
|
2536
|
+
`,uo=s.dt.div`
|
|
2528
2537
|
${({theme:e})=>`
|
|
2529
2538
|
display: inline-flex;
|
|
2530
2539
|
font-family: ${e.typography.type.primary};
|
|
@@ -2536,7 +2545,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2536
2545
|
margin-right: ${e.spacing[.5]};
|
|
2537
2546
|
}
|
|
2538
2547
|
`}
|
|
2539
|
-
`,
|
|
2548
|
+
`,xo=s.dt.span`
|
|
2540
2549
|
${({theme:e,$variant:n})=>`
|
|
2541
2550
|
border-radius: 6px;
|
|
2542
2551
|
display: inline-block;
|
|
@@ -2559,9 +2568,9 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2559
2568
|
height: calc(100% - ${e.spacing[1]});
|
|
2560
2569
|
}
|
|
2561
2570
|
|
|
2562
|
-
${
|
|
2571
|
+
${co(e,n)}
|
|
2563
2572
|
`}
|
|
2564
|
-
`,
|
|
2573
|
+
`,fo=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=f.useState(1),c=f.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(po,{children:r.map((d,p)=>{const{content:g,title:x,nextAction:u,previousAction:h}=d,b=p+1,y=b===o?"current":"disabled",w=b<o?"completed":y;return t.jsxs(go,{children:[t.jsx($,{maxWidth:"40px",position:"relative",children:t.jsx(xo,{$variant:w,children:w==="completed"?t.jsx(T,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs($,{ml:1.5,width:"100%",children:[t.jsx(U,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:x}),w==="current"&&t.jsxs($,{children:[g,t.jsxs(uo,{children:[o>1&&t.jsx(A,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<r.length?t.jsx(A,{disabled:d.isDisabledNext??!1,onClick:c(1,u),variant:"primary",children:"Next step"}):t.jsx(A,{disabled:e,onClick:a,type:i,variant:"primary",children:n})]})]})]})]},d.title)})})},ho=s.dt.button`
|
|
2565
2574
|
${({theme:e})=>`
|
|
2566
2575
|
align-items: center;
|
|
2567
2576
|
background-color: ${e.palette.white};
|
|
@@ -2603,7 +2612,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2603
2612
|
background-color: ${e.palette.gray[100]};
|
|
2604
2613
|
}
|
|
2605
2614
|
`}
|
|
2606
|
-
`,
|
|
2615
|
+
`,bo={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},$o=({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(ho,{"aria-label":r??void 0,className:c,disabled:e,id:i,onClick:o,type:l,children:[t.jsx(T,{clickable:!1,icon:n??bo[c].icon,iconSize:r===void 0?"xxs":"xs",iconType:"fa-light"}),r??void 0]});return t.jsxs($,{alignItems:"center",display:"flex",children:[p,a&&t.jsx(z,{color:d.palette.gray[800],ml:.5,size:"sm",children:a})]})},yo=s.dt.div`
|
|
2607
2616
|
${({theme:e,$size:n})=>`
|
|
2608
2617
|
align-items: center;
|
|
2609
2618
|
background-color: ${e.palette.white};
|
|
@@ -2626,7 +2635,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2626
2635
|
border: 1px solid ${e.palette.gray[600]};
|
|
2627
2636
|
}
|
|
2628
2637
|
`}
|
|
2629
|
-
`,
|
|
2638
|
+
`,mo=s.dt.div`
|
|
2630
2639
|
${({theme:e,$size:n})=>`
|
|
2631
2640
|
display: ${n==="long"?"flex":"block"};
|
|
2632
2641
|
flex-direction: column;
|
|
@@ -2676,7 +2685,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2676
2685
|
transform: translateX(-50%);
|
|
2677
2686
|
}
|
|
2678
2687
|
`}
|
|
2679
|
-
`,un=({date:e,description:n,title:i,size:a="long"})=>{const r=s.nt();return t.jsxs(
|
|
2688
|
+
`,un=({date:e,description:n,title:i,size:a="long"})=>{const r=s.nt();return t.jsxs(yo,{$size:a,className:"timeline-card",children:[t.jsx(z,{color:r.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:e}),t.jsx(z,{color:r.palette.gray[800],fontWeight:"bold",lineSpacing:1.5,mb:.5,size:"md",textAlign:"center",children:i}),t.jsx("div",{children:n.map((o,l)=>{const c=`${o}#${l}`;return t.jsx(z,{size:"sm",textAlign:"center",wordBreak:"break-word",children:o},c)})})]})},wo=({items:e})=>{const n=f.useRef(null),[i,a]=f.useState("long");return f.useEffect(()=>{n.current&&a(n.current.offsetWidth<=1100?"small":"long")},[]),t.jsx($,{ref:n,width:"100%",children:t.jsx(mo,{$size:i,children:e.map((r,o)=>t.jsx(un,{date:r.date,description:r.description,size:i,title:r.title},`${r.title}-${o}`))})})},vo=s.dt.div`
|
|
2680
2689
|
${({theme:e})=>`
|
|
2681
2690
|
align-items: center;
|
|
2682
2691
|
display: flex;
|
|
@@ -2706,7 +2715,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2706
2715
|
width: 320px;
|
|
2707
2716
|
}
|
|
2708
2717
|
`}
|
|
2709
|
-
`,
|
|
2718
|
+
`,jo=s.dt.button`
|
|
2710
2719
|
${({theme:e})=>`
|
|
2711
2720
|
align-items: center;
|
|
2712
2721
|
background: linear-gradient(
|
|
@@ -2735,7 +2744,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2735
2744
|
color: ${e.palette.white};
|
|
2736
2745
|
}
|
|
2737
2746
|
`}
|
|
2738
|
-
`,
|
|
2747
|
+
`,ko=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{r(l),i(l)},[i]);return t.jsx(vo,{children:n.map((l,c)=>t.jsx(jo,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(z,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},Co={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:""},So=({run:e,steps:n,onFinish:i})=>{const[a,r]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:p,index:g,status:x,type:u}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(u)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(x)||p==="close")&&(r(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})},xn=t.jsx($,{alignItems:"center",bgColor:I.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(z,{bgGradient:I.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),zo=s.dt.div`
|
|
2739
2748
|
${({className:e,theme:n})=>`
|
|
2740
2749
|
align-items: flex-start;
|
|
2741
2750
|
border-radius: ${n.spacing[1]};
|
|
@@ -2801,4 +2810,4 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2801
2810
|
}
|
|
2802
2811
|
`}
|
|
2803
2812
|
`;const Io={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
|
|
2804
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},To=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=Io[i],c=e??r;return t.jsxs(zo,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&xn,t.jsx(U,{color:I.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(z,{color:I.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(z,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(A,{onClick:n,variant:"primary",children:l})]})};exports.Accordion=Yn;exports.AccordionContent=$t;exports.ActionButton=He;exports.Alert=ni;exports.AppliedFilter=ce;exports.AppliedFilters=
|
|
2813
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},To=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=Io[i],c=e??r;return t.jsxs(zo,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&xn,t.jsx(U,{color:I.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(z,{color:I.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(z,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(A,{onClick:n,variant:"primary",children:l})]})};exports.Accordion=Yn;exports.AccordionContent=$t;exports.ActionButton=He;exports.Alert=ni;exports.AppliedFilter=ce;exports.AppliedFilters=Ga;exports.ArrayField=Me;exports.Avatar=di;exports.BaseButtonComponent=Ge;exports.BaseComponent=ve;exports.BaseSpanComponent=qe;exports.BaseTextComponent=Ye;exports.Button=A;exports.Button$1=Se;exports.ButtonToolbarCenter=Li;exports.ButtonToolbarRow=Pi;exports.ButtonToolbarStartRow=Ai;exports.Calendar=St;exports.Calendar$1=Nt;exports.Calendar$2=Dt;exports.CalendarCell=Ct;exports.CalendarGrid=Fe;exports.CardHeader=Te;exports.CardWithImage=ui;exports.CardWithInput=na;exports.CardWithOptions=Jt;exports.CardWithSelector=la;exports.CardWithSwitch=pa;exports.Carousel=ba;exports.Checkbox=ie;exports.CodeSnippet=ya;exports.Col=Be;exports.ColumFilters=rn;exports.ColumnsModal=Pa;exports.ComboBox=jt;exports.ComboBoxField=We;exports.Container=$;exports.CustomThemeProvider=Bn;exports.DateField=It;exports.DateSelector=ge;exports.Description=dn;exports.Dialog=Ee;exports.Divider=ae;exports.Dropdown=Qa;exports.Editable=Ri;exports.EmptyButton=Ve;exports.EmptyState=ir;exports.FilePreview=wt;exports.FilterControl=en;exports.FilterForm=_e;exports.FilterFormContent=tn;exports.FiltersList=an;exports.Form=or;exports.Gap=Mi;exports.GridContainer=lr;exports.GroupSelector=dr;exports.Header=Ne;exports.Header$1=Gt;exports.Heading=U;exports.Icon=T;exports.IconButton=M;exports.IndicatorCard=pr;exports.InfoSidebar=gr;exports.InnerForm=ar;exports.Input=De;exports.InputArray=Hi;exports.InputDate=Ft;exports.InputDateRange=Et;exports.InputDateTime=Di;exports.InputFile=Gi;exports.InputNumber=At;exports.InputNumberRange=Pt;exports.InputTags=qi;exports.Label=Ke;exports.Link=Z;exports.ListItem=ke;exports.ListItemsWrapper=Kt;exports.LittleFlag=xr;exports.Loading=vr;exports.LocationCode=_t;exports.Logo=kr;exports.Lottie=Sr;exports.MemoizedImage=ne;exports.Menu=zr;exports.MenuItem=pn;exports.MessageBanner=Tr;exports.Modal=sn;exports.ModalConfirm=Sa;exports.ModalFooter=Ut;exports.Notification=Dr;exports.NotificationSign=Yt;exports.NumberField=Ie;exports.NumberInput=Ar;exports.OAuthSelector=Wr;exports.Option=vt;exports.OptionBoxContainer=et;exports.OptionContainer=Ue;exports.OptionContainer$1=ln;exports.OutlineContainer=V;exports.PhoneInput=ea;exports.PlanCard=To;exports.PopUp=Gr;exports.Popover=je;exports.PremiumFeature=cn;exports.PreviewPanel=Xt;exports.PriorityScore=Mr;exports.ProgressBar=Ur;exports.RadioButton=Je;exports.RecommendedTag=xn;exports.Row=Rt;exports.ScrollUpButton=qr;exports.Search=ue;exports.SearchPanel=Qt;exports.SeverityBadge=Xr;exports.SeverityOverview=Zr;exports.SeverityOverviewBadge=de;exports.ShowOnHover=eo;exports.SlideOutMenu=no;exports.Slider=lo;exports.Span=pe;exports.StepLapse=fo;exports.Tab=qt;exports.TableButton=$o;exports.Tabs=Qe;exports.Tag=Y;exports.TagsField=Oe;exports.Text=z;exports.TextArea=ta;exports.Thumb=gn;exports.TimeField=Tt;exports.TimeLine=wo;exports.TimeLineCard=un;exports.Toggle=Ot;exports.ToggleButton=ko;exports.Tooltip=G;exports.Tour=So;exports.baseStep=Co;exports.formatCheckValues=on;exports.getStyledConfig=we;exports.hiddenProps=ht;exports.icons=Pn;exports.setBorder=be;exports.setDisplay=$e;exports.setInteraction=me;exports.setMargin=fe;exports.setPadding=xe;exports.setPosition=he;exports.setText=ye;exports.theme=I;exports.uniqueIcons=Wn;exports.useCarousel=Wt;exports.useClickOutside=te;exports.useCloudinaryImage=Bt;exports.useColumnsModal=ia;exports.useConfirmDialog=Xa;exports.useDebouncedCallback=Mt;exports.useFilterForm=nn;exports.useFilters=Ka;exports.useModal=Re;exports.useSearch=aa;exports.variantBuilder=K;
|