@stack-spot/portal-components 2.3.3 → 2.3.5
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/CHANGELOG.md +14 -0
- package/dist/components/Placeholder.d.ts +3 -1
- package/dist/components/Placeholder.d.ts.map +1 -1
- package/dist/components/Placeholder.js +2 -2
- package/dist/components/Placeholder.js.map +1 -1
- package/dist/components/notification/NotificationItem.d.ts.map +1 -1
- package/dist/components/notification/NotificationItem.js +7 -5
- package/dist/components/notification/NotificationItem.js.map +1 -1
- package/dist/components/notification/NotificationList.d.ts.map +1 -1
- package/dist/components/notification/NotificationList.js +1 -1
- package/dist/components/notification/NotificationList.js.map +1 -1
- package/dist/components/notification/NotificationPlaceholder.d.ts +3 -1
- package/dist/components/notification/NotificationPlaceholder.d.ts.map +1 -1
- package/dist/components/notification/NotificationPlaceholder.js +2 -2
- package/dist/components/notification/NotificationPlaceholder.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Placeholder.tsx +4 -1
- package/src/components/notification/NotificationItem.tsx +25 -15
- package/src/components/notification/NotificationList.tsx +6 -2
- package/src/components/notification/NotificationPlaceholder.tsx +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.3.5](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.3.4...portal-components@v2.3.5) (2024-08-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* accessibility 421 ([6def5d9](https://github.com/stack-spot/portal-commons/commit/6def5d99f5b0f5cb50cb764ae117f2598640f14a))
|
|
9
|
+
|
|
10
|
+
## [2.3.4](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.3.3...portal-components@v2.3.4) (2024-08-19)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* accessibility 405 botao visualizar ([7fd0d75](https://github.com/stack-spot/portal-commons/commit/7fd0d75fd21a00b1e197f643934ca4c0abbef0a3))
|
|
16
|
+
|
|
3
17
|
## [2.3.3](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.3.2...portal-components@v2.3.3) (2024-08-19)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { AsProp } from '@citric/core/dist/forward-ref-as.js';
|
|
2
3
|
import { SxProperties } from '@citric/core/dist/sx.js';
|
|
3
4
|
interface Props {
|
|
4
5
|
title?: string;
|
|
@@ -14,8 +15,9 @@ interface Props {
|
|
|
14
15
|
}
|
|
15
16
|
interface PropsCallToAction extends Props {
|
|
16
17
|
subDescription?: string;
|
|
18
|
+
titleAs?: AsProp;
|
|
17
19
|
}
|
|
18
20
|
export declare const Placeholder: ({ title, description, button, img, fullWidth, show, sx, style, className }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
-
export declare const PlaceholderCallToAction: ({ title, description, subDescription, img, button, fullWidth, show, sx, sxCard, style, className, }: PropsCallToAction) => import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
export declare const PlaceholderCallToAction: ({ title, description, subDescription, img, button, fullWidth, show, sx, sxCard, style, className, titleAs, }: PropsCallToAction) => import("react/jsx-runtime").JSX.Element | null;
|
|
20
22
|
export {};
|
|
21
23
|
//# sourceMappingURL=Placeholder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/components/Placeholder.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,iBAAkB,SAAQ,KAAK;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/components/Placeholder.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,iBAAkB,SAAQ,KAAK;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,+EAAuF,KAAK,mDAsBnH,CAAA;AAED,eAAO,MAAM,uBAAuB,iHAajC,iBAAiB,mDA4BnB,CAAA"}
|
|
@@ -8,10 +8,10 @@ export const Placeholder = ({ title, description, button, img, fullWidth, show =
|
|
|
8
8
|
}
|
|
9
9
|
return (_jsx(Card, { sx: { ...(fullWidth ? { w: '100%' } : {}) }, style: style, className: className, children: _jsxs(CardContent, { as: Flex, py: 27, justifyContent: "center", flexDirection: "column", alignItems: "center", sx: sx, children: [img ?? _jsx(GenericPlaceholder, { style: { width: '184px', height: '104px' } }), title && _jsx(Text, { as: "label", appearance: "h4", mb: "3", pt: 5, children: title }), _jsx(Text, { mb: "3", appearance: "body2", colorScheme: "light.700", children: description }), button] }) }));
|
|
10
10
|
};
|
|
11
|
-
export const PlaceholderCallToAction = ({ title, description, subDescription, img, button, fullWidth, show = true, sx, sxCard, style, className, }) => {
|
|
11
|
+
export const PlaceholderCallToAction = ({ title, description, subDescription, img, button, fullWidth, show = true, sx, sxCard, style, className, titleAs, }) => {
|
|
12
12
|
if (!show) {
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
|
-
return (_jsx(Card, { sx: { w: fullWidth ? '100%' : 'auto', bg: 'transparent', ...sxCard }, style: style, className: className, children: _jsxs(CardContent, { as: Flex, alignItems: "center", justifyContent: "center", py: 15, sx: { gap: '92px', ...sx }, children: [img ?? _jsx(GenericPlaceholder, { style: { width: '184px', height: '104px' } }), _jsxs(Box, { children: [title && _jsx(Text, { appearance: "h4", mb: "3", "aria-live": "assertive", children: title }), _jsx(Text, { mb: "3", appearance: "body2", colorScheme: "light.700", children: description }), _jsx(Text, { mb: "3", appearance: "body2", colorScheme: "light.700", children: subDescription }), button] })] }) }));
|
|
15
|
+
return (_jsx(Card, { sx: { w: fullWidth ? '100%' : 'auto', bg: 'transparent', ...sxCard }, style: style, className: className, children: _jsxs(CardContent, { as: Flex, alignItems: "center", justifyContent: "center", py: 15, sx: { gap: '92px', ...sx }, children: [img ?? _jsx(GenericPlaceholder, { style: { width: '184px', height: '104px' } }), _jsxs(Box, { children: [title && _jsx(Text, { as: titleAs, appearance: "h4", mb: "3", "aria-live": "assertive", children: title }), _jsx(Text, { mb: "3", appearance: "body2", colorScheme: "light.700", children: description }), _jsx(Text, { mb: "3", appearance: "body2", colorScheme: "light.700", children: subDescription }), button] })] }) }));
|
|
16
16
|
};
|
|
17
17
|
//# sourceMappingURL=Placeholder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../../src/components/Placeholder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"Placeholder.js","sourceRoot":"","sources":["../../src/components/Placeholder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAG9C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAoB3C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAS,EAAE,EAAE;IACtH,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,YACnF,MAAC,WAAW,IAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,cAAc,EAAC,QAAQ,EAAC,aAAa,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,EAAE,EAAE,EAAE,aACrG,GAAG,IAAI,KAAC,kBAAkB,IAAC,KAAK,EA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AAC,IAAI,EAAC,EAAE,EAAC,GAAG,eAAW,WAAW,YACtE,KAAK,GACD,EAEP,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,EAAC,UAAU,EAAC,OAAO,EAAC,WAAW,EAAC,WAAW,YACpD,WAAW,GACP,EAEP,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,EAAC,UAAU,EAAC,OAAO,EAAC,WAAW,EAAC,WAAW,YACpD,cAAc,GACV,EAEN,MAAM,IACH,IACM,GACT,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationItem.d.ts","sourceRoot":"","sources":["../../../src/components/notification/NotificationItem.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAe/C,UAAU,KAAK;IACb,YAAY,EAAE,qBAAqB,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IAEnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;
|
|
1
|
+
{"version":3,"file":"NotificationItem.d.ts","sourceRoot":"","sources":["../../../src/components/notification/NotificationItem.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAe/C,UAAU,KAAK;IACb,YAAY,EAAE,qBAAqB,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IAEnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAoHD,UAAU,+BAAgC,SAAQ,KAAK;IACrD;;;;;;;;;;OAUG;IACH,qBAAqB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/F;AAED,UAAU,wBAAyB,SAAQ,KAAK;IAC9C;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,KAAK,qBAAqB,GAAG,+BAA+B,GAAG,wBAAwB,CAAA;AAEvF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,0CAA2C,qBAAqB,4CA0C5F,CAAA"}
|
|
@@ -58,10 +58,10 @@ const NotificationContent = ({ notification, isSummary }) => {
|
|
|
58
58
|
*
|
|
59
59
|
* @param props the component's props {@link NotificationFooterProps}.
|
|
60
60
|
*/
|
|
61
|
-
const NotificationFooter = ({ actionURL, onClickAction }) => {
|
|
61
|
+
const NotificationFooter = ({ actionURL, onClickAction, title }) => {
|
|
62
62
|
const t = useTranslate(dictionary);
|
|
63
63
|
const Link = useAnchorTag();
|
|
64
|
-
return (_jsx(Flex, { mt: "5", children: _jsx(Button, { size: "sm", colorScheme: "inverse", onClick: onClickAction, as: Link, href: actionURL, "aria-label": t.
|
|
64
|
+
return (_jsx(Flex, { mt: "5", children: _jsx(Button, { size: "sm", colorScheme: "inverse", onClick: onClickAction, as: Link, href: actionURL, "aria-label": t.viewNotification.replace('%s', title || t.view), children: _jsx(Text, { colorScheme: "inverse.contrastText", children: t.view }) }) }));
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
67
|
* NotificationItem component that renders a notification item.
|
|
@@ -85,13 +85,12 @@ export const NotificationItem = ({ notification, isSummary, ...props }) => {
|
|
|
85
85
|
else
|
|
86
86
|
props.onClickMarkReadUnread(true, 'callToAction');
|
|
87
87
|
}
|
|
88
|
-
return (_jsxs(Box, { sx: { position: 'relative' }, children: [_jsxs(Flex, { bg: "light.400", p: "3 3 3 5", r: "xs", flexDirection: "column", w: "100%", sx: styles.item(statusToColor[notification.criticality], notification.committed), children: [_jsx(NotificationHeader, { title: notification.title, isSummary: isSummary }), _jsx(NotificationContent, { notification: notification, isSummary: isSummary }), notification.call_to_action && _jsx(NotificationFooter, { actionURL: notification.call_to_action, onClickAction: clickAction })] }), _jsx(Box, { sx: { position: 'absolute', top: '8px', right: '8px' }, children: _jsx(Tooltip, { text: notification.committed ? t.committed : t.uncommitted, position: "left", sx: style.tooltip, children: notification.committed
|
|
88
|
+
return (_jsxs(Box, { sx: { position: 'relative' }, children: [_jsxs(Flex, { bg: "light.400", p: "3 3 3 5", r: "xs", flexDirection: "column", w: "100%", sx: styles.item(statusToColor[notification.criticality], notification.committed), children: [_jsx(NotificationHeader, { title: notification.title, isSummary: isSummary }), _jsx(NotificationContent, { notification: notification, isSummary: isSummary }), notification.call_to_action && _jsx(NotificationFooter, { actionURL: notification.call_to_action, onClickAction: clickAction, title: notification.title })] }), _jsx(Box, { sx: { position: 'absolute', top: '8px', right: '8px' }, children: _jsx(Tooltip, { text: notification.committed ? t.committed : t.uncommitted, position: "left", sx: style.tooltip, children: notification.committed
|
|
89
89
|
? _jsx(IconBox, { role: "img", "aria-label": t.committed, size: "xs", style: { margin: '4px', opacity: 0.5 }, children: _jsx(EnvelopeOpen, {}) })
|
|
90
90
|
: (_jsx(IconButton, { "aria-label": t.uncommitted, onClick: commit, children: _jsx(IconBox, { size: "xs", children: _jsx(Envelope, {}) }) })) }) })] }));
|
|
91
91
|
};
|
|
92
92
|
const dictionary = {
|
|
93
93
|
en: {
|
|
94
|
-
takeMeThere: 'Take me there',
|
|
95
94
|
ACCOUNT: 'Account',
|
|
96
95
|
WORKSPACE: 'Workspace',
|
|
97
96
|
STUDIO: 'Studio',
|
|
@@ -99,9 +98,10 @@ const dictionary = {
|
|
|
99
98
|
today: 'today',
|
|
100
99
|
committed: 'This notification has been read.',
|
|
101
100
|
uncommitted: 'This notification has not been read yet. Click to mark as read.',
|
|
101
|
+
view: 'View',
|
|
102
|
+
viewNotification: 'View notification %s',
|
|
102
103
|
},
|
|
103
104
|
pt: {
|
|
104
|
-
takeMeThere: 'Leve-me para lá',
|
|
105
105
|
ACCOUNT: 'Conta',
|
|
106
106
|
WORKSPACE: 'Workspace',
|
|
107
107
|
STUDIO: 'Estúdio',
|
|
@@ -109,6 +109,8 @@ const dictionary = {
|
|
|
109
109
|
today: 'hoje',
|
|
110
110
|
committed: 'Esta notificação já foi lida.',
|
|
111
111
|
uncommitted: 'Esta notificação ainda não foi lida. Clique para marcar como lida.',
|
|
112
|
+
view: 'Visualizar',
|
|
113
|
+
viewNotification: 'Visualizar notificação %s',
|
|
112
114
|
},
|
|
113
115
|
};
|
|
114
116
|
//# sourceMappingURL=NotificationItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationItem.js","sourceRoot":"","sources":["../../../src/components/notification/NotificationItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAiD,IAAI,EAAE,MAAM,cAAc,CAAA;AAC9G,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,CAAC,KAAa,EAAE,MAAe,EAAE,EAAE,CAAC,CAAC;QACzC,UAAU,EAAE,aAAa,KAAK,EAAE;QAChC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KAC1B,CAAC;CACgD,CAAA;AAEpD,MAAM,aAAa,GAAkD;IACnE,GAAG,EAAE,aAAa;IAClB,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,YAAY;CACnB,CAAA;AASD,MAAM,KAAK,GAAW;IACpB,OAAO,EAAE;QACP,UAAU,
|
|
1
|
+
{"version":3,"file":"NotificationItem.js","sourceRo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,CAAC,CAAC,KAAC,OAAO,IAAC,IAAI,EAAC,KAAK,gBAAa,CAAC,CAAC,SAAS,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,YAAE,KAAC,YAAY,KAAG,GAAU;wBAC3H,CAAC,CAAC,CACA,KAAC,UAAU,kBAAa,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,YACpD,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,YAAC,KAAC,QAAQ,KAAG,GAAU,GAC9B,CACd,GAEK,GACN,IACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,WAAW;QACtB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,UAAU;QACnB,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,kCAAkC;QAC7C,WAAW,EAAE,iEAAiE;QAC9E,IAAI,EAAE,MAAM;QACZ,gBAAgB,EAAE,sBAAsB;KACzC;IACD,EAAE,EAAE;QACF,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,WAAW;QACtB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,+BAA+B;QAC1C,WAAW,EAAE,oEAAoE;QACjF,IAAI,EAAE,YAAY;QAClB,gBAAgB,EAAE,2BAA2B;KAC9C;CACmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationList.d.ts","sourceRoot":"","sources":["../../../src/components/notification/NotificationList.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAErE,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC;;OAEG;IACH,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuED,eAAO,MAAM,gBAAgB,4GACsF,qBAAqB,
|
|
1
|
+
{"version":3,"file":"NotificationList.d.ts","sourceRoot":"","sources":["../../../src/components/notification/NotificationList.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAErE,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC;;OAEG;IACH,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuED,eAAO,MAAM,gBAAgB,4GACsF,qBAAqB,oDAoDvI,CAAA"}
|
|
@@ -77,6 +77,6 @@ export const NotificationList = ({ items, compact = false, onCommit, onClickActi
|
|
|
77
77
|
// https://github.com/ankeetmaini/react-infinite-scroll-component/blob/master/src/index.tsx#L168
|
|
78
78
|
scrollableTarget: infiniteScroll?.scrollableTarget, children: _jsx(Flex, { sx: { gap: '24px' }, flexDirection: "column", children: groups.map((group) => compact
|
|
79
79
|
? renderNotifications(group.items, 'compact')
|
|
80
|
-
: (_jsx(TimelineSection, { month: group.month, day: group.day, children: renderNotifications(group.items) }, `${group.day}-${group.month}-${group.year}`))) }) })) : _jsx(NotificationPlaceholder, { isSearch: showEmptySearch, className: listToClass(['placeholder', compact && 'compact']) }), _jsx("div", { className: "loading-mask" })] }));
|
|
80
|
+
: (_jsx(TimelineSection, { month: group.month, day: group.day, children: renderNotifications(group.items) }, `${group.day}-${group.month}-${group.year}`))) }) })) : _jsx(NotificationPlaceholder, { isSearch: showEmptySearch, className: listToClass(['placeholder', compact && 'compact']), titleAs: "p" }), _jsx("div", { className: "loading-mask" })] }));
|
|
81
81
|
};
|
|
82
82
|
//# sourceMappingURL=NotificationList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationList.js","sourceRoot":"","sources":["../../../src/components/notification/NotificationList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA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AAC,aAC/E,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACd,KAAC,cAAc,IACb,UAAU,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,EAC7B,IAAI,EAAE,cAAc,EAAE,QAAQ,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAC7C,OAAO,EAAE,cAAc,EAAE,OAAO,IAAI,KAAK;gBACzC,2HAA2H;gBAC3H,sCAAsC;gBACtC,iGAAiG;gBACjG,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,YAElD,KAAC,IAAI,IAAC,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,aAAa,EAAC,QAAQ,YAC9C,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO;wBAC5B,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC;wBAC7C,CAAC,CAAC,CACA,KAAC,eAAe,IAAmD,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,YAClG,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,IADb,GAAG,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAE/C,CACnB,CACF,GACI,GACQ,CAClB,CAAC,CAAC,CAAC,KAAC,uBAAuB,IAC1B,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,WAAW,CAAC,CAAC,aAAa,EAAE,OAAO,IAAI,SAAS,CAAC,CAAC,EAC7D,OAAO,EAAC,GAAG,GACX,EACF,cAAK,SAAS,EAAC,cAAc,GAAO,IAC1B,CACb,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { AsProp } from '@citric/core/dist/forward-ref-as.js';
|
|
2
3
|
import { SxProperties } from '@citric/core/dist/sx.js';
|
|
3
4
|
interface Props {
|
|
4
5
|
isSearch?: boolean;
|
|
@@ -6,7 +7,8 @@ interface Props {
|
|
|
6
7
|
className?: string;
|
|
7
8
|
sx?: SxProperties;
|
|
8
9
|
sxCard?: SxProperties;
|
|
10
|
+
titleAs?: AsProp;
|
|
9
11
|
}
|
|
10
|
-
export declare const NotificationPlaceholder: ({ isSearch, sx, sxCard, className, style }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const NotificationPlaceholder: ({ isSearch, sx, sxCard, className, style, titleAs }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export {};
|
|
12
14
|
//# sourceMappingURL=NotificationPlaceholder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/notification/NotificationPlaceholder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/notification/NotificationPlaceholder.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,YAAY,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,uBAAuB,wDAAyD,KAAK,4CAajG,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslate } from '@stack-spot/portal-translate';
|
|
3
3
|
import { PlaceholderCallToAction } from '../Placeholder.js';
|
|
4
|
-
export const NotificationPlaceholder = ({ isSearch, sx, sxCard, className, style }) => {
|
|
4
|
+
export const NotificationPlaceholder = ({ isSearch, sx, sxCard, className, style, titleAs }) => {
|
|
5
5
|
const t = useTranslate(dictionary);
|
|
6
|
-
return _jsx(PlaceholderCallToAction, { title: isSearch ? t.placeholderSearchTitle : t.placeholderTitle, description: isSearch ? t.placeholderSearchDescription : t.placeholderDescription, fullWidth: true, sx: sx, sxCard: sxCard, className: className, style: style });
|
|
6
|
+
return _jsx(PlaceholderCallToAction, { title: isSearch ? t.placeholderSearchTitle : t.placeholderTitle, description: isSearch ? t.placeholderSearchDescription : t.placeholderDescription, fullWidth: true, sx: sx, sxCard: sxCard, className: className, style: style, titleAs: titleAs });
|
|
7
7
|
};
|
|
8
8
|
const dictionary = {
|
|
9
9
|
en: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPlaceholder.js","sourceRoot":"","sources":["../../../src/components/notification/NotificationPlaceholder.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"NotificationPlaceholder.js","sourceRoot":"","sources":["../../../src/components/notification/NotificationPlaceholder.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAWxD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAS,EAAE,EAAE;IACpG,MAAM,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA;IAElC,OAAO,KAAC,uBAAuB,IAC7B,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAC/D,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB,EACjF,SAAS,QACT,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,GAChB,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,gBAAgB,EAAE,kBAAkB;QACpC,sBAAsB,EAAE,sCAAsC;QAC9D,sBAAsB,EAAE,wBAAwB;QAChD,4BAA4B,EAAE,wDAAwD;KACvF;IACD,EAAE,EAAE;QACF,gBAAgB,EAAE,qBAAqB;QACvC,sBAAsB,EAAE,oCAAoC;QAC5D,sBAAsB,EAAE,gCAAgC;QACxD,4BAA4B,EAAE,uDAAuD;KACtF;CACmB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Box, Flex, Text } from '@citric/core'
|
|
2
|
+
import { AsProp } from '@citric/core/dist/forward-ref-as'
|
|
2
3
|
import { SxProperties } from '@citric/core/dist/sx'
|
|
3
4
|
import { Card, CardContent } from '@citric/ui'
|
|
4
5
|
import { GenericPlaceholder } from '../svg'
|
|
@@ -18,6 +19,7 @@ interface Props {
|
|
|
18
19
|
|
|
19
20
|
interface PropsCallToAction extends Props {
|
|
20
21
|
subDescription?: string,
|
|
22
|
+
titleAs?: AsProp,
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export const Placeholder = ({ title, description, button, img, fullWidth, show = true, sx, style, className }: Props) => {
|
|
@@ -56,6 +58,7 @@ export const PlaceholderCallToAction = ({
|
|
|
56
58
|
sxCard,
|
|
57
59
|
style,
|
|
58
60
|
className,
|
|
61
|
+
titleAs,
|
|
59
62
|
}: PropsCallToAction) => {
|
|
60
63
|
if (!show) {
|
|
61
64
|
return null
|
|
@@ -67,7 +70,7 @@ export const PlaceholderCallToAction = ({
|
|
|
67
70
|
{img ?? <GenericPlaceholder style={{ width: '184px', height: '104px' }} />}
|
|
68
71
|
|
|
69
72
|
<Box>
|
|
70
|
-
{title && <Text appearance="h4" mb="3" aria-live="assertive">
|
|
73
|
+
{title && <Text as={titleAs} appearance="h4" mb="3" aria-live="assertive">
|
|
71
74
|
{title}
|
|
72
75
|
</Text>}
|
|
73
76
|
|
|
@@ -28,9 +28,9 @@ interface Props {
|
|
|
28
28
|
id?: string,
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const style: Styles = {
|
|
31
|
+
const style: Styles = {
|
|
32
32
|
tooltip: {
|
|
33
|
-
'&::after':{
|
|
33
|
+
'&::after': {
|
|
34
34
|
top: '25%',
|
|
35
35
|
},
|
|
36
36
|
},
|
|
@@ -82,25 +82,25 @@ const NotificationContent = ({ notification, isSummary }: Props) => {
|
|
|
82
82
|
{t[notification.context]}
|
|
83
83
|
</Text>
|
|
84
84
|
<Text appearance="microtext1" colorScheme="light.700" mx="2">
|
|
85
|
-
|
|
85
|
+
•
|
|
86
86
|
</Text>
|
|
87
87
|
{!isSummary && <>
|
|
88
88
|
<Text appearance="microtext1" colorScheme="light.700">
|
|
89
89
|
{formatDate(notification.trigger_at)}
|
|
90
90
|
</Text>
|
|
91
91
|
<Text appearance="microtext1" colorScheme="light.700" mx="2">
|
|
92
|
-
|
|
92
|
+
•
|
|
93
93
|
</Text>
|
|
94
94
|
</>}
|
|
95
95
|
<Text appearance="microtext1" colorScheme="light.700">
|
|
96
|
-
{daysAgo > 0 ? daysAgo + ' '+ t.daysAgo : t.today
|
|
96
|
+
{daysAgo > 0 ? daysAgo + ' ' + t.daysAgo : t.today}
|
|
97
97
|
</Text>
|
|
98
98
|
</Flex>
|
|
99
99
|
</>
|
|
100
100
|
)
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
interface NotificationFooterProps
|
|
103
|
+
interface NotificationFooterProps {
|
|
104
104
|
/**
|
|
105
105
|
* The URL to open when the action button is clicked.
|
|
106
106
|
*/
|
|
@@ -109,6 +109,10 @@ interface NotificationFooterProps {
|
|
|
109
109
|
* Function to call when the user clicks the action button.
|
|
110
110
|
*/
|
|
111
111
|
onClickAction: () => void,
|
|
112
|
+
/**
|
|
113
|
+
* Notification title
|
|
114
|
+
*/
|
|
115
|
+
title?: string,
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
/**
|
|
@@ -116,10 +120,10 @@ interface NotificationFooterProps {
|
|
|
116
120
|
*
|
|
117
121
|
* @param props the component's props {@link NotificationFooterProps}.
|
|
118
122
|
*/
|
|
119
|
-
const NotificationFooter = ({ actionURL, onClickAction }: NotificationFooterProps) => {
|
|
123
|
+
const NotificationFooter = ({ actionURL, onClickAction, title }: NotificationFooterProps) => {
|
|
120
124
|
const t = useTranslate(dictionary)
|
|
121
125
|
const Link = useAnchorTag()
|
|
122
|
-
|
|
126
|
+
|
|
123
127
|
return (
|
|
124
128
|
<Flex mt="5">
|
|
125
129
|
<Button
|
|
@@ -128,10 +132,10 @@ const NotificationFooter = ({ actionURL, onClickAction }: NotificationFooterProp
|
|
|
128
132
|
onClick={onClickAction}
|
|
129
133
|
as={Link}
|
|
130
134
|
href={actionURL}
|
|
131
|
-
aria-label={t.
|
|
135
|
+
aria-label={t.viewNotification.replace('%s', title || t.view)}
|
|
132
136
|
>
|
|
133
137
|
<Text colorScheme="inverse.contrastText">
|
|
134
|
-
{t.
|
|
138
|
+
{t.view}
|
|
135
139
|
</Text>
|
|
136
140
|
</Button>
|
|
137
141
|
</Flex>
|
|
@@ -189,21 +193,25 @@ export const NotificationItem = ({ notification, isSummary, ...props }: Notifica
|
|
|
189
193
|
}
|
|
190
194
|
else props.onClickMarkReadUnread(true, 'callToAction')
|
|
191
195
|
}
|
|
192
|
-
|
|
196
|
+
|
|
193
197
|
return (
|
|
194
198
|
<Box sx={{ position: 'relative' }}>
|
|
195
199
|
<Flex bg="light.400" p="3 3 3 5" r="xs"
|
|
196
200
|
flexDirection="column" w="100%" sx={styles.item(statusToColor[notification.criticality], notification.committed)}>
|
|
197
201
|
<NotificationHeader title={notification.title} isSummary={isSummary} />
|
|
198
202
|
<NotificationContent notification={notification} isSummary={isSummary} />
|
|
199
|
-
{notification.call_to_action && <NotificationFooter
|
|
203
|
+
{notification.call_to_action && <NotificationFooter
|
|
204
|
+
actionURL={notification.call_to_action}
|
|
205
|
+
onClickAction={clickAction}
|
|
206
|
+
title={notification.title}
|
|
207
|
+
/>}
|
|
200
208
|
</Flex>
|
|
201
209
|
<Box sx={{ position: 'absolute', top: '8px', right: '8px' }}>
|
|
202
210
|
<Tooltip text={notification.committed ? t.committed : t.uncommitted} position="left" sx={style.tooltip}>
|
|
203
211
|
{notification.committed
|
|
204
212
|
? <IconBox role="img" aria-label={t.committed} size="xs" style={{ margin: '4px', opacity: 0.5 }}><EnvelopeOpen /></IconBox>
|
|
205
213
|
: (
|
|
206
|
-
<IconButton aria-label={t.uncommitted} onClick={commit}>
|
|
214
|
+
<IconButton aria-label={t.uncommitted} onClick={commit}>
|
|
207
215
|
<IconBox size="xs"><Envelope /></IconBox>
|
|
208
216
|
</IconButton>
|
|
209
217
|
)
|
|
@@ -216,7 +224,6 @@ export const NotificationItem = ({ notification, isSummary, ...props }: Notifica
|
|
|
216
224
|
|
|
217
225
|
const dictionary = {
|
|
218
226
|
en: {
|
|
219
|
-
takeMeThere: 'Take me there',
|
|
220
227
|
ACCOUNT: 'Account',
|
|
221
228
|
WORKSPACE: 'Workspace',
|
|
222
229
|
STUDIO: 'Studio',
|
|
@@ -224,9 +231,10 @@ const dictionary = {
|
|
|
224
231
|
today: 'today',
|
|
225
232
|
committed: 'This notification has been read.',
|
|
226
233
|
uncommitted: 'This notification has not been read yet. Click to mark as read.',
|
|
234
|
+
view: 'View',
|
|
235
|
+
viewNotification: 'View notification %s',
|
|
227
236
|
},
|
|
228
237
|
pt: {
|
|
229
|
-
takeMeThere: 'Leve-me para lá',
|
|
230
238
|
ACCOUNT: 'Conta',
|
|
231
239
|
WORKSPACE: 'Workspace',
|
|
232
240
|
STUDIO: 'Estúdio',
|
|
@@ -234,5 +242,7 @@ const dictionary = {
|
|
|
234
242
|
today: 'hoje',
|
|
235
243
|
committed: 'Esta notificação já foi lida.',
|
|
236
244
|
uncommitted: 'Esta notificação ainda não foi lida. Clique para marcar como lida.',
|
|
245
|
+
view: 'Visualizar',
|
|
246
|
+
viewNotification: 'Visualizar notificação %s',
|
|
237
247
|
},
|
|
238
248
|
} satisfies Dictionary
|
|
@@ -142,7 +142,7 @@ export const NotificationList = (
|
|
|
142
142
|
{items.length ? (
|
|
143
143
|
<InfiniteScroll
|
|
144
144
|
dataLength={items.length || 0}
|
|
145
|
-
next={infiniteScroll?.loadMore ?? (() => {})}
|
|
145
|
+
next={infiniteScroll?.loadMore ?? (() => { })}
|
|
146
146
|
hasMore={infiniteScroll?.hasMore ?? false}
|
|
147
147
|
// @ts-ignore: the library is wrongly typed and abandoned, meaning, it will never be fixed. The source code clearly accepts
|
|
148
148
|
// HTMLElements as scrollable targets:
|
|
@@ -160,7 +160,11 @@ export const NotificationList = (
|
|
|
160
160
|
)}
|
|
161
161
|
</Flex>
|
|
162
162
|
</InfiniteScroll>
|
|
163
|
-
) : <NotificationPlaceholder
|
|
163
|
+
) : <NotificationPlaceholder
|
|
164
|
+
isSearch={showEmptySearch}
|
|
165
|
+
className={listToClass(['placeholder', compact && 'compact'])}
|
|
166
|
+
titleAs="p"
|
|
167
|
+
/>}
|
|
164
168
|
<div className="loading-mask"></div>
|
|
165
169
|
</StyledBox>
|
|
166
170
|
)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AsProp } from '@citric/core/dist/forward-ref-as'
|
|
1
2
|
import { SxProperties } from '@citric/core/dist/sx'
|
|
2
3
|
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
3
4
|
import { PlaceholderCallToAction } from '../Placeholder'
|
|
@@ -8,9 +9,10 @@ interface Props {
|
|
|
8
9
|
className?: string,
|
|
9
10
|
sx?: SxProperties,
|
|
10
11
|
sxCard?: SxProperties,
|
|
12
|
+
titleAs?: AsProp,
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
export const NotificationPlaceholder = ({ isSearch, sx, sxCard, className, style }: Props) => {
|
|
15
|
+
export const NotificationPlaceholder = ({ isSearch, sx, sxCard, className, style, titleAs }: Props) => {
|
|
14
16
|
const t = useTranslate(dictionary)
|
|
15
17
|
|
|
16
18
|
return <PlaceholderCallToAction
|
|
@@ -21,6 +23,7 @@ export const NotificationPlaceholder = ({ isSearch, sx, sxCard, className, style
|
|
|
21
23
|
sxCard={sxCard}
|
|
22
24
|
className={className}
|
|
23
25
|
style={style}
|
|
26
|
+
titleAs={titleAs}
|
|
24
27
|
/>
|
|
25
28
|
}
|
|
26
29
|
|