@getflip/swirl-components 0.220.5 → 0.221.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.
@@ -5,6 +5,7 @@ import classnames from "classnames";
5
5
  */
6
6
  export class SwirlBox {
7
7
  constructor() {
8
+ this.borderColor = "default";
8
9
  this.bordered = undefined;
9
10
  this.borderedBlockEnd = undefined;
10
11
  this.borderedBlockStart = undefined;
@@ -38,6 +39,9 @@ export class SwirlBox {
38
39
  render() {
39
40
  const styles = {
40
41
  alignItems: this.centerBlock ? "center" : undefined,
42
+ borderColor: this.borderColor === "default"
43
+ ? "var(--s-border-default)"
44
+ : "var(--s-border-strong)",
41
45
  bottom: this.bottom,
42
46
  display: this.centerBlock || this.centerInline ? "flex" : undefined,
43
47
  flexBasis: this.basis,
@@ -80,7 +84,7 @@ export class SwirlBox {
80
84
  "box--bordered-inline-start": this.borderedInlineStart,
81
85
  "box--cover": this.cover,
82
86
  });
83
- return (h(Host, { key: '027b397f10e1f70fb7a0df7f63299949fe4ab7be', class: className, style: styles }, h("slot", { key: '57de1c7c3d70479fdc46e281475e4eed08d8a412' })));
87
+ return (h(Host, { key: '367ec628269c2cf809d157c0ec0ccf590d3d412c', class: className, style: styles }, h("slot", { key: '62f13e6614f3e78cd40150b5fe876a61f47ac564' })));
84
88
  }
85
89
  static get is() { return "swirl-box"; }
86
90
  static get encapsulation() { return "shadow"; }
@@ -96,6 +100,30 @@ export class SwirlBox {
96
100
  }
97
101
  static get properties() {
98
102
  return {
103
+ "borderColor": {
104
+ "type": "string",
105
+ "mutable": false,
106
+ "complexType": {
107
+ "original": "SwirlBoxBorderColor",
108
+ "resolved": "\"default\" | \"strong\"",
109
+ "references": {
110
+ "SwirlBoxBorderColor": {
111
+ "location": "local",
112
+ "path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-box/swirl-box.tsx",
113
+ "id": "src/components/swirl-box/swirl-box.tsx::SwirlBoxBorderColor"
114
+ }
115
+ }
116
+ },
117
+ "required": false,
118
+ "optional": true,
119
+ "docs": {
120
+ "tags": [],
121
+ "text": ""
122
+ },
123
+ "attribute": "border-color",
124
+ "reflect": false,
125
+ "defaultValue": "\"default\""
126
+ },
99
127
  "bordered": {
100
128
  "type": "boolean",
101
129
  "mutable": false,
@@ -7,7 +7,7 @@ describe("swirl-box", () => {
7
7
  html: `<swirl-box>Content</swirl-box>`,
8
8
  });
9
9
  expect(page.root).toEqualHtml(`
10
- <swirl-box class="box" style="overflow: visible; padding: var(--s-space-0); position: relative;">
10
+ <swirl-box class="box" style="border-color: var(--s-border-default); overflow: visible; padding: var(--s-space-0); position: relative;">
11
11
  <mock:shadow-root>
12
12
  <slot></slot>
13
13
  </mock:shadow-root>
@@ -21,7 +21,7 @@ describe("swirl-box", () => {
21
21
  html: `<swirl-box cover="true" padding="12">Content</swirl-box>`,
22
22
  });
23
23
  expect(page.root).toEqualHtml(`
24
- <swirl-box class="box box--cover" cover="true" padding="12" style="height: 100%; overflow: visible; padding: var(--s-space-12); position: relative; width: 100%;">
24
+ <swirl-box class="box box--cover" cover="true" padding="12" style="border-color: var(--s-border-default); height: 100%; overflow: visible; padding: var(--s-space-12); position: relative; width: 100%;">
25
25
  <mock:shadow-root>
26
26
  <slot></slot>
27
27
  </div>
@@ -36,7 +36,7 @@ describe("swirl-box", () => {
36
36
  html: `<swirl-box bordered="true" center-block="true" center-inline="true" cover="true" padding="12">Content</swirl-box>`,
37
37
  });
38
38
  expect(page.root).toEqualHtml(`
39
- <swirl-box bordered="true" center-block="true" center-inline="true" class="box box--bordered box--cover" cover="true" padding="12" style="align-items: center; display: flex; height: 100%; justify-content: center; overflow: visible; padding: var(--s-space-12); position: relative; width: 100%;">
39
+ <swirl-box bordered="true" center-block="true" center-inline="true" class="box box--bordered box--cover" cover="true" padding="12" style="align-items: center; border-color: var(--s-border-default); display: flex; height: 100%; justify-content: center; overflow: visible; padding: var(--s-space-12); position: relative; width: 100%;">
40
40
  <mock:shadow-root>
41
41
  <slot></slot>
42
42
  </mock:shadow-root>