@warp-ds/elements 2.9.1-next.2 → 2.9.1-next.4

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 (168) hide show
  1. package/dist/custom-elements.json +91 -262
  2. package/dist/docs/affix/affix.md +9 -10
  3. package/dist/docs/affix/api.md +9 -10
  4. package/dist/docs/alert/alert.md +4 -2
  5. package/dist/docs/alert/api.md +4 -2
  6. package/dist/docs/attention/api.md +21 -16
  7. package/dist/docs/attention/attention.md +21 -16
  8. package/dist/docs/badge/api.md +5 -6
  9. package/dist/docs/badge/badge.md +5 -6
  10. package/dist/docs/box/api.md +3 -4
  11. package/dist/docs/box/box.md +3 -4
  12. package/dist/docs/breadcrumbs/accessibility.md +46 -0
  13. package/dist/docs/breadcrumbs/api.md +8 -8
  14. package/dist/docs/breadcrumbs/breadcrumbs.md +127 -9
  15. package/dist/docs/breadcrumbs/examples.md +35 -0
  16. package/dist/docs/breadcrumbs/usage.md +36 -0
  17. package/dist/docs/button/api.md +15 -13
  18. package/dist/docs/button/button.md +15 -13
  19. package/dist/docs/card/api.md +5 -6
  20. package/dist/docs/card/card.md +5 -6
  21. package/dist/docs/combobox/api.md +18 -19
  22. package/dist/docs/combobox/combobox.md +18 -19
  23. package/dist/docs/datepicker/api.md +38 -39
  24. package/dist/docs/datepicker/datepicker.md +38 -39
  25. package/dist/docs/expandable/api.md +11 -12
  26. package/dist/docs/expandable/expandable.md +11 -12
  27. package/dist/docs/link/api.md +8 -6
  28. package/dist/docs/link/link.md +8 -6
  29. package/dist/docs/page-indicator/api.md +7 -8
  30. package/dist/docs/page-indicator/page-indicator.md +7 -8
  31. package/dist/docs/pagination/api.md +17 -9
  32. package/dist/docs/pagination/pagination.md +17 -9
  33. package/dist/docs/pill/api.md +30 -17
  34. package/dist/docs/pill/pill.md +30 -17
  35. package/dist/docs/select/api.md +17 -9
  36. package/dist/docs/select/select.md +17 -9
  37. package/dist/docs/slider/api.md +37 -116
  38. package/dist/docs/slider/examples.md +331 -0
  39. package/dist/docs/slider/slider.md +378 -118
  40. package/dist/docs/slider/usage.md +10 -0
  41. package/dist/docs/slider-thumb/api.md +26 -79
  42. package/dist/docs/slider-thumb/slider-thumb.md +26 -81
  43. package/dist/docs/step/api.md +3 -4
  44. package/dist/docs/step/step.md +3 -4
  45. package/dist/docs/step-indicator/api.md +3 -4
  46. package/dist/docs/step-indicator/step-indicator.md +3 -4
  47. package/dist/docs/switch/api.md +13 -5
  48. package/dist/docs/switch/switch.md +13 -5
  49. package/dist/docs/tab/api.md +9 -62
  50. package/dist/docs/tab/tab.md +9 -70
  51. package/dist/docs/tab-panel/api.md +7 -11
  52. package/dist/docs/tab-panel/tab-panel.md +7 -19
  53. package/dist/docs/tabs/accessibility.md +11 -0
  54. package/dist/docs/tabs/api.md +10 -18
  55. package/dist/docs/tabs/examples.md +68 -0
  56. package/dist/docs/tabs/tabs.md +97 -20
  57. package/dist/docs/tabs/usage.md +8 -0
  58. package/dist/docs/textarea/api.md +15 -16
  59. package/dist/docs/textarea/textarea.md +15 -16
  60. package/dist/docs/textfield/api.md +14 -15
  61. package/dist/docs/textfield/textfield.md +14 -15
  62. package/dist/index.d.ts +124 -242
  63. package/dist/packages/affix/affix.js +11 -12
  64. package/dist/packages/affix/affix.js.map +4 -4
  65. package/dist/packages/alert/alert.d.ts +1 -1
  66. package/dist/packages/alert/alert.js.map +1 -1
  67. package/dist/packages/attention/attention.d.ts +3 -2
  68. package/dist/packages/attention/attention.js +27 -28
  69. package/dist/packages/attention/attention.js.map +4 -4
  70. package/dist/packages/breadcrumbs/breadcrumbs.d.ts +7 -1
  71. package/dist/packages/breadcrumbs/breadcrumbs.js +7 -8
  72. package/dist/packages/breadcrumbs/breadcrumbs.js.map +4 -4
  73. package/dist/packages/button/button.d.ts +4 -2
  74. package/dist/packages/button/button.js +14 -15
  75. package/dist/packages/button/button.js.map +4 -4
  76. package/dist/packages/card/card.js +8 -9
  77. package/dist/packages/card/card.js.map +4 -4
  78. package/dist/packages/checkbox/checkbox.d.ts +2 -0
  79. package/dist/packages/checkbox-group/checkbox-group.d.ts +2 -0
  80. package/dist/packages/checkbox-group/checkbox-group.js +15 -16
  81. package/dist/packages/checkbox-group/checkbox-group.js.map +4 -4
  82. package/dist/packages/checkbox-group/locales/da/messages.mjs +1 -1
  83. package/dist/packages/checkbox-group/locales/en/messages.mjs +1 -1
  84. package/dist/packages/checkbox-group/locales/fi/messages.mjs +1 -1
  85. package/dist/packages/checkbox-group/locales/nb/messages.mjs +1 -1
  86. package/dist/packages/checkbox-group/locales/sv/messages.mjs +1 -1
  87. package/dist/packages/combobox/combobox.js +13 -14
  88. package/dist/packages/combobox/combobox.js.map +4 -4
  89. package/dist/packages/combobox/locales/da/messages.mjs +1 -1
  90. package/dist/packages/combobox/locales/en/messages.mjs +1 -1
  91. package/dist/packages/combobox/locales/fi/messages.mjs +1 -1
  92. package/dist/packages/combobox/locales/nb/messages.mjs +1 -1
  93. package/dist/packages/combobox/locales/sv/messages.mjs +1 -1
  94. package/dist/packages/datepicker/datepicker.d.ts +2 -0
  95. package/dist/packages/datepicker/datepicker.js +51 -52
  96. package/dist/packages/datepicker/datepicker.js.map +4 -4
  97. package/dist/packages/datepicker/locales/da/messages.mjs +1 -1
  98. package/dist/packages/datepicker/locales/en/messages.mjs +1 -1
  99. package/dist/packages/datepicker/locales/fi/messages.mjs +1 -1
  100. package/dist/packages/datepicker/locales/nb/messages.mjs +1 -1
  101. package/dist/packages/datepicker/locales/sv/messages.mjs +1 -1
  102. package/dist/packages/link/link.d.ts +2 -0
  103. package/dist/packages/modal-header/modal-header.js +13 -14
  104. package/dist/packages/modal-header/modal-header.js.map +4 -4
  105. package/dist/packages/page-indicator/page-indicator.js +7 -8
  106. package/dist/packages/page-indicator/page-indicator.js.map +4 -4
  107. package/dist/packages/pagination/locales/da/messages.mjs +1 -1
  108. package/dist/packages/pagination/locales/en/messages.mjs +1 -1
  109. package/dist/packages/pagination/locales/fi/messages.mjs +1 -1
  110. package/dist/packages/pagination/locales/nb/messages.mjs +1 -1
  111. package/dist/packages/pagination/locales/sv/messages.mjs +1 -1
  112. package/dist/packages/pagination/pagination.js +31 -32
  113. package/dist/packages/pagination/pagination.js.map +4 -4
  114. package/dist/packages/pagination/pagination.test.js +38 -0
  115. package/dist/packages/pill/pill.js +11 -12
  116. package/dist/packages/pill/pill.js.map +4 -4
  117. package/dist/packages/radio/radio.d.ts +2 -0
  118. package/dist/packages/radio-group/radio-group.d.ts +2 -0
  119. package/dist/packages/radio-group/radio-group.js +17 -18
  120. package/dist/packages/radio-group/radio-group.js.map +4 -4
  121. package/dist/packages/select/select.js +19 -20
  122. package/dist/packages/select/select.js.map +4 -4
  123. package/dist/packages/slider/locales/da/messages.mjs +1 -1
  124. package/dist/packages/slider/locales/en/messages.mjs +1 -1
  125. package/dist/packages/slider/locales/fi/messages.mjs +1 -1
  126. package/dist/packages/slider/locales/nb/messages.mjs +1 -1
  127. package/dist/packages/slider/locales/sv/messages.mjs +1 -1
  128. package/dist/packages/slider/slider.d.ts +36 -45
  129. package/dist/packages/slider/slider.js +22 -23
  130. package/dist/packages/slider/slider.js.map +4 -4
  131. package/dist/packages/slider-thumb/slider-thumb.d.ts +41 -31
  132. package/dist/packages/slider-thumb/slider-thumb.js +33 -34
  133. package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
  134. package/dist/packages/step/locales/da/messages.mjs +1 -1
  135. package/dist/packages/step/locales/en/messages.mjs +1 -1
  136. package/dist/packages/step/locales/fi/messages.mjs +1 -1
  137. package/dist/packages/step/locales/nb/messages.mjs +1 -1
  138. package/dist/packages/step/locales/sv/messages.mjs +1 -1
  139. package/dist/packages/step/step.js +11 -12
  140. package/dist/packages/step/step.js.map +4 -4
  141. package/dist/packages/switch/switch.d.ts +2 -0
  142. package/dist/packages/tab/tab.d.ts +31 -24
  143. package/dist/packages/tab/tab.js +3 -3
  144. package/dist/packages/tab/tab.js.map +2 -2
  145. package/dist/packages/tab-panel/tab-panel.d.ts +9 -8
  146. package/dist/packages/tab-panel/tab-panel.js +3 -3
  147. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  148. package/dist/packages/tabs/index.d.ts +1 -0
  149. package/dist/packages/tabs/index.js +0 -1
  150. package/dist/packages/tabs/react.d.ts +4 -3
  151. package/dist/packages/tabs/tabs.d.ts +9 -3
  152. package/dist/packages/tabs/tabs.js +1 -1
  153. package/dist/packages/tabs/tabs.js.map +3 -3
  154. package/dist/packages/tabs/tabs.react.stories.d.ts +2 -2
  155. package/dist/packages/textarea/textarea.d.ts +2 -0
  156. package/dist/packages/textarea/textarea.js +20 -21
  157. package/dist/packages/textarea/textarea.js.map +4 -4
  158. package/dist/packages/textfield/textfield.d.ts +2 -0
  159. package/dist/packages/toast/toast.js +13 -14
  160. package/dist/packages/toast/toast.js.map +4 -4
  161. package/dist/web-types.json +206 -98
  162. package/package.json +20 -19
  163. package/dist/docs/tab/accessibility.md +0 -1
  164. package/dist/docs/tab/examples.md +0 -1
  165. package/dist/docs/tab/usage.md +0 -1
  166. package/dist/docs/tab-panel/accessibility.md +0 -1
  167. package/dist/docs/tab-panel/examples.md +0 -1
  168. package/dist/docs/tab-panel/usage.md +0 -1
