@worldresources/wri-design-systems 2.148.0 → 2.148.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/dist/index.cjs.js CHANGED
@@ -3526,7 +3526,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3526
3526
  background-image: url(${n});
3527
3527
  background-size: cover;
3528
3528
  background-position: center;
3529
- `)}),t.jsxs("div",{css:wn,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(At,{label:"Active",variant:"warning",size:"small",icon:t.jsx(w,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})}),exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>i);n.useEffect((()=>{l(r.length>i)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:wh,children:t.jsxs(c,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:Ch,children:o||t.jsx(k,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:jh,type:"button",onClick:()=>l(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Ch,children:o||t.jsx(k,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:wh,children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((i,a)=>i?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:wh,children:a<r.length-1?t.jsxs(c,{to:i.link,href:i.link,children:[i.icon,i.label]}):t.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Ch,children:o||t.jsx(k,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=m,exports.Checkbox=je,exports.CheckboxList=({label:o,caption:i,checkboxes:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,required:d})=>{const[p,h]=n.useState(s?{[s]:!0}:{}),f=`${o}. ${i?`${i}.`:""} ${d?"Required.":"Optional"} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:Je,tabIndex:0,"aria-label":f,children:[c?t.jsx("div",{css:nt}):null,t.jsxs("div",{css:(x=!!c,r.css`
3529
+ `)}),t.jsxs("div",{css:wn,children:[t.jsxs("div",{className:"ds-base-map-title-container",children:[t.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?t.jsx(At,{label:"Active",variant:"warning",size:"small",icon:t.jsx(w,{})}):null]}),t.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?t.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var n}))}):null]})]})}),exports.Breadcrumb=({links:r,separator:o,maxItems:i=99,linkRouter:a})=>{const[s,l]=n.useState(r.length>i);n.useEffect((()=>{l(r.length>i)}),[r.length]);const c=a;return t.jsx(e.Breadcrumb.Root,{children:t.jsx(e.Breadcrumb.List,{gap:"16px",children:s?t.jsxs(t.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:wh,children:t.jsxs(c,{to:r[0].link,href:r[0].link,children:[r[0].icon,r[0].label]})}),t.jsx(e.Breadcrumb.Separator,{css:Ch,children:o||t.jsx(k,{rotate:"270"})}),t.jsx("li",{className:"chakra-breadcrumb__item",children:t.jsx("button",{css:jh,type:"button",onClick:()=>l(!1),children:"..."})}),t.jsx(e.Breadcrumb.Separator,{css:Ch,children:o||t.jsx(k,{rotate:"270"})}),t.jsx(e.Breadcrumb.Item,{css:wh,children:t.jsxs("p",{"aria-current":"page","aria-label":r[r.length-1].label,children:[r[r.length-1].icon,r[r.length-1].label]})})]}):r.map(((i,a)=>i?.label?t.jsxs(n.Fragment,{children:[t.jsx(e.Breadcrumb.Item,{css:wh,children:a<r.length-1?t.jsxs(c,{to:i.link,href:i.link,children:[i.icon,i.label]}):t.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),a<r.length-1?t.jsx(e.Breadcrumb.Separator,{css:Ch,children:o||t.jsx(k,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=m,exports.Checkbox=je,exports.CheckboxList=({label:o,caption:i,checkboxes:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,required:d})=>{const[p,h]=n.useState(s?{[s]:!0}:{}),f=`${o}. ${i?`${i}.`:""} ${d?"Required.":"Optional"} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:Je,"aria-label":f,children:[c?t.jsx("div",{css:nt}):null,t.jsxs("div",{css:(x=!!c,r.css`
3530
3530
  margin-left: ${x?"19px":"0px"};
3531
3531
  `),children:[t.jsxs("p",{css:Qe,"aria-label":o,children:[d&&t.jsx("span",{"aria-label":"required",children:"*"}),o]}),t.jsx("p",{css:et,"aria-label":i,children:i}),c?t.jsx("p",{css:rt,"aria-label":c,children:c}):null,t.jsx("div",{css:tt(u),children:a.map((e=>t.jsx(je,{css:{},defaultChecked:s===e.value,onCheckedChange:({checked:t})=>((e,t)=>{const n={...p};t&&(n[t]=e,h(n)),l&&l(n)})(t,e.name),...e},e.name)))})]})]});var x},exports.CheckboxOptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.CheckboxGroup,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((o=>{return t.jsxs(e.CheckboxCard.Root,{css:ke,defaultChecked:-1!==n?.indexOf(o.value),disabled:o.disabled,value:o.value,children:[t.jsx(e.CheckboxCard.HiddenInput,{}),t.jsxs(e.CheckboxCard.Control,{css:$e,children:[t.jsxs(e.CheckboxCard.Content,{css:(a=o.variant,r.css`
3532
3532
  width: 100%;
@@ -3571,7 +3571,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3571
3571
  font-weight: 700;
3572
3572
  color: ${p("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
3573
3573
  }
3574
- `),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Ut(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:Xt(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:Xt(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:Xt(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:Xt(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:Xt(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:_f,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Df(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"})})=>{const[c,u]=n.useState(!0),d=n.useId(),p=n.useId(),h="raster"===e,f="line"===e,x="point"===e,g=n.useId(),v=n.useMemo((()=>`${e?`${e} layer`:"layer"}, ${r}${o?`, ${o}`:""}. Currently ${c?"visible":"hidden"}.`),[c,e,r,o]),b=c?"Hide":"Show";return t.jsxs("div",{css:fi,children:[t.jsx("p",{id:g,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:v}),t.jsxs("div",{css:xi,children:[t.jsxs("div",{children:[h&&t.jsx("div",{css:di(i)}),f&&t.jsx("div",{css:pi(i)}),x&&t.jsx("div",{css:hi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:d,css:gi,children:r}),o?t.jsx("p",{id:p,css:vi,children:o}):null]})]}),a&&s?t.jsx("div",{css:mi,children:t.jsx(m,{type:"button",variant:"borderless",label:b,rightIcon:c?t.jsx(L,{}):t.jsx(O,{}),"aria-pressed":c,"aria-labelledby":`${g} ${d}`,onClick:()=>{u((e=>!e)),a?.()}})}):null]})},exports.Radio=Ae,exports.RadioGroup=ze,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{tabIndex:0,css:Yt,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:en}):null,t.jsxs("div",{css:(f=!!c,r.css`
3574
+ `),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Ut(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:Xt(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:Xt(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:Xt(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:Xt(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:Xt(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(w,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:_f,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Df(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"})})=>{const[c,u]=n.useState(!0),d=n.useId(),p=n.useId(),h="raster"===e,f="line"===e,x="point"===e,g=n.useId(),v=n.useMemo((()=>`${e?`${e} layer`:"layer"}, ${r}${o?`, ${o}`:""}. Currently ${c?"visible":"hidden"}.`),[c,e,r,o]),b=c?"Hide":"Show";return t.jsxs("div",{css:fi,children:[t.jsx("p",{id:g,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:v}),t.jsxs("div",{css:xi,children:[t.jsxs("div",{children:[h&&t.jsx("div",{css:di(i)}),f&&t.jsx("div",{css:pi(i)}),x&&t.jsx("div",{css:hi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:d,css:gi,children:r}),o?t.jsx("p",{id:p,css:vi,children:o}):null]})]}),a&&s?t.jsx("div",{css:mi,children:t.jsx(m,{type:"button",variant:"borderless",label:b,rightIcon:c?t.jsx(L,{}):t.jsx(O,{}),"aria-pressed":c,"aria-labelledby":`${g} ${d}`,onClick:()=>{u((e=>!e)),a?.()}})}):null]})},exports.Radio=Ae,exports.RadioGroup=ze,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:Yt,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:en}):null,t.jsxs("div",{css:(f=!!c,r.css`
3575
3575
  margin-left: ${f?"19px":"0px"};
3576
3576
  `),children:[t.jsxs("p",{css:Kt,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:Jt,"aria-label":o,children:o}),c?t.jsx("p",{css:tn,"aria-label":c,children:c}):null,t.jsx("div",{css:Qt,children:t.jsx(ze,{name:i,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(Ae,{css:"card"===d?nn:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=Q,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:bi,children:[i?t.jsx("div",{css:(a=ki(e),r.css`
3577
3577
  height: 20px;
package/dist/index.esm.js CHANGED
@@ -1038,7 +1038,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
1038
1038
  font-weight: 700;
1039
1039
  color: ${ve("error",900)};
1040
1040
  text-align: left;
1041
- `,fn=({label:e,caption:t,checkboxes:n,defaultValue:r,onCheckedChange:i,errorMessage:o,horizontal:a,required:l})=>{const[c,d]=U(r?{[r]:!0}:{});return B(s,{css:sn,tabIndex:0,"aria-label":`${e}. ${t?`${t}.`:""} ${l?"Required.":"Optional"} ${o?`Error: ${o}.`:""} `,children:[o?F("div",{css:pn}):null,B("div",{css:(u=!!o,ae`
1041
+ `,fn=({label:e,caption:t,checkboxes:n,defaultValue:r,onCheckedChange:i,errorMessage:o,horizontal:a,required:l})=>{const[c,d]=U(r?{[r]:!0}:{});return B(s,{css:sn,"aria-label":`${e}. ${t?`${t}.`:""} ${l?"Required.":"Optional"} ${o?`Error: ${o}.`:""} `,children:[o?F("div",{css:pn}):null,B("div",{css:(u=!!o,ae`
1042
1042
  margin-left: ${u?"19px":"0px"};
1043
1043
  `),children:[B("p",{css:cn,"aria-label":e,children:[l&&F("span",{"aria-label":"required",children:"*"}),e]}),F("p",{css:dn,"aria-label":t,children:t}),o?F("p",{css:hn,"aria-label":o,children:o}):null,F("div",{css:un(a),children:n.map((e=>F(Pt,{css:{},defaultChecked:r===e.value,onCheckedChange:({checked:t})=>((e,t)=>{const n={...c};t&&(n[t]=e,d(n)),i&&i(n)})(t,e.name),...e},e.name)))})]})]});var u},gn=ae`
1044
1044
  width: 100%;
@@ -1552,7 +1552,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
1552
1552
  border-radius: 4px;
1553
1553
  background-color: ${ve("neutral",100)};
1554
1554
  padding: 12px;
1555
- `,vr=({label:e,caption:t,name:n,radios:r,defaultValue:i,onCheckedChange:o,errorMessage:a,horizontal:l,variant:c="default",required:d})=>{return B(s,{tabIndex:0,css:cr,"aria-roledescription":"group","aria-label":`${e}. ${t?`${t}.`:""} ${d?"Required.":"Optional."} ${a?`Error: ${a}.`:""} `,children:[a?F("div",{css:hr}):null,B("div",{css:(u=!!a,ae`
1555
+ `,vr=({label:e,caption:t,name:n,radios:r,defaultValue:i,onCheckedChange:o,errorMessage:a,horizontal:l,variant:c="default",required:d})=>{return B(s,{css:cr,"aria-roledescription":"group","aria-label":`${e}. ${t?`${t}.`:""} ${d?"Required.":"Optional."} ${a?`Error: ${a}.`:""} `,children:[a?F("div",{css:hr}):null,B("div",{css:(u=!!a,ae`
1556
1556
  margin-left: ${u?"19px":"0px"};
1557
1557
  `),children:[B("p",{css:dr,"aria-label":e,children:[d&&F("span",{"aria-label":"required",children:"*"}),e]}),F("p",{css:ur,"aria-label":t,children:t}),a?F("p",{css:fr,"aria-label":a,children:a}):null,F("div",{css:pr,children:F(Xt,{name:n,defaultValue:i,onChange:o,horizontal:l&&"card"!==c,children:r.map((e=>F(Ut,{css:"card"===c?gr:{},...e},e.value)))})})]})]});var u},mr=e=>ae`
1558
1558
  font-size: ${"small"===e?"14px":"16px"};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldresources/wri-design-systems",
3
- "version": "2.148.0",
3
+ "version": "2.148.2",
4
4
  "description": "WRI UI Library",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",