@pedidopago/ui 1.3.9 → 1.3.12
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/DateInput/index.js +9 -9
- package/dist/components/Icon/data/dash.d.ts.map +1 -1
- package/dist/components/Icon/data/dash.js +1 -1
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/Icon/types.d.ts.map +1 -1
- package/dist/components/Illustration/index.js +1 -1
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +3 -0
- package/dist/components/RadioInput/components/ChoiceList/index.d.ts +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.d.ts.map +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.js +61 -76
- package/dist/components/RadioInput/index.d.ts.map +1 -1
- package/dist/components/RadioInput/index.js +22 -69
- package/dist/components/RadioInput/radio-input.test.js +44 -98
- package/dist/components/RadioInput/styles.d.ts.map +1 -1
- package/dist/components/RadioInput/styles.js +5 -11
- package/dist/components/RadioInput/types.d.ts +6 -34
- package/dist/components/RadioInput/types.d.ts.map +1 -1
- package/dist/components/Skeleton/index.d.ts.map +1 -1
- package/dist/components/Skeleton/index.js +4 -5
- package/dist/components/Skeleton/styles.d.ts.map +1 -1
- package/dist/components/Skeleton/styles.js +4 -2
- package/dist/components/Slider/index.d.ts.map +1 -1
- package/dist/components/Slider/index.js +3 -0
- package/dist/components/Steps/index.js +1 -1
- package/dist/components/Steps/types.d.ts +2 -3
- package/dist/components/Steps/types.d.ts.map +1 -1
- package/dist/shared/hooks/useDisableBodyScroll.d.ts.map +1 -1
- package/dist/shared/hooks/useDisableBodyScroll.js +2 -1
- package/package.json +1 -1
|
@@ -32,11 +32,14 @@ describe('Radio Input', function () {
|
|
|
32
32
|
it('should check input on Click on input', function () {
|
|
33
33
|
var fn = jest.fn();
|
|
34
34
|
|
|
35
|
-
var _render2 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
var _render2 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChoiceList.default, {
|
|
36
|
+
radiosName: "radio",
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
38
|
+
onChange: fn,
|
|
39
|
+
value: "test",
|
|
40
|
+
id: "test",
|
|
41
|
+
children: "Radio Test"
|
|
42
|
+
})
|
|
40
43
|
})),
|
|
41
44
|
container = _render2.container;
|
|
42
45
|
|
|
@@ -49,11 +52,14 @@ describe('Radio Input', function () {
|
|
|
49
52
|
it('should check input on Click label', function () {
|
|
50
53
|
var fn = jest.fn();
|
|
51
54
|
|
|
52
|
-
var _render3 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
var _render3 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChoiceList.default, {
|
|
56
|
+
radiosName: "radio",
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
58
|
+
onChange: fn,
|
|
59
|
+
value: "test",
|
|
60
|
+
id: "test",
|
|
61
|
+
children: "Radio Test"
|
|
62
|
+
})
|
|
57
63
|
})),
|
|
58
64
|
container = _render3.container,
|
|
59
65
|
getByText = _render3.getByText;
|
|
@@ -68,12 +74,15 @@ describe('Radio Input', function () {
|
|
|
68
74
|
it('should checked input if defaultChecked is provided', function () {
|
|
69
75
|
var fn = jest.fn();
|
|
70
76
|
|
|
71
|
-
var _render4 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
var _render4 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChoiceList.default, {
|
|
78
|
+
defaultValue: "test",
|
|
79
|
+
radiosName: "radio",
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
81
|
+
onChange: fn,
|
|
82
|
+
value: "test",
|
|
83
|
+
id: "test",
|
|
84
|
+
children: "Radio Test"
|
|
85
|
+
})
|
|
77
86
|
})),
|
|
78
87
|
container = _render4.container;
|
|
79
88
|
|
|
@@ -83,87 +92,27 @@ describe('Radio Input', function () {
|
|
|
83
92
|
it('should call onChange on Click input', function () {
|
|
84
93
|
var fn = jest.fn();
|
|
85
94
|
|
|
86
|
-
var _render5 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
var _render5 = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChoiceList.default, {
|
|
96
|
+
onChangeValue: fn,
|
|
97
|
+
radiosName: "radio",
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
99
|
+
value: "test",
|
|
100
|
+
id: "test",
|
|
101
|
+
children: "Radio Test"
|
|
102
|
+
})
|
|
91
103
|
})),
|
|
92
104
|
container = _render5.container;
|
|
93
105
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
_react.fireEvent.click(radio);
|
|
106
|
+
_react.fireEvent.click(container);
|
|
97
107
|
|
|
98
108
|
expect(fn).toBeCalled();
|
|
99
109
|
});
|
|
100
|
-
it('should ChoiceList control radio childrens', function () {
|
|
101
|
-
var fn = jest.fn();
|
|
102
|
-
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
|
|
103
|
-
onChange: fn,
|
|
104
|
-
value: "test1",
|
|
105
|
-
name: "test-name",
|
|
106
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
107
|
-
value: "test1",
|
|
108
|
-
id: "test",
|
|
109
|
-
children: "Radio Test 1"
|
|
110
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
111
|
-
value: "test2",
|
|
112
|
-
id: "test",
|
|
113
|
-
children: "Radio Test 2"
|
|
114
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
115
|
-
value: "test3",
|
|
116
|
-
id: "test",
|
|
117
|
-
children: "Radio Test 3"
|
|
118
|
-
})]
|
|
119
|
-
}));
|
|
120
|
-
|
|
121
|
-
var sut = _react.screen.getAllByRole('radio');
|
|
122
|
-
|
|
123
|
-
expect(sut[0]).toBeChecked();
|
|
124
|
-
expect(sut[1]).not.toBeChecked();
|
|
125
|
-
expect(sut[2]).not.toBeChecked();
|
|
126
|
-
});
|
|
127
|
-
it('Should ChoiceList change checked radio children is defaultValue is provided', function () {
|
|
128
|
-
var fn = jest.fn();
|
|
129
|
-
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
|
|
130
|
-
onChange: fn,
|
|
131
|
-
value: "",
|
|
132
|
-
name: "test-name",
|
|
133
|
-
defaultValue: "test3",
|
|
134
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
135
|
-
value: "test1",
|
|
136
|
-
id: "test",
|
|
137
|
-
children: "Radio Test 1"
|
|
138
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
139
|
-
value: "test2",
|
|
140
|
-
id: "test",
|
|
141
|
-
children: "Radio Test 2"
|
|
142
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
143
|
-
value: "test3",
|
|
144
|
-
id: "test",
|
|
145
|
-
children: "Radio Test 3"
|
|
146
|
-
})]
|
|
147
|
-
}));
|
|
148
|
-
|
|
149
|
-
var sut = _react.screen.getAllByRole('radio');
|
|
150
|
-
|
|
151
|
-
expect(sut[0]).not.toBeChecked();
|
|
152
|
-
expect(sut[1]).not.toBeChecked();
|
|
153
|
-
expect(sut[2]).toBeChecked();
|
|
154
|
-
|
|
155
|
-
_react.fireEvent.click(sut[0]);
|
|
156
|
-
|
|
157
|
-
expect(sut[0]).toBeChecked();
|
|
158
|
-
expect(sut[2]).not.toBeChecked();
|
|
159
|
-
});
|
|
160
110
|
it('Should ChoiceList disabled radio children is isDisabled is provided', function () {
|
|
161
111
|
var fn = jest.fn();
|
|
162
112
|
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
|
|
163
|
-
|
|
164
|
-
value: "",
|
|
113
|
+
onChangeValue: fn,
|
|
165
114
|
isDisabled: true,
|
|
166
|
-
|
|
115
|
+
radiosName: "test-name",
|
|
167
116
|
defaultValue: "test3",
|
|
168
117
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
169
118
|
value: "test1",
|
|
@@ -189,9 +138,8 @@ describe('Radio Input', function () {
|
|
|
189
138
|
it('should render helpText if helpText is provided', function () {
|
|
190
139
|
var fn = jest.fn();
|
|
191
140
|
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
name: "test-name",
|
|
141
|
+
onChangeValue: fn,
|
|
142
|
+
radiosName: "test-name",
|
|
195
143
|
defaultValue: "test3",
|
|
196
144
|
helpText: "Help Text",
|
|
197
145
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
@@ -213,10 +161,9 @@ describe('Radio Input', function () {
|
|
|
213
161
|
it('should render label if label is provided', function () {
|
|
214
162
|
var fn = jest.fn();
|
|
215
163
|
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
|
|
216
|
-
|
|
217
|
-
value: "",
|
|
164
|
+
onChangeValue: fn,
|
|
218
165
|
label: "any_label",
|
|
219
|
-
|
|
166
|
+
radiosName: "test-name",
|
|
220
167
|
defaultValue: "test3",
|
|
221
168
|
helpText: "Help Text",
|
|
222
169
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
@@ -233,14 +180,13 @@ describe('Radio Input', function () {
|
|
|
233
180
|
children: "Radio Test 3"
|
|
234
181
|
})]
|
|
235
182
|
}));
|
|
236
|
-
expect(_react.screen.getByRole('radiogroup').children[
|
|
183
|
+
expect(_react.screen.getByRole('radiogroup').children[1].tagName.toLowerCase()).toBe('label');
|
|
237
184
|
});
|
|
238
185
|
it('should not render label if label not provided', function () {
|
|
239
186
|
var fn = jest.fn();
|
|
240
187
|
(0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChoiceList.default, {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
name: "test-name",
|
|
188
|
+
onChangeValue: fn,
|
|
189
|
+
radiosName: "test-name",
|
|
244
190
|
defaultValue: "test3",
|
|
245
191
|
helpText: "Help Text",
|
|
246
192
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
@@ -257,6 +203,6 @@ describe('Radio Input', function () {
|
|
|
257
203
|
children: "Radio Test 3"
|
|
258
204
|
})]
|
|
259
205
|
}));
|
|
260
|
-
expect(_react.screen.getByRole('radiogroup').children[
|
|
206
|
+
expect(_react.screen.getByRole('radiogroup').children[1].tagName.toLowerCase()).not.toBe('label');
|
|
261
207
|
});
|
|
262
208
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,OAAO;;;yGAInB,CAAC;AAEF,eAAO,MAAM,KAAK;;;kHAGjB,CAAC;AAEF,eAAO,MAAM,KAAK;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,OAAO;;;yGAInB,CAAC;AAEF,eAAO,MAAM,KAAK;;;kHAGjB,CAAC;AAEF,eAAO,MAAM,KAAK;;;sIAgEjB,CAAC;AAEF,eAAO,MAAM,aAAa;;;yGAAe,CAAC;AAE1C,eAAO,MAAM,WAAW;;;6HAOvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;sIASvB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;+HASpB,CAAC"}
|
|
@@ -24,13 +24,8 @@ var Label = _styled.default.label(_templateObject2 || (_templateObject2 = _tagge
|
|
|
24
24
|
exports.Label = Label;
|
|
25
25
|
|
|
26
26
|
var Input = _styled.default.input(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref) {
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
theme = _ref.theme;
|
|
30
|
-
return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n appearance: none;\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n margin: 0;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid\n ", ";\n\n cursor: pointer;\n\n + label {\n color: ", ";\n line-height: 20px;\n cursor: pointer;\n }\n\n :hover {\n border-color: ", ";\n }\n :focus {\n border-color: ", ";\n box-shadow: 0 0 0 2px ", ";\n }\n :disabled {\n cursor: default;\n border-color: ", ";\n background-color: ", ";\n + label {\n color: ", ";\n cursor: default;\n }\n }\n\n :checked {\n background-color: ", ";\n border-color: ", ";\n &:focus {\n background-color: ", ";\n border-color: ", ";\n box-shadow: 0 0 0 2px ", ";\n }\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n border-color: ", ";\n + label {\n color: ", ";\n cursor: default;\n }\n &::after {\n display: none;\n }\n }\n\n &::after {\n content: '';\n display: block;\n width: 6px;\n height: 6px;\n background: #fff;\n border-radius: 50%;\n }\n }\n "])), {
|
|
31
|
-
light: theme.colors.neutral.neutral2,
|
|
32
|
-
dark: theme.colors.neutral.neutral5
|
|
33
|
-
}[theme.colorMode], theme.colorMode === 'light' ? colorProps === null || colorProps === void 0 ? void 0 : colorProps.black : theme.colors.neutral.white, theme.colors.primary.hover, colorProps === null || colorProps === void 0 ? void 0 : colorProps.focus, colorProps === null || colorProps === void 0 ? void 0 : colorProps.grayLightness, colorProps === null || colorProps === void 0 ? void 0 : colorProps.grayLightness, colorProps === null || colorProps === void 0 ? void 0 : colorProps.grayLightness, colorProps === null || colorProps === void 0 ? void 0 : colorProps.gray, color, color, colorProps === null || colorProps === void 0 ? void 0 : colorProps.saturationFocus, colorProps === null || colorProps === void 0 ? void 0 : colorProps.saturationFocus, colorProps === null || colorProps === void 0 ? void 0 : colorProps.shadowLightness, colorProps === null || colorProps === void 0 ? void 0 : colorProps.saturation, colorProps === null || colorProps === void 0 ? void 0 : colorProps.saturation, colorProps === null || colorProps === void 0 ? void 0 : colorProps.gray, colorProps === null || colorProps === void 0 ? void 0 : colorProps.gray, colorProps === null || colorProps === void 0 ? void 0 : colorProps.graySaturation);
|
|
27
|
+
var colors = _ref.theme.colors;
|
|
28
|
+
return (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n appearance: none;\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 0;\n min-width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid ", ";\n transition: all ease 0.2s;\n cursor: pointer;\n\n + label {\n color: ", ";\n line-height: 20px;\n cursor: pointer;\n }\n\n :hover {\n border-color: ", ";\n }\n\n :disabled {\n cursor: default;\n border-color: ", ";\n background-color: ", ";\n + label {\n color: ", ";\n cursor: default;\n }\n }\n\n :checked {\n background-color: ", ";\n border-color: ", ";\n &:focus {\n background-color: ", ";\n border-color: ", ";\n box-shadow: 0 0 0 2px ", ";\n }\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n border-color: ", ";\n + label {\n color: ", ";\n cursor: default;\n }\n }\n\n &::after {\n content: '';\n width: 6px;\n height: 6px;\n background: #fff;\n border-radius: 50%;\n }\n }\n "])), colors.neutral.neutral2, colors.neutral.black, colors.primary.hover, colors.neutral.neutral1, colors.neutral.neutral1, colors.neutral.neutral2, colors.primary.default, colors.primary.default, colors.primary.focus, colors.primary.focus, colors.primary.disabled, colors.primary.hover, colors.primary.hover, colors.neutral.neutral2, colors.neutral.neutral2, colors.neutral.neutral4);
|
|
34
29
|
});
|
|
35
30
|
|
|
36
31
|
exports.Input = Input;
|
|
@@ -48,9 +43,8 @@ var ListWrapper = _styled.default.div(_templateObject6 || (_templateObject6 = _t
|
|
|
48
43
|
exports.ListWrapper = ListWrapper;
|
|
49
44
|
|
|
50
45
|
var ChoiceLabel = _styled.default.label(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref3) {
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
return (0, _react.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: block;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: ", ";\n margin-bottom: 16px;\n "])), theme.colorMode === 'light' ? colorProps === null || colorProps === void 0 ? void 0 : colorProps.black : theme.colors.neutral.white);
|
|
46
|
+
var colors = _ref3.theme.colors;
|
|
47
|
+
return (0, _react.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: block;\n font-weight: 500;\n font-size: 16px;\n line-height: 24px;\n color: ", ";\n margin-bottom: 16px;\n "])), colors.neutral.black);
|
|
54
48
|
});
|
|
55
49
|
|
|
56
50
|
exports.ChoiceLabel = ChoiceLabel;
|
|
@@ -58,7 +52,7 @@ exports.ChoiceLabel = ChoiceLabel;
|
|
|
58
52
|
var HelpText = _styled.default.span(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref4) {
|
|
59
53
|
var theme = _ref4.theme,
|
|
60
54
|
textColor = _ref4.textColor;
|
|
61
|
-
return (0, _react.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n font-size: ", ";\n color: ", ";\n font-weight:
|
|
55
|
+
return (0, _react.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n font-size: ", ";\n color: ", ";\n font-weight: 500;\n display: block;\n padding-left: 30px;\n margin-top: 18px;\n "])), theme.fontSizes.xxs, textColor);
|
|
62
56
|
});
|
|
63
57
|
|
|
64
58
|
exports.HelpText = HelpText;
|
|
@@ -1,61 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type FormRegister = {
|
|
3
|
-
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
4
|
-
onBlur: ChangeEventHandler;
|
|
5
|
-
ref: Ref<any>;
|
|
6
|
-
name: string;
|
|
7
|
-
};
|
|
8
|
-
export declare type ColorProps = {
|
|
9
|
-
black: string;
|
|
10
|
-
gray: string;
|
|
11
|
-
grayLightness: string;
|
|
12
|
-
graySaturation: string;
|
|
13
|
-
focus: string;
|
|
14
|
-
focusChecked: string;
|
|
15
|
-
shadowLightness: string;
|
|
16
|
-
saturation: string;
|
|
17
|
-
saturationFocus: string;
|
|
18
|
-
};
|
|
1
|
+
import { ReactNode } from 'react';
|
|
19
2
|
export interface IRadioInputProps {
|
|
20
3
|
isDisabled?: boolean;
|
|
21
4
|
name?: string;
|
|
22
5
|
value: string;
|
|
23
6
|
id: string;
|
|
24
|
-
children
|
|
7
|
+
children?: ReactNode;
|
|
25
8
|
color?: string;
|
|
26
9
|
defaultChecked?: boolean;
|
|
27
10
|
onChange?: (value: string) => void;
|
|
28
|
-
formRegister?: FormRegister;
|
|
29
11
|
}
|
|
30
12
|
export interface ChoiceListProps {
|
|
31
|
-
|
|
13
|
+
onChangeValue?: (value: string) => void;
|
|
32
14
|
label?: string;
|
|
33
|
-
value: string;
|
|
34
15
|
defaultValue?: string;
|
|
35
16
|
isDisabled?: boolean;
|
|
36
|
-
|
|
17
|
+
radiosName: string;
|
|
37
18
|
alignDirection?: 'column' | 'row';
|
|
38
19
|
color?: string;
|
|
39
20
|
helpText?: string;
|
|
40
21
|
children: ReactNode;
|
|
41
|
-
formRegister?: FormRegister;
|
|
42
22
|
}
|
|
43
23
|
export declare type ChoiceListContext = {
|
|
44
|
-
handleRadioClick: (e:
|
|
45
|
-
|
|
24
|
+
handleRadioClick: (e: string) => void;
|
|
25
|
+
defaultValue?: string;
|
|
46
26
|
groupName: string;
|
|
47
|
-
groupColor: string;
|
|
48
|
-
groupFormRegister?: FormRegister;
|
|
49
27
|
isDisabled?: boolean;
|
|
50
28
|
};
|
|
51
29
|
export interface IStyledRadioInput {
|
|
52
|
-
color?: string;
|
|
53
|
-
colorProps?: ColorProps;
|
|
54
30
|
textColor?: string;
|
|
55
31
|
alignDirection?: 'column' | 'row';
|
|
56
|
-
disabledColor?: string;
|
|
57
|
-
disabledWithCheckedColor?: string;
|
|
58
|
-
disabledTextColor?: string;
|
|
59
|
-
disabledTextWithCheckedColor?: string;
|
|
60
32
|
}
|
|
61
33
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/RadioInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,oBAAY,iBAAiB,GAAG;IAC9B,gBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,QAAA,MAAM,QAAQ,oCAAqC,cAAc,gBAMhE,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _styles = require("./styles");
|
|
11
9
|
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -28,9 +26,10 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
28
26
|
isLoaded = _ref.isLoaded,
|
|
29
27
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
28
|
|
|
31
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SkeletonElement, _objectSpread(_objectSpread({}, rest), {}, {
|
|
30
|
+
isLoaded: isLoaded,
|
|
31
|
+
children: children
|
|
32
|
+
}));
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
var _default = Skeleton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIlD,eAAO,MAAM,eAAe;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIlD,eAAO,MAAM,eAAe;;;iJAuF1B,CAAC"}
|
|
@@ -15,7 +15,7 @@ var _colorCheck = require("../../utils/colorCheck");
|
|
|
15
15
|
|
|
16
16
|
var _invertColor = require("../../utils/invertColor");
|
|
17
17
|
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -34,7 +34,9 @@ var SkeletonElement = _styled.default.span(function (props) {
|
|
|
34
34
|
wave: (0, _react.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: hidden;\n transform-origin: 0px 55%;\n\n &::after {\n content: '';\n inset: 0px;\n position: absolute;\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 40% {\n transform: translateX(100%);\n }\n 100% {\n transform: translateX(100%);\n }\n }\n "])), (0, _colorCheck.parseHexColorToRgba)(waveColor, waveColorOpacity)),
|
|
35
35
|
pulse: (0, _react.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n animation: 1.6s linear 0.5s infinite normal none running pulse;\n\n @keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n }\n "])))
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
var unloadedCss = (0, _react.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: block;\n position: relative;\n user-select: none;\n pointer-events: none;\n cursor: default;\n background: padding-box ", ";\n border-radius: ", ";\n width: ", ";\n height: ", ";\n color: transparent;\n\n ", ";\n "])), skeletonColor, borderRadiusByVariant[props.variant || 'text'], typeof props.width === 'number' ? props.width + 'px' : props.width || '', typeof props.height === 'number' ? props.height + 'px' : props.height || '', props.animation !== 'static' ? animationsCss[props.animation || 'wave'] : '');
|
|
38
|
+
var loadedCss = (0, _react.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: block;\n background: transparent;\n\n transition: all 300ms ease;\n "])));
|
|
39
|
+
return props.isLoaded ? loadedCss : unloadedCss;
|
|
38
40
|
});
|
|
39
41
|
|
|
40
42
|
exports.SkeletonElement = SkeletonElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,QAAA,MAAM,MAAM,yFAUT,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,QAAA,MAAM,MAAM,yFAUT,YAAY,gBAgDd,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -85,6 +85,9 @@ var Slider = function Slider(_ref) {
|
|
|
85
85
|
onChange && onChange(sliderValue);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
(0, _react.useEffect)(function () {
|
|
89
|
+
setSliderValue(value);
|
|
90
|
+
}, [value]);
|
|
88
91
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.SliderContent, {
|
|
89
92
|
direction: direction,
|
|
90
93
|
fullSize: fullSize,
|
|
@@ -52,7 +52,7 @@ var Steps = function Steps(_ref) {
|
|
|
52
52
|
|
|
53
53
|
var handleEnableControlledSteps = function handleEnableControlledSteps(step, index) {
|
|
54
54
|
var isControlledSteps = _typeof(step) === 'object';
|
|
55
|
-
if (isControlledSteps) return step.
|
|
55
|
+
if (isControlledSteps) return step.isCompleted;
|
|
56
56
|
return current > index + 1 || enableCurrentStepChecked && current === index + 1;
|
|
57
57
|
};
|
|
58
58
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
interface StepsControlled {
|
|
1
|
+
export interface StepsControlled {
|
|
2
2
|
name: string;
|
|
3
|
-
|
|
3
|
+
isCompleted: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare type StepsItems = string | StepsControlled;
|
|
6
6
|
export interface StepsProps {
|
|
@@ -18,5 +18,4 @@ export interface StepIconProps {
|
|
|
18
18
|
stepPosition: string;
|
|
19
19
|
activeColor: 'primary' | 'secondary' | 'tertiary';
|
|
20
20
|
}
|
|
21
|
-
export {};
|
|
22
21
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,oBAAY,UAAU,GAAG,MAAM,GAAG,eAAe,CAAC;AAElD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;CACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useDisableBodyScroll.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,YAAa,OAAO,
|
|
1
|
+
{"version":3,"file":"useDisableBodyScroll.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useDisableBodyScroll.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,YAAa,OAAO,SAWpD,CAAC"}
|
|
@@ -10,8 +10,9 @@ var _react = require("react");
|
|
|
10
10
|
var useDisableBodyScroll = function useDisableBodyScroll(disable) {
|
|
11
11
|
(0, _react.useEffect)(function () {
|
|
12
12
|
if (disable) {
|
|
13
|
+
var scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
14
|
+
document.body.style.paddingRight = "".concat(scrollBarWidth, "px");
|
|
13
15
|
document.body.style.overflow = 'hidden';
|
|
14
|
-
document.body.style.paddingRight = '18px';
|
|
15
16
|
} else {
|
|
16
17
|
document.body.style.overflow = '';
|
|
17
18
|
document.body.style.paddingRight = '';
|