@cashub/ui 0.48.12 → 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.
Files changed (177) hide show
  1. package/Tab/TabList.js +38 -26
  2. package/Tab/TabPanel.js +13 -20
  3. package/Tab/TabTab.js +41 -25
  4. package/Tab/index.js +3 -6
  5. package/Tab/subComponent/TabListV2.js +11 -18
  6. package/Tab/subComponent/TabPanelV2.js +16 -20
  7. package/Tab/subComponent/TabTabV2.js +33 -21
  8. package/VerticalTab/TabList.js +13 -18
  9. package/VerticalTab/TabPanel.js +16 -20
  10. package/VerticalTab/TabTab.js +40 -21
  11. package/VerticalTab/VerticalTab.js +8 -4
  12. package/alert/Alert.js +12 -5
  13. package/animate/Collapse.js +5 -7
  14. package/animate/Loader.js +18 -7
  15. package/animate/PulseRing.js +18 -5
  16. package/animate/Spinner.js +8 -3
  17. package/backdrop/BaseBackdrop.js +9 -3
  18. package/backdrop/LoadingBackdrop.js +7 -3
  19. package/backdrop/ModalBackdrop.js +5 -3
  20. package/badge/Badge.js +15 -3
  21. package/badge/BadgeDot.js +8 -3
  22. package/badge/BadgeFill.js +24 -6
  23. package/badge/BadgeWithText.js +13 -3
  24. package/billing/BarChart.js +1 -1
  25. package/breadcrumb/Breadcrumb.js +42 -3
  26. package/button/Button.js +88 -20
  27. package/button/ButtonGroup.js +33 -9
  28. package/button/IconButton.js +37 -10
  29. package/button/ScrollToTopButton.js +12 -4
  30. package/callout/Callout.js +37 -8
  31. package/chart/BarChart.js +13 -21
  32. package/chart/DoughnutChart.js +34 -20
  33. package/chart/LineChart.js +13 -21
  34. package/chart/SingleBarChart.js +22 -5
  35. package/chart/utils/centerTextPlugin.js +2 -2
  36. package/chart/utils/customTooltip.js +8 -8
  37. package/chart/utils/htmlLegendPlugin.js +1 -1
  38. package/chart/utils/yAxisTopTitlePlugin.js +1 -1
  39. package/container/FlexContainer.js +15 -7
  40. package/cropper/Cropper.js +1 -2
  41. package/datetimePicker/DatePicker.js +80 -26
  42. package/datetimePicker/DatePickerV2.js +95 -36
  43. package/datetimePicker/DatetimePicker.js +174 -11
  44. package/datetimePicker/DatetimePickerV2.js +87 -33
  45. package/datetimePicker/DatetimePickerV3.js +177 -14
  46. package/datetimePicker/TimeInput.js +35 -10
  47. package/datetimePicker/TimePicker.js +77 -22
  48. package/datetimePicker/TimePickerStyle.js +53 -3
  49. package/datetimePicker/TimePickerV2.js +58 -28
  50. package/datetimePicker/accordion/Month.js +93 -16
  51. package/datetimePicker/accordion/Year.js +96 -18
  52. package/datetimePicker/hooks/useChangeNumber.js +3 -6
  53. package/datetimePicker/hooks/useDecrease.js +3 -6
  54. package/datetimePicker/hooks/useIncrease.js +3 -6
  55. package/datetimePicker/subComponent/Accordion.js +101 -20
  56. package/descriptionList/DescriptionDetail.js +15 -4
  57. package/descriptionList/DescriptionList.js +12 -4
  58. package/descriptionList/DescriptionTerm.js +5 -3
  59. package/divider/Divider.js +15 -6
  60. package/dropdown/DropdownButtonOption.js +22 -6
  61. package/dropdown/DropdownContent.js +29 -15
  62. package/dropdown/DropdownDivOption.js +17 -3
  63. package/dropdown/DropdownLinkOption.js +14 -3
  64. package/dropdown/DropdownToggle.js +7 -15
  65. package/dropzone/FileDropzone.js +121 -22
  66. package/dropzone/ImageDropzone.js +83 -14
  67. package/dropzone/subComponent/Message.js +11 -4
  68. package/figure/IconFigure.js +16 -7
  69. package/figure/ImageFigure.js +19 -6
  70. package/file/HiddenFileInput.js +3 -3
  71. package/form/Checkbox.js +74 -13
  72. package/form/Fieldset.js +9 -3
  73. package/form/FormItem.js +10 -5
  74. package/form/Input.js +40 -7
  75. package/form/Label.js +34 -10
  76. package/form/MutedText.js +8 -4
  77. package/form/PasswordInput.js +20 -13
  78. package/form/RadioButton.js +55 -8
  79. package/form/SearchSelect.js +64 -12
  80. package/form/Searchbox.js +45 -19
  81. package/form/Slider.js +28 -10
  82. package/form/SwitchButton.js +48 -14
  83. package/form/Textarea.js +30 -3
  84. package/form/TreeView.js +13 -6
  85. package/grid/Column.js +23 -10
  86. package/grid/Grid.js +14 -6
  87. package/heading/Heading1.js +8 -4
  88. package/heading/Heading2.js +11 -5
  89. package/heading/Heading3.js +20 -8
  90. package/iconbox/ApplicationIconBox.js +48 -12
  91. package/iconbox/IconBox.js +31 -7
  92. package/iconbox/IconBoxV2.js +33 -8
  93. package/iconbox/subComponent/IconBoxFigure.js +17 -9
  94. package/iconbox/subComponent/IconBoxImage.js +21 -8
  95. package/image/ImageFluid.js +7 -3
  96. package/image/UploadImage.js +66 -18
  97. package/jsoneditor/JsonEditor.js +121 -15
  98. package/keyframe/Pulse.js +13 -3
  99. package/keyframe/Spin.js +5 -3
  100. package/layout/Aside.js +30 -5
  101. package/layout/Backdrop.js +8 -4
  102. package/layout/Container.js +21 -5
  103. package/layout/Footer.js +26 -7
  104. package/link/LinkSpan.js +37 -19
  105. package/map/GoogleMap.js +3 -7
  106. package/map/GoogleReverseGeolocation.js +6 -3
  107. package/map/LeafletMap.js +2 -2
  108. package/map/subComponent/GoogleMapContainer.js +16 -4
  109. package/map/subComponent/GoogleMapPopup.js +7 -10
  110. package/map/subComponent/GoogleMapWrapper.js +8 -15
  111. package/map/subComponent/LeafletDrawControl.js +9 -7
  112. package/map/subComponent/LeafletMapContainer.js +159 -4
  113. package/modal/StateModal.js +56 -33
  114. package/modal/TitleModal.js +70 -29
  115. package/package.json +1 -1
  116. package/page/Disclaimer.js +119 -3
  117. package/paginate/Paginate.js +54 -12
  118. package/popover/Popover.js +30 -25
  119. package/qrcode/QRCode.js +20 -6
  120. package/qrcode/QRCodeContainter.js +12 -4
  121. package/ribbon/Ribbon.js +29 -4
  122. package/section/Section.js +68 -20
  123. package/section/SectionBody.js +29 -8
  124. package/section/SectionHeader.js +36 -11
  125. package/section/SectionToolbar.js +9 -3
  126. package/section/SectionToolbarItem.js +8 -3
  127. package/select/InputSelect.js +16 -23
  128. package/select/Select.js +112 -43
  129. package/select/subComponent/Checkbox.js +24 -5
  130. package/select/subComponent/Footer.js +4 -3
  131. package/select/subComponent/ListBox.js +12 -5
  132. package/select/subComponent/Option.js +27 -7
  133. package/select/subComponent/OptionGroup.js +13 -3
  134. package/select/subComponent/Options.js +18 -5
  135. package/select/subComponent/SearchBox.js +34 -12
  136. package/select/subComponent/SelectedMultipleTags.js +21 -3
  137. package/select/subComponent/SelectedMultipleText.js +20 -4
  138. package/select/subComponent/SelectedSingle.js +7 -3
  139. package/styles/GlobalStyle.js +156 -45
  140. package/styles/mixin/backgroundColor.js +16 -8
  141. package/styles/mixin/borderColor.js +13 -7
  142. package/styles/mixin/color.js +13 -7
  143. package/styles/mixin/colorOnBackground.js +13 -7
  144. package/styles/mixin/inputPlaceholder.js +20 -3
  145. package/styles/mixin/media.js +5 -3
  146. package/styles/mixin/rounded.js +10 -6
  147. package/styles/mixin/scrollbar.js +13 -3
  148. package/styles/theme/dark.theme.js +15 -14
  149. package/styles/theme/light.theme.js +15 -14
  150. package/styles/theme/white.theme.js +15 -14
  151. package/table/GridTable.js +71 -33
  152. package/table/ImageBox.js +15 -5
  153. package/table/InfiniteGridTable.js +92 -46
  154. package/table/PermissionTable.js +32 -10
  155. package/table/SimpleGridTable.js +52 -17
  156. package/table/Table.js +198 -48
  157. package/table/__mock__/columns.js +1 -1
  158. package/table/subComponent/BaseTableHeadCell.js +37 -8
  159. package/table/subComponent/GridTableFooter.js +10 -4
  160. package/table/subComponent/GridTableHeadCell.js +6 -4
  161. package/table/subComponent/Resizer.js +19 -4
  162. package/table/subComponent/TableFooter.js +15 -6
  163. package/table/subComponent/TableFooterInfo.js +4 -3
  164. package/table/subComponent/TableFooterPager.js +19 -6
  165. package/table/subComponent/TableHeadCell.js +9 -3
  166. package/table/subComponent/TableSort.js +17 -7
  167. package/tagify/TagifyStyle.js +49 -3
  168. package/tagify/Tags.js +37 -21
  169. package/tagify/templates/getCreateButtonTemplate.js +5 -2
  170. package/text/Paragraph.js +50 -12
  171. package/timeline/Timeline.js +94 -17
  172. package/toast/CustomToastContainer.js +35 -3
  173. package/toast/MessageContainer.js +22 -4
  174. package/tooltip/Tooltip.js +47 -19
  175. package/treeView/TreeViewV2.js +1 -1
  176. package/treeView/TreeflexStyle.js +38 -3
  177. 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
