@cashub/ui 0.48.13 → 0.48.14
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 +41 -25
- 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 +13 -21
- 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 +56 -33
- 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/Button.js
CHANGED
|
@@ -7,62 +7,130 @@ exports.default = void 0;
|
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _backgroundColor = _interopRequireDefault(require("../styles/mixin/backgroundColor"));
|
|
9
9
|
var _colorOnBackground = _interopRequireDefault(require("../styles/mixin/colorOnBackground"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
11
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
11
|
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); }
|
|
13
12
|
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; }
|
|
14
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
15
13
|
const Button = _styledComponents.default.button.attrs(() => ({
|
|
16
14
|
primary: true
|
|
17
|
-
}))
|
|
15
|
+
}))`
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
border: none;
|
|
19
|
+
font-size: var(--font-button);
|
|
20
|
+
line-height: var(--font-body1);
|
|
21
|
+
cursor: ${_ref => {
|
|
18
22
|
let {
|
|
19
23
|
disabled
|
|
20
24
|
} = _ref;
|
|
21
25
|
return disabled ? 'no-drop' : 'pointer';
|
|
22
|
-
}
|
|
26
|
+
}};
|
|
27
|
+
border-radius: var(--border-radius-l);
|
|
28
|
+
padding: 10px var(--spacing-s);
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
|
|
31
|
+
> svg {
|
|
32
|
+
margin-right: calc(var(--spacing-s) - 0.25rem);
|
|
33
|
+
font-size: var(--font-body1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
${_ref2 => {
|
|
23
38
|
let {
|
|
24
39
|
disabled
|
|
25
40
|
} = _ref2;
|
|
26
|
-
return !disabled && (0, _styledComponents.css)
|
|
27
|
-
|
|
41
|
+
return !disabled && (0, _styledComponents.css)`
|
|
42
|
+
transition: 0.3s;
|
|
43
|
+
box-shadow: var(--box-shadow);
|
|
44
|
+
opacity: 0.9;
|
|
45
|
+
`;
|
|
46
|
+
}}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
${_backgroundColor.default}
|
|
50
|
+
${_colorOnBackground.default}
|
|
51
|
+
|
|
52
|
+
${_ref3 => {
|
|
28
53
|
let {
|
|
29
54
|
secondary
|
|
30
55
|
} = _ref3;
|
|
31
|
-
return secondary && (0, _styledComponents.css)
|
|
32
|
-
|
|
56
|
+
return secondary && (0, _styledComponents.css)`
|
|
57
|
+
background: var(--color-background2);
|
|
58
|
+
color: var(--font-on-background);
|
|
59
|
+
`;
|
|
60
|
+
}}
|
|
61
|
+
|
|
62
|
+
${_ref4 => {
|
|
33
63
|
let {
|
|
34
64
|
reverse
|
|
35
65
|
} = _ref4;
|
|
36
|
-
return reverse && (0, _styledComponents.css)
|
|
37
|
-
|
|
66
|
+
return reverse && (0, _styledComponents.css)`
|
|
67
|
+
background: var(--color-background1);
|
|
68
|
+
color: var(--font-on-background);
|
|
69
|
+
`;
|
|
70
|
+
}}
|
|
71
|
+
|
|
72
|
+
${_ref5 => {
|
|
38
73
|
let {
|
|
39
74
|
disabled
|
|
40
75
|
} = _ref5;
|
|
41
|
-
return disabled && (0, _styledComponents.css)
|
|
42
|
-
|
|
76
|
+
return disabled && (0, _styledComponents.css)`
|
|
77
|
+
opacity: 0.5;
|
|
78
|
+
`;
|
|
79
|
+
}}
|
|
80
|
+
|
|
81
|
+
${_ref6 => {
|
|
43
82
|
let {
|
|
44
83
|
iconOnly
|
|
45
84
|
} = _ref6;
|
|
46
|
-
return iconOnly && (0, _styledComponents.css)
|
|
47
|
-
|
|
85
|
+
return iconOnly && (0, _styledComponents.css)`
|
|
86
|
+
padding: 10px;
|
|
87
|
+
|
|
88
|
+
> svg {
|
|
89
|
+
margin-right: 0;
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
92
|
+
}}
|
|
93
|
+
|
|
94
|
+
${_ref7 => {
|
|
48
95
|
let {
|
|
49
96
|
fullWidth
|
|
50
97
|
} = _ref7;
|
|
51
98
|
return fullWidth && 'width: 100%;';
|
|
52
|
-
}
|
|
99
|
+
}}
|
|
100
|
+
|
|
101
|
+
${_ref8 => {
|
|
53
102
|
let {
|
|
54
103
|
alignCenter
|
|
55
104
|
} = _ref8;
|
|
56
105
|
return alignCenter && 'justify-content: center;';
|
|
57
|
-
}
|
|
106
|
+
}}
|
|
107
|
+
|
|
108
|
+
${_ref9 => {
|
|
58
109
|
let {
|
|
59
110
|
filterFocus
|
|
60
111
|
} = _ref9;
|
|
61
|
-
return filterFocus && (0, _styledComponents.css)
|
|
62
|
-
|
|
112
|
+
return filterFocus && (0, _styledComponents.css)`
|
|
113
|
+
border: 2px solid var(--color-danger);
|
|
114
|
+
`;
|
|
115
|
+
}}
|
|
116
|
+
|
|
117
|
+
${_ref10 => {
|
|
63
118
|
let {
|
|
64
119
|
variant
|
|
65
120
|
} = _ref10;
|
|
66
|
-
return variant === 'link' && (0, _styledComponents.css)
|
|
67
|
-
|
|
121
|
+
return variant === 'link' && (0, _styledComponents.css)`
|
|
122
|
+
font-size: var(--font-body1);
|
|
123
|
+
background: transparent;
|
|
124
|
+
color: var(--color-primary);
|
|
125
|
+
border: none;
|
|
126
|
+
padding: 0;
|
|
127
|
+
text-decoration: underline;
|
|
128
|
+
text-transform: none;
|
|
129
|
+
&:hover {
|
|
130
|
+
opacity: 0.8;
|
|
131
|
+
box-shadow: none;
|
|
132
|
+
}
|
|
133
|
+
`;
|
|
134
|
+
}}
|
|
135
|
+
`;
|
|
68
136
|
var _default = exports.default = Button;
|
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
|
@@ -11,22 +11,14 @@ var _customTooltip = _interopRequireDefault(require("./utils/customTooltip"));
|
|
|
11
11
|
var _padEmptyChartBar = _interopRequireDefault(require("./utils/padEmptyChartBar"));
|
|
12
12
|
var _yAxisTopTitlePlugin = _interopRequireDefault(require("./utils/yAxisTopTitlePlugin"));
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
const _excluded = ["height", "data", "options"];
|
|
15
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
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; }
|
|
17
|
-
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; }
|
|
18
|
-
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; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
-
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); }
|
|
21
|
-
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; }
|
|
22
|
-
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; }
|
|
23
15
|
const BarChart = _ref => {
|
|
24
16
|
let {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
height = 300,
|
|
18
|
+
data,
|
|
19
|
+
options = {},
|
|
20
|
+
...props
|
|
21
|
+
} = _ref;
|
|
30
22
|
const theme = (0, _react.useContext)(_styledComponents.ThemeContext);
|
|
31
23
|
|
|
32
24
|
// fix: read value from theme
|
|
@@ -78,16 +70,15 @@ const BarChart = _ref => {
|
|
|
78
70
|
return context[0] ? context[0].label.match(/(.{1,20})/g) : '';
|
|
79
71
|
},
|
|
80
72
|
label(context) {
|
|
81
|
-
|
|
82
|
-
const tooltipLabel = (_context$dataset$tool = context.dataset.tooltipLabels) === null || _context$dataset$tool === void 0 ? void 0 : _context$dataset$tool[context.dataIndex];
|
|
73
|
+
const tooltipLabel = context.dataset.tooltipLabels?.[context.dataIndex];
|
|
83
74
|
if (tooltipLabel !== undefined) {
|
|
84
|
-
return
|
|
75
|
+
return `${context.dataset.label}: ${tooltipLabel}`;
|
|
85
76
|
}
|
|
86
77
|
const label = context.dataset.data[context.dataIndex];
|
|
87
78
|
if (context.dataset.customLabel) {
|
|
88
79
|
return context.dataset.customLabel[context.dataIndex].toString();
|
|
89
80
|
}
|
|
90
|
-
return
|
|
81
|
+
return `${context.dataset.label}: ${label.toString()}${customOptions.tooltipLabelPostfix}`;
|
|
91
82
|
},
|
|
92
83
|
labelTextColor(context) {
|
|
93
84
|
const {
|
|
@@ -118,7 +109,7 @@ const BarChart = _ref => {
|
|
|
118
109
|
minRotation: customOptions.rotateLabel ? 15 : 0,
|
|
119
110
|
callback(value) {
|
|
120
111
|
const label = this.getLabelForValue(value);
|
|
121
|
-
return label && label.length > 11 ?
|
|
112
|
+
return label && label.length > 11 ? `${label.substr(0, 11)}...` : label;
|
|
122
113
|
}
|
|
123
114
|
}
|
|
124
115
|
},
|
|
@@ -146,11 +137,12 @@ const BarChart = _ref => {
|
|
|
146
137
|
}
|
|
147
138
|
};
|
|
148
139
|
}, [customOptions, theme.fontOnPrimary]);
|
|
149
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Bar,
|
|
140
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Bar, {
|
|
150
141
|
height: height,
|
|
151
142
|
data: data,
|
|
152
143
|
options: defaultOptions,
|
|
153
|
-
plugins: [_padEmptyChartBar.default, _yAxisTopTitlePlugin.default]
|
|
154
|
-
|
|
144
|
+
plugins: [_padEmptyChartBar.default, _yAxisTopTitlePlugin.default],
|
|
145
|
+
...props
|
|
146
|
+
});
|
|
155
147
|
};
|
|
156
148
|
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,17 +66,16 @@ 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
|
-
var _context$dataset$tool;
|
|
81
72
|
const datasetLabel = context.dataset.label || '';
|
|
82
|
-
const tooltipLabel =
|
|
73
|
+
const tooltipLabel = context.dataset.tooltipLabels?.[context.dataIndex];
|
|
83
74
|
if (tooltipLabel !== undefined) {
|
|
84
|
-
return datasetLabel ?
|
|
75
|
+
return datasetLabel ? `${datasetLabel}: ${tooltipLabel}` : `${tooltipLabel}`;
|
|
85
76
|
}
|
|
86
77
|
const content = context.dataset.data[context.dataIndex].toString();
|
|
87
|
-
return datasetLabel ?
|
|
78
|
+
return datasetLabel ? `${datasetLabel}: ${customOptions.tooltipLabelPrefix}${content}${customOptions.tooltipLabelPostfix}` : `${customOptions.tooltipLabelPrefix}${content}${customOptions.tooltipLabelPostfix}`;
|
|
88
79
|
},
|
|
89
80
|
labelColor(context) {
|
|
90
81
|
const {
|
|
@@ -144,11 +135,12 @@ const LineChart = _ref => {
|
|
|
144
135
|
}
|
|
145
136
|
};
|
|
146
137
|
}, [customOptions, theme.fontOnPrimary]);
|
|
147
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Line,
|
|
138
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Line, {
|
|
148
139
|
height: height,
|
|
149
140
|
data: data,
|
|
150
141
|
options: defaultOptions,
|
|
151
|
-
plugins: [_yAxisTopTitlePlugin.default]
|
|
152
|
-
|
|
142
|
+
plugins: [_yAxisTopTitlePlugin.default],
|
|
143
|
+
...props
|
|
144
|
+
});
|
|
153
145
|
};
|
|
154
146
|
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;
|