@cashub/ui 0.20.0 → 0.21.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 (233) hide show
  1. package/Tab/Tab.js +9 -13
  2. package/Tab/TabList.js +14 -32
  3. package/Tab/TabPanel.js +21 -58
  4. package/Tab/TabTab.js +20 -40
  5. package/Tab/index.js +2 -10
  6. package/Tab/subComponent/TabContext.js +2 -5
  7. package/animate/Collapse.js +26 -53
  8. package/animate/Loader.js +21 -26
  9. package/animate/NumberCounter.js +22 -44
  10. package/animate/PulseRing.js +9 -21
  11. package/animate/Spinner.js +2 -10
  12. package/animate/index.js +5 -11
  13. package/assets/css/autocomplete.css +16 -16
  14. package/assets/css/font.css +4 -4
  15. package/assets/css/global.css +3 -3
  16. package/assets/css/normalize.css +386 -386
  17. package/backdrop/BaseBackdrop.js +2 -9
  18. package/backdrop/LoadingBackdrop.js +2 -9
  19. package/backdrop/ModalBackdrop.js +2 -9
  20. package/backdrop/index.js +3 -7
  21. package/badge/Badge.js +2 -11
  22. package/badge/BadgeDot.js +2 -10
  23. package/badge/BadgeFill.js +15 -20
  24. package/badge/BadgeWithText.js +6 -13
  25. package/badge/index.js +4 -9
  26. package/billing/BarChart.js +10 -17
  27. package/billing/Grid.js +11 -15
  28. package/billing/Header2.js +6 -9
  29. package/billing/Header3.js +9 -16
  30. package/billing/Paragraph.js +8 -14
  31. package/billing/ParagraphGroup.js +6 -9
  32. package/billing/ParagraphText.js +7 -12
  33. package/billing/Section.js +13 -23
  34. package/billing/SectionBody.js +5 -8
  35. package/billing/SectionHeader.js +7 -12
  36. package/breadcrumb/Breadcrumb.js +11 -21
  37. package/breadcrumb/index.js +1 -3
  38. package/button/Button.js +41 -38
  39. package/button/ButtonGroup.js +21 -18
  40. package/button/IconButton.js +29 -29
  41. package/button/ScrollToTopButton.js +12 -39
  42. package/button/index.js +4 -9
  43. package/callout/Callout.js +13 -26
  44. package/callout/index.js +1 -3
  45. package/chart/BarChart.js +28 -53
  46. package/chart/DoughnutChart.js +23 -62
  47. package/chart/LineChart.js +33 -55
  48. package/chart/SingleBarChart.js +11 -17
  49. package/chart/index.js +5 -12
  50. package/chart/utils/customTooltip.js +26 -43
  51. package/chart/utils/htmlLegendPlugin.js +24 -30
  52. package/chart/utils/index.js +3 -7
  53. package/chart/utils/padEmptyChartBar.js +24 -22
  54. package/container/FlexContainer.js +9 -12
  55. package/container/index.js +1 -3
  56. package/cropper/Cropper.js +21 -34
  57. package/cropper/CropperModalHandler.js +15 -21
  58. package/cropper/index.js +2 -5
  59. package/cropper/subComponent/CropImageModal.js +23 -58
  60. package/datetimePicker/DatePicker.js +103 -217
  61. package/datetimePicker/DatePickerV2.js +116 -221
  62. package/datetimePicker/DatetimePicker.js +27 -48
  63. package/datetimePicker/DatetimePickerV2.js +115 -231
  64. package/datetimePicker/TimeInput.js +9 -22
  65. package/datetimePicker/TimePicker.js +94 -151
  66. package/datetimePicker/TimePickerStyle.js +14 -0
  67. package/datetimePicker/accordion/Month.js +70 -90
  68. package/datetimePicker/accordion/Year.js +91 -135
  69. package/datetimePicker/hooks/index.js +3 -7
  70. package/datetimePicker/hooks/useChangeNumber.js +14 -27
  71. package/datetimePicker/hooks/useDecrease.js +19 -35
  72. package/datetimePicker/hooks/useIncrease.js +19 -35
  73. package/datetimePicker/index.js +13 -13
  74. package/datetimePicker/provider/constant.js +2 -3
  75. package/datetimePicker/subComponent/Accordion.js +108 -158
  76. package/datetimePicker/subComponent/CustomTimeInput.js +18 -48
  77. package/datetimePicker/subComponent/DateTimePickerContext.js +2 -5
  78. package/datetimePicker/utils/GMTDate.js +3 -7
  79. package/datetimePicker/utils/pad.js +2 -6
  80. package/datetimePicker/utils/toUTC0.js +3 -6
  81. package/descriptionList/DescriptionDetail.js +5 -10
  82. package/descriptionList/DescriptionList.js +5 -10
  83. package/descriptionList/DescriptionTerm.js +2 -9
  84. package/descriptionList/index.js +3 -7
  85. package/divider/Divider.js +9 -12
  86. package/divider/index.js +1 -3
  87. package/dropdown/Dropdown.js +28 -65
  88. package/dropdown/DropdownButtonOption.js +2 -9
  89. package/dropdown/DropdownContent.js +33 -64
  90. package/dropdown/DropdownDivOption.js +2 -9
  91. package/dropdown/DropdownItem.js +10 -16
  92. package/dropdown/DropdownLinkOption.js +2 -9
  93. package/dropdown/DropdownToggle.js +18 -38
  94. package/dropdown/index.js +6 -17
  95. package/dropdown/subComponent/DropdownContext.js +2 -5
  96. package/dropzone/FileDropzone.js +148 -302
  97. package/dropzone/ImageDropzone.js +96 -171
  98. package/dropzone/index.js +2 -5
  99. package/dropzone/subComponent/Message.js +7 -14
  100. package/figure/IconFigure.js +9 -16
  101. package/figure/ImageFigure.js +11 -17
  102. package/figure/index.js +2 -5
  103. package/file/HiddenFileInput.js +5 -14
  104. package/file/index.js +1 -3
  105. package/form/Checkbox.js +34 -43
  106. package/form/FormItem.js +2 -9
  107. package/form/Input.js +13 -15
  108. package/form/Label.js +10 -13
  109. package/form/MutedText.js +5 -10
  110. package/form/RadioButton.js +20 -32
  111. package/form/Searchbox.js +21 -65
  112. package/form/Slider.js +14 -0
  113. package/form/SwitchButton.js +34 -39
  114. package/form/Textarea.js +2 -11
  115. package/form/index.js +9 -19
  116. package/grid/Column.js +17 -17
  117. package/grid/Grid.js +13 -14
  118. package/grid/index.js +2 -5
  119. package/heading/Heading1.js +5 -10
  120. package/heading/Heading2.js +9 -12
  121. package/heading/Heading3.js +21 -18
  122. package/heading/index.js +3 -7
  123. package/helmet/Helmet.js +6 -9
  124. package/helmet/index.js +2 -5
  125. package/iconbox/ApplicationIconBox.js +25 -31
  126. package/iconbox/IconBox.js +11 -24
  127. package/iconbox/IconBoxV2.js +14 -26
  128. package/iconbox/index.js +3 -7
  129. package/iconbox/subComponent/IconBoxFigure.js +25 -20
  130. package/iconbox/subComponent/IconBoxImage.js +15 -18
  131. package/image/ImageFluid.js +2 -10
  132. package/image/UploadImage.js +65 -113
  133. package/image/index.js +2 -5
  134. package/index.js +44 -130
  135. package/jsoneditor/JsonEditor.js +10 -32
  136. package/jsoneditor/index.js +1 -3
  137. package/keyframe/Pulse.js +2 -7
  138. package/keyframe/Spin.js +2 -7
  139. package/link/LinkSpan.js +22 -35
  140. package/link/index.js +1 -3
  141. package/map/GoogleMap.js +122 -175
  142. package/map/GoogleReverseGeolocation.js +79 -186
  143. package/map/LeafletMap.js +78 -132
  144. package/map/LeafletReverseGeolocation.js +49 -121
  145. package/map/index.js +4 -9
  146. package/map/subComponent/BasicLeafletMap.js +8 -14
  147. package/map/subComponent/GoogleMapContainer.js +5 -10
  148. package/map/subComponent/GoogleMapPopup.js +66 -123
  149. package/map/subComponent/GoogleMapWrapper.js +13 -32
  150. package/map/subComponent/GoogleMarkerSpiderfier.js +14 -24
  151. package/map/subComponent/LeafletDrawControl.js +47 -84
  152. package/map/subComponent/LeafletMapContainer.js +5 -10
  153. package/map/subComponent/MapSearchBoxControl.js +24 -70
  154. package/modal/StateModal.js +41 -100
  155. package/modal/TitleModal.js +89 -190
  156. package/modal/index.js +2 -5
  157. package/package.json +1 -1
  158. package/paginate/Paginate.js +40 -54
  159. package/paginate/index.js +1 -3
  160. package/popover/Popover.js +39 -87
  161. package/popover/index.js +1 -3
  162. package/qrcode/QRCode.js +10 -23
  163. package/qrcode/QRCodeContainter.js +8 -16
  164. package/qrcode/index.js +2 -5
  165. package/ribbon/Ribbon.js +4 -15
  166. package/ribbon/index.js +1 -3
  167. package/section/Section.js +57 -39
  168. package/section/SectionBody.js +15 -22
  169. package/section/SectionHeader.js +27 -27
  170. package/section/SectionToolbar.js +2 -9
  171. package/section/SectionToolbarItem.js +2 -9
  172. package/section/index.js +5 -11
  173. package/select/InputSelect.js +103 -215
  174. package/select/Select.js +204 -362
  175. package/select/index.js +2 -5
  176. package/select/subComponent/ListBox.js +9 -12
  177. package/select/subComponent/Option.js +8 -16
  178. package/select/subComponent/OptionGroup.js +2 -9
  179. package/select/subComponent/Options.js +5 -11
  180. package/select/subComponent/SearchBox.js +9 -29
  181. package/select/subComponent/SelectedMultiple.js +8 -16
  182. package/select/subComponent/SelectedSingle.js +2 -9
  183. package/styles/GlobalStyle.js +169 -91
  184. package/styles/config/breakpoint.style.js +2 -3
  185. package/styles/config/header.style.js +2 -3
  186. package/styles/config/sidebar.style.js +2 -3
  187. package/styles/index.js +2 -5
  188. package/styles/mixin/backgroundColor.js +17 -14
  189. package/styles/mixin/borderColor.js +17 -14
  190. package/styles/mixin/color.js +17 -14
  191. package/styles/mixin/colorOnBackground.js +17 -14
  192. package/styles/mixin/inputPlaceholder.js +3 -9
  193. package/styles/mixin/media.js +3 -11
  194. package/styles/mixin/rounded.js +13 -12
  195. package/styles/mixin/scrollbar.js +7 -13
  196. package/styles/theme/dark.theme.js +20 -20
  197. package/styles/theme/light.theme.js +20 -20
  198. package/styles/theme/white.theme.js +20 -20
  199. package/styles/themes.js +2 -8
  200. package/table/GridTable.js +105 -143
  201. package/table/ImageBox.js +8 -18
  202. package/table/PermissionTable.js +25 -25
  203. package/table/Table.js +137 -153
  204. package/table/__mock__/columns.js +2 -3
  205. package/table/__mock__/data.js +2 -3
  206. package/table/hooks/index.js +2 -5
  207. package/table/hooks/useCalculateDataRange.js +9 -36
  208. package/table/hooks/useGenerateSort.js +6 -17
  209. package/table/index.js +4 -9
  210. package/table/subComponent/BaseTableHeadCell.js +15 -21
  211. package/table/subComponent/GridTableFooter.js +5 -10
  212. package/table/subComponent/GridTableHeadCell.js +5 -10
  213. package/table/subComponent/Resizer.js +17 -44
  214. package/table/subComponent/TableFooter.js +5 -10
  215. package/table/subComponent/TableFooterInfo.js +2 -9
  216. package/table/subComponent/TableFooterPager.js +5 -12
  217. package/table/subComponent/TableHeadCell.js +2 -9
  218. package/table/subComponent/TableSort.js +13 -19
  219. package/tagify/TagifyStyle.js +14 -0
  220. package/tagify/Tags.js +15 -37
  221. package/tagify/index.js +8 -3
  222. package/text/Paragraph.js +25 -20
  223. package/text/index.js +1 -3
  224. package/timeline/Timeline.js +28 -37
  225. package/timeline/index.js +1 -3
  226. package/toast/CustomToastContainer.js +2 -9
  227. package/toast/MessageContainer.js +9 -18
  228. package/toast/index.js +3 -8
  229. package/toast/show.js +18 -28
  230. package/tooltip/Tooltip.js +48 -97
  231. package/tooltip/index.js +1 -3
  232. package/wizard/Wizard.js +63 -133
  233. package/wizard/index.js +1 -3