@@ -1 +1,12 @@
1
1
  ## Accessibility
2
+
3
+ The tabs component follows the WAI-ARIA Tabs pattern:
4
+
5
+ - The tab list gets `role="tablist"`
6
+ - Each tab button gets `role="tab"` with `aria-selected` reflecting its active state
7
+ - Each tab button gets `aria-controls` pointing to its associated panel
8
+ - Each panel gets `role="tabpanel"` with `aria-labelledby` pointing to its associated tab
9
+ - Keyboard navigation is supported:
10
+ - `ArrowLeft`/`ArrowRight`: Navigate between tabs
11
+ - `Home`: Move to first tab
12
+ - `End`: Move to last tab
@@ -1,36 +1,28 @@
1
- ## API Documentation
1
+ ## `<w-tabs>` API
2
+
3
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
2
4
 
3
5
  ### Properties
4
6
 
5
7
  | Name | Type | Default | Summary |
6
8
  |-|-|-|-|
7
- | active | `string` | `-` | - |
8
- | activeTab | `unknown` | `-` | - |
9
- | tabs | `unknown` | `-` | - |
9
+ | active | `string` | `"" (Shows the first tab)` | The `id` of the panel that should be active. |
10
10
 
11
11
  ### Property Details
12
12
 
13
13
  #### active
14
14
 
15
-
15
+ The `id` of the panel that should be active.
16
16
 
17
17
  - Type: `string`
18
- - Default: `-`
19
-
20
- #### activeTab
21
-
22
-
23
-
24
- - Type: `unknown`
25
- - Default: `-`
18
+ - Default: `"" (Shows the first tab)`
26
19
 
27
- #### tabs
20
+ ### Events
28
21
 
22
+ #### change
29
23
 
24
+ Includes `details.panelId` with the now active tab's ID
30
25
 
31
- - Type: `unknown`
32
- - Default: `-`
26
+ - Type: `WarpTabsChangeEvent`
33
27
 
34
- ### Types
35
28
 
36
- No types documented.
@@ -1 +1,69 @@
1
1
  ## Examples
2
+
3
+ <elements-example>
4
+
5
+ ```html
6
+ <w-tabs>
7
+ <w-tab for="roald-amundsen">Tab 1</w-tab>
8
+ <w-tab for="fridtjof-nansen">Tab 2</w-tab>
9
+ <w-tab for="tor-heyerdahl">Tab 3</w-tab>
10
+ <w-tab-panel id="roald-amundsen">Tab one selected!</w-tab-panel>
11
+ <w-tab-panel id="fridtjof-nansen">Tab two selected!</w-tab-panel>
12
+ <w-tab-panel id="tor-heyerdahl">Tab three selected!</w-tab-panel>
13
+ </w-tabs>
14
+
15
+ <script type="module">
16
+ const tabs = document.querySelector('w-tabs');
17
+
18
+ tabs.addEventListener('change', (event) => {
19
+ // event.detail = { panelId: string }
20
+ console.log('Active panel:', event.detail.panelId);
21
+ });
22
+ </script>
23
+ ```
24
+
25
+ </elements-example>
26
+
27
+ ### Tabs with icons
28
+
29
+ Icons can be added to tabs using the `icon` slot. By default, icons appear beside the label.
30
+
31
+ <elements-example>
32
+
33
+ ```html
34
+ <w-tabs active="fridtjof-nansen">
35
+ <w-tab for="roald-amundsen">
36
+ <w-icon name="Info" slot="icon"></w-icon>
37
+ Tab 1
38
+ </w-tab>
39
+ <w-tab for="fridtjof-nansen">
40
+ <w-icon name="Success" slot="icon"></w-icon>
41
+ Tab 2
42
+ </w-tab>
43
+ <w-tab-panel id="roald-amundsen">Content one</w-tab-panel>
44
+ <w-tab-panel id="fridtjof-nansen">Content two</w-tab-panel>
45
+ </w-tabs>
46
+ ```
47
+
48
+ </elements-example>
49
+
50
+ Use the `over` attribute to position icons above the label:
51
+
52
+ <elements-example>
53
+
54
+ ```html
55
+ <w-tabs>
56
+ <w-tab for="roald-amundsen" over>
57
+ <w-icon name="Info" slot="icon"></w-icon>
58
+ Tab 1
59
+ </w-tab>
60
+ <w-tab for="fridtjof-nansen" over>
61
+ <w-icon name="Success" slot="icon"></w-icon>
62
+ Tab 2
63
+ </w-tab>
64
+ <w-tab-panel id="roald-amundsen">Content one</w-tab-panel>
65
+ <w-tab-panel id="fridtjof-nansen">Content two</w-tab-panel>
66
+ </w-tabs>
67
+ ```
68
+
69
+ </elements-example>
@@ -4,47 +4,124 @@
4
4
 
