@rc-component/picker 1.5.1 → 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.
Files changed (41) hide show
  1. package/es/PickerInput/Popup/Footer.js +3 -3
  2. package/es/PickerInput/Popup/index.d.ts +2 -0
  3. package/es/PickerInput/Popup/index.js +11 -6
  4. package/es/PickerInput/RangePicker.js +7 -3
  5. package/es/PickerInput/Selector/Icon.js +2 -2
  6. package/es/PickerInput/Selector/Input.js +4 -4
  7. package/es/PickerInput/Selector/RangeSelector.js +3 -3
  8. package/es/PickerInput/Selector/SingleSelector/MultipleDates.js +2 -2
  9. package/es/PickerInput/Selector/SingleSelector/index.js +3 -3
  10. package/es/PickerInput/SinglePicker.js +7 -3
  11. package/es/PickerPanel/DatePanel/index.js +3 -3
  12. package/es/PickerPanel/PanelBody.js +4 -4
  13. package/es/PickerPanel/PanelHeader.js +6 -6
  14. package/es/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +2 -2
  15. package/es/PickerPanel/TimePanel/TimePanelBody/index.js +2 -2
  16. package/es/PickerPanel/TimePanel/index.js +2 -2
  17. package/es/PickerPanel/WeekPanel/index.js +2 -2
  18. package/es/PickerPanel/index.js +2 -2
  19. package/es/PickerTrigger/index.js +2 -2
  20. package/es/interface.d.ts +1 -1
  21. package/lib/PickerInput/Popup/Footer.js +4 -4
  22. package/lib/PickerInput/Popup/index.d.ts +2 -0
  23. package/lib/PickerInput/Popup/index.js +11 -6
  24. package/lib/PickerInput/RangePicker.js +7 -3
  25. package/lib/PickerInput/Selector/Icon.js +2 -2
  26. package/lib/PickerInput/Selector/Input.js +4 -4
  27. package/lib/PickerInput/Selector/RangeSelector.js +3 -3
  28. package/lib/PickerInput/Selector/SingleSelector/MultipleDates.js +2 -2
  29. package/lib/PickerInput/Selector/SingleSelector/index.js +4 -4
  30. package/lib/PickerInput/SinglePicker.js +7 -3
  31. package/lib/PickerPanel/DatePanel/index.js +4 -4
  32. package/lib/PickerPanel/PanelBody.js +4 -5
  33. package/lib/PickerPanel/PanelHeader.js +6 -7
  34. package/lib/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +2 -2
  35. package/lib/PickerPanel/TimePanel/TimePanelBody/index.js +2 -2
  36. package/lib/PickerPanel/TimePanel/index.js +3 -3
  37. package/lib/PickerPanel/WeekPanel/index.js +3 -3
  38. package/lib/PickerPanel/index.js +3 -3
  39. package/lib/PickerTrigger/index.js +2 -2
  40. package/lib/interface.d.ts +1 -1
  41. 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 cls from 'classnames';
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: cls(nowBtnPrefixCls, nowDisabled && "".concat(nowBtnPrefixCls, "-disabled")),
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: cls("".concat(prefixCls, "-footer"), classNames.popup.footer),
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 classNames from 'classnames';
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: classNames(containerPrefixCls, // Used for Today Button style, safe to remove if no need
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: classNames("".concat(prefixCls, "-range-wrapper"), "".concat(prefixCls, "-").concat(picker, "-range-wrapper"))
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 cls from 'classnames';
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: cls(rootClassName, mergedClassNames.popup.root)
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: cls(filledProps.className, rootClassName, mergedClassNames.root),
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 cls from 'classnames';
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: cls("".concat(prefixCls, "-").concat(type), classNames.suffix),
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 cls from 'classnames';
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: cls(inputPrefixCls, _defineProperty(_defineProperty({}, "".concat(inputPrefixCls, "-active"), active && showActiveCls), "".concat(inputPrefixCls, "-placeholder"), helped), 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 cls from 'classnames';
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: cls(prefixCls, "".concat(prefixCls, "-range"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-focused"), focused), "".concat(prefixCls, "-disabled"), disabled.every(function (i) {
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: cls("".concat(prefixCls, "-prefix"), classNames.prefix),
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 classNames from 'classnames';
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: classNames("".concat(selectionCls, "-item")),
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 cls from 'classnames';
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: cls(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),
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: cls("".concat(prefixCls, "-prefix"), classNames.prefix),
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 cls from 'classnames';
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: cls(rootClassName, mergedClassNames.popup.root)
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: cls(filledProps.className, rootClassName, mergedClassNames.root),
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 classNames from 'classnames';
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: classNames(cellPrefixCls, "".concat(cellPrefixCls, "-week"), _defineProperty({}, "".concat(cellPrefixCls, "-disabled"), disabled))
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: classNames(panelPrefixCls, showWeek && "".concat(panelPrefixCls, "-show-week"))
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 cls from 'classnames';
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: cls(cellPrefixCls, classNames.item, _objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-disabled"), disabled), "".concat(cellPrefixCls, "-hover"), (hoverValue || []).some(function (date) {
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: cls("".concat(prefixCls, "-body"), classNames.body),
152
+ className: clsx("".concat(prefixCls, "-body"), classNames.body),
153
153
  style: styles.body
154
154
  }, /*#__PURE__*/React.createElement("table", {
155
- className: cls("".concat(prefixCls, "-content"), classNames.content),
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 cls from 'classnames';
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: cls(headerPrefixCls, classNames.header),
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: cls(superPrevBtnCls, disabledSuperOffsetPrev && "".concat(superPrevBtnCls, "-disabled")),
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: cls(prevBtnCls, disabledOffsetPrev && "".concat(prevBtnCls, "-disabled")),
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: cls(nextBtnCls, disabledOffsetNext && "".concat(nextBtnCls, "-disabled")),
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: cls(superNextBtnCls, disabledSuperOffsetNext && "".concat(superNextBtnCls, "-disabled")),
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 cls from 'classnames';
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: cls(cellPrefixCls, classNames.item, _defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-selected"), value === unitValue), "".concat(cellPrefixCls, "-disabled"), disabled)),
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 cls from 'classnames';
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: cls("".concat(prefixCls, "-content"), classNames.content),
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 classNames from 'classnames';
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: classNames(panelPrefixCls)
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 classNames from 'classnames';
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 classNames(rowPrefixCls, _defineProperty({}, "".concat(rowPrefixCls, "-selected"), !hoverRangeValue && isSameWeek(generateConfig, localeName, value, currentDate)),
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
  };
@@ -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 classNames from 'classnames';
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: classNames(panelCls, _defineProperty({}, "".concat(panelCls, "-rtl"), direction === 'rtl'))
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 classNames from 'classnames';
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: classNames(popupClassName, _defineProperty(_defineProperty({}, "".concat(dropdownPrefixCls, "-range"), range), "".concat(dropdownPrefixCls, "-rtl"), direction === 'rtl')),
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;
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = Footer;
8
- var _classnames = _interopRequireDefault(require("classnames"));
8
+ var _clsx = require("clsx");
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var _useTimeInfo3 = _interopRequireDefault(require("../../hooks/useTimeInfo"));
11
11
  var _context = _interopRequireDefault(require("../context"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
13
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
16
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
17
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -62,7 +62,7 @@ function Footer(props) {
62
62
  var presetNode = showNow && /*#__PURE__*/React.createElement("li", {
63
63
  className: nowPrefixCls
64
64
  }, /*#__PURE__*/React.createElement("a", {
65
- className: (0, _classnames.default)(nowBtnPrefixCls, nowDisabled && "".concat(nowBtnPrefixCls, "-disabled")),
65
+ className: (0, _clsx.clsx)(nowBtnPrefixCls, nowDisabled && "".concat(nowBtnPrefixCls, "-disabled")),
66
66
  "aria-disabled": nowDisabled,
67
67
  onClick: onInternalNow
68
68
  }, internalMode === 'date' ? locale.today : locale.now));
@@ -83,7 +83,7 @@ function Footer(props) {
83
83
  return null;
84
84
  }
85
85
  return /*#__PURE__*/React.createElement("div", {
86
- className: (0, _classnames.default)("".concat(prefixCls, "-footer"), classNames.popup.footer),
86
+ className: (0, _clsx.clsx)("".concat(prefixCls, "-footer"), classNames.popup.footer),
87
87
  style: styles.popup.footer
88
88
  }, extraNode && /*#__PURE__*/React.createElement("div", {
89
89
  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;