@cashub/ui 0.48.6 → 0.48.7
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.
- package/Tab/TabList.js +26 -38
- package/Tab/TabPanel.js +20 -13
- package/Tab/TabTab.js +24 -36
- package/Tab/index.js +6 -3
- package/Tab/subComponent/TabListV2.js +18 -11
- package/Tab/subComponent/TabPanelV2.js +20 -16
- package/Tab/subComponent/TabTabV2.js +21 -33
- package/VerticalTab/TabList.js +18 -13
- package/VerticalTab/TabPanel.js +20 -16
- package/VerticalTab/TabTab.js +21 -40
- package/VerticalTab/VerticalTab.js +4 -8
- package/alert/Alert.js +5 -12
- package/animate/Collapse.js +7 -5
- package/animate/Loader.js +7 -18
- package/animate/PulseRing.js +5 -18
- package/animate/Spinner.js +3 -8
- package/backdrop/BaseBackdrop.js +3 -9
- package/backdrop/LoadingBackdrop.js +3 -7
- package/backdrop/ModalBackdrop.js +3 -5
- package/badge/Badge.js +3 -15
- package/badge/BadgeDot.js +3 -8
- package/badge/BadgeFill.js +6 -24
- package/badge/BadgeWithText.js +3 -13
- package/billing/BarChart.js +1 -1
- package/breadcrumb/Breadcrumb.js +3 -42
- package/button/Button.js +20 -88
- package/button/ButtonGroup.js +9 -33
- package/button/IconButton.js +10 -37
- package/button/ScrollToTopButton.js +4 -12
- package/callout/Callout.js +8 -37
- package/chart/BarChart.js +27 -22
- package/chart/DoughnutChart.js +20 -34
- package/chart/LineChart.js +21 -13
- package/chart/SingleBarChart.js +5 -22
- package/chart/utils/centerTextPlugin.js +2 -2
- package/chart/utils/customTooltip.js +8 -8
- package/chart/utils/htmlLegendPlugin.js +1 -1
- package/chart/utils/yAxisTopTitlePlugin.js +1 -1
- package/container/FlexContainer.js +7 -15
- package/cropper/Cropper.js +2 -1
- package/datetimePicker/DatePicker.js +26 -80
- package/datetimePicker/DatePickerV2.js +36 -95
- package/datetimePicker/DatetimePicker.js +11 -174
- package/datetimePicker/DatetimePickerV2.js +33 -87
- package/datetimePicker/DatetimePickerV3.js +11 -174
- package/datetimePicker/TimeInput.js +10 -35
- package/datetimePicker/TimePicker.js +22 -77
- package/datetimePicker/TimePickerStyle.js +3 -53
- package/datetimePicker/TimePickerV2.js +21 -54
- package/datetimePicker/accordion/Month.js +16 -93
- package/datetimePicker/accordion/Year.js +18 -96
- package/datetimePicker/hooks/useChangeNumber.js +6 -3
- package/datetimePicker/hooks/useDecrease.js +6 -3
- package/datetimePicker/hooks/useIncrease.js +6 -3
- package/datetimePicker/subComponent/Accordion.js +20 -101
- package/descriptionList/DescriptionDetail.js +4 -15
- package/descriptionList/DescriptionList.js +4 -12
- package/descriptionList/DescriptionTerm.js +3 -5
- package/divider/Divider.js +6 -15
- package/dropdown/DropdownButtonOption.js +6 -22
- package/dropdown/DropdownContent.js +15 -29
- package/dropdown/DropdownDivOption.js +3 -17
- package/dropdown/DropdownLinkOption.js +3 -14
- package/dropdown/DropdownToggle.js +15 -7
- package/dropzone/FileDropzone.js +22 -121
- package/dropzone/ImageDropzone.js +14 -83
- package/dropzone/subComponent/Message.js +4 -11
- package/figure/IconFigure.js +7 -16
- package/figure/ImageFigure.js +6 -19
- package/file/HiddenFileInput.js +3 -3
- package/form/Checkbox.js +13 -74
- package/form/Fieldset.js +3 -9
- package/form/FormItem.js +5 -10
- package/form/Input.js +7 -40
- package/form/Label.js +10 -34
- package/form/MutedText.js +4 -8
- package/form/PasswordInput.js +13 -20
- package/form/RadioButton.js +8 -55
- package/form/SearchSelect.js +12 -64
- package/form/Searchbox.js +19 -45
- package/form/Slider.js +10 -28
- package/form/SwitchButton.js +14 -48
- package/form/Textarea.js +3 -30
- package/form/TreeView.js +6 -13
- package/grid/Column.js +10 -23
- package/grid/Grid.js +6 -14
- package/heading/Heading1.js +4 -8
- package/heading/Heading2.js +5 -11
- package/heading/Heading3.js +8 -20
- package/iconbox/ApplicationIconBox.js +12 -48
- package/iconbox/IconBox.js +7 -31
- package/iconbox/IconBoxV2.js +8 -33
- package/iconbox/subComponent/IconBoxFigure.js +9 -17
- package/iconbox/subComponent/IconBoxImage.js +8 -21
- package/image/ImageFluid.js +3 -7
- package/image/UploadImage.js +18 -66
- package/jsoneditor/JsonEditor.js +15 -121
- package/keyframe/Pulse.js +3 -13
- package/keyframe/Spin.js +3 -5
- package/layout/Aside.js +5 -30
- package/layout/Backdrop.js +4 -8
- package/layout/Container.js +5 -21
- package/layout/Footer.js +7 -26
- package/link/LinkSpan.js +19 -37
- package/map/GoogleMap.js +7 -3
- package/map/GoogleReverseGeolocation.js +3 -6
- package/map/LeafletMap.js +2 -2
- package/map/subComponent/GoogleMapContainer.js +4 -16
- package/map/subComponent/GoogleMapPopup.js +10 -7
- package/map/subComponent/GoogleMapWrapper.js +15 -8
- package/map/subComponent/LeafletDrawControl.js +7 -9
- package/map/subComponent/LeafletMapContainer.js +4 -159
- package/modal/StateModal.js +28 -49
- package/modal/TitleModal.js +29 -70
- package/package.json +1 -1
- package/page/Disclaimer.js +3 -119
- package/paginate/Paginate.js +12 -54
- package/popover/Popover.js +25 -30
- package/qrcode/QRCode.js +6 -20
- package/qrcode/QRCodeContainter.js +4 -12
- package/ribbon/Ribbon.js +4 -29
- package/section/Section.js +20 -68
- package/section/SectionBody.js +8 -29
- package/section/SectionHeader.js +11 -36
- package/section/SectionToolbar.js +3 -9
- package/section/SectionToolbarItem.js +3 -8
- package/select/InputSelect.js +23 -16
- package/select/Select.js +43 -112
- package/select/subComponent/Checkbox.js +5 -24
- package/select/subComponent/Footer.js +3 -4
- package/select/subComponent/ListBox.js +5 -12
- package/select/subComponent/Option.js +7 -27
- package/select/subComponent/OptionGroup.js +3 -13
- package/select/subComponent/Options.js +5 -18
- package/select/subComponent/SearchBox.js +12 -34
- package/select/subComponent/SelectedMultipleTags.js +3 -21
- package/select/subComponent/SelectedMultipleText.js +4 -20
- package/select/subComponent/SelectedSingle.js +3 -7
- package/styles/GlobalStyle.js +45 -156
- package/styles/mixin/backgroundColor.js +8 -16
- package/styles/mixin/borderColor.js +7 -13
- package/styles/mixin/color.js +7 -13
- package/styles/mixin/colorOnBackground.js +7 -13
- package/styles/mixin/inputPlaceholder.js +3 -20
- package/styles/mixin/media.js +3 -5
- package/styles/mixin/rounded.js +6 -10
- package/styles/mixin/scrollbar.js +3 -13
- package/styles/theme/dark.theme.js +14 -15
- package/styles/theme/light.theme.js +14 -15
- package/styles/theme/white.theme.js +14 -15
- package/table/GridTable.js +33 -71
- package/table/ImageBox.js +5 -15
- package/table/InfiniteGridTable.js +46 -92
- package/table/PermissionTable.js +10 -32
- package/table/SimpleGridTable.js +17 -52
- package/table/Table.js +48 -198
- package/table/__mock__/columns.js +1 -1
- package/table/subComponent/BaseTableHeadCell.js +8 -37
- package/table/subComponent/GridTableFooter.js +4 -10
- package/table/subComponent/GridTableHeadCell.js +4 -6
- package/table/subComponent/Resizer.js +4 -19
- package/table/subComponent/TableFooter.js +6 -15
- package/table/subComponent/TableFooterInfo.js +3 -4
- package/table/subComponent/TableFooterPager.js +6 -19
- package/table/subComponent/TableHeadCell.js +3 -9
- package/table/subComponent/TableSort.js +7 -17
- package/tagify/TagifyStyle.js +3 -49
- package/tagify/Tags.js +21 -37
- package/tagify/templates/getCreateButtonTemplate.js +2 -5
- package/text/Paragraph.js +12 -50
- package/timeline/Timeline.js +17 -94
- package/toast/CustomToastContainer.js +3 -35
- package/toast/MessageContainer.js +4 -22
- package/tooltip/Tooltip.js +19 -47
- package/treeView/TreeViewV2.js +1 -1
- package/treeView/TreeflexStyle.js +3 -38
- package/wizard/Wizard.js +6 -115
|
@@ -5,36 +5,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
display: flex
|
|
11
|
-
|
|
12
|
-
${_ref => {
|
|
10
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
|
+
const FlexContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n\n ", ";\n\n ", ";\n\n ", "\n\n ", "\n"])), _ref => {
|
|
13
12
|
let {
|
|
14
13
|
marginBottom
|
|
15
14
|
} = _ref;
|
|
16
15
|
return marginBottom && 'margin-bottom: var(--spacing-l)';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
${_ref2 => {
|
|
16
|
+
}, _ref2 => {
|
|
20
17
|
let {
|
|
21
18
|
wrap
|
|
22
19
|
} = _ref2;
|
|
23
20
|
return wrap && 'flex-wrap: wrap';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
${_ref3 => {
|
|
21
|
+
}, _ref3 => {
|
|
27
22
|
let {
|
|
28
23
|
alignCenter
|
|
29
24
|
} = _ref3;
|
|
30
25
|
return alignCenter && 'align-items: center;';
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
${_ref4 => {
|
|
26
|
+
}, _ref4 => {
|
|
34
27
|
let {
|
|
35
28
|
spaceBetween
|
|
36
29
|
} = _ref4;
|
|
37
30
|
return spaceBetween && 'justify-content: space-between;';
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
31
|
+
});
|
|
40
32
|
var _default = exports.default = FlexContainer;
|
package/cropper/Cropper.js
CHANGED
|
@@ -39,7 +39,8 @@ const CropperWrapper = _ref => {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return () => {
|
|
42
|
-
|
|
42
|
+
var _node$cropper;
|
|
43
|
+
node === null || node === void 0 || (_node$cropper = node.cropper) === null || _node$cropper === void 0 || _node$cropper.destroy();
|
|
43
44
|
};
|
|
44
45
|
}, [onInitialized, dragMode, width, height, cropBoxResizable]);
|
|
45
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -14,9 +14,16 @@ var _Button = _interopRequireDefault(require("../button/Button"));
|
|
|
14
14
|
var _Accordion = _interopRequireDefault(require("./subComponent/Accordion"));
|
|
15
15
|
var _Input = _interopRequireDefault(require("../form/Input"));
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
17
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
20
|
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; }
|
|
21
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
26
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
27
|
const DatePicker = _ref => {
|
|
21
28
|
let {
|
|
22
29
|
onConfirm,
|
|
@@ -157,8 +164,8 @@ const DatePicker = _ref => {
|
|
|
157
164
|
const handleDisplayDays = (0, _react.useMemo)(() => {
|
|
158
165
|
const daysOfMonthForSelectedDate = new Date(selectedYear, selectedMonth + 1, 0).getDate();
|
|
159
166
|
const daysOfPrevioueMonthForSelectedDate = new Date(selectedYear, selectedMonth + 1 - 1, 0).getDate();
|
|
160
|
-
const firstWeekOfMonth = new Date(
|
|
161
|
-
const lastWeekOfMonth = new Date(
|
|
167
|
+
const firstWeekOfMonth = new Date("".concat(selectedYear, "/").concat(selectedMonth + 1, "/1")).getDay();
|
|
168
|
+
const lastWeekOfMonth = new Date("".concat(selectedYear, "/").concat(selectedMonth + 1, "/").concat(daysOfMonthForSelectedDate)).getDay();
|
|
162
169
|
const days = [];
|
|
163
170
|
for (const day of [...Array(daysOfMonthForSelectedDate).keys()]) {
|
|
164
171
|
days.push(day + 1);
|
|
@@ -216,8 +223,7 @@ const DatePicker = _ref => {
|
|
|
216
223
|
onClick: handleToggle,
|
|
217
224
|
readOnly: true,
|
|
218
225
|
disabled: disabled
|
|
219
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
|
|
220
|
-
...attributes.popper,
|
|
226
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, _objectSpread(_objectSpread({}, attributes.popper), {}, {
|
|
221
227
|
style: styles.popper,
|
|
222
228
|
placement: state && state.placement,
|
|
223
229
|
ref: setContentElement,
|
|
@@ -264,100 +270,40 @@ const DatePicker = _ref => {
|
|
|
264
270
|
children: t('Confirm')
|
|
265
271
|
})
|
|
266
272
|
})]
|
|
267
|
-
})]
|
|
273
|
+
}))]
|
|
268
274
|
});
|
|
269
275
|
};
|
|
270
|
-
const Wrapper = _styledComponents.default.div
|
|
271
|
-
padding-bottom: var(--spacing-s);
|
|
272
|
-
background: var(--color-background1);
|
|
273
|
-
border-radius: var(--border-radius);
|
|
274
|
-
border: var(--border-width) solid var(--border-color);
|
|
275
|
-
box-shadow: var(--box-shadow);
|
|
276
|
-
overflow: hidden;
|
|
277
|
-
width: 286px;
|
|
278
|
-
z-index: 1;
|
|
279
|
-
color: var(--font-on-background);
|
|
280
|
-
|
|
281
|
-
display: ${_ref2 => {
|
|
276
|
+
const Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-bottom: var(--spacing-s);\n background: var(--color-background1);\n border-radius: var(--border-radius);\n border: var(--border-width) solid var(--border-color);\n box-shadow: var(--box-shadow);\n overflow: hidden;\n width: 286px;\n z-index: 1;\n color: var(--font-on-background);\n\n display: ", ";\n"])), _ref2 => {
|
|
282
277
|
let {
|
|
283
278
|
displayPicker
|
|
284
279
|
} = _ref2;
|
|
285
280
|
return displayPicker ? 'block' : 'none';
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
min-width: 36px;
|
|
290
|
-
height: 36px;
|
|
291
|
-
border-radius: var(--border-radius-s);
|
|
292
|
-
line-height: 36px;
|
|
293
|
-
text-align: center;
|
|
294
|
-
`;
|
|
295
|
-
const Day = _styledComponents.default.button`
|
|
296
|
-
min-width: 36px;
|
|
297
|
-
height: 36px;
|
|
298
|
-
border-radius: var(--border-radius-s);
|
|
299
|
-
line-height: 36px;
|
|
300
|
-
text-align: center;
|
|
301
|
-
padding: 0;
|
|
302
|
-
border: 0;
|
|
303
|
-
background: var(--color-background1);
|
|
304
|
-
color: var(--font-on-background);
|
|
305
|
-
&:hover {
|
|
306
|
-
background: var(--color-primary);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
${_ref3 => {
|
|
281
|
+
});
|
|
282
|
+
const Week = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 36px;\n height: 36px;\n border-radius: var(--border-radius-s);\n line-height: 36px;\n text-align: center;\n"])));
|
|
283
|
+
const Day = _styledComponents.default.button(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-width: 36px;\n height: 36px;\n border-radius: var(--border-radius-s);\n line-height: 36px;\n text-align: center;\n padding: 0;\n border: 0;\n background: var(--color-background1);\n color: var(--font-on-background);\n &:hover {\n background: var(--color-primary);\n }\n\n ", "\n\n ", "\n"])), _ref3 => {
|
|
310
284
|
let {
|
|
311
285
|
selected
|
|
312
286
|
} = _ref3;
|
|
313
287
|
return selected && 'background: var(--color-hover);';
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
${_ref4 => {
|
|
288
|
+
}, _ref4 => {
|
|
317
289
|
let {
|
|
318
290
|
disabled
|
|
319
291
|
} = _ref4;
|
|
320
|
-
return disabled && (0, _styledComponents.css)
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
`;
|
|
327
|
-
}}
|
|
328
|
-
`;
|
|
329
|
-
const DateContent = _styledComponents.default.div`
|
|
330
|
-
display: flex;
|
|
331
|
-
flex-wrap: wrap;
|
|
332
|
-
`;
|
|
333
|
-
const PickerInput = (0, _styledComponents.default)(_Input.default)`
|
|
334
|
-
&:disabled {
|
|
335
|
-
cursor: not-allowed;
|
|
336
|
-
opacity: 0.5;
|
|
337
|
-
}
|
|
338
|
-
`;
|
|
339
|
-
const ConfirmButton = (0, _styledComponents.default)(_Button.default)`
|
|
340
|
-
margin: 16px auto 0;
|
|
341
|
-
`;
|
|
342
|
-
const Body = _styledComponents.default.div`
|
|
343
|
-
${_ref5 => {
|
|
292
|
+
return disabled && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: var(--font-on-mute);\n background: none;\n &:hover {\n background: none;\n }\n "])));
|
|
293
|
+
});
|
|
294
|
+
const DateContent = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n"])));
|
|
295
|
+
const PickerInput = (0, _styledComponents.default)(_Input.default)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"])));
|
|
296
|
+
const ConfirmButton = (0, _styledComponents.default)(_Button.default)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 16px auto 0;\n"])));
|
|
297
|
+
const Body = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", "\n\n overflow: hidden;\n padding: ", ";\n"])), _ref5 => {
|
|
344
298
|
let {
|
|
345
299
|
displayType
|
|
346
300
|
} = _ref5;
|
|
347
|
-
return displayType && (0, _styledComponents.css)
|
|
348
|
-
|
|
349
|
-
`;
|
|
350
|
-
}}
|
|
351
|
-
|
|
352
|
-
overflow: hidden;
|
|
353
|
-
padding: ${_ref6 => {
|
|
301
|
+
return displayType && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n height: 216px;\n "])));
|
|
302
|
+
}, _ref6 => {
|
|
354
303
|
let {
|
|
355
304
|
displayType
|
|
356
305
|
} = _ref6;
|
|
357
306
|
return displayType === 'year' ? ' 0 4px var(--spacing-s) var(--spacing-s)' : '0 var(--spacing-s) 0 var(--spacing-s)';
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
const Footer = _styledComponents.default.div`
|
|
361
|
-
padding: 0 var(--spacing-s);
|
|
362
|
-
`;
|
|
307
|
+
});
|
|
308
|
+
const Footer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding: 0 var(--spacing-s);\n"])));
|
|
363
309
|
var _default = exports.default = DatePicker;
|
|
@@ -18,9 +18,16 @@ var _Year = _interopRequireDefault(require("./accordion/Year"));
|
|
|
18
18
|
var _DateTimePickerContext = _interopRequireDefault(require("./subComponent/DateTimePickerContext"));
|
|
19
19
|
var _toUTC = _interopRequireDefault(require("./utils/toUTC0"));
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
21
22
|
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
23
|
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
24
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
26
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
30
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
31
|
const DEFAULT_TIME = '00:00:00';
|
|
25
32
|
const DatePickerV2 = _ref => {
|
|
26
33
|
let {
|
|
@@ -39,7 +46,7 @@ const DatePickerV2 = _ref => {
|
|
|
39
46
|
const [contentElement, setContentElement] = (0, _react.useState)(null);
|
|
40
47
|
const [selectedDate, setSelectedDate] = (0, _react.useState)(() => {
|
|
41
48
|
const defaultDate = selected ? new Date(selected) : new Date();
|
|
42
|
-
return
|
|
49
|
+
return "".concat((0, _utils.formatDate)((0, _toUTC.default)(defaultDate), 'date'), " ").concat(DEFAULT_TIME);
|
|
43
50
|
});
|
|
44
51
|
const [confirmDate, setConfirmDate] = (0, _react.useState)(selected ? (0, _utils.formatDate)((0, _toUTC.default)(selected), 'date') : '');
|
|
45
52
|
const [displayPicker, setDisplayPicker] = (0, _react.useState)(false);
|
|
@@ -51,11 +58,11 @@ const DatePickerV2 = _ref => {
|
|
|
51
58
|
}, []);
|
|
52
59
|
const minDateWithTime = (0, _react.useMemo)(() => {
|
|
53
60
|
if (!minDate) return;
|
|
54
|
-
return
|
|
61
|
+
return "".concat(minDate, " 00:00:00");
|
|
55
62
|
}, [minDate]);
|
|
56
63
|
const maxDateWithTime = (0, _react.useMemo)(() => {
|
|
57
64
|
if (!maxDate) return;
|
|
58
|
-
return
|
|
65
|
+
return "".concat(maxDate, " 00:00:00");
|
|
59
66
|
}, [maxDate]);
|
|
60
67
|
const {
|
|
61
68
|
styles,
|
|
@@ -130,7 +137,7 @@ const DatePickerV2 = _ref => {
|
|
|
130
137
|
date.setDate(day);
|
|
131
138
|
}
|
|
132
139
|
const formattedDate = (0, _utils.formatDate)(date, 'date');
|
|
133
|
-
setSelectedDate(
|
|
140
|
+
setSelectedDate("".concat(formattedDate, " ").concat(DEFAULT_TIME));
|
|
134
141
|
setConfirmDate(formattedDate);
|
|
135
142
|
}, [fixedYear, selectedDate]);
|
|
136
143
|
const handleDisabled = (0, _react.useCallback)((firstDayOfMonth, lastDayOfMonth, daysOfMonthForSelectedDate, dayIndex, day) => {
|
|
@@ -141,7 +148,7 @@ const DatePickerV2 = _ref => {
|
|
|
141
148
|
return true;
|
|
142
149
|
}
|
|
143
150
|
let myDay = day.toString();
|
|
144
|
-
if (myDay.length === 1) myDay =
|
|
151
|
+
if (myDay.length === 1) myDay = "0".concat(myDay);
|
|
145
152
|
if (fixedYear) {
|
|
146
153
|
if (month === '01') {
|
|
147
154
|
// disabled date before first month
|
|
@@ -169,13 +176,13 @@ const DatePickerV2 = _ref => {
|
|
|
169
176
|
}
|
|
170
177
|
month = month.toString();
|
|
171
178
|
if (month.length === 1) {
|
|
172
|
-
month =
|
|
179
|
+
month = "0".concat(month);
|
|
173
180
|
}
|
|
174
181
|
year = year.toString();
|
|
175
|
-
if (year.length === 1) year =
|
|
176
|
-
if (year.length === 2) year =
|
|
177
|
-
if (year.length === 3) year =
|
|
178
|
-
const currentDate =
|
|
182
|
+
if (year.length === 1) year = "000".concat(year);
|
|
183
|
+
if (year.length === 2) year = "00".concat(year);
|
|
184
|
+
if (year.length === 3) year = "0".concat(year);
|
|
185
|
+
const currentDate = "".concat(year, "-").concat(month, "-").concat(myDay, " ").concat(DEFAULT_TIME);
|
|
179
186
|
if (minDateWithTime && currentDate < minDateWithTime) {
|
|
180
187
|
return true;
|
|
181
188
|
}
|
|
@@ -247,7 +254,7 @@ const DatePickerV2 = _ref => {
|
|
|
247
254
|
(0, _react.useEffect)(() => {
|
|
248
255
|
if (selected) {
|
|
249
256
|
const formattedDate = (0, _utils.formatDate)((0, _toUTC.default)(selected), 'date');
|
|
250
|
-
setSelectedDate(
|
|
257
|
+
setSelectedDate("".concat(formattedDate, " ").concat(DEFAULT_TIME));
|
|
251
258
|
setConfirmDate(formattedDate);
|
|
252
259
|
} else {
|
|
253
260
|
setConfirmDate('');
|
|
@@ -270,8 +277,7 @@ const DatePickerV2 = _ref => {
|
|
|
270
277
|
onConfirm('');
|
|
271
278
|
}
|
|
272
279
|
})]
|
|
273
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Picker, {
|
|
274
|
-
...attributes.popper,
|
|
280
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Picker, _objectSpread(_objectSpread({}, attributes.popper), {}, {
|
|
275
281
|
style: styles.popper,
|
|
276
282
|
placement: state && state.placement,
|
|
277
283
|
ref: setContentElement,
|
|
@@ -300,108 +306,43 @@ const DatePickerV2 = _ref => {
|
|
|
300
306
|
children: t('Confirm')
|
|
301
307
|
})
|
|
302
308
|
})]
|
|
303
|
-
})]
|
|
309
|
+
}))]
|
|
304
310
|
})
|
|
305
311
|
});
|
|
306
312
|
};
|
|
307
|
-
const Wrapper = _styledComponents.default.div
|
|
308
|
-
position:
|
|
309
|
-
`;
|
|
310
|
-
const CloseButton = (0, _styledComponents.default)(_md.MdClose)`
|
|
311
|
-
position: absolute;
|
|
312
|
-
top: 50%;
|
|
313
|
-
transform: translateY(-50%);
|
|
314
|
-
color: var(--font-on-background);
|
|
315
|
-
font-size: var(--font-body1);
|
|
316
|
-
right: var(--spacing-s);
|
|
317
|
-
cursor: pointer;
|
|
318
|
-
`;
|
|
313
|
+
const Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
314
|
+
const CloseButton = (0, _styledComponents.default)(_md.MdClose)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n color: var(--font-on-background);\n font-size: var(--font-body1);\n right: var(--spacing-s);\n cursor: pointer;\n"])));
|
|
319
315
|
CloseButton.displayName = 'CloseButton';
|
|
320
|
-
const Picker = _styledComponents.default.div
|
|
321
|
-
padding-bottom: var(--spacing-s);
|
|
322
|
-
background: var(--color-background1);
|
|
323
|
-
border-radius: var(--border-radius);
|
|
324
|
-
border: var(--border-width) solid var(--border-color);
|
|
325
|
-
box-shadow: var(--box-shadow);
|
|
326
|
-
overflow: hidden;
|
|
327
|
-
width: 286px;
|
|
328
|
-
z-index: 1;
|
|
329
|
-
color: var(--font-on-background);
|
|
330
|
-
|
|
331
|
-
display: ${_ref2 => {
|
|
316
|
+
const Picker = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-bottom: var(--spacing-s);\n background: var(--color-background1);\n border-radius: var(--border-radius);\n border: var(--border-width) solid var(--border-color);\n box-shadow: var(--box-shadow);\n overflow: hidden;\n width: 286px;\n z-index: 1;\n color: var(--font-on-background);\n\n display: ", ";\n"])), _ref2 => {
|
|
332
317
|
let {
|
|
333
318
|
displayPicker
|
|
334
319
|
} = _ref2;
|
|
335
320
|
return displayPicker ? 'block' : 'none';
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
const
|
|
339
|
-
width: calc(100% / 7);
|
|
340
|
-
height: 36px;
|
|
341
|
-
border-radius: var(--border-radius-s);
|
|
342
|
-
line-height: 36px;
|
|
343
|
-
text-align: center;
|
|
344
|
-
`;
|
|
345
|
-
const Body = _styledComponents.default.div`
|
|
346
|
-
${_ref3 => {
|
|
321
|
+
});
|
|
322
|
+
const Week = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: calc(100% / 7);\n height: 36px;\n border-radius: var(--border-radius-s);\n line-height: 36px;\n text-align: center;\n"])));
|
|
323
|
+
const Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", "\n\n overflow: hidden;\n padding: ", ";\n"])), _ref3 => {
|
|
347
324
|
let {
|
|
348
325
|
accordionCurrentDisplayType
|
|
349
326
|
} = _ref3;
|
|
350
|
-
return accordionCurrentDisplayType && (0, _styledComponents.css)
|
|
351
|
-
|
|
352
|
-
`;
|
|
353
|
-
}}
|
|
354
|
-
|
|
355
|
-
overflow: hidden;
|
|
356
|
-
padding: ${_ref4 => {
|
|
327
|
+
return accordionCurrentDisplayType && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: 216px;\n "])));
|
|
328
|
+
}, _ref4 => {
|
|
357
329
|
let {
|
|
358
330
|
accordionCurrentDisplayType
|
|
359
331
|
} = _ref4;
|
|
360
332
|
return accordionCurrentDisplayType === 'year' ? ' 0 4px var(--spacing-s) var(--spacing-s)' : '0 var(--spacing-s) 0 var(--spacing-s)';
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
const
|
|
364
|
-
padding: 0 var(--spacing-s);
|
|
365
|
-
`;
|
|
366
|
-
const Day = _styledComponents.default.button`
|
|
367
|
-
width: calc(100% / 7);
|
|
368
|
-
height: 36px;
|
|
369
|
-
border-radius: var(--border-radius-s);
|
|
370
|
-
line-height: 36px;
|
|
371
|
-
text-align: center;
|
|
372
|
-
padding: 0;
|
|
373
|
-
border: 0;
|
|
374
|
-
background: var(--color-background1);
|
|
375
|
-
color: var(--font-on-background);
|
|
376
|
-
&:hover {
|
|
377
|
-
background: var(--color-primary);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
${_ref5 => {
|
|
333
|
+
});
|
|
334
|
+
const Footer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding: 0 var(--spacing-s);\n"])));
|
|
335
|
+
const Day = _styledComponents.default.button(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: calc(100% / 7);\n height: 36px;\n border-radius: var(--border-radius-s);\n line-height: 36px;\n text-align: center;\n padding: 0;\n border: 0;\n background: var(--color-background1);\n color: var(--font-on-background);\n &:hover {\n background: var(--color-primary);\n }\n\n ", "\n\n ", "\n"])), _ref5 => {
|
|
381
336
|
let {
|
|
382
337
|
selected
|
|
383
338
|
} = _ref5;
|
|
384
339
|
return selected && 'background: var(--color-hover);';
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
${_ref6 => {
|
|
340
|
+
}, _ref6 => {
|
|
388
341
|
let {
|
|
389
342
|
disabled
|
|
390
343
|
} = _ref6;
|
|
391
|
-
return disabled && (0, _styledComponents.css)
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
background: none;
|
|
396
|
-
}
|
|
397
|
-
`;
|
|
398
|
-
}}
|
|
399
|
-
`;
|
|
400
|
-
const ConfirmButton = (0, _styledComponents.default)(_Button.default)`
|
|
401
|
-
margin: 16px auto 0;
|
|
402
|
-
`;
|
|
403
|
-
const DateContent = _styledComponents.default.div`
|
|
404
|
-
display: flex;
|
|
405
|
-
flex-wrap: wrap;
|
|
406
|
-
`;
|
|
344
|
+
return disabled && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: var(--font-on-mute);\n background: none;\n &:hover {\n background: none;\n }\n "])));
|
|
345
|
+
});
|
|
346
|
+
const ConfirmButton = (0, _styledComponents.default)(_Button.default)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin: 16px auto 0;\n"])));
|
|
347
|
+
const DateContent = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n"])));
|
|
407
348
|
var _default = exports.default = DatePickerV2;
|
|
@@ -10,7 +10,14 @@ var _reactDatepicker = _interopRequireDefault(require("react-datepicker"));
|
|
|
10
10
|
require("react-datepicker/dist/react-datepicker.css");
|
|
11
11
|
var _CustomTimeInput = _interopRequireDefault(require("./subComponent/CustomTimeInput"));
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _templateObject;
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
21
|
const DatetimePicker = _ref => {
|
|
15
22
|
let {
|
|
16
23
|
selected = '',
|
|
@@ -56,185 +63,15 @@ const DatetimePicker = _ref => {
|
|
|
56
63
|
}, [readOnly]);
|
|
57
64
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
|
|
58
65
|
disabled: disabled,
|
|
59
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDatepicker.default, {
|
|
60
|
-
...datePickerProps,
|
|
66
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDatepicker.default, _objectSpread(_objectSpread({}, datePickerProps), {}, {
|
|
61
67
|
ref: datepickerRef
|
|
62
|
-
})
|
|
68
|
+
}))
|
|
63
69
|
});
|
|
64
70
|
};
|
|
65
|
-
const Wrapper = _styledComponents.default.div
|
|
66
|
-
.react-datepicker-wrapper,
|
|
67
|
-
.react-datepicker__input-container {
|
|
68
|
-
width: 100%;
|
|
69
|
-
|
|
70
|
-
> input {
|
|
71
|
-
width: 100%;
|
|
72
|
-
height: 36px;
|
|
73
|
-
color: var(--font-on-background);
|
|
74
|
-
background: transparent;
|
|
75
|
-
border-radius: var(--border-radius-l);
|
|
76
|
-
border: var(--border-width) solid var(--border-color);
|
|
77
|
-
padding: 0 var(--spacing-s);
|
|
78
|
-
outline: none;
|
|
79
|
-
|
|
80
|
-
${_ref2 => {
|
|
71
|
+
const Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .react-datepicker-wrapper,\n .react-datepicker__input-container {\n width: 100%;\n\n > input {\n width: 100%;\n height: 36px;\n color: var(--font-on-background);\n background: transparent;\n border-radius: var(--border-radius-l);\n border: var(--border-width) solid var(--border-color);\n padding: 0 var(--spacing-s);\n outline: none;\n\n ", "\n }\n\n > input + button {\n padding: 0;\n right: var(--spacing-s);\n &::after {\n color: var(--color-primary);\n background-color: transparent;\n font-size: 24px;\n padding: 0;\n }\n }\n }\n\n .react-datepicker-popper {\n z-index: 2;\n }\n\n .react-datepicker-popper[data-placement^='top'] {\n padding-bottom: var(--spacing-xs);\n }\n\n .react-datepicker-popper[data-placement^='bottom'] {\n padding-top: var(--spacing-xs);\n }\n\n .react-datepicker {\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n border: var(--border-width) solid var(--border-color);\n padding: var(--spacing-s);\n font-size: var(--font-body1);\n color: var(--font-on-background);\n background: var(--color-background1);\n\n .react-datepicker__triangle {\n &::before,\n &::after {\n display: none;\n }\n }\n\n .react-datepicker__header {\n border: none;\n padding: 0;\n background: var(--color-background1);\n }\n\n .react-datepicker__current-month {\n line-height: 36px;\n color: var(--font-on-background);\n font-size: var(--font-body1);\n font-weight: var(--font-normal);\n }\n\n .react-datepicker__day-names {\n margin: 0;\n }\n\n .react-datepicker__day-name,\n .react-datepicker__day {\n width: 36px;\n height: 36px;\n line-height: 36px;\n color: var(--font-on-background);\n font-weight: var(--font-normal);\n margin: 0;\n border-radius: 4px;\n }\n\n .react-datepicker__day:hover {\n background: var(--color-hover);\n }\n\n .react-datepicker__day--disabled {\n color: var(--font-on-mute);\n background: none !important;\n }\n }\n\n .react-datepicker__month {\n margin: 0;\n }\n\n .react-datepicker__navigation {\n top: 0;\n width: 36px;\n height: 36px;\n margin: var(--spacing-s) var(--spacing-s) 0 var(--spacing-s);\n border-radius: 4px;\n\n &.react-datepicker__navigation--previous {\n left: 0;\n }\n\n &.react-datepicker__navigation--next {\n right: 0;\n }\n\n &:hover {\n background: var(--color-hover);\n }\n\n .react-datepicker__navigation-icon::before {\n border-color: var(--font-on-background);\n }\n\n .react-datepicker__navigation-icon--previous::before {\n right: -4px;\n }\n\n .react-datepicker__navigation-icon--next::before {\n left: -4px;\n }\n }\n\n .react-datepicker__day--selected,\n .react-datepicker__day--in-selecting-range,\n .react-datepicker__day--in-range,\n .react-datepicker__month-text--selected,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--selected,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--selected,\n .react-datepicker__year-text--in-selecting-range,\n .react-datepicker__year-text--in-range {\n background: var(--color-primary) !important;\n }\n\n .react-datepicker__day--keyboard-selected,\n .react-datepicker__month-text--keyboard-selected,\n .react-datepicker__quarter-text--keyboard-selected,\n .react-datepicker__year-text--keyboard-selected {\n background: none;\n }\n\n .react-datepicker__input-time-container {\n margin: 0;\n margin-top: var(--spacing-s);\n margin-left: var(--spacing-xs);\n\n .react-datepicker-time__input input {\n height: 36px;\n padding: 0 var(--spacing-xs);\n border-radius: var(--border-radius);\n border: var(--border-width) solid var(--border-color);\n background: transparent;\n color: var(--font-on-background);\n outline: none;\n }\n }\n"])), _ref2 => {
|
|
81
72
|
let {
|
|
82
73
|
disabled
|
|
83
74
|
} = _ref2;
|
|
84
75
|
return disabled ? 'cursor: not-allowed; opacity: 0.5;' : '';
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
> input + button {
|
|
89
|
-
padding: 0;
|
|
90
|
-
right: var(--spacing-s);
|
|
91
|
-
&::after {
|
|
92
|
-
color: var(--color-primary);
|
|
93
|
-
background-color: transparent;
|
|
94
|
-
font-size: 24px;
|
|
95
|
-
padding: 0;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.react-datepicker-popper {
|
|
101
|
-
z-index: 2;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.react-datepicker-popper[data-placement^='top'] {
|
|
105
|
-
padding-bottom: var(--spacing-xs);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.react-datepicker-popper[data-placement^='bottom'] {
|
|
109
|
-
padding-top: var(--spacing-xs);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.react-datepicker {
|
|
113
|
-
box-shadow: var(--box-shadow);
|
|
114
|
-
border-radius: var(--border-radius);
|
|
115
|
-
border: var(--border-width) solid var(--border-color);
|
|
116
|
-
padding: var(--spacing-s);
|
|
117
|
-
font-size: var(--font-body1);
|
|
118
|
-
color: var(--font-on-background);
|
|
119
|
-
background: var(--color-background1);
|
|
120
|
-
|
|
121
|
-
.react-datepicker__triangle {
|
|
122
|
-
&::before,
|
|
123
|
-
&::after {
|
|
124
|
-
display: none;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.react-datepicker__header {
|
|
129
|
-
border: none;
|
|
130
|
-
padding: 0;
|
|
131
|
-
background: var(--color-background1);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.react-datepicker__current-month {
|
|
135
|
-
line-height: 36px;
|
|
136
|
-
color: var(--font-on-background);
|
|
137
|
-
font-size: var(--font-body1);
|
|
138
|
-
font-weight: var(--font-normal);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.react-datepicker__day-names {
|
|
142
|
-
margin: 0;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.react-datepicker__day-name,
|
|
146
|
-
.react-datepicker__day {
|
|
147
|
-
width: 36px;
|
|
148
|
-
height: 36px;
|
|
149
|
-
line-height: 36px;
|
|
150
|
-
color: var(--font-on-background);
|
|
151
|
-
font-weight: var(--font-normal);
|
|
152
|
-
margin: 0;
|
|
153
|
-
border-radius: 4px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.react-datepicker__day:hover {
|
|
157
|
-
background: var(--color-hover);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.react-datepicker__day--disabled {
|
|
161
|
-
color: var(--font-on-mute);
|
|
162
|
-
background: none !important;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.react-datepicker__month {
|
|
167
|
-
margin: 0;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.react-datepicker__navigation {
|
|
171
|
-
top: 0;
|
|
172
|
-
width: 36px;
|
|
173
|
-
height: 36px;
|
|
174
|
-
margin: var(--spacing-s) var(--spacing-s) 0 var(--spacing-s);
|
|
175
|
-
border-radius: 4px;
|
|
176
|
-
|
|
177
|
-
&.react-datepicker__navigation--previous {
|
|
178
|
-
left: 0;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&.react-datepicker__navigation--next {
|
|
182
|
-
right: 0;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&:hover {
|
|
186
|
-
background: var(--color-hover);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.react-datepicker__navigation-icon::before {
|
|
190
|
-
border-color: var(--font-on-background);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.react-datepicker__navigation-icon--previous::before {
|
|
194
|
-
right: -4px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.react-datepicker__navigation-icon--next::before {
|
|
198
|
-
left: -4px;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.react-datepicker__day--selected,
|
|
203
|
-
.react-datepicker__day--in-selecting-range,
|
|
204
|
-
.react-datepicker__day--in-range,
|
|
205
|
-
.react-datepicker__month-text--selected,
|
|
206
|
-
.react-datepicker__month-text--in-selecting-range,
|
|
207
|
-
.react-datepicker__month-text--in-range,
|
|
208
|
-
.react-datepicker__quarter-text--selected,
|
|
209
|
-
.react-datepicker__quarter-text--in-selecting-range,
|
|
210
|
-
.react-datepicker__quarter-text--in-range,
|
|
211
|
-
.react-datepicker__year-text--selected,
|
|
212
|
-
.react-datepicker__year-text--in-selecting-range,
|
|
213
|
-
.react-datepicker__year-text--in-range {
|
|
214
|
-
background: var(--color-primary) !important;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.react-datepicker__day--keyboard-selected,
|
|
218
|
-
.react-datepicker__month-text--keyboard-selected,
|
|
219
|
-
.react-datepicker__quarter-text--keyboard-selected,
|
|
220
|
-
.react-datepicker__year-text--keyboard-selected {
|
|
221
|
-
background: none;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.react-datepicker__input-time-container {
|
|
225
|
-
margin: 0;
|
|
226
|
-
margin-top: var(--spacing-s);
|
|
227
|
-
margin-left: var(--spacing-xs);
|
|
228
|
-
|
|
229
|
-
.react-datepicker-time__input input {
|
|
230
|
-
height: 36px;
|
|
231
|
-
padding: 0 var(--spacing-xs);
|
|
232
|
-
border-radius: var(--border-radius);
|
|
233
|
-
border: var(--border-width) solid var(--border-color);
|
|
234
|
-
background: transparent;
|
|
235
|
-
color: var(--font-on-background);
|
|
236
|
-
outline: none;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
`;
|
|
76
|
+
});
|
|
240
77
|
var _default = exports.default = DatetimePicker;
|