@warp-ds/elements 2.9.0-next.5 → 2.9.0

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.
Files changed (79) hide show
  1. package/dist/custom-elements.json +221 -118
  2. package/dist/docs/affix/affix.md +49 -61
  3. package/dist/docs/affix/api.md +25 -23
  4. package/dist/docs/affix/examples.md +24 -38
  5. package/dist/docs/alert/accessibility.md +4 -9
  6. package/dist/docs/alert/alert.md +36 -51
  7. package/dist/docs/alert/api.md +12 -12
  8. package/dist/docs/alert/examples.md +20 -30
  9. package/dist/docs/attention/accessibility.md +50 -0
  10. package/dist/docs/attention/api.md +72 -59
  11. package/dist/docs/attention/attention.md +305 -56
  12. package/dist/docs/attention/examples.md +91 -0
  13. package/dist/docs/attention/usage.md +91 -0
  14. package/dist/docs/badge/accessibility.md +44 -0
  15. package/dist/docs/badge/api.md +12 -8
  16. package/dist/docs/badge/badge.md +178 -10
  17. package/dist/docs/badge/examples.md +69 -0
  18. package/dist/docs/badge/usage.md +53 -0
  19. package/dist/docs/button/api.md +46 -42
  20. package/dist/docs/button/button.md +46 -42
  21. package/dist/docs/card/api.md +11 -11
  22. package/dist/docs/card/card.md +11 -11
  23. package/dist/docs/combobox/api.md +62 -62
  24. package/dist/docs/combobox/combobox.md +62 -62
  25. package/dist/docs/datepicker/api.md +74 -66
  26. package/dist/docs/datepicker/datepicker.md +74 -66
  27. package/dist/docs/expandable/api.md +26 -26
  28. package/dist/docs/expandable/expandable.md +26 -26
  29. package/dist/docs/link/api.md +28 -28
  30. package/dist/docs/link/link.md +28 -28
  31. package/dist/docs/page-indicator/api.md +6 -6
  32. package/dist/docs/page-indicator/page-indicator.md +6 -6
  33. package/dist/docs/pagination/api.md +3 -3
  34. package/dist/docs/pagination/pagination.md +3 -3
  35. package/dist/docs/pill/api.md +19 -15
  36. package/dist/docs/pill/pill.md +19 -15
  37. package/dist/docs/select/api.md +44 -44
  38. package/dist/docs/select/select.md +44 -44
  39. package/dist/docs/slider/api.md +80 -78
  40. package/dist/docs/slider/slider.md +80 -78
  41. package/dist/docs/slider-thumb/api.md +28 -76
  42. package/dist/docs/slider-thumb/slider-thumb.md +28 -76
  43. package/dist/docs/switch/api.md +16 -16
  44. package/dist/docs/switch/switch.md +16 -16
  45. package/dist/docs/tab/api.md +26 -40
  46. package/dist/docs/tab/tab.md +26 -40
  47. package/dist/docs/tab-panel/api.md +1 -17
  48. package/dist/docs/tab-panel/tab-panel.md +1 -17
  49. package/dist/docs/tabs/api.md +3 -3
  50. package/dist/docs/tabs/tabs.md +3 -3
  51. package/dist/docs/textarea/accessibility.md +5 -0
  52. package/dist/docs/textarea/api.md +52 -65
  53. package/dist/docs/textarea/examples.md +81 -0
  54. package/dist/docs/textarea/textarea.md +151 -65
  55. package/dist/docs/textarea/usage.md +9 -0
  56. package/dist/docs/textfield/accessibility.md +15 -0
  57. package/dist/docs/textfield/api.md +86 -83
  58. package/dist/docs/textfield/examples.md +130 -0
  59. package/dist/docs/textfield/textfield.md +258 -86
  60. package/dist/docs/textfield/usage.md +26 -0
  61. package/dist/index.d.ts +456 -330
  62. package/dist/packages/attention/attention.d.ts +46 -37
  63. package/dist/packages/attention/attention.js +20 -20
  64. package/dist/packages/attention/attention.js.map +3 -3
  65. package/dist/packages/badge/badge.d.ts +7 -5
  66. package/dist/packages/badge/badge.js.map +2 -2
  67. package/dist/packages/datepicker/datepicker.js +1 -1
  68. package/dist/packages/datepicker/datepicker.js.map +2 -2
  69. package/dist/packages/datepicker/datepicker.react.stories.d.ts +9 -1
  70. package/dist/packages/datepicker/react.d.ts +4 -0
  71. package/dist/packages/datepicker/react.js +4 -0
  72. package/dist/packages/textarea/textarea.d.ts +38 -29
  73. package/dist/packages/textarea/textarea.js.map +2 -2
  74. package/dist/packages/textfield/textfield.d.ts +57 -60
  75. package/dist/packages/textfield/textfield.js +5 -5
  76. package/dist/packages/textfield/textfield.js.map +2 -2
  77. package/dist/packages/textfield/textfield.react.stories.d.ts +1 -1
  78. package/dist/web-types.json +573 -153
  79. package/package.json +1 -2
