@appquality/unguess-design-system 2.12.84 → 2.12.86
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 +25 -0
- package/build/index.js +26 -24
- package/build/stories/notifications/index.d.ts +2 -1
- package/build/stories/profile-modal/_types.d.ts +2 -0
- package/build/stories/profile-modal/helpMenuItem.d.ts +2 -0
- package/build/stories/theme/components.d.ts +4 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
# v2.12.86 (Mon May 08 2023)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Develop [#235](https://github.com/AppQuality/unguess-design-system/pull/235) ([@marcbon](https://github.com/marcbon))
|
|
6
|
+
- 🚀 feat(profile-modal): add onCopyEmail and chatSupport props to UserMenuArgs [#234](https://github.com/AppQuality/unguess-design-system/pull/234) ([@marcbon](https://github.com/marcbon))
|
|
7
|
+
|
|
8
|
+
#### Authors: 1
|
|
9
|
+
|
|
10
|
+
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# v2.12.85 (Wed May 03 2023)
|
|
15
|
+
|
|
16
|
+
#### 🐛 Bug Fix
|
|
17
|
+
|
|
18
|
+
- fix(toast): add props with children [#233](https://github.com/AppQuality/unguess-design-system/pull/233) ([@cannarocks](https://github.com/cannarocks))
|
|
19
|
+
|
|
20
|
+
#### Authors: 1
|
|
21
|
+
|
|
22
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
1
26
|
# v2.12.84 (Tue May 02 2023)
|
|
2
27
|
|
|
3
28
|
#### 🐛 Bug Fix
|
package/build/index.js
CHANGED
|
@@ -277,33 +277,28 @@ const colors = Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.colors
|
|
|
277
277
|
|
|
278
278
|
var _a, _b, _c, _d, _e, _f, _g$8, _h;
|
|
279
279
|
const components = Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.components), { chrome: Object.assign(Object.assign({}, (_a = reactTheming.DEFAULT_THEME.components) === null || _a === void 0 ? void 0 : _a.chrome), { header: Object.assign(Object.assign({}, (_c = (_b = reactTheming.DEFAULT_THEME.components) === null || _b === void 0 ? void 0 : _b.chrome) === null || _c === void 0 ? void 0 : _c.header), { height: "64px" }), nav: Object.assign(Object.assign({}, (_e = (_d = reactTheming.DEFAULT_THEME.components) === null || _d === void 0 ? void 0 : _d.chrome) === null || _e === void 0 ? void 0 : _e.nav), { openWidth: 240, closedWidth: 36, workspaceDropdownWidth: 192 }) }), notification: Object.assign(Object.assign({}, (_f = reactTheming.DEFAULT_THEME.components) === null || _f === void 0 ? void 0 : _f.notification), { card: Object.assign(Object.assign({}, (_h = (_g$8 = reactTheming.DEFAULT_THEME.components) === null || _g$8 === void 0 ? void 0 : _g$8.notification) === null || _h === void 0 ? void 0 : _h.well), { padding: "16px" }) }), "notifications.notification": ({ type, isPrimary, }) => {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
const svgCss = {
|
|
281
|
+
marginTop: "-1px",
|
|
282
|
+
};
|
|
283
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (type === "success" &&
|
|
283
284
|
isPrimary && {
|
|
284
285
|
backgroundColor: palette.green[700],
|
|
285
|
-
svg: {
|
|
286
|
-
color: palette.white,
|
|
287
|
-
},
|
|
286
|
+
svg: Object.assign(Object.assign({}, svgCss), { color: palette.white }),
|
|
288
287
|
})), (type === "warning" &&
|
|
289
288
|
isPrimary && {
|
|
290
289
|
backgroundColor: palette.yellow[700],
|
|
291
|
-
svg: {
|
|
292
|
-
color: palette.white,
|
|
293
|
-
},
|
|
290
|
+
svg: Object.assign(Object.assign({}, svgCss), { color: palette.white }),
|
|
294
291
|
})), (type === "error" &&
|
|
295
292
|
isPrimary && {
|
|
296
293
|
backgroundColor: palette.red[700],
|
|
297
|
-
svg: {
|
|
298
|
-
color: palette.white,
|
|
299
|
-
},
|
|
294
|
+
svg: Object.assign(Object.assign({}, svgCss), { color: palette.white }),
|
|
300
295
|
})), (type === "info" &&
|
|
301
296
|
isPrimary && {
|
|
302
297
|
backgroundColor: palette.blue[700],
|
|
303
|
-
svg: {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
})
|
|
298
|
+
svg: Object.assign(Object.assign({}, svgCss), { color: palette.white }),
|
|
299
|
+
})), !isPrimary && {
|
|
300
|
+
svg: svgCss,
|
|
301
|
+
});
|
|
307
302
|
}, "notifications.notification.close": ({ type, isPrimary, }) => {
|
|
308
303
|
return Object.assign(Object.assign(Object.assign(Object.assign({ cursor: "pointer" }, (type === "success" &&
|
|
309
304
|
isPrimary && {
|
|
@@ -332,11 +327,11 @@ const components = Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.co
|
|
|
332
327
|
}));
|
|
333
328
|
}, "notifications.notification.close-icon": () => {
|
|
334
329
|
return {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
330
|
+
position: "relative",
|
|
331
|
+
top: "unset",
|
|
332
|
+
right: "unset",
|
|
333
|
+
width: "auto",
|
|
334
|
+
height: "auto",
|
|
340
335
|
};
|
|
341
336
|
}, "notifications.notification.title": ({ type, isPrimary, }) => {
|
|
342
337
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, (type === "success" &&
|
|
@@ -3865,6 +3860,7 @@ const UgNotification = styled__default["default"](reactNotifications.Notificatio
|
|
|
3865
3860
|
display: flex;
|
|
3866
3861
|
align-items: center;
|
|
3867
3862
|
justify-content: space-between;
|
|
3863
|
+
padding-right: ${({ theme }) => theme.space.md};
|
|
3868
3864
|
|
|
3869
3865
|
${UgAnchor} {
|
|
3870
3866
|
flex-shrink: 0;
|
|
@@ -4841,7 +4837,9 @@ const StyledButton$1 = styled__default["default"](Button) `
|
|
|
4841
4837
|
&:focus,
|
|
4842
4838
|
&:active {
|
|
4843
4839
|
background-color: ${props.theme.palette.kale[100]};
|
|
4844
|
-
color: ${props.isDanger
|
|
4840
|
+
color: ${props.isDanger
|
|
4841
|
+
? props.theme.palette.red[500]
|
|
4842
|
+
: props.theme.palette.grey[800]};
|
|
4845
4843
|
}`};
|
|
4846
4844
|
`;
|
|
4847
4845
|
const StyledFooterButton = styled__default["default"](StyledButton$1) `
|
|
@@ -4881,7 +4879,11 @@ const HelpItem = (props) => {
|
|
|
4881
4879
|
if (email.length > 24) {
|
|
4882
4880
|
csmEmailCut = `${email.substring(0, 21)}...`;
|
|
4883
4881
|
}
|
|
4884
|
-
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PreviousButton, Object.assign({ onClick: () => props.setActive(""), isBasic: true }, { children: props.title })), jsxRuntime.jsx(Separator, {}), jsxRuntime.jsxs(StyledBody$2, { children: [jsxRuntime.jsx(Paragraph, Object.assign({ style: { color: theme.palette.grey[600] } }, { children: jsxRuntime.jsx(SM, { children: props.contactLabel }) })), jsxRuntime.jsx(StyledParagraph, { children: jsxRuntime.jsx(Avatar, { children: (_a = props.csm.picture) !== null && _a !== void 0 ? _a : getInitials(props.csm.name), avatarType: props.csm.picture ? "image" : "text", size: "large" }) }), jsxRuntime.jsxs(StyledParagraph, { children: [jsxRuntime.jsx(MD, Object.assign({ isBold: true }, { children: props.csm.name })), jsxRuntime.jsxs(Description, { children: [jsxRuntime.jsx(Anchor, Object.assign({ href: `mailto:${props.csm.email}`, style: { color: theme.palette.grey[600] } }, { children: csmEmailCut })), jsxRuntime.jsxs(StyledButton$1, Object.assign({ isBasic: true, onClick:
|
|
4882
|
+
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PreviousButton, Object.assign({ onClick: () => props.setActive(""), isBasic: true }, { children: props.title })), jsxRuntime.jsx(Separator, {}), jsxRuntime.jsxs(StyledBody$2, { children: [jsxRuntime.jsx(Paragraph, Object.assign({ style: { color: theme.palette.grey[600] } }, { children: jsxRuntime.jsx(SM, { children: props.contactLabel }) })), jsxRuntime.jsx(StyledParagraph, { children: jsxRuntime.jsx(Avatar, { children: (_a = props.csm.picture) !== null && _a !== void 0 ? _a : getInitials(props.csm.name), avatarType: props.csm.picture ? "image" : "text", size: "large" }) }), jsxRuntime.jsxs(StyledParagraph, { children: [jsxRuntime.jsx(MD, Object.assign({ isBold: true }, { children: props.csm.name })), jsxRuntime.jsxs(Description, { children: [jsxRuntime.jsx(Anchor, Object.assign({ href: `mailto:${props.csm.email}`, style: { color: theme.palette.grey[600] } }, { children: csmEmailCut })), jsxRuntime.jsxs(StyledButton$1, Object.assign({ isBasic: true, onClick: () => {
|
|
4883
|
+
var _a;
|
|
4884
|
+
copyToClipBoard();
|
|
4885
|
+
(_a = props.onCopyEmail) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
4886
|
+
}, size: "small", variant: "isBasic" }, { children: [jsxRuntime.jsx(StyledButton$1.StartIcon, { children: jsxRuntime.jsx(SvgCopy, {}) }), (_b = props.copyLabel) !== null && _b !== void 0 ? _b : "Copy"] }))] })] })] }), props.chatSupport && (jsxRuntime.jsxs(Footer, { children: [jsxRuntime.jsx(Separator, {}), jsxRuntime.jsxs(StyledFooterButton, Object.assign({ isStretched: true, isBasic: true, onClick: props.toggleChat, style: { paddingLeft: theme.space.xxs } }, { children: [jsxRuntime.jsx(StyledFooterButton.StartIcon, { children: jsxRuntime.jsx(SvgInfoFill, { color: theme.palette.blue[600] }) }), (_c = props.chatSupportLabel) !== null && _c !== void 0 ? _c : "Report a technical issue"] }))] }))] }));
|
|
4885
4887
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(MenuItem, Object.assign({ content: content, value: props.value, selectedItem: props.selectedItem, setActive: props.setActive, icon: jsxRuntime.jsx(SvgQuestionMark, { color: theme.palette.blue[600] }) }, { children: props.title })) }));
|
|
4886
4888
|
};
|
|
4887
4889
|
|
|
@@ -4975,7 +4977,7 @@ const UserMenu = (props) => {
|
|
|
4975
4977
|
};
|
|
4976
4978
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [item === "" && jsxRuntime.jsx(UserContainer, Object.assign({}, props.user)), jsxRuntime.jsxs(StyledList, { children: [item === "" && props.onFeedbackClick && jsxRuntime.jsx(Separator, {}), props.onFeedbackClick && (jsxRuntime.jsx(MenuItem, Object.assign({ selectedItem: item, icon: jsxRuntime.jsx(SvgThumbsUp, {}), setActive: () => props.onFeedbackClick
|
|
4977
4979
|
? props.onFeedbackClick()
|
|
4978
|
-
: console.log("feedback fired") }, { children: jsxRuntime.jsxs(MenuItemBody, { children: [props.feedbackTitle || "Give us your feedback", jsxRuntime.jsx(MD, Object.assign({ style: { color: theme.palette.grey[600] } }, { children: props.feedbackSubTitle || "Help us improve UNGUESS!" }))] }) }))), item === "" && jsxRuntime.jsx(Separator, {}), jsxRuntime.jsx(HelpItem, { value: "csm", selectedItem: item, setActive: (i) => toggleItem(i), title: props.csmTitle || "Need Help?", contactLabel: props.csmContactLabel || "Contact your CSM", csm: props.csm, toggleChat: props.onToggleChat, chatSupportLabel: props === null || props === void 0 ? void 0 : props.chatSupportLabel, copyLabel: props === null || props === void 0 ? void 0 : props.copyLabel }), jsxRuntime.jsx(LanguageItem, { title: props.languageTitle || "Change Language", value: "language-selector", selectedItem: item, setActive: (i) => toggleItem(i), languages: props.languages, currentLanguage: props.currentLanguage, currentLanguageLabel: props.currentLanguageLabel, onSelectLanguage: (lang) => props.onSelectLanguage(lang) }), jsxRuntime.jsx(MenuItem, Object.assign({ selectedItem: item, icon: jsxRuntime.jsx(SvgLockLockedFill, { color: theme.palette.blue[600] }), setActive: () => {
|
|
4980
|
+
: console.log("feedback fired") }, { children: jsxRuntime.jsxs(MenuItemBody, { children: [props.feedbackTitle || "Give us your feedback", jsxRuntime.jsx(MD, Object.assign({ style: { color: theme.palette.grey[600] } }, { children: props.feedbackSubTitle || "Help us improve UNGUESS!" }))] }) }))), item === "" && jsxRuntime.jsx(Separator, {}), jsxRuntime.jsx(HelpItem, { value: "csm", selectedItem: item, setActive: (i) => toggleItem(i), title: props.csmTitle || "Need Help?", contactLabel: props.csmContactLabel || "Contact your CSM", csm: props.csm, toggleChat: props.onToggleChat, chatSupportLabel: props === null || props === void 0 ? void 0 : props.chatSupportLabel, copyLabel: props === null || props === void 0 ? void 0 : props.copyLabel, onCopyEmail: props === null || props === void 0 ? void 0 : props.onCopyEmail, chatSupport: props === null || props === void 0 ? void 0 : props.chatSupport }), jsxRuntime.jsx(LanguageItem, { title: props.languageTitle || "Change Language", value: "language-selector", selectedItem: item, setActive: (i) => toggleItem(i), languages: props.languages, currentLanguage: props.currentLanguage, currentLanguageLabel: props.currentLanguageLabel, onSelectLanguage: (lang) => props.onSelectLanguage(lang) }), jsxRuntime.jsx(MenuItem, Object.assign({ selectedItem: item, icon: jsxRuntime.jsx(SvgLockLockedFill, { color: theme.palette.blue[600] }), setActive: () => {
|
|
4979
4981
|
if (document.querySelector(".iubenda-cs-preferences-link")) {
|
|
4980
4982
|
const iubendaBtn = document.querySelector(".iubenda-cs-preferences-link");
|
|
4981
4983
|
if (iubendaBtn) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NotificationArgs, ToastProviderArgs } from "./_types";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
2
3
|
/**
|
|
3
4
|
* A Notification is a passive status update that keeps users informed of system progress.
|
|
4
5
|
* <hr>
|
|
@@ -6,7 +7,7 @@ import { NotificationArgs, ToastProviderArgs } from "./_types";
|
|
|
6
7
|
- For a passive status update about user or system activity
|
|
7
8
|
*/
|
|
8
9
|
declare const Notification: ({ closeText, message, onClose, type, isPrimary, isRegular, ...props }: NotificationArgs) => JSX.Element;
|
|
9
|
-
declare const ToastProvider: (props: ToastProviderArgs) => JSX.Element;
|
|
10
|
+
declare const ToastProvider: (props: PropsWithChildren<ToastProviderArgs>) => JSX.Element;
|
|
10
11
|
declare const useToast: () => {
|
|
11
12
|
addToast: (content: import("@zendeskgarden/react-notifications").ToastContent, options?: Partial<import("@zendeskgarden/react-notifications").IToastOptions> | undefined) => string;
|
|
12
13
|
removeToast: (id: string) => void;
|
|
@@ -5,14 +5,13 @@ export declare const components: {
|
|
|
5
5
|
type: string;
|
|
6
6
|
isPrimary: boolean;
|
|
7
7
|
}) => {
|
|
8
|
-
|
|
9
|
-
svg: {
|
|
8
|
+
svg?: {
|
|
10
9
|
marginTop: string;
|
|
11
|
-
color?: undefined;
|
|
12
10
|
} | {
|
|
13
11
|
color: string;
|
|
14
|
-
marginTop
|
|
15
|
-
};
|
|
12
|
+
marginTop: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
backgroundColor?: string | undefined;
|
|
16
15
|
};
|
|
17
16
|
"notifications.notification.close": ({ type, isPrimary, }: {
|
|
18
17
|
type: string;
|