@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.18 → 0.0.0-pr624.19

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.
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -21,6 +21,7 @@ Generate unique names for dependency components.
21
21
  | [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value. |
22
22
  | [errorMessage](#errorMessage) | `errorMessage` | `string` | | Contains the help text message for the current validity error. |
23
23
  | [format](#format) | `format` | `string` | | Specifies the input mask format. |
24
+ | [hideInputVisually](#hideInputVisually) | `hideInputVisually` | `boolean` | | |
24
25
  | [icon](#icon) | `icon` | `boolean` | false | If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format. |
25
26
  | [id](#id) | `id` | `string` | | The id global attribute defines an identifier (ID) which must be unique in the whole document. |
26
27
  | [inputmode](#inputmode) | `inputmode` | `string` | | Exposes inputmode attribute for input. |
@@ -5985,22 +5985,17 @@ class BaseInput extends AuroElement$2 {
5985
5985
  * @returns {void}
5986
5986
  */
5987
5987
  getPlaceholder() {
5988
- const isFocused = this.inputElement === this.getActiveElement();
5988
+ this.inputElement === this.getActiveElement();
5989
5989
 
5990
5990
  // console.warn('isFocused', isFocused);
5991
5991
  // console.warn(this.inputElement);
5992
5992
  // console.warn(this.getActiveElement());
5993
5993
 
5994
- if (!isFocused) {
5995
- if (this.placeholder) {
5996
- this.placeholderStr = this.placeholder;
5997
- // return this.placeholder;
5998
- } else if (this.type === 'date') {
5999
- this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
6000
- // return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
6001
- }
6002
- } else {
6003
- this.placeholderStr = '';
5994
+ // if (!isFocused) {
5995
+ if (this.placeholder) {
5996
+ this.placeholderStr = this.placeholder;
5997
+ } else if (this.type === 'date') {
5998
+ this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
6004
5999
  }
6005
6000
 
6006
6001
  this.requestUpdate();
@@ -7893,6 +7888,20 @@ class AuroInput extends BaseInput {
7893
7888
  this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion, AuroIcon);
7894
7889
  }
7895
7890
 
7891
+ static get properties() {
7892
+ return {
7893
+ ...super.properties,
7894
+
7895
+ /**
7896
+ * @type {boolean}
7897
+ */
7898
+ hideInputVisually: {
7899
+ type: Boolean,
7900
+ reflect: true,
7901
+ }
7902
+ };
7903
+ }
7904
+
7896
7905
  static get styles() {
7897
7906
  return [
7898
7907
  i$5`${classicStyleCss}`,
@@ -7927,8 +7936,13 @@ class AuroInput extends BaseInput {
7927
7936
  * @returns {object} - Returns classmap.
7928
7937
  */
7929
7938
  get commonInputClasses() {
7939
+ console.log(`hideInputVisually: ${JSON.stringify(this.hideInputVisually)}`);
7930
7940
  return {
7931
- 'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7941
+ 'util_displayHiddenVisually': this.hideInputVisually !== undefined
7942
+ ? this.hideInputVisually
7943
+ // eslint-disable-next-line no-warning-comments
7944
+ // TODO: refactor this to use a less brittle/forced solution.
7945
+ : this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7932
7946
  };
7933
7947
  }
7934
7948
 
@@ -7940,7 +7954,10 @@ class AuroInput extends BaseInput {
7940
7954
  get legacyInputClasses() {
7941
7955
  return {
7942
7956
  ...this.commonInputClasses,
7943
- 'util_displayHiddenVisually': !this.hasFocus && !this.value
7957
+ 'util_displayHiddenVisually':
7958
+ this.hideInputVisually !== undefined
7959
+ ? this.hideInputVisually
7960
+ : !this.hasFocus && !this.value
7944
7961
  };
7945
7962
  }
7946
7963
 
@@ -5910,22 +5910,17 @@ class BaseInput extends AuroElement$2 {
5910
5910
  * @returns {void}
5911
5911
  */
5912
5912
  getPlaceholder() {
5913
- const isFocused = this.inputElement === this.getActiveElement();
5913
+ this.inputElement === this.getActiveElement();
5914
5914
 
5915
5915
  // console.warn('isFocused', isFocused);
5916
5916
  // console.warn(this.inputElement);
5917
5917
  // console.warn(this.getActiveElement());
5918
5918
 
5919
- if (!isFocused) {
5920
- if (this.placeholder) {
5921
- this.placeholderStr = this.placeholder;
5922
- // return this.placeholder;
5923
- } else if (this.type === 'date') {
5924
- this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5925
- // return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5926
- }
5927
- } else {
5928
- this.placeholderStr = '';
5919
+ // if (!isFocused) {
5920
+ if (this.placeholder) {
5921
+ this.placeholderStr = this.placeholder;
5922
+ } else if (this.type === 'date') {
5923
+ this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5929
5924
  }
5930
5925
 
5931
5926
  this.requestUpdate();
@@ -7818,6 +7813,20 @@ class AuroInput extends BaseInput {
7818
7813
  this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion, AuroIcon);
7819
7814
  }
7820
7815
 
7816
+ static get properties() {
7817
+ return {
7818
+ ...super.properties,
7819
+
7820
+ /**
7821
+ * @type {boolean}
7822
+ */
7823
+ hideInputVisually: {
7824
+ type: Boolean,
7825
+ reflect: true,
7826
+ }
7827
+ };
7828
+ }
7829
+
7821
7830
  static get styles() {
7822
7831
  return [
7823
7832
  i$5`${classicStyleCss}`,
@@ -7852,8 +7861,13 @@ class AuroInput extends BaseInput {
7852
7861
  * @returns {object} - Returns classmap.
7853
7862
  */
7854
7863
  get commonInputClasses() {
7864
+ console.log(`hideInputVisually: ${JSON.stringify(this.hideInputVisually)}`);
7855
7865
  return {
7856
- 'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7866
+ 'util_displayHiddenVisually': this.hideInputVisually !== undefined
7867
+ ? this.hideInputVisually
7868
+ // eslint-disable-next-line no-warning-comments
7869
+ // TODO: refactor this to use a less brittle/forced solution.
7870
+ : this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7857
7871
  };
7858
7872
  }
7859
7873
 
@@ -7865,7 +7879,10 @@ class AuroInput extends BaseInput {
7865
7879
  get legacyInputClasses() {
7866
7880
  return {
7867
7881
  ...this.commonInputClasses,
7868
- 'util_displayHiddenVisually': !this.hasFocus && !this.value
7882
+ 'util_displayHiddenVisually':
7883
+ this.hideInputVisually !== undefined
7884
+ ? this.hideInputVisually
7885
+ : !this.hasFocus && !this.value
7869
7886
  };
7870
7887
  }
7871
7888
 
@@ -1,4 +1,178 @@
1
1
  export class AuroInput extends BaseInput {
2
+ static get properties(): {
3
+ /**
4
+ * @type {boolean}
5
+ */
6
+ hideInputVisually: boolean;
7
+ a11yRole: {
8
+ type: StringConstructor;
9
+ reflect: boolean;
10
+ };
11
+ a11yExpanded: {
12
+ type: BooleanConstructor;
13
+ reflect: boolean;
14
+ };
15
+ a11yControls: {
16
+ type: StringConstructor;
17
+ reflect: boolean;
18
+ };
19
+ activeLabel: {
20
+ type: BooleanConstructor;
21
+ reflect: boolean;
22
+ };
23
+ autocapitalize: {
24
+ type: StringConstructor;
25
+ reflect: boolean;
26
+ };
27
+ autocomplete: {
28
+ type: StringConstructor;
29
+ reflect: boolean;
30
+ };
31
+ autocorrect: {
32
+ type: StringConstructor;
33
+ reflect: boolean;
34
+ };
35
+ disabled: {
36
+ type: BooleanConstructor;
37
+ reflect: boolean;
38
+ };
39
+ error: {
40
+ type: StringConstructor;
41
+ reflect: boolean;
42
+ };
43
+ errorMessage: {
44
+ type: StringConstructor;
45
+ };
46
+ format: {
47
+ type: StringConstructor;
48
+ reflect: boolean;
49
+ };
50
+ icon: {
51
+ type: BooleanConstructor;
52
+ reflect: boolean;
53
+ };
54
+ inputmode: {
55
+ type: StringConstructor;
56
+ reflect: boolean;
57
+ };
58
+ lang: {
59
+ type: StringConstructor;
60
+ reflect: boolean;
61
+ };
62
+ max: {
63
+ type: StringConstructor;
64
+ };
65
+ maxLength: {
66
+ type: NumberConstructor;
67
+ reflect: boolean;
68
+ };
69
+ min: {
70
+ type: StringConstructor;
71
+ };
72
+ minLength: {
73
+ type: NumberConstructor;
74
+ reflect: boolean;
75
+ };
76
+ name: {
77
+ type: StringConstructor;
78
+ reflect: boolean;
79
+ };
80
+ nested: {
81
+ type: BooleanConstructor;
82
+ reflect: boolean;
83
+ };
84
+ noValidate: {
85
+ type: BooleanConstructor;
86
+ reflect: boolean;
87
+ };
88
+ onDark: {
89
+ type: BooleanConstructor;
90
+ reflect: boolean;
91
+ };
92
+ pattern: {
93
+ type: StringConstructor;
94
+ reflect: boolean;
95
+ };
96
+ placeholder: {
97
+ type: StringConstructor;
98
+ reflect: boolean;
99
+ };
100
+ readonly: {
101
+ type: BooleanConstructor;
102
+ reflect: boolean;
103
+ };
104
+ required: {
105
+ type: BooleanConstructor;
106
+ reflect: boolean;
107
+ };
108
+ showPassword: {
109
+ state: boolean;
110
+ };
111
+ setCustomValidity: {
112
+ type: StringConstructor;
113
+ };
114
+ setCustomValidityBadInput: {
115
+ type: StringConstructor;
116
+ };
117
+ setCustomValidityCustomError: {
118
+ type: StringConstructor;
119
+ };
120
+ setCustomValidityForType: {
121
+ type: StringConstructor;
122
+ };
123
+ setCustomValidityRangeOverflow: {
124
+ type: StringConstructor;
125
+ };
126
+ setCustomValidityRangeUnderflow: {
127
+ type: StringConstructor;
128
+ };
129
+ setCustomValidityTooLong: {
130
+ type: StringConstructor;
131
+ };
132
+ setCustomValidityTooShort: {
133
+ type: StringConstructor;
134
+ };
135
+ setCustomValidityValueMissing: {
136
+ type: StringConstructor;
137
+ };
138
+ simple: {
139
+ type: BooleanConstructor;
140
+ reflect: boolean;
141
+ };
142
+ customValidityTypeEmail: {
143
+ type: StringConstructor;
144
+ };
145
+ spellcheck: {
146
+ type: StringConstructor;
147
+ reflect: boolean;
148
+ };
149
+ type: {
150
+ type: StringConstructor;
151
+ reflect: boolean;
152
+ };
153
+ value: {
154
+ type: StringConstructor;
155
+ reflect: boolean;
156
+ };
157
+ validateOnInput: {
158
+ type: BooleanConstructor;
159
+ };
160
+ validity: {
161
+ type: StringConstructor;
162
+ reflect: boolean;
163
+ };
164
+ touched: boolean;
165
+ inputId: {
166
+ type: StringConstructor;
167
+ reflect: boolean;
168
+ attribute: boolean;
169
+ };
170
+ layout: {
171
+ type: StringConstructor;
172
+ attribute: string;
173
+ reflect: boolean;
174
+ };
175
+ };
2
176
  static get styles(): import("lit").CSSResult[];
3
177
  /**
4
178
  * This will register this element with the browser.
@@ -5834,22 +5834,17 @@ class BaseInput extends AuroElement$2 {
5834
5834
  * @returns {void}
5835
5835
  */
5836
5836
  getPlaceholder() {
5837
- const isFocused = this.inputElement === this.getActiveElement();
5837
+ this.inputElement === this.getActiveElement();
5838
5838
 
5839
5839
  // console.warn('isFocused', isFocused);
5840
5840
  // console.warn(this.inputElement);
5841
5841
  // console.warn(this.getActiveElement());
5842
5842
 
5843
- if (!isFocused) {
5844
- if (this.placeholder) {
5845
- this.placeholderStr = this.placeholder;
5846
- // return this.placeholder;
5847
- } else if (this.type === 'date') {
5848
- this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5849
- // return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5850
- }
5851
- } else {
5852
- this.placeholderStr = '';
5843
+ // if (!isFocused) {
5844
+ if (this.placeholder) {
5845
+ this.placeholderStr = this.placeholder;
5846
+ } else if (this.type === 'date') {
5847
+ this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5853
5848
  }
5854
5849
 
5855
5850
  this.requestUpdate();
@@ -7742,6 +7737,20 @@ class AuroInput extends BaseInput {
7742
7737
  this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion, AuroIcon);
7743
7738
  }
7744
7739
 
7740
+ static get properties() {
7741
+ return {
7742
+ ...super.properties,
7743
+
7744
+ /**
7745
+ * @type {boolean}
7746
+ */
7747
+ hideInputVisually: {
7748
+ type: Boolean,
7749
+ reflect: true,
7750
+ }
7751
+ };
7752
+ }
7753
+
7745
7754
  static get styles() {
7746
7755
  return [
7747
7756
  css`${classicStyleCss}`,
@@ -7776,8 +7785,13 @@ class AuroInput extends BaseInput {
7776
7785
  * @returns {object} - Returns classmap.
7777
7786
  */
7778
7787
  get commonInputClasses() {
7788
+ console.log(`hideInputVisually: ${JSON.stringify(this.hideInputVisually)}`);
7779
7789
  return {
7780
- 'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7790
+ 'util_displayHiddenVisually': this.hideInputVisually !== undefined
7791
+ ? this.hideInputVisually
7792
+ // eslint-disable-next-line no-warning-comments
7793
+ // TODO: refactor this to use a less brittle/forced solution.
7794
+ : this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7781
7795
  };
7782
7796
  }
7783
7797
 
@@ -7789,7 +7803,10 @@ class AuroInput extends BaseInput {
7789
7803
  get legacyInputClasses() {
7790
7804
  return {
7791
7805
  ...this.commonInputClasses,
7792
- 'util_displayHiddenVisually': !this.hasFocus && !this.value
7806
+ 'util_displayHiddenVisually':
7807
+ this.hideInputVisually !== undefined
7808
+ ? this.hideInputVisually
7809
+ : !this.hasFocus && !this.value
7793
7810
  };
7794
7811
  }
7795
7812
 
@@ -5834,22 +5834,17 @@ class BaseInput extends AuroElement$2 {
5834
5834
  * @returns {void}
5835
5835
  */
5836
5836
  getPlaceholder() {
5837
- const isFocused = this.inputElement === this.getActiveElement();
5837
+ this.inputElement === this.getActiveElement();
5838
5838
 
5839
5839
  // console.warn('isFocused', isFocused);
5840
5840
  // console.warn(this.inputElement);
5841
5841
  // console.warn(this.getActiveElement());
5842
5842
 
5843
- if (!isFocused) {
5844
- if (this.placeholder) {
5845
- this.placeholderStr = this.placeholder;
5846
- // return this.placeholder;
5847
- } else if (this.type === 'date') {
5848
- this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5849
- // return this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5850
- }
5851
- } else {
5852
- this.placeholderStr = '';
5843
+ // if (!isFocused) {
5844
+ if (this.placeholder) {
5845
+ this.placeholderStr = this.placeholder;
5846
+ } else if (this.type === 'date') {
5847
+ this.placeholderStr = this.format ? this.format.toUpperCase() : 'MM/DD/YYYY';
5853
5848
  }
5854
5849
 
5855
5850
  this.requestUpdate();
@@ -7742,6 +7737,20 @@ class AuroInput extends BaseInput {
7742
7737
  this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion, AuroIcon);
7743
7738
  }
7744
7739
 
7740
+ static get properties() {
7741
+ return {
7742
+ ...super.properties,
7743
+
7744
+ /**
7745
+ * @type {boolean}
7746
+ */
7747
+ hideInputVisually: {
7748
+ type: Boolean,
7749
+ reflect: true,
7750
+ }
7751
+ };
7752
+ }
7753
+
7745
7754
  static get styles() {
7746
7755
  return [
7747
7756
  css`${classicStyleCss}`,
@@ -7776,8 +7785,13 @@ class AuroInput extends BaseInput {
7776
7785
  * @returns {object} - Returns classmap.
7777
7786
  */
7778
7787
  get commonInputClasses() {
7788
+ console.log(`hideInputVisually: ${JSON.stringify(this.hideInputVisually)}`);
7779
7789
  return {
7780
- 'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7790
+ 'util_displayHiddenVisually': this.hideInputVisually !== undefined
7791
+ ? this.hideInputVisually
7792
+ // eslint-disable-next-line no-warning-comments
7793
+ // TODO: refactor this to use a less brittle/forced solution.
7794
+ : this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7781
7795
  };
7782
7796
  }
7783
7797
 
@@ -7789,7 +7803,10 @@ class AuroInput extends BaseInput {
7789
7803
  get legacyInputClasses() {
7790
7804
  return {
7791
7805
  ...this.commonInputClasses,
7792
- 'util_displayHiddenVisually': !this.hasFocus && !this.value
7806
+ 'util_displayHiddenVisually':
7807
+ this.hideInputVisually !== undefined
7808
+ ? this.hideInputVisually
7809
+ : !this.hasFocus && !this.value
7793
7810
  };
7794
7811
  }
7795
7812
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr624.18",
3
+ "version": "0.0.0-pr624.19",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {