@worldresources/wri-design-systems 2.203.2 → 2.204.1
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 +75 -11
- package/dist/index.cjs.js +4 -3
- package/dist/index.d.ts +10 -1
- package/dist/index.esm.js +4 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -85,11 +85,71 @@ Copy the `SKILL.md` file you want into the matching skills folder in your own pr
|
|
|
85
85
|
|
|
86
86
|
With this custom theme you can change the color scheme according to your Project Theme
|
|
87
87
|
|
|
88
|
+
### Add an EmotionProvider to avoid hydrate errors
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
'use client'
|
|
92
|
+
|
|
93
|
+
import React, { useState } from 'react'
|
|
94
|
+
import { useServerInsertedHTML } from 'next/navigation'
|
|
95
|
+
import { CacheProvider } from '@emotion/react'
|
|
96
|
+
import createCache from '@emotion/cache'
|
|
97
|
+
|
|
98
|
+
export default function EmotionProvider({
|
|
99
|
+
children,
|
|
100
|
+
}: {
|
|
101
|
+
children: React.ReactNode
|
|
102
|
+
}) {
|
|
103
|
+
const [{ cache, flush }] = useState(() => {
|
|
104
|
+
const cache = createCache({ key: 'css-global' })
|
|
105
|
+
cache.compat = true
|
|
106
|
+
const prevInsert = cache.insert
|
|
107
|
+
let inserted: string[] = []
|
|
108
|
+
cache.insert = (...args) => {
|
|
109
|
+
const serialized = args[1]
|
|
110
|
+
if (cache.inserted[serialized.name] === undefined) {
|
|
111
|
+
inserted.push(serialized.name)
|
|
112
|
+
}
|
|
113
|
+
return prevInsert(...args)
|
|
114
|
+
}
|
|
115
|
+
const flush = () => {
|
|
116
|
+
const prevInserted = inserted
|
|
117
|
+
inserted = []
|
|
118
|
+
return prevInserted
|
|
119
|
+
}
|
|
120
|
+
return { cache, flush }
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
useServerInsertedHTML(() => {
|
|
124
|
+
const names = flush()
|
|
125
|
+
if (names.length === 0) return null
|
|
126
|
+
let styles = ''
|
|
127
|
+
for (const name of names) {
|
|
128
|
+
styles += cache.inserted[name]
|
|
129
|
+
}
|
|
130
|
+
return (
|
|
131
|
+
<style
|
|
132
|
+
data-emotion={`${cache.key} ${names.join(' ')}`}
|
|
133
|
+
dangerouslySetInnerHTML={{ __html: styles }}
|
|
134
|
+
/>
|
|
135
|
+
)
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
return <CacheProvider value={cache}>{children}</CacheProvider>
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Chakra Provider
|
|
143
|
+
|
|
88
144
|
```tsx
|
|
89
|
-
import {
|
|
145
|
+
import {
|
|
146
|
+
ChakraProvider as ChakraProviderComponent,
|
|
147
|
+
createSystem,
|
|
148
|
+
} from '@chakra-ui/react'
|
|
90
149
|
import { designSystemStyles } from '@worldresources/wri-design-systems'
|
|
150
|
+
import EmotionProvider from './EmotionProvider'
|
|
91
151
|
|
|
92
|
-
|
|
152
|
+
const customStylesSystem = createSystem(designSystemStyles._config, {
|
|
93
153
|
theme: {
|
|
94
154
|
tokens: {
|
|
95
155
|
colors: {
|
|
@@ -177,23 +237,27 @@ export const system = createSystem(designSystemStyles._config, {
|
|
|
177
237
|
},
|
|
178
238
|
},
|
|
179
239
|
})
|
|
240
|
+
|
|
241
|
+
const ChakraProvider = ({ children }: { children: React.ReactNode }) => (
|
|
242
|
+
<EmotionProvider>
|
|
243
|
+
<ChakraProviderComponent value={customStylesSystem}>
|
|
244
|
+
{children}
|
|
245
|
+
</ChakraProviderComponent>
|
|
246
|
+
</EmotionProvider>
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
export default ChakraProvider
|
|
180
250
|
```
|
|
181
251
|
|
|
182
252
|
### Wrap ChakraProvider at the root of your app
|
|
183
253
|
|
|
184
254
|
```tsx
|
|
185
255
|
import React from 'react'
|
|
186
|
-
import
|
|
187
|
-
import { designSystemStyles } from "@worldresources/wri-design-systems";
|
|
188
|
-
import { system } from './lib/theme'
|
|
256
|
+
import ChakraProvider from './path/to/your/ChakraProvider'
|
|
189
257
|
|
|
190
258
|
function App() {
|
|
191
259
|
return (
|
|
192
|
-
|
|
193
|
-
{/* <ChakraProvider value={designSystemStyles}> */}
|
|
194
|
-
|
|
195
|
-
{/* if you want to use your custom system Theme colors */}
|
|
196
|
-
<ChakraProvider value={system}>
|
|
260
|
+
<ChakraProvider>
|
|
197
261
|
<TheRestOfYourApplication />
|
|
198
262
|
</ChakraProvider>
|
|
199
263
|
)
|
|
@@ -470,7 +534,7 @@ line-height: ${getThemedLineHeight(600)};
|
|
|
470
534
|
## Building the lib
|
|
471
535
|
|
|
472
536
|
```
|
|
473
|
-
yarn lint
|
|
537
|
+
yarn lint:fix
|
|
474
538
|
```
|
|
475
539
|
|
|
476
540
|
```
|
package/dist/index.cjs.js
CHANGED
|
@@ -1434,7 +1434,7 @@
|
|
|
1434
1434
|
}
|
|
1435
1435
|
|
|
1436
1436
|
${t?`\n --translate-y: -24% !important;\n\n .chakra-slider__markerIndicator {\n height: 1rem;\n width: 0.25rem;\n background-color: ${w("primary",700)} !important;\n }\n\n &[data-disabled] {\n .chakra-slider__markerIndicator {\n background-color: ${w("neutral",400)} !important;\n }\n }\n `:""};
|
|
1437
|
-
`,Nb=t=>{const{value:n}=t;return r.jsx(e.For,{each:n,children:(t,n)=>r.jsxs(e.Slider.Thumb,{css:Tb,index:n,children:[r.jsx("div",{css:Ob,className:"ds-slider-value-preview",children:t}),r.jsx(e.Slider.HiddenInput,{})]},n)})},Db=n.forwardRef(((t,n)=>{const{marks:o,isCentred:i}=t;return o?.length?r.jsx(e.Slider.MarkerGroup,{ref:n,children:o.map(((t,n)=>{const o="number"==typeof t?t:t.value,s=i&&1===n;return r.jsx(e.Slider.Marker,{css:Rb(i,s),value:o,children:r.jsx(e.Slider.MarkerIndicator,{})},o)}))}):null})),Ib=e=>{const{marks:t,min:n,max:o}=e,i=t?.filter((e=>void 0!==e.label&&null!==e.label));if(!i?.length)return null;const s=o-n||1;return r.jsx("div",{css:jb,children:i.map((e=>{
|
|
1437
|
+
`,Nb=t=>{const{value:n}=t;return r.jsx(e.For,{each:n,children:(t,n)=>r.jsxs(e.Slider.Thumb,{css:Tb,index:n,children:[r.jsx("div",{css:Ob,className:"ds-slider-value-preview",children:t}),r.jsx(e.Slider.HiddenInput,{})]},n)})},Db=n.forwardRef(((t,n)=>{const{marks:o,isCentred:i}=t;return o?.length?r.jsx(e.Slider.MarkerGroup,{ref:n,children:o.map(((t,n)=>{const o="number"==typeof t?t:t.value,s=i&&1===n;return r.jsx(e.Slider.Marker,{css:Rb(i,s),value:o,children:r.jsx(e.Slider.MarkerIndicator,{})},o)}))}):null})),Ib=e=>{const{marks:t,min:n,max:o}=e,i=t?.filter((e=>void 0!==e.label&&null!==e.label));if(!i?.length)return null;const s=o-n||1;return r.jsx("div",{css:jb,children:i.map((e=>{let t="-50%";return e.value===n?t="0":e.value===o&&(t="-100%"),r.jsx("span",{css:Eb,style:{left:(e.value-n)/s*100+"%",transform:`translateX(${t})`},children:e.label},e.value)}))})},Pb=n.forwardRef(((t,o)=>{const{marks:i,onValueChange:s,isCentred:a,value:l,...c}=t,[d,u]=n.useState(l||[0]);n.useEffect((()=>{u(l||[0])}),[l]);const h=c.min??0,p=c.max??100;let f=i?.map((e=>"number"==typeof e?{value:e,label:void 0}:e));a&&(f=[h,(h+p)/2,p].map((e=>({value:e,label:void 0}))));const m=!!f?.some((e=>e.label));return r.jsxs(e.Slider.Root,{css:Mb,ref:o,thumbAlignment:"center",onValueChange:e=>{u(e.value),s&&s(e)},origin:a?"center":"start",value:d,...c,children:[r.jsx(Ib,{marks:f,min:h,max:p}),r.jsxs(e.Slider.Control,{"data-has-mark-label":m||void 0,children:[r.jsx(e.Slider.Track,{css:Lb,children:r.jsx(e.Slider.Range,{css:Ab(a)})}),r.jsx(Db,{marks:f,isCentred:a}),r.jsx(Nb,{value:d})]})]})})),zb=i.css`
|
|
1438
1438
|
--switch-height: 1.5rem;
|
|
1439
1439
|
--switch-width: 2.5rem;
|
|
1440
1440
|
|
|
@@ -1926,6 +1926,7 @@
|
|
|
1926
1926
|
|
|
1927
1927
|
.ds-select-input-container {
|
|
1928
1928
|
margin-bottom: 0;
|
|
1929
|
+
width: auto;
|
|
1929
1930
|
}
|
|
1930
1931
|
|
|
1931
1932
|
.chakra-slider__root {
|
|
@@ -2392,7 +2393,7 @@
|
|
|
2392
2393
|
margin-top: 1.125rem;
|
|
2393
2394
|
width: 100%;
|
|
2394
2395
|
}
|
|
2395
|
-
`,Ew=({defaultValue:t,onOpacityChanged:o,labels:i})=>{const s=Vf("OpacityControl",i),[a,l]=n.useState(t);return r.jsxs(e.Popover.Root,{positioning:{placement:"bottom-end"},children:[r.jsx(e.Popover.Trigger,{asChild:!0,children:r.jsx(Bf,{label:s.opacityButtonLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{})})}),r.jsx(e.Popover.Positioner,{children:r.jsx(e.Popover.Content,{css:Sw,children:r.jsxs(e.Popover.Body,{css:$w,children:[r.jsx("p",{css:Mw,children:s.opacityHeading}),r.jsxs("div",{css:jw,children:[r.jsxs("div",{style:{position:"relative"},children:[r.jsx(mg,{"aria-label":s.opacityAriaLabel,min:"0",max:"100",value:a,onChange:e=>{const t=e.target.value||"0";let n=parseInt(t,10);n=Number.isNaN(n)?0:n,n=n<0?0:n,n=n>100?100:n,l(n),o&&o(n)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx("p",{style:{position:"absolute",top:"
|
|
2396
|
+
`,Ew=({defaultValue:t,onOpacityChanged:o,labels:i})=>{const s=Vf("OpacityControl",i),[a,l]=n.useState(t);return r.jsxs(e.Popover.Root,{positioning:{placement:"bottom-end"},children:[r.jsx(e.Popover.Trigger,{asChild:!0,children:r.jsx(Bf,{label:s.opacityButtonLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{})})}),r.jsx(e.Popover.Positioner,{children:r.jsx(e.Popover.Content,{css:Sw,children:r.jsxs(e.Popover.Body,{css:$w,children:[r.jsx("p",{css:Mw,children:s.opacityHeading}),r.jsxs("div",{css:jw,children:[r.jsxs("div",{style:{position:"relative"},children:[r.jsx(mg,{"aria-label":s.opacityAriaLabel,min:"0",max:"100",value:a,onChange:e=>{const t=e.target.value||"0";let n=parseInt(t,10);n=Number.isNaN(n)?0:n,n=n<0?0:n,n=n>100?100:n,l(n),o&&o(n)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx("p",{style:{position:"absolute",top:"50%",right:"0.3125rem",transform:"translateY(-50%)",margin:0},children:s.percentSuffix})]}),r.jsx(Pb,{min:0,max:100,value:[a],onValueChangeEnd:({value:e})=>{l(e[0]),o&&o(e[0])}})]})]})})})]})},Tw=e=>i.css`
|
|
2396
2397
|
width: ${k(500)};
|
|
2397
2398
|
height: ${k(500)};
|
|
2398
2399
|
border-radius: 50%;
|
|
@@ -4334,7 +4335,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4334
4335
|
0 -0.25rem 0.375rem -0.25rem #0000001a,
|
|
4335
4336
|
0 -0.625rem 0.9375rem -0.1875rem #0000001a;
|
|
4336
4337
|
}
|
|
4337
|
-
`),"data-nav-source":A,onPointerMove:N,children:[r.jsx(e.Combobox.Empty,{children:y.noItemsFoundLabel}),C.items.map((t=>r.jsxs(e.Combobox.Item,{css:Lv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g?r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:b.map((e=>r.jsx(hv,{label:e.label,variant:"info-white",onClose:()=>v((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))}):null]})});var D},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(j.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:SC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:$C,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=sg,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:wO(n,o),children:r.jsxs("div",{css:CO(i),children:[r.jsxs("div",{css:$O,children:[r.jsx(rm,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:kO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:SO,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:rb,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:ib}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:ob,children:e}):null,t?r.jsx("p",{id:a,css:sb,children:t}):null,o]})]})},exports.IconButton=_f,exports.InlineMessage=iO,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Kb,children:r.jsx(sg,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Gb(!!i,a),attached:!0,children:["start"===a?r.jsx(mv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(mg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(mv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=Kw,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:iw,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:sw,children:[t,r.jsx(hv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:aw,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx($b,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(pw,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:ow,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=pw,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:fw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:mw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:gw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:bw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:vw,children:[r.jsx("div",{css:yw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:xw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:ww,children:e}),r.jsx("p",{css:Cw,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Jf,{}),onClick:s})]}),a,r.jsxs("div",{css:kw,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Ew,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=nC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(im,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(sm,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(am,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(lm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(cm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(dm,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(um,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Zg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=_v,exports.MapMarkers=Fv,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Vf("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:b,context:v,middlewareData:y,placement:x}=Zx({open:e,onOpenChange:t,placement:c,whileElementsMounted:bx,middleware:[Tx(d),(w={fallbackAxisSideDirection:"start"},{...xx(w),options:[w,C]}),Ox({padding:8}),Lx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=qx(),b=Jy("function"==typeof c?c:()=>!1),v="function"==typeof c?b:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Kx(f),{escapeKey:C,outsidePress:k}=Kx(m),S=l.useRef(!1),$=Jy((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Ky(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),M=Jy((e=>{var t;const n=()=>{var t;$(e),null==(t=qy(e))||t.removeEventListener("keydown",n)};null==(t=qy(e))||t.addEventListener("keydown",n)})),j=Jy((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof v&&!v(e))return;const a=qy(e),l="[data-floating-ui-inert]",c=Uy(o.floating).querySelectorAll(l);let u=Zv(a)?a:null;for(;u&&!dy(u);){const e=py(u);if(dy(e)||!Zv(e))break;u=e}if(c.length&&Zv(a)&&!a.matches("html,body")&&!Fy(a,o.floating)&&Array.from(c).every((e=>!Fy(u,e))))return;if(Jv(a)&&O){const t=dy(a),n=uy(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Ky(g.nodesRef.current,h).some((t=>{var n;return Wy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Wy(e,o.floating)||Wy(e,o.domReference)||p)return;const f=g?Ky(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),E=Jy((e=>{var t;const n=()=>{var t;j(e),null==(t=qy(e))||t.removeEventListener(d,n)};null==(t=qy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),ly()?5:0)}const u=Uy(o.floating);a&&(u.addEventListener("keydown",C?M:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),v&&u.addEventListener(d,k?E:j,k);let h=[];return p&&(Zv(o.domReference)&&(h=my(o.domReference)),Zv(o.floating)&&(h=h.concat(my(o.floating))),!Zv(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(my(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?M:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),v&&u.removeEventListener(d,k?E:j,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,v,d,n,r,p,s,x,w,$,C,M,j,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,v,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[Wx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Ux[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(v,{escapeKey:u,outsidePress:h}),S=Yx(v,{role:"dialog"}),{getFloatingProps:$}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Jx(t,e,"reference")),t),i=l.useCallback((t=>Jx(t,e,"floating")),n),s=l.useCallback((t=>Jx(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:M,y:j}=y.arrow??{x:null,y:null},E={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==E&&"right"!==E||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:b,"aria-label":f.dialogAriaLabel,"aria-modal":!0,...$(),css:Qx,children:[r.jsxs("div",{css:ew,children:[i,r.jsx(kg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:tw,children:s}),a?r.jsx("div",{css:nw,children:a}):null,r.jsx("div",{ref:m,css:rw(T,O,M,j,E,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=Vm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[M,j]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(kg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):M&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:sO,children:[r.jsxs("div",{css:aO,children:[r.jsx("div",{css:lO,children:r.jsx(e.InputGroup,{startElement:r.jsx(km,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(mg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{j(!0),$(!0),f?.(e)},onBlur:e=>{j(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:cO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:dO,children:[r.jsx("h3",{css:uO,children:A}),i?r.jsx("div",{css:hO,children:r.jsx(iO,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:pO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:fO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:mO,children:[r.jsx("p",{css:gO,children:t.label}),r.jsx("p",{css:bO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>OO(o,t)));return r.jsx("div",{css:MO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=OO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:jO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:EO,children:[i,a?r.jsx("div",{css:TO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(Sk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:$k(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Mk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:jk,asChild:!0,children:r.jsx(kg,{})})]}),r.jsx(e.Dialog.Body,{css:Ek,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:eb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Bf,{...u,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:Yg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:tb,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:h?"180":"0",color:Xg(t,l)}),disabled:l})}),r.jsx(nb,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:Qg(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=QO),[$,M]=n.useState(!1),j=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=QO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>QO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=QO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:LO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:RO(y&&!k,d,T),children:[r.jsxs("div",{css:NO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:DO,children:o}):null,r.jsx("div",{css:IO(y),children:a?.map((e=>e.link?r.jsx(j,{to:e.link,href:e.link,css:PO(s===e.link,t,T),children:e.label},e.label):r.jsx(Vm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:zO(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>M(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:HO(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Jf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(xm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:zO(T),children:l?.map(((e,t)=>r.jsx("div",{css:VO(y),children:e},t)))}),c?.length?r.jsx("div",{css:BO(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:AO(t,T),children:a?.map((e=>e.link?r.jsx(j,{to:e.link,href:e.link,css:PO(s===e.link,t,T),children:e.label},e.label):r.jsx(Vm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(YO,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:M,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:eL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:tL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:nL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:rL,children:[r.jsx("div",{css:nL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:oL,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
|
|
4338
|
+
`),"data-nav-source":A,onPointerMove:N,children:[r.jsx(e.Combobox.Empty,{children:y.noItemsFoundLabel}),C.items.map((t=>r.jsxs(e.Combobox.Item,{css:Lv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g?r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.25rem",paddingTop:"0.5rem"},children:b.map((e=>r.jsx(hv,{label:e.label,variant:"info-white",onClose:()=>v((t=>t.filter((t=>t.value!==e.value)))),closable:!0},e.value)))}):null]})});var D},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(j.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:SC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:$C,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=sg,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:wO(n,o),children:r.jsxs("div",{css:CO(i),children:[r.jsxs("div",{css:$O,children:[r.jsx(rm,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:kO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:SO,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:rb,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:ib}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:ob,children:e}):null,t?r.jsx("p",{id:a,css:sb,children:t}):null,o]})]})},exports.IconButton=_f,exports.InlineMessage=iO,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Kb,children:r.jsx(sg,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Gb(!!i,a),attached:!0,children:["start"===a?r.jsx(mv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(mg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(mv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=Kw,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:iw,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:sw,children:[t,r.jsx(hv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:aw,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx($b,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(pw,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:ow,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=pw,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:fw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:mw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:gw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:bw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:vw,children:[r.jsx("div",{css:yw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:xw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:ww,children:e}),r.jsx("p",{css:Cw,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Jf,{}),onClick:s})]}),a,r.jsxs("div",{css:kw,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Ew,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=nC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(im,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(sm,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(am,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(lm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(cm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(dm,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(um,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Zg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=_v,exports.MapMarkers=Fv,exports.MapPopUp=({open:e,onOpenChange:t,anchorRef:o,header:i,content:s,footer:a,placement:c="bottom",offset:d=30,closeOnEscape:u=!0,closeOnOutsideClick:h=!1,labels:p})=>{const f=Vf("MapPopUp",p),m=n.useRef(null),{refs:g,floatingStyles:b,context:v,middlewareData:y,placement:x}=Zx({open:e,onOpenChange:t,placement:c,whileElementsMounted:bx,middleware:[Tx(d),(w={fallbackAxisSideDirection:"start"},{...xx(w),options:[w,C]}),Ox({padding:8}),Lx({element:m})]});var w,C;n.useEffect((()=>{o?.current&&g.setReference(o.current)}),[o,g]);const k=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,g=qx(),b=Jy("function"==typeof c?c:()=>!1),v="function"==typeof c?b:c,y=l.useRef(!1),{escapeKey:x,outsidePress:w}=Kx(f),{escapeKey:C,outsidePress:k}=Kx(m),S=l.useRef(!1),$=Jy((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Ky(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),M=Jy((e=>{var t;const n=()=>{var t;$(e),null==(t=qy(e))||t.removeEventListener("keydown",n)};null==(t=qy(e))||t.addEventListener("keydown",n)})),j=Jy((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const s=y.current;if(y.current=!1,"click"===d&&s)return;if(n)return;if("function"==typeof v&&!v(e))return;const a=qy(e),l="[data-floating-ui-inert]",c=Uy(o.floating).querySelectorAll(l);let u=Zv(a)?a:null;for(;u&&!dy(u);){const e=py(u);if(dy(e)||!Zv(e))break;u=e}if(c.length&&Zv(a)&&!a.matches("html,body")&&!Fy(a,o.floating)&&Array.from(c).every((e=>!Fy(u,e))))return;if(Jv(a)&&O){const t=dy(a),n=uy(a),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),s=o&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,l=i&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,c="rtl"===n.direction,d=l&&(c?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),u=s&&e.offsetY>a.clientHeight;if(d||u)return}const h=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=g&&Ky(g.nodesRef.current,h).some((t=>{var n;return Wy(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Wy(e,o.floating)||Wy(e,o.domReference)||p)return;const f=g?Ky(g.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),E=Jy((e=>{var t;const n=()=>{var t;j(e),null==(t=qy(e))||t.removeEventListener(d,n)};null==(t=qy(e))||t.addEventListener(d,n)}));l.useEffect((()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout((()=>{S.current=!1}),ly()?5:0)}const u=Uy(o.floating);a&&(u.addEventListener("keydown",C?M:$,C),u.addEventListener("compositionstart",l),u.addEventListener("compositionend",c)),v&&u.addEventListener(d,k?E:j,k);let h=[];return p&&(Zv(o.domReference)&&(h=my(o.domReference)),Zv(o.floating)&&(h=h.concat(my(o.floating))),!Zv(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(my(o.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(u.removeEventListener("keydown",C?M:$,C),u.removeEventListener("compositionstart",l),u.removeEventListener("compositionend",c)),v&&u.removeEventListener(d,k?E:j,k),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,a,v,d,n,r,p,s,x,w,$,C,M,j,k,E]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,v,d]);const T=l.useMemo((()=>({onKeyDown:$,...u&&{[Wx[h]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==h&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,u,h]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[Ux[d]]:()=>{i.current.insideReactTree=!0}})),[$,d,i]);return l.useMemo((()=>s?{reference:T,floating:O}:{}),[s,T,O])}(v,{escapeKey:u,outsidePress:h}),S=Yx(v,{role:"dialog"}),{getFloatingProps:$}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Jx(t,e,"reference")),t),i=l.useCallback((t=>Jx(t,e,"floating")),n),s=l.useCallback((t=>Jx(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s})),[o,i,s])}([k,S]),{x:M,y:j}=y.arrow??{x:null,y:null},E={top:"bottom",right:"left",bottom:"top",left:"right"}[x.split("-")[0]];if(!e)return null;let T=d-1,O=4;return"left"!==E&&"right"!==E||(T=4,O=d-1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:g.setFloating,style:b,"aria-label":f.dialogAriaLabel,"aria-modal":!0,...$(),css:Qx,children:[r.jsxs("div",{css:ew,children:[i,r.jsx(kg,{onClick:()=>t(!1),className:"ds-map-pop-up-close-button","aria-label":f.closeLabel})]}),r.jsx("div",{css:tw,children:s}),a?r.jsx("div",{css:nw,children:a}):null,r.jsx("div",{ref:m,css:rw(T,O,M,j,E,d)})]}),r.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>h&&t(!1)})]})},exports.Menu=Vm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[M,j]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(kg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):M&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:sO,children:[r.jsxs("div",{css:aO,children:[r.jsx("div",{css:lO,children:r.jsx(e.InputGroup,{startElement:r.jsx(km,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(mg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{j(!0),$(!0),f?.(e)},onBlur:e=>{j(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:cO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:dO,children:[r.jsx("h3",{css:uO,children:A}),i?r.jsx("div",{css:hO,children:r.jsx(iO,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:pO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:fO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:mO,children:[r.jsx("p",{css:gO,children:t.label}),r.jsx("p",{css:bO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>OO(o,t)));return r.jsx("div",{css:MO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=OO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:jO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:EO,children:[i,a?r.jsx("div",{css:TO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(Sk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:$k(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Mk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:jk,asChild:!0,children:r.jsx(kg,{})})]}),r.jsx(e.Dialog.Body,{css:Ek,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,...u})=>{const[h,p]=n.useState(!1),f=l?`${i} action button with menu, disabled`:void 0;return r.jsxs(e.Group,{css:eb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":f,role:"group",children:[r.jsx(Bf,{...u,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>p(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:Yg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:tb,"aria-label":`Open ${i} options`,"aria-haspopup":"menu","aria-expanded":h,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:h?"180":"0",color:Xg(t,l)}),disabled:l})}),r.jsx(nb,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:Qg(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=QO),[$,M]=n.useState(!1),j=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=QO||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>QO&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=QO||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:LO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:RO(y&&!k,d,T),children:[r.jsxs("div",{css:NO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:DO,children:o}):null,r.jsx("div",{css:IO(y),children:a?.map((e=>e.link?r.jsx(j,{to:e.link,href:e.link,css:PO(s===e.link,t,T),children:e.label},e.label):r.jsx(Vm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:zO(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>M(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:HO(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Jf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(xm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:zO(T),children:l?.map(((e,t)=>r.jsx("div",{css:VO(y),children:e},t)))}),c?.length?r.jsx("div",{css:BO(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:AO(t,T),children:a?.map((e=>e.link?r.jsx(j,{to:e.link,href:e.link,css:PO(s===e.link,t,T),children:e.label},e.label):r.jsx(Vm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(YO,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:M,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:eL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:tL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:nL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:rL,children:[r.jsx("div",{css:nL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:oL,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OpacityControl=Ew,exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
|
|
4338
4339
|
width: ${o||"15.0625rem"};
|
|
4339
4340
|
min-height: 4.375rem;
|
|
4340
4341
|
padding: ${k(300)};
|
package/dist/index.d.ts
CHANGED
|
@@ -1397,6 +1397,15 @@ type QualitativeAttributeProps = {
|
|
|
1397
1397
|
|
|
1398
1398
|
declare const QualitativeAttribute: ({ type, label, caption, color, onActionClick, showActionButton, pointIcon, ariaLabelType, labels, }: QualitativeAttributeProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1399
1399
|
|
|
1400
|
+
type OpacityControlProps = {
|
|
1401
|
+
defaultValue: number;
|
|
1402
|
+
onOpacityChanged: (value: number) => void;
|
|
1403
|
+
/** Override internal UI labels for internationalization support. */
|
|
1404
|
+
labels?: Partial<OpacityControlLabels>;
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
declare const OpacityControl: ({ defaultValue, onOpacityChanged, labels, }: OpacityControlProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1408
|
+
|
|
1400
1409
|
type ScaleBarProps = {
|
|
1401
1410
|
colors: string[];
|
|
1402
1411
|
values: string[];
|
|
@@ -1846,4 +1855,4 @@ declare const Toast: React__default.FC<ToastComponentProps>;
|
|
|
1846
1855
|
declare const showToast: (props: ToastProps) => void;
|
|
1847
1856
|
declare const closeToast: (id?: string) => void;
|
|
1848
1857
|
|
|
1849
|
-
export { AlertBanner, type AlertBannerLabels, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarLabels, type AvatarProps, Badge, type BadgeLabels, type BadgeProps, type BadgeSize, BaseMap, type BaseMapLabels, type BaseMapOptionProps, type BaseMapProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonLabels, type ButtonProps, Checkbox, CheckboxList, type CheckboxListLabel, type CheckboxListLabels, type CheckboxListProps, CheckboxOptionCard, type CheckboxOptionCardItemProps, type CheckboxOptionCardProps, type CheckboxProps, CloseButton, type CloseButtonLabels, type CloseButtonProps, ClusterPoint, Combobox, type ComboboxLabels, type ComboboxProps, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, type ExtendableCardProps, FieldWrapper, type FieldWrapperLabels, type FieldWrapperProps, type FieldWrapperSize, Footer, type FooterProps, FormContainer, type FormContainerProps, IconButton, type IconButtonProps, InlineMessage, type InlineMessageLabels, type InlineMessageProps, InputWithUnits, type InputWithUnitsProps, ItemCount, type ItemCountLabels, type ItemCountProps, LayerGroup, LayerGroupContainer, type LayerGroupContainerProps, type LayerGroupLabels, type LayerGroupProps, LayerItem, type LayerItemLabels, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerLabels, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuLabels, type MenuProps, MobileSearch, type MobileSearchLabels, type MobileSearchProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarLabels, type MobileTabBarProps, Modal, type ModalLabels, type ModalProps, MultiActionButton, type MultiActionButtonProps, Navbar, type NavbarLabels, type NavbarNavigationItemsProps, type NavbarProps, NavigationRail, type NavigationRailLabels, type NavigationRailProps, type NavigationRailTabProps, type OpacityControlLabels, OptionCard, type OptionCardItemProps, type OptionCardProps, Pagination, type PaginationLabels, type PaginationProps, Panel, type PanelProps, Password, type PasswordLabels, type PasswordProps, ProgressBar, type ProgressBarLabels, type ProgressBarProps, QualitativeAttribute, type QualitativeAttributeLabels, type QualitativeAttributeProps, Radio, RadioGroup, type RadioGroupProps, RadioList, type RadioListLabels, type RadioListProps, type RadioProps, RichTextEditor, type RichTextEditorControlKey, type RichTextEditorLabels, type RichTextEditorProps, type RichTextEditorSize, SSOButtons, ScaleBar, type ScaleBarProps, Search, type SearchLabels, type SearchProps, Select, type SelectItemProps, type SelectLabels, type SelectProps, Sheet, type SheetLabels, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchLabels, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagLabels, type TagProps, TextInput, type TextInputLabels, type TextInputProps, Textarea, type TextareaLabels, type TextareaProps, Toast, type ToastComponentProps, type ToastLabels, type ToastProps, Toolbar, type ToolbarButtonProps, type ToolbarExpandSide, type ToolbarItem, type ToolbarLabels, type ToolbarProps, Tooltip, type TooltipProps, closeToast, designSystemStyles, designSystemStylesForTailwind, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|
|
1858
|
+
export { AlertBanner, type AlertBannerLabels, type AlertProps, AnalysisWidget, type AnalysisWidgetActionsProps, type AnalysisWidgetLabels, type AnalysisWidgetProps, Avatar, type AvatarLabels, type AvatarProps, Badge, type BadgeLabels, type BadgeProps, type BadgeSize, BaseMap, type BaseMapLabels, type BaseMapOptionProps, type BaseMapProps, Breadcrumb, type BreadcrumbProps, Button, type ButtonLabels, type ButtonProps, Checkbox, CheckboxList, type CheckboxListLabel, type CheckboxListLabels, type CheckboxListProps, CheckboxOptionCard, type CheckboxOptionCardItemProps, type CheckboxOptionCardProps, type CheckboxProps, CloseButton, type CloseButtonLabels, type CloseButtonProps, ClusterPoint, Combobox, type ComboboxLabels, type ComboboxProps, type DesignSystemLabels, DesignSystemLocaleProvider, type DesignSystemLocaleProviderProps, ExtendableCard, type ExtendableCardProps, FieldWrapper, type FieldWrapperLabels, type FieldWrapperProps, type FieldWrapperSize, Footer, type FooterProps, FormContainer, type FormContainerProps, IconButton, type IconButtonProps, InlineMessage, type InlineMessageLabels, type InlineMessageProps, InputWithUnits, type InputWithUnitsProps, ItemCount, type ItemCountLabels, type ItemCountProps, LayerGroup, LayerGroupContainer, type LayerGroupContainerProps, type LayerGroupLabels, type LayerGroupProps, LayerItem, type LayerItemLabels, type LayerItemProps, LayerParameters, type LayerParametersProps, LegendItem, type LegendItemLabels, type LegendItemProps, List, type ListItemProps, type ListItemVariant, type ListProps, MapControlsToolbar, type MapControlsToolbarLabels, type MapControlsToolbarProps, MapMarker, type MapMarkerLabels, type MapMarkerProps, MapMarkers, MapPopUp, type MapPopUpLabels, type MapPopUpProps, Menu, type MenuItemProps, type MenuLabels, type MenuProps, MobileSearch, type MobileSearchLabels, type MobileSearchProps, MobileTabBar, type MobileTabBarItemProps, type MobileTabBarLabels, type MobileTabBarProps, Modal, type ModalLabels, type ModalProps, MultiActionButton, type MultiActionButtonProps, Navbar, type NavbarLabels, type NavbarNavigationItemsProps, type NavbarProps, NavigationRail, type NavigationRailLabels, type NavigationRailProps, type NavigationRailTabProps, OpacityControl, type OpacityControlLabels, type OpacityControlProps, OptionCard, type OptionCardItemProps, type OptionCardProps, Pagination, type PaginationLabels, type PaginationProps, Panel, type PanelProps, Password, type PasswordLabels, type PasswordProps, ProgressBar, type ProgressBarLabels, type ProgressBarProps, QualitativeAttribute, type QualitativeAttributeLabels, type QualitativeAttributeProps, Radio, RadioGroup, type RadioGroupProps, RadioList, type RadioListLabels, type RadioListProps, type RadioProps, RichTextEditor, type RichTextEditorControlKey, type RichTextEditorLabels, type RichTextEditorProps, type RichTextEditorSize, SSOButtons, ScaleBar, type ScaleBarProps, Search, type SearchLabels, type SearchProps, Select, type SelectItemProps, type SelectLabels, type SelectProps, Sheet, type SheetLabels, type SheetProps, SimpleMapPin, Slider, SliderInput, type SliderInputProps, type SliderMarksProps, type SliderProps, StepProgressIndicator, type StepProgressIndicatorLabels, type StepProgressIndicatorProps, type StrengthLevel, Switch, type SwitchLabels, type SwitchProps, TabBar, type TabBarItemProps, type TabBarProps, Table, TableCell, type TableLabels, type TableProps, TableRow, Tag, type TagLabels, type TagProps, TextInput, type TextInputLabels, type TextInputProps, Textarea, type TextareaLabels, type TextareaProps, Toast, type ToastComponentProps, type ToastLabels, type ToastProps, Toolbar, type ToolbarButtonProps, type ToolbarExpandSide, type ToolbarItem, type ToolbarLabels, type ToolbarProps, Tooltip, type TooltipProps, closeToast, designSystemStyles, designSystemStylesForTailwind, getThemedBorderWidth, getThemedColor, getThemedFontSize, getThemedLineHeight, getThemedRadius, getThemedSpacing, showToast };
|
package/dist/index.esm.js
CHANGED
|
@@ -1505,7 +1505,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
1505
1505
|
}
|
|
1506
1506
|
|
|
1507
1507
|
${t?`\n --translate-y: -24% !important;\n\n .chakra-slider__markerIndicator {\n height: 1rem;\n width: 0.25rem;\n background-color: ${Ie("primary",700)} !important;\n }\n\n &[data-disabled] {\n .chakra-slider__markerIndicator {\n background-color: ${Ie("neutral",400)} !important;\n }\n }\n `:""};
|
|
1508
|
-
`,ry=e=>{const{value:t}=e;return ve(C,{each:t,children:(e,t)=>be(x.Thumb,{css:Yv,index:t,children:[ve("div",{css:Qv,className:"ds-slider-value-preview",children:e}),ve(x.HiddenInput,{})]},t)})},oy=te.forwardRef(((e,t)=>{const{marks:n,isCentred:r}=e;return n?.length?ve(x.MarkerGroup,{ref:t,children:n.map(((e,t)=>{const n="number"==typeof e?e:e.value,o=r&&1===t;return ve(x.Marker,{css:ny(r,o),value:n,children:ve(x.MarkerIndicator,{})},n)}))}):null})),iy=e=>{const{marks:t,min:n,max:r}=e,o=t?.filter((e=>void 0!==e.label&&null!==e.label));if(!o?.length)return null;const i=r-n||1;return ve("div",{css:Jv,children:o.map((e=>{
|
|
1508
|
+
`,ry=e=>{const{value:t}=e;return ve(C,{each:t,children:(e,t)=>be(x.Thumb,{css:Yv,index:t,children:[ve("div",{css:Qv,className:"ds-slider-value-preview",children:e}),ve(x.HiddenInput,{})]},t)})},oy=te.forwardRef(((e,t)=>{const{marks:n,isCentred:r}=e;return n?.length?ve(x.MarkerGroup,{ref:t,children:n.map(((e,t)=>{const n="number"==typeof e?e:e.value,o=r&&1===t;return ve(x.Marker,{css:ny(r,o),value:n,children:ve(x.MarkerIndicator,{})},n)}))}):null})),iy=e=>{const{marks:t,min:n,max:r}=e,o=t?.filter((e=>void 0!==e.label&&null!==e.label));if(!o?.length)return null;const i=r-n||1;return ve("div",{css:Jv,children:o.map((e=>{let t="-50%";return e.value===n?t="0":e.value===r&&(t="-100%"),ve("span",{css:Xv,style:{left:(e.value-n)/i*100+"%",transform:`translateX(${t})`},children:e.label},e.value)}))})},sy=te.forwardRef(((e,t)=>{const{marks:n,onValueChange:r,isCentred:o,value:i,...s}=e,[a,l]=ae(i||[0]);ce((()=>{l(i||[0])}),[i]);const c=s.min??0,d=s.max??100;let u=n?.map((e=>"number"==typeof e?{value:e,label:void 0}:e));o&&(u=[c,(c+d)/2,d].map((e=>({value:e,label:void 0}))));const h=!!u?.some((e=>e.label));return be(x.Root,{css:Zv,ref:t,thumbAlignment:"center",onValueChange:e=>{l(e.value),r&&r(e)},origin:o?"center":"start",value:a,...s,children:[ve(iy,{marks:u,min:c,max:d}),be(x.Control,{"data-has-mark-label":h||void 0,children:[ve(x.Track,{css:ey,children:ve(x.Range,{css:ty(o)})}),ve(oy,{marks:u,isCentred:o}),ve(ry,{value:a})]})]})})),ay=ke`
|
|
1509
1509
|
--switch-height: 1.5rem;
|
|
1510
1510
|
--switch-width: 2.5rem;
|
|
1511
1511
|
|
|
@@ -2009,6 +2009,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2009
2009
|
|
|
2010
2010
|
.ds-select-input-container {
|
|
2011
2011
|
margin-bottom: 0;
|
|
2012
|
+
width: auto;
|
|
2012
2013
|
}
|
|
2013
2014
|
|
|
2014
2015
|
.chakra-slider__root {
|
|
@@ -2511,7 +2512,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as o,Ic
|
|
|
2511
2512
|
margin-top: 1.125rem;
|
|
2512
2513
|
width: 100%;
|
|
2513
2514
|
}
|
|
2514
|
-
`,uk=({defaultValue:e,onOpacityChanged:t,labels:n})=>{const r=tg("OpacityControl",n),[o,i]=ae(e);return be(u.Root,{positioning:{placement:"bottom-end"},children:[ve(u.Trigger,{asChild:!0,children:ve(ng,{label:r.opacityButtonLabel,size:"small",variant:"secondary",leftIcon:ve(cg,{})})}),ve(u.Positioner,{children:ve(u.Content,{css:ak,children:be(u.Body,{css:lk,children:[ve("p",{css:ck,children:r.opacityHeading}),be("div",{css:dk,children:[be("div",{style:{position:"relative"},children:[ve(Ab,{"aria-label":r.opacityAriaLabel,min:"0",max:"100",value:o,onChange:e=>{const n=e.target.value||"0";let r=parseInt(n,10);r=Number.isNaN(r)?0:r,r=r<0?0:r,r=r>100?100:r,i(r),t&&t(r)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),ve("p",{style:{position:"absolute",top:"
|
|
2515
|
+
`,uk=({defaultValue:e,onOpacityChanged:t,labels:n})=>{const r=tg("OpacityControl",n),[o,i]=ae(e);return be(u.Root,{positioning:{placement:"bottom-end"},children:[ve(u.Trigger,{asChild:!0,children:ve(ng,{label:r.opacityButtonLabel,size:"small",variant:"secondary",leftIcon:ve(cg,{})})}),ve(u.Positioner,{children:ve(u.Content,{css:ak,children:be(u.Body,{css:lk,children:[ve("p",{css:ck,children:r.opacityHeading}),be("div",{css:dk,children:[be("div",{style:{position:"relative"},children:[ve(Ab,{"aria-label":r.opacityAriaLabel,min:"0",max:"100",value:o,onChange:e=>{const n=e.target.value||"0";let r=parseInt(n,10);r=Number.isNaN(r)?0:r,r=r<0?0:r,r=r>100?100:r,i(r),t&&t(r)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),ve("p",{style:{position:"absolute",top:"50%",right:"0.3125rem",transform:"translateY(-50%)",margin:0},children:r.percentSuffix})]}),ve(sy,{min:0,max:100,value:[o],onValueChangeEnd:({value:e})=>{i(e[0]),t&&t(e[0])}})]})]})})})]})},hk=({layerName:e,dataUnit:t,onDrag:n,onUpClick:r,onDownClick:o,onRemoveClick:i,children:s,onInfoClick:a,onOpacityChanged:l,labels:c})=>{const d=tg("LegendItem",c);return be("div",{css:tk,children:[ve("div",{css:nk,children:be("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[ve(og,{icon:ve(dg,{rotate:"180"}),"aria-label":d.upLabel,onClick:r}),ve(og,{icon:ve(dg,{}),"aria-label":d.downLabel,onClick:o})]})}),be("div",{style:{width:"100%"},children:[be("div",{css:rk,children:[be("div",{children:[ve("h3",{css:ok,children:e}),ve("p",{css:ik,children:t})]}),ve(ng,{label:d.removeLabel,size:"small",variant:"secondary",rightIcon:ve(hg,{}),onClick:i})]}),s,be("div",{css:sk,children:[ve(ng,{label:d.aboutDataLabel,size:"small",variant:"secondary",leftIcon:ve(cg,{}),onClick:a}),ve(uk,{defaultValue:80,onOpacityChanged:l})]})]})]})},pk=e=>ke`
|
|
2515
2516
|
width: ${Ve(500)};
|
|
2516
2517
|
height: ${Ve(500)};
|
|
2517
2518
|
border-radius: 50%;
|
|
@@ -4455,4 +4456,4 @@ function sL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
4455
4456
|
color: ${Ie("error",900)};
|
|
4456
4457
|
}
|
|
4457
4458
|
}
|
|
4458
|
-
`),width:{md:"sm"},children:[be(J,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:ve(cg,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?ve(o,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:ve(gg,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:ve(bg,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:ve(vg,{color:"var(--chakra-colors-error-500)"}):null,be(J,{gap:"1",flex:"1",maxWidth:"100%",children:[ve(Z.Title,{css:UR,"aria-label":`${n.title}`,children:n.title}),n.description?ve(Z.Title,{css:KR,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?be(J,{flexDirection:"row",children:[n.action?ve(ng,{css:GR,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),XR[e].dismiss()}}):null,n.meta?.closable?ve(ng,{css:ZR,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||t.dismissLabel,leftIcon:ve(hg,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),XR[e].dismiss()}}):null]}):null]});var r}})},e)))};export{PR as AlertBanner,v$ as AnalysisWidget,NR as Avatar,AR as Badge,bw as BaseMap,fN as Breadcrumb,ng as Button,Ov as Checkbox,gy as CheckboxList,Iv as CheckboxOptionCard,_b as CloseButton,ww as ClusterPoint,lw as Combobox,Fe as DesignSystemLocaleProvider,p$ as ExtendableCard,Cb as FieldWrapper,wN as Footer,Ev as FormContainer,og as IconButton,XA as InlineMessage,By as InputWithUnits,Rk as ItemCount,GC as LayerGroup,ZC as LayerGroupContainer,KC as LayerItem,ek as LayerParameters,hk as LegendItem,jk as List,fv as MapControlsToolbar,yw as MapMarker,Cw as MapMarkers,zC as MapPopUp,tb as Menu,dN as MobileSearch,MN as MobileTabBar,vS as Modal,Cv as MultiActionButton,JN as Navbar,nR as NavigationRail,Fv as OptionCard,Kk as Pagination,SS as Panel,Uy as Password,VR as ProgressBar,xk as QualitativeAttribute,Kv as Radio,Gv as RadioGroup,Gy as RadioList,Vb as RichTextEditor,Hb as SSOButtons,Tk as ScaleBar,yR as Search,Hy as Select,BA as Sheet,xw as SimpleMapPin,sy as Slider,Jy as SliderInput,WR as StepProgressIndicator,ly as Switch,uR as TabBar,l$ as Table,d$ as TableCell,c$ as TableRow,Iy as Tag,Ab as TextInput,ew as Textarea,eD as Toast,pv as Toolbar,ob as Tooltip,QR as closeToast,Pe as designSystemStyles,De as designSystemStylesForTailwind,_e as getThemedBorderWidth,Ie as getThemedColor,ze as getThemedFontSize,He as getThemedLineHeight,Be as getThemedRadius,Ve as getThemedSpacing,YR as showToast};
|
|
4459
|
+
`),width:{md:"sm"},children:[be(J,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:ve(cg,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?ve(o,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:ve(gg,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:ve(bg,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:ve(vg,{color:"var(--chakra-colors-error-500)"}):null,be(J,{gap:"1",flex:"1",maxWidth:"100%",children:[ve(Z.Title,{css:UR,"aria-label":`${n.title}`,children:n.title}),n.description?ve(Z.Title,{css:KR,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?be(J,{flexDirection:"row",children:[n.action?ve(ng,{css:GR,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),XR[e].dismiss()}}):null,n.meta?.closable?ve(ng,{css:ZR,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||t.dismissLabel,leftIcon:ve(hg,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),XR[e].dismiss()}}):null]}):null]});var r}})},e)))};export{PR as AlertBanner,v$ as AnalysisWidget,NR as Avatar,AR as Badge,bw as BaseMap,fN as Breadcrumb,ng as Button,Ov as Checkbox,gy as CheckboxList,Iv as CheckboxOptionCard,_b as CloseButton,ww as ClusterPoint,lw as Combobox,Fe as DesignSystemLocaleProvider,p$ as ExtendableCard,Cb as FieldWrapper,wN as Footer,Ev as FormContainer,og as IconButton,XA as InlineMessage,By as InputWithUnits,Rk as ItemCount,GC as LayerGroup,ZC as LayerGroupContainer,KC as LayerItem,ek as LayerParameters,hk as LegendItem,jk as List,fv as MapControlsToolbar,yw as MapMarker,Cw as MapMarkers,zC as MapPopUp,tb as Menu,dN as MobileSearch,MN as MobileTabBar,vS as Modal,Cv as MultiActionButton,JN as Navbar,nR as NavigationRail,uk as OpacityControl,Fv as OptionCard,Kk as Pagination,SS as Panel,Uy as Password,VR as ProgressBar,xk as QualitativeAttribute,Kv as Radio,Gv as RadioGroup,Gy as RadioList,Vb as RichTextEditor,Hb as SSOButtons,Tk as ScaleBar,yR as Search,Hy as Select,BA as Sheet,xw as SimpleMapPin,sy as Slider,Jy as SliderInput,WR as StepProgressIndicator,ly as Switch,uR as TabBar,l$ as Table,d$ as TableCell,c$ as TableRow,Iy as Tag,Ab as TextInput,ew as Textarea,eD as Toast,pv as Toolbar,ob as Tooltip,QR as closeToast,Pe as designSystemStyles,De as designSystemStylesForTailwind,_e as getThemedBorderWidth,Ie as getThemedColor,ze as getThemedFontSize,He as getThemedLineHeight,Be as getThemedRadius,Ve as getThemedSpacing,YR as showToast};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worldresources/wri-design-systems",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.204.1",
|
|
4
4
|
"description": "WRI UI Library",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build-storybook": "storybook build",
|
|
25
25
|
"lint": "eslint src/**/*.ts src/**/*.tsx",
|
|
26
26
|
"prettier": "prettier --write --loglevel warn .",
|
|
27
|
-
"lint
|
|
27
|
+
"lint:fix": "yarn lint --fix && yarn prettier",
|
|
28
28
|
"new-component": "tsx scripts/new-component.ts",
|
|
29
29
|
"setup-ai": "node contributor-ai/setup-ai.mjs",
|
|
30
30
|
"postinstall": "node -e \"const{existsSync}=require('fs');if(existsSync('contributor-ai/setup-ai.mjs')){require('child_process').execSync('node contributor-ai/setup-ai.mjs',{stdio:'inherit'})}\""
|