@warp-ds/elements 2.9.1-next.3 → 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 (91) hide show
  1. package/dist/custom-elements.json +83 -239
  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 +16 -14
  7. package/dist/docs/attention/attention.md +16 -14
  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 -55
  42. package/dist/docs/slider-thumb/slider-thumb.md +26 -57
  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 -224
  63. package/dist/packages/breadcrumbs/breadcrumbs.d.ts +7 -1
  64. package/dist/packages/breadcrumbs/breadcrumbs.js.map +2 -2
  65. package/dist/packages/pagination/pagination.test.js +38 -0
  66. package/dist/packages/slider/slider.d.ts +34 -45
  67. package/dist/packages/slider/slider.js +1 -1
  68. package/dist/packages/slider/slider.js.map +2 -2
  69. package/dist/packages/slider-thumb/slider-thumb.d.ts +36 -31
  70. package/dist/packages/slider-thumb/slider-thumb.js +1 -1
  71. package/dist/packages/slider-thumb/slider-thumb.js.map +2 -2
  72. package/dist/packages/tab/tab.d.ts +29 -24
  73. package/dist/packages/tab/tab.js +3 -3
  74. package/dist/packages/tab/tab.js.map +2 -2
  75. package/dist/packages/tab-panel/tab-panel.d.ts +9 -8
  76. package/dist/packages/tab-panel/tab-panel.js +3 -3
  77. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  78. package/dist/packages/tabs/index.d.ts +1 -0
  79. package/dist/packages/tabs/index.js +0 -1
  80. package/dist/packages/tabs/react.d.ts +4 -3
  81. package/dist/packages/tabs/tabs.d.ts +9 -3
  82. package/dist/packages/tabs/tabs.js.map +2 -2
  83. package/dist/packages/tabs/tabs.react.stories.d.ts +2 -2
  84. package/dist/web-types.json +201 -93
  85. package/package.json +2 -1
  86. package/dist/docs/tab/accessibility.md +0 -1
  87. package/dist/docs/tab/examples.md +0 -1
  88. package/dist/docs/tab/usage.md +0 -1
  89. package/dist/docs/tab-panel/accessibility.md +0 -1
  90. package/dist/docs/tab-panel/examples.md +0 -1
  91. package/dist/docs/tab-panel/usage.md +0 -1
@@ -144,14 +144,16 @@ Clicking the clear button will reset the textfield
144
144
 
145
145
  </elements-example>
146
146
 
147
- ## API Documentation
147
+ ## `<w-affix>` API
148
+
149
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
148
150
 
149
151
  ### Properties
150
152
 
151
153
  | Name | Type | Default | Summary |
152
154
  |-|-|-|-|
153
- | _icon | `unknown` | `-` | - |
154
- | ariaLabel | `string \| null` | `null` | Accessible label for icon-button variants. |
155
+ | _icon (JS only) | `unknown` | `-` | - |
156
+ | aria-label | `string \| null` | `null` | Accessible label for icon-button variants. |
155
157
  | clear | `boolean` | `false` | Renders a clear icon button. |
156
158
  | icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
157
159
  | label | `string` | `''` | Text label shown as prefix/suffix content. |
@@ -159,18 +161,18 @@ Clicking the clear button will reset the textfield
159
161
 
160
162
  ### Property Details
161
163
 
162
- #### _icon
164
+ #### _icon (JS only)
163
165
 
164
166
 
165
167
 
166
168
  - Type: `unknown`
167
169
  - Default: `-`
168
170
 
169
- #### ariaLabel
171
+ #### aria-label
170
172
 
171
173
 
172
174
 
173
- - Type: `string \| null`
175
+ - Type: `string | null`
174
176
  - Default: `null`
175
177
 
176
178
  #### clear
@@ -186,7 +188,7 @@ Set an `aria-label` that explains the action when using this.
186
188
 
187
189
 
188
190
 
189
- - Type: `string \| null`
191
+ - Type: `string | null`
190
192
  - Default: `null`
191
193
 
192
194
  #### label
@@ -203,6 +205,3 @@ Add this property to render a clickable Warp search icon.
203
205
  - Type: `boolean`
