@worldresources/wri-design-systems 2.145.1 → 2.147.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/README.md +2 -1
- package/dist/index.cjs.js +86 -34
- package/dist/index.d.ts +13 -2
- package/dist/index.esm.js +906 -854
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -167,7 +167,7 @@ border: 1px solid ${getThemedColor('neutral', 400)};
|
|
|
167
167
|
- [Button](https://github.com/wri/wri-design-systems/tree/main/src/components/Forms/Actions/Button)
|
|
168
168
|
- [Close Button](https://github.com/wri/wri-design-systems/tree/main/src/components/Forms/Actions/CloseButton)
|
|
169
169
|
- [Icon Button](https://github.com/wri/wri-design-systems/tree/main/src/components/Forms/Actions/IconButton)
|
|
170
|
-
- [
|
|
170
|
+
- [Toolbar](https://github.com/wri/wri-design-systems/tree/main/src/components/Forms/Actions/Toolbar)
|
|
171
171
|
- [Menu](https://github.com/wri/wri-design-systems/tree/main/src/components/Forms/Actions/Menu)
|
|
172
172
|
- [Multi Action Button](https://github.com/wri/wri-design-systems/tree/main/src/components/Forms/Actions/MultiActionButton)
|
|
173
173
|
- [Tooltip](https://github.com/wri/wri-design-systems/tree/main/src/components/Forms/Actions/Tooltip)
|
|
@@ -228,6 +228,7 @@ border: 1px solid ${getThemedColor('neutral', 400)};
|
|
|
228
228
|
|
|
229
229
|
## Status
|
|
230
230
|
|
|
231
|
+
- [Avatar](https://github.com/wri/wri-design-systems/tree/main/src/components/Status/Avatar)
|
|
231
232
|
- [Badge](https://github.com/wri/wri-design-systems/tree/main/src/components/Status/Badge)
|
|
232
233
|
- [Inline Message](https://github.com/wri/wri-design-systems/tree/main/src/components/Status/InlineMessage)
|
|
233
234
|
- [Progress Bar](https://github.com/wri/wri-design-systems/tree/main/src/components/Status/ProgressBar)
|
package/dist/index.cjs.js
CHANGED
|
@@ -2161,7 +2161,7 @@
|
|
|
2161
2161
|
&:disabled {
|
|
2162
2162
|
background-color: ${p("neutral",200)};
|
|
2163
2163
|
}
|
|
2164
|
-
`,Ii=({id:n,label:r,caption:o,icon:i,value:a,variant:s="data",onItemClick:l,isExpanded:c=!1,ariaLabel:u,disabled:d=!1})=>{const p="navigation"===s&&!!l,h=p?e.chakra.button:e.chakra.div,f=u||("data"===s&&a?`${r}, ${a}`:r);return t.jsxs(h,{id:n,css:"data"===s?Mi:Di,onClick:p?l:void 0,tabIndex:p?0:void 0,onKeyDown:e=>{p&&("Enter"!==e.key&&" "!==e.key||l?.())},role:p?"button":void 0,"aria-expanded":p?c:void 0,"aria-label":f,disabled:d,children:[t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",children:[i
|
|
2164
|
+
`,Ii=({id:n,label:r,caption:o,icon:i,value:a,variant:s="data",onItemClick:l,isExpanded:c=!1,ariaLabel:u,disabled:d=!1})=>{const p="navigation"===s&&!!l,h=p?e.chakra.button:e.chakra.div,f=u||("data"===s&&a?`${r}, ${a}`:r);return t.jsxs(h,{id:n,css:"data"===s?Mi:Di,onClick:p?l:void 0,tabIndex:p?0:void 0,onKeyDown:e=>{p&&("Enter"!==e.key&&" "!==e.key||l?.())},role:p?"button":void 0,"aria-expanded":p?c:void 0,"aria-label":f,disabled:d,children:[t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",children:[i,t.jsxs(e.Box,{flex:"1",minWidth:0,children:[t.jsx(e.Text,{fontWeight:"navigation"===s?"700":"400",css:Li(d),children:r}),o&&t.jsx(e.Text,{css:Ti,children:o})]})]}),"data"===s&&a&&t.jsx(e.Text,{css:Pi,children:a}),"navigation"===s&&t.jsx(e.Icon,{as:$,boxSize:4,"aria-hidden":"true",css:_i(d)})]})},Ni=r.css`
|
|
2165
2165
|
svg {
|
|
2166
2166
|
path {
|
|
2167
2167
|
fill: ${p("primary",500)};
|
|
@@ -2261,7 +2261,6 @@
|
|
|
2261
2261
|
}
|
|
2262
2262
|
`,Qi=r.css`
|
|
2263
2263
|
border: 1px solid ${p("neutral",300)};
|
|
2264
|
-
border-radius: 8px;
|
|
2265
2264
|
`,ea=r.css`
|
|
2266
2265
|
padding: 16px;
|
|
2267
2266
|
cursor: pointer;
|
|
@@ -3204,15 +3203,68 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3204
3203
|
}
|
|
3205
3204
|
}
|
|
3206
3205
|
`,pf=(e,t)=>e.findIndex((e=>e.value===t)),hf=e=>1===e?"none":2===e?"left":"right",ff=r.css`
|
|
3206
|
+
height: 28px;
|
|
3207
|
+
width: 28px;
|
|
3208
|
+
border-radius: 50%;
|
|
3209
|
+
background-color: ${p("primary",300)};
|
|
3210
|
+
border: 1px solid ${p("primary",800)};
|
|
3211
|
+
position: relative;
|
|
3212
|
+
|
|
3213
|
+
&[role='button'] {
|
|
3214
|
+
cursor: pointer;
|
|
3215
|
+
|
|
3216
|
+
&:hover {
|
|
3217
|
+
background-color: ${p("primary",500)};
|
|
3218
|
+
box-shadow: 0px 2px 4px -2px #0000001a;
|
|
3219
|
+
box-shadow: 0px 4px 6px -1px #0000001a;
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3222
|
+
&:active {
|
|
3223
|
+
outline: none;
|
|
3224
|
+
background-color: ${p("primary",600)} !important;
|
|
3225
|
+
border: 1px solid ${p("primary",700)} !important;
|
|
3226
|
+
box-shadow: 0px 2px 4px -2px #0000001a;
|
|
3227
|
+
box-shadow: 0px 4px 6px -1px #0000001a;
|
|
3228
|
+
}
|
|
3229
|
+
|
|
3230
|
+
&:focus-visible {
|
|
3231
|
+
outline-offset: 3px;
|
|
3232
|
+
outline-color: ${p("primary",700)};
|
|
3233
|
+
background-color: ${p("primary",500)};
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
3236
|
+
`,xf=r.css`
|
|
3237
|
+
font-size: 12px;
|
|
3238
|
+
line-height: 16px;
|
|
3239
|
+
font-weight: 700;
|
|
3240
|
+
color: ${p("primary",800)};
|
|
3241
|
+
`,gf=e=>r.css`
|
|
3242
|
+
width: ${e||"16px"};
|
|
3243
|
+
position: absolute;
|
|
3244
|
+
top: -8px;
|
|
3245
|
+
left: 15px;
|
|
3246
|
+
`,vf=n.forwardRef((({name:n,ariaLabel:o,src:i,srcSet:a,onClick:s,notificationCount:l},c)=>{const u=(()=>{let e="";return l&&l>0&&(e=`${l>99?"99+":l}`),e})();let d="16px";return l&&l>99?d="28px":l&&l>9&&(d="22px"),t.jsxs(e.Avatar.Root,{"aria-label":o||n,ref:c,css:ff,onClick:s,onKeyDown:e=>{"Enter"===e.key&&s?.()},role:s?"button":void 0,tabIndex:s?0:void 0,children:[t.jsx(e.Avatar.Fallback,{name:n,css:xf}),t.jsx(e.Avatar.Image,{src:i,srcSet:a}),u.length>0?t.jsx("div",{css:gf(d),children:t.jsx("div",{css:r.css`
|
|
3247
|
+
height: 16px;
|
|
3248
|
+
width: auto;
|
|
3249
|
+
background-color: ${p("error",500)};
|
|
3250
|
+
padding: 0 3px 1px 3px;
|
|
3251
|
+
border-radius: 8px;
|
|
3252
|
+
display: flex;
|
|
3253
|
+
justify-content: center;
|
|
3254
|
+
align-items: center;
|
|
3255
|
+
font-size: 12px;
|
|
3256
|
+
font-weight: 700;
|
|
3257
|
+
color: ${p("error",100)};
|
|
3258
|
+
`,children:t.jsx("p",{"aria-label":`${l} unread message`,children:u})})}):null]})})),mf=r.css`
|
|
3207
3259
|
display: flex;
|
|
3208
3260
|
justify-content: flex-start;
|
|
3209
3261
|
align-items: center;
|
|
3210
3262
|
gap: 8px;
|
|
3211
|
-
`,
|
|
3263
|
+
`,bf=e=>r.css`
|
|
3212
3264
|
width: ${e||"16px"};
|
|
3213
3265
|
position: relative;
|
|
3214
3266
|
display: flex;
|
|
3215
|
-
`,
|
|
3267
|
+
`,yf=r.css`
|
|
3216
3268
|
height: 4px;
|
|
3217
3269
|
width: 4px;
|
|
3218
3270
|
background-color: ${p("error",500)};
|
|
@@ -3220,7 +3272,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3220
3272
|
position: absolute;
|
|
3221
3273
|
top: 0px;
|
|
3222
3274
|
right: 0px;
|
|
3223
|
-
`,
|
|
3275
|
+
`,wf=r.css`
|
|
3224
3276
|
height: 10px;
|
|
3225
3277
|
background-color: ${p("error",500)};
|
|
3226
3278
|
padding: 0 3px 1px 3px;
|
|
@@ -3231,11 +3283,11 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3231
3283
|
position: absolute;
|
|
3232
3284
|
top: -2px;
|
|
3233
3285
|
left: 9px;
|
|
3234
|
-
`,
|
|
3286
|
+
`,Cf=r.css`
|
|
3235
3287
|
font-size: 9px;
|
|
3236
3288
|
font-weight: 700;
|
|
3237
3289
|
color: ${p("error",100)};
|
|
3238
|
-
`,
|
|
3290
|
+
`,jf=r.css`
|
|
3239
3291
|
height: 16px;
|
|
3240
3292
|
min-width: 16px;
|
|
3241
3293
|
background-color: ${p("error",500)};
|
|
@@ -3244,11 +3296,11 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3244
3296
|
justify-content: center;
|
|
3245
3297
|
align-items: center;
|
|
3246
3298
|
padding: 0px 4px 1px 4px;
|
|
3247
|
-
`,
|
|
3299
|
+
`,kf=r.css`
|
|
3248
3300
|
font-size: 16px;
|
|
3249
3301
|
font-weight: 700;
|
|
3250
3302
|
color: ${p("error",100)};
|
|
3251
|
-
|
|
3303
|
+
`,$f=(e,t)=>r.css`
|
|
3252
3304
|
width: 100%;
|
|
3253
3305
|
min-width: ${"small"===e?"234px":"320px"};
|
|
3254
3306
|
border-radius: 4px;
|
|
@@ -3263,7 +3315,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3263
3315
|
button {
|
|
3264
3316
|
margin-left: ${t?0:"24px"};
|
|
3265
3317
|
}
|
|
3266
|
-
`,
|
|
3318
|
+
`,Sf=r.css`
|
|
3267
3319
|
display: flex;
|
|
3268
3320
|
align-items: flex-start;
|
|
3269
3321
|
gap: 8px;
|
|
@@ -3271,28 +3323,28 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3271
3323
|
svg {
|
|
3272
3324
|
margin-top: 6px;
|
|
3273
3325
|
}
|
|
3274
|
-
`,
|
|
3326
|
+
`,Ef=e=>r.css`
|
|
3275
3327
|
color: ${p("neutral",800)};
|
|
3276
3328
|
font-size: ${"small"===e?"14px":"18px"};
|
|
3277
3329
|
line-height: ${"small"===e?"20px":"28px"};
|
|
3278
3330
|
font-weight: 400;
|
|
3279
3331
|
text-align: left;
|
|
3280
|
-
`,
|
|
3332
|
+
`,Rf=e=>r.css`
|
|
3281
3333
|
color: ${p("neutral",700)};
|
|
3282
3334
|
font-size: ${"small"===e?"12px":"16px"};
|
|
3283
3335
|
line-height: ${"small"===e?"16px":"24px"};
|
|
3284
3336
|
font-weight: 400;
|
|
3285
3337
|
margin-left: 24px;
|
|
3286
3338
|
text-align: left;
|
|
3287
|
-
|
|
3339
|
+
`,Of=r.css`
|
|
3288
3340
|
background-color: ${p("neutral",100)};
|
|
3289
3341
|
border: 1px solid ${p("neutral",300)};
|
|
3290
3342
|
color: ${p("neutral",700)};
|
|
3291
|
-
`,
|
|
3343
|
+
`,Lf=r.css`
|
|
3292
3344
|
background-color: ${p("neutral",200)};
|
|
3293
3345
|
border: 1px solid ${p("neutral",300)};
|
|
3294
3346
|
color: ${p("neutral",700)};
|
|
3295
|
-
`,
|
|
3347
|
+
`,Tf=r.css`
|
|
3296
3348
|
background-color: ${p("success",100)};
|
|
3297
3349
|
border: 1px solid ${p("success",300)};
|
|
3298
3350
|
color: ${p("success",500)};
|
|
@@ -3300,7 +3352,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3300
3352
|
p {
|
|
3301
3353
|
color: ${p("success",900)};
|
|
3302
3354
|
}
|
|
3303
|
-
`,
|
|
3355
|
+
`,Pf=r.css`
|
|
3304
3356
|
background-color: ${p("warning",100)};
|
|
3305
3357
|
border: 1px solid ${p("warning",300)};
|
|
3306
3358
|
color: ${p("warning",500)};
|
|
@@ -3308,7 +3360,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3308
3360
|
p {
|
|
3309
3361
|
color: ${p("warning",900)};
|
|
3310
3362
|
}
|
|
3311
|
-
`,
|
|
3363
|
+
`,_f=r.css`
|
|
3312
3364
|
background-color: ${p("error",100)};
|
|
3313
3365
|
border: 1px solid ${p("error",300)};
|
|
3314
3366
|
color: ${p("error",500)};
|
|
@@ -3316,32 +3368,32 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3316
3368
|
p {
|
|
3317
3369
|
color: ${p("error",900)};
|
|
3318
3370
|
}
|
|
3319
|
-
`,
|
|
3371
|
+
`,Mf=r.css`
|
|
3320
3372
|
height: 8px;
|
|
3321
3373
|
width: 100%;
|
|
3322
3374
|
background-color: ${p("neutral",300)};
|
|
3323
3375
|
display: flex;
|
|
3324
3376
|
align-items: center;
|
|
3325
3377
|
justify-content: flex-start;
|
|
3326
|
-
`,
|
|
3378
|
+
`,Df=e=>r.css`
|
|
3327
3379
|
height: 100%;
|
|
3328
3380
|
width: ${e}%;
|
|
3329
3381
|
background-color: ${p("primary",500)};
|
|
3330
3382
|
transition: width 0.5s ease-in-out;
|
|
3331
|
-
`,
|
|
3383
|
+
`,If=r.css`
|
|
3332
3384
|
width: 100%;
|
|
3333
3385
|
display: flex;
|
|
3334
3386
|
align-items: center;
|
|
3335
3387
|
justify-content: space-between;
|
|
3336
3388
|
position: relative;
|
|
3337
|
-
`,
|
|
3389
|
+
`,Nf=r.css`
|
|
3338
3390
|
height: 60px;
|
|
3339
3391
|
width: 80px;
|
|
3340
3392
|
display: flex;
|
|
3341
3393
|
flex-direction: column;
|
|
3342
3394
|
align-items: center;
|
|
3343
3395
|
justify-content: space-between;
|
|
3344
|
-
`,
|
|
3396
|
+
`,Vf=(e,t)=>r.css`
|
|
3345
3397
|
height: 32px;
|
|
3346
3398
|
width: 32px;
|
|
3347
3399
|
display: flex;
|
|
@@ -3377,12 +3429,12 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3377
3429
|
}
|
|
3378
3430
|
|
|
3379
3431
|
${t?`\n background-color: ${p("neutral",300)};\n \n &:hover {\n background-color: ${p("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
|
3380
|
-
`,
|
|
3432
|
+
`,Af=e=>r.css`
|
|
3381
3433
|
color: ${p("neutral",e?800:600)};
|
|
3382
3434
|
font-size: 14px;
|
|
3383
3435
|
line-height: 20px;
|
|
3384
3436
|
font-weight: 400;
|
|
3385
|
-
`,
|
|
3437
|
+
`,zf=r.css`
|
|
3386
3438
|
height: 1px;
|
|
3387
3439
|
width: 100%;
|
|
3388
3440
|
padding: 0 30px;
|
|
@@ -3390,11 +3442,11 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3390
3442
|
top: 16px;
|
|
3391
3443
|
left: 0;
|
|
3392
3444
|
z-index: -1;
|
|
3393
|
-
`,
|
|
3445
|
+
`,Bf=r.css`
|
|
3394
3446
|
height: 1px;
|
|
3395
3447
|
width: 100%;
|
|
3396
3448
|
background-color: ${p("neutral",400)};
|
|
3397
|
-
`,
|
|
3449
|
+
`,Hf=r.css`
|
|
3398
3450
|
justify-content: space-between;
|
|
3399
3451
|
align-items: center;
|
|
3400
3452
|
gap: 8px;
|
|
@@ -3437,21 +3489,21 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3437
3489
|
color: ${p("error",900)};
|
|
3438
3490
|
}
|
|
3439
3491
|
}
|
|
3440
|
-
`,
|
|
3492
|
+
`,Ff=r.css`
|
|
3441
3493
|
font-size: 18px;
|
|
3442
3494
|
line-height: 28px;
|
|
3443
3495
|
font-weight: 400;
|
|
3444
3496
|
color: ${p("neutral",800)};
|
|
3445
|
-
`,
|
|
3497
|
+
`,Zf=r.css`
|
|
3446
3498
|
font-size: 16px;
|
|
3447
3499
|
line-height: 24px;
|
|
3448
3500
|
font-weight: 400;
|
|
3449
3501
|
color: ${p("neutral",700)};
|
|
3450
|
-
`,
|
|
3502
|
+
`,Wf=r.css`
|
|
3451
3503
|
padding: 6px;
|
|
3452
|
-
`,
|
|
3504
|
+
`,qf=r.css`
|
|
3453
3505
|
padding: 6px;
|
|
3454
|
-
`,
|
|
3506
|
+
`,Gf={pauseOnPageIdle:!0,offsets:"24px"},Uf={"top-start":e.createToaster({placement:"top-start",...Gf}),"top-end":e.createToaster({placement:"top-end",...Gf}),"bottom-start":e.createToaster({placement:"bottom-start",...Gf}),"bottom-end":e.createToaster({placement:"bottom-end",...Gf})};exports.AnalysisWidget=({children:r,header:o,footer:i,expanded:a=!0,collapsible:s=!0,actions:l})=>{const c="analysis-widget-item",[u,d]=n.useState(a),p=`analysis-widget-header-${c}`;return t.jsx(e.Box,{as:"section","aria-labelledby":p,css:Qi,children:t.jsx(e.Accordion.Root,{multiple:!0,value:s?void 0:[c],defaultValue:a?[c]:[],children:t.jsxs(e.Accordion.Item,{css:ta,value:c,children:[o&&t.jsx(e.Accordion.ItemTrigger,{id:p,role:"button","aria-expanded":u,tabIndex:0,css:ea,pointerEvents:s?"auto":"none",onClick:s?()=>{d(!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(At,{variant:"info-grey",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},icon:e?.icon},e.label))),s&&t.jsx(e.Accordion.ItemIndicator,{height:"16px",display:"flex",children:t.jsx(k,{"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,i&&t.jsx(e.Box,{css:na,children:i})]})]})})})},exports.Avatar=vf,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:mf,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:bf(),children:[t.jsx(I,{color:"currentColor",height:"16px",width:"16px"}),!e||r||o?null:t.jsx("div",{css:yf,"aria-hidden":!0})]}),o?t.jsx("p",{children:o}):null,s.length>0?t.jsx("div",{css:jf,children:t.jsx("p",{css:kf,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:mf,role:"status","aria-live":"polite",children:[o?t.jsx("p",{children:o}):null,t.jsxs("div",{css:bf(l),children:[s.length>0?t.jsx("div",{css:wf,children:t.jsx("p",{css:Cf,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:yf,"aria-hidden":!0}):null,t.jsx(I,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:n,additionalSettings:o,options:i,onOptionSelected:a,maxHeight:s="400px",maxWidth:l="260px"})=>t.jsx("div",{css:fn(s,l),children:t.jsxs("div",{className:"ds-base-map-scroll-content",children:[t.jsxs("div",{css:xn,children:[t.jsx("h2",{className:"ds-base-map-header-title",children:e}),t.jsx("p",{className:"ds-base-map-header-caption",children:n})]}),t.jsxs("div",{css:gn,children:[o?t.jsx("div",{css:vn,children:o.map((e=>t.jsxs("div",{children:[t.jsx(je,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:mn,children:e.children}):null]},e.label)))}):null,i?t.jsx("div",{css:bn,children:i.map((e=>{return t.jsxs("div",{css:yn(e.active),role:"button",onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||a?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
|
|
3455
3507
|
height: 32px;
|
|
3456
3508
|
width: 32px;
|
|
3457
3509
|
border: 1px solid ${p("neutral",300)};
|
|
@@ -3474,7 +3526,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3474
3526
|
padding: 0px;
|
|
3475
3527
|
padding-top: 8px;
|
|
3476
3528
|
color: ${i?p("neutral",500):"inherit"};
|
|
3477
|
-
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=re,exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:Ki,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:Ji,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(k,{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:kh(r,o),children:t.jsxs("div",{css:$h(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Sh,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Eh,children:[n," ",a]})})]})})},exports.IconButton=ne,exports.IconMarker=jn,exports.IconMarkers=kn,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(j,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=$f;return"info-grey"===r?c=Sf:"success"===r?c=Ef:"warning"===r?c=Rf:"error"===r&&(c=Of),t.jsxs("div",{css:[wf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Cf,children:[i,t.jsx("p",{css:jf(o),children:e})]}),t.jsx("p",{css:kf(o),children:n})]}),s?t.jsx(m,{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:ot,children:[i?t.jsx("div",{css:st}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:it(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:at(p),"aria-label":o,children:o}),i?t.jsx("p",{css:lt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ct(!!i,s),attached:!0,children:["start"===s?t.jsx(Ht,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(gt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Ht,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Ri,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:Bo,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:Ho,children:[r,t.jsx(At,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Fo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(ze,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Xo,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:zo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=Xo,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:Yo,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Ko,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Jo,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Qo,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:ei,children:[t.jsxs("div",{css:ti,children:[t.jsx(ne,{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(ne,{icon:t.jsx(k,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ne,{icon:t.jsx(k,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:ni,children:[t.jsxs("div",{children:[t.jsx("h3",{css:ri,children:e}),t.jsx("p",{css:oi,children:n})]}),t.jsx(m,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:ii,children:[t.jsx(m,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(j,{}),onClick:l}),t.jsx(ui,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:Oi(r),children:n.map((e=>t.jsx(Ii,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),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(N,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(V,{}),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.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}=To({open:e,onOpenChange:r,placement:c,whileElementsMounted:Jr,middleware:[uo(u),(b={fallbackAxisSideDirection:"start"},{...to(b),options:[b,y]}),po({padding:8}),ho({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=So(),v=Tr("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Oo(f),{escapeKey:C,outsidePress:j}=Oo(x),k=l.useRef(!1),$=Tr((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?Rr(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=Tr((e=>{var t;const n=()=>{var t;$(e),null==(t=$r(e))||t.removeEventListener("keydown",n)};null==(t=$r(e))||t.addEventListener("keydown",n)})),E=Tr((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=$r(e),l="[data-floating-ui-inert]",c=Er(o.floating).querySelectorAll(l);let d=Ln(s)?s:null;for(;d&&!Wn(d);){const e=Un(d);if(Wn(e)||!Ln(e))break;d=e}if(c.length&&Ln(s)&&!s.matches("html,body")&&!kr(s,o.floating)&&Array.from(c).every((e=>!kr(d,e))))return;if(Tn(s)&&L){const t=Wn(s),n=qn(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&&Rr(g.nodesRef.current,p).some((t=>{var n;return Sr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Sr(e,o.floating)||Sr(e,o.domReference)||h)return;const f=g?Rr(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=Tr((e=>{var t;const n=()=>{var t;E(e),null==(t=$r(e))||t.removeEventListener(u,n)};null==(t=$r(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}),Fn()?5:0)}const d=Er(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&&(Ln(o.domReference)&&(p=Yn(o.domReference)),Ln(o.floating)&&(p=p.concat(Yn(o.floating))),!Ln(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(Yn(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 O=l.useMemo((()=>({onKeyDown:$,...d&&{[Eo[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Ro[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=Mo(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=>Po(t,e,"reference")),t),i=l.useCallback((t=>Po(t,e,"floating")),n),a=l.useCallback((t=>Po(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:Do,children:[t.jsxs("div",{css:Io,children:[i,t.jsx(re,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:No,children:a}),s?t.jsx("div",{css:Vo,children:s}):null,t.jsx("div",{ref:h,css:Ao(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=de,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const[l,c]=n.useState(Ph(o,r)||0);return t.jsx("div",{css:Rh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>{return c(Ph(o,t=e)),void(i&&i(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map((n=>{const{label:r,icon:o,bagdeCount:i,"aria-label":s,...l}=n;return t.jsxs(e.Tabs.Trigger,{css:Oh,"aria-label":s||r,...l,children:[t.jsxs("div",{css:Lh,children:[o,i?t.jsx("div",{css:Th,className:"ds-badge-count",children:i}):null]}),a?null:t.jsx("p",{children:r})]},r)}))})})})},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(es,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ts(i),children:[t.jsxs(e.Dialog.Header,{css:ns,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:rs,asChild:!0,children:t.jsx(re,{})})]}),t.jsx(e.Dialog.Body,{css:os,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),h=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:me,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":h,role:"group",children:[t.jsx(m,{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:ge(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(m,{variant:r,size:o,leftIcon:t.jsx(k,{rotate:u?"180":"0",color:p("accessible","text-on-primary-mids")||p("primary",900)}),disabled:l})}),t.jsx(be,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:ve(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})=>{const h=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[b,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=ef),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&h.current&&x.current){const e=h.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=ef||window.innerWidth<=b?(d?.(96),v(!0)):window.innerWidth>ef&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>b&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=ef||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[b,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:_h(g&&!w,u),children:[t.jsxs("div",{css:Dh(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
|
|
3529
|
+
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=re,exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:Ki,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:Ji,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(k,{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:kh(r,o),children:t.jsxs("div",{css:$h(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Sh,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Eh,children:[n," ",a]})})]})})},exports.IconButton=ne,exports.IconMarker=jn,exports.IconMarkers=kn,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(j,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Of;return"info-grey"===r?c=Lf:"success"===r?c=Tf:"warning"===r?c=Pf:"error"===r&&(c=_f),t.jsxs("div",{css:[$f(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Sf,children:[i,t.jsx("p",{css:Ef(o),children:e})]}),t.jsx("p",{css:Rf(o),children:n})]}),s?t.jsx(m,{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:ot,children:[i?t.jsx("div",{css:st}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:it(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:at(p),"aria-label":o,children:o}),i?t.jsx("p",{css:lt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ct(!!i,s),attached:!0,children:["start"===s?t.jsx(Ht,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(gt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Ht,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Ri,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:Bo,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:Ho,children:[r,t.jsx(At,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Fo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(ze,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Xo,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:zo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=Xo,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:Yo,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Ko,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Jo,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Qo,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:ei,children:[t.jsxs("div",{css:ti,children:[t.jsx(ne,{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(ne,{icon:t.jsx(k,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ne,{icon:t.jsx(k,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:ni,children:[t.jsxs("div",{children:[t.jsx("h3",{css:ri,children:e}),t.jsx("p",{css:oi,children:n})]}),t.jsx(m,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:ii,children:[t.jsx(m,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(j,{}),onClick:l}),t.jsx(ui,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:Oi(r),children:n.map((e=>t.jsx(Ii,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),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(N,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(V,{}),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.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}=To({open:e,onOpenChange:r,placement:c,whileElementsMounted:Jr,middleware:[uo(u),(b={fallbackAxisSideDirection:"start"},{...to(b),options:[b,y]}),po({padding:8}),ho({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=So(),v=Tr("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Oo(f),{escapeKey:C,outsidePress:j}=Oo(x),k=l.useRef(!1),$=Tr((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?Rr(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=Tr((e=>{var t;const n=()=>{var t;$(e),null==(t=$r(e))||t.removeEventListener("keydown",n)};null==(t=$r(e))||t.addEventListener("keydown",n)})),E=Tr((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=$r(e),l="[data-floating-ui-inert]",c=Er(o.floating).querySelectorAll(l);let d=Ln(s)?s:null;for(;d&&!Wn(d);){const e=Un(d);if(Wn(e)||!Ln(e))break;d=e}if(c.length&&Ln(s)&&!s.matches("html,body")&&!kr(s,o.floating)&&Array.from(c).every((e=>!kr(d,e))))return;if(Tn(s)&&L){const t=Wn(s),n=qn(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&&Rr(g.nodesRef.current,p).some((t=>{var n;return Sr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Sr(e,o.floating)||Sr(e,o.domReference)||h)return;const f=g?Rr(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=Tr((e=>{var t;const n=()=>{var t;E(e),null==(t=$r(e))||t.removeEventListener(u,n)};null==(t=$r(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}),Fn()?5:0)}const d=Er(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&&(Ln(o.domReference)&&(p=Yn(o.domReference)),Ln(o.floating)&&(p=p.concat(Yn(o.floating))),!Ln(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(Yn(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 O=l.useMemo((()=>({onKeyDown:$,...d&&{[Eo[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Ro[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=Mo(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=>Po(t,e,"reference")),t),i=l.useCallback((t=>Po(t,e,"floating")),n),a=l.useCallback((t=>Po(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:Do,children:[t.jsxs("div",{css:Io,children:[i,t.jsx(re,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:No,children:a}),s?t.jsx("div",{css:Vo,children:s}):null,t.jsx("div",{ref:h,css:Ao(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=de,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const[l,c]=n.useState(Ph(o,r)||0);return t.jsx("div",{css:Rh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>{return c(Ph(o,t=e)),void(i&&i(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map((n=>{const{label:r,icon:o,bagdeCount:i,"aria-label":s,...l}=n;return t.jsxs(e.Tabs.Trigger,{css:Oh,"aria-label":s||r,...l,children:[t.jsxs("div",{css:Lh,children:[o,i?t.jsx("div",{css:Th,className:"ds-badge-count",children:i}):null]}),a?null:t.jsx("p",{children:r})]},r)}))})})})},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(es,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ts(i),children:[t.jsxs(e.Dialog.Header,{css:ns,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:rs,asChild:!0,children:t.jsx(re,{})})]}),t.jsx(e.Dialog.Body,{css:os,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),h=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:me,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":h,role:"group",children:[t.jsx(m,{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:ge(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(m,{variant:r,size:o,leftIcon:t.jsx(k,{rotate:u?"180":"0",color:p("accessible","text-on-primary-mids")||p("primary",900)}),disabled:l})}),t.jsx(be,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:ve(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})=>{const h=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[b,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=ef),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&h.current&&x.current){const e=h.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=ef||window.innerWidth<=b?(d?.(96),v(!0)):window.innerWidth>ef&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>b&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=ef||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[b,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:_h(g&&!w,u),children:[t.jsxs("div",{css:Dh(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
|
|
3478
3530
|
display: flex;
|
|
3479
3531
|
align-items: center;
|
|
3480
3532
|
justify-content: flex-start;
|
|
@@ -3504,7 +3556,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3504
3556
|
font-weight: 700;
|
|
3505
3557
|
color: ${p("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
|
|
3506
3558
|
}
|
|
3507
|
-
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Ut(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:Xt(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(w,{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:Xt(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(w,{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:Xt(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(w,{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:Xt(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(w,{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:Xt(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(w,{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:
|
|
3559
|
+
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Ut(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:Xt(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(w,{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:Xt(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(w,{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:Xt(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(w,{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:Xt(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(w,{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:Xt(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(w,{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:Mf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Df(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"})})=>{const[c,u]=n.useState(!0),d=n.useId(),p=n.useId(),h="raster"===e,f="line"===e,x="point"===e,g=n.useId(),v=n.useMemo((()=>`${e?`${e} layer`:"layer"}, ${r}${o?`, ${o}`:""}. Currently ${c?"visible":"hidden"}.`),[c,e,r,o]),b=c?"Hide":"Show";return t.jsxs("div",{css:fi,children:[t.jsx("p",{id:g,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:v}),t.jsxs("div",{css:xi,children:[t.jsxs("div",{children:[h&&t.jsx("div",{css:di(i)}),f&&t.jsx("div",{css:pi(i)}),x&&t.jsx("div",{css:hi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:d,css:gi,children:r}),o?t.jsx("p",{id:p,css:vi,children:o}):null]})]}),a&&s?t.jsx("div",{css:mi,children:t.jsx(m,{type:"button",variant:"borderless",label:b,rightIcon:c?t.jsx(L,{}):t.jsx(O,{}),"aria-pressed":c,"aria-labelledby":`${g} ${d}`,onClick:()=>{u((e=>!e)),a?.()}})}):null]})},exports.Radio=Ae,exports.RadioGroup=ze,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,{tabIndex:0,css:Yt,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:en}):null,t.jsxs("div",{css:(f=!!c,r.css`
|
|
3508
3560
|
margin-left: ${f?"19px":"0px"};
|
|
3509
3561
|
`),children:[t.jsxs("p",{css:Kt,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:Jt,"aria-label":o,children:o}),c?t.jsx("p",{css:tn,"aria-label":c,children:c}):null,t.jsx("div",{css:Qt,children:t.jsx(ze,{name:i,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(Ae,{css:"card"===d?nn:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=Q,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:bi,children:[i?t.jsx("div",{css:(a=ki(e),r.css`
|
|
3510
3562
|
height: 20px;
|
|
@@ -3513,4 +3565,4 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3513
3565
|
border: 1px solid ${p("neutral",300)};
|
|
3514
3566
|
border-radius: 4px;
|
|
3515
3567
|
${a?`background: ${a};`:""}
|
|
3516
|
-
`)}):t.jsx("div",{css:yi,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:wi,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ci,children:e})},e)))}),o&&o.length?t.jsx("div",{css:wi,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:ji,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=Ht,exports.Sheet=({header:e,content:n,footer:r,open:o=!1,onClose:i,minimizedHeight:a,midHeight:s=200,maxFullHeight:l,defaultSnap:c="minimized",className:u,blocking:d,zIndex:p=1e3})=>t.jsx(bh,{css:yh(!!e,p),className:u,open:o,onDismiss:i,header:e,footer:r,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>[20,a||e,s+(r?n:0),l||t-t/6],defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let o=20;return"minimized"===c?o=a||e:"mid"===c?o=s+(r?n:0):"full"===c&&(o=l||t-t/6),o},blocking:d,children:n}),exports.Slider=Xe,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:rn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:on(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:an,children:[i.step&&i.marks?t.jsx(Ht,{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(gt,{"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(Xe,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(gt,{"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:Pf,children:[e.map(((e,r)=>t.jsxs("div",{css:_f,children:[t.jsx("button",{css:Mf(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(w,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:Df(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:If,children:t.jsx("div",{css:Nf})})]}),exports.Switch=Ke,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(pf(i,o)||0),u="view"===r;return t.jsx("div",{css:sf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(pf(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"===hf(l)?t.jsx("div",{css:uf}):null,t.jsx(e.Tabs.Trigger,{css:[lf,u?df: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),u&&1===o&&"right"===hf(l)?t.jsx("div",{css:uf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o,renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,onSortColumn:d,onPageSizeChange:p,onPageChange:h,onAllItemsSelected:f})=>{const[x,g]=n.useState({key:"",order:""}),{totalItems:v=o.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:w}=l||{},C=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},j=u?.length===o?.length,$=u&&u.length>0&&!j;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:Hi,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Fi,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(je,{name:"header-checkbox",checked:j,indeterminate:$,onCheckedChange:({checked:e})=>{f&&f(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===x.order?"ascending":n.sortable&&"desc"===x.order?"descending":void 0,children:t.jsxs("div",{css:Zi,children:[n.label,n.sortable?t.jsxs("div",{css:Wi,children:[t.jsx(ne,{css:qi(x.key===n.key&&"asc"===x.order),icon:t.jsx(k,{style:{transform:"rotate(180deg)"}}),onClick:()=>C(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ne,{css:qi(x.key===n.key&&"desc"===x.order),icon:t.jsx(k,{}),onClick:()=>C(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),t.jsxs("div",{css:Gi,children:[t.jsx("div",{children:y?t.jsx(Ri,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:w}):null}),l?t.jsx("div",{css:Ui,children:t.jsx(Bi,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=Yi,exports.TableRow=Xi,exports.Tag=At,exports.TextInput=gt,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:sn(c),children:[S?t.jsx("div",{css:ln}):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:cn(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:un(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:pn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:hn(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:pn,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:pn,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:dn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(Zf).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:Zf[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:Vf,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(j,{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(_,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:Af,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:zf,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(m,{css:Bf,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),Zf[n].dismiss()}}):null,r.meta?.closable?t.jsx(m,{css:Hf,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>Zf[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=fe,exports.Tooltip=({children:r,content:o,showArrow:i=!0,disabled:a,position:s="bottom",variant:l="pill",portalRef:c,openDelay:u=0,closeDelay:d=0})=>{const[p,h]=n.useState(!1);return a?r:t.jsxs(e.Tooltip.Root,{positioning:{placement:s,offset:"pill"===l?void 0:{mainAxis:0,crossAxis:0}},openDelay:u,closeDelay:d,open:p,onOpenChange:({open:e})=>h(e),children:[t.jsx(e.Tooltip.Trigger,{tabIndex:0,onClick:()=>h(!0),css:ye,children:r}),t.jsx(e.Portal,{disabled:a,container:c,children:t.jsx(e.Tooltip.Positioner,{children:t.jsxs(e.Tooltip.Content,{css:we(l),children:[i&&"pill"===l?t.jsx(e.Tooltip.Arrow,{children:t.jsx(e.Tooltip.ArrowTip,{})}):null,o]})})})]})},exports.designSystemStyles=d,exports.getThemedColor=p,exports.showToast=e=>{Zf[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
|
|
3568
|
+
`)}):t.jsx("div",{css:yi,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:wi,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ci,children:e})},e)))}),o&&o.length?t.jsx("div",{css:wi,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:ji,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Select=Ht,exports.Sheet=({header:e,content:n,footer:r,open:o=!1,onClose:i,minimizedHeight:a,midHeight:s=200,maxFullHeight:l,defaultSnap:c="minimized",className:u,blocking:d,zIndex:p=1e3})=>t.jsx(bh,{css:yh(!!e,p),className:u,open:o,onDismiss:i,header:e,footer:r,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>[20,a||e,s+(r?n:0),l||t-t/6],defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let o=20;return"minimized"===c?o=a||e:"mid"===c?o=s+(r?n:0):"full"===c&&(o=l||t-t/6),o},blocking:d,children:n}),exports.Slider=Xe,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:rn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:on(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:an,children:[i.step&&i.marks?t.jsx(Ht,{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(gt,{"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(Xe,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(gt,{"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:If,children:[e.map(((e,r)=>t.jsxs("div",{css:Nf,children:[t.jsx("button",{css:Vf(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(w,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:Af(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:zf,children:t.jsx("div",{css:Bf})})]}),exports.Switch=Ke,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(pf(i,o)||0),u="view"===r;return t.jsx("div",{css:sf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(pf(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"===hf(l)?t.jsx("div",{css:uf}):null,t.jsx(e.Tabs.Trigger,{css:[lf,u?df: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),u&&1===o&&"right"===hf(l)?t.jsx("div",{css:uf}):null]},r.label)))})})})},exports.Table=({columns:r,data:o,renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,onSortColumn:d,onPageSizeChange:p,onPageChange:h,onAllItemsSelected:f})=>{const[x,g]=n.useState({key:"",order:""}),{totalItems:v=o.length,currentPage:m=1,pageSize:b=10,showItemCount:y,showItemCountText:w}=l||{},C=(e,t)=>{g({key:e,order:t}),d&&d({key:e,order:t})},j=u?.length===o?.length,$=u&&u.length>0&&!j;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:Hi,striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Fi,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(je,{name:"header-checkbox",checked:j,indeterminate:$,onCheckedChange:({checked:e})=>{f&&f(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===x.order?"ascending":n.sortable&&"desc"===x.order?"descending":void 0,children:t.jsxs("div",{css:Zi,children:[n.label,n.sortable?t.jsxs("div",{css:Wi,children:[t.jsx(ne,{css:qi(x.key===n.key&&"asc"===x.order),icon:t.jsx(k,{style:{transform:"rotate(180deg)"}}),onClick:()=>C(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ne,{css:qi(x.key===n.key&&"desc"===x.order),icon:t.jsx(k,{}),onClick:()=>C(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),t.jsxs("div",{css:Gi,children:[t.jsx("div",{children:y?t.jsx(Ri,{pageSize:b,currentPage:m,totalItems:v,onPageSizeChange:p,showItemCountText:w}):null}),l?t.jsx("div",{css:Ui,children:t.jsx(Bi,{totalItems:v,pageSize:b,currentPage:m,onPageChange:h})}):null]})]})},exports.TableCell=Yi,exports.TableRow=Xi,exports.Tag=At,exports.TextInput=gt,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:sn(c),children:[S?t.jsx("div",{css:ln}):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:cn(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:un(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:pn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:hn(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:pn,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:pn,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:dn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(Uf).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:Uf[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:Hf,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(j,{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(_,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:Ff,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:Zf,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(m,{css:Wf,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),Uf[n].dismiss()}}):null,r.meta?.closable?t.jsx(m,{css:qf,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>Uf[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=fe,exports.Tooltip=({children:r,content:o,showArrow:i=!0,disabled:a,position:s="bottom",variant:l="pill",portalRef:c,openDelay:u=0,closeDelay:d=0})=>{const[p,h]=n.useState(!1);return a?r:t.jsxs(e.Tooltip.Root,{positioning:{placement:s,offset:"pill"===l?void 0:{mainAxis:0,crossAxis:0}},openDelay:u,closeDelay:d,open:p,onOpenChange:({open:e})=>h(e),children:[t.jsx(e.Tooltip.Trigger,{tabIndex:0,onClick:()=>h(!0),css:ye,children:r}),t.jsx(e.Portal,{disabled:a,container:c,children:t.jsx(e.Tooltip.Positioner,{children:t.jsxs(e.Tooltip.Content,{css:we(l),children:[i&&"pill"===l?t.jsx(e.Tooltip.Arrow,{children:t.jsx(e.Tooltip.ArrowTip,{})}):null,o]})})})]})},exports.designSystemStyles=d,exports.getThemedColor=p,exports.showToast=e=>{Uf[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
|
@@ -614,7 +614,7 @@ declare const ExtendableCard: ({ children, header, footer }: ExtendableCardProps
|
|
|
614
614
|
|
|
615
615
|
interface AnalysisWidgetProps {
|
|
616
616
|
children: React__default.ReactNode;
|
|
617
|
-
header
|
|
617
|
+
header?: React__default.ReactNode;
|
|
618
618
|
footer?: React__default.ReactNode;
|
|
619
619
|
expanded?: boolean;
|
|
620
620
|
collapsible?: boolean;
|
|
@@ -777,6 +777,17 @@ type TabBarProps = {
|
|
|
777
777
|
|
|
778
778
|
declare const TabBar: ({ variant, defaultValue, tabs, onTabClick, activationMode, }: TabBarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
779
779
|
|
|
780
|
+
type AvatarProps = {
|
|
781
|
+
name: string;
|
|
782
|
+
ariaLabel?: string;
|
|
783
|
+
src?: string;
|
|
784
|
+
srcSet?: string;
|
|
785
|
+
onClick?: () => void;
|
|
786
|
+
notificationCount?: number;
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
790
|
+
|
|
780
791
|
type BadgeProps = {
|
|
781
792
|
hasNotification?: boolean;
|
|
782
793
|
notificationCount?: number;
|
|
@@ -835,4 +846,4 @@ type ToastProps = {
|
|
|
835
846
|
|
|
836
847
|
declare const showToast: (props: ToastProps) => void;
|
|
837
848
|
|
|
838
|
-
export { AnalysisWidget, Badge, BaseMap, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, ExtendableCard, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerParameters, LegendItem, List, MapControlsToolbar, MapPopUp, Menu, MobileTabBar, Modal, MultiActionButton, Navbar, NavigationRail, OptionCard, Pagination, Panel, Password, ProgressBar, QualitativeAttribute, Radio, RadioGroup, RadioList, SSOButtons, ScaleBar, Select, Sheet, Slider, SliderInput, StepProgressIndicator, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, Toolbar, Tooltip, designSystemStyles, getThemedColor, showToast };
|
|
849
|
+
export { AnalysisWidget, Avatar, Badge, BaseMap, Breadcrumb, Button, Checkbox, CheckboxList, CheckboxOptionCard, CloseButton, ExtendableCard, Footer, IconButton, IconMarker, IconMarkers, InlineMessage, InputWithUnits, ItemCount, LayerGroup, LayerGroupContainer, LayerItem, LayerParameters, LegendItem, List, MapControlsToolbar, MapPopUp, Menu, MobileTabBar, Modal, MultiActionButton, Navbar, NavigationRail, OptionCard, Pagination, Panel, Password, ProgressBar, QualitativeAttribute, Radio, RadioGroup, RadioList, SSOButtons, ScaleBar, Select, Sheet, Slider, SliderInput, StepProgressIndicator, Switch, TabBar, Table, TableCell, TableRow, Tag, TextInput, Textarea, Toast, Toolbar, Tooltip, designSystemStyles, getThemedColor, showToast };
|