5
5
  Tabs are used to organize content by grouping similar information on the same page.
6
6
 
7
- [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/tabs--docs)
8
-
9
7
  ## Usage
10
8
 
9
+ The tabs component consists of three custom elements that work together:
10
+
11
+ - `<w-tabs>` - The container that manages tab state and keyboard navigation
12
+ - `<w-tab>` - Individual tab buttons
13
+ - `<w-tab-panel>` - Content panels associated with each tab
14
+
15
+ Each `<w-tab>` has a `for` attribute that matches the `id` of its corresponding `<w-tab-panel>`.
16
+
11
17
  ## Accessibility
12
18
 
19
+ The tabs component follows the WAI-ARIA Tabs pattern:
20
+
21
+ - The tab list gets `role="tablist"`
22
+ - Each tab button gets `role="tab"` with `aria-selected` reflecting its active state
23
+ - Each tab button gets `aria-controls` pointing to its associated panel
24
+ - Each panel gets `role="tabpanel"` with `aria-labelledby` pointing to its associated tab
25
+ - Keyboard navigation is supported:
26
+ - `ArrowLeft`/`ArrowRight`: Navigate between tabs
27
+ - `Home`: Move to first tab
28
+ - `End`: Move to last tab
29
+
13
30
  ## Examples
14
31
 
15
- ## API Documentation
32
+ <elements-example>
33
+
34
+ ```html
35
+ <w-tabs>
36
+ <w-tab for="roald-amundsen">Tab 1</w-tab>
37
+ <w-tab for="fridtjof-nansen">Tab 2</w-tab>
38
+ <w-tab for="tor-heyerdahl">Tab 3</w-tab>
39
+ <w-tab-panel id="roald-amundsen">Tab one selected!</w-tab-panel>
40
+ <w-tab-panel id="fridtjof-nansen">Tab two selected!</w-tab-panel>
41
+ <w-tab-panel id="tor-heyerdahl">Tab three selected!</w-tab-panel>
42
+ </w-tabs>
43
+
44
+ <script type="module">
45
+ const tabs = document.querySelector('w-tabs');
46
+
47
+ tabs.addEventListener('change', (event) => {
48
+ // event.detail = { panelId: string }
49
+ console.log('Active panel:', event.detail.panelId);
50
+ });
51
+ </script>
52
+ ```
53
+
54
+ </elements-example>
55
+
56
+ ### Tabs with icons
57
+
58
+ Icons can be added to tabs using the `icon` slot. By default, icons appear beside the label.
59
+
60
+ <elements-example>
61
+
62
+ ```html
63
+ <w-tabs active="fridtjof-nansen">
64
+ <w-tab for="roald-amundsen">
65
+ <w-icon name="Info" slot="icon"></w-icon>
66
+ Tab 1
67
+ </w-tab>
68
+ <w-tab for="fridtjof-nansen">
69
+ <w-icon name="Success" slot="icon"></w-icon>
70
+ Tab 2
71
+ </w-tab>
72
+ <w-tab-panel id="roald-amundsen">Content one</w-tab-panel>
73
+ <w-tab-panel id="fridtjof-nansen">Content two</w-tab-panel>
74
+ </w-tabs>
75
+ ```
76
+
77
+ </elements-example>
78
+
79
+ Use the `over` attribute to position icons above the label:
80
+
81
+ <elements-example>
82
+
83
+ ```html
84
+ <w-tabs>
85
+ <w-tab for="roald-amundsen" over>
86
+ <w-icon name="Info" slot="icon"></w-icon>
87
+ Tab 1
88
+ </w-tab>
89
+ <w-tab for="fridtjof-nansen" over>
90
+ <w-icon name="Success" slot="icon"></w-icon>
91
+ Tab 2
92
+ </w-tab>
93
+ <w-tab-panel id="roald-amundsen">Content one</w-tab-panel>
94
+ <w-tab-panel id="fridtjof-nansen">Content two</w-tab-panel>
95
+ </w-tabs>
96
+ ```
97
+
98
+ </elements-example>
99
+
100
+ ## `<w-tabs>` API
101
+
102
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
16
103
 
