@dile/ui 3.12.3 → 3.12.5
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/input/input-search.spec.js +11 -1
- package/components/input/src/DileInputSearch.js +10 -1
- package/components/order-switch/__screenshots__/order-switch.spec.js/dile-order-switch-clicking-the-label-re-announces-the-current-value-without-toggling-when-not-selected-1.png +0 -0
- package/components/order-switch/__screenshots__/order-switch.spec.js/dile-order-switch-clicking-the-label-toggles-the-order-when-selected-1.png +0 -0
- package/components/order-switch/__screenshots__/order-switch.spec.js/dile-order-switch-defaults-to-ascending-order-1.png +0 -0
- package/components/select/src/DileSelectBoolean.js +1 -0
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@ describe('dile-input-search', () => {
|
|
|
13
13
|
return el;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
it('renders a native
|
|
16
|
+
it('renders a native search input and a search icon', async () => {
|
|
17
17
|
const el = await renderInputSearch('<dile-input-search placeholder="Search..."></dile-input-search>');
|
|
18
18
|
const input = el.shadowRoot.querySelector('input');
|
|
19
19
|
expect(input).toBeTruthy();
|
|
@@ -21,6 +21,16 @@ describe('dile-input-search', () => {
|
|
|
21
21
|
expect(el.shadowRoot.querySelector('dile-icon')).toBeTruthy();
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
+
it('renders the input as a search field with browser and password manager autofill disabled', async () => {
|
|
25
|
+
const el = await renderInputSearch('<dile-input-search></dile-input-search>');
|
|
26
|
+
const input = el.shadowRoot.querySelector('input');
|
|
27
|
+
expect(input.type).toBe('search');
|
|
28
|
+
expect(input.getAttribute('autocomplete')).toBe('off');
|
|
29
|
+
expect(input.hasAttribute('data-1p-ignore')).toBe(true);
|
|
30
|
+
expect(input.getAttribute('data-lpignore')).toBe('true');
|
|
31
|
+
expect(input.getAttribute('data-form-type')).toBe('other');
|
|
32
|
+
});
|
|
33
|
+
|
|
24
34
|
it('updates the value on input and dispatches dile-input-search after the delay', async () => {
|
|
25
35
|
const el = await renderInputSearch('<dile-input-search delay="10"></dile-input-search>');
|
|
26
36
|
const input = el.shadowRoot.querySelector('input');
|
|
@@ -35,6 +35,12 @@ export class DileInputSearch extends LitElement {
|
|
|
35
35
|
input:focus {
|
|
36
36
|
outline: none;
|
|
37
37
|
}
|
|
38
|
+
input::-webkit-search-cancel-button,
|
|
39
|
+
input::-webkit-search-decoration {
|
|
40
|
+
-webkit-appearance: none;
|
|
41
|
+
appearance: none;
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
38
44
|
input::placeholder {
|
|
39
45
|
/* WCAG AA contrast: #666 sobre #fff = 7.5:1 */
|
|
40
46
|
color: var(--dile-input-placeholder-color, #666);
|
|
@@ -116,10 +122,13 @@ export class DileInputSearch extends LitElement {
|
|
|
116
122
|
<div class="${this.errored ? "errored" : ""}">
|
|
117
123
|
<input
|
|
118
124
|
id="elinput"
|
|
119
|
-
type="
|
|
125
|
+
type="search"
|
|
120
126
|
placeholder="${this.placeholder}"
|
|
121
127
|
@input=${this.inputHandler}
|
|
122
128
|
autocomplete="off"
|
|
129
|
+
data-1p-ignore
|
|
130
|
+
data-lpignore="true"
|
|
131
|
+
data-form-type="other"
|
|
123
132
|
.value="${this.value}"
|
|
124
133
|
?disabled="${this.disabled}"
|
|
125
134
|
?readonly="${this.readOnly}"
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/ui",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.5",
|
|
4
4
|
"description": "UI Core components from dile-components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "6dc4519272402048c116171dc4a0a78efa342db6"
|
|
32
32
|
}
|