@fluidattacks/design 3.27.4-pr.3 → 3.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/components/@core/index.js +1 -1
- package/dist/components/@core/styles.d.ts +4 -4
- 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/alert/styles.d.ts +270 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/styles.d.ts +538 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/styles.d.ts +548 -3
- package/dist/components/card/card-header/index.js +1 -1
- package/dist/components/card/card-with-image/index.js +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-input/styles.d.ts +1 -1
- package/dist/components/card/card-with-options/index.d.ts +1 -1
- package/dist/components/card/card-with-options/index.js +1 -1
- package/dist/components/card/card-with-options/types.d.ts +1 -0
- package/dist/components/card/card-with-selector/index.js +1 -1
- package/dist/components/card/card-with-selector/styles.d.ts +269 -1
- package/dist/components/card/card-with-switch/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/card-container/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/styles.d.ts +811 -7
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/styles.d.ts +271 -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/code-snippet/styles.d.ts +538 -2
- package/dist/components/colors/index.js +1 -1
- package/dist/components/conditions-dialog/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/container/styles.d.ts +269 -2
- package/dist/components/copy-button/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dropdown/index.js +1 -1
- package/dist/components/dropdown/styles.d.ts +539 -2
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/empty-state/styles.d.ts +539 -3
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/file-preview/styles.d.ts +339 -7
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/form/styles.d.ts +277 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/grid-container/styles.d.ts +269 -2
- package/dist/components/grid-layout/styles.d.ts +1076 -4
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/group-selector/styles.d.ts +4 -4
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon/styles.d.ts +538 -3
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button/styles.d.ts +279 -2
- 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/combobox/styles.d.ts +4 -4
- 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/calendar/styles.d.ts +2175 -10
- 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-range/styles.d.ts +2 -2
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/styles.d.ts +538 -2
- 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-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-file/styles.d.ts +569 -3
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/styles.d.ts +300 -1
- package/dist/components/inputs/fields/number/index.d.ts +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/phone/styles.d.ts +1356 -5
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/fields/text-input/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/styles.d.ts +842 -7
- 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/inputs/utils/styles.d.ts +1636 -9
- package/dist/components/layout/categories/buttons/index.d.ts +804 -6
- 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/column/styles.d.ts +268 -2
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/gap/styles.d.ts +268 -2
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/categories/row/styles.d.ts +268 -2
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/styles.d.ts +3 -3
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/list-item/styles.d.ts +539 -2
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/little-flag/styles.d.ts +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/loading/styles.d.ts +3 -3
- package/dist/components/logo/index.js +1 -1
- package/dist/components/lottie/index.js +1 -1
- package/dist/components/lottie/styles.d.ts +394 -33
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/message-banner/styles.d.ts +279 -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/preview-panel/styles.d.ts +4 -2
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/styles.d.ts +374 -2
- 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/filters-list/styles.d.ts +374 -2
- package/dist/components/modal/filters-modal/index.js +1 -1
- package/dist/components/modal/filters-modal/styles.d.ts +643 -5
- 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/index.stories.d.ts +6 -9
- package/dist/components/modal/modal-confirm/index.js +1 -1
- package/dist/components/modal/styles.d.ts +1348 -12
- package/dist/components/notification/index.js +1 -1
- package/dist/components/notification/styles.d.ts +42 -4
- package/dist/components/notification-sign/index.js +1 -1
- package/dist/components/notification-sign/styles.d.ts +807 -4
- package/dist/components/number-input/index.d.ts +5 -0
- package/dist/components/number-input/index.js +1 -0
- package/dist/components/number-input/index.stories.d.ts +6 -0
- package/dist/components/number-input/styles.d.ts +570 -0
- package/dist/components/number-input/types.d.ts +17 -0
- package/dist/components/oauth-selector/index.js +1 -1
- package/dist/components/oauth-selector/option-container/index.js +1 -1
- package/dist/components/pop-up/description/index.js +1 -1
- package/dist/components/pop-up/index.js +1 -1
- package/dist/components/premium-feature/index.js +1 -1
- package/dist/components/premium-feature/styles.d.ts +269 -1
- package/dist/components/priority-score/index.js +1 -1
- package/dist/components/progress-bar/index.js +1 -1
- package/dist/components/progress-bar/styles.d.ts +4 -4
- package/dist/components/progress-indicator/in-progress-icon/index.js +1 -1
- package/dist/components/progress-indicator/index.js +1 -1
- package/dist/components/progress-indicator/step/index.js +1 -1
- package/dist/components/progress-indicator/styles.d.ts +4 -4
- package/dist/components/radio-button/index.js +1 -1
- package/dist/components/radio-button/styles.d.ts +539 -3
- package/dist/components/scroll-button/index.js +1 -1
- package/dist/components/scroll-button/styles.d.ts +272 -3
- package/dist/components/search/index.js +1 -1
- package/dist/components/search/styles.d.ts +838 -3
- 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/show-on-hover/styles.d.ts +269 -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/slide-out-menu/styles.d.ts +331 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/styles.d.ts +543 -4
- package/dist/components/slider/thumb/index.js +1 -1
- package/dist/components/step-lapse/index.js +1 -1
- package/dist/components/step-lapse/styles.d.ts +809 -5
- package/dist/components/table/context/index.js +1 -1
- package/dist/components/table/export-csv/index.js +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/table/pagination/pagination-control/index.js +1 -1
- package/dist/components/table/pagination/pagination-control/styles.d.ts +2 -2
- package/dist/components/table/pagination/pagination-dropdown/index.js +1 -1
- package/dist/components/table/pagination/pagination-size/index.js +1 -1
- package/dist/components/table/sort-icon/index.js +1 -1
- package/dist/components/table/sort-icon/styles.d.ts +2 -2
- package/dist/components/table/styles.d.ts +808 -4
- package/dist/components/table/table-body/index.js +1 -1
- package/dist/components/table/table-body/styles.d.ts +269 -1
- package/dist/components/table/table-column-toggle/index.js +1 -1
- package/dist/components/table/table-content/head/index.js +1 -1
- package/dist/components/table/table-content/index.js +1 -1
- package/dist/components/table/table-footer/footer-content/index.js +1 -1
- package/dist/components/table/table-footer/index.js +1 -1
- package/dist/components/table/table-options/caption-content/index.js +1 -1
- package/dist/components/table/table-options/controls-content/index.js +1 -1
- package/dist/components/table/table-options/highlighted-content/index.js +1 -1
- package/dist/components/table/table-options/index.js +1 -1
- package/dist/components/table/table-options/styles.d.ts +805 -5
- package/dist/components/table/wrapper/index.js +1 -1
- package/dist/components/table-button/index.js +1 -1
- package/dist/components/table-button/styles.d.ts +279 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/styles.d.ts +2 -2
- package/dist/components/tabs/tab/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/tag/styles.d.ts +1 -1
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/timeline/styles.d.ts +4 -4
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle/styles.d.ts +809 -3
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/styles.d.ts +337 -7
- 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/styles.d.ts +807 -6
- package/dist/components/typography/text/index.js +1 -1
- package/dist/{components-BE94pnoj.mjs → components-BHKNL3Nv.mjs} +1363 -1261
- package/dist/{components-COp-m0gb.js → components-BUvJsk4v.js} +338 -316
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";const
|
|
2
|
-
${
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),u=require("react"),y=require("styled-components"),f=require("./vendor-DE_IQw9t.js"),le=require("react-dom"),Ue=require("react-router-dom"),Et=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},tt=Et(u),ce=Et(y),X=e=>({getVariant:(n,o)=>e(n)[o]}),Nt=["padding","px","py","pl","pr","pt","pb","margin","mx","my","ml","mr","mt","mb","zIndex","position","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","scroll","visibility","display","height","width","maxHeight","maxWidth","minHeight","minWidth","shadow","bgColor","bgGradient","gap","flexDirection","flexGrow","justify","justifySelf","alignItems","alignSelf","wrap","color","fontFamily","fontSize","fontWeight","textAlign","whiteSpace","letterSpacing","lineSpacing","textDecoration","textOverflow","whiteSpace","wordBreak","wordWrap","cursor","transition","borderColorHover","bgColorHover","shadowHover"],ro={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},ao={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},so={25:"",50:"",100:"#f59dbe",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},lo={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},co={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#f27100",700:"#b54708",800:"",900:""},po={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},go={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},uo={type:{primary:"Roboto, sans-serif",poppins:"'Poppins', sans-serif",mono:"'Space Mono', monospace"},heading:{xxl:"64px",xl:"48px",lg:"32px",md:"24px",sm:"20px",xs:"16px"},text:{xl:"20px",lg:"18px",md:"16px",sm:"14px",xs:"12px"},weight:{bold:"700",semibold:"600",regular:"400"}},xo={none:"none",sm:"0px 1px 2px 0px rgba(16, 24, 40, 0.15)",md:"0px 4px 6px 0px rgba(16, 24, 40, 0.15)",lg:"0px 8px 24px 0px rgba(16, 24, 40, 0.15)"},ho={sm:"1024px",md:"1440px",lg:"1920px"},fo={0:"0rem",.125:"0.125rem",.25:"0.25rem",.5:"0.5rem",.625:"0.625rem",.75:"0.75rem",.875:"0.875rem",1:"1rem",1.25:"1.25rem",1.5:"1.5rem",1.75:"1.75rem",2:"2rem",2.25:"2.25rem",2.5:"2.5rem",3:"3rem",4:"4rem",5:"5rem",6:"6rem"},yo=["lock-keyhole","bars-sort","bolt","books","brain-circuit","briefcase","bug","buildings","bullseye-pointer","calendar-clock","calendar-xmark","chart-network","clipboard-check","comment","envelope","eye","file","flag","globe","hand-holding-dollar","hands-clapping","headset","hexagon-exclamation","light-emergency-on","magnifying-glass","pen-line","plane-departure","screwdriver-wrench","sensor-triangle-exclamation","shield-check","sidebar","skull","sliders","star-christmas","telescope","trash","unlock","user-group","user-hoodie","xmark","arrow-down","arrow-left","arrow-right","arrow-up","plus","minus","check","circle-question"],R={typography:uo,shadows:xo,breakpoints:ho,spacing:fo,palette:{primary:ao,complementary:so,error:lo,info:go,warning:co,success:po,black:"#0c111d",white:"#ffffff",gray:ro}},bo=({children:e})=>t.jsx(y.ThemeProvider,{theme:R,children:e}),F=(e,n)=>n===void 0?"":`${e}: ${n};`,be=e=>{const n=e.py??e.pt??0,o=e.px??e.pr??0,i=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[a,l,s,c]=e.padding;return`padding: ${R.spacing[a]} ${R.spacing[l]} ${R.spacing[s]} ${R.spacing[c]};`}return`padding: ${R.spacing[n]} ${R.spacing[o]} ${R.spacing[i]} ${R.spacing[r]};`},$e=e=>{const n=e.my??e.mt??0,o=e.mx??e.mr??0,i=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[a,l,s,c]=e.margin;return`margin: ${R.spacing[a]} ${R.spacing[l]} ${R.spacing[s]} ${R.spacing[c]};`}return`margin: ${R.spacing[n]} ${R.spacing[o]} ${R.spacing[i]} ${R.spacing[r]};`},me=e=>{const n=F("position",e.position),o=F("top",e.top),i=F("right",e.right),r=F("bottom",e.bottom),a=F("left",e.left),l=F("z-index",e.zIndex);return`
|
|
2
|
+
${n}
|
|
3
3
|
${o}
|
|
4
4
|
${i}
|
|
5
5
|
${r}
|
|
6
6
|
${a}
|
|
7
7
|
${l}
|
|
8
|
-
`},we=e=>{const
|
|
9
|
-
${
|
|
8
|
+
`},we=e=>{const n=F("border",e.border),o=F("border-top",e.borderTop),i=F("border-right",e.borderRight),r=F("border-bottom",e.borderBottom),a=F("border-left",e.borderLeft),l=F("border-color",e.borderColor),s=F("border-radius",e.borderRadius);return`
|
|
9
|
+
${n}
|
|
10
10
|
${o}
|
|
11
11
|
${i}
|
|
12
12
|
${r}
|
|
13
13
|
${a}
|
|
14
14
|
${l}
|
|
15
15
|
${s}
|
|
16
|
-
`},$o=e=>e.includes("x")?"overflow-x: auto;":"",mo=e=>e.includes("y")?"overflow-y: auto;":"",ve=e=>{const
|
|
16
|
+
`},$o=e=>e.includes("x")?"overflow-x: auto;":"",mo=e=>e.includes("y")?"overflow-y: auto;":"",ve=e=>{const n=e.scroll?`
|
|
17
17
|
${$o(e.scroll)}
|
|
18
18
|
${mo(e.scroll)}
|
|
19
|
-
`:"",o=F("visibility",e.visibility),i=F("display",e.display),r=F("height",e.height),a=F("width",e.width),l=F("max-height",e.maxHeight),s=F("max-width",e.maxWidth),c=F("min-height",e.minHeight),d=F("min-width",e.minWidth),p=F("box-shadow",e.shadow?
|
|
20
|
-
${
|
|
19
|
+
`:"",o=F("visibility",e.visibility),i=F("display",e.display),r=F("height",e.height),a=F("width",e.width),l=F("max-height",e.maxHeight),s=F("max-width",e.maxWidth),c=F("min-height",e.minHeight),d=F("min-width",e.minWidth),p=F("box-shadow",e.shadow?R.shadows[e.shadow]:void 0),g=F("gap",e.gap===void 0?void 0:R.spacing[e.gap]),x=F("background-color",e.bgColor),h=F("background",e.bgGradient),b=F("flex-direction",e.flexDirection),w=F("flex-grow",e.flexGrow),$=F("justify-content",e.justify),j=F("justify-self",e.justifySelf),v=F("align-items",e.alignItems),C=F("align-self",e.alignSelf),k=F("flex-wrap",e.wrap);return`
|
|
20
|
+
${n}
|
|
21
21
|
${o}
|
|
22
22
|
${i}
|
|
23
23
|
${r}
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
${b}
|
|
34
34
|
${w}
|
|
35
35
|
${$}
|
|
36
|
-
${
|
|
36
|
+
${j}
|
|
37
37
|
${v}
|
|
38
38
|
${C}
|
|
39
|
-
${
|
|
40
|
-
`},je=e=>{const
|
|
41
|
-
${
|
|
39
|
+
${k}
|
|
40
|
+
`},je=e=>{const n=F("color",e.color),o=F("font-family",e.fontFamily),i=F("font-size",e.fontSize),r=F("font-weight",e.fontWeight),a=F("line-spacing",e.letterSpacing),l=F("line-height",e.lineSpacing),s=F("text-align",e.textAlign),c=F("text-decoration",e.textDecoration),d=F("text-overflow",e.textOverflow),p=F("white-space",e.whiteSpace),g=F("word-break",e.wordBreak),x=F("word-wrap",e.wordWrap);return`
|
|
41
|
+
${n}
|
|
42
42
|
${o}
|
|
43
43
|
${i}
|
|
44
44
|
${r}
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
${p}
|
|
51
51
|
${g}
|
|
52
52
|
${x}
|
|
53
|
-
`},ke=e=>{const
|
|
54
|
-
${
|
|
53
|
+
`},ke=e=>{const n=F("cursor",e.cursor),o=F("border-color",e.borderColorHover),i=F("background-color",e.bgColorHover),r=F("box-shadow",e.shadowHover===void 0?void 0:R.shadows[e.shadowHover]),a=F("transition",e.transition);return`
|
|
54
|
+
${n}
|
|
55
55
|
|
|
56
56
|
&:hover {
|
|
57
57
|
${a||"transition: all 0.2s;"}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
${i}
|
|
60
60
|
${r}
|
|
61
61
|
}
|
|
62
|
-
`},Ce={shouldForwardProp:e=>!
|
|
62
|
+
`},Ce={shouldForwardProp:e=>!Nt.includes(e)},Se=y.styled.div.withConfig(Ce)`
|
|
63
63
|
${be}
|
|
64
64
|
${$e}
|
|
65
65
|
${me}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
${je}
|
|
68
68
|
${we}
|
|
69
69
|
${ke}
|
|
70
|
-
`,nt=
|
|
70
|
+
`,nt=y.styled.button.withConfig(Ce)`
|
|
71
71
|
${be}
|
|
72
72
|
${$e}
|
|
73
73
|
${me}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
${je}
|
|
76
76
|
${we}
|
|
77
77
|
${ke}
|
|
78
|
-
`,ot=
|
|
78
|
+
`,ot=y.styled.p.withConfig(Ce)`
|
|
79
79
|
${be}
|
|
80
80
|
${$e}
|
|
81
81
|
${me}
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
${je}
|
|
84
84
|
${we}
|
|
85
85
|
${ke}
|
|
86
|
-
`,it=
|
|
86
|
+
`,it=y.styled.span.withConfig(Ce)`
|
|
87
87
|
${be}
|
|
88
88
|
${$e}
|
|
89
89
|
${me}
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
${je}
|
|
92
92
|
${we}
|
|
93
93
|
${ke}
|
|
94
|
-
`,wo=
|
|
95
|
-
${({theme:e,$center:
|
|
96
|
-
${
|
|
94
|
+
`,wo=y.styled(Se)`
|
|
95
|
+
${({theme:e,$center:n=!1,$styleMd:o,$styleSm:i})=>`
|
|
96
|
+
${n?"margin: auto;":""}
|
|
97
97
|
scrollbar-color: ${e.palette.gray[600]} ${e.palette.gray[100]};
|
|
98
98
|
scroll-padding: ${e.spacing[.5]};
|
|
99
99
|
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
${i};
|
|
109
109
|
}
|
|
110
110
|
`}
|
|
111
|
-
`,m=u.forwardRef(function({as:
|
|
112
|
-
${({theme:e,$bgGradient:
|
|
113
|
-
background: ${
|
|
111
|
+
`,m=u.forwardRef(function({as:n="div",center:o,children:i,id:r,onHover:a,onLeave:l,styleMd:s,styleSm:c,...d},p){return t.jsx(wo,{$center:o,$styleMd:s,$styleSm:c,as:n,id:r,onMouseLeave:l,onMouseOver:a,ref:p,...d,children:i})}),vo=y.styled(ot)`
|
|
112
|
+
${({theme:e,$bgGradient:n="unset",$color:o=e.palette.gray[800],$display:i="block",$fontFamily:r=e.typography.type.primary,$fontWeight:a="bold",$letterSpacing:l=0,$lineSpacing:s=1.5,$lineSpacingSm:c,$overflow:d="unset",$size:p,$sizeMd:g,$sizeSm:x,$textFill:h="unset",$whiteSpace:b="pre-line",$wordBreak:w="normal"})=>`
|
|
113
|
+
background: ${n};
|
|
114
114
|
color: ${o};
|
|
115
115
|
display: ${i};
|
|
116
116
|
font-family: ${r};
|
|
@@ -138,9 +138,9 @@
|
|
|
138
138
|
line-height: ${e.spacing[c??s]};
|
|
139
139
|
}
|
|
140
140
|
`}
|
|
141
|
-
`,Dt=
|
|
142
|
-
${({theme:e,$bgGradient:
|
|
143
|
-
background: ${
|
|
141
|
+
`,Dt=y.styled(ot)`
|
|
142
|
+
${({theme:e,$bgGradient:n="unset",$color:o=e.palette.gray[600],$display:i="block",$fontFamily:r=e.typography.type.primary,$fontWeight:a="regular",$fontStyle:l="normal",$letterSpacing:s=0,$lineSpacing:c=1.25,$lineSpacingSm:d,$overflow:p="unset",$size:g,$sizeMd:x,$sizeSm:h,$textFill:b="unset",$whiteSpace:w="pre-line",$wordBreak:$="normal"})=>`
|
|
143
|
+
background: ${n};
|
|
144
144
|
color: ${o};
|
|
145
145
|
display: ${i};
|
|
146
146
|
font-family: ${r};
|
|
@@ -169,9 +169,9 @@
|
|
|
169
169
|
line-height: ${e.spacing[d??c]};
|
|
170
170
|
}
|
|
171
171
|
`}
|
|
172
|
-
`,jo=
|
|
173
|
-
${({theme:e,$color:
|
|
174
|
-
color: ${
|
|
172
|
+
`,jo=y.styled(it)`
|
|
173
|
+
${({theme:e,$color:n=e.palette.gray[600],$content:o=void 0,$display:i="inline",$fontWeight:r="regular",$size:a,$lineSpacing:l=1.25})=>`
|
|
174
|
+
color: ${n};
|
|
175
175
|
display: ${i};
|
|
176
176
|
font-family: ${e.typography.type.primary};
|
|
177
177
|
font-size: ${e.typography.text[a]};
|
|
@@ -182,9 +182,9 @@
|
|
|
182
182
|
|
|
183
183
|
${o===void 0?"":`&::after { content: "${o}"; }`}
|
|
184
184
|
`}
|
|
185
|
-
`,J=u.forwardRef(function({bgGradient:
|
|
186
|
-
${({$clickable:e,$color:
|
|
187
|
-
color: ${
|
|
185
|
+
`,J=u.forwardRef(function({bgGradient:n,children:o,className:i,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,overflow:g,size:x,sizeMd:h,sizeSm:b,textFill:w,whiteSpace:$,wordBreak:j,...v},C){return t.jsx(vo,{$bgGradient:n,$color:r,$display:a,$fontFamily:l,$fontWeight:s,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$overflow:g,$size:x,$sizeMd:h,$sizeSm:b,$textFill:w,$whiteSpace:$,$wordBreak:j,className:i,ref:C,...v,children:o})}),he=u.forwardRef(function({children:n,color:o,content:i,display:r,fontFamily:a,fontWeight:l,letterSpacing:s,lineSpacing:c,lineSpacingSm:d,size:p,sizeMd:g,sizeSm:x,...h},b){return t.jsx(jo,{$color:o,$content:i,$display:r,$fontFamily:a,$fontWeight:l,$letterSpacing:s,$lineSpacing:c,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:x,ref:b,...h,children:n})}),N=u.forwardRef(function({bgGradient:n,children:o,className:i,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,overflow:g,size:x,sizeMd:h,sizeSm:b,textFill:w,whiteSpace:$,wordBreak:j,fontStyle:v,...C},k){return t.jsx(Dt,{$bgGradient:n,$color:r,$display:a,$fontFamily:l,$fontStyle:v,$fontWeight:s,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$overflow:g,$size:x,$sizeMd:h,$sizeSm:b,$textFill:w,$whiteSpace:$,$wordBreak:j,className:i,ref:k,...C,children:o})}),Rt=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(N,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs(m,{display:"block",id:`panel-${e.title}`,padding:[.875,.875,.875,.875],children:[n,e.extraElement?t.jsx(m,{children:e.extraElement}):void 0]})},_e={xl:"24px",lg:"16px",md:"14px",sm:"12px",xs:"10px"},ko=e=>_e[e]?_e[e]:typeof e=="string"&&e.includes("px")?e:_e.md,Co=y.styled(it)`
|
|
186
|
+
${({$clickable:e,$color:n="inherit",$disabled:o=!1,$hoverColor:i,$rotation:r,$size:a,$secondaryColor:l})=>{const s=i?"":"brightness(50%)",c=i??"";return`
|
|
187
|
+
color: ${n};
|
|
188
188
|
cursor: ${e?"pointer":"inherit"};
|
|
189
189
|
font-size: ${ko(a)};
|
|
190
190
|
line-height: 0;
|
|
@@ -211,14 +211,14 @@
|
|
|
211
211
|
color: ${c};
|
|
212
212
|
}`:""}
|
|
213
213
|
`}}
|
|
214
|
-
`;
|
|
214
|
+
`;y.styled.div`
|
|
215
215
|
cursor: pointer;
|
|
216
216
|
transition: all 0.2s ease-in-out;
|
|
217
217
|
|
|
218
218
|
&:hover:not([disabled]) {
|
|
219
219
|
transform: scale(1.2);
|
|
220
220
|
}
|
|
221
|
-
`;const D=u.forwardRef(function({clickable:
|
|
221
|
+
`;const D=u.forwardRef(function({clickable:n,disabled:o,hoverColor:i,icon:r,iconClass:a="",iconColor:l,iconMask:s,iconSize:c,iconTransform:d,iconType:p="fa-solid",onClick:g,rotation:x,spanClass:h,secondaryColor:b,...w},$){return t.jsx(Co,{$clickable:n,$color:l,$disabled:o,$hoverColor:i,$rotation:x,$secondaryColor:b,$size:c,className:h,"data-testid":`${r}-icon`,onClick:g,ref:$,...w,children:t.jsx("i",{className:`${p} fa-${r} ${a}`,...s!==void 0?{"data-fa-mask":s}:{},...d!==void 0?{"data-fa-transform":d}:{}})},`${p}-${r}`)}),So=u.forwardRef(function({aligned:n="end",items:o,bgColor:i},r){const a=y.useTheme(),[l,s]=u.useState(o.map(d=>d.expanded??!1)),c=u.useCallback(d=>p=>{p.preventDefault(),s(g=>g.map((x,h)=>h===d?!x:x))},[]);return t.jsx(m,{borderColor:a.palette.gray[200],borderTop:"1px solid",ref:r,children:o.map((d,p)=>{const g=l[p];return t.jsxs(m,{bgColor:i??a.palette.white,borderBottom:"1px solid",borderColor:a.palette.gray[200],children:[t.jsx(m,{"aria-controls":`panel-${d.title}`,"aria-expanded":g,"aria-label":d.title,as:"button",bgColor:i??a.palette.white,bgColorHover:a.palette.gray[100],cursor:"pointer",display:"flex",onClick:c(p),padding:[.875,.875,.875,.875],width:"100%",children:t.jsxs(m,{as:"summary",display:"flex",flexDirection:n==="end"?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[t.jsx(N,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:d.title}),t.jsx(D,{icon:g?"chevron-up":"chevron-down",iconColor:a.palette.gray[400],iconSize:"lg",iconType:"fa-light"})]})}),g&&t.jsx(Rt,{item:d})]},d.title)})})}),zo=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:To}=X(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]};
|
|
@@ -270,8 +270,8 @@
|
|
|
270
270
|
color: ${e.palette.warning[700]};
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`})),Io=
|
|
274
|
-
${({theme:e,$variant:
|
|
273
|
+
`})),Io=y.styled.div`
|
|
274
|
+
${({theme:e,$variant:n})=>`
|
|
275
275
|
background: transparent;
|
|
276
276
|
align-items: center;
|
|
277
277
|
border-radius: ${e.spacing[.25]};
|
|
@@ -290,12 +290,12 @@
|
|
|
290
290
|
background-color: transparent;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
${To(e,
|
|
293
|
+
${To(e,n??"error")}
|
|
294
294
|
`}
|
|
295
|
-
`,Eo=
|
|
295
|
+
`,Eo=y.styled.div`
|
|
296
296
|
padding-right: 4px;
|
|
297
297
|
width: 100%;
|
|
298
|
-
`,{getVariant:
|
|
298
|
+
`,{getVariant:No}=X(e=>({ghost:`
|
|
299
299
|
background: transparent;
|
|
300
300
|
border: none;
|
|
301
301
|
color: ${e.palette.gray[800]};
|
|
@@ -369,8 +369,8 @@
|
|
|
369
369
|
background-color: ${e.palette.primary[500]};
|
|
370
370
|
color: ${e.palette.white};
|
|
371
371
|
}
|
|
372
|
-
`})),Ft=
|
|
373
|
-
${({theme:e,justify:
|
|
372
|
+
`})),Ft=y.styled(nt)`
|
|
373
|
+
${({theme:e,justify:n,$variant:o,$notification:i,$icon:r})=>`
|
|
374
374
|
align-items: center;
|
|
375
375
|
border-radius: var(--btn-spacing);
|
|
376
376
|
cursor: pointer;
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
font-size: ${e.typography.text.sm};
|
|
380
380
|
font-weight: ${e.typography.weight.regular};
|
|
381
381
|
gap: var(--btn-spacing);
|
|
382
|
-
justify-content: ${
|
|
382
|
+
justify-content: ${n??"center"};
|
|
383
383
|
line-height: ${e.spacing[1.25]};
|
|
384
384
|
padding: var(--btn-padding-y) var(--btn-padding-x);
|
|
385
385
|
position: relative;
|
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
${o!=="link"?`--btn-padding-y: ${e.spacing[1]}`:""};
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
${
|
|
394
|
+
${No(e,o??"primary")}
|
|
395
395
|
|
|
396
396
|
${i?`
|
|
397
397
|
::before {
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
}
|
|
407
407
|
`:""}
|
|
408
408
|
`}
|
|
409
|
-
`,Do=
|
|
409
|
+
`,Do=y.styled.div`
|
|
410
410
|
${({theme:e})=>`
|
|
411
411
|
align-items: center;
|
|
412
412
|
background-color: ${e.palette.primary[400]};
|
|
@@ -421,8 +421,8 @@
|
|
|
421
421
|
line-height: 18px;
|
|
422
422
|
padding: ${e.spacing[.125]} 7px;
|
|
423
423
|
`}
|
|
424
|
-
`,
|
|
425
|
-
${({theme:e,disabled:
|
|
424
|
+
`,Ro=y.styled(Ft)`
|
|
425
|
+
${({theme:e,disabled:n,borderRadius:o="4px",px:i=.5,py:r=.5,$variant:a})=>`
|
|
426
426
|
--btn-spacing: ${o};
|
|
427
427
|
--btn-padding-x: ${e.spacing[i]};
|
|
428
428
|
--btn-padding-y: ${e.spacing[r]};
|
|
@@ -434,61 +434,46 @@
|
|
|
434
434
|
|
|
435
435
|
> span {
|
|
436
436
|
margin: 0 !important;
|
|
437
|
-
${
|
|
437
|
+
${n?`color: ${e.palette.gray[300]};`:""}
|
|
438
438
|
}
|
|
439
439
|
`}
|
|
440
|
-
`,Fo=
|
|
441
|
-
${({theme:e,$maxWidth:
|
|
440
|
+
`,Fo=y.styled(Se)``,Lo=y.styled.div`
|
|
441
|
+
${({theme:e,$maxWidth:n="320px"})=>`
|
|
442
442
|
background-color: ${e.palette.gray[700]};
|
|
443
443
|
border-radius: 8px;
|
|
444
444
|
color: ${e.palette.white};
|
|
445
445
|
font-size: ${e.typography.text.xs};
|
|
446
|
-
max-width: ${
|
|
446
|
+
max-width: ${n};
|
|
447
447
|
padding: ${e.spacing[.75]};
|
|
448
448
|
width: max-content;
|
|
449
449
|
z-index: 999999;
|
|
450
450
|
`}
|
|
451
|
-
`,
|
|
451
|
+
`,Ao=y.styled.div`
|
|
452
452
|
position: absolute;
|
|
453
|
-
width:
|
|
454
|
-
height:
|
|
455
|
-
${({placement:e
|
|
456
|
-
bottom:
|
|
453
|
+
width: 16px;
|
|
454
|
+
height: 8px;
|
|
455
|
+
${({$placement:e})=>{switch(e){case"top":return`
|
|
456
|
+
bottom: -8px;
|
|
457
457
|
left: 50%;
|
|
458
458
|
transform: translateX(-50%);
|
|
459
|
-
border-left: ${o} solid transparent;
|
|
460
|
-
border-right: ${o} solid transparent;
|
|
461
|
-
border-top: ${o} solid ${i};
|
|
462
459
|
`;case"bottom":return`
|
|
463
|
-
top:
|
|
460
|
+
top: -8px;
|
|
464
461
|
left: 50%;
|
|
465
|
-
transform: translateX(-50%);
|
|
466
|
-
border-left: ${o} solid transparent;
|
|
467
|
-
border-right: ${o} solid transparent;
|
|
468
|
-
border-bottom: ${o} solid ${i};
|
|
462
|
+
transform: translateX(-50%) rotate(180deg);
|
|
469
463
|
`;case"left":return`
|
|
470
|
-
right:
|
|
464
|
+
right: -12px;
|
|
471
465
|
top: 50%;
|
|
472
|
-
transform: translateY(-50%);
|
|
473
|
-
border-top: ${o} solid transparent;
|
|
474
|
-
border-bottom: ${o} solid transparent;
|
|
475
|
-
border-left: ${o} solid ${i};
|
|
466
|
+
transform: translateY(-50%) rotate(-90deg);
|
|
476
467
|
`;case"right":return`
|
|
477
|
-
left:
|
|
468
|
+
left: -12px;
|
|
478
469
|
top: 50%;
|
|
479
|
-
transform: translateY(-50%);
|
|
480
|
-
border-top: ${o} solid transparent;
|
|
481
|
-
border-bottom: ${o} solid transparent;
|
|
482
|
-
border-right: ${o} solid ${i};
|
|
470
|
+
transform: translateY(-50%) rotate(90deg);
|
|
483
471
|
`;default:return`
|
|
484
|
-
top:
|
|
472
|
+
top: -8px;
|
|
485
473
|
left: 50%;
|
|
486
|
-
transform: translateX(-50%);
|
|
487
|
-
border-left: ${o} solid transparent;
|
|
488
|
-
border-right: ${o} solid transparent;
|
|
489
|
-
border-bottom: ${o} solid ${i};
|
|
474
|
+
transform: translateX(-50%) rotate(180deg);
|
|
490
475
|
`}}}
|
|
491
|
-
`,
|
|
476
|
+
`,V=({children:e,disabled:n=!1,display:o="inline-block",height:i,icon:r,iconColor:a,iconSize:l,id:s,maxWidth:c,nodeTip:d,place:p="bottom",tip:g="",title:x="",hide:h=g===""&&x===""&&d===void 0,width:b})=>{const w=y.useTheme(),[$,j]=u.useState(!1),{refs:v,floatingStyles:C,context:k,placement:z}=f.useFloating({middleware:[f.flip({fallbackAxisSideDirection:"start"}),f.offset({mainAxis:10}),f.shift()],onOpenChange:j,open:$,placement:p,whileElementsMounted:f.autoUpdate}),I=f.useHover(k,{delay:{close:0,open:500},move:!1}),T=f.useFocus(k),S=f.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:L,getFloatingProps:E}=f.useInteractions([I,T,S]),A=u.useMemo(()=>z.startsWith("top")?"top":z.startsWith("bottom")?"bottom":z.startsWith("left")?"left":z.startsWith("right")?"right":"bottom",[z]);return n?t.jsx(u.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Fo,{...L(),display:o,height:i,id:s,ref:v.setReference,width:b,children:r?t.jsx(D,{clickable:!0,disabled:n,icon:r,iconColor:a,iconSize:l??"sm",iconType:$?"fa-solid":"fa-light"}):e}),$&&!h&&le.createPortal(t.jsxs(Lo,{...E(),$maxWidth:c,id:`floating-${s}`,ref:v.setFloating,style:C,children:[f.lodashExports.isEmpty(x)?void 0:t.jsx(N,{color:w.palette.white,fontWeight:"bold",lineSpacing:1.5,mb:.25,size:"xs",textAlign:"start",wordWrap:"break-word",children:x}),f.lodashExports.isEmpty(g)?void 0:t.jsx(N,{color:w.palette.gray[100],lineSpacing:1.5,size:"xs",textAlign:"start",whiteSpace:"normal",wordWrap:"break-word",children:g}),f.lodashExports.isEmpty(d)?void 0:d,t.jsx(Ao,{$placement:A,children:t.jsx("svg",{fill:"none",height:"8",viewBox:"0 0 16 8",width:"16",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16 0L0 0L6.58579 6.58579C7.36684 7.36684 8.63317 7.36684 9.41421 6.58579L16 0Z",fill:w.palette.gray[700]})})})]}),document.getElementById("root")??document.body)]})},W=u.forwardRef(function({borderRadius:n,disabled:o,icon:i,iconColor:r,iconSize:a="sm",iconTransform:l,iconType:s,id:c,justify:d="center",onClick:p,px:g,py:x,type:h="button",tooltip:b,tooltipPlace:w,value:$,variant:j="primary",...v},C){const k=t.jsx(Ro,{$variant:j,"aria-disabled":o,"aria-label":c,borderRadius:n,disabled:o,id:c,justify:d,onClick:p,px:g,py:x,ref:C,type:h,value:$,...v,children:t.jsx(D,{clickable:!1,icon:i,iconColor:r,iconSize:a,iconTransform:l,iconType:s})}),I=(h+(j??"")+(c??i)).replace(/ /u,"_");return b===void 0?k:t.jsx(V,{id:`${I}-tooltip`,place:w,tip:b,children:k})}),Po=u.forwardRef(function({autoHide:n=!1,children:o,closable:i=!1,iconEnabled:r=!0,onTimeOut:a,show:l=!0,time:s=8,variant:c="error",id:d,...p},g){const[x,h]=u.useState(l),b=u.useCallback(()=>{h(!1)},[]);return u.useEffect(()=>{const w=setTimeout(()=>{a==null||a(!0),n&&b()},s*1e3);return()=>{clearTimeout(w)}},[n,b,s,a]),u.useEffect(()=>{h(l)},[l,h]),t.jsx(m,{display:x?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(Io,{$variant:c,id:d,children:[r?t.jsx(D,{clickable:!1,icon:zo(c),iconSize:"lg",iconType:"fa-light"}):void 0,t.jsx(Eo,{children:o}),i?t.jsx(W,{height:"fit-content",icon:"close",iconSize:"lg",iconType:"fa-light",onClick:b,px:.125,py:.125,variant:"ghost"}):void 0]})})}),yt=y.styled.div`
|
|
492
477
|
${({theme:e})=>`
|
|
493
478
|
align-items: center;
|
|
494
479
|
background-color: ${e.palette.gray[200]};
|
|
@@ -504,7 +489,7 @@
|
|
|
504
489
|
width: ${e.spacing[1.25]};
|
|
505
490
|
height: ${e.spacing[1.25]};
|
|
506
491
|
`}
|
|
507
|
-
`,Oo=
|
|
492
|
+
`,Oo=y.styled.div`
|
|
508
493
|
ul,
|
|
509
494
|
ol {
|
|
510
495
|
padding-top: 6px;
|
|
@@ -643,14 +628,14 @@
|
|
|
643
628
|
background-color: ${e.palette.warning[400]};
|
|
644
629
|
color: ${e.palette.warning[700]};
|
|
645
630
|
}
|
|
646
|
-
`})),Wo=
|
|
647
|
-
${({theme:e,$fontSize:
|
|
631
|
+
`})),Wo=y.styled.span`
|
|
632
|
+
${({theme:e,$fontSize:n=e.typography.text.xs,$variant:o})=>`
|
|
648
633
|
align-items: center;
|
|
649
634
|
border-radius: ${e.spacing[o==="technique"?1:.25]};
|
|
650
635
|
display: inline-flex;
|
|
651
636
|
gap: ${e.spacing[.25]};
|
|
652
637
|
font-family: ${e.typography.type.primary};
|
|
653
|
-
font-size: ${
|
|
638
|
+
font-size: ${n};
|
|
654
639
|
font-style: normal;
|
|
655
640
|
font-weight: ${e.typography.weight.regular};
|
|
656
641
|
justify-content: center;
|
|
@@ -666,7 +651,7 @@
|
|
|
666
651
|
|
|
667
652
|
${Mo(e,o)}
|
|
668
653
|
`}
|
|
669
|
-
`,{getVariant:
|
|
654
|
+
`,{getVariant:Bo}=X(e=>({highRelevance:`
|
|
670
655
|
color: ${e.palette.primary[500]};
|
|
671
656
|
|
|
672
657
|
&:hover:not([disabled]) {
|
|
@@ -678,8 +663,8 @@
|
|
|
678
663
|
&:hover:not([disabled]) {
|
|
679
664
|
color: ${e.palette.gray[500]};
|
|
680
665
|
}
|
|
681
|
-
`})),
|
|
682
|
-
${({theme:e,$color:
|
|
666
|
+
`})),Lt=y.css`
|
|
667
|
+
${({theme:e,$color:n,$variant:o,$wrap:i})=>`
|
|
683
668
|
align-items: center;
|
|
684
669
|
cursor: pointer;
|
|
685
670
|
font-family: ${e.typography.type.primary};
|
|
@@ -705,13 +690,13 @@
|
|
|
705
690
|
text-decoration: none;
|
|
706
691
|
}
|
|
707
692
|
|
|
708
|
-
${
|
|
693
|
+
${n?`color: ${n}`:Bo(e,o)}
|
|
709
694
|
`}
|
|
710
|
-
`,
|
|
711
|
-
${
|
|
712
|
-
`,_o=
|
|
713
|
-
${
|
|
714
|
-
`,Q=({children:e,color:
|
|
695
|
+
`,Ho=y.styled.a`
|
|
696
|
+
${Lt}
|
|
697
|
+
`,_o=y.styled(Ue.Link)`
|
|
698
|
+
${Lt}
|
|
699
|
+
`,Q=({children:e,color:n,download:o,href:i,iconPosition:r="right",onClick:a,target:l,variant:s="lowRelevance",wrap:c=!1})=>{const d=i.startsWith("https://"),p=t.jsx(D,{icon:o===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"sm",iconType:"fa-light",ml:.25,mr:.25});return d?t.jsxs(Ho,{$color:n,$variant:s,$wrap:c,download:o,href:i,onClick:a,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(_o,{$variant:s,$wrap:c,download:o,onClick:a,rel:"nofollow noopener noreferrer",target:l,to:i,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},Y=({disabled:e,icon:n,iconColor:o="inherit",iconType:i="fa-light",id:r="close-tag",filterValues:a="",fontSize:l,href:s,linkLabel:c,onClose:d,priority:p="default",tagTitle:g="",tagLabel:x,variant:h="default"})=>{const b=x.length>25&&f.lodashExports.isEmpty(g+a),w=`${x.slice(0,25)}...`;return t.jsxs(he,{className:"gap-0.5",display:s===void 0?"initial":"flex",size:"sm",children:[t.jsxs(Wo,{$fontSize:l,$variant:h,className:p,children:[n&&t.jsx(D,{icon:n,iconColor:o,iconSize:"sm",iconType:i}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:g}),t.jsx("span",{children:b?w:x}),t.jsx("strong",{className:"w-full",children:a})]}),d?t.jsx(W,{disabled:e,icon:"xmark",iconSize:"sm",iconType:"fa-light",id:r,onClick:d,px:.125,py:.125,variant:"ghost"}):void 0]}),s===void 0?void 0:t.jsx(Q,{href:s,children:c})]})},At=(e,n=!0)=>{const o=window.open(e,n?void 0:"_self","noopener,noreferrer,");f.lodashExports.isObject(o)&&(o.opener=null)},O=u.forwardRef(function({children:n,disabled:o=!1,external:i=!1,href:r,id:a,icon:l,iconColor:s,iconType:c,name:d,dotNotification:p,notification:g,onClick:x,rightIcon:h,tag:b,type:w="button",tooltip:$,tooltipPlace:j="bottom",underline:v=!1,value:C,variant:k="primary",width:z,...I},T){const S=$!==void 0,L=`${a}-tooltip`,E=u.useCallback(()=>{r&&At(r,i)},[i,r]),A=t.jsxs(Ft,{$icon:l!==void 0,$notification:p&&k==="ghost"&&!o,$variant:k,"aria-disabled":o,className:v?"underline":void 0,disabled:o,id:a,name:d,onClick:k==="link"?E:x,ref:T,type:w,value:C,width:z,...S?{"data-tooltip-id":L}:{},...I,children:[l!==void 0&&t.jsx(D,{icon:l,iconColor:s??void 0,iconSize:"lg",iconType:c??"fa-light"}),n,h||k==="link"?t.jsx(D,{icon:h??"arrow-right",iconSize:"lg",iconType:"fa-light"}):void 0,b===void 0||o?null:t.jsx(Y,{tagLabel:b,variant:"default"}),g!==void 0&&k==="ghost"&&!o?t.jsx(Do,{children:g}):void 0]});return S?t.jsx(V,{disabled:!S,id:L,place:j,tip:$,width:z,children:A}):A}),Vo=u.forwardRef(function({children:n,onClick:o,userName:i,showIcon:r=!1,showUsername:a=!1},l){const s=!!o;return t.jsx(m,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs(m,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[s?t.jsxs(O,{onClick:o,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(yt,{children:i[0].toUpperCase()}),a?t.jsx(N,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:i.split(" ")[0]}):void 0,r?t.jsx(D,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}):t.jsxs(m,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(yt,{children:i[0].toUpperCase()}),a?t.jsxs(N,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",i.split(" ")[0],"!"]}):void 0,r?t.jsx(D,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}),t.jsx(Oo,{children:n})]})})}),Fe=({authorEmail:e,date:n,description:o,descriptionColor:i,id:r,title:a,titleColor:l,textAlign:s,textSpacing:c=0,tooltip:d})=>{const p=y.useTheme();return t.jsxs(m,{width:"100%",children:[typeof a=="string"||d?t.jsxs(m,{alignItems:"center",display:"inline-flex",gap:.5,width:"100%",children:[typeof a=="string"?t.jsx(N,{color:l??p.palette.gray[800],fontWeight:"bold",mb:c,size:"sm",textAlign:s,wordBreak:"break-word",children:a}):a,d&&t.jsx(V,{icon:"circle-info",id:r,place:"top",tip:d})]}):void 0,t.jsxs(m,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[o&&t.jsx(N,{color:i??p.palette.gray[800],fontWeight:o===void 0?"bold":"regular",size:"sm",textAlign:s,wordBreak:"break-word",children:o}),n&&t.jsx(N,{color:p.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:s,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(N,{color:p.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:s,wordBreak:"break-word",children:`Author: ${e}`})]})]})},bt=y.styled(m).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
715
700
|
& img {
|
|
716
701
|
display: block;
|
|
717
702
|
}
|
|
@@ -726,8 +711,8 @@
|
|
|
726
711
|
pointer-events: none;
|
|
727
712
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
728
713
|
}
|
|
729
|
-
`,Uo=e=>{if(
|
|
730
|
-
${({theme:e,$align:
|
|
714
|
+
`,Uo=e=>{if(f._.isNil(e))return"";const n=e.split(".");return(n.length>1?f._.last(n):"").toLowerCase()},Go=(e,n)=>f._.isUndefined(n)?!1:f._.includes(e,Uo(n)),Pt=({alt:e,fileType:n,width:o="100%",opacity:i=0,src:r,height:a="auto",videoViewStatus:l})=>{const[s,c]=u.useState({start:!1,half:!1,end:!1}),d=u.useCallback(p=>{if(!l)return;const g=p.target,x=g.currentTime/g.duration*100;x>5&&x<50?(s.start||l("start"),c({start:!0,half:!1,end:!1})):x>=50&&x<99?(s.half||l("half"),c({start:!0,half:!0,end:!1})):x>=99?(s.end||l("end"),c({start:!0,half:!0,end:!0})):c({start:!1,half:!1,end:!1})},[l,s]);return n==="video"||Go(["webm"],r)?t.jsx(bt,{$opacity:i,children:t.jsx(Q,{href:r,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:d,style:{height:a,width:o},children:[t.jsx("source",{src:r,type:"video/webm"}),r]})})}):t.jsx(bt,{$opacity:i,children:t.jsx("img",{alt:e,src:r,style:{height:a,width:o}})})},Yo=({alt:e,authorEmail:n,date:o,description:i,src:r,children:a,isEditing:l,onClick:s,title:c,hideDescription:d=!1,headerType:p="image",showMaximize:g=!0,videoViewStatus:x})=>{const h=y.useTheme(),[b,w]=u.useState(!1),$=u.useCallback(()=>{w(!0)},[]),j=u.useCallback(()=>{w(!1)},[]);return t.jsxs(m,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:$,onLeave:j,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx(m,{bgColor:h.palette.black,borderRadius:h.spacing[.25],cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:s,position:"relative",width:"100%",children:a===void 0?t.jsxs(tt.default.Fragment,{children:[t.jsx(Pt,{alt:e,fileType:p,height:"147px",opacity:b?.3:0,src:r,videoViewStatus:x,width:"100%"}),g?t.jsx(m,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(W,{color:"white",icon:"arrows-maximize",iconSize:"sm",iconType:"fa-light",variant:"secondary"})}):void 0]}):a}),d?null:t.jsx(Fe,{authorEmail:n,date:o,description:i,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:c})]})},Ko=y.styled.div`
|
|
715
|
+
${({theme:e,$align:n="center",$minWidth:o="auto",$minHeight:i="auto"})=>`
|
|
731
716
|
display: flex;
|
|
732
717
|
background-color: ${e.palette.white};
|
|
733
718
|
border-radius: ${e.spacing[.25]};
|
|
@@ -742,10 +727,10 @@
|
|
|
742
727
|
input {
|
|
743
728
|
color: ${e.palette.gray[800]};
|
|
744
729
|
line-height: ${e.spacing[1.5]};
|
|
745
|
-
text-align: ${
|
|
730
|
+
text-align: ${n};
|
|
746
731
|
}
|
|
747
732
|
`}
|
|
748
|
-
`,rt=({htmlFor:e,label:
|
|
733
|
+
`,rt=({htmlFor:e,label:n,link:o,required:i,tooltip:r,weight:a="normal"})=>{const l=y.useTheme(),s=`${e}-tooltip`,c=r!==void 0&&!f.lodashExports.isEmpty(r);return t.jsxs("label",{className:"flex gap-1 w-full",htmlFor:e,style:{fontWeight:l.typography.weight[a]},children:[n,i&&t.jsx(D,{icon:"asterisk",iconColor:l.palette.error[500],iconSize:"xs",spanClass:"required-icon"}),c?t.jsx(V,{display:"inline-flex",icon:"circle-info",id:s,place:"top",tip:r}):null,o?t.jsx(Q,{href:o,target:"_blank"}):null]})},Zo=y.styled.div`
|
|
749
734
|
${({theme:e})=>`
|
|
750
735
|
align-items: flex-start;
|
|
751
736
|
display: inline-flex;
|
|
@@ -792,8 +777,8 @@
|
|
|
792
777
|
line-height: ${e.spacing[1.25]};
|
|
793
778
|
}
|
|
794
779
|
`}
|
|
795
|
-
`,oe=
|
|
796
|
-
${({theme:e,$overflowX:
|
|
780
|
+
`,oe=y.styled.div`
|
|
781
|
+
${({theme:e,$overflowX:n})=>`
|
|
797
782
|
align-items: center;
|
|
798
783
|
display: flex;
|
|
799
784
|
border-radius: ${e.spacing[.5]};
|
|
@@ -803,8 +788,8 @@
|
|
|
803
788
|
gap: ${e.spacing[.625]};
|
|
804
789
|
justify-content: space-between;
|
|
805
790
|
height: 40px;
|
|
806
|
-
overflow-x: ${
|
|
807
|
-
padding: ${
|
|
791
|
+
overflow-x: ${n??"unset"};
|
|
792
|
+
padding: ${n===void 0?`${e.spacing[.625]} ${e.spacing[.75]}`:`${e.spacing[.25]} ${e.spacing[.75]}`};
|
|
808
793
|
width: 100%;
|
|
809
794
|
white-space: nowrap;
|
|
810
795
|
|
|
@@ -898,10 +883,10 @@
|
|
|
898
883
|
border: 1px solid ${e.palette.gray[600]};
|
|
899
884
|
}
|
|
900
885
|
`}
|
|
901
|
-
`,
|
|
886
|
+
`,qo=y.styled.div`
|
|
902
887
|
width: fit-content;
|
|
903
888
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
904
|
-
border-radius:
|
|
889
|
+
border-radius: ${({theme:e})=>e.spacing[.5]};
|
|
905
890
|
background: none;
|
|
906
891
|
color: ${({theme:e})=>e.palette.black};
|
|
907
892
|
font-family: ${({theme:e})=>e.typography.type.primary};
|
|
@@ -911,7 +896,7 @@
|
|
|
911
896
|
align-items: center;
|
|
912
897
|
justify-content: center;
|
|
913
898
|
padding: 0.5em;
|
|
914
|
-
`,Xo=
|
|
899
|
+
`,Xo=y.styled.input`
|
|
915
900
|
width: 4em;
|
|
916
901
|
appearance: textfield;
|
|
917
902
|
border-style: none;
|
|
@@ -931,12 +916,12 @@
|
|
|
931
916
|
&::-webkit-inner-spin-button {
|
|
932
917
|
opacity: 1;
|
|
933
918
|
}
|
|
934
|
-
`,Jo=
|
|
935
|
-
${({theme:e,$show:
|
|
919
|
+
`,Jo=y.styled.div`
|
|
920
|
+
${({theme:e,$show:n})=>`
|
|
936
921
|
align-items: center;
|
|
937
922
|
align-self: stretch;
|
|
938
923
|
color: ${e.palette.error[500]};
|
|
939
|
-
display: ${
|
|
924
|
+
display: ${n?"flex":"none"};
|
|
940
925
|
font-family: ${e.typography.type.primary};
|
|
941
926
|
font-size: ${e.typography.text.xs};
|
|
942
927
|
font-weight: ${e.typography.weight.regular};
|
|
@@ -944,8 +929,8 @@
|
|
|
944
929
|
line-height: 18px;
|
|
945
930
|
text-align: left;
|
|
946
931
|
`}
|
|
947
|
-
`,
|
|
948
|
-
${({theme:e,$multiSelection:
|
|
932
|
+
`,U=({children:e,disabled:n,id:o,error:i,helpLink:r,helpLinkText:a="Link here",helpText:l,htmlFor:s,label:c,linkPosition:d="down",maxLength:p,required:g,tooltip:x,value:h,weight:b})=>{const w=y.useTheme(),$=h?h.length:0;return t.jsxs(Zo,{id:o,children:[c===void 0?void 0:t.jsx(rt,{htmlFor:s,label:c,link:d==="up"?r:void 0,required:g,tooltip:x,weight:b}),e,i||p?t.jsxs(m,{display:"flex",justify:i===void 0?"end":"space-between",width:"100%",children:[i&&t.jsx(N,{className:"error-msg",color:w.palette.error[500],display:"block",lineSpacing:1,size:"sm",children:i}),p&&t.jsx(Y,{priority:"low",tagLabel:`${$}/${p}`,variant:n?"inactive":"error"})]}):void 0,l||r?t.jsxs(m,{alignItems:"center",display:"flex",gap:.25,width:"100%",children:[l&&t.jsxs(t.Fragment,{children:[t.jsx(D,{icon:"circle-info",iconColor:w.palette.gray[400],iconSize:"sm",iconType:"fa-light"}),t.jsx(N,{color:w.palette.gray[400],display:"inline-block",size:"sm",children:l})]}),r&&d==="down"?t.jsx(Q,{href:r,children:a}):void 0]}):void 0]})},ze=({className:e,children:n,isFilter:o=!1,popoverRef:i,state:r,triggerRef:a,...l})=>{var x;const s=y.useTheme(),c=u.useRef(null),d=(x=a==null?void 0:a.current)==null?void 0:x.getBoundingClientRect(),{popoverProps:p}=f.$f2f8a6077418541e$export$542a6fd13ac93354({...l,popoverRef:i??c,triggerRef:a,isNonModal:i?!0:void 0,shouldFlip:e==="dropdown"},r),g=u.useCallback(h=>{h.preventDefault()},[]);return t.jsx(f.$337b884510726a0d$export$c6fdb837b070b4ff,{children:t.jsx("div",{...p,className:e,id:"popover",onPointerDown:o?g:void 0,ref:i??c,style:{...p.style,maxHeight:300,overflowY:"auto",scrollbarColor:`${s.palette.gray[600]} ${s.palette.gray[100]}`,scrollPadding:s.spacing[.5],...e==="dropdown"?{display:"flex",justifyContent:"center",width:d==null?void 0:d.width}:{}},children:n})})},Qo=y.styled.ul`
|
|
933
|
+
${({theme:e,$multiSelection:n})=>`
|
|
949
934
|
align-self: center;
|
|
950
935
|
background: ${e.palette.white};
|
|
951
936
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -961,11 +946,11 @@
|
|
|
961
946
|
width: 95%;
|
|
962
947
|
|
|
963
948
|
> li:first-child {
|
|
964
|
-
border-bottom: ${
|
|
949
|
+
border-bottom: ${n?`1px solid ${e.palette.gray[200]}`:"unset"};
|
|
965
950
|
}
|
|
966
951
|
`}
|
|
967
|
-
`,ei=
|
|
968
|
-
${({theme:e,$multiSelection:
|
|
952
|
+
`,ei=y.styled.li`
|
|
953
|
+
${({theme:e,$multiSelection:n})=>`
|
|
969
954
|
align-items: center;
|
|
970
955
|
color: ${e.palette.gray[800]};
|
|
971
956
|
cursor: pointer;
|
|
@@ -973,12 +958,12 @@
|
|
|
973
958
|
gap: ${e.spacing[.5]};
|
|
974
959
|
justify-content: space-between;
|
|
975
960
|
line-height: ${e.spacing[1.25]};
|
|
976
|
-
padding: ${
|
|
961
|
+
padding: ${n?`${e.spacing[.125]} ${e.spacing[.75]}`:`${e.spacing[.25]} ${e.spacing[1]}`};
|
|
977
962
|
|
|
978
963
|
a, p, label {
|
|
979
964
|
display: inline-flex;
|
|
980
965
|
overflow: hidden;
|
|
981
|
-
padding: ${
|
|
966
|
+
padding: ${n?e.spacing[.25]:"0"};
|
|
982
967
|
width: 100%;
|
|
983
968
|
}
|
|
984
969
|
|
|
@@ -995,7 +980,7 @@
|
|
|
995
980
|
}
|
|
996
981
|
|
|
997
982
|
&.selected {
|
|
998
|
-
background: ${
|
|
983
|
+
background: ${n?"unset":e.palette.gray[200]};
|
|
999
984
|
}
|
|
1000
985
|
|
|
1001
986
|
&.disabled {
|
|
@@ -1007,7 +992,7 @@
|
|
|
1007
992
|
}
|
|
1008
993
|
}
|
|
1009
994
|
`}
|
|
1010
|
-
`,ti=
|
|
995
|
+
`,ti=y.styled.label`
|
|
1011
996
|
${({theme:e})=>`
|
|
1012
997
|
align-items: center;
|
|
1013
998
|
color: ${e.palette.gray[600]};
|
|
@@ -1079,7 +1064,7 @@
|
|
|
1079
1064
|
fill: ${e.palette.white};
|
|
1080
1065
|
}
|
|
1081
1066
|
`}
|
|
1082
|
-
`,re=u.forwardRef(function({checked:
|
|
1067
|
+
`,re=u.forwardRef(function({checked:n,disabled:o=!1,label:i,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:c,tooltip:d,value:p,...g},x){return t.jsxs("div",{className:"gap-1 inline-flex items-start",children:[t.jsxs(ti,{"aria-disabled":o,children:[t.jsx("input",{"aria-checked":n,"aria-disabled":o,"aria-hidden":!1,"aria-label":r,checked:n,"data-testid":i??p,disabled:o,id:r,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:c,ref:x,type:"checkbox",value:p,...g}),t.jsx(D,{disabled:o,icon:"check",iconSize:"xl"}),i??p]}),d===void 0?void 0:t.jsx(V,{icon:"circle-info",id:d,place:"right",tip:d})]})}),ee=(e,n,o=!1,i)=>{u.useEffect(()=>{var a;const r=l=>{e&&!e.contains(l.target)&&!(i!=null&&i.contains(l.target))&&n()};return o?(document.addEventListener("mousedown",r,!0),()=>{document.removeEventListener("mousedown",r,!0)}):((a=document.getElementById("root"))==null||a.addEventListener("mousedown",r,!0),()=>{var l;(l=document.getElementById("root"))==null||l.removeEventListener("mousedown",r,!0)})},[o,e,i,n])},Ot=({item:e,multiSelection:n,name:o,register:i,setInputValue:r,setValue:a,state:l,watch:s})=>{var T,S,L;const c=y.useTheme(),d=u.useRef(null),p=e.props.hrefLang,g=l.disabledKeys,x=Array.from(l.collection.getKeys()).filter(E=>!Array.from(g).includes(E)&&E!=="All"),{optionProps:h,isSelected:b,isFocused:w,isDisabled:$}=f.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,d),j=[b?"selected":"",w?"focused":"",$?"disabled":""].join(" "),v=u.useCallback(E=>{r(""),a==null||a(`${o}Options`,""),E.currentTarget.checked&&(r(E.currentTarget.value),a==null||a(`${o}Options`,x))},[x,o,r,a]),C=u.useCallback(()=>{const E=s==null?void 0:s(`${o}Options`),A=typeof E=="string"?[E]:E;f.isEqual(x,A)&&!Array.from(g).includes("All")?(a==null||a("checkAll","All vulnerability types"),r("All vulnerability types")):(a==null||a("checkAll",""),r((A==null?void 0:A.length)<=2?A.join(", "):`${A.slice(0,2).join(", ")+`, +${A.length-2} more`}`))},[g,x,o,r,a,s]),k=e.key==="All"?t.jsx(re,{...i==null?void 0:i("checkAll",{onChange:v}),label:(T=e.rendered)==null?void 0:T.toString(),name:"checkAll",value:(S=e.rendered)==null?void 0:S.toString()}):t.jsx(re,{...i==null?void 0:i(`${o}Options`,{onChange:C}),label:(L=e.rendered)==null?void 0:L.toString(),name:`${o}Options`,value:e.key.toString()}),z=n&&!$?k:t.jsx(N,{color:c.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),I=u.useCallback(E=>{var A;E.preventDefault(),r(((A=e.rendered)==null?void 0:A.toString())??""),l.setSelectedKey(e.key),setTimeout(()=>{l.setOpen(!1)},50),At(p)},[p,e.key,e.rendered,l,r]);return ee(document.getElementsByClassName("dropdown")[0],()=>{n&&l.close()},!0,document.getElementById("combobox")),t.jsxs(ei,{...!n&&!p?h:{},$multiSelection:n,className:j,ref:d,children:[p?t.jsx(Q,{href:p,onClick:I,children:z}):z,b&&!$&&!n?t.jsx(D,{icon:"check",iconSize:"sm",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:t.jsx(Y,{tagLabel:e.textValue,variant:"inactive"})]})},Ge=({field:e,disabled:n=!1,disabledKeys:o,error:i,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:c,name:d,multiSelection:p=!1,items:g,onBlur:x,onChange:h,placeholder:b,register:w,required:$,setValue:j,tooltip:v,value:C,watch:k,weight:z})=>{var ht;const I=y.useTheme(),T=n?void 0:i,S=(e==null?void 0:e.value)??C,[L,E]=u.useState(((ht=g.find(P=>P.value===S))==null?void 0:ht.name)??""),[A,K]=u.useState(S),[Z,ie]=u.useState(g),[B,M]=u.useState(!1),{contains:q}=f.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),de=u.useRef(null),Me=u.useRef(null),We=u.useRef(null),Be=u.useRef(null),He=u.useRef(null),Zn=u.useMemo(()=>g.toSorted((P,H)=>{const _=Array.from(o??[]),pe=_.includes(P.value),ft=_.includes(H.value);return pe&&!ft?1:!pe&&ft?-1:0}).map(P=>q(P.name,L)||B?t.jsx(f.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":P.value,hrefLang:P.href,textValue:P.tag,children:P.name},P.value):null),[q,o,L,g,B]),qn=u.useCallback(P=>{const H=P.split(/,|\s/u).slice(-1)[0].trim();E(p?H:P),P===""||P.endsWith(",")?M(!0):(M(!1),K(_=>{const pe=P===""?"":_;return e&&e.onChange(pe),h&&h(P),pe}),ie(g.filter(_=>q(_.name,p?H:P))))},[q,g,e,p,h]),Xn=u.useCallback(P=>{var H;E(((H=g.find(_=>_.value===P))==null?void 0:H.name)??""),K(P?String(P):""),e&&e.onChange(P),h&&h(P?String(P):""),ie(g)},[g,e,h]),xt=u.useCallback(P=>{P.key==="Enter"&&P.preventDefault(),M(!1)},[]),Jn=u.useCallback(()=>{x&&x(),e&&e.onBlur()},[e,x]),Qn=u.useCallback(()=>{M(!0)},[]),G=f.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:p,allowsEmptyCollection:!0,disabledKeys:o,inputValue:L,items:Z,menuTrigger:"focus",shouldCloseOnBlur:!p,selectedKey:A,onBlur:Jn,onInputChange:qn,onKeyDown:xt,onKeyUp:Qn,onOpenChange(P,H){M(P&&(H==="manual"||H==="focus")),P&&setTimeout(()=>{var _;return(_=de.current)==null?void 0:_.focus()},50)},onSelectionChange:p?void 0:Xn,children:Zn}),{buttonProps:eo,inputProps:to,listBoxProps:no}=f.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:L,buttonRef:Me,id:d,inputRef:de,label:s??d,listBoxRef:We,name:d,placeholder:b,popoverRef:He},G),{listBoxProps:oo}=f.$c132121280ec012d$export$50eacbbf140a3141(no,G,We),{buttonProps:io}=f.$701a24aa0da5b062$export$ea18c227d4417cc3(eo,Me);return ee(Be.current,()=>{G.isOpen&&!p&&G.close()},!0,He.current),u.useEffect(()=>{var P;if((c===!1||!S)&&!p){const H=((P=g.find(_=>_.value===S))==null?void 0:P.name)??"";E(H),K(H)}},[S,g,c,p]),t.jsxs(U,{error:T,helpLink:r,helpLinkText:a,helpText:l,htmlFor:d,id:"combobox",label:s,required:$,tooltip:v,weight:z,children:[t.jsxs(oe,{className:`${n?"disabled":""} ${T?"error":""}`,ref:Be,children:[t.jsx("input",{...to,"aria-invalid":T?"true":"false","aria-label":d,disabled:n,onKeyDown:xt,ref:de}),T?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:I.palette.error[500],iconSize:"lg"}):void 0,t.jsx(W,{...io,className:"action",disabled:n,icon:G.isOpen&&!n?"chevron-up":"chevron-down",iconColor:I.palette.gray[400],iconSize:"sm",iconType:"fa-light",px:.125,py:.125,ref:Me,type:"button",variant:"ghost"})]}),G.isOpen&&G.collection.size>0&&!n?t.jsx(ze,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:He,state:G,triggerRef:Be,children:t.jsx(Qo,{...oo,$multiSelection:p&&!Array.from(o??[]).includes("All"),ref:We,children:[...G.collection].map(P=>t.jsx(Ot,{item:P,multiSelection:p,name:d,register:w,setInputValue:E,setValue:j,state:G,watch:k},P.key))})}):null]})},at=({control:e,disabled:n=!1,disabledKeys:o,error:i,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:c,name:d,multiSelection:p,items:g,onBlur:x,onChange:h,placeholder:b,register:w,required:$,setValue:j,tooltip:v,value:C,watch:k,weight:z})=>e?t.jsx(f.Controller,{control:e,name:d,render:({field:I,fieldState:T})=>{var S;return t.jsx(Ge,{disabled:n,disabledKeys:o,error:(S=T.error)==null?void 0:S.message,field:I,helpLink:r,helpLinkText:a,helpText:l,items:g,label:s,loadingItems:c,multiSelection:p,name:d,onBlur:x,onChange:h,placeholder:b,register:w,required:$,setValue:j,tooltip:v,value:C,watch:k,weight:z})},rules:{required:$}}):t.jsx(Ge,{disabled:n,disabledKeys:o,error:i,helpLink:r,helpLinkText:a,helpText:l,items:g,label:s,loadingItems:c,multiSelection:p,name:d,onBlur:x,onChange:h,placeholder:b,required:$,tooltip:v,value:C,weight:z}),ni=y.styled.div`
|
|
1083
1068
|
${({theme:e})=>`
|
|
1084
1069
|
align-items: center;
|
|
1085
1070
|
color: ${e.palette.gray[800]};
|
|
@@ -1100,7 +1085,7 @@
|
|
|
1100
1085
|
display: none;
|
|
1101
1086
|
}
|
|
1102
1087
|
`}
|
|
1103
|
-
`,oi=
|
|
1088
|
+
`,oi=y.styled.div.attrs({className:"year-selection"})`
|
|
1104
1089
|
align-items: flex-start;
|
|
1105
1090
|
display: flex;
|
|
1106
1091
|
flex-direction: column;
|
|
@@ -1111,12 +1096,12 @@
|
|
|
1111
1096
|
padding: 0 0.5px;
|
|
1112
1097
|
position: relative;
|
|
1113
1098
|
width: 8px;
|
|
1114
|
-
`,$t=
|
|
1099
|
+
`,$t=y.styled.tr`
|
|
1115
1100
|
align-items: flex-start;
|
|
1116
1101
|
display: flex;
|
|
1117
1102
|
padding: ${({theme:e})=>e.spacing[.25]} 0;
|
|
1118
1103
|
width: 100%;
|
|
1119
|
-
`,Mt=
|
|
1104
|
+
`,Mt=y.css`
|
|
1120
1105
|
${({theme:e})=>`
|
|
1121
1106
|
align-items: center;
|
|
1122
1107
|
color: ${e.palette.gray[800]};
|
|
@@ -1132,9 +1117,9 @@
|
|
|
1132
1117
|
text-align: center;
|
|
1133
1118
|
width: ${e.spacing[2.5]};
|
|
1134
1119
|
`}
|
|
1135
|
-
`,ii=
|
|
1120
|
+
`,ii=y.styled.th`
|
|
1136
1121
|
${Mt}
|
|
1137
|
-
`,ri=
|
|
1122
|
+
`,ri=y.styled.td`
|
|
1138
1123
|
${({theme:e})=>`
|
|
1139
1124
|
${Mt}
|
|
1140
1125
|
height: ${e.spacing[2.5]};
|
|
@@ -1184,14 +1169,14 @@
|
|
|
1184
1169
|
}
|
|
1185
1170
|
}
|
|
1186
1171
|
`}
|
|
1187
|
-
`,ai=
|
|
1172
|
+
`,ai=y.styled.div.attrs({className:"dot"})`
|
|
1188
1173
|
position: absolute;
|
|
1189
1174
|
top: 48%;
|
|
1190
1175
|
|
|
1191
1176
|
> span {
|
|
1192
1177
|
font-size: 4px;
|
|
1193
1178
|
}
|
|
1194
|
-
`,mt=
|
|
1179
|
+
`,mt=y.styled.button`
|
|
1195
1180
|
cursor: pointer;
|
|
1196
1181
|
display: flex;
|
|
1197
1182
|
|
|
@@ -1199,7 +1184,7 @@
|
|
|
1199
1184
|
height: 3.5px;
|
|
1200
1185
|
width: 7px;
|
|
1201
1186
|
}
|
|
1202
|
-
`,st=
|
|
1187
|
+
`,st=y.styled.div`
|
|
1203
1188
|
${({theme:e})=>`
|
|
1204
1189
|
align-items: end;
|
|
1205
1190
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1211,9 +1196,9 @@
|
|
|
1211
1196
|
padding: 0 ${e.spacing[.25]};
|
|
1212
1197
|
width: 100%;
|
|
1213
1198
|
`}
|
|
1214
|
-
`,Wt=({state:e,date:
|
|
1199
|
+
`,Wt=({state:e,date:n})=>{const o=u.useRef(null),i=f.$14e0f24ef4ac5c92$export$629b0a497aa65267(n,f.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:a,isSelected:l,isDisabled:s,formattedDate:c}=f.$36a0ac60f04457c5$export$136073280381448e({date:n},e,o),d="highlightedRange"in e&&!f.lodashExports.isNull(e.highlightedRange)?f.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,p="highlightedRange"in e&&!f.lodashExports.isNull(e.highlightedRange)?f.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,g=l&&!s&&!(d||p)?"range":"";return t.jsx(ri,{id:g,...r,children:t.jsxs("div",{...a,className:`cell ${d||p?"selected":""}
|
|
1215
1200
|
${s?"disabled":""} ${i?"today":""}
|
|
1216
|
-
${!e.isFocused&&!i?"focused":""} ${g}`,ref:o,children:[c,i?
|
|
1201
|
+
${!e.isFocused&&!i?"focused":""} ${g}`,ref:o,children:[c,i?t.jsx(ai,{children:t.jsx(D,{clickable:!1,icon:"circle",iconSize:"sm"})}):void 0]})})},Le=({state:e,...n})=>{const{locale:o}=f.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{weekDays:i}=f.$e3031d1f8c9d64eb$export$cb95147730a423f5(n,e),r=f.$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(e.visibleRange.start,o);return t.jsxs("table",{children:[t.jsx("thead",{children:t.jsx($t,{children:i.map((a,l)=>{const s=`key_${l}`;return t.jsx(ii,{children:a},s)})})}),t.jsx("tbody",{children:[...new Array(r).keys()].map(a=>t.jsx($t,{children:e.getDatesInWeek(a).map((l,s)=>{const c=`key_${s}`;return l?t.jsx(Wt,{date:l,state:e},c):t.jsx("td",{},c)})},a))})]})},si=y.styled(nt)`
|
|
1217
1202
|
align-items: center;
|
|
1218
1203
|
background-color: inherit;
|
|
1219
1204
|
border-color: inherit;
|
|
@@ -1221,7 +1206,7 @@
|
|
|
1221
1206
|
height: 38px;
|
|
1222
1207
|
justify-content: center;
|
|
1223
1208
|
width: 40px;
|
|
1224
|
-
margin: ${({$margin:e="0"})=>
|
|
1209
|
+
margin: ${({$margin:e="0"})=>y.css`
|
|
1225
1210
|
${e}
|
|
1226
1211
|
`};
|
|
1227
1212
|
|
|
@@ -1233,7 +1218,7 @@
|
|
|
1233
1218
|
background-color: ${({theme:e})=>e.palette.gray[100]};
|
|
1234
1219
|
cursor: pointer;
|
|
1235
1220
|
}
|
|
1236
|
-
`,li=
|
|
1221
|
+
`,li=y.styled.div`
|
|
1237
1222
|
${({theme:e})=>`
|
|
1238
1223
|
align-items: flex-start;
|
|
1239
1224
|
background: ${e.palette.white};
|
|
@@ -1247,8 +1232,8 @@
|
|
|
1247
1232
|
padding: ${e.spacing[.25]};
|
|
1248
1233
|
width: 292px;
|
|
1249
1234
|
`}
|
|
1250
|
-
`,ci=
|
|
1251
|
-
${({theme:e,$disabled:
|
|
1235
|
+
`,ci=y.styled.button`
|
|
1236
|
+
${({theme:e,$disabled:n,$focus:o,$header:i})=>{const r=o?"34px":"40px";return`
|
|
1252
1237
|
align-items: center;
|
|
1253
1238
|
border-radius: ${i?`0 ${e.spacing[.5]} ${e.spacing[.5]} 0`:"4px"};
|
|
1254
1239
|
border-left: inherit;
|
|
@@ -1259,10 +1244,10 @@
|
|
|
1259
1244
|
width: ${i?"38px":"40px"};
|
|
1260
1245
|
|
|
1261
1246
|
&:hover {
|
|
1262
|
-
background-color: ${e.palette.gray[
|
|
1247
|
+
background-color: ${e.palette.gray[n?500:100]};
|
|
1263
1248
|
}
|
|
1264
1249
|
`}}
|
|
1265
|
-
`,di=
|
|
1250
|
+
`,di=y.styled.div`
|
|
1266
1251
|
${({theme:e})=>`
|
|
1267
1252
|
align-items: center;
|
|
1268
1253
|
background: transparent;
|
|
@@ -1273,13 +1258,13 @@
|
|
|
1273
1258
|
justify-content: space-between;
|
|
1274
1259
|
width: calc(100% - 40px);
|
|
1275
1260
|
`}
|
|
1276
|
-
`,pi=
|
|
1261
|
+
`,pi=y.styled.div`
|
|
1277
1262
|
align-items: center;
|
|
1278
1263
|
display: flex;
|
|
1279
1264
|
justify-content: flex-end;
|
|
1280
1265
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1281
1266
|
flex: 1 0 0;
|
|
1282
|
-
`,wt=
|
|
1267
|
+
`,wt=y.styled.div`
|
|
1283
1268
|
${({theme:e})=>`
|
|
1284
1269
|
align-items: center;
|
|
1285
1270
|
align-self: stretch;
|
|
@@ -1291,7 +1276,7 @@
|
|
|
1291
1276
|
line-height: ${e.spacing[1.5]};
|
|
1292
1277
|
padding: 2px ${e.spacing[.25]};
|
|
1293
1278
|
`}
|
|
1294
|
-
`,vt=
|
|
1279
|
+
`,vt=y.styled.button`
|
|
1295
1280
|
${({theme:e})=>`
|
|
1296
1281
|
align-items: center;
|
|
1297
1282
|
background-color: inherit;
|
|
@@ -1311,18 +1296,18 @@
|
|
|
1311
1296
|
font-weight: ${e.typography.weight.bold};
|
|
1312
1297
|
}
|
|
1313
1298
|
`}
|
|
1314
|
-
`,
|
|
1315
|
-
${({theme:e,$disabled:
|
|
1299
|
+
`,Ne=({disabled:e=!1,icon:n,props:o})=>{const i=u.useRef(null),{buttonProps:r}=f.$701a24aa0da5b062$export$ea18c227d4417cc3(o,i);return t.jsx(ci,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:i,type:"button",children:t.jsx(D,{icon:n,iconColor:R.palette.gray[e?400:700],iconSize:"lg",iconType:"fa-light"})})},Ae=({state:e,prevButtonProps:n,nextButtonProps:o,title:i})=>{const r=e.focusedDate,a=y.useTheme(),l=u.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),s=u.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",style:{position:"sticky",top:0,zIndex:2,background:a.palette.white},children:[t.jsx(Ne,{icon:"chevron-left",props:n}),t.jsxs(ni,{children:[i,t.jsxs(oi,{children:[t.jsx(mt,{"aria-label":"top",onClick:l,children:t.jsx(D,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xs"})}),t.jsx(mt,{"aria-label":"bottom",onClick:s,children:t.jsx(D,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xs"})})]})]}),t.jsx(Ne,{icon:"chevron-right",props:o})]})},Bt=({onClose:e,props:n})=>{const{locale:o}=f.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),i=f.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:f.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:r,nextButtonProps:a,title:l}=f.$9942cad8a072a530$export$3ee915f8151bd4f1(n,i);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ae,{nextButtonProps:a,prevButtonProps:r,state:i,title:l}),t.jsx(Le,{state:i}),t.jsx(st,{children:t.jsx(O,{onClick:e,variant:"ghost",children:"Cancel"})})]})},Ht=({segment:e,state:n})=>{const o=y.useTheme(),i=u.useRef(null),a={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=f.$32489daedd52963e$export$1315d136e6f7581(a,n,i),s=o.palette.gray[a.isEditable?800:500];return t.jsx("div",{...a.type!=="literal"&&{...l,className:"segment-cell"},ref:i,style:a.type==="literal"?void 0:{color:a.isPlaceholder?o.palette.gray[400]:s},children:a.isPlaceholder?a.placeholder:a.text})},_t=({disabled:e,error:n=!1,props:o})=>{const i=y.useTheme(),r=u.useRef(null),a=f.$3c0fc76039f1c516$export$60e84778edff6d26({...o,createCalendar:f.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=f.$16f0b7bb276bc17e$export$5591b0b878c1a989(o,a,r),s=u.useCallback(c=>{const d=document.getElementsByClassName("segment-cell"),p=c.currentTarget;Object.values(d).some(g=>g.contains(p))||(c.preventDefault(),c.stopPropagation())},[]);return t.jsxs(di,{...l,onClick:s,children:[t.jsx("div",{className:"flex flex-row",style:{color:i.palette.gray[f.lodashExports.isNil(a.value)?400:800]},tabIndex:-1,children:a.segments.map((c,d)=>{const p=`key_${d}`;return t.jsx(Ht,{segment:{...c,isEditable:!e},state:a},p)})}),n?t.jsx(D,{icon:"exclamation-circle",iconColor:i.palette.error[500],iconSize:"lg"}):void 0]})},Vt=e=>{const n=u.useRef(null),o=f.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:i}=o,r=!f.lodashExports.isNil(i)&&i.hour<12?"AM":"PM",[a,l]=u.useState(f.lodashExports.isNil(i)?"AM":r),{fieldProps:s}=f.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,o,n),c=u.useCallback(d=>{const p=d.currentTarget.name;p!==a&&(f.lodashExports.isNil(i)||(p==="AM"?o.setSegment("dayPeriod",0):p==="PM"&&o.setSegment("dayPeriod",12))),l(p)},[a,o,i]);return t.jsxs(pi,{children:[t.jsx(wt,{...s,ref:n,children:o.segments.slice(0,-2).map((d,p)=>{const g=`key_${p}`;return t.jsx(Ht,{segment:d,state:o},g)})}),t.jsxs(wt,{children:[t.jsx(vt,{id:a==="AM"?"active":"",name:"AM",onClick:c,type:"button",children:"AM"}),t.jsx(vt,{id:a==="PM"?"active":"",name:"PM",onClick:c,type:"button",children:"PM"})]})]})},De=e=>e&&e!=="-"?f.dayjs(e).format("YYYY-MM-DD"):"-",gi=e=>e&&e!=="-"?f.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",jt=(e,n)=>f.dayjs(String(e).replace(/-/gu,"/")).hour(n.hour).minute(n.minute).second(n.second).format("YYYY/MM/DD hh:mm A"),fe=({error:e,buttonProps:n,datePickerRef:o,disabled:i=!1,granularity:r="day",fieldProps:a,groupProps:l,name:s,register:c,required:d,setValue:p,value:g})=>{const x=u.useCallback(h=>{if(!h)return;const b=r==="day"?De(String(h)):gi(String(h));a.onChange&&a.onChange(h??null),p&&p(s,b,{shouldDirty:!0})},[a,r,s,p]);return t.jsxs(oe,{...l,className:`${i?"disabled":""} ${e?"error":""}`,ref:o,children:[t.jsx(_t,{disabled:i,error:e!=null,props:{...a,autoFocus:!1,granularity:r,onChange:x,shouldForceLeadingZeros:!0}}),t.jsx(Ne,{disabled:i,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...c==null?void 0:c(s,{required:d}),"aria-label":s,className:"date-input",disabled:i,id:s,name:s,type:"text",value:g??""})]})},Pe=({children:e,...n})=>{const o=u.useRef(null),{dialogProps:i}=f.$40df3f8667284809$export$d55e7ee900f34e93(n,o);return t.jsx(li,{...i,ref:o,children:e})},Ut=({disabled:e=!1,error:n,helpLink:o,helpLinkText:i,helpText:r,required:a,label:l,name:s,register:c,setValue:d,tooltip:p,watch:g,...x})=>{const h=u.useRef(null),b=g==null?void 0:g(s),w=u.useCallback(T=>{d&&T&&d(s,De(String(T)),{shouldDirty:!0})},[s,d]),$=f.$ab5bf3f618090389$export$87194bb378cc3ac2({...x,onChange(T){w(T)},...!f._.isNil(b)&&!f._.isEmpty(b)&&f.dayjs(b).isValid()?{defaultValue:f.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}:{}}),{close:j}=$,{groupProps:v,fieldProps:C,buttonProps:k,dialogProps:z,calendarProps:I}=f.$6057a3d2a53a12fd$export$42df105a73306d51({...x,"aria-label":l??s,name:s},$,h);return t.jsxs(U,{error:e?void 0:n,helpLink:o,helpLinkText:i,helpText:r,htmlFor:s,label:l,required:a,tooltip:p,children:[t.jsx(fe,{buttonProps:k,datePickerRef:h,disabled:e,error:n,fieldProps:C,groupProps:v,name:s,register:c,required:a,setValue:d,value:b}),$.isOpen&&!e?t.jsx(ze,{offset:8,placement:"bottom start",state:$,triggerRef:h,children:t.jsx(Pe,{...z,children:t.jsx(Bt,{onClose:j,props:I})})}):null]})},Gt=({onClose:e,props:n})=>{const{locale:o}=f.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),i=u.useRef(null),r=f.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:f.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:a,nextButtonProps:l,title:s}=f.$46a4342aab3d8076$export$87e0539f600c24e5(n,r,i);return t.jsxs("div",{className:"calendar-range",ref:i,children:[t.jsx(Ae,{nextButtonProps:l,prevButtonProps:a,state:r,title:s}),t.jsx(Le,{state:r}),t.jsx(st,{children:t.jsx(O,{onClick:e,variant:"ghost",children:"Cancel"})})]})},ui=y.styled.div`
|
|
1300
|
+
${({theme:e,$disabled:n,$show:o})=>`
|
|
1316
1301
|
border-color: ${o?e.palette.error[500]:e.palette.gray[300]};
|
|
1317
1302
|
display: flex;
|
|
1318
1303
|
gap: ${e.spacing[.25]};
|
|
1319
1304
|
width: 100%;
|
|
1320
1305
|
|
|
1321
1306
|
~ div {
|
|
1322
|
-
background: ${
|
|
1307
|
+
background: ${n?e.palette.gray[200]:e.palette.white};
|
|
1323
1308
|
}
|
|
1324
1309
|
`}
|
|
1325
|
-
`,Yt=({disabled:e=!1,error:
|
|
1310
|
+
`,Yt=({disabled:e=!1,error:n,label:o,name:i,required:r,tooltip:a,register:l,setValue:s,propsMax:c,propsMin:d,variant:p="default",...g})=>{const x=`${i}Max`,h=`${i}Min`,b=u.useRef(null),w=u.useCallback(S=>{s&&S&&(s((c==null?void 0:c.name)??x,De(String(S.end))),s((d==null?void 0:d.name)??h,De(String(S.start))))},[x,h,s,c,d]),$=f.$93c38a5e28be6249$export$e50a61c1de9f574({...g,endName:(c==null?void 0:c.name)??x,startName:(d==null?void 0:d.name)??h,onChange(S){w(S)}}),{close:j}=$,{groupProps:v,startFieldProps:C,endFieldProps:k,buttonProps:z,dialogProps:I,calendarProps:T}=f.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...g,"aria-label":o??i},$,b);return t.jsxs(U,{error:e?void 0:n,htmlFor:i,label:o,required:r,tooltip:a,children:[t.jsxs(ui,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:p==="filters"?"column":"row"},children:[t.jsx(fe,{buttonProps:z,datePickerRef:b,disabled:e,error:n,fieldProps:{...C,"aria-label":`${C["aria-label"]} ${i}`,validate:S=>k.value&&S>k.value?"Start date must be less than or equal to end date":null},groupProps:v,name:(d==null?void 0:d.name)??h,register:l,setValue:s,value:d==null?void 0:d.value}),t.jsx(fe,{buttonProps:z,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${i}`,validate:S=>C.value&&S<C.value?"End date must be greater than or equal to start date":null},groupProps:v,name:(c==null?void 0:c.name)??x,register:l,setValue:s,value:c==null?void 0:c.value})]}),$.isOpen&&!e?t.jsx(ze,{offset:8,placement:"bottom start",state:$,triggerRef:b,children:t.jsx(Pe,{...I,children:t.jsx(Gt,{onClose:j,props:T})})}):null]})},xi=y.styled.div`
|
|
1326
1311
|
${({theme:e})=>`
|
|
1327
1312
|
align-items: center;
|
|
1328
1313
|
border-top: 1px solid ${e.palette.gray[200]};
|
|
@@ -1331,19 +1316,19 @@
|
|
|
1331
1316
|
justify-content: center;
|
|
1332
1317
|
padding: ${e.spacing[.5]} ${e.spacing[1.25]};
|
|
1333
1318
|
`}
|
|
1334
|
-
`,hi=
|
|
1319
|
+
`,hi=y.styled.div`
|
|
1335
1320
|
align-items: center;
|
|
1336
1321
|
display: flex;
|
|
1337
1322
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1338
1323
|
justify-content: flex-end;
|
|
1339
1324
|
flex: 1 0 0;
|
|
1340
|
-
`,Kt=({handleTimeChange:e,onClose:
|
|
1325
|
+
`,Kt=({handleTimeChange:e,onClose:n,props:o,timeState:i})=>{const r=y.useTheme(),{locale:a}=f.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=f.$131cf43a05231e1e$export$6d095e787d2b5e1f({...o,createCalendar:f.$64244302c3013299$export$dd0bbc9b26defe37,locale:a}),{prevButtonProps:s,nextButtonProps:c,title:d}=f.$9942cad8a072a530$export$3ee915f8151bd4f1(o,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ae,{nextButtonProps:c,prevButtonProps:s,state:l,title:d}),t.jsx(Le,{state:l}),t.jsxs(xi,{children:[t.jsx(N,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(hi,{children:t.jsx(Vt,{hourCycle:12,label:"time-field",onChange:e,value:i.timeValue})})]}),t.jsx(st,{children:t.jsx(O,{onClick:n,variant:"ghost",children:"Cancel"})})]})},fi=e=>{const{disabled:n=!1,error:o,required:i,label:r,name:a,tooltip:l,register:s,setValue:c,watch:d}=e,p=d==null?void 0:d(a),g=u.useRef(null),x=f.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:i,shouldCloseOnSelect:!1,value:f._.isNil(p)||f._.isEmpty(p)||p==="-"||f.dayjs(p,"YYYY/MM/DD hh:mm A").isValid()===!1?null:f.$fae977aafc393c5c$export$588937bcd60ade55(f.dayjs(p,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=x,{groupProps:b,fieldProps:w,buttonProps:$,dialogProps:j,calendarProps:v}=f.$6057a3d2a53a12fd$export$42df105a73306d51(e,x,g),C=u.useCallback(z=>{if(v.onChange&&v.onChange(z),x.timeValue){const I=jt(z,x.timeValue);c==null||c(a,I,{shouldDirty:!0})}else x.setDateValue(z)},[v,a,c,x]),k=u.useCallback(z=>{if(z){x.setTimeValue(z);const I=x.dateValue;if(I){const T=jt(I,z);c==null||c(a,T,{shouldDirty:!0})}}},[x,c,a]);return t.jsxs(U,{error:n?void 0:o,htmlFor:a,label:r,required:i,tooltip:l,children:[t.jsx(fe,{buttonProps:$,datePickerRef:g,disabled:n,error:o,fieldProps:w,granularity:"minute",groupProps:b,name:a,register:s,setValue:c,value:p}),x.isOpen&&!n?t.jsx(ze,{offset:8,placement:"bottom start",state:x,triggerRef:g,children:t.jsx(Pe,{...j,children:t.jsx(Kt,{handleTimeChange:k,onClose:h,props:{...v,onChange:C},timeState:x})})}):null]})},yi=({children:e,currentValue:n,externalLink:o,isEditing:i,label:r,name:a,tooltip:l})=>{if(i)return t.jsx("div",{children:e});const s=f.lodashExports.isNil(n)?"":n,c=String(o??s);return t.jsxs(m,{children:[t.jsx(rt,{htmlFor:a,label:r,tooltip:l,weight:"bold"}),c.startsWith("https://")?t.jsx(Q,{href:c,children:s}):t.jsx(N,{size:"md",children:s})]})},Oe=({disabled:e=!1,hasIcon:n=!1,helpLink:o,helpLinkText:i,helpText:r,error:a,id:l,indexArray:s=0,isValid:c,isTouched:d,label:p,name:g,maskValue:x=!1,onPaste:h,placeholder:b,removeItemArray:w,register:$,suggestions:j,tooltip:v,type:C="text",weight:k,...z})=>{const{required:I,onBlur:T,onChange:S}=z,L=y.useTheme(),E=e?void 0:a,[A,K]=u.useState(""),Z=u.useCallback(M=>{K(M.target.value),S==null||S(M)},[S]),ie=c&&d&&!e&&A.trim()!=="",B=u.useCallback(M=>{M.key==="Enter"&&M.preventDefault()},[]);return t.jsxs(U,{error:E,helpLink:o,helpLinkText:i,helpText:r,htmlFor:g,label:p,required:I,tooltip:v,weight:k,children:[t.jsxs(oe,{className:`
|
|
1341
1326
|
${e?"disabled":""} ${E?"error":""} ${ie?"success":""}
|
|
1342
|
-
`,children:[t
|
|
1327
|
+
`,children:[n?t.jsx(D,{icon:"user",iconSize:"xl",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":E?"true":"false","aria-label":g,"aria-required":I,autoComplete:"off",className:x?"sr-block":"","data-testid":`${g}-input`,disabled:e,id:g,list:j?`list_${g}`:void 0,onKeyDown:B,onPaste:h,placeholder:b,type:C,...$?$(g,{required:I,onBlur:T,onChange:Z}):{...z,onChange:Z}}),E?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:L.palette.error[500],iconSize:"lg"}):void 0,ie?t.jsx(D,{icon:"check-circle",iconClass:"success-icon",iconColor:L.palette.success[500],iconSize:"lg"}):void 0,l==="array"&&s>0?t.jsx(W,{color:L.palette.gray[400],icon:"trash",iconSize:"sm",iconType:"fa-light",onClick:w?w(s):void 0,variant:"ghost"}):void 0]}),j?t.jsx("datalist",{id:`list_${g}`,children:j.map(M=>t.jsx("option",{value:M},M))}):void 0]})},bi=y.styled.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,$i=y.styled.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1343
1328
|
gap: 12px;
|
|
1344
|
-
`,mi=
|
|
1329
|
+
`,mi=y.styled.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1345
1330
|
gap: 8px;
|
|
1346
|
-
`,Ee=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,wi=
|
|
1331
|
+
`,Ee=e=>e===void 0?"flex-grow: 1;":`width: calc(${e}00% / var(--cols));`,wi=y.styled.div.attrs({className:"comp-col"})`
|
|
1347
1332
|
word-wrap: break-word;
|
|
1348
1333
|
|
|
1349
1334
|
${({$width:e=null})=>e===null?"":`width: ${e}`};
|
|
@@ -1362,29 +1347,29 @@
|
|
|
1362
1347
|
${({$lg:e})=>Ee(e)}
|
|
1363
1348
|
}
|
|
1364
1349
|
|
|
1365
|
-
${({$xl:e})=>
|
|
1350
|
+
${({$xl:e})=>f.isNumber(e)?`@media (min-width: 1200px) { ${Ee(e)} }`:""}
|
|
1366
1351
|
|
|
1367
1352
|
> .comp-card {
|
|
1368
1353
|
height: 100%;
|
|
1369
1354
|
}
|
|
1370
|
-
`,Ye=({children:e,xl:
|
|
1371
|
-
${({$disp:e="flex",$mh:
|
|
1355
|
+
`,Ye=({children:e,xl:n,lg:o,md:i,sm:r,paddingTop:a,width:l})=>t.jsx(wi,{$lg:o,$md:i,$paddingTop:a,$sm:r,$width:l,$xl:n,children:e}),vi=y.styled.div.attrs({className:"comp-gap"})`
|
|
1356
|
+
${({$disp:e="flex",$mh:n=4,$mv:o=4})=>`
|
|
1372
1357
|
align-items: center;
|
|
1373
1358
|
display: ${e};
|
|
1374
|
-
margin: ${-o}px ${-
|
|
1359
|
+
margin: ${-o}px ${-n}px;
|
|
1375
1360
|
|
|
1376
1361
|
> * {
|
|
1377
|
-
margin: ${o}px ${
|
|
1362
|
+
margin: ${o}px ${n}px;
|
|
1378
1363
|
}
|
|
1379
1364
|
`}
|
|
1380
|
-
`,ji=({children:e,disp:
|
|
1381
|
-
${({$align:e="stretch",$cols:
|
|
1365
|
+
`,ji=({children:e,disp:n,mh:o,mv:i})=>t.jsx(vi,{$disp:n,$mh:o,$mv:i,children:e}),ki=y.styled.div.attrs({className:"comp-row flex flex-row flex-wrap"})`
|
|
1366
|
+
${({$align:e="stretch",$cols:n=100,$colsPadding:o=6,$justify:i="start"})=>`
|
|
1382
1367
|
align-items: ${e};
|
|
1383
1368
|
justify-content: ${i};
|
|
1384
1369
|
margin: -6px;
|
|
1385
1370
|
text-align: ${i};
|
|
1386
1371
|
|
|
1387
|
-
--cols: ${
|
|
1372
|
+
--cols: ${n};
|
|
1388
1373
|
|
|
1389
1374
|
> *:not(.comp-col) {
|
|
1390
1375
|
width: 100%;
|
|
@@ -1395,24 +1380,57 @@
|
|
|
1395
1380
|
padding: ${o}px;
|
|
1396
1381
|
}
|
|
1397
1382
|
`}
|
|
1398
|
-
`,
|
|
1383
|
+
`,Zt=({align:e,children:n,cols:o,colsPadding:i,justify:r})=>t.jsx(ki,{$align:e,$cols:o,$colsPadding:i,$justify:r,children:n}),Ke=({addText:e,append:n,disabled:o=!1,fields:i,fieldState:r,initValue:a="",index:l=0,required:s,label:c,max:d=100,name:p,onBlur:g,onChange:x,placeholder:h,tooltip:b,remove:w,value:$})=>{var C;const j=u.useCallback(()=>{n==null||n(a)},[n,a]),v=u.useCallback(k=>()=>{w==null||w(k)},[w]);return t.jsxs(Zt,{align:"start",children:[t.jsx(Ye,{lg:75,md:75,sm:75,children:t.jsx(Oe,{disabled:o,error:r?(C=r.error)==null?void 0:C.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:c,name:p,onBlur:g,onChange:x,placeholder:h,removeItemArray:v,required:s,tooltip:b,value:$})}),l<d-1&&l+1===(i==null?void 0:i.length)?t.jsx(Ye,{lg:25,md:25,sm:25,children:t.jsx(O,{disabled:o,icon:"plus",onClick:j,variant:"ghost",width:"max-content",children:e??"Add"})}):void 0]})},Ci=({addText:e,append:n,control:o,disabled:i,fields:r,initValue:a="",required:l,label:s,max:c=void 0,name:d="array-field",onChange:p,placeholder:g,remove:x,tooltip:h})=>o&&r?t.jsx(u.Fragment,{children:r.map((b,w)=>t.jsx(f.Controller,{control:o,name:`${d}.${w}`,render:({field:$,fieldState:j})=>t.jsx(Ke,{addText:e,append:n,disabled:i,fieldState:j,fields:r,index:w,initValue:a,label:s,max:c,name:$.name,onBlur:$.onBlur,onChange:p??$.onChange,placeholder:g,remove:x,required:l,tooltip:h,value:typeof $.value=="object"?$.value.value:$.value}),index:w},b.id))}):t.jsx(Ke,{addText:e,disabled:i,initValue:a,label:s,max:c,name:d,onChange:p,placeholder:g,required:l,tooltip:h}),Si=y.styled(Dt)`
|
|
1399
1384
|
white-space: nowrap;
|
|
1400
1385
|
margin-right: ${({theme:e})=>e.spacing[.25]};
|
|
1401
1386
|
text-overflow: ellipsis;
|
|
1402
1387
|
overflow: hidden;
|
|
1403
1388
|
max-width: 80%;
|
|
1404
|
-
`,zi=
|
|
1389
|
+
`,zi=y.styled.input`
|
|
1405
1390
|
opacity: 0;
|
|
1406
1391
|
position: absolute;
|
|
1407
1392
|
visibility: hidden;
|
|
1408
1393
|
width: 0;
|
|
1409
|
-
`,ye=(e,
|
|
1394
|
+
`,ye=(e,n,o)=>{const i=new Event(e);return Object.defineProperty(i,"target",{value:{name:n,value:o}}),i},Ti=e=>{const n=e;return n?Array.from(n).map(o=>o.name).join(", "):""},Ii=({accept:e,disabled:n=!1,error:o,label:i,helpLink:r,helpText:a,id:l,multiple:s,name:c,onChange:d,required:p,register:g,setValue:x,tooltip:h,watch:b,weight:w})=>{const $=y.useTheme(),j=n?void 0:o,v=u.useRef(null),C=g==null?void 0:g(c,{required:p}),k=b==null?void 0:b(c),z=Ti(k),I=u.useCallback(()=>{const L=ye("change",c,void 0);x&&x(c,void 0),C&&C.onChange(L)},[C,c,x]),T=u.useCallback(L=>{const{files:E}=L.currentTarget,A=ye("change",c,E&&E.length>0?E:void 0);E&&E.length>0&&(d==null||d(A),x&&x(c,E),C&&C.onChange(A))},[C,c,d,x]),S=u.useCallback(L=>{n?L.preventDefault():v.current&&v.current.click()},[n]);return t.jsxs(U,{error:j,helpLink:r,helpText:a,htmlFor:l??c,label:i,required:p,tooltip:h,weight:w,children:[t.jsxs(oe,{className:`${n?"disabled":""} ${j?"error":""}`,children:[t.jsx(Si,{$size:"xs",children:z}),t.jsxs(m,{alignItems:"center",display:"flex",gap:.625,children:[f.lodashExports.isEmpty(z)||n?void 0:t.jsx(W,{color:$.palette.gray[400],height:"20px",icon:"xmark",iconSize:"64px",iconType:"fa-light",onClick:I,variant:"ghost",width:"20px"}),j&&t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:$.palette.error[500],iconSize:"lg"}),t.jsxs(O,{border:n?`1px solid ${$.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:S,variant:"primary",width:"96px",children:[t.jsx(D,{icon:"search",iconSize:"xl",mr:.5}),"Add file"]})]})]}),t.jsx(zi,{...C,accept:e,"aria-label":c,"data-testid":c,disabled:n,id:l??c,multiple:s,name:c,onChange:T,ref:v,type:"file"})]})},Ei=y.styled.input`
|
|
1410
1395
|
border: none;
|
|
1411
1396
|
background: transparent;
|
|
1412
1397
|
min-width: 15rem;
|
|
1413
1398
|
padding: 0;
|
|
1414
1399
|
flex: 1;
|
|
1415
|
-
`,
|
|
1400
|
+
`,Ze=({disabled:e=!1,error:n,field:o,helpLink:i,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b})=>{const w=y.useTheme(),$=e?void 0:n,[j,v]=u.useState(""),C=c?h:o==null?void 0:o.value,k=u.useMemo(()=>C&&typeof C=="string"?C.split(",").filter(Boolean):[],[C]),z=u.useCallback(E=>{const K=[...new Set(E.filter(Boolean))].join(","),Z=ye("change",s,K);o&&o.onChange(Z),c&&c(Z)},[o,s,c]),I=u.useCallback(E=>{v(E.target.value)},[]),T=u.useCallback(E=>{const A=j.trim();A.length&&!k.includes(A)&&(E.preventDefault(),z([...k,A]),v("")),o&&o.onBlur()},[j,o,z,k]),S=u.useCallback(E=>{const A=j.trim();E.key==="Enter"&&A.length===0&&E.preventDefault(),["Enter",","].includes(E.key)&&A.length>0&&!k.includes(A)?(E.preventDefault(),z([...k,A]),v("")):E.key==="Backspace"&&!A.length&&k.length&&(E.preventDefault(),d==null||d(k[k.length-1]),z(k.slice(0,-1)))},[j,d,z,k]),L=u.useCallback(E=>()=>{d==null||d(E),z(k.filter(A=>A!==E))},[d,z,k]);return t.jsx(U,{error:$,helpLink:i,helpLinkText:r,helpText:a,htmlFor:s,label:l,required:g,tooltip:x,weight:b,children:t.jsxs(oe,{$overflowX:"auto",className:`${e?"disabled":""} ${$?"error":""}`,children:[k.map(E=>t.jsx(Y,{disabled:e,onClose:L(E),tagLabel:E},E)),t.jsx(Ei,{"aria-hidden":!1,"aria-invalid":$?"true":"false","aria-label":s,"aria-required":g,autoComplete:"off",disabled:e,id:s,onBlur:T,onChange:I,onKeyDown:S,placeholder:k.length===0?p:void 0,ref:o==null?void 0:o.ref,type:"text",value:j}),$?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"lg"}):void 0]})})},Ni=({disabled:e=!1,control:n,error:o,helpLink:i,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b})=>n?t.jsx(f.Controller,{control:n,name:s,render:({field:w})=>t.jsx(Ze,{disabled:e,error:o,field:w,helpLink:i,helpLinkText:r,helpText:a,label:l,name:s,onRemove:d,placeholder:p,required:g,tooltip:x,weight:b}),rules:{required:g}}):t.jsx(Ze,{disabled:e,error:o,helpLink:i,helpLinkText:r,helpText:a,label:l,name:s,onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b}),Di=y.styled.div`
|
|
1401
|
+
width: fit-content;
|
|
1402
|
+
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
1403
|
+
border-radius: 4px;
|
|
1404
|
+
background: none;
|
|
1405
|
+
color: ${({theme:e})=>e.palette.black};
|
|
1406
|
+
font-family: ${({theme:e})=>e.typography.type.primary};
|
|
1407
|
+
font-size: ${({theme:e})=>e.typography.text.md};
|
|
1408
|
+
height: 40px;
|
|
1409
|
+
display: flex;
|
|
1410
|
+
align-items: center;
|
|
1411
|
+
justify-content: center;
|
|
1412
|
+
padding: 0.5em;
|
|
1413
|
+
`,Ri=y.styled.input`
|
|
1414
|
+
width: 4em;
|
|
1415
|
+
appearance: textfield;
|
|
1416
|
+
border-style: none;
|
|
1417
|
+
padding: 0.5rem;
|
|
1418
|
+
padding-top: 0.5rem;
|
|
1419
|
+
padding-bottom: 0.5rem;
|
|
1420
|
+
padding-left: 0.5rem;
|
|
1421
|
+
background: none;
|
|
1422
|
+
|
|
1423
|
+
&:focus {
|
|
1424
|
+
border-color: unset;
|
|
1425
|
+
box-shadow: none;
|
|
1426
|
+
outline: none;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
&::-webkit-outer-spin-button,
|
|
1430
|
+
&::-webkit-inner-spin-button {
|
|
1431
|
+
opacity: 1;
|
|
1432
|
+
}
|
|
1433
|
+
`,qt=u.forwardRef(function({autoUpdate:n=!1,decimalPlaces:o=0,defaultValue:i=0,max:r,min:a,name:l,onEnter:s,tooltipMessage:c,...d},p){const g=o<0?0:o,[x,h]=u.useState(Number(i).toFixed(g)),b=u.useCallback(j=>{const v=f.lodashExports.toNumber(j.target.value);j.target.value.endsWith(".")?h(j.target.value):v>=Number(a)&&v<=Number(r)&&(h(String(v)),n&&s(f.lodashExports.toNumber(v.toFixed(g)))),j.stopPropagation()},[n,g,r,a,s]),w=u.useCallback(j=>{j.currentTarget.contains(j.relatedTarget)||h(Number(i).toFixed(g)),j.stopPropagation()},[g,i]),$=u.useCallback(j=>{j.stopPropagation(),j.key==="Enter"&&!f.lodashExports.isEmpty(j.currentTarget.value)&&s(f.lodashExports.toNumber(j.currentTarget.value))},[s]);return t.jsx(Di,{onBlur:w,tabIndex:-1,children:t.jsx(V,{id:"numberInputTooltip",tip:c,children:t.jsx(Ri,{...d,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(a),"aria-valuenow":Number(x),max:r,min:a,name:l,onChange:b,onKeyUp:$,ref:p,step:10**-g,type:"number",value:x})})})}),qe=u.forwardRef(function({disabled:n,icon:o,margin:i,onClick:r,...a},l){return t.jsx(si,{$margin:i,"aria-label":o,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...a,children:t.jsx(D,{icon:o,iconClass:"action",iconSize:"lg",iconType:"fa-light"})})}),Re=({error:e,decimalPlaces:n=0,disabled:o=!1,id:i,maxLength:r,max:a=1/0,min:l=0,name:s,onChange:c,placeholder:d,register:p,required:g,setValue:x,value:h})=>{const b=y.useTheme(),w=o?void 0:e,$=n<0?0:n,[j,v]=u.useState(h?f._.toNumber(h):0),C=u.useCallback(()=>{const T=(j-10**-$).toFixed($),S=Math.max(Number(l),Number(T));x&&x(s,S,{shouldDirty:!0}),v(S);const L=ye("change",s,T);c&&c(L)},[j,$,l,x,s,c]),k=u.useCallback(()=>{const T=(j+10**-$).toFixed($),S=Math.min(Number(a),Number(T)>Number(l)?Number(T):Number(l));x&&x(s,S,{shouldDirty:!0}),v(S);const L=ye("change",s,T);c&&c(L)},[j,$,a,l,x,s,c]),z=u.useCallback(T=>{const{value:S}=T.target,L=/\d+/u.test(S)&&!f._.isEmpty(S);x&&x(s,L?S:void 0),c&&c(T),v(Number(S))},[s,c,x]),I=u.useCallback(T=>{T.key==="Enter"&&T.preventDefault()},[]);return t.jsxs(oe,{className:`${o?"disabled":""} ${w?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":w?"true":"false","aria-label":s,"aria-required":g,autoComplete:"off",disabled:o,id:i??s,max:a,min:l,onChange:z,onKeyDown:I,placeholder:d,required:g,step:10**-$,type:"number",value:j,...p==null?void 0:p(s,{maxLength:r,max:a,min:l,onChange:z,value:h,valueAsNumber:!0})}),w&&t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"lg"}),t.jsx(qe,{borderLeft:"inherit",borderRight:"inherit",disabled:o,icon:"minus",margin:"0 -0.625rem 0 0",onClick:C,px:.75,py:.75}),t.jsx(qe,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:o,icon:"plus",onClick:k,px:.75,py:.75})]})},Fi=u.forwardRef(function({autoUpdate:n=!1,decimalPlaces:o=0,defaultValue:i=0,max:r,min:a,name:l,onEnter:s,tooltipMessage:c,...d},p){const g=o<0?0:o,[x,h]=u.useState(Number(i).toFixed(g)),b=u.useCallback(j=>{const v=f.lodashExports.toNumber(j.target.value);j.target.value.endsWith(".")?h(j.target.value):v>=Number(a)&&v<=Number(r)&&(h(String(v)),n&&(s==null||s(f.lodashExports.toNumber(v.toFixed(g))))),j.stopPropagation()},[n,g,r,a,s]),w=u.useCallback(j=>{j.currentTarget.contains(j.relatedTarget)||h(Number(i).toFixed(g)),j.stopPropagation()},[g,i]),$=u.useCallback(j=>{j.stopPropagation(),j.key==="Enter"&&!f.lodashExports.isEmpty(j.currentTarget.value)&&(s==null||s(f.lodashExports.toNumber(j.currentTarget.value)))},[s]);return t.jsx(qo,{onBlur:w,tabIndex:-1,children:t.jsx(V,{id:"numberInputTooltip",tip:c,children:t.jsx(Xo,{...d,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(a),"aria-valuenow":Number(x),max:r,min:a,name:l,onChange:b,onKeyUp:$,ref:p,step:10**-g,type:"number",value:x})})})}),Xt=({autoUpdate:e,decimalPlaces:n,disabled:o=!1,error:i,helpLink:r,helpLinkText:a,helpText:l,id:s,label:c,linkPosition:d,maxLength:p,max:g,min:x,name:h,onChange:b,onEnter:w,placeholder:$,register:j,required:v,setValue:C,tooltip:k,tooltipMessage:z,value:I,variant:T="full",watch:S,weight:L})=>T==="compact"?t.jsx(qt,{"aria-label":h,autoUpdate:e,decimalPlaces:n,defaultValue:Number(I??0),disabled:o,max:g,min:x,name:h,onEnter:w??(()=>{}),tooltipMessage:z}):t.jsx(U,{error:o?void 0:i,helpLink:r,helpLinkText:a,helpText:l,htmlFor:h,label:c,linkPosition:d,maxLength:p,required:v,tooltip:k,weight:L,children:t.jsx(Re,{decimalPlaces:n,disabled:o,error:i,id:s,max:g,maxLength:p,min:x,name:h,onChange:b,placeholder:$,register:j,required:v,setValue:C,value:S?S(h):I})}),Jt=({disabled:e=!1,error:n,name:o,label:i,propsMax:r,propsMin:a,required:l,tooltip:s,variant:c="default"})=>{const d=`${o}Max`,p=`${o}Min`;return t.jsx(U,{error:e?void 0:n,htmlFor:o,label:i,required:l,tooltip:s,children:t.jsxs(m,{display:"flex",flexDirection:c==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Re,{...a,disabled:e,error:n,name:(a==null?void 0:a.name)??p}),t.jsx(Re,{...r,disabled:e,error:n,name:(r==null?void 0:r.name)??d})]})})},Li=y.styled.div`
|
|
1416
1434
|
${({theme:e})=>`
|
|
1417
1435
|
align-items: flex-start;
|
|
1418
1436
|
align-self: stretch;
|
|
@@ -1452,7 +1470,7 @@
|
|
|
1452
1470
|
}
|
|
1453
1471
|
}
|
|
1454
1472
|
`}
|
|
1455
|
-
`,
|
|
1473
|
+
`,Ai=y.styled.button`
|
|
1456
1474
|
${({theme:e})=>`
|
|
1457
1475
|
align-items: center;
|
|
1458
1476
|
background: inherit;
|
|
@@ -1468,7 +1486,7 @@
|
|
|
1468
1486
|
cursor: not-allowed;
|
|
1469
1487
|
}
|
|
1470
1488
|
`}
|
|
1471
|
-
`,
|
|
1489
|
+
`,Pi=y.styled.ul`
|
|
1472
1490
|
${({theme:e})=>`
|
|
1473
1491
|
align-items: flex-start;
|
|
1474
1492
|
box-shadow: ${e.shadows.md};
|
|
@@ -1482,7 +1500,7 @@
|
|
|
1482
1500
|
scrollbar-width: thin;
|
|
1483
1501
|
width: max-content;
|
|
1484
1502
|
`}
|
|
1485
|
-
`,
|
|
1503
|
+
`,Oi=y.styled.li`
|
|
1486
1504
|
${({theme:e})=>`
|
|
1487
1505
|
align-items: center;
|
|
1488
1506
|
background: ${e.palette.white};
|
|
@@ -1499,22 +1517,22 @@
|
|
|
1499
1517
|
background: ${e.palette.gray[100]};
|
|
1500
1518
|
}
|
|
1501
1519
|
`}
|
|
1502
|
-
`,
|
|
1520
|
+
`,Mi=y.styled.p`
|
|
1503
1521
|
color: ${({theme:e})=>e.palette.gray[800]};
|
|
1504
1522
|
font-size: inherit;
|
|
1505
1523
|
min-width: 55%;
|
|
1506
1524
|
overflow: hidden;
|
|
1507
1525
|
text-overflow: ellipsis;
|
|
1508
1526
|
white-space: nowrap;
|
|
1509
|
-
`,
|
|
1527
|
+
`,Wi=({disabled:e,error:n,label:o,name:i,placeholder:r,required:a,register:l,tooltip:s,value:c,watch:d,weight:p})=>{const g=y.useTheme(),x=u.useRef(null),h=e?void 0:n,b=(d==null?void 0:d(i))??c,[w,$]=u.useState(!1),[j,v]=u.useState(""),{refs:C,floatingStyles:k}=f.useFloating$1({placement:"bottom-start",whileElementsMounted:f.autoUpdate}),{inputRef:z,inputValue:I,handlePhoneValueChange:T,country:S,setCountry:L}=f.ee({countries:f._$1,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),E=u.useCallback(B=>{B.key==="Enter"&&B.preventDefault()},[]),A=u.useCallback(B=>{B.preventDefault(),$(M=>!M),w||v("")},[w]),K=u.useCallback(B=>()=>{L(B),$(!1),v("")},[L,$]),Z=u.useCallback(B=>{B.key.length===1?v(M=>M+B.key):B.key==="Backspace"&&v(M=>M.slice(0,-1))},[]),ie=f._$1.filter(B=>{const{name:M}=f.M(B);return M.toLowerCase().includes(j.toLowerCase())});return ee(C.floating.current,()=>{$(!1),v("")},!0),t.jsx(U,{error:h,htmlFor:i,label:o,required:a,tooltip:s,weight:p,children:t.jsxs(Li,{className:`${e?"disabled":""} ${h?"error":""}`,ref:x,children:[t.jsxs(Ai,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:A,onKeyDown:Z,ref:C.setReference,children:[t.jsx(f.q,{iso2:S.iso2,size:"16px"}),t.jsx(D,{icon:"angle-down",iconColor:g.palette.gray[400],iconSize:"lg",iconType:"fa-light"})]}),t.jsxs(oe,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":i,"aria-required":a,autoComplete:"off","data-testid":`${i}-input`,disabled:e,id:i,name:i,onKeyDown:E,placeholder:r,ref:z,type:"tel",value:I,...l==null?void 0:l(i,{required:a,onChange:T})}),h?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:g.palette.error[500],iconSize:"lg"}):void 0]}),w&&le.createPortal(t.jsx(Pi,{ref:C.setFloating,style:k,children:ie.map(B=>{const{dialCode:M,iso2:q,name:de}=f.M(B);return t.jsxs(Oi,{onClick:K(q),value:q,children:[t.jsx(f.q,{iso2:q,size:"16px"}),t.jsx(Mi,{children:de}),t.jsx(N,{color:g.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+M})]},q)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Bi=({disabled:e=!1,error:n,helpLink:o,helpLinkText:i,helpText:r,isTouched:a,isValid:l,label:s,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,onBlur:x,placeholder:h,register:b,required:w,rows:$,tooltip:j,watch:v,weight:C,value:k})=>{const z=y.useTheme(),I=(v==null?void 0:v(c))??k,T=l&&a&&!e,S=e?void 0:n;return t.jsx(U,{disabled:e,error:S,helpLink:o,helpLinkText:i,helpText:r,htmlFor:c,label:s,maxLength:g,required:w,tooltip:j,value:I?String(I):void 0,weight:C,children:t.jsxs(oe,{className:`
|
|
1510
1528
|
${e?"disabled":""} ${S?"error":""} ${T?"success":""}
|
|
1511
|
-
`,children:[
|
|
1529
|
+
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":S?"true":"false","aria-label":c,"aria-required":w,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:h,rows:$,value:I,...b==null?void 0:b(c,{required:w,onBlur:x})}),S?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:z.palette.error[500],iconSize:"lg"}):void 0,T?t.jsx(D,{icon:"check-circle",iconClass:"success-icon",iconColor:z.palette.success[500],iconSize:"lg"}):void 0]})})},Hi=({control:e,description:n,disabled:o,id:i,items:r,align:a,inputType:l="text",inputNumberProps:s,minHeight:c,minWidth:d,name:p,placeholder:g,textAlign:x,tooltip:h,title:b,value:w,isTouched:$,isValid:j,error:v,onChange:C,register:k,setValue:z,watch:I})=>{const T=u.useMemo(()=>{if(l==="text")return t.jsx(Oe,{disabled:o,error:v,isTouched:$,isValid:j,name:p,placeholder:g,register:k});if(l==="date")return t.jsx(Ut,{disabled:o,error:v,name:p,register:k,setValue:z,watch:I});if(l==="select"&&r)return t.jsx(at,{control:e,disabled:o,items:r,name:p,placeholder:g,value:w});const{decimalPlaces:S,max:L,min:E}=s??{};return t.jsx(Xt,{decimalPlaces:S,disabled:o,error:v,max:L,min:E,name:p,onChange:C,placeholder:g,register:k,setValue:z,value:w,watch:I})},[e,o,v,s,l,$,j,r,p,C,g,k,z,w,I]);return t.jsxs(Ko,{$align:a,$minHeight:c,$minWidth:d,children:[t.jsx(Fe,{description:n,id:i,textAlign:x,title:b,tooltip:h}),T]})},_i=ce.default.div`
|
|
1512
1530
|
display: flex;
|
|
1513
1531
|
align-self: flex-start;
|
|
1514
1532
|
margin-left: auto;
|
|
1515
1533
|
width: 40px;
|
|
1516
1534
|
height: auto;
|
|
1517
|
-
`,Qt=(e,
|
|
1535
|
+
`,Qt=(e,n)=>{const[i,r]=u.useState(0),[a,l]=u.useState(0);return u.useEffect(()=>{a===100&&(()=>{r(c=>c===n-1?0:c+1)})()},[a,n]),u.useEffect(()=>{const s=setInterval(()=>{l(c=>c===100?0:c+1)},e);return()=>{clearInterval(s)}},[e]),{cycle:i,progress:a,setCycle:r,setProgress:l}},en=({publicId:e,format:n="webp"})=>{const o=u.useMemo(()=>new f.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return u.useMemo(()=>o.image(e).format(n),[o,e,n])},Te=e=>{const[n,o]=u.useState(!1),i=u.useCallback(()=>{o(!0)},[]),r=u.useCallback(()=>{o(!1)},[]),a=u.useCallback(()=>{o(l=>!l)},[]);return{close:r,isOpen:n,name:e,open:i,setIsOpen:o,toggle:a}},Vi=e=>e.reduce((n,o)=>({...n,[o.id]:o.visible}),{}),tn=({name:e,items:n,columnOrder:o,setColumnOrder:i,setColumnVisibility:r})=>{const a=u.useMemo(()=>[...n.filter(({locked:g})=>g).map(({locked:g,...x})=>({...x,visible:!0,locked:g})),...n.filter(({locked:g})=>!g)],[n]),[l,s]=u.useState(a),c=u.useCallback(g=>{const x=g.filter(({locked:$})=>!$),b=[...g.filter(({locked:$})=>$),...x],w=b.map(({name:$})=>$);s($=>[...b,...$.filter(({name:j})=>!w.includes(j))]),i&&i(b.map(({id:$})=>$))},[i]),d=u.useCallback(()=>{const g=l.map(x=>({...x,visible:x.locked||((o==null?void 0:o.includes(x.id))??!1)})).toSorted((x,h)=>{if(x.locked&&!h.locked)return-1;if(!x.locked&&h.locked)return 1;if(Number(h.visible)!==Number(x.visible))return Number(h.visible)-Number(x.visible);const b=(o==null?void 0:o.indexOf(x.id))??0,w=(o==null?void 0:o.indexOf(h.id))??0;return b-w});r==null||r(Vi(g)),c(g)},[l,o,c,r]),p=u.useMemo(()=>f.some(l,g=>((o==null?void 0:o.includes(g.id))??!1)!==g.visible),[l,o]);return{setColumns:c,resetToDefault:d,columns:l,...Te(e),hasChanged:p}},lt=(e,n)=>u.useMemo(()=>f._.debounce(e,n),[e,n]),Ui=e=>{const[n,o]=u.useState(),i=lt(r=>{o(r)},(e==null?void 0:e.debounceWait)??300);return[n,i]},Gi=({alt:e="img",height:n="",width:o="",plugins:i=[f.lazyload(),f.placeholder()],publicId:r})=>{const a=en({publicId:r});return t.jsx(f.AdvancedImage,{alt:e,cldImg:a,height:n,plugins:i,width:o})},ne=tt.default.memo(Gi),Yi=y.styled.label`
|
|
1518
1536
|
${({theme:e})=>`
|
|
1519
1537
|
align-items: center;
|
|
1520
1538
|
display: flex;
|
|
@@ -1593,7 +1611,7 @@
|
|
|
1593
1611
|
}
|
|
1594
1612
|
|
|
1595
1613
|
`}
|
|
1596
|
-
`,
|
|
1614
|
+
`,Ki=y.styled.span.attrs({className:"checkmark"})``,ct=u.forwardRef(function({checked:n,disabled:o=!1,label:i,name:r,onChange:a,onClick:l,value:s,...c},d){return t.jsxs(Yi,{"aria-disabled":o,"aria-label":i??r,role:"radiogroup",children:[t.jsx("input",{"aria-checked":n,"aria-disabled":o,"aria-label":i??r,checked:n,disabled:o,name:r,onChange:a,onClick:l,ref:d,type:"radio",value:s,...c}),t.jsx(Ki,{}),i??null]})}),Zi=({alt:e,customDescription:n,imageId:o,icon:i,selectorProps:r,onClick:a,register:l,bgColor:s,title:c,isATag:d=!1,width:p="fit-content"})=>{const g=y.useTheme();return t.jsxs(m,{alignItems:"center",bgColor:s??"",border:`1px solid ${g.palette.gray[200]}`,borderColorHover:g.palette.gray[600],borderRadius:g.spacing[.25],display:"inline-flex",pr:d?1:0,shadowHover:"md",width:p,children:[t.jsxs(m,{display:"inline-flex",padding:[1,1,1,1],children:[t.jsx(m,{alignSelf:"start",display:"flex",width:"fit-content",children:t.jsx(ct,{defaultChecked:r.defaultChecked,name:r.name,onClick:a,value:r.value,...l==null?void 0:l(r.name)})}),t.jsxs(m,{alignItems:"center",display:"flex",gap:.5,justify:"space-between",ml:1,mr:1,width:"100%",children:[!d&&o!==void 0&&t.jsx(ne,{alt:e??"card image",height:"32px",publicId:o,width:"32px"}),i===void 0?void 0:t.jsx(D,{icon:i,iconSize:"xl",iconType:"fa-light"}),t.jsxs(m,{display:"flex",flexDirection:"column",width:"100%",children:[t.jsx(N,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),n===void 0?void 0:t.jsx(m,{children:n})]})]})]}),d&&t.jsx(_i,{children:t.jsx(ne,{alt:e??"tag image",height:"40px",publicId:o??"tag image",width:"40px"})})]})},ge=y.styled.div`
|
|
1597
1615
|
${({theme:e})=>`
|
|
1598
1616
|
align-items: center;
|
|
1599
1617
|
background-color: ${e.palette.gray[200]};
|
|
@@ -1605,7 +1623,7 @@
|
|
|
1605
1623
|
transition: 0.2s;
|
|
1606
1624
|
width: 36px;
|
|
1607
1625
|
`}
|
|
1608
|
-
`,
|
|
1626
|
+
`,qi=y.styled.div`
|
|
1609
1627
|
${({theme:e})=>`
|
|
1610
1628
|
background-color: ${e.palette.white};
|
|
1611
1629
|
border-radius: 50%;
|
|
@@ -1616,7 +1634,7 @@
|
|
|
1616
1634
|
width: ${e.spacing[1]};
|
|
1617
1635
|
z-index: 1;
|
|
1618
1636
|
`}
|
|
1619
|
-
`,
|
|
1637
|
+
`,Xi=y.styled.label`
|
|
1620
1638
|
display: inline-block;
|
|
1621
1639
|
|
|
1622
1640
|
input {
|
|
@@ -1643,37 +1661,37 @@
|
|
|
1643
1661
|
background-color: ${({theme:e})=>e.palette.gray[200]};
|
|
1644
1662
|
border: 1px solid ${({theme:e})=>e.palette.gray[200]};
|
|
1645
1663
|
}
|
|
1646
|
-
`,nn=u.forwardRef(function({defaultChecked:
|
|
1664
|
+
`,nn=u.forwardRef(function({defaultChecked:n,disabled:o=!1,justify:i,name:r,leftDescription:a,leftDescriptionMinWidth:l,rightDescription:s,onChange:c,...d},p){const g=n===!0?"on":"off",x=typeof a=="object"&&a.on&&a.off?a[g]:a,h=u.useCallback(b=>{b.stopPropagation()},[]);return t.jsxs(m,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:i,children:[t.jsx(m,{minWidth:l,children:x}),t.jsxs(Xi,{onClick:h,role:"switch",children:[t.jsx("input",{...d,"aria-disabled":o,"aria-label":r,checked:n===!0,disabled:o,name:r,onChange:c,ref:p,type:"checkbox"}),t.jsx(ge,{"aria-label":"Toggle Switch",id:`${r}Toggle`,children:t.jsx(qi,{})})]}),s]})}),Ji=({id:e,title:n,toggles:o,minWidth:i="auto",height:r="auto"})=>{const a=y.useTheme();return t.jsxs(m,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${a.palette.gray[200]}`,borderRadius:a.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:r,justify:"center",minHeight:"100px",minWidth:i,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Fe,{id:e,title:n}),t.jsx(m,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:o.map(l=>t.jsx(nn,{...l},`$card-toggle-${l.name}`))})]})},Qi=.5,kt=1.25,er=({children:e,bgColor:n,border:o,gap:i=Qi,px:r=kt,py:a=kt,...l})=>{const s=y.useTheme();return t.jsx(m,{bgColor:n??s.palette.white,border:o??`1px solid ${s.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:"column",gap:i,px:r,py:a,...l,children:e})},tr=y.styled.div`
|
|
1647
1665
|
position: relative;
|
|
1648
1666
|
margin: auto;
|
|
1649
1667
|
overflow: hidden;
|
|
1650
|
-
`,
|
|
1668
|
+
`,nr=y.styled.div`
|
|
1651
1669
|
display: flex;
|
|
1652
1670
|
transition: transform 0.5s ease-in-out;
|
|
1653
1671
|
transform: translateX(
|
|
1654
1672
|
${({$currentIndex:e})=>-e*100}%
|
|
1655
1673
|
);
|
|
1656
|
-
`,
|
|
1674
|
+
`,or=y.styled.div`
|
|
1657
1675
|
align-items: center;
|
|
1658
1676
|
display: flex;
|
|
1659
1677
|
justify-content: center;
|
|
1660
1678
|
min-width: 100%;
|
|
1661
|
-
`,
|
|
1662
|
-
${({theme:e,$isActive:
|
|
1663
|
-
background-color: ${
|
|
1679
|
+
`,ir=y.styled.button`
|
|
1680
|
+
${({theme:e,$isActive:n})=>`
|
|
1681
|
+
background-color: ${n?e.palette.primary[400]:e.palette.white};
|
|
1664
1682
|
border: none;
|
|
1665
1683
|
border-radius: 50%;
|
|
1666
1684
|
cursor: pointer;
|
|
1667
1685
|
height: ${e.spacing[.75]};
|
|
1668
1686
|
width: ${e.spacing[.75]};
|
|
1669
1687
|
`}
|
|
1670
|
-
`,
|
|
1688
|
+
`,rr=y.styled.div`
|
|
1671
1689
|
align-items: center;
|
|
1672
1690
|
display: flex;
|
|
1673
1691
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1674
1692
|
justify-content: center;
|
|
1675
1693
|
margin-top: ${({theme:e})=>e.spacing[2]};
|
|
1676
|
-
`,
|
|
1694
|
+
`,ar=({slides:e,interval:n=300})=>{const{cycle:o,setCycle:i,setProgress:r}=Qt(n,e.length),a=u.useCallback(l=>()=>{i(l),r(0)},[i,r]);return t.jsxs(tr,{"aria-roledescription":"carousel",children:[t.jsx(nr,{$currentIndex:o,children:e.map((l,s)=>{const c=`slide-${s}`;return t.jsx(or,{"aria-label":c,"aria-roledescription":"slide",children:l.content},c)})}),t.jsx(rr,{children:e.map((l,s)=>{const c=`nav-button-${s}`;return t.jsx(ir,{$isActive:s===o,"aria-label":`Go to slide ${s+1}`,"data-testid":s===o?"active":"inactive",onClick:a(s)},c)})})]})},on=y.styled.div`
|
|
1677
1695
|
${({theme:e})=>`
|
|
1678
1696
|
background-color: ${e.palette.gray[100]};
|
|
1679
1697
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1749,7 +1767,7 @@
|
|
|
1749
1767
|
padding-bottom: unset;
|
|
1750
1768
|
}
|
|
1751
1769
|
`}
|
|
1752
|
-
`,
|
|
1770
|
+
`,sr=y.styled.div`
|
|
1753
1771
|
${({theme:e})=>`
|
|
1754
1772
|
align-items: end;
|
|
1755
1773
|
background-color: ${e.palette.gray[100]};
|
|
@@ -1767,10 +1785,10 @@
|
|
|
1767
1785
|
background-color: ${e.palette.gray[200]};
|
|
1768
1786
|
}
|
|
1769
1787
|
`}
|
|
1770
|
-
`,rn=({noCodeMessage:e="Code snippet not available",snippet:
|
|
1788
|
+
`,rn=({noCodeMessage:e="Code snippet not available",snippet:n,specific:o})=>(u.useEffect(()=>{f.prismExports.highlightAll()},[]),t.jsx(on,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":f._.isNil(n)||f._.isString(n)?0:n.offset+.7,...o!==void 0?{"data-line":String(Number(o))}:{},children:f._.isNil(n)||f._.isString(n)||f._.isEmpty(n.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:n.content})})})),lr=({noCodeMessage:e="Code snippet not available",snippet:n,specific:o,variant:i="normal",expanded:r=!1})=>{const a=y.useTheme(),[l,s]=u.useState(!1),[c,d]=u.useState(!0),p=u.useCallback(()=>{s(b=>!b)},[s]),g=u.useCallback(()=>{if(f._.isNil(n)||f._.isEmpty(n)||!f._.isString(n))return d(!1),e;const b=n.split(`
|
|
1771
1789
|
`);return b.length>8&&!l?`${[...b].splice(0,7).join(`
|
|
1772
1790
|
`)}
|
|
1773
|
-
${b[8]}...`:(b.length<8&&d(!1),
|
|
1791
|
+
${b[8]}...`:(b.length<8&&d(!1),n)},[l,n,e]),x=u.useMemo(g,[g]),h=u.useCallback(async()=>{await navigator.clipboard.writeText(x)},[x]);return i==="location"?t.jsx(rn,{noCodeMessage:e,snippet:n,specific:o}):t.jsxs(m,{bgColor:a.palette.gray[100],borderRadius:"4px",display:"inline-flex",justify:r?"space-between":"center",minWidth:"565px",position:"relative",width:r?"100%":"565px",children:[t.jsx(on,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:x})})}),t.jsxs(sr,{children:[t.jsx(W,{height:a.spacing[2.5],icon:"copy",iconColor:a.palette.gray[700],iconSize:"lg",iconType:"fa-light",onClick:h,variant:"ghost",width:a.spacing[2.5]}),c?t.jsxs(O,{onClick:p,variant:"ghost",children:[l?"Show Less":"Show more",t.jsx(D,{icon:l?"chevron-up":"chevron-down",iconColor:a.palette.gray[700],iconSize:"sm",iconType:"fa-light",ml:.25,onClick:h})]}):!1]})]})},{getVariant:cr}=X(e=>({fixed:`
|
|
1774
1792
|
height: auto;
|
|
1775
1793
|
min-width: 300px;
|
|
1776
1794
|
padding: ${e.spacing[1.25]};
|
|
@@ -1793,14 +1811,14 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1793
1811
|
@media screen and (min-width: ${e.breakpoints.sm}) {
|
|
1794
1812
|
width: 32%;
|
|
1795
1813
|
}
|
|
1796
|
-
`})),an=
|
|
1814
|
+
`})),an=y.styled.div.attrs({className:"comp-modal fixed inset-0 overflow-auto"})`
|
|
1797
1815
|
align-items: center;
|
|
1798
1816
|
background-color: ${({$bgColor:e="rgb(52 64 84 / 70%)"})=>e};
|
|
1799
1817
|
display: flex;
|
|
1800
1818
|
justify-content: center;
|
|
1801
1819
|
z-index: 99999;
|
|
1802
|
-
`,dt=
|
|
1803
|
-
${({theme:e,$size:
|
|
1820
|
+
`,dt=y.styled(m)`
|
|
1821
|
+
${({theme:e,$size:n})=>`
|
|
1804
1822
|
background-color: ${e.palette.white};
|
|
1805
1823
|
border: 1px solid ${e.palette.gray[200]};
|
|
1806
1824
|
border-radius: ${e.spacing[.25]};
|
|
@@ -1814,9 +1832,9 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1814
1832
|
margin: auto;
|
|
1815
1833
|
white-space: pre-line;
|
|
1816
1834
|
|
|
1817
|
-
${
|
|
1835
|
+
${cr(e,n)}
|
|
1818
1836
|
`}
|
|
1819
|
-
`,
|
|
1837
|
+
`,dr=y.styled.div`
|
|
1820
1838
|
${({theme:e})=>`
|
|
1821
1839
|
background-color: ${e.palette.white};
|
|
1822
1840
|
border-radius: 0 0 ${e.spacing[.25]} ${e.spacing[.25]};
|
|
@@ -1844,7 +1862,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1844
1862
|
}
|
|
1845
1863
|
}
|
|
1846
1864
|
`}
|
|
1847
|
-
`,
|
|
1865
|
+
`,pr=y.styled.div`
|
|
1848
1866
|
border-radius: ${({theme:e})=>`${e.spacing[.25]} ${e.spacing[.25]} 0 0`};
|
|
1849
1867
|
display: block;
|
|
1850
1868
|
overflow: unset;
|
|
@@ -1854,7 +1872,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1854
1872
|
padding: ${({theme:e})=>`${e.spacing[1.25]}`};
|
|
1855
1873
|
padding-bottom: ${({theme:e})=>`${e.spacing[1.5]}`};
|
|
1856
1874
|
position: sticky;
|
|
1857
|
-
`,
|
|
1875
|
+
`,gr=y.styled.div.attrs({className:"flex items-center justify-between"})``,ur=y.styled.div`
|
|
1858
1876
|
${({theme:e})=>`
|
|
1859
1877
|
border-radius: 0 0 ${e.spacing[.25]} ${e.spacing[.25]};
|
|
1860
1878
|
display: flex;
|
|
@@ -1885,7 +1903,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1885
1903
|
margin-right: 0;
|
|
1886
1904
|
}
|
|
1887
1905
|
`}
|
|
1888
|
-
`,
|
|
1906
|
+
`,xr=y.styled.div`
|
|
1889
1907
|
img {
|
|
1890
1908
|
margin: 0 calc(-${({theme:e})=>e.spacing[1.25]} - 1px)
|
|
1891
1909
|
${({theme:e})=>e.spacing[1.25]};
|
|
@@ -1901,15 +1919,15 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1901
1919
|
margin-right: 0;
|
|
1902
1920
|
`:""}
|
|
1903
1921
|
}
|
|
1904
|
-
`,sn=({alert:e,modalRef:
|
|
1922
|
+
`,sn=({alert:e,modalRef:n,confirmButton:o=void 0,cancelButton:i=void 0})=>{const{close:r}=n,a=u.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]),l=u.useCallback(()=>{o!=null&&o.onClick&&o.onClick(),r()},[o,r]);return[o,i].some(c=>!f.lodashExports.isEmpty(c))?t.jsxs(m,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(ur,{children:t.jsxs("div",{children:[i&&t.jsx(O,{id:i.id,onClick:a,variant:"tertiary",width:"100%",children:i.text}),o&&t.jsx(O,{id:o.id,onClick:l,variant:"primary",width:"100%",children:o.text})]})})]}):null},ln=({title:e,description:n,modalRef:o,otherActions:i,onClose:r})=>{const a=y.useTheme(),l=u.useCallback(()=>{r==null||r(),o.close()},[o,r]);return u.useEffect(()=>{const s=c=>{c.key==="Escape"&&l()};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[l]),t.jsxs(pr,{children:[t.jsxs(gr,{children:[typeof e=="string"?t.jsx(J,{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:[i,t.jsx(W,{icon:"close",iconColor:a.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),n&&f.lodashExports.isString(n)&&!f.lodashExports.isEmpty(n)?t.jsx(N,{mt:.5,size:"sm",children:n}):void 0,n&&!f.lodashExports.isString(n)&&t.jsx(he,{display:"block",mt:.5,size:"sm",children:n})]})},cn=({disabled:e,id:n="modal-confirm",onCancel:o,onConfirm:i="submit",txtCancel:r,txtConfirm:a})=>{const l=i==="submit";return t.jsxs(m,{display:"flex",gap:.75,id:"footer",maxWidth:o?"392px":"190px",mt:1.5,children:[o?t.jsx(O,{id:`${n}-cancel`,justify:"center",onClick:o,variant:"tertiary",width:"100%",children:r??"Cancel"}):void 0,t.jsx(O,{disabled:e,id:n,justify:"center",onClick:l?void 0:i,type:l?"submit":"button",variant:"primary",width:"100%",children:a??"Confirm"})]})},hr=(e,n,o)=>o?n==="secondary"?`3px solid ${e.palette.primary[100]}`:`3px solid ${e.palette.primary[500]}`:"unset",fr=y.styled.div`
|
|
1905
1923
|
display: flex;
|
|
1906
1924
|
flex-direction: row;
|
|
1907
1925
|
gap: ${({theme:e})=>e.spacing[.25]};
|
|
1908
|
-
border-bottom: ${({theme:e,$borderButton:
|
|
1926
|
+
border-bottom: ${({theme:e,$borderButton:n,$variant:o})=>hr(e,o,n)};
|
|
1909
1927
|
align-items: center;
|
|
1910
1928
|
padding: ${({theme:e})=>e.spacing[.625]}
|
|
1911
1929
|
${({theme:e})=>e.spacing[.5]};
|
|
1912
|
-
padding-bottom: ${({theme:e,$borderButton:
|
|
1930
|
+
padding-bottom: ${({theme:e,$borderButton:n})=>n?`calc(${e.spacing[.625]} - 2px)`:e.spacing[.625]};
|
|
1913
1931
|
|
|
1914
1932
|
&:hover:not([disabled]) {
|
|
1915
1933
|
background-color: ${({theme:e})=>e.palette.gray[100]};
|
|
@@ -1944,10 +1962,10 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1944
1962
|
}
|
|
1945
1963
|
}
|
|
1946
1964
|
}
|
|
1947
|
-
`,
|
|
1948
|
-
${({theme:e,$variant:
|
|
1965
|
+
`,yr=y.styled(Se)`
|
|
1966
|
+
${({theme:e,$variant:n})=>`
|
|
1949
1967
|
align-items: center;
|
|
1950
|
-
background: ${
|
|
1968
|
+
background: ${n==="error"?e.palette.primary[400]:e.palette.warning[500]};
|
|
1951
1969
|
border-radius: 100%;
|
|
1952
1970
|
font-family: ${e.typography.type.primary};
|
|
1953
1971
|
justify-content: center;
|
|
@@ -1957,14 +1975,14 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1957
1975
|
width: ${e.spacing[.5]};
|
|
1958
1976
|
height: ${e.spacing[.5]};
|
|
1959
1977
|
`}
|
|
1960
|
-
`,
|
|
1978
|
+
`,br=y.styled.div`
|
|
1961
1979
|
align-items: center;
|
|
1962
1980
|
color: ${({theme:e})=>e.palette.white};
|
|
1963
1981
|
display: flex;
|
|
1964
1982
|
font-size: 6px;
|
|
1965
1983
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1966
1984
|
justify-content: center;
|
|
1967
|
-
`;
|
|
1985
|
+
`;y.styled.div`
|
|
1968
1986
|
/* Override component size only in Storybook */
|
|
1969
1987
|
& > div {
|
|
1970
1988
|
width: 24px !important;
|
|
@@ -1974,7 +1992,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
1974
1992
|
font-size: 12px !important;
|
|
1975
1993
|
}
|
|
1976
1994
|
}
|
|
1977
|
-
`;const dn=u.forwardRef(function({numberIndicator:
|
|
1995
|
+
`;const dn=u.forwardRef(function({numberIndicator:n,show:o,variant:i="error",...r},a){return t.jsx(yr,{$variant:i,className:o?"flex":"hidden","data-testid":"notification-sign",ref:a,...r,children:n&&t.jsx(br,{children:n<=9?n:9})})}),pn=({end:e=!1,label:n,id:o,isActive:i=!1,link:r,notificationSign:a,onClick:l,tooltip:s="",variant:c="primary",tag:d})=>{const{pathname:p}=Ue.useLocation(),g=i||(c==="primary"?p.includes(r):p.endsWith(r));return t.jsx(V,{display:"flex",id:`${o}-tooltip`,tip:s,children:t.jsxs(fr,{$borderButton:g,$variant:c,children:[t.jsxs(Ue.NavLink,{end:e,id:o,onClick:l,to:r,children:[n,t.jsx(dn,{left:a==null?void 0:a.left,numberIndicator:a==null?void 0:a.numberIndicator,show:a==null?void 0:a.show,top:a==null?void 0:a.top,variant:a==null?void 0:a.variant})]}),d===void 0?null:t.jsx(Y,{tagLabel:`${d}`,variant:"default"})]})})},pt=({items:e,borders:n=!0,box:o=!1,variant:i="primary"})=>{const r=y.useTheme();return t.jsx(m,{alignItems:"center",bgColor:r.palette.white,border:o?"1px solid":void 0,borderBottom:n?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:o?r.palette.gray[200]:void 0,borderRadius:o?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:o?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:o?"max-content":"100%",children:e.map(({end:a,id:l,isActive:s,link:c,label:d,notificationSign:p,onClick:g,tag:x,tooltip:h})=>t.jsx(pn,{end:a,id:l,isActive:s,label:d,link:c,notificationSign:p,onClick:g,tag:x,tooltip:h,variant:i},l))})},ae=u.forwardRef(function({color:n=R.palette.gray[100],mt:o=.5,mb:i=.5,width:r,...a},l){return t.jsx(m,{as:"hr",borderTop:`1px solid ${n}`,mb:i,mt:o,ref:l,width:r??"100%",...a})}),$r=y.styled.li`
|
|
1978
1996
|
${({theme:e})=>`
|
|
1979
1997
|
align-items: center;
|
|
1980
1998
|
background-color: ${e.palette.white};
|
|
@@ -2021,7 +2039,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2021
2039
|
background-color: ${e.palette.gray[100]};
|
|
2022
2040
|
}
|
|
2023
2041
|
`}
|
|
2024
|
-
`,gn=
|
|
2042
|
+
`,gn=y.styled.ul`
|
|
2025
2043
|
${({theme:e})=>`
|
|
2026
2044
|
background-color: ${e.palette.white};
|
|
2027
2045
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2032,7 +2050,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2032
2050
|
min-width: 240px;
|
|
2033
2051
|
padding: ${e.spacing[.25]} 0 ${e.spacing[.25]} 0;
|
|
2034
2052
|
`}
|
|
2035
|
-
`,Ie=({children:e,disabled:
|
|
2053
|
+
`,Ie=({children:e,disabled:n=!1,icon:o,iconType:i="fa-light",href:r,onClick:a,onClickIcon:l,onKeyDown:s,rightIcon:c,selected:d=!1,value:p,...g})=>{const h=y.useTheme().palette.gray[n?300:800],b=n?u.Children.map(e,w=>u.isValidElement(w)?u.cloneElement(w,{disabled:n,...w.props}):w):e;return t.jsxs($r,{"aria-disabled":n,"aria-label":p,"aria-selected":d,"data-testid":p,onClick:a,onKeyDown:s,value:p,...g,children:[o!==void 0||p!==void 0?t.jsxs(m,{alignItems:"center",display:"flex",gap:.625,children:[o?t.jsx(D,{disabled:n,icon:o,iconColor:h,iconSize:"sm",iconType:i}):null,r===void 0?b:t.jsx(Q,{href:r,children:b})]}):null,d||c?t.jsx(D,{disabled:n,icon:c??"check",iconClass:"selected",iconColor:h,iconSize:"lg",iconType:i,onClick:l}):null]})},mr=ce.default(Ie)`
|
|
2036
2054
|
margin-top: 10px;
|
|
2037
2055
|
border: 1px solid ${({theme:e})=>e.palette.gray[300]};
|
|
2038
2056
|
border-radius: 4px;
|
|
@@ -2050,7 +2068,11 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2050
2068
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
2051
2069
|
background-color: unset;
|
|
2052
2070
|
}
|
|
2053
|
-
|
|
2071
|
+
|
|
2072
|
+
${({$isDragging:e,theme:n})=>e?`
|
|
2073
|
+
border: 2px solid ${n.palette.black};
|
|
2074
|
+
`:""}
|
|
2075
|
+
`,un=({items:e,onReorder:n,title:o,description:i,onClickClose:r})=>{const[a,l]=u.useState(null),s=u.useCallback(g=>()=>{r(g)},[r]),c=u.useCallback(g=>{l(g.name)},[]),d=u.useCallback(()=>{l(null)},[]),p=u.useCallback(g=>()=>{c(g)},[c]);return t.jsxs(f.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs(m,{display:"flex",gap:.25,children:[t.jsx(J,{display:"flex",size:"xs",children:o}),t.jsx(Y,{priority:"high",tagLabel:String(e.filter(g=>g.visible).length),variant:"error"})]}),t.jsx(N,{size:"sm",children:i}),e.map(g=>g.visible?t.jsx(f.ReorderItem,{as:"div",dragListener:!g.locked,item:g.name,onDragEnd:d,onDragStart:p(g),style:{zIndex:a===g.name?9999:"auto",position:a===g.name?"relative":"static"},value:g,children:t.jsx(mr,{$isDragging:a===g.name,disabled:g.locked,icon:"grip-vertical",iconType:"fa-solid",label:g.name,onClickIcon:g.locked?void 0:s(g.id),rightIcon:g.locked?"lock":"close",selected:g.visible,value:g.name,children:g.name})},g.name):void 0)]})},wr=ce.default(Ie)`
|
|
2054
2076
|
padding: 7px 8px;
|
|
2055
2077
|
|
|
2056
2078
|
&[aria-selected="true"] {
|
|
@@ -2066,7 +2088,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2066
2088
|
display: none;
|
|
2067
2089
|
}
|
|
2068
2090
|
}
|
|
2069
|
-
`,xn=({options:e,title:
|
|
2091
|
+
`,xn=({options:e,title:n,checkboxesName:o,defaultBgColor:i,defaultCollapsed:r,onChange:a})=>{const l=y.useTheme(),[s,c]=u.useState(r??!1),d=u.useCallback(()=>{c(p=>!p)},[]);return t.jsxs(m,{"aria-label":n,bgColor:s&&!i?l.palette.gray[50]:l.palette.white,border:"1px solid"+l.palette.gray[300],borderRadius:"8px",display:"inline-flex",flexDirection:"column",gap:.625,px:.75,py:.625,role:"region",width:"100%",children:[t.jsxs(m,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[t.jsx(N,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:n}),t.jsx(D,{icon:s?"chevron-up":"chevron-down",iconColor:l.palette.gray[400],iconSize:"lg"})]}),s?t.jsx(m,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx(m,{bgColor:l.palette.white,border:"1px solid",borderColor:l.palette.gray[300],borderRadius:l.spacing[.25],px:.5,py:.5,children:t.jsx(re,{checked:p.visible,disabled:p.locked,label:p.name,name:`${o}-${p.name}`,onChange:a,value:p.name})},p.name))}):void 0]})},hn=e=>e.reduce((o,i)=>i.group?o[i.group]?{...o,[i.group]:[...o[i.group],i]}:{...o,[i.group]:[i]}:o,{}),vr=y.styled.input`
|
|
2070
2092
|
${({theme:e})=>`
|
|
2071
2093
|
background: none;
|
|
2072
2094
|
border: none !important;
|
|
@@ -2096,7 +2118,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2096
2118
|
display:none;
|
|
2097
2119
|
}
|
|
2098
2120
|
`}
|
|
2099
|
-
`,
|
|
2121
|
+
`,jr=y.styled.div`
|
|
2100
2122
|
${({theme:e})=>`
|
|
2101
2123
|
align-items: center;
|
|
2102
2124
|
background-color: ${e.palette.white};
|
|
@@ -2116,17 +2138,17 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2116
2138
|
border: 2px solid ${e.palette.black};
|
|
2117
2139
|
}
|
|
2118
2140
|
`}
|
|
2119
|
-
`,
|
|
2141
|
+
`,kr=y.styled.div`
|
|
2120
2142
|
${({theme:e})=>`
|
|
2121
2143
|
background-color: ${e.palette.white};
|
|
2122
2144
|
border-radius: ${e.spacing[.5]};
|
|
2123
2145
|
width: 250px;
|
|
2124
2146
|
`}
|
|
2125
|
-
`,se=({name:e,smallSearch:
|
|
2147
|
+
`,se=({name:e,smallSearch:n=!1,onClear:o,onChange:i,value:r,...a})=>{const l=u.useRef(null),s=y.useTheme(),[c,d]=u.useState(!1),[p,g]=u.useState(r??""),{refs:x,floatingStyles:h}=f.useFloating$1(),b=u.useCallback(()=>{d(C=>!C)},[]),w=u.useCallback(C=>{C.key==="Enter"&&C.preventDefault()},[]),$=u.useCallback(C=>{g(C.target.value),i==null||i(C)},[i]),j=u.useCallback(()=>{g(""),o==null||o()},[o]);ee(x.floating.current,()=>{d(!1)},!0);const v=t.jsxs(jr,{children:[t.jsx(D,{icon:"magnifying-glass",iconColor:s.palette.gray[700],iconSize:"lg",iconType:"fa-light"}),t.jsx(vr,{id:e,name:e,onChange:$,onKeyDown:w,ref:l,type:"search",value:p,...a}),!f.lodashExports.isEmpty(p)&&t.jsx(W,{icon:"xmark",iconColor:s.palette.gray[300],iconSize:"lg",iconType:"fa-light",onClick:j,px:.25,py:.25,type:"reset",variant:"ghost"})]});return n?t.jsxs(u.Fragment,{children:[t.jsx(W,{border:`1px solid ${s.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"lg",iconType:"fa-light",onClick:b,ref:x.setReference,variant:"ghost"}),c?t.jsx(kr,{ref:x.setFloating,style:h,children:v}):void 0]}):v},fn=({columns:e,formId:n,onChangeHandler:o,variant:i})=>{const r=u.useRef(null),[a,l]=u.useState([]),[s,c]=u.useState(""),d=u.useCallback(g=>{const{value:x}=g.target;c(x)},[]),p=u.useCallback(()=>{r.current&&(r.current.reset(),c(""))},[r]);return u.useEffect(()=>{l(e.filter(g=>{var x;return i==="grouped"?g.name.toLowerCase().includes(s.toLowerCase())||((x=g.group)==null?void 0:x.includes(s.toLowerCase())):g.name.toLowerCase().includes(s.toLowerCase())}))},[e,s,i]),i==="grouped"?t.jsxs(m,{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(se,{name:"search",onChange:d,onClear:p,value:s})}),t.jsx("form",{"data-testid":n,id:n,onReset:p,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(hn(a)).map(([g,x],h)=>{const b=`li-checkbox${g}`;return t.jsx(xn,{checkboxesName:g,defaultBgColor:!0,defaultCollapsed:h===0,onChange:o,options:x,title:g},b)})})]}):t.jsxs(m,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(se,{name:"search",onChange:d,onClear:p,value:s})}),t.jsx("form",{"data-testid":n,id:n,onReset:p,style:{paddingTop:"0.625rem"},children:a.map(g=>{const x=`li-checkbox-${g.name}`;return t.jsx(wr,{selected:g.visible,value:x,width:"content",children:t.jsx(re,{checked:g.visible,disabled:g.locked,label:g.name,name:g.name,onChange:o,value:g.name})},x)})})]})},yn=({_containerId:e="portals",title:n,modalRef:o,variant:i})=>{const r=y.useTheme(),a=u.useRef(null),[l,s]=u.useState(void 0),c=u.useCallback(g=>{const{checked:x,value:h}=g.target,b=o.columns.map(w=>{var $;return w.name===h?(($=w.toggleVisibility)==null||$.call(w,x),{...w,visible:x}):w});o.setColumns(b)},[o]),d=u.useCallback(g=>{const x=o.columns.map(h=>{var b;return h.id===g?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});o.setColumns(x)},[o]),p=u.useCallback(()=>{var x;const g=(x=a.current)==null?void 0:x.scrollHeight;l!==g&&s(g)},[l]);return o.isOpen?le.createPortal(t.jsx(an,{"aria-label":o.name,"aria-modal":"true",children:t.jsxs(dt,{$size:"md",flexDirection:"column",children:[t.jsxs(m,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(J,{size:"sm",children:n}),t.jsx(W,{icon:"close",iconColor:r.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(ae,{mb:0,mt:0}),t.jsxs(m,{display:"flex",gap:1.25,onScroll:p,px:1.25,ref:a,scroll:"y",width:"100%",children:[t.jsx(fn,{columns:o.columns,formId:"columns-visibility",onChangeHandler:c,variant:i}),t.jsx(m,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(un,{description:"Click and drag to reorder the columns",items:o.columns,onClickClose:d,onReorder:o.setColumns,title:"Reorder columns"})]}),t.jsx(ae,{mb:0,mt:0}),t.jsxs(m,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(O,{disabled:!o.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:o.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),t.jsx(O,{id:"columns-modal-submit",justify:"center",onClick:o.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Cr=ce.default(Ie)`
|
|
2126
2148
|
padding: 8px;
|
|
2127
2149
|
min-height: 36px;
|
|
2128
2150
|
min-width: unset;
|
|
2129
|
-
`,
|
|
2151
|
+
`,Sr=ce.default.div.attrs({className:"comp-modal absolute top-[55px] overflow-auto"})`
|
|
2130
2152
|
align-items: center;
|
|
2131
2153
|
background-color: ${({$bgColor:e="rgb(52 64 84 / 70%)"})=>e};
|
|
2132
2154
|
display: flex;
|
|
@@ -2139,7 +2161,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2139
2161
|
svg.fa-check {
|
|
2140
2162
|
border-radius: 2px;
|
|
2141
2163
|
}
|
|
2142
|
-
`,bn=({control:e,option:t,register:o,setValue:i})=>{var r,a,l,s,c;switch(t.type){case"checkboxes":return n.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=t.options)==null?void 0:r.map(p=>n.jsx(Ct,{value:p.value,width:"content",children:n.jsx(re,{...o("checkbox"),label:p.label,value:p.value})},`li-checkbox-${p.value}`))});case"radioButton":return n.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[t.label,(a=t.options)==null?void 0:a.map(p=>n.jsx(Ct,{value:p.value,width:"content",children:n.jsx(ct,{...o("radio"),label:p.label,value:p.value})},`li-radio-${p.value}`))]});case"select":return n.jsx(at,{control:e,items:((l=t.options)==null?void 0:l.map(p=>({name:p.label??"",value:p.value})))??[],label:t.label,name:`text.${String(t.key)}-${t.filterFn??"caseInsensitive"}`,placeholder:t.placeholder,value:t.value});case"text":const d=`text.${String(t.key)}-${t.filterFn??"caseInsensitive"}`;return n.jsx(Oe,{label:t.label,name:d,placeholder:t.placeholder,register:o,value:t.value});case"numberRange":return n.jsx(Jt,{label:t.label,name:String(t.key),propsMax:{placeholder:t.placeholder?`${t.placeholder} Max`:"Max",register:o,name:"maxValue",value:t.maxValue,setValue:i},propsMin:{placeholder:t.placeholder?`${t.placeholder} Min`:"Min",register:o,name:"minValue",value:t.minValue,setValue:i},variant:"filters"});case"dateRange":return n.jsx(Yt,{label:t.label,name:String(t.key),propsMax:{name:"maxValue",value:(s=t.maxValue)==null?void 0:s.toString()},propsMin:{name:"minValue",value:(c=t.minValue)==null?void 0:c.toString()},register:o,setValue:i,variant:"filters"});default:return n.jsx("div",{})}},$n=({control:e,items:t,register:o,setValue:i})=>n.jsx(n.Fragment,{children:t.map((r,a)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return n.jsxs("div",{children:[n.jsx(bn,{control:e,option:r,register:o,setValue:i}),a<t.length-1&&n.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),mn=e=>{var s,c,d,p,g;const[t,o]=u.useState([...e]),{control:i,register:r,handleSubmit:a,setValue:l}=y.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:((d=(c=(s=e.find(x=>x.type==="radioButton"))==null?void 0:s.options)==null?void 0:c.find(({checked:x})=>x))==null?void 0:d.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(p=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:p.minValue,maxValue:(g=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:g.maxValue}});return{control:i,items:t,setItems:o,register:r,handleSubmit:a,setValue:l}},kr=(e,t)=>{var o,i,r,a,l;t("checkbox",e.filter(s=>s.type==="checkboxes").flatMap(s=>{var c;return((c=s.options)==null?void 0:c.filter(d=>d.checked).map(d=>d.value))??[]})),t("radio",((r=(i=(o=e.find(s=>s.type==="radioButton"))==null?void 0:o.options)==null?void 0:i.find(({checked:s})=>s))==null?void 0:r.value)??""),t("text",e.filter(s=>["text","select"].includes(s.type)).reduce((s,c)=>({...s,[`${String(c.key)}-${c.filterFn??"caseInsensitive"}`]:c.value??""}),{})),t("minValue",(a=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:a.minValue),t("maxValue",(l=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:l.maxValue)},Cr=(e,t)=>(e==null?void 0:e.filter(o=>{var i;return((i=o.label)==null?void 0:i.toLowerCase().includes((t==null?void 0:t.toLowerCase())??""))??o.value.toLowerCase().includes((t==null?void 0:t.toLowerCase())??"")}))??[],Sr=async(e,t)=>await Promise.all(e.map(async o=>{if(o.type==="checkboxes"){const r=(o.filterOptions?await o.filterOptions(o.options??[],t):Cr(o.options??[],t)).filter((a,l,s)=>s.findIndex(c=>c.value===a.value)===l);return{...o,options:r}}return o})),Xe=({options:e,onSearch:t,onSubmit:o,id:i,selectedFilter:r})=>{const{control:a,items:l,setItems:s,register:c,handleSubmit:d,setValue:p}=mn(e),g=e.some(b=>b.type==="checkboxes"&&b.hideSearch!==!0),x=u.useCallback(async b=>{const{value:w}=b.target;t&&t(w);const $=await Sr(e,w);s($)},[e,t,s]),h=u.useCallback(b=>{o&&o(b)},[o]);return u.useEffect(()=>{s(e),kr(e,p)},[e,s,p]),n.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,style:{writingMode:"horizontal-tb",maxWidth:"300px",width:"100%"},children:[g&&n.jsxs("div",{children:[r,n.jsx(se,{onChange:x})]}),n.jsxs("form",{id:i,onSubmit:d(h),children:[n.jsx($n,{control:a,items:l,register:c,setValue:p}),n.jsx(O,{mt:1,type:"submit",children:"Apply"})]})]})},wn=({options:e,variant:t,onApplyFilters:o,onSearch:i,setDirection:r,setHandler:a})=>{const l=f.useTheme(),[s,c]=u.useState(e),[d,p]=u.useState([]),[g,x]=u.useState({}),[h,b]=u.useState(""),w=u.useCallback(v=>()=>{const C=s.find(z=>z.label===v),j=!(C!=null&&C.filterOptions.some(z=>z.type==="dateRange"||z.type==="select"));a==null||a(j??!0),b(v),p((C==null?void 0:C.filterOptions)??[])},[s,a]),$=u.useCallback(v=>{const C=[...v.checkbox,...Object.values(v.text??{}),...v.radio?[v.radio]:[],...v.minValue?[String(v.minValue)]:[],...v.maxValue?[String(v.maxValue)]:[]];x(S=>C.length>0?{...S,[h]:C}:S);const j=S=>{var A,E;return{...S,options:(A=S.options)==null?void 0:A.map(L=>({...L,checked:v.checkbox.includes(L.value)||v.radio===L.value})),value:["text","select"].includes(S.type)?((E=v.text)==null?void 0:E[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`])??S.value:S.value,minValue:["numberRange","dateRange"].includes(S.type)?v.minValue:S.minValue,maxValue:["numberRange","dateRange"].includes(S.type)?v.maxValue:S.maxValue}},z=S=>S.label===h?{...S,filterOptions:S.filterOptions.map(j)}:S,I=s.map(z);c(S=>S.map(z));const T=I.flatMap(({filterOptions:S})=>S);o(T),p([])},[s,o,h]),k=u.useCallback((v,C)=>{const j=`li-filter-option-${v}`;return n.jsxs(vr,{icon:C,onClick:w(v),style:{minWidth:"180px",writingMode:"horizontal-tb"},value:j,width:"100%",children:[v,g[v]===void 0?void 0:n.jsx(Y,{tagLabel:g[v].length.toString()})]},j)},[g,w]);return u.useEffect(()=>{const v=e.reduce((C,{label:j,filterOptions:z})=>{const I=z.flatMap(({value:A,minValue:E,maxValue:L})=>[E,L,A]).filter(Boolean),T=z.flatMap(({options:A})=>A??[]).filter(({checked:A=!1})=>A).map(({value:A})=>A),S=[...I,...T];return S.length===0?C:{...C,[j]:S}},{});x(v),d.length>0&&r&&r("column")},[d,e,r]),t==="grouped"?n.jsx(m,{display:"flex",flexDirection:"row",maxHeight:d.length>0?"unset":"360px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:d.length>0?n.jsx(Xe,{id:"filters-options",onSearch:i,onSubmit:$,options:d,selectedFilter:h}):Object.entries(hn(e)).map(([v,C])=>n.jsxs(m,{style:{writingMode:"horizontal-tb"},children:[n.jsx(R,{color:l.palette.gray[400],mb:.25,size:"sm",children:v}),C.map(({label:j,icon:z="filter-list"})=>k(j,z))]},v))}):n.jsx(m,{display:"flex",flexDirection:"row",maxHeight:d.length>0?"unset":"200px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:d.length>0?n.jsx(Xe,{id:"filters-options",onSearch:i,onSubmit:$,options:d,selectedFilter:h}):e.map(({label:v,icon:C="filter-list"})=>k(v,C))})},vn=({options:e,onApplyFilters:t,onSearch:o,modalRef:i,variant:r})=>{const[a,l]=u.useState("row"),[s,c]=u.useState(!0),d=f.useTheme(),p=u.useRef(null),g=n.jsx(W,{icon:"close",iconColor:d.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return u.useEffect(()=>{const x=h=>{const b=p.current;b&&!b.contains(h.target)&&i.close()};if(s)return document.addEventListener("mousedown",x,!0),()=>{document.removeEventListener("mousedown",x,!0)}},[p,s,i]),n.jsx(jr,{$bgColor:"transparent","aria-label":i.name,children:n.jsxs(dt,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",justify:"space-between",position:"relative",px:1.25,py:1.25,ref:p,style:{maxWidth:"620px",overflow:"hidden",width:"fit-content"},children:[a==="column"?g:void 0,n.jsx(wn,{onApplyFilters:t,onSearch:o,options:e,setDirection:l,setHandler:c,variant:r}),a==="row"?g:void 0]})})};function zr(e){if(e)return e}function jn(e){if(!e||e.length===0)return;const t=e.filter(i=>i.checked).map(i=>i.label??i.value);return t.length===0?void 0:t.join(", ")}function Tr(e,t,o){const i=o??"",r=y._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),a=y._.isEmpty(t)&&typeof t!="number"||Number.isNaN(t)?void 0:Number(String(t));if(!y._.isUndefined(r)&&!y._.isUndefined(a))return`${r}${i} - ${a}${i}`;if(!y._.isUndefined(r))return`Min ${r}${i}`;if(!y._.isUndefined(a))return`Max ${a}${i}`}function Ir(e,t){if(y.dayjs_minExports.extend(y.localizedFormat),!(y._.isUndefined(e)&&y._.isUndefined(t))){if(e!==""&&t!==""&&!y._.isUndefined(e)&&!y._.isUndefined(t))return`${y.dayjs(e).format("LL")} - ${y.dayjs(t).format("LL")}`;if(e!==""&&!y._.isUndefined(e))return`From ${y.dayjs(e).format("LL")}`;if(t!==""&&!y._.isUndefined(t))return`To ${y.dayjs(t).format("LL")}`}}function Er(e,t,o){return e==="select"?t:`${t} ${o==="includesInsensitive"?"contains":"is"}`}const ue=({filter:e,icon:t="filter-list",label:o,onClose:i,filterValue:r})=>y._.isNil(r)||y._.isEmpty(String(r))?null:n.jsx(Y,{filterValues:r,icon:t,id:"remove-filter",onClose:i(e),tagLabel:`${o} `}),Rr=({options:e,onClose:t})=>{const o=e.flatMap(i=>i.filterOptions.map(r=>{const{filterFn:a,label:l,type:s,value:c,options:d,minValue:p,maxValue:g}=r;switch(s){case"numberRange":{const x=Tr(p,g,i.placeholder);return n.jsx(ue,{filter:r,filterValue:x,icon:i.icon,label:i.label,onClose:t},l)}case"dateRange":{const x=Ir(p==null?void 0:p.toString(),g==null?void 0:g.toString());return n.jsx(ue,{filter:r,filterValue:x,icon:i.icon,label:i.label,onClose:t},l)}case"radioButton":case"checkboxes":{const x=jn(d);return n.jsx(ue,{filter:r,filterValue:x,icon:i.icon,label:i.label,onClose:t},l)}case void 0:case"select":case"text":default:{const x=zr(c),h=Er(s,i.label,a);return n.jsx(ue,{filter:r,filterValue:x,icon:i.icon,label:h,onClose:t},l)}}})).filter(i=>{if(i===null)return!1;const{filterValue:r}=i.props;return!y._.isNil(r)&&!y._.isEmpty(String(r))});return o.length>0?n.jsx(m,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:o}):null},Dr=e=>e.map(t=>{const o={key:String(t.key),type:t.type},i=(()=>{let r={...o};if(t.filterFn&&(r={...r,filterFn:t.filterFn}),t.value&&(r={...r,value:t.value}),t.minValue!==void 0&&t.minValue!==null&&(r={...r,minValue:t.minValue}),t.maxValue!==void 0&&t.maxValue!==null&&(r={...r,maxValue:t.maxValue}),t.options&&t.options.length>0){const a=t.options.filter(l=>l.checked).map(l=>l.value);a.length>0&&(r={...r,selectedValues:a})}return r})();return Object.keys(i).length>2?i:null}).filter(Boolean),Nr=(e,t)=>t.map(o=>{const i=e.find(a=>a.key===String(o.key)&&a.type===o.type);return i?(()=>{let a={...o};return i.filterFn&&(a={...a,filterFn:i.filterFn}),i.value!==void 0&&i.value!==null&&(a={...a,value:i.value}),i.minValue!==void 0&&i.minValue!==null&&(a={...a,minValue:i.minValue}),i.maxValue!==void 0&&i.maxValue!==null&&(a={...a,maxValue:i.maxValue}),i.selectedValues&&o.options&&(a={...a,options:o.options.map(l=>{var s;return{...l,checked:((s=i.selectedValues)==null?void 0:s.includes(l.value))??!1}})}),a})():o}),Ve=(e,t)=>{const o=Dr(e);t(JSON.stringify(o))},Fr=(e,t)=>{const o=e();if(!o)return t;try{const i=JSON.parse(o);return Nr(i,t)}catch{return t}},Ar=(e,t)=>{function o(l,s){if(s.value===""||s.value===void 0||y._.defaultTo(s.isBackFilter,!1))return!0;switch(s.filterFn){case"includesInsensitive":return String(l[s.key]).toLowerCase().includes(s.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[s.key]).toLowerCase()===s.value.toLowerCase()}}function i(l,s){if(!s.options||s.options.length===0)return!0;const c=s.options.filter(d=>d.checked).map(d=>d.value);return c.length===0?!0:c.includes(String(l[s.key]))}function r(l,s,c){const d=c(String(l[s.key])),{minValue:p,maxValue:g}=s,x=y._.isEmpty(p)&&typeof p!="number"?void 0:c(String(p)),h=y._.isEmpty(g)&&typeof g!="number"?void 0:c(String(g));return y._.isUndefined(x)&&y._.isUndefined(h)?!0:(x??-1/0)<=d&&d<=(h??1/0)}function a(l){return t.every(s=>{if(typeof s.key=="function")return s.key(l,s.value);switch(s.type){case"radioButton":case"checkboxes":return i(l,s);case"numberRange":return r(l,s,Number);case"dateRange":return r(l,s,c=>new Date(c));case"select":case"text":default:return o(l,s)}})}return e.filter(a)},Lr=e=>[...e.flatMap(({options:o})=>o).filter(o=>o==null?void 0:o.checked),...e.flatMap(o=>[o.value,o.maxValue,o.minValue]).filter(Boolean)].length,Pr=e=>{var o;const t=((o=e.options)==null?void 0:o.map(i=>({...i,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:t}},Or=({dataset:e,setValues:t,getValues:o,options:i,setFilteredDataset:r,onFiltersChange:a,onReset:l,onSearch:s,variant:c="ungrouped"})=>{const d=Te("filters-modal"),[p,g]=u.useState(!1),[x,h]=u.useState([]),b=Lr(x),w=i.map(j=>({...j,filterOptions:j.filterOptions.map(z=>x.find(T=>T.key===z.key&&T.type===z.type&&T.filterFn===z.filterFn)??{...z})})),$=u.useCallback(j=>{h([...j]),Ve(j,t)},[h,t]),k=u.useCallback(()=>{l&&l(),d.isOpen||g(!0),d.toggle()},[d,l]),v=u.useCallback(j=>()=>{l&&l();const z=x.map(I=>I.key===j.key&&I.type===j.type&&I.filterFn===j.filterFn?Pr(I):I);h(z),Ve(z,t)},[x,l,t]);return u.useEffect(()=>{const j=i.flatMap(T=>T.filterOptions),z=o();if((()=>{if(!z)return!1;try{const T=JSON.parse(z);return Array.isArray(T)&&T.length>0}catch{return!1}})()){const T=Fr(o,j);h(T)}else j.flatMap(S=>S.value).filter(Boolean).length>0||j.flatMap(S=>S.options).filter(S=>(S==null?void 0:S.checked)===!0).length>0?(h(j),p&&Ve(j,t)):h(j)},[i,h,t,o,p]),u.useEffect(()=>{r&&e!==void 0&&r(Ar(e,x)),a==null||a(x)},[e,x,r,a]),{Filters:()=>n.jsxs(m,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[n.jsx(m,{pr:.25,children:n.jsx(O,{icon:"filter",id:"filter-btn",onClick:k,tag:b.toString(),variant:"ghost"})}),d.isOpen&&n.jsx(vn,{modalRef:d,onApplyFilters:$,onSearch:s,options:w,variant:c})]}),options:w,removeFilter:v}},gt=({_portal:e=!0,alert:t,cancelButton:o=void 0,children:i=void 0,confirmButton:r=void 0,content:a=void 0,description:l=void 0,modalRef:s,otherActions:c=void 0,onClose:d=void 0,tabItems:p=void 0,title:g=void 0,size:x,id:h="modal-container"})=>{const b=f.useTheme(),[w,$]=u.useState(void 0),k=u.useRef(null),v=u.useRef(!1),C=Array.isArray(p)&&p.length>0,j=o??r;u.useEffect(()=>{if(C&&!v.current&&k.current){const I=k.current.getBoundingClientRect().height;I>50&&($(I),v.current=!0)}s.isOpen||($(void 0),v.current=!1)},[C,s.isOpen]);const z=n.jsx(an,{"aria-label":s.name,"aria-modal":"true",id:"modal-wrapper",children:n.jsxs(dt,{$size:x,"data-testid":h,flexDirection:"column",id:h,ref:C?k:void 0,style:C&&w?{height:w}:void 0,children:[!y._.isEmpty(g)&&!y._.isNil(g)&&n.jsx(ln,{description:l,modalRef:s,onClose:d,otherActions:c,title:g}),p&&n.jsx(m,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:n.jsx(pt,{items:p})}),(y._.isObject(a)||i)&&n.jsxs(sr,{style:j?{borderBottom:`1px solid ${b.palette.gray[200]}`}:void 0,children:[i,y._.isObject(a)&&y._.isString(a.imageSrc)&&n.jsx(pr,{$framed:a.imageFramed,children:n.jsx(ne,{alt:"modal-img",publicId:a.imageSrc})}),y._.isObject(a)&&y._.isString(a.imageText)&&n.jsx(R,{size:"sm",children:a.imageText})]}),n.jsx(sn,{alert:t,cancelButton:o,confirmButton:r,modalRef:s})]})});return e&&s.isOpen?le.createPortal(z,document.getElementById("portals")??document.body):s.isOpen?z:null},Mr=(e,t,o)=>{const i=Te("confirm-dialog-modal"),r=u.useRef(null),a=u.useCallback(async()=>(i.open(),new Promise(d=>{r.current=d})),[i]),l=u.useCallback(()=>{var d;i.close(),(d=r.current)==null||d.call(r,!0)},[i]),s=u.useCallback(()=>{var d;i.close(),(d=r.current)==null||d.call(r,!1)},[i]);return[a,({children:d})=>{const[p,g]=u.useState(o),x=u.useCallback(()=>{g({...o})},[]),h=u.useCallback($=>()=>{g(k=>({...k,[$]:{...k[$],state:!k[$].state}}))},[]),b=!Object.values(p).every(({state:$})=>$),w=Object.entries(p).map(([$,{state:k,label:v}])=>n.jsx(re,{defaultChecked:k,label:v,name:$,onChange:h($)},$));return n.jsxs(gt,{"data-testid":e,id:e,modalRef:{...i,close:s},onClose:x,size:"sm",title:t,children:[d,n.jsx(m,{display:"flex",flexDirection:"column",gap:.5,children:w}),n.jsx(cn,{disabled:b,id:e,onConfirm:l})]})}]},Wr=()=>{const[e,t]=u.useState(!1),[o,i]=u.useState(),r=u.useRef(null),a=Te("confirm-dialog-modal"),l=u.useCallback(async p=>(i(p),t(!0),new Promise(g=>{r.current=g})),[]),s=u.useCallback(()=>{var p;t(!1),i(void 0),(p=r.current)==null||p.call(r,!0)},[]),c=u.useCallback(()=>{var p;t(!1),i(void 0),(p=r.current)==null||p.call(r,!1)},[]);return u.useEffect(()=>{a.setIsOpen(e)},[e,a]),{ConfirmDialog:({id:p="confirm-dialog-modal",children:g})=>n.jsxs(gt,{cancelButton:{onClick:c,text:"Cancel"},confirmButton:{id:(o==null?void 0:o.id)??"modal-confirm",onClick:s,text:"Confirm"},description:o==null?void 0:o.message,id:p,modalRef:{...a,close:c},size:"sm",title:o==null?void 0:o.title,children:[o==null?void 0:o.content,g]}),confirm:l}},Hr=2e3,Br=({content:e})=>{const[t,o]=u.useState("Copy"),i=u.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{o("Copied"),setTimeout(()=>{o("Copy")},Hr)}).catch(()=>{o("Failed to copy")})},[e]);return n.jsx(W,{icon:"copy",iconSize:"lg",iconType:"fa-light",onClick:i,tooltip:t,variant:"ghost"})},_r=f.styled.ul`
|
|
2164
|
+
`,bn=({control:e,option:n,register:o,setValue:i})=>{var r,a,l,s,c;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(p=>t.jsx(Ct,{value:p.value,width:"content",children:t.jsx(re,{...o("checkbox"),label:p.label,value:p.value})},`li-checkbox-${p.value}`))});case"radioButton":return t.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[n.label,(a=n.options)==null?void 0:a.map(p=>t.jsx(Ct,{value:p.value,width:"content",children:t.jsx(ct,{...o("radio"),label:p.label,value:p.value})},`li-radio-${p.value}`))]});case"select":return t.jsx(at,{control:e,items:((l=n.options)==null?void 0:l.map(p=>({name:p.label??"",value:p.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const d=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Oe,{label:n.label,name:d,placeholder:n.placeholder,register:o,value:n.value});case"numberRange":return t.jsx(Jt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:o,name:"maxValue",value:n.maxValue,setValue:i},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:o,name:"minValue",value:n.minValue,setValue:i},variant:"filters"});case"dateRange":return t.jsx(Yt,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(s=n.maxValue)==null?void 0:s.toString()},propsMin:{name:"minValue",value:(c=n.minValue)==null?void 0:c.toString()},register:o,setValue:i,variant:"filters"});default:return t.jsx("div",{})}},$n=({control:e,items:n,register:o,setValue:i})=>t.jsx(t.Fragment,{children:n.map((r,a)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(bn,{control:e,option:r,register:o,setValue:i}),a<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),mn=e=>{var s,c,d,p,g;const[n,o]=u.useState([...e]),{control:i,register:r,handleSubmit:a,setValue:l}=f.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:((d=(c=(s=e.find(x=>x.type==="radioButton"))==null?void 0:s.options)==null?void 0:c.find(({checked:x})=>x))==null?void 0:d.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(p=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:p.minValue,maxValue:(g=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:g.maxValue}});return{control:i,items:n,setItems:o,register:r,handleSubmit:a,setValue:l}},zr=(e,n)=>{var o,i,r,a,l;n("checkbox",e.filter(s=>s.type==="checkboxes").flatMap(s=>{var c;return((c=s.options)==null?void 0:c.filter(d=>d.checked).map(d=>d.value))??[]})),n("radio",((r=(i=(o=e.find(s=>s.type==="radioButton"))==null?void 0:o.options)==null?void 0:i.find(({checked:s})=>s))==null?void 0:r.value)??""),n("text",e.filter(s=>["text","select"].includes(s.type)).reduce((s,c)=>({...s,[`${String(c.key)}-${c.filterFn??"caseInsensitive"}`]:c.value??""}),{})),n("minValue",(a=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:a.minValue),n("maxValue",(l=e.find(s=>["numberRange","dateRange"].includes(s.type)))==null?void 0:l.maxValue)},Tr=(e,n)=>(e==null?void 0:e.filter(o=>{var i;return((i=o.label)==null?void 0:i.toLowerCase().includes((n==null?void 0:n.toLowerCase())??""))??o.value.toLowerCase().includes((n==null?void 0:n.toLowerCase())??"")}))??[],Ir=async(e,n)=>await Promise.all(e.map(async o=>{if(o.type==="checkboxes"){const r=(o.filterOptions?await o.filterOptions(o.options??[],n):Tr(o.options??[],n)).filter((a,l,s)=>s.findIndex(c=>c.value===a.value)===l);return{...o,options:r}}return o})),Xe=({options:e,onSearch:n,onSubmit:o,id:i,selectedFilter:r})=>{const{control:a,items:l,setItems:s,register:c,handleSubmit:d,setValue:p}=mn(e),g=e.some(b=>b.type==="checkboxes"&&b.hideSearch!==!0),x=u.useCallback(async b=>{const{value:w}=b.target;n&&n(w);const $=await Ir(e,w);s($)},[e,n,s]),h=u.useCallback(b=>{o&&o(b)},[o]);return u.useEffect(()=>{s(e),zr(e,p)},[e,s,p]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,style:{writingMode:"horizontal-tb",maxWidth:"300px",width:"100%"},children:[g&&t.jsxs("div",{children:[r,t.jsx(se,{onChange:x})]}),t.jsxs("form",{id:i,onSubmit:d(h),children:[t.jsx($n,{control:a,items:l,register:c,setValue:p}),t.jsx(O,{mt:1,type:"submit",children:"Apply"})]})]})},wn=({options:e,variant:n,onApplyFilters:o,onSearch:i,setDirection:r,setHandler:a})=>{const l=y.useTheme(),[s,c]=u.useState(e),[d,p]=u.useState([]),[g,x]=u.useState({}),[h,b]=u.useState(""),w=u.useCallback(v=>()=>{const C=s.find(z=>z.label===v),k=!(C!=null&&C.filterOptions.some(z=>z.type==="dateRange"||z.type==="select"));a==null||a(k??!0),b(v),p((C==null?void 0:C.filterOptions)??[])},[s,a]),$=u.useCallback(v=>{const C=[...v.checkbox,...Object.values(v.text??{}),...v.radio?[v.radio]:[],...v.minValue?[String(v.minValue)]:[],...v.maxValue?[String(v.maxValue)]:[]];x(S=>C.length>0?{...S,[h]:C}:S);const k=S=>{var L,E;return{...S,options:(L=S.options)==null?void 0:L.map(A=>({...A,checked:v.checkbox.includes(A.value)||v.radio===A.value})),value:["text","select"].includes(S.type)?((E=v.text)==null?void 0:E[`${String(S.key)}-${S.filterFn??"caseInsensitive"}`])??S.value:S.value,minValue:["numberRange","dateRange"].includes(S.type)?v.minValue:S.minValue,maxValue:["numberRange","dateRange"].includes(S.type)?v.maxValue:S.maxValue}},z=S=>S.label===h?{...S,filterOptions:S.filterOptions.map(k)}:S,I=s.map(z);c(S=>S.map(z));const T=I.flatMap(({filterOptions:S})=>S);o(T),p([])},[s,o,h]),j=u.useCallback((v,C)=>{const k=`li-filter-option-${v}`;return t.jsxs(Cr,{icon:C,onClick:w(v),style:{minWidth:"180px",writingMode:"horizontal-tb"},value:k,width:"100%",children:[v,g[v]===void 0?void 0:t.jsx(Y,{tagLabel:g[v].length.toString()})]},k)},[g,w]);return u.useEffect(()=>{const v=e.reduce((C,{label:k,filterOptions:z})=>{const I=z.flatMap(({value:L,minValue:E,maxValue:A})=>[E,A,L]).filter(Boolean),T=z.flatMap(({options:L})=>L??[]).filter(({checked:L=!1})=>L).map(({value:L})=>L),S=[...I,...T];return S.length===0?C:{...C,[k]:S}},{});x(v),d.length>0&&r&&r("column")},[d,e,r]),n==="grouped"?t.jsx(m,{display:"flex",flexDirection:"row",maxHeight:d.length>0?"unset":"360px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:d.length>0?t.jsx(Xe,{id:"filters-options",onSearch:i,onSubmit:$,options:d,selectedFilter:h}):Object.entries(hn(e)).map(([v,C])=>t.jsxs(m,{style:{writingMode:"horizontal-tb"},children:[t.jsx(N,{color:l.palette.gray[400],mb:.25,size:"sm",children:v}),C.map(({label:k,icon:z="filter-list"})=>j(k,z))]},v))}):t.jsx(m,{display:"flex",flexDirection:"row",maxHeight:d.length>0?"unset":"200px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:d.length>0?t.jsx(Xe,{id:"filters-options",onSearch:i,onSubmit:$,options:d,selectedFilter:h}):e.map(({label:v,icon:C="filter-list"})=>j(v,C))})},vn=({options:e,onApplyFilters:n,onSearch:o,modalRef:i,variant:r})=>{const[a,l]=u.useState("row"),[s,c]=u.useState(!0),d=y.useTheme(),p=u.useRef(null),g=t.jsx(W,{icon:"close",iconColor:d.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return u.useEffect(()=>{const x=h=>{const b=p.current;b&&!b.contains(h.target)&&i.close()};if(s)return document.addEventListener("mousedown",x,!0),()=>{document.removeEventListener("mousedown",x,!0)}},[p,s,i]),t.jsx(Sr,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(dt,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",justify:"space-between",position:"relative",px:1.25,py:1.25,ref:p,style:{maxWidth:"620px",overflow:"hidden",width:"fit-content"},children:[a==="column"?g:void 0,t.jsx(wn,{onApplyFilters:n,onSearch:o,options:e,setDirection:l,setHandler:c,variant:r}),a==="row"?g:void 0]})})};function Er(e){if(e)return e}function jn(e){if(!e||e.length===0)return;const n=e.filter(i=>i.checked).map(i=>i.label??i.value);return n.length===0?void 0:n.join(", ")}function Nr(e,n,o){const i=o??"",r=f._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),a=f._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!f._.isUndefined(r)&&!f._.isUndefined(a))return`${r}${i} - ${a}${i}`;if(!f._.isUndefined(r))return`Min ${r}${i}`;if(!f._.isUndefined(a))return`Max ${a}${i}`}function Dr(e,n){if(f.dayjs_minExports.extend(f.localizedFormat),!(f._.isUndefined(e)&&f._.isUndefined(n))){if(e!==""&&n!==""&&!f._.isUndefined(e)&&!f._.isUndefined(n))return`${f.dayjs(e).format("LL")} - ${f.dayjs(n).format("LL")}`;if(e!==""&&!f._.isUndefined(e))return`From ${f.dayjs(e).format("LL")}`;if(n!==""&&!f._.isUndefined(n))return`To ${f.dayjs(n).format("LL")}`}}function Rr(e,n,o){return e==="select"?n:`${n} ${o==="includesInsensitive"?"contains":"is"}`}const ue=({filter:e,icon:n="filter-list",label:o,onClose:i,filterValue:r})=>f._.isNil(r)||f._.isEmpty(String(r))?null:t.jsx(Y,{filterValues:r,icon:n,id:"remove-filter",onClose:i(e),tagLabel:`${o} `}),Fr=({options:e,onClose:n})=>{const o=e.flatMap(i=>i.filterOptions.map(r=>{const{filterFn:a,label:l,type:s,value:c,options:d,minValue:p,maxValue:g}=r;switch(s){case"numberRange":{const x=Nr(p,g,i.placeholder);return t.jsx(ue,{filter:r,filterValue:x,icon:i.icon,label:i.label,onClose:n},l)}case"dateRange":{const x=Dr(p==null?void 0:p.toString(),g==null?void 0:g.toString());return t.jsx(ue,{filter:r,filterValue:x,icon:i.icon,label:i.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=jn(d);return t.jsx(ue,{filter:r,filterValue:x,icon:i.icon,label:i.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Er(c),h=Rr(s,i.label,a);return t.jsx(ue,{filter:r,filterValue:x,icon:i.icon,label:h,onClose:n},l)}}})).filter(i=>{if(i===null)return!1;const{filterValue:r}=i.props;return!f._.isNil(r)&&!f._.isEmpty(String(r))});return o.length>0?t.jsx(m,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:o}):null},Lr=e=>e.map(n=>{const o={key:String(n.key),type:n.type},i=(()=>{let r={...o};if(n.filterFn&&(r={...r,filterFn:n.filterFn}),n.value&&(r={...r,value:n.value}),n.minValue!==void 0&&n.minValue!==null&&(r={...r,minValue:n.minValue}),n.maxValue!==void 0&&n.maxValue!==null&&(r={...r,maxValue:n.maxValue}),n.options&&n.options.length>0){const a=n.options.filter(l=>l.checked).map(l=>l.value);a.length>0&&(r={...r,selectedValues:a})}return r})();return Object.keys(i).length>2?i:null}).filter(Boolean),Ar=(e,n)=>n.map(o=>{const i=e.find(a=>a.key===String(o.key)&&a.type===o.type);return i?(()=>{let a={...o};return i.filterFn&&(a={...a,filterFn:i.filterFn}),i.value!==void 0&&i.value!==null&&(a={...a,value:i.value}),i.minValue!==void 0&&i.minValue!==null&&(a={...a,minValue:i.minValue}),i.maxValue!==void 0&&i.maxValue!==null&&(a={...a,maxValue:i.maxValue}),i.selectedValues&&o.options&&(a={...a,options:o.options.map(l=>{var s;return{...l,checked:((s=i.selectedValues)==null?void 0:s.includes(l.value))??!1}})}),a})():o}),Ve=(e,n)=>{const o=Lr(e);n(JSON.stringify(o))},Pr=(e,n)=>{const o=e();if(!o)return n;try{const i=JSON.parse(o);return Ar(i,n)}catch{return n}},Or=(e,n)=>{function o(l,s){if(s.value===""||s.value===void 0||f._.defaultTo(s.isBackFilter,!1))return!0;switch(s.filterFn){case"includesInsensitive":return String(l[s.key]).toLowerCase().includes(s.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[s.key]).toLowerCase()===s.value.toLowerCase()}}function i(l,s){if(!s.options||s.options.length===0)return!0;const c=s.options.filter(d=>d.checked).map(d=>d.value);return c.length===0?!0:c.includes(String(l[s.key]))}function r(l,s,c){const d=c(String(l[s.key])),{minValue:p,maxValue:g}=s,x=f._.isEmpty(p)&&typeof p!="number"?void 0:c(String(p)),h=f._.isEmpty(g)&&typeof g!="number"?void 0:c(String(g));return f._.isUndefined(x)&&f._.isUndefined(h)?!0:(x??-1/0)<=d&&d<=(h??1/0)}function a(l){return n.every(s=>{if(typeof s.key=="function")return s.key(l,s.value);switch(s.type){case"radioButton":case"checkboxes":return i(l,s);case"numberRange":return r(l,s,Number);case"dateRange":return r(l,s,c=>new Date(c));case"select":case"text":default:return o(l,s)}})}return e.filter(a)},Mr=e=>[...e.flatMap(({options:o})=>o).filter(o=>o==null?void 0:o.checked),...e.flatMap(o=>[o.value,o.maxValue,o.minValue]).filter(Boolean)].length,Wr=e=>{var o;const n=((o=e.options)==null?void 0:o.map(i=>({...i,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Br=({dataset:e,setValues:n,getValues:o,options:i,setFilteredDataset:r,onFiltersChange:a,onReset:l,onSearch:s,variant:c="ungrouped"})=>{const d=Te("filters-modal"),[p,g]=u.useState(!1),[x,h]=u.useState([]),b=Mr(x),w=i.map(k=>({...k,filterOptions:k.filterOptions.map(z=>x.find(T=>T.key===z.key&&T.type===z.type&&T.filterFn===z.filterFn)??{...z})})),$=u.useCallback(k=>{h([...k]),Ve(k,n)},[h,n]),j=u.useCallback(()=>{l&&l(),d.isOpen||g(!0),d.toggle()},[d,l]),v=u.useCallback(k=>()=>{l&&l();const z=x.map(I=>I.key===k.key&&I.type===k.type&&I.filterFn===k.filterFn?Wr(I):I);h(z),Ve(z,n)},[x,l,n]);return u.useEffect(()=>{const k=i.flatMap(T=>T.filterOptions),z=o();if((()=>{if(!z)return!1;try{const T=JSON.parse(z);return Array.isArray(T)&&T.length>0}catch{return!1}})()){const T=Pr(o,k);h(T)}else k.flatMap(S=>S.value).filter(Boolean).length>0||k.flatMap(S=>S.options).filter(S=>(S==null?void 0:S.checked)===!0).length>0?(h(k),p&&Ve(k,n)):h(k)},[i,h,n,o,p]),u.useEffect(()=>{r&&e!==void 0&&r(Or(e,x)),a==null||a(x)},[e,x,r,a]),{Filters:()=>t.jsxs(m,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx(m,{pr:.25,children:t.jsx(O,{icon:"filter",id:"filter-btn",onClick:j,tag:b.toString(),variant:"ghost"})}),d.isOpen&&t.jsx(vn,{modalRef:d,onApplyFilters:$,onSearch:s,options:w,variant:c})]}),options:w,removeFilter:v}},gt=({_portal:e=!0,alert:n,cancelButton:o=void 0,children:i=void 0,confirmButton:r=void 0,content:a=void 0,description:l=void 0,modalRef:s,otherActions:c=void 0,onClose:d=void 0,tabItems:p=void 0,title:g=void 0,size:x,id:h="modal-container"})=>{const b=y.useTheme(),[w,$]=u.useState(void 0),j=u.useRef(null),v=u.useRef(!1),C=Array.isArray(p)&&p.length>0,k=o??r;u.useEffect(()=>{if(C&&!v.current&&j.current){const I=j.current.getBoundingClientRect().height;I>50&&($(I),v.current=!0)}s.isOpen||($(void 0),v.current=!1)},[C,s.isOpen]);const z=t.jsx(an,{"aria-label":s.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(dt,{$size:x,"data-testid":h,flexDirection:"column",id:h,ref:C?j:void 0,style:C&&w?{height:w}:void 0,children:[!f._.isEmpty(g)&&!f._.isNil(g)&&t.jsx(ln,{description:l,modalRef:s,onClose:d,otherActions:c,title:g}),p&&t.jsx(m,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(pt,{items:p})}),(f._.isObject(a)||i)&&t.jsxs(dr,{style:k?{borderBottom:`1px solid ${b.palette.gray[200]}`}:void 0,children:[i,f._.isObject(a)&&f._.isString(a.imageSrc)&&t.jsx(xr,{$framed:a.imageFramed,children:t.jsx(ne,{alt:"modal-img",publicId:a.imageSrc})}),f._.isObject(a)&&f._.isString(a.imageText)&&t.jsx(N,{size:"sm",children:a.imageText})]}),t.jsx(sn,{alert:n,cancelButton:o,confirmButton:r,modalRef:s})]})});return e&&s.isOpen?le.createPortal(z,document.getElementById("portals")??document.body):s.isOpen?z:null},Hr=(e,n,o)=>{const i=Te("confirm-dialog-modal"),r=u.useRef(null),a=u.useCallback(async()=>(i.open(),new Promise(d=>{r.current=d})),[i]),l=u.useCallback(()=>{var d;i.close(),(d=r.current)==null||d.call(r,!0)},[i]),s=u.useCallback(()=>{var d;i.close(),(d=r.current)==null||d.call(r,!1)},[i]);return[a,({children:d})=>{const[p,g]=u.useState(o),x=u.useCallback(()=>{g({...o})},[]),h=u.useCallback($=>()=>{g(j=>({...j,[$]:{...j[$],state:!j[$].state}}))},[]),b=!Object.values(p).every(({state:$})=>$),w=Object.entries(p).map(([$,{state:j,label:v}])=>t.jsx(re,{defaultChecked:j,label:v,name:$,onChange:h($)},$));return t.jsxs(gt,{"data-testid":e,id:e,modalRef:{...i,close:s},onClose:x,size:"sm",title:n,children:[d,t.jsx(m,{display:"flex",flexDirection:"column",gap:.5,children:w}),t.jsx(cn,{disabled:b,id:e,onConfirm:l})]})}]},_r=()=>{const[e,n]=u.useState(!1),[o,i]=u.useState(),r=u.useRef(null),a=Te("confirm-dialog-modal"),l=u.useCallback(async p=>(i(p),n(!0),new Promise(g=>{r.current=g})),[]),s=u.useCallback(()=>{var p;n(!1),i(void 0),(p=r.current)==null||p.call(r,!0)},[]),c=u.useCallback(()=>{var p;n(!1),i(void 0),(p=r.current)==null||p.call(r,!1)},[]);return u.useEffect(()=>{a.setIsOpen(e)},[e,a]),{ConfirmDialog:({id:p="confirm-dialog-modal",children:g})=>t.jsxs(gt,{cancelButton:{onClick:c,text:"Cancel"},confirmButton:{id:(o==null?void 0:o.id)??"modal-confirm",onClick:s,text:"Confirm"},description:o==null?void 0:o.message,id:p,modalRef:{...a,close:c},size:"sm",title:o==null?void 0:o.title,children:[o==null?void 0:o.content,g]}),confirm:l}},Vr=2e3,Ur=({content:e})=>{const[n,o]=u.useState("Copy"),i=u.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{o("Copied"),setTimeout(()=>{o("Copy")},Vr)}).catch(()=>{o("Failed to copy")})},[e]);return t.jsx(W,{icon:"copy",iconSize:"lg",iconType:"fa-light",onClick:i,tooltip:n,variant:"ghost"})},Gr=y.styled.ul`
|
|
2143
2165
|
${({theme:e})=>`
|
|
2144
2166
|
align-items: flex-start;
|
|
2145
2167
|
border-radius: ${e.spacing[.25]};
|
|
@@ -2152,7 +2174,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2152
2174
|
width: 166px;
|
|
2153
2175
|
z-index: 9999;
|
|
2154
2176
|
`}
|
|
2155
|
-
`,
|
|
2177
|
+
`,Yr=y.styled.li`
|
|
2156
2178
|
${({theme:e})=>`
|
|
2157
2179
|
align-items: center;
|
|
2158
2180
|
background: ${e.palette.white}
|
|
@@ -2178,15 +2200,15 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2178
2200
|
cursor: not-allowed;
|
|
2179
2201
|
}
|
|
2180
2202
|
`}
|
|
2181
|
-
`,
|
|
2203
|
+
`,Kr=({icon:e,iconColor:n,id:o,showChevron:i,options:r,title:a})=>{const l=y.useTheme(),[s,c]=u.useState(!1),d=s?"chevron-up":"chevron-down",{refs:p,floatingStyles:g}=f.useFloating({middleware:[f.offset({mainAxis:4})],placement:"bottom-start"}),x=u.useCallback(()=>{c(h=>!h)},[]);return ee(s?p.floating.current:null,()=>{c(!1)},!0,document.getElementById(`dropdown-toggle-${o}`)),t.jsxs(u.Fragment,{children:[t.jsx(O,{"aria-label":a,icon:e,iconColor:n,iconType:"fa-solid",id:`dropdown-toggle-${o}`,onClick:x,ref:p.setReference,rightIcon:i?d:void 0,variant:"ghost",children:a}),s?t.jsx(Gr,{ref:p.setFloating,style:g,children:r.map(h=>{const b=({})=>{h.onClick(),c(!1)};return t.jsxs(Yr,{"aria-disabled":h.disabled,"aria-label":h.label,onClick:h.disabled?void 0:b,children:[t.jsx(D,{icon:h.icon,iconColor:h.iconColor??l.palette.gray[300],iconSize:"sm",iconType:"fa-light"}),h.label]},h.label)})}):void 0]})},Je=({buttonProps:e,variant:n})=>t.jsx(O,{onClick:e.onClick,variant:n,children:e.text}),Zr=y.styled.div`
|
|
2182
2204
|
display: flex;
|
|
2183
2205
|
flex-direction: column;
|
|
2184
2206
|
align-items: center;
|
|
2185
|
-
padding: ${({theme:e,$padding:
|
|
2207
|
+
padding: ${({theme:e,$padding:n})=>e.spacing[n]};
|
|
2186
2208
|
max-width: 900px;
|
|
2187
2209
|
white-space: pre-line;
|
|
2188
2210
|
margin: 0 auto;
|
|
2189
|
-
`,
|
|
2211
|
+
`,qr=y.styled.div`
|
|
2190
2212
|
display: flex;
|
|
2191
2213
|
flex-direction: row;
|
|
2192
2214
|
justify-content: center;
|
|
@@ -2199,7 +2221,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2199
2221
|
> img {
|
|
2200
2222
|
width: 100%;
|
|
2201
2223
|
}
|
|
2202
|
-
`,
|
|
2224
|
+
`,Xr=y.styled.div`
|
|
2203
2225
|
display: flex;
|
|
2204
2226
|
flex-direction: row;
|
|
2205
2227
|
margin: 0;
|
|
@@ -2212,7 +2234,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2212
2234
|
> *:last-child {
|
|
2213
2235
|
margin-right: 0;
|
|
2214
2236
|
}
|
|
2215
|
-
`,St={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},
|
|
2237
|
+
`,St={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},Jr=({cancelButton:e=void 0,confirmButton:n=void 0,description:o,imageSrc:i="integrates/empty/addRoot",padding:r=1.25,title:a,size:l="md"})=>{const s=(n??e)!==void 0;return t.jsxs(Zr,{$padding:r,children:[t.jsx(qr,{children:t.jsx(ne,{alt:"empty-icon",publicId:i})}),t.jsx(J,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:St[l].title,textAlign:"center",children:a}),t.jsx(N,{mb:s?2:void 0,size:St[l].description,textAlign:"center",children:o}),s?t.jsxs(Xr,{children:[e&&t.jsx(Je,{buttonProps:e,variant:"tertiary"}),n&&t.jsx(Je,{buttonProps:n,variant:"primary"})]}):void 0]})},Qr=({children:e})=>{const n=f.useFormContext();return e({...n})},ea=y.styled.form`
|
|
2216
2238
|
${({theme:e})=>`
|
|
2217
2239
|
align-items: flex-start;
|
|
2218
2240
|
align-self: stretch;
|
|
@@ -2222,12 +2244,12 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2222
2244
|
overflow: hidden auto;
|
|
2223
2245
|
width: 100%;
|
|
2224
2246
|
`}
|
|
2225
|
-
`,
|
|
2247
|
+
`,ta=({alert:e,buttonAlignment:n,cancelButton:o,children:i,confirmButton:r,defaultDisabled:a=!0,id:l="modal-confirm",maxButtonWidth:s="392px",mode:c,onSubmit:d,padding:p=!0,showButtons:g=!0,yupSchema:x,...h})=>{const b=y.useTheme(),w=f.useForm({...h,mode:c??"all",resolver:x?f.o(x):void 0});function $(k){k.stopPropagation(),w.handleSubmit(d)(k)}const v=g?`calc(100% - ${e?"139px":"83px"})`:"100%",C=p?1.5:0;return t.jsx(f.FormProvider,{...w,children:t.jsx(ea,{onSubmit:$,children:t.jsxs(m,{scroll:"y",width:"100%",children:[t.jsx(m,{borderRadius:`0 0 ${b.spacing[.25]} ${b.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:v,pb:C,pt:0,px:C,scroll:"y",children:i}),g&&t.jsxs(m,{borderRadius:`0 0 ${b.spacing[.25]} ${b.spacing[.25]}`,borderTop:`1px solid ${b.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(m,{display:"flex",gap:.75,maxWidth:s,children:[o?t.jsx(O,{icon:o.icon,id:`${l}-cancel`,justify:"center",onClick:o.onClick,type:"reset",variant:"tertiary",width:"100%",children:o.label??"Cancel"}):void 0,t.jsx(O,{disabled:((r==null?void 0:r.disabled)??!1)||w.formState.isSubmitting||a&&!w.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"})]})]})]})})})},na=y.styled(Se)`
|
|
2226
2248
|
display: grid;
|
|
2227
2249
|
gap: ${({$gap:e=1.25})=>`${e}rem`};
|
|
2228
2250
|
grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
|
|
2229
2251
|
|
|
2230
|
-
${({theme:e,$xl:
|
|
2252
|
+
${({theme:e,$xl:n,$lg:o,$md:i})=>`
|
|
2231
2253
|
@media (width >= ${e.breakpoints.sm}) {
|
|
2232
2254
|
grid-template-columns: repeat(${i}, 1fr);
|
|
2233
2255
|
}
|
|
@@ -2237,11 +2259,11 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2237
2259
|
}
|
|
2238
2260
|
|
|
2239
2261
|
@media (width >= ${e.breakpoints.lg}) {
|
|
2240
|
-
grid-template-columns: repeat(${
|
|
2262
|
+
grid-template-columns: repeat(${n}, 1fr);
|
|
2241
2263
|
}
|
|
2242
2264
|
`}
|
|
2243
|
-
`,
|
|
2244
|
-
${({theme:e,$itemsLength:
|
|
2265
|
+
`,oa=u.forwardRef(function({children:n,md:o,sm:i,lg:r,xl:a,gap:l,...s},c){return t.jsx(na,{$gap:l,$lg:r,$md:o,$sm:i,$xl:a,ref:c,...s,children:n})}),ia=y.styled.div`
|
|
2266
|
+
${({theme:e,$itemsLength:n})=>`
|
|
2245
2267
|
display: flex;
|
|
2246
2268
|
background-color: ${e.palette.white};
|
|
2247
2269
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -2249,7 +2271,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2249
2271
|
box-shadow: ${e.shadows.lg};
|
|
2250
2272
|
flex-direction: column;
|
|
2251
2273
|
min-width: 507px;
|
|
2252
|
-
max-width: ${
|
|
2274
|
+
max-width: ${n<=4?"507px":"980px"};
|
|
2253
2275
|
padding: ${e.spacing[1.5]};
|
|
2254
2276
|
|
|
2255
2277
|
@media screen and (max-width: 980px) and (min-width: 742px) {
|
|
@@ -2259,15 +2281,15 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2259
2281
|
width: 507px;
|
|
2260
2282
|
}
|
|
2261
2283
|
`}
|
|
2262
|
-
`,ut=
|
|
2263
|
-
${({theme:e,$isSelected:
|
|
2284
|
+
`,ut=y.styled.div`
|
|
2285
|
+
${({theme:e,$isSelected:n})=>`
|
|
2264
2286
|
align-items: center;
|
|
2265
|
-
background-color: ${
|
|
2287
|
+
background-color: ${n?e.palette.gray[100]:e.palette.white};
|
|
2266
2288
|
border: 1px solid ${e.palette.gray[200]};
|
|
2267
2289
|
border-radius: ${e.spacing[.25]};
|
|
2268
2290
|
cursor: pointer;
|
|
2269
2291
|
display: flex;
|
|
2270
|
-
flex-direction: ${
|
|
2292
|
+
flex-direction: ${n?"row-reverse":"row"};
|
|
2271
2293
|
min-height: 50px;
|
|
2272
2294
|
padding: ${e.spacing[1]} ${e.spacing[.625]};
|
|
2273
2295
|
width: 215px;
|
|
@@ -2276,23 +2298,23 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2276
2298
|
background-color: ${e.palette.gray[100]};
|
|
2277
2299
|
}
|
|
2278
2300
|
`}
|
|
2279
|
-
`,kn=({isSelected:e=!1,label:
|
|
2280
|
-
${({theme:e,$bgColor:
|
|
2281
|
-
background-color: ${
|
|
2301
|
+
`,kn=({isSelected:e=!1,label:n,onSelect:o})=>{const i=y.useTheme(),r=u.useCallback(()=>{o&&o(n)},[o,n]);return t.jsxs(ut,{$isSelected:e,onClick:r,children:[e?t.jsx(D,{icon:"check",iconColor:i.palette.gray[800],iconSize:"lg"}):null,t.jsx(N,{color:i.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ra=({isOpen:e=!0,items:n,handleNewOrganization:o,onSelect:i,onClose:r,selectedItem:a,title:l,variant:s})=>{const c=y.useTheme(),[d,p]=u.useState(n),[g,x]=u.useState(""),h=u.useCallback($=>{p(j=>j.filter(v=>String(v.name).toLowerCase().includes($.toLocaleLowerCase())))},[p]),b=u.useCallback($=>{$.currentTarget&&(x($.currentTarget.value),h($.currentTarget.value))},[x,h]);u.useEffect(()=>{p(n),h(g)},[n,h,g]);const w=t.jsx(m,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx(m,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(ia,{$itemsLength:d.length,children:[t.jsxs(m,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(N,{color:c.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(W,{icon:"xmark",iconColor:c.palette.gray[400],iconSize:"lg",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx(m,{mt:1,children:t.jsx(se,{onInput:b,placeholder:"Search"})}),t.jsx(ae,{mb:1,mt:1}),t.jsxs(m,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[s==="organization-selector"?t.jsx(ut,{onClick:o,children:t.jsxs(m,{alignItems:"center",display:"flex",children:[t.jsx(D,{icon:"square-plus",iconColor:c.palette.gray[400],iconSize:"lg",iconType:"fa-light",mr:.5}),t.jsx(N,{color:c.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,d.map($=>t.jsx(kn,{isSelected:a.toLowerCase()===$.name,label:$.name.charAt(0).toUpperCase()+$.name.slice(1),onSelect:i},$.name))]})]})})});return e?le.createPortal(w,document.body):t.jsx("div",{})},aa=({description:e,height:n="auto",leftIconName:o,children:i,rightIconName:r,title:a,tooltipId:l,tooltipTip:s,tooltipPlace:c="bottom",variant:d="centered",width:p="318px"})=>{const g=y.useTheme(),x=d==="centered",h=l&&t.jsx(V,{icon:r??o,iconColor:g.palette.gray[800],id:l,place:c,tip:s});return t.jsxs(m,{alignItems:x?"center":"flex-start",bgColor:g.palette.gray[50],border:`1px solid ${g.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:x?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:p,children:[t.jsxs(m,{alignItems:"center",display:"flex",gap:.5,children:[x||f.lodashExports.isUndefined(o)?void 0:h,t.jsx(N,{color:x?g.palette.gray[800]:g.palette.gray[400],size:"md",textAlign:x?"center":"start",children:e}),x||f.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs(m,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[x&&!f.lodashExports.isUndefined(o)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[f.lodashExports.isUndefined(a)?void 0:t.jsx(J,{fontWeight:"bold",size:"md",children:a}),i]}),x&&!f.lodashExports.isUndefined(r)?h:void 0]})]})},sa=({actions:e,children:n,header:o,title:i,tabs:r,footer:a})=>{const l=y.useTheme();return t.jsxs(m,{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(m,{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(m,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(N,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:i}),o]}),e&&t.jsx(m,{display:"flex",gap:.25,children:e.map(({icon:s,onClick:c},d)=>t.jsx(W,{icon:s??"paper-plane",iconColor:l.palette.gray[400],iconSize:"sm",iconType:"fa-light",onClick:c,variant:"ghost"},`${d}-${s}`))})]}),t.jsx(m,{display:"flex",pt:.25,width:"100%",children:t.jsx(pt,{items:r})}),t.jsx(m,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),a&&t.jsx(m,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:a.map(({icon:s,text:c,onClick:d},p)=>t.jsx(O,{icon:s,onClick:d,variant:p===0?"primary":"tertiary",width:"100%",children:c},`${p}-${c}`))})]})},la=y.styled.span`
|
|
2302
|
+
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:o="none"})=>`
|
|
2303
|
+
background-color: ${n};
|
|
2282
2304
|
border-radius: 5px;
|
|
2283
2305
|
color: ${e.palette.white};
|
|
2284
2306
|
font-size: 10px;
|
|
2285
2307
|
padding: ${e.spacing[.125]} ${e.spacing[.25]} ${e.spacing[.125]} ${e.spacing[.25]};
|
|
2286
2308
|
text-decoration: ${o}
|
|
2287
2309
|
`}
|
|
2288
|
-
`,
|
|
2310
|
+
`,ca=({bgColor:e,children:n,txtDecoration:o,ml:i=1})=>t.jsx(la,{$bgColor:e,$txtDecoration:o,className:`ml-${i}`,children:n}),da={lg:"56",md:"30",sm:"12"},{getVariant:pa}=X(e=>({blue:`stroke: ${e.palette.info[500]};`,red:`stroke: ${e.palette.primary[500]};`,white:`stroke: ${e.palette.white};`})),ga=y.keyframes`
|
|
2289
2311
|
0% {
|
|
2290
2312
|
transform: rotateZ(0deg);
|
|
2291
2313
|
}
|
|
2292
2314
|
100% {
|
|
2293
2315
|
transform: rotateZ(360deg)
|
|
2294
2316
|
}
|
|
2295
|
-
`,
|
|
2317
|
+
`,ua=y.keyframes`
|
|
2296
2318
|
0%,
|
|
2297
2319
|
25% {
|
|
2298
2320
|
stroke-dashoffset: 280;
|
|
@@ -2309,16 +2331,16 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2309
2331
|
stroke-dashoffset: 280;
|
|
2310
2332
|
transform: rotate(360deg);
|
|
2311
2333
|
}
|
|
2312
|
-
`,
|
|
2313
|
-
${({$size:e="md"})=>
|
|
2314
|
-
animation: ${
|
|
2334
|
+
`,xa=y.styled.svg`
|
|
2335
|
+
${({$size:e="md"})=>y.css`
|
|
2336
|
+
animation: ${ga} 2s linear infinite;
|
|
2315
2337
|
animation-timing-function: linear;
|
|
2316
2338
|
display: inline-block;
|
|
2317
|
-
width: ${
|
|
2339
|
+
width: ${da[e]}px;
|
|
2318
2340
|
`}
|
|
2319
|
-
`,
|
|
2320
|
-
${({theme:e,$color:
|
|
2321
|
-
animation: 1.4s ease-in-out infinite both ${
|
|
2341
|
+
`,ha=y.styled.circle`
|
|
2342
|
+
${({theme:e,$color:n="red"})=>y.css`
|
|
2343
|
+
animation: 1.4s ease-in-out infinite both ${ua};
|
|
2322
2344
|
display: block;
|
|
2323
2345
|
fill: transparent;
|
|
2324
2346
|
stroke-linecap: round;
|
|
@@ -2327,9 +2349,9 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2327
2349
|
stroke-width: 10px;
|
|
2328
2350
|
transform-origin: 50% 50%;
|
|
2329
2351
|
|
|
2330
|
-
${
|
|
2352
|
+
${pa(e,n)}
|
|
2331
2353
|
`}
|
|
2332
|
-
`,
|
|
2354
|
+
`,fa=y.styled.circle`
|
|
2333
2355
|
display: block;
|
|
2334
2356
|
fill: transparent;
|
|
2335
2357
|
stroke: ${({theme:e})=>e.palette.gray[200]};
|
|
@@ -2337,12 +2359,12 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2337
2359
|
stroke-width: 10px;
|
|
2338
2360
|
transform-origin: 50% 50%;
|
|
2339
2361
|
opacity: ${({$color:e})=>e==="white"?"20%":"unset"};
|
|
2340
|
-
`,Cn=({color:e="red",label:
|
|
2362
|
+
`,Cn=({color:e="red",label:n,size:o})=>{const i=y.useTheme();return t.jsxs(m,{alignItems:"center",display:"flex",children:[t.jsxs(xa,{$size:o,viewBox:"0 0 100 100",children:[t.jsx(fa,{$color:e,cx:"50",cy:"50",r:"45"}),t.jsx(ha,{$color:e,cx:"50",cy:"50",r:"45"})]}),n&&t.jsx(N,{color:e==="red"||e==="blue"?i.palette.gray[700]:i.palette.white,ml:.5,size:"sm",children:n})]})},ya={company:{height:"83px",width:"460px"},footer:{height:"57px",width:"315px"},header:{height:"35px",width:"160px"},icon:{height:"40px",width:"40px"},inline:{width:"150px"}},ba=({publicId:e,variant:n})=>t.jsx(m,{...ya[n],children:t.jsx(ne,{alt:"logo",publicId:e})}),$a=y.styled(f.Lottie).attrs(({autoplay:e=!0})=>({autoplay:e,className:"comp-lottie"}))`
|
|
2341
2363
|
${({$size:e=16})=>`
|
|
2342
2364
|
height: ${e}px;
|
|
2343
2365
|
width: ${e}px;
|
|
2344
2366
|
`}
|
|
2345
|
-
`,
|
|
2367
|
+
`,ma=e=>{const{size:n}=e;return t.jsx($a,{$size:n,...e})},wa=({children:e,commitSha:n,commitShortSha:o,parentElement:i,userInfo:r,setVisibility:a})=>{const l=y.useTheme(),{userName:s,email:c,phone:d,userRole:p}=r;return ee(i,()=>{a(!1)}),t.jsxs(gn,{children:[t.jsx("li",{className:"user-info",children:t.jsxs(m,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs(m,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(N,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:s}),t.jsx(N,{color:l.palette.gray[400],size:"sm",children:c}),f.lodashExports.isUndefined(d)?void 0:t.jsx(N,{color:l.palette.gray[400],size:"sm",children:d})]}),t.jsx(m,{children:t.jsx(Y,{tagLabel:p,variant:"role"})})]})}),t.jsx(ae,{}),e,t.jsx(ae,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Q,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${n}`,iconPosition:"hidden",children:t.jsx(N,{color:l.palette.gray[400],size:"xs",children:`commit : ${o}`})})})]})},va=y.styled.button`
|
|
2346
2368
|
align-items: center;
|
|
2347
2369
|
background-color: transparent;
|
|
2348
2370
|
border: unset;
|
|
@@ -2353,18 +2375,18 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2353
2375
|
padding: 0;
|
|
2354
2376
|
|
|
2355
2377
|
&:hover p {
|
|
2356
|
-
color: ${
|
|
2378
|
+
color: ${R.palette.primary[200]};
|
|
2357
2379
|
}
|
|
2358
2380
|
|
|
2359
2381
|
&:hover span {
|
|
2360
|
-
color: ${
|
|
2382
|
+
color: ${R.palette.primary[200]};
|
|
2361
2383
|
}
|
|
2362
|
-
`,
|
|
2363
|
-
${({theme:e,$variant:
|
|
2384
|
+
`,ja=({message:e,onClickButton:n,buttonText:o,buttonFontWeight:i="regular",show:r=!0,icon:a,onClose:l,buttonSide:s="end"})=>{const c=y.useTheme(),[d,p]=u.useState(r),g=u.useCallback(()=>{p(!1),l==null||l()},[l]);u.useEffect(()=>{p(r)},[r,p]);const x=t.jsxs(va,{onClick:n,children:[t.jsx(N,{color:c.palette.white,fontWeight:i,size:"sm",textDecoration:"underline",children:o}),t.jsx(D,{icon:a??"arrow-right",iconColor:c.palette.white,iconSize:"lg",iconType:i==="bold"?"fa-regular":"fa-light"})]});return t.jsxs(m,{alignItems:"center",bgGradient:"linear-gradient(45deg, #f32637 0%, #b8075d 100%)",display:d?"flex":"none",id:"message-banner",justify:"space-between",padding:[.75,.75,.75,.75],children:[t.jsxs(m,{display:"flex",gap:.5,justify:"center",width:"100%",children:[s==="start"&&n?x:void 0,t.jsx(m,{children:typeof e=="string"?t.jsx(N,{color:c.palette.white,display:"inline",size:"sm",children:e}):e}),s==="end"&&n?x:void 0]}),t.jsx(D,{clickable:!0,hoverColor:c.palette.primary[200],icon:"close",iconColor:c.palette.white,iconSize:"lg",iconType:"fa-light",onClick:g})]})},ka=y.styled.div`
|
|
2385
|
+
${({theme:e,$variant:n})=>`
|
|
2364
2386
|
background: ${e.palette.white};
|
|
2365
2387
|
border: 1px solid ${e.palette.gray[200]};
|
|
2366
2388
|
border-radius: ${e.spacing[.25]};
|
|
2367
|
-
border-left: 4px solid ${e.palette[
|
|
2389
|
+
border-left: 4px solid ${e.palette[n][500]};
|
|
2368
2390
|
box-shadow: ${e.shadows.md};
|
|
2369
2391
|
position: relative;
|
|
2370
2392
|
display: flex;
|
|
@@ -2378,10 +2400,10 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2378
2400
|
right: 16px;
|
|
2379
2401
|
}
|
|
2380
2402
|
`}
|
|
2381
|
-
`,
|
|
2403
|
+
`,Ca=y.styled(J)`
|
|
2382
2404
|
font-size: 14px;
|
|
2383
|
-
`,
|
|
2384
|
-
${({theme:e,$variant:
|
|
2405
|
+
`,Sa=y.styled.div`
|
|
2406
|
+
${({theme:e,$variant:n})=>`
|
|
2385
2407
|
height: ${e.spacing[2.5]};
|
|
2386
2408
|
width: ${e.spacing[2.5]};
|
|
2387
2409
|
position: relative;
|
|
@@ -2398,20 +2420,20 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2398
2420
|
|
|
2399
2421
|
& .ellipse-1 {
|
|
2400
2422
|
transform: scale(2.5) translate(-20%, -20%);
|
|
2401
|
-
color: ${e.palette[
|
|
2423
|
+
color: ${e.palette[n][50]};
|
|
2402
2424
|
position: absolute;
|
|
2403
2425
|
}
|
|
2404
2426
|
|
|
2405
2427
|
& .ellipse-2 {
|
|
2406
2428
|
transform: scale(2) translate(-25%, -25%);
|
|
2407
|
-
color: ${e.palette[
|
|
2429
|
+
color: ${e.palette[n][200]};
|
|
2408
2430
|
}
|
|
2409
2431
|
|
|
2410
2432
|
& .icon {
|
|
2411
|
-
color: ${e.palette[
|
|
2433
|
+
color: ${e.palette[n][500]};
|
|
2412
2434
|
}
|
|
2413
2435
|
`}
|
|
2414
|
-
`,
|
|
2436
|
+
`,za=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",Ta=({description:e,onClose:n,title:o,variant:i})=>{const r=y.useTheme(),a=u.useCallback(()=>{n==null||n()},[n]);return t.jsxs(ka,{$variant:i,className:`notification notification__${i}`,role:"alertdialog",children:[t.jsxs(Sa,{$variant:i,children:[t.jsx(D,{icon:"circle",iconClass:"ellipse-1",iconSize:"lg"}),t.jsx(D,{icon:"circle",iconClass:"ellipse-2",iconSize:"lg"}),t.jsx(D,{icon:za(i),iconClass:"icon",iconSize:"lg",iconType:"fa-light"})]}),t.jsxs(m,{pr:1.5,children:[t.jsx(Ca,{fontWeight:"bold",size:"xs",children:o}),t.jsx(N,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(W,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"lg",iconType:"fa-light",onClick:a,px:.125,py:.125,variant:"ghost"})]})},Ia={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},Qe=({icon:e,label:n,onClick:o,onlyLabel:i=!1,provider:r="GitLab"})=>{const a=y.useTheme();return t.jsxs(m,{alignItems:"center",bgColorHover:a.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:o,pb:.5,pl:.25,pr:.25,pt:.5,children:[i?!1:t.jsx(m,{height:"24px",width:"24px",children:e===void 0?t.jsx(ne,{alt:`${r} Logo`,height:"100%",publicId:Ia[r],width:"100%"}):t.jsx(D,{icon:e,iconColor:"#000",iconSize:"xl",iconType:"fa-light"})}),t.jsx(m,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(N,{color:a.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:i?"break-spaces":"nowrap",wordWrap:"unset",children:n??r})})]})},Ea=({align:e="end",buttonLabel:n="Add Credential",children:o,id:i,manualOption:r,providers:a})=>{const l=y.useTheme(),[s,c]=u.useState(!1),d=u.useRef(null);ee(d.current,()=>{c(!1)},!0);const p=u.useCallback(h=>{r==null||r.onClick(h),c(!1)},[r]),g=u.useCallback(()=>{c(h=>!h)},[c]),x=u.useCallback(h=>b=>{var w;(w=a[h])==null||w.onClick(b),c(!1)},[a]);return t.jsxs(m,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:d,width:"max-content",zIndex:10,children:[t.jsx(O,{icon:"plus",onClick:g,variant:"primary",children:n}),t.jsxs(m,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:i,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:s?"visible":"hidden",zIndex:10,children:[Object.keys(a).map(h=>t.jsx(Qe,{onClick:x(h),provider:h},h)),r===void 0?void 0:t.jsx(Qe,{icon:"square-plus",label:r.label??"Add manually",onClick:p}),o]})]})},Na=y.styled.div`
|
|
2415
2437
|
${({theme:e})=>`
|
|
2416
2438
|
height: ${e.spacing[1]};
|
|
2417
2439
|
width: ${e.spacing[1]};
|
|
@@ -2442,7 +2464,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2442
2464
|
font-size: ${e.spacing[.5]};
|
|
2443
2465
|
}
|
|
2444
2466
|
`}
|
|
2445
|
-
`,Sn=({margin:e,onClick:
|
|
2467
|
+
`,Sn=({margin:e,onClick:n,text:o})=>{const i=y.useTheme(),r=t.jsxs(Na,{children:[t.jsx(D,{icon:"circle",iconClass:"ellipse-1",iconSize:"lg"}),t.jsx(D,{icon:"circle",iconClass:"ellipse-2",iconSize:"lg"}),t.jsx(D,{icon:"crown",iconClass:"icon",iconSize:"lg"})]});return o!==void 0?t.jsx(m,{cursor:"pointer",display:"inline-block",mr:e,onClick:n,children:t.jsxs(m,{alignItems:"center",bgColor:i.palette.warning[50],borderRadius:"4px",display:"flex",padding:[.25,.25,.25,.25],width:"fit-content",children:[r,t.jsx(N,{color:i.palette.warning[500],display:"inline",ml:.25,size:"xs",children:o})]})}):t.jsx(m,{display:"inline-block",mr:e,onClick:n,children:r})},Da=({score:e})=>{const n=y.useTheme(),o=e<=33?"priority-bars-low":"priority-bars-medium",i=e>66||e===0?"priority-bars-high":o;return t.jsxs(m,{alignItems:"center",display:"inline-flex",gap:.25,children:[t.jsx(D,{icon:i,iconClass:e<=66?"fa-kit-duotone":"",iconColor:e>0?n.palette.primary[500]:n.palette.gray[200],iconSize:"lg",iconType:"fa-kit",secondaryColor:n.palette.gray[200]}),t.jsx(N,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:e+"%"})]})},{getVariant:Ra}=X(e=>({compliance:`
|
|
2446
2468
|
display: inline-flex;
|
|
2447
2469
|
|
|
2448
2470
|
&.horizontal {
|
|
@@ -2500,50 +2522,50 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2500
2522
|
.progress-bar {
|
|
2501
2523
|
background-color: ${e.palette.primary[500]};
|
|
2502
2524
|
}
|
|
2503
|
-
`})),
|
|
2504
|
-
${({theme:e,$minWidth:
|
|
2525
|
+
`})),Fa=(e,n)=>n<50?e.palette.error[500]:n<80?e.palette.warning[500]:e.palette.success[500],La=y.styled.div`
|
|
2526
|
+
${({theme:e,$minWidth:n,$orientation:o,$rounded:i,$variant:r})=>`
|
|
2505
2527
|
background-color: ${e.palette.gray[100]};
|
|
2506
2528
|
border-radius: ${i?"100px":"unset"};
|
|
2507
|
-
${o==="horizontal"?"min-width":"min-height"}: ${
|
|
2529
|
+
${o==="horizontal"?"min-width":"min-height"}: ${n}px;
|
|
2508
2530
|
${o==="horizontal"?"":"height: 100%;"}
|
|
2509
2531
|
|
|
2510
|
-
${
|
|
2532
|
+
${Ra(e,r)}
|
|
2511
2533
|
|
|
2512
2534
|
`}
|
|
2513
|
-
`,
|
|
2514
|
-
${({theme:e,$percentage:
|
|
2535
|
+
`,Aa=y.styled.div`
|
|
2536
|
+
${({theme:e,$percentage:n,$rounded:o,$variant:i})=>`
|
|
2515
2537
|
display: inline-flex;
|
|
2516
|
-
width: ${
|
|
2538
|
+
width: ${n}%;
|
|
2517
2539
|
max-width: 100%;
|
|
2518
2540
|
min-width: 0%;
|
|
2519
2541
|
height: 100%;
|
|
2520
2542
|
border-radius: ${o?"100px":"unset"};
|
|
2521
|
-
border-end-end-radius: ${o&&
|
|
2522
|
-
border-start-end-radius: ${o&&
|
|
2523
|
-
background-color: ${i==="compliance"?
|
|
2543
|
+
border-end-end-radius: ${o&&n<100?"0":"inherit"};
|
|
2544
|
+
border-start-end-radius: ${o&&n<100?"0":"inherit"};
|
|
2545
|
+
background-color: ${i==="compliance"?Fa(e,n):"inherit"};
|
|
2524
2546
|
`}
|
|
2525
|
-
`,zn=({minWidth:e=100,percentage:
|
|
2547
|
+
`,zn=({minWidth:e=100,percentage:n,percentageLocation:o="right",showPercentage:i=!1,orientation:r="horizontal",rounded:a=!0,variant:l="default"})=>{const s=i&&o==="left",c=i?t.jsx(m,{alignItems:"center",display:"flex",justify:s?"flex-end":"flex-start",width:"40px",children:t.jsx(N,{ml:.5,mr:s?.5:0,size:"sm",children:`${n}%`})}):null,d=t.jsx(La,{$minWidth:e,$orientation:r,$rounded:a,$variant:l,className:r,children:t.jsx(Aa,{$percentage:n,$rounded:a,$variant:l,className:"progress-bar"})});return t.jsxs(m,{alignItems:"center",display:"inline-flex",flexDirection:s?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:s?`${e+43}px`:void 0,minWidth:s?`${e+43}px`:void 0,textAlign:"end",children:[d,c]})},Tn=({onClick:e})=>t.jsx("svg",{className:"in-progress-icon",fill:"none",height:"13",onClick:e,viewBox:"0 0 12 13",width:"12",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{id:"Group 8",children:[t.jsx("path",{d:"M9.40199 3.00342L9.95715 2.34182C9.42087 1.88791 8.80949 1.53109 8.15051 1.28741L7.8552 2.09852C8.41952 2.30786 8.94298 2.61408 9.40199 3.00342Z",fill:"#1D2939"}),t.jsx("path",{d:"M11.1498 6.08815L11.9998 5.90982C11.8803 5.21957 11.6409 4.55558 11.2923 3.94793L10.5444 4.36018C10.8429 4.89758 11.0476 5.48194 11.1498 6.08815Z",fill:"#1D2939"}),t.jsx("path",{d:"M7.8552 11.8057L8.15051 12.6168C8.80949 12.3731 9.42087 12.0163 9.95715 11.5624L9.40199 10.9008C8.94298 11.2901 8.41952 11.5963 7.8552 11.8057Z",fill:"#1D2939"}),t.jsx("path",{d:"M10.5444 9.54409L11.2923 9.97608C11.6411 9.36144 11.8805 8.69095 12 7.99444L11.1498 7.84459C11.0476 8.44177 10.8427 9.01676 10.5444 9.54409Z",fill:"#1D2939"}),t.jsx("path",{d:"M6.04789 13V0.904236C4.44389 0.904236 2.90559 1.54142 1.77139 2.67562C0.637187 3.80982 0 5.34813 0 6.95213C0 8.55613 0.637187 10.0944 1.77139 11.2286C2.90559 12.3628 4.44389 13 6.04789 13Z",fill:"#1D2939"})]})}),In=(e,n)=>{switch(e){case"completed":return n.palette.success[500];case"disabled":return n.palette.gray[300];case"error":return n.palette.error[500];case"in progress":return n.palette.gray[800];case"not completed":default:return n.palette.gray[800]}},Pa=y.styled(D)`
|
|
2526
2548
|
box-sizing: border-box;
|
|
2527
2549
|
|
|
2528
|
-
border-right: ${({theme:e,$variant:
|
|
2550
|
+
border-right: ${({theme:e,$variant:n})=>n==="in progress"?`1px dashed ${In("in progress",e)}`:"unset"};
|
|
2529
2551
|
border-radius: 50%;
|
|
2530
|
-
`,
|
|
2531
|
-
${({$minWidth:e,$orientation:
|
|
2552
|
+
`,Oa=y.styled.div`
|
|
2553
|
+
${({$minWidth:e,$orientation:n})=>`
|
|
2532
2554
|
display: flex;
|
|
2533
|
-
flex-direction: ${
|
|
2555
|
+
flex-direction: ${n==="horizontal"?"row":"column"};
|
|
2534
2556
|
|
|
2535
2557
|
@media (width <= ${e}) {
|
|
2536
2558
|
display: flex;
|
|
2537
2559
|
flex-flow: row wrap;
|
|
2538
2560
|
}
|
|
2539
2561
|
`}
|
|
2540
|
-
`,
|
|
2562
|
+
`,Ma=150,Wa=({label:e,minWidth:n=Ma,state:o="not completed",stepNumber:i=1,title:r,onClick:a,orientation:l="horizontal"})=>{const s=y.useTheme(),c={completed:"circle-check",disabled:"circle-dashed",error:"circle-exclamation","in progress":"circle-half","not completed":"circle-dashed"},d=o==="disabled";return t.jsxs(m,{display:"inline-flex",flexDirection:l==="horizontal"?"column":"row",minWidth:`${n}px`,children:[t.jsx(zn,{minWidth:n,orientation:l,percentage:d||o==="not completed"?0:100,rounded:!1,variant:o==="error"?"progressIndicatorError":"progressIndicator"}),t.jsxs(m,{display:"flex",gap:.5,px:.5,py:.5,width:"100%",children:[o==="in progress"?t.jsx(Tn,{onClick:a}):t.jsx(Pa,{$variant:o,clickable:!d,disabled:d,icon:c[o],iconColor:In(o,s),iconSize:"lg",iconType:"fa-light",onClick:d?void 0:a}),t.jsxs(m,{children:[t.jsx(N,{color:s.palette.gray[d?300:800],fontWeight:"bold",size:"sm",children:`${i}.${r}`}),e===void 0?null:t.jsx(N,{color:s.palette.gray[d?300:600],size:"xs",children:e})]})]})]})},Ba=150,Ha=({children:e,orientation:n="horizontal",minWidth:o=Ba})=>{const i=u.Children.toArray(e),r=u.useMemo(()=>u.Children.count(e),[e]),a=u.useMemo(()=>r*o,[r,o]);return t.jsx(Oa,{$minWidth:`${a}px`,$orientation:n,children:i.map(l=>u.cloneElement(l,{minWidth:o,orientation:n}))})},En=({description:e="",highlightDescription:n="",mobile:o})=>{const i=y.useTheme(),r=o?"md":"lg",a=typeof n=="string",l=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(N,{display:"inline",lineSpacing:1.5,size:r,textAlign:o?"start":"center",children:a?t.jsxs(u.Fragment,{children:[t.jsx(he,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:n}),e]}):e.split(l).map((s,c)=>n.includes(s)?t.jsx(he,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:s},`${c+1}-bold`):s)}):t.jsx(N,{lineSpacing:1.5,size:r,textAlign:o?"start":"center",children:e})},_a=({_portal:e=!1,cancelButton:n,darkBackground:o=!1,children:i,confirmButton:r,container:a,description:l,highlightDescription:s="",image:c,maxWidth:d,mobile:p=!1,title:g,titleColor:x})=>{const h=y.useTheme(),{alt:b,src:w,width:$="77px",height:j="77px"}=c,v=u.useCallback(()=>{n==null||n.onClick()},[n]),C=u.useCallback(()=>{r==null||r.onClick()},[r]),k=t.jsx(J,{color:x,fontWeight:"bold",lineSpacing:p?1.5:2.5,mb:p?1.5:0,size:p?"sm":"lg",textAlign:p?"start":"center",children:g}),z=t.jsx(ne,{alt:b,height:j,publicId:w,width:$}),I=t.jsx(m,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:o?"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(m,{bgColor:h.palette.white,border:`1px solid ${h.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:d,position:"relative",px:p?1.5:2.5,py:p?1.5:2.5,shadow:"lg",width:p?"335px":"100%",zIndex:11,children:[t.jsxs(m,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[p?k:void 0,p?t.jsx(m,{alignItems:"center",height:j,justify:"center",mr:0,children:t.jsx(m,{bgColor:h.palette.gray[100],left:"0",position:"absolute",textAlign:"center",width:"100%",children:z})}):z,t.jsxs(m,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[p?void 0:k,t.jsx(En,{description:l,highlightDescription:s,mobile:p})]})]}),i&&t.jsx(m,{mb:1,scroll:"y",children:t.jsx(m,{height:"100%",children:i})}),t.jsxs(m,{alignItems:"flex-start",display:"flex",gap:1,justify:p?"start":"center",children:[f.lodashExports.isObject(r)?t.jsx(O,{onClick:C,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,f.lodashExports.isObject(n)?t.jsx(O,{onClick:v,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?le.createPortal(I,a??document.body):I},Va=y.styled.div.attrs({className:"comp-scroll-up"})`
|
|
2541
2563
|
position: fixed;
|
|
2542
2564
|
bottom: ${({bottom:e})=>e??"unset"};
|
|
2543
2565
|
right: ${({right:e})=>e??"unset"};
|
|
2544
2566
|
z-index: ${({zIndex:e})=>e??"unset"};
|
|
2545
2567
|
left: ${({left:e})=>e??"unset"};
|
|
2546
|
-
`,
|
|
2568
|
+
`,Ua=({scrollerId:e="dashboard",left:n,visibleAt:o=500,bottom:i,right:r,zIndex:a=100})=>{const[l,s]=u.useState(!1),[c,d]=u.useState(null),p=y.useTheme();u.useEffect(()=>{d(document.getElementById(e)),c==null||c.addEventListener("scroll",()=>{s(c.scrollTop>o)})},[c,e,o]);const g=u.useCallback(()=>{c==null||c.scrollTo({behavior:"smooth",top:0})},[c]);return l?t.jsx(Va,{bottom:i,left:n,right:r,zIndex:a,children:t.jsx(W,{borderRadius:"50%",height:"40px",icon:"arrow-up",iconSize:"xl",id:"scroll-up",onClick:g,style:{backgroundColor:p.palette.black,borderRadius:"50%",color:p.palette.white},width:"40px"})}):null},Ga={critical:{bgColor:R.palette.primary[700],colorL:R.palette.gray[800],colorR:R.palette.white},disable:{bgColor:R.palette.gray[200],colorL:R.palette.gray[400],colorR:R.palette.gray[400]},high:{bgColor:R.palette.error[500],colorL:R.palette.gray[800],colorR:R.palette.white},low:{bgColor:R.palette.warning[200],colorL:R.palette.gray[800],colorR:R.palette.gray[800]},medium:{bgColor:R.palette.warning[500],colorL:R.palette.gray[800],colorR:R.palette.gray[800]}},Ya=({textL:e,textR:n,variant:o})=>{const i=y.useTheme(),{bgColor:r,colorL:a,colorR:l}=Ga[o];return t.jsxs(m,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx(m,{alignItems:"center",bgColor:i.palette.white,border:`1px solid ${r}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(N,{color:a,size:"xs",children:e})}):void 0,t.jsx(m,{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(N,{color:l,size:"xs",children:n})})]})},Ka=(e,n)=>{const o={critical:R.palette.primary[700],high:R.palette.error[500],low:R.palette.warning[200],medium:R.palette.warning[500],none:R.palette.gray[200]},i={disabled:R.palette.gray[400],enabled:R.palette.gray[800]},r={critical:R.palette.white,high:R.palette.white,low:R.palette.gray[800],medium:R.palette.gray[800],none:R.palette.gray[400]};return{iconColor:n<1?o.none:o[e],iconText:f.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?r.none:r[e],textColor:n<1?i.disabled:i.enabled}},xe=({variant:e,value:n})=>{const{iconColor:o,iconText:i,iconTextColor:r,textColor:a}=Ka(e,n),l=f.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs(m,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(V,{id:l,place:"top",tip:l,children:t.jsx(m,{alignItems:"center",bgColor:o,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(N,{color:r,size:"sm",textAlign:"center",children:i})})}),t.jsx(N,{color:a,size:"sm",children:n})]})},Za=({critical:e,high:n,medium:o,low:i})=>t.jsxs(m,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(xe,{value:e,variant:"critical"}),t.jsx(xe,{value:n,variant:"high"}),t.jsx(xe,{value:o,variant:"medium"}),t.jsx(xe,{value:i,variant:"low"})]}),qa=y.styled.div`
|
|
2547
2569
|
${({theme:e})=>`
|
|
2548
2570
|
border-radius: ${e.spacing[.25]};
|
|
2549
2571
|
cursor: pointer;
|
|
@@ -2561,7 +2583,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2561
2583
|
display: block;
|
|
2562
2584
|
}
|
|
2563
2585
|
`}
|
|
2564
|
-
`,
|
|
2586
|
+
`,Xa=({visibleElement:e,hiddenElement:n})=>t.jsxs(qa,{children:[e,t.jsx(m,{display:"none",position:"absolute",top:"100%",zIndex:10,children:n})]}),Nn=({customBadge:e=void 0,description:n,icon:o,onClick:i,requiresUpgrade:r=!1,title:a})=>{const l=y.useTheme();return t.jsxs(m,{bgColor:l.palette.white,bgColorHover:l.palette.gray[100],cursor:"pointer",display:"flex",gap:.5,onClick:i,px:1.25,py:1,width:"100%",children:[t.jsx(m,{alignItems:"center",bgColor:l.palette.gray[300],borderRadius:l.spacing[.25],display:"flex",height:"24px",justify:"center",width:"24px",children:t.jsx(D,{icon:o,iconColor:l.palette.gray[800],iconSize:"sm",ml:.5,mr:.5})}),t.jsxs(m,{children:[t.jsxs(m,{alignItems:"center",display:"inline-flex",gap:.5,children:[t.jsx(N,{color:l.palette.gray[800],size:"sm",children:a}),r?t.jsx(Sn,{text:"Upgrade"}):void 0,e]}),t.jsx(N,{color:l.palette.gray[400],size:"xs",children:n})]})]})},Ja=y.styled(f.m.div)`
|
|
2565
2587
|
${({theme:e})=>`
|
|
2566
2588
|
background-color: ${e.palette.white};
|
|
2567
2589
|
box-shadow: ${e.shadows.lg};
|
|
@@ -2584,19 +2606,19 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2584
2606
|
height: auto;
|
|
2585
2607
|
}
|
|
2586
2608
|
`}
|
|
2587
|
-
`,
|
|
2609
|
+
`,Qa=({children:e,closeIconId:n="close-menu",isOpen:o,items:i,onClose:r,title:a})=>{const l=y.useTheme(),s=u.useRef(null),c=u.useCallback(d=>()=>{d(),r()},[r]);return u.useEffect(()=>{const d=["mousedown","touchstart"],p=g=>{var $;const x=g.target,h=document.getElementById("helpBtn"),b=document.getElementById("filter-btn"),w=(x===h||((h==null?void 0:h.contains(x))??!1)||x===b||(b==null?void 0:b.contains(x)))??!1;o&&!w&&!((($=s.current)==null?void 0:$.contains(x))??!1)&&r()};return d.forEach(g=>{document.addEventListener(g,p,{passive:!0})}),()=>{d.forEach(g=>{document.removeEventListener(g,p)})}},[o,r]),t.jsx(f.LazyMotion,{features:f.domAnimation,children:t.jsx(Ja,{animate:o?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:s,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs(m,{height:"100%",position:"relative",children:[t.jsxs(m,{alignItems:"center",bgColor:l.palette.white,borderBottom:"1px solid",borderColor:l.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(N,{color:l.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:a}),t.jsx(W,{icon:"close",iconColor:l.palette.gray[400],iconSize:"lg",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsx(m,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:t.jsxs(m,{py:1.25,children:[(i??[]).map(({customBadge:d,description:p,icon:g,onClick:x,requiresUpgrade:h,title:b})=>t.jsx(Nn,{customBadge:d,description:p,icon:g,onClick:c(x),requiresUpgrade:h,title:b},b)),e&&t.jsx(m,{px:1.25,children:e})]})})]})})})},es=(e,n)=>n>=50?`
|
|
2588
2610
|
${e.palette.gray[200]} 50%,
|
|
2589
2611
|
${e.palette.primary[500]} 50.05%,
|
|
2590
|
-
${e.palette.primary[500]} ${
|
|
2591
|
-
${e.palette.gray[200]} ${
|
|
2612
|
+
${e.palette.primary[500]} ${n}%,
|
|
2613
|
+
${e.palette.gray[200]} ${n}%
|
|
2592
2614
|
`:`
|
|
2593
|
-
${e.palette.gray[200]} ${
|
|
2594
|
-
${e.palette.primary[500]} ${
|
|
2615
|
+
${e.palette.gray[200]} ${n}%,
|
|
2616
|
+
${e.palette.primary[500]} ${n}%,
|
|
2595
2617
|
${e.palette.primary[500]} 50%,
|
|
2596
2618
|
${e.palette.gray[200]} 50.05%,
|
|
2597
2619
|
${e.palette.gray[200]} 100%
|
|
2598
|
-
`,
|
|
2599
|
-
${({theme:e,$min:
|
|
2620
|
+
`,ts=y.styled.div`
|
|
2621
|
+
${({theme:e,$min:n,$value:o})=>`
|
|
2600
2622
|
align-items: center;
|
|
2601
2623
|
align-self: stretch;
|
|
2602
2624
|
display: flex;
|
|
@@ -2608,10 +2630,10 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2608
2630
|
.track {
|
|
2609
2631
|
background: linear-gradient(
|
|
2610
2632
|
to right,
|
|
2611
|
-
${
|
|
2633
|
+
${n>=0?`
|
|
2612
2634
|
${e.palette.primary[500]} ${o}%,
|
|
2613
2635
|
${e.palette.gray[200]} ${o}%
|
|
2614
|
-
`:
|
|
2636
|
+
`:es(e,o)}
|
|
2615
2637
|
);
|
|
2616
2638
|
border-radius: ${e.spacing[.125]};
|
|
2617
2639
|
height: ${e.spacing[.25]};
|
|
@@ -2635,7 +2657,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2635
2657
|
border: 1px solid ${e.palette.primary[500]};
|
|
2636
2658
|
}
|
|
2637
2659
|
`}
|
|
2638
|
-
`,
|
|
2660
|
+
`,ns=y.styled.div`
|
|
2639
2661
|
${({theme:e})=>`
|
|
2640
2662
|
align-items: center;
|
|
2641
2663
|
display: flex;
|
|
@@ -2649,7 +2671,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2649
2671
|
font-size: ${e.spacing[.5]};
|
|
2650
2672
|
}
|
|
2651
2673
|
`}
|
|
2652
|
-
`,
|
|
2674
|
+
`,os=y.styled.output`
|
|
2653
2675
|
${({theme:e})=>`
|
|
2654
2676
|
align-items: flex-end;
|
|
2655
2677
|
border-radius: ${e.spacing[.5]};
|
|
@@ -2660,7 +2682,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2660
2682
|
padding: ${e.spacing[.625]} ${e.spacing[.75]};
|
|
2661
2683
|
width: 59px;
|
|
2662
2684
|
`}
|
|
2663
|
-
`,Dn=({state:e,trackRef:
|
|
2685
|
+
`,Dn=({state:e,trackRef:n,index:o,name:i})=>{const r=u.useRef(null),{thumbProps:a,inputProps:l,isDragging:s}=f.$47b897dc8cdb026b$export$8d15029008292ae({index:o,trackRef:n,inputRef:r},e);return t.jsx("div",{...a,className:`thumb ${s?"dragging":""}`,children:t.jsx(f.$5c3e21d68f1c4674$export$439d29a4e110a164,{children:t.jsx("input",{...l,"aria-label":i,ref:r})})})},is=(e,n,o)=>Math.round((o-e)/(n-e)*100),rs=e=>{const n=y.useTheme(),o=u.useRef(null),{label:i,minValue:r=0,maxValue:a=100,name:l,setValue:s,watch:c}=e,d=f.$a916eb452884faea$export$b7a616150fdb9f44(),p=f.$28f99e3e86e6ec45$export$e5fda3247f5d67f9({...e,numberFormatter:d,onChange(b){s==null||s(l,b)},value:c==null?void 0:c(l)}),g=is(r,a,p.getThumbValue(0)),{groupProps:x,trackProps:h}=f.$bcca50147b47f54d$export$56b2c08e277f365({...e,"aria-label":l,id:l},p,o);return t.jsx(U,{htmlFor:l,label:i,children:t.jsxs(m,{alignItems:"center",display:"inline-flex",gap:1.25,pl:.5,width:"100%",children:[t.jsxs(ts,{...x,$min:r??0,$value:g,className:"slider",children:[t.jsx("div",{...h,className:`track ${p.isDisabled?"disabled":""}`,ref:o,children:t.jsx(Dn,{index:0,name:l,state:p,trackRef:o})}),t.jsxs(ns,{children:[t.jsx("p",{children:`${d.format(r)} (Low)`}),r<0&&t.jsx("p",{children:"0"}),t.jsx("p",{children:`${d.format(a)} (High)`})]})]}),t.jsx(os,{children:t.jsx(N,{color:n.palette.gray[800],size:"sm",textAlign:"right",children:p.getThumbValueLabel(0)})})]})})},{getVariant:as}=X(e=>({completed:`
|
|
2664
2686
|
background-color: ${e.palette.primary[500]};
|
|
2665
2687
|
color: ${e.palette.white};
|
|
2666
2688
|
|
|
@@ -2683,7 +2705,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2683
2705
|
&::after {
|
|
2684
2706
|
background-color: ${e.palette.gray[200]};
|
|
2685
2707
|
}
|
|
2686
|
-
`})),
|
|
2708
|
+
`})),ss=y.styled.div`
|
|
2687
2709
|
${({theme:e})=>`
|
|
2688
2710
|
align-items: stretch;
|
|
2689
2711
|
background-color: ${e.palette.white};
|
|
@@ -2693,7 +2715,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2693
2715
|
padding: ${`${e.spacing[1]} ${e.spacing[1]}`};
|
|
2694
2716
|
scroll-behavior: unset;
|
|
2695
2717
|
`}
|
|
2696
|
-
`,
|
|
2718
|
+
`,ls=y.styled.div`
|
|
2697
2719
|
display: flex;
|
|
2698
2720
|
flex-direction: row;
|
|
2699
2721
|
margin-bottom: ${({theme:e})=>e.spacing[2]};
|
|
@@ -2701,7 +2723,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2701
2723
|
&:last-child > div:first-child > span::after {
|
|
2702
2724
|
display: none;
|
|
2703
2725
|
}
|
|
2704
|
-
`,
|
|
2726
|
+
`,cs=y.styled.div`
|
|
2705
2727
|
${({theme:e})=>`
|
|
2706
2728
|
display: inline-flex;
|
|
2707
2729
|
font-family: ${e.typography.type.primary};
|
|
@@ -2713,8 +2735,8 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2713
2735
|
margin-right: ${e.spacing[.5]};
|
|
2714
2736
|
}
|
|
2715
2737
|
`}
|
|
2716
|
-
`,
|
|
2717
|
-
${({theme:e,$variant:
|
|
2738
|
+
`,ds=y.styled.span`
|
|
2739
|
+
${({theme:e,$variant:n})=>`
|
|
2718
2740
|
border-radius: 6px;
|
|
2719
2741
|
display: inline-block;
|
|
2720
2742
|
text-align: center;
|
|
@@ -2736,9 +2758,9 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2736
2758
|
height: calc(100% - ${e.spacing[1]});
|
|
2737
2759
|
}
|
|
2738
2760
|
|
|
2739
|
-
${
|
|
2761
|
+
${as(e,n)}
|
|
2740
2762
|
`}
|
|
2741
|
-
`,
|
|
2763
|
+
`,ps=({button:{disabled:e=!1,text:n,type:o="button",onClick:i},steps:r})=>{const[a,l]=u.useState(1),s=u.useCallback((c,d)=>()=>{l(p=>p+c),d==null||d()},[]);return t.jsx(ss,{children:r.map((c,d)=>{const{content:p,title:g,nextAction:x,previousAction:h}=c,b=d+1,w=b===a?"current":"disabled",$=b<a?"completed":w;return t.jsxs(ls,{children:[t.jsx(m,{maxWidth:"40px",position:"relative",children:t.jsx(ds,{$variant:$,children:$==="completed"?t.jsx(D,{icon:"check",iconSize:"lg",iconType:"fa-solid"}):b})}),t.jsxs(m,{ml:1.5,width:"100%",children:[t.jsx(J,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:g}),$==="current"&&t.jsxs(m,{children:[p,t.jsxs(cs,{children:[a>1&&t.jsx(O,{disabled:c.isDisabledPrevious??!1,onClick:s(-1,h),variant:"tertiary",children:"Previous"}),a<r.length?t.jsx(O,{disabled:c.isDisabledNext??!1,onClick:s(1,x),variant:"primary",children:"Next step"}):t.jsx(O,{disabled:e,onClick:i,type:o,variant:"primary",children:n})]})]})]})]},c.title)})})},gs=e=>{const n=(r,a)=>a.reduce((s,[c,d])=>{if(u.isValidElement(d)||c==="__typename")return s.concat([["",""]]);if(typeof d=="object"&&d){const g=Object.entries(d);return s.concat(n(c,g))}const p=r===""?"":`${r}.`;return s.concat([[p+c,d]])},[]),o=Object.entries(e),i=n("",o).filter(([r])=>r!=="");return Object.fromEntries(i)},zt=e=>e.map(gs),Rn=({csvConfig:e={},data:n,children:o})=>{const{columns:i=void 0,export:r=!1,headers:a={},name:l="Report"}=e,s=u.useMemo(()=>f._.isUndefined(i)?zt(n):zt(n).map(p=>f._.pick(p,i)),[n,i]),c=u.useMemo(()=>s.length>0&&!f._.isEmpty(a),[s.length,a]),d=u.useMemo(()=>(c?Object.keys(s[0]):[]).map(p=>f._.includes(Object.keys(a),p)?{key:p,label:a[p]}:{key:p,label:p}),[c,s,a]);return r?t.jsx(f.CSVLink,{data:s,filename:l,headers:c?d:void 0,children:o}):t.jsx(u.Fragment,{children:o})},Fn=e=>{const{table:n}=e,{meta:o}=n.options,[i,r]=u.useState(0),[,a]=n.getHeaderGroups(),l=n.getState(),s=u.useMemo(()=>n.getAllLeafColumns().filter(g=>g.id!=="selection"),[n]),c=u.useMemo(()=>s.map(g=>{var x;return{group:(x=g.parent)==null?void 0:x.id,id:g.id,locked:g.getIsPinned()==="left",name:g.columnDef.header,toggleVisibility:g.toggleVisibility,visible:g.getIsVisible()}}),[s]),d=tn({columnOrder:(o==null?void 0:o.defaultColumnOrder)??[],items:c,name:"table-column-management",setColumnOrder:n.setColumnOrder,setColumnVisibility:n.setColumnVisibility}),p=u.useCallback(()=>{d.toggle()},[d]);return u.useEffect(()=>{r(n.getVisibleLeafColumns().filter(g=>g.id!=="selection").length)},[n,l]),t.jsxs("div",{id:"columns-filter",children:[t.jsx(O,{icon:"columns",id:"columns-toggle-btn",onClick:p,variant:"ghost",children:t.jsx("p",{children:i})}),t.jsx(yn,{modalRef:d,title:"Manage columns",variant:f.isNil(a)?"ungrouped":"grouped"})]})},te=u.createContext({containerRef:void 0,elementName:"",handleUnselectAll:void 0,hidden:!1,onKeyDown:void 0,selected:0,tableSize:0,tableRef:void 0,table:void 0}),us=y.styled.span`
|
|
2742
2764
|
transition: all 150ms;
|
|
2743
2765
|
width: 5px;
|
|
2744
2766
|
height: 10px;
|
|
@@ -2763,7 +2785,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2763
2785
|
transition: opacity 150ms;
|
|
2764
2786
|
opacity: ${({$variant:e})=>e==="asc"?0:1};
|
|
2765
2787
|
}
|
|
2766
|
-
`,et=e=>{const
|
|
2788
|
+
`,et=e=>{const n=y.useTheme(),{variant:o}=e;return t.jsxs(us,{$variant:o,children:[t.jsx(D,{icon:"caret-up",iconColor:n.palette.gray[700],iconSize:"xs",iconType:"fa-solid"}),t.jsx(D,{icon:"caret-down",iconColor:n.palette.gray[700],iconSize:"xs",iconType:"fa-solid"})]})},xs=y.styled.div`
|
|
2767
2789
|
position: relative;
|
|
2768
2790
|
|
|
2769
2791
|
div:has(table) {
|
|
@@ -2926,8 +2948,8 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2926
2948
|
}
|
|
2927
2949
|
}
|
|
2928
2950
|
}
|
|
2929
|
-
`,
|
|
2930
|
-
${({$width:e,theme:
|
|
2951
|
+
`,hs=y.styled.div`
|
|
2952
|
+
${({$width:e,theme:n})=>`
|
|
2931
2953
|
display: flex;
|
|
2932
2954
|
flex-direction: column;
|
|
2933
2955
|
align-items: stretch;
|
|
@@ -2938,15 +2960,15 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2938
2960
|
div {
|
|
2939
2961
|
position: relative;
|
|
2940
2962
|
font-weight: 400;
|
|
2941
|
-
font-size: ${
|
|
2963
|
+
font-size: ${n.typography.text.sm};
|
|
2942
2964
|
text-align: left;
|
|
2943
2965
|
|
|
2944
|
-
color: ${
|
|
2945
|
-
background-color: ${
|
|
2946
|
-
border-radius: ${
|
|
2947
|
-
padding: ${
|
|
2948
|
-
margin: ${
|
|
2949
|
-
height: ${
|
|
2966
|
+
color: ${n.palette.gray[600]};
|
|
2967
|
+
background-color: ${n.palette.gray[100]};
|
|
2968
|
+
border-radius: ${n.spacing[.25]};
|
|
2969
|
+
padding: ${n.spacing[.5]} ${n.spacing[.75]};
|
|
2970
|
+
margin: ${n.spacing[.5]} 0;
|
|
2971
|
+
height: ${n.spacing[2.25]};
|
|
2950
2972
|
|
|
2951
2973
|
span {
|
|
2952
2974
|
text-decoration: underline;
|
|
@@ -2954,7 +2976,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2954
2976
|
}
|
|
2955
2977
|
}
|
|
2956
2978
|
`}
|
|
2957
|
-
`,
|
|
2979
|
+
`,fs=y.styled.div`
|
|
2958
2980
|
align-items: center;
|
|
2959
2981
|
background-color: transparent;
|
|
2960
2982
|
display: flex;
|
|
@@ -2983,7 +3005,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
2983
3005
|
margin-right: ${({theme:e})=>e.spacing[.5]};
|
|
2984
3006
|
}
|
|
2985
3007
|
}
|
|
2986
|
-
`,Tt=
|
|
3008
|
+
`,Tt=y.styled.div`
|
|
2987
3009
|
transition: all 150ms;
|
|
2988
3010
|
content: "";
|
|
2989
3011
|
z-index: 2;
|
|
@@ -3002,16 +3024,16 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3002
3024
|
transition: all 150ms;
|
|
3003
3025
|
border-right: 1px solid ${({theme:e})=>e.palette.black};
|
|
3004
3026
|
}
|
|
3005
|
-
`,
|
|
3027
|
+
`,Ln=()=>{const e=y.useTheme(),{table:n}=u.useContext(te),{groupHeaders:o,tooltips:i}=(n==null?void 0:n.options.meta)??{},r=u.useCallback(d=>()=>{d.column.getCanSort()&&(n==null||n.setPageIndex(0),d.column.toggleSorting())},[n]),a=d=>p=>{d.getResizeHandler()(p)};if(o)return t.jsx("thead",{children:n==null?void 0:n.getHeaderGroups().map(d=>t.jsx("tr",{"data-testid":"row-headers",children:d.headers.map(p=>{var b;const{isPlaceholder:g}=p,x=g?p.subHeaders[0]:p;return f._.isUndefined(p.column.parent)&&p.depth>1?null:t.jsxs("th",{colSpan:x.colSpan,id:`header-${x.id}`,rowSpan:g?0:1,style:{borderRight:p.headerGroup.headers.indexOf(p)!==p.headerGroup.headers.length-1?"1px solid white":void 0,position:"relative",width:p.getSize()},children:[t.jsxs(m,{alignItems:"center",bgColor:e.palette.gray[200],borderBottom:g?void 0:`1px solid${e.palette.white}`,display:"flex",gap:.25,height:g?"6rem":"3rem",lineSpacing:0,onClick:r(x),pl:.5,pt:g?3:0,whiteSpace:"nowrap",width:"100%",children:[f.flexRender(x.column.columnDef.header,x.getContext()),x.column.getCanSort()?t.jsx(et,{variant:x.column.getIsSorted()}):void 0,(i==null?void 0:i.map(w=>w.columnId).includes(x.id))??!1?t.jsx(V,{icon:"circle-info",id:x.id,place:"right",tip:((b=i==null?void 0:i.find(w=>w.columnId===x.id))==null?void 0:b.tip)??""}):void 0]}),x.column.getCanResize()&&t.jsx(Tt,{onMouseDown:a(p)})]},x.id)})},d.id))});const[l,s]=(n==null?void 0:n.getHeaderGroups())??[],c=f.lodashExports.isNil(s)?l:s;return t.jsx("thead",{children:t.jsx("tr",{"data-testid":"row-headers",children:c.headers.map(d=>{var p;return t.jsxs("th",{id:`header-${d.id}`,style:{position:"relative",width:d.getSize()},children:[t.jsxs(m,{alignItems:"center",bgColor:e.palette.gray[200],display:"flex",gap:.25,height:"3rem",lineSpacing:0,onClick:r(d),px:.5,whiteSpace:"nowrap",width:"100%",children:[f.flexRender(d.column.columnDef.header,d.getContext()),d.column.getCanSort()?t.jsx(et,{variant:d.column.getIsSorted()}):void 0,(i==null?void 0:i.map(g=>g.columnId).includes(d.id))??!1?t.jsx(V,{icon:"circle-info",id:d.id,place:"right",tip:((p=i==null?void 0:i.find(g=>g.columnId===d.id))==null?void 0:p.tip)??""}):void 0]}),d.column.getCanResize()&&t.jsx(Tt,{onMouseDown:a(d)})]},d.id)})})})},ys=y.styled.div`
|
|
3006
3028
|
align-items: center;
|
|
3007
3029
|
display: flex;
|
|
3008
3030
|
width: 100%;
|
|
3009
|
-
`,
|
|
3010
|
-
${({theme:e,$padding:
|
|
3031
|
+
`,An=()=>{const e=y.useTheme(),{table:n}=u.useContext(te),{loading:o}=(n==null?void 0:n.options.meta)??{},i=u.useMemo(()=>{const{enableRowSelection:s,enableMultiRowSelection:c}=(n==null?void 0:n.options)??{};return s||c?1:0},[n==null?void 0:n.options]),r=u.useCallback((s,c)=>{if(c===i)return d=>{var p,g;d.stopPropagation(),(g=(p=n==null?void 0:n.options)==null?void 0:p.onRowClick)==null||g.call(p,s)}},[i,n]),a=u.useCallback(s=>c=>{c.stopPropagation(),s.toggleExpanded()},[]),l=u.useCallback(s=>{const{meta:c}=(n==null?void 0:n.options)??{},{onExpand:d=void 0}=c??{};return d?d(s):null},[n]);return o?t.jsx("tbody",{children:t.jsx("tr",{className:"row-loading","data-testid":"row-loading",children:t.jsx("td",{colSpan:(n==null?void 0:n.getVisibleLeafColumns().length)??0,children:t.jsx(m,{alignItems:"center",display:"flex",justify:"center",width:"100%",children:t.jsx(Cn,{size:"md"})})})})}):(n==null?void 0:n.getRowModel().rows.length)===0?t.jsx("tbody",{children:t.jsx("tr",{className:"row-no-data","data-testid":"row-no-data",children:t.jsx("td",{colSpan:n.getVisibleLeafColumns().length+1,children:t.jsx(N,{color:e.palette.gray[800],size:"sm",textAlign:"center",children:"No data to display"})})})}):t.jsx("tbody",{children:n==null?void 0:n.getRowModel().rows.map(s=>t.jsxs(tt.default.Fragment,{children:[t.jsx("tr",{"aria-expanded":s.getIsExpanded(),"data-testid":`row-${s.id}`,children:s.getVisibleCells().map((c,d)=>t.jsx("td",{className:d===i&&n.options.onRowClick?"clickable":"","data-testid":`cell-${c.id}`,onClick:r(s,d),children:t.jsxs(ys,{children:[d===i&&s.getCanExpand()?t.jsx("button",{onClick:a(s),style:{cursor:"pointer",marginRight:"1rem"},children:t.jsx(D,{icon:s.getIsExpanded()?"angle-up":"angle-down",iconSize:"lg",iconType:"fa-light"})}):void 0,f.flexRender(c.column.columnDef.cell,c.getContext())]})},c.id))}),s.getIsExpanded()?t.jsx("tr",{"data-testid":`row-${s.id}-expand`,id:"description",children:t.jsx("td",{colSpan:100,children:l(s)})}):void 0]},s.id))})},Pn=()=>{const{containerRef:e,hidden:n,elementName:o,handleUnselectAll:i,onKeyDown:r,selected:a,tableSize:l,tableRef:s}=u.useContext(te);return t.jsxs("div",{ref:e,children:[n?void 0:t.jsx(hs,{$width:l,children:t.jsxs("div",{children:[t.jsx("b",{children:`${a} ${o} `}),`${a===1?"has":"have"} been selected. `,t.jsx("span",{onClick:i,onKeyDown:r,role:"link",tabIndex:0,children:"Unselect all"})]})}),t.jsxs("table",{ref:s,children:[t.jsx(Ln,{}),t.jsx(An,{})]})]})},It=y.styled(W)`
|
|
3032
|
+
${({theme:e,$padding:n})=>`
|
|
3011
3033
|
background-color: ${e.palette.white};
|
|
3012
3034
|
border: 1px solid ${e.palette.gray[200]};
|
|
3013
3035
|
border-radius: 2px;
|
|
3014
|
-
padding: ${
|
|
3036
|
+
padding: ${n??e.spacing[.25]};
|
|
3015
3037
|
|
|
3016
3038
|
path {
|
|
3017
3039
|
fill: ${e.palette.gray[700]};
|
|
@@ -3032,7 +3054,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3032
3054
|
background-color: ${e.palette.gray[100]};
|
|
3033
3055
|
}
|
|
3034
3056
|
`}
|
|
3035
|
-
`,On=()=>{const{table:e}=u.useContext(te),{pagination:{pageIndex:
|
|
3057
|
+
`,On=()=>{const{table:e}=u.useContext(te),{pagination:{pageIndex:n}={pageIndex:0}}=(e==null?void 0:e.getState())??{},o=(e==null?void 0:e.getPageCount())??0,i=u.useCallback(()=>{e==null||e.setPageIndex(n+1)},[n,e]),r=u.useCallback(()=>{e==null||e.previousPage()},[e]);return t.jsxs(m,{alignItems:"center",display:"flex",gap:.5,children:[t.jsx(It,{$padding:"4px 6px",disabled:!(e!=null&&e.getCanPreviousPage()),icon:"chevron-left",iconSize:"sm",id:"go-previous",onClick:r,variant:"ghost"}),t.jsx(It,{$padding:"4px 6px",disabled:n>o-2,icon:"chevron-right",iconSize:"sm",id:"go-next",onClick:i,variant:"ghost"})]})},bs=10,$s=20,ms=50,ws=100,Mn=()=>{const e=y.useTheme(),{table:n}=u.useContext(te),o=(n==null?void 0:n.getRowCount())??0,[i,r]=u.useState(!1),[a,l]=u.useState((n==null?void 0:n.getState().pagination.pageSize)??10),{refs:s,floatingStyles:c}=f.useFloating$1({middleware:[f.offset({mainAxis:4})],open:i,placement:"top-end",whileElementsMounted:f.autoUpdate}),d=u.useMemo(()=>f.transform([bs,$s,ms,ws],(h,b)=>(h.push(b),b<=o),[]),[o]),p=u.useCallback(()=>{i&&r(!1)},[i]),g=u.useCallback(()=>{r(h=>!h)},[]),x=u.useCallback(h=>()=>{l(h),n==null||n.setPageSize(h),r(!1)},[n,l]);return ee(s.reference.current,()=>{r(!1)},!0,s.floating.current),u.useEffect(()=>(window.addEventListener("scrollend",p,!0),()=>{window.removeEventListener("scrollend",p,!0)}),[p]),t.jsxs(u.Fragment,{children:[t.jsxs(m,{alignItems:"center",bgColor:e.palette.white,border:"1px solid",borderColor:e.palette.gray[200],borderRadius:"4px",display:"flex",minHeight:"24px",px:.25,children:[t.jsx(N,{pr:.25,size:"sm",children:a}),t.jsx(W,{color:e.palette.gray[400],icon:i?"chevron-up":"chevron-down",iconSize:"sm",id:"paginator-dropdown",onClick:g,ref:s.setReference,variant:"ghost"})]}),i?t.jsx(m,{bgColor:e.palette.white,border:`1px solid ${e.palette.gray[200]}`,borderRadius:e.spacing[.5],display:"flex",flexDirection:"column",px:.25,py:.25,ref:s.setFloating,shadow:"md",style:c,children:d.map(h=>{const b=x(h);return t.jsx(m,{bgColor:a===h?e.palette.gray[800]:"transparent",bgColorHover:e.palette.gray[a===h?800:100],borderRadius:e.spacing["0.25"],cursor:"pointer",maxWidth:"40px",minWidth:"40px",onClick:b,px:.25,py:.25,children:t.jsx(N,{color:a===h?e.palette.white:e.palette.gray[600],size:"sm",textAlign:"center",children:h})},h)})}):void 0]})},Wn=()=>{const{table:e}=u.useContext(te),{pagination:{pageIndex:n,pageSize:o}={pageIndex:0,pageSize:10}}=(e==null?void 0:e.getState())??{},i=(e==null?void 0:e.getRowCount())??0,r=u.useCallback((a,l,s)=>{if(s===0)return"0 of 0";if(l*a>=s)return`${s} of ${s}`;const c=l*a+1,d=Math.min(l*(a+1),s);return`${c}-${d} of ${s}`},[]);return t.jsx(N,{display:"inline-block",fontWeight:"bold",size:"sm",children:r(n,o,i)})},Bn=({children:e})=>t.jsxs(fs,{children:[t.jsxs("div",{className:"pagination-container",children:[t.jsx(Wn,{}),t.jsx(Mn,{}),t.jsx(On,{})]}),e]}),Hn=({children:e})=>t.jsx("div",{className:"footer-container",children:e}),vs=y.styled.div.attrs({className:"search-container"})`
|
|
3036
3058
|
${({theme:e})=>`
|
|
3037
3059
|
display: flex;
|
|
3038
3060
|
flex-direction: column;
|
|
@@ -3079,7 +3101,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3079
3101
|
}
|
|
3080
3102
|
}
|
|
3081
3103
|
`}
|
|
3082
|
-
`,
|
|
3104
|
+
`,js=y.styled.div.attrs({className:"controls-container"})`
|
|
3083
3105
|
display: flex;
|
|
3084
3106
|
flex: 1 0 50%;
|
|
3085
3107
|
|
|
@@ -3095,7 +3117,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3095
3117
|
justify-content: flex-end;
|
|
3096
3118
|
width: 100%;
|
|
3097
3119
|
}
|
|
3098
|
-
`,
|
|
3120
|
+
`,ks=y.styled.div`
|
|
3099
3121
|
display: flex;
|
|
3100
3122
|
flex-wrap: wrap;
|
|
3101
3123
|
width: 100%;
|
|
@@ -3110,7 +3132,7 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3110
3132
|
.highlight-container ~ .controls-container {
|
|
3111
3133
|
flex: 1 0 100%;
|
|
3112
3134
|
}
|
|
3113
|
-
`,
|
|
3135
|
+
`,Cs=500,_n=({children:e})=>{const{table:n}=u.useContext(te),{onSearch:o,search:i,searchPlaceholder:r="Search"}=(n==null?void 0:n.options.meta)??{},a=lt(s=>{o==null||o(s.target.value)},Cs),l=u.useCallback(()=>{o==null||o("")},[o]);return t.jsxs(ks,{children:[o===void 0?void 0:t.jsx(vs,{children:t.jsx(se,{name:"search",onChange:a,onClear:l,placeholder:r,value:i})}),e]})},Vn=({children:e})=>t.jsx(m,{display:"flex",flexDirection:"column",children:t.jsx("div",{className:"caption-container",children:e})}),Un=({children:e})=>t.jsx(js,{children:e}),Gn=({children:e})=>t.jsx("div",{className:"highlight-container",children:e}),Ss=160,Yn=({children:e,table:n})=>{var x;const o=u.useRef(null),i=u.useRef(null),{id:r}=n.options.meta??{},{enableMultiRowSelection:a}=(n==null?void 0:n.options)??{},l=Object.keys(n.getState().rowSelection).length,s=l===1?"item":"items",c=l===0||!a,d=Math.max(((x=o.current)==null?void 0:x.clientWidth)??0,n.getTotalSize()+Ss),p=u.useCallback(()=>{n.resetRowSelection()},[n]),g=u.useCallback(h=>{h.key==="Enter"&&p()},[p]);return u.useEffect(()=>{n.setPageIndex(0)},[n]),t.jsx(te.Provider,{value:{containerRef:o,elementName:s,handleUnselectAll:p,hidden:c,onKeyDown:g,selected:l,tableSize:d,tableRef:i,table:n},children:t.jsx(xs,{id:r,children:e})})},zs=Object.assign(Yn,{Caption:Vn,Columns:Fn,Content:Pn,Controls:Un,Export:Rn,Footer:Bn,FooterContent:Hn,Highlighted:Gn,Options:_n}),Ts=y.styled.button`
|
|
3114
3136
|
${({theme:e})=>`
|
|
3115
3137
|
align-items: center;
|
|
3116
3138
|
background-color: ${e.palette.white};
|
|
@@ -3152,8 +3174,8 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3152
3174
|
background-color: ${e.palette.gray[100]};
|
|
3153
3175
|
}
|
|
3154
3176
|
`}
|
|
3155
|
-
`,
|
|
3156
|
-
${({theme:e,$size:
|
|
3177
|
+
`,Is={add:{icon:"plus"},approve:{icon:"check"},disabled:{icon:"ban"},reject:{icon:"xmark"},submit:{icon:"arrow-right"},success:{icon:"check"}},Es=({disabled:e=!1,icon:n,id:o,label:i,name:r,onClick:a,type:l="button",variant:s})=>{const c=y.useTheme(),d=t.jsxs(Ts,{"aria-label":r??void 0,className:s,disabled:e,id:o,onClick:a,type:l,children:[t.jsx(D,{clickable:!1,icon:n??Is[s].icon,iconSize:r===void 0?"sm":"lg",iconType:"fa-light"}),r??void 0]});return t.jsxs(m,{alignItems:"center",display:"flex",children:[d,i&&t.jsx(N,{color:c.palette.gray[800],ml:.5,size:"sm",children:i})]})},Ns=y.styled.div`
|
|
3178
|
+
${({theme:e,$size:n})=>`
|
|
3157
3179
|
align-items: center;
|
|
3158
3180
|
background-color: ${e.palette.white};
|
|
3159
3181
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -3168,16 +3190,16 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3168
3190
|
p {
|
|
3169
3191
|
font-style: normal;
|
|
3170
3192
|
line-height: ${e.spacing[1.25]};
|
|
3171
|
-
text-align: ${
|
|
3193
|
+
text-align: ${n==="long"?"":"center"};
|
|
3172
3194
|
}
|
|
3173
3195
|
|
|
3174
3196
|
&:hover {
|
|
3175
3197
|
border: 1px solid ${e.palette.gray[600]};
|
|
3176
3198
|
}
|
|
3177
3199
|
`}
|
|
3178
|
-
`,
|
|
3179
|
-
${({theme:e,$size:
|
|
3180
|
-
display: ${
|
|
3200
|
+
`,Ds=y.styled.div`
|
|
3201
|
+
${({theme:e,$size:n})=>`
|
|
3202
|
+
display: ${n==="long"?"flex":"block"};
|
|
3181
3203
|
flex-direction: column;
|
|
3182
3204
|
gap: ${e.spacing[1.5]};
|
|
3183
3205
|
position: relative;
|
|
@@ -3185,9 +3207,9 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3185
3207
|
margin: 0 auto 0 auto;
|
|
3186
3208
|
|
|
3187
3209
|
div.timeline-card {
|
|
3188
|
-
width: ${
|
|
3189
|
-
margin-left: ${
|
|
3190
|
-
margin-bottom: ${
|
|
3210
|
+
width: ${n==="long"?"510px":"auto"};
|
|
3211
|
+
margin-left: ${n==="long"?"0px":"30px"};
|
|
3212
|
+
margin-bottom: ${n==="long"?"0px":e.spacing[.5]};
|
|
3191
3213
|
}
|
|
3192
3214
|
|
|
3193
3215
|
&::before {
|
|
@@ -3220,9 +3242,9 @@ ${b[8]}...`:(b.length<8&&d(!1),t)},[l,t,e]),x=u.useMemo(g,[g]),h=u.useCallback(a
|
|
|
3220
3242
|
&::before,
|
|
3221
3243
|
> *::before {
|
|
3222
3244
|
content: "";
|
|
3223
|
-
left: ${
|
|
3245
|
+
left: ${n==="long"?"50%":"0px"};
|
|
3224
3246
|
position: absolute;
|
|
3225
3247
|
transform: translateX(-50%);
|
|
3226
3248
|
}
|
|
3227
3249
|
`}
|
|
3228
|
-
`,Kn=({date:e,description:
|
|
3250
|
+
`,Kn=({date:e,description:n,title:o,size:i="long"})=>{const r=y.useTheme();return t.jsxs(Ns,{$size:i,className:"timeline-card",children:[t.jsx(N,{color:r.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:e}),t.jsx(N,{color:r.palette.gray[800],fontWeight:"bold",lineSpacing:1.5,mb:.5,size:"md",textAlign:"center",children:o}),t.jsx("div",{children:n.map((a,l)=>{const s=`${a}#${l}`;return t.jsx(N,{size:"sm",textAlign:"center",wordBreak:"break-word",children:a},s)})})]})},Rs=({items:e})=>{const n=u.useRef(null),[o,i]=u.useState("long");return u.useEffect(()=>{n.current&&i(n.current.offsetWidth<=1100?"small":"long")},[]),t.jsx(m,{ref:n,width:"100%",children:t.jsx(Ds,{$size:o,children:e.map((r,a)=>t.jsx(Kn,{date:r.date,description:r.description,size:o,title:r.title},`${r.title}-${a}`))})})},Fs={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:""},Ls=({run:e,steps:n,onFinish:o})=>{const[i,r]=u.useState(e),[a,l]=u.useState(0),s=u.useCallback(c=>{const{action:d,index:p,status:g,type:x}=c;[f.EVENTS.STEP_AFTER,f.EVENTS.TARGET_NOT_FOUND].includes(x)?l(p+(d===f.ACTIONS.PREV?-1:1)):([f.STATUS.FINISHED,f.STATUS.SKIPPED].includes(g)||d==="close")&&(r(!1),f.lodashExports.isUndefined(o)||o())},[o]);return t.jsx(f.components_default,{callback:s,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:i,spotlightClicks:!0,stepIndex:a,steps:n,styles:{buttonNext:{display:a===n.length-1?"none":"block"},options:{zIndex:9999}}})};exports.Accordion=So;exports.AccordionContent=Rt;exports.ActionButton=qe;exports.Alert=Po;exports.AppliedFilter=ue;exports.AppliedFilters=Fr;exports.ArrayField=Ke;exports.Avatar=Vo;exports.BaseButtonComponent=nt;exports.BaseComponent=Se;exports.BaseSpanComponent=it;exports.BaseTextComponent=ot;exports.Body=An;exports.Button=O;exports.Button$1=Ne;exports.ButtonToolbarCenter=bi;exports.ButtonToolbarRow=mi;exports.ButtonToolbarStartRow=$i;exports.Calendar=Bt;exports.Calendar$1=Gt;exports.Calendar$2=Kt;exports.CalendarCell=Wt;exports.CalendarGrid=Le;exports.CaptionContent=Vn;exports.CardContainer=er;exports.CardHeader=Fe;exports.CardWithImage=Yo;exports.CardWithInput=Hi;exports.CardWithOptions=xn;exports.CardWithSelector=Zi;exports.CardWithSwitch=Ji;exports.Carousel=ar;exports.Checkbox=re;exports.CodeSnippet=lr;exports.Col=Ye;exports.ColumFilters=vn;exports.ColumnToggle=Fn;exports.ColumnsModal=yn;exports.ComboBox=at;exports.ComboBoxField=Ge;exports.Container=m;exports.ControlsContent=Un;exports.CopyButton=Ur;exports.CustomThemeProvider=bo;exports.DateField=_t;exports.DateSelector=fe;exports.Description=En;exports.Dialog=Pe;exports.Divider=ae;exports.Dropdown=Kr;exports.Editable=yi;exports.EmptyButton=Je;exports.EmptyState=Jr;exports.ErrorMessage=Jo;exports.ExportCsv=Rn;exports.FilePreview=Pt;exports.FilterControl=bn;exports.FilterForm=Xe;exports.FilterFormContent=$n;exports.FiltersList=wn;exports.FooterContent=Hn;exports.Form=ta;exports.Gap=ji;exports.GridContainer=oa;exports.GroupSelector=ra;exports.Head=Ln;exports.Header=Ae;exports.Header$1=ln;exports.Heading=J;exports.HighlightedContent=Gn;exports.Icon=D;exports.IconButton=W;exports.InProgressIcon=Tn;exports.IndicatorCard=aa;exports.InfoSidebar=sa;exports.InnerForm=Qr;exports.InputArray=Ci;exports.InputDate=Ut;exports.InputDateRange=Yt;exports.InputDateTime=fi;exports.InputFile=Ii;exports.InputNumber=Xt;exports.InputNumberRange=Jt;exports.InputTags=Ni;exports.Label=rt;exports.Link=Q;exports.ListItem=Ie;exports.ListItemsWrapper=gn;exports.LittleFlag=ca;exports.Loading=Cn;exports.LocationCode=rn;exports.Logo=ba;exports.Lottie=ma;exports.MemoizedImage=ne;exports.Menu=wa;exports.MenuItem=Nn;exports.MessageBanner=ja;exports.Modal=gt;exports.ModalConfirm=cn;exports.ModalFooter=sn;exports.Notification=Ta;exports.NotificationSign=dn;exports.NumberField=Re;exports.NumberFieldCompact=Fi;exports.NumberInput=qt;exports.OAuthSelector=Ea;exports.Option=Ot;exports.OptionBoxContainer=ut;exports.OptionContainer=Qe;exports.OptionContainer$1=kn;exports.OutlineContainer=U;exports.PaginationControl=On;exports.PaginationDropdown=Mn;exports.PaginationSize=Wn;exports.PhoneInput=Wi;exports.PopUp=_a;exports.Popover=ze;exports.PremiumFeature=Sn;exports.PreviewPanel=un;exports.PriorityScore=Da;exports.ProgressBar=zn;exports.ProgressIndicator=Ha;exports.ProgressStep=Wa;exports.RadioButton=ct;exports.Row=Zt;exports.ScrollUpButton=Ua;exports.Search=se;exports.SearchPanel=fn;exports.SeverityBadge=Ya;exports.SeverityOverview=Za;exports.SeverityOverviewBadge=xe;exports.ShowOnHover=Xa;exports.SlideOutMenu=Qa;exports.Slider=rs;exports.SortIcon=et;exports.Span=he;exports.StepLapse=ps;exports.Tab=pn;exports.Table=zs;exports.Table$1=Yn;exports.TableButton=Es;exports.TableContent=Pn;exports.TableContext=te;exports.TableFooter=Bn;exports.TableOptions=_n;exports.Tabs=pt;exports.Tag=Y;exports.TagsField=Ze;exports.Text=N;exports.TextArea=Bi;exports.TextInput=Oe;exports.Thumb=Dn;exports.TimeField=Vt;exports.TimeLine=Rs;exports.TimeLineCard=Kn;exports.Toggle=nn;exports.Tooltip=V;exports.Tour=Ls;exports.baseStep=Fs;exports.formatCheckValues=jn;exports.getStyledConfig=Ce;exports.hiddenProps=Nt;exports.icons=yo;exports.setBorder=we;exports.setDisplay=ve;exports.setInteraction=ke;exports.setMargin=$e;exports.setPadding=be;exports.setPosition=me;exports.setText=je;exports.theme=R;exports.useCarousel=Qt;exports.useClickOutside=ee;exports.useCloudinaryImage=en;exports.useColumnsModal=tn;exports.useConditionsDialog=Hr;exports.useConfirmDialog=_r;exports.useDebouncedCallback=lt;exports.useFilterForm=mn;exports.useFilters=Br;exports.useModal=Te;exports.useSearch=Ui;exports.variantBuilder=X;
|