@warp-ds/elements 2.9.2-next.1 → 2.10.0-next.2

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 (103) hide show
  1. package/dist/custom-elements.json +281 -58
  2. package/dist/docs/button/accessibility.md +42 -0
  3. package/dist/docs/button/api.md +63 -39
  4. package/dist/docs/button/button.md +322 -40
  5. package/dist/docs/button/examples.md +126 -0
  6. package/dist/docs/button/usage.md +89 -0
  7. package/dist/docs/card/accessibility.md +74 -0
  8. package/dist/docs/card/api.md +9 -3
  9. package/dist/docs/card/card.md +234 -3
  10. package/dist/docs/card/examples.md +75 -0
  11. package/dist/docs/card/usage.md +76 -0
  12. package/dist/docs/modal/accessibility.md +1 -0
  13. package/dist/docs/modal/api.md +51 -0
  14. package/dist/docs/modal/examples.md +67 -0
  15. package/dist/docs/modal/modal.md +238 -0
  16. package/dist/docs/modal/usage.md +110 -0
  17. package/dist/docs/modal-footer/accessibility.md +1 -0
  18. package/dist/docs/modal-footer/api.md +11 -0
  19. package/dist/docs/modal-footer/examples.md +1 -0
  20. package/dist/docs/modal-footer/modal-footer.md +23 -0
  21. package/dist/docs/modal-footer/usage.md +1 -0
  22. package/dist/docs/modal-header/accessibility.md +1 -0
  23. package/dist/docs/modal-header/api.md +42 -0
  24. package/dist/docs/modal-header/examples.md +1 -0
  25. package/dist/docs/modal-header/modal-header.md +54 -0
  26. package/dist/docs/modal-header/usage.md +1 -0
  27. package/dist/docs/page-indicator/api.md +6 -6
  28. package/dist/docs/page-indicator/examples.md +8 -0
  29. package/dist/docs/page-indicator/page-indicator.md +23 -6
  30. package/dist/docs/page-indicator/usage.md +8 -0
  31. package/dist/docs/pagination/api.md +12 -10
  32. package/dist/docs/pagination/examples.md +20 -0
  33. package/dist/docs/pagination/pagination.md +50 -12
  34. package/dist/docs/pagination/usage.md +18 -0
  35. package/dist/docs/pill/accessibility.md +2 -0
  36. package/dist/docs/pill/api.md +10 -26
  37. package/dist/docs/pill/examples.md +23 -0
  38. package/dist/docs/pill/pill.md +43 -28
  39. package/dist/docs/pill/usage.md +8 -0
  40. package/dist/index.d.ts +341 -301
  41. package/dist/packages/affix/affix.js.map +1 -1
  42. package/dist/packages/attention/attention.js +23 -21
  43. package/dist/packages/attention/attention.js.map +4 -4
  44. package/dist/packages/attention/attention.test.js +1 -1
  45. package/dist/packages/breadcrumbs/breadcrumbs.js.map +1 -1
  46. package/dist/packages/button/button.d.ts +54 -37
  47. package/dist/packages/button/button.js +17 -15
  48. package/dist/packages/button/button.js.map +4 -4
  49. package/dist/packages/button/button.react.stories.d.ts +2 -2
  50. package/dist/packages/button/react.d.ts +1 -1
  51. package/dist/packages/card/card.d.ts +9 -6
  52. package/dist/packages/card/card.js.map +3 -3
  53. package/dist/packages/checkbox/checkbox.test.js +1 -1
  54. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +1 -1
  55. package/dist/packages/checkbox-group/checkbox-group.js.map +1 -1
  56. package/dist/packages/combobox/combobox.js.map +1 -1
  57. package/dist/packages/datepicker/DatePicker.test.js +1 -1
  58. package/dist/packages/datepicker/datepicker.js.map +1 -1
  59. package/dist/packages/datepicker/datepicker.test.js +1 -1
  60. package/dist/packages/link/link.test.js +1 -1
  61. package/dist/packages/modal/index.d.ts +4 -4
  62. package/dist/packages/modal/index.js +4 -4
  63. package/dist/packages/modal/modal.d.ts +21 -12
  64. package/dist/packages/modal/modal.js +4 -4
  65. package/dist/packages/modal/modal.js.map +3 -3
  66. package/dist/packages/modal/modal.react.stories.d.ts +3 -3
  67. package/dist/packages/modal/modal.stories.d.ts +2 -1
  68. package/dist/packages/modal/modal.stories.js +85 -3
  69. package/dist/packages/modal/react.d.ts +2 -2
  70. package/dist/packages/modal-footer/modal-footer.d.ts +5 -3
  71. package/dist/packages/modal-footer/modal-footer.js +4 -4
  72. package/dist/packages/modal-footer/modal-footer.js.map +3 -3
  73. package/dist/packages/modal-footer/react.d.ts +1 -1
  74. package/dist/packages/modal-header/modal-header.d.ts +21 -11
  75. package/dist/packages/modal-header/modal-header.js +3 -1
  76. package/dist/packages/modal-header/modal-header.js.map +4 -4
  77. package/dist/packages/modal-header/react.d.ts +2 -2
  78. package/dist/packages/page-indicator/page-indicator.d.ts +9 -14
  79. package/dist/packages/page-indicator/page-indicator.js.map +3 -3
  80. package/dist/packages/pagination/pagination.d.ts +11 -11
  81. package/dist/packages/pagination/pagination.js.map +3 -3
  82. package/dist/packages/pagination/pagination.test.js +1 -1
  83. package/dist/packages/pill/pill.d.ts +14 -29
  84. package/dist/packages/pill/pill.js.map +3 -3
  85. package/dist/packages/pill/pill.react.stories.d.ts +2 -2
  86. package/dist/packages/pill/react.d.ts +1 -1
  87. package/dist/packages/radio/radio.test.js +1 -1
  88. package/dist/packages/radio-group/radio-group.a11y.test.js +1 -1
  89. package/dist/packages/radio-group/radio-group.js.map +1 -1
  90. package/dist/packages/select/select.js.map +1 -1
  91. package/dist/packages/slider/slider.js.map +1 -1
  92. package/dist/packages/slider/slider.test.js +1 -1
  93. package/dist/packages/slider-thumb/slider-thumb.js.map +1 -1
  94. package/dist/packages/step/step.js.map +1 -1
  95. package/dist/packages/switch/switch.a11y.test.js +1 -1
  96. package/dist/packages/tabs/tabs.a11y.test.js +1 -1
  97. package/dist/packages/tabs/tabs.test.js +1 -1
  98. package/dist/packages/textarea/textarea.js.map +1 -1
  99. package/dist/packages/textarea/textarea.test.js +1 -1
  100. package/dist/packages/textfield/textfield.test.js +1 -1
  101. package/dist/packages/toast/toast.js.map +1 -1
  102. package/dist/web-types.json +290 -73
  103. package/package.json +5 -5
