@worldresources/wri-design-systems 2.205.1 → 2.205.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 +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
|
@@ -3033,7 +3033,7 @@ function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3033
3033
|
p {
|
|
3034
3034
|
color: ${w("error",900)};
|
|
3035
3035
|
}
|
|
3036
|
-
`,sO=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Kf,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,
|
|
3036
|
+
`,sO=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Kf,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,actionButtonVariant:l="secondary",isButtonRight:c,buttonLeftIcon:d,buttonRightIcon:u,labels:h})=>{const p=Vf("InlineMessage",h);let f=tO;"info-grey"===n?f=nO:"success"===n?f=rO:"warning"===n?f=oO:"error"===n&&(f=iO);const m="error"===n||"warning"===n?"alert":"status",g="alert"===m?"assertive":"polite";return r.jsxs("div",{css:[JT(o,c),f],role:m,"aria-live":g,"aria-roledescription":p.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:XT,children:[i,"string"==typeof e?r.jsx("p",{css:YT(o),children:e}):r.jsx("div",{css:YT(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:QT(o,!!i),children:t}):t?r.jsx("div",{css:eO(o,!!i),children:t}):null]}),a?r.jsx(Bf,{label:a,variant:l,size:"large"===o||"full-width"===o?"default":"small",onClick:s,leftIcon:d,rightIcon:u}):null]})},aO=i.css`
|
|
3037
3037
|
width: 100%;
|
|
3038
3038
|
min-height: calc(${k(1200)} * 12);
|
|
3039
3039
|
background-color: ${w("neutral",100)};
|
package/dist/index.d.ts
CHANGED
|
@@ -1782,6 +1782,7 @@ type InlineMessageProps = {
|
|
|
1782
1782
|
icon?: React.ReactNode;
|
|
1783
1783
|
onActionClick?: VoidFunction;
|
|
1784
1784
|
actionLabel?: string;
|
|
1785
|
+
actionButtonVariant?: 'primary' | 'secondary' | 'borderless' | 'outline' | 'negative';
|
|
1785
1786
|
isButtonRight?: boolean;
|
|
1786
1787
|
buttonLeftIcon?: React.ReactNode;
|
|
1787
1788
|
buttonRightIcon?: React.ReactNode;
|
|
@@ -1789,7 +1790,7 @@ type InlineMessageProps = {
|
|
|
1789
1790
|
labels?: Partial<InlineMessageLabels>;
|
|
1790
1791
|
};
|
|
1791
1792
|
|
|
1792
|
-
declare const InlineMessage: ({ label, caption, variant, size, icon, onActionClick, actionLabel, isButtonRight, buttonLeftIcon, buttonRightIcon, labels, }: InlineMessageProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1793
|
+
declare const InlineMessage: ({ label, caption, variant, size, icon, onActionClick, actionLabel, actionButtonVariant, isButtonRight, buttonLeftIcon, buttonRightIcon, labels, }: InlineMessageProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1793
1794
|
|
|
1794
1795
|
interface AlertProps extends Omit<Alert.RootProps, 'title' | 'variant' | 'width'> {
|
|
1795
1796
|
title?: React.ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -3159,7 +3159,7 @@ function sL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3159
3159
|
p {
|
|
3160
3160
|
color: ${Ie("error",900)};
|
|
3161
3161
|
}
|
|
3162
|
-
`,YA=({label:e,caption:t,variant:n,size:r="large",icon:o=ve(cg,{height:"1rem",width:"1rem"}),onActionClick:i,actionLabel:s,
|
|
3162
|
+
`,YA=({label:e,caption:t,variant:n,size:r="large",icon:o=ve(cg,{height:"1rem",width:"1rem"}),onActionClick:i,actionLabel:s,actionButtonVariant:a="secondary",isButtonRight:l,buttonLeftIcon:c,buttonRightIcon:d,labels:u})=>{const h=tg("InlineMessage",u);let p=KA;"info-grey"===n?p=GA:"success"===n?p=ZA:"warning"===n?p=JA:"error"===n&&(p=XA);const f="error"===n||"warning"===n?"alert":"status",m="alert"===f?"assertive":"polite";return be("div",{css:[jA(r,l),p],role:f,"aria-live":m,"aria-roledescription":h.roleDescription,children:[be("div",{children:[be("div",{css:FA,children:[o,ve("string"==typeof e?"p":"div",{css:qA(r),children:e})]}),t&&"string"==typeof t?ve("p",{css:WA(r,!!o),children:t}):t?ve("div",{css:UA(r,!!o),children:t}):null]}),s?ve(ng,{label:s,variant:a,size:"large"===r||"full-width"===r?"default":"small",onClick:i,leftIcon:c,rightIcon:d}):null]})},QA=ke`
|
|
3163
3163
|
width: 100%;
|
|
3164
3164
|
min-height: calc(${Ve(1200)} * 12);
|
|
3165
3165
|
background-color: ${Ie("neutral",100)};
|