assui 2.1.49 → 2.1.50

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,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { SelectProps } from 'antd/lib/select';
3
3
  export interface ASelectProps extends SelectProps {
4
+ className?: string;
4
5
  valueRender?: (value: any) => React.ReactNode;
5
6
  }
6
7
  declare const ASelect: {
@@ -14,6 +14,19 @@ var __assign = this && this.__assign || function () {
14
14
  return __assign.apply(this, arguments);
15
15
  };
16
16
 
17
+ var __rest = this && this.__rest || function (s, e) {
18
+ var t = {};
19
+
20
+ for (var p in s) {
21
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
22
+ }
23
+
24
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
25
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
26
+ }
27
+ return t;
28
+ };
29
+
17
30
  var __read = this && this.__read || function (o, n) {
18
31
  var m = typeof Symbol === "function" && o[Symbol.iterator];
19
32
  if (!m) return o;
@@ -43,27 +56,32 @@ var __read = this && this.__read || function (o, n) {
43
56
 
44
57
  import React from 'react';
45
58
  import Select from "antd/es/select";
59
+ import classNames from 'classnames';
46
60
  import useControllableValue from "ahooks/es/useControllableValue";
47
61
 
48
62
  var ASelect = function ASelect(props) {
49
- var valueRender = props.valueRender;
63
+ var valueRender = props.valueRender,
64
+ className = props.className,
65
+ restProps = __rest(props, ["valueRender", "className"]);
50
66
 
51
67
  var _a = __read(useControllableValue(props), 2),
52
68
  value = _a[0],
53
69
  onChange = _a[1];
54
70
 
55
71
  if (!valueRender) {
56
- return /*#__PURE__*/React.createElement(Select, __assign({}, props, {
72
+ return /*#__PURE__*/React.createElement(Select, __assign({
73
+ className: className
74
+ }, restProps, {
57
75
  value: value,
58
76
  onChange: onChange
59
77
  }));
60
78
  }
61
79
 
62
80
  return /*#__PURE__*/React.createElement("div", {
63
- className: "a-select-wrap"
81
+ className: classNames('a-select-wrap', className)
64
82
  }, /*#__PURE__*/React.createElement("div", {
65
83
  className: "a-select-value-wrap"
66
- }, valueRender(value)), /*#__PURE__*/React.createElement(Select, __assign({}, props, {
84
+ }, valueRender(value)), /*#__PURE__*/React.createElement(Select, __assign({}, restProps, {
67
85
  value: value,
68
86
  onChange: onChange
69
87
  })));
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface TableColProps {
3
+ children: React.ReactNode;
4
+ width?: number;
5
+ className?: string;
6
+ }
7
+ declare const TableCol: React.FC<TableColProps>;
8
+ export default TableCol;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+
3
+ var TableCol = function TableCol(_a) {
4
+ var children = _a.children,
5
+ width = _a.width,
6
+ className = _a.className;
7
+ return /*#__PURE__*/React.createElement("div", {
8
+ style: {
9
+ width: "".concat(width, "px")
10
+ },
11
+ className: className
12
+ }, children);
13
+ };
14
+
15
+ export default TableCol;
@@ -0,0 +1 @@
1
+
File without changes
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { SelectProps } from 'antd/lib/select';
3
3
  export interface ASelectProps extends SelectProps {
4
+ className?: string;
4
5
  valueRender?: (value: any) => React.ReactNode;
5
6
  }
6
7
  declare const ASelect: {
@@ -16,6 +16,19 @@ var __assign = this && this.__assign || function () {
16
16
  return __assign.apply(this, arguments);
17
17
  };
18
18
 
19
+ var __rest = this && this.__rest || function (s, e) {
20
+ var t = {};
21
+
22
+ for (var p in s) {
23
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
24
+ }
25
+
26
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
28
+ }
29
+ return t;
30
+ };
31
+
19
32
  var __read = this && this.__read || function (o, n) {
20
33
  var m = typeof Symbol === "function" && o[Symbol.iterator];
21
34
  if (!m) return o;
@@ -57,27 +70,33 @@ var react_1 = __importDefault(require("react"));
57
70
 
58
71
  var select_1 = __importDefault(require("antd/lib/select"));
59
72
 
73
+ var classnames_1 = __importDefault(require("classnames"));
74
+
60
75
  var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
61
76
 
62
77
  var ASelect = function ASelect(props) {
63
- var valueRender = props.valueRender;
78
+ var valueRender = props.valueRender,
79
+ className = props.className,
80
+ restProps = __rest(props, ["valueRender", "className"]);
64
81
 
65
82
  var _a = __read((0, useControllableValue_1["default"])(props), 2),
66
83
  value = _a[0],
67
84
  onChange = _a[1];
68
85
 
69
86
  if (!valueRender) {
70
- return react_1["default"].createElement(select_1["default"], __assign({}, props, {
87
+ return react_1["default"].createElement(select_1["default"], __assign({
88
+ className: className
89
+ }, restProps, {
71
90
  value: value,
72
91
  onChange: onChange
73
92
  }));
74
93
  }
75
94
 
76
95
  return react_1["default"].createElement("div", {
77
- className: "a-select-wrap"
96
+ className: (0, classnames_1["default"])('a-select-wrap', className)
78
97
  }, react_1["default"].createElement("div", {
79
98
  className: "a-select-value-wrap"
80
- }, valueRender(value)), react_1["default"].createElement(select_1["default"], __assign({}, props, {
99
+ }, valueRender(value)), react_1["default"].createElement(select_1["default"], __assign({}, restProps, {
81
100
  value: value,
82
101
  onChange: onChange
83
102
  })));
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface TableColProps {
3
+ children: React.ReactNode;
4
+ width?: number;
5
+ className?: string;
6
+ }
7
+ declare const TableCol: React.FC<TableColProps>;
8
+ export default TableCol;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ var __importDefault = this && this.__importDefault || function (mod) {
4
+ return mod && mod.__esModule ? mod : {
5
+ "default": mod
6
+ };
7
+ };
8
+
9
+ Object.defineProperty(exports, "__esModule", {
10
+ value: true
11
+ });
12
+
13
+ var react_1 = __importDefault(require("react"));
14
+
15
+ var TableCol = function TableCol(_a) {
16
+ var children = _a.children,
17
+ width = _a.width,
18
+ className = _a.className;
19
+ return react_1["default"].createElement("div", {
20
+ style: {
21
+ width: "".concat(width, "px")
22
+ },
23
+ className: className
24
+ }, children);
25
+ };
26
+
27
+ exports["default"] = TableCol;
@@ -0,0 +1 @@
1
+
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "2.1.49",
3
+ "version": "2.1.50",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -34,7 +34,7 @@
34
34
  "@tinymce/tinymce-react": "^4.0.0",
35
35
  "@types/react-beautiful-dnd": "^13.1.2",
36
36
  "@types/react-resizable": "^3.0.0",
37
- "a-icons": "^1.0.82",
37
+ "a-icons": "^1.0.83",
38
38
  "aa-utils": "^2.0.35",
39
39
  "ahooks": "^3.0.8",
40
40
  "bignumber.js": "^9.0.1",
@@ -73,5 +73,5 @@
73
73
  "node": ">=10.0.0"
74
74
  },
75
75
  "license": "MIT",
76
- "gitHead": "3e163baa98a60dbc6fc828fb859a73e15bb46093"
76
+ "gitHead": "9fdda4197f9bfd225a2fd786ad4c178fe16937a5"
77
77
  }