@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,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;
@@ -68,11 +68,23 @@ function (_super) {
68
68
  }
69
69
  };
70
70
 
71
- _this.onInputFocus = function () {
72
- if (_this.calendarRef.current && _this.state.inputValue) {
73
- _this.calendarRef.current.updateDate(_this.props.parseDateFromString(_this.state.inputValue, _this.props.name));
71
+ _this.updateDate = function () {
72
+ if (!_this.calendarRef.current || !_this.state.inputValue) {
73
+ return;
74
+ }
75
+
76
+ var date = _this.props.parseDateFromString(_this.state.inputValue, _this.props.name);
77
+
78
+ if (isNaN(date.getTime())) {
79
+ return;
74
80
  }
75
81
 
82
+ _this.calendarRef.current.updateDate(date);
83
+ };
84
+
85
+ _this.onInputFocus = function () {
86
+ _this.updateDate();
87
+
76
88
  _this.setState({
77
89
  calendarVisible: true
78
90
  });
@@ -89,13 +101,11 @@ function (_super) {
89
101
  };
90
102
 
91
103
  _this.onChangeDate = function () {
92
- if (!_this.props.allowTextInput || !_this.calendarRef.current || !_this.state.inputValue) {
104
+ if (!_this.props.allowTextInput) {
93
105
  return;
94
106
  }
95
107
 
96
- var date = _this.props.parseDateFromString(_this.state.inputValue, _this.props.name);
97
-
98
- _this.calendarRef.current.updateDate(date);
108
+ _this.updateDate();
99
109
  };
100
110
 
101
111
  _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
+ }
@@ -1,35 +1,35 @@
1
- $namespace: ab-ellipsis;
2
-
3
- $lines: (1) (2) (3) (4) (5);
4
- @mixin generateLines($type) {
5
- @each $val in $lines {
6
- &.#{$namespace}#{$type}#{$val} {
7
- -webkit-line-clamp: $val;
8
- }
9
- }
10
- }
11
-
12
- @mixin clearLines($type) {
13
- @each $val in $lines {
14
- &.#{$namespace}#{$type}#{$val} {
15
- -webkit-line-clamp: unset;
16
- }
17
- }
18
- }
19
-
20
- .#{$namespace} {
21
- overflow: hidden;
22
- display: block;
23
- display: -webkit-box;
24
- -webkit-box-orient: vertical;
25
-
26
- @include generateLines('-line');
27
- }
28
-
29
-
30
- @media only screen and (max-width: 767px) {
31
- .#{$namespace} {
32
- @include clearLines('-line');
33
- @include generateLines('-m-line');
34
- }
35
- }
1
+ $namespace: ab-ellipsis;
2
+
3
+ $lines: (1) (2) (3) (4) (5);
4
+ @mixin generateLines($type) {
5
+ @each $val in $lines {
6
+ &.#{$namespace}#{$type}#{$val} {
7
+ -webkit-line-clamp: $val;
8
+ }
9
+ }
10
+ }
11
+
12
+ @mixin clearLines($type) {
13
+ @each $val in $lines {
14
+ &.#{$namespace}#{$type}#{$val} {
15
+ -webkit-line-clamp: unset;
16
+ }
17
+ }
18
+ }
19
+
20
+ .#{$namespace} {
21
+ overflow: hidden;
22
+ display: block;
23
+ display: -webkit-box;
24
+ -webkit-box-orient: vertical;
25
+
26
+ @include generateLines('-line');
27
+ }
28
+
29
+
30
+ @media only screen and (max-width: 767px) {
31
+ .#{$namespace} {
32
+ @include clearLines('-line');
33
+ @include generateLines('-m-line');
34
+ }
35
+ }
@@ -1,14 +1,14 @@
1
- .guide-demo {
2
- .input {
3
- width: 3rem;
4
- }
5
-
6
- .btn {
7
- display: block;
8
- margin-top: .2rem;
9
- width: .8rem;
10
- height: .3rem;
11
- font-size: .16rem;
12
- text-align: center;
13
- }
1
+ .guide-demo {
2
+ .input {
3
+ width: 3rem;
4
+ }
5
+
6
+ .btn {
7
+ display: block;
8
+ margin-top: .2rem;
9
+ width: .8rem;
10
+ height: .3rem;
11
+ font-size: .16rem;
12
+ text-align: center;
13
+ }
14
14
  }
@@ -1,18 +1,18 @@
1
- $namespace: ab-guide;
2
-
3
- .#{$namespace} {
4
- &-mask.ab-mask {
5
- background-color: rgba(0, 0, 0, .7);
6
- z-index: 4;
7
- }
8
-
9
- &-icon {
10
- position: absolute;
11
- z-index: 5;
12
- }
13
-
14
- &-content {
15
- position: relative;
16
- z-index: 6;
17
- }
1
+ $namespace: ab-guide;
2
+
3
+ .#{$namespace} {
4
+ &-mask.ab-mask {
5
+ background-color: rgba(0, 0, 0, .7);
6
+ z-index: 4;
7
+ }
8
+
9
+ &-icon {
10
+ position: absolute;
11
+ z-index: 5;
12
+ }
13
+
14
+ &-content {
15
+ position: relative;
16
+ z-index: 6;
17
+ }
18
18
  }