@@ -16,48 +16,48 @@
16
16
 
17
17
  | Name | Type | Default | Summary |
18
18
  |-|-|-|-|
19
- | shadowRootOptions | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
20
- | name | `string` | `-` | - |
21
- | value | `string` | `-` | - |
22
19
  | checked | `boolean` | `false` | - |
23
20
  | disabled | `boolean` | `false` | - |
21
+ | name | `string` | `-` | - |
22
+ | shadowRootOptions | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
23
+ | value | `string` | `-` | - |
24
24
 
25
25
  ### Property Details
26
26
 
27
- #### shadowRootOptions
27
+ #### checked
28
28
 
29
29
 
30
30
 
31
- - Type: `object`
32
- - Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`
31
+ - Type: `boolean`
32
+ - Default: `false`
33
33
 
34
- #### name
34
+ #### disabled
35
35
 
36
36
 
37
37
 
38
- - Type: `string`
39
- - Default: `-`
38
+ - Type: `boolean`
39
+ - Default: `false`
40
40
 
41
- #### value
41
+ #### name
42
42
 
43
43
 
44
44
 
45
45
  - Type: `string`
46
46
  - Default: `-`
47
47
 
48
- #### checked
48
+ #### shadowRootOptions
49
49
 
50
50
 
51
51
 
52
- - Type: `boolean`
53
- - Default: `false`
52
+ - Type: `object`
53
+ - Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`
54
54
 
55
- #### disabled
55
+ #### value
56
56
 
57
57
 
58
58
 
59
- - Type: `boolean`
60
- - Default: `false`
59
+ - Type: `string`
60
+ - Default: `-`
61
61
 
62
62
  ### Types
63
63
 
@@ -4,67 +4,53 @@
4
4
 
5
5
  | Name | Type | Default | Summary |
6
6
  |-|-|-|-|
7
- | shadowRootOptions | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
8
- | id | `string` | `-` | - |
7
+ | _computedAriaSelected | `'true' \| 'false' \| undefined` | `-` | Computed aria-selected: prefers parent-managed, falls back to own property |
8
+ | active | `boolean` | `false` | **Deprecated**: Use `aria-selected="true"` instead |
9
+ | ariaSelected | `'true' \| 'false'` | `-` | - |
9
10
  | for | `string` | `-` | - |
10
- | tabIndex | `number` | `-` | - |
11
- | _computedAriaSelected | `'true' | 'false' | undefined` | `-` | - |
12
- | ariaSelected | `'true' | 'false'` | `-` | - |
13
- | active | `boolean` | `false` | - |
11
+ | id | `string` | `-` | - |
14
12
  | over | `boolean` | `false` | - |
