UNPKG

drip-table

Version:

A tiny and powerful enterprise-class solution for building tables.

58 lines (50 loc) 3.29 kB
var _excluded = ["mini"], _excluded2 = ["bordered"]; 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); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 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; } 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; } /* * This file is part of the drip-table project. * @link : https://drip-table.jd.com/ * @author : Emil Zhai (root@derzh.com) * @modifier : Emil Zhai (root@derzh.com) * @copyright: Copyright (c) 2021 JD Network Technology Co., Ltd. */ import "./index.less"; import classNames from 'classnames'; import RcSelect from 'rc-select'; import React from 'react'; var prefixCls = 'jfe-drip-table-rc-select'; var Select = Object.assign({}, RcSelect, /*#__PURE__*/React.memo(function (_ref) { var _classNames; var mini = _ref.mini, props = _objectWithoutProperties(_ref, _excluded); var _props$bordered = props.bordered, bordered = _props$bordered === void 0 ? true : _props$bordered, others = _objectWithoutProperties(props, _excluded2); return /*#__PURE__*/React.createElement(RcSelect, _extends({}, others, { prefixCls: prefixCls, className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-sm"), mini), _defineProperty(_classNames, "".concat(prefixCls, "-borderless"), !bordered), _classNames)), transitionName: "jfe-drip-table-motion-slide-up", listHeight: 256, listItemHeight: 24, inputIcon: /*#__PURE__*/React.createElement("span", { role: "img", "aria-label": "down", className: "".concat(prefixCls, "-suffix") }, /*#__PURE__*/React.createElement("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": "down", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true" }, /*#__PURE__*/React.createElement("path", { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" }))), menuItemSelectedIcon: null })); })); export default Select;