@getflip/swirl-components 0.399.0 → 0.400.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 +15 -1
- package/dist/cjs/swirl-card.cjs.entry.js +1 -1
- package/dist/cjs/swirl-search.cjs.entry.js +4 -2
- package/dist/collection/components/swirl-card/swirl-card.css +4 -0
- package/dist/collection/components/swirl-search/swirl-search.js +18 -2
- package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -4
- package/dist/components/swirl-card.js +1 -1
- package/dist/components/swirl-search.js +4 -2
- package/dist/esm/swirl-card.entry.js +1 -1
- package/dist/esm/swirl-search.entry.js +4 -2
- package/dist/swirl-components/{p-38a18c87.entry.js → p-199c7cf5.entry.js} +1 -1
- package/dist/swirl-components/p-b98cc8ee.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-search/swirl-search.d.ts +2 -1
- package/dist/types/components.d.ts +2 -0
- package/package.json +1 -1
- package/dist/swirl-components/p-68f0deb0.entry.js +0 -1
package/components.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-10-
|
|
2
|
+
"timestamp": "2025-10-30T11:21:46",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.35.0",
|
|
@@ -61026,6 +61026,20 @@
|
|
|
61026
61026
|
],
|
|
61027
61027
|
"methods": [],
|
|
61028
61028
|
"events": [
|
|
61029
|
+
{
|
|
61030
|
+
"event": "clear",
|
|
61031
|
+
"detail": "void",
|
|
61032
|
+
"bubbles": true,
|
|
61033
|
+
"complexType": {
|
|
61034
|
+
"original": "void",
|
|
61035
|
+
"resolved": "void",
|
|
61036
|
+
"references": {}
|
|
61037
|
+
},
|
|
61038
|
+
"cancelable": true,
|
|
61039
|
+
"composed": true,
|
|
61040
|
+
"docs": "",
|
|
61041
|
+
"docsTags": []
|
|
61042
|
+
},
|
|
61029
61043
|
{
|
|
61030
61044
|
"event": "inputBlur",
|
|
61031
61045
|
"detail": "FocusEvent",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var index = require('./index-DAtJPITi.js');
|
|
4
4
|
var index$1 = require('./index-DcAhLZUH.js');
|
|
5
5
|
|
|
6
|
-
const swirlCardCss = ":host{display:contents}:host *{box-sizing:border-box}.card{--swirl-ghost-button-background-default:var(--s-surface-default);--swirl-ghost-button-background-hovered:var(--s-surface-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-pressed);--swirl-resource-list-item-background-default:var(--s-surface-default);--swirl-resource-list-item-background-hovered:var(--s-surface-hovered);--swirl-resource-list-item-background-pressed:var(--s-surface-pressed);position:relative;display:flex;overflow:hidden;width:100%;margin:0;padding:0;border:var(--s-border-width-default) solid var(--s-border-default);border-radius:var(--s-border-radius-base);color:var(--s-text-default);background-color:var(--swirl-card-background-default);font:inherit;text-decoration:none;flex-direction:column;transition:background-color 0.2s}.card:not(.card--has-image) .card__image{overflow:hidden;height:0}a.card,button.card,.card--interactive{cursor:pointer}a.card:hover,button.card:hover,.card--interactive:hover{background-color:var(--swirl-card-background-hovered)}a.card:active,button.card:active,.card--interactive:active{background-color:var(--swirl-card-background-pressed)}a.card:focus:not(:focus-visible),button.card:focus:not(:focus-visible),.card--interactive:focus:not(:focus-visible){outline:none}a.card:focus-visible,button.card:focus-visible,.card--interactive:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-4)}.card--is--borderless{border:0}.card--elevated.card--elevation-level-1{box-shadow:var(--s-shadow-level-1)}.card--elevated.card--elevation-level-2{box-shadow:var(--s-shadow-level-2)}.card--elevated.card--elevation-level-3{box-shadow:var(--s-shadow-level-3)}.card--flashing{background-color:var(--swirl-card-background-pressed)}.card--flashing.card--intent-default-subdued{background-color:var(--s-surface-raised-pressed)}.card--flashing.card--intent-highlight{background-color:var(--s-surface-highlight-pressed)}.card--highlighted{border-width:0.1875rem;border-color:var(--s-border-highlight)}.card--justify-content-start .card__body{justify-content:flex-start}.card--justify-content-center .card__body{justify-content:center}.card--justify-content-end .card__body{justify-content:flex-end}.card--intent-critical-subdued{background-color:var(--s-surface-critical-subdued)}.card--intent-default-subdued{--swirl-resource-list-item-background-default:var(\n --s-surface-raised-default\n );--swirl-resource-list-item-background-hovered:var(\n --s-surface-raised-hovered\n );--swirl-resource-list-item-background-pressed:var(\n --s-surface-raised-pressed\n );--swirl-ghost-button-background-default:var(--s-surface-raised-default);--swirl-ghost-button-background-hovered:var(--s-surface-raised-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-raised-pressed);background-color:var(--s-surface-raised-default)}.card--intent-info-subdued{background-color:var(--s-surface-info-subdued)}.card--intent-success-subdued{background-color:var(--s-surface-success-subdued)}.card--intent-warning-subdued{background-color:var(--s-surface-warning-subdued)}.card--intent-highlight{color:var(--s-text-on-surface-highlight);background-color:var(--s-surface-highlight-default)}.card--has-floating-controls:focus-within .card__floating-controls,.card--has-floating-controls:hover .card__floating-controls{pointer-events:auto;opacity:1}.content-section{padding:0 var(--s-space-16)}.card__image{overflow:hidden;min-height:0}.card__image ::slotted(img){display:inline-flex;width:100%;max-height:100%;-o-object-fit:cover;object-fit:cover}.card__floating-controls{position:absolute;z-index:1;top:0;right:0;padding:var(--s-space-12);transition:opacity 0.2s;pointer-events:none;opacity:0}.card__body{display:flex;min-height:0;padding:var(--s-space-12) var(--s-space-16) var(--s-space-16);flex-grow:1;flex-direction:column;gap:var(--s-space-16)}.card__content{min-height:100%}";
|
|
6
|
+
const swirlCardCss = ":host{display:contents}:host *{box-sizing:border-box}.card{--swirl-ghost-button-background-default:var(--s-surface-default);--swirl-ghost-button-background-hovered:var(--s-surface-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-pressed);--swirl-resource-list-item-background-default:var(--s-surface-default);--swirl-resource-list-item-background-hovered:var(--s-surface-hovered);--swirl-resource-list-item-background-pressed:var(--s-surface-pressed);position:relative;display:flex;overflow:hidden;width:100%;margin:0;padding:0;border:var(--s-border-width-default) solid var(--s-border-default);border-radius:var(--s-border-radius-base);color:var(--s-text-default);background-color:var(--swirl-card-background-default);font:inherit;text-decoration:none;flex-direction:column;transition:background-color 0.2s}.card:not(.card--has-image) .card__image{overflow:hidden;height:0}a.card,button.card,.card--interactive{cursor:pointer}a.card:hover,button.card:hover,.card--interactive:hover{--swirl-avatar-background-color:var(--s-surface-raised-hovered);background-color:var(--swirl-card-background-hovered)}a.card:active,button.card:active,.card--interactive:active{--swirl-avatar-background-color:var(--s-surface-raised-pressed);background-color:var(--swirl-card-background-pressed)}a.card:focus:not(:focus-visible),button.card:focus:not(:focus-visible),.card--interactive:focus:not(:focus-visible){outline:none}a.card:focus-visible,button.card:focus-visible,.card--interactive:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-4)}.card--is--borderless{border:0}.card--elevated.card--elevation-level-1{box-shadow:var(--s-shadow-level-1)}.card--elevated.card--elevation-level-2{box-shadow:var(--s-shadow-level-2)}.card--elevated.card--elevation-level-3{box-shadow:var(--s-shadow-level-3)}.card--flashing{background-color:var(--swirl-card-background-pressed)}.card--flashing.card--intent-default-subdued{background-color:var(--s-surface-raised-pressed)}.card--flashing.card--intent-highlight{background-color:var(--s-surface-highlight-pressed)}.card--highlighted{border-width:0.1875rem;border-color:var(--s-border-highlight)}.card--justify-content-start .card__body{justify-content:flex-start}.card--justify-content-center .card__body{justify-content:center}.card--justify-content-end .card__body{justify-content:flex-end}.card--intent-critical-subdued{background-color:var(--s-surface-critical-subdued)}.card--intent-default-subdued{--swirl-resource-list-item-background-default:var(\n --s-surface-raised-default\n );--swirl-resource-list-item-background-hovered:var(\n --s-surface-raised-hovered\n );--swirl-resource-list-item-background-pressed:var(\n --s-surface-raised-pressed\n );--swirl-ghost-button-background-default:var(--s-surface-raised-default);--swirl-ghost-button-background-hovered:var(--s-surface-raised-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-raised-pressed);background-color:var(--s-surface-raised-default)}.card--intent-info-subdued{background-color:var(--s-surface-info-subdued)}.card--intent-success-subdued{background-color:var(--s-surface-success-subdued)}.card--intent-warning-subdued{background-color:var(--s-surface-warning-subdued)}.card--intent-highlight{color:var(--s-text-on-surface-highlight);background-color:var(--s-surface-highlight-default)}.card--has-floating-controls:focus-within .card__floating-controls,.card--has-floating-controls:hover .card__floating-controls{pointer-events:auto;opacity:1}.content-section{padding:0 var(--s-space-16)}.card__image{overflow:hidden;min-height:0}.card__image ::slotted(img){display:inline-flex;width:100%;max-height:100%;-o-object-fit:cover;object-fit:cover}.card__floating-controls{position:absolute;z-index:1;top:0;right:0;padding:var(--s-space-12);transition:opacity 0.2s;pointer-events:none;opacity:0}.card__body{display:flex;min-height:0;padding:var(--s-space-12) var(--s-space-16) var(--s-space-16);flex-grow:1;flex-direction:column;gap:var(--s-space-16)}.card__content{min-height:100%}";
|
|
7
7
|
|
|
8
8
|
const swirlCardBorderRadiusTokens = ["xs", "sm", "base", "l", "xl"];
|
|
9
9
|
const SwirlCard = class {
|
|
@@ -10,6 +10,7 @@ const swirlSearchCss = ".sc-swirl-search-h{display:flex;width:100%}.sc-swirl-sea
|
|
|
10
10
|
const SwirlSearch = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
+
this.clear = index.createEvent(this, "clear", 7);
|
|
13
14
|
this.inputBlur = index.createEvent(this, "inputBlur", 7);
|
|
14
15
|
this.inputFocus = index.createEvent(this, "inputFocus", 7);
|
|
15
16
|
this.inputInput = index.createEvent(this, "inputInput", 7);
|
|
@@ -19,10 +20,11 @@ const SwirlSearch = class {
|
|
|
19
20
|
this.variant = "filled";
|
|
20
21
|
this.clearable = true;
|
|
21
22
|
this.mediaQueryUnsubscribe = () => { };
|
|
22
|
-
this.
|
|
23
|
+
this.handleClear = () => {
|
|
23
24
|
this.input.value = "";
|
|
24
25
|
this.input.focus();
|
|
25
26
|
this.valueChange.emit("");
|
|
27
|
+
this.clear.emit();
|
|
26
28
|
};
|
|
27
29
|
this.onBlur = (event) => {
|
|
28
30
|
this.inputBlur.emit(event);
|
|
@@ -68,7 +70,7 @@ const SwirlSearch = class {
|
|
|
68
70
|
const className = index$1.classnames("search", `search--variant-${this.variant}`, {
|
|
69
71
|
"search--disabled": this.disabled,
|
|
70
72
|
});
|
|
71
|
-
return (index.h(index.Host, { key: '
|
|
73
|
+
return (index.h(index.Host, { key: '7ed53e6408ea37542f8750b1514bb06b571ee922' }, index.h("span", { key: '2ceb66246fc660fc747525126fccf360afe4e6bb', class: className, ref: (el) => (this.iconEl = el) }, index.h("swirl-icon-search", { key: 'f5fd26fccfb0e7f50b089ed91d5c6e352e257b02', "aria-hidden": "true", class: "search__icon" }), index.h("input", { key: '4d5b4f292822f95acd1a22807746fe60becab707', "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, onInput: this.onInput, placeholder: this.placeholder, ref: (el) => (this.input = el), type: "search", value: this.value }), !this.disabled && this.clearable && (index.h("button", { key: '528cc7c7324c3077b076b112a018a6475bc145de', "aria-label": this.clearButtonLabel, class: "search__clear-button", onClick: this.handleClear, type: "button" }, index.h("swirl-icon-cancel", { key: '51dd9c1df7cfafb2b00b9dced88650734bf64fca' }))))));
|
|
72
74
|
}
|
|
73
75
|
};
|
|
74
76
|
SwirlSearch.style = swirlSearchCss;
|
|
@@ -42,10 +42,14 @@ button.card,
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
a.card:hover, button.card:hover, .card--interactive:hover {
|
|
45
|
+
--swirl-avatar-background-color: var(--s-surface-raised-hovered);
|
|
46
|
+
|
|
45
47
|
background-color: var(--swirl-card-background-hovered);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
a.card:active, button.card:active, .card--interactive:active {
|
|
51
|
+
--swirl-avatar-background-color: var(--s-surface-raised-pressed);
|
|
52
|
+
|
|
49
53
|
background-color: var(--swirl-card-background-pressed);
|
|
50
54
|
}
|
|
51
55
|
|
|
@@ -8,10 +8,11 @@ export class SwirlSearch {
|
|
|
8
8
|
this.variant = "filled";
|
|
9
9
|
this.clearable = true;
|
|
10
10
|
this.mediaQueryUnsubscribe = () => { };
|
|
11
|
-
this.
|
|
11
|
+
this.handleClear = () => {
|
|
12
12
|
this.input.value = "";
|
|
13
13
|
this.input.focus();
|
|
14
14
|
this.valueChange.emit("");
|
|
15
|
+
this.clear.emit();
|
|
15
16
|
};
|
|
16
17
|
this.onBlur = (event) => {
|
|
17
18
|
this.inputBlur.emit(event);
|
|
@@ -57,7 +58,7 @@ export class SwirlSearch {
|
|
|
57
58
|
const className = classnames("search", `search--variant-${this.variant}`, {
|
|
58
59
|
"search--disabled": this.disabled,
|
|
59
60
|
});
|
|
60
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: '7ed53e6408ea37542f8750b1514bb06b571ee922' }, h("span", { key: '2ceb66246fc660fc747525126fccf360afe4e6bb', class: className, ref: (el) => (this.iconEl = el) }, h("swirl-icon-search", { key: 'f5fd26fccfb0e7f50b089ed91d5c6e352e257b02', "aria-hidden": "true", class: "search__icon" }), h("input", { key: '4d5b4f292822f95acd1a22807746fe60becab707', "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, onInput: this.onInput, placeholder: this.placeholder, ref: (el) => (this.input = el), type: "search", value: this.value }), !this.disabled && this.clearable && (h("button", { key: '528cc7c7324c3077b076b112a018a6475bc145de', "aria-label": this.clearButtonLabel, class: "search__clear-button", onClick: this.handleClear, type: "button" }, h("swirl-icon-cancel", { key: '51dd9c1df7cfafb2b00b9dced88650734bf64fca' }))))));
|
|
61
62
|
}
|
|
62
63
|
static get is() { return "swirl-search"; }
|
|
63
64
|
static get encapsulation() { return "scoped"; }
|
|
@@ -277,6 +278,21 @@ export class SwirlSearch {
|
|
|
277
278
|
}
|
|
278
279
|
static get events() {
|
|
279
280
|
return [{
|
|
281
|
+
"method": "clear",
|
|
282
|
+
"name": "clear",
|
|
283
|
+
"bubbles": true,
|
|
284
|
+
"cancelable": true,
|
|
285
|
+
"composed": true,
|
|
286
|
+
"docs": {
|
|
287
|
+
"tags": [],
|
|
288
|
+
"text": ""
|
|
289
|
+
},
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "void",
|
|
292
|
+
"resolved": "void",
|
|
293
|
+
"references": {}
|
|
294
|
+
}
|
|
295
|
+
}, {
|
|
280
296
|
"method": "inputBlur",
|
|
281
297
|
"name": "inputBlur",
|
|
282
298
|
"bubbles": true,
|