@worldresources/wri-design-systems 2.173.0 → 2.174.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 CHANGED
@@ -3127,6 +3127,8 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3127
3127
  height: 40px;
3128
3128
 
3129
3129
  ${"view"===e&&`\n border: 1px solid ${h("neutral",400)};\n background-color: ${h("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
3130
+
3131
+ ${"transparent"===e&&"\n border: none;\n background-color: transparent;\n border-radius: 4px;\n padding: 0px 16px;\n\n .chakra-tabs__list {\n gap: 32px;\n }\n "}
3130
3132
  `,wf=r.css`
3131
3133
  width: 99%;
3132
3134
  height: 40px;
@@ -3277,7 +3279,78 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3277
3279
  opacity: 1;
3278
3280
  }
3279
3281
  }
3280
- `,$f=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Sf=e=>1===e?"none":2===e?"left":"right",Ef=({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)))})},Rf=({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(Ef,{text:t.label,query:r})},t.id)))})},Lf={small:"16px",medium:"24px",large:"40px",default:"16px"};function Of(e,t,n,o){const i=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&Lf[e]?Lf[e]:Lf.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`
3282
+ `,$f=r.css`
3283
+ background-color: transparent;
3284
+ color: ${h("neutral",600)};
3285
+ width: auto;
3286
+ padding: 0px;
3287
+ justify-content: flex-start;
3288
+ border-bottom: 2px solid transparent;
3289
+
3290
+ &:hover {
3291
+ background-color: ${h("neutral",100)};
3292
+ border-bottom: 2px solid ${h("primary",500)};
3293
+ }
3294
+
3295
+ &:active {
3296
+ background-color: ${h("neutral",100)};
3297
+ border-bottom: 2px solid ${h("primary",500)};
3298
+ }
3299
+
3300
+ &:focus-visible {
3301
+ background-color: ${h("neutral",100)};
3302
+ border-bottom: 2px solid ${h("primary",500)};
3303
+ outline-color: ${h("primary",700)};
3304
+ outline-offset: 2px;
3305
+ box-shadow:
3306
+ 0 0 0 2px ${h("neutral",100)},
3307
+ rgba(0, 0, 0, 0.05) 0px 2px 2px 4px;
3308
+ }
3309
+
3310
+ &[data-selected] {
3311
+ background-color: ${h("neutral",100)};
3312
+ border-bottom: 2px solid ${h("primary",500)};
3313
+ color: ${h("neutral",800)};
3314
+
3315
+ &:hover {
3316
+ background-color: ${h("neutral",100)};
3317
+ border-bottom: 2px solid ${h("primary",500)};
3318
+ color: ${h("neutral",800)};
3319
+ }
3320
+
3321
+ &:focus-visible {
3322
+ background-color: ${h("neutral",100)};
3323
+ outline-color: ${h("primary",700)};
3324
+ outline-offset: 2px;
3325
+ box-shadow:
3326
+ 0 0 0 2px ${h("neutral",100)},
3327
+ rgba(0, 0, 0, 0.05) 0px 2px 2px 4px;
3328
+ }
3329
+
3330
+ &::before {
3331
+ content: none;
3332
+ }
3333
+ }
3334
+
3335
+ &[data-disabled] {
3336
+ background-color: transparent;
3337
+ color: ${h("neutral",400)};
3338
+
3339
+ &:hover {
3340
+ border-bottom: 2px solid transparent;
3341
+ }
3342
+
3343
+ &[data-selected] {
3344
+ background-color: ${h("neutral",100)};
3345
+ color: ${h("neutral",400)};
3346
+ opacity: 1;
3347
+
3348
+ &:hover {
3349
+ border-bottom: 2px solid ${h("primary",500)};
3350
+ }
3351
+ }
3352
+ }
3353
+ `,Sf=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Ef=e=>1===e?"none":2===e?"left":"right",Rf=({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)))})},Lf=({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(Rf,{text:t.label,query:r})},t.id)))})},Of={small:"16px",medium:"24px",large:"40px",default:"16px"};function Tf(e,t,n,o){const i=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&Of[e]?Of[e]:Of.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`
3281
3354
  height: ${i};
3282
3355
  width: ${i};
3283
3356
  border-radius: 50%;
@@ -3311,17 +3384,17 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3311
3384
  background-color: ${h("primary",500)};
3312
3385
  }
3313
3386
  }
3314
- `}const Tf=e=>r.css`
3387
+ `}const Pf=e=>r.css`
3315
3388
  width: ${e||"16px"};
3316
3389
  position: absolute;
3317
3390
  top: -8px;
3318
3391
  left: 15px;
3319
- `,Pf=r.css`
3392
+ `,Mf=r.css`
3320
3393
  font-size: 12px;
3321
3394
  line-height: 16px;
3322
3395
  font-weight: 700;
3323
3396
  color: ${h("primary",800)};
3324
- `,Mf=n.forwardRef((({name:n,ariaLabel:o,size:i="medium",customSize:a="",src:s,srcSet:l,onClick:c,notificationCount:d,disabled:u=!0,customBackgroundColor:p=""},f)=>{const x=()=>{u||c?.()},g=(()=>{let e="";return d&&d>0&&(e=`${d>99?"99+":d}`),e})();let v="16px";d&&d>99?v="28px":d&&d>9&&(v="22px");const m=!!s||!!l,b=c&&!u;return t.jsxs(e.Avatar.Root,{"aria-label":o||n,ref:f,css:Of(i,a,u,p),onClick:x,onKeyDown:e=>{u||"Enter"!==e.key||x()},role:b?"button":void 0,tabIndex:b?0:void 0,"aria-disabled":u,children:[m&&t.jsx(e.Avatar.Image,{src:s,srcSet:l}),!m&&n&&t.jsx(e.Avatar.Fallback,{name:n,css:Pf}),!m&&!n&&t.jsx(Q,{size:"100%",style:{padding:"15%",color:u?h("neutral",400):void 0}}),g.length>0?t.jsx("div",{css:Tf(v),children:t.jsx("div",{css:r.css`
3397
+ `,_f=n.forwardRef((({name:n,ariaLabel:o,size:i="medium",customSize:a="",src:s,srcSet:l,onClick:c,notificationCount:d,disabled:u=!0,customBackgroundColor:p=""},f)=>{const x=()=>{u||c?.()},g=(()=>{let e="";return d&&d>0&&(e=`${d>99?"99+":d}`),e})();let v="16px";d&&d>99?v="28px":d&&d>9&&(v="22px");const m=!!s||!!l,b=c&&!u;return t.jsxs(e.Avatar.Root,{"aria-label":o||n,ref:f,css:Tf(i,a,u,p),onClick:x,onKeyDown:e=>{u||"Enter"!==e.key||x()},role:b?"button":void 0,tabIndex:b?0:void 0,"aria-disabled":u,children:[m&&t.jsx(e.Avatar.Image,{src:s,srcSet:l}),!m&&n&&t.jsx(e.Avatar.Fallback,{name:n,css:Mf}),!m&&!n&&t.jsx(Q,{size:"100%",style:{padding:"15%",color:u?h("neutral",400):void 0}}),g.length>0?t.jsx("div",{css:Pf(v),children:t.jsx("div",{css:r.css`
3325
3398
  height: 16px;
3326
3399
  width: auto;
3327
3400
  background-color: ${h("error",500)};
@@ -3333,16 +3406,16 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3333
3406
  font-size: 12px;
3334
3407
  font-weight: 700;
3335
3408
  color: ${h("error",100)};
3336
- `,children:t.jsx("p",{"aria-label":`${d} unread message`,children:g})})}):null]})})),_f=r.css`
3409
+ `,children:t.jsx("p",{"aria-label":`${d} unread message`,children:g})})}):null]})})),Df=r.css`
3337
3410
  display: flex;
3338
3411
  justify-content: flex-start;
3339
3412
  align-items: center;
3340
3413
  gap: 8px;
3341
- `,Df=e=>r.css`
3414
+ `,If=e=>r.css`
3342
3415
  width: ${e||"16px"};
3343
3416
  position: relative;
3344
3417
  display: flex;
3345
- `,If=r.css`
3418
+ `,Vf=r.css`
3346
3419
  height: 4px;
3347
3420
  width: 4px;
3348
3421
  background-color: ${h("error",500)};
@@ -3350,7 +3423,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3350
3423
  position: absolute;
3351
3424
  top: 0px;
3352
3425
  right: 0px;
3353
- `,Vf=r.css`
3426
+ `,Nf=r.css`
3354
3427
  height: 10px;
3355
3428
  background-color: ${h("error",500)};
3356
3429
  padding: 0 3px 1px 3px;
@@ -3361,11 +3434,11 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3361
3434
  position: absolute;
3362
3435
  top: -2px;
3363
3436
  left: 9px;
3364
- `,Nf=r.css`
3437
+ `,Af=r.css`
3365
3438
  font-size: 9px;
3366
3439
  font-weight: 700;
3367
3440
  color: ${h("error",100)};
3368
- `,Af=r.css`
3441
+ `,zf=r.css`
3369
3442
  height: 16px;
3370
3443
  min-width: 16px;
3371
3444
  background-color: ${h("error",500)};
@@ -3374,11 +3447,11 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3374
3447
  justify-content: center;
3375
3448
  align-items: center;
3376
3449
  padding: 0px 4px 1px 4px;
3377
- `,zf=r.css`
3450
+ `,Bf=r.css`
3378
3451
  font-size: 16px;
3379
3452
  font-weight: 700;
3380
3453
  color: ${h("error",100)};
3381
- `,Bf=(e,t)=>r.css`
3454
+ `,Hf=(e,t)=>r.css`
3382
3455
  width: 100%;
3383
3456
  max-width: ${"small"===e?"234px":"320px"};
3384
3457
  border-radius: 4px;
@@ -3393,7 +3466,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3393
3466
  button {
3394
3467
  margin-left: ${t?0:"24px"};
3395
3468
  }
3396
- `,Hf=r.css`
3469
+ `,Ff=r.css`
3397
3470
  display: flex;
3398
3471
  align-items: flex-start;
3399
3472
  gap: 8px;
@@ -3401,28 +3474,28 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3401
3474
  svg {
3402
3475
  margin-top: 6px;
3403
3476
  }
3404
- `,Ff=e=>r.css`
3477
+ `,Zf=e=>r.css`
3405
3478
  color: ${h("neutral",800)};
3406
3479
  font-size: ${"small"===e?"14px":"18px"};
3407
3480
  line-height: ${"small"===e?"20px":"28px"};
3408
3481
  font-weight: 400;
3409
3482
  text-align: left;
3410
- `,Zf=e=>r.css`
3483
+ `,qf=e=>r.css`
3411
3484
  color: ${h("neutral",700)};
3412
3485
  font-size: ${"small"===e?"12px":"16px"};
3413
3486
  line-height: ${"small"===e?"16px":"24px"};
3414
3487
  font-weight: 400;
3415
3488
  margin-left: 24px;
3416
3489
  text-align: left;
3417
- `,qf=r.css`
3490
+ `,Wf=r.css`
3418
3491
  background-color: ${h("neutral",100)};
3419
3492
  border: 1px solid ${h("neutral",300)};
3420
3493
  color: ${h("neutral",700)};
3421
- `,Wf=r.css`
3494
+ `,Gf=r.css`
3422
3495
  background-color: ${h("neutral",200)};
3423
3496
  border: 1px solid ${h("neutral",300)};
3424
3497
  color: ${h("neutral",700)};
3425
- `,Gf=r.css`
3498
+ `,Uf=r.css`
3426
3499
  background-color: ${h("success",100)};
3427
3500
  border: 1px solid ${h("success",300)};
3428
3501
  color: ${h("success",500)};
@@ -3430,7 +3503,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3430
3503
  p {
3431
3504
  color: ${h("success",900)};
3432
3505
  }
3433
- `,Uf=r.css`
3506
+ `,Xf=r.css`
3434
3507
  background-color: ${h("warning",100)};
3435
3508
  border: 1px solid ${h("warning",300)};
3436
3509
  color: ${h("warning",500)};
@@ -3438,7 +3511,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3438
3511
  p {
3439
3512
  color: ${h("warning",900)};
3440
3513
  }
3441
- `,Xf=r.css`
3514
+ `,Yf=r.css`
3442
3515
  background-color: ${h("error",100)};
3443
3516
  border: 1px solid ${h("error",300)};
3444
3517
  color: ${h("error",500)};
@@ -3446,32 +3519,32 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3446
3519
  p {
3447
3520
  color: ${h("error",900)};
3448
3521
  }
3449
- `,Yf=r.css`
3522
+ `,Kf=r.css`
3450
3523
  height: 8px;
3451
3524
  width: 100%;
3452
3525
  background-color: ${h("neutral",300)};
3453
3526
  display: flex;
3454
3527
  align-items: center;
3455
3528
  justify-content: flex-start;
3456
- `,Kf=e=>r.css`
3529
+ `,Jf=e=>r.css`
3457
3530
  height: 100%;
3458
3531
  width: ${e}%;
3459
3532
  background-color: ${h("primary",500)};
3460
3533
  transition: width 0.5s ease-in-out;
3461
- `,Jf=r.css`
3534
+ `,Qf=r.css`
3462
3535
  width: 100%;
3463
3536
  display: flex;
3464
3537
  align-items: center;
3465
3538
  justify-content: space-between;
3466
3539
  position: relative;
3467
- `,Qf=r.css`
3540
+ `,ex=r.css`
3468
3541
  height: 60px;
3469
3542
  width: 80px;
3470
3543
  display: flex;
3471
3544
  flex-direction: column;
3472
3545
  align-items: center;
3473
3546
  justify-content: space-between;
3474
- `,ex=(e,t)=>r.css`
3547
+ `,tx=(e,t)=>r.css`
3475
3548
  height: 32px;
3476
3549
  width: 32px;
3477
3550
  display: flex;
@@ -3507,12 +3580,12 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3507
3580
  }
3508
3581
 
3509
3582
  ${t?`\n background-color: ${h("neutral",300)};\n \n &:hover {\n background-color: ${h("neutral",300)};\n box-shadow: none;\n }\n `:""}
3510
- `,tx=e=>r.css`
3583
+ `,nx=e=>r.css`
3511
3584
  color: ${h("neutral",e?800:600)};
3512
3585
  font-size: 14px;
3513
3586
  line-height: 20px;
3514
3587
  font-weight: 400;
3515
- `,nx=r.css`
3588
+ `,rx=r.css`
3516
3589
  height: 1px;
3517
3590
  width: 100%;
3518
3591
  padding: 0 30px;
@@ -3520,11 +3593,11 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3520
3593
  top: 16px;
3521
3594
  left: 0;
3522
3595
  z-index: -1;
3523
- `,rx=r.css`
3596
+ `,ox=r.css`
3524
3597
  height: 1px;
3525
3598
  width: 100%;
3526
3599
  background-color: ${h("neutral",400)};
3527
- `,ox=r.css`
3600
+ `,ix=r.css`
3528
3601
  justify-content: space-between;
3529
3602
  align-items: center;
3530
3603
  gap: 8px;
@@ -3567,21 +3640,21 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3567
3640
  color: ${h("error",900)};
3568
3641
  }
3569
3642
  }
3570
- `,ix=r.css`
3643
+ `,ax=r.css`
3571
3644
  font-size: 18px;
3572
3645
  line-height: 28px;
3573
3646
  font-weight: 400;
3574
3647
  color: ${h("neutral",800)};
3575
- `,ax=r.css`
3648
+ `,sx=r.css`
3576
3649
  font-size: 16px;
3577
3650
  line-height: 24px;
3578
3651
  font-weight: 400;
3579
3652
  color: ${h("neutral",700)};
3580
- `,sx=r.css`
3581
- padding: 6px;
3582
3653
  `,lx=r.css`
3583
3654
  padding: 6px;
3584
- `,cx={pauseOnPageIdle:!0,offsets:"24px"},dx={"top-start":e.createToaster({placement:"top-start",...cx}),"top-end":e.createToaster({placement:"top-end",...cx}),"bottom-start":e.createToaster({placement:"bottom-start",...cx}),"bottom-end":e.createToaster({placement:"bottom-end",...cx})};exports.AnalysisWidget=({children:r,header:o,footer:i,expanded:a=!0,collapsible:s=!0,actions:l,showFooterOnCollapsed:c=!1})=>{const d="analysis-widget-item",[u,p]=n.useState(a),h=`analysis-widget-header-${d}`;return t.jsx(e.Box,{as:"section","aria-labelledby":h,css:da,children:t.jsxs(e.Accordion.Root,{multiple:!0,value:s?void 0:[d],defaultValue:a?[d]:[],children:[t.jsxs(e.Accordion.Item,{css:pa,value:d,children:[o&&t.jsx(e.Accordion.ItemTrigger,{id:h,role:"button","aria-expanded":u,tabIndex:0,css:ua,pointerEvents:s?"auto":"none",onClick:s?()=>{p(!u)}: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:u?"item-content-open":"item-content-closed","aria-hidden":!u,children:[r,!c&&i&&t.jsx(e.Box,{css:ha,children:i})]})]}),c&&i&&t.jsx(e.Box,{css:ha,children:i})]})})},exports.Avatar=Mf,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:_f,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Df(),children:[t.jsx(I,{color:"currentColor",height:"16px",width:"16px"}),!e||r||o?null:t.jsx("div",{css:If,"aria-hidden":!0})]}),o?t.jsx("p",{children:o}):null,s.length>0?t.jsx("div",{css:Af,children:t.jsx("p",{css:zf,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:_f,role:"status","aria-live":"polite",children:[o?t.jsx("p",{children:o}):null,t.jsxs("div",{css:Df(l),children:[s.length>0?t.jsx("div",{css:Vf,children:t.jsx("p",{css:Nf,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:If,"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 d=n.useRef(null),u=n.useRef(null);return n.useEffect((()=>{const e=d.current,t=u.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:u,css:Cn(l,c),children:t.jsxs("div",{className:"ds-base-map-scroll-content",children:[t.jsxs("div",{css:jn,children:[t.jsx("h2",{ref:d,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:kn,children:[i?t.jsx("div",{css:$n,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:Sn,children:e.children}):null]},e.label)))}):null,a?t.jsx("div",{css:En,children:a.map((e=>{return t.jsxs("div",{css:Rn(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`
3655
+ `,cx=r.css`
3656
+ padding: 6px;
3657
+ `,dx={pauseOnPageIdle:!0,offsets:"24px"},ux={"top-start":e.createToaster({placement:"top-start",...dx}),"top-end":e.createToaster({placement:"top-end",...dx}),"bottom-start":e.createToaster({placement:"bottom-start",...dx}),"bottom-end":e.createToaster({placement:"bottom-end",...dx})};exports.AnalysisWidget=({children:r,header:o,footer:i,expanded:a=!0,collapsible:s=!0,actions:l,showFooterOnCollapsed:c=!1})=>{const d="analysis-widget-item",[u,p]=n.useState(a),h=`analysis-widget-header-${d}`;return t.jsx(e.Box,{as:"section","aria-labelledby":h,css:da,children:t.jsxs(e.Accordion.Root,{multiple:!0,value:s?void 0:[d],defaultValue:a?[d]:[],children:[t.jsxs(e.Accordion.Item,{css:pa,value:d,children:[o&&t.jsx(e.Accordion.ItemTrigger,{id:h,role:"button","aria-expanded":u,tabIndex:0,css:ua,pointerEvents:s?"auto":"none",onClick:s?()=>{p(!u)}: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:u?"item-content-open":"item-content-closed","aria-hidden":!u,children:[r,!c&&i&&t.jsx(e.Box,{css:ha,children:i})]})]}),c&&i&&t.jsx(e.Box,{css:ha,children:i})]})})},exports.Avatar=_f,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:Df,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:If(),children:[t.jsx(I,{color:"currentColor",height:"16px",width:"16px"}),!e||r||o?null:t.jsx("div",{css:Vf,"aria-hidden":!0})]}),o?t.jsx("p",{children:o}):null,s.length>0?t.jsx("div",{css:zf,children:t.jsx("p",{css:Bf,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:Df,role:"status","aria-live":"polite",children:[o?t.jsx("p",{children:o}):null,t.jsxs("div",{css:If(l),children:[s.length>0?t.jsx("div",{css:Nf,children:t.jsx("p",{css:Af,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:Vf,"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 d=n.useRef(null),u=n.useRef(null);return n.useEffect((()=>{const e=d.current,t=u.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:u,css:Cn(l,c),children:t.jsxs("div",{className:"ds-base-map-scroll-content",children:[t.jsxs("div",{css:jn,children:[t.jsx("h2",{ref:d,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:kn,children:[i?t.jsx("div",{css:$n,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:Sn,children:e.children}):null]},e.label)))}):null,a?t.jsx("div",{css:En,children:a.map((e=>{return t.jsxs("div",{css:Rn(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`
3585
3658
  height: 32px;
3586
3659
  width: 32px;
3587
3660
  border: 1px solid ${h("neutral",300)};
@@ -3605,7 +3678,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3605
3678
  padding: 0px;
3606
3679
  padding-top: 8px;
3607
3680
  color: ${i?h("neutral",500):"inherit"};
3608
- `),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(Tn,{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:la,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:ca,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:Vh(r,o),children:t.jsxs("div",{css:Nh(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ah,children:e}),t.jsx("div",{children:t.jsxs("p",{css:zh,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=qf;return"info-grey"===r?c=Wf:"success"===r?c=Gf:"warning"===r?c=Uf:"error"===r&&(c=Xf),t.jsxs("div",{css:[Bf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Hf,children:[i,t.jsx("p",{css:Ff(o),children:e})]}),t.jsx("p",{css:Zf(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:d,required:u,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{d&&d("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:pt,children:[i?t.jsx("div",{css:xt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:ht(p),"aria-label":r,children:[u?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:ft(p),"aria-label":o,children:o}),i?t.jsx("p",{css:gt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:vt(!!i,s),attached:!0,children:["start"===s?t.jsx(Yt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(kt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Yt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Ii,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[d]=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 u=(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:Xo,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:Yo,children:[r,t.jsx(Gt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Ko,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(We,{name:r,defaultValue:d,customGap:"0px",onChange:(e,t)=>u(e,!!t,s,t),children:a.map((e=>t.jsx(ri,{...e,onChange:(t,n)=>u(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Uo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ri,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:oi,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ii,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:ai,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:si,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:li,children:[t.jsxs("div",{css:ci,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:di,children:[t.jsxs("div",{children:[t.jsx("h3",{css:ui,children:e}),t.jsx("p",{css:pi,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:hi,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(mi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=qi,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u})=>{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:d,ariaLabel:u||"Map controls toolbar"})},exports.MapMarker=Tn,exports.MapMarkers=Pn,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Ao({open:e,onOpenChange:r,placement:c,whileElementsMounted:ao,middleware:[bo(d),(b={fallbackAxisSideDirection:"start"},{...co(b),options:[b,y]}),yo({padding:8}),wo({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:d="pointerdown",referencePress:u=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=_o(),v=Ar("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Vo(f),{escapeKey:C,outsidePress:j}=Vo(x),k=l.useRef(!1),$=Ar((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?Ir(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=Ar((e=>{var t;const n=()=>{var t;$(e),null==(t=Mr(e))||t.removeEventListener("keydown",n)};null==(t=Mr(e))||t.addEventListener("keydown",n)})),E=Ar((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===d&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Mr(e),l="[data-floating-ui-inert]",c=Dr(o.floating).querySelectorAll(l);let u=Nn(s)?s:null;for(;u&&!Qn(u);){const e=nr(u);if(Qn(e)||!Nn(e))break;u=e}if(c.length&&Nn(s)&&!s.matches("html,body")&&!Pr(s,o.floating)&&Array.from(c).every((e=>!Pr(u,e))))return;if(An(s)&&O){const t=Qn(s),n=er(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,d=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),u=a&&e.offsetY>s.clientHeight;if(d||u)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Ir(g.nodesRef.current,p).some((t=>{var n;return _r(e,null==(n=t.context)?void 0:n.elements.floating)}));if(_r(e,o.floating)||_r(e,o.domReference)||h)return;const f=g?Ir(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=Ar((e=>{var t;const n=()=>{var t;E(e),null==(t=Mr(e))||t.removeEventListener(d,n)};null==(t=Mr(e))||t.addEventListener(d,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}),Kn()?5:0)}const u=Dr(o.floating);s&&(u.addEventListener("keydown",C?S:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),m&&u.addEventListener(d,j?R:E,j);let p=[];return h&&(Nn(o.domReference)&&(p=or(o.domReference)),Nn(o.floating)&&(p=p.concat(or(o.floating))),!Nn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(or(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(u.removeEventListener("keydown",C?S:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),m&&u.removeEventListener(d,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,d,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,d]);const L=l.useMemo((()=>({onKeyDown:$,...u&&{[Do[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,p]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Io[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>a?{reference:L,floating:O}:{}),[a,L,O])}(g,{escapeKey:u,outsidePress:p}),C=Ho(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=>zo(t,e,"reference")),t),i=l.useCallback((t=>zo(t,e,"floating")),n),a=l.useCallback((t=>zo(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=d-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=d-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Fo,children:[t.jsxs("div",{css:Zo,children:[i,t.jsx(se,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:qo,children:a}),s?t.jsx("div",{css:Wo,children:s}):null,t.jsx("div",{ref:h,css:Go(E,R,k,$,S,d)})]}),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,d]=n.useState((()=>qh(o,r)));return t.jsx("div",{css:Bh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=qh(o,e);d(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":d,"aria-describedby":u,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=[u,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Hh,"aria-label":d||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Fh,children:[i,s?t.jsx("div",{css:Zh,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(us,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ps(i),children:[t.jsxs(e.Dialog.Header,{css:hs,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:fs,asChild:!0,children:t.jsx(se,{})})]}),t.jsx(e.Dialog.Body,{css:xs,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[d,u]=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})=>u(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:d?"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:d,onNavbarHeightChange:u,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<=ff),[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<=ff||window.innerWidth<=y?(u?.(96),m(!0)):window.innerWidth>ff&&window.innerWidth<=1440?e.right>=t.left?(u?.(96),m(!0),w(window.innerWidth)):window.innerWidth>y&&(u?.(48),m(!1),w(-1)):(u?.(48),m(!1),w(-1)),v&&(window.innerWidth<=ff||n.right>=t.left?(j(!0),u?.(48)):(j(!1),u?.(96)))}}),[y,v]);return n.useEffect((()=>(R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)})),[R]),t.jsxs("nav",{css:Wh(v&&!C,d,p),children:[t.jsxs("div",{css:Uh(v&&!C,c),children:[t.jsxs("div",{css:(L=v&&!C,r.css`
3681
+ `),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(Tn,{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:la,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:ca,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:Vh(r,o),children:t.jsxs("div",{css:Nh(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ah,children:e}),t.jsx("div",{children:t.jsxs("p",{css:zh,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=Wf;return"info-grey"===r?c=Gf:"success"===r?c=Uf:"warning"===r?c=Xf:"error"===r&&(c=Yf),t.jsxs("div",{css:[Hf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Ff,children:[i,t.jsx("p",{css:Zf(o),children:e})]}),t.jsx("p",{css:qf(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:d,required:u,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{d&&d("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:pt,children:[i?t.jsx("div",{css:xt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:ht(p),"aria-label":r,children:[u?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:ft(p),"aria-label":o,children:o}),i?t.jsx("p",{css:gt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:vt(!!i,s),attached:!0,children:["start"===s?t.jsx(Yt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(kt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Yt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Ii,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[d]=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 u=(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:Xo,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:Yo,children:[r,t.jsx(Gt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Ko,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(We,{name:r,defaultValue:d,customGap:"0px",onChange:(e,t)=>u(e,!!t,s,t),children:a.map((e=>t.jsx(ri,{...e,onChange:(t,n)=>u(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Uo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ri,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:oi,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ii,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:ai,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:si,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:li,children:[t.jsxs("div",{css:ci,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:di,children:[t.jsxs("div",{children:[t.jsx("h3",{css:ui,children:e}),t.jsx("p",{css:pi,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:hi,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(mi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=qi,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u})=>{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:d,ariaLabel:u||"Map controls toolbar"})},exports.MapMarker=Tn,exports.MapMarkers=Pn,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Ao({open:e,onOpenChange:r,placement:c,whileElementsMounted:ao,middleware:[bo(d),(b={fallbackAxisSideDirection:"start"},{...co(b),options:[b,y]}),yo({padding:8}),wo({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:d="pointerdown",referencePress:u=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=_o(),v=Ar("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Vo(f),{escapeKey:C,outsidePress:j}=Vo(x),k=l.useRef(!1),$=Ar((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?Ir(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=Ar((e=>{var t;const n=()=>{var t;$(e),null==(t=Mr(e))||t.removeEventListener("keydown",n)};null==(t=Mr(e))||t.addEventListener("keydown",n)})),E=Ar((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===d&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Mr(e),l="[data-floating-ui-inert]",c=Dr(o.floating).querySelectorAll(l);let u=Nn(s)?s:null;for(;u&&!Qn(u);){const e=nr(u);if(Qn(e)||!Nn(e))break;u=e}if(c.length&&Nn(s)&&!s.matches("html,body")&&!Pr(s,o.floating)&&Array.from(c).every((e=>!Pr(u,e))))return;if(An(s)&&O){const t=Qn(s),n=er(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,d=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),u=a&&e.offsetY>s.clientHeight;if(d||u)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Ir(g.nodesRef.current,p).some((t=>{var n;return _r(e,null==(n=t.context)?void 0:n.elements.floating)}));if(_r(e,o.floating)||_r(e,o.domReference)||h)return;const f=g?Ir(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=Ar((e=>{var t;const n=()=>{var t;E(e),null==(t=Mr(e))||t.removeEventListener(d,n)};null==(t=Mr(e))||t.addEventListener(d,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}),Kn()?5:0)}const u=Dr(o.floating);s&&(u.addEventListener("keydown",C?S:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),m&&u.addEventListener(d,j?R:E,j);let p=[];return h&&(Nn(o.domReference)&&(p=or(o.domReference)),Nn(o.floating)&&(p=p.concat(or(o.floating))),!Nn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(or(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(u.removeEventListener("keydown",C?S:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),m&&u.removeEventListener(d,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,d,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,d]);const L=l.useMemo((()=>({onKeyDown:$,...u&&{[Do[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,p]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Io[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>a?{reference:L,floating:O}:{}),[a,L,O])}(g,{escapeKey:u,outsidePress:p}),C=Ho(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=>zo(t,e,"reference")),t),i=l.useCallback((t=>zo(t,e,"floating")),n),a=l.useCallback((t=>zo(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=d-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=d-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Fo,children:[t.jsxs("div",{css:Zo,children:[i,t.jsx(se,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:qo,children:a}),s?t.jsx("div",{css:Wo,children:s}):null,t.jsx("div",{ref:h,css:Go(E,R,k,$,S,d)})]}),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,d]=n.useState((()=>qh(o,r)));return t.jsx("div",{css:Bh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=qh(o,e);d(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":d,"aria-describedby":u,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=[u,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Hh,"aria-label":d||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Fh,children:[i,s?t.jsx("div",{css:Zh,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(us,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ps(i),children:[t.jsxs(e.Dialog.Header,{css:hs,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:fs,asChild:!0,children:t.jsx(se,{})})]}),t.jsx(e.Dialog.Body,{css:xs,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[d,u]=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})=>u(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:d?"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:d,onNavbarHeightChange:u,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<=ff),[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<=ff||window.innerWidth<=y?(u?.(96),m(!0)):window.innerWidth>ff&&window.innerWidth<=1440?e.right>=t.left?(u?.(96),m(!0),w(window.innerWidth)):window.innerWidth>y&&(u?.(48),m(!1),w(-1)):(u?.(48),m(!1),w(-1)),v&&(window.innerWidth<=ff||n.right>=t.left?(j(!0),u?.(48)):(j(!1),u?.(96)))}}),[y,v]);return n.useEffect((()=>(R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)})),[R]),t.jsxs("nav",{css:Wh(v&&!C,d,p),children:[t.jsxs("div",{css:Uh(v&&!C,c),children:[t.jsxs("div",{css:(L=v&&!C,r.css`
3609
3682
  display: flex;
3610
3683
  align-items: center;
3611
3684
  justify-content: flex-start;
@@ -3635,7 +3708,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3635
3708
  font-weight: 700;
3636
3709
  color: ${h("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
3637
3710
  }
3638
- `),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:nn(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:rn(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:rn(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:rn(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:rn(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:rn(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:Yf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Kf(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[d,u]=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 ${d?"visible":"hidden"}.`}),[d,e,r,o]),y=d?"Hide":"Show";return t.jsxs("div",{css:Ci,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:ji,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:bi(i)}),x&&t.jsx("div",{css:yi(i)}),g&&t.jsx("div",{css:wi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:ki,children:r}),o?t.jsx("p",{id:h,css:$i,children:o}):null]})]}),a&&s?t.jsx("div",{css:Si,children:t.jsx(b,{type:"button",variant:"borderless",label:y,rightIcon:d?t.jsx(O,{}):t.jsx(L,{}),"aria-pressed":d,"aria-labelledby":`${v} ${p}`,onClick:()=>{u((e=>!e)),a?.()}})}):null]})},exports.Radio=qe,exports.RadioGroup=We,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:d,variant:u="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:on,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:cn}):null,t.jsxs("div",{css:(f=!!c,r.css`
3711
+ `),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:nn(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:rn(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:rn(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:rn(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:rn(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:rn(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:Kf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Jf(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[d,u]=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 ${d?"visible":"hidden"}.`}),[d,e,r,o]),y=d?"Hide":"Show";return t.jsxs("div",{css:Ci,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:ji,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:bi(i)}),x&&t.jsx("div",{css:yi(i)}),g&&t.jsx("div",{css:wi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:ki,children:r}),o?t.jsx("p",{id:h,css:$i,children:o}):null]})]}),a&&s?t.jsx("div",{css:Si,children:t.jsx(b,{type:"button",variant:"borderless",label:y,rightIcon:d?t.jsx(O,{}):t.jsx(L,{}),"aria-pressed":d,"aria-labelledby":`${v} ${p}`,onClick:()=>{u((e=>!e)),a?.()}})}):null]})},exports.Radio=qe,exports.RadioGroup=We,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:d,variant:u="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:on,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:cn}):null,t.jsxs("div",{css:(f=!!c,r.css`
3639
3712
  margin-left: ${f?"19px":"0px"};
