@spectrum-web-components/search 0.11.4 → 0.11.6-devmode.7
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/package.json +25 -12
- package/sp-search.dev.js +3 -0
- package/sp-search.dev.js.map +7 -0
- package/sp-search.js +3 -14
- package/sp-search.js.map +7 -1
- package/src/Search.dev.js +111 -0
- package/src/Search.dev.js.map +7 -0
- package/src/Search.js +85 -94
- package/src/Search.js.map +7 -1
- package/src/index.dev.js +2 -0
- package/src/index.dev.js.map +7 -0
- package/src/index.js +2 -13
- package/src/index.js.map +7 -1
- package/src/search.css.dev.js +51 -0
- package/src/search.css.dev.js.map +7 -0
- package/src/search.css.js +3 -14
- package/src/search.css.js.map +7 -1
- package/src/spectrum-search.css.dev.js +51 -0
- package/src/spectrum-search.css.dev.js.map +7 -0
- package/src/spectrum-search.css.js +3 -14
- package/src/spectrum-search.css.js.map +7 -1
- package/stories/search.stories.js +8 -19
- package/stories/search.stories.js.map +7 -1
- package/test/benchmark/test-basic.js +6 -17
- package/test/benchmark/test-basic.js.map +7 -1
- package/test/search.test-vrt.js +4 -15
- package/test/search.test-vrt.js.map +7 -1
- package/test/search.test.js +116 -129
- package/test/search.test.js.map +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/search",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.6-devmode.7+8303f3a2a",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -20,11 +20,24 @@
|
|
|
20
20
|
"module": "./src/index.js",
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
|
-
".":
|
|
24
|
-
|
|
23
|
+
".": {
|
|
24
|
+
"development": "./src/index.dev.js",
|
|
25
|
+
"default": "./src/index.js"
|
|
26
|
+
},
|
|
25
27
|
"./package.json": "./package.json",
|
|
26
|
-
"./
|
|
27
|
-
|
|
28
|
+
"./src/Search.js": {
|
|
29
|
+
"development": "./src/Search.dev.js",
|
|
30
|
+
"default": "./src/Search.js"
|
|
31
|
+
},
|
|
32
|
+
"./src/index.js": {
|
|
33
|
+
"development": "./src/index.dev.js",
|
|
34
|
+
"default": "./src/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./src/search.css.js": "./src/search.css.js",
|
|
37
|
+
"./sp-search.js": {
|
|
38
|
+
"development": "./sp-search.dev.js",
|
|
39
|
+
"default": "./sp-search.js"
|
|
40
|
+
}
|
|
28
41
|
},
|
|
29
42
|
"scripts": {
|
|
30
43
|
"test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
|
|
@@ -44,20 +57,20 @@
|
|
|
44
57
|
"lit-html"
|
|
45
58
|
],
|
|
46
59
|
"dependencies": {
|
|
47
|
-
"@spectrum-web-components/base": "^0.5.
|
|
48
|
-
"@spectrum-web-components/button": "^0.
|
|
49
|
-
"@spectrum-web-components/icon": "^0.11.
|
|
50
|
-
"@spectrum-web-components/icons-workflow": "^0.8.
|
|
51
|
-
"@spectrum-web-components/textfield": "^0.11.
|
|
60
|
+
"@spectrum-web-components/base": "^0.5.9-devmode.31+8303f3a2a",
|
|
61
|
+
"@spectrum-web-components/button": "^0.18.1-devmode.7+8303f3a2a",
|
|
62
|
+
"@spectrum-web-components/icon": "^0.11.12-devmode.7+8303f3a2a",
|
|
63
|
+
"@spectrum-web-components/icons-workflow": "^0.8.12-devmode.7+8303f3a2a",
|
|
64
|
+
"@spectrum-web-components/textfield": "^0.11.11-devmode.7+8303f3a2a",
|
|
52
65
|
"tslib": "^2.0.0"
|
|
53
66
|
},
|
|
54
67
|
"devDependencies": {
|
|
55
|
-
"@spectrum-css/search": "^4.2.
|
|
68
|
+
"@spectrum-css/search": "^4.2.12"
|
|
56
69
|
},
|
|
57
70
|
"types": "./src/index.d.ts",
|
|
58
71
|
"customElements": "custom-elements.json",
|
|
59
72
|
"sideEffects": [
|
|
60
73
|
"./sp-*.js"
|
|
61
74
|
],
|
|
62
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "8303f3a2a90b0aedc15158797662ccfa8f4a2031"
|
|
63
76
|
}
|
package/sp-search.dev.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sp-search.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Search } from './src/Search.dev.js'\n\ncustomElements.define('sp-search', Search);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-search': Search;\n }\n}\n"],
|
|
5
|
+
"mappings": "AAWA;AAEA,eAAe,OAAO,aAAa,MAAM;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/sp-search.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { Search } from './src/Search.js';
|
|
13
|
-
customElements.define('sp-search', Search);
|
|
14
|
-
//# sourceMappingURL=sp-search.js.map
|
|
1
|
+
import { Search } from "./src/Search.js";
|
|
2
|
+
customElements.define("sp-search", Search);
|
|
3
|
+
//# sourceMappingURL=sp-search.js.map
|
package/sp-search.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sp-search.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Search } from './src/Search.js';\n\ncustomElements.define('sp-search', Search);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-search': Search;\n }\n}\n"],
|
|
5
|
+
"mappings": "AAWA;AAEA,eAAe,OAAO,aAAa,MAAM;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result)
|
|
9
|
+
__defProp(target, key, result);
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
import {
|
|
13
|
+
html
|
|
14
|
+
} from "@spectrum-web-components/base";
|
|
15
|
+
import {
|
|
16
|
+
property,
|
|
17
|
+
query
|
|
18
|
+
} from "@spectrum-web-components/base/src/decorators.js";
|
|
19
|
+
import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
|
|
20
|
+
import { Textfield } from "@spectrum-web-components/textfield";
|
|
21
|
+
import "@spectrum-web-components/button/sp-clear-button.js";
|
|
22
|
+
import "@spectrum-web-components/icons-workflow/icons/sp-icon-magnify.js";
|
|
23
|
+
import searchStyles from "./search.css.js";
|
|
24
|
+
const stopPropagation = (event) => event.stopPropagation();
|
|
25
|
+
export class Search extends Textfield {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.action = "";
|
|
29
|
+
this.label = "Search";
|
|
30
|
+
this.placeholder = "Search";
|
|
31
|
+
}
|
|
32
|
+
static get styles() {
|
|
33
|
+
return [...super.styles, searchStyles];
|
|
34
|
+
}
|
|
35
|
+
handleSubmit(event) {
|
|
36
|
+
const applyDefault = this.dispatchEvent(new Event("submit", {
|
|
37
|
+
cancelable: true,
|
|
38
|
+
bubbles: true
|
|
39
|
+
}));
|
|
40
|
+
if (!applyDefault) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
handleKeydown(event) {
|
|
45
|
+
const { code } = event;
|
|
46
|
+
if (!this.value || code !== "Escape") {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.reset();
|
|
50
|
+
}
|
|
51
|
+
async reset() {
|
|
52
|
+
this.value = "";
|
|
53
|
+
await this.updateComplete;
|
|
54
|
+
this.focusElement.dispatchEvent(new InputEvent("input", {
|
|
55
|
+
bubbles: true,
|
|
56
|
+
composed: true
|
|
57
|
+
}));
|
|
58
|
+
this.focusElement.dispatchEvent(new InputEvent("change", {
|
|
59
|
+
bubbles: true
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
renderField() {
|
|
63
|
+
return html`
|
|
64
|
+
<form
|
|
65
|
+
action=${this.action}
|
|
66
|
+
id="form"
|
|
67
|
+
method=${ifDefined(this.method)}
|
|
68
|
+
@submit=${this.handleSubmit}
|
|
69
|
+
@reset=${this.reset}
|
|
70
|
+
@keydown=${this.handleKeydown}
|
|
71
|
+
>
|
|
72
|
+
<sp-icon-magnify
|
|
73
|
+
class="icon magnifier icon-workflow"
|
|
74
|
+
></sp-icon-magnify>
|
|
75
|
+
${super.renderField()}
|
|
76
|
+
${this.value ? html`
|
|
77
|
+
<sp-clear-button
|
|
78
|
+
id="button"
|
|
79
|
+
label="Reset"
|
|
80
|
+
tabindex="-1"
|
|
81
|
+
type="reset"
|
|
82
|
+
@keydown=${stopPropagation}
|
|
83
|
+
></sp-clear-button>
|
|
84
|
+
` : html``}
|
|
85
|
+
</form>
|
|
86
|
+
`;
|
|
87
|
+
}
|
|
88
|
+
firstUpdated(changedProperties) {
|
|
89
|
+
super.firstUpdated(changedProperties);
|
|
90
|
+
this.inputElement.setAttribute("type", "search");
|
|
91
|
+
}
|
|
92
|
+
willUpdate() {
|
|
93
|
+
this.multiline = false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
__decorateClass([
|
|
97
|
+
property()
|
|
98
|
+
], Search.prototype, "action", 2);
|
|
99
|
+
__decorateClass([
|
|
100
|
+
property()
|
|
101
|
+
], Search.prototype, "label", 2);
|
|
102
|
+
__decorateClass([
|
|
103
|
+
property()
|
|
104
|
+
], Search.prototype, "method", 2);
|
|
105
|
+
__decorateClass([
|
|
106
|
+
property()
|
|
107
|
+
], Search.prototype, "placeholder", 2);
|
|
108
|
+
__decorateClass([
|
|
109
|
+
query("#form")
|
|
110
|
+
], Search.prototype, "form", 2);
|
|
111
|
+
//# sourceMappingURL=Search.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["Search.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport { Textfield } from '@spectrum-web-components/textfield';\nimport '@spectrum-web-components/button/sp-clear-button.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-magnify.js';\n\nimport searchStyles from './search.css.js';\n\nconst stopPropagation = (event: Event): void => event.stopPropagation();\n\n/**\n * @element sp-search\n * @slot help-text - default or non-negative help text to associate to your form element\n * @slot negative-help-text - negative help text to associate to your form element when `invalid`\n *\n * @fires submit - The search form has been submitted.\n */\nexport class Search extends Textfield {\n public static override get styles(): CSSResultArray {\n return [...super.styles, searchStyles];\n }\n\n @property()\n public action = '';\n\n @property()\n public override label = 'Search';\n\n @property()\n public method?: 'GET' | 'POST' | 'dialog';\n\n @property()\n public override placeholder = 'Search';\n\n @query('#form')\n public form!: HTMLFormElement;\n\n private handleSubmit(event: Event): void {\n const applyDefault = this.dispatchEvent(\n new Event('submit', {\n cancelable: true,\n bubbles: true,\n })\n );\n if (!applyDefault) {\n event.preventDefault();\n }\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n const { code } = event;\n if (!this.value || code !== 'Escape') {\n return;\n }\n this.reset();\n }\n\n public async reset(): Promise<void> {\n this.value = '';\n await this.updateComplete;\n this.focusElement.dispatchEvent(\n new InputEvent('input', {\n bubbles: true,\n composed: true,\n })\n );\n // The native `change` event on an `input` element is not composed,\n // so this synthetic replication of a `change` event must not be\n // either as the `Textfield` baseclass should only need to handle\n // the native variant of this interaction.\n this.focusElement.dispatchEvent(\n new InputEvent('change', {\n bubbles: true,\n })\n );\n }\n\n protected override renderField(): TemplateResult {\n return html`\n <form\n action=${this.action}\n id=\"form\"\n method=${ifDefined(this.method)}\n @submit=${this.handleSubmit}\n @reset=${this.reset}\n @keydown=${this.handleKeydown}\n >\n <sp-icon-magnify\n class=\"icon magnifier icon-workflow\"\n ></sp-icon-magnify>\n ${super.renderField()}\n ${this.value\n ? html`\n <sp-clear-button\n id=\"button\"\n label=\"Reset\"\n tabindex=\"-1\"\n type=\"reset\"\n @keydown=${stopPropagation}\n ></sp-clear-button>\n `\n : html``}\n </form>\n `;\n }\n\n public override firstUpdated(changedProperties: PropertyValues): void {\n super.firstUpdated(changedProperties);\n this.inputElement.setAttribute('type', 'search');\n }\n\n public override willUpdate(): void {\n this.multiline = false;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;AAIA;AAEA;AACA;AACA;AAEA;AAEA,MAAM,kBAAkB,CAAC,UAAuB,MAAM,gBAAgB;AAS/D,aAAM,eAAe,UAAU;AAAA,EAA/B;AAAA;AAMI,kBAAS;AAGA,iBAAQ;AAMR,uBAAc;AAAA;AAAA,aAdH,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,QAAQ,YAAY;AAAA,EACzC;AAAA,EAiBQ,aAAa,OAAoB;AACrC,UAAM,eAAe,KAAK,cACtB,IAAI,MAAM,UAAU;AAAA,MAChB,YAAY;AAAA,MACZ,SAAS;AAAA,IACb,CAAC,CACL;AACA,QAAI,CAAC,cAAc;AACf,YAAM,eAAe;AAAA,IACzB;AAAA,EACJ;AAAA,EAEQ,cAAc,OAA4B;AAC9C,UAAM,EAAE,SAAS;AACjB,QAAI,CAAC,KAAK,SAAS,SAAS,UAAU;AAClC;AAAA,IACJ;AACA,SAAK,MAAM;AAAA,EACf;AAAA,QAEa,QAAuB;AAChC,SAAK,QAAQ;AACb,UAAM,KAAK;AACX,SAAK,aAAa,cACd,IAAI,WAAW,SAAS;AAAA,MACpB,SAAS;AAAA,MACT,UAAU;AAAA,IACd,CAAC,CACL;AAKA,SAAK,aAAa,cACd,IAAI,WAAW,UAAU;AAAA,MACrB,SAAS;AAAA,IACb,CAAC,CACL;AAAA,EACJ;AAAA,EAEmB,cAA8B;AAC7C,WAAO;AAAA;AAAA,yBAEU,KAAK;AAAA;AAAA,yBAEL,UAAU,KAAK,MAAM;AAAA,0BACpB,KAAK;AAAA,yBACN,KAAK;AAAA,2BACH,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKd,MAAM,YAAY;AAAA,kBAClB,KAAK,QACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yCAMmB;AAAA;AAAA,0BAGnB;AAAA;AAAA;AAAA,EAGlB;AAAA,EAEgB,aAAa,mBAAyC;AAClE,UAAM,aAAa,iBAAiB;AACpC,SAAK,aAAa,aAAa,QAAQ,QAAQ;AAAA,EACnD;AAAA,EAEgB,aAAmB;AAC/B,SAAK,YAAY;AAAA,EACrB;AACJ;AA3FW;AAAA,EADP,AAAC,SAAS;AAAA,GACH,AANJ,OAMI;AAGS;AAAA,EADhB,AAAC,SAAS;AAAA,GACM,AATb,OASa;AAGT;AAAA,EADP,AAAC,SAAS;AAAA,GACH,AAZJ,OAYI;AAGS;AAAA,EADhB,AAAC,SAAS;AAAA,GACM,AAfb,OAea;AAGT;AAAA,EADP,AAAC,MAAM,OAAO;AAAA,GACP,AAlBJ,OAkBI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/Search.js
CHANGED
|
@@ -1,73 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result)
|
|
9
|
+
__defProp(target, key, result);
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
import {
|
|
13
|
+
html
|
|
14
|
+
} from "@spectrum-web-components/base";
|
|
15
|
+
import {
|
|
16
|
+
property,
|
|
17
|
+
query
|
|
18
|
+
} from "@spectrum-web-components/base/src/decorators.js";
|
|
19
|
+
import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
|
|
20
|
+
import { Textfield } from "@spectrum-web-components/textfield";
|
|
21
|
+
import "@spectrum-web-components/button/sp-clear-button.js";
|
|
22
|
+
import "@spectrum-web-components/icons-workflow/icons/sp-icon-magnify.js";
|
|
23
|
+
import searchStyles from "./search.css.js";
|
|
20
24
|
const stopPropagation = (event) => event.stopPropagation();
|
|
21
|
-
/**
|
|
22
|
-
* @element sp-search
|
|
23
|
-
* @slot help-text - default or non-negative help text to associate to your form element
|
|
24
|
-
* @slot negative-help-text - negative help text to associate to your form element when `invalid`
|
|
25
|
-
*
|
|
26
|
-
* @fires submit - The search form has been submitted.
|
|
27
|
-
*/
|
|
28
25
|
export class Search extends Textfield {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.action = "";
|
|
29
|
+
this.label = "Search";
|
|
30
|
+
this.placeholder = "Search";
|
|
31
|
+
}
|
|
32
|
+
static get styles() {
|
|
33
|
+
return [...super.styles, searchStyles];
|
|
34
|
+
}
|
|
35
|
+
handleSubmit(event) {
|
|
36
|
+
const applyDefault = this.dispatchEvent(new Event("submit", {
|
|
37
|
+
cancelable: true,
|
|
38
|
+
bubbles: true
|
|
39
|
+
}));
|
|
40
|
+
if (!applyDefault) {
|
|
41
|
+
event.preventDefault();
|
|
34
42
|
}
|
|
35
|
-
|
|
36
|
-
|
|
43
|
+
}
|
|
44
|
+
handleKeydown(event) {
|
|
45
|
+
const { code } = event;
|
|
46
|
+
if (!this.value || code !== "Escape") {
|
|
47
|
+
return;
|
|
37
48
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
async reset() {
|
|
55
|
-
this.value = '';
|
|
56
|
-
await this.updateComplete;
|
|
57
|
-
this.focusElement.dispatchEvent(new InputEvent('input', {
|
|
58
|
-
bubbles: true,
|
|
59
|
-
composed: true,
|
|
60
|
-
}));
|
|
61
|
-
// The native `change` event on an `input` element is not composed,
|
|
62
|
-
// so this synthetic replication of a `change` event must not be
|
|
63
|
-
// either as the `Textfield` baseclass should only need to handle
|
|
64
|
-
// the native variant of this interaction.
|
|
65
|
-
this.focusElement.dispatchEvent(new InputEvent('change', {
|
|
66
|
-
bubbles: true,
|
|
67
|
-
}));
|
|
68
|
-
}
|
|
69
|
-
renderField() {
|
|
70
|
-
return html `
|
|
49
|
+
this.reset();
|
|
50
|
+
}
|
|
51
|
+
async reset() {
|
|
52
|
+
this.value = "";
|
|
53
|
+
await this.updateComplete;
|
|
54
|
+
this.focusElement.dispatchEvent(new InputEvent("input", {
|
|
55
|
+
bubbles: true,
|
|
56
|
+
composed: true
|
|
57
|
+
}));
|
|
58
|
+
this.focusElement.dispatchEvent(new InputEvent("change", {
|
|
59
|
+
bubbles: true
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
renderField() {
|
|
63
|
+
return html`
|
|
71
64
|
<form
|
|
72
65
|
action=${this.action}
|
|
73
66
|
id="form"
|
|
@@ -80,8 +73,7 @@ export class Search extends Textfield {
|
|
|
80
73
|
class="icon magnifier icon-workflow"
|
|
81
74
|
></sp-icon-magnify>
|
|
82
75
|
${super.renderField()}
|
|
83
|
-
${this.value
|
|
84
|
-
? html `
|
|
76
|
+
${this.value ? html`
|
|
85
77
|
<sp-clear-button
|
|
86
78
|
id="button"
|
|
87
79
|
label="Reset"
|
|
@@ -89,32 +81,31 @@ export class Search extends Textfield {
|
|
|
89
81
|
type="reset"
|
|
90
82
|
@keydown=${stopPropagation}
|
|
91
83
|
></sp-clear-button>
|
|
92
|
-
`
|
|
93
|
-
: html ``}
|
|
84
|
+
` : html``}
|
|
94
85
|
</form>
|
|
95
86
|
`;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
87
|
+
}
|
|
88
|
+
firstUpdated(changedProperties) {
|
|
89
|
+
super.firstUpdated(changedProperties);
|
|
90
|
+
this.inputElement.setAttribute("type", "search");
|
|
91
|
+
}
|
|
92
|
+
willUpdate() {
|
|
93
|
+
this.multiline = false;
|
|
94
|
+
}
|
|
104
95
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
], Search.prototype, "action",
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
], Search.prototype, "label",
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
], Search.prototype, "method",
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
], Search.prototype, "placeholder",
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
], Search.prototype, "form",
|
|
120
|
-
//# sourceMappingURL=Search.js.map
|
|
96
|
+
__decorateClass([
|
|
97
|
+
property()
|
|
98
|
+
], Search.prototype, "action", 2);
|
|
99
|
+
__decorateClass([
|
|
100
|
+
property()
|
|
101
|
+
], Search.prototype, "label", 2);
|
|
102
|
+
__decorateClass([
|
|
103
|
+
property()
|
|
104
|
+
], Search.prototype, "method", 2);
|
|
105
|
+
__decorateClass([
|
|
106
|
+
property()
|
|
107
|
+
], Search.prototype, "placeholder", 2);
|
|
108
|
+
__decorateClass([
|
|
109
|
+
query("#form")
|
|
110
|
+
], Search.prototype, "form", 2);
|
|
111
|
+
//# sourceMappingURL=Search.js.map
|
package/src/Search.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["Search.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n html,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\n\nimport { Textfield } from '@spectrum-web-components/textfield';\nimport '@spectrum-web-components/button/sp-clear-button.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-magnify.js';\n\nimport searchStyles from './search.css.js';\n\nconst stopPropagation = (event: Event): void => event.stopPropagation();\n\n/**\n * @element sp-search\n * @slot help-text - default or non-negative help text to associate to your form element\n * @slot negative-help-text - negative help text to associate to your form element when `invalid`\n *\n * @fires submit - The search form has been submitted.\n */\nexport class Search extends Textfield {\n public static override get styles(): CSSResultArray {\n return [...super.styles, searchStyles];\n }\n\n @property()\n public action = '';\n\n @property()\n public override label = 'Search';\n\n @property()\n public method?: 'GET' | 'POST' | 'dialog';\n\n @property()\n public override placeholder = 'Search';\n\n @query('#form')\n public form!: HTMLFormElement;\n\n private handleSubmit(event: Event): void {\n const applyDefault = this.dispatchEvent(\n new Event('submit', {\n cancelable: true,\n bubbles: true,\n })\n );\n if (!applyDefault) {\n event.preventDefault();\n }\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n const { code } = event;\n if (!this.value || code !== 'Escape') {\n return;\n }\n this.reset();\n }\n\n public async reset(): Promise<void> {\n this.value = '';\n await this.updateComplete;\n this.focusElement.dispatchEvent(\n new InputEvent('input', {\n bubbles: true,\n composed: true,\n })\n );\n // The native `change` event on an `input` element is not composed,\n // so this synthetic replication of a `change` event must not be\n // either as the `Textfield` baseclass should only need to handle\n // the native variant of this interaction.\n this.focusElement.dispatchEvent(\n new InputEvent('change', {\n bubbles: true,\n })\n );\n }\n\n protected override renderField(): TemplateResult {\n return html`\n <form\n action=${this.action}\n id=\"form\"\n method=${ifDefined(this.method)}\n @submit=${this.handleSubmit}\n @reset=${this.reset}\n @keydown=${this.handleKeydown}\n >\n <sp-icon-magnify\n class=\"icon magnifier icon-workflow\"\n ></sp-icon-magnify>\n ${super.renderField()}\n ${this.value\n ? html`\n <sp-clear-button\n id=\"button\"\n label=\"Reset\"\n tabindex=\"-1\"\n type=\"reset\"\n @keydown=${stopPropagation}\n ></sp-clear-button>\n `\n : html``}\n </form>\n `;\n }\n\n public override firstUpdated(changedProperties: PropertyValues): void {\n super.firstUpdated(changedProperties);\n this.inputElement.setAttribute('type', 'search');\n }\n\n public override willUpdate(): void {\n this.multiline = false;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAYA;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;AAIA;AAEA;AACA;AACA;AAEA;AAEA,MAAM,kBAAkB,CAAC,UAAuB,MAAM,gBAAgB;AAS/D,aAAM,eAAe,UAAU;AAAA,EAA/B;AAAA;AAMI,kBAAS;AAGA,iBAAQ;AAMR,uBAAc;AAAA;AAAA,aAdH,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,QAAQ,YAAY;AAAA,EACzC;AAAA,EAiBQ,aAAa,OAAoB;AACrC,UAAM,eAAe,KAAK,cACtB,IAAI,MAAM,UAAU;AAAA,MAChB,YAAY;AAAA,MACZ,SAAS;AAAA,IACb,CAAC,CACL;AACA,QAAI,CAAC,cAAc;AACf,YAAM,eAAe;AAAA,IACzB;AAAA,EACJ;AAAA,EAEQ,cAAc,OAA4B;AAC9C,UAAM,EAAE,SAAS;AACjB,QAAI,CAAC,KAAK,SAAS,SAAS,UAAU;AAClC;AAAA,IACJ;AACA,SAAK,MAAM;AAAA,EACf;AAAA,QAEa,QAAuB;AAChC,SAAK,QAAQ;AACb,UAAM,KAAK;AACX,SAAK,aAAa,cACd,IAAI,WAAW,SAAS;AAAA,MACpB,SAAS;AAAA,MACT,UAAU;AAAA,IACd,CAAC,CACL;AAKA,SAAK,aAAa,cACd,IAAI,WAAW,UAAU;AAAA,MACrB,SAAS;AAAA,IACb,CAAC,CACL;AAAA,EACJ;AAAA,EAEmB,cAA8B;AAC7C,WAAO;AAAA;AAAA,yBAEU,KAAK;AAAA;AAAA,yBAEL,UAAU,KAAK,MAAM;AAAA,0BACpB,KAAK;AAAA,yBACN,KAAK;AAAA,2BACH,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKd,MAAM,YAAY;AAAA,kBAClB,KAAK,QACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yCAMmB;AAAA;AAAA,0BAGnB;AAAA;AAAA;AAAA,EAGlB;AAAA,EAEgB,aAAa,mBAAyC;AAClE,UAAM,aAAa,iBAAiB;AACpC,SAAK,aAAa,aAAa,QAAQ,QAAQ;AAAA,EACnD;AAAA,EAEgB,aAAmB;AAC/B,SAAK,YAAY;AAAA,EACrB;AACJ;AA3FW;AAAA,EADP,AAAC,SAAS;AAAA,GACH,AANJ,OAMI;AAGS;AAAA,EADhB,AAAC,SAAS;AAAA,GACM,AATb,OASa;AAGT;AAAA,EADP,AAAC,SAAS;AAAA,GACH,AAZJ,OAYI;AAGS;AAAA,EADhB,AAAC,SAAS;AAAA,GACM,AAfb,OAea;AAGT;AAAA,EADP,AAAC,MAAM,OAAO;AAAA,GACP,AAlBJ,OAkBI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/index.dev.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nexport * from './Search.dev.js'\n"],
|
|
5
|
+
"mappings": "AAWA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
export * from './Search.js';
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./Search.js";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nexport * from './Search.js';\n"],
|
|
5
|
+
"mappings": "AAWA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { css } from "@spectrum-web-components/base";
|
|
2
|
+
const styles = css`
|
|
3
|
+
:host{--spectrum-search-quiet-button-offset:calc(var(
|
|
4
|
+
--spectrum-actionbutton-m-texticon-min-width,
|
|
5
|
+
var(--spectrum-global-dimension-size-400)
|
|
6
|
+
)/2 - var(--spectrum-alias-ui-icon-cross-size-100)/2)}#textfield{display:inline-block;position:relative}:host([dir=ltr]) #button{right:0}:host([dir=rtl]) #button{left:0}#button{position:absolute;top:0}.input{-webkit-appearance:none;border-radius:var(
|
|
7
|
+
--spectrum-alias-search-border-radius,var(--spectrum-global-dimension-size-50)
|
|
8
|
+
);outline-offset:-2px}.input::-webkit-search-cancel-button,.input::-webkit-search-decoration{-webkit-appearance:none}#textfield:after{border-radius:var(
|
|
9
|
+
--spectrum-alias-search-border-radius,var(--spectrum-global-dimension-size-50)
|
|
10
|
+
)}:host([dir=ltr]:not([quiet])) #textfield .icon{left:var(
|
|
11
|
+
--spectrum-alias-search-padding-left-m
|
|
12
|
+
)}:host([dir=rtl]:not([quiet])) #textfield .icon{right:var(
|
|
13
|
+
--spectrum-alias-search-padding-left-m
|
|
14
|
+
)}:host([dir=ltr]:not([quiet])) #textfield .input{padding-left:calc(var(--spectrum-alias-search-padding-left-m) + var(
|
|
15
|
+
--spectrum-alias-workflow-icon-size-m,
|
|
16
|
+
var(--spectrum-global-dimension-size-225)
|
|
17
|
+
) + var(
|
|
18
|
+
--spectrum-textfield-m-texticon-icon-gap,
|
|
19
|
+
var(--spectrum-global-dimension-size-100)
|
|
20
|
+
) - var(
|
|
21
|
+
--spectrum-textfield-m-texticon-border-size,
|
|
22
|
+
var(--spectrum-alias-input-border-size)
|
|
23
|
+
))}:host([dir=rtl]:not([quiet])) #textfield .input{padding-right:calc(var(--spectrum-alias-search-padding-left-m) + var(
|
|
24
|
+
--spectrum-alias-workflow-icon-size-m,
|
|
25
|
+
var(--spectrum-global-dimension-size-225)
|
|
26
|
+
) + var(
|
|
27
|
+
--spectrum-textfield-m-texticon-icon-gap,
|
|
28
|
+
var(--spectrum-global-dimension-size-100)
|
|
29
|
+
) - var(
|
|
30
|
+
--spectrum-textfield-m-texticon-border-size,
|
|
31
|
+
var(--spectrum-alias-input-border-size)
|
|
32
|
+
))}:host([quiet]) #button{transform:translateX(var(--spectrum-search-quiet-button-offset))}:host([quiet]) .input{border-radius:var(
|
|
33
|
+
--spectrum-alias-search-border-radius-quiet,0
|
|
34
|
+
)}:host([quiet]) #textfield:after{border-radius:var(
|
|
35
|
+
--spectrum-alias-search-border-radius-quiet,0
|
|
36
|
+
)}.icon{color:var(
|
|
37
|
+
--spectrum-textfield-m-texticon-icon-color,var(--spectrum-alias-component-icon-color-default)
|
|
38
|
+
)}.input:hover~.icon{color:var(
|
|
39
|
+
--spectrum-search-m-icon-color-hover,var(--spectrum-alias-component-icon-color-hover)
|
|
40
|
+
)}.input:active~.icon{color:var(
|
|
41
|
+
--spectrum-search-m-icon-color-down,var(--spectrum-alias-component-icon-color-down)
|
|
42
|
+
)}.input.focus-visible~.icon{color:var(
|
|
43
|
+
--spectrum-search-m-icon-color-key-focus,var(--spectrum-alias-component-icon-color-key-focus)
|
|
44
|
+
)}.input:focus-visible~.icon{color:var(
|
|
45
|
+
--spectrum-search-m-icon-color-key-focus,var(--spectrum-alias-component-icon-color-key-focus)
|
|
46
|
+
)}.input:disabled~.icon{color:var(
|
|
47
|
+
--spectrum-textfield-m-texticon-text-color-disabled,var(--spectrum-alias-component-text-color-disabled)
|
|
48
|
+
)}input::-webkit-search-cancel-button{display:none}
|
|
49
|
+
`;
|
|
50
|
+
export default styles;
|
|
51
|
+
//# sourceMappingURL=search.css.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["search.css.ts"],
|
|
4
|
+
"sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-search-quiet-button-offset:calc(var(\n--spectrum-actionbutton-m-texticon-min-width,\nvar(--spectrum-global-dimension-size-400)\n)/2 - var(--spectrum-alias-ui-icon-cross-size-100)/2)}#textfield{display:inline-block;position:relative}:host([dir=ltr]) #button{right:0}:host([dir=rtl]) #button{left:0}#button{position:absolute;top:0}.input{-webkit-appearance:none;border-radius:var(\n--spectrum-alias-search-border-radius,var(--spectrum-global-dimension-size-50)\n);outline-offset:-2px}.input::-webkit-search-cancel-button,.input::-webkit-search-decoration{-webkit-appearance:none}#textfield:after{border-radius:var(\n--spectrum-alias-search-border-radius,var(--spectrum-global-dimension-size-50)\n)}:host([dir=ltr]:not([quiet])) #textfield .icon{left:var(\n--spectrum-alias-search-padding-left-m\n)}:host([dir=rtl]:not([quiet])) #textfield .icon{right:var(\n--spectrum-alias-search-padding-left-m\n)}:host([dir=ltr]:not([quiet])) #textfield .input{padding-left:calc(var(--spectrum-alias-search-padding-left-m) + var(\n--spectrum-alias-workflow-icon-size-m,\nvar(--spectrum-global-dimension-size-225)\n) + var(\n--spectrum-textfield-m-texticon-icon-gap,\nvar(--spectrum-global-dimension-size-100)\n) - var(\n--spectrum-textfield-m-texticon-border-size,\nvar(--spectrum-alias-input-border-size)\n))}:host([dir=rtl]:not([quiet])) #textfield .input{padding-right:calc(var(--spectrum-alias-search-padding-left-m) + var(\n--spectrum-alias-workflow-icon-size-m,\nvar(--spectrum-global-dimension-size-225)\n) + var(\n--spectrum-textfield-m-texticon-icon-gap,\nvar(--spectrum-global-dimension-size-100)\n) - var(\n--spectrum-textfield-m-texticon-border-size,\nvar(--spectrum-alias-input-border-size)\n))}:host([quiet]) #button{transform:translateX(var(--spectrum-search-quiet-button-offset))}:host([quiet]) .input{border-radius:var(\n--spectrum-alias-search-border-radius-quiet,0\n)}:host([quiet]) #textfield:after{border-radius:var(\n--spectrum-alias-search-border-radius-quiet,0\n)}.icon{color:var(\n--spectrum-textfield-m-texticon-icon-color,var(--spectrum-alias-component-icon-color-default)\n)}.input:hover~.icon{color:var(\n--spectrum-search-m-icon-color-hover,var(--spectrum-alias-component-icon-color-hover)\n)}.input:active~.icon{color:var(\n--spectrum-search-m-icon-color-down,var(--spectrum-alias-component-icon-color-down)\n)}.input.focus-visible~.icon{color:var(\n--spectrum-search-m-icon-color-key-focus,var(--spectrum-alias-component-icon-color-key-focus)\n)}.input:focus-visible~.icon{color:var(\n--spectrum-search-m-icon-color-key-focus,var(--spectrum-alias-component-icon-color-key-focus)\n)}.input:disabled~.icon{color:var(\n--spectrum-textfield-m-texticon-text-color-disabled,var(--spectrum-alias-component-text-color-disabled)\n)}input::-webkit-search-cancel-button{display:none}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "AAWA;AACA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgDf,eAAe;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/src/search.css.js
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { css } from '@spectrum-web-components/base';
|
|
13
|
-
const styles = css `
|
|
1
|
+
import { css } from "@spectrum-web-components/base";
|
|
2
|
+
const styles = css`
|
|
14
3
|
:host{--spectrum-search-quiet-button-offset:calc(var(
|
|
15
4
|
--spectrum-actionbutton-m-texticon-min-width,
|
|
16
5
|
var(--spectrum-global-dimension-size-400)
|
|
@@ -59,4 +48,4 @@ var(--spectrum-alias-input-border-size)
|
|
|
59
48
|
)}input::-webkit-search-cancel-button{display:none}
|
|
60
49
|
`;
|
|
61
50
|
export default styles;
|
|
62
|
-
//# sourceMappingURL=search.css.js.map
|
|
51
|
+
//# sourceMappingURL=search.css.js.map
|