assui 2.0.142 → 2.0.145

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,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import type { DrawerProps } from 'antd/lib/drawer';
3
+ export declare type DrawerAction = {
4
+ close: () => void;
5
+ open: () => void;
6
+ };
3
7
  export interface ButtonDrawerProps extends DrawerProps {
4
8
  onClose?: () => void;
5
9
  onOpen?: () => void;
6
10
  trigger: React.ReactElement;
7
- children: React.ReactElement;
11
+ children: ((v: DrawerAction) => React.ReactElement) | React.ReactElement;
8
12
  }
9
- export declare type DrawerAction = {
10
- close: () => void;
11
- open: () => void;
12
- };
13
13
  declare const ForwardRefButtonDrawer: React.ForwardRefExoticComponent<ButtonDrawerProps & React.RefAttributes<unknown>>;
14
14
  export default ForwardRefButtonDrawer;
@@ -56,6 +56,7 @@ var __read = this && this.__read || function (o, n) {
56
56
 
57
57
  import React, { useState, useRef, useImperativeHandle } from 'react';
58
58
  import Drawer from 'antd/lib/drawer';
59
+ import isFunction from 'lodash/isFunction';
59
60
  import classNames from 'classnames';
60
61
 
61
62
  var ButtonDrawer = function ButtonDrawer(props, ref) {
@@ -107,7 +108,7 @@ var ButtonDrawer = function ButtonDrawer(props, ref) {
107
108
  title: title,
108
109
  onClose: closeDrawer,
109
110
  visible: drawerVisible
110
- }, restProps), /*#__PURE__*/React.cloneElement(children, {
111
+ }, restProps), isFunction(children) ? children(actionRef.current) : /*#__PURE__*/React.cloneElement(children, {
111
112
  drawerAction: actionRef.current
112
113
  })));
113
114
  };
package/es/index.d.ts CHANGED
@@ -54,8 +54,6 @@ export type { LabelTreeSelectProps } from './label-tree-select';
54
54
  export { default as LabelTreeSelect } from './label-tree-select';
55
55
  export type { LabelCustomizeRangePickerProps } from './label-customize-range-picker';
56
56
  export { default as LabelCustomizeRangePicker } from './label-customize-range-picker';
57
- export type { LabelDescItemProps } from './label-desc-item';
58
- export { default as LabelDescItem } from './label-desc-item';
59
57
  export type { RichTextEditorProps } from './rich-text-editor';
60
58
  export { default as RichTextEditor } from './rich-text-editor';
61
59
  export { default as beautifulDnd } from './beautiful-dnd';
package/es/index.js CHANGED
@@ -27,6 +27,5 @@ export { default as LabelNumberInput } from './label-number-input';
27
27
  export { default as LabelConditionInput } from './label-condition-input';
28
28
  export { default as LabelTreeSelect } from './label-tree-select';
29
29
  export { default as LabelCustomizeRangePicker } from './label-customize-range-picker';
30
- export { default as LabelDescItem } from './label-desc-item';
31
30
  export { default as RichTextEditor } from './rich-text-editor';
32
31
  export { default as beautifulDnd } from './beautiful-dnd';
