@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
@@ -0,0 +1,11 @@
1
+ ### `<w-modal-footer>` API
2
+
3
+ #### Properties
4
+
5
+ | Name | Type | Default | Summary |
6
+ |-|-|-|-|
7
+
8
+ #### Property Details
9
+
10
+ No public fields documented.
11
+
@@ -0,0 +1,17 @@
1
+ # ModalFooter (w-modal-footer)
2
+
3
+ ## Description
4
+
5
+ The footer section of a modal, typically where you place actions.
6
+
7
+ ### `<w-modal-footer>` API
8
+
9
+ #### Properties
10
+
11
+ | Name | Type | Default | Summary |
12
+ |-|-|-|-|
13
+
14
+ #### Property Details
15
+
16
+ No public fields documented.
17
+
@@ -0,0 +1,42 @@
1
+ ### `<w-modal-header>` API
2
+
3
+ #### Properties
4
+
5
+ | Name | Type | Default | Summary |
6
+ |-|-|-|-|
7
+ | back | `boolean` | `false` | Whether the modal header should have a back button |
8
+ | no-close | `boolean` | `false` | Lets you hide the close button in the header |
9
+ | title | `string` | `-` | A short but descriptive title for the modal |
10
+
11
+ #### Property Details
12
+
13
+ ##### back
14
+
15
+ Whether the modal header should have a back button
16
+
17
+ - Type: `boolean`
18
+ - Default: `false`
19
+
20
+ ##### no-close
21
+
22
+ Lets you hide the close button in the header
23
+
24
+ - Type: `boolean`
25
+ - Default: `false`
26
+
27
+ ##### title
28
+
29
+ A short but descriptive title for the modal
30
+
31
+ - Type: `string`
32
+ - Default: `-`
33
+
34
+ #### Events
35
+
36
+ ##### backClicked
37
+
38
+
39
+
40
+ - Type: `CustomEvent`
41
+
42
+
@@ -0,0 +1,48 @@
1
+ # ModalHeader (w-modal-header)
2
+
3
+ ## Description
4
+
5
+ The header section of a modal, typically where you place the title and a close button.
6
+
7
+ ### `<w-modal-header>` API
8
+
9
+ #### Properties
10
+
11
+ | Name | Type | Default | Summary |
12
+ |-|-|-|-|
13
+ | back | `boolean` | `false` | Whether the modal header should have a back button |
14
+ | no-close | `boolean` | `false` | Lets you hide the close button in the header |
15
+ | title | `string` | `-` | A short but descriptive title for the modal |
16
+
17
+ #### Property Details
18
+
19
+ ##### back
20
+
21
+ Whether the modal header should have a back button
22
+
23
+ - Type: `boolean`
24
+ - Default: `false`
25
+
26
+ ##### no-close
27
+
28
+ Lets you hide the close button in the header
29
+
30
+ - Type: `boolean`
31
+ - Default: `false`
32
+
33
+ ##### title
34
+
35
+ A short but descriptive title for the modal
36
+
37
+ - Type: `string`
38
+ - Default: `-`
39
+
40
+ #### Events
41
+
42
+ ##### backClicked
43
+
44
+
45
+
46
+ - Type: `CustomEvent`
47
+
48
+
@@ -6,22 +6,22 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
6
6
 
7
7
  | Name | Type | Default | Summary |
8
8
  |-|-|-|-|
9
- | page-count | `number` | `-` | Total number of pages (minimum 1) |
10
- | selected-page | `number` | `-` | Currently selected page (1-based index, clamped to valid range) |
9
+ | page-count | `number` | `1` | Total number of pages |
10
+ | selected-page | `number` | `1` | Currently selected page (1-based index) |
11
11
 
12
12
  ### Property Details
13
13
 
14
14
  #### page-count
15
15
 
16
- Total number of pages (minimum 1)
16
+ Total number of pages
17
17
 
18
18
  - Type: `number`
19
- - Default: `-`
19
+ - Default: `1`
20
20
 
21
21
  #### selected-page
22
22
 
23
- Currently selected page (1-based index, clamped to valid range)
23
+ Currently selected page (1-based index)
24
24
 
25
25
  - Type: `number`
26
- - Default: `-`
26
+ - Default: `1`
27
27
 
@@ -1 +1,9 @@
1
1
  ## Examples
2
+
3
+ <elements-example>
4
+
5
+ ```html
6
+ <w-page-indicator selected-page="3" page-count="5"></w-page-indicator>
7
+ ```
8
+
9
+ </elements-example>
@@ -3,14 +3,33 @@
3
3
  ## Description
4
4
 
5
5
  A page indicator component that displays a series of dots representing pages.
6
+
6
7
  One dot is highlighted to indicate the currently selected page.
7
8
 
8
9
  ## Usage
9
10
 
11
+ <elements-example>
12
+
13
+ ```html
14
+ <w-page-indicator page-count="5" selected-page="1"></w-page-indicator>
15
+ ```
16
+
17
+ </elements-example>
18
+
10
19
  ## Accessibility
11
20
 
12
21
  ## Examples
13
22
 
23
+ <elements-example>
24
+
25
+ ```html
26
+ <w-page-indicator selected-page="3" page-count="5"></w-page-indicator>
27
+ ```
28
+
29
+ </elements-example>
30
+
31
+ ## Styling API
32
+
14
33
  ## `<w-page-indicator>` API
15
34
 
16
35
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -19,22 +38,22 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
19
38
 
20
39
  | Name | Type | Default | Summary |
21
40
  |-|-|-|-|
22
- | page-count | `number` | `-` | Total number of pages (minimum 1) |
23
- | selected-page | `number` | `-` | Currently selected page (1-based index, clamped to valid range) |
41
+ | page-count | `number` | `1` | Total number of pages |
42
+ | selected-page | `number` | `1` | Currently selected page (1-based index) |
24
43
 
25
44
  ### Property Details
26
45
 
27
46
  #### page-count
28
47
 
29
- Total number of pages (minimum 1)
48
+ Total number of pages
30
49
 
31
50
  - Type: `number`
32
- - Default: `-`
51
+ - Default: `1`
33
52
 
34
53
  #### selected-page
35
54
 
36
- Currently selected page (1-based index, clamped to valid range)
55
+ Currently selected page (1-based index)
37
56
 
38
57
  - Type: `number`
39
- - Default: `-`
58
+ - Default: `1`
40
59
 
@@ -0,0 +1 @@
1
+ ## Styling API
@@ -1 +1,9 @@
1
1
  ## Usage
2
+
3
+ <elements-example>
4
+
5
+ ```html
6
+ <w-page-indicator page-count="5" selected-page="1"></w-page-indicator>
7
+ ```
8
+
9
+ </elements-example>
@@ -6,46 +6,48 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
6
6
 
7
7
  | Name | Type | Default | Summary |
8
8
  |-|-|-|-|
9
- | base-url | `string` | `-` | - |
10
- | current-page | `number` | `-` | - |
11
- | pages | `number` | `-` | - |
12
- | visible-pages | `number` | `-` | - |
9
+ | base-url | `string` | `-` | The base URL used to construct page links, for example `/search?page=`. |
10
+ | current-page | `number` | `1` | The currently active page number. |
11
+ | pages | `number` | `-` | The total number of pages. |
12
+ | visible-pages | `number` | `7` | The maximum number of page numbers visible. |
13
13
 
14
14
  ### Property Details
15
15
 
16
16
  #### base-url
17
17
 
18
+ The base URL used to construct page links, for example `/search?page=`.
18
19
 
20
+ The page number is appended to this URL.
19
21
 
20
22
  - Type: `string`
21
23
  - Default: `-`
22
24
 
23
25
  #### current-page
24
26
 
25
-
27
+ The currently active page number.
26
28
 
27
29
  - Type: `number`
28
- - Default: `-`
30
+ - Default: `1`
29
31
 
30
32
  #### pages
31
33
 
32
-
34
+ The total number of pages.
33
35
 
34
36
  - Type: `number`
35
37
  - Default: `-`
36
38
 
37
39
  #### visible-pages
38
40
 
39
-
41
+ The maximum number of page numbers visible.
40
42
 
41
43
  - Type: `number`
42
- - Default: `-`
44
+ - Default: `7`
43
45
 
44
46
  ### Events
45
47
 
46
48
  #### page-click
47
49
 
48
- Triggered when a link button in the pagination is clicked. Contains the page number in `string` form.
50
+ Triggered when a link in the pagination is clicked. Contains the page number in `string` form.
49
51
 
50
52
  - Type: `CustomEvent`
51
53
 
@@ -1 +1,21 @@
1
1
  ## Examples
