@cashub/ui 0.4.2 → 0.6.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/Tab.js +28 -0
- package/Tab/TabContext.js +12 -0
- package/Tab/TabList.js +47 -0
- package/Tab/TabPanel.js +85 -0
- package/Tab/TabTab.js +63 -0
- package/Tab/index.js +24 -0
- package/animate/Collapse.js +1 -1
- package/animate/NumberCounter.js +1 -1
- package/assets/font/helvetica/Helvetica.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
- package/assets/icons/app-management.png +0 -0
- package/assets/icons/burger.png +0 -0
- package/assets/icons/map_icon1.png +0 -0
- package/assets/icons/map_icon4.png +0 -0
- package/assets/images/bg-chart-circle.png +0 -0
- package/assets/images/bg-chart-triangle.png +0 -0
- package/assets/images/cashub-logo-only.png +0 -0
- package/assets/images/logo-cashub.png +0 -0
- package/assets/images/map.png +0 -0
- package/assets/images/qrcode.png +0 -0
- package/backdrop/index.js +31 -0
- package/badge/BadgeFill.js +3 -3
- package/billing/BarChart.js +58 -0
- package/billing/Grid.js +49 -0
- package/billing/Header2.js +28 -0
- package/billing/Header3.js +44 -0
- package/billing/Paragraph.js +39 -0
- package/billing/ParagraphGroup.js +25 -0
- package/billing/ParagraphText.js +31 -0
- package/billing/Section.js +60 -0
- package/billing/SectionBody.js +20 -0
- package/billing/SectionHeader.js +31 -0
- package/billing/__stories__/BarChart.stories.js_bak +46 -0
- package/billing/__stories__/Grid.stories.js_bak +57 -0
- package/billing/__stories__/Header2.stories.js_bak +62 -0
- package/billing/__stories__/Header3.stories.js_bak +69 -0
- package/billing/__stories__/Paragraph.stories.js_bak +84 -0
- package/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
- package/billing/__stories__/ParagraphText.stories.js_bak +64 -0
- package/billing/__stories__/Section.stories.js_bak +115 -0
- package/billing/__stories__/SectionBody.stories.js_bak +62 -0
- package/billing/__stories__/SectionHeader.stories.js-bak +68 -0
- package/breadcrumb/Breadcrumb.js +11 -6
- package/button/IconButton.js +1 -1
- package/callout/Callout.js +36 -0
- package/callout/index.js +15 -0
- package/chart/BarChart.js +130 -0
- package/chart/DoughnutChart.js +59 -0
- package/chart/LineChart.js +121 -0
- package/chart/SingleBarChart.js +31 -0
- package/chart/index.js +39 -0
- package/container/FlexContainer.js +25 -0
- package/container/index.js +15 -0
- package/cropper/Cropper.js +1 -1
- package/datetimePicker/Accordion.js +342 -0
- package/datetimePicker/CustomTimeInput.js +77 -0
- package/datetimePicker/DatePicker.js +413 -0
- package/datetimePicker/DatePickerV2.js +456 -0
- package/datetimePicker/DateTimePickerContext.js +12 -0
- package/datetimePicker/DatetimePicker.js +80 -0
- package/datetimePicker/DatetimePickerV2.js +478 -0
- package/datetimePicker/TimeInput.js +37 -0
- package/datetimePicker/TimePicker.js +324 -0
- package/datetimePicker/accordion/Month.js +190 -0
- package/datetimePicker/accordion/Year.js +247 -0
- package/datetimePicker/hooks/index.js +31 -0
- package/datetimePicker/hooks/useChangeNumber.js +55 -0
- package/datetimePicker/hooks/useDecrease.js +54 -0
- package/datetimePicker/hooks/useIncrease.js +54 -0
- package/datetimePicker/index.js +47 -0
- package/datetimePicker/provider/constant.js +44 -0
- package/datetimePicker/utils/GMTDate.js +23 -0
- package/datetimePicker/utils/pad.js +17 -0
- package/descriptionList/DescriptionDetail.js +22 -0
- package/descriptionList/DescriptionList.js +22 -0
- package/descriptionList/DescriptionTerm.js +19 -0
- package/descriptionList/index.js +31 -0
- package/divider/Divider.js +25 -0
- package/divider/index.js +15 -0
- package/dropdown/Dropdown.js +92 -0
- package/dropdown/DropdownButtonOption.js +19 -0
- package/dropdown/DropdownContent.js +94 -0
- package/dropdown/DropdownContext.js +12 -0
- package/dropdown/DropdownDivOption.js +19 -0
- package/dropdown/DropdownItem.js +32 -0
- package/dropdown/DropdownLinkOption.js +20 -0
- package/dropdown/DropdownToggle.js +58 -0
- package/dropdown/index.js +53 -0
- package/dropzone/FileDropzone.js +24 -24
- package/dropzone/ImageDropzone.js +33 -33
- package/form/Label.js +1 -1
- package/form/Searchbox.js +4 -4
- package/geolocation/MapInteractor.js +41 -0
- package/geolocation/MapSearchBoxControl.js +100 -0
- package/geolocation/ReverseGeolocation.js +160 -0
- package/geolocation/index.js +23 -0
- package/grid/Column.js +33 -0
- package/grid/Grid.js +28 -0
- package/grid/index.js +23 -0
- package/heading/Heading1.js +22 -0
- package/heading/Heading2.js +25 -0
- package/heading/Heading3.js +7 -4
- package/heading/index.js +31 -0
- package/icon/IconFigure.js +36 -0
- package/icon/index.js +15 -0
- package/iconbox/ApplicationIconBox.js +51 -0
- package/iconbox/IconBox.js +56 -0
- package/iconbox/IconBoxFigure.js +37 -0
- package/iconbox/IconBoxImage.js +32 -0
- package/iconbox/IconBoxV2.js +42 -0
- package/iconbox/index.js +31 -0
- package/image/UploadImage.js +2 -2
- package/index.js +377 -0
- package/jsoneditor/JsonEditor.js +53 -0
- package/jsoneditor/index.js +15 -0
- package/layout/Backdrop.js +25 -0
- package/layout/Container.js +34 -0
- package/layout/Footer.js +32 -0
- package/layout/Logo.js +34 -0
- package/layout/MenuIcon.js +43 -0
- package/link/LinkSpan.js +57 -0
- package/link/index.js +15 -0
- package/map/CustomLeafletMapContainer.js +23 -0
- package/map/LeafletMap.js +224 -0
- package/map/index.js +23 -0
- package/modal/StateModal.js +2 -2
- package/modal/TitleModal.js +4 -4
- package/module/geolocation/api.js +51 -0
- package/module/message/index.js +59 -0
- package/package.json +16 -1
- package/paginate/Paginate.js +110 -0
- package/paginate/index.js +15 -0
- package/popover/Popover.js +122 -0
- package/popover/index.js +15 -0
- package/qrcode/QRCode.js +57 -0
- package/qrcode/QRCodeContainter.js +34 -0
- package/qrcode/index.js +23 -0
- package/ribbon/Ribbon.js +28 -0
- package/ribbon/index.js +15 -0
- package/section/Section.js +67 -0
- package/section/SectionBody.js +38 -0
- package/section/SectionHeader.js +42 -0
- package/section/SectionToolbar.js +22 -0
- package/section/index.js +50 -0
- package/select/ListBox.js +26 -0
- package/select/Option.js +28 -0
- package/select/OptionGroup.js +20 -0
- package/select/Options.js +25 -0
- package/select/SearchBox.js +52 -0
- package/select/Select.js +630 -0
- package/select/SelectedMultiple.js +34 -0
- package/select/SelectedSingle.js +20 -0
- package/select/index.js +15 -0
- package/services/api/index.js +73 -0
- package/styles/header.style.js +11 -0
- package/styles/sidebar.style.js +18 -0
- package/styles/theme/dark.theme.js +95 -0
- package/styles/theme/index.js +16 -0
- package/table/ImageBox.js +39 -0
- package/table/Logo.js +40 -0
- package/table/PermissionTable.js +42 -0
- package/table/Table.js +377 -0
- package/table/TableFooter.js +19 -0
- package/table/TableFooterInfo.js +19 -0
- package/table/TableFooterPager.js +19 -0
- package/table/TableHeadCell.js +39 -0
- package/table/TableSort.js +34 -0
- package/table/hooks/index.js +31 -0
- package/table/hooks/useLimitChange.js +34 -0
- package/table/hooks/usePageChange.js +33 -0
- package/table/hooks/useSortChange.js +35 -0
- package/table/index.js +31 -0
- package/tagify/Tags.js +55 -0
- package/tagify/index.js +15 -0
- package/text/Paragraph.js +37 -0
- package/text/index.js +15 -0
- package/timeline/Timeline.js +51 -0
- package/timeline/index.js +15 -0
- package/toast/CustomToastContainer.js +20 -0
- package/toast/index.js +23 -0
- package/tooltip/Tooltip.js +154 -0
- package/tooltip/index.js +15 -0
- package/utils/array/generateRange.js +19 -0
- package/utils/chart/customTooltip.js +89 -0
- package/utils/chart/padEmptyChartBar.js +48 -0
- package/utils/dataURLtoFile.js +23 -6
- package/utils/format/datetimeFormat.js +70 -0
- package/utils/format/formatDate.js +46 -0
- package/utils/format/formatSize.js +1 -1
- package/utils/getBase64.js +2 -5
- package/utils/hooks/useCustomPopper.js +49 -0
- package/utils/hooks/useForkRef.js +28 -0
- package/utils/hooks/usePagination.js +86 -0
- package/utils/image/resize.js +7 -7
- package/utils/react/setRef.js +17 -0
- package/utils/regex/check.js +13 -0
- package/wizard/Wizard.js +210 -0
- package/wizard/index.js +15 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _templateObject;
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
+
|
|
16
|
+
var Heading2 = _styledComponents.default.h2(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: var(--font-h2);\n word-break: break-word;\n white-space: pre;\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
17
|
+
var center = _ref.center;
|
|
18
|
+
return center && 'text-align: center;';
|
|
19
|
+
}, function (_ref2) {
|
|
20
|
+
var marginBottom = _ref2.marginBottom;
|
|
21
|
+
return marginBottom && 'margin-bottom: var(--spacing);';
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
var _default = Heading2;
|
|
25
|
+
exports.default = _default;
|
package/heading/Heading3.js
CHANGED
|
@@ -13,17 +13,20 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
13
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
|
-
var Heading3 = _styledComponents.default.h3(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: var(--font-h3);\n word-break: break-word;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
16
|
+
var Heading3 = _styledComponents.default.h3(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: var(--font-h3);\n word-break: break-word;\n white-space: pre;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
17
17
|
var center = _ref.center;
|
|
18
18
|
return center && 'text-align: center;';
|
|
19
19
|
}, function (_ref2) {
|
|
20
20
|
var fontWeightNormal = _ref2.fontWeightNormal;
|
|
21
21
|
return fontWeightNormal && 'font-weight: normal;';
|
|
22
22
|
}, function (_ref3) {
|
|
23
|
-
var
|
|
24
|
-
return
|
|
23
|
+
var marginBottomS = _ref3.marginBottomS;
|
|
24
|
+
return marginBottomS && 'margin-bottom: var(--spacing-s);';
|
|
25
25
|
}, function (_ref4) {
|
|
26
|
-
var
|
|
26
|
+
var marginBottomXS = _ref4.marginBottomXS;
|
|
27
|
+
return marginBottomXS && 'margin-bottom: var(--spacing-xs);';
|
|
28
|
+
}, function (_ref5) {
|
|
29
|
+
var paddingBottomXS = _ref5.paddingBottomXS;
|
|
27
30
|
return paddingBottomXS && 'padding-bottom: var(--spacing-xs);';
|
|
28
31
|
});
|
|
29
32
|
|
package/heading/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Heading1", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _Heading.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Heading2", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Heading2.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "Heading3", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _Heading3.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _Heading = _interopRequireDefault(require("./Heading1"));
|
|
26
|
+
|
|
27
|
+
var _Heading2 = _interopRequireDefault(require("./Heading2"));
|
|
28
|
+
|
|
29
|
+
var _Heading3 = _interopRequireDefault(require("./Heading3"));
|
|
30
|
+
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
|
+
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
+
|
|
20
|
+
var IconFigure = _styledComponents.default.figure(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 24px;\n height: 24px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n ", "\n"])), function (_ref) {
|
|
21
|
+
var size = _ref.size;
|
|
22
|
+
|
|
23
|
+
switch (size) {
|
|
24
|
+
case 'small':
|
|
25
|
+
return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 16px;\n height: 16px;\n "])));
|
|
26
|
+
|
|
27
|
+
case 'large':
|
|
28
|
+
return (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 32px;\n height: 32px;\n "])));
|
|
29
|
+
|
|
30
|
+
default:
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
var _default = IconFigure;
|
|
36
|
+
exports.default = _default;
|
package/icon/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "IconFigure", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _IconFigure.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _IconFigure = _interopRequireDefault(require("./IconFigure"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _IconBoxFigure = _interopRequireDefault(require("./IconBoxFigure"));
|
|
11
|
+
|
|
12
|
+
var _IconBoxImage = _interopRequireDefault(require("./IconBoxImage"));
|
|
13
|
+
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
+
|
|
20
|
+
var ApplicationIconBox = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-bottom: var(--spacing);\n\n ", ";\n"])), function (_ref) {
|
|
21
|
+
var clickable = _ref.clickable;
|
|
22
|
+
return clickable && 'cursor: pointer';
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding-top: var(--spacing-xs);\n border: var(--border-width) solid transparent;\n\n ", "\n ", "\n ", "\n"])), function (_ref2) {
|
|
26
|
+
var horizontal = _ref2.horizontal;
|
|
27
|
+
return horizontal && 'flex-direction: row;';
|
|
28
|
+
}, function (_ref3) {
|
|
29
|
+
var alignCenter = _ref3.alignCenter;
|
|
30
|
+
return alignCenter && 'text-align: center;';
|
|
31
|
+
}, function (_ref4) {
|
|
32
|
+
var selected = _ref4.selected;
|
|
33
|
+
return selected && "\n border-color: var(--border-color);\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n ";
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
var Description = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: 0;\n"])));
|
|
37
|
+
|
|
38
|
+
var Title = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-weight: var(--font-bold);\n font-size: var(--font-body1);\n margin-bottom: var(--spacing-xs);\n color: var(--font-on-background);\n overflow: hidden;\n white-space: pre;\n text-overflow: ellipsis;\n\n a {\n color: var(--font-on-background);\n }\n"])));
|
|
39
|
+
|
|
40
|
+
var Content = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: var(--font-body1);\n color: var(--font-on-mute);\n margin-bottom: var(--spacing-xs);\n overflow: hidden;\n white-space: pre;\n text-overflow: ellipsis;\n"])));
|
|
41
|
+
|
|
42
|
+
var _default = Object.assign(ApplicationIconBox, {
|
|
43
|
+
Body: Body,
|
|
44
|
+
Description: Description,
|
|
45
|
+
Title: Title,
|
|
46
|
+
Content: Content,
|
|
47
|
+
Figure: _IconBoxFigure.default,
|
|
48
|
+
Image: _IconBoxImage.default
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
exports.default = _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _IconBoxFigure = _interopRequireDefault(require("./IconBoxFigure"));
|
|
11
|
+
|
|
12
|
+
var _IconBoxImage = _interopRequireDefault(require("./IconBoxImage"));
|
|
13
|
+
|
|
14
|
+
var _bgChartTriangle = _interopRequireDefault(require("../assets/images/bg-chart-triangle.png"));
|
|
15
|
+
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
23
|
+
|
|
24
|
+
var IconBox = function IconBox(_ref) {
|
|
25
|
+
var icon = _ref.icon,
|
|
26
|
+
title = _ref.title,
|
|
27
|
+
children = _ref.children;
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
|
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(IconBoxHead, {
|
|
30
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_IconBoxFigure.default, {
|
|
31
|
+
sizeXS: true,
|
|
32
|
+
marginRight: true,
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconBoxImage.default, {
|
|
34
|
+
sizeXS: true,
|
|
35
|
+
src: icon,
|
|
36
|
+
alt: "".concat(title, "'s icon")
|
|
37
|
+
})
|
|
38
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IconBoxTitle, {
|
|
39
|
+
children: title
|
|
40
|
+
})]
|
|
41
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IconBoxBody, {
|
|
42
|
+
children: children
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: var(--spacing-l);\n margin-bottom: var(--spacing);\n border-radius: var(--border-radius);\n background: var(--color-background2);\n color: var(--font-on-background);\n\n background-color: #222143;\n background-image: url(", ");\n background-repeat: no-repeat;\n background-position: right bottom;\n background-size: 30% 70%;\n"])), _bgChartTriangle.default);
|
|
48
|
+
|
|
49
|
+
var IconBoxHead = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-bottom: var(--spacing);\n"])));
|
|
50
|
+
|
|
51
|
+
var IconBoxTitle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: var(--font-h2);\n font-weight: bold;\n word-break: break-all;\n"])));
|
|
52
|
+
|
|
53
|
+
var IconBoxBody = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: var(--font-h1);\n font-weight: bold;\n text-align: center;\n"])));
|
|
54
|
+
|
|
55
|
+
var _default = IconBox;
|
|
56
|
+
exports.default = _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _templateObject;
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
+
|
|
16
|
+
var IconBoxFigure = _styledComponents.default.figure(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: 0 0 120px;\n\n ", "\n ", "\n ", "\n ", "\n\n ", "\n ", "\n"])), function (_ref) {
|
|
17
|
+
var marginRight = _ref.marginRight;
|
|
18
|
+
return marginRight && 'margin-right: var(--spacing);';
|
|
19
|
+
}, function (_ref2) {
|
|
20
|
+
var paddingRight = _ref2.paddingRight;
|
|
21
|
+
return paddingRight && 'padding-right: var(--spacing);';
|
|
22
|
+
}, function (_ref3) {
|
|
23
|
+
var paddingRightS = _ref3.paddingRightS;
|
|
24
|
+
return paddingRightS && 'padding-right: var(--spacing-s);';
|
|
25
|
+
}, function (_ref4) {
|
|
26
|
+
var paddingBottomS = _ref4.paddingBottomS;
|
|
27
|
+
return paddingBottomS && 'padding-bottom: var(--spacing-s);';
|
|
28
|
+
}, function (_ref5) {
|
|
29
|
+
var sizeS = _ref5.sizeS;
|
|
30
|
+
return sizeS && 'flex-basis: 80px;';
|
|
31
|
+
}, function (_ref6) {
|
|
32
|
+
var sizeXS = _ref6.sizeXS;
|
|
33
|
+
return sizeXS && 'flex-basis: 40px;';
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
var _default = IconBoxFigure;
|
|
37
|
+
exports.default = _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _templateObject;
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
+
|
|
16
|
+
var IconBoxImage = _styledComponents.default.img.attrs(function () {
|
|
17
|
+
return {
|
|
18
|
+
crossOrigin: 'anonymous'
|
|
19
|
+
};
|
|
20
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 120px;\n height: 120px;\n\n ", "\n\n ", "\n\n ", "\n"])), function (_ref) {
|
|
21
|
+
var rounded = _ref.rounded;
|
|
22
|
+
return rounded && 'border-radius: var(--border-radius);';
|
|
23
|
+
}, function (_ref2) {
|
|
24
|
+
var sizeS = _ref2.sizeS;
|
|
25
|
+
return sizeS && "\n width: 80px;\n height: 80px;\n ";
|
|
26
|
+
}, function (_ref3) {
|
|
27
|
+
var sizeXS = _ref3.sizeXS;
|
|
28
|
+
return sizeXS && "\n width: 40px;\n height: 40px;\n ";
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var _default = IconBoxImage;
|
|
32
|
+
exports.default = _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _IconBoxFigure = _interopRequireDefault(require("./IconBoxFigure"));
|
|
11
|
+
|
|
12
|
+
var _IconBoxImage = _interopRequireDefault(require("./IconBoxImage"));
|
|
13
|
+
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
+
|
|
20
|
+
var IconBoxV2 = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: var(--spacing);\n margin-bottom: var(--spacing);\n background: var(--color-background1);\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n color: var(--font-on-background);\n\n ", "\n"])), function (_ref) {
|
|
21
|
+
var fullHeight = _ref.fullHeight;
|
|
22
|
+
return fullHeight && 'height: calc(100% - var(--spacing));';
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
26
|
+
|
|
27
|
+
var Description = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n font-size: var(--font-body1);\n"])));
|
|
28
|
+
|
|
29
|
+
var Info = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n word-break: break-all;\n\n &:not(:last-child) {\n margin-bottom: var(--spacing-s);\n }\n"])));
|
|
30
|
+
|
|
31
|
+
var Tool = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex: 0 0 calc(var(--spacing-s) + 36px);\n padding-left: var(--spacing-s);\n\n > *:not(:last-child) {\n margin-bottom: var(--spacing-s);\n }\n"])));
|
|
32
|
+
|
|
33
|
+
var _default = Object.assign(IconBoxV2, {
|
|
34
|
+
Body: Body,
|
|
35
|
+
Description: Description,
|
|
36
|
+
Info: Info,
|
|
37
|
+
Tool: Tool,
|
|
38
|
+
Figure: _IconBoxFigure.default,
|
|
39
|
+
Image: _IconBoxImage.default
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
exports.default = _default;
|
package/iconbox/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ApplicationIconBox", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _ApplicationIconBox.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "IconBox", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _IconBox.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "IconBoxV2", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _IconBoxV.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _ApplicationIconBox = _interopRequireDefault(require("./ApplicationIconBox"));
|
|
26
|
+
|
|
27
|
+
var _IconBox = _interopRequireDefault(require("./IconBox"));
|
|
28
|
+
|
|
29
|
+
var _IconBoxV = _interopRequireDefault(require("./IconBoxV2"));
|
|
30
|
+
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/image/UploadImage.js
CHANGED
|
@@ -71,7 +71,7 @@ var UploadImage = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
71
71
|
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
72
72
|
t = _useTranslation.t;
|
|
73
73
|
|
|
74
|
-
var handleAvatarRemove = function handleAvatarRemove(
|
|
74
|
+
var handleAvatarRemove = function handleAvatarRemove() {
|
|
75
75
|
setCurrentSrc(src);
|
|
76
76
|
ref.current.value = '';
|
|
77
77
|
setCurrentFile(null);
|
|
@@ -94,7 +94,7 @@ var UploadImage = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
94
94
|
|
|
95
95
|
var handleOnChange = function handleOnChange(files) {
|
|
96
96
|
if (files.length === 0) {
|
|
97
|
-
|
|
97
|
+
// close file selector or cancel upload file need to restore to last uploaded file
|
|
98
98
|
restoreFile();
|
|
99
99
|
} else {
|
|
100
100
|
var fileType = files[0].name.slice(files[0].name.lastIndexOf('.')).toLowerCase();
|