@mezzanine-ui/core 0.7.3 → 0.9.2
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.
- package/button/_button-styles.scss +0 -1
- package/icon/_icon-styles.scss +1 -0
- package/input/_input-styles.scss +26 -0
- package/input/input.d.ts +2 -0
- package/input/input.js +2 -0
- package/message/message.js +2 -2
- package/package.json +2 -2
- package/page-footer/_page-footer-styles.scss +0 -1
- package/table/_table-styles.scss +12 -0
- package/table/index.js +1 -1
- package/table/table.d.ts +14 -2
- package/table/table.js +31 -2
|
@@ -181,7 +181,6 @@ $outlined-border-width: 1px !default;
|
|
|
181
181
|
justify-content: center;
|
|
182
182
|
align-items: center;
|
|
183
183
|
text-decoration: none;
|
|
184
|
-
text-transform: uppercase;
|
|
185
184
|
transition: transition.standard(background-color), transition.standard(border), transition.standard(color);
|
|
186
185
|
will-change: background-color, border-color, color;
|
|
187
186
|
|
package/icon/_icon-styles.scss
CHANGED
package/input/_input-styles.scss
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../text-field';
|
|
3
|
+
@use '../select';
|
|
3
4
|
@use './input' as *;
|
|
4
5
|
|
|
5
6
|
.#{$prefix} {
|
|
7
|
+
&__tags-mode {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
|
|
11
|
+
.#{select.$prefix}-trigger__tags {
|
|
12
|
+
width: unset;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
input {
|
|
16
|
+
width: unset;
|
|
17
|
+
flex: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__input-on-top {
|
|
21
|
+
flex-direction: column-reverse;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
.#{text-field.$prefix}__clear-icon {
|
|
26
|
+
opacity: 1;
|
|
27
|
+
pointer-events: auto;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
6
32
|
input {
|
|
7
33
|
padding-left: var(--#{text-field.$prefix}-padding-left);
|
|
8
34
|
padding-right: var(--#{text-field.$prefix}-padding-right);
|
package/input/input.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ export declare type InputSize = Size;
|
|
|
3
3
|
export declare const inputPrefix = "mzn-input";
|
|
4
4
|
export declare const inputClasses: {
|
|
5
5
|
readonly host: "mzn-input";
|
|
6
|
+
readonly tagsMode: "mzn-input__tags-mode";
|
|
7
|
+
readonly tagsModeInputOnTop: "mzn-input__tags-mode__input-on-top";
|
|
6
8
|
};
|
package/input/input.js
CHANGED
package/message/message.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CheckCircleFilledIcon, ExclamationCircleFilledIcon,
|
|
1
|
+
import { CheckCircleFilledIcon, ExclamationCircleFilledIcon, TimesCircleFilledIcon, InfoCircleFilledIcon } from '@mezzanine-ui/icons';
|
|
2
2
|
|
|
3
3
|
const messagePrefix = 'mzn-message';
|
|
4
4
|
const messageIcons = {
|
|
5
5
|
success: CheckCircleFilledIcon,
|
|
6
6
|
warning: ExclamationCircleFilledIcon,
|
|
7
|
-
error:
|
|
7
|
+
error: TimesCircleFilledIcon,
|
|
8
8
|
info: InfoCircleFilledIcon,
|
|
9
9
|
};
|
|
10
10
|
const messageClasses = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mezzanine-ui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Core for mezzanine-ui",
|
|
5
5
|
"author": "Mezzanine",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"build:clean": "node ../../scripts/cleanBuild.js"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@mezzanine-ui/icons": "^0.
|
|
26
|
+
"@mezzanine-ui/icons": "^0.9.2",
|
|
27
27
|
"@mezzanine-ui/system": "^0.7.0",
|
|
28
28
|
"tslib": "^2.1.0"
|
|
29
29
|
}
|
package/table/_table-styles.scss
CHANGED
|
@@ -103,6 +103,18 @@ $table-refresh-vertical-padding: 8px !default;
|
|
|
103
103
|
&__cellWrapper {
|
|
104
104
|
@include flexible;
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
&__expandedTableWrapper {
|
|
108
|
+
padding: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&__expandedTableRow {
|
|
112
|
+
background-color: palette.color(divider);
|
|
113
|
+
|
|
114
|
+
&:last-child {
|
|
115
|
+
border-bottom: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
106
118
|
}
|
|
107
119
|
|
|
108
120
|
&__empty {
|
package/table/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { tableBodyPrefix, tableCellPrefix, tableClasses, tableHeaderPrefix, tablePrefix } from './table.js';
|
|
1
|
+
export { getCellStyle, getColumnStyle, tableBodyPrefix, tableCellPrefix, tableClasses, tableHeaderPrefix, tablePrefix } from './table.js';
|
package/table/table.d.ts
CHANGED
|
@@ -12,6 +12,9 @@ export declare const tableClasses: {
|
|
|
12
12
|
readonly bodyRow: `${string}__row`;
|
|
13
13
|
readonly bodyRowHighlight: `${string}__row--highlight`;
|
|
14
14
|
readonly bodyRowCellWrapper: `${string}__row__cellWrapper`;
|
|
15
|
+
readonly bodyRowExpandedTableWrapper: `${string}__row__expandedTableWrapper`;
|
|
16
|
+
readonly bodyRowExpandedTable: `${string}__row__expandedTable`;
|
|
17
|
+
readonly bodyRowExpandedTableRow: `${string}__row__expandedTableRow`;
|
|
15
18
|
readonly cell: string;
|
|
16
19
|
readonly cellEllipsis: `${string}__ellipsis`;
|
|
17
20
|
readonly selections: "mzn-table__selections";
|
|
@@ -42,7 +45,7 @@ export declare type TableColumn<SourceType> = {
|
|
|
42
45
|
headerClassName?: string;
|
|
43
46
|
width?: number;
|
|
44
47
|
sorter?(a: any, b: any): number;
|
|
45
|
-
onSorted?(
|
|
48
|
+
onSorted?(dataIndex: string, sortedType: string): void;
|
|
46
49
|
editable?: boolean;
|
|
47
50
|
setCellProps?(record: SourceType): TableRecord<unknown>;
|
|
48
51
|
/** @default true */
|
|
@@ -50,6 +53,7 @@ export declare type TableColumn<SourceType> = {
|
|
|
50
53
|
/** force display tooltip whenever content is hovered */
|
|
51
54
|
forceShownTooltipWhenHovered?: boolean;
|
|
52
55
|
};
|
|
56
|
+
export declare type ExpandedTableColumn = Omit<TableColumn<TableRecord<unknown>>, 'title' | 'renderTitle' | 'align' | 'headerClassName' | 'width' | 'sorter' | 'onSorted' | 'editable' | 'setCellProps'>;
|
|
53
57
|
export declare type TableFetchMore = {
|
|
54
58
|
callback?(): any;
|
|
55
59
|
isReachEnd?: boolean;
|
|
@@ -70,8 +74,13 @@ export interface TableRowSelection {
|
|
|
70
74
|
/** === Feature Expandable */
|
|
71
75
|
export interface TableExpandable<SourceType> {
|
|
72
76
|
className?: string;
|
|
73
|
-
expandedRowRender(record: SourceType):
|
|
77
|
+
expandedRowRender(record: SourceType): string | {
|
|
78
|
+
dataSource: TableDataSource[];
|
|
79
|
+
columns?: ExpandedTableColumn[];
|
|
80
|
+
className?: string;
|
|
81
|
+
};
|
|
74
82
|
rowExpandable?(record: SourceType): boolean;
|
|
83
|
+
onExpand?(record: SourceType, status: boolean): void;
|
|
75
84
|
}
|
|
76
85
|
/** === Feature Pagination */
|
|
77
86
|
export interface TablePagination {
|
|
@@ -101,3 +110,6 @@ export interface TableComponents {
|
|
|
101
110
|
cell?: any;
|
|
102
111
|
};
|
|
103
112
|
}
|
|
113
|
+
/** styling */
|
|
114
|
+
export declare function getColumnStyle(column: TableColumn<TableRecord<unknown>>): {};
|
|
115
|
+
export declare function getCellStyle(column: TableColumn<TableRecord<unknown>>): {};
|
package/table/table.js
CHANGED
|
@@ -12,6 +12,9 @@ const tableClasses = {
|
|
|
12
12
|
bodyRow: `${tableBodyPrefix}__row`,
|
|
13
13
|
bodyRowHighlight: `${tableBodyPrefix}__row--highlight`,
|
|
14
14
|
bodyRowCellWrapper: `${tableBodyPrefix}__row__cellWrapper`,
|
|
15
|
+
bodyRowExpandedTableWrapper: `${tableBodyPrefix}__row__expandedTableWrapper`,
|
|
16
|
+
bodyRowExpandedTable: `${tableBodyPrefix}__row__expandedTable`,
|
|
17
|
+
bodyRowExpandedTableRow: `${tableBodyPrefix}__row__expandedTableRow`,
|
|
15
18
|
cell: tableCellPrefix,
|
|
16
19
|
cellEllipsis: `${tableCellPrefix}__ellipsis`,
|
|
17
20
|
selections: `${tablePrefix}__selections`,
|
|
@@ -22,6 +25,32 @@ const tableClasses = {
|
|
|
22
25
|
paginationIndicator: `${tablePrefix}__pagination__indicator`,
|
|
23
26
|
paginationActions: `${tablePrefix}__pagination__actions`,
|
|
24
27
|
refresh: `${tablePrefix}__refresh`,
|
|
25
|
-
};
|
|
28
|
+
};
|
|
29
|
+
/** styling */
|
|
30
|
+
function getColumnStyle(column) {
|
|
31
|
+
if (!column)
|
|
32
|
+
return {};
|
|
33
|
+
let style = {};
|
|
34
|
+
if (column.width) {
|
|
35
|
+
style = {
|
|
36
|
+
...style,
|
|
37
|
+
width: column.width,
|
|
38
|
+
maxWidth: column.width,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return style;
|
|
42
|
+
}
|
|
43
|
+
function getCellStyle(column) {
|
|
44
|
+
if (!column)
|
|
45
|
+
return {};
|
|
46
|
+
let style = {};
|
|
47
|
+
if (column.align) {
|
|
48
|
+
style = {
|
|
49
|
+
...style,
|
|
50
|
+
justifyContent: column.align === 'center' ? column.align : `flex-${column.align}`,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return style;
|
|
54
|
+
}
|
|
26
55
|
|
|
27
|
-
export { tableBodyPrefix, tableCellPrefix, tableClasses, tableHeaderPrefix, tablePrefix };
|
|
56
|
+
export { getCellStyle, getColumnStyle, tableBodyPrefix, tableCellPrefix, tableClasses, tableHeaderPrefix, tablePrefix };
|