@toptal/picasso-notification 2.0.5 → 2.0.6
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-package/src/Notification/Notification.d.ts.map +1 -1
- package/dist-package/src/Notification/Notification.js +3 -1
- package/dist-package/src/Notification/Notification.js.map +1 -1
- package/dist-package/src/Notification/styles.d.ts +1 -1
- package/dist-package/src/Notification/styles.d.ts.map +1 -1
- package/dist-package/src/Notification/styles.js +1 -16
- package/dist-package/src/Notification/styles.js.map +1 -1
- package/package.json +8 -8
- package/src/Notification/Notification.tsx +4 -7
- package/src/Notification/styles.ts +1 -18
- package/src/use-notification/__snapshots__/test.tsx.snap +51 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../src/Notification/Notification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAChF,OAAO,KAAmC,MAAM,OAAO,CAAA;AAMvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAc3D,oBAAY,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE9D,MAAM,WAAW,YACf,SAAQ,aAAa,EACnB,cAAc,CAAC,cAAc,CAAC;IAChC,uCAAuC;IACvC,QAAQ,EAAE,SAAS,CAAA;IACnB,oDAAoD;IACpD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IACxD,oCAAoC;IACpC,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,gDAAgD;IAChD,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAA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 import { Container } from '@toptal/picasso-container';
|
|
|
19
19
|
import { ButtonCircular } from '@toptal/picasso-button';
|
|
20
20
|
import { Typography } from '@toptal/picasso-typography';
|
|
21
21
|
import styles from './styles';
|
|
22
|
-
const renderNotificationCloseButton = ({ onClose,
|
|
22
|
+
const renderNotificationCloseButton = ({ onClose, testIds }) => (React.createElement(ButtonCircular, { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.closeButton, onClick: onClose,
|
|
23
|
+
// TODO: [FX-5219] need to avoid such customization
|
|
24
|
+
className: 'absolute right-[0.5em] top-[0.75em] bg-transparent border-none p-0 h-[1em] hover:bg-transparent active:bg-transparent', icon: React.createElement(CloseMinor16, { color: 'darkGrey' }) }));
|
|
23
25
|
const renderNotificationIcon = ({ icon, variant, classes }) => {
|
|
24
26
|
const iconProps = {
|
|
25
27
|
className: classes === null || classes === void 0 ? void 0 : classes.icon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/Notification/Notification.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,UAAU,MAAM,oCAAoC,CAAA;AAE3D,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,MAAM,GACP,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAEvD,OAAO,MAAM,MAAM,UAAU,CAAA;AA2B7B,MAAM,6BAA6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
|
|
|
1
1
|
import type { Theme } from '@material-ui/core/styles';
|
|
2
|
-
declare const _default: ({ palette: { red, green, yellow, common
|
|
2
|
+
declare const _default: ({ palette: { red, green, yellow, common }, shadows, breakpoints: { down }, sizes: { borderRadius }, }: Theme) => import("@material-ui/styles").StyleRules<{}, "notification" | "notificationShadow" | "roundedBorders" | "notificationRed" | "notificationGreen" | "notificationWhite" | "notificationYellow" | "iconWrapper" | "iconWrapperYellow">;
|
|
3
3
|
export default _default;
|
|
4
4
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Notification/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Notification/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;gIAgClD,KAAK;AALR,wBAyDI"}
|
|
@@ -19,7 +19,7 @@ PicassoProvider.override(({ layout, breakpoints: { down } }) => ({
|
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
}));
|
|
22
|
-
export default ({ palette: { red, green, yellow, common
|
|
22
|
+
export default ({ palette: { red, green, yellow, common }, shadows, breakpoints: { down }, sizes: { borderRadius }, }) => createStyles({
|
|
23
23
|
notification: {
|
|
24
24
|
alignItems: 'start',
|
|
25
25
|
borderRadius: 0,
|
|
@@ -69,20 +69,5 @@ export default ({ palette: { red, green, yellow, common, text }, shadows, breakp
|
|
|
69
69
|
height: '1em',
|
|
70
70
|
marginTop: '2px',
|
|
71
71
|
},
|
|
72
|
-
close: {
|
|
73
|
-
position: 'absolute',
|
|
74
|
-
right: '0.5em',
|
|
75
|
-
top: '0.75em',
|
|
76
|
-
background: 'transparent',
|
|
77
|
-
border: 0,
|
|
78
|
-
padding: 0,
|
|
79
|
-
height: '1em',
|
|
80
|
-
'&:hover': {
|
|
81
|
-
background: 'transparent',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
closeIcon: {
|
|
85
|
-
fill: text.primary,
|
|
86
|
-
},
|
|
87
72
|
});
|
|
88
73
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Notification/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EACL,eAAe,IAAI,WAAW,EAC9B,eAAe,GAChB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAE5C,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,EAAS,EAAE,EAAE,CAAC,CAAC;IACtE,kBAAkB,EAAE;QAClB,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,MAAM,CAAC,YAAY;YAC7B,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,CAAC;YACX,MAAM,EAAE,QAAQ;YAChB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE;gBACtB,QAAQ,EAAE,OAAO;aAClB;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,MAAM;aACd;SACF;KACF;CACF,CAAC,CAAC,CAAA;AAEH,eAAe,CAAC,EACd,OAAO,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Notification/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EACL,eAAe,IAAI,WAAW,EAC9B,eAAe,GAChB,MAAM,0BAA0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QACjB,UAAU,EAAE,MAAM,CAAC,KAAK;QACxB,OAAO,EAAE,sBAAsB;KAChC;IACD,kBAAkB,EAAE;QAClB,UAAU,EAAE,MAAM,CAAC,OAAO;QAC1B,OAAO,EAAE,SAAS,GAAG,CAAC,OAAO,CAAC,EAAE;QAChC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE;YACtB,OAAO,EAAE,OAAO;SACjB;QACD,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE;YACtB,OAAO,EAAE,WAAW;SACrB;KACF;IAED,eAAe;IACf,WAAW,EAAE;QACX,SAAS,EAAE,OAAO;QAClB,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,OAAO;QACjB,MAAM,EAAE,OAAO;KAChB;IACD,iBAAiB,EAAE;QACjB,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,KAAK;KACjB;CACF,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso-notification",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Toptal UI components library - Notification",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@toptal/picasso-button": "
|
|
26
|
-
"@toptal/picasso-container": "1.0.
|
|
27
|
-
"@toptal/picasso-icons": "1.1.
|
|
28
|
-
"@toptal/picasso-shared": "
|
|
29
|
-
"@toptal/picasso-typography": "2.0.
|
|
30
|
-
"@toptal/picasso-utils": "1.0.
|
|
25
|
+
"@toptal/picasso-button": "2.0.0",
|
|
26
|
+
"@toptal/picasso-container": "1.0.3",
|
|
27
|
+
"@toptal/picasso-icons": "1.1.1",
|
|
28
|
+
"@toptal/picasso-shared": "15.0.0",
|
|
29
|
+
"@toptal/picasso-typography": "2.0.1",
|
|
30
|
+
"@toptal/picasso-utils": "1.0.3",
|
|
31
31
|
"classnames": "^2.5.1",
|
|
32
32
|
"notistack": "3.0.1"
|
|
33
33
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@toptal/picasso-provider": "4.2.1",
|
|
49
|
-
"@toptal/picasso-test-utils": "1.1.
|
|
49
|
+
"@toptal/picasso-test-utils": "1.1.1"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
52
|
"dist-package/**",
|
|
@@ -44,16 +44,13 @@ export interface PrivateProps
|
|
|
44
44
|
/** `elevated` and `icon` props are omitted from the public declaration, since they're only for internal use */
|
|
45
45
|
export type PublicProps = Omit<PrivateProps, 'elevated' | 'icon'>
|
|
46
46
|
|
|
47
|
-
const renderNotificationCloseButton = ({
|
|
48
|
-
onClose,
|
|
49
|
-
classes,
|
|
50
|
-
testIds,
|
|
51
|
-
}: PrivateProps) => (
|
|
47
|
+
const renderNotificationCloseButton = ({ onClose, testIds }: PrivateProps) => (
|
|
52
48
|
<ButtonCircular
|
|
53
49
|
data-testid={testIds?.closeButton}
|
|
54
50
|
onClick={onClose}
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
// TODO: [FX-5219] need to avoid such customization
|
|
52
|
+
className='absolute right-[0.5em] top-[0.75em] bg-transparent border-none p-0 h-[1em] hover:bg-transparent active:bg-transparent'
|
|
53
|
+
icon={<CloseMinor16 color='darkGrey' />}
|
|
57
54
|
/>
|
|
58
55
|
)
|
|
59
56
|
|
|
@@ -26,7 +26,7 @@ PicassoProvider.override(({ layout, breakpoints: { down } }: Theme) => ({
|
|
|
26
26
|
}))
|
|
27
27
|
|
|
28
28
|
export default ({
|
|
29
|
-
palette: { red, green, yellow, common
|
|
29
|
+
palette: { red, green, yellow, common },
|
|
30
30
|
shadows,
|
|
31
31
|
breakpoints: { down },
|
|
32
32
|
sizes: { borderRadius },
|
|
@@ -82,21 +82,4 @@ export default ({
|
|
|
82
82
|
height: '1em',
|
|
83
83
|
marginTop: '2px',
|
|
84
84
|
},
|
|
85
|
-
|
|
86
|
-
close: {
|
|
87
|
-
position: 'absolute',
|
|
88
|
-
right: '0.5em',
|
|
89
|
-
top: '0.75em',
|
|
90
|
-
background: 'transparent',
|
|
91
|
-
border: 0,
|
|
92
|
-
padding: 0,
|
|
93
|
-
height: '1em',
|
|
94
|
-
|
|
95
|
-
'&:hover': {
|
|
96
|
-
background: 'transparent',
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
closeIcon: {
|
|
100
|
-
fill: text.primary,
|
|
101
|
-
},
|
|
102
85
|
})
|
|
@@ -6,37 +6,43 @@ exports[`useNotifications error notification render 1`] = `
|
|
|
6
6
|
class="Picasso-root"
|
|
7
7
|
>
|
|
8
8
|
<button
|
|
9
|
-
|
|
9
|
+
aria-disabled="false"
|
|
10
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
10
11
|
data-component-type="button"
|
|
12
|
+
role="button"
|
|
11
13
|
tabindex="0"
|
|
12
14
|
type="button"
|
|
13
15
|
>
|
|
14
16
|
<span
|
|
15
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
17
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
16
18
|
>
|
|
17
19
|
Show Error
|
|
18
20
|
</span>
|
|
19
21
|
</button>
|
|
20
22
|
<button
|
|
21
|
-
|
|
23
|
+
aria-disabled="false"
|
|
24
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
22
25
|
data-component-type="button"
|
|
26
|
+
role="button"
|
|
23
27
|
tabindex="0"
|
|
24
28
|
type="button"
|
|
25
29
|
>
|
|
26
30
|
<span
|
|
27
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
31
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
28
32
|
>
|
|
29
33
|
Show Info
|
|
30
34
|
</span>
|
|
31
35
|
</button>
|
|
32
36
|
<button
|
|
33
|
-
|
|
37
|
+
aria-disabled="false"
|
|
38
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
34
39
|
data-component-type="button"
|
|
40
|
+
role="button"
|
|
35
41
|
tabindex="0"
|
|
36
42
|
type="button"
|
|
37
43
|
>
|
|
38
44
|
<span
|
|
39
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
45
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
40
46
|
>
|
|
41
47
|
Show Success
|
|
42
48
|
</span>
|
|
@@ -85,16 +91,18 @@ exports[`useNotifications error notification render 1`] = `
|
|
|
85
91
|
Error message
|
|
86
92
|
</div>
|
|
87
93
|
<button
|
|
88
|
-
|
|
94
|
+
aria-disabled="false"
|
|
95
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer rounded-full w-[1.5em] text-white visited:text-white focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] absolute right-[0.5em] top-[0.75em] bg-transparent border-none p-0 h-[1em] hover:bg-transparent active:bg-transparent"
|
|
89
96
|
data-component-type="button"
|
|
97
|
+
role="button"
|
|
90
98
|
tabindex="0"
|
|
91
99
|
type="button"
|
|
92
100
|
>
|
|
93
101
|
<span
|
|
94
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
102
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
95
103
|
>
|
|
96
104
|
<svg
|
|
97
|
-
class="PicassoSvgCloseMinor16-root
|
|
105
|
+
class="PicassoSvgCloseMinor16-root text-[1.2em] flex-1 PicassoSvgCloseMinor16-darkGrey"
|
|
98
106
|
style="min-width: 16px; min-height: 16px;"
|
|
99
107
|
viewBox="0 0 16 16"
|
|
100
108
|
>
|
|
@@ -121,37 +129,43 @@ exports[`useNotifications info notification render 1`] = `
|
|
|
121
129
|
class="Picasso-root"
|
|
122
130
|
>
|
|
123
131
|
<button
|
|
124
|
-
|
|
132
|
+
aria-disabled="false"
|
|
133
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
125
134
|
data-component-type="button"
|
|
135
|
+
role="button"
|
|
126
136
|
tabindex="0"
|
|
127
137
|
type="button"
|
|
128
138
|
>
|
|
129
139
|
<span
|
|
130
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
140
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
131
141
|
>
|
|
132
142
|
Show Error
|
|
133
143
|
</span>
|
|
134
144
|
</button>
|
|
135
145
|
<button
|
|
136
|
-
|
|
146
|
+
aria-disabled="false"
|
|
147
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
137
148
|
data-component-type="button"
|
|
149
|
+
role="button"
|
|
138
150
|
tabindex="0"
|
|
139
151
|
type="button"
|
|
140
152
|
>
|
|
141
153
|
<span
|
|
142
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
154
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
143
155
|
>
|
|
144
156
|
Show Info
|
|
145
157
|
</span>
|
|
146
158
|
</button>
|
|
147
159
|
<button
|
|
148
|
-
|
|
160
|
+
aria-disabled="false"
|
|
161
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
149
162
|
data-component-type="button"
|
|
163
|
+
role="button"
|
|
150
164
|
tabindex="0"
|
|
151
165
|
type="button"
|
|
152
166
|
>
|
|
153
167
|
<span
|
|
154
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
168
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
155
169
|
>
|
|
156
170
|
Show Success
|
|
157
171
|
</span>
|
|
@@ -203,16 +217,18 @@ exports[`useNotifications info notification render 1`] = `
|
|
|
203
217
|
Info message
|
|
204
218
|
</div>
|
|
205
219
|
<button
|
|
206
|
-
|
|
220
|
+
aria-disabled="false"
|
|
221
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer rounded-full w-[1.5em] text-white visited:text-white focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] absolute right-[0.5em] top-[0.75em] bg-transparent border-none p-0 h-[1em] hover:bg-transparent active:bg-transparent"
|
|
207
222
|
data-component-type="button"
|
|
223
|
+
role="button"
|
|
208
224
|
tabindex="0"
|
|
209
225
|
type="button"
|
|
210
226
|
>
|
|
211
227
|
<span
|
|
212
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
228
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
213
229
|
>
|
|
214
230
|
<svg
|
|
215
|
-
class="PicassoSvgCloseMinor16-root
|
|
231
|
+
class="PicassoSvgCloseMinor16-root text-[1.2em] flex-1 PicassoSvgCloseMinor16-darkGrey"
|
|
216
232
|
style="min-width: 16px; min-height: 16px;"
|
|
217
233
|
viewBox="0 0 16 16"
|
|
218
234
|
>
|
|
@@ -239,37 +255,43 @@ exports[`useNotifications success notification render 1`] = `
|
|
|
239
255
|
class="Picasso-root"
|
|
240
256
|
>
|
|
241
257
|
<button
|
|
242
|
-
|
|
258
|
+
aria-disabled="false"
|
|
259
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
243
260
|
data-component-type="button"
|
|
261
|
+
role="button"
|
|
244
262
|
tabindex="0"
|
|
245
263
|
type="button"
|
|
246
264
|
>
|
|
247
265
|
<span
|
|
248
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
266
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
249
267
|
>
|
|
250
268
|
Show Error
|
|
251
269
|
</span>
|
|
252
270
|
</button>
|
|
253
271
|
<button
|
|
254
|
-
|
|
272
|
+
aria-disabled="false"
|
|
273
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
255
274
|
data-component-type="button"
|
|
275
|
+
role="button"
|
|
256
276
|
tabindex="0"
|
|
257
277
|
type="button"
|
|
258
278
|
>
|
|
259
279
|
<span
|
|
260
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
280
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
261
281
|
>
|
|
262
282
|
Show Info
|
|
263
283
|
</span>
|
|
264
284
|
</button>
|
|
265
285
|
<button
|
|
266
|
-
|
|
286
|
+
aria-disabled="false"
|
|
287
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
267
288
|
data-component-type="button"
|
|
289
|
+
role="button"
|
|
268
290
|
tabindex="0"
|
|
269
291
|
type="button"
|
|
270
292
|
>
|
|
271
293
|
<span
|
|
272
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
294
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
273
295
|
>
|
|
274
296
|
Show Success
|
|
275
297
|
</span>
|
|
@@ -318,16 +340,18 @@ exports[`useNotifications success notification render 1`] = `
|
|
|
318
340
|
Success message
|
|
319
341
|
</div>
|
|
320
342
|
<button
|
|
321
|
-
|
|
343
|
+
aria-disabled="false"
|
|
344
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer rounded-full w-[1.5em] text-white visited:text-white focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] absolute right-[0.5em] top-[0.75em] bg-transparent border-none p-0 h-[1em] hover:bg-transparent active:bg-transparent"
|
|
322
345
|
data-component-type="button"
|
|
346
|
+
role="button"
|
|
323
347
|
tabindex="0"
|
|
324
348
|
type="button"
|
|
325
349
|
>
|
|
326
350
|
<span
|
|
327
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
351
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
328
352
|
>
|
|
329
353
|
<svg
|
|
330
|
-
class="PicassoSvgCloseMinor16-root
|
|
354
|
+
class="PicassoSvgCloseMinor16-root text-[1.2em] flex-1 PicassoSvgCloseMinor16-darkGrey"
|
|
331
355
|
style="min-width: 16px; min-height: 16px;"
|
|
332
356
|
viewBox="0 0 16 16"
|
|
333
357
|
>
|