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
* fix: add type of the text-field component
* feat: add min and max properties to text-field component
* feat: add minLength and maxLenght properties to text-field component
* feat: add pattern property to text-field component
* feat: add step property to text-field component
* feat: add types for inputmode property to text-field component
* style: clean types
* style: clean types
* fix: simplify the textfield props
Copy file name to clipboardexpand all lines: src/text-field/index.ts
+10-2
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,23 @@ import { inputStyles } from '../input';
13
13
* @prop {string} [label=''] - The label for the text field.
14
14
* @prop {string} [name=''] - The name of the text field.
15
15
* @prop {string} [placeholder=''] - The placeholder text for the text field.
16
-
* @prop {string} [inputmode=''] - The input mode for the text field.
17
-
* @prop {string} [type=''] - The type of the text field.
16
+
* @prop {'none'|'text'|'tel'|'url'|'email'|'numeric'|'decimal'|'search'} [inputmode] - The input mode for the text field.
17
+
* @prop {'text'|'date'|'month'|'time'|'week'|'datetime-local'|'number'|'password'|'search'|'tel'|'url'|'email'} [type='text'] - The type of the text field.
18
18
* @prop {string} [autocomplete=''] - The autocomplete attribute for the text field.
19
+
* @prop {number} [max] - The maximum value of the text field; only applying to text fields with these types: `date`, `month`, `week`, `time`, `datetime-local`, `number`.
20
+
* @prop {number} [min] - The minimum value of the text field; only applying to text fields with these types: `date`, `month`, `week`, `time`, `datetime-local`, `number`.
21
+
* @prop {number} [maxLength] - The maximum length of the text field; only applying to text fields with these types: `text`, `search`, `url`, `tel`, `email`, `password`.
22
+
* @prop {number} [minLength] - The minimum length of the text field; only applying to text fields with these types: `text`, `search`, `url`, `tel`, `email`, `password`.
23
+
* @prop {string} [pattern] - The allowed regex pattern of the text field; only applying to text fields with these types: `text`, `search`, `url`, `tel`, `email`, `password`.
24
+
* @prop {number} [step] - The step of the text field; only applying to text fields with these types: `date`, `month`, `week`, `time`, `datetime-local`, `number`.
19
25
*
20
26
* @csspart [field] - The main container for the text field.
21
27
* @csspart [label] - The label for the text field.
22
28
* @csspart [container] - The container for the input and any leading/trailing elements.
23
29
* @csspart [input] - The input element.
24
30
* @csspart [caption] - The caption for the text field.
31
+
* @csspart [leading] - The leading for the text field.
32
+
* @csspart [trailing] - The trailing for the text field.
25
33
*
26
34
* @slot [leading] - the leading slot of the text-field
27
35
* @slot [trailing] - the trailing slot of the text-field
0 commit comments