@cashub/ui 0.47.0 → 0.48.1

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 (178) hide show
  1. package/Tab/TabList.js +38 -26
  2. package/Tab/TabPanel.js +13 -20
  3. package/Tab/TabTab.js +36 -24
  4. package/Tab/index.js +15 -1
  5. package/Tab/subComponent/TabListV2.js +25 -0
  6. package/Tab/subComponent/TabPanelV2.js +52 -0
  7. package/Tab/subComponent/TabTabV2.js +63 -0
  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 +10 -17
  32. package/chart/DoughnutChart.js +34 -20
  33. package/chart/LineChart.js +11 -18
  34. package/chart/SingleBarChart.js +22 -5
  35. package/chart/utils/centerTextPlugin.js +2 -2
  36. package/chart/utils/customTooltip.js +7 -7
  37. package/chart/utils/htmlLegendPlugin.js +1 -1
  38. package/container/FlexContainer.js +15 -7
  39. package/cropper/Cropper.js +1 -2
  40. package/datetimePicker/DatePicker.js +80 -26
  41. package/datetimePicker/DatePickerV2.js +95 -36
  42. package/datetimePicker/DatetimePicker.js +174 -11
  43. package/datetimePicker/DatetimePickerV2.js +87 -33
  44. package/datetimePicker/DatetimePickerV3.js +174 -11
  45. package/datetimePicker/TimeInput.js +35 -10
  46. package/datetimePicker/TimePicker.js +77 -22
  47. package/datetimePicker/TimePickerStyle.js +53 -3
  48. package/datetimePicker/TimePickerV2.js +54 -21
  49. package/datetimePicker/accordion/Month.js +93 -16
  50. package/datetimePicker/accordion/Year.js +96 -18
  51. package/datetimePicker/hooks/useChangeNumber.js +3 -6
  52. package/datetimePicker/hooks/useDecrease.js +3 -6
  53. package/datetimePicker/hooks/useIncrease.js +3 -6
  54. package/datetimePicker/subComponent/Accordion.js +101 -20
  55. package/descriptionList/DescriptionDetail.js +15 -4
  56. package/descriptionList/DescriptionList.js +12 -4
  57. package/descriptionList/DescriptionTerm.js +5 -3
  58. package/divider/Divider.js +15 -6
  59. package/dropdown/DropdownButtonOption.js +22 -6
  60. package/dropdown/DropdownContent.js +29 -15
  61. package/dropdown/DropdownDivOption.js +17 -3
  62. package/dropdown/DropdownLinkOption.js +14 -3
  63. package/dropdown/DropdownToggle.js +7 -15
  64. package/dropzone/FileDropzone.js +121 -22
  65. package/dropzone/ImageDropzone.js +83 -14
  66. package/dropzone/subComponent/Message.js +11 -4
  67. package/figure/IconFigure.js +16 -7
  68. package/figure/ImageFigure.js +19 -6
  69. package/file/HiddenFileInput.js +3 -3
  70. package/form/Checkbox.js +74 -13
  71. package/form/Fieldset.js +9 -3
  72. package/form/FormItem.js +10 -5
  73. package/form/Input.js +40 -7
  74. package/form/Label.js +34 -10
  75. package/form/MutedText.js +8 -4
  76. package/form/PasswordInput.js +20 -13
  77. package/form/RadioButton.js +55 -8
  78. package/form/SearchSelect.js +64 -12
  79. package/form/Searchbox.js +45 -19
  80. package/form/Slider.js +28 -10
  81. package/form/SwitchButton.js +48 -14
  82. package/form/Textarea.js +30 -3
  83. package/form/TreeView.js +13 -6
  84. package/grid/Column.js +23 -10
  85. package/grid/Grid.js +14 -6
  86. package/heading/Heading1.js +8 -4
  87. package/heading/Heading2.js +11 -5
  88. package/heading/Heading3.js +20 -8
  89. package/iconbox/ApplicationIconBox.js +48 -12
  90. package/iconbox/IconBox.js +31 -7
  91. package/iconbox/IconBoxV2.js +33 -8
  92. package/iconbox/subComponent/IconBoxFigure.js +17 -9
  93. package/iconbox/subComponent/IconBoxImage.js +21 -8
  94. package/image/ImageFluid.js +7 -3
  95. package/image/UploadImage.js +66 -18
  96. package/index.js +8 -1
  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 +49 -28
  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 +143 -0
  156. package/table/Table.js +198 -48
  157. package/table/__mock__/columns.js +1 -1
  158. package/table/index.js +7 -0
  159. package/table/subComponent/BaseTableHeadCell.js +37 -8
  160. package/table/subComponent/GridTableFooter.js +10 -4
  161. package/table/subComponent/GridTableHeadCell.js +6 -4
  162. package/table/subComponent/Resizer.js +19 -4
  163. package/table/subComponent/TableFooter.js +15 -6
  164. package/table/subComponent/TableFooterInfo.js +4 -3
  165. package/table/subComponent/TableFooterPager.js +19 -6
  166. package/table/subComponent/TableHeadCell.js +9 -3
  167. package/table/subComponent/TableSort.js +17 -7
  168. package/tagify/TagifyStyle.js +49 -3
  169. package/tagify/Tags.js +37 -21
  170. package/tagify/templates/getCreateButtonTemplate.js +5 -2
  171. package/text/Paragraph.js +50 -12
  172. package/timeline/Timeline.js +94 -17
  173. package/toast/CustomToastContainer.js +35 -3
  174. package/toast/MessageContainer.js +22 -4
  175. package/tooltip/Tooltip.js +47 -19
  176. package/treeView/TreeViewV2.js +1 -1
  177. package/treeView/TreeflexStyle.js +38 -3
  178. package/wizard/Wizard.js +115 -6