3640
3713
  `),children:[t.jsxs("p",{css:an,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:sn,"aria-label":o,children:o}),c?t.jsx("p",{css:dn,"aria-label":c,children:c}):null,t.jsx("div",{css:ln,children:t.jsx(We,{name:i,defaultValue:s,onChange:l,horizontal:d&&"card"!==u,children:a.map((e=>t.jsx(qe,{css:"card"===u?un:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=re,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:Ei,children:[i?t.jsx("div",{css:(a=Pi(e),r.css`
3641
3714
  height: 20px;
@@ -3644,4 +3717,4 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3644
3717
  border: 1px solid ${h("neutral",300)};
3645
3718
  border-radius: 4px;
3646
3719
  ${a?`background: ${a};`:""}
3647
- `)}):t.jsx("div",{css:Ri,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:Li,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Oi,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Li,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ti,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:d,onQueryChange:u,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&&(d?.(t),g(""),b())};n.useEffect((()=>{if(u?.(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(kt,{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(Rf,{highlightedIndex:C,items:y,query:x,onSelect:S}),"list"===c&&!l&&t.jsx(qi,{items:y,highlightedIndex:C})]})})]})},exports.Select=Yt,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,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=Mh(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||Mh(g,b)!==b.length-1);return t.jsx(Oh,{ref:f,css:Ph(!!e,h),className:u,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("button",{type:"button",disabled:w,"aria-label":y,css:Th,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))},children:t.jsx("div",{})}),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"===d?r=s||e:"mid"===d?r=l+(o?n:0):"full"===d&&(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(Tn,{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||[]),d=(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)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>d?d: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>d?d:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:pn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:hn(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:fn,children:[i.step&&i.marks?t.jsx(Yt,{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(kt,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(tt,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(kt,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Jf,children:[e.map(((e,r)=>t.jsxs("div",{css:Qf,children:[t.jsx("button",{css:ex(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:tx(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:nx,children:t.jsx("div",{css:rx})})]}),exports.Switch=rt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState($f(i,o)||0),d="view"===r;return t.jsx("div",{css:yf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c($f(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:[d&&1===o&&"left"===Sf(l)?t.jsx("div",{css:jf}):null,t.jsx(e.Tabs.Trigger,{css:[wf,d?kf:Cf],"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),d&&1===o&&"right"===Sf(l)?t.jsx("div",{css:jf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o=[],renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:d,variant:u="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=d?.length===o?.length,R=d&&d.length>0&&!E;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:Ki(u),striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Ji(u),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:Qi,children:[n.label,n.sortable?t.jsxs("div",{css:ea,children:[t.jsx(ae,{css:ta(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:ta(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:oa,children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),v?t.jsx("div",{css:ia,children:t.jsx(e.Spinner,{size:"lg",color:h("primary",500)})}):null,t.jsxs("div",{css:na,children:[t.jsx("div",{children:j?t.jsx(Ii,{pageSize:C,currentPage:w,totalItems:y,onPageSizeChange:f,showItemCountText:k}):null}),l?t.jsx("div",{css:ra,children:t.jsx(Yi,{totalItems:y,pageSize:C,currentPage:w,onPageChange:x})}):null]})]})},exports.TableCell=sa,exports.TableRow=aa,exports.Tag=Gt,exports.TextInput=kt,exports.Textarea=({label:r,caption:o,placeholder:i,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:d="",onChange:u,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(d),[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}=d;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:xn(c),children:[S?t.jsx("div",{css:gn}):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:vn(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:mn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:yn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:wn(c,x,d),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`)),u&&u(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:yn,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:yn,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:bn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(dx).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:dx[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:ox,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:ix,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:ax,"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:sx,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),dx[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:lx,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>dx[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=fe,exports.Tooltip=pe,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=u,exports.getThemedColor=h,exports.showToast=e=>{dx[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
3720
+ `)}):t.jsx("div",{css:Ri,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:Li,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Oi,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Li,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ti,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:d,onQueryChange:u,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&&(d?.(t),g(""),b())};n.useEffect((()=>{if(u?.(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(kt,{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(Lf,{highlightedIndex:C,items:y,query:x,onSelect:S}),"list"===c&&!l&&t.jsx(qi,{items:y,highlightedIndex:C})]})})]})},exports.Select=Yt,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,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=Mh(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||Mh(g,b)!==b.length-1);return t.jsx(Oh,{ref:f,css:Ph(!!e,h),className:u,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("button",{type:"button",disabled:w,"aria-label":y,css:Th,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))},children:t.jsx("div",{})}),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"===d?r=s||e:"mid"===d?r=l+(o?n:0):"full"===d&&(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(Tn,{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||[]),d=(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)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>d?d: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>d?d:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:pn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:hn(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:fn,children:[i.step&&i.marks?t.jsx(Yt,{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(kt,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(tt,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(kt,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Qf,children:[e.map(((e,r)=>t.jsxs("div",{css:ex,children:[t.jsx("button",{css:tx(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:nx(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:rx,children:t.jsx("div",{css:ox})})]}),exports.Switch=rt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(Sf(i,o)||0);return t.jsx("div",{css:yf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(Sf(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>t.jsxs(n.Fragment,{children:["view"===r&&1===i&&"left"===Ef(l)?t.jsx("div",{css:jf}):null,t.jsx(e.Tabs.Trigger,{css:[wf,"view"===r&&kf,"panel"===r&&Cf,"transparent"===r&&$f],"aria-label":o["aria-label"]||o.label,...o,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[o.icon,o.label]})},o.label),"view"===r&&1===i&&"right"===Ef(l)?t.jsx("div",{css:jf}):null]},o.label)))})})})},exports.Table=({columns:r,data:o=[],renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:d,variant:u="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=d?.length===o?.length,R=d&&d.length>0&&!E;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:Ki(u),striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Ji(u),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:Qi,children:[n.label,n.sortable?t.jsxs("div",{css:ea,children:[t.jsx(ae,{css:ta(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:ta(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:oa,children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),v?t.jsx("div",{css:ia,children:t.jsx(e.Spinner,{size:"lg",color:h("primary",500)})}):null,t.jsxs("div",{css:na,children:[t.jsx("div",{children:j?t.jsx(Ii,{pageSize:C,currentPage:w,totalItems:y,onPageSizeChange:f,showItemCountText:k}):null}),l?t.jsx("div",{css:ra,children:t.jsx(Yi,{totalItems:y,pageSize:C,currentPage:w,onPageChange:x})}):null]})]})},exports.TableCell=sa,exports.TableRow=aa,exports.Tag=Gt,exports.TextInput=kt,exports.Textarea=({label:r,caption:o,placeholder:i,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:d="",onChange:u,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(d),[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}=d;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:xn(c),children:[S?t.jsx("div",{css:gn}):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:vn(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:mn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:yn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:wn(c,x,d),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`)),u&&u(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:yn,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:yn,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:bn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(ux).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:ux[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:ix,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:ax,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:sx,"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:lx,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),ux[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:cx,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>ux[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=fe,exports.Tooltip=pe,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=u,exports.getThemedColor=h,exports.showToast=e=>{ux[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
package/dist/index.d.ts CHANGED
@@ -822,7 +822,7 @@ type TabBarItemProps = Omit<Tabs.TriggerProps, 'asChild'> & {
822
822
  ref?: Ref<HTMLButtonElement>;
823
823
  };
824
824
  type TabBarProps = {
825
- variant?: 'panel' | 'view';
825
+ variant?: 'panel' | 'view' | 'transparent';
826
826
  defaultValue?: string;
827
827
  tabs: TabBarItemProps[];
828
828
  onTabClick?: (tabValue: string) => void;