204
206
  - Default: `false`
205
207
 
206
- ### Types
207
-
208
- No types documented.
@@ -1,11 +1,13 @@
1
- ## API Documentation
1
+ ## `<w-affix>` 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
- | _icon | `unknown` | `-` | - |
8
- | ariaLabel | `string \| null` | `null` | Accessible label for icon-button variants. |
9
+ | _icon (JS only) | `unknown` | `-` | - |
10
+ | aria-label | `string \| null` | `null` | Accessible label for icon-button variants. |
9
11
  | clear | `boolean` | `false` | Renders a clear icon button. |
10
12
  | icon | `string \| null` | `null` | Icon name rendered as prefix/suffix content. |
11
13
  | label | `string` | `''` | Text label shown as prefix/suffix content. |
@@ -13,18 +15,18 @@
13
15
 
14
16
  ### Property Details
15
17
 
16
- #### _icon
18
+ #### _icon (JS only)
17
19
 
18
20
 
19
21
 
20
22
  - Type: `unknown`
21
23
  - Default: `-`
22
24
 
23
- #### ariaLabel
25
+ #### aria-label
24
26
 
25
27
 
26
28
 
27
- - Type: `string \| null`
29
+ - Type: `string | null`
28
30
  - Default: `null`
29
31
 
30
32
  #### clear
@@ -40,7 +42,7 @@ Set an `aria-label` that explains the action when using this.
40
42
 
41
43
 
42
44
 
43
- - Type: `string \| null`
45
+ - Type: `string | null`
44
46
  - Default: `null`
45
47
 
46
48
  #### label
@@ -57,6 +59,3 @@ Add this property to render a clickable Warp search icon.
57
59
  - Type: `boolean`
58
60
  - Default: `false`
59
61
 
