@qn-pandora/pandora-component 2.1.2 → 3.0.0

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.
Files changed (121) hide show
  1. package/CHANGELOG.json +25 -0
  2. package/CHANGELOG.md +11 -0
  3. package/es/components/AutoComplete/style.css +17 -13
  4. package/es/components/Button/style.css +2 -3
  5. package/es/components/Button/style.less +0 -1
  6. package/es/components/Card/index.js +2 -1
  7. package/es/components/CheckTransformList/Item/index.js +1 -1
  8. package/es/components/CheckTransformList/style.css +25 -17
  9. package/es/components/CheckboxList/index.d.ts +1 -0
  10. package/es/components/CheckboxList/index.js +3 -2
  11. package/es/components/Collapse/index.js +2 -1
  12. package/es/components/CollapsiblePanel/index.d.ts +2 -2
  13. package/es/components/ConfigProvider/index.js +2 -1
  14. package/es/components/DateTimePicker/Base/index.js +2 -2
  15. package/es/components/DateTimePicker/Base/style.css +13 -13
  16. package/es/components/DateTimePicker/BaseMobile/index.d.ts +1 -0
  17. package/es/components/DateTimePicker/BaseMobile/index.js +2 -2
  18. package/es/components/DateTimePicker/DisplayInput/style.css +16 -16
  19. package/es/components/DateTimePicker/index.d.ts +6 -1
  20. package/es/components/DateTimePicker/index.js +2 -2
  21. package/es/components/Input/NumberInput/index.d.ts +29 -0
  22. package/es/components/Input/NumberInput/index.js +116 -0
  23. package/es/components/Input/index.d.ts +1 -0
  24. package/es/components/Input/index.js +4 -1
  25. package/es/components/Input/style.css +19 -16
  26. package/es/components/Input/style.less +4 -0
  27. package/es/components/InputNumber/style.css +6 -6
  28. package/es/components/Menu/index.d.ts +2 -2
  29. package/es/components/NameLimiter/index.d.ts +3 -13
  30. package/es/components/NameLimiter/index.js +30 -39
  31. package/es/components/NameLimiter/style.css +9 -1
  32. package/es/components/NameLimiter/style.less +10 -1
  33. package/es/components/OptionList/index.js +2 -1
  34. package/es/components/RangeInput/style.css +22 -22
  35. package/es/components/RemarkName/index.d.ts +0 -2
  36. package/es/components/RemarkName/index.js +2 -4
  37. package/es/components/RemarkName/style.css +9 -5
  38. package/es/components/RemarkName/style.less +0 -5
  39. package/es/components/Selector/style.css +17 -13
  40. package/es/components/Selector/style.less +7 -3
  41. package/es/components/SolidRadioGroup/index.d.ts +3 -2
  42. package/es/components/SolidRadioGroup/index.js +7 -4
  43. package/es/components/SolidRadioGroup/style.css +13 -6
  44. package/es/components/SolidRadioGroup/style.less +16 -3
  45. package/es/components/Steps/index.js +2 -1
  46. package/es/components/Table/index.d.ts +9 -24
  47. package/es/components/Table/index.js +40 -8
  48. package/es/components/Table/style.css +11 -8
  49. package/es/components/Table/style.less +6 -0
  50. package/es/components/TagList/Tag/style.css +3 -3
  51. package/es/components/TagList/Tag/style.less +3 -3
  52. package/es/components/TagList/index.js +3 -2
  53. package/es/components/TagList/style.css +3 -3
  54. package/es/components/TagList/style.less +8 -8
  55. package/es/index.css +1804 -1784
  56. package/es/index.d.ts +2 -2
  57. package/es/index.js +1 -1
  58. package/es/index.less +2 -2
  59. package/es/style/theme.less +9 -7
  60. package/lib/components/AutoComplete/style.css +17 -13
  61. package/lib/components/Button/style.css +2 -3
  62. package/lib/components/Button/style.less +0 -1
  63. package/lib/components/Card/index.js +1 -1
  64. package/lib/components/CheckTransformList/Item/index.js +1 -1
  65. package/lib/components/CheckTransformList/style.css +25 -17
  66. package/lib/components/CheckboxList/index.d.ts +1 -0
  67. package/lib/components/CheckboxList/index.js +3 -2
  68. package/lib/components/Collapse/index.js +1 -1
  69. package/lib/components/CollapsiblePanel/index.d.ts +2 -2
  70. package/lib/components/ConfigProvider/index.js +1 -1
  71. package/lib/components/DateTimePicker/Base/index.js +2 -2
  72. package/lib/components/DateTimePicker/Base/style.css +13 -13
  73. package/lib/components/DateTimePicker/BaseMobile/index.d.ts +1 -0
  74. package/lib/components/DateTimePicker/BaseMobile/index.js +2 -2
  75. package/lib/components/DateTimePicker/DisplayInput/style.css +16 -16
  76. package/lib/components/DateTimePicker/index.d.ts +6 -1
  77. package/lib/components/DateTimePicker/index.js +2 -2
  78. package/lib/components/Input/NumberInput/index.d.ts +29 -0
  79. package/lib/components/Input/NumberInput/index.js +121 -0
  80. package/lib/components/Input/index.d.ts +1 -0
  81. package/lib/components/Input/index.js +3 -1
  82. package/lib/components/Input/style.css +19 -16
  83. package/lib/components/Input/style.less +4 -0
  84. package/lib/components/InputNumber/style.css +6 -6
  85. package/lib/components/Menu/index.d.ts +2 -2
  86. package/lib/components/NameLimiter/index.d.ts +3 -13
  87. package/lib/components/NameLimiter/index.js +30 -38
  88. package/lib/components/NameLimiter/style.css +9 -1
  89. package/lib/components/NameLimiter/style.less +10 -1
  90. package/lib/components/OptionList/index.js +1 -1
  91. package/lib/components/RangeInput/style.css +22 -22
  92. package/lib/components/RemarkName/index.d.ts +0 -2
  93. package/lib/components/RemarkName/index.js +2 -4
  94. package/lib/components/RemarkName/style.css +9 -5
  95. package/lib/components/RemarkName/style.less +0 -5
  96. package/lib/components/Selector/style.css +17 -13
  97. package/lib/components/Selector/style.less +7 -3
  98. package/lib/components/SolidRadioGroup/index.d.ts +3 -2
  99. package/lib/components/SolidRadioGroup/index.js +6 -3
  100. package/lib/components/SolidRadioGroup/style.css +13 -6
  101. package/lib/components/SolidRadioGroup/style.less +16 -3
  102. package/lib/components/Steps/index.js +1 -1
  103. package/lib/components/Table/index.d.ts +9 -24
  104. package/lib/components/Table/index.js +39 -7
  105. package/lib/components/Table/style.css +11 -8
  106. package/lib/components/Table/style.less +6 -0
  107. package/lib/components/TagList/Tag/style.css +3 -3
  108. package/lib/components/TagList/Tag/style.less +3 -3
  109. package/lib/components/TagList/index.js +2 -2
  110. package/lib/components/TagList/style.css +3 -3
  111. package/lib/components/TagList/style.less +8 -8
  112. package/lib/index.css +116 -96
  113. package/lib/index.d.ts +2 -2
  114. package/lib/index.js +0 -1
  115. package/lib/index.less +2 -2
  116. package/lib/style/theme.less +9 -7
  117. package/package.json +23 -23
  118. package/es/components/NameLimiter/transformer.d.ts +0 -6
  119. package/es/components/NameLimiter/transformer.js +0 -84
  120. package/lib/components/NameLimiter/transformer.d.ts +0 -6
  121. package/lib/components/NameLimiter/transformer.js +0 -91
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@qn-pandora/pandora-component",
3
- "version": "2.1.2",
3
+ "version": "3.0.0",
4
4
  "description": "基础组件",
