@pedidopago/ui 1.0.7 → 1.1.1
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 +9 -1
- package/dist/components/Alert/index.js +47 -35
- package/dist/components/Avatar/avatar.test.js +9 -1
- package/dist/components/Avatar/index.js +47 -27
- package/dist/components/Badge/badge.test.js +9 -1
- package/dist/components/Badge/index.js +24 -15
- package/dist/components/Button/Button.test.js +19 -7
- package/dist/components/Button/index.js +28 -16
- package/dist/components/Card/ButtonCard/index.js +24 -10
- package/dist/components/Card/Expansion/index.js +24 -17
- package/dist/components/Card/card.test.js +9 -1
- package/dist/components/Card/index.js +43 -19
- package/dist/components/CheckboxInput/checkbox-input.test.js +9 -1
- package/dist/components/CheckboxInput/components/MultipleCheckbox.js +58 -43
- package/dist/components/CheckboxInput/index.js +29 -18
- package/dist/components/ColorPicker/colorpicker.test.js +9 -1
- package/dist/components/ColorPicker/components/ColorHue.js +17 -10
- package/dist/components/ColorPicker/components/ColorInput.js +3 -1
- package/dist/components/ColorPicker/components/ColorPickerBox.js +13 -9
- package/dist/components/ColorPicker/components/ColorPointer.js +3 -1
- package/dist/components/ColorPicker/components/ColorSelector.js +8 -2
- package/dist/components/ColorPicker/index.js +44 -34
- package/dist/components/DatePicker/components/DatePickerContent.js +113 -79
- package/dist/components/DatePicker/components/DateYearPicker.js +45 -32
- package/dist/components/DatePicker/datepicker.test.js +9 -1
- package/dist/components/DatePicker/index.js +40 -29
- package/dist/components/Dialog/dialog-example.js +21 -13
- package/dist/components/Dialog/dialog.test.js +5 -1
- package/dist/components/Dialog/index.js +59 -46
- package/dist/components/Dropzone/dropzone.test.js +9 -1
- package/dist/components/Dropzone/index.js +122 -97
- package/dist/components/Flex/flex.test.js +128 -14
- package/dist/components/Flex/index.js +11 -3
- package/dist/components/Grid/grid.test.js +86 -81
- package/dist/components/Grid/index.js +11 -3
- package/dist/components/Icon/icon.test.js +3 -3
- package/dist/components/Icon/index.js +8 -2
- package/dist/components/IconItem/IconItem.test.js +9 -1
- package/dist/components/IconItem/index.js +33 -18
- package/dist/components/ImageItem/imageFake.js +13 -9
- package/dist/components/ImageItem/index.js +36 -24
- package/dist/components/ImageItem/input.test.js +10 -7
- package/dist/components/Input/index.js +67 -40
- package/dist/components/Input/input.test.js +4 -4
- package/dist/components/Label/index.js +12 -9
- package/dist/components/Label/input.test.js +3 -1
- package/dist/components/List/index.js +15 -4
- package/dist/components/List/list.test.js +36 -18
- package/dist/components/Menu/components/Submenu.js +49 -26
- package/dist/components/Menu/index.js +19 -10
- package/dist/components/Menu/menu.test.js +14 -14
- package/dist/components/Modal/index.js +24 -19
- package/dist/components/Modal/modal.test.js +44 -12
- package/dist/components/Pagination/index.js +54 -45
- package/dist/components/Pagination/pagination.test.js +13 -11
- package/dist/components/Progress/Circle/index.js +38 -29
- package/dist/components/Progress/Linear/index.js +24 -17
- package/dist/components/Progress/index.js +4 -2
- package/dist/components/Progress/progress.test.js +9 -1
- package/dist/components/RadioInput/components/ChoiceList/index.js +28 -20
- package/dist/components/RadioInput/index.js +27 -22
- package/dist/components/RadioInput/radio-input.test.js +118 -87
- package/dist/components/Rating/components/GradientIcon/index.js +24 -17
- package/dist/components/Rating/components/RatingWithMultipleValues/RatingWithMultipleValues.js +24 -22
- package/dist/components/Rating/components/RatingWithSingleValue/RatingWithSingleValue.js +21 -17
- package/dist/components/Rating/index.js +29 -26
- package/dist/components/Rating/rating.test.js +3 -1
- package/dist/components/SelectInput/components/OptionsArea/index.js +37 -32
- package/dist/components/SelectInput/components/SelectArea/Label.js +2 -2
- package/dist/components/SelectInput/components/SelectArea/index.js +46 -34
- package/dist/components/SelectInput/index.js +26 -23
- package/dist/components/SelectInput/selectInput.test.js +10 -4
- package/dist/components/Skeleton/index.js +11 -1
- package/dist/components/Skeleton/skeleton.test.js +3 -1
- package/dist/components/Slider/components/SliderPointer.d.ts.map +1 -1
- package/dist/components/Slider/components/SliderPointer.js +23 -8
- package/dist/components/Slider/components/SliderRail.js +8 -2
- package/dist/components/Slider/components/SliderSelector.js +86 -78
- package/dist/components/Slider/index.js +28 -16
- package/dist/components/Slider/slider.test.js +9 -1
- package/dist/components/Spinner/index.js +3 -1
- package/dist/components/Spinner/spinner.test.js +9 -1
- package/dist/components/Steps/index.js +25 -17
- package/dist/components/Steps/steps.test.js +3 -1
- package/dist/components/Switch/index.js +23 -17
- package/dist/components/Switch/input.test.js +3 -1
- package/dist/components/Table/components/MenuItem.js +16 -13
- package/dist/components/Table/index.js +139 -99
- package/dist/components/Table/table.test.js +3 -1
- package/dist/components/Tabs/TabsExample.js +37 -23
- package/dist/components/Tabs/components/Tab.js +12 -3
- package/dist/components/Tabs/components/TabPanel.js +8 -3
- package/dist/components/Tabs/components/Tabs.js +33 -23
- package/dist/components/Tabs/tabs.test.js +103 -83
- package/dist/components/Tag/index.js +21 -16
- package/dist/components/Tag/tag.test.js +9 -7
- package/dist/components/TextAreaInput/index.js +25 -15
- package/dist/components/TextAreaInput/text-area-input.test.js +8 -2
- package/dist/components/Thumbnail/index.js +71 -60
- package/dist/components/Thumbnail/thumbnail.test.js +9 -1
- package/dist/components/Timeline/components/Timeline.js +9 -5
- package/dist/components/Timeline/components/TimelineContent.js +31 -15
- package/dist/components/Timeline/components/TimelineItem.js +11 -1
- package/dist/components/Timeline/components/TimelineSeparator.js +9 -4
- package/dist/components/Timeline/timeline.test.js +105 -76
- package/dist/components/Toast/button-example.js +10 -5
- package/dist/components/Toast/components/Toast.js +16 -11
- package/dist/components/Toast/contexts/ToastProvider.js +6 -3
- package/dist/components/Toast/index.js +90 -62
- package/dist/components/Toast/toast.test.js +11 -1
- package/dist/components/Tooltip/componenteTeste.js +42 -14
- package/dist/components/Tooltip/index.js +56 -46
- package/dist/components/Tooltip/tooltip.test.js +13 -8
- package/dist/components/Typography/index.js +11 -3
- package/dist/components/Typography/typography.test.js +3 -1
- package/dist/shared/components/FocusLock/index.js +11 -4
- package/dist/shared/tests/test-utils.js +6 -3
- package/dist/shared/theme/button-example.js +6 -3
- package/dist/shared/theme/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/shared/theme/contexts/ThemeContext.js +12 -29
- package/dist/shared/theme/theme.test.js +25 -11
- package/package.json +1 -1
|
@@ -6,10 +6,18 @@ require("@testing-library/jest-dom");
|
|
|
6
6
|
|
|
7
7
|
var _ = _interopRequireDefault(require("."));
|
|
8
8
|
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
|
|
9
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
12
|
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
+
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
+
|
|
17
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
|
|
11
19
|
var setup = function setup(props) {
|
|
12
|
-
var utils = (0, _testUtils.render)( /*#__PURE__*/
|
|
20
|
+
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread({}, props)));
|
|
13
21
|
return utils;
|
|
14
22
|
};
|
|
15
23
|
|
|
@@ -19,11 +19,17 @@ var _accepts = require("./utils/accepts");
|
|
|
19
19
|
|
|
20
20
|
var _generateUUID = require("../../utils/generateUUID");
|
|
21
21
|
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
|
|
22
24
|
var _excluded = ["multiple", "onChange", "onDropAccepted", "onDropRejected", "accept", "onDragEnter", "onDragLeave", "disabled"];
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
|
-
function
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
33
|
|
|
28
34
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
29
35
|
|
|
@@ -177,106 +183,125 @@ var Dropzone = function Dropzone(_ref) {
|
|
|
177
183
|
scale: 0.8
|
|
178
184
|
}
|
|
179
185
|
};
|
|
180
|
-
return /*#__PURE__*/
|
|
186
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.DropzoneContainer, _objectSpread(_objectSpread({
|
|
181
187
|
isDraggingOver: isDragging,
|
|
182
188
|
haveItems: acceptedFiles.length > 0,
|
|
183
189
|
isDisabled: disabled
|
|
184
|
-
}, rest),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}), /*#__PURE__*/React.createElement(_framerMotion.AnimatePresence, null, acceptedFiles.length > 0 ? /*#__PURE__*/React.createElement(_Flex.default, {
|
|
199
|
-
alignItems: "center",
|
|
200
|
-
spacing: "4",
|
|
201
|
-
wrap: "wrap",
|
|
202
|
-
justifyContent: "center"
|
|
203
|
-
}, acceptedFiles.map(function (file) {
|
|
204
|
-
return /*#__PURE__*/React.createElement(_framerMotion.motion.div, {
|
|
205
|
-
key: file.id,
|
|
206
|
-
variants: dropzoneVariants,
|
|
207
|
-
initial: "initial",
|
|
208
|
-
animate: "visible",
|
|
209
|
-
exit: "hidden",
|
|
210
|
-
transition: {
|
|
211
|
-
duration: 0.2,
|
|
212
|
-
ease: 'easeInOut'
|
|
213
|
-
}
|
|
214
|
-
}, /*#__PURE__*/React.createElement(_styles.DropzoneFileBox, {
|
|
190
|
+
}, rest), {}, {
|
|
191
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.DropzoneInput, {
|
|
192
|
+
ref: fileInputRef,
|
|
193
|
+
type: "file",
|
|
194
|
+
multiple: multiple,
|
|
195
|
+
accept: accept,
|
|
196
|
+
onChange: handleChange,
|
|
197
|
+
onDrop: handleDrop,
|
|
198
|
+
onDragEnter: function onDragEnter(event) {
|
|
199
|
+
return handleDragEnterLeave(event, 'enter');
|
|
200
|
+
},
|
|
201
|
+
onDragLeave: function onDragLeave(event) {
|
|
202
|
+
return handleDragEnterLeave(event, 'leave');
|
|
203
|
+
},
|
|
215
204
|
disabled: disabled
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
205
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_framerMotion.AnimatePresence, {
|
|
206
|
+
children: acceptedFiles.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Flex.default, {
|
|
207
|
+
alignItems: "center",
|
|
208
|
+
spacing: "4",
|
|
209
|
+
wrap: "wrap",
|
|
210
|
+
justifyContent: "center",
|
|
211
|
+
children: [acceptedFiles.map(function (file) {
|
|
212
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_framerMotion.motion.div, {
|
|
213
|
+
variants: dropzoneVariants,
|
|
214
|
+
initial: "initial",
|
|
215
|
+
animate: "visible",
|
|
216
|
+
exit: "hidden",
|
|
217
|
+
transition: {
|
|
218
|
+
duration: 0.2,
|
|
219
|
+
ease: 'easeInOut'
|
|
220
|
+
},
|
|
221
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.DropzoneFileBox, {
|
|
222
|
+
disabled: disabled,
|
|
223
|
+
children: [file.type.indexOf('image') !== -1 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
224
|
+
src: file.preview,
|
|
225
|
+
alt: file.name
|
|
226
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Flex.default, {
|
|
227
|
+
direction: "column",
|
|
228
|
+
spacing: "2",
|
|
229
|
+
justifyContent: "center",
|
|
230
|
+
alignItems: "center",
|
|
231
|
+
style: {
|
|
232
|
+
maxWidth: '100%'
|
|
233
|
+
},
|
|
234
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
235
|
+
name: file.type.split('/').includes('pdf') ? 'pdf' : file.type.split('/').includes('csv') ? 'csv' : file.type.split('/').includes('xls') ? 'xls' : 'file',
|
|
236
|
+
size: "30",
|
|
237
|
+
color: "neutral.black"
|
|
238
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.DropzoneText, {
|
|
239
|
+
isFileName: true,
|
|
240
|
+
children: file.name
|
|
241
|
+
})]
|
|
242
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.DropzoneRemoveButton, {
|
|
243
|
+
onClick: function onClick() {
|
|
244
|
+
return !disabled && handleRemoveFile(file.id);
|
|
245
|
+
},
|
|
246
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
247
|
+
name: "x",
|
|
248
|
+
color: "background.light",
|
|
249
|
+
size: 25
|
|
250
|
+
})
|
|
251
|
+
})]
|
|
252
|
+
})
|
|
253
|
+
}, file.id);
|
|
254
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.DropzoneImageAddButton, {
|
|
255
|
+
isDraggingOver: isDragging,
|
|
256
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
257
|
+
name: "plus-circle",
|
|
258
|
+
color: "neutral.neutral3"
|
|
259
|
+
})
|
|
260
|
+
})]
|
|
261
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_framerMotion.motion.div, {
|
|
262
|
+
variants: dropzoneVariants,
|
|
263
|
+
initial: "initial",
|
|
264
|
+
animate: "visible",
|
|
265
|
+
exit: "hidden",
|
|
266
|
+
transition: {
|
|
267
|
+
duration: 0.2,
|
|
268
|
+
ease: 'easeInOut'
|
|
269
|
+
},
|
|
270
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Flex.default, {
|
|
271
|
+
direction: "column",
|
|
272
|
+
spacing: "4",
|
|
273
|
+
alignItems: "center",
|
|
274
|
+
justifyContent: "center",
|
|
275
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_framerMotion.motion.div, {
|
|
276
|
+
initial: {
|
|
277
|
+
opacity: 0,
|
|
278
|
+
y: 10
|
|
279
|
+
},
|
|
280
|
+
animate: {
|
|
281
|
+
opacity: 1,
|
|
282
|
+
y: 0
|
|
283
|
+
},
|
|
284
|
+
transition: {
|
|
285
|
+
duration: 0.2,
|
|
286
|
+
ease: 'easeInOut',
|
|
287
|
+
delay: 0.2
|
|
288
|
+
},
|
|
289
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.DropzoneIcon, {
|
|
290
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
291
|
+
name: "arrow-up-circle",
|
|
292
|
+
size: 48,
|
|
293
|
+
color: "neutral.neutral5"
|
|
294
|
+
})
|
|
295
|
+
})
|
|
296
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.DropzoneButton, {
|
|
297
|
+
children: "Selecionar um arquivo"
|
|
298
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.DropzoneText, {
|
|
299
|
+
children: "ou solte um arquivo aqui"
|
|
300
|
+
})]
|
|
301
|
+
})
|
|
302
|
+
})
|
|
303
|
+
})]
|
|
304
|
+
}));
|
|
280
305
|
};
|
|
281
306
|
|
|
282
307
|
var _default = Dropzone;
|
|
@@ -6,10 +6,20 @@ require("@testing-library/jest-dom");
|
|
|
6
6
|
|
|
7
7
|
var _ = _interopRequireDefault(require("."));
|
|
8
8
|
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
|
|
9
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
12
|
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
+
|
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
+
|
|
17
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
|
|
11
19
|
var setup = function setup(props, children) {
|
|
12
|
-
var utils = (0, _testUtils.render)( /*#__PURE__*/
|
|
20
|
+
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread(_objectSpread({}, props), {}, {
|
|
21
|
+
children: children
|
|
22
|
+
})));
|
|
13
23
|
return utils;
|
|
14
24
|
};
|
|
15
25
|
|
|
@@ -17,7 +27,15 @@ describe('Flex', function () {
|
|
|
17
27
|
it('should it render the flex component', function () {
|
|
18
28
|
var _setup = setup({
|
|
19
29
|
direction: 'row'
|
|
20
|
-
}, /*#__PURE__*/
|
|
30
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
31
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
children: "1"
|
|
33
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
34
|
+
children: "2"
|
|
35
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
36
|
+
children: "3"
|
|
37
|
+
})]
|
|
38
|
+
})),
|
|
21
39
|
container = _setup.container;
|
|
22
40
|
|
|
23
41
|
expect(container).toBeInTheDocument();
|
|
@@ -30,7 +48,15 @@ describe('Flex', function () {
|
|
|
30
48
|
md: 'row-reverse',
|
|
31
49
|
lg: 'column-reverse'
|
|
32
50
|
}
|
|
33
|
-
}, /*#__PURE__*/
|
|
51
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
52
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
53
|
+
children: "1"
|
|
54
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
|
+
children: "2"
|
|
56
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
57
|
+
children: "3"
|
|
58
|
+
})]
|
|
59
|
+
})),
|
|
34
60
|
container = _setup2.container;
|
|
35
61
|
|
|
36
62
|
expect(container).toBeInTheDocument();
|
|
@@ -43,7 +69,15 @@ describe('Flex', function () {
|
|
|
43
69
|
md: 'flex-end',
|
|
44
70
|
lg: 'flex-start'
|
|
45
71
|
}
|
|
46
|
-
}, /*#__PURE__*/
|
|
72
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
73
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
74
|
+
children: "1"
|
|
75
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
76
|
+
children: "2"
|
|
77
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
|
+
children: "3"
|
|
79
|
+
})]
|
|
80
|
+
})),
|
|
47
81
|
container = _setup3.container;
|
|
48
82
|
|
|
49
83
|
expect(container).toBeInTheDocument();
|
|
@@ -56,7 +90,15 @@ describe('Flex', function () {
|
|
|
56
90
|
md: 'flex-end',
|
|
57
91
|
lg: 'flex-start'
|
|
58
92
|
}
|
|
59
|
-
}, /*#__PURE__*/
|
|
93
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
94
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
+
children: "1"
|
|
96
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
97
|
+
children: "2"
|
|
98
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
99
|
+
children: "3"
|
|
100
|
+
})]
|
|
101
|
+
})),
|
|
60
102
|
container = _setup4.container;
|
|
61
103
|
|
|
62
104
|
expect(container).toBeInTheDocument();
|
|
@@ -69,7 +111,15 @@ describe('Flex', function () {
|
|
|
69
111
|
md: 'flex-end',
|
|
70
112
|
lg: 'flex-start'
|
|
71
113
|
}
|
|
72
|
-
}, /*#__PURE__*/
|
|
114
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
115
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
116
|
+
children: "1"
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
118
|
+
children: "2"
|
|
119
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
120
|
+
children: "3"
|
|
121
|
+
})]
|
|
122
|
+
})),
|
|
73
123
|
container = _setup5.container;
|
|
74
124
|
|
|
75
125
|
expect(container).toBeInTheDocument();
|
|
@@ -82,7 +132,15 @@ describe('Flex', function () {
|
|
|
82
132
|
md: 'flex-end',
|
|
83
133
|
lg: 'flex-start'
|
|
84
134
|
}
|
|
85
|
-
}, /*#__PURE__*/
|
|
135
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
136
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
137
|
+
children: "1"
|
|
138
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
139
|
+
children: "2"
|
|
140
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
141
|
+
children: "3"
|
|
142
|
+
})]
|
|
143
|
+
})),
|
|
86
144
|
container = _setup6.container;
|
|
87
145
|
|
|
88
146
|
expect(container).toBeInTheDocument();
|
|
@@ -95,7 +153,15 @@ describe('Flex', function () {
|
|
|
95
153
|
md: 'flex-end',
|
|
96
154
|
lg: 'flex-start'
|
|
97
155
|
}
|
|
98
|
-
}, /*#__PURE__*/
|
|
156
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
157
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
158
|
+
children: "1"
|
|
159
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
160
|
+
children: "2"
|
|
161
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
162
|
+
children: "3"
|
|
163
|
+
})]
|
|
164
|
+
})),
|
|
99
165
|
container = _setup7.container;
|
|
100
166
|
|
|
101
167
|
expect(container).toBeInTheDocument();
|
|
@@ -108,7 +174,15 @@ describe('Flex', function () {
|
|
|
108
174
|
md: 12,
|
|
109
175
|
lg: 20
|
|
110
176
|
}
|
|
111
|
-
}, /*#__PURE__*/
|
|
177
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
178
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
179
|
+
children: "1"
|
|
180
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
181
|
+
children: "2"
|
|
182
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
183
|
+
children: "3"
|
|
184
|
+
})]
|
|
185
|
+
})),
|
|
112
186
|
container = _setup8.container;
|
|
113
187
|
|
|
114
188
|
expect(container).toBeInTheDocument();
|
|
@@ -121,7 +195,15 @@ describe('Flex', function () {
|
|
|
121
195
|
md: 'nowrap',
|
|
122
196
|
lg: 'wrap'
|
|
123
197
|
}
|
|
124
|
-
}, /*#__PURE__*/
|
|
198
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
199
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
200
|
+
children: "1"
|
|
201
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
202
|
+
children: "2"
|
|
203
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
204
|
+
children: "3"
|
|
205
|
+
})]
|
|
206
|
+
})),
|
|
125
207
|
container = _setup9.container;
|
|
126
208
|
|
|
127
209
|
expect(container).toBeInTheDocument();
|
|
@@ -134,7 +216,15 @@ describe('Flex', function () {
|
|
|
134
216
|
md: '3',
|
|
135
217
|
lg: '4'
|
|
136
218
|
}
|
|
137
|
-
}, /*#__PURE__*/
|
|
219
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
220
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
221
|
+
children: "1"
|
|
222
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
223
|
+
children: "2"
|
|
224
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
225
|
+
children: "3"
|
|
226
|
+
})]
|
|
227
|
+
})),
|
|
138
228
|
container = _setup10.container;
|
|
139
229
|
|
|
140
230
|
expect(container).toBeInTheDocument();
|
|
@@ -147,7 +237,15 @@ describe('Flex', function () {
|
|
|
147
237
|
md: '3',
|
|
148
238
|
lg: '4'
|
|
149
239
|
}
|
|
150
|
-
}, /*#__PURE__*/
|
|
240
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
241
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
242
|
+
children: "1"
|
|
243
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
244
|
+
children: "2"
|
|
245
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
246
|
+
children: "3"
|
|
247
|
+
})]
|
|
248
|
+
})),
|
|
151
249
|
container = _setup11.container;
|
|
152
250
|
|
|
153
251
|
expect(container).toBeInTheDocument();
|
|
@@ -160,7 +258,15 @@ describe('Flex', function () {
|
|
|
160
258
|
md: '50%',
|
|
161
259
|
lg: '25%'
|
|
162
260
|
}
|
|
163
|
-
}, /*#__PURE__*/
|
|
261
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
262
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
263
|
+
children: "1"
|
|
264
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
265
|
+
children: "2"
|
|
266
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
267
|
+
children: "3"
|
|
268
|
+
})]
|
|
269
|
+
})),
|
|
164
270
|
container = _setup12.container;
|
|
165
271
|
|
|
166
272
|
expect(container).toBeInTheDocument();
|
|
@@ -233,7 +339,15 @@ describe('Flex', function () {
|
|
|
233
339
|
md: '50%',
|
|
234
340
|
lg: '25%'
|
|
235
341
|
}
|
|
236
|
-
}, /*#__PURE__*/
|
|
342
|
+
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
343
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
344
|
+
children: "1"
|
|
345
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
346
|
+
children: "2"
|
|
347
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
348
|
+
children: "3"
|
|
349
|
+
})]
|
|
350
|
+
})),
|
|
237
351
|
container = _setup13.container;
|
|
238
352
|
|
|
239
353
|
expect(container).toBeInTheDocument();
|
|
@@ -7,9 +7,15 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _styles = require("./styles");
|
|
9
9
|
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
|
|
10
12
|
var _excluded = ["basis", "children", "direction", "grow", "alignItems", "alignContent", "justifyContent", "alignSelf", "justifySelf", "shrink", "spacing", "wrap"];
|
|
11
13
|
|
|
12
|
-
function
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
+
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
+
|
|
18
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
19
|
|
|
14
20
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
21
|
|
|
@@ -30,7 +36,7 @@ var Flex = function Flex(_ref) {
|
|
|
30
36
|
wrap = _ref.wrap,
|
|
31
37
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
38
|
|
|
33
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StyledFlexContainer, _objectSpread(_objectSpread({
|
|
34
40
|
alignItems: alignItems,
|
|
35
41
|
alignSelf: alignSelf,
|
|
36
42
|
basis: basis,
|
|
@@ -42,7 +48,9 @@ var Flex = function Flex(_ref) {
|
|
|
42
48
|
spacing: spacing,
|
|
43
49
|
wrap: wrap,
|
|
44
50
|
alignContent: alignContent
|
|
45
|
-
}, rest),
|
|
51
|
+
}, rest), {}, {
|
|
52
|
+
children: children
|
|
53
|
+
}));
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
var _default = Flex;
|