dcp-design-react 1.12.16 → 1.12.18

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,101 +1,101 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2021-07-31 22:38:07
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-anchor: ~'@{qm-prefix}-anchor';
10
-
11
- .@{prefix-anchor} {
12
- .reset-container();
13
- display: flex;
14
- .anchor-nav {
15
- display: flex;
16
- flex: none;
17
- .item {
18
- display: flex;
19
- align-items: center;
20
- height: @--height-md;
21
- position: relative;
22
- cursor: pointer;
23
- &.actived {
24
- color: @--primary-color;
25
- &::after {
26
- content: '';
27
- position: absolute;
28
- background-color: @--primary-color;
29
- }
30
- }
31
- span {
32
- .text-overflow-cut();
33
- display: block;
34
- }
35
- }
36
- }
37
- &-left {
38
- flex-direction: row;
39
- .anchor-nav {
40
- flex-direction: column;
41
- margin-right: @--margin-md;
42
- border-right: 1px solid @--border-color-base;
43
- .item {
44
- justify-content: flex-end;
45
- padding: 0 @--padding-md;
46
- &.actived {
47
- &::after {
48
- width: 2px;
49
- right: -2px;
50
- top: 0;
51
- bottom: 0;
52
- }
53
- }
54
- }
55
- }
56
- }
57
- &-top {
58
- flex-direction: column;
59
- .anchor-nav {
60
- flex-direction: row;
61
- margin-bottom: @--margin-md;
62
- border-bottom: 1px solid @--border-color-base;
63
- .item {
64
- justify-content: center;
65
- padding: 0 @--padding-md + 2px;
66
- &.actived {
67
- &::after {
68
- height: 2px;
69
- bottom: -2px;
70
- left: @--padding-md;
71
- right: @--padding-md;
72
- }
73
- }
74
- }
75
- }
76
- }
77
- .anchor-container {
78
- flex: auto;
79
- min-width: 0;
80
- min-height: 0;
81
- overflow-y: auto;
82
- overflow-x: hidden;
83
- }
84
- // ------ size ------
85
- // 40 32 24
86
- &--lg {
87
- .anchor-nav {
88
- .item {
89
- height: @--height-lg;
90
- }
91
- }
92
- }
93
- &--sm {
94
- .anchor-nav {
95
- .item {
96
- height: @--height-sm + 2px;
97
- font-size: 13px;
98
- }
99
- }
100
- }
101
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-31 22:38:07
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-anchor: ~'@{qm-prefix}-anchor';
10
+
11
+ .@{prefix-anchor} {
12
+ .reset-container();
13
+ display: flex;
14
+ .anchor-nav {
15
+ display: flex;
16
+ flex: none;
17
+ .item {
18
+ display: flex;
19
+ align-items: center;
20
+ height: @--height-md;
21
+ position: relative;
22
+ cursor: pointer;
23
+ &.actived {
24
+ color: @--primary-color;
25
+ &::after {
26
+ content: '';
27
+ position: absolute;
28
+ background-color: @--primary-color;
29
+ }
30
+ }
31
+ span {
32
+ .text-overflow-cut();
33
+ display: block;
34
+ }
35
+ }
36
+ }
37
+ &-left {
38
+ flex-direction: row;
39
+ .anchor-nav {
40
+ flex-direction: column;
41
+ margin-right: @--margin-md;
42
+ border-right: 1px solid @--border-color-base;
43
+ .item {
44
+ justify-content: flex-end;
45
+ padding: 0 @--padding-md;
46
+ &.actived {
47
+ &::after {
48
+ width: 2px;
49
+ right: -2px;
50
+ top: 0;
51
+ bottom: 0;
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ &-top {
58
+ flex-direction: column;
59
+ .anchor-nav {
60
+ flex-direction: row;
61
+ margin-bottom: @--margin-md;
62
+ border-bottom: 1px solid @--border-color-base;
63
+ .item {
64
+ justify-content: center;
65
+ padding: 0 @--padding-md + 2px;
66
+ &.actived {
67
+ &::after {
68
+ height: 2px;
69
+ bottom: -2px;
70
+ left: @--padding-md;
71
+ right: @--padding-md;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ .anchor-container {
78
+ flex: auto;
79
+ min-width: 0;
80
+ min-height: 0;
81
+ overflow-y: auto;
82
+ overflow-x: hidden;
83
+ }
84
+ // ------ size ------
85
+ // 40 32 24
86
+ &--lg {
87
+ .anchor-nav {
88
+ .item {
89
+ height: @--height-lg;
90
+ }
91
+ }
92
+ }
93
+ &--sm {
94
+ .anchor-nav {
95
+ .item {
96
+ height: @--height-sm + 2px;
97
+ font-size: 13px;
98
+ }
99
+ }
100
+ }
101
+ }
@@ -1,22 +1,22 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2021-08-01 21:58:46
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-countup: ~'@{qm-prefix}-countup';
10
-
11
- .@{prefix-countup} {
12
- .reset-container();
13
- font-size: @--font-size-base;
14
- // ------ size ------
15
- // 40 32 24
16
- &--lg {
17
- font-size: @--font-size-base;
18
- }
19
- &--sm {
20
- font-size: @--font-size-sm;
21
- }
22
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-08-01 21:58:46
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-countup: ~'@{qm-prefix}-countup';
10
+
11
+ .@{prefix-countup} {
12
+ .reset-container();
13
+ font-size: @--font-size-base;
14
+ // ------ size ------
15
+ // 40 32 24
16
+ &--lg {
17
+ font-size: @--font-size-base;
18
+ }
19
+ &--sm {
20
+ font-size: @--font-size-sm;
21
+ }
22
+ }
@@ -1,68 +1,68 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2021-08-21 20:34:44
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-divider: ~'@{qm-prefix}-divider';
10
-
11
- .@{prefix-divider} {
12
- .reset-container();
13
- display: flex;
14
- align-items: center;
15
- padding: 0 @--padding-md;
16
- height: @--height-md;
17
- line-height: 1;
18
- border: 1px solid @--border-color-base;
19
- border-radius: @--border-radius-base;
20
- background-color: @--background-color-light;
21
- position: relative;
22
- &::before {
23
- content: ' ';
24
- position: absolute;
25
- width: 6px;
26
- left: -1px;
27
- top: -1px;
28
- bottom: -1px;
29
- border-top-left-radius: @--border-radius-base;
30
- border-bottom-left-radius: @--border-radius-base;
31
- background-color: @--primary-color;
32
- }
33
- &__title {
34
- margin-left: 5px;
35
- }
36
- &__extra {
37
- .text-overflow-cut();
38
- flex: 1;
39
- margin-left: @--margin-md;
40
- }
41
- &__collapse {
42
- margin-left: @--margin-md;
43
- padding-left: 0;
44
- padding-right: 0;
45
- .anticon {
46
- margin-left: 4px !important;
47
- }
48
- }
49
- &-borderless {
50
- border: none;
51
- background-color: transparent;
52
- &::before {
53
- top: auto;
54
- bottom: auto;
55
- left: 0;
56
- height: 20px;
57
- border-radius: 3px;
58
- }
59
- }
60
- // ------ size ------
61
- // 40 32 24
62
- &--lg {
63
- height: @--height-lg;
64
- }
65
- &--sm {
66
- height: @--height-sm;
67
- }
68
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-08-21 20:34:44
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-divider: ~'@{qm-prefix}-divider';
10
+
11
+ .@{prefix-divider} {
12
+ .reset-container();
13
+ display: flex;
14
+ align-items: center;
15
+ padding: 0 @--padding-md;
16
+ height: @--height-md;
17
+ line-height: 1;
18
+ border: 1px solid @--border-color-base;
19
+ border-radius: @--border-radius-base;
20
+ background-color: @--background-color-light;
21
+ position: relative;
22
+ &::before {
23
+ content: ' ';
24
+ position: absolute;
25
+ width: 6px;
26
+ left: -1px;
27
+ top: -1px;
28
+ bottom: -1px;
29
+ border-top-left-radius: @--border-radius-base;
30
+ border-bottom-left-radius: @--border-radius-base;
31
+ background-color: @--primary-color;
32
+ }
33
+ &__title {
34
+ margin-left: 5px;
35
+ }
36
+ &__extra {
37
+ .text-overflow-cut();
38
+ flex: 1;
39
+ margin-left: @--margin-md;
40
+ }
41
+ &__collapse {
42
+ margin-left: @--margin-md;
43
+ padding-left: 0;
44
+ padding-right: 0;
45
+ .anticon {
46
+ margin-left: 4px !important;
47
+ }
48
+ }
49
+ &-borderless {
50
+ border: none;
51
+ background-color: transparent;
52
+ &::before {
53
+ top: auto;
54
+ bottom: auto;
55
+ left: 0;
56
+ height: 20px;
57
+ border-radius: 3px;
58
+ }
59
+ }
60
+ // ------ size ------
61
+ // 40 32 24
62
+ &--lg {
63
+ height: @--height-lg;
64
+ }
65
+ &--sm {
66
+ height: @--height-sm;
67
+ }
68
+ }
@@ -173,6 +173,7 @@ export type IFormItem = {
173
173
  defaultExpandAll?: boolean;
174
174
  defaultExpandedKeys?: IDict[`value`][];
175
175
  changeOnSelect?: boolean;
176
+ getPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
176
177
  selectLevel?: number;
177
178
  hideHeader?: boolean;
178
179
  onlySelect?: boolean;
@@ -260,6 +261,9 @@ export type IFormItem = {
260
261
  text?: string;
261
262
  icon?: React.ReactNode;
262
263
  };
264
+ uploadIcons?: {
265
+ showRemove?: boolean;
266
+ };
263
267
  fieldAliasMap?: (() => Record<string, string>) | Record<string, string>;
264
268
  };
265
269
  extra?: {
@@ -0,0 +1,7 @@
1
+ interface ControlledStateOptions<T, U> {
2
+ value?: T;
3
+ defaultValue?: T;
4
+ onChange?: (value: T, extra?: U) => void;
5
+ }
6
+ export default function useControlledState<T, U = any>(defaultStateValue: T, options?: ControlledStateOptions<T, U>): [T, (value: T, extra?: U) => void];
7
+ export {};
@@ -10,4 +10,4 @@ import type { AnyFunction } from '../_utils/types';
10
10
  * return () => window.removeEventListener('resize', resizeHandler);
11
11
  * }, []);
12
12
  */
13
- export default function useEvent<T extends AnyFunction<any>>(callback: T): T;
13
+ export default function useEvent<T extends AnyFunction<any>>(callback?: T): T;