@@ -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
@@ -10,22 +10,14 @@ var _reactChartjs = require("react-chartjs-2");
10
10
  var _customTooltip = _interopRequireDefault(require("./utils/customTooltip"));
11
11
  var _padEmptyChartBar = _interopRequireDefault(require("./utils/padEmptyChartBar"));
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 BarChart = _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
@@ -99,7 +91,7 @@ const BarChart = _ref => {
99
91
  minRotation: customOptions.rotateLabel ? 15 : 0,
100
92
  callback(value) {
101
93
  const label = this.getLabelForValue(value);
102
- return label && label.length > 11 ? "".concat(label.substr(0, 11), "...") : label;
94
+ return label && label.length > 11 ? `${label.substr(0, 11)}...` : label;
103
95
  }
104
96
  }
105
97
  },
@@ -122,11 +114,12 @@ const BarChart = _ref => {
122
114
  }
123
115
  };
124
116
  }, [customOptions, theme.fontOnPrimary]);
125
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Bar, _objectSpread({
117
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Bar, {
126
118
  height: height,
127
119
  data: data,
128
120
  options: defaultOptions,
129
- plugins: [_padEmptyChartBar.default]
130
- }, props));
121
+ plugins: [_padEmptyChartBar.default],
122
+ ...props
123
+ });
131
124
  };
132
125
  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;
@@ -9,22 +9,14 @@ var _styledComponents = require("styled-components");
9
9
  var _reactChartjs = require("react-chartjs-2");
10
10
  var _customTooltip = _interopRequireDefault(require("./utils/customTooltip"));
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
- const _excluded = ["height", "data", "options"];
13
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- 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; }
15
- 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; }
16
- 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; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
18
- 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); }
19
- 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; }
20
- 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; }
21
13
  const LineChart = _ref => {
22
14
  let {
23
- height = 300,
24
- data,
25
- options = {}
26
- } = _ref,
27
- props = _objectWithoutProperties(_ref, _excluded);
15
+ height = 300,
16
+ data,
17
+ options = {},
18
+ ...props
19
+ } = _ref;
28
20
  const theme = (0, _react.useContext)(_styledComponents.ThemeContext);
29
21
 
30
22
  // fix: read value from theme
@@ -63,11 +55,11 @@ const LineChart = _ref => {
63
55
  callbacks: {
64
56
  title(context) {
65
57
  const content = context[0] ? context[0].label.match(/(.{1,20})/g) : '';
66
- return "".concat(customOptions.tooltipTitlePrefix).concat(content);
58
+ return `${customOptions.tooltipTitlePrefix}${content}`;
67
59
  },
68
60
  label(context) {
69
61
  const content = context.dataset.data[context.dataIndex].toString();
70
- return "".concat(customOptions.tooltipLabelPrefix).concat(content);
62
+ return `${customOptions.tooltipLabelPrefix}${content}`;
71
63
  },
72
64
  labelColor(context) {
73
65
  const {
@@ -119,10 +111,11 @@ const LineChart = _ref => {
119
111
  }
120
112
  };
121
113
  }, [customOptions, theme.fontOnPrimary]);
122
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Line, _objectSpread({
114
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactChartjs.Line, {
123
115
  height: height,
124
116
  data: data,
125
- options: defaultOptions
126
- }, props));
117
+ options: defaultOptions,
118
+ ...props
119
+ });
127
120
  };
128
121
  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;