@@ -4,28 +4,23 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _renderer = require("@react-pdf/renderer");
9
-
10
8
  var _jsxRuntime = require("react/jsx-runtime");
11
-
12
- var BillingSectionHeader = function BillingSectionHeader(_ref) {
13
- var children = _ref.children,
14
- inline = _ref.inline;
15
- var styles = {};
16
-
9
+ const BillingSectionHeader = _ref => {
10
+ let {
11
+ children,
12
+ inline
13
+ } = _ref;
14
+ const styles = {};
17
15
  if (inline) {
18
16
  styles.display = 'flex';
19
17
  styles.justifyContent = 'space-between';
20
18
  styles.flexDirection = 'row';
21
19
  styles.alignItems = 'center';
22
20
  }
23
-
24
21
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
25
22
  style: styles,
26
23
  children: children
27
24
  });
28
25
  };
29
-
30
- var _default = BillingSectionHeader;
31
- exports.default = _default;
26
+ var _default = exports.default = BillingSectionHeader;
@@ -4,29 +4,23 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
8
  var _reactRouterDom = require("react-router-dom");
11
-
12
9
  var _media = _interopRequireDefault(require("../styles/mixin/media"));
13
-
14
10
  var _jsxRuntime = require("react/jsx-runtime");
15
-
16
11
  var _templateObject, _templateObject2;
17
-
18
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
13
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
21
-
22
- var Breadcrumb = function Breadcrumb(_ref) {
23
- var _ref$path = _ref.path,
24
- path = _ref$path === void 0 ? [] : _ref$path;
14
+ const Breadcrumb = _ref => {
15
+ let {
16
+ path = []
17
+ } = _ref;
25
18
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
26
- children: path.map(function (_ref2, index) {
27
- var name = _ref2.name,
28
- url = _ref2.url;
29
-
19
+ children: path.map((_ref2, index) => {
20
+ let {
21
+ name,
22
+ url
23
+ } = _ref2;
30
24
  if (url) {
31
25
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Link, {
32
26
  to: url,
@@ -35,15 +29,11 @@ var Breadcrumb = function Breadcrumb(_ref) {
35
29
  })
36
30
  }, index);
37
31
  }
38
-
39
32
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
40
33
  children: name
41
34
  }, index);
42
35
  })
43
36
  });
44
37
  };
45
-
46
- var Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n font-size: var(--font-body2);\n line-height: var(--font-body1);\n color: var(--font-on-background);\n padding: var(--spacing-s) 0;\n\n > *:not(:last-child) {\n display: flex;\n align-items: center;\n color: var(--font-on-background);\n overflow: hidden;\n\n > p {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:after {\n content: '/';\n padding: 0 var(--spacing-xs);\n }\n }\n\n > *:last-child {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: var(--color-primary);\n }\n\n ", "\n"])), _media.default.tablet(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-top: 0;\n "]))));
47
-
48
- var _default = Breadcrumb;
49
- exports.default = _default;
38
+ const Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n font-size: var(--font-body2);\n line-height: var(--font-body1);\n color: var(--font-on-background);\n padding: var(--spacing-s) 0;\n\n > *:not(:last-child) {\n display: flex;\n align-items: center;\n color: var(--font-on-background);\n overflow: hidden;\n\n > p {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:after {\n content: '/';\n padding: 0 var(--spacing-xs);\n }\n }\n\n > *:last-child {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: var(--color-primary);\n }\n\n ", "\n"])), _media.default.tablet(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-top: 0;\n "]))));
39
+ var _default = exports.default = Breadcrumb;
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "Breadcrumb", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _Breadcrumb.default;
10
10
  }
11
11
  });
12
-
13
12
  var _Breadcrumb = _interopRequireDefault(require("./Breadcrumb"));
14
-
15
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
package/button/Button.js CHANGED
@@ -1,60 +1,63 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.default = void 0;
9
-
10
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
-
12
8
  var _backgroundColor = _interopRequireDefault(require("../styles/mixin/backgroundColor"));
13
-
14
9
  var _colorOnBackground = _interopRequireDefault(require("../styles/mixin/colorOnBackground"));
15
-
16
10
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
17
-
18
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
12
+ 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
+ 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 && Object.prototype.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; }
24
14
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
25
-
26
- var Button = _styledComponents.default.button.attrs(function () {
27
- return {
28
- primary: true
29
- };
30
- })(_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"])), function (_ref) {
31
- var disabled = _ref.disabled;
15
+ const Button = _styledComponents.default.button.attrs(() => ({
16
+ 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"])), _ref => {
18
+ let {
19
+ disabled
20
+ } = _ref;
32
21
  return disabled ? 'no-drop' : 'pointer';
33
- }, function (_ref2) {
34
- var disabled = _ref2.disabled;
22
+ }, _ref2 => {
23
+ let {
24
+ disabled
25
+ } = _ref2;
35
26
  return !disabled && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition: 0.3s;\n box-shadow: var(--box-shadow);\n opacity: 0.9;\n "])));
36
- }, _backgroundColor.default, _colorOnBackground.default, function (_ref3) {
37
- var secondary = _ref3.secondary;
27
+ }, _backgroundColor.default, _colorOnBackground.default, _ref3 => {
28
+ let {
29
+ secondary
30
+ } = _ref3;
38
31
  return secondary && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: var(--color-background2);\n color: var(--font-on-background);\n "])));
39
- }, function (_ref4) {
40
- var reverse = _ref4.reverse;
32
+ }, _ref4 => {
33
+ let {
34
+ reverse
35
+ } = _ref4;
41
36
  return reverse && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: var(--color-background1);\n color: var(--font-on-background);\n "])));
42
- }, function (_ref5) {
43
- var disabled = _ref5.disabled;
37
+ }, _ref5 => {
38
+ let {
39
+ disabled
40
+ } = _ref5;
44
41
  return disabled && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n opacity: 0.5;\n "])));
45
- }, function (_ref6) {
46
- var iconOnly = _ref6.iconOnly;
42
+ }, _ref6 => {
43
+ let {
44
+ iconOnly
45
+ } = _ref6;
47
46
  return iconOnly && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 10px;\n\n > svg {\n margin-right: 0;\n }\n "])));
48
- }, function (_ref7) {
49
- var fullWidth = _ref7.fullWidth;
47
+ }, _ref7 => {
48
+ let {
49
+ fullWidth
50
+ } = _ref7;
50
51
  return fullWidth && 'width: 100%;';
51
- }, function (_ref8) {
52
- var alignCenter = _ref8.alignCenter;
52
+ }, _ref8 => {
53
+ let {
54
+ alignCenter
55
+ } = _ref8;
53
56
  return alignCenter && 'justify-content: center;';
54
- }, function (_ref9) {
55
- var filterFocus = _ref9.filterFocus;
57
+ }, _ref9 => {
58
+ let {
59
+ filterFocus
60
+ } = _ref9;
56
61
  return filterFocus && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border: 2px solid var(--color-danger);\n "])));
57
62
  });
58
-
59
- var _default = Button;
60
- exports.default = _default;
63
+ var _default = exports.default = Button;
@@ -4,31 +4,34 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
8
  var _templateObject;
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
-
16
- var 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"])), function (_ref) {
17
- var alignCenter = _ref.alignCenter;
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 => {
12
+ let {
13
+ alignCenter
14
+ } = _ref;
18
15
  return alignCenter && 'justify-content: center;';
19
- }, function (_ref2) {
20
- var alignRight = _ref2.alignRight;
16
+ }, _ref2 => {
17
+ let {
18
+ alignRight
19
+ } = _ref2;
21
20
  return alignRight && 'justify-content: flex-end;';
22
- }, function (_ref3) {
23
- var marginBottom = _ref3.marginBottom;
21
+ }, _ref3 => {
22
+ let {
23
+ marginBottom
24
+ } = _ref3;
24
25
  return marginBottom && 'margin-bottom: var(--spacing);';
25
- }, function (_ref4) {
26
- var vertical = _ref4.vertical;
26
+ }, _ref4 => {
27
+ let {
28
+ vertical
29
+ } = _ref4;
27
30
  return vertical && "\n flex-direction: column;\n\n > button,\n > * {\n margin-left: 0 !important;\n margin-bottom: var(--spacing-s);\n }\n ";
28
- }, function (_ref5) {
29
- var height100 = _ref5.height100;
31
+ }, _ref5 => {
32
+ let {
33
+ height100
34
+ } = _ref5;
30
35
  return height100 && 'height: 100%;';
31
36
  });
32
-
33
- var _default = ButtonGroup;
34
- exports.default = _default;
37
+ var _default = exports.default = ButtonGroup;
@@ -1,45 +1,45 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.default = void 0;
9
-
10
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
-
12
8
  var _templateObject, _templateObject2;
13
-
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
9
+ 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
+ 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 && Object.prototype.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; }
18
11
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
-
20
- var IconButton = _styledComponents.default.div.attrs(function () {
21
- return {
22
- role: 'button'
23
- };
24
- })(_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"])), function (_ref) {
25
- var disabled = _ref.disabled;
12
+ const IconButton = _styledComponents.default.div.attrs(() => ({
13
+ 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 => {
15
+ let {
16
+ disabled
17
+ } = _ref;
26
18
  return disabled ? 'var(--color-grey)' : 'var(--font-on-background)';
27
- }, function (_ref2) {
28
- var disabled = _ref2.disabled;
19
+ }, _ref2 => {
20
+ let {
21
+ disabled
22
+ } = _ref2;
29
23
  return disabled ? 'no-drop' : 'pointer';
30
- }, function (_ref3) {
31
- var size = _ref3.size;
24
+ }, _ref3 => {
25
+ let {
26
+ size
27
+ } = _ref3;
32
28
  return size === 'small' && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 32px;\n height: 32px;\n "])));
33
- }, function (_ref4) {
34
- var disabled = _ref4.disabled;
29
+ }, _ref4 => {
30
+ let {
31
+ disabled
32
+ } = _ref4;
35
33
  return !disabled && 'background: var(--color-hover)';
36
- }, function (_ref5) {
37
- var size = _ref5.size;
34
+ }, _ref5 => {
35
+ let {
36
+ size
37
+ } = _ref5;
38
38
  return size === 'small' && 'font-size: 1rem;';
39
- }, function (_ref6) {
40
- var size = _ref6.size;
39
+ }, _ref6 => {
40
+ let {
41
+ size
42
+ } = _ref6;
41
43
  return size === 'large' && 'font-size: 2rem;';
42
44
  });
43
-
44
- var _default = IconButton;
45
- exports.default = _default;
45
+ var _default = exports.default = IconButton;
@@ -4,56 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
11
-
12
9
  var _md = require("react-icons/md");
13
-
14
10
  var _Button = _interopRequireDefault(require("./Button"));
15
-
16
11
  var _jsxRuntime = require("react/jsx-runtime");
17
-
18
12
  var _templateObject;
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
14
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
23
-
24
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
25
-
26
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
27
-
28
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
29
-
30
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
31
-
32
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
33
-
34
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
-
36
- var ScrollToTopButton = function ScrollToTopButton() {
37
- var _useState = (0, _react.useState)(false),
38
- _useState2 = _slicedToArray(_useState, 2),
39
- $display = _useState2[0],
40
- setDisplay = _useState2[1];
41
-
42
- var toggleVisible = function toggleVisible() {
43
- var scrolled = window.pageYOffset;
15
+ const ScrollToTopButton = () => {
16
+ const [$display, setDisplay] = (0, _react.useState)(false);
17
+ const toggleVisible = () => {
18
+ const scrolled = window.pageYOffset;
44
19
  scrolled === 0 ? setDisplay(false) : setDisplay(true);
45
20
  };
46
-
47
- var scrollToTop = function scrollToTop() {
21
+ const scrollToTop = () => {
48
22
  window.scrollTo({
49
23
  top: 0,
50
24
  behavior: 'smooth'
51
25
  });
52
26
  };
53
-
54
- (0, _react.useEffect)(function () {
27
+ (0, _react.useEffect)(() => {
55
28
  window.addEventListener('scroll', toggleVisible);
56
- return function () {
29
+ return () => {
57
30
  window.removeEventListener('scroll', toggleVisible);
58
31
  };
59
32
  }, []);
@@ -64,10 +37,10 @@ var ScrollToTopButton = function ScrollToTopButton() {
64
37
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_md.MdOutlineArrowBackIosNew, {})
65
38
  });
66
39
  };
67
-
68
- var 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"])), function (_ref) {
69
- var $display = _ref.$display;
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 => {
41
+ let {
42
+ $display
43
+ } = _ref;
70
44
  return $display ? 'flex' : 'none';
71
45
  });
72
- var _default = ScrollToTopButton;
73
- exports.default = _default;
46
+ var _default = exports.default = ScrollToTopButton;
package/button/index.js CHANGED
@@ -5,35 +5,30 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "Button", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _Button.default;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "ButtonGroup", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _ButtonGroup.default;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "IconButton", {
19
19
  enumerable: true,
20
- get: function get() {
20
+ get: function () {
21
21
  return _IconButton.default;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "ScrollToTopButton", {
25
25
  enumerable: true,
26
- get: function get() {
26
+ get: function () {
27
27
  return _ScrollToTopButton.default;
28
28
  }
29
29
  });
30
-
31
30
  var _Button = _interopRequireDefault(require("./Button"));
32
-
33
31
  var _ButtonGroup = _interopRequireDefault(require("./ButtonGroup"));
34
-
35
32
  var _IconButton = _interopRequireDefault(require("./IconButton"));
36
-
37
33
  var _ScrollToTopButton = _interopRequireDefault(require("./ScrollToTopButton"));
38
-
39
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -4,33 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
8
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
-
16
- var 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"])));
17
-
18
- var Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
19
-
20
- var Content = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 2;\n"])));
21
-
22
- var 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"])));
23
-
24
- var 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"])));
25
-
26
- var 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"])));
27
-
28
- var _default = Object.assign(Callout, {
29
- Body: Body,
30
- Content: Content,
31
- Title: Title,
32
- Description: Description,
33
- Action: Action
34
- });
35
-
36
- exports.default = _default;
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"])));
17
+ var _default = exports.default = Object.assign(Callout, {
18
+ Body,
19
+ Content,
20
+ Title,
21
+ Description,
22
+ Action
23
+ });
package/callout/index.js CHANGED
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "Callout", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _Callout.default;
10
10
  }
11
11
  });
12
-
13
12
  var _Callout = _interopRequireDefault(require("./Callout"));
14
-
15
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }