@autobest-ui/components 1.2.1 → 1.5.0

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 (161) hide show
  1. package/esm/carousel/index.d.ts +13 -21
  2. package/esm/carousel/index.js +44 -77
  3. package/esm/carousel/style/index.css +1 -1
  4. package/esm/carousel/style/index.scss +1 -7
  5. package/esm/date-picker/calendar/grid/index.css +1 -1
  6. package/esm/date-picker/calendar/grid/index.js +17 -27
  7. package/esm/date-picker/calendar/grid/index.scss +4 -0
  8. package/esm/date-picker/calendar/index.d.ts +4 -0
  9. package/esm/date-picker/calendar/index.js +1 -1
  10. package/esm/date-picker/index.d.ts +17 -6
  11. package/esm/date-picker/index.js +62 -17
  12. package/esm/date-picker/style/index.css +1 -1
  13. package/esm/date-picker/style/index.js +0 -2
  14. package/esm/date-picker/style/index.scss +6 -1
  15. package/esm/guide/index.d.ts +4 -5
  16. package/esm/guide/index.js +4 -6
  17. package/esm/index.d.ts +3 -5
  18. package/esm/index.js +1 -3
  19. package/esm/input-number/index.d.ts +30 -17
  20. package/esm/input-number/index.js +116 -36
  21. package/esm/loading/index.d.ts +7 -2
  22. package/esm/loading/index.js +18 -24
  23. package/esm/loading/style/index.css +1 -1
  24. package/esm/loading/style/index.scss +0 -10
  25. package/esm/style.css +7 -23
  26. package/esm/table/body/BodyRow.d.ts +9 -3
  27. package/esm/table/body/BodyRow.js +6 -2
  28. package/esm/table/body/index.d.ts +2 -2
  29. package/esm/table/body/index.js +8 -7
  30. package/esm/table/header/HeaderCell.d.ts +2 -2
  31. package/esm/table/header/HeaderCell.js +15 -7
  32. package/esm/table/header/HeaderRow.d.ts +2 -2
  33. package/esm/table/index.d.ts +4 -4
  34. package/esm/table/index.js +3 -3
  35. package/esm/table/interface.d.ts +9 -3
  36. package/esm/table/style/index.css +1 -1
  37. package/esm/table/style/index.js +0 -2
  38. package/esm/table/style/index.scss +2 -0
  39. package/lib/carousel/index.d.ts +13 -21
  40. package/lib/carousel/index.js +45 -80
  41. package/lib/carousel/style/index.css +1 -1
  42. package/lib/carousel/style/index.scss +1 -7
  43. package/lib/date-picker/calendar/grid/index.css +1 -1
  44. package/lib/date-picker/calendar/grid/index.js +17 -28
  45. package/lib/date-picker/calendar/grid/index.scss +4 -0
  46. package/lib/date-picker/calendar/index.d.ts +4 -0
  47. package/lib/date-picker/calendar/index.js +1 -1
  48. package/lib/date-picker/index.d.ts +17 -6
  49. package/lib/date-picker/index.js +61 -17
  50. package/lib/date-picker/style/index.css +1 -1
  51. package/lib/date-picker/style/index.js +0 -2
  52. package/lib/date-picker/style/index.scss +6 -1
  53. package/lib/guide/index.d.ts +4 -5
  54. package/lib/guide/index.js +4 -7
  55. package/lib/index.d.ts +3 -5
  56. package/lib/index.js +2 -30
  57. package/lib/input-number/index.d.ts +30 -17
  58. package/lib/input-number/index.js +116 -36
  59. package/lib/loading/index.d.ts +7 -2
  60. package/lib/loading/index.js +18 -25
  61. package/lib/loading/style/index.css +1 -1
  62. package/lib/loading/style/index.scss +0 -10
  63. package/lib/style.css +7 -23
  64. package/lib/table/body/BodyRow.d.ts +9 -3
  65. package/lib/table/body/BodyRow.js +6 -2
  66. package/lib/table/body/index.d.ts +2 -2
  67. package/lib/table/body/index.js +8 -7
  68. package/lib/table/header/HeaderCell.d.ts +2 -2
  69. package/lib/table/header/HeaderCell.js +15 -8
  70. package/lib/table/header/HeaderRow.d.ts +2 -2
  71. package/lib/table/index.d.ts +4 -4
  72. package/lib/table/index.js +3 -3
  73. package/lib/table/interface.d.ts +9 -3
  74. package/lib/table/style/index.css +1 -1
  75. package/lib/table/style/index.js +0 -2
  76. package/lib/table/style/index.scss +2 -0
  77. package/package.json +2 -2
  78. package/esm/accordion/__stories__/style.css +0 -1
  79. package/esm/accordion/__stories__/style.scss +0 -59
  80. package/esm/affix/__stories__/style.css +0 -1
  81. package/esm/affix/__stories__/style.scss +0 -13
  82. package/esm/carousel/__stories__/style.css +0 -1
  83. package/esm/carousel/__stories__/style.scss +0 -41
  84. package/esm/collapse/__stories__/style.css +0 -1
  85. package/esm/collapse/__stories__/style.scss +0 -19
  86. package/esm/guide/__stories__/style.css +0 -1
  87. package/esm/guide/__stories__/style.scss +0 -14
  88. package/esm/icon/__stories__/iconNames.d.ts +0 -2
  89. package/esm/icon/__stories__/iconNames.js +0 -1
  90. package/esm/icon/__stories__/style.css +0 -1
  91. package/esm/icon/__stories__/style.scss +0 -40
  92. package/esm/icon/index.d.ts +0 -43
  93. package/esm/icon/index.js +0 -94
  94. package/esm/icon/style/index.css +0 -1
  95. package/esm/icon/style/index.d.ts +0 -1
  96. package/esm/icon/style/index.js +0 -5
  97. package/esm/icon/style/index.scss +0 -7
  98. package/esm/lazy-image/__stories__/style.css +0 -1
  99. package/esm/lazy-image/__stories__/style.scss +0 -9
  100. package/esm/loading-container/__stories__/style.css +0 -1
  101. package/esm/loading-container/__stories__/style.scss +0 -6
  102. package/esm/move/__stories__/style.css +0 -1
  103. package/esm/move/__stories__/style.scss +0 -6
  104. package/esm/popover/__stories__/style.css +0 -1
  105. package/esm/popover/__stories__/style.scss +0 -16
  106. package/esm/select/__stories__/style.css +0 -1
  107. package/esm/select/__stories__/style.scss +0 -8
  108. package/esm/skeleton/__stories__/style.css +0 -1
  109. package/esm/skeleton/__stories__/style.scss +0 -3
  110. package/esm/table/__stories__/style.css +0 -1
  111. package/esm/table/__stories__/style.scss +0 -34
  112. package/esm/tabs/__stories__/style.css +0 -1
  113. package/esm/tabs/__stories__/style.scss +0 -8
  114. package/esm/use-config/index.d.ts +0 -5
  115. package/esm/use-config/index.js +0 -13
  116. package/esm/use-config/style/index.css +0 -0
  117. package/esm/use-config/style/index.d.ts +0 -1
  118. package/esm/use-config/style/index.js +0 -1
  119. package/esm/use-config/style/index.scss +0 -0
  120. package/lib/accordion/__stories__/style.css +0 -1
  121. package/lib/accordion/__stories__/style.scss +0 -59
  122. package/lib/affix/__stories__/style.css +0 -1
  123. package/lib/affix/__stories__/style.scss +0 -13
  124. package/lib/carousel/__stories__/style.css +0 -1
  125. package/lib/carousel/__stories__/style.scss +0 -41
  126. package/lib/collapse/__stories__/style.css +0 -1
  127. package/lib/collapse/__stories__/style.scss +0 -19
  128. package/lib/guide/__stories__/style.css +0 -1
  129. package/lib/guide/__stories__/style.scss +0 -14
  130. package/lib/icon/__stories__/iconNames.d.ts +0 -2
  131. package/lib/icon/__stories__/iconNames.js +0 -8
  132. package/lib/icon/__stories__/style.css +0 -1
  133. package/lib/icon/__stories__/style.scss +0 -40
  134. package/lib/icon/index.d.ts +0 -43
  135. package/lib/icon/index.js +0 -111
  136. package/lib/icon/style/index.css +0 -1
  137. package/lib/icon/style/index.d.ts +0 -1
  138. package/lib/icon/style/index.js +0 -7
  139. package/lib/icon/style/index.scss +0 -7
  140. package/lib/lazy-image/__stories__/style.css +0 -1
  141. package/lib/lazy-image/__stories__/style.scss +0 -9
  142. package/lib/loading-container/__stories__/style.css +0 -1
  143. package/lib/loading-container/__stories__/style.scss +0 -6
  144. package/lib/move/__stories__/style.css +0 -1
  145. package/lib/move/__stories__/style.scss +0 -6
  146. package/lib/popover/__stories__/style.css +0 -1
  147. package/lib/popover/__stories__/style.scss +0 -16
  148. package/lib/select/__stories__/style.css +0 -1
  149. package/lib/select/__stories__/style.scss +0 -8
  150. package/lib/skeleton/__stories__/style.css +0 -1
  151. package/lib/skeleton/__stories__/style.scss +0 -3
  152. package/lib/table/__stories__/style.css +0 -1
  153. package/lib/table/__stories__/style.scss +0 -34
  154. package/lib/tabs/__stories__/style.css +0 -1
  155. package/lib/tabs/__stories__/style.scss +0 -8
  156. package/lib/use-config/index.d.ts +0 -5
  157. package/lib/use-config/index.js +0 -21
  158. package/lib/use-config/style/index.css +0 -0
  159. package/lib/use-config/style/index.d.ts +0 -1
  160. package/lib/use-config/style/index.js +0 -1
  161. package/lib/use-config/style/index.scss +0 -0
