@autobest-ui/components 1.1.5 → 1.1.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.
Files changed (110) hide show
  1. package/README.md +10 -10
  2. package/esm/accordion/__stories__/style.scss +58 -58
  3. package/esm/affix/__stories__/style.scss +13 -13
  4. package/esm/affix/style/index.scss +34 -34
  5. package/esm/base.scss +42 -42
  6. package/esm/carousel/__stories__/style.scss +41 -41
  7. package/esm/carousel/style/index.scss +37 -37
  8. package/esm/checkbox/style/index.scss +117 -117
  9. package/esm/collapse/__stories__/style.scss +18 -18
  10. package/esm/collapse/style/index.scss +42 -42
  11. package/esm/confirm/style/index.scss +44 -44
  12. package/esm/date-picker/calendar/grid/index.scss +85 -85
  13. package/esm/date-picker/calendar/index.scss +57 -57
  14. package/esm/date-picker/index.d.ts +1 -0
  15. package/esm/date-picker/index.js +17 -7
  16. package/esm/date-picker/style/index.css +1 -1
  17. package/esm/date-picker/style/index.scss +23 -19
  18. package/esm/drawer/style/index.scss +44 -44
  19. package/esm/ellipsis/style/index.scss +35 -35
  20. package/esm/guide/__stories__/style.scss +13 -13
  21. package/esm/guide/style/index.scss +17 -17
  22. package/esm/icon/__stories__/style.scss +39 -39
  23. package/esm/icon/style/index.scss +6 -6
  24. package/esm/index.d.ts +2 -1
  25. package/esm/input-number/style/index.scss +86 -86
  26. package/esm/lazy-image/__stories__/style.scss +9 -9
  27. package/esm/lazy-image/style/index.scss +24 -24
  28. package/esm/link-list/style/index.scss +125 -125
  29. package/esm/loading/style/index.scss +30 -30
  30. package/esm/loading-bar/style/index.scss +62 -62
  31. package/esm/loading-container/__stories__/style.scss +5 -5
  32. package/esm/loading-container/style/index.scss +27 -27
  33. package/esm/loading-icon/style/index.scss +23 -23
  34. package/esm/mask/style/index.scss +34 -34
  35. package/esm/message/style/index.scss +70 -70
  36. package/esm/modal/style/index.scss +112 -112
  37. package/esm/move/__stories__/style.scss +6 -6
  38. package/esm/move/style/index.scss +7 -7
  39. package/esm/popover/__stories__/style.scss +15 -15
  40. package/esm/popover/style/index.scss +59 -59
  41. package/esm/select/__stories__/style.scss +8 -8
  42. package/esm/select/style/index.scss +126 -126
  43. package/esm/show-more/style/index.scss +22 -22
  44. package/esm/skeleton/__stories__/style.scss +2 -2
  45. package/esm/skeleton/style/index.scss +26 -26
  46. package/esm/style.css +14 -14
  47. package/esm/table/__stories__/style.scss +33 -33
  48. package/esm/table/body/BodyRow.d.ts +7 -1
  49. package/esm/table/body/BodyRow.js +6 -2
  50. package/esm/table/body/index.js +2 -1
  51. package/esm/table/style/index.scss +51 -51
  52. package/esm/tabs/__stories__/style.scss +8 -8
  53. package/esm/tabs/style/index.scss +62 -62
  54. package/esm/tooltip/style/index.scss +61 -61
  55. package/esm/trigger/style/index.scss +79 -79
  56. package/lib/accordion/__stories__/style.scss +58 -58
  57. package/lib/affix/__stories__/style.scss +13 -13
  58. package/lib/affix/style/index.scss +34 -34
  59. package/lib/base.scss +42 -42
  60. package/lib/carousel/__stories__/style.scss +41 -41
  61. package/lib/carousel/style/index.scss +37 -37
  62. package/lib/checkbox/style/index.scss +117 -117
  63. package/lib/collapse/__stories__/style.scss +18 -18
  64. package/lib/collapse/style/index.scss +42 -42
  65. package/lib/confirm/style/index.scss +44 -44
  66. package/lib/date-picker/calendar/grid/index.scss +85 -85
  67. package/lib/date-picker/calendar/index.scss +57 -57
  68. package/lib/date-picker/index.d.ts +1 -0
  69. package/lib/date-picker/index.js +17 -7
  70. package/lib/date-picker/style/index.css +1 -1
  71. package/lib/date-picker/style/index.scss +23 -19
  72. package/lib/drawer/style/index.scss +44 -44
  73. package/lib/ellipsis/style/index.scss +35 -35
  74. package/lib/guide/__stories__/style.scss +13 -13
  75. package/lib/guide/style/index.scss +17 -17
  76. package/lib/icon/__stories__/style.scss +39 -39
  77. package/lib/icon/style/index.scss +6 -6
  78. package/lib/index.d.ts +2 -1
  79. package/lib/input-number/style/index.scss +86 -86
  80. package/lib/lazy-image/__stories__/style.scss +9 -9
  81. package/lib/lazy-image/style/index.scss +24 -24
  82. package/lib/link-list/style/index.scss +125 -125
  83. package/lib/loading/style/index.scss +30 -30
  84. package/lib/loading-bar/style/index.scss +62 -62
  85. package/lib/loading-container/__stories__/style.scss +5 -5
  86. package/lib/loading-container/style/index.scss +27 -27
  87. package/lib/loading-icon/style/index.scss +23 -23
  88. package/lib/mask/style/index.scss +34 -34
  89. package/lib/message/style/index.scss +70 -70
  90. package/lib/modal/style/index.scss +112 -112
  91. package/lib/move/__stories__/style.scss +6 -6
  92. package/lib/move/style/index.scss +7 -7
  93. package/lib/popover/__stories__/style.scss +15 -15
  94. package/lib/popover/style/index.scss +59 -59
  95. package/lib/select/__stories__/style.scss +8 -8
  96. package/lib/select/style/index.scss +126 -126
  97. package/lib/show-more/style/index.scss +22 -22
  98. package/lib/skeleton/__stories__/style.scss +2 -2
  99. package/lib/skeleton/style/index.scss +26 -26
  100. package/lib/style.css +14 -14
  101. package/lib/table/__stories__/style.scss +33 -33
  102. package/lib/table/body/BodyRow.d.ts +7 -1
  103. package/lib/table/body/BodyRow.js +6 -2
  104. package/lib/table/body/index.js +2 -1
  105. package/lib/table/style/index.scss +51 -51
  106. package/lib/tabs/__stories__/style.scss +8 -8
  107. package/lib/tabs/style/index.scss +62 -62
  108. package/lib/tooltip/style/index.scss +61 -61
  109. package/lib/trigger/style/index.scss +79 -79
  110. package/package.json +2 -2
