@cashub/ui 0.46.1 → 0.48.0
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/Tab/TabList.js +38 -26
- package/Tab/TabPanel.js +13 -20
- package/Tab/TabTab.js +36 -24
- package/Tab/index.js +15 -1
- package/Tab/subComponent/TabListV2.js +25 -0
- package/Tab/subComponent/TabPanelV2.js +52 -0
- package/Tab/subComponent/TabTabV2.js +63 -0
- package/VerticalTab/TabList.js +13 -18
- package/VerticalTab/TabPanel.js +16 -20
- package/VerticalTab/TabTab.js +40 -21
- package/VerticalTab/VerticalTab.js +8 -4
- package/alert/Alert.js +12 -5
- package/animate/Collapse.js +5 -7
- package/animate/Loader.js +18 -7
- package/animate/PulseRing.js +18 -5
- package/animate/Spinner.js +8 -3
- package/backdrop/BaseBackdrop.js +9 -3
- package/backdrop/LoadingBackdrop.js +7 -3
- package/backdrop/ModalBackdrop.js +5 -3
- package/badge/Badge.js +15 -3
- package/badge/BadgeDot.js +8 -3
- package/badge/BadgeFill.js +24 -6
- package/badge/BadgeWithText.js +13 -3
- package/billing/BarChart.js +1 -1
- package/breadcrumb/Breadcrumb.js +42 -3
- package/button/Button.js +88 -20
- package/button/ButtonGroup.js +33 -9
- package/button/IconButton.js +37 -10
- package/button/ScrollToTopButton.js +12 -4
- package/callout/Callout.js +37 -8
- package/chart/BarChart.js +10 -17
- package/chart/DoughnutChart.js +34 -20
- package/chart/LineChart.js +14 -20
- package/chart/SingleBarChart.js +22 -5
- package/chart/utils/centerTextPlugin.js +2 -2
- package/chart/utils/customTooltip.js +7 -7
- package/chart/utils/htmlLegendPlugin.js +1 -1
- package/container/FlexContainer.js +15 -7
- package/cropper/Cropper.js +1 -2
- package/datetimePicker/DatePicker.js +80 -26
- package/datetimePicker/DatePickerV2.js +95 -36
- package/datetimePicker/DatetimePicker.js +174 -11
- package/datetimePicker/DatetimePickerV2.js +87 -33
- package/datetimePicker/DatetimePickerV3.js +174 -11
- package/datetimePicker/TimeInput.js +35 -10
- package/datetimePicker/TimePicker.js +77 -22
- package/datetimePicker/TimePickerStyle.js +53 -3
- package/datetimePicker/TimePickerV2.js +54 -21
- package/datetimePicker/accordion/Month.js +93 -16
- package/datetimePicker/accordion/Year.js +96 -18
- package/datetimePicker/hooks/useChangeNumber.js +3 -6
- package/datetimePicker/hooks/useDecrease.js +3 -6
- package/datetimePicker/hooks/useIncrease.js +3 -6
- package/datetimePicker/subComponent/Accordion.js +101 -20
- package/descriptionList/DescriptionDetail.js +15 -4
- package/descriptionList/DescriptionList.js +12 -4
- package/descriptionList/DescriptionTerm.js +5 -3
- package/divider/Divider.js +15 -6
- package/dropdown/DropdownButtonOption.js +22 -6
- package/dropdown/DropdownContent.js +29 -15
- package/dropdown/DropdownDivOption.js +17 -3
- package/dropdown/DropdownLinkOption.js +14 -3
- package/dropdown/DropdownToggle.js +7 -15
- package/dropzone/FileDropzone.js +121 -22
- package/dropzone/ImageDropzone.js +83 -14
- package/dropzone/subComponent/Message.js +11 -4
- package/figure/IconFigure.js +16 -7
- package/figure/ImageFigure.js +19 -6
- package/file/HiddenFileInput.js +3 -3
- package/form/Checkbox.js +74 -13
- package/form/Fieldset.js +9 -3
- package/form/FormItem.js +10 -5
- package/form/Input.js +40 -7
- package/form/Label.js +34 -10
- package/form/MutedText.js +8 -4
- package/form/PasswordInput.js +20 -13
- package/form/RadioButton.js +55 -8
- package/form/SearchSelect.js +64 -12
- package/form/Searchbox.js +45 -19
- package/form/Slider.js +28 -10
- package/form/SwitchButton.js +48 -14
- package/form/Textarea.js +30 -3
- package/form/TreeView.js +13 -6
- package/grid/Column.js +23 -10
- package/grid/Grid.js +14 -6
- package/heading/Heading1.js +8 -4
- package/heading/Heading2.js +11 -5
- package/heading/Heading3.js +20 -8
- package/iconbox/ApplicationIconBox.js +48 -12
- package/iconbox/IconBox.js +31 -7
- package/iconbox/IconBoxV2.js +33 -8
- package/iconbox/subComponent/IconBoxFigure.js +17 -9
- package/iconbox/subComponent/IconBoxImage.js +21 -8
- package/image/ImageFluid.js +7 -3
- package/image/UploadImage.js +66 -18
- package/index.js +8 -1
- package/jsoneditor/JsonEditor.js +121 -15
- package/keyframe/Pulse.js +13 -3
- package/keyframe/Spin.js +5 -3
- package/layout/Aside.js +30 -5
- package/layout/Backdrop.js +8 -4
- package/layout/Container.js +21 -5
- package/layout/Footer.js +26 -7
- package/layout/Sidebar.jsx +33 -3
- package/link/LinkSpan.js +37 -19
- package/map/GoogleMap.js +3 -7
- package/map/GoogleReverseGeolocation.js +6 -3
- package/map/LeafletMap.js +2 -2
- package/map/subComponent/GoogleMapContainer.js +16 -4
- package/map/subComponent/GoogleMapPopup.js +7 -10
- package/map/subComponent/GoogleMapWrapper.js +8 -15
- package/map/subComponent/LeafletDrawControl.js +9 -7
- package/map/subComponent/LeafletMapContainer.js +159 -4
- package/modal/StateModal.js +49 -28
- package/modal/TitleModal.js +70 -29
- package/package.json +1 -1
- package/page/Disclaimer.js +119 -3
- package/paginate/Paginate.js +54 -12
- package/popover/Popover.js +30 -25
- package/qrcode/QRCode.js +20 -6
- package/qrcode/QRCodeContainter.js +12 -4
- package/ribbon/Ribbon.js +29 -4
- package/section/Section.js +68 -20
- package/section/SectionBody.js +29 -8
- package/section/SectionHeader.js +36 -11
- package/section/SectionToolbar.js +9 -3
- package/section/SectionToolbarItem.js +8 -3
- package/select/InputSelect.js +16 -23
- package/select/Select.js +112 -43
- package/select/subComponent/Checkbox.js +24 -5
- package/select/subComponent/Footer.js +4 -3
- package/select/subComponent/ListBox.js +12 -5
- package/select/subComponent/Option.js +27 -7
- package/select/subComponent/OptionGroup.js +13 -3
- package/select/subComponent/Options.js +18 -5
- package/select/subComponent/SearchBox.js +34 -12
- package/select/subComponent/SelectedMultipleTags.js +21 -3
- package/select/subComponent/SelectedMultipleText.js +19 -4
- package/select/subComponent/SelectedSingle.js +7 -3
- package/styles/GlobalStyle.js +156 -45
- package/styles/mixin/backgroundColor.js +16 -8
- package/styles/mixin/borderColor.js +13 -7
- package/styles/mixin/color.js +13 -7
- package/styles/mixin/colorOnBackground.js +13 -7
- package/styles/mixin/inputPlaceholder.js +20 -3
- package/styles/mixin/media.js +5 -3
- package/styles/mixin/rounded.js +10 -6
- package/styles/mixin/scrollbar.js +13 -3
- package/styles/theme/dark.theme.js +15 -14
- package/styles/theme/light.theme.js +15 -14
- package/styles/theme/white.theme.js +15 -14
- package/table/GridTable.js +71 -33
- package/table/ImageBox.js +15 -5
- package/table/InfiniteGridTable.js +92 -46
- package/table/PermissionTable.js +32 -10
- package/table/SimpleGridTable.js +143 -0
- package/table/Table.js +198 -48
- package/table/__mock__/columns.js +1 -1
- package/table/index.js +7 -0
- package/table/subComponent/BaseTableHeadCell.js +37 -8
- package/table/subComponent/GridTableFooter.js +10 -4
- package/table/subComponent/GridTableHeadCell.js +6 -4
- package/table/subComponent/Resizer.js +19 -4
- package/table/subComponent/TableFooter.js +15 -6
- package/table/subComponent/TableFooterInfo.js +4 -3
- package/table/subComponent/TableFooterPager.js +19 -6
- package/table/subComponent/TableHeadCell.js +9 -3
- package/table/subComponent/TableSort.js +17 -7
- package/tagify/TagifyStyle.js +49 -3
- package/tagify/Tags.js +37 -21
- package/tagify/templates/getCreateButtonTemplate.js +5 -2
- package/text/Paragraph.js +50 -12
- package/timeline/Timeline.js +94 -17
- package/toast/CustomToastContainer.js +35 -3
- package/toast/MessageContainer.js +22 -4
- package/tooltip/Tooltip.js +47 -19
- package/treeView/TreeViewV2.js +1 -1
- package/treeView/TreeflexStyle.js +38 -3
- package/wizard/Wizard.js +115 -6
package/dropzone/FileDropzone.js
CHANGED
|
@@ -14,14 +14,7 @@ var _file = _interopRequireDefault(require("../assets/icons/file.svg"));
|
|
|
14
14
|
var _HiddenFileInput = _interopRequireDefault(require("../file/HiddenFileInput"));
|
|
15
15
|
var _Message = _interopRequireDefault(require("./subComponent/Message"));
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
18
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
20
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
23
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
24
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
18
|
const FileDropzone = _ref => {
|
|
26
19
|
let {
|
|
27
20
|
message,
|
|
@@ -58,7 +51,10 @@ const FileDropzone = _ref => {
|
|
|
58
51
|
Resume: 'Resume Upload',
|
|
59
52
|
Retry: 'Retry Upload'
|
|
60
53
|
};
|
|
61
|
-
return
|
|
54
|
+
return {
|
|
55
|
+
...defaultTexts,
|
|
56
|
+
...translation
|
|
57
|
+
};
|
|
62
58
|
}, [translation]);
|
|
63
59
|
const handleClick = (0, _react.useCallback)(() => {
|
|
64
60
|
if (files.length > 0) return;
|
|
@@ -339,42 +335,145 @@ const FileDropzone = _ref => {
|
|
|
339
335
|
}), files.length === 0 ? messageItem : previewItem]
|
|
340
336
|
});
|
|
341
337
|
};
|
|
342
|
-
const Dropzone = _styledComponents.default.div
|
|
338
|
+
const Dropzone = _styledComponents.default.div`
|
|
339
|
+
min-height: 200px;
|
|
340
|
+
border: 4px dashed var(--border-color);
|
|
341
|
+
border-radius: var(--border-radius);
|
|
342
|
+
color: var(--font-on-background);
|
|
343
|
+
display: flex;
|
|
344
|
+
flex-direction: column;
|
|
345
|
+
justify-content: center;
|
|
346
|
+
align-items: center;
|
|
347
|
+
padding: 0 var(--spacing-s);
|
|
348
|
+
cursor: ${_ref2 => {
|
|
343
349
|
let {
|
|
344
350
|
reachedLimit
|
|
345
351
|
} = _ref2;
|
|
346
352
|
return reachedLimit ? 'default' : 'pointer';
|
|
347
|
-
}
|
|
353
|
+
}};
|
|
354
|
+
|
|
355
|
+
${_ref3 => {
|
|
348
356
|
let {
|
|
349
357
|
dragging
|
|
350
358
|
} = _ref3;
|
|
351
359
|
return dragging && 'border-color: var(--color-primary);';
|
|
352
|
-
}
|
|
360
|
+
}};
|
|
361
|
+
|
|
362
|
+
&:focus {
|
|
363
|
+
border-color: var(--color-primary);
|
|
364
|
+
}
|
|
365
|
+
`;
|
|
353
366
|
Dropzone.displayName = 'Dropzone';
|
|
354
|
-
const Preview = _styledComponents.default.div
|
|
367
|
+
const Preview = _styledComponents.default.div`
|
|
368
|
+
max-width: 50%;
|
|
369
|
+
display: flex;
|
|
370
|
+
align-items: center;
|
|
371
|
+
text-align: center;
|
|
372
|
+
|
|
373
|
+
${_media.default.laptop`
|
|
374
|
+
max-width: 75%;
|
|
375
|
+
`}
|
|
376
|
+
|
|
377
|
+
${_media.default.tablet`
|
|
378
|
+
max-width: 100%;
|
|
379
|
+
`}
|
|
380
|
+
`;
|
|
355
381
|
Preview.displayName = 'Preview';
|
|
356
|
-
const PreviewImage = _styledComponents.default.div
|
|
382
|
+
const PreviewImage = _styledComponents.default.div`
|
|
383
|
+
margin-right: var(--spacing-xs);
|
|
384
|
+
|
|
385
|
+
> img {
|
|
386
|
+
width: 120px;
|
|
387
|
+
margin-bottom: var(--spacing-xs);
|
|
388
|
+
}
|
|
389
|
+
`;
|
|
357
390
|
PreviewImage.displayName = 'PreviewImage';
|
|
358
|
-
const PreviewDetails = _styledComponents.default.div
|
|
391
|
+
const PreviewDetails = _styledComponents.default.div`
|
|
392
|
+
overflow: hidden;
|
|
393
|
+
min-width: 200px;
|
|
394
|
+
|
|
395
|
+
> * {
|
|
396
|
+
margin-bottom: var(--spacing-xs);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
> .ellipsis {
|
|
400
|
+
overflow: hidden;
|
|
401
|
+
white-space: nowrap;
|
|
402
|
+
text-overflow: ellipsis;
|
|
403
|
+
}
|
|
404
|
+
`;
|
|
359
405
|
PreviewDetails.displayName = 'PreviewDetails';
|
|
360
|
-
const Progress = _styledComponents.default.div
|
|
406
|
+
const Progress = _styledComponents.default.div`
|
|
407
|
+
display: flex;
|
|
408
|
+
justify-content: center;
|
|
409
|
+
align-items: center;
|
|
410
|
+
`;
|
|
361
411
|
|
|
362
412
|
// fix:color
|
|
363
|
-
const ProgressBar = _styledComponents.default.div
|
|
413
|
+
const ProgressBar = _styledComponents.default.div`
|
|
414
|
+
flex: 1;
|
|
415
|
+
height: 1.25rem;
|
|
416
|
+
border-radius: var(--border-radius);
|
|
417
|
+
position: relative;
|
|
418
|
+
overflow: hidden;
|
|
419
|
+
border: 1px solid var(--color-primary);
|
|
420
|
+
|
|
421
|
+
&::before {
|
|
422
|
+
position: absolute;
|
|
423
|
+
content: '';
|
|
424
|
+
width: ${_ref4 => {
|
|
364
425
|
let {
|
|
365
426
|
percentage
|
|
366
427
|
} = _ref4;
|
|
367
428
|
return percentage;
|
|
368
|
-
}
|
|
429
|
+
}}%;
|
|
430
|
+
top: 0;
|
|
431
|
+
bottom: 0;
|
|
432
|
+
left: 0;
|
|
433
|
+
right: 0;
|
|
434
|
+
background: linear-gradient(to bottom, #00bdff, #597ef7);
|
|
435
|
+
transition: width 300ms ease-in-out;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
> span {
|
|
439
|
+
position: absolute;
|
|
440
|
+
width: 100%;
|
|
441
|
+
top: 0;
|
|
442
|
+
bottom: 0;
|
|
443
|
+
left: 0;
|
|
444
|
+
right: 0;
|
|
445
|
+
}
|
|
446
|
+
`;
|
|
369
447
|
ProgressBar.displayName = 'ProgressBar';
|
|
370
448
|
const Button = _styledComponents.default.span.attrs(() => ({
|
|
371
449
|
role: 'button'
|
|
372
|
-
}))
|
|
450
|
+
}))`
|
|
451
|
+
display: flex;
|
|
452
|
+
justify-content: center;
|
|
453
|
+
align-items: center;
|
|
454
|
+
flex: 0 0 auto;
|
|
455
|
+
cursor: pointer;
|
|
456
|
+
width: 1.25rem;
|
|
457
|
+
height: 1.25rem;
|
|
458
|
+
color: var(--font-on-primary);
|
|
459
|
+
background: var(--color-primary);
|
|
460
|
+
border-radius: var(--border-radius);
|
|
461
|
+
margin-left: var(--spacing-xs);
|
|
462
|
+
padding: 0.25rem;
|
|
463
|
+
|
|
464
|
+
${_ref5 => {
|
|
373
465
|
let {
|
|
374
466
|
danger
|
|
375
467
|
} = _ref5;
|
|
376
|
-
return danger &&
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
468
|
+
return danger && `
|
|
469
|
+
background: var(--color-danger);
|
|
470
|
+
`;
|
|
471
|
+
}}
|
|
472
|
+
`;
|
|
473
|
+
const PauseButton = (0, _styledComponents.default)(Button)`
|
|
474
|
+
padding: 5px;
|
|
475
|
+
`;
|
|
476
|
+
const ResumeButton = (0, _styledComponents.default)(Button)`
|
|
477
|
+
padding: 5px 5px 5px 6px;
|
|
478
|
+
`;
|
|
380
479
|
var _default = exports.default = FileDropzone;
|
|
@@ -12,9 +12,7 @@ var _utils = require("@cashub/utils");
|
|
|
12
12
|
var _HiddenFileInput = _interopRequireDefault(require("../file/HiddenFileInput"));
|
|
13
13
|
var _Message = _interopRequireDefault(require("./subComponent/Message"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
16
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
18
16
|
const ImageDropzone = _ref => {
|
|
19
17
|
let {
|
|
20
18
|
width = 180,
|
|
@@ -221,45 +219,116 @@ const ImageDropzone = _ref => {
|
|
|
221
219
|
}), files.length === 0 ? messageItem : previewItem()]
|
|
222
220
|
});
|
|
223
221
|
};
|
|
224
|
-
const Wrapper = _styledComponents.default.div
|
|
222
|
+
const Wrapper = _styledComponents.default.div`
|
|
223
|
+
min-height: 200px;
|
|
224
|
+
border: 4px dashed var(--border-color);
|
|
225
|
+
border-radius: var(--border-radius-l);
|
|
226
|
+
color: var(--font-on-background);
|
|
227
|
+
display: flex;
|
|
228
|
+
flex-wrap: wrap;
|
|
229
|
+
justify-content: center;
|
|
230
|
+
align-items: center;
|
|
231
|
+
padding: var(--spacing-xs);
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
|
|
234
|
+
${_ref2 => {
|
|
225
235
|
let {
|
|
226
236
|
reachedLimit
|
|
227
237
|
} = _ref2;
|
|
228
238
|
return reachedLimit && 'cursor:default;';
|
|
229
|
-
}
|
|
239
|
+
}};
|
|
240
|
+
|
|
241
|
+
${_ref3 => {
|
|
230
242
|
let {
|
|
231
243
|
disabled
|
|
232
244
|
} = _ref3;
|
|
233
245
|
return disabled && 'cursor:not-allowed; opacity: 0.5;';
|
|
234
|
-
}
|
|
246
|
+
}};
|
|
247
|
+
|
|
248
|
+
${_ref4 => {
|
|
235
249
|
let {
|
|
236
250
|
dragging
|
|
237
251
|
} = _ref4;
|
|
238
252
|
return dragging && 'border-color: var(--color-primary);';
|
|
239
|
-
}
|
|
240
|
-
|
|
253
|
+
}};
|
|
254
|
+
|
|
255
|
+
&:focus {
|
|
256
|
+
border-color: var(--color-primary);
|
|
257
|
+
}
|
|
258
|
+
`;
|
|
259
|
+
const Image = _styledComponents.default.figure`
|
|
260
|
+
position: relative;
|
|
261
|
+
margin: var(--spacing-xs);
|
|
262
|
+
|
|
263
|
+
${_ref5 => {
|
|
241
264
|
let {
|
|
242
265
|
width,
|
|
243
266
|
height,
|
|
244
267
|
fixedSize
|
|
245
268
|
} = _ref5;
|
|
246
269
|
if (fixedSize) {
|
|
247
|
-
return
|
|
270
|
+
return `
|
|
271
|
+
width: ${width}px;
|
|
272
|
+
height: ${height}px;
|
|
273
|
+
`;
|
|
248
274
|
}
|
|
249
275
|
if (width < height) {
|
|
250
|
-
return
|
|
276
|
+
return `
|
|
277
|
+
width: ${width}px;
|
|
278
|
+
max-width: ${width}px;
|
|
279
|
+
max-height: ${height}px;
|
|
280
|
+
`;
|
|
251
281
|
}
|
|
252
282
|
if (height < width) {
|
|
253
|
-
return
|
|
283
|
+
return `
|
|
284
|
+
height: ${height}px;
|
|
285
|
+
max-width: ${width}px;
|
|
286
|
+
max-height: ${height}px;
|
|
287
|
+
`;
|
|
254
288
|
}
|
|
255
|
-
}
|
|
256
|
-
|
|
289
|
+
}}
|
|
290
|
+
|
|
291
|
+
> img {
|
|
292
|
+
width: 100%;
|
|
293
|
+
height: 100%;
|
|
294
|
+
border-radius: var(--border-radius);
|
|
295
|
+
}
|
|
296
|
+
`;
|
|
297
|
+
const ButtonGroup = _styledComponents.default.div`
|
|
298
|
+
position: absolute;
|
|
299
|
+
right: calc(var(--spacing-xs) * -1);
|
|
300
|
+
top: calc(var(--spacing-xs) * -1);
|
|
301
|
+
`;
|
|
257
302
|
const Button = _styledComponents.default.div.attrs(() => ({
|
|
258
303
|
role: 'button'
|
|
259
|
-
}))
|
|
304
|
+
}))`
|
|
305
|
+
display: inline-block;
|
|
306
|
+
width: 32px;
|
|
307
|
+
height: 32px;
|
|
308
|
+
color: var(--color-white);
|
|
309
|
+
background: var(--color-primary);
|
|
310
|
+
border-radius: var(--border-radius-round);
|
|
311
|
+
cursor: pointer;
|
|
312
|
+
|
|
313
|
+
> svg {
|
|
314
|
+
color: var(--color-white);
|
|
315
|
+
margin: 0 auto;
|
|
316
|
+
position: relative;
|
|
317
|
+
top: 50%;
|
|
318
|
+
transform: translateY(-50%);
|
|
319
|
+
margin: 0 auto;
|
|
320
|
+
display: block;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&:not(:first-child) {
|
|
324
|
+
margin-left: var(--spacing-xs);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
${_ref6 => {
|
|
260
328
|
let {
|
|
261
329
|
danger
|
|
262
330
|
} = _ref6;
|
|
263
331
|
return danger && 'background: var(--color-danger);';
|
|
264
|
-
}
|
|
332
|
+
}}
|
|
333
|
+
`;
|
|
265
334
|
var _default = exports.default = ImageDropzone;
|
|
@@ -5,15 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject;
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
9
|
const Message = _styledComponents.default.div.attrs(() => ({
|
|
12
10
|
'data-testid': 'message-container'
|
|
13
|
-
}))
|
|
11
|
+
}))`
|
|
12
|
+
text-align: center;
|
|
13
|
+
|
|
14
|
+
> svg {
|
|
15
|
+
margin-bottom: var(--spacing-s);
|
|
16
|
+
font-size: var(--font-h2);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
${_ref => {
|
|
14
20
|
let {
|
|
15
21
|
dragging
|
|
16
22
|
} = _ref;
|
|
17
23
|
return dragging ? 'opacity: 0.5' : '';
|
|
18
|
-
}
|
|
24
|
+
}};
|
|
25
|
+
`;
|
|
19
26
|
var _default = exports.default = Message;
|
package/figure/IconFigure.js
CHANGED
|
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject;
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
9
|
const IconFigure = _styledComponents.default.figure.attrs(_ref => {
|
|
12
10
|
let {
|
|
13
11
|
size
|
|
@@ -15,19 +13,30 @@ const IconFigure = _styledComponents.default.figure.attrs(_ref => {
|
|
|
15
13
|
return {
|
|
16
14
|
size: size || 'medium'
|
|
17
15
|
};
|
|
18
|
-
})
|
|
16
|
+
})`
|
|
17
|
+
${_ref2 => {
|
|
19
18
|
let {
|
|
20
19
|
size
|
|
21
20
|
} = _ref2;
|
|
22
21
|
switch (size) {
|
|
23
22
|
case 'small':
|
|
24
|
-
return
|
|
23
|
+
return `
|
|
24
|
+
width: 16px;
|
|
25
|
+
height: 16px;
|
|
26
|
+
`;
|
|
25
27
|
case 'medium':
|
|
26
|
-
return
|
|
28
|
+
return `
|
|
29
|
+
width: 24px;
|
|
30
|
+
height: 24px;
|
|
31
|
+
`;
|
|
27
32
|
case 'large':
|
|
28
|
-
return
|
|
33
|
+
return `
|
|
34
|
+
width: 32px;
|
|
35
|
+
height: 32px;
|
|
36
|
+
`;
|
|
29
37
|
default:
|
|
30
38
|
break;
|
|
31
39
|
}
|
|
32
|
-
}
|
|
40
|
+
}}
|
|
41
|
+
`;
|
|
33
42
|
var _default = exports.default = IconFigure;
|
package/figure/ImageFigure.js
CHANGED
|
@@ -6,20 +6,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _rounded = _interopRequireDefault(require("../styles/mixin/rounded"));
|
|
9
|
-
var _templateObject;
|
|
10
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
12
10
|
const ImageFigure = _styledComponents.default.figure.attrs(() => ({
|
|
13
11
|
rounded: true
|
|
14
|
-
}))
|
|
12
|
+
}))`
|
|
13
|
+
width: 160px;
|
|
14
|
+
height: 160px;
|
|
15
|
+
border: 4px dashed var(--border-color);
|
|
16
|
+
padding: var(--spacing-xs);
|
|
17
|
+
margin-left: var(--spacing);
|
|
18
|
+
|
|
19
|
+
${_ref => {
|
|
15
20
|
let {
|
|
16
21
|
small
|
|
17
22
|
} = _ref;
|
|
18
|
-
return small &&
|
|
19
|
-
|
|
23
|
+
return small && `
|
|
24
|
+
width: 40px;
|
|
25
|
+
height: 40px;
|
|
26
|
+
`;
|
|
27
|
+
}}
|
|
28
|
+
|
|
29
|
+
${_rounded.default}
|
|
30
|
+
|
|
31
|
+
${_ref2 => {
|
|
20
32
|
let {
|
|
21
33
|
noBorder
|
|
22
34
|
} = _ref2;
|
|
23
35
|
return noBorder && 'border: none;';
|
|
24
|
-
}
|
|
36
|
+
}}
|
|
37
|
+
`;
|
|
25
38
|
var _default = exports.default = ImageFigure;
|
package/file/HiddenFileInput.js
CHANGED
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject;
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
9
|
const HiddenFileInput = _styledComponents.default.input.attrs(() => ({
|
|
12
10
|
'data-testid': 'hiddenFileInput',
|
|
13
11
|
type: 'file'
|
|
14
|
-
}))
|
|
12
|
+
}))`
|
|
13
|
+
display: none;
|
|
14
|
+
`;
|
|
15
15
|
var _default = exports.default = HiddenFileInput;
|
package/form/Checkbox.js
CHANGED
|
@@ -10,11 +10,9 @@ var _Input = _interopRequireDefault(require("./Input"));
|
|
|
10
10
|
var _Label = _interopRequireDefault(require("./Label"));
|
|
11
11
|
var _md = require("react-icons/md");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
14
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
18
16
|
const Checkbox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
17
|
let {
|
|
20
18
|
htmlFor,
|
|
@@ -53,29 +51,92 @@ const Checkbox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
53
51
|
})]
|
|
54
52
|
});
|
|
55
53
|
});
|
|
56
|
-
const StyledCheckbox = (0, _styledComponents.default)(_Input.default)
|
|
57
|
-
|
|
54
|
+
const StyledCheckbox = (0, _styledComponents.default)(_Input.default)`
|
|
55
|
+
display: none;
|
|
56
|
+
|
|
57
|
+
&:checked + span {
|
|
58
|
+
> div:last-of-type {
|
|
59
|
+
display: block;
|
|
60
|
+
color: var(--color-primary);
|
|
61
|
+
}
|
|
62
|
+
> div:first-of-type {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
const StyledLabel = (0, _styledComponents.default)(_Label.default)`
|
|
68
|
+
display: inline-block;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
vertical-align: middle;
|
|
71
|
+
|
|
72
|
+
${_ref2 => {
|
|
58
73
|
let {
|
|
59
74
|
marginRight
|
|
60
75
|
} = _ref2;
|
|
61
|
-
return marginRight && (0, _styledComponents.css)
|
|
62
|
-
|
|
76
|
+
return marginRight && (0, _styledComponents.css)`
|
|
77
|
+
margin-right: var(--spacing-l);
|
|
78
|
+
`;
|
|
79
|
+
}}
|
|
80
|
+
|
|
81
|
+
> span {
|
|
82
|
+
${_ref3 => {
|
|
63
83
|
let {
|
|
64
84
|
disabled
|
|
65
85
|
} = _ref3;
|
|
66
|
-
return disabled && (0, _styledComponents.css)
|
|
67
|
-
|
|
86
|
+
return disabled && (0, _styledComponents.css)`
|
|
87
|
+
opacity: 0.5;
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
`;
|
|
90
|
+
}}
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
|
|
94
|
+
> div {
|
|
95
|
+
margin-right: var(--spacing-xs);
|
|
96
|
+
width: 24px;
|
|
97
|
+
height: 24px;
|
|
98
|
+
border-radius: 4px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
> div:last-of-type {
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
${_ref4 => {
|
|
68
107
|
let {
|
|
69
108
|
fontSizeBig
|
|
70
109
|
} = _ref4;
|
|
71
110
|
return fontSizeBig && 'font-size: var(--font-h3);';
|
|
72
|
-
}
|
|
111
|
+
}}
|
|
112
|
+
|
|
113
|
+
${_ref5 => {
|
|
73
114
|
let {
|
|
74
115
|
noMargin
|
|
75
116
|
} = _ref5;
|
|
76
117
|
return noMargin && 'margin: 0;';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
118
|
+
}}
|
|
119
|
+
`;
|
|
120
|
+
const Unchecked = _styledComponents.default.div`
|
|
121
|
+
flex: 0 0 auto;
|
|
122
|
+
border: var(--border-width) solid var(--border-color);
|
|
123
|
+
`;
|
|
124
|
+
const Checked = _styledComponents.default.div`
|
|
125
|
+
flex: 0 0 auto;
|
|
126
|
+
border: var(--border-width) solid var(--color-primary);
|
|
127
|
+
background: var(--color-primary);
|
|
128
|
+
position: relative;
|
|
129
|
+
|
|
130
|
+
> svg {
|
|
131
|
+
position: absolute;
|
|
132
|
+
color: var(--font-on-primary);
|
|
133
|
+
font-size: var(--font-h3);
|
|
134
|
+
top: 50%;
|
|
135
|
+
left: 50%;
|
|
136
|
+
transform: translate(-50%, -50%);
|
|
137
|
+
}
|
|
138
|
+
`;
|
|
139
|
+
const Text = _styledComponents.default.p`
|
|
140
|
+
word-break: break-all;
|
|
141
|
+
`;
|
|
81
142
|
var _default = exports.default = Checkbox;
|
package/form/Fieldset.js
CHANGED
|
@@ -5,8 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject;
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const Fieldset = _styledComponents.default.fieldset`
|
|
10
|
+
border: var(--border-width) solid var(--border-color);
|
|
11
|
+
border-radius: var(--border-radius-s);
|
|
12
|
+
padding: var(--spacing-s);
|
|
13
|
+
|
|
14
|
+
&[disabled] {
|
|
15
|
+
border-color: var(--border-color-transparent);
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
12
18
|
var _default = exports.default = Fieldset;
|
package/form/FormItem.js
CHANGED
|
@@ -5,13 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject;
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const FormItem = _styledComponents.default.div`
|
|
10
|
+
margin-bottom: var(--spacing);
|
|
11
|
+
|
|
12
|
+
${_ref => {
|
|
12
13
|
let {
|
|
13
14
|
alignCenter
|
|
14
15
|
} = _ref;
|
|
15
|
-
return alignCenter &&
|
|
16
|
-
|
|
16
|
+
return alignCenter && `
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
`;
|
|
20
|
+
}}
|
|
21
|
+
`;
|
|
17
22
|
var _default = exports.default = FormItem;
|