@@ -1,40 +1,40 @@
1
- .demo-icon-list{
2
- padding: .2rem .1rem;
3
- font-size: .12rem;
4
- display: flex;
5
- width: 100%;
6
- flex-wrap: wrap;
7
-
8
- & > li {
9
- padding: .1rem;
10
- border: 1px solid #E0E0E0;
11
- margin: .05rem;
12
- display: flex;
13
- flex-direction: column;
14
- justify-content: center;
15
- align-items: center;
16
- background-color: #F3F4F6;
17
- min-width: 1.2rem;
18
- min-height: 1.5rem;
19
-
20
- svg {
21
- max-width: .5rem;
22
- height: .5rem;
23
- }
24
-
25
- p {
26
- padding: 0 5px;
27
- text-align: center;
28
- width: 1rem;
29
- word-break: break-all;
30
- }
31
-
32
- &:hover{
33
- background-color: #E5E7EB;
34
- }
35
- }
36
-
37
- .demo-icon-name{
38
- padding-top: .15rem;
39
- }
1
+ .demo-icon-list{
2
+ padding: .2rem .1rem;
3
+ font-size: .12rem;
4
+ display: flex;
5
+ width: 100%;
6
+ flex-wrap: wrap;
7
+
8
+ & > li {
9
+ padding: .1rem;
10
+ border: 1px solid #E0E0E0;
11
+ margin: .05rem;
12
+ display: flex;
13
+ flex-direction: column;
14
+ justify-content: center;
15
+ align-items: center;
16
+ background-color: #F3F4F6;
17
+ min-width: 1.2rem;
18
+ min-height: 1.5rem;
19
+
20
+ svg {
21
+ max-width: .5rem;
22
+ height: .5rem;
23
+ }
24
+
25
+ p {
26
+ padding: 0 5px;
27
+ text-align: center;
28
+ width: 1rem;
29
+ word-break: break-all;
30
+ }
31
+
32
+ &:hover{
33
+ background-color: #E5E7EB;
34
+ }
35
+ }
36
+
37
+ .demo-icon-name{
38
+ padding-top: .15rem;
39
+ }
40
40
  }
@@ -1,7 +1,7 @@
1
- $namespace: ab-icon;
2
-
3
- .#{$namespace}{
4
- &, span, div, svg{
5
- display: block;
6
- }
1
+ $namespace: ab-icon;
2
+
3
+ .#{$namespace}{
4
+ &, span, div, svg{
5
+ display: block;
6
+ }
7
7
  }
package/esm/index.d.ts CHANGED
@@ -43,7 +43,8 @@ export type { ScriptAttributes, ScriptProps } from './script';
43
43
  export { default as Script } from './script';
44
44
  export type { MessageProps } from './message';
45
45
  export { default as Message } from './message';
46
- export type { TableProps } from './table';
46
+ export type { TableProps, RowSelectionInfo as TableRowSelectionInfo } from './table';
47
+ export type { Column as TableColumnInfo, ColumnOnRenderReturnObjectInfo as TableColumnOnRenderReturnObjectInfo } from './table/interface';
47
48
  export { default as Table } from './table';
48
49
  export type { DatePickerProps } from './date-picker';
49
50
  export { default as DatePicker } from './date-picker';