@worldresources/wri-design-systems 2.151.0 → 2.152.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.d.ts +2 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3576,7 +3576,7 @@ function qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3576
3576
|
font-weight: 700;
|
|
3577
3577
|
color: ${h("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
|
|
3578
3578
|
}
|
|
3579
|
-
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Jt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:Qt(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:Qt(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:Qt(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:Qt(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:Qt(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:Vf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Af(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"})})=>{const[
|
|
3579
|
+
`),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:Jt(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:Qt(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:Qt(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:Qt(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:Qt(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:Qt(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:Vf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Af(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((()=>`${c??`${c},`} ${r}${o?`, ${o}`:""}. Currently ${u?"visible":"hidden"}.`),[u,e,r,o]),y=u?"Hide":"Show";return t.jsxs("div",{css:mi,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:bi,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:xi(i)}),x&&t.jsx("div",{css:gi(i)}),g&&t.jsx("div",{css:vi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:yi,children:r}),o?t.jsx("p",{id:h,css:wi,children:o}):null]})]}),a&&s?t.jsx("div",{css:Ci,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=Fe,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:en,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:on}):null,t.jsxs("div",{css:(f=!!c,r.css`
|
|
3580
3580
|
margin-left: ${f?"19px":"0px"};
|
|
3581
3581
|
`),children:[t.jsxs("p",{css:tn,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:nn,"aria-label":o,children:o}),c?t.jsx("p",{css:an,"aria-label":c,children:c}):null,t.jsx("div",{css:rn,children:t.jsx(Ze,{name:i,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(Fe,{css:"card"===d?sn:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=te,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:ji,children:[i?t.jsx("div",{css:(a=Ri(e),r.css`
|
|
3582
3582
|
height: 20px;
|
package/dist/index.d.ts
CHANGED
|
@@ -543,9 +543,10 @@ type QualitativeAttributeProps = {
|
|
|
543
543
|
showActionButton?: boolean;
|
|
544
544
|
onActionClick?: () => void;
|
|
545
545
|
pointIcon?: React.ReactNode;
|
|
546
|
+
ariaLabelType?: string;
|
|
546
547
|
};
|
|
547
548
|
|
|
548
|
-
declare const QualitativeAttribute: ({ type, label, caption, color, onActionClick, showActionButton, pointIcon, }: QualitativeAttributeProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
549
|
+
declare const QualitativeAttribute: ({ type, label, caption, color, onActionClick, showActionButton, pointIcon, ariaLabelType, }: QualitativeAttributeProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
549
550
|
|
|
550
551
|
type ScaleBarProps = {
|
|
551
552
|
colors: string[];
|
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: ${xe("neutral",600)};
|
|
2100
2100
|
padding: 0 10px;
|
|
2101
2101
|
}
|
|
2102
|
-
`,qa=({type:e,label:t,caption:n,color:r,onActionClick:i,showActionButton:o,pointIcon:a=Z(Xe,{color:"#006D2C"})})=>{const[
|
|
2102
|
+
`,qa=({type:e,label:t,caption:n,color:r,onActionClick:i,showActionButton:o,pointIcon:a=Z(Xe,{color:"#006D2C"}),ariaLabelType:l=""})=>{const[s,c]=X(!0),d=J(),u=J(),p="raster"===e,h="line"===e,f="point"===e,g=J(),v=te((()=>`${l??`${l},`} ${t}${n?`, ${n}`:""}. Currently ${s?"visible":"hidden"}.`),[s,e,t,n]),m=s?"Hide":"Show";return F("div",{css:Ha,children:[Z("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}),F("div",{css:Ba,children:[F("div",{children:[p&&Z("div",{css:Ia(r)}),h&&Z("div",{css:Aa(r)}),f&&Z("div",{css:za(r),children:a})]}),F("div",{children:[Z("p",{id:d,css:Fa,children:t}),n?Z("p",{id:u,css:Za,children:n}):null]})]}),i&&o?Z("div",{css:Wa,children:Z(ke,{type:"button",variant:"borderless",label:m,rightIcon:Z(s?Ne:De,{}),"aria-pressed":s,"aria-labelledby":`${g} ${d}`,onClick:()=>{c((e=>!e)),i?.()}})}):null]})},Ga=le`
|
|
2103
2103
|
width: 100%;
|
|
2104
2104
|
display: flex;
|
|
2105
2105
|
flex-direction: column;
|