@warp-ds/elements 2.10.0-next.1 → 2.10.0-next.11

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 (254) 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 +233 -87
  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/button.md +73 -2
  20. package/dist/docs/button/styling.md +72 -0
  21. package/dist/docs/card/accessibility.md +74 -0
  22. package/dist/docs/card/api.md +9 -3
  23. package/dist/docs/card/card.md +236 -5
  24. package/dist/docs/card/examples.md +75 -0
  25. package/dist/docs/card/styling.md +1 -0
  26. package/dist/docs/card/usage.md +76 -0
  27. package/dist/docs/checkbox/api.md +128 -0
  28. package/dist/docs/checkbox/checkbox.md +134 -0
  29. package/dist/docs/checkbox-group/accessibility.md +71 -0
  30. package/dist/docs/checkbox-group/api.md +79 -0
  31. package/dist/docs/checkbox-group/checkbox-group.md +492 -0
  32. package/dist/docs/checkbox-group/examples.md +105 -0
  33. package/dist/docs/checkbox-group/styling.md +132 -0
  34. package/dist/docs/checkbox-group/usage.md +95 -0
  35. package/dist/docs/combobox/accessibility.md +71 -0
  36. package/dist/docs/combobox/api.md +60 -30
  37. package/dist/docs/combobox/combobox.md +205 -32
  38. package/dist/docs/combobox/examples.md +44 -0
  39. package/dist/docs/combobox/styling.md +1 -0
  40. package/dist/docs/combobox/usage.md +28 -0
  41. package/dist/docs/datepicker/accessibility.md +25 -0
  42. package/dist/docs/datepicker/api.md +22 -14
  43. package/dist/docs/datepicker/datepicker.md +208 -16
  44. package/dist/docs/datepicker/examples.md +75 -0
  45. package/dist/docs/datepicker/styling.md +1 -0
  46. package/dist/docs/datepicker/usage.md +84 -0
  47. package/dist/docs/expandable/api.md +20 -32
  48. package/dist/docs/expandable/examples.md +54 -0
  49. package/dist/docs/expandable/expandable.md +74 -32
  50. package/dist/docs/expandable/styling.md +1 -0
  51. package/dist/docs/icon/accessibility.md +5 -0
  52. package/dist/docs/icon/api.md +43 -0
  53. package/dist/docs/icon/examples.md +45 -0
  54. package/dist/docs/icon/icon.md +115 -0
  55. package/dist/docs/icon/styling.md +1 -0
  56. package/dist/docs/icon/usage.md +11 -0
  57. package/dist/docs/index.md +46 -0
  58. package/dist/docs/link/api.md +18 -22
  59. package/dist/docs/link/examples.md +75 -0
  60. package/dist/docs/link/link.md +113 -24
  61. package/dist/docs/link/styling.md +1 -0
  62. package/dist/docs/link/usage.md +18 -0
  63. package/dist/docs/modal/modal.md +2 -0
  64. package/dist/docs/modal/styling.md +1 -0
  65. package/dist/docs/modal-footer/modal-footer.md +0 -6
  66. package/dist/docs/modal-header/modal-header.md +0 -6
  67. package/dist/docs/page-indicator/page-indicator.md +2 -0
  68. package/dist/docs/page-indicator/styling.md +1 -0
  69. package/dist/docs/pagination/pagination.md +2 -0
  70. package/dist/docs/pagination/styling.md +1 -0
  71. package/dist/docs/pill/pill.md +2 -0
  72. package/dist/docs/pill/styling.md +1 -0
  73. package/dist/docs/radio/radio.md +1 -7
  74. package/dist/docs/select/select.md +2 -0
  75. package/dist/docs/select/styling.md +1 -0
  76. package/dist/docs/slider/slider.md +2 -0
  77. package/dist/docs/slider/styling.md +1 -0
  78. package/dist/docs/slider-thumb/slider-thumb.md +2 -0
  79. package/dist/docs/slider-thumb/styling.md +1 -0
  80. package/dist/docs/step-indicator/step-indicator.md +2 -0
  81. package/dist/docs/step-indicator/styling.md +1 -0
  82. package/dist/docs/switch/styling.md +1 -0
  83. package/dist/docs/switch/switch.md +2 -0
  84. package/dist/docs/tabs/styling.md +1 -0
  85. package/dist/docs/tabs/tabs.md +2 -0
  86. package/dist/docs/textarea/styling.md +1 -0
  87. package/dist/docs/textarea/textarea.md +2 -0
  88. package/dist/docs/textfield/styling.md +1 -0
  89. package/dist/docs/textfield/textfield.md +2 -0
  90. package/dist/index.d.ts +932 -341
  91. package/dist/packages/affix/affix.hydration.test.js +1 -1
  92. package/dist/packages/affix/affix.js +4 -4
  93. package/dist/packages/affix/affix.js.map +4 -4
  94. package/dist/packages/alert/alert.hydration.test.js +1 -1
  95. package/dist/packages/alert/alert.js +3 -3
  96. package/dist/packages/alert/alert.js.map +3 -3
  97. package/dist/packages/attention/attention.hydration.test.js +1 -1
  98. package/dist/packages/attention/attention.js +397 -446
  99. package/dist/packages/attention/attention.js.map +4 -4
  100. package/dist/packages/attention/attention.test.js +1 -1
  101. package/dist/packages/badge/badge.hydration.test.js +1 -1
  102. package/dist/packages/box/box.hydration.test.js +1 -1
  103. package/dist/packages/box/box.js +1 -1
  104. package/dist/packages/box/box.js.map +1 -1
  105. package/dist/packages/breadcrumbs/breadcrumbs.hydration.test.js +3 -2
  106. package/dist/packages/breadcrumbs/breadcrumbs.js +4 -4
  107. package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
  108. package/dist/packages/button/button.hydration.test.js +1 -1
  109. package/dist/packages/button/button.js +387 -436
  110. package/dist/packages/button/button.js.map +4 -4
  111. package/dist/packages/button/button.stories.d.ts +29 -0
  112. package/dist/packages/button/button.stories.js +176 -2
  113. package/dist/packages/button/styles.d.ts +22 -1
  114. package/dist/packages/button/styles.js +390 -1
  115. package/dist/packages/card/card.d.ts +9 -6
  116. package/dist/packages/card/card.hydration.test.js +1 -1
  117. package/dist/packages/card/card.js +3 -3
  118. package/dist/packages/card/card.js.map +4 -4
  119. package/dist/packages/checkbox/checkbox.d.ts +45 -14
  120. package/dist/packages/checkbox/checkbox.hydration.test.js +1 -1
  121. package/dist/packages/checkbox/checkbox.js +3 -3
  122. package/dist/packages/checkbox/checkbox.js.map +3 -3
  123. package/dist/packages/checkbox/checkbox.react.stories.d.ts +1 -1
  124. package/dist/packages/checkbox/checkbox.stories.d.ts +2 -2
  125. package/dist/packages/checkbox/checkbox.test.js +1 -1
  126. package/dist/packages/checkbox/react.d.ts +2 -2
  127. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +1 -1
  128. package/dist/packages/checkbox-group/checkbox-group.d.ts +35 -8
  129. package/dist/packages/checkbox-group/checkbox-group.hydration.test.js +1 -1
  130. package/dist/packages/checkbox-group/checkbox-group.js +6 -6
  131. package/dist/packages/checkbox-group/checkbox-group.js.map +4 -4
  132. package/dist/packages/checkbox-group/react.d.ts +3 -3
  133. package/dist/packages/combobox/combobox.a11y.test.js +24 -0
  134. package/dist/packages/combobox/combobox.d.ts +65 -45
  135. package/dist/packages/combobox/combobox.hydration.test.js +39 -1
  136. package/dist/packages/combobox/combobox.js +21 -21
  137. package/dist/packages/combobox/combobox.js.map +4 -4
  138. package/dist/packages/combobox/combobox.stories.js +28 -15
  139. package/dist/packages/combobox/combobox.test.js +110 -0
  140. package/dist/packages/datepicker/DatePicker.test.js +1 -1
  141. package/dist/packages/datepicker/datepicker.d.ts +22 -30
  142. package/dist/packages/datepicker/datepicker.hydration.test.js +1 -1
  143. package/dist/packages/datepicker/datepicker.js +49 -49
  144. package/dist/packages/datepicker/datepicker.js.map +4 -4
  145. package/dist/packages/datepicker/datepicker.test.js +1 -1
  146. package/dist/packages/expandable/expandable.d.ts +11 -32
  147. package/dist/packages/expandable/expandable.hydration.test.js +1 -1
  148. package/dist/packages/expandable/expandable.js +11 -11
  149. package/dist/packages/expandable/expandable.js.map +3 -3
  150. package/dist/packages/expandable/expandable.react.stories.d.ts +2 -2
  151. package/dist/packages/expandable/react.d.ts +1 -1
  152. package/dist/packages/icon/icon.d.ts +16 -4
  153. package/dist/packages/icon/icon.hydration.test.js +1 -1
  154. package/dist/packages/icon/icon.js +2 -2
  155. package/dist/packages/icon/icon.js.map +3 -3
  156. package/dist/packages/icon/icon.react.stories.d.ts +1 -1
  157. package/dist/packages/icon/react.d.ts +2 -2
  158. package/dist/packages/link/link.d.ts +15 -16
  159. package/dist/packages/link/link.hydration.test.js +1 -1
  160. package/dist/packages/link/link.js +420 -190
  161. package/dist/packages/link/link.js.map +4 -4
  162. package/dist/packages/link/link.test.js +1 -1
  163. package/dist/packages/link/styles.d.ts +5 -0
  164. package/dist/packages/link/styles.js +80 -0
  165. package/dist/packages/modal/modal.d.ts +1 -0
  166. package/dist/packages/modal/modal.hydration.test.js +1 -1
  167. package/dist/packages/modal/modal.js +4 -4
  168. package/dist/packages/modal/modal.js.map +3 -3
  169. package/dist/packages/modal/modal.react.stories.d.ts +4 -4
  170. package/dist/packages/modal/modal.react.stories.js +9 -1
  171. package/dist/packages/modal/react.d.ts +34 -4
  172. package/dist/packages/modal/react.js +30 -0
  173. package/dist/packages/modal-header/modal-header.js +11 -9
  174. package/dist/packages/modal-header/modal-header.js.map +4 -4
  175. package/dist/packages/page-indicator/page-indicator.hydration.test.js +1 -1
  176. package/dist/packages/page-indicator/page-indicator.js +5 -5
  177. package/dist/packages/page-indicator/page-indicator.js.map +3 -3
  178. package/dist/packages/pagination/pagination.hydration.test.js +1 -1
  179. package/dist/packages/pagination/pagination.js +4 -4
  180. package/dist/packages/pagination/pagination.js.map +4 -4
  181. package/dist/packages/pagination/pagination.test.js +1 -1
  182. package/dist/packages/pill/pill.hydration.test.js +1 -1
  183. package/dist/packages/pill/pill.js +3 -3
  184. package/dist/packages/pill/pill.js.map +4 -4
  185. package/dist/packages/radio/radio.hydration.test.js +1 -1
  186. package/dist/packages/radio/radio.js +3 -3
  187. package/dist/packages/radio/radio.js.map +3 -3
  188. package/dist/packages/radio/radio.test.js +1 -1
  189. package/dist/packages/radio-group/radio-group.a11y.test.js +7 -3
  190. package/dist/packages/radio-group/radio-group.hydration.test.js +6 -2
  191. package/dist/packages/radio-group/radio-group.js +11 -11
  192. package/dist/packages/radio-group/radio-group.js.map +4 -4
  193. package/dist/packages/select/select.a11y.test.js +6 -2
  194. package/dist/packages/select/select.hydration.test.js +1 -1
  195. package/dist/packages/select/select.js +7 -7
  196. package/dist/packages/select/select.js.map +4 -4
  197. package/dist/packages/select/select.test.js +4 -2
  198. package/dist/packages/slider/slider.hydration.test.js +7 -2
  199. package/dist/packages/slider/slider.js +5 -5
  200. package/dist/packages/slider/slider.js.map +4 -4
  201. package/dist/packages/slider/slider.react.stories.js +2 -2
  202. package/dist/packages/slider/slider.test.js +1 -1
  203. package/dist/packages/slider-thumb/slider-thumb.hydration.test.js +1 -1
  204. package/dist/packages/slider-thumb/slider-thumb.js +20 -20
  205. package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
  206. package/dist/packages/step/step.hydration.test.js +1 -1
  207. package/dist/packages/step/step.js +8 -8
  208. package/dist/packages/step/step.js.map +4 -4
  209. package/dist/packages/step-indicator/step-indicator.hydration.test.js +1 -1
  210. package/dist/packages/switch/switch.a11y.test.js +1 -1
  211. package/dist/packages/switch/switch.hydration.test.js +1 -1
  212. package/dist/packages/switch/switch.js +1 -1
  213. package/dist/packages/switch/switch.js.map +1 -1
  214. package/dist/packages/tab/tab.hydration.test.js +1 -1
  215. package/dist/packages/tab/tab.js +10 -10
  216. package/dist/packages/tab/tab.js.map +2 -2
  217. package/dist/packages/tab-panel/tab-panel.hydration.test.js +1 -1
  218. package/dist/packages/tab-panel/tab-panel.js +3 -3
  219. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  220. package/dist/packages/tabs/tabs.a11y.test.js +2 -2
  221. package/dist/packages/tabs/tabs.hydration.test.js +1 -1
  222. package/dist/packages/tabs/tabs.js +1 -1
  223. package/dist/packages/tabs/tabs.js.map +2 -2
  224. package/dist/packages/tabs/tabs.test.js +4 -4
  225. package/dist/packages/textarea/textarea.hydration.test.js +1 -1
  226. package/dist/packages/textarea/textarea.js +4 -4
  227. package/dist/packages/textarea/textarea.js.map +3 -3
  228. package/dist/packages/textarea/textarea.test.js +1 -1
  229. package/dist/packages/textfield/textfield.hydration.test.js +1 -1
  230. package/dist/packages/textfield/textfield.js +1 -1
  231. package/dist/packages/textfield/textfield.js.map +1 -1
  232. package/dist/packages/textfield/textfield.test.js +1 -1
  233. package/dist/packages/toast/toast.js +6 -6
  234. package/dist/packages/toast/toast.js.map +4 -4
  235. package/dist/packages/toast/toast.stories.d.ts +1 -5
  236. package/dist/packages/toast/toast.stories.js +0 -17
  237. package/dist/packages/toast-container/toast-container.js +2 -2
  238. package/dist/packages/toast-container/toast-container.js.map +2 -2
  239. package/dist/web-types.json +238 -103
  240. package/eik/index.js +2536 -0
  241. package/package.json +15 -9
  242. package/dist/docs/modal-footer/accessibility.md +0 -1
  243. package/dist/docs/modal-footer/examples.md +0 -1
  244. package/dist/docs/modal-footer/usage.md +0 -1
  245. package/dist/docs/modal-header/accessibility.md +0 -1
  246. package/dist/docs/modal-header/examples.md +0 -1
  247. package/dist/docs/modal-header/usage.md +0 -1
  248. package/dist/docs/radio/accessibility.md +0 -1
  249. package/dist/docs/radio/examples.md +0 -1
  250. package/dist/docs/radio/usage.md +0 -1
  251. package/dist/packages/button/styles/w-button.styles.d.ts +0 -1
  252. package/dist/packages/button/styles/w-button.styles.js +0 -282
  253. package/dist/packages/link/styles/w-link.styles.d.ts +0 -1
  254. package/dist/packages/link/styles/w-link.styles.js +0 -213