17
104
  ### Properties
18
105
 
19
106
  | Name | Type | Default | Summary |
20
107
  |-|-|-|-|
21
- | active | `string` | `-` | - |
22
- | activeTab | `unknown` | `-` | - |
23
- | tabs | `unknown` | `-` | - |
108
+ | active | `string` | `"" (Shows the first tab)` | The `id` of the panel that should be active. |
24
109
 
25
110
  ### Property Details
26
111
 
27
112
  #### active
28
113
 
29
-
114
+ The `id` of the panel that should be active.
30
115
 
31
116
  - Type: `string`
32
- - Default: `-`
33
-
34
- #### activeTab
35
-
36
-
37
-
38
- - Type: `unknown`
39
- - Default: `-`
117
+ - Default: `"" (Shows the first tab)`
40
118
 
41
- #### tabs
119
+ ### Events
42
120
 
121
+ #### change
43
122
 
123
+ Includes `details.panelId` with the now active tab's ID
44
124
 
45
- - Type: `unknown`
46
- - Default: `-`
125
+ - Type: `WarpTabsChangeEvent`
47
126
 
48
- ### Types
49
127
 
50
- No types documented.
@@ -1 +1,9 @@
1
1
  ## Usage
2
+
3
+ The tabs component consists of three custom elements that work together:
4
+
5
+ - `<w-tabs>` - The container that manages tab state and keyboard navigation
6
+ - `<w-tab>` - Individual tab buttons
7
+ - `<w-tab-panel>` - Content panels associated with each tab
8
+
9
+ Each `<w-tab>` has a `for` attribute that matches the `id` of its corresponding `<w-tab-panel>`.
@@ -1,23 +1,25 @@
1
- ## API Documentation
1
+ ## `<w-textarea>` API
2
+
3
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
2
4
 
3
5
  ### Properties
4
6
 
5
7
  | Name | Type | Default | Summary |
6
8
  |-|-|-|-|
7
9
  | disabled | `boolean` | `false` | Makes the element not focusable and hides it from form submits |
8
- | helpText | `string` | `-` | Description shown below the input field |
10
+ | help-text | `string` | `-` | Description shown below the input field |
9
11
  | invalid | `boolean` | `false` | Mark the form field as invalid. |
10
12
  | 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
+ | maximum-rows | `number` | `-` | Sets the maximum number of text rows before the content starts scrolling. |
14
+ | minimum-rows | `number` | `-` | Sets the minimum number of text rows the textarea should display |
13
15
  | 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
16
  | optional | `boolean` | `false` | Show an icon behind the label indicating the field is optional |
15
17
  | placeholder | `string` | `-` | Shown in the textarea when it doesn't have a value |
16
- | readOnly | `boolean` | `false` | **Deprecated**: Use the native `readonly` attribute instead |
18
+ | read-only | `boolean` | `false` | **Deprecated**: Use the native `readonly` attribute instead |
17
19
  | readonly | `boolean` | `false` | Whether the input can be selected but not changed by the user |
18
20
  | 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
+ | validationMessage (JS only) | `string` | `-` | Returns the validation message if the textarea is invalid, otherwise an empty string |
22
+ | validity (JS only) | `ValidityState` | `-` | Returns the validity state of the textarea |
21
23
  | value | `string` | `-` | Lets you set the current value |
22
24
 
23
25
  ### Property Details
@@ -33,7 +35,7 @@ Please consider more informative alternatives before choosing to use disabled on
33
35
  - Type: `boolean`
34
36
  - Default: `false`
35
37
 
36
- #### helpText
38
+ #### help-text
37
39
 
38
40
  Use in combination with `invalid` to show as a validation error message,
39
41
  or on its own to show a help text.
@@ -57,14 +59,14 @@ Either a `label` or an `aria-label` must be provided.
57
59
  - Type: `string`
58
60
  - Default: `-`
59
61
 
60
- #### maxRows
62
+ #### maximum-rows
61
63
 
62
64
  Sets the maximum number of text rows before the content starts scrolling.
63
65
 
64
66
  - Type: `number`
65
67
  - Default: `-`
66
68
 
67
- #### minRows
69
+ #### minimum-rows
68
70
 
69
71
  Sets the minimum number of text rows the textarea should display
70
72
 
@@ -94,7 +96,7 @@ Placeholder text should not be used as a substitute for labeling the element wit
94
96
  - Type: `string`
95
97
  - Default: `-`
