@cashub/ui 0.21.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 (229) 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/backdrop/BaseBackdrop.js +2 -9
  14. package/backdrop/LoadingBackdrop.js +2 -9
  15. package/backdrop/ModalBackdrop.js +2 -9
  16. package/backdrop/index.js +3 -7
  17. package/badge/Badge.js +2 -11
  18. package/badge/BadgeDot.js +2 -10
  19. package/badge/BadgeFill.js +15 -20
  20. package/badge/BadgeWithText.js +6 -13
  21. package/badge/index.js +4 -9
  22. package/billing/BarChart.js +10 -17
  23. package/billing/Grid.js +11 -15
  24. package/billing/Header2.js +6 -9
  25. package/billing/Header3.js +9 -16
  26. package/billing/Paragraph.js +8 -14
  27. package/billing/ParagraphGroup.js +6 -9
  28. package/billing/ParagraphText.js +7 -12
  29. package/billing/Section.js +13 -23
  30. package/billing/SectionBody.js +5 -8
  31. package/billing/SectionHeader.js +7 -12
  32. package/breadcrumb/Breadcrumb.js +11 -21
  33. package/breadcrumb/index.js +1 -3
  34. package/button/Button.js +41 -38
  35. package/button/ButtonGroup.js +21 -18
  36. package/button/IconButton.js +29 -29
  37. package/button/ScrollToTopButton.js +12 -39
  38. package/button/index.js +4 -9
  39. package/callout/Callout.js +13 -26
  40. package/callout/index.js +1 -3
  41. package/chart/BarChart.js +28 -53
  42. package/chart/DoughnutChart.js +23 -62
  43. package/chart/LineChart.js +33 -55
  44. package/chart/SingleBarChart.js +11 -17
  45. package/chart/index.js +5 -12
  46. package/chart/utils/customTooltip.js +26 -43
  47. package/chart/utils/htmlLegendPlugin.js +24 -30
  48. package/chart/utils/index.js +3 -7
  49. package/chart/utils/padEmptyChartBar.js +24 -22
  50. package/container/FlexContainer.js +9 -12
  51. package/container/index.js +1 -3
  52. package/cropper/Cropper.js +21 -34
  53. package/cropper/CropperModalHandler.js +15 -21
  54. package/cropper/index.js +2 -5
  55. package/cropper/subComponent/CropImageModal.js +23 -58
  56. package/datetimePicker/DatePicker.js +103 -217
  57. package/datetimePicker/DatePickerV2.js +116 -221
  58. package/datetimePicker/DatetimePicker.js +27 -48
  59. package/datetimePicker/DatetimePickerV2.js +115 -231
  60. package/datetimePicker/TimeInput.js +9 -22
  61. package/datetimePicker/TimePicker.js +94 -151
  62. package/datetimePicker/TimePickerStyle.js +2 -9
  63. package/datetimePicker/accordion/Month.js +70 -90
  64. package/datetimePicker/accordion/Year.js +91 -135
  65. package/datetimePicker/hooks/index.js +3 -7
  66. package/datetimePicker/hooks/useChangeNumber.js +14 -27
  67. package/datetimePicker/hooks/useDecrease.js +19 -35
  68. package/datetimePicker/hooks/useIncrease.js +19 -35
  69. package/datetimePicker/index.js +7 -15
  70. package/datetimePicker/provider/constant.js +2 -3
  71. package/datetimePicker/subComponent/Accordion.js +108 -158
  72. package/datetimePicker/subComponent/CustomTimeInput.js +18 -48
  73. package/datetimePicker/subComponent/DateTimePickerContext.js +2 -5
  74. package/datetimePicker/utils/GMTDate.js +3 -7
  75. package/datetimePicker/utils/pad.js +2 -6
  76. package/datetimePicker/utils/toUTC0.js +3 -6
  77. package/descriptionList/DescriptionDetail.js +5 -10
  78. package/descriptionList/DescriptionList.js +5 -10
  79. package/descriptionList/DescriptionTerm.js +2 -9
  80. package/descriptionList/index.js +3 -7
  81. package/divider/Divider.js +9 -12
  82. package/divider/index.js +1 -3
  83. package/dropdown/Dropdown.js +28 -65
  84. package/dropdown/DropdownButtonOption.js +2 -9
  85. package/dropdown/DropdownContent.js +33 -64
  86. package/dropdown/DropdownDivOption.js +2 -9
  87. package/dropdown/DropdownItem.js +10 -16
  88. package/dropdown/DropdownLinkOption.js +2 -9
  89. package/dropdown/DropdownToggle.js +18 -38
  90. package/dropdown/index.js +6 -17
  91. package/dropdown/subComponent/DropdownContext.js +2 -5
  92. package/dropzone/FileDropzone.js +148 -302
  93. package/dropzone/ImageDropzone.js +96 -171
  94. package/dropzone/index.js +2 -5
  95. package/dropzone/subComponent/Message.js +7 -14
  96. package/figure/IconFigure.js +9 -16
  97. package/figure/ImageFigure.js +11 -17
  98. package/figure/index.js +2 -5
  99. package/file/HiddenFileInput.js +5 -14
  100. package/file/index.js +1 -3
  101. package/form/Checkbox.js +34 -43
  102. package/form/FormItem.js +2 -9
  103. package/form/Input.js +13 -15
  104. package/form/Label.js +10 -13
  105. package/form/MutedText.js +5 -10
  106. package/form/RadioButton.js +20 -32
  107. package/form/Searchbox.js +21 -65
  108. package/form/Slider.js +14 -0
  109. package/form/SwitchButton.js +34 -39
  110. package/form/Textarea.js +2 -11
  111. package/form/index.js +9 -19
  112. package/grid/Column.js +17 -17
  113. package/grid/Grid.js +13 -14
  114. package/grid/index.js +2 -5
  115. package/heading/Heading1.js +5 -10
  116. package/heading/Heading2.js +9 -12
  117. package/heading/Heading3.js +21 -18
  118. package/heading/index.js +3 -7
  119. package/helmet/Helmet.js +6 -9
  120. package/helmet/index.js +2 -5
  121. package/iconbox/ApplicationIconBox.js +25 -31
  122. package/iconbox/IconBox.js +11 -24
  123. package/iconbox/IconBoxV2.js +14 -26
  124. package/iconbox/index.js +3 -7
  125. package/iconbox/subComponent/IconBoxFigure.js +25 -20
  126. package/iconbox/subComponent/IconBoxImage.js +15 -18
  127. package/image/ImageFluid.js +2 -10
  128. package/image/UploadImage.js +65 -113
  129. package/image/index.js +2 -5
  130. package/index.js +44 -130
  131. package/jsoneditor/JsonEditor.js +10 -32
  132. package/jsoneditor/index.js +1 -3
  133. package/keyframe/Pulse.js +2 -7
  134. package/keyframe/Spin.js +2 -7
  135. package/link/LinkSpan.js +22 -35
  136. package/link/index.js +1 -3
  137. package/map/GoogleMap.js +122 -175
  138. package/map/GoogleReverseGeolocation.js +79 -186
  139. package/map/LeafletMap.js +78 -132
  140. package/map/LeafletReverseGeolocation.js +49 -121
  141. package/map/index.js +4 -9
  142. package/map/subComponent/BasicLeafletMap.js +8 -14
  143. package/map/subComponent/GoogleMapContainer.js +5 -10
  144. package/map/subComponent/GoogleMapPopup.js +66 -123
  145. package/map/subComponent/GoogleMapWrapper.js +13 -32
  146. package/map/subComponent/GoogleMarkerSpiderfier.js +14 -24
  147. package/map/subComponent/LeafletDrawControl.js +47 -84
  148. package/map/subComponent/LeafletMapContainer.js +5 -10
  149. package/map/subComponent/MapSearchBoxControl.js +24 -70
  150. package/modal/StateModal.js +41 -100
  151. package/modal/TitleModal.js +89 -190
  152. package/modal/index.js +2 -5
  153. package/package.json +1 -1
  154. package/paginate/Paginate.js +40 -54
  155. package/paginate/index.js +1 -3
  156. package/popover/Popover.js +39 -87
  157. package/popover/index.js +1 -3
  158. package/qrcode/QRCode.js +10 -23
  159. package/qrcode/QRCodeContainter.js +8 -16
  160. package/qrcode/index.js +2 -5
  161. package/ribbon/Ribbon.js +4 -15
  162. package/ribbon/index.js +1 -3
  163. package/section/Section.js +57 -39
  164. package/section/SectionBody.js +15 -22
  165. package/section/SectionHeader.js +27 -27
  166. package/section/SectionToolbar.js +2 -9
  167. package/section/SectionToolbarItem.js +2 -9
  168. package/section/index.js +5 -11
  169. package/select/InputSelect.js +103 -215
  170. package/select/Select.js +204 -362
  171. package/select/index.js +2 -5
  172. package/select/subComponent/ListBox.js +9 -12
  173. package/select/subComponent/Option.js +8 -16
  174. package/select/subComponent/OptionGroup.js +2 -9
  175. package/select/subComponent/Options.js +5 -11
  176. package/select/subComponent/SearchBox.js +9 -29
  177. package/select/subComponent/SelectedMultiple.js +8 -16
  178. package/select/subComponent/SelectedSingle.js +2 -9
  179. package/styles/GlobalStyle.js +169 -91
  180. package/styles/config/breakpoint.style.js +2 -3
  181. package/styles/config/header.style.js +2 -3
  182. package/styles/config/sidebar.style.js +2 -3
  183. package/styles/index.js +2 -5
  184. package/styles/mixin/backgroundColor.js +17 -14
  185. package/styles/mixin/borderColor.js +17 -14
  186. package/styles/mixin/color.js +17 -14
  187. package/styles/mixin/colorOnBackground.js +17 -14
  188. package/styles/mixin/inputPlaceholder.js +3 -9
  189. package/styles/mixin/media.js +3 -11
  190. package/styles/mixin/rounded.js +13 -12
  191. package/styles/mixin/scrollbar.js +7 -13
  192. package/styles/theme/dark.theme.js +20 -20
  193. package/styles/theme/light.theme.js +20 -20
  194. package/styles/theme/white.theme.js +20 -20
  195. package/styles/themes.js +2 -8
  196. package/table/GridTable.js +105 -143
  197. package/table/ImageBox.js +8 -18
  198. package/table/PermissionTable.js +25 -25
  199. package/table/Table.js +137 -153
  200. package/table/__mock__/columns.js +2 -3
  201. package/table/__mock__/data.js +2 -3
  202. package/table/hooks/index.js +2 -5
  203. package/table/hooks/useCalculateDataRange.js +9 -36
  204. package/table/hooks/useGenerateSort.js +6 -17
  205. package/table/index.js +4 -9
  206. package/table/subComponent/BaseTableHeadCell.js +15 -21
  207. package/table/subComponent/GridTableFooter.js +5 -10
  208. package/table/subComponent/GridTableHeadCell.js +5 -10
  209. package/table/subComponent/Resizer.js +17 -44
  210. package/table/subComponent/TableFooter.js +5 -10
  211. package/table/subComponent/TableFooterInfo.js +2 -9
  212. package/table/subComponent/TableFooterPager.js +5 -12
  213. package/table/subComponent/TableHeadCell.js +2 -9
  214. package/table/subComponent/TableSort.js +13 -19
  215. package/tagify/TagifyStyle.js +2 -9
  216. package/tagify/Tags.js +15 -37
  217. package/tagify/index.js +2 -5
  218. package/text/Paragraph.js +25 -20
  219. package/text/index.js +1 -3
  220. package/timeline/Timeline.js +28 -37
  221. package/timeline/index.js +1 -3
  222. package/toast/CustomToastContainer.js +2 -9
  223. package/toast/MessageContainer.js +9 -18
  224. package/toast/index.js +3 -8
  225. package/toast/show.js +18 -28
  226. package/tooltip/Tooltip.js +48 -97
  227. package/tooltip/index.js +1 -3
  228. package/wizard/Wizard.js +63 -133
  229. package/wizard/index.js +1 -3
@@ -4,82 +4,42 @@ 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 _fa = require("react-icons/fa");
11
-
12
9
  var _moment = _interopRequireDefault(require("moment"));
13
-
14
10
  var _styledComponents = _interopRequireDefault(require("styled-components"));
15
-
16
11
  var _lodash = _interopRequireDefault(require("lodash.uniqueid"));
17
-
18
12
  var _utils = require("@cashub/utils");
19
-
20
13
  var _hooks = require("./hooks");
21
-
22
14
  var _pad = _interopRequireDefault(require("./utils/pad"));
23
-
24
15
  var _jsxRuntime = require("react/jsx-runtime");
25
-
26
16
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
27
-
28
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
-
30
18
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
31
-
32
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
33
-
34
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
35
-
36
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
37
-
38
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
39
-
40
- 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."); }
41
-
42
- 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); }
43
-
44
- 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; }
45
-
46
- 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; }
47
-
48
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
49
-
50
- var LENGTH = 2;
51
- var PAD_STRING = '0';
52
-
53
- var TimePicker = function TimePicker(_ref) {
54
- var _ref$labelName = _ref.labelName,
55
- labelName = _ref$labelName === void 0 ? 'Time' : _ref$labelName,
56
- value = _ref.value,
57
- onChange = _ref.onChange,
58
- _ref$showSecond = _ref.showSecond,
59
- showSecond = _ref$showSecond === void 0 ? true : _ref$showSecond;
60
-
61
- var _useState = (0, _react.useState)((0, _lodash.default)('hour-')),
62
- _useState2 = _slicedToArray(_useState, 1),
63
- hourId = _useState2[0];
64
-
65
- var _useState3 = (0, _react.useState)(function () {
66
- var time = (0, _moment.default)(value, 'HH:mm:ss'); // use current time when time value is invalid
67
-
19
+ const LENGTH = 2;
20
+ const PAD_STRING = '0';
21
+ const TimePicker = _ref => {
22
+ let {
23
+ labelName = 'Time',
24
+ value,
25
+ onChange,
26
+ showSecond = true
27
+ } = _ref;
28
+ const [hourId] = (0, _react.useState)((0, _lodash.default)('hour-'));
29
+ const [time, setTime] = (0, _react.useState)(() => {
30
+ let time = (0, _moment.default)(value, 'HH:mm:ss');
31
+
32
+ // use current time when time value is invalid
68
33
  if (!value || !time.isValid()) {
69
34
  time = (0, _moment.default)();
70
35
  }
71
-
72
36
  return {
73
37
  hour: (0, _pad.default)(time.hour(), LENGTH, PAD_STRING),
74
38
  minute: (0, _pad.default)(time.minute(), LENGTH, PAD_STRING),
75
39
  second: (0, _pad.default)(time.second(), LENGTH, PAD_STRING)
76
40
  };
77
- }),
78
- _useState4 = _slicedToArray(_useState3, 2),
79
- time = _useState4[0],
80
- setTime = _useState4[1];
81
-
82
- (0, _react.useEffect)(function () {
41
+ });
42
+ (0, _react.useEffect)(() => {
83
43
  if (typeof onChange === 'function' && time.hour && time.minute && time.second) {
84
44
  onChange("".concat(time.hour, ":").concat(time.minute, ":").concat(time.second));
85
45
  }
@@ -101,40 +61,42 @@ var TimePicker = function TimePicker(_ref) {
101
61
  })]
102
62
  });
103
63
  };
104
-
105
- var Hour = function Hour(_ref2) {
106
- var id = _ref2.id,
107
- value = _ref2.value,
108
- setTime = _ref2.setTime;
109
- var NAME = 'hour';
110
- var MIN = 0;
111
- var MAX = 23;
112
- var increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
64
+ const Hour = _ref2 => {
65
+ let {
66
+ id,
67
+ value,
68
+ setTime
69
+ } = _ref2;
70
+ const NAME = 'hour';
71
+ const MIN = 0;
72
+ const MAX = 23;
73
+ const increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
113
74
  name: NAME,
114
75
  length: LENGTH,
115
76
  padString: PAD_STRING
116
77
  });
117
- var decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
78
+ const decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
118
79
  name: NAME,
119
80
  length: LENGTH,
120
81
  padString: PAD_STRING
121
82
  });