@@ -48,13 +48,13 @@ const centerTextPlugin = {
48
48
  title
49
49
  } = config;
50
50
  if (title) {
51
- ctx.font = "bold ".concat(size, "px ").concat(family);
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 = "".concat(size, "px ").concat(family);
57
+ ctx.font = `${size}px ${family}`;
58
58
  ctx.fillText(total.toLocaleString(), centerX, centerY + (title ? offset : 0));
59
59
  ctx.restore();
60
60
  }
@@ -41,11 +41,11 @@ const customTooltip = theme => {
41
41
  });
42
42
  let innerHtml = '<thead>';
43
43
  titleLines.forEach(title => {
44
- innerHtml += "<tr><th>".concat(title, "</th></tr>");
44
+ innerHtml += `<tr><th>${title}</th></tr>`;
45
45
  });
46
46
  innerHtml += '</thead><tbody>';
47
47
  bodyLines.forEach(body => {
48
- innerHtml += "<tr><td>".concat(body, "</td></tr>");
48
+ innerHtml += `<tr><td>${body}</td></tr>`;
49
49
  });
50
50
  innerHtml += '</tbody>';
51
51
  const tableRoot = tooltipEl.querySelector('table');
@@ -65,23 +65,23 @@ const customTooltip = theme => {
65
65
  tooltipEl.style.background = tooltipModel.labelColors[0].backgroundColor;
66
66
  tooltipEl.style.borderRadius = theme.borderRadius;
67
67
  tooltipEl.style.textAlign = 'center';
68
- tooltipEl.style.padding = "".concat(theme.spacerXS, " ").concat(theme.spacerS);
68
+ tooltipEl.style.padding = `${theme.spacerXS} ${theme.spacerS}`;
69
69
  tooltipEl.style.pointerEvents = 'none';
70
70
 
71
71
  // determine position is left or right
72
72
  if (tooltipModel.caretX + tooltipEl.offsetWidth <= this._chart.width) {
73
73
  tooltipEl.style.borderTopLeftRadius = 0;
74
- tooltipEl.style.left = "".concat(position.left + window.pageXOffset + tooltipModel.caretX + 8, "px");
74
+ tooltipEl.style.left = `${position.left + window.pageXOffset + tooltipModel.caretX + 8}px`;
75
75
  } else {
76
76
  tooltipEl.style.borderTopRightRadius = 0;
77
- tooltipEl.style.left = "".concat(position.left + window.pageXOffset + tooltipModel.caretX - tooltipModel.width - 16 * 2, "px");
77
+ tooltipEl.style.left = `${position.left + window.pageXOffset + tooltipModel.caretX - tooltipModel.width - 16 * 2}px`;
78
78
  }
79
79
 
80
80
  // determine position is top or bottom
81
81
  if (tooltipModel.caretY + tooltipEl.offsetHeight <= this._chart.height) {
82
- tooltipEl.style.top = "".concat(position.top + window.pageYOffset + tooltipModel.caretY + 8, "px");
82
+ tooltipEl.style.top = `${position.top + window.pageYOffset + tooltipModel.caretY + 8}px`;
83
83
  } else {
84
- tooltipEl.style.top = "".concat(position.top + window.pageYOffset + tooltipModel.caretY - tooltipModel.width - 16 * 2, "px");
84
+ tooltipEl.style.top = `${position.top + window.pageYOffset + tooltipModel.caretY - tooltipModel.width - 16 * 2}px`;
85
85
  }
86
86
  };
87
87
  };
@@ -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 = "".concat(item.lineWidth, "px");
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
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
11
- const FlexContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n\n ", ";\n\n ", ";\n\n ", "\n\n ", "\n"])), _ref => {
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
- }, _ref2 => {
17
+ }};
18
+
19
+ ${_ref2 => {
17
20
  let {
18
21
  wrap
19
22
  } = _ref2;
20
23
  return wrap && 'flex-wrap: wrap';
21
- }, _ref3 => {
24
+ }};
25
+
26
+ ${_ref3 => {
22
27
  let {
23
28
  alignCenter
24
29
  } = _ref3;
25
30
  return alignCenter && 'align-items: center;';
26
- }, _ref4 => {
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;
@@ -39,8 +39,7 @@ const CropperWrapper = _ref => {
39
39
  }
40
40
  }
41
41
  return () => {
42
- var _node$cropper;
43
- node === null || node === void 0 || (_node$cropper = node.cropper) === null || _node$cropper === void 0 || _node$cropper.destroy();
42
+ node?.cropper?.destroy();
44
43
  };
45
44
  }, [onInitialized, dragMode, width, height, cropBoxResizable]);
46
45
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {