@spectrum-web-components/textfield 0.13.12 → 0.13.13

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.
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "kind": "javascript-module",
7
- "path": "sp-textfield.ts",
7
+ "path": "sp-textfield.js",
8
8
  "declarations": [],
9
9
  "exports": [
10
10
  {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "kind": "javascript-module",
22
- "path": "src/Textfield.ts",
22
+ "path": "src/Textfield.js",
23
23
  "declarations": [
24
24
  {
25
25
  "kind": "class",
@@ -560,7 +560,7 @@
560
560
  "attribute": "value",
561
561
  "inheritedFrom": {
562
562
  "name": "TextfieldBase",
563
- "module": "src/Textfield.ts"
563
+ "module": "src/Textfield.js"
564
564
  }
565
565
  },
566
566
  {
@@ -573,7 +573,7 @@
573
573
  "default": "''",
574
574
  "inheritedFrom": {
575
575
  "name": "TextfieldBase",
576
- "module": "src/Textfield.ts"
576
+ "module": "src/Textfield.js"
577
577
  }
578
578
  },
579
579
  {
@@ -586,7 +586,7 @@
586
586
  "attribute": "allowed-keys",
587
587
  "inheritedFrom": {
588
588
  "name": "TextfieldBase",
589
- "module": "src/Textfield.ts"
589
+ "module": "src/Textfield.js"
590
590
  }
591
591
  },
592
592
  {
@@ -601,7 +601,7 @@
601
601
  "reflects": true,
602
602
  "inheritedFrom": {
603
603
  "name": "TextfieldBase",
604
- "module": "src/Textfield.ts"
604
+ "module": "src/Textfield.js"
605
605
  }
606
606
  },
607
607
  {
@@ -613,7 +613,7 @@
613
613
  "privacy": "protected",
614
614
  "inheritedFrom": {
615
615
  "name": "TextfieldBase",
616
- "module": "src/Textfield.ts"
616
+ "module": "src/Textfield.js"
617
617
  }
618
618
  },
619
619
  {
@@ -628,7 +628,7 @@
628
628
  "reflects": true,
629
629
  "inheritedFrom": {
630
630
  "name": "TextfieldBase",
631
- "module": "src/Textfield.ts"
631
+ "module": "src/Textfield.js"
632
632
  }
633
633
  },
634
634
  {
@@ -642,7 +642,7 @@
642
642
  "attribute": "label",
643
643
  "inheritedFrom": {
644
644
  "name": "TextfieldBase",
645
- "module": "src/Textfield.ts"
645
+ "module": "src/Textfield.js"
646
646
  }
647
647
  },
648
648
  {
@@ -656,7 +656,7 @@
656
656
  "attribute": "placeholder",
657
657
  "inheritedFrom": {
658
658
  "name": "TextfieldBase",
659
- "module": "src/Textfield.ts"
659
+ "module": "src/Textfield.js"
660
660
  }
661
661
  },
662
662
  {
@@ -671,7 +671,7 @@
671
671
  "reflects": true,
672
672
  "inheritedFrom": {
673
673
  "name": "TextfieldBase",
674
- "module": "src/Textfield.ts"
674
+ "module": "src/Textfield.js"
675
675
  }
676
676
  },
677
677
  {
@@ -682,7 +682,7 @@
682
682
  },
683
683
  "inheritedFrom": {
684
684
  "name": "TextfieldBase",
685
- "module": "src/Textfield.ts"
685
+ "module": "src/Textfield.js"
686
686
  }
687
687
  },
688
688
  {
@@ -695,7 +695,7 @@
695
695
  "attribute": "pattern",
696
696
  "inheritedFrom": {
697
697
  "name": "TextfieldBase",
698
- "module": "src/Textfield.ts"
698
+ "module": "src/Textfield.js"
699
699
  }
700
700
  },
701
701
  {
@@ -710,7 +710,7 @@
710
710
  "reflects": true,
711
711
  "inheritedFrom": {
712
712
  "name": "TextfieldBase",
713
- "module": "src/Textfield.ts"
713
+ "module": "src/Textfield.js"
714
714
  }
715
715
  },
716
716
  {
@@ -724,7 +724,7 @@
724
724
  "attribute": "maxlength",
725
725
  "inheritedFrom": {
726
726
  "name": "TextfieldBase",
727
- "module": "src/Textfield.ts"
727
+ "module": "src/Textfield.js"
728
728
  }
729
729
  },
730
730
  {
@@ -738,7 +738,7 @@
738
738
  "attribute": "minlength",
739
739
  "inheritedFrom": {
740
740
  "name": "TextfieldBase",
741
- "module": "src/Textfield.ts"
741
+ "module": "src/Textfield.js"
742
742
  }
743
743
  },
744
744
  {
@@ -753,7 +753,7 @@
753
753
  "reflects": true,
754
754
  "inheritedFrom": {
755
755
  "name": "TextfieldBase",
756
- "module": "src/Textfield.ts"
756
+ "module": "src/Textfield.js"
757
757
  }
758
758
  },
759
759
  {
@@ -768,7 +768,7 @@
768
768
  "reflects": true,
769
769
  "inheritedFrom": {
770
770
  "name": "TextfieldBase",
771
- "module": "src/Textfield.ts"
771
+ "module": "src/Textfield.js"
772
772
  }
773
773
  },
774
774
  {
@@ -783,7 +783,7 @@
783
783
  "reflects": true,
784
784
  "inheritedFrom": {
785
785
  "name": "TextfieldBase",
786
- "module": "src/Textfield.ts"
786
+ "module": "src/Textfield.js"
787
787
  }
788
788
  },
789
789
  {
@@ -798,7 +798,7 @@
798
798
  "reflects": true,
799
799
  "inheritedFrom": {
800
800
  "name": "TextfieldBase",
801
- "module": "src/Textfield.ts"
801
+ "module": "src/Textfield.js"
802
802
  }
803
803
  },
804
804
  {
@@ -813,7 +813,7 @@
813
813
  "reflects": true,
814
814
  "inheritedFrom": {
815
815
  "name": "TextfieldBase",
816
- "module": "src/Textfield.ts"
816
+ "module": "src/Textfield.js"
817
817
  }
818
818
  },
819
819
  {
@@ -827,7 +827,7 @@
827
827
  "reflects": true,
828
828
  "inheritedFrom": {
829
829
  "name": "TextfieldBase",
830
- "module": "src/Textfield.ts"
830
+ "module": "src/Textfield.js"
831
831
  }
832
832
  },
833
833
  {
@@ -839,7 +839,7 @@
839
839
  "privacy": "public",
840
840
  "inheritedFrom": {
841
841
  "name": "TextfieldBase",
842
- "module": "src/Textfield.ts"
842
+ "module": "src/Textfield.js"
843
843
  }
844
844
  },
845
845
  {
@@ -879,7 +879,7 @@
879
879
  "description": "Sets the start and end positions of the current selection.",
880
880
  "inheritedFrom": {
881
881
  "name": "TextfieldBase",
882
- "module": "src/Textfield.ts"
882
+ "module": "src/Textfield.js"
883
883
  }
884
884
  },
885
885
  {
@@ -894,7 +894,7 @@
894
894
  "description": "Selects all the text.",
895
895
  "inheritedFrom": {
896
896
  "name": "TextfieldBase",
897
- "module": "src/Textfield.ts"
897
+ "module": "src/Textfield.js"
898
898
  }
899
899
  },
900
900
  {
@@ -908,7 +908,7 @@
908
908
  },
909
909
  "inheritedFrom": {
910
910
  "name": "TextfieldBase",
911
- "module": "src/Textfield.ts"
911
+ "module": "src/Textfield.js"
912
912
  }
913
913
  },
914
914
  {
@@ -922,7 +922,7 @@
922
922
  },
923
923
  "inheritedFrom": {
924
924
  "name": "TextfieldBase",
925
- "module": "src/Textfield.ts"
925
+ "module": "src/Textfield.js"
926
926
  }
927
927
  },
928
928
  {
@@ -936,7 +936,7 @@
936
936
  },
937
937
  "inheritedFrom": {
938
938
  "name": "TextfieldBase",
939
- "module": "src/Textfield.ts"
939
+ "module": "src/Textfield.js"
940
940
  }
941
941
  },
942
942
  {
@@ -950,7 +950,7 @@
950
950
  },
951
951
  "inheritedFrom": {
952
952
  "name": "TextfieldBase",
953
- "module": "src/Textfield.ts"
953
+ "module": "src/Textfield.js"
954
954
  }
955
955
  },
956
956
  {
@@ -964,7 +964,7 @@
964
964
  },
965
965
  "inheritedFrom": {
966
966
  "name": "TextfieldBase",
967
- "module": "src/Textfield.ts"
967
+ "module": "src/Textfield.js"
968
968
  }
969
969
  },
970
970
  {
@@ -976,7 +976,7 @@
976
976
  "privacy": "protected",
977
977
  "inheritedFrom": {
978
978
  "name": "TextfieldBase",
979
- "module": "src/Textfield.ts"
979
+ "module": "src/Textfield.js"
980
980
  }
981
981
  },
982
982
  {
@@ -988,7 +988,7 @@
988
988
  "privacy": "private",
989
989
  "inheritedFrom": {
990
990
  "name": "TextfieldBase",
991
- "module": "src/Textfield.ts"
991
+ "module": "src/Textfield.js"
992
992
  }
993
993
  },
994
994
  {
@@ -1000,7 +1000,7 @@
1000
1000
  "privacy": "private",
1001
1001
  "inheritedFrom": {
1002
1002
  "name": "TextfieldBase",
1003
- "module": "src/Textfield.ts"
1003
+ "module": "src/Textfield.js"
1004
1004
  }
1005
1005
  },
1006
1006
  {
@@ -1014,7 +1014,7 @@
1014
1014
  },
1015
1015
  "inheritedFrom": {
1016
1016
  "name": "TextfieldBase",
1017
- "module": "src/Textfield.ts"
1017
+ "module": "src/Textfield.js"
1018
1018
  }
1019
1019
  },
1020
1020
  {
@@ -1028,7 +1028,7 @@
1028
1028
  },
1029
1029
  "inheritedFrom": {
1030
1030
  "name": "TextfieldBase",
1031
- "module": "src/Textfield.ts"
1031
+ "module": "src/Textfield.js"
1032
1032
  }
1033
1033
  }
1034
1034
  ],
@@ -1270,7 +1270,7 @@
1270
1270
  "name": "TextfieldBase",
1271
1271
  "declaration": {
1272
1272
  "name": "TextfieldBase",
1273
- "module": "src/Textfield.ts"
1273
+ "module": "src/Textfield.js"
1274
1274
  }
1275
1275
  },
1276
1276
  {
@@ -1278,7 +1278,7 @@
1278
1278
  "name": "Textfield",
1279
1279
  "declaration": {
1280
1280
  "name": "Textfield",
1281
- "module": "src/Textfield.ts"
1281
+ "module": "src/Textfield.js"
1282
1282
  }
1283
1283
  }
1284
1284
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/textfield",
3
- "version": "0.13.12",
3
+ "version": "0.13.13",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -58,10 +58,10 @@
58
58
  ],
59
59
  "dependencies": {
60
60
  "@spectrum-web-components/base": "^0.7.4",
61
- "@spectrum-web-components/help-text": "^0.2.11",
62
- "@spectrum-web-components/icon": "^0.12.8",
63
- "@spectrum-web-components/icons-ui": "^0.9.9",
64
- "@spectrum-web-components/icons-workflow": "^0.9.9",
61
+ "@spectrum-web-components/help-text": "^0.2.12",
62
+ "@spectrum-web-components/icon": "^0.12.9",
63
+ "@spectrum-web-components/icons-ui": "^0.9.10",
64
+ "@spectrum-web-components/icons-workflow": "^0.9.10",
65
65
  "@spectrum-web-components/shared": "^0.15.5"
66
66
  },
67
67
  "devDependencies": {
@@ -73,5 +73,5 @@
73
73
  "./sp-*.js",
74
74
  "./**/*.dev.js"
75
75
  ],
76
- "gitHead": "5e11d828243bb3ff572c25b33a8d58844a89f524"
76
+ "gitHead": "1e25ee121f3bc838dbb99bac62f3c95857570f7a"
77
77
  }
@@ -234,7 +234,7 @@ export class TextfieldBase extends ManageHelpText(Focusable) {
234
234
  validity = regex.test(this.value.toString());
235
235
  }
236
236
  if (typeof this.minlength !== "undefined") {
237
- validity = validity && this.value.toString().length > this.minlength;
237
+ validity = validity && this.value.toString().length >= this.minlength;
238
238
  }
239
239
  this.valid = validity;
240
240
  this.invalid = !validity;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 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';\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(Focusable) {\n public static override get styles(): CSSResultArray {\n return [textfieldStyles, checkmarkStyles];\n }\n\n @property({ attribute: 'allowed-keys' })\n allowedKeys = '';\n\n @property({ type: Boolean, reflect: true })\n public focused = false;\n\n @query('.input')\n protected inputElement!: HTMLInputElement | HTMLTextAreaElement;\n\n @property({ type: Boolean, reflect: true })\n public invalid = false;\n\n @property()\n public label = '';\n\n @property()\n public placeholder = '';\n\n @property({ attribute: 'type', reflect: true })\n private _type: TextfieldType = 'text';\n\n @state()\n get type(): TextfieldType {\n return textfieldTypes.find((t) => t === this._type) ?? 'text';\n }\n\n set type(val: TextfieldType) {\n const prev = this._type;\n this._type = val;\n this.requestUpdate('type', prev);\n }\n\n @property()\n public pattern?: string;\n\n @property({ type: Boolean, reflect: true })\n public grows = false;\n\n @property({ type: Number })\n public maxlength = -1;\n\n @property({ type: Number })\n public minlength = -1;\n\n @property({ type: Boolean, reflect: true })\n public multiline = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n @property({ type: Boolean, reflect: true })\n public valid = false;\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 @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ type: Boolean, reflect: true })\n public required = false;\n\n @property({ type: String, reflect: true })\n public autocomplete?:\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(): 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(): void {\n this.focused = !this.readonly && false;\n }\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 private get renderMultiline(): TemplateResult {\n return html`\n ${this.grows && !this.quiet\n ? html`\n <div id=\"sizer\">${this.value}&#8203;</div>\n `\n : nothing}\n <!-- @ts-ignore -->\n <textarea\n aria-describedby=${this.helpTextId}\n aria-label=${this.label || 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 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 autocomplete=${ifDefined(this.autocomplete)}\n ></textarea>\n `;\n }\n\n private get renderInput(): TemplateResult {\n return html`\n <!-- @ts-ignore -->\n <input\n type=${this.type}\n aria-describedby=${this.helpTextId}\n aria-label=${this.label || 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 pattern=${ifDefined(this.pattern)}\n placeholder=${this.placeholder}\n .value=${live(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 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,OAGG;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;AAE5B,MAAM,iBAAiB,CAAC,QAAQ,OAAO,OAAO,SAAS,UAAU;AAO1D,aAAM,sBAAsB,eAAe,SAAS,EAAE;AAAA,EAAtD;AAAA;AAMH,uBAAc;AAGd,SAAO,UAAU;AAMjB,SAAO,UAAU;AAGjB,SAAO,QAAQ;AAGf,SAAO,cAAc;AAGrB,SAAQ,QAAuB;AAiB/B,SAAO,QAAQ;AAGf,SAAO,YAAY;AAGnB,SAAO,YAAY;AAGnB,SAAO,YAAY;AAGnB,SAAO,WAAW;AAGlB,SAAO,QAAQ;AAgBf,SAAU,SAA0B;AAGpC,SAAO,QAAQ;AAGf,SAAO,WAAW;AAAA;AAAA,EA7ElB,WAA2B,SAAyB;AAChD,WAAO,CAAC,iBAAiB,eAAe;AAAA,EAC5C;AAAA,EAwBA,IAAI,OAAsB;AAvE9B;AAwEQ,YAAO,oBAAe,KAAK,CAAC,MAAM,MAAM,KAAK,KAAK,MAA3C,YAAgD;AAAA,EAC3D;AAAA,EAEA,IAAI,KAAK,KAAoB;AACzB,UAAM,OAAO,KAAK;AAClB,SAAK,QAAQ;AACb,SAAK,cAA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AoB,MAAM,OAAe;AACrC,QAAI,UAAU,KAAK,OAAO;AACtB;AAAA,IACJ;AACA,UAAM,WAAW,KAAK;AACtB,SAAK,SAAS;AACd,SAAK,cAAc,SAAS,QAAQ;AAAA,EACxC;AAAA,EAEA,IAAoB,QAAgB;AAChC,WAAO,KAAK;AAAA,EAChB;AAGJ;AAdwB;AAAA,EADnB,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GADjB,UAEW;",
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 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';\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(Focusable) {\n public static override get styles(): CSSResultArray {\n return [textfieldStyles, checkmarkStyles];\n }\n\n @property({ attribute: 'allowed-keys' })\n allowedKeys = '';\n\n @property({ type: Boolean, reflect: true })\n public focused = false;\n\n @query('.input')\n protected inputElement!: HTMLInputElement | HTMLTextAreaElement;\n\n @property({ type: Boolean, reflect: true })\n public invalid = false;\n\n @property()\n public label = '';\n\n @property()\n public placeholder = '';\n\n @property({ attribute: 'type', reflect: true })\n private _type: TextfieldType = 'text';\n\n @state()\n get type(): TextfieldType {\n return textfieldTypes.find((t) => t === this._type) ?? 'text';\n }\n\n set type(val: TextfieldType) {\n const prev = this._type;\n this._type = val;\n this.requestUpdate('type', prev);\n }\n\n @property()\n public pattern?: string;\n\n @property({ type: Boolean, reflect: true })\n public grows = false;\n\n @property({ type: Number })\n public maxlength = -1;\n\n @property({ type: Number })\n public minlength = -1;\n\n @property({ type: Boolean, reflect: true })\n public multiline = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n @property({ type: Boolean, reflect: true })\n public valid = false;\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 @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ type: Boolean, reflect: true })\n public required = false;\n\n @property({ type: String, reflect: true })\n public autocomplete?:\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(): 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(): void {\n this.focused = !this.readonly && false;\n }\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 private get renderMultiline(): TemplateResult {\n return html`\n ${this.grows && !this.quiet\n ? html`\n <div id=\"sizer\">${this.value}&#8203;</div>\n `\n : nothing}\n <!-- @ts-ignore -->\n <textarea\n aria-describedby=${this.helpTextId}\n aria-label=${this.label || 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 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 autocomplete=${ifDefined(this.autocomplete)}\n ></textarea>\n `;\n }\n\n private get renderInput(): TemplateResult {\n return html`\n <!-- @ts-ignore -->\n <input\n type=${this.type}\n aria-describedby=${this.helpTextId}\n aria-label=${this.label || 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 pattern=${ifDefined(this.pattern)}\n placeholder=${this.placeholder}\n .value=${live(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 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,OAGG;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;AAE5B,MAAM,iBAAiB,CAAC,QAAQ,OAAO,OAAO,SAAS,UAAU;AAO1D,aAAM,sBAAsB,eAAe,SAAS,EAAE;AAAA,EAAtD;AAAA;AAMH,uBAAc;AAGd,SAAO,UAAU;AAMjB,SAAO,UAAU;AAGjB,SAAO,QAAQ;AAGf,SAAO,cAAc;AAGrB,SAAQ,QAAuB;AAiB/B,SAAO,QAAQ;AAGf,SAAO,YAAY;AAGnB,SAAO,YAAY;AAGnB,SAAO,YAAY;AAGnB,SAAO,WAAW;AAGlB,SAAO,QAAQ;AAgBf,SAAU,SAA0B;AAGpC,SAAO,QAAQ;AAGf,SAAO,WAAW;AAAA;AAAA,EA7ElB,WAA2B,SAAyB;AAChD,WAAO,CAAC,iBAAiB,eAAe;AAAA,EAC5C;AAAA,EAwBA,IAAI,OAAsB;AAvE9B;AAwEQ,YAAO,oBAAe,KAAK,CAAC,MAAM,MAAM,KAAK,KAAK,MAA3C,YAAgD;AAAA,EAC3D;AAAA,EAEA,IAAI,KAAK,KAAoB;AACzB,UAAM,OAAO,KAAK;AAClB,SAAK,QAAQ;AACb,SAAK,cAAc,QAAQ,IAAI;AAAA,EACnC;AAAA,EAwBA,IAAW,MAAM,OAAwB;AACrC,QAAI,UAAU,KAAK,OAAO;AACtB;AAAA,IACJ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ACd,SAAK,cAAc,SAAS,QAAQ;AAAA,EACxC;AAAA,EAEA,IAAoB,QAAgB;AAChC,WAAO,KAAK;AAAA,EAChB;AAGJ;AAdwB;AAAA,EADnB,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GADjB,UAEW;",
6
6
  "names": []
7
7
  }
package/src/Textfield.js CHANGED
@@ -57,5 +57,5 @@
57
57
  `}render(){return s`
58
58
  <div id="textfield">${this.renderField()}</div>
59
59
  ${this.renderHelpText(this.invalid)}
60
- `}update(e){(e.has("value")||e.has("required")&&this.required)&&this.updateComplete.then(()=>{this.checkValidity()}),super.update(e)}checkValidity(){let e=this.inputElement.checkValidity();return(this.required||this.value&&this.pattern)&&((this.disabled||this.multiline)&&this.pattern&&(e=new RegExp(`^${this.pattern}$`,"u").test(this.value.toString())),typeof this.minlength!="undefined"&&(e=e&&this.value.toString().length>this.minlength),this.valid=e,this.invalid=!e),e}}t([i({attribute:"allowed-keys"})],TextfieldBase.prototype,"allowedKeys",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"focused",2),t([v(".input")],TextfieldBase.prototype,"inputElement",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"invalid",2),t([i()],TextfieldBase.prototype,"label",2),t([i()],TextfieldBase.prototype,"placeholder",2),t([i({attribute:"type",reflect:!0})],TextfieldBase.prototype,"_type",2),t([y()],TextfieldBase.prototype,"type",1),t([i()],TextfieldBase.prototype,"pattern",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"grows",2),t([i({type:Number})],TextfieldBase.prototype,"maxlength",2),t([i({type:Number})],TextfieldBase.prototype,"minlength",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"multiline",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"readonly",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"valid",2),t([i({type:String})],TextfieldBase.prototype,"value",1),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"quiet",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"required",2),t([i({type:String,reflect:!0})],TextfieldBase.prototype,"autocomplete",2);export class Textfield extends TextfieldBase{constructor(){super(...arguments);this._value=""}set value(e){if(e===this.value)return;const l=this._value;this._value=e,this.requestUpdate("value",l)}get value(){return this._value}}t([i({type:String})],Textfield.prototype,"value",1);
60
+ `}update(e){(e.has("value")||e.has("required")&&this.required)&&this.updateComplete.then(()=>{this.checkValidity()}),super.update(e)}checkValidity(){let e=this.inputElement.checkValidity();return(this.required||this.value&&this.pattern)&&((this.disabled||this.multiline)&&this.pattern&&(e=new RegExp(`^${this.pattern}$`,"u").test(this.value.toString())),typeof this.minlength!="undefined"&&(e=e&&this.value.toString().length>=this.minlength),this.valid=e,this.invalid=!e),e}}t([i({attribute:"allowed-keys"})],TextfieldBase.prototype,"allowedKeys",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"focused",2),t([v(".input")],TextfieldBase.prototype,"inputElement",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"invalid",2),t([i()],TextfieldBase.prototype,"label",2),t([i()],TextfieldBase.prototype,"placeholder",2),t([i({attribute:"type",reflect:!0})],TextfieldBase.prototype,"_type",2),t([y()],TextfieldBase.prototype,"type",1),t([i()],TextfieldBase.prototype,"pattern",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"grows",2),t([i({type:Number})],TextfieldBase.prototype,"maxlength",2),t([i({type:Number})],TextfieldBase.prototype,"minlength",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"multiline",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"readonly",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"valid",2),t([i({type:String})],TextfieldBase.prototype,"value",1),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"quiet",2),t([i({type:Boolean,reflect:!0})],TextfieldBase.prototype,"required",2),t([i({type:String,reflect:!0})],TextfieldBase.prototype,"autocomplete",2);export class Textfield extends TextfieldBase{constructor(){super(...arguments);this._value=""}set value(e){if(e===this.value)return;const l=this._value;this._value=e,this.requestUpdate("value",l)}get value(){return this._value}}t([i({type:String})],Textfield.prototype,"value",1);
61
61
  //# sourceMappingURL=Textfield.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 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';\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(Focusable) {\n public static override get styles(): CSSResultArray {\n return [textfieldStyles, checkmarkStyles];\n }\n\n @property({ attribute: 'allowed-keys' })\n allowedKeys = '';\n\n @property({ type: Boolean, reflect: true })\n public focused = false;\n\n @query('.input')\n protected inputElement!: HTMLInputElement | HTMLTextAreaElement;\n\n @property({ type: Boolean, reflect: true })\n public invalid = false;\n\n @property()\n public label = '';\n\n @property()\n public placeholder = '';\n\n @property({ attribute: 'type', reflect: true })\n private _type: TextfieldType = 'text';\n\n @state()\n get type(): TextfieldType {\n return textfieldTypes.find((t) => t === this._type) ?? 'text';\n }\n\n set type(val: TextfieldType) {\n const prev = this._type;\n this._type = val;\n this.requestUpdate('type', prev);\n }\n\n @property()\n public pattern?: string;\n\n @property({ type: Boolean, reflect: true })\n public grows = false;\n\n @property({ type: Number })\n public maxlength = -1;\n\n @property({ type: Number })\n public minlength = -1;\n\n @property({ type: Boolean, reflect: true })\n public multiline = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n @property({ type: Boolean, reflect: true })\n public valid = false;\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 @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ type: Boolean, reflect: true })\n public required = false;\n\n @property({ type: String, reflect: true })\n public autocomplete?:\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(): 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(): void {\n this.focused = !this.readonly && false;\n }\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 private get renderMultiline(): TemplateResult {\n return html`\n ${this.grows && !this.quiet\n ? html`\n <div id=\"sizer\">${this.value}&#8203;</div>\n `\n : nothing}\n <!-- @ts-ignore -->\n <textarea\n aria-describedby=${this.helpTextId}\n aria-label=${this.label || 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 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 autocomplete=${ifDefined(this.autocomplete)}\n ></textarea>\n `;\n }\n\n private get renderInput(): TemplateResult {\n return html`\n <!-- @ts-ignore -->\n <input\n type=${this.type}\n aria-describedby=${this.helpTextId}\n aria-label=${this.label || 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 pattern=${ifDefined(this.pattern)}\n placeholder=${this.placeholder}\n .value=${live(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 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": "qNAYA,OAEI,QAAAA,EACA,WAAAC,MAGG,gCACP,OACI,aAAAC,EACA,QAAAC,MACG,kDACP,OACI,YAAAC,EACA,SAAAC,EACA,SAAAC,MACG,kDAEP,OAAS,kBAAAC,MAAsB,6DAC/B,OAAS,aAAAC,MAAiB,mDAC1B,MAAO,kEACP,MAAO,iEAEP,OAAOC,MAAqB,qBAC5B,OAAOC,MAAqB,mEAE5B,MAAMC,EAAiB,CAAC,OAAQ,MAAO,MAAO,QAAS,UAAU,EAO1D,aAAM,sBAAsBJ,EAAeC,CAAS,CAAE,CAAtD,kCAMH,iBAAc,GAGd,KAAO,QAAU,GAMjB,KAAO,QAAU,GAGjB,KAAO,MAAQ,GAGf,KAAO,YAAc,GAGrB,KAAQ,MAAuB,OAiB/B,KAAO,MAAQ,GAGf,KAAO,UAAY,GAGnB,KAAO,UAAY,GAGnB,KAAO,UAAY,GAGnB,KAAO,SAAW,GAGlB,KAAO,MAAQ,GAgBf,KAAU,OAA0B,GAGpC,KAAO,MAAQ,GAGf,KAAO,SAAW,GA7ElB,WAA2B,QAAyB,CAChD,MAAO,CAACC,EAAiBC,CAAe,CAC5C,CAwBA,IAAI,MAAsB,CAvE9B,IAAAE,EAwEQ,OAAOA,EAAAD,EAAe,KAAME,GAAMA,IAAM,KAAK,KAAK,IAA3C,KAAAD,EAAgD,MAC3D,CAEA,IAAI,KAAKE,EAAoB,CACzB,MAAMC,EAAO,KAAK,MAClB,KAAK,MAAQD,EACb,KAAK,cAAc,OAAQC,CAAI,CACnC,CAwBA,IAAW,MAAMC,EAAwB,CACrC,GAAIA,IAAU,KAAK,MACf,OAEJ,MAAMC,EAAW,KAAK,OACtB,KAAK,OAASD,EACd,KAAK,cAAc,QAASC,CAAQ,CACxC,CAEA,IAAW,OAAyB,CAChC,OAAO,KAAK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C,cAwDF,qBAGIoB,EAAA,CADVpB,EAAS,CAAE,KAAM,MAAO,CAAC,GA1DjB,cA2DE,qBAgBJoB,EAAA,CADNpB,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA1EjC,cA2EF,qBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA7EjC,cA8EF,wBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAhFhC,cAiFF,4BA6MJ,aAAM,kBAAkB,aAAc,CAAtC,kCAeH,KAAmB,OAAS,GAb5B,IAAoB,MAAMY,EAAe,CACrC,GAAIA,IAAU,KAAK,MACf,OAEJ,MAAMC,EAAW,KAAK,OACtB,KAAK,OAASD,EACd,KAAK,cAAc,QAASC,CAAQ,CACxC,CAEA,IAAoB,OAAgB,CAChC,OAAO,KAAK,MAChB,CAGJ,CAdwBO,EAAA,CADnBpB,EAAS,CAAE,KAAM,MAAO,CAAC,GADjB,UAEW",
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 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';\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(Focusable) {\n public static override get styles(): CSSResultArray {\n return [textfieldStyles, checkmarkStyles];\n }\n\n @property({ attribute: 'allowed-keys' })\n allowedKeys = '';\n\n @property({ type: Boolean, reflect: true })\n public focused = false;\n\n @query('.input')\n protected inputElement!: HTMLInputElement | HTMLTextAreaElement;\n\n @property({ type: Boolean, reflect: true })\n public invalid = false;\n\n @property()\n public label = '';\n\n @property()\n public placeholder = '';\n\n @property({ attribute: 'type', reflect: true })\n private _type: TextfieldType = 'text';\n\n @state()\n get type(): TextfieldType {\n return textfieldTypes.find((t) => t === this._type) ?? 'text';\n }\n\n set type(val: TextfieldType) {\n const prev = this._type;\n this._type = val;\n this.requestUpdate('type', prev);\n }\n\n @property()\n public pattern?: string;\n\n @property({ type: Boolean, reflect: true })\n public grows = false;\n\n @property({ type: Number })\n public maxlength = -1;\n\n @property({ type: Number })\n public minlength = -1;\n\n @property({ type: Boolean, reflect: true })\n public multiline = false;\n\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n @property({ type: Boolean, reflect: true })\n public valid = false;\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 @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ type: Boolean, reflect: true })\n public required = false;\n\n @property({ type: String, reflect: true })\n public autocomplete?:\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(): 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(): void {\n this.focused = !this.readonly && false;\n }\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 private get renderMultiline(): TemplateResult {\n return html`\n ${this.grows && !this.quiet\n ? html`\n <div id=\"sizer\">${this.value}&#8203;</div>\n `\n : nothing}\n <!-- @ts-ignore -->\n <textarea\n aria-describedby=${this.helpTextId}\n aria-label=${this.label || 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 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 autocomplete=${ifDefined(this.autocomplete)}\n ></textarea>\n `;\n }\n\n private get renderInput(): TemplateResult {\n return html`\n <!-- @ts-ignore -->\n <input\n type=${this.type}\n aria-describedby=${this.helpTextId}\n aria-label=${this.label || 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 pattern=${ifDefined(this.pattern)}\n placeholder=${this.placeholder}\n .value=${live(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 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": "qNAYA,OAEI,QAAAA,EACA,WAAAC,MAGG,gCACP,OACI,aAAAC,EACA,QAAAC,MACG,kDACP,OACI,YAAAC,EACA,SAAAC,EACA,SAAAC,MACG,kDAEP,OAAS,kBAAAC,MAAsB,6DAC/B,OAAS,aAAAC,MAAiB,mDAC1B,MAAO,kEACP,MAAO,iEAEP,OAAOC,MAAqB,qBAC5B,OAAOC,MAAqB,mEAE5B,MAAMC,EAAiB,CAAC,OAAQ,MAAO,MAAO,QAAS,UAAU,EAO1D,aAAM,sBAAsBJ,EAAeC,CAAS,CAAE,CAAtD,kCAMH,iBAAc,GAGd,KAAO,QAAU,GAMjB,KAAO,QAAU,GAGjB,KAAO,MAAQ,GAGf,KAAO,YAAc,GAGrB,KAAQ,MAAuB,OAiB/B,KAAO,MAAQ,GAGf,KAAO,UAAY,GAGnB,KAAO,UAAY,GAGnB,KAAO,UAAY,GAGnB,KAAO,SAAW,GAGlB,KAAO,MAAQ,GAgBf,KAAU,OAA0B,GAGpC,KAAO,MAAQ,GAGf,KAAO,SAAW,GA7ElB,WAA2B,QAAyB,CAChD,MAAO,CAACC,EAAiBC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S,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAxCjC,cAyCF,qBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,MAAO,CAAC,GA3CjB,cA4CF,yBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,MAAO,CAAC,GA9CjB,cA+CF,yBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAjDjC,cAkDF,yBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GApDjC,cAqDF,wBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAvDjC,cAwDF,qBAGIoB,EAAA,CADVpB,EAAS,CAAE,KAAM,MAAO,CAAC,GA1DjB,cA2DE,qBAgBJoB,EAAA,CADNpB,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA1EjC,cA2EF,qBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA7EjC,cA8EF,wBAGAoB,EAAA,CADNpB,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAhFhC,cAiFF,4BA6MJ,aAAM,kBAAkB,aAAc,CAAtC,kCAeH,KAAmB,OAAS,GAb5B,IAAoB,MAAMY,EAAe,CACrC,GAAIA,IAAU,KAAK,MACf,OAEJ,MAAMC,EAAW,KAAK,OACtB,KAAK,OAASD,EACd,KAAK,cAAc,QAASC,CAAQ,CACxC,CAEA,IAAoB,OAAgB,CAChC,OAAO,KAAK,MAChB,CAGJ,CAdwBO,EAAA,CADnBpB,EAAS,CAAE,KAAM,MAAO,CAAC,GADjB,UAEW",
6
6
  "names": ["html", "nothing", "ifDefined", "live", "property", "query", "state", "ManageHelpText", "Focusable", "textfieldStyles", "checkmarkStyles", "textfieldTypes", "_a", "t", "val", "prev", "value", "oldValue", "selectionStart", "selectionEnd", "selectionDirection", "nextSelectStart", "changedProperties", "validity", "__decorateClass"]
7
7
  }