122
- var changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
123
- var handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
83
+ const changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
84
+ const handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
124
85
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Section, {
125
86
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Input, {
126
87
  type: "text",
127
88
  id: id,
128
89
  maxLength: "2",
129
90
  value: value,
130
- onChange: function onChange(event) {
91
+ onChange: event => {
131
92
  changeNumber(event.target.value);
132
93
  },
133
94
  onKeyUp: handleKeyUp,
134
- onBlur: function onBlur(event) {
135
- setTime(function (previous) {
136
- var newState = _objectSpread({}, previous);
137
-
95
+ onBlur: event => {
96
+ setTime(previous => {
97
+ const newState = {
98
+ ...previous
99
+ };
138
100
  newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
139
101
  return newState;
140
102
  });
@@ -150,30 +112,27 @@ var Hour = function Hour(_ref2) {
150
112
  })]
151
113
  });
152
114
  };
153
-
154
- var Minute = function Minute(_ref3) {
155
- var value = _ref3.value,
156
- setTime = _ref3.setTime;
157
- var NAME = 'minute';
158
- var MIN = 0;
159
- var MAX = 59;
160
-
161
- var _useState5 = (0, _react.useState)((0, _lodash.default)("".concat(NAME, "-"))),
162
- _useState6 = _slicedToArray(_useState5, 1),
163
- minuteId = _useState6[0];
164
-
165
- var increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
115
+ const Minute = _ref3 => {
116
+ let {
117
+ value,
118
+ setTime
119
+ } = _ref3;
120
+ const NAME = 'minute';
121
+ const MIN = 0;
122
+ const MAX = 59;
123
+ const [minuteId] = (0, _react.useState)((0, _lodash.default)("".concat(NAME, "-")));
124
+ const increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
166
125
  name: NAME,
167
126
  length: LENGTH,
168
127
  padString: PAD_STRING
169
128
  });
170
- var decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
129
+ const decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
171
130
  name: NAME,
172
131
  length: LENGTH,
173
132
  padString: PAD_STRING
174
133
  });