2
+
3
+ ### Single-page app behavior
4
+
5
+ By default the pagination component uses link which trigger a full page navigation.
6
+
7
+ If you want to override this in your app and handle things like scroll and focus management on your own you can add an event listener to the pagination component and prevent the default navigation.
8
+
9
+ ```html
10
+ <w-pagination base-url="/search?page=" pages="10" current-page="5"></w-pagination>
11
+
12
+ <script type="module">
13
+ const pagination = document.querySelector('w-pagination');
14
+
15
+ pagination.addEventListener('page-click', (event) => {
16
+ event.preventDefault();
17
+ // event.detail = { clickedPage: string }
18
+ console.log('Do something with the clicked page after preventing default navigation:', event.detail.clickedPage);
19
+ });
20
+ </script>
21
+ ```
@@ -4,14 +4,52 @@
4
4
 
5
5
  Pagination allows users to navigate through multiple pages of content by providing navigation controls with page numbers and directional arrows.
6
6
 
7
- [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-pagination--docs)
8
-
9
7
  ## Usage
10
8
 
9
+
10
+ The pagination component automatically shows/hides navigation buttons based on the current page:
11
+
12
+ - **First page button** (double chevron): Shown when current page is greater than 2
13
+ - **Previous page button** (single chevron): Shown when current page is greater than 1
14
+ - **Next page button** (single chevron): Shown when current page is less than total pages
15
+
16
+ On mobile devices, the page numbers are hidden and replaced with a "Page X" label for a cleaner interface.
17
+
18
+
19
+ <elements-example>
20
+
21
+ ```html
22
+ <w-pagination base-url="#/search?page=" pages="5" current-page="1"></w-pagination>
23
+ ```
24
+
25
+ </elements-example>
26
+
11
27
  ## Accessibility
12
28
 
13
29
  ## Examples
14
30
 
31
+ ### Single-page app behavior
32
+
33
+ By default the pagination component uses link which trigger a full page navigation.
34
+
35
+ If you want to override this in your app and handle things like scroll and focus management on your own you can add an event listener to the pagination component and prevent the default navigation.
36
+
37
+ ```html
38
+ <w-pagination base-url="/search?page=" pages="10" current-page="5"></w-pagination>
39
+
40
+ <script type="module">
41
+ const pagination = document.querySelector('w-pagination');
42
+
43
+ pagination.addEventListener('page-click', (event) => {
44
+ event.preventDefault();
45
+ // event.detail = { clickedPage: string }
46
+ console.log('Do something with the clicked page after preventing default navigation:', event.detail.clickedPage);
47
+ });
48
+ </script>
49
+ ```
50
+
51
+ ## Styling API
52
+
15
53
  ## `<w-pagination>` API
16
54
 
17
55
  Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).
@@ -20,46 +58,48 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
20
58
 
21
59
  | Name | Type | Default | Summary |
22
60
  |-|-|-|-|
23
- | base-url | `string` | `-` | - |
24
- | current-page | `number` | `-` | - |
25
- | pages | `number` | `-` | - |
26
- | visible-pages | `number` | `-` | - |
61
+ | base-url | `string` | `-` | The base URL used to construct page links, for example `/search?page=`. |
62
+ | current-page | `number` | `1` | The currently active page number. |
63
+ | pages | `number` | `-` | The total number of pages. |
64
+ | visible-pages | `number` | `7` | The maximum number of page numbers visible. |
27
65
 
28
66
  ### Property Details
29
67
 
30
68
  #### base-url
31
69
 
70
+ The base URL used to construct page links, for example `/search?page=`.
32
71
 
72
+ The page number is appended to this URL.
33
73
 
34
74
  - Type: `string`
35
75
  - Default: `-`
36
76
 
37
77
  #### current-page
38
78
 
39
-
79
+ The currently active page number.
40
80
 
41
81
  - Type: `number`
42
- - Default: `-`
82
+ - Default: `1`
43
83
 
44
84
  #### pages
45
85
 
46
-
86
+ The total number of pages.
47
87
 
48
88
  - Type: `number`
49
89
  - Default: `-`
50
90
 
51
91
  #### visible-pages
52
92
 
53
-
93
+ The maximum number of page numbers visible.
54
94
 
55
95
  - Type: `number`
56
- - Default: `-`
96
+ - Default: `7`
57
97
 
58
98
  ### Events
59
99
 
60
100
  #### page-click
61
101
 
62
- Triggered when a link button in the pagination is clicked. Contains the page number in `string` form.
102
+ Triggered when a link in the pagination is clicked. Contains the page number in `string` form.
63
103
 
64
104
  - Type: `CustomEvent`
65
105
 
@@ -0,0 +1 @@
1
+ ## Styling API
@@ -1 +1,19 @@
1
1
  ## Usage