- }))(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n border: none;\n font-size: var(--font-button);\n line-height: var(--font-body1);\n cursor: ", ";\n border-radius: var(--border-radius-l);\n padding: 10px var(--spacing-s);\n text-transform: uppercase;\n\n > svg {\n margin-right: calc(var(--spacing-s) - 0.25rem);\n font-size: var(--font-body1);\n }\n\n &:hover {\n ", "\n }\n\n ", "\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), _ref => {
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
- }, _ref2 => {
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)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition: 0.3s;\n box-shadow: var(--box-shadow);\n opacity: 0.9;\n "])));
27
- }, _backgroundColor.default, _colorOnBackground.default, _ref3 => {
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)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: var(--color-background2);\n color: var(--font-on-background);\n "])));
32
- }, _ref4 => {
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)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: var(--color-background1);\n color: var(--font-on-background);\n "])));
37
- }, _ref5 => {
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)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n opacity: 0.5;\n "])));
42
- }, _ref6 => {
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)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 10px;\n\n > svg {\n margin-right: 0;\n }\n "])));
47
- }, _ref7 => {
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
- }, _ref8 => {
99
+ }}
100
+
101
+ ${_ref8 => {
53
102
  let {
54
103
  alignCenter
55
104
  } = _ref8;
56
105
  return alignCenter && 'justify-content: center;';
57
- }, _ref9 => {
106
+ }}
107
+
108
+ ${_ref9 => {
58
109
  let {
59
110
  filterFocus
60
111
  } = _ref9;
61
- return filterFocus && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border: 2px solid var(--color-danger);\n "])));
62
- }, _ref10 => {
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)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-size: var(--font-body1);\n background: transparent;\n color: var(--color-primary);\n border: none;\n padding: 0;\n text-decoration: underline;\n text-transform: none;\n &:hover {\n opacity: 0.8;\n box-shadow: none;\n }\n "])));
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;
@@ -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
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
11
- const ButtonGroup = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n > button:not(:first-child),\n *:not(:first-child) {\n margin-left: var(--spacing-s);\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), _ref => {
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
- }, _ref2 => {
23
+ }}
24
+
25
+ ${_ref2 => {
17
26
  let {
18
27
  alignRight
19
28
  } = _ref2;
20
29
  return alignRight && 'justify-content: flex-end;';
21
- }, _ref3 => {
30
+ }}
31
+
32
+ ${_ref3 => {
22
33
  let {
23
34
  marginBottom
24
35
  } = _ref3;
25
36
  return marginBottom && 'margin-bottom: var(--spacing);';
26
- }, _ref4 => {
37
+ }}
38
+
39
+ ${_ref4 => {
27
40
  let {
28
41
  vertical
29
42
  } = _ref4;
30
- return vertical && "\n flex-direction: column;\n\n > button,\n > * {\n margin-left: 0 !important;\n margin-bottom: var(--spacing-s);\n }\n ";
31
- }, _ref5 => {
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;
@@ -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
- }))(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 40px;\n height: 40px;\n transition: 0.3s;\n position: relative;\n border-radius: var(--border-radius-l);\n color: ", ";\n cursor: ", ";\n margin: auto;\n\n ", "\n\n &:hover {\n ", "\n }\n\n > svg {\n font-size: 1.5rem;\n\n ", "\n\n ", "\n }\n"])), _ref => {
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
- }, _ref2 => {
26
+ }};
27
+ cursor: ${_ref2 => {
20
28
  let {
21
29
  disabled
22
30
  } = _ref2;
23
31
  return disabled ? 'no-drop' : 'pointer';
24
- }, _ref3 => {
32
+ }};
33
+ margin: auto;
34
+
35
+ ${_ref3 => {
25
36
  let {
26
37
  size
27
38
  } = _ref3;
28
- return size === 'small' && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 32px;\n height: 32px;\n "])));
29
- }, _ref4 => {
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
- }, _ref5 => {
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
- }, _ref6 => {
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)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: fixed;\n bottom: var(--spacing);\n right: var(--spacing);\n display: ", ";\n z-index: 30;\n\n > svg {\n transform: rotate(90deg);\n }\n"])), _ref => {
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;
@@ -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
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
11
- const Callout = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: var(--spacing);\n border-radius: var(--border-radius);\n background: var(--color-background3);\n margin-bottom: var(--spacing);\n"])));
12
- const Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
13
- const Content = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 2;\n"])));
14
- const Title = _styledComponents.default.h3(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: var(--font-h3);\n font-weight: 500;\n color: var(--font-on-background);\n margin-bottom: var(--border-radius);\n"])));
15
- const Description = _styledComponents.default.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: var(--font-body1);\n line-height: 1.5;\n color: var(--font-on-mute);\n padding-right: var(--spacing);\n font-weight: 400;\n\n &:last-child {\n margin-bottom: 0;\n }\n"])));
16
- const Action = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n"])));
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
- height = 300,
26
- data,
27
- options = {}
28
- } = _ref,
29
- props = _objectWithoutProperties(_ref, _excluded);
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
- var _context$dataset$tool;
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 "".concat(context.dataset.label, ": ").concat(tooltipLabel);
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 "".concat(context.dataset.label, ": ").concat(label.toString()).concat(customOptions.tooltipLabelPostfix);
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 ? "".concat(label.substr(0, 11), "...") : label;
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, _objectSpread({
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
- }, props));
144
+ plugins: [_padEmptyChartBar.default, _yAxisTopTitlePlugin.default],
145
+ ...props
146
+ });
155
147
  };
