@cashub/ui 0.48.14 → 0.48.15
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 +25 -37
- 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 +21 -13
- 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 +62 -69
- 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
|
@@ -13,7 +13,14 @@ var _utils = require("@cashub/utils");
|
|
|
13
13
|
var _hooks = require("./hooks");
|
|
14
14
|
var _pad = _interopRequireDefault(require("./utils/pad"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
23
|
+
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); }
|
|
17
24
|
const LENGTH = 2;
|
|
18
25
|
const PAD_STRING = '0';
|
|
19
26
|
const TimePicker = _ref => {
|
|
@@ -39,7 +46,7 @@ const TimePicker = _ref => {
|
|
|
39
46
|
});
|
|
40
47
|
(0, _react.useEffect)(() => {
|
|
41
48
|
if (typeof onChange === 'function' && time.hour && time.minute && time.second) {
|
|
42
|
-
onChange(
|
|
49
|
+
onChange("".concat(time.hour, ":").concat(time.minute, ":").concat(time.second));
|
|
43
50
|
}
|
|
44
51
|
}, [onChange, time.hour, time.minute, time.second]);
|
|
45
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
|
|
@@ -92,9 +99,7 @@ const Hour = _ref2 => {
|
|
|
92
99
|
onKeyUp: handleKeyUp,
|
|
93
100
|
onBlur: event => {
|
|
94
101
|
setTime(previous => {
|
|
95
|
-
const newState = {
|
|
96
|
-
...previous
|
|
97
|
-
};
|
|
102
|
+
const newState = _objectSpread({}, previous);
|
|
98
103
|
newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
|
|
99
104
|
return newState;
|
|
100
105
|
});
|
|
@@ -118,7 +123,7 @@ const Minute = _ref3 => {
|
|
|
118
123
|
const NAME = 'minute';
|
|
119
124
|
const MIN = 0;
|
|
120
125
|
const MAX = 59;
|
|
121
|
-
const [minuteId] = (0, _react.useState)((0, _lodash.default)(
|
|
126
|
+
const [minuteId] = (0, _react.useState)((0, _lodash.default)("".concat(NAME, "-")));
|
|
122
127
|
const increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
|
|
123
128
|
name: NAME,
|
|
124
129
|
length: LENGTH,
|
|
@@ -146,9 +151,7 @@ const Minute = _ref3 => {
|
|
|
146
151
|
onKeyUp: handleKeyUp,
|
|
147
152
|
onBlur: event => {
|
|
148
153
|
setTime(previous => {
|
|
149
|
-
const newState = {
|
|
150
|
-
...previous
|
|
151
|
-
};
|
|
154
|
+
const newState = _objectSpread({}, previous);
|
|
152
155
|
newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
|
|
153
156
|
return newState;
|
|
154
157
|
});
|
|
@@ -173,7 +176,7 @@ const Second = _ref4 => {
|
|
|
173
176
|
const NAME = 'second';
|
|
174
177
|
const MIN = 0;
|
|
175
178
|
const MAX = 59;
|
|
176
|
-
const [secondId] = (0, _react.useState)((0, _lodash.default)(
|
|
179
|
+
const [secondId] = (0, _react.useState)((0, _lodash.default)("".concat(NAME, "-")));
|
|
177
180
|
const increase = (0, _hooks.useIncrease)(MIN, MAX, setTime, {
|
|
178
181
|
name: NAME,
|
|
179
182
|
length: LENGTH,
|
|
@@ -201,9 +204,7 @@ const Second = _ref4 => {
|
|
|
201
204
|
onKeyUp: handleKeyUp,
|
|
202
205
|
onBlur: event => {
|
|
203
206
|
setTime(previous => {
|
|
204
|
-
const newState = {
|
|
205
|
-
...previous
|
|
206
|
-
};
|
|
207
|
+
const newState = _objectSpread({}, previous);
|
|
207
208
|
newState[NAME] = (0, _pad.default)(event.target.value, LENGTH, PAD_STRING);
|
|
208
209
|
return newState;
|
|
209
210
|
});
|
|
@@ -232,18 +233,14 @@ const useKeyUp = (increase, decrease, min, max, setState, name) => {
|
|
|
232
233
|
break;
|
|
233
234
|
case _utils.KEY_CODE.HOME:
|
|
234
235
|
setState(previous => {
|
|
235
|
-
const newState = {
|
|
236
|
-
...previous
|
|
237
|
-
};
|
|
236
|
+
const newState = _objectSpread({}, previous);
|
|
238
237
|
newState[name] = (0, _pad.default)(min, LENGTH, PAD_STRING);
|
|
239
238
|
return newState;
|
|
240
239
|
});
|
|
241
240
|
break;
|
|
242
241
|
case _utils.KEY_CODE.END:
|
|
243
242
|
setState(previous => {
|
|
244
|
-
const newState = {
|
|
245
|
-
...previous
|
|
246
|
-
};
|
|
243
|
+
const newState = _objectSpread({}, previous);
|
|
247
244
|
newState[name] = (0, _pad.default)(max, LENGTH, PAD_STRING);
|
|
248
245
|
return newState;
|
|
249
246
|
});
|
|
@@ -253,65 +250,13 @@ const useKeyUp = (increase, decrease, min, max, setState, name) => {
|
|
|
253
250
|
}
|
|
254
251
|
}, [increase, decrease, min, max, setState, name]);
|
|
255
252
|
};
|
|
256
|
-
const Container = _styledComponents.default.div
|
|
257
|
-
display:
|
|
258
|
-
|
|
259
|
-
|
|
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
|
-
`;
|
|
253
|
+
const Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
254
|
+
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"])));
|
|
255
|
+
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"])));
|
|
256
|
+
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"])));
|
|
287
257
|
const StepperButton = _styledComponents.default.div.attrs(() => ({
|
|
288
258
|
role: 'button'
|
|
289
|
-
}))
|
|
290
|
-
|
|
291
|
-
|
|
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
|
-
`;
|
|
259
|
+
}))(_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"])));
|
|
260
|
+
const Stepper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: calc(var(--spacing-xs) / 2);\n"])));
|
|
261
|
+
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"])));
|
|
317
262
|
var _default = exports.default = TimePicker;
|
|
@@ -6,59 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = require("styled-components");
|
|
8
8
|
var _scrollbar = _interopRequireDefault(require("../styles/mixin/scrollbar"));
|
|
9
|
+
var _templateObject;
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
10
12
|
// integrate rc-time-picker component
|
|
11
|
-
const TimePickerStyle = (0, _styledComponents.createGlobalStyle)
|
|
12
|
-
.rc-time-picker-panel-narrow {
|
|
13
|
-
max-width: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.rc-time-picker-panel {
|
|
17
|
-
.rc-time-picker-panel-inner {
|
|
18
|
-
background: transparent;
|
|
19
|
-
border: none;
|
|
20
|
-
box-shadow: none;
|
|
21
|
-
|
|
22
|
-
.rc-time-picker-panel-input-wrap {
|
|
23
|
-
display: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.rc-time-picker-panel-combobox {
|
|
27
|
-
height: 144px;
|
|
28
|
-
border: var(--border-width) solid var(--border-color);
|
|
29
|
-
color: var(--font-on-background);
|
|
30
|
-
box-shadow: var(--box-shadow);
|
|
31
|
-
border-radius: var(--border-radius);
|
|
32
|
-
background: var(--color-background2);
|
|
33
|
-
|
|
34
|
-
.rc-time-picker-panel-select {
|
|
35
|
-
font-size: var(--font-body1);
|
|
36
|
-
|
|
37
|
-
${_scrollbar.default}
|
|
38
|
-
|
|
39
|
-
li {
|
|
40
|
-
&:hover {
|
|
41
|
-
background: var(--color-hover);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.rc-time-picker-panel-select-option-selected {
|
|
45
|
-
background: var(--color-hover);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:first-child {
|
|
50
|
-
border-top-left-radius: var(--border-radius);
|
|
51
|
-
border-bottom-left-radius: var(--border-radius);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&.rc-time-picker-panel-placement-bottomLeft {
|
|
58
|
-
.rc-time-picker-panel-inner {
|
|
59
|
-
padding-top: calc(36px + var(--spacing-xs));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
`;
|
|
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);
|
|
64
14
|
var _default = exports.default = TimePickerStyle;
|
|
@@ -13,9 +13,16 @@ var _pad = _interopRequireDefault(require("./utils/pad"));
|
|
|
13
13
|
var _form = require("../form");
|
|
14
14
|
var _scrollbar = _interopRequireDefault(require("../styles/mixin/scrollbar"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
18
|
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
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
21
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
24
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
25
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
26
|
const LENGTH = 2;
|
|
20
27
|
const PAD_STRING = '0';
|
|
21
28
|
const HOUR_OPTIONS = (0, _utils.generateRange)(0, 23).map(value => {
|
|
@@ -68,13 +75,12 @@ const TimePickerV2 = _ref => {
|
|
|
68
75
|
update();
|
|
69
76
|
};
|
|
70
77
|
const handleChange = (type, value) => {
|
|
71
|
-
const next = {
|
|
72
|
-
...time,
|
|
78
|
+
const next = _objectSpread(_objectSpread({}, time), {}, {
|
|
73
79
|
[type]: value
|
|
74
|
-
};
|
|
80
|
+
});
|
|
75
81
|
setTime(next);
|
|
76
82
|
if (typeof onSelect === 'function' && next.hour && next.minute && next.second) {
|
|
77
|
-
onSelect(
|
|
83
|
+
onSelect("".concat(next.hour, ":").concat(next.minute, ":").concat(next.second));
|
|
78
84
|
}
|
|
79
85
|
};
|
|
80
86
|
|
|
@@ -105,12 +111,12 @@ const TimePickerV2 = _ref => {
|
|
|
105
111
|
type: "text",
|
|
106
112
|
readOnly: true,
|
|
107
113
|
onClick: handleToggle,
|
|
108
|
-
value: time.hour && time.minute && time.second ?
|
|
109
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Panel, {
|
|
114
|
+
value: time.hour && time.minute && time.second ? "".concat(time.hour, ":").concat(time.minute, ":").concat(time.second) : ''
|
|
115
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Panel, _objectSpread(_objectSpread({
|
|
110
116
|
ref: setPopperElement,
|
|
111
117
|
$display: display,
|
|
112
|
-
style: styles.popper
|
|
113
|
-
|
|
118
|
+
style: styles.popper
|
|
119
|
+
}, attributes.popper), {}, {
|
|
114
120
|
placement: state && state.placement,
|
|
115
121
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Picker, {
|
|
116
122
|
children: HOUR_OPTIONS.map(option => {
|
|
@@ -149,60 +155,21 @@ const TimePickerV2 = _ref => {
|
|
|
149
155
|
}, option);
|
|
150
156
|
})
|
|
151
157
|
})]
|
|
152
|
-
})]
|
|
158
|
+
}))]
|
|
153
159
|
})
|
|
154
160
|
});
|
|
155
161
|
};
|
|
156
|
-
const Panel = _styledComponents.default.div
|
|
157
|
-
display: flex;
|
|
158
|
-
visibility: ${_ref2 => {
|
|
162
|
+
const Panel = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n visibility: ", ";\n width: 100%;\n max-width: 360px;\n background: var(--color-background1);\n color: var(--font-on-background);\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n z-index: 85;\n"])), _ref2 => {
|
|
159
163
|
let {
|
|
160
164
|
$display
|
|
161
165
|
} = _ref2;
|
|
162
166
|
return $display ? 'visible' : 'hidden';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
background: var(--color-background1);
|
|
167
|
-
color: var(--font-on-background);
|
|
168
|
-
border: var(--border-width) solid var(--border-color);
|
|
169
|
-
border-radius: var(--border-radius);
|
|
170
|
-
box-shadow: var(--box-shadow);
|
|
171
|
-
z-index: 85;
|
|
172
|
-
`;
|
|
173
|
-
const Picker = _styledComponents.default.ul`
|
|
174
|
-
flex: 1;
|
|
175
|
-
text-align: center;
|
|
176
|
-
max-height: 144px;
|
|
177
|
-
overflow-y: auto;
|
|
178
|
-
|
|
179
|
-
${_scrollbar.default}
|
|
180
|
-
|
|
181
|
-
&:first-child {
|
|
182
|
-
border-top-left-radius: var(--border-radius);
|
|
183
|
-
border-bottom-left-radius: var(--border-radius);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&:not(:last-child) {
|
|
187
|
-
border-right: var(--border-width) solid var(--border-color);
|
|
188
|
-
}
|
|
189
|
-
`;
|
|
190
|
-
const Option = _styledComponents.default.li`
|
|
191
|
-
padding: var(--spacing-xs) 0;
|
|
192
|
-
background: var(--color-background1);
|
|
193
|
-
transition: background 0.3s;
|
|
194
|
-
|
|
195
|
-
&:hover {
|
|
196
|
-
background: var(--color-hover);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
${_ref3 => {
|
|
167
|
+
});
|
|
168
|
+
const Picker = _styledComponents.default.ul(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n text-align: center;\n max-height: 144px;\n overflow-y: auto;\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 &:not(:last-child) {\n border-right: var(--border-width) solid var(--border-color);\n }\n"])), _scrollbar.default);
|
|
169
|
+
const Option = _styledComponents.default.li(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: var(--spacing-xs) 0;\n background: var(--color-background1);\n transition: background 0.3s;\n\n &:hover {\n background: var(--color-hover);\n }\n\n ", "\n"])), _ref3 => {
|
|
200
170
|
let {
|
|
201
171
|
selected
|
|
202
172
|
} = _ref3;
|
|
203
|
-
return selected && (0, _styledComponents.css)
|
|
204
|
-
|
|
205
|
-
`;
|
|
206
|
-
}}
|
|
207
|
-
`;
|
|
173
|
+
return selected && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: var(--color-hover);\n "])));
|
|
174
|
+
});
|
|
208
175
|
var _default = exports.default = TimePickerV2;
|
|
@@ -12,9 +12,11 @@ var _utils = require("@cashub/utils");
|
|
|
12
12
|
var _DateTimePickerContext = _interopRequireDefault(require("../subComponent/DateTimePickerContext"));
|
|
13
13
|
var _constant = require("../provider/constant");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
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); }
|
|
17
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 && {}.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; }
|
|
19
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
18
20
|
const Month = _ref => {
|
|
19
21
|
let {
|
|
20
22
|
expand,
|
|
@@ -132,123 +134,44 @@ const Month = _ref => {
|
|
|
132
134
|
})]
|
|
133
135
|
});
|
|
134
136
|
};
|
|
135
|
-
const Header = _styledComponents.default.div
|
|
136
|
-
|
|
137
|
-
justify-content: center;
|
|
138
|
-
align-content: center;
|
|
139
|
-
position: relative;
|
|
140
|
-
|
|
141
|
-
> div {
|
|
142
|
-
width: 72px;
|
|
143
|
-
line-height: 36px;
|
|
144
|
-
text-align: center;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&::before {
|
|
148
|
-
content: '';
|
|
149
|
-
border-bottom: var(--border-width) solid var(--border-color);
|
|
150
|
-
position: absolute;
|
|
151
|
-
width: 300px;
|
|
152
|
-
bottom: 0;
|
|
153
|
-
z-index: 1;
|
|
154
|
-
right: -16px;
|
|
155
|
-
}
|
|
156
|
-
`;
|
|
157
|
-
const IconButton = _styledComponents.default.button`
|
|
158
|
-
width: 36px;
|
|
159
|
-
height: 36px;
|
|
160
|
-
background: var(--color-background1);
|
|
161
|
-
border: none;
|
|
162
|
-
color: var(--font-on-background);
|
|
163
|
-
padding: 0;
|
|
164
|
-
transition: 0.3s;
|
|
165
|
-
|
|
166
|
-
&:hover {
|
|
167
|
-
color: var(--color-primary);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
${_ref2 => {
|
|
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 => {
|
|
171
139
|
let {
|
|
172
140
|
disabled
|
|
173
141
|
} = _ref2;
|
|
174
|
-
return disabled && (0, _styledComponents.css)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
&:hover {
|
|
178
|
-
color: var(--font-on-background);
|
|
179
|
-
}
|
|
180
|
-
`;
|
|
181
|
-
}}
|
|
182
|
-
|
|
183
|
-
${_ref3 => {
|
|
142
|
+
return disabled && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n opacity: 0.5;\n\n &:hover {\n color: var(--font-on-background);\n }\n "])));
|
|
143
|
+
}, _ref3 => {
|
|
184
144
|
let {
|
|
185
145
|
right,
|
|
186
146
|
$rotate
|
|
187
147
|
} = _ref3;
|
|
188
|
-
return right &&
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
${$rotate && (0, _styledComponents.css)`
|
|
192
|
-
transform: rotate(180deg);
|
|
193
|
-
`}
|
|
194
|
-
`;
|
|
195
|
-
}}
|
|
196
|
-
`;
|
|
197
|
-
const Body = _styledComponents.default.div`
|
|
198
|
-
flex-wrap: wrap;
|
|
199
|
-
height: 0;
|
|
200
|
-
width: 100%;
|
|
201
|
-
display: ${_ref4 => {
|
|
148
|
+
return right && "\n position: absolute;\n right: 0;\n ".concat($rotate && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transform: rotate(180deg);\n "]))), "\n ");
|
|
149
|
+
});
|
|
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 => {
|
|
202
151
|
let {
|
|
203
152
|
expand
|
|
204
153
|
} = _ref4;
|
|
205
154
|
return expand ? 'flex' : 'none';
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
${_ref5 => {
|
|
155
|
+
}, _ref5 => {
|
|
209
156
|
let {
|
|
210
157
|
fixedYear
|
|
211
158
|
} = _ref5;
|
|
212
|
-
return (0, _styledComponents.css)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}}
|
|
216
|
-
transition: .3s;
|
|
217
|
-
|
|
218
|
-
transition: 0.3s;
|
|
219
|
-
`;
|
|
220
|
-
const Item = _styledComponents.default.button`
|
|
221
|
-
width: calc(100% / 3);
|
|
222
|
-
height: 36px;
|
|
223
|
-
line-height: 36px;
|
|
224
|
-
text-align: center;
|
|
225
|
-
border-radius: var(--border-radius-s);
|
|
226
|
-
padding: 0;
|
|
227
|
-
border: none;
|
|
228
|
-
color: var(--font-on-background);
|
|
229
|
-
background: var(--color-background1);
|
|
230
|
-
|
|
231
|
-
&:hover {
|
|
232
|
-
${_ref6 => {
|
|
159
|
+
return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), fixedYear ? '192' : '144');
|
|
160
|
+
});
|
|
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 => {
|
|
233
162
|
let {
|
|
234
163
|
disabled
|
|
235
164
|
} = _ref6;
|
|
236
165
|
return !disabled && 'background: var(--color-primary)';
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
${_ref7 => {
|
|
166
|
+
}, _ref7 => {
|
|
241
167
|
let {
|
|
242
168
|
disabled
|
|
243
169
|
} = _ref7;
|
|
244
170
|
return disabled && 'color: var(--font-on-mute)';
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
${_ref8 => {
|
|
171
|
+
}, _ref8 => {
|
|
248
172
|
let {
|
|
249
173
|
selected
|
|
250
174
|
} = _ref8;
|
|
251
175
|
return selected && 'background: var(--color-hover)';
|
|
252
|
-
}
|
|
253
|
-
`;
|
|
176
|
+
});
|
|
254
177
|
var _default = exports.default = Month;
|
|
@@ -12,9 +12,11 @@ var _utils = require("@cashub/utils");
|
|
|
12
12
|
var _DateTimePickerContext = _interopRequireDefault(require("../subComponent/DateTimePickerContext"));
|
|
13
13
|
var _scrollbar = _interopRequireDefault(require("../../styles/mixin/scrollbar"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
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); }
|
|
17
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 && {}.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; }
|
|
19
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
18
20
|
const Year = _ref => {
|
|
19
21
|
let {
|
|
20
22
|
expand,
|
|
@@ -93,7 +95,7 @@ const Year = _ref => {
|
|
|
93
95
|
}
|
|
94
96
|
}, [fixedYear, selectedDate]);
|
|
95
97
|
const scroll = (0, _react.useCallback)(() => {
|
|
96
|
-
if (bodyRef
|
|
98
|
+
if (bodyRef !== null && bodyRef !== void 0 && bodyRef.current && selectedYearRef !== null && selectedYearRef !== void 0 && selectedYearRef.current) {
|
|
97
99
|
const body = bodyRef.current;
|
|
98
100
|
if (body.scrollTop + body.clientHeight >= body.scrollHeight - 90) {
|
|
99
101
|
body.removeEventListener('scroll', scroll);
|
|
@@ -129,7 +131,7 @@ const Year = _ref => {
|
|
|
129
131
|
bodyRef.current.addEventListener('scroll', scroll);
|
|
130
132
|
}, [scroll]);
|
|
131
133
|
(0, _react.useEffect)(() => {
|
|
132
|
-
if (expand && bodyRef
|
|
134
|
+
if (expand && bodyRef !== null && bodyRef !== void 0 && bodyRef.current && selectedYearRef !== null && selectedYearRef !== void 0 && selectedYearRef.current) {
|
|
133
135
|
bodyRef.current.scrollTo({
|
|
134
136
|
top: selectedYearRef.current.offsetTop - bodyRef.current.offsetTop
|
|
135
137
|
});
|
|
@@ -161,124 +163,44 @@ const Year = _ref => {
|
|
|
161
163
|
})]
|
|
162
164
|
});
|
|
163
165
|
};
|
|
164
|
-
const Header = _styledComponents.default.div
|
|
165
|
-
|
|
166
|
-
justify-content: center;
|
|
167
|
-
align-content: center;
|
|
168
|
-
position: relative;
|
|
169
|
-
|
|
170
|
-
> div {
|
|
171
|
-
width: 72px;
|
|
172
|
-
line-height: 36px;
|
|
173
|
-
text-align: center;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
&::before {
|
|
177
|
-
content: '';
|
|
178
|
-
border-bottom: var(--border-width) solid var(--border-color);
|
|
179
|
-
position: absolute;
|
|
180
|
-
width: 300px;
|
|
181
|
-
bottom: 0;
|
|
182
|
-
z-index: 1;
|
|
183
|
-
right: -16px;
|
|
184
|
-
}
|
|
185
|
-
`;
|
|
186
|
-
const IconButton = _styledComponents.default.button`
|
|
187
|
-
width: 36px;
|
|
188
|
-
height: 36px;
|
|
189
|
-
background: var(--color-background1);
|
|
190
|
-
border: none;
|
|
191
|
-
color: var(--font-on-background);
|
|
192
|
-
padding: 0;
|
|
193
|
-
transition: 0.3s;
|
|
194
|
-
|
|
195
|
-
&:hover {
|
|
196
|
-
color: var(--color-primary);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
${_ref2 => {
|
|
166
|
+
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"])));
|
|
167
|
+
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 => {
|
|
200
168
|
let {
|
|
201
169
|
disabled
|
|
202
170
|
} = _ref2;
|
|
203
|
-
return disabled && (0, _styledComponents.css)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
&:hover {
|
|
207
|
-
color: var(--font-on-background);
|
|
208
|
-
}
|
|
209
|
-
`;
|
|
210
|
-
}}
|
|
211
|
-
|
|
212
|
-
${_ref3 => {
|
|
171
|
+
return disabled && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n opacity: 0.5;\n\n &:hover {\n color: var(--font-on-background);\n }\n "])));
|
|
172
|
+
}, _ref3 => {
|
|
213
173
|
let {
|
|
214
174
|
right,
|
|
215
175
|
$rotate
|
|
216
176
|
} = _ref3;
|
|
217
|
-
return right &&
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
${$rotate && (0, _styledComponents.css)`
|
|
221
|
-
transform: rotate(180deg);
|
|
222
|
-
`}
|
|
223
|
-
`;
|
|
224
|
-
}}
|
|
225
|
-
`;
|
|
226
|
-
const Body = _styledComponents.default.div`
|
|
227
|
-
flex-wrap: wrap;
|
|
228
|
-
height: 0;
|
|
229
|
-
width: 100%;
|
|
230
|
-
display: ${_ref4 => {
|
|
177
|
+
return right && "\n position: absolute;\n right: 0;\n ".concat($rotate && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transform: rotate(180deg);\n "]))), "\n ");
|
|
178
|
+
});
|
|
179
|
+
const Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex-wrap: wrap;\n height: 0;\n width: 100%;\n display: ", ";\n transition: 0.3s;\n overflow-y: scroll;\n gap: 12px 0;\n ", "\n\n ", "\n"])), _ref4 => {
|
|
231
180
|
let {
|
|
232
181
|
expand
|
|
233
182
|
} = _ref4;
|
|
234
183
|
return expand ? 'flex' : 'none';
|
|
235
|
-
}
|
|
236
|
-
transition: 0.3s;
|
|
237
|
-
overflow-y: scroll;
|
|
238
|
-
gap: 12px 0;
|
|
239
|
-
${_scrollbar.default}
|
|
240
|
-
|
|
241
|
-
${_ref5 => {
|
|
184
|
+
}, _scrollbar.default, _ref5 => {
|
|
242
185
|
let {
|
|
243
186
|
fixedYear
|
|
244
187
|
} = _ref5;
|
|
245
|
-
return (0, _styledComponents.css)
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}}
|
|
249
|
-
`;
|
|
250
|
-
const Item = _styledComponents.default.button`
|
|
251
|
-
width: calc(100% / 3);
|
|
252
|
-
height: 36px;
|
|
253
|
-
line-height: 36px;
|
|
254
|
-
text-align: center;
|
|
255
|
-
border-radius: var(--border-radius-s);
|
|
256
|
-
padding: 0;
|
|
257
|
-
border: none;
|
|
258
|
-
color: var(--font-on-background);
|
|
259
|
-
background: var(--color-background1);
|
|
260
|
-
|
|
261
|
-
&:hover {
|
|
262
|
-
${_ref6 => {
|
|
188
|
+
return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: ", "px};\n "])), fixedYear ? '144' : '192');
|
|
189
|
+
});
|
|
190
|
+
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 => {
|
|
263
191
|
let {
|
|
264
192
|
disabled
|
|
265
193
|
} = _ref6;
|
|
266
194
|
return !disabled && 'background: var(--color-primary);';
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
${_ref7 => {
|
|
195
|
+
}, _ref7 => {
|
|
271
196
|
let {
|
|
272
197
|
disabled
|
|
273
198
|
} = _ref7;
|
|
274
199
|
return disabled && 'color: var(--font-on-mute)';
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
${_ref8 => {
|
|
200
|
+
}, _ref8 => {
|
|
278
201
|
let {
|
|
279
202
|
selected
|
|
280
203
|
} = _ref8;
|
|
281
204
|
return selected && 'background: var(--color-hover)';
|
|
282
|
-
}
|
|
283
|
-
`;
|
|
205
|
+
});
|
|
284
206
|
var _default = exports.default = Year;
|