@worldresources/wri-design-systems 2.201.3 → 2.202.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 +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3818,10 +3818,10 @@ function WM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3818
3818
|
display: flex;
|
|
3819
3819
|
align-items: center;
|
|
3820
3820
|
justify-content: flex-start;
|
|
3821
|
-
`,sL=e=>i.css`
|
|
3821
|
+
`,sL=(e,t)=>i.css`
|
|
3822
3822
|
height: 100%;
|
|
3823
3823
|
width: ${e}%;
|
|
3824
|
-
background-color: ${w("primary",500)};
|
|
3824
|
+
background-color: ${t??w("primary",500)};
|
|
3825
3825
|
transition: width 0.5s ease-in-out;
|
|
3826
3826
|
`,aL=i.css`
|
|
3827
3827
|
width: 100%;
|
|
@@ -3996,7 +3996,7 @@ function WM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3996
3996
|
font-weight: 700;
|
|
3997
3997
|
color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
|
|
3998
3998
|
}
|
|
3999
|
-
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:b[g.strength]})]}),r.jsx("div",{css:Wv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:Uv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:Uv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:Uv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:Uv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:Uv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]});var y},exports.ProgressBar=({progress:e,labels:t})=>{const
|
|
3999
|
+
`),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:b[g.strength]})]}),r.jsx("div",{css:Wv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:Uv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:Uv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:Uv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:Uv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:Uv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Rf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(zf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]});var y},exports.ProgressBar=({progress:e,labels:t,color:n})=>{const o=Mf("ProgressBar",t);let i=e;return i>100&&(i=100),i<0&&(i=0),r.jsx("div",{css:iL,role:"progressbar","aria-label":o.progressAriaLabel(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,children:r.jsx("div",{css:sL(i,n)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(em,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Mf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,v="line"===e,b="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return v&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:cw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:dw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:sw(i)}),v&&r.jsx("div",{css:aw(i)}),b&&r.jsx("div",{css:lw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:uw,children:t}),o?r.jsx("p",{id:m,css:hw,children:o}):null]})]}),s&&a?r.jsx("div",{css:pw,children:r.jsx(Ef,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(Hf,{}):r.jsx(Bf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=Hg,exports.RadioGroup=_g,exports.RadioList=({label:t,caption:n,name:o,radios:s,defaultValue:a,onCheckedChange:l,errorMessage:c,horizontal:d,variant:u="default",required:h,labels:p})=>{const f=Mf("RadioList",p),m=`${t}. ${n?`${n}.`:""} ${h?f.requiredLabel:f.optionalLabel} ${c?`${f.errorPrefix} ${c}.`:""} `;return r.jsxs(e.Group,{css:Kv,"aria-roledescription":"group","aria-label":m,children:[c?r.jsx("div",{css:Xv}):null,r.jsxs("div",{css:(g=!!c,i.css`
|
|
4000
4000
|
margin-left: ${g?"1.1875rem":"0"};
|
|
4001
4001
|
`),children:[r.jsxs("p",{css:Gv,"aria-label":t,children:[h&&r.jsx("span",{"aria-label":f.requiredSymbolLabel,children:"*"}),t]}),r.jsx("p",{css:Zv,"aria-label":n,children:n}),c?r.jsx("p",{css:Yv,"aria-label":c,children:c}):null,r.jsx("div",{css:Jv,children:r.jsx(_g,{name:o,value:a,onChange:l,horizontal:d&&"card"!==u,children:s.map((e=>r.jsx(Hg,{css:"card"===u?Qv:{},...e},e.value)))})})]})]});var g},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=ig,onChange:a,labels:c})=>{const d=Mf("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!0,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(og.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(og.Toolbar,{children:r.jsxs(og.ControlGroup,{children:[s.includes("undo")?r.jsx(qm,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(Wm,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Dm,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(Km,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Im,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Pm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(zm,{label:d.italicTooltip,icon:r.jsx("em",{css:{fontStyle:"italic",fontSize:C(600),lineHeight:1},children:d.italicIconText})}):null,s.includes("underline")?r.jsx(Vm,{label:d.underlineTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"underline"},children:d.underlineIconText})}):null,s.includes("strikethrough")?r.jsx(Bm,{label:d.strikethroughTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"line-through"},children:d.strikethroughIconText})}):null,s.includes("bulletList")?r.jsx(Hm,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(_m,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(tg,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(Fm,{label:d.imageTooltip}):null]})}),r.jsx(og.Content,{})]})},exports.SSOButtons=sg,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:fw,children:[o?r.jsx("div",{css:(s=yw(e),i.css`
|
|
4002
4002
|
height: ${k(500)};
|
package/dist/index.d.ts
CHANGED
|
@@ -1747,11 +1747,12 @@ declare const AlertBanner: React$1.ForwardRefExoticComponent<AlertProps & React$
|
|
|
1747
1747
|
|
|
1748
1748
|
type ProgressBarProps = {
|
|
1749
1749
|
progress: number;
|
|
1750
|
+
color?: string;
|
|
1750
1751
|
/** Override internal UI labels for internationalization support. */
|
|
1751
1752
|
labels?: Partial<ProgressBarLabels>;
|
|
1752
1753
|
};
|
|
1753
1754
|
|
|
1754
|
-
declare const ProgressBar: ({ progress, labels }: ProgressBarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1755
|
+
declare const ProgressBar: ({ progress, labels, color }: ProgressBarProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1755
1756
|
|
|
1756
1757
|
type StepProgressIndicatorProps = {
|
|
1757
1758
|
steps: {
|
package/dist/index.esm.js
CHANGED
|
@@ -3920,12 +3920,12 @@ function zO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3920
3920
|
display: flex;
|
|
3921
3921
|
align-items: center;
|
|
3922
3922
|
justify-content: flex-start;
|
|
3923
|
-
`,lN=e=>$e`
|
|
3923
|
+
`,lN=(e,t)=>$e`
|
|
3924
3924
|
height: 100%;
|
|
3925
3925
|
width: ${e}%;
|
|
3926
|
-
background-color: ${ze("primary",500)};
|
|
3926
|
+
background-color: ${t??ze("primary",500)};
|
|
3927
3927
|
transition: width 0.5s ease-in-out;
|
|
3928
|
-
`,cN=({progress:e,labels:t})=>{const
|
|
3928
|
+
`,cN=({progress:e,labels:t,color:n})=>{const r=qm("ProgressBar",t);let o=e;return o>100&&(o=100),o<0&&(o=0),ye("div",{css:aN,role:"progressbar","aria-label":r.progressAriaLabel(o),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o,children:ye("div",{css:lN(o,n)})})},dN=$e`
|
|
3929
3929
|
width: 100%;
|
|
3930
3930
|
display: flex;
|
|
3931
3931
|
align-items: center;
|