@@ -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
@@ -5,8 +5,6 @@
5
5
  Performs an action or renders a link with button styling.
6
6
  Use button variants to match action priority, risk, and context.
7
7
 
8
- [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/buttons-button--docs)
9
-
10
8
  ## Usage
11
9
 
12
10
  Button is used for actions. Use it when the user can submit, save, confirm, cancel, open, close, or trigger something on the current page.
@@ -270,6 +268,79 @@ For backwards compatibility, if `href` is set, `w-button` renders a link with bu
270
268
 
271
269
  </elements-example>
272
270
 
271
+ ## Styling API
272
+
273
+ This component supports styling through **component tokens** (CSS custom properties with a --w-c- prefix) and **parts**.
274
+
275
+ ### Parts
276
+
277
+ Use `::part(...)` from outside the component.
278
+
279
+ - `base` — the clickable element (`<button>` or `<w-link>`)
280
+
281
+ Example:
282
+
283
+ ```css
284
+ w-button::part(base) {
285
+ text-transform: uppercase;
286
+ }
287
+ ```
288
+
289
+ ### Component tokens
290
+
291
+ Set these on `w-button` to override visuals.
292
+
293
+ ```css
294
+ w-button {
295
+ --w-c-button-bg: var(--w-s-color-background-primary);
296
+ --w-c-button-color: var(--w-s-color-text-inverted);
297
+ }
298
+ ```
299
+
300
+ #### Layout & typography
301
+
302
+ - `--w-c-button-radius`
303
+ - `--w-c-button-font-size`
304
+ - `--w-c-button-line-height`
305
+ - `--w-c-button-font-weight`
306
+ - `--w-c-button-padding-x`
307
+ - `--w-c-button-padding-y`
308
+
309
+ #### Background
310
+
311
+ - `--w-c-button-bg`
312
+ - `--w-c-button-bg-hover`
313
+ - `--w-c-button-bg-active`
314
+
315
+ #### Text color
316
+
317
+ - `--w-c-button-color`
318
+ - `--w-c-button-color-hover`
319
+ - `--w-c-button-color-active`
320
+
321
+ #### Border
322
+
323
+ - `--w-c-button-border-width`
324
+ - `--w-c-button-border-color`
325
+ - `--w-c-button-border-color-hover`
326
+ - `--w-c-button-border-color-active`
327
+
328
+ #### Focus
329
+
330
+ - `--w-c-button-outline-width`
331
+ - `--w-c-button-outline-color`
332
+ - `--w-c-button-outline-offset`
333
+
334
+ #### Motion
335
+
336
+ - `--w-c-button-transition`
337
+
338
+ ### Notes
339
+
340
+ - Variant defaults are set internally using fallbacks, so overriding tokens works across variants.
341
+ - The `quiet` boolean is supported for backwards compatibility. Prefer `variant="quiet"` going forward.
342
+ - When `loading` is set, the button is treated as disabled (no pointer interaction).
343
+
273
344
  ## `<w-button>` API
