@getflip/swirl-components 0.422.0 → 0.423.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/components.json +46 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-icon-arrow-left_4.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table-column.cjs.entry.js +9 -2
- package/dist/collection/components/swirl-table-column/swirl-table-column.css +8 -1
- package/dist/collection/components/swirl-table-column/swirl-table-column.js +34 -1
- package/dist/collection/components/swirl-thumbnail/swirl-thumbnail.css +7 -3
- package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
- package/dist/components/swirl-table-column.js +10 -2
- package/dist/components/swirl-thumbnail2.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-icon-arrow-left_4.entry.js +1 -1
- package/dist/esm/swirl-table-column.entry.js +9 -2
- package/dist/swirl-components/{p-839d86c3.entry.js → p-5d34bd5d.entry.js} +1 -1
- package/dist/swirl-components/p-5ec4bedc.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-table-column/swirl-table-column.d.ts +2 -0
- package/dist/types/components.d.ts +10 -2
- package/package.json +1 -1
- package/vscode-data.json +12 -0
- package/dist/swirl-components/p-57dba12f.entry.js +0 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
+
import classNames from "classnames";
|
|
2
3
|
import { closestPassShadow } from "../../utils";
|
|
3
4
|
/**
|
|
4
5
|
* @slot slot - The column label.
|
|
5
6
|
*/
|
|
6
7
|
export class SwirlTableColumn {
|
|
7
8
|
constructor() {
|
|
9
|
+
this.variant = "default";
|
|
8
10
|
this.minWidth = "fit-content";
|
|
9
11
|
}
|
|
10
12
|
componentDidRender() {
|
|
@@ -17,7 +19,12 @@ export class SwirlTableColumn {
|
|
|
17
19
|
maxWidth: this.maxWidth || "",
|
|
18
20
|
minWidth: this.minWidth || "",
|
|
19
21
|
};
|
|
20
|
-
|
|
22
|
+
const variant = this.variant ?? "default";
|
|
23
|
+
const className = classNames("table-column", {
|
|
24
|
+
"table-column--default": variant === "default",
|
|
25
|
+
"table-column--sunken": variant === "sunken",
|
|
26
|
+
});
|
|
27
|
+
return (h(Host, { key: '98ff03f03fc2e410ce4f55657bd86d028218f541', "aria-sort": this.sort, class: className, role: "columnheader", style: styles }, h("span", { key: 'ad2985976912bfb12d87a0372defb67083ef7697' }, h("slot", { key: '66aa14f9abb4ce65efe0d5b3f281faa107586999' })), this.sortable && (h("span", { key: 'c8da76177803b8f1e8f9b64b81558c9c471c5745', class: "table-column__sort-indicator" }, this.sort === "ascending" && (h("swirl-icon-arrow-upward", { key: '946a9c5400519b15198313f5d6d5e062361f9383', "aria-hidden": "true", size: 20 })), this.sort === "descending" && (h("swirl-icon-arrow-downward", { key: '70fa977e67042eba2a943a06f4138a7589932c5b', "aria-hidden": "true", size: 20 })), !Boolean(this.sort) && " "))));
|
|
21
28
|
}
|
|
22
29
|
static get is() { return "swirl-table-column"; }
|
|
23
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -33,6 +40,32 @@ export class SwirlTableColumn {
|
|
|
33
40
|
}
|
|
34
41
|
static get properties() {
|
|
35
42
|
return {
|
|
43
|
+
"variant": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"attribute": "variant",
|
|
46
|
+
"mutable": false,
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "SwirlTableColumnVariant",
|
|
49
|
+
"resolved": "\"default\" | \"sunken\"",
|
|
50
|
+
"references": {
|
|
51
|
+
"SwirlTableColumnVariant": {
|
|
52
|
+
"location": "local",
|
|
53
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-table-column/swirl-table-column.tsx",
|
|
54
|
+
"id": "src/components/swirl-table-column/swirl-table-column.tsx::SwirlTableColumnVariant"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": true,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
},
|
|
64
|
+
"getter": false,
|
|
65
|
+
"setter": false,
|
|
66
|
+
"reflect": false,
|
|
67
|
+
"defaultValue": "\"default\""
|
|
68
|
+
},
|
|
36
69
|
"sort": {
|
|
37
70
|
"type": "string",
|
|
38
71
|
"attribute": "sort",
|
|
@@ -106,15 +106,19 @@
|
|
|
106
106
|
|
|
107
107
|
.thumbnail__buttons {
|
|
108
108
|
position: absolute;
|
|
109
|
-
opacity: 0;
|
|
110
109
|
z-index: 1;
|
|
111
110
|
top: var(--s-space-4);
|
|
112
111
|
right: var(--s-space-4);
|
|
113
112
|
}
|
|
114
113
|
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
@media (hover: hover) {
|
|
115
|
+
.thumbnail__buttons {
|
|
116
|
+
opacity: 0;
|
|
117
117
|
}
|
|
118
|
+
.thumbnail:hover .thumbnail__buttons {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
118
122
|
|
|
119
123
|
.thumbnail__timestamp {
|
|
120
124
|
position: absolute;
|