@@ -1 +1,43 @@
1
1
  ## Accessibility
2
+
3
+ Buttons must have a clear accessible name and should describe the action they perform.
4
+
5
+ ### Use Descriptive Text
6
+
7
+ Prefer visible text that names the action.
8
+
9
+ ```html
10
+ <w-button>Save changes</w-button>
11
+ ```
12
+
13
+ Avoid vague labels when the action is not obvious from context.
14
+
15
+ ```html
16
+ <!-- Avoid -->
17
+ <w-button>OK</w-button>
18
+ ```
19
+
20
+ ### Icon-Only Buttons
21
+
22
+ If a button does not have visible text, include text for assistive technologies in the slotted content.
23
+
24
+ ```html
25
+ <w-button variant="pill">
26
+ <w-icon name="Close"></w-icon>
27
+ <span class="sr-only">Close</span>
28
+ </w-button>
29
+ ```
30
+
31
+ The accessible text should describe the action, not the icon shape.
32
+
33
+ ### Disabled Buttons
34
+
35
+ Avoid disabled buttons. A disabled control can prevent keyboard users from reaching it and often does not explain what must happen before the action becomes available.
36
+
37
+ Prefer keeping the button available and showing validation or explanatory feedback when the user tries to continue.
38
+
39
+ ### Button Or Link
40
+
41
+ Use a w-button for actions on the current page. Use a w-link for navigation.
42
+
43
+ For backwards compatibility, if `href` is set, `w-button` renders a link with button styling. The accessible behavior is link behavior, even though the component looks like a button. This is deprecated behaviour and you should instead use the w-link component if you need to render a link that looks like a button.
@@ -6,36 +6,31 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
6
6
 