@@ -75,9 +75,9 @@ export var useDateScope = function useDateScope() {
75
75
  value: [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')]
76
76
  }, {
77
77
  key: dateTypeEnum.FUTURE_7_DAY,
78
- value: [now.clone().add(7, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')]
78
+ value: [now.clone().add(1, 'day').startOf('day'), now.clone().add(7, 'day').endOf('day')]
79
79
  }];
80
- var dateScopeMap = (_a = {}, _a[dateTypeEnum.TODAY] = [now.clone().startOf('day'), now.clone().endOf('day')], _a[dateTypeEnum.YESTERDAY] = [now.clone().subtract(1, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.WEEK] = [now.clone().startOf('week'), now.clone().endOf('week')], _a[dateTypeEnum.LAST_WEEK] = [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')], _a[dateTypeEnum.MONTH] = [now.clone().startOf('month'), now.clone().endOf('month')], _a[dateTypeEnum.LAST_MONTH] = [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')], _a[dateTypeEnum.QUARTER] = [now.clone().startOf('quarter'), now.clone().endOf('quarter')], _a[dateTypeEnum.LAST_QUARTER] = [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')], _a[dateTypeEnum.BEFORE_7_DAY] = [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_14_DAY] = [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_30_DAY] = [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_90_DAY] = [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_180_DAY] = [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_365_DAY] = [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.PAST_7_DAY] = [now.clone().subtract(7, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.TOMORROW] = [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a[dateTypeEnum.FUTURE_7_DAY] = [now.clone().add(7, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a);
80
+ var dateScopeMap = (_a = {}, _a[dateTypeEnum.TODAY] = [now.clone().startOf('day'), now.clone().endOf('day')], _a[dateTypeEnum.YESTERDAY] = [now.clone().subtract(1, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.WEEK] = [now.clone().startOf('week'), now.clone().endOf('week')], _a[dateTypeEnum.LAST_WEEK] = [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')], _a[dateTypeEnum.MONTH] = [now.clone().startOf('month'), now.clone().endOf('month')], _a[dateTypeEnum.LAST_MONTH] = [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')], _a[dateTypeEnum.QUARTER] = [now.clone().startOf('quarter'), now.clone().endOf('quarter')], _a[dateTypeEnum.LAST_QUARTER] = [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')], _a[dateTypeEnum.BEFORE_7_DAY] = [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_14_DAY] = [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_30_DAY] = [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_90_DAY] = [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_180_DAY] = [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_365_DAY] = [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.PAST_7_DAY] = [now.clone().subtract(7, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.TOMORROW] = [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a[dateTypeEnum.FUTURE_7_DAY] = [now.clone().add(1, 'day').startOf('day'), now.clone().add(7, 'day').endOf('day')], _a);
81
81
  return {
82
82
  dateScopeList: dateScopeList,
83
83
  dateScopeMap: dateScopeMap
@@ -1,4 +1,9 @@
1
- .label-number-input {
1
+ .label-number-input-warper {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ }
6
+ .label-number-input-warper .label-number-input {
2
7
  z-index: 1;
3
8
  width: 100%;
4
9
  height: 100%;
@@ -9,26 +14,21 @@
9
14
  border: 0;
10
15
  outline: 0;
11
16
  }
12
- .label-number-input:focus + label,
13
- .label-number-input:not([data-value='0']) + label {
17
+ .label-number-input-warper .label-number-input:focus + label,
18
+ .label-number-input-warper .label-number-input:not([data-value='0']) + label {
14
19
  transform: translateY(-8px) scale(0.8);
15
20
  }
16
- .label-number-input-field {
21
+ .label-number-input-warper .label-number-input-field {
17
22
  height: 45px;
18
23
  overflow: hidden;
19
24
  border: 1px solid #e5e5e5;
20
25
  border-radius: 8px;
21
26
  transition: border 0.3s;
22
27
  }
23
- .label-number-input-focused {
28
+ .label-number-input-warper .label-number-input-focused {
24
29
  border-color: #000;
25
30
  }
26
- .label-number-input-warper {
27
- position: relative;
28
- width: 100%;
29
- height: 100%;
30
- }
31
- .label-number-input-text {
31
+ .label-number-input-warper .label-number-input-text {
32
32
  position: absolute;
33
33
  top: 12px;
34
34
  left: 15px;
@@ -9,51 +9,51 @@
9
9
 
10
10
  @font-weight-500: 500;
11
11
 
12
- .label-number-input {
13
- z-index: 1;
12
+ .label-number-input-warper {
13
+ position: relative;
14
14
  width: 100%;
15
15
  height: 100%;
16
- padding: 19px 15px 2px 15px;
17
- color: @color_263241;
18
- font-size: @font-size-base;
19
- line-height: 16px;
20
- border: 0;
21
- outline: 0;
22
-
23
- &:focus + label,
24
- &:not([data-value='0']) + label {
25
- transform: translateY(@labelTextLabeltranslateY) scale(@labelTextLabelScale);
26
- }
27
-
28
- &-field {
29
- height: 45px;
30
- overflow: hidden;
31
- border: 1px solid @color_e5e5e5;
32
- border-radius: 8px;
33
- transition: border 0.3s;
34
- }
35
16
 
36
- &-focused {
37
- border-color: @labelFocusBorderColor;
38
- }
39
-
40
- &-warper {
41
- position: relative;
17
+ .label-number-input {
18
+ z-index: 1;
42
19
  width: 100%;
43
20
  height: 100%;
44
- }
45
-
46
- &-text {
47
- position: absolute;
48
- top: 12px;
49
- left: 15px;
50
- z-index: 2;
51
- height: 20px;
52
- color: @color_9aa5b5;
21
+ padding: 19px 15px 2px 15px;
22
+ color: @color_263241;
53
23
  font-size: @font-size-base;
54
- line-height: 20px;
55
- transform-origin: top left;
56
- cursor: text;
57
- transition: all 0.2s ease-out;
24
+ line-height: 16px;
25
+ border: 0;
26
+ outline: 0;
27
+
28
+ &:focus + label,
29
+ &:not([data-value='0']) + label {
30
+ transform: translateY(@labelTextLabeltranslateY) scale(@labelTextLabelScale);
31
+ }
32
+
33
+ &-field {
34
+ height: 45px;
35
+ overflow: hidden;
36
+ border: 1px solid @color_e5e5e5;
37
+ border-radius: 8px;
38
+ transition: border 0.3s;
39
+ }
40
+
41
+ &-focused {
42
+ border-color: @labelFocusBorderColor;
43
+ }
44
+
45
+ &-text {
46
+ position: absolute;
47
+ top: 12px;
48
+ left: 15px;
49
+ z-index: 2;
50
+ height: 20px;
51
+ color: @color_9aa5b5;
52
+ font-size: @font-size-base;
53
+ line-height: 20px;
54
+ transform-origin: top left;
55
+ cursor: text;
56
+ transition: all 0.2s ease-out;
57
+ }
58
58
  }
59
59
  }
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import type { DrawerProps } from 'antd/lib/drawer';
3
+ export declare type DrawerAction = {
4
+ close: () => void;
5
+ open: () => void;
6
+ };
3
7
  export interface ButtonDrawerProps extends DrawerProps {
4
8
  onClose?: () => void;
5
9
  onOpen?: () => void;
6
10
  trigger: React.ReactElement;
7
- children: React.ReactElement;
11
+ children: ((v: DrawerAction) => React.ReactElement) | React.ReactElement;
8
12
  }
9
- export declare type DrawerAction = {
10
- close: () => void;
11
- open: () => void;
12
- };
13
13
  declare const ForwardRefButtonDrawer: React.ForwardRefExoticComponent<ButtonDrawerProps & React.RefAttributes<unknown>>;
14
14
  export default ForwardRefButtonDrawer;
@@ -104,6 +104,8 @@ var react_1 = __importStar(require("react"));
104
104
 
105
105
  var drawer_1 = __importDefault(require("antd/lib/drawer"));
106
106
 
107
+ var isFunction_1 = __importDefault(require("lodash/isFunction"));
108
+
107
109
  var classnames_1 = __importDefault(require("classnames"));
108
110
 
109
111
  var ButtonDrawer = function ButtonDrawer(props, ref) {
@@ -155,7 +157,7 @@ var ButtonDrawer = function ButtonDrawer(props, ref) {
155
157
  title: title,
156
158
  onClose: closeDrawer,
157
159
  visible: drawerVisible
158
- }, restProps), react_1["default"].cloneElement(children, {
160
+ }, restProps), isFunction_1["default"](children) ? children(actionRef.current) : react_1["default"].cloneElement(children, {
159
161
  drawerAction: actionRef.current
160
162
  })));
161
163
  };
package/lib/index.d.ts CHANGED
@@ -54,8 +54,6 @@ export type { LabelTreeSelectProps } from './label-tree-select';
54
54
  export { default as LabelTreeSelect } from './label-tree-select';
55
55
  export type { LabelCustomizeRangePickerProps } from './label-customize-range-picker';
56
56
  export { default as LabelCustomizeRangePicker } from './label-customize-range-picker';
57
- export type { LabelDescItemProps } from './label-desc-item';
58
- export { default as LabelDescItem } from './label-desc-item';
59
57
  export type { RichTextEditorProps } from './rich-text-editor';
60
58
  export { default as RichTextEditor } from './rich-text-editor';
61
59
  export { default as beautifulDnd } from './beautiful-dnd';
package/lib/index.js CHANGED
@@ -265,15 +265,6 @@ Object.defineProperty(exports, "LabelCustomizeRangePicker", {
265
265
  }
266
266
  });
267
267
 
268
- var label_desc_item_1 = require("./label-desc-item");
269
-
270
- Object.defineProperty(exports, "LabelDescItem", {
271
- enumerable: true,
272
- get: function get() {
273
- return label_desc_item_1["default"];
274
- }
275
- });
276
-
277
268
  var rich_text_editor_1 = require("./rich-text-editor");
278
269
 
279
270
  Object.defineProperty(exports, "RichTextEditor", {
@@ -89,9 +89,9 @@ exports.useDateScope = function () {
89
89
  value: [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')]
90
90
  }, {
91
91
  key: dateTypeEnum.FUTURE_7_DAY,
92
- value: [now.clone().add(7, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')]
92
+ value: [now.clone().add(1, 'day').startOf('day'), now.clone().add(7, 'day').endOf('day')]
93
93
  }];
94
- var dateScopeMap = (_a = {}, _a[dateTypeEnum.TODAY] = [now.clone().startOf('day'), now.clone().endOf('day')], _a[dateTypeEnum.YESTERDAY] = [now.clone().subtract(1, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.WEEK] = [now.clone().startOf('week'), now.clone().endOf('week')], _a[dateTypeEnum.LAST_WEEK] = [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')], _a[dateTypeEnum.MONTH] = [now.clone().startOf('month'), now.clone().endOf('month')], _a[dateTypeEnum.LAST_MONTH] = [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')], _a[dateTypeEnum.QUARTER] = [now.clone().startOf('quarter'), now.clone().endOf('quarter')], _a[dateTypeEnum.LAST_QUARTER] = [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')], _a[dateTypeEnum.BEFORE_7_DAY] = [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_14_DAY] = [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_30_DAY] = [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_90_DAY] = [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_180_DAY] = [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_365_DAY] = [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.PAST_7_DAY] = [now.clone().subtract(7, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.TOMORROW] = [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a[dateTypeEnum.FUTURE_7_DAY] = [now.clone().add(7, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a);
94
+ var dateScopeMap = (_a = {}, _a[dateTypeEnum.TODAY] = [now.clone().startOf('day'), now.clone().endOf('day')], _a[dateTypeEnum.YESTERDAY] = [now.clone().subtract(1, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.WEEK] = [now.clone().startOf('week'), now.clone().endOf('week')], _a[dateTypeEnum.LAST_WEEK] = [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')], _a[dateTypeEnum.MONTH] = [now.clone().startOf('month'), now.clone().endOf('month')], _a[dateTypeEnum.LAST_MONTH] = [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')], _a[dateTypeEnum.QUARTER] = [now.clone().startOf('quarter'), now.clone().endOf('quarter')], _a[dateTypeEnum.LAST_QUARTER] = [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')], _a[dateTypeEnum.BEFORE_7_DAY] = [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_14_DAY] = [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_30_DAY] = [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_90_DAY] = [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_180_DAY] = [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.BEFORE_365_DAY] = [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')], _a[dateTypeEnum.PAST_7_DAY] = [now.clone().subtract(7, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')], _a[dateTypeEnum.TOMORROW] = [now.clone().add(1, 'day').startOf('day'), now.clone().add(1, 'day').endOf('day')], _a[dateTypeEnum.FUTURE_7_DAY] = [now.clone().add(1, 'day').startOf('day'), now.clone().add(7, 'day').endOf('day')], _a);
95
95
  return {
96
96
  dateScopeList: dateScopeList,
97
97
  dateScopeMap: dateScopeMap
@@ -1,4 +1,9 @@
1
- .label-number-input {
1
+ .label-number-input-warper {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ }
6
+ .label-number-input-warper .label-number-input {
2
7
  z-index: 1;
3
8
  width: 100%;
4
9
  height: 100%;
@@ -9,26 +14,21 @@
9
14
  border: 0;
10
15
  outline: 0;
11
16
  }
12
- .label-number-input:focus + label,
13
- .label-number-input:not([data-value='0']) + label {
17
+ .label-number-input-warper .label-number-input:focus + label,
18
+ .label-number-input-warper .label-number-input:not([data-value='0']) + label {
14
19
  transform: translateY(-8px) scale(0.8);
15
20
  }
16
- .label-number-input-field {
21
+ .label-number-input-warper .label-number-input-field {
17
22
  height: 45px;
18
23
  overflow: hidden;
19
24
  border: 1px solid #e5e5e5;
20
25
  border-radius: 8px;
21
26
  transition: border 0.3s;
22
27
  }
23
- .label-number-input-focused {
28
+ .label-number-input-warper .label-number-input-focused {
24
29
  border-color: #000;
25
30
  }
26
- .label-number-input-warper {
27
- position: relative;
28
- width: 100%;
29
- height: 100%;
30
- }
31
- .label-number-input-text {
31
+ .label-number-input-warper .label-number-input-text {
32
32
  position: absolute;
33
33
  top: 12px;
34
34
  left: 15px;
@@ -9,51 +9,51 @@
9
9
 
10
10
  @font-weight-500: 500;
11
11
 
12
- .label-number-input {
13
- z-index: 1;
12
+ .label-number-input-warper {
13
+ position: relative;
14
14
  width: 100%;
15
15
  height: 100%;
16
- padding: 19px 15px 2px 15px;
17
- color: @color_263241;
18
- font-size: @font-size-base;
19
- line-height: 16px;
20
- border: 0;
21
- outline: 0;
22
-
23
- &:focus + label,
24
- &:not([data-value='0']) + label {
25
- transform: translateY(@labelTextLabeltranslateY) scale(@labelTextLabelScale);
26
- }
27
-
28
- &-field {
29
- height: 45px;
30
- overflow: hidden;
31
- border: 1px solid @color_e5e5e5;
32
- border-radius: 8px;
33
- transition: border 0.3s;
34
- }
35
16
 
36
- &-focused {
37
- border-color: @labelFocusBorderColor;
38
- }
39
-
40
- &-warper {
41
- position: relative;
17
+ .label-number-input {
18
+ z-index: 1;
42
19
  width: 100%;
43
20
  height: 100%;
44
- }
45
-
46
- &-text {
47
- position: absolute;
48
- top: 12px;
49
- left: 15px;
50
- z-index: 2;
51
- height: 20px;
52
- color: @color_9aa5b5;
21
+ padding: 19px 15px 2px 15px;
22
+ color: @color_263241;
53
23
  font-size: @font-size-base;
54
- line-height: 20px;
55
- transform-origin: top left;
56
- cursor: text;
57
- transition: all 0.2s ease-out;
24
+ line-height: 16px;
25
+ border: 0;
26
+ outline: 0;
27
+
28
+ &:focus + label,
29
+ &:not([data-value='0']) + label {
30
+ transform: translateY(@labelTextLabeltranslateY) scale(@labelTextLabelScale);
31
+ }
32
+
33
+ &-field {
34
+ height: 45px;
35
+ overflow: hidden;
36
+ border: 1px solid @color_e5e5e5;
37
+ border-radius: 8px;
38
+ transition: border 0.3s;
39
+ }
40
+
41
+ &-focused {
42
+ border-color: @labelFocusBorderColor;
43
+ }
44
+
45
+ &-text {
46
+ position: absolute;
47
+ top: 12px;
48
+ left: 15px;
49
+ z-index: 2;
50
+ height: 20px;
51
+ color: @color_9aa5b5;
52
+ font-size: @font-size-base;
53
+ line-height: 20px;
54
+ transform-origin: top left;
55
+ cursor: text;
56
+ transition: all 0.2s ease-out;
57
+ }
58
58
  }
59
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "2.0.142",
3
+ "version": "2.0.145",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -33,7 +33,7 @@
33
33
  "@ahooksjs/use-url-state": "^2.5.8",
34
34
  "@tinymce/tinymce-react": "^3.13.0",
35
35
  "@types/react-beautiful-dnd": "^13.1.2",
36
- "a-icons": "^1.0.65",
36
+ "a-icons": "^1.0.66",
37
37
  "ahooks": "^3.0.8",
38
38
  "bignumber.js": "^9.0.1",
39
39
  "copy-to-clipboard": "^3.3.1",
@@ -69,5 +69,5 @@
69
69
  "node": ">=10.0.0"
70
70
  },
71
71
  "license": "MIT",
72
- "gitHead": "01c1f1d83ee6365b7ce90b82f1ea7baefad35667"
72
+ "gitHead": "650d26e8bd8467abe88cc0a6b5cab915fa9cec17"
73
73
  }
@@ -1,9 +0,0 @@
1
- .label-desc {
2
- margin-top: 10px;
3
-
4
- :global {
5
- .desc-item-label {
6
- color: #ff6b00;
7
- }
8
- }
9
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export declare type LabelDescItemProps = {
3
- /** 自定义class */
4
- className?: string;
5
- /** label 标签的文本 */
6
- label?: React.ReactNode;
7
- /** descItem的value */
8
- value?: React.ReactNode;
9
- /** 带有后缀的 item */
10
- suffix?: React.ReactNode;
11
- };
12
- declare const LabelDescItem: React.FC<LabelDescItemProps>;
13
- export default LabelDescItem;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import classNames from 'classnames';
3
-
4
- var LabelDescItem = function LabelDescItem(props) {
5
- var className = props.className,
6
- label = props.label,
7
- value = props.value,
8
- suffix = props.suffix;
9
- return /*#__PURE__*/React.createElement("div", {
10
- className: classNames('desc-item', className)
11
- }, /*#__PURE__*/React.createElement("div", {
12
- className: "desc-item-left-content"
13
- }, label && /*#__PURE__*/React.createElement("div", {
14
- className: "desc-item-label"
15
- }, label), /*#__PURE__*/React.createElement("div", {
16
- className: "desc-item-value"
17
- }, value)), suffix && /*#__PURE__*/React.createElement("div", {
18
- className: "desc-item-value"
19
- }, suffix));
20
- };
21
-
22
- export default LabelDescItem;
@@ -1,23 +0,0 @@
1
- .desc-item {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- padding: 17px 16px;
6
- overflow: hidden;
7
- background-color: #f8f8f8;
8
- border-radius: 12px;
9
- }
10
- .desc-item-left-content {
11
- display: flex;
12
- flex-shrink: 0;
13
- align-items: center;
14
- }
15
- .desc-item-label {
16
- flex-shrink: 0;
17
- margin-right: 10px;
18
- color: #b3b3b3;
19
- font-weight: 500;
20
- }
21
- .desc-item-value {
22
- font-weight: 500;
23
- }
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,26 +0,0 @@
1
- .desc-item {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- padding: 17px 16px;
6
- overflow: hidden;
7
- background-color: #f8f8f8;
8
- border-radius: 12px;
9
-
10
- &-left-content {
11
- display: flex;
12
- flex-shrink: 0;
13
- align-items: center;
14
- }
15
-
16
- &-label {
17
- flex-shrink: 0;
18
- margin-right: 10px;
19
- color: #b3b3b3;
20
- font-weight: 500;
21
- }
22
-
23
- &-value {
24
- font-weight: 500;
25
- }
26
- }
@@ -1,9 +0,0 @@
1
- .label-desc {
2
- margin-top: 10px;
3
-
4
- :global {
5
- .desc-item-label {
6
- color: #ff6b00;
7
- }
8
- }
9
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export declare type LabelDescItemProps = {
3
- /** 自定义class */
4
- className?: string;
5
- /** label 标签的文本 */
6
- label?: React.ReactNode;
7
- /** descItem的value */
8
- value?: React.ReactNode;
9
- /** 带有后缀的 item */
10
- suffix?: React.ReactNode;
11
- };
12
- declare const LabelDescItem: React.FC<LabelDescItemProps>;
13
- export default LabelDescItem;
@@ -1,35 +0,0 @@
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 classnames_1 = __importDefault(require("classnames"));
16
-
17
- var LabelDescItem = function LabelDescItem(props) {
18
- var className = props.className,
19
- label = props.label,
20
- value = props.value,
21
- suffix = props.suffix;
22
- return react_1["default"].createElement("div", {
23
- className: classnames_1["default"]('desc-item', className)
24
- }, react_1["default"].createElement("div", {
25
- className: "desc-item-left-content"
26
- }, label && react_1["default"].createElement("div", {
27
- className: "desc-item-label"
28
- }, label), react_1["default"].createElement("div", {
29
- className: "desc-item-value"
30
- }, value)), suffix && react_1["default"].createElement("div", {
31
- className: "desc-item-value"
32
- }, suffix));
33
- };
34
-
35
- exports["default"] = LabelDescItem;
@@ -1,23 +0,0 @@
1
- .desc-item {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- padding: 17px 16px;
6
- overflow: hidden;
7
- background-color: #f8f8f8;
8
- border-radius: 12px;
9
- }
10
- .desc-item-left-content {
11
- display: flex;
12
- flex-shrink: 0;
13
- align-items: center;
14
- }
15
- .desc-item-label {
16
- flex-shrink: 0;
17
- margin-right: 10px;
18
- color: #b3b3b3;
19
- font-weight: 500;
20
- }
21
- .desc-item-value {
22
- font-weight: 500;
23
- }
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- require("./index.less");
@@ -1,26 +0,0 @@
1
- .desc-item {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- padding: 17px 16px;
6
- overflow: hidden;
7
- background-color: #f8f8f8;
8
- border-radius: 12px;
9
-
10
- &-left-content {
11
- display: flex;
12
- flex-shrink: 0;
13
- align-items: center;
14
- }
15
-
16
- &-label {
17
- flex-shrink: 0;
18
- margin-right: 10px;
19
- color: #b3b3b3;
20
- font-weight: 500;
21
- }
22
-
23
- &-value {
24
- font-weight: 500;
25
- }
26
- }