@@ -1,19 +1,19 @@
1
- .demo-collapse{
2
- min-height: 200px;
3
- padding: 0.2rem;
4
- }
5
-
6
- .title-wrap {
7
- width: 1rem;
8
- height: .4rem;
9
- background-color: #3B82F6;
10
- color: #F3F4F6;
11
-
12
- > strong {
13
- display: block;
14
- width: 1rem;
15
- height: .2rem;
16
- background-color: #10B981;
17
- cursor: pointer;
18
- }
1
+ .demo-collapse{
2
+ min-height: 200px;
3
+ padding: 0.2rem;
4
+ }
5
+
6
+ .title-wrap {
7
+ width: 1rem;
8
+ height: .4rem;
9
+ background-color: #3B82F6;
10
+ color: #F3F4F6;
11
+
12
+ > strong {
13
+ display: block;
14
+ width: 1rem;
15
+ height: .2rem;
16
+ background-color: #10B981;
17
+ cursor: pointer;
18
+ }
19
19
  }
@@ -1,43 +1,43 @@
1
- $namespace: ab-collapse;
2
- $collapseFade: #{$namespace}-fade;
3
-
4
- .#{$namespace} {
5
- transform-origin: left top;
6
- transition: opacity 200ms, height 200ms;
7
- &-hidden{
8
- height: 0;
9
- overflow: hidden;
10
- }
11
- }
12
-
13
- .#{$collapseFade} {
14
- &-enter {
15
- opacity: 0.8;
16
- overflow: hidden;
17
- }
18
-
19
- &-enter-active {
20
- opacity: 1;
21
- overflow: hidden;
22
- }
23
-
24
- &-enter-done {
25
- opacity: 1;
26
- overflow: initial;
27
- }
28
-
29
- &-exit {
30
- opacity: 1;
31
- overflow: hidden;
32
- }
33
-
34
- &-exit-active {
35
- opacity: 0.8;
36
- overflow: hidden;
37
- }
38
-
39
- &-exit-done {
40
- display: none;
41
- overflow: initial;
42
- }
1
+ $namespace: ab-collapse;
2
+ $collapseFade: #{$namespace}-fade;
3
+
4
+ .#{$namespace} {
5
+ transform-origin: left top;
6
+ transition: opacity 200ms, height 200ms;
7
+ &-hidden{
8
+ height: 0;
9
+ overflow: hidden;
10
+ }
11
+ }
12
+
13
+ .#{$collapseFade} {
14
+ &-enter {
15
+ opacity: 0.8;
16
+ overflow: hidden;
17
+ }
18
+
19
+ &-enter-active {
20
+ opacity: 1;
21
+ overflow: hidden;
22
+ }
23
+
24
+ &-enter-done {
25
+ opacity: 1;
26
+ overflow: initial;
27
+ }
28
+
29
+ &-exit {
30
+ opacity: 1;
31
+ overflow: hidden;
32
+ }
33
+
34
+ &-exit-active {
35
+ opacity: 0.8;
36
+ overflow: hidden;
37
+ }
38
+
39
+ &-exit-done {
40
+ display: none;
41
+ overflow: initial;
42
+ }
43
43
  }
