gxxc-ui 1.0.7 → 1.0.8

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.
package/README.md CHANGED
@@ -39,3 +39,13 @@ $ npm run doctor
39
39
  ## LICENSE
40
40
 
41
41
  MIT
42
+
43
+
44
+ ### 版本日志
45
+ ```
46
+ v1.0.0 合并上海代码
47
+ v1.0.4 第一个可以使用的版本
48
+ v1.0.7 修复筛选列表的bug
49
+
50
+ ```
51
+
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ declare const AnchorUI: (props: any) => React.JSX.Element;
4
+ export default AnchorUI;
@@ -0,0 +1,9 @@
1
+ import { ButtonProps } from 'antd';
2
+ import React from 'react';
3
+ import './index.scss';
4
+ interface ButtonUIProps extends ButtonProps {
5
+ iconPosition?: 'start' | 'end';
6
+ children?: React.ReactNode;
7
+ }
8
+ declare const ButtonUI: React.FC<ButtonUIProps>;
9
+ export default ButtonUI;
@@ -0,0 +1,5 @@
1
+ import 'dayjs/locale/zh-cn';
2
+ import React from 'react';
3
+ import './index.scss';
4
+ declare const DateUI: (props: any) => React.JSX.Element;
5
+ export default DateUI;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ interface IProps {
4
+ items: ItemType[];
5
+ isSingleLine?: boolean;
6
+ labelWidth?: number | string;
7
+ type?: 'table' | 'text';
8
+ layout?: 'horizontal' | 'vertical';
9
+ labelAlign?: 'left' | 'right';
10
+ colon?: boolean;
11
+ }
12
+ interface ItemType {
13
+ label: string;
14
+ children: React.ReactNode;
15
+ span?: number;
16
+ noDataHide?: boolean;
17
+ }
18
+ declare const DescriptionsUI: (props: IProps) => React.JSX.Element;
19
+ export default DescriptionsUI;
@@ -13,7 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
  import { Affix, Cascader, Form, Space } from 'antd';
15
15
  import React, { useEffect, useState } from 'react';
16
- import { ButtonUI, DateUI, IconUI, SearchUI, SelectUI } from "./..";
16
+ import { ButtonUI, DateUI, IconUI, SearchUI, SearchNumberUI, SelectUI } from "./..";
17
17
  import "./index.scss";
18
18
  var FilterUI = function FilterUI(props) {
19
19
  var form = props.form,
@@ -138,6 +138,13 @@ var FilterUI = function FilterUI(props) {
138
138
  }, /*#__PURE__*/React.createElement(SearchUI, _extends({
139
139
  placeholder: option.label
140
140
  }, option === null || option === void 0 ? void 0 : option.renderProps)));
141
+ case 'searchNumber':
142
+ return /*#__PURE__*/React.createElement(Form.Item, {
143
+ key: option.key,
144
+ name: option.key
145
+ }, /*#__PURE__*/React.createElement(SearchNumberUI, _extends({
146
+ placeholder: option.label
147
+ }, option === null || option === void 0 ? void 0 : option.renderProps)));
141
148
  case 'select':
