@pedidopago/ui 1.3.1 → 1.3.4
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/components/Alert/alert.test.js +8 -8
- package/dist/components/Alert/index.d.ts +2 -2
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Alert/index.js +8 -28
- package/dist/components/Alert/styles.d.ts +1 -13
- package/dist/components/Alert/styles.d.ts.map +1 -1
- package/dist/components/Alert/styles.js +4 -24
- package/dist/components/Alert/types.d.ts +6 -23
- package/dist/components/Alert/types.d.ts.map +1 -1
- package/dist/components/Button/Button.test.js +1 -1
- package/dist/components/Button/index.d.ts +3 -4
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +25 -20
- package/dist/components/Button/styles.d.ts +3 -3
- package/dist/components/Button/styles.d.ts.map +1 -1
- package/dist/components/Button/styles.js +42 -43
- package/dist/components/Button/types.d.ts +11 -13
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/DateInput/DateInput-example.d.ts +2 -2
- package/dist/components/DateInput/DateInput-example.d.ts.map +1 -1
- package/dist/components/DateInput/DateInput-example.js +10 -15
- package/dist/components/DateInput/dateInput.test.js +4 -4
- package/dist/components/DateInput/index.d.ts +2 -2
- package/dist/components/DateInput/index.d.ts.map +1 -1
- package/dist/components/DateInput/index.js +65 -136
- package/dist/components/DateInput/styles.d.ts +7 -29
- package/dist/components/DateInput/styles.d.ts.map +1 -1
- package/dist/components/DateInput/styles.js +15 -19
- package/dist/components/DateInput/types.d.ts +7 -14
- package/dist/components/DateInput/types.d.ts.map +1 -1
- package/dist/components/DatePicker/datepicker.test.js +8 -8
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +4 -8
- package/dist/components/DatePicker/types.d.ts +3 -4
- package/dist/components/DatePicker/types.d.ts.map +1 -1
- package/dist/components/Input/index.js +14 -15
- package/dist/components/Input/styles.d.ts +1 -0
- package/dist/components/Input/styles.d.ts.map +1 -1
- package/dist/components/Input/styles.js +40 -35
- package/dist/components/Label/index.d.ts +2 -2
- package/dist/components/Label/index.d.ts.map +1 -1
- package/dist/components/Label/index.js +12 -23
- package/dist/components/Label/label.test.d.ts +2 -0
- package/dist/components/Label/label.test.d.ts.map +1 -0
- package/dist/components/Label/label.test.js +105 -0
- package/dist/components/Label/styles.js +1 -1
- package/dist/components/Label/types.d.ts +5 -6
- package/dist/components/Label/types.d.ts.map +1 -1
- package/dist/components/Modal/ModalExample.d.ts +4 -0
- package/dist/components/Modal/ModalExample.d.ts.map +1 -0
- package/dist/components/Modal/ModalExample.js +66 -0
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +11 -13
- package/dist/components/Modal/modal.test.js +11 -9
- package/dist/components/Modal/styles.d.ts.map +1 -1
- package/dist/components/Modal/styles.js +3 -3
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +23 -10
- package/dist/components/Pagination/styles.js +3 -2
- package/dist/components/ReactPortal/index.d.ts +8 -0
- package/dist/components/ReactPortal/index.d.ts.map +1 -0
- package/dist/components/ReactPortal/index.js +58 -0
- package/dist/components/ReactPortal/reactPortal.test.d.ts +2 -0
- package/dist/components/ReactPortal/reactPortal.test.d.ts.map +1 -0
- package/dist/components/ReactPortal/reactPortal.test.js +26 -0
- package/dist/components/ReactPortal/utils/createWrapperAndApprendToBody.d.ts +2 -0
- package/dist/components/ReactPortal/utils/createWrapperAndApprendToBody.d.ts.map +1 -0
- package/dist/components/ReactPortal/utils/createWrapperAndApprendToBody.js +13 -0
- package/dist/components/Select/components/OptionsSelect/index.d.ts +4 -0
- package/dist/components/Select/components/OptionsSelect/index.d.ts.map +1 -0
- package/dist/components/Select/components/OptionsSelect/index.js +91 -0
- package/dist/components/Select/components/OptionsSelect/styles.d.ts +265 -0
- package/dist/components/Select/components/OptionsSelect/styles.d.ts.map +1 -0
- package/dist/components/Select/components/OptionsSelect/styles.js +32 -0
- package/dist/components/Select/components/OptionsSelect/types.d.ts +16 -0
- package/dist/components/Select/components/OptionsSelect/types.d.ts.map +1 -0
- package/dist/components/Select/components/OptionsSelect/types.js +1 -0
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +86 -51
- package/dist/components/Select/select.test.js +14 -0
- package/dist/components/Select/styles.d.ts +5 -7
- package/dist/components/Select/styles.d.ts.map +1 -1
- package/dist/components/Select/styles.js +26 -16
- package/dist/components/Select/types.d.ts +7 -2
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +13 -3
- package/dist/components/Table/styles.d.ts.map +1 -1
- package/dist/components/Table/styles.js +12 -9
- package/dist/components/Toast/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast/components/Toast.js +6 -7
- package/dist/components/Toast/contexts/ToastProvider.d.ts.map +1 -1
- package/dist/components/Toast/contexts/ToastProvider.js +3 -1
- package/dist/components/Toast/toast.test.js +10 -10
- package/dist/components/Toast/types.d.ts +8 -15
- package/dist/components/Toast/types.d.ts.map +1 -1
- package/dist/components/Tooltip/components/TooltipLabel.d.ts +4 -0
- package/dist/components/Tooltip/components/TooltipLabel.d.ts.map +1 -0
- package/dist/components/Tooltip/components/TooltipLabel.js +59 -0
- package/dist/components/Tooltip/index.d.ts +2 -2
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +91 -74
- package/dist/components/Tooltip/styles.d.ts +6 -14
- package/dist/components/Tooltip/styles.d.ts.map +1 -1
- package/dist/components/Tooltip/styles.js +9 -31
- package/dist/components/Tooltip/types.d.ts +17 -19
- package/dist/components/Tooltip/types.d.ts.map +1 -1
- package/dist/components/Typography/styles.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/package.json +2 -1
|
@@ -23,14 +23,14 @@ var setup = function setup(props) {
|
|
|
23
23
|
describe('Alert', function () {
|
|
24
24
|
it('should it render the alert component', function () {
|
|
25
25
|
var container = setup({
|
|
26
|
-
|
|
26
|
+
content: 'test',
|
|
27
27
|
title: 'Test Toast'
|
|
28
28
|
});
|
|
29
29
|
expect(container.getByText('test')).toBeInTheDocument();
|
|
30
30
|
});
|
|
31
31
|
it('should it render the alert component in outlined variant', function () {
|
|
32
32
|
var container = setup({
|
|
33
|
-
|
|
33
|
+
content: 'test',
|
|
34
34
|
title: 'Test Toast',
|
|
35
35
|
variant: 'outlined'
|
|
36
36
|
});
|
|
@@ -38,7 +38,7 @@ describe('Alert', function () {
|
|
|
38
38
|
});
|
|
39
39
|
it('should it render the alert component in closable variant', function () {
|
|
40
40
|
var container = setup({
|
|
41
|
-
|
|
41
|
+
content: 'test',
|
|
42
42
|
title: 'Test Toast',
|
|
43
43
|
variant: 'closable'
|
|
44
44
|
});
|
|
@@ -46,7 +46,7 @@ describe('Alert', function () {
|
|
|
46
46
|
});
|
|
47
47
|
it('should it render the alert component in success type', function () {
|
|
48
48
|
var container = setup({
|
|
49
|
-
|
|
49
|
+
content: 'test',
|
|
50
50
|
title: 'Test Toast',
|
|
51
51
|
type: 'success'
|
|
52
52
|
});
|
|
@@ -54,7 +54,7 @@ describe('Alert', function () {
|
|
|
54
54
|
});
|
|
55
55
|
it('should it render the alert component in error type', function () {
|
|
56
56
|
var container = setup({
|
|
57
|
-
|
|
57
|
+
content: 'test',
|
|
58
58
|
title: 'Test Toast',
|
|
59
59
|
type: 'error'
|
|
60
60
|
});
|
|
@@ -62,7 +62,7 @@ describe('Alert', function () {
|
|
|
62
62
|
});
|
|
63
63
|
it('should it render the alert component in warning type', function () {
|
|
64
64
|
var container = setup({
|
|
65
|
-
|
|
65
|
+
content: 'test',
|
|
66
66
|
title: 'Test Toast',
|
|
67
67
|
type: 'warning'
|
|
68
68
|
});
|
|
@@ -70,7 +70,7 @@ describe('Alert', function () {
|
|
|
70
70
|
});
|
|
71
71
|
it('should it render the alert component in critical type', function () {
|
|
72
72
|
var container = setup({
|
|
73
|
-
|
|
73
|
+
content: 'test',
|
|
74
74
|
title: 'Test Toast',
|
|
75
75
|
type: 'critical'
|
|
76
76
|
});
|
|
@@ -81,7 +81,7 @@ describe('Alert', function () {
|
|
|
81
81
|
|
|
82
82
|
var onClose = jest.fn();
|
|
83
83
|
var container = setup({
|
|
84
|
-
|
|
84
|
+
content: 'test',
|
|
85
85
|
title: 'Test Toast',
|
|
86
86
|
variant: 'closable',
|
|
87
87
|
onClose: onClose
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAa3B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAoCzB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -16,14 +16,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
18
|
var Alert = function Alert(_ref) {
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
var title = _ref.title,
|
|
20
|
+
content = _ref.content,
|
|
21
|
+
maxWidth = _ref.maxWidth,
|
|
22
22
|
onClose = _ref.onClose,
|
|
23
|
-
title = _ref.title,
|
|
24
|
-
fullWidth = _ref.fullWidth,
|
|
25
|
-
isLoading = _ref.isLoading,
|
|
26
|
-
children = _ref.children,
|
|
27
23
|
_ref$icon = _ref.icon,
|
|
28
24
|
icon = _ref$icon === void 0 ? 'info' : _ref$icon,
|
|
29
25
|
_ref$type = _ref.type,
|
|
@@ -31,13 +27,11 @@ var Alert = function Alert(_ref) {
|
|
|
31
27
|
_ref$variant = _ref.variant,
|
|
32
28
|
variant = _ref$variant === void 0 ? 'filled' : _ref$variant;
|
|
33
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledAlertContainer, {
|
|
34
|
-
children:
|
|
35
|
-
|
|
36
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.StyledAlertWrapper, {
|
|
37
|
-
haveContent: !!message || !!children,
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.StyledAlertWrapper, {
|
|
31
|
+
haveContent: !!content && !!title,
|
|
38
32
|
variant: variant,
|
|
39
33
|
type: type,
|
|
40
|
-
|
|
34
|
+
maxWidth: maxWidth,
|
|
41
35
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledIconBox, {
|
|
42
36
|
type: type,
|
|
43
37
|
variant: variant,
|
|
@@ -47,25 +41,11 @@ var Alert = function Alert(_ref) {
|
|
|
47
41
|
size: variant === 'outlined' ? '1.375rem' : '2rem'
|
|
48
42
|
})
|
|
49
43
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.StyledColumn, {
|
|
50
|
-
|
|
51
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
44
|
+
children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
52
45
|
fontSize: "xs",
|
|
53
46
|
fontWeight: "bold",
|
|
54
47
|
children: title
|
|
55
|
-
}),
|
|
56
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
57
|
-
fontSize: "xs",
|
|
58
|
-
fontWeight: "400",
|
|
59
|
-
children: message
|
|
60
|
-
}), buttonTitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledButtonRow, {
|
|
61
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledButton, {
|
|
62
|
-
onClick: function onClick() {
|
|
63
|
-
return onButtonClick && onButtonClick();
|
|
64
|
-
},
|
|
65
|
-
children: buttonTitle
|
|
66
|
-
})
|
|
67
|
-
})]
|
|
68
|
-
})]
|
|
48
|
+
}), content]
|
|
69
49
|
}), variant === 'closable' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledCloseIcon, {
|
|
70
50
|
onClick: function onClick() {
|
|
71
51
|
return onClose && onClose();
|
|
@@ -17,21 +17,9 @@ export declare const StyledIconBox: import("@emotion/styled").StyledComponent<{
|
|
|
17
17
|
export declare const StyledColumn: import("@emotion/styled").StyledComponent<{
|
|
18
18
|
theme?: import("@emotion/react").Theme | undefined;
|
|
19
19
|
as?: import("react").ElementType<any> | undefined;
|
|
20
|
-
} & IStyledAlert, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
21
|
-
export declare const StyledCloseIcon: import("@emotion/styled").StyledComponent<{
|
|
22
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
-
as?: import("react").ElementType<any> | undefined;
|
|
24
20
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
25
|
-
export declare const
|
|
26
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
27
|
-
as?: import("react").ElementType<any> | undefined;
|
|
28
|
-
} & IStyledAlert, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
29
|
-
export declare const StyledButtonRow: import("@emotion/styled").StyledComponent<{
|
|
21
|
+
export declare const StyledCloseIcon: import("@emotion/styled").StyledComponent<{
|
|
30
22
|
theme?: import("@emotion/react").Theme | undefined;
|
|
31
23
|
as?: import("react").ElementType<any> | undefined;
|
|
32
24
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
33
|
-
export declare const StyledButton: import("@emotion/styled").StyledComponent<{
|
|
34
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
35
|
-
as?: import("react").ElementType<any> | undefined;
|
|
36
|
-
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
37
25
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,oBAAoB;;;yGAEhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,oBAAoB;;;yGAEhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;wHAsB7B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;iBAA4C,OAAO;yGA0B3E,CAAC;AAEH,eAAO,MAAM,YAAY;;;yGASxB,CAAC;AAEF,eAAO,MAAM,eAAe;;;yGAS3B,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledIconBox = exports.StyledColumn = exports.StyledCloseIcon = exports.
|
|
6
|
+
exports.StyledIconBox = exports.StyledColumn = exports.StyledCloseIcon = exports.StyledAlertWrapper = exports.StyledAlertContainer = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
|
11
11
|
|
|
12
12
|
var _colorCheck = require("../../utils/colorCheck");
|
|
13
13
|
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
@@ -22,10 +22,8 @@ var StyledAlertContainer = _styled.default.div(_templateObject || (_templateObje
|
|
|
22
22
|
exports.StyledAlertContainer = StyledAlertContainer;
|
|
23
23
|
|
|
24
24
|
var StyledAlertWrapper = _styled.default.div(function (props) {
|
|
25
|
-
var buttonPrimaryColor = props.type !== 'default' && props.type ? props.theme.colors[props.type].default : props.theme.colors.neutral.neutral3;
|
|
26
|
-
var buttonSecondaryColor = props.type !== 'default' && props.type ? props.theme.colorMode === 'dark' ? props.theme.colors[props.type].dark : props.theme.colors[props.type].blurred : props.theme.colors.neutral.neutral1;
|
|
27
25
|
var secondaryColor = props.type !== 'default' && props.type ? props.theme.colorMode === 'dark' ? props.theme.colors[props.type].dark : props.theme.colors[props.type].blurred : props.theme.colorMode === 'dark' ? props.theme.colors.neutral.neutral6 : props.theme.colors.neutral.neutral1;
|
|
28
|
-
return (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: ", ";\n padding: 1rem;\n gap: 1rem;\n border-radius: 8px;\n
|
|
26
|
+
return (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: ", ";\n padding: 1rem;\n gap: 1rem;\n border-radius: 8px;\n width: 100%;\n background-color: ", ";\n border: ", ";\n color: ", ";\n max-width: ", ";\n "])), props.haveContent ? 'flex-start' : 'center', props.variant === 'outlined' ? 'transparent' : secondaryColor, props.variant === 'outlined' ? "2px solid ".concat(secondaryColor, ";") : '', props.variant === 'outlined' ? props.theme.colors.neutral.neutral4 : '', props.maxWidth ? "".concat(props.maxWidth, "px") : '');
|
|
29
27
|
});
|
|
30
28
|
|
|
31
29
|
exports.StyledAlertWrapper = StyledAlertWrapper;
|
|
@@ -47,22 +45,4 @@ var StyledCloseIcon = _styled.default.div(_templateObject5 || (_templateObject5
|
|
|
47
45
|
return props.theme.colorMode === 'dark' ? props.theme.colors.neutral.white : props.theme.colors.neutral.black;
|
|
48
46
|
});
|
|
49
47
|
|
|
50
|
-
exports.StyledCloseIcon = StyledCloseIcon;
|
|
51
|
-
|
|
52
|
-
var StyledAlertSkeleton = _styled.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: 104px;\n width: ", ";\n border-radius: 8px;\n background-color: ", ";\n overflow: hidden;\n\n &::after {\n content: '';\n inset: 0px;\n width: 100%;\n height: 100%;\n display: block;\n animation: 1.6s linear 0.5s infinite normal none running move;\n transform: translateX(-100%);\n background: linear-gradient(\n 90deg,\n transparent,\n ", ",\n transparent\n );\n }\n\n @keyframes move {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(100%);\n }\n }\n"])), function (props) {
|
|
53
|
-
return props.fullWidth ? '100%' : '459px';
|
|
54
|
-
}, function (props) {
|
|
55
|
-
return props.theme.colors.neutral.neutral1;
|
|
56
|
-
}, function (props) {
|
|
57
|
-
return props.theme.colors.neutral.neutral2;
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
exports.StyledAlertSkeleton = StyledAlertSkeleton;
|
|
61
|
-
|
|
62
|
-
var StyledButtonRow = _styled.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n"])));
|
|
63
|
-
|
|
64
|
-
exports.StyledButtonRow = StyledButtonRow;
|
|
65
|
-
|
|
66
|
-
var StyledButton = _styled.default.button(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral([""])));
|
|
67
|
-
|
|
68
|
-
exports.StyledButton = StyledButton;
|
|
48
|
+
exports.StyledCloseIcon = StyledCloseIcon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ExtendThemeProps } from 'src';
|
|
3
3
|
import { IconName } from '../Icon/types';
|
|
4
|
-
export declare type
|
|
4
|
+
export declare type AlertProps = {
|
|
5
5
|
/**
|
|
6
6
|
* The icon of the alert.
|
|
7
7
|
* @default 'info'
|
|
@@ -20,32 +20,15 @@ export declare type IAlertProps = {
|
|
|
20
20
|
/**
|
|
21
21
|
* The message of the alert
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The children of the alert
|
|
26
|
-
* @default undefined
|
|
27
|
-
*/
|
|
28
|
-
children?: ReactNode;
|
|
23
|
+
content?: ReactNode;
|
|
29
24
|
/**
|
|
30
25
|
* The title of the alert
|
|
31
26
|
*/
|
|
32
|
-
title
|
|
33
|
-
/**
|
|
34
|
-
* The title of the alert button
|
|
35
|
-
*/
|
|
36
|
-
buttonTitle?: string;
|
|
37
|
-
/**
|
|
38
|
-
* The action of the alert button
|
|
39
|
-
*/
|
|
40
|
-
onButtonClick?: () => void;
|
|
41
|
-
/**
|
|
42
|
-
* Whether the alert is loading
|
|
43
|
-
*/
|
|
44
|
-
isLoading?: boolean;
|
|
27
|
+
title?: string;
|
|
45
28
|
/**
|
|
46
|
-
* Sets a
|
|
29
|
+
* Sets a max width to alert
|
|
47
30
|
*/
|
|
48
|
-
|
|
31
|
+
maxWidth?: number;
|
|
49
32
|
/**
|
|
50
33
|
* Provides a callback that is called when the close button is clicked.
|
|
51
34
|
* @description This props are available when variant is set to 'closable'
|
|
@@ -53,7 +36,7 @@ export declare type IAlertProps = {
|
|
|
53
36
|
onClose?: () => void;
|
|
54
37
|
};
|
|
55
38
|
export declare type IStyledAlert = {
|
|
56
|
-
|
|
39
|
+
maxWidth?: number;
|
|
57
40
|
variant?: 'outlined' | 'filled' | 'closable';
|
|
58
41
|
type?: 'default' | 'success' | 'warning' | 'error' | 'critical' | 'informative';
|
|
59
42
|
theme?: ExtendThemeProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,oBAAY,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,oBAAY,UAAU,GAAG;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC7C;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC;IAChF;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC7C,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC;IAChF,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
|
@@ -102,7 +102,7 @@ describe('Button', function () {
|
|
|
102
102
|
children: "Click Me"
|
|
103
103
|
}));
|
|
104
104
|
expect(_react.screen.getByRole('button')).toBeDisabled();
|
|
105
|
-
expect(_react.screen.getByRole('button')).toHaveStyle('cursor:
|
|
105
|
+
expect(_react.screen.getByRole('button')).not.toHaveStyle('cursor: pointer');
|
|
106
106
|
});
|
|
107
107
|
it('should render a ghost variant button', function () {
|
|
108
108
|
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export default Button;
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonProps } from './types';
|
|
3
|
+
export default function Button({ children, leftIcon, rightIcon, isLoading, variant, bgColor, size, fullWidth, textColor, type, iconColor, ...props }: ButtonProps & ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAM7C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,OAAiB,EACjB,OAAY,EACZ,IAAW,EACX,SAAS,EACT,SAAc,EACd,IAAe,EACf,SAAc,EACd,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,eAoEvD"}
|
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
7
|
-
|
|
8
|
-
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
6
|
+
exports.default = Button;
|
|
9
7
|
|
|
10
8
|
var _index = require("../../shared/theme/index");
|
|
11
9
|
|
|
12
10
|
var _getColorValue = require("../../utils/getColorValue");
|
|
13
11
|
|
|
14
|
-
var
|
|
12
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
15
13
|
|
|
16
14
|
var _Skeleton = _interopRequireDefault(require("../Skeleton"));
|
|
17
15
|
|
|
16
|
+
var _styles = require("./styles");
|
|
17
|
+
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
|
|
20
|
-
var _excluded = ["children", "leftIcon", "rightIcon", "isLoading", "variant", "bgColor", "size", "fullWidth", "textColor", "type"];
|
|
20
|
+
var _excluded = ["children", "leftIcon", "rightIcon", "isLoading", "variant", "bgColor", "size", "fullWidth", "textColor", "type", "iconColor"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
@@ -31,7 +31,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
31
31
|
|
|
32
32
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
function Button(_ref) {
|
|
35
35
|
var children = _ref.children,
|
|
36
36
|
leftIcon = _ref.leftIcon,
|
|
37
37
|
rightIcon = _ref.rightIcon,
|
|
@@ -47,13 +47,16 @@ var Button = function Button(_ref) {
|
|
|
47
47
|
textColor = _ref$textColor === void 0 ? '' : _ref$textColor,
|
|
48
48
|
_ref$type = _ref.type,
|
|
49
49
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
50
|
+
_ref$iconColor = _ref.iconColor,
|
|
51
|
+
iconColor = _ref$iconColor === void 0 ? '' : _ref$iconColor,
|
|
50
52
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
51
53
|
|
|
52
54
|
var _useTheme = (0, _index.useTheme)(),
|
|
53
55
|
theme = _useTheme.theme;
|
|
54
56
|
|
|
55
57
|
var parsedBgColor = (0, _getColorValue.getColorValue)(bgColor, theme, 'success.default');
|
|
56
|
-
var parsedTextColor = (0, _getColorValue.getColorValue)(textColor, theme, '
|
|
58
|
+
var parsedTextColor = (0, _getColorValue.getColorValue)(textColor, theme, 'neutral.white');
|
|
59
|
+
var parsedIconColor = (0, _getColorValue.getColorValue)(iconColor, theme, 'neutral.white');
|
|
57
60
|
|
|
58
61
|
var getThemeHex = function getThemeHex(path, obj) {
|
|
59
62
|
var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
|
|
@@ -79,6 +82,10 @@ var Button = function Button(_ref) {
|
|
|
79
82
|
parsedTextColor = getThemeHex(parsedTextColor, theme);
|
|
80
83
|
}
|
|
81
84
|
|
|
85
|
+
if (parsedIconColor.includes('.')) {
|
|
86
|
+
parsedIconColor = getThemeHex(parsedIconColor, theme);
|
|
87
|
+
}
|
|
88
|
+
|
|
82
89
|
if (isLoading) {
|
|
83
90
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Skeleton.default, {
|
|
84
91
|
width: 200,
|
|
@@ -87,19 +94,19 @@ var Button = function Button(_ref) {
|
|
|
87
94
|
});
|
|
88
95
|
}
|
|
89
96
|
|
|
90
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
97
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ButtonContainer, _objectSpread(_objectSpread({
|
|
98
|
+
bgColor: parsedBgColor,
|
|
99
|
+
textColor: parsedTextColor,
|
|
100
|
+
fullWidth: fullWidth,
|
|
101
|
+
isLoading: isLoading,
|
|
102
|
+
variant: variant,
|
|
103
|
+
size: size,
|
|
104
|
+
type: type
|
|
99
105
|
}, props), {}, {
|
|
100
106
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.IconContainer, {
|
|
101
107
|
children: [leftIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.IconWrapper, {
|
|
102
108
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
109
|
+
color: parsedIconColor,
|
|
103
110
|
name: leftIcon,
|
|
104
111
|
size: iconSize,
|
|
105
112
|
"data-testid": "leftIconId"
|
|
@@ -107,13 +114,11 @@ var Button = function Button(_ref) {
|
|
|
107
114
|
}), children, !leftIcon && rightIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.IconWrapper, {
|
|
108
115
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
109
116
|
name: rightIcon,
|
|
117
|
+
color: parsedIconColor,
|
|
110
118
|
size: iconSize,
|
|
111
119
|
"data-testid": "rightIconId"
|
|
112
120
|
})
|
|
113
121
|
})]
|
|
114
122
|
})
|
|
115
123
|
}));
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
var _default = Button;
|
|
119
|
-
exports.default = _default;
|
|
124
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
2
|
+
import { ButtonProps } from './types';
|
|
3
|
+
export declare const ButtonContainer: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
} &
|
|
6
|
+
} & ButtonProps, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
7
7
|
export declare const IconContainer: import("@emotion/styled").StyledComponent<{
|
|
8
8
|
theme?: import("@emotion/react").Theme | undefined;
|
|
9
9
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Button/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,eAAe;;;mIAmI3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAKzB,CAAC;AAEF,eAAO,MAAM,WAAW;;;yGAIvB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.IconWrapper = exports.IconContainer = exports.
|
|
6
|
+
exports.IconWrapper = exports.IconContainer = exports.ButtonContainer = void 0;
|
|
7
7
|
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
|
|
@@ -19,104 +19,103 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
19
19
|
|
|
20
20
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var ButtonContainer = _styled.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-family: inherit;\n font-weight: ", ";\n font-size: ", ";\n border-radius: 8px;\n border: 0px;\n cursor: pointer;\n padding-inline: 24px;\n --button-brightness: brightness(0.85);\n\n transition: all 0.15s ease-in-out;\n\n color: ", ";\n\n background-color: ", ";\n\n height: ", ";\n\n width: ", ";\n\n &:disabled {\n filter: opacity(0.5);\n cursor: default;\n }\n\n ", "\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n\n @media screen and (min-width: ", ") {\n width: ", ";\n }\n"])), function (_ref) {
|
|
23
23
|
var theme = _ref.theme;
|
|
24
24
|
return theme.fontWeight[600];
|
|
25
25
|
}, function (_ref2) {
|
|
26
26
|
var theme = _ref2.theme;
|
|
27
27
|
return theme.fontSizes.xs;
|
|
28
28
|
}, function (_ref3) {
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return (_button$textColor = button.textColor) !== null && _button$textColor !== void 0 ? _button$textColor : baseColor;
|
|
29
|
+
var theme = _ref3.theme,
|
|
30
|
+
textColor = _ref3.textColor,
|
|
31
|
+
bgColor = _ref3.bgColor;
|
|
32
|
+
var baseColor = (0, _invertColor.invertColor)(textColor || bgColor || theme.colors.primary.default, true);
|
|
33
|
+
return textColor !== null && textColor !== void 0 ? textColor : baseColor;
|
|
35
34
|
}, function (_ref4) {
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
theme = _ref4.theme;
|
|
40
|
-
return (_button$bgColor = button.bgColor) !== null && _button$bgColor !== void 0 ? _button$bgColor : theme.colors.primary.default;
|
|
35
|
+
var theme = _ref4.theme,
|
|
36
|
+
bgColor = _ref4.bgColor;
|
|
37
|
+
return bgColor !== null && bgColor !== void 0 ? bgColor : theme.colors.primary.default;
|
|
41
38
|
}, function (_ref5) {
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
if (
|
|
39
|
+
var theme = _ref5.theme,
|
|
40
|
+
size = _ref5.size;
|
|
41
|
+
if (size) return theme.buttonSize[size];
|
|
45
42
|
return theme.buttonSize.md;
|
|
46
43
|
}, function (_ref6) {
|
|
47
|
-
var
|
|
44
|
+
var fullWidth = _ref6.fullWidth;
|
|
48
45
|
|
|
49
|
-
if (
|
|
50
|
-
if (_typeof(
|
|
51
|
-
return
|
|
46
|
+
if (fullWidth) {
|
|
47
|
+
if (_typeof(fullWidth) === 'object' && fullWidth !== undefined) {
|
|
48
|
+
return fullWidth.base && '100%';
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
return '100%';
|
|
55
52
|
}
|
|
56
53
|
}, function (_ref7) {
|
|
57
|
-
var
|
|
58
|
-
|
|
54
|
+
var theme = _ref7.theme,
|
|
55
|
+
variant = _ref7.variant,
|
|
56
|
+
textColor = _ref7.textColor,
|
|
57
|
+
bgColor = _ref7.bgColor;
|
|
59
58
|
|
|
60
|
-
switch (
|
|
59
|
+
switch (variant) {
|
|
61
60
|
case 'solid':
|
|
62
61
|
return (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &:is(&:hover, &:focus):not(:disabled) {\n box-shadow: inset 0 0 40px 40px rgba(0, 0, 0, 0.2);\n }\n "])));
|
|
63
62
|
|
|
64
63
|
case 'outline':
|
|
65
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n border: 3px ", " solid;\n box-shadow: none;\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])),
|
|
64
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n border: 3px ", " solid;\n box-shadow: none;\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])), textColor || bgColor || theme.colors.primary.default, bgColor || textColor || theme.colors.primary.default);
|
|
66
65
|
|
|
67
66
|
case 'ghost':
|
|
68
|
-
return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-inline: 0;\n background-color: transparent;\n color: ", ";\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])),
|
|
67
|
+
return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-inline: 0;\n background-color: transparent;\n color: ", ";\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])), bgColor || textColor || theme.colors.primary.default);
|
|
69
68
|
|
|
70
69
|
case 'link':
|
|
71
|
-
return (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-inline: 0;\n text-decoration: underline;\n background-color: transparent;\n color: ", ";\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])),
|
|
70
|
+
return (0, _react.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-inline: 0;\n text-decoration: underline;\n background-color: transparent;\n color: ", ";\n &:is(&:hover, &:focus):not(:disabled) {\n filter: var(--button-brightness);\n }\n "])), bgColor || textColor || theme.colors.primary.default);
|
|
72
71
|
}
|
|
73
72
|
}, function (_ref8) {
|
|
74
73
|
var theme = _ref8.theme;
|
|
75
74
|
return theme.breakpoints.sm;
|
|
76
75
|
}, function (_ref9) {
|
|
77
|
-
var
|
|
76
|
+
var fullWidth = _ref9.fullWidth;
|
|
78
77
|
|
|
79
|
-
if (_typeof(
|
|
80
|
-
var widthWasNotSet =
|
|
78
|
+
if (_typeof(fullWidth) === 'object') {
|
|
79
|
+
var widthWasNotSet = fullWidth.sm === undefined;
|
|
81
80
|
if (widthWasNotSet) return;
|
|
82
|
-
return
|
|
81
|
+
return fullWidth.sm ? '100%' : 'fit-content';
|
|
83
82
|
}
|
|
84
83
|
}, function (_ref10) {
|
|
85
84
|
var theme = _ref10.theme;
|
|
86
85
|
return theme.breakpoints.md;
|
|
87
86
|
}, function (_ref11) {
|
|
88
|
-
var
|
|
87
|
+
var fullWidth = _ref11.fullWidth;
|
|
89
88
|
|
|
90
|
-
if (_typeof(
|
|
91
|
-
var widthWasNotSet =
|
|
89
|
+
if (_typeof(fullWidth) === 'object') {
|
|
90
|
+
var widthWasNotSet = fullWidth.md === undefined;
|
|
92
91
|
if (widthWasNotSet) return;
|
|
93
|
-
return
|
|
92
|
+
return fullWidth.md ? '100%' : 'fit-content';
|
|
94
93
|
}
|
|
95
94
|
}, function (_ref12) {
|
|
96
95
|
var theme = _ref12.theme;
|
|
97
96
|
return theme.breakpoints.lg;
|
|
98
97
|
}, function (_ref13) {
|
|
99
|
-
var
|
|
98
|
+
var fullWidth = _ref13.fullWidth;
|
|
100
99
|
|
|
101
|
-
if (_typeof(
|
|
102
|
-
var widthWasNotSet =
|
|
100
|
+
if (_typeof(fullWidth) === 'object') {
|
|
101
|
+
var widthWasNotSet = fullWidth.lg === undefined;
|
|
103
102
|
if (widthWasNotSet) return;
|
|
104
|
-
return
|
|
103
|
+
return fullWidth.lg ? '100%' : 'fit-content';
|
|
105
104
|
}
|
|
106
105
|
}, function (_ref14) {
|
|
107
106
|
var theme = _ref14.theme;
|
|
108
107
|
return theme.breakpoints.xl;
|
|
109
108
|
}, function (_ref15) {
|
|
110
|
-
var
|
|
109
|
+
var fullWidth = _ref15.fullWidth;
|
|
111
110
|
|
|
112
|
-
if (_typeof(
|
|
113
|
-
var widthWasNotSet =
|
|
111
|
+
if (_typeof(fullWidth) === 'object') {
|
|
112
|
+
var widthWasNotSet = fullWidth.xl === undefined;
|
|
114
113
|
if (widthWasNotSet) return;
|
|
115
|
-
return
|
|
114
|
+
return fullWidth.xl ? '100%' : 'fit-content';
|
|
116
115
|
}
|
|
117
116
|
});
|
|
118
117
|
|
|
119
|
-
exports.
|
|
118
|
+
exports.ButtonContainer = ButtonContainer;
|
|
120
119
|
|
|
121
120
|
var IconContainer = _styled.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.45em;\n"])));
|
|
122
121
|
|