@worldresources/wri-design-systems 2.154.1 → 2.155.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3583,7 +3583,7 @@ function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3583
3583
|
font-weight: 700;
|
|
3584
3584
|
color: ${h("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
|
|
3585
3585
|
}
|
|
3586
|
-
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Qt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:en(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:en(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:en(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:en(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:en(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:zf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Bf(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"}),ariaLabelType:c=""})=>{const[u,d]=n.useState(!0),p=n.useId(),h=n.useId(),f="raster"===e,x="line"===e,g="point"===e,v=n.useId(),m=n.useMemo((()
|
|
3586
|
+
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Qt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:en(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:en(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:en(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:en(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:en(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:zf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Bf(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"}),ariaLabelType:c=""})=>{const[u,d]=n.useState(!0),p=n.useId(),h=n.useId(),f="raster"===e,x="line"===e,g="point"===e,v=n.useId(),m=n.useMemo((()=>{let e=c??`${c},`;x&&(e="line,");return`${e} ${r}${o?`, ${o}`:""}. Currently ${u?"visible":"hidden"}.`}),[u,e,r,o]),y=u?"Hide":"Show";return t.jsxs("div",{css:bi,children:[t.jsx("p",{id:v,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:m}),t.jsxs("div",{css:yi,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:gi(i)}),x&&t.jsx("div",{css:vi(i)}),g&&t.jsx("div",{css:mi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:wi,children:r}),o?t.jsx("p",{id:h,css:Ci,children:o}):null]})]}),a&&s?t.jsx("div",{css:ji,children:t.jsx(b,{type:"button",variant:"borderless",label:y,rightIcon:u?t.jsx(L,{}):t.jsx(O,{}),"aria-pressed":u,"aria-labelledby":`${v} ${p}`,onClick:()=>{d((e=>!e)),a?.()}})}):null]})},exports.Radio=Ze,exports.RadioGroup=We,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:tn,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:an}):null,t.jsxs("div",{css:(f=!!c,r.css`
|
|
3587
3587
|
margin-left: ${f?"19px":"0px"};
|
|
3588
3588
|
`),children:[t.jsxs("p",{css:nn,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:rn,"aria-label":o,children:o}),c?t.jsx("p",{css:sn,"aria-label":c,children:c}):null,t.jsx("div",{css:on,children:t.jsx(We,{name:i,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(Ze,{css:"card"===d?ln:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=ne,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:ki,children:[i?t.jsx("div",{css:(a=Oi(e),r.css`
|
|
3589
3589
|
height: 20px;
|
package/dist/index.esm.js
CHANGED
|
@@ -2099,7 +2099,7 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
2099
2099
|
color: ${be("neutral",600)};
|
|
2100
2100
|
padding: 0 10px;
|
|
2101
2101
|
}
|
|
2102
|
-
`,Ua=({type:e,label:t,caption:n,color:r,onActionClick:i,showActionButton:o,pointIcon:a=W(Ye,{color:"#006D2C"}),ariaLabelType:l=""})=>{const[s,c]=Y(!0),d=Q(),u=Q(),p="raster"===e,h="line"===e,f="point"===e,g=Q(),v=ne((()
|
|
2102
|
+
`,Ua=({type:e,label:t,caption:n,color:r,onActionClick:i,showActionButton:o,pointIcon:a=W(Ye,{color:"#006D2C"}),ariaLabelType:l=""})=>{const[s,c]=Y(!0),d=Q(),u=Q(),p="raster"===e,h="line"===e,f="point"===e,g=Q(),v=ne((()=>{let e=l??`${l},`;h&&(e="line,");return`${e} ${t}${n?`, ${n}`:""}. Currently ${s?"visible":"hidden"}.`}),[s,e,t,n]),m=s?"Hide":"Show";return Z("div",{css:Fa,children:[W("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}),Z("div",{css:Za,children:[Z("div",{children:[p&&W("div",{css:za(r)}),h&&W("div",{css:Ha(r)}),f&&W("div",{css:Ba(r),children:a})]}),Z("div",{children:[W("p",{id:d,css:Wa,children:t}),n?W("p",{id:u,css:qa,children:n}):null]})]}),i&&o?W("div",{css:Ga,children:W(Se,{type:"button",variant:"borderless",label:m,rightIcon:W(s?Ve:Ne,{}),"aria-pressed":s,"aria-labelledby":`${g} ${d}`,onClick:()=>{c((e=>!e)),i?.()}})}):null]})},Xa=se`
|
|
2103
2103
|
width: 100%;
|
|
2104
2104
|
display: flex;
|
|
2105
2105
|
flex-direction: column;
|