@itrocks/list 0.3.5 → 0.4.1
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/build.js +6 -1
- package/cjs/list.html +1 -1
- package/list.css +17 -1
- package/package.json +1 -1
package/build.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { build } from '@itrocks/build/build.js';
|
|
2
|
+
import { TableColumnReorder } from '@itrocks/table/column-reorder.js';
|
|
3
|
+
import { TableColumnReorderFreeze } from '@itrocks/table/column-reorder-freeze.js';
|
|
2
4
|
import { TableFeed } from '@itrocks/table/feed.js';
|
|
3
5
|
import { TableFreeze } from '@itrocks/table/freeze.js';
|
|
4
6
|
import { TableFreezeInheritBackground } from '@itrocks/table/freeze/inherit-background.js';
|
|
@@ -16,7 +18,10 @@ build('article[data-action="list"] > form > table.objects', table => {
|
|
|
16
18
|
}
|
|
17
19
|
});
|
|
18
20
|
tableByElement(table, {
|
|
19
|
-
plugins: [
|
|
21
|
+
plugins: [
|
|
22
|
+
TableColumnReorder, TableColumnReorderFreeze, TableFeed, TableFreeze, TableFreezeInheritBackground,
|
|
23
|
+
TableFreezeInheritBorder, tableLink
|
|
24
|
+
]
|
|
20
25
|
});
|
|
21
26
|
table.addEventListener('click', event => {
|
|
22
27
|
const element = event.target;
|
package/cjs/list.html
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<table class="objects" data-link="{type.@route}">
|
|
29
29
|
<thead>
|
|
30
30
|
<tr class="properties">
|
|
31
|
-
<th class="select"><input name="select" type="checkbox" value="all"></th>
|
|
31
|
+
<th class="select" data-freeze><input name="select" type="checkbox" value="all"></th>
|
|
32
32
|
<!--columns-->
|
|
33
33
|
<th data-property="{name}" data-reverse="{?reverse}" data-sort="{?sort}">{@display}</th>
|
|
34
34
|
<!--end-->
|
package/list.css
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
html.column-reorder,
|
|
2
|
+
html.column-reorder * {
|
|
3
|
+
cursor: grabbing !important;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
main > article[data-action=list] > header > .summary {
|
|
2
7
|
padding: 13px 10px 12px;
|
|
3
8
|
position: absolute;
|
|
@@ -31,6 +36,7 @@ table.objects tr td, table.objects tr th {
|
|
|
31
36
|
border-bottom: 1px solid #d8d8d8;
|
|
32
37
|
border-spacing: 0;
|
|
33
38
|
padding: 0.6em;
|
|
39
|
+
white-space: nowrap;
|
|
34
40
|
}
|
|
35
41
|
table.objects tr td:last-child, table.objects tr th:last-child {
|
|
36
42
|
border-right: 1px solid #d8d8d8;
|
|
@@ -38,6 +44,13 @@ table.objects tr td:last-child, table.objects tr th:last-child {
|
|
|
38
44
|
table.objects tr.properties > .select > input[name=select] {
|
|
39
45
|
display: none;
|
|
40
46
|
}
|
|
47
|
+
table.objects > * > tr > .column-reorder {
|
|
48
|
+
--column-reorder-tint: inset 0 0 0 100vmax rgb(0 0 0 / 2%);
|
|
49
|
+
box-shadow: var(--column-reorder-tint);
|
|
50
|
+
}
|
|
51
|
+
table.objects > * > tr > .column-reorder input {
|
|
52
|
+
box-shadow: var(--column-reorder-tint);
|
|
53
|
+
}
|
|
41
54
|
table.objects > tbody > tr > td > ul {
|
|
42
55
|
display: block;
|
|
43
56
|
margin: 0;
|
|
@@ -56,6 +69,9 @@ table.objects > tbody:first-child > tr:nth-child(even) > td {
|
|
|
56
69
|
table.objects > tbody:first-child > tr:nth-child(odd) > td {
|
|
57
70
|
background: #f8f8f8;
|
|
58
71
|
}
|
|
72
|
+
table.objects > thead > tr.properties > th {
|
|
73
|
+
user-select: none;
|
|
74
|
+
}
|
|
59
75
|
table.objects > thead > tr.properties > th[data-property] {
|
|
60
76
|
cursor: pointer;
|
|
61
77
|
}
|
|
@@ -103,7 +119,7 @@ table.objects > thead > tr.search > th > input:not([type=submit]) {
|
|
|
103
119
|
}
|
|
104
120
|
table.objects > thead > tr.search > th > input:focus {
|
|
105
121
|
outline: none;
|
|
106
|
-
box-shadow: inset 0 0 0 2px Highlight;
|
|
122
|
+
box-shadow: inset 0 0 0 2px Highlight, var(--column-reorder-tint, 0 0 transparent);
|
|
107
123
|
}
|
|
108
124
|
table.objects > thead + tbody > tr:nth-child(even) > td {
|
|
109
125
|
background: #f8f8f8;
|
package/package.json
CHANGED