@getflip/swirl-components 0.36.0 → 0.38.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.
- package/components.json +281 -22
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-action-list_3.cjs.entry.js +7 -2
- package/dist/cjs/swirl-app-layout_7.cjs.entry.js +16 -0
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
- package/dist/cjs/swirl-pagination.cjs.entry.js +20 -9
- package/dist/cjs/swirl-search.cjs.entry.js +3 -2
- package/dist/cjs/swirl-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/swirl-box/swirl-box.js +104 -0
- package/dist/collection/components/swirl-console-layout/swirl-console-layout.css +4 -3
- package/dist/collection/components/swirl-pagination/swirl-pagination.css +20 -10
- package/dist/collection/components/swirl-pagination/swirl-pagination.js +61 -50
- package/dist/collection/components/swirl-search/swirl-search.css +8 -2
- package/dist/collection/components/swirl-search/swirl-search.js +25 -1
- package/dist/collection/components/swirl-separator/swirl-separator.css +0 -2
- package/dist/collection/components/swirl-separator/swirl-separator.js +35 -1
- package/dist/collection/components/swirl-table-cell/swirl-table-cell.css +0 -8
- package/dist/collection/components/swirl-table-column/swirl-table-column.css +0 -9
- package/dist/components/swirl-box2.js +21 -1
- package/dist/components/swirl-console-layout.js +1 -1
- package/dist/components/swirl-pagination.js +27 -22
- package/dist/components/swirl-search.js +5 -3
- package/dist/components/swirl-separator2.js +10 -3
- package/dist/components/swirl-table-cell.js +1 -1
- package/dist/components/swirl-table-column.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-action-list_3.entry.js +7 -2
- package/dist/esm/swirl-app-layout_7.entry.js +16 -0
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-console-layout.entry.js +1 -1
- package/dist/esm/swirl-pagination.entry.js +20 -9
- package/dist/esm/swirl-search.entry.js +3 -2
- package/dist/esm/swirl-table-cell.entry.js +1 -1
- package/dist/esm/swirl-table-column.entry.js +1 -1
- package/dist/swirl-components/{p-da4958ec.entry.js → p-30e7d460.entry.js} +1 -1
- package/dist/swirl-components/p-3c2325ba.entry.js +1 -0
- package/dist/swirl-components/p-7d7f11e8.entry.js +1 -0
- package/dist/swirl-components/{p-c2167151.entry.js → p-94c348ae.entry.js} +1 -1
- package/dist/swirl-components/p-cbcc0e42.entry.js +1 -0
- package/dist/swirl-components/{p-16864f08.entry.js → p-d5032332.entry.js} +1 -1
- package/dist/swirl-components/p-dbe4ee1a.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-box/swirl-box.d.ts +4 -0
- package/dist/types/components/swirl-pagination/swirl-pagination.d.ts +7 -5
- package/dist/types/components/swirl-search/swirl-search.d.ts +2 -0
- package/dist/types/components/swirl-separator/swirl-separator.d.ts +2 -0
- package/dist/types/components.d.ts +20 -4
- package/package.json +1 -1
- package/vscode-data.json +179 -4
- package/dist/swirl-components/p-27566da1.entry.js +0 -1
- package/dist/swirl-components/p-50430bab.entry.js +0 -1
- package/dist/swirl-components/p-774483bc.entry.js +0 -1
- package/dist/swirl-components/p-968773d7.entry.js +0 -1
|
@@ -2,6 +2,18 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import classnames from "classnames";
|
|
3
3
|
export class SwirlPagination {
|
|
4
4
|
constructor() {
|
|
5
|
+
this.onFirstPageButtonClick = () => {
|
|
6
|
+
if (this.page === 1) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
this.setPage.emit(1);
|
|
10
|
+
};
|
|
11
|
+
this.onLastPageButtonClick = () => {
|
|
12
|
+
if (this.page === this.pages) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
this.setPage.emit(this.pages);
|
|
16
|
+
};
|
|
5
17
|
this.onPrevButtonClick = () => {
|
|
6
18
|
const prevPage = Math.max(this.page - 1, 1);
|
|
7
19
|
if (this.page === prevPage) {
|
|
@@ -23,27 +35,26 @@ export class SwirlPagination {
|
|
|
23
35
|
}
|
|
24
36
|
this.setPage.emit(page);
|
|
25
37
|
};
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.nextButtonLabel = "Next";
|
|
29
|
-
this.pageLabel = "out of";
|
|
30
|
-
this.prevButtonLabel = "Prev";
|
|
38
|
+
this.firstPageButtonLabel = "First page";
|
|
39
|
+
this.lastPageButtonLabel = "Last page";
|
|
31
40
|
this.label = undefined;
|
|
41
|
+
this.nextButtonLabel = "Next page";
|
|
32
42
|
this.page = undefined;
|
|
43
|
+
this.pageLabel = "out of";
|
|
33
44
|
this.pages = undefined;
|
|
34
45
|
this.pageSelectLabel = "Select a page";
|
|
46
|
+
this.prevButtonLabel = "Previous page";
|
|
35
47
|
this.variant = "default";
|
|
36
48
|
}
|
|
37
49
|
render() {
|
|
38
|
-
const hideButtonLabels = this.variant !== "advanced";
|
|
39
50
|
const showPageLabel = this.variant !== "simple";
|
|
40
51
|
const showDropDown = this.variant === "advanced";
|
|
41
52
|
const ariaPageLabel = `${this.page} ${this.pageLabel} ${this.pages}`;
|
|
42
53
|
const className = classnames("pagination", `pagination--variant-${this.variant}`);
|
|
43
|
-
return (h(Host, null, h("nav", { "aria-label": this.label, class: className }, h("ul", { class: "pagination__list", part: "pagination__list" }, h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "
|
|
54
|
+
return (h(Host, null, h("nav", { "aria-label": this.label, class: className }, h("ul", { class: "pagination__list", part: "pagination__list" }, h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "pagination__first-page-button", disabled: this.page <= 1, hideLabel: true, icon: "<swirl-icon-double-arrow-left></swirl-icon-double-arrow-left>", intent: "primary", label: this.firstPageButtonLabel, onClick: this.onFirstPageButtonClick })), h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "pagination__prev-button", disabled: this.page <= 1, hideLabel: true, icon: "<swirl-icon-chevron-left></swirl-icon-chevron-left>", intent: "primary", label: this.prevButtonLabel, onClick: this.onPrevButtonClick })), showPageLabel ? (h("li", { class: "pagination__list-item pagination__page-label" }, h("span", null, showDropDown ? (h("span", { "aria-current": "page", class: "pagination__advanced-label" }, h("span", { class: "pagination__page-select-container" }, h("select", { "aria-label": this.pageSelectLabel, class: "pagination__page-select", onChange: this.onSelect }, new Array(this.pages)
|
|
44
55
|
.fill(undefined)
|
|
45
56
|
.map((_, index) => index + 1)
|
|
46
|
-
.map((page) => (h("option", { selected: this.page === page, value: String(page) }, page))))
|
|
57
|
+
.map((page) => (h("option", { selected: this.page === page, value: String(page) }, page))))), h("span", { "aria-hidden": "true" }, this.pageLabel, " ", this.pages))) : (h("span", { "aria-current": "page" }, ariaPageLabel))))) : (h("li", { class: "pagination__list-item" }, h("swirl-visually-hidden", null, h("span", { "aria-current": "page" }, ariaPageLabel)))), h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "pagination__next-button", disabled: this.page >= this.pages, hideLabel: true, icon: "<swirl-icon-chevron-right></swirl-icon-chevron-right>", iconPosition: "end", intent: "primary", label: this.nextButtonLabel, onClick: this.onNextButtonClick })), h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "pagination__last-page-button", disabled: this.page >= this.pages, hideLabel: true, icon: "<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>", intent: "primary", label: this.lastPageButtonLabel, onClick: this.onLastPageButtonClick }))))));
|
|
47
58
|
}
|
|
48
59
|
static get is() { return "swirl-pagination"; }
|
|
49
60
|
static get encapsulation() { return "shadow"; }
|
|
@@ -59,7 +70,7 @@ export class SwirlPagination {
|
|
|
59
70
|
}
|
|
60
71
|
static get properties() {
|
|
61
72
|
return {
|
|
62
|
-
"
|
|
73
|
+
"firstPageButtonLabel": {
|
|
63
74
|
"type": "string",
|
|
64
75
|
"mutable": false,
|
|
65
76
|
"complexType": {
|
|
@@ -73,11 +84,11 @@ export class SwirlPagination {
|
|
|
73
84
|
"tags": [],
|
|
74
85
|
"text": ""
|
|
75
86
|
},
|
|
76
|
-
"attribute": "
|
|
87
|
+
"attribute": "first-page-button-label",
|
|
77
88
|
"reflect": false,
|
|
78
|
-
"defaultValue": "\"
|
|
89
|
+
"defaultValue": "\"First page\""
|
|
79
90
|
},
|
|
80
|
-
"
|
|
91
|
+
"lastPageButtonLabel": {
|
|
81
92
|
"type": "string",
|
|
82
93
|
"mutable": false,
|
|
83
94
|
"complexType": {
|
|
@@ -91,11 +102,11 @@ export class SwirlPagination {
|
|
|
91
102
|
"tags": [],
|
|
92
103
|
"text": ""
|
|
93
104
|
},
|
|
94
|
-
"attribute": "
|
|
105
|
+
"attribute": "last-page-button-label",
|
|
95
106
|
"reflect": false,
|
|
96
|
-
"defaultValue": "\"
|
|
107
|
+
"defaultValue": "\"Last page\""
|
|
97
108
|
},
|
|
98
|
-
"
|
|
109
|
+
"label": {
|
|
99
110
|
"type": "string",
|
|
100
111
|
"mutable": false,
|
|
101
112
|
"complexType": {
|
|
@@ -103,17 +114,16 @@ export class SwirlPagination {
|
|
|
103
114
|
"resolved": "string",
|
|
104
115
|
"references": {}
|
|
105
116
|
},
|
|
106
|
-
"required":
|
|
107
|
-
"optional":
|
|
117
|
+
"required": true,
|
|
118
|
+
"optional": false,
|
|
108
119
|
"docs": {
|
|
109
120
|
"tags": [],
|
|
110
121
|
"text": ""
|
|
111
122
|
},
|
|
112
|
-
"attribute": "
|
|
113
|
-
"reflect": false
|
|
114
|
-
"defaultValue": "\"Next\""
|
|
123
|
+
"attribute": "label",
|
|
124
|
+
"reflect": false
|
|
115
125
|
},
|
|
116
|
-
"
|
|
126
|
+
"nextButtonLabel": {
|
|
117
127
|
"type": "string",
|
|
118
128
|
"mutable": false,
|
|
119
129
|
"complexType": {
|
|
@@ -127,29 +137,28 @@ export class SwirlPagination {
|
|
|
127
137
|
"tags": [],
|
|
128
138
|
"text": ""
|
|
129
139
|
},
|
|
130
|
-
"attribute": "
|
|
140
|
+
"attribute": "next-button-label",
|
|
131
141
|
"reflect": false,
|
|
132
|
-
"defaultValue": "\"
|
|
142
|
+
"defaultValue": "\"Next page\""
|
|
133
143
|
},
|
|
134
|
-
"
|
|
135
|
-
"type": "
|
|
144
|
+
"page": {
|
|
145
|
+
"type": "number",
|
|
136
146
|
"mutable": false,
|
|
137
147
|
"complexType": {
|
|
138
|
-
"original": "
|
|
139
|
-
"resolved": "
|
|
148
|
+
"original": "number",
|
|
149
|
+
"resolved": "number",
|
|
140
150
|
"references": {}
|
|
141
151
|
},
|
|
142
|
-
"required":
|
|
143
|
-
"optional":
|
|
152
|
+
"required": true,
|
|
153
|
+
"optional": false,
|
|
144
154
|
"docs": {
|
|
145
155
|
"tags": [],
|
|
146
156
|
"text": ""
|
|
147
157
|
},
|
|
148
|
-
"attribute": "
|
|
149
|
-
"reflect": false
|
|
150
|
-
"defaultValue": "\"Prev\""
|
|
158
|
+
"attribute": "page",
|
|
159
|
+
"reflect": false
|
|
151
160
|
},
|
|
152
|
-
"
|
|
161
|
+
"pageLabel": {
|
|
153
162
|
"type": "string",
|
|
154
163
|
"mutable": false,
|
|
155
164
|
"complexType": {
|
|
@@ -157,16 +166,17 @@ export class SwirlPagination {
|
|
|
157
166
|
"resolved": "string",
|
|
158
167
|
"references": {}
|
|
159
168
|
},
|
|
160
|
-
"required":
|
|
161
|
-
"optional":
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": true,
|
|
162
171
|
"docs": {
|
|
163
172
|
"tags": [],
|
|
164
173
|
"text": ""
|
|
165
174
|
},
|
|
166
|
-
"attribute": "label",
|
|
167
|
-
"reflect": false
|
|
175
|
+
"attribute": "page-label",
|
|
176
|
+
"reflect": false,
|
|
177
|
+
"defaultValue": "\"out of\""
|
|
168
178
|
},
|
|
169
|
-
"
|
|
179
|
+
"pages": {
|
|
170
180
|
"type": "number",
|
|
171
181
|
"mutable": false,
|
|
172
182
|
"complexType": {
|
|
@@ -180,27 +190,28 @@ export class SwirlPagination {
|
|
|
180
190
|
"tags": [],
|
|
181
191
|
"text": ""
|
|
182
192
|
},
|
|
183
|
-
"attribute": "
|
|
193
|
+
"attribute": "pages",
|
|
184
194
|
"reflect": false
|
|
185
195
|
},
|
|
186
|
-
"
|
|
187
|
-
"type": "
|
|
196
|
+
"pageSelectLabel": {
|
|
197
|
+
"type": "string",
|
|
188
198
|
"mutable": false,
|
|
189
199
|
"complexType": {
|
|
190
|
-
"original": "
|
|
191
|
-
"resolved": "
|
|
200
|
+
"original": "string",
|
|
201
|
+
"resolved": "string",
|
|
192
202
|
"references": {}
|
|
193
203
|
},
|
|
194
|
-
"required":
|
|
195
|
-
"optional":
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": true,
|
|
196
206
|
"docs": {
|
|
197
207
|
"tags": [],
|
|
198
208
|
"text": ""
|
|
199
209
|
},
|
|
200
|
-
"attribute": "
|
|
201
|
-
"reflect": false
|
|
210
|
+
"attribute": "page-select-label",
|
|
211
|
+
"reflect": false,
|
|
212
|
+
"defaultValue": "\"Select a page\""
|
|
202
213
|
},
|
|
203
|
-
"
|
|
214
|
+
"prevButtonLabel": {
|
|
204
215
|
"type": "string",
|
|
205
216
|
"mutable": false,
|
|
206
217
|
"complexType": {
|
|
@@ -214,9 +225,9 @@ export class SwirlPagination {
|
|
|
214
225
|
"tags": [],
|
|
215
226
|
"text": ""
|
|
216
227
|
},
|
|
217
|
-
"attribute": "
|
|
228
|
+
"attribute": "prev-button-label",
|
|
218
229
|
"reflect": false,
|
|
219
|
-
"defaultValue": "\"
|
|
230
|
+
"defaultValue": "\"Previous page\""
|
|
220
231
|
},
|
|
221
232
|
"variant": {
|
|
222
233
|
"type": "string",
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
width: 100%;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.search--variant-outline .search__input {
|
|
17
|
+
background-color: transparent;
|
|
18
|
+
box-shadow: inset 0 0 0 var(--s-border-width-default) var(--s-border-strong);
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
.search--disabled .search__icon {
|
|
17
22
|
color: var(--s-icon-disabled);
|
|
18
23
|
}
|
|
@@ -89,9 +94,10 @@
|
|
|
89
94
|
@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px) {
|
|
90
95
|
|
|
91
96
|
.search__input {
|
|
97
|
+
height: 2.25rem;
|
|
98
|
+
padding-left: calc(var(--s-space-8) + 1.5rem + var(--s-space-8));
|
|
92
99
|
font-size: var(--s-font-size-sm);
|
|
93
|
-
line-height: var(--s-line-height-sm)
|
|
94
|
-
padding-left: calc(var(--s-space-8) + 1.5rem + var(--s-space-8))
|
|
100
|
+
line-height: var(--s-line-height-sm)
|
|
95
101
|
}
|
|
96
102
|
}
|
|
97
103
|
|
|
@@ -29,6 +29,7 @@ export class SwirlSearch {
|
|
|
29
29
|
this.label = undefined;
|
|
30
30
|
this.placeholder = "Search …";
|
|
31
31
|
this.value = undefined;
|
|
32
|
+
this.variant = "filled";
|
|
32
33
|
}
|
|
33
34
|
componentDidLoad() {
|
|
34
35
|
var _a, _b;
|
|
@@ -53,7 +54,7 @@ export class SwirlSearch {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
render() {
|
|
56
|
-
const className = classnames("search", {
|
|
57
|
+
const className = classnames("search", `search--variant-${this.variant}`, {
|
|
57
58
|
"search--disabled": this.disabled,
|
|
58
59
|
});
|
|
59
60
|
return (h(Host, null, h("span", { class: className, ref: (el) => (this.iconEl = el) }, h("swirl-icon-search", { class: "search__icon" }), h("input", { "aria-disabled": this.disabled ? "true" : undefined, "aria-label": this.label, autoComplete: "off", autoFocus: this.autoFocus, class: "search__input", disabled: this.disabled, id: this.inputId, inputMode: "search", name: this.inputName, onBlur: this.onBlur, onChange: this.onChange, onFocus: this.onFocus, placeholder: this.placeholder, ref: (el) => (this.input = el), type: "search", value: this.value }), !this.disabled && (h("button", { "aria-label": this.clearButtonLabel, class: "search__clear-button", onClick: this.clear, type: "button" }, h("swirl-icon-cancel", null))))));
|
|
@@ -209,6 +210,29 @@ export class SwirlSearch {
|
|
|
209
210
|
},
|
|
210
211
|
"attribute": "value",
|
|
211
212
|
"reflect": false
|
|
213
|
+
},
|
|
214
|
+
"variant": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "SwirlSearchVariant",
|
|
219
|
+
"resolved": "\"filled\" | \"outline\"",
|
|
220
|
+
"references": {
|
|
221
|
+
"SwirlSearchVariant": {
|
|
222
|
+
"location": "local",
|
|
223
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-search/swirl-search.tsx"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"required": false,
|
|
228
|
+
"optional": true,
|
|
229
|
+
"docs": {
|
|
230
|
+
"tags": [],
|
|
231
|
+
"text": ""
|
|
232
|
+
},
|
|
233
|
+
"attribute": "variant",
|
|
234
|
+
"reflect": false,
|
|
235
|
+
"defaultValue": "\"filled\""
|
|
212
236
|
}
|
|
213
237
|
};
|
|
214
238
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class SwirlSeparator {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.spacing = "8";
|
|
5
|
+
}
|
|
3
6
|
render() {
|
|
4
|
-
|
|
7
|
+
const styles = {
|
|
8
|
+
paddingTop: `var(--s-space-${this.spacing})`,
|
|
9
|
+
paddingBottom: `var(--s-space-${this.spacing})`,
|
|
10
|
+
};
|
|
11
|
+
return (h(Host, { class: "separator", role: "separator", style: styles }, h("span", { class: "separator__line" })));
|
|
5
12
|
}
|
|
6
13
|
static get is() { return "swirl-separator"; }
|
|
7
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -15,4 +22,31 @@ export class SwirlSeparator {
|
|
|
15
22
|
"$": ["swirl-separator.css"]
|
|
16
23
|
};
|
|
17
24
|
}
|
|
25
|
+
static get properties() {
|
|
26
|
+
return {
|
|
27
|
+
"spacing": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"mutable": false,
|
|
30
|
+
"complexType": {
|
|
31
|
+
"original": "SwirlSeparatorSpacing",
|
|
32
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"24\" | \"32\" | \"4\" | \"8\"",
|
|
33
|
+
"references": {
|
|
34
|
+
"SwirlSeparatorSpacing": {
|
|
35
|
+
"location": "local",
|
|
36
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-separator/swirl-separator.tsx"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": false,
|
|
41
|
+
"optional": true,
|
|
42
|
+
"docs": {
|
|
43
|
+
"tags": [],
|
|
44
|
+
"text": ""
|
|
45
|
+
},
|
|
46
|
+
"attribute": "spacing",
|
|
47
|
+
"reflect": false,
|
|
48
|
+
"defaultValue": "\"8\""
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
18
52
|
}
|
|
@@ -24,14 +24,6 @@
|
|
|
24
24
|
box-shadow: var(--swirl-table-sticky-left-shadow);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
:host(:first-child) {
|
|
28
|
-
border-left: var(--s-border-width-default) solid var(--s-border-default);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
:host(:last-child) {
|
|
32
|
-
border-right: var(--s-border-width-default) solid var(--s-border-default);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
27
|
:host * {
|
|
36
28
|
box-sizing: border-box;
|
|
37
29
|
}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
flex-grow: 1;
|
|
10
10
|
flex-shrink: 1;
|
|
11
11
|
align-items: center;
|
|
12
|
-
border-top: var(--s-border-width-default) solid var(--s-border-default);
|
|
13
12
|
border-bottom: var(--s-border-width-default) solid var(--s-border-default);
|
|
14
13
|
color: var(--s-text-subdued);
|
|
15
14
|
background-color: var(--s-background-default);
|
|
@@ -23,14 +22,6 @@
|
|
|
23
22
|
gap: var(--s-space-8);
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
:host(:first-child) {
|
|
27
|
-
border-left: var(--s-border-width-default) solid var(--s-border-default);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:host(:last-child) {
|
|
31
|
-
border-right: var(--s-border-width-default) solid var(--s-border-default);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
25
|
:host(.table-column--has-shadow-right) {
|
|
35
26
|
box-shadow: var(--swirl-table-sticky-right-shadow);
|
|
36
27
|
}
|
|
@@ -15,6 +15,10 @@ const SwirlBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
15
15
|
this.maxWidth = undefined;
|
|
16
16
|
this.overflow = "visible";
|
|
17
17
|
this.padding = "0";
|
|
18
|
+
this.paddingBlockEnd = undefined;
|
|
19
|
+
this.paddingBlockStart = undefined;
|
|
20
|
+
this.paddingInlineEnd = undefined;
|
|
21
|
+
this.paddingInlineStart = undefined;
|
|
18
22
|
}
|
|
19
23
|
render() {
|
|
20
24
|
const styles = {
|
|
@@ -24,6 +28,18 @@ const SwirlBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
24
28
|
justifyContent: this.centerInline ? "center" : undefined,
|
|
25
29
|
overflow: this.overflow,
|
|
26
30
|
padding: `var(--s-space-${this.padding})`,
|
|
31
|
+
paddingBlockEnd: Boolean(this.paddingBlockEnd)
|
|
32
|
+
? `var(--s-space-${this.paddingBlockEnd})`
|
|
33
|
+
: undefined,
|
|
34
|
+
paddingBlockStart: Boolean(this.paddingBlockStart)
|
|
35
|
+
? `var(--s-space-${this.paddingBlockStart})`
|
|
36
|
+
: undefined,
|
|
37
|
+
paddingInlineEnd: Boolean(this.paddingInlineEnd)
|
|
38
|
+
? `var(--s-space-${this.paddingInlineEnd})`
|
|
39
|
+
: undefined,
|
|
40
|
+
paddingInlineStart: Boolean(this.paddingInlineStart)
|
|
41
|
+
? `var(--s-space-${this.paddingInlineStart})`
|
|
42
|
+
: undefined,
|
|
27
43
|
position: Boolean(this.overflow) ? "relative" : "",
|
|
28
44
|
maxWidth: this.maxWidth,
|
|
29
45
|
width: this.cover ? "100%" : undefined,
|
|
@@ -42,7 +58,11 @@ const SwirlBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
42
58
|
"cover": [4],
|
|
43
59
|
"maxWidth": [1, "max-width"],
|
|
44
60
|
"overflow": [1],
|
|
45
|
-
"padding": [1]
|
|
61
|
+
"padding": [1],
|
|
62
|
+
"paddingBlockEnd": [1, "padding-block-end"],
|
|
63
|
+
"paddingBlockStart": [1, "padding-block-start"],
|
|
64
|
+
"paddingInlineEnd": [1, "padding-inline-end"],
|
|
65
|
+
"paddingInlineStart": [1, "padding-inline-start"]
|
|
46
66
|
}]);
|
|
47
67
|
function defineCustomElement() {
|
|
48
68
|
if (typeof customElements === "undefined") {
|
|
@@ -5,7 +5,7 @@ import { d as defineCustomElement$4 } from './swirl-button2.js';
|
|
|
5
5
|
import { d as defineCustomElement$3 } from './swirl-heading2.js';
|
|
6
6
|
import { d as defineCustomElement$2 } from './swirl-text2.js';
|
|
7
7
|
|
|
8
|
-
const swirlConsoleLayoutCss = ":host{display:block;width:100%;height:100vh}:host *{box-sizing:border-box}.console-layout{display:grid;width:100%;height:100%;grid-template-columns:1fr;grid-template-areas:\"main\"}@media (min-width: 768px){.console-layout{grid-template-columns:20rem 1fr;grid-template-areas:\"sidebar main\"}}@media (max-width: 767px){.console-layout--sidebar-active .console-layout__sidebar{box-shadow:0 0 1rem rgba(0, 0, 0, 0.06)
|
|
8
|
+
const swirlConsoleLayoutCss = ":host{display:block;width:100%;height:100vh}:host *{box-sizing:border-box}.console-layout{display:grid;width:100%;height:100%;grid-template-columns:1fr;grid-template-areas:\"main\"}@media (min-width: 768px){.console-layout{grid-template-columns:20rem 1fr;grid-template-areas:\"sidebar main\"}}@media (max-width: 767px){.console-layout--sidebar-active .console-layout__sidebar{transform:translate3d(0, 0, 0);box-shadow:0 0 1rem rgba(0, 0, 0, 0.06)}}.console-layout__sidebar{position:fixed;z-index:var(--s-z-30);top:4rem;bottom:0;left:0;display:grid;overflow-x:hidden;overflow-y:auto;width:100%;max-width:20rem;border-right:var(--s-border-width-default) solid var(--s-border-default);transition:transform 0.15s, box-shadow 0.15s;transform:translate3d(-100%, 0, 0);grid-template-rows:auto 1fr auto;grid-template-areas:\"header\"\n \"navigation\"\n \"user\"}@media (prefers-reduced-motion){.console-layout__sidebar{transition:none}}@media (min-width: 768px){.console-layout__sidebar{position:static;top:auto;left:auto;max-width:none;height:100%;transform:none;box-shadow:none;grid-area:sidebar}}.console-layout__header{overflow:hidden;min-width:0;padding:var(--s-space-20) var(--s-space-24);background-color:var(--s-background-default);grid-area:header}.console-layout__navigation{overflow-x:hidden;overflow-y:auto;padding-top:var(--s-space-8);padding-bottom:var(--s-space-8);background-color:var(--s-background-default);grid-area:navigation}.console-layout__user{overflow:hidden;margin-top:var(--s-border-width-default);padding:var(--s-space-16) var(--s-space-24) var(--s-space-24);border-top:var(--s-border-width-default) solid var(--s-border-default);background-color:var(--s-background-default);grid-area:user}.console-layout__main{display:grid;overflow-x:hidden;overflow-y:auto;width:100%;height:100%;grid-area:main;gap:var(--s-border-width-default);grid-template-rows:4rem 1fr;grid-template-areas:\"app-bar\"\n \"content\"}.console-layout__app-bar{position:sticky;z-index:1;top:0;display:flex;min-width:0;padding-right:var(--s-space-16);padding-left:var(--s-space-16);align-items:center;border-bottom:var(--s-border-width-default) solid var(--s-border-default);background-color:var(--s-background-default);gap:var(--s-space-12);grid-area:app-bar}@media (min-width: 768px){.console-layout__app-bar{padding-right:2.5rem;padding-left:2.5rem}}@media (min-width: 768px){.console-layout__mobile-navigation-button{display:none}}.console-layout__app-name{min-width:0;flex-grow:1}.console-layout__app-name .heading{overflow:hidden;font-weight:var(--s-font-weight-regular);white-space:nowrap;text-overflow:ellipsis}.console-layout__help-button{flex-shrink:0}.console-layout__content{display:flex;min-width:0;padding:var(--s-space-16);background-color:var(--s-background-default);flex-direction:column;grid-area:content}@media (min-width: 768px){.console-layout__content{padding:2.5rem}}.console-layout__content-header{flex-shrink:0}.console-layout__integration{flex-grow:1}.console-layout__logo{display:flex;min-width:0;align-items:center;gap:var(--s-space-12)}.console-layout__logo-mark{flex-shrink:0}.console-layout__logo-text{min-width:0}.console-layout__logo-text::part(text){overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.console-layout__content-header{display:flex;margin-bottom:2.5rem;gap:var(--s-space-16)}.console-layout__back-button{position:relative;top:calc(-1 * var(--s-space-2));flex-shrink:0}.console-layout__subheading{margin-top:var(--s-space-8)}";
|
|
9
9
|
|
|
10
10
|
const SwirlConsoleLayout$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as classnames } from './index2.js';
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$3 } from './swirl-icon-expand-more2.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './swirl-button2.js';
|
|
5
4
|
import { d as defineCustomElement$2 } from './swirl-visually-hidden2.js';
|
|
6
5
|
|
|
7
|
-
const swirlPaginationCss = ":host{display:block;width:
|
|
6
|
+
const swirlPaginationCss = ":host{display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host *{box-sizing:border-box}.pagination{display:block;width:100%}.pagination--variant-simple .pagination__list{gap:0}.pagination__list{display:flex;margin:0;padding:0;justify-content:flex-start;align-items:center;line-height:var(--s-line-height-base);list-style:none}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__list{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.pagination__page-label{padding-right:var(--s-space-8);padding-left:var(--s-space-8)}.pagination__advanced-label{display:flex;align-items:center;white-space:nowrap;gap:var(--s-space-8)}.pagination__page-select-container{position:relative}.pagination__page-select{display:inline-flex;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);border:none;border-radius:var(--s-border-radius-sm);background-color:transparent;font:inherit;line-height:var(--s-line-height-base);text-align:center;cursor:pointer;box-shadow:inset 0 0 0 var(--s-border-width-default) var(--s-border-strong);-webkit-appearance:none;-moz-appearance:none;appearance:none}.pagination__page-select:focus:not(:focus-visible){outline:none}.pagination__page-select:focus-visible{outline-color:var(--s-focus-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.pagination__page-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}";
|
|
8
7
|
|
|
9
8
|
const SwirlPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
9
|
constructor() {
|
|
@@ -12,6 +11,18 @@ const SwirlPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
12
11
|
this.__registerHost();
|
|
13
12
|
this.__attachShadow();
|
|
14
13
|
this.setPage = createEvent(this, "setPage", 7);
|
|
14
|
+
this.onFirstPageButtonClick = () => {
|
|
15
|
+
if (this.page === 1) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
this.setPage.emit(1);
|
|
19
|
+
};
|
|
20
|
+
this.onLastPageButtonClick = () => {
|
|
21
|
+
if (this.page === this.pages) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
this.setPage.emit(this.pages);
|
|
25
|
+
};
|
|
15
26
|
this.onPrevButtonClick = () => {
|
|
16
27
|
const prevPage = Math.max(this.page - 1, 1);
|
|
17
28
|
if (this.page === prevPage) {
|
|
@@ -33,46 +44,45 @@ const SwirlPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
33
44
|
}
|
|
34
45
|
this.setPage.emit(page);
|
|
35
46
|
};
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.nextButtonLabel = "Next";
|
|
39
|
-
this.pageLabel = "out of";
|
|
40
|
-
this.prevButtonLabel = "Prev";
|
|
47
|
+
this.firstPageButtonLabel = "First page";
|
|
48
|
+
this.lastPageButtonLabel = "Last page";
|
|
41
49
|
this.label = undefined;
|
|
50
|
+
this.nextButtonLabel = "Next page";
|
|
42
51
|
this.page = undefined;
|
|
52
|
+
this.pageLabel = "out of";
|
|
43
53
|
this.pages = undefined;
|
|
44
54
|
this.pageSelectLabel = "Select a page";
|
|
55
|
+
this.prevButtonLabel = "Previous page";
|
|
45
56
|
this.variant = "default";
|
|
46
57
|
}
|
|
47
58
|
render() {
|
|
48
|
-
const hideButtonLabels = this.variant !== "advanced";
|
|
49
59
|
const showPageLabel = this.variant !== "simple";
|
|
50
60
|
const showDropDown = this.variant === "advanced";
|
|
51
61
|
const ariaPageLabel = `${this.page} ${this.pageLabel} ${this.pages}`;
|
|
52
62
|
const className = classnames("pagination", `pagination--variant-${this.variant}`);
|
|
53
|
-
return (h(Host, null, h("nav", { "aria-label": this.label, class: className }, h("ul", { class: "pagination__list", part: "pagination__list" }, h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "
|
|
63
|
+
return (h(Host, null, h("nav", { "aria-label": this.label, class: className }, h("ul", { class: "pagination__list", part: "pagination__list" }, h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "pagination__first-page-button", disabled: this.page <= 1, hideLabel: true, icon: "<swirl-icon-double-arrow-left></swirl-icon-double-arrow-left>", intent: "primary", label: this.firstPageButtonLabel, onClick: this.onFirstPageButtonClick })), h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "pagination__prev-button", disabled: this.page <= 1, hideLabel: true, icon: "<swirl-icon-chevron-left></swirl-icon-chevron-left>", intent: "primary", label: this.prevButtonLabel, onClick: this.onPrevButtonClick })), showPageLabel ? (h("li", { class: "pagination__list-item pagination__page-label" }, h("span", null, showDropDown ? (h("span", { "aria-current": "page", class: "pagination__advanced-label" }, h("span", { class: "pagination__page-select-container" }, h("select", { "aria-label": this.pageSelectLabel, class: "pagination__page-select", onChange: this.onSelect }, new Array(this.pages)
|
|
54
64
|
.fill(undefined)
|
|
55
65
|
.map((_, index) => index + 1)
|
|
56
|
-
.map((page) => (h("option", { selected: this.page === page, value: String(page) }, page))))
|
|
66
|
+
.map((page) => (h("option", { selected: this.page === page, value: String(page) }, page))))), h("span", { "aria-hidden": "true" }, this.pageLabel, " ", this.pages))) : (h("span", { "aria-current": "page" }, ariaPageLabel))))) : (h("li", { class: "pagination__list-item" }, h("swirl-visually-hidden", null, h("span", { "aria-current": "page" }, ariaPageLabel)))), h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "pagination__next-button", disabled: this.page >= this.pages, hideLabel: true, icon: "<swirl-icon-chevron-right></swirl-icon-chevron-right>", iconPosition: "end", intent: "primary", label: this.nextButtonLabel, onClick: this.onNextButtonClick })), h("li", { class: "pagination__list-item" }, h("swirl-button", { class: "pagination__last-page-button", disabled: this.page >= this.pages, hideLabel: true, icon: "<swirl-icon-double-arrow-right></swirl-icon-double-arrow-right>", intent: "primary", label: this.lastPageButtonLabel, onClick: this.onLastPageButtonClick }))))));
|
|
57
67
|
}
|
|
58
68
|
static get style() { return swirlPaginationCss; }
|
|
59
69
|
}, [1, "swirl-pagination", {
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"nextButtonLabel": [1, "next-button-label"],
|
|
63
|
-
"pageLabel": [1, "page-label"],
|
|
64
|
-
"prevButtonLabel": [1, "prev-button-label"],
|
|
70
|
+
"firstPageButtonLabel": [1, "first-page-button-label"],
|
|
71
|
+
"lastPageButtonLabel": [1, "last-page-button-label"],
|
|
65
72
|
"label": [1],
|
|
73
|
+
"nextButtonLabel": [1, "next-button-label"],
|
|
66
74
|
"page": [2],
|
|
75
|
+
"pageLabel": [1, "page-label"],
|
|
67
76
|
"pages": [2],
|
|
68
77
|
"pageSelectLabel": [1, "page-select-label"],
|
|
78
|
+
"prevButtonLabel": [1, "prev-button-label"],
|
|
69
79
|
"variant": [1]
|
|
70
80
|
}]);
|
|
71
81
|
function defineCustomElement$1() {
|
|
72
82
|
if (typeof customElements === "undefined") {
|
|
73
83
|
return;
|
|
74
84
|
}
|
|
75
|
-
const components = ["swirl-pagination", "swirl-button", "swirl-
|
|
85
|
+
const components = ["swirl-pagination", "swirl-button", "swirl-visually-hidden"];
|
|
76
86
|
components.forEach(tagName => { switch (tagName) {
|
|
77
87
|
case "swirl-pagination":
|
|
78
88
|
if (!customElements.get(tagName)) {
|
|
@@ -80,11 +90,6 @@ function defineCustomElement$1() {
|
|
|
80
90
|
}
|
|
81
91
|
break;
|
|
82
92
|
case "swirl-button":
|
|
83
|
-
if (!customElements.get(tagName)) {
|
|
84
|
-
defineCustomElement$4();
|
|
85
|
-
}
|
|
86
|
-
break;
|
|
87
|
-
case "swirl-icon-expand-more":
|
|
88
93
|
if (!customElements.get(tagName)) {
|
|
89
94
|
defineCustomElement$3();
|
|
90
95
|
}
|
|
@@ -4,7 +4,7 @@ import { g as getDesktopMediaQuery } from './utils.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './swirl-icon-cancel2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './swirl-icon-search2.js';
|
|
6
6
|
|
|
7
|
-
const swirlSearchCss = ".sc-swirl-search-h{display:flex;width:100%}.sc-swirl-search-h *.sc-swirl-search{box-sizing:border-box}.search.sc-swirl-search{position:relative;display:flex;width:100%}.search--disabled.sc-swirl-search .search__icon.sc-swirl-search{color:var(--s-icon-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search{color:var(--s-text-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search::-moz-placeholder{color:var(--s-text-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search::placeholder{color:var(--s-text-disabled)}.search__icon.sc-swirl-search{position:absolute;top:50%;left:var(--s-space-12);display:inline-flex;color:var(--s-icon-default);transform:translateY(-50%)}.search__input.sc-swirl-search{width:100%;height:2.5rem;padding-top:var(--s-space-8);padding-right:calc(var(--s-space-12) + 1.5rem + var(--s-space-8));padding-bottom:var(--s-space-8);padding-left:calc(var(--s-space-12) + 1.5rem + var(--s-space-8));border:none;border-radius:var(--s-border-radius-base);color:var(--s-text-default);background-color:var(--s-surface-raised-default);font:inherit;line-height:var(--s-line-height-base);caret-color:var(--s-border-highlight)}.search__input.sc-swirl-search:focus:not(:focus-visible){outline:none}.search__input.sc-swirl-search:focus-visible{outline-color:var(--s-focus-default)}.search__input.sc-swirl-search::-moz-placeholder{color:var(--s-text-subdued)}.search__input.sc-swirl-search::placeholder{color:var(--s-text-subdued)}.search__input.sc-swirl-search::-webkit-search-decoration,.search__input.sc-swirl-search::-webkit-search-cancel-button,.search__input.sc-swirl-search::-webkit-search-results-button,.search__input.sc-swirl-search::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.search__input.sc-swirl-search:not(:-moz-placeholder-shown)+.search__clear-button.sc-swirl-search{display:inline-flex}.search__input.sc-swirl-search:not(:placeholder-shown)+.search__clear-button.sc-swirl-search{display:inline-flex}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.search__input.sc-swirl-search{
|
|
7
|
+
const swirlSearchCss = ".sc-swirl-search-h{display:flex;width:100%}.sc-swirl-search-h *.sc-swirl-search{box-sizing:border-box}.search.sc-swirl-search{position:relative;display:flex;width:100%}.search--variant-outline.sc-swirl-search .search__input.sc-swirl-search{background-color:transparent;box-shadow:inset 0 0 0 var(--s-border-width-default) var(--s-border-strong)}.search--disabled.sc-swirl-search .search__icon.sc-swirl-search{color:var(--s-icon-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search{color:var(--s-text-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search::-moz-placeholder{color:var(--s-text-disabled)}.search--disabled.sc-swirl-search .search__input.sc-swirl-search::placeholder{color:var(--s-text-disabled)}.search__icon.sc-swirl-search{position:absolute;top:50%;left:var(--s-space-12);display:inline-flex;color:var(--s-icon-default);transform:translateY(-50%)}.search__input.sc-swirl-search{width:100%;height:2.5rem;padding-top:var(--s-space-8);padding-right:calc(var(--s-space-12) + 1.5rem + var(--s-space-8));padding-bottom:var(--s-space-8);padding-left:calc(var(--s-space-12) + 1.5rem + var(--s-space-8));border:none;border-radius:var(--s-border-radius-base);color:var(--s-text-default);background-color:var(--s-surface-raised-default);font:inherit;line-height:var(--s-line-height-base);caret-color:var(--s-border-highlight)}.search__input.sc-swirl-search:focus:not(:focus-visible){outline:none}.search__input.sc-swirl-search:focus-visible{outline-color:var(--s-focus-default)}.search__input.sc-swirl-search::-moz-placeholder{color:var(--s-text-subdued)}.search__input.sc-swirl-search::placeholder{color:var(--s-text-subdued)}.search__input.sc-swirl-search::-webkit-search-decoration,.search__input.sc-swirl-search::-webkit-search-cancel-button,.search__input.sc-swirl-search::-webkit-search-results-button,.search__input.sc-swirl-search::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.search__input.sc-swirl-search:not(:-moz-placeholder-shown)+.search__clear-button.sc-swirl-search{display:inline-flex}.search__input.sc-swirl-search:not(:placeholder-shown)+.search__clear-button.sc-swirl-search{display:inline-flex}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.search__input.sc-swirl-search{height:2.25rem;padding-left:calc(var(--s-space-8) + 1.5rem + var(--s-space-8));font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.search__clear-button.sc-swirl-search{position:absolute;top:50%;right:var(--s-space-12);display:none;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer;transform:translateY(-50%)}";
|
|
8
8
|
|
|
9
9
|
const SwirlSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -39,6 +39,7 @@ const SwirlSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
39
39
|
this.label = undefined;
|
|
40
40
|
this.placeholder = "Search …";
|
|
41
41
|
this.value = undefined;
|
|
42
|
+
this.variant = "filled";
|
|
42
43
|
}
|
|
43
44
|
componentDidLoad() {
|
|
44
45
|
var _a, _b;
|
|
@@ -63,7 +64,7 @@ const SwirlSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
render() {
|
|
66
|
-
const className = classnames("search", {
|
|
67
|
+
const className = classnames("search", `search--variant-${this.variant}`, {
|
|
67
68
|
"search--disabled": this.disabled,
|
|
68
69
|
});
|
|
69
70
|
return (h(Host, null, h("span", { class: className, ref: (el) => (this.iconEl = el) }, h("swirl-icon-search", { class: "search__icon" }), h("input", { "aria-disabled": this.disabled ? "true" : undefined, "aria-label": this.label, autoComplete: "off", autoFocus: this.autoFocus, class: "search__input", disabled: this.disabled, id: this.inputId, inputMode: "search", name: this.inputName, onBlur: this.onBlur, onChange: this.onChange, onFocus: this.onFocus, placeholder: this.placeholder, ref: (el) => (this.input = el), type: "search", value: this.value }), !this.disabled && (h("button", { "aria-label": this.clearButtonLabel, class: "search__clear-button", onClick: this.clear, type: "button" }, h("swirl-icon-cancel", null))))));
|
|
@@ -77,7 +78,8 @@ const SwirlSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
77
78
|
"inputId": [1, "input-id"],
|
|
78
79
|
"label": [1],
|
|
79
80
|
"placeholder": [1],
|
|
80
|
-
"value": [1025]
|
|
81
|
+
"value": [1025],
|
|
82
|
+
"variant": [1]
|
|
81
83
|
}, [[8, "keydown", "onKeyDown"]]]);
|
|
82
84
|
function defineCustomElement$1() {
|
|
83
85
|
if (typeof customElements === "undefined") {
|