15
- | _parentTabIndex | `unknown` | `-` | - |
16
- | _parentAriaSelected | `unknown` | `-` | - |
13
+ | shadowRootOptions | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
14
+ | tabIndex | `number` | `-` | Override tabIndex setter to set _parentTabIndex (for backwards compatibility). |
17
15
 
18
16
  ### Property Details
19
17
 
20
- #### shadowRootOptions
21
-
22
-
23
-
24
- - Type: `object`
25
- - Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`
26
-
27
- #### id
28
-
18
+ #### _computedAriaSelected
29
19
 
20
+ Computed aria-selected: prefers parent-managed, falls back to own property
30
21
 
31
- - Type: `string`
22
+ - Type: `'true' \| 'false' \| undefined`
32
23
  - Default: `-`
33
24
 
34
- #### for
35
-
25
+ #### active
36
26
 
27
+ **Deprecated**: Use `aria-selected="true"` instead
37
28
 
38
- - Type: `string`
39
- - Default: `-`
40
29
 
41
- #### tabIndex
42
30
 
43
- Override tabIndex setter to set _parentTabIndex (for backwards compatibility).
31
+ - Type: `boolean`
32
+ - Default: `false`
44
33
 
45
- - Type: `number`
46
- - Default: `-`
34
+ #### ariaSelected
47
35
 
48
- #### _computedAriaSelected
49
36
 
50
- Computed aria-selected: prefers parent-managed, falls back to own property
51
37
 
52
- - Type: `'true' | 'false' | undefined`
38
+ - Type: `'true' \| 'false'`
53
39
  - Default: `-`
54
40
 
55
- #### ariaSelected
41
+ #### for
56
42
 
57
43
 
58
44
 
59
- - Type: `'true' | 'false'`
45
+ - Type: `string`
60
46
  - Default: `-`
61
47
 
62
- #### active
48
+ #### id
63
49
 
64
50
 
65
51
 
66
- - Type: `boolean`
67
- - Default: `false`
52
+ - Type: `string`
53
+ - Default: `-`
68
54
 
69
55
  #### over
70
56
 
@@ -73,18 +59,18 @@ Computed aria-selected: prefers parent-managed, falls back to own property
73
59
  - Type: `boolean`
74
60
  - Default: `false`
75
61
 
76
- #### _parentTabIndex
77
-
62
+ #### shadowRootOptions
78
63
 
79
64
 
80
- - Type: `unknown`
81
- - Default: `-`
82
65
 
83
- #### _parentAriaSelected
66
+ - Type: `object`
67
+ - Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`
84
68
 
69
+ #### tabIndex
85
70
 
71
+ Override tabIndex setter to set _parentTabIndex (for backwards compatibility).
86
72
 
87
- - Type: `unknown`
73
+ - Type: `number`
88
74
  - Default: `-`
89
75
 
90
76
  ### Types
@@ -18,67 +18,53 @@ Individual tab component used within w-tabs container.
18
18
 
19
19
  | Name | Type | Default | Summary |
20
20
  |-|-|-|-|
21
- | shadowRootOptions | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
22
- | id | `string` | `-` | - |
21
+ | _computedAriaSelected | `'true' \| 'false' \| undefined` | `-` | Computed aria-selected: prefers parent-managed, falls back to own property |
22
+ | active | `boolean` | `false` | **Deprecated**: Use `aria-selected="true"` instead |
23
+ | ariaSelected | `'true' \| 'false'` | `-` | - |
23
24
  | for | `string` | `-` | - |
24
- | tabIndex | `number` | `-` | - |
25
- | _computedAriaSelected | `'true' | 'false' | undefined` | `-` | - |
26
- | ariaSelected | `'true' | 'false'` | `-` | - |
27
- | active | `boolean` | `false` | - |
25
+ | id | `string` | `-` | - |
28
26
  | over | `boolean` | `false` | - |
29
- | _parentTabIndex | `unknown` | `-` | - |
30
- | _parentAriaSelected | `unknown` | `-` | - |
27
+ | shadowRootOptions | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
28
+ | tabIndex | `number` | `-` | Override tabIndex setter to set _parentTabIndex (for backwards compatibility). |
31
29
 
