@cashub/ui 0.48.5 → 0.48.6
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 +3 -6
- package/Tab/subComponent/TabListV2.js +11 -18
- package/Tab/subComponent/TabPanelV2.js +16 -20
- package/Tab/subComponent/TabTabV2.js +33 -21
- 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 +22 -18
- package/chart/DoughnutChart.js +34 -20
- package/chart/LineChart.js +13 -21
- package/chart/SingleBarChart.js +22 -5
- package/chart/utils/centerTextPlugin.js +2 -2
- package/chart/utils/customTooltip.js +8 -8
- package/chart/utils/htmlLegendPlugin.js +1 -1
- package/chart/utils/yAxisTopTitlePlugin.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/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/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 +20 -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 +52 -17
- package/table/Table.js +198 -48
- package/table/__mock__/columns.js +1 -1
- 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/button/ButtonGroup.js
CHANGED
|
@@ -5,33 +5,57 @@ 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 ButtonGroup = _styledComponents.default.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
|
|
13
|
+
> button:not(:first-child),
|
|
14
|
+
*:not(:first-child) {
|
|
15
|
+
margin-left: var(--spacing-s);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
${_ref => {
|
|
12
19
|
let {
|
|
13
20
|
alignCenter
|
|
14
21
|
} = _ref;
|
|
15
22
|
return alignCenter && 'justify-content: center;';
|
|
16
|
-
}
|
|
23
|
+
}}
|
|
24
|
+
|
|
25
|
+
${_ref2 => {
|
|
17
26
|
let {
|
|
18
27
|
alignRight
|
|
19
28
|
} = _ref2;
|
|
20
29
|
return alignRight && 'justify-content: flex-end;';
|
|
21
|
-
}
|
|
30
|
+
}}
|
|
31
|
+
|
|
32
|
+
${_ref3 => {
|
|
22
33
|
let {
|
|
23
34
|
marginBottom
|
|
24
35
|
} = _ref3;
|
|
25
36
|
return marginBottom && 'margin-bottom: var(--spacing);';
|
|
26
|
-
}
|
|
37
|
+
}}
|
|
38
|
+
|
|
39
|
+
${_ref4 => {
|
|
27
40
|
let {
|
|
28
41
|
vertical
|
|
29
42
|
} = _ref4;
|
|
30
|
-
return vertical &&
|
|
31
|
-
|
|
43
|
+
return vertical && `
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
|
|
46
|
+
> button,
|
|
47
|
+
> * {
|
|
48
|
+
margin-left: 0 !important;
|
|
49
|
+
margin-bottom: var(--spacing-s);
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
}}
|
|
53
|
+
|
|
54
|
+
${_ref5 => {
|
|
32
55
|
let {
|
|
33
56
|
height100
|
|
34
57
|
} = _ref5;
|
|
35
58
|
return height100 && 'height: 100%;';
|
|
36
|
-
}
|
|
59
|
+
}}
|
|
60
|
+
`;
|
|
37
61
|
var _default = exports.default = ButtonGroup;
|
package/button/IconButton.js
CHANGED
|
@@ -5,41 +5,68 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
-
var _templateObject, _templateObject2;
|
|
9
8
|
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); }
|
|
10
9
|
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; }
|
|
11
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
12
10
|
const IconButton = _styledComponents.default.div.attrs(() => ({
|
|
13
11
|
role: 'button'
|
|
14
|
-
}))
|
|
12
|
+
}))`
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
width: 40px;
|
|
17
|
+
height: 40px;
|
|
18
|
+
transition: 0.3s;
|
|
19
|
+
position: relative;
|
|
20
|
+
border-radius: var(--border-radius-l);
|
|
21
|
+
color: ${_ref => {
|
|
15
22
|
let {
|
|
16
23
|
disabled
|
|
17
24
|
} = _ref;
|
|
18
25
|
return disabled ? 'var(--color-grey)' : 'var(--font-on-background)';
|
|
19
|
-
}
|
|
26
|
+
}};
|
|
27
|
+
cursor: ${_ref2 => {
|
|
20
28
|
let {
|
|
21
29
|
disabled
|
|
22
30
|
} = _ref2;
|
|
23
31
|
return disabled ? 'no-drop' : 'pointer';
|
|
24
|
-
}
|
|
32
|
+
}};
|
|
33
|
+
margin: auto;
|
|
34
|
+
|
|
35
|
+
${_ref3 => {
|
|
25
36
|
let {
|
|
26
37
|
size
|
|
27
38
|
} = _ref3;
|
|
28
|
-
return size === 'small' && (0, _styledComponents.css)
|
|
29
|
-
|
|
39
|
+
return size === 'small' && (0, _styledComponents.css)`
|
|
40
|
+
width: 32px;
|
|
41
|
+
height: 32px;
|
|
42
|
+
`;
|
|
43
|
+
}}
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
${_ref4 => {
|
|
30
47
|
let {
|
|
31
48
|
disabled
|
|
32
49
|
} = _ref4;
|
|
33
50
|
return !disabled && 'background: var(--color-hover)';
|
|
34
|
-
}
|
|
51
|
+
}}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
> svg {
|
|
55
|
+
font-size: 1.5rem;
|
|
56
|
+
|
|
57
|
+
${_ref5 => {
|
|
35
58
|
let {
|
|
36
59
|
size
|
|
37
60
|
} = _ref5;
|
|
38
61
|
return size === 'small' && 'font-size: 1rem;';
|
|
39
|
-
}
|
|
62
|
+
}}
|
|
63
|
+
|
|
64
|
+
${_ref6 => {
|
|
40
65
|
let {
|
|
41
66
|
size
|
|
42
67
|
} = _ref6;
|
|
43
68
|
return size === 'large' && 'font-size: 2rem;';
|
|
44
|
-
}
|
|
69
|
+
}}
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
45
72
|
var _default = exports.default = IconButton;
|
|
@@ -9,9 +9,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
var _md = require("react-icons/md");
|
|
10
10
|
var _Button = _interopRequireDefault(require("./Button"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
var _templateObject;
|
|
13
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
15
13
|
const ScrollToTopButton = () => {
|
|
16
14
|
const [$display, setDisplay] = (0, _react.useState)(false);
|
|
17
15
|
const toggleVisible = () => {
|
|
@@ -37,10 +35,20 @@ const ScrollToTopButton = () => {
|
|
|
37
35
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_md.MdOutlineArrowBackIosNew, {})
|
|
38
36
|
});
|
|
39
37
|
};
|
|
40
|
-
const StyledScrollToTopButton = (0, _styledComponents.default)(_Button.default)
|
|
38
|
+
const StyledScrollToTopButton = (0, _styledComponents.default)(_Button.default)`
|
|
39
|
+
position: fixed;
|
|
40
|
+
bottom: var(--spacing);
|
|
41
|
+
right: var(--spacing);
|
|
42
|
+
display: ${_ref => {
|
|
41
43
|
let {
|
|
42
44
|
$display
|
|
43
45
|
} = _ref;
|
|
44
46
|
return $display ? 'flex' : 'none';
|
|
45
|
-
}
|
|
47
|
+
}};
|
|
48
|
+
z-index: 30;
|
|
49
|
+
|
|
50
|
+
> svg {
|
|
51
|
+
transform: rotate(90deg);
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
46
54
|
var _default = exports.default = ScrollToTopButton;
|
package/callout/Callout.js
CHANGED
|
@@ -5,15 +5,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
9
|
+
const Callout = _styledComponents.default.div`
|
|
10
|
+
padding: var(--spacing);
|
|
11
|
+
border-radius: var(--border-radius);
|
|
12
|
+
background: var(--color-background3);
|
|
13
|
+
margin-bottom: var(--spacing);
|
|
14
|
+
`;
|
|
15
|
+
const Body = _styledComponents.default.div`
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
`;
|
|
19
|
+
const Content = _styledComponents.default.div`
|
|
20
|
+
flex: 2;
|
|
21
|
+
`;
|
|
22
|
+
const Title = _styledComponents.default.h3`
|
|
23
|
+
font-size: var(--font-h3);
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
color: var(--font-on-background);
|
|
26
|
+
margin-bottom: var(--border-radius);
|
|
27
|
+
`;
|
|
28
|
+
const Description = _styledComponents.default.p`
|
|
29
|
+
font-size: var(--font-body1);
|
|
30
|
+
line-height: 1.5;
|
|
31
|
+
color: var(--font-on-mute);
|
|
32
|
+
padding-right: var(--spacing);
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
|
|
35
|
+
&:last-child {
|
|
36
|
+
margin-bottom: 0;
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
const Action = _styledComponents.default.div`
|
|
40
|
+
flex: 1;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
align-items: flex-end;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
`;
|
|
17
46
|
var _default = exports.default = Object.assign(Callout, {
|
|
18
47
|
Body,
|
|
19
48
|
Content,
|
package/chart/BarChart.js
CHANGED
|
@@ -9,23 +9,16 @@ var _styledComponents = require("styled-components");
|
|
|
9
9
|
var _reactChartjs = require("react-chartjs-2");
|
|
10
10
|
var _customTooltip = _interopRequireDefault(require("./utils/customTooltip"));
|
|
11
11
|
var _padEmptyChartBar = _interopRequireDefault(require("./utils/padEmptyChartBar"));
|
|
12
|
+
var _yAxisTopTitlePlugin = _interopRequireDefault(require("./utils/yAxisTopTitlePlugin"));
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
const _excluded = ["height", "data", "options"];
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
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; }
|
|
16
|
-
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; }
|
|
17
|
-
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; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
19
|
-
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); }
|
|
20
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
21
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
22
15
|
const BarChart = _ref => {
|
|
23
16
|
let {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
height = 300,
|
|
18
|
+
data,
|
|
19
|
+
options = {},
|
|
20
|
+
...props
|
|
21
|
+
} = _ref;
|
|
29
22
|
const theme = (0, _react.useContext)(_styledComponents.ThemeContext);
|
|
30
23
|
|
|
31
24
|
// fix: read value from theme
|
|
@@ -35,6 +28,7 @@ const BarChart = _ref => {
|
|
|
35
28
|
_reactChartjs.defaults.plugins.tooltip.external = (0, _customTooltip.default)(theme);
|
|
36
29
|
const customOptions = (0, _react.useMemo)(() => {
|
|
37
30
|
const {
|
|
31
|
+
yAxisTopTitle,
|
|
38
32
|
tooltips = {}
|
|
39
33
|
} = options;
|
|
40
34
|
return {
|
|
@@ -44,6 +38,7 @@ const BarChart = _ref => {
|
|
|
44
38
|
suggestedMax: options.suggestedMax === undefined ? 10 : options.suggestedMax,
|
|
45
39
|
showLegend: options.showLegend === undefined ? false : options.showLegend,
|
|
46
40
|
rotateLabel: options.rotateLabel === undefined ? true : options.rotateLabel,
|
|
41
|
+
yAxisTopTitle: yAxisTopTitle ? yAxisTopTitle : '',
|
|
47
42
|
tooltipLabelPostfix: tooltips.labelPostfix || ''
|
|
48
43
|
};
|
|
49
44
|
}, [options]);
|
|
@@ -75,7 +70,7 @@ const BarChart = _ref => {
|
|
|
75
70
|
if (context.dataset.customLabel) {
|
|
76
71
|
return context.dataset.customLabel[context.dataIndex].toString();
|
|
77
72
|
}
|
|
78
|
-
return
|
|
73
|
+
return `${label.toString()}${customOptions.tooltipLabelPostfix}`;
|
|
79
74
|
},
|
|
80
75
|
labelTextColor(context) {
|
|
81
76
|
const {
|
|
@@ -90,6 +85,9 @@ const BarChart = _ref => {
|
|
|
90
85
|
return color;
|
|
91
86
|
}
|
|
92
87
|
}
|
|
88
|
+
},
|
|
89
|
+
yAxisTopTitle: {
|
|
90
|
+
title: customOptions.yAxisTopTitle
|
|
93
91
|
}
|
|
94
92
|
},
|
|
95
93
|
scales: {
|
|
@@ -103,7 +101,7 @@ const BarChart = _ref => {
|
|
|
103
101
|
minRotation: customOptions.rotateLabel ? 15 : 0,
|
|
104
102
|
callback(value) {
|
|
105
103
|
const label = this.getLabelForValue(value);
|
|
106
|
-
return label && label.length > 11 ?
|
|
104
|
+
return label && label.length > 11 ? `${label.substr(0, 11)}...` : label;
|
|
107
105
|
}
|
|
108
106
|
}
|
|
109
107
|
},
|
|
@@ -123,14 +121,20 @@ const BarChart = _ref => {
|
|
|
123
121
|
}
|
|
124
122
|
}
|
|
125
123
|
}
|
|
124
|
+
},
|
|
125
|
+
layout: {
|
|
126
|
+
padding: {
|
|
127
|
+
top: 32
|
|
128
|
+
}
|
|
126
129
|
}
|
|
127
130
|
};
|
|
128
131
|
}, [customOptions, theme.fontOnPrimary]);
|
|
129
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Bar,
|
|
132
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Bar, {
|
|
130
133
|
height: height,
|
|
131
134
|
data: data,
|
|
132
135
|
options: defaultOptions,
|
|
133
|
-
plugins: [_padEmptyChartBar.default]
|
|
134
|
-
|
|
136
|
+
plugins: [_padEmptyChartBar.default, _yAxisTopTitlePlugin.default],
|
|
137
|
+
...props
|
|
138
|
+
});
|
|
135
139
|
};
|
|
136
140
|
var _default = exports.default = BarChart;
|
package/chart/DoughnutChart.js
CHANGED
|
@@ -12,27 +12,17 @@ var _htmlLegendPlugin = _interopRequireDefault(require("./utils/htmlLegendPlugin
|
|
|
12
12
|
var _customTooltip = _interopRequireDefault(require("./utils/customTooltip"));
|
|
13
13
|
var _centerTextPlugin = _interopRequireDefault(require("./utils/centerTextPlugin"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
var _templateObject;
|
|
16
|
-
const _excluded = ["height", "data", "showCenterText", "centerTextTitle"];
|
|
17
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
16
|
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); }
|
|
19
17
|
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; }
|
|
20
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
21
|
-
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; }
|
|
22
|
-
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; }
|
|
23
|
-
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; }
|
|
24
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
25
|
-
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); }
|
|
26
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
27
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
28
18
|
const DoughnutChart = _ref => {
|
|
29
19
|
let {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
height = 300,
|
|
21
|
+
data,
|
|
22
|
+
showCenterText = false,
|
|
23
|
+
centerTextTitle,
|
|
24
|
+
...props
|
|
25
|
+
} = _ref;
|
|
36
26
|
const [legendContainerId] = (0, _react.useState)((0, _lodash.default)('legend-container-'));
|
|
37
27
|
const theme = (0, _react.useContext)(_styledComponents.ThemeContext);
|
|
38
28
|
|
|
@@ -89,16 +79,40 @@ const DoughnutChart = _ref => {
|
|
|
89
79
|
}, [legendContainerId, theme.fontOnPrimary, showCenterText, centerTextTitle]);
|
|
90
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
91
81
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
92
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Doughnut,
|
|
82
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Doughnut, {
|
|
93
83
|
height: height,
|
|
94
84
|
data: data,
|
|
95
85
|
options: defaultOptions,
|
|
96
|
-
plugins: [_htmlLegendPlugin.default, _centerTextPlugin.default]
|
|
97
|
-
|
|
86
|
+
plugins: [_htmlLegendPlugin.default, _centerTextPlugin.default],
|
|
87
|
+
...props
|
|
88
|
+
})
|
|
98
89
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(LegendWrapper, {
|
|
99
90
|
id: legendContainerId
|
|
100
91
|
})]
|
|
101
92
|
});
|
|
102
93
|
};
|
|
103
|
-
const LegendWrapper = _styledComponents.default.div
|
|
94
|
+
const LegendWrapper = _styledComponents.default.div`
|
|
95
|
+
.custom-legend-tooltip {
|
|
96
|
+
position: relative;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.custom-legend-tooltip:hover::after {
|
|
100
|
+
content: attr(data-tooltip);
|
|
101
|
+
position: absolute;
|
|
102
|
+
top: calc(1rem + var(--spacing-xs));
|
|
103
|
+
left: 50%;
|
|
104
|
+
transform: translateX(-50%);
|
|
105
|
+
border: 1px solid var(--border-color);
|
|
106
|
+
color: var(--font-on-background);
|
|
107
|
+
background: var(--color-background2);
|
|
108
|
+
box-shadow: var(--box-shadow);
|
|
109
|
+
border-radius: calc(var(--border-radius) / 2);
|
|
110
|
+
padding: var(--spacing-xs);
|
|
111
|
+
font-size: var(--font-body1);
|
|
112
|
+
font-weight: var(--font-normal);
|
|
113
|
+
text-align: center;
|
|
114
|
+
width: max-content;
|
|
115
|
+
max-width: 50vw;
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
104
118
|
var _default = exports.default = DoughnutChart;
|
package/chart/LineChart.js
CHANGED
|
@@ -10,22 +10,14 @@ var _reactChartjs = require("react-chartjs-2");
|
|
|
10
10
|
var _customTooltip = _interopRequireDefault(require("./utils/customTooltip"));
|
|
11
11
|
var _yAxisTopTitlePlugin = _interopRequireDefault(require("./utils/yAxisTopTitlePlugin"));
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
const _excluded = ["height", "data", "options"];
|
|
14
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
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; }
|
|
16
|
-
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; }
|
|
17
|
-
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; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
19
|
-
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); }
|
|
20
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
21
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
22
14
|
const LineChart = _ref => {
|
|
23
15
|
let {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
height = 300,
|
|
17
|
+
data,
|
|
18
|
+
options = {},
|
|
19
|
+
...props
|
|
20
|
+
} = _ref;
|
|
29
21
|
const theme = (0, _react.useContext)(_styledComponents.ThemeContext);
|
|
30
22
|
|
|
31
23
|
// fix: read value from theme
|
|
@@ -74,16 +66,15 @@ const LineChart = _ref => {
|
|
|
74
66
|
callbacks: {
|
|
75
67
|
title(context) {
|
|
76
68
|
const content = context[0] ? context[0].label.match(/(.{1,20})/g) : '';
|
|
77
|
-
return
|
|
69
|
+
return `${customOptions.tooltipTitlePrefix}${content}`;
|
|
78
70
|
},
|
|
79
71
|
label(context) {
|
|
80
|
-
|
|
81
|
-
const tooltipLabel = (_context$dataset$tool = context.dataset.tooltipLabels) === null || _context$dataset$tool === void 0 ? void 0 : _context$dataset$tool[context.dataIndex];
|
|
72
|
+
const tooltipLabel = context.dataset.tooltipLabels?.[context.dataIndex];
|
|
82
73
|
if (tooltipLabel !== undefined) {
|
|
83
|
-
return
|
|
74
|
+
return `${context.dataset.label}: ${tooltipLabel}`;
|
|
84
75
|
}
|
|
85
76
|
const content = context.dataset.data[context.dataIndex].toString();
|
|
86
|
-
return
|
|
77
|
+
return `${context.dataset.label}: ${customOptions.tooltipLabelPrefix}${content}${customOptions.tooltipLabelPostfix}`;
|
|
87
78
|
},
|
|
88
79
|
labelColor(context) {
|
|
89
80
|
const {
|
|
@@ -143,11 +134,12 @@ const LineChart = _ref => {
|
|
|
143
134
|
}
|
|
144
135
|
};
|
|
145
136
|
}, [customOptions, theme.fontOnPrimary]);
|
|
146
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Line,
|
|
137
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Line, {
|
|
147
138
|
height: height,
|
|
148
139
|
data: data,
|
|
149
140
|
options: defaultOptions,
|
|
150
|
-
plugins: [_yAxisTopTitlePlugin.default]
|
|
151
|
-
|
|
141
|
+
plugins: [_yAxisTopTitlePlugin.default],
|
|
142
|
+
...props
|
|
143
|
+
});
|
|
152
144
|
};
|
|
153
145
|
var _default = exports.default = LineChart;
|
package/chart/SingleBarChart.js
CHANGED
|
@@ -6,20 +6,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _backgroundColor = _interopRequireDefault(require("../styles/mixin/backgroundColor"));
|
|
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 SingleBarChart = _styledComponents.default.div.attrs(() => ({
|
|
13
11
|
primary: true
|
|
14
|
-
}))
|
|
12
|
+
}))`
|
|
13
|
+
position: relative;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 1rem;
|
|
16
|
+
border-radius: var(--border-radius);
|
|
17
|
+
background: var(--color-background3);
|
|
18
|
+
|
|
19
|
+
&::before {
|
|
20
|
+
position: absolute;
|
|
21
|
+
content: '';
|
|
22
|
+
width: ${_ref => {
|
|
15
23
|
let {
|
|
16
24
|
percentage
|
|
17
25
|
} = _ref;
|
|
18
26
|
return percentage;
|
|
19
|
-
}
|
|
27
|
+
}}%;
|
|
28
|
+
border-radius: var(--border-radius);
|
|
29
|
+
top: 0;
|
|
30
|
+
bottom: 0;
|
|
31
|
+
|
|
32
|
+
${_backgroundColor.default}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
${_ref2 => {
|
|
20
36
|
let {
|
|
21
37
|
marginTop
|
|
22
38
|
} = _ref2;
|
|
23
39
|
return marginTop && 'margin-top: var(--spacing-s)';
|
|
24
|
-
}
|
|
40
|
+
}}
|
|
41
|
+
`;
|
|
25
42
|
var _default = exports.default = SingleBarChart;
|
|
@@ -48,13 +48,13 @@ const centerTextPlugin = {
|
|
|
48
48
|
title
|
|
49
49
|
} = config;
|
|
50
50
|
if (title) {
|
|
51
|
-
ctx.font =
|
|
51
|
+
ctx.font = `bold ${size}px ${family}`;
|
|
52
52
|
ctx.fillText(title, centerX, centerY - offset);
|
|
53
53
|
}
|
|
54
54
|
const total = data.datasets[0].data.reduce((total, current) => {
|
|
55
55
|
return total + current;
|
|
56
56
|
}, 0);
|
|
57
|
-
ctx.font =
|
|
57
|
+
ctx.font = `${size}px ${family}`;
|
|
58
58
|
ctx.fillText(total.toLocaleString(), centerX, centerY + (title ? offset : 0));
|
|
59
59
|
ctx.restore();
|
|
60
60
|
}
|
|
@@ -41,16 +41,16 @@ const customTooltip = theme => {
|
|
|
41
41
|
});
|
|
42
42
|
let innerHtml = '<thead>';
|
|
43
43
|
titleLines.forEach(title => {
|
|
44
|
-
innerHtml +=
|
|
44
|
+
innerHtml += `<tr><th>${title}</th></tr>`;
|
|
45
45
|
});
|
|
46
46
|
innerHtml += '</thead><tbody>';
|
|
47
47
|
bodyLines.forEach(body => {
|
|
48
48
|
if (Array.isArray(body)) {
|
|
49
49
|
body.forEach(line => {
|
|
50
|
-
innerHtml +=
|
|
50
|
+
innerHtml += `<tr><td>${line}</td></tr>`;
|
|
51
51
|
});
|
|
52
52
|
} else {
|
|
53
|
-
innerHtml +=
|
|
53
|
+
innerHtml += `<tr><td>${body}</td></tr>`;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
innerHtml += '</tbody>';
|
|
@@ -71,23 +71,23 @@ const customTooltip = theme => {
|
|
|
71
71
|
tooltipEl.style.background = tooltipModel.labelColors[0].backgroundColor;
|
|
72
72
|
tooltipEl.style.borderRadius = theme.borderRadius;
|
|
73
73
|
tooltipEl.style.textAlign = 'center';
|
|
74
|
-
tooltipEl.style.padding =
|
|
74
|
+
tooltipEl.style.padding = `${theme.spacerXS} ${theme.spacerS}`;
|
|
75
75
|
tooltipEl.style.pointerEvents = 'none';
|
|
76
76
|
|
|
77
77
|
// determine position is left or right
|
|
78
78
|
if (tooltipModel.caretX + tooltipEl.offsetWidth <= this._chart.width) {
|
|
79
79
|
tooltipEl.style.borderTopLeftRadius = 0;
|
|
80
|
-
tooltipEl.style.left =
|
|
80
|
+
tooltipEl.style.left = `${position.left + window.pageXOffset + tooltipModel.caretX + 8}px`;
|
|
81
81
|
} else {
|
|
82
82
|
tooltipEl.style.borderTopRightRadius = 0;
|
|
83
|
-
tooltipEl.style.left =
|
|
83
|
+
tooltipEl.style.left = `${position.left + window.pageXOffset + tooltipModel.caretX - tooltipModel.width - 16 * 2}px`;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// determine position is top or bottom
|
|
87
87
|
if (tooltipModel.caretY + tooltipEl.offsetHeight <= this._chart.height) {
|
|
88
|
-
tooltipEl.style.top =
|
|
88
|
+
tooltipEl.style.top = `${position.top + window.pageYOffset + tooltipModel.caretY + 8}px`;
|
|
89
89
|
} else {
|
|
90
|
-
tooltipEl.style.top =
|
|
90
|
+
tooltipEl.style.top = `${position.top + window.pageYOffset + tooltipModel.caretY - tooltipModel.width - 16 * 2}px`;
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
};
|
|
@@ -49,7 +49,7 @@ const htmlLegendPlugin = {
|
|
|
49
49
|
const boxSpan = document.createElement('span');
|
|
50
50
|
boxSpan.style.background = item.fillStyle;
|
|
51
51
|
boxSpan.style.borderColor = item.strokeStyle;
|
|
52
|
-
boxSpan.style.borderWidth =
|
|
52
|
+
boxSpan.style.borderWidth = `${item.lineWidth}px`;
|
|
53
53
|
boxSpan.style.borderStyle = 'solid';
|
|
54
54
|
boxSpan.style.display = 'inline-block';
|
|
55
55
|
boxSpan.style.height = '16px';
|
|
@@ -5,28 +5,36 @@ 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 FlexContainer = _styledComponents.default.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
|
|
12
|
+
${_ref => {
|
|
12
13
|
let {
|
|
13
14
|
marginBottom
|
|
14
15
|
} = _ref;
|
|
15
16
|
return marginBottom && 'margin-bottom: var(--spacing-l)';
|
|
16
|
-
}
|
|
17
|
+
}};
|
|
18
|
+
|
|
19
|
+
${_ref2 => {
|
|
17
20
|
let {
|
|
18
21
|
wrap
|
|
19
22
|
} = _ref2;
|
|
20
23
|
return wrap && 'flex-wrap: wrap';
|
|
21
|
-
}
|
|
24
|
+
}};
|
|
25
|
+
|
|
26
|
+
${_ref3 => {
|
|
22
27
|
let {
|
|
23
28
|
alignCenter
|
|
24
29
|
} = _ref3;
|
|
25
30
|
return alignCenter && 'align-items: center;';
|
|
26
|
-
}
|
|
31
|
+
}}
|
|
32
|
+
|
|
33
|
+
${_ref4 => {
|
|
27
34
|
let {
|
|
28
35
|
spaceBetween
|
|
29
36
|
} = _ref4;
|
|
30
37
|
return spaceBetween && 'justify-content: space-between;';
|
|
31
|
-
}
|
|
38
|
+
}}
|
|
39
|
+
`;
|
|
32
40
|
var _default = exports.default = FlexContainer;
|