@@ -1,44 +1,44 @@
1
- $namespace: ab-confirm;
2
-
3
- .#{$namespace} {
4
- &-btns {
5
- display: flex;
6
- justify-content: flex-end;
7
- padding-top: .42rem;
8
- }
9
-
10
- &-ok, &-cancel {
11
- overflow: hidden;
12
- position: relative;
13
- font-size: .12rem;
14
- border-width: 1px;
15
- border-style: solid;
16
- outline: none;
17
- cursor: pointer;
18
- font-weight: bold;
19
- padding: .05rem .3rem;
20
- display: inline-block;
21
- color: #fff;
22
- margin-left: .3rem;
23
- }
24
-
25
- &-ok {
26
- border-color: #bc0000;
27
- background: linear-gradient(180deg, #c00000 0%, #c00000 0%, #a00000 100%, #a00000 100%);
28
-
29
- &:hover {
30
- border-color: #bc0000;
31
- background: #bc0000;
32
- }
33
- }
34
-
35
- &-cancel {
36
- border-color: #808080;
37
- background: linear-gradient(180deg, #909090 0%, #909090 0%, #707070 100%, #707070 100%);
38
-
39
- &:hover {
40
- border-color: #808080;
41
- background: #808080;
42
- }
43
- }
44
- }
1
+ $namespace: ab-confirm;
2
+
3
+ .#{$namespace} {
4
+ &-btns {
5
+ display: flex;
6
+ justify-content: flex-end;
7
+ padding-top: .42rem;
8
+ }
9
+
10
+ &-ok, &-cancel {
11
+ overflow: hidden;
12
+ position: relative;
13
+ font-size: .12rem;
14
+ border-width: 1px;
15
+ border-style: solid;
16
+ outline: none;
17
+ cursor: pointer;
18
+ font-weight: bold;
19
+ padding: .05rem .3rem;
20
+ display: inline-block;
21
+ color: #fff;
22
+ margin-left: .3rem;
23
+ }
24
+
25
+ &-ok {
26
+ border-color: #bc0000;
27
+ background: linear-gradient(180deg, #c00000 0%, #c00000 0%, #a00000 100%, #a00000 100%);
28
+
29
+ &:hover {
30
+ border-color: #bc0000;
31
+ background: #bc0000;
32
+ }
33
+ }
34
+
35
+ &-cancel {
36
+ border-color: #808080;
37
+ background: linear-gradient(180deg, #909090 0%, #909090 0%, #707070 100%, #707070 100%);
38
+
39
+ &:hover {
40
+ border-color: #808080;
41
+ background: #808080;
42
+ }
43
+ }
44
+ }
@@ -1,86 +1,86 @@
1
- $namespace: ab-dp-cg;
2
-
3
- .#{$namespace} {
4
- &-title, &-head, &-content {
5
- display: flex;
6
- align-items: center;
7
- }
8
-
9
- &-title {
10
- user-select: none;
11
- font-size: .14rem;
12
- padding-bottom: .08rem;
13
-
14
- > strong {
15
- flex: 1 1;
16
- margin-left: .1rem;
17
- cursor: default;
18
- color: #4A4A4A;
19
-
20
- &.#{$namespace}-clickable {
21
- cursor: pointer;
22
-
23
- &:hover {
24
- color: #000;
25
- }
26
- }
27
- }
28
- }
29
-
30
- &-icon, &-dis-icon {
31
- align-self: flex-end;
32
- margin-left: .08rem;
33
- }
34
-
35
- &-icon {
36
- cursor: pointer;
37
- }
38
-
39
- &-head {
40
- padding-bottom: .05rem;
41
-
42
- > li {
43
- display: flex;
44
- align-items: center;
45
- justify-content: center;
46
- cursor: default;
47
- }
48
- }
49
-
50
- &-content {
51
- flex-wrap: wrap;
52
-
53
- > li {
54
- cursor: pointer;
55
- display: flex;
56
- align-items: center;
57
- justify-content: center;
58
- color: #000;
59
-
60
- &:hover {
61
- background: #F0F0F0;
62
- }
63
-
64
- &.#{$namespace}-dis {
65
- cursor: not-allowed;
66
- color: #b0b0b0;
67
-
68
- &:hover {
69
- background: none;
70
- }
71
- }
72
-
73
- &:active, &.#{$namespace}-selected {
74
- background: #c7e0f4;
75
- border: 3px solid #C7E0F4;
76
- border-radius: 2px;
77
- color: #000000;
78
- }
79
-
80
- &.#{$namespace}-today {
81
- background: #0078D4;
82
- color: #ffffff;
83
- }
84
- }
85
- }
1
+ $namespace: ab-dp-cg;
2
+
3
+ .#{$namespace} {
4
+ &-title, &-head, &-content {
5
+ display: flex;
6
+ align-items: center;
7
+ }
8
+
9
+ &-title {
10
+ user-select: none;
11
+ font-size: .14rem;
12
+ padding-bottom: .08rem;
13
+
14
+ > strong {
15
+ flex: 1 1;
16
+ margin-left: .1rem;
17
+ cursor: default;
18
+ color: #4A4A4A;
19
+
20
+ &.#{$namespace}-clickable {
21
+ cursor: pointer;
22
+
23
+ &:hover {
24
+ color: #000;
25
+ }
26
+ }
27
+ }
28
+ }
29
+
30
+ &-icon, &-dis-icon {
31
+ align-self: flex-end;
32
+ margin-left: .08rem;
33
+ }
34
+
35
+ &-icon {
36
+ cursor: pointer;
37
+ }
38
+
39
+ &-head {
40
+ padding-bottom: .05rem;
41
+
42
+ > li {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ cursor: default;
47
+ }
48
+ }
49
+
50
+ &-content {
51
+ flex-wrap: wrap;
52
+
53
+ > li {
54
+ cursor: pointer;
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ color: #000;
59
+
60
+ &:hover {
61
+ background: #F0F0F0;
62
+ }
63
+
64
+ &.#{$namespace}-dis {
65
+ cursor: not-allowed;
66
+ color: #b0b0b0;
67
+
68
+ &:hover {
69
+ background: none;
70
+ }
71
+ }
72
+
73
+ &:active, &.#{$namespace}-selected {
74
+ background: #c7e0f4;
75
+ border: 3px solid #C7E0F4;
76
+ border-radius: 2px;
77
+ color: #000000;
78
+ }
79
+
80
+ &.#{$namespace}-today {
81
+ background: #0078D4;
82
+ color: #ffffff;
83
+ }
84
+ }
85
+ }
86
86
  }