32
30
  ### Property Details
33
31
 
34
- #### shadowRootOptions
35
-
36
-
37
-
38
- - Type: `object`
39
- - Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`
40
-
41
- #### id
42
-
32
+ #### _computedAriaSelected
43
33
 
34
+ Computed aria-selected: prefers parent-managed, falls back to own property
44
35
 
45
- - Type: `string`
36
+ - Type: `'true' \| 'false' \| undefined`
46
37
  - Default: `-`
47
38
 
48
- #### for
49
-
39
+ #### active
50
40
 
41
+ **Deprecated**: Use `aria-selected="true"` instead
51
42
 
52
- - Type: `string`
53
- - Default: `-`
54
43
 
55
- #### tabIndex
56
44
 
57
- Override tabIndex setter to set _parentTabIndex (for backwards compatibility).
45
+ - Type: `boolean`
46
+ - Default: `false`
58
47
 
59
- - Type: `number`
60
- - Default: `-`
48
+ #### ariaSelected
61
49
 
62
- #### _computedAriaSelected
63
50
 
64
- Computed aria-selected: prefers parent-managed, falls back to own property
65
51
 
66
- - Type: `'true' | 'false' | undefined`
52
+ - Type: `'true' \| 'false'`
67
53
  - Default: `-`
68
54
 
69
- #### ariaSelected
55
+ #### for
70
56
 
71
57
 
72
58
 
73
- - Type: `'true' | 'false'`
59
+ - Type: `string`
74
60
  - Default: `-`
75
61
 
76
- #### active
62
+ #### id
77
63
 
78
64
 
79
65
 
80
- - Type: `boolean`
81
- - Default: `false`
66
+ - Type: `string`
67
+ - Default: `-`
82
68
 
83
69
  #### over
84
70
 
@@ -87,18 +73,18 @@ Computed aria-selected: prefers parent-managed, falls back to own property
87
73
  - Type: `boolean`
88
74
  - Default: `false`
89
75
 
90
- #### _parentTabIndex
91
-
76
+ #### shadowRootOptions
92
77
 
93
78
 
94
- - Type: `unknown`
95
- - Default: `-`
96
79
 
97
- #### _parentAriaSelected
80
+ - Type: `object`
81
+ - Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`
98
82
 
83
+ #### tabIndex
99
84
 
85
+ Override tabIndex setter to set _parentTabIndex (for backwards compatibility).
100
86
 
101
- - Type: `unknown`
87
+ - Type: `number`
102
88
  - Default: `-`
103
89
 
104
90
  ### Types
@@ -4,9 +4,7 @@
4
4
 
5
5
  | Name | Type | Default | Summary |
6
6
  |-|-|-|-|
7
- | active | `boolean` | `-` | - |
8
- | _parentActive | `unknown` | `-` | - |
9
- | _parentAriaLabelledBy | `unknown` | `-` | - |
7
+ | active | `boolean` | `-` | Whether this panel is active (visible). |
10
8
 
11
9
  ### Property Details
12
10
 
@@ -18,20 +16,6 @@ Set by parent w-tabs via the _parentActive property.
18
16
  - Type: `boolean`
19
17
  - Default: `-`
20
18
 
21
- #### _parentActive
22
-
23
-
24
-
25
- - Type: `unknown`
26
- - Default: `-`
27
-
28
- #### _parentAriaLabelledBy
29
-
30
-
31
-
32
- - Type: `unknown`
33
- - Default: `-`
34
-
35
19
  ### Types
36
20
 
37
21
  No types documented.
@@ -19,9 +19,7 @@ Each tab panel should have a name that matches a corresponding tab.
19
19
 
20
20
  | Name | Type | Default | Summary |
21
21
  |-|-|-|-|
22
- | active | `boolean` | `-` | - |
23
- | _parentActive | `unknown` | `-` | - |
24
- | _parentAriaLabelledBy | `unknown` | `-` | - |
22
+ | active | `boolean` | `-` | Whether this panel is active (visible). |
25
23
 
26
24
  ### Property Details
27
25
 
@@ -33,20 +31,6 @@ Set by parent w-tabs via the _parentActive property.
33
31
  - Type: `boolean`
34
32
  - Default: `-`
35
33
 
36
- #### _parentActive
37
-
38
-
39
-
40
- - Type: `unknown`
41
- - Default: `-`
42
-
43
- #### _parentAriaLabelledBy
44
-
45
-
46
-
47
- - Type: `unknown`
48
- - Default: `-`
49
-
50
34
  ### Types
51
35
 
52
36
  No types documented.
@@ -5,8 +5,8 @@
5
5
  | Name | Type | Default | Summary |
6
6
  |-|-|-|-|
7
7
  | active | `string` | `-` | - |
8
- | tabs | `unknown` | `-` | - |
9
8
  | activeTab | `unknown` | `-` | - |
9
+ | tabs | `unknown` | `-` | - |
10
10
 
11
11
  ### Property Details
12
12
 
@@ -17,14 +17,14 @@
17
17
  - Type: `string`
18
18
  - Default: `-`
19
19
 
20
- #### tabs
20
+ #### activeTab
21
21
 
22
22
 
23
23
 
24
24
  - Type: `unknown`
25
25
  - Default: `-`
26
26
 
27
- #### activeTab
27
+ #### tabs
28
28
 
29
29
 
30
30
 
@@ -19,8 +19,8 @@ Tabs are used to organize content by grouping similar information on the same pa
19
19
  | Name | Type | Default | Summary |
20
20
  |-|-|-|-|
21
21
  | active | `string` | `-` | - |
22
- | tabs | `unknown` | `-` | - |
23
22
  | activeTab | `unknown` | `-` | - |
23
+ | tabs | `unknown` | `-` | - |
24
24
 
25
25
  ### Property Details
26
26
 
@@ -31,14 +31,14 @@ Tabs are used to organize content by grouping similar information on the same pa
31
31
  - Type: `string`
32
32
  - Default: `-`
33
33
 
34
- #### tabs
34
+ #### activeTab
35
35
 
36
36
 
37
37
 
38
38
  - Type: `unknown`
39
39
  - Default: `-`
40
40
 
41
- #### activeTab
41
+ #### tabs
42
42
 
43
43
 
44
44
 
@@ -1 +1,6 @@
1
1
  ## Accessibility
2
+
3
+ If a visible label isn't specified, an `aria-label` must be provided to the text field for accessibility. If the field is labeled by a separate element, an `aria-labelledby` property must be provided using the `id` of the labeling element instead.
4
+
5
+ - Always provide a visible label (do not rely on `placeholder` alone).
6
+ - Do not rely on color alone for interaction feedback (e.g. error states).
@@ -4,92 +4,100 @@
4
4
 
5
5
  | Name | Type | Default | Summary |
6
6
  |-|-|-|-|
7
- | shadowRootOptions | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
8
- | disabled | `boolean` | `false` | - |
9
- | invalid | `boolean` | `false` | - |
10
- | label | `string` | `-` | - |
11
- | helpText | `string` | `-` | - |
12
- | maxRows | `number` | `-` | - |
13
- | minRows | `number` | `-` | - |
14
- | name | `string` | `-` | - |
15
- | placeholder | `string` | `-` | - |
16
- | readOnly | `boolean` | `false` | - |
17
- | readonly | `boolean` | `false` | - |
18
- | required | `boolean` | `false` | - |
19
- | value | `string` | `-` | - |
20
- | optional | `boolean` | `false` | - |
21
- | minHeight | `unknown` | `-` | - |
22
- | maxHeight | `unknown` | `-` | - |
23
- | validationMessage | `string` | `-` | - |
24
- | validity | `ValidityState` | `-` | - |
7
+ | disabled | `boolean` | `false` | Makes the element not focusable and hides it from form submits |
8
+ | helpText | `string` | `-` | Description shown below the input field |
9
+ | invalid | `boolean` | `false` | Mark the form field as invalid. |
10
+ | label | `string` | `-` | Either a `label` or an `aria-label` must be provided. |
11
+ | maxRows | `number` | `-` | Sets the maximum number of text rows before the content starts scrolling. |
12
+ | minRows | `number` | `-` | Sets the minimum number of text rows the textarea should display |
13
+ | name | `string` | `-` | The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form |
14
+ | optional | `boolean` | `false` | Show an icon behind the label indicating the field is optional |
15
+ | placeholder | `string` | `-` | Shown in the textarea when it doesn't have a value |
16
+ | readOnly | `boolean` | `false` | **Deprecated**: Use the native `readonly` attribute instead |
17
+ | readonly | `boolean` | `false` | Whether the input can be selected but not changed by the user |
18
+ | required | `boolean` | `false` | Whether user input is required on the input before form submission |
19
+ | validationMessage | `string` | `-` | Returns the validation message if the textarea is invalid, otherwise an empty string |
20
+ | validity | `ValidityState` | `-` | Returns the validity state of the textarea |
21
+ | value | `string` | `-` | Lets you set the current value |
25
22
 
26
23
  ### Property Details
27
24
 
28
- #### shadowRootOptions
25
+ #### disabled
29
26
 
27
+ Keep in mind that using disabled in its current form is an anti-pattern.
30
28
 
29
+ There will always be users who don't understand why an element is disabled, or users who can't even see that it is disabled because of poor lighting conditions or other reasons.
31
30
 