package/lib/icon/index.js DELETED
@@ -1,111 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- var _reactSvg = _interopRequireDefault(require("react-svg"));
15
-
16
- var _useConfig = _interopRequireDefault(require("../use-config"));
17
-
18
- var cls = 'ab-icon';
19
-
20
- var Icon = _react.default.forwardRef(function (props, ref) {
21
- var name = props.name,
22
- assetBaseUrl = props.assetBaseUrl,
23
- _a = props.wrapper,
24
- wrapper = _a === void 0 ? 'span' : _a,
25
- className = props.className,
26
- color = props.color,
27
- width = props.width,
28
- height = props.height,
29
- transform = props.transform,
30
- onClick = props.onClick,
31
- onMouseDown = props.onMouseDown,
32
- onTouchStart = props.onTouchStart,
33
- onTouchEnd = props.onTouchEnd,
34
- onMouseEnter = props.onMouseEnter,
35
- onMouseLeave = props.onMouseLeave;
36
- var baseUrl = assetBaseUrl || _useConfig.default.assetCommonUiUrl;
37
- var spanStyle = {};
38
-
39
- if (width) {
40
- spanStyle.width = width + "rem";
41
- spanStyle.minWidth = width + "rem";
42
- spanStyle.maxWidth = width + "rem";
43
- }
44
-
45
- if (height) {
46
- spanStyle.height = height + "rem";
47
- spanStyle.minHeight = height + "rem";
48
- spanStyle.maxHeight = height + "rem";
49
- } // transform 从 svgStyle 迁移到 spanStyle, 解决渲染时,重新创建后,动画不能执行的问题
50
-
51
-
52
- if (transform) {
53
- spanStyle.transform = transform;
54
- }
55
-
56
- var onIconClick = function onIconClick(ev) {
57
- // 阻止冒泡
58
- if (ev && onClick) {
59
- ev.stopPropagation();
60
- ev.preventDefault();
61
-
62
- if (ev.nativeEvent && ev.nativeEvent.stopImmediatePropagation) {
63
- ev.nativeEvent.stopImmediatePropagation();
64
- }
65
-
66
- onClick();
67
- }
68
- };
69
-
70
- var beforeInjection = function beforeInjection(svg) {
71
- // 设置svg样式
72
- var svgStyle = '';
73
-
74
- if (color) {
75
- svgStyle = "fill: " + color + "; color: " + color + ";";
76
- }
77
-
78
- if (width) {
79
- svgStyle += "width: " + width + "rem;";
80
- }
81
-
82
- if (height) {
83
- svgStyle += "height: " + height + "rem;";
84
- }
85
-
86
- if (svgStyle === '') {
87
- return;
88
- }
89
-
90
- svg.setAttribute('style', svgStyle);
91
- };
92
-
93
- return _react.default.createElement(_reactSvg.default, {
94
- ref: ref,
95
- style: spanStyle,
96
- beforeInjection: beforeInjection,
97
- src: baseUrl + "/svg/" + name + ".svg",
98
- wrapper: wrapper,
99
- className: (0, _classnames.default)(cls, className),
100
- onClick: onIconClick,
101
- onMouseDown: onMouseDown,
102
- onTouchStart: onTouchStart,
103
- onTouchEnd: onTouchEnd,
104
- onMouseEnter: onMouseEnter,
105
- onMouseLeave: onMouseLeave
106
- });
107
- });
108
-
109
- var _default = _react.default.memo(Icon);
110
-
111
- exports.default = _default;
@@ -1 +0,0 @@
1
- .ab-icon,.ab-icon div,.ab-icon span,.ab-icon svg{display:block}
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- var _utils = require("@autobest-ui/utils");
4
-
5
- if (_utils.canUseDOM) {
6
- require('./index.scss');
7
- }
@@ -1,7 +0,0 @@
1
- $namespace: ab-icon;
2
-
3
- .#{$namespace}{
4
- &, span, div, svg{
5
- display: block;
6
- }
7
- }
@@ -1 +0,0 @@
1
- .lazy-image-demo{margin-top:200vh}.lazy-image-demo img{display:block;width:400px;margin:.2rem}
@@ -1,9 +0,0 @@
1
- .lazy-image-demo {
2
- margin-top: 200vh;
3
-
4
- img {
5
- display: block;
6
- width: 400px;
7
- margin: .2rem;
8
- }
9
- }
@@ -1 +0,0 @@
1
- .loading-container-demo{margin:1rem;width:2rem;height:2rem;background:#b0b0b0}
@@ -1,6 +0,0 @@
1
- .loading-container-demo {
2
- margin: 1rem;
3
- width: 2rem;
4
- height: 2rem;
5
- background: #b0b0b0;
6
- }
@@ -1 +0,0 @@
1
- .demo-move{margin:.2rem auto;width:500px;height:500px;border:5px solid #ccc}
@@ -1,6 +0,0 @@
1
- .demo-move{
2
- margin: 0.2rem auto;
3
- width: 500px;
4
- height: 500px;
5
- border: 5px solid #ccc;
6
- }
@@ -1 +0,0 @@
1
- .popover-demo{padding:80px 60px;width:465px;height:400px;margin:auto;position:relative}.popover-demo button{width:100px;display:inline-block}.popover-demo-tip{height:60px;width:100px}
@@ -1,16 +0,0 @@
1
- .popover-demo{
2
- padding: 80px 60px;
3
- width: 465px;
4
- height: 400px;
5
- margin: auto;
6
- position: relative;
7
-
8
- button {
9
- width: 100px;
10
- display: inline-block;
11
- }
12
- }
13
- .popover-demo-tip {
14
- height: 60px;
15
- width: 100px;
16
- }
@@ -1 +0,0 @@
1
- .select-demo{margin:10px auto;width:200px}.select-demo .select-group{width:1rem}
@@ -1,8 +0,0 @@
1
- .select-demo{
2
- margin: 10px auto;
3
- width: 200px;
4
-
5
- .select-group {
6
- width: 1rem;
7
- }
8
- }
@@ -1 +0,0 @@
1
- .skeleton-demo{padding:.2rem}
@@ -1,3 +0,0 @@
1
- .skeleton-demo {
2
- padding: .2rem;
3
- }
@@ -1 +0,0 @@
1
- .table-demo thead{background-color:#2b5797;color:#fff}.table-demo tbody tr.ab-table-expand-row{background-color:#fafafa}.table-demo tbody tr:hover{background-color:#f3f3f3}.table-demo td,.table-demo th{padding:.16rem;border-bottom:1px solid #d0d0d0}.table-demo td.ab-table-checkbox,.table-demo th.ab-table-checkbox{padding:.16rem 0}.table-demo .merged-cell{border-left:1px solid #d0d0d0;border-right:1px solid #d0d0d0}.table-demo-expanded{font-size:.2rem}
@@ -1,34 +0,0 @@
1
- .table-demo {
2
- thead {
3
- background-color: #2b5797;
4
- color: #fff;
5
- }
6
-
7
- tbody tr {
8
- &.ab-table-expand-row {
9
- background-color: #fafafa;
10
- }
11
-
12
- &:hover {
13
- background-color: #f3f3f3;
14
- }
15
- }
16
-
17
- th, td {
18
- padding: .16rem;
19
- border-bottom: 1px solid #D0D0D0;
20
-
21
- &.ab-table-checkbox {
22
- padding: .16rem 0;
23
- }
24
- }
25
-
26
- .merged-cell {
27
- border-left: 1px solid #D0D0D0;
28
- border-right: 1px solid #D0D0D0;
29
- }
30
- }
31
-
32
- .table-demo-expanded {
33
- font-size: .2rem;
34
- }
@@ -1 +0,0 @@
1
- .tabs-demo{width:500px;margin:20px auto}.tabs-demo .ab-tabs-item{padding:2px 6px}
@@ -1,8 +0,0 @@
1
- .tabs-demo {
2
- width: 500px;
3
- margin: 20px auto;
4
-
5
- .ab-tabs-item {
6
- padding: 2px 6px;
7
- }
8
- }
@@ -1,5 +0,0 @@
1
- export default class UseConfig {
2
- static assetCommonUiUrl: string;
3
- static assetWWWUrl: any;
4
- static assetSupportWebP: any;
5
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var UseConfig =
9
- /** @class */
10
- function () {
11
- function UseConfig() {} // 配置静态资源链接库, 默认指向测试环境
12
-
13
-
14
- UseConfig.assetCommonUiUrl = 'https://assets-web.dev.autobestdevops.com/common-uiasset';
15
- UseConfig.assetWWWUrl = null;
16
- UseConfig.assetSupportWebP = null;
17
- return UseConfig;
18
- }();
19
-
20
- var _default = UseConfig;
21
- exports.default = _default;
File without changes
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- "use strict";
File without changes