5
5
  "author": "pandora <pandora@qiniu.com>",
6
- "homepage": "https://github.com/qbox/pandora-visualization#readme",
6
+ "homepage": "https://github.com/qbox/phoenix#readme",
7
7
  "license": "ISC",
8
8
  "main": "lib/index.js",
9
9
  "module": "es/index.js",
@@ -22,28 +22,24 @@
22
22
  "**/*.css"
23
23
  ],
24
24
  "publishConfig": {
25
- "registry": "http://registry.npmjs.org/"
25
+ "registry": "https://registry.npmjs.org/"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "git+https://github.com/qbox/pandora-visualization.git"
29
+ "url": "git+https://github.com/qbox/phoenix.git"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "pandora-tools build esm && pandora-tools build cjs",
33
33
  "test": "jest",
34
- "storybook": "pandora-tools storybook start --port 9000 --static-dir ./public",
35
- "storybook:build": "pandora-tools storybook build --static-dir ./public",
36
- "prettier": "prettier -l 'src/**/*.{ts,tsx,less,css}'",
37
- "lint": "npm run prettier && ../../hack/check-tsc.sh && eslint 'src/**/*.ts*' && tslint './src/**/*.ts*'"
34
+ "storybook": "pandora-tools storybook start --port 9000",
35
+ "storybook:build": "pandora-tools storybook build",
36
+ "prettier": "prettier -l 'src/**/*.{ts,tsx,less,css}'"
38
37
  },
