@worldresources/wri-design-systems 2.204.1 → 2.205.0
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/index.cjs.js +108 -108
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +104 -104
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2957,11 +2957,11 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2957
2957
|
padding: 0;
|
|
2958
2958
|
min-height: ${k(1600)};
|
|
2959
2959
|
}
|
|
2960
|
-
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const GT=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},ZT=(e,t)=>{let n="14.875rem";return"full-width"===e?n="100%":"large"===e&&(n="22.875rem"),i.css`
|
|
2960
|
+
`;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const GT=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},ZT=e=>"small"===e||"small-full-width"===e,JT=(e,t)=>{let n="14.875rem";return(e=>"full-width"===e||"small-full-width"===e)(e)?n="100%":"large"===e&&(n="22.875rem"),i.css`
|
|
2961
2961
|
width: 100%;
|
|
2962
2962
|
max-width: ${n};
|
|
2963
2963
|
border-radius: ${$(300)};
|
|
2964
|
-
padding: ${
|
|
2964
|
+
padding: ${ZT(e)?`${k(200)} ${k(200)} ${k(300)} ${k(200)}`:`${k(200)} ${k(300)} ${k(300)} ${k(300)}`};
|
|
2965
2965
|
display: flex;
|
|
2966
2966
|
align-items: ${t?"center":"flex-start"};
|
|
2967
2967
|
justify-content: ${t?"space-between":"flex-start"};
|
|
@@ -2971,7 +2971,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2971
2971
|
button {
|
|
2972
2972
|
margin-left: ${t?0:k(600)};
|
|
2973
2973
|
}
|
|
2974
|
-
`},
|
|
2974
|
+
`},XT=i.css`
|
|
2975
2975
|
display: flex;
|
|
2976
2976
|
align-items: baseline;
|
|
2977
2977
|
gap: ${k(200)};
|
|
@@ -2979,35 +2979,35 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2979
2979
|
svg {
|
|
2980
2980
|
margin-top: 0.1875rem;
|
|
2981
2981
|
}
|
|
2982
|
-
`,
|
|
2982
|
+
`,YT=e=>i.css`
|
|
2983
2983
|
color: ${w("neutral",800)};
|
|
2984
|
-
font-size: ${
|
|
2985
|
-
line-height: ${
|
|
2984
|
+
font-size: ${ZT(e)?C(300):C(500)};
|
|
2985
|
+
line-height: ${ZT(e)?S(500):S(700)};
|
|
2986
2986
|
font-weight: 400;
|
|
2987
2987
|
text-align: left;
|
|
2988
|
-
`,
|
|
2988
|
+
`,QT=(e,t)=>i.css`
|
|
2989
2989
|
color: ${w("neutral",700)};
|
|
2990
|
-
font-size: ${
|
|
2991
|
-
line-height: ${
|
|
2990
|
+
font-size: ${ZT(e)?C(200):C(400)};
|
|
2991
|
+
line-height: ${ZT(e)?S(400):S(600)};
|
|
2992
2992
|
font-weight: 400;
|
|
2993
2993
|
margin-left: ${t?k(600):"0"};
|
|
2994
2994
|
text-align: left;
|
|
2995
|
-
`,
|
|
2995
|
+
`,eO=(e,t)=>i.css`
|
|
2996
2996
|
color: ${w("neutral",700)};
|
|
2997
|
-
font-size: ${
|
|
2998
|
-
line-height: ${
|
|
2997
|
+
font-size: ${ZT(e)?C(200):C(400)};
|
|
2998
|
+
line-height: ${ZT(e)?S(400):S(600)};
|
|
2999
2999
|
font-weight: 400;
|
|
3000
3000
|
margin-left: ${t?k(600):"0"};
|
|
3001
3001
|
text-align: left;
|
|
3002
|
-
`,
|
|
3002
|
+
`,tO=i.css`
|
|
3003
3003
|
background-color: ${w("neutral",100)};
|
|
3004
3004
|
border: ${M(100)} solid ${w("neutral",300)};
|
|
3005
3005
|
color: ${w("neutral",700)};
|
|
3006
|
-
`,
|
|
3006
|
+
`,nO=i.css`
|
|
3007
3007
|
background-color: ${w("neutral",200)};
|
|
3008
3008
|
border: ${M(100)} solid ${w("neutral",300)};
|
|
3009
3009
|
color: ${w("neutral",700)};
|
|
3010
|
-
`,
|
|
3010
|
+
`,rO=i.css`
|
|
3011
3011
|
background-color: ${w("success",100)};
|
|
3012
3012
|
border: ${M(100)} solid ${w("success",300)};
|
|
3013
3013
|
color: ${w("success",500)};
|
|
@@ -3015,7 +3015,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3015
3015
|
p {
|
|
3016
3016
|
color: ${w("success",900)};
|
|
3017
3017
|
}
|
|
3018
|
-
`,
|
|
3018
|
+
`,oO=i.css`
|
|
3019
3019
|
background-color: ${w("warning",100)};
|
|
3020
3020
|
border: ${M(100)} solid ${w("warning",300)};
|
|
3021
3021
|
color: ${w("warning",500)};
|
|
@@ -3023,7 +3023,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3023
3023
|
p {
|
|
3024
3024
|
color: ${w("warning",900)};
|
|
3025
3025
|
}
|
|
3026
|
-
`,
|
|
3026
|
+
`,iO=i.css`
|
|
3027
3027
|
background-color: ${w("error",100)};
|
|
3028
3028
|
border: ${M(100)} solid ${w("error",300)};
|
|
3029
3029
|
color: ${w("error",500)};
|
|
@@ -3031,52 +3031,52 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3031
3031
|
p {
|
|
3032
3032
|
color: ${w("error",900)};
|
|
3033
3033
|
}
|
|
3034
|
-
`,
|
|
3034
|
+
`,sO=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Kf,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,isButtonRight:l,buttonLeftIcon:c,buttonRightIcon:d,labels:u})=>{const h=Vf("InlineMessage",u);let p=tO;"info-grey"===n?p=nO:"success"===n?p=rO:"warning"===n?p=oO:"error"===n&&(p=iO);const f="error"===n||"warning"===n?"alert":"status",m="alert"===f?"assertive":"polite";return r.jsxs("div",{css:[JT(o,l),p],role:f,"aria-live":m,"aria-roledescription":h.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:XT,children:[i,"string"==typeof e?r.jsx("p",{css:YT(o),children:e}):r.jsx("div",{css:YT(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:QT(o,!!i),children:t}):t?r.jsx("div",{css:eO(o,!!i),children:t}):null]}),a?r.jsx(Bf,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o||"full-width"===o?"default":"small",onClick:s,leftIcon:c,rightIcon:d}):null]})},aO=i.css`
|
|
3035
3035
|
width: 100%;
|
|
3036
3036
|
min-height: calc(${k(1200)} * 12);
|
|
3037
3037
|
background-color: ${w("neutral",100)};
|
|
3038
3038
|
display: flex;
|
|
3039
3039
|
flex-direction: column;
|
|
3040
|
-
`,
|
|
3040
|
+
`,lO=i.css`
|
|
3041
3041
|
background-color: ${w("neutral",200)};
|
|
3042
3042
|
padding: ${k(300)};
|
|
3043
3043
|
display: flex;
|
|
3044
3044
|
align-items: center;
|
|
3045
3045
|
gap: ${k(300)};
|
|
3046
|
-
`,
|
|
3046
|
+
`,cO=i.css`
|
|
3047
3047
|
flex: 1;
|
|
3048
3048
|
|
|
3049
3049
|
.ds-text-input-container {
|
|
3050
3050
|
margin-bottom: 0;
|
|
3051
3051
|
}
|
|
3052
|
-
`,
|
|
3052
|
+
`,dO=i.css`
|
|
3053
3053
|
flex-shrink: 0;
|
|
3054
3054
|
color: ${w("neutral",700)};
|
|
3055
3055
|
font-size: ${C(400)};
|
|
3056
3056
|
font-style: normal;
|
|
3057
3057
|
font-weight: 400;
|
|
3058
|
-
`,
|
|
3058
|
+
`,uO=i.css`
|
|
3059
3059
|
flex: 1;
|
|
3060
3060
|
min-height: 0;
|
|
3061
3061
|
padding: ${k(400)};
|
|
3062
3062
|
display: flex;
|
|
3063
3063
|
flex-direction: column;
|
|
3064
3064
|
gap: ${k(300)};
|
|
3065
|
-
`,
|
|
3065
|
+
`,hO=i.css`
|
|
3066
3066
|
color: ${w("neutral",700)};
|
|
3067
3067
|
font-size: ${C(400)};
|
|
3068
3068
|
line-height: ${S(600)};
|
|
3069
3069
|
font-weight: 700;
|
|
3070
|
-
`,hO=i.css`
|
|
3071
|
-
width: 100%;
|
|
3072
3070
|
`,pO=i.css`
|
|
3071
|
+
width: 100%;
|
|
3072
|
+
`,fO=i.css`
|
|
3073
3073
|
flex: 1;
|
|
3074
3074
|
min-height: 0;
|
|
3075
3075
|
overflow-y: auto;
|
|
3076
3076
|
display: flex;
|
|
3077
3077
|
flex-direction: column;
|
|
3078
3078
|
gap: ${k(200)};
|
|
3079
|
-
`,
|
|
3079
|
+
`,mO=i.css`
|
|
3080
3080
|
background-color: ${w("neutral",200)};
|
|
3081
3081
|
border: ${M(100)} solid ${w("neutral",300)};
|
|
3082
3082
|
border-radius: ${$(300)};
|
|
@@ -3102,13 +3102,13 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3102
3102
|
&:active {
|
|
3103
3103
|
background-color: ${w("neutral",300)};
|
|
3104
3104
|
}
|
|
3105
|
-
`,
|
|
3105
|
+
`,gO=i.css`
|
|
3106
3106
|
display: flex;
|
|
3107
3107
|
flex: 1;
|
|
3108
3108
|
min-width: 0;
|
|
3109
3109
|
flex-direction: column;
|
|
3110
3110
|
gap: ${k(50)};
|
|
3111
|
-
`,
|
|
3111
|
+
`,bO=i.css`
|
|
3112
3112
|
color: ${w("neutral",900)};
|
|
3113
3113
|
font-size: ${C(300)};
|
|
3114
3114
|
line-height: ${S(500)};
|
|
@@ -3116,7 +3116,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3116
3116
|
overflow: hidden;
|
|
3117
3117
|
text-overflow: ellipsis;
|
|
3118
3118
|
white-space: nowrap;
|
|
3119
|
-
`,
|
|
3119
|
+
`,vO=i.css`
|
|
3120
3120
|
color: ${w("neutral",700)};
|
|
3121
3121
|
font-size: ${C(300)};
|
|
3122
3122
|
line-height: ${S(500)};
|
|
@@ -3124,7 +3124,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3124
3124
|
overflow: hidden;
|
|
3125
3125
|
text-overflow: ellipsis;
|
|
3126
3126
|
white-space: nowrap;
|
|
3127
|
-
`,
|
|
3127
|
+
`,yO=e=>i.css`
|
|
3128
3128
|
a,
|
|
3129
3129
|
p {
|
|
3130
3130
|
font-size: ${C("small"===e?200:400)};
|
|
@@ -3156,19 +3156,19 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3156
3156
|
a:hover {
|
|
3157
3157
|
text-decoration: underline;
|
|
3158
3158
|
}
|
|
3159
|
-
`,
|
|
3159
|
+
`,xO=e=>i.css`
|
|
3160
3160
|
svg {
|
|
3161
3161
|
height: ${k("small"===e?200:300)};
|
|
3162
3162
|
width: ${k("small"===e?200:300)};
|
|
3163
3163
|
color: ${w("neutral",600)};
|
|
3164
3164
|
}
|
|
3165
|
-
`,
|
|
3165
|
+
`,wO=i.css`
|
|
3166
3166
|
cursor: pointer;
|
|
3167
3167
|
color: ${w("neutral",600)};
|
|
3168
3168
|
display: flex;
|
|
3169
3169
|
justify-content: center;
|
|
3170
3170
|
align-items: center;
|
|
3171
|
-
`,
|
|
3171
|
+
`,CO=(e,t)=>i.css`
|
|
3172
3172
|
min-height: ${k(1400)};
|
|
3173
3173
|
width: 100vw;
|
|
3174
3174
|
position: ${e?"sticky":"absolute"};
|
|
@@ -3178,7 +3178,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3178
3178
|
border-top: ${M(100)} solid
|
|
3179
3179
|
${w("neutral",400)};
|
|
3180
3180
|
z-index: 101;
|
|
3181
|
-
`,
|
|
3181
|
+
`,kO=e=>i.css`
|
|
3182
3182
|
height: 100%;
|
|
3183
3183
|
width: 100%;
|
|
3184
3184
|
max-width: ${null!=e?u(e):"100%"};
|
|
@@ -3193,7 +3193,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3193
3193
|
flex-direction: column;
|
|
3194
3194
|
align-items: flex-start;
|
|
3195
3195
|
}
|
|
3196
|
-
`,
|
|
3196
|
+
`,SO=i.css`
|
|
3197
3197
|
display: flex;
|
|
3198
3198
|
align-items: center;
|
|
3199
3199
|
flex-wrap: wrap;
|
|
@@ -3206,7 +3206,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3206
3206
|
color: ${w("neutral",700)};
|
|
3207
3207
|
text-decoration: underline;
|
|
3208
3208
|
}
|
|
3209
|
-
|
|
3209
|
+
`,$O=i.css`
|
|
3210
3210
|
width: 15rem;
|
|
3211
3211
|
font-size: ${C(300)};
|
|
3212
3212
|
line-height: ${S(500)};
|
|
@@ -3217,17 +3217,17 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3217
3217
|
@media screen and (max-width: 48rem) {
|
|
3218
3218
|
text-align: left;
|
|
3219
3219
|
}
|
|
3220
|
-
|
|
3220
|
+
`,MO=i.css`
|
|
3221
3221
|
display: flex;
|
|
3222
3222
|
align-items: center;
|
|
3223
3223
|
gap: ${k(400)};
|
|
3224
|
-
`,
|
|
3224
|
+
`,jO=i.css`
|
|
3225
3225
|
width: 100%;
|
|
3226
3226
|
display: flex;
|
|
3227
3227
|
align-items: center;
|
|
3228
3228
|
height: ${k(1400)};
|
|
3229
3229
|
background-color: ${w("neutral",200)};
|
|
3230
|
-
`,
|
|
3230
|
+
`,EO=i.css`
|
|
3231
3231
|
height: ${k(1400)};
|
|
3232
3232
|
width: 99%;
|
|
3233
3233
|
background-color: ${w("neutral",200)};
|
|
@@ -3323,9 +3323,9 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3323
3323
|
opacity: 1;
|
|
3324
3324
|
}
|
|
3325
3325
|
}
|
|
3326
|
-
`,EO=i.css`
|
|
3327
|
-
position: relative;
|
|
3328
3326
|
`,TO=i.css`
|
|
3327
|
+
position: relative;
|
|
3328
|
+
`,OO=i.css`
|
|
3329
3329
|
position: absolute;
|
|
3330
3330
|
top: -0.3125rem;
|
|
3331
3331
|
right: -0.3125rem;
|
|
@@ -3340,7 +3340,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3340
3340
|
display: flex;
|
|
3341
3341
|
justify-content: center;
|
|
3342
3342
|
align-items: center;
|
|
3343
|
-
`,
|
|
3343
|
+
`,LO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),AO=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
|
|
3344
3344
|
max-height: ${s};
|
|
3345
3345
|
width: 100%;
|
|
3346
3346
|
background-color: ${n??w("neutral","dark"===r?800:100)};
|
|
@@ -3350,7 +3350,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3350
3350
|
z-index: 102;
|
|
3351
3351
|
border-bottom: ${M(100)} solid
|
|
3352
3352
|
${w("neutral",400)};
|
|
3353
|
-
`},
|
|
3353
|
+
`},RO=(e,t)=>i.css`
|
|
3354
3354
|
height: ${k(t?700:1200)};
|
|
3355
3355
|
width: 100%;
|
|
3356
3356
|
background-color: ${w("neutral","dark"===e?800:100)};
|
|
@@ -3361,7 +3361,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3361
3361
|
justify-content: flex-start;
|
|
3362
3362
|
gap: 0;
|
|
3363
3363
|
padding: ${t?0:`${k(200)} ${k(400)}`};
|
|
3364
|
-
`,
|
|
3364
|
+
`,NO=(e,t,n)=>i.css`
|
|
3365
3365
|
height: ${k(n?700:1200)};
|
|
3366
3366
|
width: 100%;
|
|
3367
3367
|
max-width: ${t?u(t):"100%"};
|
|
@@ -3372,13 +3372,13 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3372
3372
|
justify-content: space-between;
|
|
3373
3373
|
margin: 0 auto;
|
|
3374
3374
|
padding: ${n?0:`${k(200)} ${k(400)}`};
|
|
3375
|
-
`,
|
|
3375
|
+
`,DO=(e,t)=>i.css`
|
|
3376
3376
|
display: flex;
|
|
3377
3377
|
margin: ${t?"-0.0625rem":"0rem"};
|
|
3378
3378
|
justify-content: flex-start;
|
|
3379
3379
|
gap: ${k(300)};
|
|
3380
3380
|
color: ${w("neutral",e?100:900)};
|
|
3381
|
-
`,
|
|
3381
|
+
`,IO=i.css`
|
|
3382
3382
|
outline: none;
|
|
3383
3383
|
|
|
3384
3384
|
a {
|
|
@@ -3390,12 +3390,12 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3390
3390
|
outline-width: ${k(50)};
|
|
3391
3391
|
}
|
|
3392
3392
|
}
|
|
3393
|
-
`,
|
|
3393
|
+
`,PO=e=>i.css`
|
|
3394
3394
|
display: ${e?"none":"flex"};
|
|
3395
3395
|
align-items: center;
|
|
3396
3396
|
justify-content: flex-start;
|
|
3397
3397
|
gap: 0rem;
|
|
3398
|
-
`,
|
|
3398
|
+
`,zO=(e,t,n)=>i.css`
|
|
3399
3399
|
font-size: ${C(n?300:400)};
|
|
3400
3400
|
line-height: ${S(600)};
|
|
3401
3401
|
font-weight: 400;
|
|
@@ -3420,12 +3420,12 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3420
3420
|
font-weight: 700;
|
|
3421
3421
|
color: ${w("accessible","controls-on-neutral-lights")};
|
|
3422
3422
|
`:""}
|
|
3423
|
-
`,
|
|
3423
|
+
`,VO=e=>i.css`
|
|
3424
3424
|
height: ${k(e?700:1200)};
|
|
3425
3425
|
display: flex;
|
|
3426
3426
|
align-items: center;
|
|
3427
3427
|
justify-content: flex-end;
|
|
3428
|
-
`,
|
|
3428
|
+
`,BO=e=>i.css`
|
|
3429
3429
|
height: 100%;
|
|
3430
3430
|
font-size: ${C(400)};
|
|
3431
3431
|
line-height: ${S(600)};
|
|
@@ -3445,7 +3445,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3445
3445
|
}
|
|
3446
3446
|
}
|
|
3447
3447
|
`:""}
|
|
3448
|
-
`,
|
|
3448
|
+
`,HO=e=>i.css`
|
|
3449
3449
|
height: 100%;
|
|
3450
3450
|
display: flex;
|
|
3451
3451
|
align-items: center;
|
|
@@ -3454,7 +3454,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3454
3454
|
padding-left: ${k(400)};
|
|
3455
3455
|
border-left: ${M(100)} solid
|
|
3456
3456
|
${w("neutral",e?700:300)};
|
|
3457
|
-
`,
|
|
3457
|
+
`,_O=(e="light",t)=>i.css`
|
|
3458
3458
|
background-color: none;
|
|
3459
3459
|
border: none;
|
|
3460
3460
|
cursor: pointer;
|
|
@@ -3480,7 +3480,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3480
3480
|
outline-width: ${M(200)};
|
|
3481
3481
|
background-color: ${w("neutral",200)};
|
|
3482
3482
|
}
|
|
3483
|
-
`,
|
|
3483
|
+
`,FO=(e,t)=>i.css`
|
|
3484
3484
|
position: absolute;
|
|
3485
3485
|
top: ${k(t?700:1200)};
|
|
3486
3486
|
right: 0;
|
|
@@ -3495,10 +3495,10 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3495
3495
|
justify-content: flex-start;
|
|
3496
3496
|
gap: ${k(400)};
|
|
3497
3497
|
transition: width 0.5s ease-in-out;
|
|
3498
|
-
`,
|
|
3498
|
+
`,qO=i.css`
|
|
3499
3499
|
height: 100%;
|
|
3500
3500
|
width: 100%;
|
|
3501
|
-
`,
|
|
3501
|
+
`,WO=e=>i.css`
|
|
3502
3502
|
background-color: ${w("neutral","dark"===e?800:200)};
|
|
3503
3503
|
border-bottom: ${M(100)} solid
|
|
3504
3504
|
${w("neutral",300)};
|
|
@@ -3519,13 +3519,13 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3519
3519
|
margin-left: -${k(300)};
|
|
3520
3520
|
}
|
|
3521
3521
|
}
|
|
3522
|
-
`,WO=i.css`
|
|
3523
|
-
background-color: ${w("neutral",100)};
|
|
3524
3522
|
`,UO=i.css`
|
|
3523
|
+
background-color: ${w("neutral",100)};
|
|
3524
|
+
`,KO=i.css`
|
|
3525
3525
|
min-height: 100vh;
|
|
3526
3526
|
width: 100%;
|
|
3527
3527
|
overflow-y: scroll;
|
|
3528
|
-
`;i.css``;const
|
|
3528
|
+
`;i.css``;const GO=e=>i.css`
|
|
3529
3529
|
display: inline-block;
|
|
3530
3530
|
width: 100%;
|
|
3531
3531
|
padding: ${k(300)} ${k(400)};
|
|
@@ -3554,7 +3554,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3554
3554
|
outline-width: ${M(200)};
|
|
3555
3555
|
background-color: ${w("neutral",200)};
|
|
3556
3556
|
}
|
|
3557
|
-
`,
|
|
3557
|
+
`,ZO=i.css`
|
|
3558
3558
|
width: 100%;
|
|
3559
3559
|
padding: ${k(300)} ${k(400)};
|
|
3560
3560
|
display: flex;
|
|
@@ -3578,7 +3578,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3578
3578
|
outline-width: ${M(200)};
|
|
3579
3579
|
background-color: ${w("neutral",200)};
|
|
3580
3580
|
}
|
|
3581
|
-
`,
|
|
3581
|
+
`,JO=e=>i.css`
|
|
3582
3582
|
position: absolute;
|
|
3583
3583
|
top: 0rem;
|
|
3584
3584
|
right: 0;
|
|
@@ -3590,7 +3590,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3590
3590
|
align-items: flex-start;
|
|
3591
3591
|
justify-content: flex-start;
|
|
3592
3592
|
transition: width 0.5s ease-in-out;
|
|
3593
|
-
`,
|
|
3593
|
+
`,XO=i.css`
|
|
3594
3594
|
height: ${k(1200)};
|
|
3595
3595
|
width: 100%;
|
|
3596
3596
|
display: flex;
|
|
@@ -3602,7 +3602,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3602
3602
|
position: relative;
|
|
3603
3603
|
top: 0;
|
|
3604
3604
|
left: 0;
|
|
3605
|
-
`,
|
|
3605
|
+
`,YO=i.css`
|
|
3606
3606
|
position: absolute;
|
|
3607
3607
|
bottom: 0;
|
|
3608
3608
|
left: 0;
|
|
@@ -3617,7 +3617,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3617
3617
|
button {
|
|
3618
3618
|
width: calc(48% - 1.5rem);
|
|
3619
3619
|
}
|
|
3620
|
-
`,
|
|
3620
|
+
`,QO=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),b=n.useRef(null),v=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:FO(l,h),children:l&&r.jsxs("div",{css:qO,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:WO(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:UO,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:GO(d===e.link),children:e.label},e.label):r.jsxs("button",{css:ZO,type:"button",ref:e=>{v.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{b.current?.focus()}),100))},children:[e.label,e.items?r.jsx(Gf,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:YO,children:s.map((e=>r.jsx(Bf,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:JO(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:XO,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),v.current[m]?.focus()},"aria-label":u.goBackLabel,css:_O(e),ref:b,children:[r.jsx(Gf,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:_O(e),children:[u.closeButtonText,r.jsx(Jf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:KO,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:GO(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},eL=1023,tL=i.css`
|
|
3621
3621
|
width: ${k(1600)};
|
|
3622
3622
|
height: 100%;
|
|
3623
3623
|
z-index: 100;
|
|
@@ -3627,7 +3627,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3627
3627
|
display: flex;
|
|
3628
3628
|
flex-direction: column;
|
|
3629
3629
|
justify-content: space-between;
|
|
3630
|
-
`,
|
|
3630
|
+
`,nL=i.css`
|
|
3631
3631
|
width: ${k(1600)};
|
|
3632
3632
|
height: ${k(1600)};
|
|
3633
3633
|
background-color: ${w("neutral",200)};
|
|
@@ -3718,7 +3718,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3718
3718
|
}
|
|
3719
3719
|
}
|
|
3720
3720
|
}
|
|
3721
|
-
`,
|
|
3721
|
+
`,rL=i.css`
|
|
3722
3722
|
display: flex;
|
|
3723
3723
|
justify-content: center;
|
|
3724
3724
|
align-items: center;
|
|
@@ -3731,7 +3731,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3731
3731
|
fill: ${w("neutral",600)};
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
3734
|
-
`,
|
|
3734
|
+
`,oL=i.css`
|
|
3735
3735
|
width: ${k(1600)};
|
|
3736
3736
|
height: ${k(1600)};
|
|
3737
3737
|
background-color: ${w("neutral",200)};
|
|
@@ -3769,7 +3769,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3769
3769
|
text-align: center;
|
|
3770
3770
|
color: ${w("neutral",600)};
|
|
3771
3771
|
}
|
|
3772
|
-
`,
|
|
3772
|
+
`,iL=i.css`
|
|
3773
3773
|
width: 20rem;
|
|
3774
3774
|
height: 100%;
|
|
3775
3775
|
z-index: 100;
|
|
@@ -3779,7 +3779,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3779
3779
|
overflow-x: hidden;
|
|
3780
3780
|
border-right: ${M(100)} solid
|
|
3781
3781
|
${w("neutral",300)};
|
|
3782
|
-
`,
|
|
3782
|
+
`,sL=e=>i.css`
|
|
3783
3783
|
width: 100%;
|
|
3784
3784
|
display: flex;
|
|
3785
3785
|
align-items: center;
|
|
@@ -3788,7 +3788,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3788
3788
|
${"view"===e&&`\n border: ${M(100)} solid ${w("neutral",400)};\n background-color: ${w("neutral",200)};\n border-radius: ${$(300)};\n padding: ${k(100)};\n `}
|
|
3789
3789
|
|
|
3790
3790
|
${"transparent"===e&&`\n border: none;\n background-color: transparent;\n border-radius: ${$(300)};\n padding: 0 ${k(400)};\n\n .chakra-tabs__list {\n gap: ${k(800)};\n }\n `}
|
|
3791
|
-
`,
|
|
3791
|
+
`,aL=i.css`
|
|
3792
3792
|
width: 99%;
|
|
3793
3793
|
height: ${k(1e3)};
|
|
3794
3794
|
padding: ${k(200)} ${k(400)};
|
|
@@ -3804,7 +3804,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3804
3804
|
&:focus-visible {
|
|
3805
3805
|
box-shadow: none;
|
|
3806
3806
|
}
|
|
3807
|
-
`,
|
|
3807
|
+
`,lL=i.css`
|
|
3808
3808
|
background-color: ${w("neutral",200)};
|
|
3809
3809
|
color: ${w("neutral",700)};
|
|
3810
3810
|
|
|
@@ -3861,11 +3861,11 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3861
3861
|
opacity: 1;
|
|
3862
3862
|
}
|
|
3863
3863
|
}
|
|
3864
|
-
`,
|
|
3864
|
+
`,cL=i.css`
|
|
3865
3865
|
width: ${k(100)};
|
|
3866
3866
|
height: ${k(600)};
|
|
3867
3867
|
background-color: ${w("neutral",400)};
|
|
3868
|
-
`,
|
|
3868
|
+
`,dL=i.css`
|
|
3869
3869
|
height: ${k(800)};
|
|
3870
3870
|
border-radius: ${$(200)};
|
|
3871
3871
|
background-color: ${w("neutral",200)};
|
|
@@ -3940,7 +3940,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3940
3940
|
opacity: 1;
|
|
3941
3941
|
}
|
|
3942
3942
|
}
|
|
3943
|
-
`,
|
|
3943
|
+
`,uL=i.css`
|
|
3944
3944
|
background-color: transparent;
|
|
3945
3945
|
color: ${w("neutral",600)};
|
|
3946
3946
|
width: auto;
|
|
@@ -4017,7 +4017,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4017
4017
|
}
|
|
4018
4018
|
}
|
|
4019
4019
|
}
|
|
4020
|
-
`,
|
|
4020
|
+
`,hL=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),pL=e=>1===e?"none":2===e?"left":"right",fL=w("neutral",700),mL=i.css`
|
|
4021
4021
|
position: relative;
|
|
4022
4022
|
width: 100%;
|
|
4023
4023
|
|
|
@@ -4030,12 +4030,12 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4030
4030
|
&[data-open='true'][data-placement='top'] input {
|
|
4031
4031
|
border-bottom-left-radius: ${$(300)};
|
|
4032
4032
|
border-bottom-right-radius: ${$(300)};
|
|
4033
|
-
border-bottom-color: ${
|
|
4033
|
+
border-bottom-color: ${fL};
|
|
4034
4034
|
border-top-left-radius: 0;
|
|
4035
4035
|
border-top-right-radius: 0;
|
|
4036
4036
|
border-top-color: transparent;
|
|
4037
4037
|
}
|
|
4038
|
-
`,
|
|
4038
|
+
`,gL=i.css`
|
|
4039
4039
|
width: 100%;
|
|
4040
4040
|
z-index: 1000;
|
|
4041
4041
|
overflow-y: auto;
|
|
@@ -4049,7 +4049,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4049
4049
|
margin-top: calc(${M(100)} * -1);
|
|
4050
4050
|
border-top-left-radius: 0;
|
|
4051
4051
|
border-top-right-radius: 0;
|
|
4052
|
-
border-top: ${M(100)} solid ${
|
|
4052
|
+
border-top: ${M(100)} solid ${fL};
|
|
4053
4053
|
|
|
4054
4054
|
&[data-placement^='top'] {
|
|
4055
4055
|
margin-top: 0;
|
|
@@ -4060,12 +4060,12 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4060
4060
|
${w("neutral",400)};
|
|
4061
4061
|
border-bottom-left-radius: 0;
|
|
4062
4062
|
border-bottom-right-radius: 0;
|
|
4063
|
-
border-bottom: ${M(100)} solid ${
|
|
4063
|
+
border-bottom: ${M(100)} solid ${fL};
|
|
4064
4064
|
box-shadow:
|
|
4065
4065
|
0 -0.25rem 0.375rem -0.25rem #0000001a,
|
|
4066
4066
|
0 -0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
4067
4067
|
}
|
|
4068
|
-
`,
|
|
4068
|
+
`,bL=i.css`
|
|
4069
4069
|
padding: ${k(200)};
|
|
4070
4070
|
border-radius: ${$(300)};
|
|
4071
4071
|
cursor: pointer;
|
|
@@ -4086,7 +4086,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4086
4086
|
&:active {
|
|
4087
4087
|
background-color: ${kf(40)};
|
|
4088
4088
|
}
|
|
4089
|
-
`,
|
|
4089
|
+
`,vL=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),o=e.split(n);return r.jsx(r.Fragment,{children:o.map((e=>n.test(e)?r.jsx("strong",{children:e},e):r.jsx("span",{children:e},e)))})},yL=({items:t,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),r.jsx(e.Box,{ref:a,padding:"0.5rem",children:t.map(((t,n)=>{const a=t.searchLabel||("string"==typeof t.label||"number"==typeof t.label?String(t.label):"");return r.jsx(e.Box,{css:bL,"data-highlighted":n===s||void 0,onClick:()=>i(t.id||a),children:"string"==typeof t.label||"number"==typeof t.label?r.jsx(vL,{text:String(t.label),query:o}):t.label},t.id)}))})},xL=e=>e.searchLabel?e.searchLabel:"string"==typeof e.label||"number"==typeof e.label?String(e.label):"",wL={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function CL(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&wL[e]?wL[e]:wL.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r||s,l=r&&n?"opacity: 0.7;":"",c=n?w("neutral",400):w("primary",800),d=n?w("neutral",400):w("primary",800);return i.css`
|
|
4090
4090
|
height: ${o};
|
|
4091
4091
|
width: ${o};
|
|
4092
4092
|
border-radius: 50%;
|
|
@@ -4121,20 +4121,20 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4121
4121
|
background-color: ${w("primary",500)};
|
|
4122
4122
|
}
|
|
4123
4123
|
}
|
|
4124
|
-
`}const
|
|
4124
|
+
`}const kL=i.css`
|
|
4125
4125
|
font-size: ${C(200)};
|
|
4126
4126
|
line-height: ${S(400)};
|
|
4127
4127
|
font-weight: 700;
|
|
4128
4128
|
color: inherit;
|
|
4129
|
-
`,
|
|
4129
|
+
`,SL={small:{fontSize:h(8),boxSize:h(10),padding:h(2)},large:{fontSize:h(12),boxSize:h(20),padding:`${h(2)} ${h(4)}`}},$L=i.css`
|
|
4130
4130
|
display: flex;
|
|
4131
4131
|
justify-content: flex-start;
|
|
4132
4132
|
align-items: center;
|
|
4133
4133
|
gap: ${k(200)};
|
|
4134
|
-
|
|
4134
|
+
`,ML=e=>i.css`
|
|
4135
4135
|
position: relative;
|
|
4136
4136
|
display: flex;
|
|
4137
|
-
`,
|
|
4137
|
+
`,jL=(e="large")=>{const t=k("small"===e?100:200);return i.css`
|
|
4138
4138
|
height: ${t};
|
|
4139
4139
|
width: ${t};
|
|
4140
4140
|
background-color: ${w("error",500)};
|
|
@@ -4143,7 +4143,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4143
4143
|
top: 0rem;
|
|
4144
4144
|
right: 0rem;
|
|
4145
4145
|
z-index: 1;
|
|
4146
|
-
`},
|
|
4146
|
+
`},EL=(e="large")=>{const{boxSize:t,padding:n}=SL[e];return i.css`
|
|
4147
4147
|
background-color: ${w("error",500)};
|
|
4148
4148
|
padding: ${n};
|
|
4149
4149
|
border-radius: 9999px;
|
|
@@ -4158,12 +4158,12 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4158
4158
|
min-width: ${t};
|
|
4159
4159
|
height: ${t};
|
|
4160
4160
|
z-index: 1;
|
|
4161
|
-
`},
|
|
4161
|
+
`},TL=(e="large")=>{const{fontSize:t}=SL[e];return i.css`
|
|
4162
4162
|
font-size: ${t};
|
|
4163
4163
|
line-height: 1;
|
|
4164
4164
|
font-weight: 700;
|
|
4165
4165
|
color: ${w("error",100)};
|
|
4166
|
-
`},
|
|
4166
|
+
`},OL=(e="large")=>{const{boxSize:t}=SL[e];return i.css`
|
|
4167
4167
|
height: ${t};
|
|
4168
4168
|
min-width: ${t};
|
|
4169
4169
|
background-color: ${w("error",500)};
|
|
@@ -4172,12 +4172,12 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4172
4172
|
justify-content: center;
|
|
4173
4173
|
align-items: center;
|
|
4174
4174
|
padding: 0rem ${k(100)} 0.0625rem ${k(100)};
|
|
4175
|
-
`},
|
|
4175
|
+
`},LL=(e="large")=>{const{fontSize:t}=SL[e];return i.css`
|
|
4176
4176
|
font-size: ${t};
|
|
4177
4177
|
line-height: ${S(600)};
|
|
4178
4178
|
font-weight: 700;
|
|
4179
4179
|
color: ${w("error",100)};
|
|
4180
|
-
`},
|
|
4180
|
+
`},AL=({hasNotification:e,notificationCount:t,label:o,labels:i,children:s,size:a="large"})=>{const l=Vf("Badge",i),[c,d]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?d(!0):d(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const u=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})(),h="small"===a?"1rem":"1.5rem";return c&&null==s?r.jsxs("div",{css:$L,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:ML(),children:[r.jsx(om,{color:"currentColor",height:h,width:h}),!e||t||o?null:r.jsx("div",{css:jL(a),"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,u.length>0?r.jsx("div",{css:OL(a),children:r.jsx("p",{css:LL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null]}):r.jsxs("div",{css:$L,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:ML(),children:[u.length>0?r.jsx("div",{css:EL(a),children:r.jsx("p",{css:TL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null,e&&!t?r.jsx("div",{css:jL(a),"aria-hidden":!0}):null,s??r.jsx(om,{color:"currentColor",height:h,width:h})]})]})},RL=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:i,src:s,srcSet:a,onClick:l,notificationCount:c,badgeSize:d="large",disabled:u=!1,customBackgroundColor:h="",labels:p},f)=>{const m=Vf("Avatar",p),g=()=>{u||l?.()},b=!!s||!!a,v=!!l&&!u,y=!!c&&c>0,x=r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:f,css:CL(o,i,u,h),onClick:g,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g())},role:v?"button":"img",tabIndex:v?0:void 0,"aria-disabled":l?u:void 0,children:[b&&r.jsx(e.Avatar.Image,{src:s,srcSet:a,alt:n||t||"Avatar image"}),!b&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:kL}),!b&&!t&&r.jsx(wm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):w("primary",800)}})]});return y?r.jsx(AL,{notificationCount:c,size:d,labels:{unreadMessagesLabel:m.unreadMessagesLabel},children:x}):x})),NL=(e,t="full-width",n=!1)=>{let r="",o="",s="";return"success"===e?(r=w("success",100),o=w("success",500),s=w("success",300)):"warning"===e?(r=w("warning",100),o=w("warning",500),s=w("warning",300)):"error"===e?(r=w("error",100),o=w("error",500),s=w("error",300)):"information"===e?(r=w("secondary",100),o=w("secondary",500),s=w("secondary",200)):"general-grey"===e?(r=w("neutral",200),o=w("neutral",700),s=w("neutral",300)):(r=w("neutral",100),o=w("neutral",700),s=w("neutral",300)),i.css`
|
|
4181
4181
|
display: ${"inline"===t?"inline-flex":"flex"};
|
|
4182
4182
|
width: ${"inline"===t?"fit-content":"100%"};
|
|
4183
4183
|
max-width: 100%;
|
|
@@ -4188,38 +4188,38 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4188
4188
|
background-color: ${r};
|
|
4189
4189
|
border-bottom: ${M(100)} solid ${s};
|
|
4190
4190
|
border-radius: 0;
|
|
4191
|
-
`},
|
|
4191
|
+
`},DL=e=>i.css`
|
|
4192
4192
|
rotate: ${"error"===e?"180deg":""};
|
|
4193
4193
|
svg {
|
|
4194
4194
|
width: 1rem;
|
|
4195
4195
|
height: 1rem;
|
|
4196
4196
|
}
|
|
4197
|
-
`,
|
|
4197
|
+
`,IL=l.forwardRef((({title:t,children:n,icon:o,variant:i,onClose:s,labels:a,isCentered:c=!1,width:d="full-width"},u)=>{const h=Vf("AlertBanner",a),[p,f]=l.useState(!0),m="success"===i?r.jsx(em,{}):"warning"===i?r.jsx(tm,{}):r.jsx(Kf,{});return p?r.jsxs(e.Alert.Root,{css:NL(i,d,c),children:[r.jsx(e.Alert.Indicator,{css:DL(i),children:o||m}),n?r.jsx(e.Alert.Content,{flex:c?"initial":void 0,children:r.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[r.jsx(e.Alert.Title,{children:t}),r.jsx(e.Alert.Description,{children:n})]})}):r.jsx(e.Alert.Title,{flex:c?"initial":"1",children:t}),r.jsx(kg,{"aria-label":h.closeAlertLabel,pos:"absolute",top:"1rem",insetEnd:"2",onClick:()=>{f(!1),s?.()}})]}):null})),PL=i.css`
|
|
4198
4198
|
height: ${k(200)};
|
|
4199
4199
|
width: 100%;
|
|
4200
4200
|
background-color: ${w("neutral",300)};
|
|
4201
4201
|
display: flex;
|
|
4202
4202
|
align-items: center;
|
|
4203
4203
|
justify-content: flex-start;
|
|
4204
|
-
`,
|
|
4204
|
+
`,zL=(e,t)=>i.css`
|
|
4205
4205
|
height: 100%;
|
|
4206
4206
|
width: ${e}%;
|
|
4207
4207
|
background-color: ${t??w("primary",500)};
|
|
4208
4208
|
transition: width 0.5s ease-in-out;
|
|
4209
|
-
`,
|
|
4209
|
+
`,VL=i.css`
|
|
4210
4210
|
width: 100%;
|
|
4211
4211
|
display: flex;
|
|
4212
4212
|
align-items: center;
|
|
4213
4213
|
justify-content: space-between;
|
|
4214
4214
|
position: relative;
|
|
4215
|
-
`,
|
|
4215
|
+
`,BL=i.css`
|
|
4216
4216
|
height: 3.75rem;
|
|
4217
4217
|
width: ${k(2e3)};
|
|
4218
4218
|
display: flex;
|
|
4219
4219
|
flex-direction: column;
|
|
4220
4220
|
align-items: center;
|
|
4221
4221
|
justify-content: space-between;
|
|
4222
|
-
`,
|
|
4222
|
+
`,HL=(e,t)=>i.css`
|
|
4223
4223
|
height: ${k(800)};
|
|
4224
4224
|
width: ${k(800)};
|
|
4225
4225
|
display: flex;
|
|
@@ -4255,12 +4255,12 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4255
4255
|
}
|
|
4256
4256
|
|
|
4257
4257
|
${t?`\n background-color: ${w("neutral",300)};\n \n &:hover {\n background-color: ${w("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
4258
|
-
`,
|
|
4258
|
+
`,_L=e=>i.css`
|
|
4259
4259
|
color: ${w("neutral",e?800:600)};
|
|
4260
4260
|
font-size: ${C(300)};
|
|
4261
4261
|
line-height: ${S(500)};
|
|
4262
4262
|
font-weight: 400;
|
|
4263
|
-
`,
|
|
4263
|
+
`,FL=i.css`
|
|
4264
4264
|
height: ${M(100)};
|
|
4265
4265
|
width: 100%;
|
|
4266
4266
|
padding: 0 1.875rem;
|
|
@@ -4268,25 +4268,25 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4268
4268
|
top: ${k(400)};
|
|
4269
4269
|
left: 0;
|
|
4270
4270
|
z-index: -1;
|
|
4271
|
-
`,
|
|
4271
|
+
`,qL=i.css`
|
|
4272
4272
|
height: ${M(100)};
|
|
4273
4273
|
width: 100%;
|
|
4274
4274
|
background-color: ${w("neutral",400)};
|
|
4275
|
-
`,
|
|
4275
|
+
`,WL=i.css`
|
|
4276
4276
|
font-size: ${C(500)};
|
|
4277
4277
|
line-height: ${S(700)};
|
|
4278
4278
|
font-weight: 400;
|
|
4279
4279
|
color: ${w("neutral",800)};
|
|
4280
|
-
`,
|
|
4280
|
+
`,UL=i.css`
|
|
4281
4281
|
font-size: ${C(400)};
|
|
4282
4282
|
line-height: ${S(600)};
|
|
4283
4283
|
font-weight: 400;
|
|
4284
4284
|
color: ${w("neutral",700)};
|
|
4285
|
-
`,UL=i.css`
|
|
4286
|
-
padding: 0.375rem;
|
|
4287
4285
|
`,KL=i.css`
|
|
4288
4286
|
padding: 0.375rem;
|
|
4289
|
-
`,GL=
|
|
4287
|
+
`,GL=i.css`
|
|
4288
|
+
padding: 0.375rem;
|
|
4289
|
+
`,ZL={pauseOnPageIdle:!0,offsets:"1.5rem"},JL={"top-start":e.createToaster({placement:"top-start",...ZL}),top:e.createToaster({placement:"top",...ZL}),"top-end":e.createToaster({placement:"top-end",...ZL}),"bottom-start":e.createToaster({placement:"bottom-start",...ZL}),bottom:e.createToaster({placement:"bottom",...ZL}),"bottom-end":e.createToaster({placement:"bottom-end",...ZL})};exports.AlertBanner=IL,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Vf("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:MC,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:EC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:jC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Bf,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(Gf,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:TC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:TC,children:i})]})})},exports.Avatar=RL,exports.Badge=AL,exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Vf("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),r.jsx("div",{ref:p,css:Rv(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:Nv,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:Dv,children:[o?r.jsx("div",{css:Iv,children:o.map((e=>r.jsxs("div",{children:[r.jsx(lb,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:Pv,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:zv,children:s.map((e=>{return r.jsxs("div",{css:Vv(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
|
|
4290
4290
|
height: ${k(800)};
|
|
4291
4291
|
width: ${k(800)};
|
|
4292
4292
|
border: ${M(100)} solid ${w("neutral",300)};
|
|
@@ -4294,7 +4294,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4294
4294
|
background-image: url(${t});
|
|
4295
4295
|
background-size: cover;
|
|
4296
4296
|
background-position: center;
|
|
4297
|
-
`)}),r.jsxs("div",{css:Bv,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(hv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Wf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:
|
|
4297
|
+
`)}),r.jsxs("div",{css:Bv,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(hv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Wf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:yO(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:xO(a),children:o||r.jsx(Gf,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:wO,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:xO(a),children:o||r.jsx(Gf,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:yO(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:yO(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:xO(a),children:o||r.jsx(Gf,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Bf,exports.Checkbox=lb,exports.CheckboxList=({label:e,caption:t,checkboxes:o,defaultValues:i,onCheckedChange:s,errorMessage:a,horizontal:l,required:c,hideCheckedCounter:d=!1,hideExpandToggle:u=!1,labels:h})=>{const p=Vf("CheckboxList",h),f=Array.isArray(i)?i:[],m=n.useMemo((()=>new Set(f)),[f]),[g,b]=n.useState((()=>o.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:m.has(n),e}),{}))),[v,y]=n.useState(!0);n.useEffect((()=>{b((e=>{const t=o.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??m.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[o,m]);const x="string"!=typeof e,w=o.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!g[n],e}),{}),C=o.length>0&&o.every((e=>e.name&&w[e.name])),k=o.some((e=>e.name&&w[e.name]))&&!C,S=o.length,$=`${o.filter((e=>e?.name&&w[e.name])).length} / ${S}`,M=t?`${t}.`:"",j=c?p.requiredLabel:p.optionalLabel,E=a?`${p.errorPrefix} ${a}.`:"",T=`${x?e.label:e}. ${M} ${j} ${E} `,O="string"==typeof e?e:r.jsxs("div",{css:Ub,children:[r.jsxs(lb,{checked:C,indeterminate:k,onCheckedChange:e=>(e=>{const t=o.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});b(t),s?.(t)})(!!e.checked),children:[e.label," ",!d&&r.jsx("span",{"aria-hidden":"true",css:Fb,children:$})]}),!u&&r.jsxs("button",{type:"button",onClick:()=>y((e=>!e)),"aria-expanded":v,"aria-controls":"checkbox-list",css:qb,children:[v?p.hideLabel:p.expandLabel,r.jsx("span",{"aria-hidden":"true",css:Wb(v),children:r.jsx(Gf,{})})]})]});return r.jsx(sg,{label:O,caption:t,errorMessage:a,required:"string"==typeof e&&c,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:p.requiredSymbolLabel},containerProps:{"aria-label":T},children:r.jsx("div",{id:"checkbox-list",css:Bb(v),children:r.jsx("div",{css:Hb,children:r.jsx("div",{css:_b(l),children:o.map((e=>{const{onCheckedChange:t,...n}=e;return r.jsx(lb,{ms:x&&!l?"6":"",css:{},checked:!!e?.name&&!!w[e.name],onCheckedChange:({checked:n})=>{((e,t)=>{const n={...g};t&&(n[t]=e,b(n)),s&&s(n)})(n,e.name),t?.({checked:!!n})},...n},e.name)}))})})})})},exports.CheckboxOptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.CheckboxGroup,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((n=>{return r.jsxs(e.CheckboxCard.Root,{css:cb,defaultChecked:-1!==t?.indexOf(n.value),disabled:n.disabled,value:n.value,children:[r.jsx(e.CheckboxCard.HiddenInput,{}),r.jsxs(e.CheckboxCard.Control,{css:db,children:[r.jsxs(e.CheckboxCard.Content,{css:(s=n.variant,i.css`
|
|
4298
4298
|
width: 100%;
|
|
4299
4299
|
display: flex;
|
|
4300
4300
|
flex-direction: ${"centered"===s?"column":"row"};
|
|
@@ -4335,7 +4335,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4335
4335
|
0 -0.25rem 0.375rem -0.25rem #0000001a,
|
|
4336
4336
|
0 -0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
4337
4337
|
}
|
|
4338
|
-
`),"data-nav-source":A,onPointerMove:N,children:[r.jsx(e.Combobox.Empty,{children:y.noItemsFoundLabel}),C.items.map((t=>r.jsxs(e.Combobox.Item,{css:Lv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g?r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:b.map((e=>r.jsx(hv,{label:e.label,variant:"info-white",onClose:()=>v((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))}):null]})});var D},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(j.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:SC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:$C,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=sg,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:wO(n,o),children:r.jsxs("div",{css:CO(i),children:[r.jsxs("div",{css:$O,children:[r.jsx(rm,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:kO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:SO,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:rb,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:ib}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:ob,children:e}):null,t?r.jsx("p",{id:a,css:sb,children:t}):null,o]})]})},exports.IconButton=_f,exports.InlineMessage=iO,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Kb,children:r.jsx(sg,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Gb(!!i,a),attached:!0,children:["start"===a?r.jsx(mv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(mg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(mv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=Kw,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:iw,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:sw,children:[t,r.jsx(hv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:aw,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx($b,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(pw,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:ow,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=pw,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:fw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:mw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:gw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:bw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:vw,children:[r.jsx("div",{css:yw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:xw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:ww,children:e}),r.jsx("p",{css:Cw,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Jf,{}),onClick:s})]}),a,r.jsxs("div",{css:kw,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Ew,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=nC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(im,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(sm,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(am,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(lm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(cm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(dm,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(um,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Zg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=_v,exports.MapMarkers=Fv,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Vf("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:b,context:v,middlewareData:y,placement:x}=Zx({open:e,onOpenChange:t,placement:c,whileElementsMounted:bx,middleware:[Tx(d),(w={fallbackAxisSideDirection:"start"},{...xx(w),options:[w,C]}),Ox({padding:8}),Lx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=qx(),b=Jy("function"==typeof c?c:()=>!1),v="function"==typeof c?b:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Kx(f),{escapeKey:C,outsidePress:k}=Kx(m),S=l.useRef(!1),$=Jy((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Ky(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),M=Jy((e=>{var t;const n=()=>{var t;$(e),null==(t=qy(e))||t.removeEventListener("keydown",n)};null==(t=qy(e))||t.addEventListener("keydown",n)})),j=Jy((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof v&&!v(e))return;const a=qy(e),l="[data-floating-ui-inert]",c=Uy(o.floating).querySelectorAll(l);let u=Zv(a)?a:null;for(;u&&!dy(u);){const e=py(u);if(dy(e)||!Zv(e))break;u=e}if(c.length&&Zv(a)&&!a.matches("html,body")&&!Fy(a,o.floating)&&Array.from(c).every((e=>!Fy(u,e))))return;if(Jv(a)&&O){const t=dy(a),n=uy(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Ky(g.nodesRef.current,h).some((t=>{var n;return Wy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Wy(e,o.floating)||Wy(e,o.domReference)||p)return;const f=g?Ky(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),E=Jy((e=>{var t;const n=()=>{var t;j(e),null==(t=qy(e))||t.removeEventListener(d,n)};null==(t=qy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),ly()?5:0)}const u=Uy(o.floating);a&&(u.addEventListener("keydown",C?M:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),v&&u.addEventListener(d,k?E:j,k);let h=[];return p&&(Zv(o.domReference)&&(h=my(o.domReference)),Zv(o.floating)&&(h=h.concat(my(o.floating))),!Zv(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(my(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?M:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),v&&u.removeEventListener(d,k?E:j,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,v,d,n,r,p,s,x,w,$,C,M,j,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,v,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[Wx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Ux[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(v,{escapeKey:u,outsidePress:h}),S=Yx(v,{role:"dialog"}),{getFloatingProps:$}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Jx(t,e,"reference")),t),i=l.useCallback((t=>Jx(t,e,"floating")),n),s=l.useCallback((t=>Jx(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:M,y:j}=y.arrow??{x:null,y:null},E={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==E&&"right"!==E||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:b,"aria-label":f.dialogAriaLabel,"aria-modal":!0,...$(),css:Qx,children:[r.jsxs("div",{css:ew,children:[i,r.jsx(kg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:tw,children:s}),a?r.jsx("div",{css:nw,children:a}):null,r.jsx("div",{ref:m,css:rw(T,O,M,j,E,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=Vm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[M,j]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(kg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):M&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:sO,children:[r.jsxs("div",{css:aO,children:[r.jsx("div",{css:lO,children:r.jsx(e.InputGroup,{startElement:r.jsx(km,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(mg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{j(!0),$(!0),f?.(e)},onBlur:e=>{j(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:cO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:dO,children:[r.jsx("h3",{css:uO,children:A}),i?r.jsx("div",{css:hO,children:r.jsx(iO,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:pO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:fO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:mO,children:[r.jsx("p",{css:gO,children:t.label}),r.jsx("p",{css:bO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>OO(o,t)));return r.jsx("div",{css:MO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=OO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:jO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:EO,children:[i,a?r.jsx("div",{css:TO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(Sk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:$k(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Mk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:jk,asChild:!0,children:r.jsx(kg,{})})]}),r.jsx(e.Dialog.Body,{css:Ek,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:eb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Bf,{...u,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:Yg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:tb,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:h?"180":"0",color:Xg(t,l)}),disabled:l})}),r.jsx(nb,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:Qg(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=QO),[$,M]=n.useState(!1),j=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=QO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>QO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=QO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:LO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:RO(y&&!k,d,T),children:[r.jsxs("div",{css:NO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:DO,children:o}):null,r.jsx("div",{css:IO(y),children:a?.map((e=>e.link?r.jsx(j,{to:e.link,href:e.link,css:PO(s===e.link,t,T),children:e.label},e.label):r.jsx(Vm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:zO(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>M(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:HO(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Jf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(xm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:zO(T),children:l?.map(((e,t)=>r.jsx("div",{css:VO(y),children:e},t)))}),c?.length?r.jsx("div",{css:BO(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:AO(t,T),children:a?.map((e=>e.link?r.jsx(j,{to:e.link,href:e.link,css:PO(s===e.link,t,T),children:e.label},e.label):r.jsx(Vm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(YO,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:M,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:eL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:tL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:nL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:rL,children:[r.jsx("div",{css:nL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:oL,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OpacityControl=Ew,exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
|
|
4338
|
+
`),"data-nav-source":A,onPointerMove:N,children:[r.jsx(e.Combobox.Empty,{children:y.noItemsFoundLabel}),C.items.map((t=>r.jsxs(e.Combobox.Item,{css:Lv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g?r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:b.map((e=>r.jsx(hv,{label:e.label,variant:"info-white",onClose:()=>v((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))}):null]})});var D},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(j.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:SC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:$C,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=sg,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:CO(n,o),children:r.jsxs("div",{css:kO(i),children:[r.jsxs("div",{css:MO,children:[r.jsx(rm,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:SO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:$O,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:rb,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:ib}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:ob,children:e}):null,t?r.jsx("p",{id:a,css:sb,children:t}):null,o]})]})},exports.IconButton=_f,exports.InlineMessage=sO,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Kb,children:r.jsx(sg,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Gb(!!i,a),attached:!0,children:["start"===a?r.jsx(mv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(mg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(mv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=Kw,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:iw,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:sw,children:[t,r.jsx(hv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:aw,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx($b,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(pw,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:ow,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=pw,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:fw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:mw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:gw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:bw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:vw,children:[r.jsx("div",{css:yw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:xw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:ww,children:e}),r.jsx("p",{css:Cw,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Jf,{}),onClick:s})]}),a,r.jsxs("div",{css:kw,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Ew,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=nC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(im,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(sm,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(am,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(lm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(cm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(dm,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(um,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Zg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=_v,exports.MapMarkers=Fv,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Vf("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:b,context:v,middlewareData:y,placement:x}=Zx({open:e,onOpenChange:t,placement:c,whileElementsMounted:bx,middleware:[Tx(d),(w={fallbackAxisSideDirection:"start"},{...xx(w),options:[w,C]}),Ox({padding:8}),Lx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=qx(),b=Jy("function"==typeof c?c:()=>!1),v="function"==typeof c?b:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Kx(f),{escapeKey:C,outsidePress:k}=Kx(m),S=l.useRef(!1),$=Jy((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Ky(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),M=Jy((e=>{var t;const n=()=>{var t;$(e),null==(t=qy(e))||t.removeEventListener("keydown",n)};null==(t=qy(e))||t.addEventListener("keydown",n)})),j=Jy((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof v&&!v(e))return;const a=qy(e),l="[data-floating-ui-inert]",c=Uy(o.floating).querySelectorAll(l);let u=Zv(a)?a:null;for(;u&&!dy(u);){const e=py(u);if(dy(e)||!Zv(e))break;u=e}if(c.length&&Zv(a)&&!a.matches("html,body")&&!Fy(a,o.floating)&&Array.from(c).every((e=>!Fy(u,e))))return;if(Jv(a)&&O){const t=dy(a),n=uy(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Ky(g.nodesRef.current,h).some((t=>{var n;return Wy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Wy(e,o.floating)||Wy(e,o.domReference)||p)return;const f=g?Ky(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),E=Jy((e=>{var t;const n=()=>{var t;j(e),null==(t=qy(e))||t.removeEventListener(d,n)};null==(t=qy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),ly()?5:0)}const u=Uy(o.floating);a&&(u.addEventListener("keydown",C?M:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),v&&u.addEventListener(d,k?E:j,k);let h=[];return p&&(Zv(o.domReference)&&(h=my(o.domReference)),Zv(o.floating)&&(h=h.concat(my(o.floating))),!Zv(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(my(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?M:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),v&&u.removeEventListener(d,k?E:j,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,v,d,n,r,p,s,x,w,$,C,M,j,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,v,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[Wx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Ux[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(v,{escapeKey:u,outsidePress:h}),S=Yx(v,{role:"dialog"}),{getFloatingProps:$}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Jx(t,e,"reference")),t),i=l.useCallback((t=>Jx(t,e,"floating")),n),s=l.useCallback((t=>Jx(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:M,y:j}=y.arrow??{x:null,y:null},E={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==E&&"right"!==E||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:b,"aria-label":f.dialogAriaLabel,"aria-modal":!0,...$(),css:Qx,children:[r.jsxs("div",{css:ew,children:[i,r.jsx(kg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:tw,children:s}),a?r.jsx("div",{css:nw,children:a}):null,r.jsx("div",{ref:m,css:rw(T,O,M,j,E,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=Vm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[M,j]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(kg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):M&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:aO,children:[r.jsxs("div",{css:lO,children:[r.jsx("div",{css:cO,children:r.jsx(e.InputGroup,{startElement:r.jsx(km,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(mg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{j(!0),$(!0),f?.(e)},onBlur:e=>{j(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:dO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:uO,children:[r.jsx("h3",{css:hO,children:A}),i?r.jsx("div",{css:pO,children:r.jsx(sO,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:fO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:mO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:gO,children:[r.jsx("p",{css:bO,children:t.label}),r.jsx("p",{css:vO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>LO(o,t)));return r.jsx("div",{css:jO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=LO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:EO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:TO,children:[i,a?r.jsx("div",{css:OO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(Sk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:$k(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Mk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:jk,asChild:!0,children:r.jsx(kg,{})})]}),r.jsx(e.Dialog.Body,{css:Ek,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:eb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Bf,{...u,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:Yg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:tb,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:h?"180":"0",color:Xg(t,l)}),disabled:l})}),r.jsx(nb,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:Qg(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=eL),[$,M]=n.useState(!1),j=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=eL||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>eL&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=eL||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:AO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:NO(y&&!k,d,T),children:[r.jsxs("div",{css:DO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:IO,children:o}):null,r.jsx("div",{css:PO(y),children:a?.map((e=>e.link?r.jsx(j,{to:e.link,href:e.link,css:zO(s===e.link,t,T),children:e.label},e.label):r.jsx(Vm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:VO(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>M(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:_O(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Jf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(xm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:VO(T),children:l?.map(((e,t)=>r.jsx("div",{css:BO(y),children:e},t)))}),c?.length?r.jsx("div",{css:HO(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:RO(t,T),children:a?.map((e=>e.link?r.jsx(j,{to:e.link,href:e.link,css:zO(s===e.link,t,T),children:e.label},e.label):r.jsx(Vm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(QO,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:M,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:tL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:nL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:rL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:oL,children:[r.jsx("div",{css:rL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:iL,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OpacityControl=Ew,exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
|
|
4339
4339
|
width: ${o||"15.0625rem"};
|
|
4340
4340
|
min-height: 4.375rem;
|
|
4341
4341
|
padding: ${k(300)};
|
|
@@ -4405,14 +4405,14 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4405
4405
|
font-weight: 700;
|
|
4406
4406
|
color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
|
|
4407
4407
|
}
|
|
4408
|
-
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:yv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:xv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:xv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:xv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:xv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:xv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]})});var y},exports.ProgressBar=({progress:e,labels:t,color:n})=>{const o=Vf("ProgressBar",t);let i=e;return i>100&&(i=100),i<0&&(i=0),r.jsx("div",{css:
|
|
4408
|
+
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:yv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:xv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:xv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:xv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:xv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:xv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Jf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]})});var y},exports.ProgressBar=({progress:e,labels:t,color:n})=>{const o=Vf("ProgressBar",t);let i=e;return i>100&&(i=100),i<0&&(i=0),r.jsx("div",{css:PL,role:"progressbar","aria-label":o.progressAriaLabel(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,children:r.jsx("div",{css:zL(i,n)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(hm,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Vf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,b="line"===e,v="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return b&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:Aw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:Rw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:Tw(i)}),b&&r.jsx("div",{css:Ow(i)}),v&&r.jsx("div",{css:Lw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:Nw,children:t}),o?r.jsx("p",{id:m,css:Dw,children:o}):null]})]}),s&&a?r.jsx("div",{css:Iw,children:r.jsx(Bf,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(Qf,{}):r.jsx(Yf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=Sb,exports.RadioGroup=$b,exports.RadioList=({label:e,caption:t,name:n,radios:o,defaultValue:i,onCheckedChange:s,errorMessage:a,horizontal:l,variant:c="default",required:d,labels:u})=>{const h=Vf("RadioList",u),p=`${e}. ${t?`${t}.`:""} ${d?h.requiredLabel:h.optionalLabel} ${a?`${h.errorPrefix} ${a}.`:""} `;return r.jsx(sg,{label:e,caption:t,errorMessage:a,required:d,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:h.requiredSymbolLabel},containerProps:{"aria-roledescription":"group","aria-label":p},children:r.jsx($b,{name:n,value:i,onChange:s,horizontal:l&&"card"!==c,children:o.map((e=>r.jsx(Sb,{css:"card"===c?wv:{},...e},e.value)))})})},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=xg,onChange:a,labels:c})=>{const d=Vf("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!0,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(yg.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(yg.Toolbar,{children:r.jsxs(yg.ControlGroup,{children:[s.includes("undo")?r.jsx(tg,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(ng,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Um,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(og,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Km,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Gm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(Zm,{label:d.italicTooltip,icon:r.jsx("em",{css:{fontStyle:"italic",fontSize:C(600),lineHeight:1},children:d.italicIconText})}):null,s.includes("underline")?r.jsx(Jm,{label:d.underlineTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"underline"},children:d.underlineIconText})}):null,s.includes("strikethrough")?r.jsx(Xm,{label:d.strikethroughTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"line-through"},children:d.strikethroughIconText})}):null,s.includes("bulletList")?r.jsx(Ym,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(Qm,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(gg,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(eg,{label:d.imageTooltip}):null]})}),r.jsx(yg.Content,{})]})},exports.SSOButtons=wg,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:Pw,children:[o?r.jsx("div",{css:(s=_w(e),i.css`
|
|
4409
4409
|
height: ${k(500)};
|
|
4410
4410
|
width: 100%;
|
|
4411
4411
|
margin-bottom: ${k(200)};
|
|
4412
4412
|
border: ${M(100)} solid ${w("neutral",300)};
|
|
4413
4413
|
border-radius: ${$(300)};
|
|
4414
4414
|
${s?`background: ${s};`:""}
|
|
4415
|
-
`)}):r.jsx("div",{css:zw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:Vw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:Bw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:Vw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:Hw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Vf("Search",m),[b,v]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,M]=n.useState(-1),[j,E]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=jv(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||yL(t)===e));t&&(d?.(t),v(""),C())};n.useEffect((()=>{if(h?.(b),!b)return void S(s);const e=s.filter((e=>{const t=b.toLowerCase();return e.id?.toLowerCase().includes(t)||yL(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??yL(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||yL(e))})));S(e),x()}),[b]);const I=b.length?r.jsx(kg,{onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!b.length&&k.length>0&&y,z=(P||l&&!!b.length)&&"custom"!==c;let V=w("neutral",500);o?V=w("neutral",500):j&&(V=w("primary",700));const B="small"===i?"1rem":"1.25rem",H=u(a);return r.jsxs(e.Popover.Root,{open:z,onOpenChange:e=>{e.open||C()},autoFocus:!1,closeOnEscape:!1,positioning:{sameWidth:!0,gutter:0},children:[r.jsxs("div",{ref:L,css:fL,"data-open":z||void 0,"data-placement":R,children:[r.jsx(e.Popover.Anchor,{children:r.jsx(e.InputGroup,{startElement:r.jsx(km,{width:B,height:B,fill:V}),endElement:I,children:r.jsx(mg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:b,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":P,"aria-controls":N,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),O("keyboard"),M((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),M((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||yL(e))}"Escape"===e.key&&C()}}})})}),(P||l&&!!b.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:b,onSelect:D})]}),r.jsx(e.Portal,{children:r.jsx(e.Popover.Positioner,{children:r.jsxs(e.Popover.Content,{ref:A,css:mL,style:{maxHeight:H},"data-nav-source":T,onPointerMove:()=>O("pointer"),children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(vL,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(nC,{items:k,highlightedIndex:$})]})})})]})},exports.Select=mv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Vf("Sheet",f),g=n.useRef(null),b=n.useRef([]),[v,y]=n.useState(null),x=window.innerWidth>768,w=b.current;let C=m.expandSheetLabel;if(null!=v){const e=GT(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||GT(v,w)!==w.length-1);return r.jsx(WT,{ref:g,css:KT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:UT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=v??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return b.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(_v,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Pb,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsx(sg,{label:e,caption:t,required:s,size:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs("div",{css:Cv,children:[i.step&&i.marks?r.jsx(mv,{items:i.marks.map((e=>{const t="number"==typeof e?e:e.value;return{label:`${"number"==typeof e?e:e.label}`,value:`${t}`}})),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(mg,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}),r.jsx(Pb,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(mg,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}):null]})})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Vf("StepProgressIndicator",n);return r.jsxs("div",{css:zL,children:[e.map(((e,n)=>r.jsxs("div",{css:VL,children:[r.jsx("button",{css:BL(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Wf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:HL(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:_L,children:r.jsx("div",{css:FL})})]})},exports.Switch=Vb,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(uL(i,o)||0);return r.jsx("div",{css:iL(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(uL(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===hL(l)?r.jsx("div",{css:lL}):null,r.jsx(e.Tabs.Trigger,{css:[sL,"view"===t&&cL,"panel"===t&&aL,"transparent"===t&&dL],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===hL(l)?r.jsx("div",{css:lL}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:b,loading:v,height:y,labels:x})=>{const C=Vf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),M=n.useRef(null),[j,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>wC(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==j[vC]?[vC]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[vC]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?M.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>xC(j,e.key,q),K=e=>((e,t,n,r)=>({...yC(e,n),...xC(t,n,r)}))(_,j,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...xC(s,vC,a),children:t.jsx(lb,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),b&&b(e,t)},stickyOffsets:j,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?gC(y):void 0,children:r.jsxs(e.Table.Root,{css:lC(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:cC(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:M,...xC(j,vC,q),children:r.jsx(lb,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,yC(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:dC,children:[t.label,t.sortable?r.jsxs("div",{css:uC,children:[r.jsx(_f,{css:hC(k.key===t.key&&"asc"===k.order),icon:r.jsx(Gf,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(_f,{css:hC(k.key===t.key&&"desc"===k.order),icon:r.jsx(Gf,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:mC(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),v?r.jsx("div",{css:bC,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:pC,children:[N?r.jsx(Kw,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null,c?r.jsx("div",{css:fC,children:r.jsx(aC,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=kC,exports.TableRow=CC,exports.Tag=hv,exports.TextInput=mg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,onFocus:p,onBlur:f,minLength:m,maxLength:g,labels:b,value:v,...y})=>{const x=Vf("Textarea",b),[w,C]=n.useState(u),[k,S]=n.useState(!1),[$,M]=n.useState(!1),[j,E]=n.useState(""),T=void 0!==v,O=T?String(v??""):w,L=n.useId(),A=n.useId(),R=n.useId();n.useEffect((()=>{const{length:e}=u;m&&e<m&&e>0?(S(e<m),M(!1),E(x.enterAtLeastChars(m-e))):m&&0===e&&E(x.minChars(m)),g&&e>0?(S(!1),M(e>g),E(x.charsRemaining(g-e))):g&&0===e&&E(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,j?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=fg(p,f),z=j&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Sv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.needMoreChars(m-O.length)}):null,$&&g?r.jsx(e.Field.ErrorText,{id:A,css:Sv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.tooManyChars(O.length-g)}):null,z?r.jsx(e.Field.HelperText,{id:R,css:kv,"aria-live":"polite",children:j}):null]}):null;return r.jsx(sg,{label:t,caption:o,errorMessage:s,invalid:N,required:a,disabled:l,size:c,showOptionalLabel:d,labels:{requiredSymbolLabel:x.requiredSymbolLabel,optionalSuffix:x.optionalSuffix},captionId:L,errorId:s?A:void 0,footer:V,semantics:"field",children:r.jsx(e.Textarea,{placeholder:i,disabled:l,focusVisibleRing:"none",css:$v(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),M(t>g),E(x.charsRemaining(g-t))):m?(S(t<m),M(!1),E(t<m?x.enterAtLeastChars(m-t):"")):g&&(M(t>g),S(!1),E(x.charsRemaining(g-t))),h&&h(e)},value:O,"aria-label":t||i,"aria-describedby":D,"aria-invalid":N||void 0,_placeholder:{color:"var(--chakra-colors-neutral-700)"},...y,"data-focus-visible":P.isTabFocused||void 0,onFocus:P.onFocus,onBlur:P.onBlur})})},exports.Toast=({labels:t})=>{const n=Vf("Toast",t);return Object.keys(ZL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:ZL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
|
|
4415
|
+
`)}):r.jsx("div",{css:zw,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:Vw,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:Bw,children:e})},e)))}),n&&n.length?r.jsx("div",{css:Vw,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:Hw,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Vf("Search",m),[b,v]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,M]=n.useState(-1),[j,E]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=jv(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||xL(t)===e));t&&(d?.(t),v(""),C())};n.useEffect((()=>{if(h?.(b),!b)return void S(s);const e=s.filter((e=>{const t=b.toLowerCase();return e.id?.toLowerCase().includes(t)||xL(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??xL(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||xL(e))})));S(e),x()}),[b]);const I=b.length?r.jsx(kg,{onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!b.length&&k.length>0&&y,z=(P||l&&!!b.length)&&"custom"!==c;let V=w("neutral",500);o?V=w("neutral",500):j&&(V=w("primary",700));const B="small"===i?"1rem":"1.25rem",H=u(a);return r.jsxs(e.Popover.Root,{open:z,onOpenChange:e=>{e.open||C()},autoFocus:!1,closeOnEscape:!1,positioning:{sameWidth:!0,gutter:0},children:[r.jsxs("div",{ref:L,css:mL,"data-open":z||void 0,"data-placement":R,children:[r.jsx(e.Popover.Anchor,{children:r.jsx(e.InputGroup,{startElement:r.jsx(km,{width:B,height:B,fill:V}),endElement:I,children:r.jsx(mg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:b,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":P,"aria-controls":N,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),O("keyboard"),M((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),M((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||xL(e))}"Escape"===e.key&&C()}}})})}),(P||l&&!!b.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:b,onSelect:D})]}),r.jsx(e.Portal,{children:r.jsx(e.Popover.Positioner,{children:r.jsxs(e.Popover.Content,{ref:A,css:gL,style:{maxHeight:H},"data-nav-source":T,onPointerMove:()=>O("pointer"),children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(yL,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(nC,{items:k,highlightedIndex:$})]})})})]})},exports.Select=mv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Vf("Sheet",f),g=n.useRef(null),b=n.useRef([]),[v,y]=n.useState(null),x=window.innerWidth>768,w=b.current;let C=m.expandSheetLabel;if(null!=v){const e=GT(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||GT(v,w)!==w.length-1);return r.jsx(WT,{ref:g,css:KT(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:UT,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=v??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return b.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(_v,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Pb,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsx(sg,{label:e,caption:t,required:s,size:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs("div",{css:Cv,children:[i.step&&i.marks?r.jsx(mv,{items:i.marks.map((e=>{const t="number"==typeof e?e:e.value;return{label:`${"number"==typeof e?e:e.label}`,value:`${t}`}})),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(mg,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}),r.jsx(Pb,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(mg,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}):null]})})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Vf("StepProgressIndicator",n);return r.jsxs("div",{css:VL,children:[e.map(((e,n)=>r.jsxs("div",{css:BL,children:[r.jsx("button",{css:HL(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Wf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:_L(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:FL,children:r.jsx("div",{css:qL})})]})},exports.Switch=Vb,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(hL(i,o)||0);return r.jsx("div",{css:sL(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(hL(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>r.jsxs(n.Fragment,{children:["view"===t&&1===i&&"left"===pL(l)?r.jsx("div",{css:cL}):null,r.jsx(e.Tabs.Trigger,{css:[aL,"view"===t&&dL,"panel"===t&&lL,"transparent"===t&&uL],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===i&&"right"===pL(l)?r.jsx("div",{css:cL}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:b,loading:v,height:y,labels:x})=>{const C=Vf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),M=n.useRef(null),[j,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>wC(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==j[vC]?[vC]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[vC]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?M.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>xC(j,e.key,q),K=e=>((e,t,n,r)=>({...yC(e,n),...xC(t,n,r)}))(_,j,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...xC(s,vC,a),children:t.jsx(lb,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),b&&b(e,t)},stickyOffsets:j,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?gC(y):void 0,children:r.jsxs(e.Table.Root,{css:lC(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:cC(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:M,...xC(j,vC,q),children:r.jsx(lb,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,yC(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:dC,children:[t.label,t.sortable?r.jsxs("div",{css:uC,children:[r.jsx(_f,{css:hC(k.key===t.key&&"asc"===k.order),icon:r.jsx(Gf,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(_f,{css:hC(k.key===t.key&&"desc"===k.order),icon:r.jsx(Gf,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:mC(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),v?r.jsx("div",{css:bC,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:pC,children:[N?r.jsx(Kw,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null,c?r.jsx("div",{css:fC,children:r.jsx(aC,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=kC,exports.TableRow=CC,exports.Tag=hv,exports.TextInput=mg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,onFocus:p,onBlur:f,minLength:m,maxLength:g,labels:b,value:v,...y})=>{const x=Vf("Textarea",b),[w,C]=n.useState(u),[k,S]=n.useState(!1),[$,M]=n.useState(!1),[j,E]=n.useState(""),T=void 0!==v,O=T?String(v??""):w,L=n.useId(),A=n.useId(),R=n.useId();n.useEffect((()=>{const{length:e}=u;m&&e<m&&e>0?(S(e<m),M(!1),E(x.enterAtLeastChars(m-e))):m&&0===e&&E(x.minChars(m)),g&&e>0?(S(!1),M(e>g),E(x.charsRemaining(g-e))):g&&0===e&&E(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,j?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=fg(p,f),z=j&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Sv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.needMoreChars(m-O.length)}):null,$&&g?r.jsx(e.Field.ErrorText,{id:A,css:Sv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.tooManyChars(O.length-g)}):null,z?r.jsx(e.Field.HelperText,{id:R,css:kv,"aria-live":"polite",children:j}):null]}):null;return r.jsx(sg,{label:t,caption:o,errorMessage:s,invalid:N,required:a,disabled:l,size:c,showOptionalLabel:d,labels:{requiredSymbolLabel:x.requiredSymbolLabel,optionalSuffix:x.optionalSuffix},captionId:L,errorId:s?A:void 0,footer:V,semantics:"field",children:r.jsx(e.Textarea,{placeholder:i,disabled:l,focusVisibleRing:"none",css:$v(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),M(t>g),E(x.charsRemaining(g-t))):m?(S(t<m),M(!1),E(t<m?x.enterAtLeastChars(m-t):"")):g&&(M(t>g),S(!1),E(x.charsRemaining(g-t))),h&&h(e)},value:O,"aria-label":t||i,"aria-describedby":D,"aria-invalid":N||void 0,_placeholder:{color:"var(--chakra-colors-neutral-700)"},...y,"data-focus-visible":P.isTabFocused||void 0,onFocus:P.onFocus,onBlur:P.onBlur})})},exports.Toast=({labels:t})=>{const n=Vf("Toast",t);return Object.keys(JL).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:JL[t],insetInline:{mdDown:"4"},children:o=>{return r.jsxs(e.Toast.Root,{css:(s=o.meta?.maxWidth,i.css`
|
|
4416
4416
|
justify-content: space-between;
|
|
4417
4417
|
align-items: center;
|
|
4418
4418
|
gap: ${k(200)};
|
|
@@ -4456,4 +4456,4 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4456
4456
|
color: ${w("error",900)};
|
|
4457
4457
|
}
|
|
4458
4458
|
}
|
|
4459
|
-
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:o.description?"flex-start":"center",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Kf,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(em,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:
|
|
4459
|
+
`),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:o.description?"flex-start":"center",children:["info"===o.type?o.meta?.icon?o.meta.icon:r.jsx(Kf,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===o.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===o.type?o.meta?.icon?o.meta.icon:r.jsx(em,{color:"var(--chakra-colors-success-500)"}):null,"warning"===o.type?o.meta?.icon?o.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===o.type?o.meta?.icon?o.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:WL,"aria-label":`${o.title}`,children:o.title}),o.description?r.jsx(e.Toast.Title,{css:UL,"aria-label":`${o.description}`,children:o.description}):null]})]}),o.action||o.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[o.action?r.jsx(Bf,{css:KL,label:o.action.label,size:"small",variant:"info"===o.type?"primary":"secondary",onClick:()=>{o?.action?.onClick&&o.action.onClick(),JL[t].dismiss()}}):null,o.meta?.closable?r.jsx(Bf,{css:GL,label:o.meta.closableLabel,"aria-label":o.meta?.closableLabel||n.dismissLabel,leftIcon:r.jsx(Jf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{o.meta?.onClose&&o.meta.onClose(),JL[t].dismiss()}}):null]}):null]});var s}})},t)))},exports.Toolbar=Zg,exports.Tooltip=_m,exports.closeToast=e=>{Object.values(JL).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=M,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{JL[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})};
|