96
98
 
97
- #### readOnly
99
+ #### read-only
98
100
 
99
101
  **Deprecated**: Use the native `readonly` attribute instead
100
102
 
@@ -117,14 +119,14 @@ Whether user input is required on the input before form submission
117
119
  - Type: `boolean`
118
120
  - Default: `false`
119
121
 
120
- #### validationMessage
122
+ #### validationMessage (JS only)
121
123
 
122
124
  Returns the validation message if the textarea is invalid, otherwise an empty string
123
125
 
124
126
  - Type: `string`
125
127
  - Default: `-`
126
128
 
127
- #### validity
129
+ #### validity (JS only)
128
130
 
129
131
  Returns the validity state of the textarea
130
132
 
@@ -138,6 +140,3 @@ Lets you set the current value
138
140
  - Type: `string`
139
141
  - Default: `-`
140
142
 
141
- ### Types
142
-
143
- No types documented.
@@ -111,26 +111,28 @@ Makes the textarea content immutable while remaining focusable. The contents can
111
111
 
112
112
  </elements-example>
113
113
 
114
- ## API Documentation
114
+ ## `<w-textarea>` API
115
+
116
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
115
117
 
116
118
  ### Properties
117
119
 
118
120
  | Name | Type | Default | Summary |
119
121
  |-|-|-|-|
120
122
  | disabled | `boolean` | `false` | Makes the element not focusable and hides it from form submits |
121
- | helpText | `string` | `-` | Description shown below the input field |
123
+ | help-text | `string` | `-` | Description shown below the input field |
122
124
  | invalid | `boolean` | `false` | Mark the form field as invalid. |
123
125
  | label | `string` | `-` | Either a `label` or an `aria-label` must be provided. |
124
- | maxRows | `number` | `-` | Sets the maximum number of text rows before the content starts scrolling. |
125
- | minRows | `number` | `-` | Sets the minimum number of text rows the textarea should display |
126
+ | maximum-rows | `number` | `-` | Sets the maximum number of text rows before the content starts scrolling. |
127
+ | minimum-rows | `number` | `-` | Sets the minimum number of text rows the textarea should display |
126
128
  | 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 |
127
129
  | optional | `boolean` | `false` | Show an icon behind the label indicating the field is optional |
128
130
  | placeholder | `string` | `-` | Shown in the textarea when it doesn't have a value |
129
- | readOnly | `boolean` | `false` | **Deprecated**: Use the native `readonly` attribute instead |
131
+ | read-only | `boolean` | `false` | **Deprecated**: Use the native `readonly` attribute instead |
130
132
  | readonly | `boolean` | `false` | Whether the input can be selected but not changed by the user |
131
133
  | required | `boolean` | `false` | Whether user input is required on the input before form submission |
132
- | validationMessage | `string` | `-` | Returns the validation message if the textarea is invalid, otherwise an empty string |
133
- | validity | `ValidityState` | `-` | Returns the validity state of the textarea |
134
+ | validationMessage (JS only) | `string` | `-` | Returns the validation message if the textarea is invalid, otherwise an empty string |
135
+ | validity (JS only) | `ValidityState` | `-` | Returns the validity state of the textarea |
134
136
  | value | `string` | `-` | Lets you set the current value |
135
137
 
136
138
  ### Property Details
@@ -146,7 +148,7 @@ Please consider more informative alternatives before choosing to use disabled on
146
148
  - Type: `boolean`
147
149
  - Default: `false`
148
150
 
149
- #### helpText
151
+ #### help-text
150
152
 
151
153
  Use in combination with `invalid` to show as a validation error message,
152
154
  or on its own to show a help text.
@@ -170,14 +172,14 @@ Either a `label` or an `aria-label` must be provided.
170
172
  - Type: `string`
171
173
  - Default: `-`
172
174
 
173
- #### maxRows
175
+ #### maximum-rows
174
176
 
175
177
  Sets the maximum number of text rows before the content starts scrolling.
176
178
 
177
179
  - Type: `number`
178
180
  - Default: `-`
179
181
 
180
- #### minRows
182
+ #### minimum-rows
181
183
 
182
184
  Sets the minimum number of text rows the textarea should display
183
185
 
@@ -207,7 +209,7 @@ Placeholder text should not be used as a substitute for labeling the element wit
207
209
  - Type: `string`
208
210
  - Default: `-`
209
211
 
210
- #### readOnly
212
+ #### read-only
211
213
 
212
214
  **Deprecated**: Use the native `readonly` attribute instead
213
215
 
@@ -230,14 +232,14 @@ Whether user input is required on the input before form submission
230
232
  - Type: `boolean`
231
233
  - Default: `false`
232
234
 
233
- #### validationMessage
235
+ #### validationMessage (JS only)
234
236
 
235
237
  Returns the validation message if the textarea is invalid, otherwise an empty string
236
238
 
237
239
  - Type: `string`
238
240
  - Default: `-`
239
241
 
240
- #### validity
242
+ #### validity (JS only)
241
243
 