175
- var changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
176
- var handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
134
+ const changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
135
+ const handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
177
136
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
178
137
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Delimiter, {
179
138
  children: ":"
@@ -183,14 +142,15 @@ var Minute = function Minute(_ref3) {
183
142
  id: minuteId,
184
143
  maxLength: "2",
185
144
  value: value,
186
- onChange: function onChange(event) {
145
+ onChange: event => {
187
146
  changeNumber(event.target.value);
188
147
  },
189
148
  onKeyUp: handleKeyUp,
190
- onBlur: function onBlur(event) {
191
- setTime(function (previous) {
192
- var newState = _objectSpread({}, previous);
193
-
149
+ onBlur: event => {
150
+ setTime(previous => {
151
+ const newState = {
152
+ ...previous
153
+ };
194
154
  newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
195
155
  return newState;
196
156
  });
@@ -207,30 +167,27 @@ var Minute = function Minute(_ref3) {
207
167
  })]
208
168
  });
209
169
  };
210
-
211
- var Second = function Second(_ref4) {
212
- var value = _ref4.value,
213
- setTime = _ref4.setTime;
214
- var NAME = 'second';
215
- var MIN = 0;
216
- var MAX = 59;
217
-
218
- var _useState7 = (0, _react.useState)((0, _lodash.default)("".concat(NAME, "-"))),
219
- _useState8 = _slicedToArray(_useState7, 1),
220
- secondId = _useState8[0];
221
-
222
- var increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
170
+ const Second = _ref4 => {
171
+ let {
172
+ value,
173
+ setTime
174
+ } = _ref4;
175
+ const NAME = 'second';
176
+ const MIN = 0;
177
+ const MAX = 59;
178
+ const [secondId] = (0, _react.useState)((0, _lodash.default)("".concat(NAME, "-")));
179
+ const increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
223
180
  name: NAME,
224
181
  length: LENGTH,
225
182
  padString: PAD_STRING
226
183
  });
227
- var decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
184
+ const decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
228
185
  name: NAME,
229
186
  length: LENGTH,
230
187
  padString: PAD_STRING
231
188
  });