2
+
3
+
4
+ The pagination component automatically shows/hides navigation buttons based on the current page:
5
+
6
+ - **First page button** (double chevron): Shown when current page is greater than 2
7
+ - **Previous page button** (single chevron): Shown when current page is greater than 1
8
+ - **Next page button** (single chevron): Shown when current page is less than total pages
9
+
10
+ On mobile devices, the page numbers are hidden and replaced with a "Page X" label for a cleaner interface.
11
+
12
+
13
+ <elements-example>
14
+
15
+ ```html
16
+ <w-pagination base-url="#/search?page=" pages="5" current-page="1"></w-pagination>
17
+ ```
18
+
19
+ </elements-example>
@@ -1 +1,3 @@
1
1
  ## Accessibility
2
+
3
+ Pills are designed to show active filters. By default they include generic accessible labels, but you can override these with your own.
@@ -6,27 +6,25 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
6
6
 
7
7
  | Name | Type | Default | Summary |
8
8
  |-|-|-|-|
9
- | can-close | `boolean` | `false` | - |
10
- | close-aria-label | `string` | `-` | - |
9
+ | can-close | `boolean` | `false` | Whether the pill should be removable via a close button. |
10
+ | close-aria-label | `string` | `-` | Label read by screen readers when targeting the close button. |
11
11
  | close-sr-label | `string` | `-` | **Deprecated**: Used "close-arial-label" instead. |
12
- | open-aria-label | `string` | `-` | - |
13
- | openFilterSrText (JS only) | `unknown` | `-` | - |
12
+ | open-aria-label | `string` | `-` | Label read by screen readers when targeting the pill. |
14
13
  | open-sr-label | `string` | `-` | **Deprecated**: Used "open-arial-label" instead. |
15
- | removeFilterSrText (JS only) | `unknown` | `-` | - |
16
- | suggestion | `boolean` | `false` | - |
14
+ | suggestion | `boolean` | `false` | Whether the pill should be rendered as a suggestion. |
17
15
 
18
16
  ### Property Details
19
17
 
20
18
  #### can-close
21
19
 
22
-
20
+ Whether the pill should be removable via a close button.
23
21
 
24
22
  - Type: `boolean`
25
23
  - Default: `false`
26
24
 
27
25
  #### close-aria-label
28
26
 
29
-
27
+ Label read by screen readers when targeting the close button.
30
28
 
31
29
  - Type: `string`
32
30
  - Default: `-`
@@ -42,18 +40,11 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
42
40
 
43
41
  #### open-aria-label
44
42
 
45
-
43
+ Label read by screen readers when targeting the pill.
46
44
 
47
45
  - Type: `string`
48
46
  - Default: `-`
49
47
 
50
- #### openFilterSrText (JS only)
51
-
52
-
53
-
54
- - Type: `unknown`
55
- - Default: `-`
56
-
57
48
  #### open-sr-label
58
49
 
59
50
  **Deprecated**: Used "open-arial-label" instead.
@@ -63,16 +54,9 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
63
54
  - Type: `string`
64
55
  - Default: `-`
65
56
 
66
- #### removeFilterSrText (JS only)
67
-
68
-
69
-
70
- - Type: `unknown`
71
- - Default: `-`
72
-
73
57
  #### suggestion
74
58
 
75
-
59
+ Whether the pill should be rendered as a suggestion.
76
60
 
77
61
  - Type: `boolean`
78
62
  - Default: `false`
@@ -81,12 +65,12 @@ Unless otherwise noted all properties are HTML attributes (as opposed to JavaScr
81
65
 
82
66
  #### w-pill-click
83
67
 
84
-
68
+ Fires when the pill itself is clicked.
85
69
 
86
70
  - Type: `CustomEvent`
87
71
  #### w-pill-close
88
72
 
89
-
73
+ Fires when the pill's close button is clicked.
90
74
 
91
75
  - Type: `CustomEvent`
92
76
 
@@ -1 +1,24 @@
1
1
  ## Examples
2
+
3
+ ### Closable
4
+
5
+ For example to dismiss or turn off parts of a filter.
6
+
7
+ <elements-example>
8
+
9
+ ```html
10
+ <w-pill can-close>Filter</w-pill>
11
+ ```
12
+
13
+ </elements-example>
14
+
15
+
16
+ ### Suggestion
17
+
18
+ <elements-example>
19
+
20
+ ```html
21
+ <w-pill suggestion>Suggestion</w-pill>
22
+ ```
23
+
24
+ </elements-example>