@rc-component/picker 1.5.0 → 1.6.0
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/es/PickerInput/Popup/Footer.js +3 -3
- package/es/PickerInput/Popup/index.d.ts +2 -0
- package/es/PickerInput/Popup/index.js +11 -6
- package/es/PickerInput/RangePicker.js +7 -3
- package/es/PickerInput/Selector/Icon.js +2 -2
- package/es/PickerInput/Selector/Input.js +4 -4
- package/es/PickerInput/Selector/RangeSelector.js +3 -3
- package/es/PickerInput/Selector/SingleSelector/MultipleDates.js +2 -2
- package/es/PickerInput/Selector/SingleSelector/index.js +3 -3
- package/es/PickerInput/SinglePicker.js +7 -3
- package/es/PickerPanel/DatePanel/index.js +3 -3
- package/es/PickerPanel/PanelBody.js +4 -4
- package/es/PickerPanel/PanelHeader.js +6 -6
- package/es/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +2 -2
- package/es/PickerPanel/TimePanel/TimePanelBody/index.js +2 -2
- package/es/PickerPanel/TimePanel/index.js +2 -2
- package/es/PickerPanel/WeekPanel/index.js +2 -2
- package/es/PickerPanel/index.js +2 -2
- package/es/PickerTrigger/index.js +2 -2
- package/es/interface.d.ts +1 -1
- package/es/locale/mr_IN.d.ts +3 -0
- package/es/locale/mr_IN.js +38 -0
- package/lib/PickerInput/Popup/Footer.js +4 -4
- package/lib/PickerInput/Popup/index.d.ts +2 -0
- package/lib/PickerInput/Popup/index.js +11 -6
- package/lib/PickerInput/RangePicker.js +7 -3
- package/lib/PickerInput/Selector/Icon.js +2 -2
- package/lib/PickerInput/Selector/Input.js +4 -4
- package/lib/PickerInput/Selector/RangeSelector.js +3 -3
- package/lib/PickerInput/Selector/SingleSelector/MultipleDates.js +2 -2
- package/lib/PickerInput/Selector/SingleSelector/index.js +4 -4
- package/lib/PickerInput/SinglePicker.js +7 -3
- package/lib/PickerPanel/DatePanel/index.js +4 -4
- package/lib/PickerPanel/PanelBody.js +4 -5
- package/lib/PickerPanel/PanelHeader.js +6 -7
- package/lib/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +2 -2
- package/lib/PickerPanel/TimePanel/TimePanelBody/index.js +2 -2
- package/lib/PickerPanel/TimePanel/index.js +3 -3
- package/lib/PickerPanel/WeekPanel/index.js +3 -3
- package/lib/PickerPanel/index.js +3 -3
- package/lib/PickerTrigger/index.js +2 -2
- package/lib/interface.d.ts +1 -1
- package/lib/locale/mr_IN.d.ts +3 -0
- package/lib/locale/mr_IN.js +44 -0
- package/package.json +9 -9
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import
|
|
7
|
+
import { clsx } from 'clsx';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import useTimeInfo from "../../hooks/useTimeInfo";
|
|
10
10
|
import PickerContext from "../context";
|
|
@@ -52,7 +52,7 @@ export default function Footer(props) {
|
|
|
52
52
|
var presetNode = showNow && /*#__PURE__*/React.createElement("li", {
|
|
53
53
|
className: nowPrefixCls
|
|
54
54
|
}, /*#__PURE__*/React.createElement("a", {
|
|
55
|
-
className:
|
|
55
|
+
className: clsx(nowBtnPrefixCls, nowDisabled && "".concat(nowBtnPrefixCls, "-disabled")),
|
|
56
56
|
"aria-disabled": nowDisabled,
|
|
57
57
|
onClick: onInternalNow
|
|
58
58
|
}, internalMode === 'date' ? locale.today : locale.now));
|
|
@@ -73,7 +73,7 @@ export default function Footer(props) {
|
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
75
|
return /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className:
|
|
76
|
+
className: clsx("".concat(prefixCls, "-footer"), classNames.popup.footer),
|
|
77
77
|
style: styles.popup.footer
|
|
78
78
|
}, extraNode && /*#__PURE__*/React.createElement("div", {
|
|
79
79
|
className: "".concat(prefixCls, "-footer-extra")
|
|
@@ -16,5 +16,7 @@ export interface PopupProps<DateType extends object = any, PresetValue = DateTyp
|
|
|
16
16
|
isInvalid: (date: DateType | DateType[]) => boolean;
|
|
17
17
|
onOk: VoidFunction;
|
|
18
18
|
onPanelMouseDown?: React.MouseEventHandler<HTMLDivElement>;
|
|
19
|
+
classNames?: SharedPickerProps['classNames'];
|
|
20
|
+
styles?: SharedPickerProps['styles'];
|
|
19
21
|
}
|
|
20
22
|
export default function Popup<DateType extends object = any>(props: PopupProps<DateType>): React.JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
2
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
6
|
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); }
|
|
@@ -9,7 +11,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
9
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
10
12
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
11
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
import
|
|
14
|
+
import { clsx } from 'clsx';
|
|
13
15
|
import ResizeObserver from '@rc-component/resize-observer';
|
|
14
16
|
import * as React from 'react';
|
|
15
17
|
import { toArray } from "../../utils/miscUtil";
|
|
@@ -18,6 +20,7 @@ import Footer from "./Footer";
|
|
|
18
20
|
import PopupPanel from "./PopupPanel";
|
|
19
21
|
import PresetPanel from "./PresetPanel";
|
|
20
22
|
export default function Popup(props) {
|
|
23
|
+
var _classNames$popup, _styles$popup;
|
|
21
24
|
var panelRender = props.panelRender,
|
|
22
25
|
internalMode = props.internalMode,
|
|
23
26
|
picker = props.picker,
|
|
@@ -38,7 +41,9 @@ export default function Popup(props) {
|
|
|
38
41
|
isInvalid = props.isInvalid,
|
|
39
42
|
defaultOpenValue = props.defaultOpenValue,
|
|
40
43
|
onOk = props.onOk,
|
|
41
|
-
onSubmit = props.onSubmit
|
|
44
|
+
onSubmit = props.onSubmit,
|
|
45
|
+
classNames = props.classNames,
|
|
46
|
+
styles = props.styles;
|
|
42
47
|
var _React$useContext = React.useContext(PickerContext),
|
|
43
48
|
prefixCls = _React$useContext.prefixCls;
|
|
44
49
|
var panelPrefixCls = "".concat(prefixCls, "-panel");
|
|
@@ -168,9 +173,9 @@ export default function Popup(props) {
|
|
|
168
173
|
var renderNode = /*#__PURE__*/React.createElement("div", {
|
|
169
174
|
onMouseDown: onPanelMouseDown,
|
|
170
175
|
tabIndex: -1,
|
|
171
|
-
className:
|
|
172
|
-
"".concat(prefixCls, "-").concat(internalMode, "-panel-container")),
|
|
173
|
-
style: _defineProperty(_defineProperty({}, rtl ? marginRight : marginLeft, containerOffset), rtl ? marginLeft : marginRight, 'auto')
|
|
176
|
+
className: clsx(containerPrefixCls, // Used for Today Button style, safe to remove if no need
|
|
177
|
+
"".concat(prefixCls, "-").concat(internalMode, "-panel-container"), classNames === null || classNames === void 0 || (_classNames$popup = classNames.popup) === null || _classNames$popup === void 0 ? void 0 : _classNames$popup.container),
|
|
178
|
+
style: _objectSpread(_defineProperty(_defineProperty({}, rtl ? marginRight : marginLeft, containerOffset), rtl ? marginLeft : marginRight, 'auto'), styles === null || styles === void 0 || (_styles$popup = styles.popup) === null || _styles$popup === void 0 ? void 0 : _styles$popup.container)
|
|
174
179
|
// Still wish not to lose focus on mouse down
|
|
175
180
|
// onMouseDown={(e) => {
|
|
176
181
|
// // e.preventDefault();
|
|
@@ -183,7 +188,7 @@ export default function Popup(props) {
|
|
|
183
188
|
renderNode = /*#__PURE__*/React.createElement("div", {
|
|
184
189
|
onMouseDown: onPanelMouseDown,
|
|
185
190
|
ref: wrapperRef,
|
|
186
|
-
className:
|
|
191
|
+
className: clsx("".concat(prefixCls, "-range-wrapper"), "".concat(prefixCls, "-").concat(picker, "-range-wrapper"))
|
|
187
192
|
}, /*#__PURE__*/React.createElement("div", {
|
|
188
193
|
ref: arrowRef,
|
|
189
194
|
className: "".concat(prefixCls, "-range-arrow"),
|
|
@@ -16,7 +16,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
16
16
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
import { useEvent, useControlledState } from '@rc-component/util';
|
|
19
|
-
import
|
|
19
|
+
import { clsx } from 'clsx';
|
|
20
20
|
import useLayoutEffect from "@rc-component/util/es/hooks/useLayoutEffect";
|
|
21
21
|
import omit from "@rc-component/util/es/omit";
|
|
22
22
|
import pickAttrs from "@rc-component/util/es/pickAttrs";
|
|
@@ -473,6 +473,10 @@ function RangePicker(props, ref) {
|
|
|
473
473
|
// Render
|
|
474
474
|
,
|
|
475
475
|
cellRender: onInternalCellRender
|
|
476
|
+
// Styles
|
|
477
|
+
,
|
|
478
|
+
classNames: mergedClassNames,
|
|
479
|
+
styles: mergedStyles
|
|
476
480
|
}));
|
|
477
481
|
|
|
478
482
|
// ========================================================
|
|
@@ -593,7 +597,7 @@ function RangePicker(props, ref) {
|
|
|
593
597
|
}, /*#__PURE__*/React.createElement(PickerTrigger, _extends({}, pickTriggerProps(filledProps), {
|
|
594
598
|
popupElement: panel,
|
|
595
599
|
popupStyle: mergedStyles.popup.root,
|
|
596
|
-
popupClassName:
|
|
600
|
+
popupClassName: clsx(rootClassName, mergedClassNames.popup.root)
|
|
597
601
|
// Visible
|
|
598
602
|
,
|
|
599
603
|
visible: mergedOpen,
|
|
@@ -608,7 +612,7 @@ function RangePicker(props, ref) {
|
|
|
608
612
|
ref: selectorRef
|
|
609
613
|
// Style
|
|
610
614
|
,
|
|
611
|
-
className:
|
|
615
|
+
className: clsx(filledProps.className, rootClassName, mergedClassNames.root),
|
|
612
616
|
style: _objectSpread(_objectSpread({}, mergedStyles.root), filledProps.style)
|
|
613
617
|
// Icon
|
|
614
618
|
,
|
|
@@ -5,7 +5,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PickerContext from "../context";
|
|
8
|
-
import
|
|
8
|
+
import { clsx } from 'clsx';
|
|
9
9
|
export default function Icon(props) {
|
|
10
10
|
var icon = props.icon,
|
|
11
11
|
type = props.type,
|
|
@@ -15,7 +15,7 @@ export default function Icon(props) {
|
|
|
15
15
|
classNames = _React$useContext.classNames,
|
|
16
16
|
styles = _React$useContext.styles;
|
|
17
17
|
return icon ? /*#__PURE__*/React.createElement("span", _extends({
|
|
18
|
-
className:
|
|
18
|
+
className: clsx("".concat(prefixCls, "-").concat(type), classNames.suffix),
|
|
19
19
|
style: styles.suffix
|
|
20
20
|
}, restProps), icon) : null;
|
|
21
21
|
}
|
|
@@ -12,7 +12,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
-
import
|
|
15
|
+
import { clsx } from 'clsx';
|
|
16
16
|
import { useEvent } from '@rc-component/util';
|
|
17
17
|
import useLayoutEffect from "@rc-component/util/es/hooks/useLayoutEffect";
|
|
18
18
|
import raf from "@rc-component/util/es/raf";
|
|
@@ -96,8 +96,8 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
96
96
|
}, [value]);
|
|
97
97
|
|
|
98
98
|
// ========================= Refs =========================
|
|
99
|
-
var holderRef = React.useRef();
|
|
100
|
-
var inputRef = React.useRef();
|
|
99
|
+
var holderRef = React.useRef(null);
|
|
100
|
+
var inputRef = React.useRef(null);
|
|
101
101
|
React.useImperativeHandle(ref, function () {
|
|
102
102
|
return {
|
|
103
103
|
nativeElement: holderRef.current,
|
|
@@ -356,7 +356,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
356
356
|
} : {};
|
|
357
357
|
return /*#__PURE__*/React.createElement("div", {
|
|
358
358
|
ref: holderRef,
|
|
359
|
-
className:
|
|
359
|
+
className: clsx(inputPrefixCls, _defineProperty(_defineProperty({}, "".concat(inputPrefixCls, "-active"), active && showActiveCls), "".concat(inputPrefixCls, "-placeholder"), helped), className)
|
|
360
360
|
}, /*#__PURE__*/React.createElement(Component, _extends({
|
|
361
361
|
ref: inputRef,
|
|
362
362
|
"aria-invalid": invalid,
|
|
@@ -15,7 +15,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
16
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
-
import
|
|
18
|
+
import { clsx } from 'clsx';
|
|
19
19
|
import ResizeObserver from '@rc-component/resize-observer';
|
|
20
20
|
import { useEvent } from '@rc-component/util';
|
|
21
21
|
import * as React from 'react';
|
|
@@ -169,7 +169,7 @@ function RangeSelector(props, ref) {
|
|
|
169
169
|
return /*#__PURE__*/React.createElement(ResizeObserver, {
|
|
170
170
|
onResize: syncActiveOffset
|
|
171
171
|
}, /*#__PURE__*/React.createElement("div", _extends({}, rootProps, {
|
|
172
|
-
className:
|
|
172
|
+
className: clsx(prefixCls, "".concat(prefixCls, "-range"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-disabled"), disabled.every(function (i) {
|
|
173
173
|
return i;
|
|
174
174
|
})), "".concat(prefixCls, "-invalid"), invalid.some(function (i) {
|
|
175
175
|
return i;
|
|
@@ -187,7 +187,7 @@ function RangeSelector(props, ref) {
|
|
|
187
187
|
_onMouseDown === null || _onMouseDown === void 0 || _onMouseDown(e);
|
|
188
188
|
}
|
|
189
189
|
}), prefix && /*#__PURE__*/React.createElement("div", {
|
|
190
|
-
className:
|
|
190
|
+
className: clsx("".concat(prefixCls, "-prefix"), classNames.prefix),
|
|
191
191
|
style: styles.prefix
|
|
192
192
|
}, prefix), /*#__PURE__*/React.createElement(Input, _extends({
|
|
193
193
|
ref: inputStartRef
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import Overflow from 'rc-overflow';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
export default function MultipleDates(props) {
|
|
@@ -18,7 +18,7 @@ export default function MultipleDates(props) {
|
|
|
18
18
|
// ========================= Item =========================
|
|
19
19
|
function renderSelector(content, onClose) {
|
|
20
20
|
return /*#__PURE__*/React.createElement("span", {
|
|
21
|
-
className:
|
|
21
|
+
className: clsx("".concat(selectionCls, "-item")),
|
|
22
22
|
title: typeof content === 'string' ? content : null
|
|
23
23
|
}, /*#__PURE__*/React.createElement("span", {
|
|
24
24
|
className: "".concat(selectionCls, "-item-content")
|
|
@@ -14,7 +14,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
|
-
import
|
|
17
|
+
import { clsx } from 'clsx';
|
|
18
18
|
import * as React from 'react';
|
|
19
19
|
import { isSame } from "../../../utils/dateUtil";
|
|
20
20
|
import PickerContext from "../../context";
|
|
@@ -164,7 +164,7 @@ function SingleSelector(props, ref) {
|
|
|
164
164
|
|
|
165
165
|
// ======================== Render ========================
|
|
166
166
|
return /*#__PURE__*/React.createElement("div", _extends({}, rootProps, {
|
|
167
|
-
className:
|
|
167
|
+
className: clsx(prefixCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-multiple"), multiple), "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-invalid"), invalid), "".concat(prefixCls, "-rtl"), rtl), className),
|
|
168
168
|
style: style,
|
|
169
169
|
ref: rootRef,
|
|
170
170
|
onClick: onClick
|
|
@@ -179,7 +179,7 @@ function SingleSelector(props, ref) {
|
|
|
179
179
|
_onMouseDown === null || _onMouseDown === void 0 || _onMouseDown(e);
|
|
180
180
|
}
|
|
181
181
|
}), prefix && /*#__PURE__*/React.createElement("div", {
|
|
182
|
-
className:
|
|
182
|
+
className: clsx("".concat(prefixCls, "-prefix"), classNames.prefix),
|
|
183
183
|
style: styles.prefix
|
|
184
184
|
}, prefix), selectorNode);
|
|
185
185
|
}
|
|
@@ -16,7 +16,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
16
16
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
import { useEvent, useControlledState } from '@rc-component/util';
|
|
19
|
-
import
|
|
19
|
+
import { clsx } from 'clsx';
|
|
20
20
|
import useLayoutEffect from "@rc-component/util/es/hooks/useLayoutEffect";
|
|
21
21
|
import omit from "@rc-component/util/es/omit";
|
|
22
22
|
import pickAttrs from "@rc-component/util/es/pickAttrs";
|
|
@@ -416,6 +416,10 @@ function Picker(props, ref) {
|
|
|
416
416
|
// Render
|
|
417
417
|
,
|
|
418
418
|
cellRender: onInternalCellRender
|
|
419
|
+
// Styles
|
|
420
|
+
,
|
|
421
|
+
classNames: mergedClassNames,
|
|
422
|
+
styles: mergedStyles
|
|
419
423
|
}));
|
|
420
424
|
|
|
421
425
|
// ========================================================
|
|
@@ -497,7 +501,7 @@ function Picker(props, ref) {
|
|
|
497
501
|
}, /*#__PURE__*/React.createElement(PickerTrigger, _extends({}, pickTriggerProps(filledProps), {
|
|
498
502
|
popupElement: panel,
|
|
499
503
|
popupStyle: mergedStyles.popup.root,
|
|
500
|
-
popupClassName:
|
|
504
|
+
popupClassName: clsx(rootClassName, mergedClassNames.popup.root)
|
|
501
505
|
// Visible
|
|
502
506
|
,
|
|
503
507
|
visible: mergedOpen,
|
|
@@ -509,7 +513,7 @@ function Picker(props, ref) {
|
|
|
509
513
|
ref: selectorRef
|
|
510
514
|
// Style
|
|
511
515
|
,
|
|
512
|
-
className:
|
|
516
|
+
className: clsx(filledProps.className, rootClassName, mergedClassNames.root),
|
|
513
517
|
style: _objectSpread(_objectSpread({}, mergedStyles.root), filledProps.style)
|
|
514
518
|
// Icon
|
|
515
519
|
,
|
|
@@ -9,7 +9,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
9
9
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
10
10
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
import
|
|
12
|
+
import { clsx } from 'clsx';
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { formatValue, getWeekStartDate, isSameDate, isSameMonth, WEEK_DAY_COUNT } from "../../utils/dateUtil";
|
|
15
15
|
import { PanelContext, useInfo } from "../context";
|
|
@@ -53,7 +53,7 @@ export default function DatePanel(props) {
|
|
|
53
53
|
});
|
|
54
54
|
return /*#__PURE__*/React.createElement("td", {
|
|
55
55
|
key: "week",
|
|
56
|
-
className:
|
|
56
|
+
className: clsx(cellPrefixCls, "".concat(cellPrefixCls, "-week"), _defineProperty({}, "".concat(cellPrefixCls, "-disabled"), disabled))
|
|
57
57
|
// Operation: Same as code in PanelBody
|
|
58
58
|
,
|
|
59
59
|
onClick: function onClick() {
|
|
@@ -151,7 +151,7 @@ export default function DatePanel(props) {
|
|
|
151
151
|
return /*#__PURE__*/React.createElement(PanelContext.Provider, {
|
|
152
152
|
value: info
|
|
153
153
|
}, /*#__PURE__*/React.createElement("div", {
|
|
154
|
-
className:
|
|
154
|
+
className: clsx(panelPrefixCls, showWeek && "".concat(panelPrefixCls, "-show-week"))
|
|
155
155
|
}, /*#__PURE__*/React.createElement(PanelHeader, {
|
|
156
156
|
offset: function offset(distance) {
|
|
157
157
|
return generateConfig.addMonth(pickerValue, distance);
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import
|
|
13
|
+
import { clsx } from 'clsx';
|
|
14
14
|
import * as React from 'react';
|
|
15
15
|
import { formatValue, isInRange, isSame } from "../utils/dateUtil";
|
|
16
16
|
import { PickerHackContext, usePanelContext } from "./context";
|
|
@@ -104,7 +104,7 @@ export default function PanelBody(props) {
|
|
|
104
104
|
rowNode.push( /*#__PURE__*/React.createElement("td", {
|
|
105
105
|
key: col,
|
|
106
106
|
title: title,
|
|
107
|
-
className:
|
|
107
|
+
className: clsx(cellPrefixCls, classNames.item, _objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-disabled"), disabled), "".concat(cellPrefixCls, "-hover"), (hoverValue || []).some(function (date) {
|
|
108
108
|
return isSame(generateConfig, locale, currentDate, date, type);
|
|
109
109
|
})), "".concat(cellPrefixCls, "-in-range"), inRange && !rangeStart && !rangeEnd), "".concat(cellPrefixCls, "-range-start"), rangeStart), "".concat(cellPrefixCls, "-range-end"), rangeEnd), "".concat(prefixCls, "-cell-selected"), !hoverRangeValue &&
|
|
110
110
|
// WeekPicker use row instead
|
|
@@ -149,10 +149,10 @@ export default function PanelBody(props) {
|
|
|
149
149
|
|
|
150
150
|
// ============================== Render ==============================
|
|
151
151
|
return /*#__PURE__*/React.createElement("div", {
|
|
152
|
-
className:
|
|
152
|
+
className: clsx("".concat(prefixCls, "-body"), classNames.body),
|
|
153
153
|
style: styles.body
|
|
154
154
|
}, /*#__PURE__*/React.createElement("table", {
|
|
155
|
-
className:
|
|
155
|
+
className: clsx("".concat(prefixCls, "-content"), classNames.content),
|
|
156
156
|
style: styles.content
|
|
157
157
|
}, headerCells && /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, headerCells)), /*#__PURE__*/React.createElement("tbody", null, rows)));
|
|
158
158
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { isSameOrAfter } from "../utils/dateUtil";
|
|
4
4
|
import { PickerHackContext, usePanelContext } from "./context";
|
|
@@ -87,7 +87,7 @@ function PanelHeader(props) {
|
|
|
87
87
|
var superPrevBtnCls = "".concat(headerPrefixCls, "-super-prev-btn");
|
|
88
88
|
var superNextBtnCls = "".concat(headerPrefixCls, "-super-next-btn");
|
|
89
89
|
return /*#__PURE__*/React.createElement("div", {
|
|
90
|
-
className:
|
|
90
|
+
className: clsx(headerPrefixCls, classNames.header),
|
|
91
91
|
style: styles.header
|
|
92
92
|
}, superOffset && /*#__PURE__*/React.createElement("button", {
|
|
93
93
|
type: "button",
|
|
@@ -96,7 +96,7 @@ function PanelHeader(props) {
|
|
|
96
96
|
return onSuperOffset(-1);
|
|
97
97
|
},
|
|
98
98
|
tabIndex: -1,
|
|
99
|
-
className:
|
|
99
|
+
className: clsx(superPrevBtnCls, disabledSuperOffsetPrev && "".concat(superPrevBtnCls, "-disabled")),
|
|
100
100
|
disabled: disabledSuperOffsetPrev,
|
|
101
101
|
style: hidePrev ? HIDDEN_STYLE : {}
|
|
102
102
|
}, superPrevIcon), offset && /*#__PURE__*/React.createElement("button", {
|
|
@@ -106,7 +106,7 @@ function PanelHeader(props) {
|
|
|
106
106
|
return onOffset(-1);
|
|
107
107
|
},
|
|
108
108
|
tabIndex: -1,
|
|
109
|
-
className:
|
|
109
|
+
className: clsx(prevBtnCls, disabledOffsetPrev && "".concat(prevBtnCls, "-disabled")),
|
|
110
110
|
disabled: disabledOffsetPrev,
|
|
111
111
|
style: hidePrev ? HIDDEN_STYLE : {}
|
|
112
112
|
}, prevIcon), /*#__PURE__*/React.createElement("div", {
|
|
@@ -118,7 +118,7 @@ function PanelHeader(props) {
|
|
|
118
118
|
return onOffset(1);
|
|
119
119
|
},
|
|
120
120
|
tabIndex: -1,
|
|
121
|
-
className:
|
|
121
|
+
className: clsx(nextBtnCls, disabledOffsetNext && "".concat(nextBtnCls, "-disabled")),
|
|
122
122
|
disabled: disabledOffsetNext,
|
|
123
123
|
style: hideNext ? HIDDEN_STYLE : {}
|
|
124
124
|
}, nextIcon), superOffset && /*#__PURE__*/React.createElement("button", {
|
|
@@ -128,7 +128,7 @@ function PanelHeader(props) {
|
|
|
128
128
|
return onSuperOffset(1);
|
|
129
129
|
},
|
|
130
130
|
tabIndex: -1,
|
|
131
|
-
className:
|
|
131
|
+
className: clsx(superNextBtnCls, disabledSuperOffsetNext && "".concat(superNextBtnCls, "-disabled")),
|
|
132
132
|
disabled: disabledSuperOffsetNext,
|
|
133
133
|
style: hideNext ? HIDDEN_STYLE : {}
|
|
134
134
|
}, superNextIcon));
|
|
@@ -12,7 +12,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
12
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
13
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
import
|
|
15
|
+
import { clsx } from 'clsx';
|
|
16
16
|
import useLayoutEffect from "@rc-component/util/es/hooks/useLayoutEffect";
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
import { usePanelContext } from "../../context";
|
|
@@ -122,7 +122,7 @@ export default function TimeColumn(props) {
|
|
|
122
122
|
return /*#__PURE__*/React.createElement("li", {
|
|
123
123
|
key: unitValue,
|
|
124
124
|
style: styles.item,
|
|
125
|
-
className:
|
|
125
|
+
className: clsx(cellPrefixCls, classNames.item, _defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-selected"), value === unitValue), "".concat(cellPrefixCls, "-disabled"), disabled)),
|
|
126
126
|
onClick: function onClick() {
|
|
127
127
|
if (!disabled) {
|
|
128
128
|
onChange(unitValue);
|
|
@@ -10,7 +10,7 @@ import useTimeInfo from "../../../hooks/useTimeInfo";
|
|
|
10
10
|
import { formatValue } from "../../../utils/dateUtil";
|
|
11
11
|
import { PickerHackContext, usePanelContext } from "../../context";
|
|
12
12
|
import TimeColumn from "./TimeColumn";
|
|
13
|
-
import
|
|
13
|
+
import { clsx } from 'clsx';
|
|
14
14
|
function isAM(hour) {
|
|
15
15
|
return hour < 12;
|
|
16
16
|
}
|
|
@@ -247,7 +247,7 @@ export default function TimePanelBody(props) {
|
|
|
247
247
|
changeOnScroll: changeOnScroll
|
|
248
248
|
};
|
|
249
249
|
return /*#__PURE__*/React.createElement("div", {
|
|
250
|
-
className:
|
|
250
|
+
className: clsx("".concat(prefixCls, "-content"), classNames.content),
|
|
251
251
|
style: styles.content
|
|
252
252
|
}, showHour && /*#__PURE__*/React.createElement(TimeColumn, _extends({
|
|
253
253
|
units: hourUnits,
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import
|
|
7
|
+
import { clsx } from 'clsx';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { formatValue } from "../../utils/dateUtil";
|
|
10
10
|
import { PanelContext, useInfo } from "../context";
|
|
@@ -29,7 +29,7 @@ export default function TimePanel(props) {
|
|
|
29
29
|
return /*#__PURE__*/React.createElement(PanelContext.Provider, {
|
|
30
30
|
value: info
|
|
31
31
|
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
className:
|
|
32
|
+
className: clsx(panelPrefixCls)
|
|
33
33
|
}, /*#__PURE__*/React.createElement(PanelHeader, null, value ? formatValue(value, {
|
|
34
34
|
locale: locale,
|
|
35
35
|
format: format,
|
|
@@ -9,7 +9,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
9
9
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
10
10
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
import
|
|
12
|
+
import { clsx } from 'clsx';
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { isInRange, isSameWeek } from "../../utils/dateUtil";
|
|
15
15
|
import DatePanel from "../DatePanel";
|
|
@@ -41,7 +41,7 @@ export default function WeekPanel(props) {
|
|
|
41
41
|
return isSameWeek(generateConfig, localeName, currentDate, date);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return clsx(rowPrefixCls, _defineProperty({}, "".concat(rowPrefixCls, "-selected"), !hoverRangeValue && isSameWeek(generateConfig, localeName, value, currentDate)),
|
|
45
45
|
// Patch for hover range
|
|
46
46
|
rangeCls);
|
|
47
47
|
};
|
package/es/PickerPanel/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
15
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
16
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
-
import
|
|
18
|
+
import { clsx } from 'clsx';
|
|
19
19
|
import { useEvent, useControlledState, warning } from '@rc-component/util';
|
|
20
20
|
import * as React from 'react';
|
|
21
21
|
import useLocale from "../hooks/useLocale";
|
|
@@ -285,7 +285,7 @@ function PickerPanel(props, ref) {
|
|
|
285
285
|
}, /*#__PURE__*/React.createElement("div", {
|
|
286
286
|
ref: rootRef,
|
|
287
287
|
tabIndex: tabIndex,
|
|
288
|
-
className:
|
|
288
|
+
className: clsx(panelCls, _defineProperty({}, "".concat(panelCls, "-rtl"), direction === 'rtl'))
|
|
289
289
|
}, /*#__PURE__*/React.createElement(PanelComponent, _extends({}, panelProps, {
|
|
290
290
|
// Time
|
|
291
291
|
showTime: mergedShowTime
|
|
@@ -3,7 +3,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
4
|
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); }
|
|
5
5
|
import Trigger from '@rc-component/trigger';
|
|
6
|
-
import
|
|
6
|
+
import { clsx } from 'clsx';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { getRealPlacement } from "../utils/uiUtil";
|
|
9
9
|
import PickerContext from "../PickerInput/context";
|
|
@@ -72,7 +72,7 @@ function PickerTrigger(_ref) {
|
|
|
72
72
|
popup: popupElement,
|
|
73
73
|
popupAlign: popupAlign,
|
|
74
74
|
popupVisible: visible,
|
|
75
|
-
popupClassName:
|
|
75
|
+
popupClassName: clsx(popupClassName, _defineProperty(_defineProperty({}, "".concat(dropdownPrefixCls, "-range"), range), "".concat(dropdownPrefixCls, "-rtl"), direction === 'rtl')),
|
|
76
76
|
popupStyle: popupStyle,
|
|
77
77
|
stretch: "minWidth",
|
|
78
78
|
getPopupContainer: getPopupContainer,
|
package/es/interface.d.ts
CHANGED
|
@@ -208,7 +208,7 @@ export type PickerFocusEventHandler = (e: React.FocusEvent<HTMLElement>, info: B
|
|
|
208
208
|
export type LegacyOnKeyDown = (event: React.KeyboardEvent<HTMLElement>, preventDefault: VoidFunction) => void;
|
|
209
209
|
export type SemanticName = 'root' | 'prefix' | 'input' | 'suffix';
|
|
210
210
|
export type PreviewValueType = 'hover';
|
|
211
|
-
export type PanelSemanticName = 'root' | 'header' | 'body' | 'content' | 'item' | 'footer';
|
|
211
|
+
export type PanelSemanticName = 'root' | 'header' | 'body' | 'content' | 'item' | 'footer' | 'container';
|
|
212
212
|
export interface SharedPickerProps<DateType extends object = any> extends SharedHTMLAttrs, Pick<SharedPanelProps<DateType>, 'prevIcon' | 'nextIcon' | 'superPrevIcon' | 'superNextIcon'> {
|
|
213
213
|
direction?: 'ltr' | 'rtl';
|
|
214
214
|
prefixCls?: string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import { commonLocale } from "./common";
|
|
8
|
+
var locale = _objectSpread(_objectSpread({}, commonLocale), {}, {
|
|
9
|
+
fieldDateFormat: 'DD-MM-YYYY',
|
|
10
|
+
fieldDateTimeFormat: 'DD-MM-YYYY HH:mm:ss',
|
|
11
|
+
fieldMonthFormat: 'MM-YYYY',
|
|
12
|
+
locale: 'mr_IN',
|
|
13
|
+
today: 'आज',
|
|
14
|
+
now: 'आता',
|
|
15
|
+
backToToday: 'आजवर परत जा',
|
|
16
|
+
ok: 'ठीक आहे',
|
|
17
|
+
clear: 'साफ करा',
|
|
18
|
+
week: 'आठवडा',
|
|
19
|
+
month: 'महिना',
|
|
20
|
+
year: 'वर्ष',
|
|
21
|
+
timeSelect: 'वेळ निवडा',
|
|
22
|
+
dateSelect: 'दिनांक निवडा',
|
|
23
|
+
weekSelect: 'आठवडा निवडा',
|
|
24
|
+
monthSelect: 'महिना निवडा',
|
|
25
|
+
yearSelect: 'वर्ष निवडा',
|
|
26
|
+
decadeSelect: 'दशक निवडा',
|
|
27
|
+
previousMonth: 'मागील महिना (पेजअप)',
|
|
28
|
+
nextMonth: 'पुढचा महिना (पेजडाउन)',
|
|
29
|
+
previousYear: 'गेल्या वर्षी (Ctrl + left)',
|
|
30
|
+
nextYear: 'पुढचे वर्ष (Ctrl + right)',
|
|
31
|
+
previousDecade: 'मागील दशक',
|
|
32
|
+
nextDecade: 'पुढचे दशक',
|
|
33
|
+
previousCentury: 'मागील शतक',
|
|
34
|
+
nextCentury: 'पुढचे शतक',
|
|
35
|
+
shortWeekDays: ['रवि', 'सोम', 'मंगळ', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
|
|
36
|
+
shortMonths: ['जाने', 'फेब्रु', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ऑगस्ट', 'सप्टें', 'ऑक्टो', 'नोव्हें', 'डिसें']
|
|
37
|
+
});
|
|
38
|
+
export default locale;
|