60
- ### Types
61
-
62
- No types documented.
@@ -152,7 +152,9 @@ attribute on [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/AR
152
152
  </script>
153
153
  ```
154
154
 
155
- ## API Documentation
155
+ ## `<w-alert>` API
156
+
157
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
156
158
 
157
159
  ### Properties
158
160
 
@@ -189,5 +191,5 @@ attribute on [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/AR
189
191
 
190
192
  #### AlertVariants
191
193
 
192
- `'negative' \| 'positive' \| 'warning' \| 'info'`
194
+ `'negative' | 'positive' | 'warning' | 'info'`
193
195
 
@@ -1,4 +1,6 @@
1
- ## API Documentation
1
+ ## `<w-alert>` API
2
+
3
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
2
4
 
3
5
  ### Properties
4
6
 
@@ -35,5 +37,5 @@
35
37
 
36
38
  #### AlertVariants
37
39
 
38
- `'negative' \| 'positive' \| 'warning' \| 'info'`
40
+ `'negative' | 'positive' | 'warning' | 'info'`
39
41
 
@@ -1,19 +1,21 @@
1
- ## API Documentation
1
+ ## `<w-attention>` 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
- | _actualDirection | `unknown` | `-` | - |
8
- | _initialPlacement | `unknown` | `-` | - |
9
+ | _actualDirection (JS only) | `unknown` | `-` | - |
10
+ | _initialPlacement (JS only) | `unknown` | `-` | - |
9
11
  | callout | `boolean` | `false` | Renders the component as an inline callout. |
10
- | canClose | `boolean` | `false` | Shows a close button inside the attention component. |
11
- | crossAxis | `boolean` | `false` | Allows overflow checks on the cross axis when flipping. |
12
+ | can-close | `boolean` | `false` | Shows a close button inside the attention component. |
13
+ | cross-axis | `boolean` | `false` | Allows overflow checks on the cross axis when flipping. |
12
14
  | distance | `number` | `8` | Distance offset between trigger and attention panel. |
13
- | fallbackPlacements | `Directions[]` | `[]` | Ordered list of fallback placements. |
15
+ | fallback-placements | `Directions[]` | `[]` | Ordered list of fallback placements. |
14
16
  | flip | `boolean` | `false` | Enables automatic flipping when placement has no space. |
15
17
  | highlight | `boolean` | `false` | Renders the component with highlight styling. |
16
- | noArrow | `boolean` | `false` | Hides the directional arrow of the attention component. |
18
+ | no-arrow | `boolean` | `false` | Hides the directional arrow of the attention component. |
17
19
  | placement | [`Directions`](#directions) | `'bottom'` | Preferred placement relative to the trigger element. |
18
20
  | popover | `boolean` | `false` | Enables native popover behavior for the attention element. |
19
21
  | show | `boolean` | `false` | Controls whether the attention panel is visible. |
@@ -22,14 +24,14 @@
22
24
 
23
25
  ### Property Details
24
26
 
25
- #### _actualDirection
27
+ #### _actualDirection (JS only)
26
28
 
27
29
 
28
30
 
29
31
  - Type: `unknown`
30
32
  - Default: `-`
31
33
 
32
- #### _initialPlacement
34
+ #### _initialPlacement (JS only)
33
35
 
34
36
 
35
37
 
@@ -44,7 +46,7 @@ Callout mode is used for always-in-flow informational content instead of floatin
44
46
  - Type: `boolean`
45
47
  - Default: `false`
46
48
 
47
- #### canClose
49
+ #### can-close
48
50
 
49
51
  Shows a close button inside the attention component.
50
52
  Adds an internal dismiss action that lets users close the attention panel.
@@ -52,7 +54,7 @@ Adds an internal dismiss action that lets users close the attention panel.
52
54
  - Type: `boolean`
53
55
  - Default: `false`
54
56
 
55
- #### crossAxis
57
+ #### cross-axis
56
58
 
57
59
  Allows overflow checks on the cross axis when flipping.
58
60
  Use with `flip` to improve collision handling when space is constrained horizontally or vertically.
@@ -68,7 +70,7 @@ Defines the main-axis spacing in pixels from the anchor element.
68
70
  - Type: `number`
69
71
  - Default: `8`
70
72
 
71
- #### fallbackPlacements
73
+ #### fallback-placements
72
74
 
73
75
  Ordered list of fallback placements.
74
76
  Provides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit.
@@ -92,7 +94,7 @@ Use highlight mode to visually emphasize important contextual information.
92
94
  - Type: `boolean`
93
95
  - Default: `false`
94
96
 
95
- #### noArrow
97
+ #### no-arrow
96
98
 
97
99
  Hides the directional arrow of the attention component.
98
100
  Disable the arrow when the visual connection to the trigger should not be shown.
@@ -144,5 +146,5 @@ Use for compact, non-modal contextual hints anchored to another element.
144
146
 
145
147
  #### Directions
146
148
 
147
- `'top' \| 'top-start' \| 'top-end' \| 'right' \| 'right-start' \| 'right-end' \| 'bottom' \| 'bottom-start' \| 'bottom-end' \| 'left' \| 'left-start' \| 'left-end'`
149
+ `'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'`
148
150
 
@@ -246,22 +246,24 @@ When `can-close` is used, ensure your app listens to the `close` event and updat
246
246
 
247
247
  </elements-example>
248
248
 
249
- ## API Documentation
249
+ ## `<w-attention>` API
250
+
251
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
250
252
 
251
253
  ### Properties
252
254
 
253
255
  | Name | Type | Default | Summary |
254
256
  |-|-|-|-|
255
- | _actualDirection | `unknown` | `-` | - |
256
- | _initialPlacement | `unknown` | `-` | - |
257
+ | _actualDirection (JS only) | `unknown` | `-` | - |
258
+ | _initialPlacement (JS only) | `unknown` | `-` | - |
257
259
  | callout | `boolean` | `false` | Renders the component as an inline callout. |
258
- | canClose | `boolean` | `false` | Shows a close button inside the attention component. |
259
- | crossAxis | `boolean` | `false` | Allows overflow checks on the cross axis when flipping. |
260
+ | can-close | `boolean` | `false` | Shows a close button inside the attention component. |
261
+ | cross-axis | `boolean` | `false` | Allows overflow checks on the cross axis when flipping. |
260
262
  | distance | `number` | `8` | Distance offset between trigger and attention panel. |
261
- | fallbackPlacements | `Directions[]` | `[]` | Ordered list of fallback placements. |
263
+ | fallback-placements | `Directions[]` | `[]` | Ordered list of fallback placements. |
262
264
  | flip | `boolean` | `false` | Enables automatic flipping when placement has no space. |
263
265
  | highlight | `boolean` | `false` | Renders the component with highlight styling. |
264
- | noArrow | `boolean` | `false` | Hides the directional arrow of the attention component. |
266
+ | no-arrow | `boolean` | `false` | Hides the directional arrow of the attention component. |
265
267
  | placement | [`Directions`](#directions) | `'bottom'` | Preferred placement relative to the trigger element. |
266
268
  | popover | `boolean` | `false` | Enables native popover behavior for the attention element. |
267
269
  | show | `boolean` | `false` | Controls whether the attention panel is visible. |
@@ -270,14 +272,14 @@ When `can-close` is used, ensure your app listens to the `close` event and updat
270
272
 
271
273
  ### Property Details
272
274
 
273
- #### _actualDirection
275
+ #### _actualDirection (JS only)
274
276
 
275
277
 
276
278
 
277
279
  - Type: `unknown`
278
280
  - Default: `-`
279
281
 
280
- #### _initialPlacement
282
+ #### _initialPlacement (JS only)
281
283
 
282
284
 
283
285
 
@@ -292,7 +294,7 @@ Callout mode is used for always-in-flow informational content instead of floatin
292
294
  - Type: `boolean`
293
295
  - Default: `false`
294
296
 
295
- #### canClose
297
+ #### can-close
296
298
 
297
299
  Shows a close button inside the attention component.
298
300
  Adds an internal dismiss action that lets users close the attention panel.
@@ -300,7 +302,7 @@ Adds an internal dismiss action that lets users close the attention panel.
300
302
  - Type: `boolean`
301
303
  - Default: `false`
302
304
 
303
- #### crossAxis
305
+ #### cross-axis
304
306
 
305
307
  Allows overflow checks on the cross axis when flipping.
306
308
  Use with `flip` to improve collision handling when space is constrained horizontally or vertically.
@@ -316,7 +318,7 @@ Defines the main-axis spacing in pixels from the anchor element.
316
318
  - Type: `number`
317
319
  - Default: `8`
318
320
 
319
- #### fallbackPlacements
321
+ #### fallback-placements
320
322
 
321
323
  Ordered list of fallback placements.
322
324
  Provides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit.
@@ -340,7 +342,7 @@ Use highlight mode to visually emphasize important contextual information.
340
342
  - Type: `boolean`
341
343
  - Default: `false`
342
344
 
343
- #### noArrow
345
+ #### no-arrow
344
346
 
345
347
  Hides the directional arrow of the attention component.
346
348
  Disable the arrow when the visual connection to the trigger should not be shown.
@@ -392,5 +394,5 @@ Use for compact, non-modal contextual hints anchored to another element.
392
394
 
393
395
  #### Directions
394
396
 
395
- `'top' \| 'top-start' \| 'top-end' \| 'right' \| 'right-start' \| 'right-end' \| 'bottom' \| 'bottom-start' \| 'bottom-end' \| 'left' \| 'left-start' \| 'left-end'`
397
+ `'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'`
396
398
 
@@ -1,4 +1,6 @@
1
- ## API Documentation
1
+ ## `<w-badge>` API
2
+
3
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
2
4
 
3
5
  ### Properties
4
6
 
@@ -15,7 +17,7 @@ Positions the badge in a corner of a parent element.
15
17
  Use this with a parent element that has `position: relative`. When set, the badge uses absolute positioning and adjusts its corner radii so it sits flush against the selected corner.
16
18
  Use this with a parent element that has `position: relative`. Accepted values are `top-left`, `top-right`, `bottom-right`, and `bottom-left`.
17
19
 
18
- - Type: `'top-left' \| 'top-right' \| 'bottom-right' \| 'bottom-left'`
20
+ - Type: `'top-left' | 'top-right' | 'bottom-right' | 'bottom-left'`
19
21
  - Default: `-`
20
22
 
21
23
  #### variant
@@ -24,9 +26,6 @@ Controls the badge color treatment.
24
26
  If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
25
27
  Accepted values are `neutral`, `info`, `positive`, `warning`, `negative`, `disabled`, `price`, and `sponsored`. If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
26
28
 
27
- - Type: `'neutral' \| 'info' \| 'positive' \| 'warning' \| 'negative' \| 'disabled' \| 'price' \| 'sponsored'`
29
+ - Type: `'neutral' | 'info' | 'positive' | 'warning' | 'negative' | 'disabled' | 'price' | 'sponsored'`
28
30
  - Default: `-`
29
31
 
30
- ### Types
31
-
32
- No types documented.
@@ -176,7 +176,9 @@ If the same information is already available in nearby accessible text and the b
176
176
 
177
177
  </elements-example>
178
178
 
179
- ## API Documentation
179
+ ## `<w-badge>` API
180
+
181
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
180
182
 
181
183
  ### Properties
182
184
 
@@ -193,7 +195,7 @@ Positions the badge in a corner of a parent element.
193
195
  Use this with a parent element that has `position: relative`. When set, the badge uses absolute positioning and adjusts its corner radii so it sits flush against the selected corner.
194
196
  Use this with a parent element that has `position: relative`. Accepted values are `top-left`, `top-right`, `bottom-right`, and `bottom-left`.
195
197
 
196
- - Type: `'top-left' \| 'top-right' \| 'bottom-right' \| 'bottom-left'`
198
+ - Type: `'top-left' | 'top-right' | 'bottom-right' | 'bottom-left'`
197
199
  - Default: `-`
198
200
 
199
201
  #### variant
@@ -202,9 +204,6 @@ Controls the badge color treatment.
202
204
  If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
203
205
  Accepted values are `neutral`, `info`, `positive`, `warning`, `negative`, `disabled`, `price`, and `sponsored`. If omitted, the badge uses neutral styling without reflecting a `variant` attribute.
204
206
 
205
- - Type: `'neutral' \| 'info' \| 'positive' \| 'warning' \| 'negative' \| 'disabled' \| 'price' \| 'sponsored'`
207
+ - Type: `'neutral' | 'info' | 'positive' | 'warning' | 'negative' | 'disabled' | 'price' | 'sponsored'`
206
208
  - Default: `-`
207
209
 
208
- ### Types
209
-
210
- No types documented.
@@ -1,4 +1,6 @@
1
- ## API Documentation
1
+ ## `<w-box>` API
2
+
3
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
2
4
 
3
5
  ### Properties
4
6
 
@@ -52,6 +54,3 @@ Defaults to a role of `region`. Set `role="none"` to override this behaviour for
52
54
  - Type: `string`
53
55
  - Default: `'region'`
54
56
 
55
- ### Types
56
-
57
- No types documented.
@@ -185,7 +185,9 @@ If you must use box for a purely visual grouping, set role none:
185
185
  </w-box>
186
186
  ```
187
187
 
188
- ## API Documentation
188
+ ## `<w-box>` API
189
+
190
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
189
191
 
190
192
  ### Properties
191
193
 
@@ -239,6 +241,3 @@ Defaults to a role of `region`. Set `role="none"` to override this behaviour for
239
241
  - Type: `string`
240
242
  - Default: `'region'`
241
243
 
242
- ### Types
243
-
244
- No types documented.
@@ -1 +1,47 @@
1
1
  ## Accessibility
2
+
3
+ Breadcrumbs are exposed as navigation so assistive technology users can identify the path to the current page.
4
+
5
+ ### Label The Navigation
6
+
7
+ The component has a localized default accessible label. Use `aria-label` when the default label is not specific enough, especially if the page has more than one breadcrumb trail or other navigation landmarks nearby.
8
+
9
+ ```html
10
+ <w-breadcrumbs aria-label="Product category path">
11
+ <a href="/marketplace">Marketplace</a>
12
+ <a href="/marketplace/furniture">Furniture</a>
13
+ <span aria-current="page">Sofas</span>
14
+ </w-breadcrumbs>
15
+ ```
16
+
17
+ ### Mark The Current Page
18
+
19
+ The last breadcrumb item should represent the current page and include `aria-current="page"`.
20
+
21
+ Use a non-link element for the current page when it should not be clickable:
22
+
23
+ ```html
24
+ <w-breadcrumbs aria-label="You are here">
25
+ <a href="/real-estate">Real estate</a>
26
+ <a href="/real-estate/homes">Homes for sale</a>
27
+ <span aria-current="page">Oslo</span>
28
+ </w-breadcrumbs>
29
+ ```
30
+
31
+ If the current page remains a link, keep `aria-current="page"` on that link:
32
+
33
+ ```html
34
+ <w-breadcrumbs aria-label="You are here">
35
+ <a href="/real-estate">Real estate</a>
36
+ <a href="/real-estate/homes">Homes for sale</a>
37
+ <a href="/real-estate/homes/oslo" aria-current="page">Oslo</a>
38
+ </w-breadcrumbs>
39
+ ```
40
+
41
+ ### Keep The Trail Predictable
42
+
43
+ Order breadcrumb items from the broadest parent to the current page. Use concise link text that names the destination.
44
+
45
+ Do not include separator characters in the markup. The component adds visual separators between items.
46
+
47
+ Breadcrumbs should support orientation within the site hierarchy. They should not be used as the only way to navigate the site or as a replacement for a page heading.
@@ -1,20 +1,20 @@
1
- ## API Documentation
1
+ ## `<w-breadcrumbs>` 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
- | ariaLabel | `unknown` | `-` | - |
9
+ | ariaLabel (JS only) | `string \| null` | `-` | Accessible label for the breadcrumb navigation. |
8
10
 
9
11
  ### Property Details
10
12
 
11
- #### ariaLabel
12
-
13
+ #### ariaLabel (JS only)
13
14
 
15
+ Accessible label for the breadcrumb navigation.
16
+ Defaults to the localized "You are here" label. Set `aria-label` when the default label is not specific enough for the page.
14
17
 
15
- - Type: `unknown`
18
+ - Type: `string | null`
16
19
  - Default: `-`
17
20
 
18
- ### Types
19
-
20
- No types documented.
@@ -2,33 +2,151 @@
2
2
 
3
3
  ## Description
4
4
 
5
- Breadcrumbs show the navigation structure for the current location.
5
+ Shows the navigation structure for the current page.
6
+ Renders direct child links and non-link elements as a breadcrumb trail, inserts separators between items, and exposes the trail as navigation.
6
7
 
7
8
  [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-breadcrumbs--docs)
8
9
 
9
10
  ## Usage
10
11
 
12
+ Breadcrumbs show where the current page sits in a site hierarchy and let users move back to parent pages.
13
+
14
+ Use `w-breadcrumbs` near the top of a page or section, before the main page heading or primary content. Add each breadcrumb item as a direct child. The component adds separators automatically.
15
+
16
+ ### Basic Breadcrumbs
17
+
18
+ Use links for parent pages and mark the current page with `aria-current="page"`.
19
+
20
+ ```html
21
+ <w-breadcrumbs aria-label="You are here">
22
+ <a href="/real-estate">Real estate</a>
23
+ <a href="/real-estate/homes">Homes for sale</a>
24
+ <span aria-current="page">Oslo</span>
25
+ </w-breadcrumbs>
26
+ ```
27
+
28
+ ### Current Page
29
+
30
+ The current page should be the last breadcrumb item.
31
+
32
+ Use a `span` when the current page should not be clickable:
33
+
34
+ ```html
35
+ <w-breadcrumbs aria-label="You are here">
36
+ <a href="/real-estate">Real estate</a>
37
+ <a href="/real-estate/homes">Homes for sale</a>
38
+ <span aria-current="page">Oslo</span>
39
+ </w-breadcrumbs>
40
+ ```
41
+
42
+ ### Content Guidelines
43
+
44
+ Keep breadcrumb labels short and ordered from broadest section to most specific page. Do not add slash separators yourself; the component inserts them between items.
45
+
46
+ Breadcrumbs should not replace the page heading, primary navigation, or step navigation in a process.
47
+
11
48
  ## Accessibility
12
49
 
50
+ Breadcrumbs are exposed as navigation so assistive technology users can identify the path to the current page.
51
+
52
+ ### Label The Navigation
53
+
54
+ The component has a localized default accessible label. Use `aria-label` when the default label is not specific enough, especially if the page has more than one breadcrumb trail or other navigation landmarks nearby.
55
+
56
+ ```html
57
+ <w-breadcrumbs aria-label="Product category path">
58
+ <a href="/marketplace">Marketplace</a>
59
+ <a href="/marketplace/furniture">Furniture</a>
60
+ <span aria-current="page">Sofas</span>
61
+ </w-breadcrumbs>
62
+ ```
63
+
64
+ ### Mark The Current Page
65
+
66
+ The last breadcrumb item should represent the current page and include `aria-current="page"`.
67
+
68
+ Use a non-link element for the current page when it should not be clickable:
69
+
70
+ ```html
71
+ <w-breadcrumbs aria-label="You are here">
72
+ <a href="/real-estate">Real estate</a>
73
+ <a href="/real-estate/homes">Homes for sale</a>
74
+ <span aria-current="page">Oslo</span>
75
+ </w-breadcrumbs>
76
+ ```
77
+
78
+ If the current page remains a link, keep `aria-current="page"` on that link:
79
+
80
+ ```html
81
+ <w-breadcrumbs aria-label="You are here">
82
+ <a href="/real-estate">Real estate</a>
83
+ <a href="/real-estate/homes">Homes for sale</a>
84
+ <a href="/real-estate/homes/oslo" aria-current="page">Oslo</a>
85
+ </w-breadcrumbs>
86
+ ```
87
+
88
+ ### Keep The Trail Predictable
89
+
90
+ Order breadcrumb items from the broadest parent to the current page. Use concise link text that names the destination.
91
+
92
+ Do not include separator characters in the markup. The component adds visual separators between items.
93
+
94
+ Breadcrumbs should support orientation within the site hierarchy. They should not be used as the only way to navigate the site or as a replacement for a page heading.
95
+
13
96
  ## Examples
14
97
 
15
- ## API Documentation
98
+ ### Basic
99
+
100
+ <elements-example>
101
+ ```html
102
+ <w-breadcrumbs>
103
+ <a href="#/real-estate">Real estate</a>
104
+ <a href="#/real-estate/homes">Homes for sale</a>
105
+ <span aria-current="page">Oslo</span>
106
+ </w-breadcrumbs>
107
+ ```
108
+ </elements-example>
109
+
110
+ ### Custom Accessible Label
111
+
112
+ <elements-example>
113
+ ```html
114
+ <w-breadcrumbs aria-label="Product category path">
115
+ <a href="#/marketplace">Marketplace</a>
116
+ <a href="#/marketplace/furniture">Furniture</a>
117
+ <span aria-current="page">Sofas</span>
118
+ </w-breadcrumbs>
119
+ ```
120
+ </elements-example>
121
+
122
+ ### Short Path
123
+
124
+ <elements-example>
125
+ ```html
126
+ <w-breadcrumbs>
127
+ <a href="#/help">Help</a>
128
+ <span aria-current="page">Contact us</span>
129
+ </w-breadcrumbs>
130
+ ```
131
+ </elements-example>
132
+
133
+ ## `<w-breadcrumbs>` API
134
+
135
+ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
16
136
 
17
137
  ### Properties
18
138
 
19
139
  | Name | Type | Default | Summary |
20
140
  |-|-|-|-|
21
- | ariaLabel | `unknown` | `-` | - |
141
+ | ariaLabel (JS only) | `string \| null` | `-` | Accessible label for the breadcrumb navigation. |
22
142
 
23
143
  ### Property Details
24
144
 
25
- #### ariaLabel
26
-
145
+ #### ariaLabel (JS only)
27
146
 
147
+ Accessible label for the breadcrumb navigation.
148
+ Defaults to the localized "You are here" label. Set `aria-label` when the default label is not specific enough for the page.
28
149
 
29
- - Type: `unknown`
150
+ - Type: `string | null`
30
151
  - Default: `-`
31
152
 
32
- ### Types
33
-
34
- No types documented.