142
149
  return /*#__PURE__*/React.createElement(Form.Item, {
143
150
  key: option.key,
@@ -0,0 +1,4 @@
1
+ import './index.scss';
2
+ /** 继承关系,继续完善 */
3
+ declare const FormUI: any;
4
+ export default FormUI;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ declare const InputUI: {
4
+ (props: any): React.JSX.Element;
5
+ Range: (props: any) => React.JSX.Element;
6
+ };
7
+ export default InputUI;
@@ -0,0 +1,3 @@
1
+ import { message as MessageUI } from 'antd';
2
+ import './index.scss';
3
+ export default MessageUI;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ declare const ModalUI: (props: any) => React.JSX.Element;
4
+ export default ModalUI;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const NotificationUI: (props: any) => React.JSX.Element;
3
+ export default NotificationUI;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ declare const SearchNumberUI: (props: any) => React.JSX.Element;
4
+ export default SearchNumberUI;
@@ -0,0 +1,57 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { Flex, Input } from 'antd';
8
+ import React, { useEffect, useState } from 'react';
9
+ import { IconUI } from "./..";
10
+ import "./index.scss";
11
+ // 搜索框
12
+ var timer;
13
+ var SearchNumberUI = function SearchNumberUI(props) {
14
+ var value = props.value,
15
+ placeholder = props.placeholder,
16
+ onChange = props.onChange;
17
+ var _useState = useState(),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ searchValue = _useState2[0],
20
+ setSearchValue = _useState2[1];
21
+ useEffect(function () {
22
+ var ee = value === null || value === void 0 ? void 0 : value.replace(/[^0-9]/g, '');
23
+ setSearchValue(ee);
24
+ return function () {
25
+ clearTimeout(timer);
26
+ };
27
+ }, [value]);
28
+ var valueChange = function valueChange(e) {
29
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'change' || (e === null || e === void 0 ? void 0 : e.type) === 'compositionend') {
30
+ var ee = e.target.value.replace(/[^0-9]/g, '');
31
+ setSearchValue(ee);
32
+ clearTimeout(timer);
33
+ timer = setTimeout(function () {
34
+ onChange(ee);
35
+ }, 500);
36
+ }
37
+ };
38
+ return /*#__PURE__*/React.createElement(Input.Search, {
39
+ value: searchValue,
40
+ className: "sic-searchui",
41
+ onChange: function onChange(e) {
42
+ return valueChange(e);
43
+ },
44
+ allowClear: true,
45
+ onSearch: function onSearch(e) {
46
+ onChange(e.trim());
47
+ },
48
+ placeholder: placeholder,
49
+ enterButton: /*#__PURE__*/React.createElement(Flex, {
50
+ align: "center",
51
+ gap: 4
52
+ }, /*#__PURE__*/React.createElement(IconUI, {
53
+ name: "Search"
54
+ }), /*#__PURE__*/React.createElement("div", null, "\u641C\u7D22"))
55
+ });
56
+ };
57
+ export default SearchNumberUI;
@@ -0,0 +1,20 @@
1
+ .sic-searchui {
2
+ font-size: 13px;
3
+ width: 320px;
4
+ .ant-input-search-button {
5
+ padding: 0 8px;
6
+ }
7
+ .ant-input-group-addon {
8
+ .ant-btn-variant-solid {
9
+ color: var(--themeColor);
10
+ background-color: #fff;
11
+ border: 1px solid #d9d9d9;
12
+ box-shadow: none;
13
+ }
14
+ .ant-btn-variant-solid:hover {
15
+ color: var(--themeColor);
16
+ background-color: #fff;
17
+ border: 1px solid var(--themeColor);
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ declare const SwitchUI: (props: any) => React.JSX.Element;
4
+ export default SwitchUI;
package/dist/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export { default as NotificationUI } from './NotificationUI';
21
21
  export { default as PasswordStrongUI } from './PasswordStrongUI';
22
22
  export { default as RichEditorUI } from './RichEditorUI';
23
23
  export { default as SearchUI } from './SearchUI';
24
+ export { default as SearchNumberUI } from './SearchNumberUI';
24
25
  export { default as SelectUI } from './SelectUI';
25
26
  export { default as StatisticUI } from './StatisticUI';
26
27
  export { default as SwitchUI } from './SwitchUI';
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ export { default as NotificationUI } from "./NotificationUI";
21
21
  export { default as PasswordStrongUI } from "./PasswordStrongUI";
22
22
  export { default as RichEditorUI } from "./RichEditorUI";
23
23
  export { default as SearchUI } from "./SearchUI";
24
+ export { default as SearchNumberUI } from "./SearchNumberUI";
24
25
  export { default as SelectUI } from "./SelectUI";
25
26
  export { default as StatisticUI } from "./StatisticUI";
26
27
  export { default as SwitchUI } from "./SwitchUI";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gxxc-ui",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -48,7 +48,7 @@
48
48
  "@icon-park/react": "^1.4.2",
49
49
  "@wangeditor/editor": "^5.1.23",
50
50
  "@wangeditor/editor-for-react": "^1.0.6",
51
- "antd": "^5.26.2",
51
+ "antd": "^5.26.7",
52
52
  "dayjs": "^1.11.11",
53
53
  "lodash": "^4.17.21",
54
54
  "react-countup": "^6.5.3",