@@ -1,58 +1,58 @@
1
- $namespace: ab-dp-cal;
2
-
3
- .#{$namespace} {
4
- display: flex;
5
-
6
- &-my {
7
- padding-left: .12rem;
8
- margin-left: .12rem;
9
- border-left: 1px solid #B0B0B0;
10
- }
11
-
12
- &-day, &-my {
13
- width: 2.1rem;
14
- }
15
-
16
- &-dis {
17
- color: #C8C8C8;
18
- }
19
-
20
- &-dg {
21
- > ul {
22
- > li {
23
- width: 14.28%;
24
- height: .28rem;
25
-
26
- &.#{$namespace}-out {
27
- color: #666666;
28
- }
29
- }
30
- }
31
- }
32
-
33
- &-myg {
34
- padding-bottom: .62rem;
35
-
36
- > ul {
37
- justify-content: space-between;
38
-
39
- > li {
40
- width: .4rem;
41
- height: .4rem;
42
- margin-bottom: .1rem;
43
- }
44
- }
45
- }
46
-
47
- &-t {
48
- cursor: pointer;
49
- position: absolute;
50
- right: .08rem;
51
- bottom: .3rem;
52
-
53
- &.#{$namespace}-t-dis {
54
- color: #b0b0b0;
55
- cursor: default;
56
- }
57
- }
1
+ $namespace: ab-dp-cal;
2
+
3
+ .#{$namespace} {
4
+ display: flex;
5
+
6
+ &-my {
7
+ padding-left: .12rem;
8
+ margin-left: .12rem;
9
+ border-left: 1px solid #B0B0B0;
10
+ }
11
+
12
+ &-day, &-my {
13
+ width: 2.1rem;
14
+ }
15
+
16
+ &-dis {
17
+ color: #C8C8C8;
18
+ }
19
+
20
+ &-dg {
21
+ > ul {
22
+ > li {
23
+ width: 14.28%;
24
+ height: .28rem;
25
+
26
+ &.#{$namespace}-out {
27
+ color: #666666;
28
+ }
29
+ }
30
+ }
31
+ }
32
+
33
+ &-myg {
34
+ padding-bottom: .62rem;
35
+
36
+ > ul {
37
+ justify-content: space-between;
38
+
39
+ > li {
40
+ width: .4rem;
41
+ height: .4rem;
42
+ margin-bottom: .1rem;
43
+ }
44
+ }
45
+ }
46
+
47
+ &-t {
48
+ cursor: pointer;
49
+ position: absolute;
50
+ right: .08rem;
51
+ bottom: .3rem;
52
+
53
+ &.#{$namespace}-t-dis {
54
+ color: #b0b0b0;
55
+ cursor: default;
56
+ }
57
+ }
58
58
  }
