@cashub/ui-elv 1.0.2 → 1.0.4

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 (310) hide show
  1. package/datetimePicker/index.js +2 -37
  2. package/esm/Tab/Tab.js +21 -0
  3. package/esm/Tab/TabList.js +160 -0
  4. package/esm/Tab/TabPanel.js +42 -0
  5. package/esm/Tab/TabTab.js +98 -0
  6. package/esm/Tab/index.js +23 -0
  7. package/esm/Tab/subComponent/TabContext.js +3 -0
  8. package/esm/Tab/subComponent/TabListV2.js +18 -0
  9. package/esm/Tab/subComponent/TabPanelV2.js +45 -0
  10. package/esm/Tab/subComponent/TabTabV2.js +56 -0
  11. package/esm/VerticalTab/TabList.js +20 -0
  12. package/esm/VerticalTab/TabPanel.js +45 -0
  13. package/esm/VerticalTab/TabTab.js +63 -0
  14. package/esm/VerticalTab/VerticalTab.js +34 -0
  15. package/esm/VerticalTab/index.js +9 -0
  16. package/esm/VerticalTab/subComponent/TabContext.js +3 -0
  17. package/esm/alert/Alert.js +22 -0
  18. package/esm/alert/index.js +1 -0
  19. package/esm/animate/Collapse.js +65 -0
  20. package/esm/animate/Loader.js +51 -0
  21. package/esm/animate/NumberCounter.js +45 -0
  22. package/esm/animate/PulseRing.js +26 -0
  23. package/esm/animate/Spinner.js +11 -0
  24. package/esm/animate/index.js +5 -0
  25. package/esm/assets/css/autocomplete.css +16 -0
  26. package/esm/assets/css/font.css +4 -0
  27. package/esm/assets/css/global.css +2 -0
  28. package/esm/assets/font/helvetica/Helvetica.ttf +0 -0
  29. package/esm/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
  30. package/esm/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
  31. package/esm/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
  32. package/esm/assets/icons/app-management.png +0 -0
  33. package/esm/assets/icons/burger-black.png +0 -0
  34. package/esm/assets/icons/burger-white.png +0 -0
  35. package/esm/assets/icons/burger.png +0 -0
  36. package/esm/assets/icons/file.svg +1 -0
  37. package/esm/assets/icons/map_icon1.png +0 -0
  38. package/esm/assets/icons/map_icon4.png +0 -0
  39. package/esm/assets/images/bg-aside.png +0 -0
  40. package/esm/assets/images/bg-chart-circle.png +0 -0
  41. package/esm/assets/images/bg-chart-triangle.png +0 -0
  42. package/esm/assets/images/cashub-logo-only.png +0 -0
  43. package/esm/assets/images/default-user.jpg +0 -0
  44. package/esm/assets/images/logo-cashub.png +0 -0
  45. package/esm/assets/images/map.png +0 -0
  46. package/esm/assets/images/qrcode.png +0 -0
  47. package/esm/backdrop/BaseBackdrop.js +11 -0
  48. package/esm/backdrop/LoadingBackdrop.js +10 -0
  49. package/esm/backdrop/ModalBackdrop.js +8 -0
  50. package/esm/backdrop/index.js +3 -0
  51. package/esm/badge/Badge.js +19 -0
  52. package/esm/badge/BadgeDot.js +11 -0
  53. package/esm/badge/BadgeFill.js +42 -0
  54. package/esm/badge/BadgeFillTriangle.js +138 -0
  55. package/esm/badge/BadgeWithText.js +24 -0
  56. package/esm/badge/index.js +5 -0
  57. package/esm/billing/BarChart.js +45 -0
  58. package/esm/billing/Grid.js +38 -0
  59. package/esm/billing/Header2.js +19 -0
  60. package/esm/billing/Header3.js +31 -0
  61. package/esm/billing/Paragraph.js +27 -0
  62. package/esm/billing/ParagraphGroup.js +16 -0
  63. package/esm/billing/ParagraphText.js +20 -0
  64. package/esm/billing/Section.js +44 -0
  65. package/esm/billing/SectionBody.js +11 -0
  66. package/esm/billing/SectionHeader.js +20 -0
  67. package/esm/billing/__stories__/BarChart.stories.js_bak +46 -0
  68. package/esm/billing/__stories__/Grid.stories.js_bak +57 -0
  69. package/esm/billing/__stories__/Header2.stories.js_bak +62 -0
  70. package/esm/billing/__stories__/Header3.stories.js_bak +69 -0
  71. package/esm/billing/__stories__/Paragraph.stories.js_bak +84 -0
  72. package/esm/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
  73. package/esm/billing/__stories__/ParagraphText.stories.js_bak +64 -0
  74. package/esm/billing/__stories__/Section.stories.js_bak +115 -0
  75. package/esm/billing/__stories__/SectionBody.stories.js_bak +62 -0
  76. package/esm/billing/__stories__/SectionHeader.stories.js-bak +68 -0
  77. package/esm/breadcrumb/Breadcrumb.js +71 -0
  78. package/esm/breadcrumb/index.js +1 -0
  79. package/esm/button/Button.js +145 -0
  80. package/esm/button/ButtonGroup.js +54 -0
  81. package/esm/button/IconButton.js +64 -0
  82. package/esm/button/ScrollToTopButton.js +47 -0
  83. package/esm/button/index.js +4 -0
  84. package/esm/callout/Callout.js +45 -0
  85. package/esm/callout/index.js +1 -0
  86. package/esm/chart/BarChart.js +147 -0
  87. package/esm/chart/DoughnutChart.js +110 -0
  88. package/esm/chart/LineChart.js +140 -0
  89. package/esm/chart/SingleBarChart.js +35 -0
  90. package/esm/chart/index.js +5 -0
  91. package/esm/chart/utils/centerTextPlugin.js +56 -0
  92. package/esm/chart/utils/customTooltip.js +84 -0
  93. package/esm/chart/utils/customTooltipLifecyclePlugin.js +16 -0
  94. package/esm/chart/utils/htmlLegendPlugin.js +83 -0
  95. package/esm/chart/utils/index.js +3 -0
  96. package/esm/chart/utils/padEmptyChartBar.js +47 -0
  97. package/esm/chart/utils/tooltipElement.js +17 -0
  98. package/esm/chart/utils/xAxisLabelTooltipPlugin.js +101 -0
  99. package/esm/chart/utils/yAxisTopTitlePlugin.js +43 -0
  100. package/esm/container/FlexContainer.js +33 -0
  101. package/esm/container/index.js +1 -0
  102. package/esm/cropper/Cropper.js +47 -0
  103. package/esm/cropper/CropperModalHandler.js +34 -0
  104. package/esm/cropper/index.js +2 -0
  105. package/esm/cropper/subComponent/CropImageModal.js +72 -0
  106. package/{datetimePicker/DatetimePicker.js → esm/datetimePicker/DatetimePickerV3.js} +63 -31
  107. package/esm/datetimePicker/TimeInput.js +49 -0
  108. package/esm/datetimePicker/TimePickerStyle.js +58 -0
  109. package/esm/datetimePicker/TimePickerV2.js +199 -0
  110. package/esm/datetimePicker/accordion/Month.js +245 -0
  111. package/esm/datetimePicker/accordion/Year.js +275 -0
  112. package/esm/datetimePicker/index.js +4 -0
  113. package/esm/datetimePicker/provider/constant.js +38 -0
  114. package/esm/datetimePicker/subComponent/DateTimePickerContext.js +3 -0
  115. package/esm/datetimePicker/utils/GMTDate.js +9 -0
  116. package/esm/datetimePicker/utils/pad.js +7 -0
  117. package/esm/datetimePicker/utils/toUTC0.js +7 -0
  118. package/esm/descriptionList/DescriptionDetail.js +21 -0
  119. package/esm/descriptionList/DescriptionList.js +18 -0
  120. package/esm/descriptionList/DescriptionTerm.js +7 -0
  121. package/esm/descriptionList/index.js +3 -0
  122. package/esm/divider/Divider.js +24 -0
  123. package/esm/divider/index.js +1 -0
  124. package/esm/dropdown/Dropdown.js +48 -0
  125. package/esm/dropdown/DropdownButtonOption.js +36 -0
  126. package/esm/dropdown/DropdownContent.js +83 -0
  127. package/esm/dropdown/DropdownDivOption.js +19 -0
  128. package/esm/dropdown/DropdownItem.js +19 -0
  129. package/esm/dropdown/DropdownLinkOption.js +17 -0
  130. package/esm/dropdown/DropdownToggle.js +31 -0
  131. package/esm/dropdown/index.js +11 -0
  132. package/esm/dropdown/subComponent/DropdownContext.js +3 -0
  133. package/esm/dropzone/FileDropzone.js +472 -0
  134. package/esm/dropzone/ImageDropzone.js +327 -0
  135. package/esm/dropzone/index.js +2 -0
  136. package/esm/dropzone/subComponent/Message.js +19 -0
  137. package/esm/figure/IconFigure.js +35 -0
  138. package/esm/figure/ImageFigure.js +31 -0
  139. package/esm/figure/index.js +2 -0
  140. package/esm/file/HiddenFileInput.js +8 -0
  141. package/esm/file/index.js +1 -0
  142. package/esm/form/Checkbox.js +157 -0
  143. package/esm/form/Fieldset.js +11 -0
  144. package/esm/form/FormItem.js +15 -0
  145. package/esm/form/Input.js +59 -0
  146. package/esm/form/Label.js +54 -0
  147. package/esm/form/MutedText.js +14 -0
  148. package/esm/form/PasswordInput.js +40 -0
  149. package/esm/form/RadioButton.js +94 -0
  150. package/esm/form/SearchSelect.js +174 -0
  151. package/esm/form/Searchbox.js +91 -0
  152. package/esm/form/Slider.js +39 -0
  153. package/esm/form/SwitchButton.js +97 -0
  154. package/esm/form/Textarea.js +34 -0
  155. package/esm/form/TreeView.js +66 -0
  156. package/esm/form/index.js +14 -0
  157. package/esm/grid/Column.js +39 -0
  158. package/esm/grid/Grid.js +28 -0
  159. package/esm/grid/index.js +2 -0
  160. package/esm/heading/Heading1.js +14 -0
  161. package/esm/heading/Heading2.js +21 -0
  162. package/esm/heading/Heading3.js +42 -0
  163. package/esm/heading/index.js +3 -0
  164. package/esm/helmet/Helmet.js +17 -0
  165. package/esm/helmet/index.js +3 -0
  166. package/esm/iconbox/ApplicationIconBox.js +74 -0
  167. package/esm/iconbox/IconBox.js +60 -0
  168. package/esm/iconbox/IconBoxV2.js +63 -0
  169. package/esm/iconbox/index.js +3 -0
  170. package/esm/iconbox/subComponent/IconBoxFigure.js +43 -0
  171. package/esm/iconbox/subComponent/IconBoxImage.js +35 -0
  172. package/esm/image/ImageFluid.js +10 -0
  173. package/esm/image/UploadImage.js +243 -0
  174. package/esm/image/index.js +2 -0
  175. package/esm/index.js +47 -0
  176. package/esm/keyframe/Pulse.js +15 -0
  177. package/esm/keyframe/Spin.js +7 -0
  178. package/esm/layout/Aside.js +39 -0
  179. package/esm/layout/AsideHeader.jsx +27 -0
  180. package/esm/layout/Backdrop.js +16 -0
  181. package/esm/layout/Container.js +30 -0
  182. package/esm/layout/Footer.js +36 -0
  183. package/esm/layout/Header.jsx +55 -0
  184. package/esm/layout/Layout.jsx +84 -0
  185. package/esm/layout/Logo.jsx +17 -0
  186. package/esm/layout/MenuIcon.jsx +27 -0
  187. package/esm/layout/Sidebar.jsx +271 -0
  188. package/esm/layout/index.js +1 -0
  189. package/esm/link/LinkSpan.js +62 -0
  190. package/esm/link/index.js +1 -0
  191. package/esm/map/GoogleMap.js +439 -0
  192. package/esm/map/GoogleReverseGeolocation.js +193 -0
  193. package/esm/map/LeafletMap.js +224 -0
  194. package/esm/map/LeafletReverseGeolocation.js +94 -0
  195. package/esm/map/index.js +4 -0
  196. package/esm/map/subComponent/BasicLeafletMap.js +27 -0
  197. package/esm/map/subComponent/GoogleMapContainer.js +22 -0
  198. package/esm/map/subComponent/GoogleMapPopup.js +103 -0
  199. package/esm/map/subComponent/GoogleMapWrapper.js +34 -0
  200. package/esm/map/subComponent/LeafletDrawControl.js +116 -0
  201. package/esm/map/subComponent/LeafletMapContainer.js +166 -0
  202. package/esm/map/subComponent/MapSearchBoxControl.js +47 -0
  203. package/esm/modal/StateModal.js +169 -0
  204. package/esm/modal/TitleModal.js +241 -0
  205. package/esm/modal/index.js +2 -0
  206. package/esm/page/Disclaimer.js +121 -0
  207. package/esm/page/index.js +1 -0
  208. package/esm/paginate/Paginate.js +129 -0
  209. package/esm/paginate/index.js +1 -0
  210. package/esm/popover/Popover.js +82 -0
  211. package/esm/popover/index.js +1 -0
  212. package/esm/qrcode/QRCode.js +51 -0
  213. package/esm/qrcode/QRCodeContainter.js +27 -0
  214. package/esm/qrcode/index.js +2 -0
  215. package/esm/ribbon/Ribbon.js +35 -0
  216. package/esm/ribbon/index.js +1 -0
  217. package/esm/section/Section.js +126 -0
  218. package/esm/section/SectionBody.js +43 -0
  219. package/esm/section/SectionHeader.js +61 -0
  220. package/esm/section/SectionToolbar.js +11 -0
  221. package/esm/section/SectionToolbarItem.js +10 -0
  222. package/esm/section/index.js +5 -0
  223. package/esm/select/InputSelect.js +263 -0
  224. package/esm/select/Select.js +811 -0
  225. package/esm/select/index.js +2 -0
  226. package/esm/select/subComponent/Checkbox.js +40 -0
  227. package/esm/select/subComponent/Footer.js +6 -0
  228. package/esm/select/subComponent/ListBox.js +23 -0
  229. package/esm/select/subComponent/Option.js +37 -0
  230. package/esm/select/subComponent/OptionGroup.js +16 -0
  231. package/esm/select/subComponent/Options.js +25 -0
  232. package/esm/select/subComponent/SearchBox.js +51 -0
  233. package/esm/select/subComponent/SelectedMultipleCount.js +32 -0
  234. package/esm/select/subComponent/SelectedMultipleTags.js +47 -0
  235. package/esm/select/subComponent/SelectedMultipleText.js +63 -0
  236. package/esm/select/subComponent/SelectedSingle.js +10 -0
  237. package/esm/styles/GlobalStyle.js +328 -0
  238. package/esm/styles/config/breakpoint.style.js +7 -0
  239. package/esm/styles/config/header.style.js +4 -0
  240. package/esm/styles/config/sidebar.style.js +11 -0
  241. package/esm/styles/index.js +2 -0
  242. package/esm/styles/mixin/backgroundColor.js +38 -0
  243. package/esm/styles/mixin/borderColor.js +31 -0
  244. package/esm/styles/mixin/color.js +31 -0
  245. package/esm/styles/mixin/colorOnBackground.js +31 -0
  246. package/esm/styles/mixin/inputPlaceholder.js +24 -0
  247. package/esm/styles/mixin/media.js +15 -0
  248. package/esm/styles/mixin/rounded.js +24 -0
  249. package/esm/styles/mixin/scrollbar.js +26 -0
  250. package/esm/styles/theme/dark.theme.js +91 -0
  251. package/esm/styles/theme/light.theme.js +91 -0
  252. package/esm/styles/theme/white.theme.js +91 -0
  253. package/esm/styles/themes.js +9 -0
  254. package/esm/table/GridTable.js +329 -0
  255. package/esm/table/ImageBox.js +38 -0
  256. package/esm/table/InfiniteGridTable.js +396 -0
  257. package/esm/table/PermissionTable.js +57 -0
  258. package/esm/table/SimpleGridTable.js +136 -0
  259. package/esm/table/Table.js +559 -0
  260. package/esm/table/__mock__/columns.js +64 -0
  261. package/esm/table/__mock__/data.js +530 -0
  262. package/esm/table/hooks/index.js +2 -0
  263. package/esm/table/hooks/useCalculateDataRange.js +22 -0
  264. package/esm/table/hooks/useGenerateSort.js +32 -0
  265. package/esm/table/index.js +6 -0
  266. package/esm/table/subComponent/BaseTableHeadCell.js +54 -0
  267. package/esm/table/subComponent/GridTableFooter.js +17 -0
  268. package/esm/table/subComponent/GridTableHeadCell.js +13 -0
  269. package/esm/table/subComponent/Resizer.js +70 -0
  270. package/esm/table/subComponent/TableFooter.js +24 -0
  271. package/esm/table/subComponent/TableFooterInfo.js +6 -0
  272. package/esm/table/subComponent/TableFooterPager.js +26 -0
  273. package/esm/table/subComponent/TableHeadCell.js +12 -0
  274. package/esm/table/subComponent/TableSort.js +31 -0
  275. package/esm/tagify/TagifyStyle.js +54 -0
  276. package/esm/tagify/Tags.js +49 -0
  277. package/esm/tagify/index.js +3 -0
  278. package/esm/tagify/templates/getCreateButtonTemplate.js +12 -0
  279. package/esm/text/Paragraph.js +79 -0
  280. package/esm/text/index.js +1 -0
  281. package/esm/timeline/Timeline.js +132 -0
  282. package/esm/timeline/index.js +1 -0
  283. package/esm/toast/CustomToastContainer.js +38 -0
  284. package/esm/toast/MessageContainer.js +44 -0
  285. package/esm/toast/index.js +3 -0
  286. package/esm/toast/show.js +29 -0
  287. package/esm/toast/style.css +1 -0
  288. package/esm/tooltip/Tooltip.js +133 -0
  289. package/esm/tooltip/index.js +1 -0
  290. package/esm/treeView/TreeViewV2.js +32 -0
  291. package/esm/treeView/TreeflexStyle.js +43 -0
  292. package/esm/treeView/index.js +2 -0
  293. package/esm/wizard/Wizard.js +244 -0
  294. package/esm/wizard/index.js +1 -0
  295. package/helmet/index.js +3 -7
  296. package/index.js +0 -12
  297. package/layout/Sidebar.jsx +1 -1
  298. package/package.json +5 -4
  299. package/datetimePicker/DatePicker.js +0 -363
  300. package/datetimePicker/DatePickerV2.js +0 -407
  301. package/datetimePicker/DatetimePickerV2.js +0 -395
  302. package/datetimePicker/TimePicker.js +0 -317
  303. package/datetimePicker/hooks/index.js +0 -27
  304. package/datetimePicker/hooks/useChangeNumber.js +0 -42
  305. package/datetimePicker/hooks/useDecrease.js +0 -38
  306. package/datetimePicker/hooks/useIncrease.js +0 -38
  307. package/datetimePicker/subComponent/Accordion.js +0 -373
  308. package/datetimePicker/subComponent/CustomTimeInput.js +0 -47
  309. package/jsoneditor/JsonEditor.js +0 -142
  310. package/jsoneditor/index.js +0 -13