274
345
 
275
346
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -0,0 +1,72 @@
1
+ ## Styling API
2
+
3
+ This component supports styling through **component tokens** (CSS custom properties with a --w-c- prefix) and **parts**.
4
+
5
+ ### Parts
6
+
7
+ Use `::part(...)` from outside the component.
8
+
9
+ - `base` — the clickable element (`<button>` or `<w-link>`)
10
+
11
+ Example:
12
+
13
+ ```css
14
+ w-button::part(base) {
15
+ text-transform: uppercase;
16
+ }
17
+ ```
18
+
19
+ ### Component tokens
20
+
21
+ Set these on `w-button` to override visuals.
22
+
23
+ ```css
24
+ w-button {
25
+ --w-c-button-bg: var(--w-s-color-background-primary);
26
+ --w-c-button-color: var(--w-s-color-text-inverted);
27
+ }
28
+ ```
29
+
30
+ #### Layout & typography
31
+
32
+ - `--w-c-button-radius`
33
+ - `--w-c-button-font-size`
34
+ - `--w-c-button-line-height`
35
+ - `--w-c-button-font-weight`
36
+ - `--w-c-button-padding-x`
37
+ - `--w-c-button-padding-y`
38
+
39
+ #### Background
40
+
41
+ - `--w-c-button-bg`
42
+ - `--w-c-button-bg-hover`
43
+ - `--w-c-button-bg-active`
44
+
45
+ #### Text color
46
+
47
+ - `--w-c-button-color`
48
+ - `--w-c-button-color-hover`
49
+ - `--w-c-button-color-active`
50
+
51
+ #### Border
52
+
53
+ - `--w-c-button-border-width`
54
+ - `--w-c-button-border-color`
55
+ - `--w-c-button-border-color-hover`
56
+ - `--w-c-button-border-color-active`
57
+
58
+ #### Focus
59
+
60
+ - `--w-c-button-outline-width`
61
+ - `--w-c-button-outline-color`
62
+ - `--w-c-button-outline-offset`
63
+
64
+ #### Motion
65
+
66
+ - `--w-c-button-transition`
67
+
68
+ ### Notes
69
+
70
+ - Variant defaults are set internally using fallbacks, so overriding tokens works across variants.
71
+ - The `quiet` boolean is supported for backwards compatibility. Prefer `variant="quiet"` going forward.
72
+ - When `loading` is set, the button is treated as disabled (no pointer interaction).
@@ -1 +1,75 @@
1
1
  ## Accessibility