@@ -54,6 +54,7 @@ declare class DatePicker extends React.Component<DatePickerProps, DatePickerStat
54
54
  parseDateFromString: (value: any) => Date;
55
55
  };
56
56
  onCalendarSelect: (date: Date) => void;
57
+ updateDate: () => void;
57
58
  onInputFocus: () => void;
58
59
  onInputChange: (ev: any) => void;
59
60
  onChangeDate: () => void;
@@ -88,11 +88,23 @@ function (_super) {
88
88
  }
89
89
  };
90
90
 
91
- _this.onInputFocus = function () {
92
- if (_this.calendarRef.current && _this.state.inputValue) {
93
- _this.calendarRef.current.updateDate(_this.props.parseDateFromString(_this.state.inputValue, _this.props.name));
91
+ _this.updateDate = function () {
92
+ if (!_this.calendarRef.current || !_this.state.inputValue) {
93
+ return;
94
+ }
95
+
96
+ var date = _this.props.parseDateFromString(_this.state.inputValue, _this.props.name);
97
+
98
+ if (isNaN(date.getTime())) {
99
+ return;
94
100
  }
95
101
 
102
+ _this.calendarRef.current.updateDate(date);
103
+ };
104
+
105
+ _this.onInputFocus = function () {
106
+ _this.updateDate();
107
+
96
108
  _this.setState({
97
109
  calendarVisible: true
98
110
  });
@@ -109,13 +121,11 @@ function (_super) {
109
121
  };
110
122
 
111
123
  _this.onChangeDate = function () {
112
- if (!_this.props.allowTextInput || !_this.calendarRef.current || !_this.state.inputValue) {
124
+ if (!_this.props.allowTextInput) {
113
125
  return;
114
126
  }
115
127
 
116
- var date = _this.props.parseDateFromString(_this.state.inputValue, _this.props.name);
117
-
118
- _this.calendarRef.current.updateDate(date);
128
+ _this.updateDate();
119
129
  };
120
130
 
121
131
  _this.onPopoverVisibleChange = function (visible) {
@@ -1 +1 @@
1
- .ab-date-picker{position:relative}.ab-date-picker-input{outline:0;font-size:.14rem;padding:.04rem;width:1.44rem}.ab-date-picker-icon{position:absolute;right:.05rem;top:50%;transform:translateY(-50%)}
1
+ .ab-date-picker{position:relative}.ab-date-picker-input{outline:0;font-size:.14rem;padding:.04rem;width:1.44rem}.ab-date-picker-input.ab-date-picker-error{background:#fffacd}.ab-date-picker-icon{position:absolute;right:.05rem;top:50%;transform:translateY(-50%)}
@@ -1,19 +1,23 @@
1
- $namespace: ab-date-picker;
2
-
3
- .#{$namespace} {
4
- position: relative;
5
-
6
- &-input {
7
- outline: none;
8
- font-size: .14rem;
9
- padding: .04rem;
10
- width: 1.44rem;
11
- }
12
-
13
- &-icon {
14
- position: absolute;
15
- right: 0.05rem;
16
- top: 50%;
17
- transform: translateY(-50%);
18
- }
19
- }
1
+ $namespace: ab-date-picker;
2
+
3
+ .#{$namespace} {
4
+ position: relative;
5
+
6
+ &-input {
7
+ outline: none;
8
+ font-size: .14rem;
9
+ padding: .04rem;
10
+ width: 1.44rem;
11
+
12
+ &.#{$namespace}-error {
13
+ background: #fffacd;
14
+ }
15
+ }
16
+
17
+ &-icon {
18
+ position: absolute;
19
+ right: 0.05rem;
20
+ top: 50%;
21
+ transform: translateY(-50%);
22
+ }
23
+ }
@@ -1,44 +1,44 @@
1
- $namespace: ab-drawer;
2
-
3
- .#{$namespace} {
4
- position: fixed;
5
- z-index: 101;
6
- background-color: #fff;
7
- overflow: auto;
8
- transition: transform 300ms cubic-bezier(.7, .3, .1, 1);
9
-
10
- &-times {
11
- position: absolute;
12
- right: .17rem;
13
- font-size: .16rem;
14
- color: #b0b0b0;
15
- cursor: pointer;
16
- top: .11rem;
17
-
18
- &:hover {
19
- color: #333;
20
- }
21
- }
22
-
23
- &-tf-top {
24
- transform: translate(0, -100%);
25
- }
26
-
27
- &-tf-bottom {
28
- transform: translate(0, 100%);
29
- }
30
-
31
- &-tf-left {
32
- transform: translate(-100%, 0);
33
- }
34
-
35
- &-tf-right {
36
- transform: translate(100%, 0);
37
- }
38
-
39
- &-hidden {
40
- &.ab-mask, &.ab-drawer {
41
- display: none;
42
- }
43
- }
44
- }
1
+ $namespace: ab-drawer;
2
+
3
+ .#{$namespace} {
4
+ position: fixed;
5
+ z-index: 101;
6
+ background-color: #fff;
7
+ overflow: auto;
8
+ transition: transform 300ms cubic-bezier(.7, .3, .1, 1);
9
+
10
+ &-times {
11
+ position: absolute;
12
+ right: .17rem;
13
+ font-size: .16rem;
14
+ color: #b0b0b0;
15
+ cursor: pointer;
16
+ top: .11rem;
17
+
18
+ &:hover {
19
+ color: #333;
20
+ }
21
+ }
22
+
23
+ &-tf-top {
24
+ transform: translate(0, -100%);
25
+ }
26
+
27
+ &-tf-bottom {
28
+ transform: translate(0, 100%);
29
+ }
30
+
31
+ &-tf-left {
32
+ transform: translate(-100%, 0);
33
+ }
34
+
35
+ &-tf-right {
36
+ transform: translate(100%, 0);
37
+ }
38
+
39
+ &-hidden {
40
+ &.ab-mask, &.ab-drawer {
41
+ display: none;
42
+ }
43
+ }
44
+ }