@mailstep/design-system 0.6.3-beta.9 → 0.6.3
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/package.json +1 -1
- package/ui/Blocks/CommonGrid/CommonGrid.d.ts +2 -5
- package/ui/Blocks/CommonGrid/CommonGrid.js +22 -4
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +3 -4
- package/ui/Blocks/CommonGrid/components/HeadRow.d.ts +3 -3
- package/ui/Blocks/CommonGrid/components/HeadRow.js +26 -1
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.d.ts +1 -3
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +4 -16
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.d.ts +1 -5
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +4 -5
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +1 -7
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +7 -77
- package/ui/Blocks/CommonGrid/styles.d.ts +1 -3
- package/ui/Blocks/Modal/Modal.js +2 -2
- package/ui/Blocks/Modal/stories/Modal.stories.js +5 -1
- package/ui/Blocks/Modal/styles.d.ts +4 -0
- package/ui/Blocks/Modal/styles.js +10 -3
- package/ui/Blocks/Tabs/Tabs.js +2 -2
- package/ui/Blocks/Tabs/styles.d.ts +1 -0
- package/ui/Blocks/Tabs/styles.js +4 -1
- package/ui/Blocks/Tabs/types.d.ts +1 -0
- package/ui/Elements/ErrorMessage/ErrorMessage.js +1 -1
- package/ui/Elements/Select/themes/formStyles.d.ts +0 -3
- package/ui/Elements/Select/themes/formStyles.js +1 -10
- package/ui/Elements/Text/types.d.ts +2 -2
- package/ui/Forms/Checkbox/Checkbox.js +3 -2
- package/ui/Forms/Checkbox/stories/Checkbox.stories.js +1 -1
- package/ui/Forms/Checkbox/styles.d.ts +1 -1
- package/ui/Forms/Checkbox/styles.js +1 -1
- package/ui/Forms/RadioButton/RadioButton.js +4 -1
- package/ui/Forms/RadioButton/styles.d.ts +1 -1
- package/ui/Forms/RadioButton/styles.js +1 -1
- package/ui/ThemeProvider/themes/default.js +1 -1
- package/ui/index.d.ts +1 -3
- package/ui/index.es.js +9602 -9618
- package/ui/index.js +1 -3
- package/ui/index.umd.js +416 -409
- package/ui/Elements/Paragraph/Paragraph.d.ts +0 -2
- package/ui/Elements/Paragraph/Paragraph.js +0 -3
- package/ui/Elements/Paragraph/index.d.ts +0 -3
- package/ui/Elements/Paragraph/index.js +0 -3
- package/ui/Elements/Paragraph/stories/Paragraph.stories.d.ts +0 -17
- package/ui/Elements/Paragraph/stories/Paragraph.stories.js +0 -34
|
@@ -8,9 +8,6 @@ type CustomTheme = Omit<BaseStylesTheme, 'colors'> & {
|
|
|
8
8
|
inputBorderHoverColor: string;
|
|
9
9
|
menuHoverBackgroundColor: string;
|
|
10
10
|
dropdownIndicatorColor: string;
|
|
11
|
-
hoverToActiveOptionBackground: string;
|
|
12
|
-
scrollbarThumbColor: string;
|
|
13
|
-
scrollbarTrackColor: string;
|
|
14
11
|
};
|
|
15
12
|
textWeightRegular: string;
|
|
16
13
|
textWeightSemiBold: string;
|
|
@@ -58,13 +58,7 @@ export var CustomStyles = __assign(__assign({}, baseStylesConfig), { control: fu
|
|
|
58
58
|
marginBottom: '2px',
|
|
59
59
|
lineHeight: '22px',
|
|
60
60
|
borderRadius: th.radius('ml')({ theme: selectProps === null || selectProps === void 0 ? void 0 : selectProps.systemTheme }),
|
|
61
|
-
'&:hover': {
|
|
62
|
-
backgroundColor: isSelected
|
|
63
|
-
? theme.colors.hoverToActiveOptionBackground
|
|
64
|
-
: !isDisabled
|
|
65
|
-
? theme.colors.menuHoverBackgroundColor
|
|
66
|
-
: undefined,
|
|
67
|
-
},
|
|
61
|
+
'&:hover': { backgroundColor: !isDisabled ? theme.colors.menuHoverBackgroundColor : undefined },
|
|
68
62
|
};
|
|
69
63
|
}, menu: function (styles, state) {
|
|
70
64
|
var _a;
|
|
@@ -101,9 +95,6 @@ export var getCustomTheme = function (theme, optionVariant, useFilterSubvariant)
|
|
|
101
95
|
menuBackgroundColor: th.color('white')({ theme: theme }),
|
|
102
96
|
menuHoverBackgroundColor: th.color('bgLightGray1')({ theme: theme }),
|
|
103
97
|
dropdownIndicatorColor: th.color('gray1')({ theme: theme }),
|
|
104
|
-
hoverToActiveOptionBackground: th.color('red30')({ theme: theme }),
|
|
105
|
-
scrollbarThumbColor: th.color('lightGray5')({ theme: theme }),
|
|
106
|
-
scrollbarTrackColor: th.color('bgLightGray1')({ theme: theme }),
|
|
107
98
|
};
|
|
108
99
|
return function (reactSelectTheme) {
|
|
109
100
|
return __assign(__assign({}, reactSelectTheme), { colors: customColors, focusBoxShadow: null, height: useFilterSubvariant ? '32px' : '38px', textWeightRegular: th.fontWeight('regular')({ theme: theme }), textWeightSemiBold: th.fontWeight('semiBold')({ theme: theme }), textWeightBold: th.fontWeight('bold')({ theme: theme }), optionVariant: optionVariant, borderRadius: th.radius('lg')({ theme: theme }), font: th.font('primary')({ theme: theme }), narrowIndicators: !!useFilterSubvariant });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export type TextProps = {
|
|
3
|
-
children?:
|
|
3
|
+
children?: ReactNode | ReactNode[];
|
|
4
4
|
fontSize?: number;
|
|
5
5
|
fontWeight?: string;
|
|
6
6
|
variant?: 'normal' | 'medium' | 'semiBold' | 'bold';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
2
|
+
import { memo, useId } from 'react';
|
|
3
3
|
import { CheckboxWrap, CheckIcon, FakeInput, Label } from './styles';
|
|
4
4
|
import { th, useTheme } from '@xstyled/styled-components';
|
|
5
5
|
var Checkbox = function (_a) {
|
|
6
6
|
var name = _a.name, label = _a.label, onChange = _a.onChange, checked = _a.checked, defaultChecked = _a.defaultChecked, _b = _a.size, size = _b === void 0 ? 4 : _b, className = _a.className, disabled = _a.disabled, inputRef = _a.inputRef, readOnly = _a.readOnly, _c = _a.minusIcon, minusIcon = _c === void 0 ? false : _c;
|
|
7
7
|
var theme = useTheme();
|
|
8
8
|
var themeSize = th.fontSize(size)({ theme: theme });
|
|
9
|
-
|
|
9
|
+
var id = useId();
|
|
10
|
+
return (_jsxs(CheckboxWrap, { size: themeSize, className: className, children: [_jsx("input", { type: "checkbox", ref: inputRef, name: name, checked: checked, defaultChecked: defaultChecked, disabled: disabled, onChange: onChange, value: "", readOnly: readOnly, "data-cy": name && "".concat(name, "Checkbox"), id: id }), _jsx(FakeInput, { size: themeSize, children: _jsx(CheckIcon, { icon: minusIcon ? 'minus' : 'check', size: themeSize }) }), label && _jsx(Label, { htmlFor: id, children: label })] }));
|
|
10
11
|
};
|
|
11
12
|
export default memo(Checkbox);
|
|
@@ -8,4 +8,4 @@ export declare const CheckIcon: import("styled-components").StyledComponent<({ i
|
|
|
8
8
|
export declare const CheckboxWrap: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
9
9
|
size: string | number;
|
|
10
10
|
}, never>;
|
|
11
|
-
export declare const Label: import("styled-components").StyledComponent<"
|
|
11
|
+
export declare const Label: import("styled-components").StyledComponent<"label", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -22,5 +22,5 @@ export var CheckboxWrap = styled.div(templateObject_3 || (templateObject_3 = __m
|
|
|
22
22
|
var size = _a.size;
|
|
23
23
|
return size;
|
|
24
24
|
});
|
|
25
|
-
export var Label = styled.
|
|
25
|
+
export var Label = styled.label(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin: 0;\n margin-left: 8px;\n font-size: 14px;\n"], ["\n margin: 0;\n margin-left: 8px;\n font-size: 14px;\n"])));
|
|
26
26
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -22,8 +22,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import { CenterDot, Item, Label, PaintoverLayer, StyledRadio, Wrapper } from './styles';
|
|
25
|
+
import { useId } from 'react';
|
|
25
26
|
var RadioButton = function (_a) {
|
|
26
27
|
var label = _a.label, id = _a.id, name = _a.name, _b = _a.disabled, disabled = _b === void 0 ? false : _b, onChange = _a.onChange, rest = __rest(_a, ["label", "id", "name", "disabled", "onChange"]);
|
|
27
|
-
|
|
28
|
+
var customId = useId();
|
|
29
|
+
var inputId = id || customId;
|
|
30
|
+
return (_jsxs(Wrapper, { children: [_jsxs(Item, { children: [_jsx(StyledRadio, __assign({ type: "radio", id: inputId, name: name, disabled: disabled, onChange: onChange }, rest)), _jsx(PaintoverLayer, { disabled: disabled, children: _jsx(CenterDot, {}) })] }), label && _jsx(Label, { htmlFor: inputId, children: label })] }));
|
|
28
31
|
};
|
|
29
32
|
export default RadioButton;
|
|
@@ -7,4 +7,4 @@ export declare const CenterDot: import("styled-components").StyledComponent<"spa
|
|
|
7
7
|
export declare const StyledRadio: import("styled-components").StyledComponent<"input", import("@xstyled/system").Theme, {
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
}, never>;
|
|
10
|
-
export declare const Label: import("styled-components").StyledComponent<"
|
|
10
|
+
export declare const Label: import("styled-components").StyledComponent<"label", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -11,5 +11,5 @@ export var StyledRadio = styled.input(templateObject_5 || (templateObject_5 = __
|
|
|
11
11
|
var disabled = _a.disabled;
|
|
12
12
|
return (disabled ? 'default' : 'pointer');
|
|
13
13
|
});
|
|
14
|
-
export var Label = styled.
|
|
14
|
+
export var Label = styled.label(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin: 0;\n margin-left: 8px;\n font-size: 14px;\n"], ["\n margin: 0;\n margin-left: 8px;\n font-size: 14px;\n"])));
|
|
15
15
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
package/ui/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ import Line from './Elements/Line';
|
|
|
18
18
|
import Link from './Elements/Link';
|
|
19
19
|
import Logo from './Elements/Logo';
|
|
20
20
|
import Pagination from './Elements/Pagination';
|
|
21
|
-
import Paragraph from './Elements/Paragraph';
|
|
22
21
|
import Portal from './Elements/Portal';
|
|
23
22
|
import ProgressBar from './Elements/ProgressBar';
|
|
24
23
|
import SimpleLink from './Elements/SimpleLink';
|
|
@@ -41,7 +40,7 @@ import MultiSelect from './Elements/MultiSelect';
|
|
|
41
40
|
import Select from './Elements/Select';
|
|
42
41
|
import DropdownSelect from './Elements/DropdownSelect';
|
|
43
42
|
import TextArea from './Forms/TextArea';
|
|
44
|
-
export { DropdownSelect, DatePicker, CommonGrid, Popover, SingleSelect, MultiSelect, Select, Card, CornerDialog, ImageList, LightBox, Modal, Tabs, Alert, Avatar, Badge, BorderedBox, Button, Dropdown, ErrorMessage, Icon, Image, Label, Line, Link, Logo, Pagination,
|
|
43
|
+
export { DropdownSelect, DatePicker, CommonGrid, Popover, SingleSelect, MultiSelect, Select, Card, CornerDialog, ImageList, LightBox, Modal, Tabs, Alert, Avatar, Badge, BorderedBox, Button, Dropdown, ErrorMessage, Icon, Image, Label, Line, Link, Logo, Pagination, Portal, ProgressBar, SimpleLink, SpaceAround, Spinner, Tag, Toast, Toggle, Typography, Checkbox, Input, RadioButton, ThemeProvider, utils, TextArea, };
|
|
45
44
|
export * from './Blocks/CornerDialog';
|
|
46
45
|
export * from './Blocks/ImageList';
|
|
47
46
|
export * from './Blocks/LightBox';
|
|
@@ -62,7 +61,6 @@ export * from './Elements/Line';
|
|
|
62
61
|
export * from './Elements/Link';
|
|
63
62
|
export * from './Elements/Logo';
|
|
64
63
|
export * from './Elements/Pagination';
|
|
65
|
-
export * from './Elements/Paragraph';
|
|
66
64
|
export * from './Elements/Portal';
|
|
67
65
|
export * from './Elements/ProgressBar';
|
|
68
66
|
export * from './Elements/SimpleLink';
|