@worldresources/wri-design-systems 2.162.0 → 2.164.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 +81 -80
- package/dist/index.esm.js +77 -76
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2459,6 +2459,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2459
2459
|
}
|
|
2460
2460
|
|
|
2461
2461
|
[data-rsbs-header]:before {
|
|
2462
|
+
margin-top: 6px;
|
|
2462
2463
|
height: 2px;
|
|
2463
2464
|
width: 32px;
|
|
2464
2465
|
background-color: ${h("neutral",300)};
|
|
@@ -2469,7 +2470,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2469
2470
|
padding: 0px;
|
|
2470
2471
|
min-height: 64px;
|
|
2471
2472
|
}
|
|
2472
|
-
`;!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 Th=r.css`
|
|
2473
|
+
`;!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 Th=(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},Ph=r.css`
|
|
2473
2474
|
a,
|
|
2474
2475
|
p {
|
|
2475
2476
|
font-size: 16px;
|
|
@@ -2501,19 +2502,19 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2501
2502
|
a:hover {
|
|
2502
2503
|
text-decoration: underline;
|
|
2503
2504
|
}
|
|
2504
|
-
`,
|
|
2505
|
+
`,Mh=r.css`
|
|
2505
2506
|
svg {
|
|
2506
2507
|
height: 12px;
|
|
2507
2508
|
width: 12px;
|
|
2508
2509
|
color: ${h("neutral",600)};
|
|
2509
2510
|
}
|
|
2510
|
-
`,
|
|
2511
|
+
`,_h=r.css`
|
|
2511
2512
|
cursor: pointer;
|
|
2512
2513
|
color: ${h("neutral",600)};
|
|
2513
2514
|
display: flex;
|
|
2514
2515
|
justify-content: center;
|
|
2515
2516
|
align-items: center;
|
|
2516
|
-
`,
|
|
2517
|
+
`,Dh=(e,t)=>r.css`
|
|
2517
2518
|
min-height: 56px;
|
|
2518
2519
|
width: 100vw;
|
|
2519
2520
|
position: ${e?"sticky":"absolute"};
|
|
@@ -2523,7 +2524,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2523
2524
|
background-color: ${h("neutral",t?200:100)};
|
|
2524
2525
|
border-top: 1px solid ${h("neutral",400)};
|
|
2525
2526
|
z-index: 101;
|
|
2526
|
-
`,
|
|
2527
|
+
`,Ih=e=>r.css`
|
|
2527
2528
|
height: 100%;
|
|
2528
2529
|
width: 100%;
|
|
2529
2530
|
max-width: ${e?`${e}px`:"100%"};
|
|
@@ -2538,7 +2539,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2538
2539
|
flex-direction: column;
|
|
2539
2540
|
align-items: flex-start;
|
|
2540
2541
|
}
|
|
2541
|
-
`,
|
|
2542
|
+
`,Vh=r.css`
|
|
2542
2543
|
display: flex;
|
|
2543
2544
|
align-items: center;
|
|
2544
2545
|
flex-wrap: wrap;
|
|
@@ -2551,7 +2552,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2551
2552
|
color: ${h("neutral",700)};
|
|
2552
2553
|
text-decoration: underline;
|
|
2553
2554
|
}
|
|
2554
|
-
`,
|
|
2555
|
+
`,Nh=r.css`
|
|
2555
2556
|
width: 240px;
|
|
2556
2557
|
font-size: 14px;
|
|
2557
2558
|
line-height: 20px;
|
|
@@ -2562,13 +2563,13 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2562
2563
|
@media screen and (max-width: 768px) {
|
|
2563
2564
|
text-align: left;
|
|
2564
2565
|
}
|
|
2565
|
-
`,
|
|
2566
|
+
`,Ah=r.css`
|
|
2566
2567
|
width: 100%;
|
|
2567
2568
|
display: flex;
|
|
2568
2569
|
align-items: center;
|
|
2569
2570
|
height: 56px;
|
|
2570
2571
|
background-color: ${h("neutral",200)};
|
|
2571
|
-
`,
|
|
2572
|
+
`,zh=r.css`
|
|
2572
2573
|
height: 56px;
|
|
2573
2574
|
width: 99%;
|
|
2574
2575
|
background-color: ${h("neutral",200)};
|
|
@@ -2662,9 +2663,9 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2662
2663
|
opacity: 1;
|
|
2663
2664
|
}
|
|
2664
2665
|
}
|
|
2665
|
-
`,zh=r.css`
|
|
2666
|
-
position: relative;
|
|
2667
2666
|
`,Bh=r.css`
|
|
2667
|
+
position: relative;
|
|
2668
|
+
`,Hh=r.css`
|
|
2668
2669
|
position: absolute;
|
|
2669
2670
|
top: -5px;
|
|
2670
2671
|
right: -5px;
|
|
@@ -2679,7 +2680,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2679
2680
|
display: flex;
|
|
2680
2681
|
justify-content: center;
|
|
2681
2682
|
align-items: center;
|
|
2682
|
-
`,
|
|
2683
|
+
`,Fh=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Zh=(e,t,n)=>r.css`
|
|
2683
2684
|
height: ${e?"96px":"48px"};
|
|
2684
2685
|
width: 100%;
|
|
2685
2686
|
background-color: ${n||h("neutral",100)};
|
|
@@ -2688,7 +2689,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2688
2689
|
left: 0;
|
|
2689
2690
|
z-index: 102;
|
|
2690
2691
|
border-bottom: 1px solid ${h("neutral",400)};
|
|
2691
|
-
`,
|
|
2692
|
+
`,Wh=r.css`
|
|
2692
2693
|
height: 48px;
|
|
2693
2694
|
width: 100%;
|
|
2694
2695
|
background-color: ${h("neutral",100)};
|
|
@@ -2698,7 +2699,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2698
2699
|
justify-content: flex-start;
|
|
2699
2700
|
gap: 0px;
|
|
2700
2701
|
padding: 8px 16px;
|
|
2701
|
-
`,
|
|
2702
|
+
`,qh=(e,t)=>r.css`
|
|
2702
2703
|
height: 48px;
|
|
2703
2704
|
width: 100%;
|
|
2704
2705
|
max-width: ${t?`${t}px`:"100%"};
|
|
@@ -2708,7 +2709,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2708
2709
|
justify-content: space-between;
|
|
2709
2710
|
margin: 0 auto;
|
|
2710
2711
|
padding: 8px 16px;
|
|
2711
|
-
`,
|
|
2712
|
+
`,Gh=r.css`
|
|
2712
2713
|
outline: none;
|
|
2713
2714
|
a {
|
|
2714
2715
|
&:focus-visible {
|
|
@@ -2719,12 +2720,12 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2719
2720
|
outline-width: 2px;
|
|
2720
2721
|
}
|
|
2721
2722
|
}
|
|
2722
|
-
`,
|
|
2723
|
+
`,Uh=e=>r.css`
|
|
2723
2724
|
display: ${e?"none":"flex"};
|
|
2724
2725
|
align-items: center;
|
|
2725
2726
|
justify-content: flex-start;
|
|
2726
2727
|
gap: 0px;
|
|
2727
|
-
`,
|
|
2728
|
+
`,Xh=e=>r.css`
|
|
2728
2729
|
font-size: 16px;
|
|
2729
2730
|
line-height: 24px;
|
|
2730
2731
|
font-weight: 400;
|
|
@@ -2749,12 +2750,12 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2749
2750
|
font-weight: 700;
|
|
2750
2751
|
color: ${h("accessible","controls-on-neutral-lights")};
|
|
2751
2752
|
`:""}
|
|
2752
|
-
`,
|
|
2753
|
+
`,Yh=r.css`
|
|
2753
2754
|
height: 48px;
|
|
2754
2755
|
display: flex;
|
|
2755
2756
|
align-items: center;
|
|
2756
2757
|
justify-content: flex-end;
|
|
2757
|
-
`,
|
|
2758
|
+
`,Kh=e=>r.css`
|
|
2758
2759
|
height: 100%;
|
|
2759
2760
|
font-size: 16px;
|
|
2760
2761
|
line-height: 24px;
|
|
@@ -2773,7 +2774,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2773
2774
|
}
|
|
2774
2775
|
}
|
|
2775
2776
|
`:""}
|
|
2776
|
-
`,
|
|
2777
|
+
`,Jh=e=>r.css`
|
|
2777
2778
|
height: 100%;
|
|
2778
2779
|
display: flex;
|
|
2779
2780
|
align-items: center;
|
|
@@ -2781,7 +2782,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2781
2782
|
gap: 20px;
|
|
2782
2783
|
padding-left: 16px;
|
|
2783
2784
|
border-left: 1px solid ${h("neutral",e?700:300)};
|
|
2784
|
-
`,
|
|
2785
|
+
`,Qh=r.css`
|
|
2785
2786
|
background-color: none;
|
|
2786
2787
|
border: none;
|
|
2787
2788
|
cursor: pointer;
|
|
@@ -2806,7 +2807,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2806
2807
|
outline-width: 2px;
|
|
2807
2808
|
background-color: ${h("neutral",200)};
|
|
2808
2809
|
}
|
|
2809
|
-
`,
|
|
2810
|
+
`,ef=e=>r.css`
|
|
2810
2811
|
position: absolute;
|
|
2811
2812
|
top: 48px;
|
|
2812
2813
|
right: 0;
|
|
@@ -2819,10 +2820,10 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2819
2820
|
justify-content: flex-start;
|
|
2820
2821
|
gap: 16px;
|
|
2821
2822
|
transition: width 0.5s ease-in-out;
|
|
2822
|
-
`,
|
|
2823
|
+
`,tf=r.css`
|
|
2823
2824
|
height: 100%;
|
|
2824
2825
|
width: 100%;
|
|
2825
|
-
`,
|
|
2826
|
+
`,nf=r.css`
|
|
2826
2827
|
background-color: ${h("neutral",200)};
|
|
2827
2828
|
border-bottom: 1px solid ${h("neutral",300)};
|
|
2828
2829
|
|
|
@@ -2842,13 +2843,13 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2842
2843
|
margin-left: -12px;
|
|
2843
2844
|
}
|
|
2844
2845
|
}
|
|
2845
|
-
`,nf=r.css`
|
|
2846
|
-
background-color: ${h("neutral",100)};
|
|
2847
2846
|
`,rf=r.css`
|
|
2847
|
+
background-color: ${h("neutral",100)};
|
|
2848
|
+
`,of=r.css`
|
|
2848
2849
|
min-height: 100vh;
|
|
2849
2850
|
width: 100%;
|
|
2850
2851
|
overflow-y: scroll;
|
|
2851
|
-
`;r.css``;const
|
|
2852
|
+
`;r.css``;const af=e=>r.css`
|
|
2852
2853
|
display: inline-block;
|
|
2853
2854
|
width: 100%;
|
|
2854
2855
|
padding: 12px 16px;
|
|
@@ -2877,7 +2878,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2877
2878
|
outline-width: 2px;
|
|
2878
2879
|
background-color: ${h("neutral",200)};
|
|
2879
2880
|
}
|
|
2880
|
-
`,
|
|
2881
|
+
`,sf=r.css`
|
|
2881
2882
|
width: 100%;
|
|
2882
2883
|
padding: 12px 16px;
|
|
2883
2884
|
display: flex;
|
|
@@ -2901,7 +2902,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2901
2902
|
outline-width: 2px;
|
|
2902
2903
|
background-color: ${h("neutral",200)};
|
|
2903
2904
|
}
|
|
2904
|
-
`,
|
|
2905
|
+
`,lf=e=>r.css`
|
|
2905
2906
|
position: absolute;
|
|
2906
2907
|
top: 0px;
|
|
2907
2908
|
right: 0;
|
|
@@ -2913,7 +2914,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2913
2914
|
align-items: flex-start;
|
|
2914
2915
|
justify-content: flex-start;
|
|
2915
2916
|
transition: width 0.5s ease-in-out;
|
|
2916
|
-
`,
|
|
2917
|
+
`,cf=r.css`
|
|
2917
2918
|
height: 48px;
|
|
2918
2919
|
width: 100%;
|
|
2919
2920
|
display: flex;
|
|
@@ -2924,7 +2925,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2924
2925
|
position: relative;
|
|
2925
2926
|
top: 0;
|
|
2926
2927
|
left: 0;
|
|
2927
|
-
`,
|
|
2928
|
+
`,uf=r.css`
|
|
2928
2929
|
position: absolute;
|
|
2929
2930
|
bottom: 0;
|
|
2930
2931
|
left: 0;
|
|
@@ -2939,7 +2940,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2939
2940
|
button {
|
|
2940
2941
|
width: calc(48% - 24px);
|
|
2941
2942
|
}
|
|
2942
|
-
`,
|
|
2943
|
+
`,df=({navigationSection:e,utilitySection:r,actionsSection:o,linkRouter:i,isOpen:a,setIsOpen:s,pathname:l})=>{const[c,u]=n.useState(void 0),[d,p]=n.useState(-1),h=n.useRef(null),f=n.useRef([]),x=i;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:ef(a),children:a&&t.jsxs("div",{css:tf,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:nf,children:r?.map((e=>t.jsx("div",{className:"ds-utility-item",children:e})))}):null,e?t.jsx("div",{css:rf,children:e.map(((e,n)=>e.link?t.jsx(x,{to:e.link,href:e.link,onClick:()=>{u(void 0),p(-1),s(!1)},css:af(l===e.link),children:e.label},e.label):t.jsxs("button",{css:sf,type:"button",ref:e=>f.current[n]=e,onClick:()=>{e.items&&(u(e),p(n),setTimeout((()=>{h.current?.focus()}),100))},children:[e.label,e.items?t.jsx($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),o?t.jsx("div",{css:uf,children:o.map((e=>t.jsx(b,{...e,onClick:t=>{e?.onClick?.(t),u(void 0),p(-1),s(!1)}},e.ariaLabel)))}):null]})}),t.jsx("div",{css:lf(!!c?.items),children:c?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:cf,children:[t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),f.current[d]?.focus()},"aria-label":"Go back",css:Qh,ref:h,children:[t.jsx($,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),c?.label]}),t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),s(!1)},"aria-label":"Close menu",css:Qh,children:["Close",t.jsx(E,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:of,children:c?.items?.map((e=>t.jsx(x,{to:e.link,href:e.link,css:af(),onClick:()=>{u(void 0),p(-1),s(!1)},children:e.label},e.label)))})]}):null})]})},pf=1023,hf=r.css`
|
|
2943
2944
|
width: 64px;
|
|
2944
2945
|
height: 100%;
|
|
2945
2946
|
z-index: 100;
|
|
@@ -2948,7 +2949,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2948
2949
|
display: flex;
|
|
2949
2950
|
flex-direction: column;
|
|
2950
2951
|
justify-content: space-between;
|
|
2951
|
-
`,
|
|
2952
|
+
`,ff=r.css`
|
|
2952
2953
|
width: 64px;
|
|
2953
2954
|
height: 64px;
|
|
2954
2955
|
background-color: ${h("neutral",200)};
|
|
@@ -3038,7 +3039,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3038
3039
|
}
|
|
3039
3040
|
}
|
|
3040
3041
|
}
|
|
3041
|
-
`,
|
|
3042
|
+
`,xf=r.css`
|
|
3042
3043
|
display: flex;
|
|
3043
3044
|
justify-content: center;
|
|
3044
3045
|
align-items: center;
|
|
@@ -3051,7 +3052,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3051
3052
|
fill: ${h("neutral",600)};
|
|
3052
3053
|
}
|
|
3053
3054
|
}
|
|
3054
|
-
`,
|
|
3055
|
+
`,gf=r.css`
|
|
3055
3056
|
width: 64px;
|
|
3056
3057
|
height: 64px;
|
|
3057
3058
|
background-color: ${h("neutral",200)};
|
|
@@ -3089,7 +3090,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3089
3090
|
text-align: center;
|
|
3090
3091
|
color: ${h("neutral",600)};
|
|
3091
3092
|
}
|
|
3092
|
-
`,
|
|
3093
|
+
`,vf=r.css`
|
|
3093
3094
|
width: 320px;
|
|
3094
3095
|
height: 100%;
|
|
3095
3096
|
z-index: 100;
|
|
@@ -3098,14 +3099,14 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3098
3099
|
overflow-y: auto;
|
|
3099
3100
|
overflow-x: hidden;
|
|
3100
3101
|
border-right: 1px solid ${h("neutral",300)};
|
|
3101
|
-
`,
|
|
3102
|
+
`,mf=e=>r.css`
|
|
3102
3103
|
width: 100%;
|
|
3103
3104
|
display: flex;
|
|
3104
3105
|
align-items: center;
|
|
3105
3106
|
height: 40px;
|
|
3106
3107
|
|
|
3107
3108
|
${"view"===e&&`\n border: 1px solid ${h("neutral",400)};\n background-color: ${h("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
|
|
3108
|
-
`,
|
|
3109
|
+
`,bf=r.css`
|
|
3109
3110
|
width: 99%;
|
|
3110
3111
|
height: 40px;
|
|
3111
3112
|
padding: 8px 16px;
|
|
@@ -3121,7 +3122,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3121
3122
|
&:focus-visible {
|
|
3122
3123
|
box-shadow: none;
|
|
3123
3124
|
}
|
|
3124
|
-
`,
|
|
3125
|
+
`,yf=r.css`
|
|
3125
3126
|
background-color: ${h("neutral",200)};
|
|
3126
3127
|
color: ${h("neutral",700)};
|
|
3127
3128
|
|
|
@@ -3178,11 +3179,11 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3178
3179
|
opacity: 1;
|
|
3179
3180
|
}
|
|
3180
3181
|
}
|
|
3181
|
-
`,
|
|
3182
|
+
`,wf=r.css`
|
|
3182
3183
|
width: 4px;
|
|
3183
3184
|
height: 24px;
|
|
3184
3185
|
background-color: ${h("neutral",400)};
|
|
3185
|
-
`,
|
|
3186
|
+
`,Cf=r.css`
|
|
3186
3187
|
height: 32px;
|
|
3187
3188
|
border-radius: 2px;
|
|
3188
3189
|
background-color: ${h("neutral",200)};
|
|
@@ -3255,7 +3256,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3255
3256
|
opacity: 1;
|
|
3256
3257
|
}
|
|
3257
3258
|
}
|
|
3258
|
-
`,
|
|
3259
|
+
`,jf=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),kf=e=>1===e?"none":2===e?"left":"right",$f=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return o.jsx(o.Fragment,{children:r.map((e=>n.test(e)?o.jsx("strong",{children:e},e):o.jsx("span",{children:e},e)))})},Sf=({items:t,query:r,onSelect:i,highlightedIndex:a})=>{const s=n.useRef(null);return n.useEffect((()=>{if(!s.current)return;const e=s.current.children[a];e&&e.scrollIntoView({block:"nearest"})}),[a]),o.jsx(e.Box,{padding:"8px",children:t.map(((t,n)=>o.jsx(e.Box,{ref:s,padding:"6px 8px",borderRadius:"md",cursor:"pointer",bg:n===a?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>i(t.id||t.label),children:o.jsx($f,{text:t.label,query:r})},t.id)))})},Ef={small:"16px",medium:"24px",large:"40px",default:"16px"};function Rf(e,t,n,o){const i=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&Ef[e]?Ef[e]:Ef.default}(e,t),a=n?h("neutral",200):h("primary",300),s=o??a,l=o&&n?"opacity: 0.7;":"",c=h("neutral",n?400:800);return r.css`
|
|
3259
3260
|
height: ${i};
|
|
3260
3261
|
width: ${i};
|
|
3261
3262
|
border-radius: 50%;
|
|
@@ -3289,17 +3290,17 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3289
3290
|
background-color: ${h("primary",500)};
|
|
3290
3291
|
}
|
|
3291
3292
|
}
|
|
3292
|
-
`}const
|
|
3293
|
+
`}const Lf=e=>r.css`
|
|
3293
3294
|
width: ${e||"16px"};
|
|
3294
3295
|
position: absolute;
|
|
3295
3296
|
top: -8px;
|
|
3296
3297
|
left: 15px;
|
|
3297
|
-
`,
|
|
3298
|
+
`,Of=r.css`
|
|
3298
3299
|
font-size: 12px;
|
|
3299
3300
|
line-height: 16px;
|
|
3300
3301
|
font-weight: 700;
|
|
3301
3302
|
color: ${h("primary",800)};
|
|
3302
|
-
`,
|
|
3303
|
+
`,Tf=n.forwardRef((({name:n,ariaLabel:o,size:i="medium",customSize:a="",src:s,srcSet:l,onClick:c,notificationCount:u,disabled:d=!0,customBackgroundColor:p=""},f)=>{const x=()=>{d||c?.()},g=(()=>{let e="";return u&&u>0&&(e=`${u>99?"99+":u}`),e})();let v="16px";u&&u>99?v="28px":u&&u>9&&(v="22px");const m=!!s||!!l,b=c&&!d;return t.jsxs(e.Avatar.Root,{"aria-label":o||n,ref:f,css:Rf(i,a,d,p),onClick:x,onKeyDown:e=>{d||"Enter"!==e.key||x()},role:b?"button":void 0,tabIndex:b?0:void 0,"aria-disabled":d,children:[m&&t.jsx(e.Avatar.Image,{src:s,srcSet:l}),!m&&n&&t.jsx(e.Avatar.Fallback,{name:n,css:Of}),!m&&!n&&t.jsx(Q,{size:"100%",style:{padding:"15%",color:d?h("neutral",400):void 0}}),g.length>0?t.jsx("div",{css:Lf(v),children:t.jsx("div",{css:r.css`
|
|
3303
3304
|
height: 16px;
|
|
3304
3305
|
width: auto;
|
|
3305
3306
|
background-color: ${h("error",500)};
|
|
@@ -3311,16 +3312,16 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3311
3312
|
font-size: 12px;
|
|
3312
3313
|
font-weight: 700;
|
|
3313
3314
|
color: ${h("error",100)};
|
|
3314
|
-
`,children:t.jsx("p",{"aria-label":`${u} unread message`,children:g})})}):null]})})),
|
|
3315
|
+
`,children:t.jsx("p",{"aria-label":`${u} unread message`,children:g})})}):null]})})),Pf=r.css`
|
|
3315
3316
|
display: flex;
|
|
3316
3317
|
justify-content: flex-start;
|
|
3317
3318
|
align-items: center;
|
|
3318
3319
|
gap: 8px;
|
|
3319
|
-
`,
|
|
3320
|
+
`,Mf=e=>r.css`
|
|
3320
3321
|
width: ${e||"16px"};
|
|
3321
3322
|
position: relative;
|
|
3322
3323
|
display: flex;
|
|
3323
|
-
`,
|
|
3324
|
+
`,_f=r.css`
|
|
3324
3325
|
height: 4px;
|
|
3325
3326
|
width: 4px;
|
|
3326
3327
|
background-color: ${h("error",500)};
|
|
@@ -3328,7 +3329,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3328
3329
|
position: absolute;
|
|
3329
3330
|
top: 0px;
|
|
3330
3331
|
right: 0px;
|
|
3331
|
-
`,
|
|
3332
|
+
`,Df=r.css`
|
|
3332
3333
|
height: 10px;
|
|
3333
3334
|
background-color: ${h("error",500)};
|
|
3334
3335
|
padding: 0 3px 1px 3px;
|
|
@@ -3339,11 +3340,11 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3339
3340
|
position: absolute;
|
|
3340
3341
|
top: -2px;
|
|
3341
3342
|
left: 9px;
|
|
3342
|
-
`,
|
|
3343
|
+
`,If=r.css`
|
|
3343
3344
|
font-size: 9px;
|
|
3344
3345
|
font-weight: 700;
|
|
3345
3346
|
color: ${h("error",100)};
|
|
3346
|
-
`,
|
|
3347
|
+
`,Vf=r.css`
|
|
3347
3348
|
height: 16px;
|
|
3348
3349
|
min-width: 16px;
|
|
3349
3350
|
background-color: ${h("error",500)};
|
|
@@ -3352,11 +3353,11 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3352
3353
|
justify-content: center;
|
|
3353
3354
|
align-items: center;
|
|
3354
3355
|
padding: 0px 4px 1px 4px;
|
|
3355
|
-
`,
|
|
3356
|
+
`,Nf=r.css`
|
|
3356
3357
|
font-size: 16px;
|
|
3357
3358
|
font-weight: 700;
|
|
3358
3359
|
color: ${h("error",100)};
|
|
3359
|
-
`,
|
|
3360
|
+
`,Af=(e,t)=>r.css`
|
|
3360
3361
|
width: 100%;
|
|
3361
3362
|
max-width: ${"small"===e?"234px":"320px"};
|
|
3362
3363
|
border-radius: 4px;
|
|
@@ -3371,7 +3372,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3371
3372
|
button {
|
|
3372
3373
|
margin-left: ${t?0:"24px"};
|
|
3373
3374
|
}
|
|
3374
|
-
`,
|
|
3375
|
+
`,zf=r.css`
|
|
3375
3376
|
display: flex;
|
|
3376
3377
|
align-items: flex-start;
|
|
3377
3378
|
gap: 8px;
|
|
@@ -3379,28 +3380,28 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3379
3380
|
svg {
|
|
3380
3381
|
margin-top: 6px;
|
|
3381
3382
|
}
|
|
3382
|
-
`,
|
|
3383
|
+
`,Bf=e=>r.css`
|
|
3383
3384
|
color: ${h("neutral",800)};
|
|
3384
3385
|
font-size: ${"small"===e?"14px":"18px"};
|
|
3385
3386
|
line-height: ${"small"===e?"20px":"28px"};
|
|
3386
3387
|
font-weight: 400;
|
|
3387
3388
|
text-align: left;
|
|
3388
|
-
`,
|
|
3389
|
+
`,Hf=e=>r.css`
|
|
3389
3390
|
color: ${h("neutral",700)};
|
|
3390
3391
|
font-size: ${"small"===e?"12px":"16px"};
|
|
3391
3392
|
line-height: ${"small"===e?"16px":"24px"};
|
|
3392
3393
|
font-weight: 400;
|
|
3393
3394
|
margin-left: 24px;
|
|
3394
3395
|
text-align: left;
|
|
3395
|
-
`,
|
|
3396
|
+
`,Ff=r.css`
|
|
3396
3397
|
background-color: ${h("neutral",100)};
|
|
3397
3398
|
border: 1px solid ${h("neutral",300)};
|
|
3398
3399
|
color: ${h("neutral",700)};
|
|
3399
|
-
`,
|
|
3400
|
+
`,Zf=r.css`
|
|
3400
3401
|
background-color: ${h("neutral",200)};
|
|
3401
3402
|
border: 1px solid ${h("neutral",300)};
|
|
3402
3403
|
color: ${h("neutral",700)};
|
|
3403
|
-
`,
|
|
3404
|
+
`,Wf=r.css`
|
|
3404
3405
|
background-color: ${h("success",100)};
|
|
3405
3406
|
border: 1px solid ${h("success",300)};
|
|
3406
3407
|
color: ${h("success",500)};
|
|
@@ -3408,7 +3409,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3408
3409
|
p {
|
|
3409
3410
|
color: ${h("success",900)};
|
|
3410
3411
|
}
|
|
3411
|
-
`,
|
|
3412
|
+
`,qf=r.css`
|
|
3412
3413
|
background-color: ${h("warning",100)};
|
|
3413
3414
|
border: 1px solid ${h("warning",300)};
|
|
3414
3415
|
color: ${h("warning",500)};
|
|
@@ -3416,7 +3417,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3416
3417
|
p {
|
|
3417
3418
|
color: ${h("warning",900)};
|
|
3418
3419
|
}
|
|
3419
|
-
`,
|
|
3420
|
+
`,Gf=r.css`
|
|
3420
3421
|
background-color: ${h("error",100)};
|
|
3421
3422
|
border: 1px solid ${h("error",300)};
|
|
3422
3423
|
color: ${h("error",500)};
|
|
@@ -3424,32 +3425,32 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3424
3425
|
p {
|
|
3425
3426
|
color: ${h("error",900)};
|
|
3426
3427
|
}
|
|
3427
|
-
`,
|
|
3428
|
+
`,Uf=r.css`
|
|
3428
3429
|
height: 8px;
|
|
3429
3430
|
width: 100%;
|
|
3430
3431
|
background-color: ${h("neutral",300)};
|
|
3431
3432
|
display: flex;
|
|
3432
3433
|
align-items: center;
|
|
3433
3434
|
justify-content: flex-start;
|
|
3434
|
-
`,
|
|
3435
|
+
`,Xf=e=>r.css`
|
|
3435
3436
|
height: 100%;
|
|
3436
3437
|
width: ${e}%;
|
|
3437
3438
|
background-color: ${h("primary",500)};
|
|
3438
3439
|
transition: width 0.5s ease-in-out;
|
|
3439
|
-
`,
|
|
3440
|
+
`,Yf=r.css`
|
|
3440
3441
|
width: 100%;
|
|
3441
3442
|
display: flex;
|
|
3442
3443
|
align-items: center;
|
|
3443
3444
|
justify-content: space-between;
|
|
3444
3445
|
position: relative;
|
|
3445
|
-
`,
|
|
3446
|
+
`,Kf=r.css`
|
|
3446
3447
|
height: 60px;
|
|
3447
3448
|
width: 80px;
|
|
3448
3449
|
display: flex;
|
|
3449
3450
|
flex-direction: column;
|
|
3450
3451
|
align-items: center;
|
|
3451
3452
|
justify-content: space-between;
|
|
3452
|
-
`,
|
|
3453
|
+
`,Jf=(e,t)=>r.css`
|
|
3453
3454
|
height: 32px;
|
|
3454
3455
|
width: 32px;
|
|
3455
3456
|
display: flex;
|
|
@@ -3485,12 +3486,12 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3485
3486
|
}
|
|
3486
3487
|
|
|
3487
3488
|
${t?`\n background-color: ${h("neutral",300)};\n \n &:hover {\n background-color: ${h("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
3488
|
-
`,
|
|
3489
|
+
`,Qf=e=>r.css`
|
|
3489
3490
|
color: ${h("neutral",e?800:600)};
|
|
3490
3491
|
font-size: 14px;
|
|
3491
3492
|
line-height: 20px;
|
|
3492
3493
|
font-weight: 400;
|
|
3493
|
-
`,
|
|
3494
|
+
`,ex=r.css`
|
|
3494
3495
|
height: 1px;
|
|
3495
3496
|
width: 100%;
|
|
3496
3497
|
padding: 0 30px;
|
|
@@ -3498,11 +3499,11 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3498
3499
|
top: 16px;
|
|
3499
3500
|
left: 0;
|
|
3500
3501
|
z-index: -1;
|
|
3501
|
-
`,
|
|
3502
|
+
`,tx=r.css`
|
|
3502
3503
|
height: 1px;
|
|
3503
3504
|
width: 100%;
|
|
3504
3505
|
background-color: ${h("neutral",400)};
|
|
3505
|
-
`,
|
|
3506
|
+
`,nx=r.css`
|
|
3506
3507
|
justify-content: space-between;
|
|
3507
3508
|
align-items: center;
|
|
3508
3509
|
gap: 8px;
|
|
@@ -3545,21 +3546,21 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3545
3546
|
color: ${h("error",900)};
|
|
3546
3547
|
}
|
|
3547
3548
|
}
|
|
3548
|
-
`,
|
|
3549
|
+
`,rx=r.css`
|
|
3549
3550
|
font-size: 18px;
|
|
3550
3551
|
line-height: 28px;
|
|
3551
3552
|
font-weight: 400;
|
|
3552
3553
|
color: ${h("neutral",800)};
|
|
3553
|
-
`,
|
|
3554
|
+
`,ox=r.css`
|
|
3554
3555
|
font-size: 16px;
|
|
3555
3556
|
line-height: 24px;
|
|
3556
3557
|
font-weight: 400;
|
|
3557
3558
|
color: ${h("neutral",700)};
|
|
3558
|
-
`,ox=r.css`
|
|
3559
|
-
padding: 6px;
|
|
3560
3559
|
`,ix=r.css`
|
|
3561
3560
|
padding: 6px;
|
|
3562
|
-
`,ax=
|
|
3561
|
+
`,ax=r.css`
|
|
3562
|
+
padding: 6px;
|
|
3563
|
+
`,sx={pauseOnPageIdle:!0,offsets:"24px"},lx={"top-start":e.createToaster({placement:"top-start",...sx}),"top-end":e.createToaster({placement:"top-end",...sx}),"bottom-start":e.createToaster({placement:"bottom-start",...sx}),"bottom-end":e.createToaster({placement:"bottom-end",...sx})};exports.AnalysisWidget=({children:r,header:o,footer:i,expanded:a=!0,collapsible:s=!0,actions:l,showFooterOnCollapsed:c=!1})=>{const u="analysis-widget-item",[d,p]=n.useState(a),h=`analysis-widget-header-${u}`;return t.jsx(e.Box,{as:"section","aria-labelledby":h,css:la,children:t.jsxs(e.Accordion.Root,{multiple:!0,value:s?void 0:[u],defaultValue:a?[u]:[],children:[t.jsxs(e.Accordion.Item,{css:ua,value:u,children:[o&&t.jsx(e.Accordion.ItemTrigger,{id:h,role:"button","aria-expanded":d,tabIndex:0,css:ca,pointerEvents:s?"auto":"none",onClick:s?()=>{p(!d)}:void 0,children:t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>t.jsx(b,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),s&&t.jsx(e.Accordion.ItemIndicator,{height:"16px",marginTop:"8px",display:"flex",children:t.jsx($,{"aria-label":"Toggle section",color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]})}),t.jsxs("div",{className:d?"item-content-open":"item-content-closed","aria-hidden":!d,children:[r,!c&&i&&t.jsx(e.Box,{css:da,children:i})]})]}),c&&i&&t.jsx(e.Box,{css:da,children:i})]})})},exports.Avatar=Tf,exports.Badge=({hasNotification:e,notificationCount:r,label:o})=>{const[i,a]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?a(!0):a(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const s=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let l="16px";return r&&r>99?l="28px":r&&r>9&&(l="22px"),i?t.jsxs("div",{css:Pf,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Mf(),children:[t.jsx(I,{color:"currentColor",height:"16px",width:"16px"}),!e||r||o?null:t.jsx("div",{css:_f,"aria-hidden":!0})]}),o?t.jsx("p",{children:o}):null,s.length>0?t.jsx("div",{css:Vf,children:t.jsx("p",{css:Nf,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:Pf,role:"status","aria-live":"polite",children:[o?t.jsx("p",{children:o}):null,t.jsxs("div",{css:Mf(l),children:[s.length>0?t.jsx("div",{css:Df,children:t.jsx("p",{css:If,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:_f,"aria-hidden":!0}):null,t.jsx(I,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:o,additionalSettings:i,options:a,onOptionSelected:s,maxHeight:l="400px",maxWidth:c="260px"})=>{const u=n.useRef(null),d=n.useRef(null);return n.useEffect((()=>{const e=u.current,t=d.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)}),[]),t.jsx("div",{ref:d,css:yn(l,c),children:t.jsxs("div",{className:"ds-base-map-scroll-content",children:[t.jsxs("div",{css:wn,children:[t.jsx("h2",{ref:u,className:"ds-base-map-header-title",tabIndex:-1,children:e}),t.jsx("p",{className:"ds-base-map-header-caption",children:o})]}),t.jsxs("div",{css:Cn,children:[i?t.jsx("div",{css:jn,children:i.map((e=>t.jsxs("div",{children:[t.jsx(Le,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:kn,children:e.children}):null]},e.label)))}):null,a?t.jsx("div",{css:$n,children:a.map((e=>{return t.jsxs("div",{css:Sn(e.active),role:"button",onClick:()=>s?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||s?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
|
|
3563
3564
|
height: 32px;
|
|
3564
3565
|
width: 32px;
|
|
3565
3566
|
border: 1px solid ${h("neutral",300)};
|
|
@@ -3567,7 +3568,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3567
3568
|
background-image: url(${n});
|
|
3568
3569
|
background-size: cover;
|
|
3569
3570
|
background-position: center;
|
|
3570
|
-
`)}),t.jsxs("div",{css:En,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(Wt,{label:"Active",variant:"warning",size:"small",icon:t.jsx(C,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})})},exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>i);n.useEffect((()=>{l(r.length>i)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:
|
|
3571
|
+
`)}),t.jsxs("div",{css:En,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(Wt,{label:"Active",variant:"warning",size:"small",icon:t.jsx(C,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})})},exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>i);n.useEffect((()=>{l(r.length>i)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Ph,children:t.jsxs(c,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:Mh,children:o||t.jsx($,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:_h,type:"button",onClick:()=>l(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Mh,children:o||t.jsx($,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:Ph,children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((i,a)=>i?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:Ph,children:a<r.length-1?t.jsxs(c,{to:i.link,href:i.link,children:[i.icon,i.label]}):t.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Mh,children:o||t.jsx($,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=b,exports.Checkbox=Le,exports.CheckboxList=({label:o,caption:i,checkboxes:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,required:d})=>{const[p,h]=n.useState(s?{[s]:!0}:{}),f=`${o}. ${i?`${i}.`:""} ${d?"Required.":"Optional"} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:ot,"aria-label":f,children:[c?t.jsx("div",{css:lt}):null,t.jsxs("div",{css:(x=!!c,r.css`
|
|
3571
3572
|
margin-left: ${x?"19px":"0px"};
|
|
3572
3573
|
`),children:[t.jsxs("p",{css:it,"aria-label":o,children:[d&&t.jsx("span",{"aria-label":"required",children:"*"}),o]}),t.jsx("p",{css:at,"aria-label":i,children:i}),c?t.jsx("p",{css:ct,"aria-label":c,children:c}):null,t.jsx("div",{css:st(u),children:a.map((e=>t.jsx(Le,{css:{},defaultChecked:s===e.value,onCheckedChange:({checked:t})=>((e,t)=>{const n={...p};t&&(n[t]=e,h(n)),l&&l(n)})(t,e.name),...e},e.name)))})]})]});var x},exports.CheckboxOptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.CheckboxGroup,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((o=>{return t.jsxs(e.CheckboxCard.Root,{css:Oe,defaultChecked:-1!==n?.indexOf(o.value),disabled:o.disabled,value:o.value,children:[t.jsx(e.CheckboxCard.HiddenInput,{}),t.jsxs(e.CheckboxCard.Control,{css:Te,children:[t.jsxs(e.CheckboxCard.Content,{css:(a=o.variant,r.css`
|
|
3573
3574
|
width: 100%;
|
|
@@ -3582,13 +3583,13 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3582
3583
|
padding: 0px;
|
|
3583
3584
|
padding-top: 8px;
|
|
3584
3585
|
color: ${i?h("neutral",500):"inherit"};
|
|
3585
|
-
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=se,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(Ln,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:aa,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:sa,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:_h(r,o),children:t.jsxs("div",{css:Dh(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ih,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Vh,children:[n," ",a]})})]})})},exports.IconButton=ae,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Hf;return"info-grey"===r?c=Ff:"success"===r?c=Zf:"warning"===r?c=Wf:"error"===r&&(c=qf),t.jsxs("div",{css:[Nf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Af,children:[i,t.jsx("p",{css:zf(o),children:e})]}),t.jsx("p",{css:Bf(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:ut,children:[i?t.jsx("div",{css:ht}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:dt(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:pt(p),"aria-label":o,children:o}),i?t.jsx("p",{css:ft,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:xt(!!i,s),attached:!0,children:["start"===s?t.jsx(Ut,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(Ct,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Ut,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=_i,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Go,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:Uo,children:[r,t.jsx(Wt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Xo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(qe,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(ti,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:qo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ti,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:ni,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ri,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:oi,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:ii,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ai,children:[t.jsxs("div",{css:si,children:[t.jsx(ae,{icon:t.jsx(T,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(ae,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ae,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:li,children:[t.jsxs("div",{children:[t.jsx("h3",{css:ci,children:e}),t.jsx("p",{css:ui,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:di,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(gi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=Fi,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(N,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(fe,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=Ln,exports.MapMarkers=On,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Vo({open:e,onOpenChange:r,placement:c,whileElementsMounted:oo,middleware:[vo(u),(b={fallbackAxisSideDirection:"start"},{...so(b),options:[b,y]}),mo({padding:8}),bo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=Po(),v=Vr("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Do(f),{escapeKey:C,outsidePress:j}=Do(x),k=l.useRef(!1),$=Vr((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?_r(g.nodesRef.current,o):[];if(!y&&(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")})),S=Vr((e=>{var t;const n=()=>{var t;$(e),null==(t=Tr(e))||t.removeEventListener("keydown",n)};null==(t=Tr(e))||t.addEventListener("keydown",n)})),E=Vr((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Tr(e),l="[data-floating-ui-inert]",c=Mr(o.floating).querySelectorAll(l);let d=In(s)?s:null;for(;d&&!Kn(d);){const e=er(d);if(Kn(e)||!In(e))break;d=e}if(c.length&&In(s)&&!s.matches("html,body")&&!Or(s,o.floating)&&Array.from(c).every((e=>!Or(d,e))))return;if(Vn(s)&&O){const t=Kn(s),n=Jn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&_r(g.nodesRef.current,p).some((t=>{var n;return Pr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Pr(e,o.floating)||Pr(e,o.domReference)||h)return;const f=g?_r(g.nodesRef.current,p):[];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")})),R=Vr((e=>{var t;const n=()=>{var t;E(e),null==(t=Tr(e))||t.removeEventListener(u,n)};null==(t=Tr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Xn()?5:0)}const d=Mr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(In(o.domReference)&&(p=nr(o.domReference)),In(o.floating)&&(p=p.concat(nr(o.floating))),!In(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(nr(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const L=l.useMemo((()=>({onKeyDown:$,...d&&{[Mo[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[_o[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:L,floating:O}:{}),[a,L,O])}(g,{escapeKey:d,outsidePress:p}),C=zo(g,{role:"dialog"}),{getFloatingProps:j}=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=>No(t,e,"reference")),t),i=l.useCallback((t=>No(t,e,"floating")),n),a=l.useCallback((t=>No(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Bo,children:[t.jsxs("div",{css:Ho,children:[i,t.jsx(se,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:Fo,children:a}),s?t.jsx("div",{css:Zo,children:s}):null,t.jsx("div",{ref:h,css:Wo(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=Ce,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Hh(o,r)));return t.jsx("div",{css:Nh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Hh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Ah,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:zh,children:[i,s?t.jsx("div",{css:Bh,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(cs,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:us(i),children:[t.jsxs(e.Dialog.Header,{css:ds,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:ps,asChild:!0,children:t.jsx(se,{})})]}),t.jsx(e.Dialog.Body,{css:hs,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:Se,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ke(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(Ee,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:$e(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d,backgroundColor:p})=>{const f=n.useRef(null),x=n.useRef(null),g=n.useRef(null),[v,m]=n.useState(!1),[y,w]=n.useState(-1),[C,j]=n.useState("undefined"!=typeof window&&window?.innerWidth<=df),[k,$]=n.useState(!1),S=o,R=n.useCallback((()=>{if(x.current&&f.current&&g.current){const e=f.current.getBoundingClientRect(),t=x.current.getBoundingClientRect(),n=g.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=df||window.innerWidth<=y?(d?.(96),m(!0)):window.innerWidth>df&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),m(!0),w(window.innerWidth)):window.innerWidth>y&&(d?.(48),m(!1),w(-1)):(d?.(48),m(!1),w(-1)),v&&(window.innerWidth<=df||n.right>=t.left?(j(!0),d?.(48)):(j(!1),d?.(96)))}}),[y,v]);return n.useEffect((()=>(R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)})),[R]),t.jsxs("nav",{css:Fh(v&&!C,u,p),children:[t.jsxs("div",{css:Wh(v&&!C,c),children:[t.jsxs("div",{css:(L=v&&!C,r.css`
|
|
3586
|
+
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=se,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(Ln,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:aa,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:sa,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:Dh(r,o),children:t.jsxs("div",{css:Ih(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Vh,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Nh,children:[n," ",a]})})]})})},exports.IconButton=ae,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Ff;return"info-grey"===r?c=Zf:"success"===r?c=Wf:"warning"===r?c=qf:"error"===r&&(c=Gf),t.jsxs("div",{css:[Af(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:zf,children:[i,t.jsx("p",{css:Bf(o),children:e})]}),t.jsx("p",{css:Hf(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:ut,children:[i?t.jsx("div",{css:ht}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:dt(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:pt(p),"aria-label":o,children:o}),i?t.jsx("p",{css:ft,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:xt(!!i,s),attached:!0,children:["start"===s?t.jsx(Ut,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(Ct,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Ut,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=_i,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Go,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:Uo,children:[r,t.jsx(Wt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Xo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(qe,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(ti,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:qo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ti,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:ni,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ri,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:oi,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:ii,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ai,children:[t.jsxs("div",{css:si,children:[t.jsx(ae,{icon:t.jsx(T,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(ae,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ae,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:li,children:[t.jsxs("div",{children:[t.jsx("h3",{css:ci,children:e}),t.jsx("p",{css:ui,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:di,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(gi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=Fi,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(N,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(fe,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=Ln,exports.MapMarkers=On,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Vo({open:e,onOpenChange:r,placement:c,whileElementsMounted:oo,middleware:[vo(u),(b={fallbackAxisSideDirection:"start"},{...so(b),options:[b,y]}),mo({padding:8}),bo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=Po(),v=Vr("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Do(f),{escapeKey:C,outsidePress:j}=Do(x),k=l.useRef(!1),$=Vr((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?_r(g.nodesRef.current,o):[];if(!y&&(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")})),S=Vr((e=>{var t;const n=()=>{var t;$(e),null==(t=Tr(e))||t.removeEventListener("keydown",n)};null==(t=Tr(e))||t.addEventListener("keydown",n)})),E=Vr((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Tr(e),l="[data-floating-ui-inert]",c=Mr(o.floating).querySelectorAll(l);let d=In(s)?s:null;for(;d&&!Kn(d);){const e=er(d);if(Kn(e)||!In(e))break;d=e}if(c.length&&In(s)&&!s.matches("html,body")&&!Or(s,o.floating)&&Array.from(c).every((e=>!Or(d,e))))return;if(Vn(s)&&O){const t=Kn(s),n=Jn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&_r(g.nodesRef.current,p).some((t=>{var n;return Pr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Pr(e,o.floating)||Pr(e,o.domReference)||h)return;const f=g?_r(g.nodesRef.current,p):[];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")})),R=Vr((e=>{var t;const n=()=>{var t;E(e),null==(t=Tr(e))||t.removeEventListener(u,n)};null==(t=Tr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Xn()?5:0)}const d=Mr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(In(o.domReference)&&(p=nr(o.domReference)),In(o.floating)&&(p=p.concat(nr(o.floating))),!In(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(nr(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const L=l.useMemo((()=>({onKeyDown:$,...d&&{[Mo[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[_o[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:L,floating:O}:{}),[a,L,O])}(g,{escapeKey:d,outsidePress:p}),C=zo(g,{role:"dialog"}),{getFloatingProps:j}=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=>No(t,e,"reference")),t),i=l.useCallback((t=>No(t,e,"floating")),n),a=l.useCallback((t=>No(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Bo,children:[t.jsxs("div",{css:Ho,children:[i,t.jsx(se,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:Fo,children:a}),s?t.jsx("div",{css:Zo,children:s}):null,t.jsx("div",{ref:h,css:Wo(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=Ce,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Fh(o,r)));return t.jsx("div",{css:Ah,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Fh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:zh,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Bh,children:[i,s?t.jsx("div",{css:Hh,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(cs,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:us(i),children:[t.jsxs(e.Dialog.Header,{css:ds,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:ps,asChild:!0,children:t.jsx(se,{})})]}),t.jsx(e.Dialog.Body,{css:hs,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:Se,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ke(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(Ee,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:$e(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d,backgroundColor:p})=>{const f=n.useRef(null),x=n.useRef(null),g=n.useRef(null),[v,m]=n.useState(!1),[y,w]=n.useState(-1),[C,j]=n.useState("undefined"!=typeof window&&window?.innerWidth<=pf),[k,$]=n.useState(!1),S=o,R=n.useCallback((()=>{if(x.current&&f.current&&g.current){const e=f.current.getBoundingClientRect(),t=x.current.getBoundingClientRect(),n=g.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=pf||window.innerWidth<=y?(d?.(96),m(!0)):window.innerWidth>pf&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),m(!0),w(window.innerWidth)):window.innerWidth>y&&(d?.(48),m(!1),w(-1)):(d?.(48),m(!1),w(-1)),v&&(window.innerWidth<=pf||n.right>=t.left?(j(!0),d?.(48)):(j(!1),d?.(96)))}}),[y,v]);return n.useEffect((()=>(R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)})),[R]),t.jsxs("nav",{css:Zh(v&&!C,u,p),children:[t.jsxs("div",{css:qh(v&&!C,c),children:[t.jsxs("div",{css:(L=v&&!C,r.css`
|
|
3586
3587
|
display: flex;
|
|
3587
3588
|
align-items: center;
|
|
3588
3589
|
justify-content: flex-start;
|
|
3589
3590
|
gap: 12px;
|
|
3590
3591
|
color: ${h("neutral",L?100:900)};
|
|
3591
|
-
`),ref:f,children:[e?t.jsx("div",{ref:g,css:
|
|
3592
|
+
`),ref:f,children:[e?t.jsx("div",{ref:g,css:Gh,children:e}):null,t.jsx("div",{css:Uh(v),children:a?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:Xh(i===e.link),children:e.label},e.label):t.jsx(Ce,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:Yh,ref:x,children:C?t.jsxs("button",{type:"button",onClick:()=>$(!k),"aria-label":"Open menu",css:Qh,children:[k?"Close":"Menu",k?t.jsx(E,{height:"16px",width:"16px"}):t.jsx(J,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Yh,children:s?.map(((e,n)=>t.jsx("div",{css:Kh(v),children:e},n)))}),l?t.jsx("div",{css:Jh(v),children:l.map((e=>t.jsx(b,{...e},e.ariaLabel)))}):null]})})]}),v&&!C?t.jsx("div",{css:Wh,children:a?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:Xh(i===e.link),children:e.label},e.label):t.jsx(Ce,{label:e.label,items:e.items||[]},e.label)))}):null,C?t.jsx(df,{navigationSection:a,utilitySection:s,actionsSection:l,linkRouter:o,isOpen:k,setIsOpen:$,pathname:i}):null]});var L},exports.NavigationRail=({tabs:r=[],defaultValue:o,onTabClick:i,children:a,onOpenChange:s})=>{const[l,c]=n.useState(!1),[u,d]=n.useState(o||r?.[0]?.value),p=e=>{d(e),i&&i(e)},[f]=e.useMediaQuery(["(max-width: 768px)"]);return f?t.jsxs(e.Tabs.Root,{defaultValue:u,onValueChange:({value:e})=>p(e),children:[t.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"8px",gap:"8px"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{value:n.value,css:{"--indicator-color":h("primary",500),flexShrink:0,padding:"10px 16px",color:h("neutral",600),"&[data-selected]":{color:h("neutral",800),fontWeight:600}},children:n.label},n.value)))}),r.map((n=>t.jsx(e.Tabs.Content,{value:n.value,children:a},n.value)))]}):t.jsxs("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[t.jsxs("div",{css:hf,children:[t.jsx(e.Tabs.Root,{defaultValue:o||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{p(e)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{css:ff,"aria-label":n["aria-label"]||n.label,...n,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"ds-tab-label",children:[n.icon?t.jsx("div",{css:xf,children:n.icon}):null,t.jsx("p",{children:n.label})]})},n.label)))})}),a?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{c(e),s&&s(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:gf,children:[t.jsx("div",{css:xf,children:l?t.jsx(w,{}):t.jsx(y,{})}),t.jsxs("div",{className:"ds-tab-label",children:[t.jsx("p",{children:l?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),a?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!l,children:t.jsx(e.Collapsible.Content,{height:"100%",children:t.jsx("div",{css:vf,role:"tabpanel","aria-labelledby":u,children:a})})}):null]})},exports.OptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((n=>{return t.jsxs(e.RadioCard.Item,{css:Ie,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Ve,children:[t.jsxs("div",{css:(i=n.variant,r.css`
|
|
3592
3593
|
width: 100%;
|
|
3593
3594
|
display: flex;
|
|
3594
3595
|
flex-direction: ${"centered"===i?"column":"row"};
|
|
@@ -3612,7 +3613,7 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3612
3613
|
font-weight: 700;
|
|
3613
3614
|
color: ${h("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
|
|
3614
3615
|
}
|
|
3615
|
-
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:en(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:tn(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:tn(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:tn(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:tn(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:tn(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:
|
|
3616
|
+
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:en(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:tn(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:tn(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:tn(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:tn(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:tn(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:Uf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Xf(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"}),ariaLabelType:c=""})=>{const[u,d]=n.useState(!0),p=n.useId(),h=n.useId(),f="raster"===e,x="line"===e,g="point"===e,v=n.useId(),m=n.useMemo((()=>{let e=c??`${c},`;x&&(e="line,");return`${e} ${r}${o?`, ${o}`:""}. Currently ${u?"visible":"hidden"}.`}),[u,e,r,o]),y=u?"Hide":"Show";return t.jsxs("div",{css:yi,children:[t.jsx("p",{id:v,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:m}),t.jsxs("div",{css:wi,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:vi(i)}),x&&t.jsx("div",{css:mi(i)}),g&&t.jsx("div",{css:bi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:Ci,children:r}),o?t.jsx("p",{id:h,css:ji,children:o}):null]})]}),a&&s?t.jsx("div",{css:ki,children:t.jsx(b,{type:"button",variant:"borderless",label:y,rightIcon:u?t.jsx(O,{}):t.jsx(L,{}),"aria-pressed":u,"aria-labelledby":`${v} ${p}`,onClick:()=>{d((e=>!e)),a?.()}})}):null]})},exports.Radio=We,exports.RadioGroup=qe,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:nn,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:sn}):null,t.jsxs("div",{css:(f=!!c,r.css`
|
|
3616
3617
|
margin-left: ${f?"19px":"0px"};
|
|
3617
3618
|
`),children:[t.jsxs("p",{css:rn,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:on,"aria-label":o,children:o}),c?t.jsx("p",{css:ln,"aria-label":c,children:c}):null,t.jsx("div",{css:an,children:t.jsx(qe,{name:i,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(We,{css:"card"===d?cn:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=re,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:$i,children:[i?t.jsx("div",{css:(a=Oi(e),r.css`
|
|
3618
3619
|
height: 20px;
|
|
@@ -3621,4 +3622,4 @@ function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3621
3622
|
border: 1px solid ${h("neutral",300)};
|
|
3622
3623
|
border-radius: 4px;
|
|
3623
3624
|
${a?`background: ${a};`:""}
|
|
3624
|
-
`)}):t.jsx("div",{css:Si,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:Ei,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ri,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Ei,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Li,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Search=({placeholder:r,disabled:o,size:i="default",options:a=[],resultsMaxHeight:s="200px",isLoading:l=!1,displayResults:c="text",onSelect:u,onQueryChange:d,onClear:p,renderResults:f})=>{const[x,g]=n.useState(""),{open:v,onOpen:m,onClose:b}=e.useDisclosure(),[y,w]=n.useState(a),[C,j]=n.useState(-1),k=n.useRef(null),$=`search-results-${n.useId()}`,S=e=>{const t=a.find((t=>t.id===e||t.label===e));t&&(u?.(t),g(""),b())};n.useEffect((()=>{if(d?.(x),!x)return void w(a);const e=a.filter((e=>e.id?.toLowerCase().includes(x.toLowerCase())||e.label.toLowerCase().includes(x.toLowerCase())||e.caption?.toLowerCase().includes(x.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>S(e.id||e.label)})));w(e),m()}),[x]),n.useEffect((()=>{function e(e){v&&k.current&&!k.current.contains(e.target)&&b()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[v]);const E=x.length?t.jsx(se,{style:{marginTop:"-12px"},onClick:()=>{g(""),p?.()}}):null,R="none"!==c&&!!x.length&&y.length>0&&v;return t.jsxs("div",{ref:k,style:{position:"relative",width:"100%"},children:[t.jsx(e.InputGroup,{startElement:t.jsx(ne,{fill:o?h("neutral",500):h("primary",700),style:{marginTop:"-12px"}}),endElement:E,children:t.jsx(Ct,{autoComplete:"off",placeholder:r||"Filter",onChange:e=>{const{value:t}=e.target;g(t)},value:x,label:"",style:{paddingLeft:"40px"},type:"search","aria-label":r||"Search filter","aria-expanded":R,"aria-controls":$,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,y.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),C>=0)){const e=y[C];S(e.id||e.label)}"Escape"===e.key&&b()}}})}),(R||l&&!!x.length)&&"custom"===c&&f&&!l&&f({items:y,highlightedIndex:C,query:x,onSelect:S}),(R||l&&!!x.length)&&t.jsx(e.Portal,{container:k,children:t.jsxs(e.Box,{position:"absolute",marginTop:"-20px",width:"100%",backgroundColor:"white",border:"1px solid",borderColor:"gray.200",borderRadius:"md",boxShadow:"md",zIndex:1e3,overflowY:"auto",maxHeight:s,children:[l&&t.jsx(e.Box,{padding:"1rem",children:t.jsx(e.Spinner,{})}),"text"===c&&!l&&t.jsx($f,{highlightedIndex:C,items:y,query:x,onSelect:S}),"list"===c&&!l&&t.jsx(Fi,{items:y})]})})]})},exports.Select=Ut,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:u="minimized",className:d,blocking:p,zIndex:h=1e3})=>{const f=n.useRef(null),x=n.useRef([]),[g,v]=n.useState(null),m=window.innerWidth>768,b=x.current;let y="Expand sheet";if(null!=g){const e=b.indexOf(g);e>0&&e<b.length-1?y="Make full screen":e===b.length-1&&(y="Expand sheet")}return t.jsx(Rh,{ref:f,css:Oh(!!e,h),className:d,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("div",{tabIndex:0,role:"button","aria-label":y,"aria-expanded":i,css:Lh,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=b[b.length-1];if(m)return void f.current?.snapTo?.((()=>t));const n=g??b[0];let r=b.findIndex((e=>e>n));-1===r&&(r=b.length-1);const o=b[r];f.current?.snapTo?.((()=>o))}}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,s||e,l+(o?n:0),c||t-t/6];return x.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===u?r=s||e:"mid"===u?r=l+(o?n:0):"full"===u&&(r=c||t-t/6),r},blocking:p,children:i?r:null})},exports.SimpleMapPin=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="simple-pin"})=>o.jsx(Ln,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.Slider=tt,exports.SliderInput=({label:e,caption:r,size:o="default",sliderItem:i,required:a,onChange:s})=>{const[l,c]=n.useState(i.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const a=i.min||0,s=i.max||100;o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>s?s:o,r[t]=o,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,u=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>u?u:o,2===l?.length){o=Number.isNaN(o)?a:o;const e=l[0],n=l[1];0===t?(o=o<a?a:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>u?u:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:un(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:dn(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:pn,children:[i.step&&i.marks?t.jsx(Ut,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(Ct,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(tt,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(Ct,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Xf,children:[e.map(((e,r)=>t.jsxs("div",{css:Yf,children:[t.jsx("button",{css:Kf(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(C,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:Jf(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:Qf,children:t.jsx("div",{css:ex})})]}),exports.Switch=rt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(Cf(i,o)||0),u="view"===r;return t.jsx("div",{css:vf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(Cf(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((r,o)=>t.jsxs(n.Fragment,{children:[u&&1===o&&"left"===jf(l)?t.jsx("div",{css:yf}):null,t.jsx(e.Tabs.Trigger,{css:[mf,u?wf:bf],"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[r.icon,r.label]})},r.label),u&&1===o&&"right"===jf(l)?t.jsx("div",{css:yf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o=[],renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,variant:d="default",onSortColumn:p,onPageSizeChange:f,onPageChange:x,onAllItemsSelected:g,loading:v})=>{const[m,b]=n.useState({key:"",order:""}),{totalItems:y=o.length,currentPage:w=1,pageSize:C=10,showItemCount:j,showItemCountText:k}=l||{},S=(e,t)=>{b({key:e,order:t}),p&&p({key:e,order:t})},E=u?.length===o?.length,R=u&&u.length>0&&!E;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:Xi(d),striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Yi(d),children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Le,{name:"header-checkbox",checked:E,indeterminate:R,onCheckedChange:({checked:e})=>{g&&g(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===m.order?"ascending":n.sortable&&"desc"===m.order?"descending":void 0,children:t.jsxs("div",{css:Ki,children:[n.label,n.sortable?t.jsxs("div",{css:Ji,children:[t.jsx(ae,{css:Qi(m.key===n.key&&"asc"===m.order),icon:t.jsx($,{style:{transform:"rotate(180deg)"}}),onClick:()=>S(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ae,{css:Qi(m.key===n.key&&"desc"===m.order),icon:t.jsx($,{}),onClick:()=>S(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{css:na,children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),v?t.jsx("div",{css:ra,children:t.jsx(e.Spinner,{size:"lg",color:h("primary",500)})}):null,t.jsxs("div",{css:ea,children:[t.jsx("div",{children:j?t.jsx(_i,{pageSize:C,currentPage:w,totalItems:y,onPageSizeChange:f,showItemCountText:k}):null}),l?t.jsx("div",{css:ta,children:t.jsx(Ui,{totalItems:y,pageSize:C,currentPage:w,onPageChange:x})}):null]})]})},exports.TableCell=ia,exports.TableRow=oa,exports.Tag=Wt,exports.TextInput=Ct,exports.Textarea=({label:r,caption:o,placeholder:i,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[w,C]=n.useState(""),j=n.useId(),k=n.useId(),$=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),C(`Enter at least ${p-e} characters`)):p&&0===e&&C(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),C(`You have ${h-e} characters remaining`)):h&&0===e&&C(`Max ${h} characters`)}),[]);const S=!!a||v||b,E=[o?j:null,S?k:null,w?$:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:hn(c),children:[S?t.jsx("div",{css:fn}):null,t.jsxs(e.Field.Root,{required:s,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:xn(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,o?t.jsx(e.Field.HelperText,{id:j,css:gn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:mn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:bn(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),C(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),C(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),C(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:mn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:mn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!w||b||v?null:t.jsx(e.Field.HelperText,{id:$,css:vn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(sx).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:sx[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:tx,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(k,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(P,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(_,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:nx,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:rx,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(b,{css:ox,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),sx[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:ix,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>sx[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=fe,exports.Tooltip=pe,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=d,exports.getThemedColor=h,exports.showToast=e=>{sx[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|
|
3625
|
+
`)}):t.jsx("div",{css:Si,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:Ei,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ri,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Ei,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Li,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Search=({placeholder:r,disabled:o,size:i="default",options:a=[],resultsMaxHeight:s="200px",isLoading:l=!1,displayResults:c="text",onSelect:u,onQueryChange:d,onClear:p,renderResults:f})=>{const[x,g]=n.useState(""),{open:v,onOpen:m,onClose:b}=e.useDisclosure(),[y,w]=n.useState(a),[C,j]=n.useState(-1),k=n.useRef(null),$=`search-results-${n.useId()}`,S=e=>{const t=a.find((t=>t.id===e||t.label===e));t&&(u?.(t),g(""),b())};n.useEffect((()=>{if(d?.(x),!x)return void w(a);const e=a.filter((e=>e.id?.toLowerCase().includes(x.toLowerCase())||e.label.toLowerCase().includes(x.toLowerCase())||e.caption?.toLowerCase().includes(x.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>S(e.id||e.label)})));w(e),m()}),[x]),n.useEffect((()=>{function e(e){v&&k.current&&!k.current.contains(e.target)&&b()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[v]);const E=x.length?t.jsx(se,{style:{marginTop:"-12px"},onClick:()=>{g(""),p?.()}}):null,R="none"!==c&&!!x.length&&y.length>0&&v;return t.jsxs("div",{ref:k,style:{position:"relative",width:"100%"},children:[t.jsx(e.InputGroup,{startElement:t.jsx(ne,{fill:o?h("neutral",500):h("primary",700),style:{marginTop:"-12px"}}),endElement:E,children:t.jsx(Ct,{autoComplete:"off",placeholder:r||"Filter",onChange:e=>{const{value:t}=e.target;g(t)},value:x,label:"",style:{paddingLeft:"40px"},type:"search","aria-label":r||"Search filter","aria-expanded":R,"aria-controls":$,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,y.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),C>=0)){const e=y[C];S(e.id||e.label)}"Escape"===e.key&&b()}}})}),(R||l&&!!x.length)&&"custom"===c&&f&&!l&&f({items:y,highlightedIndex:C,query:x,onSelect:S}),(R||l&&!!x.length)&&t.jsx(e.Portal,{container:k,children:t.jsxs(e.Box,{position:"absolute",marginTop:"-20px",width:"100%",backgroundColor:"white",border:"1px solid",borderColor:"gray.200",borderRadius:"md",boxShadow:"md",zIndex:1e3,overflowY:"auto",maxHeight:s,children:[l&&t.jsx(e.Box,{padding:"1rem",children:t.jsx(e.Spinner,{})}),"text"===c&&!l&&t.jsx(Sf,{highlightedIndex:C,items:y,query:x,onSelect:S}),"list"===c&&!l&&t.jsx(Fi,{items:y})]})})]})},exports.Select=Ut,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:u="minimized",className:d,blocking:p,zIndex:h=1e3})=>{const f=n.useRef(null),x=n.useRef([]),[g,v]=n.useState(null),m=window.innerWidth>768,b=x.current;let y="Expand sheet";if(null!=g){const e=Th(g,b);e>0&&e<b.length-1?y="Make full screen":e===b.length-1&&(y="Expanded sheet")}const w=!(null==g||!b.length||Th(g,b)!==b.length-1);return t.jsx(Rh,{ref:f,css:Oh(!!e,h),className:d,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("button",{type:"button",disabled:w,"aria-label":y,css:Lh,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=b[b.length-1];if(m)return void f.current?.snapTo?.((()=>t));const n=g??b[0];let r=b.findIndex((e=>e>n));-1===r&&(r=b.length-1);const o=b[r];f.current?.snapTo?.((()=>o))}}),t.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:y}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,s||e,l+(o?n:0),c||t-t/6];return x.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===u?r=s||e:"mid"===u?r=l+(o?n:0):"full"===u&&(r=c||t-t/6),r},blocking:p,children:i?r:null})},exports.SimpleMapPin=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="simple-pin"})=>o.jsx(Ln,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.Slider=tt,exports.SliderInput=({label:e,caption:r,size:o="default",sliderItem:i,required:a,onChange:s})=>{const[l,c]=n.useState(i.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const a=i.min||0,s=i.max||100;o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>s?s:o,r[t]=o,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,u=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>u?u:o,2===l?.length){o=Number.isNaN(o)?a:o;const e=l[0],n=l[1];0===t?(o=o<a?a:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>u?u:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:un(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:dn(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:pn,children:[i.step&&i.marks?t.jsx(Ut,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(Ct,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(tt,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(Ct,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Yf,children:[e.map(((e,r)=>t.jsxs("div",{css:Kf,children:[t.jsx("button",{css:Jf(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(C,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:Qf(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:ex,children:t.jsx("div",{css:tx})})]}),exports.Switch=rt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(jf(i,o)||0),u="view"===r;return t.jsx("div",{css:mf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(jf(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((r,o)=>t.jsxs(n.Fragment,{children:[u&&1===o&&"left"===kf(l)?t.jsx("div",{css:wf}):null,t.jsx(e.Tabs.Trigger,{css:[bf,u?Cf:yf],"aria-label":r["aria-label"]||r.label,...r,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[r.icon,r.label]})},r.label),u&&1===o&&"right"===kf(l)?t.jsx("div",{css:wf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o=[],renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,variant:d="default",onSortColumn:p,onPageSizeChange:f,onPageChange:x,onAllItemsSelected:g,loading:v})=>{const[m,b]=n.useState({key:"",order:""}),{totalItems:y=o.length,currentPage:w=1,pageSize:C=10,showItemCount:j,showItemCountText:k}=l||{},S=(e,t)=>{b({key:e,order:t}),p&&p({key:e,order:t})},E=u?.length===o?.length,R=u&&u.length>0&&!E;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:Xi(d),striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Yi(d),children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Le,{name:"header-checkbox",checked:E,indeterminate:R,onCheckedChange:({checked:e})=>{g&&g(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===m.order?"ascending":n.sortable&&"desc"===m.order?"descending":void 0,children:t.jsxs("div",{css:Ki,children:[n.label,n.sortable?t.jsxs("div",{css:Ji,children:[t.jsx(ae,{css:Qi(m.key===n.key&&"asc"===m.order),icon:t.jsx($,{style:{transform:"rotate(180deg)"}}),onClick:()=>S(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ae,{css:Qi(m.key===n.key&&"desc"===m.order),icon:t.jsx($,{}),onClick:()=>S(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{css:na,children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),v?t.jsx("div",{css:ra,children:t.jsx(e.Spinner,{size:"lg",color:h("primary",500)})}):null,t.jsxs("div",{css:ea,children:[t.jsx("div",{children:j?t.jsx(_i,{pageSize:C,currentPage:w,totalItems:y,onPageSizeChange:f,showItemCountText:k}):null}),l?t.jsx("div",{css:ta,children:t.jsx(Ui,{totalItems:y,pageSize:C,currentPage:w,onPageChange:x})}):null]})]})},exports.TableCell=ia,exports.TableRow=oa,exports.Tag=Wt,exports.TextInput=Ct,exports.Textarea=({label:r,caption:o,placeholder:i,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[w,C]=n.useState(""),j=n.useId(),k=n.useId(),$=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),C(`Enter at least ${p-e} characters`)):p&&0===e&&C(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),C(`You have ${h-e} characters remaining`)):h&&0===e&&C(`Max ${h} characters`)}),[]);const S=!!a||v||b,E=[o?j:null,S?k:null,w?$:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:hn(c),children:[S?t.jsx("div",{css:fn}):null,t.jsxs(e.Field.Root,{required:s,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:xn(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,o?t.jsx(e.Field.HelperText,{id:j,css:gn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:mn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:bn(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),C(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),C(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),C(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:mn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:mn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!w||b||v?null:t.jsx(e.Field.HelperText,{id:$,css:vn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(lx).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:lx[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:nx,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(k,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(P,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(_,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:rx,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:ox,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(b,{css:ix,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),lx[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:ax,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>lx[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=fe,exports.Tooltip=pe,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=d,exports.getThemedColor=h,exports.showToast=e=>{lx[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|