@spectrum-web-components/textfield 1.1.0 → 1.1.2
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 +8 -8
- package/sp-textfield.d.ts +6 -0
- package/sp-textfield.dev.js +5 -0
- package/sp-textfield.dev.js.map +7 -0
- package/sp-textfield.js +2 -0
- package/sp-textfield.js.map +7 -0
- package/src/Textfield.d.ts +144 -0
- package/src/Textfield.dev.js +347 -0
- package/src/Textfield.dev.js.map +7 -0
- package/src/Textfield.js +68 -0
- package/src/Textfield.js.map +7 -0
- package/src/index.d.ts +1 -0
- package/src/index.dev.js +3 -0
- package/src/index.dev.js.map +7 -0
- package/src/index.js +2 -0
- package/src/index.js.map +7 -0
- package/src/spectrum-textfield.css.d.ts +2 -0
- package/src/spectrum-textfield.css.dev.js +7 -0
- package/src/spectrum-textfield.css.dev.js.map +7 -0
- package/src/spectrum-textfield.css.js +4 -0
- package/src/spectrum-textfield.css.js.map +7 -0
- package/src/textfield-overrides.css.d.ts +2 -0
- package/src/textfield-overrides.css.dev.js +7 -0
- package/src/textfield-overrides.css.dev.js.map +7 -0
- package/src/textfield-overrides.css.js +4 -0
- package/src/textfield-overrides.css.js.map +7 -0
- package/src/textfield.css.d.ts +2 -0
- package/src/textfield.css.dev.js +7 -0
- package/src/textfield.css.dev.js.map +7 -0
- package/src/textfield.css.js +4 -0
- package/src/textfield.css.js.map +7 -0
- package/stories/textarea-sizes.stories.js +35 -0
- package/stories/textarea-sizes.stories.js.map +7 -0
- package/stories/textarea.stories.js +212 -0
- package/stories/textarea.stories.js.map +7 -0
- package/stories/textfield-sizes.stories.js +30 -0
- package/stories/textfield-sizes.stories.js.map +7 -0
- package/stories/textfield.stories.js +139 -0
- package/stories/textfield.stories.js.map +7 -0
- package/test/benchmark/test-basic.js +8 -0
- package/test/benchmark/test-basic.js.map +7 -0
- package/test/textarea-sizes.test-vrt.js +5 -0
- package/test/textarea-sizes.test-vrt.js.map +7 -0
- package/test/textarea.test-vrt.js +5 -0
- package/test/textarea.test-vrt.js.map +7 -0
- package/test/textfield-memory.test.js +8 -0
- package/test/textfield-memory.test.js.map +7 -0
- package/test/textfield-sizes.test-vrt.js +5 -0
- package/test/textfield-sizes.test-vrt.js.map +7 -0
- package/test/textfield.test-vrt.js +5 -0
- package/test/textfield.test-vrt.js.map +7 -0
- package/test/textfield.test.js +926 -0
- package/test/textfield.test.js.map +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/textfield",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"lit-html"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@spectrum-web-components/base": "^1.1.
|
|
62
|
-
"@spectrum-web-components/help-text": "^1.1.
|
|
63
|
-
"@spectrum-web-components/icon": "^1.1.
|
|
64
|
-
"@spectrum-web-components/icons-ui": "^1.1.
|
|
65
|
-
"@spectrum-web-components/icons-workflow": "^1.1.
|
|
66
|
-
"@spectrum-web-components/shared": "^1.1.
|
|
61
|
+
"@spectrum-web-components/base": "^1.1.2",
|
|
62
|
+
"@spectrum-web-components/help-text": "^1.1.2",
|
|
63
|
+
"@spectrum-web-components/icon": "^1.1.2",
|
|
64
|
+
"@spectrum-web-components/icons-ui": "^1.1.2",
|
|
65
|
+
"@spectrum-web-components/icons-workflow": "^1.1.2",
|
|
66
|
+
"@spectrum-web-components/shared": "^1.1.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@spectrum-css/textfield": "8.0.0-s2-foundations.16"
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"./sp-*.js",
|
|
75
75
|
"./**/*.dev.js"
|
|
76
76
|
],
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "9ee45f2dfd3ac1939072726d00195c6c05d9a562"
|
|
78
78
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sp-textfield.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 { Textfield } from './src/Textfield.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-textfield', Textfield);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-textfield': Textfield;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAYA,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAE9B,cAAc,gBAAgB,SAAS;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/sp-textfield.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["sp-textfield.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 { Textfield } from './src/Textfield.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-textfield', Textfield);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-textfield': Textfield;\n }\n}\n"],
|
|
5
|
+
"mappings": "aAYA,OAAS,aAAAA,MAAiB,qBAC1B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,eAAgBD,CAAS",
|
|
6
|
+
"names": ["Textfield", "defineElement"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { CSSResultArray, nothing, PropertyValues, TemplateResult } from '@spectrum-web-components/base';
|
|
2
|
+
import { Focusable } from '@spectrum-web-components/shared/src/focusable.js';
|
|
3
|
+
import '@spectrum-web-components/icons-ui/icons/sp-icon-checkmark100.js';
|
|
4
|
+
import '@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js';
|
|
5
|
+
declare const textfieldTypes: readonly ["text", "url", "tel", "email", "password"];
|
|
6
|
+
export type TextfieldType = (typeof textfieldTypes)[number];
|
|
7
|
+
declare const TextfieldBase_base: typeof Focusable & {
|
|
8
|
+
new (...args: any[]): import("@spectrum-web-components/base").SizedElementInterface;
|
|
9
|
+
prototype: import("@spectrum-web-components/base").SizedElementInterface;
|
|
10
|
+
} & {
|
|
11
|
+
new (...args: any[]): import("@spectrum-web-components/help-text/src/manage-help-text.js").HelpTextElementInterface;
|
|
12
|
+
prototype: import("@spectrum-web-components/help-text/src/manage-help-text.js").HelpTextElementInterface;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @fires input - The value of the element has changed.
|
|
16
|
+
* @fires change - An alteration to the value of the element has been committed by the user.
|
|
17
|
+
*/
|
|
18
|
+
export declare class TextfieldBase extends TextfieldBase_base {
|
|
19
|
+
static get styles(): CSSResultArray;
|
|
20
|
+
protected appliedLabel?: string;
|
|
21
|
+
/**
|
|
22
|
+
* A regular expression outlining the keys that will be allowed to update the value of the form control.
|
|
23
|
+
*/
|
|
24
|
+
allowedKeys: string;
|
|
25
|
+
/**
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
focused: boolean;
|
|
29
|
+
protected inputElement: HTMLInputElement | HTMLTextAreaElement;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the `value` held by the form control is invalid.
|
|
32
|
+
*/
|
|
33
|
+
invalid: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* A string applied via `aria-label` to the form control when a user visible label is not provided.
|
|
36
|
+
*/
|
|
37
|
+
label: string;
|
|
38
|
+
/**
|
|
39
|
+
* Name of the form control.
|
|
40
|
+
*/
|
|
41
|
+
name: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Text that appears in the form control when it has no value set
|
|
44
|
+
*/
|
|
45
|
+
placeholder: string;
|
|
46
|
+
set type(val: TextfieldType);
|
|
47
|
+
get type(): TextfieldType;
|
|
48
|
+
/**
|
|
49
|
+
* @private
|
|
50
|
+
* This binding allows for invalid value for `type` to still be reflected to the DOM
|
|
51
|
+
*/
|
|
52
|
+
private _type;
|
|
53
|
+
/**
|
|
54
|
+
* Pattern the `value` must match to be valid
|
|
55
|
+
*/
|
|
56
|
+
pattern?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Whether a form control delivered with the `multiline` attribute will change size
|
|
59
|
+
* vertically to accomodate longer input
|
|
60
|
+
*/
|
|
61
|
+
grows: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Defines the maximum string length that the user can enter
|
|
64
|
+
*/
|
|
65
|
+
maxlength: number;
|
|
66
|
+
/**
|
|
67
|
+
* Defines the minimum string length that the user can enter
|
|
68
|
+
*/
|
|
69
|
+
minlength: number;
|
|
70
|
+
/**
|
|
71
|
+
* Whether the form control should accept a value longer than one line
|
|
72
|
+
*/
|
|
73
|
+
multiline: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Whether a user can interact with the value of the form control
|
|
76
|
+
*/
|
|
77
|
+
readonly: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* The specific number of rows the form control should provide in the user interface
|
|
80
|
+
*/
|
|
81
|
+
rows: number;
|
|
82
|
+
/**
|
|
83
|
+
* Whether the `value` held by the form control is valid.
|
|
84
|
+
*/
|
|
85
|
+
valid: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The value held by the form control
|
|
88
|
+
*/
|
|
89
|
+
set value(value: string | number);
|
|
90
|
+
get value(): string | number;
|
|
91
|
+
protected _value: string | number;
|
|
92
|
+
/**
|
|
93
|
+
* Whether to display the form control with no visible background
|
|
94
|
+
*/
|
|
95
|
+
quiet: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the form control will be found to be invalid when it holds no `value`
|
|
98
|
+
*/
|
|
99
|
+
required: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* What form of assistance should be provided when attempting to supply a value to the form control
|
|
102
|
+
*/
|
|
103
|
+
autocomplete?: 'list' | 'none' | HTMLInputElement['autocomplete'] | HTMLTextAreaElement['autocomplete'];
|
|
104
|
+
get focusElement(): HTMLInputElement | HTMLTextAreaElement;
|
|
105
|
+
/**
|
|
106
|
+
* Sets the start and end positions of the current selection.
|
|
107
|
+
*
|
|
108
|
+
* @param selectionStart The 0-based index of the first selected character. An index greater than the length of the
|
|
109
|
+
* element's value is treated as pointing to the end of the value.
|
|
110
|
+
* @param selectionEnd The 0-based index of the character after the last selected character. An index greater than
|
|
111
|
+
* the length of the element's value is treated as pointing to the end of the value.
|
|
112
|
+
* @param [selectionDirection="none"] A string indicating the direction in which the selection is considered to
|
|
113
|
+
* have been performed.
|
|
114
|
+
*/
|
|
115
|
+
setSelectionRange(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none'): void;
|
|
116
|
+
/**
|
|
117
|
+
* Selects all the text.
|
|
118
|
+
*/
|
|
119
|
+
select(): void;
|
|
120
|
+
protected handleInput(_event: Event): void;
|
|
121
|
+
protected handleChange(): void;
|
|
122
|
+
protected onFocus(): void;
|
|
123
|
+
protected onBlur(_event: FocusEvent): void;
|
|
124
|
+
protected handleInputElementPointerdown(): void;
|
|
125
|
+
protected renderStateIcons(): TemplateResult | typeof nothing;
|
|
126
|
+
protected get displayValue(): string;
|
|
127
|
+
private get renderMultiline();
|
|
128
|
+
private get renderInput();
|
|
129
|
+
protected renderField(): TemplateResult;
|
|
130
|
+
protected render(): TemplateResult;
|
|
131
|
+
protected update(changedProperties: PropertyValues): void;
|
|
132
|
+
checkValidity(): boolean;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* @element sp-textfield
|
|
136
|
+
* @slot help-text - default or non-negative help text to associate to your form element
|
|
137
|
+
* @slot negative-help-text - negative help text to associate to your form element when `invalid`
|
|
138
|
+
*/
|
|
139
|
+
export declare class Textfield extends TextfieldBase {
|
|
140
|
+
set value(value: string);
|
|
141
|
+
get value(): string;
|
|
142
|
+
protected _value: string;
|
|
143
|
+
}
|
|
144
|
+
export {};
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
5
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
6
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7
|
+
if (decorator = decorators[i])
|
|
8
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9
|
+
if (kind && result) __defProp(target, key, result);
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
import {
|
|
13
|
+
html,
|
|
14
|
+
nothing,
|
|
15
|
+
SizedMixin
|
|
16
|
+
} from "@spectrum-web-components/base";
|
|
17
|
+
import {
|
|
18
|
+
ifDefined,
|
|
19
|
+
live
|
|
20
|
+
} from "@spectrum-web-components/base/src/directives.js";
|
|
21
|
+
import {
|
|
22
|
+
property,
|
|
23
|
+
query,
|
|
24
|
+
state
|
|
25
|
+
} from "@spectrum-web-components/base/src/decorators.js";
|
|
26
|
+
import { ManageHelpText } from "@spectrum-web-components/help-text/src/manage-help-text.js";
|
|
27
|
+
import { Focusable } from "@spectrum-web-components/shared/src/focusable.js";
|
|
28
|
+
import "@spectrum-web-components/icons-ui/icons/sp-icon-checkmark100.js";
|
|
29
|
+
import "@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js";
|
|
30
|
+
import textfieldStyles from "./textfield.css.js";
|
|
31
|
+
import checkmarkStyles from "@spectrum-web-components/icon/src/spectrum-icon-checkmark.css.js";
|
|
32
|
+
import checkmarkSmallOverrides from "@spectrum-web-components/icon/src/icon-checkmark-overrides.css.js";
|
|
33
|
+
const textfieldTypes = ["text", "url", "tel", "email", "password"];
|
|
34
|
+
export class TextfieldBase extends ManageHelpText(
|
|
35
|
+
SizedMixin(Focusable, {
|
|
36
|
+
noDefaultSize: true
|
|
37
|
+
})
|
|
38
|
+
) {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
|
+
this.allowedKeys = "";
|
|
42
|
+
this.focused = false;
|
|
43
|
+
this.invalid = false;
|
|
44
|
+
this.label = "";
|
|
45
|
+
this.placeholder = "";
|
|
46
|
+
this._type = "text";
|
|
47
|
+
this.grows = false;
|
|
48
|
+
this.maxlength = -1;
|
|
49
|
+
this.minlength = -1;
|
|
50
|
+
this.multiline = false;
|
|
51
|
+
this.readonly = false;
|
|
52
|
+
this.rows = -1;
|
|
53
|
+
this.valid = false;
|
|
54
|
+
this._value = "";
|
|
55
|
+
this.quiet = false;
|
|
56
|
+
this.required = false;
|
|
57
|
+
}
|
|
58
|
+
static get styles() {
|
|
59
|
+
return [textfieldStyles, checkmarkStyles, checkmarkSmallOverrides];
|
|
60
|
+
}
|
|
61
|
+
set type(val) {
|
|
62
|
+
const prev = this._type;
|
|
63
|
+
this._type = val;
|
|
64
|
+
this.requestUpdate("type", prev);
|
|
65
|
+
}
|
|
66
|
+
get type() {
|
|
67
|
+
var _a;
|
|
68
|
+
return (_a = textfieldTypes.find((t) => t === this._type)) != null ? _a : "text";
|
|
69
|
+
}
|
|
70
|
+
set value(value) {
|
|
71
|
+
if (value === this.value) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const oldValue = this._value;
|
|
75
|
+
this._value = value;
|
|
76
|
+
this.requestUpdate("value", oldValue);
|
|
77
|
+
}
|
|
78
|
+
get value() {
|
|
79
|
+
return this._value;
|
|
80
|
+
}
|
|
81
|
+
get focusElement() {
|
|
82
|
+
return this.inputElement;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Sets the start and end positions of the current selection.
|
|
86
|
+
*
|
|
87
|
+
* @param selectionStart The 0-based index of the first selected character. An index greater than the length of the
|
|
88
|
+
* element's value is treated as pointing to the end of the value.
|
|
89
|
+
* @param selectionEnd The 0-based index of the character after the last selected character. An index greater than
|
|
90
|
+
* the length of the element's value is treated as pointing to the end of the value.
|
|
91
|
+
* @param [selectionDirection="none"] A string indicating the direction in which the selection is considered to
|
|
92
|
+
* have been performed.
|
|
93
|
+
*/
|
|
94
|
+
setSelectionRange(selectionStart, selectionEnd, selectionDirection = "none") {
|
|
95
|
+
this.inputElement.setSelectionRange(
|
|
96
|
+
selectionStart,
|
|
97
|
+
selectionEnd,
|
|
98
|
+
selectionDirection
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Selects all the text.
|
|
103
|
+
*/
|
|
104
|
+
select() {
|
|
105
|
+
this.inputElement.select();
|
|
106
|
+
}
|
|
107
|
+
handleInput(_event) {
|
|
108
|
+
if (this.allowedKeys && this.inputElement.value) {
|
|
109
|
+
const regExp = new RegExp(`^[${this.allowedKeys}]*$`, "u");
|
|
110
|
+
if (!regExp.test(this.inputElement.value)) {
|
|
111
|
+
const selectionStart = this.inputElement.selectionStart;
|
|
112
|
+
const nextSelectStart = selectionStart - 1;
|
|
113
|
+
this.inputElement.value = this.value.toString();
|
|
114
|
+
this.inputElement.setSelectionRange(
|
|
115
|
+
nextSelectStart,
|
|
116
|
+
nextSelectStart
|
|
117
|
+
);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
this.value = this.inputElement.value;
|
|
122
|
+
}
|
|
123
|
+
handleChange() {
|
|
124
|
+
this.dispatchEvent(
|
|
125
|
+
new Event("change", {
|
|
126
|
+
bubbles: true,
|
|
127
|
+
composed: true
|
|
128
|
+
})
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
onFocus() {
|
|
132
|
+
this.focused = !this.readonly && true;
|
|
133
|
+
}
|
|
134
|
+
onBlur(_event) {
|
|
135
|
+
this.focused = !this.readonly && false;
|
|
136
|
+
}
|
|
137
|
+
handleInputElementPointerdown() {
|
|
138
|
+
}
|
|
139
|
+
renderStateIcons() {
|
|
140
|
+
if (this.invalid) {
|
|
141
|
+
return html`
|
|
142
|
+
<sp-icon-alert id="invalid" class="icon"></sp-icon-alert>
|
|
143
|
+
`;
|
|
144
|
+
} else if (this.valid) {
|
|
145
|
+
return html`
|
|
146
|
+
<sp-icon-checkmark100
|
|
147
|
+
id="valid"
|
|
148
|
+
class="icon spectrum-UIIcon-Checkmark100"
|
|
149
|
+
></sp-icon-checkmark100>
|
|
150
|
+
`;
|
|
151
|
+
}
|
|
152
|
+
return nothing;
|
|
153
|
+
}
|
|
154
|
+
get displayValue() {
|
|
155
|
+
return this.value.toString();
|
|
156
|
+
}
|
|
157
|
+
// prettier-ignore
|
|
158
|
+
get renderMultiline() {
|
|
159
|
+
return html`
|
|
160
|
+
${this.multiline && this.grows && this.rows === -1 ? html`
|
|
161
|
+
<div id="sizer" class="input" aria-hidden="true">${this.value}​
|
|
162
|
+
</div>
|
|
163
|
+
` : nothing}
|
|
164
|
+
<!-- @ts-ignore -->
|
|
165
|
+
<textarea
|
|
166
|
+
name=${ifDefined(this.name || void 0)}
|
|
167
|
+
aria-describedby=${this.helpTextId}
|
|
168
|
+
aria-label=${this.label || this.appliedLabel || this.placeholder}
|
|
169
|
+
aria-invalid=${ifDefined(this.invalid || void 0)}
|
|
170
|
+
class="input"
|
|
171
|
+
maxlength=${ifDefined(
|
|
172
|
+
this.maxlength > -1 ? this.maxlength : void 0
|
|
173
|
+
)}
|
|
174
|
+
minlength=${ifDefined(
|
|
175
|
+
this.minlength > -1 ? this.minlength : void 0
|
|
176
|
+
)}
|
|
177
|
+
title=${this.invalid ? "" : nothing}
|
|
178
|
+
pattern=${ifDefined(this.pattern)}
|
|
179
|
+
placeholder=${this.placeholder}
|
|
180
|
+
.value=${this.displayValue}
|
|
181
|
+
@change=${this.handleChange}
|
|
182
|
+
@input=${this.handleInput}
|
|
183
|
+
@focus=${this.onFocus}
|
|
184
|
+
@blur=${this.onBlur}
|
|
185
|
+
?disabled=${this.disabled}
|
|
186
|
+
?required=${this.required}
|
|
187
|
+
?readonly=${this.readonly}
|
|
188
|
+
rows=${ifDefined(this.rows > -1 ? this.rows : void 0)}
|
|
189
|
+
autocomplete=${ifDefined(this.autocomplete)}
|
|
190
|
+
></textarea>
|
|
191
|
+
`;
|
|
192
|
+
}
|
|
193
|
+
get renderInput() {
|
|
194
|
+
return html`
|
|
195
|
+
<!-- @ts-ignore -->
|
|
196
|
+
<input
|
|
197
|
+
name=${ifDefined(this.name || void 0)}
|
|
198
|
+
type=${this.type}
|
|
199
|
+
aria-describedby=${this.helpTextId}
|
|
200
|
+
aria-label=${this.label || this.appliedLabel || this.placeholder}
|
|
201
|
+
aria-invalid=${ifDefined(this.invalid || void 0)}
|
|
202
|
+
class="input"
|
|
203
|
+
title=${this.invalid ? "" : nothing}
|
|
204
|
+
maxlength=${ifDefined(
|
|
205
|
+
this.maxlength > -1 ? this.maxlength : void 0
|
|
206
|
+
)}
|
|
207
|
+
minlength=${ifDefined(
|
|
208
|
+
this.minlength > -1 ? this.minlength : void 0
|
|
209
|
+
)}
|
|
210
|
+
pattern=${ifDefined(this.pattern)}
|
|
211
|
+
placeholder=${this.placeholder}
|
|
212
|
+
.value=${live(this.displayValue)}
|
|
213
|
+
@change=${this.handleChange}
|
|
214
|
+
@input=${this.handleInput}
|
|
215
|
+
@pointerdown=${this.handleInputElementPointerdown}
|
|
216
|
+
@focus=${this.onFocus}
|
|
217
|
+
@blur=${this.onBlur}
|
|
218
|
+
?disabled=${this.disabled}
|
|
219
|
+
?required=${this.required}
|
|
220
|
+
?readonly=${this.readonly}
|
|
221
|
+
autocomplete=${ifDefined(this.autocomplete)}
|
|
222
|
+
/>
|
|
223
|
+
`;
|
|
224
|
+
}
|
|
225
|
+
renderField() {
|
|
226
|
+
return html`
|
|
227
|
+
${this.renderStateIcons()}
|
|
228
|
+
${this.multiline ? this.renderMultiline : this.renderInput}
|
|
229
|
+
`;
|
|
230
|
+
}
|
|
231
|
+
render() {
|
|
232
|
+
return html`
|
|
233
|
+
<div id="textfield">${this.renderField()}</div>
|
|
234
|
+
${this.renderHelpText(this.invalid)}
|
|
235
|
+
`;
|
|
236
|
+
}
|
|
237
|
+
update(changedProperties) {
|
|
238
|
+
if (changedProperties.has("value") || changedProperties.has("required") && this.required) {
|
|
239
|
+
this.updateComplete.then(() => {
|
|
240
|
+
this.checkValidity();
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
super.update(changedProperties);
|
|
244
|
+
}
|
|
245
|
+
checkValidity() {
|
|
246
|
+
let validity = this.inputElement.checkValidity();
|
|
247
|
+
if (this.required || this.value && this.pattern) {
|
|
248
|
+
if ((this.disabled || this.multiline) && this.pattern) {
|
|
249
|
+
const regex = new RegExp(`^${this.pattern}$`, "u");
|
|
250
|
+
validity = regex.test(this.value.toString());
|
|
251
|
+
}
|
|
252
|
+
if (typeof this.minlength !== "undefined") {
|
|
253
|
+
validity = validity && this.value.toString().length >= this.minlength;
|
|
254
|
+
}
|
|
255
|
+
this.valid = validity;
|
|
256
|
+
this.invalid = !validity;
|
|
257
|
+
}
|
|
258
|
+
return validity;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
__decorateClass([
|
|
262
|
+
state()
|
|
263
|
+
], TextfieldBase.prototype, "appliedLabel", 2);
|
|
264
|
+
__decorateClass([
|
|
265
|
+
property({ attribute: "allowed-keys" })
|
|
266
|
+
], TextfieldBase.prototype, "allowedKeys", 2);
|
|
267
|
+
__decorateClass([
|
|
268
|
+
property({ type: Boolean, reflect: true })
|
|
269
|
+
], TextfieldBase.prototype, "focused", 2);
|
|
270
|
+
__decorateClass([
|
|
271
|
+
query(".input:not(#sizer)")
|
|
272
|
+
], TextfieldBase.prototype, "inputElement", 2);
|
|
273
|
+
__decorateClass([
|
|
274
|
+
property({ type: Boolean, reflect: true })
|
|
275
|
+
], TextfieldBase.prototype, "invalid", 2);
|
|
276
|
+
__decorateClass([
|
|
277
|
+
property()
|
|
278
|
+
], TextfieldBase.prototype, "label", 2);
|
|
279
|
+
__decorateClass([
|
|
280
|
+
property({ type: String, reflect: true })
|
|
281
|
+
], TextfieldBase.prototype, "name", 2);
|
|
282
|
+
__decorateClass([
|
|
283
|
+
property()
|
|
284
|
+
], TextfieldBase.prototype, "placeholder", 2);
|
|
285
|
+
__decorateClass([
|
|
286
|
+
state()
|
|
287
|
+
], TextfieldBase.prototype, "type", 1);
|
|
288
|
+
__decorateClass([
|
|
289
|
+
property({ attribute: "type", reflect: true })
|
|
290
|
+
], TextfieldBase.prototype, "_type", 2);
|
|
291
|
+
__decorateClass([
|
|
292
|
+
property()
|
|
293
|
+
], TextfieldBase.prototype, "pattern", 2);
|
|
294
|
+
__decorateClass([
|
|
295
|
+
property({ type: Boolean, reflect: true })
|
|
296
|
+
], TextfieldBase.prototype, "grows", 2);
|
|
297
|
+
__decorateClass([
|
|
298
|
+
property({ type: Number })
|
|
299
|
+
], TextfieldBase.prototype, "maxlength", 2);
|
|
300
|
+
__decorateClass([
|
|
301
|
+
property({ type: Number })
|
|
302
|
+
], TextfieldBase.prototype, "minlength", 2);
|
|
303
|
+
__decorateClass([
|
|
304
|
+
property({ type: Boolean, reflect: true })
|
|
305
|
+
], TextfieldBase.prototype, "multiline", 2);
|
|
306
|
+
__decorateClass([
|
|
307
|
+
property({ type: Boolean, reflect: true })
|
|
308
|
+
], TextfieldBase.prototype, "readonly", 2);
|
|
309
|
+
__decorateClass([
|
|
310
|
+
property({ type: Number })
|
|
311
|
+
], TextfieldBase.prototype, "rows", 2);
|
|
312
|
+
__decorateClass([
|
|
313
|
+
property({ type: Boolean, reflect: true })
|
|
314
|
+
], TextfieldBase.prototype, "valid", 2);
|
|
315
|
+
__decorateClass([
|
|
316
|
+
property({ type: String })
|
|
317
|
+
], TextfieldBase.prototype, "value", 1);
|
|
318
|
+
__decorateClass([
|
|
319
|
+
property({ type: Boolean, reflect: true })
|
|
320
|
+
], TextfieldBase.prototype, "quiet", 2);
|
|
321
|
+
__decorateClass([
|
|
322
|
+
property({ type: Boolean, reflect: true })
|
|
323
|
+
], TextfieldBase.prototype, "required", 2);
|
|
324
|
+
__decorateClass([
|
|
325
|
+
property({ type: String, reflect: true })
|
|
326
|
+
], TextfieldBase.prototype, "autocomplete", 2);
|
|
327
|
+
export class Textfield extends TextfieldBase {
|
|
328
|
+
constructor() {
|
|
329
|
+
super(...arguments);
|
|
330
|
+
this._value = "";
|
|
331
|
+
}
|
|
332
|
+
set value(value) {
|
|
333
|
+
if (value === this.value) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
const oldValue = this._value;
|
|
337
|
+
this._value = value;
|
|
338
|
+
this.requestUpdate("value", oldValue);
|
|
339
|
+
}
|
|
340
|
+
get value() {
|
|
341
|
+
return this._value;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
__decorateClass([
|
|
345
|
+
property({ type: String })
|
|
346
|
+
], Textfield.prototype, "value", 1);
|
|
347
|
+
//# sourceMappingURL=Textfield.dev.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["Textfield.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 nothing,\n PropertyValues,\n SizedMixin,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n ifDefined,\n live,\n} from '@spectrum-web-components/base/src/directives.js';\nimport {\n property,\n query,\n state,\n} from '@spectrum-web-components/base/src/decorators.js';\n\nimport { ManageHelpText } from '@spectrum-web-components/help-text/src/manage-help-text.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\nimport '@spectrum-web-components/icons-ui/icons/sp-icon-checkmark100.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-alert.js';\n\nimport textfieldStyles from './textfield.css.js';\nimport checkmarkStyles from '@spectrum-web-components/icon/src/spectrum-icon-checkmark.css.js';\nimport checkmarkSmallOverrides from '@spectrum-web-components/icon/src/icon-checkmark-overrides.css.js';\n\nconst textfieldTypes = ['text', 'url', 'tel', 'email', 'password'] as const;\nexport type TextfieldType = (typeof textfieldTypes)[number];\n\n/**\n * @fires input - The value of the element has changed.\n * @fires change - An alteration to the value of the element has been committed by the user.\n */\nexport class TextfieldBase extends ManageHelpText(\n SizedMixin(Focusable, {\n noDefaultSize: true,\n })\n) {\n public static override get styles(): CSSResultArray {\n return [textfieldStyles, checkmarkStyles, checkmarkSmallOverrides];\n }\n\n @state()\n protected appliedLabel?: string;\n\n /**\n * A regular expression outlining the keys that will be allowed to update the value of the form control.\n */\n @property({ attribute: 'allowed-keys' })\n allowedKeys = '';\n\n /**\n * @private\n */\n @property({ type: Boolean, reflect: true })\n public focused = false;\n\n @query('.input:not(#sizer)')\n protected inputElement!: HTMLInputElement | HTMLTextAreaElement;\n\n /**\n * Whether the `value` held by the form control is invalid.\n */\n @property({ type: Boolean, reflect: true })\n public invalid = false;\n\n /**\n * A string applied via `aria-label` to the form control when a user visible label is not provided.\n */\n @property()\n public label = '';\n\n /**\n * Name of the form control.\n */\n @property({ type: String, reflect: true })\n public name: string | undefined;\n\n /**\n * Text that appears in the form control when it has no value set\n */\n @property()\n public placeholder = '';\n\n @state()\n set type(val: TextfieldType) {\n const prev = this._type;\n this._type = val;\n this.requestUpdate('type', prev);\n }\n\n get type(): TextfieldType {\n return textfieldTypes.find((t) => t === this._type) ?? 'text';\n }\n\n /**\n * @private\n * This binding allows for invalid value for `type` to still be reflected to the DOM\n */\n @property({ attribute: 'type', reflect: true })\n private _type: TextfieldType = 'text';\n\n /**\n * Pattern the `value` must match to be valid\n */\n @property()\n public pattern?: string;\n\n /**\n * Whether a form control delivered with the `multiline` attribute will change size\n * vertically to accomodate longer input\n */\n @property({ type: Boolean, reflect: true })\n public grows = false;\n\n /**\n * Defines the maximum string length that the user can enter\n */\n @property({ type: Number })\n public maxlength = -1;\n\n /**\n * Defines the minimum string length that the user can enter\n */\n @property({ type: Number })\n public minlength = -1;\n\n /**\n * Whether the form control should accept a value longer than one line\n */\n @property({ type: Boolean, reflect: true })\n public multiline = false;\n\n /**\n * Whether a user can interact with the value of the form control\n */\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n /**\n * The specific number of rows the form control should provide in the user interface\n */\n @property({ type: Number })\n public rows = -1;\n\n /**\n * Whether the `value` held by the form control is valid.\n */\n @property({ type: Boolean, reflect: true })\n public valid = false;\n\n /**\n * The value held by the form control\n */\n @property({ type: String })\n public set value(value: string | number) {\n if (value === this.value) {\n return;\n }\n const oldValue = this._value;\n this._value = value;\n this.requestUpdate('value', oldValue);\n }\n\n public get value(): string | number {\n return this._value;\n }\n\n protected _value: string | number = '';\n\n /**\n * Whether to display the form control with no visible background\n */\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n /**\n * Whether the form control will be found to be invalid when it holds no `value`\n */\n @property({ type: Boolean, reflect: true })\n public required = false;\n\n /**\n * What form of assistance should be provided when attempting to supply a value to the form control\n */\n @property({ type: String, reflect: true })\n public autocomplete?:\n | 'list'\n | 'none'\n | HTMLInputElement['autocomplete']\n | HTMLTextAreaElement['autocomplete'];\n\n public override get focusElement(): HTMLInputElement | HTMLTextAreaElement {\n return this.inputElement;\n }\n\n /**\n * Sets the start and end positions of the current selection.\n *\n * @param selectionStart The 0-based index of the first selected character. An index greater than the length of the\n * element's value is treated as pointing to the end of the value.\n * @param selectionEnd The 0-based index of the character after the last selected character. An index greater than\n * the length of the element's value is treated as pointing to the end of the value.\n * @param [selectionDirection=\"none\"] A string indicating the direction in which the selection is considered to\n * have been performed.\n */\n public setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ): void {\n this.inputElement.setSelectionRange(\n selectionStart,\n selectionEnd,\n selectionDirection\n );\n }\n\n /**\n * Selects all the text.\n */\n public select(): void {\n this.inputElement.select();\n }\n\n protected handleInput(_event: Event): void {\n if (this.allowedKeys && this.inputElement.value) {\n const regExp = new RegExp(`^[${this.allowedKeys}]*$`, 'u');\n if (!regExp.test(this.inputElement.value)) {\n const selectionStart = this.inputElement\n .selectionStart as number;\n const nextSelectStart = selectionStart - 1;\n this.inputElement.value = this.value.toString();\n this.inputElement.setSelectionRange(\n nextSelectStart,\n nextSelectStart\n );\n return;\n }\n }\n this.value = this.inputElement.value;\n }\n\n protected handleChange(): void {\n this.dispatchEvent(\n new Event('change', {\n bubbles: true,\n composed: true,\n })\n );\n }\n\n protected onFocus(): void {\n this.focused = !this.readonly && true;\n }\n\n protected onBlur(_event: FocusEvent): void {\n this.focused = !this.readonly && false;\n }\n\n protected handleInputElementPointerdown(): void {}\n\n protected renderStateIcons(): TemplateResult | typeof nothing {\n if (this.invalid) {\n return html`\n <sp-icon-alert id=\"invalid\" class=\"icon\"></sp-icon-alert>\n `;\n } else if (this.valid) {\n return html`\n <sp-icon-checkmark100\n id=\"valid\"\n class=\"icon spectrum-UIIcon-Checkmark100\"\n ></sp-icon-checkmark100>\n `;\n }\n return nothing;\n }\n\n protected get displayValue(): string {\n return this.value.toString();\n }\n\n // prettier-ignore\n private get renderMultiline(): TemplateResult {\n return html`\n ${this.multiline && this.grows && this.rows === -1\n ? html`\n <div id=\"sizer\" class=\"input\" aria-hidden=\"true\">${this.value}​\n </div>\n `\n : nothing}\n <!-- @ts-ignore -->\n <textarea\n name=${ifDefined(this.name || undefined)}\n aria-describedby=${this.helpTextId}\n aria-label=${this.label ||\n this.appliedLabel ||\n this.placeholder}\n aria-invalid=${ifDefined(this.invalid || undefined)}\n class=\"input\"\n maxlength=${ifDefined(\n this.maxlength > -1 ? this.maxlength : undefined\n )}\n minlength=${ifDefined(\n this.minlength > -1 ? this.minlength : undefined\n )}\n title=${this.invalid ? '' : nothing}\n pattern=${ifDefined(this.pattern)}\n placeholder=${this.placeholder}\n .value=${this.displayValue}\n @change=${this.handleChange}\n @input=${this.handleInput}\n @focus=${this.onFocus}\n @blur=${this.onBlur}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readonly}\n rows=${ifDefined(this.rows > -1 ? this.rows : undefined)}\n autocomplete=${ifDefined(this.autocomplete)}\n ></textarea>\n `;\n }\n\n private get renderInput(): TemplateResult {\n return html`\n <!-- @ts-ignore -->\n <input\n name=${ifDefined(this.name || undefined)}\n type=${this.type}\n aria-describedby=${this.helpTextId}\n aria-label=${this.label ||\n this.appliedLabel ||\n this.placeholder}\n aria-invalid=${ifDefined(this.invalid || undefined)}\n class=\"input\"\n title=${this.invalid ? '' : nothing}\n maxlength=${ifDefined(\n this.maxlength > -1 ? this.maxlength : undefined\n )}\n minlength=${ifDefined(\n this.minlength > -1 ? this.minlength : undefined\n )}\n pattern=${ifDefined(this.pattern)}\n placeholder=${this.placeholder}\n .value=${live(this.displayValue)}\n @change=${this.handleChange}\n @input=${this.handleInput}\n @pointerdown=${this.handleInputElementPointerdown}\n @focus=${this.onFocus}\n @blur=${this.onBlur}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readonly}\n autocomplete=${ifDefined(this.autocomplete)}\n />\n `;\n }\n\n protected renderField(): TemplateResult {\n return html`\n ${this.renderStateIcons()}\n ${this.multiline ? this.renderMultiline : this.renderInput}\n `;\n }\n\n protected override render(): TemplateResult {\n return html`\n <div id=\"textfield\">${this.renderField()}</div>\n ${this.renderHelpText(this.invalid)}\n `;\n }\n\n protected override update(changedProperties: PropertyValues): void {\n if (\n changedProperties.has('value') ||\n (changedProperties.has('required') && this.required)\n ) {\n this.updateComplete.then(() => {\n this.checkValidity();\n });\n }\n super.update(changedProperties);\n }\n\n public checkValidity(): boolean {\n let validity = this.inputElement.checkValidity();\n if (this.required || (this.value && this.pattern)) {\n if ((this.disabled || this.multiline) && this.pattern) {\n const regex = new RegExp(`^${this.pattern}$`, 'u');\n validity = regex.test(this.value.toString());\n }\n if (typeof this.minlength !== 'undefined') {\n validity =\n validity && this.value.toString().length >= this.minlength;\n }\n this.valid = validity;\n this.invalid = !validity;\n }\n return validity;\n }\n}\n\n/**\n * @element sp-textfield\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 */\nexport class Textfield extends TextfieldBase {\n @property({ type: String })\n public override set value(value: string) {\n if (value === this.value) {\n return;\n }\n const oldValue = this._value;\n this._value = value;\n this.requestUpdate('value', oldValue);\n }\n\n public override get value(): string {\n return this._value;\n }\n\n protected override _value = '';\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAYA;AAAA,EAEI;AAAA,EACA;AAAA,EAEA;AAAA,OAEG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,OACG;AAEP,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,OAAO;AACP,OAAO;AAEP,OAAO,qBAAqB;AAC5B,OAAO,qBAAqB;AAC5B,OAAO,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