156
148
  var _default = exports.default = BarChart;
@@ -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
- height = 300,
31
- data,
32
- showCenterText = false,
33
- centerTextTitle
34
- } = _ref,
35
- props = _objectWithoutProperties(_ref, _excluded);
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, _objectSpread({
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
- }, props))
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .custom-legend-tooltip {\n position: relative;\n }\n\n .custom-legend-tooltip:hover::after {\n content: attr(data-tooltip);\n position: absolute;\n top: calc(1rem + var(--spacing-xs));\n left: 50%;\n transform: translateX(-50%);\n border: 1px solid var(--border-color);\n color: var(--font-on-background);\n background: var(--color-background2);\n box-shadow: var(--box-shadow);\n border-radius: calc(var(--border-radius) / 2);\n padding: var(--spacing-xs);\n font-size: var(--font-body1);\n font-weight: var(--font-normal);\n text-align: center;\n width: max-content;\n max-width: 50vw;\n }\n"])));
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;
@@ -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
- height = 300,
25
- data,
26
- options = {}
27
- } = _ref,
28
- props = _objectWithoutProperties(_ref, _excluded);
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 "".concat(customOptions.tooltipTitlePrefix).concat(content);
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 = (_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 datasetLabel ? "".concat(datasetLabel, ": ").concat(tooltipLabel) : "".concat(tooltipLabel);
75
+ return datasetLabel ? `${datasetLabel}: ${tooltipLabel}` : `${tooltipLabel}`;
85
76
  }
86
77
  const content = context.dataset.data[context.dataIndex].toString();
87
- return datasetLabel ? "".concat(datasetLabel, ": ").concat(customOptions.tooltipLabelPrefix).concat(content).concat(customOptions.tooltipLabelPostfix) : "".concat(customOptions.tooltipLabelPrefix).concat(content).concat(customOptions.tooltipLabelPostfix);
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, _objectSpread({
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
- }, props));
142
+ plugins: [_yAxisTopTitlePlugin.default],
143
+ ...props
144
+ });
153
145
  };
154
146
  var _default = exports.default = LineChart;
@@ -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
- }))(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n height: 1rem;\n border-radius: var(--border-radius);\n background: var(--color-background3);\n\n &::before {\n position: absolute;\n content: '';\n width: ", "%;\n border-radius: var(--border-radius);\n top: 0;\n bottom: 0;\n\n ", "\n }\n\n ", "\n"])), _ref => {
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
- }, _backgroundColor.default, _ref2 => {
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;