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

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 (283) hide show
  1. package/README.md +4 -0
  2. package/dist/api.js +1 -1
  3. package/dist/api.js.map +1 -1
  4. package/dist/custom-elements.json +508 -145
  5. package/dist/docs/affix/affix.md +2 -2
  6. package/dist/docs/affix/styling.md +1 -0
  7. package/dist/docs/alert/alert.md +2 -2
  8. package/dist/docs/alert/styling.md +1 -0
  9. package/dist/docs/attention/attention.md +2 -0
  10. package/dist/docs/attention/styling.md +1 -0
  11. package/dist/docs/badge/badge.md +2 -0
  12. package/dist/docs/badge/styling.md +1 -0
  13. package/dist/docs/box/box.md +22 -40
  14. package/dist/docs/box/examples.md +20 -38
  15. package/dist/docs/box/styling.md +1 -0
  16. package/dist/docs/breadcrumbs/breadcrumbs.md +8 -2
  17. package/dist/docs/breadcrumbs/examples.md +7 -1
  18. package/dist/docs/breadcrumbs/styling.md +1 -0
  19. package/dist/docs/button/accessibility.md +42 -0
  20. package/dist/docs/button/api.md +63 -39
  21. package/dist/docs/button/button.md +395 -42
  22. package/dist/docs/button/examples.md +126 -0
  23. package/dist/docs/button/styling.md +72 -0
  24. package/dist/docs/button/usage.md +89 -0
  25. package/dist/docs/card/accessibility.md +74 -0
  26. package/dist/docs/card/api.md +9 -3
  27. package/dist/docs/card/card.md +236 -5
  28. package/dist/docs/card/examples.md +75 -0
  29. package/dist/docs/card/styling.md +1 -0
  30. package/dist/docs/card/usage.md +76 -0
  31. package/dist/docs/checkbox/api.md +128 -0
  32. package/dist/docs/checkbox/checkbox.md +134 -0
  33. package/dist/docs/checkbox-group/accessibility.md +71 -0
  34. package/dist/docs/checkbox-group/api.md +79 -0
  35. package/dist/docs/checkbox-group/checkbox-group.md +492 -0
  36. package/dist/docs/checkbox-group/examples.md +105 -0
  37. package/dist/docs/checkbox-group/styling.md +132 -0
  38. package/dist/docs/checkbox-group/usage.md +95 -0
  39. package/dist/docs/combobox/accessibility.md +71 -0
  40. package/dist/docs/combobox/api.md +60 -30
  41. package/dist/docs/combobox/combobox.md +205 -32
  42. package/dist/docs/combobox/examples.md +44 -0
  43. package/dist/docs/combobox/styling.md +1 -0
  44. package/dist/docs/combobox/usage.md +28 -0
  45. package/dist/docs/datepicker/accessibility.md +25 -0
  46. package/dist/docs/datepicker/api.md +22 -14
  47. package/dist/docs/datepicker/datepicker.md +208 -16
  48. package/dist/docs/datepicker/examples.md +75 -0
  49. package/dist/docs/datepicker/styling.md +1 -0
  50. package/dist/docs/datepicker/usage.md +84 -0
  51. package/dist/docs/expandable/api.md +20 -32
  52. package/dist/docs/expandable/examples.md +54 -0
  53. package/dist/docs/expandable/expandable.md +74 -32
  54. package/dist/docs/expandable/styling.md +1 -0
  55. package/dist/docs/icon/accessibility.md +5 -0
  56. package/dist/docs/icon/api.md +43 -0
  57. package/dist/docs/icon/examples.md +45 -0
  58. package/dist/docs/icon/icon.md +115 -0
  59. package/dist/docs/icon/styling.md +1 -0
  60. package/dist/docs/icon/usage.md +11 -0
  61. package/dist/docs/index.md +46 -0
  62. package/dist/docs/link/api.md +18 -22
  63. package/dist/docs/link/examples.md +75 -0
  64. package/dist/docs/link/link.md +113 -24
  65. package/dist/docs/link/styling.md +1 -0
  66. package/dist/docs/link/usage.md +18 -0
  67. package/dist/docs/modal/api.md +51 -0
  68. package/dist/docs/modal/examples.md +67 -0
  69. package/dist/docs/modal/modal.md +240 -0
  70. package/dist/docs/modal/styling.md +1 -0
  71. package/dist/docs/modal/usage.md +110 -0
  72. package/dist/docs/modal-footer/api.md +11 -0
  73. package/dist/docs/modal-footer/modal-footer.md +17 -0
  74. package/dist/docs/modal-header/api.md +42 -0
  75. package/dist/docs/modal-header/modal-header.md +48 -0
  76. package/dist/docs/page-indicator/api.md +6 -6
  77. package/dist/docs/page-indicator/examples.md +8 -0
  78. package/dist/docs/page-indicator/page-indicator.md +25 -6
  79. package/dist/docs/page-indicator/styling.md +1 -0
  80. package/dist/docs/page-indicator/usage.md +8 -0
  81. package/dist/docs/pagination/api.md +12 -10
  82. package/dist/docs/pagination/examples.md +20 -0
  83. package/dist/docs/pagination/pagination.md +52 -12
  84. package/dist/docs/pagination/styling.md +1 -0
  85. package/dist/docs/pagination/usage.md +18 -0
  86. package/dist/docs/pill/accessibility.md +2 -0
  87. package/dist/docs/pill/api.md +10 -26
  88. package/dist/docs/pill/examples.md +23 -0
  89. package/dist/docs/pill/pill.md +45 -28
  90. package/dist/docs/pill/styling.md +1 -0
  91. package/dist/docs/pill/usage.md +8 -0
  92. package/dist/docs/radio/radio.md +1 -7
  93. package/dist/docs/select/select.md +2 -0
  94. package/dist/docs/select/styling.md +1 -0
  95. package/dist/docs/slider/slider.md +2 -0
  96. package/dist/docs/slider/styling.md +1 -0
  97. package/dist/docs/slider-thumb/slider-thumb.md +2 -0
  98. package/dist/docs/slider-thumb/styling.md +1 -0
  99. package/dist/docs/step-indicator/step-indicator.md +2 -0
  100. package/dist/docs/step-indicator/styling.md +1 -0
  101. package/dist/docs/switch/styling.md +1 -0
  102. package/dist/docs/switch/switch.md +2 -0
  103. package/dist/docs/tabs/styling.md +1 -0
  104. package/dist/docs/tabs/tabs.md +2 -0
  105. package/dist/docs/textarea/styling.md +1 -0
  106. package/dist/docs/textarea/textarea.md +2 -0
  107. package/dist/docs/textfield/styling.md +1 -0
  108. package/dist/docs/textfield/textfield.md +2 -0
  109. package/dist/index.d.ts +950 -602
  110. package/dist/packages/affix/affix.hydration.test.js +1 -1
  111. package/dist/packages/affix/affix.js +4 -4
  112. package/dist/packages/affix/affix.js.map +4 -4
  113. package/dist/packages/alert/alert.hydration.test.js +1 -1
  114. package/dist/packages/alert/alert.js +3 -3
  115. package/dist/packages/alert/alert.js.map +3 -3
  116. package/dist/packages/attention/attention.hydration.test.js +1 -1
  117. package/dist/packages/attention/attention.js +397 -444
  118. package/dist/packages/attention/attention.js.map +4 -4
  119. package/dist/packages/attention/attention.test.js +1 -1
  120. package/dist/packages/badge/badge.hydration.test.js +1 -1
  121. package/dist/packages/box/box.hydration.test.js +1 -1
  122. package/dist/packages/box/box.js +1 -1
  123. package/dist/packages/box/box.js.map +1 -1
  124. package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +3 -2
  125. package/dist/packages/breadcrumbs/breadcrumbs.js +4 -4
  126. package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
  127. package/dist/packages/button/button.d.ts +54 -37
  128. package/dist/packages/button/button.hydration.test.js +1 -1
  129. package/dist/packages/button/button.js +385 -432
  130. package/dist/packages/button/button.js.map +4 -4
  131. package/dist/packages/button/button.react.stories.d.ts +2 -2
  132. package/dist/packages/button/button.stories.d.ts +29 -0
  133. package/dist/packages/button/button.stories.js +176 -2
  134. package/dist/packages/button/react.d.ts +1 -1
  135. package/dist/packages/button/styles.d.ts +22 -1
  136. package/dist/packages/button/styles.js +390 -1
  137. package/dist/packages/card/card.d.ts +9 -6
  138. package/dist/packages/card/card.hydration.test.js +1 -1
  139. package/dist/packages/card/card.js +3 -3
  140. package/dist/packages/card/card.js.map +4 -4
  141. package/dist/packages/checkbox/checkbox.d.ts +45 -14
  142. package/dist/packages/checkbox/checkbox.hydration.test.js +1 -1
  143. package/dist/packages/checkbox/checkbox.js +3 -3
  144. package/dist/packages/checkbox/checkbox.js.map +3 -3
  145. package/dist/packages/checkbox/checkbox.react.stories.d.ts +1 -1
  146. package/dist/packages/checkbox/checkbox.stories.d.ts +2 -2
  147. package/dist/packages/checkbox/checkbox.test.js +1 -1
  148. package/dist/packages/checkbox/react.d.ts +2 -2
  149. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +1 -1
  150. package/dist/packages/checkbox-group/checkbox-group.d.ts +35 -8
  151. package/dist/packages/checkbox-group/checkbox-group.hydration.test.js +1 -1
  152. package/dist/packages/checkbox-group/checkbox-group.js +6 -6
  153. package/dist/packages/checkbox-group/checkbox-group.js.map +4 -4
  154. package/dist/packages/checkbox-group/react.d.ts +3 -3
  155. package/dist/packages/combobox/combobox.a11y.test.js +24 -0
  156. package/dist/packages/combobox/combobox.d.ts +65 -45
  157. package/dist/packages/combobox/combobox.hydration.test.js +39 -1
  158. package/dist/packages/combobox/combobox.js +21 -21
  159. package/dist/packages/combobox/combobox.js.map +4 -4
  160. package/dist/packages/combobox/combobox.stories.js +28 -15
  161. package/dist/packages/combobox/combobox.test.js +110 -0
  162. package/dist/packages/datepicker/DatePicker.test.js +1 -1
  163. package/dist/packages/datepicker/datepicker.d.ts +22 -30
  164. package/dist/packages/datepicker/datepicker.hydration.test.js +1 -1
  165. package/dist/packages/datepicker/datepicker.js +49 -49
  166. package/dist/packages/datepicker/datepicker.js.map +4 -4
  167. package/dist/packages/datepicker/datepicker.test.js +1 -1
  168. package/dist/packages/expandable/expandable.d.ts +11 -32
  169. package/dist/packages/expandable/expandable.hydration.test.js +1 -1
  170. package/dist/packages/expandable/expandable.js +11 -11
  171. package/dist/packages/expandable/expandable.js.map +3 -3
  172. package/dist/packages/expandable/expandable.react.stories.d.ts +2 -2
  173. package/dist/packages/expandable/react.d.ts +1 -1
  174. package/dist/packages/icon/icon.d.ts +16 -4
  175. package/dist/packages/icon/icon.hydration.test.js +1 -1
  176. package/dist/packages/icon/icon.js +2 -2
  177. package/dist/packages/icon/icon.js.map +3 -3
  178. package/dist/packages/icon/icon.react.stories.d.ts +1 -1
  179. package/dist/packages/icon/react.d.ts +2 -2
  180. package/dist/packages/link/link.d.ts +15 -16
  181. package/dist/packages/link/link.hydration.test.js +1 -1
  182. package/dist/packages/link/link.js +420 -190
  183. package/dist/packages/link/link.js.map +4 -4
  184. package/dist/packages/link/link.test.js +1 -1
  185. package/dist/packages/link/styles.d.ts +5 -0
  186. package/dist/packages/link/styles.js +80 -0
  187. package/dist/packages/modal/index.d.ts +4 -4
  188. package/dist/packages/modal/index.js +4 -4
  189. package/dist/packages/modal/modal.d.ts +22 -12
  190. package/dist/packages/modal/modal.hydration.test.js +1 -1
  191. package/dist/packages/modal/modal.js +5 -5
  192. package/dist/packages/modal/modal.js.map +3 -3
  193. package/dist/packages/modal/modal.react.stories.d.ts +3 -3
  194. package/dist/packages/modal/modal.stories.d.ts +2 -1
  195. package/dist/packages/modal/modal.stories.js +85 -3
  196. package/dist/packages/modal/react.d.ts +2 -2
  197. package/dist/packages/modal-footer/modal-footer.d.ts +5 -3
  198. package/dist/packages/modal-footer/modal-footer.js +4 -4
  199. package/dist/packages/modal-footer/modal-footer.js.map +3 -3
  200. package/dist/packages/modal-footer/react.d.ts +1 -1
  201. package/dist/packages/modal-header/modal-header.d.ts +21 -11
  202. package/dist/packages/modal-header/modal-header.js +11 -9
  203. package/dist/packages/modal-header/modal-header.js.map +4 -4
  204. package/dist/packages/modal-header/react.d.ts +2 -2
  205. package/dist/packages/page-indicator/page-indicator.d.ts +9 -14
  206. package/dist/packages/page-indicator/page-indicator.hydration.test.js +1 -1
  207. package/dist/packages/page-indicator/page-indicator.js +5 -5
  208. package/dist/packages/page-indicator/page-indicator.js.map +4 -4
  209. package/dist/packages/pagination/pagination.d.ts +11 -11
  210. package/dist/packages/pagination/pagination.hydration.test.js +1 -1
  211. package/dist/packages/pagination/pagination.js +4 -4
  212. package/dist/packages/pagination/pagination.js.map +4 -4
  213. package/dist/packages/pagination/pagination.test.js +1 -1
  214. package/dist/packages/pill/pill.d.ts +14 -29
  215. package/dist/packages/pill/pill.hydration.test.js +1 -1
  216. package/dist/packages/pill/pill.js +3 -3
  217. package/dist/packages/pill/pill.js.map +4 -4
  218. package/dist/packages/pill/pill.react.stories.d.ts +2 -2
  219. package/dist/packages/pill/react.d.ts +1 -1
  220. package/dist/packages/radio/radio.hydration.test.js +1 -1
  221. package/dist/packages/radio/radio.js +3 -3
  222. package/dist/packages/radio/radio.js.map +3 -3
  223. package/dist/packages/radio/radio.test.js +1 -1
  224. package/dist/packages/radio-group/radio-group.a11y.test.js +7 -3
  225. package/dist/packages/radio-group/radio-group.hydration.test.js +6 -2
  226. package/dist/packages/radio-group/radio-group.js +11 -11
  227. package/dist/packages/radio-group/radio-group.js.map +4 -4
  228. package/dist/packages/select/select.a11y.test.js +6 -2
  229. package/dist/packages/select/select.hydration.test.js +1 -1
  230. package/dist/packages/select/select.js +7 -7
  231. package/dist/packages/select/select.js.map +4 -4
  232. package/dist/packages/select/select.test.js +4 -2
  233. package/dist/packages/slider/slider.hydration.test.js +7 -2
  234. package/dist/packages/slider/slider.js +5 -5
  235. package/dist/packages/slider/slider.js.map +4 -4
  236. package/dist/packages/slider/slider.react.stories.js +2 -2
  237. package/dist/packages/slider/slider.test.js +1 -1
  238. package/dist/packages/slider-thumb/slider-thumb.hydration.test.js +1 -1
  239. package/dist/packages/slider-thumb/slider-thumb.js +20 -20
  240. package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
  241. package/dist/packages/step/step.hydration.test.js +1 -1
  242. package/dist/packages/step/step.js +8 -8
  243. package/dist/packages/step/step.js.map +4 -4
  244. package/dist/packages/step-indicator/step-indicator.hydration.test.js +1 -1
  245. package/dist/packages/switch/switch.a11y.test.js +1 -1
  246. package/dist/packages/switch/switch.hydration.test.js +1 -1
  247. package/dist/packages/switch/switch.js +1 -1
  248. package/dist/packages/switch/switch.js.map +1 -1
  249. package/dist/packages/tab/tab.hydration.test.js +1 -1
  250. package/dist/packages/tab/tab.js +10 -10
  251. package/dist/packages/tab/tab.js.map +2 -2
  252. package/dist/packages/tab-panel/tab-panel.hydration.test.js +1 -1
  253. package/dist/packages/tab-panel/tab-panel.js +3 -3
  254. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  255. package/dist/packages/tabs/tabs.a11y.test.js +2 -2
  256. package/dist/packages/tabs/tabs.hydration.test.js +1 -1
  257. package/dist/packages/tabs/tabs.js +1 -1
  258. package/dist/packages/tabs/tabs.js.map +2 -2
  259. package/dist/packages/tabs/tabs.test.js +4 -4
  260. package/dist/packages/textarea/textarea.hydration.test.js +1 -1
  261. package/dist/packages/textarea/textarea.js +4 -4
  262. package/dist/packages/textarea/textarea.js.map +3 -3
  263. package/dist/packages/textarea/textarea.test.js +1 -1
  264. package/dist/packages/textfield/textfield.hydration.test.js +1 -1
  265. package/dist/packages/textfield/textfield.js +1 -1
  266. package/dist/packages/textfield/textfield.js.map +1 -1
  267. package/dist/packages/textfield/textfield.test.js +1 -1
  268. package/dist/packages/toast/toast.js +6 -6
  269. package/dist/packages/toast/toast.js.map +4 -4
  270. package/dist/packages/toast/toast.stories.d.ts +1 -5
  271. package/dist/packages/toast/toast.stories.js +0 -17
  272. package/dist/packages/toast-container/toast-container.js +2 -2
  273. package/dist/packages/toast-container/toast-container.js.map +2 -2
  274. package/dist/web-types.json +509 -172
  275. package/eik/index.js +2536 -0
  276. package/package.json +18 -12
  277. package/dist/docs/radio/examples.md +0 -1
  278. package/dist/docs/radio/usage.md +0 -1
  279. package/dist/packages/button/styles/w-button.styles.d.ts +0 -1
  280. package/dist/packages/button/styles/w-button.styles.js +0 -282
  281. package/dist/packages/link/styles/w-link.styles.d.ts +0 -1
  282. package/dist/packages/link/styles/w-link.styles.js +0 -213
  283. /package/dist/docs/{radio → modal}/accessibility.md +0 -0
