@getflip/swirl-components 0.422.0 → 0.423.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.
@@ -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
- return (h(Host, { key: '7b44381a58a3166a253085ad49e9dfd2c789a6cb', "aria-sort": this.sort, class: "table-column", role: "columnheader", style: styles }, h("span", { key: 'bbd36f836c804b7705a4734146d75b0947c60d0e' }, h("slot", { key: '31bd5ea3ad4241e3220982b3b6b09177b1797815' })), this.sortable && (h("span", { key: 'f1412c8cfee58866f449cb188a2def485af9066d', class: "table-column__sort-indicator" }, this.sort === "ascending" && (h("swirl-icon-arrow-upward", { key: 'bb54544c676dcfb0f13f93354d6438a635fa028d', "aria-hidden": "true", size: 20 })), this.sort === "descending" && (h("swirl-icon-arrow-downward", { key: 'cfb63e3e1edc6c6d99da43eed402b467f3ca7770', "aria-hidden": "true", size: 20 })), !Boolean(this.sort) && " "))));
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",