@worldresources/wri-design-systems 2.135.0 → 2.135.2
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 +1 -1
- package/dist/index.cjs.js +66 -66
- package/dist/index.d.ts +17 -16
- package/dist/index.esm.js +65 -65
- package/package.json +1 -1
package/README.md
CHANGED
@@ -155,8 +155,8 @@ border: 1px solid ${getThemedColor('neutral', 400)};
|
|
155
155
|
## Data Display
|
156
156
|
|
157
157
|
- [Item Count](https://github.com/wri/wri-design-systems/tree/main/src/components/DataDisplay/ItemCount)
|
158
|
-
- [Table](https://github.com/wri/wri-design-systems/tree/main/src/components/DataDisplay/Table)
|
159
158
|
- [List](https://github.com/wri/wri-design-systems/tree/main/src/components/DataDisplay/List)
|
159
|
+
- [Table](https://github.com/wri/wri-design-systems/tree/main/src/components/DataDisplay/Table)
|
160
160
|
|
161
161
|
## Forms
|
162
162
|
|
package/dist/index.cjs.js
CHANGED
@@ -1589,9 +1589,9 @@
|
|
1589
1589
|
}
|
1590
1590
|
|
1591
1591
|
${t||n?`\n border: 1px solid ${p("neutral",700)};\n `:""}
|
1592
|
-
`,sr=e=>r.css`
|
1592
|
+
`,sr=(e,t)=>r.css`
|
1593
1593
|
height: ${e};
|
1594
|
-
width:
|
1594
|
+
width: ${t};
|
1595
1595
|
border: 1px solid ${p("neutral",300)};
|
1596
1596
|
border-bottom: none;
|
1597
1597
|
border-radius: 4px;
|
@@ -1956,17 +1956,66 @@
|
|
1956
1956
|
font-weight: 400;
|
1957
1957
|
color: ${p("neutral",700)};
|
1958
1958
|
`,ln=({pageSize:e,currentPage:r,totalItems:n,onPageSizeChange:o,showItemCountText:i})=>t.jsxs("div",{css:rn,children:[t.jsxs("div",{css:nn,children:[t.jsx("div",{style:{width:"80px"},children:t.jsx(zt,{defaultValue:[`${e}`],items:[{label:"10",value:"10"},{label:"20",value:"20"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:e=>{o&&o(parseInt(e[0],10))},required:!0})}),t.jsx("p",{css:on,children:"Per Page"})]}),i?t.jsx("p",{css:on,children:(()=>{const t=e,o=(r-1)*t+1;return`Showing ${o}-${Math.min(o+t-1,n)} of ${n}`})()}):null]}),an=r.css`
|
1959
|
+
border: 1px solid ${p("neutral",300)};
|
1960
|
+
`,sn=r.css`
|
1961
|
+
color: ${p("neutral",700)};
|
1962
|
+
line-height: 16px;
|
1963
|
+
white-space: nowrap;
|
1964
|
+
overflow: hidden;
|
1965
|
+
text-overflow: ellipsis;
|
1966
|
+
`,cn=r.css`
|
1967
|
+
font-weight: 400;
|
1968
|
+
color: ${p("neutral",700)};
|
1969
|
+
white-space: nowrap;
|
1970
|
+
overflow: hidden;
|
1971
|
+
text-overflow: ellipsis;
|
1972
|
+
`,dn=r.css`
|
1973
|
+
color: ${p("neutral",700)};
|
1974
|
+
text-align: right;
|
1975
|
+
font-weight: 700;
|
1976
|
+
white-space: nowrap;
|
1977
|
+
overflow: hidden;
|
1978
|
+
text-overflow: ellipsis;
|
1979
|
+
`,pn=r.css`
|
1980
|
+
svg {
|
1981
|
+
path {
|
1982
|
+
fill: ${p("neutral",800)};
|
1983
|
+
}
|
1984
|
+
}
|
1985
|
+
`,un=r.css`
|
1986
|
+
width: 16px;
|
1987
|
+
height: 16px;
|
1988
|
+
path {
|
1989
|
+
fill: ${p("neutral",700)};
|
1990
|
+
}
|
1991
|
+
`,xn=r.css`
|
1992
|
+
display: flex;
|
1993
|
+
align-items: center;
|
1994
|
+
justify-content: space-between;
|
1995
|
+
padding: 12px 16px;
|
1996
|
+
background-color: white;
|
1997
|
+
border-bottom: 1px solid ${p("neutral",200)};
|
1998
|
+
cursor: default;
|
1999
|
+
|
2000
|
+
&:hover {
|
2001
|
+
background-color: ${p("neutral",200)};
|
2002
|
+
}
|
2003
|
+
|
2004
|
+
&:active {
|
2005
|
+
background-color: ${p("neutral",300)};
|
2006
|
+
}
|
2007
|
+
`,hn=({label:r,caption:n,icon:o,value:i,variant:l="data",onItemClick:a,isExpanded:s=!1,id:c})=>{const d="navigation"===l&&!!a;return t.jsxs(e.Flex,{css:xn,cursor:d?"pointer":"default",onClick:d?a:void 0,tabIndex:d?0:void 0,onKeyDown:e=>{d&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a?.()))},role:d?"button":void 0,"aria-expanded":d?s:void 0,"aria-controls":d&&c?`item-content-${c}`:void 0,children:[t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",children:[o&&t.jsx(e.Icon,{css:un,as:o.type,boxSize:4}),t.jsxs(e.Box,{flex:"1",minWidth:0,children:[t.jsx(e.Text,{fontWeight:"navigation"===l?"700":"400",css:sn,children:r}),n&&t.jsx(e.Text,{css:cn,children:n})]})]}),"data"===l&&i&&t.jsx(e.Text,{css:dn,children:i}),"navigation"===l&&d&&t.jsx(J,{css:pn,icon:t.jsx($,{}),onClick:a,"aria-label":`Expand ${r}`,"aria-expanded":s,"aria-controls":c?`item-content-${c}`:void 0})]})},gn=r.css`
|
1959
2008
|
svg {
|
1960
2009
|
path {
|
1961
2010
|
fill: ${p("primary",500)};
|
1962
2011
|
}
|
1963
2012
|
}
|
1964
|
-
`,
|
2013
|
+
`,fn=r.css`
|
1965
2014
|
font-size: 16px;
|
1966
2015
|
line-height: 24px;
|
1967
2016
|
font-weight: 700;
|
1968
2017
|
color: ${p("neutral",900)};
|
1969
|
-
`,
|
2018
|
+
`,bn=r.css`
|
1970
2019
|
span {
|
1971
2020
|
height: 20px;
|
1972
2021
|
width: 20px;
|
@@ -1976,7 +2025,7 @@
|
|
1976
2025
|
background-color: transparent;
|
1977
2026
|
}
|
1978
2027
|
}
|
1979
|
-
`,
|
2028
|
+
`,Cn=r.css`
|
1980
2029
|
font-size: 16px;
|
1981
2030
|
line-height: 24px;
|
1982
2031
|
font-weight: 400;
|
@@ -1986,22 +2035,22 @@
|
|
1986
2035
|
color: ${p("neutral",900)};
|
1987
2036
|
font-weight: 700;
|
1988
2037
|
}
|
1989
|
-
`,
|
2038
|
+
`,mn=({totalItems:r,pageSize:n,currentPage:o,variant:i="default",onPageChange:l})=>{const a="compact"===i||"compact-with-buttons"===i,s="compact-with-buttons"===i;return t.jsx("div",{"aria-label":"Pagination",children:t.jsx(e.Pagination.Root,{count:r,pageSize:n,defaultPage:o,onPageChange:e=>l&&l(e.page),siblingCount:1,children:t.jsxs(e.ButtonGroup,{gap:"2",size:"sm",variant:"ghost",css:bn,children:[t.jsx(e.Pagination.PrevTrigger,{asChild:!0,children:s?t.jsx(b,{variant:"secondary",label:"Previous",size:"small",leftIcon:t.jsx(y,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):t.jsx(J,{css:gn,style:{rotate:"90deg"},icon:t.jsx(y,{}),"aria-label":"Previous page"})}),a?t.jsx(e.Pagination.PageText,{css:fn}):t.jsx(e.Pagination.Items,{render:e=>t.jsx(J,{css:Cn,"aria-label":`Page ${e.value}`,icon:t.jsx("p",{children:e.value})})}),t.jsx(e.Pagination.NextTrigger,{asChild:!0,children:s?t.jsx(b,{variant:"secondary",label:"Next",size:"small",rightIcon:t.jsx(y,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):t.jsx(J,{css:gn,style:{rotate:"270deg"},icon:t.jsx(y,{}),"aria-label":"Next page"})})]})})})},vn=r.css`
|
1990
2039
|
border: 1px solid ${p("neutral",300)};
|
1991
2040
|
border-radius: 2px;
|
1992
2041
|
box-shadow: 0 0 0 1px ${p("neutral",300)};
|
1993
|
-
`,
|
2042
|
+
`,wn=r.css`
|
1994
2043
|
tr {
|
1995
2044
|
background-color: ${p("neutral",200)};
|
1996
2045
|
}
|
1997
|
-
`,
|
2046
|
+
`,jn=r.css`
|
1998
2047
|
font-size: 16px;
|
1999
2048
|
line-height: 24px;
|
2000
2049
|
font-weight: 700;
|
2001
2050
|
color: ${p("neutral",800)};
|
2002
2051
|
display: flex;
|
2003
2052
|
align-items: center;
|
2004
|
-
`,
|
2053
|
+
`,yn=r.css`
|
2005
2054
|
height: 24px;
|
2006
2055
|
width: 10px;
|
2007
2056
|
display: flex;
|
@@ -2024,68 +2073,19 @@
|
|
2024
2073
|
}
|
2025
2074
|
}
|
2026
2075
|
}
|
2027
|
-
|
2076
|
+
`,$n=e=>r.css`
|
2028
2077
|
svg {
|
2029
2078
|
path {
|
2030
2079
|
fill: ${e?p("primary",600):p("neutral",400)} !important;
|
2031
2080
|
}
|
2032
2081
|
}
|
2033
|
-
`,
|
2082
|
+
`,kn=r.css`
|
2034
2083
|
margin-top: 12px;
|
2035
2084
|
display: flex;
|
2036
2085
|
justify-content: space-between;
|
2037
|
-
`,Cn=r.css`
|
2038
|
-
margin-top: 9px;
|
2039
|
-
`,mn=e.Table.Row,vn=e.Table.Cell,wn=r.css`
|
2040
|
-
border: 1px solid ${p("neutral",300)};
|
2041
|
-
`,jn=r.css`
|
2042
|
-
color: ${p("neutral",700)};
|
2043
|
-
line-height: 16px;
|
2044
|
-
white-space: nowrap;
|
2045
|
-
overflow: hidden;
|
2046
|
-
text-overflow: ellipsis;
|
2047
|
-
`,yn=r.css`
|
2048
|
-
font-weight: 400;
|
2049
|
-
color: ${p("neutral",700)};
|
2050
|
-
white-space: nowrap;
|
2051
|
-
overflow: hidden;
|
2052
|
-
text-overflow: ellipsis;
|
2053
|
-
`,$n=r.css`
|
2054
|
-
color: ${p("neutral",700)};
|
2055
|
-
text-align: right;
|
2056
|
-
font-weight: 700;
|
2057
|
-
white-space: nowrap;
|
2058
|
-
overflow: hidden;
|
2059
|
-
text-overflow: ellipsis;
|
2060
|
-
`,kn=r.css`
|
2061
|
-
svg {
|
2062
|
-
path {
|
2063
|
-
fill: ${p("neutral",800)};
|
2064
|
-
}
|
2065
|
-
}
|
2066
2086
|
`,Sn=r.css`
|
2067
|
-
|
2068
|
-
|
2069
|
-
path {
|
2070
|
-
fill: ${p("neutral",700)};
|
2071
|
-
}
|
2072
|
-
`,Ln=r.css`
|
2073
|
-
display: flex;
|
2074
|
-
align-items: center;
|
2075
|
-
justify-content: space-between;
|
2076
|
-
padding: 12px 16px;
|
2077
|
-
background-color: white;
|
2078
|
-
border-bottom: 1px solid ${p("neutral",200)};
|
2079
|
-
cursor: default;
|
2080
|
-
|
2081
|
-
&:hover {
|
2082
|
-
background-color: ${p("neutral",200)};
|
2083
|
-
}
|
2084
|
-
|
2085
|
-
&:active {
|
2086
|
-
background-color: ${p("neutral",300)};
|
2087
|
-
}
|
2088
|
-
`,Mn=({label:r,caption:n,icon:o,value:i,variant:l="data",onItemClick:a,isExpanded:s=!1,id:c})=>{const d="navigation"===l&&!!a;return t.jsxs(e.Flex,{css:Ln,cursor:d?"pointer":"default",onClick:d?a:void 0,tabIndex:d?0:void 0,onKeyDown:e=>{d&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a?.()))},role:d?"button":void 0,"aria-expanded":d?s:void 0,"aria-controls":d&&c?`item-content-${c}`:void 0,children:[t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",children:[o&&t.jsx(e.Icon,{css:Sn,as:o.type,boxSize:4}),t.jsxs(e.Box,{flex:"1",minWidth:0,children:[t.jsx(e.Text,{fontWeight:"navigation"===l?"700":"400",css:jn,children:r}),n&&t.jsx(e.Text,{css:yn,children:n})]})]}),"data"===l&&i&&t.jsx(e.Text,{css:$n,children:i}),"navigation"===l&&d&&t.jsx(J,{css:kn,icon:t.jsx($,{}),onClick:a,"aria-label":`Expand ${r}`,"aria-expanded":s,"aria-controls":c?`item-content-${c}`:void 0})]})};function Rn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var In,Dn={exports:{}},Tn={},En={exports:{}},_n={exports:{}},Bn={};var zn,Pn,Hn,On,Nn,Fn,An,Zn,Wn,Yn,Gn,qn,Un,Xn={};
|
2087
|
+
margin-top: 9px;
|
2088
|
+
`,Ln=e.Table.Row,Mn=e.Table.Cell;function Rn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var In,Dn={exports:{}},Tn={},En={exports:{}},_n={exports:{}},Bn={};var zn,Pn,Hn,On,Nn,Fn,An,Zn,Wn,Yn,Gn,qn,Un,Xn={};
|
2089
2089
|
/** @license React v16.13.1
|
2090
2090
|
* react-is.development.js
|
2091
2091
|
*
|
@@ -3090,7 +3090,7 @@
|
|
3090
3090
|
padding: 6px;
|
3091
3091
|
`,ll=r.css`
|
3092
3092
|
padding: 6px;
|
3093
|
-
`,al={pauseOnPageIdle:!0,offsets:"24px"},sl={"top-start":e.createToaster({placement:"top-start",...al}),"top-end":e.createToaster({placement:"top-end",...al}),"bottom-start":e.createToaster({placement:"bottom-start",...al}),"bottom-end":e.createToaster({placement:"bottom-end",...al})};exports.Badge=({hasNotification:e,notificationCount:r,label:n})=>{const[i,l]=o.useState(!1);o.useEffect((()=>{const e=()=>{window.innerWidth<1024?l(!0):l(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const a=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let s="16px";return r&&r>99?s="28px":r&&r>9&&(s="22px"),i?t.jsxs("div",{css:Ti,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Ei(),children:[t.jsx(T,{color:"currentColor",height:"16px",width:"16px"}),!e||r||n?null:t.jsx("div",{css:_i,"aria-hidden":!0})]}),n?t.jsx("p",{children:n}):null,a.length>0?t.jsx("div",{css:Pi,children:t.jsx("p",{css:Hi,"aria-label":`${r} unread message`,children:a})}):null]}):t.jsxs("div",{css:Ti,role:"status","aria-live":"polite",children:[n?t.jsx("p",{children:n}):null,t.jsxs("div",{css:Ei(s),children:[a.length>0?t.jsx("div",{css:Bi,children:t.jsx("p",{css:zi,"aria-label":`${r} unread message`,children:a})}):null,e&&!r?t.jsx("div",{css:_i,"aria-hidden":!0}):null,t.jsx(T,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:n,additionalSettings:o,options:i,onOptionSelected:l,maxHeight:a="400px"})=>t.jsx("div",{css:sr(a),children:t.jsxs("div",{className:"base-map-scroll-content",children:[t.jsxs("div",{css:cr,children:[t.jsx("p",{className:"base-map-header-title",children:e}),t.jsx("p",{className:"base-map-header-caption",children:n})]}),t.jsxs("div",{css:dr,children:[o?t.jsx("div",{css:pr,children:o.map((e=>t.jsxs("div",{children:[t.jsx(me,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:ur,children:e.children}):null]},e.label)))}):null,i?t.jsx("div",{css:xr,children:i.map((e=>{return t.jsxs("div",{css:(o=e.active,r.css`
|
3093
|
+
`,al={pauseOnPageIdle:!0,offsets:"24px"},sl={"top-start":e.createToaster({placement:"top-start",...al}),"top-end":e.createToaster({placement:"top-end",...al}),"bottom-start":e.createToaster({placement:"bottom-start",...al}),"bottom-end":e.createToaster({placement:"bottom-end",...al})};exports.Badge=({hasNotification:e,notificationCount:r,label:n})=>{const[i,l]=o.useState(!1);o.useEffect((()=>{const e=()=>{window.innerWidth<1024?l(!0):l(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const a=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let s="16px";return r&&r>99?s="28px":r&&r>9&&(s="22px"),i?t.jsxs("div",{css:Ti,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Ei(),children:[t.jsx(T,{color:"currentColor",height:"16px",width:"16px"}),!e||r||n?null:t.jsx("div",{css:_i,"aria-hidden":!0})]}),n?t.jsx("p",{children:n}):null,a.length>0?t.jsx("div",{css:Pi,children:t.jsx("p",{css:Hi,"aria-label":`${r} unread message`,children:a})}):null]}):t.jsxs("div",{css:Ti,role:"status","aria-live":"polite",children:[n?t.jsx("p",{children:n}):null,t.jsxs("div",{css:Ei(s),children:[a.length>0?t.jsx("div",{css:Bi,children:t.jsx("p",{css:zi,"aria-label":`${r} unread message`,children:a})}):null,e&&!r?t.jsx("div",{css:_i,"aria-hidden":!0}):null,t.jsx(T,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:n,additionalSettings:o,options:i,onOptionSelected:l,maxHeight:a="400px",maxWidth:s="260px"})=>t.jsx("div",{css:sr(a,s),children:t.jsxs("div",{className:"base-map-scroll-content",children:[t.jsxs("div",{css:cr,children:[t.jsx("p",{className:"base-map-header-title",children:e}),t.jsx("p",{className:"base-map-header-caption",children:n})]}),t.jsxs("div",{css:dr,children:[o?t.jsx("div",{css:pr,children:o.map((e=>t.jsxs("div",{children:[t.jsx(me,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:ur,children:e.children}):null]},e.label)))}):null,i?t.jsx("div",{css:xr,children:i.map((e=>{return t.jsxs("div",{css:(o=e.active,r.css`
|
3094
3094
|
display: flex;
|
3095
3095
|
gap: 12px;
|
3096
3096
|
padding: 12px 8px;
|
@@ -3137,7 +3137,7 @@
|
|
3137
3137
|
padding: 0px;
|
3138
3138
|
padding-top: 8px;
|
3139
3139
|
color: ${i?p("neutral",500):"inherit"};
|
3140
|
-
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,l}))})}),exports.CloseButton=Q,exports.Footer=({children:e,label:r="© World Resources Institute",fixed:n,filled:o,maxWidth:i})=>{const l=(new Date).getFullYear();return t.jsx("footer",{css:Uo(n,o),children:t.jsxs("div",{css:Xo(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ko,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Jo,children:[r," ",l]})})]})})},exports.IconButton=J,exports.IconMarker=fr,exports.IconMarkers=br,exports.InlineMessage=({label:e,caption:r,variant:n,size:o="large",icon:i=t.jsx(j,{height:"16px",width:"16px"}),onActionClick:l,actionLabel:a,isButtonRight:s})=>{let c=Zi;return"info-grey"===n?c=Wi:"success"===n?c=Yi:"warning"===n?c=Gi:"error"===n&&(c=qi),t.jsxs("div",{css:[Oi(o,s),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Ni,children:[i,t.jsx("p",{css:Fi(o),children:e})]}),t.jsx("p",{css:Ai(o),children:r})]}),a?t.jsx(b,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:l}):null]})},exports.InputWithUnits=({label:r,caption:n,errorMessage:i,units:l,unitsPosition:a="end",defaultUnit:s="",defaultValue:c="",onChange:d,required:p,disabled:u})=>{const[x,h]=o.useState(c),[g,f]=o.useState(s?[s]:[l[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${x} ${e}`:`${e} ${g}`):""+(t?`${e} ${x}`:`${g} ${e}`))};return t.jsxs("div",{css:Qe,children:[i?t.jsx("div",{css:rt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:et(u),"aria-label":r,children:[p?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:tt(u),"aria-label":n,children:n}),i?t.jsx("p",{css:nt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ot(!!i,a),attached:!0,children:["start"===a?t.jsx(zt,{placeholder:"",value:g,items:l,disabled:u,onChange:e=>{f(e),b(e?.[0],!0)}}):null,t.jsx(pt,{type:"number",value:x,disabled:u,onChange:e=>{h(e.target.value),b(e.target.value)}}),"end"===a?t.jsx(zt,{placeholder:"",value:g,items:l,disabled:u,onChange:e=>{f(e),b(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ln,exports.LayerGroup=({label:r,caption:n,value:i,layerItems:l,onChangeForRadioVariant:a})=>{const[s,c]=o.useState({}),[d]=o.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(l));o.useEffect((()=>{let e={...s};l.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const p=(e,t,r,n)=>{const o={...s,[e]:t};c(o),r&&r(e,t,n)},u=Object.values(s).filter((e=>!0===e)).length;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{padding:"16px",alignItems:"flex-start",children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:mr,children:[r,t.jsx(Et,{label:`${u} Active`,size:"small",variant:u>0?"success":"info-grey"})]}),t.jsx("div",{css:vr,children:n})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(y,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(_e,{name:r,defaultValue:d,customGap:"0px",onChange:(e,t)=>p(e,!!t,a,t),children:l.map((e=>t.jsx(Sr,{...e,onChange:(t,r)=>p(t,r,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:r,defaultValue:n,...o})=>t.jsx("div",{css:Cr,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:r})}),exports.LayerItem=Sr,exports.LayerParameters=({label:r,children:n,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:Lr,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Mr,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Rr,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(y,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Vr,children:o.Children.map(n,(e=>t.jsx("div",{className:"layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:r,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:l,children:a,onInfoClick:s,onOpacityChanged:c})=>t.jsxs("div",{css:Ir,children:[t.jsxs("div",{css:Dr,children:[t.jsx(J,{icon:t.jsx(M,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:n,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(J,{icon:t.jsx(y,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(J,{icon:t.jsx(y,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:Tr,children:[t.jsxs("div",{children:[t.jsx("h3",{css:Er,children:e}),t.jsx("p",{css:_r,children:r})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(k,{}),onClick:l})]}),a,t.jsxs("div",{css:Br,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(j,{}),onClick:s}),t.jsx(Nr,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:r})=>{const[n,i]=o.useState([]);return t.jsx(e.Box,{css:
|
3140
|
+
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,l}))})}),exports.CloseButton=Q,exports.Footer=({children:e,label:r="© World Resources Institute",fixed:n,filled:o,maxWidth:i})=>{const l=(new Date).getFullYear();return t.jsx("footer",{css:Uo(n,o),children:t.jsxs("div",{css:Xo(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ko,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Jo,children:[r," ",l]})})]})})},exports.IconButton=J,exports.IconMarker=fr,exports.IconMarkers=br,exports.InlineMessage=({label:e,caption:r,variant:n,size:o="large",icon:i=t.jsx(j,{height:"16px",width:"16px"}),onActionClick:l,actionLabel:a,isButtonRight:s})=>{let c=Zi;return"info-grey"===n?c=Wi:"success"===n?c=Yi:"warning"===n?c=Gi:"error"===n&&(c=qi),t.jsxs("div",{css:[Oi(o,s),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Ni,children:[i,t.jsx("p",{css:Fi(o),children:e})]}),t.jsx("p",{css:Ai(o),children:r})]}),a?t.jsx(b,{label:a,variant:"info-white"===n||"info-grey"===n?"primary":"secondary",size:"large"===o?"default":"small",onClick:l}):null]})},exports.InputWithUnits=({label:r,caption:n,errorMessage:i,units:l,unitsPosition:a="end",defaultUnit:s="",defaultValue:c="",onChange:d,required:p,disabled:u})=>{const[x,h]=o.useState(c),[g,f]=o.useState(s?[s]:[l[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${x} ${e}`:`${e} ${g}`):""+(t?`${e} ${x}`:`${g} ${e}`))};return t.jsxs("div",{css:Qe,children:[i?t.jsx("div",{css:rt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:et(u),"aria-label":r,children:[p?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:tt(u),"aria-label":n,children:n}),i?t.jsx("p",{css:nt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ot(!!i,a),attached:!0,children:["start"===a?t.jsx(zt,{placeholder:"",value:g,items:l,disabled:u,onChange:e=>{f(e),b(e?.[0],!0)}}):null,t.jsx(pt,{type:"number",value:x,disabled:u,onChange:e=>{h(e.target.value),b(e.target.value)}}),"end"===a?t.jsx(zt,{placeholder:"",value:g,items:l,disabled:u,onChange:e=>{f(e),b(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=ln,exports.LayerGroup=({label:r,caption:n,value:i,layerItems:l,onChangeForRadioVariant:a})=>{const[s,c]=o.useState({}),[d]=o.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(l));o.useEffect((()=>{let e={...s};l.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const p=(e,t,r,n)=>{const o={...s,[e]:t};c(o),r&&r(e,t,n)},u=Object.values(s).filter((e=>!0===e)).length;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{padding:"16px",alignItems:"flex-start",children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:mr,children:[r,t.jsx(Et,{label:`${u} Active`,size:"small",variant:u>0?"success":"info-grey"})]}),t.jsx("div",{css:vr,children:n})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(y,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(_e,{name:r,defaultValue:d,customGap:"0px",onChange:(e,t)=>p(e,!!t,a,t),children:l.map((e=>t.jsx(Sr,{...e,onChange:(t,r)=>p(t,r,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:r,defaultValue:n,...o})=>t.jsx("div",{css:Cr,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:r})}),exports.LayerItem=Sr,exports.LayerParameters=({label:r,children:n,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:Lr,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Mr,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Rr,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(y,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Vr,children:o.Children.map(n,(e=>t.jsx("div",{className:"layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:r,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:l,children:a,onInfoClick:s,onOpacityChanged:c})=>t.jsxs("div",{css:Ir,children:[t.jsxs("div",{css:Dr,children:[t.jsx(J,{icon:t.jsx(M,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:n,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(J,{icon:t.jsx(y,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(J,{icon:t.jsx(y,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:Tr,children:[t.jsxs("div",{children:[t.jsx("h3",{css:Er,children:e}),t.jsx("p",{css:_r,children:r})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(k,{}),onClick:l})]}),a,t.jsxs("div",{css:Br,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(j,{}),onClick:s}),t.jsx(Nr,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:r})=>{const[n,i]=o.useState([]);return t.jsx(e.Box,{css:an,children:r.map((e=>t.jsx(hn,{icon:e.icon,label:e.label,caption:e.caption,value:e.data,variant:e.variant??"data",onItemClick:"navigation"===e.variant?()=>{return t=String(e.id),void i((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]));var t}:void 0,isExpanded:!!e.id&&n.includes(String(e.id)),id:e.id},e.id??e.label)))})},exports.MapControl=oe,exports.MapControls=ie,exports.Menu=xe,exports.Modal=({title:r,content:n,size:o="medium",draggable:i,blocking:l,open:a,onClose:s,showCancelButton:c,cancelLabel:d="Cancel",showActionButton:p,actionLabel:u,onActionClick:x})=>a?t.jsx(e.Dialog.Root,{open:a,onOpenChange:s,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!i&&!l,preventScroll:!i&&!l,closeOnEscape:!l,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[i?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(Lo,{disabled:!i,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:Mo(o),children:[t.jsxs(e.Dialog.Header,{css:Ro,children:[t.jsx(e.Dialog.Title,{css:Vo,children:r}),l?null:t.jsx(e.Dialog.CloseTrigger,{css:Io,asChild:!0,children:t.jsx(Q,{})})]}),t.jsx(e.Dialog.Body,{css:Do,children:n}),c||p?t.jsxs(e.Dialog.Footer,{children:[c?t.jsx(e.Dialog.ActionTrigger,{asChild:!0,children:t.jsx(b,{label:d,variant:"secondary"})}):null,p?t.jsx(b,{label:u,onClick:x}):null]}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:n="default",mainActionLabel:i,mainActionOnClick:l=()=>{},otherActions:a=[],...s})=>{const[c,d]=o.useState(!1);return t.jsxs(e.Group,{attached:!0,"aria-disabled":s.disabled,children:[t.jsx(b,{css:{},label:i,variant:r,size:n,onClick:l,...s}),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(b,{variant:r,size:n,leftIcon:t.jsx(y,{rotate:c?"180":"0",color:p("accessible","text-on-primary-mids")||p("primary",900)}),disabled:s.disabled})}),t.jsx(be,{children:a.map((({label:r,value:o,onClick:i})=>t.jsx(e.Menu.Item,{css:fe(n),onClick:i,value:o,children:r},o)))})]})]})},exports.Navbar=({logo:e,linkRouter:n,pathname:i,navigationSection:l,utilitySection:a,actionsSection:s,maxWidth:c,fixed:d,onNavbarHeightChange:u})=>{const x=o.useRef(null),h=o.useRef(null),g=o.useRef(null),[f,C]=o.useState(!1),[m,v]=o.useState(-1),[w,j]=o.useState("undefined"!=typeof window&&window?.innerWidth<=vi),[y,$]=o.useState(!1),S=n,L=o.useCallback((()=>{if(h.current&&x.current&&g.current){const e=x.current.getBoundingClientRect(),t=h.current.getBoundingClientRect(),r=g.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=vi||window.innerWidth<=m?(u?.(96),C(!0)):window.innerWidth>vi&&window.innerWidth<=1440?e.right>=t.left?(u?.(96),C(!0),v(window.innerWidth)):window.innerWidth>m&&(u?.(48),C(!1),v(-1)):(u?.(48),C(!1),v(-1)),f&&(window.innerWidth<=vi||r.right>=t.left?(j(!0),u?.(48)):(j(!1),u?.(96)))}}),[m,f]);return o.useEffect((()=>(L(),window.addEventListener("resize",L),()=>{window.removeEventListener("resize",L)})),[L]),t.jsxs("nav",{css:Qo(f&&!w,d),children:[t.jsxs("div",{css:ti(f&&!w,c),children:[t.jsxs("div",{css:(M=f&&!w,r.css`
|
3141
3141
|
display: flex;
|
3142
3142
|
align-items: center;
|
3143
3143
|
justify-content: flex-start;
|
@@ -3156,7 +3156,7 @@
|
|
3156
3156
|
padding: 0px;
|
3157
3157
|
padding-top: 8px;
|
3158
3158
|
color: ${o?p("neutral",500):"inherit"};
|
3159
|
-
`),children:n.children}):null]},`${n.label}-${n.value}`);var o,i}))})}),exports.Pagination=
|
3159
|
+
`),children:n.children}):null]},`${n.label}-${n.value}`);var o,i}))})}),exports.Pagination=mn,exports.Panel=({header:e,content:r,footer:n,variant:i="fixed",width:l})=>{const[a,s]=o.useState(void 0),[c,d]=o.useState(void 0),p=o.useRef(null),u=o.useRef(null);o.useEffect((()=>{s(p?.current?.getBoundingClientRect()?.height),d(u?.current?.getBoundingClientRect()?.height)}),[e,n]);return t.jsxs("div",{css:[To(l),"fixed"===i?Eo:_o],children:[e?t.jsx("div",{css:Bo,ref:p,children:e}):null,t.jsx("div",{css:zo(a,c),children:r}),n?t.jsx("div",{css:Po,ref:u,children:n}):null]})},exports.Password=({label:e,caption:n,required:i,disabledRules:l,onChange:a,minLength:s=8,hideValidations:c})=>{const[d,u]=o.useState(!1),[x,h]=o.useState(""),[g,f]=o.useState({strength:"Very weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1});return t.jsxs("div",{css:Pt,children:[t.jsxs("p",{css:Ht,"aria-label":e,children:[i?t.jsx("span",{children:"*"}):null,e]}),t.jsx("p",{css:Ot,"aria-label":n,children:n}),t.jsxs("div",{css:Nt,children:[t.jsx(pt,{type:d?"text":"password",value:x,onChange:e=>(e=>{const t={...g};let r=0,n=!1;t.length=e.length>=s,r+=e.length>=s?1:0,n=/[A-Z]/.test(e),r+=n?1:0,t.uppercase=n,n=/[a-z]/.test(e),r+=n?1:0,t.lowercase=n,n=/[0-9]/.test(e),r+=n?1:0,t.numbers=n,n=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),r+=n?1:0,t.specialCharacters=n,t.strength="Very Weak",e.length>=4&&r>=2&&(t.strength="Weak"),e.length>=6&&r>=3&&(t.strength="Medium"),e.length>=s&&r>=4&&(t.strength="Strong"),e.length>=s+2&&r>=5&&(t.strength="Very Strong"),h(e),f(t),a&&a(t)})(e.target.value)}),t.jsx(b,{label:d?"Hide":"Show",variant:"secondary",leftIcon:d?t.jsx(L,{}):t.jsx(S,{}),onClick:()=>u(!d)})]}),x&&!c?t.jsxs("div",{css:Ft,children:[t.jsxs("p",{css:(C=g.strength,r.css`
|
3160
3160
|
font-size: 16px;
|
3161
3161
|
line-height: 24px;
|
3162
3162
|
font-weight: 400;
|
@@ -3212,4 +3212,4 @@
|
|
3212
3212
|
}
|
3213
3213
|
|
3214
3214
|
${l?`\n background-color: ${p("neutral",300)};\n \n &:hover {\n background-color: ${p("neutral",300)};\n box-shadow: none;\n }\n `:""}
|
3215
|
-
`),type:"button",onClick:e.onClick,"aria-current":n===o+1,"aria-disabled":n<o+1,disabled:n<o+1,"aria-label":`Current Step ${o}${e.label?` ${e.label}`:""}`,"data-active":n>=o+1,children:n>o+1?t.jsx(v,{height:"16px",width:"16px"}):o+1}),e.label?t.jsx("p",{css:Qi(n===o+1),children:e.label}):null]},`${e.label}-${o}`);var i,l})),t.jsx("div",{css:el,children:t.jsx("div",{css:tl})})]}),exports.Switch=Ye,exports.TabBar=({variant:r="panel",defaultValue:n,tabs:i,onTabClick:l})=>{const[a,s]=o.useState(Ii(i,n)||0),c="view"===r;return t.jsx("div",{css:Si(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:n||i?.[0]?.value,onValueChange:({value:e})=>{return s(Ii(i,t=e)),void(l&&l(t));var t},children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((r,n)=>t.jsxs(o.Fragment,{children:[c&&1===n&&"left"===Di(a)?t.jsx("div",{css:Ri}):null,t.jsx(e.Tabs.Trigger,{css:[Li,c?Vi:Mi],"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),c&&1===n&&"right"===Di(a)?t.jsx("div",{css:Ri}):null]},r.label)))})})})},exports.Table=({columns:r,data:n,renderRow:i,striped:l,stickyHeader:a,pagination:s,selectable:c,selectedRows:d,onSortColumn:p,onPageSizeChange:u,onPageChange:x,onAllItemsSelected:h})=>{const[g,f]=o.useState({key:"",order:""}),{totalItems:b=n.length,currentPage:C=1,pageSize:m=10,showItemCount:v,showItemCountText:w}=s||{},j=(e,t)=>{f({key:e,order:t}),p&&p({key:e,order:t})},$=d?.length===n?.length,k=d&&d.length>0&&!$;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:
|
3215
|
+
`),type:"button",onClick:e.onClick,"aria-current":n===o+1,"aria-disabled":n<o+1,disabled:n<o+1,"aria-label":`Current Step ${o}${e.label?` ${e.label}`:""}`,"data-active":n>=o+1,children:n>o+1?t.jsx(v,{height:"16px",width:"16px"}):o+1}),e.label?t.jsx("p",{css:Qi(n===o+1),children:e.label}):null]},`${e.label}-${o}`);var i,l})),t.jsx("div",{css:el,children:t.jsx("div",{css:tl})})]}),exports.Switch=Ye,exports.TabBar=({variant:r="panel",defaultValue:n,tabs:i,onTabClick:l})=>{const[a,s]=o.useState(Ii(i,n)||0),c="view"===r;return t.jsx("div",{css:Si(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:n||i?.[0]?.value,onValueChange:({value:e})=>{return s(Ii(i,t=e)),void(l&&l(t));var t},children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((r,n)=>t.jsxs(o.Fragment,{children:[c&&1===n&&"left"===Di(a)?t.jsx("div",{css:Ri}):null,t.jsx(e.Tabs.Trigger,{css:[Li,c?Vi:Mi],"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),c&&1===n&&"right"===Di(a)?t.jsx("div",{css:Ri}):null]},r.label)))})})})},exports.Table=({columns:r,data:n,renderRow:i,striped:l,stickyHeader:a,pagination:s,selectable:c,selectedRows:d,onSortColumn:p,onPageSizeChange:u,onPageChange:x,onAllItemsSelected:h})=>{const[g,f]=o.useState({key:"",order:""}),{totalItems:b=n.length,currentPage:C=1,pageSize:m=10,showItemCount:v,showItemCountText:w}=s||{},j=(e,t)=>{f({key:e,order:t}),p&&p({key:e,order:t})},$=d?.length===n?.length,k=d&&d.length>0&&!$;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:vn,striped:l,stickyHeader:a,interactive:!0,children:[t.jsx(e.Table.Header,{css:wn,children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(me,{name:"header-checkbox",checked:$,indeterminate:k,onCheckedChange:({checked:e})=>{h&&h(e)}})}):null,r.map((r=>t.jsx(e.Table.ColumnHeader,{role:r.sortable?"columnheader":void 0,"aria-sort":r.sortable&&"asc"===g.order?"ascending":r.sortable&&"desc"===g.order?"descending":void 0,children:t.jsxs("div",{css:jn,children:[r.label,r.sortable?t.jsxs("div",{css:yn,children:[t.jsx(J,{css:$n(g.key===r.key&&"asc"===g.order),icon:t.jsx(y,{style:{transform:"rotate(180deg)"}}),onClick:()=>j(r.key,"asc"),"aria-label":"Ascending"}),t.jsx(J,{css:$n(g.key===r.key&&"desc"===g.order),icon:t.jsx(y,{}),onClick:()=>j(r.key,"desc"),"aria-label":"Descending"})]}):null]})},r.key)))]})}),t.jsx(e.Table.Body,{children:n.map((e=>t.jsx(o.Fragment,{children:i(e)},e.id)))})]}),t.jsxs("div",{css:kn,children:[t.jsx("div",{children:v?t.jsx(ln,{pageSize:m,currentPage:C,totalItems:b,onPageSizeChange:u,showItemCountText:w}):null}),s?t.jsx("div",{css:Sn,children:t.jsx(mn,{totalItems:b,pageSize:m,currentPage:C,onPageChange:x})}):null]})]})},exports.TableCell=Mn,exports.TableRow=Ln,exports.Tag=Et,exports.TextInput=pt,exports.Textarea=({label:r,caption:n,placeholder:i,errorMessage:l,required:a,disabled:s,size:c="default",defaultValue:d="",onChange:p,minLength:u,maxLength:x,...h})=>{const[g,f]=o.useState(d),[b,C]=o.useState(!1),[m,v]=o.useState(!1),[w,j]=o.useState("");o.useEffect((()=>{const{length:e}=d;u&&e<u&&e>0?(C(e<u),v(!1),j(`Enter at least ${u-e} characters`)):u&&0===e&&j(`Min ${u} characters`),x&&e>0?(C(!1),v(e>x),j(`You have ${x-e} characters remaining`)):x&&0===e&&j(`Max ${x} characters`)}),[]);const y=!!l||b||m;return t.jsxs("div",{css:tr(c),children:[y?t.jsx("div",{css:rr}):null,t.jsxs(e.Field.Root,{required:a,invalid:y,gap:"0",style:{marginLeft:y?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:nr(c,s),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,a?"":t.jsx("span",{children:" (Optional)"})]}):null,n?t.jsx(e.Field.HelperText,{css:or(c,s),"aria-label":n,children:n}):null,l?t.jsx(e.Field.ErrorText,{css:lr,"aria-label":l,children:l}):null,t.jsx(e.Textarea,{placeholder:i,disabled:s,css:ar(c,g,d),onChange:e=>{f(e.target.value);const{length:t}=e.target.value;u&&x?(C(t<u),v(t>x),j(`You have ${x-t} characters remaining`)):u?(C(t<u),v(!1),j(t<u?`Enter at least ${u-t} characters`:"")):x&&(v(t>x),C(!1),j(`You have ${x-t} characters remaining`)),p&&p(e)},value:g,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...h}),b&&u?t.jsxs(e.Field.ErrorText,{css:lr,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",u-g.length," more characters"]}):null,m&&x?t.jsxs(e.Field.ErrorText,{css:lr,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",g.length-x," characters too many"]}):null,!w||m||b?null:t.jsx(e.Field.HelperText,{css:ir,"aria-label":w,children:w})]})]})},exports.Toast=()=>Object.keys(sl).map((r=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:sl[r],insetInline:{mdDown:"4"},children:n=>t.jsxs(e.Toast.Root,{css:rl,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"icon-container",children:["info"===n.type?n.meta?.icon?n.meta.icon:t.jsx(j,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:t.jsx(R,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:t.jsx(V,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:t.jsx(I,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:nl,"aria-label":`${n.title}`,children:n.title}),n.description?t.jsx(e.Toast.Title,{css:ol,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[n.action?t.jsx(b,{css:il,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),sl[r].dismiss()}}):null,n.meta?.closable?t.jsx(b,{css:ll,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(k,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>sl[r].dismiss()}):null]}):null]})})},r))),exports.designSystemStyles=d,exports.getThemedColor=p,exports.showToast=e=>{sl[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
@@ -401,9 +401,10 @@ type BaseMapProps = {
|
|
401
401
|
options: BaseMapOptionProps[];
|
402
402
|
onOptionSelected?: (option: BaseMapOptionProps) => void;
|
403
403
|
maxHeight?: string;
|
404
|
+
maxWidth?: string;
|
404
405
|
};
|
405
406
|
|
406
|
-
declare const BaseMap: ({ title, caption, additionalSettings, options, onOptionSelected, maxHeight, }: BaseMapProps) => _emotion_react_jsx_runtime.JSX.Element;
|
407
|
+
declare const BaseMap: ({ title, caption, additionalSettings, options, onOptionSelected, maxHeight, maxWidth, }: BaseMapProps) => _emotion_react_jsx_runtime.JSX.Element;
|
407
408
|
|
408
409
|
type IconMarkerProps = {
|
409
410
|
ariaLabel: string;
|
@@ -507,6 +508,21 @@ type ItemCountProps = {
|
|
507
508
|
|
508
509
|
declare const ItemCount: ({ pageSize, currentPage, totalItems, onPageSizeChange, showItemCountText, }: ItemCountProps) => _emotion_react_jsx_runtime.JSX.Element;
|
509
510
|
|
511
|
+
interface ListProps {
|
512
|
+
items: ListEntry[];
|
513
|
+
}
|
514
|
+
interface ListEntry {
|
515
|
+
id?: string | number;
|
516
|
+
label: string;
|
517
|
+
data?: string;
|
518
|
+
caption?: string;
|
519
|
+
icon?: ReactElement;
|
520
|
+
variant?: 'data' | 'navigation';
|
521
|
+
onClick?: () => void;
|
522
|
+
}
|
523
|
+
|
524
|
+
declare const List: ({ items }: ListProps) => _emotion_react_jsx_runtime.JSX.Element;
|
525
|
+
|
510
526
|
type TableProps = {
|
511
527
|
columns: {
|
512
528
|
key: string;
|
@@ -540,21 +556,6 @@ declare const Table: ({ columns, data, renderRow, striped, stickyHeader, paginat
|
|
540
556
|
declare const TableRow: React$1.ForwardRefExoticComponent<Table$1.RowProps & React$1.RefAttributes<HTMLTableRowElement>>;
|
541
557
|
declare const TableCell: React$1.ForwardRefExoticComponent<Table$1.CellProps & React$1.RefAttributes<HTMLTableCellElement>>;
|
542
558
|
|
543
|
-
interface ListProps {
|
544
|
-
items: ListEntry[];
|
545
|
-
}
|
546
|
-
interface ListEntry {
|
547
|
-
id?: string | number;
|
548
|
-
label: string;
|
549
|
-
data?: string;
|
550
|
-
caption?: string;
|
551
|
-
icon?: ReactElement;
|
552
|
-
variant?: 'data' | 'navigation';
|
553
|
-
onClick?: () => void;
|
554
|
-
}
|
555
|
-
|
556
|
-
declare const List: ({ items }: ListProps) => _emotion_react_jsx_runtime.JSX.Element;
|
557
|
-
|
558
559
|
type ModalProps = {
|
559
560
|
title: string;
|
560
561
|
content: React.ReactNode;
|
package/dist/index.esm.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Icon as i,Group as l,Menu as a,Portal as s,Checkbox as c,CheckboxGroup as d,HStack as p,CheckboxCard as u,RadioCard as h,RadioGroup as x,Slider as g,For as f,Switch as b,Field as C,Input as m,Select as v,Tag as w,createListCollection as y,Textarea as $,Accordion as k,Popover as L,
|
1
|
+
import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Icon as i,Group as l,Menu as a,Portal as s,Checkbox as c,CheckboxGroup as d,HStack as p,CheckboxCard as u,RadioCard as h,RadioGroup as x,Slider as g,For as f,Switch as b,Field as C,Input as m,Select as v,Tag as w,createListCollection as y,Textarea as $,Accordion as k,Popover as L,Flex as M,Text as S,Pagination as V,ButtonGroup as R,Table as D,Dialog as _,Breadcrumb as z,Tabs as I,Collapsible as E,createToaster as H,Toaster as j,Toast as P,Stack as T}from"@chakra-ui/react";import{jsxs as O,jsx as B,Fragment as N}from"@emotion/react/jsx-runtime";import{css as Z}from"@emotion/react";import{jsx as F,jsxs as A,Fragment as W}from"react/jsx-runtime";import*as Y from"react";import X,{useState as U,useEffect as q,Children as G,useRef as K,useMemo as J,Fragment as Q,useCallback as ee}from"react";import te from"object-assign";import re from"react-dom";const ne={neutral:{100:{value:"#FFFFFF"},200:{value:"#F6F6F6"},300:{value:"#E7E6E6"},400:{value:"#C9C9C9"},500:{value:"#B0B0B0"},600:{value:"#A1A1A1"},700:{value:"#5C5959"},800:{value:"#3D3B3B"},900:{value:"#1A1919"}},primary:{100:{value:"#FFFBF2"},200:{value:"#FCEFD3"},300:{value:"#FADFA7"},400:{value:"#F5BF4F"},500:{value:"#F0AB00"},600:{value:"#DE9E00"},700:{value:"#855B00"},800:{value:"#5F4205"},900:{value:"#332300"}},secondary:{100:{value:"#F2F6FF"},200:{value:"#D7E0F7"},300:{value:"#B2C3F0"},400:{value:"#4F6CBA"},500:{value:"#3855A3"},600:{value:"#0A4298"},700:{value:"#123369"},800:{value:"#162241"},900:{value:"#0B1121"}},success:{100:{value:"#EBF5F2"},200:{value:"#D3EED1"},300:{value:"#C2E5DC"},500:{value:"#009E77"},900:{value:"#00664D"}},warning:{100:{value:"#FBF7EA"},200:{value:"#E3CC8F"},300:{value:"#EEDDA5"},500:{value:"#A88100"},900:{value:"#715804"}},error:{100:{value:"#FFEFED"},200:{value:"#EDA1A9"},300:{value:"#F6C5C1"},500:{value:"#C11101"},900:{value:"#8D0D01"}},accessible:{"text-on-primary-mids":{value:"#332300"},"text-on-secondary-mids":{value:"#F2F6FF"},"controls-on-neutral-lights":{value:"#855B00"},"controls-on-neutral-darks":{value:"#F5BF4F"}}},oe=e(t,{theme:{tokens:{colors:ne}}}),ie=(e,t)=>oe.tokens.getVar(`colors.${e}.${t}`)||ne?.[e]?.[t]?.value,le=e=>Z`
|
2
2
|
width: auto;
|
3
3
|
height: ${"small"===e?"28px":"40px"};
|
4
4
|
font-size: ${"small"===e?"12px":"16px"};
|
@@ -1630,9 +1630,9 @@ import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Ic
|
|
1630
1630
|
}
|
1631
1631
|
|
1632
1632
|
${t||r?`\n border: 1px solid ${ie("neutral",700)};\n `:""}
|
1633
|
-
`,pn=({label:e,caption:t,placeholder:r,errorMessage:n,required:o,disabled:i,size:l="default",defaultValue:a="",onChange:s,minLength:c,maxLength:d,...p})=>{const[u,h]=U(a),[x,g]=U(!1),[f,b]=U(!1),[m,v]=U("");q((()=>{const{length:e}=a;c&&e<c&&e>0?(g(e<c),b(!1),v(`Enter at least ${c-e} characters`)):c&&0===e&&v(`Min ${c} characters`),d&&e>0?(g(!1),b(e>d),v(`You have ${d-e} characters remaining`)):d&&0===e&&v(`Max ${d} characters`)}),[]);const w=!!n||x||f;return O("div",{css:nn(l),children:[w?B("div",{css:on}):null,O(C.Root,{required:o,invalid:w,gap:"0",style:{marginLeft:w?"19px":"0px"},children:[e?O(C.Label,{css:ln(l,i),"aria-label":e,children:[B(C.RequiredIndicator,{"aria-label":"required"}),e,o?"":B("span",{children:" (Optional)"})]}):null,t?B(C.HelperText,{css:an(l,i),"aria-label":t,children:t}):null,n?B(C.ErrorText,{css:cn,"aria-label":n,children:n}):null,B($,{placeholder:r,disabled:i,css:dn(l,u,a),onChange:e=>{h(e.target.value);const{length:t}=e.target.value;c&&d?(g(t<c),b(t>d),v(`You have ${d-t} characters remaining`)):c?(g(t<c),b(!1),v(t<c?`Enter at least ${c-t} characters`:"")):d&&(b(t>d),g(!1),v(`You have ${d-t} characters remaining`)),s&&s(e)},value:u,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...p}),x&&c?O(C.ErrorText,{css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",c-u.length," more characters"]}):null,f&&d?O(C.ErrorText,{css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",u.length-d," characters too many"]}):null,!m||f||x?null:B(C.HelperText,{css:sn,"aria-label":m,children:m})]})]})},un=e=>Z`
|
1633
|
+
`,pn=({label:e,caption:t,placeholder:r,errorMessage:n,required:o,disabled:i,size:l="default",defaultValue:a="",onChange:s,minLength:c,maxLength:d,...p})=>{const[u,h]=U(a),[x,g]=U(!1),[f,b]=U(!1),[m,v]=U("");q((()=>{const{length:e}=a;c&&e<c&&e>0?(g(e<c),b(!1),v(`Enter at least ${c-e} characters`)):c&&0===e&&v(`Min ${c} characters`),d&&e>0?(g(!1),b(e>d),v(`You have ${d-e} characters remaining`)):d&&0===e&&v(`Max ${d} characters`)}),[]);const w=!!n||x||f;return O("div",{css:nn(l),children:[w?B("div",{css:on}):null,O(C.Root,{required:o,invalid:w,gap:"0",style:{marginLeft:w?"19px":"0px"},children:[e?O(C.Label,{css:ln(l,i),"aria-label":e,children:[B(C.RequiredIndicator,{"aria-label":"required"}),e,o?"":B("span",{children:" (Optional)"})]}):null,t?B(C.HelperText,{css:an(l,i),"aria-label":t,children:t}):null,n?B(C.ErrorText,{css:cn,"aria-label":n,children:n}):null,B($,{placeholder:r,disabled:i,css:dn(l,u,a),onChange:e=>{h(e.target.value);const{length:t}=e.target.value;c&&d?(g(t<c),b(t>d),v(`You have ${d-t} characters remaining`)):c?(g(t<c),b(!1),v(t<c?`Enter at least ${c-t} characters`:"")):d&&(b(t>d),g(!1),v(`You have ${d-t} characters remaining`)),s&&s(e)},value:u,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...p}),x&&c?O(C.ErrorText,{css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",c-u.length," more characters"]}):null,f&&d?O(C.ErrorText,{css:cn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",u.length-d," characters too many"]}):null,!m||f||x?null:B(C.HelperText,{css:sn,"aria-label":m,children:m})]})]})},un=(e,t)=>Z`
|
1634
1634
|
height: ${e};
|
1635
|
-
width:
|
1635
|
+
width: ${t};
|
1636
1636
|
border: 1px solid ${ie("neutral",300)};
|
1637
1637
|
border-bottom: none;
|
1638
1638
|
border-radius: 4px;
|
@@ -1703,7 +1703,7 @@ import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Ic
|
|
1703
1703
|
.base-map-children {
|
1704
1704
|
margin-top: 10px;
|
1705
1705
|
}
|
1706
|
-
`,mn=({title:e,caption:t,additionalSettings:r,options:n,onOptionSelected:o,maxHeight:i="400px"})=>B("div",{css:un(i),children:O("div",{className:"base-map-scroll-content",children:[O("div",{css:hn,children:[B("p",{className:"base-map-header-title",children:e}),B("p",{className:"base-map-header-caption",children:t})]}),O("div",{css:xn,children:[r?B("div",{css:gn,children:r.map((e=>O("div",{children:[B(xt,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?B("div",{css:fn,children:e.children}):null]},e.label)))}):null,n?B("div",{css:bn,children:n.map((e=>{return O("div",{css:(r=e.active,Z`
|
1706
|
+
`,mn=({title:e,caption:t,additionalSettings:r,options:n,onOptionSelected:o,maxHeight:i="400px",maxWidth:l="260px"})=>B("div",{css:un(i,l),children:O("div",{className:"base-map-scroll-content",children:[O("div",{css:hn,children:[B("p",{className:"base-map-header-title",children:e}),B("p",{className:"base-map-header-caption",children:t})]}),O("div",{css:xn,children:[r?B("div",{css:gn,children:r.map((e=>O("div",{children:[B(xt,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?B("div",{css:fn,children:e.children}):null]},e.label)))}):null,n?B("div",{css:bn,children:n.map((e=>{return O("div",{css:(r=e.active,Z`
|
1707
1707
|
display: flex;
|
1708
1708
|
gap: 12px;
|
1709
1709
|
padding: 12px 8px;
|
@@ -2036,17 +2036,66 @@ import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Ic
|
|
2036
2036
|
font-weight: 400;
|
2037
2037
|
color: ${ie("neutral",700)};
|
2038
2038
|
`,bo=({pageSize:e,currentPage:t,totalItems:r,onPageSizeChange:n,showItemCountText:o})=>O("div",{css:xo,children:[O("div",{css:go,children:[B("div",{style:{width:"80px"},children:B(Hr,{defaultValue:[`${e}`],items:[{label:"10",value:"10"},{label:"20",value:"20"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:e=>{n&&n(parseInt(e[0],10))},required:!0})}),B("p",{css:fo,children:"Per Page"})]}),o?B("p",{css:fo,children:(()=>{const n=e,o=(t-1)*n+1;return`Showing ${o}-${Math.min(o+n-1,r)} of ${r}`})()}):null]}),Co=Z`
|
2039
|
+
border: 1px solid ${ie("neutral",300)};
|
2040
|
+
`,mo=Z`
|
2041
|
+
color: ${ie("neutral",700)};
|
2042
|
+
line-height: 16px;
|
2043
|
+
white-space: nowrap;
|
2044
|
+
overflow: hidden;
|
2045
|
+
text-overflow: ellipsis;
|
2046
|
+
`,vo=Z`
|
2047
|
+
font-weight: 400;
|
2048
|
+
color: ${ie("neutral",700)};
|
2049
|
+
white-space: nowrap;
|
2050
|
+
overflow: hidden;
|
2051
|
+
text-overflow: ellipsis;
|
2052
|
+
`,wo=Z`
|
2053
|
+
color: ${ie("neutral",700)};
|
2054
|
+
text-align: right;
|
2055
|
+
font-weight: 700;
|
2056
|
+
white-space: nowrap;
|
2057
|
+
overflow: hidden;
|
2058
|
+
text-overflow: ellipsis;
|
2059
|
+
`,yo=Z`
|
2060
|
+
svg {
|
2061
|
+
path {
|
2062
|
+
fill: ${ie("neutral",800)};
|
2063
|
+
}
|
2064
|
+
}
|
2065
|
+
`,$o=Z`
|
2066
|
+
width: 16px;
|
2067
|
+
height: 16px;
|
2068
|
+
path {
|
2069
|
+
fill: ${ie("neutral",700)};
|
2070
|
+
}
|
2071
|
+
`,ko=Z`
|
2072
|
+
display: flex;
|
2073
|
+
align-items: center;
|
2074
|
+
justify-content: space-between;
|
2075
|
+
padding: 12px 16px;
|
2076
|
+
background-color: white;
|
2077
|
+
border-bottom: 1px solid ${ie("neutral",200)};
|
2078
|
+
cursor: default;
|
2079
|
+
|
2080
|
+
&:hover {
|
2081
|
+
background-color: ${ie("neutral",200)};
|
2082
|
+
}
|
2083
|
+
|
2084
|
+
&:active {
|
2085
|
+
background-color: ${ie("neutral",300)};
|
2086
|
+
}
|
2087
|
+
`,Lo=({label:e,caption:t,icon:r,value:o,variant:l="data",onItemClick:a,isExpanded:s=!1,id:c})=>{const d="navigation"===l&&!!a;return O(M,{css:ko,cursor:d?"pointer":"default",onClick:d?a:void 0,tabIndex:d?0:void 0,onKeyDown:e=>{d&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a?.()))},role:d?"button":void 0,"aria-expanded":d?s:void 0,"aria-controls":d&&c?`item-content-${c}`:void 0,children:[O(M,{gap:3,flex:"1",overflow:"hidden",children:[r&&B(i,{css:$o,as:r.type,boxSize:4}),O(n,{flex:"1",minWidth:0,children:[B(S,{fontWeight:"navigation"===l?"700":"400",css:mo,children:e}),t&&B(S,{css:vo,children:t})]})]}),"data"===l&&o&&B(S,{css:wo,children:o}),"navigation"===l&&d&&B(Ye,{css:yo,icon:B(Ce,{}),onClick:a,"aria-label":`Expand ${e}`,"aria-expanded":s,"aria-controls":c?`item-content-${c}`:void 0})]})},Mo=({items:e})=>{const[t,r]=U([]);return B(n,{css:Co,children:e.map((e=>B(Lo,{icon:e.icon,label:e.label,caption:e.caption,value:e.data,variant:e.variant??"data",onItemClick:"navigation"===e.variant?()=>{return t=String(e.id),void r((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]));var t}:void 0,isExpanded:!!e.id&&t.includes(String(e.id)),id:e.id},e.id??e.label)))})},So=Z`
|
2039
2088
|
svg {
|
2040
2089
|
path {
|
2041
2090
|
fill: ${ie("primary",500)};
|
2042
2091
|
}
|
2043
2092
|
}
|
2044
|
-
`,
|
2093
|
+
`,Vo=Z`
|
2045
2094
|
font-size: 16px;
|
2046
2095
|
line-height: 24px;
|
2047
2096
|
font-weight: 700;
|
2048
2097
|
color: ${ie("neutral",900)};
|
2049
|
-
`,
|
2098
|
+
`,Ro=Z`
|
2050
2099
|
span {
|
2051
2100
|
height: 20px;
|
2052
2101
|
width: 20px;
|
@@ -2056,7 +2105,7 @@ import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Ic
|
|
2056
2105
|
background-color: transparent;
|
2057
2106
|
}
|
2058
2107
|
}
|
2059
|
-
`,
|
2108
|
+
`,Do=Z`
|
2060
2109
|
font-size: 16px;
|
2061
2110
|
line-height: 24px;
|
2062
2111
|
font-weight: 400;
|
@@ -2066,22 +2115,22 @@ import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Ic
|
|
2066
2115
|
color: ${ie("neutral",900)};
|
2067
2116
|
font-weight: 700;
|
2068
2117
|
}
|
2069
|
-
`,
|
2118
|
+
`,_o=({totalItems:e,pageSize:t,currentPage:r,variant:n="default",onPageChange:o})=>{const i="compact"===n||"compact-with-buttons"===n,l="compact-with-buttons"===n;return B("div",{"aria-label":"Pagination",children:B(V.Root,{count:e,pageSize:t,defaultPage:r,onPageChange:e=>o&&o(e.page),siblingCount:1,children:O(R,{gap:"2",size:"sm",variant:"ghost",css:Ro,children:[B(V.PrevTrigger,{asChild:!0,children:l?B(pe,{variant:"secondary",label:"Previous",size:"small",leftIcon:B(be,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):B(Ye,{css:So,style:{rotate:"90deg"},icon:B(be,{}),"aria-label":"Previous page"})}),i?B(V.PageText,{css:Vo}):B(V.Items,{render:e=>B(Ye,{css:Do,"aria-label":`Page ${e.value}`,icon:B("p",{children:e.value})})}),B(V.NextTrigger,{asChild:!0,children:l?B(pe,{variant:"secondary",label:"Next",size:"small",rightIcon:B(be,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):B(Ye,{css:So,style:{rotate:"270deg"},icon:B(be,{}),"aria-label":"Next page"})})]})})})},zo=Z`
|
2070
2119
|
border: 1px solid ${ie("neutral",300)};
|
2071
2120
|
border-radius: 2px;
|
2072
2121
|
box-shadow: 0 0 0 1px ${ie("neutral",300)};
|
2073
|
-
`,
|
2122
|
+
`,Io=Z`
|
2074
2123
|
tr {
|
2075
2124
|
background-color: ${ie("neutral",200)};
|
2076
2125
|
}
|
2077
|
-
`,
|
2126
|
+
`,Eo=Z`
|
2078
2127
|
font-size: 16px;
|
2079
2128
|
line-height: 24px;
|
2080
2129
|
font-weight: 700;
|
2081
2130
|
color: ${ie("neutral",800)};
|
2082
2131
|
display: flex;
|
2083
2132
|
align-items: center;
|
2084
|
-
`,
|
2133
|
+
`,Ho=Z`
|
2085
2134
|
height: 24px;
|
2086
2135
|
width: 10px;
|
2087
2136
|
display: flex;
|
@@ -2104,68 +2153,19 @@ import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Ic
|
|
2104
2153
|
}
|
2105
2154
|
}
|
2106
2155
|
}
|
2107
|
-
`,
|
2156
|
+
`,jo=e=>Z`
|
2108
2157
|
svg {
|
2109
2158
|
path {
|
2110
2159
|
fill: ${e?ie("primary",600):ie("neutral",400)} !important;
|
2111
2160
|
}
|
2112
2161
|
}
|
2113
|
-
`,
|
2162
|
+
`,Po=Z`
|
2114
2163
|
margin-top: 12px;
|
2115
2164
|
display: flex;
|
2116
2165
|
justify-content: space-between;
|
2117
|
-
`,Ro=Z`
|
2118
|
-
margin-top: 9px;
|
2119
|
-
`,Do=({columns:e,data:t,renderRow:r,striped:n,stickyHeader:o,pagination:i,selectable:l,selectedRows:a,onSortColumn:s,onPageSizeChange:c,onPageChange:d,onAllItemsSelected:p})=>{const[u,h]=U({key:"",order:""}),{totalItems:x=t.length,currentPage:g=1,pageSize:f=10,showItemCount:b,showItemCountText:C}=i||{},m=(e,t)=>{h({key:e,order:t}),s&&s({key:e,order:t})},v=a?.length===t?.length,w=a&&a.length>0&&!v;return O("div",{children:[O(V.Root,{css:$o,striped:n,stickyHeader:o,interactive:!0,children:[B(V.Header,{css:ko,children:O(V.Row,{children:[l?B(V.ColumnHeader,{children:B(xt,{name:"header-checkbox",checked:v,indeterminate:w,onCheckedChange:({checked:e})=>{p&&p(e)}})}):null,e.map((e=>B(V.ColumnHeader,{role:e.sortable?"columnheader":void 0,"aria-sort":e.sortable&&"asc"===u.order?"ascending":e.sortable&&"desc"===u.order?"descending":void 0,children:O("div",{css:Lo,children:[e.label,e.sortable?O("div",{css:Mo,children:[B(Ye,{css:So(u.key===e.key&&"asc"===u.order),icon:B(be,{style:{transform:"rotate(180deg)"}}),onClick:()=>m(e.key,"asc"),"aria-label":"Ascending"}),B(Ye,{css:So(u.key===e.key&&"desc"===u.order),icon:B(be,{}),onClick:()=>m(e.key,"desc"),"aria-label":"Descending"})]}):null]})},e.key)))]})}),B(V.Body,{children:t.map((e=>B(X.Fragment,{children:r(e)},e.id)))})]}),O("div",{css:Vo,children:[B("div",{children:b?B(bo,{pageSize:f,currentPage:g,totalItems:x,onPageSizeChange:c,showItemCountText:C}):null}),i?B("div",{css:Ro,children:B(yo,{totalItems:x,pageSize:f,currentPage:g,onPageChange:d})}):null]})]})},_o=V.Row,zo=V.Cell,Io=Z`
|
2120
|
-
border: 1px solid ${ie("neutral",300)};
|
2121
|
-
`,Eo=Z`
|
2122
|
-
color: ${ie("neutral",700)};
|
2123
|
-
line-height: 16px;
|
2124
|
-
white-space: nowrap;
|
2125
|
-
overflow: hidden;
|
2126
|
-
text-overflow: ellipsis;
|
2127
|
-
`,Ho=Z`
|
2128
|
-
font-weight: 400;
|
2129
|
-
color: ${ie("neutral",700)};
|
2130
|
-
white-space: nowrap;
|
2131
|
-
overflow: hidden;
|
2132
|
-
text-overflow: ellipsis;
|
2133
|
-
`,jo=Z`
|
2134
|
-
color: ${ie("neutral",700)};
|
2135
|
-
text-align: right;
|
2136
|
-
font-weight: 700;
|
2137
|
-
white-space: nowrap;
|
2138
|
-
overflow: hidden;
|
2139
|
-
text-overflow: ellipsis;
|
2140
|
-
`,Po=Z`
|
2141
|
-
svg {
|
2142
|
-
path {
|
2143
|
-
fill: ${ie("neutral",800)};
|
2144
|
-
}
|
2145
|
-
}
|
2146
2166
|
`,To=Z`
|
2147
|
-
|
2148
|
-
|
2149
|
-
path {
|
2150
|
-
fill: ${ie("neutral",700)};
|
2151
|
-
}
|
2152
|
-
`,Oo=Z`
|
2153
|
-
display: flex;
|
2154
|
-
align-items: center;
|
2155
|
-
justify-content: space-between;
|
2156
|
-
padding: 12px 16px;
|
2157
|
-
background-color: white;
|
2158
|
-
border-bottom: 1px solid ${ie("neutral",200)};
|
2159
|
-
cursor: default;
|
2160
|
-
|
2161
|
-
&:hover {
|
2162
|
-
background-color: ${ie("neutral",200)};
|
2163
|
-
}
|
2164
|
-
|
2165
|
-
&:active {
|
2166
|
-
background-color: ${ie("neutral",300)};
|
2167
|
-
}
|
2168
|
-
`,Bo=({label:e,caption:t,icon:r,value:o,variant:l="data",onItemClick:a,isExpanded:s=!1,id:c})=>{const d="navigation"===l&&!!a;return O(R,{css:Oo,cursor:d?"pointer":"default",onClick:d?a:void 0,tabIndex:d?0:void 0,onKeyDown:e=>{d&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a?.()))},role:d?"button":void 0,"aria-expanded":d?s:void 0,"aria-controls":d&&c?`item-content-${c}`:void 0,children:[O(R,{gap:3,flex:"1",overflow:"hidden",children:[r&&B(i,{css:To,as:r.type,boxSize:4}),O(n,{flex:"1",minWidth:0,children:[B(D,{fontWeight:"navigation"===l?"700":"400",css:Eo,children:e}),t&&B(D,{css:Ho,children:t})]})]}),"data"===l&&o&&B(D,{css:jo,children:o}),"navigation"===l&&d&&B(Ye,{css:Po,icon:B(Ce,{}),onClick:a,"aria-label":`Expand ${e}`,"aria-expanded":s,"aria-controls":c?`item-content-${c}`:void 0})]})},No=({items:e})=>{const[t,r]=U([]);return B(n,{css:Io,children:e.map((e=>B(Bo,{icon:e.icon,label:e.label,caption:e.caption,value:e.data,variant:e.variant??"data",onItemClick:"navigation"===e.variant?()=>{return t=String(e.id),void r((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]));var t}:void 0,isExpanded:!!e.id&&t.includes(String(e.id)),id:e.id},e.id??e.label)))})};function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fo(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var Ao,Wo={exports:{}},Yo={},Xo={exports:{}},Uo={exports:{}},qo={};var Go,Ko,Jo,Qo,ei,ti,ri,ni,oi,ii,li,ai,si,ci={};
|
2167
|
+
margin-top: 9px;
|
2168
|
+
`,Oo=({columns:e,data:t,renderRow:r,striped:n,stickyHeader:o,pagination:i,selectable:l,selectedRows:a,onSortColumn:s,onPageSizeChange:c,onPageChange:d,onAllItemsSelected:p})=>{const[u,h]=U({key:"",order:""}),{totalItems:x=t.length,currentPage:g=1,pageSize:f=10,showItemCount:b,showItemCountText:C}=i||{},m=(e,t)=>{h({key:e,order:t}),s&&s({key:e,order:t})},v=a?.length===t?.length,w=a&&a.length>0&&!v;return O("div",{children:[O(D.Root,{css:zo,striped:n,stickyHeader:o,interactive:!0,children:[B(D.Header,{css:Io,children:O(D.Row,{children:[l?B(D.ColumnHeader,{children:B(xt,{name:"header-checkbox",checked:v,indeterminate:w,onCheckedChange:({checked:e})=>{p&&p(e)}})}):null,e.map((e=>B(D.ColumnHeader,{role:e.sortable?"columnheader":void 0,"aria-sort":e.sortable&&"asc"===u.order?"ascending":e.sortable&&"desc"===u.order?"descending":void 0,children:O("div",{css:Eo,children:[e.label,e.sortable?O("div",{css:Ho,children:[B(Ye,{css:jo(u.key===e.key&&"asc"===u.order),icon:B(be,{style:{transform:"rotate(180deg)"}}),onClick:()=>m(e.key,"asc"),"aria-label":"Ascending"}),B(Ye,{css:jo(u.key===e.key&&"desc"===u.order),icon:B(be,{}),onClick:()=>m(e.key,"desc"),"aria-label":"Descending"})]}):null]})},e.key)))]})}),B(D.Body,{children:t.map((e=>B(X.Fragment,{children:r(e)},e.id)))})]}),O("div",{css:Po,children:[B("div",{children:b?B(bo,{pageSize:f,currentPage:g,totalItems:x,onPageSizeChange:c,showItemCountText:C}):null}),i?B("div",{css:To,children:B(_o,{totalItems:x,pageSize:f,currentPage:g,onPageChange:d})}):null]})]})},Bo=D.Row,No=D.Cell;function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fo(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var Ao,Wo={exports:{}},Yo={},Xo={exports:{}},Uo={exports:{}},qo={};var Go,Ko,Jo,Qo,ei,ti,ri,ni,oi,ii,li,ai,si,ci={};
|
2169
2169
|
/** @license React v16.13.1
|
2170
2170
|
* react-is.development.js
|
2171
2171
|
*
|
@@ -3212,4 +3212,4 @@ import{createSystem as e,defaultConfig as t,Button as r,Box as n,Spinner as o,Ic
|
|
3212
3212
|
padding: 6px;
|
3213
3213
|
`,Da=Z`
|
3214
3214
|
padding: 6px;
|
3215
|
-
`,_a={pauseOnPageIdle:!0,offsets:"24px"},za={"top-start":H({placement:"top-start",..._a}),"top-end":H({placement:"top-end",..._a}),"bottom-start":H({placement:"bottom-start",..._a}),"bottom-end":H({placement:"bottom-end",..._a})},Ia=e=>{za[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})},Ea=()=>Object.keys(za).map((e=>B(s,{children:B(j,{toaster:za[e],insetInline:{mdDown:"4"},children:t=>O(P.Root,{css:Ma,width:{md:"sm"},children:[O(T,{flexDirection:"row",className:"icon-container",children:["info"===t.type?t.meta?.icon?t.meta.icon:B(fe,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===t.type?B(o,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===t.type?t.meta?.icon?t.meta.icon:B($e,{color:"var(--chakra-colors-success-500)"}):null,"warning"===t.type?t.meta?.icon?t.meta.icon:B(ke,{color:"var(--chakra-colors-warning-500)"}):null,"error"===t.type?t.meta?.icon?t.meta.icon:B(Le,{color:"var(--chakra-colors-error-500)"}):null,O(T,{gap:"1",flex:"1",maxWidth:"100%",children:[B(P.Title,{css:Sa,"aria-label":`${t.title}`,children:t.title}),t.description?B(P.Title,{css:Va,"aria-label":`${t.description}`,children:t.description}):null]})]}),t.action||t.meta?.closable?O(T,{flexDirection:"row",children:[t.action?B(pe,{css:Ra,label:t.action.label,size:"small",variant:"info"===t.type?"primary":"secondary",onClick:()=>{t?.action?.onClick&&t.action.onClick(),za[e].dismiss()}}):null,t.meta?.closable?B(pe,{css:Da,label:t.meta.closableLabel,"aria-label":t.meta?.closableLabel||"Dismiss",leftIcon:B(me,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>za[e].dismiss()}):null]}):null]})})},e)));export{la as Badge,mn as BaseMap,dl as Breadcrumb,pe as Button,xt as Checkbox,Gt as CheckboxList,wt as CheckboxOptionCard,Xe as CloseButton,gl as Footer,Ye as IconButton,wn as IconMarker,yn as IconMarkers,fa as InlineMessage,jr as InputWithUnits,bo as ItemCount,zn as LayerGroup,In as LayerGroupContainer,_n as LayerItem,Tn as LayerParameters,Gn as LegendItem,
|
3215
|
+
`,_a={pauseOnPageIdle:!0,offsets:"24px"},za={"top-start":H({placement:"top-start",..._a}),"top-end":H({placement:"top-end",..._a}),"bottom-start":H({placement:"bottom-start",..._a}),"bottom-end":H({placement:"bottom-end",..._a})},Ia=e=>{za[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})},Ea=()=>Object.keys(za).map((e=>B(s,{children:B(j,{toaster:za[e],insetInline:{mdDown:"4"},children:t=>O(P.Root,{css:Ma,width:{md:"sm"},children:[O(T,{flexDirection:"row",className:"icon-container",children:["info"===t.type?t.meta?.icon?t.meta.icon:B(fe,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===t.type?B(o,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===t.type?t.meta?.icon?t.meta.icon:B($e,{color:"var(--chakra-colors-success-500)"}):null,"warning"===t.type?t.meta?.icon?t.meta.icon:B(ke,{color:"var(--chakra-colors-warning-500)"}):null,"error"===t.type?t.meta?.icon?t.meta.icon:B(Le,{color:"var(--chakra-colors-error-500)"}):null,O(T,{gap:"1",flex:"1",maxWidth:"100%",children:[B(P.Title,{css:Sa,"aria-label":`${t.title}`,children:t.title}),t.description?B(P.Title,{css:Va,"aria-label":`${t.description}`,children:t.description}):null]})]}),t.action||t.meta?.closable?O(T,{flexDirection:"row",children:[t.action?B(pe,{css:Ra,label:t.action.label,size:"small",variant:"info"===t.type?"primary":"secondary",onClick:()=>{t?.action?.onClick&&t.action.onClick(),za[e].dismiss()}}):null,t.meta?.closable?B(pe,{css:Da,label:t.meta.closableLabel,"aria-label":t.meta?.closableLabel||"Dismiss",leftIcon:B(me,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>za[e].dismiss()}):null]}):null]})})},e)));export{la as Badge,mn as BaseMap,dl as Breadcrumb,pe as Button,xt as Checkbox,Gt as CheckboxList,wt as CheckboxOptionCard,Xe as CloseButton,gl as Footer,Ye as IconButton,wn as IconMarker,yn as IconMarkers,fa as InlineMessage,jr as InputWithUnits,bo as ItemCount,zn as LayerGroup,In as LayerGroupContainer,_n as LayerItem,Tn as LayerParameters,Gn as LegendItem,Mo as List,Je as MapControl,Qe as MapControls,at as Menu,Wi as Modal,ut as MultiActionButton,Tl as Navbar,Al as NavigationRail,Vt as OptionCard,_o as Pagination,Ji as Panel,Ar as Password,ma as ProgressBar,io as QualitativeAttribute,_t as Radio,zt as RadioGroup,Jr as RadioList,Fe as SSOButtons,ho as ScaleBar,Hr as Select,ll as Sheet,Nt as Slider,rn as SliderInput,La as StepProgressIndicator,Ft as Switch,Jl as TabBar,Oo as Table,No as TableCell,Bo as TableRow,zr as Tag,cr as TextInput,pn as Textarea,Ea as Toast,oe as designSystemStyles,ie as getThemedColor,Ia as showToast};
|