39
38
  "bugs": {
40
- "url": "https://github.com/qbox/pandora-visualization/issues"
39
+ "url": "https://github.com/qbox/phoenix/issues"
41
40
  },
42
41
  "peerDependencies": {
43
- "@ant-design/compatible": "^1.0.8",
44
- "@ant-design/icons": "^4.6.2",
45
- "@types/react": "^16.14.5",
46
- "antd": "^4.16.3",
42
+ "antd": "4.16.3",
47
43
  "lodash": "^4.17.15",
48
44
  "mobx": "^4.15.4",
49
45
  "mobx-react": "5.4.4",
@@ -52,9 +48,12 @@
52
48
  "devDependencies": {
53
49
  "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0",
54
50
  "@babel/plugin-proposal-decorators": "^7.8.3",
55
- "@qn-pandora/pandora-tools": "^0.1.0",
56
- "@storybook/addon-docs": "^5.3.19",
51
+ "@qn-pandora/pandora-tools": "^1.0.0",
57
52
  "@svgr/webpack": "^5.4.0",
53
+ "@types/classnames": "^2.2.7",
54
+ "@types/react": "^16.14.5",
55
+ "@types/react-measure": "^2.0.4",
56
+ "@types/prop-types": "^15.7.1",
58
57
  "@types/css": "^0.0.31",
59
58
  "@types/jest": "^25.2.3",
60
59
  "@types/lodash": "^4.14.152",
@@ -62,7 +61,7 @@
62
61
  "@typescript-eslint/eslint-plugin": "^4.1.0",
63
62
  "@typescript-eslint/eslint-plugin-tslint": "^4.1.0",
64
63
  "@typescript-eslint/parser": "^4.1.0",
65
- "antd": "^4.16.3",
64
+ "antd": "4.16.3",
66
65
  "antd-mobile": "^2.3.3",
67
66
  "babel-loader": "^8.1.0",
68
67
  "copy-webpack-plugin": "^5.1.1",
@@ -78,7 +77,7 @@
78
77
  "mini-css-extract-plugin": "^0.9.0",
79
78
  "mobx": "^4.15.4",
80
79
  "mobx-react": "5.4.4",
81
- "prettier": "^2.1.2",
80
+ "prettier": "2.0.5",
82
81
  "query-string": "^6.12.1",
83
82
  "react": "^16.8.6",
84
83
  "ts-jest": "^26.0.0",
@@ -93,13 +92,14 @@
93
92
  "webpack-node-externals": "^1.7.2"
94
93
  },
95
94
  "dependencies": {
96
- "@ant-design/compatible": "^1.0.8",
97
- "@ant-design/icons": "^4.6.2",
98
- "@qn-pandora/pandora-component-icons": "^1.1.2",
99
- "antd-mobile": "^2.3.3",
95
+ "@ant-design/compatible": "1.0.8",
96
+ "@ant-design/icons": "4.6.2",
97
+ "@qn-pandora/pandora-component-icons": "^2.0.0",
98
+ "antd-mobile": "2.3.3",
100
99
  "css": "^2.2.4",
100
+ "classnames": "^2.2.6",
101
101
  "moment": "^2.29.1",
102
+ "prop-types": "^15.7.2",
102
103
  "react-measure": "^2.5.2"
103
- },
104
- "gitHead": "e40cc5176b3636881d95d71b66cfdbebe13c466e"
104
+ }
105
105
  }
