@autobest-ui/components 1.1.2 → 1.1.9

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 (126) 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/index.d.ts +30 -17
  26. package/esm/input-number/index.js +116 -36
  27. package/esm/input-number/style/index.scss +86 -86
  28. package/esm/lazy-image/__stories__/style.scss +9 -9
  29. package/esm/lazy-image/style/index.scss +24 -24
  30. package/esm/link-list/style/index.scss +125 -125
  31. package/esm/loading/style/index.scss +30 -30
  32. package/esm/loading-bar/style/index.scss +62 -62
  33. package/esm/loading-container/__stories__/style.scss +5 -5
  34. package/esm/loading-container/style/index.scss +27 -27
  35. package/esm/loading-icon/style/index.scss +23 -23
  36. package/esm/mask/style/index.scss +34 -34
  37. package/esm/message/style/index.scss +70 -70
  38. package/esm/modal/style/index.scss +112 -112
  39. package/esm/move/__stories__/style.scss +6 -6
  40. package/esm/move/style/index.scss +7 -7
  41. package/esm/popover/__stories__/style.scss +15 -15
  42. package/esm/popover/style/index.scss +59 -59
  43. package/esm/select/__stories__/style.scss +8 -8
  44. package/esm/select/style/index.scss +126 -126
  45. package/esm/show-more/style/index.scss +22 -22
  46. package/esm/skeleton/__stories__/style.scss +2 -2
  47. package/esm/skeleton/style/index.scss +26 -26
  48. package/esm/style.css +16 -16
  49. package/esm/table/__stories__/style.scss +33 -33
  50. package/esm/table/body/BodyRow.d.ts +9 -3
  51. package/esm/table/body/BodyRow.js +6 -2
  52. package/esm/table/body/index.d.ts +2 -2
  53. package/esm/table/body/index.js +8 -7
  54. package/esm/table/header/HeaderCell.d.ts +2 -2
  55. package/esm/table/header/HeaderRow.d.ts +2 -2
  56. package/esm/table/index.d.ts +4 -4
  57. package/esm/table/index.js +3 -3
  58. package/esm/table/interface.d.ts +9 -3
  59. package/esm/table/style/index.scss +51 -51
  60. package/esm/tabs/__stories__/style.scss +8 -8
  61. package/esm/tabs/style/index.scss +62 -62
  62. package/esm/tooltip/style/index.scss +61 -61
  63. package/esm/trigger/style/index.scss +79 -79
  64. package/lib/accordion/__stories__/style.scss +58 -58
  65. package/lib/affix/__stories__/style.scss +13 -13
  66. package/lib/affix/style/index.scss +34 -34
  67. package/lib/base.scss +42 -42
  68. package/lib/carousel/__stories__/style.scss +41 -41
  69. package/lib/carousel/style/index.scss +37 -37
  70. package/lib/checkbox/style/index.scss +117 -117
  71. package/lib/collapse/__stories__/style.scss +18 -18
  72. package/lib/collapse/style/index.scss +42 -42
  73. package/lib/confirm/style/index.scss +44 -44
  74. package/lib/date-picker/calendar/grid/index.scss +85 -85
  75. package/lib/date-picker/calendar/index.scss +57 -57
  76. package/lib/date-picker/index.d.ts +1 -0
  77. package/lib/date-picker/index.js +17 -7
  78. package/lib/date-picker/style/index.css +1 -1
  79. package/lib/date-picker/style/index.scss +23 -19
  80. package/lib/drawer/style/index.scss +44 -44
  81. package/lib/ellipsis/style/index.scss +35 -35
  82. package/lib/guide/__stories__/style.scss +13 -13
  83. package/lib/guide/style/index.scss +17 -17
  84. package/lib/icon/__stories__/style.scss +39 -39
  85. package/lib/icon/style/index.scss +6 -6
  86. package/lib/index.d.ts +2 -1
  87. package/lib/input-number/index.d.ts +30 -17
  88. package/lib/input-number/index.js +116 -36
  89. package/lib/input-number/style/index.scss +86 -86
  90. package/lib/lazy-image/__stories__/style.scss +9 -9
  91. package/lib/lazy-image/style/index.scss +24 -24
  92. package/lib/link-list/style/index.scss +125 -125
  93. package/lib/loading/style/index.scss +30 -30
  94. package/lib/loading-bar/style/index.scss +62 -62
  95. package/lib/loading-container/__stories__/style.scss +5 -5
  96. package/lib/loading-container/style/index.scss +27 -27
  97. package/lib/loading-icon/style/index.scss +23 -23
  98. package/lib/mask/style/index.scss +34 -34
  99. package/lib/message/style/index.scss +70 -70
  100. package/lib/modal/style/index.scss +112 -112
  101. package/lib/move/__stories__/style.scss +6 -6
  102. package/lib/move/style/index.scss +7 -7
  103. package/lib/popover/__stories__/style.scss +15 -15
  104. package/lib/popover/style/index.scss +59 -59
  105. package/lib/select/__stories__/style.scss +8 -8
  106. package/lib/select/style/index.scss +126 -126
  107. package/lib/show-more/style/index.scss +22 -22
  108. package/lib/skeleton/__stories__/style.scss +2 -2
  109. package/lib/skeleton/style/index.scss +26 -26
  110. package/lib/style.css +16 -16
  111. package/lib/table/__stories__/style.scss +33 -33
  112. package/lib/table/body/BodyRow.d.ts +9 -3
  113. package/lib/table/body/BodyRow.js +6 -2
  114. package/lib/table/body/index.d.ts +2 -2
  115. package/lib/table/body/index.js +8 -7
  116. package/lib/table/header/HeaderCell.d.ts +2 -2
  117. package/lib/table/header/HeaderRow.d.ts +2 -2
  118. package/lib/table/index.d.ts +4 -4
  119. package/lib/table/index.js +3 -3
  120. package/lib/table/interface.d.ts +9 -3
  121. package/lib/table/style/index.scss +51 -51
  122. package/lib/tabs/__stories__/style.scss +8 -8
  123. package/lib/tabs/style/index.scss +62 -62
  124. package/lib/tooltip/style/index.scss +61 -61
  125. package/lib/trigger/style/index.scss +79 -79
  126. package/package.json +2 -2
@@ -1,34 +1,34 @@
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;
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
34
  }
@@ -1,13 +1,19 @@
1
1
  import React from 'react';
2
- import { Column } from '../interface';
2
+ import { TableColumnInfo } from '../interface';
3
3
  export interface BodyRowProps<T> {
4
4
  className?: string;
5
5
  prefixCls: string;
6
6
  rowData: T;
7
7
  index: number;
8
- columns: Column<T>[];
8
+ columns: TableColumnInfo<T>[];
9
9
  indent: number;
10
10
  CheckCell: React.ReactElement;
11
+ isExpand?: boolean;
12
+ }
13
+ declare function BodyRow<RowDataType>({ className, prefixCls: cls, rowData, index, columns, indent, CheckCell, isExpand }: BodyRowProps<RowDataType>): JSX.Element;
14
+ declare namespace BodyRow {
15
+ var defaultProps: {
16
+ isExpand: boolean;
17
+ };
11
18
  }
12
- declare function BodyRow<RowDataType>({ className, prefixCls: cls, rowData, index, columns, indent, CheckCell }: BodyRowProps<RowDataType>): JSX.Element;
13
19
  export default BodyRow;
@@ -51,7 +51,8 @@ function BodyRow(_a) {
51
51
  index = _a.index,
52
52
  columns = _a.columns,
53
53
  indent = _a.indent,
54
- CheckCell = _a.CheckCell;
54
+ CheckCell = _a.CheckCell,
55
+ isExpand = _a.isExpand;
55
56
 
56
57
  var indentCell = _react.default.useMemo(function () {
57
58
  return getIndentCol(cls, indent);
@@ -83,7 +84,7 @@ function BodyRow(_a) {
83
84
  rowSpan: rowSpan === undefined ? 1 : rowSpan
84
85
  });
85
86
 
86
- if (cellInfo.colSpan === 0 || cellInfo.rowSpan === 0 || !cellInfo.content) {
87
+ if (cellInfo.colSpan === 0 || cellInfo.rowSpan === 0 || isExpand && !cellInfo.content) {
87
88
  return;
88
89
  }
89
90
 
@@ -104,5 +105,8 @@ function BodyRow(_a) {
104
105
  return null;
105
106
  }
106
107
 
108
+ BodyRow.defaultProps = {
109
+ isExpand: false
110
+ };
107
111
  var _default = BodyRow;
108
112
  exports.default = _default;
@@ -1,12 +1,12 @@
1
1
  import React, { ReactText } from 'react';
2
2
  import { BodyRowProps } from './BodyRow';
3
3
  import { BodyCheckIconProps, BodyRowSelectionInfo } from './CheckIcon';
4
- import { ColumnOnRenderReturnObjectInfo } from '../interface';
4
+ import { TableColumnOnRenderReturnObjectInfo } from '../interface';
5
5
  /**
6
6
  * 可展开子列表
7
7
  */
8
8
  export interface TableExpandableInfo<T> {
9
- expandedRowRender: (rowData: T, index: number) => React.ReactNode | React.ReactNode[] | ColumnOnRenderReturnObjectInfo;
9
+ expandedRowRender: (rowData: T, index: number) => React.ReactNode | React.ReactNode[] | TableColumnOnRenderReturnObjectInfo;
10
10
  }
11
11
  export interface BodyProps<T> extends Pick<BodyRowProps<T>, 'prefixCls' | 'columns'>, Pick<BodyCheckIconProps<T>, 'selectedRowKeys'> {
12
12
  /**
@@ -46,14 +46,14 @@ function Body(_a) {
46
46
  CheckCell: CheckCell,
47
47
  indent: 0
48
48
  }));
49
- var expandedRowKey = rowKey + " expanded";
50
- var expandedColumns = [{
51
- title: null,
52
- key: expandedRowKey,
53
- onRender: expandedRowRenderer
54
- }];
55
49
 
56
50
  if (expandable) {
51
+ var expandedRowKey = rowKey + " expanded";
52
+ var expandedColumns = [{
53
+ title: null,
54
+ key: expandedRowKey,
55
+ onRender: expandedRowRenderer
56
+ }];
57
57
  rows.push(_react.default.createElement(_BodyRow.default, {
58
58
  key: expandedRowKey,
59
59
  className: prefixCls + "-expand-row",
@@ -62,7 +62,8 @@ function Body(_a) {
62
62
  index: rowIndex,
63
63
  columns: expandedColumns,
64
64
  CheckCell: null,
65
- indent: CheckCell ? 1 : 0
65
+ indent: CheckCell ? 1 : 0,
66
+ isExpand: true
66
67
  }));
67
68
  }
68
69
  });
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { Column } from '../interface';
3
- export interface HeaderCellProps<T> extends Column<T> {
2
+ import { TableColumnInfo } from '../interface';
3
+ export interface HeaderCellProps<T> extends TableColumnInfo<T> {
4
4
  prefixCls: string;
5
5
  isSort: boolean;
6
6
  isSortedDescending?: boolean;
@@ -1,9 +1,9 @@
1
- import { Column } from '../interface';
1
+ import { TableColumnInfo } from '../interface';
2
2
  import { HeaderCellProps } from './HeaderCell';
3
3
  import { HeaderRowSelectionInfo } from './CheckIcon';
4
4
  export interface HeaderRowProps<T> extends Pick<HeaderCellProps<T>, 'sortName' | 'isSortedDescending' | 'sortIcon'> {
5
5
  prefixCls: string;
6
- columns: Column<T>[];
6
+ columns: TableColumnInfo<T>[];
7
7
  /**
8
8
  * 点击表头触发的排序函数
9
9
  * @param isSortedDescending
@@ -1,11 +1,11 @@
1
1
  import React, { ReactText } from 'react';
2
2
  import { AddListenerEventHandler } from '@autobest-ui/utils';
3
- import { Column } from './interface';
3
+ import { TableColumnInfo } from './interface';
4
4
  import { HeaderRowProps } from './header/HeaderRow';
5
5
  import { BodyProps } from './body';
6
6
  import { HeaderRowSelectionInfo } from './header/CheckIcon';
7
7
  import { BodyRowSelectionInfo } from './body/CheckIcon';
8
- export interface RowSelectionInfo<T> extends Partial<Pick<HeaderRowSelectionInfo, 'selectAllVisible' | 'onSelectAll'>>, Partial<Pick<BodyRowSelectionInfo<T>, 'checkIcon'>> {
8
+ export interface TableRowSelectionInfo<T> extends Partial<Pick<HeaderRowSelectionInfo, 'selectAllVisible' | 'onSelectAll'>>, Partial<Pick<BodyRowSelectionInfo<T>, 'checkIcon'>> {
9
9
  defaultSelectedRowKeys?: ReactText[];
10
10
  getDisabled?: (dataRow: any, selectedRowKeys: ReactText[], selectedRows: T[]) => boolean;
11
11
  onSelect?: (checked: boolean, rowData: T, selectedRows: T[]) => void;
@@ -21,7 +21,7 @@ export interface TableProps<T> extends Pick<HeaderRowProps<T>, 'sortName' | 'sor
21
21
  * 定义每一列数据的格式
22
22
  * 具体类型见Column
23
23
  */
24
- columns: Column<T>[];
24
+ columns: TableColumnInfo<T>[];
25
25
  /**
26
26
  * 获取单条记录的唯一主键; 若是string类型,则取当前行数据中对应名称的属性值; 若是函数,则传入当前行数据,获取rowKey值;这也是勾选功能匹配时所用的key值
27
27
  */
@@ -41,7 +41,7 @@ export interface TableProps<T> extends Pick<HeaderRowProps<T>, 'sortName' | 'sor
41
41
  /**
42
42
  * 表格行是否可勾选,详见RowSelection
43
43
  */
44
- rowSelection?: RowSelectionInfo<T>;
44
+ rowSelection?: TableRowSelectionInfo<T>;
45
45
  /**
46
46
  * 默认勾选项数组, 以primaryKey取值
47
47
  */
@@ -88,9 +88,9 @@ function (_super) {
88
88
  return {
89
89
  selectedRowKeys: [],
90
90
  selectedRows: [],
91
- rowSelection: __assign(__assign({}, prevState.rowSelection), {
91
+ rowSelection: prevState.rowSelection ? __assign(__assign({}, prevState.rowSelection), {
92
92
  selectAllChecked: false
93
- })
93
+ }) : null
94
94
  };
95
95
  });
96
96
  };
@@ -257,7 +257,7 @@ function (_super) {
257
257
  };
258
258
 
259
259
  _this.getRowSelection = function () {
260
- if (!('rowSelection' in _this.props)) {
260
+ if (!('rowSelection' in _this.props) || !_this.props.rowSelection) {
261
261
  return null;
262
262
  }
263
263
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface ColumnOnRenderReturnObjectInfo {
2
+ export interface TableColumnOnRenderReturnObjectInfo {
3
3
  children: React.ReactNode | React.ReactNode[];
4
4
  props: {
5
5
  className?: string;
@@ -7,7 +7,7 @@ export interface ColumnOnRenderReturnObjectInfo {
7
7
  colSpan?: number;
8
8
  };
9
9
  }
10
- export interface Column<T> {
10
+ export interface TableColumnInfo<T> {
11
11
  title: React.ReactNode | React.ReactNode[];
12
12
  key: string;
13
13
  dataIndex?: string;
@@ -18,5 +18,11 @@ export interface Column<T> {
18
18
  width?: string | number;
19
19
  className?: string;
20
20
  colSpan?: number;
21
- onRender?: (rowData: T, rowIndex: number, colIndex: number) => React.ReactNode | React.ReactNode[] | ColumnOnRenderReturnObjectInfo;
21
+ /**
22
+ * 渲染单元格内容的方法,不传则默认用dataIndex去取当前行对应属性值;入参分别为当前行数据,行索引, 列索引
23
+ * @param rowData
24
+ * @param rowIndex
25
+ * @param colIndex
26
+ */
27
+ onRender?: (rowData: T, rowIndex: number, colIndex: number) => React.ReactNode | React.ReactNode[] | TableColumnOnRenderReturnObjectInfo;
22
28
  }
@@ -1,52 +1,52 @@
1
- $namespace: ab-table;
2
-
3
- .#{$namespace} {
4
- overflow-x: auto;
5
-
6
- table {
7
- border-spacing: 0;
8
- width: 100%;
9
- table-layout: fixed;
10
- }
11
-
12
- &-header {
13
- overflow: hidden;
14
-
15
- table {
16
- width: calc(100% - .17rem);
17
- }
18
- }
19
-
20
- &-body {
21
- overflow: auto scroll;
22
- }
23
-
24
- &-checkbox {
25
- width: .32rem;
26
- text-align: center;
27
- }
28
-
29
- &-title {
30
- display: flex;
31
- align-items: center;
32
- text-align: left;
33
-
34
- &.#{$namespace}-point {
35
- cursor: pointer;
36
- }
37
- }
38
-
39
- &-arrow {
40
- padding: 0 .05rem;
41
- }
42
- }
43
-
44
- @media only screen and (max-width: 767px) {
45
- .#{$namespace} {
46
- &-header {
47
- table {
48
- width: 100%;
49
- }
50
- }
51
- }
1
+ $namespace: ab-table;
2
+
3
+ .#{$namespace} {
4
+ overflow-x: auto;
5
+
6
+ table {
7
+ border-spacing: 0;
8
+ width: 100%;
9
+ table-layout: fixed;
10
+ }
11
+
12
+ &-header {
13
+ overflow: hidden;
14
+
15
+ table {
16
+ width: calc(100% - .17rem);
17
+ }
18
+ }
19
+
20
+ &-body {
21
+ overflow: auto scroll;
22
+ }
23
+
24
+ &-checkbox {
25
+ width: .32rem;
26
+ text-align: center;
27
+ }
28
+
29
+ &-title {
30
+ display: flex;
31
+ align-items: center;
32
+ text-align: left;
33
+
34
+ &.#{$namespace}-point {
35
+ cursor: pointer;
36
+ }
37
+ }
38
+
39
+ &-arrow {
40
+ padding: 0 .05rem;
41
+ }
42
+ }
43
+
44
+ @media only screen and (max-width: 767px) {
45
+ .#{$namespace} {
46
+ &-header {
47
+ table {
48
+ width: 100%;
49
+ }
50
+ }
51
+ }
52
52
  }
@@ -1,8 +1,8 @@
1
- .tabs-demo {
2
- width: 500px;
3
- margin: 20px auto;
4
-
5
- .ab-tabs-item {
6
- padding: 2px 6px;
7
- }
8
- }
1
+ .tabs-demo {
2
+ width: 500px;
3
+ margin: 20px auto;
4
+
5
+ .ab-tabs-item {
6
+ padding: 2px 6px;
7
+ }
8
+ }
@@ -1,62 +1,62 @@
1
- $namespace: ab-tabs;
2
-
3
- .#{$namespace} {
4
- position: relative;
5
- display: flex;
6
-
7
- &-item {
8
- cursor: pointer;
9
-
10
- &.#{$namespace}-active {
11
- font-weight: bold;
12
- }
13
-
14
- &.#{$namespace}-disabled {
15
- cursor: not-allowed;
16
- opacity: 0.7;
17
- }
18
- }
19
-
20
- &-bar {
21
- position: absolute;
22
- background-color: #b22222;
23
- transition: all .25s;
24
- width: 0;
25
- height: 0;
26
- overflow: hidden;
27
- margin: 0;
28
- padding: 0;
29
- }
30
-
31
- &-top, &-bottom {
32
- flex-direction: row;
33
-
34
- > .#{$namespace}-bar {
35
- left: 0;
36
- }
37
- }
38
-
39
- &-left, &-right {
40
- flex-direction: column;
41
-
42
- > .#{$namespace}-bar {
43
- top: 0;
44
- }
45
- }
46
-
47
- &-top > &-bar {
48
- bottom: 0;
49
- }
50
-
51
- &-bottom > &-bar {
52
- top: 0;
53
- }
54
-
55
- &-left > &-bar {
56
- right: 0;
57
- }
58
-
59
- &-right > &-bar {
60
- left: 0;
61
- }
62
- }
1
+ $namespace: ab-tabs;
2
+
3
+ .#{$namespace} {
4
+ position: relative;
5
+ display: flex;
6
+
7
+ &-item {
8
+ cursor: pointer;
9
+
10
+ &.#{$namespace}-active {
11
+ font-weight: bold;
12
+ }
13
+
14
+ &.#{$namespace}-disabled {
15
+ cursor: not-allowed;
16
+ opacity: 0.7;
17
+ }
18
+ }
19
+
20
+ &-bar {
21
+ position: absolute;
22
+ background-color: #b22222;
23
+ transition: all .25s;
24
+ width: 0;
25
+ height: 0;
26
+ overflow: hidden;
27
+ margin: 0;
28
+ padding: 0;
29
+ }
30
+
31
+ &-top, &-bottom {
32
+ flex-direction: row;
33
+
34
+ > .#{$namespace}-bar {
35
+ left: 0;
36
+ }
37
+ }
38
+
39
+ &-left, &-right {
40
+ flex-direction: column;
41
+
42
+ > .#{$namespace}-bar {
43
+ top: 0;
44
+ }
45
+ }
46
+
47
+ &-top > &-bar {
48
+ bottom: 0;
49
+ }
50
+
51
+ &-bottom > &-bar {
52
+ top: 0;
53
+ }
54
+
55
+ &-left > &-bar {
56
+ right: 0;
57
+ }
58
+
59
+ &-right > &-bar {
60
+ left: 0;
61
+ }
62
+ }
@@ -1,62 +1,62 @@
1
- $namespace: ab-tooltip;
2
-
3
- .#{$namespace} {
4
- &-wrap {
5
- background-clip: padding-box;
6
- padding: .08rem .11rem .05rem;
7
- min-width: 210px;
8
- border-radius: 4px;
9
- line-height: 1.4;
10
- border: 1px solid #906C00;
11
- box-shadow: 1px 1px 5px -1px #000;
12
- background-color: #FFFAEC;
13
- }
14
-
15
- &-inner {
16
- position: relative;
17
- width: 100%;
18
- overflow: hidden;
19
- font-size: .12rem;
20
-
21
- &-expand {
22
- padding-right: .1rem;
23
- }
24
- }
25
-
26
- &-arrow {
27
- position: absolute;
28
- display: block;
29
- width: 8px;
30
- height: 8px;
31
- border-top-color: transparent;
32
- border-left-color: transparent;
33
- border-style: solid;
34
- box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
35
- background-color: #FFFAEC;
36
- border-right-color: #906C00;
37
- border-bottom-color: #906C00;
38
- border-width: 1px;
39
- }
40
-
41
- &-close {
42
- position: absolute;
43
- right: .02rem;
44
- top: .05rem;
45
- cursor: pointer;
46
- padding: 0 .05rem;
47
- color: #bfbfbf;
48
- font-size: 0.2rem;
49
- line-height: 1;
50
- z-index: 2;
51
-
52
- &:hover {
53
- color: #4A4A4A;
54
- }
55
- }
56
- }
57
-
58
- @media only screen and (max-width: 767px) {
59
- .#{$namespace}-wrap {
60
- width: calc(100% - .3rem);
61
- }
1
+ $namespace: ab-tooltip;
2
+
3
+ .#{$namespace} {
4
+ &-wrap {
5
+ background-clip: padding-box;
6
+ padding: .08rem .11rem .05rem;
7
+ min-width: 210px;
8
+ border-radius: 4px;
9
+ line-height: 1.4;
10
+ border: 1px solid #906C00;
11
+ box-shadow: 1px 1px 5px -1px #000;
12
+ background-color: #FFFAEC;
13
+ }
14
+
15
+ &-inner {
16
+ position: relative;
17
+ width: 100%;
18
+ overflow: hidden;
19
+ font-size: .12rem;
20
+
21
+ &-expand {
22
+ padding-right: .1rem;
23
+ }
24
+ }
25
+
26
+ &-arrow {
27
+ position: absolute;
28
+ display: block;
29
+ width: 8px;
30
+ height: 8px;
31
+ border-top-color: transparent;
32
+ border-left-color: transparent;
33
+ border-style: solid;
34
+ box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
35
+ background-color: #FFFAEC;
36
+ border-right-color: #906C00;
37
+ border-bottom-color: #906C00;
38
+ border-width: 1px;
39
+ }
40
+
41
+ &-close {
42
+ position: absolute;
43
+ right: .02rem;
44
+ top: .05rem;
45
+ cursor: pointer;
46
+ padding: 0 .05rem;
47
+ color: #bfbfbf;
48
+ font-size: 0.2rem;
49
+ line-height: 1;
50
+ z-index: 2;
51
+
52
+ &:hover {
53
+ color: #4A4A4A;
54
+ }
55
+ }
56
+ }
57
+
58
+ @media only screen and (max-width: 767px) {
59
+ .#{$namespace}-wrap {
60
+ width: calc(100% - .3rem);
61
+ }
62
62
  }