242
244
  Returns the validity state of the textarea
243
245
 
@@ -251,6 +253,3 @@ Lets you set the current value
251
253
  - Type: `string`
252
254
  - Default: `-`
253
255
 
254
- ### Types
255
-
256
- No types documented.
@@ -1,4 +1,6 @@
1
- ## API Documentation
1
+ ## `<w-textfield>` API
2
+
3
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
2
4
 
3
5
  ### Properties
4
6
 
@@ -6,20 +8,20 @@
6
8
  |-|-|-|-|
7
9
  | autocomplete | `string \| undefined` | `-` | A space-separated string that hints to browsers [what type of content it can suggest](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete#value) to autofill. |
8
10
  | disabled | `boolean` | `false` | Makes the element not focusable and hides it from form submits |
9
- | formatter | `(value: string) => string` | `-` | Function to format value when the input field |
10
- | helpText | `string` | `-` | Description shown below the input field |
11
+ | formatter (JS only) | `(value: string) => string` | `-` | Function to format value when the input field |
12
+ | help-text | `string` | `-` | Description shown below the input field |
11
13
  | invalid | `boolean` | `false` | Mark the form field as invalid. |
12
14
  | label | `string` | `-` | Either a `label` or an `aria-label` must be provided. |
13
15
  | max | `number` | `-` | Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength). |
14
- | maxLength | `number` | `-` | **Deprecated**: Use the native `maxlength` attribute |
16
+ | max-length | `number` | `-` | **Deprecated**: Use the native `maxlength` attribute |
15
17
  | maxlength | `number` | `-` | For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [maximum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength) allowed. |
16
18
  | min | `number` | `-` | Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength). |
17
- | minLength | `number` | `-` | **Deprecated**: Use the native `minlength` attribute |
19
+ | min-length | `number` | `-` | **Deprecated**: Use the native `minlength` attribute |
18
20
  | minlength | `number` | `-` | For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [minimum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength) required. |
19
21
  | 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. |
20
22
  | pattern | `string` | `-` | Sets a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) that the input's value must [match to pass validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#pattern) |
21
23
  | placeholder | `string` | `-` | Shown in the textfield when it doesn't have a value |
22
- | readOnly | `boolean` | `false` | **Deprecated**: Use the native readonly attribute instead. |
24
+ | read-only | `boolean` | `false` | **Deprecated**: Use the native readonly attribute instead. |
23
25
  | readonly | `boolean` | `false` | Whether the input can be selected but not changed by the user. |
24
26
  | required | `boolean` | `false` | Whether user input is required on the input before form submission. |
25
27
  | size | `string` | `-` | Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs. |
@@ -33,7 +35,7 @@
33
35
 
