@dtjoy/dt-design 1.0.1 → 1.0.2

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 (141) hide show
  1. package/esm/_util/gapSize.d.ts +3 -0
  2. package/esm/_util/gapSize.js +10 -0
  3. package/esm/_util/hooks/index.d.ts +1 -0
  4. package/esm/_util/hooks/index.js +1 -0
  5. package/esm/_util/hooks/useOrientation.d.ts +2 -0
  6. package/esm/_util/hooks/useOrientation.js +19 -0
  7. package/esm/_util/isNonNullable.d.ts +2 -0
  8. package/esm/_util/isNonNullable.js +4 -0
  9. package/esm/_util/type.d.ts +2 -1
  10. package/esm/blockHeader/index.js +12 -11
  11. package/esm/blockHeader/style/index.d.ts +1 -1
  12. package/esm/blockHeader/style/index.js +1 -1
  13. package/esm/blockHeader/style/index.less +8 -7
  14. package/esm/button/style/index.less +60 -46
  15. package/esm/button/style/mixin.less +47 -0
  16. package/esm/collapsible/index.d.ts +97 -0
  17. package/esm/collapsible/index.js +234 -0
  18. package/esm/collapsible/style/index.d.ts +1 -0
  19. package/esm/collapsible/style/index.js +1 -0
  20. package/esm/collapsible/style/index.less +24 -0
  21. package/esm/collapsibleActionItems/index.d.ts +24 -0
  22. package/esm/collapsibleActionItems/index.js +74 -0
  23. package/esm/collapsibleActionItems/style/index.d.ts +2 -0
  24. package/esm/collapsibleActionItems/style/index.js +2 -0
  25. package/esm/collapsibleActionItems/style/index.less +7 -0
  26. package/esm/flex/index.d.ts +7 -0
  27. package/esm/flex/index.js +62 -0
  28. package/esm/flex/interface.d.ts +16 -0
  29. package/esm/flex/interface.js +1 -0
  30. package/esm/flex/style/index.d.ts +2 -0
  31. package/esm/flex/style/index.js +2 -0
  32. package/esm/flex/style/index.less +77 -0
  33. package/esm/flex/utils.d.ts +7 -0
  34. package/esm/flex/utils.js +33 -0
  35. package/esm/index.d.ts +9 -0
  36. package/esm/index.js +7 -5
  37. package/esm/resize/index.d.ts +8 -0
  38. package/esm/resize/index.js +29 -0
  39. package/esm/splitter/Panel.d.ts +7 -0
  40. package/esm/splitter/Panel.js +38 -0
  41. package/esm/splitter/SplitBar.d.ts +24 -0
  42. package/esm/splitter/SplitBar.js +185 -0
  43. package/esm/splitter/Splitter.d.ts +5 -0
  44. package/esm/splitter/Splitter.js +215 -0
  45. package/esm/splitter/hooks/sizeUtil.d.ts +3 -0
  46. package/esm/splitter/hooks/sizeUtil.js +63 -0
  47. package/esm/splitter/hooks/useItems.d.ts +14 -0
  48. package/esm/splitter/hooks/useItems.js +44 -0
  49. package/esm/splitter/hooks/useResizable.d.ts +10 -0
  50. package/esm/splitter/hooks/useResizable.js +73 -0
  51. package/esm/splitter/hooks/useResize.d.ts +6 -0
  52. package/esm/splitter/hooks/useResize.js +158 -0
  53. package/esm/splitter/hooks/useSizes.d.ts +4 -0
  54. package/esm/splitter/hooks/useSizes.js +80 -0
  55. package/esm/splitter/index.d.ts +8 -0
  56. package/esm/splitter/index.js +5 -0
  57. package/esm/splitter/interface.d.ts +68 -0
  58. package/esm/splitter/interface.js +1 -0
  59. package/esm/splitter/style/index.d.ts +2 -0
  60. package/esm/splitter/style/index.js +2 -0
  61. package/esm/splitter/style/index.less +312 -0
  62. package/esm/statusTag/index.d.ts +28 -0
  63. package/esm/statusTag/index.js +122 -0
  64. package/esm/statusTag/style/index.d.ts +2 -0
  65. package/esm/statusTag/style/index.js +2 -0
  66. package/esm/statusTag/style/index.less +70 -0
  67. package/esm/statusTag/style/mixin.less +39 -0
  68. package/esm/style/mixins/index.less +0 -0
  69. package/esm/style/themes/index.less +2 -1
  70. package/esm/style/themes/variable.less +1 -0
  71. package/lib/_util/gapSize.d.ts +3 -0
  72. package/lib/_util/gapSize.js +17 -0
  73. package/lib/_util/hooks/index.d.ts +1 -0
  74. package/lib/_util/hooks/index.js +16 -0
  75. package/lib/_util/hooks/useOrientation.d.ts +2 -0
  76. package/lib/_util/hooks/useOrientation.js +26 -0
  77. package/lib/_util/isNonNullable.d.ts +2 -0
  78. package/lib/_util/isNonNullable.js +10 -0
  79. package/lib/_util/type.d.ts +2 -1
  80. package/lib/blockHeader/index.js +12 -12
  81. package/lib/blockHeader/style/index.d.ts +1 -1
  82. package/lib/blockHeader/style/index.js +1 -1
  83. package/lib/blockHeader/style/index.less +8 -7
  84. package/lib/button/style/index.less +60 -46
  85. package/lib/button/style/mixin.less +47 -0
  86. package/lib/collapsible/index.d.ts +97 -0
  87. package/lib/collapsible/index.js +199 -0
  88. package/lib/collapsible/style/index.d.ts +1 -0
  89. package/lib/collapsible/style/index.js +3 -0
  90. package/lib/collapsible/style/index.less +24 -0
  91. package/lib/collapsibleActionItems/index.d.ts +24 -0
  92. package/lib/collapsibleActionItems/index.js +68 -0
  93. package/lib/collapsibleActionItems/style/index.d.ts +2 -0
  94. package/lib/collapsibleActionItems/style/index.js +4 -0
  95. package/lib/collapsibleActionItems/style/index.less +7 -0
  96. package/lib/flex/index.d.ts +7 -0
  97. package/lib/flex/index.js +60 -0
  98. package/lib/flex/interface.d.ts +16 -0
  99. package/lib/flex/interface.js +5 -0
  100. package/lib/flex/style/index.d.ts +2 -0
  101. package/lib/flex/style/index.js +4 -0
  102. package/lib/flex/style/index.less +77 -0
  103. package/lib/flex/utils.d.ts +7 -0
  104. package/lib/flex/utils.js +39 -0
  105. package/lib/index.d.ts +9 -0
  106. package/lib/index.js +65 -0
  107. package/lib/resize/index.d.ts +8 -0
  108. package/lib/resize/index.js +38 -0
  109. package/lib/splitter/Panel.d.ts +7 -0
  110. package/lib/splitter/Panel.js +44 -0
  111. package/lib/splitter/SplitBar.d.ts +24 -0
  112. package/lib/splitter/SplitBar.js +179 -0
  113. package/lib/splitter/Splitter.d.ts +5 -0
  114. package/lib/splitter/Splitter.js +202 -0
  115. package/lib/splitter/hooks/sizeUtil.d.ts +3 -0
  116. package/lib/splitter/hooks/sizeUtil.js +56 -0
  117. package/lib/splitter/hooks/useItems.d.ts +14 -0
  118. package/lib/splitter/hooks/useItems.js +46 -0
  119. package/lib/splitter/hooks/useResizable.d.ts +10 -0
  120. package/lib/splitter/hooks/useResizable.js +83 -0
  121. package/lib/splitter/hooks/useResize.d.ts +6 -0
  122. package/lib/splitter/hooks/useResize.js +142 -0
  123. package/lib/splitter/hooks/useSizes.d.ts +4 -0
  124. package/lib/splitter/hooks/useSizes.js +62 -0
  125. package/lib/splitter/index.d.ts +8 -0
  126. package/lib/splitter/index.js +12 -0
  127. package/lib/splitter/interface.d.ts +68 -0
  128. package/lib/splitter/interface.js +5 -0
  129. package/lib/splitter/style/index.d.ts +2 -0
  130. package/lib/splitter/style/index.js +4 -0
  131. package/lib/splitter/style/index.less +312 -0
  132. package/lib/statusTag/index.d.ts +28 -0
  133. package/lib/statusTag/index.js +125 -0
  134. package/lib/statusTag/style/index.d.ts +2 -0
  135. package/lib/statusTag/style/index.js +4 -0
  136. package/lib/statusTag/style/index.less +70 -0
  137. package/lib/statusTag/style/mixin.less +39 -0
  138. package/lib/style/mixins/index.less +0 -0
  139. package/lib/style/themes/index.less +2 -1
  140. package/lib/style/themes/variable.less +1 -0
  141. package/package.json +142 -141
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.STATUS_TAG_TYPES = exports.PRESET_COLOR_TYPES = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactIcons = require("@dtinsight/react-icons");
9
+ var _antd = require("antd");
10
+ var _configProvider = require("antd/es/config-provider");
11
+ var _classnames = _interopRequireDefault(require("classnames"));
12
+ require("./style");
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ 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); }
17
+ const PRESET_COLOR_TYPES = exports.PRESET_COLOR_TYPES = Object.freeze(['blue', 'yellow', 'green', 'gray', 'red', 'purple', 'cyan', 'pink']);
18
+ const STATUS_TAG_TYPES = exports.STATUS_TAG_TYPES = Object.freeze(['default', 'outline', 'fill']);
19
+ const DEFAULT_OPACITY = 0.15;
20
+ /**
21
+ * 校验是否为预设颜色
22
+ * @param color 待校验颜色值
23
+ */
24
+ function isPresetColor(color) {
25
+ if (!color || typeof color !== 'string') return false;
26
+ return PRESET_COLOR_TYPES.includes(color);
27
+ }
28
+
29
+ /**
30
+ * 计算颜色的透明版本
31
+ * @param color 原始颜色(支持hex/rgb/rgba)
32
+ * @param opacity 透明度(默认0.15)
33
+ */
34
+ function calculateTransparentColor(color, opacity = DEFAULT_OPACITY) {
35
+ if (!color) return 'rgba(0, 0, 0, 0.15)';
36
+ if (color.startsWith('rgb')) {
37
+ if (color.startsWith('rgba')) return color.replace(/,\s*[\d.]+(?=\))/, `,${opacity}`);
38
+ return `${color.slice(0, -1)},${opacity})`;
39
+ }
40
+ let hex = color.trim().replace(/^#/, '');
41
+ if (hex.length === 3) {
42
+ hex = hex.split('').map(char => char + char).join('');
43
+ }
44
+ if (!/^[0-9A-Fa-f]{6}$/.test(hex)) return 'rgba(0, 0, 0, 0.15)';
45
+ const r = parseInt(hex.substring(0, 2), 16);
46
+ const g = parseInt(hex.substring(2, 4), 16);
47
+ const b = parseInt(hex.substring(4, 6), 16);
48
+ return `rgba(${r}, ${g}, ${b}, ${opacity})`;
49
+ }
50
+ const StatusTag = /*#__PURE__*/_react.default.memo(props => {
51
+ const {
52
+ className,
53
+ type = 'default',
54
+ icon,
55
+ color = 'green',
56
+ loading = false,
57
+ rounded = false,
58
+ background,
59
+ style,
60
+ children,
61
+ ...restProps
62
+ } = props;
63
+ const prefixCls = (0, _configProvider.globalConfig)().getPrefixCls('status-tag');
64
+ const showDefaultIcon = (0, _react.useMemo)(() => icon === undefined, [icon]);
65
+ const containerClasses = (0, _react.useMemo)(() => (0, _classnames.default)(prefixCls, className, {
66
+ [`${prefixCls}--border`]: type === 'outline',
67
+ [`${prefixCls}--fill`]: type === 'fill',
68
+ [`${prefixCls}--rounded`]: rounded,
69
+ [`${prefixCls}__${color}--fill`]: type === 'fill' && isPresetColor(color)
70
+ }), [className, type, color, rounded, prefixCls]);
71
+ const customColorStyle = (0, _react.useMemo)(() => {
72
+ if (type !== 'fill' || isPresetColor(color)) return {};
73
+ return {
74
+ color,
75
+ background: background || calculateTransparentColor(color)
76
+ };
77
+ }, [type, color, background]);
78
+ const iconStyleConfig = (0, _react.useMemo)(() => {
79
+ if (isPresetColor(color)) {
80
+ return {
81
+ className: (0, _classnames.default)('anticon', {
82
+ [`${prefixCls}__${color}--icon`]: true,
83
+ [`${prefixCls}__icon--default`]: !icon,
84
+ [`${prefixCls}__${color}--iconBg`]: !icon
85
+ }),
86
+ style: {}
87
+ };
88
+ }
89
+ return {
90
+ className: (0, _classnames.default)('anticon', {
91
+ [`${prefixCls}__icon--default`]: !icon
92
+ }),
93
+ style: {
94
+ color: icon ? color : undefined,
95
+ background: !icon ? color : undefined
96
+ }
97
+ };
98
+ }, [color, icon, prefixCls]);
99
+ const loadingIndicator = (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_reactIcons.SpinOutlined, {
100
+ className: `${prefixCls}__icon ${prefixCls}__icon--loading`
101
+ }), [prefixCls]);
102
+ return /*#__PURE__*/_react.default.createElement("div", _extends({}, restProps, {
103
+ className: containerClasses,
104
+ style: {
105
+ ...customColorStyle,
106
+ ...style
107
+ },
108
+ "aria-busy": loading
109
+ }), loading ? /*#__PURE__*/_react.default.createElement(_antd.Spin, {
110
+ spinning: true,
111
+ indicator: loadingIndicator,
112
+ size: "small"
113
+ }) : (icon || showDefaultIcon) && /*#__PURE__*/_react.default.createElement("div", {
114
+ className: `${prefixCls}__icon`
115
+ }, /*#__PURE__*/_react.default.createElement("span", {
116
+ className: iconStyleConfig.className,
117
+ style: iconStyleConfig.style
118
+ }, icon ?? null)), children && /*#__PURE__*/_react.default.createElement("span", {
119
+ className: `${prefixCls}__text`
120
+ }, children));
121
+ });
122
+ if (process.env.NODE_ENV !== 'production') {
123
+ StatusTag.displayName = 'StatusTag';
124
+ }
125
+ var _default = exports.default = StatusTag;
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ require("../../style/index.less");
4
+ require("./index.less");
@@ -0,0 +1,70 @@
1
+ @import '../../style/themes/index.less';
2
+ @import './mixin.less';
3
+ @import './mixin.less';
4
+
5
+ @status-tag-prefix-cls: ~'@{ant-prefix}-status-tag';
6
+
7
+ @keyframes spin {
8
+ from {
9
+ transform: rotate(0deg);
10
+ }
11
+ to {
12
+ transform: rotate(360deg);
13
+ }
14
+ }
15
+
16
+ // 主选择器
17
+ .@{status-tag-prefix-cls} {
18
+ display: flex;
19
+ align-items: center;
20
+ width: fit-content;
21
+ height: 24px;
22
+ font-size: 12px;
23
+ color: #3d446e;
24
+
25
+ .ant-spin {
26
+ font-size: 14px; // 修复 antd 字体居中问题
27
+ }
28
+
29
+ &--border {
30
+ padding: 2px 12px;
31
+ border: 1px solid #d8dae2;
32
+ background-color: #fff;
33
+ }
34
+
35
+ &--fill {
36
+ padding: 2px 12px;
37
+ }
38
+
39
+ &--rounded {
40
+ border-radius: 14px;
41
+ }
42
+
43
+ &__icon {
44
+ display: flex;
45
+ align-items: center;
46
+ font-size: 16px;
47
+ margin-right: 8px;
48
+
49
+ &--default {
50
+ display: inline-block;
51
+ width: 6px;
52
+ height: 6px;
53
+ border-radius: 50%;
54
+ }
55
+
56
+ &--loading {
57
+ animation: spin 1s linear infinite;
58
+ }
59
+ }
60
+
61
+ &__text {
62
+ font-size: 12px;
63
+ font-weight: 400;
64
+ line-height: 22px;
65
+ white-space: nowrap;
66
+ }
67
+
68
+ // 调用颜色映射 Mixin,生成所有颜色的样式
69
+ .color-map();
70
+ }
@@ -0,0 +1,39 @@
1
+ .status-color(@color, @bg) {
2
+ &--icon {
3
+ color: @color;
4
+ }
5
+ &--fill {
6
+ color: @color;
7
+ background-color: @bg;
8
+ }
9
+ &--iconBg {
10
+ background: @color;
11
+ }
12
+ }
13
+
14
+ .color-map() {
15
+ &__yellow {
16
+ .status-color(#FBB310, #FFF4D9);
17
+ }
18
+ &__blue {
19
+ .status-color(#1d78ff, #E8F1FF);
20
+ }
21
+ &__green {
22
+ .status-color(#11d782, #E7FBF7);
23
+ }
24
+ &__gray {
25
+ .status-color(#B1B4C5, #F5F5F8);
26
+ }
27
+ &__red {
28
+ .status-color(#F96C5B, #FDE9E7);
29
+ }
30
+ &__purple {
31
+ .status-color(#AC9DFF, #EAE6FF);
32
+ }
33
+ &__cyan {
34
+ .status-color(#2cccdf, #E7F8FA);
35
+ }
36
+ &__pink {
37
+ .status-color(#FF82AE, #FFE6EF);
38
+ }
39
+ }
File without changes
@@ -1 +1,2 @@
1
- @import "~antd/es/style/themes/default.less";
1
+ @import '~antd/es/style/themes/default.less';
2
+ @import './variable.less';
@@ -0,0 +1 @@
1
+ @primary-color-disabled: #f3f3f3;
package/package.json CHANGED
@@ -1,147 +1,148 @@
1
1
  {
2
- "name": "@dtjoy/dt-design",
3
- "version": "1.0.1",
4
- "description": "react-component",
5
- "repository": "https://github.com/ZhaoFxxkSky/dt-design",
6
- "main": "lib/index.js",
7
- "module": "esm/index.js",
8
- "types": "esm/index.d.ts",
9
- "scripts": {
10
- "start": "npm run dev",
11
- "dev": "dumi dev",
12
- "build": "father build",
13
- "build:watch": "father dev",
14
- "test": "jest",
15
- "docs:build": "dumi build",
16
- "prepare": "husky install && dumi setup",
17
- "doctor": "father doctor",
18
- "lint": "npm run lint:es && npm run lint:css",
19
- "lint:es-fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" \".dumi/**/*.{js,jsx,ts,tsx}\" --fix",
20
- "lint:css-fix": "stylelint \"src/**/*.{css,less,scss}\" \".dumi/**/*.{css,less,scss}\" --fix",
21
- "lint:css": "stylelint \"src/**/*.{css,less,scss}\" \".dumi/**/*.{css,less,scss}\"",
22
- "lint:es": "eslint \"src/**/*.{js,jsx,ts,tsx}\" \".dumi/**/*.{js,jsx,ts,tsx}\"",
23
- "prepublishOnly": "npm run build",
24
- "deploy": "npm run docs:build && gh-pages -d docs-dist",
25
- "release": "./scripts/release.sh"
26
- },
27
- "author": {
28
- "name": "夕颜",
29
- "email": "wx-zhaog@dtjoy.com",
30
- "url": "https://github.com/ZhaoFxxkSky/dt-design"
31
- },
32
- "license": "MIT",
33
- "files": [
34
- "lib",
35
- "esm"
36
- ],
37
- "sideEffects": [
38
- "lib/*",
39
- "*.scss",
40
- "*.less"
41
- ],
42
- "keywords": [
43
- "react",
44
- "react-component",
45
- "ui-library",
46
- "typescript",
47
- "ant-design"
48
- ],
49
- "commitlint": {
50
- "extends": [
51
- "@commitlint/config-conventional"
52
- ]
53
- },
54
- "lint-staged": {
55
- "*.{md,json}": [
56
- "prettier --write --no-error-on-unmatched-pattern"
2
+ "name": "@dtjoy/dt-design",
3
+ "version": "1.0.2",
4
+ "description": "react-component",
5
+ "repository": "https://github.com/ZhaoFxxkSky/dt-design",
6
+ "main": "lib/index.js",
7
+ "module": "esm/index.js",
8
+ "types": "esm/index.d.ts",
9
+ "scripts": {
10
+ "start": "npm run dev",
11
+ "dev": "dumi dev",
12
+ "build": "father build",
13
+ "build:watch": "father dev",
14
+ "test": "jest",
15
+ "docs:build": "dumi build",
16
+ "prepare": "husky install && dumi setup",
17
+ "doctor": "father doctor",
18
+ "lint": "npm run lint:es && npm run lint:css",
19
+ "lint:es-fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" \".dumi/**/*.{js,jsx,ts,tsx}\" --fix",
20
+ "lint:css-fix": "stylelint \"src/**/*.{css,less,scss}\" \".dumi/**/*.{css,less,scss}\" --fix",
21
+ "lint:css": "stylelint \"src/**/*.{css,less,scss}\" \".dumi/**/*.{css,less,scss}\"",
22
+ "lint:es": "eslint \"src/**/*.{js,jsx,ts,tsx}\" \".dumi/**/*.{js,jsx,ts,tsx}\"",
23
+ "prepublishOnly": "npm run build",
24
+ "deploy": "npm run docs:build && gh-pages -d docs-dist",
25
+ "release": "./scripts/release.sh"
26
+ },
27
+ "author": {
28
+ "name": "夕颜",
29
+ "email": "wx-zhaog@dtjoy.com",
30
+ "url": "https://github.com/ZhaoFxxkSky/dt-design"
31
+ },
32
+ "license": "MIT",
33
+ "files": [
34
+ "lib",
35
+ "esm"
57
36
  ],
58
- "*.{css,scss}": [
59
- "stylelint --fix"
37
+ "sideEffects": [
38
+ "esm/**/style/*",
39
+ "lib/**/style/*",
40
+ "*.less",
41
+ "**/style/*"
60
42
  ],
61
- "*.{js,jsx}": [
62
- "eslint --fix",
63
- "prettier --write"
43
+ "keywords": [
44
+ "react",
45
+ "react-component",
46
+ "ui-library",
47
+ "typescript",
48
+ "ant-design"
64
49
  ],
65
- "*.{ts,tsx}": [
66
- "eslint --fix",
67
- "prettier --parser=typescript --write"
68
- ]
69
- },
70
- "publishConfig": {
71
- "access": "public"
72
- },
73
- "peerDependencies": {
74
- "react": ">=16.9.0",
75
- "react-dom": ">=16.9.0"
76
- },
77
- "devDependencies": {
78
- "@commitlint/cli": "^17.1.2",
79
- "@commitlint/config-conventional": "^17.1.0",
80
- "@faker-js/faker": "^7.6.0",
81
- "@testing-library/jest-dom": "^5.16.5",
82
- "@testing-library/react": "^13.4.0",
83
- "@testing-library/react-hooks": "^8.0.1",
84
- "@testing-library/user-event": "^14.4.3",
85
- "@types/jest": "^29.2.3",
86
- "@types/lodash-es": "^4.17.12",
87
- "@types/node": "^24.3.1",
88
- "@types/react": "^18.0.0",
89
- "@types/react-resizable": "^3.0.8",
90
- "@types/react-syntax-highlighter": "~15.5.13",
91
- "@types/shortid": "^0.0.31",
92
- "@types/showdown": "^1.9.0",
93
- "@types/testing-library__jest-dom": "^5.14.5",
94
- "ant-design-testing": "^1.1.0",
95
- "babel-plugin-import": "^1.13.8",
96
- "cz-conventional-changelog": "^3.3.0",
97
- "dumi": "^2.2.12",
98
- "eslint": "^8.23.0",
99
- "father": "~4.1.0",
100
- "gh-pages": "^4.0.0",
101
- "husky": "^8.0.1",
102
- "jest": "^29.3.1",
103
- "jest-environment-jsdom": "^29.3.1",
104
- "ko-lint-config": "2.2.21",
105
- "lint-staged": "^13.0.3",
106
- "prettier": "^2.7.1",
107
- "rc-motion": "2.6.2",
108
- "rc-util": "^5.44.4",
109
- "react": "^18.0.0",
110
- "react-dom": "^18.0.0",
111
- "react-test-renderer": "^18.2.0",
112
- "resize-observer-polyfill": "^1.5.1",
113
- "standard-version": "^9.5.0",
114
- "stylelint": "^14.9.1",
115
- "ts-jest": "^29.0.3",
116
- "typescript": "~4.5.2"
117
- },
118
- "dependencies": {
119
- "@dtinsight/dt-utils": "^1.3.1",
120
- "@dtinsight/react-icons": "^1.0.0",
121
- "@handsontable/react": "2.1.0",
122
- "antd": "4.24.16",
123
- "classnames": "^2.2.6",
124
- "handsontable": "6.2.2",
125
- "highlight.js": "^10.5.0",
126
- "immer": "~10.1.1",
127
- "lodash-es": "^4.17.21",
128
- "rc-drawer": "~5.1.0",
129
- "rc-resize-observer": "^1.4.3",
130
- "rc-virtual-list": "^3.4.13",
131
- "react-draggable": "~4.4.6",
132
- "react-markdown": "~8.0.6",
133
- "react-resizable": "^3.0.5",
134
- "react-syntax-highlighter": "~15.5.0",
135
- "remark-gfm": "~3.0.1",
136
- "shortid": "^2.2.16",
137
- "showdown": "^1.9.0"
138
- },
139
- "config": {
140
- "commitizen": {
141
- "path": "./node_modules/cz-conventional-changelog"
50
+ "commitlint": {
51
+ "extends": [
52
+ "@commitlint/config-conventional"
53
+ ]
54
+ },
55
+ "lint-staged": {
56
+ "*.{md,json}": [
57
+ "prettier --write --no-error-on-unmatched-pattern"
58
+ ],
59
+ "*.{css,scss}": [
60
+ "stylelint --fix"
61
+ ],
62
+ "*.{js,jsx}": [
63
+ "eslint --fix",
64
+ "prettier --write"
65
+ ],
66
+ "*.{ts,tsx}": [
67
+ "eslint --fix",
68
+ "prettier --parser=typescript --write"
69
+ ]
70
+ },
71
+ "publishConfig": {
72
+ "access": "public"
73
+ },
74
+ "peerDependencies": {
75
+ "react": ">=16.9.0",
76
+ "react-dom": ">=16.9.0"
77
+ },
78
+ "devDependencies": {
79
+ "@commitlint/cli": "^17.1.2",
80
+ "@commitlint/config-conventional": "^17.1.0",
81
+ "@faker-js/faker": "^7.6.0",
82
+ "@testing-library/jest-dom": "^5.16.5",
83
+ "@testing-library/react": "^13.4.0",
84
+ "@testing-library/react-hooks": "^8.0.1",
85
+ "@testing-library/user-event": "^14.4.3",
86
+ "@types/jest": "^29.2.3",
87
+ "@types/lodash-es": "^4.17.12",
88
+ "@types/node": "^24.3.1",
89
+ "@types/react": "^18.0.0",
90
+ "@types/react-resizable": "^3.0.8",
91
+ "@types/react-syntax-highlighter": "~15.5.13",
92
+ "@types/shortid": "^0.0.31",
93
+ "@types/showdown": "^1.9.0",
94
+ "@types/testing-library__jest-dom": "^5.14.5",
95
+ "ant-design-testing": "^1.1.0",
96
+ "babel-plugin-import": "^1.13.8",
97
+ "cz-conventional-changelog": "^3.3.0",
98
+ "dumi": "^2.2.12",
99
+ "eslint": "^8.23.0",
100
+ "father": "~4.1.0",
101
+ "gh-pages": "^4.0.0",
102
+ "husky": "^8.0.1",
103
+ "jest": "^29.3.1",
104
+ "jest-environment-jsdom": "^29.3.1",
105
+ "ko-lint-config": "2.2.21",
106
+ "lint-staged": "^13.0.3",
107
+ "prettier": "^2.7.1",
108
+ "rc-motion": "2.6.2",
109
+ "rc-util": "^5.44.4",
110
+ "react": "^18.0.0",
111
+ "react-dom": "^18.0.0",
112
+ "react-test-renderer": "^18.2.0",
113
+ "resize-observer-polyfill": "^1.5.1",
114
+ "standard-version": "^9.5.0",
115
+ "stylelint": "^14.9.1",
116
+ "ts-jest": "^29.0.3",
117
+ "typescript": "~4.5.2"
118
+ },
119
+ "dependencies": {
120
+ "@dtinsight/dt-utils": "^1.3.1",
121
+ "@dtinsight/react-icons": "^1.0.0",
122
+ "@handsontable/react": "2.1.0",
123
+ "antd": "4.24.16",
124
+ "classnames": "^2.2.6",
125
+ "handsontable": "6.2.2",
126
+ "highlight.js": "^10.5.0",
127
+ "immer": "~10.1.1",
128
+ "lodash-es": "^4.17.21",
129
+ "rc-drawer": "~5.1.0",
130
+ "rc-resize-observer": "^1.4.3",
131
+ "rc-virtual-list": "^3.4.13",
132
+ "react-draggable": "~4.4.6",
133
+ "react-markdown": "~8.0.6",
134
+ "react-resizable": "^3.0.5",
135
+ "react-syntax-highlighter": "~15.5.0",
136
+ "remark-gfm": "~3.0.1",
137
+ "shortid": "^2.2.16",
138
+ "showdown": "^1.9.0"
139
+ },
140
+ "config": {
141
+ "commitizen": {
142
+ "path": "./node_modules/cz-conventional-changelog"
143
+ }
144
+ },
145
+ "resolutions": {
146
+ "rc-motion": "2.6.2"
142
147
  }
143
- },
144
- "resolutions": {
145
- "rc-motion": "2.6.2"
146
- }
147
148
  }