You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2020. It is now read-only.
feat(text-field): optimize instantiation process (#490)
* chore(package): update @babel/core to version 7.4.0
* chore(package): update @babel/plugin-proposal-object-rest-spread to version 7.4.0
* chore(package): update @babel/preset-env to version 7.4.1
* feat(text-field-icon): add icon prop
fix(text-field-character-counter): avoid props being overwrite unexpectedly
fix(text-field): lint
docs(text-field): simplify
* fix(text-field): make props like outlined, fullWidth more reactive; add provide/inject for better instantiation
* feat: use instances created by parent
Following component will use instance created by parent, if their parent is `m-text-field`: `m-floating-label`, `m-line-ripple`, `m-notched-outline` and `m-text-field-icon`
* fix(text-field): helper text doesn't instantiate correctly
feat(text-field): add helper line component
BREAKING CHANGE: now helper text and character counter should be placed in the helper line component
* test(text-field): update snapshots and lint files
* feat(text-field): add slot characterCounter for textarea
update docs
* test(text-field): update snapshots
| disabled | Boolean | false | whether the textfield should be disabled |
48
-
|upgraded| Boolean | false |whether the textfield should be upgraded when it already has a value (FOUC)|
49
-
|fullWidth| Boolean | false |expand the textfield to max width|
50
-
|box| Boolean | false |draws a box around the textfield|
51
-
|outlined| Boolean | false |draws an outer line around input field (NotchedOutline component also needed)|
52
-
|dense| Boolean | false |whether the textfield should be dense|
53
-
|focused| Boolean |false| whether the textfield should be in focus |
54
-
|textarea| Boolean |false|whether the textfield should be a textarea|
138
+
| value | String | '' |text field value |
139
+
| disabled | Boolean | false | whether the text field should be disabled |
140
+
|fullWidth| Boolean | false |Styles the text field as a full width text field.|
141
+
|outlined| Boolean | false |Styles the text field as an outlined text field.|
142
+
|dense| Boolean | false |Styles the text field as a dense text field, will be removed in an upcoming release|
143
+
|focused| Boolean | false |Styles the text field as a text field in focus. |
144
+
|textarea| Boolean | false |Indicates the text field is a <textarea>.|
145
+
|useNativeValidation| Boolean |true|Sets whether to check native HTML validity state (true, default) or custom validity state when updating styles (false). |
146
+
|valid| Boolean |true|Sets custom validity and updates styles accordingly. Note that native validation will still be honored subsequently unless useNativeValidation is also false.|
55
147
56
148
### Slots
57
149
58
150
| Slot | Description |
59
151
|------|-------------|
60
-
| default |textfield label |
152
+
| default |text field label |
61
153
| leadingIcon | icon component |
62
154
| trailingIcon | icon component |
63
155
| bottomLine | line-ripple component |
156
+
| characterCounter | character counter component, only available in textarea |
64
157
65
158
Non prop attributes and events are mapped to the inner input element.
66
159
67
-
## TextfieldHelperText
160
+
## Text Field Helper Text
161
+
162
+
> NOTE: Place this inside `<m-text-filed-helper-line>` which is an immediate sibling of `<m-text-field>`.
68
163
69
164
### Props
70
165
71
166
| Prop | Type | Default | Description |
72
167
|------|------|---------|-------------|
73
-
| persistent | Boolean | false |whether the helpertext should be persistent|
74
-
| validationMsg | Boolean | false |whether the text should be used as validation message |
168
+
| persistent | Boolean | false |Makes the helper text permanently visible.|
169
+
| validationMsg | Boolean | false |Indicates the helper text is a validation message.|
75
170
76
171
### Slots
77
172
78
173
| Slot | Description |
79
174
|------|-------------|
80
-
| default | helpertext text |
175
+
| default | helper text text |
176
+
177
+
## Text Field Icon
178
+
179
+
Icons describe the type of input a text field requires. They can also be interaction targets.
0 commit comments