34
36
  A space-separated string that hints to browsers [what type of content it can suggest](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete#value) to autofill.
35
37
 
36
- - Type: `string \| undefined`
38
+ - Type: `string | undefined`
37
39
  - Default: `-`
38
40
 
39
41
  #### disabled
@@ -47,7 +49,7 @@ Please consider more informative alternatives before choosing to use disabled on
47
49
  - Type: `boolean`
48
50
  - Default: `false`
49
51
 
50
- #### formatter
52
+ #### formatter (JS only)
51
53
 
52
54
  Function to format value when the input field.
53
55
 
@@ -57,7 +59,7 @@ similar to the accessible input [masking example from Filament Group](https://fi
57
59
  - Type: `(value: string) => string`
58
60
  - Default: `-`
59
61
 
60
- #### helpText
62
+ #### help-text
61
63
 
62
64
  Use in combination with `invalid` to show as a validation error message,
63
65
  or on its own to show a help text.
@@ -86,7 +88,7 @@ Use with `type="number"` to set the [maximum allowed value](https://developer.mo
86
88
  - Type: `number`
87
89
  - Default: `-`
88
90
 
89
- #### maxLength
91
+ #### max-length
90
92
 
91
93
  **Deprecated**: Use the native `maxlength` attribute
92
94
 
@@ -109,7 +111,7 @@ Use with `type="number"` to set the [minimum allowed value](https://developer.mo
109
111
  - Type: `number`
110
112
  - Default: `-`
111
113
 
112
- #### minLength
114
+ #### min-length
113
115
 
114
116
  **Deprecated**: Use the native `minlength` attribute
115
117
 
@@ -148,7 +150,7 @@ Placeholder text should not be used as a substitute for labeling the element wit
148
150
  - Type: `string`
149
151
  - Default: `-`
150
152
 
151
- #### readOnly
153
+ #### read-only
152
154
 
153
155
  **Deprecated**: Use the native readonly attribute instead.
154
156
 
@@ -202,6 +204,3 @@ Lets you set the current value.
202
204
  - Type: `string`
203
205
  - Default: `-`
204
206
 
205
- ### Types
206
-
207
- No types documented.
@@ -181,7 +181,9 @@ The readonly boolean attribute makes the w-textfield's text content immutable. U
181
181
 
182
182
  </elements-example>
183
183
 
184
- ## API Documentation
184
+ ## `<w-textfield>` API
185
+
186
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
185
187
 
186
188
  ### Properties
187
189
 
@@ -189,20 +191,20 @@ The readonly boolean attribute makes the w-textfield's text content immutable. U
189
191
  |-|-|-|-|
190
192
  | autocomplete | `string \| undefined` | `-` | A space-separated string that hints to browsers [what type of content it can suggest](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete#value) to autofill. |
191
193
  | disabled | `boolean` | `false` | Makes the element not focusable and hides it from form submits |
192
- | formatter | `(value: string) => string` | `-` | Function to format value when the input field |
193
- | helpText | `string` | `-` | Description shown below the input field |
194
+ | formatter (JS only) | `(value: string) => string` | `-` | Function to format value when the input field |
195
+ | help-text | `string` | `-` | Description shown below the input field |
194
196
  | invalid | `boolean` | `false` | Mark the form field as invalid. |
195
197
  | label | `string` | `-` | Either a `label` or an `aria-label` must be provided. |
196
198
  | max | `number` | `-` | Use with `type="number"` to set the [maximum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength). |
197
- | maxLength | `number` | `-` | **Deprecated**: Use the native `maxlength` attribute |
199
+ | max-length | `number` | `-` | **Deprecated**: Use the native `maxlength` attribute |
198
200
  | maxlength | `number` | `-` | For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [maximum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#maxlength) allowed. |
199
201
  | min | `number` | `-` | Use with `type="number"` to set the [minimum allowed value](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength). |
200
- | minLength | `number` | `-` | **Deprecated**: Use the native `minlength` attribute |
202
+ | min-length | `number` | `-` | **Deprecated**: Use the native `minlength` attribute |
201
203
  | minlength | `number` | `-` | For `text`, `search`, `url`, `tel`, `email` and `password` fields, sets the [minimum string length](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#minlength) required. |
202
204
  | 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. |
203
205
  | pattern | `string` | `-` | Sets a [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) that the input's value must [match to pass validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#pattern) |
204
206
  | placeholder | `string` | `-` | Shown in the textfield when it doesn't have a value |
205
- | readOnly | `boolean` | `false` | **Deprecated**: Use the native readonly attribute instead. |
207
+ | read-only | `boolean` | `false` | **Deprecated**: Use the native readonly attribute instead. |
206
208
  | readonly | `boolean` | `false` | Whether the input can be selected but not changed by the user. |
207
209
  | required | `boolean` | `false` | Whether user input is required on the input before form submission. |
208
210
  | size | `string` | `-` | Sets the [size](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#size) (width) of the input field to fit the expected length of inputs. |
@@ -216,7 +218,7 @@ The readonly boolean attribute makes the w-textfield's text content immutable. U
216
218
 
217
219
  A space-separated string that hints to browsers [what type of content it can suggest](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete#value) to autofill.
218
220
 
219
- - Type: `string \| undefined`
221
+ - Type: `string | undefined`
220
222
  - Default: `-`
221
223
 
222
224
  #### disabled
@@ -230,7 +232,7 @@ Please consider more informative alternatives before choosing to use disabled on
230
232
  - Type: `boolean`
231
233
  - Default: `false`
232
234
 
233
- #### formatter
235
+ #### formatter (JS only)
234
236
 
235
237
  Function to format value when the input field.
236
238
 
@@ -240,7 +242,7 @@ similar to the accessible input [masking example from Filament Group](https://fi
240
242
  - Type: `(value: string) => string`
241
243
  - Default: `-`
242
244
 
243
- #### helpText
245
+ #### help-text
244
246
 
245
247
  Use in combination with `invalid` to show as a validation error message,
246
248
  or on its own to show a help text.
@@ -269,7 +271,7 @@ Use with `type="number"` to set the [maximum allowed value](https://developer.mo
269
271
  - Type: `number`
270
272
  - Default: `-`
271
273
 
272
- #### maxLength
274
+ #### max-length
273
275
 
274
276
  **Deprecated**: Use the native `maxlength` attribute
275
277
 
@@ -292,7 +294,7 @@ Use with `type="number"` to set the [minimum allowed value](https://developer.mo
292
294
  - Type: `number`
293
295
  - Default: `-`
294
296
 
295
- #### minLength
297
+ #### min-length
296
298
 
297
299
  **Deprecated**: Use the native `minlength` attribute
298
300
 
@@ -331,7 +333,7 @@ Placeholder text should not be used as a substitute for labeling the element wit
331
333
  - Type: `string`
332
334
  - Default: `-`
333
335
 
334
- #### readOnly
336
+ #### read-only
335
337
 
336
338
  **Deprecated**: Use the native readonly attribute instead.
337
339
 
@@ -385,6 +387,3 @@ Lets you set the current value.
385
387
  - Type: `string`
386
388
  - Default: `-`
387
389
 
388
- ### Types
389
-
390
- No types documented.