@getflip/swirl-components 0.37.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 +233 -21
- package/dist/cjs/loader.cjs.js +1 -1
- 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/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/swirl-box/swirl-box.js +104 -0
- package/dist/collection/components/swirl-console-layout/swirl-console-layout.css +1 -1
- 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/components/assets/pdfjs/pdf.worker.min.js +1 -1
- 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/esm/loader.js +1 -1
- 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/swirl-components/{p-428a2076.entry.js → p-30e7d460.entry.js} +1 -1
- package/dist/swirl-components/p-3c2325ba.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.d.ts +16 -4
- package/package.json +1 -1
- package/vscode-data.json +147 -3
- package/dist/swirl-components/p-774483bc.entry.js +0 -1
- package/dist/swirl-components/p-968773d7.entry.js +0 -1
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"./components/swirl-popover/swirl-popover.js",
|
|
29
29
|
"./components/swirl-progress-indicator/swirl-progress-indicator.js",
|
|
30
30
|
"./components/swirl-radio/swirl-radio.js",
|
|
31
|
+
"./components/swirl-search/swirl-search.js",
|
|
31
32
|
"./components/swirl-separator/swirl-separator.js",
|
|
32
33
|
"./components/swirl-skeleton-box/swirl-skeleton-box.js",
|
|
33
34
|
"./components/swirl-skeleton-text/swirl-skeleton-text.js",
|
|
@@ -172,7 +173,6 @@
|
|
|
172
173
|
"./components/swirl-resource-list/swirl-resource-list.js",
|
|
173
174
|
"./components/swirl-resource-list-file-item/swirl-resource-list-file-item.js",
|
|
174
175
|
"./components/swirl-resource-list-item/swirl-resource-list-item.js",
|
|
175
|
-
"./components/swirl-search/swirl-search.js",
|
|
176
176
|
"./components/swirl-select/swirl-select.js",
|
|
177
177
|
"./components/swirl-shell-layout/swirl-shell-layout.js",
|
|
178
178
|
"./components/swirl-shell-navigation-item/swirl-shell-navigation-item.js",
|
|
@@ -12,6 +12,10 @@ export class SwirlBox {
|
|
|
12
12
|
this.maxWidth = undefined;
|
|
13
13
|
this.overflow = "visible";
|
|
14
14
|
this.padding = "0";
|
|
15
|
+
this.paddingBlockEnd = undefined;
|
|
16
|
+
this.paddingBlockStart = undefined;
|
|
17
|
+
this.paddingInlineEnd = undefined;
|
|
18
|
+
this.paddingInlineStart = undefined;
|
|
15
19
|
}
|
|
16
20
|
render() {
|
|
17
21
|
const styles = {
|
|
@@ -21,6 +25,18 @@ export class SwirlBox {
|
|
|
21
25
|
justifyContent: this.centerInline ? "center" : undefined,
|
|
22
26
|
overflow: this.overflow,
|
|
23
27
|
padding: `var(--s-space-${this.padding})`,
|
|
28
|
+
paddingBlockEnd: Boolean(this.paddingBlockEnd)
|
|
29
|
+
? `var(--s-space-${this.paddingBlockEnd})`
|
|
30
|
+
: undefined,
|
|
31
|
+
paddingBlockStart: Boolean(this.paddingBlockStart)
|
|
32
|
+
? `var(--s-space-${this.paddingBlockStart})`
|
|
33
|
+
: undefined,
|
|
34
|
+
paddingInlineEnd: Boolean(this.paddingInlineEnd)
|
|
35
|
+
? `var(--s-space-${this.paddingInlineEnd})`
|
|
36
|
+
: undefined,
|
|
37
|
+
paddingInlineStart: Boolean(this.paddingInlineStart)
|
|
38
|
+
? `var(--s-space-${this.paddingInlineStart})`
|
|
39
|
+
: undefined,
|
|
24
40
|
position: Boolean(this.overflow) ? "relative" : "",
|
|
25
41
|
maxWidth: this.maxWidth,
|
|
26
42
|
width: this.cover ? "100%" : undefined,
|
|
@@ -175,6 +191,94 @@ export class SwirlBox {
|
|
|
175
191
|
"attribute": "padding",
|
|
176
192
|
"reflect": false,
|
|
177
193
|
"defaultValue": "\"0\""
|
|
194
|
+
},
|
|
195
|
+
"paddingBlockEnd": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"mutable": false,
|
|
198
|
+
"complexType": {
|
|
199
|
+
"original": "SwirlBoxPadding",
|
|
200
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"20\" | \"24\" | \"32\" | \"4\" | \"8\"",
|
|
201
|
+
"references": {
|
|
202
|
+
"SwirlBoxPadding": {
|
|
203
|
+
"location": "local",
|
|
204
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-box/swirl-box.tsx"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"required": false,
|
|
209
|
+
"optional": true,
|
|
210
|
+
"docs": {
|
|
211
|
+
"tags": [],
|
|
212
|
+
"text": ""
|
|
213
|
+
},
|
|
214
|
+
"attribute": "padding-block-end",
|
|
215
|
+
"reflect": false
|
|
216
|
+
},
|
|
217
|
+
"paddingBlockStart": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"mutable": false,
|
|
220
|
+
"complexType": {
|
|
221
|
+
"original": "SwirlBoxPadding",
|
|
222
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"20\" | \"24\" | \"32\" | \"4\" | \"8\"",
|
|
223
|
+
"references": {
|
|
224
|
+
"SwirlBoxPadding": {
|
|
225
|
+
"location": "local",
|
|
226
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-box/swirl-box.tsx"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": true,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": ""
|
|
235
|
+
},
|
|
236
|
+
"attribute": "padding-block-start",
|
|
237
|
+
"reflect": false
|
|
238
|
+
},
|
|
239
|
+
"paddingInlineEnd": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"mutable": false,
|
|
242
|
+
"complexType": {
|
|
243
|
+
"original": "SwirlBoxPadding",
|
|
244
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"20\" | \"24\" | \"32\" | \"4\" | \"8\"",
|
|
245
|
+
"references": {
|
|
246
|
+
"SwirlBoxPadding": {
|
|
247
|
+
"location": "local",
|
|
248
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-box/swirl-box.tsx"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"required": false,
|
|
253
|
+
"optional": true,
|
|
254
|
+
"docs": {
|
|
255
|
+
"tags": [],
|
|
256
|
+
"text": ""
|
|
257
|
+
},
|
|
258
|
+
"attribute": "padding-inline-end",
|
|
259
|
+
"reflect": false
|
|
260
|
+
},
|
|
261
|
+
"paddingInlineStart": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"mutable": false,
|
|
264
|
+
"complexType": {
|
|
265
|
+
"original": "SwirlBoxPadding",
|
|
266
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"20\" | \"24\" | \"32\" | \"4\" | \"8\"",
|
|
267
|
+
"references": {
|
|
268
|
+
"SwirlBoxPadding": {
|
|
269
|
+
"location": "local",
|
|
270
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-box/swirl-box.tsx"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": true,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [],
|
|
278
|
+
"text": ""
|
|
279
|
+
},
|
|
280
|
+
"attribute": "padding-inline-start",
|
|
281
|
+
"reflect": false
|
|
178
282
|
}
|
|
179
283
|
};
|
|
180
284
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
|
-
width:
|
|
3
|
+
width: -webkit-fit-content;
|
|
4
|
+
width: -moz-fit-content;
|
|
5
|
+
width: fit-content;
|
|
4
6
|
}
|
|
5
7
|
|
|
6
8
|
:host * {
|
|
@@ -24,18 +26,21 @@
|
|
|
24
26
|
align-items: center;
|
|
25
27
|
line-height: var(--s-line-height-base);
|
|
26
28
|
list-style: none;
|
|
27
|
-
gap: var(--s-space-16);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px) {
|
|
31
32
|
|
|
32
33
|
.pagination__list {
|
|
33
34
|
font-size: var(--s-font-size-sm);
|
|
34
|
-
line-height: var(--s-line-height-sm)
|
|
35
|
-
gap: var(--s-space-8)
|
|
35
|
+
line-height: var(--s-line-height-sm)
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
.pagination__page-label {
|
|
40
|
+
padding-right: var(--s-space-8);
|
|
41
|
+
padding-left: var(--s-space-8);
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
.pagination__advanced-label {
|
|
40
45
|
display: flex;
|
|
41
46
|
align-items: center;
|
|
@@ -49,13 +54,18 @@
|
|
|
49
54
|
|
|
50
55
|
.pagination__page-select {
|
|
51
56
|
display: inline-flex;
|
|
57
|
+
padding-top: var(--s-space-8);
|
|
52
58
|
padding-right: var(--s-space-16);
|
|
59
|
+
padding-bottom: var(--s-space-8);
|
|
60
|
+
padding-left: var(--s-space-16);
|
|
53
61
|
border: none;
|
|
62
|
+
border-radius: var(--s-border-radius-sm);
|
|
54
63
|
background-color: transparent;
|
|
55
64
|
font: inherit;
|
|
56
65
|
line-height: var(--s-line-height-base);
|
|
57
66
|
text-align: center;
|
|
58
67
|
cursor: pointer;
|
|
68
|
+
box-shadow: inset 0 0 0 var(--s-border-width-default) var(--s-border-strong);
|
|
59
69
|
-webkit-appearance: none;
|
|
60
70
|
-moz-appearance: none;
|
|
61
71
|
appearance: none;
|
|
@@ -69,10 +79,10 @@
|
|
|
69
79
|
outline-color: var(--s-focus-default);
|
|
70
80
|
}
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
pointer-events: none;
|
|
82
|
+
@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px) {
|
|
83
|
+
|
|
84
|
+
.pagination__page-select {
|
|
85
|
+
font-size: var(--s-font-size-sm);
|
|
86
|
+
line-height: var(--s-line-height-sm)
|
|
78
87
|
}
|
|
88
|
+
}
|
|
@@ -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
|
}
|