32
- - Type: `object`
33
- - Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`
31
+ Please consider more informative alternatives before choosing to use disabled on an element.
34
32
 
35
- #### disabled
33
+ - Type: `boolean`
34
+ - Default: `false`
36
35
 
36
+ #### helpText
37
37
 
38
+ Use in combination with `invalid` to show as a validation error message,
39
+ or on its own to show a help text.
38
40
 
39
- - Type: `boolean`
40
- - Default: `false`
41
+ - Type: `string`
42
+ - Default: `-`
41
43
 
42
44
  #### invalid
43
45
 
46
+ Mark the form field as invalid.
44
47
 
48
+ Make sure to also set a `help-text` to help users fix the validation problem.
45
49
 
46
50
  - Type: `boolean`
47
51
  - Default: `false`
48
52
 
49
53
  #### label
50
54
 
51
-
52
-
53
- - Type: `string`
54
- - Default: `-`
55
-
56
- #### helpText
57
-
58
-
55
+ Either a `label` or an `aria-label` must be provided.
59
56
 
60
57
  - Type: `string`
61
58
  - Default: `-`
62
59
 
63
60
  #### maxRows
64
61
 
65
-
62
+ Sets the maximum number of text rows before the content starts scrolling.
66
63
 
67
64
  - Type: `number`
68
65
  - Default: `-`
69
66
 
70
67
  #### minRows
71
68
 
72
-
69
+ Sets the minimum number of text rows the textarea should display
73
70
 
74
71
  - Type: `number`
75
72
  - Default: `-`
76
73
 
77
74
  #### name
78
75
 
79
-
76
+ The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form
80
77
 
81
78
  - Type: `string`
82
79
  - Default: `-`
83
80
 
81
+ #### optional
82
+
83
+ Show an icon behind the label indicating the field is optional
84
+
85
+ - Type: `boolean`
86
+ - Default: `false`
87
+
84
88
  #### placeholder
85
89
 
90
+ Set a text that is shown in the textarea when it doesn't have a value.
86
91
 
92
+ Placeholder text should not be used as a substitute for labeling the element with a visible label.
87
93
 
88
94
  - Type: `string`
89
95
  - Default: `-`
90
96
 
91
97
  #### readOnly
92
98
 
99
+ **Deprecated**: Use the native `readonly` attribute instead
100
+
93
101
 
94
102
 
95
103
  - Type: `boolean`
@@ -97,46 +105,18 @@
97
105
 
98
106
  #### readonly
99
107
 
100
-
108
+ Whether the input can be selected but not changed by the user
101
109
 
102
110
  - Type: `boolean`
103
111
  - Default: `false`
104
112
 
105
113
  #### required
106
114
 
107
-
115
+ Whether user input is required on the input before form submission
108
116
 
109
117
  - Type: `boolean`
110
118
  - Default: `false`
111
119
 
112
- #### value
113
-
114
-
115
-
116
- - Type: `string`
117
- - Default: `-`
118
-
119
- #### optional
120
-
121
-
122
-
123
- - Type: `boolean`
124
- - Default: `false`
125
-
126
- #### minHeight
127
-
128
-
129
-
130
- - Type: `unknown`
131
- - Default: `-`
132
-
133
- #### maxHeight
134
-
135
-
136
-
137
- - Type: `unknown`
138
- - Default: `-`
139
-
140
120
  #### validationMessage
141
121
 
142
122
  Returns the validation message if the textarea is invalid, otherwise an empty string
@@ -151,6 +131,13 @@ Returns the validity state of the textarea
151
131
  - Type: `ValidityState`
152
132
  - Default: `-`
153
133
 
134
+ #### value
135
+
136
+ Lets you set the current value
137
+
138
+ - Type: `string`
139
+ - Default: `-`
140
+
154
141
  ### Types
155
142
 
156
143
  No types documented.
@@ -1 +1,82 @@
1
1
  ## Examples
2
+
3
+ <elements-example>
4
+
5
+ ```html
6
+ <w-textarea label="Description"></w-textarea>
7
+ ```
8
+
9
+ </elements-example>
10
+
11
+ ### Placeholder
12
+
13
+ Text hint that appears when the textarea is empty. Placeholder text should not be used as a substitute for a visible label.
14
+
15
+ <elements-example>
16
+
17
+ ```html
18
+ <w-textarea
19
+ label="Description"
20
+ placeholder="Give as much detail as you can"
21
+ ></w-textarea>
22
+ ```
23
+
24
+ </elements-example>
25
+
26
+ ### Height
27
+
28
+ You can control the height of the input field by setting either `minimum-rows` or `maximum-rows`
29
+
30
+ <elements-example>
31
+
32
+ ```html
33
+ <w-textarea label="Description" minimum-rows="3"></w-textarea>
34
+ ```
35
+
36
+ </elements-example>
37
+
38
+ With `maximum-rows` the content will start scrolling when it passes the limit. Note that the field stops being resizable. Setting `minimum-rows` is redundant when you set `maximum-rows`.
39
+
40
+ <elements-example>
41
+
42
+ ```html
43
+ <w-textarea label="Description" maximum-rows="3" value="Line 1
44
+ Line 2
45
+ Line 3
46
+ Line 4
47
+ Line 5"></w-textarea>
48
+ ```
49
+
50
+ </elements-example>
51
+
52
+ ### Disabled
53
+
54
+ Consider using more informative alternatives before choosing to use disabled, as some users may not understand why an element is disabled.
55
+
56
+ <elements-example>
57
+
58
+ ```html
59
+ <w-textarea
60
+ label="Description"
61
+ value="This form field is ignored"
62
+ disabled
63
+ ></w-textarea>
64
+ ```
65
+
66
+ </elements-example>
67
+
68
+ ### Read only
69
+
70
+ Makes the textarea content immutable while remaining focusable. The contents can still be copied.
71
+
72
+ <elements-example>
73
+
74
+ ```html
75
+ <w-textarea
76
+ label="Description"
77
+ value="This content is read only"
78
+ readonly
79
+ ></w-textarea>
80
+ ```
81
+
82
+ </elements-example>