@lemon-fe/components 1.1.0 → 1.1.1

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,6 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  interface Props extends HTMLAttributes<HTMLDivElement> {
3
+ bordered?: boolean;
3
4
  children?: ReactNode;
4
5
  /**
5
6
  * 会同时禁用多个表单
@@ -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 = ["children", "className", "disabled", "onFocus", "onBlur", "split"];
2
+ var _excluded = ["children", "className", "disabled", "onFocus", "onBlur", "split", "bordered"];
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); }
@@ -12,9 +12,9 @@ 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 { ConfigProvider, Form } from 'antd';
15
16
  import React, { useContext, useState, Children, cloneElement, isValidElement } from 'react';
16
17
  import { prefixClassName } from "../utils";
17
- import { ConfigProvider, Form } from 'antd';
18
18
  import classNames from 'classnames';
19
19
  var prefix = prefixClassName('input-compact');
20
20
  export default function InputCompact(props) {
@@ -24,6 +24,8 @@ export default function InputCompact(props) {
24
24
  _onFocus = props.onFocus,
25
25
  _onBlur = props.onBlur,
26
26
  split = props.split,
27
+ _props$bordered = props.bordered,
28
+ bordered = _props$bordered === void 0 ? true : _props$bordered,
27
29
  restProps = _objectWithoutProperties(props, _excluded);
28
30
  var inputPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls('input');
29
31
  var _useState = useState(false),
@@ -40,7 +42,7 @@ export default function InputCompact(props) {
40
42
  }
41
43
  var status = Form.Item.useStatus();
42
44
  return /*#__PURE__*/React.createElement("div", _extends({
43
- className: classNames(className, prefix(), inputPrefixCls, _defineProperty(_defineProperty(_defineProperty({}, "".concat(inputPrefixCls, "-focused"), focused), "".concat(inputPrefixCls, "-disabled"), disabled), "".concat(inputPrefixCls, "-status-error"), status.status === 'error')),
45
+ className: classNames(className, prefix(), inputPrefixCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(inputPrefixCls, "-focused"), focused), "".concat(inputPrefixCls, "-disabled"), disabled), "".concat(inputPrefixCls, "-status-error"), status.status === 'error'), "".concat(inputPrefixCls, "-borderless"), !bordered)),
44
46
  onFocus: function onFocus(e) {
45
47
  setFocused(true);
46
48
  _onFocus === null || _onFocus === void 0 || _onFocus(e);
@@ -4,6 +4,10 @@
4
4
  height: @input-height-base;
5
5
  padding: 0;
6
6
 
7
+ &.@{ant-prefix}-input-borderless {
8
+ height: @input-height-base - 2 * @border-width-base;
9
+ }
10
+
7
11
  &-gutter {
8
12
  position: relative;
9
13
  display: block;
@@ -208,6 +208,20 @@ a[title='站长统计'] {
208
208
  &-disabled &-arrow {
209
209
  color: fade(#333, 49);
210
210
  }
211
+
212
+ &-borderless &-selector {
213
+ border: none !important;
214
+ }
215
+
216
+ &-single:not(&-customize-input) &-selector {
217
+ height: unset;
218
+ }
219
+
220
+ // 修复multiple mode tag x没有垂直居中问题
221
+ &-multiple &-selection-item {
222
+ align-items: center;
223
+ line-height: 1 !important;
224
+ }
211
225
  }
212
226
 
213
227
  /** tree */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "registry": "https://registry.npmjs.org"
64
64
  },
65
- "gitHead": "90a7891c02a793d18f56cd80f928ca2a22485630"
65
+ "gitHead": "0d2b6f86e1c9d9998a77bce4b00f4daaef969bcd"
66
66
  }