@@ -1,395 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- var _reactI18next = require("react-i18next");
9
- var _reactOutsideClickHandler = _interopRequireDefault(require("react-outside-click-handler"));
10
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
- var _hooks = require("@cashub/hooks");
12
- var _utils = require("@cashub/utils");
13
- var _DateTimePickerContext = _interopRequireDefault(require("./subComponent/DateTimePickerContext"));
14
- var _Button = _interopRequireDefault(require("../button/Button"));
15
- var _Input = _interopRequireDefault(require("../form/Input"));
16
- var _Month = _interopRequireDefault(require("./accordion/Month"));
17
- var _Year = _interopRequireDefault(require("./accordion/Year"));
18
- var _TimePicker = _interopRequireDefault(require("./TimePicker"));
19
- var _GMTDate = _interopRequireDefault(require("./utils/GMTDate"));
20
- var _jsxRuntime = require("react/jsx-runtime");
21
- 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); }
22
- 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; }
23
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
24
- const DatetimePickerV2 = _ref => {
25
- let {
26
- selected,
27
- fixedYear,
28
- minDate,
29
- maxDate,
30
- onConfirm,
31
- disabled,
32
- onBlur
33
- } = _ref;
34
- const {
35
- t
36
- } = (0, _reactI18next.useTranslation)();
37
- const [toggleElement, setToggleElement] = (0, _react.useState)(null);
38
- const [contentElement, setContentElement] = (0, _react.useState)(null);
39
- const [inputValue, setInputValue] = (0, _react.useState)(selected ? (0, _utils.datetimeTFormat)(selected) : '');
40
- const [selectedDate, setSelectedDate] = (0, _react.useState)(selected ? (0, _utils.datetimeTFormat)((0, _GMTDate.default)(selected)) : (0, _utils.datetimeTFormat)((0, _GMTDate.default)(new Date())));
41
- const [confirmDate, setConfirmDate] = (0, _react.useState)(selected ? (0, _utils.datetimeTFormat)(selected) : '');
42
- const [displayPicker, setDisplayPicker] = (0, _react.useState)(false);
43
- const [time, setTime] = (0, _react.useState)(() => {
44
- const date = new Date((0, _utils.datetimeTFormat)(selected ? selected : (0, _utils.formatDate)(new Date())));
45
- if (!selected) date.setHours(0, 0, 0, 0);
46
- return `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
47
- });
48
- const [accordionCurrentDisplayType, setAccordionCurrentDisplayType] = (0, _react.useState)(null);
49
- const {
50
- styles,
51
- attributes,
52
- state,
53
- update
54
- } = (0, _hooks.useCustomPopper)(toggleElement, contentElement, {
55
- strategy: 'absolute',
56
- placement: 'bottom-start'
57
- });
58
- const context = {
59
- fixedYear,
60
- minDate,
61
- maxDate,
62
- selectedDate,
63
- setSelectedDate,
64
- setAccordionCurrentDisplayType
65
- };
66
- const handleToggle = () => {
67
- if (displayPicker && onBlur) {
68
- onBlur();
69
- }
70
- setDisplayPicker(!displayPicker);
71
- update();
72
- };
73
- const handleDisplayAccordionContent = (0, _react.useCallback)(type => {
74
- if (accordionCurrentDisplayType === type) {
75
- setAccordionCurrentDisplayType(null);
76
- } else {
77
- setAccordionCurrentDisplayType(type);
78
- }
79
- }, [accordionCurrentDisplayType]);
80
- const handleConfirm = (0, _react.useCallback)(() => {
81
- if (!confirmDate) return;
82
- setSelectedDate(confirmDate);
83
- onConfirm(inputValue);
84
- setDisplayPicker(false);
85
- setAccordionCurrentDisplayType(null);
86
- if (displayPicker && onBlur) {
87
- onBlur();
88
- }
89
- }, [confirmDate, inputValue, onConfirm, onBlur, displayPicker]);
90
- const handleChangeDate = (0, _react.useCallback)((daysOfMonthForSelectedDate, firstWeekOfMonth, dayIndex, day) => {
91
- const date = new Date(selectedDate);
92
- // 先把日期設定成所有月分都有的日期,設定月份時才不會設定到非預期的date
93
- date.setDate(1);
94
- const selectedYear = date.getFullYear();
95
- const selectedMonth = date.getMonth();
96
- if (!fixedYear) {
97
- if (dayIndex < firstWeekOfMonth && selectedYear >= 1) {
98
- if (selectedMonth === 0) {
99
- date.setFullYear(selectedYear - 1);
100
- date.setMonth(11);
101
- } else {
102
- date.setMonth(selectedMonth - 1);
103
- }
104
- } else if (dayIndex >= daysOfMonthForSelectedDate + firstWeekOfMonth) {
105
- if (selectedMonth === 11) {
106
- date.setFullYear(selectedYear + 1);
107
- date.setMonth(0);
108
- } else {
109
- date.setMonth(selectedMonth + 1);
110
- }
111
- }
112
- date.setDate(day);
113
- setSelectedDate((0, _utils.datetimeTFormat)(date));
114
- setConfirmDate((0, _utils.datetimeTFormat)(date));
115
- } else if (fixedYear) {
116
- if (dayIndex < firstWeekOfMonth) {
117
- if (selectedMonth === 0) {
118
- return;
119
- }
120
- date.setMonth(selectedMonth - 1);
121
- } else if (dayIndex >= daysOfMonthForSelectedDate + firstWeekOfMonth) {
122
- if (selectedMonth === 11) {
123
- return;
124
- }
125
- date.setMonth(selectedMonth + 1);
126
- }
127
- date.setDate(day);
128
- setSelectedDate((0, _utils.datetimeTFormat)(date));
129
- setConfirmDate((0, _utils.datetimeTFormat)(date));
130
- }
131
- }, [fixedYear, selectedDate]);
132
- const handleDisabled = (0, _react.useCallback)((firstWeekOfMonth, lastWeekOfMonth, daysOfMonthForSelectedDate, dayIndex, day) => {
133
- let [year, month] = selectedDate.split('-');
134
- if (year === '0001' && month === '01' && firstWeekOfMonth >= dayIndex + 1) {
135
- return true;
136
- }
137
- let myDay = day.toString();
138
- if (myDay.length === 1) myDay = `0${myDay}`;
139
- if (fixedYear) {
140
- if (month === '01' && dayIndex + 1 <= firstWeekOfMonth) {
141
- // disabledDateInJan
142
- return dayIndex < firstWeekOfMonth;
143
- } else if (month === '12' && day + firstWeekOfMonth < dayIndex + 1) {
144
- // disabledDateInDec
145
- return dayIndex >= daysOfMonthForSelectedDate + firstWeekOfMonth;
146
- }
147
- }
148
- if (month === '01' && firstWeekOfMonth !== 0 && dayIndex + 1 <= firstWeekOfMonth) {
149
- year = (+year - 1).toString();
150
- } else if (month === '12' && lastWeekOfMonth !== 6 && day + firstWeekOfMonth < dayIndex + 1) {
151
- year = (+year + 1).toString();
152
- }
153
- month = firstWeekOfMonth >= dayIndex + 1 ? +month - 1 : daysOfMonthForSelectedDate + firstWeekOfMonth < dayIndex + 1 ? +month + 1 : +month;
154
- if (month === 0) {
155
- month = 12;
156
- } else if (month === 13) {
157
- month = 1;
158
- }
159
- if (year.length === 1) year = `000${year}`;
160
- if (year.length === 2) year = `00${year}`;
161
- if (year.length === 3) year = `0${year}`;
162
- if (month.toString().length === 1) month = `0${month}`;else month = month.toString();
163
- const compareMinDateDate = (0, _utils.formatDate)((0, _utils.datetimeTFormat)(new Date((0, _GMTDate.default)((0, _utils.formatDate)(new Date(`${year}-${month}-${myDay}`)), 'date')).setHours(23, 59, 59, 59)));
164
- const compareMaxDateDate = (0, _utils.formatDate)((0, _utils.datetimeTFormat)(new Date((0, _GMTDate.default)((0, _utils.formatDate)(new Date(`${year}-${month}-${myDay}`)), 'date')).setHours(0, 0, 0, 0)));
165
- if (minDate && !maxDate && minDate > compareMinDateDate) {
166
- return true;
167
- }
168
- if (maxDate && !minDate && maxDate < compareMaxDateDate) {
169
- return true;
170
- }
171
- if (maxDate && minDate && (minDate > compareMinDateDate || maxDate < compareMaxDateDate)) {
172
- return true;
173
- }
174
- return false;
175
- }, [fixedYear, minDate, maxDate, selectedDate]);
176
- const handleSelectedDay = (0, _react.useCallback)((day, index, firstWeekOfMonth, lastWeekOfMonth, totalDays) => {
177
- const selectedDateObj = new Date(selectedDate);
178
- const confirmDateObj = new Date(confirmDate);
179
- if (confirmDateObj.getFullYear() === selectedDateObj.getFullYear() && confirmDateObj.getMonth() === selectedDateObj.getMonth() && confirmDateObj.getDate() === day) {
180
- if (index + 1 > firstWeekOfMonth && index < totalDays - (6 - lastWeekOfMonth)) {
181
- return true;
182
- }
183
- return false;
184
- }
185
- return false;
186
- }, [selectedDate, confirmDate]);
187
- const days = (0, _react.useMemo)(() => {
188
- let date = new Date(selectedDate);
189
- // 先把日期設定成所有月分都有的日期,設定月份時才不會設定到非預期的date
190
- date.setDate(1);
191
- date.setMonth(date.getMonth() + 1);
192
- date.setDate(0);
193
- const daysOfMonthForSelectedDate = date.getDate();
194
- date = new Date(selectedDate);
195
- date.setMonth(date.getMonth() + 1 - 1);
196
- date.setDate(0);
197
- const daysOfPrevioueMonthForSelectedDate = date.getDate();
198
- date = new Date(selectedDate);
199
- // 先把日期設定成所有月分都有的日期,設定月份時才不會設定到非預期的date
200
- date.setDate(1);
201
- const firstWeekOfMonth = date.getDay();
202
- date = new Date(selectedDate);
203
- // 先把日期設定成所有月分都有的日期,設定月份時才不會設定到非預期的date
204
- date.setDate(1);
205
- date.setMonth(date.getMonth() + 1);
206
- date.setDate(0);
207
- const lastWeekOfMonth = date.getDay();
208
- const days = [];
209
- for (const day of [...Array(daysOfMonthForSelectedDate).keys()]) {
210
- days.push(day + 1);
211
- }
212
- if (firstWeekOfMonth !== 0) {
213
- for (let index = daysOfPrevioueMonthForSelectedDate; index > daysOfPrevioueMonthForSelectedDate - firstWeekOfMonth; index -= 1) {
214
- if (date.getFullYear() === 1 && date.getMonth() === 0) {
215
- days.unshift(null);
216
- } else {
217
- days.unshift(index);
218
- }
219
- }
220
- }
221
- if (lastWeekOfMonth !== 6) {
222
- for (let index = 1; index <= 6 - lastWeekOfMonth; index += 1) {
223
- days.push(index);
224
- }
225
- }
226
- return days.map((day, index, arr) => {
227
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Day, {
228
- disabled: handleDisabled(firstWeekOfMonth, lastWeekOfMonth, daysOfMonthForSelectedDate, index, day),
229
- onClick: () => {
230
- handleChangeDate(daysOfMonthForSelectedDate, firstWeekOfMonth, index, day);
231
- },
232
- selected: handleSelectedDay(day, index, firstWeekOfMonth, lastWeekOfMonth, arr.length, daysOfMonthForSelectedDate),
233
- children: day
234
- }, index);
235
- });
236
- }, [selectedDate, handleChangeDate, handleSelectedDay, handleDisabled]);
237
- const weeks = (0, _react.useMemo)(() => {
238
- return ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'].map(week => /*#__PURE__*/(0, _jsxRuntime.jsx)(Week, {
239
- children: week
240
- }, week));
241
- }, []);
242
- (0, _react.useEffect)(() => {
243
- if (!selected) return;
244
- const date = (0, _utils.datetimeTFormat)(selected);
245
- const [, time] = date.split('T');
246
- setSelectedDate(date);
247
- setConfirmDate(date);
248
- setTime(time);
249
- }, [selected]);
250
- (0, _react.useEffect)(() => {
251
- if (!confirmDate) return;
252
- const date = (0, _utils.formatDate)(confirmDate, 'date');
253
- setInputValue(`${date} ${time}`);
254
- }, [confirmDate, time]);
255
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DateTimePickerContext.default.Provider, {
256
- value: context,
257
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactOutsideClickHandler.default, {
258
- onOutsideClick: handleConfirm,
259
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(PickerInput, {
260
- ref: setToggleElement,
261
- value: inputValue,
262
- onClick: handleToggle,
263
- readOnly: true,
264
- disabled: disabled
265
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
266
- ...attributes.popper,
267
- style: styles.popper,
268
- placement: state && state.placement,
269
- ref: setContentElement,
270
- displayPicker: displayPicker,
271
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Body, {
272
- accordionCurrentDisplayType: accordionCurrentDisplayType,
273
- children: [!fixedYear && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Year.default, {
274
- expand: accordionCurrentDisplayType === 'year',
275
- handleDisplayAccordionContent: () => {
276
- handleDisplayAccordionContent('year');
277
- }
278
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Month.default, {
279
- expand: accordionCurrentDisplayType === 'month',
280
- handleDisplayAccordionContent: () => {
281
- handleDisplayAccordionContent('month');
282
- },
283
- confirmDate: confirmDate
284
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(DateContent, {
285
- children: [weeks, days]
286
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TimePicker.default, {
287
- value: time,
288
- onChange: setTime
289
- })]
290
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Footer, {
291
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ConfirmButton, {
292
- fullWidth: true,
293
- alignCenter: true,
294
- onClick: handleConfirm,
295
- children: t('Confirm')
296
- })
297
- })]
298
- })]
299
- })
300
- });
301
- };
302
- const Wrapper = _styledComponents.default.div`
303
- padding-bottom: var(--spacing-s);
304
- background: var(--color-background1);
305
- border-radius: var(--border-radius);
306
- border: var(--border-width) solid var(--border-color);
307
- box-shadow: var(--box-shadow);
308
- overflow: hidden;
309
- width: 286px;
310
- z-index: 1;
311
- color: var(--font-on-background);
312
-
313
- display: ${_ref2 => {
314
- let {
315
- displayPicker
316
- } = _ref2;
317
- return displayPicker ? 'block' : 'none';
318
- }};
319
- `;
320
- const Week = _styledComponents.default.div`
321
- height: 36px;
322
- width: calc(100% / 7);
323
- border-radius: var(--border-radius-s);
324
- line-height: 36px;
325
- text-align: center;
326
- `;
327
- const Body = _styledComponents.default.div`
328
- ${_ref3 => {
329
- let {
330
- accordionCurrentDisplayType
331
- } = _ref3;
332
- return accordionCurrentDisplayType && (0, _styledComponents.css)`
333
- height: 216px;
334
- `;
335
- }}
336
-
337
- overflow: hidden;
338
- padding: ${_ref4 => {
339
- let {
340
- accordionCurrentDisplayType
341
- } = _ref4;
342
- return accordionCurrentDisplayType === 'year' ? ' 0 4px var(--spacing-s) var(--spacing-s)' : '0 var(--spacing-s) 0 var(--spacing-s)';
343
- }};
344
- `;
345
- const Footer = _styledComponents.default.div`
346
- padding: 0 var(--spacing-s);
347
- `;
348
- const PickerInput = (0, _styledComponents.default)(_Input.default)`
349
- &:disabled {
350
- cursor: not-allowed;
351
- opacity: 0.5;
352
- }
353
- `;
354
- const Day = _styledComponents.default.button`
355
- width: calc(100% / 7);
356
- height: 36px;
357
- border-radius: var(--border-radius-s);
358
- line-height: 36px;
359
- text-align: center;
360
- padding: 0;
361
- border: 0;
362
- background: var(--color-background1);
363
- color: var(--font-on-background);
364
- &:hover {
365
- background: var(--color-primary);
366
- }
367
-
368
- ${_ref5 => {
369
- let {
370
- selected
371
- } = _ref5;
372
- return selected && 'background: var(--color-hover);';
373
- }}
374
-
375
- ${_ref6 => {
376
- let {
377
- disabled
378
- } = _ref6;
379
- return disabled && (0, _styledComponents.css)`
380
- color: var(--font-on-mute);
381
- background: none;
382
- &:hover {
383
- background: none;
384
- }
385
- `;
386
- }}
387
- `;
388
- const ConfirmButton = (0, _styledComponents.default)(_Button.default)`
389
- margin: 16px auto 0;
390
- `;
391
- const DateContent = _styledComponents.default.div`
392
- display: flex;
393
- flex-wrap: wrap;
394
- `;
395
- var _default = exports.default = DatetimePickerV2;
@@ -1,317 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- var _fa = require("react-icons/fa");
9
- var _moment = _interopRequireDefault(require("moment"));
10
- var _styledComponents = _interopRequireDefault(require("styled-components"));
11
- var _lodash = _interopRequireDefault(require("lodash.uniqueid"));
12
- var _utils = require("@cashub/utils");
13
- var _hooks = require("./hooks");
14
- var _pad = _interopRequireDefault(require("./utils/pad"));
15
- var _jsxRuntime = require("react/jsx-runtime");
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- const LENGTH = 2;
18
- const PAD_STRING = '0';
19
- const TimePicker = _ref => {
20
- let {
21
- labelName = 'Time',
22
- value,
23
- onChange,
24
- showSecond = true
25
- } = _ref;
26
- const [hourId] = (0, _react.useState)((0, _lodash.default)('hour-'));
27
- const [time, setTime] = (0, _react.useState)(() => {
28
- let time = (0, _moment.default)(value, 'HH:mm:ss');
29
-
30
- // use current time when time value is invalid
31
- if (!value || !time.isValid()) {
32
- time = (0, _moment.default)();
33
- }
34
- return {
35
- hour: (0, _pad.default)(time.hour(), LENGTH, PAD_STRING),
36
- minute: (0, _pad.default)(time.minute(), LENGTH, PAD_STRING),
37
- second: (0, _pad.default)(time.second(), LENGTH, PAD_STRING)
38
- };
39
- });
40
- (0, _react.useEffect)(() => {
41
- if (typeof onChange === 'function' && time.hour && time.minute && time.second) {
42
- onChange(`${time.hour}:${time.minute}:${time.second}`);
43
- }
44
- }, [onChange, time.hour, time.minute, time.second]);
45
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
46
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Label, {
47
- htmlFor: hourId,
48
- children: labelName
49
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Hour, {
50
- id: hourId,
51
- value: time.hour,
52
- setTime: setTime
53
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Minute, {
54
- value: time.minute,
55
- setTime: setTime
56
- }), showSecond === true && /*#__PURE__*/(0, _jsxRuntime.jsx)(Second, {
57
- value: time.second,
58
- setTime: setTime
59
- })]
60
- });
61
- };
62
- const Hour = _ref2 => {
63
- let {
64
- id,
65
- value,
66
- setTime
67
- } = _ref2;
68
- const NAME = 'hour';
69
- const MIN = 0;
70
- const MAX = 23;
71
- const increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
72
- name: NAME,
73
- length: LENGTH,
74
- padString: PAD_STRING
75
- });
76
- const decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
77
- name: NAME,
78
- length: LENGTH,
79
- padString: PAD_STRING
80
- });
81
- const changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
82
- const handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
83
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Section, {
84
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Input, {
85
- type: "text",
86
- id: id,
87
- maxLength: "2",
88
- value: value,
89
- onChange: event => {
90
- changeNumber(event.target.value);
91
- },
92
- onKeyUp: handleKeyUp,
93
- onBlur: event => {
94
- setTime(previous => {
95
- const newState = {
96
- ...previous
97
- };
98
- newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
99
- return newState;
100
- });
101
- }
102
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Stepper, {
103
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StepperButton, {
104
- onClick: increase,
105
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaAngleUp, {})
106
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StepperButton, {
107
- onClick: decrease,
108
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaAngleDown, {})
109
- })]
110
- })]
111
- });
112
- };
113
- const Minute = _ref3 => {
114
- let {
115
- value,
116
- setTime
117
- } = _ref3;
118
- const NAME = 'minute';
119
- const MIN = 0;
120
- const MAX = 59;
121
- const [minuteId] = (0, _react.useState)((0, _lodash.default)(`${NAME}-`));
122
- const increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
123
- name: NAME,
124
- length: LENGTH,
125
- padString: PAD_STRING
126
- });
127
- const decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
128
- name: NAME,
129
- length: LENGTH,
130
- padString: PAD_STRING
131
- });
132
- const changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
133
- const handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
134
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
135
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Delimiter, {
136
- children: ":"
137
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Section, {
138
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Input, {
139
- type: "text",
140
- id: minuteId,
141
- maxLength: "2",
142
- value: value,
143
- onChange: event => {
144
- changeNumber(event.target.value);
145
- },
146
- onKeyUp: handleKeyUp,
147
- onBlur: event => {
148
- setTime(previous => {
149
- const newState = {
150
- ...previous
151
- };
152
- newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
153
- return newState;
154
- });
155
- }
156
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Stepper, {
157
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StepperButton, {
158
- onClick: increase,
159
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaAngleUp, {})
160
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StepperButton, {
161
- onClick: decrease,
162
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaAngleDown, {})
163
- })]
164
- })]
165
- })]
166
- });
167
- };
168
- const Second = _ref4 => {
169
- let {
170
- value,
171
- setTime
172
- } = _ref4;
173
- const NAME = 'second';
174
- const MIN = 0;
175
- const MAX = 59;
176
- const [secondId] = (0, _react.useState)((0, _lodash.default)(`${NAME}-`));
177
- const increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
178
- name: NAME,
179
- length: LENGTH,
180
- padString: PAD_STRING
181
- });
182
- const decrease = (0, _hooks.useDecrease)(MIN, MAX, setTime, {
183
- name: NAME,
184
- length: LENGTH,
185
- padString: PAD_STRING
186
- });
187
- const changeNumber = (0, _hooks.useChangeNumber)(MIN, MAX, setTime, NAME);
188
- const handleKeyUp = useKeyUp(increase, decrease, MIN, MAX, setTime, NAME);
189
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
190
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Delimiter, {
191
- children: ":"
192
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Section, {
193
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Input, {
194
- type: "text",
195
- id: secondId,
196
- maxLength: "2",
197
- value: value,
198
- onChange: event => {
199
- changeNumber(event.target.value);
200
- },
201
- onKeyUp: handleKeyUp,
202
- onBlur: event => {
203
- setTime(previous => {
204
- const newState = {
205
- ...previous
206
- };
207
- newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
208
- return newState;
209
- });
210
- }
211
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Stepper, {
212
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StepperButton, {
213
- onClick: increase,
214
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaAngleUp, {})
215
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StepperButton, {
216
- onClick: decrease,
217
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaAngleDown, {})
218
- })]
219
- })]
220
- })]
221
- });
222
- };
223
- const useKeyUp = (increase, decrease, min, max, setState, name) => {
224
- return (0, _react.useCallback)(event => {
225
- const key = event.keyCode;
226
- switch (key) {
227
- case _utils.KEY_CODE.UP:
228
- increase();
229
- break;
230
- case _utils.KEY_CODE.DOWN:
231
- decrease();
232
- break;
233
- case _utils.KEY_CODE.HOME:
234
- setState(previous => {
235
- const newState = {
236
- ...previous
237
- };
238
- newState[name] = (0, _pad.default)(min, LENGTH, PAD_STRING);
239
- return newState;
240
- });
241
- break;
242
- case _utils.KEY_CODE.END:
243
- setState(previous => {
244
- const newState = {
245
- ...previous
246
- };
247
- newState[name] = (0, _pad.default)(max, LENGTH, PAD_STRING);
248
- return newState;
249
- });
250
- break;
251
- default:
252
- break;
253
- }
254
- }, [increase, decrease, min, max, setState, name]);
255
- };
256
- const Container = _styledComponents.default.div`
257
- display: flex;
258
- align-items: center;
259
- justify-content: center;
260
- `;
261
- const Label = _styledComponents.default.label`
262
- display: inline-block;
263
- color: var(--font-on-background);
264
- font-size: var(--font-body1);
265
- margin-right: 12px;
266
- `;
267
- const Section = _styledComponents.default.div`
268
- display: inline-flex;
269
- height: 36px;
270
- width: 56px;
271
- padding: calc(var(--spacing-xs) / 2) var(--spacing-xs);
272
- border: var(--border-width) solid var(--border-color);
273
- border-radius: var(--border-radius-s);
274
- background: transparent;
275
- color: var(--font-on-background);
276
- `;
277
- const Input = _styledComponents.default.input`
278
- width: calc(100% - 4px - 12px);
279
- border: none;
280
- background: transparent;
281
- color: inherit;
282
-
283
- &:focus {
284
- outline: none;
285
- }
286
- `;
287
- const StepperButton = _styledComponents.default.div.attrs(() => ({
288
- role: 'button'
289
- }))`
290
- width: 12px;
291
- height: 12px;
292
-
293
- > svg {
294
- width: 100%;
295
- height: 100%;
296
- vertical-align: top;
297
- }
298
-
299
- &:first-child {
300
- margin-bottom: 2px;
301
- }
302
-
303
- &:hover {
304
- color: var(--color-primary);
305
- }
306
- `;
307
- const Stepper = _styledComponents.default.div`
308
- margin-left: calc(var(--spacing-xs) / 2);
309
- `;
310
- const Delimiter = _styledComponents.default.span`
311
- display: inline-block;
312
- color: var(--font-on-background);
313
- font-size: var(--font-body1);
314
- width: 12px;
315
- text-align: center;
316
- `;
317
- var _default = exports.default = TimePicker;