232
- var changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
233
- var handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
189
+ const changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
190
+ const handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
234
191
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
235
192
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Delimiter, {
236
193
  children: ":"
@@ -240,14 +197,15 @@ var Second = function Second(_ref4) {
240
197
  id: secondId,
241
198
  maxLength: "2",
242
199
  value: value,
243
- onChange: function onChange(event) {
200
+ onChange: event => {
244
201
  changeNumber(event.target.value);
245
202
  },
246
203
  onKeyUp: handleKeyUp,
247
- onBlur: function onBlur(event) {
248
- setTime(function (previous) {
249
- var newState = _objectSpread({}, previous);
250
-
204
+ onBlur: event => {
205
+ setTime(previous => {
206
+ const newState = {
207
+ ...previous
208
+ };
251
209
  newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
252
210
  return newState;
253
211
  });
@@ -264,61 +222,46 @@ var Second = function Second(_ref4) {
264
222
  })]
265
223
  });
266
224
  };
267
-
268
- var useKeyUp = function useKeyUp(increase, decrease, min, max, setState, name) {
269
- return (0, _react.useCallback)(function (event) {
270
- var key = event.keyCode;
271
-
225
+ const useKeyUp = (increase, decrease, min, max, setState, name) => {
226
+ return (0, _react.useCallback)(event => {
227
+ const key = event.keyCode;
272
228
  switch (key) {
273
229
  case _utils.KEY_CODE.UP:
274
230
  increase();
275
231
  break;
276
-
277
232
  case _utils.KEY_CODE.DOWN:
278
233
  decrease();
279
234
  break;
280
-
281
235
  case _utils.KEY_CODE.HOME:
282
- setState(function (previous) {
283
- var newState = _objectSpread({}, previous);
284
-
236
+ setState(previous => {
237
+ const newState = {
238
+ ...previous
239
+ };
285
240
  newState[name] = (0, _pad.default)(min, LENGTH, PAD_STRING);
286
241
  return newState;
287
242
  });
288
243
  break;
289
-
290
244
  case _utils.KEY_CODE.END:
291
- setState(function (previous) {
292
- var newState = _objectSpread({}, previous);
293
-
245
+ setState(previous => {
246
+ const newState = {
247
+ ...previous
248
+ };
294
249
  newState[name] = (0, _pad.default)(max, LENGTH, PAD_STRING);
295
250
  return newState;
296
251
  });
297
252
  break;
298
-
299
253
  default:
300
254
  break;
301
255
  }
302
256
  }, [increase, decrease, min, max, setState, name]);
303
257
  };
304
-
305
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
306
-
307
- var Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n color: var(--font-on-background);\n font-size: var(--font-body1);\n margin-right: 12px;\n"])));
308
-
309
- var Section = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-flex;\n height: 36px;\n width: 56px;\n padding: calc(var(--spacing-xs) / 2) var(--spacing-xs);\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius-s);\n background: transparent;\n color: var(--font-on-background);\n"])));
310
-
311
- var Input = _styledComponents.default.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: calc(100% - 4px - 12px);\n border: none;\n background: transparent;\n color: inherit;\n\n &:focus {\n outline: none;\n }\n"])));
312
-
313
- var StepperButton = _styledComponents.default.div.attrs(function () {
314
- return {
315
- role: 'button'
316
- };
317
- })(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n\n > svg {\n width: 100%;\n height: 100%;\n vertical-align: top;\n }\n\n &:first-child {\n margin-bottom: 2px;\n }\n\n &:hover {\n color: var(--color-primary);\n }\n"])));
318
-
319
- var Stepper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: calc(var(--spacing-xs) / 2);\n"])));
320
-
321
- var Delimiter = _styledComponents.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: inline-block;\n color: var(--font-on-background);\n font-size: var(--font-body1);\n width: 12px;\n text-align: center;\n"])));
322
-
323
- var _default = TimePicker;
324
- exports.default = _default;
258
+ const Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
259
+ const Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n color: var(--font-on-background);\n font-size: var(--font-body1);\n margin-right: 12px;\n"])));
260
+ const Section = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-flex;\n height: 36px;\n width: 56px;\n padding: calc(var(--spacing-xs) / 2) var(--spacing-xs);\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius-s);\n background: transparent;\n color: var(--font-on-background);\n"])));
261
+ const Input = _styledComponents.default.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: calc(100% - 4px - 12px);\n border: none;\n background: transparent;\n color: inherit;\n\n &:focus {\n outline: none;\n }\n"])));
262
+ const StepperButton = _styledComponents.default.div.attrs(() => ({
263
+ role: 'button'
264
+ }))(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n\n > svg {\n width: 100%;\n height: 100%;\n vertical-align: top;\n }\n\n &:first-child {\n margin-bottom: 2px;\n }\n\n &:hover {\n color: var(--color-primary);\n }\n"])));
265
+ const Stepper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: calc(var(--spacing-xs) / 2);\n"])));
266
+ const Delimiter = _styledComponents.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: inline-block;\n color: var(--font-on-background);\n font-size: var(--font-body1);\n width: 12px;\n text-align: center;\n"])));
267
+ var _default = exports.default = TimePicker;
@@ -4,18 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _styledComponents = require("styled-components");
9
-
10
8
  var _scrollbar = _interopRequireDefault(require("../styles/mixin/scrollbar"));
11
-
12
9
  var _templateObject;
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
-
18
12
  // integrate rc-time-picker component
19
- var TimePickerStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .rc-time-picker-panel-narrow {\n max-width: none;\n }\n\n .rc-time-picker-panel {\n .rc-time-picker-panel-inner {\n background: transparent;\n border: none;\n box-shadow: none;\n\n .rc-time-picker-panel-input-wrap {\n display: none;\n }\n\n .rc-time-picker-panel-combobox {\n height: 144px;\n border: var(--border-width) solid var(--border-color);\n color: var(--font-on-background);\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n background: var(--color-background2);\n\n .rc-time-picker-panel-select {\n font-size: var(--font-body1);\n \n ", "\n\n li {\n &:hover {\n background: var(--color-hover);\n }\n \n &.rc-time-picker-panel-select-option-selected {\n background: var(--color-hover);\n }\n }\n\n &:first-child {\n border-top-left-radius: var(--border-radius);\n border-bottom-left-radius: var(--border-radius);\n }\n }\n }\n }\n\n &.rc-time-picker-panel-placement-bottomLeft {\n .rc-time-picker-panel-inner {\n padding-top: calc(36px + var(--spacing-xs));\n }\n }\n }\n"])), _scrollbar.default);
20
- var _default = TimePickerStyle;
21
- exports.default = _default;
13
+ const TimePickerStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .rc-time-picker-panel-narrow {\n max-width: none;\n }\n\n .rc-time-picker-panel {\n .rc-time-picker-panel-inner {\n background: transparent;\n border: none;\n box-shadow: none;\n\n .rc-time-picker-panel-input-wrap {\n display: none;\n }\n\n .rc-time-picker-panel-combobox {\n height: 144px;\n border: var(--border-width) solid var(--border-color);\n color: var(--font-on-background);\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n background: var(--color-background2);\n\n .rc-time-picker-panel-select {\n font-size: var(--font-body1);\n \n ", "\n\n li {\n &:hover {\n background: var(--color-hover);\n }\n \n &.rc-time-picker-panel-select-option-selected {\n background: var(--color-hover);\n }\n }\n\n &:first-child {\n border-top-left-radius: var(--border-radius);\n border-bottom-left-radius: var(--border-radius);\n }\n }\n }\n }\n\n &.rc-time-picker-panel-placement-bottomLeft {\n .rc-time-picker-panel-inner {\n padding-top: calc(36px + var(--spacing-xs));\n }\n }\n }\n"])), _scrollbar.default);
14
+ var _default = exports.default = TimePickerStyle;
@@ -1,85 +1,64 @@
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 _react = require("react");
11
-
12
8
  var _io = require("react-icons/io");
13
-
14
9
  var _md = require("react-icons/md");
15
-
16
10
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
17
-
18
11
  var _utils = require("@cashub/utils");
19
-
20
12
  var _DateTimePickerContext = _interopRequireDefault(require("../subComponent/DateTimePickerContext"));
21
-
22
13
  var _constant = require("../provider/constant");
23
-
24
14
  var _jsxRuntime = require("react/jsx-runtime");
25
-
26
15
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
27
-
28
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
-
30
- 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); }
31
-
32
- 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; }
33
-
17
+ 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); }
18
+ 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; }
34
19
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
35
-
36
- var Month = function Month(_ref) {
37
- var expand = _ref.expand,
38
- handleDisplayAccordionContent = _ref.handleDisplayAccordionContent;
39
-
40
- var _useContext = (0, _react.useContext)(_DateTimePickerContext.default),
41
- selectedDate = _useContext.selectedDate,
42
- setSelectedDate = _useContext.setSelectedDate,
43
- minDate = _useContext.minDate,
44
- maxDate = _useContext.maxDate,
45
- fixedYear = _useContext.fixedYear,
46
- setAccordionCurrentDisplayType = _useContext.setAccordionCurrentDisplayType;
47
-
48
- var handleChangeMonth = (0, _react.useCallback)(function (month) {
20
+ const Month = _ref => {
21
+ let {
22
+ expand,
23
+ handleDisplayAccordionContent
24
+ } = _ref;
25
+ const {
26
+ selectedDate,
27
+ setSelectedDate,
28
+ minDate,
29
+ maxDate,
30
+ fixedYear,
31
+ setAccordionCurrentDisplayType
32
+ } = (0, _react.useContext)(_DateTimePickerContext.default);
33
+ const handleChangeMonth = (0, _react.useCallback)(month => {
49
34
  // switch to the first day of the target month
50
- var date = new Date(selectedDate);
35
+ const date = new Date(selectedDate);
51
36
  date.setDate(1);
52
37
  date.setMonth(month);
53
38
  setSelectedDate((0, _utils.datetimeTFormat)(date));
54
39
  setAccordionCurrentDisplayType(null);
55
40
  }, [setAccordionCurrentDisplayType, setSelectedDate, selectedDate]);
56
-
57
- var changeToPreviousMonth = function changeToPreviousMonth() {
58
- var date = new Date(selectedDate);
41
+ const changeToPreviousMonth = () => {
42
+ const date = new Date(selectedDate);
59
43
  handleChangeMonth(date.getMonth() <= 0 ? 11 : date.getMonth() - 1);
60
44
  };
61
-
62
- var changeToNextMonth = function changeToNextMonth() {
63
- var date = new Date(selectedDate);
45
+ const changeToNextMonth = () => {
46
+ const date = new Date(selectedDate);
64
47
  handleChangeMonth(date.getMonth() >= 11 ? 0 : date.getMonth() + 1);
65
48
  };
66
-
67
- var handleMonthItemDisable = (0, _react.useCallback)(function (month) {
68
- var minDayDate;
69
- var maxDayDate;
70
-
49
+ const handleMonthItemDisable = (0, _react.useCallback)(month => {
50
+ let minDayDate;
51
+ let maxDayDate;
71
52
  if (minDate) {
72
53
  minDayDate = new Date((0, _utils.datetimeTFormat)(minDate));
73
54
  minDayDate.setMonth(month);
74
55
  minDayDate.setFullYear(new Date(selectedDate).getFullYear());
75
56
  }
76
-
77
57
  if (maxDate) {
78
58
  maxDayDate = maxDate && new Date((0, _utils.datetimeTFormat)(maxDate));
79
59
  maxDayDate.setFullYear(new Date(selectedDate).getFullYear());
80
60
  maxDayDate.setMonth(month);
81
61
  }
82
-
83
62
  if (minDate !== undefined && maxDate !== undefined) {
84
63
  return !(new Date((0, _utils.datetimeTFormat)(minDate)) <= minDayDate && maxDayDate <= new Date((0, _utils.datetimeTFormat)(maxDate)));
85
64
  } else if (minDate) {
@@ -87,27 +66,22 @@ var Month = function Month(_ref) {
87
66
  } else if (maxDate) {
88
67
  return !((0, _utils.datetimeTFormat)(maxDayDate) <= (0, _utils.datetimeTFormat)(maxDate));
89
68
  }
90
-
91
69
  return false;
92
70
  }, [maxDate, minDate, selectedDate]);
93
- var handleDisableArrow = (0, _react.useCallback)(function (arrowType) {
94
- var date = new Date(selectedDate);
95
- var selectedMonth = date.getMonth();
71
+ const handleDisableArrow = (0, _react.useCallback)(arrowType => {
72
+ const date = new Date(selectedDate);
73
+ const selectedMonth = date.getMonth();
96
74
  date.setDate(1);
97
-
98
75
  if (arrowType === 'previous') {
99
76
  date.setMonth(selectedMonth - 1 < 0 ? 11 : selectedMonth - 1);
100
77
  } else {
101
78
  date.setMonth(selectedMonth + 1 > 11 ? 0 : selectedMonth + 1);
102
79
  }
103
-
104
80
  if (fixedYear && !minDate && !maxDate || !minDate && !maxDate) {
105
81
  return false;
106
82
  }
107
-
108
- var minDate1st = minDate && new Date((0, _utils.datetimeTFormat)(minDate));
109
- var maxDate1st = maxDate && new Date((0, _utils.datetimeTFormat)(maxDate));
110
-
83
+ const minDate1st = minDate && new Date((0, _utils.datetimeTFormat)(minDate));
84
+ const maxDate1st = maxDate && new Date((0, _utils.datetimeTFormat)(maxDate));
111
85
  if (minDate && !maxDate) {
112
86
  minDate1st.setDate(1);
113
87
  minDate1st.setHours(0, 0, 0, 0);
@@ -124,18 +98,16 @@ var Month = function Month(_ref) {
124
98
  return !(minDate1st <= date && maxDate1st >= date);
125
99
  }
126
100
  }, [fixedYear, maxDate, minDate, selectedDate]);
127
- var monthContent = (0, _react.useMemo)(function () {
128
- var selectedMonth = new Date(selectedDate).getMonth();
129
- return _constant.MONTH.map(function (month, index) {
130
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Item, {
131
- selected: selectedMonth === index,
132
- onClick: function onClick() {
133
- handleChangeMonth(index);
134
- },
135
- disabled: handleMonthItemDisable(index),
136
- children: month.text
137
- }, month.number);
138
- });
101
+ const monthContent = (0, _react.useMemo)(() => {
102
+ const selectedMonth = new Date(selectedDate).getMonth();
103
+ return _constant.MONTH.map((month, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Item, {
104
+ selected: selectedMonth === index,
105
+ onClick: () => {
106
+ handleChangeMonth(index);
107
+ },
108
+ disabled: handleMonthItemDisable(index),
109
+ children: month.text
110
+ }, month.number));
139
111
  }, [selectedDate, handleChangeMonth, handleMonthItemDisable]);
140
112
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
141
113
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Header, {
@@ -162,36 +134,44 @@ var Month = function Month(_ref) {
162
134
  })]
163
135
  });
164
136
  };
165
-
166
- var Header = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-content: center;\n position: relative;\n\n > div {\n width: 72px;\n line-height: 36px;\n text-align: center;\n }\n\n &::before {\n content: '';\n border-bottom: var(--border-width) solid var(--border-color);\n position: absolute;\n width: 300px;\n bottom: 0;\n z-index: 1;\n right: -16px;\n }\n"])));
167
-
168
- var IconButton = _styledComponents.default.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 36px;\n height: 36px;\n background: var(--color-background1);\n border: none;\n color: var(--font-on-background);\n padding: 0;\n transition: 0.3s;\n\n &:hover {\n color: var(--color-primary);\n }\n\n ", "\n\n ", "\n"])), function (_ref2) {
169
- var disabled = _ref2.disabled;
137
+ const Header = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-content: center;\n position: relative;\n\n > div {\n width: 72px;\n line-height: 36px;\n text-align: center;\n }\n\n &::before {\n content: '';\n border-bottom: var(--border-width) solid var(--border-color);\n position: absolute;\n width: 300px;\n bottom: 0;\n z-index: 1;\n right: -16px;\n }\n"])));
138
+ const IconButton = _styledComponents.default.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 36px;\n height: 36px;\n background: var(--color-background1);\n border: none;\n color: var(--font-on-background);\n padding: 0;\n transition: 0.3s;\n\n &:hover {\n color: var(--color-primary);\n }\n\n ", "\n\n ", "\n"])), _ref2 => {
139
+ let {
140
+ disabled
141
+ } = _ref2;
170
142
  return disabled && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n opacity: 0.5;\n\n &:hover {\n color: var(--font-on-background);\n }\n "])));
171
- }, function (_ref3) {
172
- var right = _ref3.right,
173
- $rotate = _ref3.$rotate;
143
+ }, _ref3 => {
144
+ let {
145
+ right,
146
+ $rotate
147
+ } = _ref3;
174
148
  return right && "\n position: absolute;\n right: 0;\n ".concat($rotate && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transform: rotate(180deg);\n "]))), "\n ");
175
149
  });
176
-
177
- var Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex-wrap: wrap;\n height: 0;\n width: 100%;\n display: ", ";\n\n ", "\n transition: .3s;\n\n transition: 0.3s;\n"])), function (_ref4) {
178
- var expand = _ref4.expand;
150
+ const Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex-wrap: wrap;\n height: 0;\n width: 100%;\n display: ", ";\n\n ", "\n transition: .3s;\n\n transition: 0.3s;\n"])), _ref4 => {
151
+ let {
152
+ expand
153
+ } = _ref4;
179
154
  return expand ? 'flex' : 'none';
180
- }, function (_ref5) {
181
- var fixedYear = _ref5.fixedYear;
155
+ }, _ref5 => {
156
+ let {
157
+ fixedYear
158
+ } = _ref5;
182
159
  return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), fixedYear ? '192' : '144');
183
160
  });
184
-
185
- var Item = _styledComponents.default.button(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: calc(100% / 3);\n height: 36px;\n line-height: 36px;\n text-align: center;\n border-radius: var(--border-radius-s);\n padding: 0;\n border: none;\n color: var(--font-on-background);\n background: var(--color-background1);\n\n &:hover {\n ", "\n }\n\n ", "\n\n ", "\n"])), function (_ref6) {
186
- var disabled = _ref6.disabled;
161
+ const Item = _styledComponents.default.button(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: calc(100% / 3);\n height: 36px;\n line-height: 36px;\n text-align: center;\n border-radius: var(--border-radius-s);\n padding: 0;\n border: none;\n color: var(--font-on-background);\n background: var(--color-background1);\n\n &:hover {\n ", "\n }\n\n ", "\n\n ", "\n"])), _ref6 => {
162
+ let {
163
+ disabled
164
+ } = _ref6;
187
165
  return !disabled && 'background: var(--color-primary)';
188
- }, function (_ref7) {
189
- var disabled = _ref7.disabled;
166
+ }, _ref7 => {
167
+ let {
168
+ disabled
169
+ } = _ref7;
190
170
  return disabled && 'color: var(--font-on-mute)';
191
- }, function (_ref8) {
192
- var selected = _ref8.selected;
171
+ }, _ref8 => {
172
+ let {
173
+ selected
174
+ } = _ref8;
193
175
  return selected && 'background: var(--color-hover)';
194
176
  });
195
-
196
- var _default = Month;
197
- exports.default = _default;
177
+ var _default = exports.default = Month;