7
7
  | Name | Type | Default | Summary |
8
8
  |-|-|-|-|
9
- | ariaValueTextLoading (JS only) | `unknown` | `-` | - |
10
- | autofocus | `boolean` | `false` | - |
11
- | button-class | `string` | `-` | **Deprecated**: This class is applied inside the shadow DOM and is unlikely to have the desired effect. Use attributes or CSS variables to customize the appearance of the button. |
12
- | disabled | `boolean` | `false` | - |
13
- | full-width | `boolean` | `false` | - |
14
- | href | `string` | `-` | - |
15
- | icon-only | `boolean` | `false` | - |
16
- | loading | `boolean` | `false` | - |
17
- | name | `string` | `-` | - |
18
- | quiet | `boolean` | `false` | **Deprecated**: Use `variant="quiet"` instead |
19
- | rel | `string` | `-` | - |
20
- | shadowRootOptions (JS only) | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | - |
21
- | small | `boolean` | `false` | - |
22
- | target | `string` | `-` | - |
23
- | type | [`ButtonType`](#buttontype) | `-` | - |
24
- | value | `string` | `-` | - |
25
- | variant | [`ButtonVariant`](#buttonvariant) | `-` | - |
9
+ | autofocus | `boolean` | `false` | Focuses the button when it is first rendered. |
10
+ | button-class | `string` | `-` | Deprecated class applied to the internal control. **Deprecated**: This class is applied inside the shadow DOM and is unlikely to have the desired effect. Use attributes or CSS variables to customize the appearance of the button. |
11
+ | command | `string` | `-` | The [command HTML attribute](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API#html_attributes) for Invoker Commands. |
12
+ | commandfor | `string` | `-` | The [commandfor HTML attribute](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API#html_attributes) for Invoker Commands. |
13
+ | disabled | `boolean` | `false` | Visually disables the button. |
14
+ | full-width | `boolean` | `false` | Makes the button fill its parent width. |
15
+ | href | `string` | `-` | URL for rendering the button as a link. |
16
+ | icon-only | `boolean` | `false` | Marks the button as icon-only. |
17
+ | loading | `boolean` | `false` | Shows the loading state. |
18
+ | name | `string` | `-` | Form control name. |
19
+ | quiet | `boolean` | `false` | Deprecated quiet visual treatment flag. **Deprecated**: Use `variant="quiet"` instead |
20
+ | rel | `string` | `-` | Link relationship. |
21
+ | shadowRootOptions (JS only) | `object` | `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }` | Shadow root configuration. |
22
+ | small | `boolean` | `false` | Renders the compact button size. |
23
+ | target | `string` | `-` | Link browsing context. |
24
+ | type | [`ButtonType`](#buttontype) | `-` | Native button type. |
25
+ | value | `string` | `-` | Form control value. |
26
+ | variant | [`ButtonVariant`](#buttonvariant) | `-` | Visual style of the button. |
26
27
 
27
28
  ### Property Details
28
29
 
29
- #### ariaValueTextLoading (JS only)
30
-
31
-
32
-
33
- - Type: `unknown`
34
- - Default: `-`
35
-
36
30
  #### autofocus
37
31
 
38
-
32
+ Focuses the button when it is first rendered.
33
+ Applies only when the component renders a native button. Link buttons with `href` do not autofocus through this component.
39
34
 
40
35
  - Type: `boolean`
41
36
  - Default: `false`
@@ -44,49 +39,70 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
44
39
 
45
40
  **Deprecated**: This class is applied inside the shadow DOM and is unlikely to have the desired effect. Use attributes or CSS variables to customize the appearance of the button.
46
41
 
42
+ Deprecated class applied to the internal control
43
+ This class is applied inside the shadow DOM and is unlikely to have the desired effect. Use attributes or CSS variables to customize the button appearance.
47
44
 
45
+ - Type: `string`
46
+ - Default: `-`
47
+
48
+ #### command
49
+
50
+ The [command HTML attribute](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API#html_attributes) for Invoker Commands.
48
51
 
49
52
  - Type: `string`
50
53
  - Default: `-`
51
54
 
52
- #### disabled
55
+ #### commandfor
53
56
 
57
+ The [commandfor HTML attribute](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API#html_attributes) for Invoker Commands.
54
58
 
59
+ - Type: `string`
60
+ - Default: `-`
61
+
62
+ #### disabled
63
+
64
+ Visually disables the button.
65
+ Disabled buttons are discouraged because they can hide the reason an action is unavailable.
55
66
 
56
67
  - Type: `boolean`
57
68
  - Default: `false`
58
69
 
59
70
  #### full-width
60
71
 
61
-
72
+ Makes the button fill its parent width.
73
+ Useful in narrow layouts where the button should span the available inline space.
62
74
 
63
75
  - Type: `boolean`
64
76
  - Default: `false`
65
77
 
66
78
  #### href
67
79
 
68
-
80
+ URL for rendering the button as a link.
81
+ When set, the component renders `w-link` instead of a native `button`.
69
82
 
70
83
  - Type: `string`
71
84
  - Default: `-`
72
85
 
73
86
  #### icon-only
74
87
 
75
-
88
+ Marks the button as icon-only.
89
+ Use this when the button has no visible text. Include accessible text in the slotted content so the internal button has a name.
76
90
 
77
91
  - Type: `boolean`
78
92
  - Default: `false`
79
93
 
80
94
  #### loading
81
95
 
82
-
96
+ Shows the loading state.
97
+ Use after the user has triggered an action and the action is in progress.
83
98
 
84
99
  - Type: `boolean`
85
100
  - Default: `false`
86
101
 
87
102
  #### name
88
103
 
89
-
104
+ Form control name.
105
+ Used when the button participates in form handling.
90
106
 
91
107
  - Type: `string`
92
108
  - Default: `-`
@@ -95,56 +111,64 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
95
111
 
96
112
  **Deprecated**: Use `variant="quiet"` instead
97
113
 
98
-
114
+ Deprecated quiet visual treatment flag
115
+ Use `variant="quiet"` instead.
99
116
 
100
117
  - Type: `boolean`
101
118
  - Default: `false`
102
119
 
103
120
  #### rel
104
121
 
105
-
122
+ Link relationship.
123
+ Passed to the rendered link when `href` is set. If `target="_blank"` is set and `rel` is omitted, `noopener` is used.
106
124
 
107
125
  - Type: `string`
108
126
  - Default: `-`
109
127
 
110
128
  #### shadowRootOptions (JS only)
111
129
 
112
-
130
+ Shadow root configuration.
131
+ Delegates focus from the host to the internal control.
113
132
 
114
133
  - Type: `object`
115
134
  - Default: `{ ...LitElement.shadowRootOptions, delegatesFocus: true, }`
116
135
 
117
136
  #### small
118
137
 
119
-
138
+ Renders the compact button size.
139
+ Use this in dense layouts where the default button size is too large.
120
140
 
121
141
  - Type: `boolean`
122
142
  - Default: `false`
123
143
 
124
144
  #### target
125
145
 
126
-
146
+ Link browsing context.
147
+ Passed to the rendered link when `href` is set.
127
148
 
128
149
  - Type: `string`
129
150
  - Default: `-`
130
151
 
131
152
  #### type
132
153
 
133
-
154
+ Native button type.
155
+ Controls whether the internal button behaves as a regular button, submits a form, or resets a form. Defaults to `button`.
134
156
 
135
157
  - Type: [`ButtonType`](#buttontype)
136
158
  - Default: `-`
137
159
 
138
160
  #### value
139
161
 
140
-
162
+ Form control value.
163
+ Used with `name` when the button participates in form handling. Resets to its initial value when the form is reset.
141
164
 
142
165
  - Type: `string`
143
166
  - Default: `-`
144
167
 
145
168
  #### variant
146
169
 
147
-
170
+ Visual style of the button.
171
+ Defaults to `secondary`. Use the variant that matches the action priority, risk, and placement.
148
172
 
149
173
  - Type: [`ButtonVariant`](#buttonvariant)
150
174
  - Default: `-`