@rc-component/picker 1.0.0 → 1.1.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.
@@ -1,5 +1,5 @@
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
- var _excluded = ["active", "showActiveCls", "suffixIcon", "format", "validateFormat", "onChange", "onInput", "helped", "onHelp", "onSubmit", "onKeyDown", "preserveInvalidOnBlur", "invalid", "clearIcon"];
2
+ var _excluded = ["className", "active", "showActiveCls", "suffixIcon", "format", "validateFormat", "onChange", "onInput", "helped", "onHelp", "onSubmit", "onKeyDown", "preserveInvalidOnBlur", "invalid", "clearIcon"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
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
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
@@ -37,7 +37,8 @@ import { getMaskRange } from "./util";
37
37
  // 3. If `cacheValue` match the limit length or cell format (like 1 ~ 12 month), go to next cell
38
38
 
39
39
  var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
40
- var active = props.active,
40
+ var className = props.className,
41
+ active = props.active,
41
42
  _props$showActiveCls = props.showActiveCls,
42
43
  showActiveCls = _props$showActiveCls === void 0 ? true : _props$showActiveCls,
43
44
  suffixIcon = props.suffixIcon,
@@ -353,7 +354,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
353
354
  } : {};
354
355
  return /*#__PURE__*/React.createElement("div", {
355
356
  ref: holderRef,
356
- className: classNames(inputPrefixCls, _defineProperty(_defineProperty({}, "".concat(inputPrefixCls, "-active"), active && showActiveCls), "".concat(inputPrefixCls, "-placeholder"), helped))
357
+ className: classNames(inputPrefixCls, _defineProperty(_defineProperty({}, "".concat(inputPrefixCls, "-active"), active && showActiveCls), "".concat(inputPrefixCls, "-placeholder"), helped), className)
357
358
  }, /*#__PURE__*/React.createElement(Component, _extends({
358
359
  ref: inputRef,
359
360
  "aria-invalid": invalid,
@@ -189,6 +189,7 @@ function RangeSelector(props, ref) {
189
189
  }, prefix), /*#__PURE__*/React.createElement(Input, _extends({
190
190
  ref: inputStartRef
191
191
  }, getInputProps(0), {
192
+ className: "".concat(prefixCls, "-input-start"),
192
193
  autoFocus: startAutoFocus,
193
194
  tabIndex: tabIndex,
194
195
  "date-range": "start"
@@ -197,6 +198,7 @@ function RangeSelector(props, ref) {
197
198
  }, separator), /*#__PURE__*/React.createElement(Input, _extends({
198
199
  ref: inputEndRef
199
200
  }, getInputProps(1), {
201
+ className: "".concat(prefixCls, "-input-end"),
200
202
  autoFocus: endAutoFocus,
201
203
  tabIndex: tabIndex,
202
204
  "date-range": "end"
@@ -472,7 +472,6 @@ function Picker(props, ref) {
472
472
 
473
473
  // Submit with complex picker
474
474
  if (!mergedOpen && complexPicker && !needConfirm && lastOp === 'panel') {
475
- triggerOpen(true);
476
475
  triggerConfirm();
477
476
  }
478
477
  }, [mergedOpen]);
@@ -16,7 +16,7 @@ var _useLockEffect = _interopRequireDefault(require("../hooks/useLockEffect"));
16
16
  var _Icon = _interopRequireDefault(require("./Icon"));
17
17
  var _MaskFormat = _interopRequireDefault(require("./MaskFormat"));
18
18
  var _util2 = require("./util");
19
- var _excluded = ["active", "showActiveCls", "suffixIcon", "format", "validateFormat", "onChange", "onInput", "helped", "onHelp", "onSubmit", "onKeyDown", "preserveInvalidOnBlur", "invalid", "clearIcon"];
19
+ var _excluded = ["className", "active", "showActiveCls", "suffixIcon", "format", "validateFormat", "onChange", "onInput", "helped", "onHelp", "onSubmit", "onKeyDown", "preserveInvalidOnBlur", "invalid", "clearIcon"];
20
20
  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); }
21
21
  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; }
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -45,7 +45,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
45
45
  // 3. If `cacheValue` match the limit length or cell format (like 1 ~ 12 month), go to next cell
46
46
 
47
47
  var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
48
- var active = props.active,
48
+ var className = props.className,
49
+ active = props.active,
49
50
  _props$showActiveCls = props.showActiveCls,
50
51
  showActiveCls = _props$showActiveCls === void 0 ? true : _props$showActiveCls,
51
52
  suffixIcon = props.suffixIcon,
@@ -361,7 +362,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
361
362
  } : {};
362
363
  return /*#__PURE__*/React.createElement("div", {
363
364
  ref: holderRef,
364
- className: (0, _classnames.default)(inputPrefixCls, _defineProperty(_defineProperty({}, "".concat(inputPrefixCls, "-active"), active && showActiveCls), "".concat(inputPrefixCls, "-placeholder"), helped))
365
+ className: (0, _classnames.default)(inputPrefixCls, _defineProperty(_defineProperty({}, "".concat(inputPrefixCls, "-active"), active && showActiveCls), "".concat(inputPrefixCls, "-placeholder"), helped), className)
365
366
  }, /*#__PURE__*/React.createElement(Component, _extends({
366
367
  ref: inputRef,
367
368
  "aria-invalid": invalid,
@@ -198,6 +198,7 @@ function RangeSelector(props, ref) {
198
198
  }, prefix), /*#__PURE__*/React.createElement(_Input.default, _extends({
199
199
  ref: inputStartRef
200
200
  }, getInputProps(0), {
201
+ className: "".concat(prefixCls, "-input-start"),
201
202
  autoFocus: startAutoFocus,
202
203
  tabIndex: tabIndex,
203
204
  "date-range": "start"
@@ -206,6 +207,7 @@ function RangeSelector(props, ref) {
206
207
  }, separator), /*#__PURE__*/React.createElement(_Input.default, _extends({
207
208
  ref: inputEndRef
208
209
  }, getInputProps(1), {
210
+ className: "".concat(prefixCls, "-input-end"),
209
211
  autoFocus: endAutoFocus,
210
212
  tabIndex: tabIndex,
211
213
  "date-range": "end"
@@ -480,7 +480,6 @@ function Picker(props, ref) {
480
480
 
481
481
  // Submit with complex picker
482
482
  if (!mergedOpen && complexPicker && !needConfirm && lastOp === 'panel') {
483
- triggerOpen(true);
484
483
  triggerConfirm();
485
484
  }
486
485
  }, [mergedOpen]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/picker",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "React date & time picker",
5
5
  "keywords": [
6
6
  "react",