2
+
3
+ Card is a visual container. It does not create a heading, landmark, list item, link, button, or other semantic structure for the slotted content.
4
+
5
+ ### Provide Semantic Content
6
+
7
+ Use semantic HTML inside the card so assistive technologies can understand the content.
8
+
9
+ ```html
10
+ <w-card>
11
+ <article style="padding: 16px;" aria-labelledby="listing-heading">
12
+ <h3 id="listing-heading">Apartment in Oslo</h3>
13
+ <p>Bright 3-room apartment with balcony.</p>
14
+ </article>
15
+ </w-card>
16
+ ```
17
+
18
+ Do not rely on the card surface, border, or selected styling to communicate meaning.
19
+
20
+ ### Selected State
21
+
22
+ Use `selected` only when the card represents a selected item or choice.
23
+
24
+ ```html
25
+ <w-card selected>
26
+ <div style="padding: 16px;">
27
+ <h3>Standard delivery</h3>
28
+ <p>Delivered in 2-4 business days.</p>
29
+ </div>
30
+ </w-card>
31
+ ```
32
+
33
+ The selected state should also be clear from the surrounding context, such as a group label, heading, or visible text.
34
+
35
+ ### Clickable Cards
36
+
37
+ Use `clickable` only when the whole card has one action or represents one selectable choice.
38
+
39
+ ```html
40
+ <w-card clickable>
41
+ <div style="padding: 16px;">
42
+ <h3>Home delivery</h3>
43
+ <p>Delivered to your door.</p>
44
+ </div>
45
+ </w-card>
46
+ ```
47
+
48
+ The visible card content should describe what will be selected or activated. Do not put separate links, buttons, form controls, or other interactive elements inside a clickable card.
49
+
50
+ ### Prefer Specific Interactive Elements
51
+
52
+ If only part of the card is interactive, use the appropriate element for that action.
53
+
54
+ Use a link for navigation:
55
+
56
+ ```html
57
+ <w-card>
58
+ <div style="padding: 16px;">
59
+ <h3><a href="/listings/123">Apartment in Oslo</a></h3>
60
+ <p>Bright 3-room apartment with balcony.</p>
61
+ </div>
62
+ </w-card>
63
+ ```
64
+
65
+ Use a button for an action on the current page:
66
+
67
+ ```html
68
+ <w-card>
69
+ <div style="padding: 16px;">
70
+ <h3>Apartment in Oslo</h3>
71
+ <p>Bright 3-room apartment with balcony.</p>
72
+ <w-button variant="primary">Contact seller</w-button>
73
+ </div>
74
+ </w-card>
75
+ ```
@@ -7,9 +7,9 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
7
7
  | Name | Type | Default | Summary |
8
8
  |-|-|-|-|
9
9
  | buttonText (JS only) | `unknown` | `-` | - |
10
- | clickable | `boolean` | `false` | - |
11
- | flat | `boolean` | `false` | - |
12
- | selected | `boolean` | `false` | - |
10
+ | clickable | `boolean` | `false` | Whether the whole card is interactive. |
11
+ | flat | `boolean` | `false` | Whether the card uses the flat visual treatment. |
12
+ | selected | `boolean` | `false` | Whether the card is visually selected. |
13
13
 
14
14
  ### Property Details
15
15
 
@@ -22,21 +22,27 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
22
22
 
23
23
  #### clickable
24
24
 
25
+ Whether the whole card is interactive.
25
26
 
27
+ When set, the card becomes keyboard focusable and Enter or Space triggers a click on the card. Use this only when the whole card has one action or represents one selectable choice.
26
28
 
27
29
  - Type: `boolean`
28
30
  - Default: `false`
29
31
 
30
32
  #### flat
31
33
 
34
+ Whether the card uses the flat visual treatment.
32
35
 
36
+ Flat cards use a bordered surface instead of the default elevated surface. Use this for denser layouts or when the card sits inside another surface.
33
37
 
34
38
  - Type: `boolean`
35
39
  - Default: `false`
36
40
 
37
41
  #### selected
38
42
 
43
+ Whether the card is visually selected.
39
44
 
45
+ Use this when the card represents a selected item or choice. This only controls the visual selected state; update it from your application state when the selection changes.
40
46
 
41
47
  - Type: `boolean`
42
48
  - Default: `false`