@@ -4,8 +4,6 @@
4
4
 
5
5
  This component is usually used in other components like form elements to show a prefix or suffix. See for example `w-textfield`.
6
6
 
7
- [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-affix--docs)
8
-
9
7
  ## Usage
10
8
 
11
9
  `w-affix` is typically used inside form controls to render prefix/suffix text or icon actions.
@@ -144,6 +142,8 @@ Clicking the clear button will reset the textfield
144
142
 
145
143
  </elements-example>
146
144
 
145
+ ## Styling API
146
+
147
147
  ## `<w-affix>` API
148
148
 
149
149
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -0,0 +1 @@
1
+ ## Styling API
@@ -6,8 +6,6 @@ Alert is an inline component used for displaying different types of messages.
6
6
 
7
7
  For accessibility reasons, alert should appear close to the element that triggered it.
8
8
 
9
- [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/feedback-alert--docs)
10
-
11
9
  ## Usage
12
10
 
13
11
  Alert is an inline component used for displaying different types of messages.
@@ -152,6 +150,8 @@ attribute on [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/AR
152
150
  </script>
153
151
  ```
154
152
 
153
+ ## Styling API
154
+
155
155
  ## `<w-alert>` API
156
156
 
157
157
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -0,0 +1 @@
1
+ ## Styling API
@@ -246,6 +246,8 @@ When `can-close` is used, ensure your app listens to the `close` event and updat
246
246
 
247
247
  </elements-example>
248
248
 
249
+ ## Styling API
250
+
249
251
  ## `<w-attention>` API
250
252
 
251
253
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -0,0 +1 @@
1
+ ## Styling API
@@ -176,6 +176,8 @@ If the same information is already available in nearby accessible text and the b
176
176
 
177
177
  </elements-example>
178
178
 
179
+ ## Styling API
180
+
179
181
  ## `<w-badge>` API
180
182
 
181
183
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -0,0 +1 @@
1
+ ## Styling API
@@ -4,8 +4,6 @@
4
4
 
5
5
  Box is a layout component used for separating content areas on a page.
6
6
 
7
- [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/layout-box--docs)
8
-
9
7
  ## Usage
10
8
 
11
9
  Box is a layout component for visually separating a section of content from the surrounding page.
@@ -89,13 +87,8 @@ If you must use box for a purely visual grouping, set role none:
89
87
 
90
88
  ### Basic
91
89
 
92
- <style-isolate>
93
- <w-box aria-labelledby="delivery-heading">
94
- <h2 id="delivery-heading">Delivery</h2>
95
- <p>Choose how you want the item delivered.</p>
96
- </w-box>
97
- </style-isolate>
98
-
90
+ <elements-example>
91
+
99
92
  ```html
100
93
  <w-box aria-labelledby="delivery-heading">
101
94
  <h2 id="delivery-heading">Delivery</h2>
@@ -103,14 +96,11 @@ If you must use box for a purely visual grouping, set role none:
103
96
  </w-box>
104
97
  ```
105
98
 
99
+ </elements-example>
100
+
106
101
  ### Neutral
107
102
 
108
- <style-isolate>
109
- <w-box neutral aria-labelledby="order-summary-heading">
110
- <h2 id="order-summary-heading">Order summary</h2>
111
- <p>Review the item price, delivery, and total before continuing.</p>
112
- </w-box>
113
- </style-isolate>
103
+ <elements-example>
114
104
 
115
105
  ```html
116
106
  <w-box neutral aria-labelledby="order-summary-heading">
@@ -119,14 +109,11 @@ If you must use box for a purely visual grouping, set role none:
119
109
  </w-box>
120
110
  ```
121
111
 
112
+ </elements-example>
113
+
122
114
  ### Info
123
115
 
124
- <style-isolate>
125
- <w-box info aria-labelledby="good-to-know-heading">
126
- <h2 id="good-to-know-heading">Good to know</h2>
127
- <p>You can change the delivery method before payment.</p>
128
- </w-box>
129
- </style-isolate>
116
+ <elements-example>
130
117
 
131
118
  ```html
132
119
  <w-box info aria-labelledby="good-to-know-heading">
@@ -135,14 +122,11 @@ If you must use box for a purely visual grouping, set role none:
135
122
  </w-box>
136
123
  ```
137
124
 
125
+ </elements-example>
126
+
138
127
  ### Bordered
139
128
 
140
- <style-isolate>
141
- <w-box bordered aria-labelledby="contact-seller-heading">
142
- <h2 id="contact-seller-heading">Contact seller</h2>
143
- <p>Send a message to ask about pickup times.</p>
144
- </w-box>
145
- </style-isolate>
129
+ <elements-example>
146
130
 
147
131
  ```html
148
132
  <w-box bordered aria-labelledby="contact-seller-heading">
@@ -151,16 +135,11 @@ If you must use box for a purely visual grouping, set role none:
151
135
  </w-box>
152
136
  ```
153
137
 
138
+ </elements-example>
139
+
154
140
  ### Bleed
155
141
 
156
- <style-isolate>
157
- <div style="padding: 0 16px;">
158
- <w-box neutral bleed aria-labelledby="summary-heading">
159
- <h2 id="summary-heading">Summary</h2>
160
- <p>This box extends into the horizontal gutter on narrow screens.</p>
161
- </w-box>
162
- </div>
163
- </style-isolate>
142
+ <elements-example>
164
143
 
165
144
  ```html
166
145
  <div style="padding: 0 16px;">
@@ -171,13 +150,12 @@ If you must use box for a purely visual grouping, set role none:
171
150
  </div>
172
151
  ```
173
152
 
153
+ </elements-example>
154
+
155
+
174
156
  ### Visual Grouping Without Accessibility Landmarking
175
157
 
176
- <style-isolate>
177
- <w-box role="none">
178
- <p>This box is only a visual container.</p>
179
- </w-box>
180
- </style-isolate>
158
+ <elements-example>
181
159
 
182
160
  ```html
183
161
  <w-box role="none">
@@ -185,6 +163,10 @@ If you must use box for a purely visual grouping, set role none:
185
163
  </w-box>
186
164
  ```
187
165
 
166
+ </elements-example>
167
+
168
+ ## Styling API
169
+
188
170
  ## `<w-box>` API
189
171
 
190
172
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -2,13 +2,8 @@
2
2
 
3
3
  ### Basic
4
4
 
5
- <style-isolate>
6
- <w-box aria-labelledby="delivery-heading">
7
- <h2 id="delivery-heading">Delivery</h2>
8
- <p>Choose how you want the item delivered.</p>
9
- </w-box>
10
- </style-isolate>
11
-
5
+ <elements-example>
6
+
12
7
  ```html
13
8
  <w-box aria-labelledby="delivery-heading">
14
9
  <h2 id="delivery-heading">Delivery</h2>
@@ -16,14 +11,11 @@
16
11
  </w-box>
17
12
  ```
18
13
 
14
+ </elements-example>
15
+
19
16
  ### Neutral
20
17
 
21
- <style-isolate>
22
- <w-box neutral aria-labelledby="order-summary-heading">
23
- <h2 id="order-summary-heading">Order summary</h2>
24
- <p>Review the item price, delivery, and total before continuing.</p>
25
- </w-box>
26
- </style-isolate>
18
+ <elements-example>
27
19
 
28
20
  ```html
29
21
  <w-box neutral aria-labelledby="order-summary-heading">
@@ -32,14 +24,11 @@
32
24
  </w-box>
33
25
  ```
34
26
 
27
+ </elements-example>
28
+
35
29
  ### Info
36
30
 
37
- <style-isolate>
38
- <w-box info aria-labelledby="good-to-know-heading">
39
- <h2 id="good-to-know-heading">Good to know</h2>
40
- <p>You can change the delivery method before payment.</p>
41
- </w-box>
42
- </style-isolate>
31
+ <elements-example>
43
32
 
44
33
  ```html
45
34
  <w-box info aria-labelledby="good-to-know-heading">
@@ -48,14 +37,11 @@
48
37
  </w-box>
49
38
  ```
50
39
 
40
+ </elements-example>
41
+
51
42
  ### Bordered
52
43
 
53
- <style-isolate>
54
- <w-box bordered aria-labelledby="contact-seller-heading">
55
- <h2 id="contact-seller-heading">Contact seller</h2>
56
- <p>Send a message to ask about pickup times.</p>
57
- </w-box>
58
- </style-isolate>
44
+ <elements-example>
59
45
 
60
46
  ```html
61
47
  <w-box bordered aria-labelledby="contact-seller-heading">
@@ -64,16 +50,11 @@
64
50
  </w-box>
65
51
  ```
66
52
 
53
+ </elements-example>
54
+
67
55
  ### Bleed
68
56
 
69
- <style-isolate>
70
- <div style="padding: 0 16px;">
71
- <w-box neutral bleed aria-labelledby="summary-heading">
72
- <h2 id="summary-heading">Summary</h2>
73
- <p>This box extends into the horizontal gutter on narrow screens.</p>
74
- </w-box>
75
- </div>
76
- </style-isolate>
57
+ <elements-example>
77
58
 
78
59
  ```html
79
60
  <div style="padding: 0 16px;">
@@ -84,16 +65,17 @@
84
65
  </div>
85
66
  ```
86
67
 
68
+ </elements-example>
69
+
70
+
87
71
  ### Visual Grouping Without Accessibility Landmarking
88
72
 
89
- <style-isolate>
90
- <w-box role="none">
91
- <p>This box is only a visual container.</p>
92
- </w-box>
93
- </style-isolate>
73
+ <elements-example>
94
74
 
95
75
  ```html
96
76
  <w-box role="none">
97
77
  <p>This box is only a visual container.</p>
98
78
  </w-box>
99
79
  ```
80
+
81
+ </elements-example>
@@ -0,0 +1 @@
1
+ ## Styling API
@@ -5,8 +5,6 @@
5
5
  Shows the navigation structure for the current page.
6
6
  Renders direct child links and non-link elements as a breadcrumb trail, inserts separators between items, and exposes the trail as navigation.
7
7
 
8
- [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-breadcrumbs--docs)
9
-
10
8
  ## Usage
11
9
 
12
10
  Breadcrumbs show where the current page sits in a site hierarchy and let users move back to parent pages.
@@ -98,6 +96,7 @@ Breadcrumbs should support orientation within the site hierarchy. They should no
98
96
  ### Basic
99
97
 
100
98
  <elements-example>
99
+
101
100
  ```html
102
101
  <w-breadcrumbs>
103
102
  <a href="#/real-estate">Real estate</a>
@@ -105,11 +104,13 @@ Breadcrumbs should support orientation within the site hierarchy. They should no
105
104
  <span aria-current="page">Oslo</span>
106
105
  </w-breadcrumbs>
107
106
  ```
107
+
108
108
  </elements-example>
109
109
 
110
110
  ### Custom Accessible Label
111
111
 
112
112
  <elements-example>
113
+
113
114
  ```html
114
115
  <w-breadcrumbs aria-label="Product category path">
115
116
  <a href="#/marketplace">Marketplace</a>
@@ -117,19 +118,24 @@ Breadcrumbs should support orientation within the site hierarchy. They should no
117
118
  <span aria-current="page">Sofas</span>
118
119
  </w-breadcrumbs>
119
120
  ```
121
+
120
122
  </elements-example>
121
123
 
122
124
  ### Short Path
123
125
 
124
126
  <elements-example>
127
+
125
128
  ```html
126
129
  <w-breadcrumbs>
127
130
  <a href="#/help">Help</a>
128
131
  <span aria-current="page">Contact us</span>
129
132
  </w-breadcrumbs>
130
133
  ```
134
+
131
135
  </elements-example>
132
136
 
137
+ ## Styling API
138
+
133
139
  ## `<w-breadcrumbs>` API
134
140
 
135
141
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -3,6 +3,7 @@
3
3
  ### Basic
4
4
 
5
5
  <elements-example>
6
+
6
7
  ```html
7
8
  <w-breadcrumbs>
8
9
  <a href="#/real-estate">Real estate</a>
@@ -10,11 +11,13 @@
10
11
  <span aria-current="page">Oslo</span>
11
12
  </w-breadcrumbs>
12
13
  ```
14
+
13
15
  </elements-example>
14
16
 
15
17
  ### Custom Accessible Label
16
18
 
17
19
  <elements-example>
20
+
18
21
  ```html
19
22
  <w-breadcrumbs aria-label="Product category path">
20
23
  <a href="#/marketplace">Marketplace</a>
@@ -22,15 +25,18 @@
22
25
  <span aria-current="page">Sofas</span>
23
26
  </w-breadcrumbs>
24
27
  ```
28
+
25
29
  </elements-example>
26
30
 
27
31
  ### Short Path
28
32
 
29
33
  <elements-example>
34
+
30
35
  ```html
31
36
  <w-breadcrumbs>
32
37
  <a href="#/help">Help</a>
33
38
  <span aria-current="page">Contact us</span>
34
39
  </w-breadcrumbs>
35
40
  ```
36
- </elements-example>
41
+
42
+ </elements-example>
@@ -0,0 +1 @@
1
+ ## Styling API
@@ -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: `-`