@@ -1,6 +0,0 @@
1
- import { SplitType } from './index';
2
- export declare function getBytes(value?: string): number;
3
- export declare function isChinese(char?: string): boolean;
4
- export declare function getPrefixString(value?: string, length?: number): string;
5
- export declare function getSuffixString(value?: string, length?: number): string;
6
- export declare function getTransformerString(value?: string, length?: number, type?: SplitType): string;
@@ -1,84 +0,0 @@
1
- var __values = (this && this.__values) || function(o) {
2
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3
- if (m) return m.call(o);
4
- if (o && typeof o.length === "number") return {
5
- next: function () {
6
- if (o && i >= o.length) o = void 0;
7
- return { value: o && o[i++], done: !o };
8
- }
9
- };
10
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11
- };
12
- import { SplitType } from './index';
13
- export function getBytes(value) {
14
- if (value === void 0) { value = ''; }
15
- return (value.replace(/[^\x00-\xff]/g, '--') || '').length;
16
- }
17
- export function isChinese(char) {
18
- if (char === void 0) { char = ''; }
19
- return /[^\x00-\xff]/g.test(char);
20
- }
21
- export function getPrefixString(value, length) {
22
- var e_1, _a;
23
- if (value === void 0) { value = ''; }
24
- if (length === void 0) { length = 8; }
25
- var len = length - 1;
26
- var res = '';
27
- if (getBytes(value) <= length) {
28
- return value;
29
- }
30
- try {
31
- for (var value_1 = __values(value), value_1_1 = value_1.next(); !value_1_1.done; value_1_1 = value_1.next()) {
32
- var char = value_1_1.value;
33
- if (isChinese(char)) {
34
- len -= 2;
35
- }
36
- else {
37
- len -= 1;
38
- }
39
- res = res.concat(char);
40
- if (len <= 0) {
41
- return res;
42
- }
43
- }
44
- }
45
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
46
- finally {
47
- try {
48
- if (value_1_1 && !value_1_1.done && (_a = value_1.return)) _a.call(value_1);
49
- }
50
- finally { if (e_1) throw e_1.error; }
51
- }
52
- return value;
53
- }
54
- export function getSuffixString(value, length) {
55
- if (value === void 0) { value = ''; }
56
- if (length === void 0) { length = 8; }
57
- var len = length;
58
- var res = [];
59
- if (getBytes(value) <= length) {
60
- return value;
61
- }
62
- for (var i = value.length - 1; i >= 0; i--) {
63
- if (isChinese(value[i])) {
64
- len -= 2;
65
- }
66
- else {
67
- len -= 1;
68
- }
69
- res.unshift(value[i]);
70
- if (len <= 0) {
71
- return res.join('');
72
- }
73
- }
74
- return value;
75
- }
76
- export function getTransformerString(value, length, type) {
77
- if (value === void 0) { value = ''; }
78
- if (length === void 0) { length = 16; }
79
- if (type === void 0) { type = SplitType.Between; }
80
- if (type === SplitType.End) {
81
- return getPrefixString(value, length) + "...";
82
- }
83
- return getPrefixString(value.slice(0, length / 2), length / 2) + "..." + getSuffixString(value.slice(-length / 2), length / 2);
84
- }
@@ -1,6 +0,0 @@
1
- import { SplitType } from './index';
2
- export declare function getBytes(value?: string): number;
3
- export declare function isChinese(char?: string): boolean;
4
- export declare function getPrefixString(value?: string, length?: number): string;
5
- export declare function getSuffixString(value?: string, length?: number): string;
6
- export declare function getTransformerString(value?: string, length?: number, type?: SplitType): string;
@@ -1,91 +0,0 @@
1
- "use strict";
2
- var __values = (this && this.__values) || function(o) {
3
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
- if (m) return m.call(o);
5
- if (o && typeof o.length === "number") return {
6
- next: function () {
7
- if (o && i >= o.length) o = void 0;
8
- return { value: o && o[i++], done: !o };
9
- }
10
- };
11
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- var index_1 = require("./index");
15
- function getBytes(value) {
16
- if (value === void 0) { value = ''; }
17
- return (value.replace(/[^\x00-\xff]/g, '--') || '').length;
18
- }
19
- exports.getBytes = getBytes;
20
- function isChinese(char) {
21
- if (char === void 0) { char = ''; }
22
- return /[^\x00-\xff]/g.test(char);
23
- }
24
- exports.isChinese = isChinese;
25
- function getPrefixString(value, length) {
26
- var e_1, _a;
27
- if (value === void 0) { value = ''; }
28
- if (length === void 0) { length = 8; }
29
- var len = length - 1;
30
- var res = '';
31
- if (getBytes(value) <= length) {
32
- return value;
33
- }
34
- try {
35
- for (var value_1 = __values(value), value_1_1 = value_1.next(); !value_1_1.done; value_1_1 = value_1.next()) {
36
- var char = value_1_1.value;
37
- if (isChinese(char)) {
38
- len -= 2;
39
- }
40
- else {
41
- len -= 1;
42
- }
43
- res = res.concat(char);
44
- if (len <= 0) {
45
- return res;
46
- }
47
- }
48
- }
49
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
50
- finally {
51
- try {
52
- if (value_1_1 && !value_1_1.done && (_a = value_1.return)) _a.call(value_1);
53
- }
54
- finally { if (e_1) throw e_1.error; }
55
- }
56
- return value;
57
- }
58
- exports.getPrefixString = getPrefixString;
59
- function getSuffixString(value, length) {
60
- if (value === void 0) { value = ''; }
61
- if (length === void 0) { length = 8; }
62
- var len = length;
63
- var res = [];
64
- if (getBytes(value) <= length) {
65
- return value;
66
- }
67
- for (var i = value.length - 1; i >= 0; i--) {
68
- if (isChinese(value[i])) {
69
- len -= 2;
70
- }
71
- else {
72
- len -= 1;
73
- }
74
- res.unshift(value[i]);
75
- if (len <= 0) {
76
- return res.join('');
77
- }
78
- }
79
- return value;
80
- }
81
- exports.getSuffixString = getSuffixString;
82
- function getTransformerString(value, length, type) {
83
- if (value === void 0) { value = ''; }
84
- if (length === void 0) { length = 16; }
85
- if (type === void 0) { type = index_1.SplitType.Between; }
86
- if (type === index_1.SplitType.End) {
87
- return getPrefixString(value, length) + "...";
88
- }
89
- return getPrefixString(value.slice(0, length / 2), length / 2) + "..." + getSuffixString(value.slice(-length / 2), length / 2);
90
- }
91
- exports.getTransformerString = getTransformerString;