@appquality/unguess-design-system 3.1.76 → 3.1.78
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 +12 -0
- package/build/index.js +13 -11
- package/build/stories/buttons/button/index.stories.d.ts +1 -0
- package/build/stories/buttons/utils.d.ts +27 -27
- package/build/stories/chat/index.stories.d.ts +1 -0
- package/build/stories/dropdowns/select/index.stories.d.ts +1 -0
- package/build/stories/editor/index.stories.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/build/index.js
CHANGED
|
@@ -5533,6 +5533,7 @@ const StyledButton$1 = styled__default["default"](Button) `
|
|
|
5533
5533
|
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
5534
5534
|
padding-left: 0;
|
|
5535
5535
|
justify-content: flex-start;
|
|
5536
|
+
border-radius: 0;
|
|
5536
5537
|
`;
|
|
5537
5538
|
const PreviousButton = (props) => (jsxRuntime.jsxs(StyledButton$1, Object.assign({}, props, { isStretched: true }, { children: [jsxRuntime.jsx(StyledButton$1.StartIcon, { children: jsxRuntime.jsx(SvgChevronLeftStroke, {}) }), props.children] })));
|
|
5538
5539
|
|
|
@@ -5702,16 +5703,16 @@ const SettingsOutroText = styled__default["default"](reactNotifications.Paragrap
|
|
|
5702
5703
|
margin-top: ${({ theme }) => theme.space.md};
|
|
5703
5704
|
`;
|
|
5704
5705
|
const SettingsItem = (props) => {
|
|
5705
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
5706
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5706
5707
|
const [value, setValue] = React.useState(props.settingValue || 0);
|
|
5707
5708
|
const onToggleSettings = (value) => {
|
|
5708
5709
|
setValue(value);
|
|
5709
5710
|
props.onSetSettings && props.onSetSettings(value);
|
|
5710
5711
|
};
|
|
5711
|
-
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PreviousButton, Object.assign({ onClick: () => props.setActive(""), isBasic: true }, { children: (
|
|
5712
|
-
? (
|
|
5713
|
-
: (
|
|
5714
|
-
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(SvgGearFill, { color: theme.palette.blue[600] }) }, { children: props.
|
|
5712
|
+
const content = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PreviousButton, Object.assign({ onClick: () => props.setActive(""), isBasic: true }, { children: (_a = props.i18n) === null || _a === void 0 ? void 0 : _a.settingsTitle })), jsxRuntime.jsx(Separator, {}), jsxRuntime.jsxs(StyledBody$1, { children: [props.i18n && props.i18n.settingsIntroText && (jsxRuntime.jsx(SettingsIntroText, { children: jsxRuntime.jsx(SM, { children: props.i18n.settingsIntroText }) })), jsxRuntime.jsxs(Field, { children: [jsxRuntime.jsx(TriggerTitle, Object.assign({ isBold: true }, { children: (_c = (_b = props.i18n) === null || _b === void 0 ? void 0 : _b.settingsToggle) === null || _c === void 0 ? void 0 : _c.title })), jsxRuntime.jsx(Toggle, Object.assign({ checked: value === 1, onChange: () => onToggleSettings(value === 1 ? 0 : 1) }, { children: jsxRuntime.jsx(Label, { children: value === 1
|
|
5713
|
+
? (_e = (_d = props.i18n) === null || _d === void 0 ? void 0 : _d.settingsToggle) === null || _e === void 0 ? void 0 : _e.on
|
|
5714
|
+
: (_g = (_f = props.i18n) === null || _f === void 0 ? void 0 : _f.settingsToggle) === null || _g === void 0 ? void 0 : _g.off }) }))] }), props.i18n && props.i18n.settingsOutroText && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(SettingsOutroText, { children: [jsxRuntime.jsx(SM, { children: props.i18n.settingsOutroText.paragraph_1 }), jsxRuntime.jsx(SM, { children: props.i18n.settingsOutroText.paragraph_2 })] }), jsxRuntime.jsx(SettingsOutroText, { children: jsxRuntime.jsx(SM, { children: props.i18n.settingsOutroText.paragraph_3 }) })] }))] })] }));
|
|
5715
|
+
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(SvgGearFill, { color: theme.palette.blue[600] }) }, { children: (_h = props.i18n) === null || _h === void 0 ? void 0 : _h.settingsTitle })) }));
|
|
5715
5716
|
};
|
|
5716
5717
|
|
|
5717
5718
|
const StyledList = styled__default["default"].ul `
|
|
@@ -5719,17 +5720,18 @@ const StyledList = styled__default["default"].ul `
|
|
|
5719
5720
|
margin: 0;
|
|
5720
5721
|
`;
|
|
5721
5722
|
const UserMenu = (props) => {
|
|
5722
|
-
var _a, _b, _c, _d, _e;
|
|
5723
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5723
5724
|
const [item, setActiveItem] = React.useState("");
|
|
5724
5725
|
const toggleItem = (item) => {
|
|
5725
5726
|
setActiveItem(item);
|
|
5726
5727
|
};
|
|
5727
5728
|
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
|
|
5728
5729
|
? props.onFeedbackClick()
|
|
5729
|
-
: 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(SettingsItem, { value: "settings", selectedItem: item, setActive: (i) => toggleItem(i), title: ((_a = props.i18n) === null || _a === void 0 ? void 0 : _a.settingsTitle) || "Notifications Settings",
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5730
|
+
: 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(SettingsItem, { value: "settings", selectedItem: item, setActive: (i) => toggleItem(i), settingValue: props.settingValue, title: ((_a = props.i18n) === null || _a === void 0 ? void 0 : _a.settingsTitle) || "Notifications Settings", i18n: {
|
|
5731
|
+
settingsTitle: ((_b = props.i18n) === null || _b === void 0 ? void 0 : _b.settingsTitle) || "Notifications Settings",
|
|
5732
|
+
settingsIntroText: (_c = props.i18n) === null || _c === void 0 ? void 0 : _c.settingsIntroText,
|
|
5733
|
+
settingsOutroText: (_d = props.i18n) === null || _d === void 0 ? void 0 : _d.settingsOutroText,
|
|
5734
|
+
settingsToggle: (_e = props.i18n) === null || _e === void 0 ? void 0 : _e.settingsToggle,
|
|
5733
5735
|
}, onSetSettings: props.onSetSettings }), 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: () => {
|
|
5734
5736
|
if (document.querySelector(".iubenda-cs-preferences-link")) {
|
|
5735
5737
|
const iubendaBtn = document.querySelector(".iubenda-cs-preferences-link");
|
|
@@ -5737,7 +5739,7 @@ const UserMenu = (props) => {
|
|
|
5737
5739
|
iubendaBtn.click();
|
|
5738
5740
|
}
|
|
5739
5741
|
}
|
|
5740
|
-
} }, { children: ((
|
|
5742
|
+
} }, { children: ((_f = props.privacy) === null || _f === void 0 ? void 0 : _f.title) || "Privacy settings" })), jsxRuntime.jsx(MenuItem, Object.assign({ selectedItem: item, icon: jsxRuntime.jsx(SvgExit, { color: theme.palette.red[600] }), setActive: () => props.onLogout() }, { children: props.logoutTitle || "Log out" }))] })] }));
|
|
5741
5743
|
};
|
|
5742
5744
|
|
|
5743
5745
|
const StyledModal = styled__default["default"](Modal) `
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ButtonArgs } from "./_types";
|
|
2
3
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ButtonArgs>;
|
|
3
4
|
export declare const Basic: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ButtonArgs>;
|
|
@@ -8,18 +8,18 @@ export declare const variants: readonly [{}, {
|
|
|
8
8
|
readonly disabled: true;
|
|
9
9
|
}];
|
|
10
10
|
export declare const Row: import("styled-components").IStyledComponent<"web", {
|
|
11
|
-
alignItems?: "
|
|
12
|
-
alignItemsXs?: "
|
|
13
|
-
alignItemsSm?: "
|
|
14
|
-
alignItemsMd?: "
|
|
15
|
-
alignItemsLg?: "
|
|
16
|
-
alignItemsXl?: "
|
|
17
|
-
justifyContent?: "
|
|
18
|
-
justifyContentXs?: "
|
|
19
|
-
justifyContentSm?: "
|
|
20
|
-
justifyContentMd?: "
|
|
21
|
-
justifyContentLg?: "
|
|
22
|
-
justifyContentXl?: "
|
|
11
|
+
alignItems?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
12
|
+
alignItemsXs?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
13
|
+
alignItemsSm?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
14
|
+
alignItemsMd?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
15
|
+
alignItemsLg?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
16
|
+
alignItemsXl?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
17
|
+
justifyContent?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
18
|
+
justifyContentXs?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
19
|
+
justifyContentSm?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
20
|
+
justifyContentMd?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
21
|
+
justifyContentLg?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
22
|
+
justifyContentXl?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
23
23
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
24
24
|
wrapXs?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
25
25
|
wrapSm?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
@@ -73,7 +73,7 @@ export declare const Row: import("styled-components").IStyledComponent<"web", {
|
|
|
73
73
|
results?: number | undefined;
|
|
74
74
|
security?: string | undefined;
|
|
75
75
|
unselectable?: "on" | "off" | undefined;
|
|
76
|
-
inputMode?: "
|
|
76
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
77
77
|
is?: string | undefined;
|
|
78
78
|
"aria-activedescendant"?: string | undefined;
|
|
79
79
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
@@ -299,18 +299,18 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
|
|
|
299
299
|
md?: string | number | boolean | undefined;
|
|
300
300
|
lg?: string | number | boolean | undefined;
|
|
301
301
|
xl?: string | number | boolean | undefined;
|
|
302
|
-
alignSelf?: "
|
|
303
|
-
alignSelfXs?: "
|
|
304
|
-
alignSelfSm?: "
|
|
305
|
-
alignSelfMd?: "
|
|
306
|
-
alignSelfLg?: "
|
|
307
|
-
alignSelfXl?: "
|
|
308
|
-
textAlign?: "
|
|
309
|
-
textAlignXs?: "
|
|
310
|
-
textAlignSm?: "
|
|
311
|
-
textAlignMd?: "
|
|
312
|
-
textAlignLg?: "
|
|
313
|
-
textAlignXl?: "
|
|
302
|
+
alignSelf?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
303
|
+
alignSelfXs?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
304
|
+
alignSelfSm?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
305
|
+
alignSelfMd?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
306
|
+
alignSelfLg?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
307
|
+
alignSelfXl?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
308
|
+
textAlign?: "center" | "start" | "end" | "justify" | undefined;
|
|
309
|
+
textAlignXs?: "center" | "start" | "end" | "justify" | undefined;
|
|
310
|
+
textAlignSm?: "center" | "start" | "end" | "justify" | undefined;
|
|
311
|
+
textAlignMd?: "center" | "start" | "end" | "justify" | undefined;
|
|
312
|
+
textAlignLg?: "center" | "start" | "end" | "justify" | undefined;
|
|
313
|
+
textAlignXl?: "center" | "start" | "end" | "justify" | undefined;
|
|
314
314
|
offset?: string | number | undefined;
|
|
315
315
|
offsetXs?: string | number | undefined;
|
|
316
316
|
offsetSm?: string | number | undefined;
|
|
@@ -370,7 +370,7 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
|
|
|
370
370
|
results?: number | undefined;
|
|
371
371
|
security?: string | undefined;
|
|
372
372
|
unselectable?: "on" | "off" | undefined;
|
|
373
|
-
inputMode?: "
|
|
373
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
374
374
|
is?: string | undefined;
|
|
375
375
|
"aria-activedescendant"?: string | undefined;
|
|
376
376
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
@@ -640,7 +640,7 @@ export declare const MD: import("styled-components").IStyledComponent<"web", {
|
|
|
640
640
|
results?: number | undefined;
|
|
641
641
|
security?: string | undefined;
|
|
642
642
|
unselectable?: "on" | "off" | undefined;
|
|
643
|
-
inputMode?: "
|
|
643
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
644
644
|
is?: string | undefined;
|
|
645
645
|
"aria-activedescendant"?: string | undefined;
|
|
646
646
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|