@easyv/react-components 0.3.4 → 0.3.6

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.
@@ -7,6 +7,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
7
7
  import { LinearColorPanel } from "../LinearColorPicker";
8
8
  import { PureColorPanel } from "../PureColorPicker";
9
9
  import { PuresColorPanel } from "../PuresColorPicker";
10
+ import { RangeColorPanel } from "../RangeColorPicker";
10
11
  import ColorTypeTabs from "./ColorTypeTab";
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -64,6 +65,15 @@ export default function MixedPanel(_ref) {
64
65
  onChangeComplete: handleChangeComplete('linear')
65
66
  });
66
67
  }
68
+ case 'range':
69
+ {
70
+ return /*#__PURE__*/_jsx(RangeColorPanel, {
71
+ disabledAlpha: disabledAlpha,
72
+ value: value['range'],
73
+ onChange: handleChange('range'),
74
+ onChangeComplete: handleChangeComplete('range')
75
+ });
76
+ }
67
77
  default:
68
78
  {
69
79
  console.error('unknown color picker type');
@@ -1,5 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["value", "defaultValue", "enableEmpty", "autoSelect", "changeOnBlur", "onPressEnter", "onFocus", "onBlur", "onChange"],
2
+ var _excluded = ["value", "defaultValue", "enableEmpty", "autoSelect", "changeOnBlur", "bordered", "className", "onPressEnter", "onFocus", "onBlur", "onChange"],
3
3
  _excluded2 = ["onSearch"];
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -18,6 +18,7 @@ import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'rea
18
18
  import { Input } from '@arco-design/web-react';
19
19
  import { SearchCircleOutlined } from '@easyv/react-icons';
20
20
  import "./index.less";
21
+ import classNames from 'classnames';
21
22
  import { jsx as _jsx } from "react/jsx-runtime";
22
23
  var XInput = /*#__PURE__*/forwardRef(function (props, ref) {
23
24
  var _halfControlledProps;
@@ -26,6 +27,9 @@ var XInput = /*#__PURE__*/forwardRef(function (props, ref) {
26
27
  enableEmpty = props.enableEmpty,
27
28
  autoSelect = props.autoSelect,
28
29
  changeOnBlur = props.changeOnBlur,
30
+ _props$bordered = props.bordered,
31
+ bordered = _props$bordered === void 0 ? true : _props$bordered,
32
+ className = props.className,
29
33
  onPressEnter = props.onPressEnter,
30
34
  onFocus = props.onFocus,
31
35
  onBlur = props.onBlur,
@@ -82,7 +86,10 @@ var XInput = /*#__PURE__*/forwardRef(function (props, ref) {
82
86
  return /*#__PURE__*/_jsx(Input, _objectSpread(_objectSpread({
83
87
  ref: ref,
84
88
  onPressEnter: handlePressEnter,
85
- onFocus: handleFocus
89
+ onFocus: handleFocus,
90
+ className: classNames({
91
+ 'arco-input-borderless': !bordered
92
+ }, className)
86
93
  }, changeOnBlur ? halfControlledProps : 'value' in props ? {
87
94
  value: value,
88
95
  onBlur: onBlur,
@@ -96,13 +103,10 @@ var XInput = /*#__PURE__*/forwardRef(function (props, ref) {
96
103
  var InputSearch = /*#__PURE__*/forwardRef(function (_ref, ref) {
97
104
  var onSearch = _ref.onSearch,
98
105
  restProps = _objectWithoutProperties(_ref, _excluded2);
99
- return /*#__PURE__*/_jsx(Input, _objectSpread({
106
+ return /*#__PURE__*/_jsx(XInput, _objectSpread({
100
107
  ref: ref,
101
108
  prefix: /*#__PURE__*/_jsx(SearchCircleOutlined, {}),
102
- onChange: onSearch,
103
- onPressEnter: function onPressEnter(e) {
104
- return e.currentTarget.blur();
105
- }
109
+ onChange: onSearch
106
110
  }, restProps));
107
111
  });
108
112
  export default XInput;
@@ -69,6 +69,13 @@
69
69
  }
70
70
  }
71
71
 
72
+ .arco-input-group-wrapper.arco-input-borderless {
73
+ .arco-input-inner-wrapper {
74
+ border: none;
75
+ box-shadow: none;
76
+ }
77
+ }
78
+
72
79
  // 修改后缀的间距
73
80
  .arco-input-has-suffix {
74
81
  .arco-input-group {
@@ -1,9 +1,14 @@
1
1
  import type { InputProps } from '@arco-design/web-react';
2
2
  import type { InputSearchProps, RefInputType } from '@arco-design/web-react/es/Input';
3
3
  interface XInputProps extends InputProps {
4
+ /** 是否允许文本为空 */
4
5
  enableEmpty?: boolean;
6
+ /** 是否聚焦后自动选中输入框的文本 */
5
7
  autoSelect?: boolean;
8
+ /** 是否失去焦点时,触发 onChange 事件 */
6
9
  changeOnBlur?: boolean;
10
+ /** 显示边框 */
11
+ bordered?: boolean;
7
12
  }
8
13
  interface XInputSearchProps extends InputSearchProps {
9
14
  bordered?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/react-components",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "a react component library base on arco design",
5